dsh-code-index 0.10.1 → 0.10.2
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 +8 -2
- package/README.md +12 -10
- package/README.zh.md +12 -10
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/scripts/release-smoke.mjs +41 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,10 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to dsh-code-index are documented here.
|
|
4
4
|
|
|
5
|
-
## 0.10.
|
|
5
|
+
## 0.10.2 — Rust declaration signatures (candidate, unpublished)
|
|
6
|
+
|
|
7
|
+
- **fix(rust):** render struct/enum/trait signatures from their declared `name` field, rather than a leading visibility node. Correct `pub`, restricted visibility and ordinary declarations across symbol search, repo maps, context and reference definition labels. Names and stable IDs were already correct; no new reference edges are inferred.
|
|
8
|
+
- **fix(cache):** advance cache generation to 4 and reject old extraction on both disk and direct incremental-build paths, rebuilding unchanged source once.
|
|
9
|
+
- Preserve normalized `exported` semantics, tool contracts, the two exact supported DSH host groups, all nine languages and ArkTS resources. Add Rust regression and installed-runtime smoke coverage. See `RELEASE_EVIDENCE_v0.10.2.md` and bilingual `RELEASE_NOTES_v0.10.2.md`.
|
|
10
|
+
|
|
11
|
+
## 0.10.1 — DSH Desktop compatibility fix (2026-10-18)
|
|
6
12
|
|
|
7
13
|
- **fix(compat):** enumerate DSH/dsh-tools `0.2.0-rc.2 || 0.2.1-rc.2` so Desktop `0.2.1-rc.2` can activate the plugin without a version exemption. Keep the old development API baseline; no new feature or parser/resource change.
|
|
8
|
-
- **chore(release):** allow installation smoke to select either supported RC group against one
|
|
14
|
+
- **chore(release):** allow installation smoke to select either supported RC group against one archive; document installation and bilingual compatibility evidence. Published as npm `latest` with tag `v0.10.1`; post-merge main Node 22/24 CI and exact registry-archive verification passed. See `RELEASE_EVIDENCE_v0.10.1.md`.
|
|
9
15
|
|
|
10
16
|
## 0.10.0 — ArkTS & Reliable Code Context (2026-10-13)
|
|
11
17
|
|
package/README.md
CHANGED
|
@@ -5,9 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
English | [中文](README.zh.md)
|
|
7
7
|
|
|
8
|
-
**v0.10.
|
|
8
|
+
**v0.10.2 candidate — Rust declaration display fix (not published).** Fixes public struct/enum/trait signatures reported as `pub` in [Issue #5](https://github.com/lemonxiny55/dsh-code-index/issues/5). Existing caches rebuild once. `exported` / the generic `export` display marker still mean language-specific public visibility: Rust unrestricted `pub` is true; `pub(crate)` and `pub(in path)` are false. This does not add type-use reference edges. See [fix notes](RELEASE_NOTES_v0.10.2.md) and [candidate evidence](RELEASE_EVIDENCE_v0.10.2.md).
|
|
9
9
|
|
|
10
|
-
**v0.10.1
|
|
10
|
+
**v0.10.1 released — DSH Desktop compatibility fix**
|
|
11
|
+
|
|
12
|
+
**[v0.10.1 is released](https://github.com/lemonxiny55/dsh-code-index/releases/tag/v0.10.1); npm `latest` is `0.10.1`.** Adds DSH Desktop `0.2.1-rc.2` support while retaining `0.2.0-rc.2`. Only these two exact DSH/dsh-tools host groups are supported; keep each host's first-party packages on the same version. See [release evidence](RELEASE_EVIDENCE_v0.10.1.md) and [bilingual fix notes](RELEASE_NOTES_v0.10.1.md).
|
|
11
13
|
|
|
12
14
|
Give your [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) agent the bounded source context it needs to start a code task. One `code_context` call selects primary declarations, strong callers/callees, imports, current changes, and likely tests, with exact source ranges and reasons for inclusion. When evidence is missing, the pack says so.
|
|
13
15
|
|
|
@@ -16,7 +18,7 @@ Give your [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) ag
|
|
|
16
18
|
- **Evidence you can inspect:** inclusion reasons are separate from `exact` / `import-scoped` / `name-only` relationship provenance. No probability or confidence estimate is invented.
|
|
17
19
|
- **Local and current:** isolated repo/worktree indexes, external add/change/delete freshness, no external indexing API key. Existing full/compact surfaces and v0.8 configuration remain supported.
|
|
18
20
|
|
|
19
|
-
[v0.10.0
|
|
21
|
+
Introduced in [v0.10.0](https://github.com/lemonxiny55/dsh-code-index/releases/tag/v0.10.0) and retained unchanged in v0.10.1: ArkTS `.ets` files use a dedicated, pinned parser to find component structs, methods, fields and decorators, navigate statically identifiable ETS/TS references, and retrieve actual source in bounded Context Packs. The installed package passed real DSH Desktop Agent verification and Node 22/24 release checks. Partial or failed parses report bounded diagnostics.
|
|
20
22
|
|
|
21
23
|
This supports syntax and static code context, without full HarmonyOS SDK semantics, HAR/module-alias resolution or state-update/UI rerender graphs. See [release evidence](RELEASE_EVIDENCE_v0.10.0.md), [ArkTS PoC](ARKTS_POC_v0.10.0.md) and [the bilingual announcement](assets/v0.10.0-announcement.md). The v0.9.1 Gitignore directory whitelist fix remains included.
|
|
22
24
|
|
|
@@ -34,17 +36,17 @@ This supports syntax and static code context, without full HarmonyOS SDK semanti
|
|
|
34
36
|
|
|
35
37
|
## Quick start
|
|
36
38
|
|
|
37
|
-
Requires Node 22/24
|
|
39
|
+
Requires Node 22/24 and a matching DSH `0.2.0-rc.2` or `0.2.1-rc.2` host group. Install into an existing Desktop profile using its bundled `dsh` CLI:
|
|
38
40
|
|
|
39
41
|
```sh
|
|
40
|
-
dsh plugin --profile desktop add
|
|
42
|
+
dsh plugin --profile desktop add dsh-code-index@0.10.1
|
|
41
43
|
```
|
|
42
44
|
|
|
43
|
-
Restart Desktop after installation.
|
|
45
|
+
Restart Desktop after installation. For a matching Web profile:
|
|
44
46
|
|
|
45
47
|
```sh
|
|
46
|
-
npx @deepseek-ai/dsh@0.2.
|
|
47
|
-
npx @deepseek-ai/dsh@0.2.
|
|
48
|
+
npx @deepseek-ai/dsh@0.2.1-rc.2 plugin --profile web add dsh-code-index@0.10.1
|
|
49
|
+
npx @deepseek-ai/dsh@0.2.1-rc.2 web
|
|
48
50
|
```
|
|
49
51
|
|
|
50
52
|
For local development, run `pnpm install` and `pnpm build` at the repository root, then use `plugin --profile web add .`. See [Install](#install) for profile options.
|
|
@@ -95,13 +97,13 @@ Plus an optional **auto-injected system prompt section** (`code-index:repo-map`,
|
|
|
95
97
|
|
|
96
98
|
Requires `dsh` (any install path — npx, npm, or source) and Node ≥ 22.
|
|
97
99
|
|
|
98
|
-
|
|
100
|
+
v0.10.1 declares `@deepseek-ai/dsh-tools: 0.2.0-rc.2 || 0.2.1-rc.2`. Use matching DSH/dsh-tools groups, rather than mixing first-party RC packages. The DSH plugin surface remains a preview API; other RCs and future releases are outside this compatibility declaration.
|
|
99
101
|
|
|
100
102
|
Desktop checks DSH peer requirements before activation. v0.10.0's exact `0.2.0-rc.2` pin is rejected by DSH `0.2.1-rc.2`; v0.10.1 enumerates the supported groups instead of requiring a version exemption or an unbounded range. Its development dependency stays on `0.2.0-rc.2` for backward API checks.
|
|
101
103
|
|
|
102
104
|
```sh
|
|
103
105
|
# from npm (prebuilt)
|
|
104
|
-
npx @deepseek-ai/dsh@0.2.0-rc.2 plugin --profile web add dsh-code-index@0.10.
|
|
106
|
+
npx @deepseek-ai/dsh@0.2.0-rc.2 plugin --profile web add dsh-code-index@0.10.1
|
|
105
107
|
|
|
106
108
|
# or from a directory containing this checkout
|
|
107
109
|
npx @deepseek-ai/dsh@0.2.0-rc.2 plugin --profile web add ./dsh-code-index
|
package/README.zh.md
CHANGED
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) | 中文
|
|
4
4
|
|
|
5
|
-
**v0.10.
|
|
5
|
+
**v0.10.2 候选 — Rust 声明展示修复(未发布)。**修复 [Issue #5](https://github.com/lemonxiny55/dsh-code-index/issues/5) 中公共 struct/enum/trait 的签名显示为 `pub` 的问题。既有缓存会重建一次。`exported` / 通用 `export` 展示标记仍表示各语言的公开状态:Rust 不带限制的 `pub` 为 true,`pub(crate)` 和 `pub(in path)` 为 false。本次不增加类型使用引用边。见[修复说明](RELEASE_NOTES_v0.10.2.md)及[候选验证证据](RELEASE_EVIDENCE_v0.10.2.md)。
|
|
6
6
|
|
|
7
|
-
**v0.10.1
|
|
7
|
+
**v0.10.1 已发布 — DSH Desktop 兼容修复**
|
|
8
|
+
|
|
9
|
+
**[v0.10.1 已正式发布](https://github.com/lemonxiny55/dsh-code-index/releases/tag/v0.10.1),npm `latest` 为 `0.10.1`。**增加 DSH Desktop `0.2.1-rc.2` 支持,保留 `0.2.0-rc.2`。仅支持这两个精确的 DSH/dsh-tools 宿主版本组;每组第一方包必须保持同版。验证方法见[发布证据](RELEASE_EVIDENCE_v0.10.1.md)及[中英文修复说明](RELEASE_NOTES_v0.10.1.md)。
|
|
8
10
|
|
|
9
11
|
让 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Agent 用一次 `code_context` 调用拿到开始处理任务所需的有界源码上下文:主要声明、强相关 caller/callee、imports、当前变化和相关测试。每个关键 item 都有入选理由,源码有准确行号;证据不足时明确说明缺口。
|
|
10
12
|
|
|
@@ -13,7 +15,7 @@
|
|
|
13
15
|
- **可检查的证据:**入选 reason 与关系的 `exact` / `import-scoped` / `name-only` provenance 分开,不编造概率或 confidence。
|
|
14
16
|
- **本地、隔离、实时:**repo/worktree 独立,外部增改删自动刷新,不需要外部索引 API key;保留 full/compact surface 和 v0.8 配置。
|
|
15
17
|
|
|
16
|
-
[v0.10.0
|
|
18
|
+
[v0.10.0](https://github.com/lemonxiny55/dsh-code-index/releases/tag/v0.10.0) 引入的 ArkTS 功能在 v0.10.1 中保持不变:`.ets` 使用独立、版本锁定的 parser,定位组件 struct、方法、字段和装饰器,查看静态可确定的 ETS/TS 引用,并通过有界 Context Pack 获取真实源码。安装包已通过 DSH Desktop 真实 Agent 验证及 Node 22/24 发布检查;部分解析或解析失败会提供有限诊断。
|
|
17
19
|
|
|
18
20
|
支持范围是语法和静态代码上下文,不包含完整 HarmonyOS SDK 语义、HAR/模块别名解析、状态更新或 UI 重渲染调用图。见[发布证据](RELEASE_EVIDENCE_v0.10.0.md)、[ArkTS PoC](ARKTS_POC_v0.10.0.md) 和[双语公告](assets/v0.10.0-announcement.md)。v0.9.1 的 Gitignore 目录白名单修复继续保留。
|
|
19
21
|
|
|
@@ -31,17 +33,17 @@
|
|
|
31
33
|
|
|
32
34
|
## 快速开始
|
|
33
35
|
|
|
34
|
-
需要 Node 22/24
|
|
36
|
+
需要 Node 22/24 与匹配的 DSH `0.2.0-rc.2` 或 `0.2.1-rc.2` 宿主版本组。用 Desktop 自带的 `dsh` CLI 安装到现有 profile:
|
|
35
37
|
|
|
36
38
|
```sh
|
|
37
|
-
dsh plugin --profile desktop add
|
|
39
|
+
dsh plugin --profile desktop add dsh-code-index@0.10.1
|
|
38
40
|
```
|
|
39
41
|
|
|
40
|
-
安装后重启 Desktop
|
|
42
|
+
安装后重启 Desktop。匹配的 Web profile 可使用:
|
|
41
43
|
|
|
42
44
|
```sh
|
|
43
|
-
npx @deepseek-ai/dsh@0.2.
|
|
44
|
-
npx @deepseek-ai/dsh@0.2.
|
|
45
|
+
npx @deepseek-ai/dsh@0.2.1-rc.2 plugin --profile web add dsh-code-index@0.10.1
|
|
46
|
+
npx @deepseek-ai/dsh@0.2.1-rc.2 web
|
|
45
47
|
```
|
|
46
48
|
|
|
47
49
|
本地开发时,在仓库根目录运行 `pnpm install`、`pnpm build`,然后使用 `plugin --profile web add .`。其他 profile 选项见[安装说明](#安装)。
|
|
@@ -92,13 +94,13 @@ npx @deepseek-ai/dsh@0.2.0-rc.2 web
|
|
|
92
94
|
|
|
93
95
|
需要 `dsh`(任意安装方式——npx、npm 或源码)与 Node ≥ 22。
|
|
94
96
|
|
|
95
|
-
v0.10.1
|
|
97
|
+
v0.10.1 声明 `@deepseek-ai/dsh-tools: 0.2.0-rc.2 || 0.2.1-rc.2`。使用配套的 DSH/dsh-tools 版本组,不混装第一方 RC 包。DSH 插件接口仍属于预览 API;其他 RC 和未来版本不在此兼容声明范围内。
|
|
96
98
|
|
|
97
99
|
Desktop 在激活前检查 DSH peer 约束。v0.10.0 的精确 `0.2.0-rc.2` pin 会被 DSH `0.2.1-rc.2` 拒绝;v0.10.1 明确列举支持组,不依赖版本豁免或无上限范围。开发依赖保留 `0.2.0-rc.2`,继续检查旧版 API。
|
|
98
100
|
|
|
99
101
|
```sh
|
|
100
102
|
# 从 npm(预编译)
|
|
101
|
-
npx @deepseek-ai/dsh@0.2.0-rc.2 plugin --profile web add dsh-code-index@0.10.
|
|
103
|
+
npx @deepseek-ai/dsh@0.2.0-rc.2 plugin --profile web add dsh-code-index@0.10.1
|
|
102
104
|
|
|
103
105
|
# 或从包含本仓库检查副本的目录
|
|
104
106
|
npx @deepseek-ai/dsh@0.2.0-rc.2 plugin --profile web add ./dsh-code-index
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import Schema from '@deepseek-ai/schemastery';
|
|
|
3
3
|
|
|
4
4
|
/** Shared data model for dsh-code-index. */
|
|
5
5
|
/** On-disk cache layout version. Bump when persisted graph/symbol shapes change. */
|
|
6
|
-
declare const REPO_INDEX_SCHEMA_VERSION:
|
|
6
|
+
declare const REPO_INDEX_SCHEMA_VERSION: 4;
|
|
7
7
|
type SymbolKind = 'function' | 'method' | 'class' | 'interface' | 'type' | 'enum' | 'variable' | 'field' | 'import' | 'module';
|
|
8
8
|
/** Stable, file-qualified symbol identity: `sym:v1:<file>#<scope>/<segment>`. */
|
|
9
9
|
type SymbolId = string;
|
|
@@ -29,7 +29,7 @@ interface SymbolInfo {
|
|
|
29
29
|
line: number;
|
|
30
30
|
/** 1-based end line (inclusive). */
|
|
31
31
|
endLine: number;
|
|
32
|
-
/**
|
|
32
|
+
/** Normalized public/export status by language; Rust: unrestricted `pub` only. */
|
|
33
33
|
exported: boolean;
|
|
34
34
|
/** Short human-readable signature, e.g. `greet(name: string)` — empty when n/a. */
|
|
35
35
|
signature: string;
|
package/dist/index.js
CHANGED
|
@@ -992,6 +992,7 @@ function signatureFor(id, node) {
|
|
|
992
992
|
}
|
|
993
993
|
function rawSignature(id, node) {
|
|
994
994
|
const name2 = nameOf(id, node);
|
|
995
|
+
if (id === "rust" && ["struct_item", "enum_item", "trait_item"].includes(node.type)) return name2;
|
|
995
996
|
if (id === "arkts" && node.type === "struct_declaration") return `struct ${name2}`;
|
|
996
997
|
if (id === "arkts" && node.type === "public_field_definition") {
|
|
997
998
|
return `${name2}${collapseSpace(node.childForFieldName("type")?.text ?? "")}`;
|
|
@@ -1249,7 +1250,7 @@ import path3 from "path";
|
|
|
1249
1250
|
import { createHash, randomUUID } from "crypto";
|
|
1250
1251
|
|
|
1251
1252
|
// src/types.ts
|
|
1252
|
-
var REPO_INDEX_SCHEMA_VERSION =
|
|
1253
|
+
var REPO_INDEX_SCHEMA_VERSION = 4;
|
|
1253
1254
|
function symbolCount(index) {
|
|
1254
1255
|
return index.files.reduce((n, f) => n + f.symbols.length, 0);
|
|
1255
1256
|
}
|
|
@@ -1302,6 +1303,7 @@ async function saveIndex(cachePath, index) {
|
|
|
1302
1303
|
|
|
1303
1304
|
// src/buildIndex.ts
|
|
1304
1305
|
async function buildIndex(root, options = {}, previous = null, forcePaths = /* @__PURE__ */ new Set()) {
|
|
1306
|
+
if (previous?.schemaVersion !== REPO_INDEX_SCHEMA_VERSION) previous = null;
|
|
1305
1307
|
const scanned = await scanRepo(root, options);
|
|
1306
1308
|
const prevByPath = new Map((previous?.files ?? []).map((f) => [f.path, f]));
|
|
1307
1309
|
const prevMtime = new Map((previous?.files ?? []).map((f) => [f.path, f.mtimeMs]));
|