@jayyuen66/dsh-zvec-grep 0.1.16 → 0.1.18
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 +50 -0
- package/README.md +5 -4
- package/README.zh-CN.md +5 -4
- package/client.js +252 -148
- package/docs/DETAIL.md +1 -1
- package/docs/DETAIL.zh.md +1 -1
- package/host.js +233 -46
- package/package.json +9 -7
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). 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.18
|
|
6
|
+
|
|
7
|
+
market 热挂与 bundle 层双路径装载时第二份 `apply` 整份让路(此前第二遍会撞「同名已注册」把 fiber 打成 failed);设置卡接「有字段越界就不许保存」那道门禁;卡片样式改用 shared 的共享 `<style>`;shared 抬到 `^0.2.9`,输入框不再撑出容器、小节内补上纵向间距。工具面与 grep/rg 门禁的行为一字未变。
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **单实例锁**:`apply` 在首道宿主守卫之后用 shared 的 `claimInstance` 抢 `INSTANCE_LOCK_KEY = "@jayyuen66/dsh-zvec-grep/instance"`,抢不到就 `console.warn` 一行「本次装配让路,工具与设置卡由在册的那一份提供」并直接返回。成因是 dshmarket 运行期热装会在 `<profile>/.dsh-market/` 下造一棵它自己的 Include 子树(`mkt-*`,`file://` 直连 `host.js`),与 profile 的 bundle 层解析到同一份模块却各起一个 fiber ⇒ 同一进程里 `apply` 跑两遍,第二遍的三个工具、prompt section 与 Typert Remote 服务注册全部撞名。锁随在册那一份的 fiber 卸载自动释放。
|
|
12
|
+
- **回归测试 `test/instance-lock.test.ts`(6 条)**:空作用域抢到且锁名落进服务表 / 已有一份在册时让路且**不再尝试 provide** / `provide` 抛错时让路、不把异常抛给调用方 / 没有注册口时放行 / `reflect` 在但没有 `provide` 时放行 / 两个不同键互不影响。`test/host.test.ts` 另加一条装配级用例:「第二份装配必须安静让路,绝不能把 fiber 打成 failed」,断言工具数、section 数、Remote 服务三者不变且 `warn` 恰好一次。夹具的 `reflect.provide` 因此从「重复写入覆盖」改成「重复即抛」——真 cordis 的 `Service` 构造就走这里,第二遍若没被锁挡住会当场抛错,而不是静默覆盖。
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- **三处逐字重复收进 shared**:`lib/skill.ts` 的注册正文(取可选 `skills` 服务 → 判形状 → 空正文不注册 → `register`)换成 shared 的 `registerSkill(ctx, spec)`,本文件只剩 `SKILL_NAME` 与把正文收成 spec 的那一层;`lib/messages.ts` 的 `fill()` 换成 shared 的 `fillPlaceholders`;`lib/daemon-client.ts` 的私有 `isRecord` 换成 shared 的 `lib/record`(本包那份少了 `!Array.isArray`,数组会被判成 record —— 这次顺手修掉)。
|
|
17
|
+
- **`fill()` 的缺值语义从「替空串」改成「保留原文」**:漏传或写错占位符时原样留着的 `{xxx}` 一眼可见,比一句悄悄塌成残句的文案好排查。`null` 仍照实渲染成 `"null"`(`exitCode` 这类字段的正常取值)。两条既有断言随之改判。
|
|
18
|
+
- **卡片样式改用 shared 的 `ensureCardUiCss()`**:不再把 `CARD_UI_CSS` 整段拼进本仓的 `<style>`,改为固定 id `dsh-card-ui-css` 的幂等注入 + 引用计数。
|
|
19
|
+
- **运行时依赖 shared 抬到 `^0.2.9`**。
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- **越界数字草稿会被静默丢掉**:`NumberField` 对越界草稿**不调 `onChange`**,于是它根本不进 `touched`。三个数字字段(`defaultLimit` / `grepBudgetPerSearch` / `unlockWindowMin`)现在都接 `onInvalidChange` 上报,卡片据此灰掉保存并在保存条上点名「有字段超出范围,先修正或撤销后再保存。」(`src/ui-messages.ts` 的 `invalidFields`);`resetToken` 在保存/撤销后把框里的非法草稿清回已提交值。
|
|
24
|
+
- **越界时连撤销都点不动**:上一版把「有未保存改动」与「有越界字段」混成保存条的一个 `disabled`。现在 `SaveBar` 分开算:保存被 `blocked` 拦下,撤销保持可点。
|
|
25
|
+
- **「已修改 N 项」把越界字段算重**:一个字段先写进合法草稿(进 `touched`)再改成越界草稿时,草稿差异与越界集各算一次。现在按字段名去重(`InvalidFields.fields`),一格只算一项。
|
|
26
|
+
- **输入控件撑出容器**(shared 侧):`.dsu-form` 整棵子树统一 `border-box`,否则 `.dsu-input` 的 `width:100%` 会连同左右 padding 一起撑出容器 26px。
|
|
27
|
+
- **小节内相邻元素间距为 0**(shared 侧):`.dsu-form .dsu-section>*+*` 给 10px,`.dsu-sectionHint` 4px,`.dsu-field` 之间仍 0。
|
|
28
|
+
|
|
29
|
+
## 0.1.17
|
|
30
|
+
|
|
31
|
+
检索规则从常驻提示词搬进了按需加载的虚拟 skill;工具结果带上可判的错误码与调用态卡片;三个工具各声明自己的墙钟。工具面与 grep/rg 门禁的行为一字未变。
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
|
|
35
|
+
- **工具错误码**:新增 `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。
|
|
36
|
+
- **调用态卡片**:三个工具都声明 `presentCall`(`zg_search` → `search`、`zg_index` → `other`、`zg_status` → `read`),标题依次取 `query` / `queries[0]` / `fts[0]` / `root`,取不到回落工具名。此前三者在时间线上是同一种默认卡片、分不出哪一步在做什么。三个工具的类别分别对齐各自的语义:建索引是动作不是检索,状态查询是读。
|
|
37
|
+
- **虚拟 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 比不说更糟)。
|
|
38
|
+
- **工具级墙钟**:三个注册项各自声明 `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` 更新的字段上,上限会永远停在装配那一刻的值。
|
|
39
|
+
|
|
40
|
+
### Changed
|
|
41
|
+
|
|
42
|
+
- **宿主开发基线抬到 `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 行)。
|
|
43
|
+
- **两份 README 的宿主窗口叙述同步**:徽章、支持窗口句与 peer 范围说明里的 `rc.1` 一律改到 `rc.2`;「新线预发布不满足旧 caret」这一层的措辞不变——窗口是怎样就写怎样。
|
|
44
|
+
|
|
45
|
+
### Not changed, deliberately
|
|
46
|
+
|
|
47
|
+
- **不用 `finalizeContent`**:它的价值落点已被宿主 spill 策略覆盖(除 `read` 外的每个工具结果都封顶在 `maxInlineTokens: 12500`,错误结果同样封),而本包的失败详情本来就按「首 400 + 中间标记 + 尾 400」字节截断。宿主唯一没封顶的是 `run_code` 里发起的工具调用,但 `finalizeContent` 在那条路径上同样不生效(它挂在 `ToolDefinition` 上,只在模型直调路径跑),所以这个钩子救不了那条缝。
|
|
48
|
+
- **grep/rg 门禁与配额算法一字未动**:`routingSummary` 只复述「不照做就会被门禁拒绝」的那几条规范,配额公式、重建流程、embedding 选择与结果判读仍留在 `routingText` 里由 skill 加载。
|
|
49
|
+
|
|
50
|
+
### Verification
|
|
51
|
+
|
|
52
|
+
- `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)。
|
|
53
|
+
- 变异测试逐条命中:`budgetOf` 改成常量 → 墙钟期望红;`host.js` 里的 `@deepseek-ai/dsh-error` 说明符改成不存在的包名 → 外部化断言红;`presentCall` 的标题改成工具名 → 卡片标题断言红。
|
|
54
|
+
|
|
5
55
|
## 0.1.16
|
|
6
56
|
|
|
7
57
|
设置卡的下拉候选与说明浮层不再漂到浏览器最左边;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.
|
|
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.
|
|
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.
|
|
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
|
|
|
@@ -108,6 +108,7 @@ If your profile pins `@jayyuen66/dsh-plugin-shared` with a pnpm `overrides` entr
|
|
|
108
108
|
|
|
109
109
|
- `dsh.bundle.patch` points at `cordis.patch.yml`, whose `insert:` block carries a single `- id: zvec-grep` entry with `name: "@jayyuen66/dsh-zvec-grep"` - the **bare package name** is what makes the host scan the client half. The card components are bundled into `client.js` (only `react` / `zod` stay external to the host's module table), so the card does not depend on a second package being loaded. Bundle installation goes through pnpm (>= 12.3.0).
|
|
110
110
|
- A missing injected surface keeps cordis from activating the entry (startup diagnostic: `pending (waiting for service: …)`); a malformed ctx throws `required services … missing` from apply.
|
|
111
|
+
- The two delivery paths - a dshmarket hot-mounted `mkt-*` include and the bundle layer - can resolve to the same module and run `apply` twice in one scope. The second assembly claims a private instance service and stands down with a single `console.warn`; the tools, the prompt section and the `zvecGrepRebuild` namespace stay with the registered copy, and the lock is released when that fiber unloads.
|
|
111
112
|
- The card is registered in the `plugins.bundle.config` slot keyed by the **bundle package name**; the settings namespace and `configForms` reads stay the bare entry id `zvec-grep` (implicit registration by entry id).
|
|
112
113
|
- The rebuild read surface is installed on the apply fiber - no `webServer` dependency, no child fiber. On a TUI host the service still registers; the card simply has nowhere to render.
|
|
113
114
|
- The status poll is the client's own timer (2000 ms), not a server push; every read answers a result object, never a thrown error.
|
|
@@ -162,7 +163,7 @@ Output is plain text; timeouts 5 min (search) / 10 min (index) / 60 s (status);
|
|
|
162
163
|
|
|
163
164
|
## <img src="https://api.iconify.design/lucide/sliders-horizontal.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> Settings
|
|
164
165
|
|
|
165
|
-
Namespace `zvec-grep` equals the settings entry id; the schema has 18 fields with built-in defaults, 7 of them volatile and on the card.
|
|
166
|
+
Namespace `zvec-grep` equals the settings entry id; the schema has 18 fields with built-in defaults, 7 of them volatile and on the card. An out-of-range numeric draft never reaches `onChange`, so **Save** is blocked while any numeric field is invalid; **Revert** stays enabled, and the save bar names the reason.
|
|
166
167
|
|
|
167
168
|
| Field | Type | Default | Purpose |
|
|
168
169
|
| --- | --- | --- | --- |
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
|
@@ -108,6 +108,7 @@ dsh plugin --profile web add @jayyuen66/dsh-zvec-grep
|
|
|
108
108
|
|
|
109
109
|
- `dsh.bundle.patch` 指向 `cordis.patch.yml`,其 `insert:` 块只有一条 `- id: zvec-grep`、`name: "@jayyuen66/dsh-zvec-grep"`——让宿主扫描 client 半的是**不带子路径的包名**。卡片组件直接打进 `client.js`(只有 `react` / `zod` 外置给宿主模块表),卡片不依赖第二份包被装载。bundle 安装走 pnpm(>= 12.3.0)。
|
|
110
110
|
- 缺任一注入宿主服务,cordis 就不激活本条目(启动诊断点名 `pending (waiting for service: …)`);ctx 形状不对时 apply 抛 `required services … missing`。
|
|
111
|
+
- 两条装载路径——dshmarket 热挂的 `mkt-*` 子树与 bundle 层——可能解析到同一份模块而在同一作用域里跑两遍 `apply`。第二份会抢一把私有实例服务锁并安静让路(只 `console.warn` 一行);三个工具、提示词段与 `zvecGrepRebuild` 命名空间仍由在册那一份提供,那一份 fiber 卸载时锁自动释放。
|
|
111
112
|
- 卡片注册在 `plugins.bundle.config` 槽的 **bundle 包名**键下;设置命名空间与 `configForms` 的读仍走裸条目 id `zvec-grep`(按条目 id 隐式注册)。
|
|
112
113
|
- 重建读取接口注册在 apply fiber 上——不声明 `webServer`、没有子 fiber。TUI 宿主上服务照常注册,只是卡片没有地方渲染。
|
|
113
114
|
- 状态轮询是客户端自己的定时器(2000 ms),不是服务端推送;每次读都以结果对象回答,不抛错。
|
|
@@ -162,7 +163,7 @@ dsh plugin --profile web add @jayyuen66/dsh-zvec-grep
|
|
|
162
163
|
|
|
163
164
|
## <img src="https://api.iconify.design/lucide/sliders-horizontal.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> 设置项
|
|
164
165
|
|
|
165
|
-
命名空间 `zvec-grep` 即设置条目 id;schema 共 18 个字段、逐字段带内置默认,其中卡上那 7 枚标 `.volatile()
|
|
166
|
+
命名空间 `zvec-grep` 即设置条目 id;schema 共 18 个字段、逐字段带内置默认,其中卡上那 7 枚标 `.volatile()`。越界数字草稿不会进 `onChange`,所以只要有数字字段越界,**保存**就被禁用(**撤销**保持可点),保存条同时点名原因。
|
|
166
167
|
|
|
167
168
|
| 字段 | 类型 | 默认值 | 作用 |
|
|
168
169
|
| --- | --- | --- | --- |
|