1853 Commits
Author SHA1 Message Date
Peter Steinberger b6306da1a9 fix(web-fetch): honor cancellation before caching or returning provider results (#131585)
* fix(web-fetch): honor cancellation in the provider fallback

Pass the optional AbortSignal execution context through fetch providers and the Firecrawl adapter. Reject late provider results before wrapping or caching, recheck after asynchronous payload construction, and preserve cancellation through HTML fallback recovery.

* fix(web-fetch): finalize cancellation before caching results

Reject pre-aborted cache hits and preserve cancellation when a provider or guard cleanup fails after abort. Centralize direct and provider cache publication after the complete fetch lifecycle so cancellation during release cannot leave a successful entry.

Extend all four fallback cancellation cases with late provider failures, cover direct/provider pre-aborted cache hits and guard-release races, and document the completed cancellation boundary.

* fix(web-fetch): scope the post-cancellation guard to provider failures

The cancellation guard sat in runWebFetch's catch, so a fetch that rejected
*because of* the abort had its original error replaced by signal.reason. That
discarded the transport's own failure detail and changed an existing contract:
web-tools.fetch.test.ts asserts the tool surfaces the aborted fetch's error.

fetchWebPayload already rethrows the original error when the signal aborted, so
the outer guard only ever needed to cover the provider-fallback path, where a
late failure should surface the caller's abort reason rather than an error from
work the caller had already abandoned. Move it there and drop the outer catch.

* docs(web-fetch): state cancellation forwarding and error preservation accurately

Two wording corrections from deep review. The inline comment claimed an
abort-caused fetch rejection "already carries the caller's reason", which the
regression test deliberately shows is not always true; the code preserves the
right object regardless. The docs implied cancellation stops provider work,
when core only forwards the signal and rejects late results.
2026-08-28 21:06:18 -07:00
Peter Steinberger 30772d5061 fix(sessions): preserve context and lifecycle when forking chats (#132227)
* fix(sessions): preserve fork lifecycle ownership and context

Preserve incognito storage, revalidate message-cut authority at commit, and keep late UI fork results scoped to their presentation. Carry prepared child identity and actual context through subagent cleanup and receipts. Verify native source cuts with canonical projection and preserve supervision connection and cleanup ownership. Document the separate canonical-descendant initialization limitation.

* refactor(agents): remove unused subagent prompt task input

* test(codex): validate native fork fixture request shapes

* fix(codex): avoid inherited labels in native session forks

* fix(test): align fork prompt fixtures and session type imports

* refactor(agents): reuse subagent attachment result type
2026-08-28 20:21:57 -07:00
Peter Steinberger 19640ebf00 fix(codex): honor thinking off on supported Platform routes (#132276)
* fix(codex): honor thinking off on Platform routes

Keep reasoning disablement owned by the selected physical model route while
preserving native enabled effort tiers. Supported Platform turns and side
questions now send explicit none; subscription defaults and supervised native
settings remain unchanged.

Closes #132253

* test(codex): load route fixture through public plugin surface

* test(codex): register reasoning regression and synchronize turn startup
2026-08-28 20:04:52 -07:00
Peter Steinberger ac0ae1c824 fix(brave): bind preflight to request cancellation (#132097)
Brave search cancellation and timeouts now include preliminary endpoint
DNS validation in both web and llm-context modes. One request deadline
covers validation, transport, body reading, and cache publication while
preserving endpoint trust policy.

Move interruptible DNS waiting into the shared resolver and remove the
duplicate guarded-fetch race. Keep late OS lookup settlements observed.

Fixes #132095
2026-08-28 19:34:15 -07:00
Peter Steinberger bd12d44a0e fix(browser): keep the panel on the session browser profile (#132159)
* fix(browser): follow session profile in the browser panel

Preserve executed host/node/profile identity through browser results, previews, and panel operations. Explain redacted tab URLs without relaxing navigation guards, and keep compound node actions on their executed browser.

Fixes #132141.

* test: keep browser proof within CI file and shard limits

Move tool-result projection coverage into its own suite without changing assertions. Split UI pages and E2E typecheck programs while retaining exact once-only coverage and the existing 720-root cap.

Required to validate #132159 against current main.

* refactor(ui): reuse chat render options and stabilize queue proof

Preserve composer adaptations and stream status ownership while removing duplicated prop forwarding. Deliver the second native queue-removal activation to the surviving row explicitly, retaining exact removal and reconnect-drain assertions across layout changes.

Clears merged-tree CI failures for #132159 without suppressions or raised limits.

* fix(ui): require browser tool origin for route previews

* fix(ui): prioritize explicit browser card selection
2026-08-28 18:35:02 -07:00
Peter Steinberger 61a75f5494 fix(exec): stop naming the TUI as an automation exec-approval surface (#132237)
Gateway automation (cron) approval cards are delivered only to clients
that pass canDeliverApprovals for exec: Control UI, the
macOS/iOS/Android apps, and clients with the approvals/exec-approvals
cap. The TUI qualifies only for plugin approvals, yet the headless
denial copy, doctor exec-policy hint, the #128031 delivery comment, and
docs/tools/exec-approvals.md all told operators the TUI (or 'terminal
UI') could answer these approvals - a dead-end verified live.

The denial message now branches: gateway cron denials point at
card-capable clients and the Allow Always standing grant; other
headless runs keep the interactive-rerun advice, where the TUI's
/approve chat flow genuinely works.
2026-08-28 18:17:25 -07:00
Peter Steinberger cbdce43b58 fix(browser): preserve owned target lifecycle through MCP flows (#132232)
Restore blank-first page creation through the Chrome extension relay without opening access to unrelated blanks. Keep creation provenance and guarded rollback in the tab-access owner, separate document freshness from access revocation, and retain target identity across debugger detach so MCP can close its page.
2026-08-28 18:15:17 -07:00
Peter Steinberger bdbc5814a0 fix: report Code Mode failures without false success (#132248) 2026-08-28 18:05:15 -07:00
Peter Steinberger 204faa53f6 docs: correct numeric model selection guidance (#132246) 2026-08-28 17:59:50 -07:00
d53f57c3d2 fix(exec): inherit configured host for per-call auto (#132100)
* fix(exec): inherit configured host for per-call auto

* test(exec): cover auto host inheritance across preparation and dispatch

Clarify configured host inheritance in the exec schema and documentation. Preserve required sandbox isolation and explicit host policy in regression coverage.

Co-authored-by: Omar Shahine <10343873+omarshahine@users.noreply.github.com>

* docs(exec): keep host guidance within the schema prompt budget

---------

Co-authored-by: Omar Shahine <10343873+omarshahine@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-28 17:15:13 -07:00
Peter Steinberger 1c40abdb63 fix: preserve ACP model switches and reply completion (#132040)
* fix: keep ACP thinking aligned after model switches

Carry published ACPX accepted control snapshots through the plugin boundary and reconcile selected thinking in the session owner. Preserve selectable pending thinking on automatic replay, persist accepted changes before later failures, and show effective thinking in command replies. Keep shipped optional-control replay and third-party void backends unchanged.

* fix: give ACP replies one completion owner

* fix: tighten ACP completion type boundaries

* fix(ui): defer native chrome and recover rendered lazy surfaces

* refactor(ui): separate native startup recovery tests

* fix: preserve explicit reply completion ownership

* test: consolidate ACP completion regression fixtures

* chore(ui): refresh boot manifest after main integration

* test: distinguish inbound ACP reply options

* test(ui): target retargeted queue clicks deterministically

* fix(ci): split UI test type graphs within the root budget
2026-08-28 16:56:29 -07:00
7f9d83aec5 docs: clarify Code Mode opt-in default (#132191)
Co-authored-by: roboclaw-bot <309084314+roboclaw-bot@users.noreply.github.com>
Co-authored-by: Vito Cappello <3279061+VACInc@users.noreply.github.com>
2026-08-28 19:12:23 -04:00
Peter Steinberger f19173837a fix(web-fetch): honor zero and shortened cache TTL on reads across fetch and search (#131648)
* fix(web-fetch): honor zero cache TTL on reads

* fix(web-search): honor effective TTL in direct provider caches

Use each request's existing TTL for cache reads and writes in DuckDuckGo,
SearXNG, Firecrawl search, Tavily search, Grok web search, and x_search.
Resolve config once at the client owner instead of retaining hardcoded
search-cache write defaults. Reject entries at their original expiry even
when the reader allows a longer TTL.

Add failing-first provider/tool regressions for disabling and shortening
TTL, preserving cache entries across disabled requests, and expiration.
Document the repaired local-cache controls without changing upstream
scrape caching or Tavily extraction.

* fix(web-search): honor effective TTL in shared search cache reads
2026-08-28 15:48:02 -07:00
Peter Steinberger e0ed92a7ca fix(browser): report native hosts with missing runtime targets (#131907)
* fix(browser): flag native hosts with unavailable runtime targets

Validate the registered interpreter and native entry before reporting readiness. Keep valid OpenClaw registrations owned when targets are missing or unsafe so install, doctor repair, and uninstall remain available.

Share target validation with installation, keep unused browser warnings nonblocking, and document the read-only filesystem readiness snapshot.

Refs #131837: Chrome native-host status stays ready after its runtime is removed.

* test(browser): separate installer layout coverage

* test(crabbox): use canonical PID liveness

* fix(ci): classify plugin fixtures in temp guard
2026-08-28 13:13:28 -07:00
Peter Steinberger 1d5ad841ee feat(browser): expose page errors action (#131906)
Expose the existing page-error log to agents with requests-style limits,
untrusted-content wrapping, node proxy routing, and browserTab metadata.
Share bounded debug-log formatting and hide unsupported Chrome MCP actions.

Follow up on #131592, which added requests, text, and emulate actions.
2026-08-28 12:23:47 -07:00
Peter Steinberger 61fc3d2d79 feat(browser): agent requests/text/emulate + snapshot query, and inline browser-tab thumbnail cards (#131592)
* feat(browser): agent requests, text, and emulate actions plus snapshot query filter

The browser control service already collected network requests and served
device/media/timezone/locale emulation, and Playwright could read page text,
but none of it was exposed to the model. The agent tool now maps them:

- action=requests: bounded network log (filter substring, limit, clear)
- action=text: article/main/body innerText via a new guarded GET /text route;
  hard-capped, no model-provided JS, wrapped as untrusted external content
- action=emulate: device/colorScheme/timezoneId/locale via the existing
  /set/* routes, ordered, with an applied list
- snapshot query=...: token AND-match filter over the formatted snapshot so
  ref discovery no longer needs full-tree reads

Successful tab-scoped results also attach a bounded details.browserTab
{targetId, url, title} descriptor consumed by the Control UI browser-tab
preview card (UI metadata only; replay strips details). Capability gating
drops the Playwright-only actions on Chrome DevTools MCP profiles, and the
tab-bound action list includes the new actions.

* feat(ui): inline browser-tab thumbnail cards in the chat transcript

Browser runs used to render as a text-only 'Used Browser xN' row whose
expanded rows showed raw CDP target ids. The transcript now renders a
browser-tab card - favicon-style globe, page title, URL, and a live
thumbnail of the tab - for each tab an agent touches, live during the run
and in history.

The thumbnail never rides the tool result or the WebSocket: the client
captures it itself over the existing browser.request path (same mechanism
as the browser panel), single-flight per tab with a bounded image cache,
refreshed only when a newer completed result for that tab lands. Cards
collapse to one per tab per turn (latest wins). Clicking a card opens the
browser panel. Without browser.request or after tab close, the card
degrades to a static title/URL chip.

The history projection allowlists the bounded details.browserTab descriptor
(targetId/url/title) that the browser tool now emits; live tool-stream
details already flowed. No new gateway events, no config, no protocol
changes.

* test: register the browser innerText suppression in the lint allowlist

The new browser text action reads rendered visible text via locator
innerText(), which is the semantic point of the action; register the
intentional unicorn/prefer-dom-node-text-content suppression so the
production-suppression allowlist gate stays exact.

* feat(ui): browser card miniature scaling, bottom bar, and tab menu

Review feedback on the browser-tab card: the thumbnail now shows the whole
viewport scaled down (tiny-but-at-scale) instead of a cropped top band, and
the identity moved to a bottom bar - globe, title, URL - with hover-revealed
actions: an Open button into the browser panel and an overflow menu with
Copy URL and Open in new tab. Without a capturable tab the card is the bar
alone.

* fix(ui): route the browser card's external open through openExternalUrlSafe

The boundary guard requires the canonical safe-external-open helper instead
of raw window.open.

* fix(ui): move the browser card menu onto the shared wa-dropdown primitive

The web-awesome ownership guard forbids hand-rolled role=menu popovers and
the cursor policy owns pointer rules; the overflow menu now uses the shared
dropdown (roles, dismissal, and cursor handled by the primitive) with the
new-tab item marked data-new-tab-action.

* style(ui): text-only browser card menu items

* fix(browser/ui): descriptor on emulate/console results; card click selects its tab

ClawSweeper review findings: emulate and tab-scoped console results carry a
targetId but were excluded from the browserTab descriptor wrapper, so their
successful results could not render the browser-tab card; and the card's
panel-toggle event carried only open:true, leaving a different active tab in
place. The wrapper now covers both actions, the toggle contract gains an
optional targetId, and the panel selects that tab on targeted open requests
(embedded and docked paths).
2026-08-28 09:03:53 -07:00
Peter Steinberger d65e712b28 feat(macos): enable native node session hosting (#131717)
* feat(macos): enable native node session hosting

Complete the app-owned node worker connection lifecycle and honor explicitly admitted Full access without bypassing node-local restrictions. Preserve one node identity, native capabilities, approval lifetime, and exact placement/turn authority.

* test(nodes): exercise canonical exec policy flows

* refactor(macos): remove obsolete node bridge serializer

* fix(nodes): bind Full authority to harness execution commands
2026-08-28 07:11:12 -07:00
5edb54e616 fix(agents): keep option-only Code Mode configs disabled (#131407)
* fix(agents): require explicit code mode activation

Restore the stable default so Code Mode stays disabled unless enabled is explicitly true or auto.

Worked on by:
- @VACInc

Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com>

* test(ui): stabilize typography picker changes

---------

Co-authored-by: roboclaw-bot <309084314+roboclaw-bot@users.noreply.github.com>
Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com>
2026-08-28 06:42:19 -07:00
xingzhouandPeter Steinberger 0e16f347ea fix(code-mode): host-policy denial no longer triggers read-only recovery (#131007)
* fix(code-mode): preserve ordinary recovery after host denial

Record exact host-owned operation no-start and preserve it through subscriber completion. Keep whole-cell mutation containment and attribute the temporary recovery instruction to OpenClaw.

Fixes #130274. Thanks to @tylerbrevard for the report.

Co-authored-by: zhang-guiping <zhang.guiping@xydigit.com>

* test(agents): await raw-stream append completion

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: zhang-guiping <zhang.guiping@xydigit.com>
2026-08-28 05:05:55 -07:00
Peter Steinberger adfe56e302 fix(control-ui): preserve inherited reasoning after history refresh (#131613)
* fix(control-ui): preserve inherited reasoning after history refresh

* fix(gateway): scope prepared thinking policy to history

* fix(gateway): keep profile history metadata nonblocking

* fix(ci): isolate catalog discovery ordering from worker startup

* chore(ci): defer ingress lint repair to merged owner fix
2026-08-28 04:55:10 -07:00
Peter Steinberger c792a16791 fix(agents): allow uncategorized hidden and ACP spawns (#131736) 2026-08-28 04:37:44 -07:00
Peter Steinberger 047470456f feat(control-ui): create and manage goals without slash commands (#131370)
* feat(control-ui): create and manage goals without slash commands

* fix(control-ui): keep goal composer contracts acyclic

* refactor(control-ui): tighten goal composer guidance

* fix(goals): admit fresh and completed local sessions

Create the first session with its Goal, input, run claim, and receipt in the existing transaction. Scope reply dispatch hooks consistently at admission and execution, and retain built-in runtime eligibility after completed turns. Preserve creator and lifecycle checks and cover the failures observed through the real Control UI flow.

* fix(ui): preserve button names during fade-in

* docs: defer Goal release notes to release generation
2026-08-28 04:31:48 -07:00
bc39f51a48 fix(agents): preserve owned Code Mode source in transcripts (#129816)
Preserve prepared outer JavaScript and TypeScript source through the owning transcript append while retaining input credential masking and canonical SQLite cache agreement. Related context: #129812 remains open for the separate Copilot journal path.

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Alexander Hill <me@alexander-hill.me>
2026-08-28 03:10:03 -07:00
Peter Steinberger de12e0a06c feat(approvals): standing-grant ledger, revocation, and configurable terms (#131602)
* feat(approvals): standing-grant ledger, revocation, and configurable terms

Completes the operator half of cron standing grants (#129526):

- Grants are listable and revocable. New gateway methods
  exec.approval.grants.list/revoke (operator.approvals scope), CLI
  'openclaw approvals grants list|revoke', and a Standing grants section
  on the Control UI approvals page with per-row revoke. Revocation is
  idempotent, records the acting client, and takes effect at the next
  occurrence's spawn boundary.
- Grant terms are frozen at mint and configurable. Default stays
  until-revoked (matching what shipped Always allow has always meant);
  tools.exec.grantExpiryDays sets a day-bounded default for future
  grants (enterprise fleet policy), and resolve surfaces may override
  per grant via grantExpiresInDays / --expires-in-days. Existing grants
  keep their minted terms; config changes are never retroactive.
- expires_at_ms goes nullable (NULL = until revoked). The mandatory-
  expiry shape never reached a release tag, so the lazy ensure rebuilds
  it in place; grants are re-derivable authority, so the fail-closed
  cost is one re-prompt.
- Approval cards say what Always allow does. Automation approvals carry
  a standing-grant ApprovalScope (new union member) built server-side
  from the cron run registry (now carrying the job display name); the
  Control UI inbox card and modal render it via i18n, e.g. 'Always
  allow runs this exact command for "grant-demo" without asking, for
  10 days (revocable)'.
- Aux method registries stay in lockstep: new parity test fails when a
  GATEWAY_AUX_METHODS entry lacks a lazy handler (this gap produced
  live unknown-method errors during bring-up).

Live-proven on a hermetic gateway: until-revoked grant ran 62 promptless
occurrences; UI and CLI revocation each returned the prompt on the next
occurrence; config default stamped exactly 10.0 days via a UI resolve;
--expires-in-days 99 override stamped 99.0 days; ledger and card
screenshots captured from the running Control UI.

* chore(ui): annotate the scope narrowing assertion for the safety ratchet

* test(gateway): move aux-method parity check to its own suite

* fix(ci): boundary-parse UI approval scope; register grants schemas for native codegen

- The Swift/Kotlin generators discover named schemas through the
  protocol schema fragments; the standing-grant scope member and the
  grants list/revoke shapes were missing there, which made the Swift
  generator silently drop the ApprovalScope union and broke ios-build.
  Registered, regenerated, union and new struct emitted again.
- The chained-assertion lane rejects 'as unknown as' in the UI scope
  parser; replaced with a real per-kind boundary parser, which is what
  the rule asks for.
- The sqlite-allow-raw marker must share the line of a mid-statement
  prepare() call for the Kysely guardrail; split the pragma read so the
  SAFETY comment and the allow marker each sit on their own guarded
  line.

* chore(ui): record startup-budget growth for the approvals scope line

The standing-grant scope renderer and grants-ledger strings ride the
boot path (~700 B gzip). Recorded via the check's --update-baseline flow
with the reason inline; well under the committed 350 KiB hard cap.

* fix(gateway): restore the channel-restart helper export dropped on main

#118157 made startGatewayChannelFromActiveRegistry module-local while
its colocated test still imports it, breaking check-test-types and the
compact shard on every merge ref. Smallest correct main heal per the
broken-CI doctrine; the test passes again.

* fix(gateway): drive channel-restart reload coverage through its exported owner

Replaces the prior export restore: #118157 made the restart helper
module-local (the dead-export scan is right that tests are not
production consumers), but left its colocated test importing it, so
main failed check-test-types either way. The test now exercises the
same preserveManualStop semantics through rollbackStoppedGatewayChannels,
the exported reload owner, and the helper stays private.

* test(ui): answer the grants ledger request in approvals-page history tests

The approvals page now loads the standing-grant ledger next to history;
a method-aware stub answers it out of band so the ordered history mocks
keep their call counts. Adds coverage for the ledger render and the
revoke round-trip.

* chore(ui): record CI-observed startup-JS baseline for the grants surface

The e2e-real-gateway lane builds the same tree ~600 B larger than checks-ui
and local builds, past the 64 B variance allowance; record the CI-observed
value so the enforcement limit stops straddling cross-lane build variance.

* fix(cli): escape standing-grant ledger fields visibly; register grants methods in inventory tests

The grant ledger's revokedBy (client display name), automation label, and
agent-authored command now go through escapeApprovalTextForTerminal like the
pending-approvals table, so hostile control characters render as visible
\u{...} escapes instead of being silently stripped by the table renderer.
Regression test fails pre-fix. Also lists exec.approval.grants.list/revoke
in the 2026.8 release-train roster, classifies the approvals grants command
group for JSON output, and fixes the stubGrants mock typing.
2026-08-28 02:56:20 -07:00
Peter SteinbergerandRatul Rahman 3f31f271d5 fix(skills): recognize binaries installed on unchanged PATH (#131617)
Cache only successful binary probes so fresh skill and Gmail dependency
checks recognize executables installed into existing PATH directories.
Preserve hit reuse and PATH/PATHEXT invalidation; cover dependency setup,
Go/uv prerequisite reuse, and skill/hook eligibility.

Related: #21094. Follow-up to the positive-only proposal in #21116.
Thanks to @DannyDesert for the original skill-install report.

Co-authored-by: Ratul Rahman <146240529+ratul-rahman@users.noreply.github.com>
2026-08-28 02:21:32 -07:00
NonoswordandAyaan Zaidi ae499904b0 fix(lobster): preserve cancelled approvals and output bounds (#130259)
Keep managed Lobster state aligned with rejected approvals and enforce the configured byte limit on the JSON returned to the model.

Co-authored-by: Nonosword <37948612+Nonosword@users.noreply.github.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-28 13:53:37 +05:30
Peter Steinberger 1e17830997 fix(code-mode): surface oversized catalog searches (#131574)
Reject catalog searches whose callable names exceed the existing output
budget, with guidance to narrow the query or lower the limit. Remove the
guest fallback that turned an oversized match set into a false empty result.
Ordinary successful tool-result truncation remains unchanged.

Fixes #131551. Release context: Code Mode agents can distinguish search
overflow from genuine no-match results and retry discovery without silently
abandoning an available tool. No config, budget, or native Codex change.
2026-08-27 23:13:57 -07:00
8d8736dd0a fix(acp): preserve configured thinking across session reuse (#128169)
* fix(acp): forward owner agent thinking default to configured ACP bindings

Configured channel-to-ACP bindings only forwarded the owner agent's
model into the ACP session's runtime options, so the agent's
thinkingDefault (e.g. "off") never reached the ACP session. The
underlying backend then applied its own default thinking level, which
some models reject outright (e.g. ollama-cloud/glm-5.2:cloud rejects
"adaptive"), breaking configured/swarm ACP runs with no workaround.

Resolve the owner agent's effective thinking default (per-agent
thinkingDefault, falling back to agents.defaults.thinkingDefault, per
docs/tools/thinking.md) alongside its model, persist it on the
binding spec/record, and forward it through session init and the
existing live model-drift patch path.

* fix(acp): honor per-model thinking policy and reconcile removed defaults

Reuses the canonical resolveConfiguredThinkingDefaultCore helper so a
configured ACP binding's thinking default respects
agents.defaults.models[key].params.thinking ahead of the global
default, matching normal reply resolution. Also reconciles the
explicit-to-unset transition: removing an agent/global thinking
default now clears a previously pinned value on a live session
instead of leaving it stuck.

* fix(acp): preserve configured thinking across session reuse

Consolidate configured model/thinking reconciliation without clearing backend state or replacing conversations. Honor target-agent thinking defaults during ACP spawn and document precedence and omission.

Co-authored-by: chelsealong <chelsealong@126.com>

Co-authored-by: ayeshafayyaz-pixel <244500061+ayeshafayyaz-pixel@users.noreply.github.com>

* fix(acp): reject unsupported live effort before persisting

Apply configured live controls through the existing checked manager path.
Keep accepted settings and conversation state when a control is rejected,
and distinguish Codex startup omission from unsupported live effort clearing.

Co-authored-by: chelsealong <chelsealong@126.com>
Co-authored-by: ayeshafayyaz-pixel <244500061+ayeshafayyaz-pixel@users.noreply.github.com>

* test(acp): isolate configured binding regression coverage

Keep the real manager/lifecycle regression in a focused test file and narrow
the adapter case union explicitly. Runtime behavior is unchanged.

Co-authored-by: chelsealong <chelsealong@126.com>
Co-authored-by: ayeshafayyaz-pixel <244500061+ayeshafayyaz-pixel@users.noreply.github.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: ayeshafayyaz-pixel <244500061+ayeshafayyaz-pixel@users.noreply.github.com>
2026-08-27 18:32:26 -07:00
RoboClaw 6b404043aa fix(agents): keep code mode off by default (#131242)
Code Mode is disabled when otherwise unconfigured, while existing option-bearing Code Mode objects preserve their prior automatic per-model behavior.

Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com>

Worked on by:
- @VACInc
2026-08-27 17:53:17 -07:00
Peter Steinberger f1dd2b72d4 fix(code-mode): preserve cancellation diagnostics after catalog teardown (#131311) 2026-08-27 17:42:54 -07:00
Peter Steinberger 01bff26fa5 fix(web-fetch): bound page metadata and preserve prose across sanitized truncation (#131126)
* fix(web-fetch): bound page metadata within the tool output budget

* fix(web-fetch): preserve prose across sanitized truncation

Keep complete provider wrappers ahead of clipped markers instead of erasing their prose. Reuse the shared sanitizer for body bounds and remove the raw-length retry that could exceed the output allowance.
2026-08-27 17:22:08 -07:00
Peter Steinberger 7c75285153 fix(code-mode): continue tasks after proven-safe wait failures (#131282)
Honor existing exact-object host proof after resumed read-only Code Mode failures so agents can complete the authorized task. Unproven waits, earlier mutations, cancellation, and explicit terminal outcomes remain closed; no replay is added.

Fixes #131279.
2026-08-27 17:17:07 -07:00
Patrick Erichsen 7b7858d955 feat(clawhub): show security audit before installs (#131233)
* feat(clawhub): show audit details before install

* test(clawhub): update fixture audit contract
2026-08-27 16:20:59 -07:00
zengLingbiaoandPeter Steinberger 213804d770 fix(agents): redact reflected credentials from provider error detail and reason phrase (#120200)
* fix(web): redact request credentials from provider errors

Bind bounded error diagnostics to the actual outgoing request headers for
shared web tools and both Perplexity transports. Preserve caller cancellation
and replace case-insensitive owned headers without combining credentials.

Reuse the provider error redactor and remove duplicate xAI parser-only test
paths while retaining real HTTP and sibling coverage. Production -18 lines;
total -14 lines including regression tests and documentation.

Refs #120200, #117304, #119536.

Co-authored-by: zenglingbiao <zeng.lingbiao@xydigit.com>

* fix(tooling): install managed signals before spawning children

Prevent early SIGTERM from orphaning a detached compiler before its supervisor
registers the child. Retain shared handlers for concurrent commands and clean
them up after synchronous or asynchronous spawn failure.

Reproduce the race at the real process boundary and consolidate stale type
comments and one-use registration wrappers.

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-27 16:17:30 -07:00
Peter Steinberger 3f4cefc4d3 fix(code-mode): release canceled timers and parked execution slots (#131186) 2026-08-27 14:29:30 -07:00
Ayaan Zaidi f636bf2376 fix(skills): stop experience reviews from blocking chats (#131077)
Run hidden Skill Workshop reviews on a private detached session so foreground messages stay responsive and isolated. Preserve prompt-cache affinity, remove closed delivery authority, and retire queued evidence before asynchronous preparation.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-28 01:35:04 +05:30
Peter Steinberger 676a96685e fix(code-mode): recover after read-only discovery (#131079) 2026-08-27 11:25:25 -07:00
Peter Steinberger f04a622c1f fix(browser): resolve unnamed role refs and initialize AX markers (#130881)
* fix(browser): resolve unnamed role refs and initialize AX markers

Keep explicit raw ARIA empty names distinct from omitted serializer names and share one dependency-faithful role lookup. Bind the DOM document in the marker-owning CDP session without adding a round trip.

Related: #130879. The separate snapshot membership and ordering failures remain open.

* chore(browser): shrink ref assertion safety baseline

Record the five type assertions removed by the ref-name repair. Tighten the canonical per-file allowance from seven to two; runtime and browser-test bytes are unchanged.
2026-08-27 05:22:38 -07:00
Peter Steinberger 0dbd5c81d5 feat(plugins): one consent screen for plugin capabilities, bound to the reviewed artifact (#130168)
* feat(plugins): surface plugin capability consent in Control UI and CLI

Adds plugins.inspect (declared manifest surface, operator grants, install
provenance/integrity, ClawHub trust), a Control UI consent dialog on install
and external-plugin enable, a server-side acceptance gate persisted on the
install record, artifact-anchored widen diffing, and --accept-capabilities
for non-interactive CLI use.

NOT READY TO LAND: autoreview found critical gaps (see PR notes) — the
declared surface omits 20 of 21 contract families, native plugins always
report zero hooks, several install/enable paths bypass the gate, and the
acknowledgment is not bound to the reviewed surface.

* refactor(plugins): bind capability consent to the reviewed surface

Collapses the consent error payload to the fields the client cannot fetch
(reviewToken, widened, acceptedAt) and pulls identity/declared/grants/source/
trust from plugins.inspect, shrinking the registry-free protocol reader from
395 to 91 lines and removing its divergence from the closed schema.

Acknowledgment now carries the SHA-256 reviewToken of the surface the operator
saw; the server recomputes the final staged artifact's surface and rejects any
mismatch before persisting acceptance. That closes review-then-swap, laundering
of forged acceptance through an unchanged update, and cross-artifact replay.

All 22 manifest contract families are now declared, hashed and diffed, so a
privileged family such as gatewayMethodDispatch can no longer be added without
re-consent. Consent reads the manifest runtime discovery will execute, ambiguous
install ownership fails closed, integrity resolution has one owner and no longer
labels npm SHA-1 shasums as SHA-256, and code plugins disclose that hooks
register at runtime instead of rendering an empty "no hooks" row.

* fix(gateway): register plugins.inspect in method inventories and regenerate protocol

Adds plugins.inspect to the advertised-method inventories (widening the
fixed-size slice windows so older indices stay stable), regenerates the Kotlin
protocol bindings, drops an unused exported type, and replaces two nested
conditional spreads with a plain conditional.

* refactor(plugins): split oversized consent modules and clear lint findings

Extracts the MCP controller out of the plugins page, unchanged-install
reconciliation out of update-installed, and the install lifecycle suite out of
the management-service tests, bringing all three back under the max-lines limit
without suppressions. Also renames a shadowed binding, drops an unnecessary
generic, removes a spread-to-modify in a map, and types catch callbacks as
unknown.

* chore(protocol): regenerate Kotlin bindings after rebase

* feat(plugins): let chat /plugins install review and accept capabilities

The consent gate applies to chat installs too, but the command had no way to
give consent, so external installs dead-ended on a CLI-only flag. Chat now
replies with the plugin's declared capability surface and the exact command to
rerun, and accepts a trailing --accept-capabilities mirroring the existing
--force acknowledgement. ClawHub trust acknowledgement stays CLI-only.

Staged-artifact verification is unchanged: the reviewToken is still checked
against the final artifact before acceptance is recorded.

* refactor(plugins): single-source the declared-surface groups and manifest precedence

The ordered capability group list was defined independently in the consent
engine, the protocol error reader, the CLI formatter and the Control UI, so a
new contract family had to be added in four places with nothing enforcing it.
All four now derive from one canonical list in the protocol schema with a
compile-time exhaustiveness guard.

Native-versus-bundle manifest precedence is centralized in one helper that both
discovery and staged consent call, so the two cannot drift again — that
divergence was a real bug where consent read one manifest and the runtime
executed another.

Also documents that carrying acceptance forward requires pinned artifact
integrity, so integrity-less sources such as local paths ask on every install.

* fix(plugins): enforce reviewed consent across activation flows

Route setup, repair, linked installs, updates, and chat activation through artifact-bound capability consent. Reuse canonical package discovery and recheck staged activation before config publication. Invalidate stale Control UI review requests on reconnect.

Verified focused owner and sibling tests, runtime rebuild, and real isolated CLI/Gateway install, inspect, enable, widening, and stale-token rejection flows.

* test(plugins): cover beta installs through capability consent

* test(plugins): align consent fixtures with staged artifacts

* fix(ui): review staged plugin capabilities once

* test(ui): inline the remaining plugin consent confirmation

* test(plugins): verify consent with deferred install transactions

* refactor(setup): share inference execution plan construction

* test(ui): settle applied config before deferring refresh

* fix(plugins): protect consent provenance and reuse acceptance
2026-08-27 02:58:07 -07:00
Peter Steinberger 873e1c85fa fix: preserve channel answers after unavailable approvals (#130624)
* fix(agents): preserve replies after unavailable approvals

Keep setup notices durable without suppressing recovered answers or terminal errors. Preserve genuine pending-approval deduplication and align native approval setup guidance. Fixes #130584.

* fix(discord): restore named-account research skill discovery

Gate the Discord skill on channel configuration instead of a root token. Make clawtributor research portable across archive and native history readers, and apply requested time windows to conversation references rather than PR creation dates.

* fix(agents): order tool-result delivery before assistant events

* fix(slack): correct native approval enablement guidance

* test(qa): support context-aware model fixtures

* test(scripts): publish ready process IDs atomically
2026-08-27 01:50:36 -07:00
Peter Steinberger 2a41b4e478 fix(browser): report failed nested batches (#130809) 2026-08-27 01:20:14 -07:00
Peter Steinberger 7eebd6d4a6 docs(hooks): clarify setup and execution contracts (#130734) 2026-08-26 23:12:06 -07:00
cd321938f6 fix(agents): strip external-content nonce so loop detection blocks repeated wrapped failures (#130261)
* fix(agents): strip external-content nonce before loop-detection resultHash

External-content wrappers carry a fresh anti-forgery nonce per result
(createExternalContentMarkerId). The loop detector hashed the wrapper text
including the nonce, so identical failing wrapped tool calls never reached
the no-progress block threshold — the detector warned but never blocked,
leaving the agent to loop until it gave up (#130210).

Strip the wrapper nonce before hashing in extractTextContent, mirroring
the existing stripVolatileSendIds treatment of per-call send ids (#89090).
Only the hash is normalized; the delivered wrapper keeps its nonce, so
anti-forgery is unaffected.

Closes #130210

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

* test(agents): validate protected error marker capture

Narrow the generated marker capture before recording it so the real network-error loop regression also passes its owning test-type graph.

---------

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-26 21:22:39 -07:00
Peter Steinberger f1bef4b3a2 fix(browser): preserve snapshot names and native refs (#130623) 2026-08-26 20:09:49 -07:00
Ayaan Zaidi 1cb914d6bf fix(telegram): make ask_user controls native and reliable (#130262)
Make ask_user use native Telegram controls when one single-select question can be represented directly, while keeping multi-select and batch questions on the text fallback. Add native Other-to-ForceReply input, preserve Gateway-owned option ordering across Telegram, Slack, and Discord, and prevent later progress from overwriting the delivered question.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-27 08:14:39 +05:30
Peter Steinberger c35b183093 fix(ui): highlight source code in chat and session diffs (#130578)
* fix(ui): highlight source code in chat and session diffs

* test(ui): isolate roster bootstrap from slug lookup

* fix(ui): preserve both languages in renamed diffs
2026-08-26 19:28:03 -07:00
Peter Steinberger b10beeee7c fix(onboard): preserve the saved skills package manager (#130438)
Keep explicit CLI choice precedence while preserving existing pnpm, Bun, and Yarn preferences when onboarding is rerun. Retain npm defaults for fresh config and the narrower explicit CLI choices. Fixes #130433.
2026-08-26 15:18:46 -07:00
ce4a680544 feat(models): add configurable model selection scopes (#127813)
* feat: make model persistence scope explicit

* fix: keep unauthorized model directives as plain text

An unauthorized sender's inline directives are cleared to plain text before
they are acted on, but the persistent write target was derived from the
directives as they arrived. An unauthorized `/model <provider/model> -a` or
`-g` therefore reached the owner-authority error return instead of the
plain-text path every other directive takes.

Derive the target, the authority flag, and the persist flag after the
clearing. Authorized senders skip the clearing, so their behavior is
unchanged; the only closure that captures the target is invoked well after
the new declaration site.

Covers both persistent flags with a regression test that fails on the prior
head with "Agent and global model defaults require owner authority or
operator.admin scope." and passes here.

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

* feat(models): make model selection scope configurable

Preserve current model-selection defaults when the optional scope preference is unset. Add explicit session, agent, and global overrides without broadening config-write authority.

Co-authored-by: Marvinthebored <peter@lindsey.jp>

* test(models): simplify scope expectation fixtures

---------

Co-authored-by: Marvinthebored <peter@lindsey.jp>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-26 14:31:56 -07:00
xingzhouandPeter Steinberger a2051ff3a9 fix(mcp): preserve streamed stderr diagnostics (#110652)
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-26 14:06:27 -07:00
Peter Steinberger 99a02bf115 feat(approvals): typed approval scope summaries on channel cards (#130116)
* feat(approvals): typed approval scope summaries on channel cards

Approval owners can attach a closed ApprovalScope union (message-send,
payment, external-post) describing an action's blast radius. The gateway
sanitizes it once at the producer boundary, the core view model renders a
Scope metadata row so Slack/Discord/Google Chat cards show it unchanged,
shared text builders cover Telegram/WhatsApp/Signal/iMessage/Matrix, and
the durable presentation carries it additively for operator surfaces.
Scope is display-only, never authorization; missing scope keeps today's
cards.

* fix(approvals): emit native ApprovalScope union and clamp recipient previews

Name the three scope variants as registered protocol schemas so the Swift
generator emits the ApprovalScope discriminated union the presentation
structs reference, and commit the regenerated GatewayModels.swift. Clamp
recipient previews to the declared recipientCount at the sanitize boundary
so a count of 1 with 2 previews can no longer render inconsistently.
Addresses both ClawSweeper findings on #130116.

* refactor(approvals): extract text sanitizer to break the exec-approvals import cycle

check:architecture flagged approval-scope joining the exec-approvals SCC
through exec-approval-command-display. Move the self-contained display
sanitizer into a leaf module (exec-approval-text-sanitize) with no
exec-approvals imports and migrate all sanitize importers; command-display
keeps only the payload-typed command/preview resolver.

* chore(plugin-sdk): ratchet public surface budgets down after sanitizer extraction

The approval display sanitizers left the publicly reachable SDK graph when
they moved to the exec-approval-text-sanitize leaf: exports 4343 -> 4338,
callable exports 2582 -> 2578. Shrink-only budget pin.
2026-08-26 12:13:49 -07:00