@jayyuen66/dsh-zvec-grep 0.1.10 → 0.1.11
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 +24 -1
- package/README.md +11 -11
- package/README.zh-CN.md +33 -32
- package/client.js +15 -8
- package/docs/DETAIL.zh.md +3 -3
- package/host.js +90 -21
- package/package.json +43 -43
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
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).
|
|
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
|
+
|
|
5
|
+
## 0.1.11
|
|
6
|
+
|
|
7
|
+
这一版补上 search-first 门禁对命令替换与壳层包装的识别,给索引探测加显式失效通道,把状态读面按部署形态收口,并让发布链与产物门禁各自多一道判据;宿主开发基线抬到 `0.2.2-alpha.3`,支持窗口改为 `^0.2.1-rc.5 || ^0.2.2-alpha.3`。
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- **宿主与元数据**:devDependencies / catalog / overrides 全量抬到 `0.2.2-alpha.3`(cordis `4.0.6-alpha.2`、schemastery `3.18.6-alpha.2`);peer 与 engines 的支持窗口改为 `^0.2.1-rc.5 || ^0.2.2-alpha.3`;shared 抬到 `0.2.3`。
|
|
12
|
+
- **search-first 门禁**(`lib/search-predicates.ts`):`$(...)` 命令替换与 `bash -c '…'` / `sh -c` / `zsh -lc` 等壳层包装里的 grep/rg 也纳入词法判据,嵌套最多两层。
|
|
13
|
+
- **索引探测失效**(`host.ts`):`zg_index` 前台落定后当场清掉该根的探测缓存,drop/重建不再等 60 秒 TTL;门禁与 `findIndexRoot` 同一拍看到新状态。
|
|
14
|
+
- **状态读面**(`host.ts`、`lib/card-logic.ts`、`src/ui-messages.ts`):`zg_status` 的守护进程注文按 `clientMode` 收口(direct 部署不再发空头承诺);卡片就绪位只认 `true`/`false`,畸形 `status` 或缺退出码统一落到「没有可判定的结果」。
|
|
15
|
+
- **构建与发布链**:`build-client` / `build-host` 直接复用 shared 的 `singleEntryChunk` 与包名同源校验;CI 与 publish 的 pnpm 补丁版本单点声明,发布 job 按 build 登记的 tarball 名/版本核对,registry 自检 URL 从 package.json 现取;产物体积门补下限,防止截断产物混过上限。action 钉版抬到 `pnpm/action-setup` v6.1.1 与 `github/codeql-action` v4.39.2。
|
|
16
|
+
- **文档**:中英 README 重写搜索门禁、root 判据、卡片就绪位、随包文件与覆盖率分母;`docs/DETAIL.zh.md` 同步 `rebuildWaitMs` 默认值与冲突旗标。
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- **argv 守卫**(`lib/argv-guard.ts`):单值/数组入口对非字符串坏值单独报「字符串或字符串数组」,不再误报成「必须是字符串数组」。
|
|
21
|
+
- **卡片读面**(`lib/card-logic.ts`、`src/client-entry.ts`):`roots()` 的探测失败折成 `false`;重建输入占位与镜像地址走 locale 常量。
|
|
22
|
+
- **契约门禁**:`test/schema-coverage.ts` 认正则字面量与 `as const`/`satisfies` 尾巴,避免把类型标注当成设置字段;两份 README 的 dsh 窗口与 badge 新增与 `engines.dsh` 同源的用例,`bump-manifests` 只改 package.json 时本仓会当场红。
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
- **测试夹具**:`test/cjk-residue.test.ts`(中文残留字符类的独立判据)、`test/host-freshness.test.ts`(产物新鲜度夹具的形状判据)、`test/schema-coverage-parsing.test.ts`(正则/字面量解析边界)、`test/embedding-cache.ts`(按模型定位真实缓存落点)、`test/sync-write-support.ts`(写锁用例共用支撑)。
|
|
4
27
|
|
|
5
28
|
## 0.1.10
|
|
6
29
|
|
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%3D22.12-4c1?style=flat-square&logo=nodedotjs&logoColor=white" alt="node" />
|
|
15
|
-
<img src="https://img.shields.io/badge/dsh-%5E0.2.1--rc.
|
|
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>
|
|
18
18
|
|
|
@@ -77,10 +77,10 @@ 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.
|
|
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.
|
|
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
|
+
- **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).
|
|
83
|
-
- **What ships**: `host.js`, `client.js`, `cordis.patch.yml`, `icon.svg`, both READMEs, `CHANGELOG.md`, `THIRD_PARTY_NOTICES.md
|
|
83
|
+
- **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.
|
|
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
|
|
86
86
|
|
|
@@ -100,7 +100,7 @@ If your profile pins `@jayyuen66/dsh-plugin-shared` with a pnpm `overrides` entr
|
|
|
100
100
|
- **No CLI subcommand.** `dsh zvec-grep …` does not exist.
|
|
101
101
|
- **No daemon lifecycle.** `zg server on` is the user's action; this package only reads readiness.
|
|
102
102
|
- **No ripgrep dependency.** rg appears only inside the gate predicate.
|
|
103
|
-
- **Nothing written to the host data directory.**
|
|
103
|
+
- **Nothing written to the host data directory.** What lands on disk is zg's business, not this package's: its index/manifest `.zvec-grep/` under the searched root, its global home `~/.zvec-grep` (config, locks, models), and embedding weights fetched per `hfEndpoint`. This package itself writes nothing.
|
|
104
104
|
- Required surfaces: `settings` / `shell` / `tools` / `systemPrompt` / `timer` (all in `inject`). The host `jobs` service is optional - without it the rebuild paths refuse and spawn nothing; the three tools keep working.
|
|
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
|
|
@@ -142,7 +142,7 @@ Output is plain text; timeouts 5 min (search) / 10 min (index) / 60 s (status);
|
|
|
142
142
|
### The rg switch
|
|
143
143
|
|
|
144
144
|
- `rg` unset: with no index in the workspace **or any ancestor**, the search falls back to exhaustive matching with a prepended note ("literal line matches, not semantic ranking"). `rg=true` forces it; `rg=false` refuses the fallback (zg then reports `WORKSPACE_INDEX_NOT_FOUND`).
|
|
145
|
-
- Exhaustive search grants **no** grep/rg quota: it reads no index. Flag conflicts (`preview` / `refresh` / `symbol-type` / `prefer-symbol` / `fuse` / `fts` / `vector`, `trace`) are refused at assembly time with the conflicts listed; there is no hit summary (no `hits:` lines to count).
|
|
145
|
+
- Exhaustive search grants **no** grep/rg quota: it reads no index. Flag conflicts (`preview` / `refresh` / `symbol-type` / `prefer-symbol` / `fuse` / `fts` / `vector`, `trace`, plus a non-empty `queries` - the exhaustive channel takes a single `query` as the pattern) are refused at assembly time with the conflicts listed; there is no hit summary (no `hits:` lines to count).
|
|
146
146
|
|
|
147
147
|
### Root rules
|
|
148
148
|
|
|
@@ -152,7 +152,7 @@ Output is plain text; timeouts 5 min (search) / 10 min (index) / 60 s (status);
|
|
|
152
152
|
## <img src="https://api.iconify.design/lucide/ban.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> The search-first gate
|
|
153
153
|
|
|
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
|
-
- **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).
|
|
155
|
+
- **Quota per "session x index root"**: each successful, **index-reading** `zg_search` re-arms `grepBudgetPerSearch` calls valid for `unlockWindowMin` minutes (an exhaustive lexical fallback also "succeeds" but grants no quota); the index root is the root itself or its nearest indexed ancestor (up to 8 levels up). The gate yields only when the host supplies a step-admission view (`toolSet`) without `zg_search` in it - hosts that provide no admission info keep the plain criteria.
|
|
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
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.
|
|
158
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.
|
|
@@ -203,7 +203,7 @@ Off by default: `allowRemoteEmbedding=false`, `remoteEmbeddingEndpoint=""`, `rem
|
|
|
203
203
|
|
|
204
204
|
- Direct and server are **two capability surfaces**, not a speed knob: direct cold-loads the embedding model on every query; watcher-driven incremental refresh, `refresh=background` and a resident model pool exist only in server mode. Upstream probes readiness for `auto` but never starts a daemon.
|
|
205
205
|
- This package does not start one either - `zg server on` leaves a detached process and a token file, which is the user's decision. It makes the difference **explicit** instead: the exit code of `zg server status --check-ready` is cached for 60 s (a failed probe counts as "not ready", never an infrastructure error), gates `refresh=background`, and is echoed once in `zg_status` output and once on the card. Only the `roots()` read issues the probe.
|
|
206
|
-
- The card's `serverReady` is
|
|
206
|
+
- The card's `serverReady` is `true` / `false` at the card layer — a failed or erroring probe counts as `false` ("probe failure means not ready"), so the readiness line always renders. `undefined` only survives inside the raw `roots()` payload of an older card snapshot; the live card folds it to `false`. To get the benefits, run `zg server on` in a terminal.
|
|
207
207
|
|
|
208
208
|
## <img src="https://api.iconify.design/lucide/network.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> Public interface
|
|
209
209
|
|
|
@@ -211,7 +211,7 @@ One official Typert Remote namespace, `zvecGrepRebuild`, installed on the apply
|
|
|
211
211
|
|
|
212
212
|
| Method | Input | Reply |
|
|
213
213
|
| --- | --- | --- |
|
|
214
|
-
| `roots()` | - | `{ roots, serverReady }` - observed whitelist plus the readiness line; `
|
|
214
|
+
| `roots()` | - | `{ roots, serverReady }` - observed whitelist plus the readiness line; the probe folds failure to `false` (`undefined` only marks an older snapshot where the probe never ran) |
|
|
215
215
|
| `rebuild({ root })` | an absolute root | `{ ok: true, jobId, reused? }` or `{ ok: false, error, status }` |
|
|
216
216
|
| `status({ jobId })` | a job id from this package | `{ status, exitCode, root, output }` (plus `sandbox` when present) or `{ ok: false, error, status: 404 \| 503 }` |
|
|
217
217
|
|
|
@@ -232,7 +232,7 @@ A "rebuild workspace" run is one **unowned** job in the host's `ctx.jobs` (`kind
|
|
|
232
232
|
|
|
233
233
|
| Aspect | Content |
|
|
234
234
|
| --- | --- |
|
|
235
|
-
| Written to disk | Nothing by this package.
|
|
235
|
+
| Written to disk | Nothing by this package. zg owns the disk shapes: the `.zvec-grep/` index directory under the searched root, its global home `~/.zvec-grep` (config/locks/models) and the embedding-weight cache; nothing lands in the host data directory |
|
|
236
236
|
| What it reads | The index probe: one existence check plus one manifest read |
|
|
237
237
|
| Network | Only the embedding-weight download driven by `hfEndpoint`, performed by zg. Remote embedding is off by default and is a deployment decision |
|
|
238
238
|
| Secret exclusion | Excluded by default, case-insensitively and after your own path rules: `*.pem` / `*.key` / `*.p12` / `*.pfx` / `*.keystore` / `*.jks` / `*.ppk` / `id_rsa*` / `id_ed25519*` (excludeSecrets=false to allow). Extensionless key files are not covered - declare them via ignoreFiles |
|
|
@@ -270,7 +270,7 @@ pnpm run check # typecheck (three tsconfig programs) → lint → both bundle
|
|
|
270
270
|
```
|
|
271
271
|
|
|
272
272
|
- Tests come in three tiers: `test/*.test.ts` (unit + mocked host context), `test/integration/*` (real host services driven through `ctx.tools.execute()` / actual `fetch`), and `test/e2e/zg-cli.test.ts` (no plugin, no mock - the built command lines against the **real zg CLI**). Host-contract bugs surface in the middle tier: a mocked context can only agree with what this package already believes.
|
|
273
|
-
- Coverage is **100%** across four metrics over the opted-in surface (`host.ts` + `lib/**`); the
|
|
273
|
+
- Coverage is **100%** across four metrics over the opted-in surface (`host.ts` + `lib/**` + the two card-side sources `src/ui-messages.ts` / `src/rebuild-reader.ts`); only the pure browser entry `src/client-entry.ts` stays outside the denominator and is exercised through the bundle.
|
|
274
274
|
- `host.js` / `client.js` are not committed; `prepare` / `prepack` rebuild them and two tests compare the on-disk bundle against an in-memory build byte for byte. Never hand-edit the bundles.
|
|
275
275
|
- Manifest gates (`test/publish-manifest.test.ts`) guard the published surface: entry targets covered by `files`, host packages out of `dependencies`, `dsh-*` pinned exactly, no local paths in artifacts. `test/dist-size.test.ts` budgets bundle bytes; `test/readme-parity.test.ts` keeps both READMEs structurally in sync.
|
|
276
276
|
|
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%3D22.12-4c1?style=flat-square&logo=nodedotjs&logoColor=white" alt="node" />
|
|
15
|
-
<img src="https://img.shields.io/badge/dsh-%5E0.2.1--rc.
|
|
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>
|
|
18
18
|
|
|
@@ -33,32 +33,33 @@
|
|
|
33
33
|
|
|
34
34
|
## <img src="https://api.iconify.design/lucide/file-text.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> 目录
|
|
35
35
|
|
|
36
|
-
- [
|
|
37
|
-
- [
|
|
38
|
-
|
|
39
|
-
- [
|
|
40
|
-
- [
|
|
41
|
-
- [
|
|
42
|
-
- [
|
|
43
|
-
|
|
44
|
-
- [
|
|
45
|
-
- [
|
|
36
|
+
- [ 目录](#-目录)
|
|
37
|
+
- [ 它做什么](#-它做什么)
|
|
38
|
+
- [ 安装](#-安装)
|
|
39
|
+
- [ shared 的版本下限](#-shared-的版本下限)
|
|
40
|
+
- [ 确认它真的在工作](#-确认它真的在工作)
|
|
41
|
+
- [ 它不提供什么](#-它不提供什么)
|
|
42
|
+
- [ 在 dsh 里启用](#-在-dsh-里启用)
|
|
43
|
+
- [ 提供给模型的工具](#-提供给模型的工具)
|
|
44
|
+
- [zg\_search](#zg_search)
|
|
45
|
+
- [zg\_index](#zg_index)
|
|
46
|
+
- [zg\_status](#zg_status)
|
|
46
47
|
- [rg 开关](#rg-开关)
|
|
47
48
|
- [root 判据](#root-判据)
|
|
48
|
-
- [search-first 门禁](
|
|
49
|
-
- [设置项](
|
|
49
|
+
- [ search-first 门禁](#-search-first-门禁)
|
|
50
|
+
- [ 设置项](#-设置项)
|
|
50
51
|
- [远程 embedding](#远程-embedding)
|
|
51
52
|
- [显式 root 前的确认](#显式-root-前的确认)
|
|
52
|
-
- [支持面](
|
|
53
|
-
- [外部依赖](
|
|
54
|
-
- [守护进程](
|
|
55
|
-
- [对外接口](
|
|
56
|
-
- [后台作业面](
|
|
57
|
-
- [数据与隐私](
|
|
58
|
-
- [已知边界](
|
|
59
|
-
- [常见问题](
|
|
60
|
-
- [开发](
|
|
61
|
-
- [许可](
|
|
53
|
+
- [ 支持面](#-支持面)
|
|
54
|
+
- [ 外部依赖](#-外部依赖)
|
|
55
|
+
- [ 守护进程](#-守护进程)
|
|
56
|
+
- [ 对外接口](#-对外接口)
|
|
57
|
+
- [ 后台作业面](#-后台作业面)
|
|
58
|
+
- [ 数据与隐私](#-数据与隐私)
|
|
59
|
+
- [ 已知边界](#-已知边界)
|
|
60
|
+
- [ 常见问题](#-常见问题)
|
|
61
|
+
- [ 开发](#-开发)
|
|
62
|
+
- [ 许可](#-许可)
|
|
62
63
|
|
|
63
64
|
## <img src="https://api.iconify.design/lucide/shield.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> 它做什么
|
|
64
65
|
|
|
@@ -77,10 +78,10 @@ dsh plugin --profile web add @jayyuen66/dsh-zvec-grep
|
|
|
77
78
|
卸载用 `dsh plugin --profile web remove @jayyuen66/dsh-zvec-grep`。包在公共 npm registry 上,不需要凭据,也不需要 scoped-registry 配置行。
|
|
78
79
|
|
|
79
80
|
- **Node.js `>= 22.12`**(纯 ESM;正是这个下限让 `require()` 一枚 ESM 入口成为可能,`engines.node` 因此声明)。
|
|
80
|
-
- **宿主 `dsh` 在 `0.2.1-rc.
|
|
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` 里的精确钉版才是防「第二份宿主类型面」的编译期纪律——那不是宿主会去读的声明。
|
|
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
|
+
- **按契约,`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` 里的精确钉版才是防「第二份宿主类型面」的编译期纪律——那不是宿主会去读的声明。
|
|
82
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 校验)。
|
|
83
|
-
- **随包发什么**:`host.js`、`client.js`、`cordis.patch.yml`、`icon.svg`、两份 README、`CHANGELOG.md`、`THIRD_PARTY_NOTICES.md
|
|
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` 现产,不入库。
|
|
84
85
|
|
|
85
86
|
### <img src="https://api.iconify.design/lucide/arrow-down-to-line.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> shared 的版本下限
|
|
86
87
|
|
|
@@ -100,7 +101,7 @@ dsh plugin --profile web add @jayyuen66/dsh-zvec-grep
|
|
|
100
101
|
- **没有 CLI 子命令。** `dsh zvec-grep …` 不存在。
|
|
101
102
|
- **不碰守护进程的生命周期。** `zg server on` 是用户的动作;本包只读就绪态。
|
|
102
103
|
- **不依赖 ripgrep。** rg 只出现在门禁判据里。
|
|
103
|
-
- **不向宿主数据目录写任何东西。**
|
|
104
|
+
- **不向宿主数据目录写任何东西。** 落盘的都是 zg 的事:检索根下的 `.zvec-grep/` 索引与清单、zg 的全局 home `~/.zvec-grep`(config / 锁 / 模型)、以及按 `hfEndpoint` 下载的 embedding 权重缓存。
|
|
104
105
|
- 必需的服务面:settings / shell / tools / systemPrompt / timer(全在 `inject` 里)。宿主 `jobs` 服务可选——没有它时重建路径拒绝且不 spawn,三枚工具照常工作。
|
|
105
106
|
|
|
106
107
|
## <img src="https://api.iconify.design/lucide/plug.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> 在 dsh 里启用
|
|
@@ -142,7 +143,7 @@ dsh plugin --profile web add @jayyuen66/dsh-zvec-grep
|
|
|
142
143
|
### rg 开关
|
|
143
144
|
|
|
144
145
|
- `rg` 留空:工作区**及其向上各级**都没有索引时自动改走穷举匹配,并在结果前声明「这是逐行字面匹配,不是语义排序」。`rg=true` 强制;`rg=false` 拒绝改道(zg 报 `WORKSPACE_INDEX_NOT_FOUND`)。
|
|
145
|
-
- 穷举检索**不发放** grep/rg 配额:它不读索引。冲突旗标(`preview` / `refresh` / `symbol-type` / `prefer-symbol` / `fuse` / `fts` / `vector`、`trace`)在构造期拒绝并列出;没有 `hits:` 计数行,命中摘要自动不出。
|
|
146
|
+
- 穷举检索**不发放** grep/rg 配额:它不读索引。冲突旗标(`preview` / `refresh` / `symbol-type` / `prefer-symbol` / `fuse` / `fts` / `vector`、`trace`,以及非空 `queries`——穷举通道只认单条 `query`)在构造期拒绝并列出;没有 `hits:` 计数行,命中摘要自动不出。
|
|
146
147
|
|
|
147
148
|
### root 判据
|
|
148
149
|
|
|
@@ -203,7 +204,7 @@ dsh plugin --profile web add @jayyuen66/dsh-zvec-grep
|
|
|
203
204
|
|
|
204
205
|
- direct 与 server 是**两种能力面**,不是快慢之分:direct 每次查询都冷加载 embedding 模型;增量刷新(watcher)、`refresh=background` 与常驻模型池只在 server 模式下存在。上游对 `auto` 只做就绪探测、不拉起 daemon。
|
|
205
206
|
- 本包也不拉——`zg server on` 会留下 detached 进程与 token 文件,那是用户的决定。本包做的是把差异**显式化**:按 60 秒 TTL 缓存 `zg server status --check-ready` 的退出码(探测失败按未就绪收口,绝不外抛基础设施故障),据此收口 `refresh=background`,并在 `zg_status` 输出尾与卡片各回显一行。探测只由 `roots()` 读面发出。
|
|
206
|
-
- 卡片的 `serverReady`
|
|
207
|
+
- 卡片的 `serverReady` 在卡片层只可能是 `true` / `false`——探测失败按未就绪收口,就绪行恒渲染。`undefined` 只会出现在旧快照的 `roots()` 原始载荷里(那一次探测压根没跑),实时卡片把它折成 `false`。想要红利就在终端里跑 `zg server on`。
|
|
207
208
|
|
|
208
209
|
## <img src="https://api.iconify.design/lucide/network.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> 对外接口
|
|
209
210
|
|
|
@@ -211,7 +212,7 @@ dsh plugin --profile web add @jayyuen66/dsh-zvec-grep
|
|
|
211
212
|
|
|
212
213
|
| 方法 | 入参 | 回执 |
|
|
213
214
|
| --- | --- | --- |
|
|
214
|
-
| `roots()` | - | `{ roots, serverReady }
|
|
215
|
+
| `roots()` | - | `{ roots, serverReady }`——观测白名单加就绪行;探测失败折成 `false`(`undefined` 只标记旧快照里那次探测没跑过) |
|
|
215
216
|
| `rebuild({ root })` | 一个绝对 root | `{ ok: true, jobId, reused? }` 或 `{ ok: false, error, status }` |
|
|
216
217
|
| `status({ jobId })` | 本包发的作业号 | `{ status, exitCode, root, output }`(有沙箱时带 `sandbox`)或 `{ ok: false, error, status: 404 \| 503 }` |
|
|
217
218
|
|
|
@@ -232,7 +233,7 @@ dsh plugin --profile web add @jayyuen66/dsh-zvec-grep
|
|
|
232
233
|
|
|
233
234
|
| 口径 | 内容 |
|
|
234
235
|
| --- | --- |
|
|
235
|
-
| 写盘 |
|
|
236
|
+
| 写盘 | 本包不写任何文件。落盘形状归 zg:检索根下的 `.zvec-grep/` 索引目录、全局 home `~/.zvec-grep`(config/锁/模型)与 embedding 权重缓存;宿主数据目录里什么都不落 |
|
|
236
237
|
| 本包读什么 | 索引探测:一次存在性检查加读一次清单 |
|
|
237
238
|
| 网络 | 只有 zg 按 hfEndpoint 下载 embedding 权重。远程 embedding 默认关闭、属部署决定 |
|
|
238
239
|
| 密钥排除 | 默认排除、大小写不敏感、且排在你的路径规则之后:`*.pem` / `*.key` / `*.p12` / `*.pfx` / `*.keystore` / `*.jks` / `*.ppk` / `id_rsa*` / `id_ed25519*`(excludeSecrets=false 可关)。**无扩展名**的密钥文件不覆盖——走 ignoreFiles 声明 |
|
|
@@ -270,7 +271,7 @@ pnpm run check # 类型检查(三个 tsconfig 程序)→ lint → 两个 b
|
|
|
270
271
|
```
|
|
271
272
|
|
|
272
273
|
- 测试分三层:`test/*.test.ts`(单测 + mock 宿主上下文)、`test/integration/*`(真宿主服务,经 `ctx.tools.execute()` / 真 `fetch` 驱动)、`test/e2e/zg-cli.test.ts`(无插件无替身——构造出的命令行直喂**真 zg CLI**)。宿主契约的缺陷出在中间层:mock 上下文只会同意本包已经相信的事。
|
|
273
|
-
- 覆盖率四项 **100%**,分母是选入的面(`host.ts` + `lib
|
|
274
|
+
- 覆盖率四项 **100%**,分母是选入的面(`host.ts` + `lib/**`,以及卡片侧两个可单测源文件 `src/ui-messages.ts` / `src/rebuild-reader.ts`);只有纯浏览器入口 `src/client-entry.ts` 在分母外,经 bundle 覆盖。
|
|
274
275
|
- `host.js` / `client.js` 不入库;`prepare` / `prepack` 现产,两条测试拿磁盘产物与内存构建逐字节比。发布物不手改。
|
|
275
276
|
- manifest 门(`test/publish-manifest.test.ts`)守发布面:入口目标被 `files` 覆盖、宿主包不进 `dependencies`、`dsh-*` 精确钉、产物无本机路径。`test/dist-size.test.ts` 设体积预算,`test/readme-parity.test.ts` 钉两份 README 的结构对等。
|
|
276
277
|
|
package/client.js
CHANGED
|
@@ -643,6 +643,11 @@ function numberText(raw, fallback) {
|
|
|
643
643
|
* `undefined` 是**必要**的一臂,不是兜底:旧版 host 的应答里没有 `serverReady` 这个字段,
|
|
644
644
|
* 而「应答里没写」与「写了未就绪」是两件事——把前者显示成后者,卡片就在用户眼前谎称了一次
|
|
645
645
|
* 「没有守护进程」。判据收在可单测的这一层,client 只负责渲染它选出来的那一行。
|
|
646
|
+
*
|
|
647
|
+
* 入参写 `unknown` 而不是 `boolean | undefined`:应答里的这一位只有类型声明、没有运行时校验
|
|
648
|
+
* (lib/rebuild-shape.ts),把形状收紧在声明上等于假定畸形值不会出现,而这里的严格判等正是
|
|
649
|
+
* 为了不让 `null` / `"false"` / `0` 这类值被 falsy 判断误收成「未就绪」。调用方交来的仍是
|
|
650
|
+
* `boolean | undefined`,收紧的一侧由它自己保证。
|
|
646
651
|
*/
|
|
647
652
|
function daemonNoteKey(ready) {
|
|
648
653
|
let key;
|
|
@@ -913,10 +918,11 @@ function createRebuildReader(ctx) {
|
|
|
913
918
|
return typeof ctx.get === "function" ? buildRebuildReader(ctx) : void 0;
|
|
914
919
|
}
|
|
915
920
|
// src/ui-messages.ts
|
|
921
|
+
/** 推荐的 embedding 模型镜像(endpointHint 与 client-entry 的 placeholder 共用)。 */
|
|
922
|
+
const EMBEDDING_MIRROR_URL = "https://modelscope.cn/models";
|
|
916
923
|
const UI_MESSAGES = {
|
|
917
924
|
zh: {
|
|
918
925
|
statusReadOnly: "当前作用域只读",
|
|
919
|
-
statusDirty: "有未保存的修改,点「保存」生效",
|
|
920
926
|
statusClean: "无未保存的修改",
|
|
921
927
|
dirtyCount: "已修改 {count} 项",
|
|
922
928
|
save: "保存",
|
|
@@ -936,7 +942,7 @@ const UI_MESSAGES = {
|
|
|
936
942
|
limitInvalid: "请输入 {min}-{max} 的整数",
|
|
937
943
|
limitClamped: "已钳到 {min}-{max} 范围:{value}",
|
|
938
944
|
endpointLabel: "HuggingFace 镜像地址",
|
|
939
|
-
endpointHint:
|
|
945
|
+
endpointHint: `留空走 huggingface.co;国内网络可填 ${EMBEDDING_MIRROR_URL} 等兼容镜像(仅 llama-cpp 后端生效,如 qwen3)`,
|
|
940
946
|
enforceLabel: "强制 search-first(先 zg_search 再 grep/rg)",
|
|
941
947
|
enforceHint: "开启后,已建索引工作区内的 grep/rg 受配额门禁约束:每次成功 zg_search 解锁下方次数的 grep/rg(时效见下),用尽或过期后再次拦截(提高检索覆盖与准确性)",
|
|
942
948
|
budgetLabel: "每次 zg_search 解锁的 grep/rg 次数",
|
|
@@ -944,6 +950,7 @@ const UI_MESSAGES = {
|
|
|
944
950
|
windowLabel: "解锁时效",
|
|
945
951
|
windowHint: "超过该时长未再次 zg_search,配额整体过期;清空恢复默认 {default}(单位:分钟)",
|
|
946
952
|
rebuildLabel: "工作区重建(切换 embedding 并保存后执行)",
|
|
953
|
+
rebuildInputPlaceholder: "/workspace 的绝对路径",
|
|
947
954
|
daemonReadyNote: "守护进程:就绪(zg server 在跑)。",
|
|
948
955
|
daemonOfflineNote: "守护进程:未就绪。守护进程提供的索引增量刷新、refresh=background 与常驻模型池在缺席时都不可用;需要时在终端执行 `zg server on`。",
|
|
949
956
|
rebuildHint: "以当前默认模型重建:{embedding};等价于 zg index --rebuild。{roots}",
|
|
@@ -956,7 +963,7 @@ const UI_MESSAGES = {
|
|
|
956
963
|
rebuildKilled: "重建进程被终止",
|
|
957
964
|
rebuildFailed: "重建作业被宿主注册表判定失败(没拿到进程退出码)",
|
|
958
965
|
rebuildExitCode: "重建进程退出码 {exitCode}(zg 未安装/权限不足/沙箱拒绝都会走到这里)",
|
|
959
|
-
rebuildExitUnknown: "
|
|
966
|
+
rebuildExitUnknown: "重建没有可判定的结果(应答的 status 无法识别,或缺少进程退出码)",
|
|
960
967
|
rebuildMissingJobId: "启动重建失败:应答缺 jobId",
|
|
961
968
|
rebuildRootNotAbsolute: "root 必须是绝对路径(以 / 开头)",
|
|
962
969
|
rebuildUnavailable: "宿主没有提供工作区重建读面(未装远程服务)",
|
|
@@ -967,7 +974,6 @@ const UI_MESSAGES = {
|
|
|
967
974
|
},
|
|
968
975
|
en: {
|
|
969
976
|
statusReadOnly: "This scope is read-only",
|
|
970
|
-
statusDirty: "Unsaved changes — press Save to apply",
|
|
971
977
|
statusClean: "No unsaved changes",
|
|
972
978
|
dirtyCount: "{count} changed",
|
|
973
979
|
save: "Save",
|
|
@@ -987,7 +993,7 @@ const UI_MESSAGES = {
|
|
|
987
993
|
limitInvalid: "enter an integer between {min} and {max}",
|
|
988
994
|
limitClamped: "clamped into the {min}-{max} range: {value}",
|
|
989
995
|
endpointLabel: "HuggingFace mirror URL",
|
|
990
|
-
endpointHint:
|
|
996
|
+
endpointHint: `Leave empty for huggingface.co; on networks that cannot reach HF, fill a compatible mirror such as ${EMBEDDING_MIRROR_URL} (llama-cpp backends only, e.g. qwen3)`,
|
|
991
997
|
enforceLabel: "Enforce search-first (zg_search before grep/rg)",
|
|
992
998
|
enforceHint: "When on, grep/rg inside indexed workspaces is quota-gated: each successful zg_search unlocks the number of grep/rg calls below (valid for the window below), and the gate blocks again once it is spent or expired (better coverage and relevance)",
|
|
993
999
|
budgetLabel: "grep/rg calls unlocked per zg_search",
|
|
@@ -995,6 +1001,7 @@ const UI_MESSAGES = {
|
|
|
995
1001
|
windowLabel: "Unlock window",
|
|
996
1002
|
windowHint: "Without another zg_search inside this window the whole quota expires; clear to restore the default {default} (minutes)",
|
|
997
1003
|
rebuildLabel: "Workspace rebuild (run after switching embedding and saving)",
|
|
1004
|
+
rebuildInputPlaceholder: "absolute path to a /workspace",
|
|
998
1005
|
daemonReadyNote: "Daemon: ready (zg server is running).",
|
|
999
1006
|
daemonOfflineNote: "Daemon: not ready. What the daemon provides — incremental index refresh, refresh=background and the resident embedding model pool — is unavailable while it is absent; run `zg server on` in a terminal when you want it.",
|
|
1000
1007
|
rebuildHint: "Rebuild with the current default model: {embedding}; same as zg index --rebuild. {roots}",
|
|
@@ -1007,7 +1014,7 @@ const UI_MESSAGES = {
|
|
|
1007
1014
|
rebuildKilled: "the rebuild process was terminated",
|
|
1008
1015
|
rebuildFailed: "the host job registry reported the rebuild as failed (no process exit code)",
|
|
1009
1016
|
rebuildExitCode: "the rebuild process exited with code {exitCode} (missing zg, insufficient permissions and sandbox denials all land here)",
|
|
1010
|
-
rebuildExitUnknown: "the rebuild
|
|
1017
|
+
rebuildExitUnknown: "the rebuild has no determinable outcome (the response status is unrecognized, or its exit code is missing)",
|
|
1011
1018
|
rebuildMissingJobId: "failed to start the rebuild: the response has no jobId",
|
|
1012
1019
|
rebuildRootNotAbsolute: "root must be an absolute path (starting with /)",
|
|
1013
1020
|
rebuildUnavailable: "the host does not expose the rebuild Remote API",
|
|
@@ -1166,7 +1173,7 @@ function buildRebuildField(deps) {
|
|
|
1166
1173
|
className: "dsu-input zgc-rebuildInput",
|
|
1167
1174
|
value: root,
|
|
1168
1175
|
list: ROOT_OPTIONS_ID,
|
|
1169
|
-
placeholder: "
|
|
1176
|
+
placeholder: t("rebuildInputPlaceholder"),
|
|
1170
1177
|
onChange: (ev) => {
|
|
1171
1178
|
setRoot(ev.target.value);
|
|
1172
1179
|
}
|
|
@@ -1216,7 +1223,7 @@ function buildIndexSection(deps) {
|
|
|
1216
1223
|
...l(t("endpointHint")),
|
|
1217
1224
|
field: "hfEndpoint",
|
|
1218
1225
|
value: fields.hfEndpoint,
|
|
1219
|
-
placeholder:
|
|
1226
|
+
placeholder: EMBEDDING_MIRROR_URL,
|
|
1220
1227
|
monospace: true,
|
|
1221
1228
|
disabled: !editable,
|
|
1222
1229
|
onChange: (next) => {
|
package/docs/DETAIL.zh.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
## 设置卡上改的是什么
|
|
6
6
|
|
|
7
7
|
- **检索模型** — `defaultEmbedding`(默认 `local/qwen3-embedding-0.6b`,约 640 MB)只作用于**新建**的索引;已有索引沿用它自己的模型,要换得先重建。`defaultLimit`(1–50,默认 10)是每组结果返回多少条命中。
|
|
8
|
-
- **网络与索引** — `hfEndpoint` 默认指向 ModelScope 镜像(`https://modelscope.cn/models`);留空就是 huggingface.co,而这个环境通常连不上,所以默认值应当保留。`enforceSearchFirst`(默认开)在已建索引的工作区里拦住 `grep` / `rg`。`grepBudgetPerSearch`(默认 3
|
|
8
|
+
- **网络与索引** — `hfEndpoint` 默认指向 ModelScope 镜像(`https://modelscope.cn/models`);留空就是 huggingface.co,而这个环境通常连不上,所以默认值应当保留。`enforceSearchFirst`(默认开)在已建索引的工作区里拦住 `grep` / `rg`。`grepBudgetPerSearch`(默认 3)是一次**走索引的** `zg_search` 解锁多少次直查(无索引时自动改走穷举词法的检索同样成功,但不发配额),`unlockWindowMin`(默认 10)是这份解锁维持几分钟。配额按「会话 × 索引根」记账(索引根是 root 或最近的含索引祖先,最多上溯 8 层),不是全局一份;「让路」只在宿主提供了步骤准入(`toolSet`)且该视图不含 `zg_search` 时成立——不提供准入信息的宿主仍按原判据拦截。有效期在每次取用配额时现判,窗口一过就不再放行直查、不需要重启;分片表按会话数封顶 256,超出时先淘汰最久未用的那一份。该索引根上有活跃重建时,门禁临时放行且**不消耗配额**:重建持着写锁,这期间语义检索必然失败,门禁不能再把直查一起堵死。本步骤的工具准入不含 `zg_search` 时,门禁让路,不强迫模型去调一个本步骤调不动的工具。
|
|
9
9
|
|
|
10
10
|
这些每次调用现读,改完不需要重启宿主。
|
|
11
11
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
## 要重启的值
|
|
17
17
|
|
|
18
|
-
十项部署值刻意不进设置卡:`searchTimeoutMs`(300000)、`statusTimeoutMs`(60000)、`indexTimeoutMs`(600000)、`stdoutMaxBytes`(400000)、`rebuildWaitMs
|
|
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
20
|
「工作区内容能不能离开本机」被当成部署决定,而不是给模型选的开关,所以远程嵌入那三枚既不在卡上也不在工具参数里;即便开了,`zg` 自己仍要求 `--allow-remote` 或 `zg auth grant`。这些值都写在**自己 profile 的 `cordis.yml`** 里本插件注册行的 `config:` 块(随包那份 `cordis.patch.yml` 只带 `id` / `name` 两行),改值随重启生效。
|
|
21
21
|
|
|
@@ -25,4 +25,4 @@
|
|
|
25
25
|
|
|
26
26
|
## 更完整的说明
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
参数守卫、`root` 判据与后台作业面都写在随包 README(`README.md` / `README.zh-CN.md`)。README 没有独立的错误码表:`zg` 不在 PATH 上按 `exit 127` 归到「未安装」(见「外部依赖」一节),其余失败按工具回执里的 `reason` 读。
|
package/host.js
CHANGED
|
@@ -219,6 +219,7 @@ const MESSAGES = {
|
|
|
219
219
|
limitInvalid: "limit 必须是非负整数(省略则用默认值)",
|
|
220
220
|
limitOutOfRange: "limit 超出允许范围 {min}–{max}(省略则用默认值)",
|
|
221
221
|
mustBeStringArray: "{name} 必须是字符串数组",
|
|
222
|
+
mustBeStringOrArray: "必须是字符串或字符串数组",
|
|
222
223
|
tooManyItems: "{name} 最多 {maxItems} 项(实际 {actual})",
|
|
223
224
|
nonStringItem: "{name} 含非字符串项({received})",
|
|
224
225
|
commandTooLong: "zg 命令总长 {length} 字节,超过 {maxBytes} 字节上限,请缩小检索范围",
|
|
@@ -374,6 +375,7 @@ const MESSAGES = {
|
|
|
374
375
|
rootRequiredWithFallback: "root is required and must be an absolute workspace path (it may be omitted: defaults to the current session workspace)",
|
|
375
376
|
limitInvalid: "limit must be a non-negative integer (omit it to use the default)",
|
|
376
377
|
limitOutOfRange: "limit is out of the allowed range {min}–{max} (omit it to use the default)",
|
|
378
|
+
mustBeStringOrArray: "must be a string or an array of strings",
|
|
377
379
|
mustBeStringArray: "{name} must be an array of strings",
|
|
378
380
|
tooManyItems: "{name} allows at most {maxItems} items (actual {actual})",
|
|
379
381
|
nonStringItem: "{name} contains a non-string item ({received})",
|
|
@@ -483,6 +485,7 @@ function stringList(value, name, messages, maxItems = MAX_FILTER_ITEMS, maxChars
|
|
|
483
485
|
* 其余类型错误(非字符串、非数组的其它值)仍然照旧报错,不做任何静默降级。
|
|
484
486
|
*/
|
|
485
487
|
function singleOrList(value, name, messages, maxItems = MAX_FILTER_ITEMS, maxChars = MAX_FILTER_CHARS) {
|
|
488
|
+
if (value !== void 0 && value !== null && typeof value !== "string" && !Array.isArray(value)) throw new TypeError(fill(messages.mustBeStringOrArray, { name }));
|
|
486
489
|
return stringList(typeof value === "string" ? [value] : value, name, messages, maxItems, maxChars);
|
|
487
490
|
}
|
|
488
491
|
/**
|
|
@@ -1060,6 +1063,26 @@ const PROBE_FLAGS = /* @__PURE__ */ new Set([
|
|
|
1060
1063
|
* 包装/前缀命令:其首个实参本身就是「被执行的命令」,同样算命令位
|
|
1061
1064
|
* (`git grep`、`… | xargs grep TODO`、`env rg foo` 都是真检索)。
|
|
1062
1065
|
*/
|
|
1066
|
+
/**
|
|
1067
|
+
* 壳层包装命令:它们 `-c` 后面那一枚参数本身就是「要被执行的命令」,
|
|
1068
|
+
* 不看进去就等于 `bash -c 'grep -r secret /'` 凭一层引号绕过门禁。
|
|
1069
|
+
*
|
|
1070
|
+
* 与 SEARCH_PREFIX_WORDS 分开列:那里的包装是「首个实参是被执行的命令」,
|
|
1071
|
+
* 这里要多走一步——先认 `-c` 这类旗标,再把它后面那枚参数当脚本递归判一次。
|
|
1072
|
+
*/
|
|
1073
|
+
const SHELL_WRAPPER_NAMES = /* @__PURE__ */ new Set([
|
|
1074
|
+
"sh",
|
|
1075
|
+
"bash",
|
|
1076
|
+
"zsh",
|
|
1077
|
+
"dash",
|
|
1078
|
+
"ksh",
|
|
1079
|
+
"csh",
|
|
1080
|
+
"fish"
|
|
1081
|
+
]);
|
|
1082
|
+
/** 壳层旗标里「其后一枚参数是脚本」的那些:`-c`、`-lc`、`-xc`(只认以 c 收尾的短旗标)。 */
|
|
1083
|
+
const SHELL_SCRIPT_FLAG = /^-[^c]*c$/u;
|
|
1084
|
+
/** 递归深度上限:一层脚本里的再一层脚本够了;更深的不判(也不该有)。 */
|
|
1085
|
+
const MAX_SHELL_DEPTH = 2;
|
|
1063
1086
|
const SEARCH_PREFIX_WORDS = /* @__PURE__ */ new Set([
|
|
1064
1087
|
"git",
|
|
1065
1088
|
"xargs",
|
|
@@ -1300,6 +1323,16 @@ function consumeGroupChar(char, state) {
|
|
|
1300
1323
|
if (state.buffer.length > 0) state.buffer += char;
|
|
1301
1324
|
else if (char === "(" || char === "{") state.atCommand = true;
|
|
1302
1325
|
}
|
|
1326
|
+
/**
|
|
1327
|
+
* `$(` 是命令替换的开头:`$` 已经是 buffer 的全部(引号外)时,这一对字符不是词内展开。
|
|
1328
|
+
*
|
|
1329
|
+
* 不拆开的话 `$(grep x y)` 只能切出一枚 `$(grep` token——它对不上任何检索命令名,
|
|
1330
|
+
* 门禁就凭一层括号放行(与注释里那几条“实测过的绕过形态”同一类)。`${DIR}/src` 不受影响:
|
|
1331
|
+
* 那里跟在 `$` 后面的是 `{`,仍按词内展开并进当前 token。
|
|
1332
|
+
*/
|
|
1333
|
+
function isCommandSubstitutionOpen(char, state) {
|
|
1334
|
+
return char === "(" && state.quote === "" && state.buffer === "$";
|
|
1335
|
+
}
|
|
1303
1336
|
/** 引号外、词首的 `#` 起为注释(整段跳到行尾)。 */
|
|
1304
1337
|
function isCommentStart(char, state) {
|
|
1305
1338
|
return state.quote === "" && char === "#" && state.buffer.length === 0;
|
|
@@ -1425,6 +1458,10 @@ function tokenizeShell(command) {
|
|
|
1425
1458
|
else if (COMMAND_BREAK_CHARS.has(char)) {
|
|
1426
1459
|
flush();
|
|
1427
1460
|
markCommandBreak(command, index, char, state);
|
|
1461
|
+
} else if (isCommandSubstitutionOpen(char, state)) {
|
|
1462
|
+
state.buffer = "";
|
|
1463
|
+
flush();
|
|
1464
|
+
markCommandBreak(command, index, char, state);
|
|
1428
1465
|
} else if (GROUP_CHARS.has(char)) consumeGroupChar(char, state);
|
|
1429
1466
|
else if (REDIRECT_CHARS.has(char)) {
|
|
1430
1467
|
flush();
|
|
@@ -1459,6 +1496,16 @@ function commandPositionIndexes(tokens) {
|
|
|
1459
1496
|
}
|
|
1460
1497
|
return out;
|
|
1461
1498
|
}
|
|
1499
|
+
/** 取壳层包装那条 `-c` 脚本参数(`bash -c '…'` 里引号内那一整枚 token)。 */
|
|
1500
|
+
function shellScriptArguments(tokens) {
|
|
1501
|
+
const scripts = [];
|
|
1502
|
+
for (const [index, token] of tokens.entries()) {
|
|
1503
|
+
const flag = tokens[index + 1];
|
|
1504
|
+
const script = tokens[index + 2];
|
|
1505
|
+
if (token.atCommand && SHELL_WRAPPER_NAMES.has(baseName(token.text)) && flag !== void 0 && script !== void 0 && SHELL_SCRIPT_FLAG.test(flag.text) && !script.atCommand) scripts.push(script.text);
|
|
1506
|
+
}
|
|
1507
|
+
return scripts;
|
|
1508
|
+
}
|
|
1462
1509
|
/**
|
|
1463
1510
|
* 该命令位 token 之后的实参里是否出现路径形状的操作数(旗标不算)。
|
|
1464
1511
|
* `.` 与 `..` 都算:`grep foo .` 检索的就是当前工作区。
|
|
@@ -1491,15 +1538,19 @@ function hasPathOperand(tokens, from) {
|
|
|
1491
1538
|
* - shell 关键字(`for … ; do grep`、`if … ; then rg`)不是控制符,其后的
|
|
1492
1539
|
* grep 不在命令位。壳层赋值(`VAR=1 grep x`)**不**属此列:commandPositionIndexes
|
|
1493
1540
|
* 把 `VAR=1` 当「跳过但不断链」处理。
|
|
1541
|
+
* - 嵌套只认壳层包装名单里 `-c` 后面那一段,且最多看进去两层;名单外的前缀
|
|
1542
|
+
* (`watch -n 5 grep`)与 `awk 'BEGIN{system("grep x y")}'` 一类不递归。
|
|
1494
1543
|
*/
|
|
1495
|
-
function isGrepRgCommand(command) {
|
|
1544
|
+
function isGrepRgCommand(command, depth = 0) {
|
|
1496
1545
|
const tokens = tokenizeShell(command);
|
|
1497
1546
|
if (tokens.some((token) => PROBE_FLAGS.has(token.text))) return false;
|
|
1498
|
-
|
|
1547
|
+
if (commandPositionIndexes(tokens).some((index) => {
|
|
1499
1548
|
const token = tokens[index];
|
|
1500
1549
|
if (token === void 0 || !GREP_COMMAND_NAMES.has(baseName(token.text))) return false;
|
|
1501
1550
|
return !(token.piped && !hasPathOperand(tokens, index));
|
|
1502
|
-
});
|
|
1551
|
+
})) return true;
|
|
1552
|
+
if (depth >= MAX_SHELL_DEPTH) return false;
|
|
1553
|
+
return shellScriptArguments(tokens).some((script) => isGrepRgCommand(script, depth + 1));
|
|
1503
1554
|
}
|
|
1504
1555
|
/**
|
|
1505
1556
|
* 去掉尾部斜杠的 root 归一化('/' 自身保持 '/')。
|
|
@@ -1793,6 +1844,14 @@ function gateReasonAt(indexRoot, cwd, scope, deps, messages) {
|
|
|
1793
1844
|
}
|
|
1794
1845
|
return reason;
|
|
1795
1846
|
}
|
|
1847
|
+
/**
|
|
1848
|
+
* 索引根已定后的门禁裁决:无索引根 / 检索索引根之外 / 有可扣额度 → 放行
|
|
1849
|
+
* (undefined);否则返回拦截文案。放行会触发 consumeGrep 副作用。
|
|
1850
|
+
* 两个拦截面的「之内/之外」都以**索引根**为准(不是会话工作区):会话开在索引根的
|
|
1851
|
+
* 子目录时,`../sibling` 或 `/repo/other` 相对 cwd 出界、相对索引根却在界内——shell 面
|
|
1852
|
+
* 的 hasExternalTarget 本来就按索引根判,原生 grep 面若按 cwd 判,同样的目标会从
|
|
1853
|
+
* 工具面绕过门禁,两个面各说各话。
|
|
1854
|
+
*/
|
|
1796
1855
|
function buildSearchFirstReason(cwd, scope, deps, messages) {
|
|
1797
1856
|
const indexRoot = findIndexRoot(cwd, deps.indexProbe, deps.findIndexDepth);
|
|
1798
1857
|
return indexRoot === void 0 ? void 0 : gateReasonAt(indexRoot, cwd, scope, deps, messages);
|
|
@@ -2305,15 +2364,6 @@ function readClientMode(config, messages) {
|
|
|
2305
2364
|
// lib/rebuild-remote.ts
|
|
2306
2365
|
/** 本包作业的 kind(宿主据此发出的 id 形如 `zvec-grep-rebuild-<hex>`)。 */
|
|
2307
2366
|
const REBUILD_JOB_KIND = "zvec-grep-rebuild";
|
|
2308
|
-
/**
|
|
2309
|
-
* 本 kind 在注册表里的**已落定**记录上限:每次 start 前先剪到 `MAX-1` 条,新那条落定后
|
|
2310
|
-
* 正好 `MAX` 条在册(文案与卡片拒绝提示都按这个数说)。同时能跑几个不在这里——那是
|
|
2311
|
-
* 注册表的容量闸(实测未拥有桶 10,满员是**拒绝**新 start,不是淘汰旧的)。官方件**不会**
|
|
2312
|
-
* 自行回收落定记录("A settled record stays listed until its owner's disposal, service
|
|
2313
|
-
* disposal, or an explicit remove"),而注册表又随宿主活着、不随本插件卸载而死 ⇒ 这条
|
|
2314
|
-
* 裁剪是本包的责任。
|
|
2315
|
-
*/
|
|
2316
|
-
const REBUILD_HISTORY_MAX = 10;
|
|
2317
2367
|
/** 卡片视图的尾部长度(打标文案在 lib/messages.ts,随语言走)。 */
|
|
2318
2368
|
const JOB_OUT_VIEW_CHARS = 4e3;
|
|
2319
2369
|
/** 从名册投影推导身份证(官方 `JobView` 的三段稳定事实)。 */
|
|
@@ -2637,8 +2687,11 @@ async function spawnIndexWrite(routes, started, indexArgs, embedding) {
|
|
|
2637
2687
|
/**
|
|
2638
2688
|
* 把起来的那条进程登记进官方注册表与本包侧表,交回宿主签发的 id。
|
|
2639
2689
|
*
|
|
2640
|
-
*
|
|
2690
|
+
* 两类失败(注册表缺席 / start 或登记抛错)都**先把那条进程杀掉**再交回错误:
|
|
2641
2691
|
* 此刻作业没进名册,没人能通过 job 工具收它,不杀就是一条孤儿 zg 占着这棵树的写锁。
|
|
2692
|
+
* (没有「同 id 撞车」那一臂:jobId 由宿主签发,见 records.set 前的注释。)
|
|
2693
|
+
* start 之后 get 抛错时同样先杀——但那条作业可能已登记进官方注册表,本包侧表
|
|
2694
|
+
* 看不见它,要等注册表自身的 prune 兜底。
|
|
2642
2695
|
* 同样地,本函数不释放占位——那件事由调用方做。
|
|
2643
2696
|
* @param routes 本次注册的共享依赖(jobsOf 现读、侧表引用)
|
|
2644
2697
|
* @param root 已过前置校验的工作区(写进侧表供卡片回显)
|
|
@@ -2830,7 +2883,7 @@ var ZvecRebuildService = class extends TypertRemoteService {
|
|
|
2830
2883
|
const record = typeof raw === "string" && raw.length > 0 ? this.deps.records.get(raw) : void 0;
|
|
2831
2884
|
if (record === void 0) return {
|
|
2832
2885
|
ok: false,
|
|
2833
|
-
error: fill(marks.unknownJobId, { maxJobs:
|
|
2886
|
+
error: fill(marks.unknownJobId, { maxJobs: 10 }),
|
|
2834
2887
|
status: 404
|
|
2835
2888
|
};
|
|
2836
2889
|
const jobs = this.deps.jobsOf();
|
|
@@ -2842,12 +2895,12 @@ var ZvecRebuildService = class extends TypertRemoteService {
|
|
|
2842
2895
|
const output = readRebuildOutput(jobs, record.id);
|
|
2843
2896
|
if (output === null) return {
|
|
2844
2897
|
ok: false,
|
|
2845
|
-
error: fill(marks.unknownJobId, { maxJobs:
|
|
2898
|
+
error: fill(marks.unknownJobId, { maxJobs: 10 }),
|
|
2846
2899
|
status: 404
|
|
2847
2900
|
};
|
|
2848
2901
|
if (!sameJob(record.state, output.view)) return {
|
|
2849
2902
|
ok: false,
|
|
2850
|
-
error: fill(marks.unknownJobId, { maxJobs:
|
|
2903
|
+
error: fill(marks.unknownJobId, { maxJobs: 10 }),
|
|
2851
2904
|
status: 404
|
|
2852
2905
|
};
|
|
2853
2906
|
const { view, retained } = output;
|
|
@@ -3592,7 +3645,14 @@ const INDEX_PROBE_CACHE_MAX = 32;
|
|
|
3592
3645
|
*/
|
|
3593
3646
|
function createIndexProbeCache(probe, now = Date.now, ttlMs = INDEX_PROBE_TTL_MS, max = 32) {
|
|
3594
3647
|
const cache = /* @__PURE__ */ new Map();
|
|
3595
|
-
|
|
3648
|
+
/** 显式失效通道:zg_index 的 drop / 重建成功会真删真建 `.zvec-grep/`,缓存的
|
|
3649
|
+
* `result: true` 若只等 TTL 过期,60 秒内门禁仍按「已建索引」拦 grep/rg,
|
|
3650
|
+
* findIndexRoot 也仍走索引通道(实际会以 WORKSPACE_INDEX_NOT_FOUND 失败)——
|
|
3651
|
+
* 模型被卡在既搜不到也 grep 不了的窗口里。 */
|
|
3652
|
+
const invalidate = (dir) => {
|
|
3653
|
+
cache.delete(dir);
|
|
3654
|
+
};
|
|
3655
|
+
const cached = (dir) => {
|
|
3596
3656
|
const at = now();
|
|
3597
3657
|
const hit = cache.get(dir);
|
|
3598
3658
|
if (hit !== void 0 && at - hit.probedAt < ttlMs) {
|
|
@@ -3608,6 +3668,8 @@ function createIndexProbeCache(probe, now = Date.now, ttlMs = INDEX_PROBE_TTL_MS
|
|
|
3608
3668
|
evictAged(cache, max, (entry) => entry.probedAt + ttlMs, at);
|
|
3609
3669
|
return result;
|
|
3610
3670
|
};
|
|
3671
|
+
cached.invalidate = invalidate;
|
|
3672
|
+
return cached;
|
|
3611
3673
|
}
|
|
3612
3674
|
/**
|
|
3613
3675
|
* 工作区白名单:只认本 daemon 真实观测过的会话工作区(重建与 root 授权共用)。
|
|
@@ -4063,12 +4125,14 @@ async function runIndexTool(runtime, args, exec, messages) {
|
|
|
4063
4125
|
try {
|
|
4064
4126
|
assertIgnoreFilesExist(indexArgs, root, messages);
|
|
4065
4127
|
const { command, workdir } = buildIndexCommand(indexArgs, readDefaultEmbedding(config), messages, readClientMode(config, messages), allowRemoteEmbedding(config));
|
|
4066
|
-
|
|
4128
|
+
const text = await runForeground(host, command, workdir, config.indexTimeoutMs, {
|
|
4067
4129
|
signal: exec.signal,
|
|
4068
4130
|
env: zgEnv(config),
|
|
4069
4131
|
stdoutMaxBytes: config.stdoutMaxBytes,
|
|
4070
4132
|
messages
|
|
4071
|
-
})
|
|
4133
|
+
});
|
|
4134
|
+
runtime.indexProbe.invalidate(root);
|
|
4135
|
+
return { text };
|
|
4072
4136
|
} finally {
|
|
4073
4137
|
if (foregroundClaim !== void 0) rebuilds.release(root, foregroundClaim);
|
|
4074
4138
|
}
|
|
@@ -4106,7 +4170,7 @@ async function runStatusTool(runtime, args, exec, messages) {
|
|
|
4106
4170
|
root,
|
|
4107
4171
|
checkReady
|
|
4108
4172
|
}, messages, readClientMode(config, messages));
|
|
4109
|
-
|
|
4173
|
+
const text = await runForeground(host, command, workdir, config.statusTimeoutMs, {
|
|
4110
4174
|
signal: exec.signal,
|
|
4111
4175
|
env: zgEnv(config),
|
|
4112
4176
|
stdoutMaxBytes: config.stdoutMaxBytes,
|
|
@@ -4125,7 +4189,12 @@ async function runStatusTool(runtime, args, exec, messages) {
|
|
|
4125
4189
|
detail: failure
|
|
4126
4190
|
})}` : null;
|
|
4127
4191
|
} } : {}
|
|
4128
|
-
})
|
|
4192
|
+
});
|
|
4193
|
+
const mode = readClientMode(config, messages);
|
|
4194
|
+
const ready = await runtime.serverGate.ready();
|
|
4195
|
+
let daemonNote = null;
|
|
4196
|
+
if (mode !== "direct") daemonNote = ready ? messages.serverReadyNote : messages.serverUnavailableNote;
|
|
4197
|
+
return daemonNote === null ? { text } : { text: `${text}\n${daemonNote}` };
|
|
4129
4198
|
}
|
|
4130
4199
|
function registerStatusTool(runtime, registered) {
|
|
4131
4200
|
define(runtime.host, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jayyuen66/dsh-zvec-grep",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "dsh 工作区语义检索插件(zg):zg_search / zg_index / zg_status + 本地 embedding 设置卡片 + systemPrompt 路由规则 + guard 安全兜底。",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cordis",
|
|
@@ -51,46 +51,46 @@
|
|
|
51
51
|
"registry": "https://registry.npmjs.org"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@jayyuen66/dsh-plugin-shared": "0.2.
|
|
54
|
+
"@jayyuen66/dsh-plugin-shared": "0.2.3",
|
|
55
55
|
"zod": "4.6.7"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@deepseek-ai/cordis": "4.0.6-alpha.
|
|
59
|
-
"@deepseek-ai/cordis-plugin-group": "1.0.6-alpha.
|
|
60
|
-
"@deepseek-ai/cordis-plugin-timer": "1.1.8-alpha.
|
|
61
|
-
"@deepseek-ai/dsh-agent": "0.2.2-alpha.
|
|
62
|
-
"@deepseek-ai/dsh-api-remotes": "0.2.2-alpha.
|
|
63
|
-
"@deepseek-ai/dsh-bash-local": "0.2.2-alpha.
|
|
64
|
-
"@deepseek-ai/dsh-client-locale": "0.2.2-alpha.
|
|
65
|
-
"@deepseek-ai/dsh-client-store": "0.2.2-alpha.
|
|
66
|
-
"@deepseek-ai/dsh-client-ui-layout": "0.2.2-alpha.
|
|
67
|
-
"@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.2-alpha.
|
|
68
|
-
"@deepseek-ai/dsh-client-ui-renderer": "0.2.2-alpha.
|
|
69
|
-
"@deepseek-ai/dsh-client-ui-settings": "0.2.2-alpha.
|
|
70
|
-
"@deepseek-ai/dsh-client-ui-slots": "0.2.2-alpha.
|
|
71
|
-
"@deepseek-ai/dsh-host-webserver": "0.2.2-alpha.
|
|
72
|
-
"@deepseek-ai/dsh-http-proxy": "0.2.2-alpha.
|
|
73
|
-
"@deepseek-ai/dsh-jobs": "0.2.2-alpha.
|
|
74
|
-
"@deepseek-ai/dsh-jobs-local": "0.2.2-alpha.
|
|
75
|
-
"@deepseek-ai/dsh-llm": "0.2.2-alpha.
|
|
76
|
-
"@deepseek-ai/dsh-output-retention": "0.2.2-alpha.
|
|
77
|
-
"@deepseek-ai/dsh-package-manifest": "0.2.2-alpha.
|
|
78
|
-
"@deepseek-ai/dsh-ptc-runtime": "0.2.2-alpha.
|
|
79
|
-
"@deepseek-ai/dsh-sandbox": "0.2.2-alpha.
|
|
80
|
-
"@deepseek-ai/dsh-scope": "0.2.2-alpha.
|
|
81
|
-
"@deepseek-ai/dsh-session": "0.2.2-alpha.
|
|
82
|
-
"@deepseek-ai/dsh-session-projection": "0.2.2-alpha.
|
|
83
|
-
"@deepseek-ai/dsh-settings": "0.2.2-alpha.
|
|
84
|
-
"@deepseek-ai/dsh-shell": "0.2.2-alpha.
|
|
85
|
-
"@deepseek-ai/dsh-subprocess": "0.2.2-alpha.
|
|
86
|
-
"@deepseek-ai/dsh-subprocess-local": "0.2.2-alpha.
|
|
87
|
-
"@deepseek-ai/dsh-system-prompt": "0.2.2-alpha.
|
|
88
|
-
"@deepseek-ai/dsh-timeout": "0.2.2-alpha.
|
|
89
|
-
"@deepseek-ai/dsh-tool-executor-native": "0.2.2-alpha.
|
|
90
|
-
"@deepseek-ai/dsh-tools": "0.2.2-alpha.
|
|
91
|
-
"@deepseek-ai/dsh-typert-protocol": "0.2.2-alpha.
|
|
92
|
-
"@deepseek-ai/dsh-user-approval": "0.2.2-alpha.
|
|
93
|
-
"@deepseek-ai/schemastery": "3.18.6-alpha.
|
|
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",
|
|
94
94
|
"@e18e/eslint-plugin": "0.8.1",
|
|
95
95
|
"@types/node": "26.6.6",
|
|
96
96
|
"@types/react": "19.3.0",
|
|
@@ -109,10 +109,10 @@
|
|
|
109
109
|
"vitest": "5.0.5"
|
|
110
110
|
},
|
|
111
111
|
"peerDependencies": {
|
|
112
|
-
"@deepseek-ai/dsh": "^0.2.1-rc.3",
|
|
113
|
-
"@deepseek-ai/dsh-output-retention": "^0.2.1-rc.3",
|
|
114
|
-
"@deepseek-ai/dsh-scope": "^0.2.1-rc.3",
|
|
115
|
-
"@deepseek-ai/dsh-typert-protocol": "^0.2.1-rc.3",
|
|
112
|
+
"@deepseek-ai/dsh": "^0.2.1-rc.5 || ^0.2.2-alpha.3",
|
|
113
|
+
"@deepseek-ai/dsh-output-retention": "^0.2.1-rc.5 || ^0.2.2-alpha.3",
|
|
114
|
+
"@deepseek-ai/dsh-scope": "^0.2.1-rc.5 || ^0.2.2-alpha.3",
|
|
115
|
+
"@deepseek-ai/dsh-typert-protocol": "^0.2.1-rc.5 || ^0.2.2-alpha.3",
|
|
116
116
|
"@deepseek-ai/schemastery": "^3.18.6-alpha.1"
|
|
117
117
|
},
|
|
118
118
|
"peerDependenciesMeta": {
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
},
|
|
123
123
|
"icon": "icon.svg",
|
|
124
124
|
"engines": {
|
|
125
|
-
"dsh": "^0.2.1-rc.3",
|
|
125
|
+
"dsh": "^0.2.1-rc.5 || ^0.2.2-alpha.3",
|
|
126
126
|
"node": ">=22.12.0"
|
|
127
127
|
},
|
|
128
128
|
"dsh": {
|