scip-query 0.19.6 → 0.19.8

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 (304) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/README.md +28 -15
  3. package/dist/augment-vue-worker.js +1 -1
  4. package/dist/chunk-2465DLHK.js +3 -0
  5. package/dist/{chunk-2CVXCGL4.js → chunk-24GTWJ3N.js} +2 -2
  6. package/dist/{chunk-XVJ3V7LM.js → chunk-2SNGN6U4.js} +2 -2
  7. package/dist/{chunk-FKGN4A4E.js → chunk-2U3OLUNJ.js} +2 -2
  8. package/dist/{chunk-UUJBLG6J.js → chunk-33KUO7CG.js} +2 -2
  9. package/dist/{chunk-N3SE646F.js → chunk-33XTHFKR.js} +2 -2
  10. package/dist/{chunk-WXAAURU7.js → chunk-3EDFLQ6A.js} +2 -2
  11. package/dist/chunk-3ZSJ3PWF.js +16 -0
  12. package/dist/{chunk-G4UQL4CP.js → chunk-43KC6EQZ.js} +2 -2
  13. package/dist/{chunk-NQLSSVOB.js → chunk-464PLI5O.js} +2 -2
  14. package/dist/chunk-46XGSFNI.js +2 -0
  15. package/dist/{chunk-NN4ZIRPK.js → chunk-47BU5Z4T.js} +2 -2
  16. package/dist/chunk-4BV4QAZJ.js +5 -0
  17. package/dist/chunk-4YTUWQ6M.js +18 -0
  18. package/dist/{chunk-LMFVTUW2.js → chunk-5ML2BNRH.js} +2 -2
  19. package/dist/{chunk-OP3MTFJR.js → chunk-5YLUDDAF.js} +2 -2
  20. package/dist/chunk-67QRR5YC.js +6 -0
  21. package/dist/{chunk-273W2U4Y.js → chunk-6GXYN7YA.js} +2 -2
  22. package/dist/{chunk-JELJLXEE.js → chunk-6M7RONVB.js} +2 -2
  23. package/dist/{chunk-MLGTCX56.js → chunk-7FT5Y65S.js} +2 -2
  24. package/dist/{chunk-F42A3AKG.js → chunk-7KYNAMMH.js} +2 -2
  25. package/dist/{chunk-VP542C25.js → chunk-7LSVMFX7.js} +2 -2
  26. package/dist/{chunk-YWB2EBNB.js → chunk-7QHY3H7P.js} +2 -2
  27. package/dist/{chunk-UQK5CRUK.js → chunk-7RAG65VK.js} +2 -2
  28. package/dist/{chunk-CYJM7CYF.js → chunk-7SWJEWJF.js} +2 -2
  29. package/dist/{chunk-47X75ZKH.js → chunk-7VCOXZH3.js} +2 -2
  30. package/dist/chunk-A2TNXAXO.js +8 -0
  31. package/dist/{chunk-TYQ76QHQ.js → chunk-A3QXWFBK.js} +2 -2
  32. package/dist/{chunk-S2GP3CU3.js → chunk-AA4UWRNL.js} +2 -2
  33. package/dist/{chunk-OBKDTVZ3.js → chunk-ACAM6O5R.js} +2 -2
  34. package/dist/chunk-AQOFWNQJ.js +1 -0
  35. package/dist/chunk-AZFUMCQB.js +2 -0
  36. package/dist/{chunk-IYAOX36F.js → chunk-BDOIKGDI.js} +2 -2
  37. package/dist/{chunk-7E3TH5ZN.js → chunk-BNXICU42.js} +2 -2
  38. package/dist/chunk-C5Q44Q5D.js +3 -0
  39. package/dist/{chunk-OQ2A4G2G.js → chunk-CTF2GDEX.js} +2 -2
  40. package/dist/chunk-DHEQMPLW.js +2 -0
  41. package/dist/{chunk-EVOC5I5I.js → chunk-DQBCO2UY.js} +2 -2
  42. package/dist/{chunk-YLVE3SXZ.js → chunk-DQGSM7RZ.js} +2 -2
  43. package/dist/chunk-E2LAW7SL.js +30 -0
  44. package/dist/chunk-E3HYEQO7.js +2 -0
  45. package/dist/chunk-E4NFOAD4.js +6 -0
  46. package/dist/chunk-E5HNT4X2.js +3 -0
  47. package/dist/{chunk-6XHTISLI.js → chunk-ELLMY7XJ.js} +2 -2
  48. package/dist/chunk-FD3HFKXR.js +5 -0
  49. package/dist/{chunk-RJHCPSZ7.js → chunk-FIJCV235.js} +2 -2
  50. package/dist/{chunk-KLVJABXA.js → chunk-FJ5UDTQF.js} +2 -2
  51. package/dist/{chunk-SHKZ7OVJ.js → chunk-GHKEJTCE.js} +2 -2
  52. package/dist/{chunk-JERWGHQT.js → chunk-GLZTVKAB.js} +3 -3
  53. package/dist/{chunk-A43URCQ3.js → chunk-GNC4JVAN.js} +2 -2
  54. package/dist/chunk-HIB452NU.js +949 -0
  55. package/dist/{chunk-U5CNPPTZ.js → chunk-HZYDQPNY.js} +2 -2
  56. package/dist/chunk-IF6FP6B2.js +66 -0
  57. package/dist/{chunk-CSTYYXKC.js → chunk-JAY7YWS3.js} +2 -2
  58. package/dist/{chunk-6XFC7PQ5.js → chunk-JHF3E4YM.js} +2 -2
  59. package/dist/chunk-JORHF5AL.js +108 -0
  60. package/dist/{chunk-QBYYWGAT.js → chunk-K2WO7XY7.js} +2 -2
  61. package/dist/chunk-KFZNKUNT.js +2 -0
  62. package/dist/{chunk-J7VT2CRB.js → chunk-KJ2IIBZN.js} +2 -2
  63. package/dist/{chunk-336DC5NJ.js → chunk-KKME5ZAI.js} +2 -2
  64. package/dist/chunk-KSGTULOS.js +9 -0
  65. package/dist/{chunk-E2ZXPB7J.js → chunk-KXDJAG4N.js} +3 -3
  66. package/dist/{chunk-Z2LHPIOM.js → chunk-L4S2A7BV.js} +2 -2
  67. package/dist/chunk-LP3ARJKF.js +8 -0
  68. package/dist/chunk-LSOR3LQG.js +3 -0
  69. package/dist/{chunk-FHCTEANE.js → chunk-MLFZP76A.js} +2 -2
  70. package/dist/{chunk-RBFFD4V2.js → chunk-MNSTUIDD.js} +2 -2
  71. package/dist/{chunk-3OIKRYU5.js → chunk-MSBDMFER.js} +2 -2
  72. package/dist/{chunk-7LABSJSR.js → chunk-MZZBAITE.js} +5 -5
  73. package/dist/{chunk-QQWOFXNW.js → chunk-NE3TZUCI.js} +2 -2
  74. package/dist/{chunk-JZNLMHWY.js → chunk-NTUMF2X3.js} +2 -2
  75. package/dist/{chunk-DD5BOU5I.js → chunk-O23I56NA.js} +2 -2
  76. package/dist/{chunk-YHXBD52M.js → chunk-O3O4XXO6.js} +2 -2
  77. package/dist/{chunk-FQTPPXNA.js → chunk-OUBAF226.js} +2 -2
  78. package/dist/chunk-P3UO3EH3.js +2 -0
  79. package/dist/{chunk-5OC3HWP5.js → chunk-QGGLL3UH.js} +2 -2
  80. package/dist/chunk-QIQ63BHW.js +16 -0
  81. package/dist/{chunk-RWRLUZ6U.js → chunk-QJIVBYEK.js} +2 -2
  82. package/dist/chunk-QOXBSI6G.js +20 -0
  83. package/dist/{chunk-7Q6VYYCH.js → chunk-QXK6UUSM.js} +2 -2
  84. package/dist/{chunk-ZTTISZ7J.js → chunk-RA3AYNWP.js} +2 -2
  85. package/dist/chunk-RJMDJR3A.js +2 -0
  86. package/dist/{chunk-TFUU5MQQ.js → chunk-RLH5VUMG.js} +2 -2
  87. package/dist/{chunk-OHWZKLVA.js → chunk-S4S2WOIX.js} +2 -2
  88. package/dist/{chunk-YTUD45PU.js → chunk-SERUIGV5.js} +2 -2
  89. package/dist/{chunk-2OXVAGGT.js → chunk-SMQWE25B.js} +2 -2
  90. package/dist/{chunk-K42M2KWT.js → chunk-TAVELHYR.js} +2 -2
  91. package/dist/{chunk-MGBJHRFB.js → chunk-TWMJ3Y3G.js} +2 -2
  92. package/dist/chunk-VAXNI5NE.js +146 -0
  93. package/dist/chunk-VVY2G5ET.js +2 -0
  94. package/dist/{chunk-XF3KLXN3.js → chunk-W3DBTGL4.js} +2 -2
  95. package/dist/{chunk-26X7KCJR.js → chunk-WANA4KAQ.js} +2 -2
  96. package/dist/chunk-WJL2L6MV.js +60 -0
  97. package/dist/chunk-WUW7YUAH.js +11 -0
  98. package/dist/{chunk-PC44K7RF.js → chunk-WWKWUPSU.js} +2 -2
  99. package/dist/{chunk-2EZSOTSY.js → chunk-WY45BHKQ.js} +2 -2
  100. package/dist/chunk-X4FR5BZF.js +9 -0
  101. package/dist/chunk-X6RKPDY7.js +2 -0
  102. package/dist/{chunk-GK3GRUJX.js → chunk-YLFORA5G.js} +2 -2
  103. package/dist/{chunk-NBRUH7OE.js → chunk-YTVWB7YJ.js} +2 -2
  104. package/dist/{chunk-YGQN3XGZ.js → chunk-ZCEJ63SP.js} +2 -2
  105. package/dist/{chunk-2GSQR6YA.js → chunk-ZJ5CBXK3.js} +2 -2
  106. package/dist/chunk-ZL2OGDCD.js +2 -0
  107. package/dist/cli.js +8 -3
  108. package/dist/command-descriptors-ZW5J4ZEM.js +631 -0
  109. package/dist/{config-types-BWQ5xPGI.d.ts → config-types-B6MEoRNy.d.ts} +4 -0
  110. package/dist/{db-B0r1o7Vt.d.ts → db-DYLKr9Wn.d.ts} +1 -1
  111. package/dist/direct-navigation-42YHQPOI.js +3 -0
  112. package/dist/{health-CFnlCiTz.d.ts → health-DgxIDXJC.d.ts} +1 -1
  113. package/dist/index.d.ts +2 -2
  114. package/dist/index.js +1 -1
  115. package/dist/postinstall.js +1 -1
  116. package/dist/queries/affected.d.ts +2 -2
  117. package/dist/queries/affected.js +1 -1
  118. package/dist/queries/architecture.d.ts +2 -2
  119. package/dist/queries/architecture.js +1 -1
  120. package/dist/queries/bottlenecks.d.ts +2 -2
  121. package/dist/queries/bottlenecks.js +1 -1
  122. package/dist/queries/by-kind.d.ts +2 -2
  123. package/dist/queries/by-kind.js +1 -1
  124. package/dist/queries/call-graph.d.ts +2 -2
  125. package/dist/queries/call-graph.js +1 -1
  126. package/dist/queries/change-surface.d.ts +2 -2
  127. package/dist/queries/change-surface.js +1 -1
  128. package/dist/queries/cleanup-plan.d.ts +2 -2
  129. package/dist/queries/cleanup-plan.js +1 -1
  130. package/dist/queries/co-change.d.ts +2 -2
  131. package/dist/queries/co-change.js +1 -1
  132. package/dist/queries/code.d.ts +2 -2
  133. package/dist/queries/code.js +1 -1
  134. package/dist/queries/complexity-hotspots.d.ts +2 -2
  135. package/dist/queries/complexity-hotspots.js +1 -1
  136. package/dist/queries/complexity.d.ts +2 -2
  137. package/dist/queries/complexity.js +1 -1
  138. package/dist/queries/convergence.d.ts +2 -2
  139. package/dist/queries/convergence.js +1 -1
  140. package/dist/queries/coupling.d.ts +2 -2
  141. package/dist/queries/coupling.js +1 -1
  142. package/dist/queries/cycles.d.ts +2 -2
  143. package/dist/queries/cycles.js +1 -1
  144. package/dist/queries/dataflow.d.ts +2 -2
  145. package/dist/queries/dataflow.js +1 -1
  146. package/dist/queries/dead.d.ts +2 -2
  147. package/dist/queries/dead.js +1 -1
  148. package/dist/queries/decorative-checkers.d.ts +2 -2
  149. package/dist/queries/decorative-checkers.js +1 -1
  150. package/dist/queries/deep-chains.d.ts +2 -2
  151. package/dist/queries/deep-chains.js +1 -1
  152. package/dist/queries/deps.d.ts +2 -2
  153. package/dist/queries/deps.js +1 -1
  154. package/dist/queries/diff-gate.d.ts +2 -2
  155. package/dist/queries/diff-gate.js +1 -1
  156. package/dist/queries/diff-impact.d.ts +2 -2
  157. package/dist/queries/diff-impact.js +1 -1
  158. package/dist/queries/doc-drift.d.ts +2 -2
  159. package/dist/queries/doc-drift.js +1 -1
  160. package/dist/queries/drift.d.ts +2 -2
  161. package/dist/queries/drift.js +1 -1
  162. package/dist/queries/duplicate-bodies.d.ts +2 -2
  163. package/dist/queries/duplicate-bodies.js +1 -1
  164. package/dist/queries/extract-candidates.d.ts +2 -2
  165. package/dist/queries/extract-candidates.js +1 -1
  166. package/dist/queries/fan.d.ts +2 -2
  167. package/dist/queries/fan.js +1 -1
  168. package/dist/queries/files.d.ts +2 -2
  169. package/dist/queries/health.d.ts +3 -3
  170. package/dist/queries/health.js +1 -1
  171. package/dist/queries/hierarchy.d.ts +2 -2
  172. package/dist/queries/hierarchy.js +1 -1
  173. package/dist/queries/hotspots.d.ts +2 -2
  174. package/dist/queries/hotspots.js +1 -1
  175. package/dist/queries/imports.d.ts +2 -2
  176. package/dist/queries/imports.js +1 -1
  177. package/dist/queries/incomplete-migration.d.ts +2 -2
  178. package/dist/queries/incomplete-migration.js +1 -1
  179. package/dist/queries/index.d.ts +3 -3
  180. package/dist/queries/index.js +1 -1
  181. package/dist/queries/isolated.d.ts +2 -2
  182. package/dist/queries/isolated.js +1 -1
  183. package/dist/queries/locality-candidates.d.ts +2 -2
  184. package/dist/queries/locality-candidates.js +1 -1
  185. package/dist/queries/members.d.ts +2 -2
  186. package/dist/queries/members.js +1 -1
  187. package/dist/queries/methods.d.ts +2 -2
  188. package/dist/queries/methods.js +1 -1
  189. package/dist/queries/not-implemented.d.ts +2 -2
  190. package/dist/queries/not-implemented.js +1 -1
  191. package/dist/queries/outline.d.ts +2 -2
  192. package/dist/queries/outline.js +1 -1
  193. package/dist/queries/passthrough-candidates.d.ts +2 -2
  194. package/dist/queries/passthrough-candidates.js +1 -1
  195. package/dist/queries/plan-context.d.ts +2 -2
  196. package/dist/queries/plan-context.js +1 -1
  197. package/dist/queries/react-component-duplicates.d.ts +2 -2
  198. package/dist/queries/react-component-duplicates.js +1 -1
  199. package/dist/queries/react-hook-candidates.d.ts +2 -2
  200. package/dist/queries/react-hook-candidates.js +1 -1
  201. package/dist/queries/react-large-component-pressure.d.ts +2 -2
  202. package/dist/queries/react-large-component-pressure.js +1 -1
  203. package/dist/queries/recent-duplicates.d.ts +2 -2
  204. package/dist/queries/recent-duplicates.js +1 -1
  205. package/dist/queries/redundant-reexports.d.ts +2 -2
  206. package/dist/queries/redundant-reexports.js +1 -1
  207. package/dist/queries/refs.d.ts +2 -2
  208. package/dist/queries/refs.js +1 -1
  209. package/dist/queries/self-audit.d.ts +2 -2
  210. package/dist/queries/self-audit.js +1 -1
  211. package/dist/queries/similar-chains.d.ts +2 -2
  212. package/dist/queries/similar-chains.js +1 -1
  213. package/dist/queries/similar-files.d.ts +2 -2
  214. package/dist/queries/similar-files.js +1 -1
  215. package/dist/queries/similar-signatures.d.ts +2 -2
  216. package/dist/queries/similar-signatures.js +1 -1
  217. package/dist/queries/similar.d.ts +2 -2
  218. package/dist/queries/similar.js +1 -1
  219. package/dist/queries/slice.d.ts +2 -2
  220. package/dist/queries/slice.js +1 -1
  221. package/dist/queries/stale-abstractions.d.ts +2 -2
  222. package/dist/queries/stale-abstractions.js +1 -1
  223. package/dist/queries/stats.d.ts +2 -2
  224. package/dist/queries/surface.d.ts +2 -2
  225. package/dist/queries/surface.js +1 -1
  226. package/dist/queries/symbols.d.ts +2 -2
  227. package/dist/queries/symbols.js +1 -1
  228. package/dist/queries/system.d.ts +2 -2
  229. package/dist/queries/system.js +1 -1
  230. package/dist/queries/test-quality.d.ts +2 -2
  231. package/dist/queries/test-quality.js +1 -1
  232. package/dist/queries/trace.d.ts +2 -2
  233. package/dist/queries/trace.js +1 -1
  234. package/dist/queries/twin-ab.d.ts +2 -2
  235. package/dist/queries/twin-ab.js +1 -1
  236. package/dist/queries/twin-drift.d.ts +2 -2
  237. package/dist/queries/twin-drift.js +1 -1
  238. package/dist/queries/unused-imports.d.ts +2 -2
  239. package/dist/queries/unused-imports.js +1 -1
  240. package/dist/queries/unused-params.d.ts +2 -2
  241. package/dist/queries/unused-params.js +1 -1
  242. package/dist/queries/vue-component-duplicates.d.ts +2 -2
  243. package/dist/queries/vue-component-duplicates.js +1 -1
  244. package/dist/queries/vue-composable-candidates.d.ts +2 -2
  245. package/dist/queries/vue-composable-candidates.js +1 -1
  246. package/dist/queries/vue-large-view-pressure.d.ts +2 -2
  247. package/dist/queries/vue-large-view-pressure.js +1 -1
  248. package/dist/queries/wrapper-candidates.d.ts +2 -2
  249. package/dist/queries/wrapper-candidates.js +1 -1
  250. package/dist/reindex-worker.js +26 -25
  251. package/dist/reindex.d.ts +7 -3
  252. package/dist/reindex.js +34 -33
  253. package/dist/runtime.d.ts +3 -10
  254. package/dist/runtime.js +3 -3
  255. package/dist/rust-semantic-session-server.js +1 -1
  256. package/dist/rust-semantic-session-worker.js +1 -1
  257. package/dist/rust-semantic-worker.js +1 -1
  258. package/dist/{scip-cli-DCvnlZCu.d.ts → scip-cli-Cc6c00-a.d.ts} +2 -2
  259. package/dist/watch-server.js +5 -5
  260. package/docs/AGENT_GUIDE.md +19 -3
  261. package/docs/CLI_JSON_OUTPUT.md +86 -1
  262. package/docs/COMMAND_REFERENCE.md +5 -3
  263. package/docs/SECURITY_MODEL.md +129 -0
  264. package/docs/TELEMETRY_RETENTION.md +5 -0
  265. package/docs/schemas/cli-output-page.schema.json +104 -0
  266. package/package.json +8 -7
  267. package/skills/_shared/SKILL.md +4 -2
  268. package/skills/scip-audit/SKILL.md +3 -2
  269. package/skills/scip-explore/SKILL.md +1 -1
  270. package/skills/scip-improve/SKILL.md +1 -1
  271. package/skills/scip-plan/SKILL.md +1 -1
  272. package/skills/scip-verify/SKILL.md +7 -2
  273. package/dist/chunk-24QNP7MN.js +0 -2
  274. package/dist/chunk-2ZOCHAL2.js +0 -8
  275. package/dist/chunk-35SQLYCQ.js +0 -2
  276. package/dist/chunk-4CGVLUDP.js +0 -18
  277. package/dist/chunk-4RI4BJGT.js +0 -8
  278. package/dist/chunk-52HQTTPB.js +0 -2
  279. package/dist/chunk-A63U2W3P.js +0 -3
  280. package/dist/chunk-ADFSIJP2.js +0 -16
  281. package/dist/chunk-AOLE4DYM.js +0 -6
  282. package/dist/chunk-B5MHCHP3.js +0 -107
  283. package/dist/chunk-DGAGY7RJ.js +0 -60
  284. package/dist/chunk-DGMCFMPG.js +0 -11
  285. package/dist/chunk-GA64UPMI.js +0 -6
  286. package/dist/chunk-HEBAY673.js +0 -2
  287. package/dist/chunk-HELS7KFF.js +0 -2
  288. package/dist/chunk-IPDCSB6N.js +0 -6
  289. package/dist/chunk-JJJCO4QC.js +0 -945
  290. package/dist/chunk-KP4KBDVF.js +0 -3
  291. package/dist/chunk-LRTP3DKL.js +0 -3
  292. package/dist/chunk-P6HBYNBE.js +0 -5
  293. package/dist/chunk-QHKUY4FW.js +0 -2
  294. package/dist/chunk-QHRL4LKM.js +0 -2
  295. package/dist/chunk-UXP636P5.js +0 -144
  296. package/dist/chunk-VEVBIAOJ.js +0 -16
  297. package/dist/chunk-VKRQDBW5.js +0 -9
  298. package/dist/chunk-VOQFGC2W.js +0 -67
  299. package/dist/chunk-WMXRRBII.js +0 -8
  300. package/dist/chunk-X3NLZHPA.js +0 -20
  301. package/dist/chunk-Z5QQPJ3U.js +0 -30
  302. package/dist/chunk-ZLJLE6LK.js +0 -2
  303. package/dist/command-descriptors-SJDZ7QGR.js +0 -617
  304. package/dist/direct-navigation-HTKOZEOM.js +0 -3
package/dist/cli.js CHANGED
@@ -1,5 +1,10 @@
1
1
  #!/usr/bin/env node
2
- import{b as _,c as T,d as j,e as O,j as g}from"./chunk-KP4KBDVF.js";import{Dd as P,Ea as A,Ed as f,Fd as S,Hd as k,Id as x,Jd as V,Yd as H,de as I,ee as U,fd as a,l as E,s as v,t as w,u as D,v as N,w as b}from"./chunk-JJJCO4QC.js";import{program as m}from"commander";import{realpathSync as G}from"fs";import{fileURLToPath as pe}from"url";var J=new Set(["code","outline","refs"]);function B(e){return e!==void 0&&J.has(e)}async function R(e){if(B(e)){let{directNavigationQueryCommandDescriptors:n}=await import("./direct-navigation-HTKOZEOM.js"),o=n.find(r=>r.id===e);if(!o)throw new Error(`Direct navigation command descriptor is unavailable: ${e}`);return[o]}let{commandDescriptors:t}=await import("./command-descriptors-SJDZ7QGR.js");return t}function M(e){return e.evidence?e.evidence:z.has(e.id)?"mixed":e.heuristic?"heuristic":"graph-fact"}var z=new Set(["diff-gate","health","plan-context","co-change"]);function L(e,t){return I(new Map(t.map(n=>[n.id,M(n)]))),U(new Map(t.flatMap(n=>n.agent?[[n.id,n.agent]]:[]))),t.map(n=>{let o=n.hidden?e.command(n.command,{hidden:!0}):e.command(n.command);o.description(n.description);for(let r of n.arguments??[])o.argument(r.name);for(let r of n.options??[])r.parser&&Object.hasOwn(r,"defaultValue")?o.option(r.flags,r.description,r.parser,r.defaultValue):r.parser?o.option(r.flags,r.description,r.parser):Object.hasOwn(r,"defaultValue")?o.option(r.flags,r.description,r.defaultValue):o.option(r.flags,r.description);return o.action(async(...r)=>{try{await n.handler(...r)}catch(i){K(i)}}),{descriptor:n,command:o}})}function K(e){let t=e instanceof Error?e.message:String(e);console.error(`error: ${t}`),process.exitCode=1}import{existsSync as Q,mkdirSync as X,readFileSync as Y,writeFileSync as Z}from"fs";import{homedir as ee}from"os";import{join as p}from"path";var ne=1440*60*1e3,F="update-check.json",te="https://registry.npmjs.org/scip-query/latest";async function h(e={}){let t=e.env??process.env;if(t.SCIP_QUERY_UPDATE_CHECK==="0"||t.NO_UPDATE_NOTIFIER||e.commandName&&re(e.commandName))return;let n=e.cacheDir??ae(t),o=e.now??Date.now(),r=e.currentVersion??a,i=ce(n),c=i&&o-i.checkedAt<ne?i.latestVersion:await se(n,e.fetchLatestVersion??de,o);if(!c||!ie(c,r))return;(e.writeNotice??(s=>console.error(s)))(oe(r,c))}function re(e){return e==="hook-context"||e==="hook-stop"}function oe(e,t){return[`scip-query update available: ${e} -> ${t}.`,"Agent: tell your human to update with: npm install -g scip-query@latest",""].join(`
3
- `)}function ie(e,t){let n=$(e),o=$(t);if(!n||!o)return e!==t;for(let r=0;r<n.length;r++){let i=n[r]-o[r];if(i>0)return!0;if(i<0)return!1}return!1}function ae(e){let t=e.XDG_CACHE_HOME||p(ee(),".cache");return p(t,"scip-query")}function ce(e){let t=p(e,F);if(!Q(t))return null;try{let n=JSON.parse(Y(t,"utf8"));return typeof n.checkedAt=="number"&&(typeof n.latestVersion=="string"||n.latestVersion===null)?{checkedAt:n.checkedAt,latestVersion:n.latestVersion}:null}catch{return null}}async function se(e,t,n){let o;try{o=await t()}catch{o=null}return me(e,{checkedAt:n,latestVersion:o}),o}function me(e,t){try{X(e,{recursive:!0}),Z(p(e,F),`${JSON.stringify(t,null,2)}
4
- `)}catch{}}async function de(){let e=await fetch(te,{signal:AbortSignal.timeout(1e3)});if(!e.ok)return null;let t=await e.json();return typeof t.version=="string"?t.version:null}function $(e){let t=/^v?(\d+)\.(\d+)\.(\d+)(?:[-+].*)?$/.exec(e);return t?[Number(t[1]),Number(t[2]),Number(t[3])]:null}m.name("scip-query").description("Language-agnostic code intelligence CLI powered by SCIP indexes").version(a);var le=await R(W()?process.argv[2]:void 0);L(m,le);m.hook("preAction",async(e,t)=>{let n=t.name(),o=x(n),r=T(n);if(!o&&!r){q(),await h({commandName:n});return}let i=P(),c=A(i),l=S(i,c);f(l),q(),await h({commandName:n});let{config:s,paths:u}=l,C;if(r&&s.watch?.enabled===!0)try{C=_(O({projectRoot:i,cacheDir:u.cacheDir,cliVersion:a,gitContext:c}))}catch{}if(o){let y=k(i,s,u,{gitContext:c,watcherGeneration:C});y.kind==="failed"&&process.env.SCIP_QUERY_DEBUG&&console.error(`shared-cache: ${y.reason}`)}if(!r){g(i,a);return}let d=j({commandName:n,projectRoot:i,cacheDir:u.cacheDir,cliVersion:a,config:s,gitContext:c});d.kind==="failed"&&console.error(`warning: scip-query watch service did not start: ${d.message}`),(d.kind==="failed"||d.kind==="skipped")&&g(i,a)});m.hook("postAction",()=>f(void 0));function q(){if(D(),!v()||N())return;let e=null;try{e=V(t=>E(t))}catch{}b({command:w()??`scip-query ${process.argv.slice(2).join(" ")}`,toolVersion:a,projectFingerprint:e})}W()&&await m.parseAsync();function W(){if(!process.argv[1])return!1;let e=pe(import.meta.url);try{return G(e)===G(process.argv[1])}catch{return e===process.argv[1]}}export{m as program,H as renderHeuristicNotice};
2
+ import{b as it,c as at,d as st,e as ut,j as A}from"./chunk-2465DLHK.js";import{$d as Q,E as q,Ee as rt,F as G,Fe as nt,G as W,H as F,I as J,Ua as K,Zd as X,_c as h,_d as T,be as Z,ce as Y,cf as ot,de as tt,ke as x,le as S,m as B,ne as et,x as E,xe as Ut}from"./chunk-HIB452NU.js";import{program as C}from"commander";import{realpathSync as xt}from"fs";import{fileURLToPath as Te}from"url";var Ht=new Set(["code","outline","refs"]);function kt(t){return t!==void 0&&Ht.has(t)}async function ct(t){if(kt(t)){let{directNavigationQueryCommandDescriptors:r}=await import("./direct-navigation-42YHQPOI.js"),n=r.find(o=>o.id===t);if(!n)throw new Error(`Direct navigation command descriptor is unavailable: ${t}`);return[n]}let{commandDescriptors:e}=await import("./command-descriptors-ZW5J4ZEM.js");return e}function pt(t){return t.evidence?t.evidence:Rt.has(t.id)?"mixed":t.heuristic?"heuristic":"graph-fact"}var Rt=new Set(["diff-gate","health","plan-context","co-change"]);import{createHash as ft,randomUUID as $t}from"crypto";import{chmodSync as Mt,closeSync as _,fstatSync as dt,lstatSync as jt,mkdirSync as zt,openSync as lt,readSync as Vt,readdirSync as Lt,renameSync as ht,rmSync as w,statSync as Bt,writeFileSync as qt,writeSync as Gt}from"fs";import{tmpdir as Wt}from"os";import{join as M}from"path";import{StringDecoder as gt}from"string_decoder";var Ft="scip-query-output-page",Jt=1,O=12e3,D=256,U=1e5,mt=4096,H=Number.MAX_SAFE_INTEGER,yt=3600*1e3,wt=1,f=M(Wt(),`scip-query-output-pages-${typeof process.getuid=="function"?process.getuid():"user"}`),v=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,Kt={writeStdout:t=>{process.stdout.write(t)},writeStderr:t=>{process.stderr.write(t)}};async function Ct(t,e,r=Kt){let n=t.pageSize??O;if(Et(n),t.cursor!==void 0&&t.cursor.length>mt)throw new Error(`Output cursor exceeds the ${mt}-character limit. Run the command again without --output-cursor.`);if(t.json&&t.pageSize===void 0&&t.cursor===void 0){await Xt(t,e,r);return}let o=bt(t.argv),i=ce(t.command,t.cwd,o),a=t.cursor===void 0?void 0:se(t.cursor,i),u=a?.offset??0,c=a?.snapshotId,s;if(a)try{s=Yt(a,n,t.maxOutputCharacters??H)}catch(l){let y=l instanceof Error?l.message:String(l);throw new Error(`${y} Restart with: ${$(o,n)}`,{cause:l})}else{let l=new b(u,n,t.maxOutputCharacters??H),y=new R(i),_t=Qt(l,Dt=>y.write(Dt)),L=!1;try{await e(),L=!0}finally{_t(),L||y.abort()}s=l.finish(),s.totalCharacters>n?c=y.complete({outputHash:s.outputHash,totalCharacters:s.totalCharacters}):y.abort()}if(u>s.totalCharacters)throw new Error("Output cursor points past the current result. Run the command again without --output-cursor.");if(a&&a.outputHash!==s.outputHash)throw new Error(`Command output changed after this cursor was issued. Restart with: ${$(o,n)}`);let d=u+s.content.length,p=d>=s.totalCharacters,m=p?void 0:ie({filteredArgv:o,invocationHash:i,nextOffset:d,outputHash:s.outputHash,pageSize:n,snapshotId:ne(c)});if(u===0&&p&&t.pageSize===void 0&&t.cursor===void 0){r.writeStdout(s.content);return}let V={kind:Ft,schemaVersion:Jt,producer:{name:"scip-query",version:t.producerVersion},command:t.command,contentType:t.json?"application/json":"text/plain",agentInstruction:m?"INCOMPLETE EVIDENCE: do not draw conclusions or report completion from this partial page. Run page.continuation.command exactly, then repeat until page.complete is true.":"OUTPUT COMPLETE: all rendered characters have been retrieved. Evaluate the command result's own coverage separately.",page:{offset:u,returnedCharacters:s.content.length,totalCharacters:s.totalCharacters,omittedCharacters:s.totalCharacters-s.content.length,remainingCharacters:s.totalCharacters-d,complete:p,outputHash:s.outputHash,...m?{continuation:m}:{}},content:s.content};if(t.json||t.pageSize!==void 0||t.cursor!==void 0){r.writeStdout(`${JSON.stringify(V,null,t.json?0:2)}
3
+ `),p&&c&&P(c);return}r.writeStdout(he(V)),p&&c&&P(c)}function vt(t){if(!/^\d+$/u.test(t))throw new Error(`Output page size must be an integer from ${D} through ${U}.`);let e=Number(t);return Et(e),e}function Et(t){if(!Number.isSafeInteger(t)||t<D||t>U)throw new Error(`Output page size must be an integer from ${D} through ${U}.`)}async function Xt(t,e,r){let n=new k(O,t.maxOutputCharacters??H),o=process.stdout.write,i=!1,a=`${S(`scip-query: JSON output exceeds ${O} characters and may be truncated by the client. Do not use possibly partial client output as evidence. Read every page with: ${$(bt(t.argv),O)}`)}
4
+ `;process.stdout.write=((u,c,s)=>{let d=n.push(u,c);return d!==void 0&&(i||(i=!0,r.writeStderr(a)),o.call(process.stdout,d)),St(c,s),!0});try{await e();let u=n.finish();u.crossedPageBoundary&&!i&&(i=!0,r.writeStderr(a)),u.bytes.length>0&&o.call(process.stdout,u.bytes),i&&r.writeStderr(a)}finally{process.stdout.write=o}}function Qt(t,e){let r=process.stdout.write;return process.stdout.write=((n,o,i)=>{let a=Zt(n,o);return e?.(a),t.write(a,void 0),St(o,i),!0}),()=>{process.stdout.write=r}}function Zt(t,e){return typeof t=="string"?Buffer.from(t,typeof e=="string"?e:"utf8"):Buffer.from(t)}function St(t,e){let r=typeof t=="function"?t:e;typeof r=="function"&&r()}var k=class{constructor(e,r){this.limit=e;this.maxOutputCharacters=r}limit;maxOutputCharacters;decoder=new gt("utf8");chunks=[];overflowed=!1;totalCharacters=0;push(e,r){let n=typeof e=="string"?Buffer.from(e,typeof r=="string"?r:"utf8"):Buffer.from(e);if(this.addCharacters(this.decoder.write(n)),this.overflowed)return n;if(this.chunks.push(n),this.totalCharacters<=this.limit)return;this.overflowed=!0;let o=Buffer.concat(this.chunks);return this.chunks.length=0,o}finish(){this.addCharacters(this.decoder.end());let e=this.totalCharacters>this.limit,r=Buffer.concat(this.chunks);return this.chunks.length=0,{bytes:r,crossedPageBoundary:e}}addCharacters(e){if(this.totalCharacters+=e.length,!Number.isSafeInteger(this.totalCharacters)||this.totalCharacters>this.maxOutputCharacters)throw new Error(`Command output exceeds the ${this.maxOutputCharacters}-character safety limit. Narrow the query before retrying.`)}},b=class{constructor(e,r,n){this.offset=e;this.pageSize=r;this.maxOutputCharacters=n}offset;pageSize;maxOutputCharacters;decoder=new gt("utf8");hash=ft("sha256");content="";totalCharacters=0;finished=!1;write(e,r){if(this.finished)throw new Error("Output capture is already complete.");let n=typeof e=="string"?Buffer.from(e,typeof r=="string"?r:"utf8"):Buffer.from(e);this.hash.update(n),this.appendDecoded(this.decoder.write(n))}finish(){if(this.finished)throw new Error("Output capture is already complete.");return this.appendDecoded(this.decoder.end()),this.finished=!0,{content:this.content,totalCharacters:this.totalCharacters,outputHash:this.hash.digest("hex")}}appendDecoded(e){if(e.length===0)return;let r=this.totalCharacters+e.length;if(!Number.isSafeInteger(r)||r>this.maxOutputCharacters)throw new Error(`Command output exceeds the ${this.maxOutputCharacters}-character safety limit. Narrow the query before retrying.`);let n=this.offset+this.pageSize,o=Math.max(this.offset,this.totalCharacters),i=Math.min(n,r);if(o<i){let a=o-this.totalCharacters,u=i-this.totalCharacters;oe(e.charCodeAt(u-1))&&(u-=1),this.content+=e.slice(a,u)}this.totalCharacters=r}},R=class{constructor(e){this.invocationHash=e;Ot(),re(),this.snapshotId=$t(),this.temporaryPath=g(this.snapshotId,"tmp"),this.descriptor=lt(this.temporaryPath,"wx",384)}invocationHash;snapshotId;temporaryPath;descriptor;byteLength=0;write(e){if(this.descriptor===null)throw new Error("Output snapshot writer is closed.");let r=0;for(;r<e.length;){let n=Gt(this.descriptor,e,r,e.length-r);if(n<=0)throw new Error("Output snapshot write made no progress.");r+=n}if(this.byteLength+=e.length,!Number.isSafeInteger(this.byteLength))throw new Error("Output snapshot exceeds the safe byte counter.")}complete(e){if(this.descriptor===null)throw new Error("Output snapshot writer is closed.");_(this.descriptor),this.descriptor=null;let r=g(this.snapshotId,"output"),n=g(this.snapshotId,"json"),o=g(this.snapshotId,"meta.tmp");try{ht(this.temporaryPath,r);let i={version:wt,snapshotId:this.snapshotId,invocationHash:this.invocationHash,outputHash:e.outputHash,totalCharacters:e.totalCharacters,byteLength:this.byteLength,createdAtMs:Date.now()};return qt(o,JSON.stringify(i),{flag:"wx",mode:384}),ht(o,n),this.snapshotId}catch(i){throw w(r,{force:!0}),w(n,{force:!0}),w(o,{force:!0}),i}}abort(){this.descriptor!==null&&(_(this.descriptor),this.descriptor=null),w(this.temporaryPath,{force:!0})}};function Yt(t,e,r){Ot();let n=te(t.snapshotId);if(n.invocationHash!==t.invocationHash||n.outputHash!==t.outputHash||n.snapshotId!==t.snapshotId)throw new Error("Output snapshot identity does not match this cursor.");if(Date.now()-n.createdAtMs>yt)throw P(t.snapshotId),new Error("Output snapshot expired before all pages were read.");let o=g(t.snapshotId,"output"),i=lt(o,"r");try{let a=dt(i);if(!a.isFile()||a.size!==n.byteLength)throw new Error("Output snapshot size or type changed.");let u=new b(t.offset,e,r),c=Buffer.allocUnsafe(1024*1024),s=0;for(;s<a.size;){let m=Vt(i,c,0,Math.min(c.length,a.size-s),s);if(m===0)break;u.write(c.subarray(0,m),void 0),s+=m}let d=dt(i);if(d.dev!==a.dev||d.ino!==a.ino||d.size!==a.size||s!==a.size)throw new Error("Output snapshot changed while it was being read.");let p=u.finish();if(p.outputHash!==n.outputHash||p.totalCharacters!==n.totalCharacters)throw new Error("Output snapshot content no longer matches its metadata.");return p}catch(a){throw P(t.snapshotId),a}finally{_(i)}}function te(t){if(!v.test(t))throw new Error("Output snapshot identifier is invalid.");let e;try{e=JSON.parse(E(g(t,"json"),"output snapshot metadata"))}catch(r){throw new Error("Output snapshot is unavailable.",{cause:r})}if(!ee(e))throw new Error("Output snapshot metadata is invalid.");return e}function ee(t){if(!t||typeof t!="object")return!1;let e=t;return e.version===wt&&typeof e.snapshotId=="string"&&v.test(e.snapshotId)&&I(e.invocationHash)&&I(e.outputHash)&&Number.isSafeInteger(e.totalCharacters)&&(e.totalCharacters??-1)>=0&&Number.isSafeInteger(e.byteLength)&&(e.byteLength??-1)>=0&&Number.isSafeInteger(e.createdAtMs)&&(e.createdAtMs??-1)>=0}function Ot(){zt(f,{recursive:!0,mode:448});let t=jt(f);if(!t.isDirectory()||t.isSymbolicLink())throw new Error(`Output snapshot root is not a private directory: ${f}`);if(typeof process.getuid=="function"&&t.uid!==process.getuid())throw new Error(`Output snapshot root is not owned by the current user: ${f}`);process.platform!=="win32"&&Mt(f,448)}function re(){let t=Date.now()-yt;for(let e of Lt(f,{withFileTypes:!0})){if(!e.isFile()||!/^[0-9a-f-]{36}\.(?:json|output|tmp|meta\.tmp)$/u.test(e.name))continue;let r=M(f,e.name);try{Bt(r).mtimeMs<t&&w(r,{force:!0})}catch{}}}function P(t){if(v.test(t))for(let e of["json","output","tmp","meta.tmp"])w(g(t,e),{force:!0})}function g(t,e){if(!v.test(t))throw new Error("Output snapshot identifier is invalid.");return M(f,`${t}.${e}`)}function ne(t){if(!t)throw new Error("Incomplete output did not create a resumable snapshot.");return t}function oe(t){return t>=55296&&t<=56319}function ie(t){let e=ae({invocationHash:t.invocationHash,offset:t.nextOffset,outputHash:t.outputHash,snapshotId:t.snapshotId});return{cursor:e,command:pe(t.filteredArgv,t.pageSize,e)}}function ae(t){return ot({version:1,...t})}function se(t,e){let r;try{r=JSON.parse(Buffer.from(t,"base64url").toString("utf8"))}catch{throw new Error("Invalid output cursor. Run the command again without --output-cursor.")}if(!ue(r))throw new Error("Invalid output cursor. Run the command again without --output-cursor.");if(r.invocationHash!==e)throw new Error("This output cursor belongs to a different command, working directory, or argument set. Run again without --output-cursor.");return r}function ue(t){if(!t||typeof t!="object")return!1;let e=t;return e.version===1&&I(e.invocationHash)&&Number.isSafeInteger(e.offset)&&(e.offset??-1)>=0&&I(e.outputHash)&&typeof e.snapshotId=="string"&&v.test(e.snapshotId)}function I(t){return typeof t=="string"&&/^[a-f0-9]{64}$/u.test(t)}function ce(t,e,r){return ft("sha256").update(JSON.stringify({command:t,cwd:e,argv:r})).digest("hex")}function bt(t){let e=[];for(let r=0;r<t.length;r+=1){let n=t[r];if(n==="--output-page-size"||n==="--output-cursor"){r+=1;continue}n.startsWith("--output-page-size=")||n.startsWith("--output-cursor=")||e.push(n)}return e}function $(t,e){return Pt(["scip-query",...t,"--output-page-size",String(e)])}function pe(t,e,r){return Pt(["scip-query",...t,"--output-page-size",String(e),"--output-cursor",r])}function Pt(t){return t.map(de).join(" ")}function de(t){return/^[A-Za-z0-9_@%+=:,./-]+$/u.test(t)?t:`'${t.replaceAll("'",`'"'"'`)}'`}function he(t){let e=t.page.continuation,r=[`[scip-query output page: characters ${t.page.offset}-${t.page.offset+t.page.returnedCharacters-1} of ${t.page.totalCharacters}]`,...e?["INCOMPLETE EVIDENCE \u2014 do not draw conclusions or report completion from this partial page.",`Continue exactly: ${e.command}`]:[],""],n=e?["",`[${t.page.remainingCharacters} output characters remain]`,"INCOMPLETE EVIDENCE \u2014 retrieve the remaining pages before using this output as evidence.",`Continue exactly: ${e.command}`]:["","[scip-query output complete]"];return`${r.join(`
5
+ `)}${t.content}${n.join(`
6
+ `)}
7
+ `}function It(t,e){return rt(new Map(e.map(r=>[r.id,pt(r)]))),nt(new Map(e.flatMap(r=>r.agent?[[r.id,r.agent]]:[]))),e.map(r=>{let n=r.hidden?t.command(r.command,{hidden:!0}):t.command(r.command);n.description(r.description);for(let o of r.arguments??[])n.argument(o.name);for(let o of r.options??[])o.parser&&Object.hasOwn(o,"defaultValue")?n.option(o.flags,o.description,o.parser,o.defaultValue):o.parser?n.option(o.flags,o.description,o.parser):Object.hasOwn(o,"defaultValue")?n.option(o.flags,o.description,o.defaultValue):n.option(o.flags,o.description);return n.action(async(...o)=>{try{let i=n.optsWithGlobals();await Ct({command:r.id,producerVersion:h,argv:process.argv.slice(2),cwd:process.cwd(),json:i.json===!0,...typeof i.outputPageSize=="number"?{pageSize:i.outputPageSize}:{},...typeof i.outputCursor=="string"?{cursor:i.outputCursor}:{}},()=>r.handler(...o))}catch(i){me(i)}}),{descriptor:r,command:n}})}function me(t){let e=t instanceof Error?t.message:String(t);console.error(`error: ${S(e)}`),process.exitCode=1}import{existsSync as fe,mkdirSync as le,writeFileSync as ge}from"fs";import{homedir as ye}from"os";import{join as N}from"path";var we=1440*60*1e3,Tt="update-check.json",Ce="https://registry.npmjs.org/scip-query/latest";async function j(t={}){let e=t.env??process.env;if(e.SCIP_QUERY_UPDATE_CHECK==="0"||e.NO_UPDATE_NOTIFIER||t.commandName&&ve(t.commandName))return;let r=t.cacheDir??Oe(e),n=t.now??Date.now(),o=t.currentVersion??h,i=be(r),a=i&&n-i.checkedAt<we?i.latestVersion:await Pe(r,t.fetchLatestVersion??Ne,n);if(!a||!Se(a,o))return;(t.writeNotice??(c=>console.error(c)))(Ee(o,a))}function ve(t){return t==="hook-context"||t==="hook-stop"}function Ee(t,e){return[`scip-query update available: ${t} -> ${e}.`,"Agent: tell your human to update with: npm install -g scip-query@latest",""].join(`
8
+ `)}function Se(t,e){let r=Nt(t),n=Nt(e);if(!r||!n)return t!==e;for(let o=0;o<r.length;o++){let i=r[o]-n[o];if(i>0)return!0;if(i<0)return!1}return!1}function Oe(t){let e=t.XDG_CACHE_HOME||N(ye(),".cache");return N(e,"scip-query")}function be(t){let e=N(t,Tt);if(!fe(e))return null;try{let r=JSON.parse(E(e,"update notice cache"));return typeof r.checkedAt=="number"&&(typeof r.latestVersion=="string"||r.latestVersion===null)?{checkedAt:r.checkedAt,latestVersion:r.latestVersion}:null}catch{return null}}async function Pe(t,e,r){let n;try{n=await e()}catch{n=null}return Ie(t,{checkedAt:r,latestVersion:n}),n}function Ie(t,e){try{le(t,{recursive:!0}),ge(N(t,Tt),`${JSON.stringify(e,null,2)}
9
+ `)}catch{}}async function Ne(){let t=await fetch(Ce,{signal:AbortSignal.timeout(1e3)});if(!t.ok)return null;let e=await t.json();return typeof e.version=="string"?e.version:null}function Nt(t){let e=/^v?(\d+)\.(\d+)\.(\d+)(?:[-+].*)?$/.exec(t);return e?[Number(e[1]),Number(e[2]),Number(e[3])]:null}var z=Ae();z&&(et(),C.configureOutput({writeOut:t=>process.stdout.write(x(t)),writeErr:t=>process.stderr.write(x(t))}));C.name("scip-query").description("Language-agnostic code intelligence CLI powered by SCIP indexes").version(h).option("--output-page-size <characters>","Return bounded output pages with an exact continuation command",vt).option("--output-cursor <cursor>","Continue a bounded output page");var xe=await ct(z?process.argv[2]:void 0);It(C,xe);C.hook("preAction",async(t,e)=>{let r=e.name(),n=Y(r),o=at(r);if(!n&&!o){At(),await j({commandName:r});return}let i=X(),a=K(i),u=Q(i,a);T(u),At(),await j({commandName:r});let{config:c,paths:s}=u,d;if(o&&c.watch?.enabled===!0)try{d=it(ut({projectRoot:i,cacheDir:s.cacheDir,cliVersion:h,gitContext:a}))}catch{}if(n){let m=Z(i,c,s,{gitContext:a,watcherGeneration:d});m.kind==="failed"&&process.env.SCIP_QUERY_DEBUG&&console.error(`shared-cache: ${m.reason}`)}if(!o){A(i,h);return}let p=st({commandName:r,projectRoot:i,cacheDir:s.cacheDir,cliVersion:h,config:c,gitContext:a});p.kind==="failed"&&console.error(`warning: scip-query watch service did not start: ${p.message}`),(p.kind==="failed"||p.kind==="skipped")&&A(i,h)});C.hook("postAction",()=>T(void 0));function At(){if(W(),!q()||F())return;let t=null;try{t=tt(e=>B(e))}catch{}J({command:G()??`scip-query ${process.argv.slice(2).join(" ")}`,toolVersion:h,projectFingerprint:t})}z&&await C.parseAsync();function Ae(){if(!process.argv[1])return!1;let t=Te(import.meta.url);try{return xt(t)===xt(process.argv[1])}catch{return t===process.argv[1]}}export{C as program,Ut as renderHeuristicNotice};
5
10
  //# sourceMappingURL=cli.js.map