@deepseek-ai/dsh-subagent-claude-code 0.1.5-rc.2 → 0.1.6-alpha.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.i18n.yaml CHANGED
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write packages/subagent/subagent-claude-code/README.md
5
- README.md: 947c3fe3bf14b853c6c0e76717adb12ab5a001cb
6
- README.zh.md: dce034b94b2cac31284aea9721a2d9f6ff714caa
5
+ README.md: 20bb0847fb688c37b6508b6eb335a23f3b442922
6
+ README.zh.md: eabdadb243acf7f5ccdd81420268b259283182dc
package/README.md CHANGED
@@ -77,11 +77,11 @@ Each delegation tool row names one provider and needs its own `toolName`, so the
77
77
  maxDepth: provider-managed
78
78
  ```
79
79
 
80
- The `one-shot` policy keeps omitted or `false` `run_in_background` calls in the foreground, while explicit `true` returns a parent-owned Job id for `job_output` or `job_kill`; the base host and full presets already provide the generic Job registry and controls.
80
+ The `one-shot` policy keeps omitted or `false` `run_in_background` calls in the foreground, while explicit `true` returns a parent-owned job id for `job_output` or `job_kill`; the base host and full presets already provide the generic Job registry and controls.
81
81
 
82
82
  ### What you get
83
83
 
84
- A foreground call gives the model the strict final Claude Code answer, or an error with the stop reason and optional safe diagnostic for a failed run. A background call first returns a Job id; the generic job controls later deliver a completion notice and expose the same final answer or failed status through `job_output`. Claude Code reasoning, tool activity, intermediate messages, stderr, and workspace diffs never enter the parent session.
84
+ A foreground call gives the model the strict final Claude Code answer, or an error with the stop reason and optional safe diagnostic for a failed run. A background call first returns a job id; the generic job controls later deliver a completion notice and expose the same final answer or failed status through `job_output`. Claude Code reasoning, tool activity, intermediate messages, stderr, and workspace diffs never enter the parent session.
85
85
 
86
86
  ### Failure and recovery
87
87
 
@@ -140,7 +140,7 @@ Read these pages when the package-level contract is not enough. They move from t
140
140
 
141
141
  #### What the model sees
142
142
 
143
- The Claude Code child receives the standalone text task as one fresh SDK query. Its workspace is the parent Session cwd; the selected Provider instance fixes the query's configured model, environment, and non-interactive permission mode, while an omitted model and every other product setting come from native Claude configuration. The executable version comes from the Bundle's pinned SDK platform payload.
143
+ The Claude Code child receives the standalone text task as one fresh SDK query. Its workspace is the parent Session cwd; the selected provider instance fixes the query's configured model, environment, and non-interactive permission mode, while an omitted model and every other product setting come from native Claude configuration. The executable version comes from the Bundle's pinned SDK platform payload.
144
144
 
145
145
  #### Token effect
146
146
 
package/README.zh.md CHANGED
@@ -61,7 +61,7 @@ dsh --profile <name>
61
61
 
62
62
  ### 暴露工具
63
63
 
64
- 每个委派工具行指名一个提供方,并需要独立的 `toolName`,因此模型看到的是静态工具,而不是动态提供方选择器。完整 Agent Preset 携带对应的默认工具行并设置 `disabled: true`;复制一个 preset 后删除该字段,即可只向由该副本组装的 agent 暴露 `subagent_claude_code`。
64
+ 每个委派工具行指名一个提供方,并需要独立的 `toolName`,因此模型看到的是静态工具,而不是动态提供方选择器。完整 Agent Preset 携带对应的默认工具行并设置 `disabled: true`;复制一个 preset 后删除该字段,即可只向由该副本组装的 agent(智能体)暴露 `subagent_claude_code`。
65
65
 
66
66
  ```yaml
67
67
  - id: jobs
@@ -77,15 +77,15 @@ dsh --profile <name>
77
77
  maxDepth: provider-managed
78
78
  ```
79
79
 
80
- `one-shot` 策略会让省略 `run_in_background` 或传入 `false` 的调用继续在前台等待,而显式传入 `true` 会返回由父 agent 拥有的 Job id,供 `job_output` 或 `job_kill` 使用;base host(基础宿主)与完整 preset 已提供通用作业注册表和控制工具。
80
+ `one-shot` 策略会让省略 `run_in_background` 或传入 `false` 的调用继续在前台等待,而显式传入 `true` 会返回由父 agent 拥有的 job id,供 `job_output` 或 `job_kill` 使用;base host(基础宿主)与完整 preset 已提供通用作业注册表和控制工具。
81
81
 
82
82
  ### 你会得到什么
83
83
 
84
- 前台调用会把严格的最终 Claude Code 答案交给模型;运行失败时则返回带停止原因与可选安全诊断的错误。后台调用先返回 Job id;随后通用作业控制面会送达完成通知,并通过 `job_output` 公开同一最终答案或失败状态。Claude Code 的推理、工具活动、中间消息、stderr 与工作区差异绝不会进入父级会话。
84
+ 前台调用会把严格的最终 Claude Code 答案交给模型;运行失败时则返回带停止原因与可选安全诊断的错误。后台调用先返回 job id;随后通用作业控制面会送达完成通知,并通过 `job_output` 公开同一最终答案或失败状态。Claude Code 的推理、工具活动、中间消息、stderr 与工作区差异绝不会进入父级会话。
85
85
 
86
86
  ### 失败与恢复
87
87
 
88
- 省略 optional dependencies、当前平台不受支持或所选载荷缺失的安装会让提供方保持休眠,并在第一次委派时于 SDK 启动边界以安全的 `query-start` / `unknown` 失败事实失败;不存在宿主 CLI 回退。原始产品错误只保留在内部 cause 链与提供方 Host 日志中。被取消的运行以 `aborted` 结算。
88
+ 省略 optional dependencies、当前平台不受支持或所选载荷缺失的安装会让提供方保持休眠,并在第一次委派时于 SDK 启动边界报告安全的 `query-start` / `unknown` 失败事实;不存在宿主 CLI 回退。原始产品错误只保留在内部 cause 链与提供方 Host 日志中。被取消的运行以 `aborted` 结算。
89
89
 
90
90
  -----
91
91
 
@@ -107,9 +107,9 @@ dsh --profile <name>
107
107
 
108
108
  | 文件 | 职责 |
109
109
  |---|---|
110
- | [`src/index.ts`](src/index.ts) | 插件入口:config schema、提供方注册 |
110
+ | [`src/index.ts`](src/index.ts) | 插件入口:配置 schema、提供方注册 |
111
111
  | [`src/run.ts`](src/run.ts) | SDK query 生命周期、结果接受与权限处理 |
112
- | [`src/process.ts`](src/process.ts) | dispose 时的 managed-range 逐级终止 |
112
+ | [`src/process.ts`](src/process.ts) | dispose(资源释放)时的 managed-range 逐级终止 |
113
113
  | [`cordis.patch.yml`](cordis.patch.yml) | 注册休眠提供方的 Profile patch 层 |
114
114
 
115
115
  ### 运行流程
@@ -154,7 +154,7 @@ Claude Code 子级会在一个全新的 SDK query 中接收独立文本任务。
154
154
 
155
155
  #### 模型看到什么
156
156
 
157
- 通过 `dsh-tool-subagent`,前台调用会让父级模型看到符合严格成功条件的 Claude Code 最终答案;若结果未完成,错误中会包含终止原因和可选的安全诊断。该诊断可以区分粗粒度行动类别、生命周期阶段和已观测的进程结果,而不复制原始产品文本或版本专属 subtype 名称。后台调用会先返回 Job id;随后通用作业控制面会送达完成通知,通过 `job_output` 公开同一最终答案或失败状态 detail,并允许 `job_kill` 请求取消。Claude Code 的推理、工具活动、中间消息、stderr、工作区差异、用量信息、产品标识符、工具输入和原始协议载荷均不会复制到父会话。
157
+ 通过 `dsh-tool-subagent`,前台调用会让父级模型看到符合严格成功条件的 Claude Code 最终答案;若结果未完成,错误中会包含终止原因和可选的安全诊断。该诊断可以区分粗粒度行动类别、生命周期阶段和已观测的进程结果,而不复制原始产品文本或版本专属 subtype 名称。后台调用会先返回 job id;随后通用作业控制面会送达完成通知,通过 `job_output` 公开同一最终答案或失败状态详情,并允许 `job_kill` 请求取消。Claude Code 的推理、工具活动、中间消息、stderr、工作区差异、用量信息、产品标识符、工具输入和原始协议载荷均不会复制到父会话。
158
158
 
159
159
  #### Token 影响
160
160
 
@@ -176,7 +176,7 @@ Claude Code 子级会在一个全新的 SDK query 中接收独立文本任务。
176
176
  - **宿主设置有意保持权威**——省略 `model` 时由项目与用户设置选择模型;原生设置始终保留其余工具和行为,本提供方不提供经过筛选或与宿主环境隔离的生产模式。
177
177
  - **身份验证与账户状态仍由原生机制管理**——Bundle 会提供 CLI,但不会创建账户、登录或改写 Claude 设置;配置与身份验证失败会公开其生命周期阶段与安全的 `unknown` 回退,而不会增加单独的公开分类。
178
178
  - **委派时必须存在 SDK 平台载荷**——省略 optional dependencies 的安装、不受支持的平台以及缺失或损坏的载荷都会在第一次 query 时失败;不会回退到宿主 CLI。
179
- - **没有人工交互路径**——`AskUserQuestion` 被禁用,权限提示会被拒绝,MCP elicitation 会被拒绝,阻塞对话会快速失败而不会挂起。
179
+ - **没有人工交互路径**——`AskUserQuestion` 被禁用,权限提示会被拒绝,MCP elicitation 会被拒绝,阻塞对话会以拒绝方式失败而不会挂起。
180
180
  - **assistant 载荷仅包含最终文本**——失败运行可以额外公开独立的安全诊断;推理、中间消息、工具通信、用量信息、stderr 和工作区差异仍只保留在产品内部,通用 Job id、通知与状态来自共享作业运行时。
181
181
  - **没有可选的共享能力**——对于本提供方,共享服务会拒绝 `agentOptions`、输出 schema、子任务角色设定、工具筛选和 harness 深度强制约束。
182
182
  - **没有按实际经过时间触发的超时或副作用回滚**——长时间运行的工作由调用方取消,且取消前已更改的文件或外部系统不会恢复原状。
@@ -194,4 +194,4 @@ Claude Code 子级会在一个全新的 SDK query 中接收独立文本任务。
194
194
 
195
195
  </details>
196
196
 
197
- **运行时不变式:** 不发布伴生入口。生命周期配对属于共享 subagent service,受管范围的所有权属于 subprocess service。
197
+ **运行时不变式:** 不发布伴生入口。生命周期配对属于共享 subagent 服务,受管范围的所有权属于 subprocess 服务。
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-subagent-claude-code",
3
3
  "description": "One-shot Claude Code subagent provider over the official Agent SDK",
4
- "version": "0.1.5-rc.2",
4
+ "version": "0.1.6-alpha.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -34,37 +34,37 @@
34
34
  },
35
35
  "peerDependencies": {
36
36
  "@deepseek-ai/cordis": "^4.0.2",
37
- "@deepseek-ai/dsh-llm": "^0.1.5-rc.2",
38
- "@deepseek-ai/dsh-session": "^0.1.5-rc.2",
39
- "@deepseek-ai/dsh-subagent": "^0.1.5-rc.2",
40
- "@deepseek-ai/dsh-subprocess": "^0.1.5-rc.2",
41
- "@deepseek-ai/dsh-timeout": "^0.1.5-rc.2"
37
+ "@deepseek-ai/dsh-llm": "^0.1.6-alpha.2",
38
+ "@deepseek-ai/dsh-session": "^0.1.6-alpha.2",
39
+ "@deepseek-ai/dsh-subagent": "^0.1.6-alpha.2",
40
+ "@deepseek-ai/dsh-subprocess": "^0.1.6-alpha.2",
41
+ "@deepseek-ai/dsh-timeout": "^0.1.6-alpha.2"
42
42
  },
43
43
  "dependencies": {
44
44
  "@anthropic-ai/claude-agent-sdk": "0.3.263",
45
45
  "@anthropic-ai/sdk": "0.93.0",
46
46
  "@modelcontextprotocol/sdk": "^1.29.0",
47
47
  "zod": "^4.4.3",
48
- "@deepseek-ai/dsh-brand": "^0.1.5-rc.2",
48
+ "@deepseek-ai/dsh-brand": "^0.1.6-alpha.2",
49
49
  "@deepseek-ai/schemastery": "^3.18.2"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@deepseek-ai/cordis": "^4.0.2",
53
- "@deepseek-ai/dsh-agent": "^0.1.5-rc.2",
54
- "@deepseek-ai/dsh-app-boot": "^0.1.5-rc.2",
55
- "@deepseek-ai/dsh-llm": "^0.1.5-rc.2",
56
- "@deepseek-ai/dsh-loader-smoke": "^0.1.5-rc.2",
57
- "@deepseek-ai/dsh-session": "^0.1.5-rc.2",
58
- "@deepseek-ai/dsh-session-checkpoint-policy": "^0.1.5-rc.2",
59
- "@deepseek-ai/dsh-subagent": "^0.1.5-rc.2",
60
- "@deepseek-ai/dsh-subagent-codex": "^0.1.5-rc.2",
61
- "@deepseek-ai/dsh-subprocess": "^0.1.5-rc.2",
62
- "@deepseek-ai/dsh-subprocess-local": "^0.1.5-rc.2",
63
- "@deepseek-ai/dsh-timeout": "^0.1.5-rc.2",
64
- "@deepseek-ai/dsh-tool-jobs": "^0.1.5-rc.2",
65
- "@deepseek-ai/dsh-tool-subagent": "^0.1.5-rc.2",
66
- "@deepseek-ai/dsh-tools": "^0.1.5-rc.2",
67
- "@deepseek-ai/dsh-session-projection": "^0.1.5-rc.2",
68
- "@deepseek-ai/dsh-session-persistence-jsonl": "^0.1.5-rc.2"
53
+ "@deepseek-ai/dsh-agent": "^0.1.6-alpha.2",
54
+ "@deepseek-ai/dsh-app-boot": "^0.1.6-alpha.2",
55
+ "@deepseek-ai/dsh-llm": "^0.1.6-alpha.2",
56
+ "@deepseek-ai/dsh-loader-smoke": "^0.1.6-alpha.2",
57
+ "@deepseek-ai/dsh-session": "^0.1.6-alpha.2",
58
+ "@deepseek-ai/dsh-session-checkpoint-policy": "^0.1.6-alpha.2",
59
+ "@deepseek-ai/dsh-session-persistence-jsonl": "^0.1.6-alpha.2",
60
+ "@deepseek-ai/dsh-session-projection": "^0.1.6-alpha.2",
61
+ "@deepseek-ai/dsh-subagent": "^0.1.6-alpha.2",
62
+ "@deepseek-ai/dsh-subagent-codex": "^0.1.6-alpha.2",
63
+ "@deepseek-ai/dsh-subprocess": "^0.1.6-alpha.2",
64
+ "@deepseek-ai/dsh-subprocess-local": "^0.1.6-alpha.2",
65
+ "@deepseek-ai/dsh-timeout": "^0.1.6-alpha.2",
66
+ "@deepseek-ai/dsh-tool-subagent": "^0.1.6-alpha.2",
67
+ "@deepseek-ai/dsh-tools": "^0.1.6-alpha.2",
68
+ "@deepseek-ai/dsh-tool-jobs": "^0.1.6-alpha.2"
69
69
  }
70
70
  }