scip-query 0.19.8 → 0.19.10

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 (365) hide show
  1. package/CHANGELOG.md +79 -0
  2. package/README.md +132 -33
  3. package/dist/augment-vue-worker.js +1 -1
  4. package/dist/chunk-26QA6FAI.js +8 -0
  5. package/dist/{chunk-KJ2IIBZN.js → chunk-2HPVVXM5.js} +2 -2
  6. package/dist/chunk-2KAZEZ6M.js +2 -0
  7. package/dist/chunk-32LVLCLN.js +40 -0
  8. package/dist/{chunk-24GTWJ3N.js → chunk-3CLX5EOX.js} +2 -2
  9. package/dist/{chunk-QGGLL3UH.js → chunk-3G66UZBH.js} +2 -2
  10. package/dist/{chunk-AA4UWRNL.js → chunk-3ORVDL3H.js} +2 -2
  11. package/dist/chunk-4MAK2HOY.js +6 -0
  12. package/dist/{chunk-QIQ63BHW.js → chunk-4TURLRL5.js} +2 -2
  13. package/dist/chunk-4UQVNCQE.js +2 -0
  14. package/dist/chunk-55Q3WLZX.js +2 -0
  15. package/dist/{chunk-CTF2GDEX.js → chunk-5E4WNAVD.js} +2 -2
  16. package/dist/{chunk-ZCEJ63SP.js → chunk-5I5G2QOX.js} +2 -2
  17. package/dist/chunk-6LDJQXAH.js +2 -0
  18. package/dist/{chunk-3EDFLQ6A.js → chunk-6O5TICIZ.js} +2 -2
  19. package/dist/{chunk-ACAM6O5R.js → chunk-6SHPK5ZE.js} +2 -2
  20. package/dist/chunk-7BAVHKMJ.js +49 -0
  21. package/dist/chunk-7O5IKBTZ.js +16 -0
  22. package/dist/{chunk-WJL2L6MV.js → chunk-7PIO7NKH.js} +2 -2
  23. package/dist/chunk-7S5E7KWT.js +2 -0
  24. package/dist/{chunk-YLFORA5G.js → chunk-7SQQWSY3.js} +2 -2
  25. package/dist/chunk-7WPLAODU.js +5 -0
  26. package/dist/chunk-A73XVBCR.js +20 -0
  27. package/dist/chunk-AFHORGLH.js +42 -0
  28. package/dist/chunk-AIE7TFJW.js +9 -0
  29. package/dist/{chunk-TWMJ3Y3G.js → chunk-AZJQQKDD.js} +2 -2
  30. package/dist/{chunk-BDOIKGDI.js → chunk-B2PX5I6M.js} +2 -2
  31. package/dist/{chunk-DQBCO2UY.js → chunk-B7PBSLZN.js} +2 -2
  32. package/dist/chunk-BBW6JFHN.js +2 -0
  33. package/dist/{chunk-YTVWB7YJ.js → chunk-BDCC2NPY.js} +2 -2
  34. package/dist/{chunk-O23I56NA.js → chunk-BNXCIFVY.js} +2 -2
  35. package/dist/{chunk-MLFZP76A.js → chunk-BPAPWKP6.js} +2 -2
  36. package/dist/chunk-BS2NMXQZ.js +4 -0
  37. package/dist/chunk-C3KV2II6.js +2 -0
  38. package/dist/chunk-C43RDDP4.js +20 -0
  39. package/dist/{chunk-K2WO7XY7.js → chunk-CJST5ETY.js} +2 -2
  40. package/dist/chunk-DAFAHMNB.js +42 -0
  41. package/dist/{chunk-KKME5ZAI.js → chunk-DQGFVPUV.js} +2 -2
  42. package/dist/chunk-DQLPXMH6.js +8 -0
  43. package/dist/chunk-EKZTZXHZ.js +117 -0
  44. package/dist/{chunk-FJ5UDTQF.js → chunk-EN3O7VJA.js} +2 -2
  45. package/dist/{chunk-HZYDQPNY.js → chunk-EW2NTSFA.js} +2 -2
  46. package/dist/chunk-F3Z4OUDS.js +8 -0
  47. package/dist/chunk-FJH2NW7J.js +66 -0
  48. package/dist/{chunk-MSBDMFER.js → chunk-FKSELJQF.js} +2 -2
  49. package/dist/chunk-FTFP6O3L.js +11 -0
  50. package/dist/chunk-FYLK2DEJ.js +2 -0
  51. package/dist/{chunk-WUW7YUAH.js → chunk-GH74ASD6.js} +2 -2
  52. package/dist/{chunk-464PLI5O.js → chunk-GMXWZP2B.js} +2 -2
  53. package/dist/chunk-GOUBFH5O.js +3 -0
  54. package/dist/{chunk-FIJCV235.js → chunk-HLF2TX6R.js} +2 -2
  55. package/dist/{chunk-WWKWUPSU.js → chunk-HX4GQPZP.js} +2 -2
  56. package/dist/chunk-HX7M4BDI.js +30 -0
  57. package/dist/chunk-HZ72SESS.js +128 -0
  58. package/dist/{chunk-SERUIGV5.js → chunk-IB2N4FIY.js} +2 -2
  59. package/dist/chunk-ILMHV3KM.js +2 -0
  60. package/dist/chunk-IZYYAFN5.js +2 -0
  61. package/dist/{chunk-GNC4JVAN.js → chunk-JAYYFEQY.js} +2 -2
  62. package/dist/{chunk-QJIVBYEK.js → chunk-JDOEX4E6.js} +2 -2
  63. package/dist/chunk-JFGGXWQF.js +947 -0
  64. package/dist/chunk-JN4NMBEX.js +8 -0
  65. package/dist/{chunk-6M7RONVB.js → chunk-JVYA47YU.js} +2 -2
  66. package/dist/{chunk-7KYNAMMH.js → chunk-JW56N3KI.js} +2 -2
  67. package/dist/{chunk-OUBAF226.js → chunk-JZ2OXNWB.js} +2 -2
  68. package/dist/chunk-KMKTIO2G.js +8 -0
  69. package/dist/chunk-L5GJNV2T.js +8 -0
  70. package/dist/{chunk-MNSTUIDD.js → chunk-L7AW2QB5.js} +2 -2
  71. package/dist/chunk-L7JDSCDF.js +4 -0
  72. package/dist/chunk-LU47HG23.js +14 -0
  73. package/dist/chunk-LVY7NPF7.js +2 -0
  74. package/dist/chunk-LY4WC4AD.js +74 -0
  75. package/dist/{chunk-7FT5Y65S.js → chunk-MKCDWWGV.js} +2 -2
  76. package/dist/chunk-MNE7YG56.js +2 -0
  77. package/dist/{chunk-7QHY3H7P.js → chunk-MRXBEXSY.js} +2 -2
  78. package/dist/chunk-MV7OWDUX.js +2 -0
  79. package/dist/{chunk-ZJ5CBXK3.js → chunk-N5W4YZMK.js} +2 -2
  80. package/dist/chunk-NGEXCJJW.js +11 -0
  81. package/dist/{chunk-7SWJEWJF.js → chunk-NIW6JDC5.js} +2 -2
  82. package/dist/{chunk-O3O4XXO6.js → chunk-O64IZ6UX.js} +2 -2
  83. package/dist/{chunk-3ZSJ3PWF.js → chunk-PBUQFCNB.js} +2 -2
  84. package/dist/{chunk-7RAG65VK.js → chunk-POAVPHH7.js} +2 -2
  85. package/dist/{chunk-A3QXWFBK.js → chunk-PQCI4SQX.js} +2 -2
  86. package/dist/{chunk-4BV4QAZJ.js → chunk-PXY7F6Y4.js} +2 -2
  87. package/dist/chunk-RDO52JGY.js +2 -0
  88. package/dist/chunk-RJT3TUUZ.js +2 -0
  89. package/dist/{chunk-S4S2WOIX.js → chunk-RUJURYSV.js} +2 -2
  90. package/dist/{chunk-JAY7YWS3.js → chunk-RVLDN63O.js} +2 -2
  91. package/dist/chunk-RXOXSKY3.js +2 -0
  92. package/dist/chunk-S7OYBOCK.js +2 -0
  93. package/dist/chunk-SMNXQT5Z.js +3 -0
  94. package/dist/{chunk-NE3TZUCI.js → chunk-SRAFT254.js} +2 -2
  95. package/dist/{chunk-ELLMY7XJ.js → chunk-SXP2MBJH.js} +2 -2
  96. package/dist/chunk-T7YQSHPQ.js +3 -0
  97. package/dist/{chunk-WY45BHKQ.js → chunk-TFRAYKN6.js} +2 -2
  98. package/dist/{chunk-2SNGN6U4.js → chunk-UJCOIXDY.js} +2 -2
  99. package/dist/{chunk-MZZBAITE.js → chunk-UJPRPGCO.js} +2 -2
  100. package/dist/chunk-W4ETQAXM.js +2 -0
  101. package/dist/chunk-WCCFZ7V7.js +113 -0
  102. package/dist/chunk-WUPW3UN3.js +3 -0
  103. package/dist/{chunk-7LSVMFX7.js → chunk-WXZLAAWK.js} +2 -2
  104. package/dist/{chunk-5ML2BNRH.js → chunk-X54AGLVX.js} +2 -2
  105. package/dist/chunk-XKWKXZKW.js +20 -0
  106. package/dist/{chunk-5YLUDDAF.js → chunk-XSRF6Q77.js} +2 -2
  107. package/dist/chunk-Y2MVPNKY.js +5 -0
  108. package/dist/{chunk-JHF3E4YM.js → chunk-YKUU5AIC.js} +2 -2
  109. package/dist/{chunk-E3HYEQO7.js → chunk-YLCJLTPL.js} +2 -2
  110. package/dist/{chunk-7VCOXZH3.js → chunk-YTQVETEO.js} +2 -2
  111. package/dist/chunk-Z4N3MZYA.js +38 -0
  112. package/dist/chunk-ZHXX42OH.js +18 -0
  113. package/dist/chunk-ZJOOT3BG.js +2 -0
  114. package/dist/{chunk-P3UO3EH3.js → chunk-ZK26BAQL.js} +2 -2
  115. package/dist/{chunk-33KUO7CG.js → chunk-ZTETIQ35.js} +2 -2
  116. package/dist/cli.js +3 -8
  117. package/dist/command-descriptors-4A4HWV4F.js +642 -0
  118. package/dist/{config-types-B6MEoRNy.d.ts → config-types-jVM3D7MA.d.ts} +68 -2
  119. package/dist/{db-DYLKr9Wn.d.ts → db-B5PM5yNk.d.ts} +20 -2
  120. package/dist/{diff-gate-types-C9BoYwYD.d.ts → diff-gate-types-B0QYpDv1.d.ts} +2 -1
  121. package/dist/direct-navigation-6YHV6IB5.js +3 -0
  122. package/dist/{health-DgxIDXJC.d.ts → health-Do5TKSJI.d.ts} +1 -1
  123. package/dist/index.d.ts +3 -3
  124. package/dist/index.js +1 -1
  125. package/dist/queries/affected.d.ts +2 -2
  126. package/dist/queries/affected.js +1 -1
  127. package/dist/queries/architecture.d.ts +2 -2
  128. package/dist/queries/architecture.js +1 -1
  129. package/dist/queries/bottlenecks.d.ts +2 -2
  130. package/dist/queries/bottlenecks.js +1 -1
  131. package/dist/queries/by-kind.d.ts +2 -2
  132. package/dist/queries/by-kind.js +1 -1
  133. package/dist/queries/call-graph.d.ts +2 -2
  134. package/dist/queries/call-graph.js +1 -1
  135. package/dist/queries/change-surface.d.ts +22 -3
  136. package/dist/queries/change-surface.js +1 -1
  137. package/dist/queries/cleanup-plan.d.ts +2 -2
  138. package/dist/queries/cleanup-plan.js +1 -1
  139. package/dist/queries/co-change.d.ts +2 -2
  140. package/dist/queries/co-change.js +1 -1
  141. package/dist/queries/code.d.ts +2 -2
  142. package/dist/queries/code.js +1 -1
  143. package/dist/queries/complexity-hotspots.d.ts +3 -3
  144. package/dist/queries/complexity-hotspots.js +1 -1
  145. package/dist/queries/complexity.d.ts +3 -3
  146. package/dist/queries/complexity.js +1 -1
  147. package/dist/queries/convergence.d.ts +2 -2
  148. package/dist/queries/convergence.js +1 -1
  149. package/dist/queries/coupling.d.ts +2 -2
  150. package/dist/queries/coupling.js +1 -1
  151. package/dist/queries/cycles.d.ts +2 -2
  152. package/dist/queries/cycles.js +1 -1
  153. package/dist/queries/dataflow.d.ts +2 -2
  154. package/dist/queries/dataflow.js +1 -1
  155. package/dist/queries/dead.d.ts +2 -2
  156. package/dist/queries/dead.js +1 -1
  157. package/dist/queries/decorative-checkers.d.ts +2 -2
  158. package/dist/queries/decorative-checkers.js +1 -1
  159. package/dist/queries/deep-chains.d.ts +2 -2
  160. package/dist/queries/deep-chains.js +1 -1
  161. package/dist/queries/deps.d.ts +2 -2
  162. package/dist/queries/deps.js +1 -1
  163. package/dist/queries/diff-gate.d.ts +40 -7
  164. package/dist/queries/diff-gate.js +1 -1
  165. package/dist/queries/diff-impact.d.ts +84 -6
  166. package/dist/queries/diff-impact.js +1 -1
  167. package/dist/queries/doc-drift.d.ts +3 -3
  168. package/dist/queries/doc-drift.js +1 -1
  169. package/dist/queries/drift.d.ts +2 -2
  170. package/dist/queries/drift.js +1 -1
  171. package/dist/queries/duplicate-bodies.d.ts +3 -3
  172. package/dist/queries/duplicate-bodies.js +1 -1
  173. package/dist/queries/extract-candidates.d.ts +2 -2
  174. package/dist/queries/extract-candidates.js +1 -1
  175. package/dist/queries/fan.d.ts +2 -2
  176. package/dist/queries/fan.js +1 -1
  177. package/dist/queries/files.d.ts +12 -3
  178. package/dist/queries/files.js +1 -1
  179. package/dist/queries/health.d.ts +3 -3
  180. package/dist/queries/health.js +1 -1
  181. package/dist/queries/hierarchy.d.ts +2 -2
  182. package/dist/queries/hierarchy.js +1 -1
  183. package/dist/queries/hotspots.d.ts +2 -2
  184. package/dist/queries/hotspots.js +1 -1
  185. package/dist/queries/imports.d.ts +2 -2
  186. package/dist/queries/imports.js +1 -1
  187. package/dist/queries/incomplete-migration.d.ts +8 -6
  188. package/dist/queries/incomplete-migration.js +1 -1
  189. package/dist/queries/index.d.ts +141 -10
  190. package/dist/queries/index.js +1 -1
  191. package/dist/queries/isolated.d.ts +2 -2
  192. package/dist/queries/isolated.js +1 -1
  193. package/dist/queries/locality-candidates.d.ts +2 -2
  194. package/dist/queries/locality-candidates.js +1 -1
  195. package/dist/queries/members.d.ts +2 -2
  196. package/dist/queries/members.js +1 -1
  197. package/dist/queries/methods.d.ts +34 -3
  198. package/dist/queries/methods.js +1 -1
  199. package/dist/queries/not-implemented.d.ts +2 -2
  200. package/dist/queries/not-implemented.js +1 -1
  201. package/dist/queries/outline.d.ts +2 -2
  202. package/dist/queries/outline.js +1 -1
  203. package/dist/queries/passthrough-candidates.d.ts +3 -3
  204. package/dist/queries/passthrough-candidates.js +1 -1
  205. package/dist/queries/plan-context.d.ts +3 -3
  206. package/dist/queries/plan-context.js +1 -1
  207. package/dist/queries/react-component-duplicates.d.ts +2 -2
  208. package/dist/queries/react-component-duplicates.js +1 -1
  209. package/dist/queries/react-hook-candidates.d.ts +2 -2
  210. package/dist/queries/react-hook-candidates.js +1 -1
  211. package/dist/queries/react-large-component-pressure.d.ts +2 -2
  212. package/dist/queries/react-large-component-pressure.js +1 -1
  213. package/dist/queries/recent-duplicates.d.ts +2 -2
  214. package/dist/queries/recent-duplicates.js +1 -1
  215. package/dist/queries/redundant-reexports.d.ts +2 -2
  216. package/dist/queries/redundant-reexports.js +1 -1
  217. package/dist/queries/refs.d.ts +2 -2
  218. package/dist/queries/refs.js +1 -1
  219. package/dist/queries/self-audit.d.ts +2 -2
  220. package/dist/queries/self-audit.js +1 -1
  221. package/dist/queries/similar-chains.d.ts +2 -2
  222. package/dist/queries/similar-chains.js +1 -1
  223. package/dist/queries/similar-files.d.ts +2 -2
  224. package/dist/queries/similar-files.js +1 -1
  225. package/dist/queries/similar-signatures.d.ts +2 -2
  226. package/dist/queries/similar-signatures.js +1 -1
  227. package/dist/queries/similar.d.ts +2 -2
  228. package/dist/queries/similar.js +1 -1
  229. package/dist/queries/slice.d.ts +2 -2
  230. package/dist/queries/slice.js +1 -1
  231. package/dist/queries/stale-abstractions.d.ts +2 -2
  232. package/dist/queries/stale-abstractions.js +1 -1
  233. package/dist/queries/stats.d.ts +2 -2
  234. package/dist/queries/surface.d.ts +2 -2
  235. package/dist/queries/surface.js +1 -1
  236. package/dist/queries/symbols.d.ts +2 -2
  237. package/dist/queries/symbols.js +1 -1
  238. package/dist/queries/system.d.ts +2 -2
  239. package/dist/queries/system.js +1 -1
  240. package/dist/queries/test-quality.d.ts +2 -2
  241. package/dist/queries/test-quality.js +1 -1
  242. package/dist/queries/trace.d.ts +2 -2
  243. package/dist/queries/trace.js +1 -1
  244. package/dist/queries/twin-ab.d.ts +14 -3
  245. package/dist/queries/twin-ab.js +1 -1
  246. package/dist/queries/twin-drift.d.ts +2 -2
  247. package/dist/queries/twin-drift.js +1 -1
  248. package/dist/queries/unused-imports.d.ts +2 -2
  249. package/dist/queries/unused-imports.js +1 -1
  250. package/dist/queries/unused-params.d.ts +2 -2
  251. package/dist/queries/unused-params.js +1 -1
  252. package/dist/queries/vue-component-duplicates.d.ts +2 -2
  253. package/dist/queries/vue-component-duplicates.js +1 -1
  254. package/dist/queries/vue-composable-candidates.d.ts +2 -2
  255. package/dist/queries/vue-composable-candidates.js +1 -1
  256. package/dist/queries/vue-large-view-pressure.d.ts +2 -2
  257. package/dist/queries/vue-large-view-pressure.js +1 -1
  258. package/dist/queries/wrapper-candidates.d.ts +2 -2
  259. package/dist/queries/wrapper-candidates.js +1 -1
  260. package/dist/reindex-worker.js +21 -21
  261. package/dist/reindex.d.ts +3 -3
  262. package/dist/reindex.js +33 -33
  263. package/dist/runtime.d.ts +5 -3
  264. package/dist/runtime.js +3 -3
  265. package/dist/rust-semantic-session-server.js +1 -1
  266. package/dist/rust-semantic-session-worker.js +1 -1
  267. package/dist/rust-semantic-worker.js +1 -1
  268. package/dist/{scip-cli-Cc6c00-a.d.ts → scip-cli-BnEwZRLJ.d.ts} +1 -1
  269. package/dist/{symbol-types-BgWU6lhL.d.ts → symbol-types-BIQwfoAx.d.ts} +7 -1
  270. package/dist/typescript-mailbox-worker.js +2 -0
  271. package/dist/watch-server.js +2 -42
  272. package/docs/AGENT_GUIDE.md +13 -6
  273. package/docs/CLI_JSON_OUTPUT.md +110 -22
  274. package/docs/COMMAND_REFERENCE.md +88 -88
  275. package/docs/COMMITTED_RECORD_COMPATIBILITY.md +55 -18
  276. package/docs/DURABILITY.md +88 -38
  277. package/docs/INDEX_GENERATIONS.md +65 -19
  278. package/docs/MAILBOX_LIFECYCLE.md +28 -1
  279. package/docs/REINDEX_METADATA_COMPATIBILITY.md +18 -8
  280. package/docs/SECURITY_MODEL.md +31 -14
  281. package/docs/TELEMETRY_RETENTION.md +11 -4
  282. package/docs/WATCH_REFRESH_REQUESTS.md +34 -21
  283. package/docs/WINDOWS_SIDECAR_RELEASE.md +9 -4
  284. package/docs/analyzer-inventory.md +31 -22
  285. package/docs/analyzer-validation-ledger.md +8 -0
  286. package/docs/schemas/outcome-event-record.schema.json +57 -1
  287. package/docs/schemas/project-config.schema.json +82 -1
  288. package/docs/schemas/suppression-record.schema.json +84 -3
  289. package/package.json +2 -2
  290. package/skills/_shared/SKILL.md +2 -2
  291. package/skills/_shared/references/agent-contract-catalog.md +1 -1
  292. package/skills/_shared/references/detector-precision-and-diffgate.md +1 -1
  293. package/skills/scip-audit/SKILL.md +6 -6
  294. package/skills/scip-audit/references/claims.md +1 -1
  295. package/skills/scip-audit/references/cleanup.md +19 -20
  296. package/skills/scip-audit/references/directory.md +4 -4
  297. package/skills/scip-audit/references/frontend.md +10 -10
  298. package/skills/scip-audit/references/twin-drift.md +2 -2
  299. package/skills/scip-diagnose/references/debug.md +8 -8
  300. package/skills/scip-diagnose/references/root-cause.md +3 -3
  301. package/skills/scip-diagnose/references/triage.md +10 -10
  302. package/skills/scip-explore/SKILL.md +3 -3
  303. package/skills/scip-improve/SKILL.md +10 -10
  304. package/skills/scip-improve/references/cleanup-batches.md +3 -3
  305. package/skills/scip-improve/references/directory-moves.md +3 -3
  306. package/skills/scip-improve/references/doc-reconcile.md +1 -1
  307. package/skills/scip-improve/references/frontend-extraction.md +2 -2
  308. package/skills/scip-improve/references/twin-drift.md +3 -3
  309. package/skills/scip-plan/SKILL.md +2 -2
  310. package/skills/scip-plan/references/api-impact.md +5 -5
  311. package/skills/scip-plan/references/conductor.md +2 -2
  312. package/skills/scip-plan/references/hyper-optimization.md +1 -1
  313. package/skills/scip-query/SKILL.md +15 -5
  314. package/skills/scip-setup/references/bootstrap-workflow.md +7 -8
  315. package/skills/scip-setup/references/language-verification.md +2 -2
  316. package/skills/scip-setup/references/per-repo-triage.md +1 -1
  317. package/skills/scip-verify/SKILL.md +10 -10
  318. package/skills/scip-verify/references/calibrate-detectors.md +7 -7
  319. package/dist/chunk-2465DLHK.js +0 -3
  320. package/dist/chunk-2U3OLUNJ.js +0 -61
  321. package/dist/chunk-33XTHFKR.js +0 -2
  322. package/dist/chunk-43KC6EQZ.js +0 -2
  323. package/dist/chunk-47BU5Z4T.js +0 -8
  324. package/dist/chunk-4YTUWQ6M.js +0 -18
  325. package/dist/chunk-64MNV6AB.js +0 -8
  326. package/dist/chunk-67QRR5YC.js +0 -6
  327. package/dist/chunk-6GXYN7YA.js +0 -40
  328. package/dist/chunk-A2TNXAXO.js +0 -8
  329. package/dist/chunk-APMMR5Y2.js +0 -2
  330. package/dist/chunk-AZFUMCQB.js +0 -2
  331. package/dist/chunk-BNXICU42.js +0 -33
  332. package/dist/chunk-C5Q44Q5D.js +0 -3
  333. package/dist/chunk-DQGSM7RZ.js +0 -20
  334. package/dist/chunk-E2LAW7SL.js +0 -30
  335. package/dist/chunk-E4NFOAD4.js +0 -6
  336. package/dist/chunk-E5HNT4X2.js +0 -3
  337. package/dist/chunk-FD3HFKXR.js +0 -5
  338. package/dist/chunk-GHKEJTCE.js +0 -35
  339. package/dist/chunk-GLZTVKAB.js +0 -16
  340. package/dist/chunk-HIB452NU.js +0 -949
  341. package/dist/chunk-IF6FP6B2.js +0 -66
  342. package/dist/chunk-JORHF5AL.js +0 -108
  343. package/dist/chunk-KSGTULOS.js +0 -9
  344. package/dist/chunk-KXDJAG4N.js +0 -38
  345. package/dist/chunk-L4S2A7BV.js +0 -2
  346. package/dist/chunk-LP3ARJKF.js +0 -8
  347. package/dist/chunk-LSOR3LQG.js +0 -3
  348. package/dist/chunk-NTUMF2X3.js +0 -56
  349. package/dist/chunk-QOXBSI6G.js +0 -20
  350. package/dist/chunk-QXK6UUSM.js +0 -2
  351. package/dist/chunk-RA3AYNWP.js +0 -112
  352. package/dist/chunk-RJMDJR3A.js +0 -2
  353. package/dist/chunk-RLH5VUMG.js +0 -2
  354. package/dist/chunk-SMQWE25B.js +0 -3
  355. package/dist/chunk-TAVELHYR.js +0 -2
  356. package/dist/chunk-VAXNI5NE.js +0 -146
  357. package/dist/chunk-VVY2G5ET.js +0 -2
  358. package/dist/chunk-W3DBTGL4.js +0 -11
  359. package/dist/chunk-WANA4KAQ.js +0 -5
  360. package/dist/chunk-X4FR5BZF.js +0 -9
  361. package/dist/chunk-X6RKPDY7.js +0 -2
  362. package/dist/chunk-YCPASUCX.js +0 -2
  363. package/dist/chunk-ZL2OGDCD.js +0 -2
  364. package/dist/command-descriptors-ZW5J4ZEM.js +0 -631
  365. package/dist/direct-navigation-42YHQPOI.js +0 -3
package/CHANGELOG.md CHANGED
@@ -4,6 +4,85 @@ All notable changes to `scip-query` are documented here. This file starts at 0.1
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.19.10]
8
+
9
+ ### Safer setup and removal
10
+
11
+ - Real uninstall now requires an explicit global or project scope, while a
12
+ scope-free dry run safely previews both. Project-hook removal no longer
13
+ depends on resolving an install-only command identity, and ordinary
14
+ uninstall output summarizes retained personal skills unless `--verbose` is
15
+ requested.
16
+ - Guided setup requires an interactive terminal and rejects conflicting JSON
17
+ or automatic modes. Hook removal has a non-writing preview, rejects
18
+ installation-only force semantics, and reports removal-specific outcomes.
19
+ - Watch timing options are explicitly process-local: status and stop reject
20
+ them, and an already-running daemon refuses overrides it cannot apply.
21
+
22
+ ### Honest outcomes and recoverable evidence
23
+
24
+ - Partial reindex results identify every skipped language and reason. Project
25
+ initialization and agent setup derive their messages from actual
26
+ written/unchanged/skipped results instead of reporting categorical success.
27
+ - Suppression receipts disclose their effective scope, reason code, evidence
28
+ count, expiration, and revision.
29
+ - Verified cleanup application has a same-plan `--dry-run` that names exact
30
+ files, symbols, ranges, deleted lines, and the verification oracle before
31
+ the source-mutation boundary.
32
+ - The final human pagination marker now names transport completion separately
33
+ from command-result coverage, preventing a fully retrieved bounded or
34
+ sampled result from being mistaken for complete semantic evidence.
35
+
36
+ ## [0.19.9]
37
+
38
+ ### Agent-readable command output
39
+
40
+ - Human output is now the default evidence format for agents. `code` renders
41
+ only the resolved path, one-based range, symbol identity, language, and
42
+ whitespace-preserved numbered source; complete output no longer receives a
43
+ pagination wrapper merely because a page size was supplied.
44
+ - Every public JSON-capable command exposes the same `--json`,
45
+ `--result-only`, and `--compact` modes. The stable envelope remains
46
+ compatible for programs, while result-only output removes transport
47
+ metadata and `code` returns a minimal ordered line representation.
48
+ - Partial human pages retain multiline hierarchy and split at complete line
49
+ boundaries whenever possible. Exact resumable continuations remain
50
+ mandatory for genuinely partial output, and malformed numeric flags now
51
+ fail explicitly instead of accepting a numeric prefix.
52
+ - Bundled Claude, Codex, and shared-agent skills prefer ordinary output,
53
+ reserve JSON for programmatic consumers, and no longer preselect page sizes
54
+ or recommend compact JSON for model-readable evidence.
55
+
56
+ ### Durable state and concurrency
57
+
58
+ - Atomic file replacement, committed outcome and suppression records,
59
+ generation pointers, shared-cache leases, watcher refresh requests, and
60
+ semantic mailboxes now preserve explicit operation identity across crashes,
61
+ retries, concurrent owners, stale completions, and partial legacy records.
62
+ - SQLite and SCIP publication use immutable generation artifacts with
63
+ conservative recovery, retained-reader protection, corruption detection,
64
+ and bounded garbage collection. Incremental publication rejects incomplete
65
+ affected sets and preserves rich metadata owned by unaffected documents.
66
+ - Stop hooks and diff-gate runs share bounded evidence leases and execution
67
+ deadlines. Automatic suppression requires versioned policy evidence,
68
+ expiration and content-hash checks, and anomaly escalation instead of
69
+ treating repository-writable metadata as independent authority.
70
+
71
+ ### Query performance and evidence integrity
72
+
73
+ - SQL-backed navigation, graph-risk, file-resolution, coupling, and re-export
74
+ analysis reuse prepared data products, parameterized scopes, bounded
75
+ batches, and indexed lookup paths instead of repeated broad scans. Recorded
76
+ before/after ledgers preserve command-output equivalence alongside the
77
+ measured latency gains.
78
+ - Watch refreshes distinguish rebuilt and reused work, suppress redundant
79
+ requests, preserve cache ownership, and avoid competing manual reindexes.
80
+ Diff-gate containment now completes the current repository-wide change in
81
+ seconds rather than allowing duplicate long-running detector processes.
82
+ - Public configuration, reindex metadata, committed records, TypeScript
83
+ declarations, schemas, command documentation, and downstream consumer
84
+ fixtures were evolved together with explicit compatibility handling.
85
+
7
86
  ## [0.19.8]
8
87
 
9
88
  ### Complete agent evidence
package/README.md CHANGED
@@ -75,10 +75,22 @@ For automation, use `scip-query setup --yes` to accept recommended defaults or
75
75
  scope is intentionally managed elsewhere. Or run without a global install:
76
76
  `npx scip-query@latest setup`.
77
77
 
78
- Every public `--json` response identifies its envelope schema, command result
79
- schema, and producing package version. See the
80
- [CLI JSON output contract](docs/CLI_JSON_OUTPUT.md) for the compatibility
81
- policy, decoder API, and machine-readable schema.
78
+ Human output is the default for people and agents: reports retain their
79
+ sections, while `code` preserves indentation and one-based source line
80
+ numbers. Oversized human results paginate at complete line boundaries whenever
81
+ possible, so continuation pages preserve that hierarchy. Every public
82
+ JSON-capable command also supports the same structured forms: `--json` emits
83
+ the stable envelope, `--json --result-only` emits only the command result, and
84
+ `--json --compact` minifies output for a program. See the
85
+ [CLI output contract](docs/CLI_JSON_OUTPUT.md) for mode selection,
86
+ compatibility, pagination, the decoder API, and machine-readable schemas.
87
+
88
+ Logical `refs --limit` pages use a generation-bound `(path, line)` cursor, so
89
+ ordinary continuations resume after the prior row instead of rebuilding and
90
+ discarding it. Follow every emitted `refs --cursor` continuation before
91
+ claiming a complete reference set. JSON identifies semantic, Ruby, or SCIP
92
+ fallback providers that still require complete analysis as
93
+ `pagination.producer: "complete-only"`.
82
94
 
83
95
  Contributors changing exported TypeScript declarations should also follow the
84
96
  [public API evolution workflow](docs/API_EVOLUTION.md). Its committed manifest
@@ -121,7 +133,7 @@ scip-query incomplete-migration
121
133
 
122
134
  # Before declaring the work complete: gate the diff. Reindex only when status
123
135
  # reports stale and no live watcher or hook refresh is already responsible.
124
- scip-query diff-gate --json
136
+ scip-query diff-gate
125
137
  ```
126
138
 
127
139
  For a repository-wide cleanup pass:
@@ -212,6 +224,12 @@ Batch 0: COMPILER-VERIFIED
212
224
  ```
213
225
 
214
226
  When verification _fails_, the errors name the exact references the static evidence missed — that failure has caught real detector mistakes and stopped build-breaking deletions.
227
+ Before applying a verified batch, run
228
+ `scip-query cleanup-apply --verified --batch <n> --dry-run`. The preview reruns
229
+ the verifier and dirty-tree checks, names every file, symbol range, and LOC,
230
+ and stops at the source-mutation boundary. Apply by repeating the command
231
+ without `--dry-run`; use `--all` only when the entire printed target set is
232
+ intended.
215
233
 
216
234
  **5. Trim speculative generality.** `unused-params` finds trailing parameters no body ever uses (the classic "options for later"), scoped to removals that are type-safe by construction.
217
235
 
@@ -254,10 +272,37 @@ Baseline finding identities are keyed as `detector:file:shortName`. A rename can
254
272
  Accepted findings can be recorded without weakening the rest of the gate:
255
273
 
256
274
  ```bash
257
- scip-query suppress SQABC123DEF456 --check echo --reason "intentional compatibility shim"
275
+ scip-query suppress SQABC123DEF456 \
276
+ --check echo \
277
+ --reason-code compatibility-shim \
278
+ --evidence source:src/compat.ts \
279
+ --reason "the v1 export remains an intentional compatibility surface"
258
280
  ```
259
281
 
260
- This writes one file per suppression under `.scipquery/suppressions/` — commit it with your change. One-file-per-suppression means two branches suppressing different findings merge without conflict; the legacy `suppressions[]` array in `.scipquery.json` is still honored (read-only). Every suppression requires a reason plus either a stable finding id or a `check` (optionally narrowed by `file`). Check+file suppressions are allowed but warn because they waive every matching finding in that file. `diff-gate --json` reports both active and suppressed findings.
282
+ This writes one file per suppression under `.scipquery/suppressions/` — commit
283
+ it with your change. One-file-per-suppression means two branches suppressing
284
+ different findings merge without conflict. The command requires an exact
285
+ current finding ID, a controlled reason code, and at least one inspectable
286
+ counterevidence referent. `source:`, `config:`, and `test:` referents are
287
+ content-hashed when the record is written, so changing their bytes reopens the
288
+ finding. A `graph:` referent is an exact `scip-query ...` command:
289
+
290
+ ```bash
291
+ scip-query suppress SQABC123DEF456 \
292
+ --reason-code detector-counterexample \
293
+ --evidence 'graph:scip-query refs CompatExport --full' \
294
+ --reason "all compiler-resolved consumers still require this export"
295
+ ```
296
+
297
+ The model may create these narrow records without human approval. Admission is
298
+ still decided by scip-query's policy: broad, legacy, expired, invalidated,
299
+ incompatible, or anomalously high-volume decisions remain findings and appear
300
+ as policy escalations. A successful gate with accepted records reports
301
+ `pass-with-suppressions`, not an ordinary clean pass. The legacy
302
+ `suppressions[]` array in `.scipquery.json` and v1 record files remain readable,
303
+ but do not automatically waive findings until explicitly replaced with
304
+ structured counterevidence. `diff-gate` reports active findings,
305
+ accepted suppressions, escalation reasons, and summary counts.
261
306
 
262
307
  The first suppression for an identity is created exclusively. Repeating the
263
308
  same decision is idempotent, but a different reason, expiry, check, or file is
@@ -273,38 +318,44 @@ After reviewing the committed decision, replace exactly that revision:
273
318
 
274
319
  ```bash
275
320
  scip-query suppress SQABC123DEF456 --check echo \
321
+ --reason-code compatibility-shim \
322
+ --evidence source:src/compat.ts \
276
323
  --reason "superseded by a narrower compatibility exception" \
277
324
  --replace 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
278
325
  ```
279
326
 
280
327
  If another writer changes the record first, the stale replacement is rejected
281
328
  and the newer bytes remain intact. New records declare their schema version,
282
- record kind, stable suppression identity, and writer version. Older
283
- unversioned and pre-discriminator v1 records remain readable and are upgraded
284
- only by an explicit replacement. If a malformed or future record cannot be
285
- used, `diff-gate` reports exact incomplete-coverage counts and keeps findings
286
- conservatively unsuppressed. The wire schemas and merge rules are documented
287
- in [`docs/COMMITTED_RECORD_COMPATIBILITY.md`](docs/COMMITTED_RECORD_COMPATIBILITY.md).
329
+ record kind, stable suppression identity, writer version, adjudication policy,
330
+ counterevidence, and invalidation conditions. Older unversioned and v1 records
331
+ remain readable and are upgraded only by an explicit replacement. If a
332
+ malformed or future record cannot be used, `diff-gate` reports exact
333
+ incomplete-coverage counts and keeps findings conservatively unsuppressed. The
334
+ wire schemas and merge rules are documented in
335
+ [`docs/COMMITTED_RECORD_COMPATIBILITY.md`](docs/COMMITTED_RECORD_COMPATIBILITY.md).
288
336
 
289
- **12. Measure whether the gate is earning its keep.** Every completed `diff-gate` run, including JSON and installed Stop-hook runs, writes each finding transition to its own committed `.scipquery/events/*.json` file. Independent branches add independent paths instead of editing one shared ledger file, so ordinary event writes do not create merge conflicts. Each event stores the immutable Git commit used as its comparison base. A finding is a verified fix when it disappears under that same comparison—either directly or after scip-query cleanly replays the original base against a newer committed `HEAD`. Merely committing the finding cannot clear it: if replay still finds it, the outcome stays open; if the worktree is dirty or Git cannot reproduce the base, verification waits. Historical reconciliation is deliberately incremental: one run replays at most one stored comparison base, reports the exact deferred base and finding counts, and leaves every deferred finding open for a later gate. A suppressed finding was noise or an accepted trade-off:
337
+ **12. Observe how the gate is handled.** Every completed `diff-gate` run, including JSON and installed Stop-hook runs, writes each finding transition to its own committed `.scipquery/events/*.json` file. Independent branches add independent paths instead of editing one shared ledger file, so ordinary event writes do not create merge conflicts. Each event stores the logical gate-run identity, observer provenance, index/worktree receipt, and immutable Git commit used as its comparison base. A finding is a verified fix when it disappears under that same comparison—either directly or after scip-query cleanly replays the original base against a newer committed `HEAD`. Merely committing the finding cannot clear it: if replay still finds it, the outcome stays open; if the worktree is dirty or Git cannot reproduce the base, verification waits. Historical reconciliation is deliberately incremental: one run replays at most one stored comparison base, reports the exact deferred base and finding counts, and leaves every deferred finding open for a later gate. A suppressed finding was noise or an accepted trade-off:
290
338
 
291
339
  ```bash
292
340
  scip-query effectiveness --since 30d
293
341
  ```
294
342
 
295
343
  ```
296
- check caught fixed suppressed open moved unverified precision median-days-to-fix
297
- echo 14 10 2 1 0 1 83% 0.8
298
- new-dead 6 5 0 1 0 0 100% 0.3
344
+ check caught fixed suppressed open moved unverified resolution-vs-suppression evaluation-precision authority median-days-to-fix
345
+ echo 14 10 2 1 0 1 83% - local-writable-telemetry 0.8
346
+ new-dead 6 5 0 1 0 0 100% - local-writable-telemetry 0.3
299
347
  ```
300
348
 
301
- `precision` is verified fixed ÷ (verified fixed + suppressed). `moved` separates rename churn, while `unverified` is reserved for legacy or otherwise non-comparable resolutions that lack replay proof. Run diff-gate once to record the finding and again after the repair; a pre-commit rerun uses the same base directly, while clean post-commit runs advance through stored bases incrementally. Filter with `--check <name>`, window with `--since 30d|12w|<ISO date>`, and get machine-readable output with `--json`. Because the event files are committed, the numbers survive re-clones and aggregate across every machine and agent working the repo. Current event files carry an additive v1 discriminator, stable semantic identity, and writer version; existing unversioned files remain readable. `effectiveness` reports accepted and omitted record counts when history is partial, and cross-HEAD verification defers fixes rather than trusting an incomplete lifecycle. Legacy `.scipquery/ledger/events.jsonl` records remain readable and are migrated to individual files on the next gate write only when every non-empty line is compatible; otherwise the source ledger is preserved. Historical cross-`HEAD` events without stored comparison evidence remain unverified rather than being reclassified speculatively. Standalone health/cleanup commands are not yet outcome-tracked because they do not all expose a complete-scan contract.
349
+ `resolution-vs-suppression` is verified fixed ÷ (verified fixed + suppressed). Repository-local event and suppression files are writable by the same agent doing the work, so this ratio is operational telemetry, not an independent correctness grade. `evaluation-precision` is populated only when a protected external evaluator supplies both protected-CI records and a separately controlled attestation for their gate-run IDs; a JSON field cannot attest itself. Ordinary local-agent and local-human runs leave it blank. `moved` separates rename churn, while `unverified` is reserved for legacy or otherwise non-comparable resolutions that lack replay proof. Run diff-gate once to record the finding and again after the repair; a pre-commit rerun uses the same base directly, while clean post-commit runs advance through stored bases incrementally. Filter with `--check <name>`, window with `--since 30d|12w|<ISO date>`, and get machine-readable provenance, anomaly samples, and record-compatibility counts with `--json`. Local runs default to `local-agent`; a person running the gate directly may set `SCIP_QUERY_OUTCOME_OBSERVER_KIND=local-human` and optionally `SCIP_QUERY_OUTCOME_OBSERVER_SOURCE=<label>`. Both remain `repository-writable`; neither environment variable can claim protected authority. Because the event files are committed, the numbers survive re-clones and aggregate across every machine and agent working the repo, but missing or deliberately deleted history cannot be inferred from the remaining directory. Current event files carry an additive v1 discriminator, stable semantic identity, writer version, gate-run identity, observer authority, and observation receipt; existing unversioned files remain readable. `effectiveness` reports accepted and omitted record counts when history is partial, and cross-HEAD verification defers fixes rather than trusting an incomplete lifecycle. Legacy `.scipquery/ledger/events.jsonl` records remain readable and are migrated to individual files on the next gate write only when every non-empty line is compatible; otherwise the source ledger is preserved. Historical cross-`HEAD` events without stored comparison evidence remain unverified rather than being reclassified speculatively. Standalone health/cleanup commands are not yet outcome-tracked because they do not all expose a complete-scan contract.
302
350
 
303
351
  `diff-gate` is also single-flight per project: a second CLI or Stop-hook gate
304
352
  returns the live owner's PID and start time instead of duplicating the same
305
353
  CPU-heavy work. The gate runs in an owned child process with a 60-second
306
354
  deadline, or 180 seconds with `--full`; timeout terminates and reaps that child
307
- and fails the gate explicitly. Operators may set
355
+ and fails the gate explicitly. Before and after every detector, the child
356
+ publishes a private progress record; a timeout therefore names the active
357
+ detector or phase and the last completed detector instead of reporting only
358
+ the total elapsed time. Operators may set
308
359
  `SCIP_QUERY_DIFF_GATE_TIMEOUT_MS` to a positive millisecond value, capped at
309
360
  10 minutes.
310
361
 
@@ -394,11 +445,12 @@ classifies current evidence, while `scip-improve` changes confirmed findings.
394
445
  challenges a concrete finished diff. `scip-explore` explains working behavior;
395
446
  `scip-diagnose` starts from a failure or contradiction.
396
447
 
397
- Project setup writes reviewable checkout-local lifecycle hooks for Codex and Claude Code (`.codex/hooks.json` and `.claude/settings.local.json`). A checkout-local hook is an agent-tool preference whose defining trait is that it applies to one clone rather than expressing team policy. Setup adds both paths to that clone's `.git/info/exclude`, so they do not appear in commits, and refuses to rewrite either path if it is already tracked. `setup-hooks --shared` remains accepted only as a deprecated compatibility flag; it no longer writes `.claude/settings.json`. These hooks add scip-query context at session start, route prompts toward the right skill, and run an advisory Stop-hook wrapper around the diff gate only for that repository. The Stop hook sends feedback to the agent by default instead of blocking; set `SCIP_QUERY_STOP_HOOK_MODE=warn` for a warning-only hook response, or `SCIP_QUERY_STOP_HOOK_MODE=block` to enforce the gate. Set `SCIP_QUERY_SKIP_HOOK_INSTALL=1` or run `scip-query setup --no-hooks` to skip hook installation during setup, and run `scip-query setup-hooks --json` later to repair the current checkout's hooks.
448
+ Project setup writes reviewable checkout-local lifecycle hooks for Codex and Claude Code (`.codex/hooks.json` and `.claude/settings.local.json`). A checkout-local hook is an agent-tool preference whose defining trait is that it applies to one clone rather than expressing team policy. Setup adds both paths to that clone's `.git/info/exclude`, so they do not appear in commits, and refuses to rewrite either path if it is already tracked. `setup-hooks --shared` remains accepted only as a deprecated compatibility flag; it no longer writes `.claude/settings.json`. These hooks add scip-query context at session start, route prompts toward the right skill, and run an advisory Stop-hook wrapper around the diff gate only for that repository. The Stop hook sends feedback to the agent by default instead of blocking; set `SCIP_QUERY_STOP_HOOK_MODE=warn` for a warning-only hook response, or `SCIP_QUERY_STOP_HOOK_MODE=block` to enforce the gate. Set `SCIP_QUERY_SKIP_HOOK_INSTALL=1` or run `scip-query setup --no-hooks` to skip hook installation during setup, and run `scip-query setup-hooks --json` later to repair the current checkout's hooks. Preview hook removal with `scip-query setup-hooks --remove --dry-run`; `--force` is an installation-only mode and cannot be combined with removal. A scope-free `scip-query uninstall --dry-run` safely previews both global and project integrations, while real uninstall requires exactly one of `--global` or `--project`.
398
449
 
399
450
  Setup/configuration writers are conflict-aware. They reread the latest file
400
451
  under a short token-owned lock, preserve unknown JSON fields and prose outside
401
- owned Markdown markers, and publish complete bytes durably. An unrelated
452
+ owned Markdown markers, and publish complete bytes with flushed files and,
453
+ where the host supports it, a synchronized complete directory path. An unrelated
402
454
  intervening JSON edit is merged; a stale decision about the same project-config
403
455
  field, malformed latest JSON, malformed managed markers, or an edit that wins
404
456
  the final revision check produces an explicit conflict and leaves the latest
@@ -419,8 +471,9 @@ refreshes the index, smoke-tests representative command families, writes
419
471
  selected, reports the health score and items needing attention, and seeds
420
472
  AGENTS.md/CLAUDE.md guidance. Use
421
473
  the default terminal checklist to accept or decline the recommended automatic
422
- indexing action and other project-local changes (`--guided` reopens it
423
- explicitly). After setup,
474
+ indexing action and other project-local changes (`--guided` requires an
475
+ interactive terminal and reopens it explicitly; automation should use
476
+ `--yes` or `--json`). After setup,
424
477
  `scip-audit` confirms raw signals and `scip-improve` keeps
425
478
  fixing the worst confirmed items until no safe confirmed cleanup remains. Use
426
479
  `scip-query setup --git-hook` when you also want a local pre-commit diff gate.
@@ -476,8 +529,8 @@ scip-query status --capabilities
476
529
  scip-query stats
477
530
  scip-query system src/auth
478
531
  scip-query plan-context login
479
- scip-query diff-impact --json
480
- scip-query health --json
532
+ scip-query diff-impact
533
+ scip-query health
481
534
  scip-query cleanup-plan --verify
482
535
  scip-query health --write-baseline # start the ratchet
483
536
  ```
@@ -546,8 +599,14 @@ selects the database, SCIP companion, and metadata as one unit; every
546
599
  `index.db`, `index.scip`, and `meta.json` files remain compatibility mirrors,
547
600
  but internal queries do not reread them after opening a generation. This keeps
548
601
  cursor identities and semantic requests attached to the same rows even during
549
- a concurrent reindex. The publication, crash, legacy-overlap, and retention
550
- rules are documented in [Local Index Generations](docs/INDEX_GENERATIONS.md).
602
+ a concurrent reindex. Each live reader publishes a process-identity lease.
603
+ Automatic collection retains the current and recovery generations, every
604
+ live-reader generation, and enough recent generations to stay within both an
605
+ eight-generation and 2 GiB logical default bound. Malformed reader ownership
606
+ fails closed; dead readers are reclaimed. `status` reports retained count,
607
+ logical bytes, oldest age, protected/readers counts, limits, and the last
608
+ collection result. The publication, crash, legacy-overlap, and retention rules
609
+ are documented in [Local Index Generations](docs/INDEX_GENERATIONS.md).
551
610
 
552
611
  All `meta.json` consumers share one version decoder and an explicit capability
553
612
  matrix. Version 2 remains readable, version 3 is current, and version 4 is a
@@ -646,6 +705,14 @@ replacement, and manual preemption verify both values before signaling. A
646
705
  legacy record or a platform lookup failure therefore fails closed with an
647
706
  explicit recovery error instead of treating a reused PID as the old
648
707
  tool-owned process.
708
+ Watcher shutdown stops new work and gives subscriptions and active reindex
709
+ ownership five seconds to drain. A dedicated watch service that cannot prove a
710
+ clean stop reports a degraded shutdown and exits so the operating system can
711
+ close stuck descriptors. `watch stop` allows six seconds for that graceful
712
+ path, then revalidates the exact process-start identity before forced
713
+ termination and waits up to one additional second to observe exit. A changed
714
+ or unavailable identity is never signaled, and ownership files are not cleaned
715
+ until the original process is known to have exited.
649
716
 
650
717
  Finite subprocesses use explicit wall-time and output budgets. Quick binary
651
718
  probes default to 10 seconds, Git operations to 30 seconds, isolated analysis
@@ -685,10 +752,20 @@ Clojure projects can pass a project-local `scip-clojure` config file through `.s
685
752
  }
686
753
  ```
687
754
 
688
- Most read-only commands accept `--json` and use the same envelope:
755
+ Most read-only commands accept `--json` and use the same versioned envelope.
756
+ Add `--result-only` when a program needs just the command payload:
689
757
 
690
758
  ```json
691
- { "command": "fan-in", "args": ["login"], "options": { "json": true }, "result": [] }
759
+ {
760
+ "kind": "scip-query-result",
761
+ "schemaVersion": 1,
762
+ "producer": { "name": "scip-query", "version": "0.19.10" },
763
+ "command": "fan-in",
764
+ "resultSchemaVersion": 1,
765
+ "args": ["login"],
766
+ "options": { "json": true },
767
+ "result": []
768
+ }
692
769
  ```
693
770
 
694
771
  ## Configuration
@@ -709,7 +786,7 @@ It creates a minimal `.scipquery.json`:
709
786
  "watch": {
710
787
  "enabled": true,
711
788
  "debounceMs": 250,
712
- "cooldownMs": 0,
789
+ "cooldownMs": 5000,
713
790
  "gitPollMs": 2000,
714
791
  "idleTimeoutMs": 600000,
715
792
  "autoRefresh": true
@@ -739,7 +816,13 @@ background service. Relevant file/Git activity keeps it alive; it exits after
739
816
  `idleTimeoutMs` of clean inactivity and wakes on the next command. Set the idle
740
817
  timeout to `0` to keep it running. `scip-query watch` still provides foreground
741
818
  mode, while `watch --daemon`, `watch --status`, and `watch --stop` expose the
742
- background lifecycle. Both modes share one project lock, so only one can own an
819
+ background lifecycle. Command-line timing flags are process-local and apply
820
+ only when a foreground watcher or daemon starts; a live daemon refuses those
821
+ flags and names the required stop/start sequence instead of pretending its
822
+ timing changed. The default 5-second cooldown coalesces change bursts
823
+ into one refresh plus, when necessary, one trailing refresh; explicitly setting
824
+ `cooldownMs` to `0` opts into immediate scheduling. Both modes share one project
825
+ lock, so only one can own an
743
826
  index cache. Stopping is an asynchronous drain: the watcher first rejects new
744
827
  refreshes, continuously consumes a bounded tail of the active worker's output,
745
828
  closes every source subscription, and waits for the worker to exit after
@@ -763,13 +846,24 @@ owner-expiring claims, retained idempotent completions, FIFO enqueue ordering,
763
846
  typed item/byte backpressure, bounded cleanup, and pressure telemetry. Client
764
847
  timeout or exit no longer deletes shared work; a service crash before response
765
848
  is reclaimable, while a response published before a crash prevents
766
- re-execution. The precise state machine, default limits, legacy overlap, and
849
+ re-execution. The service rereads the clock before each claimed operation and
850
+ again after handler completion, so time spent on an earlier request cannot let
851
+ a later expired request begin or publish success. Idle mailbox polling backs
852
+ off from 50 ms to 250 ms and returns to 10 ms while draining work; mailbox
853
+ directories are initialized once per service ownership rather than on every
854
+ poll. The precise state machine, default limits, legacy overlap, and
767
855
  failure matrix are documented in
768
856
  [`docs/MAILBOX_LIFECYCLE.md`](docs/MAILBOX_LIFECYCLE.md).
769
857
  Rust v3 additionally binds every accepted response to its request ID,
770
858
  operation ID, mailbox-session identity, and authoritative absolute deadline;
771
859
  its old/current/future compatibility matrix is in
772
860
  [`docs/RUST_DURABLE_SESSION_PROTOCOL.md`](docs/RUST_DURABLE_SESSION_PROTOCOL.md).
861
+ The Rust semantic worker retains at most four rust-analyzer sessions. Linked
862
+ Cargo projects are resolved, deduplicated, and sorted before session reuse, so
863
+ equivalent project sets share one session regardless of input order. When the
864
+ capacity is full, the least-recently-used session completes its LSP shutdown
865
+ and process-tree reap before a replacement starts; an unproven shutdown blocks
866
+ replacement instead of allowing overlapping language servers.
773
867
  It also reports a rolling 24-hour reindex activity summary: rebuilt, reused,
774
868
  failed, and freshness-proven suppressed refreshes plus estimated logical output
775
869
  bytes. The estimate counts scip-query artifacts emitted by rebuilt refreshes;
@@ -777,7 +871,12 @@ it is not a measurement of physical SSD writes. The underlying
777
871
  `reindex-activity.jsonl` history uses two bounded 1 MiB segments. Append,
778
872
  rotation, and retained-set reads share a process-instance lock; incomplete
779
873
  crash tails are trimmed or ignored without deleting earlier complete lines.
780
- These observations are process-visible rather than crash-durable. See
874
+ Status labels the resulting summary `complete`, `partial`, or `unavailable`
875
+ and reports read, invalid, skipped, read-error, and incomplete-tail counts.
876
+ Telemetry append failure never changes the authoritative reindex result, but
877
+ it is returned to the caller and surfaced as a warning or watch-state error
878
+ instead of disappearing. These observations are process-visible rather than
879
+ crash-durable. See
781
880
  [`docs/TELEMETRY_RETENTION.md`](docs/TELEMETRY_RETENTION.md).
782
881
  The refresh-request counters reported beside it describe durable demand
783
882
  admission and processing state, not reindex frequency.
@@ -1,2 +1,2 @@
1
- import{c as t}from"./chunk-3ZSJ3PWF.js";import"./chunk-IF6FP6B2.js";import"./chunk-C5Q44Q5D.js";import"./chunk-46XGSFNI.js";import{writeFileSync as s}from"fs";import{workerData as o}from"worker_threads";var r=o;try{let e=t({projectRoot:r.projectRoot,dbPath:r.dbPath,tsconfig:r.tsconfig,vueFiles:r.vueFiles,tasks:r.tasks});s(r.resultPath,JSON.stringify({version:1,runId:r.runId,workerId:r.workerId,taskIds:r.taskIds,ok:!0,result:e}))}catch(e){s(r.resultPath,JSON.stringify({version:1,runId:r.runId,workerId:r.workerId,taskIds:r.taskIds,ok:!1,error:e instanceof Error?e.message:String(e)}))}
1
+ import{c as t}from"./chunk-PBUQFCNB.js";import"./chunk-FJH2NW7J.js";import"./chunk-WUPW3UN3.js";import"./chunk-46XGSFNI.js";import{writeFileSync as s}from"fs";import{workerData as o}from"worker_threads";var r=o;try{let e=t({projectRoot:r.projectRoot,dbPath:r.dbPath,tsconfig:r.tsconfig,vueFiles:r.vueFiles,tasks:r.tasks});s(r.resultPath,JSON.stringify({version:1,runId:r.runId,workerId:r.workerId,taskIds:r.taskIds,ok:!0,result:e}))}catch(e){s(r.resultPath,JSON.stringify({version:1,runId:r.runId,workerId:r.workerId,taskIds:r.taskIds,ok:!1,error:e instanceof Error?e.message:String(e)}))}
2
2
  //# sourceMappingURL=augment-vue-worker.js.map
@@ -0,0 +1,8 @@
1
+ import{a as k}from"./chunk-DHEQMPLW.js";import{a as $}from"./chunk-C43RDDP4.js";import{a as O,e as P,s as A}from"./chunk-EKZTZXHZ.js";import{o as R}from"./chunk-UJPRPGCO.js";import{E as S,F as w,G as j,K as T}from"./chunk-WCCFZ7V7.js";import{a as d}from"./chunk-NGEXCJJW.js";import{d as g}from"./chunk-7S5E7KWT.js";import{c as f}from"./chunk-C3KV2II6.js";import{existsSync as b,readdirSync as M}from"fs";import{join as p}from"path";var Q={files:new Set,pathPrefixes:[]},z={reasonsByFile:new Map},x=/^(?:dist|build|lib|out|output|esm|cjs|umd)\//,tt=/\.(?:d\.ts|d\.mts|d\.cts|ts|tsx|mts|cts|js|jsx|mjs|cjs)$/,C=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs"],et=new Set([".git",".next",".turbo","build","coverage","dist","node_modules","out"]),rt=4,nt=g("package-surface",{clearGroups:["whole-project"]}),st=g("package-operational-surface",{clearGroups:["whole-project"]});function it(t){return nt.get(t,()=>ot(t.config.projectRoot))}function y(t,e){let r=it(t);return r.files.has(e)?!0:r.pathPrefixes.some(n=>e.startsWith(n))}function at(t){return st.get(t,()=>ct(t.config.projectRoot))}function ee(t,e){return at(t).reasonsByFile.get(e)??[]}function ot(t){let e=new Set,r=[];for(let{manifest:n,packageRoot:i}of N(t))for(let s of ut(n))V(t,i,s,e,r);return e.size===0&&r.length===0?Q:{files:e,pathPrefixes:r}}function ct(t){let e=new Map;for(let{manifest:r,packageRoot:n}of N(t)){let i=ft(r);for(let a of i)F(t,n,a,"package binary",e);let s=r.scripts;if(!(!s||typeof s!="object")){for(let[a,o]of Object.entries(s))if(typeof o=="string")for(let c of gt(o))F(t,n,c,`package script "${a}"`,e)}}return e.size===0?z:{reasonsByFile:e}}function N(t){let e=[],r=v(t,"");return r&&e.push({manifest:r,packageRoot:""}),L(t,"",e,0),e}function L(t,e,r,n){if(n>=rt)return;let i=p(t,e);if(b(i))for(let s of M(i,{withFileTypes:!0})){if(!s.isDirectory()||et.has(s.name))continue;let a=e?`${e}/${s.name}`:s.name,o=v(t,a);o&&r.push({manifest:o,packageRoot:a}),L(t,a,r,n+1)}}function v(t,e){let r;try{r=S(t,p(e,"package.json"),{maxBytes:8*1024*1024,inputKind:"package manifest"})}catch(n){if(!w(n))throw n;return null}try{let n=JSON.parse(r);return n&&typeof n=="object"?n:null}catch{return null}}function ut(t){let e=[];for(let n of["main","module","types","browser"])typeof t[n]=="string"&&e.push(t[n]);let r=t.bin;if(typeof r=="string")e.push(r);else if(r&&typeof r=="object")for(let n of Object.values(r))typeof n=="string"&&e.push(n);return I(t.exports,e),e}function ft(t){let e=t.bin;return typeof e=="string"?[e]:!e||typeof e!="object"?[]:Object.values(e).filter(r=>typeof r=="string")}function gt(t){let e=[],r=/(?:^|&&|\|\||;)\s*(?:(?:cross-env|env)(?:\s+[A-Za-z_][A-Za-z0-9_]*=\S+)*\s+)?(?:node|bun|tsx|ts-node|vite-node|python3?|deno\s+run)\s+(?:(?:--?[A-Za-z0-9-]+(?:=\S+)?)\s+)*["']?([^"'`\s]+\.(?:ts|tsx|mts|cts|js|jsx|mjs|cjs|py))["']?/g;for(let n of t.matchAll(r)){let i=n[1];i&&!i.startsWith("node_modules/")&&!i.startsWith("./node_modules/")&&e.push(i)}return e}function F(t,e,r,n,i){let s=new Set;V(t,e,r,s,[]);for(let a of s){let o=i.get(a)??[];o.includes(n)||o.push(n),i.set(a,o)}}function I(t,e){if(typeof t=="string"){e.push(t);return}if(!(!t||typeof t!="object"))for(let r of Object.values(t))I(r,e)}function V(t,e,r,n,i){let s=r.replace(/\\/g,"/").replace(/^\.\//,"");if(s===""||s.startsWith(".."))return;let a=s.indexOf("*");if(a>=0){let c=s.slice(0,a);for(let l of D(c))l!==""&&i.push(u(e,l));return}let o=s.replace(tt,"");for(let c of D(o)){c===o&&c===s&&n.add(u(e,s));for(let l of C)lt(t,n,e,c+l)}n.add(u(e,s))}function D(t){let e=[t];return x.test(t)&&(e.push(t.replace(x,"src/")),e.push(t.replace(x,""))),e}function lt(t,e,r,n){let i=u(r,n);if(e.add(i),!n.startsWith("src/")||b(p(t,i)))return;let s=C.find(m=>n.endsWith(m));if(!s)return;let a=n.slice(0,-s.length);pt(t,e,r,a,s);let o=a.lastIndexOf("/");if(o<=4)return;let c=a.slice(0,o),l=a.slice(o+1);for(let m of B(t,r,c,`${l}${s}`))e.add(m)}function pt(t,e,r,n,i){let s=u(r,`${n}/index${i}`);b(p(t,s))&&e.add(s)}function B(t,e,r,n){let i=p(t,e,r);if(!b(i))return[];let s=[];for(let a of M(i,{withFileTypes:!0})){let o=`${r}/${a.name}`;a.isDirectory()?s.push(...B(t,e,o,n)):a.isFile()&&a.name===n&&s.push(u(e,o))}return s}function u(t,e){return t?`${t}/${e}`:e}import{existsSync as E,readdirSync as dt}from"fs";import{dirname as St,join as _}from"path";var bt={rootFiles:new Set,sourcePrefixes:[]},ht=new Set([".git",".scipquery","node_modules","target"]),mt=6,Pt=g("rust-library-surface",{clearGroups:["whole-project"]});function W(t,e,r){if(!r.endsWith(".rs")||!Et(xt(t),r))return!1;let n=A(t,r).find(i=>i.symbol===e);return n?_t(T(t,r)[n.startLine]??""):!1}function xt(t){return Pt.get(t,()=>yt(t.config.projectRoot))}function yt(t){let e=new Set,r=new Set;for(let n of kt(t)){let i=S(t,_(n,"Cargo.toml"),{maxBytes:8388608,inputKind:"Cargo manifest"}),s=wt(i),a=u(n,"src/lib.rs"),o=s?u(n,s):!jt(i)&&j(t,a)?a:null;if(!o)continue;e.add(o);let c=St(o).replaceAll("\\","/");r.add(c==="."?"":`${c}/`)}return e.size===0?bt:{rootFiles:e,sourcePrefixes:[...r].sort()}}function Et(t,e){return e.endsWith(".rs")?t.rootFiles.has(e)?!0:Tt(e)?!1:t.sourcePrefixes.some(r=>e.startsWith(r)):!1}function _t(t){return/^\s*pub\s+(?!\()/.test(t)}function kt(t){if(!E(t))return[];let e=[];return X(t,"",e,0),e}function X(t,e,r,n){let i=_(t,e);if(E(i)&&(E(_(i,"Cargo.toml"))&&r.push(e),!(n>=mt)))for(let s of dt(i,{withFileTypes:!0})){if(!s.isDirectory()||ht.has(s.name))continue;let a=e?`${e}/${s.name}`:s.name;X(t,a,r,n+1)}}function wt(t){let e=!1;for(let r of t.split(`
2
+ `)){let n=r.replace(/\s+#.*$/,"").trim(),i=/^\[([^\]]+)\]$/.exec(n);if(i){e=i[1]==="lib";continue}if(!e)continue;let s=/^path\s*=\s*["']([^"']+)["']/.exec(n)?.[1];if(s)return s.replaceAll("\\","/").replace(/^\.\//,"")}return null}function jt(t){let e=!1;for(let r of t.split(`
3
+ `)){let n=r.replace(/\s+#.*$/,"").trim(),i=/^\[([^\]]+)\]$/.exec(n);if(i){e=i[1]==="package";continue}if(e&&/^autolib\s*=\s*false\b/.test(n))return!0}return!1}function Tt(t){return/(?:^|\/)src\/main\.rs$/.test(t)||/(?:^|\/)src\/bin\//.test(t)||/(?:^|\/)(?:examples|tests|benches)\//.test(t)}function h(t){let e=f(t);return Ht(e)?"test":Kt(e)?"worker":Yt(e)?"entry":Zt(e)?"barrel":"source"}function Rt(t){return h(t)==="barrel"}function U(t){return $t.get(t,()=>{let r=d(t,{includeIgnored:!1}).filter(a=>{let o=h(a);return o==="entry"||o==="worker"});if(r.length===0)return new Set;let n=$(t),i=new Set,s=new Set;for(;r.length>0;){let a=r.shift();if(!i.has(a)){i.add(a),h(a)==="barrel"&&s.add(a);for(let o of n.get(a)??[])i.has(o)||r.push(o)}}return s})}var $t=g("live-barrels",{clearGroups:["whole-project"]});function Ot(t,e){return U(t).has(f(e))}function ye(t){let e=U(t);return d(t,{includeIgnored:!1}).filter(r=>Rt(r)&&!e.has(r)&&!At(t,r))}function At(t,e){let r=f(e),n=O(t).forFile(r,{facts:!0}).facts?.callables;return n&&n.length>0?!0:(t.get(`SELECT COUNT(*) AS n
4
+ FROM defn_enclosing_ranges der
5
+ JOIN documents d ON d.id = der.document_id
6
+ WHERE d.relative_path = ?
7
+ AND der.end_line - der.start_line >= 2`,r)?.n??0)>0}function Ee(t,e){let r=f(e),n=h(e);return n==="entry"||n==="worker"||Xt(r)||Ot(t,r)}function _e(t,e,r){let n=f(r);if(y(t,n)||Dt(t,e,n)||W(t,e,n)||Wt(e,n))return!0;let i=t.config.entryRoots;return i?!!(i.files?.some(s=>f(s)===n)||i.pathPrefixes?.some(s=>n.startsWith(f(s)))||i.qualifiedVars?.some(s=>qt(e,s))||i.symbolPatterns?.some(s=>{try{return k(s,"entryRoots.symbolPatterns entry").test(e)}catch{return!1}})):!1}var Ft=g("package-surface-reachability",{clearGroups:["whole-project"]});function Dt(t,e,r){let n=Mt(t).get(r);return n===void 0?!1:n===null||n.has(P(e))}function Mt(t){return Ft.get(t,()=>{let e=new Map,r=[];for(let n of d(t,{includeIgnored:!1}))y(t,n)&&(e.set(n,null),r.push(n));for(;r.length>0;){let n=r.shift(),i=e.get(n);if(i!==void 0)for(let s of R(t,n)){if(!s.sourcePath||t.isIgnored(s.sourcePath))continue;let a=Ct(i,s);a!==void 0&&Nt(e,s.sourcePath,a)&&r.push(s.sourcePath)}}return e})}function Ct(t,e){if(t===null)return e.kind==="named"?new Set(e.names):null;if(e.kind==="star")return new Set(t);if(e.kind==="star-as")return;let r=e.names.filter(n=>t.has(n));return r.length>0?new Set(r):void 0}function Nt(t,e,r){if(!t.has(e))return t.set(e,r),!0;let n=t.get(e);if(n===void 0)return!1;if(n===null||r===null)return n===null?!1:(t.set(e,null),!0);let i=!1;for(let s of r)n.has(s)||(n.add(s),i=!0);return i}var H=new Set(["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]),Lt=new Set(["default","generateMetadata","generateStaticParams"]),vt=new Set(["default","getStaticProps","getServerSideProps","getStaticPaths","config"]),It=new Set(["default","loader","action","clientLoader","clientAction","headers","links","meta","shouldRevalidate","ErrorBoundary","HydrateFallback"]),Vt=new Set(["load","actions","entries",...H]),Bt=new Set(["default"]);function Wt(t,e){let r=P(t);return r===""?!1:K(e)?H.has(r):Y(e)?Lt.has(r):Z(e)?vt.has(r):q(e)?It.has(r):J(e)?Vt.has(r):Ut(e)?Bt.has(r):!1}function Xt(t){return K(t)||Y(t)||Z(t)||Gt(t)||q(t)||J(t)}function K(t){return/(?:^|\/)app(?:\/[^/]+)*\/route\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function Y(t){return/(?:^|\/)app(?:\/[^/]+)*\/(?:page|layout|template|loading|error|not-found|global-error|head|default)\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function Z(t){return/(?:^|\/)pages\/.+\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function Gt(t){let e="(?:middleware|proxy|instrumentation)\\.(?:ts|js|mts|mjs)";return new RegExp(`^(?:src/)?${e}$`).test(t)||new RegExp(`(?:^|/)src/${e}$`).test(t)||new RegExp(`(?:^|/)(?:apps|services|packages)/[^/]+/(?:src/)?${e}$`).test(t)}function q(t){return/(?:^|\/)app\/routes\/.+\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function J(t){return/(?:^|\/)src\/routes\/(?:.*\/)?\+(?:page|page\.server|layout|layout\.server|server)\.(?:ts|js)$/.test(t)}function Ut(t){return/(?:^|\/)src\/(?:pages|views|routes)\/.+\.(?:ts|tsx|js|jsx|vue)$/.test(t)}function Ht(t){return!!(/\.(?:test|spec)\.[a-z0-9]+$/i.test(t)||/(?:^|\/)(?:_)?test_[^/]+$/i.test(t)||/(?:^|\/)spec_[^/]+$/i.test(t)||/(?:^|\/)[^/]+_test\.[a-z0-9]+$/i.test(t)||/(?:^|\/)[^/]+_tests\.rs$/i.test(t)||/(?:^|\/)tests\.rs$/i.test(t)||/(?:^|\/)[^/]+_spec\.[a-z0-9]+$/i.test(t)||/(?:^|\/)__tests__\//i.test(t)||/(?:^|\/)test\//i.test(t)||/(?:^|\/)tests\//i.test(t)||/(?:^|\/)__fixtures__\//i.test(t)||/(?:^|\/)__mocks__\//i.test(t)||/(?:^|\/)test-support\//i.test(t)||/(?:^|\/)test-utils\//i.test(t)||/(?:^|\/)testing\//i.test(t))}function Kt(t){return/(?:^|\/)[^/]*worker\.(?:ts|tsx|js|mjs|cjs|rs|py|go)$/.test(t)}function Yt(t){let e=t.split("/"),r=e[e.length-1]??t;return r==="cli.ts"||r==="cli.js"||r==="postinstall.ts"||r==="postinstall.js"||r==="main.ts"||r==="main.js"||r==="main.rs"||r==="main.go"||r==="main.py"||r==="build.rs"||r==="lib.rs"||/\bsrc\/bin\/[^/]+\.rs$/.test(t)||/(?:^|\/)examples\/[^/]+\.rs$/.test(t)||/(?:^|\/)tests\/[^/]+\.rs$/.test(t)||/(?:^|\/)benches\/[^/]+\.rs$/.test(t)?!0:r==="index.ts"||r==="index.js"?/(?:^|\/)(?:apps|services)\/[^/]+\/src\/index\.(?:ts|js)$/.test(t)?!0:e.length<=2:!1}function Zt(t){return t==="index.ts"||t==="index.js"||t.endsWith("/index.ts")||t.endsWith("/index.js")||t.endsWith("/mod.rs")||t.endsWith("/__init__.py")}function qt(t,e){let r=e.lastIndexOf("/");if(r<0)return!1;let n=e.slice(0,r),i=e.slice(r+1);return t.includes(G(n)+"/")&&t.includes(G(i)+".")}function G(t){return/^[A-Za-z0-9_$+-]+$/.test(t)?t:"`"+t.replace(/`/g,"``")+"`"}export{y as a,ee as b,h as c,Rt as d,Ot as e,ye as f,Ee as g,_e as h,Xt as i};
8
+ //# sourceMappingURL=chunk-26QA6FAI.js.map
@@ -1,2 +1,2 @@
1
- import{b as A}from"./chunk-3EDFLQ6A.js";import{a as _}from"./chunk-X6RKPDY7.js";import{f as R,g as L}from"./chunk-6M7RONVB.js";import{c as E}from"./chunk-2SNGN6U4.js";import{f as x,g as I}from"./chunk-LP3ARJKF.js";import{b as D}from"./chunk-B75HZHUP.js";import{a as w}from"./chunk-BGBBVSH4.js";import{d as N}from"./chunk-RA3AYNWP.js";import{b as T,c as h}from"./chunk-MZZBAITE.js";import{O as S}from"./chunk-JORHF5AL.js";import{a as g}from"./chunk-64MNV6AB.js";var F={caller:3,"entry-surface":2,rooted:1},O=/not\s*yet\s*implement|not\s*implement|unimplement|\bnyi\b|\btodo\b|\bstub\b|not\s*supported|coming\s*soon/i,P=/^throw\s+new\s+[\w.]*Error\s*\(([\s\S]*)\)\s*;?$/,C=/^return(\s+(null|undefined|false|0|''|""|``|\[\]|\{\}))?\s*;?$/,v=/\/\/\s*TODO\b|\/\*\s*TODO\b/i,K=/(?:=>|\))\s*(?::\s*[^{;=]+)?\s*\{\s*\}\s*;?\s*$/;function et(e,n={}){let{scope:o,limit:r=30,scanLimit:l,semantic:a=!0}=n,s=new E(e),t=D(s.productionCallableDefinitions({scope:o,minLoc:1,requireFunctionLikeSymbol:!0,excludeTypesFiles:!0}),l),c=[];for(let i of t){let m=M(e,i);m&&c.push(m)}if(c.length===0)return[];let d=j(e,c,t),f=c.filter(i=>!d.has(i.def.symbol));if(f.length===0)return[];let p=_(e,s).forDefinitions(f.map(i=>i.def),{semantic:a}),u=[];for(let i of f){let b=p.get(i.def.symbolId)?.realConsumers.length??0,y=B(e,i.def,b);y&&u.push({symbol:i.def.symbol,shortName:N(i.def.symbol),file:i.def.relativePath,startLine:i.def.startLine,endLine:i.def.endLine,loc:w(i.def),stubKind:i.stubKind,reachability:y,callerFanIn:b,stubText:i.stubText})}return u.sort((i,m)=>F[m.reachability]-F[i.reachability]||m.callerFanIn-i.callerFanIn||i.file.localeCompare(m.file)||i.startLine-m.startLine),r?u.slice(0,r):u}function B(e,n,o){return o>0?"caller":I(e,n.symbol,n.relativePath)?"rooted":x(e,n.relativePath)?"entry-surface":null}function M(e,n){let o=R(e,n);if(!o)return null;let r=L(o),l=r.trim();if(l==="")return!z(o)||!A(e,n)?null:{def:n,stubKind:"empty-body",stubText:"(empty body)"};let a=h(r),s=T(r),t=$(a,s);if(t.length!==1)return null;let c=t[0];return U(c)?{def:n,stubKind:"throw-stub",stubText:c.trim()}:v.test(r)&&C.test(c.trim())?{def:n,stubKind:"todo-return-default",stubText:l}:null}function $(e,n){let o=[],r=0,l="";for(let a=0;a<n.length;a+=1){let s=n[a];if(s==="("||s==="["||s==="{"?r+=1:(s===")"||s==="]"||s==="}")&&(r=Math.max(0,r-1)),s===";"&&r===0){o.push(l),l="";continue}l+=e[a]??""}return l.trim()&&o.push(l),o.map(a=>a.trim()).filter(a=>a.length>0)}function U(e){let n=P.exec(e.trim());return n?O.test(n[1]??""):!1}function z(e){return K.test(e.trimEnd())}function j(e,n,o){let r=new Set,l=new Set(n.map(t=>t.def.parentTypeName).filter(t=>t!==null));if(l.size===0)return r;let a=k(e,l),s=new Map;for(let t of o){if(!t.parentTypeName)continue;let c=s.get(t.leaf)??new Set;c.add(t.parentTypeName),s.set(t.leaf,c)}for(let t of n){let c=t.def.parentTypeName;if(!c)continue;let d=a.get(c);if(!d||d.size===0)continue;let f=s.get(t.def.leaf)??new Set;[...d].every(u=>f.has(u))&&r.add(t.def.symbol)}return r}var Y=/\bclass\s+([A-Za-z_$][\w$]*)\s+extends\s+([A-Za-z_$][\w$]*)/g;function k(e,n){let o=new Map;for(let r of g(e,{includeIgnored:!1})){let l=S(e,r);if(l)for(let a of l.matchAll(Y)){let s=a[1],t=a[2];if(!s||!t||!n.has(t))continue;let c=o.get(t)??new Set;c.add(s),o.set(t,c)}}return o}export{et as a};
2
- //# sourceMappingURL=chunk-KJ2IIBZN.js.map
1
+ import{b as A}from"./chunk-6O5TICIZ.js";import{a as _}from"./chunk-MV7OWDUX.js";import{f as R,g as L}from"./chunk-JVYA47YU.js";import{c as E}from"./chunk-UJCOIXDY.js";import{g as x,h as I}from"./chunk-26QA6FAI.js";import{b as D}from"./chunk-B75HZHUP.js";import{a as w}from"./chunk-BGBBVSH4.js";import{d as N}from"./chunk-EKZTZXHZ.js";import{b as T,c as h}from"./chunk-UJPRPGCO.js";import{J as S}from"./chunk-WCCFZ7V7.js";import{a as g}from"./chunk-NGEXCJJW.js";var F={caller:3,"entry-surface":2,rooted:1},O=/not\s*yet\s*implement|not\s*implement|unimplement|\bnyi\b|\btodo\b|\bstub\b|not\s*supported|coming\s*soon/i,P=/^throw\s+new\s+[\w.]*Error\s*\(([\s\S]*)\)\s*;?$/,C=/^return(\s+(null|undefined|false|0|''|""|``|\[\]|\{\}))?\s*;?$/,v=/\/\/\s*TODO\b|\/\*\s*TODO\b/i,K=/(?:=>|\))\s*(?::\s*[^{;=]+)?\s*\{\s*\}\s*;?\s*$/;function et(e,n={}){let{scope:o,limit:r=30,scanLimit:l,semantic:a=!0}=n,s=new E(e),t=D(s.productionCallableDefinitions({scope:o,minLoc:1,requireFunctionLikeSymbol:!0,excludeTypesFiles:!0}),l),c=[];for(let i of t){let m=M(e,i);m&&c.push(m)}if(c.length===0)return[];let d=j(e,c,t),f=c.filter(i=>!d.has(i.def.symbol));if(f.length===0)return[];let p=_(e,s).forDefinitions(f.map(i=>i.def),{semantic:a}),u=[];for(let i of f){let b=p.get(i.def.symbolId)?.realConsumers.length??0,y=B(e,i.def,b);y&&u.push({symbol:i.def.symbol,shortName:N(i.def.symbol),file:i.def.relativePath,startLine:i.def.startLine,endLine:i.def.endLine,loc:w(i.def),stubKind:i.stubKind,reachability:y,callerFanIn:b,stubText:i.stubText})}return u.sort((i,m)=>F[m.reachability]-F[i.reachability]||m.callerFanIn-i.callerFanIn||i.file.localeCompare(m.file)||i.startLine-m.startLine),r?u.slice(0,r):u}function B(e,n,o){return o>0?"caller":I(e,n.symbol,n.relativePath)?"rooted":x(e,n.relativePath)?"entry-surface":null}function M(e,n){let o=R(e,n);if(!o)return null;let r=L(o),l=r.trim();if(l==="")return!z(o)||!A(e,n)?null:{def:n,stubKind:"empty-body",stubText:"(empty body)"};let a=h(r),s=T(r),t=$(a,s);if(t.length!==1)return null;let c=t[0];return U(c)?{def:n,stubKind:"throw-stub",stubText:c.trim()}:v.test(r)&&C.test(c.trim())?{def:n,stubKind:"todo-return-default",stubText:l}:null}function $(e,n){let o=[],r=0,l="";for(let a=0;a<n.length;a+=1){let s=n[a];if(s==="("||s==="["||s==="{"?r+=1:(s===")"||s==="]"||s==="}")&&(r=Math.max(0,r-1)),s===";"&&r===0){o.push(l),l="";continue}l+=e[a]??""}return l.trim()&&o.push(l),o.map(a=>a.trim()).filter(a=>a.length>0)}function U(e){let n=P.exec(e.trim());return n?O.test(n[1]??""):!1}function z(e){return K.test(e.trimEnd())}function j(e,n,o){let r=new Set,l=new Set(n.map(t=>t.def.parentTypeName).filter(t=>t!==null));if(l.size===0)return r;let a=k(e,l),s=new Map;for(let t of o){if(!t.parentTypeName)continue;let c=s.get(t.leaf)??new Set;c.add(t.parentTypeName),s.set(t.leaf,c)}for(let t of n){let c=t.def.parentTypeName;if(!c)continue;let d=a.get(c);if(!d||d.size===0)continue;let f=s.get(t.def.leaf)??new Set;[...d].every(u=>f.has(u))&&r.add(t.def.symbol)}return r}var Y=/\bclass\s+([A-Za-z_$][\w$]*)\s+extends\s+([A-Za-z_$][\w$]*)/g;function k(e,n){let o=new Map;for(let r of g(e,{includeIgnored:!1})){let l=S(e,r);if(l)for(let a of l.matchAll(Y)){let s=a[1],t=a[2];if(!s||!t||!n.has(t))continue;let c=o.get(t)??new Set;c.add(s),o.set(t,c)}}return o}export{et as a};
2
+ //# sourceMappingURL=chunk-2HPVVXM5.js.map
@@ -0,0 +1,2 @@
1
+ import{closeSync as p,fstatSync as g,openSync as l,readFileSync as B,readSync as y}from"fs";import{createHash as P}from"crypto";var h=8*1024*1024,A=64*1024*1024,F=512*1024*1024,L=256*1024*1024,c=class extends Error{constructor(r,o,i,n,a){let s=i==="too-large"?`is ${n} bytes; the safety limit is ${a} bytes`:i==="not-regular"?"is not a regular file":"changed while it was being read";super(`${r} ${JSON.stringify(o)} ${s}`);this.inputKind=r;this.inputPath=o;this.reason=i;this.observedBytes=n;this.limitBytes=a;this.name="BoundedFileReadError"}inputKind;inputPath;reason;observedBytes;limitBytes;code="SCIP_QUERY_BOUNDED_FILE_READ"};function x(e,t){m(t.maxBytes);let r=String(e),o=l(e,"r");try{let i=g(o);R(i,t,r);let n=B(o),a=g(o);if(a.dev!==i.dev||a.ino!==i.ino||a.size!==i.size||n.byteLength!==i.size)throw new c(t.inputKind,r,"changed-during-read",a.size,t.maxBytes);return n}finally{p(o)}}function b(e,t,r="utf8"){return x(e,t).toString(r)}function T(e,t){return b(e,{maxBytes:h,inputKind:t})}function f(e,t){m(t.maxBytes);let r=[],o=Buffer.allocUnsafe(64*1024),i=0;for(;;){let n=y(e,o,0,o.length,null);if(n===0)break;if(i+=n,!Number.isSafeInteger(i)||i>t.maxBytes)throw new c(t.inputKind,`file descriptor ${e}`,"too-large",i,t.maxBytes);r.push(Buffer.from(o.subarray(0,n)))}return Buffer.concat(r,i)}function v(e,t,r="utf8"){return f(e,t).toString(r)}function S(e,t){let r=l(e,"r");try{return f(r,t)}finally{p(r)}}function k(e,t,r="utf8"){return S(e,t).toString(r)}function C(e,t,r){m(t.maxBytes);let o=String(e),i=l(e,"r");try{let n=g(i);R(n,t,o);let a=Buffer.allocUnsafe(Math.min(1024*1024,Math.max(1,n.size))),s=0;for(;s<n.size;){let d=y(i,a,0,Math.min(a.length,n.size-s),s);if(d===0)break;r(a.subarray(0,d)),s+=d}let u=g(i);if(u.dev!==n.dev||u.ino!==n.ino||u.size!==n.size||s!==n.size)throw new c(t.inputKind,o,"changed-during-read",u.size,t.maxBytes);return s}finally{p(i)}}function E(e,t){let r=P("sha256");return C(e,t,o=>r.update(o)),r.digest("hex")}function R(e,t,r){if(!e.isFile())throw new c(t.inputKind,r,"not-regular",Number(e.size),t.maxBytes);if(e.size>t.maxBytes)throw new c(t.inputKind,r,"too-large",Number(e.size),t.maxBytes)}function m(e){if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`maxBytes must be a non-negative safe integer; received ${e}`)}function D(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function W(e){return typeof e=="string"&&Number.isFinite(Date.parse(e))}function z(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0}var K=["typescript","javascript","java","scala","kotlin","rust","python","ruby","go","cpp","c","csharp","vb","dart","php","clojure"],Y=["entry-surface","generated-code","compatibility-shim","reflection-or-registration","test-fixture","intentional-twin","historical-coupling-ended","detector-counterexample"];export{D as a,W as b,z as c,K as d,Y as e,h as f,A as g,F as h,L as i,c as j,x as k,b as l,T as m,v as n,k as o,C as p,E as q};
2
+ //# sourceMappingURL=chunk-2KAZEZ6M.js.map
@@ -0,0 +1,40 @@
1
+ import{b as y}from"./chunk-6O5TICIZ.js";import{b as f}from"./chunk-T7YQSHPQ.js";import{c as h,d as w}from"./chunk-MTDBHTSF.js";import{d as u,e as m,h as b,p,q as g}from"./chunk-EKZTZXHZ.js";import{dirname as $,isAbsolute as k,relative as x,resolve as v}from"path";var C=new Set(w());function R(t,e){return`tests/generated/twin-ab/${d(t)}-vs-${d(e)}.test.ts`}function d(t){return(t.split(/[/#]/).pop()||t).replace(/[^A-Za-z0-9_-]+/g,"-").replace(/^-+|-+$/g,"")||"symbol"}function P(t,e,a,n){let{refA:l,refB:s,outFile:r}=typeof e=="string"?{refA:e,refB:a,outFile:n}:e;if(typeof l!="string"||typeof s!="string"||typeof r!="string")throw new TypeError("twinAb requires refA, refB, and outFile.");if(!k(r))throw new TypeError("twinAb outFile must be an absolute path.");let i=A(t,l);if(!i.ok)return i;let o=A(t,s);if(!o.ok)return o;let c=i.symbol.paramCount===null||o.symbol.paramCount===null?null:i.symbol.paramCount===o.symbol.paramCount,S=N(i.symbol,o.symbol,t.config.projectRoot,r,c);return{ok:!0,a:i.symbol,b:o.symbol,signatureCompatible:c,testSource:S}}function A(t,e){let n=f(t,e).match;if(!n)return{ok:!1,reason:`${e} does not resolve to an indexed symbol.`};let s=t.get("SELECT kind FROM global_symbols WHERE id = ?",n.symbolId)?.kind??null;if(!(s!==null?C.has(s):b(n.symbol)))return{ok:!1,reason:`${e} resolves to ${u(n.symbol)}${s!==null?` with SCIP kind ${h(s)}`:""} \u2014 twin-ab compares call outputs, so both referents must be functions or methods.`};if(!y(t,n))return{ok:!1,reason:`${e} (${u(n.symbol)} at ${n.relativePath}:${n.startLine+1}) is not exported \u2014 twin-ab needs an importable named binding for both twins.`};let i=t.get("SELECT documentation FROM global_symbols WHERE id = ?",n.symbolId),o=p(g(i?.documentation??null));return{ok:!0,symbol:{ref:e,symbol:n.symbol,shortName:m(n.symbol)||u(n.symbol),file:n.relativePath,startLine:n.startLine,signature:o,paramCount:o?E(o):null}}}function E(t){let e=t.indexOf("(");if(e===-1)return null;let a=0,n=-1;for(let i=e;i<t.length;i+=1){let o=t[i];if(o==="(")a+=1;else if(o===")"&&(a-=1,a===0)){n=i;break}}if(n===-1)return null;let l=t.slice(e+1,n).trim();if(!l)return 0;let s=1,r=0;for(let i of l)i==="("||i==="["||i==="{"?r+=1:i===")"||i==="]"||i==="}"?r=Math.max(0,r-1):i===","&&r===0&&(s+=1);return s}function T(t,e,a){let n=$(e),l=v(t,a),r=x(n,l).replace(/\\/g,"/").replace(/\.tsx?$/,".js");return r.startsWith(".")?r:`./${r}`}function N(t,e,a,n,l){let s=T(a,n,t.file),r=T(a,n,e.file),i=l===null?"Signature comparison: unknown (one or both signatures unavailable in the index) \u2014 check by hand.":l?"Signature comparison: param counts match.":"Signature comparison: param counts DIFFER \u2014 twins may not be directly comparable; check by hand.";return`/**
2
+ * Generated by 'scip-query twin-ab'. scip-audit integrity scenario.
3
+ * ("cross-examine same-concept twins"): where one concept is computed in
4
+ * more than one place, feed both the same input and require the same
5
+ * answer. Disagreement between twins means at least one is wrong \u2014
6
+ * determine which before consolidating.
7
+ *
8
+ * Twin A: ${t.shortName} (${t.file}:${t.startLine+1})
9
+ * ${t.signature??"(signature unavailable)"}
10
+ * Twin B: ${e.shortName} (${e.file}:${e.startLine+1})
11
+ * ${e.signature??"(signature unavailable)"}
12
+ * ${i}
13
+ *
14
+ * Fill in the TODO input table below with inputs both twins should agree
15
+ * on, then run this file with vitest.
16
+ */
17
+ import { describe, expect, it } from 'vitest';
18
+ import { ${t.shortName} as twinA } from '${s}';
19
+ import { ${e.shortName} as twinB } from '${r}';
20
+
21
+ // TODO: fill in shared inputs both twins should agree on \u2014 one arg array per call.
22
+ const inputs: any[][] = [
23
+ // [/* arg1, arg2, ... */],
24
+ ];
25
+
26
+ // Cast to a variadic signature so the input table can hold any arg shape \u2014
27
+ // the real twins have fixed, non-rest parameter lists, and TS rejects
28
+ // spreading a generic args array into those (TS2556) even when the array
29
+ // itself is 'any'; casting the callee's signature, not the args, satisfies
30
+ // the checker without weakening the twins' real exported types elsewhere.
31
+ const callA = twinA as (...callArgs: any[]) => any;
32
+ const callB = twinB as (...callArgs: any[]) => any;
33
+
34
+ describe.skipIf(inputs.length === 0)('twin-ab: ${t.shortName} vs ${e.shortName}', () => {
35
+ it.each(inputs)('agrees on input %#', (...args) => {
36
+ expect(callA(...args)).toEqual(callB(...args));
37
+ });
38
+ });
39
+ `}export{R as a,P as b};
40
+ //# sourceMappingURL=chunk-32LVLCLN.js.map
@@ -1,2 +1,2 @@
1
- import{b as i}from"./chunk-WANA4KAQ.js";function l(n,o,s,t={}){let e=i(n,o,s,t);return e?{symbolA:e.symbolA,symbolB:e.symbolB,similarity:e.similarity,sharedCallees:e.sharedEvidence,uniqueToA:e.uniqueToA,uniqueToB:e.uniqueToB,consolidationStrategy:e.consolidationStrategy}:null}export{l as a};
2
- //# sourceMappingURL=chunk-24GTWJ3N.js.map
1
+ import{b as i}from"./chunk-Y2MVPNKY.js";function l(n,o,s,t={}){let e=i(n,o,s,t);return e?{symbolA:e.symbolA,symbolB:e.symbolB,similarity:e.similarity,sharedCallees:e.sharedEvidence,uniqueToA:e.uniqueToA,uniqueToB:e.uniqueToB,consolidationStrategy:e.consolidationStrategy}:null}export{l as a};
2
+ //# sourceMappingURL=chunk-3CLX5EOX.js.map
@@ -1,2 +1,2 @@
1
- import{a as R}from"./chunk-7LSVMFX7.js";import{a as D}from"./chunk-DQBCO2UY.js";import{a as g}from"./chunk-O3O4XXO6.js";import{a as F}from"./chunk-O23I56NA.js";import{a as y}from"./chunk-S4S2WOIX.js";import{e as f}from"./chunk-WANA4KAQ.js";import{j as d}from"./chunk-RA3AYNWP.js";import{I as h}from"./chunk-WUW7YUAH.js";var A=.7,S=.62,C=.45;function J(i,t={}){let{windowCommits:e=100,limit:n=30,scope:a,scanLimit:o}=t,s=y(i,{historyMode:t.historyMode}).fileAddRecords();if(!s)return{available:!1,windowCommits:e,findings:[]};if(n<=0)return{available:!0,windowCommits:e,findings:[]};let r=P(s,e);if(r.size===0)return{available:!0,windowCommits:e,findings:[]};let b=B(i,{limit:n,minSimilarity:t.minSimilarity,scanLimit:o,scope:a,semantic:t.semantic,focusFiles:Number.isFinite(n)?void 0:r}).map(l=>O(l,s,e)).filter(l=>l!==null);b.sort((l,c)=>(l.kind===c.kind?0:l.kind==="echo"?-1:1)||c.similarity-l.similarity||l.echoFile.localeCompare(c.echoFile)||l.echoSymbol.localeCompare(c.echoSymbol)||l.domain.localeCompare(c.domain));let p=b.slice(0,n).map(M);return{available:!0,windowCommits:e,findings:p,rootCauseGroups:N(p)}}function B(i,t){let e=K(t.limit),n=[...k(i,{scope:t.scope,minSimilarity:t.minSimilarity??A,limit:e,scanLimit:t.scanLimit,semantic:t.semantic,focusFiles:t.focusFiles})],a=h(i,{scope:t.scope});return a.react&&n.push(...E(i,{scope:t.scope,minSimilarity:t.minSimilarity??S,limit:e,scanLimit:t.scanLimit,focusFiles:t.focusFiles}),...L(i,{scope:t.scope,minSimilarity:t.minSimilarity??C,limit:e,scanLimit:t.scanLimit,focusFiles:t.focusFiles})),a.vue&&n.push(...x(i,{scope:t.scope,minSimilarity:t.minSimilarity??S,limit:e,scanLimit:t.scanLimit,focusFiles:t.focusFiles}),...T(i,{scope:t.scope,minSimilarity:t.minSimilarity??C,limit:e,scanLimit:t.scanLimit,focusFiles:t.focusFiles})),n}function k(i,t){return f(i,{scope:t.scope,minSimilarity:t.minSimilarity,limit:t.limit,crossFileOnly:!0,scanLimit:t.scanLimit,semantic:t.semantic,focusFiles:t.focusFiles}).filter(e=>!d(e.symbolA)&&!d(e.symbolB)).map(e=>({domain:"callable",basis:e.similarityBasis??"callees",symbolA:e.shortNameA,fileA:e.fileA,symbolB:e.shortNameB,fileB:e.fileB,similarity:e.similarity,sharedEvidence:e.sharedCallees,sharedCallees:e.sharedCallees}))}function E(i,t){return u(i,t,{query:g,domain:"react-component",basis:"jsx-structure",symbolA:e=>e.componentA,symbolB:e=>e.componentB,evidenceBuckets:e=>[["component",e.sharedComponents],["tag",e.sharedNativeTags],["prop",e.sharedProps],["event",e.sharedEvents],["binding",e.sharedBindings]]})}function u(i,t,e){return e.query(i,t).filter(n=>n.fileA!==n.fileB).filter(n=>e.acceptPair?.(n)??!0).map(n=>({domain:e.domain,basis:e.basis,symbolA:e.symbolA(n),fileA:n.fileA,symbolB:e.symbolB(n),fileB:n.fileB,similarity:n.similarity,sharedEvidence:G(...e.evidenceBuckets(n)),sharedCallees:[]}))}function L(i,t){return u(i,t,{query:F,domain:"react-hook",basis:"react-behavior",symbolA:e=>e.componentA,symbolB:e=>e.componentB,acceptPair:w,evidenceBuckets:e=>[["hook",e.sharedHooks],["react-hook",e.sharedReactHooks],["effect",e.sharedEffects],["state",e.sharedState],["request",e.sharedRequests],["handler",e.sharedHandlers],["action",e.sharedHandlerVerbs]]})}var I=new Set(["useCallback","useEffect","useLayoutEffect","useMemo","useMutation","useQueries","useQuery","useQueryClient","useReducer","useRef","useState"]);function w(i){return i.sharedHooks.some(t=>!I.has(t))||i.sharedState.length>0||i.sharedHandlers.length>0||i.sharedHandlerVerbs.length>=2}function x(i,t){return u(i,t,{query:D,domain:"vue-component",basis:"vue-template",symbolA:e=>m(e.fileA),symbolB:e=>m(e.fileB),evidenceBuckets:e=>[["component",e.sharedComponents],["prop",e.sharedProps],["event",e.sharedEvents],["directive",e.sharedDirectives],["slot",e.sharedSlots],["identifier",e.sharedIdentifiers]]})}function T(i,t){return u(i,t,{query:R,domain:"vue-composable",basis:"vue-behavior",symbolA:e=>m(e.fileA),symbolB:e=>m(e.fileB),evidenceBuckets:e=>[["composable",e.sharedComposables],["store",e.sharedStores],["reactivity",e.sharedReactivity],["lifecycle",e.sharedLifecycle],["request",e.sharedRequests],["function",e.sharedFunctions],["action",e.sharedFunctionVerbs],["binding",e.sharedBindings],["template-event",e.sharedTemplateEvents]]})}function P(i,t){let e=new Set;for(let[n,a]of i)a.commitsAgo<=t&&e.add(n);return e}function O(i,t,e){let n=t.get(i.fileA)?.commitsAgo??null,a=t.get(i.fileB)?.commitsAgo??null,o=n!==null&&n<=e,s=a!==null&&a<=e;if(!o&&!s)return null;if(o&&s){let r=(n??0)<=(a??0);return{kind:"twin",domain:i.domain,basis:i.basis,echoSymbol:r?i.symbolA:i.symbolB,echoFile:r?i.fileA:i.fileB,echoAgeCommits:(r?n:a)??0,establishedSymbol:r?i.symbolB:i.symbolA,establishedFile:r?i.fileB:i.fileA,establishedAgeCommits:r?a:n,similarity:i.similarity,sharedEvidence:i.sharedEvidence,sharedCallees:i.sharedCallees}}return{kind:"echo",domain:i.domain,basis:i.basis,echoSymbol:o?i.symbolA:i.symbolB,echoFile:o?i.fileA:i.fileB,echoAgeCommits:(o?n:a)??0,establishedSymbol:o?i.symbolB:i.symbolA,establishedFile:o?i.fileB:i.fileA,establishedAgeCommits:o?a:n,similarity:i.similarity,sharedEvidence:i.sharedEvidence,sharedCallees:i.sharedCallees}}function M(i){let t=v(i);return{...i,rootCauseKey:t,groupKey:`recent-duplicate:${t}`}}function v(i){if(i.kind==="echo")return["echo",i.domain,i.basis,i.establishedSymbol].join(":");let t=i.sharedEvidence.slice().sort().join("|"),e=[i.echoSymbol,i.establishedSymbol].sort().join("|");return["twin",i.domain,i.basis,t||e].join(":")}function N(i){let t=new Map;for(let[e,n]of i.entries()){let a=n.rootCauseKey??v(n),o=n.groupKey??`recent-duplicate:${a}`,s=t.get(o);s||(s={groupKey:o,rootCauseKey:a,kind:n.kind,domain:n.domain,basis:n.basis,count:0,maxSimilarity:n.similarity,findingIndexes:[],echoFiles:new Set,establishedFile:n.kind==="echo"?n.establishedFile:void 0,establishedSymbol:n.kind==="echo"?n.establishedSymbol:void 0,relatedFiles:new Set,sharedEvidence:new Set,recommendation:H(n)},t.set(o,s)),s.count+=1,s.maxSimilarity=Math.max(s.maxSimilarity,n.similarity),s.findingIndexes.push(e),s.echoFiles.add(n.echoFile),s.relatedFiles.add(n.echoFile),s.relatedFiles.add(n.establishedFile);for(let r of n.sharedEvidence)s.sharedEvidence.add(r)}return[...t.values()].map(e=>({...e,echoFiles:[...e.echoFiles].sort(),relatedFiles:[...e.relatedFiles].sort(),sharedEvidence:[...e.sharedEvidence].sort().slice(0,16)})).sort((e,n)=>n.count-e.count||n.maxSimilarity-e.maxSimilarity||e.groupKey.localeCompare(n.groupKey))}function H(i){return i.kind==="echo"?"Review the established side once, then migrate or delete every echo in this group.":"Pick one owner for the new twins and consolidate the group before the copies diverge."}function K(i){return Number.isFinite(i)?i*5:Number.POSITIVE_INFINITY}function G(...i){let t=[],e=new Set;for(let[n,a]of i)for(let o of a){let s=`${n}:${o}`;e.has(s)||(e.add(s),t.push(s))}return t}function m(i){return(i.split("/").pop()??i).replace(/\.[^.]+$/,"")}export{J as a};
2
- //# sourceMappingURL=chunk-QGGLL3UH.js.map
1
+ import{a as R}from"./chunk-WXZLAAWK.js";import{a as D}from"./chunk-B7PBSLZN.js";import{a as g}from"./chunk-O64IZ6UX.js";import{a as F}from"./chunk-BNXCIFVY.js";import{a as y}from"./chunk-RUJURYSV.js";import{e as f}from"./chunk-Y2MVPNKY.js";import{j as d}from"./chunk-EKZTZXHZ.js";import{I as h}from"./chunk-GH74ASD6.js";var A=.7,S=.62,C=.45;function J(i,t={}){let{windowCommits:e=100,limit:n=30,scope:a,scanLimit:o}=t,s=y(i,{historyMode:t.historyMode}).fileAddRecords();if(!s)return{available:!1,windowCommits:e,findings:[]};if(n<=0)return{available:!0,windowCommits:e,findings:[]};let r=P(s,e);if(r.size===0)return{available:!0,windowCommits:e,findings:[]};let b=B(i,{limit:n,minSimilarity:t.minSimilarity,scanLimit:o,scope:a,semantic:t.semantic,focusFiles:Number.isFinite(n)?void 0:r}).map(l=>O(l,s,e)).filter(l=>l!==null);b.sort((l,c)=>(l.kind===c.kind?0:l.kind==="echo"?-1:1)||c.similarity-l.similarity||l.echoFile.localeCompare(c.echoFile)||l.echoSymbol.localeCompare(c.echoSymbol)||l.domain.localeCompare(c.domain));let p=b.slice(0,n).map(M);return{available:!0,windowCommits:e,findings:p,rootCauseGroups:N(p)}}function B(i,t){let e=K(t.limit),n=[...k(i,{scope:t.scope,minSimilarity:t.minSimilarity??A,limit:e,scanLimit:t.scanLimit,semantic:t.semantic,focusFiles:t.focusFiles})],a=h(i,{scope:t.scope});return a.react&&n.push(...E(i,{scope:t.scope,minSimilarity:t.minSimilarity??S,limit:e,scanLimit:t.scanLimit,focusFiles:t.focusFiles}),...L(i,{scope:t.scope,minSimilarity:t.minSimilarity??C,limit:e,scanLimit:t.scanLimit,focusFiles:t.focusFiles})),a.vue&&n.push(...x(i,{scope:t.scope,minSimilarity:t.minSimilarity??S,limit:e,scanLimit:t.scanLimit,focusFiles:t.focusFiles}),...T(i,{scope:t.scope,minSimilarity:t.minSimilarity??C,limit:e,scanLimit:t.scanLimit,focusFiles:t.focusFiles})),n}function k(i,t){return f(i,{scope:t.scope,minSimilarity:t.minSimilarity,limit:t.limit,crossFileOnly:!0,scanLimit:t.scanLimit,semantic:t.semantic,focusFiles:t.focusFiles}).filter(e=>!d(e.symbolA)&&!d(e.symbolB)).map(e=>({domain:"callable",basis:e.similarityBasis??"callees",symbolA:e.shortNameA,fileA:e.fileA,symbolB:e.shortNameB,fileB:e.fileB,similarity:e.similarity,sharedEvidence:e.sharedCallees,sharedCallees:e.sharedCallees}))}function E(i,t){return u(i,t,{query:g,domain:"react-component",basis:"jsx-structure",symbolA:e=>e.componentA,symbolB:e=>e.componentB,evidenceBuckets:e=>[["component",e.sharedComponents],["tag",e.sharedNativeTags],["prop",e.sharedProps],["event",e.sharedEvents],["binding",e.sharedBindings]]})}function u(i,t,e){return e.query(i,t).filter(n=>n.fileA!==n.fileB).filter(n=>e.acceptPair?.(n)??!0).map(n=>({domain:e.domain,basis:e.basis,symbolA:e.symbolA(n),fileA:n.fileA,symbolB:e.symbolB(n),fileB:n.fileB,similarity:n.similarity,sharedEvidence:G(...e.evidenceBuckets(n)),sharedCallees:[]}))}function L(i,t){return u(i,t,{query:F,domain:"react-hook",basis:"react-behavior",symbolA:e=>e.componentA,symbolB:e=>e.componentB,acceptPair:w,evidenceBuckets:e=>[["hook",e.sharedHooks],["react-hook",e.sharedReactHooks],["effect",e.sharedEffects],["state",e.sharedState],["request",e.sharedRequests],["handler",e.sharedHandlers],["action",e.sharedHandlerVerbs]]})}var I=new Set(["useCallback","useEffect","useLayoutEffect","useMemo","useMutation","useQueries","useQuery","useQueryClient","useReducer","useRef","useState"]);function w(i){return i.sharedHooks.some(t=>!I.has(t))||i.sharedState.length>0||i.sharedHandlers.length>0||i.sharedHandlerVerbs.length>=2}function x(i,t){return u(i,t,{query:D,domain:"vue-component",basis:"vue-template",symbolA:e=>m(e.fileA),symbolB:e=>m(e.fileB),evidenceBuckets:e=>[["component",e.sharedComponents],["prop",e.sharedProps],["event",e.sharedEvents],["directive",e.sharedDirectives],["slot",e.sharedSlots],["identifier",e.sharedIdentifiers]]})}function T(i,t){return u(i,t,{query:R,domain:"vue-composable",basis:"vue-behavior",symbolA:e=>m(e.fileA),symbolB:e=>m(e.fileB),evidenceBuckets:e=>[["composable",e.sharedComposables],["store",e.sharedStores],["reactivity",e.sharedReactivity],["lifecycle",e.sharedLifecycle],["request",e.sharedRequests],["function",e.sharedFunctions],["action",e.sharedFunctionVerbs],["binding",e.sharedBindings],["template-event",e.sharedTemplateEvents]]})}function P(i,t){let e=new Set;for(let[n,a]of i)a.commitsAgo<=t&&e.add(n);return e}function O(i,t,e){let n=t.get(i.fileA)?.commitsAgo??null,a=t.get(i.fileB)?.commitsAgo??null,o=n!==null&&n<=e,s=a!==null&&a<=e;if(!o&&!s)return null;if(o&&s){let r=(n??0)<=(a??0);return{kind:"twin",domain:i.domain,basis:i.basis,echoSymbol:r?i.symbolA:i.symbolB,echoFile:r?i.fileA:i.fileB,echoAgeCommits:(r?n:a)??0,establishedSymbol:r?i.symbolB:i.symbolA,establishedFile:r?i.fileB:i.fileA,establishedAgeCommits:r?a:n,similarity:i.similarity,sharedEvidence:i.sharedEvidence,sharedCallees:i.sharedCallees}}return{kind:"echo",domain:i.domain,basis:i.basis,echoSymbol:o?i.symbolA:i.symbolB,echoFile:o?i.fileA:i.fileB,echoAgeCommits:(o?n:a)??0,establishedSymbol:o?i.symbolB:i.symbolA,establishedFile:o?i.fileB:i.fileA,establishedAgeCommits:o?a:n,similarity:i.similarity,sharedEvidence:i.sharedEvidence,sharedCallees:i.sharedCallees}}function M(i){let t=v(i);return{...i,rootCauseKey:t,groupKey:`recent-duplicate:${t}`}}function v(i){if(i.kind==="echo")return["echo",i.domain,i.basis,i.establishedSymbol].join(":");let t=i.sharedEvidence.slice().sort().join("|"),e=[i.echoSymbol,i.establishedSymbol].sort().join("|");return["twin",i.domain,i.basis,t||e].join(":")}function N(i){let t=new Map;for(let[e,n]of i.entries()){let a=n.rootCauseKey??v(n),o=n.groupKey??`recent-duplicate:${a}`,s=t.get(o);s||(s={groupKey:o,rootCauseKey:a,kind:n.kind,domain:n.domain,basis:n.basis,count:0,maxSimilarity:n.similarity,findingIndexes:[],echoFiles:new Set,establishedFile:n.kind==="echo"?n.establishedFile:void 0,establishedSymbol:n.kind==="echo"?n.establishedSymbol:void 0,relatedFiles:new Set,sharedEvidence:new Set,recommendation:H(n)},t.set(o,s)),s.count+=1,s.maxSimilarity=Math.max(s.maxSimilarity,n.similarity),s.findingIndexes.push(e),s.echoFiles.add(n.echoFile),s.relatedFiles.add(n.echoFile),s.relatedFiles.add(n.establishedFile);for(let r of n.sharedEvidence)s.sharedEvidence.add(r)}return[...t.values()].map(e=>({...e,echoFiles:[...e.echoFiles].sort(),relatedFiles:[...e.relatedFiles].sort(),sharedEvidence:[...e.sharedEvidence].sort().slice(0,16)})).sort((e,n)=>n.count-e.count||n.maxSimilarity-e.maxSimilarity||e.groupKey.localeCompare(n.groupKey))}function H(i){return i.kind==="echo"?"Review the established side once, then migrate or delete every echo in this group.":"Pick one owner for the new twins and consolidate the group before the copies diverge."}function K(i){return Number.isFinite(i)?i*5:Number.POSITIVE_INFINITY}function G(...i){let t=[],e=new Set;for(let[n,a]of i)for(let o of a){let s=`${n}:${o}`;e.has(s)||(e.add(s),t.push(s))}return t}function m(i){return(i.split("/").pop()??i).replace(/\.[^.]+$/,"")}export{J as a};
2
+ //# sourceMappingURL=chunk-3G66UZBH.js.map
@@ -1,2 +1,2 @@
1
- import{c}from"./chunk-B75HZHUP.js";import{a,b as n}from"./chunk-KXDJAG4N.js";import{n as t}from"./chunk-GLZTVKAB.js";import{a as m}from"./chunk-SMQWE25B.js";import{d as o,h as r}from"./chunk-RA3AYNWP.js";function N(s,y,b={}){let l=m(s,y);if(!l)return null;let i=b.semantic!==!1,f=n(s,l,{semantic:i,semanticEvidence:t}).filter(e=>r(e.symbol)).slice(0,50),p=c(a(s,l,{limit:50,additive:!0,callableOnly:!0,semantic:i,semanticEvidence:t}));return{symbol:l.symbol,shortName:o(l.symbol),callers:f.map(e=>({symbol:e.symbol,shortName:o(e.symbol),file:e.file})),callees:p.map(e=>({symbol:e.symbol,shortName:o(e.symbol),file:e.file}))}}export{N as a};
2
- //# sourceMappingURL=chunk-AA4UWRNL.js.map
1
+ import{c}from"./chunk-B75HZHUP.js";import{a,b as n}from"./chunk-Z4N3MZYA.js";import{o as t}from"./chunk-7O5IKBTZ.js";import{a as m}from"./chunk-T7YQSHPQ.js";import{d as o,h as r}from"./chunk-EKZTZXHZ.js";function N(s,y,b={}){let l=m(s,y);if(!l)return null;let i=b.semantic!==!1,f=n(s,l,{semantic:i,semanticEvidence:t}).filter(e=>r(e.symbol)).slice(0,50),p=c(a(s,l,{limit:50,additive:!0,callableOnly:!0,semantic:i,semanticEvidence:t}));return{symbol:l.symbol,shortName:o(l.symbol),callers:f.map(e=>({symbol:e.symbol,shortName:o(e.symbol),file:e.file})),callees:p.map(e=>({symbol:e.symbol,shortName:o(e.symbol),file:e.file}))}}export{N as a};
2
+ //# sourceMappingURL=chunk-3ORVDL3H.js.map
@@ -0,0 +1,6 @@
1
+ import{a as d}from"./chunk-S7OYBOCK.js";import{a as f}from"./chunk-T7YQSHPQ.js";import{d as m}from"./chunk-EKZTZXHZ.js";import{E as u,F as g}from"./chunk-WCCFZ7V7.js";import{extname as y}from"path";function M(t,e,r={}){let{context:n=0}=r,a=R(e);if(a)return x(t,a.filePath,a.startLine,a.endLine,n);let i=f(t,e);return i?L(t,i,n):null}function R(t){let e=t.match(/^(.+\.\w+):(\d+)-(\d+)$/);if(!e)return null;let r=Number(e[2]),n=Number(e[3]);if(!Number.isSafeInteger(r)||r<1)throw new RangeError(`Source range start line must be a positive integer, got "${e[2]}".`);if(!Number.isSafeInteger(n)||n<r)throw new RangeError(`Source range end line must be an integer at or after ${r}, got "${e[3]}".`);return{filePath:e[1],startLine:r,endLine:n}}function L(t,e,r){let n=t.get("SELECT language FROM documents WHERE relative_path = ?",e.relativePath),a;try{a=u(t.config.projectRoot,e.relativePath,{inputKind:"indexed source file"})}catch(l){if(!g(l))throw l;return null}let i=a.split(`
2
+ `),s=Math.max(0,e.startLine-r),o=Math.min(i.length-1,e.endLine+r),c=i.slice(s,o+1).join(`
3
+ `);return{symbol:e.symbol,shortName:m(e.symbol),relativePath:e.relativePath,startLine:s,endLine:o,language:n?.language??b(e.relativePath),source:c}}function x(t,e,r,n,a){let i=d(t,e);if(!i)return null;let s=t.get("SELECT relative_path, language FROM documents WHERE relative_path = ?",i);if(!s)return null;let o;try{o=u(t.config.projectRoot,s.relative_path,{inputKind:"indexed source file"})}catch(h){if(!g(h))throw h;return null}let c=o.split(`
4
+ `),l=Math.max(0,r-1-a),p=Math.min(c.length-1,n-1+a),v=c.slice(l,p+1).join(`
5
+ `);return{symbol:`${s.relative_path}:${r}-${n}`,shortName:`${s.relative_path}:${r}-${n}`,relativePath:s.relative_path,startLine:l,endLine:p,language:s.language??b(s.relative_path),source:v}}function b(t){switch(y(t).toLowerCase()){case".ts":case".tsx":case".mts":case".cts":return"typescript";case".js":case".jsx":case".mjs":case".cjs":return"javascript";case".py":case".pyi":return"python";case".rs":return"rust";case".go":return"go";case".java":return"java";case".kt":case".kts":return"kotlin";case".scala":return"scala";case".rb":return"ruby";case".php":return"php";case".cs":return"csharp";case".vb":return"vb";case".dart":return"dart";case".c":case".h":return"c";case".cc":case".cpp":case".cxx":case".hpp":case".hh":case".hxx":return"cpp";case".vue":return"vue";default:return null}}export{M as a};
6
+ //# sourceMappingURL=chunk-4MAK2HOY.js.map