codebaseiq 0.1.0 → 0.2.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 (422) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/dist/augment-vue-worker.js +1 -1
  3. package/dist/{chunk-DQMDCD24.js → chunk-27PHVDKL.js} +2 -2
  4. package/dist/{chunk-ZMI2JSX2.js → chunk-2DMVFAY7.js} +2 -2
  5. package/dist/{chunk-5PUWMSDU.js → chunk-2E6BTWER.js} +2 -2
  6. package/dist/{chunk-YESXMKX3.js → chunk-2F5ERMNI.js} +2 -2
  7. package/dist/chunk-2VKB5CMA.js +60 -0
  8. package/dist/{chunk-NNJ2KZZG.js → chunk-327YK6TB.js} +4 -4
  9. package/dist/chunk-347TXATM.js +2 -0
  10. package/dist/{chunk-VEXUL62T.js → chunk-35YYZD3D.js} +2 -2
  11. package/dist/chunk-36WRYYTE.js +3 -0
  12. package/dist/chunk-37TKC6MB.js +2 -0
  13. package/dist/{chunk-FAJQ7LWY.js → chunk-3AC56WAR.js} +2 -2
  14. package/dist/{chunk-JE3WZ6II.js → chunk-3NUZVLR7.js} +2 -2
  15. package/dist/{chunk-UZGZB3VB.js → chunk-3XFJUWJE.js} +2 -2
  16. package/dist/{chunk-OVTS4DKB.js → chunk-4AOOSCZ7.js} +2 -2
  17. package/dist/{chunk-LU3BMVH2.js → chunk-4IFISPQW.js} +2 -2
  18. package/dist/chunk-4NHWNAWQ.js +11 -0
  19. package/dist/chunk-4O52YNKL.js +5 -0
  20. package/dist/{chunk-HPJRBHVT.js → chunk-54K6556S.js} +2 -2
  21. package/dist/{chunk-HRWGYWRJ.js → chunk-57GCCPLS.js} +2 -2
  22. package/dist/{chunk-J77SU6VA.js → chunk-57KEZDPT.js} +2 -2
  23. package/dist/{chunk-OFBE4NGP.js → chunk-57KFVPVZ.js} +2 -2
  24. package/dist/{chunk-WOQBZPIF.js → chunk-5BDK6QC3.js} +2 -2
  25. package/dist/{chunk-7MGU3HPH.js → chunk-5IO2APSS.js} +2 -2
  26. package/dist/chunk-5NJPH3QZ.js +61 -0
  27. package/dist/{chunk-GW6Z3WGY.js → chunk-5WXOEJ4G.js} +2 -2
  28. package/dist/chunk-5XEVXVTK.js +3 -0
  29. package/dist/{chunk-RR7SX44N.js → chunk-6OVNYYY4.js} +2 -2
  30. package/dist/{chunk-ZV3JV5G5.js → chunk-6SDEQTVY.js} +2 -2
  31. package/dist/{chunk-EF2R3WNQ.js → chunk-6URCE5QY.js} +2 -2
  32. package/dist/{chunk-UCD3H3UZ.js → chunk-6ZV5EDUT.js} +2 -2
  33. package/dist/{chunk-C6SBF2WH.js → chunk-77GHPR2R.js} +2 -2
  34. package/dist/{chunk-YVCIMIOC.js → chunk-7R64XY4Y.js} +2 -2
  35. package/dist/{chunk-VXYS3FZD.js → chunk-7Z7HCZ7J.js} +2 -2
  36. package/dist/{chunk-CO5R3UNA.js → chunk-A67HT5FR.js} +2 -2
  37. package/dist/{chunk-UDS562V4.js → chunk-A7XQT7MH.js} +2 -2
  38. package/dist/{chunk-RDBI2RXU.js → chunk-ACZDU5GK.js} +2 -2
  39. package/dist/{chunk-FETNQCFO.js → chunk-AM5SUGHF.js} +2 -2
  40. package/dist/{chunk-NNOKTMZT.js → chunk-B2E3HZ2A.js} +2 -2
  41. package/dist/{chunk-CVYSU6BX.js → chunk-BH5CE4LN.js} +2 -2
  42. package/dist/chunk-BLKYYQ7C.js +543 -0
  43. package/dist/{chunk-4WKDMDEW.js → chunk-BX2U3QQV.js} +2 -2
  44. package/dist/{chunk-ZKX2FRS6.js → chunk-CANBLFVQ.js} +2 -2
  45. package/dist/{chunk-SMRBZ6EC.js → chunk-CCRZLRWJ.js} +2 -2
  46. package/dist/chunk-CDWSLAPN.js +21 -0
  47. package/dist/chunk-CIVYHK7U.js +22 -0
  48. package/dist/{chunk-L57ZKWVG.js → chunk-CMXW7MFV.js} +2 -2
  49. package/dist/{chunk-T3DGWPXM.js → chunk-CSZOQ7YO.js} +2 -2
  50. package/dist/{chunk-ZZXSWSN6.js → chunk-CWMHWD56.js} +2 -2
  51. package/dist/{chunk-6NW7MU72.js → chunk-CZEIHYMP.js} +2 -2
  52. package/dist/{chunk-DO6WQD2T.js → chunk-D62CTZX6.js} +2 -2
  53. package/dist/{chunk-XWUOUWYI.js → chunk-DFPAZXLU.js} +2 -2
  54. package/dist/{chunk-MOVBWNIP.js → chunk-DKJXK3HA.js} +2 -2
  55. package/dist/{chunk-XMQ23E27.js → chunk-DLC6JDN7.js} +2 -2
  56. package/dist/chunk-DUKHVPU5.js +4 -0
  57. package/dist/{chunk-ID63777H.js → chunk-DVYG3JTA.js} +2 -2
  58. package/dist/{chunk-NE6IU5ZD.js → chunk-EFFMFK7C.js} +2 -2
  59. package/dist/{chunk-I2T2LLK2.js → chunk-EM5UHLAM.js} +2 -2
  60. package/dist/chunk-EN4AHLL3.js +3 -0
  61. package/dist/chunk-EXMVF3JR.js +3 -0
  62. package/dist/{chunk-SWHMHUKF.js → chunk-FEBLLMTL.js} +2 -2
  63. package/dist/chunk-FIXYHQ3W.js +3 -0
  64. package/dist/{chunk-RKEJ6VTF.js → chunk-FLLXYUOL.js} +2 -2
  65. package/dist/{chunk-KWVHSKHK.js → chunk-FPDL2TUB.js} +2 -2
  66. package/dist/chunk-FQA3KIFX.js +17 -0
  67. package/dist/chunk-FWY2PRIF.js +3 -0
  68. package/dist/chunk-FY5V4V4F.js +2 -0
  69. package/dist/chunk-G2XUZCF2.js +88 -0
  70. package/dist/{chunk-QHRNXP3C.js → chunk-GXVDTHFC.js} +2 -2
  71. package/dist/{chunk-6MUIJMVL.js → chunk-H3CKAL6P.js} +2 -2
  72. package/dist/chunk-H5QXP63L.js +2 -0
  73. package/dist/{chunk-VUIYB2V3.js → chunk-HBQGKMM3.js} +2 -2
  74. package/dist/{chunk-PYAB5SM6.js → chunk-HBXZAGY6.js} +2 -2
  75. package/dist/{chunk-NNO6A2PO.js → chunk-HCMQZPEO.js} +2 -2
  76. package/dist/{chunk-Q65CQ4XL.js → chunk-HHBBGWES.js} +2 -2
  77. package/dist/{chunk-GTXSJDCO.js → chunk-HIEXRDJF.js} +2 -2
  78. package/dist/{chunk-4FC325IF.js → chunk-HYKSLTAR.js} +2 -2
  79. package/dist/{chunk-XLQ3GLWZ.js → chunk-I2KP4AGR.js} +2 -2
  80. package/dist/chunk-I5FCDTK2.js +2 -0
  81. package/dist/{chunk-QKPLA6IC.js → chunk-I645ZF75.js} +2 -2
  82. package/dist/{chunk-FDGD5AB5.js → chunk-IBM3F2BJ.js} +2 -2
  83. package/dist/{chunk-Q72QSKXC.js → chunk-IEL6Q5W3.js} +38 -38
  84. package/dist/{chunk-NCZUNH3E.js → chunk-IGQQUENU.js} +12 -12
  85. package/dist/chunk-IGYAZPRX.js +4 -0
  86. package/dist/chunk-IOVPAZWP.js +3 -0
  87. package/dist/{chunk-OL6KJP3N.js → chunk-IVJJNVSX.js} +2 -2
  88. package/dist/{chunk-AKB7V7TV.js → chunk-IWAMYGPN.js} +2 -2
  89. package/dist/chunk-IYBIBMPF.js +90 -0
  90. package/dist/{chunk-IOP6FWIM.js → chunk-J24VICI5.js} +2 -2
  91. package/dist/{chunk-C7QOQX32.js → chunk-JN5LIBT3.js} +2 -2
  92. package/dist/{chunk-O6QTXQPJ.js → chunk-JOALNFY3.js} +2 -2
  93. package/dist/{chunk-GCHRX4YW.js → chunk-JUO3Z644.js} +2 -2
  94. package/dist/{chunk-BJ6SQAEN.js → chunk-JXHLB7TP.js} +2 -2
  95. package/dist/{chunk-IJ4HMYBE.js → chunk-JYX5UZSZ.js} +2 -2
  96. package/dist/chunk-K2O7SBAU.js +2 -0
  97. package/dist/{chunk-OLF4MA5W.js → chunk-K5G7SPAG.js} +2 -2
  98. package/dist/{chunk-YSNONTJ2.js → chunk-KDYQQJ6X.js} +2 -2
  99. package/dist/{chunk-7NVGT435.js → chunk-KM4QRWI5.js} +2 -2
  100. package/dist/{chunk-HKQUXIFO.js → chunk-KNV5VFDV.js} +2 -2
  101. package/dist/chunk-L3YSDLNB.js +2 -0
  102. package/dist/{chunk-EZNMUY67.js → chunk-LAGDJXFY.js} +2 -2
  103. package/dist/{chunk-ENCCHKM6.js → chunk-LY2NB5XR.js} +4 -4
  104. package/dist/chunk-M4EVGA5S.js +14 -0
  105. package/dist/chunk-M7LAIM77.js +127 -0
  106. package/dist/{chunk-BVAJLC5A.js → chunk-MRGTCMDK.js} +2 -2
  107. package/dist/{chunk-OZYRSMSH.js → chunk-MT5W4DUG.js} +2 -2
  108. package/dist/{chunk-VE5AVNMP.js → chunk-MTMF4N7F.js} +2 -2
  109. package/dist/chunk-N3Q3AWGW.js +545 -0
  110. package/dist/{chunk-TXXOEMZJ.js → chunk-NDGTJHQN.js} +2 -2
  111. package/dist/chunk-NIO346UL.js +2 -0
  112. package/dist/chunk-NJA4MMBD.js +2 -0
  113. package/dist/{chunk-7FND7D7N.js → chunk-NK76RSB6.js} +2 -2
  114. package/dist/{chunk-H3LGFZVK.js → chunk-NTRW52UR.js} +2 -2
  115. package/dist/{chunk-JOIRNPPY.js → chunk-OJFLPVBP.js} +2 -2
  116. package/dist/{chunk-KMITESMT.js → chunk-OMBRP7BB.js} +2 -2
  117. package/dist/{chunk-UP3BUZR5.js → chunk-OVKZM2XI.js} +2 -2
  118. package/dist/{chunk-MVB3DAEY.js → chunk-PARCKE3Q.js} +2 -2
  119. package/dist/{chunk-CAUCPUOF.js → chunk-PFPHS4NO.js} +2 -2
  120. package/dist/chunk-PHPQ24UG.js +22 -0
  121. package/dist/chunk-PLZXWZHY.js +77 -0
  122. package/dist/{chunk-34WBMAYK.js → chunk-PNVZIJ57.js} +2 -2
  123. package/dist/{chunk-SYDJMPES.js → chunk-QKVTWODE.js} +2 -2
  124. package/dist/{chunk-FW53T7EB.js → chunk-QLTFXVUI.js} +2 -2
  125. package/dist/{chunk-PBI2LFKH.js → chunk-QMGWSEPL.js} +2 -2
  126. package/dist/{chunk-CQP3THUZ.js → chunk-QVHZB75Z.js} +2 -2
  127. package/dist/{chunk-6BQ3DSPK.js → chunk-QVWDQTMG.js} +2 -2
  128. package/dist/{chunk-ST7V3SKN.js → chunk-RCPZOPV6.js} +2 -2
  129. package/dist/chunk-RJWAB4VR.js +345 -0
  130. package/dist/chunk-RRPK327J.js +20 -0
  131. package/dist/chunk-RVYLJDXC.js +21 -0
  132. package/dist/chunk-RWKEXCHU.js +3 -0
  133. package/dist/{chunk-L4NRUAGJ.js → chunk-S5SKXCND.js} +2 -2
  134. package/dist/{chunk-RBAS5ZHI.js → chunk-S64NCE2Z.js} +2 -2
  135. package/dist/{chunk-WMPRTGH2.js → chunk-SF34QLK2.js} +2 -2
  136. package/dist/{chunk-ANFVSJWQ.js → chunk-SJZQ2PTZ.js} +2 -2
  137. package/dist/{chunk-4XTAUQFD.js → chunk-SRY26ITJ.js} +2 -2
  138. package/dist/chunk-SV2LEFVM.js +2 -0
  139. package/dist/{chunk-7XAN6GKB.js → chunk-T3YFIJ5P.js} +2 -2
  140. package/dist/chunk-T55YPJGB.js +3 -0
  141. package/dist/chunk-TAJ6UGCO.js +21 -0
  142. package/dist/{chunk-PIOMTC27.js → chunk-TUTSO7UZ.js} +2 -2
  143. package/dist/{chunk-FQKZWM4L.js → chunk-U24M5RQM.js} +5 -5
  144. package/dist/{chunk-XME3HPXZ.js → chunk-U2XX3BT4.js} +2 -2
  145. package/dist/{chunk-SZD2KF7Q.js → chunk-UWB5WMC2.js} +2 -2
  146. package/dist/{chunk-6CS3UQTN.js → chunk-VCL7FK3E.js} +2 -2
  147. package/dist/{chunk-N3IQCBCF.js → chunk-VCWAJPXQ.js} +2 -2
  148. package/dist/{chunk-LZYFLFEH.js → chunk-VG55NFXF.js} +2 -2
  149. package/dist/{chunk-PTAWHLVJ.js → chunk-VLTUX4IF.js} +2 -2
  150. package/dist/{chunk-JEJLSICM.js → chunk-VVCBMH5O.js} +2 -2
  151. package/dist/{chunk-JSOYNVWH.js → chunk-VYZQZ4ZN.js} +2 -2
  152. package/dist/chunk-W3FK73MD.js +8 -0
  153. package/dist/{chunk-UNBY47BC.js → chunk-W6C6QTXJ.js} +2 -2
  154. package/dist/chunk-WH5SYOMD.js +2 -0
  155. package/dist/chunk-WJOQC4P7.js +7 -0
  156. package/dist/chunk-WO47BIPY.js +3 -0
  157. package/dist/chunk-WOOTEWQT.js +239 -0
  158. package/dist/{chunk-UBGWN7I4.js → chunk-X5I2BQGX.js} +2 -2
  159. package/dist/{chunk-PX4RYAAK.js → chunk-XNUWRTYM.js} +2 -2
  160. package/dist/{chunk-ICFDQHAM.js → chunk-XUJM6474.js} +2 -2
  161. package/dist/chunk-XYLV727H.js +21 -0
  162. package/dist/{chunk-TRRC4ZJ7.js → chunk-YFQPWKHR.js} +2 -2
  163. package/dist/{chunk-NEDP5RFQ.js → chunk-YIOQJ45A.js} +2 -2
  164. package/dist/{chunk-Y6KHROC3.js → chunk-YXJ4IAHH.js} +2 -2
  165. package/dist/chunk-YYFV32WR.js +3 -0
  166. package/dist/{chunk-BH5F2Q4O.js → chunk-ZB3V5QM7.js} +2 -2
  167. package/dist/chunk-ZJZQ7Q2Q.js +3 -0
  168. package/dist/{chunk-EMNIHCRB.js → chunk-ZNQCR656.js} +2 -2
  169. package/dist/{chunk-TIIC3ZE7.js → chunk-ZOEDRCR4.js} +2 -2
  170. package/dist/cli-context-TSADTXLB.js +2 -0
  171. package/dist/cli-context-XEPPF4RX.js +3 -0
  172. package/dist/cli-program-KJGQEM72.js +7 -0
  173. package/dist/cli.js +1 -1
  174. package/dist/{code-DlqpBDd0.d.ts → code-CDe-mIjx.d.ts} +1 -1
  175. package/dist/code-viewer-YGDON6SY.js +12 -0
  176. package/dist/code-viewer-ZCTHXQ5C.js +11 -0
  177. package/dist/command-descriptors-5VAB2MZX.js +335 -0
  178. package/dist/command-descriptors-EAHKIRAG.js +337 -0
  179. package/dist/{config-types-BNoC96J3.d.ts → config-types-D6X5S68_.d.ts} +50 -0
  180. package/dist/{db-D7sauVFH.d.ts → db-DmRNdCtm.d.ts} +1 -1
  181. package/dist/direct-navigation-B3SGOOBW.js +2 -0
  182. package/dist/direct-navigation-ZL362KXF.js +3 -0
  183. package/dist/{graph-evidence-BIFqyisO.d.ts → graph-evidence-Bs54NWws.d.ts} +1 -1
  184. package/dist/{health-DJaZXg8I.d.ts → health-BnzbSLCE.d.ts} +1 -1
  185. package/dist/index.d.ts +2 -2
  186. package/dist/index.js +1 -1
  187. package/dist/invocation-command-descriptors-CSUGUHTT.js +2 -0
  188. package/dist/invocation-command-descriptors-PPVZOIE5.js +3 -0
  189. package/dist/output-continuation-command-FTVVBVSN.js +2 -0
  190. package/dist/output-continuation-command-ITPRC3YV.js +3 -0
  191. package/dist/project-reindex-7HZSLLLY.js +3 -0
  192. package/dist/project-reindex-NGM3DYBN.js +2 -0
  193. package/dist/queries/affected.d.ts +2 -2
  194. package/dist/queries/affected.js +1 -1
  195. package/dist/queries/anchors.d.ts +2 -2
  196. package/dist/queries/anchors.js +1 -1
  197. package/dist/queries/architecture.d.ts +2 -2
  198. package/dist/queries/architecture.js +1 -1
  199. package/dist/queries/bottlenecks.d.ts +2 -2
  200. package/dist/queries/bottlenecks.js +1 -1
  201. package/dist/queries/by-kind.d.ts +2 -2
  202. package/dist/queries/by-kind.js +1 -1
  203. package/dist/queries/call-graph.d.ts +2 -2
  204. package/dist/queries/call-graph.js +1 -1
  205. package/dist/queries/change-surface.d.ts +2 -2
  206. package/dist/queries/change-surface.js +1 -1
  207. package/dist/queries/cleanup-plan.d.ts +2 -2
  208. package/dist/queries/cleanup-plan.js +1 -1
  209. package/dist/queries/co-change.d.ts +2 -2
  210. package/dist/queries/co-change.js +1 -1
  211. package/dist/queries/code.d.ts +3 -3
  212. package/dist/queries/code.js +1 -1
  213. package/dist/queries/complexity-hotspots.d.ts +2 -2
  214. package/dist/queries/complexity-hotspots.js +1 -1
  215. package/dist/queries/complexity.d.ts +2 -2
  216. package/dist/queries/complexity.js +1 -1
  217. package/dist/queries/context.d.ts +2 -2
  218. package/dist/queries/context.js +1 -1
  219. package/dist/queries/convergence.d.ts +2 -2
  220. package/dist/queries/convergence.js +1 -1
  221. package/dist/queries/coupling.d.ts +2 -2
  222. package/dist/queries/coupling.js +1 -1
  223. package/dist/queries/cycles.d.ts +2 -2
  224. package/dist/queries/cycles.js +1 -1
  225. package/dist/queries/dataflow.d.ts +2 -2
  226. package/dist/queries/dataflow.js +1 -1
  227. package/dist/queries/dead.d.ts +2 -2
  228. package/dist/queries/dead.js +1 -1
  229. package/dist/queries/decorative-checkers.d.ts +2 -2
  230. package/dist/queries/decorative-checkers.js +1 -1
  231. package/dist/queries/deep-chains.d.ts +2 -2
  232. package/dist/queries/deep-chains.js +1 -1
  233. package/dist/queries/dependence-slice.d.ts +3 -3
  234. package/dist/queries/dependence-slice.js +1 -1
  235. package/dist/queries/dependency-depth.d.ts +2 -2
  236. package/dist/queries/dependency-depth.js +1 -1
  237. package/dist/queries/deps.d.ts +2 -2
  238. package/dist/queries/deps.js +1 -1
  239. package/dist/queries/diff-impact.d.ts +2 -2
  240. package/dist/queries/diff-impact.js +1 -1
  241. package/dist/queries/doc-drift.d.ts +2 -2
  242. package/dist/queries/doc-drift.js +1 -1
  243. package/dist/queries/drift.d.ts +2 -2
  244. package/dist/queries/drift.js +1 -1
  245. package/dist/queries/duplicate-bodies.d.ts +2 -2
  246. package/dist/queries/duplicate-bodies.js +1 -1
  247. package/dist/queries/entry-map.d.ts +2 -2
  248. package/dist/queries/entry-map.js +1 -1
  249. package/dist/queries/evidence.d.ts +3 -3
  250. package/dist/queries/evidence.js +1 -1
  251. package/dist/queries/extract-candidates.d.ts +2 -2
  252. package/dist/queries/extract-candidates.js +1 -1
  253. package/dist/queries/fan.d.ts +2 -2
  254. package/dist/queries/fan.js +1 -1
  255. package/dist/queries/files.d.ts +2 -2
  256. package/dist/queries/files.js +1 -1
  257. package/dist/queries/health.d.ts +3 -3
  258. package/dist/queries/health.js +1 -1
  259. package/dist/queries/hierarchy.d.ts +2 -2
  260. package/dist/queries/hierarchy.js +1 -1
  261. package/dist/queries/hotspots.d.ts +2 -2
  262. package/dist/queries/hotspots.js +1 -1
  263. package/dist/queries/imports.d.ts +2 -2
  264. package/dist/queries/imports.js +1 -1
  265. package/dist/queries/incomplete-migration.d.ts +2 -2
  266. package/dist/queries/incomplete-migration.js +1 -1
  267. package/dist/queries/index.d.ts +5 -5
  268. package/dist/queries/index.js +1 -1
  269. package/dist/queries/isolated.d.ts +2 -2
  270. package/dist/queries/isolated.js +1 -1
  271. package/dist/queries/locality-candidates.d.ts +2 -2
  272. package/dist/queries/locality-candidates.js +1 -1
  273. package/dist/queries/members.d.ts +2 -2
  274. package/dist/queries/members.js +1 -1
  275. package/dist/queries/methods.d.ts +2 -2
  276. package/dist/queries/methods.js +1 -1
  277. package/dist/queries/not-implemented.d.ts +2 -2
  278. package/dist/queries/not-implemented.js +1 -1
  279. package/dist/queries/outline.d.ts +2 -2
  280. package/dist/queries/outline.js +1 -1
  281. package/dist/queries/passthrough-candidates.d.ts +2 -2
  282. package/dist/queries/passthrough-candidates.js +1 -1
  283. package/dist/queries/plan-context.d.ts +2 -2
  284. package/dist/queries/plan-context.js +1 -1
  285. package/dist/queries/react-component-duplicates.d.ts +2 -2
  286. package/dist/queries/react-component-duplicates.js +1 -1
  287. package/dist/queries/react-hook-candidates.d.ts +2 -2
  288. package/dist/queries/react-hook-candidates.js +1 -1
  289. package/dist/queries/react-large-component-pressure.d.ts +2 -2
  290. package/dist/queries/react-large-component-pressure.js +1 -1
  291. package/dist/queries/recent-duplicates.d.ts +2 -2
  292. package/dist/queries/recent-duplicates.js +1 -1
  293. package/dist/queries/redundant-reexports.d.ts +2 -2
  294. package/dist/queries/redundant-reexports.js +1 -1
  295. package/dist/queries/reference-neighborhood.d.ts +2 -2
  296. package/dist/queries/reference-neighborhood.js +1 -1
  297. package/dist/queries/reference-reachability.d.ts +2 -2
  298. package/dist/queries/reference-reachability.js +1 -1
  299. package/dist/queries/refs.d.ts +2 -2
  300. package/dist/queries/refs.js +1 -1
  301. package/dist/queries/self-audit.d.ts +2 -2
  302. package/dist/queries/self-audit.js +1 -1
  303. package/dist/queries/similar-chains.d.ts +2 -2
  304. package/dist/queries/similar-chains.js +1 -1
  305. package/dist/queries/similar-files.d.ts +2 -2
  306. package/dist/queries/similar-files.js +1 -1
  307. package/dist/queries/similar-signatures.d.ts +2 -2
  308. package/dist/queries/similar-signatures.js +1 -1
  309. package/dist/queries/similar.d.ts +2 -2
  310. package/dist/queries/similar.js +1 -1
  311. package/dist/queries/slice.d.ts +2 -2
  312. package/dist/queries/slice.js +1 -1
  313. package/dist/queries/source-inspection.d.ts +4 -4
  314. package/dist/queries/source-inspection.js +1 -1
  315. package/dist/queries/source-search.d.ts +2 -2
  316. package/dist/queries/source-search.js +1 -1
  317. package/dist/queries/stale-abstractions.d.ts +2 -2
  318. package/dist/queries/stale-abstractions.js +1 -1
  319. package/dist/queries/stats.d.ts +2 -2
  320. package/dist/queries/surface.d.ts +2 -2
  321. package/dist/queries/surface.js +1 -1
  322. package/dist/queries/symbols.d.ts +2 -2
  323. package/dist/queries/symbols.js +1 -1
  324. package/dist/queries/system-map.d.ts +2 -2
  325. package/dist/queries/system-map.js +1 -1
  326. package/dist/queries/system.d.ts +2 -2
  327. package/dist/queries/system.js +1 -1
  328. package/dist/queries/test-quality.d.ts +2 -2
  329. package/dist/queries/test-quality.js +1 -1
  330. package/dist/queries/trace.d.ts +2 -2
  331. package/dist/queries/trace.js +1 -1
  332. package/dist/queries/twin-ab.d.ts +2 -2
  333. package/dist/queries/twin-ab.js +1 -1
  334. package/dist/queries/twin-drift.d.ts +2 -2
  335. package/dist/queries/twin-drift.js +1 -1
  336. package/dist/queries/unused-imports.d.ts +2 -2
  337. package/dist/queries/unused-imports.js +1 -1
  338. package/dist/queries/unused-params.d.ts +2 -2
  339. package/dist/queries/unused-params.js +1 -1
  340. package/dist/queries/value-flow.d.ts +3 -3
  341. package/dist/queries/value-flow.js +1 -1
  342. package/dist/queries/vue-component-duplicates.d.ts +2 -2
  343. package/dist/queries/vue-component-duplicates.js +1 -1
  344. package/dist/queries/vue-composable-candidates.d.ts +2 -2
  345. package/dist/queries/vue-composable-candidates.js +1 -1
  346. package/dist/queries/vue-large-view-pressure.d.ts +2 -2
  347. package/dist/queries/vue-large-view-pressure.js +1 -1
  348. package/dist/queries/wrapper-candidates.d.ts +2 -2
  349. package/dist/queries/wrapper-candidates.js +1 -1
  350. package/dist/reindex-worker.js +1 -1
  351. package/dist/reindex.d.ts +3 -3
  352. package/dist/reindex.js +31 -31
  353. package/dist/runtime.d.ts +24 -4
  354. package/dist/runtime.js +3 -3
  355. package/dist/rust-semantic-session-server.js +1 -1
  356. package/dist/rust-semantic-session-worker.js +1 -1
  357. package/dist/rust-semantic-worker.js +1 -1
  358. package/dist/{scip-cli-B7N3haxa.d.ts → scip-cli-BRFKkHQn.d.ts} +1 -1
  359. package/dist/sentinel-ensure-command-KYYULCFU.js +2 -0
  360. package/dist/sentinel-ensure-command-RIZA3RY7.js +3 -0
  361. package/dist/sentinel-hook.js +39 -0
  362. package/dist/sentinel-worker.js +16 -0
  363. package/dist/typescript-mailbox-worker.js +1 -1
  364. package/dist/watch-server.js +6 -6
  365. package/docs/COMMAND_REFERENCE.md +5 -3
  366. package/docs/schemas/project-config.schema.json +159 -0
  367. package/package.json +9 -5
  368. package/skills/codebaseiq/SKILL.md +1 -1
  369. package/skills/concrete-plan/SKILL.md +1 -1
  370. package/ui/view/api.js +450 -0
  371. package/ui/view/app.js +394 -0
  372. package/ui/view/builder.js +323 -0
  373. package/ui/view/file-panel.js +170 -0
  374. package/ui/view/focus.js +379 -0
  375. package/ui/view/index.html +54 -0
  376. package/ui/view/map.js +424 -0
  377. package/ui/view/styles.css +1125 -0
  378. package/dist/chunk-2X7V4HS4.js +0 -88
  379. package/dist/chunk-3IER7Q6H.js +0 -12
  380. package/dist/chunk-3JSXXYTZ.js +0 -345
  381. package/dist/chunk-476NR5B7.js +0 -2
  382. package/dist/chunk-5VKBFZZU.js +0 -3
  383. package/dist/chunk-ADTBPVUZ.js +0 -21
  384. package/dist/chunk-BFFZDZQV.js +0 -2
  385. package/dist/chunk-BMYOV5GP.js +0 -77
  386. package/dist/chunk-C74PPYLA.js +0 -3
  387. package/dist/chunk-CWONGW6P.js +0 -3
  388. package/dist/chunk-DDZ7VHWV.js +0 -20
  389. package/dist/chunk-DR2LURYU.js +0 -3
  390. package/dist/chunk-ECQBG7PW.js +0 -564
  391. package/dist/chunk-FM5BPL4V.js +0 -60
  392. package/dist/chunk-G6XFR4ZL.js +0 -4
  393. package/dist/chunk-GTIYTDRE.js +0 -562
  394. package/dist/chunk-HOA5YGOH.js +0 -3
  395. package/dist/chunk-KUW32IRO.js +0 -2
  396. package/dist/chunk-LTA3BRZX.js +0 -2
  397. package/dist/chunk-NAUD7LCA.js +0 -2
  398. package/dist/chunk-OGTFJ3XD.js +0 -2
  399. package/dist/chunk-Q5ELPRKQ.js +0 -2
  400. package/dist/chunk-QCN62RTF.js +0 -3
  401. package/dist/chunk-QW7EP6WI.js +0 -21
  402. package/dist/chunk-RU65DDUP.js +0 -215
  403. package/dist/chunk-SELM5MER.js +0 -2
  404. package/dist/chunk-SNNWPCN7.js +0 -4
  405. package/dist/chunk-TFZB6XTM.js +0 -239
  406. package/dist/chunk-UXM43C7T.js +0 -3
  407. package/dist/chunk-VFY6Y2H6.js +0 -61
  408. package/dist/chunk-WE5RZHZ7.js +0 -5
  409. package/dist/chunk-Z54RD7VL.js +0 -3
  410. package/dist/cli-context-3SNLDYBM.js +0 -3
  411. package/dist/cli-context-T3B7W6GG.js +0 -2
  412. package/dist/cli-program-YNOXO72B.js +0 -7
  413. package/dist/command-descriptors-6AOUKWW7.js +0 -346
  414. package/dist/command-descriptors-ZFKJSRUP.js +0 -344
  415. package/dist/direct-navigation-DP4LVMRX.js +0 -3
  416. package/dist/direct-navigation-FLUS3BT6.js +0 -2
  417. package/dist/invocation-command-descriptors-QT2JMY5J.js +0 -3
  418. package/dist/invocation-command-descriptors-YN4QJEAX.js +0 -2
  419. package/dist/output-continuation-command-2V2SL4TD.js +0 -2
  420. package/dist/output-continuation-command-65J5IP3O.js +0 -3
  421. package/dist/project-reindex-5JOKXAXT.js +0 -2
  422. package/dist/project-reindex-UQBIKO4M.js +0 -3
@@ -1,2 +1,2 @@
1
- import{d as x}from"./chunk-WOQBZPIF.js";import{f,g as p}from"./chunk-T3DGWPXM.js";import{a as L}from"./chunk-OVTS4DKB.js";import{b as D}from"./chunk-B75HZHUP.js";import{c as E}from"./chunk-7FND7D7N.js";import{a as C}from"./chunk-BGBBVSH4.js";import{a as v}from"./chunk-JOIRNPPY.js";import{b as y}from"./chunk-J77SU6VA.js";import{b}from"./chunk-UZGZB3VB.js";import{d as m,t as g}from"./chunk-FETNQCFO.js";import{c as u,f as h}from"./chunk-O6QTXQPJ.js";var A=/^(?:validate|verify|check|assert)(?:[A-Z].*)?$/,N=/^(?:is|has)(?:[A-Z].*)?$/,I=/[{,]\s*(?:ok|success|valid|isValid)\s*:\s*false\b/,d=/\breturn\b/g,k=/\bfunction\b|=>|\)\s*(?::\s*[^{;=]+)?\s*\{/,w=/\.(?:addIssue|push)\s*\(/;function M(e,n={}){let{scope:t,limit:o=30,scanLimit:i}=n,c=new E(e),r=D(c.productionCallableDefinitions({scope:t,minLoc:1,requireFunctionLikeSymbol:!0,excludeTypesFiles:!0}),i),s=[];for(let l of r){let a=P(e,l);a&&s.push({symbol:l.symbol,shortName:m(l.symbol),file:l.relativePath,startLine:l.startLine,endLine:l.endLine,loc:C(l),...a})}return s.sort((l,a)=>l.file.localeCompare(a.file)||l.startLine-a.startLine||l.loc-a.loc),o?s.slice(0,o):s}function _(e){return A.test(e)?"imperative":N.test(e)?"predicate":null}function P(e,n){let t=_(n.leaf);if(!t||L(e,n))return null;let o=f(e,n);if(!o||!k.test(o))return null;let i=h(e,n.relativePath)?.callables.find(r=>r.startLine===n.startLine&&r.endLine===n.endLine);if(t==="predicate"&&i?.paramCount===0)return null;if(x(o)){let r=O(e,n);return!r||S(r.body,T(r.snippet))||R(r.body)?null:{nameKind:t,resolvedVia:"one-hop-delegate",delegateTarget:r.shortName}}let c=p(o);return S(c,T(o))||R(c)?null:{nameKind:t,resolvedVia:"direct"}}var F=new Set(["if","for","while","switch","catch","function"]);function R(e){let n=u(e);for(let t of n.matchAll(/\b([A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*)\s*\(/g))if(!F.has(t[1]))return!0;return!1}function T(e){let n=e.indexOf("=>");return n===-1?!1:!/^\s*\{/.test(e.slice(n+2))}function S(e,n){let t=u(e);if(/\bthrow\b/.test(t)||/\.reject\s*\(/.test(t)||I.test(t)||w.test(t))return!0;let o=K(t);if(n&&o.length===0){let i=t.trim();return i!==""&&i!=="true"}for(let i of o)if(i!==""&&i!=="true")return!0;return!1}function K(e){let n=[];d.lastIndex=0;let t;for(;t=d.exec(e);){let o=t.index+t[0].length,i=0,c=e.length;for(let r=o;r<e.length;r+=1){let s=e[r];if(s==="("||s==="["||s==="{")i+=1;else if(s===")"||s==="]"||s==="}"){if(i===0){c=r;break}i-=1}else if(s===";"&&i===0){c=r;break}}n.push(e.slice(o,c).trim()),d.lastIndex=c}return n}function O(e,n){let t=y(e,n,{callableOnly:!0,limit:3,semanticEvidence:v});if(t.semanticIncomplete||t.semanticUnavailable)return null;let o=t.rows,i=[...new Set(o.map(a=>a.symbol))].filter(a=>a!==n.symbol);if(i.length!==1)return null;let r=b(e,i[0]).match;if(!r)return null;let s=g(e,r.relativePath).find(a=>a.symbolId===r.symbolId);if(!s)return null;let l=f(e,s);return l?{body:p(l),snippet:l,shortName:m(s.symbol)}:null}export{M as a};
2
- //# sourceMappingURL=chunk-TXXOEMZJ.js.map
1
+ import{d as x}from"./chunk-5BDK6QC3.js";import{f,g as p}from"./chunk-CSZOQ7YO.js";import{a as L}from"./chunk-4AOOSCZ7.js";import{b as D}from"./chunk-B75HZHUP.js";import{c as E}from"./chunk-NK76RSB6.js";import{a as C}from"./chunk-BGBBVSH4.js";import{a as v}from"./chunk-OJFLPVBP.js";import{b as y}from"./chunk-57KEZDPT.js";import{b}from"./chunk-3XFJUWJE.js";import{d as m,t as g}from"./chunk-AM5SUGHF.js";import{c as u,f as h}from"./chunk-JOALNFY3.js";var A=/^(?:validate|verify|check|assert)(?:[A-Z].*)?$/,N=/^(?:is|has)(?:[A-Z].*)?$/,I=/[{,]\s*(?:ok|success|valid|isValid)\s*:\s*false\b/,d=/\breturn\b/g,k=/\bfunction\b|=>|\)\s*(?::\s*[^{;=]+)?\s*\{/,w=/\.(?:addIssue|push)\s*\(/;function M(e,n={}){let{scope:t,limit:o=30,scanLimit:i}=n,c=new E(e),r=D(c.productionCallableDefinitions({scope:t,minLoc:1,requireFunctionLikeSymbol:!0,excludeTypesFiles:!0}),i),s=[];for(let l of r){let a=P(e,l);a&&s.push({symbol:l.symbol,shortName:m(l.symbol),file:l.relativePath,startLine:l.startLine,endLine:l.endLine,loc:C(l),...a})}return s.sort((l,a)=>l.file.localeCompare(a.file)||l.startLine-a.startLine||l.loc-a.loc),o?s.slice(0,o):s}function _(e){return A.test(e)?"imperative":N.test(e)?"predicate":null}function P(e,n){let t=_(n.leaf);if(!t||L(e,n))return null;let o=f(e,n);if(!o||!k.test(o))return null;let i=h(e,n.relativePath)?.callables.find(r=>r.startLine===n.startLine&&r.endLine===n.endLine);if(t==="predicate"&&i?.paramCount===0)return null;if(x(o)){let r=O(e,n);return!r||S(r.body,T(r.snippet))||R(r.body)?null:{nameKind:t,resolvedVia:"one-hop-delegate",delegateTarget:r.shortName}}let c=p(o);return S(c,T(o))||R(c)?null:{nameKind:t,resolvedVia:"direct"}}var F=new Set(["if","for","while","switch","catch","function"]);function R(e){let n=u(e);for(let t of n.matchAll(/\b([A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*)\s*\(/g))if(!F.has(t[1]))return!0;return!1}function T(e){let n=e.indexOf("=>");return n===-1?!1:!/^\s*\{/.test(e.slice(n+2))}function S(e,n){let t=u(e);if(/\bthrow\b/.test(t)||/\.reject\s*\(/.test(t)||I.test(t)||w.test(t))return!0;let o=K(t);if(n&&o.length===0){let i=t.trim();return i!==""&&i!=="true"}for(let i of o)if(i!==""&&i!=="true")return!0;return!1}function K(e){let n=[];d.lastIndex=0;let t;for(;t=d.exec(e);){let o=t.index+t[0].length,i=0,c=e.length;for(let r=o;r<e.length;r+=1){let s=e[r];if(s==="("||s==="["||s==="{")i+=1;else if(s===")"||s==="]"||s==="}"){if(i===0){c=r;break}i-=1}else if(s===";"&&i===0){c=r;break}}n.push(e.slice(o,c).trim()),d.lastIndex=c}return n}function O(e,n){let t=y(e,n,{callableOnly:!0,limit:3,semanticEvidence:v});if(t.semanticIncomplete||t.semanticUnavailable)return null;let o=t.rows,i=[...new Set(o.map(a=>a.symbol))].filter(a=>a!==n.symbol);if(i.length!==1)return null;let r=b(e,i[0]).match;if(!r)return null;let s=g(e,r.relativePath).find(a=>a.symbolId===r.symbolId);if(!s)return null;let l=f(e,s);return l?{body:p(l),snippet:l,shortName:m(s.symbol)}:null}export{M as a};
2
+ //# sourceMappingURL=chunk-NDGTJHQN.js.map
@@ -0,0 +1,2 @@
1
+ import{k as x}from"./chunk-VCL7FK3E.js";import{a as y,e as b}from"./chunk-AM5SUGHF.js";import{z as v}from"./chunk-RVYLJDXC.js";import{g,l as D,m as F,t as E,v as I}from"./chunk-PLZXWZHY.js";import{a as _,d as p}from"./chunk-3LCDIREB.js";import{spawnSync as P}from"child_process";import{createHash as U}from"crypto";import{existsSync as k}from"fs";import{dirname as L,join as T}from"path";import{fileURLToPath as j}from"url";var R=g("definition-consumer-file-usage",{clearGroups:["whole-project","source-file"]}),M=E({kind:"consumer-file-usage",invalidation:I("consumer-file-usage"),serialize:Q,deserialize:W});function Le(e,n){return{forDefinitions(r,i){return B(e,n,r,i)}}}function Me(e){let n=new Map;for(let[r,i]of e)n.set(r,new Set(i.files.map(t=>t.file)));return n}function Ne(e,n,r){return w(e,n,r).partition}function B(e,n,r,i){let t=h(r.length),s=_()?F(e):null,a=s?V(r,i,s):void 0,o=a?{workIdentity:a,workOutcome:"computed"}:{};return p("consumer-evidence.product",()=>{let l=p("consumer-evidence.provenance",()=>z(e,n,r,i),()=>({...o,definitions:r.length,semantic:i.semantic,sourceFallback:i.sourceFallback!==!1})),u=new Map;t={...t,...l.counters};let c=q(r,l.sources);return p("consumer-evidence.classify",()=>{let f=Y(e,r,l.sources,c);for(let d of r){let m=f.get(d.symbolId)??$();t.realFiles+=m.partition.realConsumers.length,t.reexportOnlyFiles+=m.partition.barrelConsumers,t.importOnlyFiles+=m.partition.importOnlyConsumers,u.set(d.symbolId,{definition:d,files:m.files,semanticIncomplete:l.incompleteSymbolIds.has(d.symbolId),semanticUnavailable:l.unavailableSymbolIds.has(d.symbolId),...m.partition})}},()=>({...o,...c,realFiles:t.realFiles,reexportOnlyFiles:t.reexportOnlyFiles,importOnlyFiles:t.importOnlyFiles})),u},()=>({...o,...t}))}function V(e,n,r){let i=U("sha256").update("consumer-evidence-v3-calibrated-semantic\0").update(r).update("\0").update(n.semantic?"semantic\0":"indexed\0").update(n.sourceFallback===!1?"no-source-fallback":"source-fallback");for(let t of e.map(s=>s.symbol).sort())i.update("\0").update(t);return i.digest("hex").slice(0,24)}function h(e){return{definitions:e,indexedFiles:0,semanticFiles:0,fallbackFiles:0,totalFiles:0,realFiles:0,reexportOnlyFiles:0,importOnlyFiles:0}}function z(e,n,r,i){let t=h(r.length),s=new Map,a=new Set,o=new Set;if(S(s,t,"indexed",n.crossFileCallerMap(r,{semantic:!1})),i.semantic){let l=x(e,r);S(s,t,"semantic",l.callers);for(let u of l.incompleteSymbolIds)a.add(u);for(let u of l.unavailableSymbolIds)o.add(u)}return i.sourceFallback!==!1&&S(s,t,"source-fallback",n.sourceFallbackCallerFiles(r)),t.totalFiles=[...s.values()].reduce((l,u)=>l+u.size,0),{sources:s,counters:t,incompleteSymbolIds:a,unavailableSymbolIds:o}}function q(e,n){return{definitions:e.length,consumerFiles:[...n.values()].reduce((r,i)=>r+i.size,0),nativeAttempted:!1,nativeUsed:!1,nativeReason:"not-attempted"}}function S(e,n,r,i){let t=0;for(let[s,a]of i){let o=e.get(s);o||(o=new Map,e.set(s,o));for(let l of a){t++;let u=o.get(l)??new Set;u.add(r),o.set(l,u)}}r==="indexed"?n.indexedFiles+=t:r==="semantic"?n.semanticFiles+=t:n.fallbackFiles+=t}function Y(e,n,r,i){let t=re(e,n,r,i);return t||H(e,n,r)}function H(e,n,r){let i=new Map;for(let t of n){let s=r.get(t.symbolId)??new Map;i.set(t.symbolId,w(e,t,[...s.keys()],s))}return i}function w(e,n,r,i=new Map){let t=[],s=0,a=0,o=b(n.symbol),l=[];for(let u of r){let c;X(e,u,n.relativePath,o)?(s++,c="reexport-only"):J(e,u,o)?(a++,c="import-only"):(t.push(u),c="real"),l.push({file:u,sources:[...i.get(u)??[]],classification:c})}return{partition:{realConsumers:t,barrelConsumers:s,importOnlyConsumers:a},files:l}}function $(){return{partition:{realConsumers:[],barrelConsumers:0,importOnlyConsumers:0},files:[]}}function J(e,n,r){if(!r)return!1;let i=v(n);if(!i)return!1;let t=R.get(e,n,()=>A(e,n,i));return t.importedLeaves.has(r)&&!t.usedLeaves.has(r)}function A(e,n,r){let i=y(e).forFile(n,{text:!0,ast:!0}),t=i.text;if(!t)return G();let s=D(e,n,t),a=M.read(e,n,s);if(a)return a;let o=K(i.ast,r);return M.write(e,n,s,o),o}function K(e,n){let r=new Set,i=new Set;if(!e)return{importedLeaves:r,usedLeaves:i};let t=n==="rust"?new Set(["use_declaration"]):n==="python"?new Set(["import_statement","import_from_statement"]):new Set(["import_statement"]),s=(a,o)=>{let l=o||t.has(a.type);(a.type==="identifier"||a.type==="type_identifier"||a.type==="property_identifier"||a.type==="field_identifier")&&(l?r.add(a.text):i.add(a.text));for(let u of a.children)s(u,l)};return s(e.rootNode,!1),{importedLeaves:r,usedLeaves:i}}function G(){return{importedLeaves:new Set,usedLeaves:new Set}}function Q(e){return JSON.stringify({importedLeaves:[...e.importedLeaves],usedLeaves:[...e.usedLeaves]})}function W(e){try{let n=JSON.parse(e);return!Array.isArray(n.importedLeaves)||!Array.isArray(n.usedLeaves)?null:{importedLeaves:new Set(n.importedLeaves.filter(r=>typeof r=="string")),usedLeaves:new Set(n.usedLeaves.filter(r=>typeof r=="string"))}}catch{return null}}function X(e,n,r,i){if(!i)return!1;let t=y(e).forFile(n,{lines:!0,reexports:!0}),s=t.lines??[];if(s.length===0)return!1;let a=t.reexports??[];return O(s,a,i)}function O(e,n,r){if(e.length===0||n.length===0)return!1;let i=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),t=new RegExp(`\\b${i}\\b`),s=0;for(let a=0;a<e.length;a++){if(!t.test(e[a]??""))continue;if(s++,!n.find(l=>l.startLine<=a&&a<=l.endLine))return!1}return s>0}var Z="CODEBASEIQ_NATIVE_CONSUMER_CLASSIFY",ee="CODEBASEIQ_NATIVE_KERNELS_BIN",ne="CODEBASEIQ_NATIVE_CONSUMER_CLASSIFY_MIN_FILES",N=1e3,ie=5e3,te=64*1024*1024,C;function re(e,n,r,i){let t=process.env[Z]?.toLowerCase();if(t!=="1"&&t!=="true")return i.nativeReason=t==="0"||t==="false"?"disabled":"opt-in-required",null;if(i.consumerFiles<fe())return i.nativeReason="below-threshold",null;let s=me();if(!s)return i.nativeReason="binary-missing",null;i.nativeAttempted=!0;let a=se(e,n,r),o=P(s,["consumer-classify"],{input:JSON.stringify(a),encoding:"utf8",timeout:ie,maxBuffer:te,windowsHide:!0});if(o.status!==0||o.error)return i.nativeReason=o.error?`spawn-error:${o.error.message}`:`exit-${o.status??"null"}`,null;try{let l=JSON.parse(o.stdout),u=ae(l,n);return u?(i.nativeUsed=!0,i.nativeReason="used",u):(i.nativeReason="invalid-response",null)}catch{return i.nativeReason="invalid-json",null}}function se(e,n,r){let i=new Map,t=[];for(let o of n){let l=b(o.symbol),c=[...(r.get(o.symbolId)??new Map).entries()].map(([f,d])=>{let m=i.get(f)??new Set;return l&&m.add(l),i.set(f,m),{file:f,sources:[...d]}});t.push({symbol_id:o.symbolId,leaf:l,consumer_files:c})}let s={},a={};for(let[o,l]of i){let u=v(o);if(u){let f=R.get(e,o,()=>A(e,o,u));s[o]={imported_leaves:[...f.importedLeaves],used_leaves:[...f.usedLeaves]}}let c=oe(e,o,l);c.length>0&&(a[o]=c)}return{definitions:t,file_usages:s,reexport_only_leaves:a}}function oe(e,n,r){if(r.size===0)return[];let i=y(e).forFile(n,{lines:!0,reexports:!0}),t=i.lines??[],s=i.reexports??[];return t.length===0||s.length===0?[]:[...r].filter(a=>O(t,s,a))}function ae(e,n){if(!Array.isArray(e.entries)||e.entries.length!==n.length)return null;let r=new Set(n.map(t=>t.symbolId)),i=new Map;for(let t of e.entries){let s=le(t);if(!s||!r.has(s.symbol_id))return null;i.set(s.symbol_id,{partition:{realConsumers:s.real_consumers,barrelConsumers:s.barrel_consumers,importOnlyConsumers:s.import_only_consumers},files:s.files})}for(let t of r)if(!i.has(t))return null;return i}function le(e){if(!e||typeof e!="object")return null;let n=e;if(typeof n.symbol_id!="number"||!Array.isArray(n.real_consumers)||typeof n.barrel_consumers!="number"||typeof n.import_only_consumers!="number"||!Array.isArray(n.files)||!n.real_consumers.every(i=>typeof i=="string"))return null;let r=[];for(let i of n.files){if(!i||typeof i!="object")return null;let t=i;if(typeof t.file!="string"||!Array.isArray(t.sources)||!t.sources.every(ue)||!ce(t.classification))return null;r.push({file:t.file,sources:t.sources,classification:t.classification})}return{symbol_id:n.symbol_id,real_consumers:n.real_consumers,barrel_consumers:n.barrel_consumers,import_only_consumers:n.import_only_consumers,files:r}}function ue(e){return e==="indexed"||e==="semantic"||e==="source-fallback"}function ce(e){return e==="real"||e==="reexport-only"||e==="import-only"}function fe(){let e=process.env[ne];if(!e)return N;let n=Number(e);return Number.isFinite(n)&&n>=0?n:N}function me(){if(C!==void 0)return C;let e=process.env[ee],n=process.platform==="win32"?"codebaseiq-kernels.exe":"codebaseiq-kernels";return C=[...e?[e]:[],...de().map(i=>T(i,"target","release",n))].find(i=>k(i))??null,C}function de(){let e=new Set,n=L(j(import.meta.url));for(let r=0;r<5;r++)e.add(n),n=L(n);return[...e]}export{Le as a,Me as b,Ne as c,J as d};
2
+ //# sourceMappingURL=chunk-NIO346UL.js.map
@@ -0,0 +1,2 @@
1
+ import{b as I}from"./chunk-CDWSLAPN.js";import{bb as v,ib as s,lb as E,mb as V}from"./chunk-BLKYYQ7C.js";import{c as y}from"./chunk-ZZ3MWF33.js";import{fa as h,pa as S,w}from"./chunk-WJOQC4P7.js";import{G as x}from"./chunk-4O52YNKL.js";var ce={defaultRole:"repository-observation"};function pe(e,n=[]){return{defaultRole:e,...n.length>0?{rules:n}:{}}}function k(e,n){for(let t of e.rules??[]){if(t.when.kind==="option-present"){let r=n.options[t.when.name];if(r!==void 0&&r!==!1)return t.role;continue}if((t.when.kind==="argument"?n.args[t.when.index]:n.options[t.when.name])===t.when.equals)return t.role}return e.defaultRole}function fe(e){return[...new Set([e.defaultRole,...(e.rules??[]).map(n=>n.role)])]}function A(e){return e==="repository-observation"||e==="repository-preview"||e==="composite"}import{AsyncLocalStorage as z}from"async_hooks";var U=1,j=1;var F={policyId:"codebaseiq:unresolved-repository-policy",policyVersion:j,permission:"not-established",reasons:["No repository action policy was supplied for this claim."]};function N(e){return{schemaVersion:U,origin:e.contract.origin,coverage:$(e.coverage),producerValidation:e.contract.producerValidation,stateAuthority:w(e.receipt,e.receipt),repositoryPolicy:e.repositoryPolicy??F,...e.contract.families?{families:e.contract.families}:{}}}function $(e){return e?e.complete===!0?{state:"complete",returned:e.returned,totalKnown:!0,total:e.total??e.returned,omitted:0}:e.totalKnown?{state:"partial",returned:e.returned,totalKnown:!0,...e.total===void 0?{}:{total:e.total},...e.omitted===void 0?{}:{omitted:e.omitted}}:{state:"unknown",returned:e.returned,totalKnown:!1}:{state:"unknown",returned:0,totalKnown:!1}}var W="codebaseiq-result";var G=1,Y=1,_=1,L=1;function M(e){let n=e.resultSchemaVersion??Y;if(!X(n))throw new Error("CLI result schema version must be a positive safe integer.");let{producerVersion:t,...o}=e;return{kind:W,schemaVersion:G,producer:{name:"codebaseiq",version:t},resultSchemaVersion:n,...o}}function J(e,n){return JSON.stringify(e,null,n?0:2)}function X(e){return Number.isSafeInteger(e)&&Number(e)>0}var P=Symbol("option-value-source"),T=new Map,D=new Map,B=new Map,H=new z;function Ie(e,n){return H.run(e,n)}function ke(e){T=new Map(e)}function Ae(e){D=new Map(e)}function Ne(e){B=new Map(e)}function m(e){return(...n)=>{let{args:t,opts:o}=le(n);S(r=>{I(r.generation.identity),e({db:r,args:t,opts:o})})}}function R(e,n){return m(t=>{let o=V(t.db,e,d(t.opts,"full"),{quiet:d(t.opts,"json")});n({...t,budget:o})})}function _e(e){return m(n=>c(n,e,{kind:"list"}))}function Le(e){return m(n=>c(n,e,{kind:"table",headers:e.headers,dashWidths:e.dashWidths}))}function Me(e){return m(n=>c(n,e,{kind:"grouped",key:e.key}))}function Z(e){return m(n=>b(n,e))}function Je(e){return Z({commandName:e.commandName,query:e.query,emptyMessage:e.emptyMessage,heuristicLabel:e.heuristicLabel,before:e.before,render:(n,t)=>s.sectionedReport(e.sections(n,t)),toJson:e.toJson,coverage:e.coverage,agentResult:e.agentResult,after:e.after})}function ee(e,n){return R(e,t=>b(t,{...n,commandName:n.commandName??e}))}function Pe(e,n){return ee(e,{commandName:n.commandName??e,query:n.query,emptyMessage:n.emptyMessage,heuristicLabel:n.heuristicLabel,before:n.before,render:(t,o)=>s.sectionedReport(n.sections(t,o)),toJson:n.toJson,coverage:n.coverage,agentResult:n.agentResult,after:n.after})}function Te(e,n){return R(e,t=>c(t,{...n,commandName:e},{kind:"list"}))}function De(e,n){return R(e,t=>c(t,{...n,commandName:e},{kind:"grouped",key:n.key}))}function Be(e,n){return String(e[n])}function He(e,n){let t=e[n];return typeof t=="string"?[t]:Array.isArray(t)&&t.every(o=>typeof o=="string")?t:[]}function Qe(e,n){let t=e[n];return typeof t=="string"?t:void 0}function qe(e,n){let t=e[n];return typeof t=="string"?t:void 0}function Q(e,n){let t=e[n];return typeof t=="number"?t:void 0}function d(e,n){return!!e[n]}function Ke(e,n){let t=e[n];return Array.isArray(t)&&t.every(o=>typeof o=="string")?t:[]}function Ue(e,n,t){return Q(e,n)??t}function je(e,n,t){let o=Q(e,n),r=o!==void 0&&ne(e,n)!=="default";if(d(e,"full")){if(r)throw new Error("--full cannot be combined with --limit. Use --full for all findings, or --limit N for a capped report.");return Number.MAX_SAFE_INTEGER}return o??t}function ne(e,n){return e[P]?.(n)}function c(e,n,t){b(e,{commandName:n.commandName,query:n.query,emptyMessage:(o,r)=>o.length===0&&n.emptyMessage?n.emptyMessage(r):void 0,heuristicLabel:n.heuristicLabel,render:(o,r)=>{t.kind==="list"?s.list(o,i=>n.format(i,r)):t.kind==="table"?s.table(t.headers,o.map(i=>n.format(i,r)),t.dashWidths):s.groupedByFile(o,i=>n.format(i,r),t.key?i=>t.key(i,r):void 0)},toJson:n.toJson,coverage:n.coverage,agentResult:n.agentResult,before:n.before,after:n.after})}function b(e,n){let t=n.query(e);if(d(e.opts,"json")){if(!n.commandName)throw new Error("JSON output requires a command name so its result contract can be identified.");oe(n.commandName,e.args,e.opts,n.toJson?n.toJson(t,e):t,{analysisBudget:te(e),coverage:n.coverage?.(t,e),agentResult:n.agentResult?.(t,e),resultSchemaVersion:n.resultSchemaVersion});return}let o=n.emptyMessage?.(t,e);if(o){s.empty(o);return}n.heuristicLabel&&E(n.heuristicLabel),n.before?.(t,e),n.render(t,e),n.after?.(t,e)}function te(e){return e.budget?.analysisBudget}function oe(e,n,t,o,r={}){let i=T.get(e),a=D.get(e),u=B.get(e),p=a?k(a.operation,{args:n,options:t}):void 0,f=H.getStore();if(f!==void 0&&p!==void 0&&f!==p)throw new Error(`Command ${e} changed operation role during execution: selected ${f}, rendered ${p}.`);let g=f??p,O=de(o),C=r.coverage??ae(a,o,r.analysisBudget),l=C&&O&&!C.resolution?{...C,resolution:O}:C;if(l&&ie(l),d(t,"resultOnly")){let K=Object.hasOwn(r,"resultOnly")?r.resultOnly:o;y(JSON.stringify(K,null,d(t,"compact")?0:2));return}let q=M({producerVersion:x,command:e,...g?{operationRole:g}:{},...i?{evidence:i}:{},...r.analysisBudget?{analysisBudget:r.analysisBudget}:{},args:ue(n),options:t,result:o,...l?{coverage:l}:{},...r.agentResult!==void 0?{agentResult:r.agentResult}:{},...re(g,i,r.analysisBudget,l,u,r.observationReceipt),...r.resultSchemaVersion===void 0?{}:{resultSchemaVersion:r.resultSchemaVersion}});y(J(q,d(t,"compact")))}function re(e,n,t,o,r,i){if(!e||!A(e))return{};let a=h(),u=i??(a?v({projectRoot:a.config.projectRoot,db:a,...r?{observedSourceKinds:r.observedSources}:{}}):void 0);return u?{evidenceContext:{schemaVersion:_,operationRole:e,receipt:u,analysisManifest:{schemaVersion:L,...n?{evidence:n}:{},...t?{analysisBudget:t}:{},...o?{coverage:o}:{},...r?{claimQualification:N({contract:r,receipt:u,...o?{coverage:o}:{}})}:{}}}}:{}}function ie(e){if(!Number.isSafeInteger(e.returned)||e.returned<0)throw new Error("Invocation coverage returned count must be a non-negative safe integer.");if(e.complete!==!0&&e.complete!==!1&&e.complete!==null)throw new Error("Invocation coverage complete must be true, false, or null.");if(e.complete===!0){if(!e.totalKnown)throw new Error("Complete invocation coverage must know its total.");if(!Number.isSafeInteger(e.total)||e.total!==e.returned)throw new Error("Complete invocation coverage total must equal returned.");if(e.omitted!==0)throw new Error("Complete invocation coverage cannot omit results.");if(e.omittedIdentities!==void 0)throw new Error("Complete invocation coverage cannot name omitted identities.");if(e.continuation!==void 0)throw new Error("Complete invocation coverage cannot provide a continuation.")}else if(e.totalKnown){if(e.complete!==!1)throw new Error("Known incomplete invocation coverage must set complete to false.");if(!Number.isSafeInteger(e.total)||e.total<e.returned)throw new Error("Known invocation coverage total must be a safe integer at least as large as returned.");let n=e.total-e.returned;if(e.omitted!==n)throw new Error("Known invocation coverage omitted count must equal total minus returned.");if(n===0)throw new Error("Known incomplete invocation coverage must omit at least one result.");if(e.omittedIdentities&&e.omittedIdentities.length!==n)throw new Error("Omitted identity count must equal the disclosed omitted count.")}else{if(e.total!==void 0||e.omitted!==void 0)throw new Error("Unknown invocation coverage cannot claim a total or omitted count.");if(e.omittedIdentities!==void 0)throw new Error("Unknown invocation coverage cannot claim omitted identities.")}if(e.continuation&&(e.continuation.cursor.length===0||e.continuation.indexGeneration.length===0))throw new Error("Invocation coverage continuation requires a cursor and index generation.");if(e.resolution){if(!Number.isSafeInteger(e.resolution.totalCandidates)||e.resolution.totalCandidates<0)throw new Error("Invocation resolution candidate count must be a non-negative safe integer.");if(e.resolution.state==="exact"&&e.resolution.totalCandidates!==1)throw new Error("Exact invocation resolution must name exactly one candidate.");if(e.resolution.state==="missing"&&e.resolution.totalCandidates!==0)throw new Error("Missing invocation resolution cannot name candidates.");if(e.resolution.state==="ambiguous"&&e.resolution.totalCandidates<2)throw new Error("Ambiguous invocation resolution must name at least two candidates.")}}function ae(e,n,t){if(!e)return;let o=se(e,n);return e.coverage==="complete"?{complete:!0,totalKnown:!0,returned:o,total:o,omitted:0}:e.coverage==="sampled"?{complete:!1,totalKnown:!1,returned:o}:e.coverage==="bounded"&&t?{complete:!1,totalKnown:!1,returned:o}:{complete:null,totalKnown:!1,returned:o}}function se(e,n){let t=e.resultUnits??{kind:"report"};if(t.kind==="rows")return Array.isArray(n)?n.length:0;if(t.kind==="field"){if(!n||typeof n!="object")return 0;let o=n[t.field];return Array.isArray(o)?o.length:o==null?0:1}return n==null?0:1}function de(e){if(!e||typeof e!="object"||Array.isArray(e))return;let n=e;if(n.matched===!1)return{state:"missing",totalCandidates:0};if(n.matched!==!0||!Number.isSafeInteger(n.totalMatches))return;let t=n.totalMatches;return t<=0?{state:"missing",totalCandidates:0}:t===1?{state:"exact",totalCandidates:t}:{state:"ambiguous",totalCandidates:t}}function ue(e){return e.filter(n=>typeof n=="string"||typeof n=="number"||typeof n=="boolean")}function le(e){if(e.length===0)return{args:[],opts:{}};let n=e[e.length-1];return{args:e.slice(0,-1),opts:me(n)}}function me(e){if(!e||typeof e!="object")return{};let n=e,t=typeof n.optsWithGlobals=="function"?n.optsWithGlobals.bind(n):typeof n.opts=="function"?n.opts.bind(n):null;if(t){let o=t();return!o||typeof o!="object"?{}:(typeof n.getOptionValueSource=="function"&&Object.defineProperty(o,P,{value:r=>n.getOptionValueSource(r),enumerable:!1}),o)}return e}export{ce as a,pe as b,k as c,fe as d,Ie as e,ke as f,Ae as g,Ne as h,m as i,R as j,_e as k,Le as l,Me as m,Z as n,Je as o,ee as p,Pe as q,Te as r,De as s,Be as t,He as u,Qe as v,qe as w,Q as x,d as y,Ke as z,Ue as A,je as B,ne as C,oe as D,le as E,me as F};
2
+ //# sourceMappingURL=chunk-NJA4MMBD.js.map
@@ -1,2 +1,2 @@
1
- import{a as F}from"./chunk-BGBBVSH4.js";import{a as I}from"./chunk-JOIRNPPY.js";import{h as le}from"./chunk-J77SU6VA.js";import{b as $,d as ne,e as te,f as ie,g as oe,h as re,j as N,k as ae,l as se}from"./chunk-CVYSU6BX.js";import{d as ee}from"./chunk-ELNRLMC5.js";import{f as X,h as Z}from"./chunk-C7QOQX32.js";import{a as C}from"./chunk-TIIC3ZE7.js";import{a as H}from"./chunk-NNOKTMZT.js";import{a as O,e as z,g as E,h as P,j as Q,k as W,t as D,u as Y,v as J,w as U,x as A}from"./chunk-FETNQCFO.js";import{k as G,m as S}from"./chunk-O6QTXQPJ.js";import{A as V,K as B,a as v,z as y}from"./chunk-ADTBPVUZ.js";import{u as _,x as M}from"./chunk-BMYOV5GP.js";import{d as j}from"./chunk-3LCDIREB.js";function ce(n,e,t={}){let i=new Map;if(e&&e.length===0)return i;let r=v(n,{includeIgnored:!1}),a=ie(n),o=e??Y(n),f=new Set(o.map(u=>u.symbolId)),c=ve(o);return pe(n,i,r,a,f,c),ye(n,i,o,f),Re(n,i,r,a,f,c),t.semantic!==!1&&t.semanticEvidence&&De(i,t.semanticEvidence.callerMap(n,Me(o))),i}function pe(n,e,t,i,r,a){for(let o of t){if(!y(o))continue;let f=G(n,o);if(f)for(let c of f){if(a&&!a.has(c.calleeLeaf))continue;let u=ne(o,i.get(c.calleeLeaf)??[]);if(!u||u.length===0)continue;let s=te(n,o,u,c.memberAccess,c.calleeQualifier);s&&r.has(s.symbolId)&&s.file!==o&&T(e,s.symbolId,o)}}}function ye(n,e,t,i){let r=ge(t);for(let a of Se(n,i))n.isIgnored(a.relative_path)||he(a,r.get(a.symbol_id))||T(e,a.symbol_id,a.relative_path)}function Se(n,e){return ee(n,e?[...e]:void 0)}function ge(n){let e=new Map;for(let t of n)e.set(t.symbolId,{docId:t.documentId,startLine:t.startLine,endLine:t.endLine});return e}function he(n,e){return!!e&&e.docId===n.document_id&&n.chunk_start>=e.startLine&&n.chunk_end<=e.endLine}function Re(n,e,t,i,r,a){for(let o of t){if(y(o)!=="rust")continue;let f=S(n,o,{includeRustAttributeNames:!0});if(f.length!==0)for(let{name:c}of f){if(a&&!a.has(c))continue;let u=i.get(c);if(u)for(let s of u)r.has(s.symbolId)&&s.file!==o&&T(e,s.symbolId,o)}}}function T(n,e,t){let i=n.get(e);i||(i=new Set,n.set(e,i)),i.add(t)}function ve(n){let e=new Set;for(let t of n){let i="leaf"in t&&typeof t.leaf=="string"?t.leaf:"symbol"in t&&typeof t.symbol=="string"?z(t.symbol):"";i&&e.add(i)}return e.size>0?e:null}function Me(n){return n.filter(e=>"relativePath"in e&&"symbol"in e&&"leaf"in e)}function De(n,e){for(let[t,i]of e){let r=n.get(t);r||(r=new Set,n.set(t,r));for(let a of i)r.add(a)}}function q(n,e,t={}){return ce(n,e,t)}function K(n,e,t={}){return se(n,e,t)}function fe(n,e,t={}){let i=q(n,e,{semantic:t.semantic,semanticEvidence:t.semanticEvidence});return t.sourceFallback===!1?i:Ce(i,K(n,e))}function Ce(n,e){let t=new Map;for(let[i,r]of n)t.set(i,new Set(r));for(let[i,r]of e){let a=t.get(i)??new Set;for(let o of r)a.add(o);t.set(i,a)}return t}function ue(n,e,t){let i=e.identifierResolution==="strict"?N:ae,r=e.candidateNames?oe(e.candidateNames):null,a=0,o=0,f=0,c=0,u="";for(let s of e.paths)if(a+=1,u=s,!(!y(s)&&!(e.includeVueSfc&&V(s)))&&!n.isIgnored(s)&&!e.skipPath?.(s))try{if(r&&!re(_(n,s),r))continue;o+=1;let h=(d,b,x,g)=>{if(e.candidateNames&&!e.candidateNames.has(d))return;f+=1;let R=e.resolveTargets?e.resolveTargets({sourceFile:s,name:d,kind:b,defaultTargets:g}):g();for(let w of R)c+=1,t({sourceFile:s,name:d,target:w,occurrences:x,kind:b})},k=$(n,s);for(let[d,b]of k)h(d,"identifier",b.length,()=>i(n,s,d));for(let d of S(n,s,{includeCrossLanguageDispatchNames:e.includeCrossLanguageDispatchNames,includeRustAttributeNames:e.includeRustAttributeNames})){let b=d.kind==="cross-language-dispatch"?()=>N(n,s,d.name):()=>i(n,s,d.name);h(d.name,d.kind,d.occurrences,b)}}finally{e.afterPath?.(s),a%10===0&&j("source-reference-scan.progress",()=>{},()=>({scannedPaths:a,currentPath:u,candidateMatchedPaths:o,visitedNames:f,visitedHits:c}))}}function de(n,e={}){let{scope:t,files:i,minLoc:r=1,maxLoc:a=Number.POSITIVE_INFINITY,excludeSymbol:o,excludeEntrySurfaces:f=!1,excludeTypesFiles:c=!1,excludeRootedSymbols:u=!1,requireFunctionLikeSymbol:s=!1,requireCallableSymbol:L=!1,excludeRustTraitImplMembers:h=!1,includeSuppressed:k=!1,sortByLocDesc:d=!1}=e,b=[],x=Ie(n,{scope:t,files:i,requireFunctionLikeSymbol:s,requireCallableSymbol:L}),g=new Map,R=new Map,w=l=>{let m=g.get(l);if(m!==void 0)return m;let p=X(n,l);return g.set(l,p),p},be=l=>{let m=R.get(l);if(m!==void 0)return m;let p=C(l);return R.set(l,p),p};for(let l of x){let m=l.relativePath;if(n.isIgnored(m)||f&&w(m)||!Fe(l,{requireFunctionLikeSymbol:s,requireCallableSymbol:L})||o!==void 0&&l.symbol===o)continue;let p=F(l);p<r||p>a||c&&Le(m)||u&&Z(n,l.symbol,m)||h&&Q(l.symbol)||be(m)!=="test"&&(W(l.symbol)||!k&&M(n,m,l.startLine)||b.push(l))}return d?b.sort((l,m)=>F(m)-F(l)):b}function Ie(n,e){return e.files!==void 0?[...new Set(e.files.map(i=>i.replace(/\\/g,"/")))].sort().filter(i=>!e.scope||i.includes(e.scope)).flatMap(i=>D(n,i)):e.requireCallableSymbol?A(n,{scope:e.scope,symbolMatches:E,sqlPrefilter:"callable"}):e.requireFunctionLikeSymbol?A(n,{scope:e.scope,symbolMatches:P,sqlPrefilter:"function-like"}):U(n,e.scope)}function Fe(n,e){return e.requireCallableSymbol?E(n.symbol):e.requireFunctionLikeSymbol?P(n.symbol):n.isFunctionLike}function Le(n){return(n.split("/").pop()??"").includes("types")}var me=class{constructor(e){this.db=e}db;scopedDefinitions(e){return J(this.db,e)}definitionsForFile(e){return D(this.db,e)}productionCallableDefinitions(e={}){return de(this.db,e)}calleeMap(e,t={}){return this.calleeEvidenceMap(e,t).rows}calleeEvidenceMap(e,t={}){return le(this.db,e,{...t,semanticEvidence:I})}crossFileCallerMap(e,t={}){return q(this.db,e,{...t,semanticEvidence:I})}sourceFallbackCallerFiles(e,t={}){return K(this.db,e,t)}callerFileMap(e,t={}){return fe(this.db,e,{...t,semanticEvidence:I})}frameworkReferencedSymbolIds(e){let t=new Map;for(let r of e){if(!r.leaf)continue;let a=t.get(r.leaf)??[];a.push(r.symbolId),t.set(r.leaf,a)}let i=new Set;for(let r of v(this.db,{includeIgnored:!1}))if(y(r)==="rust")for(let{name:a}of S(this.db,r,{includeRustAttributeNames:!0}))for(let o of t.get(a)??[])i.add(o);return i}symbolsWithNonSelfCallees(e,t={}){if(e.length===0)return new Set;let i=new Map(e.map(o=>[o.symbolId,o.symbol])),r=this.calleeEvidenceMap(e,t),a=new Set([...r.rows.entries()].filter(([o,f])=>{let c=i.get(o);return f.some(u=>u.symbol!==c)}).map(([o])=>o));for(let o of r.incompleteSymbolIds)a.add(o);for(let o of r.unavailableSymbolIds)a.add(o);return a}fileDependencyGraph(e){return H(this.db,e)}fileKind(e){return C(e)}hasSuppressionComment(e){return M(this.db,e.relativePath,e.startLine)}sourceFiles(){return B(this.db)}scanSourceReferences(e,t){ue(this.db,e,t)}callableSignature(e){let t=O(this.db).forFile(e.relativePath,{facts:!0}).facts?.callables.find(i=>i.startLine===e.startLine&&i.endLine===e.endLine);return t?{paramCount:t.paramCount}:null}};export{K as a,Ce as b,me as c};
2
- //# sourceMappingURL=chunk-7FND7D7N.js.map
1
+ import{a as F}from"./chunk-BGBBVSH4.js";import{a as I}from"./chunk-OJFLPVBP.js";import{h as le}from"./chunk-57KEZDPT.js";import{b as $,d as ne,e as te,f as ie,g as oe,h as re,j as N,k as ae,l as se}from"./chunk-BH5CE4LN.js";import{d as ee}from"./chunk-ELNRLMC5.js";import{f as X,h as Z}from"./chunk-JN5LIBT3.js";import{a as C}from"./chunk-ZOEDRCR4.js";import{a as H}from"./chunk-B2E3HZ2A.js";import{a as O,e as z,g as E,h as P,j as Q,k as W,t as D,u as Y,v as J,w as U,x as A}from"./chunk-AM5SUGHF.js";import{k as G,m as S}from"./chunk-JOALNFY3.js";import{A as V,K as B,a as v,z as y}from"./chunk-RVYLJDXC.js";import{w as _,z as M}from"./chunk-PLZXWZHY.js";import{d as j}from"./chunk-3LCDIREB.js";function ce(n,e,t={}){let i=new Map;if(e&&e.length===0)return i;let r=v(n,{includeIgnored:!1}),a=ie(n),o=e??Y(n),f=new Set(o.map(u=>u.symbolId)),c=ve(o);return pe(n,i,r,a,f,c),ye(n,i,o,f),Re(n,i,r,a,f,c),t.semantic!==!1&&t.semanticEvidence&&De(i,t.semanticEvidence.callerMap(n,Me(o))),i}function pe(n,e,t,i,r,a){for(let o of t){if(!y(o))continue;let f=G(n,o);if(f)for(let c of f){if(a&&!a.has(c.calleeLeaf))continue;let u=ne(o,i.get(c.calleeLeaf)??[]);if(!u||u.length===0)continue;let s=te(n,o,u,c.memberAccess,c.calleeQualifier);s&&r.has(s.symbolId)&&s.file!==o&&T(e,s.symbolId,o)}}}function ye(n,e,t,i){let r=ge(t);for(let a of Se(n,i))n.isIgnored(a.relative_path)||he(a,r.get(a.symbol_id))||T(e,a.symbol_id,a.relative_path)}function Se(n,e){return ee(n,e?[...e]:void 0)}function ge(n){let e=new Map;for(let t of n)e.set(t.symbolId,{docId:t.documentId,startLine:t.startLine,endLine:t.endLine});return e}function he(n,e){return!!e&&e.docId===n.document_id&&n.chunk_start>=e.startLine&&n.chunk_end<=e.endLine}function Re(n,e,t,i,r,a){for(let o of t){if(y(o)!=="rust")continue;let f=S(n,o,{includeRustAttributeNames:!0});if(f.length!==0)for(let{name:c}of f){if(a&&!a.has(c))continue;let u=i.get(c);if(u)for(let s of u)r.has(s.symbolId)&&s.file!==o&&T(e,s.symbolId,o)}}}function T(n,e,t){let i=n.get(e);i||(i=new Set,n.set(e,i)),i.add(t)}function ve(n){let e=new Set;for(let t of n){let i="leaf"in t&&typeof t.leaf=="string"?t.leaf:"symbol"in t&&typeof t.symbol=="string"?z(t.symbol):"";i&&e.add(i)}return e.size>0?e:null}function Me(n){return n.filter(e=>"relativePath"in e&&"symbol"in e&&"leaf"in e)}function De(n,e){for(let[t,i]of e){let r=n.get(t);r||(r=new Set,n.set(t,r));for(let a of i)r.add(a)}}function q(n,e,t={}){return ce(n,e,t)}function K(n,e,t={}){return se(n,e,t)}function fe(n,e,t={}){let i=q(n,e,{semantic:t.semantic,semanticEvidence:t.semanticEvidence});return t.sourceFallback===!1?i:Ce(i,K(n,e))}function Ce(n,e){let t=new Map;for(let[i,r]of n)t.set(i,new Set(r));for(let[i,r]of e){let a=t.get(i)??new Set;for(let o of r)a.add(o);t.set(i,a)}return t}function ue(n,e,t){let i=e.identifierResolution==="strict"?N:ae,r=e.candidateNames?oe(e.candidateNames):null,a=0,o=0,f=0,c=0,u="";for(let s of e.paths)if(a+=1,u=s,!(!y(s)&&!(e.includeVueSfc&&V(s)))&&!n.isIgnored(s)&&!e.skipPath?.(s))try{if(r&&!re(_(n,s),r))continue;o+=1;let h=(d,b,x,g)=>{if(e.candidateNames&&!e.candidateNames.has(d))return;f+=1;let R=e.resolveTargets?e.resolveTargets({sourceFile:s,name:d,kind:b,defaultTargets:g}):g();for(let w of R)c+=1,t({sourceFile:s,name:d,target:w,occurrences:x,kind:b})},k=$(n,s);for(let[d,b]of k)h(d,"identifier",b.length,()=>i(n,s,d));for(let d of S(n,s,{includeCrossLanguageDispatchNames:e.includeCrossLanguageDispatchNames,includeRustAttributeNames:e.includeRustAttributeNames})){let b=d.kind==="cross-language-dispatch"?()=>N(n,s,d.name):()=>i(n,s,d.name);h(d.name,d.kind,d.occurrences,b)}}finally{e.afterPath?.(s),a%10===0&&j("source-reference-scan.progress",()=>{},()=>({scannedPaths:a,currentPath:u,candidateMatchedPaths:o,visitedNames:f,visitedHits:c}))}}function de(n,e={}){let{scope:t,files:i,minLoc:r=1,maxLoc:a=Number.POSITIVE_INFINITY,excludeSymbol:o,excludeEntrySurfaces:f=!1,excludeTypesFiles:c=!1,excludeRootedSymbols:u=!1,requireFunctionLikeSymbol:s=!1,requireCallableSymbol:L=!1,excludeRustTraitImplMembers:h=!1,includeSuppressed:k=!1,sortByLocDesc:d=!1}=e,b=[],x=Ie(n,{scope:t,files:i,requireFunctionLikeSymbol:s,requireCallableSymbol:L}),g=new Map,R=new Map,w=l=>{let m=g.get(l);if(m!==void 0)return m;let p=X(n,l);return g.set(l,p),p},be=l=>{let m=R.get(l);if(m!==void 0)return m;let p=C(l);return R.set(l,p),p};for(let l of x){let m=l.relativePath;if(n.isIgnored(m)||f&&w(m)||!Fe(l,{requireFunctionLikeSymbol:s,requireCallableSymbol:L})||o!==void 0&&l.symbol===o)continue;let p=F(l);p<r||p>a||c&&Le(m)||u&&Z(n,l.symbol,m)||h&&Q(l.symbol)||be(m)!=="test"&&(W(l.symbol)||!k&&M(n,m,l.startLine)||b.push(l))}return d?b.sort((l,m)=>F(m)-F(l)):b}function Ie(n,e){return e.files!==void 0?[...new Set(e.files.map(i=>i.replace(/\\/g,"/")))].sort().filter(i=>!e.scope||i.includes(e.scope)).flatMap(i=>D(n,i)):e.requireCallableSymbol?A(n,{scope:e.scope,symbolMatches:E,sqlPrefilter:"callable"}):e.requireFunctionLikeSymbol?A(n,{scope:e.scope,symbolMatches:P,sqlPrefilter:"function-like"}):U(n,e.scope)}function Fe(n,e){return e.requireCallableSymbol?E(n.symbol):e.requireFunctionLikeSymbol?P(n.symbol):n.isFunctionLike}function Le(n){return(n.split("/").pop()??"").includes("types")}var me=class{constructor(e){this.db=e}db;scopedDefinitions(e){return J(this.db,e)}definitionsForFile(e){return D(this.db,e)}productionCallableDefinitions(e={}){return de(this.db,e)}calleeMap(e,t={}){return this.calleeEvidenceMap(e,t).rows}calleeEvidenceMap(e,t={}){return le(this.db,e,{...t,semanticEvidence:I})}crossFileCallerMap(e,t={}){return q(this.db,e,{...t,semanticEvidence:I})}sourceFallbackCallerFiles(e,t={}){return K(this.db,e,t)}callerFileMap(e,t={}){return fe(this.db,e,{...t,semanticEvidence:I})}frameworkReferencedSymbolIds(e){let t=new Map;for(let r of e){if(!r.leaf)continue;let a=t.get(r.leaf)??[];a.push(r.symbolId),t.set(r.leaf,a)}let i=new Set;for(let r of v(this.db,{includeIgnored:!1}))if(y(r)==="rust")for(let{name:a}of S(this.db,r,{includeRustAttributeNames:!0}))for(let o of t.get(a)??[])i.add(o);return i}symbolsWithNonSelfCallees(e,t={}){if(e.length===0)return new Set;let i=new Map(e.map(o=>[o.symbolId,o.symbol])),r=this.calleeEvidenceMap(e,t),a=new Set([...r.rows.entries()].filter(([o,f])=>{let c=i.get(o);return f.some(u=>u.symbol!==c)}).map(([o])=>o));for(let o of r.incompleteSymbolIds)a.add(o);for(let o of r.unavailableSymbolIds)a.add(o);return a}fileDependencyGraph(e){return H(this.db,e)}fileKind(e){return C(e)}hasSuppressionComment(e){return M(this.db,e.relativePath,e.startLine)}sourceFiles(){return B(this.db)}scanSourceReferences(e,t){ue(this.db,e,t)}callableSignature(e){let t=O(this.db).forFile(e.relativePath,{facts:!0}).facts?.callables.find(i=>i.startLine===e.startLine&&i.endLine===e.endLine);return t?{paramCount:t.paramCount}:null}};export{K as a,Ce as b,me as c};
2
+ //# sourceMappingURL=chunk-NK76RSB6.js.map
@@ -1,2 +1,2 @@
1
- import{a as R}from"./chunk-DQMDCD24.js";import{a as D}from"./chunk-RBAS5ZHI.js";import{a as g}from"./chunk-XWUOUWYI.js";import{a as F}from"./chunk-SYDJMPES.js";import{a as y}from"./chunk-4WKDMDEW.js";import{e as f}from"./chunk-UDS562V4.js";import{j as d}from"./chunk-FETNQCFO.js";import{L as h}from"./chunk-ADTBPVUZ.js";var A=.7,S=.62,C=.45;function J(i,t={}){let{windowCommits:e=100,limit:n=30,scope:a,scanLimit:o}=t,s=y(i,{historyMode:t.historyMode}).fileAddRecords();if(!s)return{available:!1,windowCommits:e,findings:[]};if(n<=0)return{available:!0,windowCommits:e,findings:[]};let r=P(s,e);if(r.size===0)return{available:!0,windowCommits:e,findings:[]};let b=B(i,{limit:n,minSimilarity:t.minSimilarity,scanLimit:o,scope:a,semantic:t.semantic,focusFiles:Number.isFinite(n)?void 0:r}).map(l=>O(l,s,e)).filter(l=>l!==null);b.sort((l,c)=>(l.kind===c.kind?0:l.kind==="echo"?-1:1)||c.similarity-l.similarity||l.echoFile.localeCompare(c.echoFile)||l.echoSymbol.localeCompare(c.echoSymbol)||l.domain.localeCompare(c.domain));let p=b.slice(0,n).map(M);return{available:!0,windowCommits:e,findings:p,rootCauseGroups:N(p)}}function B(i,t){let e=K(t.limit),n=[...k(i,{scope:t.scope,minSimilarity:t.minSimilarity??A,limit:e,scanLimit:t.scanLimit,semantic:t.semantic,focusFiles:t.focusFiles})],a=h(i,{scope:t.scope});return a.react&&n.push(...E(i,{scope:t.scope,minSimilarity:t.minSimilarity??S,limit:e,scanLimit:t.scanLimit,focusFiles:t.focusFiles}),...L(i,{scope:t.scope,minSimilarity:t.minSimilarity??C,limit:e,scanLimit:t.scanLimit,focusFiles:t.focusFiles})),a.vue&&n.push(...x(i,{scope:t.scope,minSimilarity:t.minSimilarity??S,limit:e,scanLimit:t.scanLimit,focusFiles:t.focusFiles}),...T(i,{scope:t.scope,minSimilarity:t.minSimilarity??C,limit:e,scanLimit:t.scanLimit,focusFiles:t.focusFiles})),n}function k(i,t){return f(i,{scope:t.scope,minSimilarity:t.minSimilarity,limit:t.limit,crossFileOnly:!0,scanLimit:t.scanLimit,semantic:t.semantic,focusFiles:t.focusFiles}).filter(e=>!d(e.symbolA)&&!d(e.symbolB)).map(e=>({domain:"callable",basis:e.similarityBasis??"callees",symbolA:e.shortNameA,fileA:e.fileA,symbolB:e.shortNameB,fileB:e.fileB,similarity:e.similarity,sharedEvidence:e.sharedCallees,sharedCallees:e.sharedCallees}))}function E(i,t){return u(i,t,{query:g,domain:"react-component",basis:"jsx-structure",symbolA:e=>e.componentA,symbolB:e=>e.componentB,evidenceBuckets:e=>[["component",e.sharedComponents],["tag",e.sharedNativeTags],["prop",e.sharedProps],["event",e.sharedEvents],["binding",e.sharedBindings]]})}function u(i,t,e){return e.query(i,t).filter(n=>n.fileA!==n.fileB).filter(n=>e.acceptPair?.(n)??!0).map(n=>({domain:e.domain,basis:e.basis,symbolA:e.symbolA(n),fileA:n.fileA,symbolB:e.symbolB(n),fileB:n.fileB,similarity:n.similarity,sharedEvidence:G(...e.evidenceBuckets(n)),sharedCallees:[]}))}function L(i,t){return u(i,t,{query:F,domain:"react-hook",basis:"react-behavior",symbolA:e=>e.componentA,symbolB:e=>e.componentB,acceptPair:w,evidenceBuckets:e=>[["hook",e.sharedHooks],["react-hook",e.sharedReactHooks],["effect",e.sharedEffects],["state",e.sharedState],["request",e.sharedRequests],["handler",e.sharedHandlers],["action",e.sharedHandlerVerbs]]})}var I=new Set(["useCallback","useEffect","useLayoutEffect","useMemo","useMutation","useQueries","useQuery","useQueryClient","useReducer","useRef","useState"]);function w(i){return i.sharedHooks.some(t=>!I.has(t))||i.sharedState.length>0||i.sharedHandlers.length>0||i.sharedHandlerVerbs.length>=2}function x(i,t){return u(i,t,{query:D,domain:"vue-component",basis:"vue-template",symbolA:e=>m(e.fileA),symbolB:e=>m(e.fileB),evidenceBuckets:e=>[["component",e.sharedComponents],["prop",e.sharedProps],["event",e.sharedEvents],["directive",e.sharedDirectives],["slot",e.sharedSlots],["identifier",e.sharedIdentifiers]]})}function T(i,t){return u(i,t,{query:R,domain:"vue-composable",basis:"vue-behavior",symbolA:e=>m(e.fileA),symbolB:e=>m(e.fileB),evidenceBuckets:e=>[["composable",e.sharedComposables],["store",e.sharedStores],["reactivity",e.sharedReactivity],["lifecycle",e.sharedLifecycle],["request",e.sharedRequests],["function",e.sharedFunctions],["action",e.sharedFunctionVerbs],["binding",e.sharedBindings],["template-event",e.sharedTemplateEvents]]})}function P(i,t){let e=new Set;for(let[n,a]of i)a.commitsAgo<=t&&e.add(n);return e}function O(i,t,e){let n=t.get(i.fileA)?.commitsAgo??null,a=t.get(i.fileB)?.commitsAgo??null,o=n!==null&&n<=e,s=a!==null&&a<=e;if(!o&&!s)return null;if(o&&s){let r=(n??0)<=(a??0);return{kind:"twin",domain:i.domain,basis:i.basis,echoSymbol:r?i.symbolA:i.symbolB,echoFile:r?i.fileA:i.fileB,echoAgeCommits:(r?n:a)??0,establishedSymbol:r?i.symbolB:i.symbolA,establishedFile:r?i.fileB:i.fileA,establishedAgeCommits:r?a:n,similarity:i.similarity,sharedEvidence:i.sharedEvidence,sharedCallees:i.sharedCallees}}return{kind:"echo",domain:i.domain,basis:i.basis,echoSymbol:o?i.symbolA:i.symbolB,echoFile:o?i.fileA:i.fileB,echoAgeCommits:(o?n:a)??0,establishedSymbol:o?i.symbolB:i.symbolA,establishedFile:o?i.fileB:i.fileA,establishedAgeCommits:o?a:n,similarity:i.similarity,sharedEvidence:i.sharedEvidence,sharedCallees:i.sharedCallees}}function M(i){let t=v(i);return{...i,rootCauseKey:t,groupKey:`recent-duplicate:${t}`}}function v(i){if(i.kind==="echo")return["echo",i.domain,i.basis,i.establishedSymbol].join(":");let t=i.sharedEvidence.slice().sort().join("|"),e=[i.echoSymbol,i.establishedSymbol].sort().join("|");return["twin",i.domain,i.basis,t||e].join(":")}function N(i){let t=new Map;for(let[e,n]of i.entries()){let a=n.rootCauseKey??v(n),o=n.groupKey??`recent-duplicate:${a}`,s=t.get(o);s||(s={groupKey:o,rootCauseKey:a,kind:n.kind,domain:n.domain,basis:n.basis,count:0,maxSimilarity:n.similarity,findingIndexes:[],echoFiles:new Set,establishedFile:n.kind==="echo"?n.establishedFile:void 0,establishedSymbol:n.kind==="echo"?n.establishedSymbol:void 0,relatedFiles:new Set,sharedEvidence:new Set,recommendation:H(n)},t.set(o,s)),s.count+=1,s.maxSimilarity=Math.max(s.maxSimilarity,n.similarity),s.findingIndexes.push(e),s.echoFiles.add(n.echoFile),s.relatedFiles.add(n.echoFile),s.relatedFiles.add(n.establishedFile);for(let r of n.sharedEvidence)s.sharedEvidence.add(r)}return[...t.values()].map(e=>({...e,echoFiles:[...e.echoFiles].sort(),relatedFiles:[...e.relatedFiles].sort(),sharedEvidence:[...e.sharedEvidence].sort().slice(0,16)})).sort((e,n)=>n.count-e.count||n.maxSimilarity-e.maxSimilarity||e.groupKey.localeCompare(n.groupKey))}function H(i){return i.kind==="echo"?"Review the established side once, then migrate or delete every echo in this group.":"Pick one owner for the new twins and consolidate the group before the copies diverge."}function K(i){return Number.isFinite(i)?i*5:Number.POSITIVE_INFINITY}function G(...i){let t=[],e=new Set;for(let[n,a]of i)for(let o of a){let s=`${n}:${o}`;e.has(s)||(e.add(s),t.push(s))}return t}function m(i){return(i.split("/").pop()??i).replace(/\.[^.]+$/,"")}export{J as a};
2
- //# sourceMappingURL=chunk-H3LGFZVK.js.map
1
+ import{a as R}from"./chunk-27PHVDKL.js";import{a as D}from"./chunk-S64NCE2Z.js";import{a as g}from"./chunk-DFPAZXLU.js";import{a as F}from"./chunk-QKVTWODE.js";import{a as y}from"./chunk-BX2U3QQV.js";import{e as f}from"./chunk-A7XQT7MH.js";import{j as d}from"./chunk-AM5SUGHF.js";import{L as h}from"./chunk-RVYLJDXC.js";var A=.7,S=.62,C=.45;function J(i,t={}){let{windowCommits:e=100,limit:n=30,scope:a,scanLimit:o}=t,s=y(i,{historyMode:t.historyMode}).fileAddRecords();if(!s)return{available:!1,windowCommits:e,findings:[]};if(n<=0)return{available:!0,windowCommits:e,findings:[]};let r=P(s,e);if(r.size===0)return{available:!0,windowCommits:e,findings:[]};let b=B(i,{limit:n,minSimilarity:t.minSimilarity,scanLimit:o,scope:a,semantic:t.semantic,focusFiles:Number.isFinite(n)?void 0:r}).map(l=>O(l,s,e)).filter(l=>l!==null);b.sort((l,c)=>(l.kind===c.kind?0:l.kind==="echo"?-1:1)||c.similarity-l.similarity||l.echoFile.localeCompare(c.echoFile)||l.echoSymbol.localeCompare(c.echoSymbol)||l.domain.localeCompare(c.domain));let p=b.slice(0,n).map(M);return{available:!0,windowCommits:e,findings:p,rootCauseGroups:N(p)}}function B(i,t){let e=K(t.limit),n=[...k(i,{scope:t.scope,minSimilarity:t.minSimilarity??A,limit:e,scanLimit:t.scanLimit,semantic:t.semantic,focusFiles:t.focusFiles})],a=h(i,{scope:t.scope});return a.react&&n.push(...E(i,{scope:t.scope,minSimilarity:t.minSimilarity??S,limit:e,scanLimit:t.scanLimit,focusFiles:t.focusFiles}),...L(i,{scope:t.scope,minSimilarity:t.minSimilarity??C,limit:e,scanLimit:t.scanLimit,focusFiles:t.focusFiles})),a.vue&&n.push(...x(i,{scope:t.scope,minSimilarity:t.minSimilarity??S,limit:e,scanLimit:t.scanLimit,focusFiles:t.focusFiles}),...T(i,{scope:t.scope,minSimilarity:t.minSimilarity??C,limit:e,scanLimit:t.scanLimit,focusFiles:t.focusFiles})),n}function k(i,t){return f(i,{scope:t.scope,minSimilarity:t.minSimilarity,limit:t.limit,crossFileOnly:!0,scanLimit:t.scanLimit,semantic:t.semantic,focusFiles:t.focusFiles}).filter(e=>!d(e.symbolA)&&!d(e.symbolB)).map(e=>({domain:"callable",basis:e.similarityBasis??"callees",symbolA:e.shortNameA,fileA:e.fileA,symbolB:e.shortNameB,fileB:e.fileB,similarity:e.similarity,sharedEvidence:e.sharedCallees,sharedCallees:e.sharedCallees}))}function E(i,t){return u(i,t,{query:g,domain:"react-component",basis:"jsx-structure",symbolA:e=>e.componentA,symbolB:e=>e.componentB,evidenceBuckets:e=>[["component",e.sharedComponents],["tag",e.sharedNativeTags],["prop",e.sharedProps],["event",e.sharedEvents],["binding",e.sharedBindings]]})}function u(i,t,e){return e.query(i,t).filter(n=>n.fileA!==n.fileB).filter(n=>e.acceptPair?.(n)??!0).map(n=>({domain:e.domain,basis:e.basis,symbolA:e.symbolA(n),fileA:n.fileA,symbolB:e.symbolB(n),fileB:n.fileB,similarity:n.similarity,sharedEvidence:G(...e.evidenceBuckets(n)),sharedCallees:[]}))}function L(i,t){return u(i,t,{query:F,domain:"react-hook",basis:"react-behavior",symbolA:e=>e.componentA,symbolB:e=>e.componentB,acceptPair:w,evidenceBuckets:e=>[["hook",e.sharedHooks],["react-hook",e.sharedReactHooks],["effect",e.sharedEffects],["state",e.sharedState],["request",e.sharedRequests],["handler",e.sharedHandlers],["action",e.sharedHandlerVerbs]]})}var I=new Set(["useCallback","useEffect","useLayoutEffect","useMemo","useMutation","useQueries","useQuery","useQueryClient","useReducer","useRef","useState"]);function w(i){return i.sharedHooks.some(t=>!I.has(t))||i.sharedState.length>0||i.sharedHandlers.length>0||i.sharedHandlerVerbs.length>=2}function x(i,t){return u(i,t,{query:D,domain:"vue-component",basis:"vue-template",symbolA:e=>m(e.fileA),symbolB:e=>m(e.fileB),evidenceBuckets:e=>[["component",e.sharedComponents],["prop",e.sharedProps],["event",e.sharedEvents],["directive",e.sharedDirectives],["slot",e.sharedSlots],["identifier",e.sharedIdentifiers]]})}function T(i,t){return u(i,t,{query:R,domain:"vue-composable",basis:"vue-behavior",symbolA:e=>m(e.fileA),symbolB:e=>m(e.fileB),evidenceBuckets:e=>[["composable",e.sharedComposables],["store",e.sharedStores],["reactivity",e.sharedReactivity],["lifecycle",e.sharedLifecycle],["request",e.sharedRequests],["function",e.sharedFunctions],["action",e.sharedFunctionVerbs],["binding",e.sharedBindings],["template-event",e.sharedTemplateEvents]]})}function P(i,t){let e=new Set;for(let[n,a]of i)a.commitsAgo<=t&&e.add(n);return e}function O(i,t,e){let n=t.get(i.fileA)?.commitsAgo??null,a=t.get(i.fileB)?.commitsAgo??null,o=n!==null&&n<=e,s=a!==null&&a<=e;if(!o&&!s)return null;if(o&&s){let r=(n??0)<=(a??0);return{kind:"twin",domain:i.domain,basis:i.basis,echoSymbol:r?i.symbolA:i.symbolB,echoFile:r?i.fileA:i.fileB,echoAgeCommits:(r?n:a)??0,establishedSymbol:r?i.symbolB:i.symbolA,establishedFile:r?i.fileB:i.fileA,establishedAgeCommits:r?a:n,similarity:i.similarity,sharedEvidence:i.sharedEvidence,sharedCallees:i.sharedCallees}}return{kind:"echo",domain:i.domain,basis:i.basis,echoSymbol:o?i.symbolA:i.symbolB,echoFile:o?i.fileA:i.fileB,echoAgeCommits:(o?n:a)??0,establishedSymbol:o?i.symbolB:i.symbolA,establishedFile:o?i.fileB:i.fileA,establishedAgeCommits:o?a:n,similarity:i.similarity,sharedEvidence:i.sharedEvidence,sharedCallees:i.sharedCallees}}function M(i){let t=v(i);return{...i,rootCauseKey:t,groupKey:`recent-duplicate:${t}`}}function v(i){if(i.kind==="echo")return["echo",i.domain,i.basis,i.establishedSymbol].join(":");let t=i.sharedEvidence.slice().sort().join("|"),e=[i.echoSymbol,i.establishedSymbol].sort().join("|");return["twin",i.domain,i.basis,t||e].join(":")}function N(i){let t=new Map;for(let[e,n]of i.entries()){let a=n.rootCauseKey??v(n),o=n.groupKey??`recent-duplicate:${a}`,s=t.get(o);s||(s={groupKey:o,rootCauseKey:a,kind:n.kind,domain:n.domain,basis:n.basis,count:0,maxSimilarity:n.similarity,findingIndexes:[],echoFiles:new Set,establishedFile:n.kind==="echo"?n.establishedFile:void 0,establishedSymbol:n.kind==="echo"?n.establishedSymbol:void 0,relatedFiles:new Set,sharedEvidence:new Set,recommendation:H(n)},t.set(o,s)),s.count+=1,s.maxSimilarity=Math.max(s.maxSimilarity,n.similarity),s.findingIndexes.push(e),s.echoFiles.add(n.echoFile),s.relatedFiles.add(n.echoFile),s.relatedFiles.add(n.establishedFile);for(let r of n.sharedEvidence)s.sharedEvidence.add(r)}return[...t.values()].map(e=>({...e,echoFiles:[...e.echoFiles].sort(),relatedFiles:[...e.relatedFiles].sort(),sharedEvidence:[...e.sharedEvidence].sort().slice(0,16)})).sort((e,n)=>n.count-e.count||n.maxSimilarity-e.maxSimilarity||e.groupKey.localeCompare(n.groupKey))}function H(i){return i.kind==="echo"?"Review the established side once, then migrate or delete every echo in this group.":"Pick one owner for the new twins and consolidate the group before the copies diverge."}function K(i){return Number.isFinite(i)?i*5:Number.POSITIVE_INFINITY}function G(...i){let t=[],e=new Set;for(let[n,a]of i)for(let o of a){let s=`${n}:${o}`;e.has(s)||(e.add(s),t.push(s))}return t}function m(i){return(i.split("/").pop()??i).replace(/\.[^.]+$/,"")}export{J as a};
2
+ //# sourceMappingURL=chunk-NTRW52UR.js.map
@@ -1,2 +1,2 @@
1
- import{a as O,b as T,c as y,f as I,g as G,i as $,l as Y,m as q,n as K}from"./chunk-6CS3UQTN.js";import{S as _}from"./chunk-UCD3H3UZ.js";import{a as N}from"./chunk-NNOKTMZT.js";import{e as U,i as P,j as h,l as z,n as E,u as g}from"./chunk-BMYOV5GP.js";import{a as J,d as f}from"./chunk-3LCDIREB.js";var ue={references:$,referenceMap:Y,referenceEvidenceMap:q,callerMap:(e,i)=>I(e).callerMap(i),calleeMap:X,calleeEvidenceMap:Q};function X(e,i,r={}){return Q(e,i,r).rows}function Q(e,i,r={}){let a=J(),o=new Map,l=G(e,i),n=[],c=[],m=0,p=0,d=0,w=0,R=0,H=0,k=0,S=new Set,v=new Set;for(let{definition:t,callees:s}of l.hits)R+=1,o.set(t.symbolId,s),s.length>0&&(H+=1,k+=s.length);let u=Z(e,l.hits);if(u.entries.length>0&&f("semantic.callees.prefetch-cache-write",()=>E(e,u.entries),()=>({entries:u.entries.length,sourceMissing:u.sourceMissing,skippedUnsupportedLanguage:u.skippedUnsupportedLanguage})),f("semantic.callees.cache-scan",()=>{for(let[t,s]of O(l.misses)){if(!y(t)){a&&(m+=s.length);continue}let j=g(e,t);if(!j){a&&(p+=s.length),c.push(...s);continue}let A=h(e,t,j),D=V(e,t);if(!D){c.push(...s);continue}let W=z(e,t,A,D);for(let M of s){let L=W.get(M.symbol)??null;if(L!==null){let B=te(L);if(B){a&&(d+=1),o.set(M.symbolId,B);continue}a&&(w+=1)}n.push({def:M,contentHash:A,depsDigest:D})}}},()=>({definitions:i.length,skippedUnsupportedLanguage:m,sourceMissing:p,cacheHits:d,parseFailures:w,misses:n.length,unkeyed:c.length,inMemoryHits:R,inMemoryRows:H,inMemoryCalleeCount:k,resultRows:o.size})),n.length===0&&c.length===0)return{rows:o,incompleteSymbolIds:S,unavailableSymbolIds:v};let x=[...c,...n.map(t=>t.def)],F=0,C=f("semantic.callees.compute-misses",()=>{let t=K(e,x,r.resolveProvider);for(let s of t.incompleteSymbolIds)S.add(s);for(let s of t.unavailableSymbolIds)v.add(s);return F=t.rows.size,t.rows},()=>({definitions:x.length,misses:n.length,unkeyed:c.length,rows:F}));for(let[t,s]of C)o.set(t,s);let b=n.filter(t=>C.has(t.def.symbolId)&&I(e).capability("semantic-callees",t.def.relativePath).available).map(t=>({relativePath:t.def.relativePath,symbol:t.def.symbol,contentHash:t.contentHash,depsDigest:t.depsDigest,payload:JSON.stringify(C.get(t.def.symbolId)??[])}));return b.length>0?f("semantic.callees.cache-write",()=>E(e,b),()=>({entries:b.length})):f("semantic.callees.cache-write-skip",()=>{},()=>({reason:"provider-unavailable",misses:n.length})),{rows:o,incompleteSymbolIds:S,unavailableSymbolIds:v}}function Z(e,i){let r=[],a=new Map,o=0,l=0;for(let{definition:n,callees:c}of i){if(!y(n.relativePath)){l+=1;continue}if(!a.has(n.relativePath)){let p=g(e,n.relativePath),d=p?V(e,n.relativePath):null;a.set(n.relativePath,p&&d?{contentHash:h(e,n.relativePath,p),depsDigest:d}:null)}let m=a.get(n.relativePath);if(!m){o+=1;continue}r.push({relativePath:n.relativePath,symbol:n.symbol,contentHash:m.contentHash,depsDigest:m.depsDigest,payload:JSON.stringify(c)})}return{entries:r,sourceMissing:o,skippedUnsupportedLanguage:l}}var ee="typescript-callees-v3-incomplete-scan";function V(e,i){let r=y(i);if(r==="typescript")return _(e,i,ee)?.key??null;let a=ie(e,i);return r==="rust"?P(JSON.stringify({kind:"semantic-callees",language:r,engine:T(e.config.projectRoot),positionMapping:"nearby-leaf-v2-callsite-line",depsDigest:a})):a}function te(e){try{return JSON.parse(e)}catch{return null}}var ne=U("semantic-deps-digest",{clearGroups:["whole-project","source-file"]});function ie(e,i){return ne.get(e,i,()=>{let a=[...N(e).get(i)??[]].sort().map(o=>`${o}:${h(e,o,g(e,o))}`);return P(a.join("|"))})}export{ue as a};
2
- //# sourceMappingURL=chunk-JOIRNPPY.js.map
1
+ import{a as O,b as T,c as y,f as I,g as G,i as $,l as Y,m as q,n as K}from"./chunk-VCL7FK3E.js";import{S as _}from"./chunk-6ZV5EDUT.js";import{a as N}from"./chunk-B2E3HZ2A.js";import{g as U,k as P,l as h,n as z,p as E,w as g}from"./chunk-PLZXWZHY.js";import{a as J,d as f}from"./chunk-3LCDIREB.js";var ue={references:$,referenceMap:Y,referenceEvidenceMap:q,callerMap:(e,i)=>I(e).callerMap(i),calleeMap:X,calleeEvidenceMap:Q};function X(e,i,r={}){return Q(e,i,r).rows}function Q(e,i,r={}){let a=J(),o=new Map,l=G(e,i),n=[],c=[],m=0,p=0,d=0,w=0,R=0,H=0,k=0,S=new Set,v=new Set;for(let{definition:t,callees:s}of l.hits)R+=1,o.set(t.symbolId,s),s.length>0&&(H+=1,k+=s.length);let u=Z(e,l.hits);if(u.entries.length>0&&f("semantic.callees.prefetch-cache-write",()=>E(e,u.entries),()=>({entries:u.entries.length,sourceMissing:u.sourceMissing,skippedUnsupportedLanguage:u.skippedUnsupportedLanguage})),f("semantic.callees.cache-scan",()=>{for(let[t,s]of O(l.misses)){if(!y(t)){a&&(m+=s.length);continue}let j=g(e,t);if(!j){a&&(p+=s.length),c.push(...s);continue}let A=h(e,t,j),D=V(e,t);if(!D){c.push(...s);continue}let W=z(e,t,A,D);for(let M of s){let L=W.get(M.symbol)??null;if(L!==null){let B=te(L);if(B){a&&(d+=1),o.set(M.symbolId,B);continue}a&&(w+=1)}n.push({def:M,contentHash:A,depsDigest:D})}}},()=>({definitions:i.length,skippedUnsupportedLanguage:m,sourceMissing:p,cacheHits:d,parseFailures:w,misses:n.length,unkeyed:c.length,inMemoryHits:R,inMemoryRows:H,inMemoryCalleeCount:k,resultRows:o.size})),n.length===0&&c.length===0)return{rows:o,incompleteSymbolIds:S,unavailableSymbolIds:v};let x=[...c,...n.map(t=>t.def)],F=0,C=f("semantic.callees.compute-misses",()=>{let t=K(e,x,r.resolveProvider);for(let s of t.incompleteSymbolIds)S.add(s);for(let s of t.unavailableSymbolIds)v.add(s);return F=t.rows.size,t.rows},()=>({definitions:x.length,misses:n.length,unkeyed:c.length,rows:F}));for(let[t,s]of C)o.set(t,s);let b=n.filter(t=>C.has(t.def.symbolId)&&I(e).capability("semantic-callees",t.def.relativePath).available).map(t=>({relativePath:t.def.relativePath,symbol:t.def.symbol,contentHash:t.contentHash,depsDigest:t.depsDigest,payload:JSON.stringify(C.get(t.def.symbolId)??[])}));return b.length>0?f("semantic.callees.cache-write",()=>E(e,b),()=>({entries:b.length})):f("semantic.callees.cache-write-skip",()=>{},()=>({reason:"provider-unavailable",misses:n.length})),{rows:o,incompleteSymbolIds:S,unavailableSymbolIds:v}}function Z(e,i){let r=[],a=new Map,o=0,l=0;for(let{definition:n,callees:c}of i){if(!y(n.relativePath)){l+=1;continue}if(!a.has(n.relativePath)){let p=g(e,n.relativePath),d=p?V(e,n.relativePath):null;a.set(n.relativePath,p&&d?{contentHash:h(e,n.relativePath,p),depsDigest:d}:null)}let m=a.get(n.relativePath);if(!m){o+=1;continue}r.push({relativePath:n.relativePath,symbol:n.symbol,contentHash:m.contentHash,depsDigest:m.depsDigest,payload:JSON.stringify(c)})}return{entries:r,sourceMissing:o,skippedUnsupportedLanguage:l}}var ee="typescript-callees-v3-incomplete-scan";function V(e,i){let r=y(i);if(r==="typescript")return _(e,i,ee)?.key??null;let a=ie(e,i);return r==="rust"?P(JSON.stringify({kind:"semantic-callees",language:r,engine:T(e.config.projectRoot),positionMapping:"nearby-leaf-v2-callsite-line",depsDigest:a})):a}function te(e){try{return JSON.parse(e)}catch{return null}}var ne=U("semantic-deps-digest",{clearGroups:["whole-project","source-file"]});function ie(e,i){return ne.get(e,i,()=>{let a=[...N(e).get(i)??[]].sort().map(o=>`${o}:${h(e,o,g(e,o))}`);return P(a.join("|"))})}export{ue as a};
2
+ //# sourceMappingURL=chunk-OJFLPVBP.js.map
@@ -1,2 +1,2 @@
1
- import{c as h}from"./chunk-B75HZHUP.js";import{a as m}from"./chunk-JOIRNPPY.js";import{b,d as g}from"./chunk-J77SU6VA.js";import{a as u}from"./chunk-UZGZB3VB.js";import{d as o,h as p}from"./chunk-FETNQCFO.js";function N(n,a,f={}){let i=u(n,a);if(!i)return null;let l=f.semantic!==!1,c=g(n,i,{semantic:l,semanticEvidence:m}),S=c.rows.filter(e=>p(e.symbol)).slice(0,50),t=b(n,i,{limit:50,additive:!0,callableOnly:!0,semantic:l,semanticEvidence:m}),E=h(t.rows),d=S.map(e=>({symbol:e.symbol,shortName:o(e.symbol),file:e.file,relationship:e.source!=="caller-map-inversion"?"reference-candidate":e.callEvidence==="scip-chunk"?"chunk-candidate":"resolved-call",evidenceStrength:e.source==="caller-map-inversion"&&e.callEvidence!=="scip-chunk"?"exact":"candidate",evidenceSource:e.callEvidence??e.source})),v=E.map(e=>({symbol:e.symbol,shortName:o(e.symbol),file:e.file,relationship:e.source==="scip-chunk"?"chunk-candidate":"resolved-call",evidenceStrength:e.source==="scip-chunk"?"candidate":"exact",evidenceSource:e.source}));return{symbol:i.symbol,shortName:o(i.symbol),callers:d.map(({symbol:e,shortName:s,file:r})=>({symbol:e,shortName:s,file:r})),callees:v.map(({symbol:e,shortName:s,file:r})=>({symbol:e,shortName:s,file:r})),callerEvidence:d,calleeEvidence:v,coverage:{scope:"indexed-static-call-graph",blindSpots:["unresolved dynamic dispatch and reflection","external or unindexed callees without a resolved symbol identity","SCIP chunk co-occurrence is retained only as candidate call evidence",...c.semanticIncomplete?["compiler-resolved incoming evidence was incomplete; known callers are retained"]:[],...c.semanticUnavailable?["compiler-resolved incoming evidence was unavailable; known callers are retained"]:[],...t.semanticIncomplete?["compiler-resolved outgoing evidence was incomplete; known callees are retained"]:[],...t.semanticUnavailable?["compiler-resolved outgoing evidence was unavailable; known callees are retained"]:[]],semanticEvidence:{enabled:l,incoming:y(l,c),outgoing:y(l,t)}}}}function y(n,a){return n?a.semanticIncomplete&&a.semanticUnavailable?"incomplete-and-unavailable":a.semanticIncomplete?"incomplete":a.semanticUnavailable?"unavailable":"complete":"disabled"}export{N as a};
2
- //# sourceMappingURL=chunk-KMITESMT.js.map
1
+ import{c as h}from"./chunk-B75HZHUP.js";import{a as m}from"./chunk-OJFLPVBP.js";import{b,d as g}from"./chunk-57KEZDPT.js";import{a as u}from"./chunk-3XFJUWJE.js";import{d as o,h as p}from"./chunk-AM5SUGHF.js";function N(n,a,f={}){let i=u(n,a);if(!i)return null;let l=f.semantic!==!1,c=g(n,i,{semantic:l,semanticEvidence:m}),S=c.rows.filter(e=>p(e.symbol)).slice(0,50),t=b(n,i,{limit:50,additive:!0,callableOnly:!0,semantic:l,semanticEvidence:m}),E=h(t.rows),d=S.map(e=>({symbol:e.symbol,shortName:o(e.symbol),file:e.file,relationship:e.source!=="caller-map-inversion"?"reference-candidate":e.callEvidence==="scip-chunk"?"chunk-candidate":"resolved-call",evidenceStrength:e.source==="caller-map-inversion"&&e.callEvidence!=="scip-chunk"?"exact":"candidate",evidenceSource:e.callEvidence??e.source})),v=E.map(e=>({symbol:e.symbol,shortName:o(e.symbol),file:e.file,relationship:e.source==="scip-chunk"?"chunk-candidate":"resolved-call",evidenceStrength:e.source==="scip-chunk"?"candidate":"exact",evidenceSource:e.source}));return{symbol:i.symbol,shortName:o(i.symbol),callers:d.map(({symbol:e,shortName:s,file:r})=>({symbol:e,shortName:s,file:r})),callees:v.map(({symbol:e,shortName:s,file:r})=>({symbol:e,shortName:s,file:r})),callerEvidence:d,calleeEvidence:v,coverage:{scope:"indexed-static-call-graph",blindSpots:["unresolved dynamic dispatch and reflection","external or unindexed callees without a resolved symbol identity","SCIP chunk co-occurrence is retained only as candidate call evidence",...c.semanticIncomplete?["compiler-resolved incoming evidence was incomplete; known callers are retained"]:[],...c.semanticUnavailable?["compiler-resolved incoming evidence was unavailable; known callers are retained"]:[],...t.semanticIncomplete?["compiler-resolved outgoing evidence was incomplete; known callees are retained"]:[],...t.semanticUnavailable?["compiler-resolved outgoing evidence was unavailable; known callees are retained"]:[]],semanticEvidence:{enabled:l,incoming:y(l,c),outgoing:y(l,t)}}}}function y(n,a){return n?a.semanticIncomplete&&a.semanticUnavailable?"incomplete-and-unavailable":a.semanticIncomplete?"incomplete":a.semanticUnavailable?"unavailable":"complete":"disabled"}export{N as a};
2
+ //# sourceMappingURL=chunk-OMBRP7BB.js.map
@@ -1,4 +1,4 @@
1
- import{c as f}from"./chunk-7FND7D7N.js";import{a as b,d as g}from"./chunk-C7QOQX32.js";import{d as m}from"./chunk-FETNQCFO.js";import{o as u,p as _,q as a}from"./chunk-O6QTXQPJ.js";import{a as l}from"./chunk-ADTBPVUZ.js";import{u as p}from"./chunk-BMYOV5GP.js";function B(e,t={}){let{scope:o,limit:r}=t,i=new f(e),s=T([...x(e,o),...y(e,i,o)]);return F(s),r?s.slice(0,r):s}function x(e,t){let o=[];for(let r of N(e,t)){if(e.isIgnored(r.barrel_path)||e.isIgnored(r.original_path)||g(e,r.barrel_path)||p(e,r.barrel_path)&&a(e,r.barrel_path).length===0)continue;let i=I(e,r),s=i?.barrel_consumers??0,n=i?.direct_consumers??0;s!==0||n!==0||o.push({barrelFile:r.barrel_path,symbol:r.symbol,shortName:m(r.symbol),originalFile:r.original_path,barrelConsumers:s,directConsumers:n,...h(e,r.barrel_path)})}return o}function N(e,t){let o=t?"AND barrel_d.relative_path LIKE ?":"",r=t?[`%${t}%`]:[];return e.all(`WITH barrel_refs AS MATERIALIZED (
1
+ import{c as f}from"./chunk-NK76RSB6.js";import{a as b,d as g}from"./chunk-JN5LIBT3.js";import{d as m}from"./chunk-AM5SUGHF.js";import{o as u,p as _,q as a}from"./chunk-JOALNFY3.js";import{a as l}from"./chunk-RVYLJDXC.js";import{w as p}from"./chunk-PLZXWZHY.js";function B(e,t={}){let{scope:o,limit:r}=t,i=new f(e),s=T([...x(e,o),...y(e,i,o)]);return F(s),r?s.slice(0,r):s}function x(e,t){let o=[];for(let r of N(e,t)){if(e.isIgnored(r.barrel_path)||e.isIgnored(r.original_path)||g(e,r.barrel_path)||p(e,r.barrel_path)&&a(e,r.barrel_path).length===0)continue;let i=I(e,r),s=i?.barrel_consumers??0,n=i?.direct_consumers??0;s!==0||n!==0||o.push({barrelFile:r.barrel_path,symbol:r.symbol,shortName:m(r.symbol),originalFile:r.original_path,barrelConsumers:s,directConsumers:n,...h(e,r.barrel_path)})}return o}function N(e,t){let o=t?"AND barrel_d.relative_path LIKE ?":"",r=t?[`%${t}%`]:[];return e.all(`WITH barrel_refs AS MATERIALIZED (
2
2
  SELECT DISTINCT
3
3
  barrel_d.id AS barrel_doc_id,
4
4
  barrel_d.relative_path AS barrel_path,
@@ -71,4 +71,4 @@ import{c as f}from"./chunk-7FND7D7N.js";import{a as b,d as g}from"./chunk-C7QOQX
71
71
  ${e.pathExclusionsFor("consumer_d")}
72
72
  GROUP BY consumer_d.id
73
73
  )`,t.barrel_doc_id,t.symbol_id,t.barrel_doc_id,t.original_doc_id)}function y(e,t,o){let r=[],i=C(e);for(let s of O(e,o))E(i,s,s)>0||r.push(...D(e,t,s,i));return r}function O(e,t){return l(e,{scope:t,includeIgnored:!1}).filter(o=>a(e,o).length>0||u(e,o).length>0)}function D(e,t,o,r){let i=a(e,o).filter(n=>n.sourcePath&&!e.isIgnored(n.sourcePath)).flatMap(n=>R(e,t,o,n.sourcePath,r,[A(n.specifier)])),s=u(e,o).filter(n=>n.sourcePath&&!e.isIgnored(n.sourcePath)).flatMap(n=>R(e,t,o,n.sourcePath,r,n.kind==="named"&&n.names.length>0?n.names:[n.kind==="star"?`* from ${n.sourcePath}`:`* namespace from ${n.sourcePath}`]));return[...i,...s]}function R(e,t,o,r,i,s){let n=t.definitionsForFile(r);return s.map(c=>{let d=n.find(S=>S.leaf===c);return{barrelFile:o,symbol:d?.symbol??`source-reexport:${o}:${c}`,shortName:d?m(d.symbol):c,originalFile:r,barrelConsumers:0,directConsumers:E(i,r,o),...h(e,o)}})}function A(e){return e.split("::").at(-1)?.split("/").at(-1)?.replace(/\.[^.]+$/,"")??e}function h(e,t){return b(e,t)?{actionTier:"signal",surfaceEvidence:["barrel file is declared on the package public surface"],recommendation:"Review the package API before removing this re-export; local consumers are zero, but external consumers may import through the public barrel."}:{actionTier:"direct",surfaceEvidence:[],recommendation:"Remove this unused re-export when the barrel is not part of an external API surface."}}function C(e){let t=new Map;for(let o of l(e,{includeIgnored:!1}))for(let r of _(e,o)){if(!r.sourcePath)continue;let i=t.get(r.sourcePath)??new Set;i.add(o),t.set(r.sourcePath,i)}return t}function E(e,t,o){let r=e.get(t);return r?r.size-(r.has(o)?1:0):0}function T(e){let t=new Set,o=[];for(let r of e){let i=`${r.barrelFile}|${r.symbol}|${r.originalFile}`;t.has(i)||(t.add(i),o.push(r))}return o}function F(e){e.sort((t,o)=>o.directConsumers-t.directConsumers||t.barrelFile.localeCompare(o.barrelFile)||t.shortName.localeCompare(o.shortName))}export{B as a};
74
- //# sourceMappingURL=chunk-UP3BUZR5.js.map
74
+ //# sourceMappingURL=chunk-OVKZM2XI.js.map
@@ -1,3 +1,3 @@
1
- import{b as pe,c as ne}from"./chunk-SMRBZ6EC.js";import{f as ee}from"./chunk-JEJLSICM.js";import{c as me}from"./chunk-7FND7D7N.js";import{d as ue,f as fe}from"./chunk-CVYSU6BX.js";import{t as U}from"./chunk-FETNQCFO.js";import{f as Z}from"./chunk-O6QTXQPJ.js";import{v as q}from"./chunk-BMYOV5GP.js";var Le=6;function ge(e,i,l){return`${e}\0${i}\0${l??i}`}function qe(e,i,l,a={}){let s=a.limit??Le;if(!Number.isSafeInteger(s)||s<=0)throw new RangeError(`next-anchor limit must be a positive safe integer; received ${s}`);let m=a.sourceAllowed??(()=>!0),u=new Map(i.nodes.map(t=>[t.id,t])),C=new Set(l.steps.map(t=>t.nodeId)),S=new Set(l.steps.flatMap(t=>{let g=le(u.get(t.nodeId));return g?[g]:[]})),A=new Set;for(let t of l.steps)for(let g of t.behavior?.supportingDeclarations??[])S.add(g.symbol),A.add(ge(g.file,g.line,g.endLine));let y=t=>t.symbol!==null&&S.has(t.symbol)||A.has(ge(t.file,t.line,t.endLine)),I=new Map(l.steps.flatMap(t=>{if(!t.location)return[];let g=le(u.get(t.nodeId));if(!g)return[];let x=U(e,t.location.file).find(_=>_.symbol===g);return x?[[t.id,x]]:[]})),M=new me(e).calleeMap([...I.values()],{additive:!1,semantic:!0}),o=[],f=new Set,V=new Set,T=0,D=0,j=0,$=0,G=0,B=0,r=0,N=0;for(let t of l.steps){if(!t.location||!t.behavior)continue;let g=i.edges.filter(n=>["call","runtime-boundary"].includes(n.kind)&&(n.fromNodeId===t.nodeId||n.toNodeId===t.nodeId)&&n.disposition!=="excluded"&&n.disposition!=="unsupported");for(let n of g){let d=n.toNodeId===t.nodeId,p=d?n.fromNodeId:n.toNodeId;if(C.has(p))continue;let b=u.get(p);if(!b?.location||!m(b.location.file))continue;let L=n.kind==="call"?oe(e,b):ae(b);if(!L||y(L))continue;let h=re(n,b.location.file)??b.location,w=q(e,h.file)[h.line]?.trim(),v=d?"upstream":"downstream",k=n.kind==="runtime-boundary"?d?"runtime-producer":"runtime-consumer":d?"caller":"callee",P=["call"],O=te(n.evidence),Ne=z(b);o.push({anchor:{id:R(t.id,h.line,b.id),status:O,source:"graph-relation",direction:v,causalRole:k,relationKind:n.kind,fromStepId:t.id,fromLabel:t.label,callsite:{file:h.file,line:h.line,endLine:h.endLine??h.line,text:w||`${b.label} \u2192 ${t.label}`,signals:P,calleeLeaf:Ne},alternatives:[L],alternativeCount:1,evidence:n.evidence}}),d&&(B+=1),n.kind==="runtime-boundary"&&(N+=1)}let x=i.edges.filter(n=>n.kind==="reference"&&n.fromNodeId===t.nodeId&&n.disposition!=="excluded"&&n.disposition!=="unsupported"&&!C.has(n.toNodeId));for(let n of x){let d=u.get(n.toNodeId);if(!d?.location||!m(d.location.file))continue;let p=oe(e,d);if(!p||y(p))continue;let b=z(d),L=re(n,t.location.file)?.line,h=t.behavior.lines.find(P=>(L===void 0||L>=P.line&&L<=P.endLine)&&P.text.includes(b));if(!h)continue;let w=ye(h.signals),v=w==="result-callback",k=te(n.evidence);o.push({anchor:{id:R(t.id,h.line,d.id),status:k,source:"graph-relation",direction:"downstream",causalRole:w,relationKind:"reference",fromStepId:t.id,fromLabel:t.label,callsite:{file:t.location.file,line:h.line,endLine:h.endLine,text:h.text,signals:h.signals,calleeLeaf:b},alternatives:[p],alternativeCount:1,evidence:n.evidence}}),v&&(r+=1)}let _=ne(e,t.location.file,t.location.line,t.location.endLine??t.location.line),F=q(e,t.location.file),W=ee(e,t.location.file,t.location.line,t.location.endLine??t.location.line);for(let n of _.targets){if(!m(n.definition.relativePath))continue;let d=K(t.location.file,n.sourceLine,n.calleeLeaf);if(f.has(d))continue;f.add(d);let p=ie(W.get(n.sourceLine)),b={symbol:n.definition.symbol,label:n.definition.leaf,file:n.definition.relativePath,line:n.definition.startLine,endLine:n.definition.endLine};y(b)||o.push({anchor:{id:R(t.id,n.sourceLine,n.definition.symbol),status:"exact",source:"graph-call",direction:"downstream",causalRole:"callee",relationKind:"call",fromStepId:t.id,fromLabel:t.label,callsite:{file:t.location.file,line:n.sourceLine,endLine:n.sourceLine,text:F[n.sourceLine]?.trim()||`${n.calleeLeaf}()`,signals:p,calleeLeaf:n.calleeLeaf},alternatives:[b],alternativeCount:1,evidence:[{method:"scip-occurrence-callsite",strength:"exact",identity:n.definition.symbol,location:{file:t.location.file,line:n.sourceLine}}]}})}let c=t.behavior.lines.filter(n=>n.signals.includes("call"));if(c.length===0)continue;T+=1;let E=(Z(e,t.location.file)?.callSites??[]).filter(n=>c.some(d=>n.line>=d.line&&n.line<=d.endLine));D+=E.length;let se=i.edges.filter(n=>n.kind==="call"&&n.fromNodeId===t.nodeId&&n.disposition!=="excluded"&&n.disposition!=="unsupported"),Y=new Map;for(let n of se){let d=u.get(n.toNodeId);if(!d)continue;let p=z(d);Y.set(p,(Y.get(p)??0)+1)}let ce=I.get(t.id),de=Ie(e,ce?M.get(ce.symbolId)??[]:[]),Ae=Ee(de);for(let n of de){if(!m(n.alternative.file)||y(n.alternative))continue;let d=X(n.alternative.label),p=be(E,c,d,n.row.callsiteLine,Ae.get(d)===1);if(!p)continue;let b=H(c,p.line,d);if(!b)continue;let L=K(t.location.file,p.line,d);if(f.has(L))continue;f.add(L);let h=Se(n.row.source);o.push({anchor:{id:R(t.id,p.line,n.alternative.symbol??n.alternative.file),status:h,source:"graph-call",direction:"downstream",causalRole:"callee",relationKind:"call",fromStepId:t.id,fromLabel:t.label,callsite:{file:t.location.file,line:b.line,endLine:b.endLine,text:b.text,signals:b.signals,calleeLeaf:d},alternatives:[n.alternative],alternativeCount:1,evidence:[{method:n.row.source,strength:h,identity:n.row.symbol,location:{file:t.location.file,line:p.line}}]}})}for(let n of se){if(C.has(n.toNodeId))continue;let d=u.get(n.toNodeId);if(!d?.location||!m(d.location.file))continue;let p=z(d),b=n.evidence.find(P=>{let O=P.location;return O!==null&&O.file===t.location?.file&&O.line>=0})?.location?.line,L=be(E,c,p,b,Y.get(p)===1);if(!L)continue;let h=H(c,L.line,p);if(!h)continue;let w=K(t.location.file,L.line,p);if(f.has(w))continue;f.add(w);let v=ae(d);if(!v||y(v))continue;let k=te(n.evidence);o.push({anchor:{id:R(t.id,L.line,d.id),status:k,source:"graph-call",direction:"downstream",causalRole:"callee",relationKind:"call",fromStepId:t.id,fromLabel:t.label,callsite:{file:t.location.file,line:h.line,endLine:h.endLine,text:h.text,signals:h.signals,calleeLeaf:p},alternatives:[v],alternativeCount:1,evidence:n.evidence}})}for(let n of E){let d=K(t.location.file,n.line,n.calleeLeaf);if(f.has(d))continue;let p=H(c,n.line,n.calleeLeaf);if(!p)continue;let b=ue(t.location.file,fe(e).get(n.calleeLeaf)??[]).flatMap(v=>U(e,v.file).filter(k=>k.symbol===v.symbol&&k.isFunctionLike)).filter(v=>m(v.relativePath)&&!y({symbol:v.symbol,label:v.leaf,file:v.relativePath,line:v.startLine,endLine:v.endLine})),L=Q(b.map(v=>({symbol:v.symbol,label:v.leaf??n.calleeLeaf,file:v.relativePath,line:v.startLine,endLine:v.endLine})));if(L.length===0){G+=1;continue}let h=`${t.id}\0${n.line}\0${n.calleeLeaf}`;if(V.has(h))continue;V.add(h);let w=L.length>1;w?$+=1:j+=1,o.push({anchor:{id:R(t.id,n.line,n.calleeLeaf),status:w?"ambiguous":"candidate",source:"leaf-identity-candidate",direction:"downstream",causalRole:"callee",relationKind:"call",fromStepId:t.id,fromLabel:t.label,callsite:{file:t.location.file,line:p.line,endLine:p.endLine,text:p.text,signals:p.signals,calleeLeaf:n.calleeLeaf},alternatives:L.slice(0,3),alternativeCount:L.length,evidence:[]}})}}return Ce(e,o,l.steps,s,{scannedBehaviorSteps:T,visibleCallsites:D,graphEvidencedCallsites:f.size,identityCandidateCallsites:j,ambiguousCallsites:$,unresolvedCallsites:G,upstreamCandidates:B,resultCandidates:r,runtimeCandidates:N},a.selectionTerms)}function Ue(e,i,l){let a=new Map(i.nodes.map(s=>[s.id,s]));for(let s of l.steps)if(!(!s.behavior||!s.location))for(let m of i.edges){if(m.kind!=="reference"||m.fromNodeId!==s.nodeId||m.disposition==="excluded"||m.disposition==="unsupported")continue;let u=a.get(m.toNodeId);if(!u?.location||!oe(e,u))continue;let C=z(u),S=re(m,s.location.file)?.line,A=s.behavior.lines.find(y=>(S===void 0||S>=y.line&&S<=y.endLine)&&y.text.includes(C));!A||ye(A.signals)!=="result-callback"||m.semantics?.some(({family:y,subtype:I})=>y==="control"&&I==="result-callback")||(m.semantics=[...m.semantics??[],{family:"control",subtype:"result-callback",attributes:{evidenceRole:"result-producing-callable-reference"}}])}}function ye(e){return e.includes("call")&&e.some(i=>["return","mutation","shape","spread","binding"].includes(i))?"result-callback":"callable-reference"}function ze(e,i,l={}){let a=l.limit??Le;if(!Number.isSafeInteger(a)||a<=0)throw new RangeError(`next-anchor limit must be a positive safe integer; received ${a}`);let s=l.sourceAllowed??(()=>!0),m=[],u=i.map((o,f)=>({id:o.id,nodeId:o.id,order:f,role:"anchor",kind:"source-construct",label:o.label,location:{file:o.file,line:o.startLine,endLine:o.endLine},behavior:null})),C=i.map(o=>({file:o.file,startLine:o.startLine,endLine:o.endLine})),S=0,A=0,y=0,I=0,M=0;for(let o of i){let f=q(e,o.file),T=(Z(e,o.file)?.callSites??[]).filter(r=>r.line>=o.startLine&&r.line<=o.endLine);S+=T.length;let D=ee(e,o.file,o.startLine,o.endLine),j=ne(e,o.file,o.startLine,o.endLine),$=new Set;for(let r of j.targets){if(!s(r.definition.relativePath)||C.some(x=>x.file===r.definition.relativePath&&x.startLine<=r.definition.startLine&&x.endLine>=r.definition.endLine))continue;let N=K(o.file,r.sourceLine,r.calleeLeaf);$.add(N);let t=ie(D.get(r.sourceLine)),g={symbol:r.definition.symbol,label:r.definition.leaf,file:r.definition.relativePath,line:r.definition.startLine,endLine:r.definition.endLine};m.push({anchor:{id:R(o.id,r.sourceLine,r.definition.symbol),status:"exact",source:"graph-call",direction:"downstream",causalRole:"callee",relationKind:"call",fromStepId:o.id,fromLabel:o.label,callsite:{file:o.file,line:r.sourceLine,endLine:r.sourceLine,text:f[r.sourceLine]?.trim()||`${r.calleeLeaf}()`,signals:t,calleeLeaf:r.calleeLeaf},alternatives:[g],alternativeCount:1,evidence:[{method:"scip-occurrence-callsite",strength:"exact",identity:r.definition.symbol,location:{file:o.file,line:r.sourceLine}}]}})}A+=j.resolvedCallsites;let G=pe(e,o.file,{ranges:[{startLine:o.startLine,endLine:o.endLine}]}),B=new Map;for(let r of G.targets){let N=T.find(x=>x.line===r.line)?.calleeLeaf??r.calleeLeaf,t=K(o.file,r.line,N),g=B.get(t)??[];g.push(r),B.set(t,g)}for(let[r,N]of B){if($.has(r))continue;$.add(r);let t=N.filter(c=>s(c.targetFile)&&!C.some(E=>E.file===c.targetFile&&E.startLine<=c.targetStartLine&&E.endLine>=c.targetEndLine));if(t.length===0)continue;let g=t[0],x=T.find(c=>c.line===g.line)?.calleeLeaf??g.calleeLeaf,_=ie(D.get(g.line)),F=Q(t.map(c=>({symbol:c.targetSymbol??null,label:c.calleeLeaf,file:c.targetFile,line:c.targetStartLine,endLine:c.targetEndLine}))),W=t.some(c=>(c.resolutionAlternativeCount??0)>1)?"candidate":t.every(c=>c.strength==="exact")?"exact":"derived";m.push({anchor:{id:R(o.id,g.line,F.map(c=>`${c.file}:${c.line}`).join("|")),status:F.length>1?"ambiguous":W,source:"graph-call",direction:"downstream",causalRole:"callee",relationKind:"call",fromStepId:o.id,fromLabel:o.label,callsite:{file:o.file,line:g.line,endLine:g.line,text:f[g.line]?.trim()||`${g.calleeLeaf}()`,signals:_,calleeLeaf:x},alternatives:F.slice(0,3),alternativeCount:F.length,evidence:t.map(c=>({method:c.resolution==="constructed-member-receiver"?"ast-constructed-member-callsite":c.resolution==="factory-callback-member"?"ast-factory-callback-callsite":c.resolution==="imported-service-object-member"?"ast-service-member-callsite":"ast-import-member-callsite",strength:W,identity:c.targetSymbol??`${c.targetFile}:${c.targetStartLine}-${c.targetEndLine}`,location:{file:o.file,line:g.line}}))}})}A+=B.size;for(let r of T){let N=K(o.file,r.line,r.calleeLeaf);$.has(N)||(M+=1)}}return Ce(e,m,u,a,{scannedBehaviorSteps:i.length,visibleCallsites:S,graphEvidencedCallsites:A,identityCandidateCallsites:y,ambiguousCallsites:I,unresolvedCallsites:M,upstreamCandidates:0,resultCandidates:0,runtimeCandidates:0})}function Ce(e,i,l,a,s,m=[]){let u=ke(i).sort(xe),C=u.filter(f=>we(e,f)).slice(0,a),S=new Set(C.map(f=>f.anchor.id)),A=u.filter(f=>!S.has(f.anchor.id)),y=C.map(f=>f.anchor),I=A.map(f=>f.anchor),M=Q(y.flatMap(f=>f.alternativeCount===1?f.alternatives:[])),o=Q(I.flatMap(f=>f.alternativeCount===1?f.alternatives:[]));return{anchors:y,withheldAnchors:I,candidateAnchors:u.length,omittedAnchors:Math.max(0,u.length-y.length),...s,inspectCommand:M.length===0?null:`codebaseiq inspect ${M.map(ve).join(" ")} --view behavior`,remainingInspectCommands:Me(o,8).map(f=>`codebaseiq inspect ${f.map(ve).join(" ")} --view behavior`)}}function xe(e,i){let l=e.anchor.alternatives[0],a=i.anchor.alternatives[0];return J(e.anchor.status)-J(i.anchor.status)||(e.anchor.direction??"").localeCompare(i.anchor.direction??"")||(e.anchor.relationKind??"").localeCompare(i.anchor.relationKind??"")||(e.anchor.causalRole??"").localeCompare(i.anchor.causalRole??"")||e.anchor.fromStepId.localeCompare(i.anchor.fromStepId)||e.anchor.callsite.file.localeCompare(i.anchor.callsite.file)||e.anchor.callsite.line-i.anchor.callsite.line||(l?.file??"").localeCompare(a?.file??"")||(l?.line??0)-(a?.line??0)||e.anchor.id.localeCompare(i.anchor.id)}function we(e,i){if(i.anchor.alternativeCount!==1)return!0;let l=i.anchor.alternatives[0],a=l.endLine??l.line;return q(e,l.file).slice(l.line,a+1).join(`
1
+ import{b as pe,c as ne}from"./chunk-CCRZLRWJ.js";import{f as ee}from"./chunk-VVCBMH5O.js";import{c as me}from"./chunk-NK76RSB6.js";import{d as ue,f as fe}from"./chunk-BH5CE4LN.js";import{t as U}from"./chunk-AM5SUGHF.js";import{f as Z}from"./chunk-JOALNFY3.js";import{x as q}from"./chunk-PLZXWZHY.js";var Le=6;function ge(e,i,l){return`${e}\0${i}\0${l??i}`}function qe(e,i,l,a={}){let s=a.limit??Le;if(!Number.isSafeInteger(s)||s<=0)throw new RangeError(`next-anchor limit must be a positive safe integer; received ${s}`);let m=a.sourceAllowed??(()=>!0),u=new Map(i.nodes.map(t=>[t.id,t])),C=new Set(l.steps.map(t=>t.nodeId)),S=new Set(l.steps.flatMap(t=>{let g=le(u.get(t.nodeId));return g?[g]:[]})),A=new Set;for(let t of l.steps)for(let g of t.behavior?.supportingDeclarations??[])S.add(g.symbol),A.add(ge(g.file,g.line,g.endLine));let y=t=>t.symbol!==null&&S.has(t.symbol)||A.has(ge(t.file,t.line,t.endLine)),I=new Map(l.steps.flatMap(t=>{if(!t.location)return[];let g=le(u.get(t.nodeId));if(!g)return[];let x=U(e,t.location.file).find(_=>_.symbol===g);return x?[[t.id,x]]:[]})),M=new me(e).calleeMap([...I.values()],{additive:!1,semantic:!0}),o=[],f=new Set,V=new Set,T=0,D=0,j=0,$=0,G=0,B=0,r=0,N=0;for(let t of l.steps){if(!t.location||!t.behavior)continue;let g=i.edges.filter(n=>["call","runtime-boundary"].includes(n.kind)&&(n.fromNodeId===t.nodeId||n.toNodeId===t.nodeId)&&n.disposition!=="excluded"&&n.disposition!=="unsupported");for(let n of g){let d=n.toNodeId===t.nodeId,p=d?n.fromNodeId:n.toNodeId;if(C.has(p))continue;let b=u.get(p);if(!b?.location||!m(b.location.file))continue;let L=n.kind==="call"?oe(e,b):ae(b);if(!L||y(L))continue;let h=re(n,b.location.file)??b.location,w=q(e,h.file)[h.line]?.trim(),v=d?"upstream":"downstream",k=n.kind==="runtime-boundary"?d?"runtime-producer":"runtime-consumer":d?"caller":"callee",P=["call"],O=te(n.evidence),Ne=z(b);o.push({anchor:{id:R(t.id,h.line,b.id),status:O,source:"graph-relation",direction:v,causalRole:k,relationKind:n.kind,fromStepId:t.id,fromLabel:t.label,callsite:{file:h.file,line:h.line,endLine:h.endLine??h.line,text:w||`${b.label} \u2192 ${t.label}`,signals:P,calleeLeaf:Ne},alternatives:[L],alternativeCount:1,evidence:n.evidence}}),d&&(B+=1),n.kind==="runtime-boundary"&&(N+=1)}let x=i.edges.filter(n=>n.kind==="reference"&&n.fromNodeId===t.nodeId&&n.disposition!=="excluded"&&n.disposition!=="unsupported"&&!C.has(n.toNodeId));for(let n of x){let d=u.get(n.toNodeId);if(!d?.location||!m(d.location.file))continue;let p=oe(e,d);if(!p||y(p))continue;let b=z(d),L=re(n,t.location.file)?.line,h=t.behavior.lines.find(P=>(L===void 0||L>=P.line&&L<=P.endLine)&&P.text.includes(b));if(!h)continue;let w=ye(h.signals),v=w==="result-callback",k=te(n.evidence);o.push({anchor:{id:R(t.id,h.line,d.id),status:k,source:"graph-relation",direction:"downstream",causalRole:w,relationKind:"reference",fromStepId:t.id,fromLabel:t.label,callsite:{file:t.location.file,line:h.line,endLine:h.endLine,text:h.text,signals:h.signals,calleeLeaf:b},alternatives:[p],alternativeCount:1,evidence:n.evidence}}),v&&(r+=1)}let _=ne(e,t.location.file,t.location.line,t.location.endLine??t.location.line),F=q(e,t.location.file),W=ee(e,t.location.file,t.location.line,t.location.endLine??t.location.line);for(let n of _.targets){if(!m(n.definition.relativePath))continue;let d=K(t.location.file,n.sourceLine,n.calleeLeaf);if(f.has(d))continue;f.add(d);let p=ie(W.get(n.sourceLine)),b={symbol:n.definition.symbol,label:n.definition.leaf,file:n.definition.relativePath,line:n.definition.startLine,endLine:n.definition.endLine};y(b)||o.push({anchor:{id:R(t.id,n.sourceLine,n.definition.symbol),status:"exact",source:"graph-call",direction:"downstream",causalRole:"callee",relationKind:"call",fromStepId:t.id,fromLabel:t.label,callsite:{file:t.location.file,line:n.sourceLine,endLine:n.sourceLine,text:F[n.sourceLine]?.trim()||`${n.calleeLeaf}()`,signals:p,calleeLeaf:n.calleeLeaf},alternatives:[b],alternativeCount:1,evidence:[{method:"scip-occurrence-callsite",strength:"exact",identity:n.definition.symbol,location:{file:t.location.file,line:n.sourceLine}}]}})}let c=t.behavior.lines.filter(n=>n.signals.includes("call"));if(c.length===0)continue;T+=1;let E=(Z(e,t.location.file)?.callSites??[]).filter(n=>c.some(d=>n.line>=d.line&&n.line<=d.endLine));D+=E.length;let se=i.edges.filter(n=>n.kind==="call"&&n.fromNodeId===t.nodeId&&n.disposition!=="excluded"&&n.disposition!=="unsupported"),Y=new Map;for(let n of se){let d=u.get(n.toNodeId);if(!d)continue;let p=z(d);Y.set(p,(Y.get(p)??0)+1)}let ce=I.get(t.id),de=Ie(e,ce?M.get(ce.symbolId)??[]:[]),Ae=Ee(de);for(let n of de){if(!m(n.alternative.file)||y(n.alternative))continue;let d=X(n.alternative.label),p=be(E,c,d,n.row.callsiteLine,Ae.get(d)===1);if(!p)continue;let b=H(c,p.line,d);if(!b)continue;let L=K(t.location.file,p.line,d);if(f.has(L))continue;f.add(L);let h=Se(n.row.source);o.push({anchor:{id:R(t.id,p.line,n.alternative.symbol??n.alternative.file),status:h,source:"graph-call",direction:"downstream",causalRole:"callee",relationKind:"call",fromStepId:t.id,fromLabel:t.label,callsite:{file:t.location.file,line:b.line,endLine:b.endLine,text:b.text,signals:b.signals,calleeLeaf:d},alternatives:[n.alternative],alternativeCount:1,evidence:[{method:n.row.source,strength:h,identity:n.row.symbol,location:{file:t.location.file,line:p.line}}]}})}for(let n of se){if(C.has(n.toNodeId))continue;let d=u.get(n.toNodeId);if(!d?.location||!m(d.location.file))continue;let p=z(d),b=n.evidence.find(P=>{let O=P.location;return O!==null&&O.file===t.location?.file&&O.line>=0})?.location?.line,L=be(E,c,p,b,Y.get(p)===1);if(!L)continue;let h=H(c,L.line,p);if(!h)continue;let w=K(t.location.file,L.line,p);if(f.has(w))continue;f.add(w);let v=ae(d);if(!v||y(v))continue;let k=te(n.evidence);o.push({anchor:{id:R(t.id,L.line,d.id),status:k,source:"graph-call",direction:"downstream",causalRole:"callee",relationKind:"call",fromStepId:t.id,fromLabel:t.label,callsite:{file:t.location.file,line:h.line,endLine:h.endLine,text:h.text,signals:h.signals,calleeLeaf:p},alternatives:[v],alternativeCount:1,evidence:n.evidence}})}for(let n of E){let d=K(t.location.file,n.line,n.calleeLeaf);if(f.has(d))continue;let p=H(c,n.line,n.calleeLeaf);if(!p)continue;let b=ue(t.location.file,fe(e).get(n.calleeLeaf)??[]).flatMap(v=>U(e,v.file).filter(k=>k.symbol===v.symbol&&k.isFunctionLike)).filter(v=>m(v.relativePath)&&!y({symbol:v.symbol,label:v.leaf,file:v.relativePath,line:v.startLine,endLine:v.endLine})),L=Q(b.map(v=>({symbol:v.symbol,label:v.leaf??n.calleeLeaf,file:v.relativePath,line:v.startLine,endLine:v.endLine})));if(L.length===0){G+=1;continue}let h=`${t.id}\0${n.line}\0${n.calleeLeaf}`;if(V.has(h))continue;V.add(h);let w=L.length>1;w?$+=1:j+=1,o.push({anchor:{id:R(t.id,n.line,n.calleeLeaf),status:w?"ambiguous":"candidate",source:"leaf-identity-candidate",direction:"downstream",causalRole:"callee",relationKind:"call",fromStepId:t.id,fromLabel:t.label,callsite:{file:t.location.file,line:p.line,endLine:p.endLine,text:p.text,signals:p.signals,calleeLeaf:n.calleeLeaf},alternatives:L.slice(0,3),alternativeCount:L.length,evidence:[]}})}}return Ce(e,o,l.steps,s,{scannedBehaviorSteps:T,visibleCallsites:D,graphEvidencedCallsites:f.size,identityCandidateCallsites:j,ambiguousCallsites:$,unresolvedCallsites:G,upstreamCandidates:B,resultCandidates:r,runtimeCandidates:N},a.selectionTerms)}function Ue(e,i,l){let a=new Map(i.nodes.map(s=>[s.id,s]));for(let s of l.steps)if(!(!s.behavior||!s.location))for(let m of i.edges){if(m.kind!=="reference"||m.fromNodeId!==s.nodeId||m.disposition==="excluded"||m.disposition==="unsupported")continue;let u=a.get(m.toNodeId);if(!u?.location||!oe(e,u))continue;let C=z(u),S=re(m,s.location.file)?.line,A=s.behavior.lines.find(y=>(S===void 0||S>=y.line&&S<=y.endLine)&&y.text.includes(C));!A||ye(A.signals)!=="result-callback"||m.semantics?.some(({family:y,subtype:I})=>y==="control"&&I==="result-callback")||(m.semantics=[...m.semantics??[],{family:"control",subtype:"result-callback",attributes:{evidenceRole:"result-producing-callable-reference"}}])}}function ye(e){return e.includes("call")&&e.some(i=>["return","mutation","shape","spread","binding"].includes(i))?"result-callback":"callable-reference"}function ze(e,i,l={}){let a=l.limit??Le;if(!Number.isSafeInteger(a)||a<=0)throw new RangeError(`next-anchor limit must be a positive safe integer; received ${a}`);let s=l.sourceAllowed??(()=>!0),m=[],u=i.map((o,f)=>({id:o.id,nodeId:o.id,order:f,role:"anchor",kind:"source-construct",label:o.label,location:{file:o.file,line:o.startLine,endLine:o.endLine},behavior:null})),C=i.map(o=>({file:o.file,startLine:o.startLine,endLine:o.endLine})),S=0,A=0,y=0,I=0,M=0;for(let o of i){let f=q(e,o.file),T=(Z(e,o.file)?.callSites??[]).filter(r=>r.line>=o.startLine&&r.line<=o.endLine);S+=T.length;let D=ee(e,o.file,o.startLine,o.endLine),j=ne(e,o.file,o.startLine,o.endLine),$=new Set;for(let r of j.targets){if(!s(r.definition.relativePath)||C.some(x=>x.file===r.definition.relativePath&&x.startLine<=r.definition.startLine&&x.endLine>=r.definition.endLine))continue;let N=K(o.file,r.sourceLine,r.calleeLeaf);$.add(N);let t=ie(D.get(r.sourceLine)),g={symbol:r.definition.symbol,label:r.definition.leaf,file:r.definition.relativePath,line:r.definition.startLine,endLine:r.definition.endLine};m.push({anchor:{id:R(o.id,r.sourceLine,r.definition.symbol),status:"exact",source:"graph-call",direction:"downstream",causalRole:"callee",relationKind:"call",fromStepId:o.id,fromLabel:o.label,callsite:{file:o.file,line:r.sourceLine,endLine:r.sourceLine,text:f[r.sourceLine]?.trim()||`${r.calleeLeaf}()`,signals:t,calleeLeaf:r.calleeLeaf},alternatives:[g],alternativeCount:1,evidence:[{method:"scip-occurrence-callsite",strength:"exact",identity:r.definition.symbol,location:{file:o.file,line:r.sourceLine}}]}})}A+=j.resolvedCallsites;let G=pe(e,o.file,{ranges:[{startLine:o.startLine,endLine:o.endLine}]}),B=new Map;for(let r of G.targets){let N=T.find(x=>x.line===r.line)?.calleeLeaf??r.calleeLeaf,t=K(o.file,r.line,N),g=B.get(t)??[];g.push(r),B.set(t,g)}for(let[r,N]of B){if($.has(r))continue;$.add(r);let t=N.filter(c=>s(c.targetFile)&&!C.some(E=>E.file===c.targetFile&&E.startLine<=c.targetStartLine&&E.endLine>=c.targetEndLine));if(t.length===0)continue;let g=t[0],x=T.find(c=>c.line===g.line)?.calleeLeaf??g.calleeLeaf,_=ie(D.get(g.line)),F=Q(t.map(c=>({symbol:c.targetSymbol??null,label:c.calleeLeaf,file:c.targetFile,line:c.targetStartLine,endLine:c.targetEndLine}))),W=t.some(c=>(c.resolutionAlternativeCount??0)>1)?"candidate":t.every(c=>c.strength==="exact")?"exact":"derived";m.push({anchor:{id:R(o.id,g.line,F.map(c=>`${c.file}:${c.line}`).join("|")),status:F.length>1?"ambiguous":W,source:"graph-call",direction:"downstream",causalRole:"callee",relationKind:"call",fromStepId:o.id,fromLabel:o.label,callsite:{file:o.file,line:g.line,endLine:g.line,text:f[g.line]?.trim()||`${g.calleeLeaf}()`,signals:_,calleeLeaf:x},alternatives:F.slice(0,3),alternativeCount:F.length,evidence:t.map(c=>({method:c.resolution==="constructed-member-receiver"?"ast-constructed-member-callsite":c.resolution==="factory-callback-member"?"ast-factory-callback-callsite":c.resolution==="imported-service-object-member"?"ast-service-member-callsite":"ast-import-member-callsite",strength:W,identity:c.targetSymbol??`${c.targetFile}:${c.targetStartLine}-${c.targetEndLine}`,location:{file:o.file,line:g.line}}))}})}A+=B.size;for(let r of T){let N=K(o.file,r.line,r.calleeLeaf);$.has(N)||(M+=1)}}return Ce(e,m,u,a,{scannedBehaviorSteps:i.length,visibleCallsites:S,graphEvidencedCallsites:A,identityCandidateCallsites:y,ambiguousCallsites:I,unresolvedCallsites:M,upstreamCandidates:0,resultCandidates:0,runtimeCandidates:0})}function Ce(e,i,l,a,s,m=[]){let u=ke(i).sort(xe),C=u.filter(f=>we(e,f)).slice(0,a),S=new Set(C.map(f=>f.anchor.id)),A=u.filter(f=>!S.has(f.anchor.id)),y=C.map(f=>f.anchor),I=A.map(f=>f.anchor),M=Q(y.flatMap(f=>f.alternativeCount===1?f.alternatives:[])),o=Q(I.flatMap(f=>f.alternativeCount===1?f.alternatives:[]));return{anchors:y,withheldAnchors:I,candidateAnchors:u.length,omittedAnchors:Math.max(0,u.length-y.length),...s,inspectCommand:M.length===0?null:`codebaseiq inspect ${M.map(ve).join(" ")} --view behavior`,remainingInspectCommands:Me(o,8).map(f=>`codebaseiq inspect ${f.map(ve).join(" ")} --view behavior`)}}function xe(e,i){let l=e.anchor.alternatives[0],a=i.anchor.alternatives[0];return J(e.anchor.status)-J(i.anchor.status)||(e.anchor.direction??"").localeCompare(i.anchor.direction??"")||(e.anchor.relationKind??"").localeCompare(i.anchor.relationKind??"")||(e.anchor.causalRole??"").localeCompare(i.anchor.causalRole??"")||e.anchor.fromStepId.localeCompare(i.anchor.fromStepId)||e.anchor.callsite.file.localeCompare(i.anchor.callsite.file)||e.anchor.callsite.line-i.anchor.callsite.line||(l?.file??"").localeCompare(a?.file??"")||(l?.line??0)-(a?.line??0)||e.anchor.id.localeCompare(i.anchor.id)}function we(e,i){if(i.anchor.alternativeCount!==1)return!0;let l=i.anchor.alternatives[0],a=l.endLine??l.line;return q(e,l.file).slice(l.line,a+1).join(`
2
2
  `).length<=2e4}function ie(e){return e?.includes("call")?[...e]:["call",...e??[]]}function Ie(e,i){let l=new Map;for(let a of i){let s=U(e,a.file).find(C=>C.symbol===a.symbol&&C.isFunctionLike);if(!s)continue;let m={symbol:s.symbol,label:s.leaf,file:s.relativePath,line:s.startLine,endLine:s.endLine},u=l.get(s.symbol);!u||he(a.source)>he(u.row.source)?l.set(s.symbol,{row:{...a,...a.callsiteLine===void 0&&u?.row.callsiteLine!==void 0?{callsiteLine:u.row.callsiteLine}:{}},alternative:m}):u.row.callsiteLine===void 0&&a.callsiteLine!==void 0&&l.set(s.symbol,{...u,row:{...u.row,callsiteLine:a.callsiteLine}})}return[...l.values()]}function Ee(e){let i=new Map;for(let l of e){let a=X(l.alternative.label);i.set(a,(i.get(a)??0)+1)}return i}function Se(e){return e==="semantic-callee"||e==="scip-chunk"?"exact":"derived"}function he(e){return Se(e)==="exact"?2:1}function H(e,i,l){return e.find(a=>i>=a.line&&i<=a.endLine&&a.text.includes(l))??e.find(a=>i>=a.line&&i<=a.endLine)??null}function be(e,i,l,a,s){if(a!==void 0)return e.find(u=>u.line===a&&u.calleeLeaf===l&&H(i,u.line,l)!==null)??null;let m=e.filter(u=>u.calleeLeaf===l&&H(i,u.line,u.calleeLeaf)!==null);return s&&m.length===1?m[0]:null}function z(e){let i=e.attributes.leaf;if(typeof i=="string"&&i.length>0)return X(i);let l=e.label.slice(e.label.lastIndexOf(":")+1);return X(l)}function X(e){return e.replace(/\(\)$/u,"").replace(/^#/u,"")}function le(e){if(e?.kind!=="symbol"||!e.id.startsWith("symbol:"))return null;try{return decodeURIComponent(e.id.slice(7))}catch{return null}}function ae(e){return e.location?{symbol:le(e),label:e.label,file:e.location.file,line:e.location.line,endLine:e.location.endLine??null}:null}function oe(e,i){let l=ae(i);return l?.symbol&&U(e,l.file).some(s=>s.symbol===l.symbol&&s.isFunctionLike)?l:null}function re(e,i){return e.evidence.find(l=>l.location?.file===i)?.location??e.evidence.find(l=>l.location!==null)?.location??null}function te(e){let i={exact:5,derived:4,mixed:3,candidate:2,unknown:1};return e.reduce((l,a)=>i[a.strength]>i[l]?a.strength:l,"unknown")}function ke(e){let i=new Map;for(let l of e){let s=l.anchor.alternatives[0]?.symbol??`${l.anchor.callsite.file}:${l.anchor.callsite.line}:${l.anchor.callsite.calleeLeaf}`,m=i.get(s);(!m||Re(l,m)<0)&&i.set(s,l)}return[...i.values()]}function Re(e,i){return J(e.anchor.status)-J(i.anchor.status)||e.anchor.alternativeCount-i.anchor.alternativeCount||xe(e,i)}function J(e){return{exact:0,derived:1,mixed:2,candidate:3,unknown:4,ambiguous:5}[e]}function Q(e){let i=new Map;for(let l of e)i.set(l.symbol??`${l.file}:${l.line}`,l);return[...i.values()].sort((l,a)=>l.file.localeCompare(a.file)||l.line-a.line||l.label.localeCompare(a.label))}function ve(e){return`--at ${Te(`${e.file}:${e.line+1}`)}`}function Me(e,i){let l=[];for(let a=0;a<e.length;a+=i)l.push(e.slice(a,a+i));return l}function Te(e){return`'${e.replaceAll("'","'\\''")}'`}function K(e,i,l){return`${e}\0${i}\0${l}`}function R(e,i,l){return["next-anchor",e,String(i),l].map(encodeURIComponent).join(":")}export{qe as a,Ue as b,ze as c};
3
- //# sourceMappingURL=chunk-MVB3DAEY.js.map
3
+ //# sourceMappingURL=chunk-PARCKE3Q.js.map
@@ -1,7 +1,7 @@
1
- import{a as A}from"./chunk-BJ6SQAEN.js";import{a as T,b,c as W}from"./chunk-SELM5MER.js";import{a as R}from"./chunk-DGXRDLV5.js";import{a as N}from"./chunk-B75HZHUP.js";import{b as C,c as j}from"./chunk-7FND7D7N.js";import{a as _}from"./chunk-BGBBVSH4.js";import{b as E}from"./chunk-CVYSU6BX.js";import{A as P,d,e as w,k}from"./chunk-FETNQCFO.js";import{i as L}from"./chunk-O6QTXQPJ.js";import{d as x}from"./chunk-3LCDIREB.js";import{basename as m,extname as I}from"path";function ce(t,n){let{scope:e,maxLoc:i=15,limit:r=30,scanLimit:o}=n??{},a=new j(t),l=K(a.fileDependencyGraph(e));return R({candidates:()=>z(t,a,e,i),orderCandidates:N,scanLimit:o,profile:{name:"wrapper-candidates"},prepare:c=>({...J(t,a,c,{semantic:n?.semantic!==!1}),reverseFanIn:l}),evaluate:(c,u)=>q(t,a,c,u),orderResults:(c,u)=>u.callerFanIn-c.callerFanIn||u.loc-c.loc,limit:r})}function J(t,n,e,i){let r=T(t,n),o=b(r.forDefinitions(e,{semantic:!1,sourceFallback:!1})),a=[];i.semantic&&x("wrapper.semantic-candidates",()=>{a=e.filter(s=>y(t,n,s,o).length<=1)},()=>({symbols:e.length,semanticCandidates:a.length}));let l=r.forDefinitions(a,{semantic:!0,sourceFallback:!1}),c=b(l),u=new Set([...l.values()].filter(s=>s.semanticIncomplete).map(s=>s.definition.symbolId)),f=new Set([...l.values()].filter(s=>s.semanticUnavailable).map(s=>s.definition.symbolId)),g=c.size===0?o:C(o,c),h=new Map(e.map(s=>[s.symbolId,s])),S=new Map;for(let s of e){let F=y(t,n,s,g);if(F.length>1||(S.set(s.symbolId,s),F.length!==1))continue;let D=F[0],v=O(t,s.symbolId,D);if(!v)continue;let p=B(n,t,D,s.symbol,v);p?.isFunctionLike&&h.has(p.symbolId)&&S.set(p.symbolId,h.get(p.symbolId))}let M=[...S.values()];return{callerFileMap:M.length===0?g:C(g,b(r.forDefinitions(M,{semantic:!1,sourceFallback:!0}))),incompleteSymbolIds:u,unavailableSymbolIds:f}}function q(t,n,e,i){if(i.incompleteSymbolIds.has(e.symbolId)||i.unavailableSymbolIds.has(e.symbolId))return null;let r=y(t,n,e,i.callerFileMap);if(r.length!==1)return null;let o=r[0],a=O(t,e.symbolId,o);if(!a)return null;let l=B(n,t,o,e.symbol,a);if(l&&k(l.symbol))return null;let{fanIn:c,source:u}=G(i.callerFileMap,i.reverseFanIn,o,l);if(u==="function"?c<=3:c<=5)return null;let f=Q(t,e,o,l);return{symbol:e.symbol,shortName:d(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:_(e),singleCaller:l?.symbol??"",singleCallerShort:l?.isFunctionLike?d(l.symbol):m(o),callerFanIn:c,actionTier:f.length>0?"signal":"direct",boundaryEvidence:f}}function z(t,n,e,i){return n.productionCallableDefinitions({scope:e,minLoc:2,maxLoc:i,requireFunctionLikeSymbol:!0,excludeRootedSymbols:!0,excludeRustTraitImplMembers:!0}).filter(r=>!L(t,r))}function y(t,n,e,i){let r=m(e.relativePath,I(e.relativePath)),o=[...i.get(e.symbolId)??[]].filter(a=>a!==e.relativePath).filter(a=>m(a,I(a))!==r).filter(a=>{let l=n.fileKind(a);return l!=="barrel"&&l!=="entry"&&l!=="test"});return W(t,e,o).realConsumers}function O(t,n,e){return t.get(`SELECT c.start_line, c.end_line
1
+ import{a as A}from"./chunk-JXHLB7TP.js";import{a as T,b,c as W}from"./chunk-NIO346UL.js";import{a as R}from"./chunk-DGXRDLV5.js";import{a as N}from"./chunk-B75HZHUP.js";import{b as C,c as j}from"./chunk-NK76RSB6.js";import{a as _}from"./chunk-BGBBVSH4.js";import{b as E}from"./chunk-BH5CE4LN.js";import{A as P,d,e as w,k}from"./chunk-AM5SUGHF.js";import{i as L}from"./chunk-JOALNFY3.js";import{d as x}from"./chunk-3LCDIREB.js";import{basename as m,extname as I}from"path";function ce(t,n){let{scope:e,maxLoc:i=15,limit:r=30,scanLimit:o}=n??{},a=new j(t),l=K(a.fileDependencyGraph(e));return R({candidates:()=>z(t,a,e,i),orderCandidates:N,scanLimit:o,profile:{name:"wrapper-candidates"},prepare:c=>({...J(t,a,c,{semantic:n?.semantic!==!1}),reverseFanIn:l}),evaluate:(c,u)=>q(t,a,c,u),orderResults:(c,u)=>u.callerFanIn-c.callerFanIn||u.loc-c.loc,limit:r})}function J(t,n,e,i){let r=T(t,n),o=b(r.forDefinitions(e,{semantic:!1,sourceFallback:!1})),a=[];i.semantic&&x("wrapper.semantic-candidates",()=>{a=e.filter(s=>y(t,n,s,o).length<=1)},()=>({symbols:e.length,semanticCandidates:a.length}));let l=r.forDefinitions(a,{semantic:!0,sourceFallback:!1}),c=b(l),u=new Set([...l.values()].filter(s=>s.semanticIncomplete).map(s=>s.definition.symbolId)),f=new Set([...l.values()].filter(s=>s.semanticUnavailable).map(s=>s.definition.symbolId)),g=c.size===0?o:C(o,c),h=new Map(e.map(s=>[s.symbolId,s])),S=new Map;for(let s of e){let F=y(t,n,s,g);if(F.length>1||(S.set(s.symbolId,s),F.length!==1))continue;let D=F[0],v=O(t,s.symbolId,D);if(!v)continue;let p=B(n,t,D,s.symbol,v);p?.isFunctionLike&&h.has(p.symbolId)&&S.set(p.symbolId,h.get(p.symbolId))}let M=[...S.values()];return{callerFileMap:M.length===0?g:C(g,b(r.forDefinitions(M,{semantic:!1,sourceFallback:!0}))),incompleteSymbolIds:u,unavailableSymbolIds:f}}function q(t,n,e,i){if(i.incompleteSymbolIds.has(e.symbolId)||i.unavailableSymbolIds.has(e.symbolId))return null;let r=y(t,n,e,i.callerFileMap);if(r.length!==1)return null;let o=r[0],a=O(t,e.symbolId,o);if(!a)return null;let l=B(n,t,o,e.symbol,a);if(l&&k(l.symbol))return null;let{fanIn:c,source:u}=G(i.callerFileMap,i.reverseFanIn,o,l);if(u==="function"?c<=3:c<=5)return null;let f=Q(t,e,o,l);return{symbol:e.symbol,shortName:d(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:_(e),singleCaller:l?.symbol??"",singleCallerShort:l?.isFunctionLike?d(l.symbol):m(o),callerFanIn:c,actionTier:f.length>0?"signal":"direct",boundaryEvidence:f}}function z(t,n,e,i){return n.productionCallableDefinitions({scope:e,minLoc:2,maxLoc:i,requireFunctionLikeSymbol:!0,excludeRootedSymbols:!0,excludeRustTraitImplMembers:!0}).filter(r=>!L(t,r))}function y(t,n,e,i){let r=m(e.relativePath,I(e.relativePath)),o=[...i.get(e.symbolId)??[]].filter(a=>a!==e.relativePath).filter(a=>m(a,I(a))!==r).filter(a=>{let l=n.fileKind(a);return l!=="barrel"&&l!=="entry"&&l!=="test"});return W(t,e,o).realConsumers}function O(t,n,e){return t.get(`SELECT c.start_line, c.end_line
2
2
  FROM mentions m
3
3
  JOIN chunks c ON m.chunk_id = c.id
4
4
  JOIN documents d ON c.document_id = d.id
5
5
  WHERE m.symbol_id = ? AND m.role != 1 AND d.relative_path = ?
6
6
  LIMIT 1`,n,e)}function B(t,n,e,i,r){let o=t.definitionsForFile(e),a=H(n,e,i,r.start_line,r.end_line);return P(o,a)}function G(t,n,e,i){if(i?.isFunctionLike){let r=[...t.get(i.symbolId)??[]].filter(o=>o!==i.relativePath);if(r.length>0)return{fanIn:r.length,source:"function"}}return{fanIn:U(n,e),source:"file"}}function H(t,n,e,i,r){let o=w(e);if(!o)return i;let a=E(t,n).get(o);if(!a||a.length===0)return i;for(let l of a)if(l>=i&&l<=r)return l;return i}function K(t){let n=new Map;for(let[e,i]of t){n.has(e)||n.set(e,n.get(e)??0);for(let r of i)n.set(r,(n.get(r)??0)+1)}return n}function U(t,n){let e=t.get(n)??0;if(e>0)return e;let i=m(n,I(n)),r=0;for(let[o,a]of t)o!==n&&m(o,I(o))===i&&a>r&&(r=a);return r}function Q(t,n,e,i){return A(t,n.relativePath,n.startLine,"wrapper","explicit ignore-wrapper comment",[{label:"wrapper name",value:d(n.symbol)},{label:"caller name",value:i?.symbol?d(i.symbol):m(e)},{label:"wrapper path",value:n.relativePath},{label:"caller path",value:e}])}export{ce as a};
7
- //# sourceMappingURL=chunk-CAUCPUOF.js.map
7
+ //# sourceMappingURL=chunk-PFPHS4NO.js.map
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env node
2
+ import{a as he,c as z}from"./chunk-N3Q3AWGW.js";import{b as le}from"./chunk-XZEE23VG.js";import{O as P,X as v}from"./chunk-G2XUZCF2.js";import{j as de,r as b,w as pe,x as ge,y as D}from"./chunk-DUKHVPU5.js";import{AsyncLocalStorage as nt}from"async_hooks";import{createHash as V}from"crypto";import{existsSync as rt,mkdirSync as st}from"fs";import{tmpdir as it}from"os";import{isAbsolute as ot,join as ye,resolve as Se}from"path";var q=2,at="CODEBASEIQ_SESSION",me="CODEBASEIQ_SESSION_DIR",ut=128,I=new nt;function ve(e,t){let n=e.sessionEnabled===!1||e.json?void 0:It(),r={enabled:n!==void 0,reemit:e.reemit===!0,command:e.command,projectRoot:Se(e.cwd),sessionIdentity:n,staged:[],stagedEvidence:[],finalized:!1};return I.run(r,t)}function Dn(e){let t=I.getStore();!t||t.finalized||(t.generationIdentity=e)}function zn(){return I.getStore()?.staged.length??0}function qn(e){let t=I.getStore();!t||e<0||e>t.staged.length||(t.staged.length=e)}function W(e){let t=I.getStore();if(!t||t.finalized)return;t.finalized=!0;let n=t.state;if(!n){t.staged.length=0,t.stagedEvidence.length=0;return}try{if(e&&(t.staged.length>0||t.stagedEvidence.length>0)){let r=n.ledger.nextOrdinal,s=yt(t.staged).map(o=>({...o,ordinal:r,command:t.command})),i=vt(t.stagedEvidence).map(o=>({...o,ordinal:r,command:t.command}));n.ledger.ranges.push(...s),n.ledger.evidence.push(...i),n.ledger.nextOrdinal+=1,n.ledger.updatedAt=new Date().toISOString(),v(n.ledgerPath,n.ledger,{spacing:2,trailingNewline:!0})}}catch{}finally{n.lock.release(),t.state=null,t.staged.length=0,t.stagedEvidence.length=0}}function Vn(e){let t=e.source.split(`
3
+ `);if(t.length===0)return"";let n=ct(e.relativePath,e.startLine,t,e.ownerSymbol,e.sessionPolicy??"exact-unit"),r=e.indent??" ",s=e.sourceIndent??" ",i=e.focusLines??new Set;return n.map(o=>{let a=z(e.relativePath,o.startLine,o.endLine);if(o.kind==="covered"){let p=o.ordinal===null?"this command":`session #${o.ordinal} via ${o.command}`;return[`${r}${a} [source previously emitted: ${p}; not repeated]`,...e.afterHeader??[]].join(`
4
+ `)}let u=e.headerSuffix??"",d=o.lines.map((p,l)=>{let g=o.startLine+l,c=e.showFocusMarker===!1?"":i.has(g)?">":" ",m=e.lineNumberWidth??5;return`${s}${c}${String(he(g)).padStart(m)} ${p}`});return[`${r}${a}${u}`,...e.blankAfterHeader?[""]:[],...e.afterHeader??[],...d].join(`
5
+ `)}).join(`
6
+ `)}function Wn(e){let t=I.getStore();if(!t||!t.enabled)return e.content;let n=G(t);if(!n)return e.content;let r=Oe(e.content),s=R(n.ledger.evidence,i=>i.kind===e.kind&&i.identity===e.identity&&i.contentHash===r);if(s&&!t.reemit){let i=e.label?`; ${fe(e.label)}`:"";return`${e.indent??""}[${e.kind} evidence previously emitted: receipt ${s.receiptId}; session #${s.ordinal} via ${s.command}${i}; not repeated]`}return t.stagedEvidence.push({kind:e.kind,identity:e.identity,contentHash:r,receiptId:wt(e.kind,e.identity,r),...e.label?{label:fe(e.label)}:{}}),e.content}function Gn(e=!1){let t=I.getStore();if(!t?.enabled)return{enabled:!1,reason:"No explicit CODEBASEIQ_SESSION is active; source packets render independently.",uniqueLines:0,evidenceItems:0,emissions:0,rows:[]};let n=G(t);if(!n)return{enabled:!1,reason:"The exploration-session ledger was unavailable or contended; evidence output is fail-open for this command.",uniqueLines:0,evidenceItems:0,emissions:0,rows:[]};if(e){n.ledger.ranges=[],n.ledger.evidence=[],n.ledger.nextOrdinal=1,n.ledger.updatedAt=new Date().toISOString();try{v(n.ledgerPath,n.ledger,{spacing:2,trailingNewline:!0})}catch{return{enabled:!1,reason:"The exploration-session ledger could not be reset; evidence output remains fail-open.",uniqueLines:0,evidenceItems:0,emissions:0,rows:[]}}}let r=new Map;for(let a of n.ledger.ranges){let u=r.get(a.ordinal)??[];u.push(a),r.set(a.ordinal,u)}let s=new Map;for(let a of n.ledger.evidence){let u=s.get(a.ordinal)??[];u.push(a),s.set(a.ordinal,u)}let o=[...new Set([...r.keys(),...s.keys()])].sort((a,u)=>a-u).map(a=>{let u=r.get(a)??[],d=s.get(a)??[],p=u[0]?.command??d[0]?.command??"unknown",l=u.length===0?null:(()=>{let m=u.slice(0,8).map(h=>z(h.relativePath,h.startLine,h.endLine)).join(", "),f=u.length>8?`, ... ${u.length-8} more range(s)`:"";return` #${a} ${p}: ${m}${f}`})();if(d.length===0)return l;let g=d.slice(0,8).map(m=>`${m.receiptId} ${m.kind}${m.label?` ${m.label}`:""}`).join(", "),c=d.length>8?`, ... ${d.length-8} more item(s)`:"";return l?`${l}
7
+ evidence: ${g}${c}`:` #${a} ${p}: ${g}${c}`});return{enabled:!0,uniqueLines:Ot(n.ledger.ranges),evidenceItems:n.ledger.evidence.length,emissions:new Set([...r.keys(),...s.keys()]).size,rows:o}}function ct(e,t,n,r,s){let i=I.getStore(),o=t+n.length-1;if(!i)return[{kind:"source",startLine:t,endLine:o,lines:[...n]}];let u=(i.enabled?G(i):null)?.ledger.ranges??[],d=n.map(Oe),p=s==="exact-unit"&&!i.reemit?R(u,h=>h.policy==="exact-unit"&&h.relativePath===e&&h.startLine===t&&h.endLine===o&&h.ownerSymbol===r&&Et(h.lineHashes,d)):void 0;if(p)return[{kind:"covered",startLine:t,endLine:o,ordinal:p.ordinal,command:p.command}];let l=s==="exact-unit"&&!i.reemit?pt(u,e,t,o,d):void 0;if(l)return[{kind:"covered",startLine:t,endLine:o,ordinal:l.ordinal,command:l.command}];let g=n.map((h,y)=>dt(u,e,t+y,d[y]));if(!(s==="preview"&&!i.reemit&&g.every(h=>h!==void 0)))return i.staged.push({relativePath:e,startLine:t,endLine:o,ownerSymbol:r,policy:s,lineHashes:d}),[{kind:"source",startLine:t,endLine:o,lines:[...n]}];let m=[],f=0;for(;f<n.length;){let h=g[f],y=f;for(;y+1<n.length&&gt(h,g[y+1]);)y+=1;let S=t+f,N=t+y;m.push({kind:"covered",startLine:S,endLine:N,ordinal:h.ordinal,command:h.command}),f=y+1}return m}function dt(e,t,n,r){let s=R(e,i=>i.relativePath===t&&i.startLine<=n&&n<=i.endLine&&i.lineHashes[n-i.startLine]===r);if(s)return{ordinal:s.ordinal,command:s.command}}function pt(e,t,n,r,s){let i=R(e,o=>o.policy==="exact-unit"&&o.relativePath===t&&o.startLine<=n&&o.endLine>=r&&s.every((a,u)=>o.lineHashes[n-o.startLine+u]===a));return i?{ordinal:i.ordinal,command:i.command}:void 0}function gt(e,t){return!e||!t?e===t:e.ordinal===t.ordinal&&e.command===t.command}function G(e){if(e.state!==void 0)return e.state;if(!e.sessionIdentity||!e.generationIdentity)return e.state=null,null;try{let t=bt();st(t,{recursive:!0,mode:448});let n=V("sha256").update(e.projectRoot).update("\0").update(e.generationIdentity).update("\0").update(e.sessionIdentity).digest("hex"),r=ye(t,`${n}.json`),s=P(`${r}.lock`,{kind:"source-emission-session",detail:{session:n.slice(0,12)}});if(s.kind!=="acquired")return e.state=null,null;let i;try{i=rt(r)?ht(JSON.parse(b(r,"source emission session ledger")),{projectRoot:e.projectRoot,generationIdentity:e.generationIdentity,sessionIdentity:e.sessionIdentity}):lt(e)}catch{return s.lock.release(),e.state=null,null}return e.state={ledgerPath:r,lock:s.lock,ledger:i},e.state}catch{return e.state=null,null}}function lt(e){return{version:q,projectRoot:e.projectRoot,generationIdentity:e.generationIdentity,sessionIdentity:e.sessionIdentity,nextOrdinal:1,updatedAt:new Date().toISOString(),ranges:[],evidence:[]}}function ht(e,t){if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Invalid source emission ledger.");let n=e;if(e.version===1&&n.projectRoot===t.projectRoot&&n.generationIdentity===t.generationIdentity&&n.sessionIdentity===t.sessionIdentity&&Number.isSafeInteger(n.nextOrdinal)&&(n.nextOrdinal??0)>0)return{version:q,projectRoot:t.projectRoot,generationIdentity:t.generationIdentity,sessionIdentity:t.sessionIdentity,nextOrdinal:n.nextOrdinal,updatedAt:typeof n.updatedAt=="string"?n.updatedAt:new Date().toISOString(),ranges:[],evidence:[]};if(n.version!==q||n.projectRoot!==t.projectRoot||n.generationIdentity!==t.generationIdentity||n.sessionIdentity!==t.sessionIdentity||!Number.isSafeInteger(n.nextOrdinal)||(n.nextOrdinal??0)<=0||!Array.isArray(n.ranges)||!n.ranges.every(mt)||!Array.isArray(n.evidence)||!n.evidence.every(ft))throw new Error("Invalid source emission ledger.");return n}function mt(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;let t=e;return typeof t.relativePath=="string"&&t.relativePath!==""&&Number.isSafeInteger(t.startLine)&&(t.startLine??-1)>=0&&Number.isSafeInteger(t.endLine)&&(t.endLine??-1)>=(t.startLine??0)&&Number.isSafeInteger(t.ordinal)&&(t.ordinal??0)>0&&typeof t.command=="string"&&t.command!==""&&(t.policy==="exact-unit"||t.policy==="preview")&&Array.isArray(t.lineHashes)&&t.lineHashes.length===(t.endLine??0)-(t.startLine??0)+1&&t.lineHashes.every(be)&&(t.ownerSymbol===void 0||typeof t.ownerSymbol=="string")}function ft(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;let t=e;return(t.kind==="unit"||t.kind==="edge")&&typeof t.identity=="string"&&t.identity!==""&&typeof t.contentHash=="string"&&be(t.contentHash)&&typeof t.receiptId=="string"&&/^ev-[0-9a-f]{12}$/u.test(t.receiptId)&&Number.isSafeInteger(t.ordinal)&&(t.ordinal??0)>0&&typeof t.command=="string"&&t.command!==""&&(t.label===void 0||typeof t.label=="string")}function yt(e){let t=[...e].sort((r,s)=>r.relativePath.localeCompare(s.relativePath)||r.startLine-s.startLine||r.endLine-s.endLine),n=[];for(let r of t){let s=n[n.length-1];if(s&&s.relativePath===r.relativePath&&s.ownerSymbol===r.ownerSymbol&&s.policy===r.policy&&r.startLine<=s.endLine+1&&St(s,r)){let i=r.startLine-s.startLine;for(let o=0;o<r.lineHashes.length;o+=1)s.lineHashes[i+o]??=r.lineHashes[o];s.endLine=Math.max(s.endLine,r.endLine)}else n.push({...r,lineHashes:[...r.lineHashes]})}return n}function St(e,t){let n=Math.max(e.startLine,t.startLine),r=Math.min(e.endLine,t.endLine);for(let s=n;s<=r;s+=1)if(e.lineHashes[s-e.startLine]!==t.lineHashes[s-t.startLine])return!1;return!0}function vt(e){let t=new Set,n=[];for(let r of e){let s=`${r.kind}\0${r.identity}\0${r.contentHash}`;t.has(s)||(t.add(s),n.push(r))}return n}function Ot(e){let t=new Map;for(let r of e){let s=t.get(r.relativePath)??[];s.push(r),t.set(r.relativePath,s)}let n=0;for(let r of t.values()){r.sort((o,a)=>o.startLine-a.startLine||o.endLine-a.endLine);let s=-1,i=-1;for(let o of r)s<0?(s=o.startLine,i=o.endLine):o.startLine<=i+1?i=Math.max(i,o.endLine):(n+=i-s+1,s=o.startLine,i=o.endLine);s>=0&&(n+=i-s+1)}return n}function bt(){let e=process.env[me];if(!e)return ye(it(),`codebaseiq-source-sessions-${process.getuid?.()??"user"}`);if(!ot(e))throw new Error(`${me} must be an absolute path.`);return Se(e)}function It(){let e=process.env[at]?.trim();if(e&&!(e.length>ut||!/^[A-Za-z0-9._:-]+$/.test(e)))return`explicit:${e}`}function wt(e,t,n){return`ev-${V("sha256").update(e).update("\0").update(t).update("\0").update(n).digest("hex").slice(0,12)}`}function fe(e){let t=e.replace(/[\r\n\t]+/gu," ").replace(/\s+/gu," ").trim();return t.length<=160?t:`${t.slice(0,157)}...`}function Oe(e){return V("sha256").update(e).digest("hex")}function Et(e,t){return e.length===t.length&&e.every((n,r)=>n===t[r])}function R(e,t){for(let n=e.length-1;n>=0;n-=1){let r=e[n];if(t(r))return r}}function be(e){return typeof e=="string"&&/^[0-9a-f]{64}$/u.test(e)}import{createHash as Ct}from"crypto";import{existsSync as Q,mkdirSync as Pt,rmSync as xt}from"fs";import{tmpdir as At}from"os";import{isAbsolute as Nt,join as we,resolve as T}from"path";var Ee=1,Lt="CODEBASEIQ_SESSION",Ie="CODEBASEIQ_SESSION_DIR",_t=128,Ce=8,Pe=32768,k=new Map;function tr(e,t,n=!0){if(!n)return;let r=$();if(!r)return;let s=Y(e),i=t.map(a=>a.trim()).filter(a=>a.startsWith("codebaseiq system-map ")&&a.length<=Pe).slice(0,Ce),o=xe(s,r);i.length===0?k.delete(o):k.set(o,i)}function J(e,t,n,r=!0,s){if(!r||e!=="anchors"&&e!=="system-map")return;let i=$();if(!i)return;let o=Y(t),a=K(o,i);if(e==="system-map"){n?xt(a,{force:!0}):Q(a)&&s&&F(a,()=>{let u=Z(a,o,i);u&&v(a,{...u,pendingMapContinuation:s,mapExecution:void 0,updatedAt:new Date().toISOString()},{spacing:2,trailingNewline:!0})});return}F(a,()=>{let u=Rt(o,i),d={version:Ee,projectRoot:o,sessionIdentity:i,mapRequired:!0,...u.length>0?{recommendedMapCommands:u}:{},updatedAt:new Date().toISOString()};v(a,d,{spacing:2,trailingNewline:!0})})}function X(e,t=!0){if(!t)return;let n=$();if(!n)return;let r=Y(e),s=K(r,n);Q(s)&&F(s,()=>{let i=Z(s,r,n);if(i){if(i.pendingMapContinuation)throw new Error(["MAP TRANSPORT INCOMPLETE","The selected system map has already been computed. Restarting it would repeat the same repository work.",`Continue exactly: ${i.pendingMapContinuation}`].join(`
8
+ `));if(i.mapExecution&&Tt(i.mapExecution.processId))throw new Error(["NAVIGATION MAP ALREADY RUNNING","A selected system map is already computing in this CODEBASEIQ_SESSION.","Poll the existing terminal execution. Do not launch a duplicate map or inspect in parallel."].join(`
9
+ `));v(s,{...i,mapExecution:{processId:process.pid,startedAt:new Date().toISOString()},updatedAt:new Date().toISOString()},{spacing:2,trailingNewline:!0})}})}function nr(e,t,n=!0){if(!n)return;let r=$();if(!r)return;let s=K(T(e),r);if(!Q(s))return;let i=Z(s,T(e),r);if(!i?.mapRequired)return;let o=i.recommendedMapCommands?.length?["This refusal is a recoverable protocol step, not evidence that the requested code cannot be explored.","Run exactly one of the ranked map commands below, then finish every emitted continuation:",...i.recommendedMapCommands.map((a,u)=>` [${u+1}] ${a}`)]:[`Do not retry ${t}. Run one printed next-abstraction system-map command and finish every emitted continuation first.`];throw new Error(["NAVIGATION MAP REQUIRED","An anchors locator completed in this CODEBASEIQ_SESSION, but its selected system map has not reached transport completion.",`Do not retry ${t}.`,...o,"The map must complete before the agent can choose source detail; map and detail exploration cannot run concurrently."].join(`
10
+ `))}function Z(e,t,n){try{let r=JSON.parse(b(e,"navigation session state"));return r.version===Ee&&r.projectRoot===t&&r.sessionIdentity===n&&r.mapRequired===!0&&(r.recommendedMapCommands===void 0||Array.isArray(r.recommendedMapCommands)&&r.recommendedMapCommands.length<=Ce&&r.recommendedMapCommands.every(s=>typeof s=="string"&&s.startsWith("codebaseiq system-map ")&&s.length<=Pe))&&(r.pendingMapContinuation===void 0||typeof r.pendingMapContinuation=="string")&&(r.mapExecution===void 0||typeof r.mapExecution=="object"&&r.mapExecution!==null&&Number.isSafeInteger(r.mapExecution.processId)&&typeof r.mapExecution.startedAt=="string")?r:null}catch{return null}}function Rt(e,t){let n=xe(e,t),r=k.get(n)??[];return k.delete(n),r}function xe(e,t){return`${e}\0${t}`}function Tt(e){try{return process.kill(e,0),!0}catch(t){return t.code==="EPERM"}}function K(e,t){let n=kt();Pt(n,{recursive:!0,mode:448});let r=Ct("sha256").update(e).update("\0").update(t).digest("hex");return we(n,`navigation-${r}.json`)}function kt(){let e=process.env[Ie];if(!e)return we(At(),`codebaseiq-source-sessions-${process.getuid?.()??"user"}`);if(!Nt(e))throw new Error(`${Ie} must be an absolute path.`);return T(e)}function Y(e){let t=process.env.CODEBASEIQ_PROJECT_ROOT?.trim();return T(t||e)}function $(){let e=process.env[Lt]?.trim();if(e&&!(e.length>_t||!/^[A-Za-z0-9._:-]+$/u.test(e)))return`explicit:${e}`}function F(e,t){let n=P(`${e}.lock`,{kind:"navigation-session",detail:{state:e.slice(-17,-5)}});if(n.kind!=="acquired")throw new Error("Navigation session state is busy. Retry the completed command.");try{t()}finally{n.lock.release()}}import{createHash as H,randomBytes as Mt}from"crypto";import{chmodSync as Ht,closeSync as te,fstatSync as Ne,lstatSync as Ut,mkdirSync as Bt,openSync as Te,readSync as jt,readdirSync as ke,renameSync as Dt,rmSync as $e,statSync as zt,writeSync as qt}from"fs";import{tmpdir as Vt}from"os";import{join as _}from"path";import{StringDecoder as Me}from"string_decoder";import{InvalidArgumentError as Le}from"commander";var $t=/^[A-Za-z0-9_@%+=:,./-]+$/u;function Ae(e,t={}){return t.omitSafeQuotes&&$t.test(e)?e:(t.platform??process.platform)==="win32"?`"${e.replaceAll("%","%%").replaceAll('"','\\"')}"`:`'${e.replaceAll("'",`'"'"'`)}'`}var Wt="codebaseiq-output-page",Gt=1,Ft="continue",M=32e3,x=256,A=1e5,U=4096,ne=32e6,Qt=64*1024*1024,Jt=256*1024*1024,Xt=32,re=32768,He=3600*1e3,Ue=3;function Be(){return _(Vt(),`codebaseiq-output-pages-${typeof process.getuid=="function"?process.getuid():"user"}`)}var ae=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,je=/^[A-Za-z0-9_][A-Za-z0-9_-]{11}$/u,Zt=/^4\.([A-Za-z0-9_-]{22})\.([0-9a-z]{1,10})$/u,Kt=/^([A-Za-z0-9_][A-Za-z0-9_-]{11})(?:\.([0-9a-z]{1,10}))?$/u,De=1,Yt="quota.lock",en=2e3,tn=5,_e=1024*1024,nn=new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)),ee,rn=Object.freeze({maxSnapshotBytes:Qt,maxAggregateBytes:Jt,maxSnapshotCount:Xt});var ze={writeStdout:e=>{process.stdout.write(e)},writeStderr:e=>{process.stderr.write(e)}};async function sn(e,t,n=ze){return ve({command:e.command,cwd:e.cwd,argv:e.argv,json:e.json,sessionEnabled:e.sourceSession,reemit:e.reemitSource},async()=>{try{await on(e,t,n)}finally{W(!1)}})}async function on(e,t,n){let r=e.pageSize??M,s=e.snapshotRoot??Be(),i=hn(e.snapshotLimits),o=e.maxOutputCharacters??ne;if(!Number.isSafeInteger(o)||o<=0)throw new Error("Output character safety limit must be a positive integer.");let a=Math.min(o,ne);if(qe(r),e.cursor!==void 0&&e.cursor.length>U)throw new Error(`Output cursor exceeds the ${U}-character limit. Run the command again without --output-cursor.`);if(e.json&&e.pageSize===void 0&&e.cursor===void 0){e.command==="system-map"&&X(e.cwd,e.sourceSession!==!1),await an(e,t,n);return}let u=Ze(e.argv),d=Ye(e.invocationPrefix),p=Xe(e.command,e.cwd,d,u),l=e.cursor===void 0?void 0:Cn(e.cursor,p);e.command==="system-map"&&!l&&X(e.cwd,e.sourceSession!==!1);let g=l?.snapshotId,c;if(l)try{c=dn(l,p,r,a,s,e.onSnapshotRead)}catch(S){let N=S instanceof Error?S.message:String(S);throw new Error(`${N} Restart with: ${Ke(d,u,r)}`,{cause:S})}else{let S=new ie(p,d,e.command,e.cwd,u,r,a,s,i,!e.json),N=un(j=>S.write(j)),ce=!1;try{await t(),ce=!0}finally{N(),ce||S.abort()}let C;try{C=S.complete()}catch(j){throw S.abort(),j}g=C.snapshotId,c={content:C.content,offset:0,pageIndex:0,pageCount:C.pageCount,totalCharacters:C.totalCharacters,outputHash:C.outputHash}}let m=c.offset+c.content.length,f=c.pageIndex+1>=c.pageCount,h=f?void 0:wn({invocationPrefix:d,nextPageIndex:c.pageIndex+1,snapshotId:On(g)});if(J(e.command,e.cwd,f,e.sourceSession!==!1,h?.command),c.offset===0&&f&&e.cursor===void 0){n.writeStdout(c.content),W(!0),g&&E(g,s);return}let y={kind:Wt,schemaVersion:Gt,producer:{name:"codebaseiq",version:e.producerVersion},command:e.command,contentType:e.json?"application/json":"text/plain",agentInstruction:h?"INCOMPLETE EVIDENCE: do not draw conclusions or report completion from this partial page. Run page.continuation.command exactly, then repeat until page.complete is true.":"OUTPUT COMPLETE: all rendered characters have been retrieved. Evaluate the command result's own coverage separately.",page:h?{offset:c.offset,returnedCharacters:c.content.length,totalCharacters:c.totalCharacters,omittedCharacters:c.totalCharacters-c.content.length,remainingCharacters:c.totalCharacters-m,complete:!1,outputHash:c.outputHash,continuation:h}:{offset:c.offset,returnedCharacters:c.content.length,totalCharacters:c.totalCharacters,omittedCharacters:c.totalCharacters-c.content.length,remainingCharacters:c.totalCharacters-m,complete:!0,outputHash:c.outputHash},content:c.content};if(e.json){n.writeStdout(`${JSON.stringify(y)}
11
+ `),f&&g&&E(g,s);return}n.writeStdout(_n(y)),f&&g&&E(g,s)}async function Or(e,t,n=Be(),r=ze){if(e.length>U)throw new Error(`Output cursor exceeds the ${U}-character limit.`);let s=Je(e);if(!s)throw new Error("Invalid output cursor. Run the original command again.");let i=We(s.snapshotId,n);await sn({command:i.command,producerVersion:t,invocationPrefix:i.invocationPrefix,argv:[...i.argv,"--output-page-size",String(i.pageSize),"--output-cursor",e],cwd:i.cwd,json:i.argv.some(o=>o==="--json"||o.startsWith("--json=")),sourceSession:!i.argv.some(o=>o==="--no-session"),pageSize:i.pageSize,cursor:e,snapshotRoot:n},()=>{throw new Error("Output continuation attempted to rerun the original command.")},r)}function br(e){if(!/^\d+$/u.test(e))throw new Le(`Output page size must be an integer from ${x} through ${A}.`);let t=Number(e);try{qe(t)}catch{throw new Le(`Output page size must be an integer from ${x} through ${A}.`)}return t}function qe(e){if(!Number.isSafeInteger(e)||e<x||e>A)throw new Error(`Output page size must be an integer from ${x} through ${A}.`)}async function an(e,t,n){let r=new se(M,e.maxOutputCharacters??ne),s=process.stdout.write,i=!1,o=`${le(`codebaseiq: JSON output exceeds ${M} characters and may be truncated by the client. Do not use possibly partial client output as evidence. Read every page with: ${Ke(Ye(e.invocationPrefix),Ze(e.argv),M)}`)}
12
+ `;process.stdout.write=((a,u,d)=>{let p=r.push(a,u);return p!==void 0&&(i||(i=!0,n.writeStderr(o)),s.call(process.stdout,p)),Ve(u,d),!0});try{await t();let a=r.finish();a.crossedPageBoundary&&!i&&(i=!0,n.writeStderr(o)),a.bytes.length>0&&s.call(process.stdout,a.bytes),i&&n.writeStderr(o),J(e.command,e.cwd,!0,e.sourceSession!==!1)}finally{process.stdout.write=s}}function un(e){let t=process.stdout.write;return process.stdout.write=((n,r,s)=>{let i=cn(n,r);return e(i),Ve(r,s),!0}),()=>{process.stdout.write=t}}function cn(e,t){return typeof e=="string"?Buffer.from(e,typeof t=="string"?t:"utf8"):Buffer.from(e)}function Ve(e,t){let n=typeof e=="function"?e:t;typeof n=="function"&&n()}var se=class{constructor(t,n){this.limit=t;this.maxOutputCharacters=n}limit;maxOutputCharacters;decoder=new Me("utf8");chunks=[];overflowed=!1;totalCharacters=0;push(t,n){let r=typeof t=="string"?Buffer.from(t,typeof n=="string"?n:"utf8"):Buffer.from(t);if(this.addCharacters(this.decoder.write(r)),this.overflowed)return r;if(this.chunks.push(r),this.totalCharacters<=this.limit)return;this.overflowed=!0;let s=Buffer.concat(this.chunks);return this.chunks.length=0,s}finish(){this.addCharacters(this.decoder.end());let t=this.totalCharacters>this.limit,n=Buffer.concat(this.chunks);return this.chunks.length=0,{bytes:n,crossedPageBoundary:t}}addCharacters(t){if(this.totalCharacters+=t.length,!Number.isSafeInteger(this.totalCharacters)||this.totalCharacters>this.maxOutputCharacters)throw new Error(`Command output exceeds the ${this.maxOutputCharacters}-character safety limit. Narrow the query before retrying.`)}},ie=class{constructor(t,n,r,s,i,o,a,u,d,p){this.invocationHash=t;this.invocationPrefix=n;this.command=r;this.cwd=s;this.argv=i;this.pageSize=o;this.maxOutputCharacters=a;this.snapshotRoot=u;this.limits=d;this.preferLineBoundaries=p;ue(u);do this.snapshotId=Mt(9).toString("base64url");while(this.snapshotId.startsWith("-"));this.temporaryPath=O(u,this.snapshotId,"tmp")}invocationHash;invocationPrefix;command;cwd;argv;pageSize;maxOutputCharacters;snapshotRoot;limits;preferLineBoundaries;snapshotId;temporaryPath;decoder=new Me("utf8");hash=H("sha256");pages=[];descriptor=null;pending="";firstPageContent="";totalCharacters=0;pageCharacterOffset=0;byteLength=0;reservedBytes=0;opened=!1;finished=!1;write(t){if(this.finished)throw new Error("Output snapshot writer is closed.");this.appendDecoded(this.decoder.write(t))}complete(){if(this.finished)throw new Error("Output snapshot writer is closed.");if(this.appendDecoded(this.decoder.end()),this.finished=!0,!this.opened){let s=this.pending,i=Buffer.from(s);return this.assertWithinByteLimit(i.length),this.hash.update(i),this.pending="",{content:s,totalCharacters:this.totalCharacters,outputHash:this.hash.digest("hex"),pageCount:1}}if((this.pending.length>0||this.pages.length===0)&&(this.flushPage(this.pending),this.pending=""),this.descriptor===null)throw new Error("Output snapshot writer is not open.");te(this.descriptor),this.descriptor=null;let t=this.hash.digest("hex"),n=O(this.snapshotRoot,this.snapshotId,"output"),r=O(this.snapshotRoot,this.snapshotId,"json");try{Dt(this.temporaryPath,n);let s={version:Ue,snapshotId:this.snapshotId,invocationHash:this.invocationHash,invocationPrefix:[...this.invocationPrefix],command:this.command,cwd:this.cwd,argv:[...this.argv],outputHash:t,pageSize:this.pageSize,pages:this.pages,totalCharacters:this.totalCharacters,byteLength:this.byteLength,createdAtMs:Date.now()};return v(r,s),Re(this.snapshotRoot,this.snapshotId,this.byteLength,"complete",this.limits),this.reservedBytes=this.byteLength,{content:this.firstPageContent,totalCharacters:this.totalCharacters,outputHash:t,pageCount:this.pages.length,snapshotId:this.snapshotId}}catch(s){throw E(this.snapshotId,this.snapshotRoot),s}}abort(){this.descriptor!==null&&(te(this.descriptor),this.descriptor=null),this.finished=!0,E(this.snapshotId,this.snapshotRoot)}appendDecoded(t){if(t.length===0)return;let n=this.totalCharacters+t.length;if(!Number.isSafeInteger(n)||n>this.maxOutputCharacters)throw new Error(`Command output exceeds the ${this.maxOutputCharacters}-character safety limit. Narrow the query before retrying.`);for(this.totalCharacters=n,this.pending+=t,this.assertWithinByteLimit(this.byteLength+Buffer.byteLength(this.pending));this.pending.length>this.pageSize;){this.open();let r=In(this.pending,this.pageSize,this.preferLineBoundaries),s=this.pending.slice(0,r);this.pending=this.pending.slice(r),this.flushPage(s)}}open(){if(!this.opened){mn(this.snapshotRoot,this.snapshotId,0,this.limits);try{this.descriptor=Te(this.temporaryPath,"wx",384),this.opened=!0}catch(t){throw fn(this.snapshotRoot,this.snapshotId),t}}}flushPage(t){if(this.descriptor===null)throw new Error("Output snapshot writer is not open.");if(this.pages.length>=re)throw new Error(`Command output requires more than ${re} snapshot pages. Retry with a larger --output-page-size or narrow the query.`);let n=Buffer.from(t),r=this.byteLength+n.length;if(this.assertWithinByteLimit(r),r>this.reservedBytes){let o=Math.min(this.limits.maxSnapshotBytes,Math.ceil(r/_e)*_e);Re(this.snapshotRoot,this.snapshotId,o,"active",this.limits),this.reservedBytes=o}let s=0;for(;s<n.length;){let o=qt(this.descriptor,n,s,n.length-s);if(o<=0)throw new Error("Output snapshot write made no progress.");s+=o}let i={characterOffset:this.pageCharacterOffset,characterLength:t.length,byteOffset:this.byteLength,byteLength:n.length,hash:H("sha256").update(n).digest("hex")};this.pages.length===0&&(this.firstPageContent=t),this.pages.push(i),this.hash.update(n),this.pageCharacterOffset+=t.length,this.byteLength=r}assertWithinByteLimit(t){if(!Number.isSafeInteger(t)||t>this.limits.maxSnapshotBytes)throw new Error(`Command output exceeds the ${this.limits.maxSnapshotBytes}-byte snapshot limit. Narrow the query before retrying.`)}};function dn(e,t,n,r,s,i){ue(s);let o=We(e.snapshotId,s);if(o.invocationHash!==t)throw new Error("This output cursor belongs to a different command, working directory, or argument set. Run again without --output-cursor.");if(o.snapshotId!==e.snapshotId||e.version===3&&(o.invocationHash!==e.invocationHash||o.outputHash!==e.outputHash))throw new Error("Output snapshot identity does not match this cursor.");if(o.pageSize!==n||e.version===3&&e.pageSize!==n)throw new Error(`Output page size changed after this cursor was issued; use ${o.pageSize}.`);let a=o.pages[e.pageIndex];if(!a)throw new Error("Output cursor points past the current result.");if(o.totalCharacters>r)throw new Error(`Output snapshot exceeds the ${r}-character safety limit.`);if(Date.now()-o.createdAtMs>He)throw E(e.snapshotId,s),new Error("Output snapshot expired before all pages were read.");let u=O(s,e.snapshotId,"output"),d=Te(u,"r");try{let p=Ne(d);if(!p.isFile()||p.size!==o.byteLength)throw new Error("Output snapshot size or type changed.");let l=Buffer.allocUnsafe(a.byteLength),g=0;for(;g<l.length;){let f=jt(d,l,g,l.length-g,a.byteOffset+g);if(f===0)break;g+=f,i?.(f)}let c=Ne(d);if(c.dev!==p.dev||c.ino!==p.ino||c.size!==p.size||g!==a.byteLength)throw new Error("Output snapshot changed while it was being read.");if(H("sha256").update(l).digest("hex")!==a.hash)throw new Error("Output snapshot page no longer matches its metadata.");let m=l.toString("utf8");if(m.length!==a.characterLength)throw new Error("Output snapshot page character count changed.");return{content:m,offset:a.characterOffset,pageIndex:e.pageIndex,pageCount:o.pages.length,totalCharacters:o.totalCharacters,outputHash:o.outputHash}}catch(p){throw E(e.snapshotId,s),p}finally{te(d)}}function We(e,t){if(!w(e))throw new Error("Output snapshot identifier is invalid.");let n;try{n=JSON.parse(b(O(t,e,"json"),"output snapshot metadata"))}catch(r){throw new Error("Output snapshot is unavailable.",{cause:r})}if(!pn(n))throw new Error("Output snapshot metadata is invalid.");return n}function pn(e){if(!e||typeof e!="object")return!1;let t=e;return t.version===Ue&&typeof t.snapshotId=="string"&&w(t.snapshotId)&&L(t.invocationHash)&&et(t.invocationPrefix)&&typeof t.command=="string"&&t.command.length>0&&t.command.length<=256&&typeof t.cwd=="string"&&t.cwd.length>0&&t.cwd.length<=8192&&Ln(t.argv)&&Xe(t.command,t.cwd,t.invocationPrefix,t.argv)===t.invocationHash&&L(t.outputHash)&&Number.isSafeInteger(t.pageSize)&&(t.pageSize??0)>=x&&(t.pageSize??0)<=A&&Array.isArray(t.pages)&&t.pages.length>1&&t.pages.length<=re&&t.pages.every(gn)&&ln(t.pages)&&Number.isSafeInteger(t.totalCharacters)&&(t.totalCharacters??-1)>=0&&t.pages.reduce((n,r)=>n+r.characterLength,0)===t.totalCharacters&&Number.isSafeInteger(t.byteLength)&&(t.byteLength??-1)>=0&&t.pages.reduce((n,r)=>n+r.byteLength,0)===t.byteLength&&Number.isSafeInteger(t.createdAtMs)&&(t.createdAtMs??-1)>=0}function gn(e){if(!e||typeof e!="object")return!1;let t=e;return Number.isSafeInteger(t.characterOffset)&&(t.characterOffset??-1)>=0&&Number.isSafeInteger(t.characterLength)&&(t.characterLength??0)>0&&Number.isSafeInteger(t.byteOffset)&&(t.byteOffset??-1)>=0&&Number.isSafeInteger(t.byteLength)&&(t.byteLength??0)>0&&L(t.hash)}function ln(e){let t=0,n=0;for(let r of e){if(r.characterOffset!==t||r.byteOffset!==n)return!1;t+=r.characterLength,n+=r.byteLength}return!0}function ue(e){Bt(e,{recursive:!0,mode:448});let t=Ut(e);if(!t.isDirectory()||t.isSymbolicLink())throw new Error(`Output snapshot root is not a private directory: ${e}`);if(typeof process.getuid=="function"&&t.uid!==process.getuid())throw new Error(`Output snapshot root is not owned by the current user: ${e}`);process.platform!=="win32"&&Ht(e,448)}function hn(e){let t={...rn,...e};for(let[n,r]of Object.entries(t))if(!Number.isSafeInteger(r)||r<=0)throw new Error(`Output snapshot ${n} must be a positive integer.`);if(t.maxSnapshotBytes>t.maxAggregateBytes)throw new Error("Output snapshot maxSnapshotBytes cannot exceed maxAggregateBytes.");return t}function mn(e,t,n,r){B(e,()=>{Sn(e),Ge(e,t,n,"active",r)})}function Re(e,t,n,r,s){if(!Number.isSafeInteger(n)||n<0||n>s.maxSnapshotBytes)throw new Error(`Command output exceeds the ${s.maxSnapshotBytes}-byte snapshot limit.`);B(e,()=>{Ge(e,t,n,r,s)})}function Ge(e,t,n,r,s){if(!Number.isSafeInteger(n)||n<0||n>s.maxSnapshotBytes)throw new Error(`Command output exceeds the ${s.maxSnapshotBytes}-byte snapshot limit.`);let i=yn(e),o=i.find(l=>l.snapshotId===t),a=i.reduce((l,g)=>l+g.reservedBytes,0)-(o?.reservedBytes??0)+n,u=i.length+(o?0:1);if(u>s.maxSnapshotCount||a>s.maxAggregateBytes)throw new Error(`Output snapshot capacity is full (${u}/${s.maxSnapshotCount} snapshots, ${a}/${s.maxAggregateBytes} bytes). Narrow the query or finish an existing pagination sequence before retrying.`);let d=Date.now(),p={version:De,snapshotId:t,pid:process.pid,...oe()?{processIdentity:oe()}:{},reservedBytes:n,state:r,createdAtMs:o?.createdAtMs??d,updatedAtMs:d};v(O(e,t,"reserve"),p)}function fn(e,t){B(e,()=>{$e(O(e,t,"reserve"),{force:!0})})}function yn(e){let t=[];for(let n of ke(e,{withFileTypes:!0})){if(!n.isFile()||!n.name.endsWith(".reserve"))continue;let r=n.name.slice(0,-8);if(w(r))try{let s=JSON.parse(b(_(e,n.name),"output snapshot reservation"));if(!Fe(s)||s.snapshotId!==r)throw new Error("reservation identity is invalid");t.push(s)}catch(s){throw new Error(`Output snapshot reservation ${n.name} is invalid; retry after its owning process or snapshot expires.`,{cause:s})}}return t}function Fe(e){if(!e||typeof e!="object")return!1;let t=e;return t.version===De&&typeof t.snapshotId=="string"&&w(t.snapshotId)&&Number.isSafeInteger(t.pid)&&(t.pid??0)>0&&(t.processIdentity===void 0||pe(t.processIdentity)!==null&&t.processIdentity.pid===t.pid)&&Number.isSafeInteger(t.reservedBytes)&&(t.reservedBytes??-1)>=0&&(t.state==="active"||t.state==="complete")&&Number.isSafeInteger(t.createdAtMs)&&Number.isSafeInteger(t.updatedAtMs)}function Sn(e){let t=Date.now();for(let n of ke(e,{withFileTypes:!0})){if(!n.isFile()||!n.name.endsWith(".reserve"))continue;let r=n.name.slice(0,-8);if(!w(r))continue;let s=null;try{let u=JSON.parse(b(_(e,n.name),"output snapshot reservation"));s=Fe(u)?u:null}catch{s=null}let i=vn(O(e,r,"json")),o=s?.state==="active"&&de(s.pid)&&(s.processIdentity===void 0||(()=>{let u=D(s.pid);return u!==null&&ge(s.processIdentity,u)})()),a=s?t-s.updatedAtMs>He:!1;o||i&&!a||!i&&s&&!a&&s.state==="complete"||Qe(r,e)}}function vn(e){try{return zt(e),!0}catch{return!1}}function B(e,t){ue(e);let n=_(e,Yt),r=Date.now()+en;for(;;){let s=P(n,{kind:"output-snapshot-quota",processIdentity:oe()});if(s.kind==="acquired")try{return t()}finally{s.lock.release()}if(Date.now()>=r)throw new Error("Output snapshot quota is busy. Retry the command.");Atomics.wait(nn,0,0,tn)}}function oe(){return ee===void 0&&(ee=D(process.pid)),ee}function E(e,t){w(e)&&B(t,()=>Qe(e,t))}function Qe(e,t){for(let n of["json","output","tmp","reserve"])$e(O(t,e,n),{force:!0})}function O(e,t,n){if(!w(t))throw new Error("Output snapshot identifier is invalid.");return _(e,`${t}.${n}`)}function On(e){if(!e)throw new Error("Incomplete output did not create a resumable snapshot.");return e}function bn(e){return e>=55296&&e<=56319}function In(e,t,n){if(n){let r=e.lastIndexOf(`
13
+ `,t-1);if(r>=0)return r+1}return bn(e.charCodeAt(t-1))?t-1:t}function wn(e){let t=En({pageIndex:e.nextPageIndex,snapshotId:e.snapshotId});return{cursor:t,command:Nn(e.invocationPrefix,t)}}function En(e){return je.test(e.snapshotId)?e.pageIndex===1?e.snapshotId:`${e.snapshotId}.${e.pageIndex.toString(36)}`:`4.${xn(e.snapshotId)}.${e.pageIndex.toString(36)}`}function Cn(e,t){let n=Je(e);if(!n)throw new Error("Invalid output cursor. Run the command again without --output-cursor.");if(n.version===3&&n.invocationHash!==t)throw new Error("This output cursor belongs to a different command, working directory, or argument set. Run again without --output-cursor.");return n}function Je(e){let t=Kt.exec(e);if(t){let r=t[2]??"1",s=Number.parseInt(r,36);return Number.isSafeInteger(s)&&s>=1&&s.toString(36)===r?{version:4,pageIndex:s,snapshotId:t[1]}:null}let n=Zt.exec(e);if(n){let r=An(n[1]),s=Number.parseInt(n[2],36);return r&&Number.isSafeInteger(s)&&s>=1&&s.toString(36)===n[2]?{version:4,pageIndex:s,snapshotId:r}:null}try{let r=JSON.parse(Buffer.from(e,"base64url").toString("utf8"));return Pn(r)?r:null}catch{return null}}function Pn(e){if(!e||typeof e!="object")return!1;let t=e;return t.version===3&&L(t.invocationHash)&&Number.isSafeInteger(t.pageIndex)&&(t.pageIndex??-1)>=1&&Number.isSafeInteger(t.pageSize)&&(t.pageSize??0)>=x&&(t.pageSize??0)<=A&&L(t.outputHash)&&typeof t.snapshotId=="string"&&w(t.snapshotId)}function xn(e){if(!ae.test(e))throw new Error("Output snapshot identifier is invalid.");return Buffer.from(e.replaceAll("-",""),"hex").toString("base64url")}function An(e){let t=Buffer.from(e,"base64url");if(t.length!==16)return null;let n=t.toString("hex"),r=`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`;return ae.test(r)?r:null}function w(e){return typeof e=="string"&&(je.test(e)||ae.test(e))}function L(e){return typeof e=="string"&&/^[a-f0-9]{64}$/u.test(e)}function Xe(e,t,n,r){return H("sha256").update(JSON.stringify({command:e,cwd:t,invocationPrefix:n,argv:r})).digest("hex")}function Ze(e){let t=[];for(let n=0;n<e.length;n+=1){let r=e[n];if(r==="--output-page-size"||r==="--output-cursor"){n+=1;continue}r.startsWith("--output-page-size=")||r.startsWith("--output-cursor=")||t.push(r)}return t}function Ke(e,t,n){return tt([...e,...t,"--output-page-size",String(n)])}function Nn(e,t){return tt([...e,Ft,t])}function Ye(e){let t=e===void 0?["codebaseiq"]:[...e];if(!et(t))throw new Error("Output pagination invocation prefix must contain one to sixteen non-empty shell arguments.");return t}function et(e){return Array.isArray(e)&&e.length>0&&e.length<=16&&e.every(t=>typeof t=="string"&&t.length>0&&t.length<=2048&&!t.includes("\0")&&!t.includes("\r")&&!t.includes(`
14
+ `))}function Ln(e){return Array.isArray(e)&&e.length>0&&e.length<=256&&e.every(t=>typeof t=="string"&&t.length<=8192&&!t.includes("\0")&&!t.includes("\r")&&!t.includes(`
15
+ `))}function tt(e){return e.map(t=>Ae(t,{omitSafeQuotes:!0})).join(" ")}function _n(e){let t=e.page.continuation,n=Math.max(e.page.offset,e.page.offset+e.page.returnedCharacters-1),r=`[codebaseiq output page: characters ${e.page.offset}-${n} of ${e.page.totalCharacters}]
16
+ `,s=t?`
17
+ [Incomplete: ${e.page.remainingCharacters} characters remain. Continue exactly:
18
+ ${t.command}]
19
+ `:`
20
+ [codebaseiq transport complete; evaluate command coverage separately]
21
+ `;return`${r}${e.content}${s}`}export{Ae as a,Dn as b,zn as c,qn as d,Vn as e,Wn as f,Gn as g,tr as h,nr as i,Ft as j,M as k,sn as l,Or as m,br as n};
22
+ //# sourceMappingURL=chunk-PHPQ24UG.js.map
@@ -0,0 +1,77 @@
1
+ import{f as L,g as A}from"./chunk-IOVPAZWP.js";import{a as _,b as S,d as b}from"./chunk-3LCDIREB.js";import{v as F}from"./chunk-327YK6TB.js";import{mkdtempSync as O}from"fs";import{win32 as q}from"path";var Q=259,Z=8,ee=6,y="\\\\?\\",C=`${y}UNC\\`;function k(e,n,t){if(t!=="win32"||e.startsWith(y))return;let a=q.resolve(e);if(!(a.length+n<=Q))return a.startsWith("\\\\")?`${C}${a.slice(2)}`:`${y}${a}`}function N(e,n=process.platform){return e===""||e===":memory:"?e:k(e,Z,n)??e}function _e(e,n=process.platform){let t=k(e,ee,n);if(!t)return O(e);let a=O(t);return a.startsWith(C)?`\\\\${a.slice(C.length)}`:a.slice(y.length)}var I=[],x=[];function m(e){e.groups.length>0&&I.push(e)}function j(e){x.push(e)}function be(e){let n=[];for(let t of x)try{t.close(e)}catch(a){n.push(a)}if(n.length===1)throw n[0];if(n.length>1)throw new AggregateError(n,"Multiple database-owned resources failed to close.")}function Ce(e,n){let t=new Set(n.groups);for(let a of I)a.groups.some(r=>t.has(r))&&(n.file!==void 0&&a.clearFile?a.clearFile(e,n.file):a.clearAll(e))}function M(){let e=new WeakMap;return{cache:e,ensure(n){let t=e.get(n);return t||(t=new Map,e.set(n,t)),t}}}function h(e,n){let{cache:t,ensure:a}=M(),r={get(i,s,o){let c=a(i);if(c.has(s))return c.get(s);let d=o();return c.set(s,d),d},invalidate(i,s){t.get(i)?.delete(s)},invalidateAll(i){t.delete(i)},size(i){return t.get(i)?.size??0}};return m({name:e,groups:n.clearGroups,clearAll:i=>r.invalidateAll(i),clearFile:(i,s)=>r.invalidate(i,s)}),r}function Pe(e,n){let t=new WeakMap,a={get(r,i){let s=t.get(r);if(s)return s.value;let o=i();return t.set(r,{value:o}),o},invalidate(r){t.delete(r)},has(r){return t.has(r)}};return m({name:e,groups:n.clearGroups,clearAll:r=>a.invalidate(r)}),a}var te={clearGroups:["whole-project","source-file"]};function we(e){return ne(e,te)}function ne(e,n){let{cache:t,ensure:a}=M(),r={get(i,s,o,c){let d=a(i),T=d.get(s);if(T&&T.source===o)return T.value;let w=c();return d.set(s,{source:o,value:w}),w},invalidate(i,s){t.get(i)?.delete(s)},invalidateAll(i){t.delete(i)}};return m({name:e,groups:n.clearGroups,clearAll:i=>r.invalidateAll(i),clearFile:(i,s)=>r.invalidate(i,s)}),r}import{createHash as re}from"crypto";import{existsSync as Oe,mkdirSync as ae}from"fs";import{dirname as V,join as ie}from"path";import K from"better-sqlite3";var se="evidence.db";var oe=["source-facts","callable-units","definition-exclusions","doc-path-tokens","react-component-behavior-profiles"],R=new Set(oe);var Ke=512*1024*1024,ce=6e4,v=new WeakMap;j({name:"evidence-connections",close:X});var le=h("evidence-content-hash",{clearGroups:["whole-project","source-file"]}),de=h("evidence-project-fingerprint",{clearGroups:["whole-project"]}),p="evidence-v1",f="version NOT LIKE 'evidence-%'";function H(e){return re("sha256").update(e).digest("hex")}function He(e,n,t){return le.get(e,n,()=>H(t))}function U(e){return de.get(e,"current",()=>{try{if(!e.generation.metadataRaw)return null;let n=F(e.generation.metadataRaw);if(n.kind!=="legacy"&&n.kind!=="supported"||!n.capabilities.usableForEvidenceCache)return null;let t=n.metadata,a=[...t.indexedLanguages??[]].sort();return H(JSON.stringify({fingerprint:t.fingerprint,indexedLanguages:a,status:t.status}))}catch(n){return E("project fingerprint unavailable",n),null}})}function E(e,n){process.env.CODEBASEIQ_DEBUG&&console.error(`evidence-cache: ${e}: ${n instanceof Error?n.message:String(n)}`)}function u(e){if(v.has(e))return v.get(e)??null;let n=null;try{let t=new K(N(ie(V(e.config.dbPath),se)));t.pragma("journal_mode = WAL"),t.pragma("busy_timeout = 5000"),t.pragma("synchronous = NORMAL"),t.exec(`
2
+ CREATE TABLE IF NOT EXISTS file_evidence (
3
+ kind TEXT NOT NULL,
4
+ relative_path TEXT NOT NULL,
5
+ content_hash TEXT NOT NULL,
6
+ version TEXT NOT NULL,
7
+ payload TEXT NOT NULL,
8
+ PRIMARY KEY (kind, relative_path)
9
+ );
10
+ CREATE TABLE IF NOT EXISTS project_evidence (
11
+ kind TEXT NOT NULL,
12
+ cache_key TEXT NOT NULL,
13
+ project_fingerprint TEXT NOT NULL,
14
+ version TEXT NOT NULL,
15
+ payload TEXT NOT NULL,
16
+ PRIMARY KEY (kind, cache_key)
17
+ );
18
+ CREATE TABLE IF NOT EXISTS semantic_callees (
19
+ relative_path TEXT NOT NULL,
20
+ symbol TEXT NOT NULL,
21
+ content_hash TEXT NOT NULL,
22
+ deps_digest TEXT NOT NULL,
23
+ version TEXT NOT NULL,
24
+ payload TEXT NOT NULL,
25
+ PRIMARY KEY (relative_path, symbol)
26
+ );
27
+ CREATE TABLE IF NOT EXISTS semantic_references (
28
+ relative_path TEXT NOT NULL,
29
+ symbol TEXT NOT NULL,
30
+ project_fingerprint TEXT NOT NULL,
31
+ version TEXT NOT NULL,
32
+ payload TEXT NOT NULL,
33
+ PRIMARY KEY (relative_path, symbol)
34
+ );
35
+ `),n={evidence:t,shared:pe(e.config.sharedEvidenceDbPath),readFileEvidence:t.prepare("SELECT payload FROM file_evidence WHERE kind = ? AND relative_path = ? AND content_hash = ? AND version = ?"),readLegacyFileEvidence:t.prepare(`SELECT payload FROM file_evidence
36
+ WHERE kind = ? AND relative_path = ? AND content_hash = ? AND ${f}
37
+ ORDER BY version DESC
38
+ LIMIT 1`),writeFileEvidence:t.prepare("INSERT OR REPLACE INTO file_evidence (kind, relative_path, content_hash, version, payload) VALUES (?, ?, ?, ?, ?)"),readProjectEvidence:t.prepare("SELECT payload FROM project_evidence WHERE kind = ? AND cache_key = ? AND project_fingerprint = ? AND version = ?"),readLegacyProjectEvidence:t.prepare(`SELECT payload FROM project_evidence
39
+ WHERE kind = ? AND cache_key = ? AND project_fingerprint = ? AND ${f}
40
+ ORDER BY version DESC
41
+ LIMIT 1`),writeProjectEvidence:t.prepare("INSERT OR REPLACE INTO project_evidence (kind, cache_key, project_fingerprint, version, payload) VALUES (?, ?, ?, ?, ?)"),readCallees:t.prepare(`SELECT payload FROM semantic_callees
42
+ WHERE relative_path = ? AND symbol = ? AND content_hash = ? AND deps_digest = ? AND version = ?`),readLegacyCallees:t.prepare(`SELECT payload FROM semantic_callees
43
+ WHERE relative_path = ? AND symbol = ? AND content_hash = ? AND deps_digest = ? AND ${f}
44
+ ORDER BY version DESC
45
+ LIMIT 1`),readCalleesForFile:t.prepare(`SELECT symbol, payload FROM semantic_callees
46
+ WHERE relative_path = ? AND content_hash = ? AND deps_digest = ? AND version = ?`),readLegacyCalleesForFile:t.prepare(`SELECT symbol, payload FROM semantic_callees
47
+ WHERE relative_path = ? AND content_hash = ? AND deps_digest = ? AND ${f}
48
+ ORDER BY symbol, version DESC`),writeCallees:t.prepare(`INSERT OR REPLACE INTO semantic_callees
49
+ (relative_path, symbol, content_hash, deps_digest, version, payload) VALUES (?, ?, ?, ?, ?, ?)`),dropStaleCallees:t.prepare("DELETE FROM semantic_callees WHERE relative_path = ? AND content_hash != ?"),readReferences:t.prepare(`SELECT payload FROM semantic_references
50
+ WHERE relative_path = ? AND symbol = ? AND project_fingerprint = ? AND version = ?`),readLegacyReferences:t.prepare(`SELECT payload FROM semantic_references
51
+ WHERE relative_path = ? AND symbol = ? AND project_fingerprint = ? AND ${f}
52
+ ORDER BY version DESC
53
+ LIMIT 1`),readReferencesForFile:t.prepare(`SELECT symbol, payload FROM semantic_references
54
+ WHERE relative_path = ? AND project_fingerprint = ? AND version = ?`),readLegacyReferencesForFile:t.prepare(`SELECT symbol, payload FROM semantic_references
55
+ WHERE relative_path = ? AND project_fingerprint = ? AND ${f}
56
+ ORDER BY symbol, version DESC`),writeReferences:t.prepare(`INSERT OR REPLACE INTO semantic_references
57
+ (relative_path, symbol, project_fingerprint, version, payload) VALUES (?, ?, ?, ?, ?)`),dropStaleReferences:t.prepare("DELETE FROM semantic_references WHERE relative_path = ? AND project_fingerprint != ?")}}catch(t){E("disabled (open failed)",t)}return v.set(e,n),n}function g(e,n,t){E(`disabled (${n})`,t);try{X(e)}catch(a){E("close failed while disabling",a)}v.set(e,null)}function X(e){let n=v.get(e);if(v.delete(e),!n)return;let t,a;try{n.shared?.evidence.close()}catch(r){t=r}try{n.evidence.close()}catch(r){a=r}if(t!==void 0&&a!==void 0)throw new AggregateError([t,a],"Shared and project evidence connections failed to close.");if(t!==void 0)throw t;if(a!==void 0)throw a}function pe(e){if(!e)return null;try{ae(V(e),{recursive:!0});let n=new K(N(e));return n.pragma("journal_mode = WAL"),n.pragma("busy_timeout = 250"),n.pragma("synchronous = NORMAL"),n.exec(`
58
+ CREATE TABLE IF NOT EXISTS file_evidence (
59
+ kind TEXT NOT NULL,
60
+ relative_path TEXT NOT NULL,
61
+ content_hash TEXT NOT NULL,
62
+ version TEXT NOT NULL,
63
+ payload TEXT NOT NULL,
64
+ last_accessed_at INTEGER NOT NULL,
65
+ PRIMARY KEY (kind, relative_path, content_hash, version)
66
+ );
67
+ CREATE INDEX IF NOT EXISTS idx_file_evidence_lru
68
+ ON file_evidence(last_accessed_at, kind, relative_path, content_hash, version);
69
+ `),{evidence:n,readFileEvidence:n.prepare("SELECT payload FROM file_evidence WHERE kind = ? AND relative_path = ? AND content_hash = ? AND version = ?"),writeFileEvidence:n.prepare(`INSERT INTO file_evidence (kind, relative_path, content_hash, version, payload, last_accessed_at)
70
+ VALUES (?, ?, ?, ?, ?, ?)
71
+ ON CONFLICT(kind, relative_path, content_hash, version)
72
+ DO UPDATE SET payload = excluded.payload, last_accessed_at = excluded.last_accessed_at`),touchFileEvidence:n.prepare(`UPDATE file_evidence
73
+ SET last_accessed_at = ?
74
+ WHERE kind = ? AND relative_path = ? AND content_hash = ? AND version = ?
75
+ AND last_accessed_at < ?`)}}catch(n){return E("shared cache disabled (open failed)",n),null}}function P(e,n,t){E(`shared cache disabled (${n})`,t);try{e.shared?.evidence.close()}catch{}e.shared=null}function W(e,n,t,a){let r=u(e);if(!r)return null;try{let i=r.readFileEvidence.get(n,t,a,p)??r.readLegacyFileEvidence.get(n,t,a);if(i?.payload!==void 0)return i.payload;if(!R.has(n)||!r.shared)return null;try{let s=r.shared.readFileEvidence.get(n,t,a,p);return s?.payload!==void 0&&ue(r.shared,n,t,a),s?.payload??null}catch(s){return P(r,"file_evidence read",s),null}}catch(i){return g(e,"file_evidence read",i),null}}function ue(e,n,t,a){let r=Date.now();try{e.touchFileEvidence.run(r,n,t,a,p,r-ce)}catch(i){E("shared file_evidence recency touch skipped",i)}}function B(e,n,t,a,r){let i=u(e);if(i)try{if(i.writeFileEvidence.run(n,t,a,p,r),R.has(n)&&i.shared)try{i.shared.writeFileEvidence.run(n,t,a,p,r,Date.now())}catch(s){P(i,"file_evidence write",s)}}catch(s){g(e,"file_evidence write",s)}}function $(e,n){if(n.length===0)return;let t=u(e);if(t)try{t.evidence.transaction(()=>{for(let r of n)t.writeFileEvidence.run(r.kind,r.relativePath,r.contentHash,p,r.payload)})();let a=n.filter(r=>R.has(r.kind));if(a.length>0&&t.shared)try{t.shared.evidence.transaction(()=>{for(let r of a)t.shared.writeFileEvidence.run(r.kind,r.relativePath,r.contentHash,p,r.payload,Date.now())})()}catch(r){P(t,"file_evidence batch write",r)}}catch(a){g(e,"file_evidence batch write",a)}}function G(e,n,t,a){let r=u(e);if(!r)return null;try{return(r.readProjectEvidence.get(n,t,a,p)??r.readLegacyProjectEvidence.get(n,t,a))?.payload??null}catch(i){return g(e,"project_evidence read",i),null}}function Y(e,n,t,a,r){let i=u(e);if(i)try{i.writeProjectEvidence.run(n,t,a,p,r)}catch(s){g(e,"project_evidence write",s)}}function Ue(e,n,t,a){let r=u(e);if(!r)return new Map;try{let i=r.readCalleesForFile.all(n,t,a,p),s=r.readLegacyCalleesForFile.all(n,t,a);return z([...s,...i])}catch(i){return g(e,"semantic_callees bulk read",i),new Map}}function Xe(e,n,t){let a=u(e);if(!a)return new Map;try{let r=a.readReferencesForFile.all(n,t,p),i=a.readLegacyReferencesForFile.all(n,t);return z([...i,...r])}catch(r){return g(e,"semantic_references bulk read",r),new Map}}function z(e){let n=new Map;for(let t of e)n.set(t.symbol,t.payload);return n}function We(e,n){if(n.length===0)return;let t=u(e);if(t)try{t.evidence.transaction(()=>{let a=new Set;for(let r of n){let i=`${r.relativePath}\0${r.contentHash}`;a.has(i)||(a.add(i),t.dropStaleCallees.run(r.relativePath,r.contentHash)),t.writeCallees.run(r.relativePath,r.symbol,r.contentHash,r.depsDigest,p,r.payload)}})()}catch(a){g(e,"semantic_callees write",a)}}function Be(e,n){if(n.length===0)return;let t=u(e);if(t)try{t.evidence.transaction(()=>{let a=new Set;for(let r of n){let i=`${r.relativePath}\0${r.projectFingerprint}`;a.has(i)||(a.add(i),t.dropStaleReferences.run(r.relativePath,r.projectFingerprint)),t.writeReferences.run(r.relativePath,r.symbol,r.projectFingerprint,p,r.payload)}})()}catch(a){g(e,"semantic_references write",a)}}function Ge(e){return typeof e=="object"&&e!==null}function Ye(e){return Array.isArray(e)&&e.every(n=>typeof n=="string")?e:null}var ge=[l("source-facts",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/source/source-facts.ts"}),l("callable-units",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/source/callable-units.test.ts",owner:"src/source/facts/callable-units.ts"}),l("file-definitions",{dependsOn:["content-hash","project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","contentHash","projectFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/symbols/definition-catalog.ts"}),l("definition-exclusions",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/analysis/framework-patterns.ts"}),l("doc-path-tokens",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-products.test.ts",owner:"tests/storage/evidence-cache.test.ts"}),l("doc-path-evidence",{dependsOn:["content-hash","git-history","git-head","tool-version"],keyParts:["kind","relativePath","contentHash","trackedFiles","historyWindow","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/queries/cleanup/doc-drift.ts"}),l("source-imports",{dependsOn:["content-hash","import-resolution-fingerprint","config","tool-version"],keyParts:["kind","relativePath","contentHash","importResolutionFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/language-parsers/index.ts"}),l("source-reexports",{dependsOn:["content-hash","import-resolution-fingerprint","config","tool-version"],keyParts:["kind","relativePath","contentHash","importResolutionFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/language-parsers/index.ts"}),l("source-fingerprints",{dependsOn:["content-hash","project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","contentHash","projectFingerprint","payloadVersion"],stalenessTest:"tests/symbols/definition-catalog.test.ts",owner:"src/queries/cleanup/similar.ts"}),l("consumer-file-usage",{dependsOn:["content-hash","project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","contentHash","projectFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/queries/internal/consumer-evidence.ts"}),l("react-component-behavior-profiles",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/source/react-profile.ts"}),l("git-file-adds",{dependsOn:["git-head","git-history","tool-version"],keyParts:["kind","cacheKey","head","historyWindow","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/analysis/git-history.ts"}),l("typescript-reference-fragments",{dependsOn:["content-hash","transitive-deps-digest","config","tool-version"],keyParts:["kind","relativePath","semanticIdentity","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-reference-fragments.test.ts",owner:"src/semantic/typescript/reference-fragment-shadow.ts"}),l("typescript-import-usage",{dependsOn:["content-hash","transitive-deps-digest","config","tool-version"],keyParts:["kind","relativePath","semanticIdentity","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-semantic-provider.test.ts",owner:"src/semantic/shared-primitives.ts"}),l("typescript-signatures",{dependsOn:["content-hash","transitive-deps-digest","config","tool-version"],keyParts:["kind","relativePath","semanticIdentity","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-semantic-provider.test.ts",owner:"src/semantic/shared-primitives.ts"}),D("file-dependency-graph",{dependsOn:["project-fingerprint","indexed-language-set","import-resolution-fingerprint","tool-version"],keyParts:["kind","scope","projectFingerprint","payloadVersion"],stalenessTest:"tests/symbols/file-dep-graph.test.ts",owner:"src/symbols/graph/file-dep-graph.ts"}),D("semantic-import-usage",{dependsOn:["project-fingerprint","indexed-language-set","import-resolution-fingerprint","tool-version"],keyParts:["kind","relativePath","projectFingerprint","language","semanticEngine","payloadVersion"],stalenessTest:"tests/semantic/rust/rust-semantic-cache-gate.test.ts",owner:"src/semantic/shared-primitives.ts"}),D("semantic-signatures",{dependsOn:["project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","symbol","projectFingerprint","language","semanticEngine","payloadVersion"],stalenessTest:"tests/semantic/rust/rust-semantic-cache-gate.test.ts",owner:"src/semantic/shared-primitives.ts"}),D("health-semantic-prewarm",{dependsOn:["project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","scope","cliVersion","projectFingerprint","payloadVersion"],stalenessTest:"tests/runtime/cli-support.test.ts",owner:"src/runtime/cli-support.ts"})];function et(e){let n=new Map;return{kind:e.kind,read(t,a,r){let i=!1,s=0,o;if(_()){let c=U(t);if(c){let d=`${c}\0${a}\0${r}`;o=n.get(d),o||(o=S(["evidence-product-file-read-v1",e.kind,c,a,r]),n.set(d,o))}}return b("evidence-product.file.read",()=>{let c=W(t,e.kind,a,r);if(c===null)return null;s=c.length;try{let d=e.deserialize(c);return i=d!==null,d}catch{return null}},()=>({...o?{workIdentity:o,workOutcome:"computed"}:{},scope:"file",kind:e.kind,available:!0,hit:i,payloadBytes:s}))},write(t,a,r,i){B(t,e.kind,a,r,e.serialize(i))},writeBatch(t,a){$(t,a.map(r=>({kind:e.kind,relativePath:r.relativePath,contentHash:r.contentHash,payload:e.serialize(r.value)})))}}}function tt(e){let n=new Map;return{kind:e.kind,read(t,a,r){let i=!1,s=0,o;if(_()){let c=`${r}\0${a}`;o=n.get(c),o||(o=S(["evidence-product-project-read-v1",e.kind,r,a]),n.set(c,o))}return b("evidence-product.project.read",()=>{let c=G(t,e.kind,a,r);if(c===null)return null;s=c.length;try{let d=e.deserialize(c);return i=d!==null,d}catch{return null}},()=>({...o?{workIdentity:o,workOutcome:"computed"}:{},scope:"project",kind:e.kind,available:!0,hit:i,payloadBytes:s}))},write(t,a,r,i){Y(t,e.kind,a,r,e.serialize(i))}}}function nt(e){let n=ge.find(t=>t.kind===e);if(!n)throw new Error(`missing evidence product manifest entry for ${e}`);return n.invalidation}function l(e,n){return{scope:"file",kind:e,invalidation:{scope:"file",...n}}}function D(e,n){return{scope:"project",kind:e,invalidation:{scope:"project",...n}}}var Ee=h("source-text",{clearGroups:["whole-project","source-file"]}),he=h("source-lines",{clearGroups:["whole-project","source-file"]});function fe(e,n){let t=n.replace(/\\/g,"/");return Ee.get(e,t,()=>{try{return L(e.config.projectRoot,t,{inputKind:"indexed source file"})}catch(a){if(A(a))return"";throw a}})}function ve(e,n){let t=n.replace(/\\/g,"/");return he.get(e,t,()=>{let a=fe(e,t);return a?a.split(`
76
+ `):[]})}var ye=/^\s*(?:\/\/|#|\/\*+|\*)\s*codebaseiq[\s:-]*ignore(?:[\s:-]+(dead(?:-code)?|stale|wrapper|passthrough|drift|extract|similar|twin))?\b/i;function me(e){let n=ye.exec(e);return n?n[1]??"":null}function st(e,n,t){return J(e,n,t).length>0}function ot(e,n,t,a){let r=a.toLowerCase();return J(e,n,t).some(i=>i.toLowerCase()===r)}function J(e,n,t){if(t<=0)return[];let a=ve(e,n);if(a.length===0)return[];let r=[];for(let i=t-1;i>=0&&i>=t-5;i-=1){let s=(a[i]??"").trim();if(s==="")continue;let o=me(s);if(o!==null){r.push(o);continue}if(!s.startsWith("//")&&!s.startsWith("*")&&!s.startsWith("/*")&&!s.startsWith("@")&&!s.startsWith("#"))return r}return r}export{N as a,_e as b,m as c,j as d,be as e,Ce as f,h as g,Pe as h,we as i,ne as j,H as k,He as l,U as m,Ue as n,Xe as o,We as p,Be as q,Ge as r,Ye as s,et as t,tt as u,nt as v,fe as w,ve as x,me as y,st as z,ot as A};
77
+ //# sourceMappingURL=chunk-PLZXWZHY.js.map
@@ -1,2 +1,2 @@
1
- import{c as t}from"./chunk-SZD2KF7Q.js";function i(r,s,e={}){let a=t(r,s,{families:["dataflow"],...e.maxDepth!==void 0?{maxDepth:e.maxDepth}:{},...e.maxEdges!==void 0?{maxEdges:e.maxEdges}:{}});return{kind:"value-flow",targets:a.targets,edges:a.edges,coverage:{status:a.coverage.status,basis:"proved-bounded-static-value-flow",analysisBasis:"partial-system-definition-use",providers:["bounded-static-value-flow","typescript-local-dependence"],supportedRelations:["compiler-identified local definitions reaching local reads through a TypeScript control-flow graph","right-hand-side local reads supplying assignments and declarations","candidate closure captures and bounded same-owner field flow with explicit evidence strength","direct argument-to-parameter forwarding at compiler-resolved calls","bounded mechanically derived static arguments","callee return value to a consumed compiler-resolved call result"],unsupportedRelations:["general heap alias and cross-instance field points-to flow","exceptional control and value flow","closure invocation order","downstream local definition-use after a call result","dynamic calls not resolved by the semantic provider"],graph:a.coverage}}}export{i as a};
2
- //# sourceMappingURL=chunk-34WBMAYK.js.map
1
+ import{c as t}from"./chunk-UWB5WMC2.js";function i(r,s,e={}){let a=t(r,s,{families:["dataflow"],...e.maxDepth!==void 0?{maxDepth:e.maxDepth}:{},...e.maxEdges!==void 0?{maxEdges:e.maxEdges}:{}});return{kind:"value-flow",targets:a.targets,edges:a.edges,coverage:{status:a.coverage.status,basis:"proved-bounded-static-value-flow",analysisBasis:"partial-system-definition-use",providers:["bounded-static-value-flow","typescript-local-dependence"],supportedRelations:["compiler-identified local definitions reaching local reads through a TypeScript control-flow graph","right-hand-side local reads supplying assignments and declarations","candidate closure captures and bounded same-owner field flow with explicit evidence strength","direct argument-to-parameter forwarding at compiler-resolved calls","bounded mechanically derived static arguments","callee return value to a consumed compiler-resolved call result"],unsupportedRelations:["general heap alias and cross-instance field points-to flow","exceptional control and value flow","closure invocation order","downstream local definition-use after a call result","dynamic calls not resolved by the semantic provider"],graph:a.coverage}}}export{i as a};
2
+ //# sourceMappingURL=chunk-PNVZIJ57.js.map