@jayyuen66/dsh-zvec-grep 0.1.8 → 0.1.10

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,56 @@
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).
4
4
 
5
+ ## 0.1.10
6
+
7
+ 一轮跨面审查修复:search-first 门禁的词法判据重建、重建注册表代次化,状态读面与发布链收口。
8
+
9
+ ### Changed
10
+
11
+ - **发布链加固**(`.github/workflows/publish.yml`):分支守卫改比完整 `refs/heads/` ref;npm token 形态校验(`ghp_`/非 `npm_` 前缀拒用);发布对象改为 check 验过的那枚 tarball 本体、不再解包重打;发布前查 registry 版本占用,发布后轮询可见性(上限 5 分钟)。ci.yml 的 attest 限默认分支 dispatch;actionlint 的 SC2016 豁免从全局 `-ignore` 收窄为按文件 `-config-file`。
12
+ - **依赖与元数据**:author 改对象形(带 URL);`@deepseek-ai/schemastery` peer 放宽为 `^3.18.6-alpha.1`;devDependencies 新增 fast-check 4.10.2;catalog 的 shared 抬到 0.2.2;LICENSE 署名同步。
13
+
14
+ ### Fixed
15
+
16
+ - **门禁词法**(`lib/search-predicates.ts`):包装命令取值旗标按包装名分表(sudo/time/git/xargs 各自的 `-n/-p/-E/-r/-t` 不再误吞真命令);新增检索侧取值旗标表与重定向标记(`grep foo src > /tmp/out` 的落点不算操作数);组字符只在独立成词时分隔(`${DIR}/src` 不再被切碎放行);命令位绝对路径不再当根外目标。
17
+ - **重建注册表代次化**(`lib/rebuild-state.ts`):`release`/`attach` 增加可选 claim 凭据校验,迟到收尾不再删改同根新条目;`wait` 改递归 `waitCovering`,祖先+后代同时覆盖时逐轮都等;全部键经 `normalizeRoot`。
18
+ - **状态读面**(`host.ts`、`lib/rebuild-remote.ts`):zg_status 的锁忙 stderr 不再被吸收成「未就绪」;`comparablePath` 的 `/private` 剥除加 darwin 门控;超时 `jobs.kill` 包 try、失效退回 `killProc`;历史裁剪按 `startedAt` 排序;`roots()` 探测失败不再连带白名单不可用;超时分钟数 `Math.max(1, ceil)`。
19
+ - **卡片与草稿**(`lib/card-logic.ts`、`lib/card-draft.ts`、`src/client-entry.ts`):端点草稿逐字回显,键入中不被 URL 校验吞;草稿/已提交两层都只判自有属性;useRebuild 加 jobRef 代次与重挂置真。
20
+ - **散修**:`lib/cli.ts` 查询串改 `--hybrid=` 等号拼值(`-` 开头的查询不再被当旗标)、embedding 引用 trim;`lib/messages.ts` `fill()` 只取自有属性;`lib/argv-guard.ts` 计数改过滤后长度;`lib/index-preflight.ts` 增 ENAMETOOLONG;`lib/sandbox-note.ts` trim 加「unknown」兜底;`lib/zg-errors.ts` 明细只认第一个错误块;`lib/zg-config.ts` 远程端点走与 HF 镜像同一套规范化校验;`lib/embedding-catalog.ts` 目录深冻结。
21
+
22
+ ### Added
23
+
24
+ - **测试三层**:`test/platform/platform.test.ts`(平台门控/win32 根拒绝/CRLF/shq 往返)、`test/property/` 三件(paths、rebuild-state、zg-errors,fast-check)、`test/sandbox-note.test.ts`、`test/zg-config.test.ts`。
25
+
26
+ ## 0.1.9
27
+
28
+ 这一版让 search-first 门禁认识宿主的步骤准入,并把设置卡与读面校验统一到 shared 组件和 zod;
29
+ 宿主开发线抬到 0.2.2-alpha.2。
30
+
31
+ ### Changed
32
+
33
+ - **设置卡迁到 shared 组件与 zod**:字段版式、保存条与状态条改用 `@jayyuen66/dsh-plugin-shared/lib/card-ui`;
34
+ `defaultLimit` / `grepBudgetPerSearch` / `unlockWindowMin` 的输入与显示共用 zod 区间 schema,
35
+ `hfEndpoint` 只接受 http(s) URL。
36
+ - **重建轮询回执改按 schema 容错投影**:未知状态、非数字退出码、非字符串输出都折成缺位,坏类型不再带到
37
+ 渲染期;`src/rebuild-reader.ts` 的两个 strict codec 改由 zod 生成。
38
+ - **client 产物按宿主 `PLATFORM_MODULES` 外置 zod**;`zod` 进入 `dependencies`。
39
+ - **宿主开发线抬到 `0.2.2-alpha.2`**:devDependencies 与 catalog/overrides 同值;`@deepseek-ai/dsh*` 的 peer
40
+ 改为同一条支持窗口范围(`^0.2.1-rc.3`,schemastery 仍钉宿主自带版本),精确钉版只留在 devDependencies。
41
+ - **插件页展示面进包**:新增 `locale/en.json`、`locale/zh.json` 与 `docs/DETAIL.md`、`docs/DETAIL.zh.md`;
42
+ `exports` 增加 `./locale/*.json`,`files` 收进 locale 与 docs。
43
+ - **正则常量提取**:错误明细解析、命中计数行等内联正则改为命名常量,行为不变。
44
+
45
+ ### Fixed
46
+
47
+ - **单仓安装态下 lint 把 `ToolBatchInput["agent"]` 读成 error 类型**:`@deepseek-ai/dsh-agent`
48
+ 只是 `@deepseek-ai/dsh-tools` 的 peer,单仓安装不会自动装它;补进 `devDependencies` 后
49
+ `typescript(no-unsafe-assignment)` 与 `no-unnecessary-type-assertion` 两族告警消失。
50
+ - **受限子代理与条件工具步骤被 search-first 门禁拦死**:门禁原先只看 `zg_search` 在注册表里是否存在,
51
+ 不看本步骤的准入视图;模型因此被迫调用一个本步骤调不动的工具。现在执行体带 `toolSet` 时按
52
+ `view(scope)` 判,`zg_search` 不在视图里就让路;没有步骤准入的宿主沿用原判据。为此新增
53
+ `@deepseek-ai/dsh-scope` 值导入(`scopeOf`),并列入 peer 与 devDependencies。
54
+
5
55
  ## 0.1.8
6
56
 
7
57
  ### Changed
@@ -139,6 +189,7 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
139
189
  - `@deepseek-ai/dsh-*` 家族与 peer 的 `@deepseek-ai/dsh` 从 `0.2.1-alpha.1` 升到 `0.2.1-alpha.2`;`@deepseek-ai/cordis` `4.0.5-alpha.1`、`@deepseek-ai/schemastery` `3.18.5-alpha.1`、`@deepseek-ai/cordis-plugin-timer` `1.1.7-alpha.1` **不动**——那是 alpha.2 自己钉的那几枚,registry 上没有更新的 alpha。
140
190
  - `pnpm-workspace.yaml` 整体换成与 `dsh-danger-guard` / `dsh-plugin-shared` 逐字节相同的那一份:`dsh-*` 86 枚 override 跟到 alpha.2,工具链跟到 registry 现行头(`@types/node` 26.6.3→26.6.5、`vitest` 与 `@vitest/coverage-v8` 5.0.2→5.0.3、`vite` 8.3.1→8.3.4、`rolldown` 1.2.11→1.2.13、`oxlint` 1.86.0→1.87.0、`oxfmt` 0.71.0→0.72.0、`oxlint-tsgolint` 7.0.2003→7.0.2004、`happy-dom` 20.14.5→20.14.6、`jsdom` 30.1.1→30.1.2)。`@jayyuen66/dsh-plugin-shared` `^0.1.3`→`^0.1.4`(实装的 0.1.2 比声明还旧,锁文件已过期)。
141
191
  - `engines` 取严格口径:`dsh: >=0.2.1-alpha.2`(shared 0.1.4 自己的 `engines.dsh` 就是这个下限,声明得更宽等于撒谎)、`node: ^22.19.0 || >=24.0.0`(同取自 shared)。宿主按 **peer 声明**判兼容、不读 `engines.dsh`,且逐条比对每一枚 `@deepseek-ai/dsh*`——本包的精确钉因此意味着**高于 0.2.1-alpha.2 的宿主也需要 `dsh plugin allow-version … --accept-risk`**,两份 README 已按实测写明。
192
+ (更正:宿主判据与上面这句相反——`engine.dsh` 在场时它**先判这一条且单独决定**,`peerDependencies` 根本不参与比较,比较时还带 `includePrerelease`(见 deepseek-harness `packages/boot/app-boot/src/plugin-compatibility.ts` 的 `satisfies` 与 `unmetRequirements`)。本包现行的 `engines.dsh` 是 `^0.2.1-rc.3`、`node` 是 `>=22.12.0`,两份 README 已按现行口径写。)
142
193
  - README 拆成中英两份:`README.md` 为英文、`README.zh-CN.md` 为中文,两份顶部互链。原来是一份文件里的 `## 中文` / `## English` 两段,正文一字未改地按语言切开。
143
194
  - 注释里「钉进依赖 `.d.ts` 的行号」全量换成文件 + 符号/原文锚点。抽查即见腐坏:`dsh-tools` 那组(`ToolDefinition` / `ToolGuard` / `ToolRuntime`)随 alpha.2 整体漂了 7–17 行,`tool.execute` 的调用点也是。测试夹具里的 `src/beta.ts:1-3` 那类是 **数据**(zg 的输出形态),不在射程内。
144
195
  - `.github/workflows/publish.yml` 跟 `dsh-danger-guard` 同款加固:`concurrency` 防两次 dispatch 并行、action 钉 commit SHA、预检加「读本包」这一档(只查依赖就发现不了「版本号没进 main 就触发」)、发布用的 `NODE_AUTH_TOKEN` 走与预检同款清洗、加 `--provenance` 与 `--publish-wait-timeout 600000`,并且不再把凭据长度打进日志。
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 JayYuen666
3
+ Copyright (c) 2026 JayYuen (JayYuen666)
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -77,9 +77,9 @@ dsh plugin --profile web add @jayyuen66/dsh-zvec-grep
77
77
  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.
78
78
 
79
79
  - **Node.js `>= 22.12`** (ESM-only; that floor is what makes `require()` of an ESM entry work, hence `engines.node`).
80
- - **Host `dsh` on the `0.2.1-rc.3` line.** The host reads `engines.dsh` (`^0.2.1-rc.3`) 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.1-rc.3` passes; `0.3.0` and later need the risk grant `dsh plugin --profile <p> allow-version <pkg>@<ver> --dsh-version <exact> --accept-risk`.
81
- - **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 `dsh-*` peers are pinned exactly at the `@deepseek-ai/dsh` peer's version - a compile-time discipline against a second host type surface, not a claim the host consults.
82
- - **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`; 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. The only `dependencies` entry is `@jayyuen66/dsh-plugin-shared`.
80
+ - **Host `dsh` on the `0.2.1-rc.3` / `0.2.2-alpha.2` line.** The host reads `engines.dsh` (`^0.2.1-rc.3`) 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.1-rc.3` passes; `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: this package is verified against the three most recently released host versions at publish time and re-verified once the window moves, so the version number in this bullet is not a standing promise.
81
+ - **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.1-rc.3`), while the exact pins in `devDependencies` are the compile-time discipline against a second host type surface - not a claim the host consults.
82
+ - **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).
83
83
  - **What ships**: `host.js`, `client.js`, `cordis.patch.yml`, `icon.svg`, both READMEs, `CHANGELOG.md`, `THIRD_PARTY_NOTICES.md`. Artifacts are rebuilt by `prepack`, never committed.
84
84
 
85
85
  ### <img src="https://api.iconify.design/lucide/arrow-down-to-line.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> Shared version floor
@@ -154,6 +154,7 @@ Output is plain text; timeouts 5 min (search) / 10 min (index) / 60 s (status);
154
154
  - **What counts as searching**: after quote/comment-aware tokenising of a bash/pwsh command string, grep/egrep/fgrep/rg at a command position, plus the native grep tool. `--help` / `--version`, `echo "grep x"` and commit messages do not.
155
155
  - **Quota per "session x index root"**: each successful `zg_search` re-arms `grepBudgetPerSearch` calls valid for `unlockWindowMin` minutes; the index root is the root itself or its nearest indexed ancestor (up to 8 levels up).
156
156
  - **Partitioning uses the root session** (walked up `header.parentSession`): the main agent and its subagents **share one quota**. Degradation never throws - a missing parent stops at the last known hop, a cycle stops before the first repeat.
157
+ - **Step admission stands the gate down**: when the host supplies a `toolSet` and this step's view does not admit `zg_search` (a restricted subagent or a conditional-tool step), grep/rg are not blocked - requiring a call this step cannot make is a dead end. Hosts without step admission keep the old criterion.
157
158
  - **"Indexed" means `<root>/.zvec-grep/manifest.json` exists *and* parses** with `manifestVersion` strictly 1 and `rootPaths` covering this directory (normalized equality, `/private` prefix stripped on macOS). The directory name alone is not enough - it is also zg's global home (`~/.zvec-grep`), and an existence-only check misreads a truncated or foreign manifest as "indexed", deadlocking both search and the gate.
158
159
  - The whitelist and unlock tables live in bounded memory (64 roots / 256 partitions) with touch-on-hit, expiry-then-LRU eviction; whitelist entries carry a one-day validity.
159
160
  - `enforceSearchFirst=false` disables only the gate; the confirm and root backstops stay.
package/README.zh-CN.md CHANGED
@@ -77,9 +77,9 @@ dsh plugin --profile web add @jayyuen66/dsh-zvec-grep
77
77
  卸载用 `dsh plugin --profile web remove @jayyuen66/dsh-zvec-grep`。包在公共 npm registry 上,不需要凭据,也不需要 scoped-registry 配置行。
78
78
 
79
79
  - **Node.js `>= 22.12`**(纯 ESM;正是这个下限让 `require()` 一枚 ESM 入口成为可能,`engines.node` 因此声明)。
80
- - **宿主 `dsh` 在 `0.2.1-rc.3` 这条线上。** 宿主读 `engines.dsh`(`^0.2.1-rc.3`)且**单独决定**——该字段在场时兼容性先于 `peerDependencies` 判定,prerelease 参与比较。`0.2.x` 里不低于 `0.2.1-rc.3` 的都通过;`0.3.0` 及以上需要风险授权 `dsh plugin --profile <p> allow-version <pkg>@<ver> --dsh-version <确切版本> --accept-risk`。
81
- - **按契约,`dependencies` 下不放任何 `@deepseek-ai/*`**(`test/publish-manifest.test.ts` 钉住)。profile 以 `nodeLinker: hoisted` 与 `autoInstallPeers: false` 安装,宿主包在那里会落成真实的第二份副本;`@deepseek-ai/dsh-tools` 用普通 `Symbol` 给调度器做键,那个 profile 里**每一次原生工具调用都抛错**,而构建、类型检查与覆盖率照绿。`dsh-*` peer 一律精确钉在 `@deepseek-ai/dsh` peer 的版本上——这是防「第二份宿主类型面」的编译期纪律,不是宿主会去读的声明。
82
- - **值导入都是必需 peer。** `@deepseek-ai/schemastery` 是宿主 fork(只有它的 `resolve` 认 `.volatile()` 字段);`@deepseek-ai/dsh-typert-protocol` 提供 `TypertRemoteService` 这个要 `extends` 的类;shared 的 `lib/text` 自己值导入 `@deepseek-ai/dsh-output-retention`。三者都落 peer 加同版精确钉的 devDependencies——缺一枚就是装载期 `ERR_MODULE_NOT_FOUND`,不是优雅降级。`dependencies` 里只有 `@jayyuen66/dsh-plugin-shared`。
80
+ - **宿主 `dsh` 在 `0.2.1-rc.3` / `0.2.2-alpha.2` 这条线上。** 宿主读 `engines.dsh`(`^0.2.1-rc.3`)且**单独决定**——该字段在场时兼容性先于 `peerDependencies` 判定,prerelease 参与比较。`0.2.x` 里不低于 `0.2.1-rc.3` 的都通过;`0.3.0` 及以上需要风险授权 `dsh plugin --profile <p> allow-version <pkg>@<ver> --dsh-version <确切版本> --accept-risk`。支持窗口是滚动的:本包在发布时最近的三个已发布宿主版本上逐版取证,窗口滚动后重新取证,不把这一句里的版本号当长期承诺。
81
+ - **按契约,`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.1-rc.3`),`devDependencies` 里的精确钉版才是防「第二份宿主类型面」的编译期纪律——那不是宿主会去读的声明。
82
+ - **值导入都是必需 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 校验)。
83
83
  - **随包发什么**:`host.js`、`client.js`、`cordis.patch.yml`、`icon.svg`、两份 README、`CHANGELOG.md`、`THIRD_PARTY_NOTICES.md`。产物由 `prepack` 现产,不入库。
84
84
 
85
85
  ### <img src="https://api.iconify.design/lucide/arrow-down-to-line.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> shared 的版本下限
@@ -154,6 +154,7 @@ dsh plugin --profile web add @jayyuen66/dsh-zvec-grep
154
154
  - **什么算检索**:bash/pwsh 命令串经引号/注释感知切词后,命令位上的 grep/egrep/fgrep/rg 与原生 grep 工具。`--help` / `--version`、`echo "grep x"`、commit message 不算。
155
155
  - **配额按「会话 × 索引根」**:每次成功 zg_search 重新武装 grepBudgetPerSearch 次、unlockWindowMin 分钟有效;索引根是 root 自身或含索引的最近祖先(最多上溯 8 层)。
156
156
  - **分片用根会话**(沿 `header.parentSession` 上溯到顶):主代理与子代理**共享一份额度**。上溯降级不抛错——查不到父就停在已知的最后一跳,成环就停在首次重复前。
157
+ - **步骤准入让路**:宿主提供 `toolSet` 且本步骤的视图不含 `zg_search` 时(受限子代理或条件工具步骤),grep/rg 不被拦——强迫模型去调一个本步骤调不动的工具是死路。不提供步骤准入的宿主沿用原判据。
157
158
  - **「含索引」= `<root>/.zvec-grep/manifest.json` 在盘上,*并且*解析得开**:`manifestVersion` 严格等于 1、`rootPaths` 覆盖该目录(归一相等,macOS 两侧剥 `/private` 前缀)。只判目录名不够——它同时是 zg 的全局 home(`~/.zvec-grep`);只判存在会把半截或外来的清单误判成有索引,把检索与门禁双向堵死。
158
159
  - 白名单/解锁表在内存里有界(64 根 / 256 分片),命中即触摸、先过期后 LRU 淘汰;白名单条目带一天有效期。
159
160
  - enforceSearchFirst=false 只关门禁;confirm 与 root 兜底照旧。
@@ -13,17 +13,26 @@
13
13
  上游由用户自行 `npm install -g @zvec/zvec-grep` 安装。正因如此,本包不随包附上游的许可文本:
14
14
  Apache-2.0 第 4 条的再分发条件挂在「被再分发的第三方代码」上,而本包里没有那段代码。若把两者
15
15
  打包在一起再分发,请按各自许可分别保留声明。
16
+ - 派生数据:`lib/embedding-catalog.ts` 的本地模型条目抄自上游 `0.2.2` 的 `EMBEDDING_MODEL_CATALOG`
17
+ (只取「引用 / 后端 / 维度」三列),`lib/routing.ts` 的工作区清单文件名等常量与上游同名同值。这些
18
+ 是名称与数值一类的派生数据,不含上游实现代码;上游改了名称表时由 `verify:env` 与这一族用例发现。
19
+ 再分发时请连同上游的 Apache-2.0 声明一起保留。
16
20
  - 版本契约:命令形态与旗标名按 `0.2.2` 书写;低于该版本本包在下发任何命令之前停住并点名实际版本
17
21
  (判据在 `lib/zg-version.ts`)。这是本包自负的责任边界——上游改了旗标语义却没升主版本时,只有
18
- 这一族用例与那道版本门能发现。
19
- - 数据边界:索引与向量库(`.zvec-grep/`、`manifest.json`)由上游读写,本包只判它是否存在、是否覆盖
20
- 目标根,不解析也不改写其内部结构。
21
-
22
- ## 编译期与运行期依赖:`@jayyuen66/dsh-plugin-shared`
23
-
24
- - 同作者的共享工具库(MIT),是本包 `dependencies` 里唯一一枚,随包从公共 npm 安装。
25
- - 它自己的宿主包 peer(含 `@deepseek-ai/dsh-output-retention`)由 dsh 运行时提供——本包必须把这
26
- 几枚也声明在 peer ∪ dev 上,否则装出去即 `ERR_MODULE_NOT_FOUND`(判据见
22
+ 这一族用例与那道版本门能发现。这道门是 **fail-open**:只认「整串就是一个三段数字」(`v` 前缀与
23
+ 首尾空白容忍),读不懂(多行、`0.2.2-rc.1`、`>=0.2.2`、探测失败)一律放行而不是拦死命令——把
24
+ 「探测不到」判成「太旧」,等于拿一个猜出来的版本拦住真实用户。
25
+ - 数据边界:索引与向量库(`.zvec-grep/`、`manifest.json`)由上游读写。本包只读 `manifest.json` 的
26
+ `manifestVersion` 与 `rootPaths[].absolutePath`,用于「这份清单是不是本包认得的索引、覆不覆盖目标根」
27
+ 的判定;其余字段与索引本体不解析,也从不写入或改写。
28
+
29
+ ## 编译期与运行期依赖
30
+
31
+ - `@jayyuen66/dsh-plugin-shared`(MIT):同作者的共享工具库,随包从公共 npm 安装。
32
+ - `zod`(MIT):设置卡 `src/rebuild-reader.ts` 的 strict codec 用它校验形状;版本走伞根 catalog,
33
+ client 产物按宿主 `PLATFORM_MODULES` 保持 `require("zod")` 外部化。
34
+ - shared 自己的宿主包 peer(含 `@deepseek-ai/dsh-output-retention`)由 dsh 运行时提供——本包必须把
35
+ 这几枚也声明在 peer ∪ dev 上,否则装出去即 `ERR_MODULE_NOT_FOUND`(判据见
27
36
  `test/publish-manifest.test.ts`)。
28
37
 
29
38
  ## 宿主:dsh 与 `@deepseek-ai/*`