@deepseek-ai/dsh-sandbox 0.0.1-rc.1 → 0.0.1-rc.5
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 +2 -2
- package/README.md +3 -3
- package/README.zh.md +3 -3
- package/lib/index.js +1 -1
- package/lib/types/index.d.ts +4 -4
- package/package.json +9 -9
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/sandbox/sandbox/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: 6afa3d68f5a852af1f1b496b25238b09c055fdc2
|
|
6
|
+
README.zh.md: 2310f17f5a1711901b88dc7ee1a2bf956e79b6d1
|
package/README.md
CHANGED
|
@@ -8,9 +8,9 @@ The contract in one line: `ctx.sandbox.confine(argv, policy)` returns the argv t
|
|
|
8
8
|
|
|
9
9
|
Policy rides the call, not the provider: two consumers may confine under different policies at the same instant (bash under `read-only` while a confined child agent keeps its state directory writable), and an approved escalated retry is just a new call with a wider policy.
|
|
10
10
|
|
|
11
|
-
**Same-world confinement only.** A backend shares the host's filesystem and kernel (`bwrap`, Landlock, Seatbelt); `workspaceRoot` names the filesystem-canonical real host directory. Workspace identity is resolved before lexical normalization, so a valid cwd containing `symlink/..` grants the directory where `chdir` actually lands rather than an unrelated lexical parent. Containers, microVMs, and remote executors are NOT backends of this seam — they replace the Service providers for whole capability seams (`ctx.
|
|
11
|
+
**Same-world confinement only.** A backend shares the host's filesystem and kernel (`bwrap`, Landlock, Seatbelt); `workspaceRoot` names the filesystem-canonical real host directory. Workspace identity is resolved before lexical normalization, so a valid cwd containing `symlink/..` grants the directory where `chdir` actually lands rather than an unrelated lexical parent. Containers, microVMs, and remote executors are NOT backends of this seam — they replace the Service providers for whole capability seams (`ctx.shell`, `ctx.fs`) as environment-coherent groups. The boundary and its rationale: [the sandbox Agent Note](../../../.agents/notes/implemented/feature/2026-07-06-sandbox.md).
|
|
12
12
|
|
|
13
|
-
Implementations: [`@deepseek-ai/dsh-sandbox-local`](../sandbox-local/) (Linux: `bwrap`, else the per-platform Landlock launcher; macOS: `sandbox-exec`/Seatbelt). Consumers: [`@deepseek-ai/dsh-bash-sandbox`](../../
|
|
13
|
+
Implementations: [`@deepseek-ai/dsh-sandbox-local`](../sandbox-local/) (Linux: `bwrap`, else the per-platform Landlock launcher; macOS: `sandbox-exec`/Seatbelt). Consumers: [`@deepseek-ai/dsh-bash-sandbox`](../../shell/bash-sandbox/) (wraps `['bash', '-c', command]`).
|
|
14
14
|
|
|
15
15
|
## Model Experience
|
|
16
16
|
|
|
@@ -18,7 +18,7 @@ Implementations: [`@deepseek-ai/dsh-sandbox-local`](../sandbox-local/) (Linux: `
|
|
|
18
18
|
|
|
19
19
|
#### What the model sees
|
|
20
20
|
|
|
21
|
-
Through [`dsh-bash-sandbox`](../../
|
|
21
|
+
Through [`dsh-bash-sandbox`](../../shell/bash-sandbox/README.md) and [`dsh-tool-bash`](../../shell/tool-bash/README.md), failure to enforce a requested mode produces code `SANDBOX_UNAVAILABLE` and the exact error below. An execution-time runner failure adds ` Runner failure: <detail>`.
|
|
22
22
|
|
|
23
23
|
##### Exact error
|
|
24
24
|
|
package/README.zh.md
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
策略随调用传递,而不属于提供方:两个消费方可以同时按不同策略施加限制(bash 使用 `read-only`,而受限制的子 agent(智能体)保持其状态目录可写);获批的升权重试只是使用更宽策略发起的新调用。
|
|
10
10
|
|
|
11
|
-
**只支持与宿主共享文件系统和内核的限制。** 后端与宿主共享文件系统和内核(`bwrap`、Landlock、Seatbelt);`workspaceRoot` 指向文件系统规范化后的真实主机目录。系统先解析工作区所指的目录,再做词法规范化,因此包含 `symlink/..` 的有效 cwd 会授权 `chdir` 实际到达的目录,而非无关的词法父目录。容器、microVM 与远程执行器都不是该 seam 的后端:它们会以环境一致的分组替换整个能力 seam 的 Service provider(`ctx.
|
|
11
|
+
**只支持与宿主共享文件系统和内核的限制。** 后端与宿主共享文件系统和内核(`bwrap`、Landlock、Seatbelt);`workspaceRoot` 指向文件系统规范化后的真实主机目录。系统先解析工作区所指的目录,再做词法规范化,因此包含 `symlink/..` 的有效 cwd 会授权 `chdir` 实际到达的目录,而非无关的词法父目录。容器、microVM 与远程执行器都不是该 seam 的后端:它们会以环境一致的分组替换整个能力 seam 的 Service provider(`ctx.shell`、`ctx.fs`)。边界及其设计理由见[沙箱 Agent Note](../../../.agents/notes/implemented/feature/2026-07-06-sandbox.md)。
|
|
12
12
|
|
|
13
|
-
实现:[`@deepseek-ai/dsh-sandbox-local`](../sandbox-local/)(Linux:`bwrap`,否则使用相应平台的 Landlock launcher;macOS:`sandbox-exec`/Seatbelt)。消费方:[`@deepseek-ai/dsh-bash-sandbox`](../../
|
|
13
|
+
实现:[`@deepseek-ai/dsh-sandbox-local`](../sandbox-local/)(Linux:`bwrap`,否则使用相应平台的 Landlock launcher;macOS:`sandbox-exec`/Seatbelt)。消费方:[`@deepseek-ai/dsh-bash-sandbox`](../../shell/bash-sandbox/)(包装 `['bash', '-c', command]`)。
|
|
14
14
|
|
|
15
15
|
## 模型体验
|
|
16
16
|
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
#### 模型看到的内容
|
|
20
20
|
|
|
21
|
-
通过 [`dsh-bash-sandbox`](../../
|
|
21
|
+
通过 [`dsh-bash-sandbox`](../../shell/bash-sandbox/README.md) 和 [`dsh-tool-bash`](../../shell/tool-bash/README.md),无法强制执行所请求模式时会产生错误码 `SANDBOX_UNAVAILABLE` 及以下精确错误。执行期 runner 失败会追加 ` Runner failure: <detail>`。
|
|
22
22
|
|
|
23
23
|
##### 精确错误
|
|
24
24
|
|
package/lib/index.js
CHANGED
|
@@ -192,7 +192,7 @@ var SandboxUnavailableError = class extends HarnessError {
|
|
|
192
192
|
* skipped for a sole candidate, whose own refusal remains the fail-closed end.
|
|
193
193
|
*/
|
|
194
194
|
var SandboxProvider = class extends Service {
|
|
195
|
-
/* v8 ignore next --
|
|
195
|
+
/* v8 ignore next -- abstract service construction is covered through concrete provider packages. */
|
|
196
196
|
constructor(ctx) {
|
|
197
197
|
super(ctx, "sandbox");
|
|
198
198
|
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -31,10 +31,10 @@ export interface SandboxExecutionPolicy {
|
|
|
31
31
|
workspaceRoot: string;
|
|
32
32
|
/**
|
|
33
33
|
* Opaque identity of the calling session (the branded `dsh-session`
|
|
34
|
-
* SessionId). Backends key per-session state off it (e.g.
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* calls, which fall back to per-call backend state.
|
|
34
|
+
* SessionId). Backends key per-session state off it (e.g. windows-acl gives
|
|
35
|
+
* each live session/workspace pair a random private temp directory and SID,
|
|
36
|
+
* while the workspace SID and standing grant remain per-workspace); absent
|
|
37
|
+
* for agentless calls, which fall back to per-call backend state.
|
|
38
38
|
*/
|
|
39
39
|
sessionId?: SessionId;
|
|
40
40
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-sandbox",
|
|
3
3
|
"description": "Abstract process-sandbox seam (ctx.sandbox) for the DeepSeek Harness: same-world confinement vocabulary and the SandboxProvider contract",
|
|
4
|
-
"version": "0.0.1-rc.
|
|
4
|
+
"version": "0.0.1-rc.5",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "restricted"
|
|
7
7
|
},
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
],
|
|
33
33
|
"license": "BSD-3-Clause",
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@deepseek-ai/dsh-invariants": "^0.0.1-rc.
|
|
36
|
-
"@deepseek-ai/dsh-llm": "^0.0.1-rc.
|
|
37
|
-
"@deepseek-ai/dsh-session": "^0.0.1-rc.
|
|
38
|
-
"@deepseek-ai/cordis": "^4.0.1-rc.
|
|
35
|
+
"@deepseek-ai/dsh-invariants": "^0.0.1-rc.5",
|
|
36
|
+
"@deepseek-ai/dsh-llm": "^0.0.1-rc.5",
|
|
37
|
+
"@deepseek-ai/dsh-session": "^0.0.1-rc.5",
|
|
38
|
+
"@deepseek-ai/cordis": "^4.0.1-rc.4"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@deepseek-ai/dsh-invariants": "^0.0.1-rc.
|
|
42
|
-
"@deepseek-ai/dsh-llm": "^0.0.1-rc.
|
|
43
|
-
"@deepseek-ai/dsh-session": "^0.0.1-rc.
|
|
44
|
-
"@deepseek-ai/cordis": "^4.0.1-rc.
|
|
41
|
+
"@deepseek-ai/dsh-invariants": "^0.0.1-rc.5",
|
|
42
|
+
"@deepseek-ai/dsh-llm": "^0.0.1-rc.5",
|
|
43
|
+
"@deepseek-ai/dsh-session": "^0.0.1-rc.5",
|
|
44
|
+
"@deepseek-ai/cordis": "^4.0.1-rc.4"
|
|
45
45
|
}
|
|
46
46
|
}
|