Repository navigation
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Owner
Author
|
Superseded by the corrected branch name upgrade/2026-04-02. |
amittell
added a commit
that referenced
this pull request
Apr 17, 2026
- #1/#2: scanSessionsDirForTranscriptCandidate uses birthtimeMs as creation-time signal, falling back to mtimeMs on platforms without birthtime support (Linux: birthtimeMs === mtimeMs). JSDoc updated to match. - #3/#4: routeResumedRun tests now write transcripts at the path that resolveSubagentRunResumability derives via the mocked sessions helpers, then await vi.waitUntil to confirm the async completion callbacks (onCompleteReplay / onCompleteRedispatch) are actually invoked. - #5: rehydrateSessionStoreEntries is now async and writes through updateSessionStore() so concurrent session-store writes during startup are serialised through the existing lock, not bypassed via a raw writeFileSync call. - #6: restoreSubagentRunsOnce is now async and awaits the rehydrateSessionStoreEntries call. An expanded comment explains why rehydrate must precede reconcileOrphanedRestoredRuns. initSubagentRegistry uses void to fire-and-forget the async restore. - #7: redispatchSubagentRunAfterRestart initialises newRunId with a fresh crypto.randomUUID() separate from the idempotency key (redispatchIdem), which is for deduplication only. - #8: resolveSubagentRunResumability now derives the transcript path through resolveSessionFilePath (which respects the sessionFile field in the session-store entry for non-standard transcript paths) instead of the hardcoded `${sessionsDir}/${sessionId}.jsonl` join. - #9: redispatchSubagentRunAfterRestart accepts a new suppressNotifications parameter. routeResumedRun passes true so the recovery path does not fire chat.send notifications before the recovered run completes. - #10: The agent callGateway call in redispatchSubagentRunAfterRestart includes spawnedBy: entry.requesterSessionKey so the re-dispatched run inherits the original run's parent-context and the session tree stays consistent after restart.
amittell
added a commit
that referenced
this pull request
Apr 17, 2026
- #1/#2: scanSessionsDirForTranscriptCandidate uses birthtimeMs as creation-time signal, falling back to mtimeMs on platforms without birthtime support (Linux: birthtimeMs === mtimeMs). JSDoc updated to match. - #3/#4: routeResumedRun tests now write transcripts at the path that resolveSubagentRunResumability derives via the mocked sessions helpers, then await vi.waitUntil to confirm the async completion callbacks (onCompleteReplay / onCompleteRedispatch) are actually invoked. - #5: rehydrateSessionStoreEntries is now async and writes through updateSessionStore() so concurrent session-store writes during startup are serialised through the existing lock, not bypassed via a raw writeFileSync call. - #6: restoreSubagentRunsOnce is now async and awaits the rehydrateSessionStoreEntries call. An expanded comment explains why rehydrate must precede reconcileOrphanedRestoredRuns. initSubagentRegistry uses void to fire-and-forget the async restore. - #7: redispatchSubagentRunAfterRestart initialises newRunId with a fresh crypto.randomUUID() separate from the idempotency key (redispatchIdem), which is for deduplication only. - #8: resolveSubagentRunResumability now derives the transcript path through resolveSessionFilePath (which respects the sessionFile field in the session-store entry for non-standard transcript paths) instead of the hardcoded `${sessionsDir}/${sessionId}.jsonl` join. - #9: redispatchSubagentRunAfterRestart accepts a new suppressNotifications parameter. routeResumedRun passes true so the recovery path does not fire chat.send notifications before the recovered run completes. - #10: The agent callGateway call in redispatchSubagentRunAfterRestart includes spawnedBy: entry.requesterSessionKey so the re-dispatched run inherits the original run's parent-context and the session tree stays consistent after restart.
amittell
added a commit
that referenced
this pull request
Apr 22, 2026
- #1/#2: scanSessionsDirForTranscriptCandidate uses birthtimeMs as creation-time signal, falling back to mtimeMs on platforms without birthtime support (Linux: birthtimeMs === mtimeMs). JSDoc updated to match. - #3/#4: routeResumedRun tests now write transcripts at the path that resolveSubagentRunResumability derives via the mocked sessions helpers, then await vi.waitUntil to confirm the async completion callbacks (onCompleteReplay / onCompleteRedispatch) are actually invoked. - #5: rehydrateSessionStoreEntries is now async and writes through updateSessionStore() so concurrent session-store writes during startup are serialised through the existing lock, not bypassed via a raw writeFileSync call. - #6: restoreSubagentRunsOnce is now async and awaits the rehydrateSessionStoreEntries call. An expanded comment explains why rehydrate must precede reconcileOrphanedRestoredRuns. initSubagentRegistry uses void to fire-and-forget the async restore. - #7: redispatchSubagentRunAfterRestart initialises newRunId with a fresh crypto.randomUUID() separate from the idempotency key (redispatchIdem), which is for deduplication only. - #8: resolveSubagentRunResumability now derives the transcript path through resolveSessionFilePath (which respects the sessionFile field in the session-store entry for non-standard transcript paths) instead of the hardcoded `${sessionsDir}/${sessionId}.jsonl` join. - #9: redispatchSubagentRunAfterRestart accepts a new suppressNotifications parameter. routeResumedRun passes true so the recovery path does not fire chat.send notifications before the recovered run completes. - #10: The agent callGateway call in redispatchSubagentRunAfterRestart includes spawnedBy: entry.requesterSessionKey so the re-dispatched run inherits the original run's parent-context and the session tree stays consistent after restart.
amittell
pushed a commit
that referenced
this pull request
May 30, 2026
…penclaw#76262) * fix(msteams): rebase SDK migration onto current main Reapply the msteams SDK migration (originally on feat/msteams-sdk-migration) on top of upstream/main, resolving conflicts with parallel msteams work that landed upstream during our session. What got applied vs decisions made: CLEANLY APPLIED (3-way patch): - monitor.ts, monitor-handler.ts, polls.ts, reply-stream-controller.ts/.test.ts, reply-dispatcher.ts, attachments/download.ts, monitor.lifecycle.test.ts, monitor-handler/message-handler.ts, monitor-handler.types.ts, etc. - streaming-message.ts + .test.ts deletions WHOLESALE TAKE FROM ORIGINAL BRANCH (partial 3-way left broken cross-refs): - sdk.ts, sdk.test.ts, messenger.ts, feedback-reflection.ts, send-context.ts, send.test.ts KEPT UPSTREAM (deferred for separate cleanup): - extensions/msteams/package.json (still has jsonwebtoken/jwks-rsa per Peter's b3bc60a incremental approach) - src/plugins/contracts/package-manifest.contract.test.ts (consistent with package.json) - pnpm-lock.yaml (avoids lockfile churn; pnpm install --frozen-lockfile clean) ADAPTED: - Dockerfile matrix-sdk-crypto check now wraps upstream's new retry-loop in the if-matrix-bundled gate KNOWN TEST FAILURES (need eyes — see PR comment): - attachments.test.ts: 1 fail (pre-existing — warn meta arg shape changed in our migration but test wasn't updated) - reply-dispatcher.test.ts: 6 fails (pre-existing — tests mock old TeamsHttpStream, not updated for our ctx.stream rewrite) - send.test.ts: 4 fails (NEW from merge — upstream's send.ts changed media loading; our mocks need updating or take upstream's send.test.ts wholesale) UPSTREAM COMMITS POTENTIALLY MISSED (in wholesale-take files): - 08c4af0 fix(msteams): accept conversation id allowlists - e1840b8 fix(msteams): bind global audience tokens to app id - Channels turn-kernel refactor (ffe67e9 / 1ead1b2 / 9a9cd0c) — may be partially preserved in cleanly-patched files Static checks pass: pnpm check:changed is green (typecheck, lint, contract tests, import cycles, etc.). Manual testing required before merge. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * fix(msteams): preserve thread routing for channel and group-chat replies - monitor.ts: adaptSdkContext now uses ctx.reply() for channel and groupChat conversations (so the SDK threads outbound activities to the inbound's replyToId/serviceUrl) and ctx.send() only for personal DMs (where reply()'s blockquote-prepend is ugly). - messenger.ts: sendProactively passes resolvedThreadId on the non-thread fallback path so channel @mentions that fall through outbound.ts -> send.ts still land in the original thread instead of top-level. Live-validated: channel @mention -> bot replies in thread, threaded reply -> bot replies in same thread, no top-level leakage. * fix(msteams): tag outbound SDK calls with OpenClaw User-Agent - user-agent.ts: add buildOpenClawUserAgentFragment() that returns just 'OpenClaw/<version>'. The SDK's Client.clone merges this with its own 'teams.ts[apps]/<sdk-version>' identifier — passing the full buildUserAgent() here would double-print the SDK token. - sdk.ts: pass the fragment via AppOptions.client.headers['User-Agent'] so the Teams backend can identify OpenClaw traffic for usage telemetry. Final UA looks like 'OpenClaw/<openclaw-version> teams.ts[apps]/<sdk-version>'. * fix(msteams): handle StreamCancelledError when user presses Stop mid-stream The new SDK throws StreamCancelledError synchronously from stream.emit/update when the user pressed Stop in Teams: Teams replies 403 to the next chunk update, the SDK flips _canceled, and any subsequent emit() throws. The old custom TeamsHttpStream either swallowed cancel or didn't expose this exception type, so the migration inherited an SDK behavior the original code didn't have to handle. Symptom on 2026-05-05: pressing Stop during a streaming reply caused an unhandled promise rejection that crashed the Node 24 process. Docker restarted the gateway about two minutes after each Stop click. Two related bugs surfaced once the crash was caught: the would-be block fallback re-delivered the full text as a second message (duplicate after Stop), and the typing-keepalive kept pulsing in Teams for the rest of the agent run because nothing told it to stop. reply-stream-controller.ts: - Wrap stream.update / stream.emit / stream.close in try/catch that swallows StreamCancelledError (matched by .name to dodge tsgo's SDK re-export resolution quirk). Latch a wasCanceled flag so subsequent calls short-circuit even if stream.canceled is stale. - preparePayload() returns undefined when the stream was canceled — the streamed prefix is already visible to the user, so dropping the payload prevents a duplicate block message from overriding the cancel intent. reply-dispatcher.ts: - Typing-keepalive gate now also checks streamController.wasCanceled() so typing pulses stop firing once Stop is observed. Otherwise the bot keeps pulsing for the rest of the (uncancellable) agent run. reply-stream-controller.test.ts: - 6 new regression tests cover: cancel-during-emit (the crash scenario), cancel-during-update, cancel-during-finalize, non-cancel error propagation, post-cancel inactivity, and dropped-payload-on-cancel. Live-validated: long streaming reply + Stop mid-stream -> stream freezes, no duplicate message, no zombie typing, container stays healthy. * fix(msteams): allow Bearer-token retry on Skype CDN attachment downloads Teams puts inline DM images and clipboard-pasted images on *.asm.skype.com URLs (e.g. us-api.asm.skype.com/v1/objects/<id>/views/imgo). The download path in attachments/download.ts already does a plain GET first and falls back to a Bearer-token retry on 401/403 — but the retry was gated on the URL being in DEFAULT_MEDIA_AUTH_HOST_ALLOWLIST. asm.skype.com hosts were in DEFAULT_MEDIA_HOST_ALLOWLIST (download permitted) but not in the auth-host list, so a 401 plain-GET response skipped the retry and surfaced as a missing image to the agent. Add asm.skype.com and ams.skype.com to the auth allowlist so openclaw attempts the Bearer-token retry consistently, matching how it treats the other CDN/Bot-Framework hosts already in the list. Note: this does not unblock all clipboard-pasted DM images — for at least some tenants asm.skype.com rejects the Bot Framework token (returns 401 even with auth). Routing those URLs through <serviceUrl>/v3/attachments/... the way openclaw#62219 already handles HTML-wrapped attachments is a separate follow-up. The +button 'Upload from this device' path works today because Teams generates an attachment with an HTML wrapper that triggers the existing BF v3 attachments fallback in monitor-handler/inbound-media.ts. * fix(msteams): align docker-compose msteams port default with plugin default The plugin defaults webhook.port to 3978 (the Bot Framework standard used in Microsoft samples) and listens on whatever the operator sets there. The docker-compose.yml port mapping was exposing ${OPENCLAW_MSTEAMS_PORT:-3000}:3000 which only works for operators who explicitly set webhook.port to 3000. Default-config users would have the plugin listening on 3978 inside the container while compose forwarded 3000, causing connection refused. Realign to ${OPENCLAW_MSTEAMS_PORT:-3978}:3978 so a default-config docker compose up Just Works with Teams. Operators wanting a custom port override both webhook.port in openclaw.json and OPENCLAW_MSTEAMS_PORT env var. * fix(msteams): post-rebase reconciliation with main Three follow-ups after rebasing the SDK migration onto current main: - reply-dispatcher.ts: rename createChannelReplyPipeline to its post-rebase identifier createChannelMessageReplyPipeline (the plugin-sdk barrel renamed it during the 1454-commit rebase window). - reply-dispatcher.ts: tighten the typing-keepalive onStartError signature to (err: unknown) to satisfy upstream's stricter type checks. - messenger.ts: drop the unconditional thread suffix on the bottom proactive fallback. The previous behavior threaded all top-level proactive sends when the stored ref had a threadId, which contradicts replyStyle='top-level' semantics (and breaks the new upstream test). Threading on the proactive path is preserved where it matters — the onRevoked branch within replyStyle==='thread' still passes resolvedThreadId, which is the original openclaw#55198 fix path. - attachments.test.ts: update the warn-call assertion to match the migration's inline message format (host=... error=...) — the structured meta object was being dropped by the logger formatter pre-migration. * feat(msteams): port streaming preview/progress features to ctx.stream While the SDK migration was open, upstream landed preview/progress/draft streaming features built on the OLD custom TeamsHttpStream class (which the migration deletes). This commit ports the user-visible parts of those features onto the new ctx.stream substrate so the migration doesn't lose ground: - pickInformativeStatusText: reads custom labels from msteams.streaming.progressDraft config via resolveChannelProgressDraftLabel. Falls back to the plugin-sdk default rotation. Pre-rebase used a hardcoded 4-string array. - streamMode resolution: "partial" (default, per-token streaming), "progress" (no tokens; preview card carries informative label that updates as tools run), or "block" (no native streaming). Mode is read from cfg.channels.msteams.streaming.preview. - progress-draft gate: createChannelProgressDraftGate gates informative updates so the rotating label only starts firing once meaningful work has begun (avoids flicker before the first tool call). - noteProgressWork() / pushProgressLine(): public methods on the controller for callers (typing keepalive ticks, tool-event callbacks) to signal work. pushProgressLine appends tool names as bullets above the rotating label when streaming.previewToolProgress is enabled. Wiring these into actual tool events is a separate follow-up. - preparePayload progress-mode path: when stream is active but no tokens streamed (progress mode) and a final text payload arrives, emit the text into the stream so the preview card transitions in place to the final reply on close(). reply-dispatcher: pass log + msteamsConfig + a stable progressSeed (${accountId}:${conversation.id}) to createTeamsReplyStreamController so the informative-label rotation is consistent across reconnects. What's NOT ported and why: - Live-edit-via-replaceInformativeWithFinal: the SDK's HttpStream natively accumulates emitted text + entities + channelData and flushes ONE final activity at close() using the same activity id as the preview. So the separate "replace informative with final" call from upstream is unnecessary — we get live-finalization for free via the SDK's design. - pushProgressLine triggers from tool events: needs reply-pipeline-side callbacks the new SDK migration didn't surface yet. Follow-up. Tests: existing 22 reply-stream-controller tests still pass (the new behaviors are additive). * feat(msteams): wire pipeline tool events to streaming progress + fix test debt Two follow-ups from yesterday's stopping point: 1. Wire pipeline events into the stream controller's progress-draft surface. reply-dispatcher's replyOptions now exposes onReasoningStream, onToolStart, onItemEvent, onPlanUpdate, onApprovalEvent, onCommandOutput callbacks that format each event via the channel-streaming helpers and route through streamController.pushProgressLine(). Mirrors the discord adapter's wiring. Also: - resolveChannelStreamingPreviewToolProgress + ...SuppressDefaultTool... so the dispatcher exposes suppressDefaultToolProgressMessages on its replyOptions when progress mode is on. - Switch disableBlockStreaming resolution to the channel-streaming helpers (resolveChannelPreviewStreamMode + resolveChannelStreamingBlockEnabled) so streaming.mode='block' and streaming.block.enabled=true are honored alongside the legacy blockStreaming boolean. 2. Fix the test debt that the rebase exposed: - reply-dispatcher.test.ts: drop the streamInstances + TeamsHttpStream mock pattern (file deleted by migration); replace with a streamMock provided via context.stream that mirrors the SDK's IStreamer shape (update/emit/close/canceled). Update assertions on sendInformativeUpdate -> stream.update, stream.update -> stream.emit. Drop the resumes-typing-between-segments test (no equivalent in the new ctx.stream model — the SDK's HttpStream doesn't have a 'between segments' notion; close ends the stream). - send.test.ts: fix two stale mock targets — loadOutboundMediaFromUrl comes from openclaw/plugin-sdk/outbound-media (not /msteams), and resolveMarkdownTableMode comes from openclaw/plugin-sdk/markdown-table-runtime (not /config-runtime). The previous mock paths were no-ops post-migration. All 854 msteams tests now pass (was 17 failing in 4 files yesterday). * fix(msteams): SDK streaming delta + use app.reply for proactive thread sends Two narrow regressions exposed by the @microsoft/teams.apps migration: - The SDK's HttpStream.emit appends each chunk to its internal buffer (`this.text += activity.text`), but the channel reply pipeline emits cumulative text on each chunk. Forwarding cumulative text into an appending sink produced "chunk1 + chunk1chunk2 + chunk1chunk2chunk3..." duplication for streamed (DM) replies. Track the emitted prefix length in the stream controller and only forward the new tail. - Replace the manual `${convId};messageid=${msgId}` URL construction in the proactive thread fallback with `app.reply()`, which builds the threaded conversation id via the SDK's own toThreadedConversationId helper. Mechanically equivalent today; removes coupling to Teams' URL format and tracks any future SDK changes. Also adds the `reply` method to the structural MSTeamsApp type so the refactor typechecks without casts. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * chore(msteams): bump @microsoft/teams.api and teams.apps to 2.0.10 2.0.10 adds support for the AAD v1 token issuer that the Bot Framework JWT validator needs. The minor version bump pulls teams.cards / common / graph along to 2.0.10 too. Add `@microsoft/teams.*` to `minimumReleaseAgeExclude` in pnpm-workspace.yaml because 2.0.10 was published <48h ago and the default `minimumReleaseAge: 2880` (~2 days) would otherwise reject it. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * revert(msteams): remove asm.skype.com auth-host allowlist additions These hosts were added in dfc169d for inline DM image auth-retry, but the commit's own footnote acknowledges it doesn't actually unblock clipboard-pasted images (asm.skype.com rejects Bot Framework tokens in at least some tenants). The change is unrelated to the SDK migration and the user-visible bug it claimed to fix isn't fixed; lifting it out keeps this PR focused on the migration. Will land as a separate PR if the auth-allowlist consistency improvement is wanted on its own. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * refactor(msteams): typed ExpressAdapter helper, drop unknown-cast pyramid The monitor's SDK bootstrap had an awkward chain: httpServerAdapter: new ( (await import("@microsoft/teams.apps")) as unknown as { ExpressAdapter: new (app: unknown) => unknown; } ).ExpressAdapter(expressApp) as never, Three casts (`unknown`, structural shape literal, `never`) were a defensive workaround from when the SDK's hashed d.ts files tripped up tsgo. With the SDK's exports now resolving cleanly, the same import can be done with full types. - Extend the lazy `loadSdkModules()` cache to include `ExpressAdapter` alongside `App` so the dynamic import is shared. - Add `createMSTeamsExpressAdapter(serverOrApp)` helper in `sdk.ts` that encapsulates the lazy import and returns a properly-typed adapter instance. - Replace `httpServerAdapter`'s structural shape on `CreateMSTeamsAppOptions` with the SDK's own `IHttpServerAdapter` interface (re-exported from `@microsoft/teams.apps`). The call site in `monitor.ts` becomes a single typed call with no `any`, no `unknown`, no `as never`. The lazy-load behavior is preserved: nothing imports `@microsoft/teams.apps` at module load time. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * fix(msteams): unbreak tsgo:extensions on the ExpressAdapter helper CI's check-prod-types failed because the previous commit's typed helper used `typeof import("@microsoft/teams.apps").ExpressAdapter`, which tsc/tsgo's NodeNext resolution can't follow through the SDK's chained `export *` barrel: @microsoft/teams.apps/dist/index.d.ts: export * from "./http"; // folder with index.d.ts export * from "./app"; // single .d.ts file The folder re-export drops `ExpressAdapter` and `IHttpServerAdapter` from the namespace shape under `tsconfig.extensions.json` (passes under the per-extension `tsconfig.json` because of inherited `paths`). Same root cause as why we already model `MSTeamsApp` structurally (line 47 comment). Switch the ExpressAdapter side to the same structural-shape pattern: - Define `MSTeamsHttpServerAdapter` and `MSTeamsExpressAdapterCtor` locally. - Cast `m.ExpressAdapter` once inside `loadSdkModules` (the runtime export is fine; only the type surface is hidden). - `httpServerAdapter` on `CreateMSTeamsAppOptions` and the return type of `createMSTeamsExpressAdapter` use the local structural type. Net result: the call site in `monitor.ts` stays the cast-free single line the previous commit landed; the one remaining cast is confined to the SDK-loading helper with an explanatory comment. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * chore(msteams): drop unused jsonwebtoken/jwks-rsa deps The SDK migration removed all `import "jsonwebtoken"` / `import "jwks-rsa"` from source code (the SDK does JWT validation internally now), but the package.json entries and the matching `package-manifest.contract.test.ts` expectation were left orphaned. Drop both: - `extensions/msteams/package.json`: remove `jsonwebtoken` (^9), `jwks-rsa` (^4) from `dependencies` and `@types/jsonwebtoken` from `devDependencies`. - `src/plugins/contracts/package-manifest.contract.test.ts`: remove the two entries from msteams's `pluginLocalRuntimeDeps` expectation. - `monitor.lifecycle.test.ts`: extend the `./sdk.js` mock with the `createMSTeamsExpressAdapter` export added in the typed-helper cleanup, so the lifecycle suite still mounts after the deps drop. Lockfile regenerates accordingly. All msteams tests (865) pass. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * chore(msteams): drop unused @microsoft/teams.api direct dep CI's deadcode:dependencies (knip) flagged @microsoft/teams.api as unused in extensions/msteams. The plugin source uses structural type aliases (MSTeamsActivityParams, MSTeamsActivityLike, etc.) to dodge tsgo resolution bugs with teams.api's hashed d.ts files, so it never imports teams.api directly. The package is brought in transitively via @microsoft/teams.apps; the only other reference is probe.test.ts's vi.mock("@microsoft/teams.api"), which works on the import-path string and doesn't require a direct dep declaration. Lockfile regenerates accordingly. tsgo:extensions, knip, and all 865 msteams tests pass. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * fix(msteams): clear three CI gate failures (lint, contract, deprecated config API) Three CI checks flagged on the latest run; all three are msteams-local and unrelated to one another: - **check-lint** / **check-additional-extension-bundled**: `oxlint` flagged a redundant `as string[]` assertion in `reply-dispatcher.ts:431`. The preceding `every((s: unknown) => typeof s === "string")` already narrows the array type, so the cast does nothing. Drop it. - **checks-fast-contracts-plugins-c**: the `package-manifest.contract.test.ts` `pluginLocalRuntimeDeps` for msteams still expected `@microsoft/teams.api`, but the deadcode cleanup commit (8f4050f) dropped it from `extensions/msteams/package.json`. Remove it from the contract test too — `teams.api` is only present transitively via `teams.apps`, which is the reason knip flagged it. - **check-additional-runtime-topology-architecture**: the deprecated internal config API guard caught `messenger.ts:223` calling `getMSTeamsRuntime().config.loadConfig()`. Switch to `config.current()` to match the pattern used by phone-control, synology-chat, and matrix. Pre-existing failures on this run that are NOT msteams-related and not caused by this PR: `check-test-types` (errors in `src/agents/openai-transport-stream.test.ts` and `pi-embedded-runner/openai-stream-wrappers.test.ts`) and `macos-swift` (`hoistAwait` in `MacNodeRuntime.swift`). Leaving those for upstream. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * fix(msteams): cast config.current() return to OpenClawConfig The previous commit switched `messenger.ts:223` from the deprecated `config.loadConfig()` to `config.current()` to satisfy the architecture guard, but `config.current()` returns a deeply-readonly type that's not assignable to the `Partial<OpenClawConfig>` parameter `resolveMarkdownTableMode` expects (a mutable type from the SDK contract). Phone-control, synology-chat, and matrix all cast at this seam — adopt the same pattern. Verified locally: tsgo:core, tsgo:extensions, check:architecture, and test:extensions:package-boundary:compile all pass. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * fix(msteams): address PR review — pre-auth body limit, allowlist log level, /api/messages forwarder, narrow release-age exclude Four narrow fixes from the PR review (BradGroux + clawsweeper bot + galiniliev's plan), each its own concern: - **pre-auth-body-limit** (monitor.ts) — install `express.json({ limit: DEFAULT_WEBHOOK_MAX_BODY_BYTES })` before the bearer-presence gate and SDK route. Express memoizes the parsed body on the request, so the SDK's later `json()` becomes a no-op and our limit applies before any handler parses bodies. Closes the gap where a `Bearer garbage`-shaped attacker could force unbounded JSON parsing before token validation. - **allowlist-error-logging** (monitor.ts) — restore main's `runtime.error` level for the `msteams resolve failed` catch (was downgraded to `runtime.log` mid-merge). Graph allowlist resolution failures are security-relevant; they need to surface to operators. - **legacy-messages-route** (monitor.ts) — when `webhook.path` is set to a custom value, also accept POSTs on the legacy `/api/messages` path with a one-time deprecation warning, then re-enter the Express middleware chain on the configured path. Keeps existing Azure Bot registrations working through the transition. Cast-free (`expressApp(req, res, next)` works because `Application extends IRouter extends RequestHandler`). - **release-age-scope** (pnpm-workspace.yaml) — narrow `@microsoft/teams.*` glob to the single direct dep `@microsoft/teams.apps`. Future scoped packages no longer get a freshness-guard pass. Tests + checks: msteams suite (867), tsgo:core, tsgo:extensions, tsgo:test, lint:extensions, check:architecture, knip --dependencies, package-manifest contract, all green. Still pending from the review (separate commits): - auth-coverage-tests (Brad #1 + comment) — tests proving the SDK accepts `aud=<bot app id>` and rejects `aud=api.botframework.com`. - invoke-response-handling (Brad #2, codex P2) — file-consent invoke ack must return through the SDK invoke handler, not `ctx.sendActivity`. - stream-failure-fallback (codex P2, galin F5) — `streamFailed` latch so partial streams fall back to block delivery on non-cancel errors. - serviceurl-routing (Brad #4, codex P2) — proposed rebuttal pending empirical confirmation that `smba.trafficmanager.net/teams` routes to non-default-region conversations. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * test(msteams): lock SDK auth contract — aud + v1/v2 issuer coverage Adds extensions/msteams/src/auth-coverage.test.ts driving ServiceTokenValidator and createEntraTokenValidator directly with jose-minted RS256 tokens against an in-memory JWKS (via JwksClient.prototype patch). Locks in the three contract cases @BradGroux flagged on openclaw#76262: aud=<bot app id> accepted, aud=api.botframework.com rejected even when appid/azp match, and v1/v2 issuers accepted for allowed tenant (disallowed tenant rejected). Drops a stale ambient module declaration in src/types/microsoft-teams-sdk.d.ts that was shadowing the SDK's real jwt-validator types with a long-renamed createServiceTokenValidator surface. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * fix(msteams): route file-consent invokes through typed app.on, drop broken invokeResponse send Brad #2 / codex #4 on PR openclaw#76262 — `ctx.sendActivity({ type: "invokeResponse", ... })` no longer reaches Teams as an HTTP InvokeResponse on the new SDK; it becomes an outbound Bot Framework activity instead. Move file-consent accept/decline to typed `app.on("file.consent.accept|decline", ...)` handlers. The SDK's typed-route layer wraps a void return into `{ status: 200 }` (`app.process.js:130`), so the manual ack disappears. While in here, type `MSTeamsApp.on` properly. Borrowing the SDK's `App.on` directly fails because that function carries a `this: App<TPlugin>` constraint our structural alias can't satisfy, so we model an equivalent generic over `IRoutes` with route-specific overloads (`card.action`, `file.consent.*`, `activity`). The overloads work around a tsgo bug — the `@microsoft/teams.api` `Activity` discriminated union collapses to `any`, turning `ActivityRoutes` into a `[string]: RouteHandler<X, void>` index signature that swallows every typed `Out` not already void-compatible (card.action returns `AdaptiveCardActionResponse`; the others happen to include `void`). Real tsc resolves cleanly. Linked upstream: https://github.com/microsoft/typescript-go/issues/1057. Other cleanups: - Cast-free call sites for `adaptSdkContext` (now returns `MSTeamsTurnContext` instead of `unknown`). - card.action error responses include `innerHttpError` per the SDK's `HttpError` shape requirement. - Activity catch-all also skips `fileConsent/invoke` now that it's typed-routed (parallel to the existing `adaptiveCard/action` skip). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * fix(msteams): route SSO sign-in invokes through typed app.on, drop broken invokeResponse send Brad #2 / codex #4 on PR openclaw#76262, SSO half. Continue the typed-route migration: `signin/tokenExchange` and `signin/verifyState` now register via `app.on("signin.token-exchange" | "signin.verify-state", ...)`. Per the SDK's router, registering a user route with the same name as a system route removes the system default — so the SDK's built-in handlers (which would call `api.users.token.exchange` themselves and emit a `signin` event nobody currently subscribes to) are silenced, and only ours runs. The SDK wraps a void return into the HTTP 200 InvokeResponse, so the legacy `ctx.sendActivity({ type: "invokeResponse", ... })` ack — broken on the new SDK because it becomes an outbound BF activity instead of the HTTP response — is gone. The handler body is extracted from the activity-catch-all dispatch in `monitor-handler.ts` to a new `signin-invoke.ts`, parallel to `file-consent-invoke.ts`. `isSigninInvokeAuthorized` is now exported from `monitor-handler.ts` so the new handler can reuse it. The activity catch-all skips the SSO invoke names alongside the existing skips for `adaptiveCard/action` and `fileConsent/invoke`. `MSTeamsAppOn` overloads now cover the two SSO routes with their typed ctx (`ISignInTokenExchangeInvokeActivity` / `ISignInVerifyStateInvokeActivity`). Tests in `monitor-handler.sso.test.ts` were rewritten to call the extracted handler directly — the `registered.run(ctx)` shape no longer covers SSO, and the `expect(ctx.sendActivity).toHaveBeenCalledWith({ type: "invokeResponse" })` assertions were dropped to match the new contract (the SDK ack happens via the typed-route return value). Note on overlap with openclaw#77784 (Stefan Stüben, Microsoft): that PR is doing a much bigger SSO rework (sign-in card / sign-in-link / six-digit-code fallbacks plus a `ctx.auth` plumbed to plugin tools). This change is the small migration-correctness fix and is structured so openclaw#77784's SSO body changes drop into the typed-route registrations cleanly on rebase. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * fix(msteams): route message-submit (feedback) invokes through typed app.on Last invoke off the activity catch-all dispatch. `message/submitAction` (thumbs up/down on AI-generated messages) now registers via `app.on("message.submit", ...)`. Same shape as file-consent and SSO: handler body extracted to a new `feedback-invoke.ts`, the SDK wraps a void return into the HTTP 200 InvokeResponse, the broken `ctx.sendActivity({ type: "invokeResponse", ... })` line is gone, and the activity catch-all skips this invoke name alongside the others. `isFeedbackInvokeAuthorized` is exported from `monitor-handler.ts` so `feedback-invoke.ts` can reuse it. Tests in `monitor-handler.feedback-authz.test.ts` were rewritten to call the extracted handler directly — the old `handler.run(ctx)` shape no longer intercepts feedback, and `originalRun` was removed because the typed route is the dispatch point now. `MSTeamsAppOn` overload added with the typed `IMessageSubmitActionInvokeActivity` ctx, slotted between the SSO overloads and the `activity` catch-all so `activity` stays last. This leaves only `message`, `conversationUpdate`, and `messageReaction` flowing through `app.on("activity", ...)` → `handler.run`. Promoting those is the path to deleting the catch-all entirely. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * fix(msteams): fall back to block delivery when partial-mode stream fails mid-flight codex #5 / Galin F5 on PR openclaw#76262. `reply-stream-controller.ts` previously re-threw any non-cancel error from `stream.emit` during partial streaming and from `stream.emit`/`stream.close` during finalize. Combined with `preparePayload` suppressing block delivery once `tokensEmitted` was true, that meant a network blip or API error mid-stream produced a truncated reply with no recovery — the user saw the prefix that made it through and nothing else. Add a `streamFailed` latch parallel to `canceledLocally` / `tokensEmitted`: - `onPartialReply`: catch non-cancel errors, set `streamFailed = true`, log a warn, don't propagate (the pipeline must keep running so `preparePayload` can decide). - `preparePayload`: when `tokensEmitted && streamFailed`, fall through to block delivery instead of suppressing. The user may see a duplicate (streamed prefix + full block reply); intentional — matches the pre-migration `TeamsHttpStream.hasContent` recovery and is better than truncated-only. - `finalize`: same latch + warn on non-cancel close failure, swallow rather than throw. The streamed content already reached the user; the closing activity (AI-Generated marker, feedback channelData) is the only loss, not worth blowing up the dispatcher. - `isStreamActive` returns false once the stream has failed. New tests cover crash-mid-stream after tokens were emitted (assert block delivery payload is returned), happy-path no-duplicate behavior (assert `preparePayload` still suppresses when nothing failed), and finalize close-failure (assert no throw). The pre-existing "re-throws non-cancel" test was inverted to assert non-throwing latch behavior. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * fix(msteams): declare @microsoft/teams.api as a runtime dependency Type-only `import("@microsoft/teams.api/dist/...").TypeName` references in `sdk.ts` (added when typed `MSTeamsApp.on` overloads were introduced) are picked up by the `extension-runtime-dependencies` contract test as genuine runtime imports. Declaring `@microsoft/teams.api` as a direct dep makes the contract pass; the package was already coming in transitively via `@microsoft/teams.apps`. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * fix(msteams): keep SSO on SDK signin routes * test(msteams): avoid redundant signin handler assertion * docs(msteams): clarify Teams cloud support * fix(msteams): use current SDK string helper * fix(msteams): gate SDK invoke side effects * test(msteams): avoid implicit any in lifecycle tests * fix(msteams): preserve SDK user agent and matrix check * fix(msteams): expose SDK common dependency * fix(msteams): use SDK user agent merge * fix(msteams): fall back when stream close no-ops * chore(msteams): drop unrelated merge artifacts * chore(msteams): restore unrelated main files * chore(msteams): restore unrelated main files * chore(msteams): restore unrelated main files * test(msteams): type stream close mock result * fix(msteams): configure Teams cloud service URL * chore(msteams): refresh shrinkwrap * chore(deps): refresh shrinkwrap locks * chore(ci): rerun guards after main sync * chore(deps): refresh shrinkwrap for node 24 * chore(config): refresh docs baseline * fix(msteams): preserve Teams SDK proactive references * fix(msteams): harden SDK proactive sends * fix(msteams): align service url contract * test: fix bonjour beacon type narrowing * fix(msteams): ignore ambient service url * fix(msteams): fall through submit invokes * test: align shrinkwrap override policy with Teams SDK deps * fix(msteams): ack invoke routes promptly * fix(msteams): support china cloud boundaries * test: sync PR with current CI gates * test: isolate channel setup registry metadata --------- Co-authored-by: Claude Sonnet 4.6 <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
amittell
pushed a commit
that referenced
this pull request
Aug 14, 2026
… errors (openclaw#122624) * fix(codex): read canonical transcript session targets (#1) * test(slack): reproduce reconnect timer surviving shutdown * fix(slack): keep reconnects within one socket lifecycle * test(slack): exercise native reconnect over loopback * test(slack): satisfy reconnect integration checks
amittell
pushed a commit
that referenced
this pull request
Aug 14, 2026
* fix: stop bundled plugin startup refresh loops * feat: continue web sessions in the terminal (openclaw#122870) * feat: continue sessions in terminal Add a credential-free Control UI continuation command and allow openclaw resume to reuse current-profile authentication only for byte-exact configured Gateway targets. * fix(gateway): separate public origin TLS ownership Allow exact public-origin resume targets to reuse local authentication without inheriting the direct local listener certificate fingerprint. * fix(gateway): scope exact targets to gateway mode Prevent remote profiles from reusing dormant local Gateway authentication for explicit loopback or public-origin targets. * fix(cli): encode terminal resume handoffs Replace shell-specific quoting with a strict credential-free base64url handoff, gate configured auth reuse to validated handoffs, and skip unused session discovery. * fix(gateway): isolate handoff auth identity Suppress ambient Gateway auth fallback for validated handoffs while preserving explicit credentials, configured SecretRefs, stored device auth, and exact-target TLS ownership. * fix(cli): harden terminal resume handoffs * fix(cli): parse terminal handoff outcomes * fix(cli): bind handoffs to resolved agent * test(ui): align terminal continuation proof * docs(plan): track terminal continuation * refactor(ui): keep terminal handoff result local * fix(ui): keep composer capability menus within the viewport (openclaw#122296) * fix(ui): constrain composer capability menus * fix(ui): cap composer capability menu height * test(ui): cover long capability menu states * test(ui): capture capability menu interaction states * fix(ui): keep dark capability states legible * test(cron): focus runtime config composition (openclaw#122867) Co-authored-by: Amp <[email protected]> * feat(cli): allow editing automation display names (openclaw#122702) * feat(cli): allow editing automation display names * feat(cli): allow clearing automation display names * fix(ui): show progress during new session startup (openclaw#122713) * fix(ui): show progress during new session startup Refs openclaw#122703 * oc-1fa: keep new-session progress through handoff * fix(ui): keep new-session handoff live * fix(ui): preserve navigation callback contract * fix: make live updater checkout portable (oc-237) (openclaw#122873) * refactor(media): remove orphan generation facades (openclaw#122874) * refactor(agents): split subagent-control.ts into owner modules (openclaw#122875) * fix(ui): archived sessions leave sidebar after navigation (openclaw#122876) * oc-ad0.1: fix archived child session retention * oc-37c: evict archived child on navigation * fix(ci): expose AI pack diagnostics (openclaw#122786) * fix(recovery): reclaim proven-stale reply-only ownership with zero queued backlog (openclaw#122265) * fix(recovery): reclaim proven-stale reply-only ownership with zero queued backlog Stuck-session recovery kept reply-only ownership forever when the queued backlog was empty: isActiveRunProgressStale short-circuits to false at queueDepth 0, so stale active_reply_work was never reclaimed even after the durable session became killed. Evaluate staleness for reply-only ownership without the queue gate (the gate stays for run-handle paths), so proven-stale reply work expires through the existing abort-and-drain owner path while global-lane and deferred-maintenance exemptions and live reply work with recent progress are preserved. Closes openclaw#122227 * fix(recovery): keep maintenance phases out of zero-backlog stale reclaim The zero-backlog reclaim path (requireQueueBacklog: false) applied to every reply-only operation, including preflight_compacting and memory_flushing. Those phases are explicitly recognized as compaction and may honor a configured timeout above the stale threshold, so a valid long-running maintenance operation could be force-cleared early. Restore the queue-backlog guard for the maintenance phases so an unqueued compaction or memory flush is never reclaimed by this path; ordinary reply-only ownership keeps the zero-backlog expiry. Adds regressions for both maintenance phases. * fix(ci): ignore zombie-only Vitest process groups (openclaw#122759) * test(agents): scope extension fixtures to explicit owners (openclaw#122883) * ci: fingerprint preferred pnpm hooks (openclaw#122852) Co-authored-by: Amp <[email protected]> * fix(ci): record startup JS growth in the Control UI budget baseline Startup JS gzip reached 329483 B on main (build-artifacts, af49764), 1198 B over the 328285 B baseline + 1024 B tolerance, after cumulative chat/session UI growth landed in openclaw#122296, openclaw#122713, openclaw#122870, and openclaw#122876. Record the CI-measured bytes (within the 4096 B ratchet) to restore green build-artifacts and QA Smoke lanes. * fix(codex): keep sessionless mirror warnings out of onboarding (openclaw#122831) * fix(codex): skip mirrors for sessionless runs * fix(codex): restore openai model provider on media understanding turns PR openclaw#122163 made thread/start modelProvider caller-supplied and updated the web-search caller but missed media understanding, breaking its tests on main full runs (cross-lane gap). Pass the provider explicitly and export the retire binding prod now touches from the shared-client test mock. * test(codex): align prompt assertions with reworded guidance PR openclaw#121522 reworded the Skill Workshop guidance and cd7b7f6 reworded the message-tool final-reply text; both updated core tests but missed these codex mirror assertions (cross-lane gap breaking main full runs). * test(codex): scope agent-projection fixture session to its agent PR openclaw#114388 made multi-agent session ownership explicit; the atlas-scoped projection test still used the shared main-scoped session key and now trips AgentSelectionRequiredError (fourth cross-lane escape on main). * fix(telegram): prevent multi-agent startup migration false positives (openclaw#122877) * fix(telegram): resolve legacy state owners explicitly * docs(changelog): note Telegram migration ownership fix * Revert "docs(changelog): note Telegram migration ownership fix" This reverts commit e02962eb4b2e2475854adf8c2a2915bcfd1cf65a. * fix(reef): redact relay errors containing credentials (openclaw#119603) * feat: let limited browsers request admin access (openclaw#121459) * feat(gateway): add live device scope upgrades * feat(ui): add limited-access upgrade flow * fix(protocol): refresh Swift scope upgrade models * perf(ui): lazy-load device scope upgrades * fix(ci): complete scope upgrade generated surfaces * perf(ui): lazy-load GitHub link hovercards * fix(ui): keep admin repair guidance focusable * fix(ui): gate and refresh scope upgrade banner * refactor(ui): keep gateway client within line budget * fix(ci): align rebased scope upgrade checks * fix(ui): resolve scope upgrade in browser tests * fix(gateway): honor refreshed scope upgrade deadline * fix(gateway): honor refreshed scope upgrade deadline * fix(gateway): coalesce scope upgrade waiters * fix(ui): gate scope upgrade actions * chore(plugin-sdk): refresh rebased API baseline * fix(scope-upgrade): return canonical request ids * fix(ui): preserve gateway event type binding * fix(protocol): generate scope upgrade result models * fix(ui): preserve scope upgrade recovery guidance * chore(plugin-sdk): refresh rebased API baseline * test(ui): avoid scope upgrade navigation race * docs(control-ui): clarify scope upgrade approver * test(gateway): align appended method counts * chore(plugin-sdk): refresh rebased API baseline * refactor(ui): keep place picker within line budget * chore(plugin-sdk): refresh rebased API baseline * chore(plugin-sdk): refresh rebased API baseline * chore(plugin-sdk): refresh rebased API baseline * chore(plugin-sdk): refresh rebased API baseline * chore(plugin-sdk): refresh rebased API baseline * chore(plugin-sdk): refresh rebased API baseline * chore(plugin-sdk): refresh rebased API baseline * chore(plugin-sdk): refresh rebased API baseline * chore(plugin-sdk): refresh rebased API baseline * chore(plugin-sdk): refresh rebased API baseline * chore(plugin-sdk): refresh rebased API baseline * fix(gateway): preserve scope-upgrade browser origin * fix(matrix): retain previews when replacement delivery fails * test(matrix): tighten replacement proof * test(matrix): bind live replacement marker * test(matrix): type redaction ledger * test(matrix): observe nonvisible cleanup * fix(matrix): retain visible drafts on handler abort * test(commands): stub plugin metadata snapshot in onboard-inference test (openclaw#122901) The configured-model case lacked a current plugin metadata snapshot, so model normalization cold-discovered every bundled manifest; the prepared empty snapshot keeps the test on its intended boundary and reduced Vitest file wall time from 26.72s to 2.57s (the shell measurements were 194.45s and 56.21s including unrelated lock queues). * docs(skills): document session and transcript fetching in openclaw-debugging (openclaw#122904) Adds a Fetching Sessions and Transcripts section: sessions CLI first, then the per-agent SQLite data plane (session_nodes lookup from chat URL fragments, transcript_events shape, __openclaw sender provenance, session_transcript_fts, media://inbound mapping) and a dependency-free node:sqlite read-only recipe for hosts without sqlite3. Read-only-against- live-gateway rule stated inline. * fix: preserve compaction history when final audit fails * fix: redact compaction rejection diagnostics * fix: redact compaction retry errors * fix: isolate compaction structure audit * fix(ui): preserve picked image previews (openclaw#122905) Fall back to stored attachment data URLs when object URL previews are unavailable in the shared composer surface. * fix(zalo): keep packaged setup wizard loadable (openclaw#122902) * fix(zalo): package setup runtime surface * fix(tooling): track setup surface artifacts * fix(ci): run affected extension suites when changed-test planning falls back (openclaw#122885) The PR-changed test planner fails safe to the compact full-suite plan for any diff touching packages/**, but that compact plan excludes all extension test configs, so mixed package+extension PRs landed with zero extension test execution (escapes: PR openclaw#120534 breaking extensions/codex run-attempt.native-hook-relay.test.ts, PRs openclaw#122163/openclaw#121522 and cd7b7f6 breaking media-understanding-provider.test.ts and thread-lifecycle.test.ts on main full runs). The preflight now appends whole-config shards for the diff's touched extensions whenever the precise plan fails safe; whole configs (not precise targets) because the fail-safe cause leaves the non-extension diff's extension impact unbounded. * fix(gateway): resolve agent list model identity (openclaw#122907) Publish canonical resolved primary models with matching runtime and thinking metadata in agents.list. * test(microsoft-foundry): remove global test bridge (openclaw#122881) * test(microsoft-foundry): remove global test bridge * test(microsoft-foundry): type boundary fixtures * perf(ui): keep route transition out of startup * fix(e2e): verify suspend control over WebSocket (openclaw#122888) * fix(slack): prevent duplicate Socket Mode connections after reconnect errors (openclaw#122624) * fix(codex): read canonical transcript session targets (#1) * test(slack): reproduce reconnect timer surviving shutdown * fix(slack): keep reconnects within one socket lifecycle * test(slack): exercise native reconnect over loopback * test(slack): satisfy reconnect integration checks * fix(msteams): honor inbound channel media limit (openclaw#122315) * fix(msteams): honor inbound channel media limit * test(msteams): update lifecycle runtime mock * style(msteams): avoid resolver config shadowing * style(msteams): format lifecycle resolver mock * refactor(msteams): inline media fallback --------- Co-authored-by: DanielCardenas <[email protected]> Co-authored-by: Jason (Json) <[email protected]> * improve: speed up CLI spawn tests (openclaw#122891) * test(agents): trim cli spawn test imports * test(agents): distinguish prerelease policies --------- Co-authored-by: Amp <[email protected]> * fix(plugins): repair status and CLI fixtures (openclaw#122925) * fix: internal recovery prompts appear as operator-authored messages (openclaw#122908) * fix(agents): hide recovery prompts from transcripts Suppress settled-turn finalization and reasoning/empty-response control prompts at the session writer boundary. * test(agents): align hidden recovery prompt expectations * fix(ci): rotate stale dependency snapshot (openclaw#122921) Co-authored-by: Amp <[email protected]> * docs(gateway): clarify dynamic operator scopes (openclaw#122931) * fix: code mode dead-ends on oversized tool results instead of returning bounded output (openclaw#122924) * fix(agents): bound code mode bridge results Return oversized bridge, guest output, and final values as bounded successful projections with actionable narrowing guidance. * refactor(agents): absorb code mode output bounds * fix(ci): prevent channel add command test timeout (openclaw#122879) * test(channels): isolate add env setup contracts * test(channels): cover adapter env setup * fix(parallels): preserve plugin inventory during updates (openclaw#122912) * fix(parallels): preserve plugin inventory during updates * fix(parallels): preserve dev update plugin inventory * fix(ui): contain OAuth wizard modal content (openclaw#122892) * fix(ui): contain OAuth wizard modal content * test(ui): poll OAuth modal containment * refactor(ai): internalize ChatGPT SSE protocol (openclaw#122930) * feat(ui): show useful environment facts in the picker (openclaw#122923) * feat(ui): show environment facts in Where picker Preserve environment platform, trust, session-host, and capability metadata through new-session discovery while keeping placement availability tied to live executable nodes. Render bounded quiet device/cloud facts and add mocked browser coverage for task openclaw#33. * docs(plan): track picker environment facts * refactor(ui): split place browser rendering * docs(agents): require screenshot/video proof for UI-visible and gateway-behavior changes (openclaw#122920) Adds hard policy: UI-visible changes need before/after screenshots or a short video as PR evidence; gateway-behavior changes provable in the Control UI need an isolated dev-gateway live run with a recorded video. Documents the verified video upload flow (user-attachments endpoint, mp4/webm both served) and the bare-URL embed rule for GitHub's player. * fix(tools): preserve partial web fetch status (openclaw#122866) * fix(ui): deliver failed steer retries as a new turn when the session is idle (openclaw#122919) A steer rejected on the run/leaf fence parks as a failed steered queue row. Retry previously refused whenever the target run was gone, leaving the user's message permanently stuck with 'that run is no longer active'. Retry now converts the parked row into a plain queued send when the session is idle, so the text delivers as a fresh turn; active-run retries keep the original steer binding, and disconnected retries keep the existing error. * fix: stopping a session leaves subagents running with no stop control (openclaw#122909) * fix(gateway): cascade session stop to subagents Cascade exact and session-wide aborts through the subagent registry and keep Control UI Stop visible while descendants remain active. * refactor(gateway): absorb stop cascade orchestration * chore(gateway): refresh plugin SDK API contract for abort refactor Regenerates the export-closure contract after the stop-cascade refactor moved gateway abort orchestration exports, and drops a redundant Boolean() wrapper flagged by lint. Public SDK surface gate is unchanged. * chore(gateway): regenerate plugin SDK API baseline * fix(qa): preserve Code Mode reads in model-switch mock (openclaw#122935) * fix(ci): prevent flaky extension wrapper SIGTERM test (openclaw#122917) * test(scripts): wait for valid wrapper pids * test(scripts): harden PID marker reads * fix: session model selection replaced by response aliases and fallback wins (openclaw#122910) * fix(agents): keep session model selection canonical Preserve configured session model identity across response aliases and turn-local fallbacks. * fix(gateway): align session model projection consumers * test(gateway): mark session event model selection * test(gateway): stabilize sender avatar fixture (openclaw#122942) * perf(test): cut workflow guard import overhead (openclaw#122940) Co-authored-by: Amp <[email protected]> * test(extensions): remove duplicate runtime replays (openclaw#122949) * fix(ui): fence stale recovery scope work (openclaw#122944) * docs(deploy): add verification, cost, observability, and troubleshooting to the Cloudflare guide (openclaw#122932) The template shipped without the operator-facing half: no way to prove the restore path works before depending on it, no cost signal for the always-on versus webhook-only choice, no log surfaces, and no failure-mode index. Adds an architecture diagram, a restore rehearsal, measured recovery numbers from the real-R2 proof, provisioned-resource cost guidance, wrangler tail observability, and a troubleshooting index covering image architecture, Litestream S3 credentials, the startupz/readyz split, and ephemeral-disk config loss. * fix: prompt caching breaks on Claude Opus 5 and Sonnet 5 (openclaw#121283) * fix: prompt caching breaks on Claude Opus 5 and Sonnet 5 shouldPreserveThinkingBlocks() matched modern Claude ids with a hardcoded family list plus /claude-[5-9]/ future-proofing. That regex assumes the generation follows the prefix (claude-5-x), but shipped generation-5 ids place the family in between (claude-opus-5, claude-sonnet-5, claude-mythos-5), so none matched and dropThinkingBlocks flipped to true. Signed thinking blocks were stripped from replayed history, diverging every request and invalidating the Anthropic prompt cache on the default opus/sonnet aliases. Read the generation from the id instead, preserving blocks for generation 4 and newer. This handles both id shapes and matches the idiom already used in audit-extra.sync.ts and live-model-filter.ts. Closes openclaw#121251 * fix: correct Claude thinking replay contract Use the canonical Claude model identity and exact Anthropic preservation contract when deciding whether replay may retain prior thinking blocks. Carry deployment metadata through provider-family and fallback paths, and include canonicalModelId in the transcript policy cache key. Release note: Restore prompt-cache reuse for Claude Opus 5 and Sonnet 5 while continuing to strip unsupported Sonnet and Haiku 4.5 thinking history. * refactor: remove unused replay compatibility helper Use the canonical Claude drop predicate at the remaining test call sites and remove the unconsumed preservation export so the dependency/dead-code gate stays clean. * fix: keep Claude replay contract internal Use canonical llm-core identity resolution without exporting a new llm-core capability, avoiding unintended Plugin SDK API drift. --------- Co-authored-by: FullerStackDev <[email protected]> * fix(sessions): highWaterBytes 0 no longer deletes all session history (openclaw#119909) * fix(sessions): zero highWaterBytes no longer clears all session history resolveHighWaterBytes passed an explicit non-positive highWaterBytes through verbatim. The resolved value is the disk-budget cleanup loop's stop condition, so a zero target made enforce mode evict every unprotected session and prune its extracted archives instead of trimming to the documented 80% default. Route the non-positive case to the function's existing unusable-value branch (computeDefault). Not null: that disables the budget and permits unbounded growth, which is right for a cap but wrong for a target. Sibling of openclaw#119422, which fixed the same harm for maxDiskBytes and guarded only resolveMaxDiskBytes. * test(infra): isolate worktree migration discovery Keep worktree migration coverage focused on its real filesystem, Git, and SQLite owner while avoiding unrelated channel and plugin doctor cold starts on fork CI. Co-authored-by: masatohoshino <[email protected]> * test(ci): carry owner-approved SDK and doctor gate repairs Carry the already-approved plugin SDK contract manifest and focused doctor-flow test isolation from the maintainer-owned CI repair. Preserve real config migration, persistence, snapshot, and SQLite cleanup coverage; no production behavior changes. Co-authored-by: masatohoshino <[email protected]> * fix(sessions): use the renamed withTestDir helper in the new budget test * fix(sessions): align high-water zero contract * style(sessions): format high-water changes --------- Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: FullerStackDev <[email protected]> * fix(ui): model picker shifts when another user starts typing (openclaw#122809) * fix(ui): keep composer model picker stable while typing * test(ui): prove typing keeps model picker stable Co-authored-by: Colin Johnson <[email protected]> --------- Co-authored-by: Peter Steinberger <[email protected]> * feat(ui): split new session place picker (openclaw#122938) * feat(ui): split new session place picker * test(ui): cover three-chip session picker * fix(gateway): allow downloading zero-byte artifacts (openclaw#122928) * fix(gateway): preserve zero-byte artifacts * fix(gateway): keep non-string data out of artifact lists * test(gateway): compact zero-byte artifact coverage * feat(ui): open subagent details in chat sidebar (openclaw#122941) * feat(ui): open subagent details in chat sidebar * chore: drop changelog edit (release generation owns it) * refactor(ui): drop duplicate close in subagent detail panel The sidebar region header already owns a Close Details control in both wide and narrow layouts; the panel-local X duplicated it 40px away. * fix(ui): stop subagent transcript loader when pane presentation retires Pane retention wipes sidebarContent directly, so the detail slot's render-time reset can never run again; a pending refresh timer plus incoming task events kept refetching chat.history for a hidden panel. * docs(ui): note close-control ownership in subagent detail header * fix(ui): break transcript renderer import cycle * fix(ui): use shared action cursor for subagent rows * fix: install or review the publisher you picked when ClawHub skills share a slug (openclaw#121697) * fix(skills): keep ClawHub publisher identity from search through install ClawHub search returns one entry per publisher, so several results can share a slug. Every client collapsed the selection to that bare slug before calling skills.detail and skills.install, and ClawHub answered 409 AMBIGUOUS_SKILL_SLUG with no in-product way forward. searchClawHubSkills now records the publisher-qualified reference once, on the result that carries it, and the Gateway protocol documents it. skills.detail parses the same reference grammar skills.install already accepted, so review and install cannot resolve to different publishers. Control UI carries that one reference through row actions, detail, busy state, and acknowledgement retries, and shows it so otherwise identical rows are distinguishable. Fixes openclaw#117633 * fix(apps): send the ClawHub publisher reference from native skill browsers macOS, iOS, and Android read the qualified reference from search results and use it for skills.detail, install, busy state, installed matching, and list identity, so two publishers sharing a slug stay distinct instead of collapsing into one ambiguous request. * fix(skills): refuse external-source skill detail instead of reading a same-slug skill ClawHub has no source-qualified read endpoint, so a skills-sh reference parsed down to its bare slug would have returned a registry skill's card while install resolved the external artifact. Review and install could name different skills. skills.detail now fails closed on any reference that carries a source, and the macOS and AgentPro rows show the publisher reference next to the summary instead of only when a summary is missing, so same-slug rows stay distinguishable. * chore(apps): refresh native i18n source baseline for the skill row references * refactor(skills): drop the unread search-result ownerHandle field installRef is the one reference clients send back, and no client reads the publisher handle separately, so the protocol and Control UI carry one field instead of two. * fix(skills): name the next step when external skill detail is refused Clients that gate install behind a successful review would otherwise see only a refusal, so the error names the direct install path and the CLI equivalent. * fix(macos): use a doc comment on the ClawHub row subtitle swift-format's docComments rule requires doc comments on declarations; the subtitle property carried a regular comment and failed macos-swift. * fix(skills): carry ClawHub trust state to clients that can install Forwarding installRef let clients install the exact publisher the operator picked, including external skills-sh sources. It did not forward the trust state that says ClawHub never scanned that source, so iOS AgentPro — the one surface that installs in a single tap with no review step — could install an unscanned artifact with nothing on screen saying so. The CLI already labels these (docs/clawhub/cli.md, docs/cli/skills.md); native clients could not, because trustState was never on the wire. trustState becomes an optional field on SkillsSearchResultSchema. It is purely additive: older clients ignore an unknown key and the field is absent for registry results, so downgraded readers are unaffected and no protocol version moves. Every client that renders a search row now shows "Not scanned by ClawHub", matching the CLI wording exactly: iOS AgentPro in the row above the install button, macOS and Android beside the review action, and Control UI on the row that explains why review is refused for these sources. Covered by a wire assertion that the state reaches clients for an external source and stays absent for registry rows, plus decode-and-label tests on the shared Swift kit and the Android parser, and a Control UI render assertion. * fix(ui): size the ClawHub detail dialog to a refusal message Refusing detail for an external source made an error-only dialog reachable. The shared preview panel reserves a tall reader height for skill documents, so a two-line refusal rendered in a mostly empty dialog and read as broken rather than deliberate. Found by inspecting the review captures. * revert(ui,apps): drop the ClawHub trust label layer Maintainer product decision: skills.sh runs its own scanners, so OpenClaw does not add a second alert layer in the apps. Removes the label from Control UI, iOS, macOS and Android, and drops the trustState wire field that nothing would render. The CLI keeps its existing label; changing that is a separate call. Publisher identity, the fail-closed detail refusal, and the message-only dialog are unchanged. Splits the oversized skills view test file to satisfy max-lines without a suppression. * test(ui): fix ClawHub skill fixture checks * chore(plugin-sdk): refresh API baseline --------- Co-authored-by: Patrick Erichsen <[email protected]> * oc-e35: restore explicit multi-agent UI ownership (openclaw#122889) * fix(agents): hydrate CLI images from agent workspaces (openclaw#122684) * fix(agents): hydrate CLI images from agent workspace * fix(agents): preserve resolved CLI workspace owner * fix(agents): keep workspace owner in prepared params * fix(agents): resolve CLI owner before preparation * fix(agents): preserve CLI runtime policy owner --------- Co-authored-by: Adkid-Zephyr <[email protected]> Co-authored-by: FullerStackDev <[email protected]> * fix(ai): honor embedded transport policy (openclaw#122946) * refactor: remove residual normalization aliases (openclaw#122956) * refactor: remove residual normalization aliases * test(gateway): isolate approval authority handshake * fix(qa): isolate staged auth state (openclaw#122958) * fix(wizard): honor gateway overrides in manual flow (openclaw#122961) * refactor(config): retire dead streaming.progress.render key (openclaw#122927) * refactor(config): retire dead streaming.progress.render key The key had zero runtime consumers after openclaw#122552. Core doctor now strips it via stripRetiredTuningKnobs, and production LOC is net -13. * fix(tooling): pin plugin SDK surface counts to the reduced export set The retired progress-draft render reader counted twice via channel-outbound and channel-message's wildcard re-export. * fix(projects): avoid stale GitHub results after token rotation (openclaw#122613) * fix(projects): avoid stale GitHub results after token rotation * fix(gateway): scope GitHub caches by credential * style(gateway): format GitHub credential scope --------- Co-authored-by: FullerStackDev <[email protected]> * fix(cli): avoid restart hint for unchanged config (openclaw#122953) * fix(cli): avoid restart hint for unchanged config * docs(cli): clarify no-op restart guidance * fix(onboard): allow imports after runtime scaffolding (openclaw#122967) * fix(cli): fail fast when onboarding profile is busy (openclaw#122968) * fix: GitHub project selection cloned repos before Start Session (openclaw#122906) * fix(ui): defer GitHub project clone until submit Keep remote project selection as draft state and materialize it before sessions.create on Start Session. * fix(ui): consolidate deferred project selection * test(ui): drop duplicate remote project assertion * fix(deploy): repair probes that silently pass and a blueprint that cannot boot (openclaw#122963) Three defects proven by running the shipped configs: Kubernetes probes checked only the status code against /startupz, but the pinned image predates that route and the Control UI answers unknown paths with a catch-all 200. A wedged pod was therefore marked Ready forever. Probes now assert the JSON probe contract and target routes the pinned image actually serves; verified in a kind cluster where the old command exits 0 on the missing route and the new one exits 1. render.yaml set no dockerCommand, so the image CMD ran without --allow-unconfigured and a fresh Render disk exited 78 with 'Missing config' before binding. Reproduced locally with Render's exact env. The Cloudflare Container readiness poll had the same route mismatch against operator-supplied official image digests; it now polls /healthz, which every published image serves. Also replaces an R2 verification step that could never fail: wrangler cannot list object keys, so the documented command 404'd into || true. * docs: repair spellcheck and anchor drift (openclaw#122960) * docs: repair spellcheck and anchor drift * docs: satisfy markdown anchor lint * docs(hosting): fix unsafe deployment instructions (openclaw#122971) * test(agents): remove global test APIs (openclaw#122972) * fix(slack): accept org-wide user IDs in Enterprise Grid policies (openclaw#122934) * test(slack): accept org-wide enterprise users * fix(slack): allow org-wide enterprise users * style(slack): format enterprise user policy * test(slack): preserve enterprise user identity scope * fix(slack): preserve enterprise user identity scope * fix(slack): import workspace identity normalizer * fix(slack): normalize enterprise owner ids --------- Co-authored-by: Sarah Fortune <[email protected]> * refactor(state): simplify schema migration validation (openclaw#122959) * perf(test): avoid embedded runtime imports in btw suite (openclaw#122957) Co-authored-by: Amp <[email protected]> * fix(agents): preserve setup inference auth owner (openclaw#122975) * feat(ui): open bare pair command without a chat turn (openclaw#120855) Co-authored-by: Patrick Erichsen <[email protected]> * test(extensions): repair stale full-config extension tests (openclaw#122978) clickclack inbound mention gating: openclaw#114388 (1ca60fb) made multi-agent fallback ownership explicit, so the openclaw#115484 fixture now declares its clickclack:default service-bot binding. policy CLI: openclaw#114388 (1ca60fb) removed ambient ownership from normalized multi-agent configs, so the openclaw#111087 routing-probe fixture uses the sole main agent and still reaches the intended findings exit. Teams and Zoom node invoke policy: openclaw#118451 (7d40666) added trusted audio backend, buffer size, and format forwarding; assert those fields alongside the configured commands. Teams node host: openclaw#118451 (7d40666) made default audio commands platform-dependent at import time after openclaw#111455 added the sox dedupe test; reset modules and mock Darwin before importing defaults. * fix(cli): rejected profile commands no longer create state (openclaw#122970) * fix(cli): defer profile state creation past argument validation * test(cli): use tracked profile temp directory * test(doctor): align checkpoint expectation with pristine roots * fix(agents): report recovered compaction runs as completed (openclaw#122974) * refactor(gateway): remove suspension mock replay (openclaw#122977) * test(gateway): remove suspension mock replay * test(agents): stabilize headless timeout assertion * feat(node-host): add negotiated private worker controls (openclaw#122939) * feat(node-host): add private worker supervisor controls * refactor(node-host): harden private worker controls * refactor(node-host): simplify private worker controls * docs(plan): track private worker controls * fix(node-host): satisfy private control CI guards * test(gateway): follow worker service construction boundary * test(gateway): register private control release train * fix(gateway): retain worker dialect across reapproval * fix(sessions): preserve durable transcript ownership (openclaw#122729) Resolve transcript writes through the durable SQLite session-window owner, reject owner changes transactionally, and repair unambiguous stolen-owner aliases with Doctor. Co-authored-by: Ayaan Zaidi <[email protected]> Co-authored-by: Thorsten Stresow <[email protected]> * feat(xai): add Grok 4.6 catalog and preserve OAuth xhigh (openclaw#122762) * feat(xai): add Grok 4.6 catalog and preserve OAuth xhigh Add first-class Grok 4.6 discovery, pricing, and reasoning metadata while keeping the existing Grok 4.3 API-key and server-tool defaults unchanged. Preserve xhigh only for Grok 4.6 so OAuth auto no longer inherits the Grok 4.5 high downgrade. Closes nothing; tracks openclaw#122734. * fix(xai): resolve the OAuth auto alias to its canonical model in the thinking policy The OAuth catalog row keeps id "auto" and records the provider-selected target in params.canonicalModelId; judging the raw alias collapsed the default OAuth route to an off-only thinking picker for every model. Co-Authored-By: Claude Fable 5 <[email protected]> * test(xai): refresh catalog-order assertions and restore stream deadlines for Grok 4.6 Exact-order catalog and onboarding arrays now include the new row with its metadata assertion; payload-capture timeouts return to their original values, Grok 4.5 off-clamp and Grok 4.3 modern-model coverage are restored, and the Grok 4.6 xhigh boundary test passes its id explicitly. Co-Authored-By: Claude Fable 5 <[email protected]> * feat(agents): add Grok 4.6 to the curated high-signal live matrix xai is a curated-only high-signal provider, so the new flagship was structurally excluded from default live sweeps; add it alongside Grok 4.5 with its test and docs mirrors, matching the 4.5 precedent. Co-Authored-By: Claude Fable 5 <[email protected]> * fix(xai): align Grok frontier metadata * fix(xai): align Grok 4.6 catalog contract Remove the unsupported moving alias, centralize OAuth auto target resolution, correct cached pricing, and keep live coverage on the stable xhigh completion path. Co-authored-by: Kiran Magic <[email protected]> --------- Co-authored-by: Kiran Magic <[email protected]> Co-authored-by: Kiran Magic <[email protected]> Co-authored-by: Claude Fable 5 <[email protected]> Co-authored-by: Kiran <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> * test(plugins): refresh fixture contracts (openclaw#122986) * improve: one channel picker and one model picker across the Control UI (openclaw#122964) * fix(ui): unify channel pickers with icons Preserve channel values and mutation ownership across Automations, pairing, setup, and Workboard while sharing accessible picker rendering and artwork. * refactor(ui): unify model pickers Share provider-aware model selection across chat, new sessions, Automations, Agents, model defaults, Session Observer, Talk, and Memory while preserving owner-specific values and locks. * fix(ui): keep picker change callbacks value-only Keep the Web Awesome element private to model-picker custom-mode handling while preserving one-argument callbacks for every picker consumer. * fix(ui): satisfy model picker types Keep custom sentinel options within the shared model option shape and guard optional Memory placeholder translation keys. * refactor(ui): remove obsolete model option template import Drop the Lit import after Agents model options became pure shared-picker data. * fix(ui): satisfy picker lint gates Use explicit model option mapping, remove stale E2E locals, and keep the Cron behavior suite within its enforced line budget. * test(ui): target unified session model picker * fix(ci): rename state migration assertion map off the env-var pattern OPENCLAW_STATE_MIGRATION_ASSERTIONS (a module-local const introduced by openclaw#122959) matches the OPENCLAW_[A-Z0-9_]+ source scan in scripts/check-env-var-count.mts, pushing the env-var ratchet to 503/502 and failing check:env-var-count on every branch based on current main. It is not an environment variable; rename it to STATE_MIGRATION_ASSERTIONS so the ratchet stays an honest env-var count. * test(oc-path): make perf budgets robust to CI scheduler noise (openclaw#122994) * fix(memory): keep session reconciliation off search path (openclaw#120837) * fix(memory): keep session reconciliation off search path * test(memory): decouple reconciliation test from provider fixture --------- Co-authored-by: Jason (Json) <[email protected]> * fix(agents): preserve headless timeout ownership (openclaw#122997) * fix(gateway): preserve system agent ownership (openclaw#122987) * fix(gateway): preserve system agent ownership * chore(plugin-sdk): refresh ownership API baseline * fix(gateway): preserve global system event routing * refactor(ui): one task-detail surface for rail and subagent clicks (openclaw#123003) * refactor(ui): unify task details in sidebar panel * docs(ui): describe task detail sidebar * refactor(ui): collapse onSelectTask into onOpenTaskDetail Two names for the same open-the-panel action; rows now call the callback directly. * fix(ui): clear rail open-task highlight when detail slot closes openTaskId derived from sidebarContent alone, but region close only collapses the layout and retains content, leaving a stale aria-current row; gate the highlight on detail-slot visibility. * fix(ui): keep requester sessions out of subagent transcripts and let reopen retry failed lookups A queued subagent has no child session yet; falling back to its sessionKey rendered the requester's conversation as the task transcript. And a failed tasks.get permanently suppressed the panel's render-driven load; selection now clears the recorded error so reopening retries, matching the old rail behavior. * test(buzz): add opt-in thread QA coverage (openclaw#116081) * test(buzz): add opt-in thread QA coverage * fix(buzz): preserve QA conversation kind --------- Co-authored-by: Dallin Romney <[email protected]> * perf(test): avoid unrelated runtime imports in MCP suite (openclaw#122998) Remove duplicate adversarial filter integration coverage, replace broad plugin/auth imports with contract-complete test leaves, and repair the main env-var ratchet broken by an unrelated newly added internal constant. Amp-Thread-ID: https://ampcode.com/threads/T-019fee8d-665d-707b-a380-23f2a6a1ce03 Co-authored-by: Amp <[email protected]> * fix(ci): sanitize AI manifest during installer pack (openclaw#122952) * test(agents): move recovery transcript proof to QA (openclaw#123006) * fix(discord): chunk long thread initial messages (openclaw#117354) Discord rejected over-limit starter messages and could leave ordinary threads empty after creation. Split initial content through the existing Discord chunking and nonce-retry path while preserving confirmed-versus-ambiguous partial-delivery results. Co-authored-by: zhang-guiping <[email protected]> * refactor(plugin-sdk): remove retired Copilot login chain (openclaw#122988) * refactor(plugin-sdk): remove retired Copilot login chain * chore(plugin-sdk): refresh generated API baselines * build(github-copilot): remove unused prompt dependency * chore(plugin-sdk): reconcile API baselines after rebase * fix(e2e): declare agents-delete fixture owners (openclaw#123000) * fix(sessions): preserve pinned sessions during maintenance (openclaw#122990) * fix(state): accept shipped commitments schema (openclaw#122945) * fix(parallels): recover migration-refused gateway startup * fix(signal): fail probe when RPC verification fails (openclaw#123001) * feat(worker): expose supervised terminal outcomes (openclaw#123013) * feat(worker): expose supervised terminal outcomes * docs(plan): track supervisor terminal outcomes * test: speed up attempt execution helpers (openclaw#123012) Co-authored-by: Amp <[email protected]> * fix(replies): keep approval-unavailable notices durable (openclaw#121179) Punchcard-Session: clear-lantern-summit-v2 * fix(ui): stop misreporting limited Custodian access (openclaw#123011) --------- Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: Vyctor H. Brzezowski <[email protected]> Co-authored-by: Amp <[email protected]> Co-authored-by: Jacqueline Henriksen <[email protected]> Co-authored-by: Josh Lehman <[email protected]> Co-authored-by: Vincent Koc <[email protected]> Co-authored-by: licheer-zte <[email protected]> Co-authored-by: sunlit-deng <[email protected]> Co-authored-by: joshavant <[email protected]> Co-authored-by: Calin Laurentiu Ilie <[email protected]> Co-authored-by: Daniel Cárdenas <[email protected]> Co-authored-by: DanielCardenas <[email protected]> Co-authored-by: Colin Johnson <[email protected]> Co-authored-by: Chinmay Rawat <[email protected]> Co-authored-by: Masato Hoshino <[email protected]> Co-authored-by: Patrick Erichsen <[email protected]> Co-authored-by: Feng <[email protected]> Co-authored-by: Adkid-Zephyr <[email protected]> Co-authored-by: PIYUSH RATHORE <[email protected]> Co-authored-by: Sarah Fortune <[email protected]> Co-authored-by: Sarah Fortune <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]> Co-authored-by: Thorsten Stresow <[email protected]> Co-authored-by: kiranmagic7 <[email protected]> Co-authored-by: Kiran Magic <[email protected]> Co-authored-by: Kiran Magic <[email protected]> Co-authored-by: Claude Fable 5 <[email protected]> Co-authored-by: Kiran <[email protected]> Co-authored-by: Dallin Romney <[email protected]> Co-authored-by: xingzhou <[email protected]> Co-authored-by: Leon-SK668 <[email protected]>
amittell
pushed a commit
that referenced
this pull request
Sep 27, 2026
…agent in chat (openclaw#158120) ## What Problem This Solves Fixes: owners who ask their agent in chat to change a key, a config value, or one of their own skills get refused, sent to a dashboard, or told to file a Workshop proposal. Examples: "you can't post API keys here", switching the embeddings provider routed to the web-search wizard, only proposals for handwritten skills. ## User Impact An owner can hand the agent an API key or token in chat, ask it to change config such as the embeddings provider, and have it edit skills they own. Session permission modes are unchanged: Full Access applies, restricted sessions ask. - **Keys from chat.** Masked setup flows still keep keys out of model context and remain the default. If the user already pasted a key or token, the agent stores it in the shared secret store and points the config key at it with a `store` SecretRef instead of refusing. It never echoes the value back. The pasted message already reached the model provider and transcript; redaction covers later logs and output only, and the docs say so. - **Existing store entries are never touched.** Each save inserts a new entry named after the config key plus a random suffix (`GATEWAY_REMOTE_TOKEN_9B139B5E231299BC`). Nothing is overwritten, revived, or deleted, and a new name can never match anything already pointing into the store, including a stale reference to a removed and purged entry. Replacing a key leaves its previous entry for `openclaw secrets store rm`. Rotating a key keeps its configured store provider alias, and the audit records the alias actually used. - **Embeddings.** The agent now treats the memory embeddings provider, model, and key as `memory.search.*` config, not the web-search setup wizard. - **Skills.** When the user asks, the agent edits skills they own directly: repository skill source, workspace `skills/`, project `.agents/skills/`, and configured extra skill directories. Bundled, ClawHub-installed, and plugin-provided skills are replaced by their owners' updates. For those, the agent says so and offers to capture the change as a Workshop skill. - **Tone.** The "never request / paste credentials in chat" lines are gone from the `openclaw` tools and system-agent prompts. "Never echo secret values" stays, and so do factual pointers for flows that genuinely need a UI: channel sign-in, provider OAuth/accounts, and model onboarding. No config option, schema, or protocol change. The Full Access permission-policy floor from the first revision moved to openclaw#158142 for its own security review. ## Why This Change Was Made After openclaw#149870, approved config writes may target any path. What still blocked owners was model-facing text telling the agent to refuse credentials, plus the missing ability to store a chat-provided value anywhere but plaintext config. `config_set_ref` gains an optional `secret` argument (read without trimming; only emptiness is checked). With it, the system agent: 1. registers the value for redaction when the proposal is built; 2. keeps the key's existing store provider alias when it has one; 3. sends one `secrets.writeForConfigRef` command to the SQLite state worker with the requester's live-authority guard. The host re-checks that guard at the worker's transaction and commit admission (`createSqliteWorkerWriteAdmission`), so a run stopped while the command is queued writes nothing. The transaction inserts a new row under a freshly minted `NAME_<16 random hex>`; 4. writes the ref through the existing config writer, which re-checks authority. If that write fails (before or after the writer commits), OpenClaw rereads the config and the error says the key was saved as `<NAME>` and whether the config key points at it. There is no automatic delete: another consumer may have linked the fresh entry, or the writer may have committed before failing; 5. the normal config reload picks up the new ref, since its id always changes. Nothing new runs SQLite on the Gateway main thread. <details> <summary>Out of scope / follow-ups</summary> - Found while proving this: in Full Access, after a delegated change applies, the next agent turn in the same chat fails with `SQLite database already belongs to another worker backend`. It reproduces on unmodified `origin/main` (`71bb516`) with a `logging.level` change followed by one more message. This PR does not fix it. - Built-in provider sign-in and model onboarding stay handoffs; they own live verification of the active inference route. - Other secret-store set/delete paths remain synchronous migration debt, as `worker-access.md` already records. </details> ## Evidence Real Telegram Test Server (Convex-leased userbot, fresh Gateway, QA mock provider, Full Access, tester is owner), first revision: | | Screenshot | |---|---| | Token given in chat, applied with no approval prompt and no refusal (synthetic QA token) |  | ### Final effects at this head qa-channel scenario `system-agent-owner-trust` passes through a real Gateway and state worker. The Gateway is seeded with an unrelated `GATEWAY_REMOTE_TOKEN` entry, then: 1. A command-allowed **non-owner** (`bob`) sends the key. The `openclaw` tool is owner-only. 2. The **owner** (`alice`, Full Access) sends it. Captured step details (redacted by the Gateway; the store ref id prints as `__OPENCLAW_REDACTED__`): ```json { "nonOwnerEntryNames": ["GATEWAY_REMOTE_TOKEN"], "storedRef": { "source": "store", "provider": "default", "id": "__OPENCLAW_REDACTED__" }, "storeEntryNames": ["GATEWAY_REMOTE_TOKEN", "GATEWAY_REMOTE_TOKEN_9B139B5E231299BC"] } ``` - After the non-owner turn: only the seeded entry exists and `gateway.remote.token` is unset. - After the owner turn: `gateway.remote.token` is a `store` SecretRef, the token is in its own minted entry (`GATEWAY_REMOTE_TOKEN_9B139B5E231299BC`), and the seeded entry's `updatedAt`/`updatedBy` are unchanged. No approval prompt was posted, and the token is absent from chat, config, and the store listing. **Revoked request**, through the production worker (Node main thread, real broker, `writeSecretStoreEntryForConfigRef`). The requester's guard passes the caller's check, then reports the run stopped: ```text seeded: [ 'GATEWAY_REMOTE_TOKEN (cli)' ] revoked request rejected: requesting run is no longer active after revoked request: [ 'GATEWAY_REMOTE_TOKEN (cli)' ] owner request saved as: GATEWAY_REMOTE_TOKEN_F1657B971F691824 after owner request: [ 'GATEWAY_REMOTE_TOKEN (cli)', 'GATEWAY_REMOTE_TOKEN_F1657B971F691824 (openclaw)' ] seeded value intact: true ``` Tests (each fails without the behavior it covers): - production worker path (`secret-store-config-ref.worker.test.ts`, forked database-worker lane with the real broker): a chat secret gets its own minted entry beside a live `GATEWAY_REMOTE_TOKEN` without touching it; a requester revoked after the caller's check writes nothing; - store kernel: a refusal at commit admission rolls the transaction back; each save mints a new `NAME_<hex>` and leaves the key's previous entry unchanged; a stale name whose entry was removed and purged still resolves to nothing after a chat save; - operations: stored and referenced with no value in output or audit; authority gone before the store write writes nothing; a failed config write names the saved entry and leaves it in place; rotating a key keeps its configured store provider alias, and the audit records it; - tool: proposes a store write without repeating the key, preserving leading and trailing whitespace. Measured single-worker wall time per new or materially changed test file at this head (`node scripts/run-vitest.mjs run <file>`, local M-series; vitest Duration includes import and setup): | File | Tests | Wall | Vitest duration | |---|---:|---:|---:| | `src/secrets/store/secret-store-config-ref.worker.test.ts` (new, database-worker lane) | 2 | 14 s | 2.05 s | | `src/secrets/store/secret-store.test.ts` | 32 | 16 s | 13.37 s | | `src/system-agent/operations.test.ts` | 43 | 18 s | 15.30 s | | `src/agents/tools/system-agent-tool.test.ts` | 36 | 15 s | 12.89 s | QA scenarios: `system-agent-owner-trust` (mock-openai) runs in about 27 s after build; `skill-owner-direct-edit-live` is live-frontier only and took about 3 min with `claude-cli/claude-sonnet-4-6`. Wording pins for the removed lecture text were deleted. The focused store, worker, exclusivity, operations, tool, approval, and delegate suites pass. `node scripts/check-changed.mjs` passes every gate except core lint, which fails only on three files this PR does not touch (`server-chat-metadata-lifecycle.integration.test.ts`, `session-companion-ask.ts`, `app-sidebar-session-list-render.ts` over `max-lines` on the base); oxlint on the changed files is clean. Security decision: a Full Access owner's pasted key goes to the Gateway-wide team store without a separate approval. Maintainer (@obviyus) accepted this in the PR conversation. **Rotation with a second consumer**, through the production worker (Node main thread, real broker). A second consumer references the key's first entry before the next save lands; value fingerprints only: ```text owner saves key #1 -> MODELS_PROVIDERS_OPENAI_API_KEY_6D96F6E92B59E935 (sha256:4a5c5a4aa8de) second consumer now references MODELS_PROVIDERS_OPENAI_API_KEY_6D96F6E92B59E935 (e.g. linked while the next save is queued) owner saves key #2 -> MODELS_PROVIDERS_OPENAI_API_KEY_4066F18ABAAE6903 (sha256:28bc4e3fe10d) second consumer's entry MODELS_PROVIDERS_OPENAI_API_KEY_6D96F6E92B59E935 after rotation: sha256:4a5c5a4aa8de unchanged: true ``` **Config write fails after the save, with a second consumer on the fresh entry**, through the production worker and the system-agent apply path (fingerprints only): ```text owner result: Saved the secret as GATEWAY_REMOTE_TOKEN_6B68C031E571F81C, but could not point gateway.remote.token at it: config write failed after commit (rollbackStatus: not-restored). Retry, or remove the entry with `openclaw secrets store rm GATEWAY_REMOTE_TOKEN_6B68C031E571F81C`. config gateway.remote.token: null second consumer's entry GATEWAY_REMOTE_TOKEN_6B68C031E571F81C: sha256:09ae5b4fd36b second consumer keeps the credential: true ``` **Stale reference to a removed and purged entry**, production worker for purge and save: ```text purged rows: 1 stale ref GATEWAY_REMOTE_TOKEN after purge: SECRET_STORE_NOT_FOUND chat save -> GATEWAY_REMOTE_TOKEN_8F698B5396990ADD resolves (value hidden) stale ref GATEWAY_REMOTE_TOKEN after chat save: SECRET_STORE_NOT_FOUND ``` **Owned-skill edit with a live model.** New scenario `skill-owner-direct-edit-live` (live-frontier; run with `claude-cli/claude-sonnet-4-6`, subscription auth) passes at this head. It seeds workspace skill `qa-owner-greeting` replying `OWNER-GREETING-V1`, and the owner asks in plain words: "Please change my qa-owner-greeting skill so it replies OWNER-GREETING-V2 instead of OWNER-GREETING-V1." Captured result: Skill file after the turn: ```markdown --- name: qa-owner-greeting description: Greets the owner with a fixed marker --- When the user asks for the owner greeting, reply with exactly: OWNER-GREETING-V2 ``` Agent reply: "Let me find the skill file. Done. The `qa-owner-greeting` skill now replies `OWNER-GREETING-V2` instead of `OWNER-GREETING-V1`." The model edited the skill file in place and confirmed it; it did not refuse or file a Workshop proposal. Co-authored-by: Ayaan Zaidi <[email protected]>
amittell
pushed a commit
that referenced
this pull request
Oct 9, 2026
openclaw#166738) Builds on openclaw#166737 (merged: curated `scripts/lib/recommended-models.json` + shared `canonicalModelKey`/`canonicalModelFamily`/`compareModelRecency`); this PR only adds the helper script and its test. ## What Problem This Solves The recommended-models list is now curated by hand, so a maintainer needs a daily, reviewable signal for what to change: new releases, Arena reorderings, and entries that are retired or no longer served. ## User Impact No user-visible change. Maintainers (and later a daily draft-PR agent) can run ``` OPENROUTER_API_KEY=... node --import ./scripts/tsx.mjs scripts/suggest-recommended-models.mts [--list <path>] ``` and get a markdown report ending in a unified diff against `scripts/lib/recommended-models.json`. The list file is never written; a human edits it. ## Why This Change Was Made TypeScript port of the recv2 prototype's ranking: LMArena Agent Arena score first; equal scores, and models without one, order by OpenRouter 30-day usage. The newest served family member without its own Arena row takes the slot of its newest ranked older sibling, counting at least that sibling's usage, so it sorts directly ahead of it (release date decides recency, so grok-4.20 does not outrank grok-4.7). DeepSWE is dropped; `-fast` and other serving variants fold into the base model. - Inputs: every run fetches each source fresh, with no cache; a failed request or a response that fails schema validation fails that run. Sources: LMArena Agent Arena `agent/latest` through the HF datasets-server JSON rows endpoint (no parquet dependency), OpenRouter `/api/v1/models`, OpenRouter `rankings-daily` (only when `OPENROUTER_API_KEY` is set; otherwise curated entries without an Arena score keep their order), Vercel `/v1/models`, and the hosted catalog v2. - Identity: each source id resolves once through the shared `canonicalModelKey`, with its display name, so dated aliases join their versioned model. Examples: `mistral-small-2603` is Mistral Small 4, OpenRouter `mistral-large-4-0` matches Vercel `mistral-large-4`, and usage arrives through OpenRouter `canonical_slug`. Non-chat models are excluded by gateway modality or type labels; `-latest` aliases are excluded. - Report sections: - **New models:** first seen within 7 days and not listed. Each shows its likely same-family predecessor and both prices, and is flagged `possible new class` when either price differs by more than 2x or the family has no predecessor. - **Arena moves:** rank changes among entries both lists keep, largest first. - **Gone or deprecated:** first-party retired with its replacement, no longer served, or no signal. - **Suggested list:** the full ordered list plus the diff. No overlap with Pash/Sarah changes (the PR adds one new file). ## Evidence - Port fidelity: on the live inputs, the helper reproduced the prototype's 86-id suggested list exactly before the review-driven identity fixes. Two differences remain, and openclaw#166737's seed list already includes both: `mistral-medium-2604` is folded into `mistral-medium-3.5` because they are the same model, and `ling-3.0-flash-*` is now spelled `ling-3-flash-*` because zero minor versions fold. - Typecheck: `node scripts/run-tsgo.mjs -p tsconfig.scripts.json` and `tsgo:test:root` report no errors; scoped oxlint and oxfmt are clean. `canonical-model-key.test.ts` passed 32/32. - Ordering: `test/scripts/suggest-recommended-models.test.ts` feeds stubbed sources through the real entry point. Two models tied on Arena score order by usage (the higher-usage one first, against alphabetical order), and a successor that inherits its sibling's Arena slot still sorts ahead of that higher-usage sibling. With the previous alphabetical tiebreak the test fails. - Cost: `pnpm test test/scripts/suggest-recommended-models.test.ts --maxWorkers=1` takes 2.2 s wall end to end (Vitest 0.78 s; the test itself 9 ms). CI on this head: run 37692398322, green in 595 s wall and 5,717 job-seconds across 58 jobs for the whole PR; the new test adds about 9 ms of that. - Error and fallback paths: a list containing `claude-opus-4.8` reported "retired by its first-party provider; replaced by claude-opus-5", and `nonexistent-model-9` reported "no host serves it". A missing `--list` file exits 1 with a clear message. Without a key, the report states that usage was skipped and keeps unscored curated entries. With an invalid `OPENROUTER_API_KEY`, the run exits 1 with `https://openrouter.ai/api/v1/datasets/rankings-daily returned HTTP 401` and prints no report. - Live run: all inputs were fetched fresh (5 requests, 3.9 s wall). Both outputs below are copied verbatim. In the live data the only exact Arena ties are successor/sibling pairs (`gpt-5.6`/`gpt-5.4`, `mimo-v2.6-pro`/`mimo-v2.5-pro`), and each successor sorts first. Run against the curated list in openclaw#166737, using the default path: # Recommended models suggestion, 2026-10-07 ## Sources - LMArena Agent Arena, published 2026-10-02: 50 rows, 48 models. Source: LMArena Agent Arena (lmarena-ai/leaderboard-dataset), CC BY 4.0. - OpenRouter rankings-daily 2026-09-07..2026-10-06. Source: OpenRouter (openrouter.ai/rankings), as of 2026-10-07T21:06:52.590Z. Licensed under CC BY 4.0. - Catalog v2 generated 2026-09-29 (1039 rows), OpenRouter models (467), Vercel AI Gateway models (415): 490 served chat models. ## New models (first seen in the last 7 days, not listed) | model | first seen | suggested | price in/out per 1M | predecessor | predecessor price | note | | --- | --- | --- | --- | --- | --- | --- | | glyph-cluster | 2026-10-07 | no signal yet | ? | none | | possible new class: no predecessor | | mistral-large-4 | 2026-10-06 | no signal yet | $0.68 / $2.09 | mistral-large-3 | $0.5 / $1.5 | | | apodex-1.1-mini | 2026-10-01 | no signal yet | ? | none | | possible new class: no predecessor | | pareto-26.10-preview | 2026-10-01 | no signal yet | $0.8 / $3.2 | none | | possible new class: no predecessor | ## Arena moves None. ## Gone or deprecated None. ## Suggested list <details><summary>85 models</summary> | # | model | signal | | --- | --- | --- | | 1 | claude-fable-5.1 | Arena 0.143 (#1) | | 2 | claude-opus-5.5 | Arena 0.138 (#2) | | 3 | claude-sonnet-5.5 | Arena 0.125 (#3) | | 4 | gpt-6-astra | Arena 0.123 (#4) | | 5 | gpt-6.1-sol | Arena 0.112 (#5) | | 6 | gpt-6-sol | Arena 0.097 (#6) | | 7 | claude-opus-5 | Arena 0.087 (#7) | | 8 | claude-fable-5 | Arena 0.082 (#8) | | 9 | gpt-5.6-sol | Arena 0.065 (#12) | | 10 | claude-sonnet-5 | Arena 0.044 (#13) | | 11 | kimi-k3 | Arena 0.042 (openclaw#14) | | 12 | grok-4.7 | Arena 0.040 (openclaw#16) | | 13 | deepseek-v4.1-flash | Arena 0.040 (openclaw#17) | | 14 | muse-spark-1.3 | Arena 0.040 (openclaw#18) | | 15 | hy4-preview | Arena 0.040 (openclaw#19) | | 16 | glm-5.2 | Arena 0.035 (openclaw#20) | | 17 | gemini-3.8-flash | Arena 0.030 (openclaw#21) | | 18 | qwen3.8-max | Arena 0.025 (openclaw#22) | | 19 | glm-5.3 | Arena 0.024 (openclaw#23) | | 20 | gpt-6-luna | Arena 0.014 (openclaw#24) | | 21 | grok-4.6 | Arena 0.013 (openclaw#25) | | 22 | grok-4.5 | Arena 0.012 (openclaw#26) | | 23 | deepseek-v4-pro | Arena 0.012 (openclaw#27) | | 24 | gpt-5.6 | Arena 0.011 (openclaw#28) via gpt-5.4 | | 25 | gpt-5.4 | Arena 0.011 (openclaw#28) | | 26 | step-5-preview | Arena 0.005 (openclaw#30) | | 27 | gpt-5.6-terra | Arena 0.004 (openclaw#31) | | 28 | glm-5.3-flash | Arena -0.004 (openclaw#32) | | 29 | mimo-v2.6-flash | Arena -0.006 (openclaw#33) | | 30 | gpt-5.6-luna | Arena -0.012 (openclaw#35) | | 31 | gemini-3.7-flash | Arena -0.015 (openclaw#36) | | 32 | qwen3.8-27b | Arena -0.017 (openclaw#37) | | 33 | muse-spark-1.2 | Arena -0.033 (openclaw#38) | | 34 | muse-spark-1.1 | Arena -0.049 (openclaw#39) | | 35 | qwen3.7-max | Arena -0.051 (openclaw#40) | | 36 | hy3 | Arena -0.054 (openclaw#41) | | 37 | minimax-m3 | Arena -0.069 (openclaw#42) | | 38 | qwen3.7-plus | Arena -0.072 (openclaw#43) | | 39 | mimo-v2.6-pro | Arena -0.075 (openclaw#44) via mimo-v2.5-pro | | 40 | mimo-v2.5-pro | Arena -0.075 (openclaw#44) | | 41 | gemini-3.6-flash | Arena -0.077 (openclaw#45) | | 42 | gemini-3.1-pro-preview | Arena -0.077 (openclaw#46) | | 43 | inkling-small | Arena -0.103 (openclaw#47) | | 44 | inkling | Arena -0.109 (openclaw#48) | | 45 | mistral-medium-3.5 | Arena -0.124 (openclaw#49) | | 46 | solar-pro4 | Arena -0.159 (openclaw#50) | | 47 | space-bunny-alpha | OpenRouter 56.7T | | 48 | deepseek-v4-flash | OpenRouter 53.3T | | 49 | nemotron-3-ultra-550b-a55b | OpenRouter 21.1T | | 50 | mimo-v2.5 | OpenRouter 18.9T | | 51 | laguna-s-2.1 | OpenRouter 4.6T | | 52 | gemini-3-flash-preview | OpenRouter 3.4T | | 53 | ling-3-flash-fin | OpenRouter 3.4T | | 54 | gemini-2.5-flash-lite | OpenRouter 3.0T | | 55 | nemotron-3.5-lightning | OpenRouter 2.7T | | 56 | gpt-oss-120b | OpenRouter 2.5T | | 57 | dots-3-note-preview | OpenRouter 2.4T | | 58 | gemini-3.1-flash-lite | OpenRouter 2.1T | | 59 | gemini-2.5-flash | OpenRouter 2.0T | | 60 | qwen3.8-flash | OpenRouter 1.8T | | 61 | gemma-4-31b | OpenRouter 1.7T | | 62 | claude-sonnet-4.6 | OpenRouter 1.4T | | 63 | deepseek-v3.2 | OpenRouter 1.4T | | 64 | qwen3.7-flash | OpenRouter 1.4T | | 65 | ling-3-flash-sante | OpenRouter 1.2T | | 66 | nemotron-3-super-120b-a12b | OpenRouter 1.2T | | 67 | nex-n2.5-pro | OpenRouter 1.1T | | 68 | ling-3-flash-vl | OpenRouter 1.0T | | 69 | gpt-6-luna-pro | OpenRouter 853B | | 70 | gemma-4-26b-a4b | OpenRouter 845B | | 71 | gpt-5.6-luna-pro | OpenRouter 566B | | 72 | solar-mini4 | OpenRouter 510B | | 73 | deepseek-v4-flash-vision-exp | OpenRouter 430B | | 74 | mistral-nemo | OpenRouter 384B | | 75 | ling-3.1-flash | OpenRouter 298B | | 76 | glm-5.3-flashx | OpenRouter 187B | | 77 | gpt-oss-20b | OpenRouter 127B | | 78 | gemini-3.5-flash-lite | OpenRouter 124B | | 79 | minimax-m2.7 | OpenRouter 113B | | 80 | gpt-4o-mini | OpenRouter 89B | | 81 | claude-haiku-5.5 | OpenRouter 82B via claude-haiku-4.5 | | 82 | claude-haiku-4.5 | OpenRouter 82B | | 83 | claude-opus-4.7 | OpenRouter 55B | | 84 | step-3.7-flash | OpenRouter 50B | | 85 | claude-sonnet-4.5 | OpenRouter 46B | </details> No changes to the curated list. <details><summary>Same inputs against the 2026-09-27 list (shows Arena moves, a drop, a 10x price flag and the diff)</summary> # Recommended models suggestion, 2026-10-07 ## Sources - LMArena Agent Arena, published 2026-10-02: 50 rows, 48 models. Source: LMArena Agent Arena (lmarena-ai/leaderboard-dataset), CC BY 4.0. - OpenRouter rankings-daily 2026-09-07..2026-10-06. Source: OpenRouter (openrouter.ai/rankings), as of 2026-10-07T21:07:02.742Z. Licensed under CC BY 4.0. - Catalog v2 generated 2026-09-29 (1039 rows), OpenRouter models (467), Vercel AI Gateway models (415): 490 served chat models. ## New models (first seen in the last 7 days, not listed) | model | first seen | suggested | price in/out per 1M | predecessor | predecessor price | note | | --- | --- | --- | --- | --- | --- | --- | | claude-haiku-5.5 | 2026-10-07 | openclaw#81 | $0.1 / $0.5 | claude-haiku-4.5 | $1 / $5 | possible new class: price 10.0x | | glyph-cluster | 2026-10-07 | no signal yet | ? | none | | possible new class: no predecessor | | mistral-large-4 | 2026-10-06 | no signal yet | $0.68 / $2.09 | mistral-large-3 | $0.5 / $1.5 | | | apodex-1.1-mini | 2026-10-01 | no signal yet | ? | none | | possible new class: no predecessor | | pareto-26.10-preview | 2026-10-01 | no signal yet | $0.8 / $3.2 | none | | possible new class: no predecessor | ## Arena moves | model | listed | suggested | signal | | --- | --- | --- | --- | | mimo-v2.6-flash | openclaw#47 | openclaw#29 | Arena -0.006 (openclaw#33) | | gpt-6-luna | openclaw#24 | openclaw#20 | Arena 0.014 (openclaw#24) | | grok-4.7 | openclaw#15 | #12 | Arena 0.040 (openclaw#16) | | deepseek-v4-pro | openclaw#16 | openclaw#23 | Arena 0.012 (openclaw#27) | | gemini-3.8-flash | #11 | openclaw#17 | Arena 0.030 (openclaw#21) | | hy4-preview | #10 | openclaw#15 | Arena 0.040 (openclaw#19) | | mimo-v2.6-pro | openclaw#32 | openclaw#39 | Arena -0.075 (openclaw#44) via mimo-v2.5-pro | | mimo-v2.5-pro | openclaw#33 | openclaw#40 | Arena -0.075 (openclaw#44) | | gemini-3.1-pro-preview | openclaw#35 | openclaw#42 | Arena -0.077 (openclaw#46) | | solar-pro4 | openclaw#45 | openclaw#46 | Arena -0.159 (openclaw#50) | | gpt-6-sol | #6 | #6 | Arena 0.097 (#6) | | muse-spark-1.3 | openclaw#14 | openclaw#14 | Arena 0.040 (openclaw#18) | | qwen3.8-max | openclaw#18 | openclaw#18 | Arena 0.025 (openclaw#22) | | gpt-5.6-terra | openclaw#21 | openclaw#27 | Arena 0.004 (openclaw#31) | | qwen3.7-plus | openclaw#36 | openclaw#38 | Arena -0.072 (openclaw#43) | | claude-opus-5.5 | #3 | #2 | Arena 0.138 (#2) | | gpt-6-astra | #2 | #4 | Arena 0.123 (#4) | | claude-opus-5 | #4 | #7 | Arena 0.087 (#7) | | claude-fable-5 | #5 | #8 | Arena 0.082 (#8) | | deepseek-v4.1-flash | #12 | #13 | Arena 0.040 (openclaw#17) | | glm-5.2 | #13 | openclaw#16 | Arena 0.035 (openclaw#20) | | grok-4.6 | openclaw#20 | openclaw#21 | Arena 0.013 (openclaw#25) | | grok-4.5 | openclaw#19 | openclaw#22 | Arena 0.012 (openclaw#26) | | glm-5.3-flash | openclaw#23 | openclaw#28 | Arena -0.004 (openclaw#32) | | gpt-5.6-luna | openclaw#25 | openclaw#30 | Arena -0.012 (openclaw#35) | | gemini-3.7-flash | openclaw#26 | openclaw#31 | Arena -0.015 (openclaw#36) | | qwen3.8-27b | openclaw#27 | openclaw#32 | Arena -0.017 (openclaw#37) | | muse-spark-1.2 | openclaw#28 | openclaw#33 | Arena -0.033 (openclaw#38) | | muse-spark-1.1 | openclaw#29 | openclaw#34 | Arena -0.049 (openclaw#39) | | qwen3.7-max | openclaw#30 | openclaw#35 | Arena -0.051 (openclaw#40) | | hy3 | openclaw#31 | openclaw#36 | Arena -0.054 (openclaw#41) | | minimax-m3 | openclaw#34 | openclaw#37 | Arena -0.069 (openclaw#42) | | inkling-small | openclaw#38 | openclaw#43 | Arena -0.103 (openclaw#47) | | inkling | openclaw#39 | openclaw#44 | Arena -0.109 (openclaw#48) | | mistral-medium-3.5 | openclaw#40 | openclaw#45 | Arena -0.124 (openclaw#49) | 29 usage-ranked entries also move; see the diff. ## Gone or deprecated - ling-3.0-flash-fin: no host serves it - ling-3.0-flash-vl: no host serves it - ling-3.0-flash-sante: no host serves it - kimi-k2.6: no Arena score and no OpenRouter usage in the window ## Suggested list <details><summary>85 models</summary> | # | model | signal | | --- | --- | --- | | 1 | claude-fable-5.1 | Arena 0.143 (#1) | | 2 | claude-opus-5.5 | Arena 0.138 (#2) | | 3 | claude-sonnet-5.5 | Arena 0.125 (#3) | | 4 | gpt-6-astra | Arena 0.123 (#4) | | 5 | gpt-6.1-sol | Arena 0.112 (#5) | | 6 | gpt-6-sol | Arena 0.097 (#6) | | 7 | claude-opus-5 | Arena 0.087 (#7) | | 8 | claude-fable-5 | Arena 0.082 (#8) | | 9 | gpt-5.6-sol | Arena 0.065 (#12) | | 10 | claude-sonnet-5 | Arena 0.044 (#13) | | 11 | kimi-k3 | Arena 0.042 (openclaw#14) | | 12 | grok-4.7 | Arena 0.040 (openclaw#16) | | 13 | deepseek-v4.1-flash | Arena 0.040 (openclaw#17) | | 14 | muse-spark-1.3 | Arena 0.040 (openclaw#18) | | 15 | hy4-preview | Arena 0.040 (openclaw#19) | | 16 | glm-5.2 | Arena 0.035 (openclaw#20) | | 17 | gemini-3.8-flash | Arena 0.030 (openclaw#21) | | 18 | qwen3.8-max | Arena 0.025 (openclaw#22) | | 19 | glm-5.3 | Arena 0.024 (openclaw#23) | | 20 | gpt-6-luna | Arena 0.014 (openclaw#24) | | 21 | grok-4.6 | Arena 0.013 (openclaw#25) | | 22 | grok-4.5 | Arena 0.012 (openclaw#26) | | 23 | deepseek-v4-pro | Arena 0.012 (openclaw#27) | | 24 | gpt-5.6 | Arena 0.011 (openclaw#28) via gpt-5.4 | | 25 | gpt-5.4 | Arena 0.011 (openclaw#28) | | 26 | step-5-preview | Arena 0.005 (openclaw#30) | | 27 | gpt-5.6-terra | Arena 0.004 (openclaw#31) | | 28 | glm-5.3-flash | Arena -0.004 (openclaw#32) | | 29 | mimo-v2.6-flash | Arena -0.006 (openclaw#33) | | 30 | gpt-5.6-luna | Arena -0.012 (openclaw#35) | | 31 | gemini-3.7-flash | Arena -0.015 (openclaw#36) | | 32 | qwen3.8-27b | Arena -0.017 (openclaw#37) | | 33 | muse-spark-1.2 | Arena -0.033 (openclaw#38) | | 34 | muse-spark-1.1 | Arena -0.049 (openclaw#39) | | 35 | qwen3.7-max | Arena -0.051 (openclaw#40) | | 36 | hy3 | Arena -0.054 (openclaw#41) | | 37 | minimax-m3 | Arena -0.069 (openclaw#42) | | 38 | qwen3.7-plus | Arena -0.072 (openclaw#43) | | 39 | mimo-v2.6-pro | Arena -0.075 (openclaw#44) via mimo-v2.5-pro | | 40 | mimo-v2.5-pro | Arena -0.075 (openclaw#44) | | 41 | gemini-3.6-flash | Arena -0.077 (openclaw#45) | | 42 | gemini-3.1-pro-preview | Arena -0.077 (openclaw#46) | | 43 | inkling-small | Arena -0.103 (openclaw#47) | | 44 | inkling | Arena -0.109 (openclaw#48) | | 45 | mistral-medium-3.5 | Arena -0.124 (openclaw#49) | | 46 | solar-pro4 | Arena -0.159 (openclaw#50) | | 47 | space-bunny-alpha | OpenRouter 56.7T | | 48 | deepseek-v4-flash | OpenRouter 53.3T | | 49 | nemotron-3-ultra-550b-a55b | OpenRouter 21.1T | | 50 | mimo-v2.5 | OpenRouter 18.9T | | 51 | laguna-s-2.1 | OpenRouter 4.6T | | 52 | gemini-3-flash-preview | OpenRouter 3.4T | | 53 | ling-3-flash-fin | OpenRouter 3.4T | | 54 | gemini-2.5-flash-lite | OpenRouter 3.0T | | 55 | nemotron-3.5-lightning | OpenRouter 2.7T | | 56 | gpt-oss-120b | OpenRouter 2.5T | | 57 | dots-3-note-preview | OpenRouter 2.4T | | 58 | gemini-3.1-flash-lite | OpenRouter 2.1T | | 59 | gemini-2.5-flash | OpenRouter 2.0T | | 60 | qwen3.8-flash | OpenRouter 1.8T | | 61 | gemma-4-31b | OpenRouter 1.7T | | 62 | claude-sonnet-4.6 | OpenRouter 1.4T | | 63 | deepseek-v3.2 | OpenRouter 1.4T | | 64 | qwen3.7-flash | OpenRouter 1.4T | | 65 | ling-3-flash-sante | OpenRouter 1.2T | | 66 | nemotron-3-super-120b-a12b | OpenRouter 1.2T | | 67 | nex-n2.5-pro | OpenRouter 1.1T | | 68 | ling-3-flash-vl | OpenRouter 1.0T | | 69 | gpt-6-luna-pro | OpenRouter 853B | | 70 | gemma-4-26b-a4b | OpenRouter 845B | | 71 | gpt-5.6-luna-pro | OpenRouter 566B | | 72 | solar-mini4 | OpenRouter 510B | | 73 | deepseek-v4-flash-vision-exp | OpenRouter 430B | | 74 | mistral-nemo | OpenRouter 384B | | 75 | ling-3.1-flash | OpenRouter 298B | | 76 | glm-5.3-flashx | OpenRouter 187B | | 77 | gpt-oss-20b | OpenRouter 127B | | 78 | gemini-3.5-flash-lite | OpenRouter 124B | | 79 | minimax-m2.7 | OpenRouter 113B | | 80 | gpt-4o-mini | OpenRouter 89B | | 81 | claude-haiku-5.5 | OpenRouter 82B via claude-haiku-4.5 | | 82 | claude-haiku-4.5 | OpenRouter 82B | | 83 | claude-opus-4.7 | OpenRouter 55B | | 84 | step-3.7-flash | OpenRouter 50B | | 85 | claude-sonnet-4.5 | OpenRouter 46B | </details> ```diff --- a/../../../../../../tmp/recprobe/list-20260927.json +++ b/../../../../../../tmp/recprobe/list-20260927.json @@ -1,80 +1,87 @@ [ "claude-fable-5.1", - "gpt-6-astra", "claude-opus-5.5", + "claude-sonnet-5.5", + "gpt-6-astra", + "gpt-6.1-sol", + "gpt-6-sol", "claude-opus-5", "claude-fable-5", - "gpt-6-sol", "gpt-5.6-sol", "claude-sonnet-5", "kimi-k3", - "hy4-preview", - "gemini-3.8-flash", + "grok-4.7", "deepseek-v4.1-flash", - "glm-5.2", "muse-spark-1.3", - "grok-4.7", - "deepseek-v4-pro", - "glm-5.3", + "hy4-preview", + "glm-5.2", + "gemini-3.8-flash", "qwen3.8-max", - "grok-4.5", + "glm-5.3", + "gpt-6-luna", "grok-4.6", - "gpt-5.6-terra", + "grok-4.5", + "deepseek-v4-pro", + "gpt-5.6", "gpt-5.4", + "step-5-preview", + "gpt-5.6-terra", "glm-5.3-flash", - "gpt-6-luna", + "mimo-v2.6-flash", "gpt-5.6-luna", "gemini-3.7-flash", "qwen3.8-27b", "muse-spark-1.2", "muse-spark-1.1", "qwen3.7-max", "hy3", - "mimo-v2.6-pro", - "mimo-v2.5-pro", "minimax-m3", - "gemini-3.1-pro-preview", "qwen3.7-plus", + "mimo-v2.6-pro", + "mimo-v2.5-pro", "gemini-3.6-flash", + "gemini-3.1-pro-preview", "inkling-small", "inkling", "mistral-medium-3.5", + "solar-pro4", + "space-bunny-alpha", "deepseek-v4-flash", - "mimo-v2.5", "nemotron-3-ultra-550b-a55b", - "space-bunny-alpha", - "solar-pro4", + "mimo-v2.5", "laguna-s-2.1", - "mimo-v2.6-flash", - "ling-3.0-flash-fin", "gemini-3-flash-preview", - "nemotron-3.5-lightning", + "ling-3-flash-fin", "gemini-2.5-flash-lite", - "claude-sonnet-4.6", + "nemotron-3.5-lightning", "gpt-oss-120b", - "gemini-2.5-flash", - "gemini-3.1-flash-lite", "dots-3-note-preview", - "deepseek-v3.2", - "gemma-4-31b", + "gemini-3.1-flash-lite", + "gemini-2.5-flash", "qwen3.8-flash", + "gemma-4-31b", + "claude-sonnet-4.6", + "deepseek-v3.2", + "qwen3.7-flash", + "ling-3-flash-sante", "nemotron-3-super-120b-a12b", + "nex-n2.5-pro", + "ling-3-flash-vl", + "gpt-6-luna-pro", "gemma-4-26b-a4b", "gpt-5.6-luna-pro", - "qwen3.7-flash", - "ling-3.0-flash-vl", - "minimax-m2.7", + "solar-mini4", "deepseek-v4-flash-vision-exp", - "gpt-oss-20b", - "ling-3.0-flash-sante", - "step-3.7-flash", - "claude-haiku-4.5", "mistral-nemo", - "gpt-4o-mini", + "ling-3.1-flash", "glm-5.3-flashx", + "gpt-oss-20b", "gemini-3.5-flash-lite", - "gpt-6-luna-pro", + "minimax-m2.7", + "gpt-4o-mini", + "claude-haiku-5.5", + "claude-haiku-4.5", "claude-opus-4.7", - "claude-sonnet-4.5", - "kimi-k2.6" + "step-3.7-flash", + "claude-sonnet-4.5" ] ``` </details> ## Merge danger This is a two-way door: it adds one new dev script and its test, writes no files, and is never wired into CI or publishing. A revert removes it completely. If it is wrong, the impact is limited to a misleading suggestion report that a human reviews before editing the list. Co-authored-by: Ayaan Zaidi <[email protected]>
amittell
added a commit
that referenced
this pull request
Oct 28, 2026
…the fork's #1 diagnostic beta.4 carries openclaw#169584, which deletes prepareOpenClawStateDirectReader and its 'Direct shared-state reader requires current integrity admission' throw (0 hits in beta.4 src). The fork's only change to openclaw-state-db-read-connection.ts was the alexm/openclaw#1 diagnostic hooked into that function, so this takes beta.4's file unchanged and removes the diagnostic module, its test and its scripts/pr-lib/wrapper-components.txt line.
amittell
pushed a commit
that referenced
this pull request
Nov 25, 2026
…openclaw#204411) Closes openclaw#204405. Companion plugin change: [Better Prompt #1](obviyus/openclaw-better-prompt#1). ## What Problem This Solves A person with `operator.sessions.write` but no `operator.write` gets "Ask an admin to grant write access" when a plugin runs a helper (`runForkedTurn`) on their own chat. The plugin's Gateway method is admitted for that session, but the fork was then admitted again as a new, sessionless `agent` launch, which needs general write access. ## Fix - **One admission path.** When a plugin method that declares `sessionAccess` calls `runForkedTurn`, the fork runs as a run of the session that request admitted: same `sessionKey` and agent required, the session resource's `retainSession` lifetime fences resets and replacements, and the `agent` admission goes through the existing own-session run check (`bindInProcessSessionRun`). This holds for every caller, whatever other scopes they hold. Calls without `sessionAccess` keep the sessionless path. A session key named by a plugin is never a grant by itself. - **One tool-eligibility owner.** The owner-only `exec` rule from openclaw#200636 moves from the run's execution allow list into `prepareSessionFork`, the admission check that already refuses denied tools before any model call. `exec` is admitted only when the anchored turn came from the owner and, when the fork came through a `sessionAccess` method with a signed-in caller, only when that caller sent the turn. Otherwise a request with `exec` returns `{ status: "refused", reason: "tool_policy" }`; `read` and `ls` stay under the session's own policy. No channel-specific checks. ## User Impact - A session writer can run a plugin helper on their own chat. Forks there may `read` and `ls`; a request with `exec` is refused unless that person is the owner and sent the turn. - Full writers through a `sessionAccess` method get the same fork as through any other method. - Behavior change for plugin authors: a fork requesting `exec` on a turn that did not come from the owner used to run with `exec` unavailable inside the run; it is now refused before any model call, so the plugin sees the refusal and can retry with `read`/`ls`. `runForkedTurn` gains no field. Docs: `docs/plugins/sdk-runtime.md`. - No config, schema, protocol or dependency change. ## Evidence **Head E2E, real model (2026-11-24).** Scratch source Gateway on a random port with isolated state, trusted-proxy sign-in over TLS, a WebChat client with only `operator.sessions.write`, and [Qwen3-4B-Instruct-2507 Q4_K_M](https://huggingface.co/unsloth/Qwen3-4B-Instruct-2507-GGUF/tree/a06e946bb6b655725eafa393f4a9745d460374c9) on llama.cpp. A scratch plugin exposes a `sessionAccess` method and a plain `operator.write` method, both calling `runForkedTurn`; the workspace file holds a random reference that appears nowhere else. ```text connect: [email protected], scopes [operator.sessions.write] sessions.create → own chat; chat.send → real model turn, agent_end observed plain RPC (operator.write) → denied: missing scope: operator.write sessionAccess RPC, tools=[exec] → refused: tool_policy (no model call) sessionAccess RPC, tools=[read] → settled; after_tool_call read {path: notes.txt}, no error fork reply "PINE-73878" == file-only reference: true checks: broadDenied, execRefused, readSettled, readToolRan, markerReturned all true; exit 0 ``` **Base side** (recorded at reproduction, before this takeover): on the unpatched base the session writer's fork failed after the outer plugin RPC was admitted. **Regression tests** (`gateway-plugin-forked-turn-session-tools.e2e.test.ts`, real Gateway, scripted model): session writer own chat → `read` settles, `exec` refused, plain `operator.write` RPC denied; full writer through a `sessionAccess` method → owner `exec` runs as through the plain method; signed-in admin → `exec` runs on their own WebChat turn, refused through `sessionAccess` on another owner's Telegram turn, while the plain method still runs it there; non-owner turn → `[read, ls, exec]` refused with no model call, `[read, ls]` settles. 3/3 pass. `pnpm check:changed` green; importer tests of every changed source pass. **Size.** Production code +65/−19 against the merge base. The growth is the session binding: `runPluginForkedTurn` checks the admitted target, retains the session lifetime and passes the bound run (+23 net), and `prepareInProcessAgentExecution` admits it through the own-session path (+7 net). The `exec` rule moves into `prepareSessionFork` (+8 net); the rest is scope/type plumbing and doc comments. The earlier revision's scope sniffing, `read`/`ls` allowlist, WebChat requester check and `requiredForkProfileId` are gone. Reported by @etzelm in [the downstream issue](obviyus/openclaw-better-prompt#1). ## Worked on by - @etzelm Co-authored-by: etzelm <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
createRequirefromnode:moduleinsrc/version.tscreateRequireonly at runtime when a Node environment is actually availableWhy
The Control UI browser bundle was pulling
src/version.tsthrough Vite/Rollup. The staticnode:moduleimport was externalized for browser compatibility and then failed the build becausecreateRequireis not exported by the browser shim.Impact
createRequirewhen bundling browser codeui:buildsuccessfully after upgradeValidation
mac-mini.lanrh-bot.lanNotes
This is intentionally a single-file fix to prevent the install-time hotfix from regressing on the next update.