kirograph 0.28.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (753) hide show
  1. package/dist/architecture/index.js +4 -1
  2. package/dist/architecture/index.js.map +2 -2
  3. package/dist/architecture/manifest/index.js +13 -2
  4. package/dist/architecture/manifest/index.js.map +2 -2
  5. package/dist/bin/commands/install.js +2 -1
  6. package/dist/bin/commands/install.js.map +2 -2
  7. package/dist/bin/commands/status.js +2 -1
  8. package/dist/bin/commands/status.js.map +2 -2
  9. package/dist/bin/commands/uninit.js +2 -1
  10. package/dist/bin/commands/uninit.js.map +2 -2
  11. package/dist/bin/commands/vulns.js +10 -5
  12. package/dist/bin/commands/vulns.js.map +2 -2
  13. package/dist/bin/installer/common.js +7 -1
  14. package/dist/bin/installer/common.js.map +2 -2
  15. package/dist/bin/installer/config-prompt.js +117 -100
  16. package/dist/bin/installer/config-prompt.js.map +3 -3
  17. package/dist/bin/installer/detect.js +10 -0
  18. package/dist/bin/installer/detect.js.map +2 -2
  19. package/dist/bin/installer/hooks.js +13 -8
  20. package/dist/bin/installer/hooks.js.map +2 -2
  21. package/dist/bin/installer/targets/antigravity.js +1 -1
  22. package/dist/bin/installer/targets/antigravity.js.map +2 -2
  23. package/dist/bin/installer/targets/claude.js +1 -1
  24. package/dist/bin/installer/targets/claude.js.map +2 -2
  25. package/dist/bin/installer/targets/codex.js +1 -1
  26. package/dist/bin/installer/targets/codex.js.map +2 -2
  27. package/dist/bin/installer/targets/commandcode.js +84 -0
  28. package/dist/bin/installer/targets/commandcode.js.map +7 -0
  29. package/dist/bin/installer/targets/copilot.js +1 -1
  30. package/dist/bin/installer/targets/copilot.js.map +2 -2
  31. package/dist/bin/installer/targets/cursor.js +2 -2
  32. package/dist/bin/installer/targets/cursor.js.map +2 -2
  33. package/dist/bin/installer/targets/devin.js +1 -1
  34. package/dist/bin/installer/targets/devin.js.map +2 -2
  35. package/dist/bin/installer/targets/gemini-cli.js +1 -1
  36. package/dist/bin/installer/targets/gemini-cli.js.map +2 -2
  37. package/dist/bin/installer/targets/index.js +10 -0
  38. package/dist/bin/installer/targets/index.js.map +2 -2
  39. package/dist/bin/installer/targets/opencode.js +1 -1
  40. package/dist/bin/installer/targets/opencode.js.map +2 -2
  41. package/dist/bin/installer/targets/windsurf.js +1 -1
  42. package/dist/bin/installer/targets/windsurf.js.map +2 -2
  43. package/dist/bin/kirograph.js +1 -1
  44. package/dist/bin/kirograph.js.map +1 -1
  45. package/dist/config.js +21 -1
  46. package/dist/config.js.map +2 -2
  47. package/dist/core/pipeline.js +18 -6
  48. package/dist/core/pipeline.js.map +2 -2
  49. package/dist/extraction/extractor.js +58 -1
  50. package/dist/extraction/extractor.js.map +2 -2
  51. package/dist/extraction/grammars.js +38 -3
  52. package/dist/extraction/grammars.js.map +2 -2
  53. package/dist/extraction/wasm/tree-sitter-bash.wasm +0 -0
  54. package/dist/extraction/wasm/tree-sitter-c.wasm +0 -0
  55. package/dist/extraction/wasm/tree-sitter-c_sharp.wasm +0 -0
  56. package/dist/extraction/wasm/tree-sitter-cpp.wasm +0 -0
  57. package/dist/extraction/wasm/tree-sitter-csharp.wasm +0 -0
  58. package/dist/extraction/wasm/tree-sitter-css.wasm +0 -0
  59. package/dist/extraction/wasm/tree-sitter-dart.wasm +0 -0
  60. package/dist/extraction/wasm/tree-sitter-elisp.wasm +0 -0
  61. package/dist/extraction/wasm/tree-sitter-elixir.wasm +0 -0
  62. package/dist/extraction/wasm/tree-sitter-elm.wasm +0 -0
  63. package/dist/extraction/wasm/tree-sitter-embedded_template.wasm +0 -0
  64. package/dist/extraction/wasm/tree-sitter-embeddedtemplate.wasm +0 -0
  65. package/dist/extraction/wasm/tree-sitter-go.wasm +0 -0
  66. package/dist/extraction/wasm/tree-sitter-html.wasm +0 -0
  67. package/dist/extraction/wasm/tree-sitter-java.wasm +0 -0
  68. package/dist/extraction/wasm/tree-sitter-javascript.wasm +0 -0
  69. package/dist/extraction/wasm/tree-sitter-json.wasm +0 -0
  70. package/dist/extraction/wasm/tree-sitter-kotlin.wasm +0 -0
  71. package/dist/extraction/wasm/tree-sitter-lua.wasm +0 -0
  72. package/dist/extraction/wasm/tree-sitter-objc.wasm +0 -0
  73. package/dist/extraction/wasm/tree-sitter-ocaml.wasm +0 -0
  74. package/dist/extraction/wasm/tree-sitter-php.wasm +0 -0
  75. package/dist/extraction/wasm/tree-sitter-python.wasm +0 -0
  76. package/dist/extraction/wasm/tree-sitter-ql.wasm +0 -0
  77. package/dist/extraction/wasm/tree-sitter-rescript.wasm +0 -0
  78. package/dist/extraction/wasm/tree-sitter-ruby.wasm +0 -0
  79. package/dist/extraction/wasm/tree-sitter-rust.wasm +0 -0
  80. package/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
  81. package/dist/extraction/wasm/tree-sitter-solidity.wasm +0 -0
  82. package/dist/extraction/wasm/tree-sitter-swift.wasm +0 -0
  83. package/dist/extraction/wasm/tree-sitter-systemrdl.wasm +0 -0
  84. package/dist/extraction/wasm/tree-sitter-tlaplus.wasm +0 -0
  85. package/dist/extraction/wasm/tree-sitter-toml.wasm +0 -0
  86. package/dist/extraction/wasm/tree-sitter-tsx.wasm +0 -0
  87. package/dist/extraction/wasm/tree-sitter-typescript.wasm +0 -0
  88. package/dist/extraction/wasm/tree-sitter-vue.wasm +0 -0
  89. package/dist/extraction/wasm/tree-sitter-yaml.wasm +0 -0
  90. package/dist/extraction/wasm/tree-sitter-zig.wasm +0 -0
  91. package/dist/frameworks/index.js +68 -7
  92. package/dist/frameworks/index.js.map +2 -2
  93. package/dist/security/manifest/adapter.js +17 -2
  94. package/dist/security/manifest/adapter.js.map +2 -2
  95. package/dist/security/manifest/parser.js +2 -2
  96. package/dist/security/manifest/parser.js.map +2 -2
  97. package/dist/security/pipeline.js +4 -1
  98. package/dist/security/pipeline.js.map +2 -2
  99. package/dist/security/reachability.js +61 -45
  100. package/dist/security/reachability.js.map +3 -3
  101. package/dist/security/types.js.map +1 -1
  102. package/dist/security/vuln/epss-client.js +1 -1
  103. package/dist/security/vuln/epss-client.js.map +1 -1
  104. package/dist/security/vuln/osv-adapter.js +99 -31
  105. package/dist/security/vuln/osv-adapter.js.map +2 -2
  106. package/dist/sync/index.js +9 -2
  107. package/dist/sync/index.js.map +2 -2
  108. package/dist/vectors/libsql-index.js +287 -0
  109. package/dist/vectors/libsql-index.js.map +7 -0
  110. package/dist/vectors/turso-index.js +307 -0
  111. package/dist/vectors/turso-index.js.map +7 -0
  112. package/package.json +3 -2
  113. package/dist/architecture/index.d.ts +0 -11
  114. package/dist/architecture/index.d.ts.map +0 -1
  115. package/dist/architecture/layers/csharp.d.ts +0 -6
  116. package/dist/architecture/layers/csharp.d.ts.map +0 -1
  117. package/dist/architecture/layers/dart.d.ts +0 -10
  118. package/dist/architecture/layers/dart.d.ts.map +0 -1
  119. package/dist/architecture/layers/elixir.d.ts +0 -6
  120. package/dist/architecture/layers/elixir.d.ts.map +0 -1
  121. package/dist/architecture/layers/go.d.ts +0 -7
  122. package/dist/architecture/layers/go.d.ts.map +0 -1
  123. package/dist/architecture/layers/index.d.ts +0 -30
  124. package/dist/architecture/layers/index.d.ts.map +0 -1
  125. package/dist/architecture/layers/java.d.ts +0 -7
  126. package/dist/architecture/layers/java.d.ts.map +0 -1
  127. package/dist/architecture/layers/ocaml.d.ts +0 -6
  128. package/dist/architecture/layers/ocaml.d.ts.map +0 -1
  129. package/dist/architecture/layers/python.d.ts +0 -7
  130. package/dist/architecture/layers/python.d.ts.map +0 -1
  131. package/dist/architecture/layers/ruby.d.ts +0 -6
  132. package/dist/architecture/layers/ruby.d.ts.map +0 -1
  133. package/dist/architecture/layers/rust.d.ts +0 -6
  134. package/dist/architecture/layers/rust.d.ts.map +0 -1
  135. package/dist/architecture/layers/scala.d.ts +0 -6
  136. package/dist/architecture/layers/scala.d.ts.map +0 -1
  137. package/dist/architecture/layers/solidity.d.ts +0 -6
  138. package/dist/architecture/layers/solidity.d.ts.map +0 -1
  139. package/dist/architecture/layers/types.d.ts +0 -2
  140. package/dist/architecture/layers/types.d.ts.map +0 -1
  141. package/dist/architecture/layers/typescript.d.ts +0 -9
  142. package/dist/architecture/layers/typescript.d.ts.map +0 -1
  143. package/dist/architecture/layers/vue.d.ts +0 -6
  144. package/dist/architecture/layers/vue.d.ts.map +0 -1
  145. package/dist/architecture/manifest/cargo.d.ts +0 -3
  146. package/dist/architecture/manifest/cargo.d.ts.map +0 -1
  147. package/dist/architecture/manifest/csproj.d.ts +0 -3
  148. package/dist/architecture/manifest/csproj.d.ts.map +0 -1
  149. package/dist/architecture/manifest/elm.d.ts +0 -3
  150. package/dist/architecture/manifest/elm.d.ts.map +0 -1
  151. package/dist/architecture/manifest/go.d.ts +0 -3
  152. package/dist/architecture/manifest/go.d.ts.map +0 -1
  153. package/dist/architecture/manifest/gradle.d.ts +0 -3
  154. package/dist/architecture/manifest/gradle.d.ts.map +0 -1
  155. package/dist/architecture/manifest/index.d.ts +0 -12
  156. package/dist/architecture/manifest/index.d.ts.map +0 -1
  157. package/dist/architecture/manifest/maven.d.ts +0 -3
  158. package/dist/architecture/manifest/maven.d.ts.map +0 -1
  159. package/dist/architecture/manifest/npm.d.ts +0 -3
  160. package/dist/architecture/manifest/npm.d.ts.map +0 -1
  161. package/dist/architecture/manifest/ocaml.d.ts +0 -3
  162. package/dist/architecture/manifest/ocaml.d.ts.map +0 -1
  163. package/dist/architecture/manifest/python.d.ts +0 -3
  164. package/dist/architecture/manifest/python.d.ts.map +0 -1
  165. package/dist/architecture/manifest/scala.d.ts +0 -3
  166. package/dist/architecture/manifest/scala.d.ts.map +0 -1
  167. package/dist/architecture/manifest/types.d.ts +0 -2
  168. package/dist/architecture/manifest/types.d.ts.map +0 -1
  169. package/dist/architecture/types.d.ts +0 -91
  170. package/dist/architecture/types.d.ts.map +0 -1
  171. package/dist/banner.d.ts +0 -6
  172. package/dist/banner.d.ts.map +0 -1
  173. package/dist/banner.js +0 -67
  174. package/dist/banner.js.map +0 -1
  175. package/dist/bin/banner.d.ts +0 -6
  176. package/dist/bin/banner.d.ts.map +0 -1
  177. package/dist/bin/commands/affected.d.ts +0 -3
  178. package/dist/bin/commands/affected.d.ts.map +0 -1
  179. package/dist/bin/commands/architecture.d.ts +0 -3
  180. package/dist/bin/commands/architecture.d.ts.map +0 -1
  181. package/dist/bin/commands/attack-surface.d.ts +0 -3
  182. package/dist/bin/commands/attack-surface.d.ts.map +0 -1
  183. package/dist/bin/commands/benchmark.d.ts +0 -9
  184. package/dist/bin/commands/benchmark.d.ts.map +0 -1
  185. package/dist/bin/commands/budget.d.ts +0 -6
  186. package/dist/bin/commands/budget.d.ts.map +0 -1
  187. package/dist/bin/commands/caveman.d.ts +0 -7
  188. package/dist/bin/commands/caveman.d.ts.map +0 -1
  189. package/dist/bin/commands/communities.d.ts +0 -3
  190. package/dist/bin/commands/communities.d.ts.map +0 -1
  191. package/dist/bin/commands/compression.d.ts +0 -7
  192. package/dist/bin/commands/compression.d.ts.map +0 -1
  193. package/dist/bin/commands/configure-mcp.js +0 -104
  194. package/dist/bin/commands/configure-mcp.js.map +0 -7
  195. package/dist/bin/commands/context.d.ts +0 -3
  196. package/dist/bin/commands/context.d.ts.map +0 -1
  197. package/dist/bin/commands/coupling.d.ts +0 -3
  198. package/dist/bin/commands/coupling.d.ts.map +0 -1
  199. package/dist/bin/commands/dashboard.d.ts +0 -3
  200. package/dist/bin/commands/dashboard.d.ts.map +0 -1
  201. package/dist/bin/commands/data.d.ts +0 -3
  202. package/dist/bin/commands/data.d.ts.map +0 -1
  203. package/dist/bin/commands/dead-code.d.ts +0 -3
  204. package/dist/bin/commands/dead-code.d.ts.map +0 -1
  205. package/dist/bin/commands/dep-confusion.d.ts +0 -3
  206. package/dist/bin/commands/dep-confusion.d.ts.map +0 -1
  207. package/dist/bin/commands/docs.d.ts +0 -3
  208. package/dist/bin/commands/docs.d.ts.map +0 -1
  209. package/dist/bin/commands/exec.d.ts +0 -11
  210. package/dist/bin/commands/exec.d.ts.map +0 -1
  211. package/dist/bin/commands/export.d.ts +0 -3
  212. package/dist/bin/commands/export.d.ts.map +0 -1
  213. package/dist/bin/commands/files.d.ts +0 -3
  214. package/dist/bin/commands/files.d.ts.map +0 -1
  215. package/dist/bin/commands/flows.d.ts +0 -3
  216. package/dist/bin/commands/flows.d.ts.map +0 -1
  217. package/dist/bin/commands/gain.d.ts +0 -6
  218. package/dist/bin/commands/gain.d.ts.map +0 -1
  219. package/dist/bin/commands/help.d.ts +0 -11
  220. package/dist/bin/commands/help.d.ts.map +0 -1
  221. package/dist/bin/commands/hotspots.d.ts +0 -3
  222. package/dist/bin/commands/hotspots.d.ts.map +0 -1
  223. package/dist/bin/commands/index.d.ts +0 -3
  224. package/dist/bin/commands/index.d.ts.map +0 -1
  225. package/dist/bin/commands/init.d.ts +0 -3
  226. package/dist/bin/commands/init.d.ts.map +0 -1
  227. package/dist/bin/commands/install.d.ts +0 -3
  228. package/dist/bin/commands/install.d.ts.map +0 -1
  229. package/dist/bin/commands/licenses.d.ts +0 -3
  230. package/dist/bin/commands/licenses.d.ts.map +0 -1
  231. package/dist/bin/commands/mark-dirty.d.ts +0 -3
  232. package/dist/bin/commands/mark-dirty.d.ts.map +0 -1
  233. package/dist/bin/commands/memory.d.ts +0 -16
  234. package/dist/bin/commands/memory.d.ts.map +0 -1
  235. package/dist/bin/commands/package.d.ts +0 -3
  236. package/dist/bin/commands/package.d.ts.map +0 -1
  237. package/dist/bin/commands/path.d.ts +0 -3
  238. package/dist/bin/commands/path.d.ts.map +0 -1
  239. package/dist/bin/commands/pattern.d.ts +0 -3
  240. package/dist/bin/commands/pattern.d.ts.map +0 -1
  241. package/dist/bin/commands/qdrant.d.ts +0 -3
  242. package/dist/bin/commands/qdrant.d.ts.map +0 -1
  243. package/dist/bin/commands/qdrant.js +0 -159
  244. package/dist/bin/commands/qdrant.js.map +0 -1
  245. package/dist/bin/commands/query.d.ts +0 -3
  246. package/dist/bin/commands/query.d.ts.map +0 -1
  247. package/dist/bin/commands/reachability.d.ts +0 -3
  248. package/dist/bin/commands/reachability.d.ts.map +0 -1
  249. package/dist/bin/commands/read.d.ts +0 -6
  250. package/dist/bin/commands/read.d.ts.map +0 -1
  251. package/dist/bin/commands/refactor.d.ts +0 -3
  252. package/dist/bin/commands/refactor.d.ts.map +0 -1
  253. package/dist/bin/commands/remediation.d.ts +0 -3
  254. package/dist/bin/commands/remediation.d.ts.map +0 -1
  255. package/dist/bin/commands/sbom.d.ts +0 -3
  256. package/dist/bin/commands/sbom.d.ts.map +0 -1
  257. package/dist/bin/commands/security-ci-report.d.ts +0 -9
  258. package/dist/bin/commands/security-ci-report.d.ts.map +0 -1
  259. package/dist/bin/commands/security-export.d.ts +0 -2
  260. package/dist/bin/commands/security-export.d.ts.map +0 -1
  261. package/dist/bin/commands/security-flows.d.ts +0 -3
  262. package/dist/bin/commands/security-flows.d.ts.map +0 -1
  263. package/dist/bin/commands/security-secrets.d.ts +0 -3
  264. package/dist/bin/commands/security-secrets.d.ts.map +0 -1
  265. package/dist/bin/commands/security.d.ts +0 -3
  266. package/dist/bin/commands/security.d.ts.map +0 -1
  267. package/dist/bin/commands/serve.d.ts +0 -3
  268. package/dist/bin/commands/serve.d.ts.map +0 -1
  269. package/dist/bin/commands/snapshot.d.ts +0 -3
  270. package/dist/bin/commands/snapshot.d.ts.map +0 -1
  271. package/dist/bin/commands/staleness.d.ts +0 -3
  272. package/dist/bin/commands/staleness.d.ts.map +0 -1
  273. package/dist/bin/commands/status.d.ts +0 -3
  274. package/dist/bin/commands/status.d.ts.map +0 -1
  275. package/dist/bin/commands/stop.d.ts +0 -3
  276. package/dist/bin/commands/stop.d.ts.map +0 -1
  277. package/dist/bin/commands/stop.js +0 -81
  278. package/dist/bin/commands/stop.js.map +0 -1
  279. package/dist/bin/commands/supply-chain.d.ts +0 -3
  280. package/dist/bin/commands/supply-chain.d.ts.map +0 -1
  281. package/dist/bin/commands/surprising.d.ts +0 -3
  282. package/dist/bin/commands/surprising.d.ts.map +0 -1
  283. package/dist/bin/commands/sync-if-dirty.d.ts +0 -3
  284. package/dist/bin/commands/sync-if-dirty.d.ts.map +0 -1
  285. package/dist/bin/commands/sync.d.ts +0 -3
  286. package/dist/bin/commands/sync.d.ts.map +0 -1
  287. package/dist/bin/commands/typesense.d.ts +0 -3
  288. package/dist/bin/commands/typesense.d.ts.map +0 -1
  289. package/dist/bin/commands/typesense.js +0 -126
  290. package/dist/bin/commands/typesense.js.map +0 -1
  291. package/dist/bin/commands/uninit.d.ts +0 -4
  292. package/dist/bin/commands/uninit.d.ts.map +0 -1
  293. package/dist/bin/commands/unlock.d.ts +0 -3
  294. package/dist/bin/commands/unlock.d.ts.map +0 -1
  295. package/dist/bin/commands/utils.d.ts +0 -17
  296. package/dist/bin/commands/utils.d.ts.map +0 -1
  297. package/dist/bin/commands/vex.d.ts +0 -3
  298. package/dist/bin/commands/vex.d.ts.map +0 -1
  299. package/dist/bin/commands/vuln-suppress.d.ts +0 -3
  300. package/dist/bin/commands/vuln-suppress.d.ts.map +0 -1
  301. package/dist/bin/commands/vulns.d.ts +0 -3
  302. package/dist/bin/commands/vulns.d.ts.map +0 -1
  303. package/dist/bin/installer/archive.d.ts +0 -47
  304. package/dist/bin/installer/archive.d.ts.map +0 -1
  305. package/dist/bin/installer/auto-detect.d.ts +0 -16
  306. package/dist/bin/installer/auto-detect.d.ts.map +0 -1
  307. package/dist/bin/installer/caveman.d.ts +0 -12
  308. package/dist/bin/installer/caveman.d.ts.map +0 -1
  309. package/dist/bin/installer/cli-agent.d.ts +0 -20
  310. package/dist/bin/installer/cli-agent.d.ts.map +0 -1
  311. package/dist/bin/installer/common.d.ts +0 -36
  312. package/dist/bin/installer/common.d.ts.map +0 -1
  313. package/dist/bin/installer/config-prompt.d.ts +0 -13
  314. package/dist/bin/installer/config-prompt.d.ts.map +0 -1
  315. package/dist/bin/installer/dashboard.d.ts +0 -3
  316. package/dist/bin/installer/dashboard.d.ts.map +0 -1
  317. package/dist/bin/installer/detect.d.ts +0 -30
  318. package/dist/bin/installer/detect.d.ts.map +0 -1
  319. package/dist/bin/installer/hooks.d.ts +0 -8
  320. package/dist/bin/installer/hooks.d.ts.map +0 -1
  321. package/dist/bin/installer/index.d.ts +0 -12
  322. package/dist/bin/installer/index.d.ts.map +0 -1
  323. package/dist/bin/installer/instructions.d.ts +0 -14
  324. package/dist/bin/installer/instructions.d.ts.map +0 -1
  325. package/dist/bin/installer/mcp.d.ts +0 -5
  326. package/dist/bin/installer/mcp.d.ts.map +0 -1
  327. package/dist/bin/installer/prompts.d.ts +0 -45
  328. package/dist/bin/installer/prompts.d.ts.map +0 -1
  329. package/dist/bin/installer/qdrant-dashboard.d.ts +0 -4
  330. package/dist/bin/installer/qdrant-dashboard.d.ts.map +0 -1
  331. package/dist/bin/installer/steering.d.ts +0 -17
  332. package/dist/bin/installer/steering.d.ts.map +0 -1
  333. package/dist/bin/installer/targets/aider.d.ts +0 -6
  334. package/dist/bin/installer/targets/aider.d.ts.map +0 -1
  335. package/dist/bin/installer/targets/amp.d.ts +0 -6
  336. package/dist/bin/installer/targets/amp.d.ts.map +0 -1
  337. package/dist/bin/installer/targets/antigravity.d.ts +0 -13
  338. package/dist/bin/installer/targets/antigravity.d.ts.map +0 -1
  339. package/dist/bin/installer/targets/augment.d.ts +0 -6
  340. package/dist/bin/installer/targets/augment.d.ts.map +0 -1
  341. package/dist/bin/installer/targets/claude.d.ts +0 -6
  342. package/dist/bin/installer/targets/claude.d.ts.map +0 -1
  343. package/dist/bin/installer/targets/cline.d.ts +0 -13
  344. package/dist/bin/installer/targets/cline.d.ts.map +0 -1
  345. package/dist/bin/installer/targets/codex.d.ts +0 -6
  346. package/dist/bin/installer/targets/codex.d.ts.map +0 -1
  347. package/dist/bin/installer/targets/continue.d.ts +0 -12
  348. package/dist/bin/installer/targets/continue.d.ts.map +0 -1
  349. package/dist/bin/installer/targets/copilot-cli.d.ts +0 -12
  350. package/dist/bin/installer/targets/copilot-cli.d.ts.map +0 -1
  351. package/dist/bin/installer/targets/copilot.d.ts +0 -6
  352. package/dist/bin/installer/targets/copilot.d.ts.map +0 -1
  353. package/dist/bin/installer/targets/cursor.d.ts +0 -6
  354. package/dist/bin/installer/targets/cursor.d.ts.map +0 -1
  355. package/dist/bin/installer/targets/devin.d.ts +0 -13
  356. package/dist/bin/installer/targets/devin.d.ts.map +0 -1
  357. package/dist/bin/installer/targets/gemini-cli.d.ts +0 -16
  358. package/dist/bin/installer/targets/gemini-cli.d.ts.map +0 -1
  359. package/dist/bin/installer/targets/generic.d.ts +0 -59
  360. package/dist/bin/installer/targets/generic.d.ts.map +0 -1
  361. package/dist/bin/installer/targets/goose.d.ts +0 -6
  362. package/dist/bin/installer/targets/goose.d.ts.map +0 -1
  363. package/dist/bin/installer/targets/index.d.ts +0 -11
  364. package/dist/bin/installer/targets/index.d.ts.map +0 -1
  365. package/dist/bin/installer/targets/junie.d.ts +0 -13
  366. package/dist/bin/installer/targets/junie.d.ts.map +0 -1
  367. package/dist/bin/installer/targets/kilo.d.ts +0 -12
  368. package/dist/bin/installer/targets/kilo.d.ts.map +0 -1
  369. package/dist/bin/installer/targets/kiro.d.ts +0 -5
  370. package/dist/bin/installer/targets/kiro.d.ts.map +0 -1
  371. package/dist/bin/installer/targets/opencode.d.ts +0 -13
  372. package/dist/bin/installer/targets/opencode.d.ts.map +0 -1
  373. package/dist/bin/installer/targets/openhands.d.ts +0 -6
  374. package/dist/bin/installer/targets/openhands.d.ts.map +0 -1
  375. package/dist/bin/installer/targets/qoder.d.ts +0 -12
  376. package/dist/bin/installer/targets/qoder.d.ts.map +0 -1
  377. package/dist/bin/installer/targets/qwen.d.ts +0 -12
  378. package/dist/bin/installer/targets/qwen.d.ts.map +0 -1
  379. package/dist/bin/installer/targets/replit.d.ts +0 -6
  380. package/dist/bin/installer/targets/replit.d.ts.map +0 -1
  381. package/dist/bin/installer/targets/roo.d.ts +0 -13
  382. package/dist/bin/installer/targets/roo.d.ts.map +0 -1
  383. package/dist/bin/installer/targets/tabnine.d.ts +0 -6
  384. package/dist/bin/installer/targets/tabnine.d.ts.map +0 -1
  385. package/dist/bin/installer/targets/trae.d.ts +0 -6
  386. package/dist/bin/installer/targets/trae.d.ts.map +0 -1
  387. package/dist/bin/installer/targets/warp.d.ts +0 -12
  388. package/dist/bin/installer/targets/warp.d.ts.map +0 -1
  389. package/dist/bin/installer/targets/windsurf.d.ts +0 -13
  390. package/dist/bin/installer/targets/windsurf.d.ts.map +0 -1
  391. package/dist/bin/kirograph.d.ts +0 -6
  392. package/dist/bin/kirograph.d.ts.map +0 -1
  393. package/dist/bin/progress.d.ts +0 -29
  394. package/dist/bin/progress.d.ts.map +0 -1
  395. package/dist/bin/ui.d.ts +0 -11
  396. package/dist/bin/ui.d.ts.map +0 -1
  397. package/dist/compression/filters/aws.d.ts +0 -9
  398. package/dist/compression/filters/aws.d.ts.map +0 -1
  399. package/dist/compression/filters/docker.d.ts +0 -6
  400. package/dist/compression/filters/docker.d.ts.map +0 -1
  401. package/dist/compression/filters/files.d.ts +0 -6
  402. package/dist/compression/filters/files.d.ts.map +0 -1
  403. package/dist/compression/filters/generic.d.ts +0 -7
  404. package/dist/compression/filters/generic.d.ts.map +0 -1
  405. package/dist/compression/filters/git.d.ts +0 -6
  406. package/dist/compression/filters/git.d.ts.map +0 -1
  407. package/dist/compression/filters/github.d.ts +0 -6
  408. package/dist/compression/filters/github.d.ts.map +0 -1
  409. package/dist/compression/filters/lint.d.ts +0 -6
  410. package/dist/compression/filters/lint.d.ts.map +0 -1
  411. package/dist/compression/filters/misc.d.ts +0 -6
  412. package/dist/compression/filters/misc.d.ts.map +0 -1
  413. package/dist/compression/filters/package.d.ts +0 -6
  414. package/dist/compression/filters/package.d.ts.map +0 -1
  415. package/dist/compression/filters/test.d.ts +0 -6
  416. package/dist/compression/filters/test.d.ts.map +0 -1
  417. package/dist/compression/index.d.ts +0 -29
  418. package/dist/compression/index.d.ts.map +0 -1
  419. package/dist/compression/naive-cost.d.ts +0 -26
  420. package/dist/compression/naive-cost.d.ts.map +0 -1
  421. package/dist/compression/tracker.d.ts +0 -155
  422. package/dist/compression/tracker.d.ts.map +0 -1
  423. package/dist/compression/types.d.ts +0 -49
  424. package/dist/compression/types.d.ts.map +0 -1
  425. package/dist/config.d.ts +0 -138
  426. package/dist/config.d.ts.map +0 -1
  427. package/dist/context/index.d.ts +0 -61
  428. package/dist/context/index.d.ts.map +0 -1
  429. package/dist/core/file-tree.d.ts +0 -15
  430. package/dist/core/file-tree.d.ts.map +0 -1
  431. package/dist/core/lock-manager.d.ts +0 -22
  432. package/dist/core/lock-manager.d.ts.map +0 -1
  433. package/dist/core/pipeline.d.ts +0 -40
  434. package/dist/core/pipeline.d.ts.map +0 -1
  435. package/dist/core/snapshot.d.ts +0 -58
  436. package/dist/core/snapshot.d.ts.map +0 -1
  437. package/dist/data/filters.d.ts +0 -23
  438. package/dist/data/filters.d.ts.map +0 -1
  439. package/dist/data/indexer.d.ts +0 -25
  440. package/dist/data/indexer.d.ts.map +0 -1
  441. package/dist/data/linker.d.ts +0 -37
  442. package/dist/data/linker.d.ts.map +0 -1
  443. package/dist/data/linker.test.js +0 -60
  444. package/dist/data/linker.test.js.map +0 -7
  445. package/dist/data/lint.d.ts +0 -27
  446. package/dist/data/lint.d.ts.map +0 -1
  447. package/dist/data/parsers/__fixtures__/pdf-inspector-stub.js +0 -41
  448. package/dist/data/parsers/__fixtures__/pdf-inspector-stub.js.map +0 -7
  449. package/dist/data/parsers/csv.d.ts +0 -11
  450. package/dist/data/parsers/csv.d.ts.map +0 -1
  451. package/dist/data/parsers/excel.d.ts +0 -10
  452. package/dist/data/parsers/excel.d.ts.map +0 -1
  453. package/dist/data/parsers/index.d.ts +0 -28
  454. package/dist/data/parsers/index.d.ts.map +0 -1
  455. package/dist/data/parsers/json-array.d.ts +0 -9
  456. package/dist/data/parsers/json-array.d.ts.map +0 -1
  457. package/dist/data/parsers/jsonl.d.ts +0 -9
  458. package/dist/data/parsers/jsonl.d.ts.map +0 -1
  459. package/dist/data/parsers/parquet.d.ts +0 -10
  460. package/dist/data/parsers/parquet.d.ts.map +0 -1
  461. package/dist/data/parsers/pdf.test.js +0 -125
  462. package/dist/data/parsers/pdf.test.js.map +0 -7
  463. package/dist/data/pixelrag-bridge.js +0 -93
  464. package/dist/data/pixelrag-bridge.js.map +0 -7
  465. package/dist/data/pixelrag-manager.js +0 -416
  466. package/dist/data/pixelrag-manager.js.map +0 -7
  467. package/dist/data/profiler.d.ts +0 -29
  468. package/dist/data/profiler.d.ts.map +0 -1
  469. package/dist/data/queries.d.ts +0 -95
  470. package/dist/data/queries.d.ts.map +0 -1
  471. package/dist/data/types.d.ts +0 -103
  472. package/dist/data/types.d.ts.map +0 -1
  473. package/dist/db/database.d.ts +0 -190
  474. package/dist/db/database.d.ts.map +0 -1
  475. package/dist/docs/formats/asciidoc.d.ts +0 -9
  476. package/dist/docs/formats/asciidoc.d.ts.map +0 -1
  477. package/dist/docs/formats/html.d.ts +0 -10
  478. package/dist/docs/formats/html.d.ts.map +0 -1
  479. package/dist/docs/formats/index.d.ts +0 -31
  480. package/dist/docs/formats/index.d.ts.map +0 -1
  481. package/dist/docs/formats/markdown.d.ts +0 -11
  482. package/dist/docs/formats/markdown.d.ts.map +0 -1
  483. package/dist/docs/formats/openapi.d.ts +0 -17
  484. package/dist/docs/formats/openapi.d.ts.map +0 -1
  485. package/dist/docs/formats/org.d.ts +0 -9
  486. package/dist/docs/formats/org.d.ts.map +0 -1
  487. package/dist/docs/formats/plaintext.d.ts +0 -11
  488. package/dist/docs/formats/plaintext.d.ts.map +0 -1
  489. package/dist/docs/formats/rdoc.d.ts +0 -10
  490. package/dist/docs/formats/rdoc.d.ts.map +0 -1
  491. package/dist/docs/formats/rst.d.ts +0 -11
  492. package/dist/docs/formats/rst.d.ts.map +0 -1
  493. package/dist/docs/indexer.d.ts +0 -49
  494. package/dist/docs/indexer.d.ts.map +0 -1
  495. package/dist/docs/linker.d.ts +0 -30
  496. package/dist/docs/linker.d.ts.map +0 -1
  497. package/dist/docs/lint.d.ts +0 -27
  498. package/dist/docs/lint.d.ts.map +0 -1
  499. package/dist/docs/queries.d.ts +0 -78
  500. package/dist/docs/queries.d.ts.map +0 -1
  501. package/dist/docs/section-id.d.ts +0 -48
  502. package/dist/docs/section-id.d.ts.map +0 -1
  503. package/dist/docs/summarizer.d.ts +0 -13
  504. package/dist/docs/summarizer.d.ts.map +0 -1
  505. package/dist/docs/types.d.ts +0 -71
  506. package/dist/docs/types.d.ts.map +0 -1
  507. package/dist/docs/vectors.d.ts +0 -54
  508. package/dist/docs/vectors.d.ts.map +0 -1
  509. package/dist/errors.d.ts +0 -49
  510. package/dist/errors.d.ts.map +0 -1
  511. package/dist/extraction/extractor.d.ts +0 -29
  512. package/dist/extraction/extractor.d.ts.map +0 -1
  513. package/dist/extraction/grammars.d.ts +0 -54
  514. package/dist/extraction/grammars.d.ts.map +0 -1
  515. package/dist/extraction/languages.d.ts +0 -9
  516. package/dist/extraction/languages.d.ts.map +0 -1
  517. package/dist/extraction/notebook.d.ts +0 -14
  518. package/dist/extraction/notebook.d.ts.map +0 -1
  519. package/dist/frameworks/amplify.d.ts +0 -9
  520. package/dist/frameworks/amplify.d.ts.map +0 -1
  521. package/dist/frameworks/angular.d.ts +0 -9
  522. package/dist/frameworks/angular.d.ts.map +0 -1
  523. package/dist/frameworks/ansible.d.ts +0 -8
  524. package/dist/frameworks/ansible.d.ts.map +0 -1
  525. package/dist/frameworks/cloudformation.d.ts +0 -9
  526. package/dist/frameworks/cloudformation.d.ts.map +0 -1
  527. package/dist/frameworks/csharp.d.ts +0 -8
  528. package/dist/frameworks/csharp.d.ts.map +0 -1
  529. package/dist/frameworks/docker.d.ts +0 -9
  530. package/dist/frameworks/docker.d.ts.map +0 -1
  531. package/dist/frameworks/elixir.d.ts +0 -6
  532. package/dist/frameworks/elixir.d.ts.map +0 -1
  533. package/dist/frameworks/express.d.ts +0 -8
  534. package/dist/frameworks/express.d.ts.map +0 -1
  535. package/dist/frameworks/flutter.d.ts +0 -12
  536. package/dist/frameworks/flutter.d.ts.map +0 -1
  537. package/dist/frameworks/go.d.ts +0 -8
  538. package/dist/frameworks/go.d.ts.map +0 -1
  539. package/dist/frameworks/iac.d.ts +0 -10
  540. package/dist/frameworks/iac.d.ts.map +0 -1
  541. package/dist/frameworks/index.d.ts +0 -44
  542. package/dist/frameworks/index.d.ts.map +0 -1
  543. package/dist/frameworks/java.d.ts +0 -8
  544. package/dist/frameworks/java.d.ts.map +0 -1
  545. package/dist/frameworks/kubernetes.d.ts +0 -9
  546. package/dist/frameworks/kubernetes.d.ts.map +0 -1
  547. package/dist/frameworks/laravel.d.ts +0 -9
  548. package/dist/frameworks/laravel.d.ts.map +0 -1
  549. package/dist/frameworks/pulumi.d.ts +0 -9
  550. package/dist/frameworks/pulumi.d.ts.map +0 -1
  551. package/dist/frameworks/python.d.ts +0 -10
  552. package/dist/frameworks/python.d.ts.map +0 -1
  553. package/dist/frameworks/react.d.ts +0 -9
  554. package/dist/frameworks/react.d.ts.map +0 -1
  555. package/dist/frameworks/ruby.d.ts +0 -8
  556. package/dist/frameworks/ruby.d.ts.map +0 -1
  557. package/dist/frameworks/rust.d.ts +0 -8
  558. package/dist/frameworks/rust.d.ts.map +0 -1
  559. package/dist/frameworks/scala.d.ts +0 -6
  560. package/dist/frameworks/scala.d.ts.map +0 -1
  561. package/dist/frameworks/solidity.d.ts +0 -6
  562. package/dist/frameworks/solidity.d.ts.map +0 -1
  563. package/dist/frameworks/svelte.d.ts +0 -8
  564. package/dist/frameworks/svelte.d.ts.map +0 -1
  565. package/dist/frameworks/swift.d.ts +0 -10
  566. package/dist/frameworks/swift.d.ts.map +0 -1
  567. package/dist/frameworks/terraform.d.ts +0 -14
  568. package/dist/frameworks/terraform.d.ts.map +0 -1
  569. package/dist/frameworks/types.d.ts +0 -37
  570. package/dist/frameworks/types.d.ts.map +0 -1
  571. package/dist/frameworks/vue.d.ts +0 -7
  572. package/dist/frameworks/vue.d.ts.map +0 -1
  573. package/dist/graph/communities.d.ts +0 -43
  574. package/dist/graph/communities.d.ts.map +0 -1
  575. package/dist/graph/flows.d.ts +0 -55
  576. package/dist/graph/flows.d.ts.map +0 -1
  577. package/dist/graph/queries.d.ts +0 -53
  578. package/dist/graph/queries.d.ts.map +0 -1
  579. package/dist/graph/refactor.d.ts +0 -43
  580. package/dist/graph/refactor.d.ts.map +0 -1
  581. package/dist/graph/traversal.d.ts +0 -35
  582. package/dist/graph/traversal.d.ts.map +0 -1
  583. package/dist/index.d.ts +0 -134
  584. package/dist/index.d.ts.map +0 -1
  585. package/dist/installer/index.d.ts +0 -10
  586. package/dist/installer/index.d.ts.map +0 -1
  587. package/dist/installer/index.js +0 -526
  588. package/dist/installer/index.js.map +0 -1
  589. package/dist/mcp/cache.d.ts +0 -69
  590. package/dist/mcp/cache.d.ts.map +0 -1
  591. package/dist/mcp/read-modes.d.ts +0 -31
  592. package/dist/mcp/read-modes.d.ts.map +0 -1
  593. package/dist/mcp/server.d.ts +0 -17
  594. package/dist/mcp/server.d.ts.map +0 -1
  595. package/dist/mcp/tool-names.d.ts +0 -2
  596. package/dist/mcp/tool-names.d.ts.map +0 -1
  597. package/dist/mcp/tools.d.ts +0 -49
  598. package/dist/mcp/tools.d.ts.map +0 -1
  599. package/dist/mcp/transport.d.ts +0 -29
  600. package/dist/mcp/transport.d.ts.map +0 -1
  601. package/dist/memory/compress.d.ts +0 -19
  602. package/dist/memory/compress.d.ts.map +0 -1
  603. package/dist/memory/database.d.ts +0 -92
  604. package/dist/memory/database.d.ts.map +0 -1
  605. package/dist/memory/index.d.ts +0 -71
  606. package/dist/memory/index.d.ts.map +0 -1
  607. package/dist/memory/symbols.d.ts +0 -21
  608. package/dist/memory/symbols.d.ts.map +0 -1
  609. package/dist/memory/types.d.ts +0 -78
  610. package/dist/memory/types.d.ts.map +0 -1
  611. package/dist/memory/vectors.d.ts +0 -43
  612. package/dist/memory/vectors.d.ts.map +0 -1
  613. package/dist/patterns/graph.d.ts +0 -16
  614. package/dist/patterns/graph.d.ts.map +0 -1
  615. package/dist/patterns/index.d.ts +0 -4
  616. package/dist/patterns/index.d.ts.map +0 -1
  617. package/dist/patterns/indexer.d.ts +0 -15
  618. package/dist/patterns/indexer.d.ts.map +0 -1
  619. package/dist/patterns/loader.d.ts +0 -18
  620. package/dist/patterns/loader.d.ts.map +0 -1
  621. package/dist/patterns/runner.d.ts +0 -42
  622. package/dist/patterns/runner.d.ts.map +0 -1
  623. package/dist/patterns/types.d.ts +0 -27
  624. package/dist/patterns/types.d.ts.map +0 -1
  625. package/dist/resolution/bridges/android-rn.d.ts +0 -13
  626. package/dist/resolution/bridges/android-rn.d.ts.map +0 -1
  627. package/dist/resolution/bridges/expo-modules.d.ts +0 -10
  628. package/dist/resolution/bridges/expo-modules.d.ts.map +0 -1
  629. package/dist/resolution/bridges/flutter-channel.d.ts +0 -14
  630. package/dist/resolution/bridges/flutter-channel.d.ts.map +0 -1
  631. package/dist/resolution/bridges/index.d.ts +0 -40
  632. package/dist/resolution/bridges/index.d.ts.map +0 -1
  633. package/dist/resolution/bridges/native-events.d.ts +0 -10
  634. package/dist/resolution/bridges/native-events.d.ts.map +0 -1
  635. package/dist/resolution/bridges/native-views.d.ts +0 -13
  636. package/dist/resolution/bridges/native-views.d.ts.map +0 -1
  637. package/dist/resolution/bridges/react-native.d.ts +0 -9
  638. package/dist/resolution/bridges/react-native.d.ts.map +0 -1
  639. package/dist/resolution/bridges/swift-objc.d.ts +0 -14
  640. package/dist/resolution/bridges/swift-objc.d.ts.map +0 -1
  641. package/dist/resolution/bridges/turbomodules.d.ts +0 -10
  642. package/dist/resolution/bridges/turbomodules.d.ts.map +0 -1
  643. package/dist/resolution/index.d.ts +0 -81
  644. package/dist/resolution/index.d.ts.map +0 -1
  645. package/dist/resolution/name-matcher.d.ts +0 -25
  646. package/dist/resolution/name-matcher.d.ts.map +0 -1
  647. package/dist/scripts/postinstall.js +0 -64
  648. package/dist/search/query-utils.d.ts +0 -21
  649. package/dist/search/query-utils.d.ts.map +0 -1
  650. package/dist/search/searcher.d.ts +0 -15
  651. package/dist/search/searcher.d.ts.map +0 -1
  652. package/dist/security/attack-surface.d.ts +0 -46
  653. package/dist/security/attack-surface.d.ts.map +0 -1
  654. package/dist/security/context-warnings.d.ts +0 -40
  655. package/dist/security/context-warnings.d.ts.map +0 -1
  656. package/dist/security/data-flows.d.ts +0 -33
  657. package/dist/security/data-flows.d.ts.map +0 -1
  658. package/dist/security/dep-confusion.d.ts +0 -23
  659. package/dist/security/dep-confusion.d.ts.map +0 -1
  660. package/dist/security/errors.d.ts +0 -16
  661. package/dist/security/errors.d.ts.map +0 -1
  662. package/dist/security/export/fix-suggestions.d.ts +0 -21
  663. package/dist/security/export/fix-suggestions.d.ts.map +0 -1
  664. package/dist/security/export/sbom.d.ts +0 -33
  665. package/dist/security/export/sbom.d.ts.map +0 -1
  666. package/dist/security/export/serialization.d.ts +0 -62
  667. package/dist/security/export/serialization.d.ts.map +0 -1
  668. package/dist/security/export/vex.d.ts +0 -58
  669. package/dist/security/export/vex.d.ts.map +0 -1
  670. package/dist/security/index.d.ts +0 -21
  671. package/dist/security/index.d.ts.map +0 -1
  672. package/dist/security/integrator.d.ts +0 -63
  673. package/dist/security/integrator.d.ts.map +0 -1
  674. package/dist/security/license.d.ts +0 -33
  675. package/dist/security/license.d.ts.map +0 -1
  676. package/dist/security/manifest/adapter.d.ts +0 -92
  677. package/dist/security/manifest/adapter.d.ts.map +0 -1
  678. package/dist/security/manifest/parser.d.ts +0 -73
  679. package/dist/security/manifest/parser.d.ts.map +0 -1
  680. package/dist/security/manifest/plugins/cargo.d.ts +0 -11
  681. package/dist/security/manifest/plugins/cargo.d.ts.map +0 -1
  682. package/dist/security/manifest/plugins/composer.d.ts +0 -11
  683. package/dist/security/manifest/plugins/composer.d.ts.map +0 -1
  684. package/dist/security/manifest/plugins/go.d.ts +0 -12
  685. package/dist/security/manifest/plugins/go.d.ts.map +0 -1
  686. package/dist/security/manifest/plugins/gradle.d.ts +0 -12
  687. package/dist/security/manifest/plugins/gradle.d.ts.map +0 -1
  688. package/dist/security/manifest/plugins/hex.d.ts +0 -11
  689. package/dist/security/manifest/plugins/hex.d.ts.map +0 -1
  690. package/dist/security/manifest/plugins/maven.d.ts +0 -11
  691. package/dist/security/manifest/plugins/maven.d.ts.map +0 -1
  692. package/dist/security/manifest/plugins/npm.d.ts +0 -11
  693. package/dist/security/manifest/plugins/npm.d.ts.map +0 -1
  694. package/dist/security/manifest/plugins/nuget.d.ts +0 -12
  695. package/dist/security/manifest/plugins/nuget.d.ts.map +0 -1
  696. package/dist/security/manifest/plugins/pip.d.ts +0 -11
  697. package/dist/security/manifest/plugins/pip.d.ts.map +0 -1
  698. package/dist/security/manifest/plugins/pubspec.d.ts +0 -11
  699. package/dist/security/manifest/plugins/pubspec.d.ts.map +0 -1
  700. package/dist/security/manifest/plugins/pyproject.d.ts +0 -3
  701. package/dist/security/manifest/plugins/pyproject.d.ts.map +0 -1
  702. package/dist/security/manifest/plugins/rubygems.d.ts +0 -11
  703. package/dist/security/manifest/plugins/rubygems.d.ts.map +0 -1
  704. package/dist/security/manifest/plugins/swift.d.ts +0 -11
  705. package/dist/security/manifest/plugins/swift.d.ts.map +0 -1
  706. package/dist/security/owasp.d.ts +0 -16
  707. package/dist/security/owasp.d.ts.map +0 -1
  708. package/dist/security/pipeline.d.ts +0 -37
  709. package/dist/security/pipeline.d.ts.map +0 -1
  710. package/dist/security/reachability.d.ts +0 -67
  711. package/dist/security/reachability.d.ts.map +0 -1
  712. package/dist/security/remediation.d.ts +0 -51
  713. package/dist/security/remediation.d.ts.map +0 -1
  714. package/dist/security/secrets.d.ts +0 -38
  715. package/dist/security/secrets.d.ts.map +0 -1
  716. package/dist/security/staleness.d.ts +0 -43
  717. package/dist/security/staleness.d.ts.map +0 -1
  718. package/dist/security/supply-chain.d.ts +0 -34
  719. package/dist/security/supply-chain.d.ts.map +0 -1
  720. package/dist/security/suppressions.d.ts +0 -18
  721. package/dist/security/suppressions.d.ts.map +0 -1
  722. package/dist/security/types.d.ts +0 -144
  723. package/dist/security/types.d.ts.map +0 -1
  724. package/dist/security/vuln/client.d.ts +0 -90
  725. package/dist/security/vuln/client.d.ts.map +0 -1
  726. package/dist/security/vuln/epss-client.d.ts +0 -26
  727. package/dist/security/vuln/epss-client.d.ts.map +0 -1
  728. package/dist/security/vuln/index.d.ts +0 -6
  729. package/dist/security/vuln/index.d.ts.map +0 -1
  730. package/dist/security/vuln/osv-adapter.d.ts +0 -58
  731. package/dist/security/vuln/osv-adapter.d.ts.map +0 -1
  732. package/dist/security/vuln/types.d.ts +0 -29
  733. package/dist/security/vuln/types.d.ts.map +0 -1
  734. package/dist/sync/index.d.ts +0 -35
  735. package/dist/sync/index.d.ts.map +0 -1
  736. package/dist/types.d.ts +0 -137
  737. package/dist/types.d.ts.map +0 -1
  738. package/dist/utils.d.ts +0 -52
  739. package/dist/utils.d.ts.map +0 -1
  740. package/dist/vectors/index.d.ts +0 -79
  741. package/dist/vectors/index.d.ts.map +0 -1
  742. package/dist/vectors/lancedb-index.d.ts +0 -50
  743. package/dist/vectors/lancedb-index.d.ts.map +0 -1
  744. package/dist/vectors/orama-index.d.ts +0 -54
  745. package/dist/vectors/orama-index.d.ts.map +0 -1
  746. package/dist/vectors/pglite-index.d.ts +0 -53
  747. package/dist/vectors/pglite-index.d.ts.map +0 -1
  748. package/dist/vectors/qdrant-index.d.ts +0 -77
  749. package/dist/vectors/qdrant-index.d.ts.map +0 -1
  750. package/dist/vectors/typesense-index.d.ts +0 -75
  751. package/dist/vectors/typesense-index.d.ts.map +0 -1
  752. package/dist/vectors/vec-index.d.ts +0 -52
  753. package/dist/vectors/vec-index.d.ts.map +0 -1
@@ -1,40 +0,0 @@
1
- /**
2
- * IndexPipeline — full-index and incremental-sync pipelines.
3
- *
4
- * Owns the two heavy workflows:
5
- * - indexAll(): scan all files, extract, store, resolve, detect frameworks,
6
- * generate embeddings, analyze architecture.
7
- * - sync(): detect changed files via git (or full scan fallback),
8
- * re-extract only what changed, then run the same tail pipeline.
9
- *
10
- * Everything that touches the filesystem or sub-systems is injected via the
11
- * constructor, keeping this class testable and free of global state.
12
- */
13
- import { GraphDatabase } from '../db/database';
14
- import { ReferenceResolver } from '../resolution/index';
15
- import { VectorManager } from '../vectors/index';
16
- import { ArchitectureAnalyzer } from '../architecture/index';
17
- import type { KiroGraphConfig } from '../config';
18
- import type { IndexResult, IndexProgress, SyncResult } from '../types';
19
- import { LockManager } from './lock-manager';
20
- export declare class IndexPipeline {
21
- private readonly db;
22
- private readonly vectors;
23
- private readonly resolver;
24
- private readonly arch;
25
- private readonly lock;
26
- private readonly config;
27
- private readonly projectRoot;
28
- private readonly mutex;
29
- constructor(db: GraphDatabase, vectors: VectorManager, resolver: ReferenceResolver, arch: ArchitectureAnalyzer, lock: LockManager, config: KiroGraphConfig, projectRoot: string);
30
- indexAll(opts?: {
31
- onProgress?: (p: IndexProgress) => void;
32
- force?: boolean;
33
- signal?: AbortSignal;
34
- }): Promise<IndexResult>;
35
- sync(opts?: {
36
- changedFiles?: string[];
37
- onProgress?: (p: IndexProgress) => void;
38
- }): Promise<SyncResult>;
39
- }
40
- //# sourceMappingURL=pipeline.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../src/core/pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAK/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAK7C,qBAAa,aAAa;IAItB,OAAO,CAAC,QAAQ,CAAC,EAAE;IACnB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAT9B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAe;gBAGlB,EAAE,EAAE,aAAa,EACjB,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,iBAAiB,EAC3B,IAAI,EAAE,oBAAoB,EAC1B,IAAI,EAAE,WAAW,EACjB,MAAM,EAAE,eAAe,EACvB,WAAW,EAAE,MAAM;IAGhC,QAAQ,CAAC,IAAI,CAAC,EAAE;QACpB,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;QACxC,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,MAAM,CAAC,EAAE,WAAW,CAAC;KACtB,GAAG,OAAO,CAAC,WAAW,CAAC;IAqQlB,IAAI,CAAC,IAAI,CAAC,EAAE;QAChB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;QACxB,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;KACzC,GAAG,OAAO,CAAC,UAAU,CAAC;CA+QxB"}
@@ -1,58 +0,0 @@
1
- /**
2
- * KiroGraph Snapshot Manager
3
- *
4
- * Saves lightweight graph snapshots (node IDs + edge tuples) to
5
- * .kirograph/snapshots/ and computes structural diffs between them.
6
- */
7
- import type { GraphDatabase } from '../db/database';
8
- export interface SnapshotNode {
9
- id: string;
10
- name: string;
11
- kind: string;
12
- filePath: string;
13
- }
14
- export interface SnapshotEdge {
15
- source: string;
16
- target: string;
17
- kind: string;
18
- }
19
- export interface GraphSnapshot {
20
- label: string;
21
- timestamp: number;
22
- nodeCount: number;
23
- edgeCount: number;
24
- nodes: SnapshotNode[];
25
- edges: SnapshotEdge[];
26
- }
27
- export interface GraphDiff {
28
- from: {
29
- label: string;
30
- timestamp: number;
31
- };
32
- to: {
33
- label: string;
34
- timestamp: number;
35
- };
36
- addedNodes: SnapshotNode[];
37
- removedNodes: SnapshotNode[];
38
- addedEdges: SnapshotEdge[];
39
- removedEdges: SnapshotEdge[];
40
- }
41
- export declare class SnapshotManager {
42
- private readonly db;
43
- private readonly snapshotsDir;
44
- constructor(db: GraphDatabase, projectRoot: string);
45
- private ensureDir;
46
- save(label?: string): GraphSnapshot;
47
- list(): Array<{
48
- label: string;
49
- timestamp: number;
50
- nodeCount: number;
51
- edgeCount: number;
52
- }>;
53
- load(label: string): GraphSnapshot | null;
54
- loadLatest(): GraphSnapshot | null;
55
- currentSnapshot(): GraphSnapshot;
56
- diff(from: GraphSnapshot, to: GraphSnapshot): GraphDiff;
57
- }
58
- //# sourceMappingURL=snapshot.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"snapshot.d.ts","sourceRoot":"","sources":["../../src/core/snapshot.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3C,EAAE,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IACzC,UAAU,EAAE,YAAY,EAAE,CAAC;IAC3B,YAAY,EAAE,YAAY,EAAE,CAAC;IAC7B,UAAU,EAAE,YAAY,EAAE,CAAC;IAC3B,YAAY,EAAE,YAAY,EAAE,CAAC;CAC9B;AAID,qBAAa,eAAe;IAGd,OAAO,CAAC,QAAQ,CAAC,EAAE;IAF/B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;gBAET,EAAE,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM;IAInE,OAAO,CAAC,SAAS;IAIjB,IAAI,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,aAAa;IA+BnC,IAAI,IAAI,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAazF,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI;IAazC,UAAU,IAAI,aAAa,GAAG,IAAI;IAKlC,eAAe,IAAI,aAAa;IAUhC,IAAI,CAAC,IAAI,EAAE,aAAa,EAAE,EAAE,EAAE,aAAa,GAAG,SAAS;CAuBxD"}
@@ -1,23 +0,0 @@
1
- /**
2
- * Structured Filter → SQL WHERE Clause Builder
3
- *
4
- * Converts QueryFilter objects into parameterized SQL.
5
- * Zero injection surface — column names are validated against schema,
6
- * values are always parameterized.
7
- */
8
- import type { QueryFilter } from './types';
9
- interface SQLClause {
10
- where: string;
11
- params: any[];
12
- }
13
- /**
14
- * Build a parameterized WHERE clause from structured filters.
15
- * All filters are ANDed together.
16
- *
17
- * @param filters - Array of QueryFilter objects
18
- * @param validColumns - Set of valid column names (from schema)
19
- * @returns SQL WHERE clause and parameter array
20
- */
21
- export declare function buildWhereClause(filters: QueryFilter[], validColumns: Set<string>): SQLClause;
22
- export {};
23
- //# sourceMappingURL=filters.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"filters.d.ts","sourceRoot":"","sources":["../../src/data/filters.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,UAAU,SAAS;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,GAAG,EAAE,CAAC;CACf;AAcD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,WAAW,EAAE,EAAE,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,SAAS,CAoF7F"}
@@ -1,25 +0,0 @@
1
- /**
2
- * Data Indexer
3
- *
4
- * Orchestrates: scan data files → parse → profile columns → persist rows to SQLite.
5
- * Supports incremental re-indexing via content hashes.
6
- */
7
- import type { KiroGraphConfig } from '../config';
8
- import type { DataIndexResult } from './types';
9
- export declare class DataIndexer {
10
- private readonly db;
11
- private readonly config;
12
- private readonly projectRoot;
13
- constructor(db: any, config: KiroGraphConfig, projectRoot: string);
14
- indexAll(opts?: {
15
- force?: boolean;
16
- onProgress?: (msg: string) => void;
17
- }): Promise<DataIndexResult>;
18
- indexFile(relPath: string, force?: boolean): Promise<{
19
- rows: number;
20
- columns: number;
21
- } | null>;
22
- private scanDataFiles;
23
- private removeDeletedDatasets;
24
- }
25
- //# sourceMappingURL=indexer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"indexer.d.ts","sourceRoot":"","sources":["../../src/data/indexer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,KAAK,EAAuB,eAAe,EAAa,MAAM,SAAS,CAAC;AAkB/E,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAM;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkB;IACzC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;gBAEzB,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM;IAM3D,QAAQ,CAAC,IAAI,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;KAAE,GAAG,OAAO,CAAC,eAAe,CAAC;IAyClG,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,UAAQ,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IA8GlG,OAAO,CAAC,aAAa;IAkCrB,OAAO,CAAC,qBAAqB;CAc9B"}
@@ -1,37 +0,0 @@
1
- /**
2
- * Data ↔ Code Linker
3
- *
4
- * Detects references to data files in source code and populates data_code_refs.
5
- * Patterns detected:
6
- * - readFileSync('data/users.csv'), readFile('path/to/file.csv')
7
- * - pd.read_csv('data/file.csv'), pd.read_excel(...)
8
- * - open('data/file.csv'), csv.reader(open(...))
9
- * - COPY FROM 'file.csv', \copy ... from 'file.csv'
10
- * - require('./data/file.json'), import ... from './data/file.json'
11
- * - fs.createReadStream('data/file.csv')
12
- * - String literals matching known data file paths
13
- */
14
- /**
15
- * Scan source code content for references to data files.
16
- * Returns matched file paths with their reference type.
17
- */
18
- export declare function detectDataReferences(sourceContent: string, knownDataPaths: Set<string>): Array<{
19
- filePath: string;
20
- refType: 'reads' | 'writes';
21
- confidence: number;
22
- }>;
23
- /**
24
- * Link data files to code symbols.
25
- * Scans all indexed source files for references to known data file paths.
26
- */
27
- export declare class DataCodeLinker {
28
- private readonly db;
29
- private readonly projectRoot;
30
- constructor(db: any, projectRoot: string);
31
- /**
32
- * Populate data_code_refs by scanning source files for data file references.
33
- * Returns the number of refs created.
34
- */
35
- linkAll(): number;
36
- }
37
- //# sourceMappingURL=linker.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"linker.d.ts","sourceRoot":"","sources":["../../src/data/linker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAqCH;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,aAAa,EAAE,MAAM,EACrB,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,GAC1B,KAAK,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,GAAG,QAAQ,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,CAoC9E;AAiCD;;;GAGG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAM;IACzB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;gBAEzB,EAAE,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM;IAKxC;;;OAGG;IACH,OAAO,IAAI,MAAM;CAuDlB"}
@@ -1,60 +0,0 @@
1
- "use strict";
2
- var import_vitest = require("vitest");
3
- var import_linker = require("./linker");
4
- const KNOWN_PATHS = /* @__PURE__ */ new Set([
5
- "data/report.pdf",
6
- "docs/manual.pdf",
7
- "data/users.csv"
8
- ]);
9
- (0, import_vitest.describe)("detectDataReferences \u2014 PDF patterns", () => {
10
- (0, import_vitest.it)("detects readFileSync with .pdf path", () => {
11
- const src = `const buf = readFileSync('data/report.pdf')`;
12
- const refs = (0, import_linker.detectDataReferences)(src, KNOWN_PATHS);
13
- (0, import_vitest.expect)(refs.some((r) => r.filePath === "data/report.pdf" && r.refType === "reads")).toBe(true);
14
- });
15
- (0, import_vitest.it)("detects createReadStream with .pdf path", () => {
16
- const src = `fs.createReadStream('data/report.pdf')`;
17
- const refs = (0, import_linker.detectDataReferences)(src, KNOWN_PATHS);
18
- (0, import_vitest.expect)(refs.some((r) => r.filePath === "data/report.pdf")).toBe(true);
19
- });
20
- (0, import_vitest.it)("detects Python open() with .pdf extension", () => {
21
- const src = `f = open('docs/manual.pdf', 'rb')`;
22
- const refs = (0, import_linker.detectDataReferences)(src, KNOWN_PATHS);
23
- (0, import_vitest.expect)(refs.some((r) => r.filePath === "docs/manual.pdf")).toBe(true);
24
- });
25
- (0, import_vitest.it)("detects PdfReader() call", () => {
26
- const src = `reader = PdfReader('data/report.pdf')`;
27
- const refs = (0, import_linker.detectDataReferences)(src, KNOWN_PATHS);
28
- (0, import_vitest.expect)(refs.some((r) => r.filePath === "data/report.pdf")).toBe(true);
29
- });
30
- (0, import_vitest.it)("detects pdfplumber.open() call", () => {
31
- const src = `with pdfplumber.open('data/report.pdf') as pdf:`;
32
- const refs = (0, import_linker.detectDataReferences)(src, KNOWN_PATHS);
33
- (0, import_vitest.expect)(refs.some((r) => r.filePath === "data/report.pdf")).toBe(true);
34
- });
35
- (0, import_vitest.it)("detects fitz.open() call", () => {
36
- const src = `doc = fitz.open('docs/manual.pdf')`;
37
- const refs = (0, import_linker.detectDataReferences)(src, KNOWN_PATHS);
38
- (0, import_vitest.expect)(refs.some((r) => r.filePath === "docs/manual.pdf")).toBe(true);
39
- });
40
- (0, import_vitest.it)("detects generic string literal with .pdf extension", () => {
41
- const src = `const path = 'data/report.pdf';`;
42
- const refs = (0, import_linker.detectDataReferences)(src, KNOWN_PATHS);
43
- (0, import_vitest.expect)(refs.some((r) => r.filePath === "data/report.pdf")).toBe(true);
44
- });
45
- (0, import_vitest.it)("gives confidence 1.0 for known paths, lower for unknown", () => {
46
- const src = `readFileSync('data/report.pdf'); readFileSync('other/unknown.pdf')`;
47
- const refs = (0, import_linker.detectDataReferences)(src, KNOWN_PATHS);
48
- const known = refs.find((r) => r.filePath === "data/report.pdf");
49
- const unknown = refs.find((r) => r.filePath === "other/unknown.pdf");
50
- (0, import_vitest.expect)(known?.confidence).toBe(1);
51
- (0, import_vitest.expect)(unknown?.confidence).toBeLessThan(1);
52
- });
53
- (0, import_vitest.it)("does not confuse .pdf with .csv patterns", () => {
54
- const src = `readFileSync('data/users.csv')`;
55
- const refs = (0, import_linker.detectDataReferences)(src, KNOWN_PATHS);
56
- (0, import_vitest.expect)(refs.some((r) => r.filePath === "data/users.csv")).toBe(true);
57
- (0, import_vitest.expect)(refs.some((r) => r.filePath?.endsWith(".pdf"))).toBe(false);
58
- });
59
- });
60
- //# sourceMappingURL=linker.test.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/data/linker.test.ts"],
4
- "sourcesContent": ["import { describe, it, expect } from 'vitest';\nimport { detectDataReferences } from './linker';\n\nconst KNOWN_PATHS = new Set([\n 'data/report.pdf',\n 'docs/manual.pdf',\n 'data/users.csv',\n]);\n\ndescribe('detectDataReferences \u2014 PDF patterns', () => {\n it('detects readFileSync with .pdf path', () => {\n const src = `const buf = readFileSync('data/report.pdf')`;\n const refs = detectDataReferences(src, KNOWN_PATHS);\n expect(refs.some(r => r.filePath === 'data/report.pdf' && r.refType === 'reads')).toBe(true);\n });\n\n it('detects createReadStream with .pdf path', () => {\n const src = `fs.createReadStream('data/report.pdf')`;\n const refs = detectDataReferences(src, KNOWN_PATHS);\n expect(refs.some(r => r.filePath === 'data/report.pdf')).toBe(true);\n });\n\n it('detects Python open() with .pdf extension', () => {\n const src = `f = open('docs/manual.pdf', 'rb')`;\n const refs = detectDataReferences(src, KNOWN_PATHS);\n expect(refs.some(r => r.filePath === 'docs/manual.pdf')).toBe(true);\n });\n\n it('detects PdfReader() call', () => {\n const src = `reader = PdfReader('data/report.pdf')`;\n const refs = detectDataReferences(src, KNOWN_PATHS);\n expect(refs.some(r => r.filePath === 'data/report.pdf')).toBe(true);\n });\n\n it('detects pdfplumber.open() call', () => {\n const src = `with pdfplumber.open('data/report.pdf') as pdf:`;\n const refs = detectDataReferences(src, KNOWN_PATHS);\n expect(refs.some(r => r.filePath === 'data/report.pdf')).toBe(true);\n });\n\n it('detects fitz.open() call', () => {\n const src = `doc = fitz.open('docs/manual.pdf')`;\n const refs = detectDataReferences(src, KNOWN_PATHS);\n expect(refs.some(r => r.filePath === 'docs/manual.pdf')).toBe(true);\n });\n\n it('detects generic string literal with .pdf extension', () => {\n const src = `const path = 'data/report.pdf';`;\n const refs = detectDataReferences(src, KNOWN_PATHS);\n expect(refs.some(r => r.filePath === 'data/report.pdf')).toBe(true);\n });\n\n it('gives confidence 1.0 for known paths, lower for unknown', () => {\n const src = `readFileSync('data/report.pdf'); readFileSync('other/unknown.pdf')`;\n const refs = detectDataReferences(src, KNOWN_PATHS);\n const known = refs.find(r => r.filePath === 'data/report.pdf');\n const unknown = refs.find(r => r.filePath === 'other/unknown.pdf');\n expect(known?.confidence).toBe(1.0);\n expect(unknown?.confidence).toBeLessThan(1.0);\n });\n\n it('does not confuse .pdf with .csv patterns', () => {\n const src = `readFileSync('data/users.csv')`;\n const refs = detectDataReferences(src, KNOWN_PATHS);\n expect(refs.some(r => r.filePath === 'data/users.csv')).toBe(true);\n expect(refs.some(r => r.filePath?.endsWith('.pdf'))).toBe(false);\n });\n});\n"],
5
- "mappings": ";AAAA,oBAAqC;AACrC,oBAAqC;AAErC,MAAM,cAAc,oBAAI,IAAI;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAAA,IAED,wBAAS,4CAAuC,MAAM;AACpD,wBAAG,uCAAuC,MAAM;AAC9C,UAAM,MAAM;AACZ,UAAM,WAAO,oCAAqB,KAAK,WAAW;AAClD,8BAAO,KAAK,KAAK,OAAK,EAAE,aAAa,qBAAqB,EAAE,YAAY,OAAO,CAAC,EAAE,KAAK,IAAI;AAAA,EAC7F,CAAC;AAED,wBAAG,2CAA2C,MAAM;AAClD,UAAM,MAAM;AACZ,UAAM,WAAO,oCAAqB,KAAK,WAAW;AAClD,8BAAO,KAAK,KAAK,OAAK,EAAE,aAAa,iBAAiB,CAAC,EAAE,KAAK,IAAI;AAAA,EACpE,CAAC;AAED,wBAAG,6CAA6C,MAAM;AACpD,UAAM,MAAM;AACZ,UAAM,WAAO,oCAAqB,KAAK,WAAW;AAClD,8BAAO,KAAK,KAAK,OAAK,EAAE,aAAa,iBAAiB,CAAC,EAAE,KAAK,IAAI;AAAA,EACpE,CAAC;AAED,wBAAG,4BAA4B,MAAM;AACnC,UAAM,MAAM;AACZ,UAAM,WAAO,oCAAqB,KAAK,WAAW;AAClD,8BAAO,KAAK,KAAK,OAAK,EAAE,aAAa,iBAAiB,CAAC,EAAE,KAAK,IAAI;AAAA,EACpE,CAAC;AAED,wBAAG,kCAAkC,MAAM;AACzC,UAAM,MAAM;AACZ,UAAM,WAAO,oCAAqB,KAAK,WAAW;AAClD,8BAAO,KAAK,KAAK,OAAK,EAAE,aAAa,iBAAiB,CAAC,EAAE,KAAK,IAAI;AAAA,EACpE,CAAC;AAED,wBAAG,4BAA4B,MAAM;AACnC,UAAM,MAAM;AACZ,UAAM,WAAO,oCAAqB,KAAK,WAAW;AAClD,8BAAO,KAAK,KAAK,OAAK,EAAE,aAAa,iBAAiB,CAAC,EAAE,KAAK,IAAI;AAAA,EACpE,CAAC;AAED,wBAAG,sDAAsD,MAAM;AAC7D,UAAM,MAAM;AACZ,UAAM,WAAO,oCAAqB,KAAK,WAAW;AAClD,8BAAO,KAAK,KAAK,OAAK,EAAE,aAAa,iBAAiB,CAAC,EAAE,KAAK,IAAI;AAAA,EACpE,CAAC;AAED,wBAAG,2DAA2D,MAAM;AAClE,UAAM,MAAM;AACZ,UAAM,WAAO,oCAAqB,KAAK,WAAW;AAClD,UAAM,QAAQ,KAAK,KAAK,OAAK,EAAE,aAAa,iBAAiB;AAC7D,UAAM,UAAU,KAAK,KAAK,OAAK,EAAE,aAAa,mBAAmB;AACjE,8BAAO,OAAO,UAAU,EAAE,KAAK,CAAG;AAClC,8BAAO,SAAS,UAAU,EAAE,aAAa,CAAG;AAAA,EAC9C,CAAC;AAED,wBAAG,4CAA4C,MAAM;AACnD,UAAM,MAAM;AACZ,UAAM,WAAO,oCAAqB,KAAK,WAAW;AAClD,8BAAO,KAAK,KAAK,OAAK,EAAE,aAAa,gBAAgB,CAAC,EAAE,KAAK,IAAI;AACjE,8BAAO,KAAK,KAAK,OAAK,EAAE,UAAU,SAAS,MAAM,CAAC,CAAC,EAAE,KAAK,KAAK;AAAA,EACjE,CAAC;AACH,CAAC;",
6
- "names": []
7
- }
@@ -1,27 +0,0 @@
1
- /**
2
- * Data Lint
3
- *
4
- * Integrity checks for the data index:
5
- * - Row count mismatch (stored vs actual table rows)
6
- * - Schema consistency (columns in profile vs actual table)
7
- * - Stale datasets (source file deleted or changed)
8
- * - Missing optional deps (files skipped due to missing xlsx/parquetjs-lite)
9
- * - Orphan code refs (refs pointing to deleted datasets)
10
- */
11
- export interface LintIssue {
12
- severity: 'error' | 'warning' | 'info';
13
- dataset?: string;
14
- message: string;
15
- }
16
- export interface LintResult {
17
- issues: LintIssue[];
18
- datasetsChecked: number;
19
- healthy: number;
20
- }
21
- export declare class DataLinter {
22
- private readonly db;
23
- private readonly projectRoot;
24
- constructor(db: any, projectRoot: string);
25
- lint(): LintResult;
26
- }
27
- //# sourceMappingURL=lint.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../src/data/lint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;IACvC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAM;IACzB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;gBAEzB,EAAE,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM;IAKxC,IAAI,IAAI,UAAU;CAgFnB"}
@@ -1,41 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var pdf_inspector_stub_exports = {};
20
- __export(pdf_inspector_stub_exports, {
21
- classifyPdf: () => classifyPdf,
22
- extractPagesMarkdown: () => extractPagesMarkdown,
23
- processPdf: () => processPdf
24
- });
25
- module.exports = __toCommonJS(pdf_inspector_stub_exports);
26
- function extractPagesMarkdown(_buf) {
27
- throw new Error("@firecrawl/pdf-inspector is not installed");
28
- }
29
- function processPdf(_buf) {
30
- throw new Error("@firecrawl/pdf-inspector is not installed");
31
- }
32
- function classifyPdf(_buf) {
33
- throw new Error("@firecrawl/pdf-inspector is not installed");
34
- }
35
- // Annotate the CommonJS export names for ESM import in node:
36
- 0 && (module.exports = {
37
- classifyPdf,
38
- extractPagesMarkdown,
39
- processPdf
40
- });
41
- //# sourceMappingURL=pdf-inspector-stub.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/data/parsers/__fixtures__/pdf-inspector-stub.ts"],
4
- "sourcesContent": ["// Stub for @firecrawl/pdf-inspector used in tests.\n// Real package not installed \u2014 this stub allows require() to resolve.\n// vi.mock('@firecrawl/pdf-inspector', factory) overrides this in individual tests.\nexport function extractPagesMarkdown(_buf: Buffer): never {\n throw new Error('@firecrawl/pdf-inspector is not installed');\n}\nexport function processPdf(_buf: Buffer): never {\n throw new Error('@firecrawl/pdf-inspector is not installed');\n}\nexport function classifyPdf(_buf: Buffer): never {\n throw new Error('@firecrawl/pdf-inspector is not installed');\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,SAAS,qBAAqB,MAAqB;AACxD,QAAM,IAAI,MAAM,2CAA2C;AAC7D;AACO,SAAS,WAAW,MAAqB;AAC9C,QAAM,IAAI,MAAM,2CAA2C;AAC7D;AACO,SAAS,YAAY,MAAqB;AAC/C,QAAM,IAAI,MAAM,2CAA2C;AAC7D;",
6
- "names": []
7
- }
@@ -1,11 +0,0 @@
1
- /**
2
- * CSV/TSV Streaming Parser
3
- *
4
- * Handles: .csv, .tsv
5
- * Parses line-by-line without loading the full file into memory.
6
- * Handles quoted fields, newlines within quotes, and various delimiters.
7
- */
8
- import type { DataFormatParser } from '../types';
9
- export declare const csvParser: DataFormatParser;
10
- export declare const tsvParser: DataFormatParser;
11
- //# sourceMappingURL=csv.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"csv.d.ts","sourceRoot":"","sources":["../../../src/data/parsers/csv.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAa,MAAM,UAAU,CAAC;AAwG5D,eAAO,MAAM,SAAS,EAAE,gBAKvB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,gBAKvB,CAAC"}
@@ -1,10 +0,0 @@
1
- /**
2
- * Excel Parser (Optional Dependency)
3
- *
4
- * Handles: .xlsx, .xls
5
- * Requires: xlsx package (optional dependency)
6
- * Gracefully returns isAvailable()=false if not installed.
7
- */
8
- import type { DataFormatParser } from '../types';
9
- export declare const excelParser: DataFormatParser;
10
- //# sourceMappingURL=excel.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"excel.d.ts","sourceRoot":"","sources":["../../../src/data/parsers/excel.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAa,MAAM,UAAU,CAAC;AAkB5D,eAAO,MAAM,WAAW,EAAE,gBA0DzB,CAAC"}
@@ -1,28 +0,0 @@
1
- /**
2
- * Data Format Registry
3
- *
4
- * Maps file extensions to their appropriate parser.
5
- * Gracefully skips formats whose optional dependencies are not installed.
6
- */
7
- import type { DataFormatParser } from '../types';
8
- /**
9
- * Get the parser for a given file extension.
10
- * Returns null if no parser is registered or the optional dep is missing.
11
- */
12
- export declare function getDataParser(filePath: string): DataFormatParser | null;
13
- /**
14
- * Check if a file extension is supported for data parsing.
15
- */
16
- export declare function isSupportedDataFormat(filePath: string): boolean;
17
- /**
18
- * Get all supported extensions (only those with available deps).
19
- */
20
- export declare function getAvailableExtensions(): string[];
21
- /**
22
- * Get extensions that are registered but have missing optional deps.
23
- */
24
- export declare function getUnavailableExtensions(): Array<{
25
- ext: string;
26
- parser: string;
27
- }>;
28
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/data/parsers/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AA4BjD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAMvE;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAE/D;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,EAAE,CAMjD;AAED;;GAEG;AACH,wBAAgB,wBAAwB,IAAI,KAAK,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAQjF"}
@@ -1,9 +0,0 @@
1
- /**
2
- * JSON Array Parser
3
- *
4
- * Handles: .json files that contain an array of objects
5
- * For files in data/ directories (not package.json, tsconfig.json, etc.)
6
- */
7
- import type { DataFormatParser } from '../types';
8
- export declare const jsonArrayParser: DataFormatParser;
9
- //# sourceMappingURL=json-array.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"json-array.d.ts","sourceRoot":"","sources":["../../../src/data/parsers/json-array.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAa,MAAM,UAAU,CAAC;AAI5D,eAAO,MAAM,eAAe,EAAE,gBA6D7B,CAAC"}
@@ -1,9 +0,0 @@
1
- /**
2
- * JSONL/NDJSON Streaming Parser
3
- *
4
- * Handles: .jsonl, .ndjson
5
- * Parses one JSON object per line without loading the full file.
6
- */
7
- import type { DataFormatParser } from '../types';
8
- export declare const jsonlParser: DataFormatParser;
9
- //# sourceMappingURL=jsonl.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"jsonl.d.ts","sourceRoot":"","sources":["../../../src/data/parsers/jsonl.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAa,MAAM,UAAU,CAAC;AAI5D,eAAO,MAAM,WAAW,EAAE,gBAoDzB,CAAC"}
@@ -1,10 +0,0 @@
1
- /**
2
- * Parquet Parser (Optional Dependency)
3
- *
4
- * Handles: .parquet
5
- * Requires: parquetjs-lite package (optional dependency)
6
- * Gracefully returns isAvailable()=false if not installed.
7
- */
8
- import type { DataFormatParser } from '../types';
9
- export declare const parquetParser: DataFormatParser;
10
- //# sourceMappingURL=parquet.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parquet.d.ts","sourceRoot":"","sources":["../../../src/data/parsers/parquet.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAa,MAAM,UAAU,CAAC;AAuB5D,eAAO,MAAM,aAAa,EAAE,gBAyD3B,CAAC"}
@@ -1,125 +0,0 @@
1
- "use strict";
2
- var import_vitest = require("vitest");
3
- var import_pdf = require("./pdf");
4
- import_vitest.vi.mock("fs", async (importOriginal) => {
5
- const actual = await importOriginal();
6
- return { ...actual, readFileSync: import_vitest.vi.fn().mockReturnValue(Buffer.from("fake-pdf")) };
7
- });
8
- const mockExtractPages = import_vitest.vi.fn();
9
- const mockProcessPdf = import_vitest.vi.fn();
10
- function makeMockResult(pages, opts) {
11
- return {
12
- pages,
13
- pagesWithTables: opts?.pagesWithTables ?? [],
14
- pagesWithColumns: opts?.pagesWithColumns ?? []
15
- };
16
- }
17
- (0, import_vitest.describe)("pdfParser", () => {
18
- (0, import_vitest.beforeEach)(() => {
19
- import_vitest.vi.clearAllMocks();
20
- (0, import_pdf._setPdfInspectorForTesting)({ extractPagesMarkdown: mockExtractPages, processPdf: mockProcessPdf });
21
- });
22
- (0, import_vitest.afterEach)(() => {
23
- (0, import_pdf._resetPdfInspectorForTesting)();
24
- });
25
- (0, import_vitest.it)("isAvailable returns true when module is injected", () => {
26
- (0, import_vitest.expect)(import_pdf.pdfParser.isAvailable()).toBe(true);
27
- });
28
- (0, import_vitest.it)("isAvailable returns false when module is not available", () => {
29
- (0, import_pdf._resetPdfInspectorForTesting)();
30
- (0, import_vitest.expect)(import_pdf.pdfParser.isAvailable()).toBe(false);
31
- });
32
- (0, import_vitest.it)("parse returns empty result when library is unavailable", async () => {
33
- (0, import_pdf._resetPdfInspectorForTesting)();
34
- const batches = [];
35
- const result = await import_pdf.pdfParser.parse("/fake/doc.pdf", {
36
- maxRows: 1e3,
37
- onBatch: (rows, cols) => batches.push({ rows, cols })
38
- });
39
- (0, import_vitest.expect)(result.columns).toEqual([]);
40
- (0, import_vitest.expect)(result.totalRows).toBe(0);
41
- (0, import_vitest.expect)(batches).toHaveLength(0);
42
- });
43
- (0, import_vitest.it)("happy path: text-based PDF produces correct rows and metadata", async () => {
44
- mockExtractPages.mockReturnValue(makeMockResult([
45
- { page: 0, markdown: "# Title\n\nSome content here.", needsOcr: false },
46
- { page: 1, markdown: "Page two content.", needsOcr: false }
47
- ], { pagesWithTables: [1], pagesWithColumns: [] }));
48
- mockProcessPdf.mockReturnValue({
49
- pdfType: "TextBased",
50
- confidence: 0.97,
51
- title: "Test Doc",
52
- hasEncodingIssues: false,
53
- isComplexLayout: false
54
- });
55
- const batches = [];
56
- const result = await import_pdf.pdfParser.parse("/fake/report.pdf", {
57
- maxRows: 1e3,
58
- onBatch: (rows, cols) => batches.push({ rows, cols })
59
- });
60
- (0, import_vitest.expect)(result.columns).toEqual(["page", "content", "needs_ocr", "has_tables", "has_columns"]);
61
- (0, import_vitest.expect)(result.totalRows).toBe(2);
62
- (0, import_vitest.expect)(batches).toHaveLength(1);
63
- (0, import_vitest.expect)(batches[0].rows[0]).toMatchObject({ page: "0", needs_ocr: "false", has_tables: "false" });
64
- (0, import_vitest.expect)(batches[0].rows[1]).toMatchObject({ page: "1", needs_ocr: "false", has_tables: "true" });
65
- (0, import_vitest.expect)(result.metadataJson).toBeTruthy();
66
- const meta = JSON.parse(result.metadataJson);
67
- (0, import_vitest.expect)(meta.pdfType).toBe("TextBased");
68
- (0, import_vitest.expect)(meta.confidence).toBe(0.97);
69
- (0, import_vitest.expect)(meta.hasEncodingIssues).toBe(false);
70
- });
71
- (0, import_vitest.it)("mixed PDF: text pages indexed normally, scanned pages flagged", async () => {
72
- mockExtractPages.mockReturnValue(makeMockResult([
73
- { page: 0, markdown: "Text content", needsOcr: false },
74
- { page: 1, markdown: "", needsOcr: true },
75
- { page: 2, markdown: "More text", needsOcr: false },
76
- { page: 3, markdown: "", needsOcr: true }
77
- ]));
78
- mockProcessPdf.mockReturnValue({ pdfType: "Mixed", confidence: 0.85, hasEncodingIssues: false, isComplexLayout: false });
79
- const batches = [];
80
- await import_pdf.pdfParser.parse("/fake/mixed.pdf", {
81
- maxRows: 1e3,
82
- onBatch: (rows2) => batches.push({ rows: rows2 })
83
- });
84
- (0, import_vitest.expect)(batches).toHaveLength(1);
85
- const rows = batches[0].rows;
86
- (0, import_vitest.expect)(rows).toHaveLength(4);
87
- (0, import_vitest.expect)(rows.filter((r) => r.needs_ocr === "true")).toHaveLength(2);
88
- (0, import_vitest.expect)(rows.filter((r) => r.needs_ocr === "false")).toHaveLength(2);
89
- });
90
- (0, import_vitest.it)("hasEncodingIssues is captured in metadataJson", async () => {
91
- mockExtractPages.mockReturnValue(makeMockResult([{ page: 0, markdown: "garbled", needsOcr: false }]));
92
- mockProcessPdf.mockReturnValue({ pdfType: "TextBased", confidence: 0.4, hasEncodingIssues: true, isComplexLayout: false });
93
- const result = await import_pdf.pdfParser.parse("/fake/garbled.pdf", { maxRows: 1e3, onBatch: () => {
94
- } });
95
- (0, import_vitest.expect)(result.metadataJson).toBeTruthy();
96
- const meta = JSON.parse(result.metadataJson);
97
- (0, import_vitest.expect)(meta.hasEncodingIssues).toBe(true);
98
- });
99
- (0, import_vitest.it)("empty PDF returns no rows and no batch", async () => {
100
- mockExtractPages.mockReturnValue({ pages: [], pagesWithTables: [], pagesWithColumns: [] });
101
- mockProcessPdf.mockReturnValue({ pdfType: "TextBased", confidence: 1, hasEncodingIssues: false, isComplexLayout: false });
102
- const batches = [];
103
- const result = await import_pdf.pdfParser.parse("/fake/empty.pdf", {
104
- maxRows: 1e3,
105
- onBatch: (rows, cols) => batches.push({ rows, cols })
106
- });
107
- (0, import_vitest.expect)(result.totalRows).toBe(0);
108
- (0, import_vitest.expect)(batches).toHaveLength(0);
109
- });
110
- (0, import_vitest.it)("gracefully handles processPdf failure \u2014 still returns rows", async () => {
111
- mockExtractPages.mockReturnValue(makeMockResult([{ page: 0, markdown: "content", needsOcr: false }]));
112
- mockProcessPdf.mockImplementation(() => {
113
- throw new Error("processPdf failed");
114
- });
115
- const batches = [];
116
- const result = await import_pdf.pdfParser.parse("/fake/broken-meta.pdf", {
117
- maxRows: 1e3,
118
- onBatch: (rows, cols) => batches.push({ rows, cols })
119
- });
120
- (0, import_vitest.expect)(result.totalRows).toBe(1);
121
- (0, import_vitest.expect)(batches).toHaveLength(1);
122
- (0, import_vitest.expect)(result.metadataJson).toBeNull();
123
- });
124
- });
125
- //# sourceMappingURL=pdf.test.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/data/parsers/pdf.test.ts"],
4
- "sourcesContent": ["import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';\nimport { pdfParser, _setPdfInspectorForTesting, _resetPdfInspectorForTesting } from './pdf';\n\n// \u2500\u2500 Mock fs.readFileSync so tests never touch the filesystem \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nvi.mock('fs', async (importOriginal) => {\n const actual = await importOriginal<typeof import('fs')>();\n return { ...actual, readFileSync: vi.fn().mockReturnValue(Buffer.from('fake-pdf')) };\n});\n\n// \u2500\u2500 Helpers \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nconst mockExtractPages = vi.fn();\nconst mockProcessPdf = vi.fn();\n\nfunction makeMockResult(\n pages: Array<{ page: number; markdown: string; needsOcr: boolean }>,\n opts?: { pagesWithTables?: number[]; pagesWithColumns?: number[] },\n) {\n return {\n pages,\n pagesWithTables: opts?.pagesWithTables ?? [],\n pagesWithColumns: opts?.pagesWithColumns ?? [],\n };\n}\n\n// \u2500\u2500 Tests \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\ndescribe('pdfParser', () => {\n beforeEach(() => {\n vi.clearAllMocks();\n _setPdfInspectorForTesting({ extractPagesMarkdown: mockExtractPages, processPdf: mockProcessPdf });\n });\n\n afterEach(() => {\n _resetPdfInspectorForTesting();\n });\n\n it('isAvailable returns true when module is injected', () => {\n expect(pdfParser.isAvailable()).toBe(true);\n });\n\n it('isAvailable returns false when module is not available', () => {\n _resetPdfInspectorForTesting(); // clears pdfModule\n // Simulate require() failure by resetting the module\n expect(pdfParser.isAvailable()).toBe(false);\n });\n\n it('parse returns empty result when library is unavailable', async () => {\n _resetPdfInspectorForTesting();\n const batches: any[] = [];\n const result = await pdfParser.parse('/fake/doc.pdf', {\n maxRows: 1000,\n onBatch: (rows, cols) => batches.push({ rows, cols }),\n });\n expect(result.columns).toEqual([]);\n expect(result.totalRows).toBe(0);\n expect(batches).toHaveLength(0);\n });\n\n it('happy path: text-based PDF produces correct rows and metadata', async () => {\n mockExtractPages.mockReturnValue(makeMockResult([\n { page: 0, markdown: '# Title\\n\\nSome content here.', needsOcr: false },\n { page: 1, markdown: 'Page two content.', needsOcr: false },\n ], { pagesWithTables: [1], pagesWithColumns: [] }));\n mockProcessPdf.mockReturnValue({\n pdfType: 'TextBased', confidence: 0.97, title: 'Test Doc',\n hasEncodingIssues: false, isComplexLayout: false,\n });\n\n const batches: Array<{ rows: any[]; cols: string[] }> = [];\n const result = await pdfParser.parse('/fake/report.pdf', {\n maxRows: 1000,\n onBatch: (rows, cols) => batches.push({ rows, cols }),\n });\n\n expect(result.columns).toEqual(['page', 'content', 'needs_ocr', 'has_tables', 'has_columns']);\n expect(result.totalRows).toBe(2);\n expect(batches).toHaveLength(1);\n expect(batches[0]!.rows[0]).toMatchObject({ page: '0', needs_ocr: 'false', has_tables: 'false' });\n expect(batches[0]!.rows[1]).toMatchObject({ page: '1', needs_ocr: 'false', has_tables: 'true' });\n\n expect(result.metadataJson).toBeTruthy();\n const meta = JSON.parse(result.metadataJson!);\n expect(meta.pdfType).toBe('TextBased');\n expect(meta.confidence).toBe(0.97);\n expect(meta.hasEncodingIssues).toBe(false);\n });\n\n it('mixed PDF: text pages indexed normally, scanned pages flagged', async () => {\n mockExtractPages.mockReturnValue(makeMockResult([\n { page: 0, markdown: 'Text content', needsOcr: false },\n { page: 1, markdown: '', needsOcr: true },\n { page: 2, markdown: 'More text', needsOcr: false },\n { page: 3, markdown: '', needsOcr: true },\n ]));\n mockProcessPdf.mockReturnValue({ pdfType: 'Mixed', confidence: 0.85, hasEncodingIssues: false, isComplexLayout: false });\n\n const batches: Array<{ rows: any[] }> = [];\n await pdfParser.parse('/fake/mixed.pdf', {\n maxRows: 1000,\n onBatch: (rows) => batches.push({ rows }),\n });\n\n expect(batches).toHaveLength(1);\n const rows = batches[0]!.rows;\n expect(rows).toHaveLength(4);\n expect(rows.filter((r: any) => r.needs_ocr === 'true')).toHaveLength(2);\n expect(rows.filter((r: any) => r.needs_ocr === 'false')).toHaveLength(2);\n });\n\n it('hasEncodingIssues is captured in metadataJson', async () => {\n mockExtractPages.mockReturnValue(makeMockResult([{ page: 0, markdown: 'garbled', needsOcr: false }]));\n mockProcessPdf.mockReturnValue({ pdfType: 'TextBased', confidence: 0.4, hasEncodingIssues: true, isComplexLayout: false });\n\n const result = await pdfParser.parse('/fake/garbled.pdf', { maxRows: 1000, onBatch: () => {} });\n\n expect(result.metadataJson).toBeTruthy();\n const meta = JSON.parse(result.metadataJson!);\n expect(meta.hasEncodingIssues).toBe(true);\n });\n\n it('empty PDF returns no rows and no batch', async () => {\n mockExtractPages.mockReturnValue({ pages: [], pagesWithTables: [], pagesWithColumns: [] });\n mockProcessPdf.mockReturnValue({ pdfType: 'TextBased', confidence: 1, hasEncodingIssues: false, isComplexLayout: false });\n\n const batches: any[] = [];\n const result = await pdfParser.parse('/fake/empty.pdf', {\n maxRows: 1000,\n onBatch: (rows, cols) => batches.push({ rows, cols }),\n });\n\n expect(result.totalRows).toBe(0);\n expect(batches).toHaveLength(0);\n });\n\n it('gracefully handles processPdf failure \u2014 still returns rows', async () => {\n mockExtractPages.mockReturnValue(makeMockResult([{ page: 0, markdown: 'content', needsOcr: false }]));\n mockProcessPdf.mockImplementation(() => { throw new Error('processPdf failed'); });\n\n const batches: any[] = [];\n const result = await pdfParser.parse('/fake/broken-meta.pdf', {\n maxRows: 1000,\n onBatch: (rows, cols) => batches.push({ rows, cols }),\n });\n\n expect(result.totalRows).toBe(1);\n expect(batches).toHaveLength(1);\n expect(result.metadataJson).toBeNull();\n });\n});\n"],
5
- "mappings": "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",
6
- "names": ["rows"]
7
- }