* fix(presence): keep colliding profile and raw viewers separate
Use recorded identity namespaces for ephemeral presence grouping, viewer
exclusion, activity cards, and typing counts. Keep timing facts owned by
each connection so later profile qualification cannot leak activity across
identities, and preserve current self identity over stale hello snapshots.
Fixes#132247. This live-presence repair is separate from the merged
transcript-provenance repair in #132038; persistence and authorization
remain unchanged.
* test(presence): qualify header and activity profile fixtures
* feat(ui): add Fast Mode to new sessions
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
Worked on by:
- @Takhoffman
* fix(ui): preserve new-session speed through recovery
Revalidate Fast Mode after reset drains admitted work, before placement retirement and hooks. Preserve explicit speed selections in remote and incognito recovery, remove the unused speed-control opt-out, and exercise cloud create and retry behavior in browser tests.
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
* test(ui): wait for shared shell before palette shortcut
---------
Co-authored-by: roboclaw-bot <309084314+roboclaw-bot@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
* 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
* fix(desktop): preserve verified onboarding handoffs
Keep browser pairing grants separate from native transport credentials, preserve fresh-setup intent across activation and restart, and show owned activation progress and errors even for undiscovered models and scrolled forms. Align native recovery/cancellation feedback and onboarding documentation. Refs #131706.
* fix(ui): bind cancellation cleanup to its original setup attempt
* fix(ui): retire expired setup outcomes before presentation
* fix(desktop): retire rejected setup attempts
Record definitive setup non-admission at the Gateway boundary so browser and native onboarding release only their own rejected attempts. Retain uncertainty for requests that may have dispatched, and preserve terminal cleanup after presentation retirement.
Keep the macOS packaging ownership assertions valid when private scratch storage lives on an external volume. Linux busy/retry and real Ollama handoff, native transport/onboarding suites, browser flows, and isolated review are verified; final signed Mac live proof remains a pre-merge gate.
* test(macos): validate parsed DMG mount paths
* fix(chat): stop channel messages borrowing profile identities
Record bounded sender provenance at the input source and require a qualified
profile for portraits, person Activity links, viewer matching, and typing.
Carry the same authenticated fact through live presence for optimistic sends.
Keep historical transcript text and labels without guessing profile identity.
Preserve deliberate hook/redaction behavior, reject sender reassignment, and
keep distinct authors separate in chat grouping and display deduplication.
No SQLite schema change or historical backfill.
Closes#131886
* fix(ui): preserve qualified identity in viewer avatars
Carry the recorded live-user identity through presence projection and avatar
rendering instead of manufacturing profiles from raw presence IDs. Mixed
raw-ID groups remain unqualified; their grouping contract stays separate.
Qualify genuine profile fixtures across Gateway, avatar, and browser tests.
Keep a historical same-ID no-link browser control and preserve strong avatar
layout, retry, and missing-image assertions.
Follow-up for #132038; fixes CI and the retained browser-fixture review finding.
* test: synchronize node approval readiness and qualify presence fixtures
* fix(onboard): probe remote gateways with saved TLS pins
Honor the configured remote certificate pin in onboarding and configure readiness probes while keeping trust scoped to the exact saved endpoint. Retain explicit-pin precedence and exercise the real self-signed TLS handshake, rejection before credentials, and wizard config propagation. Follow up on #131042.
* fix(configure): validate trusted proxy addresses with the runtime parser
Share exact-IP and CIDR parsing between the trusted-proxy wizard and runtime matching. Reject malformed and empty list entries with expected-form guidance, preserve runtime matcher behavior, and recognize loopback CIDR aliases for the existing explicit consent prompt. Follow up on #131132; the diagnostic correction in #131196 did not validate this input.
* fix(configure): align readiness and loopback consent with runtime
Keep remote TLS pins and edge-auth inputs through health readiness polling by reusing the existing probe parameters. Keep remote config out of local health probes and cover polling through a real TLS socket.
Check loopback consent against runtime proxy matching for both parsed bases and containing ranges, preserving mapped IPv4 and exact IPv6 zone semantics. Extend consent and URL-binding coverage without changing runtime authorization or config schemas.
Preserve the sender-visible LINE filename through shared media normalization so agents can match a named attachment. Staged bytes and paths remain authoritative for access and classification.
Co-authored-by: Eden <146086744+edenfunf@users.noreply.github.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
Keep alias display names separate from dispatch identifiers and preserve selected catalog-only providers. Bind native catalog readiness to its producing client, account, configuration, and harness lifetime, with one consistent prepared Gateway projection.
Separate cold registration metadata from execution imports without changing participant persistence or host/profile authority. Include the acceptance-probe request-contract correction and document the isolated deployment boundary.
Required exact-head CI passed. Additional local cold-discovery and Doctor timing failures remain documented on the PR; the maintainer explicitly directed landing with those limitations. No configuration, credentials, deployment, or activation changes.
Closes#131454.
* feat(profile): enable Git co-author credit by default
Verified GitHub identities now get public `Co-authored-by` credit unless the
person explicitly opts out. An absent `git.coauthor.enabled` row is the default
rather than a refusal, resolved through one shared helper used by both the
attribution resolver and the Control UI toggle.
* fix(profile): fail closed on malformed co-author preference values
The preference API persists arbitrary JSON, so `value !== false` let a
non-boolean row read as consent to publish a verified person's public Git
trailer. Only a missing row or literal `true` now enables credit, with
regression coverage at the attribution resolver and the profile toggle.
* docs(vision): state the team-assistant direction alongside personal use
The privacy rule governs what leaves an install, not what teammates see on a
shared Gateway. Say that explicitly so co-author credit and other shared-session
attribution are not read as a violation of the telemetry opt-in rule, and name
team.openclaw.ai as where OpenClaw is built with OpenClaw.
* fix(tool-call-repair): stop re-parsing the whole response per candidate delta
The streaming tool-call normalizer resolved Markdown protection by materializing
the entire accumulated response and re-parsing it on every candidate-shaped delta,
so a bracket-dense answer cost one full CommonMark parse per line. Work grew
quadratically with response size while emitting byte-identical output.
Carry fenced-code state forward as visible text is appended, and answer protection
from that state when it is provable. The tracker is deliberately conservative: it
models fenced blocks only, marks fence parity permanently unknown when it sees a
delimiter it cannot classify, and returns no answer for inline spans, indented
code, block quotes and lists, so those still take the authoritative full parse.
Measured on the real shared normalizer with the real findCodeRegions resolver:
a 27 KB bracket-dense answer went from 600 full parses / 6055 ms to 0 / 59 ms,
and doubling the response no longer quadruples the re-parsed characters.
Refs #119478
* fix(tool-call-repair): make the fence-only stream fast path opt-in
ClawSweeper flagged the new fence-only fast path (added in this branch to
avoid re-parsing the whole response per candidate delta) as unconditionally
trusted for any caller-supplied resolveProtectedRanges, even though the fast
path only proves fence state. A resolver whose protected ranges are not
fences (e.g. an unfenced caller-defined region) would silently lose its
protection, since the fast path's "not protected" verdict was used directly
without ever consulting the general resolver.
Add PlainTextToolCallStreamNormalizerOptions.protectedRangesFenceCompatible,
an explicit opt-in a caller sets only when its resolver's protected ranges
are exactly the CommonMark fenced/indented/inline code shapes the fast path
models. Without it, the stream always falls back to the authoritative full
parse, matching the resolver's documented (fully generic) contract. Opt the
two current findCodeRegions-backed callers in
(attempt-tool-call-text-promotion.ts, provider-stream-shared.ts), since
findCodeRegions is exactly that shape and the fast path already yields to
the full parse for everything it does not model.
Regression test proves an unfenced, non-fence caller-defined protected range
survives the stream when the fast path is not opted in; reverting the fix
makes it fail with the protected payload silently stripped.
AI-assisted change.
* chore: refresh PR head (keep open for maintainer review)
* fix(tool-call-repair): run the fence-state fast path before resolving cumulative partials
resolvePartialProtectionCheck ran ahead of resolveProtectionFastPath via a
bare `??`, and it fully re-parses the provider's cumulative "partial"
snapshot whenever one validates against the current delta — which
OpenAI-completions and Mistral attach to every text delta. So for exactly
the transport shape this PR targets, the fast path never got a chance to
answer and the quadratic full-response parse persisted despite
protectedRangesFenceCompatible being set.
Reorder so the O(delta) fence-state check runs first; the partial-snapshot
resolver (still a full parse, just of the partial's own text) and the
tracked-context materialize path remain as fallbacks in the same order as
before for callers that don't opt into the fast path, or for deltas the
fast path can't decide from carried state alone.
Added a regression built on the existing bracket-dense-fenced-answer test,
but with a growing cumulative `partial` attached to every delta (the
OpenAI-completions/Mistral shape) — RED on the prior ordering (300 full
parses, one per line), GREEN after the reorder (bounded, same as the
no-partial case).
* fix(tool-call-repair): use a monotonic cursor for fast-path offset lookups
The closure returned by resolveProtectionFastPath rescanned every recorded
line start from index 0 on every offset query. findPotentialCallStart
queries it once per candidate in a single left-to-right scan, so a large
authoritative snapshot with many literal calls made a lookup
Theta(lines x candidates) instead of Theta(lines) -- a ~350KB/16,000-call
snapshot took ~1.5s through the fast path versus ~0.17s through the full
Markdown resolver, undermining the reordering fix.
Offsets are always queried in non-decreasing order (index only advances in
the caller's scan), so a cursor that only moves forward keeps total lookup
work linear across the whole scan.
Added a correctness test for successive increasing-offset queries and a
performance regression built on codex review's own repro shape (20,000
literal calls in one fenced snapshot): RED on the prior linear rescan
(~260ms, comfortably over a 50ms budget), GREEN with the cursor.
* fix(tool-call-repair): stop rescanning the carried partial line on every delta
advanceProtectionScanState searched (partialLine + text).indexOf("\n") on
every call. partialLine never contains a newline by construction, so only
`text` itself can complete a line -- searching the concatenated buffer
re-copies and re-scans the entire carried prefix each time, making a long
newline-free stream (fed in small provider-sized deltas, no candidate or
fence involved) quadratic even though nothing but plain prose is streaming.
Search `text` alone; append to partialLine without touching it when no
newline is found, and only concatenate the carried prefix once, to build
the single line that spans the delta boundary.
Regression: 40,000 x 10-byte deltas (400 KB), matching codex review's own
repro shape -- RED on the prior implementation (~1.2s), GREEN after (well
under the 200ms budget).
* fix(tool-call-repair): advance the fence-state scan when the pending-queue-overcap path replays a false positive
Every other false-positive replay site feeds the replayed text into
advanceProtectionContext so the carried fence-state scan stays in sync with
what was actually streamed. The pendingQueueOverCap branch (a side-channel
event queue growing past MAX_PENDING_EVENTS/MAX_PAYLOAD_BYTES while a text
candidate is pending) replayed its false positive but never did, so the
fast path could fall out of sync with reality afterward -- reporting a
later candidate as unprotected because it never saw the fence the replayed
text opened or closed, exactly the failure direction the whole fast path
must never risk.
Mirrors the identical fix already present at the main delta loop's
false-positive branch a few hundred lines above. Full existing suite
(175 tests) stays green; this specific site's exact trigger (queue count
or bytes overflowing while a text candidate straddles a protected range)
needs a materially larger repro to isolate safely.
* fix(tool-call-repair): distrust the fast path when a partial reveals an unstreamed earlier block
The carried fence-state scan only ever advances from text this normalizer
actually streamed as its own delta. When an earlier content block was never
streamed individually -- it only ever appears already-complete inside a
later delta's cumulative `partial` snapshot -- the scan has no idea it
existed, so a candidate in the following block that is genuinely inside a
fence that earlier block opened gets reported as unprotected. The prior
existing test for this exact scenario happened to end its candidate on an
incomplete last line, which independently makes the fast path decline for
an unrelated reason and accidentally masked the bug.
Detect the gap cheaply (a length comparison, not a parse): compare how much
text protectionBlockStart says the scan has tracked against how much text
the partial's own content shows preceding this block. When the partial
knows more, skip the fast path entirely so resolvePartialProtectionCheck
(which reads the partial's own authoritative text, unaffected by what our
own scan tracked) gets to answer instead.
Added a variant of the existing "uses cumulative partials..." test with a
complete final line, isolating the real bug from the incomplete-line
quirk that masked it -- RED before this fix (only the closing fence
survived, the literal tool-call text silently vanished), GREEN after.
* fix(tool-call-repair): treat any preceding-length mismatch as untracked, not just excess
The carried fence-state scan advances in EVENT order; a cumulative
partial's per-block offsets are in CONTENT-INDEX order. These normally
agree, but a provider can stream an active later block before an earlier
one (a supported interleaved-blocks shape) -- then the earlier block's own
content-order offset (0, since it is first in the assembled message) is
LESS than what the scan has tracked (event-order text from the block that
streamed first). The prior ">" check only caught the partial revealing
MORE preceding text than tracked; it missed this direction entirely, so a
genuine unfenced call in the earlier block could still be reported
protected by state that describes an unrelated later block's context.
"!==" catches a mismatch in either direction, not just excess.
Regression: an earlier block streams second, after a later block has
already opened a fence in event order. RED under a ">" check (the real
call gets treated as protected/literal and never recognized); GREEN with
"!==". Verified via the intermediate streamed events specifically, since
the terminal path's own full parse would mask the bug by always
re-deciding correctly regardless of what the streaming fast path picked.
* fix(tool-call-repair): validate prefix identity, not just its length, before trusting the scan
A length match between the event-order-tracked prefix and the partial's
content-order offset does not prove they are the same text. Interleaved
blocks streamed out of content-index order can produce the same aggregate
tracked length from different actual text (e.g. a backtick fence opened in
event order vs a tilde fence opened in content order) -- same length,
opposite fence identity. The prior length-only check missed this, letting
a later block's real fenced call get evaluated against unrelated tracked
state and wrongly treated as unprotected.
Only pay for the real text comparison when lengths already matched and
there is a non-trivial (nonzero) prefix to compare -- the common
single-block case never reaches it (trivial empty-prefix comparison), and
the cost of the rarer multi-block case is bounded by the preceding block's
own size, not by however large the current block's own growing content is.
Regression: block 1 streams "```\n" first, block 0 streams "~~~\n" second
(matching aggregate length, opposite real fence state), then block 2
streams a call still inside the real (content-order) fence. RED with a
length-only check (silently buffers the call and never resolves it, since
nothing in the test flushes the stream further); GREEN once prefix
identity is verified, correctly streaming it as literal protected text.
* fix(tool-call-repair): cache preceding-prefix trust once per block
The same-length content-order safety check materialized and compared a block’s preceding prefix every time a later candidate was considered. Because protectionChunks also contains the current, still-growing block, the full join repeatedly copied unrelated text even though preceding-context trust cannot change within that block, reviving the quadratic work this fast path exists to avoid.
Cache that verdict at the content-block boundary and reset it with the block snapshot. Build only the fixed-size prefix needed by the comparison, stopping once protectionBlockStart characters have been collected.
The new stress fixture initially put the next block’s backticks directly after a 200,000-character newline-free line. Text blocks concatenate without separators, so this was not a CommonMark fence: the conservative scanner correctly entered structuralUnknown and fell back to the authoritative resolver 300 times. Keep the prefix exactly 200,000 characters but terminate its line so the regression exercises the intended valid fence instead of a mid-line delimiter.
Regression: RED as handed off with 300 resolver calls; decline tracing isolated the malformed mid-line fence rather than hasUntrackedPrecedingContext. GREEN with a newline-terminated 200,000-character prefix and 300 cumulative-partial candidate deltas, proving the prefix decision and materialization stay bounded while the protected text streams unchanged.
* fix(tool-call-repair): never cache prefix trust from a candidate with no partial
partial is optional on every event type, so the first candidate in a block
can arrive with none at all. hasUntrackedPrecedingContext correctly has
nothing to compare in that case, but the per-block cache
(protectionBlockPrefixTrusted) treated that "no data" the same as a
confirmed match and locked in "trusted" for the rest of the block. A
later, separate candidate in the same block that DOES carry a partial --
revealing a genuine event-order/content-order mismatch from interleaved
blocks -- then inherited the stale default instead of getting its own
check, letting the wrong (event-order) fence state decide it.
hasUntrackedPrecedingContext now returns undefined for "no data to compare",
distinct from a confirmed true/false; the cache is only written on a
confirmed result, so a block whose first candidate had no partial still
gets a fresh check on its next one. A block that never sees any partial at
all correctly stays trusted throughout (nothing ever contradicts the scan,
so it remains the only source of truth) -- confirmed via the existing
bracket-dense no-partial regression, which caught an earlier draft of this
fix that flipped the wrong default.
Regression: a complete, partial-less call resolves first in a block, then
a second candidate in the same block carries a partial showing the block
actually comes first in content order (opposite fence state from event
order). RED with the cache treating "no data" as "trusted" (the second
candidate is wrongly evaluated against event-order state, gets buffered,
and silently vanishes since nothing resolves it); GREEN once only a
confirmed verdict is cached.
* fix(tool-call-repair): invalidate cached preceding-context trust when an earlier block grows
The per-block cache assumed a block's preceding text never changes across
its own deltas once first observed. That holds when earlier blocks are
already finished, but not when an earlier block is itself still actively
streaming: it can grow between two candidate checks in a later block
without the content index ever switching away and back (which would
otherwise reset the cache via beginProtectionBlock). A boolean-only cache
reused a stale "trusted" verdict from before that growth, letting the
wrong (event-order) fence state decide a later candidate even though a
newer partial already reported the real, changed preceding text.
Replaced the plain boolean cache with a verdict keyed by the preceding
length it was validated against (PrecedingContextVerdict, returned by the
renamed resolvePrecedingContextTrust). A later delta whose partial reports
a different preceding length invalidates the cache and forces a fresh
comparison; a matching length still reuses the cached verdict, keeping the
common (stable) case just as cheap as before.
Regression: block 0 streams "~~~\n" for real; a first, complete call in
block 1 confirms trust against it. A second candidate in block 1 then
arrives with a partial showing block 0 grew to "~~~\n~~~\n" (closing that
fence in content order) -- the earlier verdict must not be reused. RED
with a length-agnostic cache reuse (the real, unfenced second call is
wrongly buffered as protected and never resolves); GREEN once a changed
preceding length forces re-validation.
* test(ollama): prove plain-text tool-call fence protection through the real NDJSON transport (#122513)
Real loopback /api/chat NDJSON server driven through createOllamaStreamFn:
real HTTP, real SSRF-guarded fetch, real NDJSON parsing, real
createPlainTextToolCallCompatWrapper, real Markdown protection. Pins the
safety contract at the transport seam (bracket-dense fenced answer stays
byte-identical, including a complete fenced [read] call, while the same
call outside the fence is normalized away) and pins the raw delta shape
(one text_delta per NDJSON record, no cumulative partial) that the
packages/tool-call-repair bounded-resolution suites replicate.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Preserve the structured OpenAI Responses failure code so the canonical assistant classifier can apply the prepared provider policy. Typed server failures now select the existing server-error fallback path instead of timeout behavior.
Co-authored-by: ruel225 <ruel225@users.noreply.github.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
* fix(sessions): preserve participant identity and input provenance
Keep profile, agent, remote, observed, and legacy identities distinct in the existing participant table. Record accepted input at admission, including steering, instead of inferring a person from the session creator. Preserve historical membership and counts while leaving ambiguous profile timestamps unknown through stopped-writer Doctor migration.
Project full visibility-filtered person membership before preview limits so Activity does not misattribute channel identities or omit people outside the facepile. Keep participant membership separate from authorization and expose raw-selector ambiguity to memory operators.
Repair Doctor readiness reporting, generic Swift inline-union generation, direct-dispatch metadata handling, and fixture-owned database lifetimes. Verify namespace collisions, real provider input, accepted steering, visibility, backup/migration/reopen boundaries, native decoding, and the built-CLI lifecycle.
Fixes#130661
* fix(macos): isolate readiness and discovery lifecycles
Keep readiness fixtures private for their entire lifetime and give health readiness one deadline owner. Start and cancel slow host discovery with active discovery, not model construction.
Make native protocol, callback, onboarding, and process-cleanup tests observe their intended lifecycle phases without expanding deadlines or weakening assertions. Correct the documented signing default.
Validated with 1,839 parallel native tests, the release product build, causal negative controls, pinned Swift lint/format checks, and fresh isolated autoreview. Native production delta: -5 lines.
* docs(macos): clarify app profile isolation boundaries
* build(protocol): refresh generated Swift install models
* fix(protocol): preserve optional literal field presence
* fix(ci): bound SDK declarations and isolate test lifecycles
Discover the current declaration source graph in a joined child before normal eager emission, and track its complete source-bearing cache inputs. Repair shared jsdom focus teardown and native worker fixture request ordering without changing UI focus ownership or execution fallback policy.
* test(sessions): prove Goal participant upgrade boundaries
* 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
* fix(gateway): preserve model auth unavailability reasons
Record missing credentials, unusable auth, and cooldown separately from unknown availability. Carry native runtime auth facts and retry times through the additive models.list projection without changing protocol versions.
* fix(ui): gate composers only on actionable auth failures
Read producer availability reasons in chat and new-session gates. Preserve Model Setup for missing credentials, keep accurate rejection copy, and allow sending during cooldown or unknown availability. Keep unavailable picker options disabled.
* fix(gateway): distinguish permanent auth rejection from cooldown
Keep permanently rejected profiles and inline credentials actionable without a retry timestamp. Use only viable transient profiles for the earliest recovery time, preserving explicit profile retry behavior.
* test: isolate submit gates and native runtime availability fixtures
Extract the existing submit-gate suite and shared draft fixture to stay within the file-size limit. Supply registered CLI metadata through the existing test boundary so availability checks do not cold-load executable plugin setup code.
* chore(protocol): regenerate Swift gateway models for availability reasons
* test(gateway): expect availability reasons in models.list projections
* 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.
* fix(gateway): reduce transcript memory pressure and preserve heap controls
Avoid overlapping raw SQLite rows and transcript serialization copies while
preserving complete fenced snapshots, provenance, callbacks, and reset hashes.
Scale managed Node Gateway budgets with host capacity, preserve operator heap
ownership, and keep service repair and macOS ownership aware of native flags.
* fix(daemon): preserve heap controls after named preloads
Keep drained steering and follow-up messages owned by their original queue until transcript commit, then restore uncommitted messages after abort. This prevents silent message loss without changing queue scheduling.
Co-authored-by: SunnyShu0925 <shu.zongyu@xydigit.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
Compaction summaries must carry visible conversation state without forwarding provider-private reasoning. The shared serializer now preserves visible assistant text and tool calls while omitting thinking blocks.
Co-authored-by: Alix-007 <li.long15@xydigit.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
* fix(sessions): stop truncating the sidebar roster
The Control UI asked sessions.list for 50 rows (60 with ownerFirst) and the
gateway defaulted an absent limit to 100, so a roster larger than the page
silently lost its tail. Sidebar categories are seeded from the group catalog
and filled from that page, so a category whose newest session fell outside the
window rendered as an empty header -- on team.openclaw.ai, 184 live sessions
meant only 6 of 28 categories had a visible row, and one category holding 25
live sessions rendered empty. With an owner filter active the empty section is
hidden outright, so the category disappeared entirely.
Rosters now send no limit and an absent limit means the whole list, matching
the vocabulary `openclaw sessions --limit all` already uses. This is close to
free: the store filter/sort is O(store) at any limit, and per-row transcript
reads are separately capped at SESSIONS_LIST_TRANSCRIPT_FIELD_ROWS (100) with
a yield every 10 rows, so extra rows are lightweight.
The Sessions page keeps a real page size under its own
SESSIONS_PAGE_DEFAULT_LIMIT, because that limit is an explicit operator-edited
field rather than silent truncation. The owner-first window keeps its 60-row
cap: it only decides which of your own rows are hoisted and hides nothing.
Also drops the 200-name cap on sessions.groups.put and the matching 232-entry
sectionOrder caps. The read path was already unbounded and the gateway
registers new categories on session patch without a cap, so a catalog could
grow past 200 and then fail every catalog write.
* test(ui): prove the sidebar fills out-of-page categories
Seeds a roster whose categorized tail sits below a 50/60-row recency cutoff and
mocks sessions.list the way the gateway behaves: an explicit limit truncates,
an absent one returns everything. Fails on the pre-fix build because the
Papercuts rows never arrive, and doubles as the before/after capture.
* fix(sessions): keep the Sessions page limit box on its default for junk input
CI caught two things the local scope missed. Four tests asserted the injected
50/60 limit -- two owner-first e2e specs, the prewarm call shape, and the
sessions.list byte-parity literal, which no longer serializes limitApplied.
The real defect: the Sessions page passed parseStrictPositiveInteger(this.limit)
straight through, and relied on the roster builder to substitute 50 when that
returned undefined. With the injection gone, an unparseable entry in the Limit
box silently requested every session. The page now owns its own fallback.
* test(ui): drop the injected roster limit from dashboard e2e fixtures
The dashboards route spreads DEFAULT_SESSION_LIST_QUERY, so its request and
listSnapshot key no longer carry limit: 50.
* fix(sessions): unify the sidebar roster page behind one define
Restores the documented bounded sessions.list default so the SDK's no-arg
sessions.list() and the TUI's `opts ?? {}` keep the 100-row page that
docs/cli/sessions.md promises, then fixes the sidebar on its own terms.
The sidebar had three separate limits: SIDEBAR_AGENT_SESSION_LIST_LIMIT (60)
in the query it actually sent, DEFAULT_SESSION_LIST_QUERY.limit (50) injected
when a caller omitted one, and a 60-row ownerFirst floor. All three collapse
into SIDEBAR_SESSION_ROSTER_LIMIT = 200, which the roster query, the roster
default, and the Gateway startup prewarm now share so the warm cache matches
what the UI asks for.
Load-more is unified. Section "Show more" only reveals rows the roster already
holds; fetching the next page is one list-level control shown whenever the
Gateway reports hasMore. That fetch used to be gated on
`section.id === "ungrouped"`, so only the catch-all could pull pages and a
starved category could never recover its own rows -- with no affordance saying
so. Because a fetched page is useless if the rows land behind a section's cap,
the roster control also advances every section by a page.
The Sessions page keeps its own SESSIONS_PAGE_DEFAULT_LIMIT: that limit is an
explicit operator-edited field, so tuning the roster never moves it.
* test(ui): retie roster paging fixtures to the shared define
Dashboard query expectations and the two-page event-refresh fixtures assumed a
50/60-row first page. They now scale from SIDEBAR_SESSION_ROSTER_LIMIT so they
keep exercising a real append instead of fitting inside one page.
* test(ui): scale the membership paging fixture to the roster define
main added membership-filter paging cases that assumed a 60-row first page.
Four roster pages of rows leave two pages of odd-numbered matches, so the
append these cases exercise stays real at the shared page size.
* fix(ui): open worktree sessions before setup finishes
Admit the first turn before naming, checkout, and repository setup; show
startup progress and keep failures retryable in the same session. Reuse the
accepted-run workspace owner, fence cancellation and setup authority, and
block sibling work until the workspace is ready.
Fixes#124966 (immediate worktree sessions and setup progress).
* test(ui): retain project picker capability in startup fixture
* fix(worktrees): fence checkout retries after cancellation
* test: align native phases and title fallback with admitted startup
* fix: keep model reasoning out of generated session titles
Request strict visible output before transport recovery can discard reasoning
tag provenance. Share host-prepared completion execution across bundled
harnesses while preserving normal completion recovery and title fallback.
Keep selected model/auth routing, HTTP-boundary coverage and persisted-title
browser proof. Remove duplicate completion paths and redundant test setup.
Co-authored-by: luyifan <al3060388206@gmail.com>
* fix(agents): preserve strict empty CLI completions
Forward strict-visible output policy through the CLI owner and allow a clean
empty result only for strict isolated completions. Keep ordinary CLI empty
responses rejected before successful auth settlement, without a silent token.
Consolidate post-dispatch empty validation and duplicate usage test setup.
Co-authored-by: luyifan <al3060388206@gmail.com>
* test(agents): retain label fallback and prompt contracts
Consolidate utility-success coverage into the two-API prompt and auth-owner
table. Keep both rejected and reasoning-only utility fallback cases bound to
the selected runtime owner after the main composition.
Co-authored-by: luyifan <al3060388206@gmail.com>
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>
* fix(gateway-client): verify TLS pin before websocket upgrade
* fix(node-host): share websocket request preparation
Reuse the common request setup for auxiliary streams so managed connections can attach after the connection event has already completed. Preserve stream endpoint policy and ordering, and cover direct and managed routes with real-socket tests.
* perf(cli): defer status usage runtime imports
Keep credential resolution and provider usage dependencies behind the
optional status --usage boundary. Default status no longer loads the
model/auth graph merely to collect runtime diagnostics.
Preserve agent selection, credential routing, and usage merging while
removing redundant private loader wrappers. Extend the existing cold-import
suite with a reproduction that fails when default status imports auth.
Six local Node 24 samples reduce status JSON median peak RSS by 19.29 MiB
before the separate schema import cleanup, with a 1.77 MiB sample spread.
* perf(cli): trim schema validation startup imports
Use TypeBox's schema compiler and guard APIs for config and plugin manifest
validation instead of loading unused value codecs and transformations.
Preserve checks, format scoping, defaults, and structured validation errors.
Remove 145 TypeBox modules from the status and plugin inventory import
graphs. Extend the existing validation suite to reject eager value/compiler
imports, and shrink the assertion baseline after removing an unnecessary
error-array cast.
* test(cli): cover failed status usage imports
Extend the cold-import regression to prove requested usage and formatting preserve lazy-import failures while default status remains available before and after failure. Keep production behavior unchanged.
* feat(ui): add interface and chat font pickers to appearance settings
Decouple typefaces from themes: face-keyed font stylesheets, a closed
TypefaceId wire contract synced per-profile via users.prefs, and a
Typography block with per-face specimens and a live preview. Theme
defaults are unchanged; overrides apply as inline --font-body/--font-chat
custom properties and load lazily on picker open.
* refactor(ui): compress typography loader and synced-pref plumbing
One retained stylesheet link per typeface replaces the slot/specimen
dual-link model; typeface stacks derive from kind metadata; config-page
per-pref accessor methods and the reset switch fold into one keyed
currentSyncedPref helper. Behavior, wire contract, and network-fetch
timing unchanged.
* test(ui): derive app-shell prefs request keys from the appearance wire contract
* chore(ui): repin startup JS baseline for typography module and prior unpinned boot growth
* fix(ai): carry the Responses system prompt via instructions, not input[0]
Every non-Codex OpenAI Responses request embedded the system prompt as
input[0]. HTTP continuation compares input byte-for-byte against the
cached previous request to decide whether it can reuse
previous_response_id, and the embedded runner rebuilds the system
prompt fresh every attempt from live runtime state (active background
processes, watched sessions, active-memory context) -- so ordinary
state churn between two turns permanently defeated continuation.
Native Codex/ChatGPT already avoided this by sending the system prompt
via the separate instructions field; broaden that to every Responses
request (instructions was previously Codex-only) and exclude
instructions from the continuation comparator, matching how input is
already excluded there.
xAI's /responses/compact endpoint has no instructions field (system
prompt must be the first input message, confirmed against
docs.x.ai/developers/advanced-api-usage/context-compaction) and was
about to silently lose the system prompt on every compaction request
once it stopped riding along in input. Re-embed it just for that
request body via a new buildOpenAIResponsesCompactSystemMessage
helper, with its own regression coverage for the developer/system role
selection since that invariant no longer has any other test path.
* fix(ai): gate the Responses instructions field behind compat.supportsInstructions
A proxy-compatible Responses endpoint that silently ignores `instructions`
(confirmed for at least xAI's compact endpoint, plausible for other
custom/proxy routes with no established contract) would drop the system
prompt with no error -- the request still returns 200. Add a
compat.supportsInstructions escape hatch, defaulting to on, mirroring
the existing supportsStore/supportsPromptCacheKey pattern: when an
operator sets it false, the system prompt goes back to being embedded
in `input[0]` (the pre-instructions behavior) instead of `instructions`.
Addresses the maintainer review finding on #130206.
* fix(ai): expose supportsInstructions through config and catalog contracts
usesInstructionsField already read compat.supportsInstructions at
request-build time, but strict config and catalog normalization dropped
the key, so no configured model could actually set it. A proxy that
silently ignores top-level instructions had no supported way to opt out.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vk2cBRQdErwRtPea8VuhG6
* fix(ai): default the Responses instructions field off for unverified proxy routes
usesInstructionsField defaulted true for any api:"openai-responses" model
regardless of endpoint, including arbitrary custom/local proxies OpenClaw
has no bundled knowledge of. HTTP continuation only ever engages on the
exact native api.openai.com route, so an unverified proxy got nothing in
return for the risk of silently losing its system prompt if it doesn't
honor `instructions`. Default now follows the same known-endpoint
classification the file already uses for reasoning/input-status payload
shaping; xAI's already-verified main route is unaffected since it's a
named endpoint class, not "custom"/"local".
Also updates the one stale test this flips (xAI compact-endpoint replay
no longer embeds the system prompt in input[0], matching what the
original PR's instructions-field change already does for that route) and
documents supportsInstructions in the custom-provider compat table.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vk2cBRQdErwRtPea8VuhG6
* fix(ai): narrow the instructions-field default to only confirmed-verified routes
usesVerifiedInstructionsEndpoint (formerly usesUnverifiedProxyEndpoint's
inverse) treated every named endpointClass except custom/local as
verified -- but recognizing a hostname (for SSRF/base-URL matching) is
not the same as having confirmed that host's Responses API honors
`instructions`. Bundled classes like OpenCode and GitHub Copilot have no
such confirmation, so their existing users could silently lose their
system prompt on upgrade. Narrowed the default-on set to exactly the two
routes actually verified: native OpenAI (definitionally) and xAI's main
route (confirmed by direct testing, per the existing compact-endpoint
carve-out). Every other route, named or not, now defaults to the
pre-existing input-embedded behavior unless compat.supportsInstructions
opts it in explicitly.
Also lands a permanent committed integration test
(openai-responses-payload-policy.instructions.integration.test.ts) over
a real loopback HTTP+SSE server -- no SDK mocking -- asserting the
literal wire request for both the unverified-default-off and
explicit-opt-in cases, following the same pattern as
openai-responses-client.continuation.integration.test.ts.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vk2cBRQdErwRtPea8VuhG6
* test(ai): cover continuation across a changed instructions value
The comparator already strips instructions before comparing requests
(requestWithoutInput), matching how it already strips input -- but no
fixture actually varied instructions between turns, so nothing proved
continuation still engages when the rebuilt-per-turn instructions text
legitimately differs, or that the current turn's instructions (not a
stale copy) reaches the outgoing request.
Also fixes a stale doc: the custom-provider compat table said
supportsInstructions defaults true for "bundled/catalog-known routes",
which was accurate for an earlier iteration of this branch but not the
current, narrower default (native OpenAI and xAI's main route only).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vk2cBRQdErwRtPea8VuhG6
* test(ai): add gated live proof for the instructions default + continuation
Committed, rerunnable proof of the actual open question -- does a real
native OpenAI Responses request carry the system prompt via top-level
instructions, and does HTTP continuation still correctly reuse
previous_response_id once the prompt moved out of input. Follows the
established openai-responses-client.continuation.live.test.ts pattern
(gated on OPENCLAW_LIVE_TEST=1 + OPENAI_API_KEY, skipped otherwise).
Captures the literal request bytes via a globalThis.fetch wrapper
rather than a forward-proxy: proxying would require overriding the
model's baseUrl to a loopback address, which would itself defeat the
native-route classification under test (the continuation eligibility
check in openai-responses-websocket.ts requires an exact
https://api.openai.com/v1 origin/path match and treats any other
baseUrl, including a proxy's loopback address, as non-native).
Uses the same secret-recall semantic proof as the reference continuation
live test: turn 2 can only produce the secret given in turn 1 if the
real API actually resolved server-side state through
previous_response_id, since the trimmed turn-2 request never repeats it
-- structural proof (previous_response_id present) alone can't rule out
a silent full-history fallback producing the same visible answer.
Verified: run against the real API twice (once before, once after an
unrelated lint fix) -- both passed, confirming turn 1 carries
instructions with no previous_response_id, turn 2 carries
previous_response_id plus the correctly-recalled secret with a
single-message trimmed input.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vk2cBRQdErwRtPea8VuhG6
* fix(ai): exclude Azure OpenAI from the verified instructions-field default
usesVerifiedInstructionsEndpoint reused usesKnownNativeOpenAIRoute, which
also covers azure-openai -- a boolean this file already uses elsewhere
for reasoning/service-tier/input-status policy, where treating Azure as
"native-like" is fine. Reusing it for the instructions default silently
contradicted the PR's own stated evidence boundary (native OpenAI and
xAI's main route only): Azure was never actually verified to honor
`instructions`, unlike those two.
Introduces a narrower usesVerifiedNativeOpenAIRoute specific to this
decision, explicitly excluding azure-openai. Two pre-existing tests that
happened to use an Azure model fixture to test unrelated message-item
serialization structure now opt in explicitly via
compat.supportsInstructions -- their actual intent (structure once
instructions is in play) is unchanged. Left the shared
createAzureResponsesModel() helper itself untouched since ~30 other call
sites across sibling test files use it for unrelated behavior.
New regression test proves Azure specifically defaults to input-embedded,
unlike native OpenAI.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vk2cBRQdErwRtPea8VuhG6
* fix(ai): correct stale instructions-field defaults in Azure test and doc
The Azure narrowing in 9bbac5ee5b4 (usesVerifiedInstructionsEndpoint ->
openai-public | openai | xai-native) correctly moved Azure back to
embedding the prompt in input, but left one test assertion and two
comments describing the pre-narrowing universal default.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vk2cBRQdErwRtPea8VuhG6
* test(ai): correct native base URL explanation
---------
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
* fix(network): release captured streams without waiting on their cleanup
End best-effort reader ownership before guarded request cleanup, while preserving explicit cancellation failures after cleanup. Simplify llama download reader ownership without changing transport abort policy.
Co-authored-by: zhang-guiping <zhang.guiping@xydigit.com>
* fix(network): preserve caller-owned response cleanup
Preserve cancellation for partially consumed media responses, type the captured response handoff, and clarify beta stream cleanup ownership.
* fix(tts): settle stream cancellation with request cleanup
Own binary-stream cleanup in the shared helper and remove duplicate provider release wrappers. Preserve explicit cancellation settlement and errors while allowing cleanup to abort retained capture branches.
Co-authored-by: zhang-guiping <zhang.guiping@xydigit.com>
* test(tts): preserve cancellation result tuple types
Keep both cancellation/release call orders while passing an explicit two-result tuple to Promise.allSettled. Preserve the existing outcome and error-identity assertions without casts or non-null assertions.
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>
* feat(ui): show activity cards for online people
Record live person timing independently of heartbeat freshness and expose keyboard- and touch-accessible cards with visible session links. Preserve continuous online intervals across overlapping tabs without adding persistent activity history.
Closes#130649
* build(protocol): refresh generated presence timing fields
* fix(gateway): scope presence snapshots to read-access operators
Apply one recipient projection to hello, system-presence, and events. Keep person timing and time-zone details behind read access, and filter watched references with the canonical session-list policy without leaking hidden counts. Preserve idle-person metadata for readers and prevent non-reader activity-driven frames.
* fix(plugins): preserve Gateway capability load context
Carry the owning registry's metadata generation, workspace, install records, and built-artifact preference through capability discovery. Preserve standalone source loading and existing speech eligibility while avoiding synchronous source transforms on cold Talk catalog requests.
Fixes#130777
* test: align integrated presence and capability coverage
Keep the recipient matrix in its timing-aware owner, close the suite-owned Gateway for shutdown proof, and spy on the canonical install-record reader. Remove the retired private carrier's assertion allowance.
* fix(gateway): broadcast presence when clients connect
Publish completed connection rows through the canonical scoped broadcaster so established readers see first connections and reconnects without waiting for profile edits or activity. Preserve shared online intervals and reset them only after the final socket closes.
* fix(ci): align presence fixtures and sidebar type ownership
Reuse the canonical sidebar host type to remove the type-only lazy-runtime cycle. Assert omitted scopes through hello auth and denied presence reads, and supply presence version callbacks in the shared WebSocket context fixture. Retain startup admission and drain assertions without changing deadlines.
* fix(ui): retain latest scroll commands until their destination
Do not treat the virtualizer's idle debounce or a decreasing offset as reader takeover. Settle at the actual DOM end within one pixel, retaining the separate eight-pixel UI-follow policy and explicit input cancellation. Cover retargeted idle delivery and near-end precision with the real dependency, synchronize pointer baseline capture, and type the existing composer snapshot as its textarea contract.
Fixes#130892
* 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
Explicit session resets must create a clean model-context boundary while automatic recovery and rollover preserve their bounded continuity tail.
Co-authored-by: Grynn <grynn@users.noreply.github.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
* fix(worker): keep background servers alive between turns
Retain the supervised worker environment while background execs are live,
while recreating turn admission, tools, connections, and authorization for
each turn. Keep physical worker ownership separate from bounded turn
receipts so cancellation, restart recovery, and environment retirement
cannot discard a still-running worker.
Preserve process polling across turns, release turn callbacks, join exec
finalization before environment cleanup, and require exact worker stop
confirmation unless a dedicated provider proves the machine is gone.
Fixes#130450.
* fix(worker): fence revoked placements and verify retained lifetimes
Record provider-loss teardown intent before remote stop, prevent pending cleanup
from being recovered as an active placement, and preserve exact physical ownership
until stop is confirmed. Keep draining state when the provider becomes unavailable.
Remove the ownership/lifecycle import cycle and align workspace-retention proof
with physical teardown. Exercise missing-capability rejection and reconnect on
real Gateway/node wire, preserving scenario and cleanup failures in the harness.
* test(worker): verify durable startup revocation cleanup
* fix(compaction): show the summarizer the audited latest ask
The safeguard reads the latest user ask from the pre-partition window but
only feeds the summarizer the partitioned messages. When recentTurnsPreserve
keeps the ask verbatim and the preserved suffix is head-truncated, the
producer can never reflect it, so every attempt fails
latest_user_ask_not_reflected and compaction cancels, leaving the session
stuck at the context limit.
Hand the bounded ask to the summarizer as untrusted data on every attempt so
the guard only demands what the producer was shown.
* fix(compaction): preserve latest turn context
Worked on by:
- @VACInc
Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com>
* test(ui): await lazy attention panel render
Worked on by:
- @VACInc
Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com>
* fix(compaction): audit completed split turns
Worked on by:
- @VACInc
Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com>
---------
Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com>
Co-authored-by: roboclaw-bot <309084314+roboclaw-bot@users.noreply.github.com>
Use the latest nonempty function-name snapshot for a resolved tool call so fragmented direct OpenAI-compatible streams do not publish stale tool names. Preserve the first tool identity when a later fragment supplies an explicitly conflicting ID.
Co-authored-by: SunnyShu0925 <shu.zongyu@xydigit.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
Preserve supported explicit and default Agent reasoning off through the
managed transport handoff. Retain unsupported-off transport defaults,
model-owned enabled fallbacks, and native Anthropic exceptions. Replace the
single-use Set and casting guard with direct switch narrowing.
Proved with real Agent-to-embedded-to-managed HTTP/SSE regressions and
provider sibling coverage, plus actual Qwen inference through Ollama's
OpenAI-compatible reasoning-effort dialect. Related: #119959; the full
reported vLLM configuration remains unverified and that issue remains open.
This metadata-only replacement retains the exact reviewed and tested tree.
It removes an obsolete closing reference from the earlier commit messages
without changing any source, test, or baseline content.
* fix(agents): stabilize runtime context across tool rounds
Keep current-turn metadata after the active user and before tool calls so Responses continuation retains the complete prior request prefix. Preserve active hook context and intentionally resend when transient context expires on a later turn.
Reworks #130166. Thanks to Markus Hartung for investigating continuation failures.
Co-authored-by: Markus Hartung <mail@hartmark.se>
* fix(ai): localize continuation ordering to Responses
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>