@dsh-enhanced/acp 0.0.1 → 0.0.2
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 +57 -24
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,47 +1,80 @@
|
|
|
1
1
|
# @dsh-enhanced/acp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
让支持 [Agent Client Protocol(ACP)](https://agentclientprotocol.com) 的编辑器和客户端直接使用 DeepSeek Harness(DSH)。插件通过 stdio 提供 ACP 服务,并沿用 DSH 的 Agent、模型、工具、权限和会话能力。
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 安装
|
|
6
|
+
|
|
7
|
+
需要先安装 DSH。然后创建一个独立的 `acp` profile 并安装插件:
|
|
6
8
|
|
|
7
9
|
```sh
|
|
8
|
-
|
|
9
|
-
dsh plugin --profile acp add ./plugins/acp
|
|
10
|
+
dsh plugin --profile acp add @dsh-enhanced/acp
|
|
10
11
|
dsh --profile acp --dump-config
|
|
11
12
|
```
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
第二条命令用于确认插件已经进入最终配置,不会启动 ACP 会话。
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
## 连接 ACP 客户端
|
|
17
|
+
|
|
18
|
+
在 ACP 客户端中添加一个 stdio agent:
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"command": "dsh",
|
|
23
|
+
"args": ["--profile", "acp"]
|
|
24
|
+
}
|
|
17
25
|
```
|
|
18
26
|
|
|
19
|
-
|
|
27
|
+
具体配置入口和字段名由 ACP 客户端决定。DSH 启动后会占用 stdout 传输协议消息,因此不要在启动命令外再包装会向 stdout 输出内容的脚本。
|
|
20
28
|
|
|
21
|
-
##
|
|
29
|
+
## 功能
|
|
22
30
|
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
- 沿用 DSH 的权限请求、取消、工具、沙箱、模型配置与会话日志。
|
|
31
|
+
- 提供 `standard`、`code`、`minimal` 和 `cordis` 四种 DSH Agent 模式。
|
|
32
|
+
- 使用 DSH 当前可用的模型和推理等级,并将它们提供给支持选择器的 ACP 客户端。
|
|
33
|
+
- 向客户端传输回复、推理、工具调用与结果、计划、会话标题和 token 用量。
|
|
34
|
+
- 沿用 DSH 的工具、沙箱、权限确认、取消和会话持久化机制。
|
|
35
|
+
- 默认通过 `_meta.dsh.event` 保留尚未映射为标准 ACP 消息的 DSH 会话事件。
|
|
29
36
|
|
|
30
|
-
|
|
37
|
+
Agent 模式只能在会话第一条消息发送前选择,首轮开始后不能切换。Plan 是 DSH Agent 模式内部的能力,不会显示为单独的 ACP 模式。模型或推理等级的变更从下一次模型请求开始生效,不会修改正在执行的请求。
|
|
38
|
+
|
|
39
|
+
## 配置
|
|
40
|
+
|
|
41
|
+
插件默认使用 DSH profile 的模型设置。需要覆盖初始配置时,编辑 `~/.dsh/profiles/acp/cordis.patch.yml`:
|
|
31
42
|
|
|
32
43
|
```yaml
|
|
33
44
|
- id: dsh-enhanced-acp
|
|
34
45
|
config:
|
|
35
|
-
|
|
36
|
-
model: deepseek-v4-flash
|
|
37
|
-
reasoningEffort: high
|
|
38
|
-
includeRawEvents: true
|
|
46
|
+
includeRawEvents: false
|
|
39
47
|
```
|
|
40
48
|
|
|
41
|
-
|
|
49
|
+
可用配置:
|
|
50
|
+
|
|
51
|
+
- `provider` 和 `model`:指定初始模型,必须同时设置;省略时使用 DSH 默认模型。
|
|
52
|
+
- `reasoningEffort`:指定初始推理等级。
|
|
53
|
+
- `includeRawEvents`:是否在 `_meta.dsh.event` 中发送未映射的 DSH 会话事件,默认为 `true`。
|
|
54
|
+
|
|
55
|
+
Cordis 的 `config` 是整段替换。覆盖配置时,请在同一段中保留所有需要的字段。
|
|
42
56
|
|
|
43
|
-
##
|
|
57
|
+
## 限制
|
|
44
58
|
|
|
45
|
-
|
|
59
|
+
- 每个 profile 只能挂载一个占用 stdio 的 ACP server。
|
|
60
|
+
- 输入支持文本和 resource link;resource link 会作为文本引用传给 DSH。
|
|
61
|
+
- 不支持在单个 ACP 会话中动态注入 MCP server,请通过 DSH profile 配置 MCP。
|
|
62
|
+
- 当前只提供四种内置 DSH Agent 模式,暂不暴露自定义预设。
|
|
63
|
+
- 裸 ACP 环境没有 DSH 浏览器页面,因此 `cordis` 模式只能使用 Host 侧能力,不能使用 Client half。
|
|
64
|
+
|
|
65
|
+
## 权限与数据
|
|
66
|
+
|
|
67
|
+
插件本身不额外读取文件或凭据,不主动访问网络、启动子进程或控制浏览器,也没有面向安装者执行的 install/postinstall 脚本。ACP 会话能够使用哪些资源,取决于 `acp` profile 中启用的 DSH 工具及其沙箱和授权配置;`cordis` 模式还可以定义并运行进程内 Host 插件代码。
|
|
68
|
+
|
|
69
|
+
stdio 消息可能包含提示词、推理、工具参数与结果、会话标题、token 用量、workspace 路径和原始 DSH 会话事件。只连接可信的 ACP 客户端;不希望发送原始事件时,将 `includeRawEvents` 设为 `false`。
|
|
70
|
+
|
|
71
|
+
## 本地开发
|
|
72
|
+
|
|
73
|
+
在本仓库中测试未发布代码时,可以改为安装插件目录:
|
|
74
|
+
|
|
75
|
+
```sh
|
|
76
|
+
pnpm --filter @dsh-enhanced/acp build
|
|
77
|
+
dsh plugin --profile acp add ./plugins/acp
|
|
78
|
+
```
|
|
46
79
|
|
|
47
|
-
|
|
80
|
+
使用 DSH 源码版 CLI 时,请在 DSH 仓库中使用 `pnpm --silent dsh --profile acp`,避免 pnpm 的提示信息污染 ACP stdout。
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dsh-enhanced/acp",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"description": "Use DeepSeek Harness as an Agent Client Protocol (ACP) stdio agent.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./lib/index.js",
|