@deepseek-ai/dsh-shell 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/shell/shell/README.md
5
- README.md: dd3eeb45af432e6fdbb9a0aa688d8a5c3c58bbb1
6
- README.zh.md: 8767aad9795494c6a996c7063778b1a816362e16
5
+ README.md: 35daabef167f0d1276382b5b024a610d810488c6
6
+ README.zh.md: e964c3982ad266f1b3123d839b9b51734c23e67b
package/README.md CHANGED
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
9
9
 
10
10
  ## Summary
11
11
 
12
- `dsh-shell` defines the executor service (`ctx.shell`) that runs shell commands for the harness: foreground commands that resolve with bounded output when they finish, and background processes that return a handle immediately. Every shell executor in the repository — local Bash, sandboxed Bash, local PowerShell, sandboxed PowerShell implements this one contract, so the model-facing `bash` and `pwsh` tools work unchanged over any of them. Callers pass a request and receive a fully-resolved spec with explicit defaults and caps before any command runs. The service itself never renders anything to a model; the shell tools own all model-visible output and sandbox guidance.
12
+ Use `ctx.shell` to run foreground shell commands with bounded output or start background processes that return a handle immediately. A profile can select local or sandboxed Bash or PowerShell execution without changing callers. Resolve each request before execution to make the working directory, timeout, and output limits explicit. Command completion, nonzero exits, timeouts, and caller aborts return results; only infrastructure failures reject, while the `bash` and `pwsh` tools own model-visible rendering and sandbox guidance.
13
13
 
14
14
  ## Table of Contents
15
15
 
@@ -38,7 +38,7 @@ console.log(result.exitCode, result.stdout.text)
38
38
 
39
39
  ### Background processes
40
40
 
41
- Call `start` with a resolved spec to launch a background process; it returns a handle immediately and no timeout applies. Read output incrementally with `readOutput()` — consecutive reads never repeat output, and lossy reads point at full-stream spill files. Kill the process group with `kill()` (returns `false` once it has finished) and await `done` for settlement. Job ids, ownership, polling, and notices belong to the generic `ctx.jobs` runtime, where the tool layer registers the handle.
41
+ Call `start` with a resolved spec to launch a background process; it returns a handle immediately and no timeout applies. Read output incrementally with `readOutput()` — consecutive reads never repeat output, and lossy reads point at full-stream spill files. Terminate the provider-managed range with `kill()` (returns `false` once the direct command has finished) and await `done` for direct-command settlement. Job ids, ownership, polling, and notices belong to the generic `ctx.jobs` runtime, where the tool layer registers the handle.
42
42
 
43
43
  ### Requests and resolved specs
44
44
 
@@ -91,7 +91,7 @@ The package is one role of a standard capability seam: the Service Definition th
91
91
 
92
92
  ### Background lifecycle and ownership
93
93
 
94
- A background process belongs to the subprocess service, not to the executor: it survives an executor-only reload and is killed and joined when the composition tears down. Implementations must honor the seam's semantics — `run` rejects only for infrastructure failures; `start` returns immediately with no timeout and its `done` never rejects (spawn failures settle as `killed` with the error on stderr); `readOutput` is consuming and lossy reads report spill files.
94
+ A background process belongs to the subprocess service, not to the executor: it survives an executor-only reload and is killed and joined when the composition tears down. Implementations must honor the seam's semantics — `run` rejects only for infrastructure failures; `start` returns immediately with no timeout and its `done` never rejects (a subprocess provider rejection settles as `killed` with a stage-neutral error on stderr); `readOutput` is consuming and lossy reads report spill files.
95
95
 
96
96
  </details>
97
97
 
package/README.zh.md CHANGED
@@ -9,7 +9,7 @@ kind: "package-reference"
9
9
 
10
10
  ## 概述
11
11
 
12
- `dsh-shell` 定义运行 shell 命令的执行器服务(`ctx.shell`):前台命令在结束时以有界输出 resolve,后台进程则立即返回句柄。仓库中的每个 shell 执行器——本地 Bash、沙箱 Bash、本地 PowerShell、沙箱 PowerShell——都实现这同一个约定,因此面向模型的 `bash` `pwsh` 工具在任何一个之上都能不加改动地工作。调用方先提交请求,再在任何命令运行前拿到一份默认值与上限都已显式填好的 spec。该服务本身从不向模型渲染任何内容;所有模型可见的输出与沙箱指引都归 shell 工具所有。
12
+ 使用 `ctx.shell` 运行以有界输出结束的前台 shell 命令,或启动立即返回句柄的后台进程。配置文件可选择本地或沙箱化的 Bash PowerShell 执行方式,而无需更改调用方。执行前解析每个请求,以显式确定工作目录、超时和输出上限。命令完成、非零退出、超时和调用方中止都会作为结果返回;只有基础设施故障才会 reject,而模型可见的渲染与沙箱指引由 `bash` `pwsh` 工具负责。
13
13
 
14
14
  ## 目录
15
15
 
@@ -38,7 +38,7 @@ console.log(result.exitCode, result.stdout.text)
38
38
 
39
39
  ### 后台进程
40
40
 
41
- 用已解析的 spec 调用 `start` 即可启动后台进程;它会立即返回句柄,且不应用任何超时。用 `readOutput()` 增量读取输出——连续读取绝不会重复交付,有损读取会指向完整流的 spill 文件。用 `kill()` 终止进程组(进程结束后返回 `false`),并等待 `done` 结算。job id、所有权、轮询与通知属于通用 `ctx.jobs` 运行时,工具层会把句柄注册进去。
41
+ 用已解析的 spec 调用 `start` 即可启动后台进程;它会立即返回句柄,且不应用任何超时。用 `readOutput()` 增量读取输出——连续读取绝不会重复交付,有损读取会指向完整流的 spill 文件。用 `kill()` 终止提供方管理的 range(直接命令结束后返回 `false`),并等待 `done` 完成直接命令结算。job id、所有权、轮询与通知属于通用 `ctx.jobs` 运行时,工具层会把句柄注册进去。
42
42
 
43
43
  ### 请求与已解析 spec
44
44
 
@@ -91,7 +91,7 @@ seam 本身不是执行器:每个组合只挂载一个提供方,工具即可
91
91
 
92
92
  ### 后台生命周期与归属
93
93
 
94
- 后台进程属于 subprocess 服务而非执行器:它能在仅重载执行器后存活,并在组合拆解时被终止并 join。实现必须遵守 seam 的语义——`run` 只在基础设施失败时 reject;`start` 立即返回且不设超时,其 `done` 绝不 reject(spawn 失败以 `killed` 结算,错误进入 stderr);`readOutput` 是消费式的,有损读取会报告 spill 文件。
94
+ 后台进程属于 subprocess 服务而非执行器:它能在仅重载执行器后存活,并在组合拆解时被终止并 join。实现必须遵守 seam 的语义——`run` 只在基础设施失败时 reject;`start` 立即返回且不设超时,其 `done` 绝不 reject(subprocess provider rejection 以 `killed` 结算,并把不声明阶段的错误写入 stderr);`readOutput` 是消费式的,有损读取会报告 spill 文件。
95
95
 
96
96
  </details>
97
97
 
@@ -156,7 +156,10 @@ export interface ShellProcess {
156
156
  exitCode: number | null;
157
157
  /** Terminating signal name, when signal-killed. */
158
158
  signal: NodeJS.Signals | null;
159
- /** Resolves when the underlying process closes (never rejects — a spawn failure settles as `killed` with the error on stderr). */
159
+ /**
160
+ * Resolves when the underlying process settles (never rejects — provider
161
+ * rejection settles as `killed` with a stage-neutral error on stderr).
162
+ */
160
163
  readonly done: Promise<void>;
161
164
  /** Sandbox facts, stamped once a confined process settles. */
162
165
  sandbox?: ShellSandboxInfo;
@@ -167,7 +170,7 @@ export interface ShellProcess {
167
170
  */
168
171
  readOutput(): ShellProcessRead;
169
172
  /**
170
- * Kill the process group. Returns false when it had already finished
173
+ * Terminate the provider-managed range. Returns false when it had already finished
171
174
  * (no-op); idempotent.
172
175
  */
173
176
  kill(): boolean;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-shell",
3
3
  "description": "Abstract bash executor seam (ctx.shell) for the DeepSeek Harness",
4
- "version": "0.1.2-rc.1",
4
+ "version": "0.1.5-alpha.1",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -27,15 +27,15 @@
27
27
  ],
28
28
  "license": "MIT",
29
29
  "peerDependencies": {
30
- "@deepseek-ai/dsh-subprocess": "^0.1.2-rc.1",
31
- "@deepseek-ai/dsh-sandbox": "^0.1.2-rc.1",
30
+ "@deepseek-ai/dsh-sandbox": "^0.1.5-alpha.1",
31
+ "@deepseek-ai/dsh-settings": "^0.1.5-alpha.1",
32
32
  "@deepseek-ai/cordis": "^4.0.2",
33
- "@deepseek-ai/dsh-settings": "^0.1.2-rc.1"
33
+ "@deepseek-ai/dsh-subprocess": "^0.1.5-alpha.1"
34
34
  },
35
35
  "devDependencies": {
36
- "@deepseek-ai/dsh-subprocess": "^0.1.2-rc.1",
37
- "@deepseek-ai/dsh-sandbox": "^0.1.2-rc.1",
36
+ "@deepseek-ai/dsh-subprocess": "^0.1.5-alpha.1",
37
+ "@deepseek-ai/dsh-sandbox": "^0.1.5-alpha.1",
38
38
  "@deepseek-ai/cordis": "^4.0.2",
39
- "@deepseek-ai/dsh-settings": "^0.1.2-rc.1"
39
+ "@deepseek-ai/dsh-settings": "^0.1.5-alpha.1"
40
40
  }
41
41
  }