dsh-code-index 0.9.1 → 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 CHANGED
@@ -2,6 +2,32 @@
2
2
 
3
3
  All notable changes to dsh-code-index are documented here.
4
4
 
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)
11
+
12
+ - Add dedicated `.ets` parsing using pinned harmony-contrib/tree-sitter-arkts
13
+ 0.3.0 / ABI-14 WASM bundled with MIT notices; no native grammar installation.
14
+ - Extract component structs, methods, fields, decorators and TS-style business
15
+ declarations with stable qualified IDs and decorator-inclusive source ranges.
16
+ Integrate mixed ETS/TS imports, tools, Git changes and Context Packs.
17
+ - Avoid UI built-in/attribute false relationships: UI calls need local or explicit
18
+ bindings; decorators/leading-dot modifiers are metadata. Keep default imports
19
+ import-scoped and ambiguous ETS/TS stems unresolved. No state/rerender graph.
20
+ - Record lightweight parsed/partial/failed diagnostics and bounded issue locations;
21
+ omit unreliable ArkTS declarations, report index gaps, and rebuild schema-2 caches.
22
+ - Add 15 ArkTS regression tests and pinned official sources (seven Browser files,
23
+ all 15 `@Local` documentation snippets). Node 22.23.3 and 24.19.0 each pass
24
+ 235 tests, typecheck, server/client builds and real package-consumer smoke.
25
+ See `RELEASE_EVIDENCE_v0.10.0.md` for actual methods and Desktop results.
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.
30
+
5
31
  ## 0.9.1 — Gitignore directory whitelist fix (2026-10-10)
6
32
 
7
33
  - Fix Gitignore directory whitelist rules (`!dir/`) silently excluding source trees: directory probes now retain their trailing slash in both the scanner and watcher. Thanks to @bbskye5008 for the detailed report and reproduction in [Issue #2](https://github.com/lemonxiny55/dsh-code-index/issues/2).
package/README.md CHANGED
@@ -5,7 +5,9 @@
5
5
 
6
6
  English | [中文](README.zh.md)
7
7
 
8
- **v0.9.0 — Edit-ready Context Packs**
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,7 +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.9.0 is published on npm and passed real Agent verification in DSH Desktop `0.2.0-rc.2`. See [release evidence](RELEASE_EVIDENCE_v0.9.0.md).
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.
20
+
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.
18
22
 
19
23
  ## On this page
20
24
 
@@ -30,10 +34,16 @@ v0.9.0 is published on npm and passed real Agent verification in DSH Desktop `0.
30
34
 
31
35
  ## Quick start
32
36
 
33
- Requires Node 22/24 and a matching DSH `0.2.0-rc.2` host group. Install the published version into a Web profile:
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:
34
44
 
35
45
  ```sh
36
- npx @deepseek-ai/dsh@0.2.0-rc.2 plugin --profile web add dsh-code-index@0.9.0
46
+ npx @deepseek-ai/dsh@0.2.0-rc.2 plugin --profile web add dsh-code-index@0.10.0
37
47
  npx @deepseek-ai/dsh@0.2.0-rc.2 web
38
48
  ```
39
49
 
@@ -85,13 +95,13 @@ Plus an optional **auto-injected system prompt section** (`code-index:repo-map`,
85
95
 
86
96
  Requires `dsh` (any install path — npx, npm, or source) and Node ≥ 22.
87
97
 
88
- The development compatibility target is `@deepseek-ai/dsh@0.2.0-rc.2` / `@deepseek-ai/dsh-tools@0.2.0-rc.2` (Node 22 and 24 CI matrix). The DSH plugin surface is still a preview API, so upstream changes may require compatibility updates.
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.
89
99
 
90
- v0.9 requires the matching `0.2.0-rc.2` tool runtime; the peer pin prevents fresh npm installs from selecting the older registry `latest` tag. Upgrade the host group together. The text/config/tool-surface compatibility above does not promise support for older DSH APIs.
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.
91
101
 
92
102
  ```sh
93
103
  # from npm (prebuilt)
94
- npx @deepseek-ai/dsh@0.2.0-rc.2 plugin --profile web add dsh-code-index@0.9.0
104
+ npx @deepseek-ai/dsh@0.2.0-rc.2 plugin --profile web add dsh-code-index@0.10.0
95
105
 
96
106
  # or from a directory containing this checkout
97
107
  npx @deepseek-ai/dsh@0.2.0-rc.2 plugin --profile web add ./dsh-code-index
@@ -173,7 +183,38 @@ Options are passed as the plugin row's `config` in the profile patch (or default
173
183
 
174
184
  ## Supported languages
175
185
 
176
- TypeScript, JavaScript, Python, Go, Rust, Java, C++ and C (`.ts .tsx .mts .cts .js .jsx .mjs .cjs .py .pyi .go .rs .java .cpp .cc .cxx .c++ .hpp .hxx .hh .h .ipp .tpp .inl .c`) via tree-sitter WASM — pure parsing, no native build. The symbol provider seam (`src/extract.ts` + grammars) is where other languages/embeddings plug in later. C/C++ symbol extraction resolves names through the declarator chain (templates, qualified `ns::name` definitions, in-class methods), and `#include "…"` specifiers feed the repo-map reference graph.
186
+ ArkTS, TypeScript, JavaScript, Python, Go, Rust, Java, C++ and C (`.ets .ts .tsx .mts .cts .js .jsx .mjs .cjs .py .pyi .go .rs .java .cpp .cc .cxx .c++ .hpp .hxx .hh .h .ipp .tpp .inl .c`) via tree-sitter WASM — pure parsing, no native build. The symbol provider seam (`src/extract.ts` + grammars) is where other languages/embeddings plug in later. C/C++ symbol extraction resolves names through the declarator chain (templates, qualified `ns::name` definitions, in-class methods), and `#include "…"` specifiers feed the repo-map reference graph.
187
+
188
+ ### ArkTS scope and limits
189
+
190
+ - Components declared with `struct` appear as `kind: class`, signature `struct Name`.
191
+ Methods, fields, global functions, classes/interfaces/types/enums and module
192
+ variables have stable qualified IDs, owners and source line ranges. Decorators
193
+ (`@Component`, `@ComponentV2`, `@State`, `@Local`, `@Builder`, etc.) are retained
194
+ as metadata and included in the definition's source range.
195
+ - `build()` and nested declarative UI blocks parse as ArkTS. Local components and
196
+ explicit ETS/TS imports feed symbols, search, map, references, change context
197
+ and Context Packs. `@Extend` metadata and UI attribute chains are excluded from
198
+ call relationships. Bare capitalized calls in UI bodies have no global-name or
199
+ imported-module fallback; unbound SDK components cannot acquire unrelated
200
+ same-named project targets. Ordinary callback/business calls retain existing
201
+ provenance. `code_refs` uses binding-aware candidates for ArkTS call sites.
202
+ - Relative mixed ETS/TS imports work when the target is statically unique.
203
+ Extensionless stems with both ETS and another source file stay unresolved.
204
+ Default imports remain `import-scoped`; no HAR/oh-package/module alias, SDK
205
+ typing, re-export chain, state-update or UI rerender semantics are inferred.
206
+ Unbound/global custom UI components may therefore have no relationship edge.
207
+ Syntax acceptance does not prove valid ArkTS or HarmonyOS runtime behavior.
208
+ - Each indexed file records `parsed`, `partial`, or `failed` syntax/read status,
209
+ ERROR/MISSING counts and at most three issue locations. Unreliable ArkTS
210
+ declarations are omitted rather than assigned misleading IDs. `code_index`
211
+ reports a bounded incomplete-index summary, and Context Packs/change context
212
+ carry gaps within their existing budgets. `parsed` means syntax extraction
213
+ completed, not that the index contains every semantic reference. Cache schema
214
+ 3 rebuilds older caches automatically; source bodies remain unpersisted.
215
+ - Grammar: [harmony-contrib 0.3.0](https://github.com/harmony-contrib/tree-sitter-arkts),
216
+ ABI 14, unchanged npm WASM bundled with its MIT notices. Consumer installation
217
+ requires no native ArkTS addon. [Asset provenance](grammars/README.md).
177
218
 
178
219
  ## How it works
179
220
 
package/README.zh.md CHANGED
@@ -2,7 +2,9 @@
2
2
 
3
3
  [English](README.md) | 中文
4
4
 
5
- **v0.9.0 — Edit-ready Context Packs**
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,7 +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.9.0 已发布到 npm,并通过 DSH Desktop `0.2.0-rc.2` 真实 Agent 验证。验证边界见[release evidence](RELEASE_EVIDENCE_v0.9.0.md)。
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 发布检查;部分解析或解析失败会提供有限诊断。
17
+
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 目录白名单修复继续保留。
15
19
 
16
20
  ## 本页导航
17
21
 
@@ -27,10 +31,16 @@ v0.9.0 已发布到 npm,并通过 DSH Desktop `0.2.0-rc.2` 真实 Agent 验证
27
31
 
28
32
  ## 快速开始
29
33
 
30
- 需要 Node 22/24 与匹配的 DSH `0.2.0-rc.2` 宿主版本组。将已发布版本安装到 Web profile:
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:
31
41
 
32
42
  ```sh
33
- npx @deepseek-ai/dsh@0.2.0-rc.2 plugin --profile web add dsh-code-index@0.9.0
43
+ npx @deepseek-ai/dsh@0.2.0-rc.2 plugin --profile web add dsh-code-index@0.10.0
34
44
  npx @deepseek-ai/dsh@0.2.0-rc.2 web
35
45
  ```
36
46
 
@@ -82,13 +92,13 @@ npx @deepseek-ai/dsh@0.2.0-rc.2 web
82
92
 
83
93
  需要 `dsh`(任意安装方式——npx、npm 或源码)与 Node ≥ 22。
84
94
 
85
- 当前开发兼容目标为 `@deepseek-ai/dsh@0.2.0-rc.2` / `@deepseek-ai/dsh-tools@0.2.0-rc.2`(CI 覆盖 Node 22 和 24)。DSH 插件接口仍属于预览 API,上游变化可能需要更新兼容适配。
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 和未来版本不在此兼容声明范围内。
86
96
 
87
- v0.9 要求匹配的 `0.2.0-rc.2` tools runtime;精确 peer pin 防止 npm 新安装选到 registry 中旧的 `latest` 标签。宿主版本组需一起升级;文本、配置、工具 surface 的兼容承诺不等于支持旧 DSH API。
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。
88
98
 
89
99
  ```sh
90
100
  # 从 npm(预编译)
91
- npx @deepseek-ai/dsh@0.2.0-rc.2 plugin --profile web add dsh-code-index@0.9.0
101
+ npx @deepseek-ai/dsh@0.2.0-rc.2 plugin --profile web add dsh-code-index@0.10.0
92
102
 
93
103
  # 或从包含本仓库检查副本的目录
94
104
  npx @deepseek-ai/dsh@0.2.0-rc.2 plugin --profile web add ./dsh-code-index
@@ -170,7 +180,30 @@ Git 变化使用固定的 baseline commit 判定 added/modified/deleted,保留
170
180
 
171
181
  ## 支持的语言
172
182
 
173
- TypeScript、JavaScript、Python、Go、Rust、Java、C++、C(`.ts .tsx .mts .cts .js .jsx .mjs .cjs .py .pyi .go .rs .java .cpp .cc .cxx .c++ .hpp .hxx .hh .h .ipp .tpp .inl .c`),通过 tree-sitter WASM 解析——纯解析,无需原生编译。符号提供方的接缝(`src/extract.ts` + 语法文件)预留了后续接入其他语言/嵌入检索的位置。C/C++ 符号提取通过 declarator 链解析名字(模板、`ns::name` 限定定义、类内方法),`#include "…"` 会接入 repo map 的引用图。
183
+ ArkTS、TypeScript、JavaScript、Python、Go、Rust、Java、C++、C(`.ets .ts .tsx .mts .cts .js .jsx .mjs .cjs .py .pyi .go .rs .java .cpp .cc .cxx .c++ .hpp .hxx .hh .h .ipp .tpp .inl .c`),通过 tree-sitter WASM 解析——纯解析,无需原生编译。符号提供方的接缝(`src/extract.ts` + 语法文件)预留了后续接入其他语言/嵌入检索的位置。C/C++ 符号提取通过 declarator 链解析名字(模板、`ns::name` 限定定义、类内方法),`#include "…"` 会接入 repo map 的引用图。
184
+
185
+ ### ArkTS 功能与限制
186
+
187
+ - `struct` 组件使用现有 `kind: class`,签名为 `struct Name`。方法、字段、全局函数、
188
+ class/interface/type/enum 和模块变量保留稳定的限定 ID、所属作用域和源码行号。
189
+ `@Component`、`@ComponentV2`、`@State`、`@Local`、`@Builder` 等装饰器保留为元数据,
190
+ 装饰器所在行纳入定义源码范围。
191
+ - 能解析 `build()` 和嵌套声明式 UI;本地组件、显式 ETS/TS import 接入符号、搜索、地图、
192
+ 引用、变更上下文和 Context Pack。`@Extend` 元数据及 UI 属性链不会被当作业务调用关系。
193
+ UI 块内大写裸调用不使用全仓库同名或仅导入模块的回退,避免给无绑定的 SDK 组件关联
194
+ 无关项目符号。普通 callback/业务调用沿用已有 provenance;ArkTS 的 `code_refs` 使用
195
+ 按绑定解析的候选关系。
196
+ - 唯一可确定目标的相对 ETS/TS import 可解析;同一无扩展名路径同时存在 ETS 和其他源码
197
+ 时不猜测。默认 import 保留 `import-scoped`,不推断 HAR/oh-package/模块别名、SDK 类型、
198
+ re-export 链、状态更新或 UI 重渲染语义。无显式绑定的全局自定义 UI 组件可能没有关系边。
199
+ 语法解析通过不等于 ArkTS 编译通过或鸿蒙运行时行为已验证。
200
+ - 每个索引文件记录 `parsed` / `partial` / `failed`、ERROR/MISSING 数量和最多三处位置。
201
+ 不可靠的 ArkTS 声明会被省略,避免错误的范围或所属作用域。`code_index` 提供有限的
202
+ 索引不完整摘要,Context Pack 和变更上下文在原有预算内保留缺口。`parsed` 只表示语法
203
+ 提取完成,不承诺完整语义引用。缓存 schema 3 自动重建旧缓存,仍不持久化源码正文。
204
+ - grammar 使用 [harmony-contrib 0.3.0](https://github.com/harmony-contrib/tree-sitter-arkts),
205
+ ABI 14,未经修改的 npm WASM 与 MIT 声明随包发布,消费端无需原生 ArkTS addon。
206
+ 见 [WASM 来源](grammars/README.md)。
174
207
 
175
208
  ## 工作原理
176
209
 
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: 2;
6
+ declare const REPO_INDEX_SCHEMA_VERSION: 3;
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;
@@ -16,6 +16,8 @@ interface SymbolScopePart {
16
16
  ordinal: number;
17
17
  }
18
18
  interface SymbolInfo {
19
+ /** ArkTS decorators as written; their source lines belong to the definition. */
20
+ decorators?: string[];
19
21
  /** Stable qualified id; unique within a RepoIndex. */
20
22
  id: SymbolId;
21
23
  /** Symbol name (identifier / type id / member name). */
@@ -53,6 +55,8 @@ interface ImportInfo {
53
55
  }
54
56
  /** One call site: callee name, line, and enclosing function ('' = module level). */
55
57
  interface CallInfo {
58
+ /** ArkUI syntax requires an explicit/local binding; no global name guessing. */
59
+ context?: 'arkui';
56
60
  /** Callee name as written (identifier, member/property, or qualified tail). */
57
61
  name: string;
58
62
  /** 1-based line of the call expression. */
@@ -65,6 +69,8 @@ interface CallInfo {
65
69
  qualifier: string | null;
66
70
  }
67
71
  interface IndexedFile {
72
+ /** Syntax/read completeness, not a typecheck or HarmonyOS runtime verdict. */
73
+ diagnostic?: ParseDiagnostic;
68
74
  /** Repo-relative path (forward-slash). */
69
75
  path: string;
70
76
  lang: string;
@@ -79,6 +85,16 @@ interface IndexedFile {
79
85
  * Optional because caches written before call-graph support lack it. */
80
86
  calls?: CallInfo[];
81
87
  }
88
+ interface ParseDiagnostic {
89
+ status: 'parsed' | 'partial' | 'failed';
90
+ errorCount: number;
91
+ missingCount: number;
92
+ issues: Array<{
93
+ kind: 'ERROR' | 'MISSING';
94
+ line: number;
95
+ }>;
96
+ reason?: 'source-unavailable' | 'parser-failed';
97
+ }
82
98
  interface RepoIndex {
83
99
  /** Persisted layout version; see {@link REPO_INDEX_SCHEMA_VERSION}. */
84
100
  schemaVersion: typeof REPO_INDEX_SCHEMA_VERSION;
@@ -122,14 +138,14 @@ declare function findRepoRoot(startDir: string, maxLevels?: number): Promise<str
122
138
  * Parses a source text with a per-language grammar (web-tree-sitter WASM,
123
139
  * static grammars from tree-sitter-wasms) and returns flat SymbolInfo rows.
124
140
  *
125
- * NOTE on the dependency pin: web-tree-sitter must stay at ^0.20.x — newer
126
- * releases expect dylinked grammar wasm, while tree-sitter-wasms ships
127
- * static builds. Verified working pair: web-tree-sitter@0.20.8 + tree-sitter-wasms@0.1.13.
141
+ * web-tree-sitter 0.25 loads the existing tree-sitter-wasms grammars and the
142
+ * pinned ArkTS ABI-14 asset. See grammars/README.md for provenance.
128
143
  */
129
144
 
130
- type LanguageId = 'typescript' | 'javascript' | 'python' | 'go' | 'rust' | 'java' | 'cpp' | 'c';
145
+ type LanguageId = 'arkts' | 'typescript' | 'javascript' | 'python' | 'go' | 'rust' | 'java' | 'cpp' | 'c';
131
146
  declare function languageForFile(filePath: string): LanguageId | null;
132
147
  interface ExtractedFile {
148
+ diagnostic: ParseDiagnostic;
133
149
  symbols: SymbolInfo[];
134
150
  /** Derived compatibility view of {@link importDetails} specifiers. */
135
151
  imports: string[];
@@ -171,6 +187,9 @@ declare function defaultCachePath(root: string, cacheDir?: string): string;
171
187
  declare function loadIndex(cachePath: string): Promise<RepoIndex | null>;
172
188
  declare function saveIndex(cachePath: string, index: RepoIndex): Promise<void>;
173
189
 
190
+ /** One summary and at most three file locations. No source or exception dump. */
191
+ declare function indexIntegrityWarnings(index: RepoIndex): string[];
192
+
174
193
  /** Pure search / filter logic over a RepoIndex — unit-testable, no IO. */
175
194
 
176
195
  interface SymbolFilter {
@@ -631,4 +650,4 @@ declare const name = "dsh-code-index";
631
650
  declare const inject: readonly ["tools", "systemPrompt"];
632
651
  declare function apply(ctx: MinimalContext, pluginConfig?: PluginConfig): void;
633
652
 
634
- export { type AffectedTest, CACHE_DIR_NAME, type ChangeContextInput, type ChangeContextOptions, type ChangeContextResult, type ChangeKind, type ChangedSymbol, type CodeChangeContextArgs, Config, type ContextFile, type ContextOptions, type ContextPack, type ContextPackItem, type ContextRelationship, type ContextRoute, type ContextSymbol, type ContextTaskKind, DEFAULT_EXCLUDED_DIRS, type DiffHunk, type FileChange, type ImpactHop, type ImpactRow, type ImportDependent, type IndexOptions, type IndexedFile, type RepoIndex, SUPPORTED_EXTS, type SymbolInfo, type SymbolKind, type SymbolPath, type TaskContextResult, type UnmappedChange, apply, buildChangeContext, buildIndex, buildIndexWithCache, buildModuleGraph, buildSymbolTable, buildTaskContext, callerCounts, changeContextInputFromArgs, defaultCachePath, extractAll, extractSymbols, findCycles, findOrphanModules, findRepoRoot, inject, languageForFile, loadIndex, name, parseFileToSymbols, parseUnifiedDiff, rankRepoMap, readGitFileAtRef, readWorkingTreeDiff, renderChangeContext, renderContextPack, renderHit, renderRepoMap, renderTaskContext, routeTask, saveIndex, scanRepo, scoreFile, searchSymbols, symbolCount, symbolRefs, tools };
653
+ export { type AffectedTest, CACHE_DIR_NAME, type ChangeContextInput, type ChangeContextOptions, type ChangeContextResult, type ChangeKind, type ChangedSymbol, type CodeChangeContextArgs, Config, type ContextFile, type ContextOptions, type ContextPack, type ContextPackItem, type ContextRelationship, type ContextRoute, type ContextSymbol, type ContextTaskKind, DEFAULT_EXCLUDED_DIRS, type DiffHunk, type FileChange, type ImpactHop, type ImpactRow, type ImportDependent, type IndexOptions, type IndexedFile, type ParseDiagnostic, type RepoIndex, SUPPORTED_EXTS, type SymbolInfo, type SymbolKind, type SymbolPath, type TaskContextResult, type UnmappedChange, apply, buildChangeContext, buildIndex, buildIndexWithCache, buildModuleGraph, buildSymbolTable, buildTaskContext, callerCounts, changeContextInputFromArgs, defaultCachePath, extractAll, extractSymbols, findCycles, findOrphanModules, findRepoRoot, indexIntegrityWarnings, inject, languageForFile, loadIndex, name, parseFileToSymbols, parseUnifiedDiff, rankRepoMap, readGitFileAtRef, readWorkingTreeDiff, renderChangeContext, renderContextPack, renderHit, renderRepoMap, renderTaskContext, routeTask, saveIndex, scanRepo, scoreFile, searchSymbols, symbolCount, symbolRefs, tools };