@deepseek-ai/dsh-tool-fs-search 0.2.0-rc.2 → 0.2.1-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
@@ -15,8 +15,8 @@
15
15
  en: d152484eb41ac6b4
16
16
  zh: 09388d293f9be9cb
17
17
  /deepseek-ai-dsh-tool-fs-search/use-this-package:
18
- en: aebe9494cf6e8f3a
19
- zh: 8ae2ebd6be7c3484
18
+ en: 494119ddc7157140
19
+ zh: 2fb6e69531ccb2b8
20
20
  /deepseek-ai-dsh-tool-fs-search/use-this-package/minimal-composition:
21
21
  en: a5a01d14e0bec814
22
22
  zh: 409298cfafd91b05
@@ -111,5 +111,5 @@
111
111
  en: 4fca846226cb8ef2
112
112
  zh: fb797ec586cec7f4
113
113
  /deepseek-ai-dsh-tool-fs-search/known-limitations-and-deferred-work/dev-note:
114
- en: 0c4d0c465413d319
115
- zh: 2e062f9e20a99241
114
+ en: e67f633dc6fe7773
115
+ zh: 3bb0c20c93f16f98
package/README.md CHANGED
@@ -25,6 +25,8 @@ Use `dsh-tool-fs-search` to give models `glob` file discovery and `grep` content
25
25
  <a id="use-this-package"></a>
26
26
  ## Use this package
27
27
 
28
+ Searches use the Session's current working directory, including changes made with `working_directory`.
29
+
28
30
  Mount the tools after a `ctx.subprocess` backend; no host `rg` install is needed, and no filesystem provider is required. The model then gets modification-time-ordered file discovery and line-oriented content search, each bounded and timeout-guarded.
29
31
 
30
32
  ### Minimal composition
@@ -219,5 +221,3 @@ These limits define when the search tools are a poor fit or need special operati
219
221
  None.
220
222
 
221
223
  </details>
222
-
223
- **Runtime invariant:** No companion is published. This model-facing adapter has no independent lifecycle stream; execution relations are owned by the capability seam it calls.
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 的当前工作目录,包括通过 `working_directory` 切换后的目录。
29
+
28
30
  在 `ctx.subprocess` 后端之后挂载工具;无需宿主 `rg` 安装,也无需文件系统提供方。模型随后获得按修改时间排序的文件发现与按行组织的内容搜索,两者都有界并受超时防护。
29
31
 
30
32
  ### 最小组合
@@ -219,5 +221,3 @@ glob 描述声明了配置的超过上限排序方式。生成的 [`glob` 和 `g
219
221
  无。
220
222
 
221
223
  </details>
222
-
223
- **运行时不变式:** 不发布伴生入口。这个面向模型的适配器没有独立生命周期流;执行关系由它调用的能力 seam 负责。
package/lib/index.js CHANGED
@@ -130,7 +130,7 @@ function resolveRgPath() {
130
130
  /**
131
131
  * Run the packaged ripgrep binary with a plain argv vector and return its
132
132
  * complete raw stdout. The working directory is the calling agent's session
133
- * cwd (`exec.agent.session.header.cwd`) when available, else
133
+ * current directory when available, else
134
134
  * `process.cwd()`. `exec.signal` is forwarded so the cooperative tool timeout
135
135
  * (`@deepseek-ai/dsh-tool-call-timeout-policy`) and caller cancellation terminate the
136
136
  * process tree.
@@ -155,7 +155,7 @@ function resolveRgPath() {
155
155
  * creation time becomes `SEARCH_ABORTED` instead.
156
156
  *
157
157
  * @param ctx - the plugin context; execution uses its `subprocess` service.
158
- * @param exec - the tool-execution context; supplies the session cwd and the abort signal.
158
+ * @param exec - the tool-execution context; supplies the owning Agent and the abort signal.
159
159
  * @param toolName - `glob` or `grep`, used in error messages.
160
160
  * @param argv - the ripgrep arguments (every model value an unquoted argv element; no shell layer exists).
161
161
  * @param rawOutputMaxBytes - cap on the complete raw stdout the tool will parse.
@@ -165,7 +165,7 @@ function resolveRgPath() {
165
165
  */
166
166
  async function runRipgrep(ctx, exec, toolName, argv, rawOutputMaxBytes, graceMs, stderrMaxBytes) {
167
167
  if (exec.signal.aborted) throw new SearchError(`${toolName} was aborted before completion (tool timeout or caller cancellation)`, "SEARCH_ABORTED");
168
- const workdir = exec.agent?.session.header.cwd ?? process.cwd();
168
+ const workdir = exec.agent === void 0 ? process.cwd() : await ctx.workingDirectory.ensure(exec.agent, exec.signal);
169
169
  let handle;
170
170
  try {
171
171
  handle = ctx.subprocess.spawn({
@@ -1212,7 +1212,8 @@ const name = "tool-fs-search";
1212
1212
  const inject = [
1213
1213
  "tools",
1214
1214
  "systemPrompt",
1215
- "subprocess"
1215
+ "subprocess",
1216
+ "workingDirectory"
1216
1217
  ];
1217
1218
  const Config = z.object({
1218
1219
  sampleOverCapGlobResults: z.boolean().required(),
@@ -100,7 +100,7 @@ export declare function resolveRgPath(): Promise<string>;
100
100
  /**
101
101
  * Run the packaged ripgrep binary with a plain argv vector and return its
102
102
  * complete raw stdout. The working directory is the calling agent's session
103
- * cwd (`exec.agent.session.header.cwd`) when available, else
103
+ * current directory when available, else
104
104
  * `process.cwd()`. `exec.signal` is forwarded so the cooperative tool timeout
105
105
  * (`@deepseek-ai/dsh-tool-call-timeout-policy`) and caller cancellation terminate the
106
106
  * process tree.
@@ -125,7 +125,7 @@ export declare function resolveRgPath(): Promise<string>;
125
125
  * creation time becomes `SEARCH_ABORTED` instead.
126
126
  *
127
127
  * @param ctx - the plugin context; execution uses its `subprocess` service.
128
- * @param exec - the tool-execution context; supplies the session cwd and the abort signal.
128
+ * @param exec - the tool-execution context; supplies the owning Agent and the abort signal.
129
129
  * @param toolName - `glob` or `grep`, used in error messages.
130
130
  * @param argv - the ripgrep arguments (every model value an unquoted argv element; no shell layer exists).
131
131
  * @param rawOutputMaxBytes - cap on the complete raw stdout the tool will parse.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-tool-fs-search",
3
3
  "description": "Model-facing filesystem discovery tools (glob, grep) backed by the packaged ripgrep binary (@vscode/ripgrep)",
4
- "version": "0.2.0-rc.2",
4
+ "version": "0.2.1-alpha.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -28,31 +28,34 @@
28
28
  "license": "MIT",
29
29
  "dependencies": {
30
30
  "@vscode/ripgrep": "^1.18.0",
31
- "@deepseek-ai/schemastery": "~3.18.4"
31
+ "@deepseek-ai/schemastery": "~3.18.5-alpha.1"
32
32
  },
33
33
  "peerDependencies": {
34
- "@deepseek-ai/dsh-session": "0.2.0-rc.2",
35
- "@deepseek-ai/dsh-spill": "0.2.0-rc.2",
36
- "@deepseek-ai/dsh-subprocess": "0.2.0-rc.2",
37
- "@deepseek-ai/dsh-output-retention": "0.2.0-rc.2",
38
- "@deepseek-ai/dsh-system-prompt": "0.2.0-rc.2",
39
- "@deepseek-ai/cordis": "~4.0.4",
40
- "@deepseek-ai/dsh-llm": "0.2.0-rc.2",
41
- "@deepseek-ai/dsh-tools": "0.2.0-rc.2",
42
- "@deepseek-ai/dsh-timeout": "0.2.0-rc.2"
34
+ "@deepseek-ai/dsh-llm": "0.2.1-alpha.2",
35
+ "@deepseek-ai/dsh-output-retention": "0.2.1-alpha.2",
36
+ "@deepseek-ai/dsh-session": "0.2.1-alpha.2",
37
+ "@deepseek-ai/dsh-spill": "0.2.1-alpha.2",
38
+ "@deepseek-ai/dsh-subprocess": "0.2.1-alpha.2",
39
+ "@deepseek-ai/dsh-system-prompt": "0.2.1-alpha.2",
40
+ "@deepseek-ai/dsh-timeout": "0.2.1-alpha.2",
41
+ "@deepseek-ai/dsh-tools": "0.2.1-alpha.2",
42
+ "@deepseek-ai/cordis": "~4.0.5-alpha.1",
43
+ "@deepseek-ai/dsh-working-directory": "0.2.1-alpha.2"
43
44
  },
44
45
  "devDependencies": {
45
- "@deepseek-ai/dsh-agent": "0.2.0-rc.2",
46
- "@deepseek-ai/dsh-subprocess-local": "0.2.0-rc.2",
47
- "@deepseek-ai/dsh-subprocess": "0.2.0-rc.2",
48
- "@deepseek-ai/dsh-llm": "0.2.0-rc.2",
49
- "@deepseek-ai/dsh-output-retention": "0.2.0-rc.2",
50
- "@deepseek-ai/dsh-session": "0.2.0-rc.2",
51
- "@deepseek-ai/dsh-spill": "0.2.0-rc.2",
52
- "@deepseek-ai/dsh-system-prompt": "0.2.0-rc.2",
53
- "@deepseek-ai/dsh-timeout": "0.2.0-rc.2",
54
- "@deepseek-ai/dsh-tools": "0.2.0-rc.2",
55
- "@deepseek-ai/cordis": "~4.0.4",
56
- "@deepseek-ai/dsh-scope": "0.2.0-rc.2"
46
+ "@deepseek-ai/dsh-agent": "0.2.1-alpha.2",
47
+ "@deepseek-ai/dsh-subprocess": "0.2.1-alpha.2",
48
+ "@deepseek-ai/dsh-subprocess-local": "0.2.1-alpha.2",
49
+ "@deepseek-ai/dsh-llm": "0.2.1-alpha.2",
50
+ "@deepseek-ai/dsh-output-retention": "0.2.1-alpha.2",
51
+ "@deepseek-ai/dsh-session": "0.2.1-alpha.2",
52
+ "@deepseek-ai/dsh-spill": "0.2.1-alpha.2",
53
+ "@deepseek-ai/dsh-system-prompt": "0.2.1-alpha.2",
54
+ "@deepseek-ai/dsh-timeout": "0.2.1-alpha.2",
55
+ "@deepseek-ai/dsh-tools": "0.2.1-alpha.2",
56
+ "@deepseek-ai/cordis": "~4.0.5-alpha.1",
57
+ "@deepseek-ai/dsh-scope": "0.2.1-alpha.2",
58
+ "@deepseek-ai/dsh-working-directory": "0.2.1-alpha.2",
59
+ "@deepseek-ai/dsh-agent-loop-testkit": "0.2.1-alpha.2"
57
60
  }
58
61
  }