qwen-audio-agent 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/README.md +15 -5
  2. package/README_ZH.md +13 -5
  3. package/THIRD_PARTY_NOTICES.md +1 -1
  4. package/cli/package.json +1 -1
  5. package/cli/src/arguments.mjs +4 -1
  6. package/cli/src/config-command.mjs +5 -6
  7. package/cli/src/launcher.mjs +13 -0
  8. package/config/frontend-agent/PROMPT.md +29 -26
  9. package/desktop/src/i18n.mjs +6 -0
  10. package/desktop/src/settings-config.mjs +34 -28
  11. package/desktop/src/settings-store.mjs +19 -28
  12. package/docs/architecture/deep-dive.md +103 -66
  13. package/docs/architecture/deep-dive.zh.md +73 -50
  14. package/docs/backends/configuration.md +21 -20
  15. package/docs/backends/configuration.zh.md +19 -17
  16. package/docs/backends/overview.md +14 -8
  17. package/docs/backends/overview.zh.md +11 -5
  18. package/docs/configuration/backend.md +16 -2
  19. package/docs/configuration/backend.zh.md +16 -2
  20. package/docs/configuration/frontend.md +59 -26
  21. package/docs/configuration/frontend.zh.md +58 -26
  22. package/docs/configuration.md +1 -1
  23. package/docs/configuration.zh.md +1 -1
  24. package/docs/contract.md +22 -2
  25. package/docs/contract.zh.md +18 -2
  26. package/docs/gateway-protocol.md +26 -0
  27. package/docs/gateway-protocol.zh.md +22 -0
  28. package/docs/gateway-webrtc-client.md +3 -3
  29. package/docs/gateway-webrtc-client.zh.md +3 -3
  30. package/docs/getting-started/install.md +1 -1
  31. package/docs/getting-started/install.zh.md +1 -1
  32. package/docs/getting-started/quickstart.md +2 -2
  33. package/docs/getting-started/quickstart.zh.md +2 -2
  34. package/docs/getting-started/webui.md +2 -0
  35. package/docs/getting-started/webui.zh.md +2 -0
  36. package/docs/guides/knowledge.md +8 -5
  37. package/docs/guides/knowledge.zh.md +4 -3
  38. package/docs/guides/tasks.md +63 -2
  39. package/docs/guides/tasks.zh.md +45 -1
  40. package/docs/guides/web-search.md +16 -1
  41. package/docs/guides/web-search.zh.md +14 -1
  42. package/docs/reference/backend-adapter-sdk.md +33 -2
  43. package/docs/reference/backend-adapter-sdk.zh.md +29 -2
  44. package/docs/reference/cli.md +3 -3
  45. package/docs/reference/cli.zh.md +3 -3
  46. package/docs/scenarios/lightrag.md +2 -2
  47. package/docs/scenarios/lightrag.zh.md +2 -2
  48. package/docs/scenarios/x-omni.md +5 -2
  49. package/docs/scenarios/x-omni.zh.md +5 -2
  50. package/docs/voice-agent-architecture-presentation.zh.md +34 -37
  51. package/docs/voice-frontends/custom-provider.md +6 -3
  52. package/docs/voice-frontends/custom-provider.zh.md +6 -3
  53. package/docs/voice-frontends/google-live.md +7 -5
  54. package/docs/voice-frontends/google-live.zh.md +7 -5
  55. package/docs/voice-frontends/gpt-live.md +7 -5
  56. package/docs/voice-frontends/gpt-live.zh.md +7 -5
  57. package/docs/voice-frontends/minicpm-o.md +8 -4
  58. package/docs/voice-frontends/minicpm-o.zh.md +7 -4
  59. package/docs/voice-frontends/qwen-audio-realtime.md +39 -14
  60. package/docs/voice-frontends/qwen-audio-realtime.zh.md +32 -11
  61. package/docs/voice-frontends/qwen-omni-realtime.md +11 -8
  62. package/docs/voice-frontends/qwen-omni-realtime.zh.md +11 -8
  63. package/docs/voice-frontends/speech-to-speech.md +8 -4
  64. package/docs/voice-frontends/speech-to-speech.zh.md +7 -3
  65. package/docs/voice-frontends/stepfun.md +7 -4
  66. package/docs/voice-frontends/stepfun.zh.md +7 -4
  67. package/examples/webrtc/start.mjs +2 -1
  68. package/package.json +22 -14
  69. package/scripts/audit-dependencies.mjs +3 -25
  70. package/scripts/electron-smoke.mjs +5 -5
  71. package/scripts/release-check +13 -21
  72. package/scripts/runtime/claude-code-acp.mjs +5 -5
  73. package/scripts/runtime/codex-acp.mjs +1 -1
  74. package/scripts/runtime/openclaw.mjs +3 -2
  75. package/scripts/runtime/opencode.mjs +2 -10
  76. package/scripts/runtime/pi-acp.mjs +1 -1
  77. package/scripts/verify-package.mjs +0 -2
  78. package/server/package.json +4 -4
  79. package/server/src/app/gateway-application.mjs +3 -0
  80. package/server/src/app/gateway-http-routes.mjs +3 -0
  81. package/server/src/app/session-conversation-history.mjs +9 -1
  82. package/server/src/backend/adapters/a2a/backend-adapter.mjs +32 -26
  83. package/server/src/backend/adapters/acp/backend-adapter.mjs +710 -263
  84. package/server/src/backend/adapters/acp/coordinator-contract.mjs +2 -13
  85. package/server/src/backend/adapters/acp/coordinator-instructions.mjs +29 -8
  86. package/server/src/backend/adapters/acp/coordinator-queue.mjs +58 -0
  87. package/server/src/backend/adapters/acp/drivers/codex.mjs +1 -1
  88. package/server/src/backend/adapters/acp/drivers/deepseek-harness.mjs +12 -36
  89. package/server/src/backend/adapters/acp/drivers/openclaw.mjs +1 -2
  90. package/server/src/backend/adapters/acp/input-broker.mjs +2 -0
  91. package/server/src/backend/adapters/acp/process-client.mjs +117 -17
  92. package/server/src/backend/adapters/acp/session-configuration.mjs +2 -19
  93. package/server/src/backend/adapters/acp/session-registry.mjs +9 -0
  94. package/server/src/backend/adapters/acp/session-tools.mjs +1 -1
  95. package/server/src/backend/adapters/acp/turn-updates.mjs +188 -0
  96. package/server/src/backend/adapters/acp/work-continuation.mjs +48 -0
  97. package/server/src/backend/adapters/agent-client.mjs +24 -1
  98. package/server/src/backend/adapters/llm/backend-adapter.mjs +393 -0
  99. package/server/src/backend/adapters/muse/backend-adapter.mjs +2 -0
  100. package/server/src/backend/availability.mjs +12 -3
  101. package/server/src/backend/backend-adapter-sdk.mjs +3 -0
  102. package/server/src/backend/backend-port.mjs +13 -0
  103. package/server/src/backend/backend-work-runtime.mjs +23 -0
  104. package/server/src/client/client-command-runtime.mjs +14 -0
  105. package/server/src/conversation/conversation-sync.mjs +26 -2
  106. package/server/src/conversation/frontend-notes.mjs +7 -5
  107. package/server/src/conversation/task-result-projector.mjs +1 -1
  108. package/server/src/core/backend-events.mjs +4 -0
  109. package/server/src/core/config.mjs +32 -55
  110. package/server/src/core/gateway-protocol.mjs +4 -1
  111. package/server/src/core/work-conversation-context.mjs +138 -0
  112. package/server/src/core/work-input-request.mjs +1 -0
  113. package/server/src/frontend/frontend-tools.mjs +6 -6
  114. package/server/src/frontend/retrieval/providers/factory.mjs +10 -1
  115. package/server/src/frontend/retrieval/providers/mcp.mjs +13 -2
  116. package/server/src/frontend/tools/agent-task-runtime.mjs +97 -95
  117. package/server/src/frontend/tools/features/agent-task-tools.mjs +23 -42
  118. package/server/src/frontend/tools/frontend-tool-context.mjs +2 -2
  119. package/server/src/frontend/tools/spawn-thinking-tool.mjs +2 -2
  120. package/server/src/frontend/tools/tool-call-handler.mjs +112 -68
  121. package/server/src/knowledge/providers/local/library.mjs +26 -6
  122. package/server/src/knowledge/providers/local/provider.mjs +25 -6
  123. package/server/src/memory/providers/markdown/context-store.mjs +21 -10
  124. package/server/src/orchestration/session-task-coordinator.mjs +9 -2
  125. package/server/src/orchestration/task-operations.mjs +50 -10
  126. package/server/src/orchestration/task-updates.mjs +81 -0
  127. package/server/src/task/reminder-scheduler.mjs +5 -1
  128. package/server/src/task/task-manager.mjs +72 -15
  129. package/server/src/task/task-recovery.mjs +12 -2
  130. package/server/src/task/task-scheduler.mjs +5 -5
  131. package/server/src/task/task-state.mjs +13 -0
  132. package/server/src/transport/gateway-client-transport.mjs +16 -0
  133. package/server/src/voice/announcement/announcement-manager.mjs +3 -0
  134. package/server/src/voice/providers/dashscope.mjs +34 -30
  135. package/server/src/voice/providers/doubao-seeduplex.mjs +13 -9
  136. package/server/src/voice/providers/google-live.mjs +18 -13
  137. package/server/src/voice/providers/gpt-live.mjs +13 -10
  138. package/server/src/voice/providers/minicpm-o.mjs +9 -7
  139. package/server/src/voice/providers/registry.mjs +2 -2
  140. package/server/src/voice/providers/runtime-configuration.mjs +23 -0
  141. package/server/src/voice/providers/s2s.mjs +9 -7
  142. package/server/src/voice/providers/stepfun.mjs +13 -10
  143. package/server/src/voice/realtime-input-runtime.mjs +2 -0
  144. package/server/src/voice/realtime-presentation-runtime.mjs +90 -23
  145. package/server/src/voice/realtime-provider.mjs +26 -9
  146. package/server/src/voice/realtime-session-runtime.mjs +79 -23
  147. package/server/src/voice/realtime-task-presentation.mjs +2 -0
  148. package/shared/backend/catalog.mjs +44 -45
  149. package/shared/backend/install.mjs +15 -17
  150. package/shared/backend/runtime-package.mjs +3 -3
  151. package/shared/backend/setup.mjs +59 -113
  152. package/shared/gateway/client-sdk.mjs +6 -1
  153. package/shared/gateway/setup.mjs +13 -1
  154. package/shared/protocol/gateway-client-protocol.mjs +14 -0
  155. package/shared/protocol/gateway-events.mjs +8 -1
  156. package/shared/realtime-legacy-environment.mjs +52 -0
  157. package/shared/realtime-model-catalog.mjs +66 -194
  158. package/shared/realtime-models/README.md +25 -0
  159. package/shared/realtime-models/dashscope.mjs +46 -0
  160. package/shared/realtime-models/doubao-seeduplex.mjs +12 -0
  161. package/shared/realtime-models/google-live.mjs +10 -0
  162. package/shared/realtime-models/gpt-live.mjs +10 -0
  163. package/shared/realtime-models/profile.mjs +35 -0
  164. package/shared/realtime-models/stepfun.mjs +10 -0
  165. package/shared/realtime-provider-catalog.mjs +16 -5
  166. package/shared/realtime-provider-definitions.mjs +99 -231
  167. package/shared/runtime-environment.mjs +23 -30
  168. package/shared/skill-library.mjs +49 -13
  169. package/shared/web-search-configuration.mjs +13 -2
  170. package/tui/package.json +1 -1
  171. package/web/dist/assets/index-8erKDCr2.css +1 -0
  172. package/web/dist/assets/index-Cs4hYWbS.js +96 -0
  173. package/web/dist/index.html +2 -2
  174. package/config/backends/deepseek-harness/cordis.yml +0 -59
  175. package/scripts/runtime/deepseek-harness-acp.mjs +0 -59
  176. package/web/dist/assets/index-BRaiI-dW.js +0 -91
  177. package/web/dist/assets/index-D9k8R2JY.css +0 -1
@@ -43,7 +43,7 @@ final ASR
43
43
  Task accepted
44
44
  │ response returns to Realtime immediately
45
45
  ▼
46
- owner FIFO queue
46
+ bounded owner queue
47
47
  │
48
48
  ▼
49
49
  configured BackendPort
@@ -56,8 +56,13 @@ final ASR
56
56
  ```
57
57
 
58
58
  `spawn_thinking` never waits for the requested work. The user can continue
59
- speaking while multiple Task items are queued. For each owner, only one Task
60
- item is sent into the configured BackendPort at a time.
59
+ speaking while work runs. Task admission defaults to one active slot globally and one
60
+ per owner; later requests queue while those slots are occupied. A directly executed task
61
+ retains its slot while awaiting input or permission. After an ACP coordinating turn dispatches
62
+ independent work, it releases both its admission slot and coordinator lease while the child
63
+ Sessions run. Those Sessions are not counted against the task-admission limits. Replies and
64
+ targeted updates continue existing work; new work never implicitly cancels it. ACP uses one
65
+ coordinator Session regardless of the configured admission limits.
61
66
 
62
67
  ## 3. Realtime boundary
63
68
 
@@ -66,7 +71,7 @@ tool calls alone do not require backend execution. Tools have two prompt-ownersh
66
71
 
67
72
  | Contract | Tools |
68
73
  | --- | --- |
69
- | Core contract | `spawn_thinking`, `get_agent_task_status`, `cancel_agent_task`, `respond_permission`, `respond_agent_input`, `get_current_time` |
74
+ | Core contract | `spawn_thinking`, `update_agent_task`, `get_agent_task_status`, `cancel_agent_task`, `respond_permission`, `get_current_time` |
70
75
  | Optional capabilities | `memory`, `web_search`, `fetch_url`, `knowledge`, `recall`, `notes`, `schedule_reminder`, `enter_sleep`; dynamic MCP tools are also configuration-dependent |
71
76
 
72
77
  The fixed `config/frontend-agent/PROMPT.md` may name only core-contract tools.
@@ -85,15 +90,23 @@ Core versus optional is a prompt-maintenance convention, not a runtime classific
85
90
  the core-tool allowlist lives only in boundary tests. The registry stores tool definitions
86
91
  and optional, effective runtime policies such as capability requirements, result-size
87
92
  limits, and repeat handling. Tools need no group or execution-mode label. An unconfigured
88
- backend hides `spawn_thinking`; confirmation tools are exposed only for real pending
89
- requests. Even core-contract tools cannot be called when unavailable. Tests check the
90
- fixed prompt, tool references, and capability switches to keep new optional features
93
+ backend hides `spawn_thinking` and `update_agent_task`; `respond_permission` is exposed
94
+ only for real pending permission requests. Even core-contract tools cannot be called
95
+ when unavailable. Tests check the fixed prompt, tool references, and capability switches to keep new optional features
91
96
  out of core rules.
92
97
 
93
98
  The Gateway exposes `respond_permission` for pending backend permissions.
94
99
  The model answers the permission request; the Gateway resolves the request
95
100
  and its associated Task before forwarding the decision.
96
101
 
102
+ `update_agent_task` forwards a user's instruction to existing work. When an input
103
+ request is pending, the same tool answers it; an optional `input_request_id` binds
104
+ the exact request. Confirmation, refusal, and changed requirements remain natural
105
+ language in `instruction`; the backend interprets the reply in the original context.
106
+ The Gateway does not classify keywords or treat an omitted decision as approval.
107
+ Otherwise, updating work depends on the backend's steering support. `cancel_agent_task` stops the whole
108
+ task. The client Gateway protocol retains its separate `task.input.respond` command.
109
+
97
110
  `memory` maintains two ordinary Markdown documents through one flat interface. Each call is one
98
111
  atomic `read`, `append`, or `replace` operation. `replace` locates a unique source fragment, and
99
112
  fails safely if that fragment is missing or ambiguous. Realtime may issue several calls
@@ -173,17 +186,18 @@ enable its associated tool, and is not persisted into conversation history.
173
186
  The `objective` passed to `spawn_thinking` is a conservative interpretation of
174
187
  the user's request, not an execution plan. It must resolve references such as
175
188
  “continue that page” into one self-contained instruction before submission.
176
- That instruction is the only model-visible task text sent to the backend; the
177
- verbatim ASR is not appended as a second task description. The backend Agent
178
- does not receive the frontend persona, durable memory, or recent chat history.
179
- Execution-relevant facts must be resolved into the instruction instead of
180
- forwarding those documents.
189
+ That instruction remains the execution request; verbatim ASR is not appended as a
190
+ second task description. The runtime may supplement it with up to 2,000 characters of
191
+ new user/assistant dialogue. Delivered dialogue is tracked per coordinator Session so
192
+ later turns do not repeatedly append the same history. The dialogue is reference context,
193
+ not new work. Tool calls, tool results, raw backend output, frontend persona, and durable
194
+ memory are not copied into this context. No new frontend tool is introduced.
181
195
 
182
196
  A backend turn may return a result or ask for information, a choice,
183
197
  confirmation, or clarification required to continue. The frontend presents
184
- that need naturally. When the user answers, it calls `spawn_thinking` again as
185
- a continuation of the same work instead of predicting or simulating the next
186
- backend action. This rule does not depend on the wording of a particular case.
198
+ that need naturally. When the user answers, it calls `update_agent_task` with
199
+ the same task ID instead of predicting or simulating the next backend action.
200
+ This rule does not depend on the wording of a particular case.
187
201
 
188
202
  The Gateway automatically carries current-turn attachments as native protocol
189
203
  parts, never as a model-visible JSON manifest. Only work that explicitly
@@ -193,33 +207,45 @@ and routing remain structured Gateway/BackendPort data and are not placed in
193
207
  the backend Agent's instruction. The working directory and user time zone are
194
208
  not repeated in every prompt; protocol or backend runtime context owns them.
195
209
 
196
- ## 4. Fixed Backend Agent Session
210
+ ## 4. Persistent Backend Agent Sessions
197
211
 
198
212
  The coordination Session here belongs to the ACP backend integration, not the framework's Orchestration Runtime.
199
213
  The runtime manages work through `BackendPort`; A2A and custom backends need not use the same Session structure.
200
214
 
201
- The ACP adapter owns one persistent coordinator Session identity per owner and
202
- backend:
203
-
204
- ```text
205
- qwen-audio-agent:<owner>:backend
206
- ```
207
-
208
- The Gateway stores the native ACP Session ID behind that stable key and calls
209
- `session/resume` on later turns. Project delegation likewise resumes the
210
- selected native Session in its recorded working directory, so voice-originated
211
- work remains in the backend's own Session history rather than a Gateway copy.
212
-
213
- Voice browser session IDs and Task IDs never change that identity. A new voice
214
- conversation therefore continues using the same backend Agent context.
215
-
216
- Both the Gateway queue and the ACP adapter serialize writes. This double guard
217
- prevents concurrent messages from racing inside one backend Session.
218
-
219
- The backend Agent owns its execution strategy. qwen-audio-agent supplies one
220
- self-contained natural task instruction and current-turn native attachments;
221
- it does not forward frontend history or preferences, prescribe task-state
222
- JSON, or instruct the backend Agent how to use backend-specific capabilities.
215
+ The ACP adapter maintains one persistent coordinator Session per owner and backend.
216
+ A FIFO queue serializes its request, update, and result-summary turns. The lease covers
217
+ only the coordinator turn, not independent project execution. The Gateway records the
218
+ native ACP Session ID and restores it when needed; project Session continuations use their
219
+ recorded working directories. History remains owned by the backend.
220
+
221
+ Updates use recorded execution targets rather than whichever Session happens to be idle.
222
+ For independent work, every update goes through the coordinator, which selects the original
223
+ project Session via `session_send`; the adapter then steers or continues that Session.
224
+ Only a successful target submission confirms delivery, not the coordinator's reply text.
225
+ Directly executed work can continue after completion when its original context remains
226
+ available. Completed framework-owned ACP delegation can also continue: the runtime passes opaque
227
+ backend context, and the adapter restores the original coordinator and validates its project bindings
228
+ before side effects. ACP's private continuation contains `version: 1`, the original coordinator
229
+ `token`, and `projects` entries with `sessionId`, `directory`, and `title` (an empty array for direct
230
+ work). A delegated continuation turn allows `session_send` only to those bound projects, forbids
231
+ `session_start`, and must actually submit to a target to succeed. Durable project bindings are
232
+ separate from this turn's executions, so unchanged sibling projects are not rerun. Older ACP contexts
233
+ without this versioned binding fail explicitly, without guessing or migration; native delegations
234
+ without a reliable targeted continuation entry point provide no continuation context. A busy
235
+ coordinator queues the next turn instead of steering another task.
236
+
237
+ Task-admission limits do not create additional coordinator Sessions or cap the number of
238
+ independent project Sessions. Separate Sessions do not isolate working directories, files,
239
+ or external resources.
240
+
241
+ The persistent coordinator routes execution and synthesizes results. It uses a project Session for
242
+ work with a distinct goal that benefits from sustained, independent execution. Brief operations,
243
+ clarification, and result synthesis stay in the coordinator Session. Related follow-ups continue in
244
+ the original project Session rather than creating another; the user does not need to request a
245
+ separate Session. It may dispatch several independent tasks in one turn, then ends the turn without
246
+ waiting, polling, or repeating delegated work locally. Backends without delegation handle the request directly.
247
+ The backend receives natural instructions, bounded dialogue context, and native attachments;
248
+ it is not required to emit task-state JSON.
223
249
 
224
250
  ## 5. Task state
225
251
 
@@ -297,22 +323,24 @@ established only after the Session tool creates or continues the target work
297
323
  and returns run and Session identifiers validated by the adapter. It is not
298
324
  established by a model-authored field. ACP faithfully carries the tool call,
299
325
  tool result, and turn termination; the adapter publishes the validated
300
- correlation to the TaskManager, which moves the original Task to `delegated`
301
- and releases both the backend Agent serialization lock and the Task scheduler
302
- lane. Other voice requests can therefore use the coordinator while the target
303
- Session runs.
304
-
305
- The coordinator may naturally end its ACP turn after the tool succeeds, but
306
- that text neither controls task state nor acts as a completion signal.
326
+ correlation to the TaskManager, which moves the original Task to `delegated`.
327
+ Once the coordinating turn ends, the adapter releases its coordinator lease and marks
328
+ the delegation as yielding task admission. The TaskManager releases that admission slot
329
+ without completing the Task, allowing later requests to reach the same coordinator while
330
+ project Sessions run. Other adapters retain their normal admission behavior unless they
331
+ explicitly yield it.
332
+
333
+ After successful dispatch or continuation, the coordinator ends its ACP turn without waiting
334
+ for the delegated work. Its text neither controls task state nor acts as a completion signal.
307
335
  Correlation IDs, the target Session, and lifecycle stay in the Gateway Task
308
336
  registry and adapter runtime; the model never has to echo them.
309
337
 
310
338
  The adapter independently keeps the Task lifecycle and event subscription
311
- alive. Only the matching ACP target prompt completion correlated to the
312
- delegation ID can advance the Task. The adapter then briefly reacquires the
313
- backend Agent lock and sends the verified result, including its native
314
- ContentBlocks, back for a final natural answer. A busy target, an empty result,
315
- an unrelated Session update, or an older result cannot complete the Task.
339
+ alive. Only matching ACP target prompt completions correlated to recorded delegations
340
+ can advance the Task. With several targets, the adapter waits for all of them. Verified
341
+ results and native ContentBlocks then enter the same coordinator queue for one final
342
+ natural answer. That result-summary turn cannot dispatch or restart work. A busy target,
343
+ an empty result, an unrelated Session update, or an older result cannot complete the Task.
316
344
 
317
345
  ACP Agent turns have no artificial wall-clock deadline. An initial coordinator
318
346
  turn, a delegated target turn, and the final synthesis turn end only when ACP
@@ -343,21 +371,30 @@ Qoder, Qwen Code, MiniMax Code, and Kimi Code, the Gateway injects the same five
343
371
  coordinator: Session list, start, send, status, and cancel. OpenClaw ACP does
344
372
  not accept client-supplied MCP servers, so the same coordination contract maps
345
373
  to OpenClaw's native Session tools. `session_start` and `session_send` return an
346
- opaque delegation ID. After either succeeds, the backend Agent must not poll,
347
- repeat the work, or answer from its own context; the adapter owns waiting,
348
- cancellation, permission routing, and result correlation.
349
-
350
- The coordinator MCP server also publishes the stable coordination contract
351
- through the MCP initialization `instructions` field. Backends whose drivers
352
- declare `coordinatorMcpInstructions` receive only the dynamic natural task
353
- instruction on each turn; this avoids appending the same routing and response
354
- rules to the persistent Session history. The capability is enabled only after the Agent host
355
- has been verified to project MCP server instructions into model context; it
356
- currently applies to OpenCode, Qoder, Qwen Code, and Claude Code. The shared
357
- payload stays within a 2 KiB portability budget. Unverified Agents—or a future
358
- payload that exceeds that budget—keep the complete per-turn prompt as a safe
359
- fallback. This flag does not describe general MCP support. Project Sessions
360
- never receive the coordinator MCP server.
374
+ opaque delegation ID. The coordinator can dispatch several independent Sessions, then
375
+ ends its turn without polling, repeating work, or claiming completion. The adapter owns
376
+ waiting, cancellation, permission routing, and result correlation.
377
+
378
+ All ACP coordinator Sessions prefix their prompts with the full stable instructions on
379
+ rounds 1, 21, 41, and so on; other rounds carry the dynamic task instruction without that
380
+ prefix. Accepted logical rounds are counted per Session and persisted across restarts.
381
+ Execution, update routing, and result synthesis count; internal tool iterations, steering
382
+ within a round, and restarts do not. Older Sessions without a count receive the prefix on
383
+ their next accepted round. The interval of 20 is a global internal constant, not a user
384
+ setting. Refreshes neither recreate Sessions nor change contract versions.
385
+
386
+ The common rules and backend-specific notes have one source, shared by the periodic
387
+ prefix and the optional MCP initialization response's `instructions` field. Backends
388
+ without delegation omit project-routing rules. MCP instructions are published only when
389
+ the driver declares `coordinatorMcpInstructions` and the payload fits the 2 KiB portability
390
+ budget; the capability is currently enabled for OpenCode, Qoder, Qwen Code, Claude Code,
391
+ and Codex. Other backends, or payloads exceeding that budget, use the same periodic prefix,
392
+ not a full per-round fallback. This flag does not control general MCP support or tool
393
+ availability. Project and isolated Sessions are unchanged and receive neither the
394
+ coordinator MCP server nor these refreshes.
395
+
396
+ This is a periodic reminder, not detection of backend context compaction or a guarantee
397
+ that rules survive it. Token savings have not been established.
361
398
 
362
399
  `session_status` is observational only. If the query fails, the backend Agent
363
400
  must report the failure; it must not inspect the target directory with native
@@ -572,5 +609,5 @@ Before merging a change, verify:
572
609
  5. Is completion spoken only from a final backend Agent result?
573
610
  6. Does the UI use host lifecycle APIs for its local Gateway, without bypassing it to manage backend processes directly?
574
611
  7. Can interruption postpone speech without cancelling submitted Task?
575
- 8. Do tests cover FIFO serialization, fixed Session reuse, tool animation, and
612
+ 8. Do tests cover bounded concurrency, task-bound Session reuse, tool animation, and
576
613
  delivery retry?
@@ -37,7 +37,7 @@ final ASR
37
37
  Task accepted
38
38
  │ response returns to Realtime immediately
39
39
  ▼
40
- owner FIFO queue
40
+ bounded owner queue
41
41
  │
42
42
  ▼
43
43
  configured BackendPort
@@ -49,8 +49,12 @@ final ASR
49
49
  Realtime naturally speaks the result
50
50
  ```
51
51
 
52
- `spawn_thinking` 永不等待所请求的工作完成。用户可以在多个 Task 项排队期间继续
53
- 说话。对于每个 owner,一次只有一个 Task 项被发送到配置的 BackendPort。
52
+ `spawn_thinking` 永不等待所请求的工作完成。后台执行期间用户仍可继续说话。
53
+ 任务准入默认全局和每个 owner 各有一个活动名额,名额占用时后续请求排队。
54
+ 直接执行中的任务在等待输入或权限时仍占用名额;ACP 协调轮次派出独立工作并结束后,
55
+ 释放任务准入名额和协调 Session 租约,项目 Session 继续执行,其数量不受准入上限控制。
56
+ 回答追问或定向调整继续作用于原任务,新工作不会隐式取消已有工作。
57
+ 无论如何配置任务准入上限,ACP 都只使用一个协调 Session。
54
58
 
55
59
  ## 3. 实时边界
56
60
 
@@ -59,7 +63,7 @@ final ASR
59
63
 
60
64
  | 契约 | 工具 |
61
65
  | --- | --- |
62
- | 核心契约 | `spawn_thinking`、`get_agent_task_status`、`cancel_agent_task`、`respond_permission`、`respond_agent_input`、`get_current_time` |
66
+ | 核心契约 | `spawn_thinking`、`update_agent_task`、`get_agent_task_status`、`cancel_agent_task`、`respond_permission`、`get_current_time` |
63
67
  | 可选能力 | `memory`、`web_search`、`fetch_url`、`knowledge`、`recall`、`notes`、`schedule_reminder`、`enter_sleep`;动态 MCP 工具同样随配置提供 |
64
68
 
65
69
  固定的 `config/frontend-agent/PROMPT.md` 只可点名核心契约工具,维护对话、工作受理与结果、
@@ -72,13 +76,19 @@ Prompt 或核心工具中反向引用;可选工具之间也不写死对方的
72
76
 
73
77
  核心与可选是提示词维护约定,不是运行时分类;核心工具名单仅保留在边界测试中。
74
78
  注册表只保存工具定义和实际生效的可选策略,例如能力要求、结果大小限制和重复调用处理,
75
- 不要求工具声明分组或执行模式。未配置后台时不提供 `spawn_thinking`,待确认工具仅在
76
- 存在真实请求时提供;即使属于核心契约,未提供的工具也不能调用。测试检查固定 Prompt、
77
- 工具引用和能力开关,防止新增可选能力重新耦合进核心规则。
79
+ 不要求工具声明分组或执行模式。未配置后台时不提供 `spawn_thinking` 和 `update_agent_task`,
80
+ `respond_permission` 仅在存在真实待确认权限时提供;即使属于核心契约,未提供的工具也不能调用。
81
+ 测试检查固定 Prompt、工具引用和能力开关,防止新增可选能力重新耦合进核心规则。
78
82
 
79
83
  当 Gateway 存在待确认的后台权限时,提供 `respond_permission`。
80
84
  模型只回答权限请求;Gateway 负责查找请求及其关联 Task,再转发决定。
81
85
 
86
+ `update_agent_task` 把用户的指令交回已有工作;有待补充输入时,同一工具直接回答该请求,
87
+ 可通过 `input_request_id` 绑定具体请求。确认、拒绝或修改要求都以自然语言写入 `instruction`,
88
+ 由后台结合原上下文解释;Gateway 不按关键词分类,也不把缺省决定当作批准。
89
+ 没有待补充输入时,能否调整工作取决于后台的 steering 能力。
90
+ 终止整项工作使用 `cancel_agent_task`。客户端 Gateway 协议仍保留独立的 `task.input.respond` 命令。
91
+
82
92
  `memory` 通过一个扁平接口维护两份普通 Markdown 文档。每次调用只执行一个
83
93
  原子操作:`read`、`append` 或 `replace`;`replace` 使用唯一匹配的原文定位,
84
94
  找不到或匹配多处时安全失败。同一轮可逐项调用多次,Gateway 合并后续回应。
@@ -136,13 +146,14 @@ PermissionPolicy 由语音、客户端命令和定时工作共用,以 BackendP
136
146
  不能启用相应工具,也不会写入持久对话。
137
147
 
138
148
  传递给 `spawn_thinking` 的 `objective` 是对用户请求的保守解释,而非执行计划。
139
- 提交前必须结合当前对话把"继续那个页面"之类的指代解析成一条自包含指令。该指令就是
140
- 后台 Agent 唯一收到的模型可见文本;ASR 原文不再作为第二份任务描述附加。后台 Agent
141
- 不接收前台人格、长期记忆或最近聊天历史;与执行有关的事实必须先解析进指令,而不是
142
- 转发这些文档。
149
+ 提交前结合当前对话把"继续那个页面"之类的指代解析成自包含指令。该指令仍是执行依据,
150
+ ASR 原文不作为第二份任务描述附加。运行时可额外补充最多 2,000 字符的新增人机对话,
151
+ 按协调 Session 跟踪已投递位置,避免后续轮次反复附加相同历史。对话仅供理解背景,
152
+ 不构成新的执行要求;不复制工具调用、工具结果、后台原始输出、前台人格或长期记忆。
153
+ 这一机制不增加前台工具。
143
154
 
144
155
  一次后台轮次可以返回结果,也可以提出继续工作所需的问题、选择、确认或补充信息。
145
- 前台自然转达后者;用户随后回答时,再通过 `spawn_thinking` 以同一工作的续办关系提交,
156
+ 前台自然转达后者;用户随后回答时,通过 `update_agent_task` 交回同一工作 ID,
146
157
  而不是在前台推测或模拟后续执行。这一语义不依赖具体问题内容或关键词。
147
158
 
148
159
  当前轮附件由 Gateway 自动作为协议原生 Part 随任务传递,而不是放入模型可见的 JSON
@@ -151,30 +162,35 @@ Gateway 分配的会话内输入 ID。Task ID、owner、生命周期、时间戳
151
162
  Gateway/BackendPort 的结构化数据,不进入后台 Agent 的任务指令。工作目录和用户
152
163
  时区也不重复拼入每轮文本;协议或后台自身的运行上下文负责这些信息。
153
164
 
154
- ## 4. 固定后端 Agent Session
165
+ ## 4. 持久后端 Agent Session
155
166
 
156
167
  这里的“协调 Session”属于 ACP 后台接入,不是框架的编排运行时。
157
168
  编排运行时通过 `BackendPort` 管理工作,不要求 A2A 或自定义后台提供同样的 Session 结构。
158
169
 
159
- ACP 适配器为每个 owner 和后端拥有一个持久协调器 Session 身份:
160
-
161
- ```text
162
- qwen-audio-agent:<owner>:backend
163
- ```
164
-
165
- Gateway 在该稳定键之后存储原生 ACP Session ID,并在后续轮次调用
166
- `session/resume`。项目委派同样在其记录的工作目录中恢复选定的原生 Session,
167
- 因此语音发起的工作保留在后端自己的 Session 历史中,而非 Gateway 副本中。
168
-
169
- 语音浏览器会话 ID 和 Task ID 不会更改该身份。因此,新的语音对话会继续使用
170
- 相同的后端 Agent 上下文。
171
-
172
- Gateway 队列和 ACP 适配器都对写入进行串行化。这种双重保护防止并发消息在一个
173
- 后端 Session 内部发生竞争。
174
-
175
- 后端 Agent 拥有自己的执行策略。qwen-audio-agent 只提供一条自包含自然任务指令和
176
- 当前轮次的协议原生附件;它不转发前台历史或偏好,不规定状态 JSON,也不指导后端
177
- Agent 如何使用后端特定能力。
170
+ ACP 适配器为每个 owner 和后端维护一个持久协调 Session。
171
+ 请求、调整和结果整理共用 FIFO 队列,租约只覆盖协调轮次,不覆盖独立项目的执行时间。
172
+ Gateway 记录原生 ACP Session ID,在需要时恢复;项目 Session 的续接沿用记录的工作目录。
173
+ 执行历史始终由后台管理。
174
+
175
+ 调整根据已记录的执行目标投递,不选择碰巧空闲的 Session。独立工作的修改统一经过协调 Session,
176
+ 由它通过 `session_send` 选择原项目 Session,再由适配器执行 steer 或续接。
177
+ 只有目标投递成功才算送达,协调模型的口头答复不算。直接执行的工作在完成后,
178
+ 原上下文可用时可以续接;已完成的框架 ACP 委派同样支持续接:Runtime 只转交不透明的后台上下文,
179
+ Adapter 恢复原协调 Session,并在任何副作用前验证项目绑定。ACP 私有 continuation 包含 `version: 1`、
180
+ 原协调 Session 的 `token`,以及记录 `sessionId`、`directory`、`title` 的 `projects` 数组(直接工作为空数组)。
181
+ 委派续接轮次只允许向原绑定项目调用 `session_send`,禁止 `session_start`,没有实际投递目标就不能算成功。
182
+ 持久项目绑定与本轮执行分开记录,不重跑未修改的其他项目。缺少该版本化绑定的旧 ACP 上下文明确报错,
183
+ 不猜测或迁移;没有可靠定向续接入口的原生委派不提供续接上下文。协调 Session 忙时排队,
184
+ 不能把调整发给正在执行的另一项工作。
185
+
186
+ 任务准入上限不会创建额外的协调 Session,也不限制独立项目 Session 的数量。
187
+ Session 分开并不隔离工作目录、文件或外部资源。
188
+
189
+ 持久协调 Agent 负责分派执行并整理结果。对于目标明确独立、适合持续独立执行的工作,使用项目
190
+ Session;简短操作、澄清和结果整理留在协调 Session。相关后续要求继续指向原项目 Session,
191
+ 不另建重复工作;用户无需明确要求单独的 Session。同一轮可以派出多项独立工作,随后结束
192
+ 当前轮次,不等待、不轮询,也不在本地重复执行已委派的工作。不支持委派的后台直接执行请求。
193
+ 后台收到自然语言指令、有界对话背景及原生附件,不需要输出任务状态 JSON。
178
194
 
179
195
  ## 5. Task 状态
180
196
 
@@ -236,18 +252,18 @@ Agent 请求次数耗尽分别进入 Gateway 的取消或失败路径。Gateway
236
252
  Session 工具已经成功创建或续接目标任务,并返回 Adapter 验证过的运行与 Session
237
253
  标识,而不是模型输出的某个字段。ACP 只负责如实传递工具调用、工具结果和当前回合的
238
254
  终止;Adapter 将验证后的关联发布给 TaskManager,后者据此把原始 Task 移至
239
- `delegated`,并释放后端 Agent 串行化锁和 Task 调度通道。因此,其他语音请求可以在
240
- 目标 Session 运行期间使用协调器。
255
+ `delegated`。协调轮次结束后释放协调 Session 租约,并在委派事件中声明让出任务准入名额。
256
+ TaskManager 释放名额但不会把任务标记为完成,因此后续请求可以进入同一协调 Session,
257
+ 项目 Session 同时独立执行。其他 Adapter 不显式让出名额时,保留原有准入行为。
241
258
 
242
- 协调 Agent 可以在工具成功后自然结束当前 ACP 回合,但该文本不控制任务状态,也不会
259
+ 派出或续接成功后,协调 Agent 结束当前 ACP 回合,不等待委派工作完成;该文本不控制任务状态,也不会
243
260
  被解释为完成信号。关联 ID、目标 Session 和生命周期完全保留在 Gateway 的 Task
244
261
  Registry 与 Adapter 运行时中,不要求模型回显。
245
262
 
246
- 适配器独立地保持 Task 生命周期和事件订阅存活。只有与委派 ID 关联的匹配 ACP
247
- 目标提示完成才能完成 Task。然后适配器短暂重新获取后端 Agent 锁,并将经验证的
248
- 结果及其原生 ContentBlock 发送给它整理最终答复。繁忙的目标、空结果、无关的
249
- Session 更新或旧结果
250
- 都无法完成 Task。
263
+ 适配器独立地保持 Task 生命周期和事件订阅存活。只有与已记录委派关联的 ACP 目标轮次
264
+ 完成才能推进 Task;多个目标需要全部结束后统一处理。经验证的结果及原生 ContentBlock
265
+ 重新进入同一个协调队列,整理一次最终答复。结果整理轮次不能再次派出或重启工作。
266
+ 繁忙的目标、空结果、无关的 Session 更新或旧结果都无法完成 Task。
251
267
 
252
268
  ACP Agent 轮次不设人为墙钟超时。初始协调轮次、委派目标轮次和最终整理轮次,
253
269
  只会在 ACP 报告完成、用户显式取消 Task,或后端进程退出/关闭时结束。连接初始化
@@ -269,16 +285,23 @@ ACP Agent 轮次不设人为墙钟超时。初始协调轮次、委派目标轮
269
285
  MiniMax Code 和 Kimi Code),Gateway 向协调器注入相同的五个工具:Session list、start、
270
286
  send、status 和 cancel。OpenClaw ACP 不接受客户端提供的 MCP 服务器,
271
287
  因此相同的协调契约映射到 OpenClaw 的原生 Session 工具。`session_start`
272
- 和 `session_send` 返回不透明的委派 ID。在任一成功后,后端 Agent 不得轮询、
273
- 重复工作或从自己的上下文中回答;适配器负责等待、取消、权限路由和结果关联。
288
+ 和 `session_send` 返回不透明的委派 ID。协调 Agent 可派出多个独立 Session,随后结束
289
+ 当前轮次,不轮询、不重复执行,也不宣称完成;适配器负责等待、取消、权限路由和结果关联。
290
+
291
+ 所有 ACP 协调 Session 统一在第 1、21、41……轮的 Prompt 前缀中注入完整稳定指令;
292
+ 其他轮次只携带动态任务指令,不附加该前缀。已受理的逻辑轮次按 Session 计数并持久化,
293
+ 重启后继续。执行、更新路由和结果整理均计数;内部工具迭代、同一轮的 steer 和重启不计数。
294
+ 没有计数的旧 Session 在下一个受理轮次补充前缀。间隔 20 是全局内部常量,不新增用户配置;
295
+ 刷新不重建 Session,也不变更契约版本。
296
+
297
+ 公共规则与后台专属说明只有一个来源,由定期前缀和可选的 MCP 初始化响应 `instructions`
298
+ 字段共用;不支持委派的后台省略项目路由规则。只有 Driver 声明 `coordinatorMcpInstructions`,
299
+ 且内容不超过 2 KiB 可移植预算时,才发布 MCP instructions。目前为 OpenCode、Qoder、
300
+ Qwen Code、Claude Code 和 Codex 启用此能力。其他后台或超出预算的内容仍使用相同的
301
+ 定期前缀,不回退到每轮注入完整规则。该标志不控制通用 MCP 支持或工具可用性。
302
+ 项目及隔离 Session 保持不变,既不连接协调 MCP Server,也不接收这些刷新。
274
303
 
275
- 协调 MCP Server 还会通过 MCP 初始化响应的 `instructions` 字段发布稳定协调契约。
276
- 后台 Driver 只有在确认 Agent Host 会把 MCP Server instructions 投射进模型上下文后,
277
- 才声明 `coordinatorMcpInstructions`;这些后台每轮只接收动态自然任务指令,避免把
278
- 相同的路由与返回规则反复追加到持久 Session 历史。目前已确认 OpenCode、Qoder、Qwen Code
279
- 和 Claude Code,并将共享内容控制在 2 KiB 的可移植预算内。尚未验证的后台,或未来
280
- 超过预算的内容,继续使用完整的逐轮 Prompt 安全回退。该标志不表示后台是否普遍支持
281
- MCP。项目 Session 不会连接协调 MCP Server。
304
+ 这是定期提醒,不是后台上下文压缩检测,也不保证规则在压缩后仍然保留;尚未证实 Token 节省。
282
305
 
283
306
  `session_status` 仅用于观察。如果查询失败,后端 Agent 必须报告失败;
284
307
  不得使用原生工具检查目标目录或复制委派的工作。
@@ -442,4 +465,4 @@ macOS 桌面渲染器打包在应用程序内部。Electron 从私有的随机
442
465
  5. 完成播报是否仅来自最终后端 Agent 结果?
443
466
  6. UI 是否通过宿主生命周期接口管理本机 Gateway,且不绕过它直接管理后台进程?
444
467
  7. 打断是否能在不取消已提交 Task 的情况下推迟语音?
445
- 8. 测试是否覆盖 FIFO 串行化、固定 Session 复用、工具动画和交付重试?
468
+ 8. 测试是否覆盖有界并发、任务绑定 Session 的复用、工具动画和交付重试?
@@ -64,8 +64,9 @@ external OpenClaw Gateway, a Session model override requires its ACP bridge to a
64
64
  ## OpenCode
65
65
 
66
66
  The Gateway interacts with it via `opencode acp` and manages the local service used
67
- to open the native Session interface. When there is no compatible installation, it automatically
68
- uses a fixed npm package; users do not need to separately install or start the service.
67
+ to open the native Session interface. Existing local installations take priority. The CLI
68
+ uses the latest npm package via `npx` only when no local installation exists and a Bailian key
69
+ and backend model are configured. The desktop app requires an explicit install action.
69
70
  `OPENCODE_BASE_URL` names that local Session UI service; it is not a remote ACP execution
70
71
  endpoint that qwen-audio-agent can attach to:
71
72
 
@@ -267,8 +268,8 @@ changed; the returned ACP `configOptions` remain authoritative.
267
268
  Codex ([openai/codex](https://github.com/openai/codex)) connects via
268
269
  [codex-acp](https://github.com/agentclientprotocol/codex-acp) maintained by the ACP project.
269
270
  The launcher script preferentially binds the `codex` already installed in the user environment,
270
- and preferentially uses the installed `codex-acp`; when the adapter is missing, it uses a fixed
271
- version via `npx`.
271
+ and preferentially uses the installed `codex-acp`; when the adapter is missing, it uses the latest
272
+ version via `npx` in the CLI. The desktop app offers a separate “Install adapter” button.
272
273
 
273
274
  ```dotenv
274
275
  AGENT_PROTOCOL=codex
@@ -292,10 +293,10 @@ CODEX_BASE_URL=
292
293
  ## Claude Code
293
294
 
294
295
  Claude Code connects via
295
- [@zed-industries/claude-code-acp](https://github.com/zed-industries/claude-code-acp)
296
- maintained by Zed. The launcher script preferentially uses the already installed
297
- `claude-code-acp`, otherwise uses a fixed version via `npx`; no separate installation of the
298
- ACP adapter is needed, but Claude Code must be installed and authenticated first.
296
+ [@agentclientprotocol/claude-agent-acp](https://github.com/agentclientprotocol/claude-agent-acp),
297
+ the maintained successor of Zed's deprecated `@zed-industries/claude-code-acp`. The launcher
298
+ script preferentially uses the already installed `claude-agent-acp`. If missing, the CLI can use the latest version via `npx`; the desktop app
299
+ offers “Install adapter” without reinstalling Claude Code. Claude Code must still be authenticated.
299
300
 
300
301
  ```dotenv
301
302
  AGENT_PROTOCOL=claude
@@ -309,7 +310,7 @@ model via ACP. Advanced configuration:
309
310
 
310
311
  ```dotenv
311
312
  CLAUDE_CODE_ACP_BIN=
312
- CLAUDE_CODE_ACP_PACKAGE=@zed-industries/claude-code-acp@0.16.2
313
+ CLAUDE_CODE_ACP_PACKAGE=@agentclientprotocol/claude-agent-acp@0.93.0
313
314
  CLAUDE_CODE_ACP_RUNTIME=auto
314
315
  CLAUDE_WORKSPACE=
315
316
  CLAUDE_CODE_EXECUTABLE=
@@ -322,7 +323,7 @@ Code executable used by the adapter by default.
322
323
 
323
324
  ## DeepSeek
324
325
 
325
- The integration uses local DeepSeek Harness ACP components. Install them, then configure credentials through DeepSeek:
326
+ The integration uses the local DeepSeek CLI's native `dsh --profile acp` entry point. Keep an existing compatible installation; otherwise install it, then configure credentials through DeepSeek:
326
327
 
327
328
  ```bash
328
329
  qwenaudio install deepseek
@@ -333,12 +334,12 @@ Save an API key for `deepseek-official` in DeepSeek Web's “Settings → Models
333
334
 
334
335
  ```dotenv
335
336
  AGENT_PROTOCOL=deepseek
336
- DEEPSEEK_HARNESS_MODEL=deepseek-v4-pro
337
+ QWEN_AUDIO_AGENT_BACKEND_MODEL=
337
338
  ```
338
339
 
339
- You can also supply credentials through `DEEPSEEK_API_KEY`. The launcher defaults to `deepseek-v4-pro`, with `deepseek-v4-flash` as an alternative; it does not inherit the model from a Web session. This integration does not declare ACP Session model configuration, so do not substitute the generic model override for its dedicated startup setting.
340
+ You can also supply credentials through `DEEPSEEK_API_KEY`. Leave the backend model empty to preserve the user's ACP profile settings. Explicit overrides use the standard ACP model configuration interface and fail clearly if rejected. The legacy `DEEPSEEK_HARNESS_MODEL` is only used when the common model setting is empty.
340
341
 
341
- It supports ordinary work, permission requests, cancellation, and results. It does not expose Gateway Session tools, independent task delegation, or native Session history restoration. Capabilities depend on the Harness version; do not infer them from other ACP backends.
342
+ It supports ordinary work, MCP injection, permission requests, cancellation, and results. Gateway-managed independent task delegation and native Session history restoration are not provided yet. Capabilities depend on the Harness version.
342
343
 
343
344
  ## Pi
344
345
 
@@ -414,7 +415,7 @@ qwenaudio install muse
414
415
  muse
415
416
  ```
416
417
 
417
- The Adapter ships with the framework, but `@muse-code/sdk@0.1.1` is **not a
418
+ The Adapter ships with the framework, but `@muse-code/sdk` is **not a
418
419
  default dependency**. The explicit install command (or desktop Install button)
419
420
  installs it under `<QWAUDIO_DATA_DIR>/backends/muse/runtime`; by default this is
420
421
  `~/.config/qwaudio/data/backends/muse/runtime`. An existing Muse executable is
@@ -461,7 +462,7 @@ preconfigured `allowAll` mode and should be used only in a trusted workspace.
461
462
  Gateway task/session grants select only a one-shot Muse choice and never create a
462
463
  provider-persistent approval rule.
463
464
 
464
- This integration pins the experimental Muse SDK `0.1.1`. The first version does
465
+ Installation adds the latest Muse SDK if missing and preserves existing SDK installations. It does
465
466
  not persist Muse Session IDs across Gateway restarts, inject Gateway MCP servers,
466
467
  or fetch full bytes behind MSP `outputRef`; file changes remain in the configured
467
468
  workspace and final text is returned normally. MSP currently accepts inline image
@@ -477,8 +478,9 @@ OpenCode and OpenClaw use a consistent user environment priority order:
477
478
  1. The executable explicitly specified by `OPENCODE_BIN` / `OPENCLAW_BIN`.
478
479
  2. The source directory explicitly specified by `OPENCODE_SOURCE_DIR` / `OPENCLAW_SOURCE_DIR`.
479
480
  3. The `opencode` / `openclaw` already installed by the user in PATH.
480
- 4. When no compatible installation is found, a fixed npm package with the current verified
481
- version is automatically used via `npx`.
481
+ 4. The local OpenClaw Bundle (an explicit `OPENCLAW_BUNDLE_BIN` takes priority over PATH).
482
+ 5. If not installed and a Bailian key and backend model are configured, the CLI can use the
483
+ latest npm package via `npx`. The desktop app requires an explicit install action.
482
484
 
483
485
  Source directories are only used when explicitly configured by the user, without inferring
484
486
  adjacent project directories. To force a particular launch method, configure:
@@ -497,9 +499,8 @@ OPENCODE_PACKAGE=opencode-ai@1.18.5
497
499
  OPENCLAW_PACKAGE=openclaw@2026.6.33
498
500
  ```
499
501
 
500
- The OpenCode ACP integration currently requires OpenCode `1.18.0` or higher. In `auto` mode,
501
- when an older version is discovered, a fixed compatible package is used without modifying the
502
- user's installation; when `installed` is explicitly set, it directly errors.
502
+ The OpenCode ACP integration currently requires OpenCode `1.18.0` or higher. An older installation
503
+ produces an upgrade prompt; it is neither overwritten nor silently replaced by a downloaded runtime.
503
504
  The minimum version can be overridden by `OPENCODE_MIN_VERSION` for validating other
504
505
  compatible versions.
505
506