@deepseek-ai/dsh-subagent-codex 0.2.1-alpha.1 → 0.2.1-alpha.3
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 +26 -26
- package/README.md +26 -31
- package/README.zh.md +26 -31
- package/cordis.patch.yml +6 -2
- package/icon.svg +1 -0
- package/lib/index.js +3 -5
- package/lib/types/run.d.ts +1 -1
- package/lib/types/wire.d.ts +1 -1
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +34 -29
package/README.i18n.yaml
CHANGED
|
@@ -9,26 +9,26 @@
|
|
|
9
9
|
en: c3f2c833cb91228d
|
|
10
10
|
zh: 3267d24936c5973f
|
|
11
11
|
/deepseek-ai-dsh-subagent-codex/summary:
|
|
12
|
-
en:
|
|
13
|
-
zh:
|
|
12
|
+
en: 6eade95bb21eae52
|
|
13
|
+
zh: 72de7d6fcdc0c31a
|
|
14
14
|
/deepseek-ai-dsh-subagent-codex/table-of-contents:
|
|
15
15
|
en: d152484eb41ac6b4
|
|
16
16
|
zh: 09388d293f9be9cb
|
|
17
17
|
/deepseek-ai-dsh-subagent-codex/use-this-package:
|
|
18
|
-
en:
|
|
19
|
-
zh:
|
|
18
|
+
en: 2ac37ff256c2e329
|
|
19
|
+
zh: 95be2a38e7c3d094
|
|
20
20
|
/deepseek-ai-dsh-subagent-codex/use-this-package/installing-the-bundle:
|
|
21
|
-
en:
|
|
22
|
-
zh:
|
|
21
|
+
en: 7740af6d6cb86814
|
|
22
|
+
zh: e5eb3546e160bac8
|
|
23
23
|
/deepseek-ai-dsh-subagent-codex/use-this-package/configuration:
|
|
24
|
-
en:
|
|
25
|
-
zh:
|
|
24
|
+
en: b8163849d388478e
|
|
25
|
+
zh: cf74fcaeef62c7ae
|
|
26
26
|
/deepseek-ai-dsh-subagent-codex/use-this-package/exposing-the-tool:
|
|
27
|
-
en:
|
|
28
|
-
zh:
|
|
27
|
+
en: a36399c7ac98724d
|
|
28
|
+
zh: d43815e08689da6b
|
|
29
29
|
/deepseek-ai-dsh-subagent-codex/use-this-package/what-you-get:
|
|
30
|
-
en:
|
|
31
|
-
zh:
|
|
30
|
+
en: 4b271f17f16fb162
|
|
31
|
+
zh: 154c909023f1366b
|
|
32
32
|
/deepseek-ai-dsh-subagent-codex/use-this-package/failure-and-recovery:
|
|
33
33
|
en: 4ffe0312c5a8f722
|
|
34
34
|
zh: 532a1997e9ae825b
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
en: 40315dca80a4e688
|
|
40
40
|
zh: 6b12db5e1037db98
|
|
41
41
|
/deepseek-ai-dsh-subagent-codex/understand-the-implementation/source-map:
|
|
42
|
-
en:
|
|
43
|
-
zh:
|
|
42
|
+
en: 36647129f061610f
|
|
43
|
+
zh: 42947c700d1d9202
|
|
44
44
|
/deepseek-ai-dsh-subagent-codex/understand-the-implementation/run-flow:
|
|
45
|
-
en:
|
|
46
|
-
zh:
|
|
45
|
+
en: 19b10ff145644564
|
|
46
|
+
zh: c015d530f1bd227e
|
|
47
47
|
/deepseek-ai-dsh-subagent-codex/further-exploration:
|
|
48
48
|
en: e2e35a40060c1ba8
|
|
49
49
|
zh: c1676579ebac7c7f
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
en: 1796fa78833bfc2b
|
|
55
55
|
zh: d925d4c0d6c46552
|
|
56
56
|
/deepseek-ai-dsh-subagent-codex/model-experience/child-request/what-the-model-sees:
|
|
57
|
-
en:
|
|
58
|
-
zh:
|
|
57
|
+
en: 7dd70afca1823730
|
|
58
|
+
zh: 7a07bb554d82c892
|
|
59
59
|
/deepseek-ai-dsh-subagent-codex/model-experience/child-request/token-effect:
|
|
60
60
|
en: 7812d203a360434a
|
|
61
61
|
zh: 52c8b9a0cbfe39c3
|
|
@@ -66,17 +66,17 @@
|
|
|
66
66
|
en: 4c391bb16e3cd380
|
|
67
67
|
zh: ab3847efe35fa6dc
|
|
68
68
|
/deepseek-ai-dsh-subagent-codex/model-experience/parent-scheduling-and-results-indirectly/what-the-model-sees:
|
|
69
|
-
en:
|
|
70
|
-
zh:
|
|
69
|
+
en: 18dcb74d6a52e96a
|
|
70
|
+
zh: 068c57f9fd959ecb
|
|
71
71
|
/deepseek-ai-dsh-subagent-codex/model-experience/parent-scheduling-and-results-indirectly/token-effect:
|
|
72
|
-
en:
|
|
73
|
-
zh:
|
|
72
|
+
en: 0c436fb0897a6eca
|
|
73
|
+
zh: 7ec0a953d0232af2
|
|
74
74
|
/deepseek-ai-dsh-subagent-codex/model-experience/parent-scheduling-and-results-indirectly/kv-cache-effect:
|
|
75
|
-
en:
|
|
76
|
-
zh:
|
|
75
|
+
en: 19f1316ea4bb1bb9
|
|
76
|
+
zh: 181231ddffdc8494
|
|
77
77
|
/deepseek-ai-dsh-subagent-codex/known-limitations-and-deferred-work:
|
|
78
|
-
en:
|
|
79
|
-
zh:
|
|
78
|
+
en: 46cbb0a3f4f81a5a
|
|
79
|
+
zh: a27faaaefe61158f
|
|
80
80
|
/deepseek-ai-dsh-subagent-codex/known-limitations-and-deferred-work/dev-note:
|
|
81
81
|
en: cacc98025ed8913e
|
|
82
82
|
zh: e7673a3087ec0c62
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
|
|
|
9
9
|
|
|
10
10
|
## Summary
|
|
11
11
|
|
|
12
|
-
Install `@deepseek-ai/dsh-subagent-codex` into a Profile when delegated work should run in a genuine, unattended Codex session in the parent Session's workspace. Each delegation uses a fresh isolated Codex thread for one self-contained text task and returns only its final answer or a safe failure diagnostic. Native Codex configuration and authentication remain authoritative, while `permissionMode` selects the non-interactive approval and sandbox behavior. The Bundle supplies a compatible native Codex payload
|
|
12
|
+
Install `@deepseek-ai/dsh-subagent-codex` into a Profile when delegated work should run in a genuine, unattended Codex session in the parent Session's workspace. Each delegation uses a fresh isolated Codex thread for one self-contained text task and returns only its final answer or a safe failure diagnostic. Native Codex configuration and authentication remain authoritative, while `permissionMode` selects the non-interactive approval and sandbox behavior. The Bundle supplies a compatible native Codex payload and adds its delegation tool as a global tool.
|
|
13
13
|
|
|
14
14
|
## Table of Contents
|
|
15
15
|
|
|
@@ -25,19 +25,15 @@ Install `@deepseek-ai/dsh-subagent-codex` into a Profile when delegated work sho
|
|
|
25
25
|
<a id="use-this-package"></a>
|
|
26
26
|
## Use this package
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
Enable **Codex subagent** in the Web or Desktop Plugins page when a task needs a fresh native Codex session in the parent workspace.
|
|
29
29
|
|
|
30
30
|
### Installing the Bundle
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
The Official entry is visible offline. Enabling it installs the [target for the running DSH installation](../../boot/plugin-manager/README.md#use-this-package) through the ordinary bundle installer and selects its profile layer. The layer registers the provider and adds `subagent_codex` to every Agent as a global tool; it starts no native process until delegation. Restart when the installer reports that one is required.
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
dsh plugin --profile <name> add @deepseek-ai/dsh-subagent-codex
|
|
36
|
-
dsh plugin --profile <name> remove @deepseek-ai/dsh-subagent-codex
|
|
37
|
-
dsh --profile <name>
|
|
38
|
-
```
|
|
34
|
+
Switching Off deselects the layer and leaves the package installed. Remove is a separate package operation. Enabling or switching Off registers or removes the global tool in the running Host, so live Agents see the change on their next request.
|
|
39
35
|
|
|
40
|
-
|
|
36
|
+
The layer inserts Host rows only, so any profile can select it, including the shipped headless, SDK, and ACP profiles. Existing provider-only consumers follow the [upgrade guide](../../../docs/upgrade-guide/v0.2.1-alpha.1/native-subagent-bundle-tools/guide.md).
|
|
41
37
|
|
|
42
38
|
### Configuration
|
|
43
39
|
|
|
@@ -57,29 +53,28 @@ Removing the package withdraws the provider and its private runtime closure on t
|
|
|
57
53
|
|
|
58
54
|
The generated [configuration catalog](../../../docs/config-catalog.md#deepseek-aidsh-subagent-codex) is the exhaustive source for every accepted field and its JSDoc. A configured `model` passes unchanged on each ephemeral `thread/start`; omission leaves native model selection in force. The provider does not discover models, rewrite aliases, select `modelProvider` or `serviceTier`, or set a fallback. Credential-shaped ambient variables are removed before the explicit `env` overlay, so an API key intended for the child must be supplied there.
|
|
59
55
|
|
|
56
|
+
<a id="exposing-the-tool"></a>
|
|
60
57
|
### Exposing the tool
|
|
61
58
|
|
|
62
|
-
|
|
59
|
+
The bundle inserts `tool-subagent-codex` as a Host row, so `subagent_codex` is a global tool visible to every preset, including minimal. Later user patches can configure or disable that row by id. A preset that registers its own tool with the same name shadows the global tool for its Agents. To mount the provider and tool without selecting the bundle layer, insert the same rows in `cordis.patch.yml`:
|
|
63
60
|
|
|
64
61
|
```yaml
|
|
65
|
-
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
backgroundMode: one-shot
|
|
75
|
-
maxDepth: provider-managed
|
|
62
|
+
- insert:
|
|
63
|
+
- id: subagent-codex
|
|
64
|
+
name: '@deepseek-ai/dsh-subagent-codex'
|
|
65
|
+
- id: tool-subagent-codex
|
|
66
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
67
|
+
config:
|
|
68
|
+
provider: codex
|
|
69
|
+
toolName: subagent_codex
|
|
70
|
+
maxDepth: provider-managed
|
|
76
71
|
```
|
|
77
72
|
|
|
78
|
-
The
|
|
73
|
+
The tool returns a child id after accepting the task and sends its result to the parent Agent on completion. Each external activation executes once and accepts no follow-up input or resume.
|
|
79
74
|
|
|
80
75
|
### What you get
|
|
81
76
|
|
|
82
|
-
|
|
77
|
+
The completion notice contains the final Codex answer, or the stop reason and optional safe diagnostic. The parent Session also retains the external task identity and complete terminal result independently of the notice; no local child Session is created. Product reasoning, tool activity, raw stderr, and workspace diffs do not enter the parent Session.
|
|
83
78
|
|
|
84
79
|
### Failure and recovery
|
|
85
80
|
|
|
@@ -108,11 +103,11 @@ This section explains how the provider drives a real Codex app-server and where
|
|
|
108
103
|
| [`src/index.ts`](src/index.ts) | Plugin entry: config schema, provider registration |
|
|
109
104
|
| [`src/run.ts`](src/run.ts) | The run lifecycle, turn execution, result selection, and diagnostics |
|
|
110
105
|
| [`src/wire.ts`](src/wire.ts) | The minimal app-server JSON-RPC wire implementation |
|
|
111
|
-
| [`cordis.patch.yml`](cordis.patch.yml) | The Profile
|
|
106
|
+
| [`cordis.patch.yml`](cordis.patch.yml) | The Profile layer that registers the provider and contributes preset delegation tools |
|
|
112
107
|
|
|
113
108
|
### Run flow
|
|
114
109
|
|
|
115
|
-
A start accepts only a non-empty sequence of text blocks and
|
|
110
|
+
A start accepts only a non-empty sequence of text blocks and uses the child cwd selected by the subagent service. It spawns the fixed command through the subprocess seam, performs the `initialize` → `initialized` handshake, maps the Profile-selected mode and optional model into official `thread/start` fields beside `{ cwd, ephemeral: true }`, and publishes the run only after Codex returns a valid ephemeral thread. The published result starts exactly one turn, accepts only notifications for that run's thread and turn, and waits for the authoritative `turn/completed` terminal. The latest `agentMessage` with `phase: "final_answer"` wins; when Codex emits no explicit final phase, the latest message with `phase: null` is the compatibility fallback. A successful turn with no nonblank answer settles as an error. Failed turns use the coarse categories `limit`, `access-policy`, `service`, `transport`, `product-error`, `invalid-result`, or `unknown`; an early app-server exit uses `process`, and applicable connection and stream failures retain a numeric `httpStatusCode`.
|
|
116
111
|
|
|
117
112
|
</details>
|
|
118
113
|
|
|
@@ -138,7 +133,7 @@ Read these pages when the package-level contract is not enough. They move from t
|
|
|
138
133
|
|
|
139
134
|
#### What the model sees
|
|
140
135
|
|
|
141
|
-
The Codex child receives the standalone text blocks as one turn in a fresh ephemeral thread. Its workspace is the
|
|
136
|
+
The Codex child receives the standalone text blocks as one turn in a fresh ephemeral thread. Its workspace is the selected child working directory; the selected Provider instance fixes any configured model, environment, non-interactive approval policy, and sandbox mode, while an omitted model and every other product setting come from native Codex configuration. The executable version comes from the Bundle's pinned platform payload.
|
|
142
137
|
|
|
143
138
|
#### Token effect
|
|
144
139
|
|
|
@@ -152,15 +147,15 @@ Independent of the parent request cache. Reuse depends only on Codex's own provi
|
|
|
152
147
|
|
|
153
148
|
#### What the model sees
|
|
154
149
|
|
|
155
|
-
Through `dsh-tool-subagent`,
|
|
150
|
+
Through `dsh-tool-subagent`, the parent model first receives a child id, then the final Codex answer or a failure notice with its stop reason and safe diagnostic. Diagnostics contain only fixed stage, category, and observed protocol or process facts. Product reasoning, intermediate messages, tool activity, stderr, usage, product identifiers, commands, paths, and raw protocol payloads are not copied into the parent Session.
|
|
156
151
|
|
|
157
152
|
#### Token effect
|
|
158
153
|
|
|
159
|
-
|
|
154
|
+
Parent input grows by the start acknowledgement and completion notice, including the final answer or failure detail. Child tokens do not enter the parent context. This provider adds no parent tool schema by itself.
|
|
160
155
|
|
|
161
156
|
#### KV Cache effect
|
|
162
157
|
|
|
163
|
-
|
|
158
|
+
Start acknowledgements and completion notices append after the reusable parent request prefix. A notice may wake another turn without rewriting the existing prefix.
|
|
164
159
|
|
|
165
160
|
## Known Limitations and Deferred Work
|
|
166
161
|
|
|
@@ -175,8 +170,8 @@ These limits define when this provider is a poor fit or needs special operationa
|
|
|
175
170
|
- **The native platform payload is required at delegation time** — installs that omit optional dependencies, unsupported platforms, and missing or damaged payloads fail at the first run; there is no host-CLI fallback.
|
|
176
171
|
- **Compatibility is pinned by development evidence** — upgrading from the verified 0.153.4 protocol baseline requires regenerating upstream schema evidence and rerunning handshake, answer-selection, approval, cancellation, keyless real-product, and credentialed DeepSeek nonce tests.
|
|
177
172
|
- **No human approval path** — known unattended approval requests are denied and unknown server requests fail closed; the three Profile modes never create a DSH interaction channel or per-call allow policy.
|
|
178
|
-
- **Assistant payload is final text only** —
|
|
179
|
-
- **No optional shared capabilities** — `agentOptions`, output schemas,
|
|
173
|
+
- **Assistant payload is final text only** — failed runs can also expose a separate safe diagnostic; reasoning, intermediate messages, tool traffic, usage, stderr, and workspace diffs remain outside the parent Session. Task identity and terminal results are retained in the parent log.
|
|
174
|
+
- **No optional shared capabilities** — `agentPreset`, `agentOptions`, output schemas, and harness depth enforcement are rejected by the shared service for this provider.
|
|
180
175
|
- **No wall-clock timeout or side-effect rollback** — the caller cancels long work, and files or external systems changed before cancellation are not restored.
|
|
181
176
|
|
|
182
177
|
<a id="dev-note"></a>
|
package/README.zh.md
CHANGED
|
@@ -9,7 +9,7 @@ kind: "package-bundle"
|
|
|
9
9
|
|
|
10
10
|
## 概述
|
|
11
11
|
|
|
12
|
-
当委派工作需要在父会话工作区中的真实无人值守 Codex 会话内运行时,把 `@deepseek-ai/dsh-subagent-codex` 安装进 Profile。每次委派都会为一个自包含文本任务使用全新且隔离的 Codex 线程,并且只返回其最终答案或安全失败诊断。原生 Codex 配置和身份验证继续作为权威来源,而 `permissionMode` 选择非交互式审批和沙箱行为。Bundle
|
|
12
|
+
当委派工作需要在父会话工作区中的真实无人值守 Codex 会话内运行时,把 `@deepseek-ai/dsh-subagent-codex` 安装进 Profile。每次委派都会为一个自包含文本任务使用全新且隔离的 Codex 线程,并且只返回其最终答案或安全失败诊断。原生 Codex 配置和身份验证继续作为权威来源,而 `permissionMode` 选择非交互式审批和沙箱行为。Bundle 提供兼容的原生 Codex 载荷,并以全局工具形式添加委派工具。
|
|
13
13
|
|
|
14
14
|
## 目录
|
|
15
15
|
|
|
@@ -25,19 +25,15 @@ kind: "package-bundle"
|
|
|
25
25
|
<a id="use-this-package"></a>
|
|
26
26
|
## 使用本包
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
当任务需要在父工作区中运行全新的原生 Codex 会话时,在 Web 或 Desktop 插件页启用 **Codex 子智能体**。
|
|
29
29
|
|
|
30
30
|
### 安装 Bundle
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
官方条目可离线显示。启用时,普通 bundle 安装器会安装[当前 DSH 安装对应的目标](../../boot/plugin-manager/README.zh.md#use-this-package)并选择其配置层。此层注册提供方,并为所有智能体添加全局工具 `subagent_codex`;实际委派前不会启动原生进程。安装器提示需要重启时,请重启应用。
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
dsh plugin --profile <name> add @deepseek-ai/dsh-subagent-codex
|
|
36
|
-
dsh plugin --profile <name> remove @deepseek-ai/dsh-subagent-codex
|
|
37
|
-
dsh --profile <name>
|
|
38
|
-
```
|
|
34
|
+
关闭只会取消选择配置层,保留已安装的包。移除是独立的包操作。启用或关闭会在运行中的 Host 注册或移除该全局工具,正在运行的智能体会在下一次请求时看到变化。
|
|
39
35
|
|
|
40
|
-
|
|
36
|
+
此层只插入 Host 条目,因此任何配置(包括随附的 headless、SDK 和 ACP)都可以选择它。原有仅提供方用法请遵循[升级指南](../../../docs/upgrade-guide/v0.2.1-alpha.1/native-subagent-bundle-tools/guide.zh.md)。
|
|
41
37
|
|
|
42
38
|
### 配置
|
|
43
39
|
|
|
@@ -57,29 +53,28 @@ dsh --profile <name>
|
|
|
57
53
|
|
|
58
54
|
生成的[配置目录](../../../docs/config-catalog.zh.md#deepseek-aidsh-subagent-codex)是每个受支持字段及其 JSDoc 的穷尽式真源。已配置的 `model` 会原样传给每个临时 `thread/start`;省略时保留原生模型选择。提供方不会发现模型、改写别名、选择 `modelProvider` 或 `serviceTier`,也不会设置 fallback。具有凭证特征的环境变量会在显式 `env` 覆盖生效前被移除,因此供子进程使用的 API 密钥必须在该配置中显式提供。
|
|
59
55
|
|
|
56
|
+
<a id="exposing-the-tool"></a>
|
|
60
57
|
### 暴露工具
|
|
61
58
|
|
|
62
|
-
|
|
59
|
+
Bundle 将 `tool-subagent-codex` 作为 Host 条目插入,因此 `subagent_codex` 是所有预设(包括 minimal)都可见的全局工具。后续用户补丁可以按 id 配置或禁用该行。预设自行注册的同名工具会为其智能体遮蔽该全局工具。若要不选择 bundle 层而挂载提供方和工具,在 `cordis.patch.yml` 中插入相同的条目:
|
|
63
60
|
|
|
64
61
|
```yaml
|
|
65
|
-
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
backgroundMode: one-shot
|
|
75
|
-
maxDepth: provider-managed
|
|
62
|
+
- insert:
|
|
63
|
+
- id: subagent-codex
|
|
64
|
+
name: '@deepseek-ai/dsh-subagent-codex'
|
|
65
|
+
- id: tool-subagent-codex
|
|
66
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
67
|
+
config:
|
|
68
|
+
provider: codex
|
|
69
|
+
toolName: subagent_codex
|
|
70
|
+
maxDepth: provider-managed
|
|
76
71
|
```
|
|
77
72
|
|
|
78
|
-
|
|
73
|
+
工具接受任务后返回 child id;任务完成后向父 agent 发送结果通知。外部 activation 只执行一次,不支持追加输入或恢复对话。
|
|
79
74
|
|
|
80
75
|
### 你会得到什么
|
|
81
76
|
|
|
82
|
-
|
|
77
|
+
完成通知包含 Codex 的最终答案,或停止原因与可选的安全诊断。父会话还独立保存外部任务的身份和完整终态结果;无需创建本地子 Session。产品推理、工具活动、原始 stderr 与工作区差异不会进入父会话。
|
|
83
78
|
|
|
84
79
|
### 失败与恢复
|
|
85
80
|
|
|
@@ -108,11 +103,11 @@ dsh --profile <name>
|
|
|
108
103
|
| [`src/index.ts`](src/index.ts) | 插件入口:config schema、提供方注册 |
|
|
109
104
|
| [`src/run.ts`](src/run.ts) | 运行生命周期、轮次执行、结果选择与诊断 |
|
|
110
105
|
| [`src/wire.ts`](src/wire.ts) | 最小的 app-server JSON-RPC 协议实现 |
|
|
111
|
-
| [`cordis.patch.yml`](cordis.patch.yml) |
|
|
106
|
+
| [`cordis.patch.yml`](cordis.patch.yml) | 注册提供方并添加预设委派工具的 Profile 配置层 |
|
|
112
107
|
|
|
113
108
|
### 运行流程
|
|
114
109
|
|
|
115
|
-
|
|
110
|
+
一次启动只接受非空的文本块序列,并使用子代理服务选择的子级 cwd。它经子进程 seam spawn 固定命令,完成 `initialize` → `initialized` 握手,把 Profile 选择的模式与可选模型映射为官方 `thread/start` 字段并与 `{ cwd, ephemeral: true }` 一起发送,且仅在 Codex 返回有效的临时线程后发布运行。已发布的结果恰好启动一个轮次,只接受与此次运行的线程和轮次匹配的通知,并等待权威的 `turn/completed` 终态。以最后一条 `phase: "final_answer"` 的 `agentMessage` 为准;若 Codex 没有发出明确的最终阶段,则以最后一条 `phase: null` 的消息作为兼容性回退。成功完成的轮次若没有非空白答案,结果也会判为错误。失败轮次使用粗粒度类别 `limit`、`access-policy`、`service`、`transport`、`product-error`、`invalid-result` 或 `unknown`;app-server 提前退出使用 `process`,适用的连接与 stream 失败保留数值 `httpStatusCode`。
|
|
116
111
|
|
|
117
112
|
</details>
|
|
118
113
|
|
|
@@ -138,7 +133,7 @@ dsh --profile <name>
|
|
|
138
133
|
|
|
139
134
|
#### 模型看到什么
|
|
140
135
|
|
|
141
|
-
Codex
|
|
136
|
+
Codex 子级会在一个全新的临时线程中,以单个轮次接收这些独立文本块。它的工作区是所选子级工作目录;所选提供方实例会固定已配置的模型、环境、非交互审批策略与沙箱模式,而省略的模型及其余产品设置来自 Codex 原生配置。可执行版本来自 Bundle 锁定的平台载荷。
|
|
142
137
|
|
|
143
138
|
#### Token 影响
|
|
144
139
|
|
|
@@ -152,15 +147,15 @@ Codex 子级会在一个全新的临时线程中,以单个轮次接收这些
|
|
|
152
147
|
|
|
153
148
|
#### 模型看到什么
|
|
154
149
|
|
|
155
|
-
通过 `dsh-tool-subagent
|
|
150
|
+
通过 `dsh-tool-subagent`,父模型先收到 child id,随后收到 Codex 最终答案或带停止原因与安全诊断的失败通知。诊断只包含固定的阶段、类别和已观测的协议或进程事实。产品推理、中间消息、工具活动、stderr、用量、产品标识符、命令、路径与原始协议载荷不会复制到父 Session。
|
|
156
151
|
|
|
157
152
|
#### Token 影响
|
|
158
153
|
|
|
159
|
-
|
|
154
|
+
父级输入会增加启动确认与完成通知,包括最终答案或失败信息。子任务 token 不进入父级上下文。本提供方自身不添加父级工具 schema。
|
|
160
155
|
|
|
161
156
|
#### KV Cache 影响
|
|
162
157
|
|
|
163
|
-
|
|
158
|
+
启动确认与完成通知仅追加到可复用的父请求前缀之后。通知可能唤醒新轮次,不会改写已有前缀。
|
|
164
159
|
|
|
165
160
|
## 已知限制与延期工作
|
|
166
161
|
|
|
@@ -175,8 +170,8 @@ Codex 子级会在一个全新的临时线程中,以单个轮次接收这些
|
|
|
175
170
|
- **委派时必须存在原生平台载荷**——省略 optional dependencies 的安装、不受支持的平台以及缺失或损坏的载荷都会在第一次运行时失败;不会回退到宿主 CLI。
|
|
176
171
|
- **兼容性由开发证据锁定**——若要从已验证的 0.153.4 协议基线升级,必须重新生成上游 schema 证据,并重新运行握手、答案选择、审批、取消、无密钥真实产品以及带密钥的 DeepSeek 随机数测试。
|
|
177
172
|
- **没有人工审批路径**——已知的无人值守审批请求会被拒绝,未知服务器请求会以默认拒绝方式使运行失败;三种 Profile 模式都不会创建 DSH 交互通道或逐次调用 allow 策略。
|
|
178
|
-
- **assistant
|
|
179
|
-
- **没有可选的共享能力**——对于本提供方,共享服务会拒绝 `agentOptions`、输出 schema
|
|
173
|
+
- **assistant 载荷仅包含最终文本**——失败运行还可公开独立的安全诊断;推理、中间消息、工具通信、用量、stderr 与工作区差异不会进入父 Session。任务身份与终态结果保存在父日志中。
|
|
174
|
+
- **没有可选的共享能力**——对于本提供方,共享服务会拒绝 `agentPreset`、`agentOptions`、输出 schema 和 harness 深度强制约束。
|
|
180
175
|
- **没有按实际经过时间触发的超时或副作用回滚**——长时间运行的工作由调用方取消,且取消前已更改的文件或外部系统不会恢复原状。
|
|
181
176
|
|
|
182
177
|
<a id="dev-note"></a>
|
package/cordis.patch.yml
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
# Optional Profile Bundle: register the Codex provider on the Host plane only.
|
|
2
|
-
# Agent Presets grant the model-facing tool independently.
|
|
3
1
|
- insert:
|
|
4
2
|
- id: subagent-codex
|
|
5
3
|
name: '@deepseek-ai/dsh-subagent-codex'
|
|
4
|
+
- id: tool-subagent-codex
|
|
5
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
6
|
+
config:
|
|
7
|
+
provider: codex
|
|
8
|
+
toolName: subagent_codex
|
|
9
|
+
maxDepth: provider-managed
|
package/icon.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="14.9893" y="15.1877" width="12.2365" height="12.2365" rx="2" fill="url(#dsh_plugin_art_R0a)" fill-opacity="0.8"></rect><rect x="8.87109" y="9.0697" width="12.2365" height="12.2365" rx="2" fill="url(#dsh_plugin_art_R0b)" fill-opacity="0.8"></rect><defs><linearGradient id="dsh_plugin_art_R0a" x1="21.1075" y1="15.1877" x2="21.1075" y2="27.4243" gradientUnits="userSpaceOnUse"><stop stop-color="#45E7A4"></stop><stop offset="1" stop-color="#05909D"></stop></linearGradient><linearGradient id="dsh_plugin_art_R0b" x1="14.9894" y1="9.0697" x2="14.9894" y2="21.3063" gradientUnits="userSpaceOnUse"><stop stop-color="#69B9FF"></stop><stop offset="1" stop-color="#324DE2"></stop></linearGradient></defs></svg>
|
package/lib/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
2
|
import z from "@deepseek-ai/schemastery";
|
|
3
3
|
import { MAX_TIMER_DELAY_MS } from "@deepseek-ai/dsh-timeout";
|
|
4
|
-
import { NO_START_CAPABILITIES, assertPositiveFinite,
|
|
4
|
+
import { NO_START_CAPABILITIES, assertPositiveFinite, assertUsableCwd, settleRunResult, subprocessRunHandle } from "@deepseek-ai/dsh-subagent";
|
|
5
5
|
import { randomUUID } from "node:crypto";
|
|
6
6
|
import { readFileSync, writeFileSync } from "node:fs";
|
|
7
7
|
import { dirname, resolve } from "node:path";
|
|
@@ -204,7 +204,7 @@ var CodexAppServerWire = class {
|
|
|
204
204
|
}
|
|
205
205
|
/**
|
|
206
206
|
* Create the run's private ephemeral thread and retain its identity.
|
|
207
|
-
* @param cwd -
|
|
207
|
+
* @param cwd - selected child working directory.
|
|
208
208
|
* @param signal - unpublished-start cancellation.
|
|
209
209
|
*/
|
|
210
210
|
async startThread(cwd, signal) {
|
|
@@ -828,11 +828,9 @@ var CodexProvider = class {
|
|
|
828
828
|
this.config = config;
|
|
829
829
|
}
|
|
830
830
|
start(request) {
|
|
831
|
-
const parentCwd = request.parent.session.header.cwd;
|
|
832
|
-
if (parentCwd === void 0) throw new Error("subagent-codex: no working directory for the child — delegate from a parent session that has one");
|
|
833
831
|
let cwd;
|
|
834
832
|
try {
|
|
835
|
-
cwd =
|
|
833
|
+
cwd = assertUsableCwd("subagent-codex", "child cwd", request.cwd);
|
|
836
834
|
} catch (error) {
|
|
837
835
|
if (request.signal.aborted) throw new Error("subagent-codex: request was aborted before app-server startup");
|
|
838
836
|
throw codexStartupFailure(error);
|
package/lib/types/run.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export declare function codexStartupFailure(cause: unknown): Error;
|
|
|
31
31
|
export declare function codexAppServerArgv(): string[];
|
|
32
32
|
/** Fully resolved inputs for one Codex app-server run. */
|
|
33
33
|
export interface CodexRunSpec {
|
|
34
|
-
/**
|
|
34
|
+
/** Selected child working directory, also supplied to `thread/start`. */
|
|
35
35
|
readonly cwd: string;
|
|
36
36
|
/** Profile-selected native model; omitted to preserve Codex settings. */
|
|
37
37
|
readonly model?: string;
|
package/lib/types/wire.d.ts
CHANGED
|
@@ -58,7 +58,7 @@ export declare class CodexAppServerWire {
|
|
|
58
58
|
initialize(signal: AbortSignal): Promise<void>;
|
|
59
59
|
/**
|
|
60
60
|
* Create the run's private ephemeral thread and retain its identity.
|
|
61
|
-
* @param cwd -
|
|
61
|
+
* @param cwd - selected child working directory.
|
|
62
62
|
* @param signal - unpublished-start cancellation.
|
|
63
63
|
*/
|
|
64
64
|
startThread(cwd: string, signal: AbortSignal): Promise<void>;
|
package/locale/en.json
ADDED
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-subagent-codex",
|
|
3
3
|
"description": "One-shot Codex subagent provider over the official app-server protocol",
|
|
4
|
-
"version": "0.2.1-alpha.
|
|
4
|
+
"version": "0.2.1-alpha.3",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -19,9 +19,13 @@
|
|
|
19
19
|
"default": "./lib/index.js"
|
|
20
20
|
},
|
|
21
21
|
"./src/*": "./src/*",
|
|
22
|
-
"./package.json": "./package.json"
|
|
22
|
+
"./package.json": "./package.json",
|
|
23
|
+
"./locale/*.json": "./locale/*.json",
|
|
24
|
+
"./cordis.patch.yml": "./cordis.patch.yml"
|
|
23
25
|
},
|
|
24
26
|
"files": [
|
|
27
|
+
"icon.svg",
|
|
28
|
+
"locale/*.json",
|
|
25
29
|
"lib/index.js",
|
|
26
30
|
"cordis.patch.yml",
|
|
27
31
|
"lib/types/**/*.d.ts"
|
|
@@ -33,36 +37,37 @@
|
|
|
33
37
|
}
|
|
34
38
|
},
|
|
35
39
|
"peerDependencies": {
|
|
36
|
-
"@deepseek-ai/cordis": "~4.0.5-alpha.
|
|
37
|
-
"@deepseek-ai/dsh-llm": "0.2.1-alpha.
|
|
38
|
-
"@deepseek-ai/dsh-session": "0.2.1-alpha.
|
|
39
|
-
"@deepseek-ai/dsh-subagent": "0.2.1-alpha.
|
|
40
|
-
"@deepseek-ai/dsh-subprocess": "0.2.1-alpha.
|
|
41
|
-
"@deepseek-ai/dsh-timeout": "0.2.1-alpha.
|
|
40
|
+
"@deepseek-ai/cordis": "~4.0.5-alpha.2",
|
|
41
|
+
"@deepseek-ai/dsh-llm": "0.2.1-alpha.3",
|
|
42
|
+
"@deepseek-ai/dsh-session": "0.2.1-alpha.3",
|
|
43
|
+
"@deepseek-ai/dsh-subagent": "0.2.1-alpha.3",
|
|
44
|
+
"@deepseek-ai/dsh-subprocess": "0.2.1-alpha.3",
|
|
45
|
+
"@deepseek-ai/dsh-timeout": "0.2.1-alpha.3"
|
|
42
46
|
},
|
|
43
47
|
"dependencies": {
|
|
48
|
+
"@deepseek-ai/dsh-brand": "0.2.1-alpha.3",
|
|
49
|
+
"@deepseek-ai/dsh-sdk-protocol": "0.2.1-alpha.3",
|
|
50
|
+
"@deepseek-ai/schemastery": "~3.18.5-alpha.2",
|
|
44
51
|
"@openai/codex": "0.153.4",
|
|
45
|
-
"@deepseek-ai/dsh-
|
|
46
|
-
"@deepseek-ai/dsh-sdk-protocol": "0.2.1-alpha.1",
|
|
47
|
-
"@deepseek-ai/schemastery": "~3.18.5-alpha.1"
|
|
52
|
+
"@deepseek-ai/dsh-tool-subagent": "0.2.1-alpha.3"
|
|
48
53
|
},
|
|
49
54
|
"devDependencies": {
|
|
50
|
-
"@deepseek-ai/cordis": "~4.0.5-alpha.
|
|
51
|
-
"@deepseek-ai/cordis-plugin-loader": "~1.0.6-alpha.
|
|
52
|
-
"@deepseek-ai/dsh-agent": "0.2.1-alpha.
|
|
53
|
-
"@deepseek-ai/dsh-
|
|
54
|
-
"@deepseek-ai/dsh-
|
|
55
|
-
"@deepseek-ai/dsh-
|
|
56
|
-
"@deepseek-ai/dsh-
|
|
57
|
-
"@deepseek-ai/dsh-session-checkpoint-policy": "0.2.1-alpha.
|
|
58
|
-
"@deepseek-ai/dsh-session-persistence-jsonl": "0.2.1-alpha.
|
|
59
|
-
"@deepseek-ai/dsh-session-projection": "0.2.1-alpha.
|
|
60
|
-
"@deepseek-ai/dsh-subagent": "0.2.1-alpha.
|
|
61
|
-
"@deepseek-ai/dsh-subprocess
|
|
62
|
-
"@deepseek-ai/dsh-
|
|
63
|
-
"@deepseek-ai/dsh-
|
|
64
|
-
"@deepseek-ai/dsh-tool-
|
|
65
|
-
"@deepseek-ai/dsh-tools": "0.2.1-alpha.
|
|
66
|
-
|
|
67
|
-
|
|
55
|
+
"@deepseek-ai/cordis": "~4.0.5-alpha.2",
|
|
56
|
+
"@deepseek-ai/cordis-plugin-loader": "~1.0.6-alpha.2",
|
|
57
|
+
"@deepseek-ai/dsh-agent": "0.2.1-alpha.3",
|
|
58
|
+
"@deepseek-ai/dsh-app-boot": "0.2.1-alpha.3",
|
|
59
|
+
"@deepseek-ai/dsh-llm": "0.2.1-alpha.3",
|
|
60
|
+
"@deepseek-ai/dsh-loader-smoke": "0.2.1-alpha.3",
|
|
61
|
+
"@deepseek-ai/dsh-session": "0.2.1-alpha.3",
|
|
62
|
+
"@deepseek-ai/dsh-session-checkpoint-policy": "0.2.1-alpha.3",
|
|
63
|
+
"@deepseek-ai/dsh-session-persistence-jsonl": "0.2.1-alpha.3",
|
|
64
|
+
"@deepseek-ai/dsh-session-projection": "0.2.1-alpha.3",
|
|
65
|
+
"@deepseek-ai/dsh-subagent": "0.2.1-alpha.3",
|
|
66
|
+
"@deepseek-ai/dsh-subprocess": "0.2.1-alpha.3",
|
|
67
|
+
"@deepseek-ai/dsh-subprocess-local": "0.2.1-alpha.3",
|
|
68
|
+
"@deepseek-ai/dsh-timeout": "0.2.1-alpha.3",
|
|
69
|
+
"@deepseek-ai/dsh-tool-jobs": "0.2.1-alpha.3",
|
|
70
|
+
"@deepseek-ai/dsh-tools": "0.2.1-alpha.3"
|
|
71
|
+
},
|
|
72
|
+
"icon": "./icon.svg"
|
|
68
73
|
}
|