Commit Graph

65 Commits

Author SHA1 Message Date
Peter Steinberger cef071582e feat: let limited browsers request admin access (#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
2026-08-12 18:32:00 -07:00
Peter Steinberger 7c7c7524ad feat: add paired-device worker provider foundation (#122769)
* feat(worker-provider): add core device lease foundation

* feat(gateway): dispatch sessions to paired devices

* test(gateway): cover node-ready lifecycle edge

* fix(gateway): defer device worker installation prep

* chore(plugin-sdk): refresh API baseline

* test(gateway): isolate worker turn state database

* docs(runners): refresh milestone table format

* test(gateway): track device dispatch temp state
2026-08-12 16:50:09 -07:00
Josh Lehman bb5ef9872a fix: resume sessions interrupted by gateway restarts (#122644)
* fix: resume sessions interrupted by gateway restarts

* fix: make session recovery retry-safe

* refactor: isolate restart session recovery

* test: track recovery temp directories

* fix: inherit recovery state under lifecycle lock

* fix: surface rejected recovery continuation

* fix: fence recovery continuation authority

* chore: regenerate plugin sdk api baselines

* test(gateway): track sessions.recover release train
2026-08-12 16:18:58 -07:00
Peter Steinberger 1ca60fbc3a refactor(agents): make multi-agent ownership explicit (H2-1 core) (#114388)
* refactor(agents): make roster ownership explicit

* feat(config): materialize legacy agent roles

* fix(cron): migrate legacy owners at startup

* feat(gateway): expose agent selection contracts

* fix(gateway): enforce agent-scoped authorization

* docs(config): document explicit agent ownership

* fix(config): pin retained owner workspace

* fix(gateway): target hook wakes at effective agent

* fix(sessions): preserve fixed-store ownership

* fix: preserve retained agent ownership

* fix: preserve legacy agent ownership across runtime surfaces

* fix: fail closed on ambiguous session ownership

* fix: preserve compatibility owners across dispatch and writes

* fix: preserve retained agent projections

* fix: preserve agent ownership compatibility

* fix: preserve per-agent heartbeat guidance

* fix: preserve compatibility owners in generic paths

* fix: enforce configured ownership in session paths

* fix: defer remote roster selection

* fix: preserve ownership across session and config writes

* fix: fail closed on ambiguous restored ownership

* fix: preserve explicit ACP and legacy ownership

* fix: honor durable fixed-store ownership

* fix: enforce fixed-store owner authority

* fix: preserve ownership evidence boundaries

* fix: honor resolved session ownership

* fix: align compatibility ownership paths

* fix: persist legacy main store ownership

* fix: close ownership fallback gaps

* fix(agents): close retained owner compatibility gaps

* fix(agents): enforce session owner resolution

* fix(agents): complete session owner resolution sweep

* fix(agents): preserve durable session ownership

* fix: complete persisted session owner routing

* fix: thread prepared session owners

* fix: preserve stable session ownership

* fix: enforce session ownership boundaries

* fix: close session ownership delta gaps

* fix: reconcile session ownership after rebase

* fix: reconcile ownership with current main

* fix: align session store path imports

* fix: align session store config path import

* fix: reconcile explicit ownership CI

* fix: reconcile ownership rebase checks

* fix: align ownership ci contracts

* fix: align ownership rebase checks

* fix: preserve compatibility owner during setup

* fix(doctor): migrate ownerless heartbeat monitors

* fix(gateway): preserve explicit session ownership

* test: align ownership fixtures after rebase

* test: complete plugin manifest fixture

* test: align runtime context mocks

* fix(gateway): preserve alias routing for existing sessions

* style: format agent routing update

* fix(gateway): preserve selected owner during alias routing

* style: normalize rebased ownership files

* fix(gateway): preserve owner through global alias routing

* fix(gateway): preserve explicit ownership at HTTP boundaries

* fix(gateway): validate compatibility model ownership

* fix(agents): reconcile strict session ownership

* fix(agents): contain media yield callback failures

* fix(agents): avoid eager bare-key owner resolution

* chore: refresh rebased ownership baselines

* chore: align hosted plugin SDK baseline

* chore: refresh ownership baselines after main sync

* chore: refresh ownership baselines after main sync

* test: align routed event owner fixtures

* chore: retrigger CI after runner startup failure

* chore: refresh ownership SDK budgets after main sync

* fix(tasks): require agent identity for bare owners

* chore: align Linux plugin SDK baseline

* chore: remove release-owned changelog entry
2026-08-12 15:55:16 -07:00
Peter Steinberger 6b9bea84f0 feat(node-host): supervise durable worker launches (#122829)
* feat(node-host): add worker launch supervision

* fix(node-host): harden worker lifecycle ownership

* fix(node-host): harden worker execution boundary

* fix(node-host): preserve worker trust settings

* chore(plugin-sdk): refresh worker lifecycle baselines

* docs(plan): track runner implementation slices

* test(node-host): await runtime shutdown owner
2026-08-12 15:24:05 -07:00
Peter Steinberger b6548e509a refactor(state): retire commitments schema (#122176)
* refactor(state): retire commitments schema

* fix(state): complete commitments retirement safeguards

* test(state): expect doctor retirement report

* test(state): prove doctor v7 markers atomically

* fix(state): align schema support metadata

* fix(state): report actual commitments retirement

* fix(state): validate retired commitments schema

* fix(state): preserve early commitments upgrades

* fix(state): require exact commitments index set

* fix(state): reject non-exact retired schemas

* fix(state): recognize supported retirement layouts

* fix(state): expose commitments retirement to doctor

* fix(voice-call): describe commitments retirement

* test(state): align v7 rebase proof

* fix(state): protect commitments retirement dependencies

* fix(state): accept partial commitments layouts

* chore(docs): refresh v7 api baselines
2026-08-12 14:21:34 -07:00
Peter Steinberger 0c824f09d5 feat(gateway): observe paired node desktops (#122724)
* feat(gateway): stream paired node desktops

* chore(protocol): refresh desktop observe model

* fix(gateway): preserve desktop stream boundaries

* fix(gateway): keep desktop streams lifetime-bound

* fix(gateway): harden node desktop stream lifecycle

* fix(gateway): stabilize node desktop lifecycle setup

* chore(plugin-sdk): refresh API baselines
2026-08-12 13:17:45 -07:00
Peter Steinberger dceb2c343c refactor: retire due compat-ledger surfaces (context-engine host params, deactivate alias, logging internals) (#121845)
* refactor(plugins): retire deactivate hook alias

* refactor(plugin-sdk): prune retired facade exports

* test(logging): isolate logger test controls

* refactor(logging): internalize file transport controls

* test(plugin-sdk): preserve retired facade coverage

* test(auto-reply): remove stale diagnostic imports

* refactor(logging): delete dead config-read guard

shouldSkipMutatingLoggingConfigRead had no production caller even on main;
it survived the dead-export scan only via logger's testApi re-export. The
test-isolation commit removed that mask, exposing the fossil. Delete the
guard, its test-only re-export, its mock entry, and its dedicated test file.

* refactor(plugin-sdk): retire due compatibility subpaths

* test(plugin-sdk): type group policy predicates

* refactor(plugin-sdk): split removed subpath records

* refactor(secrets): remove retired collector barrel

* test(plugin-sdk): tighten wildcard surface pin

* refactor(plugin-sdk): retire matrix facade metadata

* style(plugin-sdk): format facade metadata

* fix(ci): load channel setup contracts from source

Repair the main-owned regression from 99d662473c (Peter Steinberger): the new env-contract test could consume stale ignored dist metadata instead of the checked-in plugin declaration.

* test(plugin-sdk): refresh API baseline after rebase
2026-08-12 12:41:27 -07:00
Gio Della-Libera 1ec4e4582e fix(claws): freeze installed tool profile authority (#121327)
* fix(claws): freeze installed tool profile authority

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085

* chore(claws): normalize consent helper file modes

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085

* fix(claws): preserve consented tool authority

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085

* chore(claws): normalize source file modes

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085

* chore(claws): allowlist runtime provenance probe

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085

* fix(claws): close consent review gaps

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085

* docs(claws): require concrete frozen tool grants

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085

* fix(claws): reject dynamic MCP selectors

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085

* fix(claws): type profile resolution at parse boundary

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085

* fix(claws): preserve bounded update authority

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085

* fix(claws): prepare consent provenance at config load

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085

* fix(claws): isolate consent provenance failures

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085

* fix(claws): keep runtime grants inside consent

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085

* fix(claws): own consent cache in state lifecycle

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085

* fix(claws): guide legacy full profile repair

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085

* chore(claws): keep consent cache internals private

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085

* fix(claws): satisfy strict consent cache types

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085

* fix(claws): fail closed when state cache closes

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085

* fix(claws): integrate consent cache with state owner

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085

* fix(claws): fail closed before consent state opens

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085

* fix(claws): resume legacy v1 profile installs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085

* test(claws): isolate legacy resume regression

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085

* fix(claws): follow tool policy normalizer rename

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085

* fix(claws): bind runtime consent to agent config

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085

* chore(claws): normalize digest helper mode

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085

* fix(claws): drop stale digest helper import

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085

* test(runtime): keep snapshot mocks complete

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085

* fix(claws): retain bounded legacy profile plans

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085

* fix(claws): verify ownership before runtime consent

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085

* test(claws): remove stale runtime import

* fix(claws): drop stale add import

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085

* fix(claws): resume failed v1 promotion

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085

* test(claws): codify cold-state authority fence

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085

* chore(plugin-sdk): refresh API baseline

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085

---------

Co-authored-by: Gio Della-Libera <235387111+giodl73-repo@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: db3a73db-01ff-428e-a451-b7b710cd5085
2026-08-12 11:37:04 -07:00
Josh Avant 1b36f42653 fix(audit): preserve numeric decision cursors (#122619) 2026-08-12 13:08:25 -05:00
Peter Steinberger 508dd471b0 feat(slack): live session cards as the default progress mode (#122552)
* feat(slack): render live session cards as the default Slack progress mode

Slack streaming.mode default flips partial->progress.
Progress mode renders one live Block Kit session card with a status header, narration, plan, activity, diff stat, and elapsed time; it is edited in place and finalized to success or error with an Open in OpenClaw button when gateway.publicOrigin is set.
Final assistant text always delivers separately.
The shared progress compositor gains a success-only additive per-turn diffStat mirroring the task ledger fold.
resolveGatewayPublicOrigin is exported through the plugin SDK.
The diffs viewer URL falls back to publicOrigin.
The old rich/text progress render fork is deleted.
Native task cards remain unchanged and opt-in.

* chore(config): regenerate bundled channel config metadata

* refactor(slack): keep session card state type internal

* refactor(slack): split session-card and diff-stat owners under lint ceilings

* refactor(channels): reuse diff-stat type from its owner module

Import ChannelProgressDraftDiffStat from progress-draft-diffstat instead of
redeclaring it in the compositor, resolving the all-exports deadcode scan.

* chore(plugin-sdk): regenerate api baselines for channel barrels

Baselines drifted after the rebase reconciled them against main; regenerate to
match the branch's actual channel-message/channel-outbound surface.

* fix(slack): drop a session card that cannot terminalize after final delivery

If the final reply is delivered but the terminal card edit fails, the caller
now clears the stale card instead of leaving it stuck in its Working state
(mirrors the pre-card preview cleanup). Adds a transport-failure regression and
corrects three tests that asserted the prior ignore-the-result behavior.

Documents resolveGatewayPublicOrigin as a dependency-light runtime helper on the
config-contracts SDK subpath, which previously described a type-only surface.

Addresses ClawSweeper P2 (unfinalized card) and P1 (runtime SDK contract).

* fix(slack): suppress default tool messages under the default progress card

resolveChannelStreamingSuppressDefaultToolProgressMessages re-derived the stream
mode from config with an "off" default, unlike its sibling resolvers which take
a caller-resolved mode override. After this branch made progress the Slack
default, a default-config channel turn saw mode "off" and left a stray
"Using tool: X" plain message posting alongside the session card. Thread the
caller-resolved mode through (compositor passes params.mode; Slack dispatch passes
slackStreaming.mode), matching resolveChannelStreamingPreviewToolProgress.

Retarget the progress-session-card delivery-trace golden at an EMPTY Slack config
so it proves the real default path; the regenerated golden is byte-identical,
confirming defaults now yield the clean card sequence (one card post, separate
final text, one terminal update with the Open in OpenClaw button, no stray tool
message). Switch the dispatch delivery-mode mock to the real resolver so the card
tests exercise the true channel default (automatic), not a hand-rolled one.

* chore(plugin-sdk): regenerate api baselines for the streaming mode param

resolveChannelStreamingSuppressDefaultToolProgressMessages gained an optional
mode override; the changed signature reflows the surface hash of every barrel
that re-exports it, so regenerate the affected baselines.

* chore(config): regenerate config baselines
2026-08-12 10:38:31 -07:00
Peter Steinberger 99d662473c fix(channels): fail-fast headless channel setup with plugin-declared env contracts (#122530)
* fix(channels): validate headless channel setup

* docs(channels): document headless provisioning

* fix(channels): repair setup metadata typing

* chore(channels): regenerate official channel catalog for env metadata

* fix(slack): keep mode-conditional env contract plugin-owned

Static --use-env declaration keeps only the unconditional SLACK_BOT_TOKEN;
socket-vs-HTTP conditional requirements (app token, signing secret) stay in
Slack's own setup validation so HTTP mode no longer demands an irrelevant
SLACK_APP_TOKEN.

* chore(sdk): regenerate api baselines and catalog after rebase

* fix(slack): align manifest env declaration with runtime contract

* chore(sdk): regenerate api baselines after rebase

* chore(sdk): regenerate api baselines after rebase

* chore(sdk): regenerate api baselines after rebase
2026-08-12 17:12:15 +00:00
Peter Steinberger 522f06ffc6 feat(worker): support direct Gateway connections (#122683)
* feat(worker): support direct gateway connections

* docs(plan): link node worker provider PR
2026-08-12 09:59:29 -07:00
Peter Steinberger df4e6666c6 refactor(voice): promote realtime voice policy to talk owner (#122668)
* refactor(voice): promote realtime voice policy to talk owner

Move the exact-speech protocol (typed consult-call outcome instead of
string scraping), agent-proxy session instructions, and consult/wake-name/
barge-in policy defaults from the Discord plugin into src/talk, exported
additively via openclaw/plugin-sdk/realtime-voice. Wake-name enablement now
keys on a supportsActivationNameGating provider capability instead of a
hardcoded provider id. Follow-up to the voice split (#122479).

* fix(talk): bind exact-speech bypass to retained session state

Per ClawSweeper review on #122668: the protocol marker is untrusted model
tool-call text; only a parsed answer matching a currently retained
exact-speech text may select the privileged replay path. Unretained
marker calls route to a normal consult.
2026-08-12 09:44:19 -07:00
Peter Steinberger c23d66e3b5 refactor: consolidate coercion ownership (#122692)
* refactor: consolidate coercion ownership

* test: align shard check with weighted planning

* chore: refresh plugin SDK API baseline
2026-08-12 09:25:28 -07:00
Peter Steinberger 28a5889e9b feat: supervise headless Linux host desktop (#122677)
* feat(gateway): manage headless Linux host desktop

* chore(plugin-sdk): refresh API baselines

* fix(gateway): tighten managed desktop status proof

* style(gateway): satisfy managed desktop lint

* fix(gateway): preserve explicit port probe result

* fix(doctor): avoid inferring managed desktop runtime state
2026-08-12 08:56:34 -07:00
Peter Steinberger 8624b9acb8 feat(gateway): recover channels and health promptly after host sleep (#122489)
* feat(gateway): recover channels and health promptly after host sleep

A dependency-free thaw detector rides the existing 30s maintenance tick:
when the process resumes after being frozen >=45s beyond cadence (laptop
sleep, VM pause, SIGSTOP), the gateway restarts running channel accounts
(dead sockets otherwise take up to ~35 minutes to notice), refreshes
health/presence, and resets the event-loop histogram so the freeze does
not read as degradation. Admission is rechecked before every recovery
side effect; a suspension beginning mid-recovery re-pends the thaw, and
timed-out channel stops complete their two-call restart in one pass.

The macOS app cooperates: NSWorkspace sleep/wake observers in
GatewayConnectivityCoordinator best-effort prepare a local gateway
suspension before sleep and resume it on wake, never blocking sleep.
The lease is bound to the route that prepared it and always cleared on
wake; route or mode changes across sleep drop it to self-expiry.

Live proof: SIGSTOP 85s on an isolated dev gateway -> 'host thaw
detected: process was frozen ~57683ms', channels restarted, health ok,
eventLoop degraded=false after thaw.

* fix(macos): resume a sleep lease whose prepare response arrives after wake

A prepare completing after didWake previously discarded the lease id,
fencing the gateway until the two-minute expiry after micro-sleeps; the
late response now resumes immediately. Document the conservative
route-token drift tradeoff.

* fix(macos): retry wake resume after refreshing the dead post-sleep transport

After real sleep the WebSocket is usually dead exactly when resume runs;
refresh the endpoint first, then attempt resume up to three times with
bounded delays, clearing the lease only on success or exhaustion. A new
sleep cycle aborts in-flight retries.

* fix(gateway): bound plugin stopAccount so channel stops cannot wedge recovery

stopChannel awaited plugin stopAccount unbounded; a never-settling stop
hung the thaw restart (and health-monitor sweeps) and held the
single-flight recovery guard forever. Race it against the existing
5s stop timeout; the timed-out path flows into the established
recoveryStopTimedOut two-call restart contract. Regression wedges
pre-fix.

* refactor(gateway): move thaw channel restart off ChannelManager and fence mid-pass

restartRunningChannelAccounts is a standalone helper over the public
manager surface with a shouldContinue probe checked before every stop
and start, so a suspension committing while an account stop is awaited
leaves later accounts untouched. Regression covers the mid-pass close.

* fix(gateway): sanitize late writes from an abandoned stopAccount

An abandoned (timed-out) stopAccount can settle after its replacement
started; route its late setStatus writes through the existing
stale-task sanitizer so they cannot repaint or tear down the
replacement. Regression fails pre-fix.
2026-08-12 08:15:24 -07:00
Peter Steinberger 6e71e9b156 feat(gateway): expose public worker ingress (#122578)
* feat(gateway): expose public worker ingress

* docs(plan): link public worker ingress PR
2026-08-12 07:20:02 -07:00
Peter Steinberger df707a9670 feat: view this machine in the Desktop panel (#122545)
* feat(gateway): add gateway-host desktop source behind desktop.host lab

Introduce the host as a first-class desktop source so operators can view
the machine OpenClaw runs on, not just cloud-worker environments:

- protocol: desktop.observe / desktop.launch with a discriminated
  DesktopSource union (host | environment) plus an additive auth hint;
  EnvironmentSummary gains a top-level desktop flag
- config: desktop.host { enabled, port?, passwordFile? }, Labs-gated
- rfb-probe: pure RFB version/security-type parser used to detect an
  already-running loopback VNC server and classify its auth
- host-source: attaches to 127.0.0.1:<port>, refuses unauthenticated
  (None) and unsupported (VeNCrypt) servers, and refuses ARD with the
  supported alternative until the macOS milestone
- host-guidance: per-OS enablement text so no path dead-ends
- doctor + status report host desktop availability and auth type only

worker.desktop.observe/launch stay as delegating aliases with identical
behavior. Also drops the now-unused WorkerDesktopTunnels type export.

Live-verified against macOS Screen Sharing: probe reads RFB 003.889,
returns security types [30,33,36,35], classifies ard-account.

* test(gateway): probe RFB handshakes through the socket boundary

The probe's banner and security-offer parsers were exported solely so
unit tests could call them, which the dead-export gate rejects and which
tests internals rather than behavior. Keep them module-local and drive
the probe through a scripted loopback server instead.

The boundary tests also cover what pure-function vectors could not:
handshakes split across packets, legacy RFB 3.3 single-word security,
server-rejected handshakes, early hangups, and connect timeouts.

* feat(ui): let the Desktop panel view this machine, not just cloud workers

The Desktop panel was gated on a cloud-worker session placement, so an
operator running OpenClaw locally had no way to see the machine hosting
their main session even with a VNC server running on it.

Availability now follows the advertised desktop.observe method plus
operator.admin instead of session placement, and the picker lists every
environment whose summary reports a desktop, with the gateway row shown
as "This machine". Sources are passed to the generic desktop.observe /
desktop.launch RPCs; the app launcher stays worker-only. When a host
attach needs a password the gateway did not supply, the panel prompts and
keeps the value in memory for that connection only.

Adds the hostDesktop Labs toggle for desktop.host.enabled.

* fix(scripts): keep the env-var ratchet usable in shallow checkouts

The env-var budget check resolved its base ref, then hard-failed when
`git merge-base` found no shared ancestor. Shallow clones and grafted
agent checkouts resolve origin/main but truncate the history behind it,
so an advisory growth ratchet took down the whole check:changed gate
with "Could not resolve env-var count merge base for: origin/main".

Only the growth comparison needs a baseline, and the script already has
a no-baseline path. Treat git's exit 1 with empty output (no shared
ancestor) as that case and say so on stderr; a genuine failure still
exits 128 and still throws, and the absolute count-vs-budget check runs
either way.

* test(ui): measure the inline-code chip against its line box

The inline-code spacing test compared the chip's height to a prose text
rect, so it silently measured the monospace font's default line spacing.
That is ~17px on macOS and several px shorter on Linux, so the assertion
passed on CI and failed locally at 4.5 against a 3.75 bound -- after the
bound had already been widened once to chase browser font metrics.

Compare the chip to the paragraph's CSS line box instead, which is what
"the chip must not disrupt the line" actually means and is platform
independent. The horizontal gap stays as-is: it is em-derived padding
plus border, and it is the assertion that catches detached punctuation.

Verified both directions on macOS: the file is fully green, and
restoring the pre-fix 0.15em/0.35em padding still fails the gap
assertion at 5.41.

* feat(gateway): view macOS Screen Sharing from the Desktop panel

Modern macOS only offers ARD account authentication for Screen Sharing,
so the host desktop source refused every Mac. The Gateway now performs
the ARD handshake itself against the loopback server and hands the
browser a plain RFB 003.008 no-auth handshake, so the operator's macOS
account password authenticates the desktop without ever reaching the
browser, the observe result, a URL, or a log.

- rfb-preauth: ARD (type 30) Diffie-Hellman with MD5-derived AES-128-ECB
  credentials, and VncAuth (type 2) bit-reversed DES, both under a single
  10s negotiation deadline; Apple's RFB 003.889 maps to 3.8
- observe-bridge: runs pre-auth before splicing and starts the view-only
  filter at clientInit, since the browser handshake is consumed here;
  worker tokens keep the original version start phase
- host-source: attaches ARD, requiring per-observation credentials that
  live only in the one-shot observer token and are dropped after use
- doctor: offers an explicitly confirmed sudo launchctl repair when
  Screen Sharing is off, and prints the System Settings path otherwise

Live-verified against this Mac's Screen Sharing: the DH exchange and
credential framing are accepted and the server returns SecurityResult.
The VncAuth DES vector is confirmed against OpenSSL independently.
2026-08-12 06:58:30 -07:00
Peter Steinberger ade3456dd4 feat: add one-paste node onboarding (#122499)
* feat(pairing): add short join onboarding

* fix(gateway): isolate device join routing tests
2026-08-12 06:17:39 -07:00
Peter Steinberger 40cb6f0e3b feat(ui): keep Where picker destinations live (#122531)
* feat(gateway): enrich environment summaries

* chore(sdk): refresh plugin API surface

surface drift approved: additive EnvironmentSummary enrichment (runners plan rev 2, milestone 4)

* feat(ui): keep where picker destinations live

* docs: link picker liveness milestone PR

* fix(ui): deduplicate picker locale keys

* test(ui): update picker section expectations

* fix(ssrf): narrow lookup resolver contract

* fix(gateway): publish authoritative environment facts
2026-08-12 05:11:46 -07:00
James Tatum 5235269b3c fix(agents): heartbeats lose all conversation context on claude-cli chat↔heartbeat transitions (#121509)
* fix(agents): resolve session-stable reply mode for direct resolver turns

Heartbeat wakes and other direct getReplyFromConfig callers bypass
dispatch, so no session-stable delivery mode reached their CLI binding
facts and prepare computed no messageToolPolicyHash, while dispatched
chat turns hashed the stable mode. resolveCliSessionReuse treats that
one-sided hash as a policy change, hard-invalidating the binding on
every chat<->heartbeat transition and leaving heartbeats to run in
fresh CLI sessions with no conversation history (historyPrompt=none).

Extract the synthetic-turn stable-mode resolution that
prepareAgentCommandExecution already used into
resolveSessionStableReplyMode, and apply it in prepareReplyRunContext
whenever a synthetic turn arrives without dispatch's injected mode, so
every turn kind on a session derives the same binding facts and hash.

Fixes #121485

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

* fix(agents): derive synthetic binding facts from the dispatch policy owner

Consolidate the synthetic-turn stable-mode resolution onto dispatch's own
policy pieces instead of a simplified parallel resolver:

- resolveVisibleRepliesPolicy is extracted from dispatch prepare-context
  (configured visible-replies guard + harness default chain) and shared, so
  the fallback and dispatch cannot drift on harness defaults, live-vs-entry
  chat facts, or ExplicitDeliverRoute.
- The stable fact now applies dispatch's messageToolAvailable downgrade via
  the canonical tool-policy resolvers: tool-only delivery with a policy-denied
  message tool records automatic, matching dispatch.
- Synthetic turns no longer fall back to their effective turn mode: a
  response-tool heartbeat's message_tool_only is per-turn enforcement, not
  session policy, and previously bypassed the stable fallback entirely.

Regression coverage: response-tool heartbeat facts match dispatched turns,
and a message-tool-denied config downgrades the synthetic stable fact.

Refs #121485

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

* fix(agents): keep the session-stable reply mode sender-independent

Dispatch's stable-mode downgrade used the turn's sender-aware message-tool
availability, so a sender-scoped message denial hashed the stable policy as
automatic on chat turns while sender-less synthetic turns hashed tool-only —
the same binding reset loop on another axis.

resolveStableMessageToolAvailability becomes the one sender-independent
owner: dispatch passes it as sessionStableMessageToolAvailable for the
stable-mode resolution only (effective per-turn enforcement keeps the
sender-aware verdict), and synthetic binding facts already consume it.
Computed only when the visible-replies candidate is message_tool.

Refs #121485

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

* fix(agents): derive stable reply facts from session surfaces, not wake plumbing

Third-pass review fixes on the #121485 consolidation:

- Strip system-event wake providers ("heartbeat", "cron-event") from the
  stable context and resolve origin-less entries as internal, so synthetic
  facts take the same internal-channel branch dispatch's live webchat turns
  do instead of falling through to harness defaults.
- Fall back to persisted session facts (delivery channel/origin, groupId,
  groupChannel/subject, accountId) for the sender-independent availability
  stack, so bare-ctx callers like command prepare resolve the same
  group/account-scoped policies as dispatched turns; dispatch now passes its
  session entry too.
- Collapse the redundant second mode resolution into the availability
  downgrade, surface dispatch's injected stable mode separately from
  resolvePromptSourceReplyMode so the synthetic slot has one owner, and
  reuse resolveTurnModelOverride instead of an inline copy.
- Refresh docs/.generated/plugin-sdk-api-baseline.jsonl: closure hashes only
  (17 exports, zero declaration changes, verified) — plugin-sdk reply/meeting
  entrypoints transitively bundle the reply pipeline this branch refactors.

Regression: origin-less entry heartbeat resolves internal-automatic facts.

Refs #121485

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

* chore: adapt to main module moves and split API baseline

Mechanical rebase refresh onto d3696f8d76: subagent-capabilities moved to
src/agents/subagents/spawn/, and the plugin-sdk API baseline is now
per-entrypoint content hashes (#122082) — regenerated for the reply-pipeline
closure this branch touches.

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

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-12 16:25:38 +05:30
Josh Avant 562391b9af feat(audit): explain denied operator approvals (#119815)
* Audit: add durable decision receipts

* Audit: route generic decision facts through writer

* Audit: satisfy strict decision count typing

* Test: align decision writer type coverage

* Refactor: isolate decision receipt projection

* Fix: preserve ambiguous approval correlation

* Fix decision coverage across pages

* Fix approval coverage across corrupt pages

* Fix decision summaries across retention and paging

* Remove superseded decision fact count path

* Keep session-derived approval links conservative

* Test decision paging at owner boundary

* Audit: bind approval receipts to exact execution

* Test: keep decision receipt coverage focused

* docs(agents): preserve decision receipt ownership

* Docs: refresh Plugin SDK split baselines

* Docs: require opt-in for future decision facts

* Fix: bound decision receipt inspection
2026-08-12 05:23:29 -05:00
Peter Steinberger d44f70eb4b feat(pairing): one-paste device pairing via oc-pair setup links (#120768)
* feat(pairing): one-paste device pairing via oc-pair setup links

Implements milestone 3 from docs/plan/runners.md.

* fix(pairing): sign bootstrap handshake, keep URL candidates, wire pairing countdown

* test(gateway): update client callsite guard

* fix(pairing): preserve setup URL context paths

* fix(ui): keep pairing help aligned with setup mode

* fix(pairing): isolate bootstrap credentials

* perf(ui): keep one-paste pairing within bundle budget

* refactor(pairing): isolate native pair URL prefix parsing

* fix(pairing): preserve candidate lifecycle state

* fix(pairing): retire shared credentials after bootstrap

* fix(pairing): apply rotated manifest through client owner

* test(pairing): prove bootstrap retirement across reconnect

* fix(pairing): preserve native gateway context paths

* fix(pairing): carry native context paths through reconnect

* fix(ios): preserve encoded gateway context path

* chore(plugin-sdk): refresh pairing API baselines
2026-08-12 02:01:33 -07:00
Peter Steinberger 85a176b98a feat(ui): commit-scoped session diff viewer with file, sync, and view menus (#122470)
* feat(ui): commit-scoped session diff viewer with file, sync, and view menus

The Control UI session diff panel becomes a dense Amp-style viewer: per-file
menus (copy path, open file, reveal in file tree, open in editor), a Sync
Locally popover with a copyable git fetch command, view options (collapse all,
wrapping, split/unified layout), and a sticky footer that reports how far the
branch is ahead of its merge base and switches between all changes,
uncommitted work, and individual commits.

sessions.diff gains an additive scope param (all | uncommitted | commit) plus
commits, aheadCount, and mergeBase metadata. Commit-scope diffs read only the
object database, skip untracked collection, and bypass session-start baseline
filtering; unknown commits surface a typed unavailableReason. Offscreen file
bodies use content-visibility so large diffs stay responsive.

* fix(ui): satisfy session diff CI gates

* fix(gateway): fence commit-scoped session diffs to the advertised branch history

ClawSweeper found that commit-scoped sessions.diff accepted any commit resolvable in the checkout. Fence operator.read commit reads to the advertised merge-base..HEAD history and cover sibling-branch and base-history commits.
2026-08-12 01:08:33 -07:00
Peter Steinberger 0de17482ae feat(gateway,ui): quiet Where picker, placement chip, and projects read model (#120804)
* feat(gateway): projects.list groups known checkouts by repo identity

Implements docs/plan/runners.md milestone 4 derived projects read model.

* feat(ui): regroup the Where picker by gateway, devices, and cloud

* feat(ui): placement chip shows where a session runs with reclaim

Implements docs/plan/runners.md milestone 4 placement display and reclaim.
2026-08-12 00:21:23 -07:00
Peter Steinberger 59ea107d09 refactor(agents): delete dead model-selection surface and consolidate compaction targets (#122474)
* refactor(agents): delete dead model-selection surface, consolidate compaction target assembly

Removes production surface with zero live callers: buildConfiguredAllowlistKeys
(orphaned since fallback allowlist filtering was split out), the
retryTransientProviderRuntimeMiss resolveModelAsync option (its gateway startup
prewarming caller was replaced by prepared runtime snapshots), the ignored
useAsyncModelResolution plumbing (kept only as a deprecated no-op field on the
plugin-SDK-shipped prepareSimpleCompletionModelForAgent), and dead facade
re-exports (inferUniqueProviderFromCatalog, ThinkLevel, ModelRefStatus).

Consolidates resolveEmbeddedCompactionTarget's five hand-built result sites into
one assembleTarget helper owning the auth-profile-drop-on-provider-change rule;
resolution precedence is unchanged and now pinned by new table-driven cases
(unique-provider inference, ambiguous literal, profile-suffix preservation).

Net -93 production LOC, -106 test LOC.

* chore(sdk): regenerate plugin SDK API baseline after facade export removals
2026-08-11 23:37:15 -07:00
Vito Cappello 77d89b2fa8 fix(agents): scope quota failures to auth profiles (#121278)
* fix(agents): scope quota failures to auth profiles

* test: repair provider suspension CI coverage

* test: keep suspension reset fixture internal

* fix(agents): spend cooldown probe only on transient candidates

Consume the one-run cooldown probe only when the candidate’s own unavailable reason is transient, so a billing-disabled pin cannot block a recoverable backup.\n\nFinding from the ClawSweeper review on openclaw/openclaw#121278.

* refactor(sessions): deprecate QuotaSuspension.laneId instead of removing

The shipped plugin-SDK surface deprecation policy requires keeping the inert field until the next surface window.

* fix(agents): extend transient probe policy to plugin-harness auth path

* fix(agents): keep provider overload from cooling auth profiles

* fix(agents): exhaust rotation candidates without cooldown records

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

* test(agents): align auth rotation mocks with current main

* docs: regenerate plugin SDK API baseline

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

* style(agents): format session-suspension test after rename resolution

---------

Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-11 23:07:04 -07:00
keshavbotagent 3807eb9c58 fix(codex): preserve allowed tools under channel policy (#122282)
Preserve Codex native tools when conversation policies deny only audited OpenClaw capabilities. Fail closed for computer-control denies and retain structured plan progress.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
Co-authored-by: Kelaw - Keshav's Agent <keshavbotagent@gmail.com>
2026-08-12 05:27:08 +00:00
Peter Steinberger 61ab6a8f9d feat(gateway): make suspend/resume operator-usable end to end (#122100)
* feat(gateway): make suspend/resume operator-usable end to end

A prepared Gateway now accepts authenticated WebSocket connects while
keeping every method except gateway.suspend.* fenced, so a fresh CLI or
controller process can resume a suspension instead of dead-ending on a
rejected upgrade until the two-minute lease expires. Restart drain,
worker ingress, and desktop-observe streams stay fully closed.

The gateway client surfaces non-101 upgrade responses (bounded body
read) as typed retryable errors instead of an opaque 1006 close, and
new openclaw gateway suspend / resume commands drive the whole
handshake, including bounded --wait polling with blocker output.

Live-verified on an isolated dev gateway: prepare, SIGSTOP/SIGCONT
freeze, resume, over-TTL expiry self-heal, conflict and mismatch paths.

* refactor(gateway-client): move wire-client contract types to protocol-client-contract

The connectError addition pushed protocol-client.ts over the 700-line
max-lines gate; split the adapter-facing contract types into their own
module instead of suppressing.

* refactor(gateway-client): keep contract-internal option types unexported

Knip deadcode gates reject exported types with no importer; the connect
and close decision shapes are only referenced inside the contract module.

* chore(plugin-sdk): refresh gateway-runtime API baseline after rebase

* fix(gateway-client): preserve hello type after rebase

* test(gateway): support websocket upgrade rejection events

* test(gateway): expect connection errors in close info

* fix(gateway): keep prepared-suspension connects control-only

Address ClawSweeper review: node and worker connects stay refused while
suspension is prepared (only operator control connects pass), and the
CLI never issues another suspend prepare after its --wait deadline.
2026-08-11 22:12:53 -07:00
Peter Steinberger 7ecad45a7d refactor(context-engine): retire legacy host param default (#122434) 2026-08-11 21:57:46 -07:00
Ayaan Zaidi ec4ae78b75 fix(agents): generate session titles with runtime-owned auth (#122163)
Use the selected harness for isolated title generation, including native Codex auth.
Retry failed dashboard titles from the first user message without overriding manual names.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-12 09:42:16 +05:30
Vincent Koc 2d75a2d328 fix(delivery): settle exact sends dispatched under a producer claim (#121587)
Exact-reconciliation sends skipped pre-send promotion, so dispatch cleared the producer claim without publishing the platform send attempt identity. The post-send ack then failed its ownership guard with "Delivery platform claim was lost", settling provably delivered sends as unknown; since #121833 that ambiguity surfaces as a spurious "couldn't confirm my previous reply" recovery notice. Dispatch now atomically promotes the producer claim into the active attempt and publishes the attempt identity, so successful sends settle and lease renewals keep working. Adds a boundary regression pinning unknown_after_send evidence across a later unclaimed batch dispatch.

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-12 03:21:59 +00:00
joshavant c3e3a09fe6 chore(plugin-sdk): refresh API baseline 2026-08-11 21:52:21 -05:00
Shakker 8efbefe4f6 chore: refresh companion API baselines (#122380) 2026-08-12 03:26:33 +01:00
Peter Steinberger 8876528f7c feat: clone GitHub projects from session picker (#121818)
* feat(projects): add managed GitHub clones

* feat(ui): clone GitHub projects from session picker

* fix(projects): integrate current gateway owners

* fix(protocol): derive Swift error detail accessors

* fix(ui): gate project cloning by scope

* test(gateway): isolate session prewarm probes

* revert: drop duplicate session prewarm repair
2026-08-11 18:49:16 -07:00
Peter Steinberger 964c8c84c1 refactor: consolidate coercion ownership (#122299)
* refactor: consolidate coercion ownership

Centralize four canonical coercion helpers, migrate exact core and plugin duplicates through narrow Plugin SDK facades, and enforce declaration and plugin-normalization ownership boundaries.

The sweep adds eight focused SDK exports while deleting more production and tooling code than it adds. User-visible behavior is unchanged except for safer equivalent object and UI parsing at existing boundaries.

* fix: guard integer option ownership

Register resolveIntegerOption with the canonical function owner and extend the declaration-guard fixture so future local duplicates fail validation.

* fix: keep integer helpers on numeric facade

Remove the unshipped duplicate string-coerce exports and route every affected plugin consumer through the existing number-runtime contract.

* fix: point numeric coercion to number runtime

Make boundary and declaration diagnostics recommend the canonical numeric facade, with failing-before coverage for both guidance paths.
2026-08-11 17:14:53 -07:00
Peter Steinberger cd0a1235a3 feat: sync new-session preferences and recents by identity (#121816)
* feat(gateway): add identity preferences and project recents

* feat(ui): sync new-session identity state

* docs: explain identity-scoped session state

* test: track preference temp directories

* fix(gateway): preserve identity preference boundaries

* chore(protocol): refresh identity preference bindings

* test: refresh historical schema hashes

* style(gateway): format method order assertion

* fix(protocol): emit project recent Swift models

* test(gateway): track preference RPC release train

* fix(gateway): harden identity preference state

* fix(state): keep preference errors internal

* chore: refresh split plugin SDK baseline

* fix(gateway): use core session store loader

* refactor(state): fold additive migration checks

* chore: regenerate plugin SDK baseline

* chore: regenerate plugin SDK baseline

* chore: regenerate plugin SDK baseline

* chore: regenerate plugin SDK baseline

* chore: regenerate plugin SDK baseline

* chore: regenerate plugin SDK baseline

* chore: regenerate plugin SDK baseline

* test(ui): relocate identity recents e2e

* chore: regenerate plugin SDK baseline

* chore: regenerate plugin SDK baseline

* chore: regenerate plugin SDK baseline

* chore: regenerate plugin SDK baseline

* chore: regenerate plugin SDK baseline
2026-08-11 16:52:59 -07:00
Shakker 5ee067cb76 chore: refresh companion API baselines 2026-08-12 01:17:17 +02:00
Shakker 8dc5016460 fix: make companion context fail closed 2026-08-12 01:17:17 +02:00
Shakker 72528033b2 refactor: preserve companion context boundaries 2026-08-12 01:17:17 +02:00
Shakker 281fe1e502 refactor: use canonical companion context owners 2026-08-12 01:17:17 +02:00
Josh Lehman 585503896d fix: preserve WebChat reply context after reloads (#122169) 2026-08-11 15:42:01 -07:00
Peter Steinberger b350f76484 fix(channels): preserve failed agent run reactions (#122009) 2026-08-11 15:26:44 -07:00
Sliverp 84c7d45f15 refactor(qqbot): install plugin from Tencent package (#107295)
* refactor(qqbot): remove bundled extension source

Mechanical deletion half of the #107295 squashed rebase; the catalog
repoint and host integration land in the follow-up commit.

Co-authored-by: sliverp <870080352@qq.com>

* refactor(qqbot): install plugin from Tencent package

Squashed rebase of #107295 onto current main. Repoints the official
external channel catalog at @tencent-connect/openclaw-qqbot@2.0.1 and
adapts onboarding, doctor migrations, secrets, build guards, and tests.

Documents the known limitation that the external package does not
support structured SecretRef clientSecret values; operators move those
to QQBOT_CLIENT_SECRET or clientSecretFile before upgrading.

Co-authored-by: sliverp <870080352@qq.com>

* fix(doctor): reuse shared hasOwnKey record helper

The rebased QQBot migration carried its own hasOwnKey export, colliding
with the one main now ships in legacy-config-record-shared.ts.

Co-authored-by: sliverp <870080352@qq.com>

* fix(plugins): carry catalog integrity through the update bridge

The externalized-bundled-plugin bridge dropped the official catalog's
expectedIntegrity pin, so bundled-user updates installed the external
npm package without integrity verification. The bridge now carries the
pin for the catalog's exact npm spec and both bridge install calls pass
it through; update-channel spec overrides intentionally skip the pin
since it only covers the pinned version.

Co-authored-by: sliverp <870080352@qq.com>

* chore(plugin-sdk): refresh per-entrypoint API baselines

The QQBot compat export and bundled-type removal shift 26 entrypoint
closure hashes in the new split baseline layout.

Co-authored-by: sliverp <870080352@qq.com>

* refactor(qqbot): drop helper reintroduced during rebase

Main's coercion consolidation added this file after the deletion
commit's base; its only consumers were the removed qqbot sources.

Co-authored-by: sliverp <870080352@qq.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-11 15:10:27 -07:00
bᵣᵢₐₙ 8d034a7b61 fix(cron): stop advertising trigger-gated fields when cron triggers are disabled (#122052)
* fix(cron): stop advertising trigger-gated fields when cron triggers are disabled

When cron.triggers.enabled is off (the documented default posture), the
cron tool still advertised job.trigger/patch.trigger, schedule.kind
"stream" with its stream-only fields, and payload.kind "script" — all of
which the scheduler unconditionally rejects. Schema-eager models attach
junk triggers to plain reminder requests, get rejected, and retry-loop
without ever creating the job.

Gate those surfaces on the resolved config so they are only advertised
when the runtime can actually accept them, and swap the trigger guidance
for a short unavailable notice so the model tells the user instead of
polling or silently degrading the request. Config-less construction
paths keep the full surface.

Related: #119455

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

* fix(cron): restore config type import and regenerate schema contracts

Repairs rebase fallout and CI-contract consequences of the trigger gating:

- Re-import OpenClawConfig from config/types.openclaw.js; the rebase crossed
  #121768 which removed the re-export from config/config.js, stranding
  resolveCronTriggersEnabled's signature.
- Guard the destructured tool in the MCP gating test for
  noUncheckedIndexedAccess.
- Collapse the hookContext merge object to one line: the added config
  pass-through tipped openclaw-tools.ts over the max-lines ratchet (701/700).
- Regenerate prompt snapshots (cron description narrowed under
  triggers-disabled harness config; ~3k chars per prompt) and the plugin-sdk
  API baseline (CronToolOptions gained the optional config member, visible
  via codex-mcp-projection).

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

* chore(cron): align schema contracts with current main

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Josh Lehman <550978+jalehman@users.noreply.github.com>
2026-08-11 21:48:14 +00:00
Mariano edb7a1692e fix(telegram): expose live location updates to hooks (#122185)
* fix(telegram): expose live location updates to hooks

* test(telegram): keep location coverage focused

* fix(telegram): emit stopped live locations

* test(plugin-sdk): refresh location hook contracts

* docs(changelog): note Telegram live location hooks

* fix(telegram): complete live-location observer path

---------

Co-authored-by: mbelinky <mbelinky@users.noreply.github.com>
2026-08-11 23:26:23 +02:00
Peter Steinberger 42a4d0a9b8 fix(openai): surface failed realtime response outcomes (#121177)
* fix(talk): type realtime response outcomes

* fix(ci): align realtime outcome contracts

* test(ui): identify completed realtime responses

* chore(plugin-sdk): refresh realtime voice baselines
2026-08-11 14:14:22 -07:00
Ayaan Zaidi 6a4a546593 feat(mcp): per-requester OAuth for MCP servers (#122166)
Per-requester OAuth for HTTP MCP servers: in shared channels each trusted sender connects their own account. New config: mcp.servers.<name>.oauth.identity ("shared" default, byte-identical behavior) and gateway.publicOrigin (HTTPS except loopback) for the new GET /oauth/mcp/callback served on the Gateway HTTP server. Requester tokens are isolated per (channel, account, sender) in mcp_oauth_stores rows (no schema bump); callbacks correlate through a durable state-keyed one-time index with a 10-minute TTL; per-requester servers are fail-closed out of static/scheduled runtimes; unauthenticated senders get a sign-in link with a portable URL button; MCP config mutations clear requester credentials at the canonical owner. mcp status --json keeps the legacy authStatus fields additively. Proven by a two-user self-hosted-Executor E2E through the real gateway callback. Part of #122034.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-11 20:58:51 +00:00
Peter Steinberger e74be5d41d refactor: eliminate final wrapper-shadowing hazards (#122157)
* refactor: disambiguate wrapper-shadowed exports

* test: align renamed session and facade boundaries

* test: cover renamed runtime mock exports

* refactor: align remaining wrapper owner call sites

* test: align overlap-rebased runtime mocks

* refactor: preserve public SDK names after overlap rebase

* chore: regenerate wrapper shadowing baselines

* test: align cron model selection mocks
2026-08-11 13:34:24 -07:00