@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.
Files changed (2) hide show
  1. package/README.md +57 -24
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,47 +1,80 @@
1
1
  # @dsh-enhanced/acp
2
2
 
3
- 把 DSH 作为 [ACP](https://agentclientprotocol.com) stdio agent 使用,并保留 DSH 原生会话语义。
3
+ 让支持 [Agent Client Protocol(ACP)](https://agentclientprotocol.com) 的编辑器和客户端直接使用 DeepSeek Harness(DSH)。插件通过 stdio 提供 ACP 服务,并沿用 DSH 的 Agent、模型、工具、权限和会话能力。
4
4
 
5
- ## 在 dsh 中使用
5
+ ## 安装
6
+
7
+ 需要先安装 DSH。然后创建一个独立的 `acp` profile 并安装插件:
6
8
 
7
9
  ```sh
8
- pnpm build
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
- 然后让 ACP 客户端启动:
14
+ 第二条命令用于确认插件已经进入最终配置,不会启动 ACP 会话。
14
15
 
15
- ```sh
16
- dsh --profile acp
16
+ ## 连接 ACP 客户端
17
+
18
+ 在 ACP 客户端中添加一个 stdio agent:
19
+
20
+ ```json
21
+ {
22
+ "command": "dsh",
23
+ "args": ["--profile", "acp"]
24
+ }
17
25
  ```
18
26
 
19
- 发布后把 `./plugins/acp` 换成 `@dsh-enhanced/acp`。使用 DSH 源码 CLI 时,在 DSH 仓库执行 `pnpm --silent dsh --profile acp`;`--silent` 可避免 pnpm 的脚本提示污染 ACP stdout。
27
+ 具体配置入口和字段名由 ACP 客户端决定。DSH 启动后会占用 stdout 传输协议消息,因此不要在启动命令外再包装会向 stdout 输出内容的脚本。
20
28
 
21
- ## 能力
29
+ ## 功能
22
30
 
23
- - ACP 模式直接映射 DSH Agent 预设:`standard`、`code`(PTC)、`minimal`、`cordis`(创造模式)。切换会真实重组该会话的工具、提示词与能力,并记录 `agent-preset/selected`。
24
- - 遵循 DSH 原生约束:Agent 预设只可在首个 turn 开始前切换;会话开始后保持固定,避免历史工具调用与新预设不兼容。Plan 是预设内部的独立原生能力,不作为第五个 ACP Agent 模式伪装。
25
- - 模型与推理等级来自 DSH 实时 provider 目录;目录变化会推送新选择器。
26
- - 切换写入 DSH 原生会话选择引用,同一对话的下一个安全组装步骤立即生效;不会把一次步骤的 prompt 与 request 切到两个模型。
27
- - 输出文本、推理、工具调用/结果、Todo 计划、标题和 token 用量;默认还在 `_meta.dsh.event` 携带未映射的完整 DSH 持久事件。
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
- 可在 profile 的 `cordis.patch.yml` 覆盖初始值:
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
- provider: deepseek-official
36
- model: deepseek-v4-flash
37
- reasoningEffort: high
38
- includeRawEvents: true
46
+ includeRawEvents: false
39
47
  ```
40
48
 
41
- `config` 是整段替换;关闭原始事件时设置 `includeRawEvents: false`。
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
- ACP 占用 stdout,诊断应走 stderr;同一 profile 不要再挂载其他 ACP stdio server。输入仅支持 text 与 resource link,后者作为文本引用进入模型;会话级 MCP server 请通过 DSH 配置,不从 ACP 请求动态注入。当前仅发布四个内置预设为 ACP 模式;自定义预设将在后续扩展。
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
- 权限与数据:插件自身不额外访问网络或凭据,但 ACP 客户端获得该 DSH profile 已组合的 agent 能力;`cordis` 创造模式还可定义并运行进程内 Host 插件代码(裸 ACP 没有 DSH 浏览器页,Client half 不可用)。stdio 可包含提示词、推理、工具参数/结果、标题、用量、workspace 路径及原始会话事件;只连接可信客户端,敏感场景可关闭 `includeRawEvents`。
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.1",
4
- "description": "Native-first Agent Client Protocol bridge for DeepSeek Harness.",
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",