Commit Graph

78615 Commits

Author SHA1 Message Date
Vincent Koc 60784fd8dd fix(auth): retain OAuth refresh ownership through CAS
Punchcard-Session: golden-meadow-cedar-dv
2026-08-13 01:01:20 +08:00
Amp 54734a3f0c fix(scripts): preserve symlinked API barrels 2026-08-12 10:00:58 -07: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
Amp 9b80654d48 refactor(usage): centralize provider response handling
Amp-Thread-ID: https://ampcode.com/threads/T-019ff67a-5d86-7195-9569-725985ac21b1
2026-08-12 09:54:04 -07:00
Amp 70842228b9 chore(ui): satisfy media readiness lint
Amp-Thread-ID: https://ampcode.com/threads/T-019ff689-6180-72ad-b50d-35b6427c5573
2026-08-12 09:47:50 -07:00
Amp 10acea603d refactor(ui): centralize chat media readiness
Amp-Thread-ID: https://ampcode.com/threads/T-019ff689-6180-72ad-b50d-35b6427c5573
2026-08-12 09:47:50 -07:00
wanyongstar 7e21533841 fix(browser): validate extension relay frame fields before handling (#120283)
* fix(browser): validate extension relay frame fields before handling

* refactor(browser): clarify relay frame validation

* style(browser): format relay frame guards

---------

Co-authored-by: Dallin Romney <dallinromney@gmail.com>
2026-08-13 00:46:15 +08: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 7179d21d97 feat(gateway): expose public worker ingress (#122643)
* feat(gateway): expose public worker ingress

* docs(plan): mark public worker ingress in progress

* fix(gateway): harden worker ingress provenance

* fix(gateway): preserve disabled worker ingress response
2026-08-12 09:41:45 -07:00
Peter Steinberger b9f5548b29 test(commands): isolate agent command owner boundaries (#122704)
Amp-Thread-ID: https://ampcode.com/threads/T-019fee8d-665d-707b-a380-23f2a6a1ce03

Co-authored-by: Amp <amp@ampcode.com>
2026-08-12 09:31:23 -07:00
SunnyShu 9594fe4623 fix(media): retain readable images from partial batches (#122361)
Keep readable native images when another attachment fails resolution.
Suppress only unresolved media facts across persisted and transient runner paths.

Co-authored-by: SunnyShu0925 <shu.zongyu@xydigit.com>
2026-08-12 21:57:31 +05:30
Markus Hartung 4e12d0556b feat(ai): continue stateful OpenAI SSE turns (#122194)
* feat(ai): continue stateful OpenAI SSE turns

Use the prior OpenAI Responses ID for native stateful HTTP/SSE turns, retry missing server state with full history in the same turn, and keep stateless/custom routes unchanged.

Co-authored-by: Markus Hartung <mail@hartmark.se>

* test(ai): assert Responses retry attempt metadata

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-12 09:25:51 -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
sholomsbs33 7c58151445 fix(agents): validate process actions at the schema boundary (#81157)
Make the process action enum authoritative for model-facing validation and direct executor calls, rejecting malformed actions before session lookup.

Refs #69582.


Punchcard-Session: clear-orchard-timber-c2

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
Co-authored-by: adone0 <vladyslav.yavorskyi@outlook.com>
2026-08-13 00:25:03 +08:00
Vincent Koc 7fa5442fc1 fix(qa): accept cumulative compaction counts (#122680) 2026-08-13 00:19:49 +08:00
Vincent Koc c76c6cd8a7 fix(ci): stabilize sqlite vacuum interruption proof (#122700) 2026-08-13 00:16:44 +08:00
Peter Steinberger f29d581ab8 fix(agents): preserve session classification (#122697) 2026-08-12 09:12:14 -07:00
Peter Steinberger 6093e3477d fix(cli): make doctor --json imply read-only lint mode (#122662)
* fix(cli): make doctor json imply lint

* fix(cli): preserve doctor session selector errors
2026-08-12 09:04:51 -07:00
Vincent Koc 44335ac7ce fix(e2e): strip private ai fixture dev dependencies (#122678) 2026-08-13 00:03:48 +08:00
Peter Steinberger 71e8cc033b refactor(qa): remove gateway child test facade (#122693)
* refactor(qa): remove gateway child test facade

* test(qa): refresh scenario source references

* fix(qa): preserve packaged auth redaction boundary
2026-08-12 09:03:40 -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 1f8fdf4ef0 refactor(memory-core): consolidate manager test fixtures (#122671)
* test(memory-core): consolidate manager index fixtures

* test(memory-core): table-drive manager state cases

* test(memory-core): type shared fixture surface
2026-08-12 08:50:09 -07:00
Peter Steinberger 0f4640a887 refactor(openai): consolidate realtime test fixtures (#122670)
* test(openai): consolidate realtime voice fixtures

* test(openai): table-drive realtime voice cases

* test(openai): remove redundant realtime coverage

Browser auth remains covered by 'requires Platform auth before minting browser realtime client secrets' in realtime-voice-browser-auth.test.ts.\n\nCancelled, failed, and incomplete tool output remains covered by 'normalizes .status without closing the reusable socket' in realtime-voice-terminal-outcomes.test.ts.\n\nCommitted oversized finals remain covered by the 'after item commit' row in realtime-transcription-provider.bounds.test.ts.
2026-08-12 08:39:26 -07:00
Vincent Koc 9e8995384b fix(slack): retry transient member auth lookups (#122356) 2026-08-12 23:38:43 +08:00
Amp 91197bf8d1 refactor(fireworks): flatten Kimi stream wrapper 2026-08-12 08:36:33 -07:00
Amp 72f4ee2274 refactor(meta): inline response payload patching 2026-08-12 08:36:33 -07:00
Amp 22d437def9 refactor(cohere): flatten stream payload wrapper 2026-08-12 08:36:33 -07:00
Amp a85cd94dde refactor(scripts): share wildcard re-export scanner 2026-08-12 08:35:35 -07:00
Peter Steinberger 14b0011866 fix(imessage): preserve imsg retry-safe no-send result (#122672)
* fix(imessage): preserve retry-safe delivery failures

* test(imessage): avoid shadowing retry error

* test(imessage): assert approval account routing
2026-08-12 08:32:45 -07:00
Vincent Koc d5f995c388 fix(slack): preserve original bytes for forced media (#122667)
Punchcard-Session: crisp-valley-brook-8r
2026-08-12 23:32:32 +08:00
Peter Steinberger 8060ef8937 refactor(gateway): split Control UI auth test coverage (#122660)
* test(gateway): split control UI auth suite

* test(gateway): consolidate control UI auth fixtures

* test(gateway): clean up split auth fixtures
2026-08-12 08:32:06 -07:00
Vincent Koc 282e6a47ae test(telegram): support fixed-delay Mantis proof (#122642)
Punchcard-Session: amber-harbor-timber-mb
2026-08-12 23:20:34 +08:00
clawsweeper[bot] 0f5984f4e1 fix(agents): bound task-completion result prompts (#119731)
Punchcard-Session: clear-timber-harbor-ac
Reported-by: Justin Li <justin7974@users.noreply.github.com>

Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: Daniel Nylander <yeager@users.noreply.github.com>
2026-08-12 23:20:09 +08:00
Vincent Koc 742f00c53b test(agents): preserve output across process polls (#122664)
Punchcard-Session: brisk-willow-summit-z9
2026-08-12 23:19:26 +08:00
Peter Steinberger 08454c9bab test(gateway): avoid repeated session row setup (#122675)
Amp-Thread-ID: https://ampcode.com/threads/T-019fee8d-665d-707b-a380-23f2a6a1ce03

Co-authored-by: Amp <amp@ampcode.com>
2026-08-12 08:16:58 -07:00
Peter Steinberger 3fc7d8b9a3 fix(ci): fail OpenGrep on Git discovery errors (#122676) 2026-08-12 08:16:19 -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 37b4fc8621 feat(backup): recorded runs, scheduled backups, and git-backed versioned snapshots (#122485)
* refactor(infra): extract shared git exec and verified snapshot-copy helpers

Moves the worktrees git wrapper to src/infra/git-exec.ts (with optional
maxOutputBytes for large buffered reads) and the online-backup/sanitize/
VACUUM/verify snapshot step into src/snapshot/openclaw-snapshot-copy.ts so
snapshot backends share one hardened copy path. Behavior-identical moves;
all importers updated.

* feat(snapshot): git-backed versioned SQLite snapshot engine

Deterministic per-table JSONL dumps (PK-ordered, lossless bigint/blob
encoding), verbatim DDL preservation, virtual/shadow-table skipping with
FTS rebuild on restore, secret-table redaction policy, manifest with
per-table row counts and content hashes, and restore verification by
re-serialization. Unchanged data produces no commit.

* feat(backup): recorded runs, freshness surfacing, and scheduled git backups

Every backup attempt is recorded in the previously writer-less backup_runs
table (bounded to 200 rows). openclaw status gains a Backups overview row
and JSON payload; doctor prints an informational hint when no successful
backup is recorded or the newest is stale. New commands: backup git
init/create/log/verify/restore and backup enable/disable, which provision
one idempotent gateway cron job running scheduled git backups.

* fix(state): stop bumping schema_meta.updated_at on unchanged opens

updated_at now records when schema metadata actually changed instead of
when the database was last opened; unconditional bumps dirtied the row on
every open and defeated no-change backup detection.

* docs: document versioned git backups, scheduling, and backup freshness

* fix(backup): satisfy CI ownership checks

* fix(backup): complete CI contract coverage

* fix(backup): complete credential table redaction

* fix(backup): isolate git repository ownership

* fix(backup): persist push degradation

* fix(backup): atomically converge schedules

* fix(status): isolate backup freshness environment

* fix(status): carry scan environment to freshness reads

* fix(backup): harden Git repository ownership

* docs(backup): document Git repository safety

* fix(backup): non-creating outcome log and origin preflight for pushed schedules

Recording a backup outcome never bootstraps an absent state database (a
failed backup on a fresh host would otherwise create a blank DB that a
retry treats as real input), and backup enable --push now requires the
repository to have an origin remote, pointing at backup git init --remote
instead of scheduling permanently degraded pushes.

* refactor(worktrees): use shared git exec helpers

* refactor(worktrees): remove unused git buffer wrapper

* refactor(worktrees): consume buffered git helper

* feat(backup): redact pushed schedules by default

Unattended recurring pushes retain credential-bearing tables durably in
remote Git history, so backup enable --push now defaults to
--exclude-secrets; --include-secrets is the explicit full-fidelity
override (still warned). Local non-push schedules keep full fidelity for
complete restores.

* fix(backup): redact audit HMAC and OAuth pending state; tolerate absent backup_runs

Adds audit_identity_keys (audit HMAC key) and mcp_oauth_pending_authorizations
(live OAuth callback state) to the redaction inventory, and makes read-only
backup freshness treat a same-version database without the additive
backup_runs table as no recorded backups instead of failing before a
writable open converges the schema.

* fix(backup): restrict schedules to local gateways

* fix(snapshot): harden Git restore and redaction

* fix(backup): block pushes of adopted history

* fix(backup): contain commits and pairing secrets
2026-08-12 08:11:22 -07:00
Peter Steinberger 557a8aeab0 refactor(ui): delete the orphaned custodian panel toggle contract (#122663)
Removing the Ask OpenClaw button from the chat workspace rail (#122507) left
CUSTODIAN_PANEL_TOGGLE_EVENT with no production dispatcher, so its event
constant, detail type, panel listener, handleToggleRequest, toggle(), the
shell's deferred-load handler and its forwarding delegate were all dead.

The floating panel keeps its real open path: app-shell-navigation raises
minimizeRequestId when the operator leaves the /custodian route mid-conversation
and the panel opens itself when the store has a real user turn. Preloading is
unchanged and still gated on openclaw.chat, so the panel mounts exactly when it
could be available.

Tests move onto that surviving path rather than being deleted; the unused
custodian.panel.toggle string goes with the contract.

Production LOC: -64, none added.
2026-08-12 08:00:21 -07:00
Peter Steinberger f9f602a0df test(macos): remove body-only smoke probes (#122645) 2026-08-12 07:59:35 -07:00
Amp 189ce7537e refactor(gradium): consolidate speech requests
Amp-Thread-ID: https://ampcode.com/threads/T-019ff438-3b93-77b8-9828-1d3c586cb127
2026-08-12 07:58:43 -07:00
Amp f690c107d7 refactor(inworld): consolidate speech requests
Amp-Thread-ID: https://ampcode.com/threads/T-019ff438-3b93-77b8-9828-1d3c586cb127
2026-08-12 07:58:43 -07:00
Amp 0060f6f5fc refactor(tts-local-cli): flatten audio conversion
Amp-Thread-ID: https://ampcode.com/threads/T-019ff438-3b93-77b8-9828-1d3c586cb127
2026-08-12 07:58:43 -07:00
Amp f01960ca50 refactor(session-url): centralize shared grammar
Amp-Thread-ID: https://ampcode.com/threads/T-019ff438-3b93-77b8-9828-1d3c586cb127
2026-08-12 07:58:43 -07:00
Amp 85b063f732 chore(scripts): reuse file scan helpers
Amp-Thread-ID: https://ampcode.com/threads/T-019ff438-3b93-77b8-9828-1d3c586cb127
2026-08-12 07:58:43 -07:00
Amp b8e5b15c0a refactor(media): flatten output formatting
Amp-Thread-ID: https://ampcode.com/threads/T-019ff438-3b93-77b8-9828-1d3c586cb127
2026-08-12 07:58:43 -07:00
Amp bfeb0ab3c1 refactor(gateway): share test fixture reset state
Amp-Thread-ID: https://ampcode.com/threads/T-019ff438-3b93-77b8-9828-1d3c586cb127
2026-08-12 07:58:43 -07:00
Amp 5451518f34 refactor(ui): consolidate workboard overlay filtering
Amp-Thread-ID: https://ampcode.com/threads/T-019ff438-3b93-77b8-9828-1d3c586cb127
2026-08-12 07:58:43 -07:00
Amp 41732aaccd refactor(media): use shared model normalization
Amp-Thread-ID: https://ampcode.com/threads/T-019ff438-3b93-77b8-9828-1d3c586cb127
2026-08-12 07:58:43 -07:00
Amp 04a94ba69f refactor(projects): remove duplicate origin lookup
Amp-Thread-ID: https://ampcode.com/threads/T-019ff438-3b93-77b8-9828-1d3c586cb127
2026-08-12 07:58:43 -07:00