@jayyuen66/dsh-zvec-grep 0.1.11 → 0.1.12

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,22 @@
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.12
6
+
7
+ 宿主开发基线抬到 `0.2.2-rc.1`(支持窗口 `^0.2.1-rc.5 || ^0.2.2-alpha.3` 未变),`engines.node` 地板抬到 `>=24.9.0`;卡片组件改由 shared 的 `./client` 供。检索门禁、索引与重建的判定逻辑不变,需要留意的是 `engines.node` 抬高后 node 22 装不上本包。
8
+
9
+ ### Changed
10
+
11
+ - **shared 抬到 0.2.4**:catalog、生成物与 lockfile 随之同步;发布态依赖门禁不再要求消费者重复提供 shared 自己声明并随包安装的普通依赖(当前是纯解析器 `@deepseek-ai/dsh-fs-patch`)。这条豁免按包名整片生效,今后 shared 新增任何宿主依赖都会静默通过,不再逐条变红——它换到的是「消费者不为库包的内部依赖重复负责」这一口径。
12
+ - **宿主开发基线**:`devDependencies` 的 dsh 家族抬到 `0.2.2-rc.1`,`@deepseek-ai/cordis` 抬到 `4.1.0`,`@deepseek-ai/cordis-plugin-group` 抬到 `1.1.0`、`@deepseek-ai/cordis-plugin-timer` 抬到 `1.2.0`,`@deepseek-ai/schemastery` 抬到 `3.19.0`;`@deepseek-ai/dsh-ptc-runtime` 从 devDependencies 移除(源码与测试都不再引用它)。`engines.dsh` 与三枚 `@deepseek-ai/dsh*` peer 保持 `^0.2.1-rc.5 || ^0.2.2-alpha.3` 未动;`@deepseek-ai/schemastery` 的 peer 由 `^3.18.6-alpha.1` 放宽为 `^3.18.5 || ^3.18.6-alpha.1`,与两条宿主线各自的实装版本对齐。`engines.node` 由 `>=22.12.0` 抬到 `>=24.9.0`,取值取自宿主自己的地板。
13
+ - **卡片组件改由 shared 的 `./client` 供**:`src/client-entry.ts` 的四路运行期值导入(`lib/card-ui`、`lib/card-diff`、`lib/errors`、`lib/record`)统一改走 `./client`(只换说明符,没有逻辑改动),`package.json` 新增 `dsh.bundle.client.external`,`build-client.mjs` 的外置清单同步;`cordis.patch.yml` 因此插入一条**不写 id** 的 `@jayyuen66/dsh-plugin-shared` 组件行(写 id 会在插件页多出一个可关闭的组件,关掉后设置卡失去组件供应)。
14
+ - **CI 的 node 矩阵收敛**:`ci.yml` 的 `node: [22, 24]` 加 macOS 排除改为单格 `node: [24.9]`,两份 workflow 的 `node-version` 由 `24` 改为 `24.9`,与 `engines.node` 同值。
15
+ - **文档**:dsh 徽章与两份 README 的窗口句保持 `^0.2.1-rc.5` 系(`engines.dsh` 本轮未动,`test/readme-parity.test.ts` 把徽章与全文 caret 版本集合钉到窗口首条,改值会当场红);两份 README 的 `insert:` 块由「唯一一行」改为「两条条目」并写明 shared 那行为何不写 id。
16
+
17
+ ### Fixed
18
+
19
+ - **两份 DETAIL 的不对称**:英文版漏了 `rebuildWaitMs` 的默认值(120000,取自 `host.ts` 的 `REBUILD_WAIT_MS = 2 * 60_000`)与「十项部署值只能走注册行 `config:`,优先级是行 `config:` > 代码 `.default()`」这句,中文版已有;英文补平。两侧「随包那份 `cordis.patch.yml` 只带 `id` / `name`」的说法按本轮改动改成两条条目——这一句要紧,因为按原文读者会以为多出来的 shared 行是多余物可以删,而删掉后设置卡会失去组件供应。
20
+
5
21
  ## 0.1.11
6
22
 
7
23
  这一版补上 search-first 门禁对命令替换与壳层包装的识别,给索引探测加显式失效通道,把状态读面按部署形态收口,并让发布链与产物门禁各自多一道判据;宿主开发基线抬到 `0.2.2-alpha.3`,支持窗口改为 `^0.2.1-rc.5 || ^0.2.2-alpha.3`。
package/README.md CHANGED
@@ -11,7 +11,7 @@
11
11
  <a href="https://www.npmjs.com/package/@jayyuen66/dsh-zvec-grep"><img src="https://img.shields.io/npm/d18m/@jayyuen66/dsh-zvec-grep?style=flat-square" alt="npm downloads (total)" /></a>
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
- <img src="https://img.shields.io/badge/node-%3E%3D22.12-4c1?style=flat-square&logo=nodedotjs&logoColor=white" alt="node" />
14
+ <img src="https://img.shields.io/badge/node-%3E%3D24.9-4c1?style=flat-square&logo=nodedotjs&logoColor=white" alt="node" />
15
15
  <img src="https://img.shields.io/badge/dsh-%5E0.2.1--rc.5-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>
@@ -76,7 +76,7 @@ dsh plugin --profile web add @jayyuen66/dsh-zvec-grep
76
76
 
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
- - **Node.js `>= 22.12`** (ESM-only; that floor is what makes `require()` of an ESM entry work, hence `engines.node`).
79
+ - **Node.js `>= 24.9`** (ESM-only; that floor is what makes `require()` of an ESM entry work, hence `engines.node`).
80
80
  - **Host `dsh` on the `0.2.1-rc.5` or `0.2.2-alpha.3` line.** The host reads `engines.dsh` (`^0.2.1-rc.5 || ^0.2.2-alpha.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.5` passes the host gate; on the `0.2.2` prerelease line, strict npm peer resolution starts at `0.2.2-alpha.3`. `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.
81
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.5 || ^0.2.2-alpha.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
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).
@@ -105,7 +105,7 @@ If your profile pins `@jayyuen66/dsh-plugin-shared` with a pnpm `overrides` entr
105
105
 
106
106
  ## <img src="https://api.iconify.design/lucide/plug.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> Enabling it in dsh
107
107
 
108
- - `dsh.bundle.patch` points at `cordis.patch.yml`, whose single line is `- id: zvec-grep` with `name: "@jayyuen66/dsh-zvec-grep"` - the **bare package name** is what makes the host scan the client half. Bundle installation goes through pnpm (>= 12.3.0).
108
+ - `dsh.bundle.patch` points at `cordis.patch.yml`, whose `insert:` block carries **two entries**: `- name: "@jayyuen66/dsh-plugin-shared"` (the supplier of the card components, deliberately **without an `id`** so the plugin page does not list it as a switchable component) and `- id: zvec-grep` with `name: "@jayyuen66/dsh-zvec-grep"` - the **bare package name** is what makes the host scan the client half. Bundle installation goes through pnpm (>= 12.3.0).
109
109
  - 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.
110
110
  - 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).
111
111
  - 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.
package/README.zh-CN.md CHANGED
@@ -11,7 +11,7 @@
11
11
  <a href="https://www.npmjs.com/package/@jayyuen66/dsh-zvec-grep"><img src="https://img.shields.io/npm/d18m/@jayyuen66/dsh-zvec-grep?style=flat-square" alt="npm downloads (total)" /></a>
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
- <img src="https://img.shields.io/badge/node-%3E%3D22.12-4c1?style=flat-square&logo=nodedotjs&logoColor=white" alt="node" />
14
+ <img src="https://img.shields.io/badge/node-%3E%3D24.9-4c1?style=flat-square&logo=nodedotjs&logoColor=white" alt="node" />
15
15
  <img src="https://img.shields.io/badge/dsh-%5E0.2.1--rc.5-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>
@@ -77,7 +77,7 @@ dsh plugin --profile web add @jayyuen66/dsh-zvec-grep
77
77
 
78
78
  卸载用 `dsh plugin --profile web remove @jayyuen66/dsh-zvec-grep`。包在公共 npm registry 上,不需要凭据,也不需要 scoped-registry 配置行。
79
79
 
80
- - **Node.js `>= 22.12`**(纯 ESM;正是这个下限让 `require()` 一枚 ESM 入口成为可能,`engines.node` 因此声明)。
80
+ - **Node.js `>= 24.9`**(纯 ESM;正是这个下限让 `require()` 一枚 ESM 入口成为可能,`engines.node` 因此声明)。
81
81
  - **宿主 `dsh` 在 `0.2.1-rc.5` 或 `0.2.2-alpha.3` 这条线上。** 宿主读 `engines.dsh`(`^0.2.1-rc.5 || ^0.2.2-alpha.3`)且**单独决定**——该字段在场时兼容性先于 `peerDependencies` 判定,prerelease 参与比较。`0.2.x` 里不低于 `0.2.1-rc.5` 的都通过宿主装载门;`0.2.2` 预发布线上,npm 的严格 peer 解析从 `0.2.2-alpha.3` 起算。`0.3.0` 及以上需要风险授权 `dsh plugin --profile <p> allow-version <pkg>@<ver> --dsh-version <确切版本> --accept-risk`。支持窗口是滚动的:本包在发布时把窗口内的每个已发布宿主版本逐版取证(判据是宿主 `--dump-config` 里本包的层行;设置卡与它的命名空间调用另在发布基线上全量取证一次),窗口滚动后重新取证,不把这一句里的版本号当长期承诺。
82
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.1-rc.5 || ^0.2.2-alpha.3`),`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 校验)。
@@ -106,7 +106,7 @@ dsh plugin --profile web add @jayyuen66/dsh-zvec-grep
106
106
 
107
107
  ## <img src="https://api.iconify.design/lucide/plug.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> 在 dsh 里启用
108
108
 
109
- - `dsh.bundle.patch` 指向 `cordis.patch.yml`,其中唯一的注册行是 `- id: zvec-grep`、`name: "@jayyuen66/dsh-zvec-grep"`——让宿主扫描 client 半的是**裸包名**。bundle 安装走 pnpm(>= 12.3.0)。
109
+ - `dsh.bundle.patch` 指向 `cordis.patch.yml`,其 `insert:` 块带**两条条目**:`- name: "@jayyuen66/dsh-plugin-shared"`(卡片组件的供应行,**刻意不写 `id`**,所以插件页不会把它列成可停用组件)与 `- id: zvec-grep`、`name: "@jayyuen66/dsh-zvec-grep"`——让宿主扫描 client 半的是**裸包名**。bundle 安装走 pnpm(>= 12.3.0)。
110
110
  - 缺任一注入服务面,cordis 就不激活本条目(启动诊断点名 `pending (waiting for service: …)`);ctx 形状不对时 apply 抛 `required services … missing`。
111
111
  - 卡片注册在 `plugins.bundle.config` 槽的 **bundle 包名**键下;设置命名空间与 `configForms` 的读仍走裸条目 id `zvec-grep`(按条目 id 隐式注册)。
112
112
  - 重建读面注册在 apply fiber 上——不声明 `webServer`、没有子 fiber。TUI 宿主上服务照常注册,只是卡片没有地方渲染。
package/client.js CHANGED
@@ -8,6 +8,7 @@ window.__ModuleLoader__.load({
8
8
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
9
9
  let react = require("react");
10
10
  let zod = require("zod");
11
+ let _jayyuen66_dsh_plugin_shared_client = require("@jayyuen66/dsh-plugin-shared/client");
11
12
  // lib/embedding-catalog.ts
12
13
  /** 默认模型:本地最强(1024 维 / 8192 上下文 / 中英通用),约 640MB 一次性下载。 */
13
14
  const DEFAULT_EMBEDDING = "local/qwen3-embedding-0.6b";
@@ -74,553 +75,6 @@ const LOCAL_EMBEDDINGS = Object.freeze([
74
75
  dimension: 768
75
76
  }
76
77
  ].map((entry) => Object.freeze(entry)));
77
- // node_modules/@jayyuen66/dsh-plugin-shared/dist/card-diff.js
78
- function e$2(t, n, r) {
79
- if (t == null || n == null) return (t ?? null) === (n ?? null);
80
- if (Object.is(t, n)) return !0;
81
- if (typeof t != `object` || typeof n != `object`) return !1;
82
- if (r.get(t) === n) return !0;
83
- if (r.set(t, n), Array.isArray(t) || Array.isArray(n)) return !Array.isArray(t) || !Array.isArray(n) || t.length !== n.length ? !1 : t.every((t, i) => e$2(t, n[i], r));
84
- let i = Object.keys(t), a = Object.keys(n);
85
- return i.length === a.length && i.every((i) => Object.hasOwn(n, i) && e$2(Reflect.get(t, i), Reflect.get(n, i), r));
86
- }
87
- function t$2(t, n) {
88
- let r = [];
89
- for (let i of Object.keys(t)) e$2(t[i], n[i], /* @__PURE__ */ new WeakMap()) || r.push(i);
90
- return r;
91
- }
92
- // node_modules/@jayyuen66/dsh-plugin-shared/dist/card-ui.js
93
- const c = `
94
- .dsu-form{display:flex;flex-direction:column}
95
- .dsu-section{margin-top:24px;padding-top:24px;border-top:.5px solid var(--dsw-alias-border-l1)}
96
- .dsu-form>.dsu-section:first-child{margin-top:0;padding-top:0;border-top:0}
97
- .dsu-sectionTitle{margin:0;font-size:15px;font-weight:600;line-height:1.4;color:var(--dsw-alias-label-primary)}
98
- .dsu-sectionHint{margin:4px 0 0;font-size:12px;line-height:1.5;color:var(--dsw-alias-label-tertiary)}
99
- .dsu-statusbar{display:flex;flex-wrap:wrap;gap:4px 8px;margin-top:8px;font-size:12px;line-height:1.5;color:var(--dsw-alias-label-tertiary)}
100
- .dsu-field{display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,360px);column-gap:32px;align-items:center;padding:12px 0;border-top:.5px solid var(--dsw-alias-border-l2)}
101
- .dsu-fieldMeta{display:flex;flex-direction:column;gap:4px;min-width:0}
102
- .dsu-labelRow{display:flex;align-items:center;gap:6px;min-width:0}
103
- .dsu-label{font-size:13px;font-weight:500;line-height:1.5;color:var(--dsw-alias-label-primary)}
104
- .dsu-labelMono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px}
105
- .dsu-hint{margin:0;font-size:12px;line-height:1.5;color:var(--dsw-alias-label-tertiary)}
106
- .dsu-control{min-width:0;display:flex;align-items:center;gap:8px}
107
- .dsu-fieldWide{grid-template-columns:minmax(0,1fr);align-items:start}
108
- .dsu-fieldWide .dsu-control{width:100%;max-width:720px;margin-top:2px}
109
- .dsu-help{display:inline-flex;align-items:center;gap:6px;min-width:0}
110
- .dsu-helpBtn{appearance:none;border:0;background:transparent;padding:0;width:16px;height:16px;display:inline-flex;align-items:center;justify-content:center;color:var(--dsw-alias-label-tertiary);cursor:help;border-radius:50%;flex:none}
111
- .dsu-help:hover .dsu-helpBtn,.dsu-helpBtn:focus-visible{color:var(--dsw-alias-label-primary)}
112
- .dsu-helpBtn:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:1px}
113
- .dsu-tip{position:fixed;z-index:60;box-sizing:border-box;max-width:min(340px,calc(100vw - 16px));max-height:calc(100vh - 16px);overflow:auto;overflow-wrap:anywhere;padding:10px 12px;border-radius:10px;background:var(--dsw-alias-bg-layer-2);border:.5px solid var(--dsw-alias-border-l3);box-shadow:0 12px 32px rgb(0 0 0 / 45%);font-size:12px;line-height:1.6;font-weight:400;color:var(--dsw-alias-label-secondary)}
114
- .dsu-input{width:100%;height:34px;padding:0 12px;border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-3);color:var(--dsw-alias-label-primary);font:inherit;font-size:13px}
115
- .dsu-input:focus-visible{outline:none;border-color:var(--dsw-alias-state-business-primary)}
116
- .dsu-input[aria-invalid="true"]{border-color:var(--dsw-alias-state-error-primary)}
117
- .dsu-input:disabled{color:var(--dsw-alias-label-tertiary);cursor:default}
118
- .dsu-input::placeholder{color:var(--dsw-alias-label-tertiary)}
119
- .dsu-textarea{height:auto;min-height:96px;padding:8px 12px;line-height:1.6;resize:vertical}
120
- .dsu-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
121
- .dsu-numberWrap{display:flex;flex-direction:column;gap:4px;width:100%;min-width:0}
122
- .dsu-number{display:flex;align-items:center;gap:8px;min-width:0}
123
- .dsu-number .dsu-input{min-width:0}
124
- .dsu-unit{flex:none;font-size:12px;color:var(--dsw-alias-label-tertiary)}
125
- .dsu-error{margin:0;font-size:12px;line-height:1.5;color:var(--dsw-alias-state-error-primary)}
126
- .dsu-switch{appearance:none;width:36px;height:20px;border-radius:999px;border:0;padding:2px;background:var(--dsw-alias-border-l3);display:flex;align-items:center;cursor:pointer;flex:none;transition:background-color .16s}
127
- .dsu-knob{width:16px;height:16px;border-radius:50%;background:var(--dsw-alias-label-primary);transition:transform .16s,background-color .16s}
128
- .dsu-switch[aria-checked="true"]{background:var(--dsw-alias-label-primary)}
129
- .dsu-switch[aria-checked="true"] .dsu-knob{transform:translateX(16px);background:var(--dsw-alias-label-primary-foreground)}
130
- .dsu-switch:disabled{opacity:.4;cursor:not-allowed}
131
- .dsu-switch:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px}
132
- .dsu-selectWrap{position:relative;width:100%;min-width:0}
133
- .dsu-select{display:flex;align-items:center;justify-content:space-between;gap:8px;text-align:left;cursor:pointer}
134
- .dsu-select[aria-expanded="true"]{border-color:var(--dsw-alias-state-business-primary)}
135
- .dsu-selectValue{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
136
- .dsu-chevron{flex:none;color:var(--dsw-alias-label-tertiary);transition:transform .16s}
137
- .dsu-select[aria-expanded="true"] .dsu-chevron{transform:rotate(180deg)}
138
- .dsu-menu{position:fixed;z-index:70;padding:4px;background:var(--dsw-alias-bg-layer-2);border:.5px solid var(--dsw-alias-border-l3);border-radius:12px;box-shadow:0 12px 32px rgb(0 0 0 / 50%);max-height:280px;overflow:auto}
139
- .dsu-option{appearance:none;border:0;background:transparent;color:var(--dsw-alias-label-primary);font:inherit;font-size:13px;line-height:1.4;width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 10px;border-radius:8px;cursor:pointer;text-align:left}
140
- .dsu-option:hover,.dsu-option[data-active="true"]{background:var(--dsw-alias-bg-layer-3)}
141
- .dsu-option:disabled{color:var(--dsw-alias-label-tertiary);cursor:not-allowed}
142
- .dsu-option:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:-2px}
143
- .dsu-optionGroup{padding:6px 10px 2px;font-size:11px;font-weight:600;color:var(--dsw-alias-label-tertiary)}
144
- .dsu-check{opacity:0;flex:none}
145
- .dsu-option[aria-selected="true"] .dsu-check{opacity:1}
146
- .dsu-savebar{display:flex;align-items:center;gap:8px;padding:12px 0;margin-top:24px;border-top:.5px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base)}
147
- .dsu-savebar[data-dirty="true"]{position:sticky;bottom:0;z-index:2;box-shadow:0 -12px 24px rgb(0 0 0 / 35%)}
148
- .dsu-btn{appearance:none;border:.5px solid var(--dsw-alias-border-l2);background:transparent;color:var(--dsw-alias-label-primary);font:inherit;font-size:13px;line-height:1.5;border-radius:var(--dsw-radius-md);padding:5px 14px;cursor:pointer;transition:background-color .12s,border-color .12s,color .12s,filter .12s}
149
- .dsu-btn:hover:not(:disabled){background:var(--dsw-alias-bg-layer-2);border-color:var(--dsw-alias-border-l3)}
150
- .dsu-btn:active:not(:disabled){background:var(--dsw-alias-bg-layer-1)}
151
- .dsu-btn:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:1px}
152
- .dsu-btn:disabled{opacity:.4;cursor:not-allowed}
153
- .dsu-btnPrimary{background:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-primary);color:var(--dsw-alias-bg-layer-3)}
154
- .dsu-btnPrimary:hover:not(:disabled){background:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-primary);filter:brightness(.9)}
155
- .dsu-btnPrimary:active:not(:disabled){background:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-primary);filter:brightness(.84)}
156
- .dsu-btnDanger{color:var(--dsw-alias-state-error-primary)}
157
- .dsu-btnDanger:hover:not(:disabled){color:var(--dsw-alias-state-error-primary);border-color:var(--dsw-alias-state-error-primary);background:var(--dsw-alias-bg-layer-2)}
158
- .dsu-status{margin-left:auto;font-size:12px;color:var(--dsw-alias-label-tertiary)}
159
- .dsu-statusError{color:var(--dsw-alias-state-error-primary)}
160
- .dsu-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(200px,100%),1fr));gap:0 24px}
161
- .dsu-grid>.dsu-field{display:flex;flex-direction:column;align-items:stretch;gap:6px;padding:10px 0;border-top:.5px solid var(--dsw-alias-border-l1)}
162
- .dsu-grid>.dsu-field .dsu-control{width:100%}
163
- @media (max-width:640px){
164
- .dsu-field{grid-template-columns:minmax(0,1fr);align-items:start}
165
- .dsu-control{width:100%;max-width:720px}
166
- .dsu-section{margin-top:20px;padding-top:20px}
167
- }
168
- @media (prefers-reduced-motion:reduce){
169
- .dsu-switch,.dsu-knob,.dsu-chevron,.dsu-btn{transition:none}
170
- }
171
- `;
172
- function l(e, t = 30) {
173
- return e.length <= t ? { hint: e } : { detail: e };
174
- }
175
- function u(t) {
176
- return (0, react.createElement)(`div`, { className: `dsu-form` }, t.children);
177
- }
178
- function d(t) {
179
- return (0, react.createElement)(`section`, { className: `dsu-section` }, (0, react.createElement)(`h2`, { className: `dsu-sectionTitle` }, t.title), t.hint === void 0 ? null : (0, react.createElement)(`p`, { className: `dsu-sectionHint` }, t.hint), t.children);
180
- }
181
- function m(a) {
182
- let c = (0, react.useId)(), [l, u] = (0, react.useState)(!1), [d, f] = (0, react.useState)(!1), p = (0, react.useRef)(!1), m = (0, react.useRef)(!1), h = (0, react.useRef)(!1), g = (0, react.useRef)(null), _ = (0, react.useRef)(null), v = (0, react.useRef)(null), y = (0, react.useCallback)(() => {
183
- v.current !== null && (clearTimeout(v.current), v.current = null);
184
- }, []), b = (0, react.useCallback)(() => {
185
- let e = g.current, t = _.current;
186
- /* v8 ignore next 3 -- place 只在 open 的 layout effect 与挂载期监听器里调用;refs 为空只可能是卸载竞态 */
187
- if (e === null || t === null) return;
188
- let n = e.getBoundingClientRect(), r = t.offsetWidth, i = t.offsetHeight, { left: a } = n, o = n.bottom + 8;
189
- o + i > window.innerHeight - 8 && (o = n.top - i - 8), a + r > window.innerWidth - 8 && (a = window.innerWidth - r - 8);
190
- let s = Math.max(8, window.innerWidth - r - 8), c = Math.max(8, window.innerHeight - i - 8);
191
- t.style.left = `${Math.min(Math.max(8, a), s)}px`, t.style.top = `${Math.min(Math.max(8, o), c)}px`;
192
- }, []), x = (0, react.useCallback)(() => {
193
- y(), h.current = !1, f(!1), u(!1);
194
- }, [y]), S = (0, react.useCallback)(() => {
195
- y(), u(!0);
196
- }, [y]), C = (0, react.useCallback)(() => {
197
- y(), !(p.current || m.current || h.current) && (v.current = setTimeout(() => {
198
- /* v8 ignore next 3 -- 任何重新进入/钉住都会 cancelHide;这次复查只防未来的异步路径 */
199
- v.current = null, p.current || m.current || h.current || u(!1);
200
- }, 120));
201
- }, [y]), w = (0, react.useCallback)((e) => {
202
- h.current = e, f(e);
203
- }, []);
204
- (0, react.useLayoutEffect)(() => {
205
- if (!l) return () => {};
206
- b();
207
- let e = (e) => {
208
- let { target: t } = e;
209
- t instanceof Node && _.current?.contains(t) === !0 || (h.current ? b() : x());
210
- }, t = () => {
211
- b();
212
- };
213
- return window.addEventListener(`scroll`, e, !0), window.addEventListener(`resize`, t), () => {
214
- window.removeEventListener(`scroll`, e, !0), window.removeEventListener(`resize`, t);
215
- };
216
- }, [
217
- l,
218
- a.detail,
219
- b,
220
- x
221
- ]), (0, react.useEffect)(() => {
222
- if (!l) return () => {};
223
- let e = (e) => {
224
- e.key === `Escape` && x();
225
- };
226
- return document.addEventListener(`keydown`, e), () => {
227
- document.removeEventListener(`keydown`, e);
228
- };
229
- }, [l, x]), (0, react.useEffect)(() => y, [y]);
230
- let T = (0, react.createElement)(`button`, {
231
- ref: g,
232
- type: `button`,
233
- className: `dsu-helpBtn`,
234
- "aria-label": `${a.label} 说明`,
235
- "aria-describedby": c,
236
- "aria-pressed": d,
237
- onClick: () => {
238
- h.current ? x() : (w(!0), S());
239
- }
240
- }, (0, react.createElement)(`svg`, {
241
- width: 12,
242
- height: 12,
243
- viewBox: `0 0 14 14`,
244
- "aria-hidden": !0
245
- }, (0, react.createElement)(`circle`, {
246
- cx: 7,
247
- cy: 7,
248
- r: 6,
249
- fill: `none`,
250
- stroke: `currentColor`,
251
- strokeWidth: 1.2
252
- }), (0, react.createElement)(`path`, {
253
- d: `M7 6.2v4`,
254
- stroke: `currentColor`,
255
- strokeWidth: 1.3,
256
- strokeLinecap: `round`
257
- }), (0, react.createElement)(`circle`, {
258
- cx: 7,
259
- cy: 4.3,
260
- r: .8,
261
- fill: `currentColor`
262
- }))), E = (0, react.createElement)(`div`, {
263
- ref: _,
264
- id: c,
265
- role: `tooltip`,
266
- className: `dsu-tip`,
267
- hidden: !l
268
- }, a.detail), D = a.showLabel === !1 ? null : (0, react.createElement)(`span`, { className: `dsu-label${a.compact === !0 ? ` dsu-labelMono` : ``}` }, a.label);
269
- return (0, react.createElement)(`span`, {
270
- className: `dsu-help`,
271
- onMouseEnter: () => {
272
- p.current = !0, S();
273
- },
274
- onMouseLeave: () => {
275
- p.current = !1, C();
276
- },
277
- onFocus: () => {
278
- m.current = !0, S();
279
- },
280
- onBlur: (e) => {
281
- let t = e.relatedTarget;
282
- t instanceof Node && e.currentTarget.contains(t) || (m.current = !1, C());
283
- }
284
- }, D, T, E);
285
- }
286
- function h(t) {
287
- let n = `dsu-label${t.compact === !0 ? ` dsu-labelMono` : ``}`, r = t.controlId === void 0 ? (0, react.createElement)(`span`, { className: n }, t.label) : (0, react.createElement)(`label`, {
288
- className: n,
289
- htmlFor: t.controlId
290
- }, t.label);
291
- return (0, react.createElement)(`div`, { className: `dsu-labelRow` }, r, t.detail === void 0 ? null : (0, react.createElement)(m, {
292
- label: t.label,
293
- detail: t.detail,
294
- showLabel: !1
295
- }));
296
- }
297
- function g(t) {
298
- let n = t.controlId === void 0 ? void 0 : `${t.controlId}-hint`;
299
- return (0, react.createElement)(`div`, { className: `dsu-field${t.wide === !0 ? ` dsu-fieldWide` : ``}` }, (0, react.createElement)(`div`, { className: `dsu-fieldMeta` }, (0, react.createElement)(h, {
300
- label: t.label,
301
- detail: t.detail,
302
- compact: t.compact,
303
- controlId: t.controlId
304
- }), t.hint === void 0 ? null : (0, react.createElement)(`p`, {
305
- className: `dsu-hint`,
306
- id: n
307
- }, t.hint)), (0, react.createElement)(`div`, { className: `dsu-control` }, t.children));
308
- }
309
- function _(t) {
310
- let n = (0, react.useId)(), i = t.hint === void 0 ? void 0 : `${n}-hint`;
311
- return (0, react.createElement)(g, {
312
- ...t,
313
- controlId: n
314
- }, (0, react.createElement)(`button`, {
315
- type: `button`,
316
- role: `switch`,
317
- id: n,
318
- className: `dsu-switch`,
319
- "aria-checked": t.checked,
320
- "aria-describedby": i,
321
- "data-field": t.field,
322
- disabled: t.disabled === !0,
323
- onClick: () => {
324
- t.onChange(!t.checked);
325
- }
326
- }, (0, react.createElement)(`span`, { className: `dsu-knob` })));
327
- }
328
- function v(t) {
329
- let i = typeof t.value == `number` && Number.isFinite(t.value) ? String(t.value) : ``, [a, c] = (0, react.useState)(i), [l, u] = (0, react.useState)(!1), d = (0, react.useRef)(void 0), f = (0, react.useId)(), p = (0, react.useId)(), m = [t.hint === void 0 ? void 0 : `${f}-hint`, l ? p : void 0].filter((e) => e !== void 0), h = m.length === 0 ? void 0 : m.join(` `);
330
- (0, react.useEffect)(() => {
331
- t.value !== d.current && (d.current = t.value, c(i), u(!1));
332
- }, [t.value, i]);
333
- let _ = (e) => {
334
- let n = t.min ?? -1 / 0, r = t.max ?? 1 / 0;
335
- if (!Number.isFinite(e) || e < n || e > r) return !1;
336
- let { step: i } = t;
337
- if (i === void 0 || i <= 0) return !0;
338
- let a = (e - (t.min ?? 0)) / i;
339
- return Math.abs(a - Math.round(a)) < 1e-9;
340
- }, v = (e) => {
341
- if (c(e), e === ``) {
342
- u(!1), d.current = void 0, t.onChange(void 0);
343
- return;
344
- }
345
- let n = Number(e);
346
- _(n) ? (u(!1), d.current = n, t.onChange(n)) : u(!0);
347
- }, y = () => {
348
- a === `` || l || c(String(Number(a)));
349
- };
350
- return (0, react.createElement)(g, {
351
- ...t,
352
- controlId: f
353
- }, (0, react.createElement)(`div`, { className: `dsu-numberWrap` }, (0, react.createElement)(`div`, { className: `dsu-number` }, (0, react.createElement)(`input`, {
354
- className: `dsu-input`,
355
- type: `number`,
356
- inputMode: `numeric`,
357
- id: f,
358
- value: a,
359
- min: t.min,
360
- max: t.max,
361
- step: t.step,
362
- placeholder: t.placeholder,
363
- "aria-invalid": l || void 0,
364
- "aria-describedby": h,
365
- "data-field": t.field,
366
- disabled: t.disabled === !0,
367
- onChange: (e) => {
368
- v(e.target.value);
369
- },
370
- onBlur: y
371
- }), t.unit === void 0 ? null : (0, react.createElement)(`span`, { className: `dsu-unit` }, t.unit)), l ? (0, react.createElement)(`p`, {
372
- className: `dsu-error`,
373
- id: p
374
- }, t.invalidHint) : null));
375
- }
376
- function y(t) {
377
- let [i, a] = (0, react.useState)(t.value), [o, c] = (0, react.useState)(!1), l = (0, react.useId)(), u = t.hint === void 0 ? void 0 : `${l}-hint`;
378
- (0, react.useEffect)(() => {
379
- o || a(t.value);
380
- }, [t.value, o]);
381
- let d = {
382
- id: l,
383
- className: `dsu-input${t.multiline === !0 ? ` dsu-textarea` : ``}${t.monospace === !0 ? ` dsu-mono` : ``}`,
384
- value: i,
385
- placeholder: t.placeholder,
386
- "aria-describedby": u,
387
- "data-field": t.field,
388
- disabled: t.disabled === !0,
389
- onFocus: () => {
390
- c(!0);
391
- },
392
- onBlur: () => {
393
- c(!1);
394
- },
395
- onChange: (e) => {
396
- a(e.target.value), t.onChange(e.target.value);
397
- }
398
- };
399
- return (0, react.createElement)(g, {
400
- ...t,
401
- controlId: l
402
- }, t.multiline === !0 ? (0, react.createElement)(`textarea`, d) : (0, react.createElement)(`input`, d));
403
- }
404
- function x(c) {
405
- let [l, u] = (0, react.useState)(!1), [d, f] = (0, react.useState)(0), p = (0, react.useRef)(null), m = (0, react.useRef)(null), h = (0, react.useId)(), _ = (0, react.useId)(), v = c.hint === void 0 ? void 0 : `${_}-hint`, { disabled: y, value: b, options: x, onChange: S } = c, C = (0, react.useMemo)(() => x.map((e, t) => ({
406
- option: e,
407
- index: t
408
- })).filter((e) => e.option.disabled !== !0), [x]), w = x.find((e) => e.value === b)?.label ?? b, T = x[d], E = T !== void 0 && T.disabled !== !0, D = (0, react.useCallback)(() => {
409
- let e = p.current, t = m.current;
410
- /* v8 ignore next 3 -- place 只在 open 的 layout effect 里调用;refs 为空只可能是卸载竞态 */
411
- if (e === null || t === null) return;
412
- let n = e.getBoundingClientRect(), r = Math.min(n.width, window.innerWidth - 16), { left: i } = n;
413
- i + r > window.innerWidth - 8 && (i = window.innerWidth - r - 8);
414
- let a = t.offsetHeight, o = n.bottom + 6;
415
- o + a > window.innerHeight - 8 && (o = n.top - a - 6);
416
- let s = Math.max(8, window.innerWidth - r - 8), c = Math.max(8, window.innerHeight - a - 8);
417
- t.style.width = `${r}px`, t.style.left = `${Math.min(Math.max(8, i), s)}px`, t.style.top = `${Math.min(Math.max(8, o), c)}px`;
418
- }, []), O = (0, react.useCallback)(() => {
419
- u(!1);
420
- }, []), k = (0, react.useCallback)(() => {
421
- if (y === !0) return;
422
- let e = C.find((e) => e.option.value === b) ?? C.at(0);
423
- e !== void 0 && (f(e.index), u(!0));
424
- }, [
425
- y,
426
- b,
427
- C
428
- ]), A = (0, react.useCallback)((e) => {
429
- /* v8 ignore next 3 -- 浮层只能经由 openMenu 打开;组件禁用时打不开 */
430
- if (y === !0) return;
431
- let t = x[e];
432
- /* v8 ignore next 3 -- disabled 选项在浏览器里不派发 click;越界下标由调用面保证 */
433
- t !== void 0 && t.disabled !== !0 && (S(t.value), O(), p.current?.focus());
434
- }, [
435
- y,
436
- x,
437
- S,
438
- O
439
- ]), j = (0, react.useCallback)((e) => {
440
- let t = C.findIndex((e) => e.index === d);
441
- /* v8 ignore next 5 -- open 时归一 effect 已保证 enabled 非空且 active 落在可用项上 */
442
- if (t === -1 || C.length === 0) return;
443
- let n = (t + e + C.length) % C.length, r = C[n];
444
- /* v8 ignore next 3 -- next 由取模保证在界内 */
445
- r !== void 0 && f(r.index);
446
- }, [d, C]);
447
- (0, react.useLayoutEffect)(() => {
448
- if (!l) return () => {};
449
- D();
450
- let e = (e) => {
451
- let t = e.target;
452
- m.current?.contains(t) !== !0 && p.current?.contains(t) !== !0 && O();
453
- }, t = (e) => {
454
- let { target: t } = e;
455
- t instanceof Node && m.current?.contains(t) === !0 || O();
456
- }, n = () => {
457
- D();
458
- };
459
- return document.addEventListener(`pointerdown`, e, !0), window.addEventListener(`scroll`, t, !0), window.addEventListener(`resize`, n), () => {
460
- document.removeEventListener(`pointerdown`, e, !0), window.removeEventListener(`scroll`, t, !0), window.removeEventListener(`resize`, n);
461
- };
462
- }, [
463
- l,
464
- c.options,
465
- D,
466
- O
467
- ]), (0, react.useEffect)(() => {
468
- if (!l) return;
469
- if (y === !0 || C.length === 0) {
470
- O();
471
- return;
472
- }
473
- if (C.some((e) => e.index === d)) return;
474
- let e = C.find((e) => e.option.value === b) ?? C.at(0);
475
- /* v8 ignore next 3 -- enabled 非空在上一分支已保证 */
476
- e !== void 0 && f(e.index);
477
- }, [
478
- l,
479
- y,
480
- b,
481
- x,
482
- d,
483
- O,
484
- C
485
- ]), (0, react.useLayoutEffect)(() => {
486
- if (!l) return;
487
- let e = m.current;
488
- /* v8 ignore next 2 -- 同上,menu 在 open 的 commit 之后必然已挂上 */
489
- if (e === null) return;
490
- let t = e.querySelector(`[data-active="true"]`);
491
- /* v8 ignore next 2 -- active 已由归一 effect 保证落在可用项上 */
492
- t !== null && (t.offsetTop < e.scrollTop ? e.scrollTop = t.offsetTop : t.offsetTop + t.offsetHeight > e.scrollTop + e.clientHeight && (e.scrollTop = t.offsetTop + t.offsetHeight - e.clientHeight));
493
- }, [
494
- l,
495
- d,
496
- x
497
- ]);
498
- let M = (e) => {
499
- if (e.key === `ArrowDown` || e.key === `ArrowUp`) {
500
- if (e.preventDefault(), !l) {
501
- k();
502
- return;
503
- }
504
- j(e.key === `ArrowDown` ? 1 : -1);
505
- } else if (e.key === `Home` || e.key === `End`) {
506
- if (e.preventDefault(), l || k(), C.length === 0) return;
507
- let t = e.key === `Home` ? C.at(0) : C.at(-1);
508
- /* v8 ignore next 3 -- enabled 为空已在上一条返回 */
509
- if (t === void 0) return;
510
- f(t.index);
511
- } else if (e.key === `Enter` || e.key === ` `) {
512
- if (e.preventDefault(), !l) {
513
- k();
514
- return;
515
- }
516
- A(d);
517
- } else (e.key === `Tab` || e.key === `Escape`) && O();
518
- }, N = [], P;
519
- for (let [t, n] of x.entries()) n.group !== P && (n.group !== void 0 && N.push((0, react.createElement)(`div`, {
520
- key: `group-${t}-${n.group}`,
521
- className: `dsu-optionGroup`,
522
- role: `presentation`
523
- }, n.group)), P = n.group), N.push((0, react.createElement)(`button`, {
524
- key: `option-${n.value}`,
525
- type: `button`,
526
- role: `option`,
527
- id: `${h}-${t}`,
528
- className: `dsu-option`,
529
- tabIndex: -1,
530
- "aria-selected": n.value === c.value,
531
- "data-active": t === d,
532
- disabled: n.disabled === !0,
533
- onMouseDown: (e) => {
534
- e.preventDefault();
535
- },
536
- onClick: () => {
537
- A(t);
538
- },
539
- onMouseEnter: () => {
540
- /* v8 ignore next -- happy-dom 对 disabled 元素不派发 mouse 事件;浏览器实现各有差异,保留禁用检查 */
541
- n.disabled !== !0 && f(t);
542
- }
543
- }, (0, react.createElement)(`span`, null, n.label), (0, react.createElement)(`svg`, {
544
- className: `dsu-check`,
545
- width: 14,
546
- height: 14,
547
- viewBox: `0 0 14 14`,
548
- "aria-hidden": !0
549
- }, (0, react.createElement)(`path`, {
550
- d: `M2.5 7.5l3 3 6-7`,
551
- fill: `none`,
552
- stroke: `currentColor`,
553
- strokeWidth: 1.5,
554
- strokeLinecap: `round`,
555
- strokeLinejoin: `round`
556
- }))));
557
- return (0, react.createElement)(g, {
558
- ...c,
559
- controlId: _
560
- }, (0, react.createElement)(`div`, {
561
- className: `dsu-selectWrap`,
562
- onBlur: (e) => {
563
- let t = e.relatedTarget;
564
- t instanceof Node && e.currentTarget.contains(t) || O();
565
- }
566
- }, (0, react.createElement)(`button`, {
567
- ref: p,
568
- type: `button`,
569
- id: _,
570
- className: `dsu-select dsu-input`,
571
- role: `combobox`,
572
- "aria-haspopup": `listbox`,
573
- "aria-expanded": l,
574
- "aria-controls": `${h}-list`,
575
- "aria-activedescendant": l && E ? `${h}-${d}` : void 0,
576
- "aria-describedby": v,
577
- "data-field": c.field,
578
- disabled: y === !0 || x.length === 0,
579
- onClick: () => {
580
- l ? O() : k();
581
- },
582
- onKeyDown: M
583
- }, (0, react.createElement)(`span`, { className: `dsu-selectValue` }, w), (0, react.createElement)(`svg`, {
584
- className: `dsu-chevron`,
585
- width: 14,
586
- height: 14,
587
- viewBox: `0 0 14 14`,
588
- "aria-hidden": !0
589
- }, (0, react.createElement)(`path`, {
590
- d: `M3 5l4 4 4-4`,
591
- fill: `none`,
592
- stroke: `currentColor`,
593
- strokeWidth: 1.5,
594
- strokeLinecap: `round`,
595
- strokeLinejoin: `round`
596
- }))), (0, react.createElement)(`div`, {
597
- ref: m,
598
- id: `${h}-list`,
599
- role: `listbox`,
600
- className: `dsu-menu`,
601
- "aria-label": c.label,
602
- hidden: !l
603
- }, ...N)));
604
- }
605
- function S(t) {
606
- let n = !t.writable || t.busy || !t.dirty, r;
607
- return r = t.error === null ? t.writable ? t.dirty ? t.dirtyLabel : t.cleanLabel : t.readOnlyLabel : t.error, (0, react.createElement)(`div`, {
608
- className: `dsu-savebar`,
609
- "data-dirty": t.dirty
610
- }, (0, react.createElement)(`button`, {
611
- type: `button`,
612
- className: `dsu-btn dsu-btnPrimary`,
613
- "data-field": `save`,
614
- disabled: n,
615
- onClick: t.onSave
616
- }, t.busy ? t.savingLabel : t.saveLabel), (0, react.createElement)(`button`, {
617
- type: `button`,
618
- className: `dsu-btn`,
619
- "data-field": `discard`,
620
- disabled: n,
621
- onClick: t.onDiscard
622
- }, t.revertLabel), (0, react.createElement)(`span`, { className: t.error === null ? `dsu-status` : `dsu-status dsu-statusError` }, r));
623
- }
624
78
  // lib/card-draft.ts
625
79
  /** 草稿优先取值:touched 有该键(哪怕值是 undefined=待清空)即用草稿。
626
80
  * 两层都只判**自有**属性:本函数收任意字段名,`in`/裸下标会沿原型链命中 `toString` /
@@ -777,10 +231,6 @@ function parseRebuildPoll(body, t) {
777
231
  output: outputText.length > 0 ? `${reason}\n${outputText}` : reason
778
232
  };
779
233
  }
780
- // node_modules/@jayyuen66/dsh-plugin-shared/dist/record.js
781
- function e(e) {
782
- return typeof e == `object` && !!e && !Array.isArray(e);
783
- }
784
234
  // src/rebuild-reader.ts
785
235
  const REBUILD_NAMESPACE = "zvecGrepRebuild";
786
236
  /** 网关给命名空间注册的**服务键**:`remote.<namespace>`。它在 `$mount` 完成之后才存在,
@@ -851,9 +301,9 @@ const REBUILD_DESCRIPTORS = [
851
301
  }
852
302
  ];
853
303
  /** 这个值能当远程面用吗(只核我们要调的那一位;服务来自别的实现或版本时保守当作没有)。 */
854
- const isRemoteMounter = (value) => e(value) && typeof value["$mount"] === "function";
304
+ const isRemoteMounter = (value) => (0, _jayyuen66_dsh_plugin_shared_client.isRecord)(value) && typeof value["$mount"] === "function";
855
305
  /** 同上:命名空间服务(挂载之后才有,缺它说明网关没认这枚贡献)。 */
856
- const isRebuildNamespace = (value) => e(value) && typeof value["roots"] === "function" && typeof value["rebuild"] === "function" && typeof value["status"] === "function";
306
+ const isRebuildNamespace = (value) => (0, _jayyuen66_dsh_plugin_shared_client.isRecord)(value) && typeof value["roots"] === "function" && typeof value["rebuild"] === "function" && typeof value["status"] === "function";
857
307
  /**
858
308
  * 线上拒绝(result.ok=false)翻成异常:code 与 message 都来自网关的错误对象。
859
309
  * 三个方法同构,收成一个入口——同一份判据,不抄三份。
@@ -1024,33 +474,6 @@ const UI_MESSAGES = {
1024
474
  backendModel2Vec: "model2vec (pure JS worker, lightest)"
1025
475
  }
1026
476
  };
1027
- // node_modules/@jayyuen66/dsh-plugin-shared/dist/errors.js
1028
- function t(e) {
1029
- let t = Object.getOwnPropertyDescriptor(e, `message`);
1030
- return t !== void 0 && `value` in t && typeof t.value == `string` ? t.value : void 0;
1031
- }
1032
- function n(e, r) {
1033
- if (r.has(e)) return `<circular cause>`;
1034
- r.add(e);
1035
- try {
1036
- if (!(e instanceof Error)) {
1037
- if (typeof e == `object` && e) {
1038
- let n = t(e);
1039
- if (n !== void 0 && n !== ``) return n;
1040
- }
1041
- return String(e);
1042
- }
1043
- let i = e.message === `` ? e.name : e.message, a = typeof globalThis.AggregateError == `function` && e instanceof AggregateError && e.errors.length > 0 ? ` [${e.errors.map((e) => n(e, r)).join(`; `)}]` : ``, o = e.cause === void 0 || e.cause === null ? `` : n(e.cause, r);
1044
- return `${i}${a}${o === `` || o === i ? `` : `: ${o}`}`;
1045
- } catch {
1046
- return `<unrenderable value>`;
1047
- } finally {
1048
- r.delete(e);
1049
- }
1050
- }
1051
- function r(e) {
1052
- return n(e, /* @__PURE__ */ new Set());
1053
- }
1054
477
  // src/client-entry.ts
1055
478
  const NS = "zvec-grep";
1056
479
  /**
@@ -1130,9 +553,9 @@ function numberDisplay(display, schema) {
1130
553
  /** 检索模型小节:embedding 下拉(按本地后端分组)+ 每组结果数。 */
1131
554
  function buildModelSection(deps) {
1132
555
  const { editable, fields, setField, t } = deps;
1133
- const embedding = (0, react.createElement)(x, {
556
+ const embedding = (0, react.createElement)(_jayyuen66_dsh_plugin_shared_client.SelectField, {
1134
557
  label: t("embeddingLabel"),
1135
- ...l(t("embeddingHint")),
558
+ ...(0, _jayyuen66_dsh_plugin_shared_client.splitHint)(t("embeddingHint")),
1136
559
  field: "defaultEmbedding",
1137
560
  value: fields.embedding,
1138
561
  options: embeddingOptions(t),
@@ -1141,7 +564,7 @@ function buildModelSection(deps) {
1141
564
  setField("defaultEmbedding", next);
1142
565
  }
1143
566
  });
1144
- const limit = (0, react.createElement)(v, {
567
+ const limit = (0, react.createElement)(_jayyuen66_dsh_plugin_shared_client.NumberField, {
1145
568
  label: t("limitLabel"),
1146
569
  hint: t("limitInvalid", {
1147
570
  min: 1,
@@ -1159,7 +582,7 @@ function buildModelSection(deps) {
1159
582
  setField("defaultLimit", next);
1160
583
  }
1161
584
  });
1162
- return (0, react.createElement)(d, { title: t("modelSection") }, embedding, limit);
585
+ return (0, react.createElement)(_jayyuen66_dsh_plugin_shared_client.Section, { title: t("modelSection") }, embedding, limit);
1163
586
  }
1164
587
  /** 重建行:root 输入(白名单候选进 <datalist>)+ 触发按钮(在跑时禁用)。 */
1165
588
  function buildRebuildField(deps) {
@@ -1185,9 +608,9 @@ function buildRebuildField(deps) {
1185
608
  disabled: rebuild.phase === "running",
1186
609
  onClick: deps.onRebuild
1187
610
  }, rebuild.phase === "running" ? t("rebuildRunning") : t("rebuildButton"));
1188
- return (0, react.createElement)(g, {
611
+ return (0, react.createElement)(_jayyuen66_dsh_plugin_shared_client.Field, {
1189
612
  label: t("rebuildLabel"),
1190
- ...l(rebuildHintText(t, fields.embedding, roots.length > 0)),
613
+ ...(0, _jayyuen66_dsh_plugin_shared_client.splitHint)(rebuildHintText(t, fields.embedding, roots.length > 0)),
1191
614
  wide: true
1192
615
  }, rootDatalist, rebuildInput, rebuildButton);
1193
616
  }
@@ -1218,9 +641,9 @@ function buildRebuildStatusRow(deps) {
1218
641
  /** 网络与索引小节:镜像地址、search-first 开关、配额与时效、工作区重建与守护进程状态。 */
1219
642
  function buildIndexSection(deps) {
1220
643
  const { editable, fields, setField, t } = deps;
1221
- const endpoint = (0, react.createElement)(y, {
644
+ const endpoint = (0, react.createElement)(_jayyuen66_dsh_plugin_shared_client.TextField, {
1222
645
  label: t("endpointLabel"),
1223
- ...l(t("endpointHint")),
646
+ ...(0, _jayyuen66_dsh_plugin_shared_client.splitHint)(t("endpointHint")),
1224
647
  field: "hfEndpoint",
1225
648
  value: fields.hfEndpoint,
1226
649
  placeholder: EMBEDDING_MIRROR_URL,
@@ -1230,9 +653,9 @@ function buildIndexSection(deps) {
1230
653
  setField("hfEndpoint", next.trim() === "" ? void 0 : next.trim());
1231
654
  }
1232
655
  });
1233
- const enforce = (0, react.createElement)(_, {
656
+ const enforce = (0, react.createElement)(_jayyuen66_dsh_plugin_shared_client.ToggleField, {
1234
657
  label: t("enforceLabel"),
1235
- ...l(t("enforceHint")),
658
+ ...(0, _jayyuen66_dsh_plugin_shared_client.splitHint)(t("enforceHint")),
1236
659
  field: "enforceSearchFirst",
1237
660
  checked: fields.enforceSearchFirst,
1238
661
  disabled: !editable,
@@ -1240,9 +663,9 @@ function buildIndexSection(deps) {
1240
663
  setField("enforceSearchFirst", next);
1241
664
  }
1242
665
  });
1243
- const budget = (0, react.createElement)(v, {
666
+ const budget = (0, react.createElement)(_jayyuen66_dsh_plugin_shared_client.NumberField, {
1244
667
  label: t("budgetLabel"),
1245
- ...l(t("budgetHint", { default: 3 })),
668
+ ...(0, _jayyuen66_dsh_plugin_shared_client.splitHint)(t("budgetHint", { default: 3 })),
1246
669
  field: "grepBudgetPerSearch",
1247
670
  value: numberDisplay(fields.grepBudget, BUDGET_SCHEMA),
1248
671
  min: BUDGET_SCHEMA.minValue ?? 1,
@@ -1255,9 +678,9 @@ function buildIndexSection(deps) {
1255
678
  setField("grepBudgetPerSearch", next);
1256
679
  }
1257
680
  });
1258
- const window = (0, react.createElement)(v, {
681
+ const window = (0, react.createElement)(_jayyuen66_dsh_plugin_shared_client.NumberField, {
1259
682
  label: t("windowLabel"),
1260
- ...l(t("windowHint", { default: 10 })),
683
+ ...(0, _jayyuen66_dsh_plugin_shared_client.splitHint)(t("windowHint", { default: 10 })),
1261
684
  field: "unlockWindowMin",
1262
685
  value: numberDisplay(fields.unlockWindow, WINDOW_SCHEMA),
1263
686
  min: WINDOW_SCHEMA.minValue ?? 1,
@@ -1270,12 +693,12 @@ function buildIndexSection(deps) {
1270
693
  setField("unlockWindowMin", next);
1271
694
  }
1272
695
  });
1273
- return (0, react.createElement)(d, { title: t("indexSection") }, endpoint, enforce, budget, window, buildDaemonNote(deps), buildRebuildField(deps), buildRebuildStatusRow(deps));
696
+ return (0, react.createElement)(_jayyuen66_dsh_plugin_shared_client.Section, { title: t("indexSection") }, endpoint, enforce, budget, window, buildDaemonNote(deps), buildRebuildField(deps), buildRebuildStatusRow(deps));
1274
697
  }
1275
698
  /** 卡片主体:检索模型 / 网络与索引两节 + 保存条。 */
1276
699
  function buildCardBody(deps) {
1277
700
  const { t } = deps;
1278
- const saveBar = (0, react.createElement)(S, {
701
+ const saveBar = (0, react.createElement)(_jayyuen66_dsh_plugin_shared_client.SaveBar, {
1279
702
  dirty: deps.dirty,
1280
703
  busy: deps.busy,
1281
704
  writable: deps.writable,
@@ -1289,7 +712,7 @@ function buildCardBody(deps) {
1289
712
  onSave: deps.onSave,
1290
713
  onDiscard: deps.onDiscard
1291
714
  });
1292
- return (0, react.createElement)(u, null, buildModelSection(deps), buildIndexSection(deps), saveBar);
715
+ return (0, react.createElement)(_jayyuen66_dsh_plugin_shared_client.CardForm, null, buildModelSection(deps), buildIndexSection(deps), saveBar);
1293
716
  }
1294
717
  /** 显式字段写入(schema-coverage 门禁按 set('字段名') 字面量识别绑定)。 */
1295
718
  function pushFieldWrite(ops, key, draft, set) {
@@ -1378,7 +801,7 @@ function useRebuild(t, reader) {
1378
801
  stopPolling();
1379
802
  setRebuild({
1380
803
  phase: "error",
1381
- output: r(error)
804
+ output: (0, _jayyuen66_dsh_plugin_shared_client.errorText)(error)
1382
805
  });
1383
806
  } finally {
1384
807
  pollingRef.current = false;
@@ -1414,7 +837,7 @@ function useRebuild(t, reader) {
1414
837
  stopPolling();
1415
838
  setRebuild({
1416
839
  phase: "error",
1417
- output: r(error)
840
+ output: (0, _jayyuen66_dsh_plugin_shared_client.errorText)(error)
1418
841
  });
1419
842
  }
1420
843
  }
@@ -1438,7 +861,7 @@ function ZgCard(props) {
1438
861
  const [saveError, setSaveError] = (0, react.useState)(null);
1439
862
  const rebuildView = useRebuild(t, props.rebuildRemote);
1440
863
  const fields = draftFields(touched, value);
1441
- const dirtyCount = t$2(touched, value).length;
864
+ const dirtyCount = (0, _jayyuen66_dsh_plugin_shared_client.diffTouched)(touched, value).length;
1442
865
  const dirty = dirtyCount > 0;
1443
866
  const setField = (field, draft) => {
1444
867
  setTouched((prev) => ({
@@ -1447,7 +870,7 @@ function ZgCard(props) {
1447
870
  }));
1448
871
  };
1449
872
  const save = async () => {
1450
- const keys = t$2(touched, value);
873
+ const keys = (0, _jayyuen66_dsh_plugin_shared_client.diffTouched)(touched, value);
1451
874
  if (keys.length === 0) return;
1452
875
  setBusy(true);
1453
876
  setSaveError(null);
@@ -1465,7 +888,7 @@ function ZgCard(props) {
1465
888
  }
1466
889
  } catch (error) {
1467
890
  setBusy(false);
1468
- setSaveError(t("saveFailed", { reason: r(error) }));
891
+ setSaveError(t("saveFailed", { reason: (0, _jayyuen66_dsh_plugin_shared_client.errorText)(error) }));
1469
892
  return;
1470
893
  }
1471
894
  const savedKeys = new Set(keys);
@@ -1510,7 +933,7 @@ function apply(ctx) {
1510
933
  ctx.effect(() => {
1511
934
  const tag = document.createElement("style");
1512
935
  tag.id = "zvec-grep-card-css";
1513
- tag.textContent = `${CARD_CSS}\n${c}`;
936
+ tag.textContent = `${CARD_CSS}\n${_jayyuen66_dsh_plugin_shared_client.CARD_UI_CSS}`;
1514
937
  document.head.append(tag);
1515
938
  return () => {
1516
939
  tag.remove();
package/cordis.patch.yml CHANGED
@@ -12,5 +12,8 @@
12
12
  # 行按裸包名引用本包(client-modules 只扫描裸包名条目的 dsh.client 声明)。
13
13
  # 注意 pnpm ≥12.3.0:12.0.0 的 add 本地目录有 #14437 bug。
14
14
  - insert:
15
+ # 故意不写 id:shared 是本包 patch 启用的内部组件行,不是用户可停用的独立组件;
16
+ # 写 id 会让插件页出现一个可关闭的组件,关闭后本包设置卡会失去组件供应。
17
+ - name: "@jayyuen66/dsh-plugin-shared"
15
18
  - id: zvec-grep
16
19
  name: "@jayyuen66/dsh-zvec-grep"
package/docs/DETAIL.md CHANGED
@@ -15,9 +15,9 @@ The card's Rebuild button runs the equivalent of `zg index --rebuild` for a work
15
15
 
16
16
  ## Restart-only values
17
17
 
18
- Ten deployment values stay off the card: `searchTimeoutMs` (300000), `statusTimeoutMs` (60000), `indexTimeoutMs` (600000), `stdoutMaxBytes` (400000), `rebuildWaitMs`, `clientMode` (`auto` / `direct` / `server`), `allowRemoteEmbedding` (false), `remoteEmbeddingEndpoint`, `remoteEmbeddingApiKeyFrom`, `requireApprovalForExplicitRoot` (false).
18
+ Ten deployment values stay off the card: `searchTimeoutMs` (300000), `statusTimeoutMs` (60000), `indexTimeoutMs` (600000), `stdoutMaxBytes` (400000), `rebuildWaitMs` (120000), `clientMode` (`auto` / `direct` / `server`), `allowRemoteEmbedding` (false), `remoteEmbeddingEndpoint`, `remoteEmbeddingApiKeyFrom`, `requireApprovalForExplicitRoot` (false). None of these ten 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.
19
19
 
20
- 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` or `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 only carries the row's `id` / `name`); they take effect on restart.
20
+ 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` or `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` plus a second, **id-less** entry for `@jayyuen66/dsh-plugin-shared` that supplies the card components — deleting it leaves the settings card without its component supplier); they take effect on restart.
21
21
 
22
22
  ## What it needs from outside
23
23
 
package/docs/DETAIL.zh.md CHANGED
@@ -17,7 +17,7 @@
17
17
 
18
18
  十项部署值刻意不进设置卡:`searchTimeoutMs`(300000)、`statusTimeoutMs`(60000)、`indexTimeoutMs`(600000)、`stdoutMaxBytes`(400000)、`rebuildWaitMs`(120000)、`clientMode`(`auto` / `direct` / `server`)、`allowRemoteEmbedding`(false)、`remoteEmbeddingEndpoint`、`remoteEmbeddingApiKeyFrom`、`requireApprovalForExplicitRoot`(false)。这十项在卡上没有入口,能生效的只有下一段那条注册行 `config:`;优先级是注册行 `config:` > 代码里的 `.default()`。
19
19
 
20
- 「工作区内容能不能离开本机」被当成部署决定,而不是给模型选的开关,所以远程嵌入那三枚既不在卡上也不在工具参数里;即便开了,`zg` 自己仍要求 `--allow-remote` 或 `zg auth grant`。这些值都写在**自己 profile 的 `cordis.yml`** 里本插件注册行的 `config:` 块(随包那份 `cordis.patch.yml` 只带 `id` / `name` 两行),改值随重启生效。
20
+ 「工作区内容能不能离开本机」被当成部署决定,而不是给模型选的开关,所以远程嵌入那三枚既不在卡上也不在工具参数里;即便开了,`zg` 自己仍要求 `--allow-remote` 或 `zg auth grant`。这些值都写在**自己 profile 的 `cordis.yml`** 里本插件注册行的 `config:` 块(随包那份 `cordis.patch.yml` 带本行的 `id` / `name`,另有一条**不写 id** 的 `@jayyuen66/dsh-plugin-shared` 条目供应卡片组件——删掉它设置卡会失去组件供应),改值随重启生效。
21
21
 
22
22
  ## 需要外部提供什么
23
23
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jayyuen66/dsh-zvec-grep",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "description": "dsh 工作区语义检索插件(zg):zg_search / zg_index / zg_status + 本地 embedding 设置卡片 + systemPrompt 路由规则 + guard 安全兜底。",
5
5
  "keywords": [
6
6
  "cordis",
@@ -51,69 +51,68 @@
51
51
  "registry": "https://registry.npmjs.org"
52
52
  },
53
53
  "dependencies": {
54
- "@jayyuen66/dsh-plugin-shared": "0.2.3",
54
+ "@jayyuen66/dsh-plugin-shared": "^0.2.4",
55
55
  "zod": "4.6.7"
56
56
  },
57
57
  "devDependencies": {
58
- "@deepseek-ai/cordis": "4.0.6-alpha.2",
59
- "@deepseek-ai/cordis-plugin-group": "1.0.6-alpha.2",
60
- "@deepseek-ai/cordis-plugin-timer": "1.1.8-alpha.2",
61
- "@deepseek-ai/dsh-agent": "0.2.2-alpha.3",
62
- "@deepseek-ai/dsh-api-remotes": "0.2.2-alpha.3",
63
- "@deepseek-ai/dsh-bash-local": "0.2.2-alpha.3",
64
- "@deepseek-ai/dsh-client-locale": "0.2.2-alpha.3",
65
- "@deepseek-ai/dsh-client-store": "0.2.2-alpha.3",
66
- "@deepseek-ai/dsh-client-ui-layout": "0.2.2-alpha.3",
67
- "@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.2-alpha.3",
68
- "@deepseek-ai/dsh-client-ui-renderer": "0.2.2-alpha.3",
69
- "@deepseek-ai/dsh-client-ui-settings": "0.2.2-alpha.3",
70
- "@deepseek-ai/dsh-client-ui-slots": "0.2.2-alpha.3",
71
- "@deepseek-ai/dsh-host-webserver": "0.2.2-alpha.3",
72
- "@deepseek-ai/dsh-http-proxy": "0.2.2-alpha.3",
73
- "@deepseek-ai/dsh-jobs": "0.2.2-alpha.3",
74
- "@deepseek-ai/dsh-jobs-local": "0.2.2-alpha.3",
75
- "@deepseek-ai/dsh-llm": "0.2.2-alpha.3",
76
- "@deepseek-ai/dsh-output-retention": "0.2.2-alpha.3",
77
- "@deepseek-ai/dsh-package-manifest": "0.2.2-alpha.3",
78
- "@deepseek-ai/dsh-ptc-runtime": "0.2.2-alpha.3",
79
- "@deepseek-ai/dsh-sandbox": "0.2.2-alpha.3",
80
- "@deepseek-ai/dsh-scope": "0.2.2-alpha.3",
81
- "@deepseek-ai/dsh-session": "0.2.2-alpha.3",
82
- "@deepseek-ai/dsh-session-projection": "0.2.2-alpha.3",
83
- "@deepseek-ai/dsh-settings": "0.2.2-alpha.3",
84
- "@deepseek-ai/dsh-shell": "0.2.2-alpha.3",
85
- "@deepseek-ai/dsh-subprocess": "0.2.2-alpha.3",
86
- "@deepseek-ai/dsh-subprocess-local": "0.2.2-alpha.3",
87
- "@deepseek-ai/dsh-system-prompt": "0.2.2-alpha.3",
88
- "@deepseek-ai/dsh-timeout": "0.2.2-alpha.3",
89
- "@deepseek-ai/dsh-tool-executor-native": "0.2.2-alpha.3",
90
- "@deepseek-ai/dsh-tools": "0.2.2-alpha.3",
91
- "@deepseek-ai/dsh-typert-protocol": "0.2.2-alpha.3",
92
- "@deepseek-ai/dsh-user-approval": "0.2.2-alpha.3",
93
- "@deepseek-ai/schemastery": "3.18.6-alpha.2",
58
+ "@deepseek-ai/cordis": "4.1.0",
59
+ "@deepseek-ai/cordis-plugin-group": "1.1.0",
60
+ "@deepseek-ai/cordis-plugin-timer": "1.2.0",
61
+ "@deepseek-ai/dsh-agent": "0.2.2-rc.1",
62
+ "@deepseek-ai/dsh-api-remotes": "0.2.2-rc.1",
63
+ "@deepseek-ai/dsh-bash-local": "0.2.2-rc.1",
64
+ "@deepseek-ai/dsh-client-locale": "0.2.2-rc.1",
65
+ "@deepseek-ai/dsh-client-store": "0.2.2-rc.1",
66
+ "@deepseek-ai/dsh-client-ui-layout": "0.2.2-rc.1",
67
+ "@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.2-rc.1",
68
+ "@deepseek-ai/dsh-client-ui-renderer": "0.2.2-rc.1",
69
+ "@deepseek-ai/dsh-client-ui-settings": "0.2.2-rc.1",
70
+ "@deepseek-ai/dsh-client-ui-slots": "0.2.2-rc.1",
71
+ "@deepseek-ai/dsh-host-webserver": "0.2.2-rc.1",
72
+ "@deepseek-ai/dsh-http-proxy": "0.2.2-rc.1",
73
+ "@deepseek-ai/dsh-jobs": "0.2.2-rc.1",
74
+ "@deepseek-ai/dsh-jobs-local": "0.2.2-rc.1",
75
+ "@deepseek-ai/dsh-llm": "0.2.2-rc.1",
76
+ "@deepseek-ai/dsh-output-retention": "0.2.2-rc.1",
77
+ "@deepseek-ai/dsh-package-manifest": "0.2.2-rc.1",
78
+ "@deepseek-ai/dsh-sandbox": "0.2.2-rc.1",
79
+ "@deepseek-ai/dsh-scope": "0.2.2-rc.1",
80
+ "@deepseek-ai/dsh-session": "0.2.2-rc.1",
81
+ "@deepseek-ai/dsh-session-projection": "0.2.2-rc.1",
82
+ "@deepseek-ai/dsh-settings": "0.2.2-rc.1",
83
+ "@deepseek-ai/dsh-shell": "0.2.2-rc.1",
84
+ "@deepseek-ai/dsh-subprocess": "0.2.2-rc.1",
85
+ "@deepseek-ai/dsh-subprocess-local": "0.2.2-rc.1",
86
+ "@deepseek-ai/dsh-system-prompt": "0.2.2-rc.1",
87
+ "@deepseek-ai/dsh-timeout": "0.2.2-rc.1",
88
+ "@deepseek-ai/dsh-tool-executor-native": "0.2.2-rc.1",
89
+ "@deepseek-ai/dsh-tools": "0.2.2-rc.1",
90
+ "@deepseek-ai/dsh-typert-protocol": "0.2.2-rc.1",
91
+ "@deepseek-ai/dsh-user-approval": "0.2.2-rc.1",
92
+ "@deepseek-ai/schemastery": "3.19.0",
94
93
  "@e18e/eslint-plugin": "0.8.1",
95
94
  "@types/node": "26.6.6",
96
95
  "@types/react": "19.3.0",
97
- "@vitest/coverage-v8": "5.0.5",
98
- "eslint-plugin-regexp": "3.3.2",
96
+ "@vitest/coverage-v8": "5.1.0",
97
+ "eslint-plugin-regexp": "3.3.3",
99
98
  "eslint-plugin-sonarjs": "4.2.2",
100
99
  "eslint-plugin-zod": "5.2.2",
101
100
  "fast-check": "4.10.2",
102
- "oxfmt": "0.75.0",
103
- "oxlint": "1.90.0",
101
+ "oxfmt": "0.76.0",
102
+ "oxlint": "1.91.0",
104
103
  "oxlint-tsgolint": "7.0.2005",
105
104
  "react": "^19.3.0",
106
- "rolldown": "1.2.15",
105
+ "rolldown": "1.2.16",
107
106
  "typescript": "7.0.2",
108
- "vite": "8.3.5",
109
- "vitest": "5.0.5"
107
+ "vite": "8.3.6",
108
+ "vitest": "5.1.0"
110
109
  },
111
110
  "peerDependencies": {
112
111
  "@deepseek-ai/dsh": "^0.2.1-rc.5 || ^0.2.2-alpha.3",
113
112
  "@deepseek-ai/dsh-output-retention": "^0.2.1-rc.5 || ^0.2.2-alpha.3",
114
113
  "@deepseek-ai/dsh-scope": "^0.2.1-rc.5 || ^0.2.2-alpha.3",
115
114
  "@deepseek-ai/dsh-typert-protocol": "^0.2.1-rc.5 || ^0.2.2-alpha.3",
116
- "@deepseek-ai/schemastery": "^3.18.6-alpha.1"
115
+ "@deepseek-ai/schemastery": "^3.18.5 || ^3.18.6-alpha.1"
117
116
  },
118
117
  "peerDependenciesMeta": {
119
118
  "@deepseek-ai/dsh": {
@@ -123,7 +122,7 @@
123
122
  "icon": "icon.svg",
124
123
  "engines": {
125
124
  "dsh": "^0.2.1-rc.5 || ^0.2.2-alpha.3",
126
- "node": ">=22.12.0"
125
+ "node": ">=24.9.0"
127
126
  },
128
127
  "dsh": {
129
128
  "manifestVersion": 1,
@@ -132,7 +131,10 @@
132
131
  },
133
132
  "client": {
134
133
  "platform": "web",
135
- "immediately": true
134
+ "immediately": true,
135
+ "external": [
136
+ "@jayyuen66/dsh-plugin-shared/client"
137
+ ]
136
138
  }
137
139
  },
138
140
  "scripts": {