@deepseek-ai/dsh-tool-fs-search 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 +2 -2
- package/README.md +2 -0
- package/README.zh.md +2 -0
- package/lib/index.js +5 -4
- package/lib/types/search-core.d.ts +2 -2
- package/locale/en.json +5 -0
- package/locale/zh.json +6 -0
- package/package.json +29 -24
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:
|
|
19
|
-
zh:
|
|
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
|
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
|
package/README.zh.md
CHANGED
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
|
-
*
|
|
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
|
|
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
|
|
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
|
-
*
|
|
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
|
|
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/locale/en.json
ADDED
package/locale/zh.json
ADDED
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.1-alpha.
|
|
4
|
+
"version": "0.2.1-alpha.3",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -19,40 +19,45 @@
|
|
|
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
|
"@vscode/ripgrep": "^1.18.0",
|
|
31
|
-
"@deepseek-ai/schemastery": "~3.18.5-alpha.
|
|
33
|
+
"@deepseek-ai/schemastery": "~3.18.5-alpha.2"
|
|
32
34
|
},
|
|
33
35
|
"peerDependencies": {
|
|
34
|
-
"@deepseek-ai/dsh-llm": "0.2.1-alpha.
|
|
35
|
-
"@deepseek-ai/dsh-output-retention": "0.2.1-alpha.
|
|
36
|
-
"@deepseek-ai/dsh-session": "0.2.1-alpha.
|
|
37
|
-
"@deepseek-ai/dsh-spill": "0.2.1-alpha.
|
|
38
|
-
"@deepseek-ai/dsh-subprocess": "0.2.1-alpha.
|
|
39
|
-
"@deepseek-ai/dsh-system-prompt": "0.2.1-alpha.
|
|
40
|
-
"@deepseek-ai/dsh-
|
|
41
|
-
"@deepseek-ai/
|
|
42
|
-
"@deepseek-ai/
|
|
36
|
+
"@deepseek-ai/dsh-llm": "0.2.1-alpha.3",
|
|
37
|
+
"@deepseek-ai/dsh-output-retention": "0.2.1-alpha.3",
|
|
38
|
+
"@deepseek-ai/dsh-session": "0.2.1-alpha.3",
|
|
39
|
+
"@deepseek-ai/dsh-spill": "0.2.1-alpha.3",
|
|
40
|
+
"@deepseek-ai/dsh-subprocess": "0.2.1-alpha.3",
|
|
41
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.1-alpha.3",
|
|
42
|
+
"@deepseek-ai/dsh-timeout": "0.2.1-alpha.3",
|
|
43
|
+
"@deepseek-ai/dsh-tools": "0.2.1-alpha.3",
|
|
44
|
+
"@deepseek-ai/cordis": "~4.0.5-alpha.2",
|
|
45
|
+
"@deepseek-ai/dsh-working-directory": "0.2.1-alpha.3"
|
|
43
46
|
},
|
|
44
47
|
"devDependencies": {
|
|
45
|
-
"@deepseek-ai/dsh-agent": "0.2.1-alpha.
|
|
46
|
-
"@deepseek-ai/dsh-subprocess": "0.2.1-alpha.
|
|
47
|
-
"@deepseek-ai/dsh-subprocess-local": "0.2.1-alpha.
|
|
48
|
-
"@deepseek-ai/dsh-
|
|
49
|
-
"@deepseek-ai/dsh-
|
|
50
|
-
"@deepseek-ai/dsh-
|
|
51
|
-
"@deepseek-ai/dsh-
|
|
52
|
-
"@deepseek-ai/dsh-
|
|
53
|
-
"@deepseek-ai/
|
|
54
|
-
"@deepseek-ai/dsh-
|
|
55
|
-
"@deepseek-ai/
|
|
56
|
-
"@deepseek-ai/dsh-
|
|
48
|
+
"@deepseek-ai/dsh-agent": "0.2.1-alpha.3",
|
|
49
|
+
"@deepseek-ai/dsh-subprocess": "0.2.1-alpha.3",
|
|
50
|
+
"@deepseek-ai/dsh-subprocess-local": "0.2.1-alpha.3",
|
|
51
|
+
"@deepseek-ai/dsh-llm": "0.2.1-alpha.3",
|
|
52
|
+
"@deepseek-ai/dsh-output-retention": "0.2.1-alpha.3",
|
|
53
|
+
"@deepseek-ai/dsh-session": "0.2.1-alpha.3",
|
|
54
|
+
"@deepseek-ai/dsh-spill": "0.2.1-alpha.3",
|
|
55
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.1-alpha.3",
|
|
56
|
+
"@deepseek-ai/dsh-timeout": "0.2.1-alpha.3",
|
|
57
|
+
"@deepseek-ai/dsh-tools": "0.2.1-alpha.3",
|
|
58
|
+
"@deepseek-ai/cordis": "~4.0.5-alpha.2",
|
|
59
|
+
"@deepseek-ai/dsh-scope": "0.2.1-alpha.3",
|
|
60
|
+
"@deepseek-ai/dsh-working-directory": "0.2.1-alpha.3",
|
|
61
|
+
"@deepseek-ai/dsh-agent-loop-testkit": "0.2.1-alpha.3"
|
|
57
62
|
}
|
|
58
63
|
}
|