@jayyuen66/dsh-zvec-grep 0.1.16 → 0.1.17

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/CHANGELOG.md CHANGED
@@ -2,6 +2,32 @@
2
2
 
3
3
  The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). The deviations below are deliberate: version headings carry no release date (publish times are recorded by the registry — `npm view <package> time`), and a release may add sections beyond the standard six, such as `Not changed, deliberately` and `Earlier`.
4
4
 
5
+ ## 0.1.17
6
+
7
+ 检索规则从常驻提示词搬进了按需加载的虚拟 skill;工具结果带上可判的错误码与调用态卡片;三个工具各声明自己的墙钟。工具面与 grep/rg 门禁的行为一字未变。
8
+
9
+ ### Added
10
+
11
+ - **工具错误码**:新增 `lib/zg-tool-error.ts` 的 `ZgToolError extends HarnessError` 与八枚码(`ZG_VERSION_TOO_OLD` / `ZG_REBUILD_LOCK_BUSY` / `ZG_LOCK_BUSY` / `ZG_PERMISSION_DENIED` / `ZG_DAEMON_UNAVAILABLE` / `ZG_ROOT_REJECTED` / `ZG_BAD_ARGUMENTS` / `ZG_COMMAND_FAILED`),`host.ts` 的抛错点逐处换成它(`RebuildLockBusyError` 保留自己的类与名字——下游 `instanceof` 读的就是它;唯一保留 `new Error` 的是装配期守卫,那不是工具失败)。理由:宿主 `errorInfo()` 判的是 `error instanceof HarnessError`,判不中时 `ToolFailure.info` 整块消失且静默;类身份按模块实例算,所以 `@deepseek-ai/dsh-error` 必须走 `peerDependencies`——写进 `devDependencies` 会被 rolldown 内联成第二个类,`instanceof` 恒 false。
12
+ - **调用态卡片**:三个工具都声明 `presentCall`(`zg_search` → `search`、`zg_index` → `other`、`zg_status` → `read`),标题依次取 `query` / `queries[0]` / `fts[0]` / `root`,取不到回落工具名。此前三者在时间线上是同一种默认卡片、分不出哪一步在做什么。三个工具的类别分别对齐各自的语义:建索引是动作不是检索,状态查询是读。
13
+ - **虚拟 skill `zvec-grep`**:路由规则**全文**经 `ctx.skills.register()` 注册,按需加载;常驻 system prompt 只留摘要。`routingText` 中文 2411 B / 英文 2731 B,常驻的 `routingSummary` 1411 B / 1591 B ⇒ 常驻提示词少 1000 B / 1140 B。`ctx.skills` 是可选服务且**不进 `inject`**:精简 profile 没装 `dsh-skill` 时照常装配,只是全文按需加载不了;为此常驻段与 skill 之间有一处口头指路,skill 没注册上时那半句不会出现(指向一个不存在的 skill 比不说更糟)。
14
+ - **工具级墙钟**:三个注册项各自声明 `timeoutMs`,由 `budgetOf(driven, waitsRebuild, rebuildWaitMs)` 加 60 秒余量算出:`zg_search` = 2×`searchTimeoutMs` + `rebuildWaitMs`(780 000 ms)、`zg_index` = `indexTimeoutMs`(660 000 ms)、`zg_status` = 2×`statusTimeoutMs` + `rebuildWaitMs`(300 000 ms)。翻倍覆盖的是「等一轮重建再执行一次」那条最坏路径,不是常规耗时。三个入参都取非 volatile 的部署值:宿主在 `tools.register` 时读一次 `timeoutMs`,取值若挂在只经 `updateVolatile` 更新的字段上,上限会永远停在装配那一刻的值。
15
+
16
+ ### Changed
17
+
18
+ - **宿主开发基线抬到 `0.2.2-rc.2`**:`devDependencies` 整组 `@deepseek-ai/dsh-*` 抬到 `0.2.2-rc.2` 并补 `@deepseek-ai/dsh-skill`;`peerDependencies` 与 `engines.dsh` 的支持窗口由 `^0.2.2-rc.1` 收到 `^0.2.2-rc.2`,同时新增 `@deepseek-ai/dsh-error` 为 optional peer(配 `peerDependenciesMeta`,与既有的 optional `@deepseek-ai/dsh` 同一档)。`@jayyuen66/dsh-plugin-shared` 仍是 `^0.2.8`;`pnpm-lock.yaml` 随两条新依赖重解(+18 行)。
19
+ - **两份 README 的宿主窗口叙述同步**:徽章、支持窗口句与 peer 范围说明里的 `rc.1` 一律改到 `rc.2`;「新线预发布不满足旧 caret」这一层的措辞不变——窗口是怎样就写怎样。
20
+
21
+ ### Not changed, deliberately
22
+
23
+ - **不用 `finalizeContent`**:它的价值落点已被宿主 spill 策略覆盖(除 `read` 外的每个工具结果都封顶在 `maxInlineTokens: 12500`,错误结果同样封),而本包的失败详情本来就按「首 400 + 中间标记 + 尾 400」字节截断。宿主唯一没封顶的是 `run_code` 里发起的工具调用,但 `finalizeContent` 在那条路径上同样不生效(它挂在 `ToolDefinition` 上,只在模型直调路径跑),所以这个钩子救不了那条缝。
24
+ - **grep/rg 门禁与配额算法一字未动**:`routingSummary` 只复述「不照做就会被门禁拒绝」的那几条规范,配额公式、重建流程、embedding 选择与结果判读仍留在 `routingText` 里由 skill 加载。
25
+
26
+ ### Verification
27
+
28
+ - `pnpm run check dsh-zvec-grep` 全绿:`tsc --noEmit`(两个 project)、`oxlint` 0 warning / 0 error、`oxfmt --check`、产物重建、`vitest run --coverage` 四项 100(`lib/skill.ts` 与 `lib/zg-tool-error.ts` 逐文件 100)。
29
+ - 变异测试逐条命中:`budgetOf` 改成常量 → 墙钟期望红;`host.js` 里的 `@deepseek-ai/dsh-error` 说明符改成不存在的包名 → 外部化断言红;`presentCall` 的标题改成工具名 → 卡片标题断言红。
30
+
5
31
  ## 0.1.16
6
32
 
7
33
  设置卡的下拉候选与说明浮层不再漂到浏览器最左边;shared 抬到 `^0.2.8`(含运行时几何自检)。zg 检索工具与路由行为不变。
package/README.md CHANGED
@@ -12,7 +12,7 @@
12
12
  <a href="https://github.com/JayYuen666/dsh-zvec-grep/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/JayYuen666/dsh-zvec-grep/ci.yml?branch=main&style=flat-square&label=ci" alt="ci" /></a>
13
13
  <img src="https://img.shields.io/badge/license-MIT-4c1?style=flat-square" alt="MIT" />
14
14
  <img src="https://img.shields.io/badge/node-%3E%3D24.9-4c1?style=flat-square&logo=nodedotjs&logoColor=white" alt="node" />
15
- <img src="https://img.shields.io/badge/dsh-%5E0.2.2--rc.1-658EFF?style=flat-square" alt="dsh" />
15
+ <img src="https://img.shields.io/badge/dsh-%5E0.2.2--rc.2-658EFF?style=flat-square" alt="dsh" />
16
16
  <a href="https://github.com/deepseek-ai/deepseek-harness"><img src="https://img.shields.io/badge/powered_by_dsh-4D6BFE?style=flat-square&logo=deepseek&logoColor=white" alt="powered by dsh" /></a>
17
17
  </p>
18
18
 
@@ -78,8 +78,8 @@ dsh plugin --profile web add @jayyuen66/dsh-zvec-grep
78
78
  Remove with `dsh plugin --profile web remove @jayyuen66/dsh-zvec-grep`. The package is on the public npm registry; no credentials, no scoped-registry line.
79
79
 
80
80
  - **Node.js `>= 24.9`** (ESM-only; that floor is what makes `require()` of an ESM entry work, hence `engines.node`).
81
- - **Host `dsh` on the `0.2.2-rc.1` line or later.** The host reads `engines.dsh` (`^0.2.2-rc.1`) and it **decides alone** - with that field present, compatibility is judged before `peerDependencies` is ever consulted, prereleases included. Any `0.2.x` at or above `0.2.2-rc.1` passes the host gate; strict npm peer resolution starts at `0.2.2-rc.1`. `0.3.0` and later need the risk grant `dsh plugin --profile <p> allow-version <pkg>@<ver> --dsh-version <exact> --accept-risk`. The support window rolls: at publish time this package is checked against every released host version inside the window - the judgement is the host's `--dump-config` layer line for this package, while the settings card and its namespace calls are verified once in full on the release's development baseline - and re-verified once the window moves, so the version number in this bullet is not a standing promise.
82
- - **No `@deepseek-ai/*` under `dependencies`, by contract** (`test/publish-manifest.test.ts`). Profiles install with `nodeLinker: hoisted` and `autoInstallPeers: false`, so a host package there becomes a real second copy; `@deepseek-ai/dsh-tools` keys its scheduler with a plain `Symbol`, so **every native tool call throws** in that profile while build, typecheck and coverage stay green. The `@deepseek-ai/dsh*` peers carry the same support-window range (`^0.2.2-rc.1`), while the exact pins in `devDependencies` are the compile-time discipline against a second host type surface - not a claim the host consults.
81
+ - **Host `dsh` on the `0.2.2-rc.2` line or later.** The host reads `engines.dsh` (`^0.2.2-rc.2`) and it **decides alone** - with that field present, compatibility is judged before `peerDependencies` is ever consulted, prereleases included. Any `0.2.x` at or above `0.2.2-rc.2` passes the host gate; strict npm peer resolution starts at `0.2.2-rc.2`. `0.3.0` and later need the risk grant `dsh plugin --profile <p> allow-version <pkg>@<ver> --dsh-version <exact> --accept-risk`. The support window rolls: at publish time this package is checked against every released host version inside the window - the judgement is the host's `--dump-config` layer line for this package, while the settings card and its namespace calls are verified once in full on the release's development baseline - and re-verified once the window moves, so the version number in this bullet is not a standing promise.
82
+ - **No `@deepseek-ai/*` under `dependencies`, by contract** (`test/publish-manifest.test.ts`). Profiles install with `nodeLinker: hoisted` and `autoInstallPeers: false`, so a host package there becomes a real second copy; `@deepseek-ai/dsh-tools` keys its scheduler with a plain `Symbol`, so **every native tool call throws** in that profile while build, typecheck and coverage stay green. The `@deepseek-ai/dsh*` peers carry the same support-window range (`^0.2.2-rc.2`), while the exact pins in `devDependencies` are the compile-time discipline against a second host type surface - not a claim the host consults.
83
83
  - **Value imports are required peers.** `@deepseek-ai/schemastery` is the host fork (only its `resolve` wraps `.volatile()` fields); `@deepseek-ai/dsh-typert-protocol` provides `TypertRemoteService`, a class to `extends`; `@deepseek-ai/dsh-scope` provides `scopeOf` for the step-admission lookup; shared's `lib/text` value-imports `@deepseek-ai/dsh-output-retention`. Each sits in `peerDependencies` plus the same exact pin in `devDependencies` - missing one is `ERR_MODULE_NOT_FOUND` at load, not a graceful downgrade. `dependencies` holds `@jayyuen66/dsh-plugin-shared` and `zod` (the latter versioned through the umbrella catalog, used by the settings card's strict codecs).
84
84
  - **What ships**: `host.js`, `client.js`, `cordis.patch.yml`, `icon.svg`, both READMEs, `CHANGELOG.md`, `THIRD_PARTY_NOTICES.md`, `locale/zh.json` + `locale/en.json`, and `docs/` (both DETAIL files). Artifacts are rebuilt by `prepack`, never committed.
85
85
 
package/README.zh-CN.md CHANGED
@@ -12,7 +12,7 @@
12
12
  <a href="https://github.com/JayYuen666/dsh-zvec-grep/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/JayYuen666/dsh-zvec-grep/ci.yml?branch=main&style=flat-square&label=ci" alt="ci" /></a>
13
13
  <img src="https://img.shields.io/badge/license-MIT-4c1?style=flat-square" alt="MIT" />
14
14
  <img src="https://img.shields.io/badge/node-%3E%3D24.9-4c1?style=flat-square&logo=nodedotjs&logoColor=white" alt="node" />
15
- <img src="https://img.shields.io/badge/dsh-%5E0.2.2--rc.1-658EFF?style=flat-square" alt="dsh" />
15
+ <img src="https://img.shields.io/badge/dsh-%5E0.2.2--rc.2-658EFF?style=flat-square" alt="dsh" />
16
16
  <a href="https://github.com/deepseek-ai/deepseek-harness"><img src="https://img.shields.io/badge/powered_by_dsh-4D6BFE?style=flat-square&logo=deepseek&logoColor=white" alt="powered by dsh" /></a>
17
17
  </p>
18
18
 
@@ -78,8 +78,8 @@ dsh plugin --profile web add @jayyuen66/dsh-zvec-grep
78
78
  卸载用 `dsh plugin --profile web remove @jayyuen66/dsh-zvec-grep`。包在公共 npm registry 上,不需要凭据,也不需要 scoped-registry 配置行。
79
79
 
80
80
  - **Node.js `>= 24.9`**(纯 ESM;正是这个下限让 `require()` 一枚 ESM 入口成为可能,`engines.node` 因此声明)。
81
- - **宿主 `dsh` 在 `0.2.2-rc.1` 或更新的 `0.2.2` 这条线上。** 宿主读 `engines.dsh`(`^0.2.2-rc.1`)且**单独决定**——该字段在场时兼容性先于 `peerDependencies` 判定,prerelease 参与比较。`0.2.x` 里不低于 `0.2.2-rc.1` 的都通过宿主装载门;npm 的严格 peer 解析从 `0.2.2-rc.1` 起算。`0.3.0` 及以上需要风险授权 `dsh plugin --profile <p> allow-version <pkg>@<ver> --dsh-version <确切版本> --accept-risk`。支持窗口是滚动的:本包在发布时把窗口内的每个已发布宿主版本逐版取证(判据是宿主 `--dump-config` 里本包的层行;设置卡与它的命名空间调用另在发布基线上全量取证一次),窗口滚动后重新取证,不把这一句里的版本号当长期承诺。
82
- - **按约定,`dependencies` 下不放任何 `@deepseek-ai/*`**(`test/publish-manifest.test.ts` 钉住)。profile 以 `nodeLinker: hoisted` 与 `autoInstallPeers: false` 安装,宿主包在那里会落成真实的第二份副本;`@deepseek-ai/dsh-tools` 用普通 `Symbol` 给调度器做键,那个 profile 里**每一次原生工具调用都抛错**,而构建、类型检查与覆盖率照绿。`@deepseek-ai/dsh*` 的 peer 写同一条支持窗口范围(`^0.2.2-rc.1`),`devDependencies` 里的精确钉版才是防「第二份宿主类型」的编译期纪律——那不是宿主会去读的声明。
81
+ - **宿主 `dsh` 在 `0.2.2-rc.2` 或更新的 `0.2.2` 这条线上。** 宿主读 `engines.dsh`(`^0.2.2-rc.2`)且**单独决定**——该字段在场时兼容性先于 `peerDependencies` 判定,prerelease 参与比较。`0.2.x` 里不低于 `0.2.2-rc.2` 的都通过宿主装载门;npm 的严格 peer 解析从 `0.2.2-rc.2` 起算。`0.3.0` 及以上需要风险授权 `dsh plugin --profile <p> allow-version <pkg>@<ver> --dsh-version <确切版本> --accept-risk`。支持窗口是滚动的:本包在发布时把窗口内的每个已发布宿主版本逐版取证(判据是宿主 `--dump-config` 里本包的层行;设置卡与它的命名空间调用另在发布基线上全量取证一次),窗口滚动后重新取证,不把这一句里的版本号当长期承诺。
82
+ - **按约定,`dependencies` 下不放任何 `@deepseek-ai/*`**(`test/publish-manifest.test.ts` 钉住)。profile 以 `nodeLinker: hoisted` 与 `autoInstallPeers: false` 安装,宿主包在那里会落成真实的第二份副本;`@deepseek-ai/dsh-tools` 用普通 `Symbol` 给调度器做键,那个 profile 里**每一次原生工具调用都抛错**,而构建、类型检查与覆盖率照绿。`@deepseek-ai/dsh*` 的 peer 写同一条支持窗口范围(`^0.2.2-rc.2`),`devDependencies` 里的精确钉版才是防「第二份宿主类型」的编译期纪律——那不是宿主会去读的声明。
83
83
  - **值导入都是必需 peer。** `@deepseek-ai/schemastery` 是宿主 fork(只有它的 `resolve` 认 `.volatile()` 字段);`@deepseek-ai/dsh-typert-protocol` 提供 `TypertRemoteService` 这个要 `extends` 的类;`@deepseek-ai/dsh-scope` 提供步骤准入判定用的 `scopeOf`;shared 的 `lib/text` 自己值导入 `@deepseek-ai/dsh-output-retention`。四者都落 peer 加同版精确钉的 devDependencies——缺一枚就是装载期 `ERR_MODULE_NOT_FOUND`,不是优雅降级。`dependencies` 里是 `@jayyuen66/dsh-plugin-shared` 与 `zod`(后者版本走伞根 catalog,供设置卡的 strict codec 校验)。
84
84
  - **随包发什么**:`host.js`、`client.js`、`cordis.patch.yml`、`icon.svg`、两份 README、`CHANGELOG.md`、`THIRD_PARTY_NOTICES.md`、`locale/zh.json` + `locale/en.json`、`docs/`(两份 DETAIL)。产物由 `prepack` 现产,不入库。
85
85
 
package/host.js CHANGED
@@ -7,6 +7,7 @@ import nodePath from "node:path";
7
7
  import { scopeOf } from "@deepseek-ai/dsh-scope";
8
8
  import { isRecord as isRecord$1 } from "@jayyuen66/dsh-plugin-shared/lib/record";
9
9
  import { errorText } from "@jayyuen66/dsh-plugin-shared/lib/errors";
10
+ import { HarnessError } from "@deepseek-ai/dsh-error";
10
11
  import { LOCALE_SETTINGS_NAMESPACE, messagesFor, resolveLocalePreference } from "@jayyuen66/dsh-plugin-shared/lib/locale";
11
12
  import { truncateEnd, truncateStart } from "@jayyuen66/dsh-plugin-shared/lib/text";
12
13
  import { Remote, TypertRemoteService } from "@deepseek-ai/dsh-typert-protocol";
@@ -171,6 +172,19 @@ const MESSAGES = {
171
172
  "5. 新建索引用用户选定的 embedding,未选定时不得臆测;切换 embedding 需 rebuild 才生效。",
172
173
  "6. zg_* 的 root 可省略:缺省为当前会话工作区(绝对路径)。显式传入时必须落在本会话可操作范围内——会话工作区本身、它的上级或下级目录,或本会话已登记过的工作区;其余绝对路径会被拒绝。"
173
174
  ].join("\n"),
175
+ routingSummary: [
176
+ "# zvec-grep(zg)工作区检索规则",
177
+ "",
178
+ "- 工作区**已建 zg 索引**(存在 .zvec-grep/manifest.json)时:所有检索必须先调用 zg_search;grep/rg 只作为它之后的精确字面/正则补充。门禁会拦下未经 zg_search 的 grep/rg(bash 里的命令与原生 grep 工具都算),被拦时按拒绝理由办:换一个更准确的 query/fts 重新 zg_search。",
179
+ "- 语义/关系/跨文件/多跳证据(架构、调用链、依赖、生命周期、数据流或控制流、设计意图、对比、跨文件综合)→ 必须先调用 zg_search。",
180
+ "- **无索引工作区**:zg_search 自动改走穷举词法检索,精确查找用它就够,不必先 zg_index(那要先下载 embedding 权重)。穷举检索不发放 grep/rg 配额。",
181
+ "- zg_index 仅在用户明确要求建/重建/删索引时调用,且 confirm 必须为 true;绝不静默建索引。",
182
+ "- zg_status 只在诊断索引缺失/失败/取消或显式监控进度时调用,普通搜索前不要调。",
183
+ "- zg_* 的 root 可省略:缺省为当前会话工作区(绝对路径)。显式传入时必须落在本会话可操作范围内——工作区本身、它的上级或下级目录,或本会话已登记过的工作区;其余绝对路径被拒绝。",
184
+ "",
185
+ "配额算法、重建流程、embedding 选择、检索结果的证据判读等完整规则见 skill `zvec-grep`(用 skill 工具按名加载)。"
186
+ ].join("\n"),
187
+ skillDescription: "zvec-grep 工作区检索的完整规则:索引/免索引两条路由、grep/rg 门禁与配额算法、重建与 embedding 选择、检索结果的证据判读。开始在本工作区做检索前先加载它,尤其当你准备用 grep/rg/glob 或语义检索、或要建/重建索引时。",
174
188
  argsMustBeObject: "zg {name}: 参数必须是一个 JSON 对象(收到 {received})",
175
189
  missingRequiredArgs: "zg {name}: 缺少必填参数 {fields}(缺失即拒绝,不产生副作用)",
176
190
  sandboxFacts: "(沙箱 mode={mode}{enforcement})",
@@ -337,6 +351,19 @@ const MESSAGES = {
337
351
  "5. Use the embedding the user picked for a new index; never guess when none was chosen. Switching embedding requires rebuild to take effect.",
338
352
  "6. root may be omitted for zg_* tools: it defaults to the current session workspace (absolute path). When passed explicitly it must stay inside this session's operable scope — the workspace itself, its parents or children, or a workspace this session already registered; any other absolute path is rejected."
339
353
  ].join("\n"),
354
+ routingSummary: [
355
+ "# zvec-grep (zg) workspace search rules",
356
+ "",
357
+ "- When the workspace **has a zg index** (a .zvec-grep/manifest.json exists): every search must call zg_search first; grep/rg only as the exact literal/regex follow-up. The gate refuses grep/rg that did not follow a zg_search (both the bash command and the native grep tool); when it refuses, take the way out it names: re-run zg_search with a more precise query/fts.",
358
+ "- Semantic / relational / cross-file / multi-hop evidence (architecture, call chains, dependencies, lifecycles, data or control flow, design intent, comparisons, cross-file synthesis) → always call zg_search first.",
359
+ "- Workspaces **without an index**: zg_search falls back to exhaustive lexical search, which is enough for exact lookups — no need to zg_index first (that would download embedding weights). Exhaustive search grants no grep/rg quota.",
360
+ "- Call zg_index only when the user explicitly asks to build/rebuild/drop the index, and confirm must be true; never index silently.",
361
+ "- Call zg_status only to diagnose a missing/failed/cancelled index or to watch progress explicitly; not before a normal search.",
362
+ "- root may be omitted for zg_* tools: it defaults to the current session workspace (absolute path). When passed explicitly it must stay inside this session's operable scope — the workspace itself, its parents or children, or a workspace this session already registered; any other absolute path is rejected.",
363
+ "",
364
+ "The full rules (quota arithmetic, rebuild flow, embedding choice, how to read result evidence) live in the skill `zvec-grep`: load it by name with the skill tool."
365
+ ].join("\n"),
366
+ skillDescription: "The full zvec-grep workspace search rules: both routes (indexed and index-free), the grep/rg gate and its quota arithmetic, rebuild and embedding choice, and how to read result evidence. Load it before searching in this workspace, especially before reaching for grep/rg/glob or semantic search, or before building/rebuilding an index.",
340
367
  argsMustBeObject: "zg {name}: arguments must be a JSON object (received {received})",
341
368
  missingRequiredArgs: "zg {name}: missing required arguments {fields} (refused outright, no side effects)",
342
369
  sandboxFacts: " (sandbox mode={mode}{enforcement})",
@@ -2381,6 +2408,52 @@ function classifyConcurrentFailure(stderr) {
2381
2408
  if (code === "ZG.ENGINE.PERMISSION_DENIED") return { kind: "permission-denied" };
2382
2409
  return null;
2383
2410
  }
2411
+ // lib/zg-tool-error.ts
2412
+ /**
2413
+ * 本包工具失败的错误码。
2414
+ *
2415
+ * 为什么要码而不只是人话:宿主 `packages/core/tools/src/pipeline.ts` 的 `errorInfo()` 用
2416
+ * `error instanceof HarnessError` 判断要不要把 `{ name, code }` 写进工具失败的
2417
+ * `ToolFailure.info`。判不中时 `info` **整块消失且没有任何提示** —— 模型只看到一句
2418
+ * `Error: …`,无法据此区分「等一会重试」与「换条路」。码是给模型与下游消费方判读的,
2419
+ * 人话仍然是 `message`,两者不互相替代。
2420
+ *
2421
+ * 码值一经发布即持久化契约(宿主 error-codes 的注释原话:`The values are persisted
2422
+ * contract`):会话日志里存的是这些串,改名等于让旧日志读不懂。要加码就新增,不要复用。
2423
+ */
2424
+ const ZG_TOOL_ERROR_CODES = {
2425
+ /** 装着的 zg 低于本包下限;出路是升级 zg(不是重试)。 */
2426
+ versionTooOld: "ZG_VERSION_TOO_OLD",
2427
+ /** 本插件正在重建该根:等它落定后重试一次即可,属于可重试。 */
2428
+ rebuildLockBusy: "ZG_REBUILD_LOCK_BUSY",
2429
+ /** 别的进程/操作占着锁:不归本插件管,重试也等不到。 */
2430
+ lockBusy: "ZG_LOCK_BUSY",
2431
+ /** 远程 embedding 授权被拒:出路在部署侧(开关或 grant)。 */
2432
+ permissionDenied: "ZG_PERMISSION_DENIED",
2433
+ /** 守护进程拉不起来或调用失败:模型该退回不起服务的那条路。 */
2434
+ daemonUnavailable: "ZG_DAEMON_UNAVAILABLE",
2435
+ /** 调用方给的根不存在或不被允许。 */
2436
+ rootRejected: "ZG_ROOT_REJECTED",
2437
+ /** 参数形态不合契约(非对象、必填缺失)。模型的输入错误,改参数即可。 */
2438
+ badArguments: "ZG_BAD_ARGUMENTS",
2439
+ /** zg 跑了但失败了,且不属于以上任何一类。 */
2440
+ commandFailed: "ZG_COMMAND_FAILED"
2441
+ };
2442
+ /**
2443
+ * 本包工具失败的统一错误类。
2444
+ *
2445
+ * 继承宿主的 `HarnessError` 是**整件事的关键**:那个类必须来自宿主那一份模块实例
2446
+ * (`@deepseek-ai/dsh-error` 声明在 peerDependencies,构建期按包名外部化),
2447
+ * `instanceof` 才成立。若把它挪进 devDependencies,rolldown 会把整包内联进 host.js,
2448
+ * 于是本包继承的是产物里另一个类,宿主的判据恒为 false —— 码静默消失,
2449
+ * 而源码、单测、类型检查一路绿。`test/publish-manifest.test.ts` 有一条正相断言盯着这一位。
2450
+ */
2451
+ var ZgToolError = class extends HarnessError {
2452
+ constructor(code, message, options) {
2453
+ super(message, code, options);
2454
+ this.name = "ZgToolError";
2455
+ }
2456
+ };
2384
2457
  // lib/zg-version.ts
2385
2458
  /**
2386
2459
  * 版本下限本体:比较用的对象是唯一事实来源,回显用的字符串由它派生——两处在编译期
@@ -2443,6 +2516,34 @@ function tooOldZgVersion(stdout) {
2443
2516
  const parsed = parseZgVersion(stdout);
2444
2517
  return parsed === void 0 || versionAtLeast(parsed, MINIMUM) ? void 0 : parsed;
2445
2518
  }
2519
+ // lib/skill.ts
2520
+ /** skill 名:kebab-case,也是模型用 skill 工具加载时的入参。 */
2521
+ const SKILL_NAME = "zvec-grep";
2522
+ /** 收窄判定:只认「有 register 且是函数」的对象,空对象不能冒充 skill 服务。 */
2523
+ function isSkillsFace(value) {
2524
+ if (typeof value !== "object" || value === null) return false;
2525
+ return typeof Reflect.get(value, "register") === "function";
2526
+ }
2527
+ /**
2528
+ * 注册(或重新注册)本包的检索规则 skill。
2529
+ *
2530
+ * 文案随调用点传入而不是在这里取:语言由 apply 时的官方 locale 偏好决定,与工具描述、
2531
+ * 参数说明同源——三处各取一次就会出现「工具描述是中文、skill 正文是英文」那种错位。
2532
+ * @param ctx - 只需 `get`(读可选服务),不要求 skills 进 inject
2533
+ * @param content - 规则全文(`messages.routingText`)
2534
+ * @param description - skill 目录里那行说明(模型据此决定要不要加载)
2535
+ * @returns 注册成功与否;未装载 skill 服务时为 false(不抛,摘要段照旧生效)
2536
+ */
2537
+ function registerRoutingSkill(ctx, content, description) {
2538
+ const found = ctx.get("skills");
2539
+ if (!isSkillsFace(found)) return false;
2540
+ found.register({
2541
+ name: SKILL_NAME,
2542
+ description,
2543
+ content
2544
+ });
2545
+ return true;
2546
+ }
2446
2547
  // lib/index-preflight.ts
2447
2548
  /**
2448
2549
  * 预检判「文件不合适」时接受的家庭错误码:其余(fd 耗尽、符号链接成环、IO 错误等环境故障)
@@ -3963,7 +4064,7 @@ const ZG_VERSION_TTL_MS = 6e5;
3963
4064
  const ZG_VERSION_PROBE_TIMEOUT_MS = 1e4;
3964
4065
  /** 版本过低的文案:回显实际版本与下限值,并给出唯一的出路(升级 zvec-grep)。 */
3965
4066
  function tooOldZgError(actual, messages) {
3966
- return new Error(fill(messages.zgVersionTooOld, {
4067
+ return new ZgToolError(ZG_TOOL_ERROR_CODES.versionTooOld, fill(messages.zgVersionTooOld, {
3967
4068
  actual: formatZgVersion(actual),
3968
4069
  minimum: MINIMUM_ZG_VERSION
3969
4070
  }));
@@ -4137,7 +4238,7 @@ function createDaemonHandle(options) {
4137
4238
  }
4138
4239
  setToken(void 0);
4139
4240
  ownsTokenFile = false;
4140
- throw new Error(fill(messages.daemonStartFailed, { detail: failure ?? "zg --server on exited 0 but the readiness probe still fails (another daemon may be using a different token)" }));
4241
+ throw new ZgToolError(ZG_TOOL_ERROR_CODES.daemonUnavailable, fill(messages.daemonStartFailed, { detail: failure ?? "zg --server on exited 0 but the readiness probe still fails (another daemon may be using a different token)" }));
4141
4242
  };
4142
4243
  return {
4143
4244
  tokenOf,
@@ -4224,9 +4325,9 @@ function hitSummary(stdoutText, limit, truncated, messages) {
4224
4325
  * 只有占锁方自报重建才带这个类型——把「别的进程占锁」也当成可等的重建,
4225
4326
  * 会在一把永远不会由本插件放开的锁上无界挂起。
4226
4327
  */
4227
- var RebuildLockBusyError = class extends Error {
4328
+ var RebuildLockBusyError = class extends ZgToolError {
4228
4329
  constructor(message) {
4229
- super(message);
4330
+ super(ZG_TOOL_ERROR_CODES.rebuildLockBusy, message);
4230
4331
  this.name = "RebuildLockBusyError";
4231
4332
  }
4232
4333
  };
@@ -4248,9 +4349,9 @@ async function runForegroundOnce(host, command, workdir, timeoutMs, opts) {
4248
4349
  if (resolved !== null) return resolved;
4249
4350
  const concurrent = classifyConcurrentFailure(result.stderr.text);
4250
4351
  if (concurrent?.kind === "lock-busy" && concurrent.rebuild) throw new RebuildLockBusyError(failure);
4251
- if (concurrent?.kind === "lock-busy") throw new Error(`${fill(opts.messages.lockBusyOtherOperation, { op: concurrent.ownerOperation ?? "unknown" })}\n${failure}`);
4252
- if (concurrent?.kind === "permission-denied") throw new Error(`${failure}\n${opts.messages.remoteAuthDenied}`);
4253
- throw new Error(failure);
4352
+ if (concurrent?.kind === "lock-busy") throw new ZgToolError(ZG_TOOL_ERROR_CODES.lockBusy, `${fill(opts.messages.lockBusyOtherOperation, { op: concurrent.ownerOperation ?? "unknown" })}\n${failure}`);
4353
+ if (concurrent?.kind === "permission-denied") throw new ZgToolError(ZG_TOOL_ERROR_CODES.permissionDenied, `${failure}\n${opts.messages.remoteAuthDenied}`);
4354
+ throw new ZgToolError(ZG_TOOL_ERROR_CODES.commandFailed, failure);
4254
4355
  }
4255
4356
  const notes = successNotes(result, opts.messages, opts.stdoutMaxBytes).map((note) => redactToken(note, secret));
4256
4357
  const text = redactToken(result.stdout.text, secret);
@@ -4282,7 +4383,7 @@ async function attemptWithRebuildWait(wait, messages, signal, attempt) {
4282
4383
  if (!(error instanceof RebuildLockBusyError) || entry === void 0) throw error;
4283
4384
  const outcome = await wait.rebuilds.wait(wait.root, messages, wait.maxWaitMs, signal);
4284
4385
  if (outcome === "settled") return attempt();
4285
- throw new Error(outcome === "aborted" ? messagesAbortedWaiting(entry.root, messages) : messagesWaitExpired(entry.root, wait.maxWaitMs, messages), { cause: error });
4386
+ throw new ZgToolError(ZG_TOOL_ERROR_CODES.lockBusy, outcome === "aborted" ? messagesAbortedWaiting(entry.root, messages) : messagesWaitExpired(entry.root, wait.maxWaitMs, messages), { cause: error });
4286
4387
  }
4287
4388
  }
4288
4389
  /**
@@ -4312,7 +4413,7 @@ async function runForeground(host, command, workdir, timeoutMs, opts) {
4312
4413
  * 模型据此给出的建议会把用户带偏。提前一次 existsSync 换明确归因。
4313
4414
  */
4314
4415
  function assertRootExists(root, messages) {
4315
- if (!existsSync(root)) throw new Error(fill(messages.rootMissing, { root }));
4416
+ if (!existsSync(root)) throw new ZgToolError(ZG_TOOL_ERROR_CODES.rootRejected, fill(messages.rootMissing, { root }));
4316
4417
  return root;
4317
4418
  }
4318
4419
  /**
@@ -4452,10 +4553,65 @@ function judgeRoot(rawRoot, cwd, messages, ledger, platform) {
4452
4553
  /** 工具入参的 root:过 root 判据,放行后登记进白名单(一处三工具共用)。 */
4453
4554
  function rootOf(args, exec, messages, ledger, platform) {
4454
4555
  const decision = judgeRoot(args["root"], sessionHeaderCwd(exec), messages, ledger, platform);
4455
- if (!decision.allowed) throw new Error(decision.reason);
4556
+ if (!decision.allowed) throw new ZgToolError(ZG_TOOL_ERROR_CODES.rootRejected, decision.reason);
4456
4557
  ledger.add(decision.root);
4457
4558
  return decision.root;
4458
4559
  }
4560
+ /**
4561
+ * 工具级预算在内部最坏路径之外多给的一分钟。
4562
+ *
4563
+ * 必须是**严格大于**而不是等于:`zg_index` 的内部超时(10 分钟)恰好等于宿主
4564
+ * `bash-local` 的 `maxTimeoutMs` 默认值,`ctx.shell.resolve` 会按
4565
+ * `min(请求, 上限)` 收敛,于是内层实际生效的截止与工具级这一枚同刻到期。
4566
+ * 两者同时触发时谁的结果落地是不确定的——宿主那一路会把结果换成
4567
+ * `tool call timed out after Nms`,本包自己那句「zg 执行超时,请缩小范围」
4568
+ * 就没机会说话。留一分钟,让内层永远先到期、先归因。
4569
+ */
4570
+ const TOOL_TIMEOUT_MARGIN_MS = 6e4;
4571
+ /**
4572
+ * 工具级墙钟预算:**最坏路径**而不是单次执行。
4573
+ *
4574
+ * 带 `rebuildWait` 的工具(检索与状态)在撞上同根重建时会等它落定后**重跑一次**,
4575
+ * 所以最坏是两趟执行加上那段等待;`zg_index` 自己就是那条重建,不等待也不重试,
4576
+ * 一趟就够。少算这一趟的话,宿主会在一趟本来还能成功的重试途中把调用掐掉,
4577
+ * 而模型看到的是一句「tool call timed out」——它无法知道是内部哪一段慢。
4578
+ * @param driven 该工具单趟执行的内部超时(部署值,非 volatile)
4579
+ * @param waitsRebuild 该工具是否会在锁忙时等重建并重试一次
4580
+ * @param rebuildWaitMs 等待重建落定的上限
4581
+ * @returns 交给 `ToolDefinition.timeoutMs` 的毫秒数
4582
+ */
4583
+ function budgetOf(driven, waitsRebuild, rebuildWaitMs) {
4584
+ return (waitsRebuild ? driven * 2 + rebuildWaitMs : driven) + TOOL_TIMEOUT_MARGIN_MS;
4585
+ }
4586
+ /**
4587
+ * 以 root 为标题的调用态:模型给了 root 就用它,否则回落工具名。
4588
+ *
4589
+ * root 可以省略(缺省=当前会话工作区),而调用态发生在解析之前——这里不猜工作区,
4590
+ * 猜错会让卡片写着一个模型没指定的目录。
4591
+ * @param args - 模型交进来的原始参数
4592
+ * @param toolName - 参数里没有 root 时的回落标题
4593
+ * @returns 卡片标题(永不为空串)
4594
+ */
4595
+ function rootTitleOf(args, toolName) {
4596
+ const { root } = args;
4597
+ return typeof root === "string" && root.length > 0 ? root : toolName;
4598
+ }
4599
+ /**
4600
+ * 检索类调用态的标题:优先用模型给的检索词,没有就给一句动作说明。
4601
+ *
4602
+ * 只读参数、不看结果:调用态卡片在 `execute` 之前就要画出来,那时还没有命中。
4603
+ * 参数是未经校验的原样 unknown,所以每一格都要先判类型再取——直接把
4604
+ * `args["query"]` 当字符串交给 UI,遇到数组或对象时卡片上会出现 `[object Object]`。
4605
+ * @param args - 模型交进来的原始参数(已由调用点收窄成对象)
4606
+ * @returns 卡片标题(永不为空串)
4607
+ */
4608
+ function queryTitleOf(args) {
4609
+ const { query, queries, fts, root } = args;
4610
+ if (typeof query === "string" && query.length > 0) return query;
4611
+ if (Array.isArray(queries) && typeof queries[0] === "string" && queries[0].length > 0) return queries[0];
4612
+ if (Array.isArray(fts) && typeof fts[0] === "string" && fts[0].length > 0) return fts[0];
4613
+ return typeof root === "string" && root.length > 0 ? root : "zg_search";
4614
+ }
4459
4615
  function define(host, spec) {
4460
4616
  const { parameters } = spec;
4461
4617
  const required = Array.isArray(parameters["required"]) ? parameters["required"].filter((item) => typeof item === "string") : [];
@@ -4463,18 +4619,21 @@ function define(host, spec) {
4463
4619
  name: spec.name,
4464
4620
  description: spec.description,
4465
4621
  parameters,
4622
+ timeoutMs: spec.timeoutMs,
4623
+ presentCall: (rawArgs) => spec.presentCall(isRecord$1(rawArgs) ? rawArgs : {}),
4624
+ isConcurrencySafe: () => spec.concurrencySafe,
4466
4625
  output: {
4467
4626
  schema: TEXT_OUTPUT_SCHEMA,
4468
4627
  render: (_args, value) => textBlock(value)
4469
4628
  },
4470
4629
  execute: async (rawArgs, exec) => {
4471
4630
  const messages = spec.messages();
4472
- if (!isRecord$1(rawArgs)) throw new Error(fill(messages.argsMustBeObject, {
4631
+ if (!isRecord$1(rawArgs)) throw new ZgToolError(ZG_TOOL_ERROR_CODES.badArguments, fill(messages.argsMustBeObject, {
4473
4632
  name: spec.name,
4474
4633
  received: rawArgs === null ? "null" : typeof rawArgs
4475
4634
  }));
4476
4635
  const missing = required.filter((fieldName) => rawArgs[fieldName] === void 0);
4477
- if (missing.length > 0) throw new Error(fill(messages.missingRequiredArgs, {
4636
+ if (missing.length > 0) throw new ZgToolError(ZG_TOOL_ERROR_CODES.badArguments, fill(messages.missingRequiredArgs, {
4478
4637
  name: spec.name,
4479
4638
  fields: missing.join(", ")
4480
4639
  }));
@@ -4930,17 +5089,17 @@ function daemonFailure(text, messages) {
4930
5089
  });
4931
5090
  const concurrent = classifyConcurrentFailure(text);
4932
5091
  if (concurrent?.kind === "lock-busy" && concurrent.rebuild) return new RebuildLockBusyError(failure);
4933
- if (concurrent?.kind === "lock-busy") return /* @__PURE__ */ new Error(`${fill(messages.lockBusyOtherOperation, { op: concurrent.ownerOperation ?? "unknown" })}\n${failure}`);
4934
- if (concurrent?.kind === "permission-denied") return /* @__PURE__ */ new Error(`${failure}\n${messages.remoteAuthDenied}`);
4935
- return new Error(failure);
5092
+ if (concurrent?.kind === "lock-busy") return new ZgToolError(ZG_TOOL_ERROR_CODES.lockBusy, `${fill(messages.lockBusyOtherOperation, { op: concurrent.ownerOperation ?? "unknown" })}\n${failure}`);
5093
+ if (concurrent?.kind === "permission-denied") return new ZgToolError(ZG_TOOL_ERROR_CODES.permissionDenied, `${failure}\n${messages.remoteAuthDenied}`);
5094
+ return new ZgToolError(ZG_TOOL_ERROR_CODES.commandFailed, failure);
4936
5095
  }
4937
5096
  /** daemon 调用的传输层失败(fetch 层):取消/超时与 CLI lane 同一套归因。 */
4938
5097
  function daemonTransportFailure(error, exec, messages, token) {
4939
5098
  if (!(isRecord$1(error) && error["name"] === "AbortError")) {
4940
5099
  const detail = redactToken(errorText(error), token);
4941
- return new Error(fill(messages.mcpCallFailed, { detail }), { cause: error });
5100
+ return new ZgToolError(ZG_TOOL_ERROR_CODES.daemonUnavailable, fill(messages.mcpCallFailed, { detail }), { cause: error });
4942
5101
  }
4943
- return new Error(exec.signal.aborted ? messages.abortedFailure : messages.timeoutFailure);
5102
+ return new ZgToolError(ZG_TOOL_ERROR_CODES.daemonUnavailable, exec.signal.aborted ? messages.abortedFailure : messages.timeoutFailure);
4944
5103
  }
4945
5104
  /** daemon 成功应答的后处理:截尾(保尾部)与命中摘要,与 CLI lane 同一套路。 */
4946
5105
  function daemonSuccessText(text, stdoutMaxBytes, summaryLimit, messages) {
@@ -5070,6 +5229,13 @@ function registerSearchTool(runtime, registered) {
5070
5229
  description: registered.searchToolDescription,
5071
5230
  messages: runtime.messages,
5072
5231
  parameters: searchToolParameters(registered),
5232
+ concurrencySafe: true,
5233
+ timeoutMs: budgetOf(runtime.config.searchTimeoutMs, true, runtime.config.rebuildWaitMs),
5234
+ presentCall: (args) => ({
5235
+ card: "generic",
5236
+ title: queryTitleOf(args),
5237
+ kind: "search"
5238
+ }),
5073
5239
  run: (args, exec, messages) => runSearchTool(runtime, args, exec, messages)
5074
5240
  });
5075
5241
  }
@@ -5185,17 +5351,17 @@ async function startBackgroundIndex(runtime, root, indexArgs, messages, claimed)
5185
5351
  };
5186
5352
  if (runtime.jobsOf() === void 0) {
5187
5353
  runtime.rebuilds.release(root, claimed);
5188
- throw new Error(messages.endpointJobsUnavailable);
5354
+ throw new ZgToolError(ZG_TOOL_ERROR_CODES.daemonUnavailable, messages.endpointJobsUnavailable);
5189
5355
  }
5190
5356
  const spawned = await spawnIndexWrite(routes, messages, indexArgs, readDefaultEmbedding(runtime.config));
5191
5357
  if ("error" in spawned) {
5192
5358
  runtime.rebuilds.release(root, claimed);
5193
- throw new Error(spawned.error);
5359
+ throw new ZgToolError(ZG_TOOL_ERROR_CODES.commandFailed, spawned.error);
5194
5360
  }
5195
5361
  const attached = attachIndexWrite(routes, root, messages, spawned, claimed);
5196
5362
  if ("error" in attached) {
5197
5363
  runtime.rebuilds.release(root, claimed);
5198
- throw new Error(attached.error);
5364
+ throw new ZgToolError(ZG_TOOL_ERROR_CODES.commandFailed, attached.error);
5199
5365
  }
5200
5366
  runtime.rebuilds.attach(root, attached.jobId, claimed);
5201
5367
  return { text: fill(messages.indexBackgroundStarted, {
@@ -5246,6 +5412,13 @@ function registerIndexTool(runtime, registered) {
5246
5412
  description: registered.indexToolDescription,
5247
5413
  messages: runtime.messages,
5248
5414
  parameters: indexToolParameters(registered),
5415
+ concurrencySafe: false,
5416
+ timeoutMs: budgetOf(runtime.config.indexTimeoutMs, false, runtime.config.rebuildWaitMs),
5417
+ presentCall: (args) => ({
5418
+ card: "generic",
5419
+ title: rootTitleOf(args, "zg_index"),
5420
+ kind: "other"
5421
+ }),
5249
5422
  run: (args, exec, messages) => runIndexTool(runtime, args, exec, messages)
5250
5423
  });
5251
5424
  }
@@ -5317,6 +5490,13 @@ function registerStatusTool(runtime, registered) {
5317
5490
  }
5318
5491
  }
5319
5492
  },
5493
+ concurrencySafe: true,
5494
+ timeoutMs: budgetOf(runtime.config.statusTimeoutMs, true, runtime.config.rebuildWaitMs),
5495
+ presentCall: (args) => ({
5496
+ card: "generic",
5497
+ title: rootTitleOf(args, "zg_status"),
5498
+ kind: "read"
5499
+ }),
5320
5500
  run: (args, exec, messages) => runStatusTool(runtime, args, exec, messages)
5321
5501
  });
5322
5502
  }
@@ -5326,13 +5506,16 @@ function registerZvecTools(runtime, registered) {
5326
5506
  registerIndexTool(runtime, registered);
5327
5507
  registerStatusTool(runtime, registered);
5328
5508
  }
5329
- /** 硬规则段(systemPrompt):文本取注册期文案,随注册一次性交给宿主。 */
5509
+ /** 硬规则段(systemPrompt)+ 规则全文的虚拟 skill。
5510
+ * 常驻的只有摘要(逐条对应「不照做会被门禁拒绝」);全文注册成 skill `zvec-grep`,
5511
+ * 模型按需用 skill 工具加载。拆开的理由与两边各放什么见 lib/skill.ts 的头注释。 */
5330
5512
  function registerRoutingSection(host, registered) {
5331
5513
  host.systemPrompt.section({
5332
5514
  name: ROUTING_NAME,
5333
5515
  order: ROUTING_ORDER,
5334
- text: registered.routingText
5516
+ text: registered.routingSummary
5335
5517
  });
5518
+ registerRoutingSkill(host, registered.routingText, registered.skillDescription);
5336
5519
  }
5337
5520
  /**
5338
5521
  * 安全后备 guard(只拦 zg_*)+ search-first 门禁(拦 bash/pwsh 里的 grep/rg
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jayyuen66/dsh-zvec-grep",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
4
4
  "description": "dsh 工作区语义检索插件(zg):zg_search / zg_index / zg_status + 本地 embedding 设置卡片 + systemPrompt 路由规则 + guard 安全兜底。",
5
5
  "keywords": [
6
6
  "cordis",
@@ -82,6 +82,7 @@
82
82
  "@deepseek-ai/dsh-session-projection": "0.2.2-rc.2",
83
83
  "@deepseek-ai/dsh-settings": "0.2.2-rc.2",
84
84
  "@deepseek-ai/dsh-shell": "0.2.2-rc.2",
85
+ "@deepseek-ai/dsh-skill": "0.2.2-rc.2",
85
86
  "@deepseek-ai/dsh-subprocess": "0.2.2-rc.2",
86
87
  "@deepseek-ai/dsh-subprocess-local": "0.2.2-rc.2",
87
88
  "@deepseek-ai/dsh-system-prompt": "0.2.2-rc.2",
@@ -109,10 +110,11 @@
109
110
  "vitest": "5.1.0"
110
111
  },
111
112
  "peerDependencies": {
112
- "@deepseek-ai/dsh": "^0.2.2-rc.1",
113
- "@deepseek-ai/dsh-output-retention": "^0.2.2-rc.1",
114
- "@deepseek-ai/dsh-scope": "^0.2.2-rc.1",
115
- "@deepseek-ai/dsh-typert-protocol": "^0.2.2-rc.1",
113
+ "@deepseek-ai/dsh": "^0.2.2-rc.2",
114
+ "@deepseek-ai/dsh-error": "^0.2.2-rc.2",
115
+ "@deepseek-ai/dsh-output-retention": "^0.2.2-rc.2",
116
+ "@deepseek-ai/dsh-scope": "^0.2.2-rc.2",
117
+ "@deepseek-ai/dsh-typert-protocol": "^0.2.2-rc.2",
116
118
  "@deepseek-ai/schemastery": "^3.19.0"
117
119
  },
118
120
  "peerDependenciesMeta": {
@@ -122,7 +124,7 @@
122
124
  },
123
125
  "icon": "icon.svg",
124
126
  "engines": {
125
- "dsh": "^0.2.2-rc.1",
127
+ "dsh": "^0.2.2-rc.2",
126
128
  "node": ">=24.9.0"
127
129
  },
128
130
  "dsh": {