@x1a0f3n9/dsh-fs-local 0.1.5-alpha.2 → 0.1.5-rc.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/fs/fs-local/README.md
5
- README.md: 427cf02631f9d56246851f7fc67c92dd662c2a62
6
- README.zh.md: 7009d9dd853b5443780978036792f10ebc9706b5
5
+ README.md: d8f1afaa59e8313c553ceb1ea4e94cec17eaca10
6
+ README.zh.md: 7daa9143a4b7455446b2238889524089a8172ea1
package/README.md CHANGED
@@ -50,9 +50,9 @@ The generated [configuration catalog](../../../docs/config-catalog.md#deepseek-a
50
50
 
51
51
  ### What you can do
52
52
 
53
- Read any regular UTF-8 text file whole or as a stream, read raw bytes up to a cap you choose or as one byte window, and list one directory level in stable name order. Create or replace a file atomically, and apply a literal text edit atomically; both mutations serialize per file, so concurrent writers never interleave. The version guard is optional: omit it for unconditional create-or-overwrite, or supply it to fail when the file changed since you last observed it.
53
+ Read any regular UTF-8 text file whole or as a stream, read raw bytes up to a cap you choose or in a byte window, and list one directory level in stable name order. Create or replace a file atomically, and apply a literal text edit atomically; both mutations serialize per file, so concurrent writers never interleave. The version guard is optional: omit it for unconditional create-or-overwrite, or supply it to fail when the file changed since you last observed it.
54
54
 
55
- Failures are typed `FsError`s with stable codes — `FS_NOT_FOUND`, `FS_NOT_TEXT` (binary content), `FS_STALE_VERSION` (changed since observation), `FS_EDIT_NOT_FOUND` or `FS_AMBIGUOUS_EDIT` (no unique literal match), and others — so callers branch on the code, never on message text. A missing target on a guarded edit reports `FS_STALE_VERSION` either way.
55
+ Failures are typed `FsError`s with stable codes — `FS_NOT_FOUND`, `FS_NOT_TEXT` (binary content), `FS_STALE_VERSION` (changed since observation), `FS_EDIT_NOT_FOUND` or `FS_AMBIGUOUS_EDIT` (no unique literal match), and others — so callers branch on the code, never on message text. A missing target on an edit reports `FS_STALE_VERSION` whether or not the version guard is supplied.
56
56
 
57
57
  -----
58
58
 
package/README.zh.md CHANGED
@@ -29,7 +29,7 @@ kind: "package-reference"
29
29
 
30
30
  ### 何时选择
31
31
 
32
- 普通宿主文件访问请选择 `fs-local`。会话的写入与编辑必须限制在工作区与临时根目录内时,选择 [`fs-sandbox`](../fs-sandbox/README.zh.md)——它扩展此后端,只增加模式围栏。文件必须位于与子进程共享的远程执行世界时,选择 [`fs-e2b`](../../e2b/fs-e2b/README.zh.md)。`config.cwd` 只是解析默认值,不是约束边界:绝对路径与 `..` 都可以逃逸它。
32
+ 在单个进程中进行普通宿主文件访问时,请选择 `fs-local`。会话的写入与编辑必须限制在工作区与临时根目录内时,选择 [`fs-sandbox`](../fs-sandbox/README.zh.md)——它扩展此后端,只增加模式围栏。文件必须位于与子进程共享的远程执行世界时,选择 [`fs-e2b`](../../e2b/fs-e2b/README.zh.md)。`config.cwd` 只是解析默认值,不是约束边界:绝对路径与 `..` 都可以逃逸它。
33
33
 
34
34
  ### 最小配置
35
35
 
@@ -46,13 +46,13 @@ kind: "package-reference"
46
46
  | `cwd` | `process.cwd()` | 相对路径的基准目录 |
47
47
  | `diffBasisMaxBytes` | `10 MiB` | 每次覆写 diff 一侧的 UTF-8 字节上限;更大的覆写返回 `before: null` |
48
48
 
49
- 生成的[配置目录](../../../docs/config-catalog.zh.md#deepseek-aidsh-fs-local)是每个受支持字段及其 JSDoc 的穷尽式真源。
49
+ 生成的[配置目录](../../../docs/config-catalog.zh.md#deepseek-aidsh-fs-local)完整列出了所有受支持字段及其 JSDoc。
50
50
 
51
51
  ### 你能做什么
52
52
 
53
53
  完整或流式读取任意普通 UTF-8 文本文件,按你选择的上限或按字节窗口读取原始字节,并按稳定名称顺序列出一层目录。原子地创建或替换文件,并原子地应用字面量文本编辑;两个变更操作都按文件串行化,并发写入方绝不会交错。版本防护是可选的:省略它即无条件创建或覆盖,提供它则在文件自上次观察以来发生变化时失败。
54
54
 
55
- 失败是携带稳定错误码的类型化 `FsError`——`FS_NOT_FOUND`、`FS_NOT_TEXT`(二进制内容)、`FS_STALE_VERSION`(自观察以来已变化)、`FS_EDIT_NOT_FOUND` 或 `FS_AMBIGUOUS_EDIT`(无唯一字面量匹配)等——因此调用方依据错误码分支,绝不解析消息文本。带防护的编辑遇到缺失目标时,无论哪种情况都报告 `FS_STALE_VERSION`。
55
+ 失败是携带稳定错误码的类型化 `FsError`——`FS_NOT_FOUND`、`FS_NOT_TEXT`(二进制内容)、`FS_STALE_VERSION`(自观察以来已变化)、`FS_EDIT_NOT_FOUND` 或 `FS_AMBIGUOUS_EDIT`(无唯一字面量匹配)等——因此调用方依据错误码分支,绝不解析消息文本。编辑遇到缺失目标时,无论是否提供版本防护,都报告 `FS_STALE_VERSION`。
56
56
 
57
57
  -----
58
58
 
@@ -69,8 +69,8 @@ kind: "package-reference"
69
69
  后端建立在三个想法之上:
70
70
 
71
71
  - **Realpath 身份。** `targetKey` 是文件的 `realpath`,因此经符号链接到达同一文件的两个输入路径共享一个身份,写入落在链接目标上,同时保留链接。
72
- - **原子发布。** 写入先写入目标旁私有暂存目录内的独占临时文件,执行 fsync 后发布;现有文件的 mode 会保留,Windows 上的 DACL 也会在替换后存活。
73
- - **单一变更临界区。** 每目标 FIFO 锁串行化读取→防护→写入窗口,并发写入与编辑因此被确定性排序——一方胜出,其余看到新版本并以陈旧拒绝。
72
+ - **原子发布。** 写入先写入目标旁私有暂存目录内的独占临时文件,执行 fsync 后发布;现有文件的 mode 会保留,Windows 上的 DACL 在替换后也会保留。
73
+ - **单一变更临界区。** 每目标 FIFO 锁串行化读取→防护→写入窗口,并发写入与编辑因此被确定性排序——一方胜出,其余操作看到新版本后因版本陈旧而被拒绝。
74
74
 
75
75
  ### 源码地图
76
76
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@x1a0f3n9/dsh-fs-local",
3
3
  "description": "Local-filesystem implementation of the DeepSeek Harness filesystem seam (ctx.fs)",
4
- "version": "0.1.5-alpha.2",
4
+ "version": "0.1.5-rc.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -27,7 +27,7 @@
27
27
  ],
28
28
  "license": "MIT",
29
29
  "peerDependencies": {
30
- "@x1a0f3n9/dsh-fs": "^0.1.5-alpha.2",
30
+ "@x1a0f3n9/dsh-fs": "^0.1.5-rc.2",
31
31
  "@deepseek-ai/cordis": "^4.0.2"
32
32
  },
33
33
  "dependencies": {
@@ -35,8 +35,8 @@
35
35
  "@deepseek-ai/schemastery": "^3.18.2"
36
36
  },
37
37
  "devDependencies": {
38
- "@x1a0f3n9/dsh-fs": "^0.1.5-alpha.2",
39
- "@x1a0f3n9/dsh-llm": "^0.1.5-alpha.2",
38
+ "@x1a0f3n9/dsh-fs": "^0.1.5-rc.2",
39
+ "@x1a0f3n9/dsh-llm": "^0.1.5-rc.2",
40
40
  "@deepseek-ai/cordis": "^4.0.2"
41
41
  }
42
42
  }