codegraph-java 0.1.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 (866) hide show
  1. package/README.md +131 -0
  2. package/dist/base-graph/index.d.ts +57 -0
  3. package/dist/base-graph/index.d.ts.map +1 -0
  4. package/dist/base-graph/index.js +175 -0
  5. package/dist/base-graph/index.js.map +1 -0
  6. package/dist/bin/codegraph.d.ts +28 -0
  7. package/dist/bin/codegraph.d.ts.map +1 -0
  8. package/dist/bin/codegraph.js +2615 -0
  9. package/dist/bin/codegraph.js.map +1 -0
  10. package/dist/bin/command-supervision.d.ts +49 -0
  11. package/dist/bin/command-supervision.d.ts.map +1 -0
  12. package/dist/bin/command-supervision.js +95 -0
  13. package/dist/bin/command-supervision.js.map +1 -0
  14. package/dist/bin/fatal-handler.d.ts +20 -0
  15. package/dist/bin/fatal-handler.d.ts.map +1 -0
  16. package/dist/bin/fatal-handler.js +118 -0
  17. package/dist/bin/fatal-handler.js.map +1 -0
  18. package/dist/bin/node-version-check.d.ts +45 -0
  19. package/dist/bin/node-version-check.d.ts.map +1 -0
  20. package/dist/bin/node-version-check.js +98 -0
  21. package/dist/bin/node-version-check.js.map +1 -0
  22. package/dist/bin/uninstall.d.ts +14 -0
  23. package/dist/bin/uninstall.d.ts.map +1 -0
  24. package/dist/bin/uninstall.js +36 -0
  25. package/dist/bin/uninstall.js.map +1 -0
  26. package/dist/context/formatter.d.ts +36 -0
  27. package/dist/context/formatter.d.ts.map +1 -0
  28. package/dist/context/formatter.js +269 -0
  29. package/dist/context/formatter.js.map +1 -0
  30. package/dist/context/index.d.ts +131 -0
  31. package/dist/context/index.d.ts.map +1 -0
  32. package/dist/context/index.js +1378 -0
  33. package/dist/context/index.js.map +1 -0
  34. package/dist/context/markers.d.ts +19 -0
  35. package/dist/context/markers.d.ts.map +1 -0
  36. package/dist/context/markers.js +22 -0
  37. package/dist/context/markers.js.map +1 -0
  38. package/dist/db/index.d.ts +380 -0
  39. package/dist/db/index.d.ts.map +1 -0
  40. package/dist/db/index.js +854 -0
  41. package/dist/db/index.js.map +1 -0
  42. package/dist/db/migrations.d.ts +44 -0
  43. package/dist/db/migrations.d.ts.map +1 -0
  44. package/dist/db/migrations.js +255 -0
  45. package/dist/db/migrations.js.map +1 -0
  46. package/dist/db/queries.d.ts +1060 -0
  47. package/dist/db/queries.d.ts.map +1 -0
  48. package/dist/db/queries.js +3191 -0
  49. package/dist/db/queries.js.map +1 -0
  50. package/dist/db/schema.sql +209 -0
  51. package/dist/db/sqlite-adapter.d.ts +55 -0
  52. package/dist/db/sqlite-adapter.d.ts.map +1 -0
  53. package/dist/db/sqlite-adapter.js +135 -0
  54. package/dist/db/sqlite-adapter.js.map +1 -0
  55. package/dist/db/wal-valve.d.ts +119 -0
  56. package/dist/db/wal-valve.d.ts.map +1 -0
  57. package/dist/db/wal-valve.js +290 -0
  58. package/dist/db/wal-valve.js.map +1 -0
  59. package/dist/directory.d.ts +213 -0
  60. package/dist/directory.d.ts.map +1 -0
  61. package/dist/directory.js +781 -0
  62. package/dist/directory.js.map +1 -0
  63. package/dist/errors.d.ts +150 -0
  64. package/dist/errors.d.ts.map +1 -0
  65. package/dist/errors.js +234 -0
  66. package/dist/errors.js.map +1 -0
  67. package/dist/extraction/extraction-version.d.ts +25 -0
  68. package/dist/extraction/extraction-version.d.ts.map +1 -0
  69. package/dist/extraction/extraction-version.js +28 -0
  70. package/dist/extraction/extraction-version.js.map +1 -0
  71. package/dist/extraction/function-ref.d.ts +118 -0
  72. package/dist/extraction/function-ref.d.ts.map +1 -0
  73. package/dist/extraction/function-ref.js +746 -0
  74. package/dist/extraction/function-ref.js.map +1 -0
  75. package/dist/extraction/generated-detection.d.ts +66 -0
  76. package/dist/extraction/generated-detection.d.ts.map +1 -0
  77. package/dist/extraction/generated-detection.js +248 -0
  78. package/dist/extraction/generated-detection.js.map +1 -0
  79. package/dist/extraction/grammars.d.ts +148 -0
  80. package/dist/extraction/grammars.d.ts.map +1 -0
  81. package/dist/extraction/grammars.js +558 -0
  82. package/dist/extraction/grammars.js.map +1 -0
  83. package/dist/extraction/index.d.ts +367 -0
  84. package/dist/extraction/index.d.ts.map +1 -0
  85. package/dist/extraction/index.js +2833 -0
  86. package/dist/extraction/index.js.map +1 -0
  87. package/dist/extraction/kernel/decode.d.ts +9 -0
  88. package/dist/extraction/kernel/decode.d.ts.map +1 -0
  89. package/dist/extraction/kernel/decode.js +162 -0
  90. package/dist/extraction/kernel/decode.js.map +1 -0
  91. package/dist/extraction/kernel/index.d.ts +64 -0
  92. package/dist/extraction/kernel/index.d.ts.map +1 -0
  93. package/dist/extraction/kernel/index.js +204 -0
  94. package/dist/extraction/kernel/index.js.map +1 -0
  95. package/dist/extraction/kernel/layout.d.ts +101 -0
  96. package/dist/extraction/kernel/layout.d.ts.map +1 -0
  97. package/dist/extraction/kernel/layout.js +104 -0
  98. package/dist/extraction/kernel/layout.js.map +1 -0
  99. package/dist/extraction/kernel/loader.d.ts +103 -0
  100. package/dist/extraction/kernel/loader.d.ts.map +1 -0
  101. package/dist/extraction/kernel/loader.js +146 -0
  102. package/dist/extraction/kernel/loader.js.map +1 -0
  103. package/dist/extraction/languages/c-cpp.d.ts +124 -0
  104. package/dist/extraction/languages/c-cpp.d.ts.map +1 -0
  105. package/dist/extraction/languages/c-cpp.js +1689 -0
  106. package/dist/extraction/languages/c-cpp.js.map +1 -0
  107. package/dist/extraction/languages/index.d.ts +11 -0
  108. package/dist/extraction/languages/index.d.ts.map +1 -0
  109. package/dist/extraction/languages/index.js +15 -0
  110. package/dist/extraction/languages/index.js.map +1 -0
  111. package/dist/extraction/languages/java.d.ts +3 -0
  112. package/dist/extraction/languages/java.d.ts.map +1 -0
  113. package/dist/extraction/languages/java.js +315 -0
  114. package/dist/extraction/languages/java.js.map +1 -0
  115. package/dist/extraction/languages/rust.d.ts +23 -0
  116. package/dist/extraction/languages/rust.d.ts.map +1 -0
  117. package/dist/extraction/languages/rust.js +169 -0
  118. package/dist/extraction/languages/rust.js.map +1 -0
  119. package/dist/extraction/parse-pool.d.ts +167 -0
  120. package/dist/extraction/parse-pool.d.ts.map +1 -0
  121. package/dist/extraction/parse-pool.js +421 -0
  122. package/dist/extraction/parse-pool.js.map +1 -0
  123. package/dist/extraction/parse-worker.d.ts +8 -0
  124. package/dist/extraction/parse-worker.d.ts.map +1 -0
  125. package/dist/extraction/parse-worker.js +138 -0
  126. package/dist/extraction/parse-worker.js.map +1 -0
  127. package/dist/extraction/store-worker.d.ts +24 -0
  128. package/dist/extraction/store-worker.d.ts.map +1 -0
  129. package/dist/extraction/store-worker.js +139 -0
  130. package/dist/extraction/store-worker.js.map +1 -0
  131. package/dist/extraction/store-writer.d.ts +63 -0
  132. package/dist/extraction/store-writer.d.ts.map +1 -0
  133. package/dist/extraction/store-writer.js +174 -0
  134. package/dist/extraction/store-writer.js.map +1 -0
  135. package/dist/extraction/syntax-tokens.d.ts +103 -0
  136. package/dist/extraction/syntax-tokens.d.ts.map +1 -0
  137. package/dist/extraction/syntax-tokens.js +381 -0
  138. package/dist/extraction/syntax-tokens.js.map +1 -0
  139. package/dist/extraction/tree-sitter-helpers.d.ts +28 -0
  140. package/dist/extraction/tree-sitter-helpers.d.ts.map +1 -0
  141. package/dist/extraction/tree-sitter-helpers.js +153 -0
  142. package/dist/extraction/tree-sitter-helpers.js.map +1 -0
  143. package/dist/extraction/tree-sitter-types.d.ts +260 -0
  144. package/dist/extraction/tree-sitter-types.d.ts.map +1 -0
  145. package/dist/extraction/tree-sitter-types.js +10 -0
  146. package/dist/extraction/tree-sitter-types.js.map +1 -0
  147. package/dist/extraction/tree-sitter.d.ts +745 -0
  148. package/dist/extraction/tree-sitter.d.ts.map +1 -0
  149. package/dist/extraction/tree-sitter.js +6725 -0
  150. package/dist/extraction/tree-sitter.js.map +1 -0
  151. package/dist/extraction/wasm/tree-sitter-java.wasm +0 -0
  152. package/dist/extraction/wasm-runtime-flags.d.ts +53 -0
  153. package/dist/extraction/wasm-runtime-flags.d.ts.map +1 -0
  154. package/dist/extraction/wasm-runtime-flags.js +130 -0
  155. package/dist/extraction/wasm-runtime-flags.js.map +1 -0
  156. package/dist/graph/branch-guards.d.ts +248 -0
  157. package/dist/graph/branch-guards.d.ts.map +1 -0
  158. package/dist/graph/branch-guards.js +2231 -0
  159. package/dist/graph/branch-guards.js.map +1 -0
  160. package/dist/graph/dead-code.d.ts +251 -0
  161. package/dist/graph/dead-code.d.ts.map +1 -0
  162. package/dist/graph/dead-code.js +756 -0
  163. package/dist/graph/dead-code.js.map +1 -0
  164. package/dist/graph/dynamic-boundary-report.d.ts +121 -0
  165. package/dist/graph/dynamic-boundary-report.d.ts.map +1 -0
  166. package/dist/graph/dynamic-boundary-report.js +283 -0
  167. package/dist/graph/dynamic-boundary-report.js.map +1 -0
  168. package/dist/graph/index.d.ts +12 -0
  169. package/dist/graph/index.d.ts.map +1 -0
  170. package/dist/graph/index.js +28 -0
  171. package/dist/graph/index.js.map +1 -0
  172. package/dist/graph/named-symbol-flow.d.ts +153 -0
  173. package/dist/graph/named-symbol-flow.d.ts.map +1 -0
  174. package/dist/graph/named-symbol-flow.js +609 -0
  175. package/dist/graph/named-symbol-flow.js.map +1 -0
  176. package/dist/graph/queries.d.ts +106 -0
  177. package/dist/graph/queries.d.ts.map +1 -0
  178. package/dist/graph/queries.js +341 -0
  179. package/dist/graph/queries.js.map +1 -0
  180. package/dist/graph/traversal.d.ts +127 -0
  181. package/dist/graph/traversal.d.ts.map +1 -0
  182. package/dist/graph/traversal.js +599 -0
  183. package/dist/graph/traversal.js.map +1 -0
  184. package/dist/graph/type-hierarchy.d.ts +155 -0
  185. package/dist/graph/type-hierarchy.d.ts.map +1 -0
  186. package/dist/graph/type-hierarchy.js +382 -0
  187. package/dist/graph/type-hierarchy.js.map +1 -0
  188. package/dist/index.d.ts +886 -0
  189. package/dist/index.d.ts.map +1 -0
  190. package/dist/index.js +2019 -0
  191. package/dist/index.js.map +1 -0
  192. package/dist/installer/beta-signup.d.ts +54 -0
  193. package/dist/installer/beta-signup.d.ts.map +1 -0
  194. package/dist/installer/beta-signup.js +178 -0
  195. package/dist/installer/beta-signup.js.map +1 -0
  196. package/dist/installer/config-writer.d.ts +28 -0
  197. package/dist/installer/config-writer.d.ts.map +1 -0
  198. package/dist/installer/config-writer.js +91 -0
  199. package/dist/installer/config-writer.js.map +1 -0
  200. package/dist/installer/index.d.ts +143 -0
  201. package/dist/installer/index.d.ts.map +1 -0
  202. package/dist/installer/index.js +632 -0
  203. package/dist/installer/index.js.map +1 -0
  204. package/dist/installer/instructions-template.d.ts +41 -0
  205. package/dist/installer/instructions-template.d.ts.map +1 -0
  206. package/dist/installer/instructions-template.js +53 -0
  207. package/dist/installer/instructions-template.js.map +1 -0
  208. package/dist/installer/targets/antigravity.d.ts +57 -0
  209. package/dist/installer/targets/antigravity.d.ts.map +1 -0
  210. package/dist/installer/targets/antigravity.js +308 -0
  211. package/dist/installer/targets/antigravity.js.map +1 -0
  212. package/dist/installer/targets/claude.d.ts +62 -0
  213. package/dist/installer/targets/claude.d.ts.map +1 -0
  214. package/dist/installer/targets/claude.js +486 -0
  215. package/dist/installer/targets/claude.js.map +1 -0
  216. package/dist/installer/targets/codex.d.ts +32 -0
  217. package/dist/installer/targets/codex.d.ts.map +1 -0
  218. package/dist/installer/targets/codex.js +202 -0
  219. package/dist/installer/targets/codex.js.map +1 -0
  220. package/dist/installer/targets/copilot-cli.d.ts +32 -0
  221. package/dist/installer/targets/copilot-cli.d.ts.map +1 -0
  222. package/dist/installer/targets/copilot-cli.js +209 -0
  223. package/dist/installer/targets/copilot-cli.js.map +1 -0
  224. package/dist/installer/targets/copilot-jetbrains.d.ts +42 -0
  225. package/dist/installer/targets/copilot-jetbrains.d.ts.map +1 -0
  226. package/dist/installer/targets/copilot-jetbrains.js +238 -0
  227. package/dist/installer/targets/copilot-jetbrains.js.map +1 -0
  228. package/dist/installer/targets/copilot-vscode.d.ts +47 -0
  229. package/dist/installer/targets/copilot-vscode.d.ts.map +1 -0
  230. package/dist/installer/targets/copilot-vscode.js +219 -0
  231. package/dist/installer/targets/copilot-vscode.js.map +1 -0
  232. package/dist/installer/targets/cursor.d.ts +35 -0
  233. package/dist/installer/targets/cursor.d.ts.map +1 -0
  234. package/dist/installer/targets/cursor.js +254 -0
  235. package/dist/installer/targets/cursor.js.map +1 -0
  236. package/dist/installer/targets/gemini.d.ts +26 -0
  237. package/dist/installer/targets/gemini.d.ts.map +1 -0
  238. package/dist/installer/targets/gemini.js +165 -0
  239. package/dist/installer/targets/gemini.js.map +1 -0
  240. package/dist/installer/targets/hermes.d.ts +18 -0
  241. package/dist/installer/targets/hermes.d.ts.map +1 -0
  242. package/dist/installer/targets/hermes.js +359 -0
  243. package/dist/installer/targets/hermes.js.map +1 -0
  244. package/dist/installer/targets/kiro.d.ts +27 -0
  245. package/dist/installer/targets/kiro.d.ts.map +1 -0
  246. package/dist/installer/targets/kiro.js +178 -0
  247. package/dist/installer/targets/kiro.js.map +1 -0
  248. package/dist/installer/targets/opencode.d.ts +38 -0
  249. package/dist/installer/targets/opencode.d.ts.map +1 -0
  250. package/dist/installer/targets/opencode.js +288 -0
  251. package/dist/installer/targets/opencode.js.map +1 -0
  252. package/dist/installer/targets/registry.d.ts +35 -0
  253. package/dist/installer/targets/registry.d.ts.map +1 -0
  254. package/dist/installer/targets/registry.js +101 -0
  255. package/dist/installer/targets/registry.js.map +1 -0
  256. package/dist/installer/targets/shared.d.ts +101 -0
  257. package/dist/installer/targets/shared.d.ts.map +1 -0
  258. package/dist/installer/targets/shared.js +264 -0
  259. package/dist/installer/targets/shared.js.map +1 -0
  260. package/dist/installer/targets/toml.d.ts +53 -0
  261. package/dist/installer/targets/toml.d.ts.map +1 -0
  262. package/dist/installer/targets/toml.js +226 -0
  263. package/dist/installer/targets/toml.js.map +1 -0
  264. package/dist/installer/targets/trae.d.ts +30 -0
  265. package/dist/installer/targets/trae.d.ts.map +1 -0
  266. package/dist/installer/targets/trae.js +164 -0
  267. package/dist/installer/targets/trae.js.map +1 -0
  268. package/dist/installer/targets/types.d.ts +108 -0
  269. package/dist/installer/targets/types.d.ts.map +1 -0
  270. package/dist/installer/targets/types.js +16 -0
  271. package/dist/installer/targets/types.js.map +1 -0
  272. package/dist/installer/targets/workbuddy.d.ts +29 -0
  273. package/dist/installer/targets/workbuddy.d.ts.map +1 -0
  274. package/dist/installer/targets/workbuddy.js +163 -0
  275. package/dist/installer/targets/workbuddy.js.map +1 -0
  276. package/dist/mcp/daemon-manager.d.ts +42 -0
  277. package/dist/mcp/daemon-manager.d.ts.map +1 -0
  278. package/dist/mcp/daemon-manager.js +129 -0
  279. package/dist/mcp/daemon-manager.js.map +1 -0
  280. package/dist/mcp/daemon-paths.d.ts +79 -0
  281. package/dist/mcp/daemon-paths.d.ts.map +1 -0
  282. package/dist/mcp/daemon-paths.js +219 -0
  283. package/dist/mcp/daemon-paths.js.map +1 -0
  284. package/dist/mcp/daemon-registry.d.ts +57 -0
  285. package/dist/mcp/daemon-registry.d.ts.map +1 -0
  286. package/dist/mcp/daemon-registry.js +281 -0
  287. package/dist/mcp/daemon-registry.js.map +1 -0
  288. package/dist/mcp/daemon.d.ts +293 -0
  289. package/dist/mcp/daemon.d.ts.map +1 -0
  290. package/dist/mcp/daemon.js +864 -0
  291. package/dist/mcp/daemon.js.map +1 -0
  292. package/dist/mcp/dynamic-boundaries.d.ts +41 -0
  293. package/dist/mcp/dynamic-boundaries.d.ts.map +1 -0
  294. package/dist/mcp/dynamic-boundaries.js +360 -0
  295. package/dist/mcp/dynamic-boundaries.js.map +1 -0
  296. package/dist/mcp/early-ppid.d.ts +26 -0
  297. package/dist/mcp/early-ppid.d.ts.map +1 -0
  298. package/dist/mcp/early-ppid.js +29 -0
  299. package/dist/mcp/early-ppid.js.map +1 -0
  300. package/dist/mcp/engine.d.ts +125 -0
  301. package/dist/mcp/engine.d.ts.map +1 -0
  302. package/dist/mcp/engine.js +392 -0
  303. package/dist/mcp/engine.js.map +1 -0
  304. package/dist/mcp/explore-dedup.d.ts +137 -0
  305. package/dist/mcp/explore-dedup.d.ts.map +1 -0
  306. package/dist/mcp/explore-dedup.js +236 -0
  307. package/dist/mcp/explore-dedup.js.map +1 -0
  308. package/dist/mcp/explore-diagnostics.d.ts +289 -0
  309. package/dist/mcp/explore-diagnostics.d.ts.map +1 -0
  310. package/dist/mcp/explore-diagnostics.js +558 -0
  311. package/dist/mcp/explore-diagnostics.js.map +1 -0
  312. package/dist/mcp/explore-session-state.d.ts +217 -0
  313. package/dist/mcp/explore-session-state.d.ts.map +1 -0
  314. package/dist/mcp/explore-session-state.js +322 -0
  315. package/dist/mcp/explore-session-state.js.map +1 -0
  316. package/dist/mcp/index.d.ts +137 -0
  317. package/dist/mcp/index.d.ts.map +1 -0
  318. package/dist/mcp/index.js +567 -0
  319. package/dist/mcp/index.js.map +1 -0
  320. package/dist/mcp/liveness-watchdog.d.ts +35 -0
  321. package/dist/mcp/liveness-watchdog.d.ts.map +1 -0
  322. package/dist/mcp/liveness-watchdog.js +269 -0
  323. package/dist/mcp/liveness-watchdog.js.map +1 -0
  324. package/dist/mcp/ppid-watchdog.d.ts +62 -0
  325. package/dist/mcp/ppid-watchdog.d.ts.map +1 -0
  326. package/dist/mcp/ppid-watchdog.js +64 -0
  327. package/dist/mcp/ppid-watchdog.js.map +1 -0
  328. package/dist/mcp/proxy.d.ts +87 -0
  329. package/dist/mcp/proxy.d.ts.map +1 -0
  330. package/dist/mcp/proxy.js +672 -0
  331. package/dist/mcp/proxy.js.map +1 -0
  332. package/dist/mcp/query-pool.d.ts +108 -0
  333. package/dist/mcp/query-pool.d.ts.map +1 -0
  334. package/dist/mcp/query-pool.js +315 -0
  335. package/dist/mcp/query-pool.js.map +1 -0
  336. package/dist/mcp/query-worker.d.ts +24 -0
  337. package/dist/mcp/query-worker.d.ts.map +1 -0
  338. package/dist/mcp/query-worker.js +87 -0
  339. package/dist/mcp/query-worker.js.map +1 -0
  340. package/dist/mcp/server-instructions.d.ts +34 -0
  341. package/dist/mcp/server-instructions.d.ts.map +1 -0
  342. package/dist/mcp/server-instructions.js +111 -0
  343. package/dist/mcp/server-instructions.js.map +1 -0
  344. package/dist/mcp/session.d.ts +109 -0
  345. package/dist/mcp/session.d.ts.map +1 -0
  346. package/dist/mcp/session.js +380 -0
  347. package/dist/mcp/session.js.map +1 -0
  348. package/dist/mcp/startup-handshake.d.ts +44 -0
  349. package/dist/mcp/startup-handshake.d.ts.map +1 -0
  350. package/dist/mcp/startup-handshake.js +73 -0
  351. package/dist/mcp/startup-handshake.js.map +1 -0
  352. package/dist/mcp/stdin-teardown.d.ts +27 -0
  353. package/dist/mcp/stdin-teardown.d.ts.map +1 -0
  354. package/dist/mcp/stdin-teardown.js +49 -0
  355. package/dist/mcp/stdin-teardown.js.map +1 -0
  356. package/dist/mcp/tools.d.ts +877 -0
  357. package/dist/mcp/tools.d.ts.map +1 -0
  358. package/dist/mcp/tools.js +6371 -0
  359. package/dist/mcp/tools.js.map +1 -0
  360. package/dist/mcp/transport.d.ts +188 -0
  361. package/dist/mcp/transport.d.ts.map +1 -0
  362. package/dist/mcp/transport.js +377 -0
  363. package/dist/mcp/transport.js.map +1 -0
  364. package/dist/mcp/version.d.ts +19 -0
  365. package/dist/mcp/version.d.ts.map +1 -0
  366. package/dist/mcp/version.js +71 -0
  367. package/dist/mcp/version.js.map +1 -0
  368. package/dist/project-config.d.ts +158 -0
  369. package/dist/project-config.d.ts.map +1 -0
  370. package/dist/project-config.js +489 -0
  371. package/dist/project-config.js.map +1 -0
  372. package/dist/resolution/c-fnptr-synthesizer.d.ts +6 -0
  373. package/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -0
  374. package/dist/resolution/c-fnptr-synthesizer.js +1506 -0
  375. package/dist/resolution/c-fnptr-synthesizer.js.map +1 -0
  376. package/dist/resolution/callback-synthesizer.d.ts +59 -0
  377. package/dist/resolution/callback-synthesizer.d.ts.map +1 -0
  378. package/dist/resolution/callback-synthesizer.js +4066 -0
  379. package/dist/resolution/callback-synthesizer.js.map +1 -0
  380. package/dist/resolution/cooperative-yield.d.ts +40 -0
  381. package/dist/resolution/cooperative-yield.d.ts.map +1 -0
  382. package/dist/resolution/cooperative-yield.js +44 -0
  383. package/dist/resolution/cooperative-yield.js.map +1 -0
  384. package/dist/resolution/expo-router-synthesizer.d.ts +32 -0
  385. package/dist/resolution/expo-router-synthesizer.d.ts.map +1 -0
  386. package/dist/resolution/expo-router-synthesizer.js +189 -0
  387. package/dist/resolution/expo-router-synthesizer.js.map +1 -0
  388. package/dist/resolution/frameworks/astro.d.ts +9 -0
  389. package/dist/resolution/frameworks/astro.d.ts.map +1 -0
  390. package/dist/resolution/frameworks/astro.js +169 -0
  391. package/dist/resolution/frameworks/astro.js.map +1 -0
  392. package/dist/resolution/frameworks/cargo-workspace.d.ts +18 -0
  393. package/dist/resolution/frameworks/cargo-workspace.d.ts.map +1 -0
  394. package/dist/resolution/frameworks/cargo-workspace.js +225 -0
  395. package/dist/resolution/frameworks/cargo-workspace.js.map +1 -0
  396. package/dist/resolution/frameworks/cics.d.ts +20 -0
  397. package/dist/resolution/frameworks/cics.d.ts.map +1 -0
  398. package/dist/resolution/frameworks/cics.js +90 -0
  399. package/dist/resolution/frameworks/cics.js.map +1 -0
  400. package/dist/resolution/frameworks/csharp.d.ts +8 -0
  401. package/dist/resolution/frameworks/csharp.d.ts.map +1 -0
  402. package/dist/resolution/frameworks/csharp.js +335 -0
  403. package/dist/resolution/frameworks/csharp.js.map +1 -0
  404. package/dist/resolution/frameworks/drupal.d.ts +51 -0
  405. package/dist/resolution/frameworks/drupal.d.ts.map +1 -0
  406. package/dist/resolution/frameworks/drupal.js +367 -0
  407. package/dist/resolution/frameworks/drupal.js.map +1 -0
  408. package/dist/resolution/frameworks/expo-modules.d.ts +3 -0
  409. package/dist/resolution/frameworks/expo-modules.d.ts.map +1 -0
  410. package/dist/resolution/frameworks/expo-modules.js +148 -0
  411. package/dist/resolution/frameworks/expo-modules.js.map +1 -0
  412. package/dist/resolution/frameworks/expo-router.d.ts +189 -0
  413. package/dist/resolution/frameworks/expo-router.d.ts.map +1 -0
  414. package/dist/resolution/frameworks/expo-router.js +785 -0
  415. package/dist/resolution/frameworks/expo-router.js.map +1 -0
  416. package/dist/resolution/frameworks/express.d.ts +8 -0
  417. package/dist/resolution/frameworks/express.d.ts.map +1 -0
  418. package/dist/resolution/frameworks/express.js +540 -0
  419. package/dist/resolution/frameworks/express.js.map +1 -0
  420. package/dist/resolution/frameworks/fabric.d.ts +3 -0
  421. package/dist/resolution/frameworks/fabric.d.ts.map +1 -0
  422. package/dist/resolution/frameworks/fabric.js +354 -0
  423. package/dist/resolution/frameworks/fabric.js.map +1 -0
  424. package/dist/resolution/frameworks/go.d.ts +8 -0
  425. package/dist/resolution/frameworks/go.d.ts.map +1 -0
  426. package/dist/resolution/frameworks/go.js +184 -0
  427. package/dist/resolution/frameworks/go.js.map +1 -0
  428. package/dist/resolution/frameworks/goframe.d.ts +41 -0
  429. package/dist/resolution/frameworks/goframe.d.ts.map +1 -0
  430. package/dist/resolution/frameworks/goframe.js +112 -0
  431. package/dist/resolution/frameworks/goframe.js.map +1 -0
  432. package/dist/resolution/frameworks/index.d.ts +30 -0
  433. package/dist/resolution/frameworks/index.d.ts.map +1 -0
  434. package/dist/resolution/frameworks/index.js +72 -0
  435. package/dist/resolution/frameworks/index.js.map +1 -0
  436. package/dist/resolution/frameworks/java.d.ts +8 -0
  437. package/dist/resolution/frameworks/java.d.ts.map +1 -0
  438. package/dist/resolution/frameworks/java.js +517 -0
  439. package/dist/resolution/frameworks/java.js.map +1 -0
  440. package/dist/resolution/frameworks/laravel.d.ts +13 -0
  441. package/dist/resolution/frameworks/laravel.d.ts.map +1 -0
  442. package/dist/resolution/frameworks/laravel.js +257 -0
  443. package/dist/resolution/frameworks/laravel.js.map +1 -0
  444. package/dist/resolution/frameworks/nestjs.d.ts +26 -0
  445. package/dist/resolution/frameworks/nestjs.d.ts.map +1 -0
  446. package/dist/resolution/frameworks/nestjs.js +690 -0
  447. package/dist/resolution/frameworks/nestjs.js.map +1 -0
  448. package/dist/resolution/frameworks/nextjs.d.ts +76 -0
  449. package/dist/resolution/frameworks/nextjs.d.ts.map +1 -0
  450. package/dist/resolution/frameworks/nextjs.js +328 -0
  451. package/dist/resolution/frameworks/nextjs.js.map +1 -0
  452. package/dist/resolution/frameworks/object-literal.d.ts +32 -0
  453. package/dist/resolution/frameworks/object-literal.d.ts.map +1 -0
  454. package/dist/resolution/frameworks/object-literal.js +139 -0
  455. package/dist/resolution/frameworks/object-literal.js.map +1 -0
  456. package/dist/resolution/frameworks/package-deps.d.ts +14 -0
  457. package/dist/resolution/frameworks/package-deps.d.ts.map +1 -0
  458. package/dist/resolution/frameworks/package-deps.js +78 -0
  459. package/dist/resolution/frameworks/package-deps.js.map +1 -0
  460. package/dist/resolution/frameworks/play.d.ts +19 -0
  461. package/dist/resolution/frameworks/play.d.ts.map +1 -0
  462. package/dist/resolution/frameworks/play.js +111 -0
  463. package/dist/resolution/frameworks/play.js.map +1 -0
  464. package/dist/resolution/frameworks/python.d.ts +10 -0
  465. package/dist/resolution/frameworks/python.d.ts.map +1 -0
  466. package/dist/resolution/frameworks/python.js +566 -0
  467. package/dist/resolution/frameworks/python.js.map +1 -0
  468. package/dist/resolution/frameworks/react-native.d.ts +29 -0
  469. package/dist/resolution/frameworks/react-native.d.ts.map +1 -0
  470. package/dist/resolution/frameworks/react-native.js +549 -0
  471. package/dist/resolution/frameworks/react-native.js.map +1 -0
  472. package/dist/resolution/frameworks/react-router.d.ts +46 -0
  473. package/dist/resolution/frameworks/react-router.d.ts.map +1 -0
  474. package/dist/resolution/frameworks/react-router.js +187 -0
  475. package/dist/resolution/frameworks/react-router.js.map +1 -0
  476. package/dist/resolution/frameworks/react.d.ts +9 -0
  477. package/dist/resolution/frameworks/react.d.ts.map +1 -0
  478. package/dist/resolution/frameworks/react.js +257 -0
  479. package/dist/resolution/frameworks/react.js.map +1 -0
  480. package/dist/resolution/frameworks/ruby.d.ts +8 -0
  481. package/dist/resolution/frameworks/ruby.d.ts.map +1 -0
  482. package/dist/resolution/frameworks/ruby.js +302 -0
  483. package/dist/resolution/frameworks/ruby.js.map +1 -0
  484. package/dist/resolution/frameworks/rust.d.ts +8 -0
  485. package/dist/resolution/frameworks/rust.d.ts.map +1 -0
  486. package/dist/resolution/frameworks/rust.js +304 -0
  487. package/dist/resolution/frameworks/rust.js.map +1 -0
  488. package/dist/resolution/frameworks/svelte.d.ts +9 -0
  489. package/dist/resolution/frameworks/svelte.d.ts.map +1 -0
  490. package/dist/resolution/frameworks/svelte.js +258 -0
  491. package/dist/resolution/frameworks/svelte.js.map +1 -0
  492. package/dist/resolution/frameworks/sveltekit-router.d.ts +36 -0
  493. package/dist/resolution/frameworks/sveltekit-router.d.ts.map +1 -0
  494. package/dist/resolution/frameworks/sveltekit-router.js +156 -0
  495. package/dist/resolution/frameworks/sveltekit-router.js.map +1 -0
  496. package/dist/resolution/frameworks/swift-objc.d.ts +37 -0
  497. package/dist/resolution/frameworks/swift-objc.d.ts.map +1 -0
  498. package/dist/resolution/frameworks/swift-objc.js +252 -0
  499. package/dist/resolution/frameworks/swift-objc.js.map +1 -0
  500. package/dist/resolution/frameworks/swift.d.ts +10 -0
  501. package/dist/resolution/frameworks/swift.d.ts.map +1 -0
  502. package/dist/resolution/frameworks/swift.js +410 -0
  503. package/dist/resolution/frameworks/swift.js.map +1 -0
  504. package/dist/resolution/frameworks/tanstack-router.d.ts +84 -0
  505. package/dist/resolution/frameworks/tanstack-router.d.ts.map +1 -0
  506. package/dist/resolution/frameworks/tanstack-router.js +437 -0
  507. package/dist/resolution/frameworks/tanstack-router.js.map +1 -0
  508. package/dist/resolution/frameworks/terraform.d.ts +38 -0
  509. package/dist/resolution/frameworks/terraform.d.ts.map +1 -0
  510. package/dist/resolution/frameworks/terraform.js +277 -0
  511. package/dist/resolution/frameworks/terraform.js.map +1 -0
  512. package/dist/resolution/frameworks/vue-router.d.ts +82 -0
  513. package/dist/resolution/frameworks/vue-router.d.ts.map +1 -0
  514. package/dist/resolution/frameworks/vue-router.js +377 -0
  515. package/dist/resolution/frameworks/vue-router.js.map +1 -0
  516. package/dist/resolution/frameworks/vue.d.ts +9 -0
  517. package/dist/resolution/frameworks/vue.d.ts.map +1 -0
  518. package/dist/resolution/frameworks/vue.js +303 -0
  519. package/dist/resolution/frameworks/vue.js.map +1 -0
  520. package/dist/resolution/go-module.d.ts +26 -0
  521. package/dist/resolution/go-module.d.ts.map +1 -0
  522. package/dist/resolution/go-module.js +78 -0
  523. package/dist/resolution/go-module.js.map +1 -0
  524. package/dist/resolution/goframe-synthesizer.d.ts +29 -0
  525. package/dist/resolution/goframe-synthesizer.d.ts.map +1 -0
  526. package/dist/resolution/goframe-synthesizer.js +163 -0
  527. package/dist/resolution/goframe-synthesizer.js.map +1 -0
  528. package/dist/resolution/import-resolver.d.ts +84 -0
  529. package/dist/resolution/import-resolver.d.ts.map +1 -0
  530. package/dist/resolution/import-resolver.js +2240 -0
  531. package/dist/resolution/import-resolver.js.map +1 -0
  532. package/dist/resolution/index.d.ts +343 -0
  533. package/dist/resolution/index.d.ts.map +1 -0
  534. package/dist/resolution/index.js +2352 -0
  535. package/dist/resolution/index.js.map +1 -0
  536. package/dist/resolution/lru-cache.d.ts +24 -0
  537. package/dist/resolution/lru-cache.d.ts.map +1 -0
  538. package/dist/resolution/lru-cache.js +62 -0
  539. package/dist/resolution/lru-cache.js.map +1 -0
  540. package/dist/resolution/memory-budget.d.ts +48 -0
  541. package/dist/resolution/memory-budget.d.ts.map +1 -0
  542. package/dist/resolution/memory-budget.js +162 -0
  543. package/dist/resolution/memory-budget.js.map +1 -0
  544. package/dist/resolution/name-matcher.d.ts +153 -0
  545. package/dist/resolution/name-matcher.d.ts.map +1 -0
  546. package/dist/resolution/name-matcher.js +2412 -0
  547. package/dist/resolution/name-matcher.js.map +1 -0
  548. package/dist/resolution/next-router-synthesizer.d.ts +27 -0
  549. package/dist/resolution/next-router-synthesizer.d.ts.map +1 -0
  550. package/dist/resolution/next-router-synthesizer.js +113 -0
  551. package/dist/resolution/next-router-synthesizer.js.map +1 -0
  552. package/dist/resolution/path-aliases.d.ts +70 -0
  553. package/dist/resolution/path-aliases.d.ts.map +1 -0
  554. package/dist/resolution/path-aliases.js +346 -0
  555. package/dist/resolution/path-aliases.js.map +1 -0
  556. package/dist/resolution/react-router-synthesizer.d.ts +33 -0
  557. package/dist/resolution/react-router-synthesizer.d.ts.map +1 -0
  558. package/dist/resolution/react-router-synthesizer.js +126 -0
  559. package/dist/resolution/react-router-synthesizer.js.map +1 -0
  560. package/dist/resolution/resolver-pool.d.ts +106 -0
  561. package/dist/resolution/resolver-pool.d.ts.map +1 -0
  562. package/dist/resolution/resolver-pool.js +344 -0
  563. package/dist/resolution/resolver-pool.js.map +1 -0
  564. package/dist/resolution/resolver-worker.d.ts +17 -0
  565. package/dist/resolution/resolver-worker.d.ts.map +1 -0
  566. package/dist/resolution/resolver-worker.js +141 -0
  567. package/dist/resolution/resolver-worker.js.map +1 -0
  568. package/dist/resolution/strip-comments.d.ts +27 -0
  569. package/dist/resolution/strip-comments.d.ts.map +1 -0
  570. package/dist/resolution/strip-comments.js +492 -0
  571. package/dist/resolution/strip-comments.js.map +1 -0
  572. package/dist/resolution/sveltekit-synthesizer.d.ts +58 -0
  573. package/dist/resolution/sveltekit-synthesizer.d.ts.map +1 -0
  574. package/dist/resolution/sveltekit-synthesizer.js +173 -0
  575. package/dist/resolution/sveltekit-synthesizer.js.map +1 -0
  576. package/dist/resolution/swift-objc-bridge.d.ts +134 -0
  577. package/dist/resolution/swift-objc-bridge.d.ts.map +1 -0
  578. package/dist/resolution/swift-objc-bridge.js +256 -0
  579. package/dist/resolution/swift-objc-bridge.js.map +1 -0
  580. package/dist/resolution/synth-utils.d.ts +26 -0
  581. package/dist/resolution/synth-utils.d.ts.map +1 -0
  582. package/dist/resolution/synth-utils.js +75 -0
  583. package/dist/resolution/synth-utils.js.map +1 -0
  584. package/dist/resolution/tanstack-router-synthesizer.d.ts +31 -0
  585. package/dist/resolution/tanstack-router-synthesizer.d.ts.map +1 -0
  586. package/dist/resolution/tanstack-router-synthesizer.js +114 -0
  587. package/dist/resolution/tanstack-router-synthesizer.js.map +1 -0
  588. package/dist/resolution/tier-synthesizer.d.ts +48 -0
  589. package/dist/resolution/tier-synthesizer.d.ts.map +1 -0
  590. package/dist/resolution/tier-synthesizer.js +907 -0
  591. package/dist/resolution/tier-synthesizer.js.map +1 -0
  592. package/dist/resolution/types.d.ts +290 -0
  593. package/dist/resolution/types.d.ts.map +1 -0
  594. package/dist/resolution/types.js +8 -0
  595. package/dist/resolution/types.js.map +1 -0
  596. package/dist/resolution/vue-router-synthesizer.d.ts +30 -0
  597. package/dist/resolution/vue-router-synthesizer.d.ts.map +1 -0
  598. package/dist/resolution/vue-router-synthesizer.js +115 -0
  599. package/dist/resolution/vue-router-synthesizer.js.map +1 -0
  600. package/dist/resolution/workspace-packages.d.ts +58 -0
  601. package/dist/resolution/workspace-packages.d.ts.map +1 -0
  602. package/dist/resolution/workspace-packages.js +346 -0
  603. package/dist/resolution/workspace-packages.js.map +1 -0
  604. package/dist/search/identifier-segments.d.ts +70 -0
  605. package/dist/search/identifier-segments.d.ts.map +1 -0
  606. package/dist/search/identifier-segments.js +205 -0
  607. package/dist/search/identifier-segments.js.map +1 -0
  608. package/dist/search/query-parser.d.ts +57 -0
  609. package/dist/search/query-parser.d.ts.map +1 -0
  610. package/dist/search/query-parser.js +177 -0
  611. package/dist/search/query-parser.js.map +1 -0
  612. package/dist/search/query-paths.d.ts +57 -0
  613. package/dist/search/query-paths.d.ts.map +1 -0
  614. package/dist/search/query-paths.js +298 -0
  615. package/dist/search/query-paths.js.map +1 -0
  616. package/dist/search/query-utils.d.ts +102 -0
  617. package/dist/search/query-utils.d.ts.map +1 -0
  618. package/dist/search/query-utils.js +487 -0
  619. package/dist/search/query-utils.js.map +1 -0
  620. package/dist/sync/git-hooks.d.ts +45 -0
  621. package/dist/sync/git-hooks.d.ts.map +1 -0
  622. package/dist/sync/git-hooks.js +227 -0
  623. package/dist/sync/git-hooks.js.map +1 -0
  624. package/dist/sync/index.d.ts +19 -0
  625. package/dist/sync/index.d.ts.map +1 -0
  626. package/dist/sync/index.js +35 -0
  627. package/dist/sync/index.js.map +1 -0
  628. package/dist/sync/watch-policy.d.ts +48 -0
  629. package/dist/sync/watch-policy.d.ts.map +1 -0
  630. package/dist/sync/watch-policy.js +124 -0
  631. package/dist/sync/watch-policy.js.map +1 -0
  632. package/dist/sync/watcher.d.ts +401 -0
  633. package/dist/sync/watcher.d.ts.map +1 -0
  634. package/dist/sync/watcher.js +967 -0
  635. package/dist/sync/watcher.js.map +1 -0
  636. package/dist/sync/worktree.d.ts +63 -0
  637. package/dist/sync/worktree.d.ts.map +1 -0
  638. package/dist/sync/worktree.js +182 -0
  639. package/dist/sync/worktree.js.map +1 -0
  640. package/dist/telemetry/index.d.ts +143 -0
  641. package/dist/telemetry/index.d.ts.map +1 -0
  642. package/dist/telemetry/index.js +541 -0
  643. package/dist/telemetry/index.js.map +1 -0
  644. package/dist/types.d.ts +486 -0
  645. package/dist/types.d.ts.map +1 -0
  646. package/dist/types.js +118 -0
  647. package/dist/types.js.map +1 -0
  648. package/dist/ui/color.d.ts +21 -0
  649. package/dist/ui/color.d.ts.map +1 -0
  650. package/dist/ui/color.js +42 -0
  651. package/dist/ui/color.js.map +1 -0
  652. package/dist/ui/glyphs.d.ts +67 -0
  653. package/dist/ui/glyphs.d.ts.map +1 -0
  654. package/dist/ui/glyphs.js +125 -0
  655. package/dist/ui/glyphs.js.map +1 -0
  656. package/dist/ui/shimmer-progress.d.ts +11 -0
  657. package/dist/ui/shimmer-progress.d.ts.map +1 -0
  658. package/dist/ui/shimmer-progress.js +164 -0
  659. package/dist/ui/shimmer-progress.js.map +1 -0
  660. package/dist/ui/shimmer-worker.d.ts +2 -0
  661. package/dist/ui/shimmer-worker.d.ts.map +1 -0
  662. package/dist/ui/shimmer-worker.js +126 -0
  663. package/dist/ui/shimmer-worker.js.map +1 -0
  664. package/dist/ui/types.d.ts +15 -0
  665. package/dist/ui/types.d.ts.map +1 -0
  666. package/dist/ui/types.js +3 -0
  667. package/dist/ui/types.js.map +1 -0
  668. package/dist/ui-server/api/deadcode.d.ts +84 -0
  669. package/dist/ui-server/api/deadcode.d.ts.map +1 -0
  670. package/dist/ui-server/api/deadcode.js +136 -0
  671. package/dist/ui-server/api/deadcode.js.map +1 -0
  672. package/dist/ui-server/api/effects.d.ts +87 -0
  673. package/dist/ui-server/api/effects.d.ts.map +1 -0
  674. package/dist/ui-server/api/effects.js +499 -0
  675. package/dist/ui-server/api/effects.js.map +1 -0
  676. package/dist/ui-server/api/entrypoints.d.ts +86 -0
  677. package/dist/ui-server/api/entrypoints.d.ts.map +1 -0
  678. package/dist/ui-server/api/entrypoints.js +279 -0
  679. package/dist/ui-server/api/entrypoints.js.map +1 -0
  680. package/dist/ui-server/api/events.d.ts +183 -0
  681. package/dist/ui-server/api/events.d.ts.map +1 -0
  682. package/dist/ui-server/api/events.js +430 -0
  683. package/dist/ui-server/api/events.js.map +1 -0
  684. package/dist/ui-server/api/file.d.ts +66 -0
  685. package/dist/ui-server/api/file.d.ts.map +1 -0
  686. package/dist/ui-server/api/file.js +222 -0
  687. package/dist/ui-server/api/file.js.map +1 -0
  688. package/dist/ui-server/api/filecode.d.ts +126 -0
  689. package/dist/ui-server/api/filecode.d.ts.map +1 -0
  690. package/dist/ui-server/api/filecode.js +205 -0
  691. package/dist/ui-server/api/filecode.js.map +1 -0
  692. package/dist/ui-server/api/flow.d.ts +226 -0
  693. package/dist/ui-server/api/flow.d.ts.map +1 -0
  694. package/dist/ui-server/api/flow.js +611 -0
  695. package/dist/ui-server/api/flow.js.map +1 -0
  696. package/dist/ui-server/api/hierarchy.d.ts +81 -0
  697. package/dist/ui-server/api/hierarchy.d.ts.map +1 -0
  698. package/dist/ui-server/api/hierarchy.js +92 -0
  699. package/dist/ui-server/api/hierarchy.js.map +1 -0
  700. package/dist/ui-server/api/index.d.ts +90 -0
  701. package/dist/ui-server/api/index.d.ts.map +1 -0
  702. package/dist/ui-server/api/index.js +332 -0
  703. package/dist/ui-server/api/index.js.map +1 -0
  704. package/dist/ui-server/api/map.d.ts +187 -0
  705. package/dist/ui-server/api/map.d.ts.map +1 -0
  706. package/dist/ui-server/api/map.js +498 -0
  707. package/dist/ui-server/api/map.js.map +1 -0
  708. package/dist/ui-server/api/node.d.ts +81 -0
  709. package/dist/ui-server/api/node.d.ts.map +1 -0
  710. package/dist/ui-server/api/node.js +388 -0
  711. package/dist/ui-server/api/node.js.map +1 -0
  712. package/dist/ui-server/api/nodes.d.ts +25 -0
  713. package/dist/ui-server/api/nodes.d.ts.map +1 -0
  714. package/dist/ui-server/api/nodes.js +45 -0
  715. package/dist/ui-server/api/nodes.js.map +1 -0
  716. package/dist/ui-server/api/program.d.ts +139 -0
  717. package/dist/ui-server/api/program.d.ts.map +1 -0
  718. package/dist/ui-server/api/program.js +315 -0
  719. package/dist/ui-server/api/program.js.map +1 -0
  720. package/dist/ui-server/api/respond.d.ts +76 -0
  721. package/dist/ui-server/api/respond.d.ts.map +1 -0
  722. package/dist/ui-server/api/respond.js +186 -0
  723. package/dist/ui-server/api/respond.js.map +1 -0
  724. package/dist/ui-server/api/route-roots.d.ts +39 -0
  725. package/dist/ui-server/api/route-roots.d.ts.map +1 -0
  726. package/dist/ui-server/api/route-roots.js +96 -0
  727. package/dist/ui-server/api/route-roots.js.map +1 -0
  728. package/dist/ui-server/api/routes.d.ts +59 -0
  729. package/dist/ui-server/api/routes.d.ts.map +1 -0
  730. package/dist/ui-server/api/routes.js +112 -0
  731. package/dist/ui-server/api/routes.js.map +1 -0
  732. package/dist/ui-server/api/screens.d.ts +117 -0
  733. package/dist/ui-server/api/screens.d.ts.map +1 -0
  734. package/dist/ui-server/api/screens.js +611 -0
  735. package/dist/ui-server/api/screens.js.map +1 -0
  736. package/dist/ui-server/api/search.d.ts +29 -0
  737. package/dist/ui-server/api/search.d.ts.map +1 -0
  738. package/dist/ui-server/api/search.js +232 -0
  739. package/dist/ui-server/api/search.js.map +1 -0
  740. package/dist/ui-server/api/session.d.ts +52 -0
  741. package/dist/ui-server/api/session.d.ts.map +1 -0
  742. package/dist/ui-server/api/session.js +196 -0
  743. package/dist/ui-server/api/session.js.map +1 -0
  744. package/dist/ui-server/api/source.d.ts +200 -0
  745. package/dist/ui-server/api/source.d.ts.map +1 -0
  746. package/dist/ui-server/api/source.js +419 -0
  747. package/dist/ui-server/api/source.js.map +1 -0
  748. package/dist/ui-server/api/stats.d.ts +27 -0
  749. package/dist/ui-server/api/stats.d.ts.map +1 -0
  750. package/dist/ui-server/api/stats.js +164 -0
  751. package/dist/ui-server/api/stats.js.map +1 -0
  752. package/dist/ui-server/api/steps.d.ts +274 -0
  753. package/dist/ui-server/api/steps.d.ts.map +1 -0
  754. package/dist/ui-server/api/steps.js +1446 -0
  755. package/dist/ui-server/api/steps.js.map +1 -0
  756. package/dist/ui-server/api/trail-store.d.ts +142 -0
  757. package/dist/ui-server/api/trail-store.d.ts.map +1 -0
  758. package/dist/ui-server/api/trail-store.js +323 -0
  759. package/dist/ui-server/api/trail-store.js.map +1 -0
  760. package/dist/ui-server/api/trails.d.ts +163 -0
  761. package/dist/ui-server/api/trails.d.ts.map +1 -0
  762. package/dist/ui-server/api/trails.js +369 -0
  763. package/dist/ui-server/api/trails.js.map +1 -0
  764. package/dist/ui-server/api/when.d.ts +125 -0
  765. package/dist/ui-server/api/when.d.ts.map +1 -0
  766. package/dist/ui-server/api/when.js +251 -0
  767. package/dist/ui-server/api/when.js.map +1 -0
  768. package/dist/ui-server/api/wire.d.ts +179 -0
  769. package/dist/ui-server/api/wire.d.ts.map +1 -0
  770. package/dist/ui-server/api/wire.js +231 -0
  771. package/dist/ui-server/api/wire.js.map +1 -0
  772. package/dist/ui-server/assets.d.ts +40 -0
  773. package/dist/ui-server/assets.d.ts.map +1 -0
  774. package/dist/ui-server/assets.js +110 -0
  775. package/dist/ui-server/assets.js.map +1 -0
  776. package/dist/ui-server/constants.d.ts +32 -0
  777. package/dist/ui-server/constants.d.ts.map +1 -0
  778. package/dist/ui-server/constants.js +35 -0
  779. package/dist/ui-server/constants.js.map +1 -0
  780. package/dist/ui-server/highlight/index.d.ts +113 -0
  781. package/dist/ui-server/highlight/index.d.ts.map +1 -0
  782. package/dist/ui-server/highlight/index.js +307 -0
  783. package/dist/ui-server/highlight/index.js.map +1 -0
  784. package/dist/ui-server/highlight/languages.d.ts +36 -0
  785. package/dist/ui-server/highlight/languages.d.ts.map +1 -0
  786. package/dist/ui-server/highlight/languages.js +50 -0
  787. package/dist/ui-server/highlight/languages.js.map +1 -0
  788. package/dist/ui-server/index.d.ts +92 -0
  789. package/dist/ui-server/index.d.ts.map +1 -0
  790. package/dist/ui-server/index.js +399 -0
  791. package/dist/ui-server/index.js.map +1 -0
  792. package/dist/ui-server/open-browser.d.ts +31 -0
  793. package/dist/ui-server/open-browser.d.ts.map +1 -0
  794. package/dist/ui-server/open-browser.js +79 -0
  795. package/dist/ui-server/open-browser.js.map +1 -0
  796. package/dist/ui-server/security.d.ts +127 -0
  797. package/dist/ui-server/security.d.ts.map +1 -0
  798. package/dist/ui-server/security.js +332 -0
  799. package/dist/ui-server/security.js.map +1 -0
  800. package/dist/ui-server/static.d.ts +45 -0
  801. package/dist/ui-server/static.d.ts.map +1 -0
  802. package/dist/ui-server/static.js +165 -0
  803. package/dist/ui-server/static.js.map +1 -0
  804. package/dist/upgrade/index.d.ts +177 -0
  805. package/dist/upgrade/index.d.ts.map +1 -0
  806. package/dist/upgrade/index.js +665 -0
  807. package/dist/upgrade/index.js.map +1 -0
  808. package/dist/upgrade/remove-binary.d.ts +87 -0
  809. package/dist/upgrade/remove-binary.d.ts.map +1 -0
  810. package/dist/upgrade/remove-binary.js +289 -0
  811. package/dist/upgrade/remove-binary.js.map +1 -0
  812. package/dist/upgrade/update-check.d.ts +92 -0
  813. package/dist/upgrade/update-check.d.ts.map +1 -0
  814. package/dist/upgrade/update-check.js +258 -0
  815. package/dist/upgrade/update-check.js.map +1 -0
  816. package/dist/utils.d.ts +224 -0
  817. package/dist/utils.d.ts.map +1 -0
  818. package/dist/utils.js +583 -0
  819. package/dist/utils.js.map +1 -0
  820. package/dist/viewer/assets/archivo-latin-ext-wght-normal-C4zznr8T.woff2 +0 -0
  821. package/dist/viewer/assets/archivo-latin-wght-normal-E0tuGl4L.woff2 +0 -0
  822. package/dist/viewer/assets/archivo-vietnamese-wght-normal-XAtsl5Q_.woff2 +0 -0
  823. package/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-2syK4fUT.woff +0 -0
  824. package/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-CBJ8pzag.woff2 +0 -0
  825. package/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 +0 -0
  826. package/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff +0 -0
  827. package/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff +0 -0
  828. package/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2 +0 -0
  829. package/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-CTOM6hUh.woff2 +0 -0
  830. package/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-fLZuRloM.woff +0 -0
  831. package/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-B4oTjJdl.woff +0 -0
  832. package/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-CBjNughH.woff2 +0 -0
  833. package/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff +0 -0
  834. package/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 +0 -0
  835. package/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff +0 -0
  836. package/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2 +0 -0
  837. package/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-9HEixskS.woff +0 -0
  838. package/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-V-xxqcpd.woff2 +0 -0
  839. package/dist/viewer/assets/ibm-plex-mono-latin-400-italic-66oory27.woff +0 -0
  840. package/dist/viewer/assets/ibm-plex-mono-latin-400-italic-BqAiT5Ww.woff2 +0 -0
  841. package/dist/viewer/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
  842. package/dist/viewer/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
  843. package/dist/viewer/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff +0 -0
  844. package/dist/viewer/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 +0 -0
  845. package/dist/viewer/assets/ibm-plex-mono-latin-600-normal-BgSNZQsw.woff2 +0 -0
  846. package/dist/viewer/assets/ibm-plex-mono-latin-600-normal-DWFSQ4vo.woff +0 -0
  847. package/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-B7_fu1kp.woff2 +0 -0
  848. package/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-Bg0ZHwF4.woff +0 -0
  849. package/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
  850. package/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff +0 -0
  851. package/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2 +0 -0
  852. package/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff +0 -0
  853. package/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-D38SheWl.woff2 +0 -0
  854. package/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-DmB0ttJJ.woff +0 -0
  855. package/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-D6eaYXMU.woff +0 -0
  856. package/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-DRuN92E5.woff2 +0 -0
  857. package/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 +0 -0
  858. package/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff +0 -0
  859. package/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff +0 -0
  860. package/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2 +0 -0
  861. package/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-D2EvbN8M.woff2 +0 -0
  862. package/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-iLQfcSjf.woff +0 -0
  863. package/dist/viewer/assets/index-2IPslW5t.js +13 -0
  864. package/dist/viewer/assets/index-DSwi2Seu.css +1 -0
  865. package/dist/viewer/index.html +16 -0
  866. package/package.json +67 -0
@@ -0,0 +1,877 @@
1
+ /**
2
+ * MCP Tool Definitions
3
+ *
4
+ * Defines the tools exposed by the CodeGraph MCP server.
5
+ */
6
+ import type CodeGraph from '../index';
7
+ import type { QueryPool } from './query-pool';
8
+ export declare function __setLoadCodeGraphForTests(cls: typeof import('../index').default | null): void;
9
+ import type { PendingFile } from '../sync';
10
+ import { ExploreSessionState, type ExploreEmission } from './explore-session-state';
11
+ /**
12
+ * An expected, recoverable "codegraph can't serve this" condition — most
13
+ * importantly a project with no index. The dispatch catch converts these to
14
+ * SUCCESS-shaped responses (guidance text, NO isError): an `isError: true`
15
+ * early in a session teaches the agent the toolset is broken and it stops
16
+ * calling codegraph entirely (observed repeatedly), which is exactly wrong
17
+ * for conditions the agent can simply work around (use built-in tools for
18
+ * that codebase / pass projectPath). isError is reserved for "stop trying"
19
+ * cases: security refusals ({@link PathRefusalError}) and genuine
20
+ * malfunctions.
21
+ */
22
+ export declare class NotIndexedError extends Error {
23
+ }
24
+ /**
25
+ * A security refusal (sensitive system path). Stays `isError: true` WITHOUT
26
+ * retry guidance — abandoning this path is the desired agent reaction.
27
+ *
28
+ * Defined in `../errors` so non-MCP read sinks (the `cg ui` server) can
29
+ * enforce the same refusal without importing this module; re-exported here
30
+ * because this is where every existing caller imports it from.
31
+ */
32
+ export { PathRefusalError } from '../errors';
33
+ /**
34
+ * Normalize Erlang-native symbol spellings in an explore query into the shapes
35
+ * the rest of the pipeline already understands. Agents working Erlang code
36
+ * name symbols the way the language spells them — `mod:fn/3`, `init/2` — and
37
+ * those tokens previously died in both consumers: the flow-builder's token
38
+ * filter rejects `:` and `/arity` outright, and the search-side field parser
39
+ * eats `mod:fn` as an unknown `field:value`. Measured on cowboy: the agent
40
+ * named `cowboy_stream_h:request_process/3` in two queries, got no body back
41
+ * either time, and fell back to Read.
42
+ *
43
+ * - `fn/3` → `fn` (arity tail after an identifier; a path segment like
44
+ * `src/2fa` doesn't match because the tail must be all digits)
45
+ * - `mod:fn` → `mod.fn` (exactly one colon between identifiers, so it rides
46
+ * the existing Class.method qualified handling; `::`, URLs, drive letters,
47
+ * and times don't match, and the query language's own field prefixes —
48
+ * kind:/lang:/language:/path:/name: — are left alone)
49
+ *
50
+ * Safe cross-language: Lua's `t:m` spelling maps to the same `t.m` its
51
+ * qualified names use, and no other supported spelling contains a bare
52
+ * single-colon identifier pair.
53
+ */
54
+ export declare function normalizeQuerySpelling(query: string): string;
55
+ /**
56
+ * Calculate the recommended number of codegraph_explore calls based on project size.
57
+ * Larger codebases need more exploration calls to cover their surface area,
58
+ * but smaller ones should use fewer to avoid unnecessary overhead.
59
+ */
60
+ export declare function getExploreBudget(fileCount: number): number;
61
+ /**
62
+ * Adaptive output budget for `codegraph_explore`, scaled to project size.
63
+ *
64
+ * Smaller codebases get a tighter total cap, fewer default files, smaller
65
+ * per-file cap, and tighter clustering — so a focused query on a 100-file
66
+ * project doesn't dump a whole file's worth of source into the agent's
67
+ * context. Larger codebases keep the generous defaults because the
68
+ * agent's native discovery cost (grep + find + many Reads) genuinely
69
+ * dwarfs a fat explore call at that scale.
70
+ *
71
+ * Meta-text (relationships map, "additional relevant files" list,
72
+ * completeness signal, budget note) is gated off for tiny projects
73
+ * where one rich call is the whole story and the extra prose is just
74
+ * overhead.
75
+ *
76
+ * Tier breakpoints mirror `getExploreBudget` so a project sits in the
77
+ * same tier across both knobs.
78
+ */
79
+ export interface ExploreOutputBudget {
80
+ /** Hard cap on total output characters. */
81
+ maxOutputChars: number;
82
+ /** Default `maxFiles` when the caller didn't specify one. */
83
+ defaultMaxFiles: number;
84
+ /** Cap on contiguous source returned per file (across all its clusters). */
85
+ maxCharsPerFile: number;
86
+ /** Cluster gap threshold in lines — tighter clustering on small projects. */
87
+ gapThreshold: number;
88
+ /** Max symbols listed in the per-file header (``**`path`** — sym(kind), ...``). */
89
+ maxSymbolsInFileHeader: number;
90
+ /** Max edges shown per relationship kind in the Relationships section. */
91
+ maxEdgesPerRelationshipKind: number;
92
+ /** Include the "Relationships" section. */
93
+ includeRelationships: boolean;
94
+ /** Include the "Additional relevant files (not shown)" trailing list. */
95
+ includeAdditionalFiles: boolean;
96
+ /** Include the "Complete source code is included above…" reminder. */
97
+ includeCompletenessSignal: boolean;
98
+ /** Include the explore-budget reminder at the end. */
99
+ includeBudgetNote: boolean;
100
+ }
101
+ export declare function getExploreOutputBudget(fileCount: number): ExploreOutputBudget;
102
+ /**
103
+ * How strongly a match on a symbol of this kind corroborates that its FILE is
104
+ * what the query is about.
105
+ *
106
+ * 1.0 a callable or a type — the unit an architecture question is about
107
+ * ~0.5 a member of a type, or the file node itself (a path match, not a
108
+ * symbol match)
109
+ * ~0.3 a variable / constant — as often a name collision as a definition
110
+ * 0.15 a parameter — essentially never the subject of a question
111
+ *
112
+ * Unlisted kinds fall back to `DEFAULT_RELEVANCE_KIND_WEIGHT`, so a NodeKind
113
+ * added later is neither free nor fatal.
114
+ */
115
+ export declare const RELEVANCE_KIND_WEIGHT: Readonly<Record<string, number>>;
116
+ export declare const EXPLORE_ALLOCATION: {
117
+ /**
118
+ * A file whose weight is under this fraction of the top file's gets no source.
119
+ *
120
+ * Calibrated between the two shapes the fixtures pin: the #1500 generated CRUD
121
+ * lands at 10–11% of the top weight (penalised twice — once into the score by
122
+ * `rankPenalty`, once again here) and must cliff; a genuinely peripheral but
123
+ * hand-written flow file — `payslip_builder.go`, the direct callee of the
124
+ * workflow entry — lands at 25% and must NOT. Everything in between is a
125
+ * judgement call the agent can undo for ~0 cost, because a cliffed file is
126
+ * still NAMED in the response and one follow-up explore fetches it.
127
+ */
128
+ readonly CLIFF_FRACTION: 0.15;
129
+ /**
130
+ * Ceiling on the cliff, in the same units as `SCORE_FLOOR_MAX` — and for the
131
+ * same reason. A file whose weight clears a full-strength direct match is never
132
+ * incidental, so no amount of concentration elsewhere may zero it: one
133
+ * overwhelming top file (a 99-scoring god-file among score-10 peers) otherwise
134
+ * puts the cliff at 14.9 and silences every peer the score floor had just
135
+ * deliberately admitted. The cliff is a RELATIVE prune of weak evidence, not a
136
+ * second admission gate — the score floor already owns admission.
137
+ */
138
+ readonly CLIFF_MAX: 10;
139
+ /**
140
+ * Floor on a useful reservation — every admitted file gets this much before
141
+ * the proportional split divides the rest. Under it a slice can't hold one
142
+ * complete method, and a fragment is strictly worse than a pointer: it forces
143
+ * the Read this tool exists to prevent.
144
+ *
145
+ * It is a FLOOR, not a second cliff. Cliffing the starved file instead
146
+ * cascades: removing the smallest raises everyone else's share by so little
147
+ * that the next-smallest starves too, and a query with two dominant files ate
148
+ * six legitimately-ranked peers one at a time. Concentration is the relative
149
+ * cliff's job; this only keeps a served file's slice usable.
150
+ */
151
+ readonly MIN_CHARS: 700;
152
+ /**
153
+ * Safety valve, as a fraction of the envelope. Not the primary guard any more —
154
+ * the proportional split is — so this only has to stop a pathological
155
+ * single-file response.
156
+ */
157
+ readonly MAX_SHARE: 0.7;
158
+ /**
159
+ * Markdown overhead charged per rendered file (header + fences + blank lines),
160
+ * matching the render loop's own `+ 200` accounting. Held out of the pool
161
+ * before the split so the reservations plus their overhead fit the envelope —
162
+ * without this the last file's reservation is always the one that doesn't fit.
163
+ */
164
+ readonly FILE_OVERHEAD: 200;
165
+ /**
166
+ * Flow-spine files are weighted up and are exempt from the cliff. Clipping the
167
+ * spine causes the Read fallback (it IS the answer to a flow question);
168
+ * clipping a peripheral file does not. This makes the existing advisory spine
169
+ * handling — `hasSpine`, `SPINE_CEILING` — strict at the allocation layer.
170
+ */
171
+ readonly SPINE_WEIGHT_BOOST: 2;
172
+ /**
173
+ * Slack allowed on the whole-file rule: a file a little over its reservation
174
+ * still ships WHOLE rather than as clusters, because slicing off that last
175
+ * sliver saves ~1% of the envelope and costs a Read — the trade the whole-file
176
+ * rule exists to refuse. Proportional (with an absolute ceiling) because a
177
+ * "sliver" is relative: a flat 800 is 15% of a 5K reservation but 31% of a 2.5K
178
+ * one, and at the small end that overshoot is exactly what the file below then
179
+ * loses.
180
+ */
181
+ readonly WHOLE_FILE_GRACE_FRACTION: 0.15;
182
+ readonly WHOLE_FILE_GRACE_MAX: 800;
183
+ /**
184
+ * A reservation that already covers this fraction of a file BUYS THE WHOLE
185
+ * FILE (CG-21), even though the file is bigger than the reservation.
186
+ *
187
+ * The grace above is calibrated as a *sliver* — it only rescues a file that
188
+ * essentially fits. Below it there is a hole the render loop cannot fill:
189
+ * express's `lib/utils.js` (5,293 B) was the TOP-ranked file, reserved 3,870,
190
+ * declined the whole-file render at a 4,450 grace bound, and then spent 583 on
191
+ * a three-symbol cluster render. The other 3,287 chars of its reservation were
192
+ * neither redistributed nor delivered — the envelope shrank by a third against
193
+ * an unchanged budget and the agent Read the file back four times.
194
+ *
195
+ * So the rule is not "does the file fit the reservation" but "has the
196
+ * reservation already bought most of the file": at 0.6 the loop pays at most
197
+ * two-thirds of a reservation extra to avoid losing the whole thing, and it
198
+ * spends bytes it was going to spend anyway on a file that already earned
199
+ * them. Below the fraction the shortfall is real — the file is several times
200
+ * its reservation, clustering is the right answer, and the carry-forward
201
+ * (`reservedSoFar`/`sourceSpent` in the render loop) hands whatever it cannot
202
+ * spend to the next file down.
203
+ */
204
+ readonly WHOLE_FILE_BUY_FRACTION: 0.6;
205
+ /**
206
+ * The buy rule's overshoot is funded from ONE pool for the whole response,
207
+ * sized as this fraction of the envelope — deliberately the same 15% as
208
+ * `WHOLE_FILE_GRACE_FRACTION`, one level up: the grace is a sliver of a
209
+ * FILE's reservation, this is a sliver of the RESPONSE's envelope.
210
+ *
211
+ * Per-file funding is the version that fails, and it fails the same way the
212
+ * bug being fixed does. The merit test is a RATIO, so wherever several files
213
+ * sit near it they all qualify, and N independent overshoots inflate the
214
+ * response until the render ceiling drops whatever is last. Measured on the
215
+ * #1500 payroll fixture: three files bought whole and `payslip_builder.go` —
216
+ * the file that computes the payslip the question asks about, rank #6 — was
217
+ * dropped entirely so three higher-ranked files could each ship their final
218
+ * sliver. A dropped section is strictly worse than a clustered one, so one
219
+ * shared pool, spent in rank order, is the bound that matters.
220
+ */
221
+ readonly WHOLE_FILE_BUY_OVERSHOOT_FRACTION: 0.15;
222
+ };
223
+ /** One candidate file's allocation inputs, in final rank order. */
224
+ export interface ExploreAllocationCandidate {
225
+ path: string;
226
+ /** Post-`rankPenalty` relevance score from the ranking pass. */
227
+ score: number;
228
+ /**
229
+ * How much this file's BYTES are worth, independent of how well it matched.
230
+ * Ranking answers "is this file about the query"; allocation answers "will
231
+ * these bytes teach the agent anything". Generated CRUD can legitimately rank
232
+ * (it name-collides on every domain word) while its bytes stay mechanical
233
+ * boilerplate the agent gains nothing from reading — so `rankPenalty` is
234
+ * applied a SECOND time here. That is what finally sinks the #1500 generated
235
+ * layer below the cliff: it survived CG-10's single penalty because the sort's
236
+ * leading keys (entry-point, graph mass) are structural, and a big densely
237
+ * self-referential generated file scores well on both.
238
+ */
239
+ worth: number;
240
+ /** Carries a symbol on the rendered flow spine. */
241
+ spine: boolean;
242
+ /**
243
+ * The query named this file by PATH (see query-paths.ts). Pinned files are
244
+ * never cliffed or trimmed, and weigh at least as much as the strongest
245
+ * candidate — the agent asked for the file itself, so starving it on text/
246
+ * graph scores (which a pure-path query doesn't produce) defeats the ask.
247
+ */
248
+ pinned?: boolean;
249
+ }
250
+ export interface ExploreAllocation {
251
+ /** path → chars of source it may render. Only holds admitted files. */
252
+ allowances: Map<string, number>;
253
+ /** Files the cliff zeroed, in rank order — pointers, not bytes. */
254
+ cliffed: string[];
255
+ /** The weight threshold the cliff fired at (0 when nothing was cliffed). */
256
+ cliffAt: number;
257
+ /** Chars actually split among the admitted files. */
258
+ pool: number;
259
+ }
260
+ /**
261
+ * Split `budget.maxOutputChars` across ranked candidates in proportion to
262
+ * relevance, with a hard relative cliff.
263
+ *
264
+ * `candidates` must arrive in FINAL RANK ORDER — `maxFiles` is applied to the
265
+ * survivors of the cliff, in that order, so cliffing genuinely hands a slot to
266
+ * the next file down rather than leaving it unused.
267
+ *
268
+ * Tier invariant (`getExploreOutputBudget`): a larger tier must never allow less
269
+ * per file than a smaller one. It holds here by construction — every bound is a
270
+ * fraction of `maxOutputChars` or of `maxCharsPerFile`, both monotonic across
271
+ * tiers — except `MIN_CHARS`, which is an absolute floor and so identical at
272
+ * every tier.
273
+ */
274
+ export declare function allocateExploreBudget(candidates: readonly ExploreAllocationCandidate[], budget: ExploreOutputBudget, maxFiles: number): ExploreAllocation;
275
+ /**
276
+ * Per-file staleness banner emitted at the top of a tool response when the
277
+ * file watcher has pending events for files referenced by the response.
278
+ * The agent uses this to fall back to Read for those specific files
279
+ * without waiting for the debounced sync (issue #403).
280
+ */
281
+ export declare function formatStaleBanner(stale: PendingFile[]): string;
282
+ /**
283
+ * Compact footer listing pending files that are NOT referenced in this
284
+ * response. Gives the agent a complete project-wide freshness picture
285
+ * without bloating the main banner.
286
+ */
287
+ export declare function formatStaleFooter(stale: PendingFile[]): string;
288
+ /**
289
+ * Whole-index degradation banner (issue #876). Emitted at the top of a read
290
+ * tool response when live watching has permanently stopped — at which point
291
+ * `getPendingFiles()` is empty, so the per-file banner above can't fire even
292
+ * though the index is now FROZEN and silently drifting stale. Leads with the
293
+ * agent-actionable instruction (Read directly) and carries the reason, which
294
+ * already names the operator remedy (`cg sync` / git hooks).
295
+ */
296
+ export declare function formatDegradedBanner(reason: string | null): string;
297
+ /**
298
+ * MCP Tool definition
299
+ */
300
+ export interface ToolDefinition {
301
+ name: string;
302
+ description: string;
303
+ inputSchema: {
304
+ type: 'object';
305
+ properties: Record<string, PropertySchema>;
306
+ required?: string[];
307
+ };
308
+ /** Behavioral hints for clients (see {@link ToolAnnotations}). */
309
+ annotations?: ToolAnnotations;
310
+ }
311
+ /**
312
+ * MCP ToolAnnotations — behavioral hints a client MAY use to decide how, or
313
+ * whether, to run a tool (introduced in the 2025-03-26 spec, carried in
314
+ * 2025-06-18). They are advisory and never to be trusted for security, but
315
+ * clients gate on them: Cursor's Ask mode, for one, refuses any MCP tool that
316
+ * doesn't advertise `readOnlyHint: true` (issue #1018).
317
+ *
318
+ * The field is purely additive — a client that predates annotations ignores it
319
+ * — so codegraph advertises these even though `initialize` still negotiates the
320
+ * 2024-11-05 protocol version.
321
+ *
322
+ * https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations
323
+ */
324
+ export interface ToolAnnotations {
325
+ /** Human-readable title for the tool. */
326
+ title?: string;
327
+ /** If true, the tool does not modify its environment. Default (unset): false. */
328
+ readOnlyHint?: boolean;
329
+ /** Meaningful only when NOT read-only: may the tool perform destructive updates? */
330
+ destructiveHint?: boolean;
331
+ /** If true, repeat calls with the same arguments have no additional effect. */
332
+ idempotentHint?: boolean;
333
+ /** If true, the tool interacts with an open world of external entities. */
334
+ openWorldHint?: boolean;
335
+ }
336
+ interface PropertySchema {
337
+ type: string;
338
+ description: string;
339
+ enum?: string[];
340
+ default?: unknown;
341
+ }
342
+ /**
343
+ * Tool execution result
344
+ */
345
+ export interface ToolResult {
346
+ content: Array<{
347
+ type: 'text';
348
+ text: string;
349
+ }>;
350
+ isError?: boolean;
351
+ /**
352
+ * INTERNAL side-channel (CG-17): what a `codegraph_explore` call actually put
353
+ * on the wire — files, line ranges, bytes. It rides the result because the
354
+ * call may have run on a query-pool worker, while the session state it feeds
355
+ * lives on the main thread. {@link ToolHandler.execute} records it and DELETES
356
+ * it, so nothing here ever reaches the client. Keyed by
357
+ * {@link EXPLORE_EMISSION_KEY}; the two must stay in sync.
358
+ */
359
+ _cgExploreEmission?: ExploreEmission;
360
+ }
361
+ /**
362
+ * All CodeGraph MCP tools
363
+ *
364
+ * Designed for minimal context usage - use codegraph_explore as the primary tool
365
+ * (one call usually answers the whole question), and only use other tools for
366
+ * targeted follow-up queries.
367
+ *
368
+ * All tools support cross-project queries via the optional `projectPath` parameter.
369
+ */
370
+ export declare const tools: ToolDefinition[];
371
+ /**
372
+ * Allowlist-filtered tool definitions WITHOUT an engine — the static surface the
373
+ * proxy answers `tools/list` with before any project is open. Mirrors
374
+ * `ToolHandler.getTools()` in the no-CodeGraph case (the dynamic per-repo budget
375
+ * note in a description only adds once `cg` is loaded; the schemas are static).
376
+ */
377
+ export declare function getStaticTools(): ToolDefinition[];
378
+ /**
379
+ * Tool handler that executes tools against a CodeGraph instance
380
+ *
381
+ * Supports cross-project queries via the projectPath parameter.
382
+ * Other projects are opened on-demand and cached for performance.
383
+ */
384
+ export declare class ToolHandler {
385
+ private cg;
386
+ private projectCache;
387
+ private defaultProjectHint;
388
+ private knownSubprojects;
389
+ private knownSubprojectsBase;
390
+ private worktreeMismatchCache;
391
+ private catchUpGate;
392
+ private queryPool;
393
+ constructor(cg: CodeGraph | null);
394
+ /**
395
+ * Engine-only: attach (or detach with null) the worker-thread query pool. The
396
+ * shared daemon sets this once its default project is open; the workers each
397
+ * hold their own WAL read connection and run {@link executeReadTool}. A
398
+ * worker's own ToolHandler never has a pool, so there is no nested off-loading.
399
+ */
400
+ setQueryPool(pool: QueryPool | null): void;
401
+ /**
402
+ * Update the default CodeGraph instance (e.g. after lazy initialization)
403
+ */
404
+ setDefaultCodeGraph(cg: CodeGraph): void;
405
+ /**
406
+ * Engine-only: register the catch-up sync promise so the next `execute()`
407
+ * call awaits it before serving. The handler swallows rejections (the
408
+ * engine logs them) so a sync failure never propagates as a tool error;
409
+ * we still want to serve a best-effort result over the same potentially-
410
+ * stale data, which is what would have happened without the gate.
411
+ */
412
+ setCatchUpGate(p: Promise<void> | null): void;
413
+ /**
414
+ * Await the catch-up gate, but no longer than the configured timeout (#905).
415
+ * If the reconcile settles first, we got the fully-reconciled answer. If the
416
+ * timeout wins, we serve the call now and let the reconcile finish in the
417
+ * background — it yields to the event loop (see SYNC_RECONCILE_YIELD_INTERVAL),
418
+ * so a concurrent read still runs against the same connection. Never throws:
419
+ * a failed reconcile is logged by the engine, and we serve best-effort over
420
+ * the same potentially-stale data the un-gated path would have.
421
+ */
422
+ private awaitCatchUpGate;
423
+ /**
424
+ * Record the directory the server tried to resolve the default project from.
425
+ * Used only to make the "no default project" error actionable.
426
+ */
427
+ setDefaultProjectHint(searchedPath: string): void;
428
+ /**
429
+ * Engine-only: record the indexed sub-projects the workspace down-scan saw
430
+ * when it could not adopt a default project (#1606/#1607). An empty list
431
+ * clears any previous note.
432
+ */
433
+ setKnownSubprojects(roots: string[], base: string): void;
434
+ /** One message line naming the indexed sub-projects, or '' when none known. */
435
+ private formatKnownSubprojects;
436
+ /**
437
+ * Whether a default CodeGraph instance is available
438
+ */
439
+ hasDefaultCodeGraph(): boolean;
440
+ /**
441
+ * Optional allowlist of exposed tools, parsed from the CODEGRAPH_MCP_TOOLS
442
+ * env var (comma-separated short names, e.g. "trace,search,node,context").
443
+ * Unset/empty → every tool is exposed. Lets an operator (or an A/B harness)
444
+ * trim the tool surface without rebuilding the client config; the ablated
445
+ * tool is then truly absent from ListTools rather than merely denied on call.
446
+ * Matching is on the short form, so "node" and "codegraph_node" both work.
447
+ */
448
+ private toolAllowlist;
449
+ /** Whether a tool name passes the CODEGRAPH_MCP_TOOLS allowlist (if any). */
450
+ private isToolAllowed;
451
+ /**
452
+ * Get tool definitions with dynamic descriptions based on project size.
453
+ * The codegraph_explore tool description includes a budget recommendation
454
+ * scaled to the number of indexed files. Honors the CODEGRAPH_MCP_TOOLS
455
+ * allowlist so a trimmed surface is reflected in ListTools.
456
+ */
457
+ getTools(): ToolDefinition[];
458
+ /**
459
+ * Get CodeGraph instance for a project
460
+ *
461
+ * If projectPath is provided, opens that project's CodeGraph (cached).
462
+ * Otherwise returns the default CodeGraph instance.
463
+ *
464
+ * Walks up parent directories to find the nearest .codegraph/ folder,
465
+ * similar to how git finds .git/ directories.
466
+ */
467
+ private getCodeGraph;
468
+ /**
469
+ * Heal a long-lived connection whose `.codegraph/` was removed and recreated
470
+ * at the same path (a worktree recreated, or `rm -rf .codegraph` + re-init)
471
+ * before handing it to a tool. Otherwise the daemon keeps serving the
472
+ * pre-removal snapshot from its now-unlinked file handle until restart — and
473
+ * because the daemon registry is keyed by path, a same-path recreate routes
474
+ * new clients straight back to this same stale daemon (#925). The check is one
475
+ * stat() and a no-op unless the inode actually changed; it never throws into a
476
+ * tool call.
477
+ */
478
+ private freshen;
479
+ /**
480
+ * Close all cached project connections
481
+ */
482
+ closeAll(): void;
483
+ /**
484
+ * Validate that a value is a non-empty string within length bounds.
485
+ *
486
+ * The `maxLength` cap protects against MCP clients that ship huge
487
+ * payloads (10MB+ query strings either by accident or maliciously).
488
+ * Without this, a single oversized input can pin the FTS5 index or
489
+ * exhaust memory before any real work runs.
490
+ */
491
+ private validateString;
492
+ /**
493
+ * Validate an optional path-like string input. Returns the value if
494
+ * valid (or undefined), or a ToolResult with the error.
495
+ */
496
+ private validateOptionalPath;
497
+ /**
498
+ * Cached git worktree/index mismatch for a tool call's effective project.
499
+ *
500
+ * The "effective project" is what the request targets: an explicit
501
+ * `projectPath` arg, else the directory the server resolved its default
502
+ * project from (`defaultProjectHint`), else cwd. Memoized per start path —
503
+ * see `worktreeMismatchCache`. Best-effort: if the project can't be resolved
504
+ * (e.g. nothing initialized yet), it reports "no mismatch" so a tool is never
505
+ * broken by this check.
506
+ */
507
+ private worktreeMismatchFor;
508
+ /**
509
+ * Prefix a successful read-tool result with a compact worktree-mismatch
510
+ * notice when the resolved index belongs to a different git working tree than
511
+ * the caller's (issue #155). Without this, an agent in a nested worktree
512
+ * silently trusts main-branch results. No-op on error results and when there
513
+ * is no mismatch. `codegraph_status` is excluded — it embeds its own verbose
514
+ * warning — so it stays out of this path.
515
+ */
516
+ private withWorktreeNotice;
517
+ /**
518
+ * Annotate a successful read-tool result with per-file staleness — the
519
+ * non-blocking answer to issue #403. The file watcher tracks every event
520
+ * it sees per path; here we intersect "files referenced in this response"
521
+ * against that pending set and prepend a compact banner so the agent can
522
+ * fall back to Read for those *specific* files without waiting for the
523
+ * debounced sync to fire. Other pending files in the project (not
524
+ * referenced by this response) get a small footer so the agent has a
525
+ * complete picture without bloating the banner.
526
+ *
527
+ * Cost when nothing is pending — the common case — is one boolean check.
528
+ * No I/O, no parsing of markdown beyond a per-pending-file substring scan.
529
+ */
530
+ private driftCache;
531
+ private static readonly DRIFT_TTL_MS;
532
+ /**
533
+ * On-disk drift check for a single indexed file (issue #1474). The code
534
+ * renderers slice CURRENT bytes at INDEXED line ranges; when the file
535
+ * changed after its last index sync those ranges can point at a DIFFERENT
536
+ * symbol's code — served under the requested name with `isError: false`.
537
+ * The watcher-based pending/degraded banners can't cover this for a
538
+ * project reached via `projectPath` (cross-project instances have no
539
+ * watcher, by construction), so freshness is verified here, at the point
540
+ * of emission, from data the index already stores.
541
+ *
542
+ * Cheap and precise: one stat() per file (size + mtime, the same
543
+ * comparison the sync fast path uses); only on a stat mismatch is the
544
+ * content hashed (sha256, matching extraction's `hashContent`) so a
545
+ * touch/checkout that rewrote identical bytes never false-positives.
546
+ * Results are memoized briefly so one response rendering the same file in
547
+ * several sections pays for the check once.
548
+ *
549
+ * Returns true when the on-disk file differs from what was indexed —
550
+ * i.e. indexed line ranges for it are NOT trustworthy. Any failure
551
+ * (missing files-table row, stat/read error) reports false: those cases
552
+ * are handled by the existing not-found paths, and a wrong "stale" flag
553
+ * would needlessly push the agent back to Read.
554
+ */
555
+ private isFileStaleOnDisk;
556
+ private withStalenessNotice;
557
+ /**
558
+ * Execute a tool by name.
559
+ *
560
+ * `sessionState` is the CALLER's per-session explore history (CG-17). The
561
+ * daemon shares one ToolHandler across every connected session, so this state
562
+ * cannot live on the handler — each session owns one and hands it in, which is
563
+ * what keeps two sessions on one daemon from ever seeing each other's calls.
564
+ * Omit it (the CLI does) and explore behaves exactly as before, untracked.
565
+ */
566
+ execute(toolName: string, args: Record<string, unknown>, sessionState?: ExploreSessionState): Promise<ToolResult>;
567
+ /**
568
+ * Attach the caller's session view to an explore call's args (CG-17), on a
569
+ * COPY so the caller's object is never mutated. Nothing else sees it: a
570
+ * non-explore tool, or a caller with no session state, gets the args
571
+ * unchanged and pays nothing.
572
+ *
573
+ * A client that spells the internal key itself is stripped rather than
574
+ * trusted — the view decides what source a later call may withhold, so it has
575
+ * to come from the server's own record, never from the wire.
576
+ */
577
+ private withSessionView;
578
+ /**
579
+ * Record an explore call's emission into the caller's session state and strip
580
+ * it from the result (CG-17).
581
+ *
582
+ * Unconditional strip: the property is internal, so it comes off even when
583
+ * there is no session state to record it into (the CLI path) — that is what
584
+ * keeps the agent-facing response byte-identical. Recording is wrapped
585
+ * because a bookkeeping bug must never fail a tool call that already
586
+ * succeeded.
587
+ */
588
+ private takeExploreEmission;
589
+ /**
590
+ * Run a single read tool to completion and return its raw {@link ToolResult},
591
+ * classifying expected failures the same way {@link execute}'s catch does so
592
+ * the SHAPE is identical whether dispatch runs in-process or on a worker:
593
+ * NotIndexed → success-shaped guidance, PathRefusal → clean error, anything
594
+ * else → internal-error-with-retry. Never throws.
595
+ *
596
+ * This is the worker thread's entry point (see {@link ./query-worker}) and the
597
+ * in-process fallback for {@link execute}. It deliberately does NOT run the
598
+ * catch-up gate or the staleness/worktree notices — those need the daemon's
599
+ * watched main instance and stay on the main thread. Cross-cutting allowlist +
600
+ * path validation already ran in {@link execute} before routing here.
601
+ */
602
+ executeReadTool(toolName: string, args: Record<string, unknown>): Promise<ToolResult>;
603
+ /**
604
+ * Pure dispatch over the read tools — the switch, with no gate, no notices, no
605
+ * allowlist/validation (the caller owns those). `codegraph_status` is handled
606
+ * on the main thread in {@link execute} and never reaches here. May throw
607
+ * NotIndexed/PathRefusal, which {@link executeReadTool} classifies.
608
+ */
609
+ private dispatchTool;
610
+ /**
611
+ * Handle codegraph_search
612
+ */
613
+ private handleSearch;
614
+ /**
615
+ * Group symbol matches into DISTINCT DEFINITIONS — one group per
616
+ * (filePath, qualifiedName), so same-file overloads stay together while
617
+ * unrelated same-named classes across a monorepo's apps (#764: one
618
+ * `UserService` per NestJS app) are kept apart. Optionally narrowed by a
619
+ * `file` path/suffix first.
620
+ */
621
+ private groupDefinitions;
622
+ /** Section heading for one distinct definition in grouped output. */
623
+ private definitionHeading;
624
+ /**
625
+ * Handle codegraph_callers
626
+ */
627
+ private handleCallers;
628
+ /**
629
+ * Handle codegraph_callees
630
+ */
631
+ private handleCallees;
632
+ /**
633
+ * Handle codegraph_impact
634
+ */
635
+ private handleImpact;
636
+ /**
637
+ * Describe a synthesized (dynamic-dispatch) edge for human output: how the
638
+ * callback was wired up — the bridge static parsing can't see. Returns null
639
+ * for ordinary static edges. Used by trace + the node trail so a synthesized
640
+ * hop reads as "registered via onUpdate at App.tsx:3148", not a bare arrow.
641
+ */
642
+ /**
643
+ * The branch conditions a flow hop's call site runs under, read from the
644
+ * caller's source now (`graph/branch-guards.ts`); '' when unconditional,
645
+ * unreadable, or the grammar for that language is not loaded.
646
+ */
647
+ private whenLabel;
648
+ private synthEdgeNote;
649
+ /**
650
+ * Flow-from-named-symbols: an agent's codegraph_explore query is a bag of
651
+ * symbol names that usually spans the flow it's investigating (e.g.
652
+ * "PmsProductController getList PmsProductService list PmsProductServiceImpl").
653
+ * Surface the longest call chain AMONG those named symbols — scoped to what the
654
+ * agent explicitly named, so (unlike a fuzzy relevance set) there's no
655
+ * wrong-feature wandering. Rides synthesized edges, so controller→service-
656
+ * interface→impl shows up. Returns '' if no chain of >=3 nodes exists.
657
+ *
658
+ * Ambiguous tokens (Java `list` → dozens of nodes) are disambiguated by
659
+ * CO-NAMING: the agent names the class too, so we keep only `list` candidates
660
+ * whose qualifiedName contains another named token (`PmsProductServiceImpl::list`),
661
+ * dropping unrelated `OmsOrderService::list`.
662
+ */
663
+ private buildFlowFromNamedSymbols;
664
+ /**
665
+ * Dynamic-boundary surfacing (#687): when the flow among the agent's named
666
+ * symbols does not fully connect, scan the disconnected symbols' bodies for
667
+ * dynamic-dispatch sites (computed member calls, getattr, reflection, typed
668
+ * message buses, runtime-keyed emits) and ANNOUNCE the boundary — the exact
669
+ * site, the form, and (when a key is statically visible) candidate targets —
670
+ * instead of guessing edges. The answer to "how does A reach B" when no
671
+ * static path exists IS the dispatch site: that's where the flow continues
672
+ * at runtime. Query-time, deterministic, zero graph mutation; a fully
673
+ * connected flow never reaches this method.
674
+ */
675
+ private buildDynamicBoundaries;
676
+ /**
677
+ * Interface/registry-dispatch announcement — #687 extended to GRAPH-visible
678
+ * polymorphism (the body-scan can't see it: `nodeType.execute()` is textually
679
+ * an ordinary call; the polymorphism lives in the `implements`/`extends` edges).
680
+ *
681
+ * A method the agent named that resolves to a large same-name family whose
682
+ * definers overwhelmingly implement/extend ONE supertype is a runtime dispatch:
683
+ * the concrete target is chosen at runtime from N implementations, so no single
684
+ * static edge is "the answer" — the implementations ARE the continuations. We
685
+ * announce the supertype, its TRUE implementer count, and a few concrete targets,
686
+ * then steer to codegraph_explore. Graph-only, query-time, zero mutation; the
687
+ * caller fires it ONLY for an UNCOVERED named token, so a connected flow is silent.
688
+ *
689
+ * Robust to FTS sampling bias: the same-name family is a capped FTS sample that
690
+ * over-represents whatever FTS ranks first (n8n: DB `TableOperation.execute`
691
+ * outnumbered `INodeType.execute` in the sample 7:6 even though INodeType has
692
+ * 611 implementers vs a handful). So candidate supertypes are ranked by their
693
+ * TRUE graph-wide implementer count, NOT their frequency in the sample.
694
+ */
695
+ private buildPolymorphicBoundaries;
696
+ /**
697
+ * Render the candidate shortlist for a dispatch site as one line.
698
+ *
699
+ * The shortlist itself is `shortlistBoundaryCandidates` in
700
+ * `../graph/dynamic-boundary-report` — shared with the viewer's end cap, so
701
+ * "candidates for key `save`" names the same symbols in both places. Symbols
702
+ * the agent already named are marked: that is the "you were right, here's the
703
+ * wiring" case.
704
+ */
705
+ private boundaryCandidates;
706
+ /**
707
+ * Compact "blast radius" for the entry symbols of an explore result: who
708
+ * depends on each (callers) and which test files cover it — LOCATIONS ONLY,
709
+ * no source, so the agent knows what to update / re-verify before editing
710
+ * without reaching for a separate impact call. Always-on, but skips symbols
711
+ * that have no dependents (nothing to warn about), and returns '' when none
712
+ * qualify so a leaf-only exploration stays clean.
713
+ */
714
+ private buildBlastRadiusSection;
715
+ /**
716
+ * Test-coverage note for a blast-radius entry whose DIRECT callers include no
717
+ * test file. A helper called only by production code can still be exercised
718
+ * by tests further up the caller chain (#1475: 40% of directly-unflagged
719
+ * symbols had a test within 2-3 hops), so walk up to 2 more hops before
720
+ * claiming anything — and even then claim only what was measured.
721
+ */
722
+ private indirectTestNote;
723
+ /**
724
+ * Graph-connectivity relevance via Random-Walk-with-Restart (personalized
725
+ * PageRank) from the query's matched SEED nodes over the call/reference graph.
726
+ *
727
+ * This is the ranking signal text search (FTS/bm25) CANNOT provide, and it's
728
+ * codegraph's home turf: relevance by STRUCTURE, not words. A file whose
729
+ * symbols are call-connected to the matched cluster accrues walk mass and
730
+ * ranks high; a lone TEXT match — e.g. `LensSwitcher.swift` matched the word
731
+ * "switch" from `switchOrganization`, but calls none of `setUser`/`fetchUser`
732
+ * — gets only its own restart probability and ranks ~0. Immune to the
733
+ * tokenization trap that fools term matching, deterministic, no embeddings.
734
+ *
735
+ * Undirected adjacency (reachability both ways), restart α=0.25 to the seeds,
736
+ * power iteration to convergence. Bounded to the already-relevant subgraph, so
737
+ * it's a few hundred nodes × ~25 iterations — negligible cost.
738
+ */
739
+ private computeGraphRelevance;
740
+ /**
741
+ * Handle codegraph_explore — deep exploration in a single call
742
+ *
743
+ * Strategy: find relevant symbols via graph traversal, group by file,
744
+ * then read contiguous file sections covering all symbols per file.
745
+ * This replaces multiple codegraph_node + Read calls.
746
+ *
747
+ * Output size is adaptive to project file count via
748
+ * `getExploreOutputBudget` — see #185 for why a fixed 35k cap was a
749
+ * tax on small projects while earning its keep on large ones.
750
+ */
751
+ private handleExplore;
752
+ /**
753
+ * An explore response plus the record of what it emitted (CG-17). The record
754
+ * rides the result only as far as {@link execute}, which files it into the
755
+ * calling session's state and deletes it — see {@link EXPLORE_EMISSION_KEY}.
756
+ */
757
+ private exploreResult;
758
+ /**
759
+ * Handle codegraph_node
760
+ */
761
+ private handleNode;
762
+ /**
763
+ * FILE READ MODE: resolve `fileArg` (path or basename) to an indexed file and
764
+ * read it like the Read tool — its current on-disk source with line numbers,
765
+ * narrowable with `offset`/`limit` exactly as Read's are — preceded by a
766
+ * one-line blast-radius header (which files depend on it). `symbolsOnly`
767
+ * returns just the structural map (symbols + dependents) instead of source.
768
+ *
769
+ * Parity goal: the numbered source block is byte-for-byte the shape Read
770
+ * returns (`<n>\t<line>`, no padding), so the agent treats it as a Read — only
771
+ * faster (served from the index) and with the blast radius attached. Security:
772
+ * yaml/properties files are summarized by key, never dumped (#383); reads go
773
+ * through validatePathWithinRoot (#527).
774
+ */
775
+ private handleFileView;
776
+ /** Render one symbol: details + (optional) body/outline + its caller/callee trail. */
777
+ private renderNodeSection;
778
+ private static readonly STALE_WHOLE_FILE_MAX_LINES;
779
+ private static readonly STALE_WHOLE_FILE_MAX_CHARS;
780
+ /**
781
+ * codegraph_node render for a symbol whose file changed on disk after the
782
+ * last index sync (issue #1474). The indexed line range is no longer
783
+ * trustworthy, so no slice is emitted: a small file gets its full CURRENT
784
+ * source (Read-parity — sufficiency preserved, the agent still doesn't need
785
+ * Read); a large one gets an explicit notice steering to the tool's own
786
+ * file-read mode (or Read) — honest absence instead of confident wrongness.
787
+ * Location/signature stay (they're the index's answer) but are flagged as
788
+ * possibly shifted.
789
+ */
790
+ private renderStaleNodeSection;
791
+ /**
792
+ * Build the "trail" for a symbol: its direct callees (what it calls) and
793
+ * callers (what calls it), each with file:line — so codegraph_node doubles as
794
+ * the structural Grep→Read→expand primitive: a spot PLUS where to go next.
795
+ * Capped to stay cheap. Walk the graph by calling codegraph_node on a trail
796
+ * entry; no Read needed for covered hops. Empty edges on a non-leaf often mean
797
+ * dynamic dispatch the static graph couldn't resolve — that absence is itself
798
+ * a signal (read that one hop) rather than a dead end.
799
+ */
800
+ private formatTrail;
801
+ /**
802
+ * Handle codegraph_status
803
+ */
804
+ private handleStatus;
805
+ /**
806
+ * Handle codegraph_files - get project file structure from the index
807
+ */
808
+ private handleFiles;
809
+ /**
810
+ * Convert glob pattern to regex
811
+ */
812
+ private globToRegex;
813
+ /**
814
+ * Format files as a flat list
815
+ */
816
+ private formatFilesFlat;
817
+ /**
818
+ * Format files grouped by language
819
+ */
820
+ private formatFilesGrouped;
821
+ /**
822
+ * Format files as a tree structure
823
+ */
824
+ private formatFilesTree;
825
+ /**
826
+ * Find a symbol by name, handling disambiguation when multiple matches exist.
827
+ * Returns the best match and a note about alternatives if any.
828
+ */
829
+ /**
830
+ * Check if a node matches a symbol query — see `matchesSymbol` in
831
+ * `../graph/named-symbol-flow`, which owns the rules.
832
+ */
833
+ private matchesSymbol;
834
+ /**
835
+ * Find ALL definitions matching a name, ranked, so codegraph_node can return
836
+ * every overload instead of guessing one (the wrong guess → a Read). Keepers
837
+ * rank before generated stubs (.pb.go etc.); stable within a group preserves
838
+ * FTS order. Returns [] when nothing matches; a qualified lookup that finds no
839
+ * exact match returns [] rather than a misleading fuzzy file hit (#173); a
840
+ * bare name with no exact match falls back to the single top fuzzy result.
841
+ */
842
+ private findSymbolMatches;
843
+ /**
844
+ * Find ALL symbols matching a name. Used by callers/callees/impact to aggregate
845
+ * results across all matching symbols (e.g., multiple classes with an `execute` method).
846
+ *
847
+ * The resolution itself lives in `../graph/named-symbol-flow`, so the Flow
848
+ * strip and `codegraph_explore` resolve a written name to the same nodes.
849
+ */
850
+ private findAllSymbols;
851
+ /**
852
+ * Truncate output if it exceeds the maximum length
853
+ */
854
+ private truncateOutput;
855
+ private formatSearchResults;
856
+ private formatNodeList;
857
+ /**
858
+ * Relationship label for a non-`calls` edge in callers/callees lists. A
859
+ * function-as-value edge (#756) is the high-signal one: `callers(cb)`
860
+ * showing "via callback registration" tells the agent this is where the
861
+ * callback is WIRED, not where it's invoked.
862
+ */
863
+ private edgeLabel;
864
+ private formatImpact;
865
+ /**
866
+ * Build a compact structural outline of a container symbol from its
867
+ * indexed children (methods, fields, properties, …) — name, kind,
868
+ * line number, and signature — so the agent gets the shape of a class
869
+ * without the full source of every method. Returns '' when the container
870
+ * has no indexed children, so the caller can fall back to full source.
871
+ */
872
+ private buildContainerOutline;
873
+ private formatNodeDetails;
874
+ private textResult;
875
+ private errorResult;
876
+ }
877
+ //# sourceMappingURL=tools.d.ts.map