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,222 @@
1
+ "use strict";
2
+ /**
3
+ * `GET /api/file/<path>` — the File view in one round-trip.
4
+ *
5
+ * Three panes: what imports this file, the file's own outline in source order,
6
+ * and what this file imports. All of it comes from four batched queries — the
7
+ * file's nodes, their `contains` edges, their `imports` edges in each
8
+ * direction — never a query per symbol.
9
+ *
10
+ * Two things worth knowing about `imports` edges before reading the mapping
11
+ * below. First, they point at the *symbol* that was imported, not at the file
12
+ * holding it, so file granularity means mapping each edge's endpoint through
13
+ * `nodes.file_path`. Second, plenty of them stay inside one file (an import
14
+ * declaration is a node in the importing file), so the same-file ones have to
15
+ * be dropped or every file appears to import itself.
16
+ *
17
+ * The rails would still read as broken without the third piece: imports that
18
+ * never resolved. A file importing `react`, `fs` and one local module would
19
+ * otherwise show a single row, silently implying the other two do not exist.
20
+ * They are listed separately, as what they are — outside the index.
21
+ */
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ exports.buildFile = buildFile;
24
+ exports.buildOutlineEntries = buildOutlineEntries;
25
+ const query_utils_1 = require("../../search/query-utils");
26
+ const source_1 = require("./source");
27
+ const wire_1 = require("./wire");
28
+ /** Symbols named per import row before it just counts them. */
29
+ const MAX_SYMBOLS_PER_IMPORT = 12;
30
+ /** Unresolved imports listed by name. */
31
+ const MAX_UNRESOLVED_IMPORTS = 60;
32
+ function buildFile(cg, projectRoot, requested) {
33
+ // Refusal first, index lookup second — a traversal out of the project is a
34
+ // refusal, not "no such file". See `resolveRequestedFile`.
35
+ const { record, storedPath } = (0, source_1.resolveRequestedFile)(cg, projectRoot, requested);
36
+ const nodes = cg.getNodesInFile(storedPath);
37
+ const nodeIds = nodes.map((n) => n.id);
38
+ const inThisFile = new Set(nodeIds);
39
+ const fileNode = nodes.find((n) => n.kind === 'file') ?? null;
40
+ // ---------------------------------------------------------------------------
41
+ // Outline
42
+ // ---------------------------------------------------------------------------
43
+ const { entries: outline, total: outlineTotal } = buildOutlineEntries(cg, nodes);
44
+ // ---------------------------------------------------------------------------
45
+ // Import rails
46
+ // ---------------------------------------------------------------------------
47
+ const importsOut = cg.getOutgoingEdgesFrom(nodeIds, ['imports']);
48
+ const importsIn = cg.getIncomingEdgesTo(nodeIds, ['imports']);
49
+ const endpointIds = new Set();
50
+ for (const edge of importsOut)
51
+ if (!inThisFile.has(edge.target))
52
+ endpointIds.add(edge.target);
53
+ for (const edge of importsIn)
54
+ if (!inThisFile.has(edge.source))
55
+ endpointIds.add(edge.source);
56
+ const endpoints = cg.getNodesByIds([...endpointIds]);
57
+ const imports = groupByFile(importsOut.filter((e) => !inThisFile.has(e.target)), (e) => e.target, endpoints);
58
+ const importedBy = groupByFile(importsIn.filter((e) => !inThisFile.has(e.source)), (e) => e.source, endpoints);
59
+ // Import statements that never resolved — the third-party packages and
60
+ // runtime builtins. Attributed to the file node, which is where extraction
61
+ // records a file-level import.
62
+ const unresolvedImports = fileNode ? unresolvedImportsOf(cg, fileNode.id) : [];
63
+ // Whether the file RUNS anything at its top level. Extraction records a
64
+ // statement outside any definition as an edge out of the FILE node, so a
65
+ // module that only defines things has none and a CLI entry point has many —
66
+ // the same signal `/api/entrypoints` ranks on. It is worth a line on this
67
+ // screen because the outline cannot show it: top-level code belongs to no
68
+ // symbol, so the only way to read it is to open the file node itself.
69
+ const topLevelEdges = fileNode
70
+ ? cg.getOutgoingEdgesFrom([fileNode.id], ['calls', 'instantiates'])
71
+ : [];
72
+ return {
73
+ file: {
74
+ path: (0, wire_1.toPosixPath)(storedPath),
75
+ language: record.language,
76
+ size: record.size,
77
+ modifiedAt: record.modifiedAt,
78
+ indexedAt: record.indexedAt,
79
+ contentHash: record.contentHash,
80
+ nodeCount: record.nodeCount,
81
+ generated: record.generated === true,
82
+ test: (0, query_utils_1.isTestFile)((0, wire_1.toPosixPath)(storedPath)),
83
+ errors: record.errors ?? [],
84
+ /** The file node itself, so the viewer can navigate to it as a symbol. */
85
+ id: fileNode?.id ?? null,
86
+ },
87
+ /**
88
+ * Calls made at the top level of the file, outside every definition.
89
+ * Counted as distinct call SITES — `(target, line, column)` — so a call
90
+ * two resolvers both recorded is one thing to read, not two.
91
+ */
92
+ topLevel: {
93
+ calls: new Set(topLevelEdges.map((e) => `${e.target}:${e.line ?? 0}:${e.column ?? 0}`)).size,
94
+ },
95
+ /** The file changed on disk since it was indexed — the outline's lines may be shifted. */
96
+ drift: (0, source_1.hasDriftedOnDisk)(projectRoot, storedPath, record),
97
+ outline: (0, wire_1.wireList)(outline, outlineTotal),
98
+ imports: (0, wire_1.wireList)(imports.slice(0, wire_1.MAX_IMPORT_FILES), imports.length),
99
+ importedBy: (0, wire_1.wireList)(importedBy.slice(0, wire_1.MAX_IMPORT_FILES), importedBy.length),
100
+ unresolvedImports,
101
+ /**
102
+ * The broader relationship: every file this one has a cross-file edge into,
103
+ * and every file that has one into it — calls and type references, not just
104
+ * import statements. `imports` alone understates both, badly in languages
105
+ * where symbols resolve without an explicit import.
106
+ */
107
+ dependencies: cg.getFileDependencies(storedPath).map(wire_1.toPosixPath).sort(),
108
+ dependents: cg.getFileDependents(storedPath).map(wire_1.toPosixPath).sort(),
109
+ };
110
+ }
111
+ /**
112
+ * A file's symbols in source order, nested under their container.
113
+ *
114
+ * Extracted so the whole-file source view (`/api/filecode`) draws the same rows
115
+ * as the outline view rather than a second, subtly different reading of the
116
+ * same `contains` edges — an outline rail whose line numbers disagreed with the
117
+ * source beside it would be worse than no rail.
118
+ *
119
+ * Four batched queries whatever the file holds: its nodes are already in hand,
120
+ * their `contains` edges, and fan-in / fan-out for the whole set at once.
121
+ *
122
+ * @returns the capped rows and the TRUE symbol count, which is what a header
123
+ * has to print — see `wireList`.
124
+ */
125
+ function buildOutlineEntries(cg, nodes) {
126
+ const nodeIds = nodes.map((n) => n.id);
127
+ const inThisFile = new Set(nodeIds);
128
+ const fileNodeId = nodes.find((n) => n.kind === 'file')?.id;
129
+ const parentOf = new Map();
130
+ for (const edge of cg.getOutgoingEdgesFrom(nodeIds, ['contains'])) {
131
+ // Only nesting *within* this file: a `contains` edge reaching out of it is
132
+ // not something a file outline can draw.
133
+ if (inThisFile.has(edge.target) && !parentOf.has(edge.target)) {
134
+ parentOf.set(edge.target, edge.source);
135
+ }
136
+ }
137
+ const fanIn = cg.getFanIn(nodeIds);
138
+ const fanOut = cg.getFanOut(nodeIds);
139
+ const outlineNodes = nodes
140
+ // The file node is the subject of the screen, not a row in its own outline;
141
+ // import declarations get their own rail and would otherwise be most of it.
142
+ .filter((n) => n.kind !== 'file' && n.kind !== 'import')
143
+ .sort((a, b) => a.startLine - b.startLine || a.name.localeCompare(b.name));
144
+ const entries = outlineNodes.slice(0, wire_1.MAX_OUTLINE_NODES).map((node) => ({
145
+ ...(0, wire_1.toNodeRef)(node),
146
+ parentId: resolveOutlineParent(node.id, parentOf, fileNodeId),
147
+ depth: depthOf(node.id, parentOf, fileNodeId),
148
+ fanIn: fanIn.get(node.id) ?? 0,
149
+ fanOut: fanOut.get(node.id) ?? 0,
150
+ }));
151
+ return { entries, total: outlineNodes.length };
152
+ }
153
+ /**
154
+ * The outline parent of a symbol: its container within the file, or null when
155
+ * that container is the file node itself (a top-level symbol has no parent row).
156
+ */
157
+ function resolveOutlineParent(id, parentOf, fileNodeId) {
158
+ const parent = parentOf.get(id);
159
+ if (!parent || parent === fileNodeId)
160
+ return null;
161
+ return parent;
162
+ }
163
+ function depthOf(id, parentOf, fileNodeId) {
164
+ let depth = 0;
165
+ let current = id;
166
+ // Bounded by the number of links so a cyclic `contains` chain — which should
167
+ // be impossible, but is one bad index away — cannot spin here.
168
+ for (let guard = 0; guard < 32; guard++) {
169
+ const parent = parentOf.get(current);
170
+ if (!parent || parent === fileNodeId)
171
+ return depth;
172
+ depth++;
173
+ current = parent;
174
+ }
175
+ return depth;
176
+ }
177
+ /** Fold edges into one row per file at the far end, ordered by symbol count. */
178
+ function groupByFile(edges, endpoint, nodes) {
179
+ const byFile = new Map();
180
+ for (const edge of edges) {
181
+ const node = nodes.get(endpoint(edge));
182
+ if (!node)
183
+ continue;
184
+ const file = (0, wire_1.toPosixPath)(node.filePath);
185
+ let bucket = byFile.get(file);
186
+ if (!bucket) {
187
+ bucket = new Map();
188
+ byFile.set(file, bucket);
189
+ }
190
+ bucket.set(node.id, node);
191
+ }
192
+ return [...byFile.entries()]
193
+ .map(([file, symbols]) => {
194
+ const ordered = [...symbols.values()].sort((a, b) => a.startLine - b.startLine || a.name.localeCompare(b.name));
195
+ return {
196
+ file,
197
+ test: (0, query_utils_1.isTestFile)(file),
198
+ symbols: ordered.slice(0, MAX_SYMBOLS_PER_IMPORT).map((n) => ({
199
+ id: n.id,
200
+ name: n.name,
201
+ kind: n.kind,
202
+ line: n.startLine,
203
+ })),
204
+ symbolCount: ordered.length,
205
+ };
206
+ })
207
+ .sort((a, b) => b.symbolCount - a.symbolCount || a.file.localeCompare(b.file));
208
+ }
209
+ function unresolvedImportsOf(cg, fileNodeId) {
210
+ try {
211
+ return cg
212
+ .getUnresolvedReferencesFrom(fileNodeId)
213
+ .filter((ref) => ref.referenceKind === 'imports')
214
+ .sort((a, b) => a.line - b.line || a.referenceName.localeCompare(b.referenceName))
215
+ .slice(0, MAX_UNRESOLVED_IMPORTS)
216
+ .map((ref) => ({ name: ref.referenceName, line: ref.line }));
217
+ }
218
+ catch {
219
+ return [];
220
+ }
221
+ }
222
+ //# sourceMappingURL=file.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file.js","sourceRoot":"","sources":["../../../src/ui-server/api/file.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;AAyCH,8BA0FC;AAgBD,kDAmCC;AAlLD,0DAAsD;AACtD,qCAAkE;AAClE,iCAOgB;AAEhB,+DAA+D;AAC/D,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAElC,yCAAyC;AACzC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAsBlC,SAAgB,SAAS,CAAC,EAAa,EAAE,WAAmB,EAAE,SAAiB;IAC7E,2EAA2E;IAC3E,2DAA2D;IAC3D,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,IAAA,6BAAoB,EAAC,EAAE,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;IAEhF,MAAM,KAAK,GAAG,EAAE,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;IAC5C,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACvC,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;IACpC,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC;IAE9D,8EAA8E;IAC9E,UAAU;IACV,8EAA8E;IAC9E,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,mBAAmB,CAAC,EAAE,EAAE,KAA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,UAAkB;IAElB,IAAI,CAAC;QACH,OAAO,EAAE;aACN,2BAA2B,CAAC,UAAU,CAAC;aACvC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,aAAa,KAAK,SAAS,CAAC;aAChD,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;aACjF,KAAK,CAAC,CAAC,EAAE,sBAAsB,CAAC;aAChC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,aAAa,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IACjE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
@@ -0,0 +1,126 @@
1
+ /**
2
+ * `GET /api/filecode/<path>` — the whole-file source view in one round-trip.
3
+ *
4
+ * The Symbol view asks "what does this body reach"; this screen asks the same
5
+ * question of every line of a file at once, and answers it beside the file's
6
+ * own source. What that needs is one payload holding everything the graph says
7
+ * about lines in this file, and nothing that depends on scroll position:
8
+ *
9
+ * * the file's symbols in source order — the sticky outline rail, and the
10
+ * definition line every intra-file arc lands on,
11
+ * * one row per (calling symbol, called symbol) pair, carrying the call-site
12
+ * lines the gutter ports and the callee rail anchor to,
13
+ * * the references that never resolved, so a line that reaches `console.log`
14
+ * still shows a hollow port instead of an empty gutter that reads as
15
+ * "nothing happens here",
16
+ * * the file's total line count, which IS the layout: every line is a fixed
17
+ * height, so the viewer can size a 6 800-line document and start drawing
18
+ * before a single page of source has arrived.
19
+ *
20
+ * The source itself does NOT ride along. A 6 800-line TypeScript file is ~1.5 s
21
+ * of parsing and megabytes of JSON; the viewer pages it through
22
+ * `/api/source` as the reader scrolls, which is also what lets the graph
23
+ * facts — ports, arcs, rail rows — be complete from the first frame while the
24
+ * text fills in behind them.
25
+ *
26
+ * **The arcs are not a separate list.** An arc is a call whose target is
27
+ * defined in this same file, so the viewer derives them from `calls` and the
28
+ * `intraFileCalls` count here is computed from the SHOWN groups for the same
29
+ * reason: a header that counted raw edges would disagree with the picture under
30
+ * it the moment a cap bit.
31
+ */
32
+ import type { CodeGraph } from '../../index';
33
+ import { type WireOutlineEntry } from './file';
34
+ import { type WireList, type WireRelation } from './wire';
35
+ /**
36
+ * Call groups returned for one file.
37
+ *
38
+ * A generous cap, not a display budget: the viewer only ever draws the rows in
39
+ * the window it is scrolled to, so the number that matters is what a payload
40
+ * costs to ship. This repo's largest file (`src/mcp/tools.ts`, 6 820 lines)
41
+ * produces 498.
42
+ */
43
+ export declare const MAX_FILE_CALL_GROUPS = 2000;
44
+ /**
45
+ * Unresolved references returned for one file.
46
+ *
47
+ * These are markers, not rows — each one is a hollow port and a soft underline
48
+ * with nothing behind it. `src/mcp/tools.ts` has 1 113; a generated bundle can
49
+ * have tens of thousands, and past this point the count says everything the
50
+ * list would.
51
+ */
52
+ export declare const MAX_FILE_OUTSIDE_REFS = 3000;
53
+ /**
54
+ * Unresolved-reference rows read before the count itself becomes a floor.
55
+ *
56
+ * `total` has to be the real number — the rest of this API guarantees that a
57
+ * count equals a list — and the filter below (plain identifiers only) is not
58
+ * expressible in SQL, so the rows have to be scanned to be counted. This is the
59
+ * backstop against a generated bundle with a million of them, and it is far
60
+ * above anything hand-written: the largest file in this repo's own index has
61
+ * 1 113.
62
+ */
63
+ export declare const MAX_FILE_OUTSIDE_SCAN = 50000;
64
+ /** A reference the resolver never landed: a port with no destination. */
65
+ export interface WireFileOutsideRef {
66
+ line: number;
67
+ col: number;
68
+ /** The identifier as written — how the viewer finds the token to underline. */
69
+ name: string;
70
+ kind: string;
71
+ }
72
+ /** Every edge from ONE symbol in this file to ONE symbol anywhere. */
73
+ export interface WireFileCall {
74
+ /**
75
+ * The symbol in this file that makes the calls.
76
+ *
77
+ * Never null: extraction records a statement outside every definition as an
78
+ * edge out of the FILE node, so top-level code has an owner too — the file
79
+ * itself.
80
+ */
81
+ ownerId: string;
82
+ /** First line of the owner's definition, so a rail row can be attributed. */
83
+ ownerLine: number;
84
+ relation: WireRelation;
85
+ }
86
+ export interface WireFileCodePayload {
87
+ file: {
88
+ path: string;
89
+ language: string;
90
+ size: number;
91
+ indexedAt: number;
92
+ contentHash: string;
93
+ generated: boolean;
94
+ test: boolean;
95
+ errors: string[];
96
+ /** The file node's own id — the owner of every top-level call. */
97
+ id: string | null;
98
+ /**
99
+ * Lines on disk right now. Null when the file could not be read, which is
100
+ * the one case the viewer cannot lay out and says so.
101
+ */
102
+ totalLines: number | null;
103
+ };
104
+ /** The file changed on disk since it was indexed — every line number is suspect. */
105
+ drift: boolean;
106
+ /** Why, when there is something to say beyond the flag. */
107
+ reason?: string;
108
+ /** The file's symbols in source order — the same rows `/api/file` draws. */
109
+ outline: WireList<WireOutlineEntry>;
110
+ /** One row per (calling symbol, called symbol) pair, in call-site order. */
111
+ calls: WireList<WireFileCall>;
112
+ /** References with nothing behind them — hollow ports. */
113
+ outside: WireList<WireFileOutsideRef>;
114
+ /**
115
+ * Calls landing on a definition in THIS file — the arc diagram's total.
116
+ *
117
+ * Counted over the groups actually returned, so it always equals the number
118
+ * of arcs the viewer can draw from this payload.
119
+ */
120
+ intraFileCalls: number;
121
+ timing: {
122
+ elapsedMs: number;
123
+ };
124
+ }
125
+ export declare function buildFileCode(cg: CodeGraph, projectRoot: string, requested: string): WireFileCodePayload;
126
+ //# sourceMappingURL=filecode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filecode.d.ts","sourceRoot":"","sources":["../../../src/ui-server/api/filecode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAG7C,OAAO,EAAuB,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,KAAK,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAC;IAC9B,0DAA0D;IAC1D,OAAO,EAAE,QAAQ,CAAC,kBAAkB,CAAC,CAAC;IACtC;;;;;OAKG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;CAC/B;AAED,wBAAgB,aAAa,CAC3B,EAAE,EAAE,SAAS,EACb,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAChB,mBAAmB,CA0CrB"}
@@ -0,0 +1,205 @@
1
+ "use strict";
2
+ /**
3
+ * `GET /api/filecode/<path>` — the whole-file source view in one round-trip.
4
+ *
5
+ * The Symbol view asks "what does this body reach"; this screen asks the same
6
+ * question of every line of a file at once, and answers it beside the file's
7
+ * own source. What that needs is one payload holding everything the graph says
8
+ * about lines in this file, and nothing that depends on scroll position:
9
+ *
10
+ * * the file's symbols in source order — the sticky outline rail, and the
11
+ * definition line every intra-file arc lands on,
12
+ * * one row per (calling symbol, called symbol) pair, carrying the call-site
13
+ * lines the gutter ports and the callee rail anchor to,
14
+ * * the references that never resolved, so a line that reaches `console.log`
15
+ * still shows a hollow port instead of an empty gutter that reads as
16
+ * "nothing happens here",
17
+ * * the file's total line count, which IS the layout: every line is a fixed
18
+ * height, so the viewer can size a 6 800-line document and start drawing
19
+ * before a single page of source has arrived.
20
+ *
21
+ * The source itself does NOT ride along. A 6 800-line TypeScript file is ~1.5 s
22
+ * of parsing and megabytes of JSON; the viewer pages it through
23
+ * `/api/source` as the reader scrolls, which is also what lets the graph
24
+ * facts — ports, arcs, rail rows — be complete from the first frame while the
25
+ * text fills in behind them.
26
+ *
27
+ * **The arcs are not a separate list.** An arc is a call whose target is
28
+ * defined in this same file, so the viewer derives them from `calls` and the
29
+ * `intraFileCalls` count here is computed from the SHOWN groups for the same
30
+ * reason: a header that counted raw edges would disagree with the picture under
31
+ * it the moment a cap bit.
32
+ */
33
+ Object.defineProperty(exports, "__esModule", { value: true });
34
+ exports.MAX_FILE_OUTSIDE_SCAN = exports.MAX_FILE_OUTSIDE_REFS = exports.MAX_FILE_CALL_GROUPS = void 0;
35
+ exports.buildFileCode = buildFileCode;
36
+ const query_utils_1 = require("../../search/query-utils");
37
+ const file_1 = require("./file");
38
+ const source_1 = require("./source");
39
+ const respond_1 = require("./respond");
40
+ const wire_1 = require("./wire");
41
+ /**
42
+ * Call groups returned for one file.
43
+ *
44
+ * A generous cap, not a display budget: the viewer only ever draws the rows in
45
+ * the window it is scrolled to, so the number that matters is what a payload
46
+ * costs to ship. This repo's largest file (`src/mcp/tools.ts`, 6 820 lines)
47
+ * produces 498.
48
+ */
49
+ exports.MAX_FILE_CALL_GROUPS = 2000;
50
+ /**
51
+ * Unresolved references returned for one file.
52
+ *
53
+ * These are markers, not rows — each one is a hollow port and a soft underline
54
+ * with nothing behind it. `src/mcp/tools.ts` has 1 113; a generated bundle can
55
+ * have tens of thousands, and past this point the count says everything the
56
+ * list would.
57
+ */
58
+ exports.MAX_FILE_OUTSIDE_REFS = 3000;
59
+ /**
60
+ * Unresolved-reference rows read before the count itself becomes a floor.
61
+ *
62
+ * `total` has to be the real number — the rest of this API guarantees that a
63
+ * count equals a list — and the filter below (plain identifiers only) is not
64
+ * expressible in SQL, so the rows have to be scanned to be counted. This is the
65
+ * backstop against a generated bundle with a million of them, and it is far
66
+ * above anything hand-written: the largest file in this repo's own index has
67
+ * 1 113.
68
+ */
69
+ exports.MAX_FILE_OUTSIDE_SCAN = 50_000;
70
+ function buildFileCode(cg, projectRoot, requested) {
71
+ const started = Date.now();
72
+ if (requested === '')
73
+ throw (0, respond_1.badRequest)('No file path was given. Use /api/filecode/<path>.');
74
+ // Refusal first, index lookup second — see `resolveRequestedFile`.
75
+ const { record, storedPath } = (0, source_1.resolveRequestedFile)(cg, projectRoot, requested);
76
+ const posixPath = (0, wire_1.toPosixPath)(storedPath);
77
+ const nodes = cg.getNodesInFile(storedPath);
78
+ const fileNode = nodes.find((n) => n.kind === 'file') ?? null;
79
+ const { entries: outline, total: outlineTotal } = (0, file_1.buildOutlineEntries)(cg, nodes);
80
+ const { calls, total: callTotal, intraFileCalls } = buildCalls(cg, nodes, posixPath);
81
+ const outside = buildOutsideRefs(cg, storedPath);
82
+ // One read answers both the drift verdict and the document's height.
83
+ const shape = (0, source_1.readFileShape)(projectRoot, storedPath, record);
84
+ return {
85
+ file: {
86
+ path: posixPath,
87
+ language: record.language,
88
+ size: record.size,
89
+ indexedAt: record.indexedAt,
90
+ contentHash: record.contentHash,
91
+ generated: record.generated === true,
92
+ test: (0, query_utils_1.isTestFile)(posixPath),
93
+ // Messages, not the raw records: the screen prints a count and a line,
94
+ // and an extractor's file/line bookkeeping is not something a reader acts
95
+ // on.
96
+ errors: (record.errors ?? []).map((e) => e.message),
97
+ id: fileNode?.id ?? null,
98
+ totalLines: shape.totalLines,
99
+ },
100
+ drift: shape.drift,
101
+ ...(shape.reason ? { reason: shape.reason } : {}),
102
+ outline: (0, wire_1.wireList)(outline, outlineTotal),
103
+ calls: (0, wire_1.wireList)(calls, callTotal),
104
+ outside: (0, wire_1.wireList)(outside.items, outside.total),
105
+ intraFileCalls,
106
+ timing: { elapsedMs: Date.now() - started },
107
+ };
108
+ }
109
+ /**
110
+ * Every outgoing edge from every symbol in the file, grouped twice over: by the
111
+ * symbol that makes the call, and within that by the symbol it reaches.
112
+ *
113
+ * Grouping by the OWNER as well as the target is what separates this from the
114
+ * Symbol view's rail. Across one body, a helper called from three lines is one
115
+ * row with `×3` and one place to sit. Across a 6 800-line file, the same helper
116
+ * called from two different functions a thousand lines apart cannot be one row
117
+ * — a row is anchored to a line, and there is no line that is both. So the pair
118
+ * is the unit, and the rail reads in source order the way the file does.
119
+ *
120
+ * `contains` is excluded, as everywhere else: it is structure, not dependency,
121
+ * and the outline already draws it.
122
+ */
123
+ function buildCalls(cg, nodes, posixPath) {
124
+ const nodeIds = nodes.map((n) => n.id);
125
+ const lineOf = new Map(nodes.map((n) => [n.id, n.startLine]));
126
+ const edges = cg.getOutgoingEdgesFrom(nodeIds).filter((e) => e.kind !== 'contains');
127
+ if (edges.length === 0)
128
+ return { calls: [], total: 0, intraFileCalls: 0 };
129
+ const bySource = new Map();
130
+ for (const edge of edges) {
131
+ const bucket = bySource.get(edge.source);
132
+ if (bucket)
133
+ bucket.push(edge);
134
+ else
135
+ bySource.set(edge.source, [edge]);
136
+ }
137
+ // One batched lookup for every counterpart, never one per edge: the engine's
138
+ // busiest file reaches several hundred distinct symbols.
139
+ const endpoints = cg.getNodesByIds([...new Set(edges.map((e) => e.target))]);
140
+ const all = [];
141
+ for (const [ownerId, group] of bySource) {
142
+ for (const relation of (0, wire_1.groupRelations)(group, (e) => e.target, endpoints)) {
143
+ all.push({ ownerId, ownerLine: lineOf.get(ownerId) ?? 0, relation });
144
+ }
145
+ }
146
+ // Source order — the only ordering this screen has. A row with no recorded
147
+ // call site (an edge the extractor gave no line) sorts to the end, where it
148
+ // is also what a cap trims first.
149
+ all.sort((a, b) => (0, wire_1.firstLine)(a.relation) - (0, wire_1.firstLine)(b.relation) ||
150
+ a.ownerLine - b.ownerLine ||
151
+ a.relation.node.name.localeCompare(b.relation.node.name));
152
+ const calls = all.slice(0, exports.MAX_FILE_CALL_GROUPS);
153
+ // Arcs, counted over what was KEPT — see the module comment.
154
+ let intraFileCalls = 0;
155
+ for (const call of calls) {
156
+ if (call.relation.node.file !== posixPath)
157
+ continue;
158
+ const target = call.relation.node.line;
159
+ for (const line of call.relation.lines)
160
+ if (line !== target)
161
+ intraFileCalls++;
162
+ }
163
+ return { calls, total: all.length, intraFileCalls };
164
+ }
165
+ /**
166
+ * The file's unresolved references, as line markers.
167
+ *
168
+ * Only plain identifiers survive. The resolver's samples are bookkeeping, and a
169
+ * "name" that is really a whole arrow function or a receiver expression cannot
170
+ * be matched to a token on the line — a marker that could not find its
171
+ * identifier would silently claim the wrong one, which is worse than no marker.
172
+ * The same filter the Symbol view applies, applied once here rather than per
173
+ * symbol.
174
+ */
175
+ function buildOutsideRefs(cg, storedPath) {
176
+ let raw;
177
+ try {
178
+ // Scanned, not capped at the display limit: `total` must be the real count
179
+ // and the identifier filter below cannot run in SQL.
180
+ raw = cg.getUnresolvedReferencesInFile(storedPath, exports.MAX_FILE_OUTSIDE_SCAN);
181
+ }
182
+ catch {
183
+ return { items: [], total: 0 };
184
+ }
185
+ const items = [];
186
+ let total = 0;
187
+ for (const ref of raw) {
188
+ const name = lastSegment(ref.referenceName ?? '');
189
+ if (!/^[A-Za-z_$][\w$]*$/.test(name))
190
+ continue;
191
+ if (!ref.line)
192
+ continue;
193
+ total++;
194
+ if (items.length < exports.MAX_FILE_OUTSIDE_REFS) {
195
+ items.push({ line: ref.line, col: ref.column ?? 0, name, kind: ref.referenceKind });
196
+ }
197
+ }
198
+ return { items, total };
199
+ }
200
+ /** The trailing segment of a dotted name — what actually appears in the source. */
201
+ function lastSegment(name) {
202
+ const dot = name.lastIndexOf('.');
203
+ return dot < 0 ? name : name.slice(dot + 1);
204
+ }
205
+ //# sourceMappingURL=filecode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filecode.js","sourceRoot":"","sources":["../../../src/ui-server/api/filecode.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;;;AA+GH,sCA8CC;AAzJD,0DAAsD;AACtD,iCAAoE;AACpE,qCAA+D;AAC/D,uCAAuC;AACvC,iCAOgB;AAEhB;;;;;;;GAOG;AACU,QAAA,oBAAoB,GAAG,IAAI,CAAC;AAEzC;;;;;;;GAOG;AACU,QAAA,qBAAqB,GAAG,IAAI,CAAC;AAE1C;;;;;;;;;GASG;AACU,QAAA,qBAAqB,GAAG,MAAM,CAAC;AAgE5C,SAAgB,aAAa,CAC3B,EAAa,EACb,WAAmB,EACnB,SAAiB;IAEjB,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAC3B,IAAI,SAAS,KAAK,EAAE;QAAE,MAAM,I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