Compare commits

..

1016 Commits

Author SHA1 Message Date
Peter Steinberger
7ec621ab58 chore: polish qa lab follow-ups 2026-04-05 09:13:50 +01:00
Peter Steinberger
8762df9bb4 feat: add qa lab extension 2026-04-05 09:13:49 +01:00
Peter Steinberger
dce0467826 refactor: hide qa channels with exposure metadata 2026-04-05 09:12:00 +01:00
Peter Steinberger
258484854b feat: add qa channel foundation 2026-04-05 09:12:00 +01:00
Vincent Koc
4c11a520a8 fix(plugins): carry workspaceDir in runtime state 2026-04-05 09:10:09 +01:00
Peter Steinberger
3038079c2f fix: clamp pi embedded fenced chunk splits 2026-04-05 09:09:26 +01:00
Peter Steinberger
b57372d665 refactor: route capability runtime through channel stores 2026-04-05 09:07:33 +01:00
Peter Steinberger
1903be5401 refactor: remove generated plugin sdk facades 2026-04-05 09:07:33 +01:00
Peter Steinberger
fd968bfb2d fix: recover unloaded macOS launch agents (#43766) 2026-04-05 17:06:22 +09:00
Peter Steinberger
07e7b7177f test: stabilize pi embedded text-end hooks 2026-04-05 09:06:15 +01:00
Jamil Zakirov
ffb5b99114 fix: propagate workspaceDir to snapshot plugin loads (#61138)
* plugins: include resolved workspaceDir in provider hook cache keys

resolveProviderPluginsForHooks, resolveProviderPluginsForCatalogHooks, and
resolveProviderRuntimePlugin used the raw params.workspaceDir for cache keys
and plugin-id discovery while resolvePluginProviders already fell back to
the active registry workspace. Resolve workspaceDir once at the top of each
function so cache keys, candidate filtering, and loading all use the same
workspace root.

* fix(plugins): inherit runtime workspace for snapshot loads

* test(gateway): stub runtime registry seam

* fix(plugins): restore workspace fallback after rebase

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-04-05 09:03:54 +01:00
Peter Steinberger
e28e83f4e4 test: load browser fixture for sandbox policy 2026-04-05 09:00:42 +01:00
Peter Steinberger
3728cfbe29 test: use stable sandbox denied tool assertions 2026-04-05 08:58:55 +01:00
Peter Steinberger
70b8ce72df test: refresh simple completion provider fallback 2026-04-05 08:57:04 +01:00
Vincent Koc
69b74476d7 fix(contracts): lock runtime seam regressions 2026-04-05 08:52:20 +01:00
Peter Steinberger
23275edef1 refactor: simplify web provider plugin discovery 2026-04-05 08:50:01 +01:00
Vincent Koc
c863ee1b86 fix(config): migrate bundled private-network aliases (#60862)
* refactor(plugin-sdk): centralize private-network opt-in semantics

* fix(config): migrate bundled private-network aliases

* fix(config): add bundled private-network doctor adapters

* fix(config): expose bundled channel migration hooks

* fix(config): prefer canonical private-network key

* test(config): refresh rebased private-network outputs
2026-04-05 08:49:44 +01:00
Vincent Koc
87b8680ded fix(cache): order stable project context before heartbeat (#61236)
* fix(cache): order stable project context before heartbeat

* docs(changelog): note project context cache ordering

* Update CHANGELOG.md
2026-04-05 08:49:20 +01:00
Vincent Koc
2d2824874e fix(contracts): align provider and sdk inventories 2026-04-05 08:44:35 +01:00
Peter Steinberger
07c2f81392 fix: preserve explicit Ollama apiKey during discovery 2026-04-05 08:43:50 +01:00
Peter Steinberger
377ccbcf1d test: stabilize gateway chat and method suites 2026-04-05 08:43:21 +01:00
Peter Steinberger
3635b2b8d6 test: split gateway session utils coverage 2026-04-05 08:43:21 +01:00
Vincent Koc
49f52ddf36 fix(fetch): honor mocked global fetch with dispatchers 2026-04-05 08:42:37 +01:00
wzfmini01
ef5f47bd39 fix(google-gemini-cli-auth): detect bundled npm installs (#60486) (#60486)
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-04-05 08:41:43 +01:00
Peter Steinberger
acd8966ff0 test: refresh agent model expectation fixtures 2026-04-05 08:33:54 +01:00
Peter Steinberger
31d8b022eb fix: treat inline buttons as native approval ui 2026-04-05 08:33:54 +01:00
Peter Steinberger
d91d3cc0f0 fix: respect custom env snapshots for vertex auth 2026-04-05 08:33:54 +01:00
Peter Steinberger
c9c7271f4f test: keep mocked fetch active with guarded dispatchers 2026-04-05 08:33:54 +01:00
Ted Li
b474e098d1 docs: correct overstated prompt-cache comments from #58036 #58037 #58038 (#60633)
* docs: correct overstated prompt-cache comments from #58036 #58037 #58038

* docs: restore purpose context in MCP tool sort comment

* docs: drop misleading 'legacy' framing from image-prune comments

* docs: restore useful context stripped from image-prune comments

* docs: restore 'deterministically' in MCP tool sort comment

* docs: restore 'idempotent' at attempt.ts callsite

* docs: restore 'provider prompt cache' in context-guard comment
2026-04-05 08:32:51 +01:00
Peter Steinberger
c2bf2cc2b7 test: stabilize gateway config.apply cases 2026-04-05 08:31:08 +01:00
wirjo
019a25e35c Fix/bedrock aws sdk apikey injection (#61194)
* fix(bedrock): stop injecting fake apiKey marker for aws-sdk auth when no env vars exist

When the Bedrock provider uses auth: "aws-sdk" and no AWS environment
variables are set (EC2 instance roles, ECS task roles, etc.),
resolveAwsSdkApiKeyVarName() fell back to "AWS_PROFILE" unconditionally.
This string was injected as apiKey in the provider config during
normalisation, which poisoned the downstream auth resolver — it treated
the marker as a literal key and failed with "No API key found".

The fix:
- resolveAwsSdkApiKeyVarName() now returns undefined (not "AWS_PROFILE")
  when no AWS env vars are present
- resolveBedrockConfigApiKey() (extension) gets the same fix
- resolveMissingProviderApiKey() guards both the providerApiKeyResolver
  and direct aws-sdk branches: if the resolver returns nothing, the
  provider config is returned unchanged (no apiKey injected)
- The aws-sdk credential chain then resolves credentials at request time
  via IMDS/ECS task role/etc. as intended

When AWS env vars ARE present (AWS_ACCESS_KEY_ID, AWS_PROFILE,
AWS_BEARER_TOKEN_BEDROCK), the marker is still injected correctly.

Closes #49891
Closes #50699
Fixes #54274

* test(bedrock): update resolveBedrockConfigApiKey test for undefined return on empty env

The test previously expected "AWS_PROFILE" when no env vars are set.
Now expects undefined (matching the fix), and adds a separate assertion
that AWS_PROFILE is returned when the env var is actually present.

* fix(bedrock): lock aws-sdk env marker behavior

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-04-05 08:24:05 +01:00
狼哥
eb130aa4e9 fix(google): disable pinned dns for image generation (#59873)
* fix(google): restore proxy-safe image generation (#59873)

* fix(ssrf): preserve transport policy without pinned dns

* fix(ssrf): use undici fetch for dispatcher requests

* fix(ssrf): type dispatcher fetch path

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-04-05 08:23:22 +01:00
Peter Steinberger
9238b98a7a fix: fall back to resolved agent dir for btw command 2026-04-05 08:21:52 +01:00
Peter Steinberger
2aafa8fb7d refactor: remove ollama sdk facades 2026-04-05 08:15:39 +01:00
Vincent Koc
155f4300ba fix(voice-call): use full config for realtime transcription (#61224)
* fix(voice-call): use full config for realtime transcription

* fix(changelog): note voice-call transcription regression

* Update CHANGELOG.md
2026-04-05 08:14:41 +01:00
Vincent Koc
42bc411c46 fix(gateway): catch invalid cron session targets 2026-04-05 08:10:29 +01:00
André Santos
eb0f367e00 fix(cache): enable prompt cache retention for Anthropic Vertex AI (#60888)
* fix(cache): enable prompt cache retention for Anthropic Vertex AI

* fix(cache): add anthropic-vertex to isAnthropicFamilyCacheTtlEligible

* fix(cache): use hostname parsing for long-TTL endpoint eligibility

* docs(changelog): note anthropic vertex cache ttl fix

---------

Co-authored-by: affsantos <andreffsantos91@gmail.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-04-05 08:07:02 +01:00
Peter Steinberger
a6894a5238 test: harden live model skip handling 2026-04-05 08:04:56 +01:00
Peter Steinberger
68851f2e97 fix(config): cap generated schema export types 2026-04-05 07:58:02 +01:00
Peter Steinberger
20803dac14 fix: fail closed for invalid persisted cron targets 2026-04-05 07:57:16 +01:00
Peter Steinberger
b7a08c6bad fix: preserve catalog metadata for allowlisted models 2026-04-05 07:56:31 +01:00
Peter Steinberger
20b08f1a85 fix: enforce paired scope baselines on reconnect 2026-04-05 07:53:57 +01:00
Vincent Koc
19b7fbaa73 fix(memory): honor mocked batch fetch clients 2026-04-05 07:48:03 +01:00
Peter Steinberger
a65ab607c7 fix(gateway): use launchd KeepAlive restarts 2026-04-05 07:43:37 +01:00
Peter Steinberger
d655a8bc76 feat: add Fireworks provider and simplify plugin setup loading 2026-04-05 07:43:14 +01:00
Ayaan Zaidi
f842f518cd fix: update embedded runner transport override (#61214)
* fix: update embedded runner transport override

* fix: update embedded runner transport override (#61214)

* fix: update embedded runner transport override (#61214)

* fix: update embedded runner transport override (#61214)
2026-04-05 12:12:50 +05:30
Peter Steinberger
bf226be64a test: keep cli backend coverage on core seams 2026-04-05 07:40:46 +01:00
Peter Steinberger
c9029503fd fix: honor mocked guarded fetch implementations 2026-04-05 07:39:43 +01:00
Vincent Koc
c09bf9812a fix(build): restore main build on current agent api 2026-04-05 07:38:09 +01:00
Vincent Koc
005766671e fix(ci): use agent transport property 2026-04-05 07:34:45 +01:00
Vincent Koc
cb1bf28526 build(a2ui): allow sparse core builds 2026-04-05 07:34:33 +01:00
Vincent Koc
2a999bf9c9 refactor(memory): invert memory host sdk dependency 2026-04-05 07:34:33 +01:00
Peter Steinberger
f59da4557c test: refresh gateway talk and scope fixtures 2026-04-05 07:31:30 +01:00
Peter Steinberger
332afa2fda refactor: narrow claude cli fallback seams 2026-04-05 07:29:32 +01:00
Vincent Koc
3da235bf39 fix(telegram): force paginated commands callbacks 2026-04-05 07:28:47 +01:00
Vincent Koc
61fc4a16b7 docs(changelog): remove duplicate Unreleased entries 2026-04-05 07:23:04 +01:00
Vincent Koc
db1d62b784 test(ci): cover bare default provider inference 2026-04-05 07:19:52 +01:00
Peter Steinberger
a084e46536 fix: use undici runtime fetch for dispatcher flows 2026-04-05 07:18:33 +01:00
Peter Steinberger
757fe86309 test: lock whatsapp session migration keys 2026-04-05 07:18:15 +01:00
Peter Steinberger
657c6f6788 fix: stabilize docker e2e lanes 2026-04-05 07:15:24 +01:00
Peter Steinberger
e5023cc141 fix(agents): invalidate stale cli sessions on auth changes 2026-04-05 07:14:52 +01:00
Peter Steinberger
903cb3c48c test: align bash exec mocks with reset modules 2026-04-05 07:10:49 +01:00
Peter Steinberger
37cc06f1fd fix: normalize claude cli fallback config 2026-04-05 07:09:13 +01:00
Ayaan Zaidi
f039bbf2aa fix: resolve acpx plugin root from shared chunks 2026-04-05 11:37:05 +05:30
Peter Steinberger
e25693315e fix: stabilize embedded runner transport and channel state 2026-04-05 07:04:18 +01:00
Peter Steinberger
749ed86fe3 test: stabilize gateway canvas and session cleanup 2026-04-05 07:04:18 +01:00
Peter Steinberger
5e0e50b12e test: stabilize gateway wizard e2e flow 2026-04-05 07:04:18 +01:00
Ayaan Zaidi
4cfb990382 fix: restore whatsapp doctor contract surface 2026-04-05 11:31:12 +05:30
Peter Steinberger
e9fa9f7822 test: reload transcript policy smoke module 2026-04-05 06:59:55 +01:00
Peter Steinberger
cb31c4813b test: mock models config planner in write serialization 2026-04-05 06:54:40 +01:00
Peter Steinberger
f5da2360a2 test: scope models config write serialization spy 2026-04-05 06:51:08 +01:00
Peter Steinberger
7f6e8c0645 test: reload gateway status command under mocks 2026-04-05 06:46:47 +01:00
Peter Steinberger
055428019e test: harden bash tool async exec coverage 2026-04-05 06:42:26 +01:00
Peter Steinberger
b63557679e test: harden models-config write serialization timing 2026-04-05 06:10:30 +01:00
Peter Steinberger
058fde2d88 test: reload runtime plugins module per test 2026-04-05 06:06:12 +01:00
Peter Steinberger
74416c5b33 test: force real timers for exec foreground timeout 2026-04-05 06:01:21 +01:00
Peter Steinberger
f7a32cd25e test: reset imessage facade runtime before each test 2026-04-05 05:58:02 +01:00
Peter Steinberger
15d5878d91 test: update telegram paginated commands expectations 2026-04-05 05:53:42 +01:00
Peter Steinberger
50b5c483ee fix: canonicalize legacy whatsapp group sessions 2026-04-05 05:47:04 +01:00
tarouca
bf0f4d93f0 fix: restore Telegram DM voice-note transcription (#61008) (thanks @manueltarouca)
* fix(telegram): enable voice-note transcription in DMs

The preflight transcription condition only triggered for group chats
(isGroup && requireMention), so voice notes sent in direct messages
were never transcribed -- they arrived as raw <media:audio> placeholders.

This regression was introduced when the Telegram channel was moved from
src/telegram/ to extensions/telegram/, losing the fix from c15385fc94.

Widen the condition to fire whenever there is audio and no accompanying
text, regardless of chat type. Group-specific guards (requireMention,
disableAudioPreflight, senderAllowedForAudioPreflight) still apply
only in group contexts.

* fix: restore Telegram DM voice-note transcription (#61008) (thanks @manueltarouca)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-05 09:49:44 +05:30
Peter Steinberger
0a71ac5d3c fix: keep discord open-policy allowlist nested 2026-04-05 05:04:10 +01:00
Peter Steinberger
1392a78c75 fix: infer configured provider for bare default models 2026-04-05 05:04:10 +01:00
Ayaan Zaidi
87a0390666 fix: write nested plugin wizard config paths (#61159) 2026-04-05 08:59:12 +05:30
Ayaan Zaidi
69be9c4a6f fix: widen path utils root contract 2026-04-05 08:59:12 +05:30
Ayaan Zaidi
9af48d9c10 fix: write nested plugin wizard config paths 2026-04-05 08:59:12 +05:30
Ayaan Zaidi
11e6c9de2e fix: cancel in-flight Android talk playback on stop (#61164) 2026-04-05 08:53:36 +05:30
Ayaan Zaidi
a746ba2dcb test(android): cover playback disable idempotency 2026-04-05 08:53:36 +05:30
Ayaan Zaidi
8d1f9ab5b8 fix(android): cancel in-flight talk playback on stop 2026-04-05 08:53:36 +05:30
OfflynAI
f0c970fb43 fix: skip sandbox skill copy junk (#61090) (thanks @joelnishanth)
* fix(skills): exclude .git and node_modules when copying skills to workspace (#60879)

* fix(skills): cover sync copy exclusions

* fix: skip sandbox skill copy junk (#61090) (thanks @joelnishanth)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-05 08:42:58 +05:30
Peter Steinberger
a235f5ed64 test: stabilize gateway control ui auth suites 2026-04-05 12:11:29 +09:00
Peter Steinberger
2636cc261c fix: scope discord doctor allowFrom alias migration 2026-04-05 04:06:31 +01:00
Ayaan Zaidi
8355f24652 test: fix talk config gate regression 2026-04-05 08:34:33 +05:30
Peter Steinberger
54a360a33e fix: stabilize shared auth and sessions send tests 2026-04-05 12:03:30 +09:00
Peter Steinberger
cad1b89b26 fix: keep core gateway tool invokes on shipped tools 2026-04-05 12:03:30 +09:00
Peter Steinberger
740d096009 test: stabilize config apply gateway suite 2026-04-05 12:03:30 +09:00
Peter Steinberger
1811e54920 test: fix plugin stream typing assertions 2026-04-05 12:03:30 +09:00
Peter Steinberger
6596e64a68 fix: stabilize gateway auth fallback tests 2026-04-05 12:03:30 +09:00
Vincent Koc
2246e8f0a9 fix(ci): sanitize providerless model warning 2026-04-05 12:02:05 +09:00
Vincent Koc
d23a81baa1 fix(ci): add no-wait completion reply option 2026-04-05 12:00:41 +09:00
Vincent Koc
19ef298678 fix(ci): skip reply wait for non-message subagents 2026-04-05 11:59:16 +09:00
Vincent Koc
7d34c1dc4c test(ci): cover non-waiting subagent completion 2026-04-05 11:58:47 +09:00
Cathryn Lavery
7587e4cac3 fix: ensure bypassPermissions when custom CLI backend args override defaults (#61114)
* fix: ensure bypassPermissions on custom CLI backend args

When users override cliBackends.claude-cli.args (e.g. to add --verbose
or change --output-format), the override array replaces the default
entirely. The normalization step only re-added --permission-mode
bypassPermissions when the legacy --dangerously-skip-permissions flag
was present — if neither flag existed, it did nothing.

This causes cron and heartbeat runs to silently fail with "exec denied:
Cron runs cannot wait for interactive exec approval" because the CLI
subprocess launches in interactive permission mode.

Fix: always inject --permission-mode bypassPermissions when no explicit
permission-mode flag is found in the resolved args, regardless of
whether the legacy flag was present.

* test(anthropic): add claude-cli permission normalization coverage

* fix(test-utils): include video generation providers

* fix: preserve claude-cli bypassPermissions on custom args (#61114) (thanks @cathrynlavery)

---------

Co-authored-by: Shadow <hi@shadowing.dev>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-04-04 21:55:14 -05:00
Ayaan Zaidi
91ddf3857a fix: use talk.speak for Android replies (#60954) 2026-04-05 08:20:47 +05:30
Ayaan Zaidi
e4fe853439 fix(android): fall back on legacy talk errors 2026-04-05 08:20:47 +05:30
Ayaan Zaidi
dd6b160707 fix(android): tighten compressed talk playback 2026-04-05 08:20:47 +05:30
Michael Faath
628fc21192 Android: stop reply speaker on voice teardown 2026-04-05 08:20:47 +05:30
Michael Faath
5942b1062e Android: route voice replies through reply speaker 2026-04-05 08:20:47 +05:30
Michael Faath
b4f0e5ae2c Android: fix mic capture queue race 2026-04-05 08:20:47 +05:30
Michael Faath
a4ada035d8 Gateway: use runtime config for talk.speak 2026-04-05 08:20:47 +05:30
Ayaan Zaidi
3f67a52d52 docs(talk): update android playback docs 2026-04-05 08:20:47 +05:30
Ayaan Zaidi
aae3ab152a chore(protocol): regenerate swift talk models 2026-04-05 08:20:47 +05:30
Ayaan Zaidi
db13a29bbf test(android): cover talk.speak playback helpers 2026-04-05 08:20:47 +05:30
Ayaan Zaidi
98d5939564 feat(android): add talk.speak playback path 2026-04-05 08:20:47 +05:30
Ayaan Zaidi
b558610ef3 fix(elevenlabs): pass talk latency override 2026-04-05 08:20:47 +05:30
Ayaan Zaidi
823ce7957d fix(gateway): harden talk.speak responses 2026-04-05 08:20:47 +05:30
Peter Steinberger
fb580b551e fix: restore provider and config compatibility checks 2026-04-05 03:47:57 +01:00
Neerav Makwana
22175faaec fix: trim menu descriptions before dropping commands (#61129) (thanks @neeravmakwana)
* fix(telegram): trim menu descriptions before dropping commands

* fix: note Telegram command menu trimming (#61129) (thanks @neeravmakwana)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-05 08:05:16 +05:30
Vincent Koc
f217e6b72d fix(test-utils): include video generation providers 2026-04-05 11:09:51 +09:00
Vincent Koc
b56517b0ee refactor(providers): tighten family outlier contracts 2026-04-05 11:09:26 +09:00
scoootscooob
6ab1b43081 fix(dotenv): load gateway.env compatibility fallback (#61084)
* fix(dotenv): load gateway env fallback

* fix(dotenv): preserve legacy cli env loading

* fix(dotenv): keep gateway fallback scoped to default profile
2026-04-04 18:24:29 -07:00
scoootscooob
9860db5cea fix(memory): allow Gemini multimodal fallback before registry hydration (#61085)
* fix(memory): allow Gemini multimodal fallback

* docs(memory): clarify multimodal fallback
2026-04-04 18:24:20 -07:00
Andy Tien
dca21563c6 fix(cli): set non-zero exit code on argument errors (#60923)
Merged via squash.

Prepared head SHA: 0de0c43111
Co-authored-by: Linux2010 <35169750+Linux2010@users.noreply.github.com>
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Reviewed-by: @altaywtf
2026-04-05 03:17:51 +03:00
Altay
f299bb812b test(agents): stabilize announce cleanup assertions (#61088)
* test(plugin-sdk): use telegram public config seam

* test(agents): stabilize announce cleanup assertions
2026-04-05 03:09:28 +03:00
Altay
04b64e40d4 test(plugin-sdk): type telegram command config mock 2026-04-05 02:37:16 +03:00
Altay
2ba3484d10 fix(plugin-sdk): avoid telegram config import side effects (#61061)
* fix(plugin-sdk): avoid telegram config import side effects

* fix(plugin-sdk): address telegram contract review

* test(plugin-sdk): tighten telegram contract guards
2026-04-05 02:32:04 +03:00
Altay
d37e4a6c3a fix(contracts): align Teams guard and MiniMax loader (#61068) 2026-04-05 02:13:46 +03:00
Peter Steinberger
2781897d2c fix: restore provider policy fallbacks 2026-04-04 23:43:47 +01:00
Altay
2b3e89c6d4 fix(ci): remove anthropic auth parse error 2026-04-05 01:40:25 +03:00
Altay
ccc7549afe fix(ci): break facade runtime init cycle (#61053)
* fix(ci): break facade runtime init cycle

* style(config): normalize provider schema imports
2026-04-05 01:31:59 +03:00
Kim
fd71bc04ec fix(skills): unify runtime inclusion and available_skills exposure policy (#60852)
Merged via squash.

Prepared head SHA: 2b48b3a455
Co-authored-by: KimGLee <150593189+KimGLee@users.noreply.github.com>
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Reviewed-by: @altaywtf
2026-04-05 01:30:22 +03:00
coolramukaka-sys
70015be8b5 fix(msteams): replace deprecated HttpPlugin with httpServerAdapter (#60939)
Merged via squash.

Prepared head SHA: 7fe7f3c6bb
Co-authored-by: coolramukaka-sys <271658891+coolramukaka-sys@users.noreply.github.com>
Co-authored-by: BradGroux <3053586+BradGroux@users.noreply.github.com>
Reviewed-by: @BradGroux
2026-04-04 17:21:45 -05:00
Peter Steinberger
37301cbc3b docs: clarify anthropic extra usage billing 2026-04-05 07:14:35 +09:00
Peter Steinberger
b4216d197d fix: restore anthropic setup-token auth flow 2026-04-05 07:14:35 +09:00
Xi Qi
334c4be73e style(UI): improve mobile chat layout (#60220)
* UI: improve mobile chat layout

* change .chat-group-messages min-width: from 604 to 602

* UI: fix chat-group-messages overflow in split-view and mobile layouts

* UI: revert chat.css import order in styles.css and components.css

* UI: simplify mobile chat layout overrides in grouped.css

* ui: move .chat and .chat-thread styles to chat/layout.css

* fix: document mobile chat layout improvements

* fix: improve narrow mobile chat width

---------

Co-authored-by: Altay <altay@uinaf.dev>
2026-04-05 01:05:48 +03:00
zhuzm
9d7fe7cdd2 Control UI: use a dedicated loading style for the Cron refresh button (#60394)
Merged via squash.

Prepared head SHA: f7757b9e34
Co-authored-by: coder-zhuzm <63866641+coder-zhuzm@users.noreply.github.com>
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Reviewed-by: @altaywtf
2026-04-05 00:59:07 +03:00
bbddbb
96aea0a6d6 fix(ui): prevent overview access grid layout overlap on resize (#56924)
Merged via squash.

Prepared head SHA: ab327093fc
Co-authored-by: bbddbb1 <75060417+bbddbb1@users.noreply.github.com>
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Reviewed-by: @altaywtf
2026-04-05 00:39:25 +03:00
Hanna
8b06ca205a fix(avatar): check ui.assistant.avatar in resolveAvatarSource (#60778)
Merged via squash.

Prepared head SHA: df8d953a14
Co-authored-by: hannasdev <4538260+hannasdev@users.noreply.github.com>
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Reviewed-by: @altaywtf
2026-04-05 00:36:02 +03:00
Peter Steinberger
63cabcb524 test: stabilize forked gateway suites 2026-04-05 06:33:07 +09:00
Peter Steinberger
801b5d4afa fix: stabilize isolated gateway test runtime 2026-04-05 06:33:07 +09:00
Peter Steinberger
329fbc3f89 docs: refresh claude-cli migration cli mirror 2026-04-04 22:22:04 +01:00
Peter Steinberger
bc910942e2 docs: refresh history sanitization tag mirrors 2026-04-04 22:21:26 +01:00
Peter Steinberger
eee868452f docs: refresh claude-cli model ref mirrors 2026-04-04 22:19:07 +01:00
Peter Steinberger
896928d8c0 docs: refresh slack secretref status mirrors 2026-04-04 22:14:15 +01:00
Peter Steinberger
6de100d4e2 docs: refresh claude-cli naming mirrors 2026-04-04 22:11:45 +01:00
Peter Steinberger
8ea5b1ddc0 docs: refresh anthropic token compatibility mirrors 2026-04-04 22:09:21 +01:00
@zimeg
13b6a48991 fix(slack): import plugin secret input config 2026-04-04 14:09:00 -07:00
Peter Steinberger
66a0ab3752 docs: refresh anthropic auth mirror refs 2026-04-04 22:07:08 +01:00
Peter Steinberger
9eb3718438 docs: refresh token auth command mirrors 2026-04-04 22:05:05 +01:00
Peter Steinberger
5c5c82dfaa docs: refresh anthropic oauth defaults refs 2026-04-04 22:01:16 +01:00
Peter Steinberger
f14f7b9fde docs: refresh silent token guidance mirrors 2026-04-04 21:58:12 +01:00
Altay
0089eb28fa fix(pnpm-workspace): add acpx to minimumReleaseAgeExclude (#61032) 2026-04-04 23:57:34 +03:00
Peter Steinberger
102f7f34e1 docs: refresh silent token semantics mirrors 2026-04-04 21:56:30 +01:00
Peter Steinberger
3d65b14019 docs: refresh NO_REPLY history mirrors 2026-04-04 21:55:11 +01:00
Peter Steinberger
adfdde5cb3 docs: refresh chat history sanitization mirrors 2026-04-04 21:53:25 +01:00
Peter Steinberger
291afbbb95 docs: refresh transcript sanitization mirrors 2026-04-04 21:52:15 +01:00
Mulualem
de918c282c fix(ui): tighten cron row overflow constraints 2026-04-04 15:50:03 -05:00
Mulualem
69cc35c9bd fix(ui): constrain cron job entries within list boundary 2026-04-04 15:50:03 -05:00
Peter Steinberger
b83c5fb8e0 docs: refresh provider runtime fallback refs 2026-04-04 21:48:41 +01:00
Peter Steinberger
38e54f488a docs: refresh native approval ui mirrors 2026-04-04 21:44:30 +01:00
Peter Steinberger
4f9804ec24 docs: refresh config schema and gateway tool mirrors 2026-04-04 21:43:09 +01:00
Peter Steinberger
746a57a2af docs: refresh sdk provider hook inventory refs 2026-04-04 21:39:18 +01:00
Peter Steinberger
93f11ff9f7 docs: refresh provider hook inventory coverage refs 2026-04-04 21:38:01 +01:00
Peter Steinberger
73d50fba28 docs: refresh provider hook inventory refs 2026-04-04 21:33:31 +01:00
Peter Steinberger
0fb53f1b90 docs: refresh provider transport and synthetic auth refs 2026-04-04 21:31:50 +01:00
Peter Steinberger
dd5439dd5b docs: refresh tool catalog mirrors 2026-04-04 21:28:05 +01:00
Peter Steinberger
4324eac5e9 docs: refresh config schema metadata mirrors 2026-04-04 21:26:51 +01:00
Peter Steinberger
849dbc58b1 docs: refresh gateway overview mirrors 2026-04-04 21:25:40 +01:00
Peter Steinberger
4b5146921c docs: refresh bridge removal mirrors 2026-04-04 21:24:09 +01:00
Peter Steinberger
79e8edc7bd docs: expand gateway protocol method and event refs 2026-04-04 21:20:11 +01:00
Peter Steinberger
8bc59eceb7 docs: refresh gateway feature registry mirrors 2026-04-04 21:18:02 +01:00
Chinar Amrutkar
e419989c34 docs: add PR limits to contribution guide (#60910)
Add PR limits section explaining:
- 10 open PRs per author cap
- r: too-many-prs label auto-close mechanism
- How to get exception via #clawtributors Discord

Fixes: #38283
2026-04-05 05:17:10 +09:00
@zimeg
28e1142a24 revert(slack): use packaged thread status method 2026-04-04 13:15:57 -07:00
@zimeg
68b84980cc refactor(slack): use packaged thread status method 2026-04-04 13:14:06 -07:00
Peter Steinberger
b60eee6017 docs: refresh memory status summary refs 2026-04-04 21:13:49 +01:00
Peter Steinberger
e2b841d7d0 docs: refresh shared-secret default mirrors 2026-04-04 21:11:16 +01:00
Peter Steinberger
0738ed8d19 docs: refresh control-ui shared-secret mirrors 2026-04-04 21:05:12 +01:00
Peter Steinberger
90387d4a88 docs: refresh hosted shared-secret auth mirrors 2026-04-04 21:04:17 +01:00
Peter Steinberger
7678917c49 docs: refresh exposed bind auth mirrors 2026-04-04 21:01:34 +01:00
Peter Steinberger
1ae356c40c docs: refresh sandbox bind security refs 2026-04-04 20:57:37 +01:00
@zimeg
86aa24b7a5 docs(slack): move typing status indicator to reaction fallback 2026-04-04 12:56:54 -07:00
Peter Steinberger
3b4bed7c38 docs: refresh model-scoped cooldown mirrors 2026-04-04 20:54:05 +01:00
Peter Steinberger
59a6bf7569 docs: refresh auth probe reason-code refs 2026-04-04 20:51:43 +01:00
Peter Steinberger
136a5ad2eb docs: refresh background process tool refs 2026-04-04 20:49:15 +01:00
Peter Steinberger
4b993ba6e4 docs: refresh config schema mirror refs 2026-04-04 20:45:46 +01:00
Peter Steinberger
e336300e60 docs: refresh failover and compaction pattern refs 2026-04-04 20:43:58 +01:00
Peter Steinberger
97a587ddca docs: refresh qwen auth-choice mirrors 2026-04-04 20:40:31 +01:00
Peter Steinberger
0ef29325ed docs: refresh config schema mirror refs 2026-04-04 20:38:15 +01:00
Peter Steinberger
420f2191f5 docs: refresh whatsapp helper sdk refs 2026-04-04 20:36:30 +01:00
Peter Steinberger
ba8eb4af38 docs: refresh config schema output refs 2026-04-04 20:35:01 +01:00
Peter Steinberger
976bc47458 docs: refresh gateway rpc safe-flow mirrors 2026-04-04 20:32:28 +01:00
Peter Steinberger
13396fa99e docs: refresh gateway tool safe-edit mirrors 2026-04-04 20:31:34 +01:00
Peter Steinberger
2bd91a0f02 docs: refresh browser existing-session mirror refs 2026-04-04 20:29:31 +01:00
Peter Steinberger
8efb0801a0 docs: refresh browser existing-session limit refs 2026-04-04 20:26:30 +01:00
Peter Steinberger
bbdc429dcb docs: refresh voice-call streaming transcription refs 2026-04-04 20:23:28 +01:00
Peter Steinberger
46cb292c2a docs: refresh Firecrawl and web_fetch config refs 2026-04-04 20:21:16 +01:00
Peter Steinberger
33f8ca6cb0 docs: refresh reserved sdk helper refs 2026-04-04 20:17:52 +01:00
Peter Steinberger
8eb1ea5b2e docs: refresh config schema mirrors 2026-04-04 20:14:33 +01:00
@zimeg
c2027d9de2 docs(slack): remove text streaming scope requirements 2026-04-04 12:13:25 -07:00
Peter Steinberger
4453b51e2c docs: refresh session tool inventory refs 2026-04-04 20:10:44 +01:00
Hiroshi Tanaka
3f1b369f4a feat(config): add rich description fields to JSON Schema output [AI-assisted] (#60067)
Merged via squash.

Prepared head SHA: a98b971924
Co-authored-by: solavrc <145330217+solavrc@users.noreply.github.com>
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Reviewed-by: @altaywtf
2026-04-04 22:10:08 +03:00
Peter Steinberger
92aed3168a docs: refresh core tool catalog mirrors 2026-04-04 20:09:24 +01:00
Peter Steinberger
da8a4131fe docs: refresh manifest contract examples 2026-04-04 20:07:01 +01:00
Peter Steinberger
ccd45bd9f0 fix(agents): refresh runtime tool and subagent coverage 2026-04-04 20:06:32 +01:00
Peter Steinberger
496df07804 fix(extensions): align provider helper surfaces 2026-04-04 20:06:32 +01:00
Peter Steinberger
6d5e2c7e6b docs: refresh legacy manifest contract refs 2026-04-04 20:04:11 +01:00
Peter Steinberger
c488becf43 docs: refresh plugin overview mirrors 2026-04-04 20:03:17 +01:00
Peter Steinberger
67d6fc8847 chore(plugins): sync versions to 2026.4.4 2026-04-04 20:03:01 +01:00
Peter Steinberger
7c1c4daa4e docs: refresh realtime transcription capability refs 2026-04-04 20:02:14 +01:00
Peter Steinberger
7988b5962a docs: refresh plugin capability inventory refs 2026-04-04 20:01:19 +01:00
Peter Steinberger
43acbcd283 docs: refresh plugin capability registration refs 2026-04-04 19:59:50 +01:00
Peter Steinberger
36b64969bc docs: refresh qwen sdk helper refs 2026-04-04 19:58:29 +01:00
Peter Steinberger
e0ef3855ca docs: refresh video generation config refs 2026-04-04 19:56:54 +01:00
Peter Steinberger
62dd299af1 docs: refresh qwen video generation refs 2026-04-04 19:55:39 +01:00
Peter Steinberger
28946635aa docs: refresh provider runtime hook refs 2026-04-04 19:52:56 +01:00
Peter Steinberger
4650b972b9 docs: refresh provider scoped failover refs 2026-04-04 19:49:54 +01:00
Peter Steinberger
a29755615e docs: refresh configured provider fallback refs 2026-04-04 19:48:46 +01:00
Peter Steinberger
3b47c0af28 docs: refresh video generation plugin refs 2026-04-04 19:47:30 +01:00
Peter Steinberger
c3ee8c611d docs: refresh video generation sdk refs 2026-04-04 19:45:59 +01:00
Peter Steinberger
879d45a56c docs: refresh qwen media and config refs 2026-04-04 19:42:13 +01:00
Peter Steinberger
b1279b0db3 docs: refresh untrusted file wrapper refs 2026-04-04 19:39:09 +01:00
Peter Steinberger
eaef4ee1b1 docs: refresh heartbeat skip-reason refs 2026-04-04 19:36:34 +01:00
Peter Steinberger
ca200eb480 fix(providers): stabilize runtime normalization hooks 2026-04-04 19:34:56 +01:00
Peter Steinberger
e06e36d41a docs(qwen): fix front matter formatting 2026-04-04 19:34:56 +01:00
Peter Steinberger
889ddb5edf docs(qwen): refresh provider and endpoint guides 2026-04-04 19:34:56 +01:00
Peter Steinberger
df7693027c style(qwen): apply formatter follow-ups 2026-04-04 19:34:56 +01:00
Peter Steinberger
e3ac0f43df feat(qwen): add qwen provider and video generation 2026-04-04 19:34:56 +01:00
Peter Steinberger
759373e887 docs: refresh multi-agent sandbox recall mirror 2026-04-04 19:33:48 +01:00
Peter Steinberger
d0d57ea435 docs: refresh session recall sanitization mirrors 2026-04-04 19:33:13 +01:00
Peter Steinberger
9aec55f0a2 docs: refresh text runtime sdk refs 2026-04-04 19:31:32 +01:00
Peter Steinberger
c329dd8250 docs: refresh subagent completion fallback refs 2026-04-04 19:29:58 +01:00
Peter Steinberger
f94645dfe5 docs: refresh session recall sanitization refs 2026-04-04 19:26:37 +01:00
Peter Steinberger
fd222d3f07 docs: refresh chat history scaffolding refs 2026-04-04 19:23:55 +01:00
Peter Steinberger
3b109c3419 docs: refresh push-based orchestration refs 2026-04-04 19:22:39 +01:00
Peter Steinberger
e42deea653 docs: refresh sessions_history safety refs 2026-04-04 19:20:34 +01:00
Peter Steinberger
39d9ded2e5 docs: refresh chat history display mirrors 2026-04-04 19:17:58 +01:00
Vincent Koc
6f2e804182 fix(agents): prefer background completion wake over polling (#60877)
* fix(agents): prefer completion wake over polling

* fix(changelog): note completion wake guidance

* fix(agents): qualify quiet exec completion wake

* fix(agents): qualify disabled exec completion wake

* fix(agents): split process polling from control actions
2026-04-05 03:17:10 +09:00
Peter Steinberger
0c3ec064f1 docs: refresh OpenResponses file input refs 2026-04-04 19:13:44 +01:00
Peter Steinberger
852d3a742c docs: refresh gateway probe warning mirrors 2026-04-04 19:10:31 +01:00
Peter Steinberger
3bf538d720 docs: refresh gateway status deep mirrors 2026-04-04 19:06:30 +01:00
Peter Steinberger
f3ce1bdb4f docs: refresh platform discovery mirrors 2026-04-04 19:03:20 +01:00
Peter Steinberger
40f958a953 fix(ci): narrow runtime seams and partial mocks 2026-04-04 19:03:00 +01:00
Peter Steinberger
83fe8efe3d fix(test): isolate ollama runtime test seams 2026-04-04 19:03:00 +01:00
oliviareid-svg
7ff90c516a fix: strip leaked outbound tool-call scaffolding (#60619)
Co-authored-by: Frank Yang <frank.ekn@gmail.com>
2026-04-05 02:02:36 +08:00
Peter Steinberger
0cf9c6ec95 docs: refresh discovery TXT mode refs 2026-04-04 19:01:18 +01:00
Peter Steinberger
e6f054ac76 docs: refresh gateway probe and discovery refs 2026-04-04 19:00:09 +01:00
Peter Steinberger
ac5d1de13a docs: refresh status deep health mirrors 2026-04-04 18:56:46 +01:00
Peter Steinberger
65bb1e772b docs: refresh remote gateway ssh mirrors 2026-04-04 18:56:08 +01:00
Mason
09016db731 fix: wrap untrusted file inputs (#60277)
Merged via squash.

Prepared head SHA: 56ce545786
Co-authored-by: hxy91819 <8814856+hxy91819@users.noreply.github.com>
Co-authored-by: frankekn <4488090+frankekn@users.noreply.github.com>
Reviewed-by: @frankekn
2026-04-05 01:54:48 +08:00
Peter Steinberger
9d45f4b4e9 docs: refresh gateway health snapshot refs 2026-04-04 18:54:04 +01:00
Peter Steinberger
72b59231a3 docs: refresh channels status probe mirrors 2026-04-04 18:52:01 +01:00
Peter Steinberger
6d89b363a2 docs: refresh setup-code bootstrap scope mirrors 2026-04-04 18:48:26 +01:00
Peter Steinberger
a10ba044bc docs: refresh approval error helper refs 2026-04-04 18:47:15 +01:00
Peter Steinberger
8fd53cdf86 docs: refresh bootstrap scope role-prefix refs 2026-04-04 18:46:30 +01:00
Peter Steinberger
131a78d3f3 docs: refresh setup runtime helper refs 2026-04-04 18:45:12 +01:00
Peter Steinberger
2b548aa2b1 docs: refresh elevated config mirror refs 2026-04-04 18:40:14 +01:00
Peter Steinberger
4db910698a docs: refresh sandbox and security elevated refs 2026-04-04 18:39:12 +01:00
Peter Steinberger
f1d8786a96 docs: refresh exec host and elevated refs 2026-04-04 18:38:10 +01:00
Peter Steinberger
9fbbdc62c8 docs: refresh shared native approval auto-enable refs 2026-04-04 18:34:29 +01:00
Peter Steinberger
4154aa8b0f docs: refresh discord native approval approver refs 2026-04-04 18:33:39 +01:00
Peter Steinberger
414e834c26 docs: refresh matrix and slack native approval refs 2026-04-04 18:31:47 +01:00
Peter Steinberger
f81d55d7ea docs: refresh native approval routing refs 2026-04-04 18:28:23 +01:00
Tak Hoffman
3bf1b69ece CI: make bad-barnacle bypass PR auto-response 2026-04-04 12:28:03 -05:00
Peter Steinberger
a08449b83f docs: refresh approval fallback refs 2026-04-04 18:27:27 +01:00
Peter Steinberger
2a80b7f30b docs: refresh silent cron delivery refs 2026-04-04 18:26:28 +01:00
Peter Steinberger
2ab8acb2c9 docs: refresh chat thinking and compaction refs 2026-04-04 18:25:13 +01:00
Gustavo Madeira Santana
e627f53d24 core: dedupe approval not-found handling (#60932)
Merged via squash.

Prepared head SHA: 108221fdfe
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-04 13:23:58 -04:00
Ayaan Zaidi
ef7c84ae92 style: trim live model switch comment noise 2026-04-04 22:42:30 +05:30
Ayaan Zaidi
e4bd4b8b49 style(agents): trim exec routing comments 2026-04-04 22:41:22 +05:30
Ayaan Zaidi
0817bf446f fix: keep NO_REPLY detection case-insensitive 2026-04-04 22:38:59 +05:30
Ayaan Zaidi
cde1e2d3a1 fix: preserve compaction split after trailing tool results 2026-04-04 22:34:05 +05:30
Ayaan Zaidi
3f7bd3bd7b fix: split before unfinished compaction tool turns 2026-04-04 22:30:27 +05:30
Tak Hoffman
3017a71bb7 ui: add chat thinking selector 2026-04-04 11:51:45 -05:00
wangchunyue
f463256660 fix: suppress NO_REPLY direct cron leaks (#45737) (thanks @openperf)
* fix(cron): suppress NO_REPLY sentinel in direct delivery path

* fix: set deliveryAttempted on filtered NO_REPLY to prevent timer fallback

* fix: mark silent NO_REPLY direct deliveries as delivered

* fix(cron): unify silent direct delivery handling

* fix: suppress NO_REPLY direct cron leaks (#45737) (thanks @openperf)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-04 22:16:20 +05:30
wangchunyue
08992e1dbc fix: keep tool calls paired during compaction (#58849) (thanks @openperf)
* fix(compaction): keep tool_use and toolResult together when splitting messages

* fix: keep displaced tool results in compaction chunks

* fix: keep tool calls paired during compaction (#58849) (thanks @openperf)

* fix: avoid stalled compaction splits on aborted tool calls (#58849) (thanks @openperf)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-04 22:12:43 +05:30
Ayaan Zaidi
77509024b8 fix: restore exec host=node routing (#60788) (thanks @openperf) 2026-04-04 21:59:57 +05:30
openperf
d98eaba4c3 fix(agents): resolve exec host=node routing regression and elevated gateway override 2026-04-04 21:59:57 +05:30
wangchunyue
17f086c021 fix: handle subagent live model switches (#58178) (thanks @openperf)
* fix(agents): handle LiveSessionModelSwitchError in subagent execution

Add retry loop for cross-provider model switches in the subagent
command path, mirroring the existing logic in agent-runner-execution.ts.

- Wrap runWithModelFallback in a while(true) loop inside agentCommandInternal
- Catch LiveSessionModelSwitchError and update provider, model,
  fallbackProvider, fallbackModel, providerForAuthProfileValidation,
  sessionEntry.authProfileOverride, and storedModelOverride before retrying
- Guard storedModelOverride update: only set when the model genuinely
  changed (compared before mutation) or a session override already existed
- Reset lifecycleEnded flag so the retried iteration can emit lifecycle events
- Add comprehensive tests covering retry success, error propagation,
  lifecycle reset, auth-profile forwarding, and fallback override state

Fixes #57998

* fix(agents): include provider change in storedModelOverride guard

* fix(agents): validate allowlist and clear stale compaction count on live model switch

* fix(agents): remove broken allowlist guard on live model switch

* fix(agents): address security review — bound retry loop, validate allowlist, redact error in lifecycle events

* fix(agents): restore error observability in lifecycle events using err.message

* fix(agents): sanitize log inputs and shallow-copy sessionEntry on live model switch

* fix(agents): enforce allowlist on empty set and sanitize error message

* fix: handle subagent live model switches (#58178) (thanks @openperf)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-04 21:56:11 +05:30
@zimeg
beee44ba47 docs(slack): reorder sections of introduced concepts 2026-04-04 08:54:31 -07:00
Onur
7de3a16ab4 ACPX: bump pinned version to 0.4.1 (#60918)
* ACPX: bump pinned version to 0.4.1

* ACPX: refresh lockfile for 0.4.1
2026-04-04 17:37:17 +02:00
Altay
ae460eff84 fix(failover): scope openrouter-specific matchers (#60909) 2026-04-04 18:24:03 +03:00
Peter Steinberger
fba6e194bd docs: refresh provider stream export refs 2026-04-04 16:23:00 +01:00
Peter Steinberger
c4205c7aae docs: refresh provider stream family refs 2026-04-04 16:21:21 +01:00
Peter Steinberger
a7b1a3140f docs: refresh skills cli stream refs 2026-04-04 16:19:34 +01:00
Peter Steinberger
bcaff8c208 docs: refresh failover generic error refs 2026-04-04 16:18:07 +01:00
Peter Steinberger
6067fe59d8 docs: refresh mcp config refs 2026-04-04 16:15:11 +01:00
Peter Steinberger
89535f9313 docs: refresh pairing locality refs 2026-04-04 16:13:04 +01:00
Aaron Zhu
983909f826 fix(agents): classify generic provider errors for failover (#59325)
* fix(agents): classify generic provider errors for failover

Anthropic returns bare 'An unknown error occurred' during API instability
and OpenRouter wraps upstream failures as 'Provider returned error'. Neither
message was recognized by the failover classifier, so the error surfaced
directly to users instead of triggering the configured fallback chain.

Add both patterns to the serverError classifier so they are classified as
transient server errors (timeout) and trigger model failover.

Closes #49706
Closes #45834

* fix(agents): scope unknown-error failover by provider

* docs(changelog): note provider-scoped unknown-error failover

---------

Co-authored-by: Aaron Zhu <aaron@Aarons-MacBook-Air.local>
Co-authored-by: Altay <altay@uinaf.dev>
2026-04-04 18:11:46 +03:00
Peter Steinberger
8a6da9d488 docs: refresh gateway auth handshake refs 2026-04-04 16:09:53 +01:00
Altay
5012b52780 fix(cli): route skills list output to stdout when --json is active (#60914)
* fix(cli): route skills list output to stdout when --json is active

runSkillsAction used defaultRuntime.log() which goes through console.log.
The --json preAction hook calls routeLogsToStderr(), redirecting console.log
to stderr. Switch to defaultRuntime.writeStdout() which writes directly to
process.stdout, consistent with how other --json commands (e.g. skills search)
already emit their output.

Fixes #57599

* test(cli): add skills JSON stdout regression coverage

* test(cli): refine skills CLI stream coverage

* fix(cli): add changelog entry for skills JSON stdout fix

---------

Co-authored-by: Aftabbs <aftabbs.wwe@gmail.com>
2026-04-04 18:09:44 +03:00
Peter Steinberger
db0b514e45 docs: refresh typebox protocol samples 2026-04-04 16:06:40 +01:00
Peter Steinberger
bc21e3c83d docs: refresh typebox protocol registry refs 2026-04-04 16:04:25 +01:00
Peter Steinberger
3470a80b36 docs: expand gateway protocol method inventory 2026-04-04 16:02:21 +01:00
Peter Steinberger
beb3740bb7 docs: expand gateway protocol rpc refs 2026-04-04 16:01:15 +01:00
Peter Steinberger
b944da561c docs: refresh sdk inventory refs 2026-04-04 15:57:06 +01:00
Peter Steinberger
5633495c19 docs: refresh provider sdk family refs 2026-04-04 15:53:24 +01:00
Peter Steinberger
b3cfedf312 docs: refresh registration mode mirror refs 2026-04-04 15:48:27 +01:00
Peter Steinberger
4c6b7a3a77 docs: refresh setup entrypoint import refs 2026-04-04 15:47:26 +01:00
Peter Steinberger
eb4c5890ab docs: refresh optional setup helper refs 2026-04-04 15:45:28 +01:00
Peter Steinberger
3b502882b9 docs: refresh setup runtime and promotion refs 2026-04-04 15:43:34 +01:00
Peter Steinberger
226b12d7b5 docs: refresh provider tool compat refs 2026-04-04 15:39:17 +01:00
Peter Steinberger
4dbc66b1ed fix: remove bundled channel startup reentry 2026-04-04 15:39:12 +01:00
Peter Steinberger
b9201e8333 refactor: share announce test runtime seams 2026-04-04 23:38:36 +09:00
Peter Steinberger
5584af7ac3 docs: refresh proxy provider runtime refs 2026-04-04 15:37:20 +01:00
Peter Steinberger
f5cc6a101b style: reflow system prompt tool summary 2026-04-04 23:36:46 +09:00
Peter Steinberger
a4fc1200de style: normalize provider formatting 2026-04-04 23:36:46 +09:00
Peter Steinberger
1ca1ce85ee docs: refresh xai and zai provider refs 2026-04-04 15:34:57 +01:00
Peter Steinberger
de001d0e07 docs: refresh subagent completion delivery refs 2026-04-04 15:32:45 +01:00
Vincent Koc
1f2e068e6b test(providers): require plugin-boundary family coverage 2026-04-04 23:30:28 +09:00
Peter Steinberger
d06633c618 docs: refresh device management authz refs 2026-04-04 15:28:36 +01:00
Peter Steinberger
3dda70a578 docs: refresh gemini cli oauth setup refs 2026-04-04 15:27:42 +01:00
Peter Steinberger
fb8e20ddb6 fix: harden paired-device management authz (#50627) (thanks @coygeek) 2026-04-04 23:27:05 +09:00
Peter Steinberger
9ac9edff43 docs: refresh gateway operator scope refs 2026-04-04 15:25:57 +01:00
Vincent Koc
cb1c2e8f86 test(providers): cover xai and zai stream hooks 2026-04-04 23:24:18 +09:00
Vincent Koc
e277c01953 test(providers): cover openrouter replay family 2026-04-04 23:23:02 +09:00
hugh.li
9dd449045a fix(google-gemini-cli-auth): fix Gemini CLI OAuth failures on Windows (#40729)
* fix(google-gemini-cli-auth): fix Gemini CLI OAuth failures on Windows

Two issues prevented Gemini CLI OAuth from working on Windows:

1. resolveGeminiCliDirs: the first candidate `dirname(dirname(resolvedPath))`
   can resolve to an unrelated ancestor directory (e.g. the nvm root
   `C:\Users\<user>\AppData\Local\nvm`) when gemini is installed via nvm.
   The subsequent `findFile` recursive search (depth 10) then picks up an
   `oauth2.js` from a completely different package (e.g.
   `discord-api-types/payloads/v10/oauth2.js`), which naturally does not
   contain Google OAuth credentials, causing silent extraction failure.

   Fix: validate candidate directories before including them — only keep
   candidates that contain a `package.json` or a `node_modules/@google/
   gemini-cli-core` subdirectory.

2. resolvePlatform: returns "WINDOWS" on win32, but Google's loadCodeAssist
   API rejects it as an invalid Platform enum value (400 INVALID_ARGUMENT),
   just like it rejects "LINUX".

   Fix: use "PLATFORM_UNSPECIFIED" for all non-macOS platforms.

* test(google-gemini-cli-auth): keep oauth regressions portable

* chore(changelog): add google gemini cli auth fix note

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-04-04 23:22:36 +09:00
Peter Steinberger
eddb94555a docs: refresh heartbeat task batching refs 2026-04-04 15:22:01 +01:00
Vincent Koc
3f9e93fd28 test(providers): cover opencode replay family hooks 2026-04-04 23:21:41 +09:00
Joe LaPenna
bb82fe8f19 fix: constrain device bootstrap scope checks by role prefix (#57258) (thanks @jlapenna) (#57258)
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-04-04 23:21:01 +09:00
Vincent Koc
a2e0a094c1 test(providers): cover stream family plugin hooks 2026-04-04 23:20:28 +09:00
Vincent Koc
fa34f3a9d5 fix(ci): restore provider runtime seams 2026-04-04 23:19:23 +09:00
Peter Steinberger
c09e128587 fix(gateway): include talk secrets in CLI pairing defaults (#56481) (thanks @maxpetrusenko) 2026-04-04 23:18:54 +09:00
Max P
8262078ee5 fix(agents): inherit completion announce delivery target (#56481) 2026-04-04 23:18:54 +09:00
Vincent Koc
4fe21de3ce test(providers): cover xai tool compat seam 2026-04-04 23:18:31 +09:00
Vincent Koc
20d14745cf refactor(providers): flatten passthrough provider hooks 2026-04-04 23:16:53 +09:00
Peter Steinberger
ea2f56b4e8 docs: refresh bundled channel naming mirrors 2026-04-04 15:16:11 +01:00
Vincent Koc
1e7f9e8746 test(providers): cover transport family matrix 2026-04-04 23:14:02 +09:00
Peter Steinberger
4be01a5cd5 docs: refresh onboarding channel mirrors 2026-04-04 15:13:14 +01:00
Peter Steinberger
772ee1f81f docs: refresh bundled channel ownership refs 2026-04-04 15:11:20 +01:00
Peter Steinberger
b7e6a3bc9e ci: retrigger workflow shell retry 34 2026-04-04 15:09:50 +01:00
Peter Steinberger
edc51b1fa4 ci: retrigger workflow shell retry 33 2026-04-04 15:09:50 +01:00
Peter Steinberger
6ce96c273f ci: retrigger workflow shell retry 32 2026-04-04 15:09:50 +01:00
Peter Steinberger
37a3b6b25f ci: retrigger workflow shell retry 31 2026-04-04 15:09:50 +01:00
Peter Steinberger
b7296fe5dd ci: retrigger workflow shell retry 30 2026-04-04 15:09:50 +01:00
Peter Steinberger
e191bf36a5 ci: retrigger workflow shell retry 29 2026-04-04 15:09:50 +01:00
Peter Steinberger
9766da7f00 ci: retrigger workflow shell retry 28 2026-04-04 15:09:50 +01:00
Peter Steinberger
e509c5c3ea fix(ci): avoid readonly embedded session mutation 2026-04-04 15:09:50 +01:00
Peter Steinberger
93fe3c5442 ci: retrigger workflow shell retry 27 2026-04-04 15:09:50 +01:00
Peter Steinberger
e949bd7d04 ci: retrigger workflow shell retry 26 2026-04-04 15:09:50 +01:00
Peter Steinberger
a29abebee0 ci: retrigger workflow shell retry 25 2026-04-04 15:09:50 +01:00
Peter Steinberger
dbeab5e60f ci: retrigger workflow shell retry 24 2026-04-04 15:09:50 +01:00
Peter Steinberger
99ebb7a248 ci: retrigger workflow shell retry 23 2026-04-04 15:09:50 +01:00
Peter Steinberger
788cff6759 ci: retrigger workflow shell retry 22 2026-04-04 15:09:50 +01:00
Peter Steinberger
0a69b3558a fix(build): stabilize lazy runtime entrypoints 2026-04-04 15:09:50 +01:00
Peter Steinberger
e5b9e32979 ci: retrigger workflow shell retry 21 2026-04-04 15:09:49 +01:00
Peter Steinberger
fe0b209850 ci: retrigger workflow shell retry 20 2026-04-04 15:09:49 +01:00
Peter Steinberger
8dc049abc5 ci: retrigger workflow shell retry 19 2026-04-04 15:09:49 +01:00
Peter Steinberger
6b265ce415 ci: retrigger workflow shell retry 18 2026-04-04 15:09:49 +01:00
Peter Steinberger
470b4452ce fix(ci): drop stale browser runtime imports 2026-04-04 15:09:49 +01:00
Peter Steinberger
5ef3bdb5f4 ci: retrigger workflow shell retry 17 2026-04-04 15:09:49 +01:00
Peter Steinberger
fb59b5c461 fix(ci): sync openrouter stream hook seams 2026-04-04 15:09:49 +01:00
Peter Steinberger
b575dc704c ci: retrigger workflow shell retry 16 2026-04-04 15:09:49 +01:00
Peter Steinberger
a0dbdbd8d4 ci: retrigger workflow shell retry 15 2026-04-04 15:09:49 +01:00
Peter Steinberger
571cd92b22 ci: retrigger workflow shell retry 14 2026-04-04 15:09:49 +01:00
Peter Steinberger
5a6a2bb861 ci: retrigger workflow shell retry 13 2026-04-04 15:09:49 +01:00
Peter Steinberger
5a3062ffb9 ci: retrigger workflow shell retry 12 2026-04-04 15:09:49 +01:00
Peter Steinberger
e0e6eaa03c ci: retrigger workflow shell retry 11 2026-04-04 15:09:49 +01:00
Peter Steinberger
867402449f ci: retrigger workflow shell retry 10 2026-04-04 15:09:49 +01:00
Peter Steinberger
e1ea02e556 ci: retrigger workflow shell retry 9 2026-04-04 15:09:49 +01:00
Peter Steinberger
d2ff8e28dd ci: retrigger workflow shell retry 8 2026-04-04 15:09:49 +01:00
Peter Steinberger
671c724626 ci: retrigger workflow shell retry 7 2026-04-04 15:09:49 +01:00
Peter Steinberger
cad662196f ci: retrigger workflow shell retry 6 2026-04-04 15:09:49 +01:00
Peter Steinberger
35260d3443 ci: retrigger workflow shell retry 5 2026-04-04 15:09:49 +01:00
Peter Steinberger
a1b794a12c fix(ci): repair node test regressions 2026-04-04 15:09:49 +01:00
Peter Steinberger
41513eaf2b ci: retrigger workflow shell retry 4 2026-04-04 15:09:49 +01:00
Peter Steinberger
7b8c4335b3 ci: retrigger workflow shell retry 3 2026-04-04 15:09:49 +01:00
Peter Steinberger
95480863f3 ci: retrigger workflow shell retry 2 2026-04-04 15:09:49 +01:00
Peter Steinberger
d0e041ad5c ci: retrigger workflow shell retry 2026-04-04 15:09:49 +01:00
Peter Steinberger
2ea583496d ci: retrigger workflow shell another time 2026-04-04 15:09:49 +01:00
Peter Steinberger
9e596e383d ci: retrigger workflow shell again again 2026-04-04 15:09:49 +01:00
Peter Steinberger
f81e31b23e ci: retrigger workflow shell once more 2026-04-04 15:09:49 +01:00
Peter Steinberger
5f8ae068dc ci: retrigger workflow shell again 2026-04-04 15:09:49 +01:00
Peter Steinberger
cad18b5ec2 ci: retrigger workflow shell 2026-04-04 15:09:48 +01:00
Peter Steinberger
dd771f1dc6 fix(ci): repair plugin boundary and bootstrap regressions 2026-04-04 15:09:48 +01:00
Peter Steinberger
a5836343df fix(ci): guard anthropic cli backend registration 2026-04-04 15:09:48 +01:00
Peter Steinberger
73f0b11a88 ci: retrigger workflow shell again 2026-04-04 15:09:48 +01:00
Peter Steinberger
daf4eea943 ci: retrigger stuck workflow shell 2026-04-04 15:09:48 +01:00
Peter Steinberger
2c6c2d4907 ci: retrigger stuck workflow 2026-04-04 15:09:48 +01:00
Peter Steinberger
2a0d5f9094 fix(ci): remove duplicated heartbeat prompt setup 2026-04-04 15:09:48 +01:00
Peter Steinberger
c5c5c77ebb fix(ci): restore contract-safe core imports 2026-04-04 15:09:48 +01:00
Chinar Amrutkar
8cf20a0c59 fix(heartbeat): address review comments 3035416659, 3035425446, 3035425447
- sessionId: derive valid ID from sessionKey (replace : with _)
- Move prompt null check before isolated session setup to avoid churn
- Improve tasks block stripping regex to handle blank lines

Fixes: #3035416659, #3035425446, #3035425447
2026-04-04 15:09:48 +01:00
Peter Steinberger
5c32dddb1c fix(ci): restore heartbeat task batching checks 2026-04-04 15:09:48 +01:00
Chinar Amrutkar
e0634aab66 fix(heartbeat): update task timestamps on alerts-disabled exit
Fixes: #3034825973
2026-04-04 15:09:48 +01:00
Chinar Amrutkar
dbfb0b5618 fix(heartbeat): prevent outer loop from exiting on task field lines
The YAML parser's outer loop was exiting the tasks block when it
encountered 'interval:' or 'prompt:' lines, causing only the first
task to be parsed. Added isTaskField check to skip those lines.

Fixes: #3034790131
2026-04-04 15:09:48 +01:00
Chinar Amrutkar
05c948e4de fix(heartbeat): preserve HEARTBEAT.md directives in task-mode prompt
Pass heartbeatFileContent to resolveHeartbeatRunPrompt and append
non-task directives from HEARTBEAT.md to the task-mode prompt.

Fixes: #3033850983
2026-04-04 15:09:48 +01:00
Chinar Amrutkar
cebea1bf95 fix(heartbeat): remove dead helpers, persist timestamps on all exits
- Remove unused getTaskLastRunMs/updateTaskLastRunMs functions
- Add timestamp updates to all successful exit paths

Fixes: #3030557564, #3034645588
2026-04-04 15:09:48 +01:00
Chinar Amrutkar
5fffdc478e fix(heartbeat): add startedAt param, null prompt handling, timestamp updates
- Fix: Pass startedAt into resolveHeartbeatRunPrompt
- Fix: Return proper object instead of null for no-tasks-due
- Fix: Add early return when prompt is null
- Fix: Persist timestamps on successful exits
2026-04-04 15:09:48 +01:00
Chinar Amrutkar
ba09426707 fix(heartbeat): address review comments - parsing, timing, state, skips
- Fix YAML parsing to capture interval:/prompt: before breaking
- Record task timestamps AFTER successful execution (not before)
- Initialize task state on first run (handle undefined session)
- Skip API call when no tasks due (return null)
- Use startedAt consistently for due-task filtering

Fixes: #3030568439, #3033833124, #3030570872, #3030568408, #3030570872, #3035434022, #3035434368
2026-04-04 15:09:48 +01:00
Chinar Amrutkar
728d14e918 fix: add heartbeatTaskState to SessionEntry type
The heartbeat task batching feature uses heartbeatTaskState to track
last run times for periodic tasks, but this property was missing
from the SessionEntry type, causing TypeScript compilation errors.
2026-04-04 15:09:47 +01:00
Chinar Amrutkar
103bebd651 feat(heartbeat): add task batching support via HEARTBEAT.md
- Add parseHeartbeatTasks() to parse YAML-like task definitions
- Add isTaskDue() to check if task interval has elapsed
- Add heartbeatTaskState to session store for tracking last run times
- Modify resolveHeartbeatRunPrompt to build batched prompts for due tasks
- Update task last run times after successful heartbeat execution

Implements openclaw#29570
2026-04-04 15:09:47 +01:00
Peter Steinberger
890de57036 docs: refresh failover billing refs 2026-04-04 15:09:05 +01:00
Peter Steinberger
5fa60e6535 docs: refresh channel overview mirrors 2026-04-04 15:07:32 +01:00
Peter Steinberger
fde6e07f2a docs: refresh bundled channel setup refs 2026-04-04 15:06:39 +01:00
Peter Steinberger
1a431a532b docs: refresh bundled channel mirrors 2026-04-04 15:05:02 +01:00
Rockcent
b2f972e364 fix(failover): OpenRouter 403 Key limit exceeded triggers billing fallback (#59892)
Merged via squash.

Prepared head SHA: 7f8265231c
Co-authored-by: rockcent <128210877+rockcent@users.noreply.github.com>
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Reviewed-by: @altaywtf
2026-04-04 17:03:21 +03:00
Peter Steinberger
11542e9310 docs: refresh bundled channel plugin refs 2026-04-04 15:02:08 +01:00
Peter Steinberger
f02af9bb41 docs: refresh onboarding channel setup refs 2026-04-04 15:00:41 +01:00
Peter Steinberger
9dea255ee2 docs: refresh bundled channel overview refs 2026-04-04 14:58:17 +01:00
Peter Steinberger
756cb22f15 docs: refresh model selection fallback refs 2026-04-04 14:55:44 +01:00
Peter Steinberger
3e5bcc8cb2 docs: refresh isolated cron model switch refs 2026-04-04 14:53:45 +01:00
Vincent Koc
9cc300be78 fix(ci): restore main follow-up checks 2026-04-04 22:51:31 +09:00
Peter Steinberger
aa32f74fe6 docs: refresh cron delivery ownership refs 2026-04-04 14:51:08 +01:00
Peter Steinberger
981737035d docs: refresh isolated cron delivery refs 2026-04-04 14:48:51 +01:00
Peter Steinberger
3bc2e47966 docs: clarify failover 402 handling 2026-04-04 14:46:32 +01:00
Peter Steinberger
73584b1d33 docs: refresh failover and compaction refs 2026-04-04 14:44:51 +01:00
Peter Steinberger
bbb73d3171 refactor: split isolated cron runner phases 2026-04-04 14:42:35 +01:00
Peter Steinberger
9698ba7215 test: split isolated cron harness resets 2026-04-04 14:42:35 +01:00
Peter Steinberger
91d20781ed refactor: extract isolated cron execution seams 2026-04-04 14:42:35 +01:00
Peter Steinberger
083b882052 style(plugin-sdk): format provider stream helpers 2026-04-04 22:40:08 +09:00
Peter Steinberger
f9717f2eae fix(agents): align runtime with updated deps 2026-04-04 22:40:08 +09:00
Peter Steinberger
76d1f26782 chore(deps): update workspace dependencies 2026-04-04 22:40:08 +09:00
Peter Steinberger
70b39f4893 docs: refresh mattermost group config refs 2026-04-04 14:39:38 +01:00
Peter Steinberger
60206817b3 docs: refresh telegram command sdk refs 2026-04-04 14:38:33 +01:00
ToToKr
3b80f42152 fix(mattermost): add groups property to config schema (#57618) (#58271)
Merged via squash.

Prepared head SHA: 8d478fc092
Co-authored-by: MoerAI <26067127+MoerAI@users.noreply.github.com>
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Reviewed-by: @altaywtf
2026-04-04 16:37:53 +03:00
Peter Steinberger
8ca5a9174a docs: refresh gateway auth precedence refs 2026-04-04 14:36:52 +01:00
Peter Steinberger
882654d9ae docs: refresh talk config and doctor refs 2026-04-04 14:35:03 +01:00
Peter Steinberger
13f9475f6c docs: refresh bootstrap handoff token refs 2026-04-04 14:32:40 +01:00
Peter Steinberger
93ab8dd531 test: add CLI handshake regression coverage (#50240) (thanks @xiwuqi) 2026-04-04 22:32:15 +09:00
Peter Steinberger
114496871d docs: refresh tailscale auth rate limit refs 2026-04-04 14:30:13 +01:00
Peter Steinberger
7d22a16adb fix: bound bootstrap handoff token scopes 2026-04-04 22:29:52 +09:00
Peter Steinberger
7c0752f834 docs: refresh cron model override refs 2026-04-04 14:26:46 +01:00
Peter Steinberger
f502b023d9 docs: refresh device token scope mirrors 2026-04-04 14:25:47 +01:00
Peter Steinberger
ebe0a27b4d docs: refresh device token scope refs 2026-04-04 14:23:41 +01:00
Peter Steinberger
3758a0ce5b refactor(gateway): simplify connect auth parsing 2026-04-04 22:23:09 +09:00
Peter Steinberger
68ec7c9bbf docs: refresh plugin config schema refs 2026-04-04 14:21:00 +01:00
AARON AGENT
16e7e2551b fix(cron): prevent agent default model from overriding cron payload model (#58294)
* fix(cron): prevent agent default model from overriding cron payload model (#58065)

When a cron job specifies a model override via the Advanced settings,
runWithModelFallback could silently fall back to the agent's configured
primary model. This happened because fallbacksOverride was undefined
when neither payload.fallbacks nor per-agent fallbacks were configured,
causing resolveFallbackCandidates to append the agent primary as a
last-resort candidate. A transient failure on the cron-selected model
(rate limit, model-not-found, etc.) would then succeed on the agent
default, making it appear as if the override was ignored entirely.

Fix: when the cron payload carries an explicit model override, ensure
fallbacksOverride is always a defined array (empty when no fallbacks
are configured) so the agent primary is never silently appended.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* test: use stricter toEqual([]) assertion for fallbacksOverride

Replace toBeDefined() + toBeInstanceOf(Array) with toEqual([])
to catch regressions where the array unexpectedly gains entries.
Addresses review feedback.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: preserve cron override fallback semantics (#58294)

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-04-04 22:18:38 +09:00
Peter Steinberger
79be1e126a fix: harden parallels smoke harness 2026-04-04 14:18:18 +01:00
Peter Steinberger
99e45eb3ba docs: refresh remote bootstrap refs 2026-04-04 14:17:59 +01:00
Peter Steinberger
3f1b2703b7 fix: preserve cached device token scopes safely (#46032) (thanks @caicongyang) 2026-04-04 22:17:38 +09:00
Assistant
056c0870a9 fix(gateway): preserve stored scopes when reconnecting with device token
When the gateway client reconnects using a stored device token, it was
defaulting to ["operator.admin"] scopes instead of preserving the
previously authorized scopes from the stored token. This caused the
operator device token to be regenerated without operator.read scope,
breaking status/probe/health commands.

This fix:
1. Loads the stored scopes along with the stored token in selectConnectAuth
2. Uses the stored scopes when reconnecting with a valid device token
3. Falls back to explicitly requested scopes or default admin-only scope
   when no stored scopes exist

Fixes #46000
2026-04-04 22:17:38 +09:00
Peter Steinberger
2ecb8ca352 docs: refresh control ui auth ux refs 2026-04-04 14:14:54 +01:00
Peter Steinberger
07c7c4b9ec docs: refresh tailscale http auth refs 2026-04-04 14:13:36 +01:00
Peter Steinberger
11b8a025a4 docs: refresh gateway auth overview refs 2026-04-04 14:12:38 +01:00
Sebastian B Otaegui
33e6a7a28e feat(plugin-sdk): export OpenClawSchema via plugin-sdk/config-schema (#60557)
Merged via squash.

Prepared head SHA: 637ff7d3c8
Co-authored-by: feniix <91633+feniix@users.noreply.github.com>
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Reviewed-by: @altaywtf
2026-04-04 16:10:43 +03:00
Evan Newman
a26b844b88 fix(doctor): avoid repeat talk normalization changes from key order (#59911)
Merged via squash.

Prepared head SHA: a67bcaa11b
Co-authored-by: ejames-dev <180847219+ejames-dev@users.noreply.github.com>
Co-authored-by: hxy91819 <8814856+hxy91819@users.noreply.github.com>
Reviewed-by: @hxy91819
2026-04-04 21:07:10 +08:00
Peter Steinberger
022618e887 docs: refresh browser auth refs 2026-04-04 14:04:24 +01:00
Peter Steinberger
0afd30d325 docs: refresh shared-secret auth mirrors 2026-04-04 14:02:29 +01:00
Peter Steinberger
f8dcd3ed83 docs: refresh tailscale auth mirrors 2026-04-04 14:00:36 +01:00
Peter Steinberger
b0025b1921 docs: refresh hook ingress security refs 2026-04-04 13:59:09 +01:00
Vincent Koc
0d47106b98 fix(tests): restore stream wrapper type coverage 2026-04-04 21:56:48 +09:00
Vincent Koc
71ea82a4f4 fix(build): restore portable provider runtime types 2026-04-04 21:56:48 +09:00
Vincent Koc
2a03326925 fix(plugin-sdk): keep telegram command config available 2026-04-04 21:56:48 +09:00
Vincent Koc
b3faf20d91 perf(agents): avoid repeated subagent registry rescans 2026-04-04 21:56:48 +09:00
Peter Steinberger
6cff644dc9 docs: refresh http endpoint auth refs 2026-04-04 13:56:08 +01:00
Peter Steinberger
032dbf0ec6 fix: serialize async auth rate-limit attempts 2026-04-04 21:55:09 +09:00
Peter Steinberger
c63a32661a docs: refresh gateway auth overview mirrors 2026-04-04 13:54:15 +01:00
Peter Steinberger
11d17b3c38 docs: refresh control ui device identity refs 2026-04-04 13:52:23 +01:00
Vincent Koc
a6707c2e1f refactor(providers): flatten shared stream hooks 2026-04-04 21:51:58 +09:00
Peter Steinberger
8f473023e4 docs: refresh web surface auth mirrors 2026-04-04 13:50:47 +01:00
Hsiao A
ae16452a69 fix(slack): pre-set shuttingDown before app.stop() to prevent orphaned ping intervals (#56646)
Merged via squash with admin override.

Prepared head SHA: f1c91d50b0
Note: required red lanes are currently inherited from latest origin/main, not introduced by this PR.
Co-authored-by: hsiaoa <70124331+hsiaoa@users.noreply.github.com>
Co-authored-by: frankekn <4488090+frankekn@users.noreply.github.com>
Reviewed-by: @frankekn
2026-04-04 20:49:23 +08:00
Peter Steinberger
16346d6784 docs: clarify trusted proxy mirror refs 2026-04-04 13:49:05 +01:00
Peter Steinberger
4991cd66ef docs: refresh reverse proxy hardening refs 2026-04-04 13:47:59 +01:00
Peter Steinberger
7985cf5531 docs: refresh trusted proxy auth guidance 2026-04-04 13:44:34 +01:00
Peter Steinberger
62babffc40 docs: refresh security audit reference docs 2026-04-04 13:42:47 +01:00
jason
6e28bd2eb6 feishu: fix schema 2.0 card config in interactive card UX functions (#53395)
Merged via squash.

Prepared head SHA: 31f2396404
Co-authored-by: drvoss <3031622+drvoss@users.noreply.github.com>
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Reviewed-by: @altaywtf
2026-04-04 15:38:37 +03:00
Peter Steinberger
375bd73ce1 docs: refresh security fix refs 2026-04-04 13:35:42 +01:00
Peter Steinberger
f2b3b3d912 docs: clarify setup node-manager refs 2026-04-04 13:34:02 +01:00
Peter Steinberger
6ee905c7bd docs: refresh gateway skills rpc refs 2026-04-04 13:32:32 +01:00
Peter Steinberger
b05761aae0 docs: refresh skills cli and install refs 2026-04-04 13:31:13 +01:00
Peter Steinberger
db2cc5c28a docs: refresh clawhub mirror refs 2026-04-04 13:29:07 +01:00
Peter Steinberger
f16566d30e docs: refresh cron failure delivery refs 2026-04-04 13:25:44 +01:00
XING
587f19967c fix(cron): notify user via primary delivery channel on job failure (#60622)
Merged via squash.

Prepared head SHA: bee4dfca06
Co-authored-by: artwalker <44759507+artwalker@users.noreply.github.com>
Co-authored-by: frankekn <4488090+frankekn@users.noreply.github.com>
Reviewed-by: @frankekn
2026-04-04 20:24:16 +08:00
Peter Steinberger
c89d4857e4 docs: clarify bundled plugin recovery refs 2026-04-04 13:24:04 +01:00
Peter Steinberger
56960e33e6 docs: refresh plugin install and marketplace refs 2026-04-04 13:22:46 +01:00
Peter Steinberger
3607962a44 docs: refresh plugin channel metadata refs 2026-04-04 13:18:34 +01:00
Peter Steinberger
86c799f4e1 docs: refresh plugin cli and inspect refs 2026-04-04 13:16:39 +01:00
Peter Steinberger
20f9f99db6 docs: refresh plugin manifest and bundle refs 2026-04-04 13:15:25 +01:00
Vincent Koc
9b82692425 refactor(providers): drop trivial stream lambdas 2026-04-04 21:14:00 +09:00
Vincent Koc
b742909dca fix(agents): prefer cron for deferred follow-ups (#60811)
* fix(agents): prefer cron for deferred follow-ups

* fix(agents): gate cron scheduling guidance

* fix(changelog): add scheduling guidance note

* fix(agents): restore exec approval agent hint
2026-04-04 21:11:27 +09:00
Peter Steinberger
d46eabb010 docs: complete sdk export coverage docs 2026-04-04 13:10:46 +01:00
Peter Steinberger
6b991b2afa docs: clarify reserved bundled sdk families 2026-04-04 13:09:17 +01:00
Peter Steinberger
b424a7a3a4 docs: refresh sdk memory import refs 2026-04-04 13:07:52 +01:00
Peter Steinberger
e91b52f396 docs: refresh sdk helper import refs 2026-04-04 13:06:57 +01:00
Peter Steinberger
363c666201 docs: refresh sdk capability import refs 2026-04-04 13:05:49 +01:00
Vincent Koc
486505a54e refactor(providers): share kilocode stream family 2026-04-04 21:05:42 +09:00
Peter Steinberger
dd030fb761 docs: refresh sdk core runtime refs 2026-04-04 13:04:01 +01:00
Peter Steinberger
f9f9462c79 docs: refresh channel helper import refs 2026-04-04 13:02:43 +01:00
Peter Steinberger
8cf6e4b5df fix(plugin-sdk): unblock gateway test surfaces 2026-04-04 21:02:04 +09:00
Peter Steinberger
27972489d3 docs: refresh sdk runtime import refs 2026-04-04 13:01:15 +01:00
Peter Steinberger
cec15e08d1 docs: clarify bundled helper sdk seams 2026-04-04 12:59:26 +01:00
Vincent Koc
8059942216 refactor(providers): share xai stream helper 2026-04-04 20:56:34 +09:00
Peter Steinberger
72f54059c4 docs: refresh setup helper import refs 2026-04-04 12:56:02 +01:00
Peter Steinberger
1c5c15b1d4 docs: refresh sdk entrypoint wording 2026-04-04 12:55:05 +01:00
Peter Steinberger
940bf899f0 docs: refresh provider entry import refs 2026-04-04 12:54:15 +01:00
Peter Steinberger
502b024523 docs: refresh bundled provider package examples 2026-04-04 12:52:55 +01:00
Peter Steinberger
120b1d2ed2 docs: refresh provider package barrel refs 2026-04-04 12:51:31 +01:00
Peter Steinberger
e5b48ea2b4 docs: refresh anthropic stream helper refs 2026-04-04 12:49:53 +01:00
Peter Steinberger
0166fd426e docs: refresh minimax auth path refs 2026-04-04 12:47:07 +01:00
Peter Steinberger
9da0feeecf docs: fix minimax usage docs merge markers 2026-04-04 12:43:44 +01:00
Peter Steinberger
a375635a9a docs: refresh status token fallback refs 2026-04-04 12:42:50 +01:00
Peter Steinberger
fb0d60d7f3 fix: resolve MiniMax portal usage auth 2026-04-04 12:42:30 +01:00
Peter Steinberger
9d684e1040 docs: refresh provider usage auth refs 2026-04-04 12:40:55 +01:00
Peter Steinberger
c0d509e794 docs: refresh status cache fallback refs 2026-04-04 12:39:02 +01:00
Peter Steinberger
ac254f50e8 docs: refresh minimax usage refs 2026-04-04 12:36:18 +01:00
Vincent Koc
83c10350c6 refactor(providers): share anthropic stream helper 2026-04-04 20:35:30 +09:00
Stuart Sy
3f457cabf7 fix(status): hydrate cache usage in transcript fallback (#59247)
* fix(status): hydrate cache usage in transcript fallback

* docs(changelog): note status cache fallback fix

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-04-04 20:34:41 +09:00
Peter Steinberger
3100984a33 docs: refresh browser origin auth refs 2026-04-04 12:34:11 +01:00
Peter Steinberger
72847db28b test: cover android canvas a2ui trust gate 2026-04-04 20:33:24 +09:00
Peter Steinberger
1efce6f23c docs: refresh provider stream family docs 2026-04-04 12:32:43 +01:00
Peter Steinberger
9eb8184f36 fix: improve MiniMax coding-plan parsing (#52349) (thanks @IVY-AI-gif) 2026-04-04 20:32:15 +09:00
IVY
dd9c9dac53 style: format with oxfmt 2026-04-04 20:32:15 +09:00
IVY
30de4337bf fix: address review feedback and formatting
- Remove redundant name === 'MiniMax-M*' condition (already matched by startsWith)
- Use !== undefined guard instead of falsy check in deriveWindowLabelFromTimestamps
- Pass chatRemains directly to deriveWindowLabel when available
- Remove JSDoc comment style to match codebase conventions
2026-04-04 20:32:15 +09:00
IVY
efd5d5eb20 fix(usage): improve MiniMax coding-plan usage parsing for model_remains array
- Pick the chat model entry (MiniMax-M*) from model_remains instead of using the first BFS candidate, which could be a speech/video/image model with total_count=0.
- Derive window label from start_time/end_time timestamps when window_hours/window_minutes fields are absent; fixes the hardcoded 5h default for 4h windows.
- Include model name in plan label so users can distinguish free-tier coding-plan quota from paid API balance.

Closes #52335
2026-04-04 20:32:15 +09:00
Peter Steinberger
90af255a91 docs: refresh gemini cli usage refs 2026-04-04 12:30:55 +01:00
Peter Steinberger
65fcf7e104 fix(gateway): scope browser-origin auth throttling 2026-04-04 20:30:39 +09:00
Vincent Koc
8f7b02e567 refactor(providers): share openai stream families 2026-04-04 20:29:11 +09:00
Peter Steinberger
035a754f0f fix: harden android a2ui trust matching 2026-04-04 20:28:08 +09:00
Peter Steinberger
1cfc10e836 docs: refresh minimax multimodal refs 2026-04-04 12:27:47 +01:00
Vincent Koc
c75f82448f fix(google-cli): parse gemini json response and stats (#60801)
* fix(google-cli): restore gemini json reporting

* fix(google-cli): fall back to stats when usage is empty

* fix(changelog): note gemini cli cache reporting
2026-04-04 20:27:22 +09:00
Peter Steinberger
46cb493ac8 fix(sandbox): cover home credential bind audit 2026-04-04 20:27:10 +09:00
Peter Steinberger
3ec0463da9 docs: refresh minimax thinking refs 2026-04-04 12:23:33 +01:00
Peter Steinberger
3dda75894b refactor(agents): centralize run wait helpers 2026-04-04 20:22:16 +09:00
Peter Steinberger
42778ccd46 docs: refresh provider stream family refs 2026-04-04 12:21:37 +01:00
Peter Steinberger
9615488855 fix: disable MiniMax reasoning leak (#55809) (thanks @moktamd) 2026-04-04 20:21:37 +09:00
moktamd
2701e75f40 fix: disable thinking for MiniMax anthropic-messages streaming
MiniMax M2.7 returns reasoning_content in OpenAI-style delta chunks
({delta: {content: "", reasoning_content: "..."}}) when thinking is
active, rather than native Anthropic thinking block SSE events. Pi-ai's
Anthropic provider does not handle this format, causing the model's
internal reasoning to appear as visible chat output.

Add createMinimaxThinkingDisabledWrapper that injects
thinking: {type: "disabled"} into the outgoing payload for any MiniMax
anthropic-messages request where thinking is not already explicitly
configured, preventing the provider from generating reasoning_content
deltas during streaming.

Fixes #55739
2026-04-04 20:21:37 +09:00
Peter Steinberger
561bacd06a fix: harden synology chat TLS helper defaults 2026-04-04 20:21:13 +09:00
Peter Steinberger
b473816afb docs: refresh native streaming compat refs 2026-04-04 12:20:31 +01:00
Vincent Koc
bc648ac8e6 refactor(providers): add stream family hooks 2026-04-04 20:19:53 +09:00
Peter Steinberger
1037af01ad style(agents): normalize runtime prompt formatting 2026-04-04 12:19:08 +01:00
Peter Steinberger
c70b10460c style(auth): normalize auth choice formatting 2026-04-04 12:19:08 +01:00
Peter Steinberger
f3aad63f4e style(providers): normalize import and wrap formatting 2026-04-04 12:19:08 +01:00
Peter Steinberger
3207c5326a refactor: share native streaming compat helpers 2026-04-04 12:18:45 +01:00
Peter Steinberger
aaa173a4a7 docs: clarify node exec approval binding 2026-04-04 12:18:32 +01:00
Peter Steinberger
9ddfaff45f docs: clarify node exec approval plan forwarding 2026-04-04 12:18:04 +01:00
Peter Steinberger
605f48556b refactor(browser): share lifecycle cleanup helpers 2026-04-04 12:17:46 +01:00
Peter Steinberger
c3f415ad6e fix: preserve node system.run approval plans 2026-04-04 20:16:53 +09:00
Peter Steinberger
f832699fd7 docs: refresh provider hook overview refs 2026-04-04 12:16:29 +01:00
Peter Steinberger
53c33f8207 fix: forward node exec approval plans 2026-04-04 20:16:19 +09:00
Peter Steinberger
62c54fdc16 docs: refresh provider replay family refs 2026-04-04 12:15:31 +01:00
Jasmine Zhang
b838ecf885 fix: add 60s timeout to MiniMax VLM fetch call
The VLM image analysis fetch had no timeout, causing sessions to hang
indefinitely when the MiniMax API is slow or unresponsive. Other
vision/model API calls in the codebase already use timeouts. Adds
AbortSignal.timeout(60_000) consistent with image upload workloads.

Fixes #54139
2026-04-04 20:15:13 +09:00
Peter Steinberger
39bcf695dc fix(cron): reject unsafe custom session targets earlier 2026-04-04 20:13:39 +09:00
Peter Steinberger
00337cdde1 docs: refresh codex auth and ws refs 2026-04-04 12:11:45 +01:00
Vincent Koc
c29d4bbb86 test(providers): add family capability matrix coverage 2026-04-04 20:11:25 +09:00
Peter Steinberger
91bac7cb83 fix(usage): restore provider auth fallback 2026-04-04 12:10:45 +01:00
Peter Steinberger
6bbccb087a docs: refresh google cached content refs 2026-04-04 12:10:29 +01:00
Peter Steinberger
49bf527fd4 docs: clarify reserved gateway method namespaces 2026-04-04 12:08:41 +01:00
Peter Steinberger
9b352ab5b0 test: isolate session status from provider runtime leak 2026-04-04 12:08:05 +01:00
Peter Steinberger
b7411ad594 refactor(cron): share descendant run quiescence wait 2026-04-04 20:07:33 +09:00
Peter Steinberger
7b6334b0f4 refactor(agents): share run wait reply helpers 2026-04-04 20:07:33 +09:00
Peter Steinberger
bbb0b574c4 refactor: centralize gateway method policy helpers 2026-04-04 20:07:18 +09:00
Vincent Koc
d766465e38 fix(google): add direct cachedContent support (#60757)
* fix(google): restore gemini cache reporting

* fix(google): split cli parsing into separate PR

* fix(google): drop remaining cli overlap

* fix(google): honor cachedContent alias precedence
2026-04-04 20:07:13 +09:00
Peter Steinberger
b9e3c1a02e docs: refresh cron and subagent browser cleanup refs 2026-04-04 12:06:39 +01:00
Peter Steinberger
7ffbbd8586 fix: reserve admin gateway method prefixes 2026-04-04 20:04:48 +09:00
Peter Steinberger
86ee50b968 docs: refresh web search overview mirrors 2026-04-04 12:04:28 +01:00
Peter Steinberger
3b09b58c5d test: cover browser cleanup for cron and subagents (#60146) (thanks @BrianWang1990) 2026-04-04 20:03:57 +09:00
BrianWang1990
e697838899 style: fix import order in server-cron.ts
Move plugin-sdk import after cron/* imports per alphabetical convention.
2026-04-04 20:03:57 +09:00
BrianWang1990
72b2e413d6 fix(browser): clean up browser tabs/processes when cron tasks and subagents complete
When cron tasks or subagents use browser automation, the browser
processes were not cleaned up after the task completed. This caused
orphaned Chrome processes (PPID=1) to accumulate over time.

Root cause: closeTrackedBrowserTabsForSessions was only called during
session-reset/session-delete (via ensureSessionRuntimeCleanup), but
isolated cron runs and subagent completions never triggered these paths.

Fix: Add browser tab cleanup in two places:
1. server-cron.ts: wrap runCronIsolatedAgentTurn in try/finally to
   ensure browser tabs are cleaned up after every cron run.
2. subagent-registry-lifecycle.ts: call closeTrackedBrowserTabsForSessions
   when a subagent run completes, before the announce cleanup flow.

Both cleanup calls are best-effort (caught errors) so they never mask
the actual task result or break the completion flow.

Fixes #60104
2026-04-04 20:03:57 +09:00
Peter Steinberger
0b1c9c7057 fix: stabilize codex auth ownership and ws fallback cache 2026-04-04 20:03:15 +09:00
Peter Steinberger
fca889eea3 docs: refresh browser troubleshooting mirrors 2026-04-04 12:02:48 +01:00
Peter Steinberger
29f062770d docs: refresh browser stop cleanup refs 2026-04-04 12:02:10 +01:00
Peter Steinberger
c524d6c76c docs: refresh shared minimax web search refs 2026-04-04 12:00:58 +01:00
Peter Steinberger
bec891b2e2 test: cover attach-only browser stop cleanup (#60097) (thanks @pedh) 2026-04-04 19:59:59 +09:00
pedh
2c9723afd5 fix(browser): disconnect Playwright CDP session on stop for attachOnly/remote profiles
When `browser stop` is called for an `attachOnly` or remote CDP
profile, `profileState.running` is null (no process was launched), so
`stopRunningBrowser()` returned early without closing the Playwright
CDP connection. This left emulation overrides (prefers-color-scheme,
viewport, etc.) permanently applied until a full gateway restart.

Now call `closePlaywrightBrowserConnectionForProfile()` before
returning for attachOnly and remote CDP profiles, matching the cleanup
behavior already present in `resetProfile()`. Regular profiles that
were never started still return `{ stopped: false }`.

Fixes #60095
2026-04-04 19:59:59 +09:00
Peter Steinberger
0bc9f0b5ba docs: refresh browser screenshot route refs 2026-04-04 11:58:46 +01:00
Jithendra
d204be80af feat(tools): add MiniMax as bundled web search provider
Add native MiniMax Search integration via their Coding Plan search API
(POST /v1/coding_plan/search). This brings MiniMax in line with Brave,
Kimi, Grok, Gemini, and other providers that already have bundled web
search support.

- Implement WebSearchProviderPlugin with caching, credential resolution,
  and trusted endpoint wrapping
- Support both global (api.minimax.io) and CN (api.minimaxi.com)
  endpoints, inferred from explicit region config, model provider base
  URL, or minimax-portal OAuth base URL
- Prefer MINIMAX_CODE_PLAN_KEY over MINIMAX_API_KEY in credential
  fallback, matching existing repo precedence
- Accept SecretRef objects for webSearch.apiKey (type: [string, object])
- Register in bundled registry, provider-id compat map, and fast-path
  plugin id list with full alignment test coverage
- Add unit tests for endpoint/region resolution and edge cases

Closes #47927
Related #11399

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-04 19:56:04 +09:00
Peter Steinberger
a722719720 docs: refresh synology webhook auth refs 2026-04-04 11:55:57 +01:00
Peter Steinberger
7d16359aae docs: note Chrome 146 screenshot compat fix (#60682) (thanks @mvanhorn) 2026-04-04 19:55:37 +09:00
Matt Van Horn
b22f6257f0 fix(browser): remove fromSurface: false for Chrome 146+ screenshot compat 2026-04-04 19:55:37 +09:00
Peter Steinberger
05da802e1c refactor: split device-pair command helpers 2026-04-04 19:55:04 +09:00
Peter Steinberger
fdb1be0079 docs: refresh mattermost slash auth refs 2026-04-04 11:54:52 +01:00
Peter Steinberger
8a532dead2 docs: refresh browser cdp validation refs 2026-04-04 11:53:36 +01:00
Peter Steinberger
2a65bfee96 fix(mattermost): harden slash command token validation 2026-04-04 19:51:41 +09:00
Peter Steinberger
53d3fbcef6 docs: refresh browser existing session docs 2026-04-04 11:51:07 +01:00
Peter Steinberger
5583bda61d docs: note browser profile CDP validation fix (#60477) (thanks @eleqtrizit) 2026-04-04 19:51:02 +09:00
Agustin Rivera
5da360cada fix(browser): trim validation error prefix 2026-04-04 19:51:02 +09:00
Agustin Rivera
aefc6fc161 fix(browser): validate profile cdp urls 2026-04-04 19:51:02 +09:00
Peter Steinberger
36cc397548 fix: reuse shared Synology Chat secret compare 2026-04-04 19:49:35 +09:00
Peter Steinberger
c5b2b69f94 docs: refresh live model switch docs 2026-04-04 11:49:23 +01:00
Peter Steinberger
bc356cc8c2 fix: harden direct CDP websocket validation (#60469) (thanks @eleqtrizit) 2026-04-04 19:48:01 +09:00
Agustin Rivera
c3f8427973 fix(browser): validate initial cdp endpoints 2026-04-04 19:48:01 +09:00
Agustin Rivera
80720b4994 fix(browser): validate cdp websocket pivots 2026-04-04 19:48:01 +09:00
Peter Steinberger
e4ea3c03cf fix: scope live model switch pending state (#60266) (thanks @kiranvk-2011) 2026-04-04 19:45:53 +09:00
kiranvk2011
b36a3a3295 fix: add .catch() to fire-and-forget stale-flag clear to prevent unhandled rejection 2026-04-04 19:45:53 +09:00
kiranvk2011
e8f6ceedd4 fix: clear stale liveModelSwitchPending flag when model already matches
When the liveModelSwitchPending flag is set but the current model already
matches the persisted selection (e.g. the switch was applied as an override
and the current attempt is already using the new model), the flag is now
consumed eagerly via a fire-and-forget clearLiveModelSwitchPending() call.

Without this, the stale flag could persist across fallback iterations and
later cause a spurious LiveSessionModelSwitchError when the model rotates
to a fallback candidate that differs from the persisted selection.

Also expands JSDoc on shouldSwitchToLiveModel to document the stale-flag
clearing and deferral semantics.
2026-04-04 19:45:53 +09:00
kiranvk2011
251e086eac fix: use explicit flag for live model switch detection in fallback chain
Replace the ambiguous comparison-based approach (hasDifferentLiveSessionModelSelection
+ in-memory map EMBEDDED_RUN_MODEL_SWITCH_REQUESTS) with a persisted
`liveModelSwitchPending` flag on SessionEntry.

The root cause: the in-memory map was never populated in production because
requestLiveSessionModelSwitch() was removed in commit 622b91d04e and replaced
with refreshQueuedFollowupSession(). This left the comparison-based detection
as the only path, which could not distinguish user-initiated model switches
(via /model command) from system-initiated fallback rotations.

The fix:
- Add `liveModelSwitchPending?: boolean` to SessionEntry (persisted)
- Set the flag to true ONLY when /model command applies a model override
- New `shouldSwitchToLiveModel()` checks the flag + model mismatch together
- New `clearLiveModelSwitchPending()` resets the flag after consumption
- Replace throw-site logic in run.ts to use the new flag-based functions
- Remove orphaned resolveCurrentLiveSelection helper

Only the /model command sets this flag, so system-initiated fallback rotations
are never mistaken for user-initiated model switches. This restores the
live-switch-during-active-run feature that was accidentally broken.

Fixes #57857, #57760, #58137
2026-04-04 19:45:53 +09:00
Peter Steinberger
678e9e6078 docs: refresh gemini cli oauth references 2026-04-04 11:45:37 +01:00
Peter Steinberger
20a7b1a9dc fix: finalize device-pair scope hardening (#55996) (thanks @coygeek) 2026-04-04 19:44:43 +09:00
Coy Geek
9dcef6df02 fix: scope pairing guard to internal gateway callers 2026-04-04 19:44:43 +09:00
Coy Geek
05ca581ed0 fix: fail closed when pairing scopes are missing 2026-04-04 19:44:43 +09:00
Coy Geek
353d93613c fix: enforce pairing approval scopes 2026-04-04 19:44:43 +09:00
Peter Steinberger
5d0562badf docs: clarify cli backend mcp overlays 2026-04-04 11:43:29 +01:00
Peter Steinberger
cc602fe9d4 docs: refresh anthropic cli backend docs 2026-04-04 11:40:58 +01:00
Peter Steinberger
3f042ed002 fix: stabilize async provider test types 2026-04-04 19:39:22 +09:00
Peter Steinberger
87d840e9ee fix: tighten Teams and device typing 2026-04-04 19:39:22 +09:00
Peter Steinberger
75fb29ffe6 docs: refresh provider sdk hook docs 2026-04-04 11:38:25 +01:00
Peter Steinberger
d1bf2c6de1 docs: clarify device token role bounds 2026-04-04 11:36:02 +01:00
Peter Steinberger
e675634eb3 fix: preserve streamed Kimi tool args on repair fallback 2026-04-04 11:35:49 +01:00
Peter Steinberger
5bef64bc31 test: harden media provider auto-registration (#56279) (thanks @Ezio0) 2026-04-04 19:35:28 +09:00
Peter Steinberger
277df463d6 docs: clarify openrouter cache markers 2026-04-04 11:34:17 +01:00
Vincent Koc
39d2a719c9 refactor(providers): add family replay and tool hooks 2026-04-04 19:33:31 +09:00
Peter Steinberger
4e099689c0 feat: stream Claude CLI JSONL output 2026-04-04 19:33:08 +09:00
Peter Steinberger
2ab1f1c054 docs: clarify openai usage normalization 2026-04-04 11:32:58 +01:00
Peter Steinberger
10e0592ed0 refactor: extract device token rotate target guard 2026-04-04 19:32:25 +09:00
Vincent Koc
0a3211df2d fix(openrouter): gate prompt cache markers by endpoint (#60761)
* fix(openrouter): gate prompt cache markers by endpoint

* test(openrouter): use claude sonnet 4.6 cache model
2026-04-04 19:32:13 +09:00
Peter Steinberger
ee742cec40 fix: fallback ws usage totals (#54940) (thanks @lyfuci) 2026-04-04 19:32:05 +09:00
Peter Steinberger
4ee648c508 docs: refresh model picker provider filtering 2026-04-04 11:30:18 +01:00
复试资料
e955cffd32 Agents: widen WS usage aliases 2026-04-04 19:28:54 +09:00
复试资料
d166f2648e Agents: normalize WS usage aliases 2026-04-04 19:28:54 +09:00
Peter Steinberger
9367379771 docs: clarify prompt cache stability 2026-04-04 11:28:19 +01:00
Peter Steinberger
f0d3e231ef fix: cover bundled provider picker aliases (#58819) (thanks @Luckymingxuan) 2026-04-04 19:27:26 +09:00
Mingxuan
c4a903319e fix(model-picker): fallback to unfiltered list when provider filter yields empty results 2026-04-04 19:27:26 +09:00
Mingxuan
360fdaa4f2 fix(model-picker): use matchesPreferredProvider for plan variant matching 2026-04-04 19:27:26 +09:00
Mingxuan
fd3b7b5ae7 fix: add augmentModelCatalog hooks to bundled providers for proper filtering 2026-04-04 19:27:26 +09:00
Mingxuan
792558de01 fix(model-picker): use preferredProvider presence for filtering instead of catalog check
When auth choice explicitly sets a preferred provider (e.g., volcengine-api-key or byteplus-api-key), the model picker should always filter by that provider. Previously, it relied on providerIds.includes(preferredProvider), which could be false if the catalog hadn't loaded that provider's models yet due to a race condition between auth choice setup and catalog loading.

This ensures that selecting a provider via auth choice consistently filters the model list to only that provider's models, rather than showing all providers.
2026-04-04 19:27:26 +09:00
Peter Steinberger
6b82140336 fix: land device token role guard follow-up (#60462) (thanks @eleqtrizit) 2026-04-04 19:27:10 +09:00
Agustin Rivera
7cda9df4cb fix(device): reject unapproved token roles 2026-04-04 19:27:10 +09:00
Peter Steinberger
d58b4d7425 fix: respect MINIMAX_API_HOST in bundled minimax catalogs (#34524) (thanks @caiqinghua) 2026-04-04 19:26:12 +09:00
Peter Steinberger
2c36ca562d docs: clarify minimax usage window semantics 2026-04-04 11:25:51 +01:00
Peter Steinberger
01a24c20bf refactor: expose node pairing approval scopes 2026-04-04 19:23:33 +09:00
Peter Steinberger
848e7abb57 docs: refresh node pairing scope references 2026-04-04 11:22:02 +01:00
0912078
28021a0325 fix(minimax): invert usage_percent when deriving usedPercent from remaining-only fields
MiniMax's usage_percent / usagePercent fields report the *remaining* quota
as a percentage, not the consumed quota. When count fields (prompt_limit /
prompt_remain) are also present, fromCounts already computed the correct
usedPercent and the inverted value was silently ignored. But when only
usage_percent is returned (no count fields), the code treated it as a
used-percent and passed it through unchanged, causing the menu bar to show
"2% left" instead of "98% left".

Move usage_percent and usagePercent from PERCENT_KEYS to a new
REMAINING_PERCENT_KEYS array. deriveUsedPercent now inverts remaining-percent
values to obtain usedPercent, matching the behaviour already validated by the
existing "prefers count-based usage when percent looks inverted" test. Count-
based fromCounts still takes priority over both key groups.

Fixes #60193

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 19:20:50 +09:00
Peter Steinberger
1222961a77 docs: clarify macos cli install fallbacks 2026-04-04 11:20:23 +01:00
Peter Steinberger
7807e1ef05 docs: refresh bun install and onboarding references 2026-04-04 11:19:13 +01:00
Vincent Koc
5779831723 fix(agents): stabilize prompt cache followups 2026-04-04 19:17:59 +09:00
Peter Steinberger
a631270f01 docs: refresh package-manager update references 2026-04-04 11:17:14 +01:00
Peter Steinberger
c441db7e13 docs: refresh update channel references 2026-04-04 11:14:51 +01:00
Peter Steinberger
ca2fdcc45f fix: enforce node pairing approval scopes end-to-end (#60461) (thanks @eleqtrizit) 2026-04-04 19:13:48 +09:00
Agustin Rivera
0089d0e2e6 fix(pairing): require pairing scope for node approvals 2026-04-04 19:13:48 +09:00
Peter Steinberger
a90f3ffdac docs: clarify installer service refresh behavior 2026-04-04 10:52:02 +01:00
Peter Steinberger
93d8a8602b docs: refresh local installer references 2026-04-04 10:51:22 +01:00
Peter Steinberger
790a24002e docs: refresh daemon overview references 2026-04-04 10:49:13 +01:00
Peter Steinberger
f39b5e86e5 docs: refresh persistence guidance 2026-04-04 10:44:55 +01:00
Peter Steinberger
a2fa6e8b90 docs: refresh cloud persistence wording 2026-04-04 10:44:08 +01:00
Peter Steinberger
508ca72fc7 docs: refresh hosted backup guidance 2026-04-04 10:42:02 +01:00
Peter Steinberger
559e42b60c docs: fix hosted auth profile paths 2026-04-04 10:40:40 +01:00
Peter Steinberger
d7e288bee9 docs: refresh backup and migration storage refs 2026-04-04 10:39:42 +01:00
Peter Steinberger
f7c5988334 docs: refresh docker hosting auth storage refs 2026-04-04 10:36:35 +01:00
Peter Steinberger
0ed7662365 docs: refresh container auth and runtime refs 2026-04-04 10:35:35 +01:00
Brad Groux
fce81fccd8 msteams: add typingIndicator config and prevent duplicate DM typing indicator (#60771)
* msteams: add typingIndicator config and avoid duplicate DM typing

* fix(msteams): validate typingIndicator config

* fix(msteams): stop streaming before Teams timeout

* fix(msteams): classify expired streams correctly

* fix(msteams): handle link text from html attachments

---------

Co-authored-by: Brad Groux <bradgroux@users.noreply.github.com>
2026-04-04 04:34:24 -05:00
Peter Steinberger
af4e9d19cf docs: refresh linux gateway service guidance 2026-04-04 10:32:33 +01:00
Peter Steinberger
2d0ca75282 docs: refresh systemd service refs 2026-04-04 10:29:00 +01:00
Peter Steinberger
0182dd1694 docs: refresh linux service docs 2026-04-04 10:27:09 +01:00
Peter Steinberger
eb932d59e0 docs: refresh ci pipeline docs 2026-04-04 10:24:24 +01:00
Peter Steinberger
36fe4800d2 docs: refresh pi development docs 2026-04-04 10:21:30 +01:00
Peter Steinberger
cfcdf002c8 docs: refresh legacy tts and logging docs 2026-04-04 10:19:38 +01:00
Peter Steinberger
de63a646d6 docs: refresh shared web search references 2026-04-04 10:16:02 +01:00
Peter Steinberger
6b7d0deaf6 docs: refresh image generation shared references 2026-04-04 10:13:04 +01:00
Peter Steinberger
d24b9088fd docs: refresh image generation fallback refs 2026-04-04 10:10:32 +01:00
Peter Steinberger
c06248aee7 docs: refresh pdf tool model fallback refs 2026-04-04 10:07:16 +01:00
Peter Steinberger
2a5da613f4 docs: refresh media auto-detect refs 2026-04-04 10:05:30 +01:00
Peter Steinberger
459ede5a7e docs: refresh groq audio docs 2026-04-04 10:01:12 +01:00
Peter Steinberger
ac8d91edff docs: refresh bedrock discovery docs 2026-04-04 09:57:13 +01:00
Peter Steinberger
29033400eb docs: refresh zai glm refs 2026-04-04 09:54:52 +01:00
Peter Steinberger
74d39e9efe fix(ci): type zai dynamic model test callbacks 2026-04-04 09:52:34 +01:00
Peter Steinberger
c26ab4649d docs: refresh xai model ids 2026-04-04 09:52:02 +01:00
Peter Steinberger
7c43dfe28f fix(ci): isolate discord think autocomplete runtime 2026-04-04 09:49:35 +01:00
Peter Steinberger
05baeb2ada docs: refresh moonshot catalog refs 2026-04-04 09:49:20 +01:00
Peter Steinberger
7f5cf1a837 style: format explicit session-id resume helpers 2026-04-04 17:48:43 +09:00
Peter Steinberger
cd36ff7483 fix: resume explicit session-id agent runs 2026-04-04 17:48:43 +09:00
Peter Steinberger
87f512f80d docs: refresh minimax auth choice refs 2026-04-04 09:47:01 +01:00
Peter Steinberger
b5608397d0 docs: refresh minimax and kilocode refs 2026-04-04 09:45:18 +01:00
Peter Steinberger
323415204e fix: preserve registered glm-5 variants (#48185) (thanks @haoyu-haoyu) 2026-04-04 17:42:20 +09:00
Peter Steinberger
6b100e4dcf docs: expand static provider catalogs 2026-04-04 09:42:02 +01:00
ximi
9e0cf17d0c fix(minimax): correct model pricing per official docs 2026-04-04 17:40:57 +09:00
Peter Steinberger
7207a36d40 docs: refresh bundled provider overview refs 2026-04-04 09:39:56 +01:00
Peter Steinberger
1d5c57bad9 fix(ci): align browser and signal test expectations 2026-04-04 09:38:53 +01:00
Peter Steinberger
238fac6636 fix: cover status transcript fallback (#55041) (thanks @jjjojoj) 2026-04-04 17:38:44 +09:00
jjjojoj
97a8ba89fd fix: use transcript usage as fallback for /status token display
When using custom providers like LM Studio, Ollama, or DashScope,
token counts in /status show as 0 because the agent meta store
does not always have usage data populated for these providers.

Fix: set includeTranscriptUsage: true in both /status command and
the session_status tool. This enables the existing fallback path
that reads usage from the session transcript JSONL file when the
meta store has zero/missing token counts.

The merge logic already guards against overwriting valid data:
- totalTokens: only updated when zero or transcript value is larger
- inputTokens/outputTokens: only filled when zero/missing
- model/contextTokens: only filled when missing

Fixes #54995
2026-04-04 17:38:44 +09:00
Peter Steinberger
b601c7cb8f docs: refresh modelstudio catalog refs 2026-04-04 09:37:58 +01:00
Peter Steinberger
6a1ed07b33 docs: refresh router provider catalogs 2026-04-04 09:37:20 +01:00
Peter Steinberger
b1e3e59429 fix(ci): align stale provider and channel tests 2026-04-04 09:35:14 +01:00
Peter Steinberger
44762c0c80 docs: refresh bundled provider defaults 2026-04-04 09:32:58 +01:00
潘晓波0668000512
cca35404ea 修复:MiniMax coding_plan 将 interval/weekly usage_count 按剩余配额解析 2026-04-04 17:32:00 +09:00
Peter Steinberger
edc470f6b0 docs: refresh openai compatible proxy guides 2026-04-04 09:30:57 +01:00
Peter Steinberger
69980e8bf4 fix: resolve bare model ids via allowlist (#51580) (thanks @honwee) 2026-04-04 17:30:54 +09:00
陈大虾🦞
1ffbe09a6a fix(model): infer provider from allowlist for bare model IDs to prevent prefix drift (#48369) 2026-04-04 17:30:54 +09:00
Peter Steinberger
2906cfd6d7 fix: auto-register image-capable config providers (#51418) (thanks @xydt-610) 2026-04-04 17:29:54 +09:00
xydt-610
1d8bba7e39 fix(media-understanding): auto-register image capability for config providers with image input (#51392) 2026-04-04 17:29:54 +09:00
Peter Steinberger
3da187156f docs: clarify native and proxy request shaping 2026-04-04 09:29:09 +01:00
Peter Steinberger
f4855baf35 fix(ci): await async provider test registration 2026-04-04 09:28:43 +01:00
Peter Steinberger
4812b9d2e2 fix: preserve qualified chat model refs (#49874) (thanks @ShionEria) 2026-04-04 17:28:28 +09:00
ShionElia
683c028553 fix: preserve qualified provider prefix in Control UI model selector
When sessions report an already-qualified model id (e.g. ollama/qwen3:30b),
resolveServerChatModelValue was re-qualifying it using modelProvider,
producing incorrect values like openai-codex/qwen3:30b.

Preserve already-qualified model refs as-is before applying provider prefix.
Adds test coverage for qualified model preservation.

Fixes #49839
2026-04-04 17:28:28 +09:00
Peter Steinberger
1fcb2cfeb5 docs: clarify provider attribution behavior 2026-04-04 09:27:31 +01:00
Peter Steinberger
73572e04c1 fix: preserve generic DashScope streaming usage (#52395) (thanks @IVY-AI-gif) 2026-04-04 17:25:33 +09:00
Peter Steinberger
a192f345d4 docs: refresh key-free web search ordering 2026-04-04 09:25:20 +01:00
Peter Steinberger
54cfd746de docs: polish moonshot kimi docs (#57883) (thanks @chenxin-yan) 2026-04-04 17:23:29 +09:00
Chenxin Yan
8347022b50 remove redundency 2026-04-04 17:23:29 +09:00
Chenxin Yan
6615c5788b docs: fix incorrect Kimi Coding provider ID and model refs
The Kimi Coding plugin registers with provider ID `kimi` and default
model ID `kimi-code`, making the correct model ref `kimi/kimi-code`.

The docs incorrectly showed `kimi-coding/k2p5` as the provider/model
ref. This is confusing because `kimi-coding` is only a plugin alias,
not the actual provider ID used in config.

Updated all references in:
- docs/concepts/model-providers.md
- docs/providers/moonshot.md
- docs/zh-CN/concepts/model-providers.md
- docs/zh-CN/providers/moonshot.md
2026-04-04 17:23:29 +09:00
Peter Steinberger
df4b5d2137 docs: refresh self-hosted web search references 2026-04-04 09:22:30 +01:00
Vincent Koc
cdccbf2c1c fix(github-copilot): send IDE auth headers on runtime requests (#60755)
* Fix Copilot IDE auth headers

* fix(github-copilot): align tests and changelog

* fix(changelog): scope copilot replacement entry

---------

Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com>
2026-04-04 17:22:19 +09:00
Peter Steinberger
38ed8c355a docs: refresh perplexity web search references 2026-04-04 09:21:06 +01:00
Vincent Koc
e4c3df2fb6 docs(changelog): note cache boundary fix 2026-04-04 17:20:24 +09:00
Vincent Koc
a50b838dc2 test(agents): annotate cache trace wrapper params 2026-04-04 17:20:23 +09:00
Vincent Koc
1a13c34f5b fix(agents): close cache boundary transport gaps 2026-04-04 17:20:23 +09:00
Peter Steinberger
58a56d9a82 feat: add MiniMax TTS provider (#55921) (thanks @duncanita) 2026-04-04 09:19:45 +01:00
Peter Steinberger
a746f0e8c3 style: normalize telegram fetch test formatting 2026-04-04 09:19:45 +01:00
Vincent Koc
7ad43f21d3 style(msteams): format split graph message import 2026-04-04 09:19:45 +01:00
gnuduncan
e934211170 fix(minimax): use global TTS endpoint default and add missing Talk Mode overrides
Switch DEFAULT_MINIMAX_TTS_BASE_URL from api.minimaxi.com (CN) to
api.minimax.io (global) so international API keys work out of the box.
Add vol and pitch to resolveTalkOverrides for parity with resolveTalkConfig.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 09:19:45 +01:00
gnuduncan
7d7f5d85b4 feat(minimax): add native TTS speech provider (T2A v2)
Add MiniMax as a fourth TTS provider alongside OpenAI, ElevenLabs, and
Microsoft. Registers a SpeechProviderPlugin in the existing minimax
extension with config resolution, directive parsing, and Talk Mode
support. Hex-encoded audio response from the T2A v2 API is decoded to
MP3.

Closes #52720

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 09:19:45 +01:00
Peter Steinberger
49d962a82f docs: refresh brave web search references 2026-04-04 09:19:11 +01:00
Peter Steinberger
d1a4363783 fix(runtime): restore gateway watch on legacy state 2026-04-04 09:18:28 +01:00
Peter Steinberger
0051a86b8f docs: clarify synthesized web search count behavior 2026-04-04 09:17:49 +01:00
Gaston Rodriguez
b6b1d5dd6c Moonshot: reuse native base URL for Kimi web search 2026-04-04 17:16:29 +09:00
Peter Steinberger
e5d03f734a docs: refresh kimi web search setup 2026-04-04 09:15:01 +01:00
Peter Steinberger
21ca006eca fix(infra): restore approval account binding compatibility 2026-04-04 09:13:11 +01:00
Peter Steinberger
af7c6f4c68 fix: harden kimi web search setup (#59356) (thanks @Innocent-children) 2026-04-04 17:11:47 +09:00
innocent-children
216294765b fix(kimi): unify runtime model fallback to kimi-k2.5
Remove DEFAULT_KIMI_MODEL (moonshot-v1-128k) and align resolveKimiModel
fallback to DEFAULT_KIMI_SEARCH_MODEL (kimi-k2.5). The legacy model
does not support the $web_search builtin_function tool, so env-var-only
users without a configured model would hit the original bug.
2026-04-04 17:11:47 +09:00
innocent-children
111495d3ca 修复kimi web_search错误 2026-04-04 17:11:47 +09:00
Peter Steinberger
11a87b4b7a docs: clarify plugin facade runtime snapshots 2026-04-04 09:11:25 +01:00
Peter Steinberger
85ade25003 docs: refresh minimax multimodal references 2026-04-04 09:09:06 +01:00
Peter Steinberger
daac149744 fix(ci): honor runtime config snapshots for facades 2026-04-04 09:08:25 +01:00
Peter Steinberger
42f6de16b2 fix: advertise MiniMax M2.7 image input (#54843) (thanks @MerlinMiao88888888) 2026-04-04 17:07:35 +09:00
王淼0668000666
51d998d828 minimax: add image capability to MiniMax-M2.7 model 2026-04-04 17:07:35 +09:00
王淼0668000666
87b41ca693 minimax: add image capability to MiniMax-M2.7 model 2026-04-04 17:07:35 +09:00
Peter Steinberger
ed866020df docs: refresh task reconciliation references 2026-04-04 09:07:08 +01:00
Peter Steinberger
7d1575b5df fix: reconcile stale cron and chat-backed tasks (#60310) (thanks @lml2468) 2026-04-04 17:05:57 +09:00
Peter Steinberger
7036e5afbf fix: honor exec approval security from approvals (#60310) (thanks @lml2468) 2026-04-04 17:05:57 +09:00
Peter Steinberger
8cec7c68b9 fix(ci): restore typecheck on main 2026-04-04 09:05:17 +01:00
Peter Steinberger
da50b492c8 docs: refresh gateway status diagnostics refs 2026-04-04 09:05:08 +01:00
Peter Steinberger
dc2575f6c4 docs: clarify local agent plugin preload 2026-04-04 09:04:11 +01:00
Peter Steinberger
7671f4f1e3 docs: clarify gateway and plugin http auth scopes 2026-04-04 09:01:05 +01:00
Peter Steinberger
bc75968074 perf(cli): trim gateway status startup imports 2026-04-04 08:59:56 +01:00
Peter Steinberger
be15805a84 refactor(runtime): lazy-load control-ui and channel-config surfaces 2026-04-04 08:59:56 +01:00
Peter Steinberger
f9e9d4e357 fix(cli): preload plugins for local agent runs 2026-04-04 08:59:37 +01:00
Vincent Koc
12be79ac48 docs(agents): clarify mobile pairing ws scope 2026-04-04 16:57:58 +09:00
Peter Steinberger
7286a10679 fix: resolve rebase gate drift (#59815) 2026-04-04 16:57:44 +09:00
Peter Steinberger
36987831ce fix: restore current-main gate (#59815) 2026-04-04 16:57:44 +09:00
Peter Steinberger
926c107fe5 fix: narrow plugin route runtime scope fallback (#59815) (thanks @pgondhi987) 2026-04-04 16:57:44 +09:00
Pavan Kumar Gondhi
0e04ca36b9 fix: finalize issue changes 2026-04-04 16:57:44 +09:00
Pavan Kumar Gondhi
74270762ff fix: address review feedback 2026-04-04 16:57:44 +09:00
Pavan Kumar Gondhi
b02b2c3a0b fix: address issue 2026-04-04 16:57:44 +09:00
Peter Steinberger
4f3ad7c6fc docs(changelog): dedupe prompt cache entry 2026-04-04 16:57:30 +09:00
Peter Steinberger
8f85c7386b docs: close remaining cli index coverage gaps 2026-04-04 08:57:20 +01:00
Peter Steinberger
5a13756ca3 docs: expand cli index coverage refs 2026-04-04 08:56:23 +01:00
Peter Steinberger
a81cf1da1f refactor: share sdk lazy config and cli test helpers 2026-04-04 16:55:04 +09:00
Peter Steinberger
6a55556b83 docs: expand sandbox and daemon index refs 2026-04-04 08:54:21 +01:00
Peter Steinberger
edfaa01d1d refactor(plugin-sdk): split runtime helper seams 2026-04-04 08:53:19 +01:00
Peter Steinberger
470898b5e1 docs: refresh gateway update and memory refs 2026-04-04 08:52:43 +01:00
Peter Steinberger
4c450ede65 fix(feishu): narrow channel sdk seams 2026-04-04 08:50:28 +01:00
Peter Steinberger
19036ef394 fix: unblock current main checks 2026-04-04 16:50:25 +09:00
Peter Steinberger
cbc6a1ddb8 fix: restore main type surfaces 2026-04-04 16:50:25 +09:00
Peter Steinberger
04b539e98c fix: restore channel sdk schema typing 2026-04-04 16:50:25 +09:00
Peter Steinberger
f6df3ed70c fix: clean up stale cron and chat-backed tasks (#60310) 2026-04-04 16:50:25 +09:00
Peter Steinberger
6afdf10266 fix: honor exec approval security from approvals (#60310) 2026-04-04 16:50:25 +09:00
Peter Steinberger
b5265a07d7 refactor: replace 156k-line generated baselines with SHA-256 hash files
Config and Plugin SDK drift detection now compares SHA-256 hashes instead
of full JSON content. The .sha256 files (6 lines total) are tracked in git;
the full JSON baselines are gitignored and generated locally for inspection.

Same CI guarantee, zero repo churn on schema changes.
2026-04-04 16:49:21 +09:00
Peter Steinberger
b4e9802ef3 test: tidy gateway scope forwarding coverage 2026-04-04 16:48:26 +09:00
Peter Steinberger
22dad753a5 docs: refresh setup and config refs 2026-04-04 08:48:15 +01:00
Peter Steinberger
1d1c52e6e6 docs: refresh mcp approvals and hooks refs 2026-04-04 08:46:37 +01:00
sudie-codes
928a5128f4 msteams: add channel-list and channel-info actions (#57529)
* msteams: add channel-list and channel-info actions via Graph API

* msteams: use action helpers, add channel-list pagination

* msteams: address PR #57529 review feedback
2026-04-04 02:43:08 -05:00
Peter Steinberger
3967ffec22 docs: refresh agent and agents refs 2026-04-04 08:42:55 +01:00
Peter Steinberger
9bbedf3caa test: replace hanging pair approve poc coverage 2026-04-04 16:42:46 +09:00
Peter Steinberger
2c0f096688 docs: refresh channel support messaging 2026-04-04 16:41:56 +09:00
Peter Steinberger
138ef136ee docs: refresh message and channels refs 2026-04-04 08:39:04 +01:00
Brad Groux
c88d6d67c8 feat(msteams): add OpenClaw User-Agent header to Microsoft HTTP calls (#51568) (#60433)
Co-authored-by: Brad Groux <bradgroux@users.noreply.github.com>
2026-04-04 02:38:57 -05:00
Brad Groux
dd2faa3764 fix(msteams): persist conversation reference during DM pairing (#60432)
* fix(msteams): persist conversation reference during DM pairing (#43323)

* ci: retrigger checks

---------

Co-authored-by: Brad Groux <bradgroux@users.noreply.github.com>
2026-04-04 02:38:54 -05:00
Brad Groux
06c6ff6670 fix(msteams): handle Adaptive Card Action.Submit invoke activities (#60431)
* fix(msteams): handle Adaptive Card Action.Submit invoke activities (#55384)

* ci: retrigger checks

---------

Co-authored-by: Brad Groux <bradgroux@users.noreply.github.com>
2026-04-04 02:38:51 -05:00
Brad Groux
1b2fb6b98b feat: add bundled StepFun provider plugin (#60032) (#60430)
Co-authored-by: hengm3467 <100685635+hengm3467@users.noreply.github.com>
Co-authored-by: George Zhang <georgezhangtj97@gmail.com>
2026-04-04 02:38:49 -05:00
Peter Steinberger
7a03027e7f docs: refresh pairing devices and dns refs 2026-04-04 08:36:27 +01:00
Peter Steinberger
545ecc63bd docs: refresh docs search and tui refs 2026-04-04 08:34:43 +01:00
Peter Steinberger
4b490d90ec docs: expand cli security and webhook refs 2026-04-04 08:33:50 +01:00
Vincent Koc
74f60dfd0b test(agents): extend live cache runner scenarios 2026-04-04 16:33:14 +09:00
Peter Steinberger
f79c00b972 docs: expand cli maintenance summaries 2026-04-04 08:31:36 +01:00
Peter Steinberger
5d7979c5c7 docs: refresh reset and uninstall refs 2026-04-04 08:30:25 +01:00
Vincent Koc
c76646adb1 feat(agents): add prompt cache break diagnostics (#60707)
* feat(agents): add prompt cache break diagnostics

* test(agents): wire cache trace into live cache suite

* fix(agents): always record cache trace result stage

* feat(status): show cache reuse in verbose output

* fix(agents): ignore missing prompt cache usage

* chore(changelog): note prompt cache diagnostics

* fix(agents): harden prompt cache diagnostics
2026-04-04 16:29:32 +09:00
Peter Steinberger
df09fe9adf docs: refresh system health and sessions refs 2026-04-04 08:28:41 +01:00
Peter Steinberger
d584ccfc77 docs: expand logs cli reference 2026-04-04 08:27:14 +01:00
Vincent Koc
9ea37202a8 fix(config): strip legacy googlechat streamMode on load 2026-04-04 16:26:35 +09:00
Peter Steinberger
09997f032f docs: refresh tasks and status references 2026-04-04 08:24:24 +01:00
Peter Steinberger
0a5bce21a6 fix: tighten pairing guard and unblock landing gate (#60491) (thanks @eleqtrizit) 2026-04-04 16:24:10 +09:00
Agustin Rivera
cb0b15a195 fix(pair): guard setup fallback subcommands 2026-04-04 16:24:10 +09:00
Agustin Rivera
9bb97b54fe fix(pair): fail fast before qr setup lookup 2026-04-04 16:24:10 +09:00
Agustin Rivera
83e5fe5e8b fix(pair): enforce pairing scope for setup commands 2026-04-04 16:24:10 +09:00
Peter Steinberger
c3a2701c45 fix(android): delay operator bootstrap reconnect until stored auth 2026-04-04 16:23:37 +09:00
Peter Steinberger
4f95822aa8 docs: refresh cron cli references 2026-04-04 08:22:24 +01:00
Vincent Koc
d75a8933e7 fix(agents): stabilize prompt cache fingerprints (#60731)
* fix(agents): stabilize prompt cache fingerprints

* chore(changelog): note prompt cache fingerprint stability

* refactor(agents): simplify capability normalization

* refactor(agents): simplify prompt capability normalization helper
2026-04-04 16:20:36 +09:00
Peter Steinberger
0660bef81e docs: refresh cli acp and approvals summaries 2026-04-04 08:20:20 +01:00
Peter Steinberger
3e5c571e57 docs: sync browser cli summary 2026-04-04 08:18:14 +01:00
Peter Steinberger
53e2554281 docs: expand browser cli reference 2026-04-04 08:17:19 +01:00
Vincent Koc
5c685eee9c fix(config): remove lingering channel streamMode leaks (#60733) 2026-04-04 16:14:38 +09:00
Peter Steinberger
644ed24ed8 docs(changelog): clarify breaking config aliases 2026-04-04 16:14:28 +09:00
Vincent Koc
65842aabad refactor(providers): share google and xai provider helpers (#60722)
* refactor(google): share oauth token helpers

* refactor(xai): share tool auth fallback helpers

* refactor(xai): share tool auth resolution

* refactor(xai): share tool config helpers

* refactor(xai): share fallback auth helpers

* refactor(xai): share responses tool helpers

* refactor(google): share http request config helper

* fix(xai): re-export shared web search extractor

* fix(xai): import plugin config type

* fix(providers): preserve default google network guard
2026-04-04 16:14:15 +09:00
Peter Steinberger
c87903a4c6 fix(ci): restore build and typecheck on main 2026-04-04 08:13:16 +01:00
Peter Steinberger
d2bace59d1 docs: refresh live testing auth storage 2026-04-04 08:12:52 +01:00
Peter Steinberger
66b1520d92 docs: refresh auth command references 2026-04-04 08:10:34 +01:00
Peter Steinberger
32d2654340 build: bump version to 2026.4.4 2026-04-04 16:09:42 +09:00
Peter Steinberger
95a6d386c0 docs: expand provider overview coverage 2026-04-04 08:07:36 +01:00
Peter Steinberger
14cfcdba1a docs(test): refresh stale model refs 2026-04-04 08:05:49 +01:00
Peter Steinberger
f38a3ae996 docs(changelog): reorder unreleased notes 2026-04-04 16:04:40 +09:00
Peter Steinberger
9195cf839b docs: refresh provider overview references 2026-04-04 08:03:56 +01:00
Peter Steinberger
1738900a9a docs: refresh moonshot kimi coding refs 2026-04-04 08:01:41 +01:00
Peter Steinberger
0013568500 docs: refresh google and openrouter onboarding docs 2026-04-04 07:59:52 +01:00
Peter Steinberger
406a47284a fix(ci): restore channel typing and root-help metadata build 2026-04-04 07:59:32 +01:00
Peter Steinberger
7b4e20fc8c docs: sync cloudflare and synthetic provider docs 2026-04-04 07:57:43 +01:00
Peter Steinberger
20266ff7dd fix: preserve mobile bootstrap auth fallback (#60238) (thanks @ngutman) 2026-04-04 15:57:38 +09:00
Nimrod Gutman
226ca1f324 fix(auth): address qr bootstrap review feedback 2026-04-04 15:57:38 +09:00
Nimrod Gutman
a9140abea6 fix(auth): hand off qr bootstrap to bounded device tokens 2026-04-04 15:57:38 +09:00
Vincent Koc
c4597992ca fix(config): remove remaining legacy surface leaks (#60726) 2026-04-04 15:55:31 +09:00
Peter Steinberger
1c42f0e866 docs: refresh auth storage reference examples 2026-04-04 07:52:22 +01:00
Peter Steinberger
ad7461b639 docs: align auth storage and token auth guidance 2026-04-04 07:50:26 +01:00
Peter Steinberger
da3f5e9bca docs(providers): refresh model examples and env defaults 2026-04-04 07:49:22 +01:00
Vincent Koc
0609bf8581 feat(memory): harden dreaming and multilingual memory promotion (#60697)
* feat(memory): add recall audit and doctor repair flow

* refactor(memory): rename symbolic scoring and harden dreaming

* feat(memory): add multilingual concept vocabulary

* docs(changelog): note dreaming memory follow-up

* docs(changelog): shorten dreaming follow-up entry

* fix(memory): address review follow-ups

* chore(skills): tighten security triage trust model

* Update CHANGELOG.md
2026-04-04 15:48:13 +09:00
Peter Steinberger
0ab160cda9 docs(anthropic): remove setup-token setup docs 2026-04-04 15:46:25 +09:00
Peter Steinberger
1b4bb5be19 fix(anthropic): remove setup-token onboarding path 2026-04-04 15:46:25 +09:00
Peter Steinberger
15bee338e9 docs: refresh provider hook docs 2026-04-04 07:46:15 +01:00
Peter Steinberger
359c6dedbe docs: prefer channel-core in channel sdk docs 2026-04-04 07:46:15 +01:00
Peter Steinberger
6e6b4f6004 ci: gate releases on live cache floors 2026-04-04 15:44:34 +09:00
Peter Steinberger
be4eb269fc refactor: tighten ACP spawn failure typing 2026-04-04 15:43:23 +09:00
Peter Steinberger
b167ad052c refactor(providers): move defaults and error policy into plugins 2026-04-04 07:43:14 +01:00
Peter Steinberger
e34f42559f docs: refresh plugin sdk import reference 2026-04-04 07:41:44 +01:00
Peter Steinberger
27aa659498 docs: clarify plugin entry export contract 2026-04-04 07:40:24 +01:00
Peter Steinberger
d5cb8cebcd refactor(extensions): split channel runtime helper seams 2026-04-04 07:39:53 +01:00
Peter Steinberger
667a54a4b7 refactor(plugins): narrow bundled channel core seams 2026-04-04 07:39:53 +01:00
Peter Steinberger
381ee4d218 docs: align bundled plugin defaults in docs 2026-04-04 07:38:55 +01:00
Peter Steinberger
50a1fac1c5 docs: remove stale plugins status command 2026-04-04 07:37:25 +01:00
Peter Steinberger
c8be1ca6ae docs: note sdk config schema memoization 2026-04-04 07:35:04 +01:00
Peter Steinberger
25b069a6f3 refactor(gateway): split MCP loopback transport helpers 2026-04-04 15:34:13 +09:00
Peter Steinberger
f856aaea40 fix(ci): pick the real root-help bundle 2026-04-04 07:33:48 +01:00
Vincent Koc
26f0c7ee90 refactor(plugin-sdk): lazily resolve plugin config schemas 2026-04-04 15:32:33 +09:00
Peter Steinberger
85c5d90c11 docs: sync acp spawn workspace behavior 2026-04-04 07:32:09 +01:00
Peter Steinberger
71c0c2cc06 fix: harden ACP spawn workspace resolution 2026-04-04 15:29:56 +09:00
zssggle-rgb
d718d17b5b fix(acp): fall back when inherited target workspace is missing 2026-04-04 15:29:56 +09:00
Peter Steinberger
6507f54965 docs: refresh generic model examples 2026-04-04 07:27:32 +01:00
Vincent Koc
bcd11176ef refactor(amazon-bedrock): lazy-load provider registration 2026-04-04 15:26:37 +09:00
Peter Steinberger
195e380e05 docs: remove legacy cache retention notes 2026-04-04 15:26:19 +09:00
Peter Steinberger
cb6d0576be docs: refresh media understanding examples 2026-04-04 07:25:52 +01:00
Peter Steinberger
332caa4cb1 style: normalize embedded runner imports 2026-04-04 15:24:50 +09:00
Peter Steinberger
3d55b28853 style: wrap long runtime and test lines 2026-04-04 15:24:50 +09:00
Peter Steinberger
b379dac798 chore: ignore dist-runtime artifacts 2026-04-04 15:24:50 +09:00
Peter Steinberger
1809da659e docs: refresh cli and node pairing references 2026-04-04 07:23:11 +01:00
Vincent Koc
6fc69f5d33 fix(secrets): drop legacy talk apiKey target surface (#60717) 2026-04-04 15:22:41 +09:00
Peter Steinberger
e7e1707277 fix(ci): restore build and typecheck on main 2026-04-04 07:22:16 +01:00
Vincent Koc
7e7460c2f9 refactor(anthropic): lazy-load provider registration 2026-04-04 15:20:28 +09:00
Peter Steinberger
666f1f4db0 refactor(providers): remove core default and usage bias 2026-04-04 07:19:29 +01:00
Peter Steinberger
9e4cf3996e test: add gateway durable allow-always coverage (#59880) (thanks @luoyanglang) 2026-04-04 15:18:24 +09:00
Peter Steinberger
cdb572d703 test: tune live cache assertions 2026-04-04 15:18:09 +09:00
Vincent Koc
c4d2c4899d refactor(browser): lazy-load plugin registration 2026-04-04 15:17:44 +09:00
Peter Steinberger
3de09fbe74 fix: restore claude cli loopback mcp bridge (#35676) (thanks @mylukin) 2026-04-04 15:16:20 +09:00
Vincent Koc
c2435306a7 refactor(acpx): lazy-load runtime service entry 2026-04-04 15:14:51 +09:00
Peter Steinberger
e2454d4b8a docs: align provider and onboarding references 2026-04-04 07:14:28 +01:00
Peter Steinberger
dd16080af7 refactor(exec): dedupe durable approval checks 2026-04-04 07:12:26 +01:00
Peter Steinberger
b32a2cadc2 docs(acp): clarify default startup and runtime paths 2026-04-04 15:10:26 +09:00
Vincent Koc
e56ffd48df refactor(github-copilot): lazy-load provider registration 2026-04-04 15:06:02 +09:00
Ayaan Zaidi
1c1f32e756 fix: trust local bot api media roots (#60705) 2026-04-04 11:35:36 +05:30
Ayaan Zaidi
cfc52fcf2b fix(telegram): trust local bot api media roots 2026-04-04 11:35:36 +05:30
Peter Steinberger
c91b6bf322 fix(ci): unblock agent typing and cache startup metadata 2026-04-04 07:04:17 +01:00
Peter Steinberger
3a3f88a80a refactor(media): move provider defaults into media metadata 2026-04-04 07:00:47 +01:00
Peter Steinberger
fca80d2ee2 refactor(thinking): move provider thinking fallback out of core 2026-04-04 07:00:47 +01:00
Peter Steinberger
b59ce0903c docs: add SOUL personality guide 2026-04-04 14:59:35 +09:00
Vincent Koc
3437818b91 refactor(vllm): lazy-load provider registration 2026-04-04 14:56:04 +09:00
Peter Steinberger
0587fb3fc8 fix: note gateway allow-always reuse (#59880) (thanks @luoyanglang) 2026-04-04 14:55:26 +09:00
luoyanglang
b54acd97b3 fix(exec): reuse gateway allow-always approvals 2026-04-04 14:55:26 +09:00
Vincent Koc
ede6d03850 refactor(openrouter): lazy-load provider registration 2026-04-04 14:54:59 +09:00
Vincent Koc
0099c309c9 refactor(openai): lazy-load provider registration 2026-04-04 14:53:02 +09:00
Vincent Koc
fcf1aee2b4 refactor(microsoft): lazy-load speech provider 2026-04-04 14:51:55 +09:00
Vincent Koc
73115b5480 fix(zalouser): migrate legacy group allow aliases (#60702)
* fix(channels): prefer source contract surfaces in source checkouts

* fix(zalouser): migrate legacy group allow aliases
2026-04-04 14:50:15 +09:00
Peter Steinberger
ae7942bf5e fix: prefer Claude CLI in Anthropic onboarding 2026-04-04 14:49:55 +09:00
Peter Steinberger
1ab37d7a12 refactor(gateway): classify pairing locality 2026-04-04 06:47:14 +01:00
Vincent Koc
b3186aeef9 test(agents): expand live cache runner scenarios 2026-04-04 14:46:56 +09:00
Vincent Koc
32dd0aa7e7 fix(plugin-sdk): lazy acp runtime testing merge 2026-04-04 14:43:53 +09:00
Vincent Koc
fd01561327 fix(agents): close remaining prompt cache boundary gaps (#60691)
* fix(agents): route default stream fallbacks through boundary shapers

* fix(agents): close remaining cache boundary gaps

* chore(changelog): note cache prefix follow-up rollout

* fix(agents): preserve cache-safe fallback stream bases
2026-04-04 14:41:47 +09:00
Peter Steinberger
30ba837a7b test: isolate MCP live cache probe 2026-04-04 14:39:51 +09:00
Peter Steinberger
0ebc7b6077 docs: clarify anthropic claude cli migration 2026-04-04 14:38:42 +09:00
Peter Steinberger
40da986b21 fix: preserve docker cli pairing locality (#55113) (thanks @sar618) 2026-04-04 14:36:30 +09:00
sar618
224fceee1a fix(gateway): skip device pairing for authenticated CLI connections in Docker
CLI connections with valid shared auth (token/password) now bypass device
pairing, fixing the chicken-and-egg problem where Docker CLI commands fail
with 'pairing required' (1008) despite sharing the gateway's network
namespace and auth token.

The existing shouldSkipBackendSelfPairing only matched gateway-client/backend
mode. CLI connections use cli/cli mode and were excluded. Additionally,
isLocalDirectRequest produces false negatives in Docker (host networking,
network_mode sharing) even when remoteAddress is 127.0.0.1, so CLI connections
with valid shared auth skip the locality check entirely — the token is the
trust anchor.

Closes #55067
Related: #12210, #23471, #30740
2026-04-04 14:36:30 +09:00
Peter Steinberger
2b538464e1 fix(docs): format dreaming memory tables 2026-04-04 06:31:40 +01:00
Vincent Koc
71562cc570 docs(changelog): add config surface breaking note 2026-04-04 14:30:46 +09:00
Vincent Koc
b390591779 fix(matrix): migrate room allow aliases to enabled (#60690)
* fix(matrix): migrate room allow aliases to enabled

* test(matrix): keep migration coverage on the channel seam

* chore(config): refresh baselines after matrix alias cleanup
2026-04-04 14:27:50 +09:00
Vincent Koc
6e0fe1b91e docs: expand dreaming memory documentation 2026-04-04 14:25:29 +09:00
Vignesh Natarajan
10d5b8813d Agents/logging: reduce orphaned-user warning noise for background runs 2026-04-03 22:24:02 -07:00
Peter Steinberger
e4dc03f108 refactor(acpx): split Windows command parsing 2026-04-04 14:19:20 +09:00
Peter Steinberger
41243529fb refactor(providers): centralize provider model policy 2026-04-04 06:16:48 +01:00
Vincent Koc
e07d8fd20b docs(agents): tighten provider boundary guidance 2026-04-04 14:13:46 +09:00
Peter Steinberger
026ca40be9 fix(ci): repair voice-call provider resolution typing 2026-04-04 06:11:30 +01:00
Vignesh Natarajan
18016e7546 Docs/memory: add Dreaming concept page and overview links 2026-04-03 22:10:32 -07:00
Peter Steinberger
db177ab2ac docs: add changelog for #60689 2026-04-04 14:10:20 +09:00
Peter Steinberger
e985324d87 fix(acpx): preserve Windows Claude CLI paths 2026-04-04 14:10:20 +09:00
Vignesh Natarajan
9802c060bf Dreaming UI: explain modes on hover in header controls 2026-04-03 22:08:49 -07:00
Peter Steinberger
b392c78bab fix(ci): align settings host test fixtures 2026-04-04 06:08:26 +01:00
Peter Steinberger
cff8b5bebd fix(agents): preserve acp and openai wrapper defaults 2026-04-04 14:07:19 +09:00
Peter Steinberger
bc8048250e fix(agents): harden claude cli parsing and queueing 2026-04-04 14:07:19 +09:00
Peter Steinberger
4ed17fd987 refactor(voice-call): migrate legacy config via doctor 2026-04-04 14:06:52 +09:00
Vincent Koc
561db47566 docs(boundaries): add import-topology guardrails 2026-04-04 14:06:18 +09:00
Peter Steinberger
0777ddace8 perf: split more targeted test lanes 2026-04-04 06:05:24 +01:00
Peter Steinberger
5ddc57aa22 style(ui): format chat view templates 2026-04-04 06:02:57 +01:00
Peter Steinberger
64d9b65b56 style(core): format reply and infra helpers 2026-04-04 06:02:47 +01:00
Peter Steinberger
fd75d214f2 style(extensions): format channel integration updates 2026-04-04 06:02:37 +01:00
Peter Steinberger
8b5672bda4 test: align ui vitest configs with thread policy 2026-04-04 06:00:15 +01:00
Vignesh Natarajan
f8c4777515 Dreaming: move setup controls to header and tighten status plumbing 2026-04-03 21:58:46 -07:00
Vignesh Natarajan
a5f66b5c48 fix(plugins): constrain workspace discovery to .openclaw/extensions 2026-04-03 21:57:58 -07:00
Peter Steinberger
02cc09dafe test: refresh vitest config assertions 2026-04-04 05:57:27 +01:00
Peter Steinberger
ca9d2f3b41 ci: align vitest entrypoints with root config 2026-04-04 05:57:27 +01:00
Peter Steinberger
757a20b656 test: enforce thread-first vitest configs 2026-04-04 05:57:26 +01:00
Peter Steinberger
33e10c4772 fix(ci): repair bundled test selection and compat typing 2026-04-04 05:56:55 +01:00
Vincent Koc
230a39797a fix(infra): break exec safe-bin import cycle 2026-04-04 13:53:32 +09:00
Peter Steinberger
8a3d946f4a test: cover vitest contention scheduling 2026-04-04 05:51:27 +01:00
Peter Steinberger
55812eaf14 fix: throttle vitest under local contention 2026-04-04 05:50:46 +01:00
Vincent Koc
9afaec1b0c docs(changelog): add cache-prefix attribution 2026-04-04 13:47:43 +09:00
Peter Steinberger
53fd262173 ci: align pnpm pins and vitest config 2026-04-04 05:44:29 +01:00
Peter Steinberger
22e6225dd0 perf: split hooks, tui, and extension lanes 2026-04-04 05:38:47 +01:00
Peter Steinberger
af102907c5 docs: add GitHub sponsor to README 2026-04-04 13:36:58 +09:00
Peter Steinberger
39135ca3a4 refactor(voice-call): isolate config compatibility 2026-04-04 13:34:05 +09:00
Vincent Koc
64f28906de fix(agents): split system prompt cache prefix by transport (#59054)
* fix(agents): restore Anthropic prompt cache seam

* fix(agents): strip cache boundary for completions

* fix(agents): strip cache boundary for cli backends

* chore(changelog): note cross-transport cache boundary rollout

* fix(agents): route default stream fallbacks through boundary shapers

* fix(agents): strip cache boundary for provider streams
2026-04-04 13:32:32 +09:00
Peter Steinberger
b0e1551eb8 refactor(extensions): add channel-owned config schema seams 2026-04-04 05:31:11 +01:00
Peter Steinberger
c17985aa9f test: align hook install unsafe flag assertion 2026-04-04 05:27:57 +01:00
Peter Steinberger
e95b723b82 fix: load telegram command config from contract surfaces 2026-04-04 05:26:54 +01:00
Peter Steinberger
c7cb43cac9 perf: split more scoped vitest lanes 2026-04-04 05:26:32 +01:00
Peter Steinberger
64b971b2b0 fix: resolve config write test drift 2026-04-04 05:25:57 +01:00
Peter Steinberger
3a62b0e75b fix(ci): remove invalid live cache reasoning flag 2026-04-04 05:24:29 +01:00
Peter Steinberger
b16e70e37f refactor(plugins): route bundled channel config runtime through metadata 2026-04-04 05:20:43 +01:00
Peter Steinberger
5b294b7fbd test: keep vitest thread workers conservative 2026-04-04 05:20:19 +01:00
Peter Steinberger
943da1864a test: add tool-turn cache coverage 2026-04-04 13:19:00 +09:00
Peter Steinberger
53b5b1b32d fix(ci): repair redundant channel union types 2026-04-04 05:08:02 +01:00
Peter Steinberger
1246e2b03a refactor(extensions): move channel-specific config surfaces out of core 2026-04-04 05:06:32 +01:00
Peter Steinberger
0f544fa1ca fix(ci): repair bluebubbles status test import 2026-04-04 05:03:19 +01:00
Peter Steinberger
39d3cad479 fix(ci): repair check lane type drift 2026-04-04 04:59:18 +01:00
Peter Steinberger
e277ac0838 fix: defer command secret target registry loading 2026-04-04 04:58:09 +01:00
Peter Steinberger
f84486157e refactor(channels): remove bluebubbles core status collector 2026-04-04 04:53:38 +01:00
Peter Steinberger
bc457fd1b8 refactor(channels): move bootstrap channel logic behind extension seams 2026-04-04 04:53:38 +01:00
Peter Steinberger
fff7e610df feat(plugins): auto-load provider plugins from model support 2026-04-04 04:52:25 +01:00
Peter Steinberger
5b144655f2 test(ci): align channel defaults and clean stale hook tests 2026-04-04 04:51:33 +01:00
Peter Steinberger
f4fa53de3f fix(ci): repair zalouser sdk path and exec timeout kill 2026-04-04 04:51:33 +01:00
Peter Steinberger
ca99ad0af8 test: add live cache provider probes 2026-04-04 12:46:10 +09:00
Peter Steinberger
efefa5560d perf: optimize vitest jsdom and isolated lanes 2026-04-04 04:45:01 +01:00
Marcus Castro
9d1a58f551 fix(auto-reply): preserve reasoning markers during block coalescing (#60655)
* fix: preserve reasoning markers during block coalescing

* docs(changelog): add auto-reply reasoning fix entry
2026-04-04 00:44:11 -03:00
Peter Steinberger
ed0cbcba2f refactor(voice-call): use config for realtime tuning 2026-04-04 12:43:23 +09:00
@zimeg
e636ba6ab0 docs(slack): move slash command settings to matching section 2026-04-03 20:42:23 -07:00
Peter Steinberger
32ba917079 perf: split infra, tooling, and provider test lanes 2026-04-04 04:39:47 +01:00
Vignesh Natarajan
f62db7950a fix(control-ui): keep session key helpers browser-safe 2026-04-03 20:39:36 -07:00
Vincent Koc
b7ec90258b fix(plugins): preserve bundled origin when workspace matches bundled root 2026-04-04 12:38:43 +09:00
Peter Steinberger
0ad75cffe3 test: restore native root vitest entrypoint 2026-04-04 04:37:08 +01:00
Peter Steinberger
bb1cc84d50 test: default vitest root projects to threads 2026-04-04 04:37:08 +01:00
Vincent Koc
fb5066dfb1 refactor(zalouser): lazy-load account runtimes 2026-04-04 12:36:39 +09:00
Peter Steinberger
6b003a7f2b refactor(cli): reuse install safety overrides 2026-04-04 12:35:58 +09:00
Peter Steinberger
406f06dcc5 fix: preserve linked install unsafe flag and baseline regressions 2026-04-04 12:34:55 +09:00
JD Davis
8a8ea94228 CLI: forward unsafe flag to linked hook-pack probes 2026-04-04 12:34:55 +09:00
JD Davis
bac15a7313 CLI: pass unsafe flag through linked plugin probes 2026-04-04 12:34:55 +09:00
Peter Steinberger
7cd40ad565 refactor(voice-call): clean provider boundaries 2026-04-04 12:33:47 +09:00
Vincent Koc
6964e4acf7 refactor(discord): lazy-load action and audit runtimes 2026-04-04 12:32:21 +09:00
Peter Steinberger
a82bc7d887 fix(ci): align contract expectations 2026-04-04 12:29:11 +09:00
Peter Steinberger
df48a7bfc0 fix: resolve stale plugin-sdk and test type regressions 2026-04-04 04:28:59 +01:00
Peter Steinberger
eb9051cc7c refactor(openai): move native transport policy into extension 2026-04-04 04:27:14 +01:00
Peter Steinberger
585b1c9413 fix(ci): repair openai codex provider test syntax 2026-04-04 04:27:02 +01:00
Vignesh
4c1022c73b feat(memory-core): add dreaming promotion with weighted recall thresholds (#60569)
* memory-core: add dreaming promotion flow with weighted thresholds

* docs(memory): mark dreaming as experimental

* memory-core: address dreaming promotion review feedback

* memory-core: harden short-term promotion concurrency

* acpx: make abort-process test timer-independent

* memory-core: simplify dreaming config with mode presets

* memory-core: add /dreaming command and tighten recall tracking

* ui: add Dreams tab with sleeping lobster animation

Adds a new Dreams tab to the gateway UI under the Agent group.
The tab is gated behind the memory-core dreaming config — it only
appears in the sidebar when dreaming.mode is not 'off'.

Features:
- Sleeping vector lobster with breathing animation
- Floating Z's, twinkling starfield, moon glow
- Rotating dream phrase bubble (17 whimsical phrases)
- Memory stats bar (short-term, long-term, promoted)
- Active/idle visual states
- 14 unit tests

* plugins: fix --json stdout pollution from hook runner log

The hook runner initialization message was using log.info() which
writes to stdout via console.log, breaking JSON.parse() in the
Docker smoke test for 'openclaw plugins list --json'. Downgrade to
log.debug() so it only appears when debugging is enabled.

* ui: keep Dreams tab visible when dreaming is off

* tests: fix contracts and stabilize extension shards

* memory-core: harden dreaming recall persistence and locking

* fix: stabilize dreaming PR gates (#60569) (thanks @vignesh07)

* test: fix rebase drift in telegram and plugin guards
2026-04-03 20:26:53 -07:00
Vincent Koc
2687a49575 refactor(line): lazy-load channel runtime seams 2026-04-04 12:26:20 +09:00
Peter Steinberger
eeb2888f6e fix(ci): sync openai provider lockfile 2026-04-04 04:24:31 +01:00
Ayaan Zaidi
d7b8faa7bf fix: keep Kimi anthropic tool payloads native (#60391) (thanks @Eric-Guo) 2026-04-04 08:53:57 +05:30
Peter Steinberger
41e16a883b fix(cli): honor unsafe override for linked installs 2026-04-04 12:22:49 +09:00
Peter Steinberger
2416e2d51d fix(ci): repair seam drift and matrix test timing 2026-04-04 04:22:17 +01:00
Peter Steinberger
d7ba6d3e68 test: move vitest config regression under active unit surface 2026-04-04 04:19:08 +01:00
Peter Steinberger
33453838da perf: route test commands through scoped lanes 2026-04-04 04:18:10 +01:00
tmimmanuel
0fef95b17d fix: preserve Windows scheduled task restart/install behavior (#59335) (thanks @tmimmanuel)
* fix(daemon): preserve Windows Task Scheduler settings on reinstall and exit early on failed restart

* fix(daemon): add test coverage for Create/Change paths, fix early exit grace period

* fix(daemon): fix startup-fallback tests for new isRegisteredScheduledTask call

* fix(daemon): report early restart failure accurately

* fix: preserve Windows scheduled task restart/install behavior (#59335) (thanks @tmimmanuel)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-04 08:46:00 +05:30
Peter Steinberger
ff0c1b57a7 fix(auth): respect externally managed codex refresh tokens 2026-04-04 04:12:05 +01:00
Vincent Koc
26c9a4ce63 fix(contracts): align runtime seams and codex expectations 2026-04-04 12:11:07 +09:00
Vincent Koc
fc79ebe098 refactor(zalouser): narrow channel runtime imports 2026-04-04 12:09:58 +09:00
Vincent Koc
20937422ca refactor(mattermost): narrow channel runtime imports 2026-04-04 12:09:54 +09:00
Vincent Koc
e750c10577 refactor(nostr): narrow channel runtime imports 2026-04-04 12:08:38 +09:00
Vincent Koc
ba20e6cd98 refactor(nextcloud-talk): narrow channel runtime imports 2026-04-04 12:08:38 +09:00
Vincent Koc
6349e6aa3e refactor(irc): narrow channel runtime imports 2026-04-04 12:08:38 +09:00
Vincent Koc
c4bae0f7bf refactor(msteams): narrow channel runtime imports 2026-04-04 12:08:38 +09:00
Peter Steinberger
a23ab9b906 refactor: move voice-call realtime providers into extensions 2026-04-04 12:07:23 +09:00
Vincent Koc
61f93540b2 refactor(discord): narrow channel runtime imports 2026-04-04 12:06:00 +09:00
Vincent Koc
9bfaf7b681 refactor(slack): narrow channel runtime imports 2026-04-04 12:06:00 +09:00
Peter Steinberger
7e69c2f6a7 test: trim remaining mock drift 2026-04-04 04:04:12 +01:00
Vincent Koc
2f5509e36d refactor(slack): lazy-load directory config seam 2026-04-04 12:03:14 +09:00
Vincent Koc
f9cf868553 refactor(slack): lazy-load target resolution seams 2026-04-04 12:02:58 +09:00
Vincent Koc
bc6b20e542 refactor(discord): lazy-load directory and resolver seams 2026-04-04 12:02:58 +09:00
Peter Steinberger
af94a3a89b test: use native vitest root projects 2026-04-04 04:01:32 +01:00
Vincent Koc
2050ef2740 refactor(whatsapp): lazy-load channel directory and action seams 2026-04-04 12:01:30 +09:00
Peter Steinberger
df86f4dc00 docs(changelog): reorder unreleased highlights 2026-04-04 12:00:10 +09:00
Vincent Koc
6c31b2fbc5 refactor(imessage): narrow channel runtime imports 2026-04-04 11:59:38 +09:00
Vincent Koc
0737816010 refactor(line): narrow channel runtime imports 2026-04-04 11:59:38 +09:00
Vincent Koc
e9d802c32b fix(openai): align gpt-5.4 codex context test 2026-04-04 11:59:05 +09:00
Peter Steinberger
94b0062e90 fix: keep local marketplace paths stable (#60556) (thanks @eleqtrizit) 2026-04-04 11:58:52 +09:00
Agustin Rivera
e8ebd6ab8c fix(marketplace): narrow canonical path checks 2026-04-04 11:58:52 +09:00
Agustin Rivera
750d963cb9 fix(marketplace): preserve local symlink installs 2026-04-04 11:58:52 +09:00
Agustin Rivera
b1dd3ded35 fix(marketplace): canonicalize remote plugin paths 2026-04-04 11:58:52 +09:00
Peter Steinberger
f25f147fc3 refactor(whatsapp): move legacy group session detection into contract surface 2026-04-04 03:57:56 +01:00
Vincent Koc
098abd484d fix(channels): keep feishu override parent fallbacks 2026-04-04 11:57:27 +09:00
Vincent Koc
5eb32f24ea refactor(discord): normalize lazy loader formatting 2026-04-04 11:53:21 +09:00
Vincent Koc
bf1b1d63bd refactor(discord): lazy-load channel send seams 2026-04-04 11:53:21 +09:00
Vincent Koc
e249a852ae refactor(slack): lazy-load async channel seams 2026-04-04 11:53:21 +09:00
Peter Steinberger
a3a06524f2 fix(ci): restore session and setup fallbacks 2026-04-04 03:52:37 +01:00
Peter Steinberger
3c23126980 fix(ci): tolerate missing contract surface roots 2026-04-04 03:52:37 +01:00
Peter Steinberger
6b3ff0dd4f feat(openai): add codex gpt-5.4-mini support 2026-04-04 11:51:57 +09:00
Vincent Koc
7df763b04d refactor(providers): share xai compat helper 2026-04-04 11:45:13 +09:00
Karl Yang
6d33c67c01 fix: enable groq and deepgram bundled media providers by default (#59982) (thanks @yxjsxy)
* fix: add enabledByDefault to groq and deepgram media plugin manifests

The groq and deepgram plugin manifests were missing the
enabledByDefault: true flag. Without this flag, both plugins are
treated as bundled-but-disabled-by-default, so resolveRuntimePluginRegistry
loads without them. When buildProviderRegistry later needs to resolve
audio providers, the active registry is used first (short-circuits
the compat path in resolvePluginCapabilityProviders), leaving groq
and deepgram absent from the registry.

This caused 'Media provider not available: groq' errors when users
configured tools.media.audio.models with groq or deepgram, even
with GROQ_API_KEY / DEEPGRAM_API_KEY set correctly.

The fix mirrors the pattern used by other audio/media-only providers
such as mistral, which already has enabledByDefault: true.

Fixes #59875

* fix: enable groq and deepgram bundled media providers by default (#59982) (thanks @yxjsxy)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-04 08:11:34 +05:30
Monty Taylor
d605cb08c5 matrix: force SSSS recreation on backup reset when SSSS key is broken (bad MAC) (#60599)
Merged via squash.

Prepared head SHA: 3b0a623407
Co-authored-by: emonty <95156+emonty@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-03 22:34:23 -04:00
Vincent Koc
fb1cb99c88 fix(xai): narrow stream wrapper params 2026-04-04 11:31:27 +09:00
Vincent Koc
b5a849801c chore(plugin-sdk): refresh api baseline 2026-04-04 11:30:30 +09:00
Vincent Koc
e273753d45 refactor(providers): share anthropic tool payload helper 2026-04-04 11:30:30 +09:00
George Zhang
87885b948a fix: handle sensitive, number-clear, and array-clear edge cases in plugin config TUI (#60640) (#60640)
- Skip sensitive fields with a note directing users to openclaw config set
  or the Web UI (WizardPrompter has no masked input)
- Clear number fields to undefined when input is empty instead of storing 0
- Allow clearing array fields to undefined via empty input
2026-04-03 19:27:26 -07:00
Vincent Koc
761bd3bbd0 refactor(providers): share passthrough replay helpers 2026-04-04 11:22:41 +09:00
Ayaan Zaidi
6a3a0c405f fix: replay interrupted recurring jobs on first restart (#60583) (thanks @joelnishanth) 2026-04-04 07:51:04 +05:30
joelnishanth
7a16e14301 fix(cron): resume interrupted recurring jobs on first restart (#60495) 2026-04-04 07:51:04 +05:30
Vincent Koc
9e389cff3d fix(config): migrate legacy group allow aliases (#60597)
* fix(config): migrate legacy group allow aliases

* fix(config): inline legacy streaming migration helpers

* refactor(config): rename legacy account matcher helper

* chore(agents): codify config contract boundaries

* fix(config): keep legacy allow aliases writable

* Update AGENTS.md
2026-04-04 11:15:32 +09:00
Ayaan Zaidi
945b198c76 fix(android): allow cleartext LAN gateways 2026-04-04 07:36:18 +05:30
Vincent Koc
94adc24393 chore(plugin-sdk): refresh api baseline 2026-04-04 11:03:28 +09:00
Vincent Koc
30479b4ee0 refactor(providers): compose provider stream wrappers 2026-04-04 11:03:28 +09:00
Michael Faath
85c76e83b7 fix: restore android talk mode reply tts (#60306) (thanks @MKV21)
* Android: keep talk-mode session key synced for TTS replies

* Android: harden talk-mode reply playback state

* Android: harden talk-mode playback cancellation

* Android: avoid stale talk-mode playback preemption

* Android: tighten talk-mode playback claiming

* fix: distill android talk-mode playback ownership

* fix: restore android talk mode reply tts (#60306) (thanks @MKV21)

---------

Co-authored-by: Michael Faath <michaelfaath@macbookpro.speedport.ip>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-04 07:28:56 +05:30
Vincent Koc
858bf405f4 refactor(providers): share replay and tool compat helpers (#60637)
* refactor(providers): share replay and tool compat helpers

* chore(plugin-sdk): refresh api baseline
2026-04-04 10:55:36 +09:00
Vincent Koc
dd31ee1139 fix(cli): log pending control ui build 2026-04-04 10:47:38 +09:00
Peter Steinberger
b76ed0fadf fix: harden OpenAI websocket transport 2026-04-04 02:38:36 +01:00
Peter Steinberger
1e6e685347 fix: unblock cli startup metadata 2026-04-04 02:35:36 +01:00
Peter Steinberger
143d377c5a fix(cli): keep status json startup lean 2026-04-04 02:16:56 +01:00
Gustavo Madeira Santana
3713b0e506 vertex: read ADC files without exists preflight (#60592)
Merged via squash.

Prepared head SHA: 72f7372e97
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-03 21:13:34 -04:00
Peter Steinberger
34cd49faa6 perf: route browser and line extension tests 2026-04-04 02:08:45 +01:00
Peter Steinberger
1e90b3afcd perf: split extension channel vitest lane 2026-04-04 02:08:45 +01:00
Peter Steinberger
e941d425ac perf: split acp and ui vitest lanes 2026-04-04 02:08:45 +01:00
Peter Steinberger
fb0ff6896a perf: route contract test targets 2026-04-04 02:08:45 +01:00
Peter Steinberger
b04c4e599c perf: route bundled and extension helper tests 2026-04-04 02:08:44 +01:00
Peter Steinberger
ac11e02518 perf: route bundled and extension helper tests 2026-04-04 02:08:44 +01:00
Peter Steinberger
269771a4b6 perf: route targeted tests to scoped vitest configs 2026-04-04 02:08:44 +01:00
Peter Steinberger
37ee19521f fix(status): keep empty status path lightweight 2026-04-04 10:02:42 +09:00
Peter Steinberger
f8a3840a42 fix(ci): restore contextTokens runtime typing 2026-04-04 02:00:19 +01:00
Gustavo Madeira Santana
931ddd96f0 fix(cache): preserve full 3-turn history image cache window (#60603)
Merged via squash.

Prepared head SHA: 58d06ea372
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-03 20:48:56 -04:00
Peter Steinberger
b8021d6709 docs: add prompt cache stability rules 2026-04-04 01:47:00 +01:00
Peter Steinberger
58d2b9dd46 fix: add runtime model contextTokens caps 2026-04-04 09:36:53 +09:00
Peter Steinberger
45675c1698 docs: update Anthropic subscription billing guidance 2026-04-04 09:32:13 +09:00
Peter Steinberger
b2fb1210e1 fix: normalize openai websocket errors 2026-04-04 01:31:49 +01:00
Peter Steinberger
a38cb20177 feat(openai): add default prompt overlay 2026-04-04 09:27:07 +09:00
Gustavo Madeira Santana
f6f7609b66 matrix: retry credentials after legacy migration race (#60591)
Merged via squash.

Prepared head SHA: e050b39de0
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-03 20:25:49 -04:00
Boris Cherny
af81c437fa fix(cache): delay history image pruning to preserve prompt cache prefix (#58038)
pruneProcessedHistoryImages was stripping image blocks from every
already-answered user turn on each run. Turn N sends image bytes → provider
caches the prefix. Turn N+1 replaces image with text marker → bytes diverge
at that message → cache miss from there onward.

Now only prune images older than 3 assistant turns. Recent history stays
byte-identical so the cached prefix survives, while legacy sessions with
persisted image payloads still get cleaned up.
2026-04-03 17:22:58 -07:00
Gustavo Madeira Santana
300fb36879 infra: atomically replace sync JSON writes (#60589)
Merged via squash.

Prepared head SHA: cb8ed77049
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-03 20:21:44 -04:00
Peter Steinberger
628c71103e fix: align native openai transport defaults 2026-04-04 01:20:34 +01:00
Boris Cherny
bc16b9dccf fix(cache): sort MCP tools deterministically to stabilize prompt cache (#58037)
Co-authored-by: George Zhang <georgezhangtj97@gmail.com>
2026-04-03 17:19:53 -07:00
George Zhang
881f7dc82f Plugin SDK: add plugin config TUI prompts to onboard and configure wizards (#60590) (#60590)
Wire uiHints from plugin manifests into the TUI wizard so sandbox/tool
plugins get interactive config prompts during openclaw onboard (manual
flow) and openclaw configure --section plugins.

- Add setup.plugin-config.ts: discovers plugins with non-advanced uiHints,
  generates type-aware prompts (enum→select, boolean→confirm, array→csv,
  string/number→text) from jsonSchema + uiHints metadata.
- Onboard: new step after Skills, before Hooks (skipped in QuickStart).
  Only shows plugins with unconfigured fields.
- Configure: new 'plugins' section in the section menu. Shows all
  configurable plugins with configured/total field counts.

Closes #60030
2026-04-03 17:19:19 -07:00
Boris Cherny
f6380ae4b7 fix(cache): compact newest tool results first to preserve prompt cache prefix (#58036)
* fix(cache): compact newest tool results first to preserve prompt cache prefix

compactExistingToolResultsInPlace iterated front-to-back, replacing the
oldest tool results with placeholders when context exceeded 75%. This
rewrote messages[k] for small k, invalidating the provider prompt cache
from that point onward on every subsequent turn.

Reverse the loop to compact newest-first. The cached prefix stays intact;
the tradeoff is the model loses recent tool output instead of old, which
is acceptable since this guard only fires as an emergency measure past
the 75% threshold.

* fix(cache): compact newest tool results first to preserve prompt cache prefix (#58036) Thanks @bcherny

---------

Co-authored-by: George Zhang <georgezhangtj97@gmail.com>
2026-04-03 17:19:15 -07:00
2758 changed files with 106275 additions and 180021 deletions

View File

@@ -30,6 +30,7 @@ Use this skill for Parallels guest workflows and smoke interpretation. Do not lo
- Flow: fresh snapshot -> install npm package baseline -> smoke -> install current main tgz on the same guest -> smoke again.
- Same-guest update verification should set the default model explicitly to `openai/gpt-5.4` before the agent turn and use a fresh explicit `--session-id` so old session model state does not leak into the check.
- 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.
- 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.
@@ -46,6 +47,7 @@ Use this skill for Parallels guest workflows and smoke interpretation. Do not lo
- Preferred entrypoint: `pnpm test:parallels:macos`
- Default to the snapshot closest to `macOS 26.3.1 latest`.
- 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.
- 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.
@@ -64,6 +66,7 @@ Use this skill for Parallels guest workflows and smoke interpretation. Do not lo
- Use PowerShell only as the transport with `-ExecutionPolicy Bypass`, then call the `.cmd` shims from inside it.
- Multi-word `openclaw agent --message ...` checks should call `& $openclaw ...` inside PowerShell, not `Start-Process ... -ArgumentList` against `openclaw.cmd`, or Commander can see split argv and throw `too many arguments for 'agent'`.
- Windows installer/tgz phases now retry once after guest-ready recheck; keep new Windows smoke steps idempotent so a transport-flake retry is safe.
- If a Windows retry sees the VM become `suspended` or `stopped`, resume/start it before the next `prlctl exec`; otherwise the second attempt just repeats the same `rc=255`.
- Windows global `npm install -g` phases can stay quiet for a minute or more even when healthy; inspect the phase log before calling it hung, and only treat it as a regression once the retry wrapper or timeout trips.
- 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 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.
@@ -82,6 +85,7 @@ Use this skill for Parallels guest workflows and smoke interpretation. Do not lo
- Fresh `main` tgz smoke still needs the latest-release installer first because the snapshot has no Node or npm before bootstrap.
- This snapshot does not have a usable `systemd --user` session; managed daemon install is unsupported.
- The Linux smoke now falls back to a manual `setsid openclaw gateway run --bind loopback --port 18789 --force` launch with `HOME=/root` and the provider secret exported, then verifies `gateway status --deep --require-rpc` when available.
- The Linux manual gateway launch should wait for `gateway status --deep --require-rpc` inside the `gateway-start` phase; otherwise the first status probe can race the background bind and fail a healthy lane.
- If Linux gateway bring-up fails, inspect `/tmp/openclaw-parallels-linux-gateway.log` in the guest phase logs first; the common failure mode is a missing provider secret in the launched gateway environment.
## Discord roundtrip

View File

@@ -55,6 +55,8 @@ Check in this order:
- Was it fixed before release?
3. Exploit path
- Does the report show a real boundary bypass, not just prompt injection, local same-user control, or helper-level semantics?
- If data only moves between trusted workspace-memory files called out in `SECURITY.md`, do not treat "injection markers" alone as a security bug.
- In that case, frame sanitization as optional hardening only if it preserves expected memory workflows.
4. Functional tradeoff
- If a hardening change would reduce intended user functionality, call that out before proposing it.
- Prefer fixes that preserve user workflows over deny-by-default regressions unless the boundary demands it.
@@ -104,5 +106,6 @@ gh search prs --repo openclaw/openclaw --match title,body,comments -- "<terms>"
- “fixed on main, unreleased” is usually not a close.
- “needs attacker-controlled trusted local state first” is usually out of scope.
- “same-host same-user process can already read/write local state” is usually out of scope.
- “trusted workspace memory promotes/reindexes trusted workspace memory” is usually out of scope unless it crosses a documented boundary.
- “helper function behaves differently than documented config semantics” is usually invalid.
- If only the severity is wrong but the bug is real, keep it open and narrow the impact in the reply.

View File

@@ -14,7 +14,7 @@ inputs:
pnpm-version:
description: pnpm version for corepack.
required: false
default: "10.23.0"
default: "10.32.1"
install-bun:
description: Whether to install Bun alongside Node.
required: false

View File

@@ -4,7 +4,7 @@ inputs:
pnpm-version:
description: pnpm version to activate via corepack.
required: false
default: "10.23.0"
default: "10.32.1"
cache-key-suffix:
description: Suffix appended to the cache key.
required: false

11
.github/labeler.yml vendored
View File

@@ -64,6 +64,17 @@
- any-glob-to-any-file:
- "extensions/qqbot/**"
- "docs/channels/qqbot.md"
"channel: qa-channel":
- changed-files:
- any-glob-to-any-file:
- "extensions/qa-channel/**"
- "docs/channels/qa-channel.md"
"extensions: qa-lab":
- changed-files:
- any-glob-to-any-file:
- "extensions/qa-lab/**"
- "docs/concepts/qa-e2e-automation.md"
- "docs/channels/qa-channel.md"
"channel: signal":
- changed-files:
- any-glob-to-any-file:

View File

@@ -407,8 +407,12 @@ jobs:
"Closing this PR because it looks dirty (too many unrelated or unexpected changes). This usually happens when a branch picks up unrelated commits or a merge went sideways. Please recreate the PR from a clean branch.";
if (pullRequest) {
// `bad-barnacle` exempts PRs that Barnacle incorrectly marked dirty.
if (labelSet.has(dirtyLabel) && !labelSet.has(badBarnacleLabel)) {
if (labelSet.has(badBarnacleLabel)) {
core.info(`Skipping PR auto-response checks for #${pullRequest.number} because ${badBarnacleLabel} is present.`);
return;
}
if (labelSet.has(dirtyLabel)) {
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,

View File

@@ -545,7 +545,6 @@ jobs:
echo "OPENCLAW_VITEST_MAX_WORKERS=2" >> "$GITHUB_ENV"
if [ "$TASK" = "channels" ]; then
echo "OPENCLAW_VITEST_MAX_WORKERS=1" >> "$GITHUB_ENV"
echo "OPENCLAW_TEST_ISOLATE=1" >> "$GITHUB_ENV"
fi
- name: Download dist artifact
@@ -950,7 +949,7 @@ jobs:
- name: Setup pnpm + cache store
uses: ./.github/actions/setup-pnpm-store-cache
with:
pnpm-version: "10.23.0"
pnpm-version: "10.32.1"
cache-key-suffix: "node24"
# Sticky disk mount currently retries/fails on every shard and adds ~50s
# before install while still yielding zero pnpm store reuse.

View File

@@ -20,7 +20,7 @@ concurrency:
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
NODE_VERSION: "24.x"
PNPM_VERSION: "10.23.0"
PNPM_VERSION: "10.32.1"
jobs:
validate_macos_release_request:

View File

@@ -37,7 +37,7 @@ concurrency:
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
NODE_VERSION: "24.x"
PNPM_VERSION: "10.23.0"
PNPM_VERSION: "10.32.1"
jobs:
preflight_openclaw_npm:
@@ -129,6 +129,31 @@ jobs:
- name: Verify release contents
run: pnpm release:check
- name: Validate live cache credentials
if: ${{ github.ref == 'refs/heads/main' }}
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
set -euo pipefail
if [[ -z "${OPENAI_API_KEY}" ]]; then
echo "Missing OPENAI_API_KEY secret for release live cache validation." >&2
exit 1
fi
if [[ -z "${ANTHROPIC_API_KEY}" ]]; then
echo "Missing ANTHROPIC_API_KEY secret for release live cache validation." >&2
exit 1
fi
- name: Verify live prompt cache floors
if: ${{ github.ref == 'refs/heads/main' }}
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENCLAW_LIVE_CACHE_TEST: "1"
OPENCLAW_LIVE_TEST: "1"
run: pnpm test:live:cache
- name: Pack prepared npm tarball
id: packed_tarball
env:

View File

@@ -23,7 +23,7 @@ concurrency:
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
NODE_VERSION: "24.x"
PNPM_VERSION: "10.23.0"
PNPM_VERSION: "10.32.1"
CLAWHUB_REGISTRY: "https://clawhub.ai"
CLAWHUB_REPOSITORY: "openclaw/clawhub"
# Pinned to a reviewed ClawHub commit so release behavior stays reproducible.

View File

@@ -38,7 +38,7 @@ concurrency:
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
NODE_VERSION: "24.x"
PNPM_VERSION: "10.23.0"
PNPM_VERSION: "10.32.1"
jobs:
preview_plugins_npm:

8
.gitignore vendored
View File

@@ -4,7 +4,7 @@ node_modules
docker-compose.override.yml
docker-compose.extra.yml
dist
dist-runtime
dist-runtime/
pnpm-lock.yaml
bun.lock
bun.lockb
@@ -136,6 +136,10 @@ ui/src/ui/views/__screenshots__
ui/.vitest-attachments
docs/superpowers
# Generated docs baseline artifacts (locally generated, only hashes tracked)
docs/.generated/*.json
docs/.generated/*.jsonl
# Deprecated changelog fragment workflow
changelog/fragments/
@@ -143,3 +147,5 @@ changelog/fragments/
.tmp/
test/fixtures/openclaw-vitest-unit-report.json
analysis/
.artifacts/qa-e2e/
extensions/qa-lab/web/dist/

View File

@@ -55,6 +55,11 @@
- Public docs: `docs/gateway/protocol.md`, `docs/gateway/bridge-protocol.md`, `docs/concepts/architecture.md`
- Definition files: `src/gateway/protocol/schema.ts`, `src/gateway/protocol/schema/*.ts`, `src/gateway/protocol/index.ts`
- Rule: protocol changes are contract changes. Prefer additive evolution; incompatible changes require explicit versioning, docs, and client/codegen follow-through.
- Config contract boundary:
- Canonical public config lives in exported config types, zod/schema surfaces, schema help/labels, generated config metadata, config baselines, and any user-facing gateway/config payloads. Keep those surfaces aligned.
- When a legacy config key is retired from the public contract, remove it from every public config surface above. Keep backward compatibility only through raw-config migration/doctor seams unless explicit product policy says otherwise.
- Do not reintroduce removed legacy aliases into public types/schema/help/baselines “for convenience”. If old configs still need to load, handle that in `legacy.migrations.*`, config ingest, or `openclaw doctor --fix`.
- `hooks.internal.entries` is the canonical public hook config model. `hooks.internal.handlers` is compatibility-only input and must not be re-exposed in public schema/help/baseline surfaces.
- Bundled plugin contract boundary:
- Public docs: `docs/plugins/architecture.md`, `docs/plugins/manifest.md`, `docs/plugins/sdk-overview.md`
- Definition files: `src/plugins/contracts/registry.ts`, `src/plugins/types.ts`, `src/plugins/public-artifacts.ts`
@@ -125,10 +130,10 @@
- Formatting gate: the pre-commit hook runs `pnpm format` before `pnpm check`. If you want a formatting-only preflight locally, run `pnpm format` explicitly.
- If you need a fast commit loop, `FAST_COMMIT=1 git commit ...` skips the hooks repo-wide `pnpm format` and `pnpm check`; use that only when you are deliberately covering the touched surface some other way.
- Tests: `pnpm test` (vitest); coverage: `pnpm test:coverage`
- Generated baseline artifacts live together under `docs/.generated/`.
- Generated baseline drift detection uses SHA-256 hash files under `docs/.generated/` (`.sha256` files tracked in git; full JSON baselines are gitignored, generated locally for inspection).
- Config schema drift uses `pnpm config:docs:gen` / `pnpm config:docs:check`.
- Plugin SDK API drift uses `pnpm plugin-sdk:api:gen` / `pnpm plugin-sdk:api:check`.
- If you change config schema/help or the public Plugin SDK surface, update the matching baseline artifact and keep the two drift-check flows adjacent in scripts/workflows/docs guidance rather than inventing a third pattern.
- If you change config schema/help or the public Plugin SDK surface, run the matching gen command and commit the updated `.sha256` hash file. Keep the two drift-check flows adjacent in scripts/workflows/docs guidance rather than inventing a third pattern.
- For narrowly scoped changes, prefer narrowly scoped tests that directly validate the touched behavior. If no meaningful scoped test exists, say so explicitly and use the next most direct validation available.
- Verification modes for work on `main`:
- Default mode: `main` is relatively stable. Count pre-commit hook coverage when it already verified the current tree, avoid rerunning the exact same checks just for ceremony, and prefer keeping CI/main green before landing.
@@ -140,6 +145,14 @@
- For narrowly scoped changes, if unrelated failures already exist on latest `origin/main`, state that clearly, report the scoped tests you ran, and ask before broadening scope into unrelated fixes or landing despite those failures.
- Do not use scoped tests as permission to ignore plausibly related failures.
## Prompt Cache Stability
- Treat prompt-cache stability as correctness/perf-critical, not cosmetic.
- Any code that assembles model or tool payloads from maps, sets, registries, plugin lists, MCP catalogs, filesystem reads, or network results must make ordering deterministic before building the request.
- Do not rewrite older transcript/history bytes on every turn unless you intentionally want to invalidate the cached prefix. Legacy cleanup, pruning, normalization, and migration logic should preserve recent prompt bytes when possible.
- If truncation or compaction is required, prefer mutating newest or tail content first so the cached prefix stays byte-identical for as long as possible.
- For cache-sensitive changes, require a regression test that proves turn-to-turn prefix stability or deterministic request assembly; helper-local tests alone are not enough.
## Coding Style & Naming Conventions
- Language: TypeScript (ESM). Prefer strict typing; avoid `any`.
@@ -191,10 +204,10 @@
- Test performance guardrail: prefer narrow public SDK subpaths such as `models-provider-runtime`, `skill-commands-runtime`, and `reply-dispatch-runtime` over older broad helper barrels when both expose the needed helper.
- Test performance guardrail: treat import-dominated test time as a boundary bug. Refactor the import surface before adding more cases to the slow file.
- Agents MUST NOT modify baseline, inventory, ignore, snapshot, or expected-failure files to silence failing checks without explicit approval in this chat.
- For targeted/local debugging, keep using the wrapper: `pnpm test -- <path-or-filter> [vitest args...]` (for example `pnpm test -- src/commands/onboard-search.test.ts -t "shows registered plugin providers"`); do not default to raw `pnpm vitest run ...` because it bypasses wrapper config/profile/pool routing.
- For targeted/local debugging, use the native root-project entrypoint: `pnpm test <path-or-filter> [vitest args...]` (for example `pnpm test src/commands/onboard-search.test.ts -t "shows registered plugin providers"`); do not default to raw `pnpm vitest run ...` because it bypasses the repo's default config/profile/pool routing.
- Do not set test workers above 16; tried already.
- Keep Vitest on `forks` only. Do not introduce or reintroduce any non-`forks` Vitest pool or alternate execution mode in configs, wrapper scripts, or default test commands without explicit approval in this chat. This includes `threads`, `vmThreads`, `vmForks`, and any future/nonstandard pool variant.
- If local Vitest runs cause memory pressure, the wrapper now derives budgets from host capabilities (CPU, memory band, current load). For a conservative explicit override during land/gate runs, use `OPENCLAW_TEST_PROFILE=serial OPENCLAW_TEST_SERIAL_GATEWAY=1 pnpm test`.
- Vitest now defaults to native root-project `threads`, with hard `forks` exceptions for `gateway`, `agents`, and `commands`. Keep new pool changes explicit and justified; use `OPENCLAW_VITEST_POOL=forks` for full local fork debugging.
- If local Vitest runs cause memory pressure, the default worker budget now derives from host capabilities (CPU, memory band, current load). For a conservative explicit override during land/gate runs, use `OPENCLAW_VITEST_MAX_WORKERS=1 pnpm test`.
- Live tests (real keys): `OPENCLAW_LIVE_TEST=1 pnpm test:live` (OpenClaw-only) or `LIVE=1 pnpm test:live` (includes provider live tests). Docker: `pnpm test:docker:live-models`, `pnpm test:docker:live-gateway`. Onboarding Docker E2E: `pnpm test:docker:onboard`.
- `pnpm test:live` defaults quiet now. Keep `[live]` progress; suppress profile/gateway chatter. Full logs: `OPENCLAW_LIVE_TEST_QUIET=0 pnpm test:live`.
- Full kit + whats covered: `docs/help/testing.md`.
@@ -252,6 +265,8 @@
- "Bump version everywhere" means all version locations above **except** `appcast.xml` (only touch appcast when cutting a new macOS Sparkle release).
- **Restart apps:** “restart iOS/Android apps” means rebuild (recompile/install) and relaunch, not just kill/launch.
- **Device checks:** before testing, verify connected real devices (iOS/Android) before reaching for simulators/emulators.
- Mobile pairing: `ws://` (cleartext) is allowed for private LAN addresses (RFC 1918, link-local, mDNS `.local`) and loopback. Private LAN hosts typically lack PKI-backed identity, so requiring TLS there adds complexity without meaningful security gain. `wss://` is required for Tailscale and public endpoints.
- Security report scope: reports that treat cleartext `ws://` mobile pairing over private LAN as a vulnerability are out of scope unless they demonstrate a trust-boundary bypass beyond passive network observation on the same LAN.
- iOS Team ID lookup: `security find-identity -p codesigning -v` → use Apple Development (…) TEAMID. Fallback: `defaults read com.apple.dt.Xcode IDEProvisioningTeamIdentifiers`.
- A2UI bundle hash: `src/canvas-host/a2ui/.bundle.hash` is auto-generated; ignore unexpected changes, and only regenerate via `pnpm canvas:a2ui:bundle` (or `scripts/bundle-a2ui.sh`) when needed. Commit the hash as a separate commit.
- Release signing/notary credentials are managed outside the repo; maintainers keep that setup in the private [maintainer release docs](https://github.com/openclaw/maintainers/tree/main/release).

View File

@@ -4,104 +4,133 @@ Docs: https://docs.openclaw.ai
## Unreleased
### Breaking
- Config: remove legacy public config aliases such as `talk.voiceId` / `talk.apiKey`, `agents.*.sandbox.perSession`, `browser.ssrfPolicy.allowPrivateNetwork`, `hooks.internal.handlers`, and channel/group/room `allow` toggles in favor of the canonical public paths and `enabled`, while keeping load-time compatibility and `openclaw doctor --fix` migration support for existing configs. (#60726) Thanks @vincentkoc.
### Changes
- Memory/dreaming (experimental): add weighted short-term recall promotion, managed dreaming modes (`off|core|rem|deep`), a `/dreaming` command, Dreams UI, multilingual conceptual tagging, and doctor/status repair support so durable memory promotion can run in the background with less manual setup. (#60569, #60697)
- Channels/context visibility: add configurable `contextVisibility` per channel (`all`, `allowlist`, `allowlist_quote`) so supplemental quote, thread, and fetched history context can be filtered by sender allowlists instead of always passing through as received.
- Matrix/exec approvals: add Matrix-native exec approval prompts with account-scoped approvers, channel-or-DM delivery, and room-thread aware resolution handling. (#58635) Thanks @gumadeiras.
- Providers/StepFun: add the bundled StepFun provider plugin with standard and Step Plan endpoints, China/global onboarding choices, `step-3.5-flash` on both catalogs, and `step-3.5-flash-2603` currently exposed on Step Plan. (#60032) Thanks @hengm3467.
- Providers/config: add full `models.providers.*.request` transport overrides for model-provider paths, including headers, auth, proxy, and TLS, and keep media provider HTTP request transport overrides aligned with the same request-policy surface. (#60200) Thanks @vincentkoc.
- Providers/Fireworks: add a bundled Fireworks AI provider plugin with `FIREWORKS_API_KEY` onboarding, Fire Pass Kimi defaults, and dynamic Fireworks model-id support.
- Providers/config: add `models.providers.*.request` overrides for headers and auth on model-provider paths, and full request transport overrides for media provider HTTP paths.
- MiniMax/TTS: add a bundled MiniMax speech provider backed by the T2A v2 API so speech synthesis can run through MiniMax-native voices and auth. (#55921) Thanks @duncanita.
- Control UI/skills: add ClawHub search, detail, and install flows directly in the Skills panel. (#60134) Thanks @samzong.
- Outbound/runtime seams: split delivery, target-resolution, and session/transcript helper loading into narrower runtime seams so outbound hot paths and their owner tests avoid broader setup fan-out. (#60311) Thanks @shakkernerd.
- Plugins/browser seams: split browser and WhatsApp plugin-sdk seams into narrower browser, approval-auth, and target-helper facades so hot paths and owner tests avoid broader runtime fan-out. (#60376) Thanks @shakkernerd.
- Tests/runtime: trim local unit-test import/runtime fan-out across browser, WhatsApp, cron, task, and reply flows so owner suites start faster with lower shared-worker overhead while preserving the same focused behavior coverage. (#60249) Thanks @shakkernerd.
- Tests/secrets runtime: restore split secrets suite cache and env isolation cleanup so broader runs do not leak stale plugin or provider snapshot state. (#60395) Thanks @shakkernerd.
- Providers/Ollama: add bundled Ollama Web Search provider for key-free web_search via your configured Ollama host and `ollama signin`. (#59318) Thanks @BruceMacD.
- Providers/Ollama: add a bundled Ollama Web Search provider for key-free `web_search` via your configured Ollama host and `ollama signin`. (#59318) Thanks @BruceMacD.
- Plugins/onboarding: add plugin config TUI prompts to onboard and configure wizards so more plugin setup can stay in the guided flow. (#60590)
- Plugins/install: add `openclaw plugins install --force` to overwrite existing plugin and hook-pack install targets without using the dangerous-code override flag. (#60544) Thanks @gumadeiras.
- Providers/transport: add shared proxy/TLS/auth-aware request transport support across model-provider paths, including Anthropic and Google native transport runtimes, so provider request overrides work beyond OpenAI-family traffic.
- Providers/Anthropic: remove setup-token from new onboarding and auth-command setup paths, keep existing configured legacy token profiles runnable, and steer new Anthropic setup to Claude CLI or API keys.
- Providers/OpenAI Codex: add forward-compat `openai-codex/gpt-5.4-mini` synthesis across provider runtime, model catalog, and model listing so Codex mini works before bundled Pi catalog updates land.
- Tools/web_search: add a bundled MiniMax Search provider backed by the Coding Plan search API, with region reuse from `MINIMAX_API_HOST` and plugin-owned credential config. (#54648) Thanks @fengmk2.
- Channels/context visibility: add configurable `contextVisibility` per channel (`all`, `allowlist`, `allowlist_quote`) so quoted, threaded, and fetched history context can be filtered by sender allowlists instead of always passing through as received.
- Providers/request overrides: add shared model and media request transport overrides across OpenAI-, Anthropic-, Google-, and compatible provider paths, including headers, auth, proxy, and TLS controls. (#60200)
- Matrix/exec approvals: add Matrix-native exec approval prompts with account-scoped approvers, channel-or-DM delivery, and room-thread aware resolution handling. (#58635) Thanks @gumadeiras.
- Agents/Claude CLI: expose OpenClaw tools to background Claude CLI runs through a loopback MCP bridge that reuses gateway tool policy, honors session/account/channel scoping, and only advertises the bridge when the local runtime is actually live. (#35676) Thanks @mylukin.
- Agents/Claude CLI: switch bundled Claude CLI runs to stdin + `stream-json` partial-message streaming so prompts stop riding argv, long replies show live progress, and final session/usage metadata still land cleanly.
- Prompt caching: keep prompt prefixes more reusable across transport fallback, deterministic MCP tool ordering, compaction, and embedded image history so follow-up turns hit cache more reliably. (#58036, #58037, #58038, #59054, #60603, #60691) Thanks @bcherny.
- Agents/cache: diagnostics: add prompt-cache break diagnostics, trace live cache scenarios through embedded runner paths, and show cache reuse explicitly in `openclaw status --verbose`. Thanks @vincentkoc.
- Agents/cache: stabilize cache-relevant system prompt fingerprints by normalizing equivalent structured prompt whitespace, line endings, hook-added system context, and runtime capability ordering so semantically unchanged prompts reuse KV/cache more reliably. Thanks @vincentkoc.
- Config/schema: enrich the exported `openclaw config schema` JSON Schema with field titles and descriptions so editors, agents, and other schema consumers receive the same config help metadata. (#60067) Thanks @solavrc.
- Providers/StepFun: add the bundled StepFun provider plugin with standard and Step Plan endpoints, China/global onboarding choices, `step-3.5-flash` on both catalogs, and `step-3.5-flash-2603` currently exposed on Step Plan. (#60032) Thanks @hengm3467.
### Fixes
- Skills/uv install: block workspace `.env` from overriding `UV_PYTHON` and strip related interpreter override keys from uv skill-install subprocesses so repository-controlled env files cannot steer the selected Python runtime. (#59178) Thanks @pgondhi987.
- Telegram/reactions: preserve `reactionNotifications: "own"` across gateway restarts by persisting sent-message ownership state instead of treating cold cache as a permissive fallback. (#59207) Thanks @samzong.
- Gateway/startup: detect PID recycling in gateway lock files on Windows and macOS, and add startup progress so stale lock conflicts no longer block healthy restarts. (#59843) Thanks @TonyDerek-dot.
- MS Teams/DM media: download inline images in 1:1 chats via Graph API so Teams DM image attachments stop failing to load. (#52212) Thanks @Ted-developer.
- MS Teams/threading: preserve channel reply threading in proactive fallback so replies stay in the original thread instead of dropping into the channel root. (#55198) Thanks @hyojin.
- Telegram/media: preserve `<media:...>` placeholders and `file_id` in captioned messages when Bot API downloads fail, so agents still receive media context. (#59948) Thanks @v1p0r.
- Telegram/media: keep inbound image attachments readable on upgraded installs where legacy state roots still differ from the managed config-dir media cache. (#59971) Thanks @neeravmakwana.
- Telegram/local Bot API: thread `channels.telegram.apiRoot` through buffered reply-media and album downloads so self-hosted Bot API file paths stop falling back to `api.telegram.org` and 404ing. (#59544) Thanks @SARAMALI15792.
- Telegram/replies: preserve explicit topic targets when `replyTo` is present while still inheriting the current topic for same-chat replies without an explicit topic. (#59634) Thanks @dashhuang.
- Telegram/native commands: clean up metadata-driven progress placeholders when replies fall back, edits fail, or local exec approval prompts are suppressed. (#59300) Thanks @jalehman.
- Telegram/models: compare full provider/model refs in the Telegram picker so same-id models from other providers no longer show the wrong current-model checkmark. (#60384) Thanks @sfuminya.
- Media/request overrides: resolve shared and capability-filtered media request SecretRefs correctly and expose media transport override fields to schema-driven config consumers. (#59848) Thanks @vincentkoc.
- Providers/request overrides: stop advertising unsupported proxy and TLS transport settings on `models.providers.*.request`, and fail closed if unvalidated config tries to route LLM model-provider traffic through dead transport fields. (#59682) Thanks @vincentkoc.
- Discord/mentions: treat `@everyone` and `@here` as valid mention-gate triggers in guild preflight so mention-required bots still respond to those broadcasts. (#60343) Thanks @geekhuashan.
- Matrix: allow secret-storage recreation during automatic repair bootstrap so clients that lose their recovery key can recover and persist new cross-signing keys. (#59846) Thanks @al3mart.
- Matrix/crypto persistence: capture and write the IndexedDB snapshot while holding the snapshot file lock so concurrent gateway and CLI persists cannot overwrite newer crypto state. (#59851) Thanks @al3mart.
- Ollama/auth: prefer real cloud auth over local marker during model auth resolution so cloud-backed Ollama auth does not get shadowed by stale local-only markers.
- Plugins/Kimi Coding: parse tagged Kimi tool-call text into structured tool calls on the provider stream path so tools execute instead of echoing raw markup. (#60051) Thanks @obviyus.
- Channels/passive hooks: emit passive message hooks for mention-skipped Telegram and Signal group messages when `ingest` is enabled, including wildcard/default fallback and per-group override handling. (#60018) Thanks @obviyus.
- Providers/compat: stop forcing OpenAI-only payload defaults on proxy and custom OpenAI-compatible routes, and preserve native vendor-specific reasoning, tool, and streaming behavior for Anthropic-compatible, Moonshot, Mistral, ModelStudio, OpenRouter, xAI, Z.ai, and other routed provider paths.
- Plugins/manifest registry: stop warning when an explicit manifest `id` intentionally differs from the discovery hint. (#59185) Thanks @samzong.
- WhatsApp/streaming: honor `channels.whatsapp.blockStreaming` again for inbound auto-replies so progressive block replies can be enabled explicitly instead of being forced to final-only delivery. Thanks @mcaxtr.
- Auth/failover: shorten `auth_permanent` lockouts, add dedicated config knobs for permanent-auth backoff, and downgrade ambiguous auth-ish upstream incidents to retryable auth failures so providers recover automatically after transient outages. (#60404) Thanks @extrasmall0.
- Providers/GitHub Copilot: route Claude models through Anthropic Messages with Copilot-compatible headers and Anthropic prompt-cache markers instead of forcing the OpenAI Responses transport.
- Plugins/runtime: reuse compatible active registries for `web_search` and `web_fetch` provider snapshot resolution so repeated runtime reads do not re-import the same bundled plugin set on each agent message. Related #48380.
- Infra/tailscale: ignore `OPENCLAW_TEST_TAILSCALE_BINARY` outside explicit test environments and block it from workspace `.env`, so test-only binary overrides cannot be injected through trusted repository state. (#58468) Thanks @eleqtrizit.
- Plugins/OpenAI: enable reference-image edits for `gpt-image-1` by routing edit calls to `/images/edits` with multipart image uploads, and update image-generation capability/docs metadata accordingly. Thanks @steipete.
- Cache/context guard: compact newest tool results first so the cached prompt prefix stays byte-identical and avoids full re-tokenization every turn past the 75% context threshold. (#58036) Thanks @bcherny.
- Agents/tools: include value-shape hints in missing-parameter tool errors so dropped, empty-string, and wrong-type write payloads are easier to diagnose from logs. (#55317) Thanks @priyansh19.
- Android/assistant: keep queued App Actions prompts pending when auto-send enqueue is rejected, so transient chat-health drops do not silently lose the assistant request. Thanks @obviyus.
- Plugins/startup: migrate legacy `tools.web.search.<provider>` config before strict startup validation, and record plugin failure phase/timestamp so degraded plugin startup is easier to diagnose from logs and `plugins list`.
- Plugins/Google: separate OAuth CSRF state from PKCE code verifier during Gemini browser sign-in so state validation and token exchange use independent values. (#59116) Thanks @eleqtrizit.
- Agents/subagents: honor `agents.defaults.subagents.allowAgents` for `sessions_spawn` and `agents_list`, so default cross-agent allowlists work without duplicating per-agent config. (#59944) Thanks @hclsys.
- Agents/tools: normalize only truly empty MCP tool schemas to `{ type: "object", properties: {} }` so OpenAI accepts parameter-free tools without rewriting unrelated conditional schemas. (#60176) Thanks @Bartok9.
- Update/npm: prefer the npm binary that owns the installed global OpenClaw prefix during package self-update, so mixed Homebrew-plus-nvm setups update the right install. (#60153) Thanks @jayeshp19.
- Plugins/browser: block SSRF redirect bypass by installing a real-time Playwright route handler before `page.goto()` so navigation to private/internal IPs is intercepted and aborted mid-redirect instead of checked post-hoc. (#58771) Thanks @pgondhi987.
- Android/gateway: require TLS for non-loopback remote gateway endpoints while still allowing local loopback and emulator cleartext setup flows. (#58475) Thanks @eleqtrizit.
- Exec/Windows: hide transient console windows for `runExec` and `runCommandWithTimeout` child-process launches, matching other Windows exec paths and stopping visible shell flashes during tool runs. (#59466) Thanks @lawrence3699.
- Zalo/webhook: scope replay-dedupe cache key to path and account using `JSON.stringify` so multi-account deployments do not silently drop events due to cross-account cache poisoning. (#59387) Thanks @pgondhi987.
- Exec/Windows: reject malformed drive-less rooted executable paths like `:\Users\...` so approval and allowlist candidate resolution no longer treat them as cwd-relative commands. (#58040) Thanks @SnowSky1.
- Exec/preflight: fail closed on complex interpreter invocations that would otherwise skip script-content validation, and correctly inspect quoted script paths before host execution. Thanks @pgondhi987.
- Exec/Windows: include Windows-compatible env override keys like `ProgramFiles(x86)` in system-run approval binding so changed approved values are rejected instead of silently passing unbound. (#59182) Thanks @pgondhi987.
- ACP/Windows spawn: fail closed on unresolved `.cmd` and `.bat` OpenClaw wrappers unless a caller explicitly opts into shell fallback, so Windows ACP launches do not silently drop into shell-mediated execution when wrapper unwrapping fails. (#58436) Thanks @eleqtrizit.
- Exec/Windows: prefer strict-inline-eval denial over generic allowlist prompts for interpreter carriers, while keeping persisted Windows allow-always approvals argv-bound. (#59780) Thanks @luoyanglang.
- Gateway/connect: omit admin-scoped config and auth metadata from lower-privilege `hello-ok` snapshots while preserving those fields for admin reconnects. (#58469) Thanks @eleqtrizit.
- iOS/canvas: restrict A2UI bridge trust to the bundled scaffold and exact capability-backed remote canvas URLs, so generic `canvas.navigate` and `canvas.present` loads no longer gain action-dispatch authority. (#58471) Thanks @eleqtrizit.
- Agents/tool policy: preserve restrictive plugin-only allowlists instead of silently widening access to core tools, and keep allowlist warnings aligned with the enforced policy. (#58476) Thanks @eleqtrizit.
- Hooks/session_end: preserve deterministic reason metadata for custom reset aliases and overlapping idle-plus-daily rollovers so plugins can rely on lifecycle reason reporting. (#59715) Thanks @jalehman.
- Tools/image generation: stop inferring unsupported resolution overrides for OpenAI reference-image edits when no explicit `size` or `resolution` is provided, so default edit flows no longer fail before the provider request is sent.
- Agents/sessions: release embedded runner session locks even when teardown cleanup throws, so timed-out or failed cleanup paths no longer leave sessions wedged until the stale-lock watchdog recovers them. (#59194) Thanks @samzong.
- Slack/app manifest: add the missing `groups:read` scope to the onboarding and example Slack app manifest so apps copied from the OpenClaw templates can resolve private group conversations reliably.
- Mobile pairing/Android: stop generating Tailscale and public mobile setup codes that point at unusable cleartext remote gateways, keep private LAN pairing allowed, and make Android reject insecure remote endpoints with clearer guidance while mixed bootstrap approvals honor operator scopes correctly. (#60128) Thanks @obviyus.
- Telegram/media: add `channels.telegram.network.dangerouslyAllowPrivateNetwork` for trusted fake-IP or transparent-proxy environments where Telegram media downloads resolve `api.telegram.org` to private/internal/special-use addresses.
- Discord/proxy: keep Carbon REST, monitor startup, and webhook sends on the configured Discord proxy while falling back cleanly when the proxy URL is invalid, so Discord replies and deploys do not hard-fail on malformed proxy config. (#57465) Thanks @geekhuashan.
- Discord/components: keep modal-trigger and spoiler-file component messages on the component path when sending media, so classic-message fallback does not silently drop component-only behavior. (#60361) Thanks @geekhuashan.
- Mobile pairing/device approval: mint both node and operator device tokens when one approval grants merged roles, so mixed mobile bootstrap pairings stop reconnecting as operator-only and showing the node offline. (#60208) Thanks @obviyus.
- Agents/tool policy: stop `tools.profile` warnings from flagging runtime-gated baseline core tools as unknown when the coding profile is missing tools like `code_execution`, `x_search`, `image`, or `image_generate`, while still warning on explicit extra allowlist entries. Thanks @vincentkoc.
- Sessions/resolution: collapse alias-duplicate session-id matches before scoring, keep distinct structural ties ambiguous, and prefer current-store reuse when resolving equal cross-store duplicates so follow-up turns stop dropping or duplicating sessions on timestamp ties.
- Mobile pairing/bootstrap: keep setup bootstrap tokens alive through the initial node auto-pair so the same QR bootstrap token can finish operator approval, then revoke it after the full issued profile connects successfully. (#60221) Thanks @obviyus.
- Plugins/allowlists: let explicit bundled chat channel enablement bypass `plugins.allow`, while keeping auto-enabled channel activation and startup sidecars behind restrictive allowlists. (#60233) Thanks @dorukardahan.
- Allowlist/commands: require owner access for `/allowlist add` and `/allowlist remove` so command-authorized non-owners cannot mutate persisted allowlists. (#59836) Thanks @eleqtrizit.
- Control UI/skills: clear stale ClawHub results immediately when the search query changes, so debounced searches cannot keep outdated install targets visible. Related #60134.
- Fetch/redirects: normalize guarded redirect method rewriting and loop detection so SSRF-guarded requests match platform redirect behavior without missing loops back to the original URL. (#59121) Thanks @eleqtrizit.
- Discord/ack reactions: keep automatic ACK reaction auth on the active hydrated Discord account so SecretRef-backed and non-default-account reactions stop falling back to stale default config resolution. (#60081) Thanks @FunJim.
- Telegram/model switching: render non-default `/model` callback confirmations with HTML formatting so Telegram shows the selected model in bold instead of raw `**...**` markers. (#60042) Thanks @GitZhangChi.
- Plugins/update: allow `openclaw plugins update` to use `--dangerously-force-unsafe-install` for built-in dangerous-code false positives during plugin updates. (#60066) Thanks @huntharo.
- Gateway/auth: disconnect shared-auth websocket sessions only for effective auth rotations on restart-capable config writes, and keep `config.set` auth edits from dropping still-valid live sessions. (#60387) Thanks @mappel-nv.
- Control UI/chat: keep the Stop button visible during tool-only execution so abortable runs do not fall back to Send while tools are still running. (#54528) thanks @chziyue.
- Discord/voice: make READY auto-join fire-and-forget while keeping the shorter initial voice-connect timeout separate from the longer playback-start wait. (#60345) Thanks @geekhuashan.
- Agents/skills: add inherited `agents.defaults.skills` allowlists, make per-agent `agents.list[].skills` replace defaults instead of merging, and scope embedded, session, sandbox, and cron skill snapshots through the effective runtime agent. (#59992) Thanks @gumadeiras.
- Matrix/Telegram exec approvals: recover stored same-channel account bindings even when session reply state drifted to another channel, so foreign-channel approvals route to the bound account instead of fanning out or being rejected as ambiguous. (#60417) thanks @gumadeiras.
- Slack/app manifest: set `bot_user.always_online` to `true` in the onboarding and example Slack app manifest so the Slack app appears ready to respond.
- Gateway/websocket auth: refresh auth on new websocket connects after secrets reload so rotated gateway tokens take effect immediately without requiring a restart. (#60323) Thanks @mappel-nv.
- Onboarding/plugins: keep non-interactive auth-choice inference scoped to bundled and already-trusted plugins so untrusted workspace manifests cannot hijack built-in provider API-key flows. (#59120) Thanks @eleqtrizit.
- Agents/workspace: respect `agents.defaults.workspace` for non-default agents by resolving them under the configured base path instead of falling back to `workspace-<id>`. (#59858) Thanks @joelnishanth.
- Config/All Settings: keep the raw config view intact when sensitive fields are blank instead of corrupting or dropping the snapshot during redaction. (#28214) thanks @solodmd.
- Plugins/runtime: honor explicit capability allowlists during fallback speech, media-understanding, and image-generation provider loading so bundled capability plugins do not bypass restrictive `plugins.allow` config. (#52262) Thanks @PerfectPan.
- Hooks/tool policy: block tool calls when a `before_tool_call` hook crashes so hook failures fail closed instead of silently allowing execution. (#59822) Thanks @pgondhi987.
- Matrix/media: surface a dedicated `[matrix <kind> attachment too large]` marker for oversized inbound media instead of the generic unavailable marker, and classify size-limit failures with a typed Matrix error. (#60289) Thanks @efe-arv.
- WhatsApp/watchdog: reset watchdog timeout after reconnect so quiet channels no longer enter a tight reconnect loop from stale message timestamps carried across connection runs. (#60007) Thanks @MonkeyLeeT.
- Agents/fallback: persist selected fallback overrides before retry attempts start, prefer persisted overrides during live-session reconciliation, and keep provider-scoped auth-profile failover from snapping retries back to stale primary selections.
- Gateway/macOS: let launchd `KeepAlive` own in-process gateway restarts again, adding a short supervised-exit delay so rapid restarts avoid launchd crash-loop unloads while `openclaw gateway restart` still reports real LaunchAgent errors synchronously.
- Synology Chat/security: route webhook token comparison through the shared constant-time secret helper for consistency with other bundled plugins.
- Models/MiniMax: honor `MINIMAX_API_HOST` for implicit bundled MiniMax provider catalogs so China-hosted API-key setups pick `api.minimaxi.com/anthropic` without manual provider config. (#34524) Thanks @caiqinghua.
- Usage/MiniMax: invert remaining-style `usage_percent` fields when MiniMax reports only remaining percentage data, so usage bars stop showing nearly-full remaining quota as nearly-exhausted usage. (#60254) Thanks @jwchmodx.
- MiniMax: advertise image input on bundled `MiniMax-M2.7` and `MiniMax-M2.7-highspeed` model definitions so image-capable flows can route through the M2.7 family correctly. (#54843) Thanks @MerlinMiao88888888.
- Media understanding: auto-register image-capable config providers for vision routing, so custom GLM-style provider ids with image models stop failing with “no media-understanding provider registered”. (#51418) Thanks @xydt-610.
- Providers/OpenAI: preserve native `reasoning.effort: "none"` and strict tool schemas on direct OpenAI-family endpoints, keep compat routes on compat shaping, fix Responses WebSocket warm-up behavior, keep stable session and turn metadata, and fall back more gracefully after early WebSocket failures.
- Providers/OpenAI Codex: split native `contextWindow` from runtime `contextTokens`, keep the default effective cap at `272000`, and expose a per-model `contextTokens` override on `models.providers.*.models[]`.
- Providers/compat: stop forcing OpenAI-only defaults on proxy and custom OpenAI-compatible routes, preserve native vendor-specific reasoning/tool/streaming behavior across Anthropic-compatible, Moonshot, Mistral, ModelStudio, OpenRouter, xAI, and Z.ai endpoints, and route GitHub Copilot Claude models through Anthropic Messages instead of OpenAI Responses.
- Providers/Model Studio: preserve native streaming usage reporting for DashScope-compatible endpoints even when they are configured under a generic provider key, so streamed token totals stop sticking at zero. (#52395) Thanks @IVY-AI-gif.
- Providers/OpenAI-compatible WS: compute fallback token totals from normalized usage when providers omit or zero `total_tokens`, so DashScope-compatible sessions stop storing zero totals after alias normalization. (#54940) Thanks @lyfuci.
- Status/usage: let `/status` and `session_status` fall back to transcript token totals when the session meta store stayed at zero, so LM Studio, Ollama, DashScope, and similar OpenAI-compatible providers stop showing `Context: 0/...`. (#55041) Thanks @jjjojoj.
- Providers/Z.AI: preserve explicitly registered `glm-5-*` variants like `glm-5-turbo` instead of intercepting them with the generic GLM-5 forward-compat shim. (#48185) Thanks @haoyu-haoyu.
- Live model switching: only treat explicit user-driven model changes as pending live switches, so fallback rotation, heartbeat overrides, and compaction no longer trip `LiveSessionModelSwitchError` before making an API call. (#60266) Thanks @kiranvk-2011.
- Voice-call/OpenAI: pass full plugin config into realtime transcription provider resolution so streaming calls can discover the bundled OpenAI realtime transcription provider again. Fixes #60936. Thanks @sliekens and @vincentkoc.
- Plugins/OpenAI: enable `gpt-image-1` reference-image edits through `/images/edits` multipart uploads, and stop inferring unsupported resolution overrides when no explicit `size` or `resolution` is provided.
- Gateway/startup: default `gateway.mode` to `local` when unset, detect PID recycling in gateway lock files on Windows and macOS, and show startup progress so healthy restarts stop getting blocked by stale locks. (#54801, #60085, #59843)
- Mobile pairing/Android: tighten secure endpoint handling so Tailscale and public remote setup reject cleartext endpoints, private LAN pairing still works, merged-role approvals mint both node and operator device tokens, and bootstrap tokens survive node auto-pair until operator approval finishes. (#60128, #60208, #60221)
- Android/Talk Mode: restore spoken assistant replies on node-scoped sessions by keeping reply routing synced to the resolved node session key and pausing mic capture during reply playback. (#60306) Thanks @MKV21.
- Telegram: fix current-model checks in the model picker, HTML-format non-default `/model` confirmations, explicit topic replies, persisted reaction ownership across restarts, caption-media placeholder and `file_id` preservation on download failure, and upgraded-install inbound image reads. (#60384, #60042, #59634, #59207, #59948, #59971)
- Telegram/local Bot API: honor `channels.telegram.apiRoot` for buffered media downloads, add `channels.telegram.network.dangerouslyAllowPrivateNetwork` for trusted fake-IP setups, and require `channels.telegram.trustedLocalFileRoots` before reading absolute Bot API `file_path` values. (#59544, #60705)
- Matrix: recover more reliably when secret storage or recovery keys are missing by recreating secret storage during repair and backup reset, hold crypto snapshot locks during persistence, and surface explicit too-large attachment markers. (#59846, #59851, #60599, #60289)
- ACP/agents: inherit the target agent workspace for cross-agent ACP spawns and fall back safely when the inherited workspace no longer exists. (#58438) Thanks @zssggle-rgb.
- ACPX/Windows: preserve backslashes and absolute `.exe` paths in Claude CLI parsing, and fail fast on wrapper-script targets with guidance to use `cmd.exe /c`, `powershell.exe -File`, or `node <script>`. (#60689)
- Gateway/Windows scheduled tasks: preserve Task Scheduler settings on reinstall, fail loudly when `/Run` does not start, and report fast failed restarts accurately instead of pretending they timed out after 60 seconds. (#59335) Thanks @tmimmanuel.
- 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)
- WhatsApp: restore `channels.whatsapp.blockStreaming` and reset watchdog timeouts after reconnect so quiet chats stop falling into reconnect loops. (#60007, #60069)
- Control UI: keep Stop visible during tool-only execution, preserve pending-send busy state, and clear stale ClawHub search results as soon as the query changes. (#54528, #59800, #60267)
- MS Teams: download inline DM images via Graph API and preserve channel reply threading in proactive fallback. (#52212, #55198)
- Agents/Claude CLI: persist explicit `openclaw agent --session-id` runs under a stable session key so follow-ups can reuse the stored CLI binding and resume the same underlying Claude session.
- Agents/CLI backends: invalidate stored CLI session reuse when local CLI login state or the selected auth profile credential changes, so relogin and token rotation stop resuming stale sessions.
- Gateway/macOS: recover installed-but-unloaded LaunchAgents during `openclaw gateway start` and `restart`, while still preferring live unmanaged gateways during restart recovery. (#43766) Thanks @HenryC-3.
- Auth/failover: persist selected fallback overrides before retrying, shorten `auth_permanent` lockouts, and refresh websocket/shared-auth sessions only when real auth changes occur so retries and secret rotations behave predictably. (#60404, #60323, #60387)
- Cron: replay interrupted recurring jobs on the first gateway restart instead of waiting for a second restart. (#60583) Thanks @joelnishanth.
- Plugins/media understanding: enable bundled Groq and Deepgram providers by default so configured transcription models work without extra plugin activation config. (#59982) Thanks @yxjsxy.
- Plugins/Kimi Coding: parse tagged tool calls and keep Anthropic-native tool payloads so Kimi coding endpoints execute tools instead of echoing raw markup. (#60051, #60391)
- Tools/web_search (Kimi): when `tools.web.search.kimi.baseUrl` is unset, inherit native Moonshot chat `baseUrl` (`.ai` / `.cn`) so China console keys authenticate on the same host as chat. Fixes #44851. (#56769) Thanks @tonga54.
- Plugins/marketplace: block remote marketplace symlink escapes without breaking ordinary local marketplace install paths. (#60556) Thanks @eleqtrizit.
- Plugins/install: preserve unsafe override flags across linked plugin and hook-pack probes so local `--link` installs honor the documented override behavior. (#60624) Thanks @JerrettDavis.
- Config/All Settings: keep the raw config view intact when sensitive fields are blank instead of corrupting or dropping the rendered snapshot. (#28214) Thanks @solodmd.
- Security: preserve restrictive plugin-only tool allowlists, require owner access for `/allowlist add` and `/allowlist remove`, fail closed when `before_tool_call` hooks crash, block browser SSRF redirect bypasses earlier, and keep non-interactive auth-choice inference scoped to bundled and already-trusted plugins. (#58476, #59836, #59822, #58771, #59120)
- Exec approvals: reuse durable exact-command `allow-always` approvals in allowlist mode so identical reruns stop prompting, and tighten Windows interpreter/path approval handling so wrapper and malformed-path cases fail closed more consistently. (#59880, #59780, #58040, #59182)
- Agents/runtime: make default subagent allowlists, inherited skills/workspaces, and duplicate session-id resolution behave more predictably, and include value-shape hints in missing-parameter tool errors. (#59944, #59992, #59858, #55317)
- Update/npm: prefer the npm binary that owns the installed global OpenClaw prefix so mixed Homebrew-plus-nvm setups update the right install. (#60153) Thanks @jayeshp19.
- Gateway/plugin routes: keep gateway-auth plugin runtime routes on write-only fallback scopes unless a trusted-proxy caller explicitly declares narrower `x-openclaw-scopes`, so plugin HTTP handlers no longer mint admin-level runtime scopes on missing or untrusted HTTP scope headers. (#59815) Thanks @pgondhi987.
- Agents/exec approvals: let `exec-approvals.json` agent security override stricter gateway tool defaults so approved subagents can use `security: "full"` without falling back to allowlist enforcement again. (#60310) Thanks @lml2468.
- Tasks/maintenance: reconcile stale cron and chat-backed CLI task rows against live cron-job and agent-run ownership instead of treating any persisted session key as proof that the task is still running. (#60310) Thanks @lml2468.
- Providers/GitHub Copilot: send IDE identity headers on runtime model requests and GitHub token exchange so IDE-authenticated Copilot runs stop failing with missing `Editor-Version`. (#60641) Thanks @VACInc and @vincentkoc.
- Model picker/providers: treat bundled BytePlus and Volcengine plan aliases as their native providers during setup, and expose their bundled standard/coding catalogs before auth so setup can suggest the right models. (#58819) Thanks @Luckymingxuan.
- Prompt caching: route Codex Responses and Anthropic Vertex through boundary-aware cache shaping, and report the actual outbound system prompt in cache traces so cache reuse and misses line up with what providers really receive. Thanks @vincentkoc.
- Prompt caching: order stable workspace project-context files before `HEARTBEAT.md` and keep `HEARTBEAT.md` below the system-prompt cache boundary so heartbeat churn does not invalidate the stable project-context prefix. (#58979) Thanks @yozu and @vincentkoc.
- Plugins/cache: inherit the active gateway workspace for provider, web-search, and web-fetch snapshot loads when callers omit `workspaceDir`, so compatible plugin registries and snapshot caches stop missing on gateway-owned runtime paths. (#61138) Thanks @jzakirov.
- Agents/Kimi tool-call repair: preserve tool arguments that were already present on streamed tool calls when later malformed deltas fail reevaluation, while still dropping stale repair-only state before `toolcall_end`.
- MiniMax/pricing: keep bundled MiniMax highspeed pricing distinct in provider catalogs and preserve the lower M2.5 cache-read pricing when onboarding older MiniMax models. (#54214) Thanks @octo-patch.
- Agents/cache: preserve the full 3-turn prompt-cache image window across tool loops, keep colliding bundled MCP tool definitions deterministic, and reapply Anthropic Vertex cache shaping after payload hook replacements so KV/cache reuse stays stable. Thanks @vincentkoc.
- Device pairing: reject rotating device tokens into roles that were never approved during pairing, and keep reconnect role checks bounded to the paired device's approved role set. (#60462) Thanks @eleqtrizit.
- Mobile pairing/security: fail closed for internal `/pair` setup-code issuance, cleanup, and approval paths when gateway pairing scopes are missing, and keep approval-time requested-scope enforcement on the internal command path. (#55996) Thanks @coygeek.
- Status/cache: restore `cacheRead` and `cacheWrite` in transcript fallback so `/status` keeps showing cache hit percentages when session logs are the only complete usage source. (#59247) Thanks @stuartsy.
- Exec approvals/node host: forward prepared `system.run` approval plans on the async node invoke path so mutable script operands keep their approval-time binding and drift revalidation instead of dropping back to unbound execution.
- Synology Chat/security: default low-level HTTPS helper TLS verification to on so helper/API defaults match the shipped safe account default, and only explicit `allowInsecureSsl: true` opts out.
- Android/canvas security: require exact normalized A2UI URL matches before forwarding canvas bridge actions, rejecting query mismatches and descendant paths while still allowing fragment-only A2UI navigation.
- Cron: send failure notifications through the job's primary delivery channel using the same session context as successful delivery when no explicit `failureDestination` is configured. (#60622) Thanks @artwalker.
- Mobile pairing/bootstrap: keep QR bootstrap handoff tokens bounded to the mobile-safe contract so node handoff stays unscoped and operator handoff drops mixed `node.*`, `operator.admin`, and `operator.pairing` scopes.
- Gateway/auth: serialize async shared-secret auth attempts per client so concurrent Tailscale-capable failures cannot overrun the intended auth rate-limit budget. Thanks @Telecaster2147.
- Doctor/config: compare normalized `talk` configs by deep structural equality instead of key-order-sensitive serialization so `openclaw doctor --fix` stops repeatedly reporting/applying no-op `talk.provider/providers` normalization. (#59911) Thanks @ejames-dev.
- 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.
- Gateway/device auth: reuse cached device-token scopes only for cached-token reconnects, while keeping explicit `deviceToken` scope requests and empty-cache fallbacks intact so reconnects preserve `operator.read` without breaking explicit auth flows. (#46032) Thanks @caicongyang.
- Agents/scheduling: steer background-now work toward automatic completion wake and treat `process` polling as on-demand inspection or intervention instead of default completion handling. (#60877) Thanks @vincentkoc.
- Google Gemini CLI auth: improve OAuth credential discovery across Windows nvm and Homebrew libexec installs, and align Code Assist metadata so Gemini login stops failing on packaged CLI layouts. (#40729) Thanks @hughcube.
- Google Gemini CLI auth: detect bundled npm installs by scanning packaged bundle files for the Gemini OAuth client config, so `npm install -g @google/gemini-cli` layouts work again. (#60486) Thanks @wzfmini01.
- Mattermost/config schema: accept `groups.*.requireMention` again so existing Mattermost configs no longer fail strict validation after upgrade. (#58271) Thanks @MoerAI.
- Agents/failover: scope Anthropic `An unknown error occurred` failover matching by provider so generic internal unknown-error text no longer triggers retryable timeout fallback. (#59325) Thanks @aaron-he-zhu.
- 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.
- Device pairing/security: keep non-operator device scope checks bound to the requested role prefix so bootstrap verification cannot redeem `operator.*` scopes through `node` auth. (#57258) Thanks @jlapenna.
- Gateway/device pairing: require non-admin paired-device sessions to manage only their own device for token rotate/revoke and paired-device removal, blocking cross-device token theft inside pairing-scoped sessions. (#50627) Thanks @coygeek.
- CLI/skills JSON: route `skills list --json`, `skills info --json`, and `skills check --json` output to stdout instead of stderr so machine-readable consumers receive JSON on the expected stream again. (#60914; fixes #57599; landed from contributor PR #57611 by @Aftabbs) Thanks @Aftabbs.
- Agents/subagents: honor allowlist validation, auth-profile handoff, and session override state when a subagent retries after `LiveSessionModelSwitchError`. (#58178) Thanks @openperf.
- Google image generation: disable pinned DNS for Gemini image requests and honor explicit `pinDns` overrides in shared provider HTTP helpers so proxy-backed image generation works again. (#59873) Thanks @luoyanglang.
- Agents/exec: restore `host=node` routing for node-pinned and `host=auto` sessions, while still blocking sandboxed `auto` sessions from jumping to gateway. (#60788) Thanks @openperf.
- Agents/compaction: keep assistant tool calls and displaced tool results in the same compaction chunk so strict summarization providers stop rejecting orphaned tool pairs. (#58849) Thanks @openperf.
- Outbound/sanitizer: strip leaked `<tool_call>`, `<function_calls>`, and model special tokens from shared user-visible assistant text, including truncated tool-call streams, so internal scaffolding no longer bleeds into replies across surfaces. (#60619) Thanks @oliviareid-svg.
- Telegram: restore DM voice-note preflight transcription so direct-message audio stops arriving as raw `<media:audio>` placeholders. (#61008) Thanks @manueltarouca.
- Control UI/avatar: honor `ui.assistant.avatar` when serving `/avatar/:agentId` so Appearance UI avatar paths stop falling back to initials placeholders. (#60778) Thanks @hannasdev.
- Control UI/Overview: prevent gateway access token/password visibility toggle buttons from overlapping their inputs at narrow widths. (#56924) Thanks @bbddbb1.
- Control UI/cron: highlight the Cron refresh button while refresh is in flight so the page's loading state stays visible even when prior data remains on screen. (#60394) Thanks @coder-zhuzm.
- MS Teams: replace the deprecated Teams SDK HttpPlugin stub with `httpServerAdapter` so recurring gateway deprecation warnings stop firing and the Express 5 compatibility workaround stays on the supported SDK path. (#60939) Thanks @coolramukaka-sys.
- CLI/Commander: preserve Commander-computed exit codes for argument and help-error paths, and cover the user-argv parse mode in the regression tests so invalid CLI invocations no longer report success when exits are intercepted. (#60923) Thanks @Linux2010.
- Telegram/native command menu: trim long menu descriptions before dropping commands so sub-100 command sets can still fit Telegram's payload budget and keep more `/` entries visible. (#61129) Thanks @neeravmakwana.
- Agents/Claude CLI: keep non-interactive `--permission-mode bypassPermissions` when custom `cliBackends.claude-cli.args` override defaults, including fallback resolution before the runtime plugin registry is active, so cron and heartbeat Claude CLI runs do not regress to interactive approval mode. (#61114) Thanks @cathrynlavery and @thewilloftheshadow.
- Agents/skills: skip `.git` and `node_modules` when mirroring skills into sandbox workspaces so read-only sandboxes do not copy repo history or dependency trees. (#61090) Thanks @joelnishanth.
- Android/Talk Mode: cancel in-flight `talk.speak` playback when speech is explicitly stopped, so stale replies stop starting after barge-in or manual stop. (#61164) Thanks @obviyus.
- Plugins/onboarding: write dotted plugin uiHint paths like Brave `webSearch.mode` as nested plugin config so `llm-context` setup stops failing validation. (#61159) Thanks @obviyus.
- Android/Talk Mode: restore voice replies on gateway-backed talk mode sessions by updating embedded runner transport overrides to the current agent transport API. (#61214) Thanks @obviyus.
- Amazon Bedrock/aws-sdk auth: stop injecting the fake `AWS_PROFILE` apiKey marker when no AWS auth env vars exist, so instance-role and other default-chain setups keep working without poisoning provider config. (#61194) Thanks @wirjo.
## 2026.4.2
@@ -132,6 +161,9 @@ Docs: https://docs.openclaw.ai
### Fixes
- Sandbox/security: block credential-path binds even when sandbox home paths resolve through canonical aliases, so agent containers cannot mount user secret stores through alternate home-directory paths. (#59157) Thanks @eleqtrizit.
- Gateway/Windows scheduled tasks: preserve Task Scheduler settings on reinstall, fail loud when Scheduled Task `/Run` does not start, and report fast failed restarts with the actual elapsed time instead of a fake 60s timeout. (#59335) Thanks @tmimmanuel.
- Control UI/model picker: preserve already-qualified `provider/model` refs from the server so models whose ids already contain slashes stop being double-prefixed and remapped to the wrong provider. (#49874) Thanks @ShionEria.
- Models/selection: resolve bare model ids in session model switches against the configured allowlist before falling back to the current session provider, so Control UI model picks stop drifting into `google/k2p5` and similar wrong-provider refs. (#51580) Thanks @honwee.
## 2026.4.1-beta.1
@@ -162,6 +194,7 @@ Docs: https://docs.openclaw.ai
- 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.
- Browser/host inspection: keep static Chrome inspection helpers out of the activated browser runtime so `openclaw doctor browser` and related checks do not eagerly load the bundled browser plugin. (#59471) Thanks @vincentkoc.
- Browser/CDP: normalize trailing-dot localhost absolute-form hosts before loopback checks so remote CDP websocket URLs like `ws://localhost.:...` rewrite back to the configured remote host. (#59236) Thanks @mappel-nv.
- Browser/attach-only profiles: disconnect cached Playwright CDP sessions when stopping attach-only or remote CDP profiles, while still reporting never-started local managed profiles as not stopped. (#60097) Thanks @pedh.
- Agents/output sanitization: strip namespaced `antml:thinking` blocks from user-visible text so Anthropic-style internal monologue tags do not leak into replies. (#59550) Thanks @obviyus.
- 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.
- Image tool/paths: resolve relative local media paths against the agent `workspaceDir` instead of `process.cwd()` so inputs like `inbox/receipt.png` pass the local-path allowlist reliably. (#57222) Thanks Priyansh Gupta.
@@ -187,6 +220,16 @@ Docs: https://docs.openclaw.ai
- 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 `SYSTEM_RUN_DENIED`. (#58977) Thanks @Starhappysh.
- TUI/chat: keep pending local sends visible and reconciled across history reloads, make busy/error recovery clearer through fallback and terminal-error paths, and reclaim transcript width for long links and paths. (#59800) Thanks @vincentkoc.
- 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.
- Agents/logging: keep orphaned-user transcript repair warnings focused on interactive runs, and downgrade background-trigger repairs (`heartbeat`, `cron`, `memory`, `overflow`) to debug logs to reduce false-alarm gateway noise.
- Gateway/node pairing: require `operator.pairing` for node approvals end-to-end, while still requiring `operator.write` or `operator.admin` when the pending node commands need those higher scopes. (#60461) Thanks @eleqtrizit.
- Providers/OpenRouter: gate Anthropic prompt-cache `cache_control` markers to native/default OpenRouter routes and preserve them for native OpenRouter hosts behind custom provider ids. Thanks @vincentkoc.
- Browser/CDP: validate both initial and discovered CDP websocket endpoints before connect so strict SSRF policy blocks cross-host pivots and direct websocket targets. (#60469) Thanks @eleqtrizit.
- Browser/profiles: reject remote browser profile `cdpUrl` values that violate strict SSRF policy before saving config, with clearer validation errors for blocked endpoints. (#60477) Thanks @eleqtrizit.
- Browser/screenshots: stop sending `fromSurface: false` on CDP screenshots so managed Chrome 146+ browsers can capture images again. (#60682) Thanks @mvanhorn.
- Mattermost/slash commands: harden native slash-command callback token validation to use constant-time secret comparison, matching the existing interaction-token path.
- Control UI/mobile chat: reduce narrow-screen overflow by shrinking the chat pane minimum width, removing extra mobile padding, widening message groups, and hiding avatars on very small screens. (#60220) Thanks @macdao.
- Android/Talk Mode: route spoken replies through `talk.speak`, keep compressed playback cleanup deterministic, and fall back to local TTS for legacy gateways that omit Talk error reasons. (#60954) Thanks @obviyus.
- Android/Talk Mode: keep reply-speaker routing and teardown behavior aligned with the new remote playback path. (#60954) Thanks @MKV21.
## 2026.4.1
@@ -216,6 +259,12 @@ Docs: https://docs.openclaw.ai
- Channels/WhatsApp: pass inbound message timestamp to model context so the AI can see when WhatsApp messages were sent. (#58590) Thanks @Maninae
- QQBot/voice: lazy-load `silk-wasm` in `audio-convert.ts` 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.
- WhatsApp/groups: fix bot waking up on self-number quoted replies in groups with `selfChatMode` enabled. (#60148) Thanks @lurebat
- Device pairing: require `operator.pairing` or `operator.admin` for internal `/pair` setup-code, QR, and cleanup commands so lower-privilege gateway callers cannot mint or revoke pairing bootstrap material. (#60491) Thanks @eleqtrizit.
- Agents/failover: unify structured and raw provider error classification so provider-specific `400`/`422` payloads no longer get forced into generic format failures before retry, billing, or compaction logic can inspect them. (#58856) Thanks @aaron-he-zhu.
- Auth profiles/store: coerce misplaced SecretRef objects out of plaintext `key` and `token` fields during store load so agents without ACP runtime stop crashing on `.trim()` after upgrade. (#58923) Thanks @openperf.
- ACPX/runtime: repair `queue owner unavailable` 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
- ACPX/runtime: retry dead-session queue-owner repair without `--resume-session` when the reported ACPX session id is stale, so recovery still creates a fresh named session instead of failing session init. Thanks @obviyus.
- Tools/web_search (Kimi): replay native Moonshot `$web_search` arguments verbatim, disable thinking for `kimi-k2.5`, and add Moonshot region/model setup prompts so bundled Kimi web search works again. (#59356) Thanks @Innocent-children.
## 2026.3.31
@@ -589,6 +638,9 @@ Docs: https://docs.openclaw.ai
- Plugins/Matrix: encrypt E2EE image thumbnails with `thumbnail_file` while keeping unencrypted-room previews on `thumbnail_url`, so encrypted Matrix image events keep thumbnail metadata without leaking plaintext previews. (#54711) thanks @frischeDaten.
- Telegram/forum topics: keep native `/new` and `/reset` routed to the active topic by preserving the topic target on forum-thread command context. (#35963)
- Status/port diagnostics: treat single-process dual-stack loopback gateway listeners as healthy in `openclaw status --all`, suppressing false "port already in use" conflict warnings. (#53398) Thanks @DanWebb1949.
- CLI/Docker: treat loopback private-host CLI gateway connects as local for silent pairing auto-approval, while keeping remote backend and public-host CLI connects behind pairing. (#55113) Thanks @sar618.
## 2026.3.24
### Breaking

View File

@@ -85,6 +85,12 @@ Welcome to the lobster tank! 🦞
4. **Test/CI-only PRs for known `main` failures** → Don't open a PR. The Maintainer team is already tracking those failures, and PRs that only tweak tests or CI to chase them will be closed unless they are required to validate a new fix.
5. **Questions** → Discord [#help](https://discord.com/channels/1456350064065904867/1459642797895319552) / [#users-helping-users](https://discord.com/channels/1456350064065904867/1459007081603403828)
## PR Limits
We cap at **10 open PRs per author**. If you exceed this, the `r: too-many-prs` label is added and your PR is auto-closed. This is a hard limit.
For coordinated change sets that genuinely need more than 10 PRs, join the **#clawtributors** channel in Discord and talk to maintainers first.
## Before You PR
- Test locally with your OpenClaw instance

View File

@@ -34,7 +34,7 @@ New install? Start here: [Getting started](https://docs.openclaw.ai/start/gettin
<table>
<tr>
<td align="center" width="20%">
<td align="center" width="16.66%">
<a href="https://openai.com/">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/openclaw/openclaw/main/docs/assets/sponsors/openai-light.svg">
@@ -42,7 +42,15 @@ New install? Start here: [Getting started](https://docs.openclaw.ai/start/gettin
</picture>
</a>
</td>
<td align="center" width="20%">
<td align="center" width="16.66%">
<a href="https://github.com/">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/openclaw/openclaw/main/docs/assets/sponsors/github-light.svg">
<img src="https://raw.githubusercontent.com/openclaw/openclaw/main/docs/assets/sponsors/github.svg" alt="GitHub" height="28">
</picture>
</a>
</td>
<td align="center" width="16.66%">
<a href="https://www.nvidia.com/">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/openclaw/openclaw/main/docs/assets/sponsors/nvidia.svg">
@@ -50,7 +58,7 @@ New install? Start here: [Getting started](https://docs.openclaw.ai/start/gettin
</picture>
</a>
</td>
<td align="center" width="20%">
<td align="center" width="16.66%">
<a href="https://vercel.com/">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/openclaw/openclaw/main/docs/assets/sponsors/vercel-light.svg">
@@ -58,7 +66,7 @@ New install? Start here: [Getting started](https://docs.openclaw.ai/start/gettin
</picture>
</a>
</td>
<td align="center" width="20%">
<td align="center" width="16.66%">
<a href="https://blacksmith.sh/">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/openclaw/openclaw/main/docs/assets/sponsors/blacksmith-light.svg">
@@ -66,7 +74,7 @@ New install? Start here: [Getting started](https://docs.openclaw.ai/start/gettin
</picture>
</a>
</td>
<td align="center" width="20%">
<td align="center" width="16.66%">
<a href="https://www.convex.dev/">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/openclaw/openclaw/main/docs/assets/sponsors/convex-light.svg">

View File

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

View File

@@ -71,6 +71,7 @@ class NodeRuntime(
private val identityStore = DeviceIdentityStore(appContext)
private var connectedEndpoint: GatewayEndpoint? = null
private var activeGatewayAuth: GatewayConnectAuth? = null
private val cameraHandler: CameraHandler = CameraHandler(
appContext = appContext,
@@ -299,6 +300,11 @@ class NodeRuntime(
_canvasRehydrateErrorText.value = null
updateStatus()
showLocalCanvasOnConnect()
val endpoint = connectedEndpoint
val auth = activeGatewayAuth
if (endpoint != null && auth != null) {
maybeStartOperatorSessionAfterNodeConnect(endpoint, auth)
}
},
onDisconnected = { message ->
_nodeConnected.value = false
@@ -345,6 +351,8 @@ class NodeRuntime(
session = operatorSession,
supportsChatSubscribe = false,
isConnected = { operatorConnected },
onBeforeSpeak = { micCapture.pauseForTts() },
onAfterSpeak = { micCapture.resumeAfterTts() },
).also { speaker ->
speaker.setPlaybackEnabled(prefs.speakerEnabled.value)
}
@@ -373,11 +381,10 @@ class NodeRuntime(
parseChatSendRunId(response) ?: idempotencyKey
},
speakAssistantReply = { text ->
// Skip if TalkModeManager is handling TTS (ttsOnAllResponses) to avoid
// double-speaking the same assistant reply from both pipelines.
if (!talkMode.ttsOnAllResponses) {
voiceReplySpeaker.speakAssistantReply(text)
}
// Voice-tab replies should speak through the dedicated reply speaker.
// Relying on talkMode.ttsOnAllResponses here can drop playback if the
// chat-event path misses the terminal event for this turn.
voiceReplySpeaker.speakAssistantReply(text)
},
)
}
@@ -416,14 +423,19 @@ class NodeRuntime(
session = operatorSession,
supportsChatSubscribe = true,
isConnected = { operatorConnected },
onBeforeSpeak = { micCapture.pauseForTts() },
onAfterSpeak = { micCapture.resumeAfterTts() },
)
}
private fun syncMainSessionKey(agentId: String?) {
val resolvedKey = resolveNodeMainSessionKey(agentId)
// Always push the resolved session key into TalkMode, even when the
// state flow value is unchanged, so lazy TalkMode instances do not
// stay on the default "main" session key.
talkMode.setMainSessionKey(resolvedKey)
if (_mainSessionKey.value == resolvedKey) return
_mainSessionKey.value = resolvedKey
talkMode.setMainSessionKey(resolvedKey)
chat.applyMainSessionKey(resolvedKey)
updateHomeCanvasState()
}
@@ -583,12 +595,11 @@ class NodeRuntime(
scope.launch {
prefs.talkEnabled.collect { enabled ->
// MicCaptureManager handles STT + send to gateway.
// TalkModeManager plays TTS on assistant responses.
// MicCaptureManager handles STT + send to gateway, while the dedicated
// reply speaker handles TTS for assistant replies in the voice tab.
micCapture.setMicEnabled(enabled)
if (enabled) {
// Mic on = user is on voice screen and wants TTS responses.
talkMode.ttsOnAllResponses = true
talkMode.ttsOnAllResponses = false
scope.launch { talkMode.ensureChatSubscribed() }
}
externalAudioCaptureActive.value = enabled
@@ -749,8 +760,8 @@ class NodeRuntime(
prefs.setTalkEnabled(value)
if (value) {
// Tapping mic on interrupts any active TTS (barge-in)
talkMode.stopTts()
talkMode.ttsOnAllResponses = true
stopVoicePlayback()
talkMode.ttsOnAllResponses = false
scope.launch { talkMode.ensureChatSubscribed() }
}
micCapture.setMicEnabled(value)
@@ -765,18 +776,25 @@ class NodeRuntime(
if (voiceReplySpeakerLazy.isInitialized()) {
voiceReplySpeaker.setPlaybackEnabled(value)
}
// Keep TalkMode in sync so speaker mute works when ttsOnAllResponses is active.
// Keep TalkMode in sync so any active Talk playback also respects speaker mute.
talkMode.setPlaybackEnabled(value)
}
private fun stopActiveVoiceSession() {
talkMode.ttsOnAllResponses = false
talkMode.stopTts()
stopVoicePlayback()
micCapture.setMicEnabled(false)
prefs.setTalkEnabled(false)
externalAudioCaptureActive.value = false
}
private fun stopVoicePlayback() {
talkMode.stopTts()
if (voiceReplySpeakerLazy.isInitialized()) {
voiceReplySpeaker.stopTts()
}
}
fun refreshGatewayConnection() {
val endpoint =
connectedEndpoint ?: run {
@@ -793,15 +811,14 @@ class NodeRuntime(
auth: GatewayConnectAuth,
reconnect: Boolean = false,
) {
activeGatewayAuth = auth
val tls = connectionManager.resolveTlsParams(endpoint)
val connectOperator =
shouldConnectOperatorSession(
auth.token,
auth.bootstrapToken,
auth.password,
loadStoredRoleDeviceToken("operator"),
val operatorAuth =
resolveOperatorSessionConnectAuth(
auth = auth,
storedOperatorToken = loadStoredRoleDeviceToken("operator"),
)
if (!connectOperator) {
if (operatorAuth == null) {
operatorConnected = false
operatorStatusText = "Offline"
operatorSession.disconnect()
@@ -809,9 +826,9 @@ class NodeRuntime(
} else {
operatorSession.connect(
endpoint,
auth.token,
auth.bootstrapToken,
auth.password,
operatorAuth.token,
operatorAuth.bootstrapToken,
operatorAuth.password,
connectionManager.buildOperatorConnectOptions(),
tls,
)
@@ -824,7 +841,7 @@ class NodeRuntime(
connectionManager.buildNodeConnectOptions(),
tls,
)
if (reconnect && connectOperator) {
if (reconnect && operatorAuth != null) {
operatorSession.reconnect()
}
if (reconnect) {
@@ -922,8 +939,33 @@ class NodeRuntime(
return deviceAuthStore.loadToken(deviceId, role)
}
private fun maybeStartOperatorSessionAfterNodeConnect(
endpoint: GatewayEndpoint,
auth: GatewayConnectAuth,
) {
if (operatorConnected || operatorStatusText == "Connecting…") {
return
}
val operatorAuth =
resolveOperatorSessionConnectAuth(
auth = auth,
storedOperatorToken = loadStoredRoleDeviceToken("operator"),
) ?: return
operatorStatusText = "Connecting…"
updateStatus()
operatorSession.connect(
endpoint,
operatorAuth.token,
operatorAuth.bootstrapToken,
operatorAuth.password,
connectionManager.buildOperatorConnectOptions(),
connectionManager.resolveTlsParams(endpoint),
)
}
fun disconnect() {
connectedEndpoint = null
activeGatewayAuth = null
_pendingGatewayTrust.value = null
operatorSession.disconnect()
nodeSession.disconnect()
@@ -1259,18 +1301,47 @@ class NodeRuntime(
}
internal fun resolveOperatorSessionConnectAuth(
auth: NodeRuntime.GatewayConnectAuth,
storedOperatorToken: String?,
): NodeRuntime.GatewayConnectAuth? {
val explicitToken = auth.token?.trim()?.takeIf { it.isNotEmpty() }
if (explicitToken != null) {
return NodeRuntime.GatewayConnectAuth(
token = explicitToken,
bootstrapToken = null,
password = null,
)
}
val explicitPassword = auth.password?.trim()?.takeIf { it.isNotEmpty() }
if (explicitPassword != null) {
return NodeRuntime.GatewayConnectAuth(
token = null,
bootstrapToken = null,
password = explicitPassword,
)
}
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,
password = null,
)
}
return null
}
internal fun shouldConnectOperatorSession(
token: String?,
bootstrapToken: String?,
password: String?,
auth: NodeRuntime.GatewayConnectAuth,
storedOperatorToken: String?,
): Boolean {
return (
!token.isNullOrBlank() ||
!bootstrapToken.isNullOrBlank() ||
!password.isNullOrBlank() ||
!storedOperatorToken.isNullOrBlank()
)
return resolveOperatorSessionConnectAuth(auth, storedOperatorToken) != null
}
private enum class HomeCanvasGatewayState {

View File

@@ -1,32 +1,92 @@
package ai.openclaw.app.gateway
import ai.openclaw.app.SecurePrefs
import kotlinx.serialization.Serializable
import kotlinx.serialization.encodeToString
import kotlinx.serialization.json.Json
data class DeviceAuthEntry(
val token: String,
val role: String,
val scopes: List<String>,
val updatedAtMs: Long,
)
@Serializable
private data class PersistedDeviceAuthMetadata(
val scopes: List<String> = emptyList(),
val updatedAtMs: Long = 0L,
)
interface DeviceAuthTokenStore {
fun loadToken(deviceId: String, role: String): String?
fun saveToken(deviceId: String, role: String, token: String)
fun loadEntry(deviceId: String, role: String): DeviceAuthEntry?
fun loadToken(deviceId: String, role: String): String? = loadEntry(deviceId, role)?.token
fun saveToken(deviceId: String, role: String, token: String, scopes: List<String> = emptyList())
fun clearToken(deviceId: String, role: String)
}
class DeviceAuthStore(private val prefs: SecurePrefs) : DeviceAuthTokenStore {
override fun loadToken(deviceId: String, role: String): String? {
private val json = Json { ignoreUnknownKeys = true }
override fun loadEntry(deviceId: String, role: String): DeviceAuthEntry? {
val key = tokenKey(deviceId, role)
return prefs.getString(key)?.trim()?.takeIf { it.isNotEmpty() }
val token = prefs.getString(key)?.trim()?.takeIf { it.isNotEmpty() } ?: return null
val normalizedRole = normalizeRole(role)
val metadata =
prefs.getString(metadataKey(deviceId, role))
?.let { raw ->
runCatching { json.decodeFromString<PersistedDeviceAuthMetadata>(raw) }.getOrNull()
}
return DeviceAuthEntry(
token = token,
role = normalizedRole,
scopes = metadata?.scopes ?: emptyList(),
updatedAtMs = metadata?.updatedAtMs ?: 0L,
)
}
override fun saveToken(deviceId: String, role: String, token: String) {
override fun saveToken(deviceId: String, role: String, token: String, scopes: List<String>) {
val normalizedScopes = normalizeScopes(scopes)
val key = tokenKey(deviceId, role)
prefs.putString(key, token.trim())
prefs.putString(
metadataKey(deviceId, role),
json.encodeToString(
PersistedDeviceAuthMetadata(
scopes = normalizedScopes,
updatedAtMs = System.currentTimeMillis(),
),
),
)
}
override fun clearToken(deviceId: String, role: String) {
val key = tokenKey(deviceId, role)
prefs.remove(key)
prefs.remove(metadataKey(deviceId, role))
}
private fun tokenKey(deviceId: String, role: String): String {
val normalizedDevice = deviceId.trim().lowercase()
val normalizedRole = role.trim().lowercase()
val normalizedDevice = normalizeDeviceId(deviceId)
val normalizedRole = normalizeRole(role)
return "gateway.deviceToken.$normalizedDevice.$normalizedRole"
}
private fun metadataKey(deviceId: String, role: String): String {
val normalizedDevice = normalizeDeviceId(deviceId)
val normalizedRole = normalizeRole(role)
return "gateway.deviceTokenMeta.$normalizedDevice.$normalizedRole"
}
private fun normalizeDeviceId(deviceId: String): String = deviceId.trim().lowercase()
private fun normalizeRole(role: String): String = role.trim().lowercase()
private fun normalizeScopes(scopes: List<String>): List<String> {
return scopes
.map { it.trim() }
.filter { it.isNotEmpty() }
.distinct()
.sorted()
}
}

View File

@@ -64,6 +64,7 @@ data class GatewayConnectErrorDetails(
val code: String?,
val canRetryWithDeviceToken: Boolean,
val recommendedNextStep: String?,
val reason: String? = null,
)
private data class SelectedConnectAuth(
@@ -116,6 +117,8 @@ class GatewaySession(
val details: GatewayConnectErrorDetails? = null,
)
data class RpcResult(val ok: Boolean, val payloadJson: String?, val error: ErrorShape?)
private val json = Json { ignoreUnknownKeys = true }
private val writeLock = Mutex()
private val pending = ConcurrentHashMap<String, CompletableDeferred<RpcResponse>>()
@@ -196,6 +199,13 @@ class GatewaySession(
}
suspend fun request(method: String, paramsJson: String?, timeoutMs: Long = 15_000): String {
val res = requestDetailed(method = method, paramsJson = paramsJson, timeoutMs = timeoutMs)
if (res.ok) return res.payloadJson ?: ""
val err = res.error
throw IllegalStateException("${err?.code ?: "UNAVAILABLE"}: ${err?.message ?: "request failed"}")
}
suspend fun requestDetailed(method: String, paramsJson: String?, timeoutMs: Long = 15_000): RpcResult {
val conn = currentConnection ?: throw IllegalStateException("not connected")
val params =
if (paramsJson.isNullOrBlank()) {
@@ -204,9 +214,7 @@ class GatewaySession(
json.parseToJsonElement(paramsJson)
}
val res = conn.request(method, params, timeoutMs)
if (res.ok) return res.payloadJson ?: ""
val err = res.error
throw IllegalStateException("${err?.code ?: "UNAVAILABLE"}: ${err?.message ?: "request failed"}")
return RpcResult(ok = res.ok, payloadJson = res.payloadJson, error = res.error)
}
suspend fun refreshNodeCanvasCapability(timeoutMs: Long = 8_000): Boolean {
@@ -418,11 +426,63 @@ class GatewaySession(
}
throw GatewayConnectFailure(error)
}
handleConnectSuccess(res, identity.deviceId)
handleConnectSuccess(res, identity.deviceId, selectedAuth.authSource)
connectDeferred.complete(Unit)
}
private fun handleConnectSuccess(res: RpcResponse, deviceId: String) {
private fun shouldPersistBootstrapHandoffTokens(authSource: GatewayConnectAuthSource): Boolean {
if (authSource != GatewayConnectAuthSource.BOOTSTRAP_TOKEN) return false
if (isLoopbackGatewayHost(endpoint.host)) return true
return tls != null
}
private fun filteredBootstrapHandoffScopes(role: String, scopes: List<String>): List<String>? {
return when (role.trim()) {
"node" -> emptyList()
"operator" -> {
val allowedOperatorScopes =
setOf(
"operator.approvals",
"operator.read",
"operator.talk.secrets",
"operator.write",
)
scopes.filter { allowedOperatorScopes.contains(it) }.distinct().sorted()
}
else -> null
}
}
private fun persistBootstrapHandoffToken(
deviceId: String,
role: String,
token: String,
scopes: List<String>,
) {
val filteredScopes = filteredBootstrapHandoffScopes(role, scopes) ?: return
deviceAuthStore.saveToken(deviceId, role, token, filteredScopes)
}
private fun persistIssuedDeviceToken(
authSource: GatewayConnectAuthSource,
deviceId: String,
role: String,
token: String,
scopes: List<String>,
) {
if (authSource == GatewayConnectAuthSource.BOOTSTRAP_TOKEN) {
if (!shouldPersistBootstrapHandoffTokens(authSource)) return
persistBootstrapHandoffToken(deviceId, role, token, scopes)
return
}
deviceAuthStore.saveToken(deviceId, role, token, scopes)
}
private fun handleConnectSuccess(
res: RpcResponse,
deviceId: String,
authSource: GatewayConnectAuthSource,
) {
val payloadJson = res.payloadJson ?: throw IllegalStateException("connect failed: missing payload")
val obj = json.parseToJsonElement(payloadJson).asObjectOrNull() ?: throw IllegalStateException("connect failed")
pendingDeviceTokenRetry = false
@@ -432,8 +492,27 @@ class GatewaySession(
val authObj = obj["auth"].asObjectOrNull()
val deviceToken = authObj?.get("deviceToken").asStringOrNull()
val authRole = authObj?.get("role").asStringOrNull() ?: options.role
val authScopes =
authObj?.get("scopes").asArrayOrNull()
?.mapNotNull { it.asStringOrNull() }
?: emptyList()
if (!deviceToken.isNullOrBlank()) {
deviceAuthStore.saveToken(deviceId, authRole, deviceToken)
persistIssuedDeviceToken(authSource, deviceId, authRole, deviceToken, authScopes)
}
if (shouldPersistBootstrapHandoffTokens(authSource)) {
authObj?.get("deviceTokens").asArrayOrNull()
?.mapNotNull { it.asObjectOrNull() }
?.forEach { tokenEntry ->
val handoffToken = tokenEntry["deviceToken"].asStringOrNull()
val handoffRole = tokenEntry["role"].asStringOrNull()
val handoffScopes =
tokenEntry["scopes"].asArrayOrNull()
?.mapNotNull { it.asStringOrNull() }
?: emptyList()
if (!handoffToken.isNullOrBlank() && !handoffRole.isNullOrBlank()) {
persistBootstrapHandoffToken(deviceId, handoffRole, handoffToken, handoffScopes)
}
}
}
val rawCanvas = obj["canvasHostUrl"].asStringOrNull()
canvasHostUrl = normalizeCanvasHostUrl(rawCanvas, endpoint, isTlsConnection = tls != null)
@@ -560,6 +639,7 @@ class GatewaySession(
code = it["code"].asStringOrNull(),
canRetryWithDeviceToken = it["canRetryWithDeviceToken"].asBooleanOrNull() == true,
recommendedNextStep = it["recommendedNextStep"].asStringOrNull(),
reason = it["reason"].asStringOrNull(),
)
}
ErrorShape(code, msg, details)
@@ -899,6 +979,8 @@ private fun formatGatewayAuthorityHost(host: String): String {
private fun JsonElement?.asObjectOrNull(): JsonObject? = this as? JsonObject
private fun JsonElement?.asArrayOrNull(): JsonArray? = this as? JsonArray
private fun JsonElement?.asStringOrNull(): String? =
when (this) {
is JsonNull -> null

View File

@@ -14,30 +14,31 @@ object CanvasActionTrust {
if (candidateUri.scheme.equals("file", ignoreCase = true)) {
return false
}
val normalizedCandidate = normalizeTrustedRemoteA2uiUri(candidateUri) ?: return false
return trustedA2uiUrls.any { trusted ->
isTrustedA2uiPage(candidateUri, trusted)
matchesTrustedRemoteA2uiUrlExact(normalizedCandidate, trusted)
}
}
private fun isTrustedA2uiPage(candidateUri: URI, trustedUrl: String): Boolean {
private fun matchesTrustedRemoteA2uiUrlExact(candidateUri: URI, trustedUrl: String): Boolean {
val trustedUri = parseUri(trustedUrl) ?: return false
if (!candidateUri.scheme.equals(trustedUri.scheme, ignoreCase = true)) return false
if (candidateUri.host?.equals(trustedUri.host, ignoreCase = true) != true) return false
if (effectivePort(candidateUri) != effectivePort(trustedUri)) return false
val trustedPath = trustedUri.rawPath?.takeIf { it.isNotBlank() } ?: return false
val candidatePath = candidateUri.rawPath?.takeIf { it.isNotBlank() } ?: return false
val trustedPrefix = if (trustedPath.endsWith("/")) trustedPath else "$trustedPath/"
return candidatePath == trustedPath || candidatePath.startsWith(trustedPrefix)
val normalizedTrusted = normalizeTrustedRemoteA2uiUri(trustedUri) ?: return false
return candidateUri == normalizedTrusted
}
private fun effectivePort(uri: URI): Int {
if (uri.port >= 0) return uri.port
return when (uri.scheme?.lowercase()) {
"https" -> 443
"http" -> 80
else -> -1
private fun normalizeTrustedRemoteA2uiUri(uri: URI): URI? {
// Keep Android trust normalization aligned with iOS ScreenController:
// exact remote URL match, scheme/host normalized, fragment ignored.
val scheme = uri.scheme?.lowercase() ?: return null
if (scheme != "http" && scheme != "https") return null
val host = uri.host?.trim()?.takeIf { it.isNotEmpty() }?.lowercase() ?: return null
return try {
URI(scheme, uri.userInfo, host, uri.port, uri.rawPath, uri.rawQuery, null)
} catch (_: Throwable) {
null
}
}

View File

@@ -7,7 +7,7 @@ import ai.openclaw.app.gateway.GatewayClientInfo
import ai.openclaw.app.gateway.GatewayConnectOptions
import ai.openclaw.app.gateway.GatewayEndpoint
import ai.openclaw.app.gateway.GatewayTlsParams
import ai.openclaw.app.gateway.isLoopbackGatewayHost
import ai.openclaw.app.gateway.isPrivateLanGatewayHost
import ai.openclaw.app.LocationMode
import ai.openclaw.app.VoiceWakeMode
@@ -34,7 +34,7 @@ class ConnectionManager(
val stableId = endpoint.stableId
val stored = storedFingerprint?.trim().takeIf { !it.isNullOrEmpty() }
val isManual = stableId.startsWith("manual|")
val cleartextAllowedHost = isLoopbackGatewayHost(endpoint.host)
val cleartextAllowedHost = isPrivateLanGatewayHost(endpoint.host)
if (isManual) {
if (!manualTlsEnabled && cleartextAllowedHost) return null

View File

@@ -163,7 +163,7 @@ private fun disableForceDarkIfSupported(settings: WebSettings) {
WebSettingsCompat.setForceDark(settings, WebSettingsCompat.FORCE_DARK_OFF)
}
private class CanvasA2UIActionBridge(
internal class CanvasA2UIActionBridge(
private val isTrustedPage: () -> Boolean,
private val onMessage: (String) -> Unit,
) {

View File

@@ -1,6 +1,6 @@
package ai.openclaw.app.ui
import ai.openclaw.app.gateway.isLoopbackGatewayHost
import ai.openclaw.app.gateway.isPrivateLanGatewayHost
import java.util.Base64
import java.util.Locale
import java.net.URI
@@ -56,7 +56,7 @@ internal data class GatewayScannedSetupCodeResult(
private val gatewaySetupJson = Json { ignoreUnknownKeys = true }
private const val remoteGatewaySecurityRule =
"Non-loopback mobile nodes require wss:// or Tailscale Serve. ws:// is allowed only for localhost and the Android emulator."
"Tailscale and public mobile nodes require wss:// or Tailscale Serve. ws:// is allowed for private LAN, localhost, and the Android emulator."
private const val remoteGatewaySecurityFix =
"Use a private LAN host/address, or enable Tailscale Serve / expose a wss:// gateway URL."
@@ -143,7 +143,7 @@ internal fun parseGatewayEndpoint(rawInput: String): GatewayEndpointConfig? {
"wss", "https" -> true
else -> true
}
if (!tls && !isLoopbackGatewayHost(host)) {
if (!tls && !isPrivateLanGatewayHost(host)) {
return GatewayEndpointParseResult(error = GatewayEndpointValidationError.INSECURE_REMOTE_URL)
}
val defaultPort =

View File

@@ -14,11 +14,13 @@ import android.speech.SpeechRecognizer
import androidx.core.content.ContextCompat
import java.util.UUID
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import kotlinx.serialization.json.Json
import kotlinx.serialization.json.JsonArray
import kotlinx.serialization.json.JsonObject
@@ -88,6 +90,7 @@ class MicCaptureManager(
val isSending: StateFlow<Boolean> = _isSending
private val messageQueue = ArrayDeque<String>()
private val messageQueueLock = Any()
private var flushedPartialTranscript: String? = null
private var pendingRunId: String? = null
private var pendingAssistantEntryId: String? = null
@@ -99,11 +102,63 @@ class MicCaptureManager(
private var transcriptFlushJob: Job? = null
private var pendingRunTimeoutJob: Job? = null
private var stopRequested = false
private val ttsPauseLock = Any()
private var ttsPauseDepth = 0
private var resumeMicAfterTts = false
private fun enqueueMessage(message: String) {
synchronized(messageQueueLock) {
messageQueue.addLast(message)
}
}
private fun snapshotMessageQueue(): List<String> {
return synchronized(messageQueueLock) {
messageQueue.toList()
}
}
private fun hasQueuedMessages(): Boolean {
return synchronized(messageQueueLock) {
messageQueue.isNotEmpty()
}
}
private fun firstQueuedMessage(): String? {
return synchronized(messageQueueLock) {
messageQueue.firstOrNull()
}
}
private fun removeFirstQueuedMessage(): String? {
return synchronized(messageQueueLock) {
if (messageQueue.isEmpty()) null else messageQueue.removeFirst()
}
}
private fun queuedMessageCount(): Int {
return synchronized(messageQueueLock) {
messageQueue.size
}
}
fun setMicEnabled(enabled: Boolean) {
if (_micEnabled.value == enabled) return
_micEnabled.value = enabled
if (enabled) {
val pausedForTts =
synchronized(ttsPauseLock) {
if (ttsPauseDepth > 0) {
resumeMicAfterTts = true
true
} else {
false
}
}
if (pausedForTts) {
_statusText.value = if (_isSending.value) "Speaking · waiting for reply" else "Speaking…"
return
}
start()
sendQueuedIfIdle()
} else {
@@ -126,6 +181,58 @@ class MicCaptureManager(
}
}
suspend fun pauseForTts() {
val shouldPause =
synchronized(ttsPauseLock) {
ttsPauseDepth += 1
if (ttsPauseDepth > 1) return@synchronized false
resumeMicAfterTts = _micEnabled.value
val active = resumeMicAfterTts || recognizer != null || _isListening.value
if (!active) return@synchronized false
stopRequested = true
restartJob?.cancel()
restartJob = null
transcriptFlushJob?.cancel()
transcriptFlushJob = null
_isListening.value = false
_inputLevel.value = 0f
_liveTranscript.value = null
_statusText.value = if (_isSending.value) "Speaking · waiting for reply" else "Speaking…"
true
}
if (!shouldPause) return
withContext(Dispatchers.Main) {
recognizer?.cancel()
recognizer?.destroy()
recognizer = null
}
}
suspend fun resumeAfterTts() {
val shouldResume =
synchronized(ttsPauseLock) {
if (ttsPauseDepth == 0) return@synchronized false
ttsPauseDepth -= 1
if (ttsPauseDepth > 0) return@synchronized false
val resume = resumeMicAfterTts && _micEnabled.value
resumeMicAfterTts = false
if (!resume) {
_statusText.value =
when {
_micEnabled.value && _isSending.value -> "Listening · sending queued voice"
_micEnabled.value -> "Listening"
_isSending.value -> "Mic off · sending…"
else -> "Mic off"
}
}
resume
}
if (!shouldResume) return
stopRequested = false
start()
sendQueuedIfIdle()
}
fun onGatewayConnectionChanged(connected: Boolean) {
gatewayConnected = connected
if (connected) {
@@ -137,7 +244,7 @@ class MicCaptureManager(
pendingRunId = null
pendingAssistantEntryId = null
_isSending.value = false
if (messageQueue.isNotEmpty()) {
if (hasQueuedMessages()) {
_statusText.value = queuedWaitingStatus()
}
}
@@ -245,7 +352,7 @@ class MicCaptureManager(
_statusText.value =
when {
_isSending.value -> "Listening · sending queued voice"
messageQueue.isNotEmpty() -> "Listening · ${messageQueue.size} queued"
hasQueuedMessages() -> "Listening · ${queuedMessageCount()} queued"
else -> "Listening"
}
_isListening.value = true
@@ -278,7 +385,7 @@ class MicCaptureManager(
role = VoiceConversationRole.User,
text = message,
)
messageQueue.addLast(message)
enqueueMessage(message)
publishQueue()
}
@@ -297,12 +404,12 @@ class MicCaptureManager(
}
private fun publishQueue() {
_queuedMessages.value = messageQueue.toList()
_queuedMessages.value = snapshotMessageQueue()
}
private fun sendQueuedIfIdle() {
if (_isSending.value) return
if (messageQueue.isEmpty()) {
if (!hasQueuedMessages()) {
if (_micEnabled.value) {
_statusText.value = "Listening"
} else {
@@ -315,7 +422,7 @@ class MicCaptureManager(
return
}
val next = messageQueue.first()
val next = firstQueuedMessage() ?: return
_isSending.value = true
pendingRunTimeoutJob?.cancel()
pendingRunTimeoutJob = null
@@ -333,7 +440,7 @@ class MicCaptureManager(
if (runId == null) {
pendingRunTimeoutJob?.cancel()
pendingRunTimeoutJob = null
messageQueue.removeFirst()
removeFirstQueuedMessage()
publishQueue()
_isSending.value = false
pendingAssistantEntryId = null
@@ -379,8 +486,7 @@ class MicCaptureManager(
private fun completePendingTurn() {
pendingRunTimeoutJob?.cancel()
pendingRunTimeoutJob = null
if (messageQueue.isNotEmpty()) {
messageQueue.removeFirst()
if (removeFirstQueuedMessage() != null) {
publishQueue()
}
pendingRunId = null
@@ -390,7 +496,7 @@ class MicCaptureManager(
}
private fun queuedWaitingStatus(): String {
return "${messageQueue.size} queued · waiting for gateway"
return "${queuedMessageCount()} queued · waiting for gateway"
}
private fun appendConversation(

View File

@@ -0,0 +1,242 @@
package ai.openclaw.app.voice
import android.content.Context
import android.media.AudioAttributes
import android.media.AudioFormat
import android.media.AudioTrack
import android.media.MediaPlayer
import kotlinx.coroutines.CancellationException
import kotlinx.coroutines.CompletableDeferred
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.delay
import kotlinx.coroutines.withContext
import java.io.File
internal class TalkAudioPlayer(
private val context: Context,
) {
private val lock = Any()
private var active: ActivePlayback? = null
suspend fun play(audio: TalkSpeakAudio) {
when (val mode = resolvePlaybackMode(audio)) {
is TalkPlaybackMode.Pcm -> playPcm(audio.bytes, mode.sampleRate)
is TalkPlaybackMode.Compressed -> playCompressed(audio.bytes, mode.fileExtension)
}
}
fun stop() {
synchronized(lock) {
active?.cancel()
active = null
}
}
internal fun resolvePlaybackMode(audio: TalkSpeakAudio): TalkPlaybackMode {
return resolvePlaybackMode(
outputFormat = audio.outputFormat,
mimeType = audio.mimeType,
fileExtension = audio.fileExtension,
)
}
companion object {
internal fun resolvePlaybackMode(
outputFormat: String?,
mimeType: String?,
fileExtension: String?,
): TalkPlaybackMode {
val normalizedOutputFormat = outputFormat?.trim()?.lowercase()
if (normalizedOutputFormat != null) {
val pcmSampleRate = parsePcmSampleRate(normalizedOutputFormat)
if (pcmSampleRate != null) {
return TalkPlaybackMode.Pcm(sampleRate = pcmSampleRate)
}
}
val normalizedMimeType = mimeType?.trim()?.lowercase()
val extension =
normalizeExtension(
fileExtension ?: inferExtension(outputFormat = normalizedOutputFormat, mimeType = normalizedMimeType),
)
if (extension != null) {
return TalkPlaybackMode.Compressed(fileExtension = extension)
}
throw IllegalStateException("Unsupported talk audio format")
}
private fun parsePcmSampleRate(outputFormat: String): Int? {
return when (outputFormat) {
"pcm_16000" -> 16_000
"pcm_22050" -> 22_050
"pcm_24000" -> 24_000
"pcm_44100" -> 44_100
else -> null
}
}
private fun inferExtension(outputFormat: String?, mimeType: String?): String? {
return when {
outputFormat == "mp3" || outputFormat?.startsWith("mp3_") == true || mimeType == "audio/mpeg" -> ".mp3"
outputFormat == "opus" || outputFormat?.startsWith("opus_") == true || mimeType == "audio/ogg" -> ".ogg"
outputFormat?.endsWith("-wav") == true || mimeType == "audio/wav" -> ".wav"
outputFormat?.endsWith("-webm") == true || mimeType == "audio/webm" -> ".webm"
else -> null
}
}
private fun normalizeExtension(value: String?): String? {
val trimmed = value?.trim()?.lowercase().orEmpty()
if (trimmed.isEmpty()) return null
return if (trimmed.startsWith(".")) trimmed else ".$trimmed"
}
}
private suspend fun playPcm(bytes: ByteArray, sampleRate: Int) {
withContext(Dispatchers.IO) {
val minBufferSize =
AudioTrack.getMinBufferSize(
sampleRate,
AudioFormat.CHANNEL_OUT_MONO,
AudioFormat.ENCODING_PCM_16BIT,
)
if (minBufferSize <= 0) {
throw IllegalStateException("AudioTrack buffer unavailable")
}
val track =
AudioTrack.Builder()
.setAudioAttributes(
AudioAttributes.Builder()
.setUsage(AudioAttributes.USAGE_MEDIA)
.setContentType(AudioAttributes.CONTENT_TYPE_SPEECH)
.build(),
)
.setAudioFormat(
AudioFormat.Builder()
.setEncoding(AudioFormat.ENCODING_PCM_16BIT)
.setSampleRate(sampleRate)
.setChannelMask(AudioFormat.CHANNEL_OUT_MONO)
.build(),
)
.setTransferMode(AudioTrack.MODE_STATIC)
.setBufferSizeInBytes(maxOf(minBufferSize, bytes.size))
.build()
val finished = CompletableDeferred<Unit>()
val playback =
ActivePlayback(
cancel = {
finished.completeExceptionally(CancellationException("assistant speech cancelled"))
runCatching { track.pause() }
runCatching { track.flush() }
runCatching { track.stop() }
},
)
register(playback)
try {
val written = track.write(bytes, 0, bytes.size)
if (written != bytes.size) {
throw IllegalStateException("AudioTrack write failed")
}
val totalFrames = bytes.size / 2
track.play()
while (track.playState == AudioTrack.PLAYSTATE_PLAYING) {
if (track.playbackHeadPosition >= totalFrames) {
finished.complete(Unit)
break
}
delay(20)
}
if (!finished.isCompleted) {
finished.complete(Unit)
}
finished.await()
} finally {
clear(playback)
runCatching { track.pause() }
runCatching { track.flush() }
runCatching { track.stop() }
track.release()
}
}
}
private suspend fun playCompressed(bytes: ByteArray, fileExtension: String) {
val tempFile = withContext(Dispatchers.IO) {
File.createTempFile("talk-audio-", fileExtension, context.cacheDir).apply {
writeBytes(bytes)
}
}
try {
val finished = CompletableDeferred<Unit>()
val player =
withContext(Dispatchers.Main) {
MediaPlayer().apply {
setAudioAttributes(
AudioAttributes.Builder()
.setUsage(AudioAttributes.USAGE_MEDIA)
.setContentType(AudioAttributes.CONTENT_TYPE_SPEECH)
.build(),
)
setDataSource(tempFile.absolutePath)
setOnCompletionListener {
finished.complete(Unit)
}
setOnErrorListener { _, what, extra ->
finished.completeExceptionally(IllegalStateException("MediaPlayer error ($what/$extra)"))
true
}
prepare()
}
}
val playback =
ActivePlayback(
cancel = {
finished.completeExceptionally(CancellationException("assistant speech cancelled"))
runCatching { player.stop() }
},
)
register(playback)
try {
withContext(Dispatchers.Main) {
player.start()
}
finished.await()
} finally {
clear(playback)
withContext(Dispatchers.Main) {
runCatching { player.stop() }
player.release()
}
}
} finally {
withContext(Dispatchers.IO) {
tempFile.delete()
}
}
}
private fun register(playback: ActivePlayback) {
synchronized(lock) {
active?.cancel()
active = playback
}
}
private fun clear(playback: ActivePlayback) {
synchronized(lock) {
if (active === playback) {
active = null
}
}
}
}
internal sealed interface TalkPlaybackMode {
data class Pcm(val sampleRate: Int) : TalkPlaybackMode
data class Compressed(val fileExtension: String) : TalkPlaybackMode
}
private class ActivePlayback(
val cancel: () -> Unit,
)

View File

@@ -14,19 +14,21 @@ import android.os.SystemClock
import android.speech.RecognitionListener
import android.speech.RecognizerIntent
import android.speech.SpeechRecognizer
import android.util.Log
import android.speech.tts.TextToSpeech
import android.speech.tts.UtteranceProgressListener
import android.util.Log
import androidx.core.content.ContextCompat
import ai.openclaw.app.gateway.GatewaySession
import java.util.Locale
import java.util.UUID
import java.util.concurrent.atomic.AtomicLong
import kotlin.coroutines.coroutineContext
import kotlinx.coroutines.CancellationException
import kotlinx.coroutines.CompletableDeferred
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job
import kotlinx.coroutines.NonCancellable
import kotlinx.coroutines.delay
import kotlinx.coroutines.ensureActive
import kotlinx.coroutines.flow.MutableStateFlow
@@ -46,6 +48,8 @@ class TalkModeManager(
private val session: GatewaySession,
private val supportsChatSubscribe: Boolean,
private val isConnected: () -> Boolean,
private val onBeforeSpeak: suspend () -> Unit = {},
private val onAfterSpeak: suspend () -> Unit = {},
) {
companion object {
private const val tag = "TalkMode"
@@ -57,6 +61,8 @@ class TalkModeManager(
private val mainHandler = Handler(Looper.getMainLooper())
private val json = Json { ignoreUnknownKeys = true }
private val talkSpeakClient = TalkSpeakClient(session = session, json = json)
private val talkAudioPlayer = TalkAudioPlayer(context)
private val _isEnabled = MutableStateFlow(false)
val isEnabled: StateFlow<Boolean> = _isEnabled
@@ -101,6 +107,7 @@ class TalkModeManager(
private val playbackGeneration = AtomicLong(0L)
private var ttsJob: Job? = null
private val ttsJobLock = Any()
private val ttsLock = Any()
private var textToSpeech: TextToSpeech? = null
private var textToSpeechInit: CompletableDeferred<TextToSpeech>? = null
@@ -163,8 +170,11 @@ class TalkModeManager(
?: waitForAssistantText(session, startedAt, if (ok) 12_000 else 25_000)
if (!assistant.isNullOrBlank()) {
val playbackToken = playbackGeneration.incrementAndGet()
cancelActivePlayback()
_statusText.value = "Speaking…"
playAssistant(assistant, playbackToken)
runPlaybackSession(playbackToken) {
playAssistant(assistant, playbackToken)
}
} else {
_statusText.value = "No reply"
}
@@ -180,14 +190,12 @@ class TalkModeManager(
fun playTtsForText(text: String) {
val playbackToken = playbackGeneration.incrementAndGet()
ttsJob?.cancel()
ttsJob = scope.launch {
cancelActivePlayback()
scope.launch {
reloadConfig()
ensurePlaybackActive(playbackToken)
_isSpeaking.value = true
_statusText.value = "Speaking…"
playAssistant(text, playbackToken)
ttsJob = null
runPlaybackSession(playbackToken) {
playAssistant(text, playbackToken)
}
}
}
@@ -258,7 +266,6 @@ class TalkModeManager(
if (playbackEnabled == enabled) return
playbackEnabled = enabled
if (!enabled) {
playbackGeneration.incrementAndGet()
stopSpeaking()
}
}
@@ -270,10 +277,11 @@ class TalkModeManager(
suspend fun speakAssistantReply(text: String) {
if (!playbackEnabled) return
val playbackToken = playbackGeneration.incrementAndGet()
stopSpeaking(resetInterrupt = false)
cancelActivePlayback()
ensureConfigLoaded()
ensurePlaybackActive(playbackToken)
playAssistant(text, playbackToken)
runPlaybackSession(playbackToken) {
playAssistant(text, playbackToken)
}
}
private fun start() {
@@ -483,9 +491,10 @@ class TalkModeManager(
}
Log.d(tag, "assistant text ok chars=${assistant.length}")
val playbackToken = playbackGeneration.incrementAndGet()
stopSpeaking(resetInterrupt = false)
ensurePlaybackActive(playbackToken)
playAssistant(assistant, playbackToken)
cancelActivePlayback()
runPlaybackSession(playbackToken) {
playAssistant(assistant, playbackToken)
}
} catch (err: Throwable) {
if (err is CancellationException) {
Log.d(tag, "finalize speech cancelled")
@@ -655,22 +664,87 @@ class TalkModeManager(
requestAudioFocusForTts()
try {
val ttsStarted = SystemClock.elapsedRealtime()
speakWithSystemTts(cleaned, directive, playbackToken)
Log.d(tag, "system tts ok durMs=${SystemClock.elapsedRealtime() - ttsStarted}")
val started = SystemClock.elapsedRealtime()
when (val result = talkSpeakClient.synthesize(text = cleaned, directive = directive)) {
is TalkSpeakResult.Success -> {
ensurePlaybackActive(playbackToken)
talkAudioPlayer.play(result.audio)
ensurePlaybackActive(playbackToken)
Log.d(tag, "talk.speak ok durMs=${SystemClock.elapsedRealtime() - started}")
}
is TalkSpeakResult.FallbackToLocal -> {
Log.d(tag, "talk.speak unavailable; using local TTS: ${result.message}")
speakWithSystemTts(cleaned, directive, playbackToken)
Log.d(tag, "system tts ok durMs=${SystemClock.elapsedRealtime() - started}")
}
is TalkSpeakResult.Failure -> {
throw IllegalStateException(result.message)
}
}
} catch (err: Throwable) {
if (isPlaybackCancelled(err, playbackToken)) {
Log.d(tag, "assistant speech cancelled")
return
}
_statusText.value = "Speak failed: ${err.message ?: err::class.simpleName}"
Log.w(tag, "system tts failed: ${err.message ?: err::class.simpleName}")
Log.w(tag, "talk playback failed: ${err.message ?: err::class.simpleName}")
} finally {
_isSpeaking.value = false
}
}
private suspend fun runPlaybackSession(
playbackToken: Long,
block: suspend () -> Unit,
) {
val currentJob = coroutineContext[Job]
var shouldResumeAfterSpeak = false
try {
val claimedPlayback =
synchronized(ttsJobLock) {
if (!playbackEnabled || playbackToken != playbackGeneration.get()) {
false
} else {
ttsJob = currentJob
true
}
}
if (!claimedPlayback) {
ensurePlaybackActive(playbackToken)
return
}
ensurePlaybackActive(playbackToken)
shouldResumeAfterSpeak = true
onBeforeSpeak()
ensurePlaybackActive(playbackToken)
_isSpeaking.value = true
_statusText.value = "Speaking…"
block()
} finally {
synchronized(ttsJobLock) {
if (ttsJob === currentJob) {
ttsJob = null
}
}
_isSpeaking.value = false
if (shouldResumeAfterSpeak) {
withContext(NonCancellable) {
onAfterSpeak()
}
}
}
}
private fun cancelActivePlayback() {
val activeJob =
synchronized(ttsJobLock) {
ttsJob
}
activeJob?.cancel()
talkAudioPlayer.stop()
stopTextToSpeechPlayback()
}
private suspend fun speakWithSystemTts(text: String, directive: TalkDirective?, playbackToken: Long) {
ensurePlaybackActive(playbackToken)
val engine = ensureTextToSpeech()
@@ -755,15 +829,16 @@ class TalkModeManager(
}
private fun stopSpeaking(resetInterrupt: Boolean = true) {
playbackGeneration.incrementAndGet()
if (!_isSpeaking.value) {
stopTextToSpeechPlayback()
cancelActivePlayback()
abandonAudioFocus()
return
}
if (resetInterrupt) {
lastInterruptedAtSeconds = null
}
stopTextToSpeechPlayback()
cancelActivePlayback()
_isSpeaking.value = false
abandonAudioFocus()
}

View File

@@ -0,0 +1,143 @@
package ai.openclaw.app.voice
import ai.openclaw.app.gateway.GatewaySession
import kotlinx.serialization.Serializable
import kotlinx.serialization.encodeToString
import kotlinx.serialization.json.Json
internal data class TalkSpeakAudio(
val bytes: ByteArray,
val provider: String,
val outputFormat: String?,
val voiceCompatible: Boolean?,
val mimeType: String?,
val fileExtension: String?,
)
internal sealed interface TalkSpeakResult {
data class Success(val audio: TalkSpeakAudio) : TalkSpeakResult
data class FallbackToLocal(val message: String) : TalkSpeakResult
data class Failure(val message: String) : TalkSpeakResult
}
internal class TalkSpeakClient(
private val session: GatewaySession? = null,
private val json: Json = Json { ignoreUnknownKeys = true },
private val requestDetailed: (suspend (String, String, Long) -> GatewaySession.RpcResult)? = null,
) {
suspend fun synthesize(text: String, directive: TalkDirective?): TalkSpeakResult {
val response =
try {
performRequest(
method = "talk.speak",
paramsJson = json.encodeToString(TalkSpeakRequest.from(text = text, directive = directive)),
timeoutMs = 45_000,
)
} catch (err: Throwable) {
return TalkSpeakResult.Failure(err.message ?: "talk.speak request failed")
}
if (!response.ok) {
val error = response.error
val message = error?.message ?: "talk.speak request failed"
return if (isFallbackEligible(error)) {
TalkSpeakResult.FallbackToLocal(message)
} else {
TalkSpeakResult.Failure(message)
}
}
val payload =
try {
json.decodeFromString<TalkSpeakResponse>(response.payloadJson ?: "")
} catch (err: Throwable) {
return TalkSpeakResult.Failure(err.message ?: "talk.speak payload invalid")
}
val bytes =
try {
android.util.Base64.decode(payload.audioBase64, android.util.Base64.DEFAULT)
} catch (err: Throwable) {
return TalkSpeakResult.Failure(err.message ?: "talk.speak audio decode failed")
}
if (bytes.isEmpty()) {
return TalkSpeakResult.Failure("talk.speak returned empty audio")
}
return TalkSpeakResult.Success(
TalkSpeakAudio(
bytes = bytes,
provider = payload.provider,
outputFormat = payload.outputFormat,
voiceCompatible = payload.voiceCompatible,
mimeType = payload.mimeType,
fileExtension = payload.fileExtension,
),
)
}
private fun isFallbackEligible(error: GatewaySession.ErrorShape?): Boolean {
val reason = error?.details?.reason
if (reason == null) return true
return reason == "talk_unconfigured" ||
reason == "talk_provider_unsupported" ||
reason == "method_unavailable"
}
private suspend fun performRequest(
method: String,
paramsJson: String,
timeoutMs: Long,
): GatewaySession.RpcResult {
requestDetailed?.let { return it(method, paramsJson, timeoutMs) }
val activeSession = session ?: throw IllegalStateException("session missing")
return activeSession.requestDetailed(method = method, paramsJson = paramsJson, timeoutMs = timeoutMs)
}
}
@Serializable
internal data class TalkSpeakRequest(
val text: String,
val voiceId: String? = null,
val modelId: String? = null,
val outputFormat: String? = null,
val speed: Double? = null,
val rateWpm: Int? = null,
val stability: Double? = null,
val similarity: Double? = null,
val style: Double? = null,
val speakerBoost: Boolean? = null,
val seed: Long? = null,
val normalize: String? = null,
val language: String? = null,
val latencyTier: Int? = null,
) {
companion object {
fun from(text: String, directive: TalkDirective?): TalkSpeakRequest {
return TalkSpeakRequest(
text = text,
voiceId = directive?.voiceId,
modelId = directive?.modelId,
outputFormat = directive?.outputFormat,
speed = directive?.speed,
rateWpm = directive?.rateWpm,
stability = directive?.stability,
similarity = directive?.similarity,
style = directive?.style,
speakerBoost = directive?.speakerBoost,
seed = directive?.seed,
normalize = directive?.normalize,
language = directive?.language,
latencyTier = directive?.latencyTier,
)
}
}
}
@Serializable
private data class TalkSpeakResponse(
val audioBase64: String,
val provider: String,
val outputFormat: String? = null,
val voiceCompatible: Boolean? = null,
val mimeType: String? = null,
val fileExtension: String? = null,
)

View File

@@ -21,17 +21,72 @@ import java.util.UUID
@Config(sdk = [34])
class GatewayBootstrapAuthTest {
@Test
fun connectsOperatorSessionWhenBootstrapAuthExists() {
assertTrue(shouldConnectOperatorSession(token = "", bootstrapToken = "bootstrap-1", password = "", storedOperatorToken = ""))
assertTrue(shouldConnectOperatorSession(token = null, bootstrapToken = "bootstrap-1", password = null, storedOperatorToken = null))
fun skipsOperatorSessionWhenOnlyBootstrapAuthExists() {
assertFalse(
shouldConnectOperatorSession(
NodeRuntime.GatewayConnectAuth(token = "", bootstrapToken = "bootstrap-1", password = ""),
storedOperatorToken = "",
),
)
assertFalse(
shouldConnectOperatorSession(
NodeRuntime.GatewayConnectAuth(token = null, bootstrapToken = "bootstrap-1", password = null),
storedOperatorToken = null,
),
)
}
@Test
fun skipsOperatorSessionOnlyWhenNoSharedBootstrapOrStoredAuthExists() {
assertTrue(shouldConnectOperatorSession(token = "shared-token", bootstrapToken = "bootstrap-1", password = null, storedOperatorToken = null))
assertTrue(shouldConnectOperatorSession(token = null, bootstrapToken = "bootstrap-1", password = "shared-password", storedOperatorToken = null))
assertTrue(shouldConnectOperatorSession(token = null, bootstrapToken = null, password = null, storedOperatorToken = "stored-token"))
assertFalse(shouldConnectOperatorSession(token = null, bootstrapToken = "", password = null, storedOperatorToken = null))
fun connectsOperatorSessionWhenSharedPasswordOrStoredAuthExists() {
assertTrue(
shouldConnectOperatorSession(
NodeRuntime.GatewayConnectAuth(token = "shared-token", bootstrapToken = "bootstrap-1", password = null),
storedOperatorToken = null,
),
)
assertTrue(
shouldConnectOperatorSession(
NodeRuntime.GatewayConnectAuth(token = null, bootstrapToken = "bootstrap-1", password = "shared-password"),
storedOperatorToken = null,
),
)
assertTrue(
shouldConnectOperatorSession(
NodeRuntime.GatewayConnectAuth(token = null, bootstrapToken = "bootstrap-1", password = null),
storedOperatorToken = "stored-token",
),
)
assertFalse(
shouldConnectOperatorSession(
NodeRuntime.GatewayConnectAuth(token = null, bootstrapToken = "", password = null),
storedOperatorToken = null,
),
)
}
@Test
fun resolveOperatorSessionConnectAuthUsesStoredTokenPathAfterBootstrapHandoff() {
val resolved =
resolveOperatorSessionConnectAuth(
auth = NodeRuntime.GatewayConnectAuth(token = null, bootstrapToken = "bootstrap-1", password = null),
storedOperatorToken = "stored-token",
)
assertEquals(NodeRuntime.GatewayConnectAuth(token = null, bootstrapToken = null, password = null), resolved)
}
@Test
fun resolveOperatorSessionConnectAuthPrefersExplicitSharedAuth() {
val resolved =
resolveOperatorSessionConnectAuth(
auth = NodeRuntime.GatewayConnectAuth(token = "shared-token", bootstrapToken = "bootstrap-1", password = "shared-password"),
storedOperatorToken = "stored-token",
)
assertEquals(
NodeRuntime.GatewayConnectAuth(token = "shared-token", bootstrapToken = null, password = null),
resolved,
)
}
@Test
@@ -97,7 +152,7 @@ class GatewayBootstrapAuthTest {
assertEquals("fp-1", prefs.loadGatewayTlsFingerprint(endpoint.stableId))
assertEquals("setup-bootstrap-token", desiredBootstrapToken(runtime, "nodeSession"))
assertEquals("setup-bootstrap-token", desiredBootstrapToken(runtime, "operatorSession"))
assertNull(desiredBootstrapToken(runtime, "operatorSession"))
}
@Test

View File

@@ -0,0 +1,63 @@
package ai.openclaw.app.gateway
import ai.openclaw.app.SecurePrefs
import android.content.Context
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertTrue
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
import org.robolectric.RuntimeEnvironment
import org.robolectric.annotation.Config
import java.util.UUID
@RunWith(RobolectricTestRunner::class)
@Config(sdk = [34])
class DeviceAuthStoreTest {
@Test
fun saveTokenPersistsNormalizedScopesMetadata() {
val app = RuntimeEnvironment.getApplication()
val securePrefs =
app.getSharedPreferences(
"openclaw.node.secure.test.${UUID.randomUUID()}",
Context.MODE_PRIVATE,
)
val prefs = SecurePrefs(app, securePrefsOverride = securePrefs)
val store = DeviceAuthStore(prefs)
store.saveToken(
deviceId = " Device-1 ",
role = " Operator ",
token = " operator-token ",
scopes = listOf("operator.write", "operator.read", "operator.write", " "),
)
val entry = store.loadEntry("device-1", "operator")
assertNotNull(entry)
assertEquals("operator-token", entry?.token)
assertEquals("operator", entry?.role)
assertEquals(listOf("operator.read", "operator.write"), entry?.scopes)
assertTrue((entry?.updatedAtMs ?: 0L) > 0L)
}
@Test
fun loadEntryReadsLegacyTokenWithoutMetadata() {
val app = RuntimeEnvironment.getApplication()
val securePrefs =
app.getSharedPreferences(
"openclaw.node.secure.test.${UUID.randomUUID()}",
Context.MODE_PRIVATE,
)
val prefs = SecurePrefs(app, securePrefsOverride = securePrefs)
prefs.putString("gateway.deviceToken.device-1.operator", "legacy-token")
val store = DeviceAuthStore(prefs)
val entry = store.loadEntry("device-1", "operator")
assertNotNull(entry)
assertEquals("legacy-token", entry?.token)
assertEquals("operator", entry?.role)
assertEquals(emptyList<String>(), entry?.scopes)
assertEquals(0L, entry?.updatedAtMs)
}
}

View File

@@ -35,12 +35,18 @@ private const val CONNECT_CHALLENGE_FRAME =
"""{"type":"event","event":"connect.challenge","payload":{"nonce":"android-test-nonce"}}"""
private class InMemoryDeviceAuthStore : DeviceAuthTokenStore {
private val tokens = mutableMapOf<String, String>()
private val tokens = mutableMapOf<String, DeviceAuthEntry>()
override fun loadToken(deviceId: String, role: String): String? = tokens["${deviceId.trim()}|${role.trim()}"]?.trim()?.takeIf { it.isNotEmpty() }
override fun loadEntry(deviceId: String, role: String): DeviceAuthEntry? = tokens["${deviceId.trim()}|${role.trim()}"]
override fun saveToken(deviceId: String, role: String, token: String) {
tokens["${deviceId.trim()}|${role.trim()}"] = token.trim()
override fun saveToken(deviceId: String, role: String, token: String, scopes: List<String>) {
tokens["${deviceId.trim()}|${role.trim()}"] =
DeviceAuthEntry(
token = token.trim(),
role = role.trim(),
scopes = scopes,
updatedAtMs = System.currentTimeMillis(),
)
}
override fun clearToken(deviceId: String, role: String) {
@@ -213,6 +219,144 @@ class GatewaySessionInvokeTest {
}
}
@Test
fun connect_storesPrimaryDeviceTokenFromSuccessfulSharedTokenConnect() = runBlocking {
val json = testJson()
val connected = CompletableDeferred<Unit>()
val lastDisconnect = AtomicReference("")
val server =
startGatewayServer(json) { webSocket, id, method, _ ->
when (method) {
"connect" -> {
webSocket.send(
connectResponseFrame(
id,
authJson = """{"deviceToken":"shared-node-token","role":"node","scopes":[]}""",
),
)
webSocket.close(1000, "done")
}
}
}
val harness =
createNodeHarness(
connected = connected,
lastDisconnect = lastDisconnect,
) { GatewaySession.InvokeResult.ok("""{"handled":true}""") }
try {
connectNodeSession(
session = harness.session,
port = server.port,
token = "shared-auth-token",
bootstrapToken = null,
)
awaitConnectedOrThrow(connected, lastDisconnect, server)
val deviceId = DeviceIdentityStore(RuntimeEnvironment.getApplication()).loadOrCreate().deviceId
assertEquals("shared-node-token", harness.deviceAuthStore.loadToken(deviceId, "node"))
assertNull(harness.deviceAuthStore.loadToken(deviceId, "operator"))
} finally {
shutdownHarness(harness, server)
}
}
@Test
fun bootstrapConnect_storesAdditionalBoundedDeviceTokensOnTrustedTransport() = runBlocking {
val json = testJson()
val connected = CompletableDeferred<Unit>()
val lastDisconnect = AtomicReference("")
val server =
startGatewayServer(json) { webSocket, id, method, _ ->
when (method) {
"connect" -> {
webSocket.send(
connectResponseFrame(
id,
authJson =
"""{"deviceToken":"bootstrap-node-token","role":"node","scopes":[],"deviceTokens":[{"deviceToken":"bootstrap-operator-token","role":"operator","scopes":["operator.admin","operator.approvals","operator.read","operator.talk.secrets","operator.write"]}]}""",
),
)
webSocket.close(1000, "done")
}
}
}
val harness =
createNodeHarness(
connected = connected,
lastDisconnect = lastDisconnect,
) { GatewaySession.InvokeResult.ok("""{"handled":true}""") }
try {
connectNodeSession(
session = harness.session,
port = server.port,
token = null,
bootstrapToken = "bootstrap-token",
)
awaitConnectedOrThrow(connected, lastDisconnect, server)
val deviceId = DeviceIdentityStore(RuntimeEnvironment.getApplication()).loadOrCreate().deviceId
val nodeEntry = harness.deviceAuthStore.loadEntry(deviceId, "node")
val operatorEntry = harness.deviceAuthStore.loadEntry(deviceId, "operator")
assertEquals("bootstrap-node-token", nodeEntry?.token)
assertEquals(emptyList<String>(), nodeEntry?.scopes)
assertEquals("bootstrap-operator-token", operatorEntry?.token)
assertEquals(
listOf("operator.approvals", "operator.read", "operator.talk.secrets", "operator.write"),
operatorEntry?.scopes,
)
} finally {
shutdownHarness(harness, server)
}
}
@Test
fun nonBootstrapConnect_ignoresAdditionalBootstrapDeviceTokens() = runBlocking {
val json = testJson()
val connected = CompletableDeferred<Unit>()
val lastDisconnect = AtomicReference("")
val server =
startGatewayServer(json) { webSocket, id, method, _ ->
when (method) {
"connect" -> {
webSocket.send(
connectResponseFrame(
id,
authJson =
"""{"deviceToken":"shared-node-token","role":"node","scopes":[],"deviceTokens":[{"deviceToken":"shared-operator-token","role":"operator","scopes":["operator.approvals","operator.read"]}]}""",
),
)
webSocket.close(1000, "done")
}
}
}
val harness =
createNodeHarness(
connected = connected,
lastDisconnect = lastDisconnect,
) { GatewaySession.InvokeResult.ok("""{"handled":true}""") }
try {
connectNodeSession(
session = harness.session,
port = server.port,
token = "shared-auth-token",
bootstrapToken = null,
)
awaitConnectedOrThrow(connected, lastDisconnect, server)
val deviceId = DeviceIdentityStore(RuntimeEnvironment.getApplication()).loadOrCreate().deviceId
assertEquals("shared-node-token", harness.deviceAuthStore.loadToken(deviceId, "node"))
assertNull(harness.deviceAuthStore.loadToken(deviceId, "operator"))
} finally {
shutdownHarness(harness, server)
}
}
@Test
fun nodeInvokeRequest_roundTripsInvokeResult() = runBlocking {
val handshakeOrigin = AtomicReference<String?>(null)
@@ -470,9 +614,14 @@ class GatewaySessionInvokeTest {
}
}
private fun connectResponseFrame(id: String, canvasHostUrl: String? = null): String {
private fun connectResponseFrame(
id: String,
canvasHostUrl: String? = null,
authJson: String? = null,
): String {
val canvas = canvasHostUrl?.let { "\"canvasHostUrl\":\"$it\"," } ?: ""
return """{"type":"res","id":"$id","ok":true,"payload":{$canvas"snapshot":{"sessionDefaults":{"mainSessionKey":"main"}}}}"""
val auth = authJson?.let { "\"auth\":$it," } ?: ""
return """{"type":"res","id":"$id","ok":true,"payload":{$canvas$auth"snapshot":{"sessionDefaults":{"mainSessionKey":"main"}}}}"""
}
private fun startGatewayServer(

View File

@@ -39,4 +39,34 @@ class CanvasActionTrustTest {
),
)
}
@Test
fun acceptsFragmentOnlyDifferenceForTrustedA2uiPage() {
assertTrue(
CanvasActionTrust.isTrustedCanvasActionUrl(
rawUrl = "https://canvas.example.com:9443/__openclaw__/cap/token/__openclaw__/a2ui/?platform=android#step2",
trustedA2uiUrls = listOf("https://canvas.example.com:9443/__openclaw__/cap/token/__openclaw__/a2ui/?platform=android"),
),
)
}
@Test
fun rejectsQueryMismatchOnTrustedOriginAndPath() {
assertFalse(
CanvasActionTrust.isTrustedCanvasActionUrl(
rawUrl = "https://canvas.example.com:9443/__openclaw__/cap/token/__openclaw__/a2ui/?platform=ios",
trustedA2uiUrls = listOf("https://canvas.example.com:9443/__openclaw__/cap/token/__openclaw__/a2ui/?platform=android"),
),
)
}
@Test
fun rejectsDescendantPathUnderTrustedA2uiRoot() {
assertFalse(
CanvasActionTrust.isTrustedCanvasActionUrl(
rawUrl = "https://canvas.example.com:9443/__openclaw__/cap/token/__openclaw__/a2ui/child/index.html?platform=android",
trustedA2uiUrls = listOf("https://canvas.example.com:9443/__openclaw__/cap/token/__openclaw__/a2ui/?platform=android"),
),
)
}
}

View File

@@ -108,7 +108,7 @@ class ConnectionManagerTest {
}
@Test
fun resolveTlsParamsForEndpoint_manualPrivateLanRequiresTlsWhenToggleIsOff() {
fun resolveTlsParamsForEndpoint_manualPrivateLanCanStayCleartextWhenToggleIsOff() {
val endpoint = GatewayEndpoint.manual(host = "192.168.1.20", port = 18789)
val params =
@@ -118,9 +118,7 @@ class ConnectionManagerTest {
manualTlsEnabled = false,
)
assertEquals(true, params?.required)
assertNull(params?.expectedFingerprint)
assertEquals(false, params?.allowTOFU)
assertNull(params)
}
@Test
@@ -148,7 +146,7 @@ class ConnectionManagerTest {
}
@Test
fun resolveTlsParamsForEndpoint_discoveryPrivateLanWithoutHintsRequiresTls() {
fun resolveTlsParamsForEndpoint_discoveryPrivateLanWithoutHintsCanStayCleartext() {
val endpoint =
GatewayEndpoint(
stableId = "_openclaw-gw._tcp.|local.|Test",
@@ -166,9 +164,7 @@ class ConnectionManagerTest {
manualTlsEnabled = false,
)
assertEquals(true, params?.required)
assertNull(params?.expectedFingerprint)
assertEquals(false, params?.allowTOFU)
assertNull(params)
}
@Test

View File

@@ -0,0 +1,50 @@
package ai.openclaw.app.ui
import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue
import org.junit.Test
class CanvasA2UIActionBridgeTest {
@Test
fun forwardsTrimmedPayloadFromTrustedPage() {
val forwarded = mutableListOf<String>()
val bridge =
CanvasA2UIActionBridge(
isTrustedPage = { true },
onMessage = { forwarded += it },
)
bridge.postMessage(" {\"ok\":true} ")
assertEquals(listOf("{\"ok\":true}"), forwarded)
}
@Test
fun rejectsPayloadFromUntrustedPage() {
val forwarded = mutableListOf<String>()
val bridge =
CanvasA2UIActionBridge(
isTrustedPage = { false },
onMessage = { forwarded += it },
)
bridge.postMessage("{\"ok\":true}")
assertTrue(forwarded.isEmpty())
}
@Test
fun rejectsBlankPayloadBeforeForwarding() {
val forwarded = mutableListOf<String>()
val bridge =
CanvasA2UIActionBridge(
isTrustedPage = { true },
onMessage = { forwarded += it },
)
bridge.postMessage(" ")
bridge.postMessage(null)
assertTrue(forwarded.isEmpty())
}
}

View File

@@ -290,11 +290,19 @@ class GatewayConfigResolverTest {
}
@Test
fun parseGatewayEndpointResultFlagsInsecureLanCleartextGateway() {
fun parseGatewayEndpointResultAcceptsLanCleartextGateway() {
val parsed = parseGatewayEndpointResult("ws://192.168.1.20:18789")
assertNull(parsed.config)
assertEquals(GatewayEndpointValidationError.INSECURE_REMOTE_URL, parsed.error)
assertEquals(
GatewayEndpointConfig(
host = "192.168.1.20",
port = 18789,
tls = false,
displayUrl = "http://192.168.1.20:18789",
),
parsed.config,
)
assertNull(parsed.error)
}
@Test

View File

@@ -0,0 +1,44 @@
package ai.openclaw.app.voice
import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue
import org.junit.Test
class TalkAudioPlayerTest {
@Test
fun resolvesPcmPlaybackFromOutputFormat() {
val mode =
TalkAudioPlayer.resolvePlaybackMode(
outputFormat = "pcm_24000",
mimeType = null,
fileExtension = null,
)
assertEquals(TalkPlaybackMode.Pcm(sampleRate = 24_000), mode)
}
@Test
fun resolvesCompressedPlaybackFromMimeType() {
val mode =
TalkAudioPlayer.resolvePlaybackMode(
outputFormat = null,
mimeType = "audio/mpeg",
fileExtension = null,
)
assertEquals(TalkPlaybackMode.Compressed(fileExtension = ".mp3"), mode)
}
@Test
fun preservesProvidedExtensionForCompressedPlayback() {
val mode =
TalkAudioPlayer.resolvePlaybackMode(
outputFormat = null,
mimeType = "audio/webm",
fileExtension = "webm",
)
assertTrue(mode is TalkPlaybackMode.Compressed)
assertEquals(".webm", (mode as TalkPlaybackMode.Compressed).fileExtension)
}
}

View File

@@ -0,0 +1,97 @@
package ai.openclaw.app.voice
import ai.openclaw.app.gateway.DeviceAuthEntry
import ai.openclaw.app.gateway.DeviceAuthTokenStore
import ai.openclaw.app.gateway.DeviceIdentityStore
import ai.openclaw.app.gateway.GatewaySession
import java.util.concurrent.atomic.AtomicLong
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job
import kotlinx.coroutines.SupervisorJob
import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
import org.robolectric.RuntimeEnvironment
import org.robolectric.annotation.Config
@RunWith(RobolectricTestRunner::class)
@Config(sdk = [34])
class TalkModeManagerTest {
@Test
fun stopTtsCancelsTrackedPlaybackJob() {
val manager = createManager()
val playbackJob = Job()
setPrivateField(manager, "ttsJob", playbackJob)
playbackGeneration(manager).set(7L)
manager.stopTts()
assertTrue(playbackJob.isCancelled)
assertEquals(8L, playbackGeneration(manager).get())
}
@Test
fun disablingPlaybackCancelsTrackedJobOnce() {
val manager = createManager()
val playbackJob = Job()
setPrivateField(manager, "ttsJob", playbackJob)
playbackGeneration(manager).set(11L)
manager.setPlaybackEnabled(false)
manager.setPlaybackEnabled(false)
assertTrue(playbackJob.isCancelled)
assertEquals(12L, playbackGeneration(manager).get())
}
private fun createManager(): TalkModeManager {
val app = RuntimeEnvironment.getApplication()
val sessionJob = SupervisorJob()
val session =
GatewaySession(
scope = CoroutineScope(sessionJob + Dispatchers.Default),
identityStore = DeviceIdentityStore(app),
deviceAuthStore = InMemoryDeviceAuthStore(),
onConnected = { _, _, _ -> },
onDisconnected = {},
onEvent = { _, _ -> },
)
return TalkModeManager(
context = app,
scope = CoroutineScope(SupervisorJob() + Dispatchers.Default),
session = session,
supportsChatSubscribe = false,
isConnected = { true },
)
}
@Suppress("UNCHECKED_CAST")
private fun playbackGeneration(manager: TalkModeManager): AtomicLong {
return readPrivateField(manager, "playbackGeneration") as AtomicLong
}
private fun setPrivateField(target: Any, name: String, value: Any?) {
val field = target.javaClass.getDeclaredField(name)
field.isAccessible = true
field.set(target, value)
}
private fun readPrivateField(target: Any, name: String): Any? {
val field = target.javaClass.getDeclaredField(name)
field.isAccessible = true
return field.get(target)
}
}
private class InMemoryDeviceAuthStore : DeviceAuthTokenStore {
override fun loadEntry(deviceId: String, role: String): DeviceAuthEntry? = null
override fun saveToken(deviceId: String, role: String, token: String, scopes: List<String>) = Unit
override fun clearToken(deviceId: String, role: String) = Unit
}

View File

@@ -0,0 +1,128 @@
package ai.openclaw.app.voice
import ai.openclaw.app.gateway.GatewayConnectErrorDetails
import ai.openclaw.app.gateway.GatewaySession
import kotlinx.coroutines.test.runTest
import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue
import org.junit.Test
class TalkSpeakClientTest {
@Test
fun buildsRequestFromDirective() {
val request =
TalkSpeakRequest.from(
text = "Hello from talk mode.",
directive =
TalkDirective(
voiceId = "voice-123",
modelId = "model-abc",
speed = 1.1,
rateWpm = 190,
stability = 0.5,
similarity = 0.7,
style = 0.2,
speakerBoost = true,
seed = 42,
normalize = "auto",
language = "en",
outputFormat = "pcm_24000",
latencyTier = 3,
once = true,
),
)
assertEquals("Hello from talk mode.", request.text)
assertEquals("voice-123", request.voiceId)
assertEquals("model-abc", request.modelId)
assertEquals(1.1, request.speed)
assertEquals(190, request.rateWpm)
assertEquals(0.5, request.stability)
assertEquals(0.7, request.similarity)
assertEquals(0.2, request.style)
assertEquals(true, request.speakerBoost)
assertEquals(42L, request.seed)
assertEquals("auto", request.normalize)
assertEquals("en", request.language)
assertEquals("pcm_24000", request.outputFormat)
assertEquals(3, request.latencyTier)
}
@Test
fun fallsBackOnlyForUnavailableReasons() = runTest {
val client =
TalkSpeakClient(
requestDetailed = { _, _, _ ->
GatewaySession.RpcResult(
ok = false,
payloadJson = null,
error =
GatewaySession.ErrorShape(
code = "UNAVAILABLE",
message = "talk unavailable",
details =
GatewayConnectErrorDetails(
code = null,
canRetryWithDeviceToken = false,
recommendedNextStep = null,
reason = "talk_unconfigured",
),
),
)
},
)
val result = client.synthesize(text = "Hello", directive = null)
assertTrue(result is TalkSpeakResult.FallbackToLocal)
}
@Test
fun doesNotFallBackForSynthesisFailure() = runTest {
val client =
TalkSpeakClient(
requestDetailed = { _, _, _ ->
GatewaySession.RpcResult(
ok = false,
payloadJson = null,
error =
GatewaySession.ErrorShape(
code = "UNAVAILABLE",
message = "provider failed",
details =
GatewayConnectErrorDetails(
code = null,
canRetryWithDeviceToken = false,
recommendedNextStep = null,
reason = "synthesis_failed",
),
),
)
},
)
val result = client.synthesize(text = "Hello", directive = null)
assertTrue(result is TalkSpeakResult.Failure)
}
@Test
fun fallsBackWhenGatewayOmitsReason() = runTest {
val client =
TalkSpeakClient(
requestDetailed = { _, _, _ ->
GatewaySession.RpcResult(
ok = false,
payloadJson = null,
error =
GatewaySession.ErrorShape(
code = "INVALID_REQUEST",
message = "unknown method: talk.speak",
details = null,
),
)
},
)
val result = client.synthesize(text = "Hello", directive = null)
assertTrue(result is TalkSpeakResult.FallbackToLocal)
}
}

View File

@@ -1,8 +1,8 @@
// Shared iOS version defaults.
// Generated overrides live in build/Version.xcconfig (git-ignored).
OPENCLAW_GATEWAY_VERSION = 2026.4.3
OPENCLAW_MARKETING_VERSION = 2026.4.3
OPENCLAW_BUILD_VERSION = 2026040301
OPENCLAW_GATEWAY_VERSION = 2026.4.4
OPENCLAW_MARKETING_VERSION = 2026.4.4
OPENCLAW_BUILD_VERSION = 2026040401
#include? "../build/Version.xcconfig"

View File

@@ -1816,7 +1816,7 @@ private extension NodeAppModel {
return DeviceAuthStore.loadToken(deviceId: identity.deviceId, role: role) != nil
}
static func shouldStartOperatorGatewayLoop(
nonisolated static func shouldStartOperatorGatewayLoop(
token: String?,
bootstrapToken: String?,
password: String?,
@@ -1837,7 +1837,7 @@ private extension NodeAppModel {
return hasStoredOperatorToken
}
static func clearingBootstrapToken(in config: GatewayConnectConfig?) -> GatewayConnectConfig? {
nonisolated static func clearingBootstrapToken(in config: GatewayConnectConfig?) -> GatewayConnectConfig? {
guard let config else { return nil }
let trimmedBootstrapToken = config.bootstrapToken?
.trimmingCharacters(in: .whitespacesAndNewlines) ?? ""
@@ -1878,6 +1878,36 @@ private extension NodeAppModel {
GatewaySettingsStore.clearGatewayBootstrapToken(instanceId: trimmedInstanceId)
}
private func handleSuccessfulBootstrapGatewayOnboarding(
url: URL,
stableID: String,
token: String?,
password: String?,
nodeOptions: GatewayConnectOptions,
sessionBox: WebSocketSessionBox?) async
{
self.clearPersistedGatewayBootstrapTokenIfNeeded()
if self.operatorGatewayTask == nil && self.shouldStartOperatorGatewayLoop(
token: token,
bootstrapToken: nil,
password: password,
stableID: stableID)
{
self.startOperatorGatewayLoop(
url: url,
stableID: stableID,
token: token,
bootstrapToken: nil,
password: password,
nodeOptions: nodeOptions,
sessionBox: sessionBox)
}
// QR bootstrap onboarding should surface the system notification permission
// prompt immediately so visible APNs alerts work without a second manual step.
_ = await self.requestNotificationAuthorizationIfNeeded()
}
func refreshBackgroundReconnectSuppressionIfNeeded(source: String) {
guard self.isBackgrounded else { return }
guard !self.backgroundReconnectSuppressed else { return }
@@ -1927,17 +1957,20 @@ private extension NodeAppModel {
continue
}
let reconnectAuth = self.currentGatewayReconnectAuth(
fallbackToken: token,
fallbackBootstrapToken: bootstrapToken,
fallbackPassword: password)
let effectiveClientId =
GatewaySettingsStore.loadGatewayClientIdOverride(stableID: stableID) ?? nodeOptions.clientId
let operatorOptions = self.makeOperatorConnectOptions(
clientId: effectiveClientId,
displayName: nodeOptions.clientDisplayName)
displayName: nodeOptions.clientDisplayName,
includeApprovalScope: self.shouldRequestOperatorApprovalScope(
token: reconnectAuth.token,
password: reconnectAuth.password))
do {
let reconnectAuth = self.currentGatewayReconnectAuth(
fallbackToken: token,
fallbackBootstrapToken: bootstrapToken,
fallbackPassword: password)
try await self.operatorGateway.connect(
url: url,
token: reconnectAuth.token,
@@ -2049,13 +2082,14 @@ private extension NodeAppModel {
fallbackToken: token,
fallbackBootstrapToken: bootstrapToken,
fallbackPassword: password)
let connectedOptions = currentOptions
GatewayDiagnostics.log("connect attempt epochMs=\(epochMs) url=\(url.absoluteString)")
try await self.nodeGateway.connect(
url: url,
token: reconnectAuth.token,
bootstrapToken: reconnectAuth.bootstrapToken,
password: reconnectAuth.password,
connectOptions: currentOptions,
connectOptions: connectedOptions,
sessionBox: sessionBox,
onConnected: { [weak self] in
guard let self else { return }
@@ -2071,24 +2105,13 @@ private extension NodeAppModel {
reconnectAuth.bootstrapToken?.trimmingCharacters(in: .whitespacesAndNewlines)
.isEmpty == false
if usedBootstrapToken {
await MainActor.run {
self.clearPersistedGatewayBootstrapTokenIfNeeded()
if self.operatorGatewayTask == nil && self.shouldStartOperatorGatewayLoop(
token: reconnectAuth.token,
bootstrapToken: nil,
password: reconnectAuth.password,
stableID: stableID)
{
self.startOperatorGatewayLoop(
url: url,
stableID: stableID,
token: reconnectAuth.token,
bootstrapToken: nil,
password: reconnectAuth.password,
nodeOptions: currentOptions,
sessionBox: sessionBox)
}
}
await self.handleSuccessfulBootstrapGatewayOnboarding(
url: url,
stableID: stableID,
token: reconnectAuth.token,
password: reconnectAuth.password,
nodeOptions: connectedOptions,
sessionBox: sessionBox)
}
let relayData = await MainActor.run {
(
@@ -2246,10 +2269,47 @@ private extension NodeAppModel {
}
}
func makeOperatorConnectOptions(clientId: String, displayName: String?) -> GatewayConnectOptions {
GatewayConnectOptions(
func shouldRequestOperatorApprovalScope(token: String?, password: String?) -> Bool {
let identity = DeviceIdentityStore.loadOrCreate()
let storedOperatorScopes = DeviceAuthStore
.loadToken(deviceId: identity.deviceId, role: "operator")?
.scopes ?? []
return Self.shouldRequestOperatorApprovalScope(
token: token,
password: password,
storedOperatorScopes: storedOperatorScopes)
}
nonisolated static func shouldRequestOperatorApprovalScope(
token: String?,
password: String?,
storedOperatorScopes: [String]
) -> Bool {
let trimmedToken = token?.trimmingCharacters(in: .whitespacesAndNewlines) ?? ""
if !trimmedToken.isEmpty {
return true
}
let trimmedPassword = password?.trimmingCharacters(in: .whitespacesAndNewlines) ?? ""
if !trimmedPassword.isEmpty {
return true
}
return storedOperatorScopes.contains("operator.approvals")
}
func makeOperatorConnectOptions(
clientId: String,
displayName: String?,
includeApprovalScope: Bool
) -> GatewayConnectOptions {
var scopes = ["operator.read", "operator.write", "operator.talk.secrets"]
// Preserve reconnect compatibility for older paired operator tokens that were
// approved before iOS requested operator.approvals by default.
if includeApprovalScope {
scopes.append("operator.approvals")
}
return GatewayConnectOptions(
role: "operator",
scopes: ["operator.read", "operator.write", "operator.talk.secrets"],
scopes: scopes,
caps: [],
commands: [],
permissions: [:],
@@ -3137,11 +3197,22 @@ extension NodeAppModel {
await self.applyPendingForegroundNodeActions(mapped, trigger: "test")
}
func _test_makeOperatorConnectOptions(
clientId: String,
displayName: String?,
includeApprovalScope: Bool
) -> GatewayConnectOptions {
self.makeOperatorConnectOptions(
clientId: clientId,
displayName: displayName,
includeApprovalScope: includeApprovalScope)
}
static func _test_currentDeepLinkKey() -> String {
self.expectedDeepLinkKey()
}
static func _test_shouldStartOperatorGatewayLoop(
nonisolated static func _test_shouldStartOperatorGatewayLoop(
token: String?,
bootstrapToken: String?,
password: String?,
@@ -3154,6 +3225,41 @@ extension NodeAppModel {
hasStoredOperatorToken: hasStoredOperatorToken)
}
nonisolated static func _test_shouldRequestOperatorApprovalScope(
token: String?,
password: String?,
storedOperatorScopes: [String]
) -> Bool {
self.shouldRequestOperatorApprovalScope(
token: token,
password: password,
storedOperatorScopes: storedOperatorScopes)
}
nonisolated static func _test_clearingBootstrapToken(
in config: GatewayConnectConfig?
) -> GatewayConnectConfig? {
self.clearingBootstrapToken(in: config)
}
func _test_handleSuccessfulBootstrapGatewayOnboarding() async {
await self.handleSuccessfulBootstrapGatewayOnboarding(
url: URL(string: "wss://gateway.example")!,
stableID: "test-gateway",
token: nil,
password: nil,
nodeOptions: GatewayConnectOptions(
role: "node",
scopes: [],
caps: [],
commands: [],
permissions: [:],
clientId: "openclaw-ios",
clientMode: "node",
clientDisplayName: nil),
sessionBox: nil)
}
}
#endif
// swiftlint:enable type_body_length file_length

View File

@@ -70,6 +70,52 @@ import UIKit
}
}
@Test @MainActor func operatorConnectOptionsOnlyRequestApprovalScopeWhenEnabled() {
let appModel = NodeAppModel()
let withoutApprovalScope = appModel._test_makeOperatorConnectOptions(
clientId: "openclaw-ios",
displayName: "OpenClaw iOS",
includeApprovalScope: false)
let withApprovalScope = appModel._test_makeOperatorConnectOptions(
clientId: "openclaw-ios",
displayName: "OpenClaw iOS",
includeApprovalScope: true)
#expect(withoutApprovalScope.role == "operator")
#expect(withoutApprovalScope.scopes.contains("operator.read"))
#expect(withoutApprovalScope.scopes.contains("operator.write"))
#expect(!withoutApprovalScope.scopes.contains("operator.approvals"))
#expect(withoutApprovalScope.scopes.contains("operator.talk.secrets"))
#expect(withApprovalScope.scopes.contains("operator.approvals"))
}
@Test func operatorApprovalScopeRequestsStayBackwardCompatible() {
#expect(
!NodeAppModel._test_shouldRequestOperatorApprovalScope(
token: nil,
password: nil,
storedOperatorScopes: ["operator.read", "operator.write", "operator.talk.secrets"])
)
#expect(
NodeAppModel._test_shouldRequestOperatorApprovalScope(
token: nil,
password: nil,
storedOperatorScopes: [
"operator.approvals",
"operator.read",
"operator.write",
"operator.talk.secrets",
])
)
#expect(
NodeAppModel._test_shouldRequestOperatorApprovalScope(
token: "shared-token",
password: nil,
storedOperatorScopes: [])
)
}
@Test @MainActor func loadLastConnectionReadsSavedValues() {
let prior = KeychainStore.loadString(service: "ai.openclaw.gateway", account: "lastConnection")
defer {

View File

@@ -2,6 +2,7 @@ import OpenClawKit
import Foundation
import Testing
import UIKit
import UserNotifications
@testable import OpenClaw
private func makeAgentDeepLinkURL(
@@ -68,6 +69,28 @@ private final class MockWatchMessagingService: @preconcurrency WatchMessagingSer
}
}
private final class MockBootstrapNotificationCenter: NotificationCentering, @unchecked Sendable {
var status: NotificationAuthorizationStatus = .notDetermined
var requestAuthorizationResult = false
var requestAuthorizationCalls = 0
func authorizationStatus() async -> NotificationAuthorizationStatus {
self.status
}
func requestAuthorization(options _: UNAuthorizationOptions) async throws -> Bool {
self.requestAuthorizationCalls += 1
if self.requestAuthorizationResult {
self.status = .authorized
} else {
self.status = .denied
}
return self.requestAuthorizationResult
}
func add(_: UNNotificationRequest) async throws {}
}
@Suite(.serialized) struct NodeAppModelInvokeTests {
@Test @MainActor func decodeParamsFailsWithoutJSON() {
#expect(throws: Error.self) {
@@ -127,6 +150,15 @@ private final class MockWatchMessagingService: @preconcurrency WatchMessagingSer
)
}
@Test @MainActor func successfulBootstrapOnboardingRequestsNotificationAuthorization() async {
let center = MockBootstrapNotificationCenter()
let appModel = NodeAppModel(notificationCenter: center)
await appModel._test_handleSuccessfulBootstrapGatewayOnboarding()
#expect(center.requestAuthorizationCalls == 1)
}
@Test func clearingBootstrapTokenStripsReconnectConfigEvenWithoutPersistence() {
let config = GatewayConnectConfig(
url: URL(string: "wss://gateway.example")!,
@@ -145,7 +177,7 @@ private final class MockWatchMessagingService: @preconcurrency WatchMessagingSer
clientMode: "node",
clientDisplayName: nil))
let cleared = NodeAppModel.clearingBootstrapToken(in: config)
let cleared = NodeAppModel._test_clearingBootstrapToken(in: config)
#expect(cleared?.bootstrapToken == nil)
#expect(cleared?.url == config.url)
#expect(cleared?.stableID == config.stableID)

View File

@@ -15,9 +15,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2026.4.3</string>
<string>2026.4.4</string>
<key>CFBundleVersion</key>
<string>2026040301</string>
<string>2026040401</string>
<key>CFBundleIconFile</key>
<string>OpenClaw</string>
<key>CFBundleURLTypes</key>

View File

@@ -43,8 +43,8 @@ enum WideAreaGatewayDiscovery {
guard let statusJson = context.tailscaleStatus(),
!collectTailnetIPv4s(statusJson: statusJson).isEmpty,
let discovery = loadWideAreaPtrRecords(
remaining: remaining,
dig: context.dig)
remaining: remaining,
dig: context.dig)
else { return [] }
let domainTrimmed = discovery.domainTrimmed

View File

@@ -2019,6 +2019,7 @@ public struct TalkSpeakParams: Codable, Sendable {
public let modelid: String?
public let outputformat: String?
public let speed: Double?
public let ratewpm: Int?
public let stability: Double?
public let similarity: Double?
public let style: Double?
@@ -2026,6 +2027,7 @@ public struct TalkSpeakParams: Codable, Sendable {
public let seed: Int?
public let normalize: String?
public let language: String?
public let latencytier: Int?
public init(
text: String,
@@ -2033,19 +2035,22 @@ public struct TalkSpeakParams: Codable, Sendable {
modelid: String?,
outputformat: String?,
speed: Double?,
ratewpm: Int?,
stability: Double?,
similarity: Double?,
style: Double?,
speakerboost: Bool?,
seed: Int?,
normalize: String?,
language: String?)
language: String?,
latencytier: Int?)
{
self.text = text
self.voiceid = voiceid
self.modelid = modelid
self.outputformat = outputformat
self.speed = speed
self.ratewpm = ratewpm
self.stability = stability
self.similarity = similarity
self.style = style
@@ -2053,6 +2058,7 @@ public struct TalkSpeakParams: Codable, Sendable {
self.seed = seed
self.normalize = normalize
self.language = language
self.latencytier = latencytier
}
private enum CodingKeys: String, CodingKey {
@@ -2061,6 +2067,7 @@ public struct TalkSpeakParams: Codable, Sendable {
case modelid = "modelId"
case outputformat = "outputFormat"
case speed
case ratewpm = "rateWpm"
case stability
case similarity
case style
@@ -2068,6 +2075,7 @@ public struct TalkSpeakParams: Codable, Sendable {
case seed
case normalize
case language
case latencytier = "latencyTier"
}
}

View File

@@ -542,6 +542,77 @@ public actor GatewayChannelActor {
authSource: authSource)
}
private func shouldPersistBootstrapHandoffTokens() -> Bool {
guard self.lastAuthSource == .bootstrapToken else { return false }
let scheme = self.url.scheme?.lowercased()
if scheme == "wss" {
return true
}
if let host = self.url.host, LoopbackHost.isLoopback(host) {
return true
}
return false
}
private func filteredBootstrapHandoffScopes(role: String, scopes: [String]) -> [String]? {
let normalizedRole = role.trimmingCharacters(in: .whitespacesAndNewlines)
switch normalizedRole {
case "node":
return []
case "operator":
let allowedOperatorScopes: Set<String> = [
"operator.approvals",
"operator.read",
"operator.talk.secrets",
"operator.write",
]
return Array(Set(scopes.filter { allowedOperatorScopes.contains($0) })).sorted()
default:
return nil
}
}
private func persistBootstrapHandoffToken(
deviceId: String,
role: String,
token: String,
scopes: [String]
) {
guard let filteredScopes = self.filteredBootstrapHandoffScopes(role: role, scopes: scopes) else {
return
}
_ = DeviceAuthStore.storeToken(
deviceId: deviceId,
role: role,
token: token,
scopes: filteredScopes)
}
private func persistIssuedDeviceToken(
authSource: GatewayAuthSource,
deviceId: String,
role: String,
token: String,
scopes: [String]
) {
if authSource == .bootstrapToken {
guard self.shouldPersistBootstrapHandoffTokens() else {
return
}
self.persistBootstrapHandoffToken(
deviceId: deviceId,
role: role,
token: token,
scopes: scopes)
return
}
_ = DeviceAuthStore.storeToken(
deviceId: deviceId,
role: role,
token: token,
scopes: scopes)
}
private func handleConnectResponse(
_ res: ResponseFrame,
identity: DeviceIdentity?,
@@ -572,18 +643,37 @@ public actor GatewayChannelActor {
} else if let tick = ok.policy["tickIntervalMs"]?.value as? Int {
self.tickIntervalMs = Double(tick)
}
if let auth = ok.auth,
let deviceToken = auth["deviceToken"]?.value as? String {
let authRole = auth["role"]?.value as? String ?? role
let scopes = (auth["scopes"]?.value as? [ProtoAnyCodable])?
.compactMap { $0.value as? String } ?? []
if let identity {
_ = DeviceAuthStore.storeToken(
if let auth = ok.auth, let identity {
if let deviceToken = auth["deviceToken"]?.value as? String {
let authRole = auth["role"]?.value as? String ?? role
let scopes = (auth["scopes"]?.value as? [ProtoAnyCodable])?
.compactMap { $0.value as? String } ?? []
self.persistIssuedDeviceToken(
authSource: self.lastAuthSource,
deviceId: identity.deviceId,
role: authRole,
token: deviceToken,
scopes: scopes)
}
if self.shouldPersistBootstrapHandoffTokens(),
let tokenEntries = auth["deviceTokens"]?.value as? [ProtoAnyCodable]
{
for entry in tokenEntries {
guard let rawEntry = entry.value as? [String: ProtoAnyCodable],
let deviceToken = rawEntry["deviceToken"]?.value as? String,
let authRole = rawEntry["role"]?.value as? String
else {
continue
}
let scopes = (rawEntry["scopes"]?.value as? [ProtoAnyCodable])?
.compactMap { $0.value as? String } ?? []
self.persistBootstrapHandoffToken(
deviceId: identity.deviceId,
role: authRole,
token: deviceToken,
scopes: scopes)
}
}
}
self.lastTick = Date()
self.tickTask?.cancel()

View File

@@ -2019,6 +2019,7 @@ public struct TalkSpeakParams: Codable, Sendable {
public let modelid: String?
public let outputformat: String?
public let speed: Double?
public let ratewpm: Int?
public let stability: Double?
public let similarity: Double?
public let style: Double?
@@ -2026,6 +2027,7 @@ public struct TalkSpeakParams: Codable, Sendable {
public let seed: Int?
public let normalize: String?
public let language: String?
public let latencytier: Int?
public init(
text: String,
@@ -2033,19 +2035,22 @@ public struct TalkSpeakParams: Codable, Sendable {
modelid: String?,
outputformat: String?,
speed: Double?,
ratewpm: Int?,
stability: Double?,
similarity: Double?,
style: Double?,
speakerboost: Bool?,
seed: Int?,
normalize: String?,
language: String?)
language: String?,
latencytier: Int?)
{
self.text = text
self.voiceid = voiceid
self.modelid = modelid
self.outputformat = outputformat
self.speed = speed
self.ratewpm = ratewpm
self.stability = stability
self.similarity = similarity
self.style = style
@@ -2053,6 +2058,7 @@ public struct TalkSpeakParams: Codable, Sendable {
self.seed = seed
self.normalize = normalize
self.language = language
self.latencytier = latencytier
}
private enum CodingKeys: String, CodingKey {
@@ -2061,6 +2067,7 @@ public struct TalkSpeakParams: Codable, Sendable {
case modelid = "modelId"
case outputformat = "outputFormat"
case speed
case ratewpm = "rateWpm"
case stability
case similarity
case style
@@ -2068,6 +2075,7 @@ public struct TalkSpeakParams: Codable, Sendable {
case seed
case normalize
case language
case latencytier = "latencyTier"
}
}

View File

@@ -13,6 +13,7 @@ private extension NSLock {
private final class FakeGatewayWebSocketTask: WebSocketTasking, @unchecked Sendable {
private let lock = NSLock()
private let helloAuth: [String: Any]?
private var _state: URLSessionTask.State = .suspended
private var connectRequestId: String?
private var connectAuth: [String: Any]?
@@ -20,6 +21,10 @@ private final class FakeGatewayWebSocketTask: WebSocketTasking, @unchecked Senda
private var pendingReceiveHandler:
(@Sendable (Result<URLSessionWebSocketTask.Message, Error>) -> Void)?
init(helloAuth: [String: Any]? = nil) {
self.helloAuth = helloAuth
}
var state: URLSessionTask.State {
get { self.lock.withLock { self._state } }
set { self.lock.withLock { self._state = newValue } }
@@ -79,11 +84,11 @@ private final class FakeGatewayWebSocketTask: WebSocketTasking, @unchecked Senda
for _ in 0..<50 {
let id = self.lock.withLock { self.connectRequestId }
if let id {
return .data(Self.connectOkData(id: id))
return .data(Self.connectOkData(id: id, auth: self.helloAuth))
}
try await Task.sleep(nanoseconds: 1_000_000)
}
return .data(Self.connectOkData(id: "connect"))
return .data(Self.connectOkData(id: "connect", auth: self.helloAuth))
}
func receive(
@@ -110,8 +115,8 @@ private final class FakeGatewayWebSocketTask: WebSocketTasking, @unchecked Senda
return (try? JSONSerialization.data(withJSONObject: frame)) ?? Data()
}
private static func connectOkData(id: String) -> Data {
let payload: [String: Any] = [
private static func connectOkData(id: String, auth: [String: Any]? = nil) -> Data {
var payload: [String: Any] = [
"type": "hello-ok",
"protocol": 2,
"server": [
@@ -137,6 +142,9 @@ private final class FakeGatewayWebSocketTask: WebSocketTasking, @unchecked Senda
"tickIntervalMs": 30_000,
],
]
if let auth {
payload["auth"] = auth
}
let frame: [String: Any] = [
"type": "res",
"id": id,
@@ -149,9 +157,14 @@ private final class FakeGatewayWebSocketTask: WebSocketTasking, @unchecked Senda
private final class FakeGatewayWebSocketSession: WebSocketSessioning, @unchecked Sendable {
private let lock = NSLock()
private let helloAuth: [String: Any]?
private var tasks: [FakeGatewayWebSocketTask] = []
private var makeCount = 0
init(helloAuth: [String: Any]? = nil) {
self.helloAuth = helloAuth
}
func snapshotMakeCount() -> Int {
self.lock.withLock { self.makeCount }
}
@@ -164,7 +177,7 @@ private final class FakeGatewayWebSocketSession: WebSocketSessioning, @unchecked
_ = url
return self.lock.withLock {
self.makeCount += 1
let task = FakeGatewayWebSocketTask()
let task = FakeGatewayWebSocketTask(helloAuth: self.helloAuth)
self.tasks.append(task)
return WebSocketTaskBox(task: task)
}
@@ -177,6 +190,7 @@ private actor SeqGapProbe {
func value() -> Bool { self.saw }
}
@Suite(.serialized)
struct GatewayNodeSessionTests {
@Test
func scannedSetupCodePrefersBootstrapAuthOverStoredDeviceToken() async throws {
@@ -234,6 +248,210 @@ struct GatewayNodeSessionTests {
await gateway.disconnect()
}
@Test
func bootstrapHelloStoresAdditionalDeviceTokens() async throws {
let tempDir = FileManager.default.temporaryDirectory
.appendingPathComponent(UUID().uuidString, isDirectory: true)
try FileManager.default.createDirectory(at: tempDir, withIntermediateDirectories: true)
let previousStateDir = ProcessInfo.processInfo.environment["OPENCLAW_STATE_DIR"]
setenv("OPENCLAW_STATE_DIR", tempDir.path, 1)
defer {
if let previousStateDir {
setenv("OPENCLAW_STATE_DIR", previousStateDir, 1)
} else {
unsetenv("OPENCLAW_STATE_DIR")
}
try? FileManager.default.removeItem(at: tempDir)
}
let identity = DeviceIdentityStore.loadOrCreate()
let session = FakeGatewayWebSocketSession(helloAuth: [
"deviceToken": "node-device-token",
"role": "node",
"scopes": [],
"issuedAtMs": 1000,
"deviceTokens": [
[
"deviceToken": "operator-device-token",
"role": "operator",
"scopes": [
"node.exec",
"operator.admin",
"operator.approvals",
"operator.pairing",
"operator.read",
"operator.talk.secrets",
"operator.write",
],
"issuedAtMs": 1001,
],
],
])
let gateway = GatewayNodeSession()
let options = GatewayConnectOptions(
role: "node",
scopes: [],
caps: [],
commands: [],
permissions: [:],
clientId: "openclaw-ios-test",
clientMode: "node",
clientDisplayName: "iOS Test",
includeDeviceIdentity: true)
try await gateway.connect(
url: URL(string: "wss://example.invalid")!,
token: nil,
bootstrapToken: "fresh-bootstrap-token",
password: nil,
connectOptions: options,
sessionBox: WebSocketSessionBox(session: session),
onConnected: {},
onDisconnected: { _ in },
onInvoke: { req in
BridgeInvokeResponse(id: req.id, ok: true, payloadJSON: nil, error: nil)
})
let nodeEntry = try #require(DeviceAuthStore.loadToken(deviceId: identity.deviceId, role: "node"))
let operatorEntry = try #require(DeviceAuthStore.loadToken(deviceId: identity.deviceId, role: "operator"))
#expect(nodeEntry.token == "node-device-token")
#expect(nodeEntry.scopes == [])
#expect(operatorEntry.token == "operator-device-token")
#expect(operatorEntry.scopes == [
"operator.approvals",
"operator.read",
"operator.talk.secrets",
"operator.write",
])
await gateway.disconnect()
}
@Test
func nonBootstrapHelloStoresPrimaryDeviceTokenButNotAdditionalBootstrapTokens() async throws {
let tempDir = FileManager.default.temporaryDirectory
.appendingPathComponent(UUID().uuidString, isDirectory: true)
try FileManager.default.createDirectory(at: tempDir, withIntermediateDirectories: true)
let previousStateDir = ProcessInfo.processInfo.environment["OPENCLAW_STATE_DIR"]
setenv("OPENCLAW_STATE_DIR", tempDir.path, 1)
defer {
if let previousStateDir {
setenv("OPENCLAW_STATE_DIR", previousStateDir, 1)
} else {
unsetenv("OPENCLAW_STATE_DIR")
}
try? FileManager.default.removeItem(at: tempDir)
}
let identity = DeviceIdentityStore.loadOrCreate()
let session = FakeGatewayWebSocketSession(helloAuth: [
"deviceToken": "server-node-token",
"role": "node",
"scopes": [],
"deviceTokens": [
[
"deviceToken": "server-operator-token",
"role": "operator",
"scopes": ["operator.admin"],
],
],
])
let gateway = GatewayNodeSession()
let options = GatewayConnectOptions(
role: "node",
scopes: [],
caps: [],
commands: [],
permissions: [:],
clientId: "openclaw-ios-test",
clientMode: "node",
clientDisplayName: "iOS Test",
includeDeviceIdentity: true)
try await gateway.connect(
url: URL(string: "wss://example.invalid")!,
token: "shared-token",
bootstrapToken: nil,
password: nil,
connectOptions: options,
sessionBox: WebSocketSessionBox(session: session),
onConnected: {},
onDisconnected: { _ in },
onInvoke: { req in
BridgeInvokeResponse(id: req.id, ok: true, payloadJSON: nil, error: nil)
})
let nodeEntry = try #require(DeviceAuthStore.loadToken(deviceId: identity.deviceId, role: "node"))
#expect(nodeEntry.token == "server-node-token")
#expect(nodeEntry.scopes == [])
#expect(DeviceAuthStore.loadToken(deviceId: identity.deviceId, role: "operator") == nil)
await gateway.disconnect()
}
@Test
func untrustedBootstrapHelloDoesNotPersistBootstrapHandoffTokens() async throws {
let tempDir = FileManager.default.temporaryDirectory
.appendingPathComponent(UUID().uuidString, isDirectory: true)
try FileManager.default.createDirectory(at: tempDir, withIntermediateDirectories: true)
let previousStateDir = ProcessInfo.processInfo.environment["OPENCLAW_STATE_DIR"]
setenv("OPENCLAW_STATE_DIR", tempDir.path, 1)
defer {
if let previousStateDir {
setenv("OPENCLAW_STATE_DIR", previousStateDir, 1)
} else {
unsetenv("OPENCLAW_STATE_DIR")
}
try? FileManager.default.removeItem(at: tempDir)
}
let identity = DeviceIdentityStore.loadOrCreate()
let session = FakeGatewayWebSocketSession(helloAuth: [
"deviceToken": "untrusted-node-token",
"role": "node",
"scopes": [],
"deviceTokens": [
[
"deviceToken": "untrusted-operator-token",
"role": "operator",
"scopes": [
"operator.approvals",
"operator.read",
],
],
],
])
let gateway = GatewayNodeSession()
let options = GatewayConnectOptions(
role: "node",
scopes: [],
caps: [],
commands: [],
permissions: [:],
clientId: "openclaw-ios-test",
clientMode: "node",
clientDisplayName: "iOS Test",
includeDeviceIdentity: true)
try await gateway.connect(
url: URL(string: "ws://example.invalid")!,
token: nil,
bootstrapToken: "fresh-bootstrap-token",
password: nil,
connectOptions: options,
sessionBox: WebSocketSessionBox(session: session),
onConnected: {},
onDisconnected: { _ in },
onInvoke: { req in
BridgeInvokeResponse(id: req.id, ok: true, payloadJSON: nil, error: nil)
})
#expect(DeviceAuthStore.loadToken(deviceId: identity.deviceId, role: "node") == nil)
#expect(DeviceAuthStore.loadToken(deviceId: identity.deviceId, role: "operator") == nil)
await gateway.disconnect()
}
@Test
func normalizeCanvasHostUrlPreservesExplicitSecureCanvasPort() {
let normalized = canonicalizeCanvasHostUrl(

View File

@@ -1,6 +1,7 @@
import XCTest
@testable import OpenClawKit
@MainActor
final class TalkSystemSpeechSynthesizerTests: XCTestCase {
func testWatchdogTimeoutDefaultsToLatinProfile() {
let timeout = TalkSystemSpeechSynthesizer.watchdogTimeoutSeconds(

View File

@@ -1,14 +1,21 @@
# Generated Docs Artifacts
These baseline artifacts are generated from the repo-owned OpenClaw config schema and bundled channel/plugin metadata.
SHA-256 hash files are the tracked drift-detection artifacts. The full JSON
baselines are generated locally (gitignored) for inspection only.
- Do not edit `config-baseline.json` by hand.
- Do not edit `config-baseline.core.json` by hand.
- Do not edit `config-baseline.channel.json` by hand.
- Do not edit `config-baseline.plugin.json` by hand.
- Do not edit `plugin-sdk-api-baseline.json` by hand.
- Do not edit `plugin-sdk-api-baseline.jsonl` by hand.
- Regenerate config baseline artifacts with `pnpm config:docs:gen`.
- Validate config baseline artifacts in CI or locally with `pnpm config:docs:check`.
- Regenerate Plugin SDK API baseline artifacts with `pnpm plugin-sdk:api:gen`.
- Validate Plugin SDK API baseline artifacts in CI or locally with `pnpm plugin-sdk:api:check`.
**Tracked (committed to git):**
- `config-baseline.sha256` — hashes of config baseline JSON artifacts.
- `plugin-sdk-api-baseline.sha256` — hashes of Plugin SDK API baseline artifacts.
**Local only (gitignored):**
- `config-baseline.json`, `config-baseline.core.json`, `config-baseline.channel.json`, `config-baseline.plugin.json`
- `plugin-sdk-api-baseline.json`, `plugin-sdk-api-baseline.jsonl`
Do not edit any of these files by hand.
- Regenerate config baseline: `pnpm config:docs:gen`
- Validate config baseline: `pnpm config:docs:check`
- Regenerate Plugin SDK API baseline: `pnpm plugin-sdk:api:gen`
- Validate Plugin SDK API baseline: `pnpm plugin-sdk:api:check`

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,4 @@
20a882f9991e17310013471756ac7ec62c272e29490daeede9c0901bd51c0e69 config-baseline.json
8ba6e5c959d5fc3eee9e6c5d1d8f764f164052f4207c0352bb39e2a7dbad64a8 config-baseline.core.json
ca6d1fa8a3507566979ea2da2b88a6a7ae49d650f3ebd3eee14a22ed18e5be89 config-baseline.channel.json
17fd37605bf6cb087932ec2ebcfa9dd22e669fa6b8b93081ab2deac9d24821c5 config-baseline.plugin.json

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
cbffdf76d6a7254d8b2d3a601e1206d7b6c835bc44f170d4038bc711a35ef756 plugin-sdk-api-baseline.json
fe026bf3ba1e3b55f6c0b560d76940f3c301d8f593d6f0f6dcc4625745c76d31 plugin-sdk-api-baseline.jsonl

View File

@@ -47,6 +47,38 @@
"source": "Quick Start",
"target": "快速开始"
},
{
"source": "Chutes",
"target": "Chutes"
},
{
"source": "Qwen",
"target": "Qwen"
},
{
"source": "Feishu",
"target": "Feishu"
},
{
"source": "Mattermost",
"target": "Mattermost"
},
{
"source": "BytePlus (International)",
"target": "BytePlus国际版"
},
{
"source": "Anthropic (API + Claude CLI)",
"target": "AnthropicAPI + Claude CLI"
},
{
"source": "Moonshot AI",
"target": "Moonshot AI"
},
{
"source": "Additional bundled variants",
"target": "其他内置变体"
},
{
"source": "Diffs",
"target": "Diffs"
@@ -143,6 +175,10 @@
"source": "Network model",
"target": "网络模型"
},
{
"source": "Bridge protocol (legacy nodes, historical)",
"target": "Bridge protocol旧版节点历史参考"
},
{
"source": "Doctor",
"target": "Doctor"
@@ -151,6 +187,10 @@
"source": "Polls",
"target": "投票"
},
{
"source": "QQ Bot",
"target": "QQ Bot"
},
{
"source": "Release Policy",
"target": "发布策略"
@@ -199,6 +239,14 @@
"source": "CLI",
"target": "CLI"
},
{
"source": "/cli/gateway",
"target": "/cli/gateway"
},
{
"source": "/gateway#multiple-gateways-same-host",
"target": "/gateway#multiple-gateways-same-host"
},
{
"source": "install sanity",
"target": "安装完整性检查"

View File

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#111827" aria-hidden="true">
<path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/>
</svg>

After

Width:  |  Height:  |  Size: 829 B

View File

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#fff" aria-hidden="true">
<path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/>
</svg>

After

Width:  |  Height:  |  Size: 826 B

View File

@@ -17,13 +17,15 @@ This document defines the canonical credential eligibility and resolution semant
The goal is to keep selection-time and runtime behavior aligned.
## Stable Reason Codes
## Stable Probe Reason Codes
- `ok`
- `excluded_by_auth_order`
- `missing_credential`
- `invalid_expires`
- `expired`
- `unresolved_ref`
- `no_model`
## Token Credentials
@@ -44,6 +46,24 @@ Token credentials (`type: "token"`) support inline `token` and/or `tokenRef`.
2. For eligible profiles, token material may be resolved from inline value or `tokenRef`.
3. Unresolvable refs produce `unresolved_ref` in `models status --probe` output.
## Explicit Auth Order Filtering
- When `auth.order.<provider>` or the auth-store order override is set for a
provider, `models status --probe` only probes profile ids that remain in the
resolved auth order for that provider.
- A stored profile for that provider that is omitted from the explicit order is
not silently tried later. Probe output reports it with
`reasonCode: excluded_by_auth_order` and the detail
`Excluded by auth.order for this provider.`
## Probe Target Resolution
- Probe targets can come from auth profiles, environment credentials, or
`models.json`.
- If a provider has credentials but OpenClaw cannot resolve a probeable model
candidate for it, `models status --probe` reports `status: no_model` with
`reasonCode: no_model`.
## OAuth SecretRef Policy Guard
- SecretRef input is for static credentials only.

View File

@@ -36,6 +36,17 @@ openclaw cron runs --id <job-id>
- Jobs persist at `~/.openclaw/cron/jobs.json` so restarts do not lose schedules.
- All cron executions create [background task](/automation/tasks) records.
- One-shot jobs (`--at`) auto-delete after success by default.
- Isolated cron runs best-effort close tracked browser tabs/processes for their `cron:<jobId>` session when the run completes, so detached browser automation does not leave orphaned processes behind.
- Isolated cron runs also guard against stale acknowledgement replies. If the
first result is just an interim status update (`on it`, `pulling everything
together`, and similar hints) and no descendant subagent run is still
responsible for the final answer, OpenClaw re-prompts once for the actual
result before delivery.
Task reconciliation for cron is runtime-owned: an active cron task stays live while the
cron runtime still tracks that job as running, even if an old child session row still exists.
Once the runtime stops owning the job and the 5-minute grace window expires, maintenance can
mark the task `lost`.
## Schedule types
@@ -60,6 +71,12 @@ Recurring top-of-hour expressions are automatically staggered by up to 5 minutes
**Main session** jobs enqueue a system event and optionally wake the heartbeat (`--wake now` or `--wake next-heartbeat`). **Isolated** jobs run a dedicated agent turn with a fresh session. **Custom sessions** (`session:xxx`) persist context across runs, enabling workflows like daily standups that build on previous summaries.
For isolated jobs, runtime teardown now includes best-effort browser cleanup for that cron session. Cleanup failures are ignored so the actual cron result still wins.
When isolated cron runs orchestrate subagents, delivery also prefers the final
descendant output over stale parent interim text. If descendants are still
running, OpenClaw suppresses that partial parent update instead of announcing it.
### Payload options for isolated jobs
- `--message`: prompt text (required for isolated)
@@ -67,6 +84,29 @@ Recurring top-of-hour expressions are automatically staggered by up to 5 minutes
- `--light-context`: skip workspace bootstrap file injection
- `--tools exec,read`: restrict which tools the job can use
`--model` uses the selected allowed model for that job. If the requested model
is not allowed, cron logs a warning and falls back to the job's agent/default
model selection instead. Configured fallback chains still apply, but a plain
model override with no explicit per-job fallback list no longer appends the
agent primary as a hidden extra retry target.
Model-selection precedence for isolated jobs is:
1. Gmail hook model override (when the run came from Gmail and that override is allowed)
2. Per-job payload `model`
3. Stored cron session model override
4. Agent/default model selection
Fast mode follows the resolved live selection too. If the selected model config
has `params.fastMode`, isolated cron uses that by default. A stored session
`fastMode` override still wins over config in either direction.
If an isolated run hits a live model-switch handoff, cron retries with the
switched provider/model and persists that live selection before retrying. When
the switch also carries a new auth profile, cron persists that auth profile
override too. Retries are bounded: after the initial attempt plus 2 switch
retries, cron aborts instead of looping forever.
## Delivery and output
| Mode | What happens |
@@ -77,6 +117,22 @@ Recurring top-of-hour expressions are automatically staggered by up to 5 minutes
Use `--announce --channel telegram --to "-1001234567890"` for channel delivery. For Telegram forum topics, use `-1001234567890:topic:123`. Slack/Discord/Mattermost targets should use explicit prefixes (`channel:<id>`, `user:<id>`).
For cron-owned isolated jobs, the runner owns the final delivery path. The
agent is prompted to return a plain-text summary, and that summary is then sent
through `announce`, `webhook`, or kept internal for `none`. `--no-deliver`
does not hand delivery back to the agent; it keeps the run internal.
If the original task explicitly says to message some external recipient, the
agent should note who/where that message should go in its output instead of
trying to send it directly.
Failure notifications follow a separate destination path:
- `cron.failureDestination` sets a global default for failure notifications.
- `job.delivery.failureDestination` overrides that per job.
- If neither is set and the job already delivers via `announce`, failure notifications now fall back to that primary announce target.
- `delivery.failureDestination` is only supported on `sessionTarget="isolated"` jobs unless the primary delivery mode is `webhook`.
## CLI examples
One-shot reminder (main session):
@@ -163,7 +219,7 @@ Run an isolated agent turn:
curl -X POST http://127.0.0.1:18789/hooks/agent \
-H 'Authorization: Bearer SECRET' \
-H 'Content-Type: application/json' \
-d '{"message":"Summarize inbox","name":"Email","model":"openai/gpt-5.2-mini"}'
-d '{"message":"Summarize inbox","name":"Email","model":"openai/gpt-5.4-mini"}'
```
Fields: `message` (required), `name`, `agentId`, `wakeMode`, `deliver`, `channel`, `to`, `model`, `thinking`, `timeoutSeconds`.
@@ -176,8 +232,10 @@ Custom hook names are resolved via `hooks.mappings` in config. Mappings can tran
- Keep hook endpoints behind loopback, tailnet, or trusted reverse proxy.
- Use a dedicated hook token; do not reuse gateway auth tokens.
- Keep `hooks.path` on a dedicated subpath; `/` is rejected.
- Set `hooks.allowedAgentIds` to limit explicit `agentId` routing.
- Keep `hooks.allowRequestSessionKey=false` unless you require caller-selected sessions.
- If you enable `hooks.allowRequestSessionKey`, also set `hooks.allowedSessionKeyPrefixes` to constrain allowed session key shapes.
- Hook payloads are wrapped with safety boundaries by default.
## Gmail PubSub integration
@@ -265,6 +323,17 @@ openclaw cron add --name "Ops sweep" --cron "0 6 * * *" --session isolated --mes
openclaw cron edit <jobId> --clear-agent
```
Model override note:
- `openclaw cron add|edit --model ...` changes the job's selected model.
- If the model is allowed, that exact provider/model reaches the isolated agent
run.
- If it is not allowed, cron warns and falls back to the job's agent/default
model selection.
- Configured fallback chains still apply, but a plain `--model` override with
no explicit per-job fallback list no longer falls through to the agent
primary as a silent extra retry target.
## Configuration
```json5
@@ -313,13 +382,19 @@ openclaw doctor
- Check `cron.enabled` and `OPENCLAW_SKIP_CRON` env var.
- Confirm the Gateway is running continuously.
- For `cron` schedules, verify timezone (`--tz`) vs the host timezone.
- `reason: not-due` in run output means manual run called without `--force`.
- `reason: not-due` in run output means manual run was checked with `openclaw cron run <jobId> --due` and the job was not due yet.
### Cron fired but no delivery
- Delivery mode is `none` means no external message is expected.
- Delivery target missing/invalid (`channel`/`to`) means outbound was skipped.
- Channel auth errors (`unauthorized`, `Forbidden`) mean delivery was blocked by credentials.
- If the isolated run returns only the silent token (`NO_REPLY` / `no_reply`),
OpenClaw suppresses direct outbound delivery and also suppresses the fallback
queued summary path, so nothing is posted back to chat.
- For cron-owned isolated jobs, do not expect the agent to use the message tool
as a fallback. The runner owns final delivery; `--no-deliver` keeps it
internal instead of allowing a direct send.
### Timezone gotchas

View File

@@ -91,7 +91,7 @@ See [Hooks](/automation/hooks).
### Heartbeat
Heartbeat is a periodic main-session turn (default every 30 minutes). It batches multiple checks (inbox, calendar, notifications) in one agent turn with full session context. Heartbeat turns do not create task records. Use `HEARTBEAT.md` to define what the agent checks.
Heartbeat is a periodic main-session turn (default every 30 minutes). It batches multiple checks (inbox, calendar, notifications) in one agent turn with full session context. Heartbeat turns do not create task records. Use `HEARTBEAT.md` for a small checklist, or a `tasks:` block when you want due-only periodic checks inside heartbeat itself. Empty heartbeat files skip as `empty-heartbeat-file`; due-only task mode skips as `no-tasks-due`.
See [Heartbeat](/gateway/heartbeat).

View File

@@ -25,6 +25,14 @@ Not every agent run creates a task. Heartbeat turns and normal interactive chat
- Tasks are **records**, not schedulers — cron and heartbeat decide _when_ work runs, tasks track _what happened_.
- ACP, subagents, all cron jobs, and CLI operations create tasks. Heartbeat turns do not.
- Each task moves through `queued → running → terminal` (succeeded, failed, timed_out, cancelled, or lost).
- Cron tasks stay live while the cron runtime still owns the job; chat-backed CLI tasks stay live only while their owning run context is still active.
- Completion is push-driven: detached work can notify directly or wake the
requester session/heartbeat when it finishes, so status polling loops are
usually the wrong shape.
- Isolated cron runs and subagent completions best-effort clean up tracked browser tabs/processes for their child session before final cleanup bookkeeping.
- Isolated cron delivery suppresses stale interim parent replies while
descendant subagent work is still draining, and it prefers final descendant
output when that arrives before delivery.
- Completion notifications are delivered directly to a channel or queued for the next heartbeat.
- `openclaw tasks list` shows all tasks; `openclaw tasks audit` surfaces issues.
- Terminal records are kept for 7 days, then automatically pruned.
@@ -50,6 +58,15 @@ openclaw tasks notify <lookup> state_changes
# Run a health audit
openclaw tasks audit
# Preview or apply maintenance
openclaw tasks maintenance
openclaw tasks maintenance --apply
# Inspect TaskFlow state
openclaw tasks flow list
openclaw tasks flow show <lookup>
openclaw tasks flow cancel <lookup>
```
## What creates a task
@@ -91,15 +108,22 @@ stateDiagram-v2
| `failed` | Completed with an error |
| `timed_out` | Exceeded the configured timeout |
| `cancelled` | Stopped by the operator via `openclaw tasks cancel` |
| `lost` | Backing child session disappeared (detected after a 5-minute grace period) |
| `lost` | The runtime lost authoritative backing state after a 5-minute grace period |
Transitions happen automatically — when the associated agent run ends, the task status updates to match.
`lost` is runtime-aware:
- ACP tasks: backing ACP child session metadata disappeared.
- Subagent tasks: backing child session disappeared from the target agent store.
- Cron tasks: the cron runtime no longer tracks the job as active.
- CLI tasks: isolated child-session tasks use the child session; chat-backed CLI tasks use the live run context instead, so lingering channel/group/direct session rows do not keep them alive.
## Delivery and notifications
When a task reaches a terminal state, OpenClaw notifies you. There are two delivery paths:
**Direct delivery** — if the task has a channel target (the `requesterOrigin`), the completion message goes straight to that channel (Telegram, Discord, Slack, etc.).
**Direct delivery** — if the task has a channel target (the `requesterOrigin`), the completion message goes straight to that channel (Telegram, Discord, Slack, etc.). For subagent completions, OpenClaw also preserves bound thread/topic routing when available and can fill a missing `to` / account from the requester session's stored route (`lastChannel` / `lastTo` / `lastAccountId`) before giving up on direct delivery.
**Session-queued delivery** — if direct delivery fails or no origin is set, the update is queued as a system event in the requester's session and surfaces on the next heartbeat.
@@ -107,6 +131,10 @@ When a task reaches a terminal state, OpenClaw notifies you. There are two deliv
Task completion triggers an immediate heartbeat wake so you see the result quickly — you do not have to wait for the next scheduled heartbeat tick.
</Tip>
That means the usual workflow is push-based: start detached work once, then let
the runtime wake or notify you on completion. Poll task state only when you
need debugging, intervention, or an explicit audit.
### Notification policies
Control how much you hear about each task:
@@ -167,11 +195,47 @@ Surfaces operational issues. Findings also appear in `openclaw status` when issu
| ------------------------- | -------- | ----------------------------------------------------- |
| `stale_queued` | warn | Queued for more than 10 minutes |
| `stale_running` | error | Running for more than 30 minutes |
| `lost` | error | Backing session is gone |
| `lost` | error | Runtime-backed task ownership disappeared |
| `delivery_failed` | warn | Delivery failed and notify policy is not `silent` |
| `missing_cleanup` | warn | Terminal task with no cleanup timestamp |
| `inconsistent_timestamps` | warn | Timeline violation (for example ended before started) |
### `tasks maintenance`
```bash
openclaw tasks maintenance [--json]
openclaw tasks maintenance --apply [--json]
```
Use this to preview or apply reconciliation, cleanup stamping, and pruning for
tasks and Task Flow state.
Reconciliation is runtime-aware:
- ACP/subagent tasks check their backing child session.
- Cron tasks check whether the cron runtime still owns the job.
- Chat-backed CLI tasks check the owning live run context, not just the chat session row.
Completion cleanup is also runtime-aware:
- Subagent completion best-effort closes tracked browser tabs/processes for the child session before announce cleanup continues.
- Isolated cron completion best-effort closes tracked browser tabs/processes for the cron session before the run fully tears down.
- Isolated cron delivery waits out descendant subagent follow-up when needed and
suppresses stale parent acknowledgement text instead of announcing it.
- Subagent completion delivery prefers the latest visible assistant text; if that is empty it falls back to sanitized latest tool/toolResult text, and timeout-only tool-call runs can collapse to a short partial-progress summary.
- Cleanup failures do not mask the real task outcome.
### `tasks flow list|show|cancel`
```bash
openclaw tasks flow list [--status <status>] [--json]
openclaw tasks flow show <lookup> [--json]
openclaw tasks flow cancel <lookup>
```
Use these when the orchestrating Task Flow is the thing you care about rather
than one individual background task record.
## Chat task board (`/tasks`)
Use `/tasks` in any chat session to see background tasks linked to that session. The board shows
@@ -216,7 +280,7 @@ The registry loads into memory at gateway start and syncs writes to SQLite for d
A sweeper runs every **60 seconds** and handles three things:
1. **Reconciliation** — checks if active tasks' backing sessions still exist. If a child session has been gone for more than 5 minutes, the task is marked `lost`.
1. **Reconciliation** — checks whether active tasks still have authoritative runtime backing. ACP/subagent tasks use child-session state, cron tasks use active-job ownership, and chat-backed CLI tasks use the owning run context. If that backing state is gone for more than 5 minutes, the task is marked `lost`.
2. **Cleanup stamping** — sets a `cleanupAfter` timestamp on terminal tasks (endedAt + 7 days).
3. **Pruning** — deletes records past their `cleanupAfter` date.

View File

@@ -26,6 +26,7 @@ OpenClaw supports Brave Search API as a `web_search` provider.
config: {
webSearch: {
apiKey: "BRAVE_API_KEY_HERE",
mode: "web", // or "llm-context"
},
},
},
@@ -46,6 +47,11 @@ OpenClaw supports Brave Search API as a `web_search` provider.
Provider-specific Brave search settings now live under `plugins.entries.brave.config.webSearch.*`.
Legacy `tools.web.search.apiKey` still loads through the compatibility shim, but it is no longer the canonical config path.
`webSearch.mode` controls the Brave transport:
- `web` (default): normal Brave web search with titles, URLs, and snippets
- `llm-context`: Brave LLM Context API with pre-extracted text chunks and sources for grounding
## Tool parameters
| Parameter | Description |
@@ -54,6 +60,7 @@ Legacy `tools.web.search.apiKey` still loads through the compatibility shim, but
| `count` | Number of results to return (1-10, default: 5) |
| `country` | 2-letter ISO country code (e.g., "US", "DE") |
| `language` | ISO 639-1 language code for search results (e.g., "en", "de", "fr") |
| `search_lang` | Brave search-language code (e.g., `en`, `en-gb`, `zh-hans`) |
| `ui_lang` | ISO language code for UI elements |
| `freshness` | Time filter: `day` (24h), `week`, `month`, or `year` |
| `date_after` | Only results published after this date (YYYY-MM-DD) |
@@ -88,6 +95,9 @@ await web_search({
- OpenClaw uses the Brave **Search** plan. If you have a legacy subscription (e.g. the original Free plan with 2,000 queries/month), it remains valid but does not include newer features like LLM Context or higher rate limits.
- Each Brave plan includes **\$5/month in free credit** (renewing). The Search plan costs \$5 per 1,000 requests, so the credit covers 1,000 queries/month. Set your usage limit in the Brave dashboard to avoid unexpected charges. See the [Brave API portal](https://brave.com/search/api/) for current plans.
- The Search plan includes the LLM Context endpoint and AI inference rights. Storing results to train or tune models requires a plan with explicit storage rights. See the Brave [Terms of Service](https://api-dashboard.search.brave.com/terms-of-service).
- `llm-context` mode returns grounded source entries instead of the normal web-search snippet shape.
- `llm-context` mode does not support `ui_lang`, `freshness`, `date_after`, or `date_before`.
- `ui_lang` must include a region subtag like `en-US`.
- Results are cached for 15 minutes by default (configurable via `cacheTtlMinutes`).
See [Web tools](/tools/web) for the full web_search configuration.

View File

@@ -11,6 +11,11 @@ title: "BlueBubbles"
Status: bundled plugin that talks to the BlueBubbles macOS server over HTTP. **Recommended for iMessage integration** due to its richer API and easier setup compared to the legacy imsg channel.
## Bundled plugin
Current OpenClaw releases bundle BlueBubbles, so normal packaged builds do not
need a separate `openclaw plugins install` step.
## Overview
- Runs on macOS via the BlueBubbles helper app ([bluebubbles.app](https://bluebubbles.app)).
@@ -404,9 +409,9 @@ Prefer `chat_guid` for stable routing:
## Security
- Webhook requests are authenticated by comparing `guid`/`password` query params or headers against `channels.bluebubbles.password`. Requests from `localhost` are also accepted.
- Webhook requests are authenticated by comparing `guid`/`password` query params or headers against `channels.bluebubbles.password`.
- Keep the API password and webhook endpoint secret (treat them like credentials).
- Localhost trust means a same-host reverse proxy can unintentionally bypass the password. If you proxy the gateway, require auth at the proxy and configure `gateway.trustedProxies`. See [Gateway security](/gateway/security#reverse-proxy-configuration).
- There is no localhost bypass for BlueBubbles webhook auth. If you proxy webhook traffic, keep the BlueBubbles password on the request end-to-end. `gateway.trustedProxies` does not replace `channels.bluebubbles.password` here. See [Gateway security](/gateway/security#reverse-proxy-configuration).
- Enable HTTPS + firewall rules on the BlueBubbles server if exposing it outside your LAN.
## Troubleshooting

View File

@@ -944,21 +944,24 @@ Default slash command settings:
</Accordion>
<Accordion title="Exec approvals in Discord">
Discord supports button-based exec approvals in DMs and can optionally post approval prompts in the originating channel.
<Accordion title="Approvals in Discord">
Discord supports button-based approval handling in DMs and can optionally post approval prompts in the originating channel.
Config path:
- `channels.discord.execApprovals.enabled`
- `channels.discord.execApprovals.approvers` (optional; falls back to owner IDs inferred from `allowFrom` and explicit DM `defaultTo` when possible)
- `channels.discord.execApprovals.approvers` (optional; falls back to `commands.ownerAllowFrom` when possible)
- `channels.discord.execApprovals.target` (`dm` | `channel` | `both`, default: `dm`)
- `agentFilter`, `sessionFilter`, `cleanupAfterResolve`
Discord 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 the account's existing owner config (`allowFrom`, legacy `dm.allowFrom`, or explicit DM `defaultTo`). Set `enabled: false` to disable Discord as a native approval client explicitly.
Discord 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 `commands.ownerAllowFrom`. Discord does not infer exec approvers from channel `allowFrom`, legacy `dm.allowFrom`, or direct-message `defaultTo`. Set `enabled: false` to disable Discord as a native approval client explicitly.
When `target` is `channel` or `both`, the approval prompt is visible in the channel. Only resolved approvers can use the buttons; other users receive an ephemeral denial. Approval prompts include the command text, so only enable channel delivery in trusted channels. If the channel ID cannot be derived from the session key, OpenClaw falls back to DM delivery.
Discord also renders the shared approval buttons used by other chat channels. The native Discord adapter mainly adds approver DM routing and channel fanout.
When those buttons are present, they are the primary approval UX; OpenClaw
should only include a manual `/approve` command when the tool result says
chat approvals are unavailable or manual approval is the only path.
Gateway auth for this handler uses the same shared credential resolution contract as other Gateway clients:
@@ -967,7 +970,16 @@ Default slash command settings:
- remote-mode support via `gateway.remote.*` when applicable
- URL overrides are override-safe: CLI overrides do not reuse implicit credentials, and env overrides use env credentials only
Exec approvals expire after 30 minutes by default. If approvals fail with unknown approval IDs, verify approver resolution and feature enablement.
Approval resolution behavior:
- IDs prefixed with `plugin:` resolve through `plugin.approval.resolve`.
- Other IDs resolve through `exec.approval.resolve`.
- Discord does not do an extra exec-to-plugin fallback hop here; the id
prefix decides which gateway method it calls.
Exec approvals expire after 30 minutes by default. If approvals fail with
unknown approval IDs, verify approver resolution, feature enablement, and
that the delivered approval id kind matches the pending request.
Related docs: [Exec approvals](/tools/exec-approvals)

View File

@@ -764,7 +764,8 @@ When the agent handles a Drive comment event, it receives:
- the comment thread context for in-thread replies
After making document edits, the agent is guided to use `feishu_drive.reply_comment` to notify the
commenter and then output `NO_REPLY` to avoid duplicate sends.
commenter and then output the exact silent token `NO_REPLY` / `no_reply` to
avoid duplicate sends.
## Runtime action surface

View File

@@ -13,7 +13,7 @@ Note: `agents.list[].groupChat.mentionPatterns` is now used by Telegram/Discord/
## Current implementation (2025-12-03)
- Activation modes: `mention` (default) or `always`. `mention` requires a ping (real WhatsApp @-mentions via `mentionedJids`, safe regex patterns, or the bots E.164 anywhere in the text). `always` wakes the agent on every message but it should reply only when it can add meaningful value; otherwise it returns the silent token `NO_REPLY`. Defaults can be set in config (`channels.whatsapp.groups`) and overridden per group via `/activation`. When `channels.whatsapp.groups` is set, it also acts as a group allowlist (include `"*"` to allow all).
- Activation modes: `mention` (default) or `always`. `mention` requires a ping (real WhatsApp @-mentions via `mentionedJids`, safe regex patterns, or the bots E.164 anywhere in the text). `always` wakes the agent on every message but it should reply only when it can add meaningful value; otherwise it returns the exact silent token `NO_REPLY` / `no_reply`. Defaults can be set in config (`channels.whatsapp.groups`) and overridden per group via `/activation`. When `channels.whatsapp.groups` is set, it also acts as a group allowlist (include `"*"` to allow all).
- Group policy: `channels.whatsapp.groupPolicy` controls whether group messages are accepted (`open|disabled|allowlist`). `allowlist` uses `channels.whatsapp.groupAllowFrom` (fallback: explicit `channels.whatsapp.allowFrom`). Default is `allowlist` (blocked until you add senders).
- Per-group sessions: session keys look like `agent:<agentId>:whatsapp:group:<jid>` so commands such as `/verbose on` or `/think high` (sent as standalone messages) are scoped to that group; personal DM state is untouched. Heartbeats are skipped for group threads.
- Context injection: **pending-only** group messages (default 50) that _did not_ trigger a run are prefixed under `[Chat messages since your last reply - for context]`, with the triggering line under `[Current message - respond to this]`. Messages already in the session are not re-injected.

View File

@@ -13,31 +13,31 @@ Text is supported everywhere; media and reactions vary by channel.
## Supported channels
- [BlueBubbles](/channels/bluebubbles) — **Recommended for iMessage**; uses the BlueBubbles macOS server REST API with full feature support (edit, unsend, effects, reactions, group management — edit currently broken on macOS 26 Tahoe).
- [BlueBubbles](/channels/bluebubbles) — **Recommended for iMessage**; uses the BlueBubbles macOS server REST API with full feature support (bundled plugin; edit, unsend, effects, reactions, group management — edit currently broken on macOS 26 Tahoe).
- [Discord](/channels/discord) — Discord Bot API + Gateway; supports servers, channels, and DMs.
- [Feishu](/channels/feishu) — Feishu/Lark bot via WebSocket (plugin, installed separately).
- [Feishu](/channels/feishu) — Feishu/Lark bot via WebSocket (bundled plugin).
- [Google Chat](/channels/googlechat) — Google Chat API app via HTTP webhook.
- [iMessage (legacy)](/channels/imessage) — Legacy macOS integration via imsg CLI (deprecated, use BlueBubbles for new setups).
- [IRC](/channels/irc) — Classic IRC servers; channels + DMs with pairing/allowlist controls.
- [LINE](/channels/line) — LINE Messaging API bot (plugin, installed separately).
- [Matrix](/channels/matrix) — Matrix protocol (plugin, installed separately).
- [Mattermost](/channels/mattermost) — Bot API + WebSocket; channels, groups, DMs (plugin, installed separately).
- [Microsoft Teams](/channels/msteams) — Bot Framework; enterprise support (plugin, installed separately).
- [Nextcloud Talk](/channels/nextcloud-talk) — Self-hosted chat via Nextcloud Talk (plugin, installed separately).
- [Nostr](/channels/nostr) — Decentralized DMs via NIP-04 (plugin, installed separately).
- [QQ Bot](/channels/qqbot) — QQ Bot API; private chat, group chat, and rich media.
- [LINE](/channels/line) — LINE Messaging API bot (bundled plugin).
- [Matrix](/channels/matrix) — Matrix protocol (bundled plugin).
- [Mattermost](/channels/mattermost) — Bot API + WebSocket; channels, groups, DMs (bundled plugin).
- [Microsoft Teams](/channels/msteams) — Bot Framework; enterprise support (bundled plugin).
- [Nextcloud Talk](/channels/nextcloud-talk) — Self-hosted chat via Nextcloud Talk (bundled plugin).
- [Nostr](/channels/nostr) — Decentralized DMs via NIP-04 (bundled plugin).
- [QQ Bot](/channels/qqbot) — QQ Bot API; private chat, group chat, and rich media (bundled plugin).
- [Signal](/channels/signal) — signal-cli; privacy-focused.
- [Slack](/channels/slack) — Bolt SDK; workspace apps.
- [Synology Chat](/channels/synology-chat) — Synology NAS Chat via outgoing+incoming webhooks (plugin, installed separately).
- [Synology Chat](/channels/synology-chat) — Synology NAS Chat via outgoing+incoming webhooks (bundled plugin).
- [Telegram](/channels/telegram) — Bot API via grammY; supports groups.
- [Tlon](/channels/tlon) — Urbit-based messenger (plugin, installed separately).
- [Twitch](/channels/twitch) — Twitch chat via IRC connection (plugin, installed separately).
- [Tlon](/channels/tlon) — Urbit-based messenger (bundled plugin).
- [Twitch](/channels/twitch) — Twitch chat via IRC connection (bundled plugin).
- [Voice Call](/plugins/voice-call) — Telephony via Plivo or Twilio (plugin, installed separately).
- [WebChat](/web/webchat) — Gateway WebChat UI over WebSocket.
- [WeChat](https://www.npmjs.com/package/@tencent-weixin/openclaw-weixin) — Tencent iLink Bot plugin via QR login; private chats only.
- [WhatsApp](/channels/whatsapp) — Most popular; uses Baileys and requires QR pairing.
- [Zalo](/channels/zalo) — Zalo Bot API; Vietnam's popular messenger (plugin, installed separately).
- [Zalo Personal](/channels/zalouser) — Zalo personal account via QR login (plugin, installed separately).
- [Zalo](/channels/zalo) — Zalo Bot API; Vietnam's popular messenger (bundled plugin).
- [Zalo Personal](/channels/zalouser) — Zalo personal account via QR login (bundled plugin).
## Notes

View File

@@ -7,19 +7,23 @@ read_when:
title: LINE
---
# LINE (plugin)
# LINE
LINE connects to OpenClaw via the LINE Messaging API. The plugin runs as a webhook
receiver on the gateway and uses your channel access token + channel secret for
authentication.
Status: supported via plugin. Direct messages, group chats, media, locations, Flex
Status: bundled plugin. Direct messages, group chats, media, locations, Flex
messages, template messages, and quick replies are supported. Reactions and threads
are not supported.
## Plugin required
## Bundled plugin
Install the LINE plugin:
LINE ships as a bundled plugin in current OpenClaw releases, so normal
packaged builds do not need a separate install.
If you are on an older build or a custom install that excludes LINE, install it
manually:
```bash
openclaw plugins install @openclaw/line

View File

@@ -6,14 +6,18 @@ read_when:
title: "Matrix"
---
# Matrix (plugin)
# Matrix
Matrix is the Matrix channel plugin for OpenClaw.
Matrix is the Matrix bundled channel plugin for OpenClaw.
It uses the official `matrix-js-sdk` and supports DMs, rooms, threads, media, reactions, polls, location, and E2EE.
## Plugin required
## Bundled plugin
Matrix is a plugin and is not bundled with core OpenClaw.
Matrix ships as a bundled plugin in current OpenClaw releases, so normal
packaged builds do not need a separate install.
If you are on an older build or a custom install that excludes Matrix, install
it manually:
Install from npm:
@@ -31,7 +35,9 @@ See [Plugins](/tools/plugin) for plugin behavior and install rules.
## Setup
1. Install the plugin.
1. Ensure the Matrix plugin is available.
- Current packaged OpenClaw releases already bundle it.
- Older/custom installs can add it manually with the commands above.
2. Create a Matrix account on your homeserver.
3. Configure `channels.matrix` with either:
- `homeserver` + `accessToken`, or
@@ -319,7 +325,9 @@ Verbose restore diagnostics:
openclaw matrix verify backup restore --verbose
```
Delete the current server backup and create a fresh backup baseline:
Delete the current server backup and create a fresh backup baseline. If the stored
backup key cannot be loaded cleanly, this reset can also recreate secret storage so
future cold starts can load the new backup key:
```bash
openclaw matrix verify backup reset --yes
@@ -366,8 +374,11 @@ If the homeserver requires interactive auth to upload cross-signing keys, OpenCl
Use `--force-reset-cross-signing` only when you intentionally want to discard the current cross-signing identity and create a new one.
If you intentionally want to discard the current room-key backup and start a new backup baseline for future messages, use `openclaw matrix verify backup reset --yes`.
Do this only when you accept that unrecoverable old encrypted history will stay unavailable.
If you intentionally want to discard the current room-key backup and start a new
backup baseline for future messages, use `openclaw matrix verify backup reset --yes`.
Do this only when you accept that unrecoverable old encrypted history will stay
unavailable and that OpenClaw may recreate secret storage if the current backup
secret cannot be loaded safely.
### Fresh backup baseline
@@ -656,6 +667,12 @@ Matrix can act as an exec approval client for a Matrix account.
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.
Native Matrix routing is exec-only today:
- `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.
Delivery rules:
- `target: "dm"` sends approval prompts to approver DMs
@@ -666,7 +683,7 @@ Matrix uses text approval prompts today. Approvers resolve them with `/approve <
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 surface is transport only: room/DM routing and message send/update/delete behavior.
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.
Per-account override:
@@ -708,6 +725,7 @@ Top-level `channels.matrix` values act as defaults for named accounts unless an
You can scope inherited room entries to one Matrix account with `groups.<room>.account` (or legacy `rooms.<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.
Set `defaultAccount` when you want OpenClaw to prefer one named Matrix account for implicit routing, probing, and CLI operations.
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.

View File

@@ -6,15 +6,19 @@ read_when:
title: "Mattermost"
---
# Mattermost (plugin)
# Mattermost
Status: supported via plugin (bot token + WebSocket events). Channels, groups, and DMs are supported.
Status: bundled plugin (bot token + WebSocket events). Channels, groups, and DMs are supported.
Mattermost is a self-hostable team messaging platform; see the official site at
[mattermost.com](https://mattermost.com) for product details and downloads.
## Plugin required
## Bundled plugin
Mattermost ships as a plugin and is not bundled with the core install.
Mattermost ships as a bundled plugin in current OpenClaw releases, so normal
packaged builds do not need a separate install.
If you are on an older build or a custom install that excludes Mattermost,
install it manually:
Install via CLI (npm registry):
@@ -28,14 +32,13 @@ Local checkout (when running from a git repo):
openclaw plugins install ./path/to/local/mattermost-plugin
```
If you choose Mattermost during setup and a git checkout is detected,
OpenClaw will offer the local install path automatically.
Details: [Plugins](/tools/plugin)
## Quick setup
1. Install the Mattermost plugin.
1. Ensure the Mattermost plugin is available.
- Current packaged OpenClaw releases already bundle it.
- Older/custom installs can add it manually with the commands above.
2. Create a Mattermost bot account and copy the **bot token**.
3. Copy the Mattermost **base URL** (e.g., `https://chat.example.com`).
4. Configure OpenClaw and start the gateway.
@@ -82,7 +85,10 @@ Notes:
- If `callbackUrl` is omitted, OpenClaw derives one from gateway host/port + `callbackPath`.
- For multi-account setups, `commands` can be set at the top level or under
`channels.mattermost.accounts.<id>.commands` (account values override top-level fields).
- Command callbacks are validated with per-command tokens and fail closed when token checks fail.
- Command callbacks are validated with the per-command tokens returned by
Mattermost when OpenClaw registers `oc_*` commands.
- Slash callbacks fail closed when registration failed, startup was partial, or
the callback token does not match one of the registered commands.
- Reachability requirement: the callback endpoint must be reachable from the Mattermost server.
- Do not set `callbackUrl` to `localhost` unless Mattermost runs on the same host/network namespace as OpenClaw.
- Do not set `callbackUrl` to your Mattermost base URL unless that URL reverse-proxies `/api/channels/mattermost/command` to OpenClaw.
@@ -170,10 +176,28 @@ Notes:
- Default: `channels.mattermost.groupPolicy = "allowlist"` (mention-gated).
- Allowlist senders with `channels.mattermost.groupAllowFrom` (user IDs recommended).
- Per-channel mention overrides live under `channels.mattermost.groups.<channelId>.requireMention`
or `channels.mattermost.groups["*"].requireMention` for a default.
- `@username` matching is mutable and only enabled when `channels.mattermost.dangerouslyAllowNameMatching: true`.
- Open channels: `channels.mattermost.groupPolicy="open"` (mention-gated).
- Runtime note: if `channels.mattermost` is completely missing, runtime falls back to `groupPolicy="allowlist"` for group checks (even if `channels.defaults.groupPolicy` is set).
Example:
```json5
{
channels: {
mattermost: {
groupPolicy: "open",
groups: {
"*": { requireMention: true },
"team-channel-id": { requireMention: false },
},
},
},
}
```
## Targets for outbound delivery
Use these target formats with `openclaw message send` or cron/webhooks:
@@ -418,6 +442,19 @@ Mattermost supports multiple accounts under `channels.mattermost.accounts`:
- No replies in channels: ensure the bot is in the channel and mention it (oncall), use a trigger prefix (onchar), or set `chatmode: "onmessage"`.
- Auth errors: check the bot token, base URL, and whether the account is enabled.
- Multi-account issues: env vars only apply to the `default` account.
- Native slash commands return `Unauthorized: invalid command token.`: OpenClaw
did not accept the callback token. Typical causes:
- slash command registration failed or only partially completed at startup
- the callback is hitting the wrong gateway/account
- Mattermost still has old commands pointing at a previous callback target
- the gateway restarted without reactivating slash commands
- If native slash commands stop working, check logs for
`mattermost: failed to register slash commands` or
`mattermost: native slash commands enabled but no commands could be registered`.
- If `callbackUrl` is omitted and logs warn that the callback resolved to
`http://127.0.0.1:18789/...`, that URL is probably only reachable when
Mattermost runs on the same host/network namespace as OpenClaw. Set an
explicit externally reachable `commands.callbackUrl` instead.
- Buttons appear as white boxes: the agent may be sending malformed button data. Check that each button has both `text` and `callback_data` fields.
- Buttons render but clicks do nothing: verify `AllowedUntrustedInternalConnections` in Mattermost server config includes `127.0.0.1 localhost`, and that `EnablePostActionIntegration` is `true` in ServiceSettings.
- Buttons return 404 on click: the button `id` likely contains hyphens or underscores. Mattermost's action router breaks on non-alphanumeric IDs. Use `[a-zA-Z0-9]` only.

View File

@@ -5,7 +5,7 @@ read_when:
title: "Microsoft Teams"
---
# Microsoft Teams (plugin)
# Microsoft Teams
> "Abandon all hope, ye who enter here."
@@ -13,15 +13,13 @@ Updated: 2026-01-21
Status: text + DM attachments are supported; channel/group file sending requires `sharePointSiteId` + Graph permissions (see [Sending files in group chats](#sending-files-in-group-chats)). Polls are sent via Adaptive Cards. Message actions expose explicit `upload-file` for file-first sends.
## Plugin required
## Bundled plugin
Microsoft Teams ships as a plugin and is not bundled with the core install.
Microsoft Teams ships as a bundled plugin in current OpenClaw releases, so no
separate install is required in the normal packaged build.
**Breaking change (2026.1.15):** Microsoft Teams moved out of core. If you use it, you must install the plugin.
Explainable: keeps core installs lighter and lets Microsoft Teams dependencies update independently.
Install via CLI (npm registry):
If you are on an older build or a custom install that excludes bundled Teams,
install it manually:
```bash
openclaw plugins install @openclaw/msteams
@@ -33,14 +31,13 @@ Local checkout (when running from a git repo):
openclaw plugins install ./path/to/local/msteams-plugin
```
If you choose Teams during setup and a git checkout is detected,
OpenClaw will offer the local install path automatically.
Details: [Plugins](/tools/plugin)
## Quick setup (beginner)
1. Install the Microsoft Teams plugin.
1. Ensure the Microsoft Teams plugin is available.
- Current packaged OpenClaw releases already bundle it.
- Older/custom installs can add it manually with the commands above.
2. Create an **Azure Bot** (App ID + client secret + tenant ID).
3. Configure OpenClaw with those credentials.
4. Expose `/api/messages` (port 3978 by default) via a public URL or tunnel.
@@ -141,7 +138,9 @@ Example:
## How it works
1. Install the Microsoft Teams plugin.
1. Ensure the Microsoft Teams plugin is available.
- Current packaged OpenClaw releases already bundle it.
- Older/custom installs can add it manually with the commands above.
2. Create an **Azure Bot** (App ID + secret + tenant ID).
3. Build a **Teams app package** that references the bot and includes the RSC permissions below.
4. Upload/install the Teams app into a team (or personal scope for DMs).
@@ -240,9 +239,11 @@ This is often easier than hand-editing JSON manifests.
## Setup (minimal text-only)
1. **Install the Microsoft Teams plugin**
- From npm: `openclaw plugins install @openclaw/msteams`
- From a local checkout: `openclaw plugins install ./path/to/local/msteams-plugin`
1. **Ensure the Microsoft Teams plugin is available**
- Current packaged OpenClaw releases already bundle it.
- Older/custom installs can add it manually:
- From npm: `openclaw plugins install @openclaw/msteams`
- From a local checkout: `openclaw plugins install ./path/to/local/msteams-plugin`
2. **Bot registration**
- Create an Azure Bot (see above) and note:
@@ -284,7 +285,7 @@ This is often easier than hand-editing JSON manifests.
- `https://<host>:3978/api/messages` (or your chosen path/port).
6. **Run the gateway**
- The Teams channel starts automatically when the plugin is installed and `msteams` config exists with credentials.
- The Teams channel starts automatically when the bundled or manually installed plugin is available and `msteams` config exists with credentials.
## Member info action

View File

@@ -5,13 +5,17 @@ read_when:
title: "Nextcloud Talk"
---
# Nextcloud Talk (plugin)
# Nextcloud Talk
Status: supported via plugin (webhook bot). Direct messages, rooms, reactions, and markdown messages are supported.
Status: bundled plugin (webhook bot). Direct messages, rooms, reactions, and markdown messages are supported.
## Plugin required
## Bundled plugin
Nextcloud Talk ships as a plugin and is not bundled with the core install.
Nextcloud Talk ships as a bundled plugin in current OpenClaw releases, so
normal packaged builds do not need a separate install.
If you are on an older build or a custom install that excludes Nextcloud Talk,
install it manually:
Install via CLI (npm registry):
@@ -25,14 +29,13 @@ Local checkout (when running from a git repo):
openclaw plugins install ./path/to/local/nextcloud-talk-plugin
```
If you choose Nextcloud Talk during setup and a git checkout is detected,
OpenClaw will offer the local install path automatically.
Details: [Plugins](/tools/plugin)
## Quick setup (beginner)
1. Install the Nextcloud Talk plugin.
1. Ensure the Nextcloud Talk plugin is available.
- Current packaged OpenClaw releases already bundle it.
- Older/custom installs can add it manually with the commands above.
2. On your Nextcloud server, create a bot:
```bash

View File

@@ -8,25 +8,20 @@ title: "Nostr"
# Nostr
**Status:** Optional plugin (disabled by default).
**Status:** Optional bundled plugin (disabled by default until configured).
Nostr is a decentralized protocol for social networking. This channel enables OpenClaw to receive and respond to encrypted direct messages (DMs) via NIP-04.
## Install (on demand)
## Bundled plugin
### Onboarding (recommended)
Current OpenClaw releases ship Nostr as a bundled plugin, so normal packaged
builds do not need a separate install.
- Onboarding (`openclaw onboard`) and `openclaw channels add` list optional channel plugins.
- Selecting Nostr prompts you to install the plugin on demand.
### Older/custom installs
Install defaults:
- **Dev channel + git checkout available:** uses the local plugin path.
- **Stable/Beta:** downloads from npm.
You can always override the choice in the prompt.
### Manual install
- Onboarding (`openclaw onboard`) and `openclaw channels add` still surface
Nostr from the shared channel catalog.
- If your build excludes bundled Nostr, install it manually.
```bash
openclaw plugins install @openclaw/nostr

View File

@@ -77,6 +77,15 @@ The setup code is a base64-encoded JSON payload that contains:
- `url`: the Gateway WebSocket URL (`ws://...` or `wss://...`)
- `bootstrapToken`: a short-lived single-device bootstrap token used for the initial pairing handshake
That bootstrap token carries the built-in pairing bootstrap profile:
- primary handed-off `node` token stays `scopes: []`
- any handed-off `operator` token stays bounded to the bootstrap allowlist:
`operator.approvals`, `operator.read`, `operator.talk.secrets`, `operator.write`
- bootstrap scope checks are role-prefixed, not one flat scope pool:
operator scope entries only satisfy operator requests, and non-operator roles
must still request scopes under their own role prefix
Treat the setup code like a password while it is valid.
### Approve a node device
@@ -100,8 +109,11 @@ Stored under `~/.openclaw/devices/`:
### Notes
- The legacy `node.pair.*` API (CLI: `openclaw nodes pending/approve`) is a
- The legacy `node.pair.*` API (CLI: `openclaw nodes pending|approve|reject|rename`) is a
separate gateway-owned pairing store. WS nodes still require device pairing.
- The pairing record is the durable source of truth for approved roles. Active
device tokens stay bounded to that approved role set; a stray token entry
outside the approved roles does not create new access.
## Related docs

View File

@@ -0,0 +1,99 @@
---
title: "QA Channel"
summary: "Synthetic Slack-class channel plugin for deterministic OpenClaw QA scenarios"
read_when:
- You are wiring the synthetic QA transport into a local or CI test run
- You need the bundled qa-channel config surface
- You are iterating on end-to-end QA automation
---
# QA Channel
`qa-channel` is a bundled synthetic message transport for automated OpenClaw QA.
It is not a production channel. It exists to exercise the same channel plugin
boundary used by real transports while keeping state deterministic and fully
inspectable.
## What it does today
- Slack-class target grammar:
- `dm:<user>`
- `channel:<room>`
- `thread:<room>/<thread>`
- HTTP-backed synthetic bus for:
- inbound message injection
- outbound transcript capture
- thread creation
- reactions
- edits
- deletes
- search and read actions
- Bundled host-side self-check runner that writes a Markdown report
## Config
```json
{
"channels": {
"qa-channel": {
"baseUrl": "http://127.0.0.1:43123",
"botUserId": "openclaw",
"botDisplayName": "OpenClaw QA",
"allowFrom": ["*"],
"pollTimeoutMs": 1000
}
}
}
```
Supported account keys:
- `baseUrl`
- `botUserId`
- `botDisplayName`
- `pollTimeoutMs`
- `allowFrom`
- `defaultTo`
- `actions.messages`
- `actions.reactions`
- `actions.search`
- `actions.threads`
## Runner
Current vertical slice:
```bash
pnpm qa:e2e
```
This now routes through the bundled `qa-lab` extension. It starts the in-repo
QA bus, boots the bundled `qa-channel` runtime slice, runs a deterministic
self-check, and writes a Markdown report under `.artifacts/qa-e2e/`.
Private debugger UI:
```bash
pnpm qa:lab:build
pnpm openclaw qa ui
```
That launches the private QA debugger at a local URL, separate from the
shipped Control UI bundle.
## Scope
Current scope is intentionally narrow:
- bus + plugin transport
- threaded routing grammar
- channel-owned message actions
- Markdown reporting
Follow-up work will add:
- Dockerized OpenClaw orchestration
- provider/model matrix execution
- richer scenario discovery
- OpenClaw-native orchestration later

View File

@@ -13,13 +13,13 @@ QQ Bot connects to OpenClaw via the official QQ Bot API (WebSocket gateway). The
plugin supports C2C private chat, group @messages, and guild channel messages with
rich media (images, voice, video, files).
Status: bundled channel plugin. Direct messages, group chats, guild channels, and
Status: bundled plugin. Direct messages, group chats, guild channels, and
media are supported. Reactions and threads are not supported.
## Bundled with OpenClaw
## Bundled plugin
Current OpenClaw installs bundle QQ Bot. You do not need a separate
`openclaw plugins install` step for normal setup.
Current OpenClaw releases bundle QQ Bot, so normal packaged builds do not need
a separate `openclaw plugins install` step.
## Setup

View File

@@ -142,7 +142,7 @@ signal-cli -a +<BOT_PHONE_NUMBER> verify <VERIFICATION_CODE>
```bash
# If you run the gateway as a user systemd service:
systemctl --user restart openclaw-gateway
systemctl --user restart openclaw-gateway.service
# Then verify:
openclaw doctor

View File

@@ -120,275 +120,6 @@ openclaw gateway
</Tab>
</Tabs>
## Token model
- `botToken` + `appToken` are required for Socket Mode.
- HTTP mode requires `botToken` + `signingSecret`.
- Config tokens override env fallback.
- `SLACK_BOT_TOKEN` / `SLACK_APP_TOKEN` env fallback applies only to the default account.
- `userToken` (`xoxp-...`) is config-only (no env fallback) and defaults to read-only behavior (`userTokenReadOnly: true`).
- Optional: add `chat:write.customize` if you want outgoing messages to use the active agent identity (custom `username` and icon). `icon_emoji` uses `:emoji_name:` syntax.
<Tip>
For actions/directory reads, user token can be preferred when configured. For writes, bot token remains preferred; user-token writes are only allowed when `userTokenReadOnly: false` and bot token is unavailable.
</Tip>
## Access control and routing
<Tabs>
<Tab title="DM policy">
`channels.slack.dmPolicy` controls DM access (legacy: `channels.slack.dm.policy`):
- `pairing` (default)
- `allowlist`
- `open` (requires `channels.slack.allowFrom` to include `"*"`; legacy: `channels.slack.dm.allowFrom`)
- `disabled`
DM flags:
- `dm.enabled` (default true)
- `channels.slack.allowFrom` (preferred)
- `dm.allowFrom` (legacy)
- `dm.groupEnabled` (group DMs default false)
- `dm.groupChannels` (optional MPIM allowlist)
Multi-account precedence:
- `channels.slack.accounts.default.allowFrom` applies only to the `default` account.
- Named accounts inherit `channels.slack.allowFrom` when their own `allowFrom` is unset.
- Named accounts do not inherit `channels.slack.accounts.default.allowFrom`.
Pairing in DMs uses `openclaw pairing approve slack <code>`.
</Tab>
<Tab title="Channel policy">
`channels.slack.groupPolicy` controls channel handling:
- `open`
- `allowlist`
- `disabled`
Channel allowlist lives under `channels.slack.channels` and should use stable channel IDs.
Runtime note: if `channels.slack` is completely missing (env-only setup), runtime falls back to `groupPolicy="allowlist"` and logs a warning (even if `channels.defaults.groupPolicy` is set).
Name/ID resolution:
- channel allowlist entries and DM allowlist entries are resolved at startup when token access allows
- unresolved channel-name entries are kept as configured but ignored for routing by default
- inbound authorization and channel routing are ID-first by default; direct username/slug matching requires `channels.slack.dangerouslyAllowNameMatching: true`
</Tab>
<Tab title="Mentions and channel users">
Channel messages are mention-gated by default.
Mention sources:
- explicit app mention (`<@botId>`)
- mention regex patterns (`agents.list[].groupChat.mentionPatterns`, fallback `messages.groupChat.mentionPatterns`)
- implicit reply-to-bot thread behavior
Per-channel controls (`channels.slack.channels.<id>`; names only via startup resolution or `dangerouslyAllowNameMatching`):
- `requireMention`
- `users` (allowlist)
- `allowBots`
- `skills`
- `systemPrompt`
- `tools`, `toolsBySender`
- `toolsBySender` key format: `id:`, `e164:`, `username:`, `name:`, or `"*"` wildcard
(legacy unprefixed keys still map to `id:` only)
</Tab>
</Tabs>
## Commands and slash behavior
- Native command auto-mode is **off** for Slack (`commands.native: "auto"` does not enable Slack native commands).
- Enable native Slack command handlers with `channels.slack.commands.native: true` (or global `commands.native: true`).
- When native commands are enabled, register matching slash commands in Slack (`/<command>` names), with one exception:
- register `/agentstatus` for the status command (Slack reserves `/status`)
- If native commands are not enabled, you can run a single configured slash command via `channels.slack.slashCommand`.
- Native arg menus now adapt their rendering strategy:
- up to 5 options: button blocks
- 6-100 options: static select menu
- more than 100 options: external select with async option filtering when interactivity options handlers are available
- if encoded option values exceed Slack limits, the flow falls back to buttons
- For long option payloads, Slash command argument menus use a confirm dialog before dispatching a selected value.
## Interactive replies
Slack can render agent-authored interactive reply controls, but this feature is disabled by default.
Enable it globally:
```json5
{
channels: {
slack: {
capabilities: {
interactiveReplies: true,
},
},
},
}
```
Or enable it for one Slack account only:
```json5
{
channels: {
slack: {
accounts: {
ops: {
capabilities: {
interactiveReplies: true,
},
},
},
},
},
}
```
When enabled, agents can emit Slack-only reply directives:
- `[[slack_buttons: Approve:approve, Reject:reject]]`
- `[[slack_select: Choose a target | Canary:canary, Production:production]]`
These directives compile into Slack Block Kit and route clicks or selections back through the existing Slack interaction event path.
Notes:
- This is Slack-specific UI. Other channels do not translate Slack Block Kit directives into their own button systems.
- The interactive callback values are OpenClaw-generated opaque tokens, not raw agent-authored values.
- If generated interactive blocks would exceed Slack Block Kit limits, OpenClaw falls back to the original text reply instead of sending an invalid blocks payload.
Default slash command settings:
- `enabled: false`
- `name: "openclaw"`
- `sessionPrefix: "slack:slash"`
- `ephemeral: true`
Slash sessions use isolated keys:
- `agent:<agentId>:slack:slash:<userId>`
and still route command execution against the target conversation session (`CommandTargetSessionKey`).
## Threading, sessions, and reply tags
- DMs route as `direct`; channels as `channel`; MPIMs as `group`.
- With default `session.dmScope=main`, Slack DMs collapse to agent main session.
- Channel sessions: `agent:<agentId>:slack:channel:<channelId>`.
- 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).
Reply threading controls:
- `channels.slack.replyToMode`: `off|first|all` (default `off`)
- `channels.slack.replyToModeByChatType`: per `direct|group|channel`
- legacy fallback for direct chats: `channels.slack.dm.replyToMode`
Manual reply tags are supported:
- `[[reply_to_current]]`
- `[[reply_to:<id>]]`
Note: `replyToMode="off"` disables **all** reply threading in Slack, including explicit `[[reply_to_*]]` tags. This differs from Telegram, where explicit tags are still honored in `"off"` mode. The difference reflects the platform threading models: Slack threads hide messages from the channel, while Telegram replies remain visible in the main chat flow.
## Media, chunking, and delivery
<AccordionGroup>
<Accordion title="Inbound attachments">
Slack file attachments are downloaded from Slack-hosted private URLs (token-authenticated request flow) and written to the media store when fetch succeeds and size limits permit.
Runtime inbound size cap defaults to `20MB` unless overridden by `channels.slack.mediaMaxMb`.
</Accordion>
<Accordion title="Outbound text and files">
- text chunks use `channels.slack.textChunkLimit` (default 4000)
- `channels.slack.chunkMode="newline"` enables paragraph-first splitting
- file sends use Slack upload APIs and can include thread replies (`thread_ts`)
- outbound media cap follows `channels.slack.mediaMaxMb` when configured; otherwise channel sends use MIME-kind defaults from media pipeline
</Accordion>
<Accordion title="Delivery targets">
Preferred explicit targets:
- `user:<id>` for DMs
- `channel:<id>` for channels
Slack DMs are opened via Slack conversation APIs when sending to user targets.
</Accordion>
</AccordionGroup>
## Actions and gates
Slack actions are controlled by `channels.slack.actions.*`.
Available action groups in current Slack tooling:
| Group | Default |
| ---------- | ------- |
| messages | enabled |
| reactions | enabled |
| pins | enabled |
| memberInfo | enabled |
| emojiList | enabled |
Current Slack message actions include `send`, `upload-file`, `download-file`, `read`, `edit`, `delete`, `pin`, `unpin`, `list-pins`, `member-info`, and `emoji-list`.
## Events and operational behavior
- Message edits/deletes/thread broadcasts are mapped into system events.
- Reaction add/remove events are mapped into system events.
- Member join/leave, channel created/renamed, and pin add/remove events are mapped into system events.
- Assistant thread status updates (for "is typing..." indicators in threads) use `assistant.threads.setStatus` and require bot scope `assistant:write`.
- `channel_id_changed` can migrate channel config keys when `configWrites` is enabled.
- Channel topic/purpose metadata is treated as untrusted context and can be injected into routing context.
- Thread starter and initial thread-history context seeding are filtered by configured sender allowlists when applicable.
- Block actions and modal interactions emit structured `Slack interaction: ...` system events with rich payload fields:
- block actions: selected values, labels, picker values, and `workflow_*` metadata
- modal `view_submission` and `view_closed` events with routed channel metadata and form inputs
## Ack reactions
`ackReaction` sends an acknowledgement emoji while OpenClaw is processing an inbound message.
Resolution order:
- `channels.slack.accounts.<accountId>.ackReaction`
- `channels.slack.ackReaction`
- `messages.ackReaction`
- agent identity emoji fallback (`agents.list[].identity.emoji`, else "👀")
Notes:
- Slack expects shortcodes (for example `"eyes"`).
- Use `""` to disable the reaction for the Slack account or globally.
## Typing reaction fallback
`typingReaction` adds a temporary reaction to the inbound Slack message while OpenClaw is processing a reply, then removes it when the run finishes. This is a useful fallback when Slack native assistant typing is unavailable, especially in DMs.
Resolution order:
- `channels.slack.accounts.<accountId>.typingReaction`
- `channels.slack.typingReaction`
Notes:
- Slack expects shortcodes (for example `"hourglass_flowing_sand"`).
- The reaction is best-effort and cleanup is attempted automatically after the reply or failure path completes.
## Manifest and scope checklist
<AccordionGroup>
@@ -483,11 +214,320 @@ Notes:
</Accordion>
</AccordionGroup>
## Token model
- `botToken` + `appToken` are required for Socket Mode.
- HTTP mode requires `botToken` + `signingSecret`.
- `botToken`, `appToken`, `signingSecret`, and `userToken` accept plaintext
strings or SecretRef objects.
- Config tokens override env fallback.
- `SLACK_BOT_TOKEN` / `SLACK_APP_TOKEN` env fallback applies only to the default account.
- `userToken` (`xoxp-...`) is config-only (no env fallback) and defaults to read-only behavior (`userTokenReadOnly: true`).
- Optional: add `chat:write.customize` if you want outgoing messages to use the active agent identity (custom `username` and icon). `icon_emoji` uses `:emoji_name:` syntax.
Status snapshot behavior:
- Slack account inspection tracks per-credential `*Source` and `*Status`
fields (`botToken`, `appToken`, `signingSecret`, `userToken`).
- Status is `available`, `configured_unavailable`, or `missing`.
- `configured_unavailable` means the account is configured through SecretRef
or another non-inline secret source, but the current command/runtime path
could not resolve the actual value.
- In HTTP mode, `signingSecretStatus` is included; in Socket Mode, the
required pair is `botTokenStatus` + `appTokenStatus`.
<Tip>
For actions/directory reads, user token can be preferred when configured. For writes, bot token remains preferred; user-token writes are only allowed when `userTokenReadOnly: false` and bot token is unavailable.
</Tip>
## Actions and gates
Slack actions are controlled by `channels.slack.actions.*`.
Available action groups in current Slack tooling:
| Group | Default |
| ---------- | ------- |
| messages | enabled |
| reactions | enabled |
| pins | enabled |
| memberInfo | enabled |
| emojiList | enabled |
Current Slack message actions include `send`, `upload-file`, `download-file`, `read`, `edit`, `delete`, `pin`, `unpin`, `list-pins`, `member-info`, and `emoji-list`.
## Access control and routing
<Tabs>
<Tab title="DM policy">
`channels.slack.dmPolicy` controls DM access (legacy: `channels.slack.dm.policy`):
- `pairing` (default)
- `allowlist`
- `open` (requires `channels.slack.allowFrom` to include `"*"`; legacy: `channels.slack.dm.allowFrom`)
- `disabled`
DM flags:
- `dm.enabled` (default true)
- `channels.slack.allowFrom` (preferred)
- `dm.allowFrom` (legacy)
- `dm.groupEnabled` (group DMs default false)
- `dm.groupChannels` (optional MPIM allowlist)
Multi-account precedence:
- `channels.slack.accounts.default.allowFrom` applies only to the `default` account.
- Named accounts inherit `channels.slack.allowFrom` when their own `allowFrom` is unset.
- Named accounts do not inherit `channels.slack.accounts.default.allowFrom`.
Pairing in DMs uses `openclaw pairing approve slack <code>`.
</Tab>
<Tab title="Channel policy">
`channels.slack.groupPolicy` controls channel handling:
- `open`
- `allowlist`
- `disabled`
Channel allowlist lives under `channels.slack.channels` and should use stable channel IDs.
Runtime note: if `channels.slack` is completely missing (env-only setup), runtime falls back to `groupPolicy="allowlist"` and logs a warning (even if `channels.defaults.groupPolicy` is set).
Name/ID resolution:
- channel allowlist entries and DM allowlist entries are resolved at startup when token access allows
- unresolved channel-name entries are kept as configured but ignored for routing by default
- inbound authorization and channel routing are ID-first by default; direct username/slug matching requires `channels.slack.dangerouslyAllowNameMatching: true`
</Tab>
<Tab title="Mentions and channel users">
Channel messages are mention-gated by default.
Mention sources:
- explicit app mention (`<@botId>`)
- mention regex patterns (`agents.list[].groupChat.mentionPatterns`, fallback `messages.groupChat.mentionPatterns`)
- implicit reply-to-bot thread behavior
Per-channel controls (`channels.slack.channels.<id>`; names only via startup resolution or `dangerouslyAllowNameMatching`):
- `requireMention`
- `users` (allowlist)
- `allowBots`
- `skills`
- `systemPrompt`
- `tools`, `toolsBySender`
- `toolsBySender` key format: `id:`, `e164:`, `username:`, `name:`, or `"*"` wildcard
(legacy unprefixed keys still map to `id:` only)
</Tab>
</Tabs>
## Threading, sessions, and reply tags
- DMs route as `direct`; channels as `channel`; MPIMs as `group`.
- With default `session.dmScope=main`, Slack DMs collapse to agent main session.
- Channel sessions: `agent:<agentId>:slack:channel:<channelId>`.
- 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).
Reply threading controls:
- `channels.slack.replyToMode`: `off|first|all` (default `off`)
- `channels.slack.replyToModeByChatType`: per `direct|group|channel`
- legacy fallback for direct chats: `channels.slack.dm.replyToMode`
Manual reply tags are supported:
- `[[reply_to_current]]`
- `[[reply_to:<id>]]`
Note: `replyToMode="off"` disables **all** reply threading in Slack, including explicit `[[reply_to_*]]` tags. This differs from Telegram, where explicit tags are still honored in `"off"` mode. The difference reflects the platform threading models: Slack threads hide messages from the channel, while Telegram replies remain visible in the main chat flow.
## Ack reactions
`ackReaction` sends an acknowledgement emoji while OpenClaw is processing an inbound message.
Resolution order:
- `channels.slack.accounts.<accountId>.ackReaction`
- `channels.slack.ackReaction`
- `messages.ackReaction`
- agent identity emoji fallback (`agents.list[].identity.emoji`, else "👀")
Notes:
- Slack expects shortcodes (for example `"eyes"`).
- Use `""` to disable the reaction for the Slack account or globally.
## Text streaming
`channels.slack.streaming` controls live preview behavior:
- `off`: disable live preview streaming.
- `partial` (default): replace preview text with the latest partial output.
- `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`).
- 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.
- Media and non-text payloads fall back to normal delivery.
- If streaming fails mid-reply, OpenClaw falls back to normal delivery for remaining payloads.
Use draft preview instead of Slack native text streaming:
```json5
{
channels: {
slack: {
streaming: "partial",
nativeStreaming: false,
},
},
}
```
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`.
## Typing reaction fallback
`typingReaction` adds a temporary reaction to the inbound Slack message while OpenClaw is processing a reply, then removes it when the run finishes. This is most useful outside of thread replies, which use a default "is typing..." status indicator.
Resolution order:
- `channels.slack.accounts.<accountId>.typingReaction`
- `channels.slack.typingReaction`
Notes:
- Slack expects shortcodes (for example `"hourglass_flowing_sand"`).
- The reaction is best-effort and cleanup is attempted automatically after the reply or failure path completes.
## Media, chunking, and delivery
<AccordionGroup>
<Accordion title="Inbound attachments">
Slack file attachments are downloaded from Slack-hosted private URLs (token-authenticated request flow) and written to the media store when fetch succeeds and size limits permit.
Runtime inbound size cap defaults to `20MB` unless overridden by `channels.slack.mediaMaxMb`.
</Accordion>
<Accordion title="Outbound text and files">
- text chunks use `channels.slack.textChunkLimit` (default 4000)
- `channels.slack.chunkMode="newline"` enables paragraph-first splitting
- file sends use Slack upload APIs and can include thread replies (`thread_ts`)
- outbound media cap follows `channels.slack.mediaMaxMb` when configured; otherwise channel sends use MIME-kind defaults from media pipeline
</Accordion>
<Accordion title="Delivery targets">
Preferred explicit targets:
- `user:<id>` for DMs
- `channel:<id>` for channels
Slack DMs are opened via Slack conversation APIs when sending to user targets.
</Accordion>
</AccordionGroup>
## Commands and slash behavior
- Native command auto-mode is **off** for Slack (`commands.native: "auto"` does not enable Slack native commands).
- Enable native Slack command handlers with `channels.slack.commands.native: true` (or global `commands.native: true`).
- When native commands are enabled, register matching slash commands in Slack (`/<command>` names), with one exception:
- register `/agentstatus` for the status command (Slack reserves `/status`)
- If native commands are not enabled, you can run a single configured slash command via `channels.slack.slashCommand`.
- Native arg menus now adapt their rendering strategy:
- up to 5 options: button blocks
- 6-100 options: static select menu
- more than 100 options: external select with async option filtering when interactivity options handlers are available
- if encoded option values exceed Slack limits, the flow falls back to buttons
- For long option payloads, Slash command argument menus use a confirm dialog before dispatching a selected value.
Default slash command settings:
- `enabled: false`
- `name: "openclaw"`
- `sessionPrefix: "slack:slash"`
- `ephemeral: true`
Slash sessions use isolated keys:
- `agent:<agentId>:slack:slash:<userId>`
and still route command execution against the target conversation session (`CommandTargetSessionKey`).
## Interactive replies
Slack can render agent-authored interactive reply controls, but this feature is disabled by default.
Enable it globally:
```json5
{
channels: {
slack: {
capabilities: {
interactiveReplies: true,
},
},
},
}
```
Or enable it for one Slack account only:
```json5
{
channels: {
slack: {
accounts: {
ops: {
capabilities: {
interactiveReplies: true,
},
},
},
},
},
}
```
When enabled, agents can emit Slack-only reply directives:
- `[[slack_buttons: Approve:approve, Reject:reject]]`
- `[[slack_select: Choose a target | Canary:canary, Production:production]]`
These directives compile into Slack Block Kit and route clicks or selections back through the existing Slack interaction event path.
Notes:
- This is Slack-specific UI. Other channels do not translate Slack Block Kit directives into their own button systems.
- The interactive callback values are OpenClaw-generated opaque tokens, not raw agent-authored values.
- If generated interactive blocks would exceed Slack Block Kit limits, OpenClaw falls back to the original text reply instead of sending an invalid blocks payload.
## Exec approvals in Slack
Exec approval prompts can route natively through Slack using interactive buttons and interactions, instead of falling back to the Web UI or terminal. Approver authorization is enforced: only users identified as approvers can approve or deny requests through Slack.
Slack can act as a native approval client with interactive buttons and interactions, instead of falling back to the Web UI or terminal.
- Exec approvals use `channels.slack.execApprovals.*` for native DM/channel routing.
- Plugin approvals can still resolve through the same Slack-native button surface when the request already lands in Slack and the approval id kind is `plugin:`.
- Approver authorization is still enforced: only users identified as approvers can approve or deny requests through Slack.
This uses the same shared approval button surface as other channels. When `interactivity` is enabled in your Slack app settings, approval prompts render as Block Kit buttons directly in the conversation.
When those buttons are present, they are the primary approval UX; OpenClaw
should only include a manual `/approve` command when the tool result says chat
approvals are unavailable or manual approval is the only path.
Config path:
@@ -527,11 +567,40 @@ opt into origin-chat delivery:
}
```
Shared `approvals.exec` forwarding is separate. Use it only when approval prompts must also route
to other chats or explicit out-of-band targets.
Shared `approvals.exec` forwarding is separate. Use it only when exec approval prompts must also
route to other chats or explicit out-of-band targets. Shared `approvals.plugin` forwarding is also
separate; Slack-native buttons can still resolve plugin approvals when those requests already land
in Slack.
Same-chat `/approve` also works in Slack channels and DMs that already support commands. See [Exec approvals](/tools/exec-approvals) for the full approval forwarding model.
## Events and operational behavior
- Message edits/deletes/thread broadcasts are mapped into system events.
- Reaction add/remove events are mapped into system events.
- Member join/leave, channel created/renamed, and pin add/remove events are mapped into system events.
- `channel_id_changed` can migrate channel config keys when `configWrites` is enabled.
- Channel topic/purpose metadata is treated as untrusted context and can be injected into routing context.
- Thread starter and initial thread-history context seeding are filtered by configured sender allowlists when applicable.
- Block actions and modal interactions emit structured `Slack interaction: ...` system events with rich payload fields:
- block actions: selected values, labels, picker values, and `workflow_*` metadata
- modal `view_submission` and `view_closed` events with routed channel metadata and form inputs
## Configuration reference pointers
Primary reference:
- [Configuration reference - Slack](/gateway/configuration-reference#slack)
High-signal Slack fields:
- mode/auth: `mode`, `botToken`, `appToken`, `signingSecret`, `webhookPath`, `accounts.*`
- DM access: `dm.enabled`, `dmPolicy`, `allowFrom` (legacy: `dm.policy`, `dm.allowFrom`), `dm.groupEnabled`, `dm.groupChannels`
- 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`
- ops/features: `configWrites`, `commands.native`, `slashCommand.*`, `actions.*`, `userToken`, `userTokenReadOnly`
## Troubleshooting
<AccordionGroup>
@@ -568,6 +637,12 @@ openclaw pairing list slack
<Accordion title="Socket mode not connecting">
Validate bot + app tokens and Socket Mode enablement in Slack app settings.
If `openclaw channels status --probe --json` shows `botTokenStatus` or
`appTokenStatus: "configured_unavailable"`, the Slack account is
configured but the current runtime could not resolve the SecretRef-backed
value.
</Accordion>
<Accordion title="HTTP mode not receiving events">
@@ -578,6 +653,10 @@ openclaw pairing list slack
- Slack Request URLs (Events + Interactivity + Slash Commands)
- unique `webhookPath` per HTTP account
If `signingSecretStatus: "configured_unavailable"` appears in account
snapshots, the HTTP account is configured but the current runtime could not
resolve the SecretRef-backed signing secret.
</Accordion>
<Accordion title="Native/slash commands not firing">
@@ -591,62 +670,6 @@ openclaw pairing list slack
</Accordion>
</AccordionGroup>
## Text streaming
OpenClaw supports Slack native text streaming via the Agents and AI Apps API.
`channels.slack.streaming` controls live preview behavior:
- `off`: disable live preview streaming.
- `partial` (default): replace preview text with the latest partial output.
- `block`: append chunked preview updates.
- `progress`: show progress status text while generating, then send final text.
`channels.slack.nativeStreaming` controls Slack's native streaming API (`chat.startStream` / `chat.appendStream` / `chat.stopStream`) when `streaming` is `partial` (default: `true`).
Disable native Slack streaming (keep draft preview behavior):
```yaml
channels:
slack:
streaming: partial
nativeStreaming: false
```
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`.
### Requirements
1. Enable **Agents and AI Apps** in your Slack app settings.
2. Ensure the app has the `assistant:write` scope.
3. A reply thread must be available for that message. Thread selection still follows `replyToMode`.
### Behavior
- First text chunk starts a stream (`chat.startStream`).
- Later text chunks append to the same stream (`chat.appendStream`).
- End of reply finalizes stream (`chat.stopStream`).
- Media and non-text payloads fall back to normal delivery.
- If streaming fails mid-reply, OpenClaw falls back to normal delivery for remaining payloads.
## Configuration reference pointers
Primary reference:
- [Configuration reference - Slack](/gateway/configuration-reference#slack)
High-signal Slack fields:
- mode/auth: `mode`, `botToken`, `appToken`, `signingSecret`, `webhookPath`, `accounts.*`
- DM access: `dm.enabled`, `dmPolicy`, `allowFrom` (legacy: `dm.policy`, `dm.allowFrom`), `dm.groupEnabled`, `dm.groupChannels`
- 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`
- ops/features: `configWrites`, `commands.native`, `slashCommand.*`, `actions.*`, `userToken`, `userTokenReadOnly`
## Related
- [Pairing](/channels/pairing)

View File

@@ -6,15 +6,19 @@ read_when:
title: "Synology Chat"
---
# Synology Chat (plugin)
# Synology Chat
Status: supported via plugin as a direct-message channel using Synology Chat webhooks.
Status: bundled plugin direct-message channel using Synology Chat webhooks.
The plugin accepts inbound messages from Synology Chat outgoing webhooks and sends replies
through a Synology Chat incoming webhook.
## Plugin required
## Bundled plugin
Synology Chat is plugin-based and not part of the default core channel install.
Synology Chat ships as a bundled plugin in current OpenClaw releases, so normal
packaged builds do not need a separate install.
If you are on an older build or a custom install that excludes Synology Chat,
install it manually:
Install from a local checkout:
@@ -26,7 +30,9 @@ Details: [Plugins](/tools/plugin)
## Quick setup
1. Install and enable the Synology Chat plugin.
1. Ensure the Synology Chat plugin is available.
- Current packaged OpenClaw releases already bundle it.
- Older/custom installs can add it manually from a source checkout with the command above.
- `openclaw onboard` now shows Synology Chat in the same channel setup list as `openclaw channels add`.
- Non-interactive setup: `openclaw channels add --channel synology-chat --token <token> --url <incoming-webhook-url>`
2. In Synology Chat integrations:
@@ -40,6 +46,17 @@ Details: [Plugins](/tools/plugin)
- Direct: `openclaw channels add --channel synology-chat --token <token> --url <incoming-webhook-url>`
5. Restart gateway and send a DM to the Synology Chat bot.
Webhook auth details:
- OpenClaw accepts the outgoing webhook token from `body.token`, then
`?token=...`, then headers.
- Accepted header forms:
- `x-synology-token`
- `x-webhook-token`
- `x-openclaw-token`
- `Authorization: Bearer <token>`
- Empty or missing tokens fail closed.
Minimal config:
```json5
@@ -137,10 +154,28 @@ but duplicate exact paths are still rejected fail-closed. Prefer explicit per-ac
- Keep `token` secret and rotate it if leaked.
- Keep `allowInsecureSsl: false` unless you explicitly trust a self-signed local NAS cert.
- Inbound webhook requests are token-verified and rate-limited per sender.
- Invalid token checks use constant-time secret comparison and fail closed.
- Prefer `dmPolicy: "allowlist"` for production.
- Keep `dangerouslyAllowNameMatching` off unless you explicitly need legacy username-based reply delivery.
- Keep `dangerouslyAllowInheritedWebhookPath` off unless you explicitly accept shared-path routing risk in a multi-account setup.
## Troubleshooting
- `Missing required fields (token, user_id, text)`:
- the outgoing webhook payload is missing one of the required fields
- if Synology sends the token in headers, make sure the gateway/proxy preserves those headers
- `Invalid token`:
- the outgoing webhook secret does not match `channels.synology-chat.token`
- the request is hitting the wrong account/webhook path
- a reverse proxy stripped the token header before the request reached OpenClaw
- `Rate limit exceeded`:
- too many invalid token attempts from the same source can temporarily lock that source out
- authenticated senders also have a separate per-user message rate limit
- `Allowlist is empty. Configure allowedUserIds or use dmPolicy=open.`:
- `dmPolicy="allowlist"` is enabled but no users are configured
- `User not authorized`:
- the sender's numeric `user_id` is not in `allowedUserIds`
## Related
- [Channels Overview](/channels) — all supported channels

View File

@@ -358,6 +358,8 @@ curl "https://api.telegram.org/bot<bot_token>/getUpdates"
- `/pair approve` when there is only one pending request
- `/pair approve latest` for most recent
The setup code carries a short-lived bootstrap token. Built-in bootstrap handoff keeps the primary node token at `scopes: []`; any handed-off operator token stays bounded to `operator.approvals`, `operator.read`, `operator.talk.secrets`, and `operator.write`. Bootstrap scope checks are role-prefixed, so that operator allowlist only satisfies operator requests; non-operator roles still need scopes under their own role prefix.
If a device retries with changed auth details (for example role/scopes/public key), the previous pending request is superseded and the new request uses a different `requestId`. Re-run `/pair pending` before approving.
More details: [Pairing](/channels/pairing#pair-via-telegram-recommended-for-ios).
@@ -821,6 +823,9 @@ openclaw message poll --channel telegram --target -1001234567890:topic:42 \
Approvers must be numeric Telegram user IDs. Telegram 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 the account's numeric owner config (`allowFrom` and direct-message `defaultTo`). Set `enabled: false` to disable Telegram as a native approval client explicitly. Approval requests otherwise fall back to other configured approval routes or the exec approval fallback policy.
Telegram also renders the shared approval buttons used by other chat channels. The native Telegram adapter mainly adds approver DM routing, channel/topic fanout, and typing hints before delivery.
When those buttons are present, they are the primary approval UX; OpenClaw
should only include a manual `/approve` command when the tool result says
chat approvals are unavailable or manual approval is the only path.
Delivery rules:
@@ -830,6 +835,16 @@ openclaw message poll --channel telegram --target -1001234567890:topic:42 \
Only resolved approvers can approve or deny. Non-approvers cannot use `/approve` and cannot use Telegram approval buttons.
Approval resolution behavior:
- IDs prefixed with `plugin:` always resolve through plugin approvals.
- Other approval IDs try `exec.approval.resolve` first.
- If Telegram is also authorized for plugin approvals and the gateway says
the exec approval is unknown/expired, Telegram retries once through
`plugin.approval.resolve`.
- Real exec approval denials/errors do not silently fall through to plugin
approval resolution.
Channel delivery shows the command text in the chat, so only enable `channel` or `both` in trusted groups/topics. When the prompt lands in a forum topic, OpenClaw preserves the topic for both the approval prompt and the post-approval follow-up. Exec approvals expire after 30 minutes by default.
Inline approval buttons also depend on `channels.telegram.capabilities.inlineButtons` allowing the target surface (`dm`, `group`, or `all`).

View File

@@ -5,18 +5,22 @@ read_when:
title: "Tlon"
---
# Tlon (plugin)
# Tlon
Tlon is a decentralized messenger built on Urbit. OpenClaw connects to your Urbit ship and can
respond to DMs and group chat messages. Group replies require an @ mention by default and can
be further restricted via allowlists.
Status: supported via plugin. DMs, group mentions, thread replies, rich text formatting, and
Status: bundled plugin. DMs, group mentions, thread replies, rich text formatting, and
image uploads are supported. Reactions and polls are not yet supported.
## Plugin required
## Bundled plugin
Tlon ships as a plugin and is not bundled with the core install.
Tlon ships as a bundled plugin in current OpenClaw releases, so normal packaged
builds do not need a separate install.
If you are on an older build or a custom install that excludes Tlon, install it
manually:
Install via CLI (npm registry):
@@ -34,7 +38,9 @@ Details: [Plugins](/tools/plugin)
## Setup
1. Install the Tlon plugin.
1. Ensure the Tlon plugin is available.
- Current packaged OpenClaw releases already bundle it.
- Older/custom installs can add it manually with the commands above.
2. Gather your ship URL and login code.
3. Configure `channels.tlon`.
4. Restart the gateway.

View File

@@ -26,7 +26,7 @@ Healthy baseline:
- `Runtime: running`
- `RPC probe: ok`
- Channel probe shows connected/ready
- Channel probe shows transport connected and, where supported, `works` or `audit ok`
## WhatsApp
@@ -70,11 +70,11 @@ Full troubleshooting: [/channels/discord#troubleshooting](/channels/discord#trou
### Slack failure signatures
| Symptom | Fastest check | Fix |
| -------------------------------------- | ----------------------------------------- | ------------------------------------------------- |
| Socket mode connected but no responses | `openclaw channels status --probe` | Verify app token + bot token and required scopes. |
| DMs blocked | `openclaw pairing list slack` | Approve pairing or relax DM policy. |
| Channel message ignored | Check `groupPolicy` and channel allowlist | Allow the channel or switch policy to `open`. |
| Symptom | Fastest check | Fix |
| -------------------------------------- | ----------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| Socket mode connected but no responses | `openclaw channels status --probe` | Verify app token + bot token and required scopes; watch for `botTokenStatus` / `appTokenStatus = configured_unavailable` on SecretRef-backed setups. |
| DMs blocked | `openclaw pairing list slack` | Approve pairing or relax DM policy. |
| Channel message ignored | Check `groupPolicy` and channel allowlist | Allow the channel or switch policy to `open`. |
Full troubleshooting: [/channels/slack#troubleshooting](/channels/slack#troubleshooting)

View File

@@ -5,13 +5,17 @@ read_when:
title: "Twitch"
---
# Twitch (plugin)
# Twitch
Twitch chat support via IRC connection. OpenClaw connects as a Twitch user (bot account) to receive and send messages in channels.
## Plugin required
## Bundled plugin
Twitch ships as a plugin and is not bundled with the core install.
Twitch ships as a bundled plugin in current OpenClaw releases, so normal
packaged builds do not need a separate install.
If you are on an older build or a custom install that excludes Twitch, install
it manually:
Install via CLI (npm registry):
@@ -29,17 +33,20 @@ Details: [Plugins](/tools/plugin)
## Quick setup (beginner)
1. Create a dedicated Twitch account for the bot (or use an existing account).
2. Generate credentials: [Twitch Token Generator](https://twitchtokengenerator.com/)
1. Ensure the Twitch plugin is available.
- Current packaged OpenClaw releases already bundle it.
- Older/custom installs can add it manually with the commands above.
2. Create a dedicated Twitch account for the bot (or use an existing account).
3. Generate credentials: [Twitch Token Generator](https://twitchtokengenerator.com/)
- Select **Bot Token**
- Verify scopes `chat:read` and `chat:write` are selected
- Copy the **Client ID** and **Access Token**
3. Find your Twitch user ID: [https://www.streamweasels.com/tools/convert-twitch-username-to-user-id/](https://www.streamweasels.com/tools/convert-twitch-username-to-user-id/)
4. Configure the token:
4. Find your Twitch user ID: [https://www.streamweasels.com/tools/convert-twitch-username-to-user-id/](https://www.streamweasels.com/tools/convert-twitch-username-to-user-id/)
5. Configure the token:
- Env: `OPENCLAW_TWITCH_ACCESS_TOKEN=...` (default account only)
- Or config: `channels.twitch.accessToken`
- If both are set, config takes precedence (env fallback is default-account only).
5. Start the gateway.
6. Start the gateway.
**⚠️ Important:** Add access control (`allowFrom` or `allowedRoles`) to prevent unauthorized users from triggering the bot. `requireMention` defaults to `true`.

View File

@@ -9,20 +9,23 @@ title: "Zalo"
Status: experimental. DMs are supported. The [Capabilities](#capabilities) section below reflects current Marketplace-bot behavior.
## Plugin required
## Bundled plugin
Zalo ships as a plugin and is not bundled with the core install.
Zalo ships as a bundled plugin in current OpenClaw releases, so normal packaged
builds do not need a separate install.
If you are on an older build or a custom install that excludes Zalo, install it
manually:
- Install via CLI: `openclaw plugins install @openclaw/zalo`
- Or select **Zalo** during setup and confirm the install prompt
- Or from a source checkout: `openclaw plugins install ./path/to/local/zalo-plugin`
- Details: [Plugins](/tools/plugin)
## Quick setup (beginner)
1. Install the Zalo plugin:
- From a source checkout: `openclaw plugins install ./path/to/local/zalo-plugin`
- From npm (if published): `openclaw plugins install @openclaw/zalo`
- Or pick **Zalo** in setup and confirm the install prompt
1. Ensure the Zalo plugin is available.
- Current packaged OpenClaw releases already bundle it.
- Older/custom installs can add it manually with the commands above.
2. Set the token:
- Env: `ZALO_BOT_TOKEN=...`
- Or config: `channels.zalo.accounts.default.botToken: "..."`.

View File

@@ -12,9 +12,13 @@ Status: experimental. This integration automates a **personal Zalo account** via
> **Warning:** This is an unofficial integration and may result in account suspension/ban. Use at your own risk.
## Plugin required
## Bundled plugin
Zalo Personal ships as a plugin and is not bundled with the core install.
Zalo Personal ships as a bundled plugin in current OpenClaw releases, so normal
packaged builds do not need a separate install.
If you are on an older build or a custom install that excludes Zalo Personal,
install it manually:
- Install via CLI: `openclaw plugins install @openclaw/zalouser`
- Or from a source checkout: `openclaw plugins install ./path/to/local/zalouser-plugin`
@@ -24,7 +28,9 @@ No external `zca`/`openzca` CLI binary is required.
## Quick setup (beginner)
1. Install the plugin (see above).
1. Ensure the Zalo Personal plugin is available.
- Current packaged OpenClaw releases already bundle it.
- Older/custom installs can add it manually with the commands above.
2. Login (QR, on the Gateway machine):
- `openclaw channels login --channel zalouser`
- Scan the QR code with the Zalo mobile app.

View File

@@ -12,46 +12,55 @@ The CI runs on every push to `main` and every pull request. It uses smart scopin
## Job Overview
| Job | Purpose | When it runs |
| ----------------- | ------------------------------------------------------------------------- | ------------------------------------------------ |
| `preflight` | Docs scope, change scope, key scan, workflow audit, prod dependency audit | Always; node-based audit only on non-doc changes |
| `docs-scope` | Detect docs-only changes | Always |
| `changed-scope` | Detect which areas changed (node/macos/android/windows) | Non-doc changes |
| `check` | TypeScript types, lint, format | Non-docs, node changes |
| `check-docs` | Markdown lint + broken link check | Docs changed |
| `secrets` | Detect leaked secrets | Always |
| `build-artifacts` | Build dist once, share with `release-check` | Pushes to `main`, node changes |
| `release-check` | Validate npm pack contents | Pushes to `main` after build |
| `checks` | Node tests + protocol check on PRs; Bun compat on push | Non-docs, node changes |
| `compat-node22` | Minimum supported Node runtime compatibility | Pushes to `main`, node changes |
| `checks-windows` | Windows-specific tests | Non-docs, windows-relevant changes |
| `macos` | Swift lint/build/test + TS tests | PRs with macos changes |
| `android` | Gradle build + tests | Non-docs, android changes |
| Job | Purpose | When it runs |
| ------------------------ | ---------------------------------------------------------------------------------------- | ----------------------------------- |
| `preflight` | Detect docs-only changes, changed scopes, changed extensions, and build the CI manifest | Always on non-draft pushes and PRs |
| `security-fast` | Private key detection, workflow audit via `zizmor`, production dependency audit | Always on non-draft pushes and PRs |
| `build-artifacts` | Build `dist/` and the Control UI once, upload reusable artifacts for downstream jobs | Node-relevant changes |
| `checks-fast-core` | Fast Linux correctness lanes such as bundled/plugin-contract/protocol checks | Node-relevant changes |
| `checks-fast-extensions` | Aggregate the extension shard lanes after `checks-fast-extensions-shard` completes | Node-relevant changes |
| `extension-fast` | Focused tests for only the changed bundled plugins | When extension changes are detected |
| `check` | Main local gate in CI: `pnpm check` plus `pnpm build:strict-smoke` | Node-relevant changes |
| `check-additional` | Architecture and boundary guards plus the gateway watch regression harness | Node-relevant changes |
| `build-smoke` | Built-CLI smoke tests and startup-memory smoke | Node-relevant changes |
| `checks` | Heavier Linux Node lanes: full tests, channel tests, and push-only Node 22 compatibility | Node-relevant changes |
| `check-docs` | Docs formatting, lint, and broken-link checks | Docs changed |
| `skills-python` | Ruff + pytest for Python-backed skills | Python-skill-relevant changes |
| `checks-windows` | Windows-specific test lanes | Windows-relevant changes |
| `macos-node` | macOS TypeScript test lane using the shared built artifacts | macOS-relevant changes |
| `macos-swift` | Swift lint, build, and tests for the macOS app | macOS-relevant changes |
| `android` | Android build and test matrix | Android-relevant changes |
## Fail-Fast Order
Jobs are ordered so cheap checks fail before expensive ones run:
1. `docs-scope` + `changed-scope` + `check` + `secrets` (parallel, cheap gates first)
2. PRs: `checks` (Linux Node test split into 2 shards), `checks-windows`, `macos`, `android`
3. Pushes to `main`: `build-artifacts` + `release-check` + Bun compat + `compat-node22`
1. `preflight` decides which lanes exist at all. The `docs-scope` and `changed-scope` logic are steps inside this job, not standalone jobs.
2. `security-fast`, `check`, `check-additional`, `check-docs`, and `skills-python` fail quickly without waiting on the heavier artifact and platform matrix jobs.
3. `build-artifacts` overlaps with the fast Linux lanes so downstream consumers can start as soon as the shared build is ready.
4. Heavier platform and runtime lanes fan out after that: `checks-fast-core`, `checks-fast-extensions`, `extension-fast`, `checks`, `checks-windows`, `macos-node`, `macos-swift`, and `android`.
Scope logic lives in `scripts/ci-changed-scope.mjs` and is covered by unit tests in `src/scripts/ci-changed-scope.test.ts`.
The same shared scope module also drives the separate `install-smoke` workflow through a narrower `changed-smoke` gate, so Docker/install smoke only runs for install, packaging, and container-relevant changes.
The separate `install-smoke` workflow reuses the same scope script through its own `preflight` job. It computes `run_install_smoke` from the narrower changed-smoke signal, so Docker/install smoke only runs for install, packaging, and container-relevant changes.
On pushes, the `checks` matrix adds the push-only `compat-node22` lane. On pull requests, that lane is skipped and the matrix stays focused on the normal test/channel lanes.
## Runners
| Runner | Jobs |
| -------------------------------- | ------------------------------------------ |
| `blacksmith-16vcpu-ubuntu-2404` | Most Linux jobs, including scope detection |
| `blacksmith-32vcpu-windows-2025` | `checks-windows` |
| `macos-latest` | `macos`, `ios` |
| Runner | Jobs |
| -------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `blacksmith-16vcpu-ubuntu-2404` | `preflight`, `security-fast`, `build-artifacts`, Linux checks, docs checks, Python skills, `android` |
| `blacksmith-32vcpu-windows-2025` | `checks-windows` |
| `macos-latest` | `macos-node`, `macos-swift` |
## Local Equivalents
```bash
pnpm check # types + lint + format
pnpm build:strict-smoke
pnpm test:gateway:watch-regression
pnpm test # vitest tests
pnpm test:channels
pnpm check:docs # docs format + lint + broken links
pnpm release:check # validate npm pack
pnpm build # build dist when CI artifact/build-smoke lanes matter
```

View File

@@ -21,6 +21,24 @@ If you want an external MCP client to talk directly to OpenClaw channel
conversations instead of hosting an ACP harness session, use
[`openclaw mcp serve`](/cli/mcp) instead.
## What this is not
This page is often confused with ACP harness sessions.
`openclaw acp` means:
- OpenClaw acts as an ACP server
- an IDE or ACP client connects to OpenClaw
- OpenClaw forwards that work into a Gateway session
This is different from [ACP Agents](/tools/acp-agents), where OpenClaw runs an
external harness such as Codex or Claude Code through `acpx`.
Quick rule:
- editor/client wants to talk ACP to OpenClaw: use `openclaw acp`
- OpenClaw should launch Codex/Claude/Gemini as an ACP harness: use `/acp spawn` and [ACP Agents](/tools/acp-agents)
## Compatibility Matrix
| ACP area | Status | Notes |
@@ -275,6 +293,7 @@ Learn more about session keys at [/concepts/session](/concepts/session).
- `--require-existing`: fail if the session key/label does not exist.
- `--reset-session`: reset the session key before first use.
- `--no-prefix-cwd`: do not prefix prompts with the working directory.
- `--provenance <off|meta|meta+receipt>`: include ACP provenance metadata or receipts.
- `--verbose, -v`: verbose logging to stderr.
Security note:

View File

@@ -10,20 +10,48 @@ title: "agent"
Run an agent turn via the Gateway (use `--local` for embedded).
Use `--agent <id>` to target a configured agent directly.
Pass at least one session selector:
- `--to <dest>`
- `--session-id <id>`
- `--agent <id>`
Related:
- Agent send tool: [Agent send](/tools/agent-send)
## Options
- `-m, --message <text>`: required message body
- `-t, --to <dest>`: recipient used to derive the session key
- `--session-id <id>`: explicit session id
- `--agent <id>`: agent id; overrides routing bindings
- `--thinking <off|minimal|low|medium|high|xhigh>`: agent thinking level
- `--verbose <on|off>`: persist verbose level for the session
- `--channel <channel>`: delivery channel; omit to use the main session channel
- `--reply-to <target>`: delivery target override
- `--reply-channel <channel>`: delivery channel override
- `--reply-account <id>`: delivery account override
- `--local`: run the embedded agent directly (after plugin registry preload)
- `--deliver`: send the reply back to the selected channel/target
- `--timeout <seconds>`: override agent timeout (default 600 or config value)
- `--json`: output JSON
## Examples
```bash
openclaw agent --to +15555550123 --message "status update" --deliver
openclaw agent --agent ops --message "Summarize logs"
openclaw agent --session-id 1234 --message "Summarize inbox" --thinking medium
openclaw agent --to +15555550123 --message "Trace logs" --verbose on --json
openclaw agent --agent ops --message "Generate report" --deliver --reply-channel slack --reply-to "#reports"
openclaw agent --agent ops --message "Run locally" --local
```
## Notes
- Gateway mode falls back to the embedded agent when the Gateway request fails. Use `--local` to force embedded execution up front.
- `--local` still preloads the plugin registry first, so plugin-provided providers, tools, and channels stay available during embedded runs.
- `--channel`, `--reply-channel`, and `--reply-account` affect reply delivery, not session routing.
- When this command triggers `models.json` regeneration, SecretRef-managed provider credentials are persisted as non-secret markers (for example env var names, `secretref-env:ENV_VAR_NAME`, or `secretref-managed`), not resolved secret plaintext.
- Marker writes are source-authoritative: OpenClaw persists markers from the active source config snapshot, not from resolved runtime secret values.

View File

@@ -19,7 +19,9 @@ Related:
```bash
openclaw agents list
openclaw agents list --bindings
openclaw agents add work --workspace ~/.openclaw/workspace-work
openclaw agents add ops --workspace ~/.openclaw/workspace-ops --bind telegram:ops --non-interactive
openclaw agents bindings
openclaw agents bind --agent work --bind telegram:ops
openclaw agents unbind --agent work --bind telegram:ops
@@ -53,6 +55,8 @@ openclaw agents bind --agent work --bind telegram:ops --bind discord:guild-a
If you omit `accountId` (`--bind <channel>`), OpenClaw resolves it from channel defaults and plugin setup hooks when available.
If you omit `--agent` for `bind` or `unbind`, OpenClaw targets the current default agent.
### Binding scope behavior
- A binding without `accountId` matches the channel default account only.
@@ -78,6 +82,75 @@ openclaw agents unbind --agent work --bind telegram:ops
openclaw agents unbind --agent work --all
```
`unbind` accepts either `--all` or one or more `--bind` values, not both.
## Command surface
### `agents`
Running `openclaw agents` with no subcommand is equivalent to `openclaw agents list`.
### `agents list`
Options:
- `--json`
- `--bindings`: include full routing rules, not only per-agent counts/summaries
### `agents add [name]`
Options:
- `--workspace <dir>`
- `--model <id>`
- `--agent-dir <dir>`
- `--bind <channel[:accountId]>` (repeatable)
- `--non-interactive`
- `--json`
Notes:
- Passing any explicit add flags switches the command into the non-interactive path.
- Non-interactive mode requires both an agent name and `--workspace`.
- `main` is reserved and cannot be used as the new agent id.
### `agents bindings`
Options:
- `--agent <id>`
- `--json`
### `agents bind`
Options:
- `--agent <id>` (defaults to the current default agent)
- `--bind <channel[:accountId]>` (repeatable)
- `--json`
### `agents unbind`
Options:
- `--agent <id>` (defaults to the current default agent)
- `--bind <channel[:accountId]>` (repeatable)
- `--all`
- `--json`
### `agents delete <id>`
Options:
- `--force`
- `--json`
Notes:
- `main` cannot be deleted.
- Without `--force`, interactive confirmation is required.
- Workspace, agent state, and session transcript directories are moved to Trash, not hard-deleted.
## Identity files
Each agent workspace can include an `IDENTITY.md` at the workspace root:
@@ -96,6 +169,24 @@ Avatar paths resolve relative to the workspace root.
- `emoji`
- `avatar` (workspace-relative path, http(s) URL, or data URI)
Options:
- `--agent <id>`
- `--workspace <dir>`
- `--identity-file <path>`
- `--from-identity`
- `--name <name>`
- `--theme <theme>`
- `--emoji <emoji>`
- `--avatar <value>`
- `--json`
Notes:
- `--agent` or `--workspace` can be used to select the target agent.
- If you rely on `--workspace` and multiple agents share that workspace, the command fails and asks you to pass `--agent`.
- When no explicit identity fields are provided, the command reads identity data from `IDENTITY.md`.
Load from `IDENTITY.md`:
```bash

View File

@@ -11,6 +11,8 @@ title: "approvals"
Manage exec approvals for the **local host**, **gateway host**, or a **node host**.
By default, commands target the local approvals file on disk. Use `--gateway` to target the gateway, or `--node` to target a specific node.
Alias: `openclaw exec-approvals`
Related:
- Exec approvals: [Exec approvals](/tools/exec-approvals)
@@ -41,10 +43,15 @@ Precedence is intentional:
```bash
openclaw approvals set --file ./exec-approvals.json
openclaw approvals set --stdin <<'EOF'
{ version: 1, defaults: { security: "full", ask: "off" } }
EOF
openclaw approvals set --node <id|name|ip> --file ./exec-approvals.json
openclaw approvals set --gateway --file ./exec-approvals.json
```
`set` accepts JSON5, not only strict JSON. Use either `--file` or `--stdin`, not both.
## "Never prompt" / YOLO example
For a host that should never stop on exec approvals, set the host approvals defaults to `full` + `off`:
@@ -103,6 +110,24 @@ openclaw approvals allowlist add --agent "*" "/usr/bin/uname"
openclaw approvals allowlist remove "~/Projects/**/bin/rg"
```
## Common options
`get`, `set`, and `allowlist add|remove` all support:
- `--node <id|name|ip>`
- `--gateway`
- shared node RPC options: `--url`, `--token`, `--timeout`, `--json`
Targeting notes:
- no target flags means the local approvals file on disk
- `--gateway` targets the gateway host approvals file
- `--node` targets one node host after resolving id, name, IP, or id prefix
`allowlist add|remove` also supports:
- `--agent <id>` (defaults to `*`)
## Notes
- `--node` uses the same resolver as `openclaw nodes` (id, name, ip, or id prefix).

View File

@@ -8,7 +8,7 @@ title: "backup"
# `openclaw backup`
Create a local backup archive for OpenClaw state, config, credentials, sessions, and optionally workspaces.
Create a local backup archive for OpenClaw state, config, auth profiles, channel/provider credentials, sessions, and optionally workspaces.
```bash
openclaw backup create
@@ -37,12 +37,19 @@ openclaw backup verify ./2026-03-09T00-00-00.000Z-openclaw-backup.tar.gz
- The state directory returned by OpenClaw's local state resolver, usually `~/.openclaw`
- The active config file path
- The OAuth / credentials directory
- The resolved `credentials/` directory when it exists outside the state directory
- Workspace directories discovered from the current config, unless you pass `--no-include-workspace`
If you use `--only-config`, OpenClaw skips state, credentials, and workspace discovery and archives only the active config file path.
Model auth profiles are already part of the state directory under
`agents/<agentId>/agent/auth-profiles.json`, so they are normally covered by the
state backup entry.
OpenClaw canonicalizes paths before building the archive. If config, credentials, or a workspace already live inside the state directory, they are not duplicated as separate top-level backup sources. Missing paths are skipped.
If you use `--only-config`, OpenClaw skips state, credentials-directory, and workspace discovery and archives only the active config file path.
OpenClaw canonicalizes paths before building the archive. If config, the
credentials directory, or a workspace already live inside the state directory,
they are not duplicated as separate top-level backup sources. Missing paths are
skipped.
The archive payload stores file contents from those source trees, and the embedded `manifest.json` records the resolved absolute source paths plus the archive layout used for each asset.
@@ -56,7 +63,8 @@ If you still want a partial backup in that situation, rerun:
openclaw backup create --no-include-workspace
```
That keeps state, config, and credentials in scope while skipping workspace discovery entirely.
That keeps state, config, and the external credentials directory in scope while
skipping workspace discovery entirely.
If you only need a copy of the config file itself, `--only-config` also works when the config is malformed because it does not rely on parsing the config for workspace discovery.

View File

@@ -1,5 +1,5 @@
---
summary: "CLI reference for `openclaw browser` (profiles, tabs, actions, Chrome MCP, and CDP)"
summary: "CLI reference for `openclaw browser` (lifecycle, profiles, tabs, actions, state, and debugging)"
read_when:
- You use `openclaw browser` and want examples for common tasks
- You want to control a browser running on another machine via a node host
@@ -9,7 +9,7 @@ title: "browser"
# `openclaw browser`
Manage OpenClaws browser control server and run browser actions (tabs, snapshots, screenshots, navigation, clicks, typing).
Manage OpenClaw's browser control surface and run browser actions (lifecycle, profiles, tabs, snapshots, screenshots, navigation, input, state emulation, and debugging).
Related:
@@ -20,6 +20,7 @@ Related:
- `--url <gatewayWsUrl>`: Gateway WebSocket URL (defaults to config).
- `--token <token>`: Gateway token (if required).
- `--timeout <ms>`: request timeout (ms).
- `--expect-final`: wait for a final Gateway response.
- `--browser-profile <name>`: choose a browser profile (default from config).
- `--json`: machine-readable output (where supported).
@@ -32,6 +33,23 @@ openclaw browser --browser-profile openclaw open https://example.com
openclaw browser --browser-profile openclaw snapshot
```
## Lifecycle
```bash
openclaw browser status
openclaw browser start
openclaw browser stop
openclaw browser --browser-profile openclaw reset-profile
```
Notes:
- For `attachOnly` and remote CDP profiles, `openclaw browser stop` closes the
active control session and clears temporary emulation overrides even when
OpenClaw did not launch the browser process itself.
- For local managed profiles, `openclaw browser stop` stops the spawned browser
process.
## If the command is missing
If `openclaw browser` is an unknown command, check `plugins.allow` in
@@ -65,6 +83,7 @@ Profiles are named browser routing configs. In practice:
openclaw browser profiles
openclaw browser create-profile --name work --color "#FF5A36"
openclaw browser create-profile --name chrome-live --driver existing-session
openclaw browser create-profile --name remote --cdp-url https://browser-host.example.com
openclaw browser delete-profile --name work
```
@@ -78,6 +97,9 @@ openclaw browser --browser-profile work tabs
```bash
openclaw browser tabs
openclaw browser tab new
openclaw browser tab select 2
openclaw browser tab close 2
openclaw browser open https://docs.openclaw.ai
openclaw browser focus <targetId>
openclaw browser close <targetId>
@@ -95,14 +117,81 @@ Screenshot:
```bash
openclaw browser screenshot
openclaw browser screenshot --full-page
openclaw browser screenshot --ref e12
```
Notes:
- `--full-page` is for page captures only; it cannot be combined with `--ref`
or `--element`.
- `existing-session` / `user` profiles support page screenshots and `--ref`
screenshots from snapshot output, but not CSS `--element` screenshots.
Navigate/click/type (ref-based UI automation):
```bash
openclaw browser navigate https://example.com
openclaw browser click <ref>
openclaw browser type <ref> "hello"
openclaw browser press Enter
openclaw browser hover <ref>
openclaw browser scrollintoview <ref>
openclaw browser drag <startRef> <endRef>
openclaw browser select <ref> OptionA OptionB
openclaw browser fill --fields '[{"ref":"1","value":"Ada"}]'
openclaw browser wait --text "Done"
openclaw browser evaluate --fn '(el) => el.textContent' --ref <ref>
```
File + dialog helpers:
```bash
openclaw browser upload /tmp/openclaw/uploads/file.pdf --ref <ref>
openclaw browser waitfordownload
openclaw browser download <ref> report.pdf
openclaw browser dialog --accept
```
## State and storage
Viewport + emulation:
```bash
openclaw browser resize 1280 720
openclaw browser set viewport 1280 720
openclaw browser set offline on
openclaw browser set media dark
openclaw browser set timezone Europe/London
openclaw browser set locale en-GB
openclaw browser set geo 51.5074 -0.1278 --accuracy 25
openclaw browser set device "iPhone 14"
openclaw browser set headers '{"x-test":"1"}'
openclaw browser set credentials myuser mypass
```
Cookies + storage:
```bash
openclaw browser cookies
openclaw browser cookies set session abc123 --url https://example.com
openclaw browser cookies clear
openclaw browser storage local get
openclaw browser storage local set token abc123
openclaw browser storage session clear
```
## Debugging
```bash
openclaw browser console --level error
openclaw browser pdf
openclaw browser responsebody "**/api"
openclaw browser highlight <ref>
openclaw browser errors --clear
openclaw browser requests --filter api
openclaw browser trace start
openclaw browser trace stop --out trace.zip
```
## Existing Chrome via MCP
@@ -118,6 +207,23 @@ openclaw browser --browser-profile chrome-live tabs
This path is host-only. For Docker, headless servers, Browserless, or other remote setups, use a CDP profile instead.
Current existing-session limits:
- snapshot-driven actions use refs, not CSS selectors
- `click` is left-click only
- `type` does not support `slowly=true`
- `press` does not support `delayMs`
- `hover`, `scrollintoview`, `drag`, `select`, `fill`, and `evaluate` reject
per-call timeout overrides
- `select` supports one value only
- `wait --load networkidle` is not supported
- file uploads require `--ref` / `--input-ref`, do not support CSS
`--element`, and currently support one file at a time
- dialog hooks do not support `--timeout`
- screenshots support page captures and `--ref`, but not CSS `--element`
- `responsebody`, download interception, PDF export, and batch actions still
require a managed browser or raw CDP profile
## Remote browser control (node host proxy)
If the Gateway runs on a different machine than the browser, run a **node host** on the machine that has Chrome/Brave/Edge/Chromium. The Gateway will proxy browser actions to that node (no separate browser control server required).

View File

@@ -26,6 +26,19 @@ openclaw channels resolve --channel slack "#general" "@jane"
openclaw channels logs --channel all
```
## Status / capabilities / resolve / logs
- `channels status`: `--probe`, `--timeout <ms>`, `--json`
- `channels capabilities`: `--channel <name>`, `--account <id>` (only with `--channel`), `--target <dest>`, `--timeout <ms>`, `--json`
- `channels resolve`: `<entries...>`, `--channel <name>`, `--account <id>`, `--kind <auto|user|group>`, `--json`
- `channels logs`: `--channel <name|all>`, `--lines <n>`, `--json`
`channels status --probe` is the live path: on a reachable gateway it runs per-account
`probeAccount` and optional `auditAccount` checks, so output can include transport
state plus probe results such as `works`, `probe failed`, `audit ok`, or `audit failed`.
If the gateway is unreachable, `channels status` falls back to config-only summaries
instead of live probe output.
## Add / remove accounts
```bash
@@ -36,6 +49,16 @@ openclaw channels remove --channel telegram --delete
Tip: `openclaw channels add --help` shows per-channel flags (token, private key, app token, signal-cli paths, etc).
Common non-interactive add surfaces include:
- bot-token channels: `--token`, `--bot-token`, `--app-token`, `--token-file`
- Signal/iMessage transport fields: `--signal-number`, `--cli-path`, `--http-url`, `--http-host`, `--http-port`, `--db-path`, `--service`, `--region`
- Google Chat fields: `--webhook-path`, `--webhook-url`, `--audience-type`, `--audience`
- Matrix fields: `--homeserver`, `--user-id`, `--access-token`, `--password`, `--device-name`, `--initial-sync-limit`
- Nostr fields: `--private-key`, `--relay-urls`
- Tlon fields: `--ship`, `--url`, `--code`, `--group-channels`, `--dm-allowlist`, `--auto-discover-channels`
- `--use-env` for default-account env-backed auth where supported
When you run `openclaw channels add` without flags, the interactive wizard can prompt:
- account ids per selected channel
@@ -46,7 +69,7 @@ If you confirm bind now, the wizard asks which agent should own each configured
You can also manage the same routing rules later with `openclaw agents bindings`, `openclaw agents bind`, and `openclaw agents unbind` (see [agents](/cli/agents)).
When you add a non-default account to a channel that is still using single-account top-level settings (no `channels.<channel>.accounts` entries yet), OpenClaw moves account-scoped single-account top-level values into `channels.<channel>.accounts.default`, then writes the new account. This preserves the original account behavior while moving to the multi-account shape.
When you add a non-default account to a channel that is still using single-account top-level settings, OpenClaw promotes account-scoped top-level values into the channel's account map before writing the new account. Most channels land those values in `channels.<channel>.accounts.default`, but bundled channels can preserve an existing matching promoted account instead. Matrix is the current example: if one named account already exists, or `defaultAccount` points at an existing named account, promotion preserves that account instead of creating a new `accounts.default`.
Routing behavior stays consistent:
@@ -54,7 +77,7 @@ Routing behavior stays consistent:
- `channels add` does not auto-create or rewrite bindings in non-interactive mode.
- Interactive setup can optionally add account-scoped bindings.
If your config was already in a mixed state (named accounts present, missing `default`, and top-level single-account values still set), run `openclaw doctor --fix` to move account-scoped values into `accounts.default`.
If your config was already in a mixed state (named accounts present and top-level single-account values still set), run `openclaw doctor --fix` to move account-scoped values into the promoted account chosen for that channel. Most channels promote into `accounts.default`; Matrix can preserve an existing named/default target instead.
## Login / logout (interactive)
@@ -63,11 +86,16 @@ openclaw channels login --channel whatsapp
openclaw channels logout --channel whatsapp
```
Notes:
- `channels login` supports `--verbose`.
- `channels login` / `logout` can infer the channel when only one supported login target is configured.
## Troubleshooting
- Run `openclaw status --deep` for a broad probe.
- Use `openclaw doctor` for guided fixes.
- `openclaw channels list` prints `Claude: HTTP 403 ... user:profile` → usage snapshot needs the `user:profile` scope. Use `--no-usage`, or provide a claude.ai session key (`CLAUDE_WEB_SESSION_KEY` / `CLAUDE_WEB_COOKIE`), or re-auth via Claude Code CLI.
- `openclaw channels list` prints `Claude: HTTP 403 ... user:profile` → usage snapshot needs the `user:profile` scope. Use `--no-usage`, or provide a claude.ai session key (`CLAUDE_WEB_SESSION_KEY` / `CLAUDE_WEB_COOKIE`), or re-auth via Claude CLI.
- `openclaw channels status` falls back to config-only summaries when the gateway is unreachable. If a supported channel credential is configured via SecretRef but unavailable in the current command path, it reports that account as configured with degraded notes instead of showing it as not configured.
## Capabilities probe
@@ -82,6 +110,7 @@ openclaw channels capabilities --channel discord --target channel:123
Notes:
- `--channel` is optional; omit it to list every channel (including extensions).
- `--account` is only valid with `--channel`.
- `--target` accepts `channel:<id>` or a raw numeric channel id and only applies to Discord.
- Probes are provider-specific: Discord intents + optional channel permissions; Slack bot + user scopes; Telegram bot flags + webhook; Signal daemon version; Microsoft Teams app token + Graph roles/scopes (annotated where known). Channels without probes report `Probe: unavailable`.

View File

@@ -11,10 +11,28 @@ Config helpers for non-interactive edits in `openclaw.json`: get/set/unset/file/
values by path and print the active config file. Run without a subcommand to
open the configure wizard (same as `openclaw configure`).
Root options:
- `--section <section>`: repeatable guided-setup section filter when you run `openclaw config` without a subcommand
Supported guided sections:
- `workspace`
- `model`
- `web`
- `gateway`
- `daemon`
- `channels`
- `plugins`
- `skills`
- `health`
## Examples
```bash
openclaw config file
openclaw config --section model
openclaw config --section gateway --section daemon
openclaw config schema
openclaw config get browser.executablePath
openclaw config set browser.executablePath "/usr/bin/google-chrome"
@@ -30,7 +48,23 @@ openclaw config validate --json
### `config schema`
Print the generated JSON schema for `openclaw.json` to stdout as plain text.
Print the generated JSON schema for `openclaw.json` to stdout as JSON.
What it includes:
- The current root config schema, plus a root `$schema` string field for editor tooling
- Field `title` and `description` docs metadata used by the Control UI
- Nested object, wildcard (`*`), and array-item (`[]`) nodes inherit the same `title` / `description` metadata when matching field documentation exists
- `anyOf` / `oneOf` / `allOf` branches inherit the same docs metadata too when matching field documentation exists
- Best-effort live plugin + channel schema metadata when runtime manifests can be loaded
- A clean fallback schema even when the current config is invalid
Related runtime RPC:
- `config.schema.lookup` returns one normalized config path with a shallow
schema node (`title`, `description`, `type`, `enum`, `const`, common bounds),
matched UI hint metadata, and immediate child summaries. Use it for
path-scoped drill-down in Control UI or custom clients.
```bash
openclaw config schema
@@ -69,6 +103,8 @@ openclaw config set gateway.port 19001 --strict-json
openclaw config set channels.whatsapp.groups '["*"]' --strict-json
```
`config get <path> --json` prints the raw value as JSON instead of terminal-formatted text.
## `config set` modes
`openclaw config set` supports four assignment styles:

View File

@@ -12,19 +12,46 @@ Interactive prompt to set up credentials, devices, and agent defaults.
Note: The **Model** section now includes a multi-select for the
`agents.defaults.models` allowlist (what shows up in `/model` and the model picker).
When configure starts from a provider auth choice, the default-model and
allowlist pickers prefer that provider automatically. For paired providers such
as Volcengine/BytePlus, the same preference also matches their coding-plan
variants (`volcengine-plan/*`, `byteplus-plan/*`). If the preferred-provider
filter would produce an empty list, configure falls back to the unfiltered
catalog instead of showing a blank picker.
Tip: `openclaw config` without a subcommand opens the same wizard. Use
`openclaw config get|set|unset` for non-interactive edits.
For web search, `openclaw configure --section web` lets you choose a provider
and configure its credentials. If you choose **Grok**, configure can also show
a separate follow-up step to enable `x_search` with the same `XAI_API_KEY` and
pick an `x_search` model. Other web-search providers do not show that step.
and configure its credentials. Some providers also show provider-specific
follow-up prompts:
- **Grok** can offer optional `x_search` setup with the same `XAI_API_KEY` and
let you pick an `x_search` model.
- **Kimi** can ask for the Moonshot API region (`api.moonshot.ai` vs
`api.moonshot.cn`) and the default Kimi web-search model.
Related:
- Gateway configuration reference: [Configuration](/gateway/configuration)
- Config CLI: [Config](/cli/config)
## Options
- `--section <section>`: repeatable section filter
Available sections:
- `workspace`
- `model`
- `web`
- `gateway`
- `daemon`
- `channels`
- `plugins`
- `skills`
- `health`
Notes:
- Choosing where the Gateway runs always updates `gateway.mode`. You can select "Continue" without other sections if that is all you need.
@@ -39,4 +66,5 @@ Notes:
openclaw configure
openclaw configure --section web
openclaw configure --section model --section channels
openclaw configure --section gateway --section daemon
```

View File

@@ -19,8 +19,16 @@ Tip: run `openclaw cron --help` for the full command surface.
Note: isolated `cron add` jobs default to `--announce` delivery. Use `--no-deliver` to keep
output internal. `--deliver` remains as a deprecated alias for `--announce`.
Note: cron-owned isolated runs expect a plain-text summary and the runner owns
the final send path. `--no-deliver` keeps the run internal; it does not hand
delivery back to the agent's message tool.
Note: one-shot (`--at`) jobs delete after success by default. Use `--keep-after-run` to keep them.
Note: `--session` supports `main`, `isolated`, `current`, and `session:<id>`.
Use `current` to bind to the active session at creation time, or `session:<id>` for
an explicit persistent session key.
Note: for one-shot CLI jobs, offset-less `--at` datetimes are treated as UTC unless you also pass
`--tz <iana>`, which interprets that local wall-clock time in the given timezone.
@@ -28,6 +36,41 @@ Note: recurring jobs now use exponential retry backoff after consecutive errors
Note: `openclaw cron run` now returns as soon as the manual run is queued for execution. Successful responses include `{ ok: true, enqueued: true, runId }`; use `openclaw cron runs --id <job-id>` to follow the eventual outcome.
Note: `openclaw cron run <job-id>` force-runs by default. Use `--due` to keep the
older "only run if due" behavior.
Note: isolated cron turns suppress stale acknowledgement-only replies. If the
first result is just an interim status update and no descendant subagent run is
responsible for the eventual answer, cron re-prompts once for the real result
before delivery.
Note: if an isolated cron run returns only the silent token (`NO_REPLY` /
`no_reply`), cron suppresses direct outbound delivery and the fallback queued
summary path as well, so nothing is posted back to chat.
Note: `cron add|edit --model ...` uses that selected allowed model for the job.
If the model is not allowed, cron warns and falls back to the job's agent/default
model selection instead. Configured fallback chains still apply, but a plain
model override with no explicit per-job fallback list no longer appends the
agent primary as a hidden extra retry target.
Note: isolated cron model precedence is Gmail-hook override first, then per-job
`--model`, then any stored cron-session model override, then the normal
agent/default selection.
Note: isolated cron fast mode follows the resolved live model selection. Model
config `params.fastMode` applies by default, but a stored session `fastMode`
override still wins over config.
Note: if an isolated run throws `LiveSessionModelSwitchError`, cron persists the
switched provider/model (and switched auth profile override when present) before
retrying. The outer retry loop is bounded to 2 switch retries after the initial
attempt, then aborts instead of looping forever.
Note: failure notifications use `delivery.failureDestination` first, then
global `cron.failureDestination`, and finally fall back to the job's primary
announce target when no explicit failure destination is configured.
Note: retention/pruning is controlled in config:
- `cron.sessionRetention` (default `24h`) prunes completed isolated run sessions.
@@ -78,3 +121,47 @@ openclaw cron add \
```
`--light-context` applies to isolated agent-turn jobs only. For cron runs, lightweight mode keeps bootstrap context empty instead of injecting the full workspace bootstrap set.
Delivery ownership note:
- Cron-owned isolated jobs always route final user-visible delivery through the
cron runner (`announce`, `webhook`, or internal-only `none`).
- If the task mentions messaging some external recipient, the agent should
describe the intended destination in its result instead of trying to send it
directly.
## Common admin commands
Manual run:
```bash
openclaw cron run <job-id>
openclaw cron run <job-id> --due
openclaw cron runs --id <job-id> --limit 50
```
Agent/session retargeting:
```bash
openclaw cron edit <job-id> --agent ops
openclaw cron edit <job-id> --clear-agent
openclaw cron edit <job-id> --session current
openclaw cron edit <job-id> --session "session:daily-brief"
```
Delivery tweaks:
```bash
openclaw cron edit <job-id> --announce --channel slack --to "channel:C1234567890"
openclaw cron edit <job-id> --best-effort-deliver
openclaw cron edit <job-id> --no-best-effort-deliver
openclaw cron edit <job-id> --no-deliver
```
Failure-delivery note:
- `delivery.failureDestination` is supported for isolated jobs.
- Main-session jobs may only use `delivery.failureDestination` when primary
delivery mode is `webhook`.
- If you do not set any failure destination and the job already announces to a
channel, failure notifications reuse that same announce target.

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