qwen-audio-agent 2.0.0 → 2.0.1
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 +2 -0
- package/README_ZH.md +2 -0
- package/cli/package.json +1 -1
- package/desktop/src/i18n.mjs +1 -0
- package/docs/backends/configuration.md +18 -17
- package/docs/backends/configuration.zh.md +16 -14
- package/docs/backends/overview.md +11 -8
- package/docs/backends/overview.zh.md +8 -5
- package/docs/configuration/backend.md +1 -1
- package/docs/configuration/backend.zh.md +1 -1
- package/package.json +1 -2
- package/scripts/release-check +12 -20
- package/scripts/runtime/claude-code-acp.mjs +1 -1
- 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 +1 -1
- package/server/src/backend/adapters/acp/backend-adapter.mjs +7 -12
- package/server/src/backend/adapters/acp/drivers/deepseek-harness.mjs +12 -36
- package/server/src/backend/adapters/acp/process-client.mjs +6 -1
- package/server/src/core/config.mjs +2 -6
- package/shared/backend/catalog.mjs +19 -44
- package/shared/backend/install.mjs +12 -16
- package/shared/backend/runtime-package.mjs +3 -3
- package/shared/backend/setup.mjs +16 -113
- package/tui/package.json +1 -1
- package/config/backends/deepseek-harness/cordis.yml +0 -59
- package/scripts/runtime/deepseek-harness-acp.mjs +0 -59
package/README.md
CHANGED
|
@@ -27,6 +27,8 @@ tells you:
|
|
|
27
27
|
|
|
28
28
|
## News
|
|
29
29
|
|
|
30
|
+
- **2026-09-26 · [v2.0.1](https://github.com/QwenAudio/qwen-audio-agent/releases/tag/v2.0.1)**
|
|
31
|
+
🔧 Improved local backend discovery and installation: reuse existing Agents, install only missing components from official latest releases, and support DeepSeek Harness native ACP; fixed continued coordinator Session use.
|
|
30
32
|
- **2026-09-23 · [v2.0.0](https://github.com/QwenAudio/qwen-audio-agent/releases/tag/v2.0.0)**
|
|
31
33
|
🏗️ Rebuilt the orchestration runtime with a unified client protocol and ACP / A2A backend integration; 🎙️ expanded [voice and video model support](#voice-frontends); 🧠 enhanced frontend tools, memory, and knowledge libraries; 💬 added a desktop conversation panel and remote mobile access; 🧩 added [customer service, smart cockpit, digital human, and other examples](#examples-and-scenario-expansion); 📄 published the [technical report](https://arxiv.org/pdf/2609.25195).
|
|
32
34
|
- **2026-08-20 · [v1.11.0](https://github.com/QwenAudio/qwen-audio-agent/releases/tag/v1.11.0)**
|
package/README_ZH.md
CHANGED
|
@@ -21,6 +21,8 @@
|
|
|
21
21
|
|
|
22
22
|
## News
|
|
23
23
|
|
|
24
|
+
- **2026-09-26 · [v2.0.1](https://github.com/QwenAudio/qwen-audio-agent/releases/tag/v2.0.1)**
|
|
25
|
+
🔧 优化本机后台发现与安装:优先复用已有 Agent,仅补装缺失组件的官方最新版,接入 DeepSeek Harness 原生 ACP;修复协调会话连续调用。
|
|
24
26
|
- **2026-09-23 · [v2.0.0](https://github.com/QwenAudio/qwen-audio-agent/releases/tag/v2.0.0)**
|
|
25
27
|
🏗️ 重构编排运行时,统一客户端协议与 ACP / A2A 后台接入;🎙️ 扩展[语音与视频模型](#语音前台);🧠 完善前台工具、记忆与资料库;💬 新增桌面对话面板与手机远程连接;🧩 新增[客服、座舱、数字人等示例](#示例与场景扩展);📄 发布[技术报告](https://arxiv.org/pdf/2609.25195)。
|
|
26
28
|
- **2026-08-20 · [v1.11.0](https://github.com/QwenAudio/qwen-audio-agent/releases/tag/v1.11.0)**
|
package/cli/package.json
CHANGED
package/desktop/src/i18n.mjs
CHANGED
|
@@ -64,8 +64,9 @@ external OpenClaw Gateway, a Session model override requires its ACP bridge to a
|
|
|
64
64
|
## OpenCode
|
|
65
65
|
|
|
66
66
|
The Gateway interacts with it via `opencode acp` and manages the local service used
|
|
67
|
-
to open the native Session interface.
|
|
68
|
-
uses
|
|
67
|
+
to open the native Session interface. Existing local installations take priority. The CLI
|
|
68
|
+
uses the latest npm package via `npx` only when no local installation exists and a Bailian key
|
|
69
|
+
and backend model are configured. The desktop app requires an explicit install action.
|
|
69
70
|
`OPENCODE_BASE_URL` names that local Session UI service; it is not a remote ACP execution
|
|
70
71
|
endpoint that qwen-audio-agent can attach to:
|
|
71
72
|
|
|
@@ -267,8 +268,8 @@ changed; the returned ACP `configOptions` remain authoritative.
|
|
|
267
268
|
Codex ([openai/codex](https://github.com/openai/codex)) connects via
|
|
268
269
|
[codex-acp](https://github.com/agentclientprotocol/codex-acp) maintained by the ACP project.
|
|
269
270
|
The launcher script preferentially binds the `codex` already installed in the user environment,
|
|
270
|
-
and preferentially uses the installed `codex-acp`; when the adapter is missing, it uses
|
|
271
|
-
version via `npx
|
|
271
|
+
and preferentially uses the installed `codex-acp`; when the adapter is missing, it uses the latest
|
|
272
|
+
version via `npx` in the CLI. The desktop app offers a separate “Install adapter” button.
|
|
272
273
|
|
|
273
274
|
```dotenv
|
|
274
275
|
AGENT_PROTOCOL=codex
|
|
@@ -294,8 +295,8 @@ CODEX_BASE_URL=
|
|
|
294
295
|
Claude Code connects via
|
|
295
296
|
[@zed-industries/claude-code-acp](https://github.com/zed-industries/claude-code-acp)
|
|
296
297
|
maintained by Zed. The launcher script preferentially uses the already installed
|
|
297
|
-
`claude-code-acp
|
|
298
|
-
|
|
298
|
+
`claude-code-acp`. If missing, the CLI can use the latest version via `npx`; the desktop app
|
|
299
|
+
offers “Install adapter” without reinstalling Claude Code. Claude Code must still be authenticated.
|
|
299
300
|
|
|
300
301
|
```dotenv
|
|
301
302
|
AGENT_PROTOCOL=claude
|
|
@@ -322,7 +323,7 @@ Code executable used by the adapter by default.
|
|
|
322
323
|
|
|
323
324
|
## DeepSeek
|
|
324
325
|
|
|
325
|
-
The integration uses local DeepSeek
|
|
326
|
+
The integration uses the local DeepSeek CLI's native `dsh --profile acp` entry point. Keep an existing compatible installation; otherwise install it, then configure credentials through DeepSeek:
|
|
326
327
|
|
|
327
328
|
```bash
|
|
328
329
|
qwenaudio install deepseek
|
|
@@ -333,12 +334,12 @@ Save an API key for `deepseek-official` in DeepSeek Web's “Settings → Models
|
|
|
333
334
|
|
|
334
335
|
```dotenv
|
|
335
336
|
AGENT_PROTOCOL=deepseek
|
|
336
|
-
|
|
337
|
+
QWEN_AUDIO_AGENT_BACKEND_MODEL=
|
|
337
338
|
```
|
|
338
339
|
|
|
339
|
-
You can also supply credentials through `DEEPSEEK_API_KEY`.
|
|
340
|
+
You can also supply credentials through `DEEPSEEK_API_KEY`. Leave the backend model empty to preserve the user's ACP profile settings. Explicit overrides use the standard ACP model configuration interface and fail clearly if rejected. The legacy `DEEPSEEK_HARNESS_MODEL` is only used when the common model setting is empty.
|
|
340
341
|
|
|
341
|
-
It supports ordinary work, permission requests, cancellation, and results.
|
|
342
|
+
It supports ordinary work, MCP injection, permission requests, cancellation, and results. Gateway-managed independent task delegation and native Session history restoration are not provided yet. Capabilities depend on the Harness version.
|
|
342
343
|
|
|
343
344
|
## Pi
|
|
344
345
|
|
|
@@ -414,7 +415,7 @@ qwenaudio install muse
|
|
|
414
415
|
muse
|
|
415
416
|
```
|
|
416
417
|
|
|
417
|
-
The Adapter ships with the framework, but `@muse-code/sdk
|
|
418
|
+
The Adapter ships with the framework, but `@muse-code/sdk` is **not a
|
|
418
419
|
default dependency**. The explicit install command (or desktop Install button)
|
|
419
420
|
installs it under `<QWAUDIO_DATA_DIR>/backends/muse/runtime`; by default this is
|
|
420
421
|
`~/.config/qwaudio/data/backends/muse/runtime`. An existing Muse executable is
|
|
@@ -461,7 +462,7 @@ preconfigured `allowAll` mode and should be used only in a trusted workspace.
|
|
|
461
462
|
Gateway task/session grants select only a one-shot Muse choice and never create a
|
|
462
463
|
provider-persistent approval rule.
|
|
463
464
|
|
|
464
|
-
|
|
465
|
+
Installation adds the latest Muse SDK if missing and preserves existing SDK installations. It does
|
|
465
466
|
not persist Muse Session IDs across Gateway restarts, inject Gateway MCP servers,
|
|
466
467
|
or fetch full bytes behind MSP `outputRef`; file changes remain in the configured
|
|
467
468
|
workspace and final text is returned normally. MSP currently accepts inline image
|
|
@@ -477,8 +478,9 @@ OpenCode and OpenClaw use a consistent user environment priority order:
|
|
|
477
478
|
1. The executable explicitly specified by `OPENCODE_BIN` / `OPENCLAW_BIN`.
|
|
478
479
|
2. The source directory explicitly specified by `OPENCODE_SOURCE_DIR` / `OPENCLAW_SOURCE_DIR`.
|
|
479
480
|
3. The `opencode` / `openclaw` already installed by the user in PATH.
|
|
480
|
-
4.
|
|
481
|
-
|
|
481
|
+
4. The local OpenClaw Bundle (an explicit `OPENCLAW_BUNDLE_BIN` takes priority over PATH).
|
|
482
|
+
5. If not installed and a Bailian key and backend model are configured, the CLI can use the
|
|
483
|
+
latest npm package via `npx`. The desktop app requires an explicit install action.
|
|
482
484
|
|
|
483
485
|
Source directories are only used when explicitly configured by the user, without inferring
|
|
484
486
|
adjacent project directories. To force a particular launch method, configure:
|
|
@@ -497,9 +499,8 @@ OPENCODE_PACKAGE=opencode-ai@1.18.5
|
|
|
497
499
|
OPENCLAW_PACKAGE=openclaw@2026.6.33
|
|
498
500
|
```
|
|
499
501
|
|
|
500
|
-
The OpenCode ACP integration currently requires OpenCode `1.18.0` or higher.
|
|
501
|
-
|
|
502
|
-
user's installation; when `installed` is explicitly set, it directly errors.
|
|
502
|
+
The OpenCode ACP integration currently requires OpenCode `1.18.0` or higher. An older installation
|
|
503
|
+
produces an upgrade prompt; it is neither overwritten nor silently replaced by a downloaded runtime.
|
|
503
504
|
The minimum version can be overridden by `OPENCODE_MIN_VERSION` for validating other
|
|
504
505
|
compatible versions.
|
|
505
506
|
|
|
@@ -57,8 +57,8 @@ OpenClaw 私有 `sessions.patch` 接口修改模型。
|
|
|
57
57
|
## OpenCode
|
|
58
58
|
|
|
59
59
|
Gateway 通过 `opencode acp` 与它交互,并管理用于打开原生 Session
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
界面的本地服务。优先使用本机安装;CLI 在缺失且已配置百炼 Key 和后台模型时
|
|
61
|
+
可通过 `npx` 下载最新包,桌面版需点击安装。`OPENCODE_BASE_URL` 是该本地 Session UI 服务的地址,并不是可供
|
|
62
62
|
qwen-audio-agent 连接的远程 ACP 执行地址:
|
|
63
63
|
|
|
64
64
|
```dotenv
|
|
@@ -249,7 +249,7 @@ CODEBUDDY_MODEL_URL=https://dashscope.aliyuncs.com/compatible-mode/v1/chat/compl
|
|
|
249
249
|
Codex([openai/codex](https://github.com/openai/codex))通过 ACP 项目维护的
|
|
250
250
|
[codex-acp](https://github.com/agentclientprotocol/codex-acp) 接入。启动脚本优先
|
|
251
251
|
绑定用户环境中已安装的 `codex`,并优先使用已安装的 `codex-acp`;缺少 Adapter
|
|
252
|
-
|
|
252
|
+
时 CLI 通过 `npx` 使用最新版本,桌面版提供单独的“安装适配器”按钮。
|
|
253
253
|
|
|
254
254
|
```dotenv
|
|
255
255
|
AGENT_PROTOCOL=codex
|
|
@@ -274,8 +274,9 @@ CODEX_BASE_URL=
|
|
|
274
274
|
|
|
275
275
|
Claude Code 通过 Zed 维护的
|
|
276
276
|
[@zed-industries/claude-code-acp](https://github.com/zed-industries/claude-code-acp)
|
|
277
|
-
|
|
278
|
-
|
|
277
|
+
接入。启动脚本优先使用已安装的 `claude-code-acp`;缺失时 CLI 可通过 `npx`
|
|
278
|
+
使用最新版本,桌面版提供“安装适配器”按钮,不重装已有的 Claude Code。
|
|
279
|
+
Claude Code 本体仍需完成认证。
|
|
279
280
|
|
|
280
281
|
```dotenv
|
|
281
282
|
AGENT_PROTOCOL=claude
|
|
@@ -300,7 +301,7 @@ CLAUDE_CONFIG_DIR=
|
|
|
300
301
|
|
|
301
302
|
## DeepSeek
|
|
302
303
|
|
|
303
|
-
|
|
304
|
+
使用本机 DeepSeek CLI 的原生 `dsh --profile acp` 入口。已有兼容版本无需重装;缺失时安装,再在 DeepSeek 自身设置中配置凭据:
|
|
304
305
|
|
|
305
306
|
```bash
|
|
306
307
|
qwenaudio install deepseek
|
|
@@ -311,12 +312,12 @@ dsh web
|
|
|
311
312
|
|
|
312
313
|
```dotenv
|
|
313
314
|
AGENT_PROTOCOL=deepseek
|
|
314
|
-
|
|
315
|
+
QWEN_AUDIO_AGENT_BACKEND_MODEL=
|
|
315
316
|
```
|
|
316
317
|
|
|
317
|
-
也可通过 `DEEPSEEK_API_KEY`
|
|
318
|
+
也可通过 `DEEPSEEK_API_KEY` 提供凭据。后台模型留空时,保留用户 ACP profile 的配置;显式指定时通过标准 ACP 模型设置接口覆盖,后端不接受时会报错。旧的 `DEEPSEEK_HARNESS_MODEL` 仅在未设置通用模型时作为兼容别名。
|
|
318
319
|
|
|
319
|
-
|
|
320
|
+
支持普通工作、MCP 注入、权限确认、取消与结果回传;暂不提供 Gateway 独立任务委派或原生 Session 历史恢复。完整能力随 Harness 版本变化。
|
|
320
321
|
|
|
321
322
|
## Pi
|
|
322
323
|
|
|
@@ -386,7 +387,7 @@ qwenaudio install muse
|
|
|
386
387
|
muse
|
|
387
388
|
```
|
|
388
389
|
|
|
389
|
-
Adapter 代码随框架发布,但 `@muse-code/sdk
|
|
390
|
+
Adapter 代码随框架发布,但 `@muse-code/sdk` **不属于默认依赖**。
|
|
390
391
|
只有显式运行上述安装命令或点击桌面版安装按钮时,SDK 才会安装到
|
|
391
392
|
`<QWAUDIO_DATA_DIR>/backends/muse/runtime`(默认
|
|
392
393
|
`~/.config/qwaudio/data/backends/muse/runtime`)。已有 Muse 本体会跳过重装。
|
|
@@ -429,7 +430,7 @@ Linux 文件系统。Muse 本体需先在 WSL 内安装并完成认证;配置
|
|
|
429
430
|
预配置的 `allowAll` 模式创建 Session,仅应在可信工作区启用。Gateway 的单任务/
|
|
430
431
|
当前会话授权只选择 Muse 的单次允许选项,不会创建服务商侧持久授权规则。
|
|
431
432
|
|
|
432
|
-
|
|
433
|
+
安装操作会补装最新 Muse SDK,已有 SDK 不会被自动替换。当前不会跨 Gateway 重启保存 Muse
|
|
433
434
|
Session ID、注入 Gateway MCP Server,也不会读取 MSP `outputRef` 指向的完整字节;
|
|
434
435
|
文件改动仍保留在配置的工作区,最终文字会正常返回。当前 Adapter 只把内联图片
|
|
435
436
|
作为 MSP 附件发送,其他附件类型会明确拒绝。
|
|
@@ -444,7 +445,8 @@ OpenCode 和 OpenClaw 使用一致的用户环境优先顺序:
|
|
|
444
445
|
1. `OPENCODE_BIN` / `OPENCLAW_BIN` 明确指定的可执行文件。
|
|
445
446
|
2. `OPENCODE_SOURCE_DIR` / `OPENCLAW_SOURCE_DIR` 明确指定的源码目录。
|
|
446
447
|
3. PATH 中用户已经安装的 `opencode` / `openclaw`。
|
|
447
|
-
4.
|
|
448
|
+
4. OpenClaw 的本机 Bundle(显式指定 `OPENCLAW_BUNDLE_BIN` 时优先于 PATH)。
|
|
449
|
+
5. 未安装且配置百炼 Key 和后台模型时,CLI 可通过 `npx` 使用最新 npm 包;桌面版需点击安装。
|
|
448
450
|
|
|
449
451
|
源码目录只在用户明确配置后使用,不再推测相邻项目目录。需要强制选择某种启动
|
|
450
452
|
方式时可配置:
|
|
@@ -462,8 +464,8 @@ OPENCODE_PACKAGE=opencode-ai@1.18.5
|
|
|
462
464
|
OPENCLAW_PACKAGE=openclaw@2026.6.33
|
|
463
465
|
```
|
|
464
466
|
|
|
465
|
-
OpenCode ACP 接入当前要求 OpenCode `1.18.0`
|
|
466
|
-
|
|
467
|
+
OpenCode ACP 接入当前要求 OpenCode `1.18.0` 或更高版本。发现更旧版本时会提示
|
|
468
|
+
用户升级,不会自动替换已有安装或悄悄切换到另一份下载的运行时。
|
|
467
469
|
最低版本可由 `OPENCODE_MIN_VERSION` 覆盖,用于验证其他兼容版本。
|
|
468
470
|
|
|
469
471
|
qwen-audio-agent 启动的 OpenCode 默认继承用户原有的全局配置(通常是
|
|
@@ -42,14 +42,17 @@ qwenaudio install muse
|
|
|
42
42
|
|
|
43
43
|
Before installation, a detection step runs to **only fill in missing components**: it installs the backend core and, where required, its adapter. Existing components are not reinstalled. Installation does not mean the backend is configured: complete any login and configuration required by the selected backend. In the desktop settings page's "Backend Agent" list, an "Install" button appears at the end of rows for uninstalled backends that support one-click install, using the same installation logic as the CLI.
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
`
|
|
45
|
+
Existing local Agents and their configuration take priority. Installation only
|
|
46
|
+
adds missing hosts or adapters, using the official `latest` tag for npm packages.
|
|
47
|
+
It does not upgrade or downgrade existing installations. When only the ACP adapter
|
|
48
|
+
is missing, the desktop button reads “Install adapter”. Minimum compatibility
|
|
49
|
+
checks remain in place; incompatible installations require a user-managed upgrade.
|
|
50
|
+
|
|
51
|
+
DeepSeek uses the official CLI's `dsh --profile acp` entry point (0.1.5 series or
|
|
52
|
+
newer), without a separate ACP demo. Run `dsh web` to configure credentials.
|
|
53
|
+
Without a backend model override, the ACP profile keeps its own model settings;
|
|
54
|
+
explicit overrides use the standard ACP interface. Gateway-managed independent
|
|
55
|
+
task delegation and native Session history restoration are not provided yet.
|
|
53
56
|
|
|
54
57
|
View currently available backend agents:
|
|
55
58
|
|
|
@@ -46,11 +46,14 @@ qwenaudio install muse
|
|
|
46
46
|
的“后台 Agent”列表中,未安装且支持一键安装的后台行尾会显示“安装”按钮,与 CLI
|
|
47
47
|
使用同一份安装逻辑。
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
`
|
|
49
|
+
优先复用本机已有的 Agent 与配置。安装操作只补齐缺失的本体或适配器,npm 包默认
|
|
50
|
+
使用官方 `latest`,不会自动升级或降级已有安装。仅缺 ACP 适配器时,桌面版显示
|
|
51
|
+
“安装适配器”。最低兼容版本检查仍然保留,不兼容时需用户自行升级。
|
|
52
|
+
|
|
53
|
+
DeepSeek 使用官方 CLI 的 `dsh --profile acp` 入口(需 0.1.5 系列或更新版本),
|
|
54
|
+
不再需要单独安装 ACP demo。运行 `dsh web` 配置凭据;未指定后台模型时沿用 ACP
|
|
55
|
+
profile 的配置,指定时通过标准 ACP 接口设置。当前不提供 Gateway 独立任务委派或
|
|
56
|
+
原生 Session 历史恢复。
|
|
54
57
|
|
|
55
58
|
查看当前可用的后台 Agent:
|
|
56
59
|
|
|
@@ -38,7 +38,7 @@ For ACP backends supporting standard model configuration, when `QWEN_AUDIO_AGENT
|
|
|
38
38
|
|
|
39
39
|
An explicit value uses only standard ACP `configOptions` with `category: model` and `session/set_config_option`. Use a model ID offered by the backend. Unsupported overrides, failed settings, or unconfirmed results fail explicitly rather than silently falling back.
|
|
40
40
|
|
|
41
|
-
DeepSeek
|
|
41
|
+
DeepSeek also uses standard ACP model configuration; an empty setting preserves its ACP profile configuration. See [DeepSeek](../backends/configuration.md#deepseek).
|
|
42
42
|
|
|
43
43
|
Overrides apply to coordinator, new, and restored project Sessions. Non-ACP adapters implement their own declared capability; Muse Code uses MSP `modelId`, not ACP.
|
|
44
44
|
|
|
@@ -38,7 +38,7 @@ qwenaudio install qwen
|
|
|
38
38
|
|
|
39
39
|
显式填写时,ACP 后台只通过标准 `configOptions`(`category: model`)与 `session/set_config_option` 覆盖。模型 ID 必须来自后台提供的选项;不支持、设置失败或无法确认生效时会明确报错,不静默回退。
|
|
40
40
|
|
|
41
|
-
DeepSeek
|
|
41
|
+
DeepSeek 同样通过标准 ACP 接口设置模型,留空时保留自身 ACP profile 配置,见 [DeepSeek](../backends/configuration.zh.md#deepseek)。
|
|
42
42
|
|
|
43
43
|
覆盖应用于协调、新建和恢复的项目 Session。非 ACP 适配器按自己的公开能力实现;例如 Muse Code 使用 MSP `modelId`,不是 ACP。
|
|
44
44
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qwen-audio-agent",
|
|
3
3
|
"desktopName": "qwen-audio-agent.desktop",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.1",
|
|
5
5
|
"description": "A realtime voice runtime that keeps AI agents talking, working, and present.",
|
|
6
6
|
"author": "qwen-audio-agent contributors",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -81,7 +81,6 @@
|
|
|
81
81
|
"cli/package.json",
|
|
82
82
|
"config/frontend-agent/",
|
|
83
83
|
"config/backends/openclaw/openclaw.json5",
|
|
84
|
-
"config/backends/deepseek-harness/cordis.yml",
|
|
85
84
|
"examples/ai-passport/",
|
|
86
85
|
"examples/webrtc/",
|
|
87
86
|
"docs/architecture/overview.md",
|
package/scripts/release-check
CHANGED
|
@@ -76,26 +76,18 @@ if (manifest.main !== undefined) {
|
|
|
76
76
|
if (readFileSync('.nvmrc', 'utf8').trim() !== '22.22.2') {
|
|
77
77
|
throw new Error('.nvmrc does not match the minimum supported Node release')
|
|
78
78
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
'
|
|
87
|
-
)
|
|
88
|
-
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
'@zed-industries/claude-code-acp@0.16.2',
|
|
92
|
-
)) {
|
|
93
|
-
throw new Error('Claude Code ACP fallback package is not pinned')
|
|
94
|
-
}
|
|
95
|
-
if (!readFileSync('scripts/runtime/pi-acp.mjs', 'utf8').includes(
|
|
96
|
-
'pi-acp@0.0.33',
|
|
97
|
-
)) {
|
|
98
|
-
throw new Error('Pi ACP fallback package is not pinned')
|
|
79
|
+
// Backend software is user-owned, not a bundled release dependency. Missing
|
|
80
|
+
// components use official latest; the framework/build dependency lock stays fixed.
|
|
81
|
+
for (const [launcher, packageName] of [
|
|
82
|
+
['opencode', 'opencode-ai'],
|
|
83
|
+
['openclaw', 'openclaw'],
|
|
84
|
+
['codex-acp', '@agentclientprotocol/codex-acp'],
|
|
85
|
+
['claude-code-acp', '@zed-industries/claude-code-acp'],
|
|
86
|
+
['pi-acp', 'pi-acp'],
|
|
87
|
+
]) {
|
|
88
|
+
if (!readFileSync(`scripts/runtime/${launcher}.mjs`, 'utf8').includes(`${packageName}@latest`)) {
|
|
89
|
+
throw new Error(`${launcher} must default to the official latest backend package`)
|
|
90
|
+
}
|
|
99
91
|
}
|
|
100
92
|
if (
|
|
101
93
|
manifest.devDependencies?.['electron-builder'] !== '26.16.0'
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { spawnAndProxy, commandAvailable, findExecutable } from './launcher.mjs'
|
|
4
4
|
|
|
5
5
|
const RUNTIME = process.env.CLAUDE_CODE_ACP_RUNTIME || 'auto'
|
|
6
|
-
const PKG = process.env.CLAUDE_CODE_ACP_PACKAGE || '@zed-industries/claude-code-acp@
|
|
6
|
+
const PKG = process.env.CLAUDE_CODE_ACP_PACKAGE || '@zed-industries/claude-code-acp@latest'
|
|
7
7
|
const DESKTOP_INSTALLED_ONLY = process.env.QWEN_AUDIO_AGENT_DESKTOP_INSTALLED_ONLY
|
|
8
8
|
const ARGS = process.argv.slice(2)
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { spawnAndProxy, commandAvailable, findExecutable } from './launcher.mjs'
|
|
4
4
|
|
|
5
5
|
const RUNTIME = process.env.CODEX_ACP_RUNTIME || 'auto'
|
|
6
|
-
const PKG = process.env.CODEX_ACP_PACKAGE || '@agentclientprotocol/codex-acp@
|
|
6
|
+
const PKG = process.env.CODEX_ACP_PACKAGE || '@agentclientprotocol/codex-acp@latest'
|
|
7
7
|
const DESKTOP_INSTALLED_ONLY = process.env.QWEN_AUDIO_AGENT_DESKTOP_INSTALLED_ONLY
|
|
8
8
|
const ARGS = process.argv.slice(2)
|
|
9
9
|
|
|
@@ -117,7 +117,7 @@ process.env.OPENCLAW_GATEWAY_TOKEN_FILE = tokenFile
|
|
|
117
117
|
// ── runtime routing ──────────────────────────────────────────────────────────
|
|
118
118
|
|
|
119
119
|
const RUNTIME = process.env.OPENCLAW_RUNTIME || 'auto'
|
|
120
|
-
const PKG = process.env.OPENCLAW_PACKAGE || 'openclaw@
|
|
120
|
+
const PKG = process.env.OPENCLAW_PACKAGE || 'openclaw@latest'
|
|
121
121
|
const BUNDLE_BIN = process.env.OPENCLAW_BUNDLE_BIN
|
|
122
122
|
|| join(process.env.HOME || process.env.USERPROFILE || '.', '.openclaw-bundle', 'wrapper', 'openclaw')
|
|
123
123
|
|
|
@@ -180,8 +180,9 @@ switch (RUNTIME) {
|
|
|
180
180
|
if (RUNTIME === 'auto') {
|
|
181
181
|
if (process.env.OPENCLAW_BIN) await runBinary()
|
|
182
182
|
else if (process.env.OPENCLAW_SOURCE_DIR) await runSource()
|
|
183
|
-
else if (existsSync(BUNDLE_BIN)) await runBundle()
|
|
183
|
+
else if (process.env.OPENCLAW_BUNDLE_BIN && existsSync(BUNDLE_BIN)) await runBundle()
|
|
184
184
|
else if (commandAvailable('openclaw')) await runInstalled()
|
|
185
|
+
else if (existsSync(BUNDLE_BIN)) await runBundle()
|
|
185
186
|
else await runManaged()
|
|
186
187
|
}
|
|
187
188
|
|
|
@@ -14,7 +14,7 @@ const EXTRA = process.argv.slice(3)
|
|
|
14
14
|
// ── defaults ────────────────────────────────────────────────────────────────
|
|
15
15
|
const PORT = process.env.OPENCODE_PORT || '4096'
|
|
16
16
|
const RUNTIME = process.env.OPENCODE_RUNTIME || 'auto'
|
|
17
|
-
const PKG = process.env.OPENCODE_PACKAGE || 'opencode-ai@
|
|
17
|
+
const PKG = process.env.OPENCODE_PACKAGE || 'opencode-ai@latest'
|
|
18
18
|
const MIN_VERSION = process.env.OPENCODE_MIN_VERSION || '1.18.0'
|
|
19
19
|
const COMMAND = MODE === 'acp' ? 'acp' : MODE === 'gateway' ? 'gateway' : 'serve'
|
|
20
20
|
const BACKEND_MODEL = process.env.QWEN_AUDIO_AGENT_BACKEND_MODEL || ''
|
|
@@ -117,15 +117,7 @@ if (RUNTIME === 'auto') {
|
|
|
117
117
|
if (process.env.OPENCODE_BIN) {
|
|
118
118
|
await runBinary()
|
|
119
119
|
} else if (commandAvailable('opencode')) {
|
|
120
|
-
|
|
121
|
-
if (versionGte(ver, MIN_VERSION)) {
|
|
122
|
-
await runInstalled()
|
|
123
|
-
} else if (DESKTOP_INSTALLED_ONLY === '1') {
|
|
124
|
-
fatal(`Installed OpenCode ${ver} is older than the supported minimum ${MIN_VERSION}.`)
|
|
125
|
-
} else {
|
|
126
|
-
console.error(`Installed OpenCode ${ver} is older than the supported minimum; using ${PKG}.`)
|
|
127
|
-
await runManagedPackage()
|
|
128
|
-
}
|
|
120
|
+
await runInstalled()
|
|
129
121
|
} else {
|
|
130
122
|
await runManagedPackage()
|
|
131
123
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { spawnAndProxy, commandAvailable, findExecutable } from './launcher.mjs'
|
|
4
4
|
|
|
5
5
|
const RUNTIME = process.env.PI_ACP_RUNTIME || 'auto'
|
|
6
|
-
const PKG = process.env.PI_ACP_PACKAGE || 'pi-acp@
|
|
6
|
+
const PKG = process.env.PI_ACP_PACKAGE || 'pi-acp@latest'
|
|
7
7
|
const DESKTOP_INSTALLED_ONLY = process.env.QWEN_AUDIO_AGENT_DESKTOP_INSTALLED_ONLY
|
|
8
8
|
const ARGS = process.argv.slice(2)
|
|
9
9
|
|
|
@@ -163,7 +163,6 @@ if (isMain) {
|
|
|
163
163
|
'shared/gateway/webrtc.mjs',
|
|
164
164
|
'shared/gateway/webrtc-browser.mjs',
|
|
165
165
|
'shared/gateway/webrtc-message.mjs',
|
|
166
|
-
'config/backends/deepseek-harness/cordis.yml',
|
|
167
166
|
'config/backends/openclaw/openclaw.json5',
|
|
168
167
|
'CONTRIBUTING.md',
|
|
169
168
|
'docs/architecture/deep-dive.md',
|
|
@@ -176,7 +175,6 @@ if (isMain) {
|
|
|
176
175
|
'scripts/check-desktop-release-env.mjs',
|
|
177
176
|
'scripts/runtime/claude-code-acp.mjs',
|
|
178
177
|
'scripts/runtime/codex-acp.mjs',
|
|
179
|
-
'scripts/runtime/deepseek-harness-acp.mjs',
|
|
180
178
|
'scripts/runtime/launcher.mjs',
|
|
181
179
|
'scripts/runtime/openclaw-gateway.mjs',
|
|
182
180
|
'scripts/runtime/openclaw.mjs',
|
package/server/package.json
CHANGED
|
@@ -426,7 +426,10 @@ export class AcpBackendAdapter {
|
|
|
426
426
|
if (this.builtinMcp.length) this.builtinMcpLifecycle.markUsed()
|
|
427
427
|
const key = coordinatorKey(ownerId, this.protocol)
|
|
428
428
|
if (this.coordinatorSessions.has(key)) {
|
|
429
|
-
|
|
429
|
+
const session = this.coordinatorSessions.get(key)
|
|
430
|
+
if (session.connectionGeneration === this.client.connectionGeneration) return session
|
|
431
|
+
// A fresh ACP process must restore the Session and reconnect its MCPs.
|
|
432
|
+
this.coordinatorSessions.delete(key)
|
|
430
433
|
}
|
|
431
434
|
if (this.coordinatorSessionPromises.has(key)) {
|
|
432
435
|
return this.coordinatorSessionPromises.get(key)
|
|
@@ -988,17 +991,9 @@ export class AcpBackendAdapter {
|
|
|
988
991
|
session.permissionScopeId = permissionScopeId
|
|
989
992
|
this.activeCoordinatorTurns.add(session.sessionId)
|
|
990
993
|
try {
|
|
991
|
-
//
|
|
992
|
-
//
|
|
993
|
-
|
|
994
|
-
await this.client.resumeSession(session.sessionId, {
|
|
995
|
-
cwd: session.cwd || this.directory,
|
|
996
|
-
mcpServers,
|
|
997
|
-
meta: this.coordinatorMeta(ownerId),
|
|
998
|
-
ownerId,
|
|
999
|
-
role: 'coordinator',
|
|
1000
|
-
})
|
|
1001
|
-
}
|
|
994
|
+
// ensureCoordinatorSession supplies MCPs on create/restore. An active
|
|
995
|
+
// Session already owns those connections; resuming it again is not a
|
|
996
|
+
// valid refresh operation for every ACP implementation.
|
|
1002
997
|
const result = await this.promptCoordinator(session, prompt, run, {
|
|
1003
998
|
signal,
|
|
1004
999
|
onUpdate: update => this.onSessionUpdate(run, update),
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { baseEnvironment, processAcpConnection } from './shared.mjs'
|
|
1
|
+
import { baseEnvironment, clean, processAcpConnection } from './shared.mjs'
|
|
3
2
|
|
|
4
3
|
export const deepSeekHarnessBackendDriver = {
|
|
5
4
|
id: 'deepseek',
|
|
@@ -9,54 +8,31 @@ export const deepSeekHarnessBackendDriver = {
|
|
|
9
8
|
permissions: true,
|
|
10
9
|
backendUi: false,
|
|
11
10
|
nativeSessionHistory: false,
|
|
12
|
-
externalMcp:
|
|
11
|
+
externalMcp: true,
|
|
13
12
|
nativeDelegation: false,
|
|
14
|
-
sessionMcp:
|
|
13
|
+
sessionMcp: true,
|
|
15
14
|
coordinatorMcpInstructions: false,
|
|
16
15
|
},
|
|
17
16
|
|
|
18
|
-
createProfile({
|
|
19
|
-
root,
|
|
20
|
-
directory,
|
|
21
|
-
cliPath,
|
|
22
|
-
model,
|
|
23
|
-
permissionMode,
|
|
24
|
-
sessionRoot,
|
|
25
|
-
}) {
|
|
17
|
+
createProfile({ directory, cliPath }) {
|
|
26
18
|
return {
|
|
27
19
|
label: this.label,
|
|
28
20
|
acpConnection: processAcpConnection({
|
|
29
|
-
command:
|
|
30
|
-
args: [
|
|
21
|
+
command: clean(cliPath) || 'dsh',
|
|
22
|
+
args: ['--profile', 'acp'],
|
|
31
23
|
cwd: directory,
|
|
32
|
-
env:
|
|
33
|
-
...baseEnvironment('deepseek'),
|
|
34
|
-
ELECTRON_RUN_AS_NODE: '1',
|
|
35
|
-
DEEPSEEK_HARNESS_CONFIG: resolve(
|
|
36
|
-
root,
|
|
37
|
-
'config/backends/deepseek-harness/cordis.yml',
|
|
38
|
-
),
|
|
39
|
-
DEEPSEEK_HARNESS_SESSION_ROOT: sessionRoot,
|
|
40
|
-
DEEPSEEK_HARNESS_ACP_BIN: cliPath,
|
|
41
|
-
DSH_MODEL: model || 'deepseek-v4-pro',
|
|
42
|
-
DSH_PERMISSION_MODE: permissionMode === 'full'
|
|
43
|
-
? 'danger-full-access'
|
|
44
|
-
: 'workspace-write',
|
|
45
|
-
},
|
|
24
|
+
env: baseEnvironment('deepseek'),
|
|
46
25
|
}),
|
|
47
|
-
//
|
|
48
|
-
externalMcp:
|
|
49
|
-
sessionMcp:
|
|
26
|
+
// The official CLI owns ACP initialization and the user's profile.
|
|
27
|
+
externalMcp: true,
|
|
28
|
+
sessionMcp: true,
|
|
50
29
|
nativeDelegation: false,
|
|
51
30
|
delegation: false,
|
|
52
31
|
nativeSessionHistory: false,
|
|
53
|
-
sessionModelConfiguration: false,
|
|
54
32
|
backendUi: false,
|
|
55
33
|
sessionInstructions: [
|
|
56
|
-
'
|
|
57
|
-
'
|
|
58
|
-
'tools available to you. Do not claim to have opened or resumed a',
|
|
59
|
-
'separate Session.',
|
|
34
|
+
'Complete the requested work in this Session with the available tools.',
|
|
35
|
+
'Do not claim to have opened a separate Gateway-managed task Session.',
|
|
60
36
|
].join(' '),
|
|
61
37
|
}
|
|
62
38
|
},
|
|
@@ -131,6 +131,7 @@ export class AcpProcessClient {
|
|
|
131
131
|
this.connection = null
|
|
132
132
|
this.context = null
|
|
133
133
|
this.initializeResult = null
|
|
134
|
+
this.connectionGeneration = 0
|
|
134
135
|
this.startPromise = null
|
|
135
136
|
this.stderr = ''
|
|
136
137
|
this.activePrompts = new Map()
|
|
@@ -292,6 +293,7 @@ export class AcpProcessClient {
|
|
|
292
293
|
this.context = null
|
|
293
294
|
this.initializeResult = null
|
|
294
295
|
}).catch(() => {})
|
|
296
|
+
this.connectionGeneration += 1
|
|
295
297
|
return this.initializeResult
|
|
296
298
|
} catch (error) {
|
|
297
299
|
// stdout may close a tick before the child 'exit' event. In that race
|
|
@@ -426,7 +428,10 @@ export class AcpProcessClient {
|
|
|
426
428
|
// (onEvent/ownerId/coordinationRunId 等)。若每次 resume 都替换对象,
|
|
427
429
|
// 权限请求会拿到旧闭包快照,被路由到已完成的旧任务上。
|
|
428
430
|
const session = this.sessions.get(id) || {}
|
|
429
|
-
Object.assign(session, details, {
|
|
431
|
+
Object.assign(session, details, {
|
|
432
|
+
sessionId: id,
|
|
433
|
+
connectionGeneration: this.connectionGeneration,
|
|
434
|
+
})
|
|
430
435
|
this.sessions.set(id, session)
|
|
431
436
|
return session
|
|
432
437
|
}
|
|
@@ -129,7 +129,7 @@ export function resolveBackendModels(env = process.env) {
|
|
|
129
129
|
codex: common,
|
|
130
130
|
claude: common,
|
|
131
131
|
deepSeekHarness: String(
|
|
132
|
-
env.DEEPSEEK_HARNESS_MODEL || '',
|
|
132
|
+
common || env.DEEPSEEK_HARNESS_MODEL || '',
|
|
133
133
|
).trim(),
|
|
134
134
|
pi: common,
|
|
135
135
|
muse: common,
|
|
@@ -442,11 +442,7 @@ export const config = {
|
|
|
442
442
|
deepseek: {
|
|
443
443
|
model: backendModels.deepSeekHarness,
|
|
444
444
|
directory: resolveBackendWorkspace('deepseek'),
|
|
445
|
-
cliPath: String(process.env.
|
|
446
|
-
sessionRoot: resolve(
|
|
447
|
-
runtimeEnvironment.stateDirectory,
|
|
448
|
-
'backends/deepseek-harness/sessions',
|
|
449
|
-
),
|
|
445
|
+
cliPath: String(process.env.DEEPSEEK_HARNESS_BIN || '').trim(),
|
|
450
446
|
},
|
|
451
447
|
pi: {
|
|
452
448
|
model: String(backendModels.pi).trim(),
|
|
@@ -17,7 +17,7 @@ const definitions = new Map([
|
|
|
17
17
|
minimumVersion: '1.18.0',
|
|
18
18
|
},
|
|
19
19
|
lifecycle: {
|
|
20
|
-
installation: { steps: [{ kind: 'npm', package: 'opencode-ai@
|
|
20
|
+
installation: { steps: [{ kind: 'npm', package: 'opencode-ai@latest', packageEnv: 'OPENCODE_PACKAGE' }] },
|
|
21
21
|
configuration: { mode: 'bailian-or-backend-owned' },
|
|
22
22
|
},
|
|
23
23
|
onboarding: {
|
|
@@ -48,7 +48,7 @@ const definitions = new Map([
|
|
|
48
48
|
integration: 'bridge',
|
|
49
49
|
},
|
|
50
50
|
lifecycle: {
|
|
51
|
-
installation: { steps: [{ kind: 'npm', package: 'openclaw@
|
|
51
|
+
installation: { steps: [{ kind: 'npm', package: 'openclaw@latest', packageEnv: 'OPENCLAW_PACKAGE' }] },
|
|
52
52
|
configuration: { mode: 'bailian-or-backend-owned' },
|
|
53
53
|
},
|
|
54
54
|
onboarding: {
|
|
@@ -91,7 +91,7 @@ const definitions = new Map([
|
|
|
91
91
|
integration: 'native',
|
|
92
92
|
},
|
|
93
93
|
lifecycle: {
|
|
94
|
-
installation: { steps: [{ kind: 'npm', package: '@qoder-ai/qodercli@
|
|
94
|
+
installation: { steps: [{ kind: 'npm', package: '@qoder-ai/qodercli@latest', packageEnv: 'QODERCLI_PACKAGE' }] },
|
|
95
95
|
configuration: { mode: 'backend-owned' },
|
|
96
96
|
},
|
|
97
97
|
onboarding: {
|
|
@@ -114,7 +114,7 @@ const definitions = new Map([
|
|
|
114
114
|
minimumVersion: '0.21.6',
|
|
115
115
|
},
|
|
116
116
|
lifecycle: {
|
|
117
|
-
installation: { steps: [{ kind: 'npm', package: '@qwen-code/qwen-code@
|
|
117
|
+
installation: { steps: [{ kind: 'npm', package: '@qwen-code/qwen-code@latest', packageEnv: 'QWEN_CODE_PACKAGE' }] },
|
|
118
118
|
configuration: { mode: 'backend-owned' },
|
|
119
119
|
},
|
|
120
120
|
onboarding: {
|
|
@@ -145,7 +145,7 @@ const definitions = new Map([
|
|
|
145
145
|
installation: {
|
|
146
146
|
steps: [{
|
|
147
147
|
kind: 'npm',
|
|
148
|
-
package: '@minimax-ai/code@
|
|
148
|
+
package: '@minimax-ai/code@latest',
|
|
149
149
|
packageEnv: 'MINIMAX_CODE_PACKAGE',
|
|
150
150
|
}],
|
|
151
151
|
},
|
|
@@ -171,7 +171,7 @@ const definitions = new Map([
|
|
|
171
171
|
minimumVersion: '0.31.0',
|
|
172
172
|
},
|
|
173
173
|
lifecycle: {
|
|
174
|
-
installation: { steps: [{ kind: 'npm', package: '@moonshot-ai/kimi-code@
|
|
174
|
+
installation: { steps: [{ kind: 'npm', package: '@moonshot-ai/kimi-code@latest', packageEnv: 'KIMI_CODE_PACKAGE' }] },
|
|
175
175
|
configuration: { mode: 'backend-owned' },
|
|
176
176
|
},
|
|
177
177
|
onboarding: {
|
|
@@ -219,7 +219,7 @@ const definitions = new Map([
|
|
|
219
219
|
integration: 'native',
|
|
220
220
|
},
|
|
221
221
|
lifecycle: {
|
|
222
|
-
installation: { steps: [{ kind: 'npm', package: '@tencent-ai/codebuddy-code@
|
|
222
|
+
installation: { steps: [{ kind: 'npm', package: '@tencent-ai/codebuddy-code@latest', packageEnv: 'CODEBUDDY_PACKAGE' }] },
|
|
223
223
|
configuration: { mode: 'backend-owned' },
|
|
224
224
|
},
|
|
225
225
|
onboarding: {
|
|
@@ -246,8 +246,8 @@ const definitions = new Map([
|
|
|
246
246
|
lifecycle: {
|
|
247
247
|
installation: {
|
|
248
248
|
steps: [
|
|
249
|
-
{ kind: 'npm', package: '@openai/codex@
|
|
250
|
-
{ kind: 'npm', label: 'ACP 适配器', component: 'adapter', package: '@agentclientprotocol/codex-acp@
|
|
249
|
+
{ kind: 'npm', package: '@openai/codex@latest', packageEnv: 'CODEX_PACKAGE' },
|
|
250
|
+
{ kind: 'npm', label: 'ACP 适配器', component: 'adapter', package: '@agentclientprotocol/codex-acp@latest', packageEnv: 'CODEX_ACP_PACKAGE' },
|
|
251
251
|
],
|
|
252
252
|
},
|
|
253
253
|
configuration: { mode: 'backend-owned' },
|
|
@@ -279,8 +279,8 @@ const definitions = new Map([
|
|
|
279
279
|
lifecycle: {
|
|
280
280
|
installation: {
|
|
281
281
|
steps: [
|
|
282
|
-
{ kind: 'npm', package: '@anthropic-ai/claude-code@
|
|
283
|
-
{ kind: 'npm', label: 'ACP 适配器', component: 'adapter', package: '@zed-industries/claude-code-acp@
|
|
282
|
+
{ kind: 'npm', package: '@anthropic-ai/claude-code@latest', packageEnv: 'CLAUDE_CODE_PACKAGE' },
|
|
283
|
+
{ kind: 'npm', label: 'ACP 适配器', component: 'adapter', package: '@zed-industries/claude-code-acp@latest', packageEnv: 'CLAUDE_CODE_ACP_PACKAGE' },
|
|
284
284
|
],
|
|
285
285
|
},
|
|
286
286
|
configuration: { mode: 'backend-owned' },
|
|
@@ -306,44 +306,20 @@ const definitions = new Map([
|
|
|
306
306
|
command: 'dsh',
|
|
307
307
|
executableEnvironment: 'DEEPSEEK_HARNESS_BIN',
|
|
308
308
|
integration: 'native',
|
|
309
|
-
|
|
310
|
-
adapterEnvironment: 'DEEPSEEK_HARNESS_ACP_BIN',
|
|
311
|
-
adapterRuntimeEnvironment: 'DEEPSEEK_HARNESS_ACP_RUNTIME',
|
|
312
|
-
managedAdapterFallback: false,
|
|
313
|
-
inspectAdapterIndependently: true,
|
|
309
|
+
minimumVersion: '0.1.5',
|
|
314
310
|
},
|
|
315
311
|
lifecycle: {
|
|
316
312
|
installation: {
|
|
317
|
-
|
|
318
|
-
// Keep the ACP executable package last. If an earlier Developer
|
|
319
|
-
// Preview component fails, setup remains visibly incomplete and a
|
|
320
|
-
// retry fills the whole composition instead of skipping it.
|
|
313
|
+
// The current CLI includes the native ACP profile and its dependencies.
|
|
321
314
|
steps: [
|
|
322
315
|
{
|
|
323
316
|
kind: 'npm',
|
|
324
317
|
label: 'DeepSeek CLI',
|
|
325
318
|
component: 'backend',
|
|
326
|
-
package: '@deepseek-ai/dsh@
|
|
319
|
+
package: '@deepseek-ai/dsh@latest',
|
|
320
|
+
packageEnv: 'DEEPSEEK_HARNESS_PACKAGE',
|
|
327
321
|
registry: 'https://registry.npmjs.org/',
|
|
328
322
|
},
|
|
329
|
-
...[
|
|
330
|
-
'@deepseek-ai/dsh-llm-deepseek@0.1.0-rc.6',
|
|
331
|
-
'@deepseek-ai/dsh-sandbox-local@0.1.0-rc.6',
|
|
332
|
-
'@deepseek-ai/dsh-subprocess-local@0.1.0-rc.6',
|
|
333
|
-
'@deepseek-ai/dsh-bash-sandbox@0.1.0-rc.6',
|
|
334
|
-
'@deepseek-ai/dsh-token-meter@0.1.0-rc.6',
|
|
335
|
-
'@deepseek-ai/dsh-compaction-basic@0.1.0-rc.6',
|
|
336
|
-
'@deepseek-ai/dsh-fs-sandbox@0.1.0-rc.6',
|
|
337
|
-
'@deepseek-ai/dsh-fs-observation-policy@0.1.0-rc.6',
|
|
338
|
-
'@deepseek-ai/dsh-tool-fs@0.1.0-rc.6',
|
|
339
|
-
'@deepseek-ai/dsh-acp-demo@0.1.0-rc.6',
|
|
340
|
-
].map((packageName, index, packages) => ({
|
|
341
|
-
kind: 'npm',
|
|
342
|
-
label: index === packages.length - 1 ? 'ACP Runtime' : '运行组件',
|
|
343
|
-
component: 'adapter',
|
|
344
|
-
package: packageName,
|
|
345
|
-
registry: 'https://registry.npmjs.org/',
|
|
346
|
-
})),
|
|
347
323
|
],
|
|
348
324
|
},
|
|
349
325
|
configuration: { mode: 'backend-owned' },
|
|
@@ -376,8 +352,8 @@ const definitions = new Map([
|
|
|
376
352
|
lifecycle: {
|
|
377
353
|
installation: {
|
|
378
354
|
steps: [
|
|
379
|
-
{ kind: 'npm', package: '@earendil-works/pi-coding-agent@
|
|
380
|
-
{ kind: 'npm', label: 'ACP 适配器', component: 'adapter', package: 'pi-acp@
|
|
355
|
+
{ kind: 'npm', package: '@earendil-works/pi-coding-agent@latest', packageEnv: 'PI_PACKAGE' },
|
|
356
|
+
{ kind: 'npm', label: 'ACP 适配器', component: 'adapter', package: 'pi-acp@latest', packageEnv: 'PI_ACP_PACKAGE' },
|
|
381
357
|
],
|
|
382
358
|
},
|
|
383
359
|
configuration: { mode: 'backend-owned' },
|
|
@@ -415,8 +391,7 @@ const definitions = new Map([
|
|
|
415
391
|
command: 'muse',
|
|
416
392
|
executableEnvironment: 'MUSE_CODE_BIN',
|
|
417
393
|
integration: 'msp',
|
|
418
|
-
runtimePackage: { name: '@muse-code/sdk'
|
|
419
|
-
inspectAdapterIndependently: true,
|
|
394
|
+
runtimePackage: { name: '@muse-code/sdk' },
|
|
420
395
|
},
|
|
421
396
|
lifecycle: {
|
|
422
397
|
installation: {
|
|
@@ -429,7 +404,7 @@ const definitions = new Map([
|
|
|
429
404
|
label: 'MSP SDK',
|
|
430
405
|
component: 'adapter',
|
|
431
406
|
scope: 'backend',
|
|
432
|
-
package: '@muse-code/sdk@
|
|
407
|
+
package: '@muse-code/sdk@latest',
|
|
433
408
|
}],
|
|
434
409
|
},
|
|
435
410
|
configuration: { mode: 'backend-owned' },
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// CLI(qwenaudio install)与桌面版(设置页"安装"按钮)共用同一份逻辑;
|
|
4
4
|
// spawn / 确认 / 进度回调全部注入,保证纯数据可测。
|
|
5
5
|
//
|
|
6
|
-
//
|
|
6
|
+
// 版本策略:缺失组件默认安装官方 latest;已有组件不重装或降级。
|
|
7
7
|
// 可通过各 packageEnv 环境变量覆盖。npm 上的 kimi-code / codebuddy /
|
|
8
8
|
// hermes-agent 等同名包均为第三方或占位包,严禁写入规格。
|
|
9
9
|
|
|
@@ -129,6 +129,7 @@ async function observedAuthentication(item, id, {
|
|
|
129
129
|
export function installSupport(id, {
|
|
130
130
|
env = process.env,
|
|
131
131
|
platform = process.platform,
|
|
132
|
+
item,
|
|
132
133
|
} = {}) {
|
|
133
134
|
const definition = backendDefinition(id)
|
|
134
135
|
if (!definition) {
|
|
@@ -147,15 +148,17 @@ export function installSupport(id, {
|
|
|
147
148
|
reason: spec.manualHints?.[platform] || '当前平台暂不支持一键安装',
|
|
148
149
|
}
|
|
149
150
|
}
|
|
151
|
+
const pending = steps.filter(step => !stepComponentInstalled(step, item))
|
|
150
152
|
return {
|
|
151
153
|
supported: true,
|
|
152
|
-
requiresConfirmation:
|
|
154
|
+
requiresConfirmation: pending.some(step => step.kind === 'script'),
|
|
153
155
|
authentication: backendAuthenticationSupport(definition.id, {
|
|
154
156
|
env,
|
|
155
157
|
platform,
|
|
156
158
|
}),
|
|
157
|
-
steps:
|
|
159
|
+
steps: pending.map((step, index) => ({
|
|
158
160
|
kind: step.kind,
|
|
161
|
+
component: step.component || 'backend',
|
|
159
162
|
title: stepTitle(step, index),
|
|
160
163
|
display: stepDisplay(step, env, definition.id),
|
|
161
164
|
})),
|
|
@@ -177,7 +180,7 @@ export function withBackendLifecycle(report, {
|
|
|
177
180
|
item.authentication,
|
|
178
181
|
{ env, platform },
|
|
179
182
|
)
|
|
180
|
-
const install = installSupport(item.id, { env, platform })
|
|
183
|
+
const install = installSupport(item.id, { env, platform, item })
|
|
181
184
|
const configuration = {
|
|
182
185
|
...backendConfigurationSupport(item.id, { env, platform }),
|
|
183
186
|
required: authentication.required === true,
|
|
@@ -341,20 +344,13 @@ function reportItem(report, id) {
|
|
|
341
344
|
|| null
|
|
342
345
|
}
|
|
343
346
|
|
|
344
|
-
//
|
|
345
|
-
//
|
|
346
|
-
function
|
|
347
|
+
// 已安装与已就绪分开:兼容性或配置问题不应触发覆盖用户安装。
|
|
348
|
+
// 报告缺少组件级细节时保守地保留安装步骤。
|
|
349
|
+
function stepComponentInstalled(step, item) {
|
|
347
350
|
if (!item || typeof item !== 'object') return false
|
|
348
|
-
if (Array.isArray(item.packages) && step.kind === 'npm') {
|
|
349
|
-
const packageSpec = stepPackage(step, env)
|
|
350
|
-
const separator = packageSpec.lastIndexOf('@')
|
|
351
|
-
const name = separator > 0 ? packageSpec.slice(0, separator) : packageSpec
|
|
352
|
-
const observed = item.packages.find(entry => entry.name === name)
|
|
353
|
-
if (observed) return observed.ready === true
|
|
354
|
-
}
|
|
355
351
|
const component = step.component === 'adapter' ? item.adapter : item.backend
|
|
356
352
|
if (!component || typeof component !== 'object') return false
|
|
357
|
-
return component.ready === true
|
|
353
|
+
return (component.installed ?? component.ready) === true
|
|
358
354
|
}
|
|
359
355
|
|
|
360
356
|
// 通过 PowerShell 的 Get-Command 定位 npm.cmd。
|
|
@@ -480,7 +476,7 @@ export async function installBackend(id, {
|
|
|
480
476
|
const before = await inspect({ env: resolvedEnv, platform, backend: definition.id })
|
|
481
477
|
const beforeItem = reportItem(before, definition.id)
|
|
482
478
|
const pending = steps.filter(step => (
|
|
483
|
-
!
|
|
479
|
+
!stepComponentInstalled(step, beforeItem)
|
|
484
480
|
))
|
|
485
481
|
if (!pending.length && beforeItem?.ready === true) {
|
|
486
482
|
const observed = await observedAuthentication(beforeItem, definition.id, {
|
|
@@ -20,8 +20,8 @@ export function inspectBackendRuntimePackage(id, {
|
|
|
20
20
|
const packageDirectory = resolve(directory, 'node_modules', spec.name)
|
|
21
21
|
try {
|
|
22
22
|
const manifest = JSON.parse(readFileSync(resolve(packageDirectory, 'package.json'), 'utf8'))
|
|
23
|
-
if (manifest.name !== spec.name || manifest.version
|
|
24
|
-
throw new Error('
|
|
23
|
+
if (manifest.name !== spec.name || !manifest.version) {
|
|
24
|
+
throw new Error('Invalid runtime package')
|
|
25
25
|
}
|
|
26
26
|
const require = createRequire(resolve(directory, 'loader.cjs'))
|
|
27
27
|
return { ready: true, source: 'installed', path: require.resolve(packageDirectory) }
|
|
@@ -29,7 +29,7 @@ export function inspectBackendRuntimePackage(id, {
|
|
|
29
29
|
return {
|
|
30
30
|
ready: false,
|
|
31
31
|
source: 'missing',
|
|
32
|
-
issue:
|
|
32
|
+
issue: `缺少或不可用的 ${spec.name};请运行 qwenaudio install ${id}`,
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
}
|
package/shared/backend/setup.mjs
CHANGED
|
@@ -165,41 +165,6 @@ function defaultReadVersionAsync(command, {
|
|
|
165
165
|
})
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
function packageIdentity(packageSpec) {
|
|
169
|
-
const value = clean(packageSpec)
|
|
170
|
-
const separator = value.lastIndexOf('@')
|
|
171
|
-
if (separator <= 0) return { name: value, version: '' }
|
|
172
|
-
return {
|
|
173
|
-
name: value.slice(0, separator),
|
|
174
|
-
version: value.slice(separator + 1),
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
function defaultReadGlobalPackages(command, { env, platform }) {
|
|
179
|
-
if (!command) return { known: false, packages: {} }
|
|
180
|
-
const result = spawnSync(
|
|
181
|
-
windowsShellCommand(command, platform),
|
|
182
|
-
['list', '-g', '--depth=0', '--json'],
|
|
183
|
-
{
|
|
184
|
-
env,
|
|
185
|
-
encoding: 'utf8',
|
|
186
|
-
timeout: 5_000,
|
|
187
|
-
shell: platform === 'win32',
|
|
188
|
-
windowsHide: true,
|
|
189
|
-
},
|
|
190
|
-
)
|
|
191
|
-
try {
|
|
192
|
-
const parsed = JSON.parse(result.stdout || '{}')
|
|
193
|
-
return {
|
|
194
|
-
known: Boolean(parsed.dependencies),
|
|
195
|
-
packages: Object.fromEntries(Object.entries(parsed.dependencies || {})
|
|
196
|
-
.map(([name, details]) => [name, clean(details?.version)])),
|
|
197
|
-
}
|
|
198
|
-
} catch {
|
|
199
|
-
return { known: false, packages: {} }
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
|
|
203
168
|
function explicitRuntime(id, env, find) {
|
|
204
169
|
if (id === 'opencode') {
|
|
205
170
|
const runtime = clean(env.OPENCODE_RUNTIME || 'auto').toLowerCase()
|
|
@@ -270,6 +235,10 @@ function explicitRuntime(id, env, find) {
|
|
|
270
235
|
? { ready: true, source: 'source', path: directory }
|
|
271
236
|
: { ready: false, issue: 'OpenClaw 源码目录或 corepack 不可用' }
|
|
272
237
|
}
|
|
238
|
+
if (runtime === 'auto' && !clean(env.OPENCLAW_BUNDLE_BIN)) {
|
|
239
|
+
const path = find('openclaw')
|
|
240
|
+
if (path) return { ready: true, source: 'installed', path }
|
|
241
|
+
}
|
|
273
242
|
const bundle = expandHome(
|
|
274
243
|
clean(env.OPENCLAW_BUNDLE_BIN)
|
|
275
244
|
|| `${clean(env.HOME)}/.openclaw-bundle/wrapper/openclaw`,
|
|
@@ -359,7 +328,6 @@ function inspectBackend(id, {
|
|
|
359
328
|
platform,
|
|
360
329
|
find,
|
|
361
330
|
readVersion,
|
|
362
|
-
readGlobalPackages,
|
|
363
331
|
selected,
|
|
364
332
|
}) {
|
|
365
333
|
const definition = backendDefinition(id)
|
|
@@ -428,23 +396,10 @@ function inspectBackend(id, {
|
|
|
428
396
|
const version = readVersion(backend.path)
|
|
429
397
|
backend.version = version
|
|
430
398
|
if (!versionAtLeast(version, spec.minimumVersion)) {
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
source: 'managed',
|
|
436
|
-
path: npx,
|
|
437
|
-
fallbackFromVersion: version,
|
|
438
|
-
}
|
|
439
|
-
} else {
|
|
440
|
-
backend.ready = false
|
|
441
|
-
backend.issue = npx
|
|
442
|
-
? `OpenCode ${version || '版本未知'} 不兼容;自动部署需要 `
|
|
443
|
-
+ 'DASHSCOPE_API_KEY 和 QWEN_AUDIO_AGENT_BACKEND_MODEL'
|
|
444
|
-
: version
|
|
445
|
-
? `OpenCode ${version} 低于最低版本 ${spec.minimumVersion}`
|
|
446
|
-
: '无法确认 OpenCode 版本'
|
|
447
|
-
}
|
|
399
|
+
backend.ready = false
|
|
400
|
+
backend.issue = version
|
|
401
|
+
? `OpenCode ${version} 低于最低版本 ${spec.minimumVersion};请自行升级`
|
|
402
|
+
: '无法确认 OpenCode 版本'
|
|
448
403
|
}
|
|
449
404
|
}
|
|
450
405
|
|
|
@@ -461,51 +416,20 @@ function inspectBackend(id, {
|
|
|
461
416
|
|
|
462
417
|
const adapter = spec.runtimePackage
|
|
463
418
|
? inspectBackendRuntimePackage(id, { env })
|
|
464
|
-
:
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
&& (backend.ready || adapter.ready)
|
|
472
|
-
) {
|
|
473
|
-
const npm = find(platform === 'win32' ? 'npm.cmd' : 'npm') || find('npm')
|
|
474
|
-
const installed = readGlobalPackages(npm)
|
|
475
|
-
packages = definition.lifecycle.installation.steps
|
|
476
|
-
.filter(step => step.kind === 'npm')
|
|
477
|
-
.map(step => {
|
|
478
|
-
const expected = packageIdentity(
|
|
479
|
-
clean(env[step.packageEnv]) || step.package,
|
|
480
|
-
)
|
|
481
|
-
const actualVersion = installed.packages[expected.name] || ''
|
|
482
|
-
return {
|
|
483
|
-
name: expected.name,
|
|
484
|
-
expectedVersion: expected.version,
|
|
485
|
-
version: actualVersion,
|
|
486
|
-
ready: !installed.known || (
|
|
487
|
-
Boolean(actualVersion)
|
|
488
|
-
&& (!expected.version || actualVersion === expected.version)
|
|
489
|
-
),
|
|
490
|
-
}
|
|
491
|
-
})
|
|
492
|
-
packageSetReady = packages.every(item => item.ready)
|
|
493
|
-
}
|
|
494
|
-
const packageIssue = packageSetReady
|
|
495
|
-
? ''
|
|
496
|
-
: `缺少或版本不匹配的运行组件:${packages
|
|
497
|
-
.filter(item => !item.ready)
|
|
498
|
-
.map(item => item.name)
|
|
499
|
-
.join('、')}`
|
|
500
|
-
const issues = [backend.issue, adapter.issue, packageIssue].filter(Boolean)
|
|
419
|
+
: inspectAdapter(spec, env, find)
|
|
420
|
+
const issues = [backend.issue, adapter.issue].filter(Boolean)
|
|
421
|
+
// Installation and compatibility are separate: never reinstall a user's
|
|
422
|
+
// executable just because its version probe failed or it is too old.
|
|
423
|
+
backend.installed = Boolean(backend.path)
|
|
424
|
+
&& !['managed', 'package'].includes(backend.source)
|
|
425
|
+
adapter.installed = Boolean(adapter.path) && adapter.source !== 'managed'
|
|
501
426
|
return {
|
|
502
427
|
id,
|
|
503
428
|
label: definition.label,
|
|
504
429
|
selected: id === selected,
|
|
505
|
-
ready: backend.ready && adapter.ready
|
|
430
|
+
ready: backend.ready && adapter.ready,
|
|
506
431
|
backend,
|
|
507
432
|
adapter,
|
|
508
|
-
packages,
|
|
509
433
|
integration: spec.integration,
|
|
510
434
|
configuration: id === 'acp'
|
|
511
435
|
? 'command-managed'
|
|
@@ -522,10 +446,6 @@ export function inspectBackendSetups({
|
|
|
522
446
|
backend = '',
|
|
523
447
|
find = command => findExecutable(command, { env, platform }),
|
|
524
448
|
readVersion = command => defaultReadVersion(command, { env, platform }),
|
|
525
|
-
readGlobalPackages = command => defaultReadGlobalPackages(command, {
|
|
526
|
-
env,
|
|
527
|
-
platform,
|
|
528
|
-
}),
|
|
529
449
|
} = {}) {
|
|
530
450
|
const selected = clean(backend || env.AGENT_PROTOCOL).toLowerCase()
|
|
531
451
|
const ids = backend ? [clean(backend).toLowerCase()] : backendNames()
|
|
@@ -537,7 +457,6 @@ export function inspectBackendSetups({
|
|
|
537
457
|
platform,
|
|
538
458
|
find,
|
|
539
459
|
readVersion,
|
|
540
|
-
readGlobalPackages,
|
|
541
460
|
selected,
|
|
542
461
|
})),
|
|
543
462
|
}
|
|
@@ -549,10 +468,6 @@ export async function inspectBackendSetupsAsync({
|
|
|
549
468
|
backend = '',
|
|
550
469
|
find = command => findExecutable(command, { env, platform }),
|
|
551
470
|
readVersion = command => defaultReadVersionAsync(command, { env, platform }),
|
|
552
|
-
readGlobalPackages = command => defaultReadGlobalPackages(command, {
|
|
553
|
-
env,
|
|
554
|
-
platform,
|
|
555
|
-
}),
|
|
556
471
|
} = {}) {
|
|
557
472
|
const preliminary = inspectBackendSetups({
|
|
558
473
|
env,
|
|
@@ -560,7 +475,6 @@ export async function inspectBackendSetupsAsync({
|
|
|
560
475
|
backend,
|
|
561
476
|
find,
|
|
562
477
|
readVersion: () => '',
|
|
563
|
-
readGlobalPackages: () => ({ known: false, packages: {} }),
|
|
564
478
|
})
|
|
565
479
|
const commands = [...new Set(preliminary.backends
|
|
566
480
|
.filter(item => (
|
|
@@ -576,23 +490,12 @@ export async function inspectBackendSetupsAsync({
|
|
|
576
490
|
command,
|
|
577
491
|
await readVersion(command),
|
|
578
492
|
])))
|
|
579
|
-
const needsPackageInspection = preliminary.backends.some(item => (
|
|
580
|
-
backendDefinition(item.id)?.lifecycle?.installation?.verifyInstalledPackages
|
|
581
|
-
&& (item.backend.ready || item.adapter.ready)
|
|
582
|
-
))
|
|
583
|
-
const npm = needsPackageInspection
|
|
584
|
-
? find(platform === 'win32' ? 'npm.cmd' : 'npm') || find('npm')
|
|
585
|
-
: ''
|
|
586
|
-
const installedPackages = needsPackageInspection
|
|
587
|
-
? readGlobalPackages(npm)
|
|
588
|
-
: { known: false, packages: {} }
|
|
589
493
|
return inspectBackendSetups({
|
|
590
494
|
env,
|
|
591
495
|
platform,
|
|
592
496
|
backend,
|
|
593
497
|
find,
|
|
594
498
|
readVersion: command => versions.get(command) || '',
|
|
595
|
-
readGlobalPackages: () => installedPackages,
|
|
596
499
|
})
|
|
597
500
|
}
|
|
598
501
|
|
package/tui/package.json
CHANGED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
# Minimal automation composition for qwen-audio-agent. DeepSeek Harness is a
|
|
2
|
-
# Developer Preview; keep vendor-specific runtime details inside this adapter.
|
|
3
|
-
- id: llm-deepseek
|
|
4
|
-
name: '@deepseek-ai/dsh-llm-deepseek'
|
|
5
|
-
config:
|
|
6
|
-
thinking: enabled
|
|
7
|
-
reasoningEffort: max
|
|
8
|
-
models:
|
|
9
|
-
- id: deepseek-v4-flash
|
|
10
|
-
- id: deepseek-v4-pro
|
|
11
|
-
|
|
12
|
-
- id: sandbox
|
|
13
|
-
name: '@deepseek-ai/dsh-sandbox-local'
|
|
14
|
-
- id: sandbox-policy
|
|
15
|
-
name: '@deepseek-ai/dsh-sandbox-policy'
|
|
16
|
-
config:
|
|
17
|
-
mode: !!js "process.env.DSH_PERMISSION_MODE ?? 'workspace-write'"
|
|
18
|
-
workspaceRoot: !!js process.cwd()
|
|
19
|
-
- id: subprocess
|
|
20
|
-
name: '@deepseek-ai/dsh-subprocess-local'
|
|
21
|
-
- id: bash
|
|
22
|
-
name: '@deepseek-ai/dsh-bash-sandbox'
|
|
23
|
-
config:
|
|
24
|
-
timeoutMs: 60000
|
|
25
|
-
- id: approval
|
|
26
|
-
name: '@deepseek-ai/dsh-user-approval'
|
|
27
|
-
config:
|
|
28
|
-
policy: !!js "process.env.DSH_PERMISSION_MODE === 'danger-full-access' ? 'never' : 'ask'"
|
|
29
|
-
|
|
30
|
-
- id: acp-agent
|
|
31
|
-
name: '@deepseek-ai/dsh-acp-demo'
|
|
32
|
-
config:
|
|
33
|
-
provider: deepseek-official
|
|
34
|
-
model: !!js "process.env.DSH_MODEL ?? 'deepseek-v4-pro'"
|
|
35
|
-
persistenceRoot: !!js "process.env.DEEPSEEK_HARNESS_SESSION_ROOT ?? './.sessions'"
|
|
36
|
-
workspaceContext:
|
|
37
|
-
maxBytes: 65536
|
|
38
|
-
persona: |
|
|
39
|
-
You are a capable coding and task assistant. Your working directory is {{cwd}}.
|
|
40
|
-
Use the available tools to complete the user's request. Verify changes when practical.
|
|
41
|
-
Keep the final answer concise and factual.
|
|
42
|
-
|
|
43
|
-
- id: token-meter
|
|
44
|
-
name: '@deepseek-ai/dsh-token-meter'
|
|
45
|
-
- id: compaction-basic
|
|
46
|
-
name: '@deepseek-ai/dsh-compaction-basic'
|
|
47
|
-
config:
|
|
48
|
-
thresholdRatio: 0.8
|
|
49
|
-
retainRatio: 0.08
|
|
50
|
-
maxTokens: 8192
|
|
51
|
-
compactionRetries: 1
|
|
52
|
-
- id: fs-sandbox
|
|
53
|
-
name: '@deepseek-ai/dsh-fs-sandbox'
|
|
54
|
-
config:
|
|
55
|
-
cwd: !!js process.cwd()
|
|
56
|
-
- id: fs-observation-policy
|
|
57
|
-
name: '@deepseek-ai/dsh-fs-observation-policy'
|
|
58
|
-
- id: tool-fs
|
|
59
|
-
name: '@deepseek-ai/dsh-tool-fs'
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { readFileSync, statSync } from 'node:fs'
|
|
2
|
-
import { homedir } from 'node:os'
|
|
3
|
-
import { join, resolve } from 'node:path'
|
|
4
|
-
import {
|
|
5
|
-
commandAvailable,
|
|
6
|
-
spawnAndProxy,
|
|
7
|
-
} from './launcher.mjs'
|
|
8
|
-
|
|
9
|
-
const binary = process.env.DEEPSEEK_HARNESS_ACP_BIN || 'dsh-acp-demo'
|
|
10
|
-
const configPath = process.env.DEEPSEEK_HARNESS_CONFIG
|
|
11
|
-
|| resolve(process.cwd(), 'cordis.yml')
|
|
12
|
-
|
|
13
|
-
function yamlScalar(value) {
|
|
14
|
-
const text = String(value || '').trim()
|
|
15
|
-
if (!text) return ''
|
|
16
|
-
if (text.startsWith('"') && text.endsWith('"')) {
|
|
17
|
-
try { return JSON.parse(text) } catch { return '' }
|
|
18
|
-
}
|
|
19
|
-
if (text.startsWith("'") && text.endsWith("'")) {
|
|
20
|
-
return text.slice(1, -1).replaceAll("''", "'")
|
|
21
|
-
}
|
|
22
|
-
return text.replace(/\s+#.*$/, '').trim()
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// dsh web stores provider credentials in Harness's owner-only credential
|
|
26
|
-
// document. The standalone ACP composition does not boot the Web profile's
|
|
27
|
-
// credential plugin, so bridge that official store into this one child only.
|
|
28
|
-
function storedDeepSeekCredential(env = process.env) {
|
|
29
|
-
const dshHome = String(env.DSH_HOME || '').trim() || join(homedir(), '.dsh')
|
|
30
|
-
const path = join(dshHome, '.credentials.yaml')
|
|
31
|
-
try {
|
|
32
|
-
const stat = statSync(path)
|
|
33
|
-
if (process.platform !== 'win32' && (stat.mode & 0o077) !== 0) return ''
|
|
34
|
-
const line = readFileSync(path, 'utf8')
|
|
35
|
-
.split(/\r?\n/)
|
|
36
|
-
.find(value => /^\s*DEEPSEEK_API_KEY\s*:/.test(value))
|
|
37
|
-
return yamlScalar(line?.replace(/^\s*DEEPSEEK_API_KEY\s*:/, ''))
|
|
38
|
-
} catch {
|
|
39
|
-
return ''
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const apiKey = String(process.env.DEEPSEEK_API_KEY || '').trim()
|
|
44
|
-
|| storedDeepSeekCredential()
|
|
45
|
-
if (!apiKey) {
|
|
46
|
-
console.error('DeepSeek is not configured. Run `dsh web` and add your API key.')
|
|
47
|
-
process.exit(1)
|
|
48
|
-
}
|
|
49
|
-
if (!commandAvailable(binary)) {
|
|
50
|
-
console.error(
|
|
51
|
-
'DeepSeek ACP runtime is not installed. Run: '
|
|
52
|
-
+ 'qwenaudio install deepseek',
|
|
53
|
-
)
|
|
54
|
-
process.exit(1)
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
await spawnAndProxy(binary, ['--config', configPath], {
|
|
58
|
-
env: { ...process.env, DEEPSEEK_API_KEY: apiKey },
|
|
59
|
-
})
|