@deepseek-ai/dsh-tool-fs 0.2.1-alpha.1 → 0.2.1-alpha.3
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 +14 -14
- package/README.md +15 -6
- package/README.zh.md +15 -6
- package/lib/index.js +86 -67
- package/lib/types/diff.d.ts +6 -0
- package/lib/types/index.d.ts +9 -1
- package/lib/types/mutation-result.d.ts +18 -0
- package/lib/types/read-image.d.ts +1 -0
- package/lib/types/read-target.d.ts +1 -1
- package/lib/types/sandbox.d.ts +3 -3
- package/lib/types/session-cwd.d.ts +9 -17
- package/locale/en.json +5 -0
- package/locale/zh.json +6 -0
- package/package.json +38 -34
package/README.i18n.yaml
CHANGED
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
en: d152484eb41ac6b4
|
|
16
16
|
zh: 09388d293f9be9cb
|
|
17
17
|
/deepseek-ai-dsh-tool-fs/use-this-package:
|
|
18
|
-
en:
|
|
19
|
-
zh:
|
|
18
|
+
en: c7da73c9e2691ea1
|
|
19
|
+
zh: 0eba82c1c3553ab9
|
|
20
20
|
/deepseek-ai-dsh-tool-fs/use-this-package/minimal-composition:
|
|
21
21
|
en: eb21d89a3ecbd2d4
|
|
22
22
|
zh: f05ccbb1e7515f32
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
en: 29a1d47e9677f2a3
|
|
25
25
|
zh: 0ae3c794cc7c54db
|
|
26
26
|
/deepseek-ai-dsh-tool-fs/use-this-package/configuration:
|
|
27
|
-
en:
|
|
28
|
-
zh:
|
|
27
|
+
en: 6903a9ca39cb9a71
|
|
28
|
+
zh: a078377d02c3ab6f
|
|
29
29
|
/deepseek-ai-dsh-tool-fs/use-this-package/policy-and-sandbox-behavior:
|
|
30
30
|
en: 53d4ac2db089ef39
|
|
31
31
|
zh: 214ea051ed56f500
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
en: 454b5291db9ba847
|
|
40
40
|
zh: 9fe7081dfb416c93
|
|
41
41
|
/deepseek-ai-dsh-tool-fs/understand-the-implementation/source-map:
|
|
42
|
-
en:
|
|
43
|
-
zh:
|
|
42
|
+
en: ec1517d657fbce14
|
|
43
|
+
zh: be0038b88f7b68fc
|
|
44
44
|
/deepseek-ai-dsh-tool-fs/understand-the-implementation/per-tool-flow:
|
|
45
45
|
en: d741e01be9fddb76
|
|
46
46
|
zh: 7aa1d7ca719a4aac
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
en: cf78b9dd5596495f
|
|
58
58
|
zh: bd44560f8c2435e8
|
|
59
59
|
/deepseek-ai-dsh-tool-fs/model-experience/system-prompt/what-the-model-sees:
|
|
60
|
-
en:
|
|
61
|
-
zh:
|
|
60
|
+
en: f715f25f411d50f5
|
|
61
|
+
zh: 4063a0499dc47466
|
|
62
62
|
/deepseek-ai-dsh-tool-fs/model-experience/system-prompt/what-the-model-sees/read-guidance:
|
|
63
63
|
en: f8961df3f3a6a671
|
|
64
64
|
zh: 85c7bd418b40b089
|
|
@@ -90,8 +90,8 @@
|
|
|
90
90
|
en: ebd38733c0490428
|
|
91
91
|
zh: b45101c325efe784
|
|
92
92
|
/deepseek-ai-dsh-tool-fs/model-experience/read-result/what-the-model-sees:
|
|
93
|
-
en:
|
|
94
|
-
zh:
|
|
93
|
+
en: 8f7a10746df88c03
|
|
94
|
+
zh: d4fab398b14db940
|
|
95
95
|
/deepseek-ai-dsh-tool-fs/model-experience/read-result/token-effect:
|
|
96
96
|
en: 4269b4368622ec2f
|
|
97
97
|
zh: f4df80c1fb6972f1
|
|
@@ -102,8 +102,8 @@
|
|
|
102
102
|
en: 9dac44e6d0b9d8de
|
|
103
103
|
zh: 7bc4dc1c5df39eaf
|
|
104
104
|
/deepseek-ai-dsh-tool-fs/model-experience/image-read-result/what-the-model-sees:
|
|
105
|
-
en:
|
|
106
|
-
zh:
|
|
105
|
+
en: 9b5070a15f565c20
|
|
106
|
+
zh: 96043df8c0ae7f76
|
|
107
107
|
/deepseek-ai-dsh-tool-fs/model-experience/image-read-result/token-effect:
|
|
108
108
|
en: 68bd5255f1c9ca48
|
|
109
109
|
zh: 0474213531c1aae3
|
|
@@ -114,8 +114,8 @@
|
|
|
114
114
|
en: 1b3b6cfa3605d0b4
|
|
115
115
|
zh: 78e37c2aa4f76d54
|
|
116
116
|
/deepseek-ai-dsh-tool-fs/model-experience/write-and-edit-results/what-the-model-sees:
|
|
117
|
-
en:
|
|
118
|
-
zh:
|
|
117
|
+
en: 816b07ebfddab5f8
|
|
118
|
+
zh: 0e80580a5902c7ed
|
|
119
119
|
/deepseek-ai-dsh-tool-fs/model-experience/write-and-edit-results/token-effect:
|
|
120
120
|
en: fb4d0b17a99f49cf
|
|
121
121
|
zh: 17460a2a5d72f6cc
|
package/README.md
CHANGED
|
@@ -25,6 +25,8 @@ Use `dsh-tool-fs` to let a model read UTF-8 files with line numbers, read suppor
|
|
|
25
25
|
<a id="use-this-package"></a>
|
|
26
26
|
## Use this package
|
|
27
27
|
|
|
28
|
+
Relative paths use the Session's current working directory. A directory change affects subsequent reads and mutations without changing sandbox permission roots. Successful results return the canonical absolute path from `fs.processPath`, and root result metadata retains that operation-time path for replay and navigation.
|
|
29
|
+
|
|
28
30
|
Mount the tools after a `ctx.fs` backend and, for read-before-write/edit behavior, the policy plugin. The model then gets line-numbered reads, atomic writes and edits, and — with an attachment store mounted — image reads; every result is capped, and failures carry stable codes with recovery instructions.
|
|
29
31
|
|
|
30
32
|
### Minimal composition
|
|
@@ -52,10 +54,14 @@ Field names are snake_case to match Claude Code and existing harness tool schema
|
|
|
52
54
|
|
|
53
55
|
### Configuration
|
|
54
56
|
|
|
55
|
-
All keys are optional
|
|
57
|
+
All keys are optional. The `read`, `readImage`, `write`, and `edit` switches default to `true`; set a switch to `false` to omit that tool and its guidance. All four may be disabled. Enabling `readImage` still requires an attachment store and an image-capable model. Read caps remain validated when `read` is disabled.
|
|
56
58
|
|
|
57
59
|
| Key | Default | Meaning |
|
|
58
60
|
|---|---|---|
|
|
61
|
+
| `read` | `true` | Register `read` and its guidance |
|
|
62
|
+
| `readImage` | `true` | Register `read_image` while an attachment store is mounted |
|
|
63
|
+
| `write` | `true` | Register `write` and its guidance |
|
|
64
|
+
| `edit` | `true` | Register `edit` and its guidance |
|
|
59
65
|
| `readLimit` | `2000` | Default and maximum lines returned by one `read` call |
|
|
60
66
|
| `readMaxLineLength` | `2000` | Characters kept per line before truncation |
|
|
61
67
|
| `readMaxBytes` | `51200` | Byte cap on one `read` call's selected lines; overflow ends the window with a capped footer |
|
|
@@ -63,6 +69,8 @@ All keys are optional; the defaults are the shipped read caps.
|
|
|
63
69
|
|
|
64
70
|
The generated [configuration catalog](../../../docs/config-catalog.md#deepseek-aidsh-tool-fs) is the exhaustive source for every accepted field and its JSDoc.
|
|
65
71
|
|
|
72
|
+
With `fs-observation-policy` mounted and `read` disabled, `write` can still create files, and successful writes or edits record the versions needed for later mutations in that session. Existing unobserved files remain protected; disabling `read` does not relax the policy. Another filesystem reader must emit `fs/observed` for an existing file to become observed.
|
|
73
|
+
|
|
66
74
|
### Policy and sandbox behavior
|
|
67
75
|
|
|
68
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.
|
|
@@ -99,6 +107,7 @@ The tools are the executor; policy is an event gate. The tools inject no policy
|
|
|
99
107
|
| [`src/read-render.ts`](src/read-render.ts) | Cordis-free windowing and envelope formatting |
|
|
100
108
|
| [`src/sandbox.ts`](src/sandbox.ts) | Escalation API shared by `write`/`edit`: policy resolution and denial-marker mapping |
|
|
101
109
|
| [`src/error.ts`](src/error.ts) | Stable model-facing diagnostics for guarded-mutation failures |
|
|
110
|
+
| [`src/mutation-result.ts`](src/mutation-result.ts) | Successful mutation observation and canonical result paths |
|
|
102
111
|
|
|
103
112
|
### Per-tool flow
|
|
104
113
|
|
|
@@ -133,12 +142,12 @@ Read these pages when the package-level contract is not enough. They move from t
|
|
|
133
142
|
|
|
134
143
|
#### What the model sees
|
|
135
144
|
|
|
136
|
-
At assembly time, each guidance section checks `ctx.tools.get(name, scope)` and renders only while its tool is visible to that agent. The write paragraph recommends edit only while edit is visible. The text below is unchanged when all three tools are available; restrictions, their removal, and tool registration changes take effect on the next assembly. The same check works for direct agent restrictions and subagent
|
|
145
|
+
At assembly time, each guidance section checks `ctx.tools.get(name, scope)` and renders only while its tool is visible to that agent. The write paragraph recommends edit only while edit is visible. The text below is unchanged when all three tools are available; restrictions, their removal, and tool registration changes take effect on the next assembly. The same check works for direct agent restrictions and historical subagent filters restored from descriptors, including PTC capabilities behind `run_code`. The read-before-mutation sentences in write/edit describe the observation policy, not a requirement to invoke the tool named `read`. They remain when `read` is hidden: the policy still guards mutations, and another observing operation, such as `str_replace_editor` with `command: view`, can establish the same file observation. Tool visibility does not disable that precondition.
|
|
137
146
|
|
|
138
147
|
##### Read guidance
|
|
139
148
|
|
|
140
149
|
```markdown
|
|
141
|
-
Use the read tool — not shell commands like cat — to inspect text files. Use offset and limit to continue
|
|
150
|
+
Use the read tool — not shell commands like cat, sed, head, or tail — to inspect text files. Use offset and limit to read a line range or continue a large file.
|
|
142
151
|
```
|
|
143
152
|
|
|
144
153
|
##### Write guidance
|
|
@@ -179,7 +188,7 @@ Prefix-stable while the visible tool definitions and order are unchanged. Regist
|
|
|
179
188
|
|
|
180
189
|
#### What the model sees
|
|
181
190
|
|
|
182
|
-
A successful read is exactly `<path><
|
|
191
|
+
A successful read is exactly `<path><resolvedPath></path>`, newline, `<type>file</type>`, newline, `<content>`, numbered lines as `<lineNumber>: <text>`, a blank line, one footer, and `</content>`. The footer is exactly `(Output capped. Showing lines <start>-<end>. Use offset=<next> to continue.)`, `(Showing lines <start>-<end> of <total>. Use offset=<next> to continue.)`, or `(End of file - total <total> lines)`. A long line ends exactly `... (line truncated to <max> chars)`. A missing read still returns `FS_NOT_FOUND`, but it records confirmed absence for the calling session; after an externally deleted file is re-read, a retried `write` can safely recreate it through the provider's no-replace guard.
|
|
183
192
|
|
|
184
193
|
#### Token effect
|
|
185
194
|
|
|
@@ -193,7 +202,7 @@ Append-only; newly visible content follows the reusable request prefix and does
|
|
|
193
202
|
|
|
194
203
|
#### What the model sees
|
|
195
204
|
|
|
196
|
-
A successful `read_image` returns `<path><
|
|
205
|
+
A successful `read_image` returns `<path><resolvedPath></path>`, `<type>image</type>`, and a `<content>` envelope naming the media type, normalized dimensions, and byte size, followed by the image itself as a native image block. The result is logged with its durable reference before the next model request.
|
|
197
206
|
|
|
198
207
|
#### Token effect
|
|
199
208
|
|
|
@@ -207,7 +216,7 @@ Append-only; newly visible content follows the reusable request prefix and does
|
|
|
207
216
|
|
|
208
217
|
#### What the model sees
|
|
209
218
|
|
|
210
|
-
Write returns the exact five-line envelope `<path><
|
|
219
|
+
Write returns the exact five-line envelope `<path><resolvedPath></path>`, `<type>file</type>`, `<content>`, `Created file` or `Updated file`, then `</content>`. Edit returns exactly `The file <resolvedPath> has been updated successfully.` or, for `replace_all`, `The file <resolvedPath> has been updated. All occurrences were successfully replaced.` The full write or replacement text remains in the assistant tool-call arguments.
|
|
211
220
|
|
|
212
221
|
#### Token effect
|
|
213
222
|
|
package/README.zh.md
CHANGED
|
@@ -25,6 +25,8 @@ kind: "package-reference"
|
|
|
25
25
|
<a id="use-this-package"></a>
|
|
26
26
|
## 使用本包
|
|
27
27
|
|
|
28
|
+
相对路径使用 Session 的当前工作目录。切换目录会影响后续读取和修改,但不会改变沙箱权限根目录。成功结果返回 `fs.processPath` 提供的规范化绝对路径,根调用结果元数据保留该操作发生时的路径,用于回放和导航。
|
|
29
|
+
|
|
28
30
|
在 `ctx.fs` 后端之后挂载工具,并在需要先读后写/编辑行为时挂载策略插件。模型随后获得带行号的读取、原子的写入与编辑,以及——挂载附件存储时——图像读取;每个结果都有上限,失败携带稳定错误码与恢复指令。
|
|
29
31
|
|
|
30
32
|
### 最小组合
|
|
@@ -52,10 +54,14 @@ kind: "package-reference"
|
|
|
52
54
|
|
|
53
55
|
### 配置
|
|
54
56
|
|
|
55
|
-
|
|
57
|
+
所有键均为可选。`read`、`readImage`、`write` 和 `edit` 开关默认为 `true`;将开关设为 `false` 可省略对应工具及其指导文本。允许关闭全部四个工具。启用 `readImage` 仍需要附件存储和支持图片输入的模型。关闭 `read` 时仍会校验读取上限。
|
|
56
58
|
|
|
57
59
|
| 键 | 默认值 | 含义 |
|
|
58
60
|
|---|---|---|
|
|
61
|
+
| `read` | `true` | 注册 `read` 及其指导文本 |
|
|
62
|
+
| `readImage` | `true` | 附件存储挂载时注册 `read_image` |
|
|
63
|
+
| `write` | `true` | 注册 `write` 及其指导文本 |
|
|
64
|
+
| `edit` | `true` | 注册 `edit` 及其指导文本 |
|
|
59
65
|
| `readLimit` | `2000` | 一次 `read` 调用返回的默认和最大行数 |
|
|
60
66
|
| `readMaxLineLength` | `2000` | 每行截断前保留的字符数 |
|
|
61
67
|
| `readMaxBytes` | `51200` | 一次 `read` 调用所选行的字节上限;溢出时以「已达上限」footer 结束窗口 |
|
|
@@ -63,6 +69,8 @@ kind: "package-reference"
|
|
|
63
69
|
|
|
64
70
|
生成的[配置目录](../../../docs/config-catalog.zh.md#deepseek-aidsh-tool-fs)是每个受支持字段及其 JSDoc 的穷尽式真源。
|
|
65
71
|
|
|
72
|
+
挂载 `fs-observation-policy` 且关闭 `read` 时,`write` 仍可创建文件,成功写入或编辑会记录本会话后续修改所需的版本。未观察过的已有文件仍受保护;关闭 `read` 不会放宽策略。其他文件系统读取方必须发出 `fs/observed`,已有文件才会成为已观察状态。
|
|
73
|
+
|
|
66
74
|
### 策略与沙箱行为
|
|
67
75
|
|
|
68
76
|
`read` 与 `read_image` 的路径授权完全由 `ctx.fs` 负责;媒体类型声明和文件签名只决定 `read_image` 是否接受该后端返回的字节。
|
|
@@ -99,6 +107,7 @@ kind: "package-reference"
|
|
|
99
107
|
| [`src/read-render.ts`](src/read-render.ts) | 不依赖 Cordis 的窗口构建与信封格式化 |
|
|
100
108
|
| [`src/sandbox.ts`](src/sandbox.ts) | `write`/`edit` 共享的升权 API:策略解析与拒绝标记映射 |
|
|
101
109
|
| [`src/error.ts`](src/error.ts) | 防护变更失败的稳定模型侧诊断 |
|
|
110
|
+
| [`src/mutation-result.ts`](src/mutation-result.ts) | 成功变更的观察记录与规范化结果路径 |
|
|
102
111
|
|
|
103
112
|
### 各工具流程
|
|
104
113
|
|
|
@@ -133,12 +142,12 @@ kind: "package-reference"
|
|
|
133
142
|
|
|
134
143
|
#### 模型看到的内容
|
|
135
144
|
|
|
136
|
-
组装时,每个指导段落通过 `ctx.tools.get(name, scope)` 检查对应工具,仅在该 agent 可见时输出。write 段落仅在 edit 可见时推荐 edit。三个工具都可用时,下方原文保持不变;限制的施加、解除和工具注册变化在下次组装时生效。同一检查适用于直接限制 agent
|
|
145
|
+
组装时,每个指导段落通过 `ctx.tools.get(name, scope)` 检查对应工具,仅在该 agent 可见时输出。write 段落仅在 edit 可见时推荐 edit。三个工具都可用时,下方原文保持不变;限制的施加、解除和工具注册变化在下次组装时生效。同一检查适用于直接限制 agent 和从历史 descriptor 恢复的 subagent 过滤器,也适用于通过 `run_code` 暴露的 PTC 能力。 write/edit 中的先读后改句子描述观察策略,并非要求调用名为 `read` 的工具。隐藏 `read` 时仍保留这些句子:策略继续保护修改操作,其他产生观察记录的操作(例如 `str_replace_editor` 的 `command: view`)也能建立同一文件观察记录。工具可见性不会禁用该前置条件。
|
|
137
146
|
|
|
138
147
|
##### Read 指导
|
|
139
148
|
|
|
140
149
|
```markdown
|
|
141
|
-
Use the read tool — not shell commands like cat — to inspect text files. Use offset and limit to continue
|
|
150
|
+
Use the read tool — not shell commands like cat, sed, head, or tail — to inspect text files. Use offset and limit to read a line range or continue a large file.
|
|
142
151
|
```
|
|
143
152
|
|
|
144
153
|
##### Write 指导
|
|
@@ -179,7 +188,7 @@ Read a file before editing it (the default fs-observation-policy requires it), u
|
|
|
179
188
|
|
|
180
189
|
#### 模型看到的内容
|
|
181
190
|
|
|
182
|
-
成功读取结果精确为 `<path><
|
|
191
|
+
成功读取结果精确为 `<path><resolvedPath></path>`、换行、`<type>file</type>`、换行、`<content>`、形如 `<lineNumber>: <text>` 的编号行、一个空行、一条 footer 和 `</content>`。footer 精确为 `(Output capped. Showing lines <start>-<end>. Use offset=<next> to continue.)`、`(Showing lines <start>-<end> of <total>. Use offset=<next> to continue.)` 或 `(End of file - total <total> lines)`。长行结尾精确为 `... (line truncated to <max> chars)`。读取缺失目标仍返回 `FS_NOT_FOUND`,但会为调用会话记录确认缺失;外部删除的文件被重新读取后,重试的 `write` 可以通过提供方的不替换防护安全地重新创建该文件。
|
|
183
192
|
|
|
184
193
|
#### Token 影响
|
|
185
194
|
|
|
@@ -193,7 +202,7 @@ Read a file before editing it (the default fs-observation-policy requires it), u
|
|
|
193
202
|
|
|
194
203
|
#### 模型看到的内容
|
|
195
204
|
|
|
196
|
-
成功的 `read_image` 返回 `<path><
|
|
205
|
+
成功的 `read_image` 返回 `<path><resolvedPath></path>`、`<type>image</type>` 和写明媒体类型、规范化尺寸与字节数的 `<content>` 信封,随后是作为原生图像块的图像本身。结果会随持久引用写入会话日志,然后才进入下一次模型请求。
|
|
197
206
|
|
|
198
207
|
#### Token 影响
|
|
199
208
|
|
|
@@ -207,7 +216,7 @@ Read a file before editing it (the default fs-observation-policy requires it), u
|
|
|
207
216
|
|
|
208
217
|
#### 模型看到的内容
|
|
209
218
|
|
|
210
|
-
写入精确返回五行包络:`<path><
|
|
219
|
+
写入精确返回五行包络:`<path><resolvedPath></path>`、`<type>file</type>`、`<content>`、`Created file` 或 `Updated file`,以及 `</content>`。编辑精确返回 `The file <resolvedPath> has been updated successfully.`;对于 `replace_all`,精确返回 `The file <resolvedPath> has been updated. All occurrences were successfully replaced.`。完整写入或替换文本仍保留在 assistant 工具调用参数中。
|
|
211
220
|
|
|
212
221
|
#### Token 影响
|
|
213
222
|
|
package/lib/index.js
CHANGED
|
@@ -158,29 +158,18 @@ function readMetaFromMeta(meta) {
|
|
|
158
158
|
//#endregion
|
|
159
159
|
//#region lib/types/session-cwd.js
|
|
160
160
|
/**
|
|
161
|
-
*
|
|
162
|
-
* agent
|
|
163
|
-
* `read`/`write`/`edit` act on its workspace, not the server's launch directory.
|
|
164
|
-
* Non-agent calls return `undefined`, leaving the fallback in the provider rather than reading
|
|
165
|
-
* `process.cwd()` at the tool boundary.
|
|
161
|
+
* Resolution options for filesystem calls in the Session's current directory.
|
|
162
|
+
* Non-agent calls leave directory defaults to the filesystem provider.
|
|
166
163
|
* @module @deepseek-ai/dsh-tool-fs/session-cwd
|
|
167
164
|
*/
|
|
168
165
|
/**
|
|
169
|
-
*
|
|
170
|
-
* @param
|
|
171
|
-
* @
|
|
166
|
+
* Resolve the current directory and cancellation for a filesystem call.
|
|
167
|
+
* @param ctx - context containing the working-directory service.
|
|
168
|
+
* @param exec - tool execution supplying the agent and cancellation.
|
|
169
|
+
* @returns filesystem resolution options for this call.
|
|
172
170
|
*/
|
|
173
|
-
function
|
|
174
|
-
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* Resolution options shared by all model-facing filesystem tools.
|
|
178
|
-
* @param exec - the tool-execution context supplying session cwd and cancellation.
|
|
179
|
-
* @param policyWorkspaceRoot - resolved per-call root, when a mutation carries sandbox policy.
|
|
180
|
-
* @returns provider resolution options for the current tool call.
|
|
181
|
-
*/
|
|
182
|
-
function sessionResolveOptions(exec, policyWorkspaceRoot) {
|
|
183
|
-
const cwd = policyWorkspaceRoot ?? sessionCwd(exec);
|
|
171
|
+
async function sessionResolveOptions(ctx, exec) {
|
|
172
|
+
const cwd = exec.agent === void 0 ? void 0 : await ctx.workingDirectory.ensure(exec.agent, exec.signal);
|
|
184
173
|
return {
|
|
185
174
|
...cwd !== void 0 ? { cwd } : {},
|
|
186
175
|
signal: exec.signal
|
|
@@ -195,12 +184,12 @@ function sessionResolveOptions(exec, policyWorkspaceRoot) {
|
|
|
195
184
|
/**
|
|
196
185
|
* Resolve a model-supplied path, observe absence, and require a regular file.
|
|
197
186
|
* @param ctx - the plugin context providing filesystem resolution and observation events.
|
|
198
|
-
* @param exec - the current tool execution, including
|
|
187
|
+
* @param exec - the current tool execution, including the owning Agent and cancellation.
|
|
199
188
|
* @param requestedPath - the raw path supplied to the tool.
|
|
200
189
|
* @returns the resolved target and its single stat result.
|
|
201
190
|
*/
|
|
202
191
|
async function resolveRegularReadTarget(ctx, exec, requestedPath) {
|
|
203
|
-
const target = await ctx.fs.resolve(requestedPath, sessionResolveOptions(exec));
|
|
192
|
+
const target = await ctx.fs.resolve(requestedPath, await sessionResolveOptions(ctx, exec));
|
|
204
193
|
const info = await ctx.fs.stat(target, exec.signal);
|
|
205
194
|
if (info === void 0) {
|
|
206
195
|
ctx.emit("fs/observed", target, { kind: "absent" }, exec);
|
|
@@ -256,7 +245,7 @@ function applyReadTool(ctx, caps) {
|
|
|
256
245
|
ctx.systemPrompt.section({
|
|
257
246
|
name: "tool:read",
|
|
258
247
|
order: ctx.systemPrompt.getSectionOrder("TOOL_READ"),
|
|
259
|
-
text: ({ scope }) => ctx.tools.get("read", scope) === void 0 ? "" : "Use the read tool — not shell commands like cat — to inspect text files. Use offset and limit to continue
|
|
248
|
+
text: ({ scope }) => ctx.tools.get("read", scope) === void 0 ? "" : "Use the read tool — not shell commands like cat, sed, head, or tail — to inspect text files. Use offset and limit to read a line range or continue a large file."
|
|
260
249
|
});
|
|
261
250
|
ctx.tools.register(defineTool({
|
|
262
251
|
name: "read",
|
|
@@ -283,7 +272,8 @@ function applyReadTool(ctx, caps) {
|
|
|
283
272
|
properties: {
|
|
284
273
|
path: {
|
|
285
274
|
type: "string",
|
|
286
|
-
required: true
|
|
275
|
+
required: true,
|
|
276
|
+
description: "Canonical absolute path in the filesystem execution world."
|
|
287
277
|
},
|
|
288
278
|
offset: {
|
|
289
279
|
type: "integer",
|
|
@@ -352,7 +342,7 @@ function applyReadTool(ctx, caps) {
|
|
|
352
342
|
maxBytes: caps.maxBytes
|
|
353
343
|
}, target.displayPath);
|
|
354
344
|
const outcome = {
|
|
355
|
-
path: target
|
|
345
|
+
path: ctx.fs.processPath(target),
|
|
356
346
|
offset: input.offset,
|
|
357
347
|
lines: window.lines,
|
|
358
348
|
totalLines: window.totalLines
|
|
@@ -453,6 +443,16 @@ function diffsFromMeta(meta) {
|
|
|
453
443
|
if (!Array.isArray(diffs) || diffs.length === 0 || !diffs.every(isFileDiff)) return void 0;
|
|
454
444
|
return diffs;
|
|
455
445
|
}
|
|
446
|
+
/**
|
|
447
|
+
* Read the operation's file path even when the applied diff is empty.
|
|
448
|
+
* @param meta - opaque persisted result metadata.
|
|
449
|
+
* @returns the recorded path, or undefined for old or malformed metadata.
|
|
450
|
+
*/
|
|
451
|
+
function pathFromMeta(meta) {
|
|
452
|
+
if (typeof meta !== "object" || meta === null || Array.isArray(meta)) return void 0;
|
|
453
|
+
const path = meta.path;
|
|
454
|
+
return typeof path === "string" && path.length > 0 ? path : void 0;
|
|
455
|
+
}
|
|
456
456
|
//#endregion
|
|
457
457
|
//#region lib/types/error.js
|
|
458
458
|
/**
|
|
@@ -479,6 +479,28 @@ function remediateFsError(error, displayPath) {
|
|
|
479
479
|
return error;
|
|
480
480
|
}
|
|
481
481
|
//#endregion
|
|
482
|
+
//#region lib/types/mutation-result.js
|
|
483
|
+
/** Shared observation and result fields for successful file mutations. */
|
|
484
|
+
/**
|
|
485
|
+
* Record the new file version and expose the mutation result with its canonical path.
|
|
486
|
+
* @param ctx - filesystem and observation event owner.
|
|
487
|
+
* @param target - resolved file that was mutated.
|
|
488
|
+
* @param outcome - successful provider result; its version stays in the observation event.
|
|
489
|
+
* @param exec - calling tool execution.
|
|
490
|
+
* @returns the provider's result fields without the version, plus the canonical absolute path.
|
|
491
|
+
*/
|
|
492
|
+
function mutationResult(ctx, target, outcome, exec) {
|
|
493
|
+
const { version, ...result } = outcome;
|
|
494
|
+
ctx.emit("fs/observed", target, {
|
|
495
|
+
kind: "present",
|
|
496
|
+
version
|
|
497
|
+
}, exec);
|
|
498
|
+
return {
|
|
499
|
+
path: ctx.fs.processPath(target),
|
|
500
|
+
...result
|
|
501
|
+
};
|
|
502
|
+
}
|
|
503
|
+
//#endregion
|
|
482
504
|
//#region lib/types/write.js
|
|
483
505
|
/**
|
|
484
506
|
* Model-facing full-file write. It obtains an optional intent from the single policy slot, calls
|
|
@@ -546,7 +568,8 @@ function applyWriteTool(ctx, sandbox) {
|
|
|
546
568
|
properties: {
|
|
547
569
|
path: {
|
|
548
570
|
type: "string",
|
|
549
|
-
required: true
|
|
571
|
+
required: true,
|
|
572
|
+
description: "Canonical absolute path in the filesystem execution world."
|
|
550
573
|
},
|
|
551
574
|
operation: {
|
|
552
575
|
type: "string",
|
|
@@ -567,9 +590,10 @@ function applyWriteTool(ctx, sandbox) {
|
|
|
567
590
|
type: "text",
|
|
568
591
|
text: formatWriteOutput(value.path, value)
|
|
569
592
|
}],
|
|
570
|
-
presentationMeta: (
|
|
593
|
+
presentationMeta: (_args, value) => ({
|
|
571
594
|
operation: value.operation,
|
|
572
|
-
|
|
595
|
+
path: value.path,
|
|
596
|
+
diffs: value.before === null ? [] : computeHunkDiffs(value.path, value.before, value.after).map(({ path, oldText, newText }) => ({
|
|
573
597
|
path,
|
|
574
598
|
oldText,
|
|
575
599
|
newText
|
|
@@ -579,7 +603,7 @@ function applyWriteTool(ctx, sandbox) {
|
|
|
579
603
|
async execute(args, exec) {
|
|
580
604
|
const input = parseWriteArgs(args);
|
|
581
605
|
const sandboxPolicy = await sandbox.resolvePolicy("write", args, exec);
|
|
582
|
-
const target = await ctx.fs.resolve(input.filePath, sessionResolveOptions(
|
|
606
|
+
const target = await ctx.fs.resolve(input.filePath, await sessionResolveOptions(ctx, exec));
|
|
583
607
|
const intent = await ctx.waterfall("fs/write-intent", target, exec, () => void 0);
|
|
584
608
|
let outcome;
|
|
585
609
|
try {
|
|
@@ -587,16 +611,7 @@ function applyWriteTool(ctx, sandbox) {
|
|
|
587
611
|
} catch (error) {
|
|
588
612
|
throw remediateFsError(sandbox.mapError(error, sandboxPolicy), target.displayPath);
|
|
589
613
|
}
|
|
590
|
-
ctx
|
|
591
|
-
kind: "present",
|
|
592
|
-
version: outcome.version
|
|
593
|
-
}, exec);
|
|
594
|
-
return {
|
|
595
|
-
path: target.displayPath,
|
|
596
|
-
operation: outcome.operation,
|
|
597
|
-
before: outcome.before,
|
|
598
|
-
after: outcome.after
|
|
599
|
-
};
|
|
614
|
+
return mutationResult(ctx, target, outcome, exec);
|
|
600
615
|
},
|
|
601
616
|
presentCall(args) {
|
|
602
617
|
return {
|
|
@@ -613,7 +628,7 @@ function applyWriteTool(ctx, sandbox) {
|
|
|
613
628
|
presentResult(args, result) {
|
|
614
629
|
if (result.isError) return void 0;
|
|
615
630
|
const diffs = diffsFromMeta(result.meta) ?? [{
|
|
616
|
-
path: args.file_path,
|
|
631
|
+
path: pathFromMeta(result.meta) ?? args.file_path,
|
|
617
632
|
oldText: null,
|
|
618
633
|
newText: args.content
|
|
619
634
|
}];
|
|
@@ -703,7 +718,8 @@ function applyEditTool(ctx, sandbox) {
|
|
|
703
718
|
properties: {
|
|
704
719
|
path: {
|
|
705
720
|
type: "string",
|
|
706
|
-
required: true
|
|
721
|
+
required: true,
|
|
722
|
+
description: "Canonical absolute path in the filesystem execution world."
|
|
707
723
|
},
|
|
708
724
|
before: {
|
|
709
725
|
type: "string",
|
|
@@ -719,16 +735,19 @@ function applyEditTool(ctx, sandbox) {
|
|
|
719
735
|
type: "text",
|
|
720
736
|
text: formatEditOutput(value.path, args.replace_all ?? false)
|
|
721
737
|
}],
|
|
722
|
-
presentationMeta: (
|
|
723
|
-
path,
|
|
724
|
-
oldText,
|
|
725
|
-
|
|
726
|
-
|
|
738
|
+
presentationMeta: (_args, value) => ({
|
|
739
|
+
path: value.path,
|
|
740
|
+
diffs: computeHunkDiffs(value.path, value.before, value.after).map(({ path, oldText, newText }) => ({
|
|
741
|
+
path,
|
|
742
|
+
oldText,
|
|
743
|
+
newText
|
|
744
|
+
}))
|
|
745
|
+
})
|
|
727
746
|
},
|
|
728
747
|
async execute(args, exec) {
|
|
729
748
|
const input = parseEditArgs(args);
|
|
730
749
|
const sandboxPolicy = await sandbox.resolvePolicy("edit", args, exec);
|
|
731
|
-
const target = await ctx.fs.resolve(input.filePath, sessionResolveOptions(
|
|
750
|
+
const target = await ctx.fs.resolve(input.filePath, await sessionResolveOptions(ctx, exec));
|
|
732
751
|
let outcome;
|
|
733
752
|
try {
|
|
734
753
|
const intent = await ctx.waterfall("fs/edit-intent", target, exec, () => void 0);
|
|
@@ -740,15 +759,7 @@ function applyEditTool(ctx, sandbox) {
|
|
|
740
759
|
} catch (error) {
|
|
741
760
|
throw remediateFsError(sandbox.mapError(error, sandboxPolicy), target.displayPath);
|
|
742
761
|
}
|
|
743
|
-
ctx
|
|
744
|
-
kind: "present",
|
|
745
|
-
version: outcome.version
|
|
746
|
-
}, exec);
|
|
747
|
-
return {
|
|
748
|
-
path: target.displayPath,
|
|
749
|
-
before: outcome.before,
|
|
750
|
-
after: outcome.after
|
|
751
|
-
};
|
|
762
|
+
return mutationResult(ctx, target, outcome, exec);
|
|
752
763
|
},
|
|
753
764
|
presentCall(args) {
|
|
754
765
|
return {
|
|
@@ -986,7 +997,8 @@ function applyReadImageTool(ctx) {
|
|
|
986
997
|
properties: {
|
|
987
998
|
path: {
|
|
988
999
|
type: "string",
|
|
989
|
-
required: true
|
|
1000
|
+
required: true,
|
|
1001
|
+
description: "Canonical absolute path in the filesystem execution world."
|
|
990
1002
|
},
|
|
991
1003
|
image: IMAGE_VALUE_SCHEMA
|
|
992
1004
|
}
|
|
@@ -1033,7 +1045,7 @@ function applyReadImageTool(ctx) {
|
|
|
1033
1045
|
version: info.version
|
|
1034
1046
|
}, exec);
|
|
1035
1047
|
return {
|
|
1036
|
-
path: target
|
|
1048
|
+
path: ctx.fs.processPath(target),
|
|
1037
1049
|
image: {
|
|
1038
1050
|
attachmentId: ref.attachmentId,
|
|
1039
1051
|
mediaType: ref.mediaType,
|
|
@@ -1109,9 +1121,9 @@ var FsSandboxController = class {
|
|
|
1109
1121
|
/**
|
|
1110
1122
|
* The policy to stamp onto this mutation: an approved escalation grant (a
|
|
1111
1123
|
* strictly wider retry resolved through `ctx.approval` before anything
|
|
1112
|
-
* executes), else the
|
|
1113
|
-
* requires no approval. The
|
|
1114
|
-
*
|
|
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
|
|
1115
1127
|
* pairing first.
|
|
1116
1128
|
* @param toolName - the mutating tool's name, for the approval audit trail.
|
|
1117
1129
|
* @param args - the call's escalation arguments.
|
|
@@ -1176,9 +1188,14 @@ const name = "tool-fs";
|
|
|
1176
1188
|
const inject = [
|
|
1177
1189
|
"tools",
|
|
1178
1190
|
"fs",
|
|
1179
|
-
"systemPrompt"
|
|
1191
|
+
"systemPrompt",
|
|
1192
|
+
"workingDirectory"
|
|
1180
1193
|
];
|
|
1181
1194
|
const Config = z.object({
|
|
1195
|
+
read: z.boolean().default(true),
|
|
1196
|
+
readImage: z.boolean().default(true),
|
|
1197
|
+
write: z.boolean().default(true),
|
|
1198
|
+
edit: z.boolean().default(true),
|
|
1182
1199
|
readLimit: z.number().default(READ_LIMIT),
|
|
1183
1200
|
readMaxLineLength: z.number().default(READ_MAX_LINE_LENGTH),
|
|
1184
1201
|
readMaxBytes: z.number().default(READ_MAX_BYTES),
|
|
@@ -1188,25 +1205,27 @@ const Config = z.object({
|
|
|
1188
1205
|
function assertPositiveInteger(name, value) {
|
|
1189
1206
|
if (!Number.isInteger(value) || value < 1) throw new Error(`tool-fs: ${name} must be a positive integer`);
|
|
1190
1207
|
}
|
|
1191
|
-
/** Register the
|
|
1208
|
+
/** Register the selected filesystem tools; `read_image` additionally requires a mounted attachment store. */
|
|
1192
1209
|
function apply(ctx, config) {
|
|
1193
1210
|
const resolved = config;
|
|
1194
1211
|
assertPositiveInteger("readLimit", resolved.readLimit);
|
|
1195
1212
|
assertPositiveInteger("readMaxLineLength", resolved.readMaxLineLength);
|
|
1196
1213
|
assertPositiveInteger("readMaxBytes", resolved.readMaxBytes);
|
|
1197
1214
|
assertPositiveInteger("readStreamMinSize", resolved.readStreamMinSize);
|
|
1198
|
-
applyReadTool(ctx, {
|
|
1215
|
+
if (resolved.read) applyReadTool(ctx, {
|
|
1199
1216
|
limit: resolved.readLimit,
|
|
1200
1217
|
maxLineLength: resolved.readMaxLineLength,
|
|
1201
1218
|
maxBytes: resolved.readMaxBytes,
|
|
1202
1219
|
streamMinSize: resolved.readStreamMinSize
|
|
1203
1220
|
});
|
|
1204
|
-
ctx.inject(["attachments"], (imageCtx) => {
|
|
1221
|
+
if (resolved.readImage) ctx.inject(["attachments"], (imageCtx) => {
|
|
1205
1222
|
applyReadImageTool(imageCtx);
|
|
1206
1223
|
});
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1224
|
+
if (resolved.write || resolved.edit) {
|
|
1225
|
+
const sandbox = new FsSandboxController(ctx);
|
|
1226
|
+
if (resolved.write) applyWriteTool(ctx, sandbox);
|
|
1227
|
+
if (resolved.edit) applyEditTool(ctx, sandbox);
|
|
1228
|
+
}
|
|
1210
1229
|
}
|
|
1211
1230
|
//#endregion
|
|
1212
1231
|
export { Config, apply, inject, name };
|
package/lib/types/diff.d.ts
CHANGED
|
@@ -38,4 +38,10 @@ export declare function computeHunkDiffs(path: string, before: string, after: st
|
|
|
38
38
|
* @returns validated hunks, or `undefined` for absent or malformed data.
|
|
39
39
|
*/
|
|
40
40
|
export declare function diffsFromMeta(meta: unknown): FileDiff[] | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Read the operation's file path even when the applied diff is empty.
|
|
43
|
+
* @param meta - opaque persisted result metadata.
|
|
44
|
+
* @returns the recorded path, or undefined for old or malformed metadata.
|
|
45
|
+
*/
|
|
46
|
+
export declare function pathFromMeta(meta: unknown): string | undefined;
|
|
41
47
|
//# sourceMappingURL=diff.d.ts.map
|
package/lib/types/index.d.ts
CHANGED
|
@@ -12,6 +12,14 @@ export declare const name = "tool-fs";
|
|
|
12
12
|
export declare const inject: string[];
|
|
13
13
|
/** Plugin config (all optional — `Config` supplies the defaults). */
|
|
14
14
|
export interface Config {
|
|
15
|
+
/** Register `read` and its guidance. Defaults to true. */
|
|
16
|
+
read?: boolean;
|
|
17
|
+
/** Register `read_image` while an attachment store is mounted. Defaults to true. */
|
|
18
|
+
readImage?: boolean;
|
|
19
|
+
/** Register `write` and its guidance. Defaults to true. */
|
|
20
|
+
write?: boolean;
|
|
21
|
+
/** Register `edit` and its guidance. Defaults to true. */
|
|
22
|
+
edit?: boolean;
|
|
15
23
|
/** Default and maximum number of lines returned by one `read` call. */
|
|
16
24
|
readLimit?: number;
|
|
17
25
|
/** Maximum characters returned for a single line before truncation. */
|
|
@@ -22,6 +30,6 @@ export interface Config {
|
|
|
22
30
|
readStreamMinSize?: number;
|
|
23
31
|
}
|
|
24
32
|
export declare const Config: z<Config>;
|
|
25
|
-
/** Register the
|
|
33
|
+
/** Register the selected filesystem tools; `read_image` additionally requires a mounted attachment store. */
|
|
26
34
|
export declare function apply(ctx: Context, config: Config): void;
|
|
27
35
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Shared observation and result fields for successful file mutations. */
|
|
2
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
3
|
+
import type { FsTarget, FsVersion } from '@deepseek-ai/dsh-fs';
|
|
4
|
+
import type { ToolExecution } from '@deepseek-ai/dsh-tools';
|
|
5
|
+
/**
|
|
6
|
+
* Record the new file version and expose the mutation result with its canonical path.
|
|
7
|
+
* @param ctx - filesystem and observation event owner.
|
|
8
|
+
* @param target - resolved file that was mutated.
|
|
9
|
+
* @param outcome - successful provider result; its version stays in the observation event.
|
|
10
|
+
* @param exec - calling tool execution.
|
|
11
|
+
* @returns the provider's result fields without the version, plus the canonical absolute path.
|
|
12
|
+
*/
|
|
13
|
+
export declare function mutationResult<T extends {
|
|
14
|
+
version: FsVersion;
|
|
15
|
+
}>(ctx: Context, target: FsTarget, outcome: T, exec: ToolExecution): Omit<T, 'version'> & {
|
|
16
|
+
path: string;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=mutation-result.d.ts.map
|
|
@@ -21,6 +21,7 @@ import type { ToolExecution } from '@deepseek-ai/dsh-tools';
|
|
|
21
21
|
export declare function sniffImageMediaType(data: Uint8Array): ImageMediaType | undefined;
|
|
22
22
|
/** The structured outcome declared by the `read_image` output schema. */
|
|
23
23
|
export interface ImageReadValue {
|
|
24
|
+
/** Canonical absolute path in the filesystem provider's execution world. */
|
|
24
25
|
path: string;
|
|
25
26
|
image: {
|
|
26
27
|
attachmentId: string;
|
|
@@ -8,7 +8,7 @@ import type { ToolExecution } from '@deepseek-ai/dsh-tools';
|
|
|
8
8
|
/**
|
|
9
9
|
* Resolve a model-supplied path, observe absence, and require a regular file.
|
|
10
10
|
* @param ctx - the plugin context providing filesystem resolution and observation events.
|
|
11
|
-
* @param exec - the current tool execution, including
|
|
11
|
+
* @param exec - the current tool execution, including the owning Agent and cancellation.
|
|
12
12
|
* @param requestedPath - the raw path supplied to the tool.
|
|
13
13
|
* @returns the resolved target and its single stat result.
|
|
14
14
|
*/
|
package/lib/types/sandbox.d.ts
CHANGED
|
@@ -52,9 +52,9 @@ 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
|
|
56
|
-
* requires no approval. The
|
|
57
|
-
*
|
|
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
58
|
* pairing first.
|
|
59
59
|
* @param toolName - the mutating tool's name, for the approval audit trail.
|
|
60
60
|
* @param args - the call's escalation arguments.
|
|
@@ -1,26 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* agent
|
|
4
|
-
* `read`/`write`/`edit` act on its workspace, not the server's launch directory.
|
|
5
|
-
* Non-agent calls return `undefined`, leaving the fallback in the provider rather than reading
|
|
6
|
-
* `process.cwd()` at the tool boundary.
|
|
2
|
+
* Resolution options for filesystem calls in the Session's current directory.
|
|
3
|
+
* Non-agent calls leave directory defaults to the filesystem provider.
|
|
7
4
|
* @module @deepseek-ai/dsh-tool-fs/session-cwd
|
|
8
5
|
*/
|
|
6
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
9
7
|
import type { ToolExecution } from '@deepseek-ai/dsh-tools';
|
|
10
8
|
/**
|
|
11
|
-
*
|
|
12
|
-
* @param
|
|
13
|
-
* @
|
|
9
|
+
* Resolve the current directory and cancellation for a filesystem call.
|
|
10
|
+
* @param ctx - context containing the working-directory service.
|
|
11
|
+
* @param exec - tool execution supplying the agent and cancellation.
|
|
12
|
+
* @returns filesystem resolution options for this call.
|
|
14
13
|
*/
|
|
15
|
-
export declare function
|
|
16
|
-
/**
|
|
17
|
-
* Resolution options shared by all model-facing filesystem tools.
|
|
18
|
-
* @param exec - the tool-execution context supplying session cwd and cancellation.
|
|
19
|
-
* @param policyWorkspaceRoot - resolved per-call root, when a mutation carries sandbox policy.
|
|
20
|
-
* @returns provider resolution options for the current tool call.
|
|
21
|
-
*/
|
|
22
|
-
export declare function sessionResolveOptions(exec: ToolExecution, policyWorkspaceRoot?: string): {
|
|
14
|
+
export declare function sessionResolveOptions(ctx: Context, exec: ToolExecution): Promise<{
|
|
23
15
|
cwd?: string;
|
|
24
16
|
signal?: AbortSignal;
|
|
25
|
-
}
|
|
17
|
+
}>;
|
|
26
18
|
//# sourceMappingURL=session-cwd.d.ts.map
|
package/locale/zh.json
ADDED
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-alpha.
|
|
4
|
+
"version": "0.2.1-alpha.3",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -19,50 +19,54 @@
|
|
|
19
19
|
"default": "./lib/index.js"
|
|
20
20
|
},
|
|
21
21
|
"./src/*": "./src/*",
|
|
22
|
-
"./package.json": "./package.json"
|
|
22
|
+
"./package.json": "./package.json",
|
|
23
|
+
"./locale/*.json": "./locale/*.json"
|
|
23
24
|
},
|
|
24
25
|
"files": [
|
|
26
|
+
"locale/*.json",
|
|
25
27
|
"lib/index.js",
|
|
26
28
|
"lib/types/**/*.d.ts"
|
|
27
29
|
],
|
|
28
30
|
"license": "MIT",
|
|
29
31
|
"dependencies": {
|
|
30
32
|
"diff": "^9.0.0",
|
|
31
|
-
"@deepseek-ai/
|
|
32
|
-
"@deepseek-ai/
|
|
33
|
+
"@deepseek-ai/schemastery": "~3.18.5-alpha.2",
|
|
34
|
+
"@deepseek-ai/dsh-util-code-language": "0.2.1-alpha.3"
|
|
33
35
|
},
|
|
34
36
|
"peerDependencies": {
|
|
35
|
-
"@deepseek-ai/dsh-
|
|
36
|
-
"@deepseek-ai/dsh-
|
|
37
|
-
"@deepseek-ai/dsh-
|
|
38
|
-
"@deepseek-ai/dsh-sandbox
|
|
39
|
-
"@deepseek-ai/dsh-
|
|
40
|
-
"@deepseek-ai/dsh-
|
|
41
|
-
"@deepseek-ai/dsh-
|
|
42
|
-
"@deepseek-ai/dsh-
|
|
43
|
-
"@deepseek-ai/
|
|
44
|
-
"@deepseek-ai/
|
|
37
|
+
"@deepseek-ai/dsh-attachment": "0.2.1-alpha.3",
|
|
38
|
+
"@deepseek-ai/dsh-fs": "0.2.1-alpha.3",
|
|
39
|
+
"@deepseek-ai/dsh-llm": "0.2.1-alpha.3",
|
|
40
|
+
"@deepseek-ai/dsh-sandbox": "0.2.1-alpha.3",
|
|
41
|
+
"@deepseek-ai/dsh-sandbox-policy": "0.2.1-alpha.3",
|
|
42
|
+
"@deepseek-ai/dsh-session": "0.2.1-alpha.3",
|
|
43
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.1-alpha.3",
|
|
44
|
+
"@deepseek-ai/dsh-tools": "0.2.1-alpha.3",
|
|
45
|
+
"@deepseek-ai/dsh-user-approval": "0.2.1-alpha.3",
|
|
46
|
+
"@deepseek-ai/cordis": "~4.0.5-alpha.2",
|
|
47
|
+
"@deepseek-ai/dsh-working-directory": "0.2.1-alpha.3"
|
|
45
48
|
},
|
|
46
49
|
"devDependencies": {
|
|
47
|
-
"@deepseek-ai/dsh-agent": "0.2.1-alpha.
|
|
48
|
-
"@deepseek-ai/dsh-agent-loop": "0.2.1-alpha.
|
|
49
|
-
"@deepseek-ai/dsh-agent-loop-testkit": "0.2.1-alpha.
|
|
50
|
-
"@deepseek-ai/dsh-attachment": "0.2.1-alpha.
|
|
51
|
-
"@deepseek-ai/dsh-fs": "0.2.1-alpha.
|
|
52
|
-
"@deepseek-ai/dsh-fs-local": "0.2.1-alpha.
|
|
53
|
-
"@deepseek-ai/dsh-fs-observation-policy": "0.2.1-alpha.
|
|
54
|
-
"@deepseek-ai/dsh-llm": "0.2.1-alpha.
|
|
55
|
-
"@deepseek-ai/dsh-llm-deepseek": "0.2.1-alpha.
|
|
56
|
-
"@deepseek-ai/dsh-llm-deepseek-api-key": "0.2.1-alpha.
|
|
57
|
-
"@deepseek-ai/dsh-sandbox": "0.2.1-alpha.
|
|
58
|
-
"@deepseek-ai/dsh-sandbox-policy": "0.2.1-alpha.
|
|
59
|
-
"@deepseek-ai/dsh-session": "0.2.1-alpha.
|
|
60
|
-
"@deepseek-ai/dsh-system-prompt": "0.2.1-alpha.
|
|
61
|
-
"@deepseek-ai/dsh-
|
|
62
|
-
"@deepseek-ai/
|
|
63
|
-
"@deepseek-ai/
|
|
64
|
-
"@deepseek-ai/dsh-
|
|
65
|
-
"@deepseek-ai/dsh-
|
|
66
|
-
"@deepseek-ai/dsh-
|
|
50
|
+
"@deepseek-ai/dsh-agent": "0.2.1-alpha.3",
|
|
51
|
+
"@deepseek-ai/dsh-agent-loop": "0.2.1-alpha.3",
|
|
52
|
+
"@deepseek-ai/dsh-agent-loop-testkit": "0.2.1-alpha.3",
|
|
53
|
+
"@deepseek-ai/dsh-attachment": "0.2.1-alpha.3",
|
|
54
|
+
"@deepseek-ai/dsh-fs": "0.2.1-alpha.3",
|
|
55
|
+
"@deepseek-ai/dsh-fs-local": "0.2.1-alpha.3",
|
|
56
|
+
"@deepseek-ai/dsh-fs-observation-policy": "0.2.1-alpha.3",
|
|
57
|
+
"@deepseek-ai/dsh-llm": "0.2.1-alpha.3",
|
|
58
|
+
"@deepseek-ai/dsh-llm-deepseek": "0.2.1-alpha.3",
|
|
59
|
+
"@deepseek-ai/dsh-llm-deepseek-api-key": "0.2.1-alpha.3",
|
|
60
|
+
"@deepseek-ai/dsh-sandbox": "0.2.1-alpha.3",
|
|
61
|
+
"@deepseek-ai/dsh-sandbox-policy": "0.2.1-alpha.3",
|
|
62
|
+
"@deepseek-ai/dsh-session": "0.2.1-alpha.3",
|
|
63
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.1-alpha.3",
|
|
64
|
+
"@deepseek-ai/dsh-tools": "0.2.1-alpha.3",
|
|
65
|
+
"@deepseek-ai/dsh-user-approval": "0.2.1-alpha.3",
|
|
66
|
+
"@deepseek-ai/cordis": "~4.0.5-alpha.2",
|
|
67
|
+
"@deepseek-ai/dsh-session-projection": "0.2.1-alpha.3",
|
|
68
|
+
"@deepseek-ai/dsh-scope": "0.2.1-alpha.3",
|
|
69
|
+
"@deepseek-ai/dsh-ptc-runtime": "0.2.1-alpha.3",
|
|
70
|
+
"@deepseek-ai/dsh-working-directory": "0.2.1-alpha.3"
|
|
67
71
|
}
|
|
68
72
|
}
|