Commit Graph

45236 Commits

Author SHA1 Message Date
Dallin Romney 598bc331fd Merge remote-tracking branch 'origin/main' into codex/prepared-thinking-reload 2026-08-24 15:49:51 -07:00
Peter Steinberger c50f90251e fix(gateway): surface cloud workspace recovery failures (#128864)
* fix(gateway): record workspace recovery failures

Persist bounded, deduplicated recovery-attempt failures through the session transcript while preserving pending workspace result fences, and prefer current recovery errors over stale terminal reasons.\n\nRefs #128850

* fix(gateway): revalidate recovery transcript ownership

Recheck the canonical session mapping inside the queued transcript transaction so a rebound session cannot receive a stale workspace recovery diagnostic.\n\nRefs #128850
2026-08-24 15:38:25 -07:00
Josh Avant d74555299d fix(agents): keep Unicode filename reads inside workspace (#128873) 2026-08-24 15:03:32 -07:00
Peter Steinberger 5f9fda20c9 fix(cron): route script notifications to their owning agent (#128856) 2026-08-24 14:26:01 -07:00
Peter Steinberger be509faf94 fix(cli): emit JSON parse errors for default-machine commands (#128861) 2026-08-24 14:15:23 -07:00
Peter Steinberger d48166515e fix(plugins): surface load errors in the default plugin list (#128849)
* fix(plugins): show load errors in the default plugin list

* fix(plugins): preserve disabled plugin descriptions
2026-08-24 14:02:07 -07:00
Peter Steinberger 5775cd3dfa fix(cli): explain empty capability listings (#128852) 2026-08-24 13:44:42 -07:00
Miorbnli 3a17d5993a fix: prevent $-pattern injection in prompt template and approval substitution (#123015)
* fix: prevent dollar-pattern injection in prompt template and approval substitution

Three call sites used String.replace/replaceAll with a string replacement
fed a runtime variable, causing dollar-amp/dollar-1/dollar-backtick
sequences in user-supplied args or approval ids to corrupt the rendered text.

Switch each to a function replacement so the value is treated literally:

- prompt-template-arguments: dollar-ARGUMENTS and dollar-@ substitution
  corrupted slash-command args containing dollar signs
- get-reply-inline-actions: bundle command template expansion had the
  same issue with normalizedArgs
- approval-reaction-runtime: approval id placeholder rendering mangled
  ids containing dollar signs; the iMessage sibling
  (extensions/imessage/src/approval-text.ts) already escapes this

* fix: rebase, drop unproven approval rewrite, add dollar regression

Address review: the approval placeholder helper has no canonical
/approve <id> producer in the plugin-SDK manual fallback path, so its
rewrite is unproven - revert it. Keep the two reachable prompt-template
fixes and add an owner-boundary regression covering literal dollar
sequences in dollar-ARGUMENTS and dollar-@ substitution (fails on the
old string replacement form, passes with the callback form).

* test(auto-reply): cover literal dollar bundle command arguments

* fix(agent-core): resolve prompt placeholders in a single substitution pass
2026-08-24 13:43:23 -07:00
Peter Steinberger 998128abd8 fix(reply): preserve distinct streamed location replies (#128846) 2026-08-24 13:28:09 -07:00
Peter Steinberger 2a39c50227 fix: make full verification hermetic across local environments (#128777)
* test: harden full verification fixtures

* test: resolve main fixture overlap
2026-08-24 13:26:00 -07:00
Peter Steinberger a99317ef97 refactor(gateway): unify bounded chat history across transports (#128844) 2026-08-24 13:06:06 -07:00
Peter Steinberger 9e98229678 fix(plugins): report Git commit updates when package version is unchanged (#128841) 2026-08-24 12:55:47 -07:00
Peter Steinberger b91f1ea6e0 fix(outbound): normalize valid attachment data URLs (#128823) 2026-08-24 12:54:26 -07:00
Vladislav Smolensky 636b00cb04 fix(cli): normalize echoed binary tool outputs (#128699)
* fix(cli): image-heavy Claude CLI turns abort after about fifteen screenshots

The Claude CLI emits every image tool result twice in its stream-json
output: once inside `message.content[].tool_result.content[]` and once in
the `tool_use_result` field it echoes alongside the message. The
normalizer added in #119486 only walks the message copy, so the echoed
copy still counts against the 8 MiB per-turn raw-output budget and is
still retained in the live-turn line buffer.

Walk the whole parsed user record instead, so both copies are stubbed,
and cover the `tool_use_result.file.base64` shape the built-in image
read echoes. openclaw never reads `tool_use_result` (no references in
src), so nothing downstream changes.

[AI-assisted]

* fix(cli): make echoed-payload normalization stack-safe

Addresses the review finding on the recursive walker. The normalizer now
lives in its own module as one canonical entry point, walks the record
iteratively with an explicit stack, and falls back to raw accounting when
a record is too deeply nested for `JSON.stringify` to re-serialize.

Adds a 50,000-deep regression record, built as text because
`JSON.stringify` itself cannot serialize one that deep.

[AI-assisted]

* fix(cli): normalize Agent SDK REPL binary echoes

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-08-24 12:29:56 -07:00
Peter Steinberger 6fe4e11a78 fix(gateway): reuse verified GitHub profiles during outages (#128833) 2026-08-24 12:15:48 -07:00
Peter Steinberger e1a700840a fix(update): keep managed handoff as successor owner (#128212)
* fix(update): make managed handoff own successor

Park the exact native service before Gateway close and coalesce same-root handoff requests so only the detached updater can activate and restart.

* refactor(update): reuse restart ownership helpers

* test(gateway): isolate supervisor restart fixtures

* fix(update): cancel handoff before restart fallback

* fix(update): harden managed service handoff

* fix(update): use canonical SQLite opener

* fix(update): preserve lifecycle runtime boundaries
2026-08-24 11:56:20 -07:00
ClawSweeper a5b5920444 feat(ui): configure capabilities before session start [AI-assisted] (#128081)
* feat(ui): configure capabilities before session start

Reuse the active-chat Plus menu on new sessions, move Draft into it, and persist admin-scoped tool overrides before the initial turn. Closes #128079.

* test(ui): follow new-session Draft menu

* refactor(ui): reconcile new-session capability ownership

* fix(ui): gate terminal launch on capability overrides

Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>

---------

Co-authored-by: RoboClaw <309084314+roboclaw-bot@users.noreply.github.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-08-24 11:47:12 -07:00
Peter Steinberger f533cde954 fix(update): verify complete Control UI assets (#128825) 2026-08-24 11:43:50 -07:00
Peter Steinberger bf83a4dde8 fix(node-host): recover worker hosting after transient initialization failures (#128798)
* fix(node-host): retry worker supervisor initialization

Clear failed initialization ownership for retry, retain valid container supervisors after transient reconciliation errors, and retry from the runtime until capacity becomes authoritative or shutdown cancels the lifecycle.\n\nRefs #128794

* fix(node-host): preserve permanent container mismatch failures

Keep durable engine and daemon-context mismatches on the actionable disabled path while retrying only transient supervisor reconciliation failures.\n\nRefs #128794

* fix(node-host): withdraw hosting on late context mismatch

Stop retrying when a later reconciliation attempt proves a permanent container context mismatch, close the supervisor, and withdraw worker hosting from runner inventory.\n\nRefs #128794
2026-08-24 11:06:52 -07:00
Ayaan Zaidi 5238648a3b fix(chat): show native commentary progress (#128793)
Preserve native provider commentary as keyed progress items across live delivery and history reloads while keeping cursor pagination reachable.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-24 17:58:26 +00:00
Peter Steinberger 3c2667ca40 fix(gateway): fill older chat pages without duplicate transcript storage (#128810)
* fix(gateway): page visible chat history without duplicate storage

* chore: keep release changelog owned by release automation
2026-08-24 10:43:59 -07:00
Peter Steinberger d2d58a58c6 test(ui): split settings node suite by concern (#128788)
* test(ui): split settings node suite by concern

ui/src/app/settings.node.test.ts sat at 999 oxlint-counted lines against
the 1000-line max-lines cap, so any added assertion failed the core lint
shard — and, as in #128474, could pass locally while only the merge ref
tripped the cap.

Split the 42-test monolith along the surfaces it actually covers: the
base file keeps gateway URL derivation, tab-local token handling, and
per-gateway session scoping; preference persistence and layout
persistence move to dotted siblings, matching the existing
settings.sidebar-prefs.node.test.ts precedent. Test names and count are
unchanged (47 across the settings node suites, before and after).

The location/base-path/settings-fixture helpers and the storage
lifecycle hooks are now shared from ui/src/test-helpers/settings-node.ts
instead of being copy-pasted per file; sidebar-prefs drops its duplicate
copies too.

* test(node-host): write fake container-engine state atomically

checks-node-compact-large-3 failed twice on this branch in different
tests of node-worker-supervisor.container.test.ts, most recently with
"SyntaxError: Unexpected end of JSON input" raised from the fake engine's
load() while the supervisor ran `docker rm --force`.

The shim saved container state with a truncating fs.writeFileSync while
sibling shim invocations (rm, inspect, wait, ps) read the same path, so a
reader could observe the zero-length window and exit 1. Write to a
".pending" sibling and rename over the target instead; rename is atomic,
so readers always see a complete previous or next state. The ps handler
filters on the ".container.json" suffix, so pending files are ignored.

A concurrent write/read probe over the old pattern produced 2014 partial
reads in 212900; the same probe over write-then-rename produced 0 in
203468. Not reproducible end-to-end on macOS, where the truncation
window is far narrower than on the loaded Linux shard.
2026-08-24 10:10:19 -07:00
Peter Steinberger dbf4120742 fix(worktrees): stop repeated startup cleanup errors (#128761)
* fix(worktrees): collect ignored nested checkouts

* fix(worktrees): preserve ignored foreign repositories

* test(worktrees): cover empty ignored foreign repositories
2026-08-24 10:02:38 -07:00
ClawSweeper 29f39affc2 fix(agents): resolve terminal from admitted gateway (#128348)
Co-authored-by: RoboClaw <309084314+roboclaw-bot@users.noreply.github.com>
Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com>
2026-08-24 12:46:14 -04:00
Shakker 0fc18f7447 fix: prevent stale transcript projections from publishing (#126947)
Fence transcript projections by source generation so stale rebuilds cannot publish or satisfy readers.

Refs #126914.
2026-08-24 17:38:34 +01:00
Shakker 59abf3de62 feat: persist stateful transcript display semantics (#126943)
Persist stateful transcript display semantics through one shared reducer for incremental and rebuilt projections.

Refs #126914.
2026-08-24 17:36:21 +01:00
Peter Steinberger 053b89d80f improve(ui): open short session links without extra lookup (#128778)
* perf(ui): remove short session route waterfall

* docs: clarify short link gateway requirement
2026-08-24 09:33:20 -07:00
Shakker 59a9221180 feat: persist bounded transcript display rows (#126939)
Persist bounded transcript display rows and lazy projection lifecycle in the per-agent SQLite store.

Refs #126914.
2026-08-24 17:28:49 +01:00
Peter Steinberger 4d8bfab33e fix(gateway): preserve cloud node ownership (#128780)
Keep durable cloud node bindings out of ordinary device placement until enrollment retirement is proven, and fail closed when worker ownership inventory cannot be read.\n\nRefs #128769
2026-08-24 08:53:12 -07:00
Peter Steinberger 28ee832da4 fix(gateway): stamp creation provenance on sessions.patch-created sessions (#128774)
The sessions.patch create path skipped createdVia and createdActor, making the creator own session invisible under createSessionListEntryFilter when gateway.roles sets sessions.others=none.

Thread resolveOperatorSessionCreation through sessions-patch-engine into projectSessionsPatchEntry and stamp only genuinely new rows, mirroring session-create-service. Preserve existing rows and placeholder aliases without restamping their provenance.

Add an owner-boundary regression proving the identified creator can see and update a patch-created session. Follow-up of #128548.
2026-08-24 08:52:32 -07:00
Peter Steinberger 3dec4e3472 refactor(gateway): unify maintenance lifecycle ownership (#128766) 2026-08-24 08:09:33 -07:00
ClawSweeper a6a9f553d0 fix(ui): keep expanded panel controls clear (#128262)
Co-authored-by: RoboClaw <309084314+roboclaw-bot@users.noreply.github.com>
2026-08-24 08:08:01 -07:00
Peter Steinberger a8722e74ec refactor(agents): remove provider discovery test globals (#128758) 2026-08-24 07:45:27 -07:00
RileyJJY b8d6e799a3 fix: agent.wait can return error before the same run later ends successfully (#120606)
* fix(gateway): preserve agent wait through late success

* fix(gateway): keep timed-out agent waits fail-closed

* fix(gateway): recover late lifecycle success across observers

* fix(tui): preserve authoritative terminal outcomes

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-24 06:59:58 -07:00
Peter Steinberger 84fd10db2a fix(gateway): skip worker bootstrap during teardown replay (#128745)
Preserve replay-safe lease adoption, then route destroy-requested node and SSH environments directly through canonical teardown without bundle installation or credential minting.\n\nRefs #128744
2026-08-24 06:58:25 -07:00
Peter Steinberger c7f70f338a fix(sqlite): stage read-only snapshots in private user cache (#128635)
* fix(sqlite): stage read-only snapshots in private user cache

* fix(sqlite): correct snapshot cache and staging diagnostics

* fix(sqlite): diagnose snapshot cache allocation failures

* fix(sqlite): unwrap Windows snapshot staging errors

* fix(sqlite): diagnose sanitized staging allocation errors

* fix(sqlite): scope snapshot staging errors to allocated directory
2026-08-24 06:40:09 -07:00
Peter Steinberger b145e25fea fix(ui): resume session starts after Gateway reconnects (#128661)
* fix(ui): resume session creation after reconnects

* improve(ui): remove redundant appearance reset buttons

* fix(ui): align session protocol and appearance validation

* fix(ui): retain promoted placement session ownership

* fix(gateway): isolate session creation capacity by owner

* test(ui): stabilize hovercard bridge pointer movement
2026-08-24 06:36:51 -07:00
Ayaan Zaidi d50dbfc448 fix(anthropic): show Claude questions as interactive prompts (#128729)
Route Claude Agent SDK AskUserQuestion through OpenClaw's shared structured-input flow across the Control UI and existing channel fallback surfaces.

Fixes #81099.
2026-08-24 19:01:35 +05:30
Peter Steinberger 9f5803079e fix(nodes): require matching launch and turn identity (#128722)
* fix(nodes): align worker launch and turn identity

* test(nodes): stabilize container journal proof
2026-08-24 06:19:32 -07:00
Peter Steinberger 9ee238dd45 fix(tui): restore session setting reset directives (#128731) 2026-08-24 06:12:46 -07:00
Peter Steinberger d4fe9bb583 fix(tui): keep foreign session resets from clearing active chats (#128723) 2026-08-24 06:10:18 -07:00
Peter Steinberger a5733953b8 fix(tui): keep sentence punctuation out of terminal hyperlink targets (#128727) 2026-08-24 06:01:05 -07:00
Peter Steinberger 1c0e02ccb0 refactor(gateway): remove unused resident lifecycle registry (#128710)
* refactor(gateway): remove unused resident lifecycle registry

* chore(gateway): prune deleted registry assertion baseline
2026-08-24 05:57:43 -07:00
Peter Steinberger 0e0ec19291 fix(tui): keep picker request ownership current (#117285) 2026-08-24 05:50:28 -07:00
Peter Steinberger f8a52b90e6 refactor(config): simplify plugin validation state (#128713) 2026-08-24 05:42:42 -07:00
Peter Steinberger 866c78a5e2 fix(cron): retire timer ticks across scheduler restarts (#128678) 2026-08-24 05:33:00 -07:00
Peter Steinberger e31de4a6c0 fix(daemon): audit effective systemd properties (#128705) 2026-08-24 05:10:02 -07:00
Peter Steinberger ad760c9994 fix(ui): show chat before startup metadata finishes (#128652)
* fix(ui): show chat before startup metadata finishes

* test(ui): wait for config save requests

* fix(ui): coalesce dashboard session queries
2026-08-24 05:00:35 -07:00
Peter Steinberger dad94f8f2c fix(agents): stop context-engine work when runs are cancelled (#128607) 2026-08-24 04:55:03 -07:00
Peter Steinberger 7479c18be2 fix(workers): reject conflicting placement identity (#128670)
* fix(workers): reject conflicting placement identity

* refactor(workers): simplify placement identity validation

* fix(workers): validate identity before redispatch
2026-08-24 04:52:15 -07:00