@deepseek-ai/dsh-tool-fs 0.2.1-rc.4 → 0.2.2-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
@@ -27,8 +27,8 @@
27
27
  en: 6903a9ca39cb9a71
28
28
  zh: a078377d02c3ab6f
29
29
  /deepseek-ai-dsh-tool-fs/use-this-package/policy-and-sandbox-behavior:
30
- en: 53d4ac2db089ef39
31
- zh: 214ea051ed56f500
30
+ en: 9bddebaf4aff0a8d
31
+ zh: fea0196162e3fcd1
32
32
  /deepseek-ai-dsh-tool-fs/use-this-package/failures-and-recovery:
33
33
  en: 962b09e21305a04b
34
34
  zh: 382d2b8cce217569
@@ -135,8 +135,8 @@
135
135
  en: f5d5f97a153f7c70
136
136
  zh: 3d6bc05b9eadfbc2
137
137
  /deepseek-ai-dsh-tool-fs/known-limitations-and-deferred-work:
138
- en: ce7a91d41d2f7597
139
- zh: d4a3c905e124fd7f
138
+ en: 28aadb772cdbc497
139
+ zh: a50e3bb6b4a8f645
140
140
  /deepseek-ai-dsh-tool-fs/known-limitations-and-deferred-work/dev-note:
141
141
  en: e67f633dc6fe7773
142
142
  zh: 3bb0c20c93f16f98
package/README.md CHANGED
@@ -75,7 +75,7 @@ With `fs-observation-policy` mounted and `read` disabled, `write` can still crea
75
75
 
76
76
  Path authorization for `read` and `read_image` belongs entirely to `ctx.fs`; media-type declarations and file signatures only decide whether `read_image` accepts the bytes returned by that backend.
77
77
 
78
- With the policy plugin mounted, `write` and `edit` obtain their guard from the `fs/*` intent slots, so an unread target or a stale observation fails with `FS_NOT_OBSERVED` or `FS_STALE_VERSION` and a recovery instruction. Under a confining backend (`fs-sandbox`), `write`/`edit` additionally advertise `sandbox_permissions` and `justification`; a denied mutation returns the `[sandbox: file access denied under <mode> mode]` marker with the same-turn escalation hint, and an approved retry may stamp a strictly wider mode for that one call. The justification asks the model to use the language of the current user request.
78
+ With the policy plugin mounted, `write` and `edit` obtain their guard from the `fs/*` intent slots, so an unread target or a stale observation fails with `FS_NOT_OBSERVED` or `FS_STALE_VERSION` and a recovery instruction. Under a confining backend (`fs-sandbox`), `write`/`edit` additionally advertise `sandbox_permissions` and `justification`; a denied mutation returns the `[sandbox: file access denied under <mode> mode]` marker with the same-turn escalation hint, and an approved retry may stamp a strictly wider mode for that one call. When `sandbox_permissions` is omitted or repeats the call's effective mode, `justification` may be omitted, empty, or whitespace-only; no approval is requested. A different mode still requires a non-empty reason, and widening requires approval. A non-empty reason without a mode is rejected. These exceptions do not bypass observation checks or filesystem denials. The justification asks the model to use the language of the current user request.
79
79
 
80
80
  ### Failures and recovery
81
81
 
@@ -250,7 +250,7 @@ These limits define when the tool suite is a poor fit or needs special operation
250
250
  - **No model-facing directory listing ships** — `ctx.fs.listDir` serves provider code such as skill discovery, while the sibling `dsh-tool-fs-search` package supplies ripgrep-backed `glob` and `grep` rather than extending the filesystem seam.
251
251
  - **`read` handles UTF-8 text files only** — images use the separate `read_image` tool; PDF, audio, and video remain deferred. A directory target is `FS_NOT_REGULAR_FILE`.
252
252
  - **Extension-declared media type** — an extension selects the declared type and the attachment store's magic-byte validation stays authoritative; a correctly formatted image under a wrong extension is refused with the rename remedy rather than sniffed. Only a path with no extension is identified from its file signature.
253
- - **Object paths re-enter source admission** — `read_image` on a normalized attachment object re-admits its bytes as a new source, so a deployment whose `maxImageBytes`/`maxMessageImageBytes` sit below the normalized-image byte budget can refuse an object path that `ctx.attachments.readImage` still serves; shipped defaults keep the normalized budget (4 MiB) far under the source caps (20 MiB).
253
+ - **Object paths re-enter source admission** — `read_image` on a normalized attachment object re-admits its bytes as a new source, so a deployment whose `maxImageBytes`/`maxMessageImageBytes` sit below the normalized-image byte budget can refuse an object path that `ctx.attachments.readImage` still serves; shipped defaults keep the normalized budget (4 MiB) far under the source caps (50 MiB).
254
254
  - **Inline image preview rides the UI composition** — the tool-result card renders the image through the browser's `tool.call.images` slot, which the attachment presentation plugin fills; a UI without that plugin shows the result's envelope text instead.
255
255
  - **No attachment-region tool** — an agent may crop an image through another available tool when it has a filesystem path; a pasted or dragged image without a path cannot be re-read at higher resolution.
256
256
  - **No timeout surface** — `read`/`write`/`edit` take no timeout argument and declare no timeout budget; cancellation rides `exec.signal` only ([provider rationale](../README.md)).
package/README.zh.md CHANGED
@@ -75,7 +75,7 @@ kind: "package-reference"
75
75
 
76
76
  `read` 与 `read_image` 的路径授权完全由 `ctx.fs` 负责;媒体类型声明和文件签名只决定 `read_image` 是否接受该后端返回的字节。
77
77
 
78
- 挂载策略插件后,`write` 与 `edit` 从 `fs/*` 意图槽位取得防护,因此未读目标或陈旧观察会以 `FS_NOT_OBSERVED` 或 `FS_STALE_VERSION` 及恢复指令失败。使用施加沙箱限制的后端(`fs-sandbox`)时,`write`/`edit` 还会公开 `sandbox_permissions` 与 `justification`;被拒绝的变更返回 `[sandbox: file access denied under <mode> mode]` 标记与同轮次升级提示,获批的重试可以在该次调用中加盖严格更宽的模式。理由字段提示模型使用用户当前提问的语言。
78
+ 挂载策略插件后,`write` 与 `edit` 从 `fs/*` 意图槽位取得防护,因此未读目标或陈旧观察会以 `FS_NOT_OBSERVED` 或 `FS_STALE_VERSION` 及恢复指令失败。使用施加沙箱限制的后端(`fs-sandbox`)时,`write`/`edit` 还会公开 `sandbox_permissions` 与 `justification`;被拒绝的变更返回 `[sandbox: file access denied under <mode> mode]` 标记与同轮次升级提示,获批的重试可以在该次调用中加盖严格更宽的模式。省略 `sandbox_permissions` 或重复当前调用的生效模式时,`justification` 可以省略、为空字符串或仅含空白,且不会请求审批。不同模式仍需非空理由,升权还需审批。没有模式却提供非空理由会被拒绝。这些例外不会绕过观察检查或文件系统拒绝。理由字段提示模型使用用户当前提问的语言。
79
79
 
80
80
  ### 失败与恢复
81
81
 
@@ -250,7 +250,7 @@ Read a file before editing it (the default fs-observation-policy requires it), u
250
250
  - **未交付面向模型的目录列表工具**:`ctx.fs.listDir` 服务于 skill(技能)发现等提供方代码,同级 `dsh-tool-fs-search` 包则提供基于 ripgrep 的 `glob` 与 `grep`,而不是扩展文件系统 seam。
251
251
  - **`read` 只处理 UTF-8 文本文件**:图像使用独立的 `read_image` 工具;PDF、音频和视频仍延期处理。目录目标为 `FS_NOT_REGULAR_FILE`。
252
252
  - **媒体类型按扩展名声明**:扩展名选择声明类型,附件存储的魔数校验保持权威;扩展名错误但格式正确的图像会得到改名修复提示,而不是被嗅探接受。只有没有扩展名的路径按文件签名识别格式。
253
- - **对象路径重新走源准入**:对规范化附件对象调用 `read_image` 会把其字节作为新来源重新准入,因此把 `maxImageBytes`/`maxMessageImageBytes` 配置得低于规范化图片字节预算的部署可能拒绝 `ctx.attachments.readImage` 仍可读取的对象路径;默认配置下规范化预算(4 MiB)远低于源上限(20 MiB)。
253
+ - **对象路径重新走源准入**:对规范化附件对象调用 `read_image` 会把其字节作为新来源重新准入,因此把 `maxImageBytes`/`maxMessageImageBytes` 配置得低于规范化图片字节预算的部署可能拒绝 `ctx.attachments.readImage` 仍可读取的对象路径;默认配置下规范化预算(4 MiB)远低于源上限(50 MiB)。
254
254
  - **内嵌图像预览依赖 UI 组合**:工具结果卡片经由浏览器的 `tool.call.images` 槽位渲染图像,由附件呈现插件填充;未组合该插件的 UI 改为显示结果的信封文本。
255
255
  - **没有附件区域工具**:agent 在拥有文件系统路径时可以通过其他可用工具裁剪图片;没有路径的粘贴或拖入图片无法按更高分辨率重新读取。
256
256
  - **没有超时接口**:`read`/`write`/`edit` 不接受超时参数,也不声明超时预算;取消只通过 `exec.signal` 传递(见[提供方理由](../README.zh.md))。
package/lib/index.js CHANGED
@@ -1121,10 +1121,11 @@ var FsSandboxController = class {
1121
1121
  /**
1122
1122
  * The policy to stamp onto this mutation: an approved escalation grant (a
1123
1123
  * strictly wider retry resolved through `ctx.approval` before anything
1124
- * executes), else the Session's standing mode. Repeating the standing mode
1125
- * requires no approval. The workspace root is the original Session
1126
- * directory, or the deployment fallback when absent. Validates the escalation argument
1127
- * pairing first.
1124
+ * executes), else the Session's standing mode. An omitted or repeated mode
1125
+ * permits an omitted or blank justification; repeating the mode needs no
1126
+ * approval. A different mode requires a non-empty justification, and a
1127
+ * non-empty justification without a mode is rejected. The workspace root is
1128
+ * the original Session directory, or the deployment fallback when absent.
1128
1129
  * @param toolName - the mutating tool's name, for the approval audit trail.
1129
1130
  * @param args - the call's escalation arguments.
1130
1131
  * @param exec - the tool-execution context (agent, callId, signal).
@@ -1132,8 +1133,10 @@ var FsSandboxController = class {
1132
1133
  * unsandboxed backend.
1133
1134
  */
1134
1135
  async resolvePolicy(toolName, args, exec) {
1135
- validateEscalationArgs(args.sandbox_permissions, args.justification);
1136
1136
  const standingPolicy = this.policy?.resolve({ ...exec.agent ? { session: exec.agent.session } : {} });
1137
+ if (args.sandbox_permissions !== void 0 && args.sandbox_permissions === standingPolicy?.mode) return standingPolicy;
1138
+ const justification = args.sandbox_permissions === void 0 && args.justification?.trim() === "" ? void 0 : args.justification;
1139
+ validateEscalationArgs(args.sandbox_permissions, justification);
1137
1140
  if (args.sandbox_permissions === void 0 || args.justification === void 0) return standingPolicy;
1138
1141
  if (this.escalationModes.length === 0) throw new Error("sandbox_permissions is not available in this composition (no sandboxing filesystem to escalate)");
1139
1142
  const policy = standingPolicy;
@@ -52,10 +52,11 @@ export declare class FsSandboxController {
52
52
  /**
53
53
  * The policy to stamp onto this mutation: an approved escalation grant (a
54
54
  * strictly wider retry resolved through `ctx.approval` before anything
55
- * executes), else the Session's standing mode. Repeating the standing mode
56
- * requires no approval. The workspace root is the original Session
57
- * directory, or the deployment fallback when absent. Validates the escalation argument
58
- * pairing first.
55
+ * executes), else the Session's standing mode. An omitted or repeated mode
56
+ * permits an omitted or blank justification; repeating the mode needs no
57
+ * approval. A different mode requires a non-empty justification, and a
58
+ * non-empty justification without a mode is rejected. The workspace root is
59
+ * the original Session directory, or the deployment fallback when absent.
59
60
  * @param toolName - the mutating tool's name, for the approval audit trail.
60
61
  * @param args - the call's escalation arguments.
61
62
  * @param exec - the tool-execution context (agent, callId, signal).
package/locale/de.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Tools zum Lesen und Schreiben von Dateien",
4
+ "description": "Lassen Sie die KI Arbeitsdateien lesen, erstellen und bearbeiten."
5
+ }
6
+ }
package/locale/es.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Herramientas de lectura y escritura de archivos.",
4
+ "description": "Deje que AI lea, cree y edite archivos de trabajo."
5
+ }
6
+ }
package/locale/fr.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Outils de lecture et d'écriture de fichiers",
4
+ "description": "Laissez l'IA lire, créer et modifier des fichiers de travail."
5
+ }
6
+ }
package/locale/ja.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "ファイル読み書きツール",
4
+ "description": "AI が作業ファイルを読み取り、作成、編集できます。"
5
+ }
6
+ }
package/locale/pt.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Ferramentas de leitura e gravação de arquivos",
4
+ "description": "Deixe a IA ler, criar e editar arquivos de trabalho."
5
+ }
6
+ }
package/locale/ru.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Инструменты чтения и записи файлов",
4
+ "description": "Позвольте ИИ читать, создавать и редактировать рабочие файлы."
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-tool-fs",
3
3
  "description": "Model-facing filesystem tools (read, write, edit) over the DeepSeek Harness filesystem seam (ctx.fs)",
4
- "version": "0.2.1-rc.4",
4
+ "version": "0.2.2-alpha.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -30,43 +30,46 @@
30
30
  "license": "MIT",
31
31
  "dependencies": {
32
32
  "diff": "^9.0.0",
33
- "@deepseek-ai/schemastery": "~3.18.5",
34
- "@deepseek-ai/dsh-util-code-language": "0.2.1-rc.4"
33
+ "@deepseek-ai/schemastery": "~3.18.6-alpha.1",
34
+ "@deepseek-ai/dsh-util-code-language": "0.2.2-alpha.2"
35
35
  },
36
36
  "peerDependencies": {
37
- "@deepseek-ai/dsh-attachment": "0.2.1-rc.4",
38
- "@deepseek-ai/dsh-fs": "0.2.1-rc.4",
39
- "@deepseek-ai/dsh-llm": "0.2.1-rc.4",
40
- "@deepseek-ai/dsh-sandbox": "0.2.1-rc.4",
41
- "@deepseek-ai/dsh-sandbox-policy": "0.2.1-rc.4",
42
- "@deepseek-ai/dsh-session": "0.2.1-rc.4",
43
- "@deepseek-ai/dsh-system-prompt": "0.2.1-rc.4",
44
- "@deepseek-ai/dsh-tools": "0.2.1-rc.4",
45
- "@deepseek-ai/dsh-user-approval": "0.2.1-rc.4",
46
- "@deepseek-ai/cordis": "~4.0.5",
47
- "@deepseek-ai/dsh-working-directory": "0.2.1-rc.4"
37
+ "@deepseek-ai/dsh-attachment": "0.2.2-alpha.2",
38
+ "@deepseek-ai/dsh-fs": "0.2.2-alpha.2",
39
+ "@deepseek-ai/dsh-llm": "0.2.2-alpha.2",
40
+ "@deepseek-ai/dsh-sandbox": "0.2.2-alpha.2",
41
+ "@deepseek-ai/dsh-sandbox-policy": "0.2.2-alpha.2",
42
+ "@deepseek-ai/dsh-session": "0.2.2-alpha.2",
43
+ "@deepseek-ai/dsh-system-prompt": "0.2.2-alpha.2",
44
+ "@deepseek-ai/dsh-tools": "0.2.2-alpha.2",
45
+ "@deepseek-ai/dsh-user-approval": "0.2.2-alpha.2",
46
+ "@deepseek-ai/cordis": "~4.0.6-alpha.1",
47
+ "@deepseek-ai/dsh-working-directory": "0.2.2-alpha.2"
48
48
  },
49
49
  "devDependencies": {
50
- "@deepseek-ai/dsh-agent": "0.2.1-rc.4",
51
- "@deepseek-ai/dsh-agent-loop": "0.2.1-rc.4",
52
- "@deepseek-ai/dsh-agent-loop-testkit": "0.2.1-rc.4",
53
- "@deepseek-ai/dsh-attachment": "0.2.1-rc.4",
54
- "@deepseek-ai/dsh-fs": "0.2.1-rc.4",
55
- "@deepseek-ai/dsh-fs-local": "0.2.1-rc.4",
56
- "@deepseek-ai/dsh-fs-observation-policy": "0.2.1-rc.4",
57
- "@deepseek-ai/dsh-llm": "0.2.1-rc.4",
58
- "@deepseek-ai/dsh-llm-deepseek": "0.2.1-rc.4",
59
- "@deepseek-ai/dsh-llm-deepseek-api-key": "0.2.1-rc.4",
60
- "@deepseek-ai/dsh-sandbox": "0.2.1-rc.4",
61
- "@deepseek-ai/dsh-sandbox-policy": "0.2.1-rc.4",
62
- "@deepseek-ai/dsh-session": "0.2.1-rc.4",
63
- "@deepseek-ai/dsh-system-prompt": "0.2.1-rc.4",
64
- "@deepseek-ai/dsh-tools": "0.2.1-rc.4",
65
- "@deepseek-ai/dsh-user-approval": "0.2.1-rc.4",
66
- "@deepseek-ai/cordis": "~4.0.5",
67
- "@deepseek-ai/dsh-session-projection": "0.2.1-rc.4",
68
- "@deepseek-ai/dsh-scope": "0.2.1-rc.4",
69
- "@deepseek-ai/dsh-ptc-runtime": "0.2.1-rc.4",
70
- "@deepseek-ai/dsh-working-directory": "0.2.1-rc.4"
50
+ "@deepseek-ai/dsh-agent": "0.2.2-alpha.2",
51
+ "@deepseek-ai/dsh-agent-loop": "0.2.2-alpha.2",
52
+ "@deepseek-ai/dsh-agent-loop-testkit": "0.2.2-alpha.2",
53
+ "@deepseek-ai/dsh-attachment": "0.2.2-alpha.2",
54
+ "@deepseek-ai/dsh-fs": "0.2.2-alpha.2",
55
+ "@deepseek-ai/dsh-fs-local": "0.2.2-alpha.2",
56
+ "@deepseek-ai/dsh-fs-observation-policy": "0.2.2-alpha.2",
57
+ "@deepseek-ai/dsh-llm": "0.2.2-alpha.2",
58
+ "@deepseek-ai/dsh-llm-deepseek": "0.2.2-alpha.2",
59
+ "@deepseek-ai/dsh-llm-deepseek-api-key": "0.2.2-alpha.2",
60
+ "@deepseek-ai/dsh-sandbox": "0.2.2-alpha.2",
61
+ "@deepseek-ai/dsh-sandbox-policy": "0.2.2-alpha.2",
62
+ "@deepseek-ai/dsh-session": "0.2.2-alpha.2",
63
+ "@deepseek-ai/dsh-system-prompt": "0.2.2-alpha.2",
64
+ "@deepseek-ai/dsh-tool-executor-native": "0.2.2-alpha.2",
65
+ "@deepseek-ai/dsh-tool-executor-ptc": "0.2.2-alpha.2",
66
+ "@deepseek-ai/dsh-tool-testkit": "0.2.2-alpha.2",
67
+ "@deepseek-ai/dsh-tools": "0.2.2-alpha.2",
68
+ "@deepseek-ai/dsh-user-approval": "0.2.2-alpha.2",
69
+ "@deepseek-ai/cordis": "~4.0.6-alpha.1",
70
+ "@deepseek-ai/dsh-session-projection": "0.2.2-alpha.2",
71
+ "@deepseek-ai/dsh-scope": "0.2.2-alpha.2",
72
+ "@deepseek-ai/dsh-ptc-runtime": "0.2.2-alpha.2",
73
+ "@deepseek-ai/dsh-working-directory": "0.2.2-alpha.2"
71
74
  }
72
75
  }