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 +0,0 @@
1
- import{wb as o}from"./chunk-GTIYTDRE.js";import{G as n}from"./chunk-WE5RZHZ7.js";async function i(t){if(typeof t!="string"||t.length===0)throw new Error("Output continuation requires a cursor.");await o(t,n)}var u={id:"continue",command:"continue <cursor>",hidden:!0,description:"Continue an immutable output snapshot",renderShape:"custom",handler:i};export{u as a};
2
- //# sourceMappingURL=chunk-476NR5B7.js.map
@@ -1,3 +0,0 @@
1
- import{b as m}from"./chunk-7MGU3HPH.js";import{a as p}from"./chunk-EF2R3WNQ.js";import{$ as d,ba as P,ca as h,g as f}from"./chunk-WE5RZHZ7.js";import{realpathSync as c}from"fs";import{basename as x,dirname as L,join as T,relative as I,sep as O}from"path";import{fileURLToPath as S,pathToFileURL as y}from"url";function F(n,e){return e==="."||e==="./"?y(c(n)).href:y(d(n,e).absolutePath).href}function b(n,e){let r=S(e);return I(c(n),v(r)).split(O).join("/")}function v(n){try{return c(n)}catch{try{return T(c(L(n)),x(n))}catch{return n}}}function H(n,e,r){return{textDocument:{uri:F(n,e.relativePath)},position:z(n,e),context:{includeDeclaration:r}}}function z(n,e){let r={line:e.startLine,character:e.startChar??0};try{return M(P(n,e.relativePath,{inputKind:"indexed Rust source file"}),e,r)}catch(t){if(!h(t))throw t;return r}}function M(n,e,r={line:e.startLine,character:e.startChar??0}){let t=n.split(/\r?\n/),o=t[e.startLine];if(o===void 0||e.leaf.length===0)return r;let i=Math.max(0,Math.min(r.character,o.length)),s=o.indexOf(e.leaf,i);if(s>=0)return{line:e.startLine,character:u(s,e.leaf)};let a=o.indexOf(e.leaf);if(a>=0)return{line:e.startLine,character:u(a,e.leaf)};let l=D(t,e.startLine,e.leaf);return l||r}function u(n,e){return n+Math.max(0,e.length-2)}function D(n,e,r){for(let t of[-1,1,-2,2]){let o=e+t;if(o<0||o>=n.length)continue;let i=n[o].indexOf(r);if(i>=0)return{line:o,character:u(i,r)}}return null}function K(n,e){return e.map(r=>({file:b(n,r.uri),line:r.range.start.line,column:r.range.start.character}))}function X(n){let e=new Map;for(let r of n)e.set(`${r.file}\0${r.line}\0${r.column}`,r);return[...e.values()].sort((r,t)=>{let o=r.file.localeCompare(t.file);return o!==0?o:r.line!==t.line?r.line-t.line:r.column-t.column})}import{randomUUID as E}from"crypto";import{readdirSync as $,rmSync as j,writeFileSync as A}from"fs";import{join as g}from"path";var R="rust-analyzer-owner-",w=".json",U=16*1024;function Z(n,e){if(!n||!e.rootIdentity)return null;let r=g(n,`${R}${e.rootPid}-${E()}${w}`),t={version:1,rootIdentity:e.rootIdentity,ownsProcessGroup:e.ownsProcessGroup};return A(r,`${JSON.stringify(t)}
2
- `,{encoding:"utf8",mode:384,flag:"wx"}),r}function ee(n){n&&j(n,{force:!0})}async function re(n,e){if(!n)return[];let r;try{r=$(n)}catch{return[]}let t=r.filter(s=>s.startsWith(R)&&s.endsWith(w)).map(s=>g(n,s)),o=[],i=[];for(let s of t){let a=C(s);a?i.push(a):o.push({reaped:!1,reason:"identity-unavailable",detail:`Rust analyzer ownership record ${s} could not be validated.`})}return o.push(...await Promise.all(i.map(s=>m(s,e)))),o}function C(n){try{let e=f(n,{maxBytes:U,inputKind:"rust-analyzer process ownership record"}),r=JSON.parse(e),t=p(r.rootIdentity);return r.version!==1||!t||typeof r.ownsProcessGroup!="boolean"?null:{rootPid:t.pid,rootIdentity:t,ownsProcessGroup:r.ownsProcessGroup,knownMembers:new Map([[t.pid,t]])}}catch{return null}}export{Z as a,ee as b,re as c,F as d,b as e,H as f,K as g,X as h};
3
- //# sourceMappingURL=chunk-5VKBFZZU.js.map
@@ -1,21 +0,0 @@
1
- import{e as F,f as X,g as L,h as _e,i as Le,j as Fe,p as Pe,q as y,r as Ee,t as Ae,u as g,v as we}from"./chunk-BMYOV5GP.js";import{H,c as v}from"./chunk-NNJ2KZZG.js";import{basename as Re}from"path";var $t=F("indexed-document-paths",{clearGroups:["whole-project"]});function O(e,t={}){let n=Ot(t);return[...$t.get(e,n,()=>{let o=t.scope?"AND relative_path LIKE ?":"",s=t.like?"AND relative_path LIKE ?":"",i=[...t.scope?[`%${t.scope}%`]:[],...t.like?[t.like]:[]],a=e.all(`SELECT relative_path
2
- FROM documents
3
- WHERE 1 = 1
4
- ${e.pathExclusionsFor("documents")}
5
- ${o}
6
- ${s}
7
- ORDER BY relative_path`,...i).map(l=>l.relative_path),c=t.extensions?a.filter(l=>t.extensions.some(p=>l.toLowerCase().endsWith(p.toLowerCase()))):a;return t.includeIgnored===!1?c.filter(l=>!e.isIgnored(l)):c})]}function Ot(e){let t=e.extensions?[...new Set(e.extensions.map(n=>n.toLowerCase()))].sort():null;return JSON.stringify({scope:e.scope??null,like:e.like??null,extensions:t,includeIgnored:e.includeIgnored!==!1})}function Uo(e,t,n){let r=Ve(t);if(!r)return[];let o=e.all(`SELECT relative_path
8
- FROM documents
9
- WHERE relative_path = ?
10
- ${e.pathExclusionsFor("documents")}`,r).filter(c=>!e.isIgnored(c.relative_path)).map(c=>({relativePath:c.relative_path,score:Ie(c.relative_path,r)}));if(o.length>0)return o;let s=O(e,{includeIgnored:!1}).map(c=>({relativePath:c,score:Ie(c,r)})).filter(c=>c.score>0).sort((c,l)=>l.score-c.score||c.relativePath.localeCompare(l.relativePath)),i=s.filter(c=>c.score>=1100);if(i.length>0)return n.allowMultiple?i:[i[0]];let a=s.filter(c=>c.score>=800);return a.length>0?n.allowMultiple?a:[a[0]]:n.allowMultiple?s:s.slice(0,1)}function Ie(e,t){let n=Ve(e),r=Re(n),o=Re(t),s=0;return n===t&&(s+=1200),n.endsWith(`/${t}`)&&(s+=1100),r===o&&(s+=900),n.startsWith(`${t}/`)&&(s+=850),n.includes(t)&&(s+=250),s}function Ve(e){return e.trim().replace(/\\/g,"/").replace(/^\.\//,"").replace(/^\/+/,"").replace(/\/+$/,"")}import{extname as je}from"path";var Dt={".rs":"rust",".ts":"typescript",".mts":"typescript",".cts":"typescript",".tsx":"tsx",".js":"javascript",".jsx":"javascript",".mjs":"javascript",".cjs":"javascript",".py":"python",".pyi":"python",".java":"java",".kt":"kotlin",".kts":"kotlin",".scala":"scala",".sc":"scala",".rb":"ruby",".c":"c",".h":"c",".cc":"cpp",".cpp":"cpp",".cxx":"cpp",".hpp":"cpp",".hh":"cpp",".hxx":"cpp",".cs":"csharp",".php":"php",".vb":"vb",".clj":"clojure",".cljs":"clojure",".cljc":"clojure"};function D(e){return Dt[je(e).toLowerCase()]??null}function ce(e){return je(e).toLowerCase()===".vue"}import{createRequire as Wt}from"module";var d=Wt(import.meta.url),J=null,Be=!1;function Ut(){if(Be)return null;if(J)return J;try{return J=d("tree-sitter"),J}catch{return Be=!0,null}}var $e=new Map,Z=new Set;function Mt(e){if(Z.has(e))return null;let t=$e.get(e);if(t)return t;let n;try{switch(e){case"rust":n=d("tree-sitter-rust");break;case"typescript":n=d("tree-sitter-typescript").typescript;break;case"tsx":n=d("tree-sitter-typescript").tsx;break;case"javascript":n=d("tree-sitter-javascript");break;case"python":n=d("tree-sitter-python");break;case"java":n=d("tree-sitter-java");break;case"kotlin":n=d("tree-sitter-kotlin");break;case"scala":n=d("tree-sitter-scala");break;case"ruby":n=d("tree-sitter-ruby");break;case"c":n=d("tree-sitter-c");break;case"cpp":n=d("tree-sitter-cpp");break;case"csharp":n=d("tree-sitter-c-sharp");break;case"php":n=d("tree-sitter-php").php;break;case"vb":{let r=d("tree-sitter-vb-dotnet");n=r.language??r;break}case"clojure":return Z.add(e),null}}catch{return Z.add(e),null}return $e.set(e,n),n}var Oe=new Map;function zt(e){let t=Oe.get(e);if(t)return t;let n=Mt(e);if(!n)return null;let r=Ut();if(!r)return null;let o=new r;try{o.setLanguage(n)}catch{return Z.add(e),null}return Oe.set(e,o),o}function qt(e,t){return e.parse(r=>r>=t.length?null:t.slice(r,Math.min(t.length,r+16384)))}function P(e,t){let n=zt(e);if(!n)return null;try{return qt(n,t)}catch{return null}}import{posix as le}from"path";import{parse as Ht}from"@vue/compiler-sfc";var Xt=L("vue-sfc-units");function R(e,t){let n=Ue(t),r=g(e,n);return Xt.get(e,n,r,()=>ue(e,n,r))}function Ue(e){return e.replace(/\\/g,"/").replace(/^\.\//,"")}function Jt(e){let t=e?.toLowerCase();return!t||t==="js"||t==="javascript"||t==="jsx"?"javascript":t==="ts"||t==="typescript"?"typescript":t==="tsx"?"tsx":null}function E(e){return!e||e.body.length===0?0:e.body.split(`
11
- `).length}function ue(e,t,n){let r={relativePath:t,template:null,scripts:[],styles:[],customBlocks:[],errors:[]};if(!n)return r;let o;try{o=Ht(n,{filename:t})}catch(i){return r.errors.push(We(i)),r}r.errors.push(...o.errors.map(We));let{descriptor:s}=o;return s.template&&(r.template=G(e,t,"template",s.template)),s.script&&r.scripts.push(De(e,t,s.script,!1)),s.scriptSetup&&r.scripts.push(De(e,t,s.scriptSetup,!0)),r.styles=s.styles.map(i=>G(e,t,"style",i)),r.customBlocks=s.customBlocks.map(i=>G(e,t,"custom",i)),r.errors.push(...[r.template,...r.scripts,...r.styles,...r.customBlocks].flatMap(i=>i?.errors??[])),r}function De(e,t,n,r){let o=G(e,t,"script",n);return{...o,kind:"script",setup:r,astLanguage:Jt(o.lang)}}function G(e,t,n,r){let o=Gt(r.attrs),s=typeof o.lang=="string"?o.lang:null,i=typeof o.src=="string"?o.src:typeof r.src=="string"?r.src:void 0;if(i){let c=Zt(t,i);if(!c)return{kind:n,ownerPath:t,sourcePath:t,external:!0,src:i,attrs:o,lang:s,body:"",startLine:0,endLine:0,errors:[`Could not resolve Vue ${n} block source: ${i}`]};let l=g(e,c),p=l?Math.max(0,l.split(`
12
- `).length-1):0;return{kind:n,ownerPath:t,sourcePath:c,external:!0,src:i,attrs:o,lang:s,body:l,startLine:0,endLine:p,errors:l?[]:[`Vue ${n} block source not found: ${c}`]}}let a=Math.max(0,r.loc.start.line-1);return{kind:n,ownerPath:t,sourcePath:t,external:!1,attrs:o,lang:s,body:r.content,startLine:a,endLine:Math.max(a,r.loc.end.line-1),errors:[]}}function Zt(e,t){let n=t.split(/[?#]/,1)[0];if(!n||n.startsWith("/")||n.includes("://"))return null;let r=Ue(le.normalize(le.join(le.dirname(e),n)));return r===".."||r.startsWith("../")?null:r}function Gt(e){return{...e}}function We(e){return e instanceof Error?e.message:String(e)}function pe(e,t,n){let o=ue(e,t,n).scripts.filter(i=>i.astLanguage&&i.body.length>0),s=o[0]?.astLanguage;return s?{body:o.map(i=>`${`
13
- `.repeat(i.startLine)}${i.body}`).join(`
14
- `),startLine:0,language:s}:null}var Me=_e("ast-trees",{clearGroups:["whole-project","source-file"]});function ze(e,t){if(ce(t))return Kt(e,t);let n=D(t);if(!n)return null;let r=g(e,t);return r?Me.get(e,t,r,()=>P(n,r)):null}function is(e,t,n){if(ce(t)){let s=pe(e,t,n);if(!s)return null;let i=P(s.language,`
15
- `.repeat(s.startLine)+s.body);return i?{tree:i,language:s.language}:null}let r=D(t);if(!r)return null;let o=P(r,n);return o?{tree:o,language:r}:null}function Kt(e,t){let n=g(e,t);return n?Me.get(e,t,n,()=>{let r=pe(e,t,n);if(!r)return null;let o=`
16
- `.repeat(r.startLine)+r.body;return P(r.language,o)}):null}import{readdirSync as Qt}from"fs";import{execFileSync as Yt}from"child_process";import{extname as K,join as en}from"path";var tn=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs",".vue",".rs",".py",".pyi",".java",".kt",".kts",".scala",".sc",".clj",".cljs",".cljc",".rb",".c",".h",".cc",".cpp",".cxx",".hpp",".hh",".hxx",".cs",".vb",".php",".dart"],ms=[".vue"],qe=[".tsx",".jsx"],He=[".vue"],nn=[...qe,...He],rn=new Set(qe),on=new Set(He),Xe=new Set(tn.map(e=>e.toLowerCase())),sn=[...Xe].sort().join(","),Je=new Set(["node_modules",".git","target","dist","build",".next",".nuxt",".cache",".turbo",".nbb",".cpcache",".shadow-cljs","out","coverage",".codebaseiq-cache","__pycache__",".venv","venv",".idea",".vscode"]);function W(e,t={}){let n=t.includeIndexed??!0,r=t.includeAuxiliary??!0,o=t.extensions?.map(c=>c.toLowerCase()),s=o?new Set(o):Xe,i=o?[...s].sort().join(","):sn,a=`${n?"1":"0"}|${r?"1":"0"}|${i}`;return an.get(e,a,()=>{let c=new Set;if(n)for(let l of O(e,{includeIgnored:!1}))s.has(K(l).toLowerCase())&&c.add(l);if(r)for(let l of cn(e.config.projectRoot,s))e.isIgnored(l)||n&&c.has(l)||c.add(l);return[...c].sort()})}function ds(e,t={}){let n=!1,r=!1;for(let o of W(e,{extensions:nn})){if(t.scope&&!o.includes(t.scope))continue;let s=K(o).toLowerCase();if(n||=rn.has(s),r||=on.has(s),n&&r)break}return{react:n,vue:r}}var an=F("source-files",{clearGroups:[]});function cn(e,t){return ln(e,t)??pn(e,t)}function ln(e,t){try{let n=Yt("git",["ls-files","--cached","--others","--exclude-standard"],{cwd:e,encoding:"utf-8",timeout:1e4,killSignal:"SIGKILL",stdio:["ignore","pipe","ignore"],windowsHide:!0}),r=new Set;for(let o of n.split(`
17
- `)){let s=o.trim();s&&(un(s)||t.has(K(s).toLowerCase())&&r.add(s))}return r}catch{return null}}function un(e){return e.split("/").some(t=>Je.has(t))}function pn(e,t){let n=new Set,r=o=>{let s=o?en(e,o):e,i;try{i=Qt(s,{withFileTypes:!0})}catch{return}for(let a of i)if(!Je.has(a.name)){if(a.isDirectory()){r(o?`${o}/${a.name}`:a.name);continue}t.has(K(a.name).toLowerCase())&&n.add(o?`${o}/${a.name}`:a.name)}};return r(""),n}import{extname as hn}from"path";function Y(e,t){let n=mn(e,t);if(!n)return null;let r=Q(n);if(!r)return null;let o=dn(n);return{calleeLeaf:r,calleeQualifier:o?fn(n):void 0,calleeText:n.text,memberAccess:o,line:e.startPosition.row}}function fn(e){return(e.childForFieldName("object")??e.childForFieldName("value")??e.namedChild(0)??void 0)?.text||void 0}function mn(e,t){if(t==="rust")return e.type==="call_expression"?e.childForFieldName("function")??e.namedChild(0):e.type==="macro_invocation"?e.childForFieldName("macro")??e.namedChild(0):null;if(t==="python")return e.type!=="call"?null:e.childForFieldName("function")??e.namedChild(0);if(t==="typescript"||t==="tsx"||t==="javascript"){if(e.type==="call_expression")return e.childForFieldName("function")??e.namedChild(0);if(e.type==="new_expression")return e.childForFieldName("constructor")??e.namedChild(0)}return null}function dn(e){switch(e.type){case"field_expression":case"member_expression":case"attribute":return!0;default:return!1}}function Q(e){switch(e.type){case"identifier":case"type_identifier":case"field_identifier":case"property_identifier":case"private_property_identifier":case"shorthand_property_identifier":return e.text.replace(/^#/u,"");case"field_expression":case"member_expression":case"attribute":{let t=e.namedChild(e.namedChildCount-1);return t?Q(t):null}case"generic_function":{let t=e.childForFieldName("function")??e.namedChild(0);return t?Q(t):null}case"scoped_identifier":{let t=e.childForFieldName("name")??e.namedChild(e.namedChildCount-1);return t?Q(t):null}case"super":case"self":case"this":return null;default:return null}}var gn=new Set(["children","className","data","e","err","error","ev","event","false","id","idx","index","item","key","null","props","res","result","state","style","true","undefined","val","value"]);function ee(e){return e.length<=2||gn.has(e)}var Sn=[".tsx",".jsx"],Ze=new Set(["useActionState","useCallback","useContext","useDebugValue","useDeferredValue","useEffect","useId","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useOptimistic","useReducer","useRef","useState","useSyncExternalStore","useTransition"]),yn=new Set(["useEffect","useInsertionEffect","useLayoutEffect"]),xn=new Set(["useActionState","useOptimistic","useReducer","useRef","useState"]),vn=new Set(["useLocation","useNavigate","useParams","useSearchParams","useTranslation"]),Nn=new Set(["axios","fetch","gql","graphql","mutate","query","request","useMutation","useQuery","useSuspenseQuery"]),Cn=new Set(["add","apply","cancel","change","clear","close","create","delete","fetch","filter","handle","load","open","refresh","remove","render","reset","save","select","submit","toggle","update"]),bn=new Set(["aria-hidden","className","clipRule","d","fill","fillRule","height","role","stroke","strokeLinecap","strokeLinejoin","strokeWidth","style","viewBox","width","xmlns"]),kn=L("react-component-behavior-profiles"),Ge=Ee({kind:"react-component-behavior-profiles",invalidation:Ae("react-component-behavior-profiles"),serialize:Fn,deserialize:Pn});function et(e,t={}){let n=W(e,{extensions:Sn}).filter(o=>!t.scope||o.includes(t.scope)).sort();return(typeof t.scanLimit=="number"&&t.scanLimit>0?n.slice(0,t.scanLimit):n).flatMap(o=>me(e,o)).filter(o=>(t.minJsxTokens===void 0||o.jsxTokens.size>=t.minJsxTokens)&&(t.minBehaviorTokens===void 0||o.behaviorTokens.size>=t.minBehaviorTokens))}function me(e,t){let n=t.replace(/\\/g,"/"),r=g(e,n);return kn.get(e,n,r,()=>Tn(e,n,r)).map(Ln)}function Tn(e,t,n){let r=Fe(e,t,n),o=Ge.read(e,t,r);if(o)return o;let s=_n(e,t);return Ge.write(e,t,r,s),s}function _n(e,t){let n=An(t);if(!n)return[];let r=ze(e,t);if(!r)return[];let o=we(e,t).length;return wn(r.rootNode,n).filter(i=>i.kind==="hook"||de(i.bodyNode)).map(i=>{let a=On(i.bodyNode),c=zn(i.bodyNode,n);return{file:t,name:i.name,kind:i.kind,startLine:i.node.startPosition.row,endLine:i.node.endPosition.row,loc:Math.max(1,i.node.endPosition.row-i.node.startPosition.row+1),fileLines:o,jsxTokens:a.tokens,behaviorTokens:c.tokens,componentNames:b(a.componentNames),nativeTags:b(a.nativeTags),propNames:b(a.propNames),eventNames:b(a.eventNames),hookNames:b(c.hookNames),requestNames:b(c.requestNames),stateNames:b(c.stateNames),effectNames:b(c.effectNames),handlerNames:b(c.handlerNames)}})}function Ln(e){return{...e,jsxTokens:new Set(e.jsxTokens),behaviorTokens:new Set(e.behaviorTokens),componentNames:[...e.componentNames],nativeTags:[...e.nativeTags],propNames:[...e.propNames],eventNames:[...e.eventNames],hookNames:[...e.hookNames],requestNames:[...e.requestNames],stateNames:[...e.stateNames],effectNames:[...e.effectNames],handlerNames:[...e.handlerNames]}}function Fn(e){return JSON.stringify(e.map(t=>({...t,jsxTokens:[...t.jsxTokens],behaviorTokens:[...t.behaviorTokens]})))}function Pn(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return null;let n=[];for(let r of t){let o=En(r);if(!o)return null;n.push(o)}return n}catch{return null}}function En(e){if(!Pe(e))return null;let{file:t,name:n,kind:r,startLine:o,endLine:s,loc:i,fileLines:a,jsxTokens:c,behaviorTokens:l,componentNames:p,nativeTags:u,propNames:N,eventNames:B,hookNames:ie,requestNames:ae,stateNames:m,effectNames:C,handlerNames:$}=e;if(typeof t!="string"||typeof n!="string"||r!=="component"&&r!=="hook"||!te(o)||!te(s)||!te(i)||!te(a))return null;let S={jsxTokens:y(c),behaviorTokens:y(l),componentNames:y(p),nativeTags:y(u),propNames:y(N),eventNames:y(B),hookNames:y(ie),requestNames:y(ae),stateNames:y(m),effectNames:y(C),handlerNames:y($)};return Object.values(S).some(Bt=>Bt===null)?null:{file:t,name:n,kind:r,startLine:o,endLine:s,loc:i,fileLines:a,jsxTokens:new Set(S.jsxTokens),behaviorTokens:new Set(S.behaviorTokens),componentNames:S.componentNames,nativeTags:S.nativeTags,propNames:S.propNames,eventNames:S.eventNames,hookNames:S.hookNames,requestNames:S.requestNames,stateNames:S.stateNames,effectNames:S.effectNames,handlerNames:S.handlerNames}}function te(e){return typeof e=="number"&&Number.isFinite(e)}function An(e){let t=hn(e).toLowerCase();return t!==".tsx"&&t!==".jsx"?null:D(e)}function wn(e,t){let n=[],r=new Set,o=s=>{let i=Rn(s);if(i&&(!Bn(s)||i.kind==="component")){let a=`${i.name}:${i.node.startIndex}:${i.node.endIndex}`;r.has(a)||(r.add(a),n.push(i))}for(let a of s.namedChildren)o(a)};return(t==="tsx"||t==="javascript")&&o(e),n}function Rn(e){if(e.type==="class_declaration"){let s=fe(e);if(!s||!/^[A-Z]/.test(s))return null;let i=In(e);return!i||!Vn(e)&&!de(i)?null:{name:s,kind:"component",node:e,bodyNode:i}}if(e.type==="function_declaration"){let s=fe(e);return!s||!Ke(s)?null:{name:s,kind:Qe(s),node:e,bodyNode:e}}if(e.type!=="variable_declarator")return null;let t=e.childForFieldName("name")??e.namedChild(0),n=e.childForFieldName("value")??e.namedChild(1),r=U(t);if(!r||!n||!Ke(r))return null;let o=jn(n);return o?{name:r,kind:Qe(r),node:e,bodyNode:o}:null}function In(e){for(let t of e.namedChildren)if(t.type==="class_body")for(let n of t.namedChildren){if(n.type!=="method_definition")continue;if((n.childForFieldName("name")??n.namedChild(0))?.text==="render")return n}return null}function Vn(e){return/\b(?:React\.)?(?:Pure)?Component\b/.test(e.text)}function Ke(e){return/^[A-Z]/.test(e)||/^use[A-Z0-9_]/.test(e)}function Qe(e){return/^use[A-Z0-9_]/.test(e)?"hook":"component"}function jn(e){if(e.type==="arrow_function"||e.type==="function_expression")return e;if(e.type!=="call_expression")return null;let t=$n(e);return t!=="memo"&&t!=="forwardRef"?null:e.namedChildren.find(o=>o.type==="arguments")?.namedChildren.find(o=>o.type==="arrow_function"||o.type==="function_expression")??null}function Bn(e){let t=e.parent;for(;t;){if(t.type==="function_declaration"||t.type==="function_expression"||t.type==="arrow_function"||t.type==="method_definition")return!0;t=t.parent}return!1}function fe(e){return U(e.childForFieldName("name")??e.namedChild(0))}function $n(e){let t=e.childForFieldName("function")??e.namedChild(0);return t?t.text.split(".").pop()??t.text:null}function de(e){return e.type.startsWith("jsx_")?!0:e.namedChildren.some(de)}function On(e){let t={tokens:new Set,componentNames:new Set,nativeTags:new Set,propNames:new Set,eventNames:new Set},n=r=>{r.type==="jsx_opening_element"||r.type==="jsx_self_closing_element"?Dn(r,t):r.type==="jsx_element"&&r.text.trimStart().startsWith("<>")?t.tokens.add("jsx:fragment"):r.type==="jsx_expression"?Wn(r,t):r.type==="jsx_fragment"&&t.tokens.add("jsx:fragment");for(let o of r.children)n(o)};return n(e),t}function Dn(e,t){let n=Un(e),r=!1;if(n){let o=Ye(n),s=o==="Fragment"||o==="React.Fragment";r=Zn(o)&&!s,s?t.tokens.add("jsx:fragment"):r?(t.componentNames.add(o),t.tokens.add(`component:${o}`)):(t.nativeTags.add(o),t.tokens.add(`native:${o}`))}for(let o of e.namedChildren)if(o.type==="jsx_attribute"){let s=Mn(o);if(!s)continue;let i=Ye(s);if(i.startsWith("on")&&i.length>2){let a=i.slice(2).replace(/^[A-Z]/,c=>c.toLowerCase());t.eventNames.add(a),t.tokens.add(`event:${a}`)}else bn.has(i)||(t.propNames.add(i),t.tokens.add(`${r?"prop":"native-prop"}:${i}`))}else o.type==="jsx_spread_attribute"&&t.tokens.add(tt(o))}function Wn(e,t){let n=e.text;/^\{\s*\.\.\./.test(n)&&t.tokens.add(tt(e)),nt(e)&&t.tokens.add("jsx:conditional"),(n.includes(".map(")||n.includes(".flatMap("))&&t.tokens.add("jsx:list");for(let r of Gn(n))ee(r)||t.tokens.add(`binding:${r}`)}function tt(e){let t=/^\{\s*\.\.\.\s*([^}]+)\s*\}$/.exec(e.text)?.[1],n=e.namedChildren.find(s=>s.type!=="comment"),r=t??n?.text??"",o=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*$/.exec(r.trim())?.[0];return o?`prop:spread:${o}`:"prop:spread"}function nt(e){return e.type==="ternary_expression"||e.type==="conditional_expression"?!0:e.namedChildren.some(nt)}function Un(e){for(let t of e.namedChildren)if(t.type==="identifier"||t.type==="jsx_identifier"||t.type==="property_identifier"||t.type==="member_expression"||t.type==="jsx_member_expression")return t.text;return/^<\s*([A-Za-z][\w$.]*)/.exec(e.text)?.[1]??null}function Mn(e){for(let t of e.namedChildren)if(t.type==="property_identifier"||t.type==="identifier"||t.type==="jsx_identifier")return t.text;return/^([A-Za-z_$][\w$:-]*)/.exec(e.text)?.[1]??null}function zn(e,t){let n={tokens:new Set,hookNames:new Set,requestNames:new Set,stateNames:new Set,effectNames:new Set,handlerNames:new Set},r=o=>{if(o.type==="call_expression"){let s=Y(o,t);s&&qn(s.calleeLeaf,n)}else if(o.type==="variable_declarator")Xn(o,n);else if(o.type==="function_declaration"){let s=fe(o);s&&rt(s,n)}for(let s of o.namedChildren)r(s)};return r(e),n}function qn(e,t){/^use[A-Z0-9_]/.test(e)&&(t.hookNames.add(e),!Ze.has(e)&&!vn.has(e)&&t.tokens.add(`hook:${e}`)),Ze.has(e)&&t.tokens.add(`react-hook:${e}`),yn.has(e)&&(t.effectNames.add(e),t.tokens.add(`effect:${e}`)),xn.has(e)&&t.tokens.add(`state-hook:${e}`),Hn(e)&&(t.requestNames.add(e),t.tokens.add(`request:${e}`))}function Hn(e){if(Nn.has(e))return!0;let t=/^use([A-Z0-9_].*)$/.exec(e)?.[1];return t?/(Query|Mutation|Fetch|Resource)$/.test(t):!1}function Xn(e,t){let n=e.childForFieldName("name")??e.namedChild(0),r=e.childForFieldName("value")??e.namedChild(1);if(n?.type==="array_pattern"&&r?.text.includes("useState")){let s=n.namedChildren.find(a=>U(a)),i=U(s);i&&(t.stateNames.add(i),t.tokens.add(`state:${i}`))}let o=U(n);o&&rt(o,t)}function rt(e,t){let n=Jn(e);!n||!Cn.has(n)||(t.handlerNames.add(e),t.tokens.add(`handler:${e}`),t.tokens.add(`handler-verb:${n}`))}function Jn(e){let t=e.startsWith("handle")&&e.length>6?e.slice(6).replace(/^[A-Z]/,n=>n.toLowerCase()):e;return/^[a-z]+/.exec(t)?.[0]??null}function Zn(e){return/^[A-Z]/.test(e)||e.includes(".")}function Ye(e){return e.replace(/^this\./,"").replace(/\$/g,".")}function U(e){return e&&(e.type==="identifier"||e.type==="property_identifier"||e.type==="shorthand_property_identifier"||/^[A-Za-z_$][\w$]*$/.test(e.text))?e.text:null}function Gn(e){let t=[];for(let n of e.matchAll(/\b[A-Za-z_$][\w$]*\b/g)){let r=n[0];t.includes(r)||t.push(r)}return t}function b(e){return[...e].sort()}function M(e){return e.type==="comment"||e.type==="line_comment"||e.type==="block_comment"}var Kn=new Set(["function_declaration","generator_function_declaration","method_definition","method_signature","function_signature"]),ot=new Set(["arrow_function","function_expression","generator_function"]);function ut(e,t){let n=Yn(e,t);if(n)return{name:n.name,startLine:n.definitionNode.startPosition.row,endLine:n.definitionNode.endPosition.row,paramCount:ct(n.functionNode),params:st(n.functionNode),paramsEndLine:it(n.functionNode),isLiteralPassthrough:lt(n.functionNode,t)};if(!Qn(e.type,t))return null;let r=e.childForFieldName("name")??e.namedChildren.find(o=>o.type==="identifier"||o.type==="property_identifier");return r?{name:r.text,startLine:e.startPosition.row,endLine:e.endPosition.row,paramCount:ct(e),params:st(e),paramsEndLine:it(e),isLiteralPassthrough:lt(e,t)}:null}function pt(e){return e.namedChildren.find(t=>t.type==="parameters"||t.type==="formal_parameters")}function st(e){let t=pt(e);if(!t)return[];let n=[];for(let r of t.namedChildren){if(M(r))continue;if(r.type==="identifier"){n.push({name:r.text,simple:!0});continue}let o=r.namedChildren.some(a=>a.type.endsWith("_modifier"))||/^\s*(?:public|private|protected|readonly|override)\b/.test(r.text),s=r.childForFieldName("pattern");if(!o&&s&&s.type==="identifier"){n.push({name:s.text,simple:!0});continue}let i=r.namedChildren.find(a=>a.type==="identifier");n.push({name:s?.type==="identifier"?s.text:i?.text??"",simple:!1})}return n}function it(e){let t=pt(e);return t?t.endPosition.row:e.startPosition.row}function Qn(e,t){return t==="rust"?e==="function_item"||e==="function_signature_item":t==="python"?e==="function_definition":t==="typescript"||t==="tsx"||t==="javascript"?Kn.has(e):!1}function Yn(e,t){if(t!=="typescript"&&t!=="tsx"&&t!=="javascript")return null;if(e.type==="variable_declarator"){let n=e.childForFieldName("name")??e.namedChild(0),r=e.childForFieldName("value")??e.namedChild(1);if(!n||!r)return null;let o=at(r);return o?{name:n.text,definitionNode:e,functionNode:o}:null}if(e.type==="public_field_definition"){let n=e.childForFieldName("name")??e.namedChild(0),r=e.childForFieldName("value")??e.namedChild(1);if(!n||!r)return null;let o=at(r);return o?{name:n.text,definitionNode:e,functionNode:o}:null}return null}function at(e){if(ot.has(e.type))return e;if(e.type!=="call_expression"||(e.childForFieldName("function")??e.namedChild(0))?.type!=="call_expression")return null;let r=((e.childForFieldName("arguments")??e.namedChildren.find(o=>o.type==="arguments"))?.namedChildren??[]).filter(o=>ot.has(o.type));return r.length===1?r[0]:null}function ct(e){let t=e.namedChildren.find(r=>r.type==="parameters"||r.type==="formal_parameters");if(!t)return 0;let n=0;for(let r of t.namedChildren)M(r)||(n+=1);return n}function lt(e,t){let n=e.namedChildren.find(u=>u.type==="block"||u.type==="statement_block");if(!n)return!1;let r=n.namedChildren.filter(u=>!M(u));if(r.length!==1)return!1;let o=r[0],s=null;if(o.type==="return_statement"||o.type==="expression_statement"?s=o.namedChild(0)??null:t==="rust"&&(o.type==="call_expression"||o.type==="macro_invocation")&&(s=o),!s)return!1;let i=t==="python"?"call":"call_expression";if(s.type!==i)return!1;let a=s.namedChildren.find(u=>u.type==="arguments"||u.type==="argument_list");if(!a)return!1;let c=a.namedChildren.filter(u=>!M(u)),l=e.namedChildren.find(u=>u.type==="parameters"||u.type==="formal_parameters");if(!l)return!1;let p=[];for(let u of l.namedChildren){if(u.type==="identifier"){p.push(u.text);continue}let N=u.namedChildren.find(B=>B.type==="identifier");N&&p.push(N.text)}if(c.length!==p.length)return!1;for(let u=0;u<p.length;u+=1){let N=c[u];if(N.type!=="identifier"||N.text!==p[u])return!1}return!0}var er=new Set(["ref","shallowRef","reactive","computed","watch","watchEffect"]),tr=new Set(["onBeforeMount","onMounted","onBeforeUpdate","onUpdated","onBeforeUnmount","onUnmounted","onActivated","onDeactivated","onErrorCaptured"]),nr=new Set(["axios","fetch","runRequest","useAsyncData","useFetch","useResource"]),rr=new Set(["defineEmits","defineExpose","defineModel","defineOptions","defineProps","withDefaults"]),or=new Set(["catch","for","function","if","return","switch","while"]);function re(e){let t={imports:[],functions:[],calls:[],composables:[],stores:[],reactivity:[],lifecycle:[],requests:[],macros:[],lineCount:0,externalLineCount:0,externalScriptPaths:[],unresolvedScripts:[]};for(let n of e.scripts){t.lineCount+=E(n),n.external&&(t.externalLineCount+=E(n),t.externalScriptPaths.push(n.sourcePath));for(let o of n.errors)t.unresolvedScripts.push({sourcePath:n.sourcePath,reason:o});if(!n.body||!n.astLanguage){n.astLanguage||t.unresolvedScripts.push({sourcePath:n.sourcePath,reason:`Unsupported Vue script language: ${n.lang??"unknown"}`});continue}t.imports.push(...cr(n));let r=P(n.astLanguage,n.body);r?ir(n,r.rootNode,t):ar(n,t)}return sr(t),t.externalScriptPaths=mt(t.externalScriptPaths),t}function sr(e){e.composables=I(e,"composable"),e.stores=I(e,"store"),e.reactivity=I(e,"reactivity"),e.lifecycle=I(e,"lifecycle"),e.requests=I(e,"request"),e.macros=I(e,"macro")}function I(e,t){return mt(e.calls.filter(n=>n.categories.includes(t)).map(n=>n.name))}function ir(e,t,n){let r=new Set,o=new Set,s=i=>{let a=ut(i,e.astLanguage);if(a){let l=`${a.name}:${a.startLine}:${a.endLine}`;o.has(l)||(o.add(l),n.functions.push({name:a.name,sourcePath:e.sourcePath,startLine:e.startLine+a.startLine,endLine:e.startLine+a.endLine,setup:e.setup}))}let c=Y(i,e.astLanguage);if(c){let l=`${c.calleeLeaf}:${c.line}`;r.has(l)||(r.add(l),n.calls.push({name:c.calleeLeaf,sourcePath:e.sourcePath,line:e.startLine+c.line,categories:ft(c.calleeLeaf),setup:e.setup}))}for(let l of i.children)s(l)};s(t)}function ar(e,t){for(let n of e.body.matchAll(/\b([A-Za-z_$][\w$]*)\s*\(/g)){let r=n[1];!r||or.has(r)||t.calls.push({name:r,sourcePath:e.sourcePath,line:e.startLine+ne(e.body,n.index??0),categories:ft(r),setup:e.setup})}for(let n of e.body.matchAll(/\bfunction\s+([A-Za-z_$][\w$]*)\b/g)){let r=n[1];if(!r)continue;let o=e.startLine+ne(e.body,n.index??0);t.functions.push({name:r,sourcePath:e.sourcePath,startLine:o,endLine:o,setup:e.setup})}for(let n of e.body.matchAll(/\b(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*=\s*(?:async\s*)?(?:function\b|\([^)]*\)\s*=>|[A-Za-z_$][\w$]*\s*=>)/g)){let r=n[1];if(!r)continue;let o=e.startLine+ne(e.body,n.index??0);t.functions.push({name:r,sourcePath:e.sourcePath,startLine:o,endLine:o,setup:e.setup})}}function cr(e){let t=[];for(let n of e.body.matchAll(/\bimport\s+(?:type\s+)?([^'";]+?)\s+from\s+['"]([^'"]+)['"]/g)){let r=n[1]?.trim(),o=n[2];if(!r||!o)continue;let s=e.startLine+ne(e.body,n.index??0);for(let i of lr(r))t.push({local:i,source:o,sourcePath:e.sourcePath,line:s,setup:e.setup})}return t}function lr(e){let t=[],r=e.split(",").map(i=>i.trim()).filter(Boolean)[0];r&&!r.startsWith("{")&&!r.startsWith("*")&&t.push(r);let o=/\{([^}]*)\}/.exec(e)?.[1];if(o)for(let i of o.split(",")){let a=i.trim();if(!a)continue;let c=/\bas\s+([A-Za-z_$][\w$]*)$/.exec(a)?.[1];t.push(c??a.replace(/^type\s+/,"").trim())}let s=/\*\s+as\s+([A-Za-z_$][\w$]*)/.exec(e)?.[1];return s&&t.push(s),t.filter(i=>/^[A-Za-z_$][\w$]*$/.test(i))}function ft(e){let t=["call"];return/^use[A-Z0-9_]/.test(e)&&t.push("composable"),/^use[A-Z0-9_].*Store$/.test(e)&&t.push("store"),er.has(e)&&t.push("reactivity"),tr.has(e)&&t.push("lifecycle"),nr.has(e)&&t.push("request"),rr.has(e)&&t.push("macro"),t}function ne(e,t){let n=0;for(let r=0;r<t&&r<e.length;r+=1)e.charCodeAt(r)===10&&(n+=1);return n}function mt(e){return[...new Set(e)].sort()}import{ElementTypes as ur,NodeTypes as ge,parse as pr}from"@vue/compiler-dom";import{parse as Ws}from"@vue/compiler-sfc";function dt(e,t){return e.split(t).filter(Boolean).map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join("")}var fr=L("vue-template-facts"),mr=new Set(["component","keep-alive","slot","suspense","teleport","template","transition","transition-group"]),dr=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"]),gr=new Set(["div","span","template"]),hr=new Set(["as","await","break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","if","import","in","instanceof","let","new","null","of","return","super","switch","this","throw","true","try","typeof","undefined","var","void","while","with","yield"]);function oe(e,t){let n=t.replace(/\\/g,"/"),r=g(e,n);return fr.get(e,n,r,()=>Sr(n,R(e,n).template))}function Sr(e,t){let n={relativePath:e,template:t?{startLine:t.startLine,endLine:t.endLine}:null,componentTags:[],nativeTags:[],builtinTags:[],props:[],events:[],directives:[],slots:[],expressionIdentifiers:[],structuralTokens:[]};if(!t)return n;let r;try{r=pr(t.body,{comments:!1})}catch{return n}let o=new Set,s=i=>{i.trim()&&o.add(i)};return ht(r.children,t.startLine,n,s),n.structuralTokens=[...o].sort(),n}function ht(e,t,n,r){for(let o of e)if(o.type===ge.ELEMENT)yr(o,t,n,r),ht(o.children,t,n,r);else if(o.type===ge.INTERPOLATION){r("interpolation");let s=he(o.content);s&&St(s,t,o.loc.start.line,n,r)}}function yr(e,t,n,r){let o=Tr(e.tag),s={tag:e.tag,normalized:o,kind:kr(e),startLine:V(t,e.loc.start.line),endLine:V(t,e.loc.end.line)};s.kind==="component"?(n.componentTags.push(s),r(`component:${o}`)):s.kind==="builtin"?(n.builtinTags.push(s),r(`builtin:${o}`)):(n.nativeTags.push(s),gr.has(e.tag)||r(`native:${e.tag}`));for(let i of e.props)xr(i,t,n,r)}function xr(e,t,n,r){if(e.type===ge.ATTRIBUTE){let a=e.value?.content??null,c=gt("prop",e.name,a,t,e.loc.start.line,e.loc.end.line);n.props.push(c),r(`prop:${e.name}`);return}let o=Nr(e),s=he(e.exp),i=gt(vr(e.name),o,s,t,e.loc.start.line,e.loc.end.line);switch(i.kind){case"prop":n.props.push(i),r(`prop:${o}`);break;case"event":n.events.push(i),r(`event:${o}`);break;case"slot":n.slots.push(i),r(`slot:${o}`);break;case"directive":n.directives.push(i),r(`directive:${o}`);break}s&&St(s,t,e.loc.start.line,n,r)}function gt(e,t,n,r,o,s){return{kind:e,name:t,value:n,startLine:V(r,o),endLine:V(r,s)}}function vr(e){switch(e){case"bind":case"model":return"prop";case"on":return"event";case"slot":return"slot";default:return"directive"}}function Nr(e){let t=he(e.arg);return t||e.name}function he(e){if(!e)return null;let t=("content"in e&&typeof e.content=="string"?e.content:e.loc.source).trim();return t||null}function St(e,t,n,r,o){for(let s of Cr(e)){let i={name:s,startLine:V(t,n),endLine:V(t,n)};r.expressionIdentifiers.push(i),o(`id:${s}`)}}function Cr(e){let t=new Set,n=br(e),r=/\b[A-Za-z_$][A-Za-z0-9_$]*\b/g,o;for(;o=r.exec(n);){let s=o[0];hr.has(s)||ee(s)||/^[A-Z_]+$/.test(s)||t.add(s)}return[...t].sort()}function br(e){return e.replace(/\/\*[\s\S]*?\*\//g," ").replace(/\/\/.*$/gm," ").replace(/`(?:\\[\s\S]|\$\{([^}]*)\}|[^`\\])*`/g,(t,n)=>n??" ").replace(/'(?:\\[\s\S]|[^'\\])*'/g," ").replace(/"(?:\\[\s\S]|[^"\\])*"/g," ")}function kr(e){let t=e.tag;return e.tagType===ur.COMPONENT?"component":mr.has(t)?"builtin":dr.has(t)?"native":/^[A-Z]/.test(t)||t.includes("-")?"component":"native"}function Tr(e){return dt(e,/[-_:]/)}function V(e,t){return e+Math.max(0,t-1)}import{createRequire as jr}from"module";import{existsSync as w}from"fs";import{basename as xt,dirname as h,extname as k,join as x,relative as A,resolve as f,sep as Br}from"path";import{existsSync as ye,readdirSync as _r,statSync as Lr}from"fs";import{join as j,relative as Fr}from"path";function yt(e){let t=Pr(e)??Rr(e);if(!t||t.length===0)return[];let n=[],r=new Set;for(let o of t)for(let s of Ir(e,o)){if(r.has(s))continue;r.add(s);let i=Vr(e,s);i&&n.push(i)}return n}function Pr(e){let t=j(e,"pnpm-workspace.yaml");if(!ye(t))return null;try{return Er(H(t,"pnpm workspace manifest"))}catch{return null}}function Er(e){let t=[],n=!1;for(let r of e.split(/\r?\n/)){let o=Ar(r);if(!n){/^packages\s*:\s*$/.test(o.trim())&&(n=!0);continue}let s=/^\s+-\s*(.+)$/.exec(o);if(s){let i=wr(s[1].trim());i&&t.push(i);continue}if(o.trim()!=="")break}return t}function Ar(e){let t=e.indexOf("#");return t===-1?e:e.slice(0,t)}function wr(e){return e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")?e.slice(1,-1):e}function Rr(e){let t=j(e,"package.json");if(!ye(t))return null;try{let n=JSON.parse(H(t,"workspace package manifest"));return n.workspaces?Array.isArray(n.workspaces)?n.workspaces:n.workspaces.packages??[]:null}catch{return null}}function Ir(e,t){if(!t||t.startsWith("!")||t.includes("node_modules"))return[];if(!t.includes("*")){let i=j(e,t);return Se(i)?[i]:[]}let n=t.indexOf("*"),r=t.slice(0,n).replace(/\/$/,""),o=t.slice(n+1).replace(/^\//,""),s=j(e,r||".");return Se(s)?_r(s).map(i=>j(s,i,o)).filter(Se):[]}function Se(e){try{return Lr(e).isDirectory()}catch{return!1}}function Vr(e,t){let n=j(t,"package.json");if(!ye(n))return null;try{let r=JSON.parse(H(n,"workspace package manifest"));return typeof r.name!="string"||r.name.length===0?null:{name:r.name,relativeDir:Fr(e,t).replace(/\\/g,"/"),exports:r.exports}}catch{return null}}var $r=X("indexed-paths",{clearGroups:[]}),Or=X("indexed-path-digest",{clearGroups:[]}),Dr=F("tsconfig-alias-config",{clearGroups:["whole-project"]}),Wr=F("tsconfig-alias-config-for-dir",{clearGroups:["whole-project"]}),Ur=jr(import.meta.url),z;function Mr(){if(z!==void 0)return z;try{z=Ur("typescript")}catch{z=null}return z}var zr=["tsconfig.json","tsconfig.app.json","tsconfig.node.json","tsconfig.base.json"],qr=X("workspace-packages",{clearGroups:["whole-project"]}),q=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs",".vue"],vt=[".py",".pyi"],Nt=[".java",".scala",".kt",".kts"],Ct=[".rs"],bt=[".rb"],kt=[".c",".h",".cc",".cpp",".cxx",".hpp",".hh",".hxx"],Tt=[".cs",".vb"],_t=[".dart"],Lt=[".php"],se=[".clj",".cljs",".cljc"],Hr=new Set(q),xe=new Set(vt),Ft=new Set(Nt),ve=new Set(Ct),Ne=new Set(bt),Pt=new Set(kt),Et=new Set(Tt),Ce=new Set(_t),At=new Set(Lt),wt=new Set(se),Xr=[{extensions:q,lookup:Hr},{extensions:vt,lookup:xe},{extensions:Nt,lookup:Ft},{extensions:Ct,lookup:ve},{extensions:bt,lookup:Ne},{extensions:kt,lookup:Pt},{extensions:Tt,lookup:Et},{extensions:_t,lookup:Ce},{extensions:Lt,lookup:At},{extensions:se,lookup:wt}];function T(e,t){return t.has(k(e).toLowerCase())}function Jr(e){return T(e,xe)}function Zr(e){return T(e,Ft)}function Gr(e){return T(e,ve)}function Kr(e){return T(e,Ne)}function Qr(e){return T(e,Pt)}function Yr(e){return T(e,Et)}function ii(e){return k(e).toLowerCase()===".vb"}function eo(e){return T(e,Ce)}function to(e){return T(e,At)}function no(e){return T(e,wt)}function ro(e){let t=k(e).toLowerCase();for(let n of Xr)if(n.lookup.has(t))return n.extensions;return q}function oo(e){return Zr(e)||Yr(e)||to(e)}function Rt(e,t,n){return Jr(t)?yo(e,t,n):Gr(t)?xo(e,t,n):Kr(t)?vo(e,t,n):Qr(t)?No(e,t,n):oo(t)?Co(e,n.replace(/\\/g,"."),ro(t)):eo(t)?bo(e,t,n):no(t)?ko(e,n):so(e,t,n)}function so(e,t,n){if(!n.startsWith(".")&&!n.startsWith("/"))return io(e,t,n)??co(e,n);let r=h(x(e.config.projectRoot,t)),o=f(r,n),s=_(e);for(let i of ke(o)){let a=v(A(e.config.projectRoot,i));if(s.has(a)||w(i))return a}return v(A(e.config.projectRoot,o))}function io(e,t,n){let r=go(e,t);if(!r)return null;let o=_(e);for(let s of ao(r,n)){let i=f(r.baseUrl,s);for(let a of ke(i)){let c=v(A(e.config.projectRoot,a));if(o.has(c)||w(a))return c}}return null}function ao(e,t){let n=[];for(let[r,o]of Object.entries(e.paths)){let s=r.indexOf("*");if(s===-1){if(t!==r)continue;n.push(...o);continue}let i=r.slice(0,s),a=r.slice(s+1);if(!t.startsWith(i)||!t.endsWith(a)||t.length<i.length+a.length)continue;let c=t.slice(i.length,t.length-a.length);for(let l of o)n.push(l.includes("*")?l.replace("*",c):l)}return n}function co(e,t){let n=uo(lo(e),t);if(!n)return null;let r=_(e);for(let o of po(n)){let s=f(e.config.projectRoot,n.pkg.relativeDir,o);for(let i of ke(s)){let a=v(A(e.config.projectRoot,i));if(r.has(a)||w(i))return a}}return null}function lo(e){return qr.get(e,()=>yt(e.config.projectRoot))}function uo(e,t){let n=null;for(let r of e){let o=null;t===r.name?o="":t.startsWith(`${r.name}/`)&&(o=t.slice(r.name.length+1)),o!==null&&(!n||r.name.length>n.pkg.name.length)&&(n={pkg:r,subpath:o})}return n}function po(e){let t=[],n=fo(e.pkg.exports,e.subpath);if(n){let r=mo(n);r&&t.push(r)}return t.push(e.subpath?`src/${e.subpath}`:"src/index"),t}function fo(e,t){if(!e||typeof e!="object")return null;let n=t===""?".":`./${t}`;return It(e[n])}function It(e){if(typeof e=="string")return e;if(!e||typeof e!="object")return null;let t=e;for(let n of["types","import","default","require","node"]){let r=It(t[n]);if(r)return r}return null}function mo(e){let t=e.replace(/^\.\//,"");return t.startsWith("dist/")?`src/${t.slice(5)}`:null}function go(e,t){let n=v(h(t));return Wr.get(e,n,()=>ho(e,n))}function ho(e,t){let n=Mr();if(!n)return null;let r=f(e.config.projectRoot),o=f(r,t);for(;o===r||o.startsWith(r+Br);){for(let i of zr){let a=x(o,i);if(!w(a))continue;let c=Dr.get(e,a,()=>So(n,a));if(c)return c}let s=h(o);if(s===o)break;o=s}return null}function So(e,t){try{let n=e.readConfigFile(t,e.sys.readFile);if(n.error||!n.config)return null;let r=e.parseJsonConfigFileContent(n.config,e.sys,h(t)),o=r.options.paths;return!o||Object.keys(o).length===0?null:{baseUrl:r.options.baseUrl?f(h(t),r.options.baseUrl):h(t),paths:o}}catch{return null}}function yo(e,t,n){let r=_(e),o;if(n.startsWith(".")){let s=n.match(/^(\.+)(.*)$/);if(!s)return null;let i=s[1].length,a=s[2].replace(/^\./,""),c=h(x(e.config.projectRoot,t));for(let l=1;l<i;l++)c=h(c);o=a?f(c,a.replace(/\./g,"/")):c}else o=f(e.config.projectRoot,n.replace(/\./g,"/"));for(let s of To(o)){let i=v(A(e.config.projectRoot,s));if(r.has(i)||w(s))return i}return null}function xo(e,t,n){if(!n)return null;let r=n.replace(/\s+as\s+.+$/,"").trim();if(!r.startsWith("crate::")&&!r.startsWith("self::")&&!r.startsWith("super::"))return null;let o=h(x(e.config.projectRoot,t)),s;return r.startsWith("crate::")?s=f(e.config.projectRoot,"src",r.slice(7).replace(/::/g,"/")):r.startsWith("self::")?s=f(o,r.slice(6).replace(/::/g,"/")):s=f(h(o),r.slice(7).replace(/::/g,"/")),be(e,_o(s))}function vo(e,t,n){let r=h(x(e.config.projectRoot,t)),o=f(r,n);return be(e,Lo(o))}function No(e,t,n){let r=h(x(e.config.projectRoot,t)),o=[f(r,n),f(e.config.projectRoot,n),f(e.config.projectRoot,"include",n),f(e.config.projectRoot,"src",n)];return be(e,o)}function Co(e,t,n){let r=_(e),o=t.replace(/\\/g,".").replace(/::/g,".").replace(/^global::/,""),s=o.replace(/\./g,"/"),i=o.split(".").pop()??o;for(let c of n){let l=`${s}${c}`,p=[...r].find(u=>u.endsWith(l));if(p)return p}for(let c of n){let l=[...r].find(p=>xt(p)===`${i}${c}`);if(l)return l}let a=[...r].filter(c=>n.includes(k(c).toLowerCase())).filter(c=>c.includes(`/${s}/`)||c.includes(`/${i}/`)).sort((c,l)=>c.localeCompare(l));return a.length===1?a[0]:null}function bo(e,t,n){let r=_(e);if(n.startsWith("package:")){let i=n.slice(8),a=i.indexOf("/");if(a<0)return null;let c=i.slice(a+1),l=v(c.startsWith("lib/")?c:`lib/${c}`);return r.has(l)?l:null}let o=h(x(e.config.projectRoot,t)),s=f(o,n);for(let i of Fo(s)){let a=v(A(e.config.projectRoot,i));if(r.has(a)||w(i))return a}return null}function ko(e,t){let n=t.replace(/-/g,"_").replace(/\./g,"/"),r=_(e);for(let o of se){let s=`${n}${o}`,i=[...r].find(a=>a.endsWith(s));if(i)return i}for(let o of se){let s=[...r].find(i=>xt(i)===`${n.split("/").pop()}${o}`);if(s)return s}return null}function To(e){let t=k(e);return xe.has(t)?[e]:[`${e}.py`,`${e}.pyi`,x(e,"__init__.py"),x(e,"__init__.pyi")]}function be(e,t){let n=_(e);for(let r of t){let o=v(A(e.config.projectRoot,r));if(n.has(o)||w(r))return o}return null}function _o(e){let t=k(e);return ve.has(t)?[e]:[`${e}.rs`,x(e,"mod.rs")]}function Lo(e){let t=k(e);return Ne.has(t)?[e]:[`${e}.rb`,x(e,"index.rb")]}function Fo(e){let t=k(e);return Ce.has(t)?[e]:[`${e}.dart`,e]}function ke(e){let t=k(e),n=new Set;if(t){n.add(e);for(let r of q)n.add(e.slice(0,-t.length)+r)}else for(let r of q)n.add(`${e}${r}`),n.add(x(e,`index${r}`));return[...n]}function _(e){return $r.get(e,()=>new Set(O(e,{includeIgnored:!1}).map(v)))}function ai(e){return Or.get(e,()=>Le([..._(e)].sort().join(`
18
- `)))}var Po=new Set(["in","key","of"]),Eo=new Set(["computed","defineEmits","defineProps","reactive","ref","watch","watchEffect"]),Ao=L("vue-component-behavior-profiles");function Vt(e,t={}){let n=W(e,{extensions:[".vue"]}).filter(o=>!t.scope||o.includes(t.scope)).sort();return(typeof t.scanLimit=="number"&&t.scanLimit>0?n.slice(0,t.scanLimit):n).map(o=>Te(e,o)).filter(o=>(t.minTemplateTokens===void 0||o.templateTokens.size>=t.minTemplateTokens)&&(t.minBehaviorTokens===void 0||o.behaviorTokens.size>=t.minBehaviorTokens))}function Te(e,t){let n=t.replace(/\\/g,"/"),r=g(e,n),o=Ao.get(e,n,r,()=>wo(e,n,r));return Io(o)}function wo(e,t,n){let r=R(e,t),o=oe(e,t),s=re(r),i=Bo(o),a=o.expressionIdentifiers.map(m=>m.name).filter(m=>!i.includes(m)).filter((m,C,$)=>$.indexOf(m)===C).sort(),c=o.componentTags.map(m=>m.normalized).filter((m,C,$)=>$.indexOf(m)===C).sort(),l=n?n.split(`
19
- `).length:0,p=E(r.template),u=s.lineCount,N=r.styles.reduce((m,C)=>m+E(C),0),B=r.customBlocks.reduce((m,C)=>m+E(C),0),{lines:ie,paths:ae}=Ro(e,t,s);return{file:t,sfc:r,templateFacts:o,scriptFacts:s,templateTokens:new Set(o.structuralTokens),behaviorTokens:jo(o,s,a),templateBindingNames:a,templateLocalNames:i,componentNames:c,sfcLines:l,totalLines:l+s.externalLineCount,templateLines:p,scriptLines:u,styleLines:N,externalScriptLines:s.externalLineCount,externalScriptPaths:s.externalScriptPaths,customBlockLines:B,delegatedComposableLines:ie,delegatedComposablePaths:ae}}function Ro(e,t,n){let r=new Set;for(let i of n.composables){let a=n.imports.find(l=>l.local===i);if(!a)continue;let c=Rt(e,a.sourcePath,a.source);!c||c===t||r.add(c)}let o=[...r].sort();return{lines:o.reduce((i,a)=>{let c=g(e,a);return i+(c?c.split(`
20
- `).length:0)},0),paths:o}}function Io(e){let t=Vo(e.scriptFacts);return{...e,scriptFacts:t,templateTokens:new Set(e.templateTokens),behaviorTokens:new Set(e.behaviorTokens),templateBindingNames:[...e.templateBindingNames],templateLocalNames:[...e.templateLocalNames],componentNames:[...e.componentNames],externalScriptPaths:t.externalScriptPaths,delegatedComposablePaths:[...e.delegatedComposablePaths]}}function Vo(e){return{...e,imports:e.imports.map(t=>({...t})),functions:e.functions.map(t=>({...t})),calls:e.calls.map(t=>({...t,categories:[...t.categories]})),composables:[...e.composables],stores:[...e.stores],reactivity:[...e.reactivity],lifecycle:[...e.lifecycle],requests:[...e.requests],macros:[...e.macros],externalScriptPaths:[...e.externalScriptPaths],unresolvedScripts:e.unresolvedScripts.map(t=>({...t}))}}function jo(e,t,n){let r=new Set;for(let o of t.composables)r.add(`composable:${o}`);for(let o of t.stores)r.add(`store:${o}`);for(let o of t.reactivity)r.add(`reactivity:${o}`);for(let o of t.lifecycle)r.add(`lifecycle:${o}`);for(let o of t.requests)r.add(`request:${o}`);for(let o of t.macros)r.add(`macro:${o}`);for(let o of t.functions){if(Eo.has(o.name))continue;r.add(`function:${o.name}`);let s=/^[a-z]+/.exec(o.name)?.[0]??null;s&&s.length>2&&s!==o.name&&r.add(`function-verb:${s}`)}for(let o of e.events)r.add(`template-event:${o.name}`);for(let o of n)r.add(`template-binding:${o}`);return r}function Bo(e){let t=new Set;for(let n of e.directives)if(n.name==="for"&&n.value)for(let r of $o(n.value))t.add(r);for(let n of e.slots)if(n.value)for(let r of jt(n.value))t.add(r);return[...t].sort()}function $o(e){let t=/^(.*?)\s+(?:in|of)\s+/.exec(e.trim());return t?jt(t[1]??""):[]}function jt(e){let t=[];for(let n of e.matchAll(/\b[A-Za-z_$][\w$]*\b/g)){let r=n[0];Po.has(r)||t.push(r)}return t}function Ci(e){return{capability:(t,n)=>Oo(t,n),reactProfiles:(t={})=>et(e,t),reactProfilesForFile:t=>me(e,t),vueProfiles:(t={})=>Vt(e,t),vueProfileForFile:t=>Te(e,t),vueTemplateFacts:t=>oe(e,t),vueScriptFacts:t=>re(R(e,t))}}function Oo(e,t){let n=e.startsWith("react-")?"react":"vue";if(t===void 0)return{slot:e,available:!0,framework:n};let r=t.replace(/\\/g,"/").toLowerCase();return n==="react"&&!r.endsWith(".tsx")&&!r.endsWith(".jsx")?{slot:e,available:!1,framework:n,reason:"React behavior profiles are only available for .tsx and .jsx files"}:n==="vue"&&!r.endsWith(".vue")?{slot:e,available:!1,framework:n,reason:"Vue behavior facts are only available for .vue files"}:{slot:e,available:!0,framework:n}}export{O as a,Uo as b,yt as c,Ir as d,q as e,vt as f,Nt as g,Ct as h,bt as i,kt as j,Tt as k,_t as l,Lt as m,se as n,ii as o,ro as p,Rt as q,yo as r,xo as s,vo as t,No as u,Co as v,bo as w,ko as x,ai as y,D as z,ce as A,pe as B,ze as C,is as D,Y as E,Q as F,ut as G,dt as H,ms as I,Je as J,W as K,ds as L,Ci as M};
21
- //# sourceMappingURL=chunk-ADTBPVUZ.js.map
@@ -1,2 +0,0 @@
1
- import{K as c}from"./chunk-ADTBPVUZ.js";import{f as a,u,w as p}from"./chunk-BMYOV5GP.js";var g=a("suppression-inventory",{clearGroups:["whole-project"]});function b(t){return g.get(t,()=>y(t))}function y(t){let e={dead:0,stale:0,wrapper:0,passthrough:0,drift:0,extract:0,similar:0,twin:0,uncategorized:0},n=new Map,o=0;for(let r of c(t)){let i=u(t,r);if(!(!i||!i.includes("codebaseiq")))for(let f of i.split(/\r?\n/)){let s=p(f);if(s===null)continue;o+=1,n.set(r,(n.get(r)??0)+1);let d=l(s);e[d]+=1}}for(let r of t.config.suppressions??[])r.expiresAt&&Date.parse(r.expiresAt)<=Date.now()||(o+=1,r.file&&n.set(r.file,(n.get(r.file)??0)+1),e[l(r.check)]+=1);return{total:o,byCategory:e,byFile:n}}function l(t){if(!t)return"uncategorized";let e=t.toLowerCase();return e==="dead-code"||e==="new-dead"?"dead":e.includes("twin")?"twin":e.includes("similar")||e.includes("duplicate")?"similar":e.includes("wrapper")?"wrapper":e.includes("passthrough")?"passthrough":e.includes("drift")?"drift":e.includes("extract")?"extract":e.includes("stale")?"stale":"uncategorized"}export{b as a};
2
- //# sourceMappingURL=chunk-BFFZDZQV.js.map
@@ -1,77 +0,0 @@
1
- import{f as w,g as P}from"./chunk-CWONGW6P.js";import{a as T,b as S,d as _}from"./chunk-3LCDIREB.js";import{v as R}from"./chunk-NNJ2KZZG.js";var F=[],L=[];function y(t){t.groups.length>0&&F.push(t)}function O(t){L.push(t)}function pe(t){let n=[];for(let e of L)try{e.close(t)}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 ue(t,n){let e=new Set(n.groups);for(let a of F)a.groups.some(r=>e.has(r))&&(n.file!==void 0&&a.clearFile?a.clearFile(t,n.file):a.clearAll(t))}function A(){let t=new WeakMap;return{cache:t,ensure(n){let e=t.get(n);return e||(e=new Map,t.set(n,e)),e}}}function h(t,n){let{cache:e,ensure:a}=A(),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){e.get(i)?.delete(s)},invalidateAll(i){e.delete(i)},size(i){return e.get(i)?.size??0}};return y({name:t,groups:n.clearGroups,clearAll:i=>r.invalidateAll(i),clearFile:(i,s)=>r.invalidate(i,s)}),r}function he(t,n){let e=new WeakMap,a={get(r,i){let s=e.get(r);if(s)return s.value;let o=i();return e.set(r,{value:o}),o},invalidate(r){e.delete(r)},has(r){return e.has(r)}};return y({name:t,groups:n.clearGroups,clearAll:r=>a.invalidate(r)}),a}var $={clearGroups:["whole-project","source-file"]};function ve(t){return G(t,$)}function G(t,n){let{cache:e,ensure:a}=A(),r={get(i,s,o,c){let d=a(i),D=d.get(s);if(D&&D.source===o)return D.value;let N=c();return d.set(s,{source:o,value:N}),N},invalidate(i,s){e.get(i)?.delete(s)},invalidateAll(i){e.delete(i)}};return y({name:t,groups:n.clearGroups,clearAll:i=>r.invalidateAll(i),clearFile:(i,s)=>r.invalidate(i,s)}),r}import{createHash as Y}from"crypto";import{existsSync as De,mkdirSync as z}from"fs";import{dirname as k,join as q}from"path";import x from"better-sqlite3";var J="evidence.db";var Q=["source-facts","definition-exclusions","doc-path-tokens","react-component-behavior-profiles"],C=new Set(Q);var Ne=512*1024*1024,Z=6e4,f=new WeakMap;O({name:"evidence-connections",close:V});var ee=h("evidence-content-hash",{clearGroups:["whole-project","source-file"]}),te=h("evidence-project-fingerprint",{clearGroups:["whole-project"]}),p="evidence-v1",v="version NOT LIKE 'evidence-%'";function I(t){return Y("sha256").update(t).digest("hex")}function Re(t,n,e){return ee.get(t,n,()=>I(e))}function j(t){return te.get(t,"current",()=>{try{if(!t.generation.metadataRaw)return null;let n=R(t.generation.metadataRaw);if(n.kind!=="legacy"&&n.kind!=="supported"||!n.capabilities.usableForEvidenceCache)return null;let e=n.metadata,a=[...e.indexedLanguages??[]].sort();return I(JSON.stringify({fingerprint:e.fingerprint,indexedLanguages:a,status:e.status}))}catch(n){return E("project fingerprint unavailable",n),null}})}function E(t,n){process.env.CODEBASEIQ_DEBUG&&console.error(`evidence-cache: ${t}: ${n instanceof Error?n.message:String(n)}`)}function u(t){if(f.has(t))return f.get(t)??null;let n=null;try{let e=new x(q(k(t.config.dbPath),J));e.pragma("journal_mode = WAL"),e.pragma("busy_timeout = 5000"),e.pragma("synchronous = NORMAL"),e.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:e,shared:ne(t.config.sharedEvidenceDbPath),readFileEvidence:e.prepare("SELECT payload FROM file_evidence WHERE kind = ? AND relative_path = ? AND content_hash = ? AND version = ?"),readLegacyFileEvidence:e.prepare(`SELECT payload FROM file_evidence
36
- WHERE kind = ? AND relative_path = ? AND content_hash = ? AND ${v}
37
- ORDER BY version DESC
38
- LIMIT 1`),writeFileEvidence:e.prepare("INSERT OR REPLACE INTO file_evidence (kind, relative_path, content_hash, version, payload) VALUES (?, ?, ?, ?, ?)"),readProjectEvidence:e.prepare("SELECT payload FROM project_evidence WHERE kind = ? AND cache_key = ? AND project_fingerprint = ? AND version = ?"),readLegacyProjectEvidence:e.prepare(`SELECT payload FROM project_evidence
39
- WHERE kind = ? AND cache_key = ? AND project_fingerprint = ? AND ${v}
40
- ORDER BY version DESC
41
- LIMIT 1`),writeProjectEvidence:e.prepare("INSERT OR REPLACE INTO project_evidence (kind, cache_key, project_fingerprint, version, payload) VALUES (?, ?, ?, ?, ?)"),readCallees:e.prepare(`SELECT payload FROM semantic_callees
42
- WHERE relative_path = ? AND symbol = ? AND content_hash = ? AND deps_digest = ? AND version = ?`),readLegacyCallees:e.prepare(`SELECT payload FROM semantic_callees
43
- WHERE relative_path = ? AND symbol = ? AND content_hash = ? AND deps_digest = ? AND ${v}
44
- ORDER BY version DESC
45
- LIMIT 1`),readCalleesForFile:e.prepare(`SELECT symbol, payload FROM semantic_callees
46
- WHERE relative_path = ? AND content_hash = ? AND deps_digest = ? AND version = ?`),readLegacyCalleesForFile:e.prepare(`SELECT symbol, payload FROM semantic_callees
47
- WHERE relative_path = ? AND content_hash = ? AND deps_digest = ? AND ${v}
48
- ORDER BY symbol, version DESC`),writeCallees:e.prepare(`INSERT OR REPLACE INTO semantic_callees
49
- (relative_path, symbol, content_hash, deps_digest, version, payload) VALUES (?, ?, ?, ?, ?, ?)`),dropStaleCallees:e.prepare("DELETE FROM semantic_callees WHERE relative_path = ? AND content_hash != ?"),readReferences:e.prepare(`SELECT payload FROM semantic_references
50
- WHERE relative_path = ? AND symbol = ? AND project_fingerprint = ? AND version = ?`),readLegacyReferences:e.prepare(`SELECT payload FROM semantic_references
51
- WHERE relative_path = ? AND symbol = ? AND project_fingerprint = ? AND ${v}
52
- ORDER BY version DESC
53
- LIMIT 1`),readReferencesForFile:e.prepare(`SELECT symbol, payload FROM semantic_references
54
- WHERE relative_path = ? AND project_fingerprint = ? AND version = ?`),readLegacyReferencesForFile:e.prepare(`SELECT symbol, payload FROM semantic_references
55
- WHERE relative_path = ? AND project_fingerprint = ? AND ${v}
56
- ORDER BY symbol, version DESC`),writeReferences:e.prepare(`INSERT OR REPLACE INTO semantic_references
57
- (relative_path, symbol, project_fingerprint, version, payload) VALUES (?, ?, ?, ?, ?)`),dropStaleReferences:e.prepare("DELETE FROM semantic_references WHERE relative_path = ? AND project_fingerprint != ?")}}catch(e){E("disabled (open failed)",e)}return f.set(t,n),n}function g(t,n,e){E(`disabled (${n})`,e);try{V(t)}catch(a){E("close failed while disabling",a)}f.set(t,null)}function V(t){let n=f.get(t);if(f.delete(t),!n)return;let e,a;try{n.shared?.evidence.close()}catch(r){e=r}try{n.evidence.close()}catch(r){a=r}if(e!==void 0&&a!==void 0)throw new AggregateError([e,a],"Shared and project evidence connections failed to close.");if(e!==void 0)throw e;if(a!==void 0)throw a}function ne(t){if(!t)return null;try{z(k(t),{recursive:!0});let n=new x(t);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 b(t,n,e){E(`shared cache disabled (${n})`,e);try{t.shared?.evidence.close()}catch{}t.shared=null}function M(t,n,e,a){let r=u(t);if(!r)return null;try{let i=r.readFileEvidence.get(n,e,a,p)??r.readLegacyFileEvidence.get(n,e,a);if(i?.payload!==void 0)return i.payload;if(!C.has(n)||!r.shared)return null;try{let s=r.shared.readFileEvidence.get(n,e,a,p);return s?.payload!==void 0&&re(r.shared,n,e,a),s?.payload??null}catch(s){return b(r,"file_evidence read",s),null}}catch(i){return g(t,"file_evidence read",i),null}}function re(t,n,e,a){let r=Date.now();try{t.touchFileEvidence.run(r,n,e,a,p,r-Z)}catch(i){E("shared file_evidence recency touch skipped",i)}}function K(t,n,e,a,r){let i=u(t);if(i)try{if(i.writeFileEvidence.run(n,e,a,p,r),C.has(n)&&i.shared)try{i.shared.writeFileEvidence.run(n,e,a,p,r,Date.now())}catch(s){b(i,"file_evidence write",s)}}catch(s){g(t,"file_evidence write",s)}}function H(t,n){if(n.length===0)return;let e=u(t);if(e)try{e.evidence.transaction(()=>{for(let r of n)e.writeFileEvidence.run(r.kind,r.relativePath,r.contentHash,p,r.payload)})();let a=n.filter(r=>C.has(r.kind));if(a.length>0&&e.shared)try{e.shared.evidence.transaction(()=>{for(let r of a)e.shared.writeFileEvidence.run(r.kind,r.relativePath,r.contentHash,p,r.payload,Date.now())})()}catch(r){b(e,"file_evidence batch write",r)}}catch(a){g(t,"file_evidence batch write",a)}}function U(t,n,e,a){let r=u(t);if(!r)return null;try{return(r.readProjectEvidence.get(n,e,a,p)??r.readLegacyProjectEvidence.get(n,e,a))?.payload??null}catch(i){return g(t,"project_evidence read",i),null}}function X(t,n,e,a,r){let i=u(t);if(i)try{i.writeProjectEvidence.run(n,e,a,p,r)}catch(s){g(t,"project_evidence write",s)}}function we(t,n,e,a){let r=u(t);if(!r)return new Map;try{let i=r.readCalleesForFile.all(n,e,a,p),s=r.readLegacyCalleesForFile.all(n,e,a);return B([...s,...i])}catch(i){return g(t,"semantic_callees bulk read",i),new Map}}function Pe(t,n,e){let a=u(t);if(!a)return new Map;try{let r=a.readReferencesForFile.all(n,e,p),i=a.readLegacyReferencesForFile.all(n,e);return B([...i,...r])}catch(r){return g(t,"semantic_references bulk read",r),new Map}}function B(t){let n=new Map;for(let e of t)n.set(e.symbol,e.payload);return n}function Fe(t,n){if(n.length===0)return;let e=u(t);if(e)try{e.evidence.transaction(()=>{let a=new Set;for(let r of n){let i=`${r.relativePath}\0${r.contentHash}`;a.has(i)||(a.add(i),e.dropStaleCallees.run(r.relativePath,r.contentHash)),e.writeCallees.run(r.relativePath,r.symbol,r.contentHash,r.depsDigest,p,r.payload)}})()}catch(a){g(t,"semantic_callees write",a)}}function Le(t,n){if(n.length===0)return;let e=u(t);if(e)try{e.evidence.transaction(()=>{let a=new Set;for(let r of n){let i=`${r.relativePath}\0${r.projectFingerprint}`;a.has(i)||(a.add(i),e.dropStaleReferences.run(r.relativePath,r.projectFingerprint)),e.writeReferences.run(r.relativePath,r.symbol,r.projectFingerprint,p,r.payload)}})()}catch(a){g(t,"semantic_references write",a)}}function Ae(t){return typeof t=="object"&&t!==null}function ke(t){return Array.isArray(t)&&t.every(n=>typeof n=="string")?t:null}var ae=[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("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"}),m("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"}),m("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"}),m("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"}),m("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 Ke(t){let n=new Map;return{kind:t.kind,read(e,a,r){let i=!1,s=0,o;if(T()){let c=j(e);if(c){let d=`${c}\0${a}\0${r}`;o=n.get(d),o||(o=S(["evidence-product-file-read-v1",t.kind,c,a,r]),n.set(d,o))}}return _("evidence-product.file.read",()=>{let c=M(e,t.kind,a,r);if(c===null)return null;s=c.length;try{let d=t.deserialize(c);return i=d!==null,d}catch{return null}},()=>({...o?{workIdentity:o,workOutcome:"computed"}:{},scope:"file",kind:t.kind,available:!0,hit:i,payloadBytes:s}))},write(e,a,r,i){K(e,t.kind,a,r,t.serialize(i))},writeBatch(e,a){H(e,a.map(r=>({kind:t.kind,relativePath:r.relativePath,contentHash:r.contentHash,payload:t.serialize(r.value)})))}}}function He(t){let n=new Map;return{kind:t.kind,read(e,a,r){let i=!1,s=0,o;if(T()){let c=`${r}\0${a}`;o=n.get(c),o||(o=S(["evidence-product-project-read-v1",t.kind,r,a]),n.set(c,o))}return _("evidence-product.project.read",()=>{let c=U(e,t.kind,a,r);if(c===null)return null;s=c.length;try{let d=t.deserialize(c);return i=d!==null,d}catch{return null}},()=>({...o?{workIdentity:o,workOutcome:"computed"}:{},scope:"project",kind:t.kind,available:!0,hit:i,payloadBytes:s}))},write(e,a,r,i){X(e,t.kind,a,r,t.serialize(i))}}}function Ue(t){let n=ae.find(e=>e.kind===t);if(!n)throw new Error(`missing evidence product manifest entry for ${t}`);return n.invalidation}function l(t,n){return{scope:"file",kind:t,invalidation:{scope:"file",...n}}}function m(t,n){return{scope:"project",kind:t,invalidation:{scope:"project",...n}}}var ie=h("source-text",{clearGroups:["whole-project","source-file"]}),se=h("source-lines",{clearGroups:["whole-project","source-file"]});function oe(t,n){let e=n.replace(/\\/g,"/");return ie.get(t,e,()=>{try{return w(t.config.projectRoot,e,{inputKind:"indexed source file"})}catch(a){if(P(a))return"";throw a}})}function ce(t,n){let e=n.replace(/\\/g,"/");return se.get(t,e,()=>{let a=oe(t,e);return a?a.split(`
76
- `):[]})}var de=/^\s*(?:\/\/|#|\/\*+|\*)\s*codebaseiq[\s:-]*ignore(?:[\s:-]+(dead(?:-code)?|stale|wrapper|passthrough|drift|extract|similar|twin))?\b/i;function le(t){let n=de.exec(t);return n?n[1]??"":null}function $e(t,n,e){return W(t,n,e).length>0}function Ge(t,n,e,a){let r=a.toLowerCase();return W(t,n,e).some(i=>i.toLowerCase()===r)}function W(t,n,e){if(e<=0)return[];let a=ce(t,n);if(a.length===0)return[];let r=[];for(let i=e-1;i>=0&&i>=e-5;i-=1){let s=(a[i]??"").trim();if(s==="")continue;let o=le(s);if(o!==null){r.push(o);continue}if(!s.startsWith("//")&&!s.startsWith("*")&&!s.startsWith("/*")&&!s.startsWith("@")&&!s.startsWith("#"))return r}return r}export{y as a,O as b,pe as c,ue as d,h as e,he as f,ve as g,G as h,I as i,Re as j,j as k,we as l,Pe as m,Fe as n,Le as o,Ae as p,ke as q,Ke as r,He as s,Ue as t,oe as u,ce as v,le as w,$e as x,Ge as y};
77
- //# sourceMappingURL=chunk-BMYOV5GP.js.map
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- var s=new Set(["code","outline","refs"]),c=["--symbol","--at","--search","--view","--edge","--direction","--subtype","--connecting","--inventory-only","--fold","--depth","--max-edges"];function d(t){if(t[2]!=="evidence")return;let i=t[3];if(!i||i.startsWith("-"))return;if(t.slice(4).some(e=>c.some(r=>e===r||e.startsWith(`${r}=`)))){t.splice(3,1,"--symbol",i);return}t[2]="evidence-source"}function a(t){return t!==void 0&&s.has(t)}async function p(t){if(t==="continue"){let{outputContinuationCommandDescriptor:n}=await import("./output-continuation-command-65J5IP3O.js");return[n]}if(a(t)){let{directNavigationQueryCommandDescriptors:n}=await import("./direct-navigation-DP4LVMRX.js"),o=n.find(e=>e.id===t);if(!o)throw new Error(`Direct navigation command descriptor is unavailable: ${t}`);return[o]}let{commandDescriptors:i}=await import("./command-descriptors-6AOUKWW7.js");return i}export{d as a,a as b,p as c};
3
- //# sourceMappingURL=chunk-C74PPYLA.js.map
@@ -1,3 +0,0 @@
1
- import{G as W,H as $,K as R,T as J,a as S,ea as K,g as m,h as b,i as A,j as G}from"./chunk-NNJ2KZZG.js";import{createRequire as ae}from"module";import{existsSync as ce,readdirSync as le,statSync as ue}from"fs";import u from"path";import{AsyncLocalStorage as se}from"async_hooks";var oe=new se;function j(e,t){let n=C(e);if(!n||n.missing.has(t))return;let r=n.files.get(t);if(r)return r;let i=n.readBaseFile?.(t);return i&&n.files.set(t,i),i}function F(e,t){let n=C(e);if(n)return n.missing.has(t)?"missing":n.paths.includes(t)?"present":"missing"}function q(e,t){return C(e)?.fingerprints.get(t)}function P(e){return C(e)?.paths}function C(e){let t=oe.getStore();if(t)return t.projectRoot===K(e)?t:void 0}var pe=ae(import.meta.url),U=new Set([".cache",".git",".next",".nuxt",".turbo",".nx","build","coverage","dist","node_modules","tmp","vendor"]);function fe(e,t=[]){let n=u.resolve(e),r=t.flatMap(s=>de(n,s));if(r.length>0)return X(n,Q(r));let i=ge(n),o=Q(i),c=he(n,o)?[n,...o]:o,a=c.length>0?c:[n];return X(n,a)}function V(e,t,n=[]){let r;try{r=pe("ts-morph")}catch{return null}let i=u.resolve(e),o=t==="workspace"?fe(i,n):["."],c=new Set;for(let a of o){let s=a==="."?i:u.join(i,a),l=u.join(s,"tsconfig.json"),p=Pe(r.ts,i);if(!p.fileExists(l))return null;let g=r.ts.readConfigFile(l,p.readFile);if(g.error)return null;let f=r.ts.parseJsonConfigFileContent(g.config,p,s);if(f.errors.length>0)return null;for(let h of f.fileNames){let d=u.resolve(h);m(i,d)&&c.add(u.relative(i,d).split(u.sep).join("/"))}}return c}function X(e,t){return[...new Set(t.map(n=>x(e,n)))].sort((n,r)=>n.localeCompare(r))}function ge(e){let t=P(e);if(t)return t.flatMap(i=>{if(i.split("/").some(c=>U.has(c)))return[];let o=u.join(e,...i.split("/"));return Y(e,o)?[u.dirname(o)]:[]});let n=[],r=[e];for(;r.length>0;){let i=r.pop(),o;try{o=le(i,{withFileTypes:!0})}catch{continue}for(let c of o){let a=u.join(i,c.name);if(c.isDirectory()){!U.has(c.name)&&!c.name.startsWith(".")&&r.push(a);continue}c.isFile()&&Y(e,a)&&n.push(u.dirname(a))}}return n}function de(e,t){let n=t.trim();if(!n)return[];let r=u.resolve(e,n);if(!m(e,r))return[];let i=P(e);if(i){let o=x(e,r);if(i.includes(o)&&M(u.basename(r)))return[u.dirname(r)];let c=o==="."?"":`${o}/`;return i.some(a=>a.startsWith(c))?[r]:[]}try{let o=ue(r);if(o.isDirectory())return[r];if(o.isFile()&&M(u.basename(r)))return[u.dirname(r)]}catch{return[]}return[]}function Y(e,t){if(!M(u.basename(t)))return!1;let n=Z(e,t);return n?u.basename(t)==="tsconfig.json"||"include"in n||"files"in n||"references"in n:!1}function M(e){return e.startsWith("tsconfig")&&e.endsWith(".json")}function Q(e){let t=[...new Set(e.map(n=>u.resolve(n)))].sort((n,r)=>n.localeCompare(r));return t.length<=1?t:t.filter(n=>!t.some(r=>r!==n&&Fe(n,r)))}function he(e,t){if(t.length===0||t.some(r=>u.resolve(r)===e))return!1;let n=u.join(e,"tsconfig.json");return ye(e,n)&&me(e,n)}function me(e,t){let r=Z(e,t)?.include;return Array.isArray(r)?r.some(i=>typeof i=="string"&&i.trim()!==""&&!i.startsWith("!")&&(i.includes("/")||i.includes("**")||!u.extname(i))):!1}function Z(e,t){try{let n=JSON.parse(Se(e,t));return n&&typeof n=="object"&&!Array.isArray(n)?n:null}catch{return null}}function ye(e,t){let n=x(e,t),r=F(e,n);return r?r==="present":ce(t)}function Se(e,t){let n=x(e,t);if(P(e)){let i=j(e,n);if(!i)throw Object.assign(new Error(`Snapshot file ${n} is missing.`),{code:"ENOENT"});return i.content.toString("utf8")}return $(t,"TypeScript project config")}function Pe(e,t){let n=P(t);if(!n)return e.sys;let r=u.resolve(t),i=new Set(n),o=je(r,n),c=e,a=s=>{let l=u.resolve(s);return m(r,l)?x(r,l):null};return{useCaseSensitiveFileNames:e.sys.useCaseSensitiveFileNames,fileExists(s){let l=a(s);return l===null?e.sys.fileExists(s):i.has(l)},readFile(s){let l=a(s);return l===null?e.sys.readFile(s):j(r,l)?.content.toString("utf8")},readDirectory(s,l,p,g,f){let h=u.resolve(s);return m(r,h)?c.matchFiles(h,l,p,g,e.sys.useCaseSensitiveFileNames,r,f,d=>o.get(u.resolve(d))??{files:[],directories:[]},d=>d):e.sys.readDirectory(s,l,p,g,f)}}}function je(e,t){let n=new Map,r=new Map,i=o=>{n.has(o)||n.set(o,new Set),r.has(o)||r.set(o,new Set)};i(e);for(let o of t){let c=o.split("/"),a=e;for(let s=0;s<c.length-1;s+=1){let l=c[s];i(a),r.get(a).add(l),a=u.join(a,l),i(a)}n.get(a).add(c.at(-1))}return new Map([...n].map(([o,c])=>[o,{files:[...c].sort(),directories:[...r.get(o)??[]].sort()}]))}function x(e,t){let n=u.relative(e,t);return n?n.split(u.sep).join("/"):"."}function Fe(e,t){let n=u.relative(e,t);return!!n&&!n.startsWith("..")&&!u.isAbsolute(n)}import{execFileSync as Be}from"child_process";import{createHash as te}from"crypto";import{closeSync as Ne,fstatSync as ne,lstatSync as N,openSync as _e,readdirSync as De,readFileSync as He,readlinkSync as Le,realpathSync as I}from"fs";import{isAbsolute as Ae,join as _,relative as Ge,resolve as We,sep as $e}from"path";import{execFileSync as k}from"child_process";import{createHash as be}from"crypto";import{mkdirSync as xe,renameSync as ve,writeFileSync as we}from"fs";import{basename as Ce,dirname as ze,join as Ie}from"path";var Te="git-content-hashes.json",Ee=32*1024*1024,Oe=2e5,z=3e4,B={encoding:"utf8",maxBuffer:64*1024*1024,stdio:["ignore","pipe","ignore"],windowsHide:!0,timeout:z,killSignal:"SIGKILL"};function ee(e){let t,n;try{t=k("git",["-C",e,"ls-files","-s","-z","--","."],{...B,timeout:z}),n=k("git",["-C",e,"status","--porcelain=v1","-z","--untracked-files=all","--no-renames","--","."],{...B,timeout:z})}catch{return null}let r=new Map,i=[];for(let p of t.split("\0")){if(!p)continue;let g=p.indexOf(" "),f=g>0?p.slice(0,g).split(" "):[];if(f.length!==3)continue;let[h,d,w]=f,y=p.slice(g+1);if(h!=="100644"&&h!=="100755"||w!=="0"){r.delete(y);continue}r.set(y,d),Ce(y)===".gitattributes"&&i.push(`${y}:${d}`)}let o=new Set;for(let p of n.split("\0"))p.length>=4&&p[2]===" "&&o.add(p.slice(3));let c=Me(e,i),a=Ie(J(e),Te),s=ke(a,c),l=new Map;return{lookup(p){if(o.has(p))return;let g=r.get(p);if(g)return l.get(g)??s.entries[g]},seed(p,g){if(o.has(p))return;let f=r.get(p);!f||s.entries[f]||l.has(f)||l.set(f,g)},persist(){if(l.size===0)return;let p=new Set(r.values()),g={};for(let[f,h]of Object.entries(s.entries))p.has(f)&&(g[f]=h);for(let[f,h]of l)g[f]=h;if(!(Object.keys(g).length>Oe))try{xe(ze(a),{recursive:!0});let f=`${a}.${process.pid}.tmp`;we(f,JSON.stringify({version:1,salt:c,entries:g})),ve(f,a)}catch{}}}}function Me(e,t){let n="";try{n=k("git",["-C",e,"config","--get-regexp","^core\\.(autocrlf|eol|safecrlf)$"],{...B,timeout:z})}catch{}return be("sha256").update(JSON.stringify([n.trim(),t.sort()])).digest("hex")}function ke(e,t){let n={version:1,salt:t,entries:{}};try{let r=W(e,{maxBytes:Ee,inputKind:"git-content-hash-store"}),i=JSON.parse(r);if(i.version!==1||i.salt!==t||!i.entries||typeof i.entries!="object")return n;let o={};for(let[c,a]of Object.entries(i.entries))/^[0-9a-f]{40,64}$/.test(c)&&a&&typeof a.size=="number"&&Number.isInteger(a.size)&&a.size>=0&&typeof a.hash=="string"&&/^[0-9a-f]{64}$/.test(a.hash)&&(o[c]={size:a.size,hash:a.hash});return{version:1,salt:t,entries:o}}catch{return n}}var T=64*1024*1024,v=class extends Error{constructor(n,r,i,o){super(`${n} ${JSON.stringify(r)} is ${i} bytes; the safety limit is ${o} bytes`);this.inputKind=n;this.inputPath=r;this.observedBytes=i;this.limitBytes=o;this.name="InputTooLargeError"}inputKind;inputPath;observedBytes;limitBytes;code="CODEBASEIQ_INPUT_TOO_LARGE"};function Re(e){return[...new Set((e??[]).map(t=>t.trim()).filter(Boolean))].sort((t,n)=>t.localeCompare(n))}function re(e,t,n={}){let r=b(t),i=I(e),o=We(i,...r.split("/"));if(!m(i,o)||o===i)throw new S(t,"outside-project");let c=I(o);if(!m(i,c)||c===i)throw new S(t,"outside-project");let a=N(c);if(!a.isFile())throw new S(t,"not-a-file");let s={projectRoot:i,relativePath:r,absolutePath:c,size:a.size,mtimeMs:a.mtimeMs,device:a.dev,inode:a.ino},l=n.maxBytes??T;if(ie(l),s.size>l)throw new v(n.inputKind??"project file",s.relativePath,s.size,l);return s}function Je(e,t,n={}){let r=b(t),i=F(e,r);if(i){if(i==="missing")throw Object.assign(new Error(`Snapshot project file ${JSON.stringify(r)} does not exist.`),{code:"ENOENT"});let s=j(e,r);if(!s)throw new S(r,"changed-during-read");let l=n.maxBytes??T;if(ie(l),s.size>l)throw new v(n.inputKind??"project file",r,s.size,l);return Buffer.from(s.content)}let o=re(e,t,n),c=n.maxBytes??T,a=_e(o.absolutePath,"r");try{let s=ne(a);if(!s.isFile()||s.dev!==o.device||s.ino!==o.inode||s.size!==o.size)throw new S(t,"changed-during-read");if(s.size>c)throw new v(n.inputKind??"project file",o.relativePath,s.size,c);let l=He(a),p=ne(a);if(p.dev!==s.dev||p.ino!==s.ino||p.size!==s.size||l.byteLength!==s.size)throw new S(t,"changed-during-read");return l}finally{Ne(a)}}function It(e,t,n={}){return Je(e,t,n).toString("utf8")}function D(e){return typeof e=="object"&&e!==null&&"code"in e&&(e.code==="ENOENT"||e.code==="ENOTDIR")}function Tt(e,t){try{return re(e,t),!0}catch(n){if(D(n))return!1;throw n}}function ie(e){if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`maxBytes must be a non-negative safe integer; received ${e}`)}function Ke(e){return(P(e)??Ve(e)??Ze(e)).filter(t=>t&&!H(t)).sort()}function qe(e,t={}){let n=(t.includePaths??[]).map(b),r=[...new Set([...Ke(e),...n])].filter(s=>!H(s)).filter(s=>!t.language||G(s,t.language,t.markerFiles)).filter(s=>!t.includePath||t.includePath(s)).sort(),i=I(e),o,c=()=>o??=ee(i),a=r.flatMap(s=>{let l=q(e,s);if(l)return[{path:s,size:l.fingerprintSize??l.size,hash:l.sha256}];let p=F(e,s);if(p==="present"){let d=j(e,s);if(d)return[{path:s,size:d.fingerprintSize??d.size,hash:d.sha256}]}let g=p===void 0?c():null,f=g?.lookup(s);if(f)return[{path:s,size:f.size,hash:f.hash}];let h=_(e,s);try{if(N(h).isSymbolicLink()){let E=I(h),O=Ge(i,E);if(O===".."||O.startsWith(`..${$e}`)||Ae(O))throw new Error("external symlink");let L=Le(h);return[{path:s,size:Buffer.byteLength(L),hash:te("sha256").update("symlink\0").update(L).digest("hex")}]}let d=te("sha256"),w=R(h,{inputKind:"project fingerprint input",maxBytes:T},E=>d.update(E)),y=d.digest("hex");return g?.seed(s,{size:w,hash:y}),[{path:s,size:w,hash:y}]}catch(d){return D(d)?[]:[{path:s,size:-1,hash:"unreadable"}]}});return o?.persist(),a}function Et(e,t,n){let r=Ye(t,n),i=[...r.typescriptProjects.filter(c=>Xe(e,c)),...r.clojureConfigPath?[r.clojureConfigPath]:[]],o=r.languages.includes("typescript")?V(e,r.typescriptProjectMode,r.typescriptProjects):null;return{...r,files:qe(e,{includePath:c=>{let a=A(c,t,i);return a==="other"?!1:a!=="source"||!Ue(c)||!o?!0:o.has(c)},includePaths:i})}}function Ue(e){return/\.(?:[cm]?[jt]sx?|vue)$/iu.test(e)}function Xe(e,t){let n;try{n=b(t)}catch{return!1}let r=F(e,n);if(r)return r==="present";try{return N(_(e,n)).isFile()}catch(i){if(D(i))return!1;throw i}}function Ye(e,t){return{version:3,languages:[...e].sort(),pnpmWorkspaces:t.typescriptProjectMode!=="workspace"&&t.pnpmWorkspaces===!0,typescriptProjectMode:t.typescriptProjectMode??"single",typescriptProjects:Re(t.typescriptProjects),clojureConfigPath:Qe(t.clojureConfigPath)}}function Qe(e){return e?.trim()||void 0}function Ve(e){try{return Be("git",["-C",e,"ls-files","-co","--exclude-standard","--","."],{encoding:"utf-8",maxBuffer:50*1024*1024,stdio:["ignore","pipe","ignore"],windowsHide:!0,timeout:3e4,killSignal:"SIGKILL"}).split(`
2
- `).filter(Boolean)}catch{return null}}function Ze(e){let t=[],n=[""];for(;n.length>0;){let r=n.pop(),i=r?_(e,r):e,o;try{o=De(i,{withFileTypes:!0})}catch{continue}for(let c of o){let a=r?`${r}/${c.name}`:c.name;if(c.isDirectory()){H(a)||n.push(a);continue}t.push(a)}}return t}function H(e){let t=e.split("/");return e==="meta.json"||t[0]===".codebaseiq"&&(t[1]==="events"||t[1]==="ledger"||t[1]==="releases"||t[1]==="suppressions")||t.some(n=>et.has(n))||e.endsWith(".db")||e.endsWith(".db-wal")||e.endsWith(".db-shm")||e.endsWith(".scip")}var et=new Set([".git","node_modules",".codebaseiq-cache",".codebaseiq-generations",".stryker-tmp","dist","build","coverage",".next",".nuxt","target"]);export{fe as a,v as b,Re as c,re as d,Je as e,It as f,D as g,Tt as h,Ke as i,qe as j,Et as k,Ye as l};
3
- //# sourceMappingURL=chunk-CWONGW6P.js.map
@@ -1,20 +0,0 @@
1
- import{m as d,r as u,t as p}from"./chunk-UCD3H3UZ.js";import{c as l}from"./chunk-BMYOV5GP.js";import{h as c}from"./chunk-NNJ2KZZG.js";import m from"better-sqlite3";var b=["busy_timeout = 5000","query_only = ON","temp_store = MEMORY","cache_size = -64000","mmap_size = 268435456"],i=class{constructor(t,e){this.connection=t;this.releaseGenerationReader=e}connection;releaseGenerationReader;active=!0;initialize(t){try{for(let e of b)this.connection.pragma(e);t(this.connection)}catch(e){try{this.close()}catch(n){throw new AggregateError([e,n],"SQLite initialization and rollback both failed.",{cause:n})}throw e}}close(){if(!this.active)return;this.active=!1;let t,e;try{this.connection.close()}catch(n){t=n}try{this.releaseGenerationReader()}catch(n){e=n}if(t!==void 0&&e!==void 0)throw new AggregateError([t,e],"SQLite connection close and generation-reader release both failed.");if(t!==void 0)throw t;if(e!==void 0)throw e}},f=["node_modules",".git","dist","build","out","coverage","target",".next",".nuxt",".cache",".turbo",".nbb",".cpcache",".shadow-cljs",".codebaseiq-cache","__pycache__",".venv","venv"],h=class{db;config;generation;pathFilter;connection;connectionOwnership;statementCache=new Map;closed=!1;constructor(t,e){this.config=t,this.pathFilter=e??null;let n=E(t),o=new i(n.db,n.release);try{o.initialize(y),this.generation=n.generation,this.connection=n.db,this.connectionOwnership=o,this.db=g(n.db)}catch(r){try{o.close()}catch(s){throw new AggregateError([r,s],"SQLite construction and rollback both failed.",{cause:s})}throw r}}isIgnored(t){return this.pathFilter?.isIgnored(t)??!1}get localSymbolPredicate(){return`(
2
- EXISTS (
3
- SELECT 1
4
- FROM defn_enclosing_ranges local_der
5
- JOIN documents local_d ON local_der.document_id = local_d.id
6
- WHERE local_der.symbol_id = gs.id
7
- ${this.pathExclusionsFor("local_d").trimStart()}
8
- )
9
- OR EXISTS (
10
- SELECT 1
11
- FROM mentions local_m
12
- JOIN chunks local_c ON local_m.chunk_id = local_c.id
13
- JOIN documents local_d ON local_c.document_id = local_d.id
14
- WHERE local_m.symbol_id = gs.id
15
- AND local_m.role = 1
16
- ${this.pathExclusionsFor("local_d").trimStart()}
17
- )
18
- )`}get pathExclusions(){return this.pathExclusionsFor("d")}get symbolNoise(){return this.symbolNoiseFor("gs")}pathExclusionsFor(...t){return t.flatMap(e=>f.flatMap(n=>[`AND ${e}.relative_path NOT LIKE '${n}/%'`,`AND ${e}.relative_path NOT LIKE '%/${n}/%'`])).join(`
19
- `)}symbolNoiseFor(t){return`AND ${t}.symbol NOT LIKE '%().(%' AND ${t}.symbol NOT LIKE '%typeLiteral%'`}all(t,...e){return this.statement(t).all(...e)}get(t,...e){return this.statement(t).get(...e)}close(){if(this.closed)return;this.closed=!0,this.statementCache.clear();let t,e;try{l(this)}catch(n){t=n}try{this.connectionOwnership.close()}catch(n){e=n}if(t!==void 0&&e!==void 0)throw new AggregateError([t,e],"Database-owned resource and SQLite connection cleanup both failed.");if(t!==void 0)throw t;if(e!==void 0)throw e}statement(t){let e=this.statementCache.get(t);return e||(e=this.connection.prepare(t),this.statementCache.set(t,e)),e}};function g(a){return Object.freeze({prepare(t){let e=a.prepare(t);if(!e.readonly||!e.reader)throw new Error("ScipDatabase.db only permits read-only statements that return rows.");return w(e)}})}function w(a){let t={get:(...e)=>a.get(...e),all:(...e)=>a.all(...e),iterate:(...e)=>a.iterate(...e),pluck(e){return e===void 0?a.pluck():a.pluck(e),t},expand(e){return e===void 0?a.expand():a.expand(e),t},raw(e){return e===void 0?a.raw():a.raw(e),t},bind(...e){return a.bind(...e),t},columns:()=>a.columns(),safeIntegers(e){return e===void 0?a.safeIntegers():a.safeIntegers(e),t}};return Object.freeze(t)}function y(a){if(!a.prepare("SELECT 1 AS present FROM sqlite_master WHERE type = 'table' AND name = 'documents'").get())return;let e=a.prepare("SELECT relative_path FROM documents").iterate();for(let n of e)c(n.relative_path)}function E(a){for(let t=0;t<4;t+=1){let e=d(a),n=e.generation,o;try{o=new m(n.databasePath,{readonly:!0,fileMustExist:!0})}catch(r){throw e.release(),r}if(n.source==="immutable")return{db:o,generation:n,release:e.release};try{let r=u(a);if(n.databaseFileIdentity===p(n.databasePath)&&r.source==="legacy"&&r.identity===n.identity&&r.databaseFileIdentity===n.databaseFileIdentity&&r.metadataRaw===n.metadataRaw)return{db:o,generation:n,release:e.release}}catch(r){throw o.close(),e.release(),r}o.close(),e.release()}throw new Error("SQLite index publication changed repeatedly while opening a coherent generation.")}export{h as a};
20
- //# sourceMappingURL=chunk-DDZ7VHWV.js.map
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- import{f as Ee}from"./chunk-3JSXXYTZ.js";import{a as V,b as U,d as v,e as k,f as me}from"./chunk-DO6WQD2T.js";import{H as O,K as z,L as Ie,M as K,N as we,O as be,P as T,Ta as ke,U as W,Ua as We,V as Y,c as J,cb as Ce,d as ye,e as ge,m as Se,o as I,p as ve,q as Re,t as P}from"./chunk-2X7V4HS4.js";import{B as A,c as $,d as pe,e as he,h as F,i as g,q as S,v as fe,w as H,x as B}from"./chunk-SNNWPCN7.js";import{spawn as mt}from"child_process";import{existsSync as yt,rmSync as Te}from"fs";import{dirname as gt,resolve as N}from"path";import{fileURLToPath as St}from"url";import{createHash as Ke,randomUUID as Ae}from"crypto";import{existsSync as Ye,linkSync as Qe,readdirSync as Xe,rmSync as Ze}from"fs";import{basename as et,dirname as tt,join as R}from"path";var L=1,rt=10*6e4,zt=10080*6e4,Q="requests",nt="claims",it="completions",ot="staging";function Pe(e,t,r={}){let n=r.now?.()??new Date,i=pt(r.ttlMs),o=ht(r.idempotencyKey),c=o?`key-${Ke("sha256").update(o).digest("hex")}`:`request-${(r.randomId??Ae)()}`,s={version:L,requestId:c,...o?{idempotencyKey:o}:{},createdAt:n.toISOString(),deadlineAt:new Date(n.getTime()+i).toISOString(),detail:t.trim().slice(0,2048)||"stale index observed by a command"},d=ut(e,c),a=ct(e,d,s,r.onStage);if(a.published)return{disposition:"accepted",request:s,achievedDurability:a.achievedDurability,directorySync:a.directorySync};let l=X(d);if(!l)throw new Error(`Watch refresh request identity ${c} exists but is malformed.`);return{disposition:"duplicate",request:l}}function Kt(e){let t=dt(e),r=new Map,n=lt(R(e,Q),X);for(let d of D(R(e,it))){let a=at(d);if(!a){n++;continue}r.set(a.requestId,a)}let i=new Set;for(let d of D(R(e,nt))){let a=st(d);if(!a){n++;continue}i.add(a.requestId)}let o=t.filter(d=>!r.has(d.requestId)&&!i.has(d.requestId)),c=[...r.values()].filter(d=>d.outcome==="completed").length,s=[...r.values()].filter(d=>d.outcome==="expired").length;return{pending:o.length,claimed:t.filter(d=>!r.has(d.requestId)&&i.has(d.requestId)).length,completed:c,expired:s,invalid:n,...o.length>0?{oldestPendingAt:o.map(d=>d.createdAt).reduce((d,a)=>ft(d,a))}:{}}}function X(e){return Z(e,t=>{let r=t;return r.version===L&&_(r.requestId)&&(r.idempotencyKey===void 0||typeof r.idempotencyKey=="string")&&A(r.createdAt)&&A(r.deadlineAt)&&Date.parse(r.deadlineAt)>=Date.parse(r.createdAt)&&typeof r.detail=="string"&&r.detail.length>0})}function st(e){return Z(e,t=>{let r=t;return r.version===L&&_(r.requestId)&&_(r.claimId)&&A(r.claimedAt)})}function at(e){return Z(e,t=>{let r=t;return r.version===L&&_(r.requestId)&&(r.claimId===void 0||_(r.claimId))&&(r.outcome==="completed"||r.outcome==="expired")&&A(r.completedAt)})}function ct(e,t,r,n){let i=R(e,ot),o=tt(t),c=J(i),s=J(o),d=R(i,`${et(t)}.${process.pid}.${Ae()}.tmp`);try{let a=Y(d,r,{spacing:2,trailingNewline:!0});n?.("after-staged");try{Qe(d,t)}catch(p){if(p.code==="EEXIST")return{published:!1};throw p}let l=ge(c,s,a.directorySync,ye(o));return n?.("after-published"),{published:!0,achievedDurability:l==="synced"?"directory-durable":"file-flushed",directorySync:l}}finally{Ze(d,{force:!0})}}function dt(e){let t=[];for(let r of D(R(e,Q))){let n=X(r);n&&t.push(n)}return t}function lt(e,t){return D(e).filter(r=>!t(r)).length}function D(e,t=".json"){return Ye(e)?Xe(e,{withFileTypes:!0}).filter(r=>r.isFile()&&r.name.endsWith(t)).map(r=>R(e,r.name)).sort():[]}function Z(e,t){try{let r=JSON.parse(S(e,"watch refresh request record"));return t(r)?r:null}catch{return null}}function ut(e,t){return R(e,Q,`${t}.json`)}function pt(e){if(e===void 0)return rt;if(!Number.isFinite(e)||e<=0)throw new Error("Watch refresh request ttlMs must be positive.");return Math.floor(e)}function ht(e){let t=e?.trim();return t?t.slice(0,512):void 0}function _(e){return typeof e=="string"&&/^[a-z0-9][a-z0-9-]{0,127}$/i.test(e)}function ft(e,t){return Date.parse(t)<Date.parse(e)?t:e}var _e=5e3,vt=6e3,Rt=1e3,te=10,It=new Set(["capabilities","check-deps","config-validate","doctor","init","install-skills","reindex","setup","setup-agent","status","suppress","uninstall","watch"]);function fr(e){let t=e.classification;if(t.kind!=="live")return;let{state:r}=t;return r.watcher.state==="idle"&&r.lastError===void 0?r.indexGeneration:void 0}function wt(e,t=process.env){return t.CODEBASEIQ_SKIP_WATCH_SERVICE!=="1"&&!e.startsWith("__")&&!It.has(e)}function mr(e){let t=e.env??process.env;if(t.CODEBASEIQ_SKIP_WATCH_SERVICE==="1")return{kind:"skipped",reason:"environment"};if(!wt(e.commandName,t))return{kind:"skipped",reason:"excluded-command"};if(e.config.watch?.enabled!==!0)return{kind:"skipped",reason:"disabled"};try{let r=bt({projectRoot:e.projectRoot,cacheDir:e.cacheDir,cliVersion:e.cliVersion,gitContext:e.gitContext,runtime:e.runtime});return{kind:r.disposition,state:r.state}}catch(r){return{kind:"failed",message:r instanceof Error?r.message:String(r)}}}function Oe(e,t,r){let n=F(N(e));if(r&&F(r.projectRoot)===n)return{projectRoot:n,worktreeKind:"git",worktreeId:r.worktreeId,cliVersion:t};let i=pe(n);if(i.kind==="error")throw new Error(`Could not establish Git worktree identity for ${n}: ${i.message}`);return i.kind==="non-git"?{projectRoot:n,worktreeKind:"non-git",cliVersion:t}:{projectRoot:n,worktreeKind:"git",worktreeId:i.identity.worktreeId,cliVersion:t}}function yr(e){return G(e,Oe(e.projectRoot,e.cliVersion,e.gitContext))}function G(e,t){let r=e.runtime??oe,n=v(e.cacheDir),i=k(n.statePath),o=ie(n.lockPath);return{identity:t,classification:kt(i,t,r.now(),r.isProcessAlive),lock:o,lockIsLive:o!==null&&r.isProcessAlive(o.pid),paths:n}}function bt(e){let t=e.runtime??oe,r=Oe(e.projectRoot,e.cliVersion,e.gitContext),n=G(e,r),i=re("ensure",n.classification);if(i.kind==="reuse")return M(n.paths.activityPath,t),{disposition:"reused",state:i.state};if(i.kind==="refuse-replace")throw new Error(`codebaseiq watch service pid ${i.state.pid} is still alive but its heartbeat is old. Refusing automatic replacement because civil-clock age alone cannot authorize a process signal.`);if(i.kind==="replace")ne(i.state,e,t),x(n.paths,i.state.pid,t);else if(i.kind==="start"){if(n.lockIsLive){let s=xe(e,r,t,Math.min(e.startupTimeoutMs??1e3,1e3));if(s)return M(n.paths.activityPath,t),{disposition:"reused",state:s};throw new Error(`codebaseiq watch is already running for ${N(e.projectRoot)} (pid ${n.lock?.pid}; lock: ${n.paths.lockPath}) without compatible daemon state. Stop the foreground watcher before starting the service.`)}n.classification.kind==="stale"&&x(n.paths,n.classification.state.pid,t)}else throw new Error(`Unexpected ensure action: ${i.kind}`);if(n=G(e,r),i=re("ensure",n.classification),i.kind==="reuse")return M(n.paths.activityPath,t),{disposition:"reused",state:i.state};if(i.kind==="refuse-replace")throw new Error(`codebaseiq watch service pid ${i.state.pid} remains alive with an old heartbeat; automatic replacement is not authorized.`);let o=e.serverPath??St(new URL("./watch-server.js",import.meta.url));t.spawnServer(o,r.projectRoot,e.cliVersion,e.watchOverrides??{});let c=xe(e,r,t,e.startupTimeoutMs??_e);if(!c)throw new Error(`codebaseiq watch service did not become ready within ${e.startupTimeoutMs??_e}ms.`);return M(n.paths.activityPath,t),{disposition:"started",state:c}}function De(e){let t=e.runtime??oe,r=v(e.cacheDir),n=k(r.statePath),i=n?t.isProcessAlive(n.pid)?{kind:"live",state:n}:{kind:"stale",state:n,reason:"dead-process"}:{kind:"stopped"},o=re("stop",i);if(o.kind==="signal-stop")return ne(o.state,e,t),x(r,o.state.pid,t),{disposition:"stopped",pid:o.state.pid};if(o.kind==="clean-stale")return x(r,o.state.pid,t),{disposition:"stopped",pid:o.state.pid};let c=ie(r.lockPath);return o.kind==="already-stopped"&&c&&t.isProcessAlive(c.pid)?(ne(c,e,t),x(r,c.pid,t),{disposition:"stopped",pid:c.pid}):{disposition:"already-stopped"}}function Le(e,t=Date.now()){W(e,{version:1,at:new Date(t).toISOString()})}function gr(e,t,r=Date.now(),n={}){Pe(v(gt(e)).refreshRequestsPath,t,{...n,now:()=>new Date(r)}),Le(e,r)}function Sr(e,t,r={}){let n=r.pid??process.pid,i=r.isProcessAlive??g,o=()=>{},c=r.readProcessIdentity??B,s=r.now??(()=>new Date),d={...z,wallNow:()=>s().getTime(),isProcessAlive:i,readProcessIdentity:c},a=Ie(e,{kind:"watch",pid:n,processIdentity:c(n),detail:{projectRoot:N(t)},parseLegacy:j,runtime:d});if(a.kind==="contended"){let l=Me(a.observation);return{acquired:!1,lockPath:e,message:Wt(e,t,l),release:o}}return{acquired:!0,lockPath:e,message:"",release:()=>{a.lock.release()}}}function ie(e){return Me(K(e,{parseLegacy:j}))}var j=e=>{let t=Ge(e);return t?{pid:t.pid,...t.processIdentity?{processIdentity:t.processIdentity}:{}}:null};function Me(e){if(e.state==="valid"&&e.record?.kind==="watch"){let t=e.record.detail?.projectRoot;return typeof t!="string"?null:{version:1,pid:e.record.pid,...e.record.processIdentity?{processIdentity:e.record.processIdentity}:{},projectRoot:t,startedAt:e.record.startedAt}}return Ge(e.parsed)}function Ge(e){try{let t=e;if(t.version!==1||typeof t.pid!="number"||!Number.isInteger(t.pid)||t.pid<=0||typeof t.projectRoot!="string"||!me(t.startedAt))return null;let r=t.processIdentity===void 0?null:fe(t.processIdentity);return t.processIdentity!==void 0&&(!r||r.pid!==t.pid)?null:{version:1,pid:t.pid,...r?{processIdentity:r}:{},projectRoot:t.projectRoot,startedAt:t.startedAt}}catch{return null}}function kt(e,t,r,n){if(!e)return{kind:"stopped"};if(e.protocolVersion!==V)return{kind:"incompatible",state:e,reason:"protocol"};if(e.projectRoot!==t.projectRoot)return{kind:"incompatible",state:e,reason:"project"};let i=t.worktreeKind==="git"?t.worktreeId:void 0;if(e.worktreeId!==i)return{kind:"incompatible",state:e,reason:"worktree"};if(e.cliVersion!==t.cliVersion)return{kind:"incompatible",state:e,reason:"cli-version"};if(!n(e.pid))return{kind:"stale",state:e,reason:"dead-process"};let o=Date.parse(e.heartbeatAt);return r-o>U?{kind:"stale",state:e,reason:"old-heartbeat"}:{kind:"live",state:e}}function re(e,t){switch(e){case"status":return{kind:"report",classification:t};case"ensure":switch(t.kind){case"stopped":return{kind:"start"};case"stale":return t.reason==="old-heartbeat"?{kind:"refuse-replace",state:t.state,reason:"old-heartbeat"}:{kind:"start"};case"live":return{kind:"reuse",state:t.state};case"incompatible":return{kind:"replace",state:t.state};default:return ee(t)}case"stop":switch(t.kind){case"stopped":return{kind:"already-stopped"};case"stale":return t.reason==="old-heartbeat"?{kind:"signal-stop",state:t.state}:{kind:"clean-stale",state:t.state};case"live":case"incompatible":return{kind:"signal-stop",state:t.state};default:return ee(t)}default:return ee(e)}}function xe(e,t,r,n){let i=r.monotonicNow??O,o=i()+n;for(;i()<=o;){let c=G(e,t).classification;if(c.kind==="live")return c.state;r.sleep(te)}return null}function ne(e,t,r){let{pid:n}=e;if(!r.isProcessAlive(n))return;qe(e,r),r.signalProcess(n);let i=t.stopTimeoutMs??vt,o=r.monotonicNow??O,c=o()+i;for(;o()<=c;){if(!r.isProcessAlive(n))return;r.sleep(te)}if(!r.forceSignalProcess)throw new Error(`codebaseiq watch service pid ${n} did not stop within ${i}ms and forced termination is unavailable.`);qe(e,r),r.forceSignalProcess(n);let s=t.forceStopTimeoutMs??Rt,d=o()+s;for(;o()<=d;){if(!r.isProcessAlive(n))return;let a=r.readProcessIdentity(n);if(e.processIdentity&&a&&!H(e.processIdentity,a))return;r.sleep(te)}throw new Error(`codebaseiq watch service pid ${n} remained alive ${s}ms after forced termination.`)}function x(e,t,r){if(Te(e.statePath,{force:!0}),Te(e.activityPath,{force:!0}),ie(e.lockPath)?.pid===t&&!r.isProcessAlive(t)){let i={...z,wallNow:r.now,isProcessAlive:r.isProcessAlive,readProcessIdentity:r.readProcessIdentity},o=K(e.lockPath,{parseLegacy:j,runtime:i});we(e.lockPath,o,{parseLegacy:j,runtime:i})}}function Wt(e,t,r){return`error: codebaseiq watch is already running for ${N(t)}${r?` (pid ${r.pid}, started ${r.startedAt}; lock: ${e})`:` (lock: ${e})`}. Stop that watcher before starting another.`}function M(e,t){try{(t.recordActivity??Le)(e,t.now())}catch(r){let n=Ct(r);if(n!=="EPERM"&&n!=="EACCES"&&n!=="EROFS")throw r}}function Ct(e){return e.code}var oe={now:Date.now,monotonicNow:O,isProcessAlive:g,readProcessIdentity:B,spawnServer(e,t,r,n){if(!yt(e))throw new Error(`Watch service helper was not found at ${e}. Run npm run build first.`);mt(process.execPath,[e,t,r,JSON.stringify(n)],{detached:!0,stdio:"ignore",windowsHide:!0,env:{...process.env,CODEBASEIQ_SKIP_WATCH_SERVICE:"1"}}).unref()},signalProcess(e){process.kill(e,"SIGTERM")},forceSignalProcess(e){process.kill(e,"SIGKILL")},sleep(e){let t=new Int32Array(new SharedArrayBuffer(4));Atomics.wait(t,0,0,e)}};function qe(e,t){if(!e.processIdentity)throw new Error(`Refusing to signal codebaseiq watch pid ${e.pid}: its ownership record has no process identity.`);let r=t.readProcessIdentity(e.pid);if(!r)throw new Error(`Refusing to signal codebaseiq watch pid ${e.pid}: its process identity is unavailable.`);if(!H(e.processIdentity,r))throw new Error(`Refusing to signal codebaseiq watch pid ${e.pid}: its process identity does not match the ownership record.`)}function ee(e){throw new Error(`Unhandled watch service value: ${JSON.stringify(e)}`)}import{existsSync as E,lstatSync as b,readdirSync as $e,realpathSync as je,rmSync as w,statSync as Fe}from"fs";import{join as u,resolve as q,sep as He}from"path";var Et=3600*1e3,At=2*1024*1024*1024,ce=300*1e3,Pt="gc-state.json",Tt="gc.lock",_t="projects-gc-state.json",xt="projects-gc.lock",qt=1440*60*1e3;function Ot(e){let t=e.leases.filter(s=>s.managed&&!s.live&&!s.busy),r=Be(e.leases,e.locks),n={};for(let s of e.generations)r.has(s.generationId)||(n[s.generationId]=s.unreferencedAt??e.nowMs);let i=e.generations.filter(s=>!r.has(s.generationId)).sort((s,d)=>n[s.generationId]-n[d.generationId]||s.generationId.localeCompare(d.generationId)),o=new Set;for(let s of i)e.nowMs-n[s.generationId]>=e.policy.generationTtlMs&&o.add(s.generationId);let c=e.generations.filter(s=>!o.has(s.generationId)).reduce((s,d)=>s+d.size,0);for(let s of i){if(c<=e.policy.budgetBytes)break;o.has(s.generationId)||(o.add(s.generationId),c-=s.size)}for(let s of o)delete n[s];return{deleteWorktrees:t,deleteGenerations:e.generations.filter(s=>o.has(s.generationId)),deleteLocks:e.locks.filter(s=>!s.live),deleteTemporaries:e.temporaries.filter(s=>!s.live),protectedGenerationIds:[...r].sort(),unreferencedSince:n}}function Be(e,t){let r=new Set(e.filter(n=>n.managed&&(n.live||n.busy)).flatMap(n=>[n.lease.baseGenerationId,n.lease.activeGenerationId]).filter(n=>n!==void 0));for(let n of t)n.live&&r.add(n.generationId);return r}function qr(e,t,r={}){if(!Re())return{kind:"disabled"};let n=$(e);if(!n)return{kind:"unavailable"};let i=u(I(),"repositories",n.repositoryId),o=(r.now??Date.now)(),c=E(i)?Ve(e,i,n.repositoryId,t,o,r):{kind:"unavailable"};return Mt(e,n.repositoryId,t,o,r),Dt(o,r),c}function Dt(e,t){let r=u(I(),"projects"),n={examined:0,reclaimed:0};if(!E(r))return n;let i=u(r,_t),o=ze(i);if(!t.force&&o!==void 0&&e-o<ce)return n;let c=T(u(r,xt));if(!c)return n;try{for(let s of C(r)){let d=u(r,s),a;try{a=b(d)}catch{continue}if(!(!a.isDirectory()||a.isSymbolicLink())&&(n.examined+=1,!!Lt(d,e)))try{w(d,{recursive:!0,force:!0}),n.reclaimed+=1}catch{}}W(i,{version:1,lastSweepAt:new Date(e).toISOString()},{spacing:2,trailingNewline:!0})}finally{c.release()}return n}function Lt(e,t){let r=u(e,Se),n;try{let c=JSON.parse(S(r,"cache-ownership"));if(typeof c.canonicalProjectRoot!="string"||c.canonicalProjectRoot.length===0)return!1;n=c.canonicalProjectRoot}catch{return!1}if(E(n))return!1;try{if(t-b(e).mtimeMs<qt)return!1}catch{return!1}let i=k(v(e).statePath);if(i&&g(i.pid))return!1;let o=T(u(e,"cache-lifecycle.lock"));return o===null?!1:(o.release(),!0)}function Ve(e,t,r,n,i,o){let c=u(t,"gc-state.json"),s=Je(c);if(!o.force&&s&&i-Date.parse(s.lastSweepAt)<ce)return{kind:"throttled",sweptAt:s.lastSweepAt};let d=be(t,{now:()=>i});if(!d)return{kind:"busy"};try{let a=Ue(e,t,r,s?.unreferencedSince??{}),l=Ot({nowMs:i,...a,policy:{generationTtlMs:o.policy?.generationTtlMs??Et,budgetBytes:o.policy?.budgetBytes??At}}),p=0,f=0;for(let h of l.deleteWorktrees){if(!de(h.lease))continue;if(!E(h.lease.localCacheDir)){w(h.leasePath,{force:!0}),f+=1;continue}if(!jt(h.lease))continue;let ue=T(u(h.lease.localCacheDir,"cache-lifecycle.lock"));if(ue)try{if(se(h.lease,!0))continue;try{De({projectRoot:h.lease.projectRoot,cacheDir:h.lease.localCacheDir,cliVersion:n})}catch{continue}if(se(h.lease,!0))continue;w(h.lease.localCacheDir,{recursive:!0,force:!0}),w(h.leasePath,{force:!0}),f+=1}finally{ue.release()}}for(let h of l.deleteLocks)w(h.path,{force:!0});for(let h of l.deleteTemporaries)w(h.path,{recursive:!0,force:!0});for(let h of l.deleteGenerations)w(h.path,{recursive:!0,force:!0}),p+=h.size;Ee(u(t,"evidence.db"));let y={kind:"swept",sweptAt:new Date(i).toISOString(),deletedWorktrees:f,deletedGenerations:l.deleteGenerations.length,deletedBytes:p,protectedGenerations:l.protectedGenerationIds.length},m={version:1,lastSweepAt:y.sweptAt,unreferencedSince:l.unreferencedSince,lastResult:y};return W(c,m,{spacing:2,trailingNewline:!0}),y}catch(a){return{kind:"failed",error:a instanceof Error?a.message:String(a)}}finally{d.release()}}function Mt(e,t,r,n,i){let o=u(I(),"repositories");if(!E(o))return;let c=u(o,Pt),s=ze(c);if(!i.force&&s!==void 0&&n-s<ce)return;let d=T(u(o,Tt));if(d)try{for(let a of C(o)){if(a===t||!/^[a-f0-9]{24}$/.test(a))continue;let l=u(o,a),p;try{p=b(l)}catch{continue}if(!p.isDirectory()||p.isSymbolicLink())continue;let f=Nt(l)??e;Ve(f,l,a,r,n,i)}W(c,{version:1,lastSweepAt:new Date(n).toISOString()},{spacing:2,trailingNewline:!0})}finally{d.release()}}function Or(e,t,r){let n=ke(e,r.dbPath,t);if(n)return{state:"bypassed",reason:n,localCacheDir:r.cacheDir,generations:0,generationBytes:0,protectedGenerations:0,unreferencedGenerations:0,unreferencedBytes:0,temporaryGenerations:0,sharedEvidence:{exists:!1,bytes:0}};let i=$(e);if(!i)return{state:"unavailable",reason:"Git worktree identity is unavailable",localCacheDir:r.cacheDir,generations:0,generationBytes:0,protectedGenerations:0,unreferencedGenerations:0,unreferencedBytes:0,temporaryGenerations:0,sharedEvidence:{exists:!1,bytes:0}};let o=u(I(),"repositories",i.repositoryId),c=le(u(o,"worktrees",`${i.worktreeId}.json`)),s=Je(u(o,"gc-state.json")),d=Ue(e,o,i.repositoryId,s?.unreferencedSince??{}),a=Be(d.leases,d.locks),l=d.generations.filter(m=>!a.has(m.generationId)),p=d.generations.reduce((m,h)=>m+h.size,0),f=We(e,t),y=0;return f&&(y=Gt(f)),{state:"managed",repositoryId:i.repositoryId,worktreeId:i.worktreeId,localCacheDir:r.cacheDir,...c?{baseGenerationId:c.baseGenerationId,activeGenerationId:c.activeGenerationId,lastAction:c.lastAction,reason:c.lastReason,lastSeenAt:c.lastSeenAt}:{},generations:d.generations.length,generationBytes:p,protectedGenerations:d.generations.filter(m=>a.has(m.generationId)).length,unreferencedGenerations:l.length,unreferencedBytes:l.reduce((m,h)=>m+h.size,0),temporaryGenerations:d.temporaries.length,sharedEvidence:{path:f,exists:y>0,bytes:y},cleanup:s?.lastResult}}function Gt(e){return[e,`${e}-wal`,`${e}-shm`].reduce((t,r)=>{try{return t+Fe(r).size}catch{return t}},0)}function Ue(e,t,r,n){let i=new Set(he(e).map(a=>q(a.path))),o=[];for(let a of C(u(t,"worktrees"))){if(!a.endsWith(".json"))continue;let l=u(t,"worktrees",a),p=le(l);if(!p)continue;let f=q(p.projectRoot);o.push({leasePath:l,lease:p,managed:p.repositoryId===r&&de(p),live:i.has(f)||E(f),busy:se(p)})}let c=[];for(let a of C(u(t,"locks"))){let l=/^([a-f0-9]{64})\.lock$/.exec(a);if(!l)continue;let p=u(t,"locks",a),f=ae(p),y=f!==void 0&&g(f),m=l[1];c.push({generationId:m,path:p,live:y})}let s=[],d=[];for(let a of C(u(t,"generations"))){let l=/^\.tmp-(\d+)-/.exec(a);if(l){let y=u(t,"generations",a),m=Number(l[1]);try{d.push({path:y,size:Ne(y),live:Number.isSafeInteger(m)&&g(m)})}catch{}continue}if(!/^[a-f0-9]{64}$/.test(a))continue;let p=u(t,"generations",a),f;try{f=b(p)}catch{continue}!f.isDirectory()||f.isSymbolicLink()||s.push({generationId:a,path:p,size:Ne(p),...n[a]===void 0?{}:{unreferencedAt:n[a]}})}return{leases:o,generations:s,locks:c,temporaries:d}}function de(e){if(e.ownershipChecksum!==Ce(e)||P(e.localCacheDir)!==P(ve(e.projectRoot)))return!1;let t=P(u(I(),"projects"));return P(e.localCacheDir).startsWith(`${t}${He}`)}function jt(e){if(!de(e))return!1;let t=q(I()),r=q(u(t,"projects")),n=q(e.localCacheDir);try{let i=b(t),o=b(r),c=b(n);if(!i.isDirectory()||i.isSymbolicLink()||!o.isDirectory()||o.isSymbolicLink()||!c.isDirectory()||c.isSymbolicLink())return!1;let s=je(r);return je(n).startsWith(`${s}${He}`)}catch{return!1}}function Nt(e){for(let t of C(u(e,"worktrees"))){if(!t.endsWith(".json"))continue;let r=le(u(e,"worktrees",t));if(r)return r.projectRoot}}function se(e,t=!1){for(let n of t?["index.lock"]:["index.lock","cache-lifecycle.lock"]){let i=ae(u(e.localCacheDir,n));if(i!==void 0&&g(i))return!0}let r=ae(v(e.localCacheDir).lockPath);return r!==void 0&&g(r)}function le(e){try{let t=JSON.parse(S(e,"worktree cache lease"));return t.version!==1||typeof t.repositoryId!="string"||typeof t.worktreeId!="string"||typeof t.projectRoot!="string"||t.treeOid!==void 0&&typeof t.treeOid!="string"||typeof t.localCacheDir!="string"||t.baseGenerationId!==void 0&&typeof t.baseGenerationId!="string"||t.activeGenerationId!==void 0&&typeof t.activeGenerationId!="string"||typeof t.ownershipChecksum!="string"||!/^[a-f0-9]{64}$/.test(t.ownershipChecksum)||typeof t.lastAction!="string"||t.lastReason!==void 0&&typeof t.lastReason!="string"||typeof t.lastSeenAt!="string"?null:t}catch{return null}}function ae(e){try{let t=JSON.parse(S(e,"watch lock record"));return typeof t.pid=="number"&&Number.isSafeInteger(t.pid)&&t.pid>0?t.pid:void 0}catch{return}}function Je(e){try{let t=JSON.parse(S(e,"repository cache GC state"));return t.version!==1||typeof t.lastSweepAt!="string"||!Number.isFinite(Date.parse(t.lastSweepAt))||!t.unreferencedSince||typeof t.unreferencedSince!="object"||!t.lastResult?null:t}catch{return null}}function ze(e){try{let t=JSON.parse(S(e,"global repository cache GC state"));if(t.version!==1||typeof t.lastSweepAt!="string")return;let r=Date.parse(t.lastSweepAt);return Number.isFinite(r)?r:void 0}catch{return}}function C(e){try{return $e(e)}catch{return[]}}function Ne(e){let t=0,r=[e];for(;r.length>0;){let n=r.pop();for(let i of $e(n,{withFileTypes:!0})){let o=u(n,i.name);i.isDirectory()?r.push(o):i.isFile()&&(t+=Fe(o).size)}}return t}export{Kt as a,fr as b,wt as c,mr as d,yr as e,bt as f,De as g,gr as h,Sr as i,qr as j,Or as k};
3
- //# sourceMappingURL=chunk-DR2LURYU.js.map