dsh-code-index 0.10.0 → 0.10.1
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 +10 -3
- package/README.md +16 -10
- package/README.zh.md +16 -10
- package/package.json +2 -2
- package/scripts/release-smoke.mjs +43 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to dsh-code-index are documented here.
|
|
4
4
|
|
|
5
|
-
## 0.10.
|
|
5
|
+
## 0.10.1 — unreleased
|
|
6
|
+
|
|
7
|
+
- **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 candidate archive; document local candidate installation and bilingual compatibility evidence.
|
|
9
|
+
|
|
10
|
+
## 0.10.0 — ArkTS & Reliable Code Context (2026-10-13)
|
|
6
11
|
|
|
7
12
|
- Add dedicated `.ets` parsing using pinned harmony-contrib/tree-sitter-arkts
|
|
8
13
|
0.3.0 / ABI-14 WASM bundled with MIT notices; no native grammar installation.
|
|
@@ -18,8 +23,10 @@ All notable changes to dsh-code-index are documented here.
|
|
|
18
23
|
all 15 `@Local` documentation snippets). Node 22.23.3 and 24.19.0 each pass
|
|
19
24
|
235 tests, typecheck, server/client builds and real package-consumer smoke.
|
|
20
25
|
See `RELEASE_EVIDENCE_v0.10.0.md` for actual methods and Desktop results.
|
|
21
|
-
-
|
|
22
|
-
GitHub Release
|
|
26
|
+
- Published as npm `latest` with tag `v0.10.0` and a bilingual
|
|
27
|
+
[GitHub Release](https://github.com/lemonxiny55/dsh-code-index/releases/tag/v0.10.0).
|
|
28
|
+
The registry archive matches the verified stable candidate byte-for-byte;
|
|
29
|
+
post-merge Node 22/24 CI passed. Publication details are in Release Evidence.
|
|
23
30
|
|
|
24
31
|
## 0.9.1 — Gitignore directory whitelist fix (2026-10-10)
|
|
25
32
|
|
package/README.md
CHANGED
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
English | [中文](README.zh.md)
|
|
7
7
|
|
|
8
|
-
**v0.10.0
|
|
8
|
+
**v0.10.0 released — ArkTS & Reliable Code Context**
|
|
9
|
+
|
|
10
|
+
**v0.10.1 compatibility candidate (unpublished):** 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 [candidate evidence](RELEASE_EVIDENCE_v0.10.1.md) and [bilingual fix notes](RELEASE_NOTES_v0.10.1.md) for verification and release status.
|
|
9
11
|
|
|
10
12
|
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.
|
|
11
13
|
|
|
@@ -14,11 +16,9 @@ Give your [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) ag
|
|
|
14
16
|
- **Evidence you can inspect:** inclusion reasons are separate from `exact` / `import-scoped` / `name-only` relationship provenance. No probability or confidence estimate is invented.
|
|
15
17
|
- **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.
|
|
16
18
|
|
|
17
|
-
v0.
|
|
19
|
+
[v0.10.0 is released](https://github.com/lemonxiny55/dsh-code-index/releases/tag/v0.10.0) and npm `latest` is `0.10.0`. ArkTS `.ets` files use a dedicated, pinned parser: find component structs, methods, fields and decorators, navigate statically identifiable ETS/TS references, and retrieve actual source in bounded Context Packs. The installed stable package passed real DSH Desktop Agent verification and Node 22/24 release checks. Partial or failed parses report bounded diagnostics.
|
|
18
20
|
|
|
19
|
-
This
|
|
20
|
-
ArkTS `.ets` files now use a pinned, bundled MIT grammar rather than the TS
|
|
21
|
-
parser. See [ArkTS PoC](ARKTS_POC_v0.10.0.md) and [v0.10 evidence](RELEASE_EVIDENCE_v0.10.0.md).
|
|
21
|
+
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
22
|
|
|
23
23
|
## On this page
|
|
24
24
|
|
|
@@ -34,10 +34,16 @@ parser. See [ArkTS PoC](ARKTS_POC_v0.10.0.md) and [v0.10 evidence](RELEASE_EVIDE
|
|
|
34
34
|
|
|
35
35
|
## Quick start
|
|
36
36
|
|
|
37
|
-
Requires Node 22/24
|
|
37
|
+
Requires Node 22/24. The published v0.10.0 requires DSH `0.2.0-rc.2`; the unpublished v0.10.1 candidate also supports `0.2.1-rc.2`. To install the candidate into an existing Desktop profile, using its bundled `dsh` CLI:
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
dsh plugin --profile desktop add /absolute/path/to/dsh-code-index-0.10.1.tgz
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Restart Desktop after installation. Until v0.10.1 is published, the following registry commands install v0.10.0 on its original host:
|
|
38
44
|
|
|
39
45
|
```sh
|
|
40
|
-
npx @deepseek-ai/dsh@0.2.0-rc.2 plugin --profile web add dsh-code-index@0.
|
|
46
|
+
npx @deepseek-ai/dsh@0.2.0-rc.2 plugin --profile web add dsh-code-index@0.10.0
|
|
41
47
|
npx @deepseek-ai/dsh@0.2.0-rc.2 web
|
|
42
48
|
```
|
|
43
49
|
|
|
@@ -89,13 +95,13 @@ Plus an optional **auto-injected system prompt section** (`code-index:repo-map`,
|
|
|
89
95
|
|
|
90
96
|
Requires `dsh` (any install path — npx, npm, or source) and Node ≥ 22.
|
|
91
97
|
|
|
92
|
-
The
|
|
98
|
+
The v0.10.1 candidate 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.
|
|
93
99
|
|
|
94
|
-
v0.
|
|
100
|
+
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.
|
|
95
101
|
|
|
96
102
|
```sh
|
|
97
103
|
# from npm (prebuilt)
|
|
98
|
-
npx @deepseek-ai/dsh@0.2.0-rc.2 plugin --profile web add dsh-code-index@0.
|
|
104
|
+
npx @deepseek-ai/dsh@0.2.0-rc.2 plugin --profile web add dsh-code-index@0.10.0
|
|
99
105
|
|
|
100
106
|
# or from a directory containing this checkout
|
|
101
107
|
npx @deepseek-ai/dsh@0.2.0-rc.2 plugin --profile web add ./dsh-code-index
|
package/README.zh.md
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) | 中文
|
|
4
4
|
|
|
5
|
-
**v0.10.0
|
|
5
|
+
**v0.10.0 已发布 — ArkTS & Reliable Code Context**
|
|
6
|
+
|
|
7
|
+
**v0.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)。
|
|
6
8
|
|
|
7
9
|
让 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Agent 用一次 `code_context` 调用拿到开始处理任务所需的有界源码上下文:主要声明、强相关 caller/callee、imports、当前变化和相关测试。每个关键 item 都有入选理由,源码有准确行号;证据不足时明确说明缺口。
|
|
8
10
|
|
|
@@ -11,11 +13,9 @@
|
|
|
11
13
|
- **可检查的证据:**入选 reason 与关系的 `exact` / `import-scoped` / `name-only` provenance 分开,不编造概率或 confidence。
|
|
12
14
|
- **本地、隔离、实时:**repo/worktree 独立,外部增改删自动刷新,不需要外部索引 API key;保留 full/compact surface 和 v0.8 配置。
|
|
13
15
|
|
|
14
|
-
v0.
|
|
16
|
+
[v0.10.0 已正式发布](https://github.com/lemonxiny55/dsh-code-index/releases/tag/v0.10.0),npm `latest` 为 `0.10.0`。ArkTS `.ets` 使用独立、版本锁定的 parser:定位组件 struct、方法、字段和装饰器,查看静态可确定的 ETS/TS 引用,并通过有界 Context Pack 获取真实源码。稳定安装包已通过 DSH Desktop 真实 Agent 验证及 Node 22/24 发布检查;部分解析或解析失败会提供有限诊断。
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
`.ets` 现在使用锁定版本、随包附带 MIT 许可证的 ArkTS grammar,独立于 TS parser。
|
|
18
|
-
见 [ArkTS PoC](ARKTS_POC_v0.10.0.md) 和 [v0.10 验证证据](RELEASE_EVIDENCE_v0.10.0.md)。
|
|
18
|
+
支持范围是语法和静态代码上下文,不包含完整 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
19
|
|
|
20
20
|
## 本页导航
|
|
21
21
|
|
|
@@ -31,10 +31,16 @@ v0.9.1 已发布到 npm,修复了 Gitignore 目录白名单规则静默遗漏
|
|
|
31
31
|
|
|
32
32
|
## 快速开始
|
|
33
33
|
|
|
34
|
-
需要 Node 22/24
|
|
34
|
+
需要 Node 22/24。已发布的 v0.10.0 要求 DSH `0.2.0-rc.2`;未发布的 v0.10.1 候选同时支持 `0.2.1-rc.2`。用 Desktop 自带的 `dsh` CLI 将候选包安装到现有 profile:
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
dsh plugin --profile desktop add /absolute/path/to/dsh-code-index-0.10.1.tgz
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
安装后重启 Desktop。v0.10.1 发布前,下面的 registry 命令仍安装原宿主对应的 v0.10.0:
|
|
35
41
|
|
|
36
42
|
```sh
|
|
37
|
-
npx @deepseek-ai/dsh@0.2.0-rc.2 plugin --profile web add dsh-code-index@0.
|
|
43
|
+
npx @deepseek-ai/dsh@0.2.0-rc.2 plugin --profile web add dsh-code-index@0.10.0
|
|
38
44
|
npx @deepseek-ai/dsh@0.2.0-rc.2 web
|
|
39
45
|
```
|
|
40
46
|
|
|
@@ -86,13 +92,13 @@ npx @deepseek-ai/dsh@0.2.0-rc.2 web
|
|
|
86
92
|
|
|
87
93
|
需要 `dsh`(任意安装方式——npx、npm 或源码)与 Node ≥ 22。
|
|
88
94
|
|
|
89
|
-
|
|
95
|
+
v0.10.1 候选声明 `@deepseek-ai/dsh-tools: 0.2.0-rc.2 || 0.2.1-rc.2`。使用配套的 DSH/dsh-tools 版本组,不混装第一方 RC 包。DSH 插件接口仍属于预览 API;其他 RC 和未来版本不在此兼容声明范围内。
|
|
90
96
|
|
|
91
|
-
v0.
|
|
97
|
+
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。
|
|
92
98
|
|
|
93
99
|
```sh
|
|
94
100
|
# 从 npm(预编译)
|
|
95
|
-
npx @deepseek-ai/dsh@0.2.0-rc.2 plugin --profile web add dsh-code-index@0.
|
|
101
|
+
npx @deepseek-ai/dsh@0.2.0-rc.2 plugin --profile web add dsh-code-index@0.10.0
|
|
96
102
|
|
|
97
103
|
# 或从包含本仓库检查副本的目录
|
|
98
104
|
npx @deepseek-ai/dsh@0.2.0-rc.2 plugin --profile web add ./dsh-code-index
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-code-index",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "Edit-ready Context Packs for DSH agents: bounded source excerpts, changes, related tests, and inclusion evidence — local-first.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
54
|
-
"@deepseek-ai/dsh-tools": "0.2.0-rc.2"
|
|
54
|
+
"@deepseek-ai/dsh-tools": "0.2.0-rc.2 || 0.2.1-rc.2"
|
|
55
55
|
},
|
|
56
56
|
"peerDependenciesMeta": {
|
|
57
57
|
"@deepseek-ai/cordis": {
|
|
@@ -2,6 +2,7 @@ import assert from 'node:assert/strict'
|
|
|
2
2
|
import { execFileSync } from 'node:child_process'
|
|
3
3
|
import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs'
|
|
4
4
|
import os from 'node:os'
|
|
5
|
+
import { createRequire } from 'node:module'
|
|
5
6
|
import path from 'node:path'
|
|
6
7
|
import { fileURLToPath, pathToFileURL } from 'node:url'
|
|
7
8
|
|
|
@@ -65,6 +66,10 @@ function parseJsonArrayOutput(output, command) {
|
|
|
65
66
|
|
|
66
67
|
// A release gate can reuse one immutable candidate across Node versions.
|
|
67
68
|
const suppliedTarball = process.argv[2] ? path.resolve(process.argv[2]) : null
|
|
69
|
+
// Exercise each supported host group against the same immutable candidate.
|
|
70
|
+
const toolsVersion = process.argv[3] ?? '0.2.1-rc.2'
|
|
71
|
+
const supportedToolsVersions = packageJson.peerDependencies['@deepseek-ai/dsh-tools'].split(' || ')
|
|
72
|
+
assert.ok(supportedToolsVersions.includes(toolsVersion), 'smoke requires an explicitly supported DSH tools version')
|
|
68
73
|
const packed = suppliedTarball ? null : parseJsonArrayOutput(run(npm, ['pack', '--ignore-scripts', '--json'], root), 'npm pack')
|
|
69
74
|
if (packed) assert.equal(packed.length, 1, 'npm pack must produce exactly one artifact')
|
|
70
75
|
const tarball = suppliedTarball ?? path.resolve(root, packed[0].filename)
|
|
@@ -92,7 +97,7 @@ for (const file of expectedFiles) assert.ok(listed.has(file), `tarball is missin
|
|
|
92
97
|
const smokeDir = mkdtempSync(path.join(os.tmpdir(), 'dsh-code-index-release-'))
|
|
93
98
|
try {
|
|
94
99
|
run(npm, ['init', '--yes'], smokeDir)
|
|
95
|
-
run(npm, ['install', '--ignore-scripts', '--no-save', tarball], smokeDir)
|
|
100
|
+
run(npm, ['install', '--ignore-scripts', '--no-save', tarball, `@deepseek-ai/dsh-tools@${toolsVersion}`], smokeDir)
|
|
96
101
|
|
|
97
102
|
const installedPackage = JSON.parse(
|
|
98
103
|
readFileSync(path.join(smokeDir, 'node_modules', packageJson.name, 'package.json'), 'utf8'),
|
|
@@ -103,7 +108,7 @@ try {
|
|
|
103
108
|
assert.match(installedPackage.engines.node, />=22/)
|
|
104
109
|
assert.equal(installedPackage.license, 'MIT')
|
|
105
110
|
const installedTools = JSON.parse(readFileSync(path.join(smokeDir, 'node_modules', '@deepseek-ai', 'dsh-tools', 'package.json'), 'utf8'))
|
|
106
|
-
assert.equal(installedTools.version,
|
|
111
|
+
assert.equal(installedTools.version, toolsVersion, 'consumer must use the selected matching RC group')
|
|
107
112
|
|
|
108
113
|
const plugin = await import(
|
|
109
114
|
pathToFileURL(path.join(smokeDir, 'node_modules', packageJson.name, 'dist', 'index.js')).href,
|
|
@@ -236,7 +241,42 @@ try {
|
|
|
236
241
|
)
|
|
237
242
|
assert.deepEqual(compactRegistered, ['code_index', 'code_context', 'code_health'])
|
|
238
243
|
for (const dispose of compactDisposers.reverse()) dispose()
|
|
239
|
-
|
|
244
|
+
|
|
245
|
+
// Direct handlers above verify package behavior; this separate check runs
|
|
246
|
+
// through the selected RC's real schema/dispatch/rendering pipeline.
|
|
247
|
+
const consumerRequire = createRequire(path.join(smokeDir, 'package.json'))
|
|
248
|
+
const { Context } = await import(pathToFileURL(consumerRequire.resolve('@deepseek-ai/cordis')).href)
|
|
249
|
+
const { default: ToolRuntime } = await import(pathToFileURL(consumerRequire.resolve('@deepseek-ai/dsh-tools')).href)
|
|
250
|
+
const nativeContext = new Context()
|
|
251
|
+
nativeContext.provide('systemPrompt', { tools: () => () => {}, section: () => () => {} })
|
|
252
|
+
const runtime = new ToolRuntime(nativeContext)
|
|
253
|
+
const nativeDisposers = plugin.tools.map(tool => runtime.register(tool))
|
|
254
|
+
try {
|
|
255
|
+
const nativeInvoke = async (name, args) => {
|
|
256
|
+
const result = await runtime.execute({
|
|
257
|
+
callId: `release:${name}`, name, arguments: args,
|
|
258
|
+
signal: new AbortController().signal,
|
|
259
|
+
})
|
|
260
|
+
assert.equal(result.isError, false, JSON.stringify(result.content))
|
|
261
|
+
return result
|
|
262
|
+
}
|
|
263
|
+
await nativeInvoke('code_index', { action: 'build', repoRoot: arkRoot })
|
|
264
|
+
const search = await nativeInvoke('code_search', { query: 'PackageCard', repoRoot: arkRoot })
|
|
265
|
+
assert.equal(search.value[0]?.file, 'Card.ets')
|
|
266
|
+
assert.ok(search.meta, 'search presentation metadata must survive runtime dispatch')
|
|
267
|
+
for (const outputFormat of ['text', 'pack']) {
|
|
268
|
+
const result = await nativeInvoke('code_context', {
|
|
269
|
+
task: 'Explain PackageCard in Card.ets', repoRoot: arkRoot, outputFormat, budgetChars: 5000,
|
|
270
|
+
})
|
|
271
|
+
assert.match(JSON.stringify(result.content), /@ComponentV2/)
|
|
272
|
+
assert.equal(typeof result.value, outputFormat === 'pack' ? 'object' : 'string')
|
|
273
|
+
if (outputFormat === 'pack') assert.ok(JSON.stringify(result.value).length <= 5000)
|
|
274
|
+
}
|
|
275
|
+
} finally {
|
|
276
|
+
for (const dispose of nativeDisposers.reverse()) dispose()
|
|
277
|
+
await nativeContext.fiber.dispose()
|
|
278
|
+
}
|
|
279
|
+
console.log(`release smoke passed for ${packageJson.name}@${packageJson.version} with dsh-tools@${toolsVersion}`)
|
|
240
280
|
} finally {
|
|
241
281
|
rmSync(smokeDir, { recursive: true, force: true })
|
|
242
282
|
if (!suppliedTarball) rmSync(tarball, { force: true })
|