qwen-audio-agent 1.6.1 → 1.8.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 +5 -0
- package/README_ZH.md +5 -0
- package/cli/package.json +1 -1
- package/cli/src/arguments.mjs +3 -1
- package/cli/src/launcher.mjs +16 -1
- package/cli/src/runtime.mjs +22 -2
- package/docs/architecture.md +45 -14
- package/docs/architecture.zh.md +31 -11
- package/docs/backends/overview.md +2 -1
- package/docs/backends/overview.zh.md +50 -35
- package/docs/configuration.md +65 -8
- package/docs/configuration.zh.md +338 -356
- package/docs/desktop/overview.md +26 -0
- package/docs/desktop/overview.zh.md +56 -22
- package/docs/getting-started/install.zh.md +28 -28
- package/docs/getting-started/quickstart.zh.md +23 -23
- package/docs/getting-started/tui.zh.md +19 -19
- package/docs/reference/memory.zh.md +41 -52
- package/docs/voice-frontends/speech-to-speech.zh.md +18 -50
- package/package.json +1 -10
- package/scripts/openclaw.mjs +10 -5
- package/scripts/verify-package.mjs +0 -9
- package/server/package.json +1 -1
- package/server/src/agent/acp-backend-adapter.mjs +39 -9
- package/server/src/agent/acp-backend-profile.mjs +2 -0
- package/server/src/agent/acp-client-factory.mjs +22 -0
- package/server/src/agent/acp-process-client.mjs +109 -10
- package/server/src/agent/agent-client.mjs +1 -0
- package/server/src/agent/backend-agent-instructions.mjs +6 -0
- package/server/src/agent/backends/claude.mjs +16 -14
- package/server/src/agent/backends/codebuddy.mjs +18 -16
- package/server/src/agent/backends/codex.mjs +30 -28
- package/server/src/agent/backends/generic-acp.mjs +7 -4
- package/server/src/agent/backends/local-acp.mjs +66 -0
- package/server/src/agent/backends/openclaw.mjs +50 -26
- package/server/src/agent/backends/opencode.mjs +7 -5
- package/server/src/agent/backends/private-file.mjs +15 -0
- package/server/src/agent/backends/registry.mjs +2 -6
- package/server/src/agent/backends/shared.mjs +24 -4
- package/server/src/agent/builtin-mcp.mjs +103 -1
- package/server/src/core/config.mjs +45 -92
- package/server/src/process/backend-drivers/openclaw.mjs +7 -4
- package/server/src/process/backend-drivers/opencode.mjs +6 -4
- package/server/src/process/backend-drivers/registry.mjs +24 -15
- package/server/src/process/backend-drivers/shared.mjs +22 -3
- package/server/src/process/managed-backend.mjs +22 -2
- package/shared/backend-catalog.mjs +167 -0
- package/shared/backend-lifecycle.mjs +1 -69
- package/shared/backend-setup.mjs +9 -60
- package/shared/orb-skin-catalog.mjs +28 -0
- package/shared/runtime-environment.mjs +38 -110
- package/tui/package.json +1 -1
- package/web/dist/assets/index-BRBmAM0K.js +38 -0
- package/web/dist/assets/index-CpWTgGsp.css +1 -0
- package/web/dist/index.html +2 -2
- package/config/acp/workspace/AGENTS.md +0 -13
- package/config/claude/workspace/AGENTS.md +0 -16
- package/config/codebuddy/workspace/AGENTS.md +0 -13
- package/config/codex/workspace/AGENTS.md +0 -13
- package/config/hermes/workspace/AGENTS.md +0 -13
- package/config/kimi/workspace/AGENTS.md +0 -13
- package/config/openclaw/workspace/AGENTS.md +0 -9
- package/config/opencode/workspace/AGENTS.md +0 -16
- package/config/qoder/workspace/AGENTS.md +0 -16
- package/server/src/agent/backends/hermes.mjs +0 -19
- package/server/src/agent/backends/kimi.mjs +0 -26
- package/server/src/agent/backends/qoder.mjs +0 -29
- package/server/src/process/backend-drivers/claude.mjs +0 -15
- package/server/src/process/backend-drivers/codebuddy.mjs +0 -15
- package/server/src/process/backend-drivers/codex.mjs +0 -15
- package/server/src/process/backend-drivers/generic-acp.mjs +0 -18
- package/server/src/process/backend-drivers/hermes.mjs +0 -15
- package/server/src/process/backend-drivers/kimi.mjs +0 -15
- package/server/src/process/backend-drivers/qoder.mjs +0 -15
- package/web/dist/assets/index-CH9eBvfi.js +0 -38
- package/web/dist/assets/index-CYkUfr6A.css +0 -1
package/README.md
CHANGED
|
@@ -26,6 +26,10 @@ tells you:
|
|
|
26
26
|
|
|
27
27
|
## News
|
|
28
28
|
|
|
29
|
+
- **2026-08-09 · [v1.8.0](https://github.com/QwenAudio/qwen-audio-agent/releases/tag/v1.8.0)**
|
|
30
|
+
🆕 Adds Qwen Code backend; 🔧 fixes known issues.
|
|
31
|
+
- **2026-08-07 · [v1.7.0](https://github.com/QwenAudio/qwen-audio-agent/releases/tag/v1.7.0)**
|
|
32
|
+
🎨 The orb now supports skins, with custom look imports; 🪟 improved Windows backend Agent startup.
|
|
29
33
|
- **2026-08-07 · [v1.6.1](https://github.com/QwenAudio/qwen-audio-agent/releases/tag/v1.6.1)**
|
|
30
34
|
⚡ Task delegation and permission decisions confirm instantly; 🖥️ built-in computer-use lets backend Agents operate the computer out of the box; 🎙️ more reliable wake; 📚 fully bilingual docs.
|
|
31
35
|
- **2026-08-06 · [v1.6.0](https://github.com/QwenAudio/qwen-audio-agent/releases/tag/v1.6.0)**
|
|
@@ -91,6 +95,7 @@ For the full design and module breakdown, see the [architecture document](docs/a
|
|
|
91
95
|
| OpenCode | Native ACP | One-click install + Bailian config | ★★★★★ |
|
|
92
96
|
| OpenClaw | Built-in ACP bridge | One-click install + Bailian config | ★★★★★ |
|
|
93
97
|
| Qoder | Native ACP | One-click install, user config required | ★★★★★ |
|
|
98
|
+
| Qwen Code | Native ACP | One-click install, user config required | ★★★★☆ |
|
|
94
99
|
| Kimi Code | Native ACP | One-click install, user config required | ★★★★★ |
|
|
95
100
|
| Hermes | Native ACP | One-click install, user config required | ★★★★☆ |
|
|
96
101
|
| CodeBuddy | Native ACP | One-click install, user config required | ★★★★☆ |
|
package/README_ZH.md
CHANGED
|
@@ -20,6 +20,10 @@
|
|
|
20
20
|
|
|
21
21
|
## News
|
|
22
22
|
|
|
23
|
+
- **2026-08-09 · [v1.8.0](https://github.com/QwenAudio/qwen-audio-agent/releases/tag/v1.8.0)**
|
|
24
|
+
🆕 新增 Qwen Code 后台;🔧 修复已知问题。
|
|
25
|
+
- **2026-08-07 · [v1.7.0](https://github.com/QwenAudio/qwen-audio-agent/releases/tag/v1.7.0)**
|
|
26
|
+
🎨 悬浮球支持换肤,可导入自定义外观;🪟 优化 Windows 后台 Agent 启动。
|
|
23
27
|
- **2026-08-07 · [v1.6.1](https://github.com/QwenAudio/qwen-audio-agent/releases/tag/v1.6.1)**
|
|
24
28
|
⚡ 委派任务与权限确认即说即回;🖥️ 内置 computer-use,后台 Agent 开箱可操作电脑;🎙️ 唤醒更可靠;📚 文档全面双语化。
|
|
25
29
|
- **2026-08-06 · [v1.6.0](https://github.com/QwenAudio/qwen-audio-agent/releases/tag/v1.6.0)**
|
|
@@ -83,6 +87,7 @@ https://github.com/user-attachments/assets/42022655-36d1-46b2-9c26-ff0765284000
|
|
|
83
87
|
| OpenCode | 原生 ACP | 支持一键安装和百炼配置 | ★★★★★ |
|
|
84
88
|
| OpenClaw | 内置 ACP 桥接 | 支持一键安装和百炼配置 | ★★★★★ |
|
|
85
89
|
| Qoder | 原生 ACP | 支持一键安装,需用户配置 | ★★★★★ |
|
|
90
|
+
| Qwen Code | 原生 ACP | 支持一键安装,需用户配置 | ★★★★☆ |
|
|
86
91
|
| Kimi Code | 原生 ACP | 支持一键安装,需用户配置 | ★★★★★ |
|
|
87
92
|
| Hermes | 原生 ACP | 支持一键安装,需用户配置 | ★★★★☆ |
|
|
88
93
|
| CodeBuddy | 原生 ACP | 支持一键安装,需用户配置 | ★★★★☆ |
|
package/cli/package.json
CHANGED
package/cli/src/arguments.mjs
CHANGED
|
@@ -84,6 +84,7 @@ export function parseArguments(argv, env = process.env) {
|
|
|
84
84
|
env.QWEN_AUDIO_AGENT_BACKEND_AGENT || '',
|
|
85
85
|
).trim(),
|
|
86
86
|
backendUrl: '',
|
|
87
|
+
backendUrlSpecified: false,
|
|
87
88
|
installTarget: '',
|
|
88
89
|
openBrowser: true,
|
|
89
90
|
takeover: false,
|
|
@@ -117,6 +118,7 @@ export function parseArguments(argv, env = process.env) {
|
|
|
117
118
|
options.gatewayConfigurationSpecified = true
|
|
118
119
|
} else if (argument === '--backend-url') {
|
|
119
120
|
options.backendUrl = nextValue(args, index++, '--backend-url')
|
|
121
|
+
options.backendUrlSpecified = true
|
|
120
122
|
options.gatewayConfigurationSpecified = true
|
|
121
123
|
} else if (argument === '--session') {
|
|
122
124
|
options.sessionId = nextValue(args, index++, '--session')
|
|
@@ -242,7 +244,7 @@ export function helpText() {
|
|
|
242
244
|
'',
|
|
243
245
|
'Gateway 选项:',
|
|
244
246
|
' --url URL Gateway 地址(默认 http://127.0.0.1:3101)',
|
|
245
|
-
|
|
247
|
+
` --backend NAME 可选:${backendNames().join('、')} 或 none;不设置或使用 none 时仅前台聊天`,
|
|
246
248
|
' --backend-permission-mode MODE native(默认)或 full(最高权限)',
|
|
247
249
|
' --backend-url URL 后台 Server 地址',
|
|
248
250
|
' --backend-agent ID 指定协调 Agent',
|
package/cli/src/launcher.mjs
CHANGED
|
@@ -2,7 +2,10 @@ import { dirname, resolve } from 'node:path'
|
|
|
2
2
|
import { fileURLToPath, pathToFileURL } from 'node:url'
|
|
3
3
|
import readline from 'node:readline'
|
|
4
4
|
import { loadRuntimeEnvironment } from '../../shared/runtime-environment.mjs'
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
backendDefinition,
|
|
7
|
+
resolveBackendOwnership,
|
|
8
|
+
} from '../../shared/backend-catalog.mjs'
|
|
6
9
|
import {
|
|
7
10
|
formatBackendSetup,
|
|
8
11
|
inspectBackendSetups,
|
|
@@ -40,9 +43,21 @@ function applyGatewayOptions(env, options) {
|
|
|
40
43
|
env.AGENT_PROTOCOL = options.backend || ''
|
|
41
44
|
const definition = backendDefinition(options.backend)
|
|
42
45
|
if (options.backend) {
|
|
46
|
+
const baseUrlConfigured = Boolean(
|
|
47
|
+
options.backendUrlSpecified
|
|
48
|
+
|| (
|
|
49
|
+
definition?.baseUrlEnvironment
|
|
50
|
+
&& String(env[definition.baseUrlEnvironment] || '').trim()
|
|
51
|
+
)
|
|
52
|
+
)
|
|
53
|
+
env.QWEN_AUDIO_AGENT_BACKEND_OWNERSHIP = resolveBackendOwnership(
|
|
54
|
+
options.backend,
|
|
55
|
+
{ baseUrlConfigured },
|
|
56
|
+
)
|
|
43
57
|
env.QWEN_AUDIO_AGENT_BACKEND_PERMISSION_MODE =
|
|
44
58
|
options.backendPermissionMode
|
|
45
59
|
} else {
|
|
60
|
+
delete env.QWEN_AUDIO_AGENT_BACKEND_OWNERSHIP
|
|
46
61
|
delete env.QWEN_AUDIO_AGENT_BACKEND_PERMISSION_MODE
|
|
47
62
|
}
|
|
48
63
|
if (options.backend && options.backendAgent) {
|
package/cli/src/runtime.mjs
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
backendDefinition,
|
|
5
5
|
backendNames,
|
|
6
6
|
normalizeBackendProtocol,
|
|
7
|
+
resolveBackendOwnership,
|
|
7
8
|
} from '../../shared/backend-catalog.mjs'
|
|
8
9
|
import {
|
|
9
10
|
loadRuntimeEnvironment,
|
|
@@ -52,7 +53,24 @@ export function resolveBackend(options = {}, env = process.env) {
|
|
|
52
53
|
if (!definition) throw new Error(
|
|
53
54
|
`不支持的后台 Agent:${protocol}(可选 ${backendNames().join('、')})`,
|
|
54
55
|
)
|
|
55
|
-
const
|
|
56
|
+
const explicitBaseUrl = Boolean(
|
|
57
|
+
options.backendUrlSpecified === true
|
|
58
|
+
|| (
|
|
59
|
+
options.backendUrlSpecified === undefined
|
|
60
|
+
&& options.backendUrl
|
|
61
|
+
)
|
|
62
|
+
|| (
|
|
63
|
+
definition.baseUrlEnvironment
|
|
64
|
+
&& String(env[definition.baseUrlEnvironment] || '').trim()
|
|
65
|
+
),
|
|
66
|
+
)
|
|
67
|
+
// Some backends already expose a complete service. When the user points us
|
|
68
|
+
// at one explicitly, connect to it as an external black box instead of
|
|
69
|
+
// launching a second managed service on another port.
|
|
70
|
+
const ownership = resolveBackendOwnership(protocol, {
|
|
71
|
+
baseUrlConfigured: explicitBaseUrl,
|
|
72
|
+
requestedOwnership: env.QWEN_AUDIO_AGENT_BACKEND_OWNERSHIP,
|
|
73
|
+
})
|
|
56
74
|
const permissionMode = String(
|
|
57
75
|
options.backendPermissionMode
|
|
58
76
|
|| env.QWEN_AUDIO_AGENT_BACKEND_PERMISSION_MODE
|
|
@@ -235,6 +253,7 @@ function backendEnvironment(env, backend) {
|
|
|
235
253
|
AGENT_PROTOCOL: '',
|
|
236
254
|
}
|
|
237
255
|
delete next.QWEN_AUDIO_AGENT_BACKEND_PERMISSION_MODE
|
|
256
|
+
delete next.QWEN_AUDIO_AGENT_BACKEND_OWNERSHIP
|
|
238
257
|
delete next.QWEN_AUDIO_AGENT_BACKEND_AGENT
|
|
239
258
|
return next
|
|
240
259
|
}
|
|
@@ -242,6 +261,7 @@ function backendEnvironment(env, backend) {
|
|
|
242
261
|
const next = {
|
|
243
262
|
...env,
|
|
244
263
|
AGENT_PROTOCOL: backend.protocol,
|
|
264
|
+
QWEN_AUDIO_AGENT_BACKEND_OWNERSHIP: backend.ownership,
|
|
245
265
|
QWEN_AUDIO_AGENT_BACKEND_PERMISSION_MODE: backend.permissionMode,
|
|
246
266
|
...(backend.agentId
|
|
247
267
|
? { QWEN_AUDIO_AGENT_BACKEND_AGENT: backend.agentId }
|
|
@@ -255,7 +275,7 @@ function backendEnvironment(env, backend) {
|
|
|
255
275
|
'_PORT',
|
|
256
276
|
)
|
|
257
277
|
next[portEnvironment] = target.port
|
|
258
|
-
|| (
|
|
278
|
+
|| (['https:', 'wss:'].includes(target.protocol) ? '443' : '80')
|
|
259
279
|
return next
|
|
260
280
|
}
|
|
261
281
|
|
package/docs/architecture.md
CHANGED
|
@@ -14,7 +14,7 @@ layers:
|
|
|
14
14
|
requiring tools, current information, files, applications, code, or
|
|
15
15
|
multi-step work.
|
|
16
16
|
|
|
17
|
-
The backend may be OpenCode, OpenClaw, Qoder, Kimi Code, or another
|
|
17
|
+
The backend may be OpenCode, OpenClaw, Qoder, Qwen Code, Kimi Code, or another
|
|
18
18
|
ACP-compatible Agent.
|
|
19
19
|
It may internally use tools, skills, agents, or other Sessions. Those are
|
|
20
20
|
backend-private implementation details and do not create additional
|
|
@@ -283,7 +283,7 @@ after the asynchronous Session tool has already succeeded.
|
|
|
283
283
|
## 8. Backend-internal capabilities
|
|
284
284
|
|
|
285
285
|
For ACP backends that accept client-supplied MCP servers, including OpenCode,
|
|
286
|
-
Qoder, and Kimi Code, the Gateway injects the same five tools into the
|
|
286
|
+
Qoder, Qwen Code, and Kimi Code, the Gateway injects the same five tools into the
|
|
287
287
|
coordinator: Session list, start, send, status, and cancel. OpenClaw ACP does
|
|
288
288
|
not accept client-supplied MCP servers, so the same coordination contract maps
|
|
289
289
|
to OpenClaw's native Session tools. `session_start` and `session_send` return an
|
|
@@ -313,14 +313,14 @@ backend Agent envelope
|
|
|
313
313
|
Shared ACP adapter
|
|
314
314
|
↓
|
|
315
315
|
OpenCode ACP, OpenClaw ACP bridge, Qoder ACP,
|
|
316
|
-
Kimi Code ACP, or another ACP Agent
|
|
316
|
+
Qwen Code ACP, Kimi Code ACP, or another ACP Agent
|
|
317
317
|
```
|
|
318
318
|
|
|
319
319
|
Backend-specific API details belong only in `server/src/agent`. Realtime tools
|
|
320
320
|
must not import backend adapters. The UI consumes only public Work events and
|
|
321
321
|
final timeline content. Package-level `shared` modules are foundational runtime
|
|
322
|
-
utilities; server `core` may depend on them, but they must not
|
|
323
|
-
layers.
|
|
322
|
+
utilities; server `core` and `process` may depend on them, but they must not
|
|
323
|
+
depend on server layers.
|
|
324
324
|
|
|
325
325
|
Gateway may serve the immutable `web/dist` artifact as a deployment
|
|
326
326
|
convenience, but this is static hosting only. Gateway source must not import UI
|
|
@@ -330,15 +330,46 @@ own labels and interaction patterns.
|
|
|
330
330
|
|
|
331
331
|
## 10. Process ownership
|
|
332
332
|
|
|
333
|
-
The Gateway is the only core product service.
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
333
|
+
The Gateway is the only core product service. Backend lifecycles use one shared
|
|
334
|
+
`owned/external` ownership model:
|
|
335
|
+
|
|
336
|
+
- `owned`: Gateway starts the required local backend processes and stops them
|
|
337
|
+
on exit. The native backend process loads its own user configuration, models,
|
|
338
|
+
tools, and MCP servers; the adapter supplies only protocol parameters and
|
|
339
|
+
required shared capabilities.
|
|
340
|
+
- `external`: available only to backends declaring external-service support.
|
|
341
|
+
Gateway does not start, move, or stop that backend. It connects through the
|
|
342
|
+
backend's published protocol address and leaves configuration and state under
|
|
343
|
+
the external service's control.
|
|
344
|
+
|
|
345
|
+
Backend service ownership and the ACP connection are independent axes. Each
|
|
346
|
+
backend profile declares an `acpConnection`; the connection factory currently
|
|
347
|
+
implements `process`, which launches one local ACP stdio child. A future remote
|
|
348
|
+
ACP bridge can add another connection kind without changing coordinator,
|
|
349
|
+
permission, Work, or Session lifecycle code. Declaring an external backend
|
|
350
|
+
service does not by itself make the ACP connection remote.
|
|
351
|
+
|
|
352
|
+
The shared adapter usually owns one ACP stdio child and stops it with Gateway.
|
|
353
|
+
OpenCode, Qoder, Qwen Code, and Kimi Code run directly as ACP agents; OpenCode may also
|
|
354
|
+
start its native local Session UI service. `OPENCODE_BASE_URL` currently names
|
|
355
|
+
that UI service, not a remote ACP execution endpoint, so OpenCode remains
|
|
356
|
+
`owned`.
|
|
357
|
+
|
|
358
|
+
OpenClaw uses a small ACP bridge. Without an explicit address, Gateway starts
|
|
359
|
+
an OpenClaw Gateway with isolated runtime and Session state. When
|
|
360
|
+
`OPENCLAW_BASE_URL` is explicit, it connects to the user's existing OpenClaw
|
|
361
|
+
Gateway without reading, copying, or modifying its authentication or Agent
|
|
362
|
+
state. Service ownership is then `external`, while the ACP connection remains
|
|
363
|
+
a local `process`: the official local bridge connects to the remote OpenClaw
|
|
364
|
+
Gateway over WebSocket/WSS. External connections bypass the short local-startup
|
|
365
|
+
port probe so the bridge can report the real network, TLS, and authentication
|
|
366
|
+
result. A local bridge exit interrupts ACP only and never changes the remote
|
|
367
|
+
Gateway lifecycle.
|
|
368
|
+
|
|
369
|
+
Codex follows the same boundary: qwen-audio-agent starts `codex-acp` over ACP
|
|
370
|
+
stdio, and that adapter starts Codex App Server over its own local stdio
|
|
371
|
+
protocol. Codex App Server may expose other transports, but they are not a
|
|
372
|
+
remote ACP endpoint and must not leak into the shared ACP adapter.
|
|
342
373
|
|
|
343
374
|
Desktop, TUI and WebUI are replaceable Gateway clients. They must never spawn,
|
|
344
375
|
restart or stop the Gateway or a backend. Closing a UI therefore cannot affect
|
package/docs/architecture.zh.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
1. **实时前端** — 全双工语音、简单直接回答,以及基本的本地时间/记忆工具。
|
|
10
10
|
2. **后端 Agent** — 一个持久 Agent Session,负责处理所有需要工具、当前信息、文件、应用程序、代码或多步工作的请求。
|
|
11
11
|
|
|
12
|
-
后端可以是 OpenCode、OpenClaw、Qoder、Kimi Code 或其他 ACP 兼容 Agent。
|
|
12
|
+
后端可以是 OpenCode、OpenClaw、Qoder、Qwen Code、Kimi Code 或其他 ACP 兼容 Agent。
|
|
13
13
|
它内部可以使用工具、技能、Agent 或其他 Session。这些都是后端私有实现细节,
|
|
14
14
|
不会创建额外的 qwen-audio-agent 层。所有后端通过一个 ACP 客户端和一个
|
|
15
15
|
共享协调适配器连接;后端特定的启动和能力行为位于已注册的驱动程序中。
|
|
@@ -233,7 +233,7 @@ Work 调度通道。因此,其他语音请求可以在目标 Session 运行期
|
|
|
233
233
|
|
|
234
234
|
## 8. 后端内部能力
|
|
235
235
|
|
|
236
|
-
对于接受客户端提供的 MCP 服务器的 ACP 后端(包括 OpenCode、Qoder 和
|
|
236
|
+
对于接受客户端提供的 MCP 服务器的 ACP 后端(包括 OpenCode、Qoder、Qwen Code 和
|
|
237
237
|
Kimi Code),Gateway 向协调器注入相同的五个工具:Session list、start、
|
|
238
238
|
send、status 和 cancel。OpenClaw ACP 不接受客户端提供的 MCP 服务器,
|
|
239
239
|
因此相同的协调契约映射到 OpenClaw 的原生 Session 工具。`session_start`
|
|
@@ -260,12 +260,12 @@ backend agent envelope
|
|
|
260
260
|
Shared ACP adapter
|
|
261
261
|
↓
|
|
262
262
|
OpenCode ACP, OpenClaw ACP bridge, Qoder ACP,
|
|
263
|
-
Kimi Code ACP, or another ACP Agent
|
|
263
|
+
Qwen Code ACP, Kimi Code ACP, or another ACP Agent
|
|
264
264
|
```
|
|
265
265
|
|
|
266
266
|
后端特定的 API 细节仅属于 `server/src/agent`。实时工具不得导入后端适配器。
|
|
267
267
|
UI 仅消费公共 Work 事件和最终时间线内容。包级别的 `shared` 模块是基础运行时
|
|
268
|
-
工具;server `core` 可以依赖它们,但它们不得依赖 server 层。
|
|
268
|
+
工具;server `core` 和 `process` 可以依赖它们,但它们不得依赖 server 层。
|
|
269
269
|
|
|
270
270
|
Gateway 可以将不可变的 `web/dist` 产物作为部署便利来提供,但这仅是静态托管。
|
|
271
271
|
Gateway 源码不得导入 UI 组件、呈现文本、样式、终端行为或桌面行为。
|
|
@@ -273,13 +273,33 @@ Gateway 源码不得导入 UI 组件、呈现文本、样式、终端行为或
|
|
|
273
273
|
|
|
274
274
|
## 10. 进程所有权
|
|
275
275
|
|
|
276
|
-
Gateway
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
276
|
+
Gateway 是唯一的核心产品服务。后台生命周期由共享的 `owned/external` 归属模型管理:
|
|
277
|
+
|
|
278
|
+
- `owned`:Gateway 启动后端所需的本地进程,并在退出时停止它们。后台原生进程负责
|
|
279
|
+
加载自己的用户配置、模型、工具和 MCP;适配器只提供协议参数和必要的公共能力。
|
|
280
|
+
- `external`:仅适用于声明了外部服务能力的后端。Gateway 不启动、改端口或停止该
|
|
281
|
+
后台,只通过后端公开的协议地址连接,把配置与状态完全留给外部服务管理。
|
|
282
|
+
|
|
283
|
+
后台服务归属与 ACP 连接方式是两个相互独立的维度。每个后台 profile 声明一个
|
|
284
|
+
`acpConnection`;连接工厂当前实现 `process`,即启动一个本地 ACP stdio 子进程。
|
|
285
|
+
未来的远程 ACP bridge 可以新增另一种连接类型,而无需修改协调、权限、Work 或
|
|
286
|
+
Session 生命周期代码。声明外部后台服务,并不意味着 ACP 连接也自动变成远程连接。
|
|
287
|
+
|
|
288
|
+
共享适配器通常拥有一个 ACP stdio 子进程,并随 Gateway 一起停止。OpenCode、Qoder、
|
|
289
|
+
Qwen Code 和 Kimi Code 直接作为 ACP Agent 运行;OpenCode 还可以额外启动其原生本地 Session
|
|
290
|
+
UI 服务。当前 `OPENCODE_BASE_URL` 表示这个 UI 服务地址,不是远程 ACP 执行端点,
|
|
291
|
+
因此 OpenCode 仍属于 `owned`。
|
|
292
|
+
|
|
293
|
+
OpenClaw 使用一个小型 ACP bridge。未显式配置地址时,Gateway 启动一个具有隔离运行时
|
|
294
|
+
和 Session 状态的 OpenClaw Gateway;显式配置 `OPENCLAW_BASE_URL` 时,则直接连接用户
|
|
295
|
+
已有的 OpenClaw Gateway,并且不读取、复制或修改其认证和 Agent 状态。此时服务归属为
|
|
296
|
+
`external`,ACP 连接仍是本地 `process`:本地官方 bridge 通过 WebSocket/WSS 连接远程
|
|
297
|
+
OpenClaw Gateway。外部连接不使用面向本地启动的短时端口探测,而由 bridge 报告实际的
|
|
298
|
+
网络、TLS 和认证结果。本地 bridge 退出只会中断 ACP 连接,不会触碰远程 Gateway。
|
|
299
|
+
|
|
300
|
+
Codex 也遵循同一边界:qwen-audio-agent 通过 ACP stdio 启动 `codex-acp`,该适配器再
|
|
301
|
+
通过自己的本地 stdio 协议启动 Codex App Server。Codex App Server 可以提供其他传输,
|
|
302
|
+
但它们不是远程 ACP 端点,不应泄漏进共享 ACP 适配层。
|
|
283
303
|
|
|
284
304
|
Desktop、TUI 和 WebUI 是可替换的 Gateway 客户端。它们绝不能生成、重启或停止
|
|
285
305
|
Gateway 或后端。因此,关闭 UI 不会影响排队中的工作或固定的后端 Agent Session。
|
|
@@ -10,6 +10,7 @@ The Backend Agent handles tasks that require tools, file operations, or sustaine
|
|
|
10
10
|
| OpenCode | Native ACP | Supports one-click install and Bailian configuration | ★★★★★ |
|
|
11
11
|
| OpenClaw | Built-in ACP bridge | Supports one-click install and Bailian configuration | ★★★★★ |
|
|
12
12
|
| Qoder | Native ACP | Supports one-click install, requires user configuration | ★★★★★ |
|
|
13
|
+
| Qwen Code | Native ACP | Supports one-click install, requires user configuration | ★★★★☆ |
|
|
13
14
|
| Kimi Code | Native ACP | Supports one-click install, requires user configuration | ★★★★★ |
|
|
14
15
|
| Hermes | Native ACP | Supports one-click install, requires user configuration | ★★★★☆ |
|
|
15
16
|
| CodeBuddy | Native ACP | Supports one-click install, requires user configuration | ★★★★☆ |
|
|
@@ -68,7 +69,7 @@ The command, arguments, display name, and working directory can be configured vi
|
|
|
68
69
|
- `native` (default): Permissions are determined and prompted by the backend agent itself; the Gateway only forwards requests as-is.
|
|
69
70
|
- `full`: Grants the highest permissions at startup, allowing the backend to directly execute commands, read and write files without per-action confirmation.
|
|
70
71
|
|
|
71
|
-
`full` currently supports OpenCode, Qoder, Kimi Code, Hermes, CodeBuddy, Codex, and Claude Code; the Gateway will automatically approve permission requests from these backends. OpenClaw's execution authorization is constrained by exec approvals, elevated, and other configuration settings, and cannot be expressed via a single toggle — when `full` is selected, the Gateway will explicitly refuse to start. The highest permissions amplify the risk of accidental operations and should only be enabled in trusted projects.
|
|
72
|
+
`full` currently supports OpenCode, Qoder, Qwen Code, Kimi Code, Hermes, CodeBuddy, Codex, and Claude Code; the Gateway will automatically approve permission requests from these backends. OpenClaw's execution authorization is constrained by exec approvals, elevated, and other configuration settings, and cannot be expressed via a single toggle — when `full` is selected, the Gateway will explicitly refuse to start. The highest permissions amplify the risk of accidental operations and should only be enabled in trusted projects.
|
|
72
73
|
|
|
73
74
|
## Backend Service
|
|
74
75
|
|
|
@@ -1,57 +1,67 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 后台 Agent
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
后台 Agent 负责需要工具、文件操作或持续处理的任务。前台语音 LLM 判断请求
|
|
4
|
+
需要执行时,会把目标交给后台 Agent 异步执行,结果完成后自然回到当前对话。
|
|
4
5
|
|
|
5
|
-
##
|
|
6
|
+
## 支持的 Agent
|
|
6
7
|
|
|
7
|
-
|
|
|
8
|
+
| 后台 Agent | 接入方式 | 接入准备 | 推荐指数 |
|
|
8
9
|
| --- | --- | --- | --- |
|
|
9
|
-
|
|
|
10
|
-
| OpenCode |
|
|
11
|
-
| OpenClaw |
|
|
12
|
-
| Qoder |
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
|
|
|
10
|
+
| 无 | N/A | 仅前台模式,无需配置 | ★★★★★ |
|
|
11
|
+
| OpenCode | 原生 ACP | 支持一键安装和百炼配置 | ★★★★★ |
|
|
12
|
+
| OpenClaw | 内置 ACP 桥接 | 支持一键安装和百炼配置 | ★★★★★ |
|
|
13
|
+
| Qoder | 原生 ACP | 支持一键安装,需用户配置 | ★★★★★ |
|
|
14
|
+
| Qwen Code | 原生 ACP | 支持一键安装,需用户配置 | ★★★★☆ |
|
|
15
|
+
| Kimi Code | 原生 ACP | 支持一键安装,需用户配置 | ★★★★★ |
|
|
16
|
+
| Hermes | 原生 ACP | 支持一键安装,需用户配置 | ★★★★☆ |
|
|
17
|
+
| CodeBuddy | 原生 ACP | 支持一键安装,需用户配置 | ★★★★☆ |
|
|
18
|
+
| Codex | 外部 ACP 适配 | 支持一键安装本体与适配器,需用户配置 | ★★★★☆ |
|
|
19
|
+
| Claude Code | 外部 ACP 适配 | 支持一键安装本体与适配器,需用户配置 | ★★★★☆ |
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
推荐指数综合反映当前集成完整度、兼容性和实际验证程度:五星表示已经过充分测试的
|
|
22
|
+
推荐集成,四星表示正在开发或尚未完成同等范围验证。
|
|
20
23
|
|
|
21
|
-
##
|
|
24
|
+
## 一键安装
|
|
22
25
|
|
|
23
|
-
|
|
26
|
+
未安装的后台 Agent 可用统一命令安装到本机:
|
|
24
27
|
|
|
25
28
|
```bash
|
|
26
29
|
qwenaudio install codex
|
|
27
30
|
```
|
|
28
31
|
|
|
29
|
-
|
|
32
|
+
安装前先检测,**只补齐缺失的组件**:原生 ACP 后台装好即可用;本体缺失时装本体;
|
|
33
|
+
本体已装、仅缺 ACP 适配器时只装适配器;全部就绪时直接提示已可用。桌面版设置页
|
|
34
|
+
的“后台 Agent”列表中,未安装且支持一键安装的后台行尾会显示“安装”按钮,与 CLI
|
|
35
|
+
使用同一份安装逻辑。
|
|
30
36
|
|
|
31
|
-
|
|
37
|
+
查看当前可用的后台 Agent:
|
|
32
38
|
|
|
33
39
|
```bash
|
|
34
40
|
qwenaudio setup
|
|
35
41
|
```
|
|
36
42
|
|
|
37
|
-
|
|
43
|
+
该命令只检查,不会安装、下载或验证凭据。只检查指定后台或获取机器可读结果:
|
|
38
44
|
|
|
39
45
|
```bash
|
|
40
46
|
qwenaudio setup --backend codex
|
|
41
47
|
qwenaudio setup --json
|
|
42
48
|
```
|
|
43
49
|
|
|
44
|
-
##
|
|
50
|
+
## 选择后台
|
|
45
51
|
|
|
46
|
-
`AGENT_PROTOCOL`
|
|
52
|
+
`AGENT_PROTOCOL` 是可选配置。留空时,Gateway 以仅前台模式运行,实时语音聊天
|
|
53
|
+
保持可用;需要后台执行的请求会返回明确说明,不会创建任务或猜测执行结果。
|
|
54
|
+
也可以在命令行中使用 `qwenaudio --backend none`,明确要求仅启动前台模式。
|
|
47
55
|
|
|
48
56
|
```dotenv
|
|
49
57
|
AGENT_PROTOCOL=openclaw
|
|
50
58
|
```
|
|
51
59
|
|
|
52
|
-
OpenCode
|
|
60
|
+
OpenCode 和 OpenClaw 支持自动下载安装;配置 `DASHSCOPE_API_KEY` 和
|
|
61
|
+
`QWEN_AUDIO_AGENT_BACKEND_MODEL` 后即可自动接入百炼模型。其他后台需先安装并完成
|
|
62
|
+
原生配置,qwen-audio-agent 会复用其用户级模型、工具、MCP、Skill 和认证。
|
|
53
63
|
|
|
54
|
-
|
|
64
|
+
使用其他支持 ACP stdio 的 Agent:
|
|
55
65
|
|
|
56
66
|
```dotenv
|
|
57
67
|
AGENT_PROTOCOL=acp
|
|
@@ -59,23 +69,27 @@ ACP_COMMAND=your-agent
|
|
|
59
69
|
ACP_ARGS=["--acp"]
|
|
60
70
|
```
|
|
61
71
|
|
|
62
|
-
|
|
72
|
+
命令、参数、显示名称和工作目录可分别通过 `ACP_COMMAND`、`ACP_ARGS`、
|
|
73
|
+
`ACP_LABEL` 和 `ACP_WORKSPACE` 配置。通用 ACP 入口不提供一键安装,请自行安装。
|
|
63
74
|
|
|
64
|
-
##
|
|
75
|
+
## 权限模式
|
|
65
76
|
|
|
66
|
-
`QWEN_AUDIO_AGENT_BACKEND_PERMISSION_MODE`
|
|
77
|
+
`QWEN_AUDIO_AGENT_BACKEND_PERMISSION_MODE` 可设为:
|
|
67
78
|
|
|
68
|
-
- `native
|
|
69
|
-
- `full
|
|
79
|
+
- `native`(默认):权限由后台 Agent 自己判断和询问,Gateway 只负责原样转发。
|
|
80
|
+
- `full`:启动时明确授予最高权限,后台可直接执行命令、读写文件,不再逐次确认。
|
|
70
81
|
|
|
71
|
-
`full`
|
|
82
|
+
`full` 当前支持 OpenCode、Qoder、Qwen Code、Kimi Code、Hermes、CodeBuddy、Codex 和
|
|
83
|
+
Claude Code,Gateway 会自动批准这些后台发起的权限请求。OpenClaw 的执行授权受
|
|
84
|
+
exec approvals、elevated 等配置约束,无法由统一开关表达,选择 `full` 时
|
|
85
|
+
Gateway 会明确拒绝启动。最高权限会放大误操作风险,只应在可信项目中启用。
|
|
72
86
|
|
|
73
|
-
##
|
|
87
|
+
## 后台常驻
|
|
74
88
|
|
|
75
|
-
|
|
89
|
+
希望个人助理长期在线时,可以安装为用户后台服务:
|
|
76
90
|
|
|
77
91
|
```bash
|
|
78
|
-
qwenaudio gateway install #
|
|
92
|
+
qwenaudio gateway install # 安装并立即启动
|
|
79
93
|
qwenaudio gateway status
|
|
80
94
|
qwenaudio gateway restart
|
|
81
95
|
qwenaudio gateway stop
|
|
@@ -83,7 +97,8 @@ qwenaudio gateway start
|
|
|
83
97
|
qwenaudio gateway uninstall
|
|
84
98
|
```
|
|
85
99
|
|
|
86
|
-
|
|
100
|
+
后台服务每次启动都会重新读取 `config.env`,修改配置后执行 `gateway restart`
|
|
101
|
+
即可生效。
|
|
87
102
|
|
|
88
|
-
|
|
89
|
-
[
|
|
103
|
+
各后台的高级配置(可执行文件路径、工作目录、模型覆盖等)见
|
|
104
|
+
[配置说明](../configuration.zh.md)。
|
package/docs/configuration.md
CHANGED
|
@@ -181,7 +181,10 @@ the Gateway only provides frontend real-time voice chat; requests requiring back
|
|
|
181
181
|
will return a clear error without creating tasks or guessing execution results.
|
|
182
182
|
You can also use `qwenaudio --backend none` to explicitly start frontend-only mode.
|
|
183
183
|
|
|
184
|
-
The default OpenClaw address is `http://127.0.0.1:18789
|
|
184
|
+
The default OpenClaw address is `http://127.0.0.1:18789`. When
|
|
185
|
+
`OPENCLAW_BASE_URL` is set explicitly, qwen-audio-agent connects to that
|
|
186
|
+
Gateway as an external black box. It does not start another OpenClaw Gateway
|
|
187
|
+
or read, copy, or modify the Gateway's model credentials:
|
|
185
188
|
|
|
186
189
|
```dotenv
|
|
187
190
|
AGENT_PROTOCOL=openclaw
|
|
@@ -189,19 +192,51 @@ OPENCLAW_BASE_URL=http://127.0.0.1:18789
|
|
|
189
192
|
OPENCLAW_GATEWAY_TOKEN=
|
|
190
193
|
```
|
|
191
194
|
|
|
192
|
-
|
|
195
|
+
For a remote deployment, use an `https://` or `wss://` address. Prefer
|
|
196
|
+
`wss://` across machines and never embed the token in the URL:
|
|
197
|
+
|
|
198
|
+
```dotenv
|
|
199
|
+
AGENT_PROTOCOL=openclaw
|
|
200
|
+
OPENCLAW_BASE_URL=wss://openclaw.example.com
|
|
201
|
+
OPENCLAW_GATEWAY_TOKEN=replace-with-your-token
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
External mode still starts the lightweight official `openclaw acp` bridge on
|
|
205
|
+
the qwen-audio-agent host and speaks ACP over stdio to it. The bridge then
|
|
206
|
+
connects to the user-managed remote Gateway. qwen-audio-agent never starts,
|
|
207
|
+
stops, reconfigures, or moves that remote Gateway. The official bridge reports
|
|
208
|
+
the real network, TLS, and authentication error instead of using the 300 ms
|
|
209
|
+
local startup probe. If local security software terminates the bridge, the turn
|
|
210
|
+
fails explicitly while the remote Gateway remains untouched.
|
|
211
|
+
|
|
212
|
+
If local security policy blocks only qwen-audio-agent's OpenClaw launcher,
|
|
213
|
+
point to a trusted OpenClaw executable and the Gateway will run the lightweight
|
|
214
|
+
bridge directly:
|
|
215
|
+
|
|
216
|
+
```dotenv
|
|
217
|
+
OPENCLAW_ACP_BIN=/absolute/path/to/openclaw
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
This does not change ownership of the remote Gateway. The local process remains
|
|
221
|
+
an ACP bridge and is stopped with the qwen-audio-agent Gateway.
|
|
222
|
+
|
|
223
|
+
When `OPENCLAW_BASE_URL` is not set, it preferentially launches the `openclaw`
|
|
224
|
+
in the user environment. When both
|
|
193
225
|
`DASHSCOPE_API_KEY` and `QWEN_AUDIO_AGENT_BACKEND_MODEL` are provided, an independent Bailian
|
|
194
226
|
configuration and state directory is generated for the qwen-audio-agent process, without
|
|
195
227
|
modifying the user's native configuration. When no backend model is specified, it inherits the
|
|
196
228
|
user's native configuration, models, and authentication, but does not enable external messaging
|
|
197
|
-
channels such as DingTalk in the independent instance.
|
|
198
|
-
a Gateway Token, it will be automatically read and used for local ACP connections; it can
|
|
199
|
-
be overridden via `OPENCLAW_GATEWAY_TOKEN`, or `OPENCLAW_CONFIG_PATH` can be set to explicitly
|
|
200
|
-
specify a different OpenClaw configuration.
|
|
229
|
+
channels such as DingTalk in the independent instance. In managed mode, if the original configuration
|
|
230
|
+
has enabled a Gateway Token, it will be automatically read and used for local ACP connections; it can
|
|
231
|
+
also be overridden via `OPENCLAW_GATEWAY_TOKEN`, or `OPENCLAW_CONFIG_PATH` can be set to explicitly
|
|
232
|
+
specify a different OpenClaw configuration. When connecting to an external Gateway, also set
|
|
233
|
+
`OPENCLAW_GATEWAY_TOKEN` (or `OPENCLAW_GATEWAY_TOKEN_FILE`).
|
|
201
234
|
|
|
202
235
|
OpenCode: The Gateway interacts with it via `opencode acp` and manages the local service used
|
|
203
236
|
to open the native Session interface. When there is no compatible installation, it automatically
|
|
204
|
-
uses a fixed npm package; users do not need to separately install or start the service
|
|
237
|
+
uses a fixed npm package; users do not need to separately install or start the service.
|
|
238
|
+
`OPENCODE_BASE_URL` names that local Session UI service; it is not a remote ACP execution
|
|
239
|
+
endpoint that qwen-audio-agent can attach to:
|
|
205
240
|
|
|
206
241
|
```dotenv
|
|
207
242
|
AGENT_PROTOCOL=opencode
|
|
@@ -231,6 +266,28 @@ QODER_CONFIG_DIR=
|
|
|
231
266
|
|
|
232
267
|
The Gateway manages the Qoder ACP subprocess; Qoder does not accept `--backend-url`.
|
|
233
268
|
|
|
269
|
+
### Qwen Code
|
|
270
|
+
|
|
271
|
+
Qwen Code connects through its native stdio ACP entry point, `qwen --acp`.
|
|
272
|
+
The Gateway starts only this local ACP process and preserves Qwen Code's own
|
|
273
|
+
authentication, provider, model, MCP, Skill, and Session configuration.
|
|
274
|
+
|
|
275
|
+
```dotenv
|
|
276
|
+
AGENT_PROTOCOL=qwen
|
|
277
|
+
QWEN_AUDIO_AGENT_BACKEND_PERMISSION_MODE=native
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
Run `qwen` interactively and use `/auth` for first-time authentication. The
|
|
281
|
+
removed `qwen auth` command is not used. Optional overrides:
|
|
282
|
+
|
|
283
|
+
```dotenv
|
|
284
|
+
QWEN_CODE_BIN=
|
|
285
|
+
QWEN_CODE_WORKSPACE=
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
The current integration intentionally supports the local ACP process only;
|
|
289
|
+
Qwen Code's experimental network service is not treated as a remote backend.
|
|
290
|
+
|
|
234
291
|
### Kimi Code
|
|
235
292
|
|
|
236
293
|
Kimi Code ([MoonshotAI/kimi-code](https://github.com/MoonshotAI/kimi-code))
|
|
@@ -416,7 +473,7 @@ managed by the Gateway, and do not accept `--backend-url`.
|
|
|
416
473
|
- `full`: Explicitly grants the highest permission at startup; the backend can directly execute
|
|
417
474
|
commands, read and write files, without per-request confirmation.
|
|
418
475
|
|
|
419
|
-
`full` currently supports OpenCode, Qoder, Kimi Code, Hermes, CodeBuddy, Codex, and
|
|
476
|
+
`full` currently supports OpenCode, Qoder, Qwen Code, Kimi Code, Hermes, CodeBuddy, Codex, and
|
|
420
477
|
Claude Code. The Gateway automatically approves permission requests initiated by these ACP
|
|
421
478
|
backends; in addition, Kimi Code switches to an Auto mode that does not ask again via ACP
|
|
422
479
|
Session configuration, Qoder and CodeBuddy CLI use `--dangerously-skip-permissions`, OpenCode
|