@deepseek-ai/dsh-subagent-codex 0.1.2-rc.1 → 0.1.5-alpha.1

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-codex/README.md
5
- README.md: 399f01bd057c3278356a17c04137be6596274866
6
- README.zh.md: f2ac1287cc0678822e655b6d06f0b414ebee2b81
5
+ README.md: 3f90c9430c296d1233f1d2973e51ed3517e61dc1
6
+ README.zh.md: 7e5f854af342319233a20b5847f4590dcf66c1f0
package/README.md CHANGED
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
9
9
 
10
10
  ## Summary
11
11
 
12
- `dsh-subagent-codex` registers a Profile-named Codex subagent provider (default `codex`) that runs a real Codex child through the official app-server protocol in the delegating session's workspace. Each accepted run starts the package-local Codex wrapper with `app-server --stdio`, creates one ephemeral Codex thread, submits one self-contained text task, and returns the selected final answer — or a separate safe failure diagnostic — through the shared subagent result contract. The provider ships as an optional Profile Bundle: installing it brings the official wrapper and one compatible native platform payload, while the registered provider stays dormant until a bound tool calls it. Native Codex configuration and authentication remain authoritative, and the Profile-selected `permissionMode` maps into the thread's approval, reviewer, and sandbox fields. Choose it when the child should be a genuine Codex session, fully isolated from the parent harness.
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, but it exposes no model capability until a delegation tool is configured.
13
13
 
14
14
  ## Table of Contents
15
15
 
@@ -47,7 +47,7 @@ Removing the package withdraws the provider and its private runtime closure on t
47
47
  | `model` | native Codex settings | Optional non-empty model name fixed for every thread from this provider instance; omission sends no app-server override |
48
48
  | `env` | `{}` | Explicit child environment layered over the credential-scrubbed parent environment |
49
49
  | `permissionMode` | `never` | Native non-interactive approval and sandbox mode fixed for every thread from this provider instance |
50
- | `disposeGraceMs` | `3000` | Grace between the shared process-tree owner's termination tiers |
50
+ | `disposeGraceMs` | `3000` | Grace between the shared managed-range owner's termination tiers |
51
51
 
52
52
  | `permissionMode` value | `thread/start` fields | Native behavior |
53
53
  |---|---|---|
@@ -173,7 +173,7 @@ These limits define when this provider is a poor fit or needs special operationa
173
173
  - **Static instance selection** — Profile rows fix provider names, optional models, and tool bindings; calls cannot choose or change either a provider or model dynamically, and every exposed tool needs a unique `toolName`.
174
174
  - **Authentication and account state remain native** — the Bundle supplies the CLI but does not create an account, log in, trust a project, or rewrite Codex settings; configuration and authentication failures surface with their lifecycle stage and the safe `unknown` fallback rather than a separate public taxonomy.
175
175
  - **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
- - **Compatibility is pinned by development evidence** — upgrading from the verified 0.149.1 protocol baseline requires regenerating upstream schema evidence and rerunning handshake, answer-selection, approval, cancellation, keyless real-product, and credentialed DeepSeek nonce tests.
176
+ - **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
177
  - **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
178
  - **Assistant payload is final text only** — a failed run may additionally expose the separate safe diagnostic; reasoning, commentary, intermediate messages, tool traffic, usage, raw stderr, and workspace diffs remain outside the parent Session, while generic Job ids, notices, and status come from the shared job runtime.
179
179
  - **No optional shared capabilities** — `agentOptions`, output schemas, child personas, tool filtering, and harness depth enforcement are rejected by the shared service for this provider.
@@ -188,8 +188,8 @@ These limits define when this provider is a poor fit or needs special operationa
188
188
  This Dev Note is working context for maintainers: open questions and undecided directions. It is explicitly non-authoritative — shipped behavior and limits live in the sections above and in the package code.
189
189
 
190
190
  - **Payload size disclosure** — the current darwin-arm64 platform payload packs to about 114 MB and unpacks to about 282 MB; these are disclosure numbers, not installation thresholds.
191
- - **Version-pinned protocol** — the runtime dependency is pinned to `@openai/codex@0.149.1`; upgrading requires regenerating the upstream schema evidence and rerunning the credentialed nonce tests.
191
+ - **Version-pinned protocol** — the runtime dependency is pinned to `@openai/codex@0.153.4`; upgrading requires regenerating the upstream schema evidence and rerunning the credentialed nonce tests.
192
192
 
193
193
  </details>
194
194
 
195
- **Runtime invariant:** No companion is published. Lifecycle pairing belongs to the shared subagent service and process-tree ownership belongs to the subprocess service.
195
+ **Runtime invariant:** No companion is published. Lifecycle pairing belongs to the shared subagent service, and managed-range ownership belongs to the subprocess service.
package/README.zh.md CHANGED
@@ -9,7 +9,7 @@ kind: "package-bundle"
9
9
 
10
10
  ## 概述
11
11
 
12
- `dsh-subagent-codex` 注册由 Profile 命名、默认名称为 `codex` 的 Codex subagent 提供方,它在发起委派的会话工作区中通过官方 app-server 协议运行真实的 Codex 子 agent(智能体)。每次接受的运行以 `app-server --stdio` 启动包内 Codex wrapper,创建一个临时 Codex 线程,提交一个自包含文本任务,并通过共享的 subagent 结果约定返回选定的最终答案——或独立的安全失败诊断。该提供方作为可选的 Profile Bundle 发布:安装会带入官方 wrapper 与一个兼容的原生平台载荷,而注册的提供方在绑定工具调用前保持休眠。原生 Codex 配置与身份验证继续是权威来源,Profile 选择的 `permissionMode` 会映射进线程的 approval、reviewer 与 sandbox 字段。当子 agent 应该是与父 harness 完全隔离的真实 Codex 会话时,选择它。
12
+ 当委派工作需要在父会话工作区中的真实无人值守 Codex 会话内运行时,把 `@deepseek-ai/dsh-subagent-codex` 安装进 Profile。每次委派都会为一个自包含文本任务使用全新且隔离的 Codex 线程,并且只返回其最终答案或安全失败诊断。原生 Codex 配置和身份验证继续作为权威来源,而 `permissionMode` 选择非交互式审批和沙箱行为。Bundle 会提供兼容的原生 Codex 载荷,但只有配置委派工具后才会向模型提供能力。
13
13
 
14
14
  ## 目录
15
15
 
@@ -47,7 +47,7 @@ dsh --profile <name>
47
47
  | `model` | Codex 原生设置 | 为本提供方实例的每个线程固定的可选非空模型名称;省略时不发送 app-server 覆盖 |
48
48
  | `env` | `{}` | 叠加在已清理凭据的父环境之上的显式子进程环境 |
49
49
  | `permissionMode` | `never` | 为本提供方实例的每个线程固定的原生非交互审批与沙箱模式 |
50
- | `disposeGraceMs` | `3000` | 共享进程树责任方各终止层级之间的宽限 |
50
+ | `disposeGraceMs` | `3000` | 共享 managed-range owner 各终止层级之间的宽限 |
51
51
 
52
52
  | `permissionMode` 值 | `thread/start` 字段 | 原生行为 |
53
53
  |---|---|---|
@@ -173,7 +173,7 @@ Codex 子级会在一个全新的临时线程中,以单个轮次接收这些
173
173
  - **静态选择实例**——Profile 配置项固定提供方名称、可选模型与工具绑定;调用无法动态选择或修改提供方与模型,而且每个公开工具都需要唯一的 `toolName`。
174
174
  - **身份验证与账户状态仍由原生机制管理**——Bundle 会提供 CLI,但不会创建账户、登录、信任项目或改写 Codex 设置;配置与身份验证失败会公开其生命周期阶段与安全的 `unknown` 回退,而不会增加单独的公开分类体系。
175
175
  - **委派时必须存在原生平台载荷**——省略 optional dependencies 的安装、不受支持的平台以及缺失或损坏的载荷都会在第一次运行时失败;不会回退到宿主 CLI。
176
- - **兼容性由开发证据锁定**——若要从已验证的 0.149.1 协议基线升级,必须重新生成上游 schema 证据,并重新运行握手、答案选择、审批、取消、无密钥真实产品以及带密钥的 DeepSeek 随机数测试。
176
+ - **兼容性由开发证据锁定**——若要从已验证的 0.153.4 协议基线升级,必须重新生成上游 schema 证据,并重新运行握手、答案选择、审批、取消、无密钥真实产品以及带密钥的 DeepSeek 随机数测试。
177
177
  - **没有人工审批路径**——已知的无人值守审批请求会被拒绝,未知服务器请求会以默认拒绝方式使运行失败;三种 Profile 模式都不会创建 DSH 交互通道或逐次调用 allow 策略。
178
178
  - **assistant 载荷仅包含最终文本**——失败运行可以额外公开独立的安全诊断;推理、过程说明、中间消息、工具通信、用量信息、原始 stderr 和工作区差异不会进入父会话,通用 Job id、通知与状态来自共享作业运行时。
179
179
  - **没有可选的共享能力**——对于本提供方,共享服务会拒绝 `agentOptions`、输出 schema、子任务角色设定、工具筛选和 harness 深度强制约束。
@@ -188,8 +188,8 @@ Codex 子级会在一个全新的临时线程中,以单个轮次接收这些
188
188
  本开发备注是维护者的工作上下文:开放问题与尚未决定的探索方向。它明确不具权威性——已交付的行为与限制以上文和包代码为准。
189
189
 
190
190
  - **载荷体积披露**——当前 darwin-arm64 平台载荷压缩后约 114 MB、解包后约 282 MB;这些是披露数字,不是安装阈值。
191
- - **版本锁定的协议**——运行时依赖锁定为 `@openai/codex@0.149.1`;升级需要重新生成上游 schema 证据并重新运行带凭证的随机数测试。
191
+ - **版本锁定的协议**——运行时依赖锁定为 `@openai/codex@0.153.4`;升级需要重新生成上游 schema 证据并重新运行带凭证的随机数测试。
192
192
 
193
193
  </details>
194
194
 
195
- **运行时不变式:** 不发布伴生入口。生命周期配对属于共享 subagent service,process-tree 所有权属于 subprocess service。
195
+ **运行时不变式:** 不发布伴生入口。生命周期配对属于共享 subagent service,受管范围的所有权属于 subprocess service。
package/lib/index.js CHANGED
@@ -9,7 +9,7 @@ import { brandString } from "@deepseek-ai/dsh-brand";
9
9
  import { JsonRpcLineTransport } from "@deepseek-ai/dsh-sdk-protocol";
10
10
  //#region lib/types/wire.js
11
11
  /**
12
- * Minimal Codex app-server 0.149.1 protocol adapter. The shared JSON-RPC
12
+ * Minimal Codex app-server 0.153.4 protocol adapter. The shared JSON-RPC
13
13
  * transport owns framing and request correlation; this module owns only the
14
14
  * product methods, current thread/turn association, unattended approval
15
15
  * responses, and terminal-answer selection.
@@ -521,7 +521,7 @@ var CodexAppServerWire = class {
521
521
  /**
522
522
  * One-shot Codex child lifecycle: spawn the real app-server through the
523
523
  * subprocess seam, publish only after initialization and ephemeral thread
524
- * creation, flatten post-publication failures, and dispose to whole-tree
524
+ * creation, flatten post-publication failures, and dispose to whole-range
525
525
  * quiescence.
526
526
  *
527
527
  * @module @deepseek-ai/dsh-subagent-codex/run
@@ -602,37 +602,31 @@ function textTask(prompt) {
602
602
  return texts;
603
603
  }
604
604
  /**
605
- * Close the private wire, terminate the managed process tree, and wait for the
606
- * subprocess owner to prove it is gone.
605
+ * Close the private wire, terminate the managed range, and wait for the
606
+ * subprocess owner to prove it is quiescent.
607
607
  * @param wire - private app-server protocol connection.
608
- * @param child - shared-service handle that owns the process tree.
608
+ * @param child - shared-service handle that owns the managed range.
609
609
  */
610
610
  async function disposeCodexChild(wire, child) {
611
611
  wire.close();
612
- if (child.pid > 0) {
613
- let outcome;
614
- child.done.then(
615
- (value) => {
616
- outcome = value;
617
- },
618
- /* v8 ignore next -- a positive pid excludes spawn-level done rejection. */
619
- () => {}
620
- );
621
- try {
622
- child.stdin?.end();
623
- } catch {}
624
- child.terminate();
625
- try {
626
- await child.waitForExit();
627
- } catch (error) {
628
- throw new CodexRunFailure({
629
- stage: "teardown",
630
- category: "unknown",
631
- outcome
632
- }, thrown(error));
633
- }
634
- await child.done;
635
- } else await child.done.catch(() => {});
612
+ let outcome;
613
+ child.done.then((value) => {
614
+ outcome = value;
615
+ }, () => {});
616
+ try {
617
+ child.stdin?.end();
618
+ } catch {}
619
+ child.terminate();
620
+ try {
621
+ await child.waitForExit();
622
+ } catch (error) {
623
+ throw new CodexRunFailure({
624
+ stage: "teardown",
625
+ category: "unknown",
626
+ outcome
627
+ }, thrown(error));
628
+ }
629
+ await child.done.catch(() => {});
636
630
  }
637
631
  /**
638
632
  * Start the real `codex app-server --stdio` child and publish its one-shot run.
@@ -23,7 +23,7 @@ export interface Config {
23
23
  env?: Record<string, string>;
24
24
  /** Native non-interactive permission mode fixed for this Provider instance. */
25
25
  permissionMode?: CodexPermissionMode;
26
- /** Grace in milliseconds for app-server process-tree termination. */
26
+ /** Grace in milliseconds between app-server managed-range termination tiers. */
27
27
  disposeGraceMs?: number;
28
28
  }
29
29
  export declare const Config: z<Config>;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * One-shot Codex child lifecycle: spawn the real app-server through the
3
3
  * subprocess seam, publish only after initialization and ephemeral thread
4
- * creation, flatten post-publication failures, and dispose to whole-tree
4
+ * creation, flatten post-publication failures, and dispose to whole-range
5
5
  * quiescence.
6
6
  *
7
7
  * @module @deepseek-ai/dsh-subagent-codex/run
@@ -39,7 +39,7 @@ export interface CodexRunSpec {
39
39
  readonly permissionMode: CodexPermissionMode;
40
40
  /** Explicit deployment/test environment layered after the shared scrub. */
41
41
  readonly env: Record<string, string>;
42
- /** Subprocess termination grace passed to the shared process-tree owner. */
42
+ /** Subprocess termination grace passed to the shared managed-range owner. */
43
43
  readonly disposeGraceMs: number;
44
44
  /** Shared subprocess service spawn operation. */
45
45
  readonly spawn: (spec: SubprocessSpawnSpec) => SubprocessHandle;
@@ -53,10 +53,10 @@ export interface CodexRunSpec {
53
53
  */
54
54
  export declare function textTask(prompt: readonly ContentBlock[]): string[];
55
55
  /**
56
- * Close the private wire, terminate the managed process tree, and wait for the
57
- * subprocess owner to prove it is gone.
56
+ * Close the private wire, terminate the managed range, and wait for the
57
+ * subprocess owner to prove it is quiescent.
58
58
  * @param wire - private app-server protocol connection.
59
- * @param child - shared-service handle that owns the process tree.
59
+ * @param child - shared-service handle that owns the managed range.
60
60
  */
61
61
  export declare function disposeCodexChild(wire: CodexAppServerWire, child: SubprocessHandle): Promise<void>;
62
62
  /**
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Minimal Codex app-server 0.149.1 protocol adapter. The shared JSON-RPC
2
+ * Minimal Codex app-server 0.153.4 protocol adapter. The shared JSON-RPC
3
3
  * transport owns framing and request correlation; this module owns only the
4
4
  * product methods, current thread/turn association, unattended approval
5
5
  * responses, and terminal-answer selection.
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.1.2-rc.1",
4
+ "version": "0.1.5-alpha.1",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -33,36 +33,36 @@
33
33
  }
34
34
  },
35
35
  "peerDependencies": {
36
- "@deepseek-ai/dsh-llm": "^0.1.2-rc.1",
37
36
  "@deepseek-ai/cordis": "^4.0.2",
38
- "@deepseek-ai/dsh-session": "^0.1.2-rc.1",
39
- "@deepseek-ai/dsh-subagent": "^0.1.2-rc.1",
40
- "@deepseek-ai/dsh-subprocess": "^0.1.2-rc.1",
41
- "@deepseek-ai/dsh-timeout": "^0.1.2-rc.1"
37
+ "@deepseek-ai/dsh-llm": "^0.1.5-alpha.1",
38
+ "@deepseek-ai/dsh-session": "^0.1.5-alpha.1",
39
+ "@deepseek-ai/dsh-subagent": "^0.1.5-alpha.1",
40
+ "@deepseek-ai/dsh-subprocess": "^0.1.5-alpha.1",
41
+ "@deepseek-ai/dsh-timeout": "^0.1.5-alpha.1"
42
42
  },
43
43
  "dependencies": {
44
- "@openai/codex": "0.149.1",
45
- "@deepseek-ai/dsh-sdk-protocol": "^0.1.2-rc.1",
46
- "@deepseek-ai/dsh-brand": "^0.1.2-rc.1",
44
+ "@openai/codex": "0.153.4",
45
+ "@deepseek-ai/dsh-brand": "^0.1.5-alpha.1",
46
+ "@deepseek-ai/dsh-sdk-protocol": "^0.1.5-alpha.1",
47
47
  "@deepseek-ai/schemastery": "^3.18.2"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@deepseek-ai/cordis": "^4.0.2",
51
51
  "@deepseek-ai/cordis-plugin-loader": "^1.0.3",
52
- "@deepseek-ai/dsh-agent": "^0.1.2-rc.1",
53
- "@deepseek-ai/dsh-app-boot": "^0.1.2-rc.1",
54
- "@deepseek-ai/dsh-loader-smoke": "^0.1.2-rc.1",
55
- "@deepseek-ai/dsh-session": "^0.1.2-rc.1",
56
- "@deepseek-ai/dsh-session-persistence-jsonl": "^0.1.2-rc.1",
57
- "@deepseek-ai/dsh-session-projection": "^0.1.2-rc.1",
58
- "@deepseek-ai/dsh-llm": "^0.1.2-rc.1",
59
- "@deepseek-ai/dsh-subprocess": "^0.1.2-rc.1",
60
- "@deepseek-ai/dsh-subprocess-local": "^0.1.2-rc.1",
61
- "@deepseek-ai/dsh-timeout": "^0.1.2-rc.1",
62
- "@deepseek-ai/dsh-tool-jobs": "^0.1.2-rc.1",
63
- "@deepseek-ai/dsh-subagent": "^0.1.2-rc.1",
64
- "@deepseek-ai/dsh-tools": "^0.1.2-rc.1",
65
- "@deepseek-ai/dsh-tool-subagent": "^0.1.2-rc.1",
66
- "@deepseek-ai/dsh-session-checkpoint-policy": "^0.1.2-rc.1"
52
+ "@deepseek-ai/dsh-agent": "^0.1.5-alpha.1",
53
+ "@deepseek-ai/dsh-llm": "^0.1.5-alpha.1",
54
+ "@deepseek-ai/dsh-loader-smoke": "^0.1.5-alpha.1",
55
+ "@deepseek-ai/dsh-app-boot": "^0.1.5-alpha.1",
56
+ "@deepseek-ai/dsh-session-checkpoint-policy": "^0.1.5-alpha.1",
57
+ "@deepseek-ai/dsh-session": "^0.1.5-alpha.1",
58
+ "@deepseek-ai/dsh-session-projection": "^0.1.5-alpha.1",
59
+ "@deepseek-ai/dsh-session-persistence-jsonl": "^0.1.5-alpha.1",
60
+ "@deepseek-ai/dsh-subagent": "^0.1.5-alpha.1",
61
+ "@deepseek-ai/dsh-subprocess": "^0.1.5-alpha.1",
62
+ "@deepseek-ai/dsh-subprocess-local": "^0.1.5-alpha.1",
63
+ "@deepseek-ai/dsh-timeout": "^0.1.5-alpha.1",
64
+ "@deepseek-ai/dsh-tool-jobs": "^0.1.5-alpha.1",
65
+ "@deepseek-ai/dsh-tool-subagent": "^0.1.5-alpha.1",
66
+ "@deepseek-ai/dsh-tools": "^0.1.5-alpha.1"
67
67
  }
68
68
  }