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.
- package/README.md +15 -5
- package/README_ZH.md +13 -5
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/cli/package.json +1 -1
- package/cli/src/arguments.mjs +4 -1
- package/cli/src/config-command.mjs +5 -6
- package/cli/src/launcher.mjs +13 -0
- package/config/frontend-agent/PROMPT.md +29 -26
- package/desktop/src/i18n.mjs +6 -0
- package/desktop/src/settings-config.mjs +34 -28
- package/desktop/src/settings-store.mjs +19 -28
- package/docs/architecture/deep-dive.md +103 -66
- package/docs/architecture/deep-dive.zh.md +73 -50
- package/docs/backends/configuration.md +21 -20
- package/docs/backends/configuration.zh.md +19 -17
- package/docs/backends/overview.md +14 -8
- package/docs/backends/overview.zh.md +11 -5
- package/docs/configuration/backend.md +16 -2
- package/docs/configuration/backend.zh.md +16 -2
- package/docs/configuration/frontend.md +59 -26
- package/docs/configuration/frontend.zh.md +58 -26
- package/docs/configuration.md +1 -1
- package/docs/configuration.zh.md +1 -1
- package/docs/contract.md +22 -2
- package/docs/contract.zh.md +18 -2
- package/docs/gateway-protocol.md +26 -0
- package/docs/gateway-protocol.zh.md +22 -0
- package/docs/gateway-webrtc-client.md +3 -3
- package/docs/gateway-webrtc-client.zh.md +3 -3
- package/docs/getting-started/install.md +1 -1
- package/docs/getting-started/install.zh.md +1 -1
- package/docs/getting-started/quickstart.md +2 -2
- package/docs/getting-started/quickstart.zh.md +2 -2
- package/docs/getting-started/webui.md +2 -0
- package/docs/getting-started/webui.zh.md +2 -0
- package/docs/guides/knowledge.md +8 -5
- package/docs/guides/knowledge.zh.md +4 -3
- package/docs/guides/tasks.md +63 -2
- package/docs/guides/tasks.zh.md +45 -1
- package/docs/guides/web-search.md +16 -1
- package/docs/guides/web-search.zh.md +14 -1
- package/docs/reference/backend-adapter-sdk.md +33 -2
- package/docs/reference/backend-adapter-sdk.zh.md +29 -2
- package/docs/reference/cli.md +3 -3
- package/docs/reference/cli.zh.md +3 -3
- package/docs/scenarios/lightrag.md +2 -2
- package/docs/scenarios/lightrag.zh.md +2 -2
- package/docs/scenarios/x-omni.md +5 -2
- package/docs/scenarios/x-omni.zh.md +5 -2
- package/docs/voice-agent-architecture-presentation.zh.md +34 -37
- package/docs/voice-frontends/custom-provider.md +6 -3
- package/docs/voice-frontends/custom-provider.zh.md +6 -3
- package/docs/voice-frontends/google-live.md +7 -5
- package/docs/voice-frontends/google-live.zh.md +7 -5
- package/docs/voice-frontends/gpt-live.md +7 -5
- package/docs/voice-frontends/gpt-live.zh.md +7 -5
- package/docs/voice-frontends/minicpm-o.md +8 -4
- package/docs/voice-frontends/minicpm-o.zh.md +7 -4
- package/docs/voice-frontends/qwen-audio-realtime.md +39 -14
- package/docs/voice-frontends/qwen-audio-realtime.zh.md +32 -11
- package/docs/voice-frontends/qwen-omni-realtime.md +11 -8
- package/docs/voice-frontends/qwen-omni-realtime.zh.md +11 -8
- package/docs/voice-frontends/speech-to-speech.md +8 -4
- package/docs/voice-frontends/speech-to-speech.zh.md +7 -3
- package/docs/voice-frontends/stepfun.md +7 -4
- package/docs/voice-frontends/stepfun.zh.md +7 -4
- package/examples/webrtc/start.mjs +2 -1
- package/package.json +22 -14
- package/scripts/audit-dependencies.mjs +3 -25
- package/scripts/electron-smoke.mjs +5 -5
- package/scripts/release-check +13 -21
- package/scripts/runtime/claude-code-acp.mjs +5 -5
- package/scripts/runtime/codex-acp.mjs +1 -1
- package/scripts/runtime/openclaw.mjs +3 -2
- package/scripts/runtime/opencode.mjs +2 -10
- package/scripts/runtime/pi-acp.mjs +1 -1
- package/scripts/verify-package.mjs +0 -2
- package/server/package.json +4 -4
- package/server/src/app/gateway-application.mjs +3 -0
- package/server/src/app/gateway-http-routes.mjs +3 -0
- package/server/src/app/session-conversation-history.mjs +9 -1
- package/server/src/backend/adapters/a2a/backend-adapter.mjs +32 -26
- package/server/src/backend/adapters/acp/backend-adapter.mjs +710 -263
- package/server/src/backend/adapters/acp/coordinator-contract.mjs +2 -13
- package/server/src/backend/adapters/acp/coordinator-instructions.mjs +29 -8
- package/server/src/backend/adapters/acp/coordinator-queue.mjs +58 -0
- package/server/src/backend/adapters/acp/drivers/codex.mjs +1 -1
- package/server/src/backend/adapters/acp/drivers/deepseek-harness.mjs +12 -36
- package/server/src/backend/adapters/acp/drivers/openclaw.mjs +1 -2
- package/server/src/backend/adapters/acp/input-broker.mjs +2 -0
- package/server/src/backend/adapters/acp/process-client.mjs +117 -17
- package/server/src/backend/adapters/acp/session-configuration.mjs +2 -19
- package/server/src/backend/adapters/acp/session-registry.mjs +9 -0
- package/server/src/backend/adapters/acp/session-tools.mjs +1 -1
- package/server/src/backend/adapters/acp/turn-updates.mjs +188 -0
- package/server/src/backend/adapters/acp/work-continuation.mjs +48 -0
- package/server/src/backend/adapters/agent-client.mjs +24 -1
- package/server/src/backend/adapters/llm/backend-adapter.mjs +393 -0
- package/server/src/backend/adapters/muse/backend-adapter.mjs +2 -0
- package/server/src/backend/availability.mjs +12 -3
- package/server/src/backend/backend-adapter-sdk.mjs +3 -0
- package/server/src/backend/backend-port.mjs +13 -0
- package/server/src/backend/backend-work-runtime.mjs +23 -0
- package/server/src/client/client-command-runtime.mjs +14 -0
- package/server/src/conversation/conversation-sync.mjs +26 -2
- package/server/src/conversation/frontend-notes.mjs +7 -5
- package/server/src/conversation/task-result-projector.mjs +1 -1
- package/server/src/core/backend-events.mjs +4 -0
- package/server/src/core/config.mjs +32 -55
- package/server/src/core/gateway-protocol.mjs +4 -1
- package/server/src/core/work-conversation-context.mjs +138 -0
- package/server/src/core/work-input-request.mjs +1 -0
- package/server/src/frontend/frontend-tools.mjs +6 -6
- package/server/src/frontend/retrieval/providers/factory.mjs +10 -1
- package/server/src/frontend/retrieval/providers/mcp.mjs +13 -2
- package/server/src/frontend/tools/agent-task-runtime.mjs +97 -95
- package/server/src/frontend/tools/features/agent-task-tools.mjs +23 -42
- package/server/src/frontend/tools/frontend-tool-context.mjs +2 -2
- package/server/src/frontend/tools/spawn-thinking-tool.mjs +2 -2
- package/server/src/frontend/tools/tool-call-handler.mjs +112 -68
- package/server/src/knowledge/providers/local/library.mjs +26 -6
- package/server/src/knowledge/providers/local/provider.mjs +25 -6
- package/server/src/memory/providers/markdown/context-store.mjs +21 -10
- package/server/src/orchestration/session-task-coordinator.mjs +9 -2
- package/server/src/orchestration/task-operations.mjs +50 -10
- package/server/src/orchestration/task-updates.mjs +81 -0
- package/server/src/task/reminder-scheduler.mjs +5 -1
- package/server/src/task/task-manager.mjs +72 -15
- package/server/src/task/task-recovery.mjs +12 -2
- package/server/src/task/task-scheduler.mjs +5 -5
- package/server/src/task/task-state.mjs +13 -0
- package/server/src/transport/gateway-client-transport.mjs +16 -0
- package/server/src/voice/announcement/announcement-manager.mjs +3 -0
- package/server/src/voice/providers/dashscope.mjs +34 -30
- package/server/src/voice/providers/doubao-seeduplex.mjs +13 -9
- package/server/src/voice/providers/google-live.mjs +18 -13
- package/server/src/voice/providers/gpt-live.mjs +13 -10
- package/server/src/voice/providers/minicpm-o.mjs +9 -7
- package/server/src/voice/providers/registry.mjs +2 -2
- package/server/src/voice/providers/runtime-configuration.mjs +23 -0
- package/server/src/voice/providers/s2s.mjs +9 -7
- package/server/src/voice/providers/stepfun.mjs +13 -10
- package/server/src/voice/realtime-input-runtime.mjs +2 -0
- package/server/src/voice/realtime-presentation-runtime.mjs +90 -23
- package/server/src/voice/realtime-provider.mjs +26 -9
- package/server/src/voice/realtime-session-runtime.mjs +79 -23
- package/server/src/voice/realtime-task-presentation.mjs +2 -0
- package/shared/backend/catalog.mjs +44 -45
- package/shared/backend/install.mjs +15 -17
- package/shared/backend/runtime-package.mjs +3 -3
- package/shared/backend/setup.mjs +59 -113
- package/shared/gateway/client-sdk.mjs +6 -1
- package/shared/gateway/setup.mjs +13 -1
- package/shared/protocol/gateway-client-protocol.mjs +14 -0
- package/shared/protocol/gateway-events.mjs +8 -1
- package/shared/realtime-legacy-environment.mjs +52 -0
- package/shared/realtime-model-catalog.mjs +66 -194
- package/shared/realtime-models/README.md +25 -0
- package/shared/realtime-models/dashscope.mjs +46 -0
- package/shared/realtime-models/doubao-seeduplex.mjs +12 -0
- package/shared/realtime-models/google-live.mjs +10 -0
- package/shared/realtime-models/gpt-live.mjs +10 -0
- package/shared/realtime-models/profile.mjs +35 -0
- package/shared/realtime-models/stepfun.mjs +10 -0
- package/shared/realtime-provider-catalog.mjs +16 -5
- package/shared/realtime-provider-definitions.mjs +99 -231
- package/shared/runtime-environment.mjs +23 -30
- package/shared/skill-library.mjs +49 -13
- package/shared/web-search-configuration.mjs +13 -2
- package/tui/package.json +1 -1
- package/web/dist/assets/index-8erKDCr2.css +1 -0
- package/web/dist/assets/index-Cs4hYWbS.js +96 -0
- package/web/dist/index.html +2 -2
- package/config/backends/deepseek-harness/cordis.yml +0 -59
- package/scripts/runtime/deepseek-harness-acp.mjs +0 -59
- package/web/dist/assets/index-BRaiI-dW.js +0 -91
- package/web/dist/assets/index-D9k8R2JY.css +0 -1
package/docs/contract.zh.md
CHANGED
|
@@ -28,7 +28,7 @@ Delivery、Client Action、参考 Client SDK 与有限回放均落在同一条 W
|
|
|
28
28
|
线协议 7.0 将权限决定 `once` 替换为明确的 Task 级 `task`,Gateway 与客户端
|
|
29
29
|
需要同步更新。Capability ID 保留历史名称,实际线协议版本通过 `session.hello` 协商。
|
|
30
30
|
|
|
31
|
-
当前健康契约版本为 `5.
|
|
31
|
+
当前健康契约版本为 `5.10.0`。新增的 `5.10` 能力通过已认证健康接口公开客户端输入状态,远程结果仅限已认证用户。新增的 `5.9` 能力允许网关主机直接签发设备连接码:
|
|
32
32
|
对话客户端只用一条 WS/WSS 完成认证与业务,本机 HTTP 仅保留为宿主管理面。`5.8` 能力通过 capability 协商提供实时 JPEG
|
|
33
33
|
视觉帧,并把厂商线协议保留在 Realtime Provider Adapter 内。`5.7` 能力提供远程 Client 认证、一次性
|
|
34
34
|
设备配对,以及按用户生效的活动 Client 接管与租约代次 fencing。`5.6` 能力为可替换客户端提供
|
|
@@ -66,6 +66,7 @@ Task 事件提供与 A2A 对齐的 `submitted`、
|
|
|
66
66
|
| `gateway.direct-device-connection` | 仅本机可调用的管理接口签发一个包含可撤销独立设备凭证的短浏览器兼容连接码;原生客户端导入时不需要 HTTP 配对或健康预检,浏览器仅把 fragment Token 换成 HttpOnly Cookie | `server/test/gateway-application.test.mjs`、`test/gateway-remote-access.test.mjs`、`desktop/test/gateway-connection.test.mjs` |
|
|
67
67
|
| `host.electron-entry` | `qwen-audio-agent/electron`:Electron 主进程可直接 `require` 的 CommonJS 入口,一次 `load()` 拿到全部契约 | `test/consumer-install.test.mjs` |
|
|
68
68
|
| `host.gateway-process` | `GatewayProcess` 随包发布:fork、端口回退、就绪握手、重启、计划退出与崩溃分离——桌面版跑的是同一份实现 | `desktop/test/gateway-process.test.mjs` |
|
|
69
|
+
| `input.client-status` | 已认证健康接口公开客户端输入启用、宿主暂停与有效输入状态;远程结果只限所属用户 | `server/test/gateway-application.test.mjs`, `server/test/gateway-client-handshake.test.mjs`, `server/test/realtime-session-runtime.test.mjs` |
|
|
69
70
|
| `input.suspend-protocol` | `POST /api/input/suspend\|resume`、`GET /api/input`;Gateway 通过 `input.suspend` / `input.resume` 把抢占传达给客户端 | `server/test/input-suspend-protocol.test.mjs` |
|
|
70
71
|
| `input.suspend-clears-playback` | 抢占同时清除播报,宿主录音不会录进 Gateway 自己的语音 | `server/test/input-suspend-protocol.test.mjs` |
|
|
71
72
|
| `input.suspend-ttl` | 持有者不主动释放时抢占自行过期 | `server/test/input-arbitration.test.mjs` |
|
|
@@ -267,7 +268,7 @@ startedAt, heartbeatAt }`。定位实例的方式:读租约、探活 `origin`
|
|
|
267
268
|
|
|
268
269
|
## 启动门禁(setup gate)
|
|
269
270
|
|
|
270
|
-
缺少必填的实时语音凭据(`
|
|
271
|
+
缺少必填的实时语音凭据(`QWEN_AUDIO_REALTIME_API_KEY`,或选择 Speech-to-Speech 时的
|
|
271
272
|
服务地址)时,`server/src/index.mjs` 在触碰租约之前即拒绝启动:进程以非零
|
|
272
273
|
退出,错误信息点名每一个缺失的键。`QWEN_AUDIO_ALLOW_UNCONFIGURED=1` 供
|
|
273
274
|
从不建立语音连接的调试场景显式跳过。锁定测试:`test/gateway-setup.test.mjs`、
|
|
@@ -278,3 +279,18 @@ startedAt, heartbeatAt }`。定位实例的方式:读租约、探活 `origin`
|
|
|
278
279
|
发布代码必须能在 `engines` 范围允许的最老 Node 上运行。CI 在该版本上实跑
|
|
279
280
|
测试套件,`test/runtime-baseline.test.mjs` 会在发布代码用到高于基线的 API
|
|
280
281
|
时让构建失败。
|
|
282
|
+
|
|
283
|
+
## 客户端输入状态
|
|
284
|
+
|
|
285
|
+
具备 `input.client-status` 能力时,`GET /api/health` 返回 `voiceInput`:
|
|
286
|
+
|
|
287
|
+
```json
|
|
288
|
+
{"inputEnabled":false,"inputActive":false,"clients":[{"clientType":"cli","inputEnabled":false,"inputSuspended":false,"inputActive":false}]}
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
`inputEnabled` 是运行时接受的客户端输入设置;`inputSuspended` 单独表示宿主暂停。
|
|
292
|
+
`inputActive` 要求输入启用、没有宿主暂停、运行时处于唤醒状态且持有语音所有权。
|
|
293
|
+
它表示运行时输入通道,不能据此证明物理麦克风是否正在采集。仅列出活动语音客户端;
|
|
294
|
+
没有活动客户端时,`inputEnabled` 为 `null`、`inputActive` 为 `false`,`clients` 为空。
|
|
295
|
+
本机管理者可查看各用户汇总,远程调用只返回已认证用户的状态;查询不会占用客户端租约。
|
|
296
|
+
状态不持久化,不包含用户 ID、设备 ID、凭证或媒体内容。
|
package/docs/gateway-protocol.md
CHANGED
|
@@ -66,6 +66,15 @@ creation, and device administration, are outside the interactive GCP Session.
|
|
|
66
66
|
They authenticate independently and never claim or replace the active Client
|
|
67
67
|
lease.
|
|
68
68
|
|
|
69
|
+
Automatic Task-result announcements are scoped to the current owner and session.
|
|
70
|
+
Reconnecting to the same session can resume its pending notifications; opening a
|
|
71
|
+
different session does not announce older-session results. Trusted host code may
|
|
72
|
+
explicitly opt into cross-session notification claims after verifying the recipient.
|
|
73
|
+
Personal identity mode shares one owner and assumes a single trusted user; session
|
|
74
|
+
IDs are not an authentication boundary. Shared-device or telephone integrations must
|
|
75
|
+
use separate authenticated owners for independent users and avoid reusing a
|
|
76
|
+
conversation session across callers.
|
|
77
|
+
|
|
69
78
|
## 3. Connection and negotiation
|
|
70
79
|
|
|
71
80
|
The Client connects to `ws://<gateway>/api/realtime`. The first message is `session.hello`.
|
|
@@ -403,6 +412,7 @@ The active Client uses the same WebSocket for runtime commands and queries. Each
|
|
|
403
412
|
| Command | Direction | Meaning |
|
|
404
413
|
|---|---|---|
|
|
405
414
|
| `task.create` | C→G | Explicitly create an asynchronous Task without impersonating conversational user input |
|
|
415
|
+
| `task.update` | C→G | Update a specified Task with `task_id` and `message.parts`; returns `task.update.result` with `status: accepted/duplicate` and a Task snapshot |
|
|
406
416
|
| `task.get` / `task.list` | C→G | Read one Task or a bounded filtered Task snapshot |
|
|
407
417
|
| `task.cancel` | C→G | Request cancellation of one Task; subsequent lifecycle events report the final state |
|
|
408
418
|
| `permission.respond` | C→G | Resolve the currently pending authorization request |
|
|
@@ -451,6 +461,18 @@ This is the Client runtime control plane. Equivalent internal REST/SSE routes re
|
|
|
451
461
|
|
|
452
462
|
`task.create` is an explicit integration command, not the normal voice-chat path. Conversational requests still reach Task creation through the frontend Agent's tools, preserving its routing and acknowledgement behavior.
|
|
453
463
|
|
|
464
|
+
`task.update` uses the same `tasks.commands` capability. Its `event_id` deduplicates admission
|
|
465
|
+
within the retained Task record. Acceptance is not delivery or completion. The Task's optional
|
|
466
|
+
`updates` list exposes `instruction`, `createdAt`, `status` (`queued`, `pending`, `delivered`,
|
|
467
|
+
`failed`) and an optional `error`. A completed Task continued under the same ID has an incremented
|
|
468
|
+
`revision`; private backend continuation tokens never appear in client snapshots.
|
|
469
|
+
|
|
470
|
+
Backend input events may report `input.status: 'answered'` when the frontend model's
|
|
471
|
+
`update_agent_task` tool forwards a natural-language reply; this is neither approval nor completion.
|
|
472
|
+
The separate `task.input.respond` UI command still requires an explicit `action` (`accept`,
|
|
473
|
+
`decline`, or `cancel`), resolving to `accepted`, `declined`, or `cancelled` respectively.
|
|
474
|
+
The wire `task.update` command remains a work-update API, not a pending-input reply API.
|
|
475
|
+
|
|
454
476
|
### 5.5 Gateway state and presentation
|
|
455
477
|
|
|
456
478
|
Gateway publishes normalized state; the Client renders it without reconstructing Gateway internals:
|
|
@@ -505,6 +527,10 @@ Task replay or the Session Journal.
|
|
|
505
527
|
|
|
506
528
|
`response.done` means generation finished, not that the user heard the response. Delivery workflows that require audible confirmation use playback receipts.
|
|
507
529
|
|
|
530
|
+
When a Client explicitly negotiates capabilities without `playback.receipts`, Gateway provides a generation-only fallback: assistant transcripts are displayed and ordinary conversation records are retained without waiting for playback acknowledgements. Generation completion releases generation-side scheduling; it never creates a synthetic `playback.ended` or confirms audible delivery. Automatic background-result notifications are not claimed for announcement and remain pending. Clients can still display task cards, query results, respond to permissions and cancel tasks. Workflows that require automatic spoken-delivery confirmation must use a Client with playback receipts.
|
|
531
|
+
|
|
532
|
+
The notification restriction applies to audio Clients; explicitly text-only Clients retain their existing text-delivery confirmation. This fallback applies only to explicit capability negotiation. Legacy Clients retain their existing behavior; no new public field or event is introduced. Use a Gateway revision containing this fallback, since older implementations may still wait for receipts before advancing transcripts or scheduling.
|
|
533
|
+
|
|
508
534
|
### 5.7 Local mute and external capture ownership
|
|
509
535
|
|
|
510
536
|
Local mute stops microphone input at the Client and does not disconnect, cancel Tasks, or suppress output. It does not need a Gateway event.
|
|
@@ -55,6 +55,12 @@ HTTPS 换取 Token。浏览器扫码页仅把 fragment 中的 Token 换成 HttpO
|
|
|
55
55
|
端点发布、设备连接码签发与设备管理等 Host 管理请求不属于交互式 GCP Session。
|
|
56
56
|
它们独立完成认证,也不会取得或替换活动 Client 租约。
|
|
57
57
|
|
|
58
|
+
Task 结果自动播报限定在当前 owner 和 session 内。同一 session 重连可恢复其待播报
|
|
59
|
+
通知;新 session 不会自动播报旧 session 的结果。可信宿主代码只有在确认接收人一致后,
|
|
60
|
+
才应显式开启跨 session 通知领取。个人身份模式共享一个 owner,假设只有一位可信用户;
|
|
61
|
+
session ID 不是身份认证边界。共享设备或电话接入应为独立用户配置不同的已认证 owner,
|
|
62
|
+
并避免在不同来电用户之间复用同一个会话 session。
|
|
63
|
+
|
|
58
64
|
## 3. 连接与能力协商
|
|
59
65
|
|
|
60
66
|
Client 连接 `ws://<gateway>/api/realtime`,第一条消息必须是 `session.hello`。
|
|
@@ -363,6 +369,7 @@ WebUI 在实际开始采集、停止、失败时上报视觉状态,不逐帧
|
|
|
363
369
|
| 命令 | 方向 | 语义 |
|
|
364
370
|
|---|---|---|
|
|
365
371
|
| `task.create` | C→G | 显式创建异步 Task,不伪装成对话中的用户输入 |
|
|
372
|
+
| `task.update` | C→G | 用 `task_id` 和 `message.parts` 调整指定 Task;返回 `task.update.result`,包含 `status: accepted/duplicate` 与 Task 快照 |
|
|
366
373
|
| `task.get` / `task.list` | C→G | 查询一个 Task,或读取有界、可筛选的 Task 快照 |
|
|
367
374
|
| `task.cancel` | C→G | 请求取消一个 Task;最终状态由后续生命周期事件报告 |
|
|
368
375
|
| `permission.respond` | C→G | 处理当前等待中的授权请求 |
|
|
@@ -409,6 +416,17 @@ Realtime Session。Provider 不支持会话音色时返回关联错误
|
|
|
409
416
|
|
|
410
417
|
`task.create` 是显式集成命令,不是常规语音聊天路径。对话请求仍由前台 Agent 通过工具创建 Task,以保留它的路由判断和自然承接行为。
|
|
411
418
|
|
|
419
|
+
`task.update` 同样要求 `tasks.commands` 能力。`event_id` 在保留的 Task 记录内用于受理去重;
|
|
420
|
+
受理不表示投递或执行完成。Task 可选的 `updates` 包含 `instruction`、`createdAt`、
|
|
421
|
+
`status`(`queued`、`pending`、`delivered`、`failed`)及可选 `error`。
|
|
422
|
+
已结束的 Task 续接时保持 ID、递增 `revision`;后台续接标识只保存在运行时,不进入客户端快照。
|
|
423
|
+
|
|
424
|
+
前台模型通过 `update_agent_task` 工具转达自然语言答复后,后台输入事件可返回
|
|
425
|
+
`input.status: 'answered'`,不代表批准或完成。
|
|
426
|
+
独立的 `task.input.respond` UI 命令仍要求显式 `action`(`accept`、`decline` 或 `cancel`),
|
|
427
|
+
分别解析为 `accepted`、`declined`、`cancelled`。
|
|
428
|
+
线协议中的 `task.update` 仍是工作调整接口,不是待补充输入的回复接口。
|
|
429
|
+
|
|
412
430
|
### 5.5 Gateway 状态与 Presentation
|
|
413
431
|
|
|
414
432
|
Gateway 发布规范化状态,Client 不需要反向推导内部状态机:
|
|
@@ -461,6 +479,10 @@ Task SSE 路由只写传输层注释心跳。这些注释不会进入 Task 回
|
|
|
461
479
|
|
|
462
480
|
`response.done` 只表示生成完成,不表示用户已经听到。确实需要可听送达确认的工作流使用播放回执。
|
|
463
481
|
|
|
482
|
+
Client 完成显式能力协商且未声明 `playback.receipts` 时,Gateway 提供仅按生成状态推进的降级:展示助手生成字幕、保留普通会话记录,不再等待播放回执。生成完成释放生成侧调度,但绝不补造 `playback.ended` 或确认可听送达。自动后台结果通知不领取,保持 pending;Client 仍可展示任务卡片、主动查询结果、响应权限请求及取消任务。依赖自动语音送达确认的工作流应使用支持播放回执的 Client。
|
|
483
|
+
|
|
484
|
+
通知限制针对音频 Client;显式声明仅文本的 Client 仍按既有文本投递规则确认。该降级仅适用于显式能力协商,传统 Client 的行为不变,不增加公开字段或事件。使用时需要包含这项降级的 Gateway 版本;旧实现可能仍在字幕或调度路径等待回执。
|
|
485
|
+
|
|
464
486
|
### 5.7 本地静音与外部采集占用
|
|
465
487
|
|
|
466
488
|
本地静音只在 Client 停止麦克风输入,不断开连接、不取消 Task、不抑制输出,不需要 Gateway 事件。
|
|
@@ -45,12 +45,12 @@ An alternative source launch is:
|
|
|
45
45
|
```sh
|
|
46
46
|
QWAUDIO_WEBRTC_ENABLED=1 \
|
|
47
47
|
QWEN_AUDIO_REALTIME_PROVIDER=dashscope \
|
|
48
|
-
QWEN_AUDIO_REALTIME_MODEL=qwen-audio-3.
|
|
48
|
+
QWEN_AUDIO_REALTIME_MODEL=qwen-audio-3.1-realtime-plus \
|
|
49
49
|
npm run start --workspace server
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
For Omni, change the model to `qwen3.5-omni-plus-realtime` and restart. Reuse the
|
|
53
|
-
server's existing `
|
|
53
|
+
server's existing `QWEN_AUDIO_REALTIME_API_KEY` and regional/workspace configuration. Never
|
|
54
54
|
enter a provider key in the browser. Requests cannot override the Gateway's
|
|
55
55
|
configured model or upstream URL.
|
|
56
56
|
|
|
@@ -88,7 +88,7 @@ clients, and the response is not cacheable.
|
|
|
88
88
|
### SDP negotiation
|
|
89
89
|
|
|
90
90
|
```http
|
|
91
|
-
POST /api/v1/webrtc/realtime?model=qwen-audio-3.
|
|
91
|
+
POST /api/v1/webrtc/realtime?model=qwen-audio-3.1-realtime-plus&sessionId=my-session
|
|
92
92
|
Authorization: Bearer <Gateway access credential>
|
|
93
93
|
Content-Type: application/sdp
|
|
94
94
|
|
|
@@ -40,12 +40,12 @@ CLI 可用 `qwenaudio gateway --webrtc` 开启同一个入口;先安装依赖
|
|
|
40
40
|
```sh
|
|
41
41
|
QWAUDIO_WEBRTC_ENABLED=1 \
|
|
42
42
|
QWEN_AUDIO_REALTIME_PROVIDER=dashscope \
|
|
43
|
-
QWEN_AUDIO_REALTIME_MODEL=qwen-audio-3.
|
|
43
|
+
QWEN_AUDIO_REALTIME_MODEL=qwen-audio-3.1-realtime-plus \
|
|
44
44
|
npm run start --workspace server
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
另一次测试 Omni 时,将模型改成 `qwen3.5-omni-plus-realtime` 并重启。
|
|
48
|
-
沿用服务器已有 `
|
|
48
|
+
沿用服务器已有 `QWEN_AUDIO_REALTIME_API_KEY` 和地域/Workspace 配置,不需要将 Key 写入示例页。
|
|
49
49
|
同一个 Gateway 本版使用其当前配置的模型,不支持请求级随意覆盖模型或上游地址。
|
|
50
50
|
|
|
51
51
|
默认端口下打开:
|
|
@@ -78,7 +78,7 @@ ICE 配置仅对已认证客户端返回,响应禁止缓存。
|
|
|
78
78
|
### SDP 建连
|
|
79
79
|
|
|
80
80
|
```http
|
|
81
|
-
POST /api/v1/webrtc/realtime?model=qwen-audio-3.
|
|
81
|
+
POST /api/v1/webrtc/realtime?model=qwen-audio-3.1-realtime-plus&sessionId=my-session
|
|
82
82
|
Authorization: Bearer <Gateway access credential>
|
|
83
83
|
Content-Type: application/sdp
|
|
84
84
|
|
|
@@ -98,6 +98,6 @@ for overrides and storage details.
|
|
|
98
98
|
## Obtain a DashScope API Key
|
|
99
99
|
|
|
100
100
|
1. Open the [Bailian API Key page](https://bailian.console.aliyun.com/?tab=model#/api-key), sign in, and create a key.
|
|
101
|
-
2. Enter it in Desktop settings or as `
|
|
101
|
+
2. Enter it in Desktop settings or as `QWEN_AUDIO_REALTIME_API_KEY` in `config.env`.
|
|
102
102
|
|
|
103
103
|
See the [official free-quota guide](https://help.aliyun.com/zh/model-studio/new-free-quota) for eligibility and conditions. Check available quota and billing settings before use. Do not expose keys or commit configuration files.
|
|
@@ -91,6 +91,6 @@ CLI 与桌面版默认共享 `~/.config/qwaudio/config.env`,运行时状态分
|
|
|
91
91
|
## 获取 DashScope API Key
|
|
92
92
|
|
|
93
93
|
1. 打开百炼控制台的 [API Key 页面](https://bailian.console.aliyun.com/?tab=model#/api-key),登录并创建 Key。
|
|
94
|
-
2. 将 Key 填入桌面设置,或写入 `config.env` 的 `
|
|
94
|
+
2. 将 Key 填入桌面设置,或写入 `config.env` 的 `QWEN_AUDIO_REALTIME_API_KEY`。
|
|
95
95
|
|
|
96
96
|
免费额度及适用条件以[百炼官方说明](https://help.aliyun.com/zh/model-studio/new-free-quota)为准。开始前确认账户可用额度与计费设置,不要公开 Key 或提交配置文件。
|
|
@@ -27,8 +27,8 @@ Start in frontend-only mode to verify voice conversation:
|
|
|
27
27
|
|
|
28
28
|
```dotenv
|
|
29
29
|
QWEN_AUDIO_REALTIME_PROVIDER=dashscope
|
|
30
|
-
|
|
31
|
-
QWEN_AUDIO_REALTIME_MODEL=qwen-audio-3.
|
|
30
|
+
QWEN_AUDIO_REALTIME_API_KEY=your-key
|
|
31
|
+
QWEN_AUDIO_REALTIME_MODEL=qwen-audio-3.1-realtime-plus
|
|
32
32
|
AGENT_PROTOCOL=none
|
|
33
33
|
```
|
|
34
34
|
|
|
@@ -27,8 +27,8 @@ qwenaudio config
|
|
|
27
27
|
|
|
28
28
|
```dotenv
|
|
29
29
|
QWEN_AUDIO_REALTIME_PROVIDER=dashscope
|
|
30
|
-
|
|
31
|
-
QWEN_AUDIO_REALTIME_MODEL=qwen-audio-3.
|
|
30
|
+
QWEN_AUDIO_REALTIME_API_KEY=your-key
|
|
31
|
+
QWEN_AUDIO_REALTIME_MODEL=qwen-audio-3.1-realtime-plus
|
|
32
32
|
AGENT_PROTOCOL=none
|
|
33
33
|
```
|
|
34
34
|
|
|
@@ -26,6 +26,8 @@ Options:
|
|
|
26
26
|
| `--session ID` | Resume a specific voice session |
|
|
27
27
|
| `--no-open` | Print the URL only, without opening a browser |
|
|
28
28
|
|
|
29
|
+
Use “Take photo” in the composer to open a camera-only preview. Capture a bounded JPEG, review or retake it, then choose “Add to draft”. The photo remains a normal attachment until you click Send; it can be removed from the draft. Cancel or close the photo dialog to release the camera. This does not start the microphone or continuous visual input. Ordinary photo attachments use the existing attachment processing and retention rules.
|
|
30
|
+
|
|
29
31
|
## What you can do
|
|
30
32
|
|
|
31
33
|
- **Full-duplex voice** — speak and interrupt naturally, with live transcripts.
|
|
@@ -24,6 +24,8 @@ qwenaudio webui
|
|
|
24
24
|
| `--session ID` | 复用指定的语音会话 |
|
|
25
25
|
| `--no-open` | 只打印地址,不打开浏览器 |
|
|
26
26
|
|
|
27
|
+
在输入框点击“拍照”可打开仅使用相机的预览。拍摄有大小限制的 JPEG 后,可查看、重拍或取消,再选择“加入草稿”;照片作为普通附件保留,点击“发送”才提交,也可从草稿中删除。取消或关闭拍照窗口会释放相机,拍照不会启动麦克风或连续视觉输入。照片附件沿用现有附件处理与保留规则。
|
|
28
|
+
|
|
27
29
|
## 能做什么
|
|
28
30
|
|
|
29
31
|
- **全双工语音**——自然说话、随时打断,实时转写同步显示。
|
package/docs/guides/knowledge.md
CHANGED
|
@@ -36,13 +36,16 @@ currently expose a library-management button.
|
|
|
36
36
|
| PDF, Word, PPT, and other complex documents | Converted to Markdown by a configured backend supporting isolated execution; conversion depends on its tools. |
|
|
37
37
|
|
|
38
38
|
Complex documents use an isolated execution session, not the everyday coordinator conversation,
|
|
39
|
-
and do not inherit voice-chat context.
|
|
40
|
-
|
|
39
|
+
and do not inherit voice-chat context. Conversion writes to an isolated temporary file; only a successful,
|
|
40
|
+
validated result updates the library. On conversion failure, the panel shows an import error, the original
|
|
41
|
+
file and previously imported version remain unchanged, and temporary output is removed. You can retry.
|
|
42
|
+
If no converter is available, convert the document to Markdown or TXT yourself before importing it.
|
|
41
43
|
|
|
42
44
|
The built-in library holds up to 40 documents by default. At capacity, it asks you to remove
|
|
43
|
-
unneeded documents instead of silently dropping older entries; existing
|
|
44
|
-
be updated. Imports and conversion targets avoid
|
|
45
|
-
copies no longer shown in the list, so new
|
|
45
|
+
unneeded documents instead of silently dropping older entries; existing documents can still
|
|
46
|
+
be updated, including converted PDF and Word files. Imports and conversion targets avoid
|
|
47
|
+
existing filenames on disk, including retained copies no longer shown in the list, so new
|
|
48
|
+
documents do not overwrite them.
|
|
46
49
|
|
|
47
50
|
## 3. Query and Remove
|
|
48
51
|
|
|
@@ -34,11 +34,12 @@ Gateway 主机。桌面悬浮球与对话面板目前没有资料库管理按钮
|
|
|
34
34
|
| PDF、Word、PPT 等复杂文档 | 由已配置且支持隔离执行的后台 Agent 转成 Markdown;转换能力取决于后台工具环境。 |
|
|
35
35
|
|
|
36
36
|
复杂文档使用隔离的执行会话,不占用日常协调对话,也不继承语音聊天上下文。
|
|
37
|
-
|
|
37
|
+
转换先写入独立临时文件,成功并通过入库校验后才更新资料。转换失败会在面板显示导入错误,
|
|
38
|
+
原始 PDF / Word 和已经收录的版本保持不变,可以重试;没有可用转换器时,可以自行转成 Markdown 或 TXT 后再导入。
|
|
38
39
|
|
|
39
40
|
内置资料库默认最多收录 40 份文档。达到上限时会提示先移除不需要的资料,不会自动
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
移除旧记录;已收录资料仍可更新,包括转换过的 PDF、Word。导入与转换会避开磁盘上
|
|
42
|
+
的已有文件,包括未在列表中显示的旧副本,不会因为同名而覆盖它们。
|
|
42
43
|
|
|
43
44
|
## 3. 使用与移除
|
|
44
45
|
|
package/docs/guides/tasks.md
CHANGED
|
@@ -4,8 +4,8 @@ With a configured [Backend Agent](../backends/overview.md), ask the assistant to
|
|
|
4
4
|
information, edit files, write software, or use the backend's tools and Skills. Execution capabilities,
|
|
5
5
|
authentication, and accessible resources depend on that backend environment.
|
|
6
6
|
|
|
7
|
-
Without a configured backend, the frontend does not expose `spawn_thinking` or
|
|
8
|
-
backend execution. Chat, available frontend tools, and scheduled reminders remain usable. Status
|
|
7
|
+
Without a configured backend, the frontend does not expose `spawn_thinking` or `update_agent_task`,
|
|
8
|
+
or support scheduled backend execution. Chat, available frontend tools, and scheduled reminders remain usable. Status
|
|
9
9
|
and cancellation tools stay available to manage reminders and other existing records.
|
|
10
10
|
|
|
11
11
|
## Start and Continue
|
|
@@ -19,6 +19,67 @@ Work runs asynchronously, so you can keep chatting. Identify the work you mean,
|
|
|
19
19
|
identifier, particularly when several items are active. Native session restoration, independent
|
|
20
20
|
work, and individual tools depend on the backend; one backend's capabilities are not universal guarantees.
|
|
21
21
|
|
|
22
|
+
ACP uses one persistent coordinator Session per owner and backend. Its turns run sequentially;
|
|
23
|
+
starting new work never implicitly cancels existing work. It uses a project Session for work with
|
|
24
|
+
a distinct goal that benefits from sustained, independent execution. Brief operations, clarification,
|
|
25
|
+
and result synthesis stay in the coordinator Session. Related follow-ups continue in the original
|
|
26
|
+
project Session rather than creating another; the user does not need to request a separate Session.
|
|
27
|
+
The coordinator can dispatch several independent tasks in one turn. Backends without delegation
|
|
28
|
+
handle the request directly.
|
|
29
|
+
|
|
30
|
+
After dispatching or continuing independent work, the coordinator ends its turn without waiting,
|
|
31
|
+
polling, or repeating the work locally, and becomes available for another request. The project
|
|
32
|
+
Sessions keep running; their verified results return through the same coordinator queue for a
|
|
33
|
+
final reply. Sessions do not isolate files, working directories, or external resources.
|
|
34
|
+
|
|
35
|
+
`QWEN_AUDIO_AGENT_TASK_MAX_CONCURRENT_PER_OWNER=1` and `QWEN_AUDIO_AGENT_TASK_MAX_CONCURRENT=1`
|
|
36
|
+
remain the default task-admission limits, not limits on the number of project Sessions. A directly
|
|
37
|
+
executed task holds its admission slot, including while awaiting input or permission. ACP delegation
|
|
38
|
+
releases that slot after the coordinating turn ends, so the default does not restrict all independent
|
|
39
|
+
work to one running Session. Increasing these limits does not create more coordinator Sessions.
|
|
40
|
+
|
|
41
|
+
### Conversation Context
|
|
42
|
+
|
|
43
|
+
Alongside the current instruction, the runtime supplies up to 2,000 characters of new user/assistant
|
|
44
|
+
dialogue to help the coordinator resolve references. It tracks delivered dialogue rather than repeatedly
|
|
45
|
+
attaching the whole history. This background is not a new request and does not copy tool calls, tool
|
|
46
|
+
results, raw backend output, the frontend persona, or durable memory. Attachments remain native protocol
|
|
47
|
+
parts. No additional frontend tool is needed.
|
|
48
|
+
|
|
49
|
+
### Update Work in Progress
|
|
50
|
+
|
|
51
|
+
“Also draw a cat” queues new work without cancelling the dog drawing. “Change that dog to a cat”
|
|
52
|
+
updates the existing work. The frontend uses `spawn_thinking` for new work and `update_agent_task`
|
|
53
|
+
for targeted changes and replies, keeping the same work ID and original backend context.
|
|
54
|
+
It clarifies ambiguous references instead of choosing based on whether the backend is busy.
|
|
55
|
+
|
|
56
|
+
- Queued: include new requirements in that work's first execution, without steering another item.
|
|
57
|
+
- Awaiting input: send the user's answer as `instruction` on the same task; an optional
|
|
58
|
+
`input_request_id` identifies the exact request. Preserve confirmation, refusal, and changed
|
|
59
|
+
conditions in the user's natural language; the backend interprets them in the original context.
|
|
60
|
+
Changing conditions does not approve the old preview.
|
|
61
|
+
- Running: use a verified ACP injection extension when available; otherwise cancel the current
|
|
62
|
+
turn, wait for it to finish, and continue in the same session.
|
|
63
|
+
- Independent ACP work: send changes to the coordinator, which forwards them to the original
|
|
64
|
+
project session with `session_send`, even when there is only one project. Routing waits if the
|
|
65
|
+
coordinator is busy; it never steers an unrelated task. A spoken acknowledgement alone is not delivery.
|
|
66
|
+
- Completed, directly executed work: continue under the same ID when the original context remains available. Earlier
|
|
67
|
+
results remain in history. If its original session is busy with another task, wait for that
|
|
68
|
+
session rather than steering the other task.
|
|
69
|
+
- Completed framework-owned ACP delegation: continue under the same work ID through the original
|
|
70
|
+
coordinator, which uses `session_send` only for the project sessions bound to that work. It does
|
|
71
|
+
not create replacement sessions or rerun unchanged sibling projects.
|
|
72
|
+
|
|
73
|
+
Acceptance does not mean the change has taken effect, and interruption does not undo actions.
|
|
74
|
+
Steering changes reset per-task permission grants; session-wide “Always allow” remains effective. Unsupported
|
|
75
|
+
updates, unavailable contexts, and results still being delivered return explicit errors.
|
|
76
|
+
Backend-native delegations without a reliable targeted continuation entry point do not provide
|
|
77
|
+
continuation context. Older ACP continuation contexts without versioned project bindings fail
|
|
78
|
+
explicitly; targets are not guessed or automatically migrated. Running framework-owned ACP
|
|
79
|
+
delegations support targeted updates. After a Gateway restart,
|
|
80
|
+
unconfirmed updates are not replayed automatically. To stop the whole task, use `cancel_agent_task`;
|
|
81
|
+
backend permission decisions still use `respond_permission`.
|
|
82
|
+
|
|
22
83
|
## Understand Work State
|
|
23
84
|
|
|
24
85
|
Acceptance means the request was received, not completed. Cards may show queued, running, waiting
|
package/docs/guides/tasks.zh.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
配置好[后台 Agent](../backends/overview.zh.md)后,可以直接要求助手查询电脑信息、修改文件、
|
|
4
4
|
编写程序或使用后台已有的工具与 Skills。执行能力、登录状态和可操作范围由后台环境决定。
|
|
5
5
|
|
|
6
|
-
未配置后台时,前台不提供 `spawn_thinking`
|
|
6
|
+
未配置后台时,前台不提供 `spawn_thinking` 或 `update_agent_task`,也不能创建定时执行任务;
|
|
7
7
|
聊天、可用的前台工具以及定时提醒仍可使用。工作查询和取消工具保留,用于管理提醒等已有记录。
|
|
8
8
|
|
|
9
9
|
## 发起与继续
|
|
@@ -17,6 +17,50 @@
|
|
|
17
17
|
尤其在同时有多项工作时。是否支持恢复原生会话、独立工作或特定工具,取决于所选后台;
|
|
18
18
|
不能把某个后台的能力当作所有后台的保证。
|
|
19
19
|
|
|
20
|
+
ACP 为每个用户和后台维护一个持久协调 Session,各轮次顺序执行;新增工作不会隐式取消已有工作。
|
|
21
|
+
对于目标明确独立、适合持续独立执行的工作,使用项目 Session;简短操作、澄清和结果整理留在协调
|
|
22
|
+
Session。相关后续要求继续指向原项目 Session,不另建重复工作;用户无需明确要求单独的 Session。
|
|
23
|
+
同一轮可以派出多项独立工作。不支持委派的后台直接执行请求。
|
|
24
|
+
|
|
25
|
+
派出或续接独立工作后,协调 Session 不等待、不轮询,也不在本地重复执行,而是结束当前轮次,
|
|
26
|
+
继续接收其他请求。项目 Session 独立执行,经验证的结果重新进入同一个协调队列,整理最终回复。
|
|
27
|
+
Session 不隔离文件、工作目录或外部资源。
|
|
28
|
+
|
|
29
|
+
`QWEN_AUDIO_AGENT_TASK_MAX_CONCURRENT_PER_OWNER=1` 和 `QWEN_AUDIO_AGENT_TASK_MAX_CONCURRENT=1`
|
|
30
|
+
仍是默认任务准入上限,不是项目 Session 的数量上限。直接执行中的任务占用准入名额,包括等待输入或授权;
|
|
31
|
+
ACP 委派在协调轮次结束后释放名额,因此默认配置不等于所有独立工作只能串行。
|
|
32
|
+
提高这些上限也不会创建更多协调 Session。
|
|
33
|
+
|
|
34
|
+
### 对话上下文
|
|
35
|
+
|
|
36
|
+
除本次指令外,运行时最多补充 2,000 字符的新增人机对话,帮助协调 Agent 理解指代。
|
|
37
|
+
系统跟踪已投递的对话位置,不反复附加完整历史。这些背景不是新的执行要求,也不复制工具调用、
|
|
38
|
+
工具结果、后台原始输出、前台人格或长期记忆。附件仍通过协议原生内容块传递,无需新增前台工具。
|
|
39
|
+
|
|
40
|
+
### 调整正在执行的工作
|
|
41
|
+
|
|
42
|
+
“再画一只小猫”是排队新增工作,不会取消正在绘制的小狗;“把刚才的小狗改成小猫”才是调整。
|
|
43
|
+
前台用 `spawn_thinking` 新建,用 `update_agent_task` 定向补充、修改或回答追问,沿用同一个工作 ID 和原后台上下文。
|
|
44
|
+
指代不清时先确认目标,而不是按“后台是否忙碌”猜测。
|
|
45
|
+
|
|
46
|
+
- 排队中:把新要求合入该工作的首次执行,不影响正在执行的其他工作。
|
|
47
|
+
- 等待输入:用 `instruction` 把用户答复交回同一任务,可用 `input_request_id` 绑定具体请求。
|
|
48
|
+
确认、拒绝或修改条件都保留用户的自然语言,由后台结合原上下文解释;修改条件不代表批准旧预览。
|
|
49
|
+
- 执行中:ACP 后台优先使用已确认支持的注入扩展;否则取消当前轮次,等待结束后在同一会话续接。
|
|
50
|
+
- ACP 独立工作:修改先交给协调 Session,由它通过 `session_send` 转交原项目会话;只有一个项目时也一样。
|
|
51
|
+
协调 Session 忙时排队,不打断其他任务;仅口头确认不算投递成功。
|
|
52
|
+
- 已完成的直接执行工作:原上下文可用时可以继续,仍使用原工作 ID;原来的结果保留在历史中。
|
|
53
|
+
原会话正被其他任务占用时等待该会话空闲,不能把调整发给其他任务。
|
|
54
|
+
- 已完成的框架 ACP 委派:沿用原工作 ID,经原协调 Session 用 `session_send` 续接该工作绑定的项目会话,
|
|
55
|
+
不新建替代会话,也不重跑未修改的其他项目。
|
|
56
|
+
|
|
57
|
+
调整受理不等于已生效,也不会撤销已经执行的操作。改变工作要求时,按任务授予的权限会重新确认,
|
|
58
|
+
会话内“始终允许”保持有效。后台不支持调整、会话不可恢复或结果仍在投递时,会返回明确错误。
|
|
59
|
+
没有可靠定向续接入口的原生后台委托不提供续接上下文。缺少版本化项目绑定的旧 ACP 续接上下文会明确报错,
|
|
60
|
+
不猜测目标或自动迁移;运行中的框架 ACP 委派支持定向调整。
|
|
61
|
+
网关重启后不会自动重发未确认投递的要求,避免重复执行。终止整项工作使用 `cancel_agent_task`,
|
|
62
|
+
后台权限决定仍使用 `respond_permission`。
|
|
63
|
+
|
|
20
64
|
## 看懂工作状态
|
|
21
65
|
|
|
22
66
|
提交成功表示已接受请求,不表示工作完成。卡片可以显示排队、执行中、等待输入或授权、
|
|
@@ -20,6 +20,21 @@ explicitly; it then reuses `DASHSCOPE_API_KEY`:
|
|
|
20
20
|
QWEN_AUDIO_WEB_SEARCH_PROVIDER=bailian
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
+
The built-in [Keenable](https://docs.keenable.ai) preset connects to the
|
|
24
|
+
Keenable Web Search MCP (`https://api.keenable.ai/mcp`) without an account or
|
|
25
|
+
key. Keyless use is rate limited per IP; set `KEENABLE_API_KEY` only to raise
|
|
26
|
+
those limits:
|
|
27
|
+
|
|
28
|
+
```dotenv
|
|
29
|
+
QWEN_AUDIO_WEB_SEARCH_PROVIDER=keenable
|
|
30
|
+
# KEENABLE_API_KEY=your-key
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
With this preset, search queries go to Keenable, and the returned titles,
|
|
34
|
+
snippets and links enter the voice model's context as sources. It always uses
|
|
35
|
+
this endpoint and the `search_web_pages` tool and does not read the
|
|
36
|
+
`QWEN_AUDIO_WEB_SEARCH_MCP_*` settings below.
|
|
37
|
+
|
|
23
38
|
The same provider-neutral adapter can connect to another compatible MCP search
|
|
24
39
|
service. Custom endpoints must provide their own credentials explicitly:
|
|
25
40
|
|
|
@@ -30,7 +45,7 @@ QWEN_AUDIO_WEB_SEARCH_MCP_TOKEN=your-token
|
|
|
30
45
|
QWEN_AUDIO_WEB_SEARCH_MCP_TOOL=web_search
|
|
31
46
|
```
|
|
32
47
|
|
|
33
|
-
Choose `so360` (default), `bing`, `bailian`, `mcp`, or `none`. Setting `none` disables search, not page fetching. Disable both search and page fetching with:
|
|
48
|
+
Choose `so360` (default), `bing`, `bailian`, `keenable`, `mcp`, or `none`. Setting `none` disables search, not page fetching. Disable both search and page fetching with:
|
|
34
49
|
|
|
35
50
|
```dotenv
|
|
36
51
|
QWEN_AUDIO_WEB_TOOLS_ENABLED=false
|
|
@@ -17,6 +17,19 @@ Adapter,只解析一次公开搜索结果页。该基础兜底属于实验性
|
|
|
17
17
|
QWEN_AUDIO_WEB_SEARCH_PROVIDER=bailian
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
+
内置的 [Keenable](https://docs.keenable.ai) 预设无需账号或 Key,即可连接 Keenable
|
|
21
|
+
联网搜索 MCP(`https://api.keenable.ai/mcp`)。免 Key 调用按 IP 限流;设置
|
|
22
|
+
`KEENABLE_API_KEY` 仅用于提高调用额度:
|
|
23
|
+
|
|
24
|
+
```dotenv
|
|
25
|
+
QWEN_AUDIO_WEB_SEARCH_PROVIDER=keenable
|
|
26
|
+
# KEENABLE_API_KEY=your-key
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
启用该预设后,搜索词会发送到 Keenable,返回的标题、摘要和链接作为来源进入语音模型
|
|
30
|
+
上下文。预设固定使用上述地址和 `search_web_pages` 工具,不读取下方的
|
|
31
|
+
`QWEN_AUDIO_WEB_SEARCH_MCP_*` 设置。
|
|
32
|
+
|
|
20
33
|
同一个与供应商无关的 Adapter 也可以接入其他兼容的 MCP 搜索服务;自定义地址必须
|
|
21
34
|
显式提供自己的凭据:
|
|
22
35
|
|
|
@@ -27,7 +40,7 @@ QWEN_AUDIO_WEB_SEARCH_MCP_TOKEN=your-token
|
|
|
27
40
|
QWEN_AUDIO_WEB_SEARCH_MCP_TOOL=web_search
|
|
28
41
|
```
|
|
29
42
|
|
|
30
|
-
可选 `so360`(默认)、`bing`、`bailian`、`mcp` 或 `none`。设置 `none` 只关闭搜索,网页读取工具仍可用;同时关闭搜索和网页读取时设置:
|
|
43
|
+
可选 `so360`(默认)、`bing`、`bailian`、`keenable`、`mcp` 或 `none`。设置 `none` 只关闭搜索,网页读取工具仍可用;同时关闭搜索和网页读取时设置:
|
|
31
44
|
|
|
32
45
|
```dotenv
|
|
33
46
|
QWEN_AUDIO_WEB_TOOLS_ENABLED=false
|
|
@@ -48,7 +48,8 @@ An adapter implements the complete surface:
|
|
|
48
48
|
`start` and `close` are idempotent. `status()` without a Task ID returns
|
|
49
49
|
runtime status; with an ID it addresses only that Gateway Task. `submit`,
|
|
50
50
|
`status`, `cancel`, `respondAuthorization`, and `respondInput` share one `taskId`. Private
|
|
51
|
-
sessions, remote task IDs, and topology
|
|
51
|
+
sessions, remote task IDs, and topology remain adapter-owned; only an opaque continuation
|
|
52
|
+
reference may round-trip through the runtime.
|
|
52
53
|
|
|
53
54
|
`submit(task)` receives a structured internal Task plus one canonical
|
|
54
55
|
`instruction`. An adapter may use routing and correlation fields internally,
|
|
@@ -72,7 +73,28 @@ summarizes, and expresses naturally. An adapter must not prescribe separate
|
|
|
72
73
|
spoken wording. Files, images, and structured output use `artifacts`;
|
|
73
74
|
BackendPort does not prescribe a Conversation Client presentation.
|
|
74
75
|
|
|
75
|
-
Do not
|
|
76
|
+
Do not expose raw protocol objects, session IDs, authentication tokens, or credentials in public results.
|
|
77
|
+
|
|
78
|
+
### Optional Work Updates
|
|
79
|
+
|
|
80
|
+
An adapter may advertise `describe().capabilities.workUpdates: true` and implement
|
|
81
|
+
`update(taskId, { instruction, inputParts }, { ownerId })`. It synchronously admits an update to
|
|
82
|
+
that exact active execution, returning `{ completion: Promise }`. Resolve the promise when
|
|
83
|
+
delivery is acknowledged, not when the work finishes; reject if delivery fails or is ambiguous.
|
|
84
|
+
Never silently create a different Task, replay an uncertain request, or modify another execution.
|
|
85
|
+
Adapters without this capability remain valid and return `update_unsupported` through the runtime.
|
|
86
|
+
|
|
87
|
+
For completed work, `submit` may return a private `continuation: { adapter, token }`. The runtime
|
|
88
|
+
persists this opaque reference and passes it back as `task.resumeContext` on explicit continuation.
|
|
89
|
+
Only the adapter interprets the token; it must verify the original context is available and reject
|
|
90
|
+
otherwise. This is not an authentication token and never enters frontend tool results or client
|
|
91
|
+
snapshots. Existing adapters need not implement continuation.
|
|
92
|
+
|
|
93
|
+
The ACP implementation prefers negotiated `_session/steering`, then an observed
|
|
94
|
+
`craft/drainMidTurnQueue` callback. These are extensions, not standard ACP methods. Otherwise it
|
|
95
|
+
uses standard cancellation and waits for the original `session/prompt` to settle before prompting
|
|
96
|
+
the same Session. Uncertain cancellation blocks reuse of that Session until backend restart.
|
|
97
|
+
This fallback preserves history but cannot undo executed actions or match native mid-turn injection.
|
|
76
98
|
Progress is published through `subscribe` as backend events correlated by
|
|
77
99
|
`taskId` and `ownerId`; a failing observer cannot interrupt execution.
|
|
78
100
|
|
|
@@ -119,6 +141,15 @@ bounded prompt and `text`, `form`, or `url` mode; protocol-native objects and
|
|
|
119
141
|
remote IDs remain private. Adapters without interactive input reject
|
|
120
142
|
`respondInput` explicitly.
|
|
121
143
|
|
|
144
|
+
Natural-language replies use `respondInput(taskId, inputRequestId, { text, values }, { ownerId })`
|
|
145
|
+
without an `action`. Interpret confirmation, refusal, and revisions in the original backend
|
|
146
|
+
context; never default missing actions to approval. The A2A adapter resolves this delivery as
|
|
147
|
+
`input.status: 'answered'`, not `accepted`. Explicit client actions retain the statuses
|
|
148
|
+
`accepted`, `declined`, and `cancelled`. A model-tool receipt of `accepted` acknowledges delivery
|
|
149
|
+
only, not business approval or completion. Native permissions remain separate through
|
|
150
|
+
`respondAuthorization`.
|
|
151
|
+
Protocol-level form acceptance only acknowledges submitted contents; it is not permission approval.
|
|
152
|
+
|
|
122
153
|
## Gateway composition
|
|
123
154
|
|
|
124
155
|
```js
|
|
@@ -46,7 +46,7 @@ Adapter 必须实现全部方法:
|
|
|
46
46
|
|
|
47
47
|
`start` 和 `close` 必须幂等。`status()` 不带 Task ID 时返回运行时状态;带 ID 时只查询
|
|
48
48
|
该 Gateway Task。`submit`、`status`、`cancel`、`respondAuthorization` 和 `respondInput` 共享同一个
|
|
49
|
-
`taskId`。后台私有 Session、远程 Task ID
|
|
49
|
+
`taskId`。后台私有 Session、远程 Task ID 和拓扑由 Adapter 管理;运行时只原样传递不透明的续接引用。
|
|
50
50
|
|
|
51
51
|
`submit(task)` 接收结构化内部 Task 和唯一的规范字段 `instruction`。Adapter
|
|
52
52
|
可以在内部使用路由与关联字段,但面向 Agent 的 ACP Prompt、A2A 文本 Part 或同类
|
|
@@ -67,9 +67,28 @@ Adapter 必须实现全部方法:
|
|
|
67
67
|
不得另行指定播报话术。文件、图片和结构化结果使用 `artifacts`;BackendPort
|
|
68
68
|
不规定 Conversation Client 的具体展示方式。
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
不要在公开结果中暴露原始协议对象、Session ID、认证 Token 或凭据。运行进度通过 `subscribe` 发布
|
|
71
71
|
`taskId`、`ownerId` 关联的标准后台事件;监听器异常不能中断任务。
|
|
72
72
|
|
|
73
|
+
### 可选的工作调整
|
|
74
|
+
|
|
75
|
+
Adapter 可以声明 `describe().capabilities.workUpdates: true`,并实现
|
|
76
|
+
`update(taskId, { instruction, inputParts }, { ownerId })`。该方法同步受理对指定活动执行的调整,
|
|
77
|
+
返回 `{ completion: Promise }`。确认投递后 resolve,不必等待工作完成;失败或结果不明时 reject。
|
|
78
|
+
不得静默新建其他 Task、重放不确定的请求,或修改别的执行。未实现该能力的 Adapter 仍然有效,
|
|
79
|
+
运行时明确返回 `update_unsupported`。
|
|
80
|
+
|
|
81
|
+
为了续接已结束的工作,`submit` 可额外返回私有 `continuation: { adapter, token }`。
|
|
82
|
+
运行时持久化该不透明引用,显式续接时原样通过 `task.resumeContext` 交回。
|
|
83
|
+
只有 Adapter 解释 token,必须校验原上下文仍可用,否则拒绝;它不是认证凭据,
|
|
84
|
+
也不进入前台工具结果和客户端快照。已有 Adapter 无需实现此可选能力。
|
|
85
|
+
|
|
86
|
+
ACP 实现优先使用握手声明的 `_session/steering`,其次使用已观察到的
|
|
87
|
+
`craft/drainMidTurnQueue` 回调。两者都是扩展,不是 ACP 标准方法。
|
|
88
|
+
否则使用标准取消,等待原 `session/prompt` 结束后,再向同一 Session 提交新要求。
|
|
89
|
+
取消结果不明时隔离该会话,直到后台重启;这种回退保留历史,但不能撤销已发生的操作,
|
|
90
|
+
也不等价于原生的执行中注入。
|
|
91
|
+
|
|
73
92
|
Adapter 可以发布协议无关的可选观测信息,无需扩展 `BackendPort` 方法面:
|
|
74
93
|
|
|
75
94
|
```js
|
|
@@ -106,6 +125,14 @@ Adapter 可以发布协议无关的可选观测信息,无需扩展 `BackendPor
|
|
|
106
125
|
协议原生对象与远程 ID 留在 Adapter 内。不支持交互输入的 Adapter 必须明确拒绝
|
|
107
126
|
`respondInput`。
|
|
108
127
|
|
|
128
|
+
自然语言答复使用 `respondInput(taskId, inputRequestId, { text, values }, { ownerId })`,
|
|
129
|
+
不携带 `action`。确认、拒绝或修改要求由后台结合原上下文解释,不能把缺省动作当作批准。
|
|
130
|
+
A2A Adapter 将这种投递解析为 `input.status: 'answered'`,而不是 `accepted`;
|
|
131
|
+
显式客户端动作仍对应 `accepted`、`declined`、`cancelled`。
|
|
132
|
+
模型工具回执中的 `accepted` 只表示投递受理,不表示业务批准或完成。
|
|
133
|
+
原生权限仍通过独立的 `respondAuthorization` 处理。
|
|
134
|
+
协议层的表单接受只确认内容已提交,不代表权限批准。
|
|
135
|
+
|
|
109
136
|
## 接入 Gateway
|
|
110
137
|
|
|
111
138
|
```js
|