Commit Graph
81916 Commits
Author SHA1 Message Date
Peter Steinberger ccc4e69052 fix(subagents): hide private commentary from logs and completion announcements (#128584)
* fix(subagents): hide commentary in logs and completion announcements

* refactor(agents): remove obsolete test-only history sanitizer export
2026-08-24 00:57:53 -07:00
Peter Steinberger 68ba1ef641 refactor(xai): share responses tool request transport (#128571)
* refactor(xai): share responses tool request transport

* refactor(xai): remove unused responses body test seam

* test(xai): preserve responses request contracts at fetch boundaries
2026-08-24 00:57:28 -07:00
Peter Steinberger 6530948812 fix(location): reject future-dated cached fixes (#128591) 2026-08-24 00:57:04 -07:00
109cde78be fix(cron): run history omits cache token counters, leaving token totals unexplainable (#124657)
* fix(cron): record cache token counters in run telemetry

CronUsageSummary declares cache_read_tokens and cache_write_tokens, the
gateway-protocol schema and UI types accept them, and the run-history read
path normalizes them, but the single writer of CronRunTelemetry["usage"]
never assigned either field. Both values were already in scope and were
folded into the total_tokens it did write, so every cron run record
reported a total larger than input_tokens + output_tokens with no field
explaining the remainder.

Operators use run history to attribute token spend per job. Cache reads
cost roughly an order of magnitude less than fresh input tokens and the
ratio varies per job, so two jobs with identical input_tokens could differ
severalfold in real cost with nothing in the record to tell them apart.
The remainder was not a usable substitute either: the Math.max against the
provider aggregate means it is the cache buckets or a provider total, and
no field distinguished the two.

Assign both fields when nonzero, matching the adjacent total_tokens guard,
so records from providers reporting no cache usage stay byte-identical and
historical records keep parsing unchanged.

Refs #124647

* test(cron): assert cache counters in diagnostic-events usage record

This assertion pinned the pre-fix shape: the fixture reports cacheRead 7
and cacheWrite 3, and expected total_tokens 160 against input 50 +
output 100. The 10-token remainder it accepted without comment is
exactly the cache buckets, which is the accounting gap this branch
fixes. Updated to assert both counters rather than relax the toEqual,
so the record stays required to account for its own total.

* fix(cron): construct complete run usage without mutation

Co-authored-by: Koduri Mahesh Bhushan Chowdary <mkoduri73@gmail.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-24 00:53:46 -07:00
Vincent Koc 0d43a6abb1 refactor(command-explainer): unify argument projection (#128579) 2026-08-24 00:53:29 -07:00
Peter Steinberger ac129b6298 fix(gateway): preserve active cloud sessions during maintenance (#128588) 2026-08-24 00:52:27 -07:00
37eb9acea3 fix(mcp): preserve nested configuration during setup updates (#124551)
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: zyw02 <zyw02@users.noreply.github.com>
2026-08-24 00:51:36 -07:00
Peter Steinberger e4b36f2e97 feat(ui): open sessions in real browser tabs and keep sidebar visibility per-tab (#128474)
* feat(ui): make sidebar visibility per-tab and free Cmd-click for new tabs

Sidebar visibility was persisted in localStorage, which is shared origin-wide,
so collapsing it in one tab leaked into every other tab and window on reload.
Visibility is view state, not a preference: stop persisting it and keep it in
the tab-local navigation snapshot. Width stays persisted.

A tab whose first load targets one specific conversation now starts collapsed,
seeded once at bootstrap from the canonical session-URL contract so bare /chat
and dashboards are unaffected and SPA navigation never re-collapses. Cmd-B,
the toggle, hover-peek, and the remote UiCommand path all still work.

Cmd/Ctrl-click on a sidebar session row now falls through to the browser so
sessions open in a real new tab or window; multi-select moves to Alt/Option-
click, which previously fell through to the browser's link-download behavior.
Shift-click range selection is unchanged.

* test(ui): prove per-tab sidebar visibility at the browser boundary

Covers the two states that matter: a bare /chat first load keeps the sidebar,
and a tab opened directly on one conversation renders that conversation
full-width with the sidebar collapsed and Cmd-B restoring it. Waits on the
composer, not just the missing sidebar, so the capture cannot pass against a
blank pane.

* fix(ui): narrow new-tab sidebar collapse intent

* fix(ui): collapse sidebar for catalog sessions opened in new tabs

* test(ui): split bootstrap navigation visibility coverage
2026-08-24 00:49:39 -07:00
Peter Steinberger 082cdc8866 fix(nodes): retry automatic placement across eligible devices (#128566)
* fix(nodes): harden automatic placement selection

* test(ui): stabilize lazy module and geometry checks
2026-08-24 00:47:40 -07:00
Heming Zeng 7916caab26 fix(agents): retry incomplete terminal streams (#127338) 2026-08-24 00:47:11 -07:00
Peter Steinberger e62725aa5a fix(cli): render agent identity JSON failures (#128590) 2026-08-24 00:37:16 -07:00
444d79aea3 fix(android): normalize null calendar and contact write fields (#125527)
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: 涧波 <jianbo@digitallifes.org>
2026-08-24 00:33:37 -07:00
Peter Steinberger 92a074944d fix(agents): preserve scheduled reminders across compaction (#128581) 2026-08-24 00:32:38 -07:00
Peter Steinberger b42748ffc6 refactor(gateway): remove duplicate startup service lifecycle (#128582) 2026-08-24 00:31:48 -07:00
Alix-007andPeter Steinberger 115f3dae65 fix(ollama): redact reflected request credentials (#119537)
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-24 00:31:17 -07:00
weiqinlandPeter Steinberger 45b8e650a0 fix(infra): detect virtiofs and 9p filesystems to prevent WAL corruption (#120597)
* fix(infra): detect virtiofs and 9p filesystems to prevent WAL corruption

SQLite WAL requires shared-memory/mmap coherence between processes, which
cross-VM filesystems (Docker Desktop, OrbStack, Podman host bind mounts)
cannot provide. Under sustained write pressure the host<->VM cache can
break silently, leaving zero-filled pages that corrupt the database.

Add fuse.virtiofs, virtiofs, 9p, and 9p2000.L to the rollback journal
policy so databases on these filesystems fall back to journal_mode=DELETE
instead of the unsafe WAL mode.

Closes #120549

* fix(infra): also detect virtiofs via Linux statfs magic number

The CROSS_VM_FILESYSTEM_TYPES check handles virtiofs via mountinfo
(/proc/self/mountinfo and macOS mount), but the statfs fallback in
resolvePathJournalPolicy() had no entry for virtiofs. Add
LINUX_VIRTIOFS_SUPER_MAGIC (0x6b656700) to the rollback-journal
statfs check so virtiofs databases also get journal_mode=DELETE when
the filesystem type is readable via statfs even if mountinfo parsing
is unavailable.

Extends the existing SMB/CIFS/SMB2/NFS statfs rollback test to
include virtiofs.

Closes #120549

* fix(infra): classify 9p via V9FS statfs magic + trim cross-VM comment

Address ClawSweeper P2+P3 findings:

P2: Add LINUX_V9FS_SUPER_MAGIC (0x01021997) to the statfs rollback
fallback in resolvePathJournalPolicy(). Without this, a Linux 9p
filesystem falls through to WAL when /proc/self/mountinfo is
unavailable or the mount entry cannot be parsed, defeating the
cross-VM rollback policy for 9p mounts. Add a statfs regression
case alongside the existing SMB/CIFS/SMB2/virtiofs cases.

P3: Trim the CROSS_VM_FILESYSTEM_TYPES source comment from 7 lines
to 2 lines. Keep the durable filesystem contract note; move the
issue-specific forensic narrative to the PR discussion.

* fix(infra): remove incorrect virtiofs statfs magic, keep V9FS only

Real-environment evidence showed fuse.virtiofs reports FUSE_SUPER_MAGIC
(0x65735546) in statfs, not a distinct virtiofs constant. The Linux UAPI
defines no virtiofs statfs magic matching 0x6b656700, so that branch could
never match in production and was a merge-blocking defect.

virtiofs is still fully covered by the mount-name detection path
(/proc/self/mountinfo + macOS mount), which is where the real fuse.virtiofs
evidence runs. The statfs fallback now correctly handles only 9p
(V9FS_MAGIC 0x01021997), which does have a distinct Linux statfs type.

* chore: trigger PR context check with corrected body

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-24 00:27:21 -07:00
Peter Steinbergerandwangmiao0668000666 040189de3e fix(onboard): reject invalid plugin provider choices consistently (#128574)
Co-authored-by: wangmiao0668000666 <wang.miao86@xydigit.com>
2026-08-24 00:27:13 -07:00
Peter Steinberger e879376f18 feat(control-ui): Cmd+/ keyboard shortcuts overview from a declarative catalog (#128563)
* feat(control-ui): add Cmd+/ keyboard shortcuts overview dialog

A declarative shortcut catalog (keyboard-shortcut-contract/catalog) now owns
every Control UI chord: matching, platform-aware formatting, and the new
lazy-loaded Cmd+/ (Ctrl+/ elsewhere) overview dialog all derive from it, so
the overlay cannot drift from real handler behavior. Migrates the scattered
hardcoded shortcut labels (palette, debug overlay, appearance, sidebar,
terminal, workspace) and the duplicated Apple-platform check onto the catalog,
which also makes the previously meta-only sidebar and workspace chords
reachable on non-Apple platforms. The Slash matcher keeps Latin layouts that
put another printable on the physical Slash key (German Cmd+'-' zoom) intact.

* feat(control-ui): list non-obvious shortcuts in the Cmd+/ overview

Adds the invisible-but-real shortcuts to the catalog: composer history
recall (up/down), Esc dictation cancel, new-session-page submit (follows
the same chatSendShortcut preference as chat send), image-viewer zoom
(+/-/0), and the sidebar multi-select mouse chords (mod+Click,
Shift+Click) via a display-only Click key token. Multi-combo rows now
group their chips on the right instead of spreading across the row.

* fix(control-ui): keep Ctrl+Shift+Backquote toggling the terminal

The catalog matcher's exact-Shift comparison rejected the shipped
Ctrl+Shift+` terminal chord that main's predicate accepted (Shift was
deliberately unconstrained for layouts where the Backquote key is
shifted). Backquote now joins '/' as a Shift-insensitive key, with a
regression test. Found by ClawSweeper review on #128563.
2026-08-24 00:26:56 -07:00
Peter Steinberger e6915d099a fix(cli): reject missing transcript summary paths (#128589) 2026-08-24 00:25:00 -07:00
hidenori-endoandPeter Steinberger 10050cb07e fix(android): preserve channel sender labels across chat history (#119864)
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-24 00:24:43 -07:00
Peter Steinberger b2b362d841 fix(sessions): delete progress cards with session artifacts (#128451) 2026-08-24 00:22:49 -07:00
Peter Steinberger 3fa3276381 feat(nodes): opt-in container isolation for node-hosted worker sessions (#128447)
* feat(nodes): opt-in container isolation for node-hosted worker sessions

nodeHost.workerRuns.isolation=container runs each worker session inside a
Docker-compatible container (docker/OrbStack/podman): stdio launch transport,
exactly two bind mounts (bundle read-only, workspace read-write), allowlisted
env, and the container itself as the durable launch identity — created stopped
and journaled before the descriptor is delivered, killed/removed on cancel,
fence, shutdown, and recovery, with an owned-orphan sweep at startup. Missing
or changed engines disable hosting with an explicit diagnostic instead of
falling back to bare processes. Additive nullable worker_container_json column
on node_worker_launches (schema version unchanged).

* fix(test): base-shape fixture skips additive columns of stripped tables

node_worker_launches is excluded from claw-scoped state schemas, so the
read-only compat fixture cannot drop its additive column there; drop only
columns whose owning table exists.

* fix(test): guard split destructuring in base-shape fixture

* test(state): record worker_container_json in the canonical additive-column list

* fix(nodes): harden container isolation per review findings

- Revalidate the engine daemon target immediately before container creation;
  a replaced daemon receives zero create/start requests (regression proves it).
- A pending launch keeps its worker slot until the journaled container is
  killed/removed; cancellation cannot free capacity over a live container.
- Windows node hosts fail closed at startup for isolation=container with an
  actionable diagnostic (native paths cannot be container mount targets).
- Container identity moves from an additive column to the same-version
  companion table node_worker_launch_containers (bare STRICT, lazily ensured
  on first container write, pruned with the launch journal): the launch table
  is contract-optional and shipped readers reject additive columns there. An
  exact v9 predecessor now provably opens and uses the journal after the
  candidate populated container rows.
2026-08-24 00:19:45 -07:00
Peter Steinbergerandxialonglee 62aca9a785 fix(lmstudio): redact reflected model-load credentials (#128561)
* test(lmstudio): add reflected credential redaction regression

* fix(lmstudio): redact exact outbound credentials in model load error body

* fix(lmstudio): suppress truncated model load error bodies before redaction

* fix(lmstudio): restore redactToolPayloadText import after rebase

* test(lmstudio): add real HTTP-server credential redaction proof

* fix(lmstudio): harden reflected model-load credentials

Co-authored-by: xialonglee <li.xialong@xydigit.com>

* test(lmstudio): isolate reflected model-load transport proof

---------

Co-authored-by: xialonglee <li.xialong@xydigit.com>
2026-08-24 00:18:43 -07:00
Peter Steinberger 4dc083dc29 fix(ui): propagate user accent to Talk Mode and widget frames (#128577)
talk.config forwarded only the operator ui.seamColor, so a user-selected
ui.prefs.accent never reached the native Talk overlay; it now wins with
the same precedence the Control UI applies (regression test fails
pre-fix). The widget-theme observer now explicitly watches the <html>
style attribute that carries the inline accent override instead of
relying on incidental data-theme re-sets.
2026-08-24 00:16:06 -07:00
Peter Steinberger 538791a34c fix(cli): preserve human errors for consumed json flags (#128557) 2026-08-24 00:14:38 -07:00
Ayaan GazaliandPeter Steinberger 834fc445cc docs(channels): scope implicitMentions overrides to the channels that read them (#119320)
* docs(channels): scope implicitMentions overrides to the channels that read them

Only Mattermost, Slack, and Tlon call resolveChannelImplicitMentions, and they
are the only channels whose schemas accept the key. The other documented
producers pass no policy, so allowedImplicitMentionKinds stays undefined and
every produced fact counts as a mention.

* docs(channels): correct implicitMentions override wording

QQBot is a listed reply-to-bot producer with a passthrough schema, so the key
is accepted and ignored there rather than rejected. Also drops 'yet', which
implied a planned rollout while #80234 is still an open product decision.

* docs: limit implicit mention claims to bundled channels

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-24 00:13:35 -07:00
Jesse Merhi 3d06659e31 refactor(scripts): consolidate build memory fixtures (#128506) 2026-08-24 17:10:09 +10:00
Peter Steinberger def37da9f9 fix(gateway): revalidate node command policy at the transport handoff (#128576)
The registry-owned isDispatchAuthorized gate runs after the async
pairing-lease revalidation, immediately before the invoke frame is
sent. Both node.invoke dispatch sites (raw handler and plugin-policy
transport wrapper) computed the command allowlist decision before
calling registry.invoke and only rechecked runtime approval authority
in the closure, so a config reload that revoked the command during the
lease await still dispatched it. Re-resolve the allowlist from live
runtime config inside the closure so late revocations fail closed
without dispatch.

Pins added for previously untested invariants: pairing is validated
before any policy evaluation (unpaired callers cannot probe deny
reasons), a pairing-store failure during admission or during the
registry lease recheck fails closed with UNAVAILABLE and no dispatch,
and the new closure denies dispatch after a mid-flight policy change.
Each new test was verified to fail on the pre-fix code for the
intended reason.

Assessment of Microsoft's Lobster patch 0046 via giodl73-repo/lobster-plugins-and-patches.
2026-08-24 00:09:10 -07:00
Peter Steinberger 65bcdf2f26 fix(discord): report actual delivered message kinds (#128575) 2026-08-24 00:05:07 -07:00
zengLingbiaoandPeter Steinberger 45d6a08a0a fix(imessage): reject malformed base64 attachment buffers (#120216)
* fix(imessage): reject malformed base64 attachment buffers

* refactor(imessage): centralize attachment base64 validation

* fix(imessage): preserve URL-safe attachment buffers

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-24 00:02:36 -07:00
SunnyShuandAyaan Zaidi 02b8ed7b02 fix(channels/turn): clear pending history on error paths (#123193)
Failed channel turns could leave caller-owned pending group history in the next prompt. Finalize it on every terminal path, and filter Telegram rolling context while preserving explicit reply ancestry.

Co-authored-by: SunnyShu0925 <shu.zongyu@xydigit.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-24 12:29:55 +05:30
Peter Steinberger 63afe5e334 refactor(agents): remove obsolete plugin delivery defaults wrapper (#128565) 2026-08-23 23:59:53 -07:00
Peter Steinberger d0944184c8 fix(gateway): refresh health when channel plugins change (#128503) 2026-08-23 23:57:58 -07:00
Masato HoshinoandPeter Steinberger 60613b7447 fix(subagents): bound escaped output for the third child-result call site (#124171)
formatChildResultData was the last of three identical Child result/Subagent result wrapPromptDataBlock call sites without maxEscapedChars/truncationMarker. wrapPromptDataBlockWithTag truncates to maxChars before escaping <>, so an angle-bracket-dense child result (code/XML/HTML output) could still expand the escaped block up to ~4x the intended 512-char budget. Bring this site in line with the other two, already fixed by carrier PR #119731 (agent-steering-queue.ts, internal-events.ts).

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-23 23:56:11 -07:00
Peter Steinberger 68c48422cc fix(cron): fence stale execution generations (#128573)
Assessment of Microsoft's Lobster patch 0008 via giodl73-repo/lobster-plugins-and-patches.
2026-08-23 23:55:15 -07:00
Peter Steinberger f990954337 fix(agents): reject hidden output across model verification and system turns (#128570) 2026-08-23 23:54:28 -07:00
Peter Steinberger 111525eeb7 fix(tui): honor restrictive agent model policies (#117422) 2026-08-23 23:54:22 -07:00
synthandPeter Steinberger 17abdfc78c fix(system-agent): leave reasoning room in local model setup probes (#124405)
* fix(system-agent): increase setup inference probe max tokens from 32 to 128

The 32-token cap starves reasoning models that spend tokens on thinking
before emitting visible text. The probe gets a reasoning-only turn and
reports healthy local models as broken inference.

Increase to 128 tokens to accommodate reasoning model thinking overhead.

Fixes #124345

* fix(system-agent): leave reasoning room in setup probes

Co-authored-by: synthclaw <synthalorian@gmail.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-23 23:46:27 -07:00
Peter Steinberger 2e606d96e1 docs(onboarding): preserve the selected model in setup guide (#128547) 2026-08-23 23:46:23 -07:00
Peter Steinberger 3cb7f6330c fix(reply): preserve streamed audio delivery order (#128558) 2026-08-23 23:38:07 -07:00
Peter Steinberger 3202183b2b fix(telegram): finalize answered media captions correctly (#128526) 2026-08-23 23:37:25 -07:00
RoboClawandroboclaw-bot 4e82e9256b refactor(ui): remove redundant chat reset actions (#128562)
Co-authored-by: roboclaw-bot <309084314+roboclaw-bot@users.noreply.github.com>
2026-08-23 23:33:21 -07:00
Peter Steinberger 3b9c805f11 fix(workers): align catalog model resolution (#128553) 2026-08-23 23:32:54 -07:00
Peter Steinberger 2de095746b test(msteams): cover agent reaction removal parity (#128560)
Parity assessment for Microsoft's Lobster patch 0018 via giodl73-repo/lobster-plugins-and-patches.
2026-08-23 23:30:48 -07:00
Peter Steinberger 8f54c1ad04 fix(gateway): stop secure link creation from hanging (#128545) 2026-08-23 23:28:19 -07:00
Peter Steinberger 8db6cd0e7e perf(test): preserve unit-fast project ownership (#128554) 2026-08-23 23:23:16 -07:00
Peter Steinberger f40cb158b1 fix(onboarding): preserve JSON option rejection output (#128542) 2026-08-23 23:22:54 -07:00
Leon-SK668 78796d8e23 fix(tui): close setup gateway before exit fallback (#121183)
* fix(tui): close setup gateway before exit fallback

* fix(tui): bound setup gateway cleanup fallback

* style: format setup cleanup test

* fix(tui): satisfy shutdown CI guards
2026-08-23 23:22:45 -07:00
Alix-007 d9c350ac7d fix(install): retain backup through final verification (#128502) 2026-08-23 23:21:32 -07:00
Peter Steinberger 74af7163e1 perf(startup): short-circuit dist-internal ESM resolution with explicit module format (#128541)
Node's ESM resolver runs getPackageScopeConfig() for every file: URL to pick
a module format, and each call re-materializes package.json — re-parsing
openclaw's 318-key exports map (~93µs/call, verified on Node 26.5.0). Across
the ~17k module edges of a gateway boot that costs 1.3-2.6s CPU, showing up
in profiles as package_json_reader.get (self time) or attributed inclusively
under any registered resolve hook.

Install a Module.registerHooks resolve fast path from the main-module entry
points that resolves relative "./*.js" imports inside dist/ by URL join with
format "module", skipping scope detection entirely. Behavior-identical: all
145 dist package.json files declare type module and dist contains no
CJS-syntax .js files, so Node would conclude the same format. require()
resolutions, bare specifiers, non-.js targets, out-of-dist parents, and
dist-escaping ../ chains defer to default resolution; source checkouts and
runtimes without registerHooks (Bun) are untouched.

Measured (interleaved same-dist A/B, isolated OPENCLAW_STATE_DIR, macOS,
Node 26.5.0): gateway boot user CPU 5.2s -> 2.9s, self-reported listening
time 3.3-6.6s -> stable 2.1s.
2026-08-23 23:20:19 -07:00