Commit Graph

82396 Commits

Author SHA1 Message Date
Vincent Koc c09f0cd0ce fix(secrets): compare proxy bearer tokens directly 2026-08-26 03:06:49 +08:00
Alix-007 4da57168d3 fix(ai): keep SSE cancellation from blocking outcomes (#128488) 2026-08-25 12:01:24 -07:00
Peter Steinberger 1f812ac4fa fix(browser): cancel pending CDP endpoint discovery (#129410) 2026-08-25 11:54:17 -07:00
Peter Steinberger 858d95fa4d fix(openai): preserve Azure embedding index across key rotation (#129516) 2026-08-25 11:48:25 -07:00
Santhi Prakash 4f18aeabf3 [AI-assisted] docs(browser): teach the code-mode global call, not the removed tools.call API (#128456)
* docs(browser): teach the code-mode global call, not the removed tools.call API

The browser-automation skill's Code Mode Loop still taught the guest
`tools.call(browserTool, input)` API that #126262 removed, together with
the `.result.details`/`.result.content` envelope reads. Rewrite the loop
for the current contract: call the `browser(...)` async global directly,
receive the tool's structured details (targetId, url, newElements, stats,
blockedByDialog), and diff url/new-element counts between cells instead of
filtering snapshot text, since rendered page text is no longer
guest-visible in code mode.

* docs(browser): resolve callable from quick index and read via targeted evaluate

* docs(browser): call the search-resolved handle and carry cell state explicitly
2026-08-25 11:45:42 -07:00
Vincent Koc 55dfee1bb1 fix(googlechat): use agent identity in typing status (#129172)
Co-authored-by: zhuowater <zhuowater@users.noreply.github.com>
2026-08-26 02:42:56 +08:00
Peter Steinberger 95fcb5275e fix(plugins): bound allowlist warning cache (#127126)
Co-authored-by: Amp <amp@ampcode.com>
2026-08-25 11:39:27 -07:00
Peter Steinberger 8bfcdbe884 fix(llama-cpp): prefer loaded models during existing-server setup (#129509) 2026-08-25 11:35:48 -07:00
Alix-007 5e76b5a742 fix(hooks): reload mutable handlers after restored-mtime edits (#128477) 2026-08-25 11:34:33 -07:00
chelsealong 9a8755f6e3 fix(discord): resolve default account for presence actions (#127748)
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-25 11:24:44 -07:00
Heming Zeng 9bf766fa89 fix(diagnostics): defer watchdog abort during preflight (#125929) 2026-08-25 11:24:27 -07:00
Peter Steinberger 4b44cfce5f test(agents): reuse inherited auth owner harness (#129507) 2026-08-25 11:22:54 -07:00
Peter Steinberger 131d1f9b35 test: remove retired provider discovery alias guards (#129500)
Amp-Thread-ID: https://ampcode.com/threads/T-01a037b5-3918-749f-90bd-5c9ac1dced16

Co-authored-by: Amp <amp@ampcode.com>
2026-08-25 11:17:03 -07:00
Vincent Koc 0d4e8f2f5c fix(test): publish runtime in CLI live harness (#129041)
Co-authored-by: Josh Lehman <550978+jalehman@users.noreply.github.com>
2026-08-26 02:13:34 +08:00
Peter Steinberger 03edb00a1c perf(test): seed MCP Doctor fixtures without config mutations (#129498) 2026-08-25 11:12:39 -07:00
Peter Steinberger e06e804955 fix(qa): reject incomplete manual lane responses (#129395)
* fix(qa): reject incomplete manual lane responses

* fix(qa): preserve missing-reply failure diagnostics
2026-08-25 11:04:25 -07:00
Dallin Romney 0ea03f3a3b fix(ci): apply Kova runtime-major RSS calibration (#127763)
* fix(ci): pin Kova runtime-major RSS calibration

* fix(ci): separate Kova live trust pin

* test(ci): prove Kova live trust boundary
2026-08-25 10:57:57 -07:00
Shakker 494ea4b191 fix: keep retired auth lookup runtime-free (#129387)
Keep retired auth-profile lookup on the lightweight provider-policy path so generic auth resolution no longer cold-loads provider runtimes.

Refs #129052
2026-08-25 18:48:21 +01:00
Dallin Romney 1d526c5c0e refactor(qa): adopt Crabline server artifacts (#118008)
* refactor(qa): adopt Crabline server artifacts

* fix(deps): restore Crabline release-age guard
2026-08-25 10:38:28 -07:00
Peter Steinberger 411e233525 fix(browser): surface terminal dialog handling failures (#129459) 2026-08-25 10:37:46 -07:00
Daniel Peng a2ef21e433 fix(slack): preserve long legacy interactive text (#127994)
* fix(slack): preserve long interactive and presentation text

* fix(slack): retain every outbound delivery receipt

Co-authored-by: Peter Steinberger <steipete@gmail.com>

* test(slack): narrow presentation regression fixtures

Co-authored-by: Peter Steinberger <steipete@gmail.com>

* fix(slack): preserve single-message presentation edits

Co-authored-by: Peter Steinberger <steipete@gmail.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-25 10:28:31 -07:00
Peter Steinberger a6810bb00e fix(ui): align sidebar unread dot with pull-request rows (#129477)
The trailing unread dot sat 3.5px inboard on rows that also show a
pull-request icon, so the dots did not form one column down the sidebar.

`.session-row-state` centred its glyphs as one flex box, which only lands
the glyph on the action-icon axis when the box holds exactly one glyph.
Give each glyph its own fixed 14px grid track instead, so the trailing
glyph keeps that axis regardless of what precedes it.
2026-08-25 10:26:53 -07:00
Peter Steinberger 4800ef499c fix(feishu): preserve rich-post attachment order and avoid duplicate downloads (#129472) 2026-08-25 10:23:00 -07:00
Peter Steinberger 1998fd8e0f fix(ios): preserve keyboard feedback during voice capture (#129462) 2026-08-25 10:22:24 -07:00
Ayaan Gazali 22e12267f6 fix(browser): give a paired extension time to attach before declaring it offline (#127761)
* fix(browser): preserve live relay ownership and await authenticated attachment

Co-authored-by: Peter Steinberger <steipete@gmail.com>

* fix(browser): keep extension attachment outside serialized startup

Co-authored-by: Peter Steinberger <steipete@gmail.com>

* fix(browser): give shared relay startup lifecycle-owned cancellation

Co-authored-by: Peter Steinberger <steipete@gmail.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-25 10:21:30 -07:00
Dallin Romney e9a000452a fix(agents): deliver yielded requester settle finals (#127292) 2026-08-25 10:11:21 -07:00
Peter Steinberger d050cf956b fix(macos): confirm closing onboarding during API key verification (#129447) 2026-08-25 10:09:21 -07:00
Alix-007 930f740f83 fix(matrix): send fallback media when attachment list is blank (#128479)
* fix(matrix): send fallback media when attachment list is blank

* fix(matrix): align media validation and delivery

* fix(matrix): reject whitespace-only reply parts

* fix(matrix): normalize streamed reply media before draft finalization

Co-authored-by: Alix-007 <li.long15@xydigit.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-25 10:04:19 -07:00
Peter Steinberger 74e28b1b32 fix(vercel): exclude non-language gateway models from chat catalog (#129406) 2026-08-25 09:57:17 -07:00
Peter Steinberger b28658d04c fix(imessage): preserve ordinary quoted messages (#129450) 2026-08-25 09:57:14 -07:00
Shakker c94b0bd92d fix: restore plugin SDK export budget (#129383)
Restore the intended Plugin SDK provider-auth surface by keeping two unused, unshipped Claude compatibility types private while preserving the credential reader.

Refs #129052.
2026-08-25 17:53:00 +01:00
Peter Steinberger 16c097b2da fix(slack): deduplicate mirrored question controls (#129445) 2026-08-25 09:46:30 -07:00
Peter Steinberger 830700d04b fix(macos): reject failing Gateway runtime probes (#129453) 2026-08-25 09:45:39 -07:00
Shakker 606bf4d6cd test: stabilize auth and lifecycle fixtures (#129397)
Stabilize auth and lifecycle test fixtures by removing retired Claude file-auth coverage, isolating process registry state, and avoiding heavyweight turn-model imports.

Refs #129052.
2026-08-25 17:39:38 +01:00
Peter Steinberger 4fd42aa037 refactor(discord): unify reaction client resolution (#129441) 2026-08-25 09:37:20 -07:00
Peter Steinberger 2a33d749e5 fix(macos): keep onboarding progress aligned with recommended setup (#129435) 2026-08-25 09:31:07 -07:00
SunnyShu 336ce945f0 fix(update): fail the git updater when the final HEAD verification probe errors (#129036)
The git updater classified blocking step failures before appending the final
"git rev-parse HEAD (after)" probe, so a nonzero exit from that probe was
invisible to findBlockingGitFailure. The result could report status:"ok"
with a null after.sha even though the installed revision was never verified.

Route the failed probe through rollbackError("head-verification-failed"),
matching every other failure path, so the checkout is rolled back and no
after identity is fabricated.

Fixes #127412
2026-08-25 09:24:11 -07:00
licheer-zte b0e9fd6252 fix(workboard): heal oversized persisted notifications (#120999)
Preserve the existing UTF-16-safe notification cap at the canonical metadata normalization boundary so a legacy oversized row cannot abort dispatch or starve sibling cards. Move the existing capText helper into its normalization owner without production growth.

Co-authored-by: licheer-zte <licheer-zte@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-25 09:20:12 -07:00
Ayaan Zaidi ecf0631779 test(doctor): assert auth health targets in collection order (#129409)
## What Problem This Solves

`check-lint-core-3` is red on `main` since #129375: `src/commands/doctor-auth.profile-health.test.ts:179` calls `toSorted()` with no compare function, which `typescript/require-array-sort-compare` rejects (`main` `d53ea9cf4`, job `check-lint-core-3`).

## Why This Change Was Made

The findings are collected in a fixed target order (`targets` map insertion in `src/commands/doctor-auth.ts`), so the test asserts that order directly, like the sibling assertion at line 206. Test-only change; no behavior change.

## User Impact

None at runtime. Restores the `check-lint-core-3` gate on `main`.

## Evidence

- `node scripts/run-oxlint.mjs src/commands/doctor-auth.profile-health.test.ts` — clean.
- `node scripts/run-vitest.mjs src/commands/doctor-auth.profile-health.test.ts` — 23 passed.
- LOC: production 0; tests +4 / −3 (comparator-based first push failed `check-test-types-core-1`: `target` is optional).
- Other `main` failures (`checks-node-compact-*` auth-resolution hangs from #129052) are not addressed here; a separate PR carries that fix.
2026-08-25 21:28:43 +05:30
Peter Steinberger 6ad7915c05 fix(macos): expose channel account failures in settings (#129400) 2026-08-25 08:55:22 -07:00
Josh Lehman 9cfb4ff956 fix(skills): detach experience review generation scope (#129218)
Skill Workshop experience review arms a timer inside the foreground turn's prepared-runtime generation scope. When the timer fired after that generation was superseded (runtime config publication, idle expiry), the review admitted under the stale generation and failed with "prepared model runtime plugin generation was superseded". Create the timer's async resource outside the parent scope so detached review work admits on the current generation.

Regression test: schedules inside a prepared generation scope and asserts the review callbacks observe no inherited generation; fails on pre-fix code.

Co-authored-by: Josh Lehman <550978+jalehman@users.noreply.github.com>
2026-08-25 21:00:42 +05:30
Peter Steinberger 1699e98400 fix(browser): detect selected profile executable consistently (#129394) 2026-08-25 08:30:05 -07:00
Peter Steinberger d53ea9cf4d fix(whatsapp): avoid mentions inside unterminated inline code (#129281)
* fix(whatsapp): avoid mentions inside unterminated inline code

* fix(whatsapp): protect mentions across soft code line breaks

* fix(whatsapp): honor escaped multiline code delimiter runs
2026-08-25 08:15:51 -07:00
Shakker 8a93f681c0 fix: clean retired Claude auth before Doctor health (#129375)
Doctor now persists repaired configuration, removes retired Claude CLI auth state, and then reports health from the canonical store.

Refs #129333.
2026-08-25 16:15:07 +01:00
Ayaan Zaidi b0c27e2d8f fix(skills): fork the foreground session for lean experience review (#129282)
## What Problem This Solves

Skill Workshop experience review ran as an isolated agent with a re-rendered 60k-character transcript, its own bootstrap, and a trimmed tool surface. Every review was a cold request: no prompt-cache reuse, a large re-serialized trajectory, and a reasoning/tool profile that differed from the foreground turn. Autonomous updates could target any workspace skill, size limits allowed 40 KB skills to grow unchecked (one deployed workspace hit a 21 KB `SKILL.md`), the collection reviewer had to re-list every skill in its plan and read them under a fixed 24k-character budget (a 16-skill workspace failed every pass with "Read every current skill before reconciling"), collection review only recorded successes so a failing pass retried on every Gateway restart, and `openclaw skills curator status` showed nothing about what the last reviews did.

## Why This Change Was Made

- **Warm fork.** Experience review now continues the finished turn from the same in-memory session prefix (same session identity, bootstrap, skills prompt, tool schemas, `promptCacheKey`), appends one short review message, and runs with `sessionPersistence: "detached"` so nothing it writes reaches the foreground transcript or session record. Only `skill_workshop` executes; every other tool keeps its schema for cache parity and fails with a next-step message. The gate wraps the core tool list before Code Mode / Tool Search compaction, so catalog-hidden tools stay gated while `tool_call`/`exec` remain callable. `src/agents/embedded-agent-runner/run/attempt.skills-policy.test.ts` asserts identical system-prompt and tool digests between a foreground turn and its review, and that `tool_call` reaches `skill_workshop` but not `read` during review. Code Mode swarm globals (`phase`, `log`, `agents.run`) are the `sessions_spawn` capability and gate on the same allowlist, so a review cannot emit foreground lifecycle events or launch collectors. The review shares the foreground session, so it no longer retires that session's MCP runtime on run end; it reuses the warm runtime like any turn. Accepted tradeoff: the review inherits foreground tool construction (it creates the session MCP runtime only when the session has none, and spawns per-attempt LSP servers only when configured), because splitting tool construction from the foreground turn would break the cache-parity invariant this PR exists for.
- **One apply owner, rechecked at the write boundary.** `src/skills/workshop/autonomous-apply.ts` decides apply-vs-pending for both the post-review loop and foreground repair: creates and updates to Workshop-authored skills apply; updates to user-authored skills stay pending with a recorded reason. `applySkillProposalTransition` rechecks path-based ownership under the commit lock for non-operator actors (agent, or no actor), so a claim released after the pre-check cannot let an agent write a user-authored skill; gateway and CLI operators still approve any pending proposal. The user-authored pending write runs under the same commit lock and rereads the row, so an operator apply that lands first is kept. The old `auto-apply.ts` path and name-based `listWorkshopAuthoredSkillNames` are deleted.
- **Sparse collection plan and model-relative reads.** The collection reviewer returns only `write` and `drop` entries; unlisted skills stay untouched, so a 16-skill workspace no longer has to restate 16 keeps. The skill read budget is derived from the model's context window (35%) instead of a fixed 24k characters, with the 10,000-character skill cap still enforced per skill. No windowed read parameters: a skill is read whole or not at all.
- **Weekly cadence.** Collection review runs once every 7 days instead of daily (`REVIEW_INTERVAL_MS`), matching how slowly a skill library actually changes; the attempt is recorded before the model starts, so a failed pass does not retry on every restart.
- **Lean cap.** `AUTONOMOUS_SKILL_MAX_CHARS = 10,000` in `src/skills/workshop/collection-contracts.ts` is enforced by the tool and by collection reconcile; an oversized skill may only shrink. Tool description, experience prompt, and collection prompt were rewritten around procedures-not-records, one trigger per branch, and "NOTHING_TO_LEARN is the correct answer for most turns".
- **Detached runs end quietly.** A detached run writes no transcript or session record and runs under the foreground session key, so `attempt-finalize` now skips agent_end side effects for it: plugins do not observe the review as a foreground turn, and a deep review cannot schedule a successor review of itself.
- **Recorded outcomes.** Experience review records `applied | proposed | nothing | failed` with usage; one attempt per turn, drop on error. `openclaw skills curator status` prints the last collection and experience review outcome.

## User Impact

- Default `auto` mode: experience review reuses the foreground prompt cache and skips message/other tool execution, so review cost is one bounded continuation instead of a cold re-render.
- Autonomous edits touch only Workshop-authored skills; handwritten skills surface as pending proposals for operator approval.
- Autonomous `SKILL.md` results stay ≤ 10,000 characters.
- Collection review runs weekly and succeeds on larger skill libraries. A workspace with no recorded attempt reviews at the first daily check after Gateway start; an upgraded install keeps its recorded last attempt and reviews once it is older than 7 days. The 10,000-character cap applies to the next autonomous write; existing oversized skills are only ever shrunk.
- `openclaw skills curator status` shows the last collection and experience review outcome, time, and tokens.
- Docs: https://docs.openclaw.ai/tools/self-learning, https://docs.openclaw.ai/tools/skill-workshop

Related: #123866, #128871 both patch skills above the reviewer read budget; this PR caps autonomous skill size and restricts oversized skills to shrink-only rewrites.

## Evidence

- Live gateway (Linux, Telegram, `xai` provider) at `133ffe3`: manual experience review on a real foreground turn → `nothing` (usage: 0 uncached input, 13,902 cached, 36 output — the forked review hit the foreground prompt cache); manual collection review over the workspace → `succeeded`; the three oversized skills were rewritten under the cap (21,002 → 9,449; 11,882 → 7,735; 10,300 → 7,413 bytes, originals in `skill-workshop/collection-backups/`), the rest untouched, and the pre-PR "Read every current skill before reconciling" failure is gone. The next foreground turn's automatic experience review recorded `nothing` and `openclaw skills curator status` shows both outcomes. The apply recheck, MCP-runtime change (`26e821f`), and detached agent_end skip (`7e4a506`) landed after that run and are covered by the regression tests below.
- `pnpm test src/skills/workshop src/agents/tools/skill-workshop-tool src/gateway/server-methods/skills` plus `src/agents/embedded-agent-runner/run/attempt.skills-policy.test.ts`, `src/agents/embedded-agent-runner/run/attempt.tool-search-catalog-abort.test.ts`, `src/cli/skills-cli.curator.test.ts`, `src/agents/harness/tool-surface-bridge.test.ts` — green. New regression tests (`service.test.ts` agent-vs-operator apply on a user-authored skill and operator apply kept over a stale pending snapshot; `experience-review.apply.test.ts` no `cleanupBundleMcpOnRunEnd`; `attempt-phase-lifecycle.test.ts` no agent_end for a detached run; `code-mode-swarm.test.ts` swarm globals refused under the review allowlist) fail on the pre-fix code.
- Dependent sweep: 46 test files importing the touched modules — green.
- `oxfmt`, `scripts/run-oxlint.mjs` on changed files, `git diff --check` — clean.
- `pnpm tsgo && pnpm check:test-types` on Blacksmith Testbox — clean.
- Local ClawSweeper review (`gpt-5.6-terra`, high): `133ffe3` raised two findings (ownership recheck removed from the apply boundary; review retiring the shared session's MCP runtime), fixed in `26e821f`; `26e821f` raised one (detached review re-entering agent-end scheduling), fixed in `7e4a506`; `7e4a506` raised three: pending write racing an operator apply and Code Mode swarm globals bypassing the execution gate, both fixed in `e4b4322`; "prove detached review does not start configured MCP or LSP runtimes" is skipped as the cache-parity tradeoff stated above (LSP tool schemas come from the LSP runtime; the MCP runtime is session-owned and already warm). Maintainer decision on `e4b4322`: accepted — a detached review reuses the session MCP runtime and re-spawns configured per-attempt LSP servers exactly like a foreground turn; it still cannot execute them.
- Unrelated CI on `26e821f`/`7e4a506`: `check-lint-core-2` (`max-lines` in `src/gateway/server-methods/models-list-result.ts`, unused param in `models.test.ts`, both from #129332) and `checks-node-compact-small-8` (`doctor-auth.profile-health.test.ts`, Claude CLI auth from #129052) fail identically on `main` run 32857954734; `checks-node-compact-small-31` pins plugin SDK export counts (`4340` vs `4342`) that #129052 moved — this PR touches no `src/plugin-sdk` file. On `e4b4322` the failing set is the same twelve `checks-node-compact` shards that fail on `main` run 32857954734 (`large-5/12/13/14/15/18/22`, `small-8/14/20/21/26`) plus `small-31`; `check-lint-core-2` passes here. None are fixed here; #129357 carries the `main` fix.
- LOC (raw numstat): production +712 / −664 (net +48; the four review-fix commits after the live run add +76 / −26); tests + docs +1269 / −1238 (net +31).
2026-08-25 20:27:25 +05:30
Peter Steinberger ebf79b4c36 fix(cli): recognize OAuth authorization headers regardless of casing (#129279) 2026-08-25 07:50:57 -07:00
Shakker bd6fce44ac test: reuse embedded runner permission harness (#129385) 2026-08-25 15:50:42 +01:00
Shakker ce62d6db74 test: await lazy sidebar load before teardown (#129376)
* fix: drain lazy UI module loads in tests

* test: await lazy sidebar before teardown
2026-08-25 15:47:28 +01:00
Shakker 2390f3d938 refactor: isolate native CLI availability resolver (#129374)
Moved native CLI availability ownership resolution into the model-list auth owner and removed the stale test callback, restoring lint without changing behavior.

Refs #129332.
2026-08-25 15:30:08 +01:00
Peter Steinberger 433cf95d71 fix(telegram): preserve sent replies when required pins fail (#129342) 2026-08-25 07:20:39 -07:00