@deepseek-ai/dsh-tool-fs-search 0.1.3-alpha.2 → 0.1.5-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 +2 -2
- package/README.md +4 -4
- package/README.zh.md +4 -4
- package/lib/index.js +4 -4
- package/lib/types/glob.d.ts +1 -1
- package/lib/types/grep.d.ts +1 -1
- package/package.json +21 -20
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/tool-fs-search/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: 83b1d89b3276f3f6fabbe501017af2df8ec1868a
|
|
6
|
+
README.zh.md: 6ef5ac731fdec6fd04b8bdd0b30bee9086e232f1
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
|
|
|
9
9
|
|
|
10
10
|
## Summary
|
|
11
11
|
|
|
12
|
-
`dsh-tool-fs-search`
|
|
12
|
+
Use `dsh-tool-fs-search` to give models `glob` file discovery and `grep` content search over a local workspace. Searches need no host `rg` installation or filesystem provider, return workdir-relative results, and include hidden and ignored files while excluding VCS metadata. Configurable caps bound inline output; with an optional spill store, capped results remain fully recoverable. Choose the sibling `dsh-tool-fs` package for reading, writing, or editing files.
|
|
13
13
|
|
|
14
14
|
## Table of Contents
|
|
15
15
|
|
|
@@ -134,7 +134,7 @@ Read these pages when the package-level contract is not enough. They move from t
|
|
|
134
134
|
|
|
135
135
|
#### What the model sees
|
|
136
136
|
|
|
137
|
-
|
|
137
|
+
At assembly time, each section checks `ctx.tools.get(name, scope)` and renders only while its tool is visible. The grep paragraph includes its read follow-up sentence only while read is visible. The original text and section order stay unchanged for the same supported tool set, including PTC capabilities behind `run_code`. This scope-dependent text selection applies to system-prompt sections. Tool schema descriptions remain registration-time text; in particular, the grep schema still recommends read even in a scope that hides read. Scope-dependent schema wording is not implemented.
|
|
138
138
|
|
|
139
139
|
##### Glob guidance with `sampleOverCapGlobResults: true`
|
|
140
140
|
|
|
@@ -156,11 +156,11 @@ Use the grep tool — not shell grep or rg — to search file contents. Use read
|
|
|
156
156
|
|
|
157
157
|
#### Token effect
|
|
158
158
|
|
|
159
|
-
|
|
159
|
+
Guidance cost follows the visible tools; the required sampling choice selects one glob variant.
|
|
160
160
|
|
|
161
161
|
#### KV Cache effect
|
|
162
162
|
|
|
163
|
-
Prefix-stable while the plugin scope, sampling choice, and guidance text are unchanged.
|
|
163
|
+
Prefix-stable while the visible tool set, plugin scope, sampling choice, and guidance text are unchanged. Restrictions, activation, disposal, or changing the choice may invalidate reuse from the first changed section.
|
|
164
164
|
|
|
165
165
|
### Tool schemas
|
|
166
166
|
|
package/README.zh.md
CHANGED
|
@@ -9,7 +9,7 @@ kind: "package-reference"
|
|
|
9
9
|
|
|
10
10
|
## 概述
|
|
11
11
|
|
|
12
|
-
`dsh-tool-fs-search`
|
|
12
|
+
使用 `dsh-tool-fs-search` 为模型提供本地工作区中的 `glob` 文件发现与 `grep` 内容搜索。搜索无需宿主安装 `rg` 或提供文件系统后端;结果相对于工作目录,并包含隐藏与忽略文件但排除 VCS 元数据。可配置上限约束内联输出;挂载可选 spill 存储后,达到上限的结果仍可完整恢复。若需读取、写入或编辑文件,请选择同级 `dsh-tool-fs` 包。
|
|
13
13
|
|
|
14
14
|
## 目录
|
|
15
15
|
|
|
@@ -134,7 +134,7 @@ Node 部署在受支持的 macOS、Linux 与 Windows 目标上获得 `@vscode/ri
|
|
|
134
134
|
|
|
135
135
|
#### 模型看到的内容
|
|
136
136
|
|
|
137
|
-
|
|
137
|
+
组装时,每个段落通过 `ctx.tools.get(name, scope)` 检查对应工具,仅在其可见时输出。grep 段落仅在 read 可见时包含后续使用 read 的句子。同一受支持工具集合下,原文和段落顺序保持不变,包括通过 `run_code` 暴露的 PTC 能力。 这种按 scope 选择文本的机制适用于系统提示词段落。工具 schema 描述仍是注册时的文本;具体而言,即使 scope 隐藏了 read,grep 的 schema 仍会推荐 read。尚未实现按 scope 改变 schema 措辞。
|
|
138
138
|
|
|
139
139
|
##### 启用 `sampleOverCapGlobResults: true` 时的 Glob 指导
|
|
140
140
|
|
|
@@ -156,11 +156,11 @@ Use the grep tool — not shell grep or rg — to search file contents. Use read
|
|
|
156
156
|
|
|
157
157
|
#### Token 影响
|
|
158
158
|
|
|
159
|
-
|
|
159
|
+
指导成本取决于可见工具;必填的采样选择决定采用哪一个 glob 变体。
|
|
160
160
|
|
|
161
161
|
#### KV Cache 影响
|
|
162
162
|
|
|
163
|
-
|
|
163
|
+
可见工具集合、插件作用域、采样选择与指导文本不变时前缀稳定。限制、激活、dispose(资源释放)或改变选择可能从首个变化的段落开始使复用失效。
|
|
164
164
|
|
|
165
165
|
### 工具 schema
|
|
166
166
|
|
package/lib/index.js
CHANGED
|
@@ -764,7 +764,7 @@ function presentGlobResult(_args, result) {
|
|
|
764
764
|
return view;
|
|
765
765
|
}
|
|
766
766
|
/**
|
|
767
|
-
* Register the `glob` tool and its system-prompt guidance.
|
|
767
|
+
* Register the `glob` tool and its scope-aware system-prompt guidance.
|
|
768
768
|
*
|
|
769
769
|
* @param ctx - the plugin context; registrations are effects scoped to it, and
|
|
770
770
|
* execution uses its `subprocess` service.
|
|
@@ -775,7 +775,7 @@ function applyGlobTool(ctx, caps) {
|
|
|
775
775
|
ctx.systemPrompt.section({
|
|
776
776
|
name: "tool:glob",
|
|
777
777
|
order: ctx.systemPrompt.getSectionOrder("TOOL_GLOB"),
|
|
778
|
-
text: `Use the glob tool — not shell find — to discover files by path pattern. A pattern with no "/" matches basenames at any depth, so "*" matches every file in the tree rather than its top level. Results are files only, never directories, and include hidden and ignored files: a result that fits comes back in modification-time order, ${overCapGuidance}`
|
|
778
|
+
text: ({ scope }) => ctx.tools.get("glob", scope) === void 0 ? "" : `Use the glob tool — not shell find — to discover files by path pattern. A pattern with no "/" matches basenames at any depth, so "*" matches every file in the tree rather than its top level. Results are files only, never directories, and include hidden and ignored files: a result that fits comes back in modification-time order, ${overCapGuidance}`
|
|
779
779
|
});
|
|
780
780
|
const overCapDescription = caps.sampleOverCapGlobResults ? `a larger result instead returns ${caps.maxResults} paths sampled across top-level entries` : `a larger result returns the first ${caps.maxResults} paths in modification-time order`;
|
|
781
781
|
const tool = defineTool({
|
|
@@ -1074,7 +1074,7 @@ function presentGrepResult(_args, result) {
|
|
|
1074
1074
|
return view;
|
|
1075
1075
|
}
|
|
1076
1076
|
/**
|
|
1077
|
-
* Register the `grep` tool and its system-prompt guidance.
|
|
1077
|
+
* Register the `grep` tool and its scope-aware system-prompt guidance.
|
|
1078
1078
|
*
|
|
1079
1079
|
* @param ctx - the plugin context; registrations are effects scoped to it, and
|
|
1080
1080
|
* execution uses its `subprocess` service.
|
|
@@ -1084,7 +1084,7 @@ function applyGrepTool(ctx, caps) {
|
|
|
1084
1084
|
ctx.systemPrompt.section({
|
|
1085
1085
|
name: "tool:grep",
|
|
1086
1086
|
order: ctx.systemPrompt.getSectionOrder("TOOL_GREP"),
|
|
1087
|
-
text: "Use the grep tool — not shell grep or rg — to search file contents. Use read on a matched file when you need surrounding context."
|
|
1087
|
+
text: ({ scope }) => ctx.tools.get("grep", scope) === void 0 ? "" : "Use the grep tool — not shell grep or rg — to search file contents." + (ctx.tools.get("read", scope) === void 0 ? "" : " Use read on a matched file when you need surrounding context.")
|
|
1088
1088
|
});
|
|
1089
1089
|
const tool = defineTool({
|
|
1090
1090
|
name: "grep",
|
package/lib/types/glob.d.ts
CHANGED
|
@@ -136,7 +136,7 @@ export declare function presentGlobResult(_args: {
|
|
|
136
136
|
path?: string;
|
|
137
137
|
}, result: ToolResult): SearchResultView | undefined;
|
|
138
138
|
/**
|
|
139
|
-
* Register the `glob` tool and its system-prompt guidance.
|
|
139
|
+
* Register the `glob` tool and its scope-aware system-prompt guidance.
|
|
140
140
|
*
|
|
141
141
|
* @param ctx - the plugin context; registrations are effects scoped to it, and
|
|
142
142
|
* execution uses its `subprocess` service.
|
package/lib/types/grep.d.ts
CHANGED
|
@@ -131,7 +131,7 @@ export declare function presentGrepResult(_args: {
|
|
|
131
131
|
include?: string;
|
|
132
132
|
}, result: ToolResult): SearchResultView | undefined;
|
|
133
133
|
/**
|
|
134
|
-
* Register the `grep` tool and its system-prompt guidance.
|
|
134
|
+
* Register the `grep` tool and its scope-aware system-prompt guidance.
|
|
135
135
|
*
|
|
136
136
|
* @param ctx - the plugin context; registrations are effects scoped to it, and
|
|
137
137
|
* execution uses its `subprocess` service.
|
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.1.
|
|
4
|
+
"version": "0.1.5-alpha.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -31,27 +31,28 @@
|
|
|
31
31
|
"@deepseek-ai/schemastery": "^3.18.2"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@deepseek-ai/dsh-llm": "^0.1.
|
|
35
|
-
"@deepseek-ai/dsh-
|
|
36
|
-
"@deepseek-ai/dsh-
|
|
37
|
-
"@deepseek-ai/dsh-
|
|
38
|
-
"@deepseek-ai/dsh-
|
|
39
|
-
"@deepseek-ai/dsh-
|
|
40
|
-
"@deepseek-ai/dsh-
|
|
41
|
-
"@deepseek-ai/
|
|
42
|
-
"@deepseek-ai/
|
|
34
|
+
"@deepseek-ai/dsh-llm": "^0.1.5-alpha.2",
|
|
35
|
+
"@deepseek-ai/dsh-output-retention": "^0.1.5-alpha.2",
|
|
36
|
+
"@deepseek-ai/dsh-session": "^0.1.5-alpha.2",
|
|
37
|
+
"@deepseek-ai/dsh-spill": "^0.1.5-alpha.2",
|
|
38
|
+
"@deepseek-ai/dsh-subprocess": "^0.1.5-alpha.2",
|
|
39
|
+
"@deepseek-ai/dsh-timeout": "^0.1.5-alpha.2",
|
|
40
|
+
"@deepseek-ai/dsh-tools": "^0.1.5-alpha.2",
|
|
41
|
+
"@deepseek-ai/cordis": "^4.0.2",
|
|
42
|
+
"@deepseek-ai/dsh-system-prompt": "^0.1.5-alpha.2"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@deepseek-ai/dsh-agent": "^0.1.
|
|
46
|
-
"@deepseek-ai/dsh-subprocess": "^0.1.
|
|
47
|
-
"@deepseek-ai/dsh-subprocess-local": "^0.1.
|
|
48
|
-
"@deepseek-ai/dsh-
|
|
49
|
-
"@deepseek-ai/dsh-
|
|
50
|
-
"@deepseek-ai/dsh-
|
|
51
|
-
"@deepseek-ai/dsh-
|
|
52
|
-
"@deepseek-ai/dsh-
|
|
53
|
-
"@deepseek-ai/dsh-
|
|
45
|
+
"@deepseek-ai/dsh-agent": "^0.1.5-alpha.2",
|
|
46
|
+
"@deepseek-ai/dsh-subprocess": "^0.1.5-alpha.2",
|
|
47
|
+
"@deepseek-ai/dsh-subprocess-local": "^0.1.5-alpha.2",
|
|
48
|
+
"@deepseek-ai/dsh-llm": "^0.1.5-alpha.2",
|
|
49
|
+
"@deepseek-ai/dsh-output-retention": "^0.1.5-alpha.2",
|
|
50
|
+
"@deepseek-ai/dsh-session": "^0.1.5-alpha.2",
|
|
51
|
+
"@deepseek-ai/dsh-spill": "^0.1.5-alpha.2",
|
|
52
|
+
"@deepseek-ai/dsh-system-prompt": "^0.1.5-alpha.2",
|
|
53
|
+
"@deepseek-ai/dsh-timeout": "^0.1.5-alpha.2",
|
|
54
|
+
"@deepseek-ai/dsh-tools": "^0.1.5-alpha.2",
|
|
54
55
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
55
|
-
"@deepseek-ai/dsh-
|
|
56
|
+
"@deepseek-ai/dsh-scope": "^0.1.5-alpha.2"
|
|
56
57
|
}
|
|
57
58
|
}
|