@harmonyos-arkts/opencode-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 CHANGED
@@ -217,6 +217,10 @@ npm run test:integration # Full pipeline test (requires running OpenCode server
217
217
  | Subagent permissions forwarded | No | Yes |
218
218
  | Traffic logging | No | Yes (JSONL, categorized) |
219
219
  | Message assembly | N/A | Yes (delta → complete) |
220
+ | MCP headers/env passthrough | Yes | Yes |
221
+ | Model variant support | Yes | Yes |
222
+ | Mode/agent list loading | Yes | Yes |
223
+ | TodoWrite → plan update | Yes | Yes |
220
224
  | Modifies OpenCode source | N/A | No |
221
225
  | Runs as independent process | No (integrated) | Yes |
222
226
 
package/README.zh.md CHANGED
@@ -8,7 +8,7 @@ OpenCode 内置的 ACP 有两个关键限制:
8
8
 
9
9
  1. **子代理不可见**:当代理通过 Task 工具派生子代理时,子 session 的事件——工具调用、文本输出、权限请求——对 ACP 客户端(如 Zed、VSCode)完全不可见。原因是内置的 `SessionManager` 只注册顶层 session,来自子 session 的事件会被静默丢弃。
10
10
 
11
- 2. **无流量可观测性**:无法检查 ACP 客户端与 OpenCode 之间流动的数据,调试困难。
11
+ 2. **无法进行问题回答**:无法进行
12
12
 
13
13
  Harmony-ACP 在不修改任何 OpenCode 源码的前提下解决了这两个问题。
14
14
 
@@ -26,7 +26,7 @@ Harmony-ACP 在不修改任何 OpenCode 源码的前提下解决了这两个问
26
26
  │ sessionId │
27
27
  │ - 记录全量流量日志 │
28
28
  │ - 自动拼接消息碎片 │
29
- └────────────┬────────────┘
29
+ └────────────┬────────────
30
30
  │ HTTP / SSE
31
31
  ┌────────────▼────────────┐
32
32
  │ opencode serve │ ← 未修改的 OpenCode
@@ -177,6 +177,8 @@ node scripts/view-log.mjs --list
177
177
  | `scripts/view-log.mjs` | 彩色日志查看器 |
178
178
  | `scripts/test-integration.mjs` | 全链路集成测试 |
179
179
 
180
+ 各文件的详细分析见 [docs/codebase-overview.md](docs/codebase-overview.md)。
181
+
180
182
  ### SessionManager 增强
181
183
 
182
184
  与 OpenCode 内置的 `ACPSessionManager` 只感知显式创建的 session 不同,Harmony-ACP 的 `SessionManager`:
@@ -201,7 +203,8 @@ node scripts/view-log.mjs --list
201
203
  ```bash
202
204
  npm run build # esbuild → dist/index.cjs
203
205
  npm run typecheck # TypeScript 类型检查
204
- npm run test # SSE 事件测试(需运行 OpenCode 服务器)
206
+ npm test # 单元测试(Vitest,无需外部依赖)
207
+ npm run test:watch # 单元测试 watch 模式
205
208
  npm run test:integration # 全链路集成测试(需运行 OpenCode 服务器)
206
209
  ```
207
210