cgraphx 1.4.3 → 2.0.0

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 (1309) hide show
  1. package/LICENSE +1 -1
  2. package/README.en.md +126 -0
  3. package/README.md +78 -196
  4. package/dist/.claude-template/.cgraphx/timeline-current-turn.json +1 -0
  5. package/dist/.claude-template/CLAUDE.md +10 -0
  6. package/dist/.claude-template/FLOW-MAP.md +107 -0
  7. package/dist/.claude-template/agents/knowledge-recall.md +11 -17
  8. package/dist/.claude-template/commands/my-query.md +1 -1
  9. package/dist/.claude-template/deprecated-assets.json +11 -0
  10. package/dist/.claude-template/hooks/precommit-check/precommit-check.cjs +27 -24
  11. package/dist/.claude-template/skills/.cgraphx/timeline-current-turn.json +1 -0
  12. package/dist/.claude-template/skills/cgraphx-guide/SKILL.md +22 -24
  13. package/dist/.claude-template/skills/cgraphx-guide/how-to-use.html +273 -156
  14. package/dist/.claude-template/skills/cgraphx-guide/how-to-use.md +148 -86
  15. package/dist/.claude-template/skills/clarify-requirements/SKILL.md +75 -384
  16. package/dist/.claude-template/skills/developer-timeline/SKILL.md +3 -2
  17. package/dist/.claude-template/skills/export-table-ddl/SKILL.md +3 -2
  18. package/dist/.claude-template/skills/handdrawn-deck/.cgraphx/timeline-current-turn.json +1 -0
  19. package/dist/.claude-template/skills/handdrawn-deck/SKILL.md +305 -0
  20. package/dist/.claude-template/skills/handdrawn-deck/references/.cgraphx/timeline-current-turn.json +1 -0
  21. package/dist/.claude-template/skills/handdrawn-deck/references/deck-template.html +469 -0
  22. package/dist/.claude-template/skills/handdrawn-deck/references/gen-script-md.cjs +44 -0
  23. package/dist/.claude-template/skills/handdrawn-deck/references/seg.cjs +54 -0
  24. package/dist/.claude-template/skills/handdrawn-sketch-engine/.cgraphx/timeline-current-turn.json +1 -0
  25. package/dist/.claude-template/skills/handdrawn-sketch-engine/SKILL.md +279 -0
  26. package/dist/.claude-template/skills/handdrawn-sketch-engine/assets/icon-library.js +238 -0
  27. package/dist/.claude-template/skills/handdrawn-sketch-engine/references/engine-template.html +275 -0
  28. package/dist/.claude-template/skills/handdrawn-sketch-engine/references/reference-render.html +445 -0
  29. package/dist/.claude-template/skills/implementation/SKILL.md +36 -130
  30. package/dist/.claude-template/skills/init-project-guides/SKILL.md +81 -0
  31. package/dist/.claude-template/skills/init-project-guides/templates/git-standards.md +37 -0
  32. package/dist/.claude-template/skills/init-project-guides/templates/go.md +160 -0
  33. package/dist/.claude-template/skills/init-project-guides/templates/java.md +173 -0
  34. package/dist/.claude-template/skills/init-project-guides/templates/schema-convention.md +11 -0
  35. package/dist/.claude-template/skills/init-project-guides/templates/typescript.md +156 -0
  36. package/dist/.claude-template/skills/knowledge-api/SKILL.md +143 -0
  37. package/dist/.claude-template/skills/knowledge-api/agent-prompt.md +51 -0
  38. package/dist/.claude-template/skills/knowledge-init/SKILL.md +761 -0
  39. package/dist/.claude-template/skills/knowledge-migrate/SKILL.md +173 -0
  40. package/dist/.claude-template/skills/knowledge-recall/SKILL.md +5 -4
  41. package/dist/.claude-template/skills/knowledge-write/SKILL.md +126 -0
  42. package/dist/.claude-template/skills/knowledge-write/template-concept.md +95 -0
  43. package/dist/.claude-template/skills/knowledge-write/template-flow.md +100 -0
  44. package/dist/.claude-template/skills/knowledge-write/template-guide.md +77 -0
  45. package/dist/.claude-template/skills/knowledge-write/template-memory.md +61 -0
  46. package/dist/.claude-template/skills/run-api-test/SKILL.md +6 -4
  47. package/dist/.claude-template/skills/run-api-test/assets/template-test-report.md +448 -55
  48. package/dist/.claude-template/skills/run-api-test/assets/template-test-verify.jsonl +5 -5
  49. package/dist/.claude-template/skills/run-api-test/references/report-format.md +54 -19
  50. package/dist/.claude-template/skills/subagent-implement/SKILL.md +60 -183
  51. package/dist/.claude-template/skills/subagent-implement/implementer-prompt.md +9 -4
  52. package/dist/.claude-template/skills/subagent-implement/quality-reviewer-prompt.md +1 -1
  53. package/dist/.claude-template/skills/subagent-implement/spec-reviewer-prompt.md +1 -0
  54. package/dist/.claude-template/skills/write-api/SKILL.md +7 -5
  55. package/dist/.claude-template/skills/write-api/assets/template-api-spec.md +2 -3
  56. package/dist/.claude-template/skills/write-api/assets/template-request.bru +21 -0
  57. package/dist/.claude-template/skills/write-api/references/ai-prompts.md +1 -2
  58. package/dist/.claude-template/skills/write-api/references/api-spec-format.md +0 -1
  59. package/dist/.claude-template/skills/write-api-doc/SKILL.md +8 -7
  60. package/dist/.claude-template/skills/write-design-doc/SKILL.md +86 -0
  61. package/dist/.claude-template/skills/write-design-doc/template-design-html.md +357 -0
  62. package/dist/.claude-template/skills/write-design-doc/template-design-md.md +164 -0
  63. package/dist/.claude-template/skills/write-plan/SKILL.md +94 -291
  64. package/dist/.claude-template/skills/write-plan/plan-document-reviewer-prompt.md +24 -6
  65. package/dist/.claude-template/skills/write-prd/SKILL.md +4 -2
  66. package/dist/.claude-template/skills/write-spec/SKILL.md +75 -282
  67. package/dist/.claude-template/skills/write-unit-test-code/SKILL.md +87 -2
  68. package/dist/.claude-template/skills/write-workload/SKILL.md +130 -0
  69. package/dist/cli/fatal-handler.d.ts +21 -0
  70. package/dist/cli/fatal-handler.d.ts.map +1 -0
  71. package/dist/cli/fatal-handler.js +109 -0
  72. package/dist/cli/fatal-handler.js.map +1 -0
  73. package/dist/cli/index.d.ts +27 -0
  74. package/dist/cli/index.d.ts.map +1 -0
  75. package/dist/cli/index.js +248 -0
  76. package/dist/cli/index.js.map +1 -0
  77. package/dist/cli/installer/claude-assets.d.ts +101 -0
  78. package/dist/cli/installer/claude-assets.d.ts.map +1 -0
  79. package/dist/cli/installer/claude-assets.js +321 -0
  80. package/dist/cli/installer/claude-assets.js.map +1 -0
  81. package/dist/cli/installer/index.d.ts +105 -0
  82. package/dist/cli/installer/index.d.ts.map +1 -0
  83. package/dist/cli/installer/index.js +548 -0
  84. package/dist/cli/installer/index.js.map +1 -0
  85. package/dist/cli/installer/targets/claude.d.ts +72 -0
  86. package/dist/cli/installer/targets/claude.d.ts.map +1 -0
  87. package/dist/cli/installer/targets/claude.js +580 -0
  88. package/dist/cli/installer/targets/claude.js.map +1 -0
  89. package/dist/cli/installer/targets/registry.d.ts +32 -0
  90. package/dist/cli/installer/targets/registry.d.ts.map +1 -0
  91. package/dist/cli/installer/targets/registry.js +72 -0
  92. package/dist/cli/installer/targets/registry.js.map +1 -0
  93. package/dist/cli/installer/targets/shared.d.ts +66 -0
  94. package/dist/cli/installer/targets/shared.d.ts.map +1 -0
  95. package/dist/cli/installer/targets/shared.js +228 -0
  96. package/dist/cli/installer/targets/shared.js.map +1 -0
  97. package/dist/cli/installer/targets/types.d.ts +97 -0
  98. package/dist/cli/installer/targets/types.d.ts.map +1 -0
  99. package/dist/cli/installer/targets/types.js +16 -0
  100. package/dist/cli/installer/targets/types.js.map +1 -0
  101. package/dist/cli/node-version-check.d.ts +32 -0
  102. package/dist/cli/node-version-check.d.ts.map +1 -0
  103. package/dist/cli/node-version-check.js +54 -0
  104. package/dist/cli/node-version-check.js.map +1 -0
  105. package/dist/cli/ui/glyphs.d.ts +43 -0
  106. package/dist/cli/ui/glyphs.d.ts.map +1 -0
  107. package/dist/cli/ui/glyphs.js +79 -0
  108. package/dist/cli/ui/glyphs.js.map +1 -0
  109. package/dist/cli/uninstall.d.ts +18 -0
  110. package/dist/cli/uninstall.d.ts.map +1 -0
  111. package/dist/cli/uninstall.js +19 -0
  112. package/dist/cli/uninstall.js.map +1 -0
  113. package/dist/cli/upgrade/index.d.ts +81 -0
  114. package/dist/cli/upgrade/index.d.ts.map +1 -0
  115. package/dist/cli/upgrade/index.js +257 -0
  116. package/dist/cli/upgrade/index.js.map +1 -0
  117. package/dist/core/db/index.d.ts +123 -0
  118. package/dist/core/db/index.d.ts.map +1 -0
  119. package/dist/core/db/index.js +260 -0
  120. package/dist/core/db/index.js.map +1 -0
  121. package/dist/core/db/migrate.d.ts +29 -0
  122. package/dist/core/db/migrate.d.ts.map +1 -0
  123. package/dist/core/db/migrate.js +100 -0
  124. package/dist/core/db/migrate.js.map +1 -0
  125. package/dist/core/db/sqlite-adapter.d.ts +51 -0
  126. package/dist/core/db/sqlite-adapter.d.ts.map +1 -0
  127. package/dist/core/db/sqlite-adapter.js +116 -0
  128. package/dist/core/db/sqlite-adapter.js.map +1 -0
  129. package/dist/core/dbquery/cli.d.ts +17 -0
  130. package/dist/core/dbquery/cli.d.ts.map +1 -0
  131. package/dist/core/dbquery/cli.js +246 -0
  132. package/dist/core/dbquery/cli.js.map +1 -0
  133. package/dist/core/dbquery/config.d.ts.map +1 -0
  134. package/dist/core/dbquery/config.js.map +1 -0
  135. package/dist/core/dbquery/constants.d.ts.map +1 -0
  136. package/dist/core/dbquery/constants.js.map +1 -0
  137. package/dist/core/dbquery/drivers/mysql.d.ts.map +1 -0
  138. package/dist/core/dbquery/drivers/mysql.js.map +1 -0
  139. package/dist/core/dbquery/drivers/postgres.d.ts.map +1 -0
  140. package/dist/core/dbquery/drivers/postgres.js.map +1 -0
  141. package/dist/core/dbquery/errors.d.ts +40 -0
  142. package/dist/core/dbquery/errors.d.ts.map +1 -0
  143. package/dist/core/dbquery/errors.js +85 -0
  144. package/dist/core/dbquery/errors.js.map +1 -0
  145. package/dist/core/dbquery/executor.d.ts.map +1 -0
  146. package/dist/core/dbquery/executor.js.map +1 -0
  147. package/dist/core/dbquery/format.d.ts.map +1 -0
  148. package/dist/core/dbquery/format.js.map +1 -0
  149. package/dist/core/dbquery/identifiers.d.ts.map +1 -0
  150. package/dist/core/dbquery/identifiers.js.map +1 -0
  151. package/dist/core/dbquery/index.d.ts.map +1 -0
  152. package/dist/core/dbquery/index.js.map +1 -0
  153. package/dist/core/dbquery/init.d.ts +33 -0
  154. package/dist/core/dbquery/init.d.ts.map +1 -0
  155. package/dist/core/dbquery/init.js +125 -0
  156. package/dist/core/dbquery/init.js.map +1 -0
  157. package/dist/core/dbquery/logging.d.ts.map +1 -0
  158. package/dist/core/dbquery/logging.js.map +1 -0
  159. package/dist/core/dbquery/queries.d.ts.map +1 -0
  160. package/dist/core/dbquery/queries.js.map +1 -0
  161. package/dist/core/dbquery/safety.d.ts.map +1 -0
  162. package/dist/core/dbquery/safety.js.map +1 -0
  163. package/dist/core/dbquery/types.d.ts +139 -0
  164. package/dist/core/dbquery/types.d.ts.map +1 -0
  165. package/dist/core/dbquery/types.js +10 -0
  166. package/dist/core/dbquery/types.js.map +1 -0
  167. package/dist/core/directory.d.ts +60 -0
  168. package/dist/core/directory.d.ts.map +1 -0
  169. package/dist/core/directory.js +243 -0
  170. package/dist/core/directory.js.map +1 -0
  171. package/dist/core/errors.d.ts +79 -0
  172. package/dist/core/errors.d.ts.map +1 -0
  173. package/dist/core/errors.js +133 -0
  174. package/dist/core/errors.js.map +1 -0
  175. package/dist/core/features/cli.d.ts +12 -0
  176. package/dist/core/features/cli.d.ts.map +1 -0
  177. package/dist/core/features/cli.js +154 -0
  178. package/dist/core/features/cli.js.map +1 -0
  179. package/dist/core/features/index.d.ts +15 -0
  180. package/dist/core/features/index.d.ts.map +1 -0
  181. package/dist/core/features/index.js +39 -0
  182. package/dist/core/features/index.js.map +1 -0
  183. package/dist/core/features/scanner.d.ts +26 -0
  184. package/dist/core/features/scanner.d.ts.map +1 -0
  185. package/dist/core/features/scanner.js +198 -0
  186. package/dist/core/features/scanner.js.map +1 -0
  187. package/dist/core/features/sync.d.ts +26 -0
  188. package/dist/core/features/sync.d.ts.map +1 -0
  189. package/dist/core/features/sync.js +108 -0
  190. package/dist/core/features/sync.js.map +1 -0
  191. package/dist/core/features/types.d.ts +35 -0
  192. package/dist/core/features/types.d.ts.map +1 -0
  193. package/dist/core/features/types.js +12 -0
  194. package/dist/core/features/types.js.map +1 -0
  195. package/dist/core/markdown/cli.d.ts +16 -0
  196. package/dist/core/markdown/cli.d.ts.map +1 -0
  197. package/dist/core/markdown/cli.js +575 -0
  198. package/dist/core/markdown/cli.js.map +1 -0
  199. package/dist/core/markdown/constants.d.ts +22 -0
  200. package/dist/core/markdown/constants.d.ts.map +1 -0
  201. package/dist/core/markdown/constants.js +61 -0
  202. package/dist/core/markdown/constants.js.map +1 -0
  203. package/dist/core/markdown/dedup.d.ts.map +1 -0
  204. package/dist/core/markdown/dedup.js.map +1 -0
  205. package/dist/core/markdown/errors.d.ts +22 -0
  206. package/dist/core/markdown/errors.d.ts.map +1 -0
  207. package/dist/core/markdown/errors.js +45 -0
  208. package/dist/core/markdown/errors.js.map +1 -0
  209. package/dist/core/markdown/extractor.d.ts.map +1 -0
  210. package/dist/core/markdown/extractor.js.map +1 -0
  211. package/dist/core/markdown/frontmatter-parser.d.ts +54 -0
  212. package/dist/core/markdown/frontmatter-parser.d.ts.map +1 -0
  213. package/dist/core/markdown/frontmatter-parser.js +229 -0
  214. package/dist/core/markdown/frontmatter-parser.js.map +1 -0
  215. package/dist/core/markdown/index.d.ts +21 -0
  216. package/dist/core/markdown/index.d.ts.map +1 -0
  217. package/dist/core/markdown/index.js +36 -0
  218. package/dist/core/markdown/index.js.map +1 -0
  219. package/dist/core/markdown/indexer.d.ts +34 -0
  220. package/dist/core/markdown/indexer.d.ts.map +1 -0
  221. package/dist/core/markdown/indexer.js +256 -0
  222. package/dist/core/markdown/indexer.js.map +1 -0
  223. package/dist/core/markdown/query-dedup.d.ts +23 -0
  224. package/dist/core/markdown/query-dedup.d.ts.map +1 -0
  225. package/dist/core/markdown/query-dedup.js +141 -0
  226. package/dist/core/markdown/query-dedup.js.map +1 -0
  227. package/dist/core/markdown/query-helpers.d.ts +66 -0
  228. package/dist/core/markdown/query-helpers.d.ts.map +1 -0
  229. package/dist/core/markdown/query-helpers.js +334 -0
  230. package/dist/core/markdown/query-helpers.js.map +1 -0
  231. package/dist/core/markdown/query.d.ts +125 -0
  232. package/dist/core/markdown/query.d.ts.map +1 -0
  233. package/dist/core/markdown/query.js +367 -0
  234. package/dist/core/markdown/query.js.map +1 -0
  235. package/dist/core/markdown/schema-bootstrap.d.ts +40 -0
  236. package/dist/core/markdown/schema-bootstrap.d.ts.map +1 -0
  237. package/dist/core/markdown/schema-bootstrap.js +85 -0
  238. package/dist/core/markdown/schema-bootstrap.js.map +1 -0
  239. package/dist/core/markdown/schema.sql +124 -0
  240. package/dist/core/markdown/store.d.ts.map +1 -0
  241. package/dist/core/markdown/store.js.map +1 -0
  242. package/dist/core/markdown/summary-extractor.d.ts.map +1 -0
  243. package/dist/core/markdown/summary-extractor.js.map +1 -0
  244. package/dist/core/markdown/types.d.ts +186 -0
  245. package/dist/core/markdown/types.d.ts.map +1 -0
  246. package/dist/core/markdown/types.js.map +1 -0
  247. package/dist/core/markdown/validator.d.ts +44 -0
  248. package/dist/core/markdown/validator.d.ts.map +1 -0
  249. package/dist/core/markdown/validator.js +95 -0
  250. package/dist/core/markdown/validator.js.map +1 -0
  251. package/dist/core/timeline/bash-semantics.d.ts.map +1 -0
  252. package/dist/core/timeline/bash-semantics.js.map +1 -0
  253. package/dist/core/timeline/cli.d.ts.map +1 -0
  254. package/dist/core/timeline/cli.js.map +1 -0
  255. package/dist/core/timeline/constants.d.ts +62 -0
  256. package/dist/core/timeline/constants.d.ts.map +1 -0
  257. package/dist/core/timeline/constants.js +73 -0
  258. package/dist/core/timeline/constants.js.map +1 -0
  259. package/dist/core/timeline/errors.d.ts.map +1 -0
  260. package/dist/core/timeline/errors.js.map +1 -0
  261. package/dist/core/timeline/hook-runner.d.ts.map +1 -0
  262. package/dist/core/timeline/hook-runner.js.map +1 -0
  263. package/dist/core/timeline/hooks.d.ts.map +1 -0
  264. package/dist/core/timeline/hooks.js.map +1 -0
  265. package/dist/core/timeline/index.d.ts.map +1 -0
  266. package/dist/core/timeline/index.js.map +1 -0
  267. package/dist/core/timeline/indexer.d.ts.map +1 -0
  268. package/dist/core/timeline/indexer.js.map +1 -0
  269. package/dist/core/timeline/installer.d.ts.map +1 -0
  270. package/dist/core/timeline/installer.js.map +1 -0
  271. package/dist/core/timeline/payload.d.ts.map +1 -0
  272. package/dist/core/timeline/payload.js.map +1 -0
  273. package/dist/core/timeline/post-tool-summary.d.ts.map +1 -0
  274. package/dist/core/timeline/post-tool-summary.js.map +1 -0
  275. package/dist/core/timeline/recorder.d.ts.map +1 -0
  276. package/dist/core/timeline/recorder.js.map +1 -0
  277. package/dist/core/timeline/schema-bootstrap.d.ts +42 -0
  278. package/dist/core/timeline/schema-bootstrap.d.ts.map +1 -0
  279. package/dist/core/timeline/schema-bootstrap.js +81 -0
  280. package/dist/core/timeline/schema-bootstrap.js.map +1 -0
  281. package/dist/core/timeline/store.d.ts.map +1 -0
  282. package/dist/core/timeline/store.js.map +1 -0
  283. package/dist/core/timeline/types.d.ts.map +1 -0
  284. package/dist/core/timeline/types.js.map +1 -0
  285. package/dist/core/types.d.ts +25 -0
  286. package/dist/core/types.d.ts.map +1 -0
  287. package/dist/core/types.js +12 -0
  288. package/dist/core/types.js.map +1 -0
  289. package/dist/web/bootstrap.d.ts +26 -0
  290. package/dist/web/bootstrap.d.ts.map +1 -0
  291. package/dist/web/bootstrap.js +98 -0
  292. package/dist/web/bootstrap.js.map +1 -0
  293. package/dist/web/constants.d.ts +27 -0
  294. package/dist/web/constants.d.ts.map +1 -0
  295. package/dist/web/constants.js +41 -0
  296. package/dist/web/constants.js.map +1 -0
  297. package/dist/web/errors.d.ts +46 -0
  298. package/dist/web/errors.d.ts.map +1 -0
  299. package/dist/web/errors.js +56 -0
  300. package/dist/web/errors.js.map +1 -0
  301. package/dist/web/index.d.ts +13 -0
  302. package/dist/web/index.d.ts.map +1 -0
  303. package/dist/web/index.js +20 -0
  304. package/dist/web/index.js.map +1 -0
  305. package/dist/web/layout.d.ts +31 -0
  306. package/dist/web/layout.d.ts.map +1 -0
  307. package/dist/web/layout.js +77 -0
  308. package/dist/web/layout.js.map +1 -0
  309. package/dist/web/markdown.d.ts +23 -0
  310. package/dist/web/markdown.d.ts.map +1 -0
  311. package/dist/web/markdown.js +38 -0
  312. package/dist/web/markdown.js.map +1 -0
  313. package/dist/web/overview-templates.d.ts +123 -0
  314. package/dist/web/overview-templates.d.ts.map +1 -0
  315. package/dist/web/overview-templates.js +213 -0
  316. package/dist/web/overview-templates.js.map +1 -0
  317. package/dist/web/pages-detail.d.ts +32 -0
  318. package/dist/web/pages-detail.d.ts.map +1 -0
  319. package/dist/web/pages-detail.js +275 -0
  320. package/dist/web/pages-detail.js.map +1 -0
  321. package/dist/web/pages-overview.d.ts +60 -0
  322. package/dist/web/pages-overview.d.ts.map +1 -0
  323. package/dist/web/pages-overview.js +304 -0
  324. package/dist/web/pages-overview.js.map +1 -0
  325. package/dist/web/public/app.css +1772 -0
  326. package/dist/web/public/app.js +41 -0
  327. package/dist/web/register.d.ts +12 -0
  328. package/dist/web/register.d.ts.map +1 -0
  329. package/dist/web/register.js +88 -0
  330. package/dist/web/register.js.map +1 -0
  331. package/dist/web/render-utils.d.ts +28 -0
  332. package/dist/web/render-utils.d.ts.map +1 -0
  333. package/dist/web/render-utils.js +54 -0
  334. package/dist/web/render-utils.js.map +1 -0
  335. package/dist/web/server.d.ts +42 -0
  336. package/dist/web/server.d.ts.map +1 -0
  337. package/dist/web/server.js +292 -0
  338. package/dist/web/server.js.map +1 -0
  339. package/package.json +14 -27
  340. package/scripts/copy-assets.cjs +89 -0
  341. package/dist/.claude-template/commands/my-commit.md +0 -9
  342. package/dist/.claude-template/skills/cgraphx/SKILL.md +0 -143
  343. package/dist/.claude-template/skills/cgraphx/agent-prompt.md +0 -56
  344. package/dist/.claude-template/skills/code-impact-api/SKILL.md +0 -143
  345. package/dist/.claude-template/skills/code-impact-api/agent-prompt.md +0 -51
  346. package/dist/.claude-template/skills/code-impact-docgen/SKILL.md +0 -376
  347. package/dist/.claude-template/skills/code-impact-docgen/template-design-html.md +0 -357
  348. package/dist/.claude-template/skills/code-impact-docgen/template-design-md.md +0 -164
  349. package/dist/.claude-template/skills/code-impact-init/SKILL.md +0 -803
  350. package/dist/.claude-template/skills/code-impact-markdown/SKILL.md +0 -353
  351. package/dist/.claude-template/skills/code-impact-markdown/template-guide.md +0 -68
  352. package/dist/.claude-template/skills/code-impact-markdown/template-memory.md +0 -82
  353. package/dist/.claude-template/skills/code-impact-markdown/template-runbook.md +0 -58
  354. package/dist/.claude-template/skills/precommit-review/SKILL.md +0 -50
  355. package/dist/api-test/ai-fields.d.ts +0 -37
  356. package/dist/api-test/ai-fields.d.ts.map +0 -1
  357. package/dist/api-test/ai-fields.js +0 -114
  358. package/dist/api-test/ai-fields.js.map +0 -1
  359. package/dist/api-test/assemble.d.ts +0 -76
  360. package/dist/api-test/assemble.d.ts.map +0 -1
  361. package/dist/api-test/assemble.js +0 -185
  362. package/dist/api-test/assemble.js.map +0 -1
  363. package/dist/api-test/bru-cli-invoker.d.ts +0 -72
  364. package/dist/api-test/bru-cli-invoker.d.ts.map +0 -1
  365. package/dist/api-test/bru-cli-invoker.js +0 -169
  366. package/dist/api-test/bru-cli-invoker.js.map +0 -1
  367. package/dist/api-test/bru-report-parser.d.ts +0 -24
  368. package/dist/api-test/bru-report-parser.d.ts.map +0 -1
  369. package/dist/api-test/bru-report-parser.js +0 -110
  370. package/dist/api-test/bru-report-parser.js.map +0 -1
  371. package/dist/api-test/bru-runner.d.ts +0 -101
  372. package/dist/api-test/bru-runner.d.ts.map +0 -1
  373. package/dist/api-test/bru-runner.js +0 -316
  374. package/dist/api-test/bru-runner.js.map +0 -1
  375. package/dist/api-test/bru-writer.d.ts +0 -52
  376. package/dist/api-test/bru-writer.d.ts.map +0 -1
  377. package/dist/api-test/bru-writer.js +0 -159
  378. package/dist/api-test/bru-writer.js.map +0 -1
  379. package/dist/api-test/call-chain-extractor.d.ts +0 -80
  380. package/dist/api-test/call-chain-extractor.d.ts.map +0 -1
  381. package/dist/api-test/call-chain-extractor.js +0 -179
  382. package/dist/api-test/call-chain-extractor.js.map +0 -1
  383. package/dist/api-test/cli.d.ts +0 -133
  384. package/dist/api-test/cli.d.ts.map +0 -1
  385. package/dist/api-test/cli.js +0 -1009
  386. package/dist/api-test/cli.js.map +0 -1
  387. package/dist/api-test/config.d.ts +0 -75
  388. package/dist/api-test/config.d.ts.map +0 -1
  389. package/dist/api-test/config.js +0 -406
  390. package/dist/api-test/config.js.map +0 -1
  391. package/dist/api-test/db-query-cli.d.ts +0 -51
  392. package/dist/api-test/db-query-cli.d.ts.map +0 -1
  393. package/dist/api-test/db-query-cli.js +0 -119
  394. package/dist/api-test/db-query-cli.js.map +0 -1
  395. package/dist/api-test/enhance-prepare.d.ts +0 -111
  396. package/dist/api-test/enhance-prepare.d.ts.map +0 -1
  397. package/dist/api-test/enhance-prepare.js +0 -425
  398. package/dist/api-test/enhance-prepare.js.map +0 -1
  399. package/dist/api-test/enhance-write.d.ts +0 -28
  400. package/dist/api-test/enhance-write.d.ts.map +0 -1
  401. package/dist/api-test/enhance-write.js +0 -145
  402. package/dist/api-test/enhance-write.js.map +0 -1
  403. package/dist/api-test/errors.d.ts +0 -48
  404. package/dist/api-test/errors.d.ts.map +0 -1
  405. package/dist/api-test/errors.js +0 -76
  406. package/dist/api-test/errors.js.map +0 -1
  407. package/dist/api-test/field-extractor.d.ts +0 -98
  408. package/dist/api-test/field-extractor.d.ts.map +0 -1
  409. package/dist/api-test/field-extractor.js +0 -327
  410. package/dist/api-test/field-extractor.js.map +0 -1
  411. package/dist/api-test/impl-finder.d.ts +0 -37
  412. package/dist/api-test/impl-finder.d.ts.map +0 -1
  413. package/dist/api-test/impl-finder.js +0 -54
  414. package/dist/api-test/impl-finder.js.map +0 -1
  415. package/dist/api-test/index.d.ts +0 -41
  416. package/dist/api-test/index.d.ts.map +0 -1
  417. package/dist/api-test/index.js +0 -124
  418. package/dist/api-test/index.js.map +0 -1
  419. package/dist/api-test/java-parser.d.ts +0 -89
  420. package/dist/api-test/java-parser.d.ts.map +0 -1
  421. package/dist/api-test/java-parser.js +0 -508
  422. package/dist/api-test/java-parser.js.map +0 -1
  423. package/dist/api-test/md-writer.d.ts +0 -49
  424. package/dist/api-test/md-writer.d.ts.map +0 -1
  425. package/dist/api-test/md-writer.js +0 -202
  426. package/dist/api-test/md-writer.js.map +0 -1
  427. package/dist/api-test/parser-httpservice.d.ts +0 -91
  428. package/dist/api-test/parser-httpservice.d.ts.map +0 -1
  429. package/dist/api-test/parser-httpservice.js +0 -271
  430. package/dist/api-test/parser-httpservice.js.map +0 -1
  431. package/dist/api-test/report.d.ts +0 -188
  432. package/dist/api-test/report.d.ts.map +0 -1
  433. package/dist/api-test/report.js +0 -522
  434. package/dist/api-test/report.js.map +0 -1
  435. package/dist/api-test/snapshot.d.ts +0 -26
  436. package/dist/api-test/snapshot.d.ts.map +0 -1
  437. package/dist/api-test/snapshot.js +0 -150
  438. package/dist/api-test/snapshot.js.map +0 -1
  439. package/dist/api-test/test-history.d.ts +0 -48
  440. package/dist/api-test/test-history.d.ts.map +0 -1
  441. package/dist/api-test/test-history.js +0 -122
  442. package/dist/api-test/test-history.js.map +0 -1
  443. package/dist/api-test/types.d.ts +0 -174
  444. package/dist/api-test/types.d.ts.map +0 -1
  445. package/dist/api-test/types.js +0 -13
  446. package/dist/api-test/types.js.map +0 -1
  447. package/dist/api-test/verify-prepare.d.ts +0 -30
  448. package/dist/api-test/verify-prepare.d.ts.map +0 -1
  449. package/dist/api-test/verify-prepare.js +0 -150
  450. package/dist/api-test/verify-prepare.js.map +0 -1
  451. package/dist/api-test/verify-write.d.ts +0 -31
  452. package/dist/api-test/verify-write.d.ts.map +0 -1
  453. package/dist/api-test/verify-write.js +0 -159
  454. package/dist/api-test/verify-write.js.map +0 -1
  455. package/dist/bin/codegraph.d.ts +0 -26
  456. package/dist/bin/codegraph.d.ts.map +0 -1
  457. package/dist/bin/codegraph.js +0 -1914
  458. package/dist/bin/codegraph.js.map +0 -1
  459. package/dist/bin/fatal-handler.d.ts +0 -20
  460. package/dist/bin/fatal-handler.d.ts.map +0 -1
  461. package/dist/bin/fatal-handler.js +0 -118
  462. package/dist/bin/fatal-handler.js.map +0 -1
  463. package/dist/bin/node-version-check.d.ts +0 -51
  464. package/dist/bin/node-version-check.d.ts.map +0 -1
  465. package/dist/bin/node-version-check.js +0 -114
  466. package/dist/bin/node-version-check.js.map +0 -1
  467. package/dist/bin/uninstall.d.ts +0 -14
  468. package/dist/bin/uninstall.d.ts.map +0 -1
  469. package/dist/bin/uninstall.js +0 -36
  470. package/dist/bin/uninstall.js.map +0 -1
  471. package/dist/context/formatter.d.ts +0 -30
  472. package/dist/context/formatter.d.ts.map +0 -1
  473. package/dist/context/formatter.js +0 -263
  474. package/dist/context/formatter.js.map +0 -1
  475. package/dist/context/index.d.ts +0 -119
  476. package/dist/context/index.d.ts.map +0 -1
  477. package/dist/context/index.js +0 -1296
  478. package/dist/context/index.js.map +0 -1
  479. package/dist/context/markers.d.ts +0 -19
  480. package/dist/context/markers.d.ts.map +0 -1
  481. package/dist/context/markers.js +0 -22
  482. package/dist/context/markers.js.map +0 -1
  483. package/dist/db/index.d.ts +0 -122
  484. package/dist/db/index.d.ts.map +0 -1
  485. package/dist/db/index.js +0 -296
  486. package/dist/db/index.js.map +0 -1
  487. package/dist/db/migrations.d.ts +0 -44
  488. package/dist/db/migrations.d.ts.map +0 -1
  489. package/dist/db/migrations.js +0 -140
  490. package/dist/db/migrations.js.map +0 -1
  491. package/dist/db/queries.d.ts +0 -401
  492. package/dist/db/queries.d.ts.map +0 -1
  493. package/dist/db/queries.js +0 -1591
  494. package/dist/db/queries.js.map +0 -1
  495. package/dist/db/schema.sql +0 -152
  496. package/dist/db/sqlite-adapter.d.ts +0 -53
  497. package/dist/db/sqlite-adapter.d.ts.map +0 -1
  498. package/dist/db/sqlite-adapter.js +0 -117
  499. package/dist/db/sqlite-adapter.js.map +0 -1
  500. package/dist/dbquery/cli.d.ts +0 -17
  501. package/dist/dbquery/cli.d.ts.map +0 -1
  502. package/dist/dbquery/cli.js +0 -246
  503. package/dist/dbquery/cli.js.map +0 -1
  504. package/dist/dbquery/config.d.ts.map +0 -1
  505. package/dist/dbquery/config.js.map +0 -1
  506. package/dist/dbquery/constants.d.ts.map +0 -1
  507. package/dist/dbquery/constants.js.map +0 -1
  508. package/dist/dbquery/drivers/mysql.d.ts.map +0 -1
  509. package/dist/dbquery/drivers/mysql.js.map +0 -1
  510. package/dist/dbquery/drivers/postgres.d.ts.map +0 -1
  511. package/dist/dbquery/drivers/postgres.js.map +0 -1
  512. package/dist/dbquery/dump-schema.d.ts +0 -46
  513. package/dist/dbquery/dump-schema.d.ts.map +0 -1
  514. package/dist/dbquery/dump-schema.js +0 -379
  515. package/dist/dbquery/dump-schema.js.map +0 -1
  516. package/dist/dbquery/errors.d.ts +0 -40
  517. package/dist/dbquery/errors.d.ts.map +0 -1
  518. package/dist/dbquery/errors.js +0 -85
  519. package/dist/dbquery/errors.js.map +0 -1
  520. package/dist/dbquery/executor.d.ts.map +0 -1
  521. package/dist/dbquery/executor.js.map +0 -1
  522. package/dist/dbquery/format.d.ts.map +0 -1
  523. package/dist/dbquery/format.js.map +0 -1
  524. package/dist/dbquery/identifiers.d.ts.map +0 -1
  525. package/dist/dbquery/identifiers.js.map +0 -1
  526. package/dist/dbquery/index.d.ts.map +0 -1
  527. package/dist/dbquery/index.js.map +0 -1
  528. package/dist/dbquery/init.d.ts +0 -33
  529. package/dist/dbquery/init.d.ts.map +0 -1
  530. package/dist/dbquery/init.js +0 -125
  531. package/dist/dbquery/init.js.map +0 -1
  532. package/dist/dbquery/logging.d.ts.map +0 -1
  533. package/dist/dbquery/logging.js.map +0 -1
  534. package/dist/dbquery/mcp-tools.d.ts +0 -29
  535. package/dist/dbquery/mcp-tools.d.ts.map +0 -1
  536. package/dist/dbquery/mcp-tools.js +0 -206
  537. package/dist/dbquery/mcp-tools.js.map +0 -1
  538. package/dist/dbquery/queries.d.ts.map +0 -1
  539. package/dist/dbquery/queries.js.map +0 -1
  540. package/dist/dbquery/safety.d.ts.map +0 -1
  541. package/dist/dbquery/safety.js.map +0 -1
  542. package/dist/dbquery/types.d.ts +0 -139
  543. package/dist/dbquery/types.d.ts.map +0 -1
  544. package/dist/dbquery/types.js +0 -10
  545. package/dist/dbquery/types.js.map +0 -1
  546. package/dist/directory.d.ts +0 -147
  547. package/dist/directory.d.ts.map +0 -1
  548. package/dist/directory.js +0 -523
  549. package/dist/directory.js.map +0 -1
  550. package/dist/errors.d.ts +0 -136
  551. package/dist/errors.d.ts.map +0 -1
  552. package/dist/errors.js +0 -219
  553. package/dist/errors.js.map +0 -1
  554. package/dist/extraction/astro-extractor.d.ts +0 -79
  555. package/dist/extraction/astro-extractor.d.ts.map +0 -1
  556. package/dist/extraction/astro-extractor.js +0 -320
  557. package/dist/extraction/astro-extractor.js.map +0 -1
  558. package/dist/extraction/dfm-extractor.d.ts +0 -31
  559. package/dist/extraction/dfm-extractor.d.ts.map +0 -1
  560. package/dist/extraction/dfm-extractor.js +0 -151
  561. package/dist/extraction/dfm-extractor.js.map +0 -1
  562. package/dist/extraction/extraction-version.d.ts +0 -25
  563. package/dist/extraction/extraction-version.d.ts.map +0 -1
  564. package/dist/extraction/extraction-version.js +0 -28
  565. package/dist/extraction/extraction-version.js.map +0 -1
  566. package/dist/extraction/function-ref.d.ts +0 -118
  567. package/dist/extraction/function-ref.d.ts.map +0 -1
  568. package/dist/extraction/function-ref.js +0 -727
  569. package/dist/extraction/function-ref.js.map +0 -1
  570. package/dist/extraction/generated-detection.d.ts +0 -30
  571. package/dist/extraction/generated-detection.d.ts.map +0 -1
  572. package/dist/extraction/generated-detection.js +0 -83
  573. package/dist/extraction/generated-detection.js.map +0 -1
  574. package/dist/extraction/grammars.d.ts +0 -114
  575. package/dist/extraction/grammars.d.ts.map +0 -1
  576. package/dist/extraction/grammars.js +0 -477
  577. package/dist/extraction/grammars.js.map +0 -1
  578. package/dist/extraction/index.d.ts +0 -175
  579. package/dist/extraction/index.d.ts.map +0 -1
  580. package/dist/extraction/index.js +0 -1887
  581. package/dist/extraction/index.js.map +0 -1
  582. package/dist/extraction/languages/c-cpp.d.ts +0 -12
  583. package/dist/extraction/languages/c-cpp.d.ts.map +0 -1
  584. package/dist/extraction/languages/c-cpp.js +0 -275
  585. package/dist/extraction/languages/c-cpp.js.map +0 -1
  586. package/dist/extraction/languages/csharp.d.ts +0 -25
  587. package/dist/extraction/languages/csharp.d.ts.map +0 -1
  588. package/dist/extraction/languages/csharp.js +0 -175
  589. package/dist/extraction/languages/csharp.js.map +0 -1
  590. package/dist/extraction/languages/dart.d.ts +0 -3
  591. package/dist/extraction/languages/dart.d.ts.map +0 -1
  592. package/dist/extraction/languages/dart.js +0 -374
  593. package/dist/extraction/languages/dart.js.map +0 -1
  594. package/dist/extraction/languages/go.d.ts +0 -3
  595. package/dist/extraction/languages/go.d.ts.map +0 -1
  596. package/dist/extraction/languages/go.js +0 -111
  597. package/dist/extraction/languages/go.js.map +0 -1
  598. package/dist/extraction/languages/index.d.ts +0 -10
  599. package/dist/extraction/languages/index.d.ts.map +0 -1
  600. package/dist/extraction/languages/index.js +0 -53
  601. package/dist/extraction/languages/index.js.map +0 -1
  602. package/dist/extraction/languages/java.d.ts +0 -3
  603. package/dist/extraction/languages/java.d.ts.map +0 -1
  604. package/dist/extraction/languages/java.js +0 -315
  605. package/dist/extraction/languages/java.js.map +0 -1
  606. package/dist/extraction/languages/javascript.d.ts +0 -3
  607. package/dist/extraction/languages/javascript.d.ts.map +0 -1
  608. package/dist/extraction/languages/javascript.js +0 -106
  609. package/dist/extraction/languages/javascript.js.map +0 -1
  610. package/dist/extraction/languages/kotlin.d.ts +0 -3
  611. package/dist/extraction/languages/kotlin.d.ts.map +0 -1
  612. package/dist/extraction/languages/kotlin.js +0 -379
  613. package/dist/extraction/languages/kotlin.js.map +0 -1
  614. package/dist/extraction/languages/lua.d.ts +0 -3
  615. package/dist/extraction/languages/lua.d.ts.map +0 -1
  616. package/dist/extraction/languages/lua.js +0 -150
  617. package/dist/extraction/languages/lua.js.map +0 -1
  618. package/dist/extraction/languages/luau.d.ts +0 -3
  619. package/dist/extraction/languages/luau.d.ts.map +0 -1
  620. package/dist/extraction/languages/luau.js +0 -37
  621. package/dist/extraction/languages/luau.js.map +0 -1
  622. package/dist/extraction/languages/objc.d.ts +0 -3
  623. package/dist/extraction/languages/objc.d.ts.map +0 -1
  624. package/dist/extraction/languages/objc.js +0 -175
  625. package/dist/extraction/languages/objc.js.map +0 -1
  626. package/dist/extraction/languages/pascal.d.ts +0 -3
  627. package/dist/extraction/languages/pascal.d.ts.map +0 -1
  628. package/dist/extraction/languages/pascal.js +0 -77
  629. package/dist/extraction/languages/pascal.js.map +0 -1
  630. package/dist/extraction/languages/php.d.ts +0 -3
  631. package/dist/extraction/languages/php.d.ts.map +0 -1
  632. package/dist/extraction/languages/php.js +0 -196
  633. package/dist/extraction/languages/php.js.map +0 -1
  634. package/dist/extraction/languages/python.d.ts +0 -3
  635. package/dist/extraction/languages/python.d.ts.map +0 -1
  636. package/dist/extraction/languages/python.js +0 -56
  637. package/dist/extraction/languages/python.js.map +0 -1
  638. package/dist/extraction/languages/r.d.ts +0 -3
  639. package/dist/extraction/languages/r.d.ts.map +0 -1
  640. package/dist/extraction/languages/r.js +0 -314
  641. package/dist/extraction/languages/r.js.map +0 -1
  642. package/dist/extraction/languages/ruby.d.ts +0 -3
  643. package/dist/extraction/languages/ruby.d.ts.map +0 -1
  644. package/dist/extraction/languages/ruby.js +0 -149
  645. package/dist/extraction/languages/ruby.js.map +0 -1
  646. package/dist/extraction/languages/rust.d.ts +0 -3
  647. package/dist/extraction/languages/rust.d.ts.map +0 -1
  648. package/dist/extraction/languages/rust.js +0 -142
  649. package/dist/extraction/languages/rust.js.map +0 -1
  650. package/dist/extraction/languages/scala.d.ts +0 -3
  651. package/dist/extraction/languages/scala.d.ts.map +0 -1
  652. package/dist/extraction/languages/scala.js +0 -209
  653. package/dist/extraction/languages/scala.js.map +0 -1
  654. package/dist/extraction/languages/swift.d.ts +0 -3
  655. package/dist/extraction/languages/swift.d.ts.map +0 -1
  656. package/dist/extraction/languages/swift.js +0 -152
  657. package/dist/extraction/languages/swift.js.map +0 -1
  658. package/dist/extraction/languages/typescript.d.ts +0 -16
  659. package/dist/extraction/languages/typescript.d.ts.map +0 -1
  660. package/dist/extraction/languages/typescript.js +0 -167
  661. package/dist/extraction/languages/typescript.js.map +0 -1
  662. package/dist/extraction/liquid-extractor.d.ts +0 -59
  663. package/dist/extraction/liquid-extractor.d.ts.map +0 -1
  664. package/dist/extraction/liquid-extractor.js +0 -357
  665. package/dist/extraction/liquid-extractor.js.map +0 -1
  666. package/dist/extraction/mybatis-extractor.d.ts +0 -48
  667. package/dist/extraction/mybatis-extractor.d.ts.map +0 -1
  668. package/dist/extraction/mybatis-extractor.js +0 -198
  669. package/dist/extraction/mybatis-extractor.js.map +0 -1
  670. package/dist/extraction/parse-worker.d.ts +0 -8
  671. package/dist/extraction/parse-worker.d.ts.map +0 -1
  672. package/dist/extraction/parse-worker.js +0 -97
  673. package/dist/extraction/parse-worker.js.map +0 -1
  674. package/dist/extraction/razor-extractor.d.ts +0 -42
  675. package/dist/extraction/razor-extractor.d.ts.map +0 -1
  676. package/dist/extraction/razor-extractor.js +0 -285
  677. package/dist/extraction/razor-extractor.js.map +0 -1
  678. package/dist/extraction/svelte-extractor.d.ts +0 -56
  679. package/dist/extraction/svelte-extractor.d.ts.map +0 -1
  680. package/dist/extraction/svelte-extractor.js +0 -275
  681. package/dist/extraction/svelte-extractor.js.map +0 -1
  682. package/dist/extraction/tree-sitter-helpers.d.ts +0 -28
  683. package/dist/extraction/tree-sitter-helpers.d.ts.map +0 -1
  684. package/dist/extraction/tree-sitter-helpers.js +0 -152
  685. package/dist/extraction/tree-sitter-helpers.js.map +0 -1
  686. package/dist/extraction/tree-sitter-types.d.ts +0 -239
  687. package/dist/extraction/tree-sitter-types.d.ts.map +0 -1
  688. package/dist/extraction/tree-sitter-types.js +0 -10
  689. package/dist/extraction/tree-sitter-types.js.map +0 -1
  690. package/dist/extraction/tree-sitter.d.ts +0 -647
  691. package/dist/extraction/tree-sitter.d.ts.map +0 -1
  692. package/dist/extraction/tree-sitter.js +0 -5592
  693. package/dist/extraction/tree-sitter.js.map +0 -1
  694. package/dist/extraction/vue-extractor.d.ts +0 -51
  695. package/dist/extraction/vue-extractor.d.ts.map +0 -1
  696. package/dist/extraction/vue-extractor.js +0 -254
  697. package/dist/extraction/vue-extractor.js.map +0 -1
  698. package/dist/extraction/wasm/tree-sitter-c_sharp.wasm +0 -0
  699. package/dist/extraction/wasm/tree-sitter-lua.wasm +0 -0
  700. package/dist/extraction/wasm/tree-sitter-luau.wasm +0 -0
  701. package/dist/extraction/wasm/tree-sitter-pascal.wasm +0 -0
  702. package/dist/extraction/wasm/tree-sitter-r.wasm +0 -0
  703. package/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
  704. package/dist/extraction/wasm-runtime-flags.d.ts +0 -38
  705. package/dist/extraction/wasm-runtime-flags.d.ts.map +0 -1
  706. package/dist/extraction/wasm-runtime-flags.js +0 -106
  707. package/dist/extraction/wasm-runtime-flags.js.map +0 -1
  708. package/dist/graph/index.d.ts +0 -8
  709. package/dist/graph/index.d.ts.map +0 -1
  710. package/dist/graph/index.js +0 -13
  711. package/dist/graph/index.js.map +0 -1
  712. package/dist/graph/queries.d.ts +0 -106
  713. package/dist/graph/queries.d.ts.map +0 -1
  714. package/dist/graph/queries.js +0 -339
  715. package/dist/graph/queries.js.map +0 -1
  716. package/dist/graph/traversal.d.ts +0 -127
  717. package/dist/graph/traversal.d.ts.map +0 -1
  718. package/dist/graph/traversal.js +0 -540
  719. package/dist/graph/traversal.js.map +0 -1
  720. package/dist/index.d.ts +0 -563
  721. package/dist/index.d.ts.map +0 -1
  722. package/dist/index.js +0 -1041
  723. package/dist/index.js.map +0 -1
  724. package/dist/installer/claude-assets.d.ts +0 -45
  725. package/dist/installer/claude-assets.d.ts.map +0 -1
  726. package/dist/installer/claude-assets.js +0 -144
  727. package/dist/installer/claude-assets.js.map +0 -1
  728. package/dist/installer/config-writer.d.ts +0 -28
  729. package/dist/installer/config-writer.d.ts.map +0 -1
  730. package/dist/installer/config-writer.js +0 -91
  731. package/dist/installer/config-writer.js.map +0 -1
  732. package/dist/installer/index.d.ts +0 -101
  733. package/dist/installer/index.d.ts.map +0 -1
  734. package/dist/installer/index.js +0 -692
  735. package/dist/installer/index.js.map +0 -1
  736. package/dist/installer/instructions-template.d.ts +0 -41
  737. package/dist/installer/instructions-template.d.ts.map +0 -1
  738. package/dist/installer/instructions-template.js +0 -53
  739. package/dist/installer/instructions-template.js.map +0 -1
  740. package/dist/installer/targets/antigravity.d.ts +0 -57
  741. package/dist/installer/targets/antigravity.d.ts.map +0 -1
  742. package/dist/installer/targets/antigravity.js +0 -308
  743. package/dist/installer/targets/antigravity.js.map +0 -1
  744. package/dist/installer/targets/claude.d.ts +0 -81
  745. package/dist/installer/targets/claude.d.ts.map +0 -1
  746. package/dist/installer/targets/claude.js +0 -617
  747. package/dist/installer/targets/claude.js.map +0 -1
  748. package/dist/installer/targets/codex.d.ts +0 -18
  749. package/dist/installer/targets/codex.d.ts.map +0 -1
  750. package/dist/installer/targets/codex.js +0 -185
  751. package/dist/installer/targets/codex.js.map +0 -1
  752. package/dist/installer/targets/cursor.d.ts +0 -35
  753. package/dist/installer/targets/cursor.d.ts.map +0 -1
  754. package/dist/installer/targets/cursor.js +0 -254
  755. package/dist/installer/targets/cursor.js.map +0 -1
  756. package/dist/installer/targets/gemini.d.ts +0 -26
  757. package/dist/installer/targets/gemini.d.ts.map +0 -1
  758. package/dist/installer/targets/gemini.js +0 -165
  759. package/dist/installer/targets/gemini.js.map +0 -1
  760. package/dist/installer/targets/hermes.d.ts +0 -18
  761. package/dist/installer/targets/hermes.d.ts.map +0 -1
  762. package/dist/installer/targets/hermes.js +0 -359
  763. package/dist/installer/targets/hermes.js.map +0 -1
  764. package/dist/installer/targets/kiro.d.ts +0 -27
  765. package/dist/installer/targets/kiro.d.ts.map +0 -1
  766. package/dist/installer/targets/kiro.js +0 -178
  767. package/dist/installer/targets/kiro.js.map +0 -1
  768. package/dist/installer/targets/opencode.d.ts +0 -38
  769. package/dist/installer/targets/opencode.d.ts.map +0 -1
  770. package/dist/installer/targets/opencode.js +0 -288
  771. package/dist/installer/targets/opencode.js.map +0 -1
  772. package/dist/installer/targets/registry.d.ts +0 -35
  773. package/dist/installer/targets/registry.d.ts.map +0 -1
  774. package/dist/installer/targets/registry.js +0 -91
  775. package/dist/installer/targets/registry.js.map +0 -1
  776. package/dist/installer/targets/shared.d.ts +0 -101
  777. package/dist/installer/targets/shared.d.ts.map +0 -1
  778. package/dist/installer/targets/shared.js +0 -264
  779. package/dist/installer/targets/shared.js.map +0 -1
  780. package/dist/installer/targets/toml.d.ts +0 -52
  781. package/dist/installer/targets/toml.d.ts.map +0 -1
  782. package/dist/installer/targets/toml.js +0 -147
  783. package/dist/installer/targets/toml.js.map +0 -1
  784. package/dist/installer/targets/types.d.ts +0 -108
  785. package/dist/installer/targets/types.d.ts.map +0 -1
  786. package/dist/installer/targets/types.js +0 -16
  787. package/dist/installer/targets/types.js.map +0 -1
  788. package/dist/markdown/cli.d.ts +0 -16
  789. package/dist/markdown/cli.d.ts.map +0 -1
  790. package/dist/markdown/cli.js +0 -575
  791. package/dist/markdown/cli.js.map +0 -1
  792. package/dist/markdown/constants.d.ts +0 -22
  793. package/dist/markdown/constants.d.ts.map +0 -1
  794. package/dist/markdown/constants.js +0 -71
  795. package/dist/markdown/constants.js.map +0 -1
  796. package/dist/markdown/dedup.d.ts.map +0 -1
  797. package/dist/markdown/dedup.js.map +0 -1
  798. package/dist/markdown/errors.d.ts +0 -22
  799. package/dist/markdown/errors.d.ts.map +0 -1
  800. package/dist/markdown/errors.js +0 -45
  801. package/dist/markdown/errors.js.map +0 -1
  802. package/dist/markdown/extractor.d.ts.map +0 -1
  803. package/dist/markdown/extractor.js.map +0 -1
  804. package/dist/markdown/frontmatter-parser.d.ts +0 -47
  805. package/dist/markdown/frontmatter-parser.d.ts.map +0 -1
  806. package/dist/markdown/frontmatter-parser.js +0 -199
  807. package/dist/markdown/frontmatter-parser.js.map +0 -1
  808. package/dist/markdown/indexer.d.ts +0 -34
  809. package/dist/markdown/indexer.d.ts.map +0 -1
  810. package/dist/markdown/indexer.js +0 -256
  811. package/dist/markdown/indexer.js.map +0 -1
  812. package/dist/markdown/mcp-tools.d.ts +0 -33
  813. package/dist/markdown/mcp-tools.d.ts.map +0 -1
  814. package/dist/markdown/mcp-tools.js +0 -300
  815. package/dist/markdown/mcp-tools.js.map +0 -1
  816. package/dist/markdown/query.d.ts +0 -108
  817. package/dist/markdown/query.d.ts.map +0 -1
  818. package/dist/markdown/query.js +0 -570
  819. package/dist/markdown/query.js.map +0 -1
  820. package/dist/markdown/schema-bootstrap.d.ts +0 -40
  821. package/dist/markdown/schema-bootstrap.d.ts.map +0 -1
  822. package/dist/markdown/schema-bootstrap.js +0 -85
  823. package/dist/markdown/schema-bootstrap.js.map +0 -1
  824. package/dist/markdown/schema.sql +0 -124
  825. package/dist/markdown/store.d.ts.map +0 -1
  826. package/dist/markdown/store.js.map +0 -1
  827. package/dist/markdown/summary-extractor.d.ts.map +0 -1
  828. package/dist/markdown/summary-extractor.js.map +0 -1
  829. package/dist/markdown/types.d.ts +0 -159
  830. package/dist/markdown/types.d.ts.map +0 -1
  831. package/dist/markdown/types.js.map +0 -1
  832. package/dist/markdown/validator.d.ts +0 -44
  833. package/dist/markdown/validator.d.ts.map +0 -1
  834. package/dist/markdown/validator.js +0 -95
  835. package/dist/markdown/validator.js.map +0 -1
  836. package/dist/mcp/daemon-manager.d.ts +0 -42
  837. package/dist/mcp/daemon-manager.d.ts.map +0 -1
  838. package/dist/mcp/daemon-manager.js +0 -129
  839. package/dist/mcp/daemon-manager.js.map +0 -1
  840. package/dist/mcp/daemon-paths.d.ts +0 -46
  841. package/dist/mcp/daemon-paths.d.ts.map +0 -1
  842. package/dist/mcp/daemon-paths.js +0 -125
  843. package/dist/mcp/daemon-paths.js.map +0 -1
  844. package/dist/mcp/daemon-registry.d.ts +0 -47
  845. package/dist/mcp/daemon-registry.d.ts.map +0 -1
  846. package/dist/mcp/daemon-registry.js +0 -229
  847. package/dist/mcp/daemon-registry.js.map +0 -1
  848. package/dist/mcp/daemon.d.ts +0 -220
  849. package/dist/mcp/daemon.d.ts.map +0 -1
  850. package/dist/mcp/daemon.js +0 -637
  851. package/dist/mcp/daemon.js.map +0 -1
  852. package/dist/mcp/dynamic-boundaries.d.ts +0 -41
  853. package/dist/mcp/dynamic-boundaries.d.ts.map +0 -1
  854. package/dist/mcp/dynamic-boundaries.js +0 -359
  855. package/dist/mcp/dynamic-boundaries.js.map +0 -1
  856. package/dist/mcp/engine.d.ts +0 -105
  857. package/dist/mcp/engine.d.ts.map +0 -1
  858. package/dist/mcp/engine.js +0 -278
  859. package/dist/mcp/engine.js.map +0 -1
  860. package/dist/mcp/index.d.ts +0 -113
  861. package/dist/mcp/index.d.ts.map +0 -1
  862. package/dist/mcp/index.js +0 -499
  863. package/dist/mcp/index.js.map +0 -1
  864. package/dist/mcp/liveness-watchdog.d.ts +0 -18
  865. package/dist/mcp/liveness-watchdog.d.ts.map +0 -1
  866. package/dist/mcp/liveness-watchdog.js +0 -207
  867. package/dist/mcp/liveness-watchdog.js.map +0 -1
  868. package/dist/mcp/ppid-watchdog.d.ts +0 -44
  869. package/dist/mcp/ppid-watchdog.d.ts.map +0 -1
  870. package/dist/mcp/ppid-watchdog.js +0 -27
  871. package/dist/mcp/ppid-watchdog.js.map +0 -1
  872. package/dist/mcp/proxy.d.ts +0 -87
  873. package/dist/mcp/proxy.d.ts.map +0 -1
  874. package/dist/mcp/proxy.js +0 -641
  875. package/dist/mcp/proxy.js.map +0 -1
  876. package/dist/mcp/server-instructions.d.ts +0 -34
  877. package/dist/mcp/server-instructions.d.ts.map +0 -1
  878. package/dist/mcp/server-instructions.js +0 -106
  879. package/dist/mcp/server-instructions.js.map +0 -1
  880. package/dist/mcp/session.d.ts +0 -79
  881. package/dist/mcp/session.d.ts.map +0 -1
  882. package/dist/mcp/session.js +0 -330
  883. package/dist/mcp/session.js.map +0 -1
  884. package/dist/mcp/stdin-teardown.d.ts +0 -27
  885. package/dist/mcp/stdin-teardown.d.ts.map +0 -1
  886. package/dist/mcp/stdin-teardown.js +0 -49
  887. package/dist/mcp/stdin-teardown.js.map +0 -1
  888. package/dist/mcp/tools.d.ts +0 -547
  889. package/dist/mcp/tools.d.ts.map +0 -1
  890. package/dist/mcp/tools.js +0 -4122
  891. package/dist/mcp/tools.js.map +0 -1
  892. package/dist/mcp/transport.d.ts +0 -188
  893. package/dist/mcp/transport.d.ts.map +0 -1
  894. package/dist/mcp/transport.js +0 -359
  895. package/dist/mcp/transport.js.map +0 -1
  896. package/dist/mcp/version.d.ts +0 -19
  897. package/dist/mcp/version.d.ts.map +0 -1
  898. package/dist/mcp/version.js +0 -71
  899. package/dist/mcp/version.js.map +0 -1
  900. package/dist/project-config.d.ts +0 -36
  901. package/dist/project-config.d.ts.map +0 -1
  902. package/dist/project-config.js +0 -235
  903. package/dist/project-config.js.map +0 -1
  904. package/dist/reasoning/config.d.ts +0 -45
  905. package/dist/reasoning/config.d.ts.map +0 -1
  906. package/dist/reasoning/config.js +0 -171
  907. package/dist/reasoning/config.js.map +0 -1
  908. package/dist/reasoning/credentials.d.ts +0 -5
  909. package/dist/reasoning/credentials.d.ts.map +0 -1
  910. package/dist/reasoning/credentials.js +0 -83
  911. package/dist/reasoning/credentials.js.map +0 -1
  912. package/dist/reasoning/login.d.ts +0 -21
  913. package/dist/reasoning/login.d.ts.map +0 -1
  914. package/dist/reasoning/login.js +0 -85
  915. package/dist/reasoning/login.js.map +0 -1
  916. package/dist/reasoning/reasoner.d.ts +0 -43
  917. package/dist/reasoning/reasoner.d.ts.map +0 -1
  918. package/dist/reasoning/reasoner.js +0 -308
  919. package/dist/reasoning/reasoner.js.map +0 -1
  920. package/dist/resolution/c-fnptr-synthesizer.d.ts +0 -33
  921. package/dist/resolution/c-fnptr-synthesizer.d.ts.map +0 -1
  922. package/dist/resolution/c-fnptr-synthesizer.js +0 -352
  923. package/dist/resolution/c-fnptr-synthesizer.js.map +0 -1
  924. package/dist/resolution/callback-synthesizer.d.ts +0 -15
  925. package/dist/resolution/callback-synthesizer.d.ts.map +0 -1
  926. package/dist/resolution/callback-synthesizer.js +0 -2926
  927. package/dist/resolution/callback-synthesizer.js.map +0 -1
  928. package/dist/resolution/frameworks/astro.d.ts +0 -9
  929. package/dist/resolution/frameworks/astro.d.ts.map +0 -1
  930. package/dist/resolution/frameworks/astro.js +0 -169
  931. package/dist/resolution/frameworks/astro.js.map +0 -1
  932. package/dist/resolution/frameworks/cargo-workspace.d.ts +0 -18
  933. package/dist/resolution/frameworks/cargo-workspace.d.ts.map +0 -1
  934. package/dist/resolution/frameworks/cargo-workspace.js +0 -225
  935. package/dist/resolution/frameworks/cargo-workspace.js.map +0 -1
  936. package/dist/resolution/frameworks/csharp.d.ts +0 -8
  937. package/dist/resolution/frameworks/csharp.d.ts.map +0 -1
  938. package/dist/resolution/frameworks/csharp.js +0 -241
  939. package/dist/resolution/frameworks/csharp.js.map +0 -1
  940. package/dist/resolution/frameworks/drupal.d.ts +0 -51
  941. package/dist/resolution/frameworks/drupal.d.ts.map +0 -1
  942. package/dist/resolution/frameworks/drupal.js +0 -367
  943. package/dist/resolution/frameworks/drupal.js.map +0 -1
  944. package/dist/resolution/frameworks/expo-modules.d.ts +0 -3
  945. package/dist/resolution/frameworks/expo-modules.d.ts.map +0 -1
  946. package/dist/resolution/frameworks/expo-modules.js +0 -148
  947. package/dist/resolution/frameworks/expo-modules.js.map +0 -1
  948. package/dist/resolution/frameworks/express.d.ts +0 -8
  949. package/dist/resolution/frameworks/express.d.ts.map +0 -1
  950. package/dist/resolution/frameworks/express.js +0 -308
  951. package/dist/resolution/frameworks/express.js.map +0 -1
  952. package/dist/resolution/frameworks/fabric.d.ts +0 -3
  953. package/dist/resolution/frameworks/fabric.d.ts.map +0 -1
  954. package/dist/resolution/frameworks/fabric.js +0 -354
  955. package/dist/resolution/frameworks/fabric.js.map +0 -1
  956. package/dist/resolution/frameworks/go.d.ts +0 -8
  957. package/dist/resolution/frameworks/go.d.ts.map +0 -1
  958. package/dist/resolution/frameworks/go.js +0 -161
  959. package/dist/resolution/frameworks/go.js.map +0 -1
  960. package/dist/resolution/frameworks/goframe.d.ts +0 -41
  961. package/dist/resolution/frameworks/goframe.d.ts.map +0 -1
  962. package/dist/resolution/frameworks/goframe.js +0 -112
  963. package/dist/resolution/frameworks/goframe.js.map +0 -1
  964. package/dist/resolution/frameworks/index.d.ts +0 -50
  965. package/dist/resolution/frameworks/index.d.ts.map +0 -1
  966. package/dist/resolution/frameworks/index.js +0 -169
  967. package/dist/resolution/frameworks/index.js.map +0 -1
  968. package/dist/resolution/frameworks/java.d.ts +0 -8
  969. package/dist/resolution/frameworks/java.d.ts.map +0 -1
  970. package/dist/resolution/frameworks/java.js +0 -509
  971. package/dist/resolution/frameworks/java.js.map +0 -1
  972. package/dist/resolution/frameworks/laravel.d.ts +0 -13
  973. package/dist/resolution/frameworks/laravel.d.ts.map +0 -1
  974. package/dist/resolution/frameworks/laravel.js +0 -257
  975. package/dist/resolution/frameworks/laravel.js.map +0 -1
  976. package/dist/resolution/frameworks/nestjs.d.ts +0 -26
  977. package/dist/resolution/frameworks/nestjs.d.ts.map +0 -1
  978. package/dist/resolution/frameworks/nestjs.js +0 -698
  979. package/dist/resolution/frameworks/nestjs.js.map +0 -1
  980. package/dist/resolution/frameworks/play.d.ts +0 -19
  981. package/dist/resolution/frameworks/play.d.ts.map +0 -1
  982. package/dist/resolution/frameworks/play.js +0 -111
  983. package/dist/resolution/frameworks/play.js.map +0 -1
  984. package/dist/resolution/frameworks/python.d.ts +0 -10
  985. package/dist/resolution/frameworks/python.d.ts.map +0 -1
  986. package/dist/resolution/frameworks/python.js +0 -400
  987. package/dist/resolution/frameworks/python.js.map +0 -1
  988. package/dist/resolution/frameworks/react-native.d.ts +0 -3
  989. package/dist/resolution/frameworks/react-native.d.ts.map +0 -1
  990. package/dist/resolution/frameworks/react-native.js +0 -410
  991. package/dist/resolution/frameworks/react-native.js.map +0 -1
  992. package/dist/resolution/frameworks/react.d.ts +0 -8
  993. package/dist/resolution/frameworks/react.d.ts.map +0 -1
  994. package/dist/resolution/frameworks/react.js +0 -334
  995. package/dist/resolution/frameworks/react.js.map +0 -1
  996. package/dist/resolution/frameworks/ruby.d.ts +0 -8
  997. package/dist/resolution/frameworks/ruby.d.ts.map +0 -1
  998. package/dist/resolution/frameworks/ruby.js +0 -302
  999. package/dist/resolution/frameworks/ruby.js.map +0 -1
  1000. package/dist/resolution/frameworks/rust.d.ts +0 -8
  1001. package/dist/resolution/frameworks/rust.d.ts.map +0 -1
  1002. package/dist/resolution/frameworks/rust.js +0 -304
  1003. package/dist/resolution/frameworks/rust.js.map +0 -1
  1004. package/dist/resolution/frameworks/svelte.d.ts +0 -9
  1005. package/dist/resolution/frameworks/svelte.d.ts.map +0 -1
  1006. package/dist/resolution/frameworks/svelte.js +0 -253
  1007. package/dist/resolution/frameworks/svelte.js.map +0 -1
  1008. package/dist/resolution/frameworks/swift-objc.d.ts +0 -37
  1009. package/dist/resolution/frameworks/swift-objc.d.ts.map +0 -1
  1010. package/dist/resolution/frameworks/swift-objc.js +0 -252
  1011. package/dist/resolution/frameworks/swift-objc.js.map +0 -1
  1012. package/dist/resolution/frameworks/swift.d.ts +0 -10
  1013. package/dist/resolution/frameworks/swift.d.ts.map +0 -1
  1014. package/dist/resolution/frameworks/swift.js +0 -400
  1015. package/dist/resolution/frameworks/swift.js.map +0 -1
  1016. package/dist/resolution/frameworks/vue.d.ts +0 -9
  1017. package/dist/resolution/frameworks/vue.d.ts.map +0 -1
  1018. package/dist/resolution/frameworks/vue.js +0 -303
  1019. package/dist/resolution/frameworks/vue.js.map +0 -1
  1020. package/dist/resolution/go-module.d.ts +0 -26
  1021. package/dist/resolution/go-module.d.ts.map +0 -1
  1022. package/dist/resolution/go-module.js +0 -78
  1023. package/dist/resolution/go-module.js.map +0 -1
  1024. package/dist/resolution/goframe-synthesizer.d.ts +0 -28
  1025. package/dist/resolution/goframe-synthesizer.d.ts.map +0 -1
  1026. package/dist/resolution/goframe-synthesizer.js +0 -158
  1027. package/dist/resolution/goframe-synthesizer.js.map +0 -1
  1028. package/dist/resolution/import-resolver.d.ts +0 -78
  1029. package/dist/resolution/import-resolver.d.ts.map +0 -1
  1030. package/dist/resolution/import-resolver.js +0 -1849
  1031. package/dist/resolution/import-resolver.js.map +0 -1
  1032. package/dist/resolution/index.d.ts +0 -196
  1033. package/dist/resolution/index.d.ts.map +0 -1
  1034. package/dist/resolution/index.js +0 -1341
  1035. package/dist/resolution/index.js.map +0 -1
  1036. package/dist/resolution/lru-cache.d.ts +0 -24
  1037. package/dist/resolution/lru-cache.d.ts.map +0 -1
  1038. package/dist/resolution/lru-cache.js +0 -62
  1039. package/dist/resolution/lru-cache.js.map +0 -1
  1040. package/dist/resolution/name-matcher.d.ts +0 -93
  1041. package/dist/resolution/name-matcher.d.ts.map +0 -1
  1042. package/dist/resolution/name-matcher.js +0 -1212
  1043. package/dist/resolution/name-matcher.js.map +0 -1
  1044. package/dist/resolution/path-aliases.d.ts +0 -68
  1045. package/dist/resolution/path-aliases.d.ts.map +0 -1
  1046. package/dist/resolution/path-aliases.js +0 -238
  1047. package/dist/resolution/path-aliases.js.map +0 -1
  1048. package/dist/resolution/scope-index.d.ts +0 -86
  1049. package/dist/resolution/scope-index.d.ts.map +0 -1
  1050. package/dist/resolution/scope-index.js +0 -143
  1051. package/dist/resolution/scope-index.js.map +0 -1
  1052. package/dist/resolution/stdlib-blocklist.d.ts +0 -53
  1053. package/dist/resolution/stdlib-blocklist.d.ts.map +0 -1
  1054. package/dist/resolution/stdlib-blocklist.js +0 -143
  1055. package/dist/resolution/stdlib-blocklist.js.map +0 -1
  1056. package/dist/resolution/strip-comments.d.ts +0 -27
  1057. package/dist/resolution/strip-comments.d.ts.map +0 -1
  1058. package/dist/resolution/strip-comments.js +0 -443
  1059. package/dist/resolution/strip-comments.js.map +0 -1
  1060. package/dist/resolution/swift-objc-bridge.d.ts +0 -134
  1061. package/dist/resolution/swift-objc-bridge.d.ts.map +0 -1
  1062. package/dist/resolution/swift-objc-bridge.js +0 -256
  1063. package/dist/resolution/swift-objc-bridge.js.map +0 -1
  1064. package/dist/resolution/types.d.ts +0 -233
  1065. package/dist/resolution/types.d.ts.map +0 -1
  1066. package/dist/resolution/types.js +0 -8
  1067. package/dist/resolution/types.js.map +0 -1
  1068. package/dist/resolution/workspace-packages.d.ts +0 -48
  1069. package/dist/resolution/workspace-packages.d.ts.map +0 -1
  1070. package/dist/resolution/workspace-packages.js +0 -208
  1071. package/dist/resolution/workspace-packages.js.map +0 -1
  1072. package/dist/search/ast-helpers.d.ts +0 -42
  1073. package/dist/search/ast-helpers.d.ts.map +0 -1
  1074. package/dist/search/ast-helpers.js +0 -106
  1075. package/dist/search/ast-helpers.js.map +0 -1
  1076. package/dist/search/call-sites.d.ts +0 -398
  1077. package/dist/search/call-sites.d.ts.map +0 -1
  1078. package/dist/search/call-sites.js +0 -1433
  1079. package/dist/search/call-sites.js.map +0 -1
  1080. package/dist/search/context.d.ts +0 -134
  1081. package/dist/search/context.d.ts.map +0 -1
  1082. package/dist/search/context.js +0 -575
  1083. package/dist/search/context.js.map +0 -1
  1084. package/dist/search/impact.d.ts +0 -139
  1085. package/dist/search/impact.d.ts.map +0 -1
  1086. package/dist/search/impact.js +0 -646
  1087. package/dist/search/impact.js.map +0 -1
  1088. package/dist/search/query-parser.d.ts +0 -57
  1089. package/dist/search/query-parser.d.ts.map +0 -1
  1090. package/dist/search/query-parser.js +0 -177
  1091. package/dist/search/query-parser.js.map +0 -1
  1092. package/dist/search/query-utils.d.ts +0 -87
  1093. package/dist/search/query-utils.d.ts.map +0 -1
  1094. package/dist/search/query-utils.js +0 -449
  1095. package/dist/search/query-utils.js.map +0 -1
  1096. package/dist/search/related.d.ts +0 -178
  1097. package/dist/search/related.d.ts.map +0 -1
  1098. package/dist/search/related.js +0 -667
  1099. package/dist/search/related.js.map +0 -1
  1100. package/dist/search/slice.d.ts +0 -148
  1101. package/dist/search/slice.d.ts.map +0 -1
  1102. package/dist/search/slice.js +0 -460
  1103. package/dist/search/slice.js.map +0 -1
  1104. package/dist/search/snr-constants.d.ts +0 -41
  1105. package/dist/search/snr-constants.d.ts.map +0 -1
  1106. package/dist/search/snr-constants.js +0 -44
  1107. package/dist/search/snr-constants.js.map +0 -1
  1108. package/dist/search/types.d.ts +0 -28
  1109. package/dist/search/types.d.ts.map +0 -1
  1110. package/dist/search/types.js +0 -12
  1111. package/dist/search/types.js.map +0 -1
  1112. package/dist/sync/git-hooks.d.ts +0 -45
  1113. package/dist/sync/git-hooks.d.ts.map +0 -1
  1114. package/dist/sync/git-hooks.js +0 -225
  1115. package/dist/sync/git-hooks.js.map +0 -1
  1116. package/dist/sync/index.d.ts +0 -19
  1117. package/dist/sync/index.d.ts.map +0 -1
  1118. package/dist/sync/index.js +0 -35
  1119. package/dist/sync/index.js.map +0 -1
  1120. package/dist/sync/watch-policy.d.ts +0 -48
  1121. package/dist/sync/watch-policy.d.ts.map +0 -1
  1122. package/dist/sync/watch-policy.js +0 -124
  1123. package/dist/sync/watch-policy.js.map +0 -1
  1124. package/dist/sync/watcher.d.ts +0 -350
  1125. package/dist/sync/watcher.d.ts.map +0 -1
  1126. package/dist/sync/watcher.js +0 -811
  1127. package/dist/sync/watcher.js.map +0 -1
  1128. package/dist/sync/worktree.d.ts +0 -54
  1129. package/dist/sync/worktree.d.ts.map +0 -1
  1130. package/dist/sync/worktree.js +0 -137
  1131. package/dist/sync/worktree.js.map +0 -1
  1132. package/dist/telemetry/index.d.ts +0 -143
  1133. package/dist/telemetry/index.d.ts.map +0 -1
  1134. package/dist/telemetry/index.js +0 -541
  1135. package/dist/telemetry/index.js.map +0 -1
  1136. package/dist/timeline/bash-semantics.d.ts.map +0 -1
  1137. package/dist/timeline/bash-semantics.js.map +0 -1
  1138. package/dist/timeline/cli.d.ts.map +0 -1
  1139. package/dist/timeline/cli.js.map +0 -1
  1140. package/dist/timeline/constants.d.ts +0 -62
  1141. package/dist/timeline/constants.d.ts.map +0 -1
  1142. package/dist/timeline/constants.js +0 -73
  1143. package/dist/timeline/constants.js.map +0 -1
  1144. package/dist/timeline/errors.d.ts.map +0 -1
  1145. package/dist/timeline/errors.js.map +0 -1
  1146. package/dist/timeline/hook-runner.d.ts.map +0 -1
  1147. package/dist/timeline/hook-runner.js.map +0 -1
  1148. package/dist/timeline/hooks.d.ts.map +0 -1
  1149. package/dist/timeline/hooks.js.map +0 -1
  1150. package/dist/timeline/index.d.ts.map +0 -1
  1151. package/dist/timeline/index.js.map +0 -1
  1152. package/dist/timeline/indexer.d.ts.map +0 -1
  1153. package/dist/timeline/indexer.js.map +0 -1
  1154. package/dist/timeline/installer.d.ts.map +0 -1
  1155. package/dist/timeline/installer.js.map +0 -1
  1156. package/dist/timeline/payload.d.ts.map +0 -1
  1157. package/dist/timeline/payload.js.map +0 -1
  1158. package/dist/timeline/post-tool-summary.d.ts.map +0 -1
  1159. package/dist/timeline/post-tool-summary.js.map +0 -1
  1160. package/dist/timeline/recorder.d.ts.map +0 -1
  1161. package/dist/timeline/recorder.js.map +0 -1
  1162. package/dist/timeline/schema-bootstrap.d.ts +0 -42
  1163. package/dist/timeline/schema-bootstrap.d.ts.map +0 -1
  1164. package/dist/timeline/schema-bootstrap.js +0 -81
  1165. package/dist/timeline/schema-bootstrap.js.map +0 -1
  1166. package/dist/timeline/store.d.ts.map +0 -1
  1167. package/dist/timeline/store.js.map +0 -1
  1168. package/dist/timeline/types.d.ts.map +0 -1
  1169. package/dist/timeline/types.js.map +0 -1
  1170. package/dist/types.d.ts +0 -392
  1171. package/dist/types.d.ts.map +0 -1
  1172. package/dist/types.js +0 -81
  1173. package/dist/types.js.map +0 -1
  1174. package/dist/ui/glyphs.d.ts +0 -42
  1175. package/dist/ui/glyphs.d.ts.map +0 -1
  1176. package/dist/ui/glyphs.js +0 -78
  1177. package/dist/ui/glyphs.js.map +0 -1
  1178. package/dist/ui/shimmer-progress.d.ts +0 -11
  1179. package/dist/ui/shimmer-progress.d.ts.map +0 -1
  1180. package/dist/ui/shimmer-progress.js +0 -90
  1181. package/dist/ui/shimmer-progress.js.map +0 -1
  1182. package/dist/ui/shimmer-worker.d.ts +0 -2
  1183. package/dist/ui/shimmer-worker.d.ts.map +0 -1
  1184. package/dist/ui/shimmer-worker.js +0 -118
  1185. package/dist/ui/shimmer-worker.js.map +0 -1
  1186. package/dist/ui/types.d.ts +0 -17
  1187. package/dist/ui/types.d.ts.map +0 -1
  1188. package/dist/ui/types.js +0 -3
  1189. package/dist/ui/types.js.map +0 -1
  1190. package/dist/upgrade/index.d.ts +0 -132
  1191. package/dist/upgrade/index.d.ts.map +0 -1
  1192. package/dist/upgrade/index.js +0 -498
  1193. package/dist/upgrade/index.js.map +0 -1
  1194. package/dist/utils.d.ts +0 -224
  1195. package/dist/utils.d.ts.map +0 -1
  1196. package/dist/utils.js +0 -583
  1197. package/dist/utils.js.map +0 -1
  1198. package/scripts/add-lang/bench.sh +0 -60
  1199. package/scripts/add-lang/check-grammar.mjs +0 -75
  1200. package/scripts/add-lang/dump-ast.mjs +0 -103
  1201. package/scripts/add-lang/verify-extraction.mjs +0 -70
  1202. package/scripts/agent-eval/ab-adoption.sh +0 -91
  1203. package/scripts/agent-eval/ab-hook.sh +0 -86
  1204. package/scripts/agent-eval/ab-impl.sh +0 -78
  1205. package/scripts/agent-eval/ab-new-vs-baseline.sh +0 -102
  1206. package/scripts/agent-eval/ab-sufficiency.sh +0 -78
  1207. package/scripts/agent-eval/arms-F.sh +0 -21
  1208. package/scripts/agent-eval/arms-matrix.sh +0 -37
  1209. package/scripts/agent-eval/audit.sh +0 -68
  1210. package/scripts/agent-eval/bench-readme.sh +0 -28
  1211. package/scripts/agent-eval/bench-why-repo.sh +0 -22
  1212. package/scripts/agent-eval/block-read-hook.sh +0 -19
  1213. package/scripts/agent-eval/hook-settings.json +0 -15
  1214. package/scripts/agent-eval/itrun.sh +0 -120
  1215. package/scripts/agent-eval/offload-eval-3arm.sh +0 -72
  1216. package/scripts/agent-eval/offload-eval-cost.mjs +0 -133
  1217. package/scripts/agent-eval/offload-eval-effort.mjs +0 -108
  1218. package/scripts/agent-eval/offload-eval-frontload-matrix.sh +0 -25
  1219. package/scripts/agent-eval/offload-eval-frontload.sh +0 -47
  1220. package/scripts/agent-eval/offload-eval-ground-truth.json +0 -18
  1221. package/scripts/agent-eval/offload-eval-hook.mjs +0 -84
  1222. package/scripts/agent-eval/offload-eval-judge.mjs +0 -103
  1223. package/scripts/agent-eval/offload-eval-matrix.sh +0 -20
  1224. package/scripts/agent-eval/offload-eval-metrics.mjs +0 -94
  1225. package/scripts/agent-eval/offload-eval-refs1.sh +0 -50
  1226. package/scripts/agent-eval/offload-eval-setup.sh +0 -24
  1227. package/scripts/agent-eval/offload-eval-styles.sh +0 -72
  1228. package/scripts/agent-eval/offload-eval-summarize.mjs +0 -68
  1229. package/scripts/agent-eval/offload-eval.md +0 -76
  1230. package/scripts/agent-eval/parse-arms.mjs +0 -116
  1231. package/scripts/agent-eval/parse-bench-readme.mjs +0 -84
  1232. package/scripts/agent-eval/parse-run.mjs +0 -45
  1233. package/scripts/agent-eval/parse-session.mjs +0 -93
  1234. package/scripts/agent-eval/probe-context.mjs +0 -21
  1235. package/scripts/agent-eval/probe-explore.mjs +0 -40
  1236. package/scripts/agent-eval/probe-node.mjs +0 -20
  1237. package/scripts/agent-eval/probe-sweep.mjs +0 -119
  1238. package/scripts/agent-eval/probe-trace.mjs +0 -20
  1239. package/scripts/agent-eval/redirect-read-hook.sh +0 -38
  1240. package/scripts/agent-eval/run-agent.sh +0 -34
  1241. package/scripts/agent-eval/run-all.sh +0 -69
  1242. package/scripts/agent-eval/run-arms.sh +0 -56
  1243. package/scripts/agent-eval/seq-matrix.mjs +0 -137
  1244. package/scripts/agent-eval/subagent-token-cost.py +0 -188
  1245. package/scripts/build-bundle.sh +0 -118
  1246. package/scripts/extract-release-notes.mjs +0 -130
  1247. package/scripts/local-install.sh +0 -41
  1248. package/scripts/npm-sdk.js +0 -75
  1249. package/scripts/npm-shim.js +0 -246
  1250. package/scripts/pack-npm.sh +0 -118
  1251. package/scripts/prepare-release.mjs +0 -270
  1252. /package/dist/{dbquery → core/dbquery}/config.d.ts +0 -0
  1253. /package/dist/{dbquery → core/dbquery}/config.js +0 -0
  1254. /package/dist/{dbquery → core/dbquery}/constants.d.ts +0 -0
  1255. /package/dist/{dbquery → core/dbquery}/constants.js +0 -0
  1256. /package/dist/{dbquery → core/dbquery}/drivers/mysql.d.ts +0 -0
  1257. /package/dist/{dbquery → core/dbquery}/drivers/mysql.js +0 -0
  1258. /package/dist/{dbquery → core/dbquery}/drivers/postgres.d.ts +0 -0
  1259. /package/dist/{dbquery → core/dbquery}/drivers/postgres.js +0 -0
  1260. /package/dist/{dbquery → core/dbquery}/executor.d.ts +0 -0
  1261. /package/dist/{dbquery → core/dbquery}/executor.js +0 -0
  1262. /package/dist/{dbquery → core/dbquery}/format.d.ts +0 -0
  1263. /package/dist/{dbquery → core/dbquery}/format.js +0 -0
  1264. /package/dist/{dbquery → core/dbquery}/identifiers.d.ts +0 -0
  1265. /package/dist/{dbquery → core/dbquery}/identifiers.js +0 -0
  1266. /package/dist/{dbquery → core/dbquery}/index.d.ts +0 -0
  1267. /package/dist/{dbquery → core/dbquery}/index.js +0 -0
  1268. /package/dist/{dbquery → core/dbquery}/logging.d.ts +0 -0
  1269. /package/dist/{dbquery → core/dbquery}/logging.js +0 -0
  1270. /package/dist/{dbquery → core/dbquery}/queries.d.ts +0 -0
  1271. /package/dist/{dbquery → core/dbquery}/queries.js +0 -0
  1272. /package/dist/{dbquery → core/dbquery}/safety.d.ts +0 -0
  1273. /package/dist/{dbquery → core/dbquery}/safety.js +0 -0
  1274. /package/dist/{markdown → core/markdown}/dedup.d.ts +0 -0
  1275. /package/dist/{markdown → core/markdown}/dedup.js +0 -0
  1276. /package/dist/{markdown → core/markdown}/extractor.d.ts +0 -0
  1277. /package/dist/{markdown → core/markdown}/extractor.js +0 -0
  1278. /package/dist/{markdown → core/markdown}/store.d.ts +0 -0
  1279. /package/dist/{markdown → core/markdown}/store.js +0 -0
  1280. /package/dist/{markdown → core/markdown}/summary-extractor.d.ts +0 -0
  1281. /package/dist/{markdown → core/markdown}/summary-extractor.js +0 -0
  1282. /package/dist/{markdown → core/markdown}/types.js +0 -0
  1283. /package/dist/{timeline → core/timeline}/bash-semantics.d.ts +0 -0
  1284. /package/dist/{timeline → core/timeline}/bash-semantics.js +0 -0
  1285. /package/dist/{timeline → core/timeline}/cli.d.ts +0 -0
  1286. /package/dist/{timeline → core/timeline}/cli.js +0 -0
  1287. /package/dist/{timeline → core/timeline}/errors.d.ts +0 -0
  1288. /package/dist/{timeline → core/timeline}/errors.js +0 -0
  1289. /package/dist/{timeline → core/timeline}/hook-runner.d.ts +0 -0
  1290. /package/dist/{timeline → core/timeline}/hook-runner.js +0 -0
  1291. /package/dist/{timeline → core/timeline}/hooks.d.ts +0 -0
  1292. /package/dist/{timeline → core/timeline}/hooks.js +0 -0
  1293. /package/dist/{timeline → core/timeline}/index.d.ts +0 -0
  1294. /package/dist/{timeline → core/timeline}/index.js +0 -0
  1295. /package/dist/{timeline → core/timeline}/indexer.d.ts +0 -0
  1296. /package/dist/{timeline → core/timeline}/indexer.js +0 -0
  1297. /package/dist/{timeline → core/timeline}/installer.d.ts +0 -0
  1298. /package/dist/{timeline → core/timeline}/installer.js +0 -0
  1299. /package/dist/{timeline → core/timeline}/payload.d.ts +0 -0
  1300. /package/dist/{timeline → core/timeline}/payload.js +0 -0
  1301. /package/dist/{timeline → core/timeline}/post-tool-summary.d.ts +0 -0
  1302. /package/dist/{timeline → core/timeline}/post-tool-summary.js +0 -0
  1303. /package/dist/{timeline → core/timeline}/recorder.d.ts +0 -0
  1304. /package/dist/{timeline → core/timeline}/recorder.js +0 -0
  1305. /package/dist/{timeline → core/timeline}/schema.sql +0 -0
  1306. /package/dist/{timeline → core/timeline}/store.d.ts +0 -0
  1307. /package/dist/{timeline → core/timeline}/store.js +0 -0
  1308. /package/dist/{timeline → core/timeline}/types.d.ts +0 -0
  1309. /package/dist/{timeline → core/timeline}/types.js +0 -0
package/dist/index.js DELETED
@@ -1,1041 +0,0 @@
1
- "use strict";
2
- /**
3
- * CodeGraph
4
- *
5
- * A local-first code intelligence system that builds a semantic
6
- * knowledge graph from any codebase.
7
- */
8
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
- if (k2 === undefined) k2 = k;
10
- var desc = Object.getOwnPropertyDescriptor(m, k);
11
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
- desc = { enumerable: true, get: function() { return m[k]; } };
13
- }
14
- Object.defineProperty(o, k2, desc);
15
- }) : (function(o, m, k, k2) {
16
- if (k2 === undefined) k2 = k;
17
- o[k2] = m[k];
18
- }));
19
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
20
- Object.defineProperty(o, "default", { enumerable: true, value: v });
21
- }) : function(o, v) {
22
- o["default"] = v;
23
- });
24
- var __importStar = (this && this.__importStar) || (function () {
25
- var ownKeys = function(o) {
26
- ownKeys = Object.getOwnPropertyNames || function (o) {
27
- var ar = [];
28
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
- return ar;
30
- };
31
- return ownKeys(o);
32
- };
33
- return function (mod) {
34
- if (mod && mod.__esModule) return mod;
35
- var result = {};
36
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
- __setModuleDefault(result, mod);
38
- return result;
39
- };
40
- })();
41
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
42
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
43
- };
44
- Object.defineProperty(exports, "__esModule", { value: true });
45
- exports.CodeGraph = exports.MCPServer = exports.LockUnavailableError = exports.FileWatcher = exports.MemoryMonitor = exports.throttle = exports.debounce = exports.processInBatches = exports.FileLock = exports.Mutex = exports.defaultLogger = exports.silentLogger = exports.getLogger = exports.setLogger = exports.ConfigError = exports.VectorError = exports.SearchError = exports.DatabaseError = exports.ParseError = exports.FileError = exports.CodeGraphError = exports.loadAllGrammars = exports.loadGrammarsForLanguages = exports.initGrammars = exports.getSupportedLanguages = exports.isGrammarLoaded = exports.isLanguageSupported = exports.detectLanguage = exports.CGRAPHX_DIR = exports.findNearestCodeGraphRoot = exports.isInitialized = exports.getCodeGraphDir = exports.QueryBuilder = exports.DatabaseConnection = exports.getDatabasePath = void 0;
46
- const path = __importStar(require("path"));
47
- const db_1 = require("./db");
48
- const queries_1 = require("./db/queries");
49
- const directory_1 = require("./directory");
50
- const extraction_1 = require("./extraction");
51
- const resolution_1 = require("./resolution");
52
- const graph_1 = require("./graph");
53
- const context_1 = require("./context");
54
- const utils_1 = require("./utils");
55
- const sync_1 = require("./sync");
56
- const extraction_version_1 = require("./extraction/extraction-version");
57
- const directory_2 = require("./directory");
58
- const query_utils_1 = require("./search/query-utils");
59
- const version_1 = require("./mcp/version");
60
- // Re-export types for consumers
61
- __exportStar(require("./types"), exports);
62
- // Storage building blocks for embedded/SDK consumers that drive the graph
63
- // directly (open a DB, run prepared queries) rather than through the CodeGraph
64
- // facade. Exposed from the package entry so they no longer require deep imports
65
- // into dist/ (issue #354).
66
- var db_2 = require("./db");
67
- Object.defineProperty(exports, "getDatabasePath", { enumerable: true, get: function () { return db_2.getDatabasePath; } });
68
- Object.defineProperty(exports, "DatabaseConnection", { enumerable: true, get: function () { return db_2.DatabaseConnection; } });
69
- var queries_2 = require("./db/queries");
70
- Object.defineProperty(exports, "QueryBuilder", { enumerable: true, get: function () { return queries_2.QueryBuilder; } });
71
- var directory_3 = require("./directory");
72
- Object.defineProperty(exports, "getCodeGraphDir", { enumerable: true, get: function () { return directory_3.getCodeGraphDir; } });
73
- Object.defineProperty(exports, "isInitialized", { enumerable: true, get: function () { return directory_3.isInitialized; } });
74
- Object.defineProperty(exports, "findNearestCodeGraphRoot", { enumerable: true, get: function () { return directory_3.findNearestCodeGraphRoot; } });
75
- Object.defineProperty(exports, "CGRAPHX_DIR", { enumerable: true, get: function () { return directory_3.CGRAPHX_DIR; } });
76
- var extraction_2 = require("./extraction");
77
- Object.defineProperty(exports, "detectLanguage", { enumerable: true, get: function () { return extraction_2.detectLanguage; } });
78
- Object.defineProperty(exports, "isLanguageSupported", { enumerable: true, get: function () { return extraction_2.isLanguageSupported; } });
79
- Object.defineProperty(exports, "isGrammarLoaded", { enumerable: true, get: function () { return extraction_2.isGrammarLoaded; } });
80
- Object.defineProperty(exports, "getSupportedLanguages", { enumerable: true, get: function () { return extraction_2.getSupportedLanguages; } });
81
- Object.defineProperty(exports, "initGrammars", { enumerable: true, get: function () { return extraction_2.initGrammars; } });
82
- Object.defineProperty(exports, "loadGrammarsForLanguages", { enumerable: true, get: function () { return extraction_2.loadGrammarsForLanguages; } });
83
- Object.defineProperty(exports, "loadAllGrammars", { enumerable: true, get: function () { return extraction_2.loadAllGrammars; } });
84
- var errors_1 = require("./errors");
85
- Object.defineProperty(exports, "CodeGraphError", { enumerable: true, get: function () { return errors_1.CodeGraphError; } });
86
- Object.defineProperty(exports, "FileError", { enumerable: true, get: function () { return errors_1.FileError; } });
87
- Object.defineProperty(exports, "ParseError", { enumerable: true, get: function () { return errors_1.ParseError; } });
88
- Object.defineProperty(exports, "DatabaseError", { enumerable: true, get: function () { return errors_1.DatabaseError; } });
89
- Object.defineProperty(exports, "SearchError", { enumerable: true, get: function () { return errors_1.SearchError; } });
90
- Object.defineProperty(exports, "VectorError", { enumerable: true, get: function () { return errors_1.VectorError; } });
91
- Object.defineProperty(exports, "ConfigError", { enumerable: true, get: function () { return errors_1.ConfigError; } });
92
- Object.defineProperty(exports, "setLogger", { enumerable: true, get: function () { return errors_1.setLogger; } });
93
- Object.defineProperty(exports, "getLogger", { enumerable: true, get: function () { return errors_1.getLogger; } });
94
- Object.defineProperty(exports, "silentLogger", { enumerable: true, get: function () { return errors_1.silentLogger; } });
95
- Object.defineProperty(exports, "defaultLogger", { enumerable: true, get: function () { return errors_1.defaultLogger; } });
96
- var utils_2 = require("./utils");
97
- Object.defineProperty(exports, "Mutex", { enumerable: true, get: function () { return utils_2.Mutex; } });
98
- Object.defineProperty(exports, "FileLock", { enumerable: true, get: function () { return utils_2.FileLock; } });
99
- Object.defineProperty(exports, "processInBatches", { enumerable: true, get: function () { return utils_2.processInBatches; } });
100
- Object.defineProperty(exports, "debounce", { enumerable: true, get: function () { return utils_2.debounce; } });
101
- Object.defineProperty(exports, "throttle", { enumerable: true, get: function () { return utils_2.throttle; } });
102
- Object.defineProperty(exports, "MemoryMonitor", { enumerable: true, get: function () { return utils_2.MemoryMonitor; } });
103
- var sync_2 = require("./sync");
104
- Object.defineProperty(exports, "FileWatcher", { enumerable: true, get: function () { return sync_2.FileWatcher; } });
105
- Object.defineProperty(exports, "LockUnavailableError", { enumerable: true, get: function () { return sync_2.LockUnavailableError; } });
106
- var mcp_1 = require("./mcp");
107
- Object.defineProperty(exports, "MCPServer", { enumerable: true, get: function () { return mcp_1.MCPServer; } });
108
- /**
109
- * Main CodeGraph class
110
- *
111
- * Provides the primary interface for interacting with the code knowledge graph.
112
- */
113
- class CodeGraph {
114
- db;
115
- queries;
116
- projectRoot;
117
- // Assigned via wireLayers() from the constructor (and again on reopen) — the
118
- // `!` tells TS these are definitely set even though the assignment is one
119
- // method call away from the constructor body.
120
- orchestrator;
121
- resolver;
122
- graphManager;
123
- traverser;
124
- contextBuilder;
125
- // Mutex for preventing concurrent indexing operations (in-process)
126
- indexMutex = new utils_1.Mutex();
127
- // File lock for preventing concurrent writes across processes (CLI, MCP, git hooks)
128
- fileLock;
129
- // File watcher for auto-sync on file changes
130
- watcher = null;
131
- constructor(db, queries, projectRoot) {
132
- this.db = db;
133
- this.queries = queries;
134
- this.projectRoot = projectRoot;
135
- this.fileLock = new utils_1.FileLock(path.join((0, directory_2.getCodeGraphDir)(projectRoot), 'cgraphx.lock'));
136
- this.wireLayers();
137
- }
138
- /**
139
- * (Re)build the query/extraction/graph layers over the current `this.queries`
140
- * (which wraps `this.db`). Factored out of the constructor so `reopenIfReplaced`
141
- * can rebuild them against a fresh connection without duplicating the wiring.
142
- * The path-based `fileLock` is independent of the DB handle, so it stays put.
143
- */
144
- wireLayers() {
145
- // Down-weight the project name as a query term in search ranking — it names
146
- // the whole repo, not a symbol, so it has no discriminative value (#720).
147
- try {
148
- this.queries.setProjectNameTokens((0, query_utils_1.deriveProjectNameTokens)(this.projectRoot));
149
- }
150
- catch {
151
- // Best-effort: ranking still works without it.
152
- }
153
- this.orchestrator = new extraction_1.ExtractionOrchestrator(this.projectRoot, this.queries);
154
- this.resolver = (0, resolution_1.createResolver)(this.projectRoot, this.queries);
155
- this.graphManager = new graph_1.GraphQueryManager(this.queries);
156
- this.traverser = new graph_1.GraphTraverser(this.queries);
157
- this.contextBuilder = (0, context_1.createContextBuilder)(this.projectRoot, this.queries, this.traverser);
158
- }
159
- /**
160
- * Heal a stale database handle in place. If `.cgraphx/` was removed and
161
- * recreated at the SAME path while this instance held the DB open — a git
162
- * worktree removed and re-added, or `rm -rf .cgraphx` + `cgraphx init` —
163
- * our open fd points at the now-unlinked inode and can never see the new
164
- * index, so every query returns the pre-removal snapshot until the process
165
- * restarts (#925). When that's detected, open the live file at the same path,
166
- * rebuild the query layers, and swap them IN PLACE, so every holder of this
167
- * instance (the MCP daemon's default project, cached projectPath connections)
168
- * heals without a restart. Returns true iff it reopened.
169
- *
170
- * POSIX-only in practice: `isReplacedOnDisk` never fires on Windows (an open
171
- * file can't be unlinked there, and st_ino is unreliable).
172
- */
173
- reopenIfReplaced() {
174
- if (!this.db.isReplacedOnDisk())
175
- return false;
176
- const dbPath = this.db.getPath();
177
- // Open the live file FIRST — if that throws (e.g. mid-recreate), the old
178
- // handle stays in place and the caller retries on the next query, rather
179
- // than leaving this instance with no connection at all.
180
- const fresh = db_1.DatabaseConnection.open(dbPath);
181
- const stale = this.db;
182
- this.db = fresh;
183
- this.queries = new queries_1.QueryBuilder(fresh.getDb());
184
- this.wireLayers();
185
- // Releasing the dead handle also frees the leaked db/-wal/-shm fds that were
186
- // pinning the unlinked inode (#925).
187
- try {
188
- stale.close();
189
- }
190
- catch { /* the old inode is gone; closing just frees fds */ }
191
- return true;
192
- }
193
- // ===========================================================================
194
- // Lifecycle Methods
195
- // ===========================================================================
196
- /**
197
- * Initialize a new CodeGraph project
198
- *
199
- * Creates the .CodeGraph directory, database, and configuration.
200
- *
201
- * @param projectRoot - Path to the project root directory
202
- * @param options - Initialization options
203
- * @returns A new CodeGraph instance
204
- */
205
- static async init(projectRoot, options = {}) {
206
- await (0, extraction_1.initGrammars)();
207
- const resolvedRoot = path.resolve(projectRoot);
208
- // Check if already initialized
209
- if ((0, directory_1.isInitialized)(resolvedRoot)) {
210
- throw new Error(`cgraphx already initialized in ${resolvedRoot}`);
211
- }
212
- // Create directory structure
213
- (0, directory_1.createDirectory)(resolvedRoot);
214
- // Initialize database
215
- const dbPath = (0, db_1.getDatabasePath)(resolvedRoot);
216
- const db = db_1.DatabaseConnection.initialize(dbPath);
217
- const queries = new queries_1.QueryBuilder(db.getDb());
218
- const instance = new CodeGraph(db, queries, resolvedRoot);
219
- // Run initial indexing if requested
220
- if (options.index) {
221
- await instance.indexAll({ onProgress: options.onProgress });
222
- }
223
- return instance;
224
- }
225
- /**
226
- * Initialize synchronously (without indexing)
227
- */
228
- static initSync(projectRoot) {
229
- const resolvedRoot = path.resolve(projectRoot);
230
- // Check if already initialized
231
- if ((0, directory_1.isInitialized)(resolvedRoot)) {
232
- throw new Error(`cgraphx already initialized in ${resolvedRoot}`);
233
- }
234
- // Create directory structure
235
- (0, directory_1.createDirectory)(resolvedRoot);
236
- // Initialize database
237
- const dbPath = (0, db_1.getDatabasePath)(resolvedRoot);
238
- const db = db_1.DatabaseConnection.initialize(dbPath);
239
- const queries = new queries_1.QueryBuilder(db.getDb());
240
- return new CodeGraph(db, queries, resolvedRoot);
241
- }
242
- /**
243
- * Open an existing CodeGraph project
244
- *
245
- * @param projectRoot - Path to the project root directory
246
- * @param options - Open options
247
- * @returns A CodeGraph instance
248
- */
249
- static async open(projectRoot, options = {}) {
250
- await (0, extraction_1.initGrammars)();
251
- const resolvedRoot = path.resolve(projectRoot);
252
- // Check if initialized
253
- if (!(0, directory_1.isInitialized)(resolvedRoot)) {
254
- throw new Error(`cgraphx not initialized in ${resolvedRoot}. Run init() first.`);
255
- }
256
- // Validate directory structure
257
- const validation = (0, directory_1.validateDirectory)(resolvedRoot);
258
- if (!validation.valid) {
259
- throw new Error(`Invalid cgraphx directory: ${validation.errors.join(', ')}`);
260
- }
261
- // Open database
262
- const dbPath = (0, db_1.getDatabasePath)(resolvedRoot);
263
- const db = db_1.DatabaseConnection.open(dbPath);
264
- const queries = new queries_1.QueryBuilder(db.getDb());
265
- const instance = new CodeGraph(db, queries, resolvedRoot);
266
- // Sync if requested
267
- if (options.sync) {
268
- await instance.sync();
269
- }
270
- return instance;
271
- }
272
- /**
273
- * Open synchronously (without sync)
274
- */
275
- static openSync(projectRoot) {
276
- const resolvedRoot = path.resolve(projectRoot);
277
- // Check if initialized
278
- if (!(0, directory_1.isInitialized)(resolvedRoot)) {
279
- throw new Error(`cgraphx not initialized in ${resolvedRoot}. Run init() first.`);
280
- }
281
- // Validate directory structure
282
- const validation = (0, directory_1.validateDirectory)(resolvedRoot);
283
- if (!validation.valid) {
284
- throw new Error(`Invalid cgraphx directory: ${validation.errors.join(', ')}`);
285
- }
286
- // Open database
287
- const dbPath = (0, db_1.getDatabasePath)(resolvedRoot);
288
- const db = db_1.DatabaseConnection.open(dbPath);
289
- const queries = new queries_1.QueryBuilder(db.getDb());
290
- return new CodeGraph(db, queries, resolvedRoot);
291
- }
292
- /**
293
- * Check if a directory has been initialized as a CodeGraph project
294
- */
295
- static isInitialized(projectRoot) {
296
- return (0, directory_1.isInitialized)(path.resolve(projectRoot));
297
- }
298
- /**
299
- * Close the CodeGraph instance and release resources
300
- */
301
- close() {
302
- this.unwatch();
303
- // Release file lock if held
304
- this.fileLock.release();
305
- this.db.close();
306
- }
307
- /**
308
- * Get the project root directory
309
- */
310
- getProjectRoot() {
311
- return this.projectRoot;
312
- }
313
- // ===========================================================================
314
- // Indexing
315
- // ===========================================================================
316
- /**
317
- * Index all files in the project
318
- *
319
- * Uses a mutex to prevent concurrent indexing operations.
320
- */
321
- async indexAll(options = {}) {
322
- return this.indexMutex.withLock(async () => {
323
- try {
324
- this.fileLock.acquire();
325
- }
326
- catch {
327
- return { success: false, filesIndexed: 0, filesSkipped: 0, filesErrored: 0, nodesCreated: 0, edgesCreated: 0, errors: [{ message: 'Could not acquire file lock - another process may be indexing', severity: 'error' }], durationMs: 0 };
328
- }
329
- try {
330
- const before = this.queries.getNodeAndEdgeCount();
331
- const result = await this.orchestrator.indexAll(options.onProgress, options.signal, options.verbose);
332
- // Re-detect frameworks now that the index is populated. The resolver
333
- // is constructed with createResolver() before any files exist, so
334
- // framework resolvers whose detect() consults the indexed file list
335
- // (e.g. UIKit/SwiftUI scanning for imports, swift-objc-bridge looking
336
- // for both Swift and ObjC files) all return false on that initial pass
337
- // and silently drop themselves. Re-initializing here gives them a
338
- // chance to see the actual project before resolution runs.
339
- if (result.success && result.filesIndexed > 0) {
340
- this.resolver.initialize();
341
- // Cross-file finalization (e.g. NestJS RouterModule prefixes). Runs
342
- // before resolution so updated names show up in subsequent reads.
343
- this.resolver.runPostExtract();
344
- }
345
- // Resolve references to create call/import/extends edges
346
- if (result.success && result.filesIndexed > 0) {
347
- // Get count without loading all refs into memory
348
- const unresolvedCount = this.queries.getUnresolvedReferencesCount();
349
- options.onProgress?.({
350
- phase: 'resolving',
351
- current: 0,
352
- total: unresolvedCount,
353
- });
354
- await this.resolveReferencesBatched((current, total) => {
355
- options.onProgress?.({
356
- phase: 'resolving',
357
- current,
358
- total,
359
- });
360
- });
361
- // Second pass: chained calls whose method lives on a supertype the
362
- // receiver conforms to (protocol-extension / inherited / default-
363
- // interface). Needs the implements/extends edges the main pass just
364
- // built, so it runs after resolution (#750).
365
- this.resolver.resolveChainedCallsViaConformance();
366
- // Same lifecycle for `this.<member>` callback registrations whose
367
- // member is inherited from a supertype (#808).
368
- this.resolver.resolveDeferredThisMemberRefs();
369
- }
370
- // Refresh planner stats + checkpoint the WAL after bulk writes.
371
- // Cheap and non-blocking; never load-bearing for correctness.
372
- if (result.success && result.filesIndexed > 0) {
373
- this.db.runMaintenance();
374
- }
375
- // The orchestrator only sees extraction-phase counts; resolution and
376
- // synthesizer edges (often >50% of the graph on JVM repos) come later.
377
- // Recompute against the DB so the CLI summary reports the true totals.
378
- if (result.success && result.filesIndexed > 0) {
379
- const after = this.queries.getNodeAndEdgeCount();
380
- result.nodesCreated = after.nodes - before.nodes;
381
- result.edgesCreated = after.edges - before.edges;
382
- }
383
- // Stamp the index with the engine that built it, so `cgraphx status`
384
- // and `cgraphx upgrade` can recommend a re-index when the running
385
- // engine produces richer extraction than the one on disk. Only on a
386
- // real full index — a sync touches a subset, so it must NOT advance the
387
- // extraction stamp (the bulk would still be stale). See extraction-version.ts.
388
- if (result.success && result.filesIndexed > 0) {
389
- try {
390
- this.queries.setMetadata('indexed_with_version', version_1.CodeGraphPackageVersion);
391
- this.queries.setMetadata('indexed_with_extraction_version', String(extraction_version_1.EXTRACTION_VERSION));
392
- }
393
- catch { /* metadata is advisory — never fail an index over it */ }
394
- }
395
- return result;
396
- }
397
- finally {
398
- this.fileLock.release();
399
- }
400
- });
401
- }
402
- /**
403
- * Index specific files
404
- *
405
- * Uses a mutex to prevent concurrent indexing operations.
406
- */
407
- async indexFiles(filePaths) {
408
- return this.indexMutex.withLock(async () => {
409
- try {
410
- this.fileLock.acquire();
411
- }
412
- catch {
413
- return { success: false, filesIndexed: 0, filesSkipped: 0, filesErrored: 0, nodesCreated: 0, edgesCreated: 0, errors: [{ message: 'Could not acquire file lock - another process may be indexing', severity: 'error' }], durationMs: 0 };
414
- }
415
- try {
416
- return this.orchestrator.indexFiles(filePaths);
417
- }
418
- finally {
419
- this.fileLock.release();
420
- }
421
- });
422
- }
423
- /**
424
- * Sync with current file state (incremental update)
425
- *
426
- * Uses a mutex to prevent concurrent indexing operations.
427
- */
428
- async sync(options = {}) {
429
- return this.indexMutex.withLock(async () => {
430
- try {
431
- this.fileLock.acquire();
432
- }
433
- catch {
434
- return { filesChecked: 0, filesAdded: 0, filesModified: 0, filesRemoved: 0, nodesUpdated: 0, durationMs: 0 };
435
- }
436
- try {
437
- const result = await this.orchestrator.sync(options.onProgress);
438
- // Cross-file finalization (e.g. NestJS RouterModule prefixes). Run on
439
- // every sync that touched files so edits to `app.module.ts` propagate
440
- // to controllers in unchanged files. The pass is idempotent and cheap
441
- // (regex over *.module.ts only).
442
- if (result.filesAdded > 0 || result.filesModified > 0) {
443
- this.resolver.runPostExtract();
444
- }
445
- // Resolve references if files were updated
446
- if (result.filesAdded > 0 || result.filesModified > 0) {
447
- if (result.changedFilePaths) {
448
- // Scope resolution to changed files (git fast path — bounded set)
449
- const unresolvedRefs = this.queries.getUnresolvedReferencesByFiles(result.changedFilePaths);
450
- options.onProgress?.({
451
- phase: 'resolving',
452
- current: 0,
453
- total: unresolvedRefs.length,
454
- });
455
- this.resolver.resolveAndPersist(unresolvedRefs, (current, total) => {
456
- options.onProgress?.({
457
- phase: 'resolving',
458
- current,
459
- total,
460
- });
461
- });
462
- }
463
- else {
464
- // No git info — use batched resolution to avoid OOM
465
- const unresolvedCount = this.queries.getUnresolvedReferencesCount();
466
- options.onProgress?.({
467
- phase: 'resolving',
468
- current: 0,
469
- total: unresolvedCount,
470
- });
471
- await this.resolveReferencesBatched((current, total) => {
472
- options.onProgress?.({
473
- phase: 'resolving',
474
- current,
475
- total,
476
- });
477
- });
478
- }
479
- // Second pass: chained calls whose method lives on a supertype the
480
- // receiver conforms to (protocol-extension / inherited). Needs the
481
- // implements/extends edges built above (#750).
482
- this.resolver.resolveChainedCallsViaConformance();
483
- // Same lifecycle for `this.<member>` callback registrations whose
484
- // member is inherited from a supertype (#808).
485
- this.resolver.resolveDeferredThisMemberRefs();
486
- }
487
- // Refresh planner stats + checkpoint the WAL after bulk writes.
488
- if (result.filesAdded > 0 || result.filesModified > 0 || result.filesRemoved > 0) {
489
- this.db.runMaintenance();
490
- }
491
- return result;
492
- }
493
- finally {
494
- this.fileLock.release();
495
- }
496
- });
497
- }
498
- /**
499
- * Check if an indexing operation is currently in progress
500
- */
501
- isIndexing() {
502
- return this.indexMutex.isLocked();
503
- }
504
- // ===========================================================================
505
- // File Watching
506
- // ===========================================================================
507
- /**
508
- * Start watching for file changes and auto-syncing.
509
- *
510
- * Uses native OS file events (FSEvents on macOS, inotify on Linux 19+,
511
- * ReadDirectoryChangesW on Windows) with debouncing to avoid thrashing.
512
- *
513
- * @param options - Watch options (debounce delay, callbacks)
514
- * @returns true if watching started successfully
515
- */
516
- watch(options = {}) {
517
- if (this.watcher?.isActive())
518
- return true;
519
- this.watcher = new sync_1.FileWatcher(this.projectRoot, async () => {
520
- const result = await this.sync();
521
- // sync() returns this exact zero-shape iff it failed to acquire the
522
- // file lock (a real empty sync always has filesChecked > 0 because
523
- // scanDirectory ran). Surface that to the watcher as a typed error
524
- // so it keeps pendingFiles + reschedules instead of clearing them
525
- // (#449).
526
- if (result.filesChecked === 0 && result.durationMs === 0) {
527
- throw new sync_1.LockUnavailableError();
528
- }
529
- const filesChanged = result.filesAdded + result.filesModified + result.filesRemoved;
530
- return { filesChanged, durationMs: result.durationMs };
531
- }, options);
532
- return this.watcher.start();
533
- }
534
- /**
535
- * Stop watching for file changes.
536
- */
537
- unwatch() {
538
- if (this.watcher) {
539
- this.watcher.stop();
540
- this.watcher = null;
541
- }
542
- }
543
- /**
544
- * Check if the file watcher is active.
545
- */
546
- isWatching() {
547
- return this.watcher?.isActive() ?? false;
548
- }
549
- /**
550
- * True once live watching has permanently degraded (OS watch-resource
551
- * exhaustion, or a write lock held past the retry budget) and auto-sync is
552
- * disabled until the next {@link watch} call. Distinct from `!isWatching()`:
553
- * a stopped/never-started watcher is inactive but NOT degraded. MCP tools use
554
- * this to surface a whole-index "results may be stale" notice, since
555
- * `getPendingFiles()` goes empty once watching stops (#876).
556
- */
557
- isWatcherDegraded() {
558
- return this.watcher?.isDegraded() ?? false;
559
- }
560
- /** The reason live watching degraded, or null if it is healthy (#876). */
561
- getWatcherDegradedReason() {
562
- return this.watcher?.getDegradedReason() ?? null;
563
- }
564
- /**
565
- * Files seen by the file watcher since the last successful sync —
566
- * the per-file "stale" signal MCP tools attach to responses so an agent
567
- * can fall back to {@link Read} for just the affected file without
568
- * waiting for a debounced sync to complete (issue #403).
569
- *
570
- * Returns an empty list when the watcher isn't active, or no events have
571
- * arrived. Each entry includes `firstSeenMs` and `lastSeenMs` (wall-clock
572
- * `Date.now()` values) so callers can render "edited Nms ago", plus an
573
- * `indexing` flag indicating whether the in-flight sync (if any) will
574
- * absorb that file.
575
- */
576
- getPendingFiles() {
577
- return this.watcher?.getPendingFiles() ?? [];
578
- }
579
- /**
580
- * Resolves once the file watcher has installed its watch set. Useful for
581
- * tests that need a deterministic boundary before asserting on
582
- * `getPendingFiles()`. Resolves immediately when no watcher is active.
583
- */
584
- waitUntilWatcherReady(timeoutMs) {
585
- return this.watcher ? this.watcher.waitUntilReady(timeoutMs) : Promise.resolve();
586
- }
587
- /**
588
- * Get files that have changed since last index
589
- */
590
- getChangedFiles() {
591
- return this.orchestrator.getChangedFiles();
592
- }
593
- /**
594
- * Most recent index timestamp (ms since epoch) across all tracked files, or
595
- * null when nothing is indexed yet. Lets library consumers check index
596
- * freshness without shelling out to `cgraphx status --json`. (#329)
597
- */
598
- getLastIndexedAt() {
599
- return this.queries.getLastIndexedAt();
600
- }
601
- /**
602
- * Which engine built the current index: the package version + extraction
603
- * version stamped at the last full `indexAll`. Either field is null for an
604
- * index built before stamping existed (treated as stale). See
605
- * `extraction-version.ts` and `isIndexStale()`.
606
- */
607
- getIndexBuildInfo() {
608
- const version = this.queries.getMetadata('indexed_with_version');
609
- const ev = this.queries.getMetadata('indexed_with_extraction_version');
610
- const parsed = ev != null ? parseInt(ev, 10) : NaN;
611
- return { version, extractionVersion: Number.isFinite(parsed) ? parsed : null };
612
- }
613
- /**
614
- * True when the on-disk index was built by an engine whose extraction is
615
- * older than the one now running — i.e. a re-index would add data a migration
616
- * can't backfill. False when there's no index yet (nothing to refresh) or the
617
- * stamp is current. This is the signal behind `cgraphx status`'s re-index
618
- * hint and `cgraphx upgrade`'s reminder.
619
- */
620
- isIndexStale() {
621
- if (this.queries.getLastIndexedAt() == null)
622
- return false;
623
- const { extractionVersion } = this.getIndexBuildInfo();
624
- return extractionVersion == null || extractionVersion < extraction_version_1.EXTRACTION_VERSION;
625
- }
626
- /**
627
- * Extract nodes and edges from source code (without storing)
628
- */
629
- extractFromSource(filePath, source) {
630
- return (0, extraction_1.extractFromSource)(filePath, source);
631
- }
632
- // ===========================================================================
633
- // Reference Resolution
634
- // ===========================================================================
635
- /**
636
- * Resolve unresolved references and create edges
637
- *
638
- * This method takes unresolved references from extraction and attempts
639
- * to resolve them using multiple strategies:
640
- * - Framework-specific patterns (React, Express, Laravel)
641
- * - Import-based resolution
642
- * - Name-based symbol matching
643
- */
644
- resolveReferences(onProgress) {
645
- // Get all unresolved references from the database
646
- const unresolvedRefs = this.queries.getUnresolvedReferences();
647
- return this.resolver.resolveAndPersist(unresolvedRefs, onProgress);
648
- }
649
- /**
650
- * Resolve references in batches to keep memory bounded on large codebases.
651
- * Processes chunks of unresolved refs, persisting results after each batch.
652
- */
653
- async resolveReferencesBatched(onProgress) {
654
- return this.resolver.resolveAndPersistBatched(onProgress);
655
- }
656
- /**
657
- * Get detected frameworks in the project
658
- */
659
- getDetectedFrameworks() {
660
- return this.resolver.getDetectedFrameworks();
661
- }
662
- /**
663
- * Re-initialize the resolver (useful after adding new files)
664
- */
665
- reinitializeResolver() {
666
- this.resolver.initialize();
667
- }
668
- // ===========================================================================
669
- // Graph Statistics
670
- // ===========================================================================
671
- /**
672
- * Get statistics about the knowledge graph
673
- */
674
- getStats() {
675
- const stats = this.queries.getStats();
676
- stats.dbSizeBytes = this.db.getSize();
677
- return stats;
678
- }
679
- /**
680
- * Active SQLite backend for this project's connection (`node-sqlite` — Node's
681
- * built-in real-SQLite module). Surfaced via `cgraphx status` and the
682
- * `codegraph_status` MCP tool alongside the effective journal mode.
683
- */
684
- getBackend() {
685
- return this.db.getBackend();
686
- }
687
- /**
688
- * The journal mode actually in effect ('wal', 'delete', …). 'wal' means
689
- * readers never block on a concurrent writer; anything else means they can,
690
- * which is the precondition for the "database is locked" failures in issue
691
- * #238. Surfaced via `codegraph status` and the `codegraph_status` MCP tool.
692
- */
693
- getJournalMode() {
694
- return this.db.getJournalMode();
695
- }
696
- // ===========================================================================
697
- // Node Operations
698
- // ===========================================================================
699
- /**
700
- * Get a node by ID
701
- */
702
- getNode(id) {
703
- return this.queries.getNodeById(id);
704
- }
705
- /**
706
- * Get all nodes in a file
707
- */
708
- getNodesInFile(filePath) {
709
- return this.queries.getNodesByFile(filePath);
710
- }
711
- /**
712
- * Get all nodes of a specific kind
713
- */
714
- getNodesByKind(kind) {
715
- return this.queries.getNodesByKind(kind);
716
- }
717
- /**
718
- * Get ALL nodes with an exact name (direct index lookup, not FTS-ranked/capped).
719
- * Used to enumerate every overload of a heavily-overloaded name so the specific
720
- * definition the caller wants is never dropped below a search cut.
721
- */
722
- getNodesByName(name) {
723
- return this.queries.getNodesByName(name);
724
- }
725
- /**
726
- * Search nodes by text
727
- */
728
- searchNodes(query, options) {
729
- return this.queries.searchNodes(query, options);
730
- }
731
- /**
732
- * Normalized project-name tokens (go.mod / package.json / repo dir) used to
733
- * down-weight the non-discriminative project name in search ranking (#720).
734
- * Exposed so explore can exclude it from the PascalCase type-disambiguation
735
- * bias, which would otherwise pull overloaded tokens toward whichever stack
736
- * embeds the project name.
737
- */
738
- getProjectNameTokens() {
739
- return this.queries.getProjectNameTokens();
740
- }
741
- /**
742
- * Find the project's "primary route file" — the file with the densest
743
- * concentration of framework-emitted `route` nodes (≥3 routes, ≥30%
744
- * of all non-test routes). Used to inline the routing config in
745
- * `codegraph_explore` responses on small realworld template repos
746
- * (rails-realworld, laravel-realworld, drupal-admintoolbar, …) where
747
- * Glob+Read of `routes.rb`/`urls.py`/etc. otherwise beats codegraph.
748
- */
749
- getTopRouteFile() {
750
- return this.queries.getTopRouteFile();
751
- }
752
- /**
753
- * Build a URL → handler routing manifest from the index. Each entry
754
- * pairs a route node (URL + method) with its handler function/method
755
- * via the `references` edge that framework resolvers emit. Returns
756
- * null when fewer than 3 valid (non-test) routes exist.
757
- */
758
- getRoutingManifest(limit) {
759
- return this.queries.getRoutingManifest(limit);
760
- }
761
- // ===========================================================================
762
- // Edge Operations
763
- // ===========================================================================
764
- /**
765
- * Get outgoing edges from a node
766
- */
767
- getOutgoingEdges(nodeId) {
768
- return this.queries.getOutgoingEdges(nodeId);
769
- }
770
- /**
771
- * Get incoming edges to a node
772
- */
773
- getIncomingEdges(nodeId) {
774
- return this.queries.getIncomingEdges(nodeId);
775
- }
776
- // ===========================================================================
777
- // File Operations
778
- // ===========================================================================
779
- /**
780
- * Get a file record by path
781
- */
782
- getFile(filePath) {
783
- return this.queries.getFileByPath(filePath);
784
- }
785
- /**
786
- * Get all tracked files
787
- */
788
- getFiles() {
789
- return this.queries.getAllFiles();
790
- }
791
- // ===========================================================================
792
- // Graph Query Methods
793
- // ===========================================================================
794
- /**
795
- * Get the context for a node (ancestors, children, references)
796
- *
797
- * Returns comprehensive context about a node including its containment
798
- * hierarchy, children, incoming/outgoing references, type information,
799
- * and relevant imports.
800
- *
801
- * @param nodeId - ID of the focal node
802
- * @returns Context object with all related information
803
- */
804
- getContext(nodeId) {
805
- return this.graphManager.getContext(nodeId);
806
- }
807
- /**
808
- * Traverse the graph from a starting node
809
- *
810
- * Uses breadth-first search by default. Supports filtering by edge types,
811
- * node types, and traversal direction.
812
- *
813
- * @param startId - Starting node ID
814
- * @param options - Traversal options
815
- * @returns Subgraph containing traversed nodes and edges
816
- */
817
- traverse(startId, options) {
818
- return this.traverser.traverseBFS(startId, options);
819
- }
820
- /**
821
- * Get the call graph for a function
822
- *
823
- * Returns both callers (functions that call this function) and
824
- * callees (functions called by this function) up to the specified depth.
825
- *
826
- * @param nodeId - ID of the function/method node
827
- * @param depth - Maximum depth in each direction (default: 2)
828
- * @returns Subgraph containing the call graph
829
- */
830
- getCallGraph(nodeId, depth = 2) {
831
- return this.traverser.getCallGraph(nodeId, depth);
832
- }
833
- /**
834
- * Get the type hierarchy for a class/interface
835
- *
836
- * Returns both ancestors (types this extends/implements) and
837
- * descendants (types that extend/implement this).
838
- *
839
- * @param nodeId - ID of the class/interface node
840
- * @returns Subgraph containing the type hierarchy
841
- */
842
- getTypeHierarchy(nodeId) {
843
- return this.traverser.getTypeHierarchy(nodeId);
844
- }
845
- /**
846
- * Find all usages of a symbol
847
- *
848
- * Returns all nodes that reference the specified symbol through
849
- * any edge type (calls, references, type_of, etc.).
850
- *
851
- * @param nodeId - ID of the symbol node
852
- * @returns Array of nodes and edges that reference this symbol
853
- */
854
- findUsages(nodeId) {
855
- return this.traverser.findUsages(nodeId);
856
- }
857
- /**
858
- * Get callers of a function/method
859
- *
860
- * @param nodeId - ID of the function/method node
861
- * @param maxDepth - Maximum depth to traverse (default: 1)
862
- * @returns Array of nodes that call this function
863
- */
864
- getCallers(nodeId, maxDepth = 1) {
865
- return this.traverser.getCallers(nodeId, maxDepth);
866
- }
867
- /**
868
- * Get callees of a function/method
869
- *
870
- * @param nodeId - ID of the function/method node
871
- * @param maxDepth - Maximum depth to traverse (default: 1)
872
- * @returns Array of nodes called by this function
873
- */
874
- getCallees(nodeId, maxDepth = 1) {
875
- return this.traverser.getCallees(nodeId, maxDepth);
876
- }
877
- /**
878
- * Calculate the impact radius of a node
879
- *
880
- * Returns all nodes that could be affected by changes to this node.
881
- *
882
- * @param nodeId - ID of the node
883
- * @param maxDepth - Maximum depth to traverse (default: 3)
884
- * @returns Subgraph containing potentially impacted nodes
885
- */
886
- getImpactRadius(nodeId, maxDepth = 3) {
887
- return this.traverser.getImpactRadius(nodeId, maxDepth);
888
- }
889
- /**
890
- * Find the shortest path between two nodes
891
- *
892
- * @param fromId - Starting node ID
893
- * @param toId - Target node ID
894
- * @param edgeKinds - Edge types to consider (all if empty)
895
- * @returns Array of nodes and edges forming the path, or null if no path exists
896
- */
897
- findPath(fromId, toId, edgeKinds) {
898
- return this.traverser.findPath(fromId, toId, edgeKinds);
899
- }
900
- /**
901
- * Get ancestors of a node in the containment hierarchy
902
- *
903
- * @param nodeId - ID of the node
904
- * @returns Array of ancestor nodes from immediate parent to root
905
- */
906
- getAncestors(nodeId) {
907
- return this.traverser.getAncestors(nodeId);
908
- }
909
- /**
910
- * Get immediate children of a node
911
- *
912
- * @param nodeId - ID of the node
913
- * @returns Array of child nodes
914
- */
915
- getChildren(nodeId) {
916
- return this.traverser.getChildren(nodeId);
917
- }
918
- /**
919
- * Get dependencies of a file
920
- *
921
- * @param filePath - Path to the file
922
- * @returns Array of file paths this file depends on
923
- */
924
- getFileDependencies(filePath) {
925
- return this.graphManager.getFileDependencies(filePath);
926
- }
927
- /**
928
- * Get dependents of a file
929
- *
930
- * @param filePath - Path to the file
931
- * @returns Array of file paths that depend on this file
932
- */
933
- getFileDependents(filePath) {
934
- return this.graphManager.getFileDependents(filePath);
935
- }
936
- /**
937
- * Find circular dependencies in the codebase
938
- *
939
- * @returns Array of cycles, each cycle is an array of file paths
940
- */
941
- findCircularDependencies() {
942
- return this.graphManager.findCircularDependencies();
943
- }
944
- /**
945
- * Find dead code (unreferenced symbols)
946
- *
947
- * @param kinds - Node kinds to check (default: functions, methods, classes)
948
- * @returns Array of unreferenced nodes
949
- */
950
- findDeadCode(kinds) {
951
- return this.graphManager.findDeadCode(kinds);
952
- }
953
- /**
954
- * Get complexity metrics for a node
955
- *
956
- * @param nodeId - ID of the node
957
- * @returns Object containing various complexity metrics
958
- */
959
- getNodeMetrics(nodeId) {
960
- return this.graphManager.getNodeMetrics(nodeId);
961
- }
962
- // ===========================================================================
963
- // Context Building
964
- // ===========================================================================
965
- /**
966
- * Get the source code for a node
967
- *
968
- * Reads the file and extracts the code between startLine and endLine.
969
- *
970
- * @param nodeId - ID of the node
971
- * @returns Code string or null if not found
972
- */
973
- async getCode(nodeId) {
974
- return this.contextBuilder.getCode(nodeId);
975
- }
976
- /**
977
- * Find relevant subgraph for a query
978
- *
979
- * Combines semantic search with graph traversal to find the most
980
- * relevant nodes and their relationships for a given query.
981
- *
982
- * @param query - Natural language query describing the task
983
- * @param options - Search and traversal options
984
- * @returns Subgraph of relevant nodes and edges
985
- */
986
- async findRelevantContext(query, options) {
987
- return this.contextBuilder.findRelevantContext(query, options);
988
- }
989
- /**
990
- * Build context for a task
991
- *
992
- * Creates comprehensive context by:
993
- * 1. Running FTS search to find entry points
994
- * 2. Expanding the graph around entry points
995
- * 3. Extracting code blocks for key nodes
996
- * 4. Formatting output for Claude
997
- *
998
- * @param input - Task description (string or {title, description})
999
- * @param options - Build options (maxNodes, includeCode, format, etc.)
1000
- * @returns TaskContext object or formatted string (markdown/JSON)
1001
- */
1002
- async buildContext(input, options) {
1003
- return this.contextBuilder.buildContext(input, options);
1004
- }
1005
- // ===========================================================================
1006
- // Database Management
1007
- // ===========================================================================
1008
- /**
1009
- * Optimize the database (vacuum and analyze)
1010
- */
1011
- optimize() {
1012
- this.db.optimize();
1013
- }
1014
- /**
1015
- * Clear all data from the graph
1016
- */
1017
- clear() {
1018
- this.queries.clear();
1019
- }
1020
- /**
1021
- * Alias for close() for backwards compatibility.
1022
- * @deprecated Use close() instead
1023
- */
1024
- destroy() {
1025
- this.close();
1026
- }
1027
- /**
1028
- * Completely remove CodeGraph from the project.
1029
- * This closes the database and deletes the .CodeGraph directory.
1030
- *
1031
- * WARNING: This permanently deletes all CodeGraph data for the project.
1032
- */
1033
- uninitialize() {
1034
- this.close();
1035
- (0, directory_1.removeDirectory)(this.projectRoot);
1036
- }
1037
- }
1038
- exports.CodeGraph = CodeGraph;
1039
- // Default export
1040
- exports.default = CodeGraph;
1041
- //# sourceMappingURL=index.js.map