homegraph 1.5.2 → 1.5.3

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.
Files changed (150) hide show
  1. package/CHANGELOG.md +131 -0
  2. package/README.md +15 -8
  3. package/dist/arkui/index.d.ts +4 -0
  4. package/dist/arkui/index.d.ts.map +1 -0
  5. package/dist/arkui/index.js +23 -0
  6. package/dist/arkui/index.js.map +1 -0
  7. package/dist/arkui/migrate-passage.d.ts +28 -0
  8. package/dist/arkui/migrate-passage.d.ts.map +1 -0
  9. package/dist/arkui/migrate-passage.js +310 -0
  10. package/dist/arkui/migrate-passage.js.map +1 -0
  11. package/dist/arkui/migrate-semantics.d.ts +47 -0
  12. package/dist/arkui/migrate-semantics.d.ts.map +1 -0
  13. package/dist/arkui/migrate-semantics.js +229 -0
  14. package/dist/arkui/migrate-semantics.js.map +1 -0
  15. package/dist/arkui/migrate-snapshot.d.ts +79 -0
  16. package/dist/arkui/migrate-snapshot.d.ts.map +1 -0
  17. package/dist/arkui/migrate-snapshot.js +340 -0
  18. package/dist/arkui/migrate-snapshot.js.map +1 -0
  19. package/dist/bin/fatal-handler.js +2 -2
  20. package/dist/bin/homegraph.js +105 -156
  21. package/dist/bin/homegraph.js.map +1 -1
  22. package/dist/bin/node-version-check.d.ts +6 -15
  23. package/dist/bin/node-version-check.d.ts.map +1 -1
  24. package/dist/bin/node-version-check.js +8 -37
  25. package/dist/bin/node-version-check.js.map +1 -1
  26. package/dist/db/index.d.ts +36 -1
  27. package/dist/db/index.d.ts.map +1 -1
  28. package/dist/db/index.js +92 -6
  29. package/dist/db/index.js.map +1 -1
  30. package/dist/db/migrations.d.ts +1 -1
  31. package/dist/db/migrations.d.ts.map +1 -1
  32. package/dist/db/migrations.js +15 -1
  33. package/dist/db/migrations.js.map +1 -1
  34. package/dist/db/queries.d.ts +42 -0
  35. package/dist/db/queries.d.ts.map +1 -1
  36. package/dist/db/queries.js +177 -10
  37. package/dist/db/queries.js.map +1 -1
  38. package/dist/db/schema.sql +6 -1
  39. package/dist/db/sqlite-adapter.d.ts +8 -3
  40. package/dist/db/sqlite-adapter.d.ts.map +1 -1
  41. package/dist/db/sqlite-adapter.js +45 -3
  42. package/dist/db/sqlite-adapter.js.map +1 -1
  43. package/dist/extraction/extraction-version.d.ts +1 -1
  44. package/dist/extraction/extraction-version.js +1 -1
  45. package/dist/extraction/generated-detection.d.ts +42 -11
  46. package/dist/extraction/generated-detection.d.ts.map +1 -1
  47. package/dist/extraction/generated-detection.js +141 -20
  48. package/dist/extraction/generated-detection.js.map +1 -1
  49. package/dist/extraction/index.d.ts +42 -0
  50. package/dist/extraction/index.d.ts.map +1 -1
  51. package/dist/extraction/index.js +96 -0
  52. package/dist/extraction/index.js.map +1 -1
  53. package/dist/extraction/languages/arkts.d.ts +19 -2
  54. package/dist/extraction/languages/arkts.d.ts.map +1 -1
  55. package/dist/extraction/languages/arkts.js +460 -110
  56. package/dist/extraction/languages/arkts.js.map +1 -1
  57. package/dist/extraction/wasm-runtime-flags.d.ts.map +1 -1
  58. package/dist/extraction/wasm-runtime-flags.js +9 -6
  59. package/dist/extraction/wasm-runtime-flags.js.map +1 -1
  60. package/dist/graph-sources.d.ts +41 -0
  61. package/dist/graph-sources.d.ts.map +1 -0
  62. package/dist/graph-sources.js +82 -0
  63. package/dist/graph-sources.js.map +1 -0
  64. package/dist/index.d.ts +19 -1
  65. package/dist/index.d.ts.map +1 -1
  66. package/dist/index.js +79 -9
  67. package/dist/index.js.map +1 -1
  68. package/dist/installer/index.d.ts.map +1 -1
  69. package/dist/installer/index.js +0 -48
  70. package/dist/installer/index.js.map +1 -1
  71. package/dist/installer/targets/antigravity.js +1 -1
  72. package/dist/installer/targets/antigravity.js.map +1 -1
  73. package/dist/installer/targets/deveco.js +1 -1
  74. package/dist/installer/targets/deveco.js.map +1 -1
  75. package/dist/installer/targets/hermes.d.ts +1 -1
  76. package/dist/installer/targets/hermes.js +2 -2
  77. package/dist/installer/targets/hermes.js.map +1 -1
  78. package/dist/installer/targets/opencode.js +1 -1
  79. package/dist/installer/targets/opencode.js.map +1 -1
  80. package/dist/installer/targets/shared.js +1 -1
  81. package/dist/installer/targets/shared.js.map +1 -1
  82. package/dist/mcp/daemon-paths.d.ts +5 -4
  83. package/dist/mcp/daemon-paths.d.ts.map +1 -1
  84. package/dist/mcp/daemon-paths.js +28 -13
  85. package/dist/mcp/daemon-paths.js.map +1 -1
  86. package/dist/mcp/daemon-registry.d.ts.map +1 -1
  87. package/dist/mcp/daemon-registry.js +4 -1
  88. package/dist/mcp/daemon-registry.js.map +1 -1
  89. package/dist/mcp/daemon.d.ts +1 -1
  90. package/dist/mcp/daemon.js +1 -1
  91. package/dist/mcp/engine.d.ts.map +1 -1
  92. package/dist/mcp/engine.js +12 -3
  93. package/dist/mcp/engine.js.map +1 -1
  94. package/dist/mcp/explore-dedup.d.ts +137 -0
  95. package/dist/mcp/explore-dedup.d.ts.map +1 -0
  96. package/dist/mcp/explore-dedup.js +236 -0
  97. package/dist/mcp/explore-dedup.js.map +1 -0
  98. package/dist/mcp/explore-session-state.d.ts +217 -0
  99. package/dist/mcp/explore-session-state.d.ts.map +1 -0
  100. package/dist/mcp/explore-session-state.js +322 -0
  101. package/dist/mcp/explore-session-state.js.map +1 -0
  102. package/dist/mcp/index.d.ts.map +1 -1
  103. package/dist/mcp/index.js +4 -7
  104. package/dist/mcp/index.js.map +1 -1
  105. package/dist/mcp/proxy.d.ts.map +1 -1
  106. package/dist/mcp/proxy.js +5 -14
  107. package/dist/mcp/proxy.js.map +1 -1
  108. package/dist/mcp/query-worker.d.ts +1 -1
  109. package/dist/mcp/query-worker.js +1 -1
  110. package/dist/mcp/server-instructions.d.ts +7 -2
  111. package/dist/mcp/server-instructions.d.ts.map +1 -1
  112. package/dist/mcp/server-instructions.js +104 -28
  113. package/dist/mcp/server-instructions.js.map +1 -1
  114. package/dist/mcp/session.d.ts +14 -3
  115. package/dist/mcp/session.d.ts.map +1 -1
  116. package/dist/mcp/session.js +17 -14
  117. package/dist/mcp/session.js.map +1 -1
  118. package/dist/mcp/startup-handshake.d.ts +1 -1
  119. package/dist/mcp/startup-handshake.js +1 -1
  120. package/dist/mcp/tools.d.ts +117 -7
  121. package/dist/mcp/tools.d.ts.map +1 -1
  122. package/dist/mcp/tools.js +3056 -503
  123. package/dist/mcp/tools.js.map +1 -1
  124. package/dist/resolution/frameworks/arkts-napi.d.ts +14 -0
  125. package/dist/resolution/frameworks/arkts-napi.d.ts.map +1 -1
  126. package/dist/resolution/frameworks/arkts-napi.js +169 -49
  127. package/dist/resolution/frameworks/arkts-napi.js.map +1 -1
  128. package/dist/search/query-utils.d.ts +116 -4
  129. package/dist/search/query-utils.d.ts.map +1 -1
  130. package/dist/search/query-utils.js +869 -60
  131. package/dist/search/query-utils.js.map +1 -1
  132. package/dist/types.d.ts +8 -0
  133. package/dist/types.d.ts.map +1 -1
  134. package/dist/upgrade/index.d.ts +14 -26
  135. package/dist/upgrade/index.d.ts.map +1 -1
  136. package/dist/upgrade/index.js +28 -123
  137. package/dist/upgrade/index.js.map +1 -1
  138. package/dist/upgrade/remove-binary.d.ts +19 -19
  139. package/dist/upgrade/remove-binary.d.ts.map +1 -1
  140. package/dist/upgrade/remove-binary.js +20 -21
  141. package/dist/upgrade/remove-binary.js.map +1 -1
  142. package/dist/upgrade/update-check.d.ts +4 -3
  143. package/dist/upgrade/update-check.d.ts.map +1 -1
  144. package/dist/upgrade/update-check.js +4 -3
  145. package/dist/upgrade/update-check.js.map +1 -1
  146. package/package.json +12 -8
  147. package/dist/telemetry/index.d.ts +0 -143
  148. package/dist/telemetry/index.d.ts.map +0 -1
  149. package/dist/telemetry/index.js +0 -541
  150. package/dist/telemetry/index.js.map +0 -1
@@ -1,9 +1,14 @@
1
1
  /**
2
+
2
3
  * Server-level instructions emitted in the MCP `initialize` response.
4
+
3
5
  *
6
+
4
7
  * Single source of truth for agent-facing tool guidance (issue #529).
8
+
5
9
  * Edit here — not installer prompts or eval harness prompts.
10
+
6
11
  */
7
- export declare const SERVER_INSTRUCTIONS = "# HomeGraph \u2014 when to call\n\nHomeGraph is a **local structural index of THIS repo**: symbols + call/import/extends edges + files. Use it only when the answer needs that graph.\n\n## Call HomeGraph (closed set)\n\nUse `homegraph_explore` (primary) when **all** of these hold:\n\n1. The evidence lives **in this repository's source** (not an external SDK manual).\n2. You need **structure**: definition location, who calls whom, how A reaches B, multi-file wiring, or in-repo import/usage of a named API/`@kit` module.\n3. You can put **concrete names** in `query` \u2014 symbol, `Type.member`, file basename, or `@kit\u2026` (skip `homegraph_search` when names are already known).\n\nTypical fits:\n\n- How a **feature in this repo** is wired (mechanism / cross-file / click\u2192handler flow)\n- Callers / callees / blast radius of a **named** symbol\n- What a **named component/method** does (include the name; one explore is enough)\n- In-repo usages of an imported API (not the official feature catalog)\n\n**One explore with names** beats search\u2192explore\u2192node\u2192grep\u2192read. Treat returned line-numbered source as already Read. After a full explore \u2014 **answer**; do not re-verify with grep/read/node for the same symbols. Busy/partial \u2192 retry that **same** explore once.\n\n## Do not call HomeGraph otherwise\n\nIf the question is **outside the set above**, do **not** open any `homegraph_*` tool \u2014 use Read / Grep / Glob / SDK docs. HomeGraph is not a general Q&A layer; forcing it on the wrong shape costs time and tokens and often lowers quality.\n\n## Tool roles\n\n| Tool | Role |\n|------|------|\n| **homegraph_explore** | Primary for the closed set above |\n| homegraph_diff_impact | PR/diff review: unified `diff` or `hunks` \u2192 changed symbols (line\u2229span) + capped callers/impact/UI edges |\n| homegraph_node | One known symbol body (or indexed file) after explore named it |\n| homegraph_callers / callees | Compact edge lists for a named symbol |\n| homegraph_impact | Blast radius for one named symbol (not a whole PR) |\n| homegraph_search | Rare \u2014 unknown spelling only |\n| homegraph_files | Folder tree only |\n\n## Tips\n\n- **Deadline / partial** \u2014 success-shaped; retry ONE explore with the same names. Do not abandon to grep for those symbols.\n- **Staleness banner** \u2014 Read only the listed edited files.\n- **Not indexed** \u2014 built-in tools; user runs `homegraph init` \u2014 you do not.\n";
8
- export declare const SERVER_INSTRUCTIONS_NO_ROOT_INDEX = "# HomeGraph \u2014 per-project (pass projectPath)\n\nHomeGraph indexes a codebase into a symbol graph. Call it **only** for in-repo structural / flow / usage questions on a project that has `.homegraph/`. Pass that project as `projectPath`.\n\n- Fits the closed set (structure, callers, wiring, named symbol/file) \u2192 `homegraph_explore`\n- Anything else \u2192 Read/Grep/Glob \u2014 **do not call homegraph_***\n- No index \u2192 Read/Grep/Glob; user runs `homegraph init` if they want indexing\n";
12
+ export declare const SERVER_INSTRUCTIONS = "# HomeGraph \u2014 when to call\n\n\n\nHomeGraph is a **local structural index of THIS repo**: symbols + call/import/extends edges + files. Use it when the answer needs that graph.\n\n\n\n## Call HomeGraph first (do this before Grep/Read)\n\n\n\nFor these shapes, open `homegraph_explore` **immediately** \u2014 do **not** Grep/Glob/Read first (and do **not** parallel-Grep on the same turn):\n\n\n\n- How / mechanism / wiring in this repo. Domain keywords in `query` are enough \u2014 no PascalCase names required first.\n\n- **How to get** a system setting / capability **as used in this repo** \u2014 explore with the question (domain keywords OK); do not Grep-first\n\n- **Named** Type / Component / Page / Dialog / `Type.member` / Type + co-named methods (`CanPlace`/`Place` \u2194 owner) already in the question\n\n- Callers / callees / blast radius / subtypes of a **named** symbol\n\n- **In-repo usages / dependencies** of a named API, `.member` (incl. `.drawModifier` / DrawContext), ALL_CAPS constant, field/mutex (incl. where `m_*` is `new`/`delete`'d), or `@kit`/`@ohos` import \u2014 including \"does calling Kit X need other deps?\" / `oh-package` install questions\n\n- **Declaration / attribute sites** of a named Type (which files declare it, ids, native bindings) \u2014 English rewrites OK (`declaration` / `id` / `binding`)\n\n- **Who uses the return value** of a named member/fn (incl. after \u901A\u8FC7/via) \u2014 explore; prefer that member's callers, not a preceding create/factory or SDK `.d.ts`\n\n- Path-module / named-Type **NAPI** export surfaces (not a topic file-list), multi-module interdependence, or **circular deps** among named `*common` / path modules\n\n- Named `.d.ts` wrap + where it is imported/called\n\n- **ALL_CAPS / enum member** usages (`FOO_BAR` / `Type.MEMBER`) \u2014 explore, not Grep-first\n\n- **Type + listed methods** callers (`BinaryGrid` Set/Test/Fill) \u2014 explore caller inventory\n\n- **Field/mutex co-use** (`m_*` / `*Mutex` with co-named methods) \u2014 explore; do not Grep the field name\n\n- **Assigned flag impact** (`flag = true` \u2026 how it affects later timing) \u2014 explore the assignment site\n\n- **Named Toggle/control state sync** across surfaces \u2014 explore\n\n- **`lib*.so` + GLES/EGL / OpenGL thread** (vs UI/JS thread) \u2014 explore; do not bash/grep CMake first\n\n- **Step / download\u2192parse\u2192install call-chains** (\"\u4F1A\u8D70\u5230\u54EA\u4E9B\u4EE3\u7801\") \u2014 explore as mechanism, not a topic file-list\n\n- Co-named **call + visibility** questions (who calls X / how Y becomes visible) \u2014 `homegraph_explore`, not `homegraph_callers` alone / not light-mechanism\n\n- **Conditional wiring** on a named `Type::method` / `Export` (\"\u5931\u8D25\u65F6\u8FD8\u4F1A\u2026\") \u2014 explore/node the method body first\n\n\n\nAfter one explore \u2192 **answer**. Do not re-verify with Grep/Read/node for the same symbols.\n\nDo **not** follow a successful explore with `homegraph_files` / another explore of the same bag.\n\nDo **not** open SDK `.d.ts` stubs when the inventory already says in-repo sites (or zero in-repo sites).\n\n\n\nPrefer the **smallest** tool when the name is already known: `homegraph_callers` / `homegraph_callees` / `homegraph_node` for one symbol; `homegraph_explore` for multi-file / how-wired / usage inventories (prefer explore over `homegraph_files` for structural questions); `homegraph_search` only for unknown spelling.\n\nFor **ArkUI V1\u2194V2 migration / state-decorator / Provide\u00B7Consume\u00B7Storage key / @Observed** decisions on a named component or file, call `homegraph_arkui_migrate` **once** (scope = component name or `.ets` path) \u2014 do **not** stitch those facts with explore.\n\n## Do not call HomeGraph (skip \u2192 Grep / Glob / Read / SDK docs)\n\n\n\nOpen **zero** `homegraph_*` tools when:\n\n\n\n- **Topic \u2192 file list** with no concrete Type / file basename / constant / path\n\n- **Existence / concept / pure UI behavior** with no named in-repo Type, file, or `@kit`/`@ohos` target\n\n- **Literal / layout copy hunts** (\u5168\u641C\u6587\u6848\u3001\u5B57\u9762\u91CF) with no code anchors\n\n- **Official SDK / `@kit` feature catalogs** (what APIs a kit *provides*) \u2014 opposite of in-repo *usages*\n\n- Evidence lives only in **external manuals**\n\n\n\n`@kit` **usages in this repo** \u2260 SDK catalog. Usages \u2192 explore. Catalogs \u2192 SDK docs.\n\n\n\nIf explore/search returns **Skip HomeGraph**, treat as final \u2014 do not retry homegraph_*.\n\n\n\n## Tips\n\n\n\n- Busy/partial \u2192 retry that **same** explore once; then answer.\n\n- **Staleness banner** \u2014 Read only the listed edited files.\n\n- **A file flagged \"\u26A0 changed on disk after the last index sync\" drifted from its index** (most common on projects queried via `projectPath`, which have no live watcher). HomeGraph never serves a possibly-mis-sliced body from such a file \u2014 it either shows the file's full CURRENT source (trust it as a Read) or omits the source with this flag. When the source was omitted, Read that specific file; line numbers referencing it elsewhere in the response may be shifted until that project's next sync. All unflagged files remain trustworthy.\n\n- **Not indexed** \u2014 built-in tools; user runs `homegraph init` \u2014 you do not.\n\n";
13
+ export declare const SERVER_INSTRUCTIONS_NO_ROOT_INDEX = "# HomeGraph \u2014 per-project (pass projectPath)\n\n\n\nHomeGraph indexes a codebase into a symbol graph. Pass `projectPath` to a project with `.homegraph/`.\n\n\n\n- How/mechanism/wiring, named Type/Component/`Type.member`, declaration/usage inventories, constants/fields, path NAPI/deps, in-repo `@kit` usages \u2192 `homegraph_explore` first (no Grep-first)\n\n- Topic file-lists, concept compares, literal copy hunts, SDK *catalogs* \u2192 Read/Grep/Glob \u2014 **do not call homegraph_***\n\n- No index \u2192 Read/Grep/Glob; user runs `homegraph init` if they want indexing\n\n";
9
14
  //# sourceMappingURL=server-instructions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"server-instructions.d.ts","sourceRoot":"","sources":["../../src/mcp/server-instructions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,mBAAmB,m7EA0C/B,CAAC;AAEF,eAAO,MAAM,iCAAiC,yfAO7C,CAAC"}
1
+ {"version":3,"file":"server-instructions.d.ts","sourceRoot":"","sources":["../../src/mcp/server-instructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,eAAO,MAAM,mBAAmB,quKA0G/B,CAAC;AAIF,eAAO,MAAM,iCAAiC,6kBAc7C,CAAC"}
@@ -1,61 +1,137 @@
1
1
  "use strict";
2
2
  /**
3
+
3
4
  * Server-level instructions emitted in the MCP `initialize` response.
5
+
4
6
  *
7
+
5
8
  * Single source of truth for agent-facing tool guidance (issue #529).
9
+
6
10
  * Edit here — not installer prompts or eval harness prompts.
11
+
7
12
  */
8
13
  Object.defineProperty(exports, "__esModule", { value: true });
9
14
  exports.SERVER_INSTRUCTIONS_NO_ROOT_INDEX = exports.SERVER_INSTRUCTIONS = void 0;
10
15
  exports.SERVER_INSTRUCTIONS = `# HomeGraph — when to call
11
16
 
12
- HomeGraph is a **local structural index of THIS repo**: symbols + call/import/extends edges + files. Use it only when the answer needs that graph.
13
17
 
14
- ## Call HomeGraph (closed set)
15
18
 
16
- Use \`homegraph_explore\` (primary) when **all** of these hold:
19
+ HomeGraph is a **local structural index of THIS repo**: symbols + call/import/extends edges + files. Use it when the answer needs that graph.
20
+
21
+
22
+
23
+ ## Call HomeGraph first (do this before Grep/Read)
24
+
25
+
26
+
27
+ For these shapes, open \`homegraph_explore\` **immediately** — do **not** Grep/Glob/Read first (and do **not** parallel-Grep on the same turn):
28
+
29
+
30
+
31
+ - How / mechanism / wiring in this repo. Domain keywords in \`query\` are enough — no PascalCase names required first.
32
+
33
+ - **How to get** a system setting / capability **as used in this repo** — explore with the question (domain keywords OK); do not Grep-first
34
+
35
+ - **Named** Type / Component / Page / Dialog / \`Type.member\` / Type + co-named methods (\`CanPlace\`/\`Place\` ↔ owner) already in the question
36
+
37
+ - Callers / callees / blast radius / subtypes of a **named** symbol
38
+
39
+ - **In-repo usages / dependencies** of a named API, \`.member\` (incl. \`.drawModifier\` / DrawContext), ALL_CAPS constant, field/mutex (incl. where \`m_*\` is \`new\`/\`delete\`'d), or \`@kit\`/\`@ohos\` import — including "does calling Kit X need other deps?" / \`oh-package\` install questions
40
+
41
+ - **Declaration / attribute sites** of a named Type (which files declare it, ids, native bindings) — English rewrites OK (\`declaration\` / \`id\` / \`binding\`)
42
+
43
+ - **Who uses the return value** of a named member/fn (incl. after 通过/via) — explore; prefer that member's callers, not a preceding create/factory or SDK \`.d.ts\`
44
+
45
+ - Path-module / named-Type **NAPI** export surfaces (not a topic file-list), multi-module interdependence, or **circular deps** among named \`*common\` / path modules
46
+
47
+ - Named \`.d.ts\` wrap + where it is imported/called
48
+
49
+ - **ALL_CAPS / enum member** usages (\`FOO_BAR\` / \`Type.MEMBER\`) — explore, not Grep-first
50
+
51
+ - **Type + listed methods** callers (\`BinaryGrid\` Set/Test/Fill) — explore caller inventory
52
+
53
+ - **Field/mutex co-use** (\`m_*\` / \`*Mutex\` with co-named methods) — explore; do not Grep the field name
54
+
55
+ - **Assigned flag impact** (\`flag = true\` … how it affects later timing) — explore the assignment site
56
+
57
+ - **Named Toggle/control state sync** across surfaces — explore
58
+
59
+ - **\`lib*.so\` + GLES/EGL / OpenGL thread** (vs UI/JS thread) — explore; do not bash/grep CMake first
60
+
61
+ - **Step / download→parse→install call-chains** ("会走到哪些代码") — explore as mechanism, not a topic file-list
62
+
63
+ - Co-named **call + visibility** questions (who calls X / how Y becomes visible) — \`homegraph_explore\`, not \`homegraph_callers\` alone / not light-mechanism
64
+
65
+ - **Conditional wiring** on a named \`Type::method\` / \`Export\` ("失败时还会…") — explore/node the method body first
66
+
17
67
 
18
- 1. The evidence lives **in this repository's source** (not an external SDK manual).
19
- 2. You need **structure**: definition location, who calls whom, how A reaches B, multi-file wiring, or in-repo import/usage of a named API/\`@kit\` module.
20
- 3. You can put **concrete names** in \`query\` — symbol, \`Type.member\`, file basename, or \`@kit…\` (skip \`homegraph_search\` when names are already known).
21
68
 
22
- Typical fits:
69
+ After one explore → **answer**. Do not re-verify with Grep/Read/node for the same symbols.
23
70
 
24
- - How a **feature in this repo** is wired (mechanism / cross-file / click→handler flow)
25
- - Callers / callees / blast radius of a **named** symbol
26
- - What a **named component/method** does (include the name; one explore is enough)
27
- - In-repo usages of an imported API (not the official feature catalog)
71
+ Do **not** follow a successful explore with \`homegraph_files\` / another explore of the same bag.
28
72
 
29
- **One explore with names** beats search→explore→node→grep→read. Treat returned line-numbered source as already Read. After a full explore — **answer**; do not re-verify with grep/read/node for the same symbols. Busy/partial → retry that **same** explore once.
73
+ Do **not** open SDK \`.d.ts\` stubs when the inventory already says in-repo sites (or zero in-repo sites).
30
74
 
31
- ## Do not call HomeGraph otherwise
32
75
 
33
- If the question is **outside the set above**, do **not** open any \`homegraph_*\` tool — use Read / Grep / Glob / SDK docs. HomeGraph is not a general Q&A layer; forcing it on the wrong shape costs time and tokens and often lowers quality.
34
76
 
35
- ## Tool roles
77
+ Prefer the **smallest** tool when the name is already known: \`homegraph_callers\` / \`homegraph_callees\` / \`homegraph_node\` for one symbol; \`homegraph_explore\` for multi-file / how-wired / usage inventories (prefer explore over \`homegraph_files\` for structural questions); \`homegraph_search\` only for unknown spelling.
78
+
79
+ For **ArkUI V1↔V2 migration / state-decorator / Provide·Consume·Storage key / @Observed** decisions on a named component or file, call \`homegraph_arkui_migrate\` **once** (scope = component name or \`.ets\` path) — do **not** stitch those facts with explore.
80
+
81
+ ## Do not call HomeGraph (skip → Grep / Glob / Read / SDK docs)
82
+
83
+
84
+
85
+ Open **zero** \`homegraph_*\` tools when:
86
+
87
+
88
+
89
+ - **Topic → file list** with no concrete Type / file basename / constant / path
90
+
91
+ - **Existence / concept / pure UI behavior** with no named in-repo Type, file, or \`@kit\`/\`@ohos\` target
92
+
93
+ - **Literal / layout copy hunts** (全搜文案、字面量) with no code anchors
94
+
95
+ - **Official SDK / \`@kit\` feature catalogs** (what APIs a kit *provides*) — opposite of in-repo *usages*
96
+
97
+ - Evidence lives only in **external manuals**
98
+
99
+
100
+
101
+ \`@kit\` **usages in this repo** ≠ SDK catalog. Usages → explore. Catalogs → SDK docs.
102
+
103
+
104
+
105
+ If explore/search returns **Skip HomeGraph**, treat as final — do not retry homegraph_*.
106
+
36
107
 
37
- | Tool | Role |
38
- |------|------|
39
- | **homegraph_explore** | Primary for the closed set above |
40
- | homegraph_diff_impact | PR/diff review: unified \`diff\` or \`hunks\` → changed symbols (line∩span) + capped callers/impact/UI edges |
41
- | homegraph_node | One known symbol body (or indexed file) after explore named it |
42
- | homegraph_callers / callees | Compact edge lists for a named symbol |
43
- | homegraph_impact | Blast radius for one named symbol (not a whole PR) |
44
- | homegraph_search | Rare — unknown spelling only |
45
- | homegraph_files | Folder tree only |
46
108
 
47
109
  ## Tips
48
110
 
49
- - **Deadline / partial** — success-shaped; retry ONE explore with the same names. Do not abandon to grep for those symbols.
111
+
112
+
113
+ - Busy/partial → retry that **same** explore once; then answer.
114
+
50
115
  - **Staleness banner** — Read only the listed edited files.
116
+
117
+ - **A file flagged "⚠ changed on disk after the last index sync" drifted from its index** (most common on projects queried via \`projectPath\`, which have no live watcher). HomeGraph never serves a possibly-mis-sliced body from such a file — it either shows the file's full CURRENT source (trust it as a Read) or omits the source with this flag. When the source was omitted, Read that specific file; line numbers referencing it elsewhere in the response may be shifted until that project's next sync. All unflagged files remain trustworthy.
118
+
51
119
  - **Not indexed** — built-in tools; user runs \`homegraph init\` — you do not.
120
+
52
121
  `;
53
122
  exports.SERVER_INSTRUCTIONS_NO_ROOT_INDEX = `# HomeGraph — per-project (pass projectPath)
54
123
 
55
- HomeGraph indexes a codebase into a symbol graph. Call it **only** for in-repo structural / flow / usage questions on a project that has \`.homegraph/\`. Pass that project as \`projectPath\`.
56
124
 
57
- - Fits the closed set (structure, callers, wiring, named symbol/file) → \`homegraph_explore\`
58
- - Anything else Read/Grep/Glob **do not call homegraph_***
125
+
126
+ HomeGraph indexes a codebase into a symbol graph. Pass \`projectPath\` to a project with \`.homegraph/\`.
127
+
128
+
129
+
130
+ - How/mechanism/wiring, named Type/Component/\`Type.member\`, declaration/usage inventories, constants/fields, path NAPI/deps, in-repo \`@kit\` usages → \`homegraph_explore\` first (no Grep-first)
131
+
132
+ - Topic file-lists, concept compares, literal copy hunts, SDK *catalogs* → Read/Grep/Glob — **do not call homegraph_***
133
+
59
134
  - No index → Read/Grep/Glob; user runs \`homegraph init\` if they want indexing
135
+
60
136
  `;
61
137
  //# sourceMappingURL=server-instructions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"server-instructions.js","sourceRoot":"","sources":["../../src/mcp/server-instructions.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0ClC,CAAC;AAEW,QAAA,iCAAiC,GAAG;;;;;;;CAOhD,CAAC"}
1
+ {"version":3,"file":"server-instructions.js","sourceRoot":"","sources":["../../src/mcp/server-instructions.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAIU,QAAA,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0GlC,CAAC;AAIW,QAAA,iCAAiC,GAAG;;;;;;;;;;;;;;CAchD,CAAC"}
@@ -9,10 +9,11 @@
9
9
  *
10
10
  * The state-machine itself mirrors what `MCPServer` used to do inline before
11
11
  * issue #411 split it out — the same regression tests in
12
- * `__tests__/mcp-initialize.test.ts` still drive this code path.
12
+ * `test/mcp-initialize.test.ts` still drive this code path.
13
13
  */
14
14
  import { JsonRpcTransport } from './transport';
15
15
  import { MCPEngine } from './engine';
16
+ import { ExploreSessionState } from './explore-session-state';
16
17
  /**
17
18
  * MCP Server Info — kept on the session because some clients log it. The
18
19
  * version tracks the real package version (was a hard-coded '0.1.0').
@@ -53,11 +54,15 @@ export declare class MCPSession {
53
54
  private transport;
54
55
  private engine;
55
56
  private clientSupportsRoots;
56
- /** From the initialize handshake — attributes usage rollups to the agent host. */
57
- private clientInfo;
58
57
  private rootsAttempted;
59
58
  private resolvePromise;
60
59
  private explicitProjectPath;
60
+ /**
61
+ * Per-session explore history (CG-17). Lives here — not on ToolHandler —
62
+ * because the daemon shares one handler across every connected session; a
63
+ * reconnecting client starts clean.
64
+ */
65
+ private readonly exploreSession;
61
66
  constructor(transport: JsonRpcTransport, engine: MCPEngine, opts?: MCPSessionOptions);
62
67
  /**
63
68
  * Start handling messages from the transport. Returns immediately — the
@@ -71,6 +76,12 @@ export declare class MCPSession {
71
76
  stop(): void;
72
77
  /** Underlying transport — exposed for daemon-side close hooks. */
73
78
  getTransport(): JsonRpcTransport;
79
+ /**
80
+ * This session's explore call history. Exposed so tests / diagnostics can
81
+ * inspect it; tool dispatch reaches it via the execute(sessionState) arg —
82
+ * never by reaching for another session's copy.
83
+ */
84
+ getExploreSessionState(): ExploreSessionState;
74
85
  private handleMessage;
75
86
  private handleInitialize;
76
87
  private handleToolsList;
@@ -1 +1 @@
1
- {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/mcp/session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAuC,gBAAgB,EAAc,MAAM,aAAa,CAAC;AAChG,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAQrC;;;GAGG;AAGH,eAAO,MAAM,WAAW;;;CAGvB,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,GAAE,MAAM,GAAG,IAAwB,GAAG,MAAM,CAMtG;AAED,uDAAuD;AACvD,eAAO,MAAM,gBAAgB,eAAe,CAAC;AAmC7C,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC;AAED;;;GAGG;A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M;IAbhB,OAAO,CAAC,mBAAmB,CAAS;IACpC,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,cAAc,CAA8B;IACpD,OAAO,CAAC,mBAAmB,CAAgB;IAC3C;;;;OAIG;IACH,OAAO,CAAC,QAAQ,CAAC,cAAc,CAA6B;gBAGlD,SAAS,EAAE,gBAAgB,EAC3B,MAAM,EAAE,SAAS,EACzB,IAAI,GAAE,iBAAsB;IAK9B;;;OAGG;IACH,KAAK,IAAI,IAAI;IAIb;;;OAGG;IACH,IAAI,IAAI,IAAI;IAIZ,kEAAkE;IAClE,YAAY,IAAI,gBAAgB;IAIhC;;;;OAIG;IACH,sBAAsB,IAAI,mBAAmB;YAI/B,aAAa;YA0Cb,gBAAgB;YAmDhB,eAAe;YAkBf,eAAe;IAiC7B;;;;;;;OAOG;YACW,iBAAiB;IAyB/B;;;OAGG;YACW,aAAa;CAgB5B"}
@@ -10,7 +10,7 @@
10
10
  *
11
11
  * The state-machine itself mirrors what `MCPServer` used to do inline before
12
12
  * issue #411 split it out — the same regression tests in
13
- * `__tests__/mcp-initialize.test.ts` still drive this code path.
13
+ * `test/mcp-initialize.test.ts` still drive this code path.
14
14
  */
15
15
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
16
16
  if (k2 === undefined) k2 = k;
@@ -54,8 +54,8 @@ const tools_1 = require("./tools");
54
54
  const server_instructions_1 = require("./server-instructions");
55
55
  const version_1 = require("./version");
56
56
  const directory_1 = require("../directory");
57
- const telemetry_1 = require("../telemetry");
58
57
  const update_check_1 = require("../upgrade/update-check");
58
+ const explore_session_state_1 = require("./explore-session-state");
59
59
  /**
60
60
  * MCP Server Info — kept on the session because some clients log it. The
61
61
  * version tracks the real package version (was a hard-coded '0.1.0').
@@ -129,11 +129,15 @@ class MCPSession {
129
129
  transport;
130
130
  engine;
131
131
  clientSupportsRoots = false;
132
- /** From the initialize handshake — attributes usage rollups to the agent host. */
133
- clientInfo;
134
132
  rootsAttempted = false;
135
133
  resolvePromise = null;
136
134
  explicitProjectPath;
135
+ /**
136
+ * Per-session explore history (CG-17). Lives here — not on ToolHandler —
137
+ * because the daemon shares one handler across every connected session; a
138
+ * reconnecting client starts clean.
139
+ */
140
+ exploreSession = new explore_session_state_1.ExploreSessionState();
137
141
  constructor(transport, engine, opts = {}) {
138
142
  this.transport = transport;
139
143
  this.engine = engine;
@@ -157,6 +161,14 @@ class MCPSession {
157
161
  getTransport() {
158
162
  return this.transport;
159
163
  }
164
+ /**
165
+ * This session's explore call history. Exposed so tests / diagnostics can
166
+ * inspect it; tool dispatch reaches it via the execute(sessionState) arg —
167
+ * never by reaching for another session's copy.
168
+ */
169
+ getExploreSessionState() {
170
+ return this.exploreSession;
171
+ }
160
172
  async handleMessage(message) {
161
173
  const isRequest = 'id' in message;
162
174
  switch (message.method) {
@@ -204,12 +216,6 @@ class MCPSession {
204
216
  async handleInitialize(request) {
205
217
  const params = request.params;
206
218
  this.clientSupportsRoots = !!params?.capabilities?.roots;
207
- if (params?.clientInfo) {
208
- this.clientInfo = {
209
- name: typeof params.clientInfo.name === 'string' ? params.clientInfo.name : undefined,
210
- version: typeof params.clientInfo.version === 'string' ? params.clientInfo.version : undefined,
211
- };
212
- }
213
219
  // Explicit project signal, strongest first: client-provided rootUri /
214
220
  // workspaceFolders (LSP-style), else the --path the server was launched
215
221
  // with. cwd is NOT used here — we defer it so a roots/list answer can
@@ -285,13 +291,10 @@ class MCPSession {
285
291
  await this.retryInitIfNeeded();
286
292
  if (process.env.HOMEGRAPH_MCP_DEBUG)
287
293
  process.stderr.write(`[mcp-debug] toolsCall ${toolName} id=${String(request.id)} dispatch\n`);
288
- const result = await this.engine.getToolHandler().execute(toolName, toolArgs);
294
+ const result = await this.engine.getToolHandler().execute(toolName, toolArgs, this.exploreSession);
289
295
  if (process.env.HOMEGRAPH_MCP_DEBUG)
290
296
  process.stderr.write(`[mcp-debug] toolsCall ${toolName} id=${String(request.id)} done\n`);
291
297
  this.transport.sendResult(request.id, result);
292
- // After the reply is on the wire — telemetry must never delay a tool
293
- // response (in-memory increment only; see src/telemetry).
294
- (0, telemetry_1.getTelemetry)().recordUsage('mcp_tool', toolName, !result.isError, this.clientInfo);
295
298
  }
296
299
  /**
297
300
  * Lazy default-project resolution. Three layers:
@@ -1 +1 @@
1
- {"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/mcp/session.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCH,wDAMC;AAxCD,2CAA6B;AAC7B,2CAAgG;AAEhG,mCAAgC;AAChC,+DAA+F;AAC/F,uCAAoD;AACpD,4CAAwD;AACxD,4CAAwD;AACxD,0DAA0D;AAE1D;;;GAGG;AACH,2EAA2E;AAC3E,4EAA4E;AAC/D,QAAA,WAAW,GAAG;IACzB,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,iCAAuB;CACjC,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,SAAgB,sBAAsB,CAAC,IAAY,EAAE,SAAwB,IAAA,8BAAe,GAAE;IAC5F,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IACzB,OAAO,CACL,GAAG,IAAI,YAAY,MAAM,mDAAmD;QAC5E,kFAAkF,CACnF,CAAC;AACJ,CAAC;AAED,uDAAuD;AAC1C,QAAA,gBAAgB,GAAG,YAAY,CAAC;AAE7C;;;GAGG;AACH,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAEnC;;;GAGG;AACH,SAAS,aAAa,CAAC,GAAW;IAChC,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;QACzB,IAAI,QAAQ,GAAG,kBAAkB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAChD,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;YAClE,QAAQ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pB,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,oFAAoF,CAAC,CAAC;YAC7G,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,GAAG,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YAC7D,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,8CAA8C,GAAG,mCAAmC,CAAC,CAAC;QAC7G,CAAC;QACD,MAAM,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAC9C,CAAC;CACF;AAvPD,gCAuPC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Never-initialized backstop for `serve --mcp` (#1185).
2
+ * Never-initialized backstop for `serve mcp` (#1185).
3
3
  *
4
4
  * Every real MCP host sends `initialize` immediately after spawning a server.
5
5
  * A server that has received NO bytes at all for many minutes is not serving
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Never-initialized backstop for `serve --mcp` (#1185).
3
+ * Never-initialized backstop for `serve mcp` (#1185).
4
4
  *
5
5
  * Every real MCP host sends `initialize` immediately after spawning a server.
6
6
  * A server that has received NO bytes at all for many minutes is not serving