Commit Graph

20102 Commits

Author SHA1 Message Date
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 8bfcdbe884 fix(llama-cpp): prefer loaded models during existing-server setup (#129509) 2026-08-25 11:35:48 -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
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
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 4800ef499c fix(feishu): preserve rich-post attachment order and avoid duplicate downloads (#129472) 2026-08-25 10:23:00 -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
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
Peter Steinberger 16c097b2da fix(slack): deduplicate mirrored question controls (#129445) 2026-08-25 09:46:30 -07:00
Peter Steinberger 4fd42aa037 refactor(discord): unify reaction client resolution (#129441) 2026-08-25 09:37:20 -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
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
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 433cf95d71 fix(telegram): preserve sent replies when required pins fail (#129342) 2026-08-25 07:20:39 -07:00
Peter Steinberger 712a97d2ab fix(discord): prevent accidental mentions inside unfinished code (#129338)
* fix(discord): protect mentions inside unfinished inline code

* fix(discord): respect escaped inline-code delimiters
2026-08-25 07:11:28 -07:00
Peter Steinberger 474d7855e4 fix(telegram): preserve exact whitespace in selected reply quotes (#129254) 2026-08-25 06:45:57 -07:00
Peter Steinberger 03a7e5b000 fix(qa): generate runnable scenario coverage commands (#129340) 2026-08-25 06:37:39 -07:00
RoboClaw baf88a8406 fix(voice-call): keep ngrok auth out of argv (#129330)
Co-authored-by: roboclaw-bot <309084314+roboclaw-bot@users.noreply.github.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-08-25 06:21:03 -07:00
Bek 8c9b6b16ba fix(slack): preserve bound reply dispatcher (#129023)
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-08-25 06:07:15 -07:00
Peter Steinberger bc4ce76db3 refactor(browser): deduplicate browser executable candidates (#129323) 2026-08-25 05:56:47 -07:00
Peter Steinberger 13934fef3d fix(qa): scope restart sentinel checks to scenario logs (#129270) 2026-08-25 05:46:51 -07:00
Peter Steinberger 3506a55218 refactor(browser): unify browser mutation routes (#129303) 2026-08-25 05:28:28 -07:00
Peter Steinberger 32079d6b3f fix(whatsapp): preserve text when Markdown formatting returns no chunks (#129275) 2026-08-25 05:08:04 -07:00
Peter Steinberger 956c609d02 refactor(qa): consolidate runtime fixtures (#129290) 2026-08-25 05:06:10 -07:00
Peter Steinberger 05a3b2ac82 fix(discord): honor explicit names for new forum posts (#129294) 2026-08-25 05:01:26 -07:00
Peter Steinberger 4dc7bb7411 chore(deps): refresh dependencies after seven-day cooldown (#129187)
* chore(deps): refresh dependencies after cooldown

* fix(gateway): emit append-only Responses content events

* chore(deps): retain unverified Sherpa runtime
2026-08-25 05:00:46 -07:00
Ayaan Zaidi 750a64e7cd fix(anthropic): keep Claude CLI authentication native (#129052)
Stop OpenClaw from copying or refreshing Claude CLI OAuth tokens.
Claude CLI now owns native login and refresh state; Doctor removes retired copies while preserving CLI routing.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-25 17:18:06 +05:30
Peter Steinberger 5fde973580 refactor(browser): unify guarded page interactions (#129274) 2026-08-25 04:44:40 -07:00
Peter Steinberger 7d367f1171 test(memory): deduplicate promotion fixtures (#129267) 2026-08-25 04:28:14 -07:00
Peter Steinberger 0dc639f59e refactor(discord): unify approval lifecycle rendering (#129246)
* refactor(discord): unify approval lifecycle rendering

* test(discord): narrow serialized approval container payload
2026-08-25 04:18:52 -07:00
Peter Steinberger 8166cc01b9 test(openshell): deduplicate sandbox fixtures (#129258) 2026-08-25 04:15:59 -07:00
ruel225 34a1cfc69c fix(cli-runner): drop stock watchdog defaults that disable resume promotion (#125045) (#125085)
* fix(cli-runner): drop stock watchdog defaults from CLI backend descriptors (#125045)

The claude-cli and gemini-cli backend descriptors spread
CLI_FRESH/RESUME_WATCHDOG_DEFAULTS into config.reliability.watchdog.
Those copies are byte-identical to the fallback pickWatchdogProfile
already uses, so shipping them only makes `configured` always truthy,
which permanently disables the promotion gate (!configured) and pins
resumed cron/explicit-timeout turns to the 180s resume no-output ceiling
instead of the 600s fresh ceiling.

Removing the blocks lets `configured` be undefined, restoring the
promotion gate. No user-config path is affected: reliability.watchdog
is not exposed in the config schema, the descriptor is the sole source,
and pickWatchdogProfile is the only runtime reader. The codex backend
never shipped the block, so this aligns the three backends.

Co-Authored-By: Claude <noreply@anthropic.com>

* test(cli-runner): add descriptor-through-resolver watchdog proof (#125045)

Drive the real shipped Anthropic/Gemini CLI backend descriptor config through
the production resolveCliNoOutputTimeoutMs resolver to prove the resumed-cron
promotion is live post-fix. Pre-fix the descriptor shipped byte-identical
resume defaults, so configured was truthy and the !configured promotion gate
was dead, pinning resumed cron turns to the 180s resume ceiling (180000).
Post-fix the block is gone and the resolver returns the promoted fresh budget
(480000 = 600000 * 0.8).

resolveCliNoOutputTimeoutMs is re-exported through the test-only
openclaw/plugin-sdk/test-fixtures subpath (excluded from published dist), so
extension tests can drive the real descriptor through the real resolver without
crossing the extension/core boundary.

Co-Authored-By: Claude <noreply@anthropic.com>

* test(anthropic): split watchdog promotion proof into its own file

Move the descriptor-shape and descriptor→resolver real-behavior proof
tests out of cli-shared.test.ts into cli-watchdog-promotion.test.ts.
cli-shared.test.ts exceeded the extensions max-lines budget (1000
non-blank/non-comment lines) once the proof tests landed; the focused
file keeps the same test names and coverage while staying under the
budget. No production change.

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(cli-runner): restore inherited resume watchdog promotion

Validate bundled plugin descriptors through their public setup entries and keep custom watchdog contracts intact.

Co-authored-by: ruel225 <ruel225@users.noreply.github.com>

* chore(cli-runner): align conflicting provider owner with main

Co-authored-by: ruel225 <ruel225@users.noreply.github.com>

* fix(cli-runner): complete inherited resume watchdog promotion

Co-authored-by: ruel225 <ruel225@users.noreply.github.com>

* test(cli): keep watchdog regressions in their owning plugins

Keep Anthropic and Google descriptor assertions inside their plugin-owned registration suites, preserve generic resumed/custom watchdog coverage in its core owner, and remove the cross-plugin core test rejected by architecture CI.

Co-authored-by: ruel225 <ruel225@users.noreply.github.com>

---------

Co-authored-by: ruel225 <ruel225@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-25 04:14:45 -07:00
Peter Steinberger 132cd209e1 fix(feishu): preserve attachments in document comment replies (#129259) 2026-08-25 04:12:37 -07:00
Peter Steinberger 9f472253d4 fix(voice): fence realtime bridge lifecycle (#129249) 2026-08-25 03:58:42 -07:00
Peter Steinberger b1e27db51c refactor(workboard): consolidate card normalization helpers (#129236) 2026-08-25 03:51:09 -07:00
Peter Steinberger 044c0feb7c fix(crabbox): preserve Machine0 provisioning budget (#128185)
* fix(crabbox): bound Machine0 lifecycle backoff recovery

* fix(crabbox): reserve full Machine0 cleanup budget

* fix(crabbox): allow paced Machine0 inspection

* fix(crabbox): reserve Machine0 readiness retry

* fix(crabbox): pace Machine0 readiness checks

* fix(crabbox): use readiness-aware Machine0 status

* feat(crabbox): forward explicit setup environment

* fix(crabbox): preserve bounded command failure context

* fix(crabbox): enforce exact setup environment
2026-08-25 03:41:06 -07:00
Han Yang 15826de945 fix(telegram): honor human delay for streamed replies (#69022)
Punchcard-Session: calm-brook-harbor-jm
2026-08-25 18:25:35 +08:00
Peter Steinberger e4180f50c2 refactor(slack): canonicalize approval presentation rendering (#129205) 2026-08-25 02:59:07 -07:00
Peter Steinberger 0f92753704 fix(reef): stop exposing retired account runtime (#129131)
* fix(reef): retire stopped runtime ownership

Refs #129063

* fix(reef): fence borrowed runtime authority

Refs #129063
2026-08-25 02:58:26 -07:00
Peter Steinberger daefcc117f fix(qa): track progress card planning signal (#129143)
Amp-Thread-ID: https://ampcode.com/threads/T-01a037b4-f621-7144-bfdf-a68df795dd57

Co-authored-by: Amp <amp@ampcode.com>
2026-08-25 02:30:56 -07:00
Peter Steinberger 0e18543071 fix(openai): preserve embedding index across proxy key rotation (#129177) 2026-08-25 02:16:10 -07:00