qwen-audio-agent 2.0.1 → 2.2.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 +21 -10
- package/README_ZH.md +19 -10
- 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 +36 -6
- package/cli/src/gateway-service.mjs +7 -1
- package/cli/src/launcher.mjs +13 -0
- package/config/frontend-agent/LIVE_PROMPT.md +64 -0
- package/config/frontend-agent/PROMPT.md +29 -26
- package/desktop/src/i18n.mjs +6 -1
- package/desktop/src/settings-config.mjs +32 -40
- 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 +4 -4
- package/docs/backends/configuration.zh.md +4 -4
- package/docs/backends/overview.md +3 -0
- package/docs/backends/overview.zh.md +3 -0
- package/docs/configuration/backend.md +15 -1
- package/docs/configuration/backend.zh.md +15 -1
- package/docs/configuration/frontend.md +78 -28
- package/docs/configuration/frontend.zh.md +76 -28
- package/docs/configuration.md +1 -1
- package/docs/configuration.zh.md +1 -1
- package/docs/contract.md +24 -2
- package/docs/contract.zh.md +20 -2
- package/docs/extensions.md +14 -0
- package/docs/extensions.zh.md +11 -0
- 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 +4 -1
- package/docs/getting-started/install.zh.md +4 -1
- package/docs/getting-started/mobile.md +8 -2
- package/docs/getting-started/mobile.zh.md +5 -0
- 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 +32 -1
- package/docs/guides/web-search.zh.md +28 -1
- package/docs/operations/troubleshooting.md +30 -0
- package/docs/operations/troubleshooting.zh.md +26 -0
- 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 +22 -4
- package/docs/voice-frontends/custom-provider.zh.md +22 -4
- package/docs/voice-frontends/google-live.md +14 -8
- package/docs/voice-frontends/google-live.zh.md +13 -8
- package/docs/voice-frontends/gpt-live-1.md +149 -0
- package/docs/voice-frontends/gpt-live-1.zh.md +114 -0
- package/docs/voice-frontends/minicpm-o.md +8 -4
- package/docs/voice-frontends/minicpm-o.zh.md +7 -4
- package/docs/voice-frontends/{gpt-live.md → openai-realtime.md} +19 -10
- package/docs/voice-frontends/{gpt-live.zh.md → openai-realtime.zh.md} +18 -10
- package/docs/voice-frontends/qwen-audio-live.md +164 -0
- package/docs/voice-frontends/qwen-audio-live.zh.md +122 -0
- package/docs/voice-frontends/qwen-audio-realtime.md +41 -15
- package/docs/voice-frontends/qwen-audio-realtime.zh.md +34 -12
- package/docs/voice-frontends/qwen-omni-realtime.md +12 -9
- package/docs/voice-frontends/qwen-omni-realtime.zh.md +12 -9
- 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 +34 -16
- package/scripts/audit-dependencies.mjs +3 -25
- package/scripts/electron-smoke.mjs +5 -5
- package/scripts/patch-build-node-gyp.mjs +63 -0
- package/scripts/prepare-build.mjs +2 -0
- package/scripts/release-check +2 -2
- package/scripts/runtime/claude-code-acp.mjs +5 -5
- package/scripts/verify-package.mjs +3 -0
- package/server/package.json +5 -5
- 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 +703 -251
- 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/openclaw.mjs +1 -2
- package/server/src/backend/adapters/acp/input-broker.mjs +2 -0
- package/server/src/backend/adapters/acp/process-client.mjs +111 -16
- 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-agent-context.mjs +18 -5
- 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/citation.mjs +8 -2
- package/server/src/core/config.mjs +46 -54
- package/server/src/core/gateway-protocol.mjs +4 -1
- package/server/src/core/request-security.mjs +7 -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 +20 -7
- package/server/src/frontend/retrieval/providers/bing.mjs +23 -12
- package/server/src/frontend/retrieval/providers/factory.mjs +18 -1
- package/server/src/frontend/retrieval/providers/mcp.mjs +30 -11
- package/server/src/frontend/retrieval/providers/so360.mjs +23 -12
- package/server/src/frontend/tools/agent-task-runtime.mjs +119 -99
- 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 +166 -86
- 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 +24 -11
- package/server/src/orchestration/session-task-coordinator.mjs +13 -3
- package/server/src/orchestration/task-operations.mjs +54 -12
- package/server/src/orchestration/task-updates.mjs +82 -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 +35 -0
- package/server/src/transport/webrtc/protocol.mjs +1 -1
- package/server/src/voice/announcement/announcement-manager.mjs +3 -0
- package/server/src/voice/audio-stream-diagnostics.mjs +139 -0
- package/server/src/voice/native-delegation-runtime.mjs +360 -0
- package/server/src/voice/providers/dashscope-live.mjs +93 -0
- package/server/src/voice/providers/dashscope.mjs +45 -33
- package/server/src/voice/providers/doubao-seeduplex-protocol.mjs +54 -0
- package/server/src/voice/providers/doubao-seeduplex.mjs +16 -11
- package/server/src/voice/providers/ga-protocol.mjs +7 -2
- package/server/src/voice/providers/google-live-protocol.mjs +124 -34
- package/server/src/voice/providers/google-live.mjs +20 -14
- package/server/src/voice/providers/gpt-live-1-protocol.mjs +597 -0
- package/server/src/voice/providers/gpt-live-1.mjs +3 -0
- package/server/src/voice/providers/gpt-live-client-context.mjs +182 -0
- package/server/src/voice/providers/minicpm-o.mjs +9 -7
- package/server/src/voice/providers/openai-live.mjs +150 -0
- package/server/src/voice/providers/{gpt-live.mjs → openai-realtime.mjs} +23 -19
- package/server/src/voice/providers/provider-registry.mjs +11 -1
- package/server/src/voice/providers/qwen-live-protocol.mjs +399 -0
- package/server/src/voice/providers/registry.mjs +47 -12
- package/server/src/voice/providers/runtime-configuration.mjs +34 -0
- package/server/src/voice/providers/s2s.mjs +9 -7
- package/server/src/voice/providers/stepfun.mjs +14 -11
- package/server/src/voice/realtime-input-runtime.mjs +58 -20
- package/server/src/voice/realtime-presentation-runtime.mjs +111 -27
- package/server/src/voice/realtime-provider-session.mjs +59 -14
- package/server/src/voice/realtime-provider.mjs +358 -45
- package/server/src/voice/realtime-session-runtime.mjs +282 -35
- package/server/src/voice/realtime-task-presentation.mjs +8 -2
- package/server/src/voice/realtime-turn-state.mjs +33 -2
- package/shared/backend/catalog.mjs +26 -2
- package/shared/backend/install.mjs +3 -1
- package/shared/backend/setup.mjs +43 -0
- package/shared/gateway/client-sdk.mjs +21 -6
- package/shared/gateway/setup.mjs +13 -1
- package/shared/gateway/websocket-auth.mjs +2 -1
- package/shared/protocol/gateway-client-protocol.mjs +14 -0
- package/shared/protocol/gateway-events.mjs +39 -1
- package/shared/realtime-legacy-environment.mjs +81 -0
- package/shared/realtime-model-catalog.mjs +68 -194
- package/shared/realtime-models/README.md +33 -0
- package/shared/realtime-models/dashscope.mjs +57 -0
- package/shared/realtime-models/google.mjs +10 -0
- package/shared/realtime-models/openai.mjs +24 -0
- package/shared/realtime-models/profile.mjs +38 -0
- package/shared/realtime-models/stepfun.mjs +10 -0
- package/shared/realtime-models/volcengine.mjs +12 -0
- package/shared/realtime-provider-catalog.mjs +23 -11
- package/shared/realtime-provider-definitions.mjs +168 -235
- package/shared/runtime-environment.mjs +23 -30
- package/shared/skill-library.mjs +49 -13
- package/shared/web-search-configuration.mjs +25 -2
- package/tui/package.json +2 -2
- package/tui/src/index.mjs +14 -9
- package/tui/src/runtime-configuration.mjs +2 -0
- package/tui/src/terminal-commands.mjs +40 -0
- package/tui/src/text-cli.mjs +10 -1
- package/web/dist/assets/index-Bc2Q04J9.css +1 -0
- package/web/dist/assets/index-bY4DFXKT.js +96 -0
- package/web/dist/index.html +2 -2
- package/web/dist/assets/index-BRaiI-dW.js +0 -91
- package/web/dist/assets/index-D9k8R2JY.css +0 -1
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,37 @@ 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
|
+
|
|
38
|
+
The built-in [Parallel](https://docs.parallel.ai/integrations/mcp/quickstart)
|
|
39
|
+
preset connects to the Parallel MCP server
|
|
40
|
+
(`https://mcp.parallel.ai/mcp?tools=web_search`) without an account or key.
|
|
41
|
+
Keyless use runs Parallel's Fast search mode at lower rate limits:
|
|
42
|
+
|
|
43
|
+
```dotenv
|
|
44
|
+
QWEN_AUDIO_WEB_SEARCH_PROVIDER=parallel
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
With this preset, search queries go to Parallel, and the returned titles,
|
|
48
|
+
excerpts and links enter the voice model's context as sources. `tools=web_search`
|
|
49
|
+
keeps that shared server scoped to search, so its fetch and research tools stay
|
|
50
|
+
out of the frontend. It always uses this endpoint and the `web_search` tool and
|
|
51
|
+
does not read the `QWEN_AUDIO_WEB_SEARCH_MCP_*` settings below; to send a
|
|
52
|
+
Parallel API key, choose `mcp` and configure the URL and token explicitly.
|
|
53
|
+
|
|
23
54
|
The same provider-neutral adapter can connect to another compatible MCP search
|
|
24
55
|
service. Custom endpoints must provide their own credentials explicitly:
|
|
25
56
|
|
|
@@ -30,7 +61,7 @@ QWEN_AUDIO_WEB_SEARCH_MCP_TOKEN=your-token
|
|
|
30
61
|
QWEN_AUDIO_WEB_SEARCH_MCP_TOOL=web_search
|
|
31
62
|
```
|
|
32
63
|
|
|
33
|
-
Choose `so360` (default), `bing`, `bailian`, `mcp`, or `none`. Setting `none` disables search, not page fetching. Disable both search and page fetching with:
|
|
64
|
+
Choose `so360` (default), `bing`, `bailian`, `keenable`, `parallel`, `mcp`, or `none`. Setting `none` disables search, not page fetching. Disable both search and page fetching with:
|
|
34
65
|
|
|
35
66
|
```dotenv
|
|
36
67
|
QWEN_AUDIO_WEB_TOOLS_ENABLED=false
|
|
@@ -17,6 +17,33 @@ 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
|
+
|
|
33
|
+
内置的 [Parallel](https://docs.parallel.ai/integrations/mcp/quickstart) 预设无需账号
|
|
34
|
+
或 Key,即可连接 Parallel MCP 服务(`https://mcp.parallel.ai/mcp?tools=web_search`)。
|
|
35
|
+
免 Key 调用使用 Fast 搜索模式,调用额度较低:
|
|
36
|
+
|
|
37
|
+
```dotenv
|
|
38
|
+
QWEN_AUDIO_WEB_SEARCH_PROVIDER=parallel
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
启用该预设后,搜索词会发送到 Parallel,返回的标题、摘录和链接作为来源进入语音模型
|
|
42
|
+
上下文。`tools=web_search` 把该共享服务限定为搜索,其网页读取与研究类工具不会进入
|
|
43
|
+
前台。预设固定使用上述地址和 `web_search` 工具,不读取下方的
|
|
44
|
+
`QWEN_AUDIO_WEB_SEARCH_MCP_*` 设置;如需发送 Parallel API Key,请选择 `mcp` 并显式
|
|
45
|
+
配置地址与 Token。
|
|
46
|
+
|
|
20
47
|
同一个与供应商无关的 Adapter 也可以接入其他兼容的 MCP 搜索服务;自定义地址必须
|
|
21
48
|
显式提供自己的凭据:
|
|
22
49
|
|
|
@@ -27,7 +54,7 @@ QWEN_AUDIO_WEB_SEARCH_MCP_TOKEN=your-token
|
|
|
27
54
|
QWEN_AUDIO_WEB_SEARCH_MCP_TOOL=web_search
|
|
28
55
|
```
|
|
29
56
|
|
|
30
|
-
可选 `so360`(默认)、`bing`、`bailian`、`mcp` 或 `none`。设置 `none` 只关闭搜索,网页读取工具仍可用;同时关闭搜索和网页读取时设置:
|
|
57
|
+
可选 `so360`(默认)、`bing`、`bailian`、`keenable`、`parallel`、`mcp` 或 `none`。设置 `none` 只关闭搜索,网页读取工具仍可用;同时关闭搜索和网页读取时设置:
|
|
31
58
|
|
|
32
59
|
```dotenv
|
|
33
60
|
QWEN_AUDIO_WEB_TOOLS_ENABLED=false
|
|
@@ -70,6 +70,36 @@ Desktop exposes its log directory in Settings → Application → Logs. CLI logs
|
|
|
70
70
|
`~/.config/qwaudio/state/logs`; desktop-hosted Gateway logs use `~/.config/qwaudio/state/desktop/logs`.
|
|
71
71
|
Desktop Client logs use the `logs/` subdirectory of its application data directory.
|
|
72
72
|
|
|
73
|
+
### Delayed or Choppy Live Speech
|
|
74
|
+
|
|
75
|
+
For paced-audio frontends such as Qwen Live and GPT Live, the Gateway emits
|
|
76
|
+
`realtime.audio.transport` every five seconds and flushes the final window on close, not once per frame.
|
|
77
|
+
|
|
78
|
+
- `inputAudioMs` / `outputAudioMs`: PCM duration sent/received in the window. Input includes adapter-generated
|
|
79
|
+
silence and means accepted by the local WebSocket, not processed by the service. Output is normalized PCM,
|
|
80
|
+
excluding native packets filtered by the adapter.
|
|
81
|
+
- `clientInputPackets` / `clientInputAudioMs` / `lastClientInputAgeMs`: separately count client-originated audio
|
|
82
|
+
accepted for sending, excluding adapter-generated silence. They do not distinguish speech from captured silence.
|
|
83
|
+
- `inputGapMaxMs` / `outputGapMaxMs` and `lastOutputAgeMs`: packet gaps and time since the last output PCM.
|
|
84
|
+
Silence alone is normal; correlate it with user transcripts and response-start records.
|
|
85
|
+
- `bufferedBytes` / `bufferedBytesPeak`: current/peak outbound WebSocket backlog.
|
|
86
|
+
`monitorTickDelayMs` measures lateness of the Gateway reporting timer, helping identify local event-loop stalls.
|
|
87
|
+
- `realtime.audio.input_buffer_flushed`: retained/dropped chunks, retained PCM duration, and the whole
|
|
88
|
+
connection-wait window when buffered input is flushed after connection or reconnection. The window is not
|
|
89
|
+
the age of the oldest retained frame.
|
|
90
|
+
|
|
91
|
+
Desktop and WebUI attach `audioDiagnostics` to existing `realtime.playback.started` / `ended` / `cancelled`
|
|
92
|
+
records: received chunk count and PCM duration, maximum receive gap, first-chunk-to-confirmed-playback delay,
|
|
93
|
+
maximum scheduled buffer, count/maximum of scheduling gaps within one reply, underrun recovery count, and
|
|
94
|
+
AudioContext suspension count. Start receipts contain partial statistics; end/cancel receipts contain the final
|
|
95
|
+
snapshot. Natural silence between replies is excluded from scheduling gaps. These are client observations,
|
|
96
|
+
not hardware playback timestamps; TUI and other clients may omit them.
|
|
97
|
+
|
|
98
|
+
These new metrics contain no audio, transcripts, or credentials, do not enter model context, and do not change
|
|
99
|
+
playback, interruption, or permissions. Correlate session/connection identifiers and `responseId` to distinguish
|
|
100
|
+
outbound backlog, absent incoming replies, and local playback queuing. Metrics alone do not prove whether
|
|
101
|
+
the network or the provider is responsible.
|
|
102
|
+
|
|
73
103
|
### Session history retention
|
|
74
104
|
|
|
75
105
|
`state/sessions/` contains recovery records, separate from diagnostic logs. Journals are not permanent audit archives:
|
|
@@ -67,6 +67,32 @@ HTTPS Endpoint 检查证书、反向代理与 WebSocket 转发。连接码只显
|
|
|
67
67
|
`~/.config/qwaudio/state/logs`;桌面代管的 Gateway 在 `~/.config/qwaudio/state/desktop/logs`,
|
|
68
68
|
桌面客户端日志在其应用数据目录的 `logs/` 下。
|
|
69
69
|
|
|
70
|
+
### Live 回复延迟与音频断续
|
|
71
|
+
|
|
72
|
+
对 Qwen Live、GPT Live 等按播放速率输出音频的前台,Gateway 每 5 秒记录一条
|
|
73
|
+
`realtime.audio.transport`,连接关闭时补记最后一个统计窗口;不逐帧写日志。
|
|
74
|
+
|
|
75
|
+
- `inputAudioMs` / `outputAudioMs`:本窗口发送/收到的 PCM 时长。上行包含适配器补充的静音,
|
|
76
|
+
仅代表本地 WebSocket 接受发送,不代表服务端已经处理;下行是适配后的 PCM,不含适配器过滤的原生帧。
|
|
77
|
+
- `clientInputPackets` / `clientInputAudioMs` / `lastClientInputAgeMs`:单独统计来自客户端、已接受发送的
|
|
78
|
+
音频,不包含适配器补充的静音;它不区分用户人声和客户端采集的环境静音。
|
|
79
|
+
- `inputGapMaxMs` / `outputGapMaxMs`、`lastOutputAgeMs`:包间隔与距最近下行 PCM 的时间。
|
|
80
|
+
没有回复时静默本身是正常现象,需要结合用户转写与回复开始日志判断。
|
|
81
|
+
- `bufferedBytes` / `bufferedBytesPeak`:向服务发送的 WebSocket 当前/窗口峰值积压。
|
|
82
|
+
`monitorTickDelayMs` 表示网关统计定时器的迟到量,可辅助发现本地事件循环停顿。
|
|
83
|
+
- `realtime.audio.input_buffer_flushed`:建连或重连后补发输入时,记录保留包数、丢弃包数、
|
|
84
|
+
保留 PCM 时长和整个等待建连窗口的时长;后者不是最老保留帧的年龄。
|
|
85
|
+
|
|
86
|
+
桌面版与 WebUI 在现有 `realtime.playback.started` / `ended` / `cancelled` 日志中附带
|
|
87
|
+
`audioDiagnostics`:收片数与 PCM 总时长、最大收片间隔、首次收片到确认开始播放的等待、
|
|
88
|
+
最大已调度缓冲、同一回复内调度空隙的次数/最大值、欠载恢复次数,以及 AudioContext 暂停次数。
|
|
89
|
+
开始回执是部分统计,结束或取消回执是最终统计;不同回复间的自然静默不计为调度空隙。
|
|
90
|
+
这些是客户端观察值,不是扬声器实际发声时间,TUI 或其他客户端可不提供。
|
|
91
|
+
|
|
92
|
+
上述新增指标不包含音频、转写内容或凭据,不进入模型上下文,也不改变播放、打断或授权行为。
|
|
93
|
+
用同一会话/连接及 `responseId` 对齐日志,可区分上行积压、下行无回复和本地播放排队;
|
|
94
|
+
仅凭这些指标仍不能直接认定是网络或供应商服务故障。
|
|
95
|
+
|
|
70
96
|
### 会话历史留存
|
|
71
97
|
|
|
72
98
|
`state/sessions/` 保存恢复记录,与诊断日志分开,不是永久审计档案:
|
|
@@ -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
|
package/docs/reference/cli.md
CHANGED
|
@@ -8,15 +8,15 @@ After installation, run `qwenaudio` from any directory. In a source checkout, ru
|
|
|
8
8
|
| --- | --- |
|
|
9
9
|
| `qwenaudio --version` | Show the CLI version |
|
|
10
10
|
| `qwenaudio config` | Show the config path; create a template if missing |
|
|
11
|
-
| `qwenaudio config show` | Show the configured voice provider, model, and
|
|
12
|
-
| `qwenaudio config set --realtime-model ID` |
|
|
11
|
+
| `qwenaudio config show` | Show the configured voice provider, model, and supported models without credentials |
|
|
12
|
+
| `qwenaudio config set --realtime-model ID` | Select a supported model for the current provider |
|
|
13
13
|
| `qwenaudio doctor` | Read-only configuration, connection, and state checks |
|
|
14
14
|
| `qwenaudio doctor --json` | Print diagnostic JSON |
|
|
15
15
|
| `qwenaudio doctor --turn ID` | Build a turn timeline from local logs |
|
|
16
16
|
| `qwenaudio setup` | Check integration readiness for all backends |
|
|
17
17
|
| `qwenaudio setup --backend qwen --json` | Check one backend and print JSON |
|
|
18
18
|
|
|
19
|
-
`config show` reads
|
|
19
|
+
`config show` reads the framework-maintained model list, not live model availability. `config set` selects an existing supported ID; it cannot add a model or change its adaptation parameters. See [model selection](../configuration/frontend.md#select-a-supported-model). `setup` does not verify backend accounts or quota. [Apply configuration changes](../operations/gateway.md#applying-configuration-changes) after changing models.
|
|
20
20
|
|
|
21
21
|
## Gateway
|
|
22
22
|
|
package/docs/reference/cli.zh.md
CHANGED
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
| --- | --- |
|
|
9
9
|
| `qwenaudio --version` | 查看 CLI 版本 |
|
|
10
10
|
| `qwenaudio config` | 显示配置路径,文件缺失时创建模板 |
|
|
11
|
-
| `qwenaudio config show` | 显示已配置的语音 Provider
|
|
12
|
-
| `qwenaudio config set --realtime-model ID` |
|
|
11
|
+
| `qwenaudio config show` | 显示已配置的语音 Provider、模型及受支持模型,不显示凭据 |
|
|
12
|
+
| `qwenaudio config set --realtime-model ID` | 为当前 Provider 选择受支持模型 |
|
|
13
13
|
| `qwenaudio doctor` | 只读检查配置、连接与状态 |
|
|
14
14
|
| `qwenaudio doctor --json` | 输出诊断 JSON |
|
|
15
15
|
| `qwenaudio doctor --turn ID` | 从本机日志整理某一轮时间线 |
|
|
16
16
|
| `qwenaudio setup` | 检测所有后台的接入准备情况 |
|
|
17
17
|
| `qwenaudio setup --backend qwen --json` | 检测指定后台并输出 JSON |
|
|
18
18
|
|
|
19
|
-
`config show`
|
|
19
|
+
`config show` 显示框架维护的模型列表,不是线上模型探测。`config set` 只能选择已有的受支持 ID,不能新增模型或修改其适配参数,详见[模型选择](../configuration/frontend.zh.md#选择受支持模型)。`setup` 不验证后台账号或额度。修改模型后需[应用配置](../operations/gateway.zh.md#修改配置后生效)。
|
|
20
20
|
|
|
21
21
|
## Gateway
|
|
22
22
|
|
|
@@ -56,7 +56,7 @@ cp examples/lightrag/.env.example examples/lightrag/.env.local
|
|
|
56
56
|
Set the voice frontend and LightRAG connection values:
|
|
57
57
|
|
|
58
58
|
```dotenv
|
|
59
|
-
|
|
59
|
+
QWEN_AUDIO_REALTIME_API_KEY=your_dashscope_api_key
|
|
60
60
|
LIGHTRAG_URL=http://127.0.0.1:9621
|
|
61
61
|
LIGHTRAG_API_KEY=your_lightrag_api_key
|
|
62
62
|
LIGHTRAG_WORKSPACE=
|
|
@@ -73,7 +73,7 @@ Open `http://127.0.0.1:3101`, import a file from the Knowledge Library panel, wa
|
|
|
73
73
|
then query it by voice or text. This isolated example uses frontend-only mode and does not start
|
|
74
74
|
a backend Agent.
|
|
75
75
|
|
|
76
|
-
`
|
|
76
|
+
`QWEN_AUDIO_REALTIME_API_KEY` belongs only to the voice frontend. LightRAG keeps its LLM and embedding
|
|
77
77
|
configuration in its own process. qwen-audio-agent does not install, start, or modify LightRAG.
|
|
78
78
|
|
|
79
79
|
## Data and task boundaries
|
|
@@ -55,7 +55,7 @@ cp examples/lightrag/.env.example examples/lightrag/.env.local
|
|
|
55
55
|
填写语音前台和 LightRAG 连接信息:
|
|
56
56
|
|
|
57
57
|
```dotenv
|
|
58
|
-
|
|
58
|
+
QWEN_AUDIO_REALTIME_API_KEY=your_dashscope_api_key
|
|
59
59
|
LIGHTRAG_URL=http://127.0.0.1:9621
|
|
60
60
|
LIGHTRAG_API_KEY=your_lightrag_api_key
|
|
61
61
|
LIGHTRAG_WORKSPACE=
|
|
@@ -71,7 +71,7 @@ node --env-file=examples/lightrag/.env.local examples/lightrag/gateway.mjs
|
|
|
71
71
|
打开 `http://127.0.0.1:3101`,在资料库面板中导入文件,等待索引完成后即可通过语音或
|
|
72
72
|
文字查询。这个示例使用仅前台模式,不会启动后台 Agent。
|
|
73
73
|
|
|
74
|
-
`
|
|
74
|
+
`QWEN_AUDIO_REALTIME_API_KEY` 只用于语音前台;LightRAG 的 LLM 和 Embedding 配置保留在它自己的
|
|
75
75
|
进程中。qwen-audio-agent 不会安装、启动或修改 LightRAG。
|
|
76
76
|
|
|
77
77
|
## 数据与任务边界
|
package/docs/scenarios/x-omni.md
CHANGED
|
@@ -50,11 +50,14 @@ replace the frontend configuration in `.env.local` with:
|
|
|
50
50
|
|
|
51
51
|
```dotenv
|
|
52
52
|
QWEN_AUDIO_REALTIME_PROVIDER=minicpm-o
|
|
53
|
-
|
|
53
|
+
QWEN_AUDIO_REALTIME_URL=ws://127.0.0.1:8006/v1/realtime?mode=video
|
|
54
|
+
QWEN_AUDIO_REALTIME_API_KEY=
|
|
55
|
+
QWEN_AUDIO_REALTIME_MODEL=
|
|
56
|
+
QWEN_AUDIO_REALTIME_VOICE=
|
|
54
57
|
AGENT_PROTOCOL=none
|
|
55
58
|
```
|
|
56
59
|
|
|
57
|
-
Use the endpoint of your deployment and set `
|
|
60
|
+
Use the endpoint of your deployment and set `QWEN_AUDIO_REALTIME_API_KEY` if it requires a Bearer token.
|
|
58
61
|
No DashScope key is required. The client uses continuous frames with voice
|
|
59
62
|
input; typed input, on-demand inspection, observation, and backend tool calls
|
|
60
63
|
are unavailable through the current MiniCPM-o interface. Unsupported controls
|
|
@@ -47,11 +47,14 @@ Qwen 默认使用 `qwen3.5-omni-plus-realtime`;也可通过
|
|
|
47
47
|
|
|
48
48
|
```dotenv
|
|
49
49
|
QWEN_AUDIO_REALTIME_PROVIDER=minicpm-o
|
|
50
|
-
|
|
50
|
+
QWEN_AUDIO_REALTIME_URL=ws://127.0.0.1:8006/v1/realtime?mode=video
|
|
51
|
+
QWEN_AUDIO_REALTIME_API_KEY=
|
|
52
|
+
QWEN_AUDIO_REALTIME_MODEL=
|
|
53
|
+
QWEN_AUDIO_REALTIME_VOICE=
|
|
51
54
|
AGENT_PROTOCOL=none
|
|
52
55
|
```
|
|
53
56
|
|
|
54
|
-
|
|
57
|
+
地址以实际部署为准;需要 Bearer 认证时填写 `QWEN_AUDIO_REALTIME_API_KEY`,无需 DashScope Key。
|
|
55
58
|
客户端使用持续画面与语音输入;当前 MiniCPM-o 接口不支持文字输入、按需识图、
|
|
56
59
|
观察和后台工具调用。不支持的控件会禁用,不模拟执行。
|
|
57
60
|
|