@jayyuen66/dsh-zvec-grep 0.1.18 → 0.1.19

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/cordis.patch.yml CHANGED
@@ -12,5 +12,9 @@
12
12
  # 行按裸包名引用本包(client-modules 只扫描裸包名条目的 dsh.client 声明)。
13
13
  # 注意 pnpm ≥12.3.0:12.0.0 的 add 本地目录有 #14437 bug。
14
14
  - insert:
15
+ # 固定 id:该供应行必须保持开启;停用后本包设置卡会失去 shared 客户端供应。
16
+ # 多个插件共用同一个 id,宿主会把开关标成“无法唯一定位”并禁用。
17
+ - id: dsh-plugin-shared
18
+ name: "@jayyuen66/dsh-plugin-shared"
15
19
  - id: zvec-grep
16
20
  name: "@jayyuen66/dsh-zvec-grep"
package/docs/DETAIL.md CHANGED
@@ -24,7 +24,7 @@ The card's Rebuild button runs the equivalent of `zg --index --rebuild` for a wo
24
24
 
25
25
  Eleven deployment values stay off the card: `searchTimeoutMs` (300000), `statusTimeoutMs` (60000), `indexTimeoutMs` (600000), `stdoutMaxBytes` (400000), `rebuildWaitMs` (120000), `clientMode` (`auto` / `direct` / `server`), `daemonUrl` (`http://127.0.0.1:7999/mcp`, the MCP transport's daemon endpoint), `allowRemoteEmbedding` (false), `remoteEmbeddingEndpoint`, `remoteEmbeddingApiKeyFrom`, `requireApprovalForExplicitRoot` (false). None of these eleven has a card control; the only thing that makes them take effect is the `config:` block of the registration row in the next paragraph, and precedence is row `config:` > the `.default()` in code.
26
26
 
27
- Whether workspace content may leave the machine at all is treated as a deployment decision rather than a model-visible choice, which is why the remote-embedding trio appears in neither the card nor the tool parameters; and even when it is enabled, `zg` itself still requires `--allow-remote` (added automatically by this plugin to remote-reference index commands once the deployment switch is on) or a one-time persistent `zg --auth grant`. Set all of these in the `config:` block of this plugin's row in your profile's `cordis.yml` (the `cordis.patch.yml` shipped in this package carries that row's `id` / `name`; the card components are bundled into `client.js`, so no second package entry is needed); they take effect on restart.
27
+ Whether workspace content may leave the machine at all is treated as a deployment decision rather than a model-visible choice, which is why the remote-embedding trio appears in neither the card nor the tool parameters; and even when it is enabled, `zg` itself still requires `--allow-remote` (added automatically by this plugin to remote-reference index commands once the deployment switch is on) or a one-time persistent `zg --auth grant`. Set all of these in the `config:` block of this plugin's row in your profile's `cordis.yml` (the `cordis.patch.yml` shipped in this package carries the `dsh-plugin-shared` supplier row plus that row's `id` / `name`; the card components come from the shared client row, externalized as `@jayyuen66/dsh-plugin-shared/client`); they take effect on restart.
28
28
 
29
29
  ## What it needs from outside
30
30
 
@@ -33,3 +33,9 @@ The external `zg` CLI (`@zvec/zvec-grep`, installed with `npm install -g @zvec/z
33
33
  ## Further detail
34
34
 
35
35
  The error-code table, the argument guards and the background-job surface are in the package README (`README.md` / `README.zh-CN.md`).
36
+
37
+ ## Feedback
38
+
39
+ Issues and pull requests are welcome: [https://github.com/JayYuen666/dsh-zvec-grep/issues](https://github.com/JayYuen666/dsh-zvec-grep/issues).
40
+
41
+ If a plugin fails to boot, include the dsh host version, the profile install shape, and the browser console line. The `missed the module table` line is especially useful: it tells us whether the shared client row was materialized.
package/docs/DETAIL.zh.md CHANGED
@@ -24,7 +24,7 @@
24
24
 
25
25
  十一项部署值刻意不进设置卡:`searchTimeoutMs`(300000)、`statusTimeoutMs`(60000)、`indexTimeoutMs`(600000)、`stdoutMaxBytes`(400000)、`rebuildWaitMs`(120000)、`clientMode`(`auto` / `direct` / `server`)、`daemonUrl`(`http://127.0.0.1:7999/mcp`,MCP 传输的守护进程端点)、`allowRemoteEmbedding`(false)、`remoteEmbeddingEndpoint`、`remoteEmbeddingApiKeyFrom`、`requireApprovalForExplicitRoot`(false)。这十一项在卡上没有入口,能生效的只有下一段那条注册行 `config:`;优先级是注册行 `config:` > 代码里的 `.default()`。
26
26
 
27
- 「工作区内容能不能离开本机」被当成部署决定,而不是给模型选的开关,所以远程嵌入那三枚既不在卡上也不在工具参数里;即便开了,`zg` 自己仍要求 `--allow-remote`(部署开放后本插件在远程引用的索引命令上自动补)或一次 `zg --auth grant` 持久授权。这些值都写在**自己 profile 的 `cordis.yml`** 里本插件注册行的 `config:` 块(随包那份 `cordis.patch.yml` 带本行的 `id` / `name`;卡片组件已打进 `client.js`,不需要第二条包条目),改值随重启生效。
27
+ 「工作区内容能不能离开本机」被当成部署决定,而不是给模型选的开关,所以远程嵌入那三枚既不在卡上也不在工具参数里;即便开了,`zg` 自己仍要求 `--allow-remote`(部署开放后本插件在远程引用的索引命令上自动补)或一次 `zg --auth grant` 持久授权。这些值都写在**自己 profile 的 `cordis.yml`** 里本插件注册行的 `config:` 块(随包那份 `cordis.patch.yml` 带 `dsh-plugin-shared` 供应行与本行的 `id` / `name`;卡片组件来自 shared 客户端行,以 `@jayyuen66/dsh-plugin-shared/client` 外置),改值随重启生效。
28
28
 
29
29
  ## 需要外部提供什么
30
30
 
@@ -33,3 +33,9 @@
33
33
  ## 更完整的说明
34
34
 
35
35
  参数守卫、`root`判据与后台作业那一节都写在随包 README(`README.md` / `README.zh-CN.md`)。README 没有独立的错误码表:`zg` 不在 PATH 上按 `exit 127` 归到「未安装」(见「外部依赖」一节),其余失败按工具回执里的 `reason` 读。
36
+
37
+ ## 反馈
38
+
39
+ 欢迎提 issue 和 PR:[https://github.com/JayYuen666/dsh-zvec-grep/issues](https://github.com/JayYuen666/dsh-zvec-grep/issues)。
40
+
41
+ 插件启动失败时,请附上 dsh 宿主版本、profile 安装形态和浏览器控制台原文。`missed the module table` 这一行尤其有用:它能直接说明 shared 客户端供应行有没有被物化。
package/host.js CHANGED
@@ -2525,7 +2525,8 @@ const SKILL_NAME = "zvec-grep";
2525
2525
  *
2526
2526
  * 文案随调用点传入而不是在这里取:语言由 apply 时的官方 locale 偏好决定,与工具描述、
2527
2527
  * 参数说明同源——三处各取一次就会出现「工具描述是中文、skill 正文是英文」那种错位。
2528
- * @param ctx - 只需 `get`(读可选服务),不要求 skills 进 inject
2528
+ * @param ctx - 只需 `get`(读可选服务),不要求 skills 进 inject;带上 `effect` 时注册的
2529
+ * 撤销权交给插件 fiber(见文件头)
2529
2530
  * @param content - 规则全文(`messages.routingText`)
2530
2531
  * @param description - skill 目录里那行说明(模型据此决定要不要加载)
2531
2532
  * @returns 注册成功与否;未装载 skill 服务或正文为空时为 false(不抛,摘要段照旧生效)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jayyuen66/dsh-zvec-grep",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "description": "dsh 工作区语义检索插件(zg):zg_search / zg_index / zg_status + 本地 embedding 设置卡片 + systemPrompt 路由规则 + guard 安全兜底。",
5
5
  "keywords": [
6
6
  "cordis",
@@ -51,7 +51,7 @@
51
51
  "registry": "https://registry.npmjs.org"
52
52
  },
53
53
  "dependencies": {
54
- "@jayyuen66/dsh-plugin-shared": "^0.2.9",
54
+ "@jayyuen66/dsh-plugin-shared": "^0.2.10",
55
55
  "zod": "4.6.7"
56
56
  },
57
57
  "devDependencies": {
@@ -134,7 +134,10 @@
134
134
  },
135
135
  "client": {
136
136
  "platform": "web",
137
- "immediately": true
137
+ "immediately": true,
138
+ "external": [
139
+ "@jayyuen66/dsh-plugin-shared/client"
140
+ ]
138
141
  }
139
142
  },
140
143
  "scripts": {