@deepseek-ai/dsh-sandbox-local 0.1.3-alpha.2 → 0.1.5-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/sandbox/sandbox-local/README.md
5
- README.md: 3cc3c27be2ff04f2ac4c0c541f675acf49c67aee
6
- README.zh.md: 57c8c3d6e67f3b88ddb507a8d8b574c1291c3d7c
5
+ README.md: 33853b68407c2d3294ad1323e47b5473419b0e12
6
+ README.zh.md: 8d62c20c65e2d7555844a1ba81e13694c5c6a8df
package/README.md CHANGED
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
9
9
 
10
10
  ## Summary
11
11
 
12
- `dsh-sandbox-local` provides the platform confinement backends behind `ctx.sandbox`: Linux runs commands under `bwrap` when that works, otherwise under the Landlock launcher; macOS uses Seatbelt (`sandbox-exec`); Windows uses the ACL restricted-token runner. It selects one runner per host, so every command — and everything it spawns — runs confined. When no runner is usable the provider fails closed with `SANDBOX_UNAVAILABLE` — a command never silently runs unconfined. Each wrap reports how completely the backend enforces the mode (`full` or `partial`) plus the backend's denial signatures, so consumers can tell a broken sandbox apart from a denied command. Mount it behind `ctx.sandbox` with a confined executor to give every bash or pwsh call a confined default.
12
+ `dsh-sandbox-local` confines commands and their descendants on Linux, macOS, and Windows while sharing the host kernel and filesystem. It chooses a supported platform runner automatically and fails with `SANDBOX_UNAVAILABLE` when none is usable, so commands never silently run without confinement. Each execution reports `full` or `partial` enforcement plus denial and runner-failure signatures, allowing callers to distinguish an unavailable or broken sandbox from a policy denial. Choose it for host-local bash or pwsh execution; use a container or remote executor when the process needs an isolated environment.
13
13
 
14
14
  ## Table of Contents
15
15
 
@@ -74,7 +74,7 @@ Selection is by platform first, probes second: each platform has a runner chain
74
74
 
75
75
  The bwrap profile combines a read-only host root, a fresh `/dev`, and `/proc` from a private PID namespace — commands manage their descendants but cannot see host processes, so procfs magic links cannot bypass the mounts; `workspace-write` adds an ephemeral `/tmp` and a writable workspace bind. The [private-PID note](../../../.agents/notes/implemented/bug-fix/2026-08-06-bwrap-private-pid-namespace.md) records the boundary.
76
76
 
77
- The Landlock launcher ships as an npm-distributed native addon (`@deepseek-ai/node-addon-landlock-run`) that supplies the platform launcher, functional probe, and grant vocabulary; this provider maps mode to grants only, keeping path resolution and probe parsing with the versioned binary.
77
+ The `@deepseek-ai/node-addon-system/landlock-run` API supplies the platform launcher, functional probe, and grant vocabulary; this provider maps mode to grants only, keeping path resolution and probe parsing with the versioned binary.
78
78
 
79
79
  The Seatbelt profile is allow-default with `(deny file-write*)` plus write allow-lists derived from the shared `writableRoots` helper, so exactly the mode's promised file effects are governed; every root is canonicalized because Seatbelt matches resolved paths (`/tmp` IS `/private/tmp`).
80
80
 
package/README.zh.md CHANGED
@@ -9,7 +9,7 @@ kind: "package-reference"
9
9
 
10
10
  ## 概述
11
11
 
12
- `dsh-sandbox-local` 提供 `ctx.sandbox` 背后的平台隔离后端:Linux 在 `bwrap` 可用时用其运行命令,否则使用 Landlock launcher;macOS 使用 Seatbelt(`sandbox-exec`);Windows 使用 ACL 受限令牌 runner。它每台主机选择一个 runner,因此每条命令及其派生的所有进程都在限制下运行。没有可用 runner 时,提供方以 `SANDBOX_UNAVAILABLE` 快速失败——命令绝不会静默无限制运行。每次包装都会报告后端对模式的强制执行完整度(`full` 或 `partial`)及后端的拒绝签名,因此消费方可以区分损坏的沙箱与被拒绝的命令。在 `ctx.sandbox` 后挂载它并配一个受限执行器,即可让每次 bash 或 pwsh 调用都有受限默认值。
12
+ `dsh-sandbox-local` 在共享宿主内核和文件系统的同时,限制 Linux、macOS 与 Windows 上的命令及其派生进程。它自动选择受支持的平台 runner;没有可用 runner 时以 `SANDBOX_UNAVAILABLE` 失败,因此命令绝不会静默无限制运行。每次执行都会报告 `full` 或 `partial` 强制执行,以及拒绝和 runner 失败签名,让调用方能区分不可用或损坏的沙箱与策略拒绝。宿主本地 bash 或 pwsh 执行适合选择它;进程需要隔离环境时应改用容器或远程执行器。
13
13
 
14
14
  ## 目录
15
15
 
@@ -74,7 +74,7 @@ kind: "package-reference"
74
74
 
75
75
  bwrap profile 组合只读宿主根目录、全新 `/dev` 与私有 PID 命名空间中的 `/proc`——命令可管理其后代,但看不到宿主进程,因此 procfs 魔法链接无法绕过挂载;`workspace-write` 另加临时的 `/tmp` 与可写工作区绑定挂载。[私有 PID 笔记](../../../.agents/notes/implemented/bug-fix/2026-08-06-bwrap-private-pid-namespace.zh.md)记录该边界。
76
76
 
77
- Landlock launcher 以 npm 分发的原生插件(`@deepseek-ai/node-addon-landlock-run`)提供平台 launcher、功能探测与授权词汇;此提供方只做模式到授权的映射,把路径解析与探测解析保留在带版本的 binary 中。
77
+ `@deepseek-ai/node-addon-system/landlock-run` API 提供平台 launcher、功能探测与授权词汇;此提供方只做模式到授权的映射,把路径解析与探测解析保留在带版本的 binary 中。
78
78
 
79
79
  Seatbelt profile 默认允许,带 `(deny file-write*)` 与来自共享 `writableRoots` 辅助函数的写入 allow-list,因此恰好管辖模式承诺的文件操作;每个根目录都经过规范化,因为 Seatbelt 匹配解析后的路径(`/tmp` 就是 `/private/tmp`)。
80
80
 
package/lib/index.js CHANGED
@@ -3,7 +3,7 @@ import { existsSync, mkdtempSync, rmSync } from "node:fs";
3
3
  import { tmpdir } from "node:os";
4
4
  import { join } from "node:path";
5
5
  import { fileURLToPath } from "node:url";
6
- import { LAUNCHER_BIN, LAUNCHER_FAILURE_EXIT, grantArgs, launcherPath, probe } from "@deepseek-ai/node-addon-landlock-run";
6
+ import { LAUNCHER_BIN, LAUNCHER_FAILURE_EXIT, grantArgs, launcherPath, probe } from "@deepseek-ai/node-addon-system/landlock-run";
7
7
  import z from "@deepseek-ai/schemastery";
8
8
  import { SandboxProvider, SandboxUnavailableError, writableRoots } from "@deepseek-ai/dsh-sandbox";
9
9
  import { AclWriteGrant, assertTempRootOutsideWorkspace, tempWriteSid, workspaceWriteSid } from "@deepseek-ai/dsh-sandbox-windows-acl";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-sandbox-local",
3
3
  "description": "Local process-sandbox backends for the DeepSeek Harness sandbox seam: bwrap, the npm-distributed landlock-run launcher, macOS Seatbelt, or the Windows ACL restricted-token runner — functionally probed, fail-closed",
4
- "version": "0.1.3-alpha.2",
4
+ "version": "0.1.5-alpha.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -27,21 +27,21 @@
27
27
  ],
28
28
  "license": "MIT",
29
29
  "peerDependencies": {
30
+ "@deepseek-ai/dsh-sandbox": "^0.1.5-alpha.2",
31
+ "@deepseek-ai/dsh-session": "^0.1.5-alpha.2",
30
32
  "@deepseek-ai/cordis": "^4.0.2",
31
- "@deepseek-ai/dsh-llm": "^0.1.3-alpha.2",
32
- "@deepseek-ai/dsh-sandbox": "^0.1.3-alpha.2",
33
- "@deepseek-ai/dsh-session": "^0.1.3-alpha.2"
33
+ "@deepseek-ai/dsh-llm": "^0.1.5-alpha.2"
34
34
  },
35
35
  "dependencies": {
36
- "@deepseek-ai/dsh-sandbox-windows-acl": "^0.1.3-alpha.2",
37
- "@deepseek-ai/dsh-util-values": "^0.1.3-alpha.2",
38
- "@deepseek-ai/node-addon-landlock-run": "^0.1.1",
36
+ "@deepseek-ai/dsh-util-values": "^0.1.5-alpha.2",
37
+ "@deepseek-ai/node-addon-system": "^0.1.2",
38
+ "@deepseek-ai/dsh-sandbox-windows-acl": "^0.1.5-alpha.2",
39
39
  "@deepseek-ai/schemastery": "^3.18.2"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@deepseek-ai/cordis": "^4.0.2",
43
- "@deepseek-ai/dsh-llm": "^0.1.3-alpha.2",
44
- "@deepseek-ai/dsh-sandbox": "^0.1.3-alpha.2",
45
- "@deepseek-ai/dsh-session": "^0.1.3-alpha.2"
43
+ "@deepseek-ai/dsh-llm": "^0.1.5-alpha.2",
44
+ "@deepseek-ai/dsh-sandbox": "^0.1.5-alpha.2",
45
+ "@deepseek-ai/dsh-session": "^0.1.5-alpha.2"
46
46
  }
47
47
  }