@deepseek-ai/dsh-fs 0.0.1-rc.2 → 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 +4 -4
- package/lib/index.js +1 -1
- package/lib/types/index.d.ts +1 -1
- package/package.json +11 -11
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/fs/fs/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: 7bde7d4d64005a6bdd0f0ac974bf45e5450e4207
|
|
6
|
+
README.zh.md: 7efb03609f862f6d4ee6d796cc099df4a8ef7287
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ This package owns the Service Definition and provider contract layer of the four
|
|
|
9
9
|
| Layer | Package | Role |
|
|
10
10
|
|---|---|---|
|
|
11
11
|
| tool / executor | `@deepseek-ai/dsh-tool-fs` | model-facing `read`/`write`/`edit` schemas + read windowing + text rendering; reads/writes/edits via `ctx.fs`, dispatches the `fs/*` events |
|
|
12
|
-
| policy | `@deepseek-ai/dsh-fs-policy` | observed-state + read-before-edit + version-guarded write/edit, contributed through the `fs/*` event gate (no service) |
|
|
12
|
+
| policy | `@deepseek-ai/dsh-fs-observation-policy` | observed-state + read-before-edit + version-guarded write/edit, contributed through the `fs/*` event gate (no service) |
|
|
13
13
|
| provider contract | `@deepseek-ai/dsh-fs` (this) | `ctx.fs`: execution-world paths, text IO, and atomic mutation primitives (optional version guard); owns the `fs/*` event vocabulary |
|
|
14
14
|
| provider | `@deepseek-ai/dsh-fs-local` | the host-filesystem implementation |
|
|
15
15
|
|
|
@@ -38,11 +38,11 @@ The mutation runs inside the backend's per-target lock either way, so an uncondi
|
|
|
38
38
|
|
|
39
39
|
## The `fs/*` policy events
|
|
40
40
|
|
|
41
|
-
This package declares three events (see the generated region of [filesystem.md](../../../docs/subsystems/filesystem.md#cordis-surface)) so the emitter (`@deepseek-ai/dsh-tool-fs`) and the policy listener (`@deepseek-ai/dsh-fs-policy`) share a vocabulary without the emitter depending on the policy plugin. `fs/write-intent` and `fs/edit-intent` are single-slot decision waterfalls (the listener fully decides, never calling `next()`); `fs/observed` is a fire-and-forget recording event carrying an `FsObservation` discriminated union: present with a version or confirmed absent. They carry only `dsh-fs` vocabulary plus an opaque `object` actor — no model-facing concepts and no agent/session owner structure.
|
|
41
|
+
This package declares three events (see the generated region of [filesystem.md](../../../docs/subsystems/filesystem.md#cordis-surface)) so the emitter (`@deepseek-ai/dsh-tool-fs`) and the policy listener (`@deepseek-ai/dsh-fs-observation-policy`) share a vocabulary without the emitter depending on the policy plugin. `fs/write-intent` and `fs/edit-intent` are single-slot decision waterfalls (the listener fully decides, never calling `next()`); `fs/observed` is a fire-and-forget recording event carrying an `FsObservation` discriminated union: present with a version or confirmed absent. They carry only `dsh-fs` vocabulary plus an opaque `object` actor — no model-facing concepts and no agent/session owner structure.
|
|
42
42
|
|
|
43
43
|
## A provider contract, not the policy layer
|
|
44
44
|
|
|
45
|
-
`ctx.fs` is deliberately close to fsspec-style storage primitives — half a level above byte-level `cat`/`open`, because it decodes text and rejects binaries so the policy layer never touches raw bytes. It owns UTF-8 decoding, binary rejection, atomic writes, and the literal-edit critical section. It does **not** own line windows, numbered lines, rendered footers, or observed-state. Observed-state, read-before-edit, and version-guarded write/edit are policy a plugin (`@deepseek-ai/dsh-fs-policy`) ADDS by supplying the optional guard — not provider behavior — so a sandboxed/remote backend inherits no model-facing observation policy.
|
|
45
|
+
`ctx.fs` is deliberately close to fsspec-style storage primitives — half a level above byte-level `cat`/`open`, because it decodes text and rejects binaries so the policy layer never touches raw bytes. It owns UTF-8 decoding, binary rejection, atomic writes, and the literal-edit critical section. It does **not** own line windows, numbered lines, rendered footers, or observed-state. Observed-state, read-before-edit, and version-guarded write/edit are policy a plugin (`@deepseek-ai/dsh-fs-observation-policy`) ADDS by supplying the optional guard — not provider behavior — so a sandboxed/remote backend inherits no model-facing observation policy.
|
|
46
46
|
|
|
47
47
|
`editText` stays on this seam (not composed in the policy layer from a read plus a write) because version guard + literal match + atomic rewrite must stay inside one critical section for correct error attribution and one-wins/one-stale concurrency, and a remote backend may implement it as a native compare-and-edit.
|
|
48
48
|
|
package/README.zh.md
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
**`FileSystem`**(`ctx.fs`)定义同一个执行世界中的存储原语,包括解析路径、公开规范化进程路径与文件 URI、检查包含关系、完整或流式读取文本、有界读取原始字节、检查/列出元数据、原子写入和应用字面量编辑,但不规定实现方式。两个变更操作都**可选** 接收版本防护,因此 `ctx.fs` 本身就是完整且不受约束的存储 seam。本包还拥有由工具分派、政策插件监听的 `fs/*` 政策事件词汇。
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
本包拥有四层文件系统栈中的 Service Definition 和提供方约定层;该拆分使每个关注点可以独立演进和替换(见[能力 seam Agent Note](../../../.agents/notes/implemented/architecture/2026-06-13-capability-seams.md)、[文件系统能力 seam Agent Note](../../../.agents/notes/implemented/architecture/2026-06-17-filesystem-capability-seam.md)、[拆分文件系统 seam Agent Note](../../../.agents/notes/implemented/simplification/2026-06-26-fsspec-style-fs-seam.md)和[文件上下文事件门禁 Agent Note](../../../.agents/notes/implemented/architecture/2026-06-26-file-context-as-event-gate.md)):
|
|
8
8
|
|
|
9
9
|
| 层 | 包 | 角色 |
|
|
10
10
|
|---|---|---|
|
|
11
11
|
| 工具/执行器 | `@deepseek-ai/dsh-tool-fs` | 面向模型的 `read`/`write`/`edit` schema、读取窗口和文本渲染;通过 `ctx.fs` 读取/写入/编辑,并分派 `fs/*` 事件 |
|
|
12
|
-
| 政策 | `@deepseek-ai/dsh-fs-policy` | 已观察状态、编辑前读取和版本防护的写入/编辑,通过 `fs/*` 事件门禁贡献(无服务) |
|
|
12
|
+
| 政策 | `@deepseek-ai/dsh-fs-observation-policy` | 已观察状态、编辑前读取和版本防护的写入/编辑,通过 `fs/*` 事件门禁贡献(无服务) |
|
|
13
13
|
| 提供方约定 | `@deepseek-ai/dsh-fs`(本包) | `ctx.fs`:执行世界路径、文本 I/O 与原子变更原语(可选版本防护);拥有 `fs/*` 事件词汇 |
|
|
14
14
|
| 提供方 | `@deepseek-ai/dsh-fs-local` | 宿主文件系统实现 |
|
|
15
15
|
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
|
|
39
39
|
## `fs/*` 政策事件
|
|
40
40
|
|
|
41
|
-
本包声明三个事件(见 [filesystem.md](../../../docs/subsystems/filesystem.md#cordis-surface) 的生成区块),使发出方(`@deepseek-ai/dsh-tool-fs`)和政策监听器(`@deepseek-ai/dsh-fs-policy`)共享词汇,而无需让发出方依赖政策插件。`fs/write-intent` 和 `fs/edit-intent` 是单槽决策 waterfall
|
|
41
|
+
本包声明三个事件(见 [filesystem.md](../../../docs/subsystems/filesystem.md#cordis-surface) 的生成区块),使发出方(`@deepseek-ai/dsh-tool-fs`)和政策监听器(`@deepseek-ai/dsh-fs-observation-policy`)共享词汇,而无需让发出方依赖政策插件。`fs/write-intent` 和 `fs/edit-intent` 是单槽决策 waterfall(瀑布式事件)(监听器完整决策,绝不调用 `next()`);`fs/observed` 是发后即忘的记录事件,携带 `FsObservation` 可辨识联合:存在并带有版本,或确认缺失。它们只携带 `dsh-fs` 词汇和一个不透明 `object` 参与者,不含面向模型的概念或 agent(智能体)/会话所有者结构。
|
|
42
42
|
|
|
43
43
|
## 提供方约定,不是政策层
|
|
44
44
|
|
|
45
|
-
`ctx.fs` 有意接近 fsspec 风格的存储原语,比字节级 `cat`/`open` 高半层,因为它会解码文本并拒绝二进制,使政策层绝不接触原始字节。它负责 UTF-8 解码、二进制拒绝、原子写入和字面量编辑临界区。它**不** 负责行窗口、编号行、渲染 footer 或已观察状态。已观察状态、编辑前读取和版本防护的写入/编辑属于插件(`@deepseek-ai/dsh-fs-policy`)通过提供可选防护而添加的政策,并非提供方行为,因此沙箱化/远程后端不会继承任何面向模型的观察政策。
|
|
45
|
+
`ctx.fs` 有意接近 fsspec 风格的存储原语,比字节级 `cat`/`open` 高半层,因为它会解码文本并拒绝二进制,使政策层绝不接触原始字节。它负责 UTF-8 解码、二进制拒绝、原子写入和字面量编辑临界区。它**不** 负责行窗口、编号行、渲染 footer 或已观察状态。已观察状态、编辑前读取和版本防护的写入/编辑属于插件(`@deepseek-ai/dsh-fs-observation-policy`)通过提供可选防护而添加的政策,并非提供方行为,因此沙箱化/远程后端不会继承任何面向模型的观察政策。
|
|
46
46
|
|
|
47
47
|
`editText` 留在该 seam 上,不由政策层通过读取加写入组合,因为版本防护、字面量匹配和原子重写必须处于同一临界区内,才能正确归因错误并实现一方胜出/一方陈旧的并发;远程后端也可以将其实现为原生比较并编辑操作。
|
|
48
48
|
|
package/lib/index.js
CHANGED
|
@@ -63,7 +63,7 @@ var FileSystem = class extends Service {
|
|
|
63
63
|
* The sandbox mode this backend enforces on mutations BY DEFAULT, or
|
|
64
64
|
* `undefined` when it does not confine at all — the capability fact the tool
|
|
65
65
|
* layer reads to advertise the escalation fields honestly (mirrors
|
|
66
|
-
* `
|
|
66
|
+
* `ShellExecutor.sandboxMode`). The base class and the bare local backend
|
|
67
67
|
* report `undefined`; a sandboxing backend (`@deepseek-ai/dsh-fs-sandbox`)
|
|
68
68
|
* overrides it with the deployment default. A session override may make the
|
|
69
69
|
* effective mode narrower or wider, so strict escalation widening is checked
|
package/lib/types/index.d.ts
CHANGED
|
@@ -64,7 +64,7 @@ export declare abstract class FileSystem extends Service {
|
|
|
64
64
|
* The sandbox mode this backend enforces on mutations BY DEFAULT, or
|
|
65
65
|
* `undefined` when it does not confine at all — the capability fact the tool
|
|
66
66
|
* layer reads to advertise the escalation fields honestly (mirrors
|
|
67
|
-
* `
|
|
67
|
+
* `ShellExecutor.sandboxMode`). The base class and the bare local backend
|
|
68
68
|
* report `undefined`; a sandboxing backend (`@deepseek-ai/dsh-fs-sandbox`)
|
|
69
69
|
* overrides it with the deployment default. A session override may make the
|
|
70
70
|
* effective mode narrower or wider, so strict escalation widening is checked
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-fs",
|
|
3
3
|
"description": "Abstract filesystem capability seam (ctx.fs) for the DeepSeek Harness — vocabulary types, the FileSystem service (text IO + optional version-guarded atomic mutations), and the fs/* policy event vocabulary",
|
|
4
|
-
"version": "0.0.1-rc.
|
|
4
|
+
"version": "0.0.1-rc.5",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "restricted"
|
|
7
7
|
},
|
|
@@ -32,17 +32,17 @@
|
|
|
32
32
|
],
|
|
33
33
|
"license": "BSD-3-Clause",
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@deepseek-ai/dsh-
|
|
36
|
-
"@deepseek-ai/dsh-
|
|
37
|
-
"@deepseek-ai/dsh-sandbox": "^0.0.1-rc.
|
|
38
|
-
"@deepseek-ai/cordis": "^4.0.1-rc.
|
|
39
|
-
"@deepseek-ai/dsh-
|
|
35
|
+
"@deepseek-ai/dsh-invariants": "^0.0.1-rc.5",
|
|
36
|
+
"@deepseek-ai/dsh-llm": "^0.0.1-rc.5",
|
|
37
|
+
"@deepseek-ai/dsh-sandbox": "^0.0.1-rc.5",
|
|
38
|
+
"@deepseek-ai/cordis": "^4.0.1-rc.4",
|
|
39
|
+
"@deepseek-ai/dsh-brand": "^0.0.1-rc.5"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@deepseek-ai/dsh-
|
|
43
|
-
"@deepseek-ai/dsh-
|
|
44
|
-
"@deepseek-ai/dsh-
|
|
45
|
-
"@deepseek-ai/
|
|
46
|
-
"@deepseek-ai/
|
|
42
|
+
"@deepseek-ai/dsh-invariants": "^0.0.1-rc.5",
|
|
43
|
+
"@deepseek-ai/dsh-llm": "^0.0.1-rc.5",
|
|
44
|
+
"@deepseek-ai/dsh-brand": "^0.0.1-rc.5",
|
|
45
|
+
"@deepseek-ai/cordis": "^4.0.1-rc.4",
|
|
46
|
+
"@deepseek-ai/dsh-sandbox": "^0.0.1-rc.5"
|
|
47
47
|
}
|
|
48
48
|
}
|