Compare commits

..

1599 Commits

Author SHA1 Message Date
Agustin Rivera
765208ce47 fix(agents): forward all RunClaudeCliAgent params to runCliAgent 2026-04-08 22:34:55 +00:00
Agustin Rivera
9bd8911615 fix(matrix): preserve owner context in local dispatch 2026-04-08 22:34:55 +00:00
Gustavo Madeira Santana
21b8d35e2d fix(agents): harden claude cli wrapper 2026-04-08 22:34:55 +00:00
Gustavo Madeira Santana
cd8fc2f915 fix(cli): preserve owner auth for message actions 2026-04-08 22:34:55 +00:00
Gustavo Madeira Santana
2b4bebb72f fix(gateway): preserve owner auth over bundle MCP 2026-04-08 22:34:55 +00:00
Gustavo Madeira Santana
cc798ce0ef refactor(agents): dedupe message action discovery params 2026-04-08 22:34:55 +00:00
Gustavo Madeira Santana
4e4b6b7a19 test(agents): cover embedded owner discovery context 2026-04-08 22:34:55 +00:00
Gustavo Madeira Santana
019b7797e1 fix(matrix): gate embedded profile hints for non-owner runs 2026-04-08 22:34:55 +00:00
Peter Steinberger
097883282d test: move directive state coverage to pure tests 2026-04-08 22:34:55 +00:00
Agustin Rivera
eb461f25c6 fix(browser): re-check interaction-driven navigations (#63226)
* fix(browser): guard interaction-driven navigations

* fix(browser): avoid rechecking unchanged interaction urls

* fix(browser): guard delayed interaction navigations

* fix(browser): guard interaction-driven navigations for full action duration

* fix(browser): avoid waiting on interaction grace timer

* fix(browser): ignore same-document hash-only URL changes in navigation guard

* fix(browser): dedupe interaction nav guards

* fix(browser): guard same-URL reloads in interaction navigation listeners

* docs(changelog): add interaction navigation guard entry

* fix(browser): drop duplicate ssrfPolicy props

* fix(browser): tighten interaction navigation guards

---------

Co-authored-by: Devin Robison <drobison@nvidia.com>
2026-04-08 22:34:55 +00:00
Peter Steinberger
1e0f0e5444 test: reuse verbose directive reply imports 2026-04-08 22:34:55 +00:00
Peter Steinberger
4319f07afa test: reuse exec directive reply imports 2026-04-08 22:34:55 +00:00
Agustin Rivera
ea6226bf49 fix(browser): harden browser control override loading (#62663)
* fix(browser): harden browser control overrides

* fix(lint): prepare boundary artifacts for extension oxlint

* docs(changelog): add browser override hardening entry

* fix(lint): avoid duplicate boundary prep

---------

Co-authored-by: Devin Robison <drobison@nvidia.com>
Co-authored-by: Devin Robison <drobison00@users.noreply.github.com>
2026-04-08 22:34:55 +00:00
Gustavo Madeira Santana
36aa4f69fb Matrix: report startup failures as errors 2026-04-08 22:34:55 +00:00
Peter Steinberger
96398871d9 auth: persist explicit profile upserts directly 2026-04-08 22:34:55 +00:00
Peter Steinberger
6fbfb36184 test(doctor): mock memory-core runtime seam 2026-04-08 22:34:55 +00:00
Peter Steinberger
9f5b179f7f auth: avoid external cli sync on profile upsert 2026-04-08 22:34:55 +00:00
Peter Steinberger
9d7793ee2e feat: parallelize character eval runs 2026-04-08 22:34:55 +00:00
Peter Steinberger
405a088d60 fix: load QA live provider overrides 2026-04-08 22:34:55 +00:00
Peter Steinberger
00bee7eb5e build: stage nostr runtime dependencies 2026-04-08 22:34:55 +00:00
Agustin Rivera
7637061feb fix(dotenv): block workspace runtime env vars (#62660)
* fix(dotenv): block workspace runtime env vars

Co-authored-by: zsx <git@zsxsoft.com>

* docs(changelog): add workspace dotenv runtime-control entry

* fix(dotenv): block workspace gateway port override

---------

Co-authored-by: zsx <git@zsxsoft.com>
Co-authored-by: Devin Robison <drobison@nvidia.com>
2026-04-08 22:34:55 +00:00
Peter Steinberger
380bff9d13 build: narrow plugin SDK declaration build 2026-04-08 22:34:55 +00:00
Peter Steinberger
ece183233d test: harden Parallels macOS smoke fallback 2026-04-08 22:34:55 +00:00
Peter Steinberger
84d626aba7 fix(memory): accept embedded dreaming heartbeat tokens 2026-04-08 22:34:55 +00:00
Peter Steinberger
082de8f294 test: harden provider mock isolation 2026-04-08 22:34:55 +00:00
Gustavo Madeira Santana
c676d1f636 docs(config): tighten wording in reference 2026-04-08 22:34:55 +00:00
Peter Steinberger
86fabe02b4 test: reuse followup runner imports 2026-04-08 22:34:55 +00:00
Peter Steinberger
3008137c8d test: reuse image generate tool imports 2026-04-08 22:34:55 +00:00
Agustin Rivera
a67fbc6a98 Align remote node exec event system messages with untrusted handling (#62659)
* fix(nodes): downgrade remote exec system events

* docs(changelog): add remote node exec event entry

---------

Co-authored-by: Devin Robison <drobison@nvidia.com>
2026-04-08 22:34:55 +00:00
Gustavo Madeira Santana
c265e3a96b fix(matrix): contain sync outage failures (#62779)
Merged via squash.

Prepared head SHA: 901bb767b5
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-08 22:34:55 +00:00
Peter Steinberger
f578654e14 test: stabilize full-suite execution 2026-04-08 22:34:55 +00:00
github-actions[bot]
659e0d3a2f chore(ui): refresh id control ui locale 2026-04-08 22:34:55 +00:00
github-actions[bot]
b27916cbce chore(ui): refresh pl control ui locale 2026-04-08 22:34:55 +00:00
github-actions[bot]
1455fd0b02 chore(ui): refresh uk control ui locale 2026-04-08 22:34:54 +00:00
github-actions[bot]
ade0f06426 chore(ui): refresh tr control ui locale 2026-04-08 22:34:54 +00:00
Gustavo Madeira Santana
daa9af6bdf docs(matrix): tighten setup and config guidance 2026-04-08 22:34:54 +00:00
github-actions[bot]
fc53ab3e87 chore(ui): refresh fr control ui locale 2026-04-08 22:34:54 +00:00
github-actions[bot]
7a39107f6e chore(ui): refresh ja-JP control ui locale 2026-04-08 22:34:54 +00:00
github-actions[bot]
c0000bed96 chore(ui): refresh ko control ui locale 2026-04-08 22:34:54 +00:00
github-actions[bot]
a35d98def0 chore(ui): refresh es control ui locale 2026-04-08 22:34:54 +00:00
github-actions[bot]
3dff2f08ad chore(ui): refresh de control ui locale 2026-04-08 22:34:54 +00:00
github-actions[bot]
01099af7e7 chore(ui): refresh pt-BR control ui locale 2026-04-08 22:34:54 +00:00
github-actions[bot]
3b851c4366 chore(ui): refresh zh-CN control ui locale 2026-04-08 22:34:54 +00:00
github-actions[bot]
cc4b8e8e79 chore(ui): refresh zh-TW control ui locale 2026-04-08 22:34:54 +00:00
Mariano
4998dc8dd3 feat(ui): add dreaming diary controls and navigation (#63298)
Merged via squash.

Prepared head SHA: 0a2ae66913
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Reviewed-by: @mbelinky
2026-04-08 22:34:54 +00:00
Mariano
bea33a6122 feat(memory): harden grounded REM extraction (#63297)
Merged via squash.

Prepared head SHA: e188b7e26d
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Reviewed-by: @mbelinky
2026-04-08 22:34:54 +00:00
Mariano
ff827bdf04 feat(memory): add grounded REM backfill lane (#63273)
Merged via squash.

Prepared head SHA: 4450f25485
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Reviewed-by: @mbelinky
2026-04-08 22:34:54 +00:00
Peter Steinberger
ef534fbda9 feat(plugins): support provider auth aliases 2026-04-08 22:34:54 +00:00
Peter Steinberger
1bd92102bb test: isolate provider runtime test mocks 2026-04-08 22:34:54 +00:00
Pavan Kumar Gondhi
0014eeedad fix(plugins): prevent untrusted workspace plugins from hijacking bundled provider auth choices [AI] (#62368)
* fix: address issue

* fix: address review feedback

* docs(changelog): add onboarding auth-choice guard entry

* fix: address PR review feedback

* fix: address PR review feedback

* fix: address PR review feedback

* fix: address PR review feedback

* fix: address PR review feedback

* fix: address PR review feedback

* fix: address PR review feedback

* fix: address PR review feedback

---------

Co-authored-by: Devin Robison <drobison@nvidia.com>
2026-04-08 22:34:54 +00:00
Peter Steinberger
a0e62103d8 fix: pass system prompt to codex cli 2026-04-08 22:34:54 +00:00
Peter Steinberger
2fe1590196 fix: patch hono security advisories 2026-04-08 22:34:54 +00:00
Peter Steinberger
acd42ba736 test: isolate volcengine byteplus auth resolver imports 2026-04-08 22:34:54 +00:00
Peter Steinberger
30e35f7c29 test: stabilize ci test isolation 2026-04-08 22:34:54 +00:00
Frank Yang
e516b14df4 fix(gateway): clear auto-fallback model override on session reset (#63155)
* fix(gateway): clear auto-fallback model override on session reset

When `persistFallbackCandidateSelection()` writes a fallback provider
override with `authProfileOverrideSource: "auto"`, the override was
incorrectly preserved across `/reset` and `/new` commands. This caused
sessions to keep using the fallback provider even after the user changed
the agent config primary provider, because the session store override
takes precedence over the config default.

Now the override fields (`providerOverride`, `modelOverride`,
`authProfileOverride`, `authProfileOverrideSource`,
`authProfileOverrideCompactionCount`) are only carried forward when
`authProfileOverrideSource === "user"` (i.e. explicit `/model` command).
System-driven overrides are dropped on reset so the session picks up the
current config default.

Introduced in cb0a752156 ("fix: preserve reset session behavior config")

* fix(gateway): preserve explicit reset model selection

* fix(gateway): track reset model override source

* fix(gateway): preserve legacy reset model overrides

* docs(changelog): add session reset merge note

---------

Co-authored-by: termtek <termtek@ubuntu.tail2b72cd.ts.net>
2026-04-08 22:34:54 +00:00
Frank Yang
122c925acd fix(auto-reply): strip leading NO_REPLY tokens to prevent silent-reply leak (#63068)
* fix(auto-reply): strip leading NO_REPLY tokens to prevent silent-reply leak

* fix(auto-reply): preserve substantive NO_REPLY leading text

* fix(agents): preserve ACP silent-prefix cumulative deltas

* fix(auto-reply): harden silent-token streaming paths

* fix(auto-reply): normalize glued silent tokens consistently

---------

Co-authored-by: termtek <termtek@ubuntu.tail2b72cd.ts.net>
2026-04-08 22:34:54 +00:00
Ayaan Zaidi
a60a087454 fix: restore android qr pairing flow (#63199) 2026-04-08 22:34:54 +00:00
Ayaan Zaidi
80744c1c35 fix(android): prefer stored device auth after pairing 2026-04-08 22:34:54 +00:00
Ayaan Zaidi
8813b4ac8a fix(android): tighten pairing retry behavior 2026-04-08 22:34:54 +00:00
Ayaan Zaidi
3207ff2ed7 fix(android): reset auth on new setup codes 2026-04-08 22:34:54 +00:00
Ayaan Zaidi
833854aecb fix(android): prefer bootstrap auth on qr pairing 2026-04-08 22:34:54 +00:00
Ayaan Zaidi
167f722769 fix(android): auto-resume pairing approval 2026-04-08 22:34:54 +00:00
Peter Steinberger
d46f52d70e test: keep media runtime tests on same-directory provider mocks 2026-04-08 22:34:54 +00:00
Peter Steinberger
c19e23a96e test: keep pi fs workspace tests on fs tool factories 2026-04-08 22:34:54 +00:00
Peter Steinberger
8b750ad1a7 feat: add character eval model options 2026-04-08 22:34:54 +00:00
Peter Steinberger
95bf2a8e36 test: make character eval scenario natural 2026-04-08 22:34:54 +00:00
Mariano
c93233b4b1 Reply: surface OAuth reauth failures (#63217)
Merged via squash.

Prepared head SHA: 68b7ffd59e
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Reviewed-by: @mbelinky
2026-04-08 22:34:54 +00:00
Peter Steinberger
36f316cde0 test: explain gateway exec fixture trust 2026-04-08 22:34:54 +00:00
Peter Steinberger
544f8fc400 fix: keep runtime task test harness behind task seams 2026-04-08 22:34:54 +00:00
Peter Steinberger
07cced29ad test: trust gateway exec fixture node path 2026-04-08 22:34:54 +00:00
Ayaan Zaidi
8c0250dd06 fix(build): keep tsdown prune best-effort 2026-04-08 22:34:54 +00:00
Peter Steinberger
a1f27e524c test: keep bundled web-search owner checks on public artifacts 2026-04-08 22:34:54 +00:00
Peter Steinberger
4bb5d24047 docs: reorder changelog entries 2026-04-08 22:34:54 +00:00
Peter Steinberger
392c5d8ede fix(plugin-sdk): export channel plugin base 2026-04-08 22:34:54 +00:00
Peter Steinberger
59f8b9412a test: keep chutes implicit provider tests on provider catalog 2026-04-08 22:34:54 +00:00
Ayaan Zaidi
dc2b88f720 fix(build): honor postinstall disable flag 2026-04-08 22:34:54 +00:00
Ayaan Zaidi
b8a1070665 fix(build): address bundled plugin prune review 2026-04-08 22:34:54 +00:00
Ayaan Zaidi
9cde5b895d fix(build): prune stale bundled plugin node_modules 2026-04-08 22:34:54 +00:00
Peter Steinberger
2238735830 test: keep kimi implicit provider tests on provider catalog 2026-04-08 22:34:54 +00:00
Peter Steinberger
9dbbccac43 fix: default OpenAI reasoning effort to high 2026-04-08 22:34:54 +00:00
Peter Steinberger
137aafe04e test: keep model reasoning override coverage on merge helpers 2026-04-08 22:34:54 +00:00
Peter Steinberger
0f14e2a4de test: keep pdf and update-plan registration tests pure 2026-04-08 22:34:54 +00:00
Peter Steinberger
637eaa31e9 fix: keep minimax provider mocks package-local 2026-04-08 22:34:54 +00:00
Peter Steinberger
f2a7a4b4b9 refactor: share html entity tool call decoding 2026-04-08 22:34:54 +00:00
Peter Steinberger
da50d92c14 refactor: dedupe embedding provider test fixtures 2026-04-08 22:34:54 +00:00
Peter Steinberger
22bd9ca11f refactor: dedupe agent command test fixtures 2026-04-08 22:34:54 +00:00
Peter Steinberger
a2de84da2a refactor: dedupe doctor codex oauth tests 2026-04-08 22:34:54 +00:00
Peter Steinberger
4cda0a2743 refactor: dedupe telegram exec approval tests 2026-04-08 22:34:54 +00:00
Peter Steinberger
6dce35db03 refactor: dedupe matrix exec approval tests 2026-04-08 22:34:54 +00:00
Peter Steinberger
7fb8af543f refactor: dedupe approval runtime tests 2026-04-08 22:34:54 +00:00
Peter Steinberger
a208cb293e refactor: dedupe exec defaults tests 2026-04-08 22:34:54 +00:00
Peter Steinberger
193d32db02 refactor: dedupe firecrawl and directive helpers 2026-04-08 22:34:54 +00:00
Peter Steinberger
cd27bc26b0 refactor: dedupe plugin metadata test helpers 2026-04-08 22:34:54 +00:00
Peter Steinberger
ae2a4a5392 refactor: dedupe media runtime test mocks 2026-04-08 22:34:54 +00:00
Peter Steinberger
f6efb80fcf refactor: dedupe plugin test harnesses 2026-04-08 22:34:53 +00:00
Peter Steinberger
4761902b1b refactor: dedupe test helpers and script warning filter 2026-04-08 22:34:53 +00:00
Peter Steinberger
76ceb30539 refactor: dedupe config and subagent tests 2026-04-08 22:34:53 +00:00
Peter Steinberger
03a7e0151d refactor: dedupe browser navigation guard tests 2026-04-08 22:34:53 +00:00
Peter Steinberger
58448f9f89 refactor: dedupe shared helper branches 2026-04-08 22:34:53 +00:00
Peter Steinberger
4d5e3eb796 refactor: dedupe internal helper glue 2026-04-08 22:34:53 +00:00
Peter Steinberger
e11d071602 refactor: dedupe media generation tool helpers 2026-04-08 22:34:53 +00:00
Peter Steinberger
bbb2734d47 docs: document QA character eval workflow 2026-04-08 22:34:53 +00:00
Peter Steinberger
69d3b95d34 feat: add QA character eval reports 2026-04-08 22:34:53 +00:00
Peter Steinberger
c88d7bc30d fix: support Codex CLI QA auth 2026-04-08 22:34:53 +00:00
Peter Steinberger
655ab95dd6 test: keep openclaw tools registration policy pure 2026-04-08 22:34:53 +00:00
Peter Steinberger
455deb5841 ci: isolate full suite leaf shards 2026-04-08 22:34:53 +00:00
Peter Steinberger
efeba38df1 fix: harden bundled plugin dependency release checks 2026-04-08 22:34:53 +00:00
Eric Curtin
be4f327324 docs(inferrs): fix Gemma model id from gg-hf-gg to google (#62586) 2026-04-08 22:34:53 +00:00
Peter Steinberger
a02d50ede9 test: keep bundled metadata sidecar scan inventory-only 2026-04-08 22:34:53 +00:00
Peter Steinberger
3204d902b3 test: keep openclaw tools registration tests on a fast shell 2026-04-08 22:34:53 +00:00
Peter Steinberger
33ae2c4db7 test: keep public artifact coverage on cheap boundaries 2026-04-08 22:34:53 +00:00
Peter Steinberger
0a8ff8f3ce ci: restore sequential full suite tests 2026-04-08 22:34:53 +00:00
Peter Steinberger
55a18686cb test: keep kilocode provider tests on plugin-owned helpers 2026-04-08 22:34:53 +00:00
Peter Steinberger
f4fc4f7b1c test: keep web provider artifact test in boundary 2026-04-08 22:34:53 +00:00
Peter Steinberger
04e10e233b test: keep shared dm policy contract off channel facades 2026-04-08 22:34:53 +00:00
Peter Steinberger
9610a94d05 test: exercise models json file mode without provider discovery 2026-04-08 22:34:53 +00:00
Peter Steinberger
36a4009739 fix: align LLM idle timeout policy 2026-04-08 22:34:53 +00:00
Peter Steinberger
0157625a89 test: fix full suite CI test isolation 2026-04-08 22:34:53 +00:00
Tyler Warburton
802ee1ab12 fix: allow blank TLS manual port default (#63134) (thanks @Tyler-RNG)
* make port optional for TLS manual connections

* fix: restrict manual blank-port fallback to tls

* fix: allow blank TLS manual port default (#63134) (thanks @Tyler-RNG)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-08 22:34:53 +00:00
Peter Steinberger
88a08a0006 test: restore manifest-only web provider coverage 2026-04-08 22:34:53 +00:00
Peter Steinberger
5f17671a3e channels: fast-path direct model override matches 2026-04-08 22:34:53 +00:00
Peter Steinberger
79fd5e9a11 status: avoid plugin lookup for direct channel model overrides 2026-04-08 22:34:53 +00:00
Peter Steinberger
e718f4eb8a test: keep status message tests off auth auto-detection 2026-04-08 22:34:53 +00:00
Peter Steinberger
62b3adea8d test: keep web provider artifact test in boundary 2026-04-08 22:34:53 +00:00
Peter Steinberger
37975fe02b test: keep provider policy artifact coverage narrow 2026-04-08 22:34:53 +00:00
Peter Steinberger
568848008b test: keep web provider artifact coverage manifest-only 2026-04-08 22:34:53 +00:00
Peter Steinberger
18a98e03c8 test: keep discord and irc entry smokes descriptor-only 2026-04-08 22:34:53 +00:00
Peter Steinberger
cf2be8319f test: avoid bundled test api smokes in matrix and telegram 2026-04-08 22:34:53 +00:00
Peter Steinberger
c84444680e ci: reduce full suite test parallelism 2026-04-08 22:34:53 +00:00
Peter Steinberger
e540a7cd21 test: keep bundled channel entry smokes descriptor-only 2026-04-08 22:34:53 +00:00
Peter Steinberger
c77faa7369 test: guard loader fixtures against broad sdk imports 2026-04-08 22:34:53 +00:00
Peter Steinberger
e63fad1627 ci: split parallel full suite into leaf shards 2026-04-08 22:34:53 +00:00
Peter Steinberger
a700dcd84a test: keep followup runner memory mock complete 2026-04-08 22:34:53 +00:00
Peter Steinberger
e2749ebf02 test: isolate discord directory live token env 2026-04-08 22:34:53 +00:00
Peter Steinberger
7492a1232d ci: skip duplicate full extension shard 2026-04-08 22:34:53 +00:00
Peter Steinberger
6878c8c5e6 test: inline cli metadata channel fixture 2026-04-08 22:34:53 +00:00
Peter Steinberger
5d41a61009 plugins: read contract inventory from manifests 2026-04-08 22:34:53 +00:00
Peter Steinberger
76e9d18503 auto-reply: type status auth overrides 2026-04-08 22:34:53 +00:00
Peter Steinberger
3bdb4e81ee test: keep status tests off live usage probes 2026-04-08 22:34:53 +00:00
Peter Steinberger
9d97945a04 test: fix postpublish verifier sidecar handling 2026-04-08 22:34:53 +00:00
Peter Steinberger
686896a22d test: skip duplicate package boundary wrapper in ci 2026-04-08 22:34:53 +00:00
Peter Steinberger
25782f10d7 test: isolate agent gateway cli command mocks 2026-04-08 22:34:53 +00:00
Peter Steinberger
948dab86bf test: stabilize plugin boundary invariants 2026-04-08 22:34:53 +00:00
Peter Steinberger
f7e71efd7a feat: add qa character vibes eval 2026-04-08 22:34:53 +00:00
Nimrod Gutman
a9e1c38146 revert: undo background alive review findings fix 2026-04-08 22:34:53 +00:00
Peter Steinberger
df12e51788 fix(test): keep warn log capture under openclaw temp dir 2026-04-08 22:34:53 +00:00
scoootscooob
44c7c894e7 release: mirror bundled channel deps at root (#63065)
Merged via squash.

Prepared head SHA: ac26799a54
Co-authored-by: scoootscooob <167050519+scoootscooob@users.noreply.github.com>
Co-authored-by: scoootscooob <167050519+scoootscooob@users.noreply.github.com>
Reviewed-by: @scoootscooob
2026-04-08 22:34:53 +00:00
Peter Steinberger
c4cea95e2a refactor: finish markdown-only qa runner 2026-04-08 22:34:53 +00:00
Vicky
6798af3df3 fix: classify Z.ai error codes 1311 (billing) and 1113 (auth) (#49552)
Merged via squash.

Prepared head SHA: 3e7b8bb260
Co-authored-by: 1bcMax <195689928+1bcMax@users.noreply.github.com>
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Reviewed-by: @altaywtf
2026-04-08 22:34:53 +00:00
Peter Steinberger
4a2f0bb05a fix(qqbot): parse entity encoded self-closing media tags 2026-04-08 22:34:53 +00:00
Peter Steinberger
ed87354850 fix(qqbot): allow URL slashes in media tag attributes 2026-04-08 22:34:53 +00:00
Peter Steinberger
b348c066a2 test: harden release gate flakes 2026-04-08 22:34:53 +00:00
Peter Steinberger
c6ab5c0ea3 test: stabilize release gate drift 2026-04-08 22:34:53 +00:00
Peter Steinberger
e1a58b8a77 fix: keep installer doctor non-interactive 2026-04-08 22:34:53 +00:00
Nimrod Gutman
892ae8245e fix: resolve background alive beacon review findings 2026-04-08 22:34:53 +00:00
Peter Steinberger
c8df6e35c0 test: stabilize model warning sanitizer checks 2026-04-08 22:34:53 +00:00
Peter Steinberger
c453a50900 test: keep agent policy tests off broad tool construction 2026-04-08 22:34:53 +00:00
游乐场
e8e2a49f86 fix(qqbot): support HTML entities in media tags (&lt; &gt;) (#60493)
* fix(qqbot): 支持媒体标签中的 HTML 实体(&lt; &gt;)

* fix(qqbot): support HTML entities in media tags

* test(qqbot): add unit tests for media tag regex with HTML entities

* test(qqbot): export regex constants to enable unit tests

* fix(qqbot): reset regex lastIndex in tests to avoid state pollution

* test(qqbot): add .js extension to import in media-tags.test.ts

* fix(qqbot): support HTML entities in media tags (#60493) (thanks @ylc0919)

---------

Co-authored-by: sliverp <870080352@qq.com>
2026-04-08 22:34:53 +00:00
Peter Steinberger
5fa96a350b test: stub image provider discovery in generation tool tests 2026-04-08 22:34:53 +00:00
Peter Steinberger
5127453584 test: dedupe msteams authz fixtures 2026-04-08 22:34:52 +00:00
Peter Steinberger
f6d4b0e50e fix(test): align current main verification fixtures 2026-04-08 22:34:52 +00:00
Peter Steinberger
959876f3d9 fix(test): refresh plugin-sdk package boundary exports 2026-04-08 22:34:52 +00:00
Vincent Koc
329c5e8fbe perf(plugins): trim explicit web provider artifact imports 2026-04-08 22:34:52 +00:00
Vincent Koc
dc4bf70ddf perf(plugins): prefer require for source public artifacts 2026-04-08 22:34:52 +00:00
Vincent Koc
003eb51432 perf(plugin-sdk): narrow account-id export seam 2026-04-08 22:34:52 +00:00
Peter Steinberger
e7bca5e254 fix: export web search config contract from plugin sdk package 2026-04-08 22:34:52 +00:00
Vincent Koc
f8675563de perf(secrets): lazy-load web-tools manifest owner lookup 2026-04-08 22:34:52 +00:00
Peter Steinberger
afb1d24855 fix: keep bundled dir test argv mutable 2026-04-08 22:34:52 +00:00
Peter Steinberger
884e4dbe73 fix: resolve post-rebase boundary drift 2026-04-08 22:34:52 +00:00
Peter Steinberger
8ff4d2e720 fix: keep minimax test helper package-local 2026-04-08 22:34:52 +00:00
Peter Steinberger
c6e4801c3d style: apply formatter output 2026-04-08 22:34:52 +00:00
Peter Steinberger
d5cb85cc8f refactor: dedupe repeated test helpers 2026-04-08 22:34:52 +00:00
Vincent Koc
3a8030afdc perf(plugin-sdk): split web-search contract fields 2026-04-08 22:34:52 +00:00
Vincent Koc
5e5caeacbc fix(plugins): prefer source bundled tree in tsx runs 2026-04-08 22:34:52 +00:00
Peter Steinberger
ebf8009245 test: keep provider auth onboarding tests off runtime auth 2026-04-08 22:34:52 +00:00
Vincent Koc
b14bf19c63 ci(test): fan out windows test lane 2026-04-08 22:34:52 +00:00
Vincent Koc
27d9455c03 ci(test): raise checks-node-test fanout 2026-04-08 22:34:52 +00:00
scoootscooob
0229c587bb Control UI: guard stale session history reloads (#62975)
* Control UI: guard stale session history reloads

* control-ui: guard stale session history reloads

* control-ui: refresh avatar on session switch

* Control UI: refresh and guard chat avatars on session switch
2026-04-08 22:34:52 +00:00
Vincent Koc
192ae58612 ci(test): parallelize checks-node-test 2026-04-08 22:34:52 +00:00
Mariano
3190577e95 fix(reply): use runtime snapshot for queued reply runs (#62693)
Merged via squash.

Prepared head SHA: 2a3e4e5c60
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Reviewed-by: @mbelinky
2026-04-08 22:34:52 +00:00
Nimrod Gutman
c02ceaa501 feat(ios): pin calver release versioning (#63001)
* feat(ios): decouple app versioning from gateway

* feat(ios): pin calver release versioning

* refactor(ios): drop prerelease version helper fields

* docs(changelog): note pinned ios release versioning (#63001) (thanks @ngutman)
2026-04-08 22:34:52 +00:00
Peter Steinberger
4a00db2da8 test: keep tool-policy tests below coding tool construction 2026-04-08 22:34:52 +00:00
Peter Steinberger
810e9b93c8 refactor: move qa suite logic into scenario markdown 2026-04-08 22:34:52 +00:00
Vincent Koc
b2ef706b0b fix(test): stabilize windows tooling assertions 2026-04-08 22:34:52 +00:00
Peter Steinberger
fbde3f73c3 test: cover model-list forward compat below command runtime 2026-04-08 22:34:52 +00:00
Vincent Koc
04d3f789fa test(plugin-sdk): satisfy tool payload carrier typing 2026-04-08 22:34:52 +00:00
Vincent Koc
4d6590c4b7 refactor(plugin-sdk): share tool payload extraction 2026-04-08 22:34:52 +00:00
Vincent Koc
54bcd9f721 refactor(plugins): reuse canonical media contract registries 2026-04-08 22:34:52 +00:00
Vincent Koc
52b453ca26 refactor(plugin-sdk): share web-search contract fields 2026-04-08 22:34:52 +00:00
Vincent Koc
0377c1ce6f refactor(agents): share media status action helpers 2026-04-08 22:34:52 +00:00
Vincent Koc
3cc7cd0abc refactor(agents): share media background task lifecycle 2026-04-08 22:34:52 +00:00
Vincent Koc
f447de3c34 refactor(plugins): reuse interactive registry state 2026-04-08 22:34:52 +00:00
Vincent Koc
dda9d3bebf refactor(doctor): share channel compat helpers 2026-04-08 22:34:52 +00:00
Vincent Koc
f1040d6239 test(plugins): refresh telegram runtime api guardrail 2026-04-08 22:34:52 +00:00
Vincent Koc
309724db30 perf(plugin-sdk): split web search config contract 2026-04-08 22:34:52 +00:00
Peter Steinberger
f2b59f01f5 test: cover multi-agent tool policy below tool construction 2026-04-08 22:34:52 +00:00
Peter Steinberger
f10632a4c1 test: keep media-understanding defaults tests on tiny registry 2026-04-08 22:34:52 +00:00
Vincent Koc
470c618054 perf(plugins): narrow boundary compile import surfaces 2026-04-08 22:34:52 +00:00
Vincent Koc
4c1cef8091 perf(plugins): trim channel boundary core imports 2026-04-08 22:34:52 +00:00
Vincent Koc
67d8d1a108 perf(plugins): narrow boundary compile sdk imports 2026-04-08 22:34:52 +00:00
Vincent Koc
788744963d perf(plugins): report slow boundary compiles 2026-04-08 22:34:52 +00:00
Vincent Koc
bc05a0cf57 perf(config): trim web search config helper imports 2026-04-08 22:34:52 +00:00
Peter Steinberger
8261d1dc14 test: use stubbed OpenClaw tools in agent config tool suite 2026-04-08 22:34:52 +00:00
Peter Steinberger
83c27e33a7 test: mock web search provider discovery in onboard setup tests 2026-04-08 22:34:52 +00:00
Peter Steinberger
c827427a9f test: keep models list auth sync off real discovery 2026-04-08 22:34:52 +00:00
Peter Steinberger
307f176145 fix: stabilize live qa scenario suite 2026-04-08 22:34:52 +00:00
Vincent Koc
eea4cbb644 fix(slack): preserve auth on same-origin media redirects (#62996) (thanks @vincentkoc)
- Verified: pnpm build\n- Verified: pnpm test extensions/slack/src/monitor/media.test.ts\n- Verified: pnpm exec oxlint extensions/slack/src/monitor/media.ts extensions/slack/src/monitor/media.test.ts\n- Verified: pnpm exec oxfmt --check extensions/slack/src/monitor/media.ts extensions/slack/src/monitor/media.test.ts CHANGELOG.md\n\nRepo-wide pnpm lint and pnpm test were not clean on current main outside this fix, and the first full-suite test attempt from the default core sparse profile was additionally contaminated by missing ui/packages/OpenClawKit paths until they were materialized.
2026-04-08 22:34:52 +00:00
Peter Steinberger
7c9c77c264 chore: prepare 2026.4.9 release 2026-04-08 22:34:52 +00:00
Vincent Koc
9fd6fcc993 perf(secrets): fast-path exact bundled web providers 2026-04-08 22:34:52 +00:00
Nyanako
2037f2ced0 test(plugin-sdk): cover packaged telegram setup sidecars (#62990) 2026-04-08 22:34:52 +00:00
Vincent Koc
3db49affee perf(secrets): cache web search risk lookup 2026-04-08 22:34:52 +00:00
Peter Steinberger
697015178d test: remove gpt 4.1 install e2e fallbacks 2026-04-08 22:34:52 +00:00
Vincent Koc
7125272700 docs: cover 2026.4.7 changelog gaps 2026-04-08 22:34:52 +00:00
Peter Steinberger
bc7600792a test: isolate subagent resume persistence registry path 2026-04-08 22:34:52 +00:00
Peter Steinberger
024b94d874 fix: unblock windows update build 2026-04-08 22:34:52 +00:00
Vincent Koc
9a0b3899e1 perf(telegram): trim secret contract text import 2026-04-08 22:34:51 +00:00
Peter Steinberger
b7a7c77d63 build: update appcast for 2026.4.8 2026-04-08 22:34:51 +00:00
Peter Steinberger
e690358613 test: harden Docker install e2e agent lane 2026-04-08 22:34:51 +00:00
Peter Steinberger
d43f86b339 test: keep Discord payload contracts off broad test api 2026-04-08 22:34:51 +00:00
Vincent Koc
8cc658f45a perf(matrix): trim secret env-var import path 2026-04-08 22:34:51 +00:00
Vincent Koc
fa91211932 test(extensions): fix bundled lint regressions 2026-04-08 22:34:51 +00:00
Peter Steinberger
451acb607a test: load narrow Discord inbound context harness 2026-04-08 22:34:51 +00:00
Peter Steinberger
5b4f1ce0e1 test: isolate video media runner auth from main profile store 2026-04-08 22:34:51 +00:00
Peter Steinberger
fe1eb6ea8a test: share gateway server for chat history RPC suite 2026-04-08 22:34:51 +00:00
Peter Steinberger
41699ee85b test: fold config apply RPC cases into config gateway suite 2026-04-08 22:34:51 +00:00
Peter Steinberger
0757efc4ea test: share gateway server for talk config RPC tests 2026-04-08 22:34:51 +00:00
Peter Steinberger
7cefba303a test: share gateway harness for session message event tests 2026-04-08 22:34:51 +00:00
Peter Steinberger
836c1b4978 test: fold OpenAI message channel check into shared HTTP suite 2026-04-08 22:34:51 +00:00
Peter Steinberger
c3ef2c53fa test: keep model pricing cache tests off provider runtime 2026-04-08 22:34:51 +00:00
Peter Steinberger
0eccb327b2 test: avoid reconnect waits in node wake unit tests 2026-04-08 22:34:51 +00:00
Peter Steinberger
eb41468beb test: route gateway HTTP history and startup wiring to e2e 2026-04-08 22:34:51 +00:00
Peter Steinberger
ea8722a05b chore: sync 2026.4.8 config docs baseline 2026-04-08 22:34:51 +00:00
Peter Steinberger
8d4c029147 test: fold talk provider override coverage into runtime suite 2026-04-08 22:34:51 +00:00
Gustavo Madeira Santana
93c040c832 Docs: refresh schema, slash commands, and TTS refs 2026-04-08 22:34:51 +00:00
Peter Steinberger
9a24e017d8 test: mock talk synthesis at gateway boundary 2026-04-08 22:34:51 +00:00
Peter Steinberger
c959098a6d chore: prepare 2026.4.8 npm release 2026-04-08 22:34:51 +00:00
Peter Steinberger
9930e67c26 test: move openai talk override coverage to provider lane 2026-04-08 22:34:51 +00:00
Peter Steinberger
58f403d493 test: smoke packed bundled channel entries 2026-04-08 22:34:51 +00:00
Gustavo Madeira Santana
9da9a180f6 Slack: clarify native streaming config hint 2026-04-08 22:34:51 +00:00
Gustavo Madeira Santana
6c7fcbb20b Docs: clarify Slack streaming thread behavior
Clarify the canonical Slack streaming config keys and legacy migration notes
across the Slack docs and shared streaming concept docs.

Document that native Slack streaming and assistant thread status require a
reply thread, and call out the top-level DM fallback behavior.
2026-04-08 22:34:51 +00:00
Peter Steinberger
8277dc7f61 test: move gateway e2e fixture out of unit lane 2026-04-08 22:34:51 +00:00
Peter Steinberger
64b3d17100 fix: pass resolved Slack download tokens (#62097) (thanks @martingarramon) 2026-04-08 22:34:51 +00:00
Martin Garramon
357d7058c0 fix(slack): forward resolved botToken to downloadSlackFile
Closes #62088

When `buildActionOpts` returns undefined (default account, no token
override), `downloadSlackFile` calls `resolveToken(undefined, undefined)`
which re-reads raw config via `loadConfig()`. If botToken is a SecretRef
object, `normalizeResolvedSecretInputString` rejects it because it
expects a string — the download silently fails.

This injects the already-resolved botToken from the gateway runtime
snapshot into the download opts as a fallback, bypassing the raw config
re-read. Same root cause as the Discord fix in b51214ec3e.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 22:34:51 +00:00
Maxime Grenu
122d870049 fix(net): skip DNS pinning before trusted env proxy dispatch 2026-04-08 22:34:51 +00:00
Peter Steinberger
d5207bac8a fix: honor Slack Socket Mode env proxies (#62878) (thanks @mjamiv) 2026-04-08 22:34:51 +00:00
Michael Martello
e782428e97 fix: handle leading-dot NO_PROXY entries matching apex domain
`.slack.com` in NO_PROXY should match both `slack.com` (apex) and
`wss-primary.slack.com` (subdomain). Strip the leading dot before
comparison so the suffix check works for both cases.
2026-04-08 22:34:51 +00:00
Michael Martello
1bf2381bc8 fix: address review — honor NO_PROXY, guard malformed URLs
- Check NO_PROXY/no_proxy before creating HttpsProxyAgent; skip proxy
  when slack.com matches an exclusion entry (exact, suffix, or wildcard).
- Wrap HttpsProxyAgent construction in try/catch so malformed proxy URLs
  degrade to direct connectivity instead of crashing Slack channel init.
- Extract resolveProxyUrlFromEnv and isHostExcludedByNoProxy as testable
  helpers.
- Add tests for NO_PROXY exclusion, wildcard, unrelated hosts, and
  malformed URL resilience.
2026-04-08 22:34:51 +00:00
Michael Martello
9a85874f8f fix(slack): honor HTTPS_PROXY for Socket Mode WebSocket connections
When HTTPS_PROXY or HTTP_PROXY env vars are set, create an
HttpsProxyAgent and pass it as the `agent` option through
@slack/bolt → @slack/socket-mode → ws, so the WebSocket upgrade
request is tunneled through the proxy.

This fixes Slack Socket Mode in environments where all outbound
traffic must go through an HTTP CONNECT proxy (e.g. sandboxed
containers, corporate networks). Previously the ws library opened
a direct connection to wss-primary.slack.com, ignoring proxy env
vars entirely.

The approach mirrors the existing Discord gateway proxy support
(extensions/discord/src/monitor/gateway-plugin.ts) which uses the
same https-proxy-agent library.

Fixes #57405
2026-04-08 22:34:51 +00:00
Peter Steinberger
a5f32d3a1a refactor: split qa scenarios into per-file markdown defs 2026-04-08 22:34:51 +00:00
Peter Steinberger
b6afe5461f test: add opt-in leaf project scheduler 2026-04-08 22:34:51 +00:00
Peter Steinberger
392dd095a2 test: stabilize provider auth alias test imports 2026-04-08 22:34:51 +00:00
Peter Steinberger
e5a09c379e test: avoid duplicating plugin contract lane 2026-04-08 22:34:51 +00:00
Peter Steinberger
01f8871799 revert: remove bundled channel fallback masking 2026-04-08 22:34:51 +00:00
Tak Hoffman
6fc1f608c8 add bundled channel prepack smoke 2026-04-08 22:34:51 +00:00
Peter Steinberger
59a75e8a40 chore: prepare 2026.4.7-1 npm release 2026-04-08 22:34:51 +00:00
Peter Steinberger
3fc19fbb67 test: guard bundled channel sidecar specifiers 2026-04-08 22:34:51 +00:00
Tak Hoffman
2846d3f673 fix bundled channel entry fallback resolution 2026-04-08 22:34:51 +00:00
Peter Steinberger
60b8d5a835 fix: repair bundled channel secret sidecars 2026-04-08 22:34:51 +00:00
Peter Steinberger
81e0336dfa fix: repair Telegram setup package entry 2026-04-08 22:34:51 +00:00
Peter Steinberger
b2719d2ab8 fix: compact update_plan tool result 2026-04-08 22:34:51 +00:00
Peter Steinberger
2a1cc53fcc fix: align exec default reporting with runtime 2026-04-08 22:34:51 +00:00
Peter Steinberger
f0d13917f8 fix: align Z.AI endpoint detection with GLM-5.1 default (#61998) (thanks @serg0x) 2026-04-08 22:34:51 +00:00
Serg
33360b9c72 fix(zai): update stale glm-5 ref in docs/cli/onboard.md 2026-04-08 22:34:51 +00:00
Serg
1ee073df03 fix(zai): default to GLM-5.1 instead of GLM-5 2026-04-08 22:34:51 +00:00
Peter Steinberger
762480a9e5 chore: prepare 2026.4.8 2026-04-08 22:34:51 +00:00
Peter Steinberger
0499e446d9 chore: update appcast for 2026.4.7 2026-04-08 22:34:50 +00:00
Ayaan Zaidi
282e9d6910 fix: keep runtime model lookup on configured workspace 2026-04-08 22:34:50 +00:00
Peter Steinberger
f951bd89ef docs: add memory wiki docs 2026-04-08 22:34:50 +00:00
Peter Steinberger
f544e366a1 ci: prepare extension lint artifacts 2026-04-08 22:34:50 +00:00
Peter Steinberger
8ad71bc0e0 fix: harden tahoe version check 2026-04-08 22:34:50 +00:00
Peter Steinberger
9981cbf519 fix: harden parallels upgrade flows 2026-04-08 22:34:50 +00:00
ruclaw7
fe774da67f fix: prefer codex gpt-5.4 runtime metadata (#62694) (thanks @ruclaw7)
* Agents: prefer runtime codex gpt-5.4 metadata

* Agents: move codex gpt-5.4 override into provider hook

* fix: repair codex runtime preference hooks

* fix: use workspace dir for codex runtime preference

* test: cover codex workspace dir hook

* fix: prefer codex gpt-5.4 runtime metadata (#62694) (thanks @ruclaw7)

---------

Co-authored-by: Rudi Cilibrasi <cilibrar@gmail.com>
Co-authored-by: Rudi Cilibrasi <rudi@metagood.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-08 22:34:50 +00:00
Josh Lehman
3318cae246 fix: expose runtime-ready provider auth to plugins (#62753) 2026-04-08 22:34:50 +00:00
B
b63e593a01 fix(doctor): warn when stale Codex overrides shadow OAuth (#40143)
* fix(doctor): warn on stale codex provider overrides

* test(doctor): cover stored codex oauth warning path

* fix: narrow codex override doctor warning (#40143) (thanks @bde1)

* test: sync doctor e2e mocks after health-flow move (#40143) (thanks @bde1)

---------

Co-authored-by: bde1 <bde1@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-04-08 22:34:50 +00:00
Peter Steinberger
c2912725b6 fix: guide exec timeouts to registered background sessions 2026-04-08 22:34:50 +00:00
Peter Steinberger
4925530be9 docs: fix qa refactor heading fence 2026-04-08 22:34:50 +00:00
Peter Steinberger
4e9e885448 docs: update config baseline 2026-04-08 22:34:50 +00:00
Peter Steinberger
2df13e85c5 build: exclude plugin sdk build info from npm pack 2026-04-08 22:34:50 +00:00
Peter Steinberger
028cf920ea docs: update plugin sdk api baseline 2026-04-08 22:34:50 +00:00
Peter Steinberger
114b005436 fix: raise acpx runtime timeout 2026-04-08 22:34:50 +00:00
Peter Steinberger
a5f37d1c9a fix: escape tahoe update trap vars 2026-04-08 22:34:50 +00:00
Peter Steinberger
216aff34ef docs: stamp 2026.4.7 changelog 2026-04-08 22:34:50 +00:00
Peter Steinberger
f9ab93ea98 fix: repair tahoe update done trap 2026-04-08 22:34:50 +00:00
Peter Steinberger
ef120bebd2 test: drop pre-Gemini 3 from live model matrix 2026-04-08 22:34:50 +00:00
Peter Steinberger
5fdc67f498 fix: stabilize parallels upgrade preflight 2026-04-08 22:34:50 +00:00
Peter Steinberger
2298f2018c test: avoid persisting command registry cleanup 2026-04-08 22:34:50 +00:00
Peter Steinberger
ca1575b4cd chore: prepare 2026.4.7 2026-04-08 22:34:50 +00:00
Peter Steinberger
f24bfdb2aa fix: force cmd shell for windows smoke update 2026-04-08 22:34:50 +00:00
Peter Steinberger
2d643ba935 fix: harden parallels upgrade launchers 2026-04-08 22:34:50 +00:00
Peter Steinberger
8ff5d6c77a perf(config): isolate model alias defaults policy 2026-04-08 22:34:50 +00:00
Peter Steinberger
9e4fa7488c perf(config): fold telegram audio schema coverage 2026-04-08 22:34:50 +00:00
Peter Steinberger
22bdcde16f perf(runtime): trim config, media, and secrets tests 2026-04-08 22:34:50 +00:00
Peter Steinberger
8e1a39e1df test: speed up effective tools inventory test 2026-04-08 22:34:50 +00:00
Peter Steinberger
7294365976 test: speed up plugin registry loader tests 2026-04-08 22:34:50 +00:00
Peter Steinberger
b35525273a test: speed up auto reply command tests 2026-04-08 22:34:50 +00:00
Peter Steinberger
f3eea2d016 refactor: dedupe ui foundry trimmed readers 2026-04-08 22:34:50 +00:00
Peter Steinberger
07e17274c3 refactor: dedupe messaging trimmed readers 2026-04-08 22:34:50 +00:00
Peter Steinberger
8a0faac188 refactor: dedupe provider ui trimmed readers 2026-04-08 22:34:50 +00:00
Peter Steinberger
6a6690bf3d refactor: dedupe extension trimmed readers 2026-04-08 22:34:50 +00:00
Peter Steinberger
8d52eecefc refactor: dedupe core trimmed readers 2026-04-08 22:34:50 +00:00
Peter Steinberger
faae9dc7c2 refactor: dedupe gateway memory trimmed readers 2026-04-08 22:34:50 +00:00
Peter Steinberger
f5c0f1f025 refactor: dedupe plugin auto-reply trimmed readers 2026-04-08 22:34:50 +00:00
Peter Steinberger
53c4dd7895 refactor: dedupe config cli command trimmed readers 2026-04-08 22:34:50 +00:00
Peter Steinberger
07092c7330 refactor: dedupe gateway trimmed readers 2026-04-08 22:34:50 +00:00
Peter Steinberger
8d47dfb8ab refactor: dedupe plugin trimmed readers 2026-04-08 22:34:50 +00:00
Peter Steinberger
b760840220 refactor: dedupe matrix trimmed readers 2026-04-08 22:34:50 +00:00
Peter Steinberger
bb7486ceae refactor: dedupe cli cron trimmed readers 2026-04-08 22:34:50 +00:00
Peter Steinberger
c25a4a0d1d fix: harden parallels upgrade checks 2026-04-08 22:34:50 +00:00
Peter Steinberger
fd727d3c5e test: trim config migration smoke coverage 2026-04-08 22:34:50 +00:00
Aftab
5c9cce3a7b fix(daemon): skip machine-scope fallback on permission-denied bus errors (#62337)
* fix(daemon): skip machine-scope fallback on permission-denied bus errors; fall back to --user when sudo machine scope fails

When systemctl --user fails with "Failed to connect to bus: Permission
denied", the machine-scope fallback is now skipped. A Permission denied
error means the bus socket exists but the process cannot connect to it,
so --machine user@ would hit the same wall.

Additionally, the sudo path in execSystemctlUser now tries machine scope
first but falls through to a direct --user attempt if it fails, instead
of returning the error immediately.

Fixes #61959

* fix(daemon): guard against double machine-scope call when sudo path already tried it

When SUDO_USER is set and machine scope fails with a non-permission-denied
bus error, execution falls through to the direct --user attempt. If that
also fails with a bus-unavailable message, shouldFallbackToMachineUserScope
returns true and machine scope is tried a second time -- a redundant exec
that was never reachable before this PR opened the fallthrough path.

Add machineScopeAlreadyTried flag and include it in the bottom-fallback
guard condition so the second call is skipped when machine scope was
already attempted in the sudo branch.

Add regression test asserting exactly 2 execFile calls in this scenario.

* fix: keep sudo systemctl scoped

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-04-08 22:34:50 +00:00
Peter Steinberger
9008955e21 Tests: type sessions send gateway mock 2026-04-08 22:34:50 +00:00
Peter Steinberger
ffaced657e test: trim secrets runtime x_search coverage 2026-04-08 22:34:50 +00:00
Peter Steinberger
379108660e Tests: stabilize memory dreaming time windows 2026-04-08 22:34:50 +00:00
Josh Lehman
32be4bd790 fix: pass threadId through sessions_send announce delivery (#62758) 2026-04-08 22:34:49 +00:00
Peter Steinberger
94bf35369d test: narrow config migration smoke coverage 2026-04-08 22:34:49 +00:00
Peter Steinberger
eaaa394ca0 test: trim duplicate config migration coverage 2026-04-08 22:34:49 +00:00
Peter Steinberger
e1bd220959 test: split channel textChunkLimit schema coverage 2026-04-08 22:34:49 +00:00
Peter Steinberger
6c74c701a8 test: fold identity defaults into existing config suites 2026-04-08 22:34:49 +00:00
Peter Steinberger
70d8e6652f test: trim config defaults and secrets refresh coverage 2026-04-08 22:34:49 +00:00
Peter Steinberger
593d4a7e0d fix: respect disabled heartbeat guidance 2026-04-08 22:34:49 +00:00
Peter Steinberger
eb96d5c3c8 fix: surface Claude CLI API errors 2026-04-08 22:34:49 +00:00
Peter Steinberger
e960662c21 Tests: align provider synthetic auth fixture 2026-04-08 22:34:49 +00:00
Peter Steinberger
fd409968ad test: fix provider usage mocks and trim media runner setup 2026-04-08 22:34:49 +00:00
Peter Steinberger
3d3ad30436 Tests: use timeout-classed compaction failure 2026-04-08 22:34:49 +00:00
Peter Steinberger
8dcc62dbaa test: speed up cli and process tests 2026-04-08 22:34:49 +00:00
Peter Steinberger
7c63f39e44 test: speed up agent runtime helper tests 2026-04-08 22:34:49 +00:00
Peter Steinberger
c23f290523 test: speed up agent auth config tests 2026-04-08 22:34:49 +00:00
Peter Steinberger
a6ea0e6449 Tests: type provider usage plugin mocks 2026-04-08 22:34:49 +00:00
zhumengzhu
59bde1d95e fix(logging): correct levelToMinLevel mapping and related filter logic for tslog v4 (#44646)
* fix: correct levelToMinLevel mapping and isFileLogLevelEnabled direction for tslog v4

* test: add regression tests for logging level filter and child logger inheritance

* fix: propagate minLevel to toPinoLikeLogger sub-loggers

* fix: correct shouldLogToConsole comparison direction in subsystem.ts

* test: cover logging threshold regressions

* fix(logging): treat silent as non-emittable level

---------

Co-authored-by: Altay <altay@uinaf.dev>
2026-04-08 22:34:49 +00:00
Josh Lehman
061b23c8ec fix: honor explicit auth profile selection (#62744)
* Auth: fix native model profile selection

Fix native `/model ...@profile` targeting so profile selections persist onto the intended session, and preserve explicit session auth-profile overrides even when stored auth order prefers another profile. Update the reply/session regressions to use placeholder example.test profile ids.

Regeneration-Prompt: |
  Native `/model ...@profile` commands in chat were acknowledging the requested auth profile but later runs still used another account. Fix the target-session handling so native slash commands mutate the real chat session rather than a slash-session surrogate, and keep explicit session auth-profile overrides from being cleared just because stored provider order prefers another profile. Update the tests to cover the target-session path and the override-preservation behavior, and use placeholder profile ids instead of real email addresses in test fixtures.

* Auth: honor explicit user-locked profiles in runner

Allow an explicit user-selected auth profile to run even when per-agent auth-state order excludes it. Keep auth-state order for automatic selection and failover, and add an embedded runner regression that seeds stored order with one profile while verifying a different user-locked profile still executes.

Regeneration-Prompt: |
  The remaining bug after fixing native `/model ...@profile` persistence was in the embedded runner itself. A user could explicitly select a valid auth profile for a provider, but the run still failed if per-agent auth-state order did not include that profile. Preserve the intended semantics by validating user-locked profiles directly for provider match and credential eligibility, then using them without requiring membership in resolved auto-order. Add a regression in the embedded auth-profile rotation suite where stored order only includes one OpenAI profile but a different user-locked profile is chosen and must still be used.

* Changelog: note explicit auth profile selection fix

Add the required Unreleased changelog line for the explicit auth-profile selection and runner honor fix in this PR.

Regeneration-Prompt: |
  The PR needed a mandatory CHANGELOG.md entry under Unreleased/Fixes. Add a concise user-facing line describing that native `/model ...@profile` selections now persist on the target session and explicit user-locked OpenAI Codex auth profiles are honored even when per-agent auth order excludes them, and include the PR number plus thanks attribution for the PR author.
2026-04-08 22:34:49 +00:00
Peter Steinberger
7696455b2e perf(test): trim infra provider and approval suites 2026-04-08 22:34:49 +00:00
Peter Steinberger
e105e57745 fix: resolve ci type regressions 2026-04-08 22:34:49 +00:00
Peter Steinberger
45d3150ab8 refactor: dedupe channel trimmed readers 2026-04-08 22:34:49 +00:00
Peter Steinberger
2501dd3bfb refactor: dedupe agent trimmed readers 2026-04-08 22:34:49 +00:00
Peter Steinberger
75df1e264e refactor: dedupe gateway trimmed readers 2026-04-08 22:34:49 +00:00
Peter Steinberger
a80db6f355 refactor: dedupe auto-reply trimmed readers 2026-04-08 22:34:49 +00:00
Peter Steinberger
08a5856d97 refactor: dedupe infra trimmed readers 2026-04-08 22:34:49 +00:00
Peter Steinberger
81a11e0e58 refactor: dedupe gateway trimmed readers 2026-04-08 22:34:49 +00:00
Peter Steinberger
36c7e83614 refactor: dedupe agent trimmed readers 2026-04-08 22:34:49 +00:00
Peter Steinberger
d3f41780a0 refactor: dedupe command trimmed readers 2026-04-08 22:34:49 +00:00
Peter Steinberger
ef4cc389e9 refactor: dedupe discord trimmed readers 2026-04-08 22:34:49 +00:00
Peter Steinberger
3c310be683 refactor: dedupe telegram trimmed readers 2026-04-08 22:34:49 +00:00
Peter Steinberger
c5bd7252b7 refactor: dedupe browser trimmed readers 2026-04-08 22:34:49 +00:00
Peter Steinberger
0ab6fd8593 refactor: dedupe ui trimmed readers 2026-04-08 22:34:49 +00:00
Peter Steinberger
ffdc3d38a9 refactor: dedupe browser trimmed readers 2026-04-08 22:34:49 +00:00
Peter Steinberger
81920f3ad1 refactor: dedupe provider trimmed readers 2026-04-08 22:34:49 +00:00
Peter Steinberger
224bf4a9be test: speed up model config provider tests 2026-04-08 22:34:49 +00:00
Peter Steinberger
7ca7b2d4d3 test: speed up stream and bash tool tests 2026-04-08 22:34:49 +00:00
Peter Steinberger
c426712969 test: use line adapters in setup-surface tests 2026-04-08 22:34:49 +00:00
Peter Steinberger
5e776ca4c3 feat: add gh-read GitHub app helper 2026-04-08 22:34:49 +00:00
Peter Steinberger
40f7ef22a0 fix(test): align exec approvals expectations 2026-04-08 22:34:49 +00:00
Peter Steinberger
d5727ca94a Tests: repair latest main type drift 2026-04-08 22:34:49 +00:00
Peter Steinberger
40ee96c002 Tests: keep route notice coverage in coordinator 2026-04-08 22:34:49 +00:00
Peter Steinberger
247824d842 Tests: align extension approval startup seams 2026-04-08 22:34:49 +00:00
Peter Steinberger
a2a8c3641c Tests: align exec approval policy expectations 2026-04-08 22:34:49 +00:00
Peter Steinberger
1e01b0b5ec Browser: align plugin registration mutability 2026-04-08 22:34:49 +00:00
Peter Steinberger
45ca762a5e Approvals: align native runtime tests 2026-04-08 22:34:49 +00:00
Peter Steinberger
928103bd1c Tests: update compaction fallback retry mock 2026-04-08 22:34:49 +00:00
Peter Steinberger
8d6266c914 refactor: move qa suite definitions into markdown 2026-04-08 22:34:49 +00:00
Peter Steinberger
12af575aa0 fix(test): align boundary and approval suites 2026-04-08 22:34:49 +00:00
Peter Steinberger
a2f9d169bc test: speed up auth profile store tests 2026-04-08 22:34:49 +00:00
Peter Steinberger
4a71f99da1 test: speed up subagent registry persistence resume test 2026-04-08 22:34:49 +00:00
Peter Steinberger
af07d97164 refactor: dedupe gateway agent trimmed readers 2026-04-08 22:34:49 +00:00
Peter Steinberger
a8677558f1 refactor: dedupe core trimmed string readers 2026-04-08 22:34:49 +00:00
Peter Steinberger
dc76efc91b refactor: dedupe trimmed string readers 2026-04-08 22:34:49 +00:00
Peter Steinberger
fc15ba9309 refactor: dedupe locale lowercase helpers 2026-04-08 22:34:49 +00:00
Peter Steinberger
0b0452a6b0 refactor: dedupe remaining lowercase helpers 2026-04-08 22:34:49 +00:00
Peter Steinberger
b57559a4e5 refactor: dedupe path lowercase helpers 2026-04-08 22:34:49 +00:00
Peter Steinberger
2785354250 refactor: dedupe canvas lowercase helpers 2026-04-08 22:34:49 +00:00
Peter Steinberger
7fcdfb49c9 refactor: dedupe normalization lowercase helpers 2026-04-08 22:34:49 +00:00
Agustin Rivera
020db1592f fix(env): align inherited host exec env filtering (#59119)
* fix(env): block inherited host exec config vars

* fix(env): preserve trusted inherited proxy env

* fix(env): preserve inherited host exec vars

* fix(env): refresh host env policy parity artifacts

* test(env): align blocked override ordering

* docs(changelog): add host env policy parity entry

---------

Co-authored-by: Devin Robison <drobison@nvidia.com>
2026-04-08 22:34:48 +00:00
Agustin Rivera
51370b44c7 fix(git): expand host env denylist coverage (#62002)
* fix(git): expand host env denylist

* fix(git): block alternate object directories

* docs(changelog): add git env denylist entry

* docs(changelog): remove conflict markers

---------

Co-authored-by: Devin Robison <drobison@nvidia.com>
2026-04-08 22:34:48 +00:00
Peter Steinberger
51000998f5 test: speed up agent config auth tests 2026-04-08 22:34:48 +00:00
Peter Steinberger
dedc18c37b test: speed up subagent registry tests 2026-04-08 22:34:48 +00:00
Agustin Rivera
afda3cae32 Guard missed base64 decode paths (#62007)
* fix(media): guard missed base64 decode paths

Co-authored-by: zsxsoft <git@zsxsoft.com>

* fix(media): wire maxBytes into image-generate-tool and consolidate base64 guard helpers

* docs(changelog): add base64 decode guard entry

* fix(image-generate): validate configured media cap

---------

Co-authored-by: zsxsoft <git@zsxsoft.com>
Co-authored-by: Devin Robison <drobison@nvidia.com>
2026-04-08 22:34:48 +00:00
Peter Steinberger
655ddd7000 refactor: dedupe misc lowercase helpers 2026-04-08 22:34:48 +00:00
Peter Steinberger
6e62fffb54 refactor: dedupe provider lowercase helpers 2026-04-08 22:34:48 +00:00
Peter Steinberger
f6a53d2409 refactor: dedupe extension lowercase helpers 2026-04-08 22:34:48 +00:00
Gustavo Madeira Santana
31f0757c49 style: normalize lazy approval adapter signature 2026-04-08 22:34:48 +00:00
Gustavo Madeira Santana
24caf2b5b8 types: preserve approval runtime payload typing 2026-04-08 22:34:48 +00:00
Peter Steinberger
9df57f3ee0 fix: preserve fallback error details 2026-04-08 22:34:48 +00:00
Agustin Rivera
42aef7b3e9 Protect gateway exec approval config paths (#62001)
* fix(gateway): protect exec approval config paths

* fix(gateway): compare protected config paths by value

* docs(changelog): add gateway exec config entry

---------

Co-authored-by: Devin Robison <drobison@nvidia.com>
Co-authored-by: Devin Robison <drobison00@users.noreply.github.com>
2026-04-08 22:34:48 +00:00
Gustavo Madeira Santana
feee96218a Docs: document approval adapter subpaths 2026-04-08 22:34:48 +00:00
Gustavo Madeira Santana
9e676d5676 Tests: align approval gateway seams 2026-04-08 22:34:48 +00:00
Gustavo Madeira Santana
91398cd2c7 Plugin SDK: split approval adapter seams 2026-04-08 22:34:48 +00:00
Gustavo Madeira Santana
c9bbe3c10f Tests: restore approval runtime coverage 2026-04-08 22:34:48 +00:00
Peter Steinberger
eb7874a59e fix: resolve rebase regressions for ci landing 2026-04-08 22:34:48 +00:00
Peter Steinberger
3acc5ad51b fix: repair test typing for check gate 2026-04-08 22:34:48 +00:00
Peter Steinberger
1381757d2e refactor: dedupe ui provider lowercase helpers 2026-04-08 22:34:48 +00:00
Peter Steinberger
4032736863 refactor: dedupe core lowercase helpers 2026-04-08 22:34:48 +00:00
Peter Steinberger
5220058ebf refactor: dedupe memory lowercase helpers 2026-04-08 22:34:48 +00:00
Peter Steinberger
0a949bb1c3 refactor: dedupe line qqbot slack lowercase helpers 2026-04-08 22:34:48 +00:00
Peter Steinberger
b503b5f8da refactor: dedupe browser whatsapp qa lowercase helpers 2026-04-08 22:34:48 +00:00
Peter Steinberger
f53216c21e refactor: dedupe memory lowercase helpers 2026-04-08 22:34:48 +00:00
Peter Steinberger
51ec3d30d5 refactor: dedupe ui lowercase helpers 2026-04-08 22:34:48 +00:00
Peter Steinberger
c153ade99d refactor: dedupe plugin lowercase helpers 2026-04-08 22:34:48 +00:00
Peter Steinberger
85a9677e8b refactor: dedupe telegram matrix lowercase helpers 2026-04-08 22:34:48 +00:00
Peter Steinberger
364901a2be refactor: dedupe command config lowercase helpers 2026-04-08 22:34:48 +00:00
Peter Steinberger
511f24e959 refactor: dedupe remaining lowercase helpers 2026-04-08 22:34:48 +00:00
Peter Steinberger
75d6c0c68b refactor: dedupe gateway infra lowercase helpers 2026-04-08 22:34:48 +00:00
Gustavo Madeira Santana
63161bf5ad Tests: align approval runtime helpers 2026-04-08 22:34:48 +00:00
Gustavo Madeira Santana
735c283a69 Extensions: align approval plugin typing 2026-04-08 22:34:48 +00:00
Gustavo Madeira Santana
c6c01fb973 fix(exec): harden stale/replay/live requests 2026-04-08 22:34:48 +00:00
Gustavo Madeira Santana
03763ecb01 docs(changelog): dedupe entry 2026-04-08 22:34:48 +00:00
Gustavo Madeira Santana
2c61006115 Approvals: replay pending requests on startup 2026-04-08 22:34:48 +00:00
Peter Steinberger
da8899a934 fix: harden complex qa suite scenarios 2026-04-08 22:34:48 +00:00
Peter Steinberger
9ee1fa0813 fix(qa): tighten frontier scope evals 2026-04-08 22:34:48 +00:00
Peter Steinberger
aa21ac708e fix(qa): restore safe no-fork gateway runtime 2026-04-08 22:34:48 +00:00
Vincent Koc
b14c380096 perf(qa): lazy-load runner catalog for lab ui 2026-04-08 22:34:48 +00:00
Vincent Koc
d651100a35 fix(qa): preserve gateway cli auth in no-fork rpc path 2026-04-08 22:34:48 +00:00
Vincent Koc
d4f07e468e perf(qa): drop per-rpc gateway cli forks 2026-04-08 22:34:48 +00:00
Vincent Koc
5ffc3e12ff perf(qa): trim frontier direct-agent waits 2026-04-08 22:34:48 +00:00
Vincent Koc
248f030054 test(qa): retry flaky local fetches in lab server tests 2026-04-08 22:34:48 +00:00
Vincent Koc
c6b8624793 fix(qa): keep direct self-check outputs under repo root 2026-04-08 22:34:48 +00:00
Vincent Koc
c0cba1793e fix(qa): anchor runner artifacts to repo root 2026-04-08 22:34:48 +00:00
Vincent Koc
da086196c3 fix(qa): default docker artifacts from repo root 2026-04-08 22:34:48 +00:00
Vincent Koc
bd0fe6ed43 fix(qa): support neutral-cwd docker commands 2026-04-08 22:34:48 +00:00
Vincent Koc
f767b17891 chore(qa): align qa cli provider input types 2026-04-08 22:34:48 +00:00
Vincent Koc
5cfbec59c2 fix(qa): normalize qa cli lane inputs 2026-04-08 22:34:48 +00:00
Vincent Koc
234e6d55e3 fix(qa): keep manual alternate model aligned 2026-04-08 22:34:48 +00:00
Vincent Koc
2af91da79c fix(qa): default manual lanes by provider mode 2026-04-08 22:34:48 +00:00
Vincent Koc
16f4c82527 fix(qa): allow random qa-lab control-ui origins 2026-04-08 22:34:48 +00:00
Vincent Koc
a1c3a7144d fix(qa): pin gateway child control ui root 2026-04-08 22:34:48 +00:00
Vincent Koc
90a41dbd0e fix(qa): align mock model-switch continuity 2026-04-08 22:34:48 +00:00
Vincent Koc
3dbf5e5c6d fix(qa): support neutral-cwd suite runs 2026-04-08 22:34:48 +00:00
Vincent Koc
0451836493 docs(qa): expand frontier bakeoff runbook 2026-04-08 22:34:48 +00:00
Vincent Koc
0ec0826568 feat(qa): add manual harness lane 2026-04-08 22:34:48 +00:00
Vincent Koc
0b61ed0c0a fix(qa): isolate gateway child runtime 2026-04-08 22:34:48 +00:00
Vincent Koc
d801773202 fix(qa): harden frontier claude bakeoffs 2026-04-08 22:34:48 +00:00
Vincent Koc
9dd6ecf45d feat(qa): add frontier harness bakeoff loop 2026-04-08 22:34:48 +00:00
Andrew Demczuk
1f9e0707cb fix(gateway): stop SSRF guard rejecting operator-configured proxy hostnames (#62312)
When allowPrivateProxy is true, the explicit proxy hostname is operator-
configured and trusted. The SSRF guard was checking the proxy hostname
against the target-scoped hostnameAllowlist (e.g. ["api.telegram.org"]),
which rejected localhost and other local proxy hostnames. This broke
Telegram media downloads (and any channel using a local proxy) after
the url-fetch security hardening in 2026.4.x.

Clear the hostnameAllowlist for the proxy hostname check while keeping
private-network IP validation in place via allowPrivateNetwork.

Fixes #61906

Co-authored-by: Devin Robison <drobison00@users.noreply.github.com>
2026-04-08 22:34:48 +00:00
Peter Steinberger
c779abaa7d fix(test): refresh schema snapshot and stabilize channel registry 2026-04-08 22:34:47 +00:00
Agustin Rivera
ad4878917c fix(browser): align browser.proxy profile mutation guards (#60489)
* fix(browser): block proxy profile mutations

* docs(changelog): add browser proxy guard entry

---------

Co-authored-by: Devin Robison <drobison@nvidia.com>
Co-authored-by: Devin Robison <drobison00@users.noreply.github.com>
2026-04-08 22:34:47 +00:00
Peter Steinberger
854976203e test: speed up plugin cli tests 2026-04-08 22:34:47 +00:00
Peter Steinberger
817a8dcd21 test: speed up slack setup entry tests 2026-04-08 22:34:47 +00:00
Peter Steinberger
cb80453151 test: speed up browser plugin entry tests 2026-04-08 22:34:47 +00:00
Nimrod Gutman
3ca91c872f feat(ios): improve gateway connection error ux (#62650)
* feat(ios): improve gateway connection error ux

* fix(ios): address gateway problem review feedback

* feat(ios): improve gateway connection error ux (#62650) (thanks @ngutman)
2026-04-08 22:34:47 +00:00
Agustin Rivera
b1479b6839 Require re-pairing for node reconnect command upgrades (#62658)
* fix(node): require re-pairing for reconnect command upgrades

Co-authored-by: zsx <git@zsxsoft.com>

* fix(node): tighten reconnect pairing test polling

* docs(changelog): add node reconnect pairing entry

---------

Co-authored-by: zsx <git@zsxsoft.com>
Co-authored-by: Devin Robison <drobison@nvidia.com>
2026-04-08 22:34:47 +00:00
Peter Steinberger
3d2c303a60 test(gateway): cover isolated cron session key routing 2026-04-08 22:34:47 +00:00
Bruce MacDonald
c45226ed84 Changelog: restore dropped Approvals/runtime entry from conflict resolution 2026-04-08 22:34:47 +00:00
Bruce MacDonald
2cfc6d9d19 chore(ollama): update suggested onboarding models (#62626)
Merged via squash.

Prepared head SHA: 48c083b88a
Co-authored-by: BruceMacD <5853428+BruceMacD@users.noreply.github.com>
Co-authored-by: BruceMacD <5853428+BruceMacD@users.noreply.github.com>
Reviewed-by: @BruceMacD
2026-04-08 22:34:47 +00:00
pgondhi987
eb3e39191e fix: expand host-exec env blocklist for Java, Rust, and Cargo toolchains [AI-assisted] (#62291)
* fix: address issue

* docs(changelog): add host env blocklist entry

---------

Co-authored-by: Devin Robison <drobison@nvidia.com>
Co-authored-by: Devin Robison <drobison00@users.noreply.github.com>
2026-04-08 22:34:47 +00:00
BitToby
8687b8fada feat: add cover image support to Discord event create (#60883)
* feat: add image param to Discord event create for cover art

* fix: pass trusted media roots to event cover image loader

* fix: solve lint error

* fix: add changelog entry for Discord event cover image support (#60883) (thanks @bittoby)

---------

Co-authored-by: Shadow <hi@shadowing.dev>
2026-04-08 22:34:47 +00:00
Gustavo Madeira Santana
a9bad91301 Refactor: centralize native approval lifecycle assembly (#62135)
Merged via squash.

Prepared head SHA: b7c20a7398
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-08 22:34:47 +00:00
pgondhi987
2fb877b457 fix(fetch-guard): drop request body on cross-origin unsafe-method redirects [AI-assisted] (#62357)
* fix: address issue

* fix: address review feedback

* docs(changelog): add fetch guard redirect body entry

---------

Co-authored-by: Devin Robison <drobison@nvidia.com>
2026-04-08 22:34:47 +00:00
Agustin Rivera
276c81f319 fix(matrix): remove worklog artifact from pr 2026-04-08 18:16:15 +00:00
Agustin Rivera
c65356d9a2 fix(matrix): remove worklog artifact from pr 2026-04-08 18:15:01 +00:00
Agustin Rivera
30c0e94042 fix(matrix): thread senderIsOwner into HTTP tool-invoke path 2026-04-08 18:01:33 +00:00
Agustin Rivera
1724a92958 fix(matrix): fail closed owner gate 2026-04-08 17:47:03 +00:00
Agustin Rivera
55326ffb07 fix(matrix): gate profile updates for non-owner runs 2026-04-07 18:17:15 +00:00
Peter Steinberger
d855f5f505 Tests: fix full-suite regressions 2026-04-07 18:59:38 +01:00
DhruvBhatia0
12331f0463 feat: add pluggable compaction provider registry (#56224)
Merged via squash.

Prepared head SHA: 0cc9cf3f30
Co-authored-by: DhruvBhatia0 <69252327+DhruvBhatia0@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
2026-04-07 10:55:34 -07:00
pgondhi987
14ec1ac50f fix(browser): harden SSRF redirect guard against non-navigation document hops [AI] (#62355)
* fix: address issue

* fix: address PR review feedback

* docs(changelog): add browser redirect SSRF entry

---------

Co-authored-by: Devin Robison <drobison@nvidia.com>
Co-authored-by: Devin Robison <drobison00@users.noreply.github.com>
2026-04-07 11:37:31 -06:00
i-dentifier
adb7b0d5d6 fix: compaction after tool use abortion cause agent infinite loop calls (#62600)
Merged via squash.

Prepared head SHA: 304ba07207
Co-authored-by: i-dentifier <44976464+i-dentifier@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
2026-04-07 10:28:00 -07:00
Agustin Rivera
e617aa6d1e fix(browser): add changelog entry for #62023 2026-04-07 17:23:22 +00:00
Peter Steinberger
7c478473fe Tests: tighten cron timeout start handshakes 2026-04-08 01:20:00 +08:00
Peter Steinberger
16cebe5669 Tests: stabilize cron timeout regressions 2026-04-08 01:10:19 +08:00
Agustin Rivera
049acf23cb fix(browser): guard interaction-driven navigations 2026-04-07 10:03:12 -07:00
pgondhi987
df881d5c18 fix(allowlist): gate write commands behind owner check before channel resolution [AI] (#62383)
* fix: address issue

* docs(changelog): add allowlist owner gate entry

---------

Co-authored-by: Devin Robison <drobison@nvidia.com>
2026-04-07 11:01:15 -06:00
EVA
caecd3c1fe fix(agents): heartbeat always targets main session — prevent routing to active subagent sessions (#61803)
Merged via squash.

Prepared head SHA: 5d79db3940
Co-authored-by: 100yenadmin <239388517+100yenadmin@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
2026-04-07 09:59:18 -07:00
mappel-nv
c6b5731c5d Plugins: verify ClawHub archive integrity (#60517)
* docs(changelog): add clawhub archive integrity entry

---------

Co-authored-by: Devin Robison <drobison@nvidia.com>
2026-04-07 10:55:22 -06:00
Peter Steinberger
b2dc25cd12 fix: repair ci type narrowing 2026-04-07 17:51:05 +01:00
Peter Steinberger
037340d287 refactor: dedupe gateway lowercase helpers 2026-04-07 17:50:38 +01:00
Peter Steinberger
6058eacaec refactor: dedupe infra lowercase helpers 2026-04-07 17:50:38 +01:00
Peter Steinberger
1a3f141215 refactor: dedupe cli lowercase helpers 2026-04-07 17:50:38 +01:00
Peter Steinberger
cebfa70277 refactor: dedupe auto-reply lowercase helpers 2026-04-07 17:50:37 +01:00
Peter Steinberger
d40dc8f025 refactor: dedupe agent lowercase helpers 2026-04-07 17:50:37 +01:00
Peter Steinberger
d56fe040b4 refactor: dedupe agent lowercase helpers 2026-04-07 17:50:37 +01:00
Peter Steinberger
9e61209780 refactor: dedupe agent lowercase helpers 2026-04-07 17:50:37 +01:00
Peter Steinberger
d4eb3e12c9 test: speed up channel setup entry tests 2026-04-07 17:36:41 +01:00
Peter Steinberger
0828db93e9 test: speed up provider entry tests 2026-04-07 17:36:41 +01:00
Peter Steinberger
c1fc2ed0e8 test: speed up provider auth onboarding test 2026-04-07 17:36:41 +01:00
pgondhi987
f0c9978030 fix(feishu): enforce workspace-only localRoots in docx upload actions [AI-assisted] (#62369)
* fix: address issue

* docs(changelog): add feishu workspace-only docx entry

---------

Co-authored-by: Devin Robison <drobison@nvidia.com>
2026-04-07 10:35:03 -06:00
Peter Steinberger
67a3af7f8d Tests: fix nostr package boundary drift 2026-04-08 00:33:13 +08:00
Josh Lehman
e46e32b98c feat: expose prompt-cache runtime context to context engines (#62179)
* Context engine: plumb prompt cache runtime context

Add a typed prompt-cache payload to the context-engine runtime context and populate it from the embedded runner's resolved retention, last-call usage, cache-break observation, and cache-touch metadata. Also pass the same payload through the retry compaction runtime context when a run attempt already has it.

Regeneration-Prompt: |
  Expose OpenClaw prompt-cache telemetry to context engines in a narrow,
  additive way without changing compaction policy. Keep the public change on
  the OpenClaw side only: add a typed promptCache payload to the context-engine
  runtime context, thread it into afterTurn, and also into compact where the
  existing run loop already has the data cheaply available.

  Use OpenClaw's resolved cache retention, not raw config. Use last-call usage
  for the new payload, not accumulated retry or tool-loop totals. Reuse the
  existing prompt-cache observability result and tracked change causes instead
  of inventing a new heuristic. If cache-touch metadata is already available
  from the cache-TTL bookkeeping, include it; do not invent expiry timestamps
  for providers where OpenClaw cannot know them confidently.

  Keep the interface backward-compatible for engines that ignore the new field.
  Add focused tests around the existing attempt/context-engine helpers and the
  compaction runtime-context propagation path rather than broad new integration
  coverage.

* Agents: fix prompt-cache afterTurn usage

Regeneration-Prompt: |
  Fix PR #62179 so context-engine prompt-cache metadata uses only the current attempt's usage. The review comment pointed out that early exits could reuse a prior turn's assistant usage when no new assistant message was produced. Restrict the prompt-cache lastCallUsage lookup to assistant messages added after prePromptMessageCount, and fall back to current-attempt usage totals instead of stale snapshot history. Also repair the PR's new context-engine test typings and add a regression test for the stale prior-turn case. Two import-only fixes in doctor-state-integrity and config/talk were already broken on origin/main, but they blocked build/check and the gateway-watch regression harness, so include the minimum unblocking imports as well.

* Agents: document prompt-cache context

* Agents: address prompt-cache review feedback

* Doctor: drop unused isRecord import
2026-04-07 09:29:57 -07:00
James Reagan
dac72889e5 fix(bluebubbles): localhost probe respects private-network opt-out (#59373)
* honor localhost private-network policy

* drop flaky monitor private-network test

* align mocks and imports

* preserve account private-network overrides

* keep default account config

* strip stale private-network aliases

* fix(bluebubbles): remove unused channel imports

* fix: add changelog for bluebubbles private-network opt-out landing (#59373) (thanks @jpreagan)

---------

Co-authored-by: Shadow <hi@shadowing.dev>
2026-04-07 11:29:21 -05:00
Peter Steinberger
23edd9921e Tests: isolate channel tool-result session stores 2026-04-08 00:16:22 +08:00
Peter Steinberger
904017814b test: speed up mistral api tests 2026-04-07 17:11:55 +01:00
Peter Steinberger
76bc0ae32f test: speed up irc channel seam tests 2026-04-07 17:11:55 +01:00
Peter Steinberger
2de8b91448 test: speed up telegram and nextcloud talk channel tests 2026-04-07 17:11:55 +01:00
Peter Steinberger
e8c0f25598 test: speed up matrix and nostr channel tests 2026-04-07 17:11:55 +01:00
pgondhi987
5880ec17b1 fix(gateway): invalidate shared-token/password WS sessions on secret rotation [AI] (#62350)
* fix: address issue

---------

Co-authored-by: Devin Robison <drobison@nvidia.com>
2026-04-07 10:10:10 -06:00
Peter Steinberger
6a6a279fda perf(auto-reply): trim duplicate heavy coverage 2026-04-07 16:52:08 +01:00
Peter Steinberger
a563f1f4a0 Messaging: remove stale adapter imports 2026-04-07 16:48:54 +01:00
Peter Steinberger
96724e5a4b Messaging: align adapter compile surfaces 2026-04-07 16:46:21 +01:00
Peter Steinberger
ba6213bc14 fix(extensions): restore package boundary type coverage 2026-04-07 16:44:47 +01:00
Peter Steinberger
8cee6f96e6 fix(test): isolate provider auth env marker mocks 2026-04-07 16:44:41 +01:00
Peter Steinberger
d366b13ec9 fix(test): restore cli runtime mocks and gateway timeouts 2026-04-07 16:18:12 +01:00
Peter Steinberger
eb29782416 fix(discord): stabilize DM ACP binding identity 2026-04-07 16:16:06 +01:00
Peter Steinberger
57a3744f16 test: speed up line and nostr channel tests 2026-04-07 16:13:58 +01:00
Peter Steinberger
a96790fde7 test: speed up setup and core extension tests 2026-04-07 16:13:57 +01:00
Peter Steinberger
9975e3172d test: speed up chat channel adapter tests 2026-04-07 16:13:57 +01:00
Peter Steinberger
2e1979a600 Messaging: normalize optional directory inputs 2026-04-07 16:07:06 +01:00
Peter Steinberger
e973275fd0 fix: harden claude-cli live switch smoke 2026-04-07 16:05:54 +01:00
Peter Steinberger
9c56c84ce0 Tests: isolate plugin project modules 2026-04-07 16:02:23 +01:00
Peter Steinberger
9d4b0d551d fix: support inferrs string-only completions 2026-04-07 15:55:20 +01:00
Peter Steinberger
ea9efc0e81 refactor: dedupe plugin lowercase helpers 2026-04-07 15:53:50 +01:00
Peter Steinberger
1d7e87580d refactor: dedupe media lowercase helpers 2026-04-07 15:53:50 +01:00
Peter Steinberger
c3074bd513 refactor: dedupe path lowercase helpers 2026-04-07 15:53:50 +01:00
Peter Steinberger
bbcc95948e refactor: dedupe provider lowercase helpers 2026-04-07 15:53:50 +01:00
Peter Steinberger
761e12008d refactor: dedupe infra lowercase helpers 2026-04-07 15:53:50 +01:00
Peter Steinberger
ddde144cb6 refactor: dedupe signal lowercase helpers 2026-04-07 15:53:50 +01:00
Peter Steinberger
9e007ef759 refactor: restore slack resolve-users narrowing 2026-04-07 15:53:50 +01:00
Peter Steinberger
774b6b6438 refactor: dedupe messaging lowercase helpers 2026-04-07 15:53:50 +01:00
Peter Steinberger
f476f8211c refactor: dedupe acp lowercase helpers 2026-04-07 15:53:50 +01:00
Peter Steinberger
4bcbb22678 refactor: dedupe messaging lowercase helpers 2026-04-07 15:53:49 +01:00
nv-kasikritc
d43cc470c6 refactor(nvidia-endpoints): updated language & default models (#59866)
* fix(nvidia-endpoints): updated language & default models

* fix(nvidia-endpoints): updated link for api key

* fix(nvidia-endpoints): removed unused const

* fix(nvidia-endpoints): edited max tokens

* fix(nvidia-endpoints): fixed typo

---------

Co-authored-by: Devin Robison <drobison00@users.noreply.github.com>
2026-04-07 08:47:29 -06:00
Tak Hoffman
ac6693986b docs: rename and improve infer docs 2026-04-07 09:42:42 -05:00
Peter Steinberger
c2995bc470 test: speed up zalouser directory tests 2026-04-07 15:41:23 +01:00
Peter Steinberger
91b3446098 test: speed up whatsapp setup tests 2026-04-07 15:41:23 +01:00
Peter Steinberger
6fe93b55cb Provider usage: narrow auth store before profile lookup 2026-04-07 15:34:11 +01:00
Peter Steinberger
17a8c896a4 Tests: relax serialized models write ordering 2026-04-07 15:29:29 +01:00
Peter Steinberger
a3d5630232 test: stabilize scoped runners and qa ports 2026-04-07 15:28:46 +01:00
Peter Steinberger
067f158b74 fix: preserve plugin runtime registry state 2026-04-07 15:28:46 +01:00
Peter Steinberger
d3b359a1c2 fix: stabilize agent and config isolation 2026-04-07 15:28:46 +01:00
Peter Steinberger
d9333ac095 test: speed up plugin status tests 2026-04-07 15:25:21 +01:00
Peter Steinberger
8b2b52dc94 test: speed up provider usage auth tests 2026-04-07 15:25:21 +01:00
Peter Steinberger
8894dab3c4 fix(auth): resolve custom env markers dynamically 2026-04-07 15:17:31 +01:00
Peter Steinberger
cd92c6289c Tests: stabilize provider reload boundaries 2026-04-07 22:16:53 +08:00
Peter Steinberger
bcaa195c52 fix(test): restore agentic and runtime shard coverage 2026-04-07 15:16:03 +01:00
Peter Steinberger
1f48ee8f9c refactor: dedupe remaining lowercase helpers 2026-04-07 15:12:32 +01:00
Peter Steinberger
9314bb7180 refactor: dedupe extension lowercase helpers 2026-04-07 15:12:32 +01:00
Peter Steinberger
948d139399 refactor: dedupe lowercase helper readers 2026-04-07 15:12:32 +01:00
Peter Steinberger
eba04199f8 refactor: dedupe core lowercase helpers 2026-04-07 15:12:32 +01:00
Peter Steinberger
60d9c150b2 refactor: dedupe provider lowercase helpers 2026-04-07 15:12:32 +01:00
Peter Steinberger
2cd11565a6 refactor: dedupe security lowercase helpers 2026-04-07 15:12:32 +01:00
Peter Steinberger
a903936750 refactor: dedupe core lowercase helpers 2026-04-07 15:12:32 +01:00
Peter Steinberger
ad605052bf refactor: dedupe provider lowercase helpers 2026-04-07 15:12:31 +01:00
Peter Steinberger
f2b13b0a1a refactor: dedupe slack matrix venice lowercase helpers 2026-04-07 15:12:31 +01:00
Peter Steinberger
62a5480808 refactor: dedupe irc qqbot telegram lowercase helpers 2026-04-07 15:12:31 +01:00
Peter Steinberger
898579d8ba fix: restore msteams channel string normalization import 2026-04-07 15:10:51 +01:00
Peter Steinberger
da300c12e3 Tests: pin full shard worker budget 2026-04-07 15:07:58 +01:00
Peter Steinberger
dfe1ef9041 Browser: remove timer dependency from proxy tests 2026-04-07 15:07:57 +01:00
Peter Steinberger
72559324b3 Tests: stabilize provider runtime contract imports 2026-04-07 22:07:29 +08:00
Peter Steinberger
2cd8b2adf4 test: speed up msteams actions tests 2026-04-07 15:03:13 +01:00
Peter Steinberger
e8bbd19aa2 fix(config): restore legacy doctor rules 2026-04-07 14:53:00 +01:00
Peter Steinberger
e0ea007536 Discord: fix audit test config typing 2026-04-07 14:42:41 +01:00
Peter Steinberger
8df1dbb8c7 Auto-reply: preserve compacted transcript subpaths 2026-04-07 14:40:28 +01:00
Peter Steinberger
33e93e2a07 Telegram: lazy load send runtime from entrypoints 2026-04-07 14:39:28 +01:00
Peter Steinberger
47563305a2 Tests: isolate full-suite state leaks 2026-04-07 14:39:28 +01:00
Peter Steinberger
c8e290fe22 test: speed up msteams directory tests 2026-04-07 14:38:59 +01:00
Peter Steinberger
7316a95327 test: speed up line and tlon seam tests 2026-04-07 14:38:59 +01:00
Peter Steinberger
c385a2d45e test: speed up discord audit tests 2026-04-07 14:38:59 +01:00
Peter Steinberger
ee6ff1b8c2 test: speed up diffs browser tests 2026-04-07 14:38:59 +01:00
Peter Steinberger
b7e049b390 fix: align matrix probe policy seam 2026-04-07 14:26:34 +01:00
Peter Steinberger
d0651e688a Tests: fix extension package boundary drifts 2026-04-07 21:26:02 +08:00
Peter Steinberger
83d08440dc fix(boundary): align channel gateway context types 2026-04-07 14:22:14 +01:00
Peter Steinberger
1409d5a160 fix(boundary): restore bluebubbles and matrix type seams 2026-04-07 14:17:03 +01:00
Peter Steinberger
f3d105b5e8 test: speed up discord channel tests 2026-04-07 14:15:42 +01:00
Peter Steinberger
09c6528bc7 test: speed up provider tool tests 2026-04-07 14:15:42 +01:00
Peter Steinberger
92c912ef66 test: speed up irc setup tests 2026-04-07 14:15:42 +01:00
Peter Steinberger
3f8d7bb1fe test: speed up googlechat setup tests 2026-04-07 14:15:42 +01:00
Peter Steinberger
df993291b6 refactor: share bundled loader Jiti config helpers 2026-04-07 14:13:16 +01:00
Peter Steinberger
2e0354e725 fix(secrets): restore unsupported surface channel discovery 2026-04-07 14:09:40 +01:00
Vincent Koc
d607740c4a fix(ci): repair channel type drift 2026-04-07 14:06:12 +01:00
Peter Steinberger
42fa0cb438 Tests: align plugin-sdk root export contract 2026-04-07 21:04:43 +08:00
Peter Steinberger
cc70e663f1 test: speed up nextcloud talk and zalo status tests 2026-04-07 13:59:10 +01:00
Peter Steinberger
67da64f98d test: split imessage status coverage 2026-04-07 13:59:10 +01:00
Peter Steinberger
4c67991f43 test: speed up matrix channel seam tests 2026-04-07 13:59:10 +01:00
Peter Steinberger
60199fbee3 test: speed up bluebubbles pairing tests 2026-04-07 13:59:09 +01:00
Tak Hoffman
365c30fbfe docs infer cli examples and alias note 2026-04-07 07:56:03 -05:00
Peter Steinberger
40bdf60ad6 Tests: isolate reply task registry state 2026-04-07 20:53:17 +08:00
Peter Steinberger
e7bef917c9 Tests: fix config boundary drift 2026-04-07 20:53:17 +08:00
Peter Steinberger
f8f0c3a017 test(plugins): align root plugin-sdk runtime contract 2026-04-07 13:47:22 +01:00
Peter Steinberger
85b518f1ca fix: repair post-rebase test typing 2026-04-07 13:44:42 +01:00
Peter Steinberger
602e45af94 fix: restore ci type compatibility 2026-04-07 13:44:42 +01:00
Peter Steinberger
62793e6027 refactor: dedupe infra lowercase readers 2026-04-07 13:44:42 +01:00
Peter Steinberger
ab4a6faf86 refactor: dedupe config lowercase helpers 2026-04-07 13:44:42 +01:00
Peter Steinberger
e0c5b6c280 refactor: dedupe gateway lowercase helpers 2026-04-07 13:44:42 +01:00
Peter Steinberger
572c5b6dd0 refactor: dedupe daemon lowercase helpers 2026-04-07 13:44:42 +01:00
Peter Steinberger
f09cee84f2 refactor: dedupe google chat lowercase helpers 2026-04-07 13:44:42 +01:00
Peter Steinberger
a93a94788a refactor: dedupe tlon and voice-call lowercase helpers 2026-04-07 13:44:42 +01:00
Peter Steinberger
88b394ba1b refactor: dedupe feishu and bluebubbles lowercase helpers 2026-04-07 13:44:41 +01:00
Peter Steinberger
ae4f8da94f refactor: dedupe media and discord lowercase helpers 2026-04-07 13:44:41 +01:00
Peter Steinberger
cb28d8d6b8 refactor: dedupe browser and memory lowercase helpers 2026-04-07 13:44:41 +01:00
Peter Steinberger
a15a5a1edc refactor: dedupe lowercase helper readers 2026-04-07 13:44:41 +01:00
Peter Steinberger
b96155e4e7 test(boundary): align package path invariants 2026-04-07 13:41:00 +01:00
Peter Steinberger
4b8bca3444 test: speed up channel plugin tests 2026-04-07 13:37:01 +01:00
Peter Steinberger
46db833772 test: speed up channel probe tests 2026-04-07 13:37:01 +01:00
Peter Steinberger
b747e0c34d test: speed up msteams setup surface 2026-04-07 13:37:01 +01:00
Peter Steinberger
9d26b1056f test: split backup verify coverage 2026-04-07 13:37:01 +01:00
Vincent Koc
b0e138f7fd fix(build): drop duplicate web fetch helper 2026-04-07 13:34:20 +01:00
Vincent Koc
88e407cd8c fix(build): restore capability and web-fetch typing 2026-04-07 13:34:20 +01:00
Peter Steinberger
9743c2538c fix(boundary): restore telegram setup imports 2026-04-07 13:33:14 +01:00
Peter Steinberger
833bd61aa1 test: harden parallels smoke reruns 2026-04-07 13:30:46 +01:00
Peter Steinberger
4ede1e4e3a fix(boundary): restore compile and dm policy type paths 2026-04-07 13:28:55 +01:00
Tak Hoffman
59aea1e74d fix web search fallback explicitness 2026-04-07 07:19:31 -05:00
Peter Steinberger
f461033c66 test: speed up probe bootstrap tests 2026-04-07 13:16:49 +01:00
Peter Steinberger
dc854ec521 test: speed up setup surface tests 2026-04-07 13:16:49 +01:00
Peter Steinberger
6fdea7c755 fix(extensions): bypass stale helper runtime exports 2026-04-07 13:16:08 +01:00
Vincent Koc
4c97582d4b fix(plugins): restore shared boundary sdk prep 2026-04-07 13:11:30 +01:00
Vincent Koc
76296a9d14 fix(plugins): track package boundary dts freshness 2026-04-07 13:11:30 +01:00
Tak Hoffman
97c031a8db feat: Add first-class infer CLI for inference workflows (#62129)
* refresh infer branch onto latest main

* flatten infer media commands

* fix tts runtime facade export

* validate explicit web search providers

* fix infer auth logout persistence
2026-04-07 07:11:19 -05:00
Vincent Koc
dfb6c9c920 perf(plugin-sdk): split channel secret runtime helpers 2026-04-07 13:09:12 +01:00
Peter Steinberger
de3f742221 fix: centralize Windows bundled Jiti loader policy (#62286) (thanks @chen-zhang-cs-code) 2026-04-07 13:08:07 +01:00
chen-zhang-cs-code
9a6a1508c1 fix: avoid native Jiti dist loads on Windows 2026-04-07 13:08:07 +01:00
Peter Steinberger
3a07d664a8 fix(boundary): restore warm support shard checks 2026-04-07 13:07:18 +01:00
Peter Steinberger
9d6c874d50 test: speed up config misc validation 2026-04-07 13:02:12 +01:00
Peter Steinberger
65aab4bb27 fix: tighten lowercase helper typing 2026-04-07 13:01:50 +01:00
Peter Steinberger
18acfe7352 refactor: dedupe msteams lowercase helpers 2026-04-07 13:01:23 +01:00
Peter Steinberger
a33dd445b2 refactor: dedupe zalouser lowercase helpers 2026-04-07 13:01:23 +01:00
Peter Steinberger
999508ff07 refactor: dedupe extension lowercase helpers 2026-04-07 13:01:23 +01:00
Peter Steinberger
9716f970a3 refactor: dedupe infra lowercase helpers 2026-04-07 13:01:23 +01:00
Peter Steinberger
8e4eaec394 refactor: dedupe agent lowercase helpers 2026-04-07 13:01:23 +01:00
Peter Steinberger
0cbf99ab42 refactor: dedupe agent tool lowercase helpers 2026-04-07 13:01:23 +01:00
Peter Steinberger
da6ca1c094 refactor: dedupe sandbox lowercase helpers 2026-04-07 13:01:23 +01:00
Peter Steinberger
978a0a720e refactor: dedupe cli lowercase helpers 2026-04-07 13:01:23 +01:00
Peter Steinberger
50265c8b1f refactor: dedupe agent lowercase helpers 2026-04-07 13:01:23 +01:00
Peter Steinberger
f2fa096f14 refactor: dedupe gateway lowercase helpers 2026-04-07 13:01:23 +01:00
Peter Steinberger
16fad4d7d6 Tests: align reply state and plugin-sdk surface 2026-04-07 20:00:14 +08:00
Peter Steinberger
443035ba52 Tests: fix memory-core dreaming timezone drift 2026-04-07 20:00:14 +08:00
Peter Steinberger
0161872c41 Tests: stabilize auth profile and subagent resume specs 2026-04-07 20:00:14 +08:00
Peter Steinberger
5390eadc4e Tests: fix boundary and late-run drift 2026-04-07 19:59:51 +08:00
Peter Steinberger
1cec37184c fix: harden qa memory dreaming sweep 2026-04-07 12:57:33 +01:00
Vincent Koc
ead634812e perf(secrets): hint bundled web provider owners 2026-04-07 12:57:17 +01:00
Peter Steinberger
c084630f9e test(auto-reply): move mixed reasoning coverage to directive seam 2026-04-07 12:56:17 +01:00
Peter Steinberger
9d358d557d perf(auto-reply): drop duplicate heavy runtime tests 2026-04-07 12:56:17 +01:00
Vincent Koc
fdc88a753f perf(plugins): slim boundary canary target 2026-04-07 12:50:16 +01:00
Vincent Koc
7834cc14f0 perf(plugins): share bundled public artifact loaders 2026-04-07 12:48:20 +01:00
Peter Steinberger
7a2a594044 test: fix setup and config typing drift 2026-04-07 12:48:05 +01:00
Peter Steinberger
af8712fff1 test: fix auto-reply dispatch ci drift 2026-04-07 12:48:05 +01:00
Vincent Koc
e943efc048 perf(plugins): parallelize boundary canaries 2026-04-07 12:44:52 +01:00
Peter Steinberger
991d4e2006 test: speed up setup plugin tests 2026-04-07 12:42:56 +01:00
Peter Steinberger
00e902a60b test: speed up legacy config tests 2026-04-07 12:42:56 +01:00
Peter Steinberger
c83db77629 Auto-reply: fix reset test gate 2026-04-07 12:41:11 +01:00
Peter Steinberger
98822fdd63 Agents: isolate SSE MCP transport fetch 2026-04-07 12:41:11 +01:00
Vincent Koc
f22d708d6f perf(plugins): cache shared boundary freshness scans 2026-04-07 12:39:19 +01:00
Vincent Koc
bc79bbda0c perf(secrets): drop bundled channel manifest fallback 2026-04-07 12:38:56 +01:00
Vincent Koc
12864e3b21 perf(plugins): stabilize warm boundary compile skips 2026-04-07 12:35:48 +01:00
Peter Steinberger
87e0353b06 test(auto-reply): trim reply utility harnesses 2026-04-07 12:35:08 +01:00
Peter Steinberger
5a652303b5 test(auto-reply): isolate dispatch runtime mocks 2026-04-07 12:35:08 +01:00
Peter Steinberger
b03522bcd8 Tests: stabilize bundle MCP SSE materialization 2026-04-07 12:32:06 +01:00
Nimrod Gutman
de6bac331c fix(exec): detect cmd wrapper carriers (#62439)
* fix(exec): detect cmd wrapper carriers

* fix(exec): block env cmd wrapper carriers

* fix: keep cmd wrapper carriers approval-gated (#62439) (thanks @ngutman)
2026-04-07 14:27:06 +03:00
Vincent Koc
7d2088132d perf(plugins): skip fresh boundary plugin compiles 2026-04-07 12:26:09 +01:00
Peter Steinberger
c541a9c110 Tests: fix flaky shard expectations 2026-04-07 12:22:51 +01:00
Peter Steinberger
e5716394ca Config: sync generated schema baseline 2026-04-07 12:22:51 +01:00
Val Alexander
922459dda0 fix(google): preserve Gemma 4 thinking-off semantics (#62411) thanks @BunsDev
Co-authored-by: Nova <nova@openknot.ai>
2026-04-07 06:20:56 -05:00
Vincent Koc
3493db46a4 perf(plugins): skip fresh boundary dts prep 2026-04-07 12:19:49 +01:00
Peter Steinberger
b374a031ec fix: guard normalized allowlist sender lookup 2026-04-07 12:18:23 +01:00
Peter Steinberger
768f2fdc47 refactor: dedupe command lowercase helpers 2026-04-07 12:18:23 +01:00
Peter Steinberger
4091fe17b9 refactor: dedupe doctor lowercase helpers 2026-04-07 12:18:22 +01:00
Peter Steinberger
353678ec05 refactor: dedupe auto-reply lowercase readers 2026-04-07 12:18:22 +01:00
Peter Steinberger
934927fd13 refactor: dedupe cron lowercase helpers 2026-04-07 12:18:22 +01:00
Peter Steinberger
bbe5a4b31a refactor: dedupe web provider lower readers 2026-04-07 12:18:22 +01:00
Peter Steinberger
d6132e10f4 refactor: dedupe session binding lowercase helpers 2026-04-07 12:18:22 +01:00
Peter Steinberger
e2b5bdd500 refactor: dedupe plugin lowercase helpers 2026-04-07 12:18:22 +01:00
Peter Steinberger
37a7baf270 refactor: dedupe agent lowercase helpers 2026-04-07 12:18:22 +01:00
Peter Steinberger
3a2e347dc7 refactor: dedupe auto-reply lowercase parsers 2026-04-07 12:18:22 +01:00
Peter Steinberger
b39c7eece6 refactor: dedupe extension lowercase readers 2026-04-07 12:18:01 +01:00
Peter Steinberger
fbf7859f6d test(auto-reply): isolate fallback selection coverage 2026-04-07 12:17:03 +01:00
Peter Steinberger
43e6c923de perf(auto-reply): extract followup delivery seam 2026-04-07 12:17:02 +01:00
Vincent Koc
8183e2d657 fix(zalouser): align setup test account resolver 2026-04-07 12:14:46 +01:00
Vincent Koc
447ab8102a perf(secrets): split explicit bundled web provider artifacts 2026-04-07 12:14:13 +01:00
Vincent Koc
8ebd022377 refactor(plugins): time boundary phases 2026-04-07 12:11:17 +01:00
Peter Steinberger
b1255b0e0b test: speed up whatsapp setup surface 2026-04-07 12:09:15 +01:00
Peter Steinberger
ee55350450 test: speed up config schema tests 2026-04-07 12:09:15 +01:00
Vincent Koc
721097f2e9 refactor(plugins): print boundary success summary 2026-04-07 12:05:24 +01:00
Vincent Koc
f856e0b72f refactor(plugins): annotate boundary failure metadata 2026-04-07 12:01:35 +01:00
Peter Steinberger
125feadc48 style: normalize bundled shape guard formatting 2026-04-07 11:57:25 +01:00
Peter Steinberger
d5faa699da test: speed up bundled shape guard 2026-04-07 11:57:25 +01:00
Peter Steinberger
2f51dfca01 test: speed up browser auth auto-token test 2026-04-07 11:57:25 +01:00
Peter Steinberger
74c239c77d test: speed up whatsapp send api test 2026-04-07 11:57:25 +01:00
Peter Steinberger
ac478e2024 test: speed up setup surface tests 2026-04-07 11:57:25 +01:00
Peter Steinberger
6071c6f6ea fix: use shared image probe path in live cli backend 2026-04-07 11:56:52 +01:00
Vincent Koc
48ea1c3492 fix(plugins): harden boundary check failures 2026-04-07 11:56:38 +01:00
Vincent Koc
9ea3da08df perf(plugin-sdk): narrow provider contract config types 2026-04-07 11:55:02 +01:00
Vincent Koc
1e5b026e61 perf(plugins): abort failed boundary compile siblings 2026-04-07 11:47:10 +01:00
Peter Steinberger
f13542f211 test: fix manifest registry candidate fixtures 2026-04-07 11:43:10 +01:00
Vincent Koc
f54188f600 fix(plugins): abort sibling boundary prep steps 2026-04-07 11:42:45 +01:00
Vincent Koc
aa61b508d1 perf(plugin-sdk): slim provider contract enable path 2026-04-07 11:42:24 +01:00
Peter Steinberger
d6b634bc30 test: harden gateway talk and config drift coverage 2026-04-07 11:41:02 +01:00
Peter Steinberger
a20d96ae31 test: stabilize isolated runtime and config suites 2026-04-07 11:41:02 +01:00
Peter Steinberger
8be79a09b8 build: align plugin sdk boundary exports 2026-04-07 11:41:02 +01:00
Vincent Koc
0ca8eb40c1 refactor(plugins): stream boundary prep step output 2026-04-07 11:38:04 +01:00
Peter Steinberger
525e78e3d9 test: split message command coverage 2026-04-07 11:35:59 +01:00
Peter Steinberger
ce18c3e9e7 test: speed up auto-reply registry tests 2026-04-07 11:35:59 +01:00
Peter Steinberger
be3b7cf875 test: speed up whatsapp inbound media test 2026-04-07 11:35:59 +01:00
Peter Steinberger
5489bff7c3 test: speed up chutes model tests 2026-04-07 11:35:58 +01:00
Vincent Koc
1604b4a304 test(plugins): lock boundary path override inventory 2026-04-07 11:34:45 +01:00
Vincent Koc
9a4e35a24f perf(secrets): fast-path bundled channel contract loads 2026-04-07 11:34:09 +01:00
Vincent Koc
cd54f20fe2 perf(plugins): parallelize boundary artifact prep 2026-04-07 11:32:25 +01:00
Vincent Koc
a8e46e7048 fix(plugins): scrub canary artifacts for all opt-in packages 2026-04-07 11:26:34 +01:00
Vincent Koc
5613f5a834 perf(secrets): narrow legacy web search compat providers 2026-04-07 11:25:19 +01:00
Bob
f6124f3e17 ACP: harden Discord recovery and reset flow (#62132)
* ACP: harden Discord recovery and reset flow

* CI: harden bundled vitest excludes

* ACP: fix Claude launch and reset recovery

* Discord: use follow-up replies after slash defer

* ACP: route bound resets through gateway service

* ACP: unify bound reset authority

* ACPX: update OpenClaw branch to 0.5.2

* ACP: fix rebuilt branch replay fallout

* ACP: fix CI regressions after ACPX 0.5.2 update

---------

Co-authored-by: Onur <2453968+osolmaz@users.noreply.github.com>
2026-04-07 12:23:50 +02:00
Peter Steinberger
4fa7931b1b build: sync generated gateway protocol models 2026-04-07 11:22:07 +01:00
Vincent Koc
29732c1459 test(plugins): lock xai boundary path drift 2026-04-07 11:21:04 +01:00
Peter Steinberger
1fdb013599 refactor: dedupe routing lowercase helpers 2026-04-07 11:18:18 +01:00
Peter Steinberger
36938bccb5 refactor: dedupe channel lowercase helpers 2026-04-07 11:18:18 +01:00
Peter Steinberger
5de04bc1d5 refactor: dedupe extension lowercase query helpers 2026-04-07 11:18:18 +01:00
Peter Steinberger
967ecddfed refactor: dedupe extension lower readers 2026-04-07 11:18:18 +01:00
Peter Steinberger
6bd6f4d27c refactor: dedupe shared lowercase helpers 2026-04-07 11:18:18 +01:00
Peter Steinberger
4dc16e1567 refactor: dedupe lowercase normalizer readers 2026-04-07 11:18:18 +01:00
Peter Steinberger
af1cf77b16 refactor: dedupe extension lowercase readers 2026-04-07 11:18:18 +01:00
Peter Steinberger
fbdb20ffd3 refactor: dedupe reply lowercase helpers 2026-04-07 11:18:18 +01:00
Peter Steinberger
3139d2007e refactor: dedupe lowercase empty-string readers 2026-04-07 11:18:18 +01:00
Peter Steinberger
55f07e0381 refactor: dedupe shared string normalizers 2026-04-07 11:18:18 +01:00
Peter Steinberger
0bbd70ac79 style: normalize line monitor lifecycle test formatting 2026-04-07 11:18:09 +01:00
Peter Steinberger
9437c24764 test: speed up line monitor lifecycle coverage 2026-04-07 11:18:09 +01:00
Peter Steinberger
1baff9c64c test: speed up irc setup lifecycle coverage 2026-04-07 11:18:09 +01:00
Peter Steinberger
874ca3d691 test: split media understanding helper coverage 2026-04-07 11:18:09 +01:00
Peter Steinberger
1395650d95 test: fix huggingface discovery fixture 2026-04-07 11:16:59 +01:00
Vincent Koc
0b04d27beb fix(plugins): clear stale boundary canaries before compile 2026-04-07 11:14:09 +01:00
Vincent Koc
881f41d4a1 fix(plugins): clean package boundary canary artifacts 2026-04-07 11:10:16 +01:00
Vincent Koc
1b20303c0c perf(plugins): cache package boundary dts 2026-04-07 11:07:08 +01:00
Peter Steinberger
1e5f5fa319 perf(auto-reply): trim plugin install and directive tests 2026-04-07 11:06:23 +01:00
Nimrod Gutman
d008e2d015 fix(exec): align node shell allowlist wrappers (#62401)
* fix(exec): align node shell allowlist wrappers

* fix: align node shell allowlist wrappers (#62401) (thanks @ngutman)
2026-04-07 13:05:57 +03:00
Vignesh Natarajan
b6a806d67b chore(test): align staged runtime deps test typing 2026-04-07 03:05:46 -07:00
Peter Steinberger
56b0714004 Tests: fix gateway reconnect and mocks 2026-04-07 11:02:54 +01:00
Vignesh Natarajan
3fbb229d04 chore(ui): guard dreaming toggle for strict plugin schemas 2026-04-07 03:01:25 -07:00
Peter Steinberger
ec708f44df docs: update changelog for ollama discovery 2026-04-07 10:59:00 +01:00
Vincent Koc
dbcb1f06ec fix(test): suppress vitest plugin timing noise 2026-04-07 10:54:20 +01:00
Vincent Koc
90e8bef253 perf(secrets): skip no-op write runtime preflight 2026-04-07 10:52:08 +01:00
Vincent Koc
f7957d3bb7 fix(plugins): restore shared boundary sdk paths 2026-04-07 10:48:56 +01:00
Vignesh Natarajan
b21dd9c635 Tests: stabilize dream diary case assertion (#62275) 2026-04-07 02:47:46 -07:00
Vignesh Natarajan
733063e31c fix: slot-aware dreaming config paths (#62275) (thanks @SnowSky1) 2026-04-07 02:47:46 -07:00
Vignesh Natarajan
d84ac5b1eb Dreaming UI: use slot-aware configured state 2026-04-07 02:47:46 -07:00
sky
9dda94c0f7 fix(memory): respect memory slot in dreaming config 2026-04-07 02:47:46 -07:00
Peter Steinberger
24d4acb274 perf(test): parallelize extension boundary compile 2026-04-07 10:43:05 +01:00
Vincent Koc
b4d0d6fcc9 perf(secrets): narrow dry-run auth store preflight 2026-04-07 10:39:54 +01:00
Peter Steinberger
2b5f663c9c fix(ci): prepare plugin sdk boundary dts before lint 2026-04-07 10:37:39 +01:00
Peter Steinberger
67e6f88e42 fix: restore provider public artifact types 2026-04-07 10:37:39 +01:00
Peter Steinberger
a5efc9a6c9 refactor: dedupe acp reply lowercase helpers 2026-04-07 10:37:39 +01:00
Peter Steinberger
74ea9de6f2 refactor: dedupe reply lowercase helpers 2026-04-07 10:37:39 +01:00
Peter Steinberger
434d56a948 refactor: dedupe lowercase helper readers 2026-04-07 10:37:39 +01:00
Peter Steinberger
f54a57b80a refactor: dedupe lowercase string helpers 2026-04-07 10:37:39 +01:00
Peter Steinberger
f1bdfca1ed refactor: dedupe reply gateway helpers 2026-04-07 10:37:39 +01:00
Peter Steinberger
cb29ecc100 refactor: dedupe channel helper readers 2026-04-07 10:37:39 +01:00
Peter Steinberger
255abc57b9 refactor: dedupe thread id normalizers 2026-04-07 10:37:39 +01:00
Peter Steinberger
edfc8eb91a refactor: dedupe primary string helpers 2026-04-07 10:37:39 +01:00
Peter Steinberger
dd3e86d35b refactor: dedupe provider registry normalizers 2026-04-07 10:37:38 +01:00
Vincent Koc
bf040219e4 perf(plugins): cache extension boundary type checks 2026-04-07 10:36:19 +01:00
Peter Steinberger
4d4dbe8e15 test: share live probes with acp bind 2026-04-07 10:35:24 +01:00
Peter Steinberger
c2f9de3935 feat: unify live cli backend probes 2026-04-07 10:35:24 +01:00
Peter Steinberger
dbc7710938 Tests: fix gateway reconnect and boundary drift 2026-04-07 17:30:37 +08:00
Vincent Koc
5ae27dfb5a perf(secrets): skip idle plugin origin discovery 2026-04-07 10:27:02 +01:00
Peter Steinberger
e3cb19d162 test(boundary): unify package sdk type paths 2026-04-07 10:26:35 +01:00
Peter Steinberger
524951e124 fix(ci): route qa-lab web imports through package barrels 2026-04-07 10:24:02 +01:00
Vincent Koc
16877efba3 ci(plugins): enforce extension package boundary checks 2026-04-07 10:22:12 +01:00
Peter Steinberger
9db1a7acf0 fix(ci): restore array-safe record coercion 2026-04-07 10:17:40 +01:00
Vincent Koc
4329d94de3 fix(plugins): stabilize package boundary tsc checks 2026-04-07 10:15:34 +01:00
Peter Steinberger
34c78d3ba4 fix(ci): restore control-ui and provider policy checks 2026-04-07 10:12:01 +01:00
Peter Steinberger
991e25b880 Tests: move more leaf tests to unit fast 2026-04-07 10:10:39 +01:00
Peter Steinberger
f510576959 Tests: fix provider artifact typing 2026-04-07 10:07:06 +01:00
Vincent Koc
ea5faa9b39 perf(secrets): lazy-load apply test runtime 2026-04-07 10:06:23 +01:00
Peter Steinberger
7f6f6d8023 style: normalize qa lab imports 2026-04-07 10:05:49 +01:00
Peter Steinberger
f2494aa33f feat: streamline qa lab live runs 2026-04-07 10:05:49 +01:00
Peter Steinberger
5b5018bac5 Tests: load channel command mocks before subjects 2026-04-07 10:03:42 +01:00
Peter Steinberger
ba484d263b Tests: add unit-fast Vitest lane 2026-04-07 10:03:42 +01:00
Peter Steinberger
ae12aa49c3 Config: fix audit base record type 2026-04-07 10:03:42 +01:00
Vincent Koc
43b62c8753 perf(plugins): enable incremental boundary dts prep 2026-04-07 10:01:59 +01:00
Peter Steinberger
a14aef191b test: speed up task registry tests 2026-04-07 10:00:14 +01:00
Peter Steinberger
5a1cf20aee fix(discord): add voice listener compat shim 2026-04-07 09:57:11 +01:00
Peter Steinberger
124cd5e307 feat: auto-reload qa lab fast refresh 2026-04-07 09:54:59 +01:00
Vincent Koc
45663f2879 perf(config): add bundled provider policy artifacts 2026-04-07 09:52:56 +01:00
Vincent Koc
dc7b21bf36 perf(secrets): scope compat migration scans 2026-04-07 09:52:56 +01:00
Peter Steinberger
e331694df6 fix(gateway): unstick claude cli live e2e 2026-04-07 09:47:55 +01:00
Peter Steinberger
54a884865e feat: add fast qa lab ui refresh mode 2026-04-07 09:45:11 +01:00
Peter Steinberger
36aeef30c2 style: add padding to qa lab scenario list 2026-04-07 09:45:11 +01:00
Peter Steinberger
0312085408 fix: restore ci after type drift 2026-04-07 09:44:53 +01:00
Peter Steinberger
85c75f6573 refactor: dedupe auto-reply string helpers 2026-04-07 09:44:53 +01:00
Peter Steinberger
649de6d156 refactor: dedupe provider and channel string helpers 2026-04-07 09:44:53 +01:00
Peter Steinberger
b697cec223 refactor: dedupe gateway and flow string helpers 2026-04-07 09:44:53 +01:00
Peter Steinberger
6236db5192 refactor: dedupe runtime helper aliases 2026-04-07 09:44:53 +01:00
Peter Steinberger
4c97f0f0ce refactor: dedupe provider and cron string helpers 2026-04-07 09:44:53 +01:00
Peter Steinberger
365d5a410b refactor: dedupe trim string helpers 2026-04-07 09:44:53 +01:00
Peter Steinberger
8119915664 refactor: dedupe metadata string helpers 2026-04-07 09:44:53 +01:00
Peter Steinberger
9d8d1dd4c5 refactor: dedupe shared string aliases 2026-04-07 09:44:53 +01:00
Peter Steinberger
f336d8c948 refactor: dedupe helper string aliases 2026-04-07 09:44:53 +01:00
Peter Steinberger
7087845f58 refactor: dedupe trim reader aliases 2026-04-07 09:44:53 +01:00
Vincent Koc
9c9b0effda fix(boundaries): absorb latest main contract drift 2026-04-07 09:44:43 +01:00
Vincent Koc
eac6e2d42d fix(build): strip local workspace deps from staged plugin manifests 2026-04-07 09:44:43 +01:00
Vincent Koc
fb64ba7bf7 refactor(plugins): harden package boundary sdk prep 2026-04-07 09:44:43 +01:00
Peter Steinberger
81f48384cb fix: stabilize extension shard tests 2026-04-07 09:42:55 +01:00
Peter Steinberger
ad49549c92 test: split config runtime recovery coverage 2026-04-07 09:35:33 +01:00
Peter Steinberger
a799fd7ca7 test: accept flattened config audit records 2026-04-07 09:33:02 +01:00
Peter Steinberger
1baf5533aa feat(qa-lab): add Clawfather/Claw avatars and live-watch mode for scenario runs 2026-04-07 09:24:26 +01:00
Peter Steinberger
282188a326 fix(qa-lab): widen sidebar to 360px and allow scenario titles to wrap 2026-04-07 09:21:25 +01:00
Peter Steinberger
58e822e712 test: narrow hook and inbound context assertions 2026-04-07 09:18:59 +01:00
Peter Steinberger
eafe0a6d67 build: fix check and bundled runtime staging 2026-04-07 09:18:59 +01:00
Peter Steinberger
389075abc8 docs: make README model guidance provider-agnostic 2026-04-07 09:17:05 +01:00
Peter Steinberger
65f9fc397e perf(test): split support boundary shard 2026-04-07 09:12:26 +01:00
Peter Steinberger
d56831f81b fix: align gemini cli live backend runs 2026-04-07 09:06:09 +01:00
Peter Steinberger
0af808b457 test: add cli backend live matrix metadata 2026-04-07 09:06:09 +01:00
Vincent Koc
a227d1cc65 perf(secrets): cache channel security artifact lookups 2026-04-07 09:05:14 +01:00
Peter Steinberger
1697bb7d23 build: sync pnpm lockfile for acpx plugin sdk dep 2026-04-07 09:05:06 +01:00
Peter Steinberger
0e51f2f2ab fix(qa-lab): set themed background on app-shell so light mode covers dark body 2026-04-07 09:04:37 +01:00
Peter Steinberger
17085ec1a4 fix: make qa lab docker boot resilient 2026-04-07 09:04:18 +01:00
Peter Steinberger
25fae3d722 fix: unblock latest check lane 2026-04-07 09:02:26 +01:00
Peter Steinberger
fd6d3f270d fix: repair ci lockfile and boundary drift 2026-04-07 09:02:26 +01:00
Vincent Koc
01e443755c perf(secrets): isolate secretref docs matrix checks 2026-04-07 09:02:07 +01:00
Peter Steinberger
7b53b00009 perf(test): skip live config normalization by default 2026-04-07 08:59:23 +01:00
Peter Steinberger
0b159d7250 fix(test): restore support shard boundaries 2026-04-07 08:59:23 +01:00
Vincent Koc
9e9730a55e chore(plugin-sdk): refresh api baseline hash 2026-04-07 08:58:24 +01:00
Vincent Koc
294ee477ac fix(memory-wiki): stabilize compiled digest prompts 2026-04-07 08:56:41 +01:00
Vincent Koc
2988203a5e feat(context-engine): add memory prompt helper 2026-04-07 08:56:41 +01:00
Vincent Koc
6a559f0293 feat(memory-wiki): gate compiled digest prompts 2026-04-07 08:56:25 +01:00
Vincent Koc
0d3cd4ac42 feat(memory-wiki): use digests for retrieval 2026-04-07 08:56:25 +01:00
Vincent Koc
44fd8b0d6e feat(memory-wiki): add claim health reports 2026-04-07 08:56:24 +01:00
Vincent Koc
947a43dae3 feat(memory-wiki): add belief-layer digests and compat migration 2026-04-07 08:56:24 +01:00
Vincent Koc
d5ed6d26e9 chore(plugins): bulk add package boundary tsconfig rollout 2026-04-07 08:48:23 +01:00
Vincent Koc
a543c240c9 perf(secrets): drop bootstrap fallback from target registry 2026-04-07 08:47:01 +01:00
Peter Steinberger
86361f4fca fix: restore ci after rebase drift 2026-04-07 08:40:35 +01:00
Peter Steinberger
ce7ef626b8 refactor: dedupe gateway helper readers 2026-04-07 08:40:35 +01:00
Peter Steinberger
5eb6921a18 refactor: dedupe outbound helper readers 2026-04-07 08:40:35 +01:00
Peter Steinberger
02c08b3929 refactor: dedupe shared normalizer readers 2026-04-07 08:40:35 +01:00
Peter Steinberger
2197ce62bd refactor: dedupe lower-parser readers 2026-04-07 08:40:34 +01:00
Peter Steinberger
b3e6822ef8 refactor: dedupe helper trim readers 2026-04-07 08:40:34 +01:00
Peter Steinberger
a5ff85f01c refactor: dedupe lowercased readers 2026-04-07 08:40:34 +01:00
Peter Steinberger
763dc614c0 refactor: dedupe command helper readers 2026-04-07 08:40:34 +01:00
Peter Steinberger
dbc67a5626 refactor: dedupe helper alias readers 2026-04-07 08:40:34 +01:00
Peter Steinberger
424b65b697 refactor: dedupe bluebubbles and zalouser readers 2026-04-07 08:40:34 +01:00
Peter Steinberger
90a45a4907 refactor: dedupe provider channel readers 2026-04-07 08:40:34 +01:00
Peter Steinberger
fca8ff5748 refactor: dedupe chat channel readers 2026-04-07 08:40:34 +01:00
Peter Steinberger
ce19b6bf6a refactor: dedupe channel extension readers 2026-04-07 08:40:34 +01:00
Vincent Koc
c19f322ff9 perf(secrets): move plugin-owned coverage out of core matrix 2026-04-07 08:35:27 +01:00
Vincent Koc
49fbecbf16 perf(plugin-sdk): add web fetch contract artifacts 2026-04-07 08:35:27 +01:00
Peter Steinberger
2ceafbafcc test(gateway): cover minimal connect startup 2026-04-07 08:31:33 +01:00
Ayaan Zaidi
e811d04db4 fix: openai tts groq wav (#62233) (thanks @neeravmakwana) 2026-04-07 12:56:22 +05:30
Ayaan Zaidi
91a3af4e24 fix(tts): carry OpenAI talk response format 2026-04-07 12:56:22 +05:30
Neerav Makwana
eb4bc200d7 OpenAI TTS: use wav for Groq speech
Made-with: Cursor
2026-04-07 12:56:22 +05:30
Peter Steinberger
494c25b0c4 test(gateway): cover live helper env isolation 2026-04-07 08:25:41 +01:00
Peter Steinberger
8a6bb1b80e refactor(gateway): isolate minimal test startup 2026-04-07 08:23:49 +01:00
Ayaan Zaidi
880def088e refactor: distill mistral compat patch 2026-04-07 12:52:47 +05:30
Neerav Makwana
b9179ee4b6 Docs: match Greptile wording for magistral-* line
Made-with: Cursor
2026-04-07 12:52:47 +05:30
Neerav Makwana
68bfc6fcf5 Mistral: enable reasoning_effort for mistral-small-latest
Made-with: Cursor
2026-04-07 12:52:47 +05:30
Neerav Makwana
de2182877a fix: classify HTTP 404 errors for model fallback chain (#62244) (thanks @neeravmakwana)
* Fix: classify HTTP 404 errors for model fallback chain

* Address PR review: preserve context overflow on HTTP 404, fix changelog order

* fix: add changelog attribution for HTTP 404 fallback fix (#62244) (thanks @neeravmakwana)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-07 12:47:54 +05:30
Vincent Koc
5a3293d400 chore(anthropic-vertex): add package boundary tsconfig 2026-04-07 08:17:26 +01:00
Vincent Koc
28458fa4a8 chore(video-generation-core): add package boundary tsconfig 2026-04-07 08:16:50 +01:00
Vincent Koc
60cd350220 chore(image-generation-core): add package boundary tsconfig 2026-04-07 08:16:29 +01:00
Vincent Koc
e8ea1fe99d chore(diagnostics-otel): add package boundary tsconfig 2026-04-07 08:16:11 +01:00
Neerav Makwana
9a9dc1dbec fix: allowlist compat for capability provider fallback (#62234) (thanks @neeravmakwana)
* Plugins: allowlist compat for capability provider fallback (#62205)

* test: cover all capability fallback keys

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-07 12:45:56 +05:30
Vincent Koc
c5a181bf8b chore(copilot-proxy): add package boundary tsconfig 2026-04-07 08:15:45 +01:00
Peter Steinberger
adededf2f9 test: split config io coverage 2026-04-07 08:14:35 +01:00
Vincent Koc
b3afb2f950 chore(media-understanding-core): add package boundary tsconfig 2026-04-07 08:13:20 +01:00
Vincent Koc
38935d18c7 test(plugins): fix boundary contract parse error 2026-04-07 08:13:20 +01:00
Neerav Makwana
242b2e66f2 fix: normalize cron jobId load path (#62251) (thanks @neeravmakwana)
* Cron: normalize jobId to id when loading jobs.json

* Cron: address review — changelog order, warn on legacy jobId
2026-04-07 12:42:59 +05:30
Peter Steinberger
3243c9b5b0 fix(gateway): handle early connect challenge race 2026-04-07 08:11:28 +01:00
Vincent Koc
2ddeed40c8 perf(secrets): use manifest registry for channel artifacts 2026-04-07 08:10:39 +01:00
Vincent Koc
f13815d9bd chore(deepseek): add package boundary tsconfig 2026-04-07 08:10:01 +01:00
Vincent Koc
e1d026f575 chore(cloudflare-ai-gateway): add package boundary tsconfig 2026-04-07 08:10:00 +01:00
Vincent Koc
a305f2f6b0 chore(fireworks): add package boundary tsconfig 2026-04-07 08:10:00 +01:00
Vincent Koc
565a228591 chore(litellm): add package boundary tsconfig 2026-04-07 08:10:00 +01:00
Vincent Koc
647aade27a chore(qianfan): add package boundary tsconfig 2026-04-07 08:10:00 +01:00
Vincent Koc
1ac4e46cbb chore(nvidia): add package boundary tsconfig 2026-04-07 08:10:00 +01:00
Vincent Koc
6c69998291 chore(llm-task): add package boundary tsconfig 2026-04-07 08:10:00 +01:00
Vincent Koc
bbfc46fe02 test(telegram): use canonical web-media sdk path 2026-04-07 08:10:00 +01:00
Vincent Koc
b7824ec414 chore(groq): add package boundary tsconfig 2026-04-07 08:10:00 +01:00
Vincent Koc
1335ce37a8 chore(open-prose): add package boundary tsconfig 2026-04-07 08:10:00 +01:00
Vincent Koc
c4dcaf91cd chore(venice): add package boundary tsconfig 2026-04-07 08:10:00 +01:00
Vincent Koc
858b194095 chore(searxng): add package boundary tsconfig 2026-04-07 08:10:00 +01:00
Vincent Koc
5a89ffe0d8 chore(synthetic): add package boundary tsconfig 2026-04-07 08:09:59 +01:00
Vincent Koc
e69b4e4606 chore(duckduckgo): add package boundary tsconfig 2026-04-07 08:09:59 +01:00
Vincent Koc
bc6e5128d2 chore(brave): add package boundary tsconfig 2026-04-07 08:09:59 +01:00
Vincent Koc
d34d88e0a3 chore(firecrawl): add package boundary tsconfig 2026-04-07 08:09:59 +01:00
Vincent Koc
55eb9841d9 fix(plugins): use canonical sdk dts for boundaries 2026-04-07 08:09:59 +01:00
Vincent Koc
f285087c85 chore(tavily): add package boundary tsconfig 2026-04-07 08:09:59 +01:00
Vincent Koc
f7dc5f930a fix(plugin-sdk): add runtime boundary entrypoints 2026-04-07 08:09:59 +01:00
Vincent Koc
944199d77b chore(perplexity): add package boundary tsconfig 2026-04-07 08:09:59 +01:00
Vincent Koc
674b658ff0 chore(exa): add package boundary tsconfig 2026-04-07 08:09:59 +01:00
Vincent Koc
fb10773a38 fix(plugins): repair package boundary sdk paths 2026-04-07 08:09:59 +01:00
Peter Steinberger
58744f3d87 fix: repair ci contract and whatsapp test stubs 2026-04-07 08:09:47 +01:00
Peter Steinberger
087eb621ff build: fix plugin sdk boundary exports 2026-04-07 08:06:29 +01:00
Peter Steinberger
b28cc98c9b test: sync gateway and config expectations 2026-04-07 08:05:32 +01:00
Peter Steinberger
04681e9770 perf(unit): trim media and ollama facade tests 2026-04-07 08:05:06 +01:00
Vincent Koc
fbb56f0ed2 perf(secrets): skip unrelated web provider discovery 2026-04-07 08:04:49 +01:00
Peter Steinberger
6c7426ed54 fix: load facade helpers from bundled dist 2026-04-07 08:00:15 +01:00
Peter Steinberger
cf2fc4fdbb fix: quiet unconfigured ollama discovery 2026-04-07 07:59:45 +01:00
Peter Steinberger
38a673b688 refactor: use supported acpx runtime surface 2026-04-07 07:59:45 +01:00
Peter Steinberger
37dccb52ed test: add gemini acp bind docker coverage 2026-04-07 07:59:45 +01:00
Peter Steinberger
cdbef11809 Build: include facade runtime sidecars 2026-04-07 07:57:58 +01:00
Peter Steinberger
b176bf13af perf(media): bypass plugin loader in capability contract tests 2026-04-07 07:55:51 +01:00
Peter Steinberger
6239ab3667 Media: restore audio transcription default 2026-04-07 07:54:39 +01:00
Peter Steinberger
59318d9ff8 Tests: preserve isolated home across non-isolated files 2026-04-07 07:54:39 +01:00
Peter Steinberger
fab7b2a4de Media: align provider defaults for tests 2026-04-07 07:54:39 +01:00
Peter Steinberger
b081f88952 Gateway: allow Docker loopback Control UI pairing 2026-04-07 07:54:39 +01:00
Vincent Koc
1c3f82dcef perf(secrets): add web search contract artifacts 2026-04-07 07:53:59 +01:00
Peter Steinberger
13a60aa93b docs: document shared mention policy 2026-04-07 07:51:00 +01:00
Peter Steinberger
625fd5b3e3 refactor: centralize inbound mention policy 2026-04-07 07:51:00 +01:00
Peter Steinberger
c8b7058058 perf(agents): remove slow browser and auth test paths 2026-04-07 07:50:17 +01:00
Vincent Koc
db76f18712 perf(secrets): add brave web search contract artifact 2026-04-07 07:48:03 +01:00
Peter Steinberger
7b79579d20 Tests: fix agent runtime drift 2026-04-07 14:42:46 +08:00
Vincent Koc
e608b7e6f6 perf(secrets): avoid broad channel contract fallbacks 2026-04-07 07:40:57 +01:00
Vincent Koc
e318f48ff2 perf(secrets): narrow channel secret-ref imports 2026-04-07 07:38:34 +01:00
Peter Steinberger
371c4147f3 fix: restore ci after rebase drift 2026-04-07 07:36:11 +01:00
Peter Steinberger
768e606f96 refactor: dedupe agent runtime readers 2026-04-07 07:36:11 +01:00
Peter Steinberger
28d478dc52 refactor: dedupe session helper readers 2026-04-07 07:36:11 +01:00
Peter Steinberger
679a393f6d refactor: dedupe metadata readers 2026-04-07 07:36:11 +01:00
Peter Steinberger
0a6fd459f9 refactor: dedupe channel and cli readers 2026-04-07 07:36:11 +01:00
Peter Steinberger
dfec7d7f80 refactor: dedupe session helper readers 2026-04-07 07:36:11 +01:00
Peter Steinberger
972fe9286d refactor: dedupe plugin and media readers 2026-04-07 07:36:11 +01:00
Peter Steinberger
a5991e8017 refactor: dedupe approval and routing readers 2026-04-07 07:36:11 +01:00
Peter Steinberger
1b2f640c5a refactor: dedupe helper string normalization 2026-04-07 07:36:11 +01:00
Peter Steinberger
997a16fa50 refactor: dedupe core string reader helpers 2026-04-07 07:36:11 +01:00
Peter Steinberger
ad0c4309e6 refactor: dedupe shared trim readers 2026-04-07 07:36:11 +01:00
Peter Steinberger
c00cd4b414 refactor(gateway): lazy-load server boundary for live tests 2026-04-07 07:34:50 +01:00
Peter Steinberger
a3b2fdf7d6 feat(agents): add prompt override and heartbeat controls 2026-04-07 07:34:50 +01:00
Vincent Koc
0fab2b9b4e perf(secrets): narrow runtime coverage web batches 2026-04-07 07:28:26 +01:00
Vincent Koc
bcb14cdc40 perf(plugins): skip bundled config-contract fallback for known plugins 2026-04-07 07:24:17 +01:00
Peter Steinberger
43cc92dc07 perf(agents): isolate plugin tool resolution for tests 2026-04-07 07:20:55 +01:00
Gustavo Madeira Santana
7155aa9c15 fix(docker): use built bundled plugins in runtime images (#62316)
Merged via squash.

Prepared head SHA: c2bbfef188
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-07 02:18:24 -04:00
Peter Steinberger
9a66b9cd54 Tests: fix package boundary and runtime drift 2026-04-07 14:16:25 +08:00
Peter Steinberger
68e421c487 test: isolate config io compatibility seams 2026-04-07 07:15:56 +01:00
Peter Steinberger
b8451e26a3 test: slim backup command coverage 2026-04-07 07:15:56 +01:00
Peter Steinberger
13df67ebc8 test: reuse shared temp dir roots 2026-04-07 07:15:56 +01:00
Vincent Koc
d01ec5cee9 perf(secrets): isolate runtime core snapshot tests 2026-04-07 07:14:39 +01:00
Peter Steinberger
e8817dde8e perf(agents): remove spawn hook announce import tax 2026-04-07 07:13:56 +01:00
Peter Steinberger
e16a64ba1a test(agents): stub session announce target resolution 2026-04-07 07:01:34 +01:00
Peter Steinberger
7b36fa7672 perf(agents): extract subagent spawn planning seams 2026-04-07 07:01:34 +01:00
Peter Steinberger
f5c0356b37 refactor: dedupe plugin helper readers 2026-04-07 06:55:45 +01:00
Peter Steinberger
db0b91417e refactor: dedupe tts readers 2026-04-07 06:55:45 +01:00
Peter Steinberger
c25ed721f8 refactor: dedupe media generation readers 2026-04-07 06:55:45 +01:00
Peter Steinberger
9fcef82f2d refactor: dedupe bluebubbles readers 2026-04-07 06:55:45 +01:00
Peter Steinberger
41b1d3647c refactor: dedupe channel model readers 2026-04-07 06:55:45 +01:00
Peter Steinberger
820201a343 fix(ci): restore plugin sdk doctor boundaries 2026-04-07 06:49:15 +01:00
Vincent Koc
0d5f386f5c perf(secrets): split runtime coverage test lanes 2026-04-07 06:48:55 +01:00
Lellansin Huang
aad3bbebdd fix: abort HTTP gateway turns on client disconnect (#54388) (thanks @Lellansin)
* fix: abort in-flight HTTP requests on client disconnect

Abort running agent commands when the HTTP client disconnects for both
/v1/chat/completions and /v1/responses endpoints.

- Listen on res "close" instead of req "close" (the request body is
  already consumed so IncomingMessage auto-destroys before we get here).
- Non-streaming: guard with !signal.aborted so the abort fires on
  genuine disconnects; a spurious abort after sendJson is harmless.
- Streaming: guard with !closed so normal res.end() completions do not
  abort post-turn work still in flight.
- Skip error logging and response writes when the signal is already
  aborted.

Made-with: Cursor

* fix: correct event listener name and improve error handling in HTTP requests

Updated the event listener for client disconnects to use the correct name and enhanced error handling logic. The changes ensure that abort signals are properly checked before logging errors and returning responses, preventing unnecessary operations on aborted requests.

Made-with: Cursor

* fix: use correct 'close' event name for non-streaming disconnect handler

* fix: watch socket close for HTTP aborts

---------

Co-authored-by: 冰森 <dingheng.huang@urbanic.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-07 11:16:54 +05:30
Chunyue Wang
e8fb140642 fix: preserve Slack guarded media transport (#62239) (thanks @openperf)
* fix(slack ): prevent undici dispatcher leak to globalThis.fetch causing media download failure

* fix(slack): preserve guarded media transport

* fix: preserve Slack guarded media transport (#62239) (thanks @openperf)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-07 11:15:53 +05:30
Vincent Koc
50f5831382 perf(plugin-sdk): lazy-load facade loader runtimes 2026-04-07 06:45:41 +01:00
Ayaan Zaidi
39ca8d1c53 fix: omit default subagent bootstrap run kind 2026-04-07 11:14:14 +05:30
Peter Steinberger
576fb46e28 fix: clean rebase conflict import 2026-04-07 06:42:34 +01:00
Peter Steinberger
8822f779d9 fix: restore ci after trim reader dedupe 2026-04-07 06:42:34 +01:00
Peter Steinberger
775fa78b1e refactor: dedupe device pair readers 2026-04-07 06:42:34 +01:00
Peter Steinberger
1dea64ab99 refactor: dedupe provider reader helpers 2026-04-07 06:42:34 +01:00
Peter Steinberger
829fe14188 refactor: dedupe cli daemon readers 2026-04-07 06:42:34 +01:00
Peter Steinberger
cd313c7f67 refactor: dedupe shared helper readers 2026-04-07 06:42:34 +01:00
Peter Steinberger
4504efb7ec refactor: dedupe channel helper readers 2026-04-07 06:42:34 +01:00
Peter Steinberger
870cc22cb0 refactor: dedupe media readers 2026-04-07 06:42:34 +01:00
Peter Steinberger
575c486ef4 refactor: dedupe group and acp readers 2026-04-07 06:42:33 +01:00
Peter Steinberger
b514d61000 refactor: dedupe reply execution readers 2026-04-07 06:42:33 +01:00
Peter Steinberger
e42f11ed62 refactor: dedupe acp reader helpers 2026-04-07 06:42:33 +01:00
Peter Steinberger
ea7297b344 refactor: dedupe reply control readers 2026-04-07 06:42:33 +01:00
Peter Steinberger
059197e496 refactor: dedupe reply runtime readers 2026-04-07 06:42:33 +01:00
Vincent Koc
8e8c7344bd perf(plugin-sdk): lazy-load facade activation checks 2026-04-07 06:41:24 +01:00
Peter Steinberger
34c1e53792 fix(ci): align facade runtime loading 2026-04-07 06:37:14 +01:00
Vincent Koc
c12cbaca66 style(plugin-sdk): normalize facade runtime formatting 2026-04-07 06:35:52 +01:00
Vincent Koc
02261e931c perf(plugin-sdk): avoid bundled metadata scans in facade runtime 2026-04-07 06:35:51 +01:00
Sam Padilla
f1b7dd6c0a fix: honor lightContext in spawned subagents (#62264) (thanks @theSamPadilla)
* Add lightContext support for spawned subagents

* Clarify and guard lightContext usage in sessions_spawn

* test: guard sessions_spawn lightContext acp misuse

* fix: honor lightContext in spawned subagents (#62264) (thanks @theSamPadilla)

---------

Co-authored-by: Jaz <jaz@bycrux.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-07 11:05:45 +05:30
Peter Steinberger
7240830ca4 perf(pdf): extract input validation seam 2026-04-07 06:33:33 +01:00
Peter Steinberger
e2f0ea4625 fix(test): isolate shared vitest home setup 2026-04-07 06:32:36 +01:00
Peter Steinberger
2aabe0e8fd Tests: trim audit imports and fix reply typing 2026-04-07 13:23:59 +08:00
Peter Steinberger
80826bc000 fix(extensions): bypass stale doctor runtime exports 2026-04-07 06:23:46 +01:00
Peter Steinberger
d0562a873f perf(agents): extract cli runner image and approval seams 2026-04-07 06:23:46 +01:00
Peter Steinberger
42ae213ba6 test(pdf): split native provider and model catalog coverage 2026-04-07 06:23:46 +01:00
Peter Steinberger
88a63a1816 fix(ci): restore plugin boundary invariants 2026-04-07 06:23:39 +01:00
Vincent Koc
1aca95ae15 perf(plugin-sdk): split light facade loader 2026-04-07 06:22:35 +01:00
Peter Steinberger
86679ba84e test: extract backup path plan coverage 2026-04-07 06:20:53 +01:00
Peter Steinberger
0cb162f05c test: reuse shared temp fixture roots 2026-04-07 06:20:53 +01:00
Peter Steinberger
c15919846c fix(ci): repair auto-reply type drift 2026-04-07 06:11:04 +01:00
Peter Steinberger
df58f73a2d Config: split static channel configured helper 2026-04-07 13:07:40 +08:00
Peter Steinberger
2091334399 refactor: dedupe reply helper readers 2026-04-07 06:07:14 +01:00
Peter Steinberger
687bb21b28 refactor: dedupe reply routing readers 2026-04-07 06:07:14 +01:00
Peter Steinberger
bd99671756 refactor: dedupe acp delivery readers 2026-04-07 06:07:14 +01:00
Peter Steinberger
9c04bdf6de refactor: dedupe session control readers 2026-04-07 06:07:14 +01:00
Peter Steinberger
d9f1c61361 refactor: dedupe reply session readers 2026-04-07 06:07:14 +01:00
Peter Steinberger
808c34b374 refactor: dedupe browser route readers 2026-04-07 06:07:14 +01:00
Peter Steinberger
8c8c5fa635 refactor: dedupe browser cli readers 2026-04-07 06:07:13 +01:00
Peter Steinberger
8d05bdda43 refactor: dedupe setup token readers 2026-04-07 06:07:13 +01:00
Peter Steinberger
9869941c06 refactor: dedupe auth session readers 2026-04-07 06:07:13 +01:00
Peter Steinberger
21802f750f refactor: dedupe conversation string readers 2026-04-07 06:07:13 +01:00
Peter Steinberger
1275b9b873 refactor: dedupe account name normalization 2026-04-07 06:07:13 +01:00
Peter Steinberger
7e1f04f36a refactor: dedupe binding string readers 2026-04-07 06:07:13 +01:00
Peter Steinberger
326b36794f refactor: dedupe optional string readers 2026-04-07 06:07:13 +01:00
Peter Steinberger
7a2abb1c50 fix: stabilize qa lab docker builds 2026-04-07 06:06:29 +01:00
Peter Steinberger
ce1d2c1004 test: cover claude and codex acp bind docker smoke 2026-04-07 06:06:29 +01:00
Peter Steinberger
c2cd1aed5d Tests: combine media provider capability contracts 2026-04-07 13:01:42 +08:00
Peter Steinberger
d0e53a3529 test: trim memory wiki fixture setup 2026-04-07 05:59:30 +01:00
Peter Steinberger
ac9464441c test: reuse plugin sdk temp fixtures 2026-04-07 05:59:30 +01:00
Peter Steinberger
8cde0167c5 test: slim memory wiki source sync wrapper test 2026-04-07 05:59:30 +01:00
Peter Steinberger
60ec27bce0 Security: split permission target collection from apply 2026-04-07 12:59:00 +08:00
Peter Steinberger
998cc02af4 perf(pdf): remove media/runtime lookup overhead 2026-04-07 05:58:16 +01:00
Peter Steinberger
a1e0090fe4 perf(agents): trim fast tool test seams 2026-04-07 05:58:16 +01:00
Peter Steinberger
dc39e84fdd fix(ci): repair type drift after main updates 2026-04-07 05:57:19 +01:00
Peter Steinberger
7cf72f7bc8 Tests: skip bedrock auth probe in embeddings spec 2026-04-07 12:55:09 +08:00
Peter Steinberger
c569e5faba Sessions: split chat type derivation seam 2026-04-07 12:50:59 +08:00
Peter Steinberger
fdacaf0853 test: sync messaging runtime and talk expectations 2026-04-07 05:46:13 +01:00
Peter Steinberger
f60c1bb9ad test: stabilize agent auth and approval suites 2026-04-07 05:46:13 +01:00
Peter Steinberger
67c4733267 build: align plugin sdk package boundaries 2026-04-07 05:46:13 +01:00
Peter Steinberger
5b1b7f0f80 Security: split config-only fixer tests from permission path 2026-04-07 12:39:30 +08:00
Peter Steinberger
27d4992eef Tests: mock context-engine compact runtime seam 2026-04-07 12:29:33 +08:00
Peter Steinberger
c9c656f2cb Tests: trim Feishu and Synology audit import cost 2026-04-07 12:24:31 +08:00
Peter Steinberger
3107faf571 Plugin SDK: split model id normalizers from heavy shared surface 2026-04-07 12:19:57 +08:00
Peter Steinberger
123cc880f3 Agents: keep static model normalization without runtime hooks 2026-04-07 12:15:00 +08:00
Peter Steinberger
4ff82e9c4a Tests: trim slack audit import cost 2026-04-07 12:11:34 +08:00
Peter Steinberger
e0a0d1f0b3 test: align feishu secret ref assertion 2026-04-07 05:11:13 +01:00
Peter Steinberger
6f900b55fa fix: clean rebase conflict import 2026-04-07 05:08:19 +01:00
Peter Steinberger
f2602a5d7b fix: restore ci after dedupe refactors 2026-04-07 05:07:26 +01:00
Peter Steinberger
4dbe8f9f66 refactor: dedupe browser string readers 2026-04-07 05:06:55 +01:00
Peter Steinberger
05e89ff117 refactor: dedupe agent string readers 2026-04-07 05:06:54 +01:00
Peter Steinberger
8b501986aa refactor: dedupe provider string readers 2026-04-07 05:06:54 +01:00
Peter Steinberger
b059328f60 refactor: dedupe telemetry string readers 2026-04-07 05:06:54 +01:00
Peter Steinberger
8c7dd66a7b refactor: dedupe string readers 2026-04-07 05:06:54 +01:00
Peter Steinberger
2f115bc645 refactor: dedupe reader helpers 2026-04-07 05:06:54 +01:00
Peter Steinberger
d9fbfa268f refactor: dedupe extension string helpers 2026-04-07 05:06:54 +01:00
Peter Steinberger
d03985415d refactor: dedupe trimmed string readers 2026-04-07 05:06:54 +01:00
Peter Steinberger
b7be963501 refactor: dedupe record guards 2026-04-07 05:06:54 +01:00
Peter Steinberger
59eb291c6e refactor: dedupe string list helpers 2026-04-07 05:06:54 +01:00
Peter Steinberger
80a37ef32a refactor: dedupe plugin string list helpers 2026-04-07 05:06:54 +01:00
Peter Steinberger
7dc085890e refactor: dedupe script error formatting 2026-04-07 05:06:54 +01:00
Peter Steinberger
bbe9b7ba15 refactor: dedupe core error formatting call sites 2026-04-07 05:06:54 +01:00
Peter Steinberger
a03e430248 refactor: dedupe core error helpers 2026-04-07 05:06:54 +01:00
Peter Steinberger
e169fcd263 refactor: dedupe qa and diff error formatting 2026-04-07 05:06:54 +01:00
Peter Steinberger
54cd8ed25b refactor: dedupe extension error formatting 2026-04-07 05:06:54 +01:00
Peter Steinberger
69f4022950 refactor: dedupe browser and memory host error helpers 2026-04-07 05:06:53 +01:00
Peter Steinberger
dde1aa8fed refactor: dedupe matrix error helpers 2026-04-07 05:06:53 +01:00
Peter Steinberger
86f15687b5 Agents: extract narrow model normalization seam 2026-04-07 12:05:27 +08:00
Ayaan Zaidi
47e6c57a7a fix: preserve telegram default auth promotion 2026-04-07 09:28:05 +05:30
Peter Steinberger
b59560c49a Security: inject channel config-fix plugins in tests 2026-04-07 11:50:39 +08:00
Peter Steinberger
8c1b954c1b Tests: trim discord audit import cost 2026-04-07 11:44:40 +08:00
Ayaan Zaidi
44f3539c4f fix: preserve telegram doctor allowlist fallback (#62263)
* test: cover telegram doctor multi-account fallback

* fix: skip telegram default-account doctor seeding

* fix: preserve telegram doctor allowlist fallback (#62263)

* fix: keep doctor promotion keys plugin-owned (#62263)
2026-04-07 09:11:11 +05:30
Peter Steinberger
ac783d75f0 Tests: move final cron best-effort case to seam 2026-04-07 11:35:20 +08:00
Peter Steinberger
35fd766131 Tests: drop duplicate cron signal case 2026-04-07 11:31:45 +08:00
Peter Steinberger
f289ba6a05 Tests: drop duplicate cron retry case 2026-04-07 11:23:30 +08:00
Gustavo Madeira Santana
9fd47a5aed Matrix: prompt invite auto-join during onboarding (#62168)
Merged via squash.

Prepared head SHA: aec7a2249a
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-06 23:22:01 -04:00
Peter Steinberger
8d2ccd851c Tests: drop duplicate cron retry success case 2026-04-07 11:15:57 +08:00
Peter Steinberger
d34b3ec701 perf(agents): trim pi model discovery auth tests 2026-04-07 04:13:41 +01:00
Peter Steinberger
53f6d962c2 perf(agents): extract fast models-config env seam 2026-04-07 04:13:41 +01:00
Peter Steinberger
fc4203d9d9 Tests: drop duplicate cron telegram success case 2026-04-07 11:11:18 +08:00
Peter Steinberger
78ff2519e0 Tests: drop duplicate cron text failure cases 2026-04-07 11:07:07 +08:00
Peter Steinberger
44cf74717b Tests: move cron structured failure to seam 2026-04-07 11:02:20 +08:00
Peter Steinberger
98e27b8a09 Tests: drop duplicate cron silent cleanup case 2026-04-07 10:59:55 +08:00
Peter Steinberger
ca72c2677b test: reuse dreaming workspace setup 2026-04-07 03:56:29 +01:00
Peter Steinberger
ba1ffaca57 test: trim memory cli polling setup 2026-04-07 03:56:29 +01:00
Peter Steinberger
8e62c12ff3 test(agents): extract fast subagent capture seam 2026-04-07 03:49:40 +01:00
Peter Steinberger
4436ca23ca perf(agents): lazy cli backend setup lookup 2026-04-07 03:49:40 +01:00
Peter Steinberger
416a3148e9 refactor: split cli backend live helpers 2026-04-07 03:46:24 +01:00
Peter Steinberger
1092691d14 test: reuse dreaming workspace setup 2026-04-07 03:43:44 +01:00
Peter Steinberger
9cd225ebbe test: trim memory cli workspace setup 2026-04-07 03:43:44 +01:00
Peter Steinberger
ddd0fcdc83 fix(ci): refresh extension mocks and protocol models 2026-04-07 03:43:21 +01:00
Peter Steinberger
4094bf9985 build(deps): update vulnerable packages 2026-04-07 03:40:25 +01:00
Peter Steinberger
96d575de1d test: fix macOS Parallels smoke probe 2026-04-07 03:39:44 +01:00
Peter Steinberger
6f7d0a016c test: verify claude cli mcp cron e2e 2026-04-07 03:37:15 +01:00
Vignesh Natarajan
338c7b8d66 changelog: note dreaming session corpus (#62227) (thanks @vignesh07) 2026-04-06 19:14:42 -07:00
Vignesh Natarajan
8cea63c61b memory-core: add timestamp bucketing and cursored session ingest 2026-04-06 19:14:42 -07:00
Vignesh Natarajan
5291a2cfd1 memory-core: harden dreaming session ingestion privacy and idempotence 2026-04-06 19:14:42 -07:00
Vignesh Natarajan
6ab359f5a9 memory-core: decouple dreaming session ingest from memorySearch flags 2026-04-06 19:14:42 -07:00
Vignesh Natarajan
695176542f memory-core: checkpoint session transcript dreaming ingestion 2026-04-06 19:14:42 -07:00
Val Alexander
f0ba7b95da ui: fix light scrollbar selector 2026-04-06 21:10:00 -05:00
chziyue
76592217ff fix(ui): revert to descendant selector - tested working
- First commit (f3bb4ae) with space selector tested working
- Second commit broke the fix after bot suggestion
- Reverting to original approach
2026-04-06 21:10:00 -05:00
chziyue
c8ff474c28 fix(ui): use direct selector for root scrollbar
- Remove descendant combinator (space) between :root and ::-webkit-scrollbar-thumb
- Previous selector matched only child element scrollbars, not root element scrollbar
- Now correctly applies to document.documentElement scrollbar in light mode
- Drop redundant border-radius (inherits from global rule)
2026-04-06 21:10:00 -05:00
chziyue
ed156ee2de fix(ui): scrollbar visible in light mode
- Add light mode scrollbar thumb override with dark color
- Previously scrollbar was white (rgba(255,255,255,0.08)), invisible on light bg
- Now uses rgba(0,0,0,0.15) for light mode, visible on light backgrounds
2026-04-06 21:10:00 -05:00
Peter Steinberger
ccd3fec23e Tests: drop duplicate cron NO_REPLY case 2026-04-07 09:54:20 +08:00
Peter Steinberger
add2b8e9f0 Tests: move cron heartbeat skip to seam 2026-04-07 09:50:14 +08:00
Peter Steinberger
7a289940cd Tests: drop duplicate cron structured failure case 2026-04-07 09:46:12 +08:00
Peter Steinberger
2499accca0 Tests: move cron message-tool skip to seam 2026-04-07 09:41:51 +08:00
Peter Steinberger
3da203556c Tests: move cron threaded delivery to dispatch seam 2026-04-07 09:32:37 +08:00
Peter Steinberger
1b243ad562 Tests: move cron session-scoping delivery to dispatch seam 2026-04-07 09:26:56 +08:00
Peter Steinberger
d8dbacb900 Tests: move cron direct-text delivery to dispatch seam 2026-04-07 09:21:33 +08:00
Peter Steinberger
64c18bc77b Tests: fix slack compat migration and test typing drift 2026-04-07 09:13:24 +08:00
Peter Steinberger
3342096336 test: fix conversation binding runtime mock 2026-04-07 02:04:51 +01:00
Peter Steinberger
d27370702b refactor: dedupe core error formatting 2026-04-07 02:03:35 +01:00
Peter Steinberger
d4360f8068 refactor: dedupe runtime error formatting 2026-04-07 02:03:34 +01:00
Peter Steinberger
9b7c0bf8e9 refactor: dedupe auto-reply error formatting 2026-04-07 02:03:34 +01:00
Peter Steinberger
3d23103081 refactor: dedupe hook gateway error formatting 2026-04-07 02:03:34 +01:00
Peter Steinberger
474db91bed refactor: dedupe extension error formatting 2026-04-07 02:03:34 +01:00
Peter Steinberger
09b31f9123 refactor: dedupe plugin task error formatting 2026-04-07 02:03:34 +01:00
Peter Steinberger
7f6277b6e5 refactor: dedupe infra cli wizard error formatting 2026-04-07 02:03:34 +01:00
Peter Steinberger
11eed107f4 refactor: dedupe command channel error formatting 2026-04-07 02:03:34 +01:00
Peter Steinberger
9e2a1e12fd refactor: dedupe channel runtime error formatting 2026-04-07 02:03:34 +01:00
Peter Steinberger
77a161c811 refactor: dedupe provider bootstrap error formatting 2026-04-07 02:03:34 +01:00
Peter Steinberger
8a40cd7ed4 refactor: dedupe core helper error formatting 2026-04-07 02:03:34 +01:00
Peter Steinberger
325ff24bae refactor: dedupe probe error formatting 2026-04-07 02:03:34 +01:00
Peter Steinberger
533bd00001 refactor: dedupe gateway handler error formatting 2026-04-07 02:03:34 +01:00
Peter Steinberger
999d88d13d refactor: dedupe twitch error formatting 2026-04-07 02:03:34 +01:00
Peter Steinberger
782247b423 refactor: dedupe voice-call error formatting 2026-04-07 02:03:34 +01:00
Peter Steinberger
fef4e4621a refactor: dedupe pi compaction error formatting 2026-04-07 02:03:34 +01:00
Peter Steinberger
a4253deb67 refactor: dedupe agent error formatting 2026-04-07 02:03:34 +01:00
Peter Steinberger
3417dbabf4 refactor: dedupe memory-core error formatting 2026-04-07 02:03:34 +01:00
Peter Steinberger
ab6aa28049 refactor: dedupe qqbot error formatting 2026-04-07 02:03:33 +01:00
Peter Steinberger
61f7d53731 refactor: dedupe shared string readers 2026-04-07 02:03:33 +01:00
Peter Steinberger
899f490c9c refactor: dedupe shared string predicates 2026-04-07 02:03:33 +01:00
Peter Steinberger
f178a9dc41 refactor: dedupe extension string record helpers 2026-04-07 02:03:33 +01:00
Peter Steinberger
a88f240311 refactor: dedupe shared record coercers 2026-04-07 02:03:33 +01:00
Peter Steinberger
560a7aecd0 refactor: dedupe plugin string helpers 2026-04-07 02:03:33 +01:00
Peter Steinberger
59ccea334d refactor: dedupe exported record guards 2026-04-07 02:03:33 +01:00
Peter Steinberger
a685a7afc9 refactor: dedupe package record guards 2026-04-07 02:03:33 +01:00
Peter Steinberger
f96c753ed3 fix(config): preserve legacy doctor warning migrations 2026-04-07 02:03:22 +01:00
Peter Steinberger
6cb11360fa Tests: move cron multi-payload delivery to seam 2026-04-07 08:55:42 +08:00
Peter Steinberger
d6b2be95b6 fix(tooling): relax cli startup metadata render timeout 2026-04-07 01:44:10 +01:00
Peter Steinberger
1111639a11 Tests: skip auth profiles in cron direct-delivery spec 2026-04-07 08:41:37 +08:00
Peter Steinberger
8daf60e2d9 fix(infra): suppress heartbeat delivery context on subagent fallback 2026-04-07 01:39:20 +01:00
Peter Steinberger
eab50fe488 Tests: skip provider runtime in auth profile specs 2026-04-07 08:36:41 +08:00
Peter Steinberger
061a9b5c58 Auth: skip empty profile store loads 2026-04-07 08:32:26 +08:00
Bruce MacDonald
ac3f55504c feat(ollama): detect vision capability from /api/show and set image i… (#62193)
Merged via squash.

Prepared head SHA: 85f85d1036
Co-authored-by: BruceMacD <5853428+BruceMacD@users.noreply.github.com>
Co-authored-by: BruceMacD <5853428+BruceMacD@users.noreply.github.com>
Reviewed-by: @BruceMacD
2026-04-06 17:29:40 -07:00
scoootscooob
f4fcaa09a3 feat(gateway): add compaction checkpoints (#62146)
Merged via squash.

Prepared head SHA: e37542554a
Co-authored-by: scoootscooob <167050519+scoootscooob@users.noreply.github.com>
Co-authored-by: scoootscooob <167050519+scoootscooob@users.noreply.github.com>
Reviewed-by: @scoootscooob
2026-04-06 17:27:43 -07:00
Peter Steinberger
b44c10e91c Tests: trim cron model startup cost 2026-04-07 08:18:44 +08:00
Peter Steinberger
017c25b075 test(runtime): fix stale harness and registry mocks 2026-04-07 01:16:15 +01:00
Praktika Engineer
b8c8139138 feat(slack): add thread.requireExplicitMention config option (#58276)
* feat(slack): add thread.requireExplicitMention config option

When requireMention is true in a Slack channel, replying inside a thread
where the bot previously participated currently bypasses mention gating
via implicit mention detection. This makes the bot respond to every
thread message even without an explicit @mention.

Add channels.slack.thread.requireExplicitMention (default: false) which,
when set to true, suppresses implicit thread mentions. Only explicit
@bot mentions will trigger replies inside threads.

Closes #34389
Closes #49972

* slack: refresh changelog and generated config artifacts

* slack: restore bundled channel metadata generation

---------

Co-authored-by: praktika-devops <devops@praktika.ai>
Co-authored-by: George Pickett <gpickett00@gmail.com>
2026-04-06 17:05:11 -07:00
Peter Steinberger
98b76d83ea perf(test): trim bundled registry and facade tests 2026-04-07 01:03:03 +01:00
Peter Steinberger
f832388e0e chore(lint): remove stale unused imports 2026-04-07 01:02:35 +01:00
Peter Steinberger
8c38c662c1 perf(test): trim bundled facade hot paths 2026-04-07 00:59:49 +01:00
Peter Steinberger
fbebf6147c Tests: fix boundary drift and shell preflight regressions 2026-04-07 07:44:21 +08:00
Peter Steinberger
191f867ef6 perf(test): split ui and bundled full-suite shards 2026-04-07 00:39:05 +01:00
Peter Steinberger
1ce9ab36df fix(test): restore doctor and acpx type guards 2026-04-07 00:33:47 +01:00
Peter Steinberger
1f6e303e41 test(ui): align reconnect approval expectations 2026-04-07 00:33:47 +01:00
Peter Steinberger
063ed12bc6 test(ui): isolate browser harness state 2026-04-07 00:33:47 +01:00
Peter Steinberger
fcd9a04e47 fix(test): align runtime config expectations 2026-04-07 00:33:46 +01:00
Peter Steinberger
d6b1cce55c fix: repair doctor shared record guard imports 2026-04-07 00:26:30 +01:00
Peter Steinberger
0003a3cf3e fix: restore missing config guard imports 2026-04-07 00:22:27 +01:00
Peter Steinberger
4a7edbf471 refactor: dedupe plugin record guards 2026-04-07 00:21:12 +01:00
Peter Steinberger
d5801c03ed refactor: dedupe extension record guards 2026-04-07 00:21:12 +01:00
Peter Steinberger
1566a5b3bc refactor: dedupe broad record guard 2026-04-07 00:21:12 +01:00
Peter Steinberger
d014472ab8 refactor: dedupe discord record guard 2026-04-07 00:21:12 +01:00
Peter Steinberger
a1281d45b2 refactor: dedupe doctor shared record guard 2026-04-07 00:21:12 +01:00
Peter Steinberger
539a8b1619 refactor: dedupe matrix store record helper 2026-04-07 00:21:12 +01:00
Peter Steinberger
10bc10b853 refactor: dedupe core optional string helper 2026-04-07 00:21:12 +01:00
Peter Steinberger
f16e9364d2 refactor: dedupe browser string helper 2026-04-07 00:21:12 +01:00
Peter Steinberger
978513aa6b refactor: dedupe subagent session key helper 2026-04-07 00:21:12 +01:00
Peter Steinberger
e5be7c2cd4 refactor: dedupe gateway push string helper 2026-04-07 00:21:12 +01:00
Peter Steinberger
f11005de45 refactor: dedupe trim string helper 2026-04-07 00:21:11 +01:00
Peter Steinberger
13d1fc077b refactor: dedupe qqbot config record helper 2026-04-07 00:21:11 +01:00
Peter Steinberger
ad8341676e refactor: dedupe feishu string helper 2026-04-07 00:21:11 +01:00
Peter Steinberger
bd2ac38c1d refactor: dedupe optional string helper 2026-04-07 00:21:11 +01:00
Peter Steinberger
01dc9792fc refactor: dedupe nullable string helper 2026-04-07 00:21:11 +01:00
Peter Steinberger
3a1ca98e53 perf: extract memory multimodal indexing policy 2026-04-07 00:17:08 +01:00
Peter Steinberger
d2a03eca1a perf: extract memory session sync state helpers 2026-04-07 00:17:08 +01:00
Peter Steinberger
a690eafdf7 test: stabilize outbound contract helpers 2026-04-06 23:53:32 +01:00
Peter Steinberger
6e482fc7cf refactor: dedupe gaxios record helper 2026-04-06 23:52:32 +01:00
Peter Steinberger
d14497301f refactor: dedupe bundled channel trim helper 2026-04-06 23:52:32 +01:00
Peter Steinberger
9d37f1e5df refactor: dedupe secrets record guard 2026-04-06 23:52:31 +01:00
Peter Steinberger
e87300e2f4 refactor: dedupe config io record helper 2026-04-06 23:52:31 +01:00
Peter Steinberger
7388600b06 refactor: dedupe talk config record helper 2026-04-06 23:52:31 +01:00
Peter Steinberger
a6e1fe0296 refactor: dedupe memory host record helper 2026-04-06 23:52:31 +01:00
Peter Steinberger
917373b69c refactor: dedupe doctor state integrity record helper 2026-04-06 23:52:31 +01:00
Peter Steinberger
fe9c4fcf51 refactor: dedupe bundled plugin scan helpers 2026-04-06 23:52:31 +01:00
Peter Steinberger
e336311126 refactor: dedupe non-empty string helper 2026-04-06 23:52:31 +01:00
Peter Steinberger
d94938ff54 refactor: dedupe config presence string helper 2026-04-06 23:52:31 +01:00
Peter Steinberger
3a42641208 refactor: dedupe provider auth error formatter 2026-04-06 23:52:31 +01:00
Peter Steinberger
6164e83b44 test: simplify media runtime coverage 2026-04-06 23:50:27 +01:00
Peter Steinberger
425592cf9c refactor: share media normalization across runtimes 2026-04-06 23:50:27 +01:00
Peter Steinberger
1e7f39abdb Config: update raw plugin default expectation 2026-04-07 06:49:01 +08:00
Peter Steinberger
7071f6e442 fix(ci): drop unused slack test import 2026-04-06 23:46:53 +01:00
Peter Steinberger
9697925d4a test: reuse memory-wiki temp roots 2026-04-06 23:45:18 +01:00
Peter Steinberger
955f38086b test: trim memory-core test fixture churn 2026-04-06 23:45:18 +01:00
Peter Steinberger
8f592657ed fix(ci): refresh memory-wiki test typings 2026-04-06 23:43:08 +01:00
Peter Steinberger
cba1ac3c05 Kimi: remove core src utility import 2026-04-07 06:42:15 +08:00
Vincent Koc
453f874d64 perf(secrets): lazy-load web provider fallbacks 2026-04-06 23:39:10 +01:00
Vincent Koc
a27a632e9d fix(ci): skip acpx runtime in watch regression 2026-04-06 23:37:04 +01:00
Vincent Koc
0db491294b fix(ci): trim gateway watch startup overhead 2026-04-06 23:37:04 +01:00
Peter Steinberger
d08abd8ce4 refactor: dedupe security audit record helper 2026-04-06 23:36:25 +01:00
Peter Steinberger
07020c5627 refactor: dedupe ssrf policy record helper 2026-04-06 23:36:25 +01:00
Peter Steinberger
38715ef1b5 refactor: dedupe embeddings error formatter 2026-04-06 23:36:25 +01:00
Peter Steinberger
7928da0f48 refactor: dedupe web fetch runtime config reader 2026-04-06 23:36:24 +01:00
Peter Steinberger
e2c41df0b9 refactor: dedupe web fetch config reader 2026-04-06 23:36:24 +01:00
Peter Steinberger
49aef60447 refactor: dedupe web fetch record helper 2026-04-06 23:36:24 +01:00
Peter Steinberger
0fdb176465 refactor: dedupe oauth tls record helper 2026-04-06 23:36:24 +01:00
Peter Steinberger
4aa31ee6e1 refactor: dedupe nullable record helper 2026-04-06 23:36:24 +01:00
Peter Steinberger
e0018999b3 refactor: dedupe tool mutation record helper 2026-04-06 23:36:23 +01:00
Peter Steinberger
bd2798ec5f refactor: dedupe pi model discovery record helper 2026-04-06 23:36:23 +01:00
Peter Steinberger
5c9ec970b8 refactor: dedupe kimi provider record helper 2026-04-06 23:36:23 +01:00
Peter Steinberger
1990d2e761 test(infra): update loaded outbound target mock 2026-04-06 23:35:07 +01:00
Peter Steinberger
ab0c102ed7 fix(tests): narrow bundled plugin test seams 2026-04-06 23:35:07 +01:00
Peter Steinberger
096e6462c7 docs(changelog): reorder unreleased notes 2026-04-06 23:33:26 +01:00
Peter Steinberger
79f02b6e54 fix(ci): drain telegram thread-binding persists before reset 2026-04-06 23:32:46 +01:00
Peter Steinberger
ecc13c65f5 test: stabilize ui navigation and heartbeat guards 2026-04-06 23:31:34 +01:00
Peter Steinberger
9005521d63 test: sync cli and doctor config expectations 2026-04-06 23:31:34 +01:00
Peter Steinberger
1722bfab93 fix: preserve forced plugin activation context 2026-04-06 23:31:34 +01:00
Vincent Koc
4603f231c3 perf(secrets): add web search contract sdk seam 2026-04-06 23:30:56 +01:00
Vincent Koc
2a6e8dca47 fix(plugin-sdk): add web-search contract subpath 2026-04-06 23:30:56 +01:00
Peter Steinberger
3eecbc3c7d Media: fix generic resolution order typing 2026-04-07 06:27:42 +08:00
Peter Steinberger
8f64e1e061 test: slim memory-wiki gateway wrapper tests 2026-04-06 23:25:55 +01:00
Peter Steinberger
a0cf1cc4ad test: reuse memory-wiki temp fixtures 2026-04-06 23:25:55 +01:00
Peter Steinberger
637a5b137e test: trim memory-core fixture setup 2026-04-06 23:25:55 +01:00
Peter Steinberger
ca8570be02 Tests: align routing and iMessage helpers 2026-04-07 06:24:04 +08:00
Peter Steinberger
a463a33eee feat: preserve media intent across provider fallback 2026-04-06 23:23:06 +01:00
Vincent Koc
ee04ba0386 perf(secrets): prefer light web search contract artifacts 2026-04-06 23:22:47 +01:00
Peter Steinberger
ee03ad7d9c refactor: dedupe codex native search record helper 2026-04-06 23:22:04 +01:00
Peter Steinberger
b27a6f8196 refactor: dedupe web provider record helper 2026-04-06 23:22:04 +01:00
Peter Steinberger
31d05bb3a4 refactor: dedupe secrets record helper 2026-04-06 23:22:04 +01:00
Peter Steinberger
d8e7017326 refactor: dedupe record coercion helper 2026-04-06 23:22:04 +01:00
Peter Steinberger
2b5d8ac951 refactor: dedupe tool display record helper 2026-04-06 23:22:04 +01:00
Peter Steinberger
15c218c43f refactor: dedupe gateway server method record helpers 2026-04-06 23:22:04 +01:00
Peter Steinberger
201697c200 refactor: dedupe acp record helper 2026-04-06 23:22:04 +01:00
Peter Steinberger
421db1a5ec refactor: dedupe matrix record helper 2026-04-06 23:22:04 +01:00
Vincent Koc
7901296153 refactor(ui): replace unsafe stringification fallbacks 2026-04-06 23:17:53 +01:00
Vincent Koc
cd09f41fe0 fix(ci): repair extension test and msteams seams 2026-04-06 23:17:48 +01:00
Vincent Koc
7dd23a59db perf(secrets): complete bundled web provider artifacts 2026-04-06 23:17:30 +01:00
Peter Steinberger
c4e9189dd3 Infra: isolate WSL env detection tests 2026-04-07 06:12:32 +08:00
Vincent Koc
32eff914c6 fix(memory-core): narrow qmd and artifact dir typing 2026-04-06 23:09:46 +01:00
Vincent Koc
d88eb0e031 fix(exa): show Exa in setup pickers 2026-04-06 23:09:46 +01:00
Peter Steinberger
e9befcff9e refactor: dedupe elevenlabs talk record helper 2026-04-06 23:08:46 +01:00
Peter Steinberger
08c0018536 refactor: dedupe health record helper 2026-04-06 23:08:46 +01:00
Peter Steinberger
dc08aea25f refactor: dedupe status-all channel record helper 2026-04-06 23:08:46 +01:00
Peter Steinberger
ea78fb2d32 refactor: dedupe doctor x-search record helper 2026-04-06 23:08:46 +01:00
Peter Steinberger
8010f00816 refactor: dedupe doctor core record helper 2026-04-06 23:08:46 +01:00
Peter Steinberger
f97b1fa0c3 refactor: dedupe backup verify record helper 2026-04-06 23:08:46 +01:00
Peter Steinberger
7853d42ee9 refactor: dedupe channel account record helper 2026-04-06 23:08:46 +01:00
Peter Steinberger
c595ff8e62 refactor: dedupe secret ref record helper 2026-04-06 23:08:46 +01:00
Peter Steinberger
e894d98cb2 refactor: dedupe channel config record helper 2026-04-06 23:08:46 +01:00
Peter Steinberger
41f20e9143 refactor: dedupe config record helpers 2026-04-06 23:08:46 +01:00
Peter Steinberger
2f4b322911 refactor: dedupe feishu security string helper 2026-04-06 23:08:46 +01:00
Devin Robison
e420468ebd fix: openclaw allows normal reply text to carry media (#345) (#62136)
* fix: openclaw allows normal reply text to carry media (#345)
2026-04-06 16:08:33 -06:00
Peter Steinberger
8e3c597e80 refactor: dedupe browser security string helper 2026-04-06 22:54:48 +01:00
Peter Steinberger
29163a8caa refactor: dedupe bluebubbles status record helper 2026-04-06 22:54:48 +01:00
Peter Steinberger
0b7f6fa9d0 refactor: dedupe msteams handler record helper 2026-04-06 22:54:48 +01:00
Peter Steinberger
a8ac0b7976 refactor: dedupe msteams record helper 2026-04-06 22:54:48 +01:00
Peter Steinberger
92e3299793 refactor: dedupe bluebubbles send record helper 2026-04-06 22:54:48 +01:00
Peter Steinberger
b7e249fc08 refactor: dedupe browser setup record guard 2026-04-06 22:54:48 +01:00
Peter Steinberger
58c670acc2 refactor: dedupe browser record helper 2026-04-06 22:54:47 +01:00
Peter Steinberger
ca73e598e0 refactor: dedupe bluebubbles monitor record helper 2026-04-06 22:54:47 +01:00
Onur
08296e9645 chore: bump bundled acpx to 0.5.1 (#62148)
* chore: bump bundled acpx to 0.5.1

* chore: note acpx 0.5.1 pin bump (#62148) (thanks @onutc)
2026-04-06 23:54:26 +02:00
Peter Steinberger
f6c3474342 fix(qa-lab): bump health timeout to 360s, add settle delay, show compose path in error 2026-04-06 22:51:06 +01:00
Peter Steinberger
e44a995e83 test: trim qmd manager fixture setup 2026-04-06 22:49:36 +01:00
Peter Steinberger
528868ef76 perf: cache short-term artifacts dir 2026-04-06 22:49:36 +01:00
Peter Steinberger
80c8567f9d fix: resolve merge conflicts and preserve runtime test fixes 2026-04-06 22:46:33 +01:00
Peter Steinberger
9d7459f182 fix(auth): recover Codex OAuth refresh after store reload
Co-authored-by: Owen <oh.whenever@gmail.com>
2026-04-06 22:45:04 +01:00
Peter Steinberger
f7109c15f5 refactor: dedupe core account record helpers 2026-04-06 22:44:14 +01:00
Peter Steinberger
16ec0b5a8c style: format doctor memory search helper 2026-04-06 22:44:14 +01:00
Peter Steinberger
5a4ca2f608 refactor: dedupe doctor memory record helper 2026-04-06 22:44:14 +01:00
Peter Steinberger
223a6a1d9f refactor: dedupe doctor channel record helper 2026-04-06 22:44:14 +01:00
Peter Steinberger
b1905c1423 refactor: dedupe qmd manager record helper 2026-04-06 22:44:14 +01:00
Peter Steinberger
9bee2a4ede refactor: dedupe feishu security record helper 2026-04-06 22:44:14 +01:00
Peter Steinberger
0cc4f50576 refactor: dedupe tlon monitor string helper 2026-04-06 22:44:14 +01:00
Peter Steinberger
e88c39b0a1 refactor: dedupe memory-core error formatting 2026-04-06 22:44:14 +01:00
Peter Steinberger
1ad4926839 test(ci): update web provider artifact runtime expectations 2026-04-06 22:33:42 +01:00
Peter Steinberger
5ab1b16098 test: add cli backend live image probe 2026-04-06 22:33:05 +01:00
Peter Steinberger
d56e343d30 refactor: dedupe tlon monitor error formatting 2026-04-06 22:32:52 +01:00
Peter Steinberger
daa0a755df refactor: dedupe xai x search config record helper 2026-04-06 22:32:52 +01:00
Peter Steinberger
d780eb1301 refactor: dedupe xai web search record helper 2026-04-06 22:32:52 +01:00
Peter Steinberger
7ebd78cf1b refactor: dedupe tlon monitor record helper 2026-04-06 22:32:52 +01:00
Peter Steinberger
bd71ddabbd refactor: dedupe xai setup record helper 2026-04-06 22:32:52 +01:00
Peter Steinberger
9ba1b91936 refactor: dedupe feishu monitor string helper 2026-04-06 22:32:52 +01:00
Peter Steinberger
d0a1ecb768 refactor: dedupe feishu monitor record helper 2026-04-06 22:32:52 +01:00
Peter Steinberger
61fbc9ad2e refactor: dedupe memory-core record helper 2026-04-06 22:32:52 +01:00
Peter Steinberger
5417d88569 refactor: dedupe memory dreaming normalizers 2026-04-06 22:32:52 +01:00
Vincent Koc
377637ca67 perf(secrets): load bundled web providers from public artifacts 2026-04-06 22:31:10 +01:00
Peter Steinberger
1a63f5b972 fix: preserve plugin auto-enable activation context 2026-04-06 22:28:45 +01:00
Peter Steinberger
0a34c40e10 fix: restore legacy config snapshot compatibility 2026-04-06 22:28:45 +01:00
Vincent Koc
58696ef3a2 fix(ci): restore bundled vitest lane 2026-04-06 22:22:41 +01:00
Peter Steinberger
238d9a6510 refactor: dedupe feishu record helper 2026-04-06 22:21:01 +01:00
Peter Steinberger
c390e7c6ce refactor: dedupe acp text normalization helper 2026-04-06 22:21:01 +01:00
Peter Steinberger
961f527842 refactor: dedupe cli tagline mode parser 2026-04-06 22:21:01 +01:00
Peter Steinberger
1a08d23e09 refactor: dedupe finite number coercion helper 2026-04-06 22:21:01 +01:00
Peter Steinberger
cfebdee073 refactor: dedupe qa cli shutdown handling 2026-04-06 22:21:01 +01:00
Peter Steinberger
5f7fa588db refactor: dedupe memory wiki cli summary runners 2026-04-06 22:21:01 +01:00
Peter Steinberger
3700f3a22c refactor: dedupe lobster managed flow tool handling 2026-04-06 22:21:01 +01:00
Peter Steinberger
a41e50efbc refactor: dedupe plugin contract string normalization 2026-04-06 22:21:00 +01:00
Peter Steinberger
106b2794c5 refactor: dedupe webhook optional field mapping 2026-04-06 22:21:00 +01:00
Peter Steinberger
1a893132f6 refactor: dedupe qa mock input text extraction 2026-04-06 22:21:00 +01:00
Peter Steinberger
efd9aaea3f refactor: dedupe memory wiki source page writes 2026-04-06 22:21:00 +01:00
Peter Steinberger
79a84f070d refactor: dedupe google video size parsing 2026-04-06 22:21:00 +01:00
Peter Steinberger
c03071d36c refactor: dedupe sdk chat metadata builder 2026-04-06 22:21:00 +01:00
Peter Steinberger
7a3497c8bd refactor: dedupe image generation runtime surface 2026-04-06 22:21:00 +01:00
Peter Steinberger
bda7131367 refactor: dedupe plugin enable-state wrappers 2026-04-06 22:21:00 +01:00
Vincent Koc
c3f806c9e4 perf(secrets): lighten channel contract loading 2026-04-06 22:17:32 +01:00
Vincent Koc
e92c2b63f9 fix(memory-core): align embedding cache db typing 2026-04-06 22:16:12 +01:00
Devin Robison
48a3511233 fix: lower trust background runtime output is injecte (#327) (#62111)
* fix: lower trust background runtime output is injecte (#327)

* fix: lower trust background runtime output is injecte (#327)

---------

Co-authored-by: OpenClaw Dummy Agent <octriage-dummy@example.invalid>
2026-04-06 15:14:52 -06:00
Tak Hoffman
079494aee5 fix: normalize cached prompt token accounting 2026-04-06 16:11:51 -05:00
Peter Steinberger
a29b501ec9 perf(test): fix unit shard config regressions 2026-04-06 22:09:03 +01:00
Peter Steinberger
4ae1599ea5 perf: extract memory adapter registration helper 2026-04-06 22:04:23 +01:00
Peter Steinberger
d806682f78 perf: extract memory embedding state helpers 2026-04-06 22:04:23 +01:00
Peter Steinberger
0e05a304b6 fix(ci): repair main gate drift 2026-04-06 21:59:48 +01:00
Vincent Koc
b96589b1fc fix(memory-core): align vector write db typing 2026-04-06 21:54:32 +01:00
Vincent Koc
c7e0150af2 fix(contracts): update plugin-sdk boundary expectations 2026-04-06 21:52:05 +01:00
Peter Steinberger
c6b54e1cef perf(auto-reply): trim command runtime paths 2026-04-06 21:34:26 +01:00
Peter Steinberger
ef252976bc fix(plugins): harden doctor contract record guards 2026-04-06 21:34:26 +01:00
Peter Steinberger
c9f288ceaf perf: extract memory atomic reindex helpers 2026-04-06 21:28:29 +01:00
Peter Steinberger
6b6c95b443 perf: extract memory sqlite write helpers 2026-04-06 21:28:29 +01:00
Peter Steinberger
ca27d932b4 perf: extract memory search preflight helpers 2026-04-06 21:28:29 +01:00
Agustin Rivera
5b6e552b51 fix(hooks): mark wake hook events untrusted (#62003)
* fix(hooks): mark wake hook events untrusted

* docs(changelog): add wake-hook trust entry

---------

Co-authored-by: Devin Robison <drobison@nvidia.com>
2026-04-06 14:17:48 -06:00
Vincent Koc
ca26489fe8 fix(memory-core): repair sync helper typing drift 2026-04-06 21:11:06 +01:00
Peter Steinberger
0b55c0ec81 test(auto-reply): mark full-runtime directive suites 2026-04-06 21:09:43 +01:00
Peter Steinberger
61d9143b63 perf(auto-reply): separate fast and full reply runtime 2026-04-06 21:09:43 +01:00
Vincent Koc
ae79210ddd test(lint): refresh suppression tail guardrail 2026-04-06 21:05:18 +01:00
Vincent Koc
4e266253ce fix(xai): drop dead x-search import 2026-04-06 21:05:15 +01:00
Vincent Koc
87bcfe796f fix(check): tighten lobster and webhook mutation types 2026-04-06 21:03:50 +01:00
Peter Steinberger
aa4cb43627 test: speed up cli backend live lane 2026-04-06 21:01:45 +01:00
Peter Steinberger
51c6b1c2bc fix: default fallback decision log targets 2026-04-06 20:57:10 +01:00
Peter Steinberger
48f2c2097d fix: stabilize telegram doctor config repairs 2026-04-06 20:55:51 +01:00
Peter Steinberger
ed64ce3983 build: type plugin sdk exports for xai 2026-04-06 20:55:51 +01:00
Peter Steinberger
7c256bfdf4 test: trim memory manager test startup 2026-04-06 20:52:08 +01:00
Peter Steinberger
6e9382b5c8 perf: extract memory provider state helpers 2026-04-06 20:52:08 +01:00
Devin Robison
37d7c716f4 fix: the bundled qq bot extension extensions qqbot pe (#329) (#62082) 2026-04-06 13:50:33 -06:00
Peter Steinberger
7e3f345ee9 refactor: dedupe plugin interactive namespace helpers 2026-04-06 20:45:32 +01:00
Peter Steinberger
e3d6209599 refactor: dedupe model fallback failure tracking 2026-04-06 20:45:32 +01:00
Peter Steinberger
901fb18217 refactor: dedupe status-all gateway surface types 2026-04-06 20:45:32 +01:00
Peter Steinberger
55ae9addc1 refactor: dedupe subsystem logger emit path 2026-04-06 20:45:32 +01:00
Peter Steinberger
1919332fd3 refactor: dedupe subagent session metrics 2026-04-06 20:45:31 +01:00
Peter Steinberger
1b9a1328a1 refactor: dedupe memory wiki cli result formatting 2026-04-06 20:45:31 +01:00
Peter Steinberger
23d4aec907 refactor: dedupe memory wiki cli helpers 2026-04-06 20:45:31 +01:00
Peter Steinberger
f2bbf2b8e7 refactor: dedupe lobster runtime helpers 2026-04-06 20:45:31 +01:00
Peter Steinberger
95df6d9332 refactor: dedupe lobster managed flow formatting 2026-04-06 20:45:31 +01:00
Vincent Koc
7d54f2a3c2 fix(config): apply filtered doctor compat at read time 2026-04-06 20:45:07 +01:00
Vincent Koc
78639eff76 perf(secrets): narrow channel secret sdk seam 2026-04-06 20:40:11 +01:00
Peter Steinberger
c0d3743cdb fix: type xai x_search tool result 2026-04-06 20:34:19 +01:00
Peter Steinberger
a89f171865 fix: repair latest main gates 2026-04-06 20:31:34 +01:00
Peter Steinberger
78a948ee32 refactor: dedupe xai x search tool helpers 2026-04-06 20:30:20 +01:00
Peter Steinberger
f5bb8cbb98 refactor: dedupe memory wiki source path helpers 2026-04-06 20:30:20 +01:00
Peter Steinberger
ccfdfec43f refactor: dedupe doctor account streaming matchers 2026-04-06 20:30:20 +01:00
Peter Steinberger
1366b943e5 refactor: dedupe webhook view type shapes 2026-04-06 20:30:20 +01:00
Peter Steinberger
ce61cb48ec refactor: dedupe webhook flow mutation mapping 2026-04-06 20:30:20 +01:00
Peter Steinberger
e7ab634830 refactor: dedupe discord account streaming detection 2026-04-06 20:30:20 +01:00
Peter Steinberger
b83ddf3cef refactor: dedupe discord media detection helper 2026-04-06 20:30:20 +01:00
Peter Steinberger
6d52014ef8 refactor: dedupe doctor compat record helper 2026-04-06 20:30:20 +01:00
Peter Steinberger
38e4fb3642 refactor: dedupe feishu comment helpers 2026-04-06 20:30:20 +01:00
Peter Steinberger
4bcc58fc6d refactor: dedupe speech core vitest shim 2026-04-06 20:30:20 +01:00
Peter Steinberger
1dc1635851 refactor: dedupe channel core surface 2026-04-06 20:30:20 +01:00
Vincent Koc
bfc37b42a5 perf(brave): lazy-load web search runtime 2026-04-06 20:27:55 +01:00
Peter Steinberger
673a08ccf5 Tests: fix e2e Docker cache expectation 2026-04-07 03:23:58 +08:00
Peter Steinberger
f4d8393bf4 perf: extract memory manager state helpers 2026-04-06 20:21:46 +01:00
Peter Steinberger
8d2daf7ef2 perf: extract memory sync control helpers 2026-04-06 20:21:46 +01:00
Peter Steinberger
4ad1d96e5d fix(ci): repair typing drift on main 2026-04-06 20:20:30 +01:00
Devin Robison
681931345b fix: this is a real approval boundary bypass that tur (#323) (#62078) 2026-04-06 13:13:35 -06:00
Vincent Koc
153d06f890 test(lint): guard production suppression tail 2026-04-06 20:13:25 +01:00
Devin Robison
7306cf3707 fix: multiple dangerous build tool environment variab (#317) (#62079) 2026-04-06 13:10:38 -06:00
Vincent Koc
43f84890ce perf(test): trim runtime coverage batch overhead 2026-04-06 20:06:41 +01:00
Peter Steinberger
66aeb5ce23 CLI: fix stale secret gateway path expectation 2026-04-07 03:02:41 +08:00
Peter Steinberger
06f2b90a0f perf(auto-reply): skip provider runtime in fast reply tests 2026-04-06 20:00:35 +01:00
Peter Steinberger
8065586d13 fix: widen plugin docker restart timeout 2026-04-06 19:59:30 +01:00
Peter Steinberger
1a7c3eb4fc CLI: scope agent secret targets 2026-04-07 02:58:10 +08:00
Peter Steinberger
5ac49b01c6 refactor: dedupe provider registry helpers 2026-04-06 19:57:57 +01:00
Peter Steinberger
a5b5632809 refactor: inline openai realtime config readers 2026-04-06 19:57:57 +01:00
Peter Steinberger
637bc8e458 refactor: dedupe qqbot result logging helper 2026-04-06 19:57:57 +01:00
Peter Steinberger
24f4322141 refactor: dedupe openai codex string helper 2026-04-06 19:57:57 +01:00
Peter Steinberger
b523d6559c refactor: dedupe openai synthetic catalog helper 2026-04-06 19:57:56 +01:00
Peter Steinberger
fd05e7ca1a refactor: dedupe openai codex url helper 2026-04-06 19:57:56 +01:00
Peter Steinberger
60fb7a318e refactor: dedupe openai base url helper 2026-04-06 19:57:56 +01:00
Peter Steinberger
413a5ef75a refactor: dedupe qqbot photo send helper 2026-04-06 19:57:56 +01:00
Peter Steinberger
1013cb3a5d refactor: dedupe openai data url helper 2026-04-06 19:57:56 +01:00
Peter Steinberger
a336c31962 refactor: dedupe elevenlabs provider helpers 2026-04-06 19:57:56 +01:00
Peter Steinberger
d6d999eda6 refactor: dedupe speech provider scalar coercion helpers 2026-04-06 19:57:56 +01:00
Peter Steinberger
9d36e7a73a refactor: dedupe speech provider coercion helpers 2026-04-06 19:57:56 +01:00
Peter Steinberger
501977106c perf(auto-reply): trim fast reply runtime path 2026-04-06 19:54:28 +01:00
Peter Steinberger
1b7e16668e fix: finalize arcee provider landing (#62068) (thanks @arthurbr11) 2026-04-06 19:53:27 +01:00
Peter Steinberger
8ff570ee42 refactor: resolve channel env vars from plugin manifests 2026-04-06 19:53:27 +01:00
Peter Steinberger
bc18e69fbf fix: separate arcee auth envs from openrouter 2026-04-06 19:53:27 +01:00
Peter Steinberger
b7d3a26356 refactor: extract arcee provider cleanup seams 2026-04-06 19:53:27 +01:00
Peter Steinberger
177be0f237 fix: remove provider hardcoding and fix arcee openrouter 2026-04-06 19:53:27 +01:00
arthurbr11
95106be59b feat: enhance Arcee AI provider with OpenRouter support and update onboarding instructions 2026-04-06 19:53:27 +01:00
arthurbr11
1dc3ee6165 fix: update maxTokens for Arcee model catalog entries 2026-04-06 19:53:27 +01:00
arthurbr11
5ac2f58c57 feat: add Arcee AI provider plugin
Add a bundled Arcee AI provider plugin with ARCEEAI_API_KEY onboarding,
Trinity model catalog (mini, large-preview, large-thinking), and
OpenAI-compatible API support.

- Trinity Large Thinking: 256K context, reasoning enabled
- Trinity Large Preview: 128K context, general-purpose
- Trinity Mini 26B: 128K context, fast and cost-efficient
2026-04-06 19:53:27 +01:00
Peter Steinberger
8f421f0e78 test: stabilize auto-reply and doctor suites 2026-04-06 19:52:42 +01:00
Peter Steinberger
134ff61754 test: stabilize agent auth and config suites 2026-04-06 19:52:42 +01:00
Peter Steinberger
aaa5dea358 build: type live media runner 2026-04-06 19:52:42 +01:00
Peter Steinberger
b6e0a24d50 fix: align session status transcript fallback 2026-04-06 19:49:35 +01:00
Peter Steinberger
f9c721d5bf fix: add vydra kling live lane 2026-04-06 19:47:43 +01:00
Peter Steinberger
66405d5e8a perf: extract memory status state helpers 2026-04-06 19:45:31 +01:00
Peter Steinberger
c50e3c676a test: stub memory host events in promotion tests 2026-04-06 19:45:31 +01:00
Peter Steinberger
d4130e83c6 refactor: dedupe discord mutable allow entry helper 2026-04-06 19:36:01 +01:00
Peter Steinberger
50628ef62c refactor: dedupe security audit helper coercion 2026-04-06 19:36:01 +01:00
Peter Steinberger
a2be2abc28 refactor: dedupe qqbot chunk send loops 2026-04-06 19:36:01 +01:00
Peter Steinberger
2edc3c8a3e style: format dashscope video helpers 2026-04-06 19:36:01 +01:00
Peter Steinberger
5656f6c7ff refactor: dedupe dashscope video helpers 2026-04-06 19:36:01 +01:00
Peter Steinberger
27dc1bd0fc fix(qa-lab): improve health timeout error message and fix port-free check 2026-04-06 19:35:18 +01:00
Peter Steinberger
37b7e22e13 fix(qa-lab): increase health check timeout to 240s 2026-04-06 19:35:15 +01:00
Peter Steinberger
7a736bff90 perf(test): split reply queue seams and unit shards 2026-04-06 19:31:20 +01:00
Peter Steinberger
06d57e5107 fix: stabilize docker live tests 2026-04-06 19:31:16 +01:00
Peter Steinberger
a040de33f1 fix(ci): repair provider typing drift 2026-04-06 19:28:55 +01:00
Peter Steinberger
b4ec7d77ce test: reuse memory temp fixtures 2026-04-06 19:28:18 +01:00
Peter Steinberger
c185413a8e perf: serialize short-term recall writes in-process 2026-04-06 19:28:18 +01:00
Peter Steinberger
ff414df15f Agents: narrow cli runner hotspot tests 2026-04-07 02:26:55 +08:00
Peter Steinberger
9f4c2caf06 fix(qa-lab): skip render when poll data unchanged and use dropdown model selectors 2026-04-06 19:25:51 +01:00
Peter Steinberger
9663343183 test(ci): align openai image edit assertion 2026-04-06 19:25:35 +01:00
Peter Steinberger
26b401c8e5 refactor: dedupe memory read execution helper 2026-04-06 19:24:43 +01:00
Peter Steinberger
a171de283f refactor: dedupe openai-compatible video helpers 2026-04-06 19:24:43 +01:00
Peter Steinberger
283b103e75 refactor: dedupe doctor account streaming checks 2026-04-06 19:24:43 +01:00
Peter Steinberger
b589de7a4f refactor: dedupe memory read fallback helper 2026-04-06 19:24:43 +01:00
Peter Steinberger
5116ce2d5e refactor: dedupe webhook view mappers 2026-04-06 19:24:43 +01:00
Peter Steinberger
3826af6c40 refactor: dedupe qqbot media target helpers 2026-04-06 19:24:43 +01:00
Peter Steinberger
800ac580b1 refactor: dedupe qqbot text dispatch helper 2026-04-06 19:24:43 +01:00
Peter Steinberger
bf24bd16f3 refactor: dedupe discord split reply helpers 2026-04-06 19:24:43 +01:00
Peter Steinberger
ab7777b169 refactor: dedupe discord payload chunk helper 2026-04-06 19:24:42 +01:00
Peter Steinberger
cae4538a86 refactor: dedupe openai speech provider helpers 2026-04-06 19:24:42 +01:00
Peter Steinberger
8fdaa5da49 refactor: dedupe vydra provider request helpers 2026-04-06 19:24:42 +01:00
Peter Steinberger
6dfdc92bd4 refactor: dedupe openai realtime provider helpers 2026-04-06 19:24:42 +01:00
Peter Steinberger
dab4a4790d refactor: dedupe mutable allowlist doctor warnings 2026-04-06 19:24:42 +01:00
Peter Steinberger
2d0618f8b5 refactor: dedupe discord payload text helper 2026-04-06 19:24:42 +01:00
Peter Steinberger
d9f21433a8 refactor: dedupe acp binding helpers 2026-04-06 19:24:42 +01:00
Peter Steinberger
33cdb342cb refactor(discord): split voice receive and capture helpers 2026-04-06 19:24:07 +01:00
Peter Steinberger
ec55902989 perf(test): tighten reply fast paths and split unit shards 2026-04-06 19:23:17 +01:00
Peter Steinberger
0cebe9d593 fix(qa-lab): add Slack-style chat sidebar and fix light mode theming 2026-04-06 19:21:24 +01:00
Peter Steinberger
e43a1f235e fix(ci): type live media runner 2026-04-06 19:18:59 +01:00
Peter Steinberger
41ea5316aa test: add shared media live harness 2026-04-06 19:15:31 +01:00
Peter Steinberger
dd978bf975 fix: stabilize media live provider coverage 2026-04-06 19:15:31 +01:00
Peter Steinberger
58d7df7985 fix(ci): restore contracts and type gates 2026-04-06 19:10:31 +01:00
Peter Steinberger
0419bf6324 Commands: split slow agent runtime tests 2026-04-07 02:07:17 +08:00
Vincent Koc
88dd641c6a test(media): accept minimax fetch abort signal 2026-04-06 18:57:00 +01:00
Vincent Koc
3d5668c305 fix(discord): export security contract api 2026-04-06 18:57:00 +01:00
Vincent Koc
739ce82015 fix(plugins): prefer usable bundled plugin trees 2026-04-06 18:57:00 +01:00
Vincent Koc
e77d72a91d fix(config): lazily resolve bundled channel runtimes 2026-04-06 18:57:00 +01:00
Peter Steinberger
10802e20d6 test: trim memory hotspot fixture setup 2026-04-06 18:55:54 +01:00
Peter Steinberger
e6b95624d9 test: reuse qmd manager fixture cleanup 2026-04-06 18:55:54 +01:00
Peter Steinberger
f8fc7f3e41 fix: run claude cli live lanes against anthropic models 2026-04-06 18:50:00 +01:00
Peter Steinberger
7ae8a10087 fix: improve claude cli live discovery 2026-04-06 18:49:59 +01:00
Peter Steinberger
226e1afa4d Commands: narrow agent snapshot test seam 2026-04-07 01:48:35 +08:00
Peter Steinberger
95fe63e63f perf(auto-reply): fast-path getReply test bootstrap 2026-04-06 18:46:26 +01:00
Peter Steinberger
a211f09259 docs: note discord voice recovery fix (#41536) (thanks @wit-oc) 2026-04-06 18:44:19 +01:00
Peter Steinberger
dfa14001a4 fix: harden discord voice receive recovery (#41536) (thanks @wit-oc) 2026-04-06 18:44:19 +01:00
OpenClaw Contributor
37e89b930f fix(discord): restore voice receive path and reply playback 2026-04-06 18:44:19 +01:00
Peter Steinberger
80789809a4 Agents: trim cli runner test hotspots 2026-04-07 01:44:01 +08:00
Peter Steinberger
41da6faa9e fix(qa-lab): tear down previous docker stack before starting new one 2026-04-06 18:41:17 +01:00
Peter Steinberger
dd0cd5dcda refactor: dedupe whatsapp security contract helpers 2026-04-06 18:40:05 +01:00
Peter Steinberger
00e46301a4 refactor: dedupe webhook task view helpers 2026-04-06 18:40:05 +01:00
Peter Steinberger
90f33ed5da refactor: dedupe discord structured send context 2026-04-06 18:40:05 +01:00
Peter Steinberger
0153d102d7 refactor: dedupe discord media batch helper 2026-04-06 18:40:05 +01:00
Peter Steinberger
d1a4cf28cc refactor: dedupe subagents dispatch helpers 2026-04-06 18:40:05 +01:00
Peter Steinberger
b66915a957 refactor: tidy discord thread binding lifecycle imports 2026-04-06 18:40:05 +01:00
Peter Steinberger
54f2de7e1c refactor: dedupe discord thread binding lifecycle exports 2026-04-06 18:40:05 +01:00
Peter Steinberger
6243ca50e0 refactor: dedupe qqbot channel config helpers 2026-04-06 18:40:05 +01:00
Peter Steinberger
3921bb2df6 perf: extract memory manager state helpers 2026-04-06 18:39:06 +01:00
Peter Steinberger
b5c9a46633 test: pre-register memory embedding adapters 2026-04-06 18:39:06 +01:00
Peter Steinberger
ff8f46884a test(auto-reply): speed up reply prompt tests 2026-04-06 18:34:08 +01:00
Peter Steinberger
e6c1e9c64b refactor(auto-reply): extract reply prompt prelude 2026-04-06 18:34:08 +01:00
Peter Steinberger
b98cccc06e refactor: dedupe mattermost channel config helpers 2026-04-06 18:30:16 +01:00
Peter Steinberger
81b0f280be refactor: dedupe discord media-only delivery helper 2026-04-06 18:30:16 +01:00
Peter Steinberger
4c8bb05c89 refactor: dedupe whatsapp login qr wrappers 2026-04-06 18:30:16 +01:00
Peter Steinberger
8f7792317d test: move bundled channel config runtime into test helpers 2026-04-06 18:30:09 +01:00
Peter Steinberger
6a052ca4b8 CLI: speed up command secret gateway tests 2026-04-07 01:24:24 +08:00
Peter Steinberger
a47c49bbf3 feat(qa-lab): redesign UI with sidebar layout, Slack-like chat, and light/dark mode 2026-04-06 18:21:33 +01:00
Peter Steinberger
510fca655a fix(plugins): avoid helper reentry loads 2026-04-06 18:20:33 +01:00
Peter Steinberger
348cd6b17a fix(test): restore bundled loader coverage 2026-04-06 18:18:30 +01:00
Peter Steinberger
96b39e01b4 test: move android policy fixtures into test helpers 2026-04-06 18:18:03 +01:00
Peter Steinberger
f8818a574c test: remove dead prompt runtime shim 2026-04-06 18:18:03 +01:00
Peter Steinberger
317e3f631a refactor: dedupe xai search response parsing 2026-04-06 18:15:54 +01:00
Peter Steinberger
fe7059696b refactor: dedupe opencode model default helpers 2026-04-06 18:15:54 +01:00
Peter Steinberger
673878188d refactor: dedupe preview streaming helpers 2026-04-06 18:15:53 +01:00
Peter Steinberger
8ae6cf32bb refactor: dedupe matrix thread binding projections 2026-04-06 18:15:53 +01:00
Peter Steinberger
71dd337628 refactor: dedupe matrix migration auth precedence 2026-04-06 18:15:53 +01:00
Peter Steinberger
ab96703b5c refactor: dedupe matrix env auth helpers 2026-04-06 18:15:53 +01:00
Peter Steinberger
a484d08f5c refactor: dedupe discord thread binding session helpers 2026-04-06 18:15:53 +01:00
Peter Steinberger
09fc834c75 refactor: dedupe legacy config record helpers 2026-04-06 18:15:53 +01:00
Peter Steinberger
b4785525df refactor: dedupe video generation runtime surface 2026-04-06 18:15:53 +01:00
Peter Steinberger
4610ceb2a5 refactor: dedupe media understanding runtime surface 2026-04-06 18:15:53 +01:00
Vincent Koc
8301ddfa84 fix(test): clean up vitest child process groups 2026-04-06 18:10:44 +01:00
Peter Steinberger
a22e44f259 Secrets: fast-path core target discovery 2026-04-07 01:10:30 +08:00
Peter Steinberger
1430de95a5 test: move channel session-binding fixtures into test helpers 2026-04-06 18:10:10 +01:00
Peter Steinberger
f3c00048cf test: move prompt composition fixtures into test helpers 2026-04-06 18:10:10 +01:00
Peter Steinberger
f88b6ffb48 test: restore plugin contract testkit imports 2026-04-06 18:09:37 +01:00
Vincent Koc
48fea1021a fix(channels): harden bundled runtime sidecar resolution 2026-04-06 18:06:51 +01:00
Peter Steinberger
7d9a6b5572 fix(plugins): detect reentrant plugin loads 2026-04-06 18:05:33 +01:00
Peter Steinberger
f8920e96d0 test: add missing provider runtime mock export 2026-04-06 18:04:18 +01:00
Peter Steinberger
c817bb87d4 test: move plugin helper seams into test helpers 2026-04-06 18:03:35 +01:00
Peter Steinberger
24492b51c9 test: move channel contract fixtures into test helpers 2026-04-06 18:03:35 +01:00
Peter Steinberger
bb29c8696a fix: harden qa lab docker launcher startup 2026-04-06 18:01:08 +01:00
Vincent Koc
8f2ff2497a test(channels): mock bundled channel runtime seam 2026-04-06 18:00:38 +01:00
Vincent Koc
8e2ecd053f fix(secrets): restore source-mode contract loading 2026-04-06 17:59:53 +01:00
Peter Steinberger
725cbcc362 fix(plugins): narrow provider hook reentry guard 2026-04-06 17:57:49 +01:00
Peter Steinberger
309154085b fix(ci): repair heartbeat test import path 2026-04-06 17:56:54 +01:00
Peter Steinberger
c1fa747f69 refactor: dedupe config write policy helpers 2026-04-06 17:56:41 +01:00
Peter Steinberger
a5a7ea0e39 refactor: dedupe provider stream family surface 2026-04-06 17:56:41 +01:00
Peter Steinberger
f1d7e9b569 refactor: dedupe volc model catalog helpers 2026-04-06 17:56:41 +01:00
Peter Steinberger
23f3a2d59d refactor: dedupe plugin account resolution surface 2026-04-06 17:56:41 +01:00
Peter Steinberger
6b543cafee refactor: dedupe plugin enable-state adapters 2026-04-06 17:56:41 +01:00
Peter Steinberger
0eb6cec32b refactor: dedupe plugin discovery boundary opens 2026-04-06 17:56:41 +01:00
Peter Steinberger
a4223f836d refactor: dedupe plugin release package scanning 2026-04-06 17:56:41 +01:00
Peter Steinberger
345c71f264 refactor: dedupe plugin activation helpers 2026-04-06 17:56:41 +01:00
Peter Steinberger
87617c44ba refactor: dedupe channel text chunking helpers 2026-04-06 17:56:41 +01:00
Peter Steinberger
40ea257792 fix(test): retry flaky cli backend connect 2026-04-06 17:52:23 +01:00
Peter Steinberger
7f6de686bb fix(ci): repair contracts and whatsapp regressions 2026-04-06 17:52:05 +01:00
Peter Steinberger
c5973755fd chore(acpx): clarify runtime asset packaging 2026-04-06 17:51:21 +01:00
Peter Steinberger
1acadc5bbf refactor(deadcode): remove orphaned plugin wrappers 2026-04-06 17:51:21 +01:00
Peter Steinberger
a20bc8640b test: move dead helper fixtures into test helpers 2026-04-06 17:51:21 +01:00
EVA
594ea6e1b9 fix(agents): backfill missing sessionKey in embedded PI runner — prevents undefined key in model selection and live-switch (#60555)
Merged via squash.

Prepared head SHA: 8081345f1c
Co-authored-by: 100yenadmin <239388517+100yenadmin@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
2026-04-06 09:51:05 -07:00
Peter Steinberger
b4e1747391 feat: add one-command qa lab docker launcher 2026-04-06 17:47:17 +01:00
Peter Steinberger
d733786cf7 test: slim memory cli runtime mock imports 2026-04-06 17:46:48 +01:00
Peter Steinberger
30c686423f perf: avoid full config resolution in qmd sync 2026-04-06 17:46:48 +01:00
Peter Steinberger
d1414477a4 fix: finish rebase conflict cleanup 2026-04-06 17:45:29 +01:00
Peter Steinberger
6acb43f294 fix: resolve channel typing regressions 2026-04-06 17:43:57 +01:00
Peter Steinberger
1880b104ed style: normalize test import order 2026-04-06 17:42:19 +01:00
Peter Steinberger
f7f861082a fix(ci): repair boundary guards 2026-04-06 17:42:19 +01:00
Peter Steinberger
51f77b5e04 Agents: align Claude fixture with rebased tests 2026-04-07 00:37:37 +08:00
Peter Steinberger
0f224724dc Agents: slim cli-runner test seams 2026-04-07 00:37:37 +08:00
Peter Steinberger
ec359f5942 Discord: trim monitor test import cost 2026-04-07 00:37:37 +08:00
Peter Steinberger
67520b6abf fix(ci): restore bundled channel loading 2026-04-06 17:35:47 +01:00
Peter Steinberger
0335a8783c perf(test): shard full vitest runs 2026-04-06 17:34:11 +01:00
Peter Steinberger
a47cb0a3b3 refactor: dedupe approval gateway resolver setup 2026-04-06 17:31:16 +01:00
Peter Steinberger
c7cc89904e fix: unblock claude docker live lanes 2026-04-06 17:31:11 +01:00
Peter Steinberger
e7e3f11b20 refactor: dedupe legacy private-network doctor contracts 2026-04-06 17:28:11 +01:00
Peter Steinberger
ce30557399 refactor(deadcode): remove orphaned core helpers 2026-04-06 17:26:25 +01:00
Peter Steinberger
591347113e refactor(deadcode): prune extension test shims 2026-04-06 17:26:25 +01:00
Peter Steinberger
943d7de240 refactor: dedupe doctor compatibility adapters 2026-04-06 17:25:36 +01:00
Vincent Koc
e7fe087677 fix(openai): normalize prompt overlay personality config 2026-04-06 17:24:51 +01:00
Vincent Koc
6dc3e1f770 perf(test): flatten async channel secret mocks 2026-04-06 17:24:38 +01:00
Peter Steinberger
5f906c926d refactor: remove qa-e2e compatibility facade 2026-04-06 17:23:35 +01:00
Peter Steinberger
350238d402 feat: add interactive qa lab suite runner 2026-04-06 17:23:35 +01:00
Peter Steinberger
e70168212d refactor: dedupe script and matrix send helpers 2026-04-06 17:21:52 +01:00
Vincent Koc
7af1def025 perf(test): isolate secret target registry docs checks 2026-04-06 17:21:49 +01:00
Peter Steinberger
7422e90053 fix(ci): restore shared test seams 2026-04-06 17:20:38 +01:00
huntharo
f2cd2c00b0 fix(plugin-sdk): add bundled entry error context
(cherry picked from commit 6099405ba1e8b98caa92cce4487808d212dc3544)
2026-04-06 12:19:05 -04:00
Peter Steinberger
d25491aa6d refactor: dedupe release git range helpers 2026-04-06 17:18:36 +01:00
Peter Steinberger
1c5cbad0a6 refactor: dedupe account conversation bindings 2026-04-06 17:18:36 +01:00
Peter Steinberger
1aee8c55ce refactor: dedupe channel doctor compat helpers 2026-04-06 17:18:36 +01:00
Peter Steinberger
a86fa3b211 refactor(deadcode): drop orphaned extension helpers 2026-04-06 17:18:03 +01:00
Peter Steinberger
ce87d5e242 refactor(deadcode): remove extension wrapper shims 2026-04-06 17:18:03 +01:00
Peter Steinberger
5d7a73380f fix(ci): repair tsgo test harnesses 2026-04-06 17:16:01 +01:00
Vincent Koc
c01b4981af test(memory-core): seed qmd manager provider registry 2026-04-06 17:10:18 +01:00
Peter Steinberger
bedfa576a3 fix(ci): clean poll-timeout test merge artifact 2026-04-06 17:06:22 +01:00
Peter Steinberger
645c331200 fix(ci): repair type and extension regressions 2026-04-06 17:06:22 +01:00
Vincent Koc
79a0c71874 chore(lint): drop stale transcript type import 2026-04-06 17:06:18 +01:00
Vincent Koc
a797068206 refactor(lint): tighten channel and config defaults 2026-04-06 17:06:18 +01:00
Peter Steinberger
5d0e8336ab perf(test): trim bundled channel bootstrap 2026-04-06 17:05:59 +01:00
Peter Steinberger
8b79cbcd06 build(plugins): align package versions to 2026.4.6 2026-04-06 17:05:30 +01:00
Peter Steinberger
860721f28d build(plugins): sync bundled versions to 2026.4.6 2026-04-06 17:05:30 +01:00
Peter Steinberger
220d10cad3 docs(changelog): add unreleased entries for 2026.4.6 2026-04-06 17:05:30 +01:00
Peter Steinberger
723c0ea2b7 test: speed up memory manager hotspot tests 2026-04-06 17:04:13 +01:00
Peter Steinberger
6f841ff121 test: cache memory manager helper imports 2026-04-06 17:04:13 +01:00
Peter Steinberger
e1a047c43f fix: repair gateway fingerprint callback 2026-04-06 17:02:10 +01:00
Peter Steinberger
a8436f0220 fix: resolve rebased type drift 2026-04-06 17:02:10 +01:00
Peter Steinberger
821a30981a test: refresh agent harness and latest-main type fixes 2026-04-06 17:02:10 +01:00
Peter Steinberger
2fef1ccbe7 fix: avoid leading spaces when stripping model tokens 2026-04-06 17:02:10 +01:00
Peter Steinberger
0ffceca50a test: align agent auth and model expectations 2026-04-06 17:02:10 +01:00
Peter Steinberger
1b9ec88d9c fix: centralize HTTP/1.1 SSRF dispatchers (#61777) (thanks @zozo123) 2026-04-06 17:02:10 +01:00
Yossi Eliaz
0f5919a4ba fix(ssrf): disable HTTP/2 for pinned SSRF-guard dispatchers (undici 8.0 compat)
Undici 8.0 defaults HTTPS clients to negotiate HTTP/2 via ALPN, which is
incompatible with the custom `connect.lookup` callback used for SSRF DNS
pinning. This caused `TypeError: fetch failed` in web_fetch/web_search.

Explicitly set `allowH2: false` on all dispatcher creation paths (Agent,
EnvHttpProxyAgent, ProxyAgent) to restore HTTP/1.1 behavior and keep the
pinned DNS lookup working reliably.

Closes #61738
2026-04-06 17:02:10 +01:00
Peter Steinberger
a65f9971b7 refactor(deadcode): remove duplicate barrels and helper shims 2026-04-06 17:00:40 +01:00
Peter Steinberger
0b36423f97 docs: reorder unreleased changelog entries 2026-04-06 16:58:28 +01:00
Vincent Koc
38c520acc3 chore(memory-core): type embedding test mocks 2026-04-06 16:58:14 +01:00
Vincent Koc
84c182deb2 fix(secrets): keep legacy x_search auth resolving 2026-04-06 16:57:23 +01:00
Vincent Koc
096d0cf412 chore(lint): type script and test helpers 2026-04-06 16:55:50 +01:00
Peter Steinberger
e79d2ecd9e fix(check): repair latest type drift on main 2026-04-06 16:54:34 +01:00
Peter Steinberger
21f59a0ad5 fix: suppress commentary history leaks (#61747) (thanks @afurm) 2026-04-06 16:54:34 +01:00
Peter Steinberger
672fcb187d refactor(plugins): move provider seams to owning extensions 2026-04-06 16:54:18 +01:00
Peter Steinberger
9100923395 fix(ci): repair tsgo regressions 2026-04-06 16:53:21 +01:00
Peter Steinberger
f2a710ce63 fix(ci): align stale test expectations 2026-04-06 16:53:21 +01:00
Vincent Koc
87b2a6a16a refactor(lint): type tool factories and runtime helpers 2026-04-06 16:53:02 +01:00
Vincent Koc
506b4decbd test(secrets): mock bundled channel secrets seam 2026-04-06 16:52:59 +01:00
Peter Steinberger
9c82974082 refactor: dedupe discord send target parsing 2026-04-06 16:52:42 +01:00
Peter Steinberger
93338ffbcc refactor: dedupe media generation action helpers 2026-04-06 16:52:42 +01:00
Peter Steinberger
c88870ac93 refactor: dedupe windows cmd runner helpers 2026-04-06 16:52:41 +01:00
Peter Steinberger
ad9481e2d1 refactor: dedupe auth and session helpers 2026-04-06 16:52:41 +01:00
Peter Steinberger
e8c7481fd2 refactor: dedupe outbound helpers 2026-04-06 16:52:41 +01:00
Peter Steinberger
4a84412b3a refactor: dedupe channel plugin helpers 2026-04-06 16:52:41 +01:00
Peter Steinberger
8aeee0dc6d refactor: dedupe plugin config helpers 2026-04-06 16:52:41 +01:00
Peter Steinberger
a830f4de4b test(commands): fix moved session store refs 2026-04-06 16:49:28 +01:00
Peter Steinberger
8a33a8d607 perf(test): trim runtime lookups and add changed bench 2026-04-06 16:49:28 +01:00
Peter Steinberger
8477f1841a refactor(deadcode): remove orphaned core wrappers 2026-04-06 16:47:03 +01:00
Peter Steinberger
d60149c655 test: move provider tests into owning extensions 2026-04-06 16:47:03 +01:00
Vincent Koc
c109a7623b refactor(lint): type shared runtime seams 2026-04-06 16:46:08 +01:00
Peter Steinberger
eef80f31cf Tests: fix stale expectations and weak token generation 2026-04-06 23:44:26 +08:00
Peter Steinberger
074e6d5047 fix(discord): use ws for gateway sockets 2026-04-06 16:43:47 +01:00
Vincent Koc
6775611c5d refactor(gateway): type inline tool auth helpers 2026-04-06 16:42:16 +01:00
Vincent Koc
9e41b2ffd6 style(contracts): normalize registry formatting 2026-04-06 16:40:54 +01:00
Vincent Koc
6b12e3ebf6 fix(contracts): stabilize bundled channel artifact loading 2026-04-06 16:40:54 +01:00
Vincent Koc
c3b19d204a perf(test): lazy-load bundled channel secrets 2026-04-06 16:40:41 +01:00
Peter Steinberger
349a1c58f9 refactor: re-duplicate auth and session helpers 2026-04-06 16:38:57 +01:00
Peter Steinberger
cdf321b320 refactor: re-duplicate outbound helpers 2026-04-06 16:38:57 +01:00
Peter Steinberger
9c24bda43b refactor: re-duplicate channel plugin helpers 2026-04-06 16:38:57 +01:00
Peter Steinberger
a6a379b37c refactor: re-duplicate plugin config helpers 2026-04-06 16:38:57 +01:00
Vincent Koc
00f256dd31 refactor(gateway): type tool resolution paths 2026-04-06 16:36:51 +01:00
Peter Steinberger
aa6f6135db fix: tighten TUI phase handling and heartbeat session guards (#61463) (thanks @100yenadmin) 2026-04-06 16:35:22 +01:00
Eva
2d481c9329 fix(heartbeat): add subagent guard to resolveHeartbeatSession production code 2026-04-06 16:35:22 +01:00
Eva
aaf5307638 fix(gateway): seq-based cursor pagination + sanitize SSE fast path
- Pagination now searches by message seq value instead of using
  cursorSeq-1 as array index. After sanitization drops rows, seqs
  become sparse and positional indexing breaks cursor traversal.
- SSE unbounded fast path now sanitizes incremental messages through
  sanitizeChatHistoryMessages before emitting, so NO_REPLY and
  directive messages are suppressed consistently with initial history.
2026-04-06 16:35:22 +01:00
Eva
22d8e47a50 fix(agents,gateway): adopt phase-aware assistant text extraction 2026-04-06 16:35:22 +01:00
Peter Steinberger
0b9993df95 fix(agents): keep phaseless OpenAI WS text buffered until phase resolves (#61968)
* fix(agents): gate WS text delta emission on valid phase value, not map key existence

When output_item.added arrives without phase metadata, outputItemPhaseById
stores undefined. The previous .has() check returned true for undefined
values, bypassing the buffering gate and leaking commentary as unphased
visible content.

Fix: change .has() to .get() !== undefined on both delta and done handlers.

Fixes #61477

* docs: note WS phase buffering fix (#61954) (thanks @100yenadmin)

* test(agents): cover phaseless WS output_text.done buffering (#61954)

* test(commands): fix session-store import path for tsgo (#61968)

---------

Co-authored-by: Eva <eva@100yen.org>
2026-04-06 16:35:16 +01:00
Vincent Koc
56136c83b7 refactor(plugins): type sync hook handlers 2026-04-06 16:35:11 +01:00
Peter Steinberger
c22372dec6 fix(ci): restore discord and feishu lifecycle tests 2026-04-06 16:32:41 +01:00
Peter Steinberger
de20d3a024 refactor(plugin-sdk): add simple completion runtime entrypoint 2026-04-06 16:29:43 +01:00
Peter Steinberger
7785dc21e6 fix(discord): drop generated thread title temperature 2026-04-06 16:29:43 +01:00
Peter Steinberger
6cc54e5059 fix(extensions): restore lint-safe xai imports 2026-04-06 16:27:38 +01:00
Peter Steinberger
7a5e65c71b test(channels): fix add and facade fixtures 2026-04-06 16:27:38 +01:00
Vincent Koc
44cd91b0a9 fix(feishu): load lifecycle mocks before card action imports 2026-04-06 16:26:48 +01:00
Mason
2d7d99f66e docs: quote plan title frontmatter (#61962) 2026-04-06 23:25:57 +08:00
jjjojoj
281ea15550 fix: narrow queryTokenHint guard to only auth-specific errors, remove overly broad connect failed check 2026-04-06 23:24:29 +08:00
jjjojoj
39c721d382 fix: detect ?token= and suggest #token= fragment syntax
When users visit the Control UI with ?token=<token>, they see
"device identity required" with no hint about the correct URL format.

This change:
- Detects when token is read from query string vs URL fragment
- Warns via console when ?token= is used
- Shows an inline hint in the overview error area directing users
  to use #token=<token> instead

Fixes #54842
2026-04-06 23:24:29 +08:00
Peter Steinberger
cfb7779584 refactor(deadcode): remove agent command shims 2026-04-06 16:24:12 +01:00
Peter Steinberger
d5bfc79112 fix(discord): preserve stack hints for empty gateway type errors 2026-04-06 16:20:36 +01:00
Vincent Koc
90d246959b fix(matrix): align forged mention test with route precheck 2026-04-06 16:19:13 +01:00
Vincent Koc
4ef8f4f53c docs: add media overview page and consolidate TTS duplicate 2026-04-06 16:18:45 +01:00
Peter Steinberger
41c700fe9e refactor(deadcode): remove command auth shims 2026-04-06 16:18:20 +01:00
Vincent Koc
d425aa0912 fix(feishu): await websocket startup in cleanup test 2026-04-06 16:16:53 +01:00
Peter Steinberger
514328a9ad style(repo): format touched helpers and tests 2026-04-06 16:16:10 +01:00
Peter Steinberger
9ca935720c style(preview): format dream diary preview files 2026-04-06 16:16:10 +01:00
Vincent Koc
ab564f8446 docs: add async task lifecycle to video and music generation 2026-04-06 16:15:57 +01:00
Peter Steinberger
0c5e6037b0 fix(openai): clarify auth routes in picker and docs 2026-04-06 16:14:51 +01:00
Peter Steinberger
2b6e08bbfa refactor: remove confirmed dead helpers 2026-04-06 16:13:26 +01:00
Peter Steinberger
d82644cdc8 chore(deadcode): fix knip scan config 2026-04-06 16:13:26 +01:00
Peter Steinberger
d7e3df5eaa perf(test): expand light lane routing 2026-04-06 16:13:21 +01:00
jjjojoj
c1c1c0f351 fix: increase padding-right to 70px to fully clear two action buttons 2026-04-06 23:11:13 +08:00
jjjojoj
c52d896ef0 fix: remove accidental log file and add has-copy class to chat bubbles
- Remove mistakenly committed openclaw-2026-04-03.log
- Add 'has-copy' CSS class to chat bubbles when copy button is present,
  so the .chat-bubble.has-copy padding-right rule actually applies
2026-04-06 23:11:13 +08:00
jjjojoj
a55d45de3c fix: prevent Canvas/Copy icons from overlapping chat bubble text
Increase right padding on .chat-bubble.has-copy from 36px to 62px to
accommodate both copy and canvas action buttons without obscuring text.

Fixes #61514
2026-04-06 23:11:13 +08:00
Peter Steinberger
16d0f0567e fix: preserve legacy replay phase boundaries (#61529) (thanks @100yenadmin) 2026-04-06 23:09:29 +08:00
Eva
a200a746fc fix(agents): correct phase-buffering test expectation for mid-stream deltas 2026-04-06 23:09:29 +08:00
Eva
a58726e1ed fix(agents): inherit message-level phase for untagged blocks during replay splitting
Fixes #61476

Untagged text blocks in mixed assistant messages were forced to undefined
phase when any sibling had an explicit textSignature phase. Now they
correctly inherit the message-level assistantMessagePhase, preventing
commentary leaks during history replay.

Removes the hasExplicitBlockPhase scan — untagged blocks always inherit
m.phase. Blocks with explicit textSignature.phase still use their own.

94/94 tests pass. Regression test added for mixed explicit/untagged blocks.
2026-04-06 23:09:29 +08:00
Vincent Koc
f94a018191 perf(test): slim secrets runtime coverage hotspot 2026-04-06 16:08:05 +01:00
Peter Steinberger
1fb44f0aad fix: separate selected session model resolution 2026-04-06 16:07:50 +01:00
jjjojoj
0f8480ca0b fix: add max-height, flex layout, and scrollable command preview for mobile approval card 2026-04-06 23:06:09 +08:00
jjjojoj
77f9f6112e fix: add bottom safe-area-inset for mobile approval overlay 2026-04-06 23:06:09 +08:00
Vincent Koc
eef20a87d0 refactor(lint): report unused disable directives in root oxlint 2026-04-06 16:02:38 +01:00
Vincent Koc
9c3d9c5c18 chore(lint): drop stale repo lint comments 2026-04-06 16:01:23 +01:00
Peter Steinberger
7f336aba56 fix(discord): normalize gateway fatal type errors 2026-04-06 15:59:56 +01:00
Vincent Koc
c7a562683a chore(agents): drop stale lint comments 2026-04-06 15:59:22 +01:00
Vincent Koc
cb770057b0 chore(lint): drop stale config and gateway lint comments 2026-04-06 15:57:32 +01:00
Vincent Koc
2537ae503d chore(plugins): drop stale core channel lint comments 2026-04-06 15:56:41 +01:00
Peter Steinberger
378b2c2f5c fix(check): absorb latest main lint drift 2026-04-06 15:56:02 +01:00
Peter Steinberger
d12029a15a fix(check): repair plugin runtime type drift batch 2026-04-06 15:54:12 +01:00
Vincent Koc
8fe7b3730f fix(check): restore gateway status tls mock typing 2026-04-06 15:53:16 +01:00
Lewis
1234c873bc fix(msteams): add SSRF validation to file consent upload URL (#23596)
* fix(msteams): add SSRF validation to file consent upload URL

The uploadToConsentUrl() function previously accepted any URL from the
fileConsent/invoke response without validation. A malicious Teams tenant
user could craft an invoke activity with an attacker-controlled uploadUrl,
causing the bot to PUT file data to arbitrary destinations (SSRF).

This commit adds validateConsentUploadUrl() which enforces:

1. HTTPS-only protocol
2. Hostname must match a strict allowlist of Microsoft/SharePoint
   domains (sharepoint.com, graph.microsoft.com, onedrive.com, etc.)
3. DNS resolution check rejects private/reserved IPs (RFC 1918,
   loopback, link-local) to prevent DNS rebinding attacks

The CONSENT_UPLOAD_HOST_ALLOWLIST is intentionally narrower than the
existing DEFAULT_MEDIA_HOST_ALLOWLIST, excluding overly broad domains
like blob.core.windows.net and trafficmanager.net that any Azure
customer can create endpoints under.

Includes 47 tests covering IPv4/IPv6 private IP detection, protocol
enforcement, hostname allowlist matching, DNS failure handling, and
end-to-end upload validation.

* fix(msteams): validate all DNS answers for consent uploads

* fix(msteams): restore changelog header

---------

Co-authored-by: Brad Groux <bradgroux@users.noreply.github.com>
2026-04-06 09:52:56 -05:00
Vincent Koc
c921a6ecad refactor(lint): report unused extension lint disables 2026-04-06 15:52:08 +01:00
Peter Steinberger
a010ce462f perf(test): split light vitest lanes and restore hooks 2026-04-06 15:51:00 +01:00
Vincent Koc
5765c4cb2a fix(check): repair latest command and stream type drift 2026-04-06 15:46:53 +01:00
Vincent Koc
4d405ac5ae chore(plugins): drop final dead test any suppressions 2026-04-06 15:46:31 +01:00
jjjojoj
b35b176837 fix: recognize api.grok.x.ai as xAI-native endpoint
Fixes #61377

The provider attribution code only recognized api.x.ai as the xAI-native
endpoint. Some users have api.grok.x.ai configured (or it appears in
certain DNS/config scenarios) which would not resolve as xAI-native,
causing web_search tool failures.

This change adds api.grok.x.ai as an alias for xAI-native endpoint
classification alongside api.x.ai.
2026-04-06 15:45:34 +01:00
Vincent Koc
6067f2d9ad chore(plugins): drop dead channel test any suppressions 2026-04-06 15:45:18 +01:00
Peter Steinberger
baf4119ae3 fix: harden local TLS gateway probes (#61935) (thanks @ThanhNguyxn07) 2026-04-06 15:44:30 +01:00
ThanhNguyxn07
b77964f704 fix(gateway-status): use local TLS probe targets with fingerprint
When gateway.tls.enabled is true, gateway status probes now target local loopback/tailnet over wss and pass the local TLS fingerprint for localLoopback probes. This avoids false unreachable results for healthy local TLS gateways.

Fixes #61767

Co-authored-by: ThanhNguyxn <thanhnguyentuan2007@gmail.com>
2026-04-06 15:44:30 +01:00
Vincent Koc
3ded10f52a chore(plugins): drop dead test any suppressions 2026-04-06 15:43:48 +01:00
Peter Steinberger
5a54005b4d fix(plugins): restore green runtime gates 2026-04-06 15:42:51 +01:00
Nimrod Gutman
6f566585d8 fix(ios): harden watch exec approval review (#61757)
* fix(ios): harden watch exec approval review

* fix(ios): address watch approval review feedback

* fix(ios): finalize watch approval background recovery

* fix(ios): finalize watch approval background recovery (#61757) (thanks @ngutman)
2026-04-06 17:42:42 +03:00
openperf
e777a2b230 fix(process ): migrate legacy command-queue singleton missing activeTaskWaiters
After a SIGUSR1 in-process restart following an npm upgrade from v2026.4.2
to v2026.4.5, the globalThis singleton created by the old code version
lacks the activeTaskWaiters field added in v2026.4.5.  resolveGlobalSingleton
returns the stale object as-is, causing notifyActiveTaskWaiters() to call
Array.from(undefined) and crash the gateway in a loop.

Add a schema migration step in getQueueState() that patches the missing
field on legacy singleton objects.  Add a regression test that plants a
v2026.4.2-shaped state object and verifies resetAllLanes() and
waitForActiveTasks() succeed without throwing.

Fixes #61905
2026-04-06 15:41:14 +01:00
Vincent Koc
a36bb119be test(secrets): reduce serial vitest drag 2026-04-06 15:40:35 +01:00
Vincent Koc
2815e8ecc0 chore(telegram): drop dead bot helper lint comments 2026-04-06 15:40:13 +01:00
4562 changed files with 161275 additions and 90773 deletions

View File

@@ -16,6 +16,7 @@ Use this skill for Parallels guest workflows and smoke interpretation. Do not lo
- Pass `--json` for machine-readable summaries.
- Per-phase logs land under `/tmp/openclaw-parallels-*`.
- Do not run local and gateway agent turns in parallel on the same fresh workspace or session.
- Do not run multiple smoke lanes against the same guest family at once. Tahoe lanes share the host HTTP port, and Windows/Linux lanes can collide on snapshot restore/start state if two jobs touch the same VM concurrently.
- If `main` is moving under active multi-agent work, prefer a detached worktree pinned to one commit for long Parallels suites. The smoke scripts now verify the packed tgz commit instead of live `git rev-parse HEAD`, but a pinned worktree still avoids noisy rebuild/version drift during reruns.
- For `openclaw update --channel dev` lanes, remember the guest clones GitHub `main`, not your local worktree. If a local fix exists but the rerun still fails inside the cloned dev checkout, do not treat that as disproof of the fix until the branch has been pushed.
- For `prlctl exec`, pass the VM name before `--current-user` (`prlctl exec "$VM" --current-user ...`), not the other way around.
@@ -33,6 +34,8 @@ Use this skill for Parallels guest workflows and smoke interpretation. Do not lo
- The aggregate npm-update wrapper must resolve the Linux VM with the same Ubuntu fallback policy as `parallels-linux-smoke.sh` before both fresh and update lanes. Treat any Ubuntu guest with major version `>= 24` as acceptable when the exact default VM is missing, preferring the closest version match. On Peter's current host today, missing `Ubuntu 24.04.3 ARM64` should fall back to `Ubuntu 25.10`.
- On macOS same-guest update checks, restart the gateway after the npm upgrade before `gateway status` / `agent`; launchd can otherwise report a loaded service while the old process has exited and the fresh process is not RPC-ready yet.
- On Windows same-guest update checks, restart the gateway after the npm upgrade before `gateway status` / `agent`; in-place global npm updates can otherwise leave stale hashed `dist/*` module imports alive in the running service.
- In those Windows same-guest update checks, do not treat one nonzero `openclaw gateway restart` as definitive failure. Current login-item restarts can report failure before the background service becomes observable again; follow with a longer RPC-ready wait and use `gateway start` only as a recovery step if readiness still never returns.
- After that Windows restart, do not trust one `gateway status --deep --require-rpc` call after a fixed sleep. Retry the RPC-ready probe for roughly 30 seconds and log each attempt; current guests can keep port `18789` bound while the fresh RPC endpoint is still coming up.
- For Windows same-guest update checks, prefer the done-file/log-drain PowerShell runner pattern over one long-lived `prlctl exec ... powershell -EncodedCommand ...` transport. The guest can finish successfully while the outer `prlctl exec` still hangs.
- The Windows same-guest update helper should write stage markers to its log before long steps like tgz download and `npm install -g` so the outer progress monitor does not sit on `waiting for first log line` during healthy but quiet installs.
- Linux same-guest update verification should also export `HOME=/root`, pass `OPENAI_API_KEY` via `prlctl exec ... /usr/bin/env`, and use `openclaw agent --local`; the fresh Linux baseline does not rely on persisted gateway credentials.
@@ -56,6 +59,8 @@ Use this skill for Parallels guest workflows and smoke interpretation. Do not lo
- On Peter's Tahoe VM, `fresh-latest-march-2026` can hang in `prlctl snapshot-switch`; if restore times out there, rerun with `--snapshot-hint 'macOS 26.3.1 latest'` before blaming auth or the harness.
- `parallels-macos-smoke.sh` now retries `snapshot-switch` once after force-stopping a stuck running/suspended guest. If Tahoe still times out after that recovery path, then treat it as a real Parallels/host issue and rerun manually.
- The macOS smoke should include a dashboard load phase after gateway health: resolve the tokenized URL with `openclaw dashboard --no-open`, verify the served HTML contains the Control UI title/root shell, then open Safari and require an established localhost TCP connection from Safari to the gateway port.
- For Tahoe `fresh.gateway-status`, prefer non-TTY `prlctl exec --current-user ... openclaw gateway status ...` plus a few short retries. `prlctl enter` can spam TTY control bytes and hang the phase log even when the CLI itself is healthy.
- If a Tahoe lane times out in `fresh.first-agent-turn` and the phase log stops right after `__OPENCLAW_RC__:0` from `models set`, suspect the `prlctl enter` / `expect` wrapper before blaming auth or the model lane. That pattern means the first guest command finished but the transport never released for the next `guest_current_user_cli` call.
- If a packaged install regresses with `500` on `/`, `/healthz`, or `__openclaw/control-ui-config.json` after `fresh.install-main` or `upgrade.install-main`, suspect bundled plugin runtime deps resolving from the package root `node_modules` rather than `dist/extensions/*/node_modules`. Repro quickly with a real `npm pack`/global install lane before blaming dashboard auth or Safari.
- `prlctl exec` is fine for deterministic repo commands, but use the guest Terminal or `prlctl enter` when installer parity or shell-sensitive behavior matters.
- Multi-word `openclaw agent --message ...` checks should go through a guest shell wrapper (`guest_current_user_sh` / `guest_current_user_cli` or `/bin/sh -lc ...`), not raw `prlctl exec ... node openclaw.mjs ...`, or the message can be split into extra argv tokens and Commander reports `too many arguments for 'agent'`.
@@ -86,7 +91,7 @@ Use this skill for Parallels guest workflows and smoke interpretation. Do not lo
- Fresh Windows tgz install phases should also use the background PowerShell runner plus done-file/log-drain pattern; do not rely on one long-lived `prlctl exec ... powershell ... npm install -g` transport for package installs.
- Windows release-to-dev helpers should log `where pnpm` before and after the update and require `where pnpm` to succeed post-update. That proves the updater installed or enabled `pnpm` itself instead of depending on a smoke-only bootstrap.
- Fresh Windows ref-mode onboard should use the same background PowerShell runner plus done-file/log-drain pattern as the npm-update helper, including startup materialization checks, host-side timeouts on short poll `prlctl exec` calls, and retry-on-poll-failure behavior for transient transport flakes.
- Fresh Windows daemon-health reachability should use a hello-only gateway probe and a longer per-probe timeout than the default local attach path; full health RPCs are too eager during initial startup on current main.
- Fresh Windows daemon-health reachability should use `openclaw gateway probe --json` with a longer timeout and treat `ok: true` as success; full `gateway status --require-rpc` checks are too eager during initial startup on current main.
- Fresh Windows ref-mode agent verification should set `OPENAI_API_KEY` in the PowerShell environment before invoking `openclaw.cmd agent`, for the same pairing-required fallback reason as macOS.
- The standalone Windows upgrade smoke lane should stop the managed gateway after `upgrade.install-main` and before `upgrade.onboard-ref`. Restarting before onboard can leave the old process alive on the pre-onboard token while onboard rewrites `~/.openclaw/openclaw.json`, which then fails `gateway-health` with `unauthorized: gateway token mismatch`.
- If standalone Windows upgrade fails with a gateway token mismatch but `pnpm test:parallels:npm-update` passes, trust the mismatch as a standalone ref-onboard ordering bug first; the npm-update helper does not re-run ref-mode onboard on the same guest.

View File

@@ -15,6 +15,7 @@ Use this skill for `qa-lab` / `qa-channel` work. Repo-local QA only.
- `qa/QA_KICKOFF_TASK.md`
- `qa/seed-scenarios.json`
- `extensions/qa-lab/src/suite.ts`
- `extensions/qa-lab/src/character-eval.ts`
## Model policy
@@ -39,7 +40,6 @@ pnpm openclaw qa suite \
--provider-mode live-openai \
--model openai/gpt-5.4 \
--alt-model openai/gpt-5.4 \
--fast \
--output-dir .artifacts/qa-e2e/run-all-live-openai-<tag>
```
@@ -49,6 +49,71 @@ pnpm openclaw qa suite \
5. If the user wants to watch the live UI, find the current `openclaw-qa` listen port and report `http://127.0.0.1:<port>`.
6. If a scenario fails, fix the product or harness root cause, then rerun the full lane.
## Character evals
Use `qa character-eval` for style/persona/vibe checks across multiple live models.
```bash
pnpm openclaw qa character-eval \
--model openai/gpt-5.4,thinking=xhigh \
--model openai/gpt-5.2,thinking=xhigh \
--model anthropic/claude-opus-4-6,thinking=high \
--model anthropic/claude-sonnet-4-6,thinking=high \
--model minimax/MiniMax-M2.7,thinking=high \
--model zai/glm-5.1,thinking=high \
--model moonshot/kimi-k2.5,thinking=high \
--model qwen/qwen3.6-plus,thinking=high \
--model xiaomi/mimo-v2-pro,thinking=high \
--model google/gemini-3.1-pro-preview,thinking=high \
--model codex-cli/<codex-model>,thinking=high \
--judge-model openai/gpt-5.4,thinking=xhigh,fast \
--judge-model anthropic/claude-opus-4-6,thinking=high \
--concurrency 8 \
--judge-concurrency 8 \
--output-dir .artifacts/qa-e2e/character-eval-<tag>
```
- Runs local QA gateway child processes, not Docker.
- Preferred model spec syntax is `provider/model,thinking=<level>[,fast|,no-fast|,fast=<bool>]` for both `--model` and `--judge-model`.
- Do not add new examples with separate `--model-thinking`; keep that flag as legacy compatibility only.
- Defaults to candidate models `openai/gpt-5.4`, `openai/gpt-5.2`, `anthropic/claude-opus-4-6`, `anthropic/claude-sonnet-4-6`, `minimax/MiniMax-M2.7`, `zai/glm-5.1`, `moonshot/kimi-k2.5`, `qwen/qwen3.6-plus`, `xiaomi/mimo-v2-pro`, and `google/gemini-3.1-pro-preview` when no `--model` is passed.
- Candidate thinking defaults to `high`, with `xhigh` for OpenAI models that support it. Prefer inline `--model provider/model,thinking=<level>`; `--thinking <level>` and `--model-thinking <provider/model=level>` remain compatibility shims.
- OpenAI candidate refs default to fast mode so priority processing is used where supported. Use inline `,fast`, `,no-fast`, or `,fast=false` for one model; use `--fast` only to force fast mode for every candidate.
- Judges default to `openai/gpt-5.4,thinking=xhigh,fast` and `anthropic/claude-opus-4-6,thinking=high`.
- Report includes judge ranking, run stats, durations, and full transcripts; do not include raw judge replies. Duration is benchmark context, not a grading signal.
- Candidate and judge concurrency default to 8. Use `--concurrency <n>` and `--judge-concurrency <n>` to override when local gateways or provider limits need a gentler lane.
- Scenario source should stay markdown-driven under `qa/scenarios/`.
- For isolated character/persona evals, write the persona into `SOUL.md` and blank `IDENTITY.md` in the scenario flow. Use `SOUL.md + IDENTITY.md` only when intentionally testing how the normal OpenClaw identity combines with the character.
- Keep prompts natural and task-shaped. The candidate model should receive character setup through `SOUL.md`, then normal user turns such as chat, workspace help, and small file tasks; do not ask "how would you react?" or tell the model it is in an eval.
- Prefer at least one real task, such as creating or editing a tiny workspace artifact, so the transcript captures character under normal tool use instead of pure roleplay.
## Codex CLI model lane
Use model refs shaped like `codex-cli/<codex-model>` whenever QA should exercise Codex as a model backend.
Examples:
```bash
pnpm openclaw qa suite \
--provider-mode live-frontier \
--model codex-cli/<codex-model> \
--alt-model codex-cli/<codex-model> \
--scenario <scenario-id> \
--output-dir .artifacts/qa-e2e/codex-<tag>
```
```bash
pnpm openclaw qa manual \
--model codex-cli/<codex-model> \
--message "Reply exactly: CODEX_OK"
```
- Treat the concrete Codex model name as user/config input; do not hardcode it in source, docs examples, or scenarios.
- Live QA preserves `CODEX_HOME` so Codex CLI auth/config works while keeping `HOME` and `OPENCLAW_HOME` sandboxed.
- Mock QA should scrub `CODEX_HOME`.
- If Codex returns fallback/auth text every turn, first check `CODEX_HOME`, `~/.profile`, and gateway child logs before changing scenario assertions.
- For model comparison, include `codex-cli/<codex-model>` as another candidate in `qa character-eval`; the report should label it as an opaque model name.
## Repo facts
- Seed scenarios live in `qa/`.

4
.github/labeler.yml vendored
View File

@@ -257,6 +257,10 @@
- changed-files:
- any-glob-to-any-file:
- "extensions/acpx/**"
"extensions: arcee":
- changed-files:
- any-glob-to-any-file:
- "extensions/arcee/**"
"extensions: byteplus":
- changed-files:
- any-glob-to-any-file:

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@@ -450,6 +450,7 @@ jobs:
- name: Run ${{ matrix.task }} (${{ matrix.runtime }})
env:
OPENCLAW_TEST_PROJECTS_PARALLEL: 3
TASK: ${{ matrix.task }}
shell: bash
run: |
@@ -548,6 +549,10 @@ jobs:
TASK: ${{ matrix.task }}
run: |
echo "OPENCLAW_VITEST_MAX_WORKERS=2" >> "$GITHUB_ENV"
if [ "$TASK" = "test" ]; then
echo "OPENCLAW_TEST_PROJECTS_LEAF_SHARDS=1" >> "$GITHUB_ENV"
echo "OPENCLAW_TEST_SKIP_FULL_EXTENSIONS_SHARD=1" >> "$GITHUB_ENV"
fi
if [ "$TASK" = "channels" ]; then
echo "OPENCLAW_VITEST_MAX_WORKERS=1" >> "$GITHUB_ENV"
fi
@@ -753,6 +758,11 @@ jobs:
continue-on-error: true
run: pnpm run lint:extensions:bundled
- name: Run extension package boundary TypeScript check
id: extension_package_boundary_tsc
continue-on-error: true
run: pnpm run test:extensions:package-boundary
- name: Enforce safe external URL opening policy
id: no_raw_window_open
continue-on-error: true
@@ -797,6 +807,7 @@ jobs:
EXTENSION_RELATIVE_OUTSIDE_PACKAGE_BOUNDARY_OUTCOME: ${{ steps.extension_relative_outside_package_boundary.outcome }}
EXTENSION_CHANNEL_LINT_OUTCOME: ${{ steps.extension_channel_lint.outcome }}
EXTENSION_BUNDLED_LINT_OUTCOME: ${{ steps.extension_bundled_lint.outcome }}
EXTENSION_PACKAGE_BOUNDARY_TSC_OUTCOME: ${{ steps.extension_package_boundary_tsc.outcome }}
NO_RAW_WINDOW_OPEN_OUTCOME: ${{ steps.no_raw_window_open.outcome }}
CONTROL_UI_I18N_OUTCOME: ${{ steps.control_ui_i18n.outcome == 'skipped' && 'success' || steps.control_ui_i18n.outcome }}
GATEWAY_WATCH_REGRESSION_OUTCOME: ${{ steps.gateway_watch_regression.outcome }}
@@ -820,6 +831,7 @@ jobs:
"extension-relative-outside-package-boundary|$EXTENSION_RELATIVE_OUTSIDE_PACKAGE_BOUNDARY_OUTCOME" \
"lint:extensions:channels|$EXTENSION_CHANNEL_LINT_OUTCOME" \
"lint:extensions:bundled|$EXTENSION_BUNDLED_LINT_OUTCOME" \
"test:extensions:package-boundary|$EXTENSION_PACKAGE_BOUNDARY_TSC_OUTCOME" \
"lint:ui:no-raw-window-open|$NO_RAW_WINDOW_OPEN_OUTCOME" \
"ui:i18n:check|$CONTROL_UI_I18N_OUTCOME" \
"gateway-watch-regression|$GATEWAY_WATCH_REGRESSION_OUTCOME"; do
@@ -935,6 +947,7 @@ jobs:
NODE_OPTIONS: --max-old-space-size=6144
# Keep total concurrency predictable on the 32 vCPU runner.
OPENCLAW_VITEST_MAX_WORKERS: 1
OPENCLAW_TEST_SKIP_FULL_EXTENSIONS_SHARD: 1
defaults:
run:
shell: bash

View File

@@ -6,35 +6,152 @@ Docs: https://docs.openclaw.ai
### Changes
- Plugins/webhooks: add a bundled webhook ingress plugin so external automation can create and drive bound TaskFlows through per-route shared-secret endpoints. (#61892) Thanks @mbelinky.
- Tools/media: document per-provider music and video generation capabilities, and add shared live video-to-video sweep coverage for providers that support local reference clips.
- iOS: pin release versioning to an explicit CalVer in `apps/ios/version.json`, keep TestFlight iteration on the same short version until maintainers intentionally promote the next gateway version, and add the documented `pnpm ios:version:pin -- --from-gateway` workflow for release trains. (#63001) Thanks @ngutman.
- Plugins/provider-auth: let provider manifests declare `providerAuthAliases` so provider variants can share env vars, auth profiles, config-backed auth, and API-key onboarding choices without core-specific wiring.
- Memory/dreaming: add a grounded REM backfill lane with historical `rem-harness --path`, diary commit, and reset flows so old daily notes can be replayed safely into `DREAMS.md`. Thanks @mbelinky.
- Memory/dreaming: harden grounded diary extraction so `What Happened`, `Reflections`, and durable candidates suppress operational noise and preserve more atomic lasting facts. Thanks @mbelinky.
- Control UI/dreaming: add a structured diary view with timeline navigation, backfill/reset controls, and traceable dreaming summaries. Thanks @mbelinky.
### Fixes
- Providers/Google: recognize Gemma model ids in native Google forward-compat resolution, keep the requested provider when cloning fallback templates, and force Gemma reasoning off so Gemma 4 routes stop failing through the Google catalog fallback. (#61507) Thanks @eyjohn.
- Providers/Anthropic: skip `service_tier` injection for OAuth-authenticated stream wrapper requests so Claude OAuth requests stop failing with HTTP 401. (#60356) thanks @openperf.
- Agents/exec: preserve explicit `host=node` routing under elevated defaults when `tools.exec.host=auto`, and fail loud on invalid elevated cross-host overrides. (#61739) Thanks @obviyus.
- Agents/history: suppress commentary-only visible-text leaks in streaming and chat history views, and keep sanitized SSE history sequence numbers monotonic after transcript-only refreshes. (#61829) Thanks @100yenadmin.
- Plugins/Windows: load plugin entrypoints through `file://` import specifiers on Windows without breaking plugin SDK alias resolution, fixing `ERR_UNSUPPORTED_ESM_URL_SCHEME` for absolute plugin paths. (#61832) Thanks @Zeesejo.
- Discord/forwarding: recover forwarded referenced message text and attachments when Discord omits snapshot payloads, so forwarded-message relays keep the original content. (#61670) Thanks @artwalker.
- Plugins/install: preserve plugin-schema defaults during fresh-install raw config validation so bundled plugin installs stop failing when required fields rely on schema defaults. (#61856) Thanks @SuperMarioYL.
- Slack/threading: keep legacy thread stickiness for real replies when older callers omit `isThreadReply`, while still honoring `replyToMode` for Slack's auto-created top-level `thread_ts`. (#61835) Thanks @kaonash.
- Agents/message tool: add a `read` plus `threadId` discoverability hint when the configured channel actions support threaded message reads.
- Docs/i18n: remove the zh-CN homepage redirect override so Mintlify can resolve the localized Chinese homepage without self-redirecting `/zh-CN/index`.
- Agents/heartbeat: stop truncating live session transcripts after no-op heartbeat acks, move heartbeat cleanup to prompt assembly and compaction, and keep post-filter context-engine ingestion aligned with the real session baseline. (#60998) Thanks @nxmxbbd.
- Control UI: guard stale session-history reloads during fast session switches so the selected session and rendered transcript stay in sync. (#62975) Thanks @scoootscooob.
- Slack/media: preserve bearer auth across same-origin `files.slack.com` redirects while still stripping it on cross-origin Slack CDN hops, so `url_private_download` image attachments load again. (#62960) Thanks @vincentkoc.
- Gateway/node exec events: mark remote node `exec.started`, `exec.finished`, and `exec.denied` summaries as untrusted system events and sanitize node-provided command/output/reason text before enqueueing them, so remote node output cannot inject trusted `System:` content into later turns. (#62659) Thanks @eleqtrizit.
- Agents/timeouts: make the LLM idle timeout inherit `agents.defaults.timeoutSeconds` when configured, disable the unconfigured idle watchdog for cron runs, and point idle-timeout errors at `agents.defaults.llm.idleTimeoutSeconds`. Thanks @drvoss.
- Security/dotenv: expand workspace `.env` filtering to block runtime-control variables like gateway routing, ClawHub endpoints/tokens, browser executable overrides, and skip/disable control families, so untrusted repositories cannot steer OpenClaw runtime behavior through repo-local dotenv files. (#62660) Thanks @eleqtrizit.
- Agents/failover: classify Z.ai vendor code `1311` as billing and `1113` as auth, including long wrapped `1311` payloads, so these errors stop falling through to generic failover handling. (#49552) Thanks @1bcMax.
- Browser/security: block browser-control module override and skip-server env vars from untrusted workspace `.env` files, and reject unsafe URL-style browser control override specifiers before lazy loading, so repo-local dotenv state cannot steer browser control module loading. (#62663) Thanks @eleqtrizit.
- QQBot/media-tags: support HTML entity-encoded angle brackets (`&lt;`/`&gt;`) in media-tag regexes so entity-escaped `<qqimg>` tags from upstream are correctly parsed and normalized. (#60493) Thanks @ylc0919.
- npm packaging: mirror bundled Slack, Telegram, Discord, and Feishu channel runtime deps at the root and harden published-install verification so fresh installs fail fast on manifest drift instead of missing-module crashes. (#63065) Thanks @scoootscooob.
- npm packaging: derive required root runtime mirrors from bundled plugin manifests and built root chunks, then install packed release tarballs without the repo `node_modules` so release checks catch missing plugin deps before publish.
- Reply/doctor: resolve reply-run SecretRefs before preflight helpers touch config, surface gateway OAuth reauth failures to users, and make `openclaw doctor` call out exact reauth commands.
- Android/pairing: clear stale setup-code auth on new QR scans, bootstrap operator and node sessions from fresh pairing, prefer stored device tokens after bootstrap handoff, and pause pairing auto-retry while the app is backgrounded so scan-once Android pairing recovers reliably again. (#63199) Thanks @obviyus.
- Auto-reply/NO_REPLY: strip glued leading `NO_REPLY` tokens before reply normalization and ACP-visible streaming so silent sentinel text no longer leaks into user-visible replies while preserving substantive `NO_REPLY ...` text. Thanks @frankekn.
- Gateway/sessions: clear auto-fallback-pinned model overrides on `/reset` and `/new` while still preserving explicit user model selections, including legacy sessions created before override-source tracking existed. (#63155) Thanks @frankekn.
- Codex CLI: pass OpenClaw's system prompt through Codex's `model_instructions_file` config override so fresh Codex CLI sessions receive the same prompt guidance as Claude CLI sessions.
- Matrix/gateway: wait for Matrix sync readiness before marking startup successful, keep Matrix background handler failures contained, and route fatal Matrix sync stops through channel-level restart handling instead of crashing the whole gateway. (#62779) Thanks @gumadeiras.
- Browser/security: re-run blocked-destination safety checks after interaction-driven main-frame navigations from click, evaluate, hook-triggered click, and batched action flows, so browser interactions cannot bypass the SSRF quarantine when they land on forbidden URLs. (#63226) Thanks @eleqtrizit.
## 2026.4.8
### Fixes
- Telegram/setup: load setup and secret contracts through packaged top-level sidecars so installed npm builds no longer try to import missing `dist/extensions/telegram/src/*` files during gateway startup.
- Bundled channels/setup: load shared secret contracts through packaged top-level sidecars across BlueBubbles, Feishu, Google Chat, IRC, Matrix, Mattermost, Microsoft Teams, Nextcloud Talk, Slack, and Zalo so installed npm builds no longer rely on missing `dist/extensions/*/src/*` files during gateway startup.
- Bundled plugins: align packaged plugin compatibility metadata with the release version so bundled channels and providers load on OpenClaw 2026.4.8.
- Agents/progress: keep `update_plan` available for OpenAI-family runs while returning compact success payloads and allowing `tools.experimental.planTool=false` to opt out.
- Agents/exec: keep `/exec` current-default reporting aligned with real runtime behavior so `host=auto` sessions surface the correct host-aware fallback policy (`full/off` on gateway or node, `deny/off` on sandbox) instead of stale stricter defaults.
- Slack: honor ambient HTTP(S) proxy settings for Socket Mode WebSocket connections, including NO_PROXY exclusions, so proxy-only deployments can connect without a monkey patch. (#62878) Thanks @mjamiv.
- Slack/actions: pass the already resolved read token into `downloadFile` so SecretRef-backed bot tokens no longer fail after a raw config re-read. (#62097) Thanks @martingarramon.
- Network/fetch guard: skip target DNS pinning when trusted env-proxy mode is active so proxy-only sandboxes can let the trusted proxy resolve outbound hosts. (#59007) Thanks @cluster2600.
## 2026.4.7-1
## 2026.4.7
### Changes
- CLI/infer: add a first-class `openclaw infer ...` hub for provider-backed inference workflows across model, media, web, and embedding tasks. Thanks @Takhoffman.
- Tools/media generation: auto-fallback across auth-backed image, music, and video providers by default, preserve intent during provider switches, remap size/aspect/resolution/duration hints to the closest supported option, and surface provider capabilities plus mode-aware video-to-video support.
- Memory/wiki: restore the bundled `memory-wiki` stack with plugin, CLI, sync/query/apply tooling, memory-host integration, structured claim/evidence fields, compiled digest retrieval, claim-health linting, contradiction clustering, staleness dashboards, and freshness-weighted search. Thanks @vincentkoc.
- Plugins/webhooks: add a bundled webhook ingress plugin so external automation can create and drive bound TaskFlows through per-route shared-secret endpoints. (#61892) Thanks @mbelinky.
- Gateway/sessions: add persisted compaction checkpoints plus Sessions UI branch/restore actions so operators can inspect and recover pre-compaction session state. (#62146) Thanks @scoootscooob.
- Compaction: add pluggable compaction provider registry so plugins can replace the built-in summarization pipeline. Configure via `agents.defaults.compaction.provider`; falls back to LLM summarization on provider failure. (#56224) Thanks @DhruvBhatia0.
- Agents/system prompt: add `agents.defaults.systemPromptOverride` for controlled prompt experiments plus heartbeat prompt-section controls so heartbeat runtime behavior can stay enabled without injecting heartbeat instructions every turn.
- Providers/Google: add Gemma 4 model support and keep Google fallback resolution on the requested provider path so native Google Gemma routes work again. (#61507) Thanks @eyjohn.
- Providers/Google: preserve explicit thinking-off semantics for Gemma 4 while still enabling Gemma reasoning support in compatibility wrappers. (#62127) Thanks @romgenie.
- Providers/Arcee AI: add a bundled Arcee AI provider plugin with Trinity catalog entries, OpenRouter support, and updated onboarding/auth guidance. (#62068) Thanks @arthurbr11.
- Providers/Anthropic: restore Claude CLI as the preferred local Anthropic path in onboarding, model-auth guidance, doctor flows, and Docker Claude CLI live lanes again.
- Providers/Ollama: detect vision capability from the `/api/show` response and set image input on models that support it so Ollama vision models accept image attachments. (#62193) Thanks @BruceMacD.
- Memory/dreaming: ingest redacted session transcripts into the dreaming corpus with per-day session-corpus notes, cursor checkpointing, and promotion/doctor support. (#62227) Thanks @vignesh07.
- Providers/inferrs: add string-content compatibility for stricter OpenAI-compatible chat backends, document `inferrs` setup with a full config example, and add troubleshooting guidance for local backends that pass direct probes but fail on full agent-runtime prompts.
- Agents/context engine: expose prompt-cache runtime context to context engines and keep current-turn prompt-cache usage aligned with the active attempt instead of stale prior-turn assistant state. (#62179) Thanks @jalehman.
- Plugin SDK/context engines: pass `availableTools` and `citationsMode` into `assemble()`, and expose memory-artifact and memory-prompt seams so companion plugins and non-legacy context engines can consume active memory state without reaching into internals. Thanks @vincentkoc.
- ACP/ACPX plugin: bump the bundled `acpx` pin to `0.5.1` so plugin-local installs and strict version checks pick up the latest published runtime release. (#62148) Thanks @onutc.
- Discord/events: allow `event-create` to accept a cover image URL or local file path, load and validate PNG/JPG/GIF event cover media, and pass the encoded image payload through Discord admin action/runtime paths. (#60883) Thanks @bittoby.
- Plugins/provider-auth: expose runtime-ready provider auth through `openclaw/plugin-sdk/provider-auth-runtime` so native plugins and context engines can resolve request-ready credentials after provider-owned runtime exchanges like GitHub Copilot device-token-to-bearer flows. (#62753) Thanks @jalehman.
### Fixes
- CLI/infer: keep provider-backed infer behavior aligned with actual runtime execution by fixing explicit TTS override handling, profile-aware gateway TTS prefs resolution, per-request transcription `prompt`/`language` overrides, image output MIME/extension mismatches, configured web-search fallback behavior, and agent-vs-CLI web-search execution drift.
- Plugins/media: when `plugins.allow` is set, capability fallback now merges bundled capability plugin ids into the allowlist (not only `plugins.entries`), so media understanding providers such as OpenAI-compatible STT load for voice transcription without requiring `openai` in `plugins.allow`. (#62205) Thanks @neeravmakwana.
- Agents/history and replies: buffer phaseless OpenAI WS text until a real assistant phase arrives, keep replay and SSE history sequence tracking aligned, hide commentary and leaked tool XML from user-visible history, and keep history-based follow-up replies on `final_answer` text only. (#61729, #61747, #61829, #61855, #61954) Thanks @100yenadmin and contributors.
- Control UI: show `/tts` audio replies in webchat, detect mistaken `?token=` auth links with the correct `#token=` hint, and keep Copy, Canvas, and mobile exec-approval UI from covering chat content on narrow screens. (#54842, #61514, #61598) Thanks @neeravmakwana.
- iOS/gateway: replace string-matched connection error UI with structured gateway connection problems, preserve actionable pairing/auth failures over later generic disconnect noise, and surface reusable problem banners and details across onboarding, settings, and root status surfaces. (#62650) Thanks @ngutman.
- TUI: route `/status` through the shared session-status command, keep commentary hidden in history, strip raw envelope metadata from async command notices, preserve fallback streaming before per-attempt failures finalize, and restore Kitty keyboard state on exit or fatal crashes. (#49130, #59985, #60043, #61463) Thanks @biefan and contributors.
- iOS/Watch exec approvals: keep Apple Watch review and approval recovery working while the iPhone is locked or backgrounded, including reconnect recovery, pending approval persistence, notification cleanup, and APNs-backed watch refresh recovery. (#61757) Thanks @ngutman.
- Agents/context overflow: combine oversized and aggregate tool-result recovery in one pass and restore a total-context overflow backstop so recoverable sessions retry instead of failing early. (#61651) Thanks @Takhoffman.
- Agents/OpenAI: default missing reasoning effort to `high` on OpenAI Responses, WebSocket, and compatible completions transports, while still honoring explicit per-run reasoning levels.
- Auth/OpenAI Codex OAuth: reload fresh on-disk credentials inside the locked refresh path and retry once after `refresh_token_reused` rotates only the stored refresh token, so relogin/restart recovery stops getting stuck on stale cached auth state. Thanks @owen-ever.
- Auth/OpenAI Codex OAuth: keep native `/model ...@profile` selections on the target session and honor explicit user-locked auth profiles even when per-agent auth order excludes them. (#62744) Thanks @jalehman.
- Providers/Anthropic: preserve thinking blocks for Claude Opus 4.5+, Sonnet 4.5+, and newer Claude 4-family models so prompt-cache prefixes keep matching, and skip `service_tier` injection on OAuth-authenticated stream wrapper requests so Claude OAuth streaming stops failing with HTTP 401. (#60356, #61793)
- Agents/Claude CLI: surface nested API error messages from structured CLI output so billing/auth/provider failures show the real provider error instead of an opaque CLI failure.
- Agents/exec: preserve explicit `host=node` routing under elevated defaults when `tools.exec.host=auto`, fail loud on invalid elevated cross-host overrides, and keep `strictInlineEval` commands blocked after approval timeouts instead of falling through to automatic execution. (#61739) Thanks @obviyus.
- Nodes/exec approvals: keep `host=node` POSIX transport shell wrappers (`/bin/sh -lc ...`) aligned with inner-command allowlist analysis so allowlisted scripts stop prompting unnecessarily, while Windows `cmd.exe` wrapper runs stay approval-gated. (#62401) Thanks @ngutman.
- Nodes/exec approvals: keep Windows `cmd.exe /c` wrapper runs approval-gated even when `env` carriers, including env-assignment carriers, wrap the shell invocation. (#62439) Thanks @ngutman.
- Gateway tool/exec config: block model-facing `gateway config.apply` and `config.patch` writes from changing exec approval paths such as `safeBins`, `safeBinProfiles`, `safeBinTrustedDirs`, and `strictInlineEval`, while still allowing unchanged structured values through. (#62001) Thanks @eleqtrizit.
- Host exec/env sanitization: block dangerous Java, Rust, Cargo, Git, Kubernetes, cloud credential, config-path, and Helm env overrides so host-run tools cannot be redirected to attacker-chosen code, config, credentials, or repository state. (#59119, #62002, #62291) Thanks @eleqtrizit and contributors.
- Commands/allowlist: require owner authorization for `/allowlist add` and `/allowlist remove` before channel resolution, so non-owner but command-authorized senders can no longer persistently rewrite allowlist policy state. (#62383) Thanks @pgondhi987.
- Plugins/onboarding auth choices: prevent untrusted workspace plugins from colliding with bundled provider auth-choice ids during non-interactive onboarding, so bundled provider setup keeps operator secrets out of untrusted workspace plugin handlers unless those plugins are explicitly trusted. (#62368) Thanks @pgondhi987.
- Feishu/docx uploads: honor `tools.fs.workspaceOnly` for local `upload_file` and `upload_image` paths by forwarding workspace-constrained `localRoots` into the media loader, so docx uploads can no longer read host-local files outside the workspace when workspace-only mode is active. (#62369) Thanks @pgondhi987.
- Network/fetch guard: drop request bodies and body-describing headers on cross-origin `307` and `308` redirects by default, so attacker-controlled redirect hops cannot receive secret-bearing POST payloads from SSRF-guarded fetch flows unless a caller explicitly opts in. (#62357) Thanks @pgondhi987.
- Browser/SSRF: treat main-frame `document` redirect hops as navigations even when Playwright does not flag them as `isNavigationRequest()`, so strict private-network blocking still stops forbidden redirect pivots before the browser reaches the internal target. (#62355) Thanks @pgondhi987.
- Browser/node invoke: block persistent browser profile create, reset, and delete mutations through `browser.proxy` on both gateway-forwarded `node.invoke` and the node-host proxy path, even when no profile allowlist is configured. (#60489)
- Gateway/node pairing: require a fresh pairing request when a previously paired node reconnects with additional declared commands, and keep the live session pinned to the earlier approved command set until the upgrade is approved. (#62658) Thanks @eleqtrizit.
- Gateway/auth: invalidate existing shared-token and password WebSocket sessions when the configured secret rotates, so stale authenticated sockets cannot stay attached after token or password changes. (#62350) Thanks @pgondhi987.
- MS Teams/security: validate file-consent upload URLs against HTTPS, Microsoft/SharePoint host allowlists, and private-IP DNS checks before uploading attachments, blocking SSRF-style consent-upload abuse. (#23596)
- Media/base64 decode guards: enforce byte limits before decoding missed base64-backed Teams, Signal, QQ Bot, and image-tool payloads so oversized inbound media and data URLs no longer bypass pre-decode size checks. (#62007) Thanks @eleqtrizit.
- Runtime event trust: mark background `notifyOnExit` summaries, ACP parent-stream relays, and wake-hook payloads as untrusted system events so lower-trust runtime output no longer re-enters later turns as trusted `System:` text. (#62003)
- Auto-reply/media: allow managed generated-media `MEDIA:` paths from normal reply text again while still blocking arbitrary host-local media and document paths, so generated media keep delivering without reopening host-path injection holes.
- Gateway/status and containers: auto-bind to `0.0.0.0` inside Docker and Podman environments, and probe local TLS gateways over `wss://` with self-signed fingerprint forwarding so container startup and loopback TLS status checks work again. (#61818, #61935) Thanks @openperf and contributors.
- Gateway/OpenAI-compatible HTTP: abort in-flight `/v1/chat/completions` and `/v1/responses` turns when clients disconnect so abandoned HTTP requests stop wasting agent runtime. (#54388) Thanks @Lellansin.
- macOS/gateway version: strip trailing commit metadata from CLI version output before semver parsing so the Mac app recognizes installed gateway versions like `OpenClaw 2026.4.2 (d74a122)` again. (#61111) Thanks @oliviareid-svg.
- Memory/dreaming: strip managed Light Sleep and REM blocks before daily-note ingestion so dreaming summaries stop re-ingesting their own staged output into new candidates. (#61720) Thanks @MonkeyLeeT.
- Plugins/Windows: disable native Jiti loading for setup and doctor contract registries on Windows so onboarding and config-doctor plugin probes stop crashing with `ERR_UNSUPPORTED_ESM_URL_SCHEME`. (#61836, #61853)
- Gateway/history: seed SSE startup history and raw transcript sequence tracking from one initial transcript snapshot so first history events cannot diverge from subsequent message sequence numbering. (#61855) Thanks @100yenadmin.
- Agents/context overflow: combine oversized and aggregate tool-result recovery in one repair pass, and restore a total-context overflow backstop during tool loops so recoverable sessions retry instead of failing early. (#61651) Thanks @Takhoffman.
- Gateway/containers: auto-bind to `0.0.0.0` during container startup for Docker and Podman compatibility, while keeping host-side status and doctor checks on the hardened loopback default when `gateway.bind` is unset. (#61818) Thanks @openperf.
- TUI/status: route `/status` through the shared session-status command and move the old gateway-wide diagnostic summary to `/gateway-status` (`/gwstatus`). Thanks @vincentkoc.
- Agents/history: use one shared assistant-visible sanitizer across embedded delivery and chat-history extraction so leaked `<tool_call>` and `<tool_result>` XML blocks stay hidden from user-facing replies. (#61729) Thanks @openperf.
- Gateway/TUI: defer terminal chat finalization for per-attempt lifecycle errors so fallback retries keep streaming before the run is marked failed. (#60043) Thanks @jwchmodx.
- TUI/command messages: strip inbound envelope metadata before rendering command/system messages so async completion notices stop leaking raw wrappers into the operator terminal. (#59985) Thanks @MoerAI.
- TUI/terminal: restore Kitty keyboard protocol and `modifyOtherKeys` state on TUI exit and fatal CLI crashes so parent shells stop inheriting broken keyboard input after `openclaw tui` exits. (#49130) Thanks @biefan.
- Docs/i18n: relocalize final localized-page links after translation so generated locale pages stop keeping stale English-root links when targets appear later in the same run. (#61796) thanks @hxy91819.
- Gateway/command queue: migrate legacy global queue state after in-process SIGUSR1 restarts so pre-4.5 hot-upgrade singletons missing `activeTaskWaiters` stop crashing restart recovery. (#61933) Thanks @openperf.
- Sessions/model selection: resolve the explicitly selected session model separately from runtime fallback resolution so session status and live model switching stay aligned with the chosen model.
- Discord/ACP bindings: canonicalize DM conversation identity across inbound messages, component interactions, native commands, and current-conversation binding resolution so `--bind here` in Discord DMs keeps routing follow-up replies to the bound agent instead of falling back to the default agent.
- Discord: recover forwarded referenced message text and attachments when snapshots are missing, use `ws://` again for gateway monitor sockets, stop forcing a hardcoded temperature for Codex-backed auto-thread titles, and harden voice receive recovery so rapid speaker restarts keep their next utterance. (#41536, #61670) Thanks @artwalker and contributors.
- Slack/thread mentions: add `channels.slack.thread.requireExplicitMention` so Slack channels that already require mentions can also require explicit `@bot` mentions inside bot-participated threads. (#58276) Thanks @praktika-engineer.
- Slack/threading: keep legacy thread stickiness for real replies when older callers omit `isThreadReply`, while still honoring `replyToMode` for Slack's auto-created top-level `thread_ts`. (#61835) Thanks @kaonash.
- Slack/media: keep attachment downloads on the SSRF-guarded dispatcher path so Slack media fetching works on Node 22 without dropping pinned transport enforcement. (#62239) Thanks @openperf.
- Matrix/onboarding: add an invite auto-join setup step with explicit off warnings and strict stable-target validation so new Matrix accounts stop silently ignoring invited rooms and fresh DM-style invites unless operators opt in. (#62168) Thanks @gumadeiras.
- Matrix/formatting: preserve multi-paragraph and loose-list rendering in Element so numbered and bulleted Markdown keeps their content attached to the correct list item. (#60997) Thanks @gucasbrg.
- Telegram/doctor: keep top-level access-control fallback in place during multi-account normalization while still promoting legacy default auth into `accounts.default`, so existing named bots keep inherited allowlists without dropping the legacy default bot. (#62263) Thanks @obviyus.
- Plugins/loaders: centralize bundled `dist/**` Jiti native-load policy and keep channel, public-surface, facade, and config-metadata loader seams off native Jiti on Windows so onboarding and configure flows stop tripping `ERR_UNSUPPORTED_ESM_URL_SCHEME`. (#62286) Thanks @chen-zhang-cs-code.
- Plugins/channels: keep bundled channel artifact and secret-contract loading stable under lazy loading, preserve plugin-schema defaults during install, and fix Windows `file://` plus native-Jiti plugin loader paths so onboarding, doctor, `openclaw secret`, and bundled plugin installs work again. (#61832, #61836, #61853, #61856) Thanks @Zeesejo and contributors.
- Plugins/ClawHub: verify downloaded plugin archives against version metadata SHA-256, fail closed when archive integrity metadata is missing or malformed, and tighten fallback ZIP verification so plugin installs cannot proceed on mismatched or incomplete ClawHub package metadata. (#60517) Thanks @mappel-nv.
- Plugins/provider hooks: stop recursive provider snapshot loads from overflowing the stack during plugin initialization, while still preserving cached nested provider-hook results. (#61922, #61938, #61946, #61951)
- Docker/plugins: stop forcing bundled plugin discovery to `/app/extensions` in runtime images so packaged installs use compiled `dist/extensions` artifacts again and Node 24 containers do not boot through source-only plugin entry paths. Fixes #62044. (#62316) Thanks @gumadeiras.
- Providers/Ollama: honor the selected provider's `baseUrl` during streaming so multi-Ollama setups stop routing every stream to the first configured Ollama endpoint. (#61678)
- Providers/Ollama: stop warning that Ollama could not be reached when discovery only sees empty default local stubs, while still keeping real explicit Ollama overrides loud when the endpoint is unreachable.
- Providers/xAI: recognize `api.grok.x.ai` as an xAI-native endpoint again and keep legacy `x_search` auth resolution working so older xAI web-search configs continue to load. (#61377) Thanks @jjjojoj.
- Providers/Mistral: send `reasoning_effort` for `mistral/mistral-small-latest` (Mistral Small 4) with thinking-level mapping, and mark the catalog entry as reasoning-capable so adjustable reasoning matches Mistrals Chat Completions API. (#62162) Thanks @neeravmakwana.
- OpenAI TTS/Groq: send `wav` to Groq-compatible speech endpoints, honor explicit `responseFormat` overrides on OpenAI-compatible paths, and only mark voice-note output as voice-compatible when the actual format is `opus`. (#62233) Thanks @neeravmakwana.
- Tools/web_fetch and web_search: fix `TypeError: fetch failed` caused by undici 8.0 enabling HTTP/2 by default; pinned SSRF-guard dispatchers now explicitly set `allowH2: false` to restore HTTP/1.1 behavior and keep the custom DNS-pinning lookup compatible. (#61738, #61777) Thanks @zozo123.
- Tools/web search/Exa: show Exa Search in onboarding and configure provider pickers again by marking the bundled Exa provider as setup-visible. Thanks @vincentkoc.
- Memory/vector recall: surface explicit warnings when `sqlite-vec` is unavailable or vector writes are degraded, and strip managed Light Sleep and REM blocks before daily-note ingestion so memory indexing and dreaming stop reporting false-success or re-ingesting staged output. (#61720) Thanks @MonkeyLeeT.
- Memory/dreaming: make Dreams config reads and writes respect the selected memory slot plugin instead of always targeting `memory-core`. (#62275) Thanks @SnowSky1.
- QQ Bot/media: route gateway-side attachment and fallback downloads through guarded QQ/Tencent HTTPS fetches so QQ media handling no longer follows arbitrary remote hosts.
- Browser/remote CDP: retry the DevTools websocket once after remote browser restarts so healthy remote browser profiles do not fail availability checks during CDP warm-up. (#57397) Thanks @ThanhNguyxn07.
- UI/light mode: target both root and nested WebKit scrollbar thumbs in the light theme so page-level and container scrollbars stay visible on light backgrounds. (#61753) Thanks @chziyue.
- Agents/subagents: honor `sessions_spawn(lightContext: true)` for spawned subagent runs by preserving lightweight bootstrap context through the gateway and embedded runner instead of silently falling back to full workspace bootstrap injection. (#62264) Thanks @theSamPadilla.
- Cron: load `jobId` into `id` when the on-disk store omits `id`, matching doctor migration and fixing `unknown cron job id` for hand-edited `jobs.json`. (#62246) Thanks @neeravmakwana.
- Agents/model fallback: classify minimal HTTP 404 API errors (for example `404 status code (no body)`) as `model_not_found` so assistant failures throw into the fallback chain instead of stopping at the first fallback candidate. (#62119) Thanks @neeravmakwana.
- BlueBubbles/network: respect explicit private-network opt-out for loopback and private `serverUrl` values across account resolution, status probes, monitor startup, and attachment downloads, while keeping public-host attachment hostname pinning intact. (#59373) Thanks @jpreagan.
- Agents/heartbeat: keep heartbeat runs pinned to the main session so active subagent transcripts are not overwritten by heartbeat status messages. (#61803) Thanks @100yenadmin.
- Agents/heartbeat: respect disabled heartbeat prompt guidance so operators can suppress heartbeat prompt instructions without disabling heartbeat runtime behavior.
- Agents/compaction: stop compaction-wait aborts from re-entering prompt failover and replaying completed tool turns. (#62600) Thanks @i-dentifier.
- Approvals/runtime: move native approval lifecycle assembly into shared core bootstrap/runtime seams driven by channel capabilities and runtime contexts, and remove the legacy bundled approval fallback wiring. (#62135) Thanks @gumadeiras.
- Security/fetch-guard: stop rejecting operator-configured proxy hostnames against the target-scoped hostname allowlist in SSRF-guarded fetches, restoring proxy-based media downloads for Telegram and other channels. (#62312) Thanks @ademczuk.
- Logging: make `logging.level` and `logging.consoleLevel` honor the documented severity threshold ordering again, and keep child loggers inheriting the parent `minLevel`. (#44646) Thanks @zhumengzhu.
- Agents/sessions_send: pass `threadId` through announce delivery so cross-session notifications land in the correct Telegram forum topic instead of the group's general thread. (#62758) Thanks @jalehman.
- Daemon/systemd: keep sudo systemctl calls scoped to the invoking user when machine-scoped systemctl fails, while still avoiding machine fallback for permission-denied user bus errors. (#62337) Thanks @Aftabbs.
- Docs/i18n: relocalize final localized-page links after translation and remove the zh-CN homepage redirect override so localized Mintlify pages resolve to the correct language roots again. (#61796) Thanks @hxy91819.
- Agents/exec: keep timed-out shell-backgrounded commands on the failed path and point long-running jobs to exec background/yield sessions so process polling is only suggested for registered sessions.
- Agents/model resolution: let explicit `openai-codex/gpt-5.4` selection prefer provider runtime metadata when it reports a larger context window, keeping configured Codex runs aligned with the live provider limits. (#62694) Thanks @ruclaw7.
- Agents/model resolution: keep explicit-model runtime comparisons on the configured workspace plugin registry, so workspace-installed providers do not silently fall back to stale explicit metadata during runtime model lookup.
- Providers/Z.AI: default onboarding and endpoint detection to GLM-5.1 instead of GLM-5. (#61998) Thanks @serg0x.
- Reply execution: prefer the active runtime snapshot over stale queued reply config during embedded reply and follow-up execution so SecretRef-backed reply turns stop crashing after secrets have already resolved. (#62693) Thanks @mbelinky.
- Android/manual connect: allow blank port input only for TLS manual gateway endpoints so standard HTTPS Tailscale hosts default to `443` without silently changing cleartext manual connects. (#63134) Thanks @Tyler-RNG.
- Matrix/agents: hide owner-only `set-profile` from embedded agent channel-action discovery so non-owner runs stop advertising profile updates they cannot execute. (#62662) Thanks @eleqtrizit.
## 2026.4.5
@@ -46,6 +163,7 @@ Docs: https://docs.openclaw.ai
- Agents/video generation: add the built-in `video_generate` tool so agents can create videos through configured providers and return the generated media directly in the reply.
- Agents/music generation: ignore unsupported optional hints such as `durationSeconds` with a warning instead of hard-failing requests on providers like Google Lyria.
- Providers/Arcee AI: add a bundled Arcee AI provider plugin with `ARCEEAI_API_KEY` onboarding, Trinity model catalog (mini, large-preview, large-thinking), OpenAI-compatible API support, and OpenRouter as an alternative auth path. (#62068) Thanks @arthurbr11.
- Providers/ComfyUI: add a bundled `comfy` workflow media plugin for local ComfyUI and Comfy Cloud workflows, including shared `image_generate`, `video_generate`, and workflow-backed `music_generate` support, with prompt injection, optional reference-image upload, live tests, and output download.
- Tools/music generation: add the built-in `music_generate` tool with bundled Google (Lyria) and MiniMax providers plus workflow-backed Comfy support, including async task tracking and follow-up delivery of finished audio.
- Providers: add bundled Qwen, Fireworks AI, and StepFun providers, plus MiniMax TTS, Ollama Web Search, and MiniMax Search integrations for chat, speech, and search workflows. (#60032, #55921, #59318, #54648)
@@ -172,6 +290,7 @@ Docs: https://docs.openclaw.ai
- Feishu/reasoning: only expose streamed reasoning previews when the session is explicitly `reasoning:stream`, so hidden reasoning traces do not surface on normal streaming sessions. Thanks @vincentkoc.
- Discord: keep REST, webhook, and monitor traffic on the configured proxy, preserve component-only media sends, honor `@everyone` and `@here` mention gates, keep ACK reactions on the active account, and split voice connect/playback timeouts so auto-join is more reliable. (#57465, #60361, #60345) Thanks @geekhuashan.
- WhatsApp: restore `channels.whatsapp.blockStreaming` and reset watchdog timeouts after reconnect so quiet chats stop falling into reconnect loops. (#60007, #60069) Thanks @MonkeyLeeT and @mcaxtr.
- Browser/security: re-run SSRF safety checks after interaction-driven navigations and before snapshot reads so click, submit, keyboard, and current-page snapshot flows fail closed on disallowed destinations. (#62023) Thanks @eleqtrizit.
- Memory: keep `memory-core` builtin embedding registration on the already-registered path so selecting `memory-core` no longer recurses through plugin discovery and crashes during startup. (#61402) Thanks @ngutman.
- Agents/tool results: keep large `read` outputs visible longer, preserve the latest `read` output when older tool output can absorb the overflow budget, and fall back to Pi's normal overflow compaction/retry path before replacing a fresh `read` with a compacted stub. Thanks @vincentkoc.
- Memory/QMD: prefer modern `qmd collection add --glob`, accept newer single-line JSON hit metadata while keeping legacy line fields, refresh QMD docs/doctor install guidance and model-override guidance, and keep older QMD releases working. Thanks @vincentkoc.
@@ -214,6 +333,7 @@ Docs: https://docs.openclaw.ai
- Providers/OpenRouter failover: classify `403 “Key limit exceeded”` spending-limit responses as billing so model fallback continues instead of stopping on generic auth. (#59892) Thanks @rockcent.
- Providers/Anthropic: keep `claude-cli/*` auth on live Claude CLI credentials at runtime, avoid persisting stale bearer-token profiles, and suppress macOS Keychain prompts during non-interactive Claude CLI setup. (#61234) Thanks @darkamenosa.
- Providers/Anthropic: when Claude CLI auth becomes the default, write a real `claude-cli` auth profile so local and gateway agent runs can use Claude CLI immediately without missing-API-key failures. Thanks @vincentkoc.
- Memory/dreaming: make Dreams config reads and writes respect the selected memory slot plugin (including `doctor.memory.status` and Control UI fallback state) instead of always targeting `memory-core`. (#62275) Thanks @SnowSky1.
- Providers/Anthropic Vertex: honor `cacheRetention: “long”` with the real 1-hour prompt-cache TTL on Vertex AI endpoints, and default `anthropic-vertex` cache retention like direct Anthropic. (#60888) Thanks @affsantos.
- Agents/Anthropic: preserve native `toolu_*` replay ids on direct Anthropic and Anthropic Vertex paths so cache-sensitive history stops rewriting known-valid Anthropic tool-use ids. (#52612)
- Providers/Google: add model-level `cacheRetention` support for direct Gemini system prompts by creating, reusing, and refreshing `cachedContents` automatically on Google AI Studio runs. (#51372) Thanks @rafaelmariano-glitch.
@@ -768,6 +888,7 @@ Docs: https://docs.openclaw.ai
- Agents/compaction: surface safeguard-specific cancel reasons and relabel benign manual `/compact` no-op cases as skipped instead of failed. (#51072) Thanks @afurm.
- Docs: add `pnpm docs:check-links:anchors` for Mintlify anchor validation while keeping `scripts/docs-link-audit.mjs` as the stable link-audit entrypoint. (#55912) Thanks @velvet-shark.
- Tavily: mark outbound API requests with `X-Client-Source: openclaw` so Tavily can attribute OpenClaw-originated traffic. (#55335) Thanks @lakshyaag-tavily.
- Plugins/hooks: add async `requireApproval` to `before_tool_call` hooks, letting plugins pause tool execution and prompt the user for approval via the exec approval overlay, Telegram buttons, Discord interactions, or the `/approve` command on any channel. The `/approve` command now handles both exec and plugin approvals with automatic fallback. (#55339) Thanks @vaclavbelak and @joshavant.
### Fixes
@@ -927,6 +1048,7 @@ Docs: https://docs.openclaw.ai
- Security/path resolution: prefer non-user-writable absolute helper binaries for OpenClaw CLI, ffmpeg, and OpenSSL resolution so PATH hijacks cannot replace trusted helpers with attacker-controlled executables.
- Security/gateway command scopes: require `operator.admin` before Telegram target writeback and Talk Voice `/voice set` config writes persist through gateway message flows.
- Security/OpenShell mirror: exclude workspace `hooks/` from mirror sync so untrusted sandbox files cannot become trusted host hooks on gateway startup.
- Exec env policy: block Mercurial config redirects, Rust compiler wrappers, and GNU make flag env vars in host exec sanitization so inherited env and request-scoped overrides cannot redirect build-tool execution.
## 2026.3.24-beta.2
@@ -1704,6 +1826,9 @@ Docs: https://docs.openclaw.ai
- macOS overlays: fix VoiceWake, Talk, and Notify overlay exclusivity crashes by removing shared `inout` visibility mutation from `OverlayPanelFactory.present`, and add a repeated Talk overlay smoke test. (#39275, #39321) Thanks @fellanH.
- macOS Talk Mode: set the speech recognition request `taskHint` to `.dictation` for mic capture, and add regression coverage for the request defaults. (#38445) Thanks @dmiv.
- macOS release packaging: default `scripts/package-mac-app.sh` to universal binaries for `BUILD_CONFIG=release`, and clarify that `scripts/package-mac-dist.sh` already produces the release zip + DMG. (#33891) Thanks @cgdusek.
- Tools/web search: restore Perplexity OpenRouter/Sonar compatibility for legacy `OPENROUTER_API_KEY`, `sk-or-...`, and explicit `perplexity.baseUrl` / `model` setups while keeping direct Perplexity keys on the native Search API path. (#39937) Thanks @obviyus.
- Tools/web search: restore Perplexity OpenRouter/Sonar compatibility for legacy `OPENROUTER_API_KEY`, `sk-or-...`, and explicit `perplexity.baseUrl` / `model` setups while keeping direct Perplexity keys on the native Search API path. (#39937) Thanks @obviyus.
- Doctor/Codex OAuth: warn only for legacy `models.providers.openai-codex` transport overrides that can shadow the built-in Codex OAuth path, while leaving supported custom proxies and header-only overrides alone. (#40143) Thanks @bde1.
- Hooks/session-memory: keep `/new` and `/reset` memory artifacts in the bound agent workspace and align saved reset session keys with that workspace when stale main-agent keys leak into the hook path. (#39875) thanks @rbutera.
- Sessions/model switch: clear stale cached `contextTokens` when a session changes models so status and runtime paths recompute against the active model window. (#38044) thanks @yuweuii.
- ACP/session history: persist transcripts for successful ACP child runs, preserve exact transcript text, record ACP spawned-session lineage, and keep spawn-time transcript-path persistence best-effort so history storage failures do not block execution. (#40137) thanks @mbelinky.

View File

@@ -62,9 +62,10 @@ RUN corepack enable
WORKDIR /app
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc ./
COPY openclaw.mjs ./
COPY ui/package.json ./ui/package.json
COPY patches ./patches
COPY scripts/postinstall-bundled-plugins.mjs scripts/npm-runner.mjs ./scripts/
COPY scripts/postinstall-bundled-plugins.mjs scripts/npm-runner.mjs scripts/windows-cmd-helpers.mjs ./scripts/
COPY --from=ext-deps /out/ ./${OPENCLAW_BUNDLED_PLUGIN_DIR}/
@@ -102,7 +103,19 @@ RUN pnpm qa:lab:build
# Prune dev dependencies and strip build-only metadata before copying
# runtime assets into the final image.
FROM build AS runtime-assets
RUN CI=true pnpm prune --prod && \
ARG OPENCLAW_EXTENSIONS
ARG OPENCLAW_BUNDLED_PLUGIN_DIR
# Keep the install layer frozen, but allow prune to run against the full copied
# workspace tree subset used during `pnpm install`. The build stage only copied
# the root, `ui`, and opted-in plugin manifests into the install layer, so
# prune must not rediscover unrelated workspaces from the later full source
# copy.
RUN printf 'packages:\n - .\n - ui\n' > /tmp/pnpm-workspace.runtime.yaml && \
for ext in $OPENCLAW_EXTENSIONS; do \
printf ' - %s/%s\n' "$OPENCLAW_BUNDLED_PLUGIN_DIR" "$ext" >> /tmp/pnpm-workspace.runtime.yaml; \
done && \
cp /tmp/pnpm-workspace.runtime.yaml pnpm-workspace.yaml && \
CI=true NPM_CONFIG_FROZEN_LOCKFILE=false pnpm prune --prod && \
find dist -type f \( -name '*.d.ts' -o -name '*.d.mts' -o -name '*.d.cts' -o -name '*.map' \) -delete
# ── Runtime base images ─────────────────────────────────────────
@@ -159,10 +172,6 @@ COPY --from=runtime-assets --chown=node:node /app/skills ./skills
COPY --from=runtime-assets --chown=node:node /app/docs ./docs
COPY --from=runtime-assets --chown=node:node /app/qa ./qa
# In npm-installed Docker images, prefer the copied source extension tree for
# bundled discovery so package metadata that points at source entries stays valid.
ENV OPENCLAW_BUNDLED_PLUGINS_DIR=/app/${OPENCLAW_BUNDLED_PLUGIN_DIR}
# Keep pnpm available in the runtime image for container-local workflows.
# Use a shared Corepack home so the non-root `node` user does not need a
# first-run network fetch when invoking pnpm.

View File

@@ -89,7 +89,7 @@ New install? Start here: [Getting started](https://docs.openclaw.ai/start/gettin
- **[OpenAI](https://openai.com/)** (ChatGPT/Codex)
Model note: while many providers/models are supported, for the best experience and lower prompt-injection risk use the strongest latest-generation model available to you. See [Onboarding](https://docs.openclaw.ai/start/onboarding).
Model note: while many providers and models are supported, prefer a current flagship model from the provider you trust and already use. See [Onboarding](https://docs.openclaw.ai/start/onboarding).
## Models (selection + auth)
@@ -371,7 +371,7 @@ Minimal `~/.openclaw/openclaw.json` (model + defaults):
```json5
{
agent: {
model: "anthropic/claude-opus-4-6",
model: "<provider>/<model-id>",
},
}
```

View File

@@ -2,11 +2,141 @@
<rss xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" version="2.0">
<channel>
<title>OpenClaw</title>
<item>
<title>2026.4.8</title>
<pubDate>Wed, 08 Apr 2026 06:12:50 +0000</pubDate>
<link>https://raw.githubusercontent.com/openclaw/openclaw/main/appcast.xml</link>
<sparkle:version>2026040890</sparkle:version>
<sparkle:shortVersionString>2026.4.8</sparkle:shortVersionString>
<sparkle:minimumSystemVersion>15.0</sparkle:minimumSystemVersion>
<description><![CDATA[<h2>OpenClaw 2026.4.8</h2>
<h3>Fixes</h3>
<ul>
<li>Telegram/setup: load setup and secret contracts through packaged top-level sidecars so installed npm builds no longer try to import missing <code>dist/extensions/telegram/src/*</code> files during gateway startup.</li>
<li>Bundled channels/setup: load shared secret contracts through packaged top-level sidecars across BlueBubbles, Feishu, Google Chat, IRC, Matrix, Mattermost, Microsoft Teams, Nextcloud Talk, Slack, and Zalo so installed npm builds no longer rely on missing <code>dist/extensions/*/src/*</code> files during gateway startup.</li>
<li>Bundled plugins: align packaged plugin compatibility metadata with the release version so bundled channels and providers load on OpenClaw 2026.4.8.</li>
<li>Agents/progress: keep <code>update_plan</code> available for OpenAI-family runs while returning compact success payloads and allowing <code>tools.experimental.planTool=false</code> to opt out.</li>
<li>Agents/exec: keep <code>/exec</code> current-default reporting aligned with real runtime behavior so <code>host=auto</code> sessions surface the correct host-aware fallback policy (<code>full/off</code> on gateway or node, <code>deny/off</code> on sandbox) instead of stale stricter defaults.</li>
<li>Slack: honor ambient HTTP(S) proxy settings for Socket Mode WebSocket connections, including NO_PROXY exclusions, so proxy-only deployments can connect without a monkey patch. (#62878) Thanks @mjamiv.</li>
<li>Slack/actions: pass the already resolved read token into <code>downloadFile</code> so SecretRef-backed bot tokens no longer fail after a raw config re-read. (#62097) Thanks @martingarramon.</li>
<li>Network/fetch guard: skip target DNS pinning when trusted env-proxy mode is active so proxy-only sandboxes can let the trusted proxy resolve outbound hosts. (#59007) Thanks @cluster2600.</li>
</ul>
<p><a href="https://github.com/openclaw/openclaw/blob/main/CHANGELOG.md">View full changelog</a></p>
]]></description>
<enclosure url="https://github.com/openclaw/openclaw/releases/download/v2026.4.8/OpenClaw-2026.4.8.zip" length="25324810" type="application/octet-stream" sparkle:edSignature="aogl3hJf+FeRvQj0W4WDGMQnIRPpxXPQam50U7SBT3ljA1CeSbIGsnaj20aLF0Qc9DikPEXt5AEg7LMOen4+BQ=="/>
</item>
<item>
<title>2026.4.7</title>
<pubDate>Wed, 08 Apr 2026 02:54:26 +0000</pubDate>
<link>https://raw.githubusercontent.com/openclaw/openclaw/main/appcast.xml</link>
<sparkle:version>2026040790</sparkle:version>
<sparkle:shortVersionString>2026.4.7</sparkle:shortVersionString>
<sparkle:minimumSystemVersion>15.0</sparkle:minimumSystemVersion>
<description><![CDATA[<h2>OpenClaw 2026.4.7</h2>
<h3>Changes</h3>
<ul>
<li>CLI/infer: add a first-class <code>openclaw infer ...</code> hub for provider-backed inference workflows across model, media, web, and embedding tasks. Thanks @Takhoffman.</li>
<li>Tools/media generation: auto-fallback across auth-backed image, music, and video providers by default, preserve intent during provider switches, remap size/aspect/resolution/duration hints to the closest supported option, and surface provider capabilities plus mode-aware video-to-video support.</li>
<li>Memory/wiki: restore the bundled <code>memory-wiki</code> stack with plugin, CLI, sync/query/apply tooling, memory-host integration, structured claim/evidence fields, compiled digest retrieval, claim-health linting, contradiction clustering, staleness dashboards, and freshness-weighted search. Thanks @vincentkoc.</li>
<li>Plugins/webhooks: add a bundled webhook ingress plugin so external automation can create and drive bound TaskFlows through per-route shared-secret endpoints. (#61892) Thanks @mbelinky.</li>
<li>Gateway/sessions: add persisted compaction checkpoints plus Sessions UI branch/restore actions so operators can inspect and recover pre-compaction session state. (#62146) Thanks @scoootscooob.</li>
<li>Compaction: add pluggable compaction provider registry so plugins can replace the built-in summarization pipeline. Configure via <code>agents.defaults.compaction.provider</code>; falls back to LLM summarization on provider failure. (#56224) Thanks @DhruvBhatia0.</li>
<li>Agents/system prompt: add <code>agents.defaults.systemPromptOverride</code> for controlled prompt experiments plus heartbeat prompt-section controls so heartbeat runtime behavior can stay enabled without injecting heartbeat instructions every turn.</li>
<li>Providers/Google: add Gemma 4 model support and keep Google fallback resolution on the requested provider path so native Google Gemma routes work again. (#61507) Thanks @eyjohn.</li>
<li>Providers/Google: preserve explicit thinking-off semantics for Gemma 4 while still enabling Gemma reasoning support in compatibility wrappers. (#62127) Thanks @romgenie.</li>
<li>Providers/Arcee AI: add a bundled Arcee AI provider plugin with Trinity catalog entries, OpenRouter support, and updated onboarding/auth guidance. (#62068) Thanks @arthurbr11.</li>
<li>Providers/Anthropic: restore Claude CLI as the preferred local Anthropic path in onboarding, model-auth guidance, doctor flows, and Docker Claude CLI live lanes again.</li>
<li>Providers/Ollama: detect vision capability from the <code>/api/show</code> response and set image input on models that support it so Ollama vision models accept image attachments. (#62193) Thanks @BruceMacD.</li>
<li>Memory/dreaming: ingest redacted session transcripts into the dreaming corpus with per-day session-corpus notes, cursor checkpointing, and promotion/doctor support. (#62227) Thanks @vignesh07.</li>
<li>Providers/inferrs: add string-content compatibility for stricter OpenAI-compatible chat backends, document <code>inferrs</code> setup with a full config example, and add troubleshooting guidance for local backends that pass direct probes but fail on full agent-runtime prompts.</li>
<li>Agents/context engine: expose prompt-cache runtime context to context engines and keep current-turn prompt-cache usage aligned with the active attempt instead of stale prior-turn assistant state. (#62179) Thanks @jalehman.</li>
<li>Plugin SDK/context engines: pass <code>availableTools</code> and <code>citationsMode</code> into <code>assemble()</code>, and expose memory-artifact and memory-prompt seams so companion plugins and non-legacy context engines can consume active memory state without reaching into internals. Thanks @vincentkoc.</li>
<li>ACP/ACPX plugin: bump the bundled <code>acpx</code> pin to <code>0.5.1</code> so plugin-local installs and strict version checks pick up the latest published runtime release. (#62148) Thanks @onutc.</li>
<li>Discord/events: allow <code>event-create</code> to accept a cover image URL or local file path, load and validate PNG/JPG/GIF event cover media, and pass the encoded image payload through Discord admin action/runtime paths. (#60883) Thanks @bittoby.</li>
</ul>
<h3>Fixes</h3>
<ul>
<li>CLI/infer: keep provider-backed infer behavior aligned with actual runtime execution by fixing explicit TTS override handling, profile-aware gateway TTS prefs resolution, per-request transcription <code>prompt</code>/<code>language</code> overrides, image output MIME/extension mismatches, configured web-search fallback behavior, and agent-vs-CLI web-search execution drift.</li>
<li>Plugins/media: when <code>plugins.allow</code> is set, capability fallback now merges bundled capability plugin ids into the allowlist (not only <code>plugins.entries</code>), so media understanding providers such as OpenAI-compatible STT load for voice transcription without requiring <code>openai</code> in <code>plugins.allow</code>. (#62205) Thanks @neeravmakwana.</li>
<li>Agents/history and replies: buffer phaseless OpenAI WS text until a real assistant phase arrives, keep replay and SSE history sequence tracking aligned, hide commentary and leaked tool XML from user-visible history, and keep history-based follow-up replies on <code>final_answer</code> text only. (#61729, #61747, #61829, #61855, #61954) Thanks @100yenadmin and contributors.</li>
<li>Control UI: show <code>/tts</code> audio replies in webchat, detect mistaken <code>?token=</code> auth links with the correct <code>#token=</code> hint, and keep Copy, Canvas, and mobile exec-approval UI from covering chat content on narrow screens. (#54842, #61514, #61598) Thanks @neeravmakwana.</li>
<li>iOS/gateway: replace string-matched connection error UI with structured gateway connection problems, preserve actionable pairing/auth failures over later generic disconnect noise, and surface reusable problem banners and details across onboarding, settings, and root status surfaces. (#62650) Thanks @ngutman.</li>
<li>TUI: route <code>/status</code> through the shared session-status command, keep commentary hidden in history, strip raw envelope metadata from async command notices, preserve fallback streaming before per-attempt failures finalize, and restore Kitty keyboard state on exit or fatal crashes. (#49130, #59985, #60043, #61463) Thanks @biefan and contributors.</li>
<li>iOS/Watch exec approvals: keep Apple Watch review and approval recovery working while the iPhone is locked or backgrounded, including reconnect recovery, pending approval persistence, notification cleanup, and APNs-backed watch refresh recovery. (#61757) Thanks @ngutman.</li>
<li>Agents/context overflow: combine oversized and aggregate tool-result recovery in one pass and restore a total-context overflow backstop so recoverable sessions retry instead of failing early. (#61651) Thanks @Takhoffman.</li>
<li>Auth/OpenAI Codex OAuth: reload fresh on-disk credentials inside the locked refresh path and retry once after <code>refresh_token_reused</code> rotates only the stored refresh token, so relogin/restart recovery stops getting stuck on stale cached auth state. Thanks @owen-ever.</li>
<li>Auth/OpenAI Codex OAuth: keep native <code>/model ...@profile</code> selections on the target session and honor explicit user-locked auth profiles even when per-agent auth order excludes them. (#62744) Thanks @jalehman.</li>
<li>Providers/Anthropic: preserve thinking blocks for Claude Opus 4.5+, Sonnet 4.5+, and newer Claude 4-family models so prompt-cache prefixes keep matching, and skip <code>service_tier</code> injection on OAuth-authenticated stream wrapper requests so Claude OAuth streaming stops failing with HTTP 401. (#60356, #61793)</li>
<li>Agents/Claude CLI: surface nested API error messages from structured CLI output so billing/auth/provider failures show the real provider error instead of an opaque CLI failure.</li>
<li>Agents/exec: preserve explicit <code>host=node</code> routing under elevated defaults when <code>tools.exec.host=auto</code>, fail loud on invalid elevated cross-host overrides, and keep <code>strictInlineEval</code> commands blocked after approval timeouts instead of falling through to automatic execution. (#61739) Thanks @obviyus.</li>
<li>Nodes/exec approvals: keep <code>host=node</code> POSIX transport shell wrappers (<code>/bin/sh -lc ...</code>) aligned with inner-command allowlist analysis so allowlisted scripts stop prompting unnecessarily, while Windows <code>cmd.exe</code> wrapper runs stay approval-gated. (#62401) Thanks @ngutman.</li>
<li>Nodes/exec approvals: keep Windows <code>cmd.exe /c</code> wrapper runs approval-gated even when <code>env</code> carriers, including env-assignment carriers, wrap the shell invocation. (#62439) Thanks @ngutman.</li>
<li>Gateway tool/exec config: block model-facing <code>gateway config.apply</code> and <code>config.patch</code> writes from changing exec approval paths such as <code>safeBins</code>, <code>safeBinProfiles</code>, <code>safeBinTrustedDirs</code>, and <code>strictInlineEval</code>, while still allowing unchanged structured values through. (#62001) Thanks @eleqtrizit.</li>
<li>Host exec/env sanitization: block dangerous Java, Rust, Cargo, Git, Kubernetes, cloud credential, config-path, and Helm env overrides so host-run tools cannot be redirected to attacker-chosen code, config, credentials, or repository state. (#59119, #62002, #62291) Thanks @eleqtrizit and contributors.</li>
<li>Commands/allowlist: require owner authorization for <code>/allowlist add</code> and <code>/allowlist remove</code> before channel resolution, so non-owner but command-authorized senders can no longer persistently rewrite allowlist policy state. (#62383) Thanks @pgondhi987.</li>
<li>Feishu/docx uploads: honor <code>tools.fs.workspaceOnly</code> for local <code>upload_file</code> and <code>upload_image</code> paths by forwarding workspace-constrained <code>localRoots</code> into the media loader, so docx uploads can no longer read host-local files outside the workspace when workspace-only mode is active. (#62369) Thanks @pgondhi987.</li>
<li>Network/fetch guard: drop request bodies and body-describing headers on cross-origin <code>307</code> and <code>308</code> redirects by default, so attacker-controlled redirect hops cannot receive secret-bearing POST payloads from SSRF-guarded fetch flows unless a caller explicitly opts in. (#62357) Thanks @pgondhi987.</li>
<li>Browser/SSRF: treat main-frame <code>document</code> redirect hops as navigations even when Playwright does not flag them as <code>isNavigationRequest()</code>, so strict private-network blocking still stops forbidden redirect pivots before the browser reaches the internal target. (#62355) Thanks @pgondhi987.</li>
<li>Browser/node invoke: block persistent browser profile create, reset, and delete mutations through <code>browser.proxy</code> on both gateway-forwarded <code>node.invoke</code> and the node-host proxy path, even when no profile allowlist is configured. (#60489)</li>
<li>Gateway/node pairing: require a fresh pairing request when a previously paired node reconnects with additional declared commands, and keep the live session pinned to the earlier approved command set until the upgrade is approved. (#62658) Thanks @eleqtrizit.</li>
<li>Gateway/auth: invalidate existing shared-token and password WebSocket sessions when the configured secret rotates, so stale authenticated sockets cannot stay attached after token or password changes. (#62350) Thanks @pgondhi987.</li>
<li>MS Teams/security: validate file-consent upload URLs against HTTPS, Microsoft/SharePoint host allowlists, and private-IP DNS checks before uploading attachments, blocking SSRF-style consent-upload abuse. (#23596)</li>
<li>Media/base64 decode guards: enforce byte limits before decoding missed base64-backed Teams, Signal, QQ Bot, and image-tool payloads so oversized inbound media and data URLs no longer bypass pre-decode size checks. (#62007) Thanks @eleqtrizit.</li>
<li>Runtime event trust: mark background <code>notifyOnExit</code> summaries, ACP parent-stream relays, and wake-hook payloads as untrusted system events so lower-trust runtime output no longer re-enters later turns as trusted <code>System:</code> text. (#62003)</li>
<li>Auto-reply/media: allow managed generated-media <code>MEDIA:</code> paths from normal reply text again while still blocking arbitrary host-local media and document paths, so generated media keep delivering without reopening host-path injection holes.</li>
<li>Gateway/status and containers: auto-bind to <code>0.0.0.0</code> inside Docker and Podman environments, and probe local TLS gateways over <code>wss://</code> with self-signed fingerprint forwarding so container startup and loopback TLS status checks work again. (#61818, #61935) Thanks @openperf and contributors.</li>
<li>Gateway/OpenAI-compatible HTTP: abort in-flight <code>/v1/chat/completions</code> and <code>/v1/responses</code> turns when clients disconnect so abandoned HTTP requests stop wasting agent runtime. (#54388) Thanks @Lellansin.</li>
<li>macOS/gateway version: strip trailing commit metadata from CLI version output before semver parsing so the Mac app recognizes installed gateway versions like <code>OpenClaw 2026.4.2 (d74a122)</code> again. (#61111) Thanks @oliviareid-svg.</li>
<li>Sessions/model selection: resolve the explicitly selected session model separately from runtime fallback resolution so session status and live model switching stay aligned with the chosen model.</li>
<li>Discord/ACP bindings: canonicalize DM conversation identity across inbound messages, component interactions, native commands, and current-conversation binding resolution so <code>--bind here</code> in Discord DMs keeps routing follow-up replies to the bound agent instead of falling back to the default agent.</li>
<li>Discord: recover forwarded referenced message text and attachments when snapshots are missing, use <code>ws://</code> again for gateway monitor sockets, stop forcing a hardcoded temperature for Codex-backed auto-thread titles, and harden voice receive recovery so rapid speaker restarts keep their next utterance. (#41536, #61670) Thanks @artwalker and contributors.</li>
<li>Slack/thread mentions: add <code>channels.slack.thread.requireExplicitMention</code> so Slack channels that already require mentions can also require explicit <code>@bot</code> mentions inside bot-participated threads. (#58276) Thanks @praktika-engineer.</li>
<li>Slack/threading: keep legacy thread stickiness for real replies when older callers omit <code>isThreadReply</code>, while still honoring <code>replyToMode</code> for Slack's auto-created top-level <code>thread_ts</code>. (#61835) Thanks @kaonash.</li>
<li>Slack/media: keep attachment downloads on the SSRF-guarded dispatcher path so Slack media fetching works on Node 22 without dropping pinned transport enforcement. (#62239) Thanks @openperf.</li>
<li>Matrix/onboarding: add an invite auto-join setup step with explicit off warnings and strict stable-target validation so new Matrix accounts stop silently ignoring invited rooms and fresh DM-style invites unless operators opt in. (#62168) Thanks @gumadeiras.</li>
<li>Matrix/formatting: preserve multi-paragraph and loose-list rendering in Element so numbered and bulleted Markdown keeps their content attached to the correct list item. (#60997) Thanks @gucasbrg.</li>
<li>Telegram/doctor: keep top-level access-control fallback in place during multi-account normalization while still promoting legacy default auth into <code>accounts.default</code>, so existing named bots keep inherited allowlists without dropping the legacy default bot. (#62263) Thanks @obviyus.</li>
<li>Plugins/loaders: centralize bundled <code>dist/**</code> Jiti native-load policy and keep channel, public-surface, facade, and config-metadata loader seams off native Jiti on Windows so onboarding and configure flows stop tripping <code>ERR_UNSUPPORTED_ESM_URL_SCHEME</code>. (#62286) Thanks @chen-zhang-cs-code.</li>
<li>Plugins/channels: keep bundled channel artifact and secret-contract loading stable under lazy loading, preserve plugin-schema defaults during install, and fix Windows <code>file://</code> plus native-Jiti plugin loader paths so onboarding, doctor, <code>openclaw secret</code>, and bundled plugin installs work again. (#61832, #61836, #61853, #61856) Thanks @Zeesejo and contributors.</li>
<li>Plugins/ClawHub: verify downloaded plugin archives against version metadata SHA-256, fail closed when archive integrity metadata is missing or malformed, and tighten fallback ZIP verification so plugin installs cannot proceed on mismatched or incomplete ClawHub package metadata. (#60517) Thanks @mappel-nv.</li>
<li>Plugins/provider hooks: stop recursive provider snapshot loads from overflowing the stack during plugin initialization, while still preserving cached nested provider-hook results. (#61922, #61938, #61946, #61951)</li>
<li>Docker/plugins: stop forcing bundled plugin discovery to <code>/app/extensions</code> in runtime images so packaged installs use compiled <code>dist/extensions</code> artifacts again and Node 24 containers do not boot through source-only plugin entry paths. Fixes #62044. (#62316) Thanks @gumadeiras.</li>
<li>Providers/Ollama: honor the selected provider's <code>baseUrl</code> during streaming so multi-Ollama setups stop routing every stream to the first configured Ollama endpoint. (#61678)</li>
<li>Providers/Ollama: stop warning that Ollama could not be reached when discovery only sees empty default local stubs, while still keeping real explicit Ollama overrides loud when the endpoint is unreachable.</li>
<li>Providers/xAI: recognize <code>api.grok.x.ai</code> as an xAI-native endpoint again and keep legacy <code>x_search</code> auth resolution working so older xAI web-search configs continue to load. (#61377) Thanks @jjjojoj.</li>
<li>Providers/Mistral: send <code>reasoning_effort</code> for <code>mistral/mistral-small-latest</code> (Mistral Small 4) with thinking-level mapping, and mark the catalog entry as reasoning-capable so adjustable reasoning matches Mistrals Chat Completions API. (#62162) Thanks @neeravmakwana.</li>
<li>OpenAI TTS/Groq: send <code>wav</code> to Groq-compatible speech endpoints, honor explicit <code>responseFormat</code> overrides on OpenAI-compatible paths, and only mark voice-note output as voice-compatible when the actual format is <code>opus</code>. (#62233) Thanks @neeravmakwana.</li>
<li>Tools/web_fetch and web_search: fix <code>TypeError: fetch failed</code> caused by undici 8.0 enabling HTTP/2 by default; pinned SSRF-guard dispatchers now explicitly set <code>allowH2: false</code> to restore HTTP/1.1 behavior and keep the custom DNS-pinning lookup compatible. (#61738, #61777) Thanks @zozo123.</li>
<li>Tools/web search/Exa: show Exa Search in onboarding and configure provider pickers again by marking the bundled Exa provider as setup-visible. Thanks @vincentkoc.</li>
<li>Memory/vector recall: surface explicit warnings when <code>sqlite-vec</code> is unavailable or vector writes are degraded, and strip managed Light Sleep and REM blocks before daily-note ingestion so memory indexing and dreaming stop reporting false-success or re-ingesting staged output. (#61720) Thanks @MonkeyLeeT.</li>
<li>Memory/dreaming: make Dreams config reads and writes respect the selected memory slot plugin instead of always targeting <code>memory-core</code>. (#62275) Thanks @SnowSky1.</li>
<li>QQ Bot/media: route gateway-side attachment and fallback downloads through guarded QQ/Tencent HTTPS fetches so QQ media handling no longer follows arbitrary remote hosts.</li>
<li>Browser/remote CDP: retry the DevTools websocket once after remote browser restarts so healthy remote browser profiles do not fail availability checks during CDP warm-up. (#57397) Thanks @ThanhNguyxn07.</li>
<li>UI/light mode: target both root and nested WebKit scrollbar thumbs in the light theme so page-level and container scrollbars stay visible on light backgrounds. (#61753) Thanks @chziyue.</li>
<li>Agents/subagents: honor <code>sessions_spawn(lightContext: true)</code> for spawned subagent runs by preserving lightweight bootstrap context through the gateway and embedded runner instead of silently falling back to full workspace bootstrap injection. (#62264) Thanks @theSamPadilla.</li>
<li>Cron: load <code>jobId</code> into <code>id</code> when the on-disk store omits <code>id</code>, matching doctor migration and fixing <code>unknown cron job id</code> for hand-edited <code>jobs.json</code>. (#62246) Thanks @neeravmakwana.</li>
<li>Agents/model fallback: classify minimal HTTP 404 API errors (for example <code>404 status code (no body)</code>) as <code>model_not_found</code> so assistant failures throw into the fallback chain instead of stopping at the first fallback candidate. (#62119) Thanks @neeravmakwana.</li>
<li>BlueBubbles/network: respect explicit private-network opt-out for loopback and private <code>serverUrl</code> values across account resolution, status probes, monitor startup, and attachment downloads, while keeping public-host attachment hostname pinning intact. (#59373) Thanks @jpreagan.</li>
<li>Agents/heartbeat: keep heartbeat runs pinned to the main session so active subagent transcripts are not overwritten by heartbeat status messages. (#61803) Thanks @100yenadmin.</li>
<li>Agents/heartbeat: respect disabled heartbeat prompt guidance so operators can suppress heartbeat prompt instructions without disabling heartbeat runtime behavior.</li>
<li>Agents/compaction: stop compaction-wait aborts from re-entering prompt failover and replaying completed tool turns. (#62600) Thanks @i-dentifier.</li>
<li>Approvals/runtime: move native approval lifecycle assembly into shared core bootstrap/runtime seams driven by channel capabilities and runtime contexts, and remove the legacy bundled approval fallback wiring. (#62135) Thanks @gumadeiras.</li>
<li>Security/fetch-guard: stop rejecting operator-configured proxy hostnames against the target-scoped hostname allowlist in SSRF-guarded fetches, restoring proxy-based media downloads for Telegram and other channels. (#62312) Thanks @ademczuk.</li>
<li>Logging: make <code>logging.level</code> and <code>logging.consoleLevel</code> honor the documented severity threshold ordering again, and keep child loggers inheriting the parent <code>minLevel</code>. (#44646) Thanks @zhumengzhu.</li>
<li>Agents/sessions_send: pass <code>threadId</code> through announce delivery so cross-session notifications land in the correct Telegram forum topic instead of the group's general thread. (#62758) Thanks @jalehman.</li>
<li>Daemon/systemd: keep sudo systemctl calls scoped to the invoking user when machine-scoped systemctl fails, while still avoiding machine fallback for permission-denied user bus errors. (#62337) Thanks @Aftabbs.</li>
<li>Docs/i18n: relocalize final localized-page links after translation and remove the zh-CN homepage redirect override so localized Mintlify pages resolve to the correct language roots again. (#61796) Thanks @hxy91819.</li>
<li>Agents/exec: keep timed-out shell-backgrounded commands on the failed path and point long-running jobs to exec background/yield sessions so process polling is only suggested for registered sessions.</li>
</ul>
<p><a href="https://github.com/openclaw/openclaw/blob/main/CHANGELOG.md">View full changelog</a></p>
]]></description>
<enclosure url="https://github.com/openclaw/openclaw/releases/download/v2026.4.7/OpenClaw-2026.4.7.zip" length="25324827" type="application/octet-stream" sparkle:edSignature="RyFWRz1trE/qvOiInD4vR6je9wx7fUTtHpZ94W8rMlZDByux9CyXOm/Anai96b9KyjTeQyC7YnJp5SRnYY3iCg=="/>
</item>
<item>
<title>2026.4.5</title>
<pubDate>Mon, 06 Apr 2026 04:55:17 +0100</pubDate>
<link>https://raw.githubusercontent.com/openclaw/openclaw/main/appcast.xml</link>
<sparkle:version>2026040501</sparkle:version>
<sparkle:version>2026040590</sparkle:version>
<sparkle:shortVersionString>2026.4.5</sparkle:shortVersionString>
<sparkle:minimumSystemVersion>15.0</sparkle:minimumSystemVersion>
<description><![CDATA[<h2>OpenClaw 2026.4.5</h2>
@@ -250,190 +380,5 @@
]]></description>
<enclosure url="https://github.com/openclaw/openclaw/releases/download/v2026.4.5/OpenClaw-2026.4.5.zip" length="25050620" type="application/octet-stream" sparkle:edSignature="gVbB/73byllY0utwGIi3P5t0FyvLldeR0Uq2pAa6LTBr8VyZlwNCZ2xPlt2zDFshSUBFKxicYzohOmfJ28ACBg=="/>
</item>
<item>
<title>2026.4.2</title>
<pubDate>Thu, 02 Apr 2026 18:57:54 +0000</pubDate>
<link>https://raw.githubusercontent.com/openclaw/openclaw/main/appcast.xml</link>
<sparkle:version>2026040290</sparkle:version>
<sparkle:shortVersionString>2026.4.2</sparkle:shortVersionString>
<sparkle:minimumSystemVersion>15.0</sparkle:minimumSystemVersion>
<description><![CDATA[<h2>OpenClaw 2026.4.2</h2>
<h3>Breaking</h3>
<ul>
<li>Plugins/xAI: move <code>x_search</code> settings from the legacy core <code>tools.web.x_search.*</code> path to the plugin-owned <code>plugins.entries.xai.config.xSearch.*</code> path, standardize <code>x_search</code> auth on <code>plugins.entries.xai.config.webSearch.apiKey</code> / <code>XAI_API_KEY</code>, and migrate legacy config with <code>openclaw doctor --fix</code>. (#59674) Thanks @vincentkoc.</li>
<li>Plugins/web fetch: move Firecrawl <code>web_fetch</code> config from the legacy core <code>tools.web.fetch.firecrawl.*</code> path to the plugin-owned <code>plugins.entries.firecrawl.config.webFetch.*</code> path, route <code>web_fetch</code> fallback through the new fetch-provider boundary instead of a Firecrawl-only core branch, and migrate legacy config with <code>openclaw doctor --fix</code>. (#59465) Thanks @vincentkoc.</li>
</ul>
<h3>Changes</h3>
<ul>
<li>Tasks/Task Flow: restore the core Task Flow substrate with managed-vs-mirrored sync modes, durable flow state/revision tracking, and <code>openclaw flows</code> inspection/recovery primitives so background orchestration can persist and be operated separately from plugin authoring layers. (#58930) Thanks @mbelinky.</li>
<li>Tasks/Task Flow: add managed child task spawning plus sticky cancel intent, so external orchestrators can stop scheduling immediately and let parent Task Flows settle to <code>cancelled</code> once active child tasks finish. (#59610) Thanks @mbelinky.</li>
<li>Plugins/Task Flow: add a bound <code>api.runtime.taskFlow</code> seam so plugins and trusted authoring layers can create and drive managed Task Flows from host-resolved OpenClaw context without passing owner identifiers on each call. (#59622) Thanks @mbelinky.</li>
<li>Android/assistant: add assistant-role entrypoints plus Google Assistant App Actions metadata so Android can launch OpenClaw from the assistant trigger and hand prompts into the chat composer. (#59596) Thanks @obviyus.</li>
<li>Exec defaults: make gateway/node host exec default to YOLO mode by requesting <code>security=full</code> with <code>ask=off</code>, and align host approval-file fallbacks plus docs/doctor reporting with that no-prompt default.</li>
<li>Providers/runtime: add provider-owned replay hook surfaces for transcript policy, replay cleanup, and reasoning-mode dispatch. (#59143) Thanks @jalehman.</li>
<li>Plugins/hooks: add <code>before_agent_reply</code> so plugins can short-circuit the LLM with synthetic replies after inline actions. (#20067) Thanks @JoshuaLelon.</li>
<li>Channels/session routing: move provider-specific session conversation grammar into plugin-owned session-key surfaces, preserving Telegram topic routing and Feishu scoped inheritance across bootstrap, model override, restart, and tool-policy paths.</li>
<li>Feishu/comments: add a dedicated Drive comment-event flow with comment-thread context resolution, in-thread replies, and <code>feishu_drive</code> comment actions for document collaboration workflows. (#58497) Thanks @wittam-01.</li>
<li>Matrix/plugin: emit spec-compliant <code>m.mentions</code> metadata across text sends, media captions, edits, poll fallback text, and action-driven edits so Matrix mentions notify reliably in clients like Element. (#59323) Thanks @gumadeiras.</li>
<li>Diffs: add plugin-owned <code>viewerBaseUrl</code> so viewer links can use a stable proxy/public origin without passing <code>baseUrl</code> on every tool call. (#59341) Related #59227. Thanks @gumadeiras.</li>
<li>Agents/compaction: resolve <code>agents.defaults.compaction.model</code> consistently for manual <code>/compact</code> and other context-engine compaction paths, so engine-owned compaction uses the configured override model across runtime entrypoints. (#56710) Thanks @oliviareid-svg.</li>
<li>Agents/compaction: add <code>agents.defaults.compaction.notifyUser</code> so the <code>🧹 Compacting context...</code> start notice is opt-in instead of always being shown. (#54251) Thanks @oguricap0327.</li>
<li>WhatsApp/reactions: add <code>reactionLevel</code> guidance for agent reactions. Thanks @mcaxtr.</li>
<li>Exec approvals/channels: auto-enable DM-first native chat approvals when supported channels can infer approvers from existing owner config, while keeping channel fanout explicit and clarifying forwarding versus native approval client config.</li>
</ul>
<h3>Fixes</h3>
<ul>
<li>Providers/transport policy: centralize request auth, proxy, TLS, and header shaping across shared HTTP, stream, and websocket paths, block insecure TLS/runtime transport overrides, and keep proxy-hop TLS separate from target mTLS settings. (#59682) Thanks @vincentkoc.</li>
<li>Providers/Copilot: classify native GitHub Copilot API hosts in the shared provider endpoint resolver and harden token-derived proxy endpoint parsing so Copilot base URL routing stays centralized and fails closed on malformed hints. (#59644) Thanks @vincentkoc.</li>
<li>Providers/streaming headers: centralize default and attribution header merging across OpenAI websocket, embedded-runner, and proxy stream paths so provider-specific headers stay consistent and caller overrides only win where intended. (#59542) Thanks @vincentkoc.</li>
<li>Providers/media HTTP: centralize base URL normalization, default auth/header injection, and explicit header override handling across shared OpenAI-compatible audio, Deepgram audio, Gemini media/image, and Moonshot video request paths. (#59469) Thanks @vincentkoc.</li>
<li>Providers/OpenAI-compatible routing: centralize native-vs-proxy request policy so hidden attribution and related OpenAI-family defaults only apply on verified native endpoints across stream, websocket, and shared audio HTTP paths. (#59433) Thanks @vincentkoc.</li>
<li>Providers/Anthropic routing: centralize native-vs-proxy endpoint classification for direct Anthropic <code>service_tier</code> handling so spoofed or proxied hosts do not inherit native Anthropic defaults. (#59608) Thanks @vincentkoc.</li>
<li>Gateway/exec loopback: restore legacy-role fallback for empty paired-device token maps and allow silent local role upgrades so local exec and node clients stop failing with pairing-required errors after <code>2026.3.31</code>. (#59092) Thanks @openperf.</li>
<li>Agents/subagents: pin admin-only subagent gateway calls to <code>operator.admin</code> while keeping <code>agent</code> at least privilege, so <code>sessions_spawn</code> no longer dies on loopback scope-upgrade pairing with <code>close(1008) "pairing required"</code>. (#59555) Thanks @openperf.</li>
<li>Exec approvals/config: strip invalid <code>security</code>, <code>ask</code>, and <code>askFallback</code> values from <code>~/.openclaw/exec-approvals.json</code> during normalization so malformed policy enums fall back cleanly to the documented defaults instead of corrupting runtime policy resolution. (#59112) Thanks @openperf.</li>
<li>Exec approvals/doctor: report host policy sources from the real approvals file path and ignore malformed host override values when attributing effective policy conflicts. (#59367) Thanks @gumadeiras.</li>
<li>Exec/runtime: treat <code>tools.exec.host=auto</code> as routing-only, keep implicit no-config exec on sandbox when available or gateway otherwise, and reject per-call host overrides that would bypass the configured sandbox or host target. (#58897) Thanks @vincentkoc.</li>
<li>Slack/mrkdwn formatting: add built-in Slack mrkdwn guidance in inbound context so Slack replies stop falling back to generic Markdown patterns that render poorly in Slack. (#59100) Thanks @jadewon.</li>
<li>WhatsApp/presence: send <code>unavailable</code> presence on connect in self-chat mode so personal-phone users stop losing all push notifications while the gateway is running. (#59410) Thanks @mcaxtr.</li>
<li>WhatsApp/media: add HTML, XML, and CSS to the MIME map and fall back gracefully for unknown media types instead of dropping the attachment. (#51562) Thanks @bobbyt74.</li>
<li>Matrix/onboarding: restore guided setup in <code>openclaw channels add</code> and <code>openclaw configure --section channels</code>, while keeping custom plugin wizards on the shared <code>setupWizard</code> seam. (#59462) Thanks @gumadeiras.</li>
<li>Matrix/streaming: keep live partial previews for the current assistant block while preserving completed block updates as separate messages when <code>channels.matrix.blockStreaming</code> is enabled. (#59384) Thanks @gumadeiras.</li>
<li>Feishu/comment threads: harden document comment-thread delivery so whole-document comments fall back to <code>add_comment</code>, delayed reply lookups retry more reliably, and user-visible replies avoid reasoning/planning spillover. (#59129) Thanks @wittam-01.</li>
<li>MS Teams/streaming: strip already-streamed text from fallback block delivery when replies exceed the 4000-character streaming limit so long responses stop duplicating content. (#59297) Thanks @bradgroux.</li>
<li>Slack/thread context: filter thread starter and history by the effective conversation allowlist without dropping valid open-room, DM, or group DM context. (#58380) Thanks @jacobtomlinson.</li>
<li>Mattermost/probes: route status probes through the SSRF guard and honor <code>allowPrivateNetwork</code> so connectivity checks stay safe for self-hosted Mattermost deployments. (#58529) Thanks @mappel-nv.</li>
<li>Zalo/webhook replay: scope replay dedupe key by chat and sender so reused message IDs across different chats or senders no longer collide, and harden metadata reads for partially missing payloads. (#58444)</li>
<li>QQBot/structured payloads: restrict local file paths to QQ Bot-owned media storage, block traversal outside that root, reduce path leakage in logs, and keep inline image data URLs working. (#58453) Thanks @jacobtomlinson.</li>
<li>Image generation/providers: route OpenAI, MiniMax, and fal image requests through the shared provider HTTP transport path so custom base URLs, guarded private-network routing, and provider request defaults stay aligned with the rest of provider HTTP. Thanks @vincentkoc.</li>
<li>Image generation/providers: stop inferring private-network access from configured OpenAI, MiniMax, and fal image base URLs, and cap shared HTTP error-body reads so hostile or misconfigured endpoints fail closed without relaxing SSRF policy or buffering unbounded error payloads. Thanks @vincentkoc.</li>
<li>Browser/host inspection: keep static Chrome inspection helpers out of the activated browser runtime so <code>openclaw doctor browser</code> and related checks do not eagerly load the bundled browser plugin. (#59471) Thanks @vincentkoc.</li>
<li>Browser/CDP: normalize trailing-dot localhost absolute-form hosts before loopback checks so remote CDP websocket URLs like <code>ws://localhost.:...</code> rewrite back to the configured remote host. (#59236) Thanks @mappel-nv.</li>
<li>Agents/output sanitization: strip namespaced <code>antml:thinking</code> blocks from user-visible text so Anthropic-style internal monologue tags do not leak into replies. (#59550) Thanks @obviyus.</li>
<li>Kimi Coding/tools: normalize Anthropic tool payloads into the OpenAI-compatible function shape Kimi Coding expects so tool calls stop losing required arguments. (#59440) Thanks @obviyus.</li>
<li>Image tool/paths: resolve relative local media paths against the agent <code>workspaceDir</code> instead of <code>process.cwd()</code> so inputs like <code>inbox/receipt.png</code> pass the local-path allowlist reliably. (#57222) Thanks Priyansh Gupta.</li>
<li>Podman/launch: remove noisy container output from <code>scripts/run-openclaw-podman.sh</code> and align the Podman install guidance with the quieter startup flow. (#59368) Thanks @sallyom.</li>
<li>Plugins/runtime: keep LINE reply directives and browser-backed cleanup/reset flows working even when those plugins are disabled while tightening bundled plugin activation guards. (#59412) Thanks @vincentkoc.</li>
<li>ACP/gateway reconnects: keep ACP prompts alive across transient websocket drops while still failing boundedly when reconnect recovery does not complete. (#59473) Thanks @obviyus.</li>
<li>ACP/gateway reconnects: reject stale pre-ack ACP prompts after reconnect grace expiry so callers fail cleanly instead of hanging indefinitely when the gateway never confirms the run.</li>
<li>Gateway/session kill: enforce HTTP operator scopes on session kill requests and gate authorization before session lookup so unauthenticated callers cannot probe session existence. (#59128) Thanks @jacobtomlinson.</li>
<li>MS Teams/logging: format non-<code>Error</code> failures with the shared unknown-error helper so logs stop collapsing caught SDK or Axios objects into <code>[object Object]</code>. (#59321) Thanks @bradgroux.</li>
<li>Channels/setup: ignore untrusted workspace channel plugins during setup resolution so a shadowing workspace plugin cannot override built-in channel setup/login flows unless explicitly trusted in config. (#59158) Thanks @mappel-nv.</li>
<li>Exec/Windows: restore allowlist enforcement with quote-aware <code>argPattern</code> matching across gateway and node exec, and surface accurate dynamic pre-approved executable hints in the exec tool description. (#56285) Thanks @kpngr.</li>
<li>Gateway: prune empty <code>node-pending-work</code> state entries after explicit acknowledgments and natural expiry so the per-node state map no longer grows indefinitely. (#58179) Thanks @gavyngong.</li>
<li>Webhooks/secret comparison: replace ad-hoc timing-safe secret comparisons across BlueBubbles, Feishu, Mattermost, Telegram, Twilio, and Zalo webhook handlers with the shared <code>safeEqualSecret</code> helper and reject empty auth tokens in BlueBubbles. (#58432) Thanks @eleqtrizit.</li>
<li>OpenShell/mirror: constrain <code>remoteWorkspaceDir</code> and <code>remoteAgentWorkspaceDir</code> to the managed <code>/sandbox</code> and <code>/agent</code> roots, and keep mirror sync from overwriting or removing user-added shell roots during config synchronization. (#58515) Thanks @eleqtrizit.</li>
<li>Plugins/activation: preserve explicit, auto-enabled, and default activation provenance plus reason metadata across CLI, gateway bootstrap, and status surfaces so plugin enablement state stays accurate after auto-enable resolution. (#59641) Thanks @vincentkoc.</li>
<li>Exec/env: block additional host environment override pivots for package roots, language runtimes, compiler include paths, and credential/config locations so request-scoped exec cannot redirect trusted toolchains or config lookups. (#59233) Thanks @drobison00.</li>
<li>Dotenv/workspace overrides: block workspace <code>.env</code> files from overriding <code>OPENCLAW_PINNED_PYTHON</code> and <code>OPENCLAW_PINNED_WRITE_PYTHON</code> so trusted helper interpreters cannot be redirected by repo-local env injection. (#58473) Thanks @eleqtrizit.</li>
<li>Plugins/install: accept JSON5 syntax in <code>openclaw.plugin.json</code> and bundle <code>plugin.json</code> manifests during install/validation, so third-party plugins with trailing commas, comments, or unquoted keys no longer fail to install. (#59084) Thanks @singleGanghood.</li>
<li>Telegram/exec approvals: rewrite shared <code>/approve … allow-always</code> callback payloads to <code>/approve … always</code> before Telegram button rendering so plugin approval IDs still fit Telegram's <code>callback_data</code> limit and keep the Allow Always action visible. (#59217) Thanks @jameslcowan.</li>
<li>Cron/exec timeouts: surface timed-out <code>exec</code> and <code>bash</code> failures in isolated cron runs even when <code>verbose: off</code>, including custom session-target cron jobs, so scheduled runs stop failing silently. (#58247) Thanks @skainguyen1412.</li>
<li>Telegram/exec approvals: fall back to the origin session key for async approval followups and keep resume-failure status delivery sanitized so Telegram followups still land without leaking raw exec metadata. (#59351) Thanks @seonang.</li>
<li>Node-host/exec approvals: bind <code>pnpm dlx</code> invocations through the approval planner's mutable-script path so the effective runtime command is resolved for approval instead of being left unbound. (#58374)</li>
<li>Exec/node hosts: stop forwarding the gateway workspace cwd to remote node exec when no workdir was explicitly requested, so cross-platform node approvals fall back to the node default cwd instead of failing with <code>SYSTEM_RUN_DENIED</code>. (#58977) Thanks @Starhappysh.</li>
<li>Exec approvals/channels: decouple initiating-surface approval availability from native delivery enablement so Telegram, Slack, and Discord still expose approvals when approvers exist and native target routing is configured separately. (#59776) Thanks @joelnishanth.</li>
</ul>
<h3>Changes</h3>
<ul>
<li>macOS/Voice Wake: add the Voice Wake option to trigger Talk Mode. (#58490) Thanks @SmoothExec.</li>
<li>Tasks/chat: add <code>/tasks</code> as a chat-native background task board for the current session, with recent task details and agent-local fallback counts when no linked tasks are visible. Related #54226. Thanks @vincentkoc.</li>
<li>Web search/SearXNG: add the bundled SearXNG provider plugin for <code>web_search</code> with configurable host support. (#57317) Thanks @cgdusek.</li>
<li>Telegram/errors: add configurable <code>errorPolicy</code> and <code>errorCooldownMs</code> controls so Telegram can suppress repeated delivery errors per account, chat, and topic without muting distinct failures. (#51914) Thanks @chinar-amrutkar</li>
<li>Gateway/webchat: make <code>chat.history</code> text truncation configurable with <code>gateway.webchat.chatHistoryMaxChars</code> and per-request <code>maxChars</code>, while preserving silent-reply filtering and existing default payload limits. (#58900)</li>
<li>Amazon Bedrock/Guardrails: add Bedrock Guardrails support to the bundled provider. (#58588) Thanks @MikeORed.</li>
<li>ZAI/models: add <code>glm-5.1</code> and <code>glm-5v-turbo</code> to the bundled Z.AI provider catalog. (#58793) Thanks @tomsun28</li>
<li>Agents/default params: add <code>agents.defaults.params</code> for global default provider parameters. (#58548) Thanks @lpender.</li>
<li>Agents/failover: cap prompt-side and assistant-side same-provider auth-profile retries for rate-limit failures before cross-provider model fallback, add the <code>auth.cooldowns.rateLimitedProfileRotations</code> knob, and document the new fallback behavior. (#58707) Thanks @Forgely3D</li>
<li>Agents/compaction: resolve <code>agents.defaults.compaction.model</code> consistently for manual <code>/compact</code> and other context-engine compaction paths, so engine-owned compaction uses the configured override model across runtime entrypoints. (#56710) Thanks @oliviareid-svg</li>
<li>Cron/tools allowlist: add <code>openclaw cron --tools</code> for per-job tool allowlists. (#58504) Thanks @andyk-ms.</li>
</ul>
<h3>Fixes</h3>
<ul>
<li>Chat/error replies: stop leaking raw provider/runtime failures into external chat channels, return a friendly retry message instead, and add a specific <code>/new</code> hint for Bedrock toolResult/toolUse session mismatches. (#58831) Thanks @ImLukeF.</li>
<li>Sessions/model switching: keep <code>/model</code> changes queued behind busy runs instead of interrupting the active turn, and retarget queued followups so later work picks up the new model as soon as the current turn finishes.</li>
<li>Web UI/OpenResponses: preserve rewritten stream snapshots in webchat and keep OpenResponses final streamed text aligned when models rewind earlier output. (#58641) Thanks @neeravmakwana</li>
<li>Discord/inbound media: pass Discord attachment and sticker downloads through the shared idle-timeout and worker-abort path so slow or stuck inbound media fetches stop hanging message processing. (#58593) Thanks @aquaright1</li>
<li>Telegram/retries: keep non-idempotent sends on the strict safe-send path, retry wrapped pre-connect failures, and preserve <code>429</code> / <code>retry_after</code> backoff for safe delivery retries. (#51895) Thanks @chinar-amrutkar</li>
<li>Telegram/exec approvals: route topic-aware exec approval followups through Telegram-owned threading and approval-target parsing, so forum-topic approvals stay in the originating topic instead of falling back to the root chat. (#58783)</li>
<li>Telegram/local Bot API: preserve media MIME types for absolute-path downloads so local audio files still trigger transcription and other MIME-based handling. (#54603) Thanks @jzakirov</li>
<li>Channels/WhatsApp: pass inbound message timestamp to model context so the AI can see when WhatsApp messages were sent. (#58590) Thanks @Maninae</li>
<li>QQBot/voice: lazy-load <code>silk-wasm</code> in <code>audio-convert.ts</code> so qqbot still starts when the optional voice dependency is missing, while voice encode/decode degrades gracefully instead of crashing at module load time. (#58829) Thanks @WideLee.</li>
</ul>
<p><a href="https://github.com/openclaw/openclaw/blob/main/CHANGELOG.md">View full changelog</a></p>
]]></description>
<enclosure url="https://github.com/openclaw/openclaw/releases/download/v2026.4.2/OpenClaw-2026.4.2.zip" length="25843797" type="application/octet-stream" sparkle:edSignature="bNNXr4BJEU8W7ghXOujLJTYHZL2PL/r/p4llGBw0BFL+46mJ2Bir+IK8XQaCj5zp+O5JSuh5mY+Y/Nrq6TR7Cg=="/>
</item>
<item>
<title>2026.4.1</title>
<pubDate>Wed, 01 Apr 2026 17:14:12 +0000</pubDate>
<link>https://raw.githubusercontent.com/openclaw/openclaw/main/appcast.xml</link>
<sparkle:version>2026040190</sparkle:version>
<sparkle:shortVersionString>2026.4.1</sparkle:shortVersionString>
<sparkle:minimumSystemVersion>15.0</sparkle:minimumSystemVersion>
<description><![CDATA[<h2>OpenClaw 2026.4.1</h2>
<h3>Changes</h3>
<ul>
<li>Tasks/chat: add <code>/tasks</code> as a chat-native background task board for the current session, with recent task details and agent-local fallback counts when no linked tasks are visible. Related #54226. Thanks @vincentkoc.</li>
<li>Web search/SearXNG: add the bundled SearXNG provider plugin for <code>web_search</code> with configurable host support. (#57317) Thanks @cgdusek.</li>
<li>Amazon Bedrock/Guardrails: add Bedrock Guardrails support to the bundled provider. (#58588) Thanks @MikeORed.</li>
<li>macOS/Voice Wake: add the Voice Wake option to trigger Talk Mode. (#58490) Thanks @SmoothExec.</li>
<li>Feishu/comments: add a dedicated Drive comment-event flow with comment-thread context resolution, in-thread replies, and <code>feishu_drive</code> comment actions for document collaboration workflows. (#58497) Thanks @wittam-01.</li>
<li>Gateway/webchat: make <code>chat.history</code> text truncation configurable with <code>gateway.webchat.chatHistoryMaxChars</code> and per-request <code>maxChars</code>, while preserving silent-reply filtering and existing default payload limits. (#58900)</li>
<li>Agents/default params: add <code>agents.defaults.params</code> for global default provider parameters. (#58548) Thanks @lpender.</li>
<li>Agents/failover: cap prompt-side and assistant-side same-provider auth-profile retries for rate-limit failures before cross-provider model fallback, add the <code>auth.cooldowns.rateLimitedProfileRotations</code> knob, and document the new fallback behavior. (#58707) Thanks @Forgely3D</li>
<li>Cron/tools allowlist: add <code>openclaw cron --tools</code> for per-job tool allowlists. (#58504) Thanks @andyk-ms.</li>
<li>Channels/session routing: move provider-specific session conversation grammar into plugin-owned session-key surfaces, preserving Telegram topic routing and Feishu scoped inheritance across bootstrap, model override, restart, and tool-policy paths.</li>
<li>WhatsApp/reactions: add <code>reactionLevel</code> guidance for agent reactions. Thanks @mcaxtr.</li>
<li>Telegram/errors: add configurable <code>errorPolicy</code> and <code>errorCooldownMs</code> controls so Telegram can suppress repeated delivery errors per account, chat, and topic without muting distinct failures. (#51914) Thanks @chinar-amrutkar</li>
<li>ZAI/models: add <code>glm-5.1</code> and <code>glm-5v-turbo</code> to the bundled Z.AI provider catalog. (#58793) Thanks @tomsun28</li>
<li>Agents/compaction: resolve <code>agents.defaults.compaction.model</code> consistently for manual <code>/compact</code> and other context-engine compaction paths, so engine-owned compaction uses the configured override model across runtime entrypoints. (#56710) Thanks @oliviareid-svg</li>
</ul>
<h3>Fixes</h3>
<ul>
<li>Chat/error replies: stop leaking raw provider/runtime failures into external chat channels, return a friendly retry message instead, and add a specific <code>/new</code> hint for Bedrock toolResult/toolUse session mismatches. (#58831) Thanks @ImLukeF.</li>
<li>Gateway/reload: ignore startup config writes by persisted hash in the config reloader so generated auth tokens and seeded Control UI origins do not trigger a restart loop, while real <code>gateway.auth.*</code> edits still require restart. (#58678) Thanks @yelog</li>
<li>Tasks/gateway: keep the task registry maintenance sweep from stalling the gateway event loop under synchronous SQLite pressure, so upgraded gateways stop hanging about a minute after startup. (#58670) Thanks @openperf</li>
<li>Tasks/status: hide stale completed background tasks from <code>/status</code> and <code>session_status</code>, prefer live task context, and show recent failures only when no active work remains. (#58661) Thanks @vincentkoc</li>
<li>Tasks/gateway: re-check the current task record before maintenance marks runs lost or prunes them, so a task heartbeat or cleanup update that lands during a sweep no longer gets overwritten by stale snapshot state.</li>
<li>Exec/approvals: honor <code>exec-approvals.json</code> security defaults when inline or configured tool policy is unset, and keep Slack and Discord native approval handling aligned with inferred approvers and real channel enablement so remote exec stops falling into false approval timeouts and disabled states. Thanks @scoootscooob and @vincentkoc.</li>
<li>Exec/approvals: make <code>allow-always</code> persist as durable user-approved trust instead of behaving like <code>allow-once</code>, reuse exact-command trust on shell-wrapper paths that cannot safely persist an executable allowlist entry, keep static allowlist entries from silently bypassing <code>ask:"always"</code>, and require explicit approval when Windows cannot build an allowlist execution plan instead of hard-dead-ending remote exec. Thanks @scoootscooob and @vincentkoc.</li>
<li>Exec/cron: resolve isolated cron no-route approval dead-ends from the effective host fallback policy when trusted automation is allowed, and make <code>openclaw doctor</code> warn when <code>tools.exec</code> is broader than <code>~/.openclaw/exec-approvals.json</code> so stricter host-policy conflicts are explicit. Thanks @scoootscooob and @vincentkoc.</li>
<li>Sessions/model switching: keep <code>/model</code> changes queued behind busy runs instead of interrupting the active turn, and retarget queued followups so later work picks up the new model as soon as the current turn finishes.</li>
<li>Gateway/HTTP: skip failing HTTP request stages so one broken facade no longer forces every HTTP endpoint to return 500. (#58746) Thanks @yelog</li>
<li>Gateway/nodes: stop pinning live node commands to the approved node-pair record. Node pairing remains a trust/token flow, while per-node <code>system.run</code> policy stays in that node's exec approvals config. Fixes #58824.</li>
<li>WebChat/exec approvals: use native approval UI guidance in agent system prompts instead of telling agents to paste manual <code>/approve</code> commands in webchat sessions. Thanks @vincentkoc.</li>
<li>Web UI/OpenResponses: preserve rewritten stream snapshots in webchat and keep OpenResponses final streamed text aligned when models rewind earlier output. (#58641) Thanks @neeravmakwana</li>
<li>Discord/inbound media: pass Discord attachment and sticker downloads through the shared idle-timeout and worker-abort path so slow or stuck inbound media fetches stop hanging message processing. (#58593) Thanks @aquaright1</li>
<li>Telegram/retries: keep non-idempotent sends on the strict safe-send path, retry wrapped pre-connect failures, and preserve <code>429</code> / <code>retry_after</code> backoff for safe delivery retries. (#51895) Thanks @chinar-amrutkar</li>
<li>Telegram/exec approvals: route topic-aware exec approval followups through Telegram-owned threading and approval-target parsing, so forum-topic approvals stay in the originating topic instead of falling back to the root chat. (#58783)</li>
<li>Telegram/local Bot API: preserve media MIME types for absolute-path downloads so local audio files still trigger transcription and other MIME-based handling. (#54603) Thanks @jzakirov</li>
<li>Channels/WhatsApp: pass inbound message timestamp to model context so the AI can see when WhatsApp messages were sent. (#58590) Thanks @Maninae</li>
<li>Channels/QQ Bot: keep <code>/bot-logs</code> export gated behind a truly explicit QQBot allowlist, rejecting wildcard and mixed wildcard entries while preserving the real framework command path. Thanks @vincentkoc.</li>
<li>Channels/plugins: keep bundled channel plugins loadable from legacy <code>channels.<id></code> config even under restrictive plugin allowlists, and make <code>openclaw doctor</code> warn only on real plugin blockers instead of misleading setup guidance. (#58873) Thanks @obviyus</li>
<li>Plugins/bundled runtimes: restore externalized bundled plugin runtime dependency staging across packed installs, Docker builds, and local runtime staging so bundled plugins keep their declared runtime deps after the 2026.3.31 externalization change. (#58782)</li>
<li>LINE/runtime: resolve the packaged runtime contract from the built <code>dist/plugins/runtime</code> layout so LINE channels start correctly again after global npm installs on <code>2026.3.31</code>. (#58799) Thanks @vincentkoc.</li>
<li>MiniMax/plugins: auto-enable the bundled MiniMax plugin for API-key auth/config so MiniMax image generation and other plugin-owned capabilities load without manual plugin allowlisting. (#57127) Thanks @tars90percent.</li>
<li>Ollama/model picker: show only Ollama models after provider selection in the CLI picker. (#55290) Thanks @Luckymingxuan.</li>
<li>CDP/profiles: prefer <code>cdpPort</code> over stale WebSocket URLs so browser automation reconnects cleanly. (#58499) Thanks @Mlightsnow.</li>
<li>Media/paths: resolve relative <code>MEDIA</code> paths against the agent workspace so local attachment references keep working. (#58624) Thanks @aquaright1.</li>
<li>Memory/session indexing: keep full reindexes from skipping session transcripts when sync is triggered by <code>session-start</code> or <code>watch</code>, so restart-driven reindexes preserve session memory. (#39732) Thanks @upupc</li>
<li>Memory/QMD: prefer <code>--mask</code> over <code>--glob</code> when creating QMD collections so default memory collections keep their intended patterns and stop colliding on restart. (#58643) Thanks @GitZhangChi.</li>
<li>Subagents/tasks: keep subagent completion and cleanup from crashing when task-registry writes fail, so a corrupt or missing task row no longer takes down the gateway during lifecycle finalization. Thanks @vincentkoc.</li>
<li>Sandbox/browser: compare browser runtime inspection against <code>agents.defaults.sandbox.browser.image</code> so <code>openclaw sandbox list --browser</code> stops reporting healthy browser containers as image mismatches. (#58759) Thanks @sandpile.</li>
<li>Plugins/install: forward <code>--dangerously-force-unsafe-install</code> through archive and npm-spec plugin installs so the documented override reaches the security scanner on those install paths. (#58879) Thanks @ryanlee-gemini.</li>
<li>Auto-reply/commands: strip inbound metadata before slash command detection so wrapped <code>/model</code>, <code>/new</code>, and <code>/status</code> commands are recognized. (#58725) Thanks @Mlightsnow.</li>
<li>Agents/Anthropic: preserve thinking blocks and signatures across replay, cache-control patching, and context pruning so compacted Anthropic sessions continue working instead of failing on later turns. (#58916) Thanks @obviyus</li>
<li>Agents/failover: unify structured and raw provider error classification so provider-specific <code>400</code>/<code>422</code> payloads no longer get forced into generic format failures before retry, billing, or compaction logic can inspect them. (#58856) Thanks @aaron-he-zhu.</li>
<li>Auth profiles/store: coerce misplaced SecretRef objects out of plaintext <code>key</code> and <code>token</code> fields during store load so agents without ACP runtime stop crashing on <code>.trim()</code> after upgrade. (#58923) Thanks @openperf.</li>
<li>ACPX/runtime: repair <code>queue owner unavailable</code> session recovery by replacing dead named sessions and resuming the backend session when ACPX exposes a stable session id, so the first ACP prompt no longer inherits a dead handle. (#58669) Thanks @neeravmakwana</li>
<li>ACPX/runtime: retry dead-session queue-owner repair without <code>--resume-session</code> when the reported ACPX session id is stale, so recovery still creates a fresh named session instead of failing session init. Thanks @obviyus.</li>
<li>Auth/OpenAI Codex: persist plugin-refreshed OAuth credentials to <code>auth-profiles.json</code> before returning them, so rotated Codex refresh tokens survive restart and stop falling into <code>refresh_token_reused</code> loops. (#53082)</li>
<li>Discord/gateway: hand reconnect ownership back to Carbon, keep runtime status aligned with close/reconnect state, and force-stop sockets that open without reaching READY so Discord monitors recover promptly instead of waiting on stale health timeouts. (#59019) Thanks @obviyus</li>
</ul>
<p><a href="https://github.com/openclaw/openclaw/blob/main/CHANGELOG.md">View full changelog</a></p>
]]></description>
<enclosure url="https://github.com/openclaw/openclaw/releases/download/v2026.4.1/OpenClaw-2026.4.1.zip" length="25841903" type="application/octet-stream" sparkle:edSignature="0TPiyshScmwDbgs626JU08NOUUFJmIsVFa5g0xmizfl64Fr+IoT4l/dkXarFqbZAJidtj5WN7Bff7fG8ye/7AA=="/>
</item>
</channel>
</rss>

View File

@@ -65,8 +65,8 @@ android {
applicationId = "ai.openclaw.app"
minSdk = 31
targetSdk = 36
versionCode = 2026040601
versionName = "2026.4.6"
versionCode = 2026040901
versionName = "2026.4.9"
ndk {
// Support all major ABIs — native libs are tiny (~47 KB per ABI)
abiFilters += listOf("armeabi-v7a", "arm64-v8a", "x86", "x86_64")

View File

@@ -204,6 +204,10 @@ class MainViewModel(app: Application) : AndroidViewModel(app) {
prefs.setGatewayPassword(value)
}
fun resetGatewaySetupAuth() {
ensureRuntime().resetGatewaySetupAuth()
}
fun setOnboardingCompleted(value: Boolean) {
if (value) {
ensureRuntime()

View File

@@ -556,6 +556,12 @@ class NodeRuntime(
fun setGatewayToken(value: String) = prefs.setGatewayToken(value)
fun setGatewayBootstrapToken(value: String) = prefs.setGatewayBootstrapToken(value)
fun setGatewayPassword(value: String) = prefs.setGatewayPassword(value)
fun resetGatewaySetupAuth() {
prefs.clearGatewaySetupAuth()
val deviceId = identityStore.loadOrCreate().deviceId
deviceAuthStore.clearToken(deviceId, "node")
deviceAuthStore.clearToken(deviceId, "operator")
}
fun setOnboardingCompleted(value: Boolean) = prefs.setOnboardingCompleted(value)
val lastDiscoveredStableId: StateFlow<String> = prefs.lastDiscoveredStableId
val canvasDebugStatusEnabled: StateFlow<Boolean> = prefs.canvasDebugStatusEnabled
@@ -1325,8 +1331,6 @@ internal fun resolveOperatorSessionConnectAuth(
val storedToken = storedOperatorToken?.trim()?.takeIf { it.isNotEmpty() }
if (storedToken != null) {
// Bootstrap can seed the operator token, but operator should reconnect
// through the stored device-token path rather than bootstrap auth itself.
return NodeRuntime.GatewayConnectAuth(
token = null,
bootstrapToken = null,
@@ -1334,6 +1338,15 @@ internal fun resolveOperatorSessionConnectAuth(
)
}
val explicitBootstrapToken = auth.bootstrapToken?.trim()?.takeIf { it.isNotEmpty() }
if (explicitBootstrapToken != null) {
return NodeRuntime.GatewayConnectAuth(
token = null,
bootstrapToken = explicitBootstrapToken,
password = null,
)
}
return null
}

View File

@@ -402,6 +402,18 @@ class SecurePrefs(
securePrefs.edit { putString(key, password.trim()) }
}
fun clearGatewaySetupAuth() {
val instanceId = _instanceId.value
securePrefs.edit {
remove("gateway.manual.token")
remove("gateway.token.$instanceId")
remove("gateway.bootstrapToken.$instanceId")
remove("gateway.password.$instanceId")
}
_gatewayToken.value = ""
_gatewayBootstrapToken.value = ""
}
fun loadGatewayTlsFingerprint(stableId: String): String? {
val key = "gateway.tls.$stableId"
return plainPrefs.getString(key, null)?.trim()?.takeIf { it.isNotEmpty() }

View File

@@ -38,6 +38,7 @@ import androidx.compose.material3.SwitchDefaults
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
@@ -140,8 +141,13 @@ fun ConnectTabScreen(viewModel: MainViewModel) {
}
val showDiagnostics = !isConnected && gatewayStatusHasDiagnostics(statusText)
val pairingRequired = !isConnected && gatewayStatusLooksLikePairing(statusText)
val statusLabel = gatewayStatusForDisplay(statusText)
PairingAutoRetryEffect(enabled = pairingRequired) {
viewModel.refreshGatewayConnection()
}
Column(
modifier = Modifier.verticalScroll(rememberScrollState()).padding(horizontal = 20.dp, vertical = 16.dp),
verticalArrangement = Arrangement.spacedBy(14.dp),
@@ -278,6 +284,9 @@ fun ConnectTabScreen(viewModel: MainViewModel) {
}
validationText = null
if (inputMode == ConnectInputMode.SetupCode) {
viewModel.resetGatewaySetupAuth()
}
viewModel.setManualEnabled(true)
viewModel.setManualHost(config.host)
viewModel.setManualPort(config.port)
@@ -319,8 +328,17 @@ fun ConnectTabScreen(viewModel: MainViewModel) {
modifier = Modifier.fillMaxWidth().padding(horizontal = 14.dp, vertical = 14.dp),
verticalArrangement = Arrangement.spacedBy(10.dp),
) {
Text("Last gateway error", style = mobileHeadline, color = mobileWarning)
Text(if (pairingRequired) "Pairing required" else "Last gateway error", style = mobileHeadline, color = mobileWarning)
Text(statusLabel, style = mobileBody.copy(fontFamily = FontFamily.Monospace), color = mobileText)
if (pairingRequired) {
Text(
"Approve this phone on the gateway. OpenClaw retries automatically while this screen stays open.",
style = mobileCallout,
color = mobileTextSecondary,
)
CommandBlock("openclaw devices list")
CommandBlock("openclaw devices approve <requestId>")
}
Text("OpenClaw Android ${openClawAndroidVersionLabel()}", style = mobileCaption1, color = mobileTextSecondary)
Button(
onClick = {
@@ -464,14 +482,18 @@ fun ConnectTabScreen(viewModel: MainViewModel) {
colors = outlinedColors(),
)
Text("Port", style = mobileCaption1.copy(fontWeight = FontWeight.SemiBold), color = mobileTextSecondary)
Text(
if (manualTlsInput) "Port (optional, defaults to 443)" else "Port",
style = mobileCaption1.copy(fontWeight = FontWeight.SemiBold),
color = mobileTextSecondary,
)
OutlinedTextField(
value = manualPortInput,
onValueChange = {
manualPortInput = it
validationText = null
},
placeholder = { Text("18789", style = mobileBody, color = mobileTextTertiary) },
placeholder = { Text(if (manualTlsInput) "443" else "18789", style = mobileBody, color = mobileTextTertiary) },
modifier = Modifier.fillMaxWidth(),
singleLine = true,
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Number),

View File

@@ -235,15 +235,21 @@ internal fun gatewayEndpointValidationMessage(
when (source) {
GatewayEndpointInputSource.SETUP_CODE -> "Setup code has invalid gateway URL."
GatewayEndpointInputSource.QR_SCAN -> "QR code did not contain a valid setup code."
GatewayEndpointInputSource.MANUAL -> "Enter a valid manual host and port to connect."
GatewayEndpointInputSource.MANUAL -> "Enter a valid manual endpoint to connect."
}
}
}
internal fun composeGatewayManualUrl(hostInput: String, portInput: String, tls: Boolean): String? {
val host = hostInput.trim()
val port = portInput.trim().toIntOrNull() ?: return null
if (host.isEmpty() || port !in 1..65535) return null
if (host.isEmpty()) return null
val portTrimmed = portInput.trim()
val port = if (portTrimmed.isEmpty()) {
if (tls) 443 else return null
} else {
portTrimmed.toIntOrNull() ?: return null
}
if (port !in 1..65535) return null
val scheme = if (tls) "https" else "http"
return "$scheme://$host:$port"
}

View File

@@ -0,0 +1,45 @@
package ai.openclaw.app.ui
import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleEventObserver
import androidx.lifecycle.compose.LocalLifecycleOwner
import kotlinx.coroutines.delay
internal const val PAIRING_AUTO_RETRY_MS = 6_000L
@Composable
internal fun PairingAutoRetryEffect(enabled: Boolean, onRetry: () -> Unit) {
val lifecycleOwner = LocalLifecycleOwner.current
var lifecycleStarted by
remember(lifecycleOwner) {
mutableStateOf(lifecycleOwner.lifecycle.currentState.isAtLeast(Lifecycle.State.STARTED))
}
DisposableEffect(lifecycleOwner) {
val observer =
LifecycleEventObserver { _, _ ->
lifecycleStarted = lifecycleOwner.lifecycle.currentState.isAtLeast(Lifecycle.State.STARTED)
}
lifecycleOwner.lifecycle.addObserver(observer)
onDispose {
lifecycleOwner.lifecycle.removeObserver(observer)
}
}
LaunchedEffect(enabled, lifecycleStarted) {
if (!enabled || !lifecycleStarted) {
return@LaunchedEffect
}
while (true) {
delay(PAIRING_AUTO_RETRY_MS)
onRetry()
}
}
}

View File

@@ -576,6 +576,7 @@ fun OnboardingFlow(viewModel: MainViewModel, modifier: Modifier = Modifier) {
return@addOnSuccessListener
}
setupCode = scannedSetupCode.setupCode
viewModel.resetGatewaySetupAuth()
gatewayInputMode = GatewayInputMode.SetupCode
gatewayError = null
attemptedConnect = false
@@ -737,6 +738,7 @@ fun OnboardingFlow(viewModel: MainViewModel, modifier: Modifier = Modifier) {
)
OnboardingStep.FinalCheck ->
FinalStep(
viewModel = viewModel,
parsedGateway = parseGatewayEndpoint(gatewayUrl),
statusText = statusText,
isConnected = canFinishOnboarding,
@@ -812,6 +814,7 @@ fun OnboardingFlow(viewModel: MainViewModel, modifier: Modifier = Modifier) {
)
return@Button
}
viewModel.resetGatewaySetupAuth()
gatewayUrl = parsedSetup.url
viewModel.setGatewayBootstrapToken(parsedSetup.bootstrapToken.orEmpty())
val sharedToken = parsedSetup.token.orEmpty().trim()
@@ -887,6 +890,12 @@ fun OnboardingFlow(viewModel: MainViewModel, modifier: Modifier = Modifier) {
}
val token = persistedGatewayToken.trim()
val password = gatewayPassword.trim()
val bootstrapToken =
if (gatewayInputMode == GatewayInputMode.SetupCode) {
decodeGatewaySetupCode(setupCode)?.bootstrapToken?.trim()?.ifEmpty { null }
} else {
null
}
attemptedConnect = true
viewModel.setManualEnabled(true)
viewModel.setManualHost(parsed.config.host)
@@ -894,6 +903,9 @@ fun OnboardingFlow(viewModel: MainViewModel, modifier: Modifier = Modifier) {
viewModel.setManualTls(parsed.config.tls)
if (gatewayInputMode == GatewayInputMode.Manual) {
viewModel.setGatewayBootstrapToken("")
} else {
viewModel.resetGatewaySetupAuth()
viewModel.setGatewayBootstrapToken(bootstrapToken.orEmpty())
}
if (token.isNotEmpty()) {
viewModel.setGatewayToken(token)
@@ -904,12 +916,7 @@ fun OnboardingFlow(viewModel: MainViewModel, modifier: Modifier = Modifier) {
viewModel.connect(
GatewayEndpoint.manual(host = parsed.config.host, port = parsed.config.port),
token = token.ifEmpty { null },
bootstrapToken =
if (gatewayInputMode == GatewayInputMode.SetupCode) {
decodeGatewaySetupCode(setupCode)?.bootstrapToken?.trim()?.ifEmpty { null }
} else {
null
},
bootstrapToken = bootstrapToken,
password = password.ifEmpty { null },
)
},
@@ -1148,11 +1155,15 @@ private fun GatewayStep(
onboardingTextFieldColors(),
)
Text("PORT", style = onboardingCaption1Style.copy(letterSpacing = 0.9.sp), color = onboardingTextSecondary)
Text(
if (manualTls) "PORT (optional, defaults to 443)" else "PORT",
style = onboardingCaption1Style.copy(letterSpacing = 0.9.sp),
color = onboardingTextSecondary,
)
OutlinedTextField(
value = manualPort,
onValueChange = onManualPortChange,
placeholder = { Text("18789", color = onboardingTextTertiary, style = onboardingBodyStyle) },
placeholder = { Text(if (manualTls) "443" else "18789", color = onboardingTextTertiary, style = onboardingBodyStyle) },
modifier = Modifier.fillMaxWidth(),
singleLine = true,
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Number),
@@ -1562,6 +1573,7 @@ private fun PermissionToggleRow(
@Composable
private fun FinalStep(
viewModel: MainViewModel,
parsedGateway: GatewayEndpointConfig?,
statusText: String,
isConnected: Boolean,
@@ -1577,6 +1589,10 @@ private fun FinalStep(
val showDiagnostics = gatewayStatusHasDiagnostics(statusText)
val pairingRequired = gatewayStatusLooksLikePairing(statusText)
PairingAutoRetryEffect(enabled = pairingRequired && attemptedConnect) {
viewModel.refreshGatewayConnection()
}
Column(verticalArrangement = Arrangement.spacedBy(10.dp)) {
Text("Review", style = onboardingTitle1Style, color = onboardingText)
@@ -1757,7 +1773,11 @@ private fun FinalStep(
if (pairingRequired) {
CommandBlock("openclaw devices list")
CommandBlock("openclaw devices approve <requestId>")
Text("Then tap Connect again.", style = onboardingCalloutStyle, color = onboardingTextSecondary)
Text(
"OpenClaw retries automatically while this screen stays open.",
style = onboardingCalloutStyle,
color = onboardingTextSecondary,
)
}
}
}

View File

@@ -1,6 +1,8 @@
package ai.openclaw.app
import ai.openclaw.app.gateway.GatewayEndpoint
import ai.openclaw.app.gateway.DeviceAuthStore
import ai.openclaw.app.gateway.DeviceIdentityStore
import ai.openclaw.app.gateway.GatewaySession
import ai.openclaw.app.gateway.GatewayTlsProbeFailure
import ai.openclaw.app.gateway.GatewayTlsProbeResult
@@ -21,14 +23,14 @@ import java.util.UUID
@Config(sdk = [34])
class GatewayBootstrapAuthTest {
@Test
fun skipsOperatorSessionWhenOnlyBootstrapAuthExists() {
assertFalse(
fun connectsOperatorSessionWhenOnlyBootstrapAuthExists() {
assertTrue(
shouldConnectOperatorSession(
NodeRuntime.GatewayConnectAuth(token = "", bootstrapToken = "bootstrap-1", password = ""),
storedOperatorToken = "",
),
)
assertFalse(
assertTrue(
shouldConnectOperatorSession(
NodeRuntime.GatewayConnectAuth(token = null, bootstrapToken = "bootstrap-1", password = null),
storedOperatorToken = null,
@@ -75,6 +77,20 @@ class GatewayBootstrapAuthTest {
assertEquals(NodeRuntime.GatewayConnectAuth(token = null, bootstrapToken = null, password = null), resolved)
}
@Test
fun resolveOperatorSessionConnectAuthUsesBootstrapWhenNoStoredOperatorTokenExists() {
val resolved =
resolveOperatorSessionConnectAuth(
auth = NodeRuntime.GatewayConnectAuth(token = null, bootstrapToken = "bootstrap-1", password = null),
storedOperatorToken = null,
)
assertEquals(
NodeRuntime.GatewayConnectAuth(token = null, bootstrapToken = "bootstrap-1", password = null),
resolved,
)
}
@Test
fun resolveOperatorSessionConnectAuthPrefersExplicitSharedAuth() {
val resolved =
@@ -152,7 +168,7 @@ class GatewayBootstrapAuthTest {
assertEquals("fp-1", prefs.loadGatewayTlsFingerprint(endpoint.stableId))
assertEquals("setup-bootstrap-token", desiredBootstrapToken(runtime, "nodeSession"))
assertNull(desiredBootstrapToken(runtime, "operatorSession"))
assertEquals("setup-bootstrap-token", desiredBootstrapToken(runtime, "operatorSession"))
}
@Test
@@ -178,6 +194,33 @@ class GatewayBootstrapAuthTest {
assertNull(runtime.pendingGatewayTrust.value)
}
@Test
fun resetGatewaySetupAuth_clearsStoredGatewayAndDeviceTokens() {
val app = RuntimeEnvironment.getApplication()
val securePrefs =
app.getSharedPreferences(
"openclaw.node.secure.test.${UUID.randomUUID()}",
android.content.Context.MODE_PRIVATE,
)
val prefs = SecurePrefs(app, securePrefsOverride = securePrefs)
val runtime = NodeRuntime(app, prefs)
val deviceId = DeviceIdentityStore(app).loadOrCreate().deviceId
val authStore = DeviceAuthStore(prefs)
prefs.setGatewayToken("stale-shared-token")
prefs.setGatewayBootstrapToken("stale-bootstrap-token")
prefs.setGatewayPassword("stale-password")
authStore.saveToken(deviceId, "node", "stale-node-token")
authStore.saveToken(deviceId, "operator", "stale-operator-token")
runtime.resetGatewaySetupAuth()
assertNull(prefs.loadGatewayToken())
assertNull(prefs.loadGatewayBootstrapToken())
assertNull(prefs.loadGatewayPassword())
assertNull(authStore.loadToken(deviceId, "node"))
assertNull(authStore.loadToken(deviceId, "operator"))
}
private fun waitForGatewayTrustPrompt(runtime: NodeRuntime): NodeRuntime.GatewayTrustPrompt {
repeat(50) {
runtime.pendingGatewayTrust.value?.let { return it }

View File

@@ -2,6 +2,7 @@ package ai.openclaw.app
import android.content.Context
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNull
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
@@ -35,4 +36,24 @@ class SecurePrefsTest {
assertEquals("bootstrap-token", prefs.loadGatewayBootstrapToken())
assertEquals("bootstrap-token", prefs.gatewayBootstrapToken.value)
}
@Test
fun clearGatewaySetupAuth_removesStoredGatewayAuth() {
val context = RuntimeEnvironment.getApplication()
val securePrefs = context.getSharedPreferences("openclaw.node.secure.test.clear", Context.MODE_PRIVATE)
securePrefs.edit().clear().commit()
val prefs = SecurePrefs(context, securePrefsOverride = securePrefs)
prefs.setGatewayToken("shared-token")
prefs.setGatewayBootstrapToken("bootstrap-token")
prefs.setGatewayPassword("password-token")
prefs.clearGatewaySetupAuth()
assertEquals("", prefs.gatewayToken.value)
assertEquals("", prefs.gatewayBootstrapToken.value)
assertNull(prefs.loadGatewayToken())
assertNull(prefs.loadGatewayBootstrapToken())
assertNull(prefs.loadGatewayPassword())
}
}

View File

@@ -464,6 +464,42 @@ class GatewayConfigResolverTest {
assertEquals(false, resolved?.tls)
}
@Test
fun composeGatewayManualUrlDefaultsPortTo443WhenTlsAndPortBlank() {
val url = composeGatewayManualUrl("mydevice.tail1234.ts.net", "", tls = true)
assertEquals("https://mydevice.tail1234.ts.net:443", url)
}
@Test
fun composeGatewayManualUrlRejectsBlankPortWhenTlsIsOff() {
val url = composeGatewayManualUrl("127.0.0.1", "", tls = false)
assertNull(url)
}
@Test
fun resolveGatewayConnectConfigManualAcceptsTailscaleHostWithoutPort() {
val resolved =
resolveGatewayConnectConfig(
useSetupCode = false,
setupCode = "",
savedManualHost = "",
savedManualPort = "",
savedManualTls = true,
manualHostInput = "mydevice.tail1234.ts.net",
manualPortInput = "",
manualTlsInput = true,
fallbackBootstrapToken = "",
fallbackToken = "",
fallbackPassword = "",
)
assertEquals("mydevice.tail1234.ts.net", resolved?.host)
assertEquals(443, resolved?.port)
assertEquals(true, resolved?.tls)
}
private fun encodeSetupCode(payloadJson: String): String {
return Base64.getUrlEncoder().withoutPadding().encodeToString(payloadJson.toByteArray(Charsets.UTF_8))
}

13
apps/ios/CHANGELOG.md Normal file
View File

@@ -0,0 +1,13 @@
# OpenClaw iOS Changelog
## Unreleased
### Added
### Changed
### Fixed
## 2026.4.6 - 2026-04-06
First App Store release of OpenClaw for iPhone. Pair with your OpenClaw Gateway to use chat, voice, sharing, and device actions from iOS.

View File

@@ -3,19 +3,23 @@
OPENCLAW_IOS_DEFAULT_TEAM = Y5PE65HELJ
OPENCLAW_IOS_SELECTED_TEAM = $(OPENCLAW_IOS_DEFAULT_TEAM)
OPENCLAW_DEVELOPMENT_TEAM = $(OPENCLAW_IOS_SELECTED_TEAM)
OPENCLAW_CODE_SIGN_STYLE = Automatic
OPENCLAW_APP_BUNDLE_ID = ai.openclaw.client
OPENCLAW_WATCH_APP_BUNDLE_ID = ai.openclaw.client.watchkitapp
OPENCLAW_WATCH_EXTENSION_BUNDLE_ID = ai.openclaw.client.watchkitapp.extension
OPENCLAW_ACTIVITY_WIDGET_BUNDLE_ID = ai.openclaw.client.activitywidget
OPENCLAW_WATCH_APP_PROFILE =
OPENCLAW_WATCH_EXTENSION_PROFILE =
// Local contributors can override this by running scripts/ios-configure-signing.sh.
// Keep include after defaults: xcconfig is evaluated top-to-bottom.
#include? "../.local-signing.xcconfig"
#include? "../LocalSigning.xcconfig"
CODE_SIGN_STYLE = Automatic
CODE_SIGN_STYLE = $(OPENCLAW_CODE_SIGN_STYLE)
CODE_SIGN_IDENTITY = Apple Development
DEVELOPMENT_TEAM = $(OPENCLAW_IOS_SELECTED_TEAM)
DEVELOPMENT_TEAM = $(OPENCLAW_DEVELOPMENT_TEAM)
// Let Xcode manage provisioning for the selected local team.
// Let Xcode manage provisioning for the selected local team unless a local override pins one.
PROVISIONING_PROFILE_SPECIFIER =

View File

@@ -1,8 +1,9 @@
// Shared iOS version defaults.
// Generated overrides live in build/Version.xcconfig (git-ignored).
// Source of truth: apps/ios/version.json
// Generated by scripts/ios-sync-versioning.ts.
OPENCLAW_GATEWAY_VERSION = 2026.4.6
OPENCLAW_IOS_VERSION = 2026.4.6
OPENCLAW_MARKETING_VERSION = 2026.4.6
OPENCLAW_BUILD_VERSION = 2026040601
OPENCLAW_BUILD_VERSION = 1
#include? "../build/Version.xcconfig"

View File

@@ -13,3 +13,5 @@ OPENCLAW_WATCH_EXTENSION_BUNDLE_ID = ai.openclaw.client.watchkitapp.extension
// Leave empty with automatic signing.
OPENCLAW_APP_PROFILE =
OPENCLAW_SHARE_PROFILE =
OPENCLAW_WATCH_APP_PROFILE =
OPENCLAW_WATCH_EXTENSION_PROFILE =

View File

@@ -64,10 +64,14 @@ Release behavior:
- Beta release uses canonical `ai.openclaw.client*` bundle IDs through a temporary generated xcconfig in `apps/ios/build/BetaRelease.xcconfig`.
- Beta release also switches the app to `OpenClawPushTransport=relay`, `OpenClawPushDistribution=official`, and `OpenClawPushAPNsEnvironment=production`.
- The beta flow does not modify `apps/ios/.local-signing.xcconfig` or `apps/ios/LocalSigning.xcconfig`.
- Root `package.json.version` is the only version source for iOS.
- A root version like `2026.4.1-beta.1` becomes:
- `CFBundleShortVersionString = 2026.4.1`
- `CFBundleVersion = next TestFlight build number for 2026.4.1`
- `apps/ios/version.json` is the pinned iOS release version source.
- `apps/ios/CHANGELOG.md` is the iOS-only changelog and release-note source.
- The pinned iOS version must use CalVer like `2026.4.10`.
- That pinned value becomes:
- `CFBundleShortVersionString = 2026.4.10`
- `CFBundleVersion = next TestFlight build number for 2026.4.10`
- Changing the root gateway version does not change the iOS app version until you explicitly pin from the gateway.
- See `apps/ios/VERSIONING.md` for the full workflow.
Required env for beta builds:
@@ -120,25 +124,74 @@ This should create `apps/ios/fastlane/.env` with the non-secret ASC variables wh
export OPENCLAW_PUSH_RELAY_BASE_URL=https://relay.example.com
```
4. Upload the beta:
4. If you are starting a brand-new production release train, pin iOS to the current gateway version first:
```bash
pnpm ios:version:pin -- --from-gateway
```
5. Upload the beta:
```bash
pnpm ios:beta
```
5. Expected behavior:
- Fastlane reads `package.json.version`
6. Expected behavior:
- Fastlane reads `apps/ios/version.json`
- verifies synced iOS versioning artifacts
- resolves the next TestFlight build number for that short version
- generates `apps/ios/build/BetaRelease.xcconfig`
- archives `OpenClaw`
- uploads the IPA to TestFlight
6. Expected outputs after a successful run:
7. Expected outputs after a successful run:
- `apps/ios/build/beta/OpenClaw-<version>.ipa`
- `apps/ios/build/beta/OpenClaw-<version>.app.dSYM.zip`
- Fastlane log line like `Uploaded iOS beta: version=<version> short=<short> build=<build>`
7. If this is a fresh clone on a maintainer machine that already works elsewhere, it is OK to copy the non-secret `apps/ios/fastlane/.env` from another trusted local clone on the same Mac. The Keychain-backed private key remains machine-local and is not stored in the repo.
8. If this is a fresh clone on a maintainer machine that already works elsewhere, it is OK to copy the non-secret `apps/ios/fastlane/.env` from another trusted local clone on the same Mac. The Keychain-backed private key remains machine-local and is not stored in the repo.
## iOS Versioning Workflow
- Pinned iOS release version: `apps/ios/version.json`
- iOS-only changelog: `apps/ios/CHANGELOG.md`
- Generated checked-in artifacts:
- `apps/ios/Config/Version.xcconfig`
- `apps/ios/fastlane/metadata/en-US/release_notes.txt`
- Useful commands:
```bash
pnpm ios:version
pnpm ios:version:check
pnpm ios:version:sync
pnpm ios:version:pin -- --from-gateway
pnpm ios:version:pin -- --version 2026.4.10
```
Recommended flow:
### TestFlight iteration on an existing train
1. Keep `apps/ios/version.json` pinned to the current train version.
2. Update `apps/ios/CHANGELOG.md`, usually under `## Unreleased` while iterating.
3. Run `pnpm ios:version:sync` after changelog changes.
4. Upload more TestFlight builds with `pnpm ios:beta`.
5. Let Fastlane bump only the numeric build number.
### Starting the next production release train
1. Pin iOS to the current gateway version:
```bash
pnpm ios:version:pin -- --from-gateway
```
2. Update `apps/ios/CHANGELOG.md` for the new release as needed.
3. Run `pnpm ios:version:sync`.
4. Submit the first TestFlight build for that newly pinned version.
5. Keep iterating on that same version until the release candidate is ready.
See `apps/ios/VERSIONING.md` for the detailed spec.
## APNs Expectations For Local/Manual Builds
@@ -148,6 +201,9 @@ pnpm ios:beta
- Local/manual builds default to `OpenClawPushTransport=direct` and `OpenClawPushDistribution=local`.
- Your selected team/profile must support Push Notifications for the app bundle ID you are signing.
- If push capability or provisioning is wrong, APNs registration fails at runtime (check Xcode logs for `APNs registration failed`).
- The gateway host also needs direct APNs auth configured separately with `OPENCLAW_APNS_TEAM_ID`, `OPENCLAW_APNS_KEY_ID`, and either `OPENCLAW_APNS_PRIVATE_KEY_P8` or `OPENCLAW_APNS_PRIVATE_KEY_PATH`.
- Recommended gateway-host storage for the APNs `.p8` file is `~/.openclaw/credentials/apns/AuthKey_<KEYID>.p8` with restrictive permissions, then point `OPENCLAW_APNS_PRIVATE_KEY_PATH` at that file.
- `apps/ios/fastlane/.env` only covers App Store Connect / Fastlane auth; it does not provide gateway APNs credentials for local direct-push testing.
- Debug builds default to `OpenClawPushAPNsEnvironment=sandbox`; Release builds default to `production`.
## APNs Expectations For Official Builds

View File

@@ -50,9 +50,11 @@ enum DeviceInfoHelper {
return trimmed.isEmpty ? "unknown" : trimmed
}
/// App marketing version only, e.g. "2026.2.0" or "dev".
/// Canonical app version when present, otherwise the Apple marketing version.
static func appVersion() -> String {
Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "dev"
(Bundle.main.infoDictionary?["OpenClawCanonicalVersion"] as? String)
?? (Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String)
?? "dev"
}
/// App build string, e.g. "123" or "".

View File

@@ -1,4 +1,5 @@
import Foundation
import OpenClawKit
enum GatewayConnectionIssue: Equatable {
case none
@@ -29,6 +30,37 @@ enum GatewayConnectionIssue: Equatable {
return false
}
static func detect(problem: GatewayConnectionProblem?) -> Self {
guard let problem else { return .none }
if problem.needsPairingApproval {
return .pairingRequired(requestId: problem.requestId)
}
if problem.needsCredentialUpdate {
return problem.kind == .gatewayAuthTokenMissing ? .tokenMissing : .unauthorized
}
switch problem.kind {
case .deviceIdentityRequired,
.deviceSignatureExpired,
.deviceNonceRequired,
.deviceNonceMismatch,
.deviceSignatureInvalid,
.devicePublicKeyInvalid,
.deviceIdMismatch,
.tailscaleIdentityMissing,
.tailscaleProxyMissing,
.tailscaleWhoisFailed,
.tailscaleIdentityMismatch,
.authRateLimited:
return .unauthorized
case .timeout, .connectionRefused, .reachabilityFailed, .websocketCancelled:
return .network
case .unknown:
return .unknown(problem.message)
default:
return .none
}
}
static func detect(from statusText: String) -> Self {
let trimmed = statusText.trimmingCharacters(in: .whitespacesAndNewlines)
guard !trimmed.isEmpty else { return .none }

View File

@@ -0,0 +1,232 @@
import OpenClawKit
import SwiftUI
import UIKit
struct GatewayProblemBanner: View {
let problem: GatewayConnectionProblem
var primaryActionTitle: String?
var onPrimaryAction: (() -> Void)?
var onShowDetails: (() -> Void)?
var body: some View {
VStack(alignment: .leading, spacing: 12) {
HStack(alignment: .top, spacing: 10) {
Image(systemName: self.iconName)
.font(.headline.weight(.semibold))
.foregroundStyle(self.tint)
.frame(width: 20)
.padding(.top, 2)
VStack(alignment: .leading, spacing: 6) {
HStack(alignment: .firstTextBaseline, spacing: 8) {
Text(self.problem.title)
.font(.subheadline.weight(.semibold))
.multilineTextAlignment(.leading)
Spacer(minLength: 0)
Text(self.ownerLabel)
.font(.caption.weight(.semibold))
.foregroundStyle(.secondary)
}
Text(self.problem.message)
.font(.footnote)
.foregroundStyle(.secondary)
.fixedSize(horizontal: false, vertical: true)
if let requestId = self.problem.requestId {
Text("Request ID: \(requestId)")
.font(.system(.caption, design: .monospaced).weight(.medium))
.foregroundStyle(.secondary)
.textSelection(.enabled)
}
}
}
HStack(spacing: 10) {
if let primaryActionTitle, let onPrimaryAction {
Button(primaryActionTitle, action: onPrimaryAction)
.buttonStyle(.borderedProminent)
.controlSize(.small)
}
if let onShowDetails {
Button("Details", action: onShowDetails)
.buttonStyle(.bordered)
.controlSize(.small)
}
}
}
.frame(maxWidth: .infinity, alignment: .leading)
.padding(14)
.background(
.thinMaterial,
in: RoundedRectangle(cornerRadius: 16, style: .continuous)
)
}
private var iconName: String {
switch self.problem.kind {
case .pairingRequired,
.pairingRoleUpgradeRequired,
.pairingScopeUpgradeRequired,
.pairingMetadataUpgradeRequired:
return "person.crop.circle.badge.clock"
case .timeout, .connectionRefused, .reachabilityFailed, .websocketCancelled:
return "wifi.exclamationmark"
case .deviceIdentityRequired,
.deviceSignatureExpired,
.deviceNonceRequired,
.deviceNonceMismatch,
.deviceSignatureInvalid,
.devicePublicKeyInvalid,
.deviceIdMismatch:
return "lock.shield"
default:
return "exclamationmark.triangle.fill"
}
}
private var tint: Color {
switch self.problem.kind {
case .pairingRequired,
.pairingRoleUpgradeRequired,
.pairingScopeUpgradeRequired,
.pairingMetadataUpgradeRequired:
return .orange
case .timeout, .connectionRefused, .reachabilityFailed, .websocketCancelled:
return .yellow
default:
return .red
}
}
private var ownerLabel: String {
switch self.problem.owner {
case .gateway:
return "Fix on gateway"
case .iphone:
return "Fix on iPhone"
case .both:
return "Check both"
case .network:
return "Check network"
case .unknown:
return "Needs attention"
}
}
}
struct GatewayProblemDetailsSheet: View {
@Environment(\.dismiss) private var dismiss
let problem: GatewayConnectionProblem
var primaryActionTitle: String?
var onPrimaryAction: (() -> Void)?
@State private var copyFeedback: String?
var body: some View {
NavigationStack {
List {
Section {
VStack(alignment: .leading, spacing: 10) {
Text(self.problem.title)
.font(.title3.weight(.semibold))
Text(self.problem.message)
.font(.body)
.foregroundStyle(.secondary)
Text(self.ownerSummary)
.font(.footnote.weight(.semibold))
.foregroundStyle(.secondary)
}
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.vertical, 4)
}
if let requestId = self.problem.requestId {
Section("Request") {
Text(verbatim: requestId)
.font(.system(.body, design: .monospaced))
.textSelection(.enabled)
Button("Copy request ID") {
UIPasteboard.general.string = requestId
self.copyFeedback = "Copied request ID"
}
}
}
if let actionCommand = self.problem.actionCommand {
Section("Gateway command") {
Text(verbatim: actionCommand)
.font(.system(.body, design: .monospaced))
.textSelection(.enabled)
Button("Copy command") {
UIPasteboard.general.string = actionCommand
self.copyFeedback = "Copied command"
}
}
}
if let docsURL = self.problem.docsURL {
Section("Help") {
Link(destination: docsURL) {
Label("Open docs", systemImage: "book")
}
Text(verbatim: docsURL.absoluteString)
.font(.footnote)
.foregroundStyle(.secondary)
.textSelection(.enabled)
}
}
if let technicalDetails = self.problem.technicalDetails {
Section("Technical details") {
Text(verbatim: technicalDetails)
.font(.system(.footnote, design: .monospaced))
.foregroundStyle(.secondary)
.textSelection(.enabled)
}
}
if let copyFeedback {
Section {
Text(copyFeedback)
.font(.footnote)
.foregroundStyle(.secondary)
}
}
}
.navigationTitle("Connection problem")
.navigationBarTitleDisplayMode(.inline)
.toolbar {
ToolbarItem(placement: .topBarLeading) {
if let primaryActionTitle, let onPrimaryAction {
Button(primaryActionTitle) {
self.dismiss()
onPrimaryAction()
}
}
}
ToolbarItem(placement: .topBarTrailing) {
Button("Done") {
self.dismiss()
}
}
}
}
}
private var ownerSummary: String {
switch self.problem.owner {
case .gateway:
return "Primary fix: gateway"
case .iphone:
return "Primary fix: this iPhone"
case .both:
return "Primary fix: check both this iPhone and the gateway"
case .network:
return "Primary fix: network or remote access"
case .unknown:
return "Primary fix: review details and retry"
}
}
}

View File

@@ -8,6 +8,7 @@ struct GatewayQuickSetupSheet: View {
@AppStorage("onboarding.quickSetupDismissed") private var quickSetupDismissed: Bool = false
@State private var connecting: Bool = false
@State private var connectError: String?
@State private var showGatewayProblemDetails: Bool = false
var body: some View {
NavigationStack {
@@ -15,6 +16,14 @@ struct GatewayQuickSetupSheet: View {
Text("Connect to a Gateway?")
.font(.title2.bold())
if let gatewayProblem = self.appModel.lastGatewayProblem {
GatewayProblemBanner(
problem: gatewayProblem,
onShowDetails: {
self.showGatewayProblemDetails = true
})
}
if let candidate = self.bestCandidate {
VStack(alignment: .leading, spacing: 6) {
Text(verbatim: candidate.name)
@@ -27,7 +36,7 @@ struct GatewayQuickSetupSheet: View {
// Use verbatim strings so Bonjour-provided values can't be interpreted as
// localized format strings (which can crash with Objective-C exceptions).
Text(verbatim: "Discovery: \(self.gatewayController.discoveryStatusText)")
Text(verbatim: "Status: \(self.appModel.gatewayStatusText)")
Text(verbatim: "Status: \(self.appModel.gatewayDisplayStatusText)")
Text(verbatim: "Node: \(self.appModel.nodeStatusText)")
Text(verbatim: "Operator: \(self.appModel.operatorStatusText)")
}
@@ -104,6 +113,11 @@ struct GatewayQuickSetupSheet: View {
}
}
}
.sheet(isPresented: self.$showGatewayProblemDetails) {
if let gatewayProblem = self.appModel.lastGatewayProblem {
GatewayProblemDetailsSheet(problem: gatewayProblem)
}
}
}
private var bestCandidate: GatewayDiscoveryModel.DiscoveredGateway? {

View File

@@ -24,6 +24,8 @@
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(OPENCLAW_MARKETING_VERSION)</string>
<key>OpenClawCanonicalVersion</key>
<string>$(OPENCLAW_IOS_VERSION)</string>
<key>CFBundleURLTypes</key>
<array>
<dict>

File diff suppressed because it is too large Load Diff

View File

@@ -376,7 +376,7 @@ private struct ConnectionStatusBox: View {
gatewayController: GatewayConnectionController
) -> [String] {
var lines: [String] = [
"gateway: \(appModel.gatewayStatusText)",
"gateway: \(appModel.gatewayDisplayStatusText)",
"discovery: \(gatewayController.discoveryStatusText)",
]
lines.append("server: \(appModel.gatewayServerName ?? "")")

View File

@@ -69,6 +69,7 @@ struct OnboardingWizardView: View {
@State private var showQRScanner: Bool = false
@State private var scannerError: String?
@State private var selectedPhoto: PhotosPickerItem?
@State private var showGatewayProblemDetails: Bool = false
@State private var lastPairingAutoResumeAttemptAt: Date?
private static let pairingAutoResumeTicker = Timer.publish(every: 2.0, on: .main, in: .common).autoconnect()
@@ -86,6 +87,10 @@ struct OnboardingWizardView: View {
self.step == .intro || self.step == .welcome || self.step == .success
}
private var currentProblem: GatewayConnectionProblem? {
self.appModel.lastGatewayProblem
}
var body: some View {
NavigationStack {
Group {
@@ -216,6 +221,16 @@ struct OnboardingWizardView: View {
}
}
}
.sheet(isPresented: self.$showGatewayProblemDetails) {
if let currentProblem = self.currentProblem {
GatewayProblemDetailsSheet(
problem: currentProblem,
primaryActionTitle: "Retry",
onPrimaryAction: {
Task { await self.retryLastAttempt() }
})
}
}
.onAppear {
self.initializeState()
}
@@ -250,39 +265,11 @@ struct OnboardingWizardView: View {
.onChange(of: self.gatewayPassword) { _, newValue in
self.saveGatewayCredentials(token: self.gatewayToken, password: newValue)
}
.onChange(of: self.appModel.lastGatewayProblem) { _, newValue in
self.updateConnectionIssue(problem: newValue, statusText: self.appModel.gatewayStatusText)
}
.onChange(of: self.appModel.gatewayStatusText) { _, newValue in
let next = GatewayConnectionIssue.detect(from: newValue)
// Avoid "flip-flopping" the UI by clearing actionable issues when the underlying connection
// transitions through intermediate statuses (e.g. Offline/Connecting while reconnect churns).
if self.issue.needsPairing, next.needsPairing {
// Keep the requestId sticky even if the status line omits it after we pause.
let mergedRequestId = next.requestId ?? self.issue.requestId ?? self.pairingRequestId
self.issue = .pairingRequired(requestId: mergedRequestId)
} else if self.issue.needsPairing, !next.needsPairing {
// Ignore non-pairing statuses until the user explicitly retries/scans again, or we connect.
} else if self.issue.needsAuthToken, !next.needsAuthToken, !next.needsPairing {
// Same idea for auth: once we learn credentials are missing/rejected, keep that sticky until
// the user retries/scans again or we successfully connect.
} else {
self.issue = next
}
if let requestId = next.requestId, !requestId.isEmpty {
self.pairingRequestId = requestId
}
// If the gateway tells us auth is missing/rejected, stop reconnect churn until the user intervenes.
if next.needsAuthToken {
self.appModel.gatewayAutoReconnectEnabled = false
}
if self.issue.needsAuthToken || self.issue.needsPairing {
self.step = .auth
}
if !newValue.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
self.connectMessage = newValue
self.statusLine = newValue
}
self.updateConnectionIssue(problem: self.appModel.lastGatewayProblem, statusText: newValue)
}
.onChange(of: self.appModel.gatewayServerName) { _, newValue in
guard newValue != nil else { return }
@@ -509,7 +496,7 @@ struct OnboardingWizardView: View {
Section {
LabeledContent("Mode", value: selectedMode.title)
LabeledContent("Discovery", value: self.gatewayController.discoveryStatusText)
LabeledContent("Status", value: self.appModel.gatewayStatusText)
LabeledContent("Status", value: self.appModel.gatewayDisplayStatusText)
LabeledContent("Progress", value: self.statusLine)
} header: {
Text("Status")
@@ -612,7 +599,17 @@ struct OnboardingWizardView: View {
.autocorrectionDisabled()
SecureField("Gateway Password", text: self.$gatewayPassword)
if self.issue.needsAuthToken {
if let problem = self.currentProblem {
GatewayProblemBanner(
problem: problem,
primaryActionTitle: "Retry connection",
onPrimaryAction: {
Task { await self.retryLastAttempt() }
},
onShowDetails: {
self.showGatewayProblemDetails = true
})
} else if self.issue.needsAuthToken {
Text("Gateway rejected credentials. Scan a fresh QR code or update token/password.")
.font(.footnote)
.foregroundStyle(.secondary)
@@ -635,14 +632,15 @@ struct OnboardingWizardView: View {
Text("Pairing Approval")
} footer: {
let requestLine: String = {
if let id = self.issue.requestId, !id.isEmpty {
if let id = self.currentProblem?.requestId ?? self.issue.requestId, !id.isEmpty {
return "Request ID: \(id)"
}
return "Request ID: check `openclaw devices list`."
}()
let commandLine = self.currentProblem?.actionCommand ?? "openclaw devices approve <requestId>"
Text(
"Approve this device on the gateway.\n"
+ "1) `openclaw devices approve` (or `openclaw devices approve <requestId>`)\n"
+ "1) `\(commandLine)`\n"
+ "2) `/pair approve` in your OpenClaw chat\n"
+ "\(requestLine)\n"
+ "OpenClaw will also retry automatically when you return to this app.")
@@ -824,6 +822,45 @@ struct OnboardingWizardView: View {
self.resumeAfterPairingApprovalInBackground()
}
private func updateConnectionIssue(problem: GatewayConnectionProblem?, statusText: String) {
let next = GatewayConnectionIssue.detect(problem: problem)
let fallback = next == .none ? GatewayConnectionIssue.detect(from: statusText) : next
// Avoid "flip-flopping" the UI by clearing actionable issues when the underlying connection
// transitions through intermediate statuses (e.g. Offline/Connecting while reconnect churns).
if self.issue.needsPairing, fallback.needsPairing {
let mergedRequestId = fallback.requestId ?? self.issue.requestId ?? self.pairingRequestId
self.issue = .pairingRequired(requestId: mergedRequestId)
} else if self.issue.needsPairing, !fallback.needsPairing {
// Ignore non-pairing statuses until the user explicitly retries/scans again, or we connect.
} else if self.issue.needsAuthToken, !fallback.needsAuthToken, !fallback.needsPairing {
// Same idea for auth: once we learn credentials are missing/rejected, keep that sticky until
// the user retries/scans again or we successfully connect.
} else {
self.issue = fallback
}
if let requestId = problem?.requestId ?? fallback.requestId, !requestId.isEmpty {
self.pairingRequestId = requestId
}
if self.issue.needsAuthToken || self.issue.needsPairing || problem?.pauseReconnect == true {
self.step = .auth
}
if let problem {
self.connectMessage = problem.message
self.statusLine = problem.message
return
}
let trimmedStatus = statusText.trimmingCharacters(in: .whitespacesAndNewlines)
if !trimmedStatus.isEmpty {
self.connectMessage = trimmedStatus
self.statusLine = trimmedStatus
}
}
private func detectQRCode(from data: Data) -> String? {
guard let ciImage = CIImage(data: data) else { return nil }
let detector = CIDetector(

View File

@@ -15,6 +15,11 @@ private struct PendingWatchPromptAction {
private typealias PendingExecApprovalPrompt = ExecApprovalNotificationPrompt
@MainActor
enum OpenClawAppModelRegistry {
static var appModel: NodeAppModel?
}
@MainActor
final class OpenClawAppDelegate: NSObject, UIApplicationDelegate, @preconcurrency UNUserNotificationCenterDelegate {
private let logger = Logger(subsystem: "ai.openclaw.ios", category: "Push")
@@ -24,10 +29,12 @@ final class OpenClawAppDelegate: NSObject, UIApplicationDelegate, @preconcurrenc
private var pendingAPNsDeviceToken: Data?
private var pendingWatchPromptActions: [PendingWatchPromptAction] = []
private var pendingExecApprovalPrompts: [PendingExecApprovalPrompt] = []
private var pendingExecApprovalRequestedPushIDs: [String] = []
private var pendingExecApprovalResolvedPushIDs: [String] = []
weak var appModel: NodeAppModel? {
didSet {
guard let model = self.appModel else { return }
guard let model = self.resolvedAppModel() else { return }
if let token = self.pendingAPNsDeviceToken {
self.pendingAPNsDeviceToken = nil
Task { @MainActor in
@@ -56,22 +63,56 @@ final class OpenClawAppDelegate: NSObject, UIApplicationDelegate, @preconcurrenc
}
}
}
if !self.pendingExecApprovalRequestedPushIDs.isEmpty {
let pending = self.pendingExecApprovalRequestedPushIDs
self.pendingExecApprovalRequestedPushIDs.removeAll()
Task { @MainActor in
for approvalId in pending {
_ = await model.handleExecApprovalRequestedRemotePush(approvalId: approvalId)
}
}
}
if !self.pendingExecApprovalResolvedPushIDs.isEmpty {
let pending = self.pendingExecApprovalResolvedPushIDs
self.pendingExecApprovalResolvedPushIDs.removeAll()
Task { @MainActor in
for approvalId in pending {
await model.handleExecApprovalResolvedRemotePush(approvalId: approvalId)
}
}
}
}
}
private func resolvedAppModel() -> NodeAppModel? {
self.appModel ?? OpenClawAppModelRegistry.appModel
}
#if DEBUG
func _test_resolvedAppModel() -> NodeAppModel? {
self.resolvedAppModel()
}
#endif
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
) -> Bool
{
GatewayDiagnostics.log("app delegate: didFinishLaunching")
if self.appModel == nil {
self.appModel = OpenClawAppModelRegistry.appModel
}
self.registerBackgroundWakeRefreshTask()
UNUserNotificationCenter.current().delegate = self
let notificationCenter = UNUserNotificationCenter.current()
notificationCenter.delegate = self
ExecApprovalNotificationBridge.registerCategory(center: notificationCenter)
application.registerForRemoteNotifications()
return true
}
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
if let appModel = self.appModel {
if let appModel = self.resolvedAppModel() {
Task { @MainActor in
appModel.updateAPNsDeviceToken(deviceToken)
}
@@ -98,12 +139,22 @@ final class OpenClawAppDelegate: NSObject, UIApplicationDelegate, @preconcurrenc
notificationCenter: notificationCenter)
{
if let approvalId = ExecApprovalNotificationBridge.approvalID(from: userInfo) {
self.appModel?.dismissPendingExecApprovalPrompt(approvalId: approvalId)
if let appModel = self.resolvedAppModel() {
await appModel.handleExecApprovalResolvedRemotePush(approvalId: approvalId)
} else {
self.pendingExecApprovalResolvedPushIDs.append(approvalId)
}
}
completionHandler(.newData)
return
}
guard let appModel = self.appModel else {
guard let appModel = self.resolvedAppModel() else {
if ExecApprovalNotificationBridge.payloadKind(userInfo: userInfo)
== ExecApprovalNotificationBridge.requestedKind,
let approvalId = ExecApprovalNotificationBridge.approvalID(from: userInfo)
{
self.pendingExecApprovalRequestedPushIDs.append(approvalId)
}
self.logger.info("APNs wake skipped: appModel unavailable")
self.scheduleBackgroundWakeRefresh(afterSeconds: 90, reason: "silent_push_no_model")
completionHandler(.noData)
@@ -119,6 +170,7 @@ final class OpenClawAppDelegate: NSObject, UIApplicationDelegate, @preconcurrenc
}
func scenePhaseChanged(_ phase: ScenePhase) {
GatewayDiagnostics.log("app delegate: scene phase changed=\(String(describing: phase))")
if phase == .background {
self.scheduleBackgroundWakeRefresh(afterSeconds: 120, reason: "scene_background")
}
@@ -163,7 +215,7 @@ final class OpenClawAppDelegate: NSObject, UIApplicationDelegate, @preconcurrenc
self.backgroundWakeTask?.cancel()
let wakeTask = Task { @MainActor [weak self] in
guard let self, let appModel = self.appModel else { return false }
guard let self, let appModel = self.resolvedAppModel() else { return false }
return await appModel.handleBackgroundRefreshWake(trigger: "bg_app_refresh")
}
self.backgroundWakeTask = wakeTask
@@ -248,7 +300,7 @@ final class OpenClawAppDelegate: NSObject, UIApplicationDelegate, @preconcurrenc
}
private func routeWatchPromptAction(_ action: PendingWatchPromptAction) async {
guard let appModel = self.appModel else {
guard let appModel = self.resolvedAppModel() else {
self.pendingWatchPromptActions.append(action)
return
}
@@ -261,7 +313,7 @@ final class OpenClawAppDelegate: NSObject, UIApplicationDelegate, @preconcurrenc
}
private func routeExecApprovalPrompt(_ prompt: PendingExecApprovalPrompt) {
guard let appModel = self.appModel else {
guard let appModel = self.resolvedAppModel() else {
self.pendingExecApprovalPrompts.append(prompt)
return
}
@@ -561,6 +613,7 @@ struct OpenClawApp: App {
Self.installUncaughtExceptionLogger()
GatewaySettingsStore.bootstrapPersistence()
let appModel = NodeAppModel()
OpenClawAppModelRegistry.appModel = appModel
_appModel = State(initialValue: appModel)
_gatewayController = State(initialValue: GatewayConnectionController(appModel: appModel))
}

View File

@@ -8,9 +8,30 @@ struct ExecApprovalNotificationPrompt: Sendable, Equatable {
enum ExecApprovalNotificationBridge {
static let requestedKind = "exec.approval.requested"
static let resolvedKind = "exec.approval.resolved"
static let categoryIdentifier = "openclaw.exec-approval"
static let reviewActionIdentifier = "openclaw.exec-approval.review"
private static let localRequestPrefix = "exec.approval."
static func registerCategory(center: UNUserNotificationCenter = .current()) {
let category = UNNotificationCategory(
identifier: self.categoryIdentifier,
actions: [
UNNotificationAction(
identifier: self.reviewActionIdentifier,
title: "Review",
options: [.foreground]),
],
intentIdentifiers: [],
options: [])
center.getNotificationCategories { categories in
var updated = categories
updated.update(with: category)
center.setNotificationCategories(updated)
}
}
static func shouldPresentNotification(userInfo: [AnyHashable: Any]) -> Bool {
self.payloadKind(userInfo: userInfo) == self.requestedKind
}
@@ -20,7 +41,11 @@ enum ExecApprovalNotificationBridge {
userInfo: [AnyHashable: Any]
) -> ExecApprovalNotificationPrompt?
{
guard actionIdentifier == UNNotificationDefaultActionIdentifier else { return nil }
guard actionIdentifier == UNNotificationDefaultActionIdentifier
|| actionIdentifier == self.reviewActionIdentifier
else {
return nil
}
guard self.payloadKind(userInfo: userInfo) == self.requestedKind else { return nil }
guard let approvalId = self.approvalID(from: userInfo) else { return nil }
return ExecApprovalNotificationPrompt(approvalId: approvalId)
@@ -71,7 +96,7 @@ enum ExecApprovalNotificationBridge {
"\(self.localRequestPrefix)\(approvalId)"
}
private static func payloadKind(userInfo: [AnyHashable: Any]) -> String {
static func payloadKind(userInfo: [AnyHashable: Any]) -> String {
let raw = self.openClawPayload(userInfo: userInfo)?["kind"] as? String
let trimmed = raw?.trimmingCharacters(in: .whitespacesAndNewlines) ?? ""
return trimmed.isEmpty ? "unknown" : trimmed

View File

@@ -98,6 +98,9 @@ struct RootCanvas: View {
},
openSettings: {
self.presentedSheet = .settings
},
retryGatewayConnection: {
Task { await self.gatewayController.connectLastKnown() }
})
.preferredColorScheme(.dark)
@@ -229,7 +232,7 @@ struct RootCanvas: View {
private func updateCanvasDebugStatus() {
self.appModel.screen.setDebugStatusEnabled(self.canvasDebugStatusEnabled)
guard self.canvasDebugStatusEnabled else { return }
let title = self.appModel.gatewayStatusText.trimmingCharacters(in: .whitespacesAndNewlines)
let title = self.appModel.gatewayDisplayStatusText.trimmingCharacters(in: .whitespacesAndNewlines)
let subtitle = self.appModel.gatewayServerName ?? self.appModel.gatewayRemoteAddress
self.appModel.screen.updateDebugStatus(title: title, subtitle: subtitle)
}
@@ -454,6 +457,7 @@ private struct CanvasContent: View {
@AppStorage("talk.enabled") private var talkEnabled: Bool = false
@AppStorage("talk.button.enabled") private var talkButtonEnabled: Bool = true
@State private var showGatewayActions: Bool = false
@State private var showGatewayProblemDetails: Bool = false
var systemColorScheme: ColorScheme
var gatewayStatus: StatusPill.GatewayState
var voiceWakeEnabled: Bool
@@ -462,6 +466,7 @@ private struct CanvasContent: View {
var cameraHUDKind: NodeAppModel.CameraHUDKind?
var openChat: () -> Void
var openSettings: () -> Void
var retryGatewayConnection: () -> Void
private var brightenButtons: Bool { self.systemColorScheme == .light }
private var talkActive: Bool { self.appModel.talkMode.isEnabled || self.talkEnabled }
@@ -488,6 +493,8 @@ private struct CanvasContent: View {
onStatusTap: {
if self.gatewayStatus == .connected {
self.showGatewayActions = true
} else if self.appModel.lastGatewayProblem != nil {
self.showGatewayProblemDetails = true
} else {
self.openSettings()
}
@@ -504,13 +511,35 @@ private struct CanvasContent: View {
self.openSettings()
})
}
.overlay(alignment: .top) {
if let gatewayProblem = self.appModel.lastGatewayProblem,
self.gatewayStatus != .connected
{
GatewayProblemBanner(
problem: gatewayProblem,
primaryActionTitle: gatewayProblem.retryable ? "Retry" : "Open Settings",
onPrimaryAction: {
if gatewayProblem.retryable {
self.retryGatewayConnection()
} else {
self.openSettings()
}
},
onShowDetails: {
self.showGatewayProblemDetails = true
})
.padding(.horizontal, 12)
.safeAreaPadding(.top, 10)
.transition(.move(edge: .top).combined(with: .opacity))
}
}
.overlay(alignment: .topLeading) {
if let voiceWakeToastText, !voiceWakeToastText.isEmpty {
VoiceWakeToast(
command: voiceWakeToastText,
brighten: self.brightenButtons)
.padding(.leading, 10)
.safeAreaPadding(.top, 58)
.safeAreaPadding(.top, self.appModel.lastGatewayProblem == nil ? 58 : 132)
.transition(.move(edge: .top).combined(with: .opacity))
}
}
@@ -518,6 +547,16 @@ private struct CanvasContent: View {
isPresented: self.$showGatewayActions,
onDisconnect: { self.appModel.disconnectGateway() },
onOpenSettings: { self.openSettings() })
.sheet(isPresented: self.$showGatewayProblemDetails) {
if let gatewayProblem = self.appModel.lastGatewayProblem {
GatewayProblemDetailsSheet(
problem: gatewayProblem,
primaryActionTitle: "Open Settings",
onPrimaryAction: {
self.openSettings()
})
}
}
.onAppear {
// Keep the runtime talk state aligned with persisted toggle state on cold launch.
if self.talkEnabled != self.appModel.talkMode.isEnabled {

View File

@@ -9,6 +9,7 @@ struct RootTabs: View {
@State private var voiceWakeToastText: String?
@State private var toastDismissTask: Task<Void, Never>?
@State private var showGatewayActions: Bool = false
@State private var showGatewayProblemDetails: Bool = false
var body: some View {
TabView(selection: self.$selectedTab) {
@@ -32,6 +33,8 @@ struct RootTabs: View {
onTap: {
if self.gatewayStatus == .connected {
self.showGatewayActions = true
} else if self.appModel.lastGatewayProblem != nil {
self.showGatewayProblemDetails = true
} else {
self.selectedTab = 2
}
@@ -39,11 +42,29 @@ struct RootTabs: View {
.padding(.leading, 10)
.safeAreaPadding(.top, 10)
}
.overlay(alignment: .top) {
if let gatewayProblem = self.appModel.lastGatewayProblem,
self.gatewayStatus != .connected
{
GatewayProblemBanner(
problem: gatewayProblem,
primaryActionTitle: "Open Settings",
onPrimaryAction: {
self.selectedTab = 2
},
onShowDetails: {
self.showGatewayProblemDetails = true
})
.padding(.horizontal, 12)
.safeAreaPadding(.top, 10)
.transition(.move(edge: .top).combined(with: .opacity))
}
}
.overlay(alignment: .topLeading) {
if let voiceWakeToastText, !voiceWakeToastText.isEmpty {
VoiceWakeToast(command: voiceWakeToastText)
.padding(.leading, 10)
.safeAreaPadding(.top, 58)
.safeAreaPadding(.top, self.appModel.lastGatewayProblem == nil ? 58 : 132)
.transition(.move(edge: .top).combined(with: .opacity))
}
}
@@ -74,6 +95,16 @@ struct RootTabs: View {
isPresented: self.$showGatewayActions,
onDisconnect: { self.appModel.disconnectGateway() },
onOpenSettings: { self.selectedTab = 2 })
.sheet(isPresented: self.$showGatewayProblemDetails) {
if let gatewayProblem = self.appModel.lastGatewayProblem {
GatewayProblemDetailsSheet(
problem: gatewayProblem,
primaryActionTitle: "Open Settings",
onPrimaryAction: {
self.selectedTab = 2
})
}
}
}
private var gatewayStatus: StatusPill.GatewayState {

View File

@@ -88,6 +88,20 @@ struct WatchQuickReplyEvent: Sendable, Equatable {
var transport: String
}
struct WatchExecApprovalResolveEvent: Sendable, Equatable {
var replyId: String
var approvalId: String
var decision: OpenClawWatchExecApprovalDecision
var sentAtMs: Int?
var transport: String
}
struct WatchExecApprovalSnapshotRequestEvent: Sendable, Equatable {
var requestId: String
var sentAtMs: Int?
var transport: String
}
struct WatchNotificationSendResult: Sendable, Equatable {
var deliveredImmediately: Bool
var queuedForDelivery: Bool
@@ -96,10 +110,22 @@ struct WatchNotificationSendResult: Sendable, Equatable {
protocol WatchMessagingServicing: AnyObject, Sendable {
func status() async -> WatchMessagingStatus
func setStatusHandler(_ handler: (@Sendable (WatchMessagingStatus) -> Void)?)
func setReplyHandler(_ handler: (@Sendable (WatchQuickReplyEvent) -> Void)?)
func setExecApprovalResolveHandler(_ handler: (@Sendable (WatchExecApprovalResolveEvent) -> Void)?)
func setExecApprovalSnapshotRequestHandler(
_ handler: (@Sendable (WatchExecApprovalSnapshotRequestEvent) -> Void)?)
func sendNotification(
id: String,
params: OpenClawWatchNotifyParams) async throws -> WatchNotificationSendResult
func sendExecApprovalPrompt(
_ message: OpenClawWatchExecApprovalPromptMessage) async throws -> WatchNotificationSendResult
func sendExecApprovalResolved(
_ message: OpenClawWatchExecApprovalResolvedMessage) async throws -> WatchNotificationSendResult
func sendExecApprovalExpired(
_ message: OpenClawWatchExecApprovalExpiredMessage) async throws -> WatchNotificationSendResult
func syncExecApprovalSnapshot(
_ message: OpenClawWatchExecApprovalSnapshotMessage) async throws -> WatchNotificationSendResult
}
extension CameraController: CameraServicing {}

View File

@@ -0,0 +1,363 @@
import Foundation
import OSLog
@preconcurrency import WatchConnectivity
private struct WatchConnectivityTransportCallbacks {
var statusUpdateHandler: (@Sendable (WatchMessagingStatus) -> Void)?
var replyHandler: (@Sendable (WatchQuickReplyEvent) -> Void)?
var execApprovalResolveHandler: (@Sendable (WatchExecApprovalResolveEvent) -> Void)?
var execApprovalSnapshotRequestHandler: (@Sendable (WatchExecApprovalSnapshotRequestEvent) -> Void)?
}
private func sendReachableWatchMessage(_ payload: [String: Any], with session: WCSession) async throws {
// WatchConnectivity replies arrive on its own queue. Keep this continuation explicitly
// nonisolated so Swift 6 does not inherit a caller actor (for example MainActor) into the
// Objective-C callback boundary and trap on the reply callback executor check.
try await withCheckedThrowingContinuation(isolation: nil) {
(continuation: CheckedContinuation<Void, Error>) in
session.sendMessage(
payload,
replyHandler: { _ in
continuation.resume(returning: ())
},
errorHandler: { error in
continuation.resume(throwing: error)
}
)
}
}
final class WatchConnectivityTransport: NSObject, @unchecked Sendable {
nonisolated private static let logger = Logger(subsystem: "ai.openclaw", category: "watch.messaging")
private let session: WCSession?
private let callbacksLock = NSLock()
private var callbacks = WatchConnectivityTransportCallbacks()
override init() {
if WCSession.isSupported() {
self.session = WCSession.default
} else {
self.session = nil
}
super.init()
if let session = self.session {
session.delegate = self
session.activate()
}
}
nonisolated static func isSupportedOnDevice() -> Bool {
WCSession.isSupported()
}
nonisolated static func currentStatusSnapshot() -> WatchMessagingStatus {
guard WCSession.isSupported() else {
return WatchMessagingStatus(
supported: false,
paired: false,
appInstalled: false,
reachable: false,
activationState: "unsupported")
}
return self.status(for: WCSession.default)
}
func status() async -> WatchMessagingStatus {
await self.ensureActivated()
return self.currentStatusSnapshot()
}
func currentStatusSnapshot() -> WatchMessagingStatus {
guard let session = self.session else {
return WatchMessagingStatus(
supported: false,
paired: false,
appInstalled: false,
reachable: false,
activationState: "unsupported")
}
return Self.status(for: session)
}
func setStatusUpdateHandler(_ handler: (@Sendable (WatchMessagingStatus) -> Void)?) {
self.updateCallbacks { $0.statusUpdateHandler = handler }
}
func setReplyHandler(_ handler: (@Sendable (WatchQuickReplyEvent) -> Void)?) {
self.updateCallbacks { $0.replyHandler = handler }
}
func setExecApprovalResolveHandler(_ handler: (@Sendable (WatchExecApprovalResolveEvent) -> Void)?) {
self.updateCallbacks { $0.execApprovalResolveHandler = handler }
}
func setExecApprovalSnapshotRequestHandler(
_ handler: (@Sendable (WatchExecApprovalSnapshotRequestEvent) -> Void)?)
{
self.updateCallbacks { $0.execApprovalSnapshotRequestHandler = handler }
}
func sendPayload(_ payload: [String: Any]) async throws -> WatchNotificationSendResult {
await self.ensureActivated()
let session = try self.requireReadySession()
if session.isReachable {
do {
try await sendReachableWatchMessage(payload, with: session)
return WatchNotificationSendResult(
deliveredImmediately: true,
queuedForDelivery: false,
transport: "sendMessage")
} catch {
Self.logger.error("watch sendMessage failed: \(error.localizedDescription, privacy: .public)")
}
}
_ = session.transferUserInfo(payload)
return WatchNotificationSendResult(
deliveredImmediately: false,
queuedForDelivery: true,
transport: "transferUserInfo")
}
func sendSnapshotPayload(_ payload: [String: Any]) async throws -> WatchNotificationSendResult {
await self.ensureActivated()
let session = try self.requireReadySession()
if session.isReachable {
do {
try await sendReachableWatchMessage(payload, with: session)
return WatchNotificationSendResult(
deliveredImmediately: true,
queuedForDelivery: false,
transport: "sendMessage")
} catch {
Self.logger.error(
"watch snapshot sendMessage failed: \(error.localizedDescription, privacy: .public)")
}
}
do {
try session.updateApplicationContext(payload)
return WatchNotificationSendResult(
deliveredImmediately: false,
queuedForDelivery: true,
transport: "applicationContext")
} catch {
Self.logger.error(
"watch updateApplicationContext failed: \(error.localizedDescription, privacy: .public)")
_ = session.transferUserInfo(payload)
return WatchNotificationSendResult(
deliveredImmediately: false,
queuedForDelivery: true,
transport: "transferUserInfo")
}
}
private func updateCallbacks(_ update: (inout WatchConnectivityTransportCallbacks) -> Void) {
self.callbacksLock.lock()
defer { self.callbacksLock.unlock() }
update(&self.callbacks)
}
private func callbacksSnapshot() -> WatchConnectivityTransportCallbacks {
self.callbacksLock.lock()
defer { self.callbacksLock.unlock() }
return self.callbacks
}
private func requireReadySession() throws -> WCSession {
guard let session = self.session else {
throw WatchMessagingError.unsupported
}
let snapshot = Self.status(for: session)
guard snapshot.paired else {
throw WatchMessagingError.notPaired
}
guard snapshot.appInstalled else {
throw WatchMessagingError.watchAppNotInstalled
}
return session
}
private func ensureActivated() async {
guard let session = self.session else { return }
if session.activationState == .activated {
return
}
session.activate()
for _ in 0..<8 {
if session.activationState == .activated {
return
}
try? await Task.sleep(nanoseconds: 100_000_000)
}
}
private func emitStatusUpdate(_ snapshot: WatchMessagingStatus) {
guard let handler = self.callbacksSnapshot().statusUpdateHandler else {
return
}
Task { @MainActor in
handler(snapshot)
}
}
private func emitReply(_ event: WatchQuickReplyEvent) {
guard let handler = self.callbacksSnapshot().replyHandler else {
return
}
Task { @MainActor in
handler(event)
}
}
private func emitExecApprovalResolve(_ event: WatchExecApprovalResolveEvent) {
guard let handler = self.callbacksSnapshot().execApprovalResolveHandler else {
return
}
Task { @MainActor in
handler(event)
}
}
private func emitExecApprovalSnapshotRequest(_ event: WatchExecApprovalSnapshotRequestEvent) {
guard let handler = self.callbacksSnapshot().execApprovalSnapshotRequestHandler else {
return
}
Task { @MainActor in
handler(event)
}
}
nonisolated private static func status(for session: WCSession) -> WatchMessagingStatus {
WatchMessagingStatus(
supported: true,
paired: session.isPaired,
appInstalled: session.isWatchAppInstalled,
reachable: session.isReachable,
activationState: self.activationStateLabel(session.activationState))
}
nonisolated private static func activationStateLabel(_ state: WCSessionActivationState) -> String {
switch state {
case .notActivated:
"notActivated"
case .inactive:
"inactive"
case .activated:
"activated"
@unknown default:
"unknown"
}
}
}
extension WatchConnectivityTransport: WCSessionDelegate {
func session(
_ session: WCSession,
activationDidCompleteWith activationState: WCSessionActivationState,
error: (any Error)?)
{
GatewayDiagnostics.log(
"watch messaging: activation complete state=\(Self.activationStateLabel(activationState)) error=\(error?.localizedDescription ?? "none")")
if let error {
Self.logger.error("watch activation failed: \(error.localizedDescription, privacy: .public)")
} else {
Self.logger.debug(
"watch activation state=\(Self.activationStateLabel(activationState), privacy: .public)")
}
self.emitStatusUpdate(Self.status(for: session))
}
func sessionDidBecomeInactive(_: WCSession) {}
func sessionDidDeactivate(_ session: WCSession) {
GatewayDiagnostics.log("watch messaging: session did deactivate; reactivating")
session.activate()
self.emitStatusUpdate(Self.status(for: session))
}
func session(_: WCSession, didReceiveMessage message: [String: Any]) {
let type = (message["type"] as? String) ?? "unknown"
GatewayDiagnostics.log("watch messaging: didReceiveMessage type=\(type)")
if let event = WatchMessagingPayloadCodec.parseQuickReplyPayload(message, transport: "sendMessage") {
self.emitReply(event)
return
}
if let event = WatchMessagingPayloadCodec.parseExecApprovalResolvePayload(
message,
transport: "sendMessage")
{
self.emitExecApprovalResolve(event)
return
}
if let event = WatchMessagingPayloadCodec.parseExecApprovalSnapshotRequestPayload(
message,
transport: "sendMessage")
{
self.emitExecApprovalSnapshotRequest(event)
}
}
func session(
_: WCSession,
didReceiveMessage message: [String: Any],
replyHandler: @escaping ([String: Any]) -> Void)
{
let type = (message["type"] as? String) ?? "unknown"
GatewayDiagnostics.log("watch messaging: didReceiveMessageWithReply type=\(type)")
if let event = WatchMessagingPayloadCodec.parseQuickReplyPayload(message, transport: "sendMessage") {
replyHandler(["ok": true])
self.emitReply(event)
return
}
if let event = WatchMessagingPayloadCodec.parseExecApprovalResolvePayload(
message,
transport: "sendMessage")
{
replyHandler(["ok": true])
self.emitExecApprovalResolve(event)
return
}
if let event = WatchMessagingPayloadCodec.parseExecApprovalSnapshotRequestPayload(
message,
transport: "sendMessage")
{
replyHandler(["ok": true])
self.emitExecApprovalSnapshotRequest(event)
return
}
replyHandler(["ok": false, "error": "unsupported_payload"])
}
func session(_: WCSession, didReceiveUserInfo userInfo: [String: Any]) {
let type = (userInfo["type"] as? String) ?? "unknown"
GatewayDiagnostics.log("watch messaging: didReceiveUserInfo type=\(type)")
if let event = WatchMessagingPayloadCodec.parseQuickReplyPayload(
userInfo,
transport: "transferUserInfo")
{
self.emitReply(event)
return
}
if let event = WatchMessagingPayloadCodec.parseExecApprovalResolvePayload(
userInfo,
transport: "transferUserInfo")
{
self.emitExecApprovalResolve(event)
return
}
if let event = WatchMessagingPayloadCodec.parseExecApprovalSnapshotRequestPayload(
userInfo,
transport: "transferUserInfo")
{
self.emitExecApprovalSnapshotRequest(event)
}
}
func sessionReachabilityDidChange(_ session: WCSession) {
GatewayDiagnostics.log(
"watch messaging: reachability changed reachable=\(session.isReachable) paired=\(session.isPaired) installed=\(session.isWatchAppInstalled)")
self.emitStatusUpdate(Self.status(for: session))
}
}

View File

@@ -0,0 +1,219 @@
import Foundation
import OpenClawKit
enum WatchMessagingPayloadCodec {
static func nowMs() -> Int {
Int(Date().timeIntervalSince1970 * 1000)
}
static func nonEmpty(_ value: String?) -> String? {
let trimmed = value?.trimmingCharacters(in: .whitespacesAndNewlines) ?? ""
return trimmed.isEmpty ? nil : trimmed
}
static func encodeNotificationPayload(
id: String,
params: OpenClawWatchNotifyParams) -> [String: Any]
{
var payload: [String: Any] = [
"type": OpenClawWatchPayloadType.notify.rawValue,
"id": id,
"title": params.title,
"body": params.body,
"priority": params.priority?.rawValue ?? OpenClawNotificationPriority.active.rawValue,
"sentAtMs": nowMs(),
]
if let promptId = nonEmpty(params.promptId) {
payload["promptId"] = promptId
}
if let sessionKey = nonEmpty(params.sessionKey) {
payload["sessionKey"] = sessionKey
}
if let kind = nonEmpty(params.kind) {
payload["kind"] = kind
}
if let details = nonEmpty(params.details) {
payload["details"] = details
}
if let expiresAtMs = params.expiresAtMs {
payload["expiresAtMs"] = expiresAtMs
}
if let risk = params.risk {
payload["risk"] = risk.rawValue
}
if let actions = params.actions, !actions.isEmpty {
payload["actions"] = actions.map { action in
var encoded: [String: Any] = [
"id": action.id,
"label": action.label,
]
if let style = nonEmpty(action.style) {
encoded["style"] = style
}
return encoded
}
}
return payload
}
static func encodeExecApprovalItem(_ item: OpenClawWatchExecApprovalItem) -> [String: Any] {
var payload: [String: Any] = [
"id": item.id,
"commandText": item.commandText,
"allowedDecisions": item.allowedDecisions.map(\.rawValue),
]
if let commandPreview = nonEmpty(item.commandPreview) {
payload["commandPreview"] = commandPreview
}
if let host = nonEmpty(item.host) {
payload["host"] = host
}
if let nodeId = nonEmpty(item.nodeId) {
payload["nodeId"] = nodeId
}
if let agentId = nonEmpty(item.agentId) {
payload["agentId"] = agentId
}
if let expiresAtMs = item.expiresAtMs {
payload["expiresAtMs"] = expiresAtMs
}
if let risk = item.risk {
payload["risk"] = risk.rawValue
}
return payload
}
static func encodeExecApprovalPromptPayload(
_ message: OpenClawWatchExecApprovalPromptMessage) -> [String: Any]
{
var payload: [String: Any] = [
"type": OpenClawWatchPayloadType.execApprovalPrompt.rawValue,
"approval": encodeExecApprovalItem(message.approval),
]
if let sentAtMs = message.sentAtMs {
payload["sentAtMs"] = sentAtMs
}
if let deliveryId = nonEmpty(message.deliveryId) {
payload["deliveryId"] = deliveryId
}
if message.resetResolvingState == true {
payload["resetResolvingState"] = true
}
return payload
}
static func encodeExecApprovalResolvedPayload(
_ message: OpenClawWatchExecApprovalResolvedMessage) -> [String: Any]
{
var payload: [String: Any] = [
"type": OpenClawWatchPayloadType.execApprovalResolved.rawValue,
"approvalId": message.approvalId,
]
if let decision = message.decision {
payload["decision"] = decision.rawValue
}
if let resolvedAtMs = message.resolvedAtMs {
payload["resolvedAtMs"] = resolvedAtMs
}
if let source = nonEmpty(message.source) {
payload["source"] = source
}
return payload
}
static func encodeExecApprovalExpiredPayload(
_ message: OpenClawWatchExecApprovalExpiredMessage) -> [String: Any]
{
var payload: [String: Any] = [
"type": OpenClawWatchPayloadType.execApprovalExpired.rawValue,
"approvalId": message.approvalId,
"reason": message.reason.rawValue,
]
if let expiredAtMs = message.expiredAtMs {
payload["expiredAtMs"] = expiredAtMs
}
return payload
}
static func encodeExecApprovalSnapshotPayload(
_ message: OpenClawWatchExecApprovalSnapshotMessage) -> [String: Any]
{
var payload: [String: Any] = [
"type": OpenClawWatchPayloadType.execApprovalSnapshot.rawValue,
"approvals": message.approvals.map(encodeExecApprovalItem),
]
if let sentAtMs = message.sentAtMs {
payload["sentAtMs"] = sentAtMs
}
if let snapshotId = nonEmpty(message.snapshotId) {
payload["snapshotId"] = snapshotId
}
return payload
}
static func parseQuickReplyPayload(
_ payload: [String: Any],
transport: String) -> WatchQuickReplyEvent?
{
guard (payload["type"] as? String) == OpenClawWatchPayloadType.reply.rawValue else {
return nil
}
guard let actionId = nonEmpty(payload["actionId"] as? String) else {
return nil
}
let promptId = nonEmpty(payload["promptId"] as? String) ?? "unknown"
let replyId = nonEmpty(payload["replyId"] as? String) ?? UUID().uuidString
let actionLabel = nonEmpty(payload["actionLabel"] as? String)
let sessionKey = nonEmpty(payload["sessionKey"] as? String)
let note = nonEmpty(payload["note"] as? String)
let sentAtMs = (payload["sentAtMs"] as? Int) ?? (payload["sentAtMs"] as? NSNumber)?.intValue
return WatchQuickReplyEvent(
replyId: replyId,
promptId: promptId,
actionId: actionId,
actionLabel: actionLabel,
sessionKey: sessionKey,
note: note,
sentAtMs: sentAtMs,
transport: transport)
}
static func parseExecApprovalResolvePayload(
_ payload: [String: Any],
transport: String) -> WatchExecApprovalResolveEvent?
{
guard (payload["type"] as? String) == OpenClawWatchPayloadType.execApprovalResolve.rawValue else {
return nil
}
guard let approvalId = nonEmpty(payload["approvalId"] as? String),
let rawDecision = nonEmpty(payload["decision"] as? String),
let decision = OpenClawWatchExecApprovalDecision(rawValue: rawDecision)
else {
return nil
}
let replyId = nonEmpty(payload["replyId"] as? String) ?? UUID().uuidString
let sentAtMs = (payload["sentAtMs"] as? Int) ?? (payload["sentAtMs"] as? NSNumber)?.intValue
return WatchExecApprovalResolveEvent(
replyId: replyId,
approvalId: approvalId,
decision: decision,
sentAtMs: sentAtMs,
transport: transport)
}
static func parseExecApprovalSnapshotRequestPayload(
_ payload: [String: Any],
transport: String) -> WatchExecApprovalSnapshotRequestEvent?
{
guard (payload["type"] as? String) == OpenClawWatchPayloadType.execApprovalSnapshotRequest.rawValue else {
return nil
}
let requestId = nonEmpty(payload["requestId"] as? String) ?? UUID().uuidString
let sentAtMs = (payload["sentAtMs"] as? Int) ?? (payload["sentAtMs"] as? NSNumber)?.intValue
return WatchExecApprovalSnapshotRequestEvent(
requestId: requestId,
sentAtMs: sentAtMs,
transport: transport)
}
}

View File

@@ -1,7 +1,5 @@
import Foundation
import OpenClawKit
import OSLog
@preconcurrency import WatchConnectivity
enum WatchMessagingError: LocalizedError {
case unsupported
@@ -21,272 +19,136 @@ enum WatchMessagingError: LocalizedError {
}
@MainActor
final class WatchMessagingService: NSObject, @preconcurrency WatchMessagingServicing {
nonisolated private static let logger = Logger(subsystem: "ai.openclaw", category: "watch.messaging")
private let session: WCSession?
private var pendingActivationContinuations: [CheckedContinuation<Void, Never>] = []
final class WatchMessagingService: @preconcurrency WatchMessagingServicing {
private let transport: WatchConnectivityTransport
private var statusHandler: (@Sendable (WatchMessagingStatus) -> Void)?
private var lastEmittedStatus: WatchMessagingStatus?
private var replyHandler: (@Sendable (WatchQuickReplyEvent) -> Void)?
private var execApprovalResolveHandler: (@Sendable (WatchExecApprovalResolveEvent) -> Void)?
private var execApprovalSnapshotRequestHandler: (
@Sendable (WatchExecApprovalSnapshotRequestEvent) -> Void)?
override init() {
if WCSession.isSupported() {
self.session = WCSession.default
} else {
self.session = nil
init(transport: WatchConnectivityTransport = WatchConnectivityTransport()) {
self.transport = transport
self.transport.setStatusUpdateHandler { [weak self] snapshot in
Task { @MainActor [weak self] in
self?.emitStatusIfChanged(snapshot)
}
}
super.init()
if let session = self.session {
session.delegate = self
session.activate()
self.transport.setReplyHandler { [weak self] event in
Task { @MainActor [weak self] in
self?.emitReply(event)
}
}
self.transport.setExecApprovalResolveHandler { [weak self] event in
Task { @MainActor [weak self] in
self?.emitExecApprovalResolve(event)
}
}
self.transport.setExecApprovalSnapshotRequestHandler { [weak self] event in
Task { @MainActor [weak self] in
self?.emitExecApprovalSnapshotRequest(event)
}
}
}
nonisolated static func isSupportedOnDevice() -> Bool {
WCSession.isSupported()
WatchConnectivityTransport.isSupportedOnDevice()
}
nonisolated static func currentStatusSnapshot() -> WatchMessagingStatus {
guard WCSession.isSupported() else {
return WatchMessagingStatus(
supported: false,
paired: false,
appInstalled: false,
reachable: false,
activationState: "unsupported")
}
let session = WCSession.default
return status(for: session)
WatchConnectivityTransport.currentStatusSnapshot()
}
func status() async -> WatchMessagingStatus {
await self.ensureActivated()
guard let session = self.session else {
return WatchMessagingStatus(
supported: false,
paired: false,
appInstalled: false,
reachable: false,
activationState: "unsupported")
await self.transport.status()
}
func setStatusHandler(_ handler: (@Sendable (WatchMessagingStatus) -> Void)?) {
self.statusHandler = handler
guard let handler else {
self.lastEmittedStatus = nil
GatewayDiagnostics.log("watch messaging: cleared status handler")
return
}
return Self.status(for: session)
let snapshot = self.transport.currentStatusSnapshot()
self.lastEmittedStatus = snapshot
GatewayDiagnostics.log(
"watch messaging: set status handler supported=\(snapshot.supported) paired=\(snapshot.paired) appInstalled=\(snapshot.appInstalled) reachable=\(snapshot.reachable) activation=\(snapshot.activationState)")
handler(snapshot)
}
func setReplyHandler(_ handler: (@Sendable (WatchQuickReplyEvent) -> Void)?) {
self.replyHandler = handler
}
func setExecApprovalResolveHandler(_ handler: (@Sendable (WatchExecApprovalResolveEvent) -> Void)?) {
self.execApprovalResolveHandler = handler
}
func setExecApprovalSnapshotRequestHandler(
_ handler: (@Sendable (WatchExecApprovalSnapshotRequestEvent) -> Void)?)
{
self.execApprovalSnapshotRequestHandler = handler
}
func sendNotification(
id: String,
params: OpenClawWatchNotifyParams) async throws -> WatchNotificationSendResult
{
await self.ensureActivated()
guard let session = self.session else {
throw WatchMessagingError.unsupported
}
let snapshot = Self.status(for: session)
guard snapshot.paired else { throw WatchMessagingError.notPaired }
guard snapshot.appInstalled else { throw WatchMessagingError.watchAppNotInstalled }
var payload: [String: Any] = [
"type": "watch.notify",
"id": id,
"title": params.title,
"body": params.body,
"priority": params.priority?.rawValue ?? OpenClawNotificationPriority.active.rawValue,
"sentAtMs": Int(Date().timeIntervalSince1970 * 1000),
]
if let promptId = Self.nonEmpty(params.promptId) {
payload["promptId"] = promptId
}
if let sessionKey = Self.nonEmpty(params.sessionKey) {
payload["sessionKey"] = sessionKey
}
if let kind = Self.nonEmpty(params.kind) {
payload["kind"] = kind
}
if let details = Self.nonEmpty(params.details) {
payload["details"] = details
}
if let expiresAtMs = params.expiresAtMs {
payload["expiresAtMs"] = expiresAtMs
}
if let risk = params.risk {
payload["risk"] = risk.rawValue
}
if let actions = params.actions, !actions.isEmpty {
payload["actions"] = actions.map { action in
var encoded: [String: Any] = [
"id": action.id,
"label": action.label,
]
if let style = Self.nonEmpty(action.style) {
encoded["style"] = style
}
return encoded
}
}
if snapshot.reachable {
do {
try await self.sendReachableMessage(payload, with: session)
return WatchNotificationSendResult(
deliveredImmediately: true,
queuedForDelivery: false,
transport: "sendMessage")
} catch {
Self.logger.error("watch sendMessage failed: \(error.localizedDescription, privacy: .public)")
}
}
_ = session.transferUserInfo(payload)
return WatchNotificationSendResult(
deliveredImmediately: false,
queuedForDelivery: true,
transport: "transferUserInfo")
let payload = WatchMessagingPayloadCodec.encodeNotificationPayload(id: id, params: params)
return try await self.transport.sendPayload(payload)
}
private func sendReachableMessage(_ payload: [String: Any], with session: WCSession) async throws {
try await withCheckedThrowingContinuation { continuation in
session.sendMessage(
payload,
replyHandler: { _ in
continuation.resume()
},
errorHandler: { error in
continuation.resume(throwing: error)
}
)
func sendExecApprovalPrompt(
_ message: OpenClawWatchExecApprovalPromptMessage) async throws -> WatchNotificationSendResult
{
try await self.transport.sendPayload(
WatchMessagingPayloadCodec.encodeExecApprovalPromptPayload(message))
}
func sendExecApprovalResolved(
_ message: OpenClawWatchExecApprovalResolvedMessage) async throws -> WatchNotificationSendResult
{
try await self.transport.sendPayload(
WatchMessagingPayloadCodec.encodeExecApprovalResolvedPayload(message))
}
func sendExecApprovalExpired(
_ message: OpenClawWatchExecApprovalExpiredMessage) async throws -> WatchNotificationSendResult
{
try await self.transport.sendPayload(
WatchMessagingPayloadCodec.encodeExecApprovalExpiredPayload(message))
}
func syncExecApprovalSnapshot(
_ message: OpenClawWatchExecApprovalSnapshotMessage) async throws -> WatchNotificationSendResult
{
try await self.transport.sendSnapshotPayload(
WatchMessagingPayloadCodec.encodeExecApprovalSnapshotPayload(message))
}
private func emitStatusIfChanged(_ snapshot: WatchMessagingStatus) {
guard snapshot != self.lastEmittedStatus else {
return
}
self.lastEmittedStatus = snapshot
GatewayDiagnostics.log(
"watch messaging: status supported=\(snapshot.supported) paired=\(snapshot.paired) appInstalled=\(snapshot.appInstalled) reachable=\(snapshot.reachable) activation=\(snapshot.activationState)")
self.statusHandler?(snapshot)
}
private func emitReply(_ event: WatchQuickReplyEvent) {
self.replyHandler?(event)
}
nonisolated private static func nonEmpty(_ value: String?) -> String? {
let trimmed = value?.trimmingCharacters(in: .whitespacesAndNewlines) ?? ""
return trimmed.isEmpty ? nil : trimmed
private func emitExecApprovalResolve(_ event: WatchExecApprovalResolveEvent) {
self.execApprovalResolveHandler?(event)
}
nonisolated private static func parseQuickReplyPayload(
_ payload: [String: Any],
transport: String) -> WatchQuickReplyEvent?
{
guard (payload["type"] as? String) == "watch.reply" else {
return nil
}
guard let actionId = nonEmpty(payload["actionId"] as? String) else {
return nil
}
let promptId = nonEmpty(payload["promptId"] as? String) ?? "unknown"
let replyId = nonEmpty(payload["replyId"] as? String) ?? UUID().uuidString
let actionLabel = nonEmpty(payload["actionLabel"] as? String)
let sessionKey = nonEmpty(payload["sessionKey"] as? String)
let note = nonEmpty(payload["note"] as? String)
let sentAtMs = (payload["sentAtMs"] as? Int) ?? (payload["sentAtMs"] as? NSNumber)?.intValue
return WatchQuickReplyEvent(
replyId: replyId,
promptId: promptId,
actionId: actionId,
actionLabel: actionLabel,
sessionKey: sessionKey,
note: note,
sentAtMs: sentAtMs,
transport: transport)
}
private func ensureActivated() async {
guard let session = self.session else { return }
if session.activationState == .activated { return }
session.activate()
await withCheckedContinuation { continuation in
self.pendingActivationContinuations.append(continuation)
}
}
nonisolated private static func status(for session: WCSession) -> WatchMessagingStatus {
WatchMessagingStatus(
supported: true,
paired: session.isPaired,
appInstalled: session.isWatchAppInstalled,
reachable: session.isReachable,
activationState: activationStateLabel(session.activationState))
}
nonisolated private static func activationStateLabel(_ state: WCSessionActivationState) -> String {
switch state {
case .notActivated:
"notActivated"
case .inactive:
"inactive"
case .activated:
"activated"
@unknown default:
"unknown"
}
private func emitExecApprovalSnapshotRequest(_ event: WatchExecApprovalSnapshotRequestEvent) {
GatewayDiagnostics.log(
"watch messaging: snapshot request id=\(event.requestId) transport=\(event.transport) sentAtMs=\(event.sentAtMs ?? -1)")
self.execApprovalSnapshotRequestHandler?(event)
}
}
extension WatchMessagingService: WCSessionDelegate {
nonisolated func session(
_ session: WCSession,
activationDidCompleteWith activationState: WCSessionActivationState,
error: (any Error)?)
{
if let error {
Self.logger.error("watch activation failed: \(error.localizedDescription, privacy: .public)")
} else {
Self.logger.debug("watch activation state=\(Self.activationStateLabel(activationState), privacy: .public)")
}
// Always resume all waiters so callers never hang, even on error.
Task { @MainActor in
let waiters = self.pendingActivationContinuations
self.pendingActivationContinuations.removeAll()
for continuation in waiters {
continuation.resume()
}
}
}
nonisolated func sessionDidBecomeInactive(_ session: WCSession) {}
nonisolated func sessionDidDeactivate(_ session: WCSession) {
session.activate()
}
nonisolated func session(_: WCSession, didReceiveMessage message: [String: Any]) {
guard let event = Self.parseQuickReplyPayload(message, transport: "sendMessage") else {
return
}
Task { @MainActor in
self.emitReply(event)
}
}
nonisolated func session(
_: WCSession,
didReceiveMessage message: [String: Any],
replyHandler: @escaping ([String: Any]) -> Void)
{
guard let event = Self.parseQuickReplyPayload(message, transport: "sendMessage") else {
replyHandler(["ok": false, "error": "unsupported_payload"])
return
}
replyHandler(["ok": true])
Task { @MainActor in
self.emitReply(event)
}
}
nonisolated func session(_: WCSession, didReceiveUserInfo userInfo: [String: Any]) {
guard let event = Self.parseQuickReplyPayload(userInfo, transport: "transferUserInfo") else {
return
}
Task { @MainActor in
self.emitReply(event)
}
}
nonisolated func sessionReachabilityDidChange(_ session: WCSession) {}
}

View File

@@ -53,6 +53,7 @@ struct SettingsTab: View {
@State private var selectedAgentPickerId: String = ""
@State private var showResetOnboardingAlert: Bool = false
@State private var showGatewayProblemDetails: Bool = false
@State private var activeFeatureHelp: FeatureHelp?
@State private var suppressCredentialPersist: Bool = false
@@ -63,6 +64,20 @@ struct SettingsTab: View {
Form {
Section {
DisclosureGroup(isExpanded: self.$gatewayExpanded) {
if let gatewayProblem = self.appModel.lastGatewayProblem,
!self.isGatewayConnected
{
GatewayProblemBanner(
problem: gatewayProblem,
primaryActionTitle: "Retry connection",
onPrimaryAction: {
Task { await self.retryGatewayConnectionFromProblem() }
},
onShowDetails: {
self.showGatewayProblemDetails = true
})
}
if !self.isGatewayConnected {
Text(
"1. Open a chat with your OpenClaw agent and send /pair\n"
@@ -123,7 +138,7 @@ struct SettingsTab: View {
if self.appModel.gatewayServerName == nil {
LabeledContent("Discovery", value: self.gatewayController.discoveryStatusText)
}
LabeledContent("Status", value: self.appModel.gatewayStatusText)
LabeledContent("Status", value: self.appModel.gatewayDisplayStatusText)
Toggle("Auto-connect on launch", isOn: self.$gatewayAutoConnect)
if let serverName = self.appModel.gatewayServerName {
@@ -402,6 +417,16 @@ struct SettingsTab: View {
.accessibilityLabel("Close")
}
}
.sheet(isPresented: self.$showGatewayProblemDetails) {
if let gatewayProblem = self.appModel.lastGatewayProblem {
GatewayProblemDetailsSheet(
problem: gatewayProblem,
primaryActionTitle: "Retry",
onPrimaryAction: {
Task { await self.retryGatewayConnectionFromProblem() }
})
}
}
.alert("Reset Onboarding?", isPresented: self.$showResetOnboardingAlert) {
Button("Reset", role: .destructive) {
self.resetOnboarding()
@@ -593,6 +618,9 @@ struct SettingsTab: View {
if let server = self.appModel.gatewayServerName, self.isGatewayConnected {
return server
}
if let problem = self.appModel.lastGatewayProblem {
return problem.statusText
}
let trimmed = self.appModel.gatewayStatusText.trimmingCharacters(in: .whitespacesAndNewlines)
return trimmed.isEmpty ? "Not connected" : trimmed
}
@@ -642,7 +670,7 @@ struct SettingsTab: View {
private func gatewayDebugText() -> String {
var lines: [String] = [
"gateway: \(self.appModel.gatewayStatusText)",
"gateway: \(self.appModel.gatewayDisplayStatusText)",
"discovery: \(self.gatewayController.discoveryStatusText)",
]
lines.append("server: \(self.appModel.gatewayServerName ?? "")")
@@ -889,6 +917,9 @@ struct SettingsTab: View {
}
private var setupStatusLine: String? {
if let problem = self.appModel.lastGatewayProblem {
return problem.message
}
let trimmedSetup = self.setupStatusText?.trimmingCharacters(in: .whitespacesAndNewlines) ?? ""
let gatewayStatus = self.appModel.gatewayStatusText.trimmingCharacters(in: .whitespacesAndNewlines)
if let friendly = self.friendlyGatewayMessage(from: gatewayStatus) { return friendly }
@@ -987,6 +1018,14 @@ struct SettingsTab: View {
SettingsNetworkingHelpers.httpURLString(host: host, port: port, fallback: fallback)
}
private func retryGatewayConnectionFromProblem() async {
if self.manualGatewayEnabled || self.connectingGatewayID == "manual" {
await self.connectManual()
return
}
await self.connectLastKnown()
}
private func resetOnboarding() {
// Disconnect first so RootCanvas doesn't instantly mark onboarding complete again.
self.appModel.disconnectGateway()

View File

@@ -1,11 +1,24 @@
import Foundation
import OpenClawKit
enum GatewayStatusBuilder {
@MainActor
static func build(appModel: NodeAppModel) -> StatusPill.GatewayState {
if appModel.gatewayServerName != nil { return .connected }
self.build(
gatewayServerName: appModel.gatewayServerName,
lastGatewayProblem: appModel.lastGatewayProblem,
gatewayStatusText: appModel.gatewayStatusText)
}
let text = appModel.gatewayStatusText.trimmingCharacters(in: .whitespacesAndNewlines)
static func build(
gatewayServerName: String?,
lastGatewayProblem: GatewayConnectionProblem?,
gatewayStatusText: String) -> StatusPill.GatewayState
{
if gatewayServerName != nil { return .connected }
if let lastGatewayProblem, lastGatewayProblem.pauseReconnect { return .error }
let text = gatewayStatusText.trimmingCharacters(in: .whitespacesAndNewlines)
if text.localizedCaseInsensitiveContains("connecting") ||
text.localizedCaseInsensitiveContains("reconnecting")
{

View File

@@ -16,6 +16,31 @@ enum StatusActivityBuilder {
tint: .orange)
}
if let gatewayProblem = appModel.lastGatewayProblem {
switch gatewayProblem.kind {
case .pairingRequired,
.pairingRoleUpgradeRequired,
.pairingScopeUpgradeRequired,
.pairingMetadataUpgradeRequired:
return StatusPill.Activity(
title: "Approval pending",
systemImage: "person.crop.circle.badge.clock",
tint: .orange)
case .timeout, .connectionRefused, .reachabilityFailed, .websocketCancelled:
return StatusPill.Activity(
title: "Check network",
systemImage: "wifi.exclamationmark",
tint: .orange)
default:
if gatewayProblem.pauseReconnect {
return StatusPill.Activity(
title: "Action required",
systemImage: "exclamationmark.triangle.fill",
tint: .orange)
}
}
}
let gatewayStatus = appModel.gatewayStatusText.trimmingCharacters(in: .whitespacesAndNewlines)
let gatewayLower = gatewayStatus.lowercased()
if gatewayLower.contains("repair") {

View File

@@ -49,6 +49,32 @@ private final class MockNotificationCenter: NotificationCentering, @unchecked Se
#expect(prompt == ExecApprovalNotificationPrompt(approvalId: "approval-123"))
}
@Test func parsePromptMapsReviewAction() {
let prompt = ExecApprovalNotificationBridge.parsePrompt(
actionIdentifier: ExecApprovalNotificationBridge.reviewActionIdentifier,
userInfo: [
"openclaw": [
"kind": ExecApprovalNotificationBridge.requestedKind,
"approvalId": "approval-456",
],
])
#expect(prompt == ExecApprovalNotificationPrompt(approvalId: "approval-456"))
}
@Test func parsePromptIgnoresUnexpectedActionIdentifiers() {
let prompt = ExecApprovalNotificationBridge.parsePrompt(
actionIdentifier: "openclaw.exec-approval.allow-once",
userInfo: [
"openclaw": [
"kind": ExecApprovalNotificationBridge.requestedKind,
"approvalId": "approval-789",
],
])
#expect(prompt == nil)
}
@Test @MainActor func handleResolvedPushRemovesMatchingNotifications() async {
let center = MockNotificationCenter()
center.delivered = [

View File

@@ -0,0 +1,36 @@
import OpenClawKit
import Testing
@testable import OpenClaw
@Suite struct GatewayStatusBuilderTests {
@Test func pausedProblemKeepsErrorStatus() {
let state = GatewayStatusBuilder.build(
gatewayServerName: nil,
lastGatewayProblem: GatewayConnectionProblem(
kind: .pairingRequired,
owner: .gateway,
title: "Pairing required",
message: "Approve this device before reconnecting.",
requestId: "req-123",
retryable: false,
pauseReconnect: true),
gatewayStatusText: "Reconnecting…")
#expect(state == .error)
}
@Test func transientProblemAllowsConnectingStatus() {
let state = GatewayStatusBuilder.build(
gatewayServerName: nil,
lastGatewayProblem: GatewayConnectionProblem(
kind: .timeout,
owner: .network,
title: "Connection timed out",
message: "The gateway did not respond before the connection timed out.",
retryable: true,
pauseReconnect: false),
gatewayStatusText: "Reconnecting…")
#expect(state == .connecting)
}
}

View File

@@ -46,16 +46,37 @@ private final class MockWatchMessagingService: @preconcurrency WatchMessagingSer
transport: "sendMessage")
var sendError: Error?
var lastSent: (id: String, params: OpenClawWatchNotifyParams)?
var lastSentExecApprovalPrompt: OpenClawWatchExecApprovalPromptMessage?
var lastSentExecApprovalResolved: OpenClawWatchExecApprovalResolvedMessage?
var lastSentExecApprovalExpired: OpenClawWatchExecApprovalExpiredMessage?
var lastSentExecApprovalSnapshot: OpenClawWatchExecApprovalSnapshotMessage?
private var statusHandler: (@Sendable (WatchMessagingStatus) -> Void)?
private var replyHandler: (@Sendable (WatchQuickReplyEvent) -> Void)?
private var execApprovalResolveHandler: (@Sendable (WatchExecApprovalResolveEvent) -> Void)?
private var execApprovalSnapshotRequestHandler: (@Sendable (WatchExecApprovalSnapshotRequestEvent) -> Void)?
func status() async -> WatchMessagingStatus {
self.currentStatus
}
func setStatusHandler(_ handler: (@Sendable (WatchMessagingStatus) -> Void)?) {
self.statusHandler = handler
}
func setReplyHandler(_ handler: (@Sendable (WatchQuickReplyEvent) -> Void)?) {
self.replyHandler = handler
}
func setExecApprovalResolveHandler(_ handler: (@Sendable (WatchExecApprovalResolveEvent) -> Void)?) {
self.execApprovalResolveHandler = handler
}
func setExecApprovalSnapshotRequestHandler(
_ handler: (@Sendable (WatchExecApprovalSnapshotRequestEvent) -> Void)?)
{
self.execApprovalSnapshotRequestHandler = handler
}
func sendNotification(id: String, params: OpenClawWatchNotifyParams) async throws -> WatchNotificationSendResult {
self.lastSent = (id: id, params: params)
if let sendError = self.sendError {
@@ -64,9 +85,57 @@ private final class MockWatchMessagingService: @preconcurrency WatchMessagingSer
return self.nextSendResult
}
func sendExecApprovalPrompt(
_ message: OpenClawWatchExecApprovalPromptMessage) async throws -> WatchNotificationSendResult
{
self.lastSentExecApprovalPrompt = message
if let sendError = self.sendError {
throw sendError
}
return self.nextSendResult
}
func sendExecApprovalResolved(
_ message: OpenClawWatchExecApprovalResolvedMessage) async throws -> WatchNotificationSendResult
{
self.lastSentExecApprovalResolved = message
if let sendError = self.sendError {
throw sendError
}
return self.nextSendResult
}
func sendExecApprovalExpired(
_ message: OpenClawWatchExecApprovalExpiredMessage) async throws -> WatchNotificationSendResult
{
self.lastSentExecApprovalExpired = message
if let sendError = self.sendError {
throw sendError
}
return self.nextSendResult
}
func syncExecApprovalSnapshot(
_ message: OpenClawWatchExecApprovalSnapshotMessage) async throws -> WatchNotificationSendResult
{
self.lastSentExecApprovalSnapshot = message
if let sendError = self.sendError {
throw sendError
}
return self.nextSendResult
}
func emitReply(_ event: WatchQuickReplyEvent) {
self.replyHandler?(event)
}
func emitExecApprovalResolve(_ event: WatchExecApprovalResolveEvent) {
self.execApprovalResolveHandler?(event)
}
func emitExecApprovalSnapshotRequest(_ event: WatchExecApprovalSnapshotRequestEvent) {
self.execApprovalSnapshotRequestHandler?(event)
}
}
private final class MockBootstrapNotificationCenter: NotificationCentering, @unchecked Sendable {
@@ -184,6 +253,118 @@ private final class MockBootstrapNotificationCenter: NotificationCentering, @unc
#expect(prompt.id == "approval-active")
}
@Test @MainActor func presentingExecApprovalPromptSyncsWatchPrompt() async throws {
let watchService = MockWatchMessagingService()
let appModel = NodeAppModel(watchMessagingService: watchService)
let prompt = try #require(
NodeAppModel._test_makeExecApprovalPrompt(
id: "approval-watch-sync",
commandText: "npm publish",
allowedDecisions: ["allow-once", "deny"],
host: "gateway",
nodeId: "node-1",
agentId: "main",
expiresAtMs: 1234))
appModel._test_presentExecApprovalPrompt(prompt)
await Task.yield()
let sent = try #require(watchService.lastSentExecApprovalPrompt)
#expect(sent.approval.id == "approval-watch-sync")
#expect(sent.approval.allowedDecisions == [.allowOnce, .deny])
#expect(sent.approval.host == "gateway")
#expect(sent.approval.risk == nil)
#expect(sent.resetResolvingState != true)
}
@Test @MainActor func watchExecApprovalSnapshotRequestPublishesCachedApprovalsInBackground() async throws {
let watchService = MockWatchMessagingService()
let appModel = NodeAppModel(watchMessagingService: watchService)
let futureExpiryMs = Int(Date().timeIntervalSince1970 * 1000) + 60_000
appModel._test_presentExecApprovalPrompt(
try #require(
NodeAppModel._test_makeExecApprovalPrompt(
id: "approval-watch-snapshot",
commandText: "echo from watch",
allowedDecisions: ["allow-once", "deny"],
host: "gateway",
nodeId: nil,
agentId: nil,
expiresAtMs: futureExpiryMs)))
await Task.yield()
appModel.setScenePhase(.background)
watchService.emitExecApprovalSnapshotRequest(
WatchExecApprovalSnapshotRequestEvent(
requestId: "snapshot-1",
sentAtMs: 111,
transport: "sendMessage"))
await Task.yield()
let snapshot = try #require(watchService.lastSentExecApprovalSnapshot)
#expect(snapshot.approvals.map(\.id) == ["approval-watch-snapshot"])
}
@Test @MainActor func watchExecApprovalSnapshotRequestSkipsForegroundRecovery() async throws {
let watchService = MockWatchMessagingService()
let appModel = NodeAppModel(watchMessagingService: watchService)
let futureExpiryMs = Int(Date().timeIntervalSince1970 * 1000) + 60_000
appModel._test_presentExecApprovalPrompt(
try #require(
NodeAppModel._test_makeExecApprovalPrompt(
id: "approval-watch-foreground-skip",
commandText: "echo foreground",
allowedDecisions: ["allow-once", "deny"],
host: "gateway",
nodeId: nil,
agentId: nil,
expiresAtMs: futureExpiryMs)))
await Task.yield()
watchService.lastSentExecApprovalSnapshot = nil
watchService.emitExecApprovalSnapshotRequest(
WatchExecApprovalSnapshotRequestEvent(
requestId: "snapshot-foreground",
sentAtMs: 222,
transport: "sendMessage"))
await Task.yield()
#expect(watchService.lastSentExecApprovalSnapshot == nil)
}
@Test @MainActor func pendingWatchRecoveryIDsAreIncludedWithoutDeliveredNotifications() async {
NodeAppModel._test_resetPersistedWatchExecApprovalBridgeState()
defer { NodeAppModel._test_resetPersistedWatchExecApprovalBridgeState() }
let appModel = NodeAppModel(notificationCenter: MockBootstrapNotificationCenter())
appModel._test_recordPendingWatchExecApprovalRecoveryID("approval-watch-recovery")
let ids = await appModel._test_pendingExecApprovalIDsForWatchRecovery()
#expect(ids == ["approval-watch-recovery"])
}
@Test @MainActor func presentingExecApprovalPromptClearsPendingWatchRecoveryID() throws {
NodeAppModel._test_resetPersistedWatchExecApprovalBridgeState()
defer { NodeAppModel._test_resetPersistedWatchExecApprovalBridgeState() }
let appModel = NodeAppModel(notificationCenter: MockBootstrapNotificationCenter())
appModel._test_recordPendingWatchExecApprovalRecoveryID("approval-watch-clear")
#expect(appModel._test_pendingWatchExecApprovalRecoveryIDs() == ["approval-watch-clear"])
appModel._test_presentExecApprovalPrompt(
try #require(
NodeAppModel._test_makeExecApprovalPrompt(
id: "approval-watch-clear",
commandText: "echo clear",
allowedDecisions: ["allow-once", "deny"],
host: "gateway",
nodeId: nil,
agentId: nil,
expiresAtMs: Int(Date().timeIntervalSince1970 * 1000) + 60_000)))
#expect(appModel._test_pendingWatchExecApprovalRecoveryIDs().isEmpty)
}
@Test func approvalNotificationErrorClassificationPrefersStructuredDetails() {
let staleError = GatewayResponseError(
method: "exec.approval.get",
@@ -200,6 +381,48 @@ private final class MockBootstrapNotificationCenter: NotificationCentering, @unc
#expect(NodeAppModel._test_isApprovalNotificationUnavailableError(unavailableError))
}
@Test func backgroundAwareExecApprovalReconnectCoversWatchAndPushPaths() {
#expect(
NodeAppModel._test_shouldUseBackgroundAwareExecApprovalReconnect(
sourceReason: "watch_request",
isBackgrounded: true)
)
#expect(
NodeAppModel._test_shouldUseBackgroundAwareExecApprovalReconnect(
sourceReason: "push_request",
isBackgrounded: true)
)
#expect(
NodeAppModel._test_shouldUseBackgroundAwareExecApprovalReconnect(
sourceReason: "watch_resolve",
isBackgrounded: true)
)
#expect(
!NodeAppModel._test_shouldUseBackgroundAwareExecApprovalReconnect(
sourceReason: "direct",
isBackgrounded: true)
)
#expect(
!NodeAppModel._test_shouldUseBackgroundAwareExecApprovalReconnect(
sourceReason: "watch_request",
isBackgrounded: false)
)
}
@Test func watchExecApprovalHydrateFetchesOnlyMissingIDs() {
let idsToFetch = NodeAppModel._test_watchExecApprovalIDsNeedingFetch(
candidateIDs: ["cached", "pending", "cached", "other", "", " pending "],
cachedApprovalIDs: ["cached", "also-cached"])
#expect(idsToFetch == ["pending", "other"])
}
@Test func watchExecApprovalRetryPromptResetsResolvingStateOnlyForRetryReason() {
#expect(NodeAppModel._test_shouldResetWatchExecApprovalResolvingStateOnPrompt(reason: "resolve_retry"))
#expect(!NodeAppModel._test_shouldResetWatchExecApprovalResolvingStateOnPrompt(reason: "push_request"))
#expect(!NodeAppModel._test_shouldResetWatchExecApprovalResolvingStateOnPrompt(reason: "present_prompt"))
}
@Test func operatorLoopWaitsForBootstrapHandoffBeforeUsingStoredToken() {
#expect(
!NodeAppModel._test_shouldStartOperatorGatewayLoop(
@@ -590,6 +813,7 @@ private final class MockBootstrapNotificationCenter: NotificationCentering, @unc
note: nil,
sentAtMs: 1234,
transport: "transferUserInfo"))
await Task.yield()
#expect(appModel._test_queuedWatchReplyCount() == 1)
}

View File

@@ -0,0 +1,26 @@
import Testing
@testable import OpenClaw
@Suite(.serialized) struct OpenClawAppDelegateTests {
@Test @MainActor func resolvesRegistryModelBeforeViewTaskAssignsDelegateModel() {
let registryModel = NodeAppModel()
OpenClawAppModelRegistry.appModel = registryModel
defer { OpenClawAppModelRegistry.appModel = nil }
let delegate = OpenClawAppDelegate()
#expect(delegate._test_resolvedAppModel() === registryModel)
}
@Test @MainActor func prefersExplicitDelegateModelOverRegistryFallback() {
let registryModel = NodeAppModel()
let explicitModel = NodeAppModel()
OpenClawAppModelRegistry.appModel = registryModel
defer { OpenClawAppModelRegistry.appModel = nil }
let delegate = OpenClawAppDelegate()
delegate.appModel = explicitModel
#expect(delegate._test_resolvedAppModel() === explicitModel)
}
}

150
apps/ios/VERSIONING.md Normal file
View File

@@ -0,0 +1,150 @@
# OpenClaw iOS Versioning
OpenClaw iOS uses a **pinned CalVer release version** instead of reading the current gateway version automatically on every build.
## Goals
- keep TestFlight submissions on one stable app version while iterating
- change only `CFBundleVersion` during normal TestFlight iteration
- promote the iOS release version to the current gateway version only when a maintainer chooses to do that
- keep Apple bundle fields valid for App Store Connect
- generate App Store release notes from an iOS-owned changelog
## Version model
The pinned iOS release version lives in `apps/ios/version.json`.
Supported pinned format:
- `YYYY.M.D`
Examples:
- `2026.4.6`
- `2026.4.10`
The root gateway version in `package.json` may still be one of:
- `YYYY.M.D`
- `YYYY.M.D-beta.N`
- `YYYY.M.D-N`
When you pin iOS from the gateway version, the iOS tooling strips the gateway suffix and keeps only the base CalVer.
Examples:
- gateway `2026.4.10` -> iOS `2026.4.10`
- gateway `2026.4.10-beta.3` -> iOS `2026.4.10`
- gateway `2026.4.10-2` -> iOS `2026.4.10`
## Apple bundle mapping
Pinned iOS version `2026.4.10` maps to:
- `CFBundleShortVersionString = 2026.4.10`
- `CFBundleVersion = numeric build number only`
`CFBundleShortVersionString` stays fixed for a TestFlight train until you intentionally pin a newer iOS release version.
## Source of truth and generated files
### Source files
- `apps/ios/version.json`
- pinned iOS release version
- `apps/ios/CHANGELOG.md`
- iOS-only changelog and release-note source
- `apps/ios/VERSIONING.md`
- workflow and constraints
### Generated or derived files
- `apps/ios/Config/Version.xcconfig`
- checked-in defaults derived from `apps/ios/version.json`
- `apps/ios/fastlane/metadata/en-US/release_notes.txt`
- generated from `apps/ios/CHANGELOG.md`
- `apps/ios/build/Version.xcconfig`
- local gitignored build override generated per build or beta prep
## Tooling surfaces
### Version parsing and sync tooling
- `scripts/lib/ios-version.ts`
- validates pinned iOS CalVer
- normalizes gateway version -> pinned iOS CalVer
- renders checked-in xcconfig and release notes
- `scripts/ios-version.ts`
- CLI for JSON, shell, or single-field version reads
- `scripts/ios-sync-versioning.ts`
- syncs checked-in derived files from the pinned iOS version
- `scripts/ios-pin-version.ts`
- explicitly pins iOS to a chosen release version or the current gateway version
### Build and beta flow
- `scripts/ios-write-version-xcconfig.sh`
- reads the pinned iOS version
- writes the local numeric build override file in `apps/ios/build/Version.xcconfig`
- `scripts/ios-beta-prepare.sh`
- prepares beta signing and bundle settings against the pinned iOS version
- `apps/ios/fastlane/Fastfile`
- resolves version metadata from the pinned iOS helper
- increments TestFlight build numbers for the pinned short version
## Release-note resolution order
When generating `apps/ios/fastlane/metadata/en-US/release_notes.txt`, the tooling reads the first available changelog section in this order:
1. exact pinned version, for example `## 2026.4.10`
2. `## Unreleased`
Recommended workflow:
- while iterating on a TestFlight train, keep pending notes under `## Unreleased`
- before the production release, move or copy the final notes under `## <pinned version>` and run sync again
## Common commands
```bash
pnpm ios:version
pnpm ios:version:check
pnpm ios:version:sync
pnpm ios:version:pin -- --from-gateway
pnpm ios:version:pin -- --version 2026.4.10
```
## Normal TestFlight iteration workflow
1. keep `apps/ios/version.json` pinned to the current TestFlight train version
2. update `apps/ios/CHANGELOG.md` under `## Unreleased` while iterating
3. upload more betas with the usual flow
4. let Fastlane increment only `CFBundleVersion`
This keeps the TestFlight version stable while review is in flight.
## New release promotion workflow
When you want the next production iOS release to align with the current gateway release:
1. pin iOS from the root gateway version:
```bash
pnpm ios:version:pin -- --from-gateway
```
2. review the generated changes in:
- `apps/ios/version.json`
- `apps/ios/Config/Version.xcconfig`
- `apps/ios/fastlane/metadata/en-US/release_notes.txt`
3. update `apps/ios/CHANGELOG.md` for the new release if needed
4. run `pnpm ios:version:sync` again if the changelog changed
5. submit the first TestFlight build for that newly pinned version
6. keep iterating only by build number until the release candidate is ready
7. release that reviewed TestFlight build to production
## Important invariant
Fastlane and Xcode should consume only the pinned iOS version from `apps/ios/version.json`.
Changing `package.json.version` alone must not change the iOS app version until a maintainer explicitly runs the pin step.

View File

@@ -2,27 +2,79 @@ import SwiftUI
@main
struct OpenClawWatchApp: App {
@Environment(\.scenePhase) private var scenePhase
@State private var inboxStore = WatchInboxStore()
@State private var receiver: WatchConnectivityReceiver?
@State private var execApprovalRefreshTask: Task<Void, Never>?
var body: some Scene {
WindowGroup {
WatchInboxView(store: self.inboxStore) { action in
guard let receiver = self.receiver else { return }
let draft = self.inboxStore.makeReplyDraft(action: action)
self.inboxStore.markReplySending(actionLabel: action.label)
Task { @MainActor in
let result = await receiver.sendReply(draft)
self.inboxStore.markReplyResult(result, actionLabel: action.label)
}
}
WatchInboxView(
store: self.inboxStore,
onAction: { action in
guard let receiver = self.receiver else { return }
let draft = self.inboxStore.makeReplyDraft(action: action)
self.inboxStore.markReplySending(actionLabel: action.label)
Task { @MainActor in
let result = await receiver.sendReply(draft)
self.inboxStore.markReplyResult(result, actionLabel: action.label)
}
},
onExecApprovalDecision: { approvalId, decision in
guard let receiver = self.receiver else { return }
self.inboxStore.markExecApprovalSending(approvalId: approvalId, decision: decision)
Task { @MainActor in
let result = await receiver.sendExecApprovalResolve(
approvalId: approvalId,
decision: decision)
self.inboxStore.markExecApprovalSendResult(
approvalId: approvalId,
decision: decision,
result: result)
}
},
onRefreshExecApprovalReview: {
self.refreshExecApprovalReview(force: true)
})
.task {
if self.receiver == nil {
let receiver = WatchConnectivityReceiver(store: self.inboxStore)
receiver.activate()
self.receiver = receiver
}
self.refreshExecApprovalReview()
}
.onChange(of: self.scenePhase) { _, newPhase in
guard newPhase == .active else { return }
self.refreshExecApprovalReview()
}
}
}
private func refreshExecApprovalReview(force: Bool = false) {
guard let receiver = self.receiver else { return }
guard force || self.inboxStore.shouldAutoRequestExecApprovalSnapshot else { return }
self.execApprovalRefreshTask?.cancel()
self.execApprovalRefreshTask = Task { @MainActor in
self.inboxStore.beginExecApprovalReviewLoading()
for attempt in 0..<5 {
if Task.isCancelled { return }
await receiver.requestExecApprovalSnapshot()
if !self.inboxStore.execApprovals.isEmpty
|| self.inboxStore.hasCompletedExecApprovalSnapshotRefresh
{
self.inboxStore.markExecApprovalReviewLoaded()
return
}
if attempt < 4 {
try? await Task.sleep(nanoseconds: 700_000_000)
}
}
if self.inboxStore.execApprovals.isEmpty {
self.inboxStore.markExecApprovalReviewUnavailable(
"Couldn't load approval from your iPhone yet.")
}
}
}
}

View File

@@ -52,6 +52,31 @@ final class WatchConnectivityReceiver: NSObject, @unchecked Sendable {
}
}
func requestExecApprovalSnapshot() async {
await self.ensureActivated()
guard let session = self.session else { return }
let request = WatchExecApprovalSnapshotRequestMessage(
requestId: UUID().uuidString,
sentAtMs: Self.nowMs())
let payload = Self.encodeSnapshotRequestPayload(request)
if session.isReachable {
do {
try await withCheckedThrowingContinuation(isolation: nil) {
(continuation: CheckedContinuation<Void, Error>) in
session.sendMessage(payload, replyHandler: { _ in
continuation.resume(returning: ())
}, errorHandler: { error in
continuation.resume(throwing: error)
})
}
return
} catch {
// Fall through to queued delivery.
}
}
_ = session.transferUserInfo(payload)
}
func sendReply(_ draft: WatchReplyDraft) async -> WatchReplySendResult {
await self.ensureActivated()
guard let session = self.session else {
@@ -63,7 +88,7 @@ final class WatchConnectivityReceiver: NSObject, @unchecked Sendable {
}
var payload: [String: Any] = [
"type": "watch.reply",
"type": WatchPayloadType.reply.rawValue,
"replyId": draft.replyId,
"promptId": draft.promptId,
"actionId": draft.actionId,
@@ -83,11 +108,38 @@ final class WatchConnectivityReceiver: NSObject, @unchecked Sendable {
payload["note"] = note
}
return await self.sendPayload(payload, session: session)
}
func sendExecApprovalResolve(
approvalId: String,
decision: WatchExecApprovalDecision) async -> WatchReplySendResult
{
await self.ensureActivated()
guard let session = self.session else {
return WatchReplySendResult(
deliveredImmediately: false,
queuedForDelivery: false,
transport: "none",
errorMessage: "watch session unavailable")
}
let payload = Self.encodeExecApprovalResolvePayload(
WatchExecApprovalResolveMessage(
approvalId: approvalId,
decision: decision,
replyId: UUID().uuidString,
sentAtMs: Self.nowMs()))
return await self.sendPayload(payload, session: session)
}
private func sendPayload(_ payload: [String: Any], session: WCSession) async -> WatchReplySendResult {
if session.isReachable {
do {
try await withCheckedThrowingContinuation { continuation in
try await withCheckedThrowingContinuation(isolation: nil) {
(continuation: CheckedContinuation<Void, Error>) in
session.sendMessage(payload, replyHandler: { _ in
continuation.resume()
continuation.resume(returning: ())
}, errorHandler: { error in
continuation.resume(throwing: error)
})
@@ -110,6 +162,10 @@ final class WatchConnectivityReceiver: NSObject, @unchecked Sendable {
errorMessage: nil)
}
private static func nowMs() -> Int {
Int(Date().timeIntervalSince1970 * 1000)
}
private static func normalizeObject(_ value: Any) -> [String: Any]? {
if let object = value as? [String: Any] {
return object
@@ -147,7 +203,9 @@ final class WatchConnectivityReceiver: NSObject, @unchecked Sendable {
}
private static func parseNotificationPayload(_ payload: [String: Any]) -> WatchNotifyMessage? {
guard let type = payload["type"] as? String, type == "watch.notify" else {
guard let type = payload["type"] as? String,
type == WatchPayloadType.notify.rawValue
else {
return nil
}
@@ -189,6 +247,153 @@ final class WatchConnectivityReceiver: NSObject, @unchecked Sendable {
risk: risk,
actions: actions)
}
private static func parseExecApprovalDecision(_ value: Any?) -> WatchExecApprovalDecision? {
let raw = (value as? String)?.trimmingCharacters(in: .whitespacesAndNewlines) ?? ""
return WatchExecApprovalDecision(rawValue: raw)
}
private static func parseExecApprovalItem(_ value: Any?) -> WatchExecApprovalItem? {
guard let payload = value.flatMap(Self.normalizeObject) else {
return nil
}
let id = (payload["id"] as? String)?.trimmingCharacters(in: .whitespacesAndNewlines) ?? ""
let commandText = (payload["commandText"] as? String)?
.trimmingCharacters(in: .whitespacesAndNewlines) ?? ""
guard !id.isEmpty, !commandText.isEmpty else {
return nil
}
let commandPreview = (payload["commandPreview"] as? String)?
.trimmingCharacters(in: .whitespacesAndNewlines)
let host = (payload["host"] as? String)?.trimmingCharacters(in: .whitespacesAndNewlines)
let nodeId = (payload["nodeId"] as? String)?.trimmingCharacters(in: .whitespacesAndNewlines)
let agentId = (payload["agentId"] as? String)?.trimmingCharacters(in: .whitespacesAndNewlines)
let expiresAtMs = (payload["expiresAtMs"] as? Int) ?? (payload["expiresAtMs"] as? NSNumber)?.intValue
let riskRaw = (payload["risk"] as? String)?.trimmingCharacters(in: .whitespacesAndNewlines) ?? ""
let risk = WatchRiskLevel(rawValue: riskRaw)
let allowedDecisions = (payload["allowedDecisions"] as? [Any] ?? []).compactMap {
Self.parseExecApprovalDecision($0)
}
return WatchExecApprovalItem(
id: id,
commandText: commandText,
commandPreview: commandPreview,
host: host,
nodeId: nodeId,
agentId: agentId,
expiresAtMs: expiresAtMs,
allowedDecisions: allowedDecisions,
risk: risk)
}
private static func parseExecApprovalPromptPayload(
_ payload: [String: Any]) -> WatchExecApprovalPromptMessage?
{
guard let type = payload["type"] as? String,
type == WatchPayloadType.execApprovalPrompt.rawValue,
let approval = Self.parseExecApprovalItem(payload["approval"])
else {
return nil
}
let sentAtMs = (payload["sentAtMs"] as? Int) ?? (payload["sentAtMs"] as? NSNumber)?.intValue
let deliveryId = (payload["deliveryId"] as? String)?.trimmingCharacters(in: .whitespacesAndNewlines)
let resetResolvingState = payload["resetResolvingState"] as? Bool
return WatchExecApprovalPromptMessage(
approval: approval,
sentAtMs: sentAtMs,
deliveryId: deliveryId,
resetResolvingState: resetResolvingState)
}
private static func parseExecApprovalResolvedPayload(
_ payload: [String: Any]) -> WatchExecApprovalResolvedMessage?
{
guard let type = payload["type"] as? String,
type == WatchPayloadType.execApprovalResolved.rawValue
else {
return nil
}
let approvalId = (payload["approvalId"] as? String)?.trimmingCharacters(in: .whitespacesAndNewlines) ?? ""
guard !approvalId.isEmpty else { return nil }
let decision = Self.parseExecApprovalDecision(payload["decision"])
let resolvedAtMs = (payload["resolvedAtMs"] as? Int)
?? (payload["resolvedAtMs"] as? NSNumber)?.intValue
let source = (payload["source"] as? String)?.trimmingCharacters(in: .whitespacesAndNewlines)
return WatchExecApprovalResolvedMessage(
approvalId: approvalId,
decision: decision,
resolvedAtMs: resolvedAtMs,
source: source)
}
private static func parseExecApprovalExpiredPayload(
_ payload: [String: Any]) -> WatchExecApprovalExpiredMessage?
{
guard let type = payload["type"] as? String,
type == WatchPayloadType.execApprovalExpired.rawValue
else {
return nil
}
let approvalId = (payload["approvalId"] as? String)?.trimmingCharacters(in: .whitespacesAndNewlines) ?? ""
let rawReason = (payload["reason"] as? String)?.trimmingCharacters(in: .whitespacesAndNewlines) ?? ""
guard !approvalId.isEmpty,
let reason = WatchExecApprovalCloseReason(rawValue: rawReason)
else {
return nil
}
let expiredAtMs = (payload["expiredAtMs"] as? Int) ?? (payload["expiredAtMs"] as? NSNumber)?.intValue
return WatchExecApprovalExpiredMessage(
approvalId: approvalId,
reason: reason,
expiredAtMs: expiredAtMs)
}
private static func parseExecApprovalSnapshotPayload(
_ payload: [String: Any]) -> WatchExecApprovalSnapshotMessage?
{
guard let type = payload["type"] as? String,
type == WatchPayloadType.execApprovalSnapshot.rawValue
else {
return nil
}
let approvals = (payload["approvals"] as? [Any] ?? []).compactMap { item in
Self.parseExecApprovalItem(item)
}
let sentAtMs = (payload["sentAtMs"] as? Int) ?? (payload["sentAtMs"] as? NSNumber)?.intValue
let snapshotId = (payload["snapshotId"] as? String)?.trimmingCharacters(in: .whitespacesAndNewlines)
return WatchExecApprovalSnapshotMessage(
approvals: approvals,
sentAtMs: sentAtMs,
snapshotId: snapshotId)
}
private static func encodeSnapshotRequestPayload(
_ request: WatchExecApprovalSnapshotRequestMessage) -> [String: Any]
{
var payload: [String: Any] = [
"type": WatchPayloadType.execApprovalSnapshotRequest.rawValue,
"requestId": request.requestId,
]
if let sentAtMs = request.sentAtMs {
payload["sentAtMs"] = sentAtMs
}
return payload
}
private static func encodeExecApprovalResolvePayload(
_ message: WatchExecApprovalResolveMessage) -> [String: Any]
{
var payload: [String: Any] = [
"type": WatchPayloadType.execApprovalResolve.rawValue,
"approvalId": message.approvalId,
"decision": message.decision.rawValue,
"replyId": message.replyId,
]
if let sentAtMs = message.sentAtMs {
payload["sentAtMs"] = sentAtMs
}
return payload
}
}
extension WatchConnectivityReceiver: WCSessionDelegate {
@@ -196,13 +401,14 @@ extension WatchConnectivityReceiver: WCSessionDelegate {
_: WCSession,
activationDidCompleteWith _: WCSessionActivationState,
error _: (any Error)?)
{}
{
Task {
await self.requestExecApprovalSnapshot()
}
}
func session(_: WCSession, didReceiveMessage message: [String: Any]) {
guard let incoming = Self.parseNotificationPayload(message) else { return }
Task { @MainActor in
self.store.consume(message: incoming, transport: "sendMessage")
}
self.consumeIncomingPayload(message, transport: "sendMessage")
}
func session(
@@ -210,27 +416,47 @@ extension WatchConnectivityReceiver: WCSessionDelegate {
didReceiveMessage message: [String: Any],
replyHandler: @escaping ([String: Any]) -> Void)
{
guard let incoming = Self.parseNotificationPayload(message) else {
replyHandler(["ok": false])
return
}
replyHandler(["ok": true])
Task { @MainActor in
self.store.consume(message: incoming, transport: "sendMessage")
}
self.consumeIncomingPayload(message, transport: "sendMessage")
}
func session(_: WCSession, didReceiveUserInfo userInfo: [String: Any]) {
guard let incoming = Self.parseNotificationPayload(userInfo) else { return }
Task { @MainActor in
self.store.consume(message: incoming, transport: "transferUserInfo")
}
self.consumeIncomingPayload(userInfo, transport: "transferUserInfo")
}
func session(_: WCSession, didReceiveApplicationContext applicationContext: [String: Any]) {
guard let incoming = Self.parseNotificationPayload(applicationContext) else { return }
Task { @MainActor in
self.store.consume(message: incoming, transport: "applicationContext")
self.consumeIncomingPayload(applicationContext, transport: "applicationContext")
}
private func consumeIncomingPayload(_ payload: [String: Any], transport: String) {
if let incoming = Self.parseNotificationPayload(payload) {
Task { @MainActor in
self.store.consume(message: incoming, transport: transport)
}
return
}
if let prompt = Self.parseExecApprovalPromptPayload(payload) {
Task { @MainActor in
self.store.consume(execApprovalPrompt: prompt, transport: transport)
}
return
}
if let resolved = Self.parseExecApprovalResolvedPayload(payload) {
Task { @MainActor in
self.store.consume(execApprovalResolved: resolved)
}
return
}
if let expired = Self.parseExecApprovalExpiredPayload(payload) {
Task { @MainActor in
self.store.consume(execApprovalExpired: expired)
}
return
}
if let snapshot = Self.parseExecApprovalSnapshotPayload(payload) {
Task { @MainActor in
self.store.consume(execApprovalSnapshot: snapshot, transport: transport)
}
}
}
}

View File

@@ -3,6 +3,86 @@ import Observation
import UserNotifications
import WatchKit
enum WatchPayloadType: String, Codable, Sendable, Equatable {
case notify = "watch.notify"
case reply = "watch.reply"
case execApprovalPrompt = "watch.execApproval.prompt"
case execApprovalResolve = "watch.execApproval.resolve"
case execApprovalResolved = "watch.execApproval.resolved"
case execApprovalExpired = "watch.execApproval.expired"
case execApprovalSnapshot = "watch.execApproval.snapshot"
case execApprovalSnapshotRequest = "watch.execApproval.snapshotRequest"
}
enum WatchRiskLevel: String, Codable, Sendable, Equatable {
case low
case medium
case high
}
enum WatchExecApprovalDecision: String, Codable, Sendable, Equatable {
case allowOnce = "allow-once"
case deny
}
enum WatchExecApprovalCloseReason: String, Codable, Sendable, Equatable {
case expired
case notFound = "not-found"
case unavailable
case replaced
case resolved
}
struct WatchExecApprovalItem: Codable, Sendable, Equatable, Identifiable {
var id: String
var commandText: String
var commandPreview: String?
var host: String?
var nodeId: String?
var agentId: String?
var expiresAtMs: Int?
var allowedDecisions: [WatchExecApprovalDecision]
var risk: WatchRiskLevel?
}
struct WatchExecApprovalPromptMessage: Codable, Sendable, Equatable {
var approval: WatchExecApprovalItem
var sentAtMs: Int?
var deliveryId: String?
var resetResolvingState: Bool?
}
struct WatchExecApprovalResolvedMessage: Codable, Sendable, Equatable {
var approvalId: String
var decision: WatchExecApprovalDecision?
var resolvedAtMs: Int?
var source: String?
}
struct WatchExecApprovalExpiredMessage: Codable, Sendable, Equatable {
var approvalId: String
var reason: WatchExecApprovalCloseReason
var expiredAtMs: Int?
}
struct WatchExecApprovalSnapshotMessage: Codable, Sendable, Equatable {
var approvals: [WatchExecApprovalItem]
var sentAtMs: Int?
var snapshotId: String?
}
struct WatchExecApprovalSnapshotRequestMessage: Codable, Sendable, Equatable {
var requestId: String
var sentAtMs: Int?
}
struct WatchExecApprovalResolveMessage: Codable, Sendable, Equatable {
var approvalId: String
var decision: WatchExecApprovalDecision
var replyId: String
var sentAtMs: Int?
}
struct WatchPromptAction: Codable, Sendable, Equatable, Identifiable {
var id: String
var label: String
@@ -23,6 +103,18 @@ struct WatchNotifyMessage: Sendable {
var actions: [WatchPromptAction]
}
struct WatchExecApprovalRecord: Codable, Sendable, Equatable, Identifiable {
var approval: WatchExecApprovalItem
var transport: String
var updatedAt: Date
var isResolving: Bool
var pendingDecision: WatchExecApprovalDecision?
var statusText: String?
var statusAt: Date?
var id: String { self.approval.id }
}
@MainActor @Observable final class WatchInboxStore {
private struct PersistedState: Codable {
var title: String
@@ -39,13 +131,20 @@ struct WatchNotifyMessage: Sendable {
var actions: [WatchPromptAction]?
var replyStatusText: String?
var replyStatusAt: Date?
var execApprovals: [WatchExecApprovalRecord]
var selectedExecApprovalID: String?
var lastExecApprovalSnapshotID: String?
var lastExecApprovalOutcomeText: String?
var lastExecApprovalOutcomeAt: Date?
}
private static let persistedStateKey = "watch.inbox.state.v1"
private static let persistedStateKey = "watch.inbox.state.v2"
private static let defaultTitle = "OpenClaw"
private static let defaultBody = "Waiting for messages from your iPhone."
private let defaults: UserDefaults
var title = "OpenClaw"
var body = "Waiting for messages from your iPhone."
var title = WatchInboxStore.defaultTitle
var body = WatchInboxStore.defaultBody
var transport = "none"
var updatedAt: Date?
var promptId: String?
@@ -58,16 +157,88 @@ struct WatchNotifyMessage: Sendable {
var replyStatusText: String?
var replyStatusAt: Date?
var isReplySending = false
var execApprovals: [WatchExecApprovalRecord] = []
var selectedExecApprovalID: String?
var lastExecApprovalOutcomeText: String?
var lastExecApprovalOutcomeAt: Date?
var isExecApprovalReviewLoading = false
var execApprovalReviewStatusText: String?
var execApprovalReviewStatusAt: Date?
private var lastExecApprovalSnapshotID: String?
private var hasCompletedExecApprovalSnapshotRefreshInSession = false
private var lastDeliveryKey: String?
init(defaults: UserDefaults = .standard) {
self.defaults = defaults
self.restorePersistedState()
self.pruneExpiredExecApprovals(nowMs: Self.nowMs())
Task {
await self.ensureNotificationAuthorization()
}
}
var sortedExecApprovals: [WatchExecApprovalRecord] {
self.execApprovals.sorted { lhs, rhs in
let lhsExpires = lhs.approval.expiresAtMs ?? Int.max
let rhsExpires = rhs.approval.expiresAtMs ?? Int.max
if lhsExpires != rhsExpires {
return lhsExpires < rhsExpires
}
return lhs.updatedAt > rhs.updatedAt
}
}
var activeExecApproval: WatchExecApprovalRecord? {
if let selectedExecApprovalID,
let selected = self.execApprovals.first(where: { $0.id == selectedExecApprovalID })
{
return selected
}
return self.sortedExecApprovals.first
}
var shouldAutoRequestExecApprovalSnapshot: Bool {
self.execApprovals.isEmpty
&& self.actions.isEmpty
&& self.title == Self.defaultTitle
&& self.body == Self.defaultBody
&& !self.hasCompletedExecApprovalSnapshotRefreshInSession
}
var hasCompletedExecApprovalSnapshotRefresh: Bool {
self.hasCompletedExecApprovalSnapshotRefreshInSession
}
var shouldShowExecApprovalReviewStatus: Bool {
self.execApprovals.isEmpty && !(self.execApprovalReviewStatusText?.isEmpty ?? true)
}
func beginExecApprovalReviewLoading() {
guard self.execApprovals.isEmpty else {
self.markExecApprovalReviewLoaded()
return
}
self.isExecApprovalReviewLoading = true
self.execApprovalReviewStatusText = "Loading approval from iPhone…"
self.execApprovalReviewStatusAt = Date()
}
func markExecApprovalReviewLoaded() {
self.isExecApprovalReviewLoading = false
self.execApprovalReviewStatusText = nil
self.execApprovalReviewStatusAt = nil
}
func markExecApprovalReviewUnavailable(_ message: String) {
guard self.execApprovals.isEmpty else {
self.markExecApprovalReviewLoaded()
return
}
self.isExecApprovalReviewLoading = false
self.execApprovalReviewStatusText = message
self.execApprovalReviewStatusAt = Date()
}
func consume(message: WatchNotifyMessage, transport: String) {
let messageID = message.id?
.trimmingCharacters(in: .whitespacesAndNewlines)
@@ -82,6 +253,7 @@ struct WatchNotifyMessage: Sendable {
self.title = normalizedTitle
self.body = message.body
self.transport = transport
self.markExecApprovalReviewLoaded()
self.updatedAt = Date()
self.promptId = message.promptId
self.sessionKey = message.sessionKey
@@ -105,6 +277,209 @@ struct WatchNotifyMessage: Sendable {
}
}
func consume(
execApprovalPrompt message: WatchExecApprovalPromptMessage,
transport: String)
{
self.pruneExpiredExecApprovals(nowMs: Self.nowMs())
self.upsertExecApproval(
message.approval,
transport: transport,
keepSelectionIfPossible: true,
resetResolvingState: message.resetResolvingState == true)
self.markExecApprovalReviewLoaded()
self.lastExecApprovalOutcomeText = nil
self.lastExecApprovalOutcomeAt = nil
Task {
await self.postLocalNotification(
identifier: "watch.execApproval.\(message.approval.id)",
title: "Exec approval required",
body: message.approval.commandPreview ?? message.approval.commandText,
risk: message.approval.risk?.rawValue)
}
}
func consume(
execApprovalSnapshot message: WatchExecApprovalSnapshotMessage,
transport: String)
{
let snapshotID = message.snapshotId?.trimmingCharacters(in: .whitespacesAndNewlines)
if let snapshotID, !snapshotID.isEmpty, snapshotID == self.lastExecApprovalSnapshotID {
return
}
let existingRecordsByID = Dictionary(
uniqueKeysWithValues: self.execApprovals.map { ($0.id, $0) })
self.execApprovals = message.approvals.map { approval in
self.mergedExecApprovalRecord(
approval: approval,
transport: transport,
existingRecord: existingRecordsByID[approval.id])
}
self.lastExecApprovalSnapshotID = snapshotID
self.hasCompletedExecApprovalSnapshotRefreshInSession = true
if let selectedExecApprovalID,
!self.execApprovals.contains(where: { $0.id == selectedExecApprovalID })
{
self.selectedExecApprovalID = self.sortedExecApprovals.first?.id
} else if self.selectedExecApprovalID == nil {
self.selectedExecApprovalID = self.sortedExecApprovals.first?.id
}
self.pruneExpiredExecApprovals(nowMs: Self.nowMs())
self.markExecApprovalReviewLoaded()
self.persistState()
}
func consume(execApprovalResolved message: WatchExecApprovalResolvedMessage) {
self.removeExecApproval(id: message.approvalId)
let statusText: String
switch message.decision {
case .allowOnce:
statusText = "Allowed once"
case .deny:
statusText = "Denied"
case nil:
statusText = "Approval resolved"
}
self.lastExecApprovalOutcomeText = statusText
self.lastExecApprovalOutcomeAt = Date()
self.persistState()
}
func consume(execApprovalExpired message: WatchExecApprovalExpiredMessage) {
self.removeExecApproval(id: message.approvalId)
let statusText: String
switch message.reason {
case .expired:
statusText = "Approval expired"
case .notFound:
statusText = "Approval no longer available"
case .resolved:
statusText = "Approval resolved elsewhere"
case .replaced:
statusText = "Approval replaced"
case .unavailable:
statusText = "Approval unavailable"
}
self.lastExecApprovalOutcomeText = statusText
self.lastExecApprovalOutcomeAt = Date()
self.persistState()
}
func selectExecApproval(id: String) {
let normalizedID = id.trimmingCharacters(in: .whitespacesAndNewlines)
guard !normalizedID.isEmpty else { return }
guard self.execApprovals.contains(where: { $0.id == normalizedID }) else { return }
self.selectedExecApprovalID = normalizedID
self.persistState()
}
func markExecApprovalSending(approvalId: String, decision: WatchExecApprovalDecision) {
guard let index = self.execApprovals.firstIndex(where: { $0.id == approvalId }) else { return }
self.execApprovals[index].isResolving = true
self.execApprovals[index].pendingDecision = decision
self.execApprovals[index].statusText = "Sending \(Self.decisionLabel(decision))"
self.execApprovals[index].statusAt = Date()
self.persistState()
}
func markExecApprovalSendResult(
approvalId: String,
decision: WatchExecApprovalDecision,
result: WatchReplySendResult)
{
guard let index = self.execApprovals.firstIndex(where: { $0.id == approvalId }) else { return }
if let errorMessage = result.errorMessage, !errorMessage.isEmpty {
self.execApprovals[index].isResolving = false
self.execApprovals[index].statusText = "Failed: \(errorMessage)"
} else if result.deliveredImmediately {
self.execApprovals[index].isResolving = true
self.execApprovals[index].statusText = "\(Self.decisionLabel(decision)): sent"
} else if result.queuedForDelivery {
self.execApprovals[index].isResolving = true
self.execApprovals[index].statusText = "\(Self.decisionLabel(decision)): queued"
} else {
self.execApprovals[index].isResolving = true
self.execApprovals[index].statusText = "\(Self.decisionLabel(decision)): sent"
}
self.execApprovals[index].pendingDecision = result.errorMessage == nil ? decision : nil
self.execApprovals[index].statusAt = Date()
self.persistState()
}
private func upsertExecApproval(
_ approval: WatchExecApprovalItem,
transport: String,
keepSelectionIfPossible: Bool,
resetResolvingState: Bool = false)
{
if let index = self.execApprovals.firstIndex(where: { $0.id == approval.id }) {
self.execApprovals[index] = self.mergedExecApprovalRecord(
approval: approval,
transport: transport,
existingRecord: self.execApprovals[index],
resetResolvingState: resetResolvingState)
} else {
self.execApprovals.append(
self.mergedExecApprovalRecord(
approval: approval,
transport: transport,
existingRecord: nil,
resetResolvingState: resetResolvingState))
}
if !keepSelectionIfPossible || self.selectedExecApprovalID == nil {
self.selectedExecApprovalID = approval.id
}
self.persistState()
}
private func mergedExecApprovalRecord(
approval: WatchExecApprovalItem,
transport: String,
existingRecord: WatchExecApprovalRecord?,
resetResolvingState: Bool = false) -> WatchExecApprovalRecord
{
// Preserve in-flight state across ordinary snapshot/prompt refreshes so duplicate
// submissions stay disabled, but clear it when the iPhone explicitly republishes a
// prompt after a failed resolve so the watch can retry.
let isResolving = resetResolvingState ? false : (existingRecord?.isResolving ?? false)
let pendingDecision = resetResolvingState ? nil : existingRecord?.pendingDecision
let statusText = resetResolvingState ? nil : existingRecord?.statusText
let statusAt = resetResolvingState ? nil : existingRecord?.statusAt
return WatchExecApprovalRecord(
approval: approval,
transport: transport,
updatedAt: Date(),
isResolving: isResolving,
pendingDecision: pendingDecision,
statusText: statusText,
statusAt: statusAt)
}
private func removeExecApproval(id: String) {
let normalizedID = id.trimmingCharacters(in: .whitespacesAndNewlines)
guard !normalizedID.isEmpty else { return }
self.execApprovals.removeAll { $0.id == normalizedID }
if self.selectedExecApprovalID == normalizedID {
self.selectedExecApprovalID = self.sortedExecApprovals.first?.id
}
self.persistState()
}
private func pruneExpiredExecApprovals(nowMs: Int) {
self.execApprovals.removeAll { record in
guard let expiresAtMs = record.approval.expiresAtMs else { return false }
return expiresAtMs <= nowMs
}
if let selectedExecApprovalID,
!self.execApprovals.contains(where: { $0.id == selectedExecApprovalID })
{
self.selectedExecApprovalID = self.sortedExecApprovals.first?.id
}
self.persistState()
}
private func restorePersistedState() {
guard let data = self.defaults.data(forKey: Self.persistedStateKey),
let state = try? JSONDecoder().decode(PersistedState.self, from: data)
@@ -126,10 +501,15 @@ struct WatchNotifyMessage: Sendable {
self.actions = state.actions ?? []
self.replyStatusText = state.replyStatusText
self.replyStatusAt = state.replyStatusAt
self.execApprovals = state.execApprovals
self.selectedExecApprovalID = state.selectedExecApprovalID
self.lastExecApprovalSnapshotID = state.lastExecApprovalSnapshotID
self.lastExecApprovalOutcomeText = state.lastExecApprovalOutcomeText
self.lastExecApprovalOutcomeAt = state.lastExecApprovalOutcomeAt
}
private func persistState() {
guard let updatedAt = self.updatedAt else { return }
let updatedAt = self.updatedAt ?? self.lastExecApprovalOutcomeAt ?? Date()
let state = PersistedState(
title: self.title,
body: self.body,
@@ -144,7 +524,12 @@ struct WatchNotifyMessage: Sendable {
risk: self.risk,
actions: self.actions,
replyStatusText: self.replyStatusText,
replyStatusAt: self.replyStatusAt)
replyStatusAt: self.replyStatusAt,
execApprovals: self.execApprovals,
selectedExecApprovalID: self.selectedExecApprovalID,
lastExecApprovalSnapshotID: self.lastExecApprovalSnapshotID,
lastExecApprovalOutcomeText: self.lastExecApprovalOutcomeText,
lastExecApprovalOutcomeAt: self.lastExecApprovalOutcomeAt)
guard let data = try? JSONEncoder().encode(state) else { return }
self.defaults.set(data, forKey: Self.persistedStateKey)
}
@@ -187,7 +572,7 @@ struct WatchNotifyMessage: Sendable {
actionLabel: action.label,
sessionKey: self.sessionKey,
note: nil,
sentAtMs: Int(Date().timeIntervalSince1970 * 1000))
sentAtMs: Self.nowMs())
}
func markReplySending(actionLabel: String) {
@@ -227,4 +612,17 @@ struct WatchNotifyMessage: Sendable {
_ = try? await UNUserNotificationCenter.current().add(request)
WKInterfaceDevice.current().play(self.mapHapticRisk(risk))
}
private static func decisionLabel(_ decision: WatchExecApprovalDecision) -> String {
switch decision {
case .allowOnce:
"Allow Once"
case .deny:
"Deny"
}
}
private static func nowMs() -> Int {
Int(Date().timeIntervalSince1970 * 1000)
}
}

View File

@@ -1,7 +1,246 @@
import SwiftUI
struct WatchInboxView: View {
@Bindable var store: WatchInboxStore
var store: WatchInboxStore
var onAction: ((WatchPromptAction) -> Void)?
var onExecApprovalDecision: ((String, WatchExecApprovalDecision) -> Void)?
var onRefreshExecApprovalReview: (() -> Void)?
var body: some View {
NavigationStack {
if self.store.sortedExecApprovals.count == 1,
let record = self.store.activeExecApproval
{
WatchExecApprovalDetailView(
store: self.store,
record: record,
onDecision: self.onExecApprovalDecision)
} else if !self.store.sortedExecApprovals.isEmpty {
WatchExecApprovalListView(
store: self.store,
onDecision: self.onExecApprovalDecision)
} else if self.store.shouldShowExecApprovalReviewStatus {
WatchExecApprovalLoadingView(
store: self.store,
onRetry: self.onRefreshExecApprovalReview)
} else {
WatchGenericInboxView(store: self.store, onAction: self.onAction)
}
}
}
}
private struct WatchExecApprovalLoadingView: View {
var store: WatchInboxStore
var onRetry: (() -> Void)?
var body: some View {
ScrollView {
VStack(alignment: .leading, spacing: 10) {
Text("Exec approval")
.font(.headline)
if self.store.isExecApprovalReviewLoading {
ProgressView()
.frame(maxWidth: .infinity, alignment: .leading)
}
if let statusText = self.store.execApprovalReviewStatusText, !statusText.isEmpty {
Text(statusText)
.font(.body)
.fixedSize(horizontal: false, vertical: true)
}
if !self.store.isExecApprovalReviewLoading {
Button("Retry") {
self.onRetry?()
}
}
Text("Keep your iPhone nearby and unlocked if review details take a moment to appear.")
.font(.footnote)
.foregroundStyle(.secondary)
.fixedSize(horizontal: false, vertical: true)
}
.frame(maxWidth: .infinity, alignment: .leading)
.padding()
}
.navigationTitle("Exec approval")
}
}
private struct WatchExecApprovalListView: View {
var store: WatchInboxStore
var onDecision: ((String, WatchExecApprovalDecision) -> Void)?
var body: some View {
List {
Section("Exec approvals") {
ForEach(self.store.sortedExecApprovals) { record in
NavigationLink {
WatchExecApprovalDetailView(
store: self.store,
record: record,
onDecision: self.onDecision)
} label: {
VStack(alignment: .leading, spacing: 4) {
Text(record.approval.commandPreview ?? record.approval.commandText)
.font(.headline)
.lineLimit(2)
Text(self.metadataLine(for: record))
.font(.footnote)
.foregroundStyle(.secondary)
.lineLimit(2)
if let statusText = record.statusText, !statusText.isEmpty {
Text(statusText)
.font(.footnote)
.foregroundStyle(record.isResolving ? Color.secondary : Color.red)
.lineLimit(2)
}
}
}
}
}
if let outcome = self.store.lastExecApprovalOutcomeText, !outcome.isEmpty {
Section("Last result") {
Text(outcome)
.font(.footnote)
.foregroundStyle(.secondary)
}
}
}
.navigationTitle("Approvals")
}
private func metadataLine(for record: WatchExecApprovalRecord) -> String {
var parts: [String] = []
if let host = record.approval.host, !host.isEmpty {
parts.append(host)
}
if let nodeId = record.approval.nodeId, !nodeId.isEmpty {
parts.append(nodeId)
}
if let expiresText = Self.expiresText(record.approval.expiresAtMs) {
parts.append(expiresText)
}
return parts.isEmpty ? "Pending review" : parts.joined(separator: " · ")
}
private static func expiresText(_ expiresAtMs: Int?) -> String? {
guard let expiresAtMs else { return nil }
let deltaSeconds = max(0, (expiresAtMs - Int(Date().timeIntervalSince1970 * 1000)) / 1000)
if deltaSeconds < 60 {
return "Expires in <1m"
}
return "Expires in \(deltaSeconds / 60)m"
}
}
private struct WatchExecApprovalDetailView: View {
var store: WatchInboxStore
let record: WatchExecApprovalRecord
var onDecision: ((String, WatchExecApprovalDecision) -> Void)?
var body: some View {
ScrollView {
VStack(alignment: .leading, spacing: 10) {
Text(self.record.approval.commandText)
.font(.headline)
.fixedSize(horizontal: false, vertical: true)
if let host = self.record.approval.host, !host.isEmpty {
self.metadataRow(label: "Host", value: host)
}
if let nodeId = self.record.approval.nodeId, !nodeId.isEmpty {
self.metadataRow(label: "Node", value: nodeId)
}
if let agentId = self.record.approval.agentId, !agentId.isEmpty {
self.metadataRow(label: "Agent", value: agentId)
}
if let expiresText = Self.expiresText(self.record.approval.expiresAtMs) {
self.metadataRow(label: "Expires", value: expiresText)
}
if let riskText = self.riskText(self.record.approval.risk) {
self.metadataRow(label: "Risk", value: riskText)
}
if let statusText = self.currentRecord?.statusText, !statusText.isEmpty {
Text(statusText)
.font(.footnote)
.foregroundStyle((self.currentRecord?.isResolving ?? false) ? Color.secondary : Color.red)
}
if let currentRecord,
currentRecord.approval.allowedDecisions.contains(.allowOnce)
{
Button("Allow Once") {
self.onDecision?(currentRecord.id, .allowOnce)
}
.disabled(currentRecord.isResolving)
}
if let currentRecord,
currentRecord.approval.allowedDecisions.contains(.deny)
{
Button(role: .destructive) {
self.onDecision?(currentRecord.id, .deny)
} label: {
Text("Deny")
.frame(maxWidth: .infinity)
}
.disabled(currentRecord.isResolving)
}
}
.frame(maxWidth: .infinity, alignment: .leading)
.padding()
}
.navigationTitle("Exec approval")
.onAppear {
self.store.selectExecApproval(id: self.record.id)
}
}
private var currentRecord: WatchExecApprovalRecord? {
self.store.execApprovals.first(where: { $0.id == self.record.id })
}
private func metadataRow(label: String, value: String) -> some View {
VStack(alignment: .leading, spacing: 2) {
Text(label)
.font(.caption2)
.foregroundStyle(.secondary)
Text(value)
.font(.footnote)
.fixedSize(horizontal: false, vertical: true)
}
}
private func riskText(_ risk: WatchRiskLevel?) -> String? {
switch risk {
case .high:
return "High"
case .medium:
return "Medium"
case .low:
return "Low"
case nil:
return nil
}
}
private static func expiresText(_ expiresAtMs: Int?) -> String? {
guard let expiresAtMs else { return nil }
let deltaSeconds = max(0, (expiresAtMs - Int(Date().timeIntervalSince1970 * 1000)) / 1000)
if deltaSeconds < 60 {
return "<1 minute"
}
return "\(deltaSeconds / 60) minutes"
}
}
private struct WatchGenericInboxView: View {
var store: WatchInboxStore
var onAction: ((WatchPromptAction) -> Void)?
private func role(for action: WatchPromptAction) -> ButtonRole? {
@@ -18,40 +257,46 @@ struct WatchInboxView: View {
var body: some View {
ScrollView {
VStack(alignment: .leading, spacing: 8) {
Text(store.title)
Text(self.store.title)
.font(.headline)
.lineLimit(2)
Text(store.body)
Text(self.store.body)
.font(.body)
.fixedSize(horizontal: false, vertical: true)
if let details = store.details, !details.isEmpty {
if let details = self.store.details, !details.isEmpty {
Text(details)
.font(.footnote)
.foregroundStyle(.secondary)
.fixedSize(horizontal: false, vertical: true)
}
if !store.actions.isEmpty {
ForEach(store.actions) { action in
if let outcome = self.store.lastExecApprovalOutcomeText, !outcome.isEmpty {
Text(outcome)
.font(.footnote)
.foregroundStyle(.secondary)
}
if !self.store.actions.isEmpty {
ForEach(self.store.actions) { action in
Button(role: self.role(for: action)) {
self.onAction?(action)
} label: {
Text(action.label)
.frame(maxWidth: .infinity)
}
.disabled(store.isReplySending)
.disabled(self.store.isReplySending)
}
}
if let replyStatusText = store.replyStatusText, !replyStatusText.isEmpty {
if let replyStatusText = self.store.replyStatusText, !replyStatusText.isEmpty {
Text(replyStatusText)
.font(.footnote)
.foregroundStyle(.secondary)
}
if let updatedAt = store.updatedAt {
if let updatedAt = self.store.updatedAt {
Text("Updated \(updatedAt.formatted(date: .omitted, time: .shortened))")
.font(.footnote)
.foregroundStyle(.secondary)
@@ -60,5 +305,6 @@ struct WatchInboxView: View {
.frame(maxWidth: .infinity, alignment: .leading)
.padding()
}
.navigationTitle("OpenClaw")
}
}

View File

@@ -95,35 +95,60 @@ def ios_root
File.expand_path("..", __dir__)
end
def normalize_release_version(raw_value)
version = raw_value.to_s.strip.sub(/\Av/, "")
UI.user_error!("Missing root package.json version.") unless env_present?(version)
unless version.match?(/\A\d+\.\d+\.\d+(?:[.-]?beta[.-]\d+)?\z/i)
UI.user_error!("Invalid package.json version '#{raw_value}'. Expected YYYY.M.D or YYYY.M.D-beta.N.")
def read_ios_version_metadata
script_path = File.join(repo_root, "scripts", "ios-version.ts")
stdout, stderr, status = Open3.capture3(
"node",
"--import",
"tsx",
script_path,
"--json",
chdir: repo_root
)
unless status.success?
detail = stderr.to_s.strip
detail = stdout.to_s.strip if detail.empty?
UI.user_error!("Failed to read iOS version metadata: #{detail}")
end
version
end
parsed = JSON.parse(stdout)
version = parsed["canonicalVersion"].to_s.strip
short_version = parsed["marketingVersion"].to_s.strip
if !env_present?(version) || !env_present?(short_version)
UI.user_error!("iOS version helper returned incomplete metadata.")
end
def read_root_package_version
package_json_path = File.join(repo_root, "package.json")
UI.user_error!("Missing package.json at #{package_json_path}.") unless File.exist?(package_json_path)
parsed = JSON.parse(File.read(package_json_path))
normalize_release_version(parsed["version"])
{
short_version: short_version,
version: version
}
rescue JSON::ParserError => e
UI.user_error!("Invalid package.json at #{package_json_path}: #{e.message}")
UI.user_error!("Invalid JSON from iOS version helper: #{e.message}")
end
def short_release_version(version)
normalize_release_version(version).sub(/([.-]?beta[.-]\d+)\z/i, "")
def sync_ios_versioning!
script_path = File.join(repo_root, "scripts", "ios-sync-versioning.ts")
stdout, stderr, status = Open3.capture3(
"node",
"--import",
"tsx",
script_path,
"--check",
chdir: repo_root
)
return if status.success?
detail = stderr.to_s.strip
detail = stdout.to_s.strip if detail.empty?
UI.user_error!("iOS versioning artifacts are stale. Run `pnpm ios:version:sync`.\n#{detail}")
end
def shell_join(parts)
Shellwords.join(parts.compact)
end
def resolve_beta_build_number(api_key:, version:)
def resolve_beta_build_number(api_key:, short_version:)
explicit = ENV["IOS_BETA_BUILD_NUMBER"]
if env_present?(explicit)
UI.user_error!("Invalid IOS_BETA_BUILD_NUMBER '#{explicit}'. Expected digits only.") unless explicit.match?(/\A\d+\z/)
@@ -131,7 +156,6 @@ def resolve_beta_build_number(api_key:, version:)
return explicit
end
short_version = short_release_version(version)
latest_build = latest_testflight_build_number(
api_key: api_key,
app_identifier: BETA_APP_IDENTIFIER,
@@ -244,15 +268,18 @@ platform :ios do
require_api_key = options[:require_api_key] == true
needs_api_key = require_api_key || beta_build_number_needs_asc_auth?
api_key = needs_api_key ? asc_api_key : nil
version = read_root_package_version
build_number = resolve_beta_build_number(api_key: api_key, version: version)
sync_ios_versioning!
version_metadata = read_ios_version_metadata
version = version_metadata[:version]
short_version = version_metadata[:short_version]
build_number = resolve_beta_build_number(api_key: api_key, short_version: short_version)
beta_xcconfig = prepare_beta_release!(version: version, build_number: build_number)
{
api_key: api_key,
beta_xcconfig: beta_xcconfig,
build_number: build_number,
short_version: short_release_version(version),
short_version: short_version,
version: version
}
end
@@ -286,6 +313,7 @@ platform :ios do
desc "Upload App Store metadata (and optionally screenshots)"
lane :metadata do
sync_ios_versioning!
api_key = asc_api_key
clear_empty_env_var("APP_STORE_CONNECT_API_KEY_PATH")
app_identifier = ENV["ASC_APP_IDENTIFIER"]

View File

@@ -29,6 +29,8 @@ ASC_KEYCHAIN_SERVICE=openclaw-asc-key
ASC_KEYCHAIN_ACCOUNT=YOUR_MAC_USERNAME
```
Important: `apps/ios/fastlane/.env` is only for Fastlane/App Store Connect auth and optional beta-archive settings. It does **not** configure gateway-side direct APNs push delivery for local iOS builds.
Optional app targeting variables (helpful if Fastlane cannot auto-resolve app by bundle):
```bash
@@ -53,6 +55,8 @@ IOS_DEVELOPMENT_TEAM=YOUR_TEAM_ID
Tip: run `scripts/ios-team-id.sh` from repo root to print a Team ID for `.env`. The helper prefers the canonical OpenClaw team (`Y5PE65HELJ`) when present locally; otherwise it prefers the first non-personal team from your Xcode account (then personal team if needed). Fastlane uses this helper automatically if `IOS_DEVELOPMENT_TEAM` is missing.
For local/manual iOS builds that stay on direct APNs, configure the gateway host separately with `OPENCLAW_APNS_TEAM_ID`, `OPENCLAW_APNS_KEY_ID`, and either `OPENCLAW_APNS_PRIVATE_KEY_P8` or `OPENCLAW_APNS_PRIVATE_KEY_PATH`. Those gateway runtime env vars are separate from Fastlane's `.env`.
Validate auth:
```bash
@@ -105,13 +109,19 @@ cd apps/ios
fastlane ios auth_check
```
4. Set the official/TestFlight relay URL before release:
4. If you are starting a brand-new production release train, pin iOS to the current gateway version:
```bash
pnpm ios:version:pin -- --from-gateway
```
5. Set the official/TestFlight relay URL before release:
```bash
export OPENCLAW_PUSH_RELAY_BASE_URL=https://relay.example.com
```
5. Upload:
6. Upload:
```bash
pnpm ios:beta
@@ -125,9 +135,15 @@ Quick verification after upload:
Versioning rules:
- Root `package.json.version` is the single source of truth for iOS
- Use `YYYY.M.D` for stable versions and `YYYY.M.D-beta.N` for beta versions
- Fastlane stamps `CFBundleShortVersionString` to `YYYY.M.D`
- `apps/ios/version.json` is the pinned iOS release version source
- `apps/ios/CHANGELOG.md` is the iOS-only changelog and release-note source
- Supported pinned iOS versions use CalVer: `YYYY.M.D`
- `pnpm ios:version:pin -- --from-gateway` promotes the current root gateway version into the pinned iOS release version
- Fastlane uses the pinned iOS version only; changing `package.json.version` alone does not change the iOS app version
- Fastlane sets `CFBundleShortVersionString` to the pinned iOS version, for example `2026.4.10`
- Fastlane resolves `CFBundleVersion` as the next integer TestFlight build number for that short version
- Run `pnpm ios:version:sync` after changing `apps/ios/version.json` or `apps/ios/CHANGELOG.md`
- `pnpm ios:version:check` validates that checked-in iOS version artifacts are in sync
- The beta flow regenerates `apps/ios/OpenClaw.xcodeproj` from `apps/ios/project.yml` before archiving
- Local beta signing uses a temporary generated xcconfig and leaves local development signing overrides untouched
- See `apps/ios/VERSIONING.md` for the detailed workflow

View File

@@ -36,6 +36,9 @@ Or set `APP_STORE_CONNECT_API_KEY_PATH`.
## Notes
- Locale files live under `metadata/en-US/`.
- `release_notes.txt` is generated from `apps/ios/CHANGELOG.md`; after changelog updates, run `pnpm ios:version:sync`.
- Release notes resolve from `## <pinned iOS version>` first, then fall back to `## Unreleased` while a TestFlight train is still in progress.
- When starting a new production release train, pin the iOS version first with `pnpm ios:version:pin -- --from-gateway`.
- `privacy_url.txt` is set to `https://openclaw.ai/privacy`.
- If app lookup fails in `deliver`, set one of:
- `ASC_APP_IDENTIFIER` (bundle ID)

View File

@@ -119,6 +119,7 @@ targets:
CFBundleURLSchemes:
- openclaw
CFBundleShortVersionString: "$(OPENCLAW_MARKETING_VERSION)"
OpenClawCanonicalVersion: "$(OPENCLAW_IOS_VERSION)"
CFBundleVersion: "$(OPENCLAW_BUILD_VERSION)"
UILaunchScreen: {}
UIApplicationSceneManifest:
@@ -237,12 +238,19 @@ targets:
configFiles:
Debug: Config/Signing.xcconfig
Release: Config/Signing.xcconfig
attributes:
DevelopmentTeam: "$(OPENCLAW_DEVELOPMENT_TEAM)"
ProvisioningStyle: "$(OPENCLAW_CODE_SIGN_STYLE)"
settings:
base:
ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon
CODE_SIGN_IDENTITY: "Apple Development"
CODE_SIGN_STYLE: "$(OPENCLAW_CODE_SIGN_STYLE)"
DEVELOPMENT_TEAM: "$(OPENCLAW_DEVELOPMENT_TEAM)"
ENABLE_APPINTENTS_METADATA: NO
ENABLE_APP_INTENTS_METADATA_GENERATION: NO
PRODUCT_BUNDLE_IDENTIFIER: "$(OPENCLAW_WATCH_APP_BUNDLE_ID)"
PROVISIONING_PROFILE_SPECIFIER: "$(OPENCLAW_WATCH_APP_PROFILE)"
info:
path: WatchApp/Info.plist
properties:
@@ -265,9 +273,16 @@ targets:
configFiles:
Debug: Config/Signing.xcconfig
Release: Config/Signing.xcconfig
attributes:
DevelopmentTeam: "$(OPENCLAW_DEVELOPMENT_TEAM)"
ProvisioningStyle: "$(OPENCLAW_CODE_SIGN_STYLE)"
settings:
base:
CODE_SIGN_IDENTITY: "Apple Development"
CODE_SIGN_STYLE: "$(OPENCLAW_CODE_SIGN_STYLE)"
DEVELOPMENT_TEAM: "$(OPENCLAW_DEVELOPMENT_TEAM)"
PRODUCT_BUNDLE_IDENTIFIER: "$(OPENCLAW_WATCH_EXTENSION_BUNDLE_ID)"
PROVISIONING_PROFILE_SPECIFIER: "$(OPENCLAW_WATCH_EXTENSION_PROFILE)"
info:
path: WatchExtension/Info.plist
properties:

3
apps/ios/version.json Normal file
View File

@@ -0,0 +1,3 @@
{
"version": "2026.4.6"
}

View File

@@ -6,155 +6,180 @@ import Foundation
enum HostEnvSecurityPolicy {
static let blockedKeys: Set<String> = [
"NODE_OPTIONS",
"NODE_PATH",
"PYTHONHOME",
"PYTHONPATH",
"PERL5LIB",
"PERL5OPT",
"RUBYLIB",
"RUBYOPT",
"_JAVA_OPTIONS",
"ANT_OPTS",
"BASH_ENV",
"ENV",
"BROWSER",
"GIT_EDITOR",
"GIT_EXTERNAL_DIFF",
"GIT_EXEC_PATH",
"GIT_SEQUENCE_EDITOR",
"GIT_TEMPLATE_DIR",
"GIT_SSL_NO_VERIFY",
"GIT_SSL_CAINFO",
"GIT_SSL_CAPATH",
"CC",
"CXX",
"CARGO_BUILD_RUSTC",
"CARGO_BUILD_RUSTC_WRAPPER",
"CC",
"CMAKE_C_COMPILER",
"CMAKE_CXX_COMPILER",
"CXX",
"DOTNET_ADDITIONAL_DEPS",
"DOTNET_STARTUP_HOOKS",
"ENV",
"GCONV_PATH",
"GIT_ALTERNATE_OBJECT_DIRECTORIES",
"GIT_COMMON_DIR",
"GIT_DIR",
"GIT_EDITOR",
"GIT_EXEC_PATH",
"GIT_EXTERNAL_DIFF",
"GIT_INDEX_FILE",
"GIT_NAMESPACE",
"GIT_OBJECT_DIRECTORY",
"GIT_SEQUENCE_EDITOR",
"GIT_SSL_CAINFO",
"GIT_SSL_CAPATH",
"GIT_SSL_NO_VERIFY",
"GIT_TEMPLATE_DIR",
"GIT_WORK_TREE",
"GLIBC_TUNABLES",
"GRADLE_OPTS",
"HGRCPATH",
"IFS",
"JAVA_OPTS",
"JAVA_TOOL_OPTIONS",
"JDK_JAVA_OPTIONS",
"MAKEFLAGS",
"MAVEN_OPTS",
"MFLAGS",
"NODE_OPTIONS",
"NODE_PATH",
"PERL5LIB",
"PERL5OPT",
"PS4",
"PYTHONBREAKPOINT",
"PYTHONHOME",
"PYTHONPATH",
"RUBYLIB",
"RUBYOPT",
"RUSTC_WRAPPER",
"SBT_OPTS",
"SHELL",
"SHELLOPTS",
"PS4",
"GCONV_PATH",
"IFS",
"SSLKEYLOGFILE",
"JAVA_TOOL_OPTIONS",
"_JAVA_OPTIONS",
"JDK_JAVA_OPTIONS",
"PYTHONBREAKPOINT",
"DOTNET_STARTUP_HOOKS",
"DOTNET_ADDITIONAL_DEPS",
"GLIBC_TUNABLES",
"MAVEN_OPTS",
"SBT_OPTS",
"GRADLE_OPTS",
"ANT_OPTS"
"SSLKEYLOGFILE"
]
static let blockedOverrideKeys: Set<String> = [
"HOME",
"GRADLE_USER_HOME",
"ZDOTDIR",
"GIT_SSH_COMMAND",
"GIT_SSH",
"GIT_PROXY_COMMAND",
"GIT_ASKPASS",
"GIT_SSL_NO_VERIFY",
"GIT_SSL_CAINFO",
"GIT_SSL_CAPATH",
"SSH_ASKPASS",
"LESSOPEN",
"LESSCLOSE",
"PAGER",
"MANPAGER",
"GIT_PAGER",
"EDITOR",
"VISUAL",
"FCEDIT",
"SUDO_EDITOR",
"PROMPT_COMMAND",
"HISTFILE",
"PERL5DB",
"PERL5DBCMD",
"OPENSSL_CONF",
"OPENSSL_ENGINES",
"PYTHONSTARTUP",
"WGETRC",
"CURL_HOME",
"CLASSPATH",
"ALL_PROXY",
"AWS_CONFIG_FILE",
"AWS_SHARED_CREDENTIALS_FILE",
"AWS_WEB_IDENTITY_TOKEN_FILE",
"AZURE_AUTH_LOCATION",
"BUN_CONFIG_REGISTRY",
"BUNDLE_GEMFILE",
"C_INCLUDE_PATH",
"CARGO_BUILD_RUSTC_WRAPPER",
"CARGO_HOME",
"CGO_CFLAGS",
"CGO_LDFLAGS",
"GOFLAGS",
"CLASSPATH",
"COMPOSER_HOME",
"CORECLR_PROFILER_PATH",
"PHPRC",
"PHP_INI_SCAN_DIR",
"DENO_DIR",
"BUN_CONFIG_REGISTRY",
"YARN_RC_FILENAME",
"HTTP_PROXY",
"HTTPS_PROXY",
"ALL_PROXY",
"NO_PROXY",
"NODE_TLS_REJECT_UNAUTHORIZED",
"NODE_EXTRA_CA_CERTS",
"SSL_CERT_FILE",
"SSL_CERT_DIR",
"REQUESTS_CA_BUNDLE",
"CPATH",
"CPLUS_INCLUDE_PATH",
"CURL_CA_BUNDLE",
"CURL_HOME",
"DENO_DIR",
"DOCKER_CERT_PATH",
"DOCKER_CONTEXT",
"DOCKER_HOST",
"DOCKER_TLS_VERIFY",
"DOCKER_CERT_PATH",
"EDITOR",
"FCEDIT",
"GEM_HOME",
"GEM_PATH",
"GIT_ALTERNATE_OBJECT_DIRECTORIES",
"GIT_ASKPASS",
"GIT_COMMON_DIR",
"GIT_DIR",
"GIT_INDEX_FILE",
"GIT_NAMESPACE",
"GIT_OBJECT_DIRECTORY",
"GIT_PAGER",
"GIT_PROXY_COMMAND",
"GIT_SSH",
"GIT_SSH_COMMAND",
"GIT_SSL_CAINFO",
"GIT_SSL_CAPATH",
"GIT_SSL_NO_VERIFY",
"GIT_WORK_TREE",
"GOENV",
"GOFLAGS",
"GONOPROXY",
"GONOSUMCHECK",
"GONOSUMDB",
"GOOGLE_APPLICATION_CREDENTIALS",
"GOPATH",
"GOPRIVATE",
"GOPROXY",
"GRADLE_USER_HOME",
"HELM_HOME",
"HGRCPATH",
"HISTFILE",
"HOME",
"HTTP_PROXY",
"HTTPS_PROXY",
"KUBECONFIG",
"LESSCLOSE",
"LESSOPEN",
"LIBRARY_PATH",
"LUA_CPATH",
"LUA_PATH",
"MAKEFLAGS",
"MANPAGER",
"MFLAGS",
"NO_PROXY",
"NODE_EXTRA_CA_CERTS",
"NODE_TLS_REJECT_UNAUTHORIZED",
"OBJC_INCLUDE_PATH",
"OPENSSL_CONF",
"OPENSSL_ENGINES",
"PAGER",
"PERL5DB",
"PERL5DBCMD",
"PHP_INI_SCAN_DIR",
"PHPRC",
"PIP_CONFIG_FILE",
"PIP_EXTRA_INDEX_URL",
"PIP_FIND_LINKS",
"PIP_INDEX_URL",
"PIP_PYPI_URL",
"PIP_EXTRA_INDEX_URL",
"PIP_CONFIG_FILE",
"PIP_FIND_LINKS",
"PIP_TRUSTED_HOST",
"PROMPT_COMMAND",
"PYTHONSTARTUP",
"PYTHONUSERBASE",
"REQUESTS_CA_BUNDLE",
"RUSTC_WRAPPER",
"RUSTFLAGS",
"SSH_ASKPASS",
"SSL_CERT_DIR",
"SSL_CERT_FILE",
"SUDO_EDITOR",
"UV_DEFAULT_INDEX",
"UV_EXTRA_INDEX_URL",
"UV_INDEX",
"UV_INDEX_URL",
"UV_PYTHON",
"UV_EXTRA_INDEX_URL",
"UV_DEFAULT_INDEX",
"DOCKER_HOST",
"DOCKER_TLS_VERIFY",
"DOCKER_CERT_PATH",
"DOCKER_CONTEXT",
"LIBRARY_PATH",
"CPATH",
"C_INCLUDE_PATH",
"CPLUS_INCLUDE_PATH",
"OBJC_INCLUDE_PATH",
"NODE_EXTRA_CA_CERTS",
"SSL_CERT_FILE",
"SSL_CERT_DIR",
"REQUESTS_CA_BUNDLE",
"CURL_CA_BUNDLE",
"GOPROXY",
"GONOSUMCHECK",
"GONOSUMDB",
"GONOPROXY",
"GOPRIVATE",
"GOENV",
"GOPATH",
"PYTHONUSERBASE",
"VIRTUAL_ENV",
"LUA_PATH",
"LUA_CPATH",
"GEM_HOME",
"GEM_PATH",
"BUNDLE_GEMFILE",
"COMPOSER_HOME",
"VISUAL",
"WGETRC",
"XDG_CONFIG_HOME",
"AWS_CONFIG_FILE"
"YARN_RC_FILENAME",
"ZDOTDIR"
]
static let blockedOverridePrefixes: [String] = [
"CARGO_REGISTRIES_",
"GIT_CONFIG_",
"NPM_CONFIG_",
"CARGO_REGISTRIES_"
"NPM_CONFIG_"
]
static let blockedPrefixes: [String] = [
"BASH_FUNC_",
"DYLD_",
"LD_",
"BASH_FUNC_"
"LD_"
]
}

View File

@@ -15,9 +15,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2026.4.6</string>
<string>2026.4.9</string>
<key>CFBundleVersion</key>
<string>2026040601</string>
<string>2026040901</string>
<key>CFBundleIconFile</key>
<string>OpenClaw</string>
<key>CFBundleURLTypes</key>

View File

@@ -537,6 +537,8 @@ public struct AgentParams: Codable, Sendable {
public let besteffortdeliver: Bool?
public let lane: String?
public let extrasystemprompt: String?
public let bootstrapcontextmode: AnyCodable?
public let bootstrapcontextrunkind: AnyCodable?
public let internalevents: [[String: AnyCodable]]?
public let inputprovenance: [String: AnyCodable]?
public let idempotencykey: String
@@ -566,6 +568,8 @@ public struct AgentParams: Codable, Sendable {
besteffortdeliver: Bool?,
lane: String?,
extrasystemprompt: String?,
bootstrapcontextmode: AnyCodable?,
bootstrapcontextrunkind: AnyCodable?,
internalevents: [[String: AnyCodable]]?,
inputprovenance: [String: AnyCodable]?,
idempotencykey: String,
@@ -594,6 +598,8 @@ public struct AgentParams: Codable, Sendable {
self.besteffortdeliver = besteffortdeliver
self.lane = lane
self.extrasystemprompt = extrasystemprompt
self.bootstrapcontextmode = bootstrapcontextmode
self.bootstrapcontextrunkind = bootstrapcontextrunkind
self.internalevents = internalevents
self.inputprovenance = inputprovenance
self.idempotencykey = idempotencykey
@@ -624,6 +630,8 @@ public struct AgentParams: Codable, Sendable {
case besteffortdeliver = "bestEffortDeliver"
case lane
case extrasystemprompt = "extraSystemPrompt"
case bootstrapcontextmode = "bootstrapContextMode"
case bootstrapcontextrunkind = "bootstrapContextRunKind"
case internalevents = "internalEvents"
case inputprovenance = "inputProvenance"
case idempotencykey = "idempotencyKey"
@@ -1327,6 +1335,236 @@ public struct SessionsResolveParams: Codable, Sendable {
}
}
public struct SessionCompactionCheckpoint: Codable, Sendable {
public let checkpointid: String
public let sessionkey: String
public let sessionid: String
public let createdat: Int
public let reason: AnyCodable
public let tokensbefore: Int?
public let tokensafter: Int?
public let summary: String?
public let firstkeptentryid: String?
public let precompaction: [String: AnyCodable]
public let postcompaction: [String: AnyCodable]
public init(
checkpointid: String,
sessionkey: String,
sessionid: String,
createdat: Int,
reason: AnyCodable,
tokensbefore: Int?,
tokensafter: Int?,
summary: String?,
firstkeptentryid: String?,
precompaction: [String: AnyCodable],
postcompaction: [String: AnyCodable])
{
self.checkpointid = checkpointid
self.sessionkey = sessionkey
self.sessionid = sessionid
self.createdat = createdat
self.reason = reason
self.tokensbefore = tokensbefore
self.tokensafter = tokensafter
self.summary = summary
self.firstkeptentryid = firstkeptentryid
self.precompaction = precompaction
self.postcompaction = postcompaction
}
private enum CodingKeys: String, CodingKey {
case checkpointid = "checkpointId"
case sessionkey = "sessionKey"
case sessionid = "sessionId"
case createdat = "createdAt"
case reason
case tokensbefore = "tokensBefore"
case tokensafter = "tokensAfter"
case summary
case firstkeptentryid = "firstKeptEntryId"
case precompaction = "preCompaction"
case postcompaction = "postCompaction"
}
}
public struct SessionsCompactionListParams: Codable, Sendable {
public let key: String
public init(
key: String)
{
self.key = key
}
private enum CodingKeys: String, CodingKey {
case key
}
}
public struct SessionsCompactionGetParams: Codable, Sendable {
public let key: String
public let checkpointid: String
public init(
key: String,
checkpointid: String)
{
self.key = key
self.checkpointid = checkpointid
}
private enum CodingKeys: String, CodingKey {
case key
case checkpointid = "checkpointId"
}
}
public struct SessionsCompactionBranchParams: Codable, Sendable {
public let key: String
public let checkpointid: String
public init(
key: String,
checkpointid: String)
{
self.key = key
self.checkpointid = checkpointid
}
private enum CodingKeys: String, CodingKey {
case key
case checkpointid = "checkpointId"
}
}
public struct SessionsCompactionRestoreParams: Codable, Sendable {
public let key: String
public let checkpointid: String
public init(
key: String,
checkpointid: String)
{
self.key = key
self.checkpointid = checkpointid
}
private enum CodingKeys: String, CodingKey {
case key
case checkpointid = "checkpointId"
}
}
public struct SessionsCompactionListResult: Codable, Sendable {
public let ok: Bool
public let key: String
public let checkpoints: [SessionCompactionCheckpoint]
public init(
ok: Bool,
key: String,
checkpoints: [SessionCompactionCheckpoint])
{
self.ok = ok
self.key = key
self.checkpoints = checkpoints
}
private enum CodingKeys: String, CodingKey {
case ok
case key
case checkpoints
}
}
public struct SessionsCompactionGetResult: Codable, Sendable {
public let ok: Bool
public let key: String
public let checkpoint: SessionCompactionCheckpoint
public init(
ok: Bool,
key: String,
checkpoint: SessionCompactionCheckpoint)
{
self.ok = ok
self.key = key
self.checkpoint = checkpoint
}
private enum CodingKeys: String, CodingKey {
case ok
case key
case checkpoint
}
}
public struct SessionsCompactionBranchResult: Codable, Sendable {
public let ok: Bool
public let sourcekey: String
public let key: String
public let sessionid: String
public let checkpoint: SessionCompactionCheckpoint
public let entry: [String: AnyCodable]
public init(
ok: Bool,
sourcekey: String,
key: String,
sessionid: String,
checkpoint: SessionCompactionCheckpoint,
entry: [String: AnyCodable])
{
self.ok = ok
self.sourcekey = sourcekey
self.key = key
self.sessionid = sessionid
self.checkpoint = checkpoint
self.entry = entry
}
private enum CodingKeys: String, CodingKey {
case ok
case sourcekey = "sourceKey"
case key
case sessionid = "sessionId"
case checkpoint
case entry
}
}
public struct SessionsCompactionRestoreResult: Codable, Sendable {
public let ok: Bool
public let key: String
public let sessionid: String
public let checkpoint: SessionCompactionCheckpoint
public let entry: [String: AnyCodable]
public init(
ok: Bool,
key: String,
sessionid: String,
checkpoint: SessionCompactionCheckpoint,
entry: [String: AnyCodable])
{
self.ok = ok
self.key = key
self.sessionid = sessionid
self.checkpoint = checkpoint
self.entry = entry
}
private enum CodingKeys: String, CodingKey {
case ok
case key
case sessionid = "sessionId"
case checkpoint
case entry
}
}
public struct SessionsCreateParams: Codable, Sendable {
public let key: String?
public let agentid: String?

View File

@@ -624,11 +624,31 @@ public actor GatewayChannelActor {
let detailCode = details?["code"]?.value as? String
let canRetryWithDeviceToken = details?["canRetryWithDeviceToken"]?.value as? Bool ?? false
let recommendedNextStep = details?["recommendedNextStep"]?.value as? String
let requestId = details?["requestId"]?.value as? String
let reason = details?["reason"]?.value as? String
let owner = details?["owner"]?.value as? String
let title = details?["title"]?.value as? String
let userMessage = details?["userMessage"]?.value as? String
let actionLabel = details?["actionLabel"]?.value as? String
let actionCommand = details?["actionCommand"]?.value as? String
let docsURLString = details?["docsUrl"]?.value as? String
let retryableOverride = details?["retryable"]?.value as? Bool
let pauseReconnectOverride = details?["pauseReconnect"]?.value as? Bool
throw GatewayConnectAuthError(
message: msg,
detailCodeRaw: detailCode,
canRetryWithDeviceToken: canRetryWithDeviceToken,
recommendedNextStepRaw: recommendedNextStep)
recommendedNextStepRaw: recommendedNextStep,
requestId: requestId,
detailsReason: reason,
ownerRaw: owner,
titleOverride: title,
userMessageOverride: userMessage,
actionLabel: actionLabel,
actionCommand: actionCommand,
docsURLString: docsURLString,
retryableOverride: retryableOverride,
pauseReconnectOverride: pauseReconnectOverride)
}
guard let payload = res.payload else {
throw NSError(

View File

@@ -0,0 +1,761 @@
import Foundation
public struct GatewayConnectionProblem: Equatable, Sendable {
public enum Kind: String, Equatable, Sendable {
case gatewayAuthTokenMissing
case gatewayAuthTokenMismatch
case gatewayAuthTokenNotConfigured
case gatewayAuthPasswordMissing
case gatewayAuthPasswordMismatch
case gatewayAuthPasswordNotConfigured
case bootstrapTokenInvalid
case deviceTokenMismatch
case pairingRequired
case pairingRoleUpgradeRequired
case pairingScopeUpgradeRequired
case pairingMetadataUpgradeRequired
case deviceIdentityRequired
case deviceSignatureExpired
case deviceNonceRequired
case deviceNonceMismatch
case deviceSignatureInvalid
case devicePublicKeyInvalid
case deviceIdMismatch
case tailscaleIdentityMissing
case tailscaleProxyMissing
case tailscaleWhoisFailed
case tailscaleIdentityMismatch
case authRateLimited
case timeout
case connectionRefused
case reachabilityFailed
case websocketCancelled
case unknown
}
public enum Owner: String, Equatable, Sendable {
case gateway
case iphone
case both
case network
case unknown
}
public let kind: Kind
public let owner: Owner
public let title: String
public let message: String
public let actionLabel: String?
public let actionCommand: String?
public let docsURL: URL?
public let requestId: String?
public let retryable: Bool
public let pauseReconnect: Bool
public let technicalDetails: String?
public init(
kind: Kind,
owner: Owner,
title: String,
message: String,
actionLabel: String? = nil,
actionCommand: String? = nil,
docsURL: URL? = nil,
requestId: String? = nil,
retryable: Bool,
pauseReconnect: Bool,
technicalDetails: String? = nil)
{
self.kind = kind
self.owner = owner
self.title = title
self.message = message
self.actionLabel = Self.trimmedOrNil(actionLabel)
self.actionCommand = Self.trimmedOrNil(actionCommand)
self.docsURL = docsURL
self.requestId = Self.trimmedOrNil(requestId)
self.retryable = retryable
self.pauseReconnect = pauseReconnect
self.technicalDetails = Self.trimmedOrNil(technicalDetails)
}
public var needsPairingApproval: Bool {
switch self.kind {
case .pairingRequired, .pairingRoleUpgradeRequired, .pairingScopeUpgradeRequired, .pairingMetadataUpgradeRequired:
return true
default:
return false
}
}
public var needsCredentialUpdate: Bool {
switch self.kind {
case .gatewayAuthTokenMissing,
.gatewayAuthTokenMismatch,
.gatewayAuthTokenNotConfigured,
.gatewayAuthPasswordMissing,
.gatewayAuthPasswordMismatch,
.gatewayAuthPasswordNotConfigured,
.bootstrapTokenInvalid,
.deviceTokenMismatch:
return true
default:
return false
}
}
public var statusText: String {
switch self.kind {
case .pairingRequired, .pairingRoleUpgradeRequired, .pairingScopeUpgradeRequired, .pairingMetadataUpgradeRequired:
if let requestId {
return "\(self.title) (request ID: \(requestId))"
}
return self.title
default:
return self.title
}
}
private static func trimmedOrNil(_ value: String?) -> String? {
let trimmed = value?.trimmingCharacters(in: .whitespacesAndNewlines) ?? ""
return trimmed.isEmpty ? nil : trimmed
}
}
public enum GatewayConnectionProblemMapper {
public static func map(error: Error, preserving previousProblem: GatewayConnectionProblem? = nil) -> GatewayConnectionProblem? {
guard let nextProblem = self.rawMap(error) else {
return nil
}
guard let previousProblem else {
return nextProblem
}
if self.shouldPreserve(previousProblem: previousProblem, over: nextProblem) {
return previousProblem
}
return nextProblem
}
public static func shouldPreserve(previousProblem: GatewayConnectionProblem, over nextProblem: GatewayConnectionProblem) -> Bool {
if nextProblem.kind == .websocketCancelled {
return previousProblem.pauseReconnect || previousProblem.requestId != nil
}
return false
}
public static func shouldPreserve(previousProblem: GatewayConnectionProblem, overDisconnectReason reason: String) -> Bool {
let normalized = reason.trimmingCharacters(in: .whitespacesAndNewlines).lowercased()
guard !normalized.isEmpty else { return false }
if normalized.contains("cancelled") || normalized.contains("canceled") {
return previousProblem.pauseReconnect || previousProblem.requestId != nil
}
return false
}
private static func rawMap(_ error: Error) -> GatewayConnectionProblem? {
if let authError = error as? GatewayConnectAuthError {
return self.map(authError)
}
if let responseError = error as? GatewayResponseError {
return self.map(responseError)
}
return self.mapTransportError(error)
}
private static func map(_ authError: GatewayConnectAuthError) -> GatewayConnectionProblem {
let pairingCommand = self.approvalCommand(requestId: authError.requestId)
switch authError.detail {
case .authTokenMissing:
return self.problem(
kind: .gatewayAuthTokenMissing,
owner: .both,
title: authError.titleOverride ?? "Gateway token required",
message: authError.userMessageOverride
?? "This gateway requires an auth token, but this iPhone did not send one.",
actionLabel: authError.actionLabel ?? "Open Settings",
actionCommand: authError.actionCommand,
docsURL: self.docsURL(authError.docsURLString, fallback: "https://docs.openclaw.ai/gateway/authentication"),
requestId: authError.requestId,
retryable: false,
pauseReconnect: true,
authError: authError)
case .authTokenMismatch:
return self.problem(
kind: .gatewayAuthTokenMismatch,
owner: .both,
title: authError.titleOverride ?? "Gateway token is out of date",
message: authError.userMessageOverride
?? "The token on this iPhone does not match the gateway token.",
actionLabel: authError.actionLabel ?? (authError.canRetryWithDeviceToken ? "Retry once" : "Update gateway token"),
actionCommand: authError.actionCommand,
docsURL: self.docsURL(authError.docsURLString, fallback: "https://docs.openclaw.ai/gateway/authentication"),
requestId: authError.requestId,
retryable: authError.retryableOverride ?? authError.canRetryWithDeviceToken,
pauseReconnect: authError.pauseReconnectOverride ?? !authError.canRetryWithDeviceToken,
authError: authError)
case .authTokenNotConfigured:
return self.problem(
kind: .gatewayAuthTokenNotConfigured,
owner: .gateway,
title: authError.titleOverride ?? "Gateway token is not configured",
message: authError.userMessageOverride
?? "This gateway is set to token auth, but no gateway token is configured on the gateway.",
actionLabel: authError.actionLabel ?? "Fix on gateway",
actionCommand: authError.actionCommand ?? "openclaw config set gateway.auth.token <new-token>",
docsURL: self.docsURL(authError.docsURLString, fallback: "https://docs.openclaw.ai/gateway/authentication"),
requestId: authError.requestId,
retryable: false,
pauseReconnect: true,
authError: authError)
case .authPasswordMissing:
return self.problem(
kind: .gatewayAuthPasswordMissing,
owner: .both,
title: authError.titleOverride ?? "Gateway password required",
message: authError.userMessageOverride
?? "This gateway requires a password, but this iPhone did not send one.",
actionLabel: authError.actionLabel ?? "Open Settings",
actionCommand: authError.actionCommand,
docsURL: self.docsURL(authError.docsURLString, fallback: "https://docs.openclaw.ai/gateway/authentication"),
requestId: authError.requestId,
retryable: false,
pauseReconnect: true,
authError: authError)
case .authPasswordMismatch:
return self.problem(
kind: .gatewayAuthPasswordMismatch,
owner: .both,
title: authError.titleOverride ?? "Gateway password is out of date",
message: authError.userMessageOverride
?? "The saved password on this iPhone does not match the gateway password.",
actionLabel: authError.actionLabel ?? "Update password",
actionCommand: authError.actionCommand,
docsURL: self.docsURL(authError.docsURLString, fallback: "https://docs.openclaw.ai/gateway/authentication"),
requestId: authError.requestId,
retryable: false,
pauseReconnect: true,
authError: authError)
case .authPasswordNotConfigured:
return self.problem(
kind: .gatewayAuthPasswordNotConfigured,
owner: .gateway,
title: authError.titleOverride ?? "Gateway password is not configured",
message: authError.userMessageOverride
?? "This gateway is set to password auth, but no gateway password is configured on the gateway.",
actionLabel: authError.actionLabel ?? "Fix on gateway",
actionCommand: authError.actionCommand ?? "openclaw config set gateway.auth.password <new-password>",
docsURL: self.docsURL(authError.docsURLString, fallback: "https://docs.openclaw.ai/gateway/authentication"),
requestId: authError.requestId,
retryable: false,
pauseReconnect: true,
authError: authError)
case .authBootstrapTokenInvalid:
return self.problem(
kind: .bootstrapTokenInvalid,
owner: .iphone,
title: authError.titleOverride ?? "Setup code expired",
message: authError.userMessageOverride
?? "The setup QR or bootstrap token is no longer valid.",
actionLabel: authError.actionLabel ?? "Scan QR again",
actionCommand: authError.actionCommand,
docsURL: self.docsURL(authError.docsURLString, fallback: "https://docs.openclaw.ai/platforms/ios"),
requestId: authError.requestId,
retryable: false,
pauseReconnect: true,
authError: authError)
case .authDeviceTokenMismatch:
return self.problem(
kind: .deviceTokenMismatch,
owner: .both,
title: authError.titleOverride ?? "This iPhone's saved device token is no longer valid",
message: authError.userMessageOverride
?? "The gateway rejected the stored device token for this role.",
actionLabel: authError.actionLabel ?? "Repair pairing",
actionCommand: authError.actionCommand ?? pairingCommand,
docsURL: self.docsURL(authError.docsURLString, fallback: "https://docs.openclaw.ai/gateway/pairing"),
requestId: authError.requestId,
retryable: false,
pauseReconnect: true,
authError: authError)
case .pairingRequired:
return self.pairingProblem(for: authError)
case .controlUiDeviceIdentityRequired, .deviceIdentityRequired:
return self.problem(
kind: .deviceIdentityRequired,
owner: .iphone,
title: authError.titleOverride ?? "Secure device identity is required",
message: authError.userMessageOverride
?? "This connection must include a signed device identity before the gateway can bind permissions to this iPhone.",
actionLabel: authError.actionLabel ?? "Retry from the app",
actionCommand: authError.actionCommand,
docsURL: self.docsURL(authError.docsURLString, fallback: "https://docs.openclaw.ai/platforms/ios"),
requestId: authError.requestId,
retryable: false,
pauseReconnect: true,
authError: authError)
case .deviceAuthSignatureExpired:
return self.problem(
kind: .deviceSignatureExpired,
owner: .iphone,
title: authError.titleOverride ?? "Secure handshake expired",
message: authError.userMessageOverride ?? "The device signature is too old to use.",
actionLabel: authError.actionLabel ?? "Check iPhone time",
actionCommand: authError.actionCommand,
docsURL: self.docsURL(authError.docsURLString, fallback: "https://docs.openclaw.ai/gateway/troubleshooting"),
requestId: authError.requestId,
retryable: true,
pauseReconnect: true,
authError: authError)
case .deviceAuthNonceRequired:
return self.problem(
kind: .deviceNonceRequired,
owner: .iphone,
title: authError.titleOverride ?? "Secure handshake is incomplete",
message: authError.userMessageOverride
?? "The gateway expected a one-time challenge response, but the nonce was missing.",
actionLabel: authError.actionLabel ?? "Retry",
actionCommand: authError.actionCommand,
docsURL: self.docsURL(authError.docsURLString, fallback: "https://docs.openclaw.ai/gateway/troubleshooting"),
requestId: authError.requestId,
retryable: true,
pauseReconnect: true,
authError: authError)
case .deviceAuthNonceMismatch:
return self.problem(
kind: .deviceNonceMismatch,
owner: .iphone,
title: authError.titleOverride ?? "Secure handshake did not match",
message: authError.userMessageOverride ?? "The challenge response was stale or mismatched.",
actionLabel: authError.actionLabel ?? "Retry",
actionCommand: authError.actionCommand,
docsURL: self.docsURL(authError.docsURLString, fallback: "https://docs.openclaw.ai/gateway/troubleshooting"),
requestId: authError.requestId,
retryable: true,
pauseReconnect: true,
authError: authError)
case .deviceAuthSignatureInvalid, .deviceAuthInvalid:
return self.problem(
kind: .deviceSignatureInvalid,
owner: .iphone,
title: authError.titleOverride ?? "This device identity could not be verified",
message: authError.userMessageOverride
?? "The gateway could not verify the identity this iPhone presented.",
actionLabel: authError.actionLabel ?? "Re-pair this iPhone",
actionCommand: authError.actionCommand,
docsURL: self.docsURL(authError.docsURLString, fallback: "https://docs.openclaw.ai/gateway/pairing"),
requestId: authError.requestId,
retryable: false,
pauseReconnect: true,
authError: authError)
case .deviceAuthPublicKeyInvalid:
return self.problem(
kind: .devicePublicKeyInvalid,
owner: .iphone,
title: authError.titleOverride ?? "This device identity could not be verified",
message: authError.userMessageOverride
?? "The gateway could not verify the public key this iPhone presented.",
actionLabel: authError.actionLabel ?? "Re-pair this iPhone",
actionCommand: authError.actionCommand,
docsURL: self.docsURL(authError.docsURLString, fallback: "https://docs.openclaw.ai/gateway/pairing"),
requestId: authError.requestId,
retryable: false,
pauseReconnect: true,
authError: authError)
case .deviceAuthDeviceIdMismatch:
return self.problem(
kind: .deviceIdMismatch,
owner: .iphone,
title: authError.titleOverride ?? "This device identity could not be verified",
message: authError.userMessageOverride
?? "The gateway rejected the device identity because the device ID did not match.",
actionLabel: authError.actionLabel ?? "Re-pair this iPhone",
actionCommand: authError.actionCommand,
docsURL: self.docsURL(authError.docsURLString, fallback: "https://docs.openclaw.ai/gateway/pairing"),
requestId: authError.requestId,
retryable: false,
pauseReconnect: true,
authError: authError)
case .authTailscaleIdentityMissing:
return self.problem(
kind: .tailscaleIdentityMissing,
owner: .network,
title: authError.titleOverride ?? "Tailscale identity check failed",
message: authError.userMessageOverride
?? "This connection expected Tailscale identity headers, but they were not available.",
actionLabel: authError.actionLabel ?? "Turn on Tailscale",
actionCommand: authError.actionCommand,
docsURL: self.docsURL(authError.docsURLString, fallback: "https://docs.openclaw.ai/gateway/tailscale"),
requestId: authError.requestId,
retryable: false,
pauseReconnect: true,
authError: authError)
case .authTailscaleProxyMissing:
return self.problem(
kind: .tailscaleProxyMissing,
owner: .network,
title: authError.titleOverride ?? "Tailscale identity check failed",
message: authError.userMessageOverride
?? "The gateway expected a Tailscale auth proxy, but it was not configured.",
actionLabel: authError.actionLabel ?? "Review Tailscale setup",
actionCommand: authError.actionCommand,
docsURL: self.docsURL(authError.docsURLString, fallback: "https://docs.openclaw.ai/gateway/tailscale"),
requestId: authError.requestId,
retryable: false,
pauseReconnect: true,
authError: authError)
case .authTailscaleWhoisFailed:
return self.problem(
kind: .tailscaleWhoisFailed,
owner: .network,
title: authError.titleOverride ?? "Tailscale identity check failed",
message: authError.userMessageOverride
?? "The gateway could not verify this Tailscale client identity.",
actionLabel: authError.actionLabel ?? "Review Tailscale setup",
actionCommand: authError.actionCommand,
docsURL: self.docsURL(authError.docsURLString, fallback: "https://docs.openclaw.ai/gateway/tailscale"),
requestId: authError.requestId,
retryable: false,
pauseReconnect: true,
authError: authError)
case .authTailscaleIdentityMismatch:
return self.problem(
kind: .tailscaleIdentityMismatch,
owner: .network,
title: authError.titleOverride ?? "Tailscale identity check failed",
message: authError.userMessageOverride
?? "The forwarded Tailscale identity did not match the verified identity.",
actionLabel: authError.actionLabel ?? "Review Tailscale setup",
actionCommand: authError.actionCommand,
docsURL: self.docsURL(authError.docsURLString, fallback: "https://docs.openclaw.ai/gateway/tailscale"),
requestId: authError.requestId,
retryable: false,
pauseReconnect: true,
authError: authError)
case .authRateLimited:
return self.problem(
kind: .authRateLimited,
owner: .gateway,
title: authError.titleOverride ?? "Too many failed attempts",
message: authError.userMessageOverride
?? "The gateway is temporarily refusing new auth attempts after repeated failures.",
actionLabel: authError.actionLabel ?? "Wait and retry",
actionCommand: authError.actionCommand,
docsURL: self.docsURL(authError.docsURLString, fallback: "https://docs.openclaw.ai/gateway/troubleshooting"),
requestId: authError.requestId,
retryable: false,
pauseReconnect: true,
authError: authError)
case .authRequired, .authUnauthorized, .none:
return self.problem(
kind: .unknown,
owner: authError.ownerRaw.flatMap { self.owner(from: $0) } ?? .unknown,
title: authError.titleOverride ?? "Gateway rejected the connection",
message: authError.userMessageOverride ?? authError.message,
actionLabel: authError.actionLabel,
actionCommand: authError.actionCommand,
docsURL: self.docsURL(authError.docsURLString, fallback: nil),
requestId: authError.requestId,
retryable: authError.retryableOverride ?? false,
pauseReconnect: authError.pauseReconnectOverride ?? authError.isNonRecoverable,
authError: authError)
}
}
private static func map(_ responseError: GatewayResponseError) -> GatewayConnectionProblem? {
let code = responseError.code.trimmingCharacters(in: .whitespacesAndNewlines).uppercased()
if code == "NOT_PAIRED" || responseError.detailsReason == "not-paired" {
let authError = GatewayConnectAuthError(
message: responseError.message,
detailCodeRaw: GatewayConnectAuthDetailCode.pairingRequired.rawValue,
canRetryWithDeviceToken: false,
recommendedNextStepRaw: nil,
requestId: self.stringValue(responseError.details["requestId"]?.value),
detailsReason: responseError.detailsReason,
ownerRaw: nil,
titleOverride: nil,
userMessageOverride: nil,
actionLabel: nil,
actionCommand: nil,
docsURLString: nil,
retryableOverride: nil,
pauseReconnectOverride: nil)
return self.map(authError)
}
return nil
}
private static func mapTransportError(_ error: Error) -> GatewayConnectionProblem? {
let nsError = error as NSError
let rawMessage = nsError.userInfo[NSLocalizedDescriptionKey] as? String ?? nsError.localizedDescription
let lower = rawMessage.trimmingCharacters(in: .whitespacesAndNewlines).lowercased()
if lower.isEmpty {
return nil
}
let urlErrorCode = URLError.Code(rawValue: nsError.code)
if nsError.domain == URLError.errorDomain {
switch urlErrorCode {
case .timedOut:
return GatewayConnectionProblem(
kind: .timeout,
owner: .network,
title: "Connection timed out",
message: "The gateway did not respond before the connection timed out.",
actionLabel: "Retry",
actionCommand: nil,
docsURL: URL(string: "https://docs.openclaw.ai/gateway/troubleshooting"),
retryable: true,
pauseReconnect: false,
technicalDetails: rawMessage)
case .cannotConnectToHost:
return GatewayConnectionProblem(
kind: .connectionRefused,
owner: .network,
title: "Gateway refused the connection",
message: "The gateway host was reachable, but it refused the connection.",
actionLabel: "Retry",
actionCommand: nil,
docsURL: URL(string: "https://docs.openclaw.ai/gateway/troubleshooting"),
retryable: true,
pauseReconnect: false,
technicalDetails: rawMessage)
case .cannotFindHost, .dnsLookupFailed, .notConnectedToInternet, .networkConnectionLost, .internationalRoamingOff, .callIsActive, .dataNotAllowed:
return GatewayConnectionProblem(
kind: .reachabilityFailed,
owner: .network,
title: "Gateway is not reachable",
message: "OpenClaw could not reach the gateway over the current network.",
actionLabel: "Check network",
actionCommand: nil,
docsURL: URL(string: "https://docs.openclaw.ai/gateway/troubleshooting"),
retryable: true,
pauseReconnect: false,
technicalDetails: rawMessage)
case .cancelled:
return GatewayConnectionProblem(
kind: .websocketCancelled,
owner: .network,
title: "Connection interrupted",
message: "The connection to the gateway was interrupted before setup completed.",
actionLabel: "Retry",
actionCommand: nil,
docsURL: URL(string: "https://docs.openclaw.ai/gateway/troubleshooting"),
retryable: true,
pauseReconnect: false,
technicalDetails: rawMessage)
default:
break
}
}
if lower.contains("timed out") {
return GatewayConnectionProblem(
kind: .timeout,
owner: .network,
title: "Connection timed out",
message: "The gateway did not respond before the connection timed out.",
actionLabel: "Retry",
actionCommand: nil,
docsURL: URL(string: "https://docs.openclaw.ai/gateway/troubleshooting"),
retryable: true,
pauseReconnect: false,
technicalDetails: rawMessage)
}
if lower.contains("connection refused") || lower.contains("refused") {
return GatewayConnectionProblem(
kind: .connectionRefused,
owner: .network,
title: "Gateway refused the connection",
message: "The gateway host was reachable, but it refused the connection.",
actionLabel: "Retry",
actionCommand: nil,
docsURL: URL(string: "https://docs.openclaw.ai/gateway/troubleshooting"),
retryable: true,
pauseReconnect: false,
technicalDetails: rawMessage)
}
if lower.contains("cannot find host") || lower.contains("could not connect") || lower.contains("network is unreachable") {
return GatewayConnectionProblem(
kind: .reachabilityFailed,
owner: .network,
title: "Gateway is not reachable",
message: "OpenClaw could not reach the gateway over the current network.",
actionLabel: "Check network",
actionCommand: nil,
docsURL: URL(string: "https://docs.openclaw.ai/gateway/troubleshooting"),
retryable: true,
pauseReconnect: false,
technicalDetails: rawMessage)
}
if lower.contains("cancelled") || lower.contains("canceled") {
return GatewayConnectionProblem(
kind: .websocketCancelled,
owner: .network,
title: "Connection interrupted",
message: "The connection to the gateway was interrupted before setup completed.",
actionLabel: "Retry",
actionCommand: nil,
docsURL: URL(string: "https://docs.openclaw.ai/gateway/troubleshooting"),
retryable: true,
pauseReconnect: false,
technicalDetails: rawMessage)
}
return nil
}
private static func pairingProblem(for authError: GatewayConnectAuthError) -> GatewayConnectionProblem {
let requestId = authError.requestId
let pairingCommand = self.approvalCommand(requestId: requestId)
switch authError.detailsReason {
case "role-upgrade":
return self.problem(
kind: .pairingRoleUpgradeRequired,
owner: .gateway,
title: authError.titleOverride ?? "Additional approval required",
message: authError.userMessageOverride
?? "This iPhone is already paired, but it is requesting a new role that was not previously approved.",
actionLabel: authError.actionLabel ?? "Approve on gateway",
actionCommand: authError.actionCommand ?? pairingCommand,
docsURL: self.docsURL(authError.docsURLString, fallback: "https://docs.openclaw.ai/gateway/pairing"),
requestId: requestId,
retryable: false,
pauseReconnect: true,
authError: authError)
case "scope-upgrade":
return self.problem(
kind: .pairingScopeUpgradeRequired,
owner: .gateway,
title: authError.titleOverride ?? "Additional permissions required",
message: authError.userMessageOverride
?? "This iPhone is already paired, but it is requesting new permissions that require approval.",
actionLabel: authError.actionLabel ?? "Approve on gateway",
actionCommand: authError.actionCommand ?? pairingCommand,
docsURL: self.docsURL(authError.docsURLString, fallback: "https://docs.openclaw.ai/gateway/pairing"),
requestId: requestId,
retryable: false,
pauseReconnect: true,
authError: authError)
case "metadata-upgrade":
return self.problem(
kind: .pairingMetadataUpgradeRequired,
owner: .gateway,
title: authError.titleOverride ?? "Device approval needs refresh",
message: authError.userMessageOverride
?? "The gateway detected a change in this device's approved identity metadata and requires re-approval.",
actionLabel: authError.actionLabel ?? "Approve on gateway",
actionCommand: authError.actionCommand ?? pairingCommand,
docsURL: self.docsURL(authError.docsURLString, fallback: "https://docs.openclaw.ai/gateway/pairing"),
requestId: requestId,
retryable: false,
pauseReconnect: true,
authError: authError)
default:
return self.problem(
kind: .pairingRequired,
owner: .gateway,
title: authError.titleOverride ?? "This iPhone is not approved yet",
message: authError.userMessageOverride
?? "The gateway received the connection request, but this device must be approved first.",
actionLabel: authError.actionLabel ?? "Approve on gateway",
actionCommand: authError.actionCommand ?? pairingCommand,
docsURL: self.docsURL(authError.docsURLString, fallback: "https://docs.openclaw.ai/gateway/pairing"),
requestId: requestId,
retryable: false,
pauseReconnect: true,
authError: authError)
}
}
private static func problem(
kind: GatewayConnectionProblem.Kind,
owner: GatewayConnectionProblem.Owner,
title: String,
message: String,
actionLabel: String?,
actionCommand: String?,
docsURL: URL?,
requestId: String?,
retryable: Bool,
pauseReconnect: Bool,
authError: GatewayConnectAuthError)
-> GatewayConnectionProblem
{
GatewayConnectionProblem(
kind: kind,
owner: authError.ownerRaw.flatMap(self.owner(from:)) ?? owner,
title: title,
message: message,
actionLabel: actionLabel,
actionCommand: actionCommand,
docsURL: docsURL,
requestId: requestId,
retryable: authError.retryableOverride ?? retryable,
pauseReconnect: authError.pauseReconnectOverride ?? pauseReconnect,
technicalDetails: self.technicalDetails(for: authError))
}
private static func approvalCommand(requestId: String?) -> String {
if let requestId = self.nonEmpty(requestId) {
return "openclaw devices approve \(requestId)"
}
return "openclaw devices list"
}
private static func technicalDetails(for authError: GatewayConnectAuthError) -> String? {
var parts: [String] = []
if let detail = self.nonEmpty(authError.detailCodeRaw) {
parts.append(detail)
}
if let reason = self.nonEmpty(authError.detailsReason) {
parts.append("reason=\(reason)")
}
if let requestId = self.nonEmpty(authError.requestId) {
parts.append("requestId=\(requestId)")
}
if let nextStep = self.nonEmpty(authError.recommendedNextStepRaw) {
parts.append("next=\(nextStep)")
}
if authError.canRetryWithDeviceToken {
parts.append("deviceTokenRetry=true")
}
return parts.isEmpty ? nil : parts.joined(separator: " · ")
}
private static func docsURL(_ preferred: String?, fallback: String?) -> URL? {
if let preferred = self.nonEmpty(preferred), let url = URL(string: preferred) {
return url
}
if let fallback = self.nonEmpty(fallback), let url = URL(string: fallback) {
return url
}
return nil
}
private static func owner(from raw: String) -> GatewayConnectionProblem.Owner? {
switch raw.trimmingCharacters(in: .whitespacesAndNewlines).lowercased() {
case "gateway":
return .gateway
case "iphone", "ios", "device":
return .iphone
case "both":
return .both
case "network":
return .network
case "unknown", "":
return .unknown
default:
return nil
}
}
private static func stringValue(_ value: Any?) -> String? {
self.nonEmpty(value as? String)
}
private static func nonEmpty(_ value: String?) -> String? {
let trimmed = value?.trimmingCharacters(in: .whitespacesAndNewlines) ?? ""
return trimmed.isEmpty ? nil : trimmed
}
}

View File

@@ -43,12 +43,32 @@ public struct GatewayConnectAuthError: LocalizedError, Sendable {
public let detailCodeRaw: String?
public let recommendedNextStepRaw: String?
public let canRetryWithDeviceToken: Bool
public let requestId: String?
public let detailsReason: String?
public let ownerRaw: String?
public let titleOverride: String?
public let userMessageOverride: String?
public let actionLabel: String?
public let actionCommand: String?
public let docsURLString: String?
public let retryableOverride: Bool?
public let pauseReconnectOverride: Bool?
public init(
message: String,
detailCodeRaw: String?,
canRetryWithDeviceToken: Bool,
recommendedNextStepRaw: String? = nil)
recommendedNextStepRaw: String? = nil,
requestId: String? = nil,
detailsReason: String? = nil,
ownerRaw: String? = nil,
titleOverride: String? = nil,
userMessageOverride: String? = nil,
actionLabel: String? = nil,
actionCommand: String? = nil,
docsURLString: String? = nil,
retryableOverride: Bool? = nil,
pauseReconnectOverride: Bool? = nil)
{
let trimmedMessage = message.trimmingCharacters(in: .whitespacesAndNewlines)
let trimmedDetailCode = detailCodeRaw?.trimmingCharacters(in: .whitespacesAndNewlines)
@@ -59,19 +79,54 @@ public struct GatewayConnectAuthError: LocalizedError, Sendable {
self.canRetryWithDeviceToken = canRetryWithDeviceToken
self.recommendedNextStepRaw =
trimmedRecommendedNextStep?.isEmpty == false ? trimmedRecommendedNextStep : nil
self.requestId = Self.trimmedOrNil(requestId)
self.detailsReason = Self.trimmedOrNil(detailsReason)
self.ownerRaw = Self.trimmedOrNil(ownerRaw)
self.titleOverride = Self.trimmedOrNil(titleOverride)
self.userMessageOverride = Self.trimmedOrNil(userMessageOverride)
self.actionLabel = Self.trimmedOrNil(actionLabel)
self.actionCommand = Self.trimmedOrNil(actionCommand)
self.docsURLString = Self.trimmedOrNil(docsURLString)
self.retryableOverride = retryableOverride
self.pauseReconnectOverride = pauseReconnectOverride
}
public init(
message: String,
detailCode: String?,
canRetryWithDeviceToken: Bool,
recommendedNextStep: String? = nil)
recommendedNextStep: String? = nil,
requestId: String? = nil,
detailsReason: String? = nil,
ownerRaw: String? = nil,
titleOverride: String? = nil,
userMessageOverride: String? = nil,
actionLabel: String? = nil,
actionCommand: String? = nil,
docsURLString: String? = nil,
retryableOverride: Bool? = nil,
pauseReconnectOverride: Bool? = nil)
{
self.init(
message: message,
detailCodeRaw: detailCode,
canRetryWithDeviceToken: canRetryWithDeviceToken,
recommendedNextStepRaw: recommendedNextStep)
recommendedNextStepRaw: recommendedNextStep,
requestId: requestId,
detailsReason: detailsReason,
ownerRaw: ownerRaw,
titleOverride: titleOverride,
userMessageOverride: userMessageOverride,
actionLabel: actionLabel,
actionCommand: actionCommand,
docsURLString: docsURLString,
retryableOverride: retryableOverride,
pauseReconnectOverride: pauseReconnectOverride)
}
private static func trimmedOrNil(_ value: String?) -> String? {
let trimmed = value?.trimmingCharacters(in: .whitespacesAndNewlines) ?? ""
return trimmed.isEmpty ? nil : trimmed
}
public var detailCode: String? { self.detailCodeRaw }

View File

@@ -5,12 +5,36 @@ public enum OpenClawWatchCommand: String, Codable, Sendable {
case notify = "watch.notify"
}
public enum OpenClawWatchPayloadType: String, Codable, Sendable, Equatable {
case notify = "watch.notify"
case reply = "watch.reply"
case execApprovalPrompt = "watch.execApproval.prompt"
case execApprovalResolve = "watch.execApproval.resolve"
case execApprovalResolved = "watch.execApproval.resolved"
case execApprovalExpired = "watch.execApproval.expired"
case execApprovalSnapshot = "watch.execApproval.snapshot"
case execApprovalSnapshotRequest = "watch.execApproval.snapshotRequest"
}
public enum OpenClawWatchRisk: String, Codable, Sendable, Equatable {
case low
case medium
case high
}
public enum OpenClawWatchExecApprovalDecision: String, Codable, Sendable, Equatable {
case allowOnce = "allow-once"
case deny
}
public enum OpenClawWatchExecApprovalCloseReason: String, Codable, Sendable, Equatable {
case expired
case notFound = "not-found"
case unavailable
case replaced
case resolved
}
public struct OpenClawWatchAction: Codable, Sendable, Equatable {
public var id: String
public var label: String
@@ -23,6 +47,151 @@ public struct OpenClawWatchAction: Codable, Sendable, Equatable {
}
}
public struct OpenClawWatchExecApprovalItem: Codable, Sendable, Equatable, Identifiable {
public var id: String
public var commandText: String
public var commandPreview: String?
public var host: String?
public var nodeId: String?
public var agentId: String?
public var expiresAtMs: Int?
public var allowedDecisions: [OpenClawWatchExecApprovalDecision]
public var risk: OpenClawWatchRisk?
public init(
id: String,
commandText: String,
commandPreview: String? = nil,
host: String? = nil,
nodeId: String? = nil,
agentId: String? = nil,
expiresAtMs: Int? = nil,
allowedDecisions: [OpenClawWatchExecApprovalDecision] = [],
risk: OpenClawWatchRisk? = nil)
{
self.id = id
self.commandText = commandText
self.commandPreview = commandPreview
self.host = host
self.nodeId = nodeId
self.agentId = agentId
self.expiresAtMs = expiresAtMs
self.allowedDecisions = allowedDecisions
self.risk = risk
}
}
public struct OpenClawWatchExecApprovalPromptMessage: Codable, Sendable, Equatable {
public var type: OpenClawWatchPayloadType
public var approval: OpenClawWatchExecApprovalItem
public var sentAtMs: Int?
public var deliveryId: String?
public var resetResolvingState: Bool?
public init(
approval: OpenClawWatchExecApprovalItem,
sentAtMs: Int? = nil,
deliveryId: String? = nil,
resetResolvingState: Bool? = nil)
{
self.type = .execApprovalPrompt
self.approval = approval
self.sentAtMs = sentAtMs
self.deliveryId = deliveryId
self.resetResolvingState = resetResolvingState
}
}
public struct OpenClawWatchExecApprovalResolveMessage: Codable, Sendable, Equatable {
public var type: OpenClawWatchPayloadType
public var approvalId: String
public var decision: OpenClawWatchExecApprovalDecision
public var replyId: String
public var sentAtMs: Int?
public init(
approvalId: String,
decision: OpenClawWatchExecApprovalDecision,
replyId: String,
sentAtMs: Int? = nil)
{
self.type = .execApprovalResolve
self.approvalId = approvalId
self.decision = decision
self.replyId = replyId
self.sentAtMs = sentAtMs
}
}
public struct OpenClawWatchExecApprovalResolvedMessage: Codable, Sendable, Equatable {
public var type: OpenClawWatchPayloadType
public var approvalId: String
public var decision: OpenClawWatchExecApprovalDecision?
public var resolvedAtMs: Int?
public var source: String?
public init(
approvalId: String,
decision: OpenClawWatchExecApprovalDecision? = nil,
resolvedAtMs: Int? = nil,
source: String? = nil)
{
self.type = .execApprovalResolved
self.approvalId = approvalId
self.decision = decision
self.resolvedAtMs = resolvedAtMs
self.source = source
}
}
public struct OpenClawWatchExecApprovalExpiredMessage: Codable, Sendable, Equatable {
public var type: OpenClawWatchPayloadType
public var approvalId: String
public var reason: OpenClawWatchExecApprovalCloseReason
public var expiredAtMs: Int?
public init(
approvalId: String,
reason: OpenClawWatchExecApprovalCloseReason,
expiredAtMs: Int? = nil)
{
self.type = .execApprovalExpired
self.approvalId = approvalId
self.reason = reason
self.expiredAtMs = expiredAtMs
}
}
public struct OpenClawWatchExecApprovalSnapshotMessage: Codable, Sendable, Equatable {
public var type: OpenClawWatchPayloadType
public var approvals: [OpenClawWatchExecApprovalItem]
public var sentAtMs: Int?
public var snapshotId: String?
public init(
approvals: [OpenClawWatchExecApprovalItem],
sentAtMs: Int? = nil,
snapshotId: String? = nil)
{
self.type = .execApprovalSnapshot
self.approvals = approvals
self.sentAtMs = sentAtMs
self.snapshotId = snapshotId
}
}
public struct OpenClawWatchExecApprovalSnapshotRequestMessage: Codable, Sendable, Equatable {
public var type: OpenClawWatchPayloadType
public var requestId: String
public var sentAtMs: Int?
public init(requestId: String, sentAtMs: Int? = nil) {
self.type = .execApprovalSnapshotRequest
self.requestId = requestId
self.sentAtMs = sentAtMs
}
}
public struct OpenClawWatchStatusPayload: Codable, Sendable, Equatable {
public var supported: Bool
public var paired: Bool

View File

@@ -537,6 +537,8 @@ public struct AgentParams: Codable, Sendable {
public let besteffortdeliver: Bool?
public let lane: String?
public let extrasystemprompt: String?
public let bootstrapcontextmode: AnyCodable?
public let bootstrapcontextrunkind: AnyCodable?
public let internalevents: [[String: AnyCodable]]?
public let inputprovenance: [String: AnyCodable]?
public let idempotencykey: String
@@ -566,6 +568,8 @@ public struct AgentParams: Codable, Sendable {
besteffortdeliver: Bool?,
lane: String?,
extrasystemprompt: String?,
bootstrapcontextmode: AnyCodable?,
bootstrapcontextrunkind: AnyCodable?,
internalevents: [[String: AnyCodable]]?,
inputprovenance: [String: AnyCodable]?,
idempotencykey: String,
@@ -594,6 +598,8 @@ public struct AgentParams: Codable, Sendable {
self.besteffortdeliver = besteffortdeliver
self.lane = lane
self.extrasystemprompt = extrasystemprompt
self.bootstrapcontextmode = bootstrapcontextmode
self.bootstrapcontextrunkind = bootstrapcontextrunkind
self.internalevents = internalevents
self.inputprovenance = inputprovenance
self.idempotencykey = idempotencykey
@@ -624,6 +630,8 @@ public struct AgentParams: Codable, Sendable {
case besteffortdeliver = "bestEffortDeliver"
case lane
case extrasystemprompt = "extraSystemPrompt"
case bootstrapcontextmode = "bootstrapContextMode"
case bootstrapcontextrunkind = "bootstrapContextRunKind"
case internalevents = "internalEvents"
case inputprovenance = "inputProvenance"
case idempotencykey = "idempotencyKey"
@@ -1327,6 +1335,236 @@ public struct SessionsResolveParams: Codable, Sendable {
}
}
public struct SessionCompactionCheckpoint: Codable, Sendable {
public let checkpointid: String
public let sessionkey: String
public let sessionid: String
public let createdat: Int
public let reason: AnyCodable
public let tokensbefore: Int?
public let tokensafter: Int?
public let summary: String?
public let firstkeptentryid: String?
public let precompaction: [String: AnyCodable]
public let postcompaction: [String: AnyCodable]
public init(
checkpointid: String,
sessionkey: String,
sessionid: String,
createdat: Int,
reason: AnyCodable,
tokensbefore: Int?,
tokensafter: Int?,
summary: String?,
firstkeptentryid: String?,
precompaction: [String: AnyCodable],
postcompaction: [String: AnyCodable])
{
self.checkpointid = checkpointid
self.sessionkey = sessionkey
self.sessionid = sessionid
self.createdat = createdat
self.reason = reason
self.tokensbefore = tokensbefore
self.tokensafter = tokensafter
self.summary = summary
self.firstkeptentryid = firstkeptentryid
self.precompaction = precompaction
self.postcompaction = postcompaction
}
private enum CodingKeys: String, CodingKey {
case checkpointid = "checkpointId"
case sessionkey = "sessionKey"
case sessionid = "sessionId"
case createdat = "createdAt"
case reason
case tokensbefore = "tokensBefore"
case tokensafter = "tokensAfter"
case summary
case firstkeptentryid = "firstKeptEntryId"
case precompaction = "preCompaction"
case postcompaction = "postCompaction"
}
}
public struct SessionsCompactionListParams: Codable, Sendable {
public let key: String
public init(
key: String)
{
self.key = key
}
private enum CodingKeys: String, CodingKey {
case key
}
}
public struct SessionsCompactionGetParams: Codable, Sendable {
public let key: String
public let checkpointid: String
public init(
key: String,
checkpointid: String)
{
self.key = key
self.checkpointid = checkpointid
}
private enum CodingKeys: String, CodingKey {
case key
case checkpointid = "checkpointId"
}
}
public struct SessionsCompactionBranchParams: Codable, Sendable {
public let key: String
public let checkpointid: String
public init(
key: String,
checkpointid: String)
{
self.key = key
self.checkpointid = checkpointid
}
private enum CodingKeys: String, CodingKey {
case key
case checkpointid = "checkpointId"
}
}
public struct SessionsCompactionRestoreParams: Codable, Sendable {
public let key: String
public let checkpointid: String
public init(
key: String,
checkpointid: String)
{
self.key = key
self.checkpointid = checkpointid
}
private enum CodingKeys: String, CodingKey {
case key
case checkpointid = "checkpointId"
}
}
public struct SessionsCompactionListResult: Codable, Sendable {
public let ok: Bool
public let key: String
public let checkpoints: [SessionCompactionCheckpoint]
public init(
ok: Bool,
key: String,
checkpoints: [SessionCompactionCheckpoint])
{
self.ok = ok
self.key = key
self.checkpoints = checkpoints
}
private enum CodingKeys: String, CodingKey {
case ok
case key
case checkpoints
}
}
public struct SessionsCompactionGetResult: Codable, Sendable {
public let ok: Bool
public let key: String
public let checkpoint: SessionCompactionCheckpoint
public init(
ok: Bool,
key: String,
checkpoint: SessionCompactionCheckpoint)
{
self.ok = ok
self.key = key
self.checkpoint = checkpoint
}
private enum CodingKeys: String, CodingKey {
case ok
case key
case checkpoint
}
}
public struct SessionsCompactionBranchResult: Codable, Sendable {
public let ok: Bool
public let sourcekey: String
public let key: String
public let sessionid: String
public let checkpoint: SessionCompactionCheckpoint
public let entry: [String: AnyCodable]
public init(
ok: Bool,
sourcekey: String,
key: String,
sessionid: String,
checkpoint: SessionCompactionCheckpoint,
entry: [String: AnyCodable])
{
self.ok = ok
self.sourcekey = sourcekey
self.key = key
self.sessionid = sessionid
self.checkpoint = checkpoint
self.entry = entry
}
private enum CodingKeys: String, CodingKey {
case ok
case sourcekey = "sourceKey"
case key
case sessionid = "sessionId"
case checkpoint
case entry
}
}
public struct SessionsCompactionRestoreResult: Codable, Sendable {
public let ok: Bool
public let key: String
public let sessionid: String
public let checkpoint: SessionCompactionCheckpoint
public let entry: [String: AnyCodable]
public init(
ok: Bool,
key: String,
sessionid: String,
checkpoint: SessionCompactionCheckpoint,
entry: [String: AnyCodable])
{
self.ok = ok
self.key = key
self.sessionid = sessionid
self.checkpoint = checkpoint
self.entry = entry
}
private enum CodingKeys: String, CodingKey {
case ok
case key
case sessionid = "sessionId"
case checkpoint
case entry
}
}
public struct SessionsCreateParams: Codable, Sendable {
public let key: String?
public let agentid: String?

View File

@@ -1,3 +1,4 @@
import Foundation
import OpenClawKit
import Testing
@@ -11,4 +12,81 @@ import Testing
#expect(error.isNonRecoverable)
#expect(error.detail == .authBootstrapTokenInvalid)
}
@Test func connectAuthErrorPreservesStructuredMetadata() {
let error = GatewayConnectAuthError(
message: "pairing required",
detailCode: GatewayConnectAuthDetailCode.pairingRequired.rawValue,
canRetryWithDeviceToken: false,
recommendedNextStep: "review_auth_configuration",
requestId: "req-123",
detailsReason: "scope-upgrade",
ownerRaw: "gateway",
titleOverride: "Additional permissions required",
userMessageOverride: "Approve the requested permissions on the gateway, then reconnect.",
actionLabel: "Approve on gateway",
actionCommand: "openclaw devices approve req-123",
docsURLString: "https://docs.openclaw.ai/gateway/pairing",
retryableOverride: false,
pauseReconnectOverride: true)
#expect(error.requestId == "req-123")
#expect(error.detailsReason == "scope-upgrade")
#expect(error.ownerRaw == "gateway")
#expect(error.titleOverride == "Additional permissions required")
#expect(error.actionCommand == "openclaw devices approve req-123")
#expect(error.docsURLString == "https://docs.openclaw.ai/gateway/pairing")
#expect(error.pauseReconnectOverride == true)
}
@Test func pairingProblemUsesStructuredRequestMetadata() {
let error = GatewayConnectAuthError(
message: "pairing required",
detailCode: GatewayConnectAuthDetailCode.pairingRequired.rawValue,
canRetryWithDeviceToken: false,
requestId: "req-123",
detailsReason: "scope-upgrade")
let problem = GatewayConnectionProblemMapper.map(error: error)
#expect(problem?.kind == .pairingScopeUpgradeRequired)
#expect(problem?.requestId == "req-123")
#expect(problem?.pauseReconnect == true)
#expect(problem?.actionCommand == "openclaw devices approve req-123")
}
@Test func cancelledTransportDoesNotReplaceStructuredPairingProblem() {
let pairing = GatewayConnectAuthError(
message: "pairing required",
detailCode: GatewayConnectAuthDetailCode.pairingRequired.rawValue,
canRetryWithDeviceToken: false,
requestId: "req-123")
let previousProblem = GatewayConnectionProblemMapper.map(error: pairing)
let cancelled = NSError(
domain: URLError.errorDomain,
code: URLError.cancelled.rawValue,
userInfo: [NSLocalizedDescriptionKey: "gateway receive: cancelled"])
let preserved = GatewayConnectionProblemMapper.map(error: cancelled, preserving: previousProblem)
#expect(preserved?.kind == .pairingRequired)
#expect(preserved?.requestId == "req-123")
}
@Test func unmappedTransportErrorClearsStaleStructuredProblem() {
let pairing = GatewayConnectAuthError(
message: "pairing required",
detailCode: GatewayConnectAuthDetailCode.pairingRequired.rawValue,
canRetryWithDeviceToken: false,
requestId: "req-123")
let previousProblem = GatewayConnectionProblemMapper.map(error: pairing)
let unknownTransport = NSError(
domain: NSURLErrorDomain,
code: -1202,
userInfo: [NSLocalizedDescriptionKey: "certificate chain validation failed"])
let mapped = GatewayConnectionProblemMapper.map(error: unknownTransport, preserving: previousProblem)
#expect(mapped == nil)
}
}

View File

@@ -1,4 +1,4 @@
1c74540dd152c55dbda3e5dee1e37008ee3e6aabb0608e571292832c7a1c012c config-baseline.json
7e30316f2326b7d07b71d7b8a96049a74b81428921299b5c4b5aa3d080e03305 config-baseline.core.json
66edc86a9d16db1b9e9e7dd99b7032e2d9bcfb9ff210256a21f4b4f088cb3dc1 config-baseline.channel.json
d6ebc4948499b997c4a3727cf31849d4a598de9f1a4c197417dcc0b0ec1b734f config-baseline.plugin.json
0a75b57f5dbb0bb1488eacb47111ee22ff42dd3747bfe07bb69c9445d5e55c3e config-baseline.json
ff15bb8b4231fc80174249ae89bcb61439d7adda5ee6be95e4d304680253a59f config-baseline.core.json
7f42b22b46c487d64aaac46001ba9d9096cf7bf0b1c263a54d39946303ff5018 config-baseline.channel.json
483d4f3c1d516719870ad6f2aba6779b9950f85471ee77b9994a077a7574a892 config-baseline.plugin.json

View File

@@ -1,2 +1,2 @@
23bfae10a189a7d0548bc7213a9180841bbb1125e97ce1d2d0b7a765773a92fd plugin-sdk-api-baseline.json
6c64b352b19368015c867b4c16225d676110544943497238c2f78602ad2fb519 plugin-sdk-api-baseline.jsonl
763d2709dd26f4ec7d5807b2f1781b7f58cb115d2b0a9c9235a6c2c7b3788c1f plugin-sdk-api-baseline.json
87ab9ec219f037b13a8f42378d1fed02701d4035da0e5eca8a091626e8426523 plugin-sdk-api-baseline.jsonl

View File

@@ -183,6 +183,14 @@
"source": "Doctor",
"target": "Doctor"
},
{
"source": "Memory Wiki",
"target": "Memory Wiki"
},
{
"source": "wiki",
"target": "wiki"
},
{
"source": "Polls",
"target": "投票"

View File

@@ -1003,6 +1003,8 @@ Core examples:
- moderation: `timeout`, `kick`, `ban`
- presence: `setPresence`
The `event-create` action accepts an optional `image` parameter (URL or local file path) to set the scheduled event cover image.
Action gates live under `channels.discord.actions.*`.
Default gate behavior:

View File

@@ -227,7 +227,10 @@ Quick mental model (evaluation order for group messages):
Group messages require a mention unless overridden per group. Defaults live per subsystem under `*.groups."*"`.
Replying to a bot message counts as an implicit mention (when the channel supports reply metadata). This applies to Telegram, WhatsApp, Slack, Discord, and Microsoft Teams.
Replying to a bot message counts as an implicit mention when the channel
supports reply metadata. Quoting a bot message can also count as an implicit
mention on channels that expose quote metadata. Current built-in cases include
Telegram, WhatsApp, Slack, Discord, Microsoft Teams, and ZaloUser.
```json5
{

View File

@@ -8,7 +8,7 @@ title: "Matrix"
# Matrix
Matrix is the Matrix bundled channel plugin for OpenClaw.
Matrix is a bundled channel plugin for OpenClaw.
It uses the official `matrix-js-sdk` and supports DMs, rooms, threads, media, reactions, polls, location, and E2EE.
## Bundled plugin
@@ -53,23 +53,23 @@ openclaw channels add
openclaw configure --section channels
```
What the Matrix wizard actually asks for:
The Matrix wizard asks for:
- homeserver URL
- auth method: access token or password
- user ID only when you choose password auth
- user ID (password auth only)
- optional device name
- whether to enable E2EE
- whether to configure Matrix room access now
- whether to configure room access and invite auto-join
Wizard behavior that matters:
Key wizard behaviors:
- If Matrix auth env vars already exist for the selected account, and that account does not already have auth saved in config, the wizard offers an env shortcut and only writes `enabled: true` for that account.
- When you add another Matrix account interactively, the entered account name is normalized into the account ID used in config and env vars. For example, `Ops Bot` becomes `ops-bot`.
- DM allowlist prompts accept full `@user:server` values immediately. Display names only work when live directory lookup finds one exact match; otherwise the wizard asks you to retry with a full Matrix ID.
- Room allowlist prompts accept room IDs and aliases directly. They can also resolve joined-room names live, but unresolved names are only kept as typed during setup and are ignored later by runtime allowlist resolution. Prefer `!room:server` or `#alias:server`.
- Runtime room/session identity uses the stable Matrix room ID. Room-declared aliases are only used as lookup inputs, not as the long-term session key or stable group identity.
- To resolve room names before saving them, use `openclaw channels resolve --channel matrix "Project Room"`.
- If Matrix auth env vars already exist and that account does not already have auth saved in config, the wizard offers an env shortcut to keep auth in env vars.
- Account names are normalized to the account ID. For example, `Ops Bot` becomes `ops-bot`.
- DM allowlist entries accept `@user:server` directly; display names only work when live directory lookup finds one exact match.
- Room allowlist entries accept room IDs and aliases directly. Prefer `!room:server` or `#alias:server`; unresolved names are ignored at runtime by allowlist resolution.
- In invite auto-join allowlist mode, use only stable invite targets: `!roomId:server`, `#alias:server`, or `*`. Plain room names are rejected.
- To resolve room names before saving, use `openclaw channels resolve --channel matrix "Project Room"`.
<Warning>
`channels.matrix.autoJoin` defaults to `off`.
@@ -77,6 +77,8 @@ Wizard behavior that matters:
If you leave it unset, the bot will not join invited rooms or fresh DM-style invites, so it will not appear in new groups or invited DMs unless you join manually first.
Set `autoJoin: "allowlist"` together with `autoJoinAllowlist` to restrict which invites it accepts, or set `autoJoin: "always"` if you want it to join every invite.
In `allowlist` mode, `autoJoinAllowlist` only accepts `!roomId:server`, `#alias:server`, or `*`.
</Warning>
Allowlist example:
@@ -214,12 +216,9 @@ This is a practical baseline config with DM pairing, room allowlist, and E2EE en
}
```
`autoJoin` applies to Matrix invites in general, not only room/group invites.
That includes fresh DM-style invites. At invite time, OpenClaw does not reliably know whether the
invited room will end up being treated as a DM or a group, so all invites go through the same
`autoJoin` decision first. `dm.policy` still applies after the bot has joined and the room is
classified as a DM, so `autoJoin` controls join behavior while `dm.policy` controls reply/access
behavior.
`autoJoin` applies to all Matrix invites, including DM-style invites. OpenClaw cannot reliably
classify an invited room as a DM or group at invite time, so all invites go through `autoJoin`
first. `dm.policy` applies after the bot has joined and the room is classified as a DM.
## Streaming previews
@@ -414,11 +413,7 @@ For Tuwunel, use the same setup flow and push-rule API call shown above:
- If normal Matrix notifications already work for that user, the user token + `pushrules` call above is the main setup step.
- If notifications seem to disappear while the user is active on another device, check whether `suppress_push_when_active` is enabled. Tuwunel added this option in Tuwunel 1.4.2 on September 12, 2025, and it can intentionally suppress pushes to other devices while one device is active.
## Encryption and verification
In encrypted (E2EE) rooms, outbound image events use `thumbnail_file` so image previews are encrypted alongside the full attachment. Unencrypted rooms still use plain `thumbnail_url`. No configuration is needed — the plugin detects E2EE state automatically.
### Bot to bot rooms
## Bot-to-bot rooms
By default, Matrix messages from other configured OpenClaw Matrix accounts are ignored.
@@ -447,6 +442,10 @@ Use `allowBots` when you intentionally want inter-agent Matrix traffic:
Use strict room allowlists and mention requirements when enabling bot-to-bot traffic in shared rooms.
## Encryption and verification
In encrypted (E2EE) rooms, outbound image events use `thumbnail_file` so image previews are encrypted alongside the full attachment. Unencrypted rooms still use plain `thumbnail_url`. No configuration is needed — the plugin detects E2EE state automatically.
Enable encryption:
```json5
@@ -487,8 +486,6 @@ Bootstrap cross-signing and verification state:
openclaw matrix verify bootstrap
```
Multi-account support: use `channels.matrix.accounts` with per-account credentials and optional `name`. See [Configuration reference](/gateway/configuration-reference#multi-account-all-channels) for the shared pattern.
Verbose bootstrap diagnostics:
```bash
@@ -619,64 +616,11 @@ That pass tries to reuse the current secret storage and cross-signing identity f
If startup finds broken bootstrap state and `channels.matrix.password` is configured, OpenClaw can attempt a stricter repair path.
If the current device is already owner-signed, OpenClaw preserves that identity instead of resetting it automatically.
Upgrading from the previous public Matrix plugin:
See [Matrix migration](/install/migrating-matrix) for the full upgrade flow, limits, recovery commands, and common migration messages.
- OpenClaw automatically reuses the same Matrix account, access token, and device identity when possible.
- Before any actionable Matrix migration changes run, OpenClaw creates or reuses a recovery snapshot under `~/Backups/openclaw-migrations/`.
- If you use multiple Matrix accounts, set `channels.matrix.defaultAccount` before upgrading from the old flat-store layout so OpenClaw knows which account should receive that shared legacy state.
- If the previous plugin stored a Matrix room-key backup decryption key locally, startup or `openclaw doctor --fix` will import it into the new recovery-key flow automatically.
- If the Matrix access token changed after migration was prepared, startup now scans sibling token-hash storage roots for pending legacy restore state before giving up on the automatic backup restore.
- If the Matrix access token changes later for the same account, homeserver, and user, OpenClaw now prefers reusing the most complete existing token-hash storage root instead of starting from an empty Matrix state directory.
- On the next gateway start, backed-up room keys are restored automatically into the new crypto store.
- If the old plugin had local-only room keys that were never backed up, OpenClaw will warn clearly. Those keys cannot be exported automatically from the previous rust crypto store, so some old encrypted history may remain unavailable until recovered manually.
- See [Matrix migration](/install/migrating-matrix) for the full upgrade flow, limits, recovery commands, and common migration messages.
### Verification notices
Encrypted runtime state is organized under per-account, per-user token-hash roots in
`~/.openclaw/matrix/accounts/<account>/<homeserver>__<user>/<token-hash>/`.
That directory contains the sync store (`bot-storage.json`), crypto store (`crypto/`),
recovery key file (`recovery-key.json`), IndexedDB snapshot (`crypto-idb-snapshot.json`),
thread bindings (`thread-bindings.json`), and startup verification state (`startup-verification.json`)
when those features are in use.
When the token changes but the account identity stays the same, OpenClaw reuses the best existing
root for that account/homeserver/user tuple so prior sync state, crypto state, thread bindings,
and startup verification state remain visible.
### Node crypto store model
Matrix E2EE in this plugin uses the official `matrix-js-sdk` Rust crypto path in Node.
That path expects IndexedDB-backed persistence when you want crypto state to survive restarts.
OpenClaw currently provides that in Node by:
- using `fake-indexeddb` as the IndexedDB API shim expected by the SDK
- restoring the Rust crypto IndexedDB contents from `crypto-idb-snapshot.json` before `initRustCrypto`
- persisting the updated IndexedDB contents back to `crypto-idb-snapshot.json` after init and during runtime
- serializing snapshot restore and persist against `crypto-idb-snapshot.json` with an advisory file lock so gateway runtime persistence and CLI maintenance do not race on the same snapshot file
This is compatibility/storage plumbing, not a custom crypto implementation.
The snapshot file is sensitive runtime state and is stored with restrictive file permissions.
Under OpenClaw's security model, the gateway host and local OpenClaw state directory are already inside the trusted operator boundary, so this is primarily an operational durability concern rather than a separate remote trust boundary.
Planned improvement:
- add SecretRef support for persistent Matrix key material so recovery keys and related store-encryption secrets can be sourced from OpenClaw secrets providers instead of only local files
## Profile management
Update the Matrix self-profile for the selected account with:
```bash
openclaw matrix profile set --name "OpenClaw Assistant"
openclaw matrix profile set --avatar-url https://cdn.example.org/avatar.png
```
Add `--account <id>` when you want to target a named Matrix account explicitly.
Matrix accepts `mxc://` avatar URLs directly. When you pass an `http://` or `https://` avatar URL, OpenClaw uploads it to Matrix first and stores the resolved `mxc://` URL back into `channels.matrix.avatarUrl` (or the selected account override).
## Automatic verification notices
Matrix now posts verification lifecycle notices directly into the strict DM verification room as `m.notice` messages.
Matrix posts verification lifecycle notices directly into the strict DM verification room as `m.notice` messages.
That includes:
- verification request notices
@@ -708,27 +652,31 @@ Remove stale OpenClaw-managed devices with:
openclaw matrix devices prune-stale
```
### Direct Room Repair
### Crypto store
If direct-message state gets out of sync, OpenClaw can end up with stale `m.direct` mappings that point at old solo rooms instead of the live DM. Inspect the current mapping for a peer with:
Matrix E2EE uses the official `matrix-js-sdk` Rust crypto path in Node, with `fake-indexeddb` as the IndexedDB shim. Crypto state is persisted to a snapshot file (`crypto-idb-snapshot.json`) and restored on startup. The snapshot file is sensitive runtime state stored with restrictive file permissions.
Encrypted runtime state lives under per-account, per-user token-hash roots in
`~/.openclaw/matrix/accounts/<account>/<homeserver>__<user>/<token-hash>/`.
That directory contains the sync store (`bot-storage.json`), crypto store (`crypto/`),
recovery key file (`recovery-key.json`), IndexedDB snapshot (`crypto-idb-snapshot.json`),
thread bindings (`thread-bindings.json`), and startup verification state (`startup-verification.json`).
When the token changes but the account identity stays the same, OpenClaw reuses the best existing
root for that account/homeserver/user tuple so prior sync state, crypto state, thread bindings,
and startup verification state remain visible.
## Profile management
Update the Matrix self-profile for the selected account with:
```bash
openclaw matrix direct inspect --user-id @alice:example.org
openclaw matrix profile set --name "OpenClaw Assistant"
openclaw matrix profile set --avatar-url https://cdn.example.org/avatar.png
```
Repair it with:
Add `--account <id>` when you want to target a named Matrix account explicitly.
```bash
openclaw matrix direct repair --user-id @alice:example.org
```
Repair keeps the Matrix-specific logic inside the plugin:
- it prefers a strict 1:1 DM that is already mapped in `m.direct`
- otherwise it falls back to any currently joined strict 1:1 DM with that user
- if no healthy DM exists, it creates a fresh direct room and rewrites `m.direct` to point at it
The repair flow does not delete old rooms automatically. It only picks the healthy DM and updates the mapping so new Matrix sends, verification notices, and other direct-message flows target the right room again.
Matrix accepts `mxc://` avatar URLs directly. When you pass an `http://` or `https://` avatar URL, OpenClaw uploads it to Matrix first and stores the resolved `mxc://` URL back into `channels.matrix.avatarUrl` (or the selected account override).
## Threads
@@ -742,10 +690,10 @@ Matrix supports native Matrix threads for both automatic replies and message-too
- `threadReplies: "always"` keeps room replies in a thread rooted at the triggering message and routes that conversation through the matching thread-scoped session from the first triggering message.
- `dm.threadReplies` overrides the top-level setting for DMs only. For example, you can keep room threads isolated while keeping DMs flat.
- Inbound threaded messages include the thread root message as extra agent context.
- Message-tool sends now auto-inherit the current Matrix thread when the target is the same room, or the same DM user target, unless an explicit `threadId` is provided.
- Message-tool sends auto-inherit the current Matrix thread when the target is the same room, or the same DM user target, unless an explicit `threadId` is provided.
- Same-session DM user-target reuse only kicks in when the current session metadata proves the same DM peer on the same Matrix account; otherwise OpenClaw falls back to normal user-scoped routing.
- When OpenClaw sees a Matrix DM room collide with another DM room on the same shared Matrix DM session, it posts a one-time `m.notice` in that room with the `/focus` escape hatch when thread bindings are enabled and the `dm.sessionScope` hint.
- Runtime thread bindings are supported for Matrix. `/focus`, `/unfocus`, `/agents`, `/session idle`, `/session max-age`, and thread-bound `/acp spawn` now work in Matrix rooms and DMs.
- Runtime thread bindings are supported for Matrix. `/focus`, `/unfocus`, `/agents`, `/session idle`, `/session max-age`, and thread-bound `/acp spawn` work in Matrix rooms and DMs.
- Top-level Matrix room/DM `/focus` creates a new Matrix thread and binds it to the target session when `threadBindings.spawnSubagentSessions=true`.
- Running `/focus` or `/acp spawn --thread here` inside an existing Matrix thread binds that current thread instead.
@@ -766,7 +714,7 @@ Notes:
- `--bind here` does not create a child Matrix thread.
- `threadBindings.spawnAcpSessions` is only required for `/acp spawn --thread auto|here`, where OpenClaw needs to create or bind a child Matrix thread.
### Thread Binding Config
### Thread binding config
Matrix inherits global defaults from `session.threadBindings`, and also supports per-channel overrides:
@@ -810,16 +758,15 @@ Reaction notification mode resolves in this order:
- `channels["matrix"].reactionNotifications`
- default: `own`
Current behavior:
Behavior:
- `reactionNotifications: "own"` forwards added `m.reaction` events when they target bot-authored Matrix messages.
- `reactionNotifications: "off"` disables reaction system events.
- Reaction removals are still not synthesized into system events because Matrix surfaces those as redactions, not as standalone `m.reaction` removals.
- Reaction removals are not synthesized into system events because Matrix surfaces those as redactions, not as standalone `m.reaction` removals.
## History context
- `channels.matrix.historyLimit` controls how many recent room messages are included as `InboundHistory` when a Matrix room message triggers the agent.
- It falls back to `messages.groupChat.historyLimit`. If both are unset, the effective default is `0`, so mention-gated room messages are not buffered. Set `0` to disable.
- `channels.matrix.historyLimit` controls how many recent room messages are included as `InboundHistory` when a Matrix room message triggers the agent. Falls back to `messages.groupChat.historyLimit`; if both are unset, the effective default is `0`. Set `0` to disable.
- Matrix room history is room-only. DMs keep using normal session history.
- Matrix room history is pending-only: OpenClaw buffers room messages that did not trigger a reply yet, then snapshots that window when a mention or other trigger arrives.
- The current trigger message is not included in `InboundHistory`; it stays in the main inbound body for that turn.
@@ -836,7 +783,7 @@ Matrix supports the shared `contextVisibility` control for supplemental room con
This setting affects supplemental context visibility, not whether the inbound message itself can trigger a reply.
Trigger authorization still comes from `groupPolicy`, `groups`, `groupAllowFrom`, and DM policy settings.
## DM and room policy example
## DM and room policy
```json5
{
@@ -872,9 +819,32 @@ If an unapproved Matrix user keeps messaging you before approval, OpenClaw reuse
See [Pairing](/channels/pairing) for the shared DM pairing flow and storage layout.
## Direct room repair
If direct-message state gets out of sync, OpenClaw can end up with stale `m.direct` mappings that point at old solo rooms instead of the live DM. Inspect the current mapping for a peer with:
```bash
openclaw matrix direct inspect --user-id @alice:example.org
```
Repair it with:
```bash
openclaw matrix direct repair --user-id @alice:example.org
```
The repair flow:
- prefers a strict 1:1 DM that is already mapped in `m.direct`
- falls back to any currently joined strict 1:1 DM with that user
- creates a fresh direct room and rewrites `m.direct` if no healthy DM exists
The repair flow does not delete old rooms automatically. It only picks the healthy DM and updates the mapping so new Matrix sends, verification notices, and other direct-message flows target the right room again.
## Exec approvals
Matrix can act as an exec approval client for a Matrix account.
Matrix can act as a native approval client for a Matrix account. The native
DM/channel routing knobs still live under exec approval config:
- `channels.matrix.execApprovals.enabled`
- `channels.matrix.execApprovals.approvers` (optional; falls back to `channels.matrix.dm.allowFrom`)
@@ -882,13 +852,14 @@ Matrix can act as an exec approval client for a Matrix account.
- `channels.matrix.execApprovals.agentFilter`
- `channels.matrix.execApprovals.sessionFilter`
Approvers must be Matrix user IDs such as `@owner:example.org`. Matrix auto-enables native exec approvals when `enabled` is unset or `"auto"` and at least one approver can be resolved, either from `execApprovals.approvers` or from `channels.matrix.dm.allowFrom`. Set `enabled: false` to disable Matrix as a native approval client explicitly. Approval requests otherwise fall back to other configured approval routes or the exec approval fallback policy.
Approvers must be Matrix user IDs such as `@owner:example.org`. Matrix auto-enables native approvals when `enabled` is unset or `"auto"` and at least one approver can be resolved. Exec approvals use `execApprovals.approvers` first and can fall back to `channels.matrix.dm.allowFrom`. Plugin approvals authorize through `channels.matrix.dm.allowFrom`. Set `enabled: false` to disable Matrix as a native approval client explicitly. Approval requests otherwise fall back to other configured approval routes or the approval fallback policy.
Native Matrix routing is exec-only today:
Matrix native routing supports both approval kinds:
- `channels.matrix.execApprovals.*` controls native DM/channel routing for exec approvals only.
- Plugin approvals still use shared same-chat `/approve` plus any configured `approvals.plugin` forwarding.
- Matrix can still reuse `channels.matrix.dm.allowFrom` for plugin-approval authorization when it can infer approvers safely, but it does not expose a separate native plugin-approval DM/channel fanout path.
- `channels.matrix.execApprovals.*` controls the native DM/channel fanout mode for Matrix approval prompts.
- Exec approvals use the exec approver set from `execApprovals.approvers` or `channels.matrix.dm.allowFrom`.
- Plugin approvals use the Matrix DM allowlist from `channels.matrix.dm.allowFrom`.
- Matrix reaction shortcuts and message updates apply to both exec and plugin approvals.
Delivery rules:
@@ -904,9 +875,7 @@ Matrix approval prompts seed reaction shortcuts on the primary approval message:
Approvers can react on that message or use the fallback slash commands: `/approve <id> allow-once`, `/approve <id> allow-always`, or `/approve <id> deny`.
Only resolved approvers can approve or deny. Channel delivery includes the command text, so only enable `channel` or `both` in trusted rooms.
Matrix approval prompts reuse the shared core approval planner. The Matrix-specific native surface is transport only for exec approvals: room/DM routing and message send/update/delete behavior.
Only resolved approvers can approve or deny. For exec approvals, channel delivery includes the command text, so only enable `channel` or `both` in trusted rooms.
Per-account override:
@@ -914,7 +883,7 @@ Per-account override:
Related docs: [Exec approvals](/tools/exec-approvals)
## Multi-account example
## Multi-account
```json5
{
@@ -945,7 +914,7 @@ Related docs: [Exec approvals](/tools/exec-approvals)
```
Top-level `channels.matrix` values act as defaults for named accounts unless an account overrides them.
You can scope inherited room entries to one Matrix account with `groups.<room>.account` (or legacy `rooms.<room>.account`).
You can scope inherited room entries to one Matrix account with `groups.<room>.account`.
Entries without `account` stay shared across all Matrix accounts, and entries with `account: "default"` still work when the default account is configured directly on top-level `channels.matrix.*`.
Partial shared auth defaults do not create a separate implicit default account by themselves. OpenClaw only synthesizes the top-level `default` account when that default has fresh auth (`homeserver` plus `accessToken`, or `homeserver` plus `userId` and `password`); named accounts can still stay discoverable from `homeserver` plus `userId` when cached credentials satisfy auth later.
If Matrix already has exactly one named account, or `defaultAccount` points at an existing named account key, single-account-to-multi-account repair/setup promotion preserves that account instead of creating a fresh `accounts.default` entry. Only Matrix auth/bootstrap keys move into that promoted account; shared delivery-policy keys stay at the top level.
@@ -953,6 +922,8 @@ Set `defaultAccount` when you want OpenClaw to prefer one named Matrix account f
If you configure multiple named accounts, set `defaultAccount` or pass `--account <id>` for CLI commands that rely on implicit account selection.
Pass `--account <id>` to `openclaw matrix verify ...` and `openclaw matrix devices ...` when you want to override that implicit selection for one command.
See [Configuration reference](/gateway/configuration-reference#multi-account-all-channels) for the shared multi-account pattern.
## Private/LAN homeservers
By default, OpenClaw blocks private/internal Matrix homeservers for SSRF protection unless you
@@ -1034,43 +1005,42 @@ Live directory lookup uses the logged-in Matrix account:
- `password`: password for password-based login. Plaintext values and SecretRef values are supported.
- `deviceId`: explicit Matrix device ID.
- `deviceName`: device display name for password login.
- `avatarUrl`: stored self-avatar URL for profile sync and `set-profile` updates.
- `initialSyncLimit`: startup sync event limit.
- `avatarUrl`: stored self-avatar URL for profile sync and `profile set` updates.
- `initialSyncLimit`: maximum number of events fetched during startup sync.
- `encryption`: enable E2EE.
- `allowlistOnly`: force allowlist-only behavior for DMs and rooms.
- `allowlistOnly`: when `true`, upgrades `open` room policy to `allowlist`, and forces all active DM policies except `disabled` (including `pairing` and `open`) to `allowlist`. Does not affect `disabled` policies.
- `allowBots`: allow messages from other configured OpenClaw Matrix accounts (`true` or `"mentions"`).
- `groupPolicy`: `open`, `allowlist`, or `disabled`.
- `contextVisibility`: supplemental room-context visibility mode (`all`, `allowlist`, `allowlist_quote`).
- `groupAllowFrom`: allowlist of user IDs for room traffic.
- `groupAllowFrom` entries should be full Matrix user IDs. Unresolved names are ignored at runtime.
- `groupAllowFrom`: allowlist of user IDs for room traffic. Entries should be full Matrix user IDs; unresolved names are ignored at runtime.
- `historyLimit`: max room messages to include as group history context. Falls back to `messages.groupChat.historyLimit`; if both are unset, the effective default is `0`. Set `0` to disable.
- `replyToMode`: `off`, `first`, `all`, or `batched`.
- `markdown`: optional Markdown rendering configuration for outbound Matrix text.
- `streaming`: `off` (default), `partial`, `quiet`, `true`, or `false`. `partial` and `true` enable preview-first draft updates with normal Matrix text messages. `quiet` uses non-notifying preview notices for self-hosted push-rule setups.
- `streaming`: `off` (default), `"partial"`, `"quiet"`, `true`, or `false`. `"partial"` and `true` enable preview-first draft updates with normal Matrix text messages. `"quiet"` uses non-notifying preview notices for self-hosted push-rule setups. `false` is equivalent to `"off"`.
- `blockStreaming`: `true` enables separate progress messages for completed assistant blocks while draft preview streaming is active.
- `threadReplies`: `off`, `inbound`, or `always`.
- `threadBindings`: per-channel overrides for thread-bound session routing and lifecycle.
- `startupVerification`: automatic self-verification request mode on startup (`if-unverified`, `off`).
- `startupVerificationCooldownHours`: cooldown before retrying automatic startup verification requests.
- `textChunkLimit`: outbound message chunk size.
- `chunkMode`: `length` or `newline`.
- `responsePrefix`: optional message prefix for outbound replies.
- `textChunkLimit`: outbound message chunk size in characters (applies when `chunkMode` is `length`).
- `chunkMode`: `length` splits messages by character count; `newline` splits at line boundaries.
- `responsePrefix`: optional string prepended to all outbound replies for this channel.
- `ackReaction`: optional ack reaction override for this channel/account.
- `ackReactionScope`: optional ack reaction scope override (`group-mentions`, `group-all`, `direct`, `all`, `none`, `off`).
- `reactionNotifications`: inbound reaction notification mode (`own`, `off`).
- `mediaMaxMb`: media size cap in MB for Matrix media handling. It applies to outbound sends and inbound media processing.
- `autoJoin`: invite auto-join policy (`always`, `allowlist`, `off`). Default: `off`. This applies to Matrix invites in general, including DM-style invites, not only room/group invites. OpenClaw makes this decision at invite time, before it can reliably classify the joined room as a DM or a group.
- `mediaMaxMb`: media size cap in MB for outbound sends and inbound media processing.
- `autoJoin`: invite auto-join policy (`always`, `allowlist`, `off`). Default: `off`. Applies to all Matrix invites, including DM-style invites.
- `autoJoinAllowlist`: rooms/aliases allowed when `autoJoin` is `allowlist`. Alias entries are resolved to room IDs during invite handling; OpenClaw does not trust alias state claimed by the invited room.
- `dm`: DM policy block (`enabled`, `policy`, `allowFrom`, `sessionScope`, `threadReplies`).
- `dm.policy`: controls DM access after OpenClaw has joined the room and classified it as a DM. It does not change whether an invite is auto-joined.
- `dm.allowFrom` entries should be full Matrix user IDs unless you already resolved them through live directory lookup.
- `dm.allowFrom`: entries should be full Matrix user IDs unless you already resolved them through live directory lookup.
- `dm.sessionScope`: `per-user` (default) or `per-room`. Use `per-room` when you want each Matrix DM room to keep separate context even if the peer is the same.
- `dm.threadReplies`: DM-only thread policy override (`off`, `inbound`, `always`). It overrides the top-level `threadReplies` setting for both reply placement and session isolation in DMs.
- `execApprovals`: Matrix-native exec approval delivery (`enabled`, `approvers`, `target`, `agentFilter`, `sessionFilter`).
- `execApprovals.approvers`: Matrix user IDs allowed to approve exec requests. Optional when `dm.allowFrom` already identifies the approvers.
- `execApprovals.target`: `dm | channel | both` (default: `dm`).
- `accounts`: named per-account overrides. Top-level `channels.matrix` values act as defaults for these entries.
- `groups`: per-room policy map. Prefer room IDs or aliases; unresolved room names are ignored at runtime. Session/group identity uses the stable room ID after resolution, while human-readable labels still come from room names.
- `groups`: per-room policy map. Prefer room IDs or aliases; unresolved room names are ignored at runtime. Session/group identity uses the stable room ID after resolution.
- `groups.<room>.account`: restrict one inherited room entry to a specific Matrix account in multi-account setups.
- `groups.<room>.allowBots`: room-level override for configured-bot senders (`true` or `"mentions"`).
- `groups.<room>.users`: per-room sender allowlist.

View File

@@ -75,10 +75,13 @@ self-check, and writes a Markdown report under `.artifacts/qa-e2e/`.
Private debugger UI:
```bash
pnpm qa:lab:build
pnpm openclaw qa ui
pnpm qa:lab:up
```
That one command builds the QA site, starts the Docker-backed gateway + QA Lab
stack, and prints the QA Lab URL. From that site you can pick scenarios, choose
the model lane, launch individual runs, and watch results live.
Full repo-backed QA suite:
```bash
@@ -96,10 +99,10 @@ Current scope is intentionally narrow:
- threaded routing grammar
- channel-owned message actions
- Markdown reporting
- Docker-backed QA site with run controls
Follow-up work will add:
- Dockerized OpenClaw orchestration
- provider/model matrix execution
- richer scenario discovery
- OpenClaw-native orchestration later

View File

@@ -399,7 +399,7 @@ Current Slack message actions include `send`, `upload-file`, `download-file`, `r
- explicit app mention (`<@botId>`)
- mention regex patterns (`agents.list[].groupChat.mentionPatterns`, fallback `messages.groupChat.mentionPatterns`)
- implicit reply-to-bot thread behavior
- implicit reply-to-bot thread behavior (disabled when `thread.requireExplicitMention` is `true`)
Per-channel controls (`channels.slack.channels.<id>`; names only via startup resolution or `dangerouslyAllowNameMatching`):
@@ -423,6 +423,7 @@ Current Slack message actions include `send`, `upload-file`, `download-file`, `r
- Thread replies can create thread session suffixes (`:thread:<threadTs>`) when applicable.
- `channels.slack.thread.historyScope` default is `thread`; `thread.inheritParent` default is `false`.
- `channels.slack.thread.initialHistoryLimit` controls how many existing thread messages are fetched when a new thread session starts (default `20`; set `0` to disable).
- `channels.slack.thread.requireExplicitMention` (default `false`): when `true`, suppress implicit thread mentions so the bot only responds to explicit `@bot` mentions inside threads, even when the bot already participated in the thread. Without this, replies in a bot-participated thread bypass `requireMention` gating.
Reply threading controls:
@@ -462,9 +463,11 @@ Notes:
- `block`: append chunked preview updates.
- `progress`: show progress status text while generating, then send final text.
`channels.slack.nativeStreaming` controls Slack native text streaming when `streaming` is `partial` (default: `true`).
`channels.slack.streaming.nativeTransport` controls Slack native text streaming when `channels.slack.streaming.mode` is `partial` (default: `true`).
- A reply thread must be available for native text streaming to appear. Thread selection still follows `replyToMode`. Without one, the normal draft preview is used.
- A reply thread must be available for native text streaming and Slack assistant thread status to appear. Thread selection still follows `replyToMode`.
- Channel and group-chat roots can still use the normal draft preview when native streaming is unavailable.
- Top-level Slack DMs stay off-thread by default, so they do not show the thread-style preview; use thread replies or `typingReaction` if you want visible progress there.
- Media and non-text payloads fall back to normal delivery.
- If streaming fails mid-reply, OpenClaw falls back to normal delivery for remaining payloads.
@@ -474,8 +477,10 @@ Use draft preview instead of Slack native text streaming:
{
channels: {
slack: {
streaming: "partial",
nativeStreaming: false,
streaming: {
mode: "partial",
nativeTransport: false,
},
},
},
}
@@ -483,8 +488,9 @@ Use draft preview instead of Slack native text streaming:
Legacy keys:
- `channels.slack.streamMode` (`replace | status_final | append`) is auto-migrated to `channels.slack.streaming`.
- boolean `channels.slack.streaming` is auto-migrated to `channels.slack.nativeStreaming`.
- `channels.slack.streamMode` (`replace | status_final | append`) is auto-migrated to `channels.slack.streaming.mode`.
- boolean `channels.slack.streaming` is auto-migrated to `channels.slack.streaming.mode` and `channels.slack.streaming.nativeTransport`.
- legacy `channels.slack.nativeStreaming` is auto-migrated to `channels.slack.streaming.nativeTransport`.
## Typing reaction fallback
@@ -686,7 +692,7 @@ Primary reference:
- compatibility toggle: `dangerouslyAllowNameMatching` (break-glass; keep off unless needed)
- channel access: `groupPolicy`, `channels.*`, `channels.*.users`, `channels.*.requireMention`
- threading/history: `replyToMode`, `replyToModeByChatType`, `thread.*`, `historyLimit`, `dmHistoryLimit`, `dms.*.historyLimit`
- delivery: `textChunkLimit`, `chunkMode`, `mediaMaxMb`, `streaming`, `nativeStreaming`
- delivery: `textChunkLimit`, `chunkMode`, `mediaMaxMb`, `streaming`, `streaming.nativeTransport`
- ops/features: `configWrites`, `commands.native`, `slashCommand.*`, `actions.*`, `userToken`, `userTokenReadOnly`
## Troubleshooting

View File

@@ -124,6 +124,7 @@ Example:
- `channels.zalouser.groups.<group>.requireMention` controls whether group replies require a mention.
- Resolution order: exact group id/name -> normalized group slug -> `*` -> default (`true`).
- This applies both to allowlisted groups and open group mode.
- Quoting a bot message counts as an implicit mention for group activation.
- Authorized control commands (for example `/new`) can bypass mention gating.
- When a group message is skipped because mention is required, OpenClaw stores it as pending group history and includes it on the next processed group message.
- Group history limit defaults to `messages.groupChat.historyLimit` (fallback `50`). You can override per account with `channels.zalouser.historyLimit`.

View File

@@ -35,7 +35,9 @@ This page describes the current CLI behavior. If commands change, update this do
- [`logs`](/cli/logs)
- [`system`](/cli/system)
- [`models`](/cli/models)
- [`infer`](/cli/infer)
- [`memory`](/cli/memory)
- [`wiki`](/cli/wiki)
- [`directory`](/cli/directory)
- [`nodes`](/cli/nodes)
- [`devices`](/cli/devices)
@@ -161,6 +163,19 @@ openclaw [--dev] [--profile <name>] <command>
status
index
search
wiki
status
doctor
init
ingest
compile
lint
search
get
apply
bridge import
unsafe-local import
obsidian status|search|open|command|daily
message
send
broadcast
@@ -248,6 +263,16 @@ openclaw [--dev] [--profile <name>] <command>
fallbacks list|add|remove|clear
image-fallbacks list|add|remove|clear
scan
infer (alias: capability)
list
inspect
model run|list|inspect|providers|auth login|logout|status
image generate|edit|describe|describe-many|providers
audio transcribe|providers
tts convert|voices|providers|status|enable|disable|set-provider
video generate|describe|providers
web search|fetch|providers
embedding create|providers
auth add|login|login-github-copilot|setup-token|paste-token
auth order get|set|clear
sandbox

280
docs/cli/infer.md Normal file
View File

@@ -0,0 +1,280 @@
---
summary: "Infer-first CLI for provider-backed model, image, audio, TTS, video, web, and embedding workflows"
read_when:
- Adding or modifying `openclaw infer` commands
- Designing stable headless capability automation
title: "Inference CLI"
---
# Inference CLI
`openclaw infer` is the canonical headless surface for provider-backed inference workflows.
It intentionally exposes capability families, not raw gateway RPC names and not raw agent tool ids.
## Turn infer into a skill
Copy and paste this to an agent:
```text
Read https://docs.openclaw.ai/cli/infer, then create a skill that routes my common workflows to `openclaw infer`.
Focus on model runs, image generation, video generation, audio transcription, TTS, web search, and embeddings.
```
A good infer-based skill should:
- map common user intents to the correct infer subcommand
- include a few canonical infer examples for the workflows it covers
- prefer `openclaw infer ...` in examples and suggestions
- avoid re-documenting the entire infer surface inside the skill body
Typical infer-focused skill coverage:
- `openclaw infer model run`
- `openclaw infer image generate`
- `openclaw infer audio transcribe`
- `openclaw infer tts convert`
- `openclaw infer web search`
- `openclaw infer embedding create`
## Why use infer
`openclaw infer` provides one consistent CLI for provider-backed inference tasks inside OpenClaw.
Benefits:
- Use the providers and models already configured in OpenClaw instead of wiring up one-off wrappers for each backend.
- Keep model, image, audio transcription, TTS, video, web, and embedding workflows under one command tree.
- Use a stable `--json` output shape for scripts, automation, and agent-driven workflows.
- Prefer a first-party OpenClaw surface when the task is fundamentally "run inference."
- Use the normal local path without requiring the gateway for most infer commands.
## Command tree
```text
openclaw infer
list
inspect
model
run
list
inspect
providers
auth login
auth logout
auth status
image
generate
edit
describe
describe-many
providers
audio
transcribe
providers
tts
convert
voices
providers
status
enable
disable
set-provider
video
generate
describe
providers
web
search
fetch
providers
embedding
create
providers
```
## Common tasks
This table maps common inference tasks to the corresponding infer command.
| Task | Command | Notes |
| ----------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------- |
| Run a text/model prompt | `openclaw infer model run --prompt "..." --json` | Uses the normal local path by default |
| Generate an image | `openclaw infer image generate --prompt "..." --json` | Use `image edit` when starting from an existing file |
| Describe an image file | `openclaw infer image describe --file ./image.png --json` | `--model` must be `<provider/model>` |
| Transcribe audio | `openclaw infer audio transcribe --file ./memo.m4a --json` | `--model` must be `<provider/model>` |
| Synthesize speech | `openclaw infer tts convert --text "..." --output ./speech.mp3 --json` | `tts status` is gateway-oriented |
| Generate a video | `openclaw infer video generate --prompt "..." --json` | |
| Describe a video file | `openclaw infer video describe --file ./clip.mp4 --json` | `--model` must be `<provider/model>` |
| Search the web | `openclaw infer web search --query "..." --json` | |
| Fetch a web page | `openclaw infer web fetch --url https://example.com --json` | |
| Create embeddings | `openclaw infer embedding create --text "..." --json` | |
## Behavior
- `openclaw infer ...` is the primary CLI surface for these workflows.
- Use `--json` when the output will be consumed by another command or script.
- Use `--provider` or `--model provider/model` when a specific backend is required.
- For `image describe`, `audio transcribe`, and `video describe`, `--model` must use the form `<provider/model>`.
- Stateless execution commands default to local.
- Gateway-managed state commands default to gateway.
- The normal local path does not require the gateway to be running.
## Model
Use `model` for provider-backed text inference and model/provider inspection.
```bash
openclaw infer model run --prompt "Reply with exactly: smoke-ok" --json
openclaw infer model run --prompt "Summarize this changelog entry" --provider openai --json
openclaw infer model providers --json
openclaw infer model inspect --name gpt-5.4 --json
```
Notes:
- `model run` reuses the agent runtime so provider/model overrides behave like normal agent execution.
- `model auth login`, `model auth logout`, and `model auth status` manage saved provider auth state.
## Image
Use `image` for generation, edit, and description.
```bash
openclaw infer image generate --prompt "friendly lobster illustration" --json
openclaw infer image generate --prompt "cinematic product photo of headphones" --json
openclaw infer image describe --file ./photo.jpg --json
openclaw infer image describe --file ./ui-screenshot.png --model openai/gpt-4.1-mini --json
```
Notes:
- Use `image edit` when starting from existing input files.
- For `image describe`, `--model` must be `<provider/model>`.
## Audio
Use `audio` for file transcription.
```bash
openclaw infer audio transcribe --file ./memo.m4a --json
openclaw infer audio transcribe --file ./team-sync.m4a --language en --prompt "Focus on names and action items" --json
openclaw infer audio transcribe --file ./memo.m4a --model openai/whisper-1 --json
```
Notes:
- `audio transcribe` is for file transcription, not realtime session management.
- `--model` must be `<provider/model>`.
## TTS
Use `tts` for speech synthesis and TTS provider state.
```bash
openclaw infer tts convert --text "hello from openclaw" --output ./hello.mp3 --json
openclaw infer tts convert --text "Your build is complete" --output ./build-complete.mp3 --json
openclaw infer tts providers --json
openclaw infer tts status --json
```
Notes:
- `tts status` defaults to gateway because it reflects gateway-managed TTS state.
- Use `tts providers`, `tts voices`, and `tts set-provider` to inspect and configure TTS behavior.
## Video
Use `video` for generation and description.
```bash
openclaw infer video generate --prompt "cinematic sunset over the ocean" --json
openclaw infer video generate --prompt "slow drone shot over a forest lake" --json
openclaw infer video describe --file ./clip.mp4 --json
openclaw infer video describe --file ./clip.mp4 --model openai/gpt-4.1-mini --json
```
Notes:
- `--model` must be `<provider/model>` for `video describe`.
## Web
Use `web` for search and fetch workflows.
```bash
openclaw infer web search --query "OpenClaw docs" --json
openclaw infer web search --query "OpenClaw infer web providers" --json
openclaw infer web fetch --url https://docs.openclaw.ai/cli/infer --json
openclaw infer web providers --json
```
Notes:
- Use `web providers` to inspect available, configured, and selected providers.
## Embedding
Use `embedding` for vector creation and embedding provider inspection.
```bash
openclaw infer embedding create --text "friendly lobster" --json
openclaw infer embedding create --text "customer support ticket: delayed shipment" --model openai/text-embedding-3-large --json
openclaw infer embedding providers --json
```
## JSON output
Infer commands normalize JSON output under a shared envelope:
```json
{
"ok": true,
"capability": "image.generate",
"transport": "local",
"provider": "openai",
"model": "gpt-image-1",
"attempts": [],
"outputs": []
}
```
Top-level fields are stable:
- `ok`
- `capability`
- `transport`
- `provider`
- `model`
- `attempts`
- `outputs`
- `error`
## Common pitfalls
```bash
# Bad
openclaw infer media image generate --prompt "friendly lobster"
# Good
openclaw infer image generate --prompt "friendly lobster"
```
```bash
# Bad
openclaw infer audio transcribe --file ./memo.m4a --model whisper-1 --json
# Good
openclaw infer audio transcribe --file ./memo.m4a --model openai/whisper-1 --json
```
## Notes
- `openclaw capability ...` is an alias for `openclaw infer ...`.

View File

@@ -15,6 +15,8 @@ Provided by the active memory plugin (default: `memory-core`; set `plugins.slots
Related:
- Memory concept: [Memory](/concepts/memory)
- Memory wiki: [Memory Wiki](/plugins/memory-wiki)
- Wiki CLI: [wiki](/cli/wiki)
- Plugins: [Plugins](/tools/plugin)
## Examples

View File

@@ -115,7 +115,7 @@ Interactive onboarding behavior with reference mode:
Non-interactive Z.AI endpoint choices:
Note: `--auth-choice zai-api-key` now auto-detects the best Z.AI endpoint for your key (prefers the general API with `zai/glm-5`).
Note: `--auth-choice zai-api-key` now auto-detects the best Z.AI endpoint for your key (prefers the general API with `zai/glm-5.1`).
If you specifically want the GLM Coding Plan endpoints, pick `zai-coding-global` or `zai-coding-cn`.
```bash

214
docs/cli/wiki.md Normal file
View File

@@ -0,0 +1,214 @@
---
summary: "CLI reference for `openclaw wiki` (memory-wiki vault status, search, compile, lint, apply, bridge, and Obsidian helpers)"
read_when:
- You want to use the memory-wiki CLI
- You are documenting or changing `openclaw wiki`
title: "wiki"
---
# `openclaw wiki`
Inspect and maintain the `memory-wiki` vault.
Provided by the bundled `memory-wiki` plugin.
Related:
- [Memory Wiki plugin](/plugins/memory-wiki)
- [Memory Overview](/concepts/memory)
- [CLI: memory](/cli/memory)
## What it is for
Use `openclaw wiki` when you want a compiled knowledge vault with:
- wiki-native search and page reads
- provenance-rich syntheses
- contradiction and freshness reports
- bridge imports from the active memory plugin
- optional Obsidian CLI helpers
## Common commands
```bash
openclaw wiki status
openclaw wiki doctor
openclaw wiki init
openclaw wiki ingest ./notes/alpha.md
openclaw wiki compile
openclaw wiki lint
openclaw wiki search "alpha"
openclaw wiki get entity.alpha --from 1 --lines 80
openclaw wiki apply synthesis "Alpha Summary" \
--body "Short synthesis body" \
--source-id source.alpha
openclaw wiki apply metadata entity.alpha \
--source-id source.alpha \
--status review \
--question "Still active?"
openclaw wiki bridge import
openclaw wiki unsafe-local import
openclaw wiki obsidian status
openclaw wiki obsidian search "alpha"
openclaw wiki obsidian open syntheses/alpha-summary.md
openclaw wiki obsidian command workspace:quick-switcher
openclaw wiki obsidian daily
```
## Commands
### `wiki status`
Inspect current vault mode, health, and Obsidian CLI availability.
Use this first when you are unsure whether the vault is initialized, bridge mode
is healthy, or Obsidian integration is available.
### `wiki doctor`
Run wiki health checks and surface configuration or vault problems.
Typical issues include:
- bridge mode enabled without public memory artifacts
- invalid or missing vault layout
- missing external Obsidian CLI when Obsidian mode is expected
### `wiki init`
Create the wiki vault layout and starter pages.
This initializes the root structure, including top-level indexes and cache
directories.
### `wiki ingest <path-or-url>`
Import content into the wiki source layer.
Notes:
- URL ingest is controlled by `ingest.allowUrlIngest`
- imported source pages keep provenance in frontmatter
- auto-compile can run after ingest when enabled
### `wiki compile`
Rebuild indexes, related blocks, dashboards, and compiled digests.
This writes stable machine-facing artifacts under:
- `.openclaw-wiki/cache/agent-digest.json`
- `.openclaw-wiki/cache/claims.jsonl`
If `render.createDashboards` is enabled, compile also refreshes report pages.
### `wiki lint`
Lint the vault and report:
- structural issues
- provenance gaps
- contradictions
- open questions
- low-confidence pages/claims
- stale pages/claims
Run this after meaningful wiki updates.
### `wiki search <query>`
Search wiki content.
Behavior depends on config:
- `search.backend`: `shared` or `local`
- `search.corpus`: `wiki`, `memory`, or `all`
Use `wiki search` when you want wiki-specific ranking or provenance details.
For one broad shared recall pass, prefer `openclaw memory search` when the
active memory plugin exposes shared search.
### `wiki get <lookup>`
Read a wiki page by id or relative path.
Examples:
```bash
openclaw wiki get entity.alpha
openclaw wiki get syntheses/alpha-summary.md --from 1 --lines 80
```
### `wiki apply`
Apply narrow mutations without freeform page surgery.
Supported flows include:
- create/update a synthesis page
- update page metadata
- attach source ids
- add questions
- add contradictions
- update confidence/status
- write structured claims
This command exists so the wiki can evolve safely without manually editing
managed blocks.
### `wiki bridge import`
Import public memory artifacts from the active memory plugin into bridge-backed
source pages.
Use this in `bridge` mode when you want the latest exported memory artifacts
pulled into the wiki vault.
### `wiki unsafe-local import`
Import from explicitly configured local paths in `unsafe-local` mode.
This is intentionally experimental and same-machine only.
### `wiki obsidian ...`
Obsidian helper commands for vaults running in Obsidian-friendly mode.
Subcommands:
- `status`
- `search`
- `open`
- `command`
- `daily`
These require the official `obsidian` CLI on `PATH` when
`obsidian.useOfficialCli` is enabled.
## Practical usage guidance
- Use `wiki search` + `wiki get` when provenance and page identity matter.
- Use `wiki apply` instead of hand-editing managed generated sections.
- Use `wiki lint` before trusting contradictory or low-confidence content.
- Use `wiki compile` after bulk imports or source changes when you want fresh
dashboards and compiled digests immediately.
- Use `wiki bridge import` when bridge mode depends on newly exported memory
artifacts.
## Configuration tie-ins
`openclaw wiki` behavior is shaped by:
- `plugins.entries.memory-wiki.config.vaultMode`
- `plugins.entries.memory-wiki.config.search.backend`
- `plugins.entries.memory-wiki.config.search.corpus`
- `plugins.entries.memory-wiki.config.bridge.*`
- `plugins.entries.memory-wiki.config.obsidian.*`
- `plugins.entries.memory-wiki.config.render.*`
- `plugins.entries.memory-wiki.config.context.includeCompiledDigestPrompt`
See [Memory Wiki plugin](/plugins/memory-wiki) for the full config model.

View File

@@ -151,6 +151,7 @@ See [Plugin hooks](/plugins/architecture#provider-runtime-hooks) for the hook AP
- `agent.wait` default: 30s (just the wait). `timeoutMs` param overrides.
- Agent runtime: `agents.defaults.timeoutSeconds` default 172800s (48 hours); enforced in `runEmbeddedPiAgent` abort timer.
- LLM idle timeout: `agents.defaults.llm.idleTimeoutSeconds` aborts a model request when no response chunks arrive before the idle window. Set it explicitly for slow local models or reasoning/tool-call providers; set it to 0 to disable. If it is not set, OpenClaw uses `agents.defaults.timeoutSeconds` when configured, otherwise 60s. Cron-triggered runs with no explicit LLM or agent timeout disable the idle watchdog and rely on the cron outer timeout.
## Where things can end early

View File

@@ -41,6 +41,71 @@ Before compacting, OpenClaw automatically reminds the agent to save important
notes to [memory](/concepts/memory) files. This prevents context loss.
</Info>
Use the `agents.defaults.compaction` setting in your `openclaw.json` to configure compaction behavior (mode, target tokens, etc.).
Compaction summarization preserves opaque identifiers by default (`identifierPolicy: "strict"`). You can override this with `identifierPolicy: "off"` or provide custom text with `identifierPolicy: "custom"` and `identifierInstructions`.
You can optionally specify a different model for compaction summarization via `agents.defaults.compaction.model`. This is useful when your primary model is a local or small model and you want compaction summaries produced by a more capable model. The override accepts any `provider/model-id` string:
```json
{
"agents": {
"defaults": {
"compaction": {
"model": "openrouter/anthropic/claude-sonnet-4-6"
}
}
}
}
```
This also works with local models, for example a second Ollama model dedicated to summarization or a fine-tuned compaction specialist:
```json
{
"agents": {
"defaults": {
"compaction": {
"model": "ollama/llama3.1:8b"
}
}
}
}
```
When unset, compaction uses the agents primary model.
## Pluggable compaction providers
Plugins can register a custom compaction provider via `registerCompactionProvider()` on the plugin API. When a provider is registered and configured, OpenClaw delegates summarization to it instead of the built-in LLM pipeline.
To use a registered provider, set the provider id in your config:
```json
{
"agents": {
"defaults": {
"compaction": {
"provider": "my-provider"
}
}
}
}
```
Setting a `provider` automatically forces `mode: "safeguard"`. Providers receive the same compaction instructions and identifier-preservation policy as the built-in path, and OpenClaw still preserves recent-turn and split-turn suffix context after provider output. If the provider fails or returns an empty result, OpenClaw falls back to built-in LLM summarization.
## Auto-compaction (default on)
When a session nears or exceeds the models context window, OpenClaw triggers auto-compaction and may retry the original request using the compacted context.
Youll see:
- `🧹 Auto-compaction complete` in verbose mode
- `/status` showing `🧹 Compactions: <count>`
Before compaction, OpenClaw can run a **silent memory flush** turn to store
durable notes to disk. See [Memory](/concepts/memory) for details and config.
## Manual compaction
Type `/compact` in any chat to force a compaction. Add instructions to guide

View File

@@ -115,6 +115,8 @@ engine is used automatically.
A plugin can register a context engine using the plugin API:
```ts
import { buildMemorySystemPromptAddition } from "openclaw/plugin-sdk/core";
export default function register(api) {
api.registerContextEngine("my-engine", () => ({
info: {
@@ -128,12 +130,15 @@ export default function register(api) {
return { ingested: true };
},
async assemble({ sessionId, messages, tokenBudget }) {
async assemble({ sessionId, messages, tokenBudget, availableTools, citationsMode }) {
// Return messages that fit the budget
return {
messages: buildContext(messages, tokenBudget),
estimatedTokens: countTokens(messages),
systemPromptAddition: "Use lcm_grep to search history...",
systemPromptAddition: buildMemorySystemPromptAddition({
availableTools: availableTools ?? new Set(),
citationsMode,
}),
};
},
@@ -248,7 +253,13 @@ OpenClaw resolves when it needs a context engine.
- **Memory plugins** (`plugins.slots.memory`) are separate from context engines.
Memory plugins provide search/retrieval; context engines control what the
model sees. They can work together — a context engine might use memory
plugin data during assembly.
plugin data during assembly. Plugin engines that want the active memory
prompt path should prefer `buildMemorySystemPromptAddition(...)` from
`openclaw/plugin-sdk/core`, which converts the active memory prompt sections
into a ready-to-prepend `systemPromptAddition`. If an engine needs lower-level
control, it can still pull raw lines from
`openclaw/plugin-sdk/memory-host-core` via
`buildActiveMemoryPromptSection(...)`.
- **Session pruning** (trimming old tool results in-memory) still runs
regardless of which context engine is active.

View File

@@ -42,7 +42,7 @@ These phases are internal implementation details, not separate user-configured
Light phase ingests recent daily memory signals and recall traces, dedupes them,
and stages candidate lines.
- Reads from short-term recall state and recent daily memory files.
- Reads from short-term recall state, recent daily memory files, and redacted session transcripts when available.
- Writes a managed `## Light Sleep` block when storage includes inline output.
- Records reinforcement signals for later deep ranking.
- Never writes to `MEMORY.md`.
@@ -66,6 +66,13 @@ REM phase extracts patterns and reflective signals.
- Records REM reinforcement signals used by deep ranking.
- Never writes to `MEMORY.md`.
## Session transcript ingestion
Dreaming can ingest redacted session transcripts into the dreaming corpus. When
transcripts are available, they are fed into the light phase alongside daily
memory signals and recall traces. Personal and sensitive content is redacted
before ingestion.
## Dream Diary
Dreaming also keeps a narrative **Dream Diary** in `DREAMS.md`.

View File

@@ -40,6 +40,26 @@ The agent has two tools for working with memory:
Both tools are provided by the active memory plugin (default: `memory-core`).
## Memory Wiki companion plugin
If you want durable memory to behave more like a maintained knowledge base than
just raw notes, use the bundled `memory-wiki` plugin.
`memory-wiki` compiles durable knowledge into a wiki vault with:
- deterministic page structure
- structured claims and evidence
- contradiction and freshness tracking
- generated dashboards
- compiled digests for agent/runtime consumers
- wiki-native tools like `wiki_search`, `wiki_get`, `wiki_apply`, and `wiki_lint`
It does not replace the active memory plugin. The active memory plugin still
owns recall, promotion, and dreaming. `memory-wiki` adds a provenance-rich
knowledge layer beside it.
See [Memory Wiki](/plugins/memory-wiki).
## Memory search
When an embedding provider is configured, `memory_search` uses **hybrid
@@ -73,6 +93,15 @@ multi-agent awareness. Plugin install.
</Card>
</CardGroup>
## Knowledge wiki layer
<CardGroup cols={1}>
<Card title="Memory Wiki" icon="book" href="/plugins/memory-wiki">
Compiles durable memory into a provenance-rich wiki vault with claims,
dashboards, bridge mode, and Obsidian-friendly workflows.
</Card>
</CardGroup>
## Automatic memory flush
Before [compaction](/concepts/compaction) summarizes your conversation, OpenClaw
@@ -117,6 +146,7 @@ openclaw memory index --force # Rebuild the index
- [Builtin Memory Engine](/concepts/memory-builtin) -- default SQLite backend
- [QMD Memory Engine](/concepts/memory-qmd) -- advanced local-first sidecar
- [Honcho Memory](/concepts/memory-honcho) -- AI-native cross-session memory
- [Memory Wiki](/plugins/memory-wiki) -- compiled knowledge vault and wiki-native tools
- [Memory Search](/concepts/memory-search) -- search pipeline, providers, and
tuning
- [Dreaming (experimental)](/concepts/dreaming) -- background promotion

View File

@@ -23,10 +23,11 @@ For model selection rules, see [/concepts/models](/concepts/models).
- Provider plugins can inject model catalogs via `registerProvider({ catalog })`;
OpenClaw merges that output into `models.providers` before writing
`models.json`.
- Provider manifests can declare `providerAuthEnvVars` so generic env-based
auth probes do not need to load plugin runtime. The remaining core env-var
map is now just for non-plugin/core providers and a few generic-precedence
cases such as Anthropic API-key-first onboarding.
- Provider manifests can declare `providerAuthEnvVars` and
`providerAuthAliases` so generic env-based auth probes and provider variants
do not need to load plugin runtime. The remaining core env-var map is now
just for non-plugin/core providers and a few generic-precedence cases such
as Anthropic API-key-first onboarding.
- Provider plugins can also own provider runtime behavior via
`normalizeModelId`, `normalizeTransport`, `normalizeConfig`,
`applyNativeStreamingUsageCompat`, `resolveConfigApiKey`,
@@ -360,7 +361,7 @@ OpenClaw ships with the piai catalog. These providers require **no**
- or `npm install -g @google/gemini-cli`
- Enable: `openclaw plugins enable google`
- Login: `openclaw models auth login --provider google-gemini-cli --set-default`
- Default model: `google-gemini-cli/gemini-3.1-pro-preview`
- Default model: `google-gemini-cli/gemini-3-flash-preview`
- Note: you do **not** paste a client id or secret into `openclaw.json`. The CLI login flow stores
tokens in auth profiles on the gateway host.
- If requests fail after login, set `GOOGLE_CLOUD_PROJECT` or `GOOGLE_CLOUD_PROJECT_ID` on the gateway host.
@@ -371,7 +372,7 @@ OpenClaw ships with the piai catalog. These providers require **no**
- Provider: `zai`
- Auth: `ZAI_API_KEY`
- Example model: `zai/glm-5`
- Example model: `zai/glm-5.1`
- CLI: `openclaw onboard --auth-choice zai-api-key`
- Aliases: `z.ai/*` and `z-ai/*` normalize to `zai/*`
- `zai-api-key` auto-detects the matching Z.AI endpoint; `zai-coding-global`, `zai-coding-cn`, `zai-global`, and `zai-cn` force a specific surface

View File

@@ -21,20 +21,43 @@ Current pieces:
- `qa/`: repo-backed seed assets for the kickoff task and baseline QA
scenarios.
The long-term goal is a two-pane QA site:
The current QA operator flow is a two-pane QA site:
- Left: Gateway dashboard (Control UI) with the agent.
- Right: QA Lab, showing the Slack-ish transcript and scenario plan.
That lets an operator or automation loop give the agent a QA mission, observe
real channel behavior, and record what worked, failed, or stayed blocked.
Run it with:
```bash
pnpm qa:lab:up
```
That builds the QA site, starts the Docker-backed gateway lane, and exposes the
QA Lab page where an operator or automation loop can give the agent a QA
mission, observe real channel behavior, and record what worked, failed, or
stayed blocked.
For faster QA Lab UI iteration without rebuilding the Docker image each time,
start the stack with a bind-mounted QA Lab bundle:
```bash
pnpm openclaw qa docker-build-image
pnpm qa:lab:build
pnpm qa:lab:up:fast
pnpm qa:lab:watch
```
`qa:lab:up:fast` keeps the Docker services on a prebuilt image and bind-mounts
`extensions/qa-lab/web/dist` into the `qa-lab` container. `qa:lab:watch`
rebuilds that bundle on change, and the browser auto-reloads when the QA Lab
asset hash changes.
## Repo-backed seeds
Seed assets live in `qa/`:
- `qa/QA_KICKOFF_TASK.md`
- `qa/seed-scenarios.json`
- `qa/scenarios/index.md`
- `qa/scenarios/*.md`
These are intentionally in git so the QA plan is visible to both humans and the
agent. The baseline list should stay broad enough to cover:
@@ -59,6 +82,56 @@ The report should answer:
- What stayed blocked
- What follow-up scenarios are worth adding
For character and style checks, run the same scenario across multiple live model
refs and write a judged Markdown report:
```bash
pnpm openclaw qa character-eval \
--model openai/gpt-5.4,thinking=xhigh \
--model openai/gpt-5.2,thinking=xhigh \
--model anthropic/claude-opus-4-6,thinking=high \
--model anthropic/claude-sonnet-4-6,thinking=high \
--model minimax/MiniMax-M2.7,thinking=high \
--model zai/glm-5.1,thinking=high \
--model moonshot/kimi-k2.5,thinking=high \
--model qwen/qwen3.6-plus,thinking=high \
--model xiaomi/mimo-v2-pro,thinking=high \
--model google/gemini-3.1-pro-preview,thinking=high \
--judge-model openai/gpt-5.4,thinking=xhigh,fast \
--judge-model anthropic/claude-opus-4-6,thinking=high \
--concurrency 8 \
--judge-concurrency 8
```
The command runs local QA gateway child processes, not Docker. Character eval
scenarios should set the persona through `SOUL.md`, then run ordinary user turns
such as chat, workspace help, and small file tasks. The candidate model should
not be told that it is being evaluated. The command preserves each full
transcript, records basic run stats, then asks the judge models in fast mode with
`xhigh` reasoning to rank the runs by naturalness, vibe, and humor.
Candidate runs default to `high` thinking, with `xhigh` for OpenAI models that
support it. Override a specific candidate inline with
`--model provider/model,thinking=<level>`. `--thinking <level>` still sets a
global fallback, and the older `--model-thinking <provider/model=level>` form is
kept for compatibility.
OpenAI candidate refs default to fast mode so priority processing is used where
the provider supports it. Add `,fast`, `,no-fast`, or `,fast=false` inline when a
single candidate or judge needs an override. Pass `--fast` only when you want to
force fast mode on for every candidate model. Candidate and judge durations are
recorded in the report for benchmark analysis, but judge prompts explicitly say
not to rank by speed.
Candidate and judge model runs both default to concurrency 8. Lower
`--concurrency` or `--judge-concurrency` when provider limits or local gateway
pressure make a run too noisy.
When no candidate `--model` is passed, the character eval defaults to
`openai/gpt-5.4`, `openai/gpt-5.2`, `anthropic/claude-opus-4-6`,
`anthropic/claude-sonnet-4-6`, `minimax/MiniMax-M2.7`, `zai/glm-5.1`,
`moonshot/kimi-k2.5`, `qwen/qwen3.6-plus`, `xiaomi/mimo-v2-pro`, and
`google/gemini-3.1-pro-preview`.
When no `--judge-model` is passed, the judges default to
`openai/gpt-5.4,thinking=xhigh,fast` and
`anthropic/claude-opus-4-6,thinking=high`.
## Related docs
- [Testing](/help/testing)

View File

@@ -126,13 +126,14 @@ Modes:
Slack-only:
- `channels.slack.nativeStreaming` toggles Slack native streaming API calls when `streaming=partial` (default: `true`).
- `channels.slack.streaming.nativeTransport` toggles Slack native streaming API calls when `channels.slack.streaming.mode="partial"` (default: `true`).
- Slack native streaming and Slack assistant thread status require a reply thread target; top-level DMs do not show that thread-style preview.
Legacy key migration:
- Telegram: `streamMode` + boolean `streaming` auto-migrate to `streaming` enum.
- Discord: `streamMode` + boolean `streaming` auto-migrate to `streaming` enum.
- Slack: `streamMode` auto-migrates to `streaming` enum; boolean `streaming` auto-migrates to `nativeStreaming`.
- Slack: `streamMode` auto-migrates to `streaming.mode`; boolean `streaming` auto-migrates to `streaming.mode` plus `streaming.nativeTransport`; legacy `nativeStreaming` auto-migrates to `streaming.nativeTransport`.
### Runtime behavior

View File

@@ -43,7 +43,7 @@ The prompt is intentionally compact and uses fixed sections:
- **Sandbox** (when enabled): indicates sandboxed runtime, sandbox paths, and whether elevated exec is available.
- **Current Date & Time**: user-local time, timezone, and time format.
- **Reply Tags**: optional reply tag syntax for supported providers.
- **Heartbeats**: heartbeat prompt and ack behavior.
- **Heartbeats**: heartbeat prompt and ack behavior, when heartbeats are enabled for the default agent.
- **Runtime**: host, OS, node, model, repo root (when detected), thinking level (one line).
- **Reasoning**: current visibility level + /reasoning toggle hint.
@@ -103,10 +103,12 @@ Bootstrap files are trimmed and appended under **Project Context** so the model
- `BOOTSTRAP.md` (only on brand-new workspaces)
- `MEMORY.md` when present, otherwise `memory.md` as a lowercase fallback
All of these files are **injected into the context window** on every turn, which
means they consume tokens. Keep them concise — especially `MEMORY.md`, which can
grow over time and lead to unexpectedly high context usage and more frequent
compaction.
All of these files are **injected into the context window** on every turn unless
a file-specific gate applies. `HEARTBEAT.md` is omitted on normal runs when
heartbeats are disabled for the default agent or
`agents.defaults.heartbeat.includeSystemPromptSection` is false. Keep injected
files concise — especially `MEMORY.md`, which can grow over time and lead to
unexpectedly high context usage and more frequent compaction.
> **Note:** `memory/*.md` daily files are **not** injected automatically. They
> are accessed on demand via the `memory_search` and `memory_get` tools, so they

View File

@@ -76,6 +76,10 @@
"source": "/plugins/agent-tools",
"destination": "/plugins/building-plugins#registering-agent-tools"
},
{
"source": "/cli/capability",
"destination": "/cli/infer"
},
{
"source": "/tools/capability-cookbook",
"destination": "/plugins/architecture"
@@ -1158,6 +1162,7 @@
{
"group": "Tools",
"pages": [
"tools/media-overview",
"tools/apply-patch",
{
"group": "Web Browser",
@@ -1230,6 +1235,7 @@
"pages": [
"providers/alibaba",
"providers/anthropic",
"providers/arcee",
"providers/bedrock",
"providers/bedrock-mantle",
"providers/chutes",

View File

@@ -124,6 +124,9 @@ The provider id becomes the left side of your model ref:
sessionMode: "existing",
sessionIdFields: ["session_id", "conversation_id"],
systemPromptArg: "--system",
// Codex-style CLIs can point at a prompt file instead:
// systemPromptFileConfigArg: "-c",
// systemPromptFileConfigKey: "model_instructions_file",
systemPromptWhen: "first",
imageArg: "--image",
imageMode: "repeat",
@@ -150,6 +153,12 @@ told us OpenClaw-style Claude CLI usage is allowed again, so OpenClaw treats
a new policy.
</Note>
The bundled OpenAI `codex-cli` backend passes OpenClaw's system prompt through
Codex's `model_instructions_file` config override (`-c
model_instructions_file="..."`). Codex does not expose a Claude-style
`--append-system-prompt` flag, so OpenClaw writes the assembled prompt to a
temporary file for each fresh Codex CLI session.
## Sessions
- If the CLI supports sessions, set `sessionArg` (e.g. `--session-id`) or
@@ -214,8 +223,10 @@ The bundled OpenAI plugin also registers a default for `codex-cli`:
The bundled Google plugin also registers a default for `google-gemini-cli`:
- `command: "gemini"`
- `args: ["--prompt", "--output-format", "json"]`
- `resumeArgs: ["--resume", "{sessionId}", "--prompt", "--output-format", "json"]`
- `args: ["--output-format", "json", "--prompt", "{prompt}"]`
- `resumeArgs: ["--resume", "{sessionId}", "--output-format", "json", "--prompt", "{prompt}"]`
- `imageArg: "@"`
- `imagePathScope: "workspace"`
- `modelArg: "--model"`
- `sessionMode: "existing"`
- `sessionIdFields: ["session_id", "sessionId"]`
@@ -251,8 +262,9 @@ opt into a generated MCP config overlay with `bundleMcp: true`.
Current bundled behavior:
- `codex-cli`: no bundle MCP overlay
- `google-gemini-cli`: no bundle MCP overlay
- `claude-cli`: generated strict MCP config file
- `codex-cli`: inline config overrides for `mcp_servers`
- `google-gemini-cli`: generated Gemini system settings file
When bundle MCP is enabled, OpenClaw:
@@ -260,8 +272,8 @@ When bundle MCP is enabled, OpenClaw:
- authenticates the bridge with a per-session token (`OPENCLAW_MCP_TOKEN`)
- scopes tool access to the current session, account, and channel context
- loads enabled bundle-MCP servers for the current workspace
- merges them with any existing backend `--mcp-config`
- rewrites the CLI args to pass `--strict-mcp-config --mcp-config <generated-file>`
- merges them with any existing backend MCP config/settings shape
- rewrites the launch config using the backend-owned integration mode from the owning extension
If no MCP servers are enabled, OpenClaw still injects a strict config when a
backend opts into bundle MCP so background runs stay isolated.

View File

@@ -1,6 +1,6 @@
---
title: "Configuration Reference"
summary: "Complete reference for every OpenClaw config key, defaults, and channel settings"
summary: "Gateway config reference for core OpenClaw keys, defaults, and links to dedicated subsystem references"
read_when:
- You need exact field-level config semantics or defaults
- You are validating channel, model, gateway, or tool config blocks
@@ -8,7 +8,21 @@ read_when:
# Configuration Reference
Every field available in `~/.openclaw/openclaw.json`. For a task-oriented overview, see [Configuration](/gateway/configuration).
Core config reference for `~/.openclaw/openclaw.json`. For a task-oriented overview, see [Configuration](/gateway/configuration).
This page covers the main OpenClaw config surfaces and links out when a subsystem has its own deeper reference. It does **not** try to inline every channel/plugin-owned command catalog or every deep memory/QMD knob on one page.
Code truth:
- `openclaw config schema` prints the live JSON Schema used for validation and Control UI, with bundled/plugin/channel metadata merged in when available
- `config.schema.lookup` returns one path-scoped schema node for drill-down tooling
- `pnpm config:docs:check` / `pnpm config:docs:gen` validate the config-doc baseline hash against the current schema surface
Dedicated deep references:
- [Memory configuration reference](/reference/memory-config) for `agents.defaults.memorySearch.*`, `memory.qmd.*`, `memory.citations`, and dreaming config under `plugins.entries.memory-core.config.dreaming`
- [Slash Commands](/tools/slash-commands) for the current built-in + bundled command catalog
- owning channel/plugin pages for channel-specific command surfaces
Config format is **JSON5** (comments + trailing commas allowed). All fields are optional — OpenClaw uses safe defaults when omitted.
@@ -426,8 +440,10 @@ WhatsApp runs through the gateway's web channel (Baileys Web). It starts automat
typingReaction: "hourglass_flowing_sand",
textChunkLimit: 4000,
chunkMode: "length",
streaming: "partial", // off | partial | block | progress (preview mode)
nativeStreaming: true, // use Slack native streaming API when streaming=partial
streaming: {
mode: "partial", // off | partial | block | progress
nativeTransport: true, // use Slack native streaming API when mode=partial
},
mediaMaxMb: 20,
execApprovals: {
enabled: "auto", // true | false | "auto"
@@ -452,13 +468,14 @@ WhatsApp runs through the gateway's web channel (Baileys Web). It starts automat
resolve the secret value.
- `configWrites: false` blocks Slack-initiated config writes.
- Optional `channels.slack.defaultAccount` overrides default account selection when it matches a configured account id.
- `channels.slack.streaming` is the canonical stream mode key. Legacy `streamMode` and boolean `streaming` values are auto-migrated.
- `channels.slack.streaming.mode` is the canonical Slack stream mode key. `channels.slack.streaming.nativeTransport` controls Slack's native streaming transport. Legacy `streamMode`, boolean `streaming`, and `nativeStreaming` values are auto-migrated.
- Use `user:<id>` (DM) or `channel:<id>` for delivery targets.
**Reaction notification modes:** `off`, `own` (default), `all`, `allowlist` (from `reactionAllowlist`).
**Thread session isolation:** `thread.historyScope` is per-thread (default) or shared across channel. `thread.inheritParent` copies parent channel transcript to new threads.
- Slack native streaming plus the Slack assistant-style "is typing..." thread status require a reply thread target. Top-level DMs stay off-thread by default, so they use `typingReaction` or normal delivery instead of the thread-style preview.
- `typingReaction` adds a temporary reaction to the inbound Slack message while a reply is running, then removes it on completion. Use a Slack emoji shortcode such as `"hourglass_flowing_sand"`.
- `channels.slack.execApprovals`: Slack-native exec approval delivery and approver authorization. Same schema as Discord: `enabled` (`true`/`false`/`"auto"`), `approvers` (Slack user IDs), `agentFilter`, `sessionFilter`, and `target` (`"dm"`, `"channel"`, or `"both"`).
@@ -814,12 +831,18 @@ Include your own number in `allowFrom` to enable self-chat mode (ignores native
{
commands: {
native: "auto", // register native commands when supported
nativeSkills: "auto", // register native skill commands when supported
text: true, // parse /commands in chat messages
bash: false, // allow ! (alias: /bash)
bashForegroundMs: 2000,
config: false, // allow /config
mcp: false, // allow /mcp
plugins: false, // allow /plugins
debug: false, // allow /debug
restart: false, // allow /restart + gateway restart tool
restart: true, // allow /restart + gateway restart tool
ownerAllowFrom: ["discord:123456789012345678"],
ownerDisplay: "raw", // raw | hash
ownerDisplaySecret: "${OWNER_ID_HASH_SECRET}",
allowFrom: {
"*": ["user1"],
discord: ["user:123"],
@@ -831,16 +854,32 @@ Include your own number in `allowFrom` to enable self-chat mode (ignores native
<Accordion title="Command details">
- This block configures command surfaces. For the current built-in + bundled command catalog, see [Slash Commands](/tools/slash-commands).
- This page is a **config-key reference**, not the full command catalog. Channel/plugin-owned commands such as QQ Bot `/bot-ping` `/bot-help` `/bot-logs`, LINE `/card`, device-pair `/pair`, memory `/dreaming`, phone-control `/phone`, and Talk `/voice` are documented in their channel/plugin pages plus [Slash Commands](/tools/slash-commands).
- Text commands must be **standalone** messages with leading `/`.
- `native: "auto"` turns on native commands for Discord/Telegram, leaves Slack off.
- `nativeSkills: "auto"` turns on native skill commands for Discord/Telegram, leaves Slack off.
- Override per channel: `channels.discord.commands.native` (bool or `"auto"`). `false` clears previously registered commands.
- Override native skill registration per channel with `channels.<provider>.commands.nativeSkills`.
- `channels.telegram.customCommands` adds extra Telegram bot menu entries.
- `bash: true` enables `! <cmd>` for host shell. Requires `tools.elevated.enabled` and sender in `tools.elevated.allowFrom.<channel>`.
- `config: true` enables `/config` (reads/writes `openclaw.json`). For gateway `chat.send` clients, persistent `/config set|unset` writes also require `operator.admin`; read-only `/config show` stays available to normal write-scoped operator clients.
- `mcp: true` enables `/mcp` for OpenClaw-managed MCP server config under `mcp.servers`.
- `plugins: true` enables `/plugins` for plugin discovery, install, and enable/disable controls.
- `channels.<provider>.configWrites` gates config mutations per channel (default: true).
- For multi-account channels, `channels.<provider>.accounts.<id>.configWrites` also gates writes that target that account (for example `/allowlist --config --account <id>` or `/config set channels.<provider>.accounts.<id>...`).
- `restart: false` disables `/restart` and gateway restart tool actions. Default: `true`.
- `ownerAllowFrom` is the explicit owner allowlist for owner-only commands/tools. It is separate from `allowFrom`.
- `ownerDisplay: "hash"` hashes owner ids in the system prompt. Set `ownerDisplaySecret` to control hashing.
- `allowFrom` is per-provider. When set, it is the **only** authorization source (channel allowlists/pairing and `useAccessGroups` are ignored).
- `useAccessGroups: false` allows commands to bypass access-group policies when `allowFrom` is not set.
- Command docs map:
- built-in + bundled catalog: [Slash Commands](/tools/slash-commands)
- channel-specific command surfaces: [Channels](/channels)
- QQ Bot commands: [QQ Bot](/channels/qqbot)
- pairing commands: [Pairing](/channels/pairing)
- LINE card command: [LINE](/channels/line)
- memory dreaming: [Dreaming](/concepts/dreaming)
</Accordion>
@@ -1049,7 +1088,7 @@ Time format in system prompt. Default: `auto` (OS preference).
- Typical values: `qwen/wan2.6-t2v`, `qwen/wan2.6-i2v`, `qwen/wan2.6-r2v`, `qwen/wan2.6-r2v-flash`, or `qwen/wan2.7-r2v`.
- If omitted, `video_generate` can still infer an auth-backed provider default. It tries the current default provider first, then the remaining registered video-generation providers in provider-id order.
- If you select a provider/model directly, configure the matching provider auth/API key too.
- The bundled Qwen video-generation provider currently supports up to 1 output video, 1 input image, 4 input videos, 10 seconds duration, and provider-level `size`, `aspectRatio`, `resolution`, `audio`, and `watermark` options.
- The bundled Qwen video-generation provider supports up to 1 output video, 1 input image, 4 input videos, 10 seconds duration, and provider-level `size`, `aspectRatio`, `resolution`, `audio`, and `watermark` options.
- `pdfModel`: accepts either a string (`"provider/model"`) or an object (`{ primary, fallbacks }`).
- Used by the `pdf` tool for model routing.
- If omitted, the PDF tool falls back to `imageModel`, then to the resolved session/default model.
@@ -1117,6 +1156,20 @@ Optional CLI backends for text-only fallback runs (no tool calls). Useful as a b
- Sessions supported when `sessionArg` is set.
- Image pass-through supported when `imageArg` accepts file paths.
### `agents.defaults.systemPromptOverride`
Replace the entire OpenClaw-assembled system prompt with a fixed string. Set at the default level (`agents.defaults.systemPromptOverride`) or per agent (`agents.list[].systemPromptOverride`). Per-agent values take precedence; an empty or whitespace-only value is ignored. Useful for controlled prompt experiments.
```json5
{
agents: {
defaults: {
systemPromptOverride: "You are a helpful assistant.",
},
},
}
```
### `agents.defaults.heartbeat`
Periodic heartbeat runs.
@@ -1129,6 +1182,7 @@ Periodic heartbeat runs.
every: "30m", // 0m disables
model: "openai/gpt-5.4-mini",
includeReasoning: false,
includeSystemPromptSection: true, // default: true; false omits the Heartbeat section from the system prompt
lightContext: false, // default: false; true keeps only HEARTBEAT.md from workspace bootstrap files
isolatedSession: false, // default: false; true runs each heartbeat in a fresh session (no conversation history)
session: "main",
@@ -1145,6 +1199,7 @@ Periodic heartbeat runs.
```
- `every`: duration string (ms/s/m/h). Default: `30m` (API-key auth) or `1h` (OAuth auth). Set to `0m` to disable.
- `includeSystemPromptSection`: when false, omits the Heartbeat section from the system prompt and skips `HEARTBEAT.md` injection into bootstrap context. Default: `true`.
- `suppressToolErrorWarnings`: when true, suppresses tool error warning payloads during heartbeat runs.
- `directPolicy`: direct/DM delivery policy. `allow` (default) permits direct-target delivery. `block` suppresses direct-target delivery and emits `reason=dm-blocked`.
- `lightContext`: when true, heartbeat runs use lightweight bootstrap context and keep only `HEARTBEAT.md` from workspace bootstrap files.
@@ -1160,6 +1215,7 @@ Periodic heartbeat runs.
defaults: {
compaction: {
mode: "safeguard", // default | safeguard
provider: "my-provider", // id of a registered compaction provider plugin (optional)
timeoutSeconds: 900,
reserveTokensFloor: 24000,
identifierPolicy: "strict", // strict | off | custom
@@ -1180,6 +1236,7 @@ Periodic heartbeat runs.
```
- `mode`: `default` or `safeguard` (chunked summarization for long histories). See [Compaction](/concepts/compaction).
- `provider`: id of a registered compaction provider plugin. When set, the provider's `summarize()` is called instead of built-in LLM summarization. Falls back to built-in on failure. Setting a provider forces `mode: "safeguard"`. See [Compaction](/concepts/compaction).
- `timeoutSeconds`: maximum seconds allowed for a single compaction operation before OpenClaw aborts it. Default: `900`.
- `identifierPolicy`: `strict` (default), `off`, or `custom`. `strict` prepends built-in opaque identifier retention guidance during compaction summarization.
- `identifierInstructions`: optional custom identifier-preservation text used when `identifierPolicy=custom`.
@@ -1501,7 +1558,7 @@ noVNC observer access uses VNC auth by default and OpenClaw emits a short-lived
</Accordion>
Browser sandboxing and `sandbox.docker.binds` are currently Docker-only.
Browser sandboxing and `sandbox.docker.binds` are Docker-only.
Build images:
@@ -1778,7 +1835,7 @@ See [Multi-Agent Sandbox & Tools](/tools/multi-agent-sandbox-tools) for preceden
- **`parentForkMaxTokens`**: max parent-session `totalTokens` allowed when creating a forked thread session (default `100000`).
- If parent `totalTokens` is above this value, OpenClaw starts a fresh thread session instead of inheriting parent transcript history.
- Set `0` to disable this guard and always allow parent forking.
- **`mainKey`**: legacy field. Runtime now always uses `"main"` for the main direct-chat bucket.
- **`mainKey`**: legacy field. Runtime always uses `"main"` for the main direct-chat bucket.
- **`agentToAgent.maxPingPongTurns`**: maximum reply-back turns between agents during agent-to-agent exchanges (integer, range: `0``5`). `0` disables ping-pong chaining.
- **`sendPolicy`**: match by `channel`, `chatType` (`direct|group|channel`, with legacy `dm` alias), `keyPrefix`, or `rawKeyPrefix`. First deny wins.
- **`maintenance`**: session-store cleanup + retention controls.
@@ -1902,7 +1959,7 @@ Batches rapid text-only messages from the same sender into a single agent turn.
}
```
- `auto` controls auto-TTS. `/tts off|always|inbound|tagged` overrides per session.
- `auto` controls the default auto-TTS mode: `off`, `always`, `inbound`, or `tagged`. `/tts on|off` can override local prefs, and `/tts status` shows the effective state.
- `summaryModel` overrides `agents.defaults.model.primary` for auto-summary.
- `modelOverrides` is enabled by default; `modelOverrides.allowProvider` defaults to `false` (opt-in).
- API keys fall back to `ELEVENLABS_API_KEY`/`XI_API_KEY` and `OPENAI_API_KEY`.
@@ -2257,7 +2314,7 @@ Experimental built-in tool flags. Default off unless a runtime-specific auto-ena
Notes:
- `planTool`: enables the structured `update_plan` tool for non-trivial multi-step work tracking.
- Default: `false` for non-OpenAI providers. OpenAI and OpenAI Codex runs auto-enable it.
- Default: `false` for non-OpenAI providers. OpenAI and OpenAI Codex runs auto-enable it when unset; set `false` to disable that auto-enable.
- When enabled, the system prompt also adds usage guidance so the model only uses it for substantial work and keeps at most one step `in_progress`.
### `agents.defaults.subagents`
@@ -2349,6 +2406,7 @@ OpenClaw uses the built-in model catalog. Add custom providers via `models.provi
- `models.providers.*.models.*.contextWindow`: native model context window metadata.
- `models.providers.*.models.*.contextTokens`: optional runtime context cap. Use this when you want a smaller effective context budget than the model's native `contextWindow`.
- `models.providers.*.models.*.compat.supportsDeveloperRole`: optional compatibility hint. For `api: "openai-completions"` with a non-empty non-native `baseUrl` (host not `api.openai.com`), OpenClaw forces this to `false` at runtime. Empty/omitted `baseUrl` keeps default OpenAI behavior.
- `models.providers.*.models.*.compat.requiresStringContent`: optional compatibility hint for string-only OpenAI-compatible chat endpoints. When `true`, OpenClaw flattens pure text `messages[].content` arrays into plain strings before sending the request.
- `plugins.entries.amazon-bedrock.config.discovery`: Bedrock auto-discovery settings root.
- `plugins.entries.amazon-bedrock.config.discovery.enabled`: turn implicit discovery on/off.
- `plugins.entries.amazon-bedrock.config.discovery.region`: AWS region for discovery.
@@ -2473,8 +2531,8 @@ Set `ZAI_API_KEY`. `z.ai/*` and `z-ai/*` are accepted aliases. Shortcut: `opencl
For the China endpoint: `baseUrl: "https://api.moonshot.cn/v1"` or `openclaw onboard --auth-choice moonshot-api-key-cn`.
Native Moonshot endpoints advertise streaming usage compatibility on the shared
`openai-completions` transport, and OpenClaw now keys that off endpoint
capabilities rather than the built-in provider id alone.
`openai-completions` transport, and OpenClaw keys that off endpoint capabilities
rather than the built-in provider id alone.
</Accordion>
@@ -2574,7 +2632,7 @@ Base URL should omit `/v1` (Anthropic client appends it). Shortcut: `openclaw on
Set `MINIMAX_API_KEY`. Shortcuts:
`openclaw onboard --auth-choice minimax-global-api` or
`openclaw onboard --auth-choice minimax-cn-api`.
The model catalog now defaults to M2.7 only.
The model catalog defaults to M2.7 only.
On the Anthropic-compatible streaming path, OpenClaw disables MiniMax thinking
by default unless you explicitly set `thinking` yourself. `/fast on` or
`params.fastMode: true` rewrites `MiniMax-M2.7` to
@@ -2673,6 +2731,12 @@ See [Local Models](/gateway/local-models). TL;DR: run a large local model via LM
- `enabled`: master dreaming switch (default `false`).
- `frequency`: cron cadence for each full dreaming sweep (`"0 3 * * *"` by default).
- phase policy and thresholds are implementation details (not user-facing config keys).
- Full memory config lives in [Memory configuration reference](/reference/memory-config):
- `agents.defaults.memorySearch.*`
- `memory.backend`
- `memory.citations`
- `memory.qmd.*`
- `plugins.entries.memory-core.config.dreaming`
- Enabled Claude bundle plugins can also contribute embedded Pi defaults from `settings.json`; OpenClaw applies those as sanitized agent settings, not as raw OpenClaw config patches.
- `plugins.slots.memory`: pick the active memory plugin id, or `"none"` to disable memory plugins.
- `plugins.slots.contextEngine`: pick the active context engine plugin id; defaults to `"legacy"` unless you install and select another engine.
@@ -3574,7 +3638,7 @@ Applies only to one-shot cron jobs. Recurring jobs use separate failure handling
- `to`: explicit announce target or webhook URL. Required for webhook mode.
- `accountId`: optional account override for delivery.
- Per-job `delivery.failureDestination` overrides this global default.
- When neither global nor per-job failure destination is set, jobs that already deliver via `announce` now fall back to that primary announce target on failure.
- When neither global nor per-job failure destination is set, jobs that already deliver via `announce` fall back to that primary announce target on failure.
- `delivery.failureDestination` is only supported for `sessionTarget="isolated"` jobs unless the job's primary `delivery.mode` is `"webhook"`.
See [Cron Jobs](/automation/cron-jobs). Isolated cron executions are tracked as [background tasks](/automation/tasks).

View File

@@ -72,6 +72,8 @@ Schema tooling notes:
- `openclaw config schema` prints the same JSON Schema family used by Control UI
and config validation.
- Treat that schema output as the canonical machine-readable contract for
`openclaw.json`; this overview and the configuration reference summarize it.
- Field `title` and `description` values are carried into the schema output for
editor and form tooling.
- Nested object, wildcard (`*`), and array-item (`[]`) entries inherit the same
@@ -84,6 +86,8 @@ Schema tooling notes:
summaries for drill-down tooling.
- Runtime plugin/channel schemas are merged in when the gateway can load the
current manifest registry.
- `pnpm config:docs:check` detects drift between docs-facing config baseline
artifacts and the current schema surface.
When validation fails:

View File

@@ -66,6 +66,7 @@ cat ~/.openclaw/openclaw.json
- Talk config migration from legacy flat `talk.*` fields into `talk.provider` + `talk.providers.<provider>`.
- Browser migration checks for legacy Chrome extension configs and Chrome MCP readiness.
- OpenCode provider override warnings (`models.providers.opencode` / `models.providers.opencode-go`).
- Codex OAuth shadowing warnings (`models.providers.openai-codex`).
- OAuth TLS prerequisites check for OpenAI Codex OAuth profiles.
- Legacy on-disk state migration (sessions/agent dir/WhatsApp auth).
- Legacy plugin manifest contract key migration (`speechProviders`, `realtimeTranscriptionProviders`, `realtimeVoiceProviders`, `mediaUnderstandingProviders`, `imageGenerationProviders`, `videoGenerationProviders`, `webFetchProviders`, `webSearchProviders``contracts`).
@@ -212,6 +213,16 @@ doctor prints platform-specific fix guidance. On macOS with a Homebrew Node, the
fix is usually `brew postinstall ca-certificates`. With `--deep`, the probe runs
even if the gateway is healthy.
### 2c) Codex OAuth provider overrides
If you previously added legacy OpenAI transport settings under
`models.providers.openai-codex`, they can shadow the built-in Codex OAuth
provider path that newer releases use automatically. Doctor warns when it sees
those old transport settings alongside Codex OAuth so you can remove or rewrite
the stale transport override and get the built-in routing/fallback behavior
back. Custom proxies and header-only overrides are still supported and do not
trigger this warning.
### 3) Legacy state migrations (disk layout)
Doctor can migrate older on-disk layouts into the current structure:
@@ -312,6 +323,11 @@ Anthropic setup-token path.
Refresh prompts only appear when running interactively (TTY); `--non-interactive`
skips refresh attempts.
When an OAuth refresh fails permanently (for example `refresh_token_reused`,
`invalid_grant`, or a provider telling you to sign in again), doctor reports
that re-auth is required and prints the exact `openclaw models auth login --provider ...`
command to run.
Doctor also reports auth profiles that are temporarily unusable due to:
- short cooldowns (rate limits/timeouts/auth failures)

View File

@@ -54,7 +54,10 @@ Example config:
- Prompt body (configurable via `agents.defaults.heartbeat.prompt`):
`Read HEARTBEAT.md if it exists (workspace context). Follow it strictly. Do not infer or repeat old tasks from prior chats. If nothing needs attention, reply HEARTBEAT_OK.`
- The heartbeat prompt is sent **verbatim** as the user message. The system
prompt includes a “Heartbeat” section and the run is flagged internally.
prompt includes a “Heartbeat” section only when heartbeats are enabled for the
default agent, and the run is flagged internally.
- When heartbeats are disabled with `0m`, normal runs also omit `HEARTBEAT.md`
from bootstrap context so the model does not see heartbeat-only instructions.
- Active hours (`heartbeat.activeHours`) are checked in the configured timezone.
Outside the window, heartbeats are skipped until the next tick inside the window.
@@ -330,6 +333,11 @@ If a `HEARTBEAT.md` file exists in the workspace, the default prompt tells the
agent to read it. Think of it as your “heartbeat checklist”: small, stable, and
safe to include every 30 minutes.
On normal runs, `HEARTBEAT.md` is only injected when heartbeat guidance is
enabled for the default agent. Disabling the heartbeat cadence with `0m` or
setting `includeSystemPromptSection: false` omits it from normal bootstrap
context.
If `HEARTBEAT.md` exists but is effectively empty (only blank lines and markdown
headers like `# Heading`), OpenClaw skips the heartbeat run to save API calls.
That skip is reported as `reason=empty-heartbeat-file`.

View File

@@ -155,9 +155,30 @@ Behavior note for local/proxied `/v1` backends:
- hidden OpenClaw attribution headers (`originator`, `version`, `User-Agent`)
are not injected on these custom proxy URLs
Compatibility notes for stricter OpenAI-compatible backends:
- Some servers accept only string `messages[].content` on Chat Completions, not
structured content-part arrays. Set
`models.providers.<provider>.models[].compat.requiresStringContent: true` for
those endpoints.
- Some smaller or stricter local backends are unstable with OpenClaw's full
agent-runtime prompt shape, especially when tool schemas are included. If the
backend works for tiny direct `/v1/chat/completions` calls but fails on normal
OpenClaw agent turns, try
`models.providers.<provider>.models[].compat.supportsTools: false` first.
- If the backend still fails only on larger OpenClaw runs, the remaining issue
is usually upstream model/server capacity or a backend bug, not OpenClaw's
transport layer.
## Troubleshooting
- Gateway can reach the proxy? `curl http://127.0.0.1:1234/v1/models`.
- LM Studio model unloaded? Reload; cold start is a common “hanging” cause.
- Context errors? Lower `contextWindow` or raise your server limit.
- OpenAI-compatible server returns `messages[].content ... expected a string`?
Add `compat.requiresStringContent: true` on that model entry.
- Direct tiny `/v1/chat/completions` calls work, but `openclaw infer model run`
fails on Gemma or another local model? Disable tool schemas first with
`compat.supportsTools: false`, then retest. If the server still crashes only
on larger OpenClaw prompts, treat it as an upstream server/model limitation.
- Safety: local models skip provider-side filters; keep agents narrow and compaction on to limit prompt injection blast radius.

View File

@@ -381,16 +381,18 @@ implemented in `src/gateway/server-methods/*.ts`.
#### Approval families
- `exec.approval.request` and `exec.approval.resolve` cover one-shot exec
approval requests.
- `exec.approval.request`, `exec.approval.get`, `exec.approval.list`, and
`exec.approval.resolve` cover one-shot exec approval requests plus pending
approval lookup/replay.
- `exec.approval.waitDecision` waits on one pending exec approval and returns
the final decision (or `null` on timeout).
- `exec.approvals.get` and `exec.approvals.set` manage gateway exec approval
policy snapshots.
- `exec.approvals.node.get` and `exec.approvals.node.set` manage node-local exec
approval policy via node relay commands.
- `plugin.approval.request`, `plugin.approval.waitDecision`, and
`plugin.approval.resolve` cover plugin-defined approval flows.
- `plugin.approval.request`, `plugin.approval.list`,
`plugin.approval.waitDecision`, and `plugin.approval.resolve` cover
plugin-defined approval flows.
#### Other major families

View File

@@ -59,6 +59,61 @@ Related:
- [/reference/token-use](/reference/token-use)
- [/help/faq#why-am-i-seeing-http-429-ratelimiterror-from-anthropic](/help/faq#why-am-i-seeing-http-429-ratelimiterror-from-anthropic)
## Local OpenAI-compatible backend passes direct probes but agent runs fail
Use this when:
- `curl ... /v1/models` works
- tiny direct `/v1/chat/completions` calls work
- OpenClaw model runs fail only on normal agent turns
```bash
curl http://127.0.0.1:1234/v1/models
curl http://127.0.0.1:1234/v1/chat/completions \
-H 'content-type: application/json' \
-d '{"model":"<id>","messages":[{"role":"user","content":"hi"}],"stream":false}'
openclaw infer model run --model <provider/model> --prompt "hi" --json
openclaw logs --follow
```
Look for:
- direct tiny calls succeed, but OpenClaw runs fail only on larger prompts
- backend errors about `messages[].content` expecting a string
- backend crashes that appear only with larger prompt-token counts or full agent
runtime prompts
Common signatures:
- `messages[...].content: invalid type: sequence, expected a string` → backend
rejects structured Chat Completions content parts. Fix: set
`models.providers.<provider>.models[].compat.requiresStringContent: true`.
- direct tiny requests succeed, but OpenClaw agent runs fail with backend/model
crashes (for example Gemma on some `inferrs` builds) → OpenClaw transport is
likely already correct; the backend is failing on the larger agent-runtime
prompt shape.
- failures shrink after disabling tools but do not disappear → tool schemas were
part of the pressure, but the remaining issue is still upstream model/server
capacity or a backend bug.
Fix options:
1. Set `compat.requiresStringContent: true` for string-only Chat Completions backends.
2. Set `compat.supportsTools: false` for models/backends that cannot handle
OpenClaw's tool schema surface reliably.
3. Lower prompt pressure where possible: smaller workspace bootstrap, shorter
session history, lighter local model, or a backend with stronger long-context
support.
4. If tiny direct requests keep passing while OpenClaw agent turns still crash
inside the backend, treat it as an upstream server/model limitation and file
a repro there with the accepted payload shape.
Related:
- [/gateway/local-models](/gateway/local-models)
- [/gateway/configuration#models](/gateway/configuration#models)
- [/gateway/configuration-reference#openai-compatible-endpoints](/gateway/configuration-reference#openai-compatible-endpoints)
## No replies
If channels are up but nothing answers, check routing and policy before reconnecting anything.

Some files were not shown because too many files have changed in this diff Show More