scip-query 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +72 -0
- package/dist/augment-vue-worker.js +1 -1
- package/dist/by-kind-4IYG2SKW.js +2 -0
- package/dist/call-graph-WQNXMNNN.js +2 -0
- package/dist/{chunk-AQDWTCDC.js → chunk-25GWKRUZ.js} +2 -2
- package/dist/chunk-2BTJALUS.js +454 -0
- package/dist/chunk-2KVU55CW.js +11 -0
- package/dist/{chunk-BBWPOMGU.js → chunk-2OXVP5U5.js} +2 -2
- package/dist/{chunk-D5W4UZY5.js → chunk-2RE5OCHZ.js} +2 -2
- package/dist/{chunk-2I3RSUWX.js → chunk-2XCGSDIT.js} +2 -2
- package/dist/{chunk-V7LQZTTZ.js → chunk-2YC7YNKT.js} +2 -2
- package/dist/chunk-3QXC54FQ.js +3 -0
- package/dist/{chunk-32A42O5B.js → chunk-3TJY6M3B.js} +2 -2
- package/dist/chunk-42W3LFUK.js +13 -0
- package/dist/chunk-44T4DUAA.js +2 -0
- package/dist/chunk-4GAQ6FI4.js +43 -0
- package/dist/{chunk-4S4DF62J.js → chunk-4HE7MVWD.js} +2 -2
- package/dist/{chunk-TGWNNMPF.js → chunk-4TQU4TX2.js} +2 -2
- package/dist/{chunk-SKUMCCC5.js → chunk-56NQAEPJ.js} +2 -2
- package/dist/chunk-57N6LN2A.js +3 -0
- package/dist/{chunk-LPGDO2XA.js → chunk-5H5WTJSD.js} +2 -2
- package/dist/{chunk-EA4SH4U5.js → chunk-5YRQIE2B.js} +2 -2
- package/dist/{chunk-O2RM7E7L.js → chunk-5ZMBRQFC.js} +4 -4
- package/dist/{chunk-ICHBVITH.js → chunk-6HRZQLOI.js} +2 -2
- package/dist/{chunk-WULAPQUD.js → chunk-6NC3YSPY.js} +2 -2
- package/dist/{chunk-IDPLC3FI.js → chunk-6VEFRPTD.js} +2 -2
- package/dist/{chunk-IOKWFRFQ.js → chunk-7C26EKLZ.js} +2 -2
- package/dist/{chunk-S3RTPPLQ.js → chunk-7IQXARSQ.js} +2 -2
- package/dist/chunk-7JYHQAH2.js +22 -0
- package/dist/chunk-7KSO2OAP.js +2 -0
- package/dist/{chunk-2ZBMOQGG.js → chunk-7U2YQSDE.js} +2 -2
- package/dist/{chunk-EKZRF57O.js → chunk-7XA3OM44.js} +2 -2
- package/dist/{chunk-4EXFZP6H.js → chunk-7XZGZBSQ.js} +2 -2
- package/dist/chunk-7YQOCABQ.js +2 -0
- package/dist/chunk-A77SCPW2.js +3 -0
- package/dist/chunk-AK3PYTIK.js +5 -0
- package/dist/chunk-AMIMMNA4.js +11 -0
- package/dist/{chunk-MOBF2GH6.js → chunk-AQ2PORIO.js} +2 -2
- package/dist/{chunk-YUFWLWIC.js → chunk-ARVO6TTW.js} +2 -2
- package/dist/chunk-AUY5BL74.js +2 -0
- package/dist/{chunk-RGCJ4646.js → chunk-AYPDH2LU.js} +2 -2
- package/dist/{chunk-73Z33VFI.js → chunk-AZS7YPCB.js} +2 -2
- package/dist/{chunk-SYUNTKO2.js → chunk-BDGTPN27.js} +2 -2
- package/dist/{chunk-BATIVRU2.js → chunk-BDHFVH2M.js} +2 -2
- package/dist/chunk-BECZLYNU.js +8 -0
- package/dist/chunk-BJT7LSPK.js +3 -0
- package/dist/{chunk-6SWA6B24.js → chunk-BTVKZGWT.js} +2 -2
- package/dist/{chunk-QD7IFBCR.js → chunk-BUTEIZKP.js} +2 -2
- package/dist/{chunk-UZFCZ7SJ.js → chunk-BVFYEEBH.js} +2 -2
- package/dist/{chunk-ICUQONOG.js → chunk-BWVQP3LB.js} +2 -2
- package/dist/chunk-BYDAFMSR.js +57 -0
- package/dist/{chunk-BHE44MHT.js → chunk-C76O5MDS.js} +2 -2
- package/dist/chunk-C7IJMOFP.js +134 -0
- package/dist/{chunk-CN2WGM7D.js → chunk-CBBHFNLX.js} +2 -2
- package/dist/{chunk-COTMS5KM.js → chunk-CKRWA452.js} +2 -2
- package/dist/{chunk-ANWGXPPN.js → chunk-CLG6DWVS.js} +2 -2
- package/dist/chunk-D2MVJSP4.js +21 -0
- package/dist/chunk-D35XIZGN.js +2 -0
- package/dist/{chunk-U7DR7MJD.js → chunk-DEAB5TGT.js} +2 -2
- package/dist/{chunk-6GJAP4OE.js → chunk-DJAO2OZJ.js} +2 -2
- package/dist/chunk-DKM723YF.js +79 -0
- package/dist/{chunk-4IIMPWMR.js → chunk-DPWKKNKI.js} +2 -2
- package/dist/chunk-E44IVWIJ.js +367 -0
- package/dist/chunk-EDMB6SSO.js +7 -0
- package/dist/{chunk-KWARB5FZ.js → chunk-EELG7D3Q.js} +2 -2
- package/dist/chunk-EELPBR7E.js +3 -0
- package/dist/chunk-EETGXQY7.js +3 -0
- package/dist/chunk-ENWQWA2R.js +2 -0
- package/dist/{chunk-HUZNZ3H2.js → chunk-ERCYGVAM.js} +2 -2
- package/dist/{chunk-WSG3DK5H.js → chunk-EWWY2ZFL.js} +2 -2
- package/dist/chunk-F24G5NBE.js +3 -0
- package/dist/{chunk-XRXCANFQ.js → chunk-F24QUEQP.js} +2 -2
- package/dist/{chunk-KFK7GF5C.js → chunk-FBCVASUG.js} +2 -2
- package/dist/{chunk-35IW3P4H.js → chunk-FELGD32K.js} +2 -2
- package/dist/{chunk-UNORWZIJ.js → chunk-FFJQZG6J.js} +5 -5
- package/dist/{chunk-5SE323LF.js → chunk-FGNCOQUX.js} +2 -2
- package/dist/chunk-FKGQOTKD.js +2 -0
- package/dist/chunk-GDRJB3SB.js +3 -0
- package/dist/chunk-GH5YSGZL.js +5 -0
- package/dist/{chunk-X7PJJYKX.js → chunk-GIQ6CSL4.js} +2 -2
- package/dist/{chunk-2RP27XLR.js → chunk-GPGRZJ3R.js} +2 -2
- package/dist/{chunk-IYV2YBHM.js → chunk-GQIDEID3.js} +2 -2
- package/dist/chunk-GRX7JOXQ.js +2 -0
- package/dist/{chunk-H46QMB7E.js → chunk-GVOMSPGL.js} +2 -2
- package/dist/{chunk-KTRGJLY7.js → chunk-GY7CCCEZ.js} +2 -2
- package/dist/{chunk-VNKYRJKN.js → chunk-H7CG6LOE.js} +2 -2
- package/dist/chunk-HCVJR2V4.js +3 -0
- package/dist/chunk-HG722PO7.js +3 -0
- package/dist/{chunk-LHTT5C3Z.js → chunk-HISEUIL2.js} +2 -2
- package/dist/{chunk-K5MZYZV7.js → chunk-HXOU4XNH.js} +2 -2
- package/dist/chunk-I6UTXNHU.js +6 -0
- package/dist/{chunk-I7PFL5P3.js → chunk-IJMD6BRI.js} +2 -2
- package/dist/{chunk-XXJ7WL3F.js → chunk-IKVNEGTW.js} +2 -2
- package/dist/chunk-IMKZEXZG.js +2 -0
- package/dist/chunk-ISIQLPJ2.js +61 -0
- package/dist/{chunk-DEUGHURX.js → chunk-ISWFRGJ6.js} +2 -2
- package/dist/chunk-IW5XQG5G.js +2 -0
- package/dist/chunk-IXESDH3J.js +2 -0
- package/dist/{chunk-FGB567HK.js → chunk-JAT6C3VX.js} +2 -2
- package/dist/{chunk-7TWP3MCP.js → chunk-JFQBRL3J.js} +2 -2
- package/dist/{chunk-Q7HB7BFJ.js → chunk-JHH5SCZ3.js} +2 -2
- package/dist/{chunk-ZHSARYVS.js → chunk-JJ62MTQH.js} +2 -2
- package/dist/chunk-JT6XX7QY.js +8 -0
- package/dist/{chunk-5H7IWVXJ.js → chunk-JUN5DOAK.js} +2 -2
- package/dist/{chunk-DOPCR5BY.js → chunk-K3XFWJI2.js} +2 -2
- package/dist/{chunk-Y4XQ7LES.js → chunk-KFOYCQAJ.js} +1 -1
- package/dist/{chunk-N5C65OFK.js → chunk-KFVSJX25.js} +2 -2
- package/dist/chunk-KK7GPALL.js +28 -0
- package/dist/{chunk-DHKBIOXF.js → chunk-KQHJEU6V.js} +2 -2
- package/dist/{chunk-WB6LGCFB.js → chunk-KZYID5KV.js} +2 -2
- package/dist/{chunk-KW6B5OL4.js → chunk-LO5JSW2C.js} +2 -2
- package/dist/{chunk-ZW44MCJM.js → chunk-LRI5OMPE.js} +2 -2
- package/dist/{chunk-HG5YI7PV.js → chunk-LXQUF2RP.js} +2 -2
- package/dist/{chunk-TM5XEDDR.js → chunk-MHIEP7EG.js} +2 -2
- package/dist/{chunk-FHV7NMFU.js → chunk-MSR2QRUE.js} +2 -2
- package/dist/chunk-N7FP5H5U.js +57 -0
- package/dist/{chunk-3653GTR7.js → chunk-NEIQPFBI.js} +2 -2
- package/dist/chunk-NK3JMP22.js +2 -0
- package/dist/{chunk-7IOAZRVL.js → chunk-NRBNAECH.js} +2 -2
- package/dist/{chunk-HGKEAP7F.js → chunk-NVSZNESQ.js} +2 -2
- package/dist/{chunk-R2MOKIVO.js → chunk-OJNK5ALA.js} +2 -2
- package/dist/{chunk-RFWAUHVW.js → chunk-OPSAW5DT.js} +2 -2
- package/dist/chunk-OTSPRVNW.js +2 -0
- package/dist/chunk-OXYAWIEA.js +2 -0
- package/dist/chunk-OZETODHH.js +2 -0
- package/dist/chunk-PBUH2P5S.js +3 -0
- package/dist/{chunk-QBANU5BQ.js → chunk-PIFTZEEM.js} +2 -2
- package/dist/{chunk-CKDOY6JA.js → chunk-PLJUQFQN.js} +2 -2
- package/dist/{chunk-JVZNWJBH.js → chunk-PLYUVM4F.js} +2 -2
- package/dist/chunk-PXXYQK55.js +2 -0
- package/dist/{chunk-WZQFY5S7.js → chunk-Q55NF3ZG.js} +2 -2
- package/dist/{chunk-OVPS2ILI.js → chunk-Q5TA4OY4.js} +2 -2
- package/dist/{chunk-OUB4J26T.js → chunk-Q6T2CAJL.js} +2 -2
- package/dist/chunk-Q7GBK5T7.js +81 -0
- package/dist/chunk-QKT4UI2Y.js +2 -0
- package/dist/{chunk-PIZY2GX6.js → chunk-QLBSG7U5.js} +2 -2
- package/dist/chunk-QWKHW6VZ.js +2 -0
- package/dist/{chunk-E7BJXRNV.js → chunk-R6M456QG.js} +2 -2
- package/dist/{chunk-MJNV7OCG.js → chunk-RDULNRSJ.js} +2 -2
- package/dist/{chunk-SSSJO4RG.js → chunk-RHHCLWQ6.js} +2 -2
- package/dist/chunk-RNKPYYYE.js +4 -0
- package/dist/{chunk-IXJ26KJJ.js → chunk-RPL3ARU7.js} +2 -2
- package/dist/{chunk-3EX7DNBC.js → chunk-RYOYJMGF.js} +2 -2
- package/dist/chunk-SB25YMEQ.js +2 -0
- package/dist/chunk-SV2LEFVM.js +2 -0
- package/dist/{chunk-ZBNL3QCY.js → chunk-SVHTMVA4.js} +3 -3
- package/dist/{chunk-6IEVHGWG.js → chunk-SWK4XPUS.js} +2 -2
- package/dist/chunk-T6QD2ZQB.js +43 -0
- package/dist/{chunk-VETXXOYU.js → chunk-TAYD3AE7.js} +2 -2
- package/dist/chunk-TD7VKJ2Y.js +117 -0
- package/dist/{chunk-UQ7XPRWU.js → chunk-TH6IC56G.js} +2 -2
- package/dist/{chunk-XVDMJMES.js → chunk-TKDNDQA7.js} +2 -2
- package/dist/{chunk-CSDDOUA4.js → chunk-TNG2FYS5.js} +2 -2
- package/dist/chunk-TQZV7KV4.js +2 -0
- package/dist/{chunk-AJVMVE7X.js → chunk-TUQIPUDS.js} +2 -2
- package/dist/chunk-TUSPIVZ3.js +4 -0
- package/dist/{chunk-ORBKAUCH.js → chunk-U2N2KE7A.js} +2 -2
- package/dist/{chunk-3PII3JI5.js → chunk-UAQ4T73O.js} +2 -2
- package/dist/{chunk-OFY4HTMI.js → chunk-UDY7MIAW.js} +2 -2
- package/dist/{chunk-WKPZCQLI.js → chunk-URSGGIZX.js} +2 -2
- package/dist/{chunk-UL4VJUMD.js → chunk-UT7TADJX.js} +2 -2
- package/dist/chunk-V4NG5OMS.js +554 -0
- package/dist/{chunk-2H4IAJHO.js → chunk-VMWUV6WB.js} +2 -2
- package/dist/{chunk-46JLFIGA.js → chunk-VTCIYFEK.js} +2 -2
- package/dist/chunk-VU6LIWHT.js +2 -0
- package/dist/chunk-VUSKPCUB.js +2 -0
- package/dist/{chunk-URMZLV2N.js → chunk-VXJJTQYE.js} +2 -2
- package/dist/{chunk-IPAL6DP2.js → chunk-VZ7NXSHV.js} +2 -2
- package/dist/{chunk-FUG6RPYY.js → chunk-WHADK6OS.js} +2 -2
- package/dist/chunk-WN3TCGJ4.js +2 -0
- package/dist/{chunk-B7ECWJAZ.js → chunk-WOOAY3PA.js} +2 -2
- package/dist/chunk-WRQXLNYE.js +9 -0
- package/dist/chunk-WSLEJSFR.js +2 -0
- package/dist/chunk-WYZIHUPZ.js +16 -0
- package/dist/{chunk-ZYREOING.js → chunk-XE33FV5W.js} +2 -2
- package/dist/chunk-XFMVKFSF.js +2 -0
- package/dist/{chunk-BBEDPVPB.js → chunk-XGGBK66W.js} +2 -2
- package/dist/{chunk-OFUBXBYX.js → chunk-XJX6LGHL.js} +2 -2
- package/dist/{chunk-Z3GCK3PD.js → chunk-XN22RGSR.js} +2 -2
- package/dist/{chunk-HWLCBKFE.js → chunk-XSWYJCAK.js} +2 -2
- package/dist/{chunk-IGKKTHJR.js → chunk-XU75YQN4.js} +2 -2
- package/dist/{chunk-E4EJBGDZ.js → chunk-Y2VM4CJC.js} +2 -2
- package/dist/{chunk-U7LRSQG6.js → chunk-Y334QQU5.js} +2 -2
- package/dist/{chunk-APLKXICZ.js → chunk-YAGYMBEX.js} +2 -2
- package/dist/{chunk-XITQLISP.js → chunk-YIHNPKWD.js} +2 -2
- package/dist/chunk-YXPUP5G2.js +11 -0
- package/dist/{chunk-6BJ7SOY7.js → chunk-Z2AWCTN6.js} +2 -2
- package/dist/{chunk-PHSPBQM6.js → chunk-Z2PZVKPR.js} +2 -2
- package/dist/{chunk-QXR5QPSF.js → chunk-ZAZGGSM3.js} +2 -2
- package/dist/{chunk-5236NQV3.js → chunk-ZGW4HLPD.js} +2 -2
- package/dist/chunk-ZOXKSQQB.js +2 -0
- package/dist/{chunk-BD6CV7PN.js → chunk-ZPASRBLF.js} +2 -2
- package/dist/{chunk-DMUGTKMD.js → chunk-ZYM4HOFA.js} +2 -2
- package/dist/{chunk-4ILHWBYF.js → chunk-ZZ3Z7D56.js} +2 -2
- package/dist/cli-main.js +4 -4
- package/dist/{code-CczEvHui.d.ts → code-B17qEMbt.d.ts} +1 -1
- package/dist/code-EQJFDT6I.js +2 -0
- package/dist/code-result-json-7UWIWBOO.js +2 -0
- package/dist/command-descriptors-ORNTVNYV.js +342 -0
- package/dist/{config-types-Cm-VSEBb.d.ts → config-types-B9B60MiR.d.ts} +10 -0
- package/dist/dataflow-6VL54GX5.js +2 -0
- package/dist/{db-LKJXAlNS.d.ts → db-BwIVAYNB.d.ts} +1 -1
- package/dist/dependence-slice-DT2NUHD2.js +2 -0
- package/dist/deps-DB7H5IKC.js +2 -0
- package/dist/direct-navigation-O3LUAYWQ.js +3 -0
- package/dist/entry-map-6K62RV3D.js +2 -0
- package/dist/files-MSLD7MO6.js +2 -0
- package/dist/{graph-evidence-CbUPCSKV.d.ts → graph-evidence-Bjyky2V4.d.ts} +1 -1
- package/dist/{health-Wl5G_LRt.d.ts → health-CPp2Jf1Z.d.ts} +1 -1
- package/dist/hierarchy-IVBXAKFA.js +2 -0
- package/dist/imports-FRAVZ3Y2.js +2 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/members-KJOJDYGO.js +2 -0
- package/dist/methods-2AYABBT3.js +2 -0
- package/dist/output-continuation-command-JHMPH6NC.js +3 -0
- package/dist/{output-pagination-VAWOGX4R.js → output-pagination-3OFL2MJV.js} +2 -2
- package/dist/project-reindex-HYO4WD7Z.js +3 -0
- package/dist/queries/affected.d.ts +2 -2
- package/dist/queries/affected.js +1 -1
- package/dist/queries/anchors.d.ts +2 -2
- package/dist/queries/anchors.js +1 -1
- package/dist/queries/architecture.d.ts +2 -2
- package/dist/queries/architecture.js +1 -1
- package/dist/queries/bottlenecks.d.ts +2 -2
- package/dist/queries/bottlenecks.js +1 -1
- package/dist/queries/by-kind.d.ts +2 -2
- package/dist/queries/by-kind.js +1 -1
- package/dist/queries/call-graph.d.ts +2 -2
- package/dist/queries/call-graph.js +1 -1
- package/dist/queries/change-surface.d.ts +2 -2
- package/dist/queries/change-surface.js +1 -1
- package/dist/queries/cleanup-plan.d.ts +2 -2
- package/dist/queries/cleanup-plan.js +1 -1
- package/dist/queries/co-change.d.ts +2 -2
- package/dist/queries/co-change.js +1 -1
- package/dist/queries/code.d.ts +3 -3
- package/dist/queries/code.js +1 -1
- package/dist/queries/complexity-hotspots.d.ts +2 -2
- package/dist/queries/complexity-hotspots.js +1 -1
- package/dist/queries/complexity.d.ts +13 -2
- package/dist/queries/complexity.js +1 -1
- package/dist/queries/context.d.ts +2 -2
- package/dist/queries/context.js +1 -1
- package/dist/queries/convergence.d.ts +2 -2
- package/dist/queries/convergence.js +1 -1
- package/dist/queries/coupling.d.ts +2 -2
- package/dist/queries/coupling.js +1 -1
- package/dist/queries/cycles.d.ts +2 -2
- package/dist/queries/cycles.js +1 -1
- package/dist/queries/dataflow.d.ts +2 -2
- package/dist/queries/dataflow.js +1 -1
- package/dist/queries/dead.d.ts +2 -2
- package/dist/queries/dead.js +1 -1
- package/dist/queries/decorative-checkers.d.ts +2 -2
- package/dist/queries/decorative-checkers.js +1 -1
- package/dist/queries/deep-chains.d.ts +2 -2
- package/dist/queries/deep-chains.js +1 -1
- package/dist/queries/dependence-slice.d.ts +3 -3
- package/dist/queries/dependence-slice.js +1 -1
- package/dist/queries/dependency-depth.d.ts +2 -2
- package/dist/queries/dependency-depth.js +1 -1
- package/dist/queries/deps.d.ts +2 -2
- package/dist/queries/deps.js +1 -1
- package/dist/queries/diff-impact.d.ts +2 -2
- package/dist/queries/diff-impact.js +1 -1
- package/dist/queries/doc-drift.d.ts +2 -2
- package/dist/queries/doc-drift.js +1 -1
- package/dist/queries/drift.d.ts +2 -2
- package/dist/queries/drift.js +1 -1
- package/dist/queries/duplicate-bodies.d.ts +2 -2
- package/dist/queries/duplicate-bodies.js +1 -1
- package/dist/queries/entry-map.d.ts +2 -2
- package/dist/queries/entry-map.js +1 -1
- package/dist/queries/evidence.d.ts +3 -3
- package/dist/queries/evidence.js +1 -1
- package/dist/queries/extract-candidates.d.ts +2 -2
- package/dist/queries/extract-candidates.js +1 -1
- package/dist/queries/fan.d.ts +2 -2
- package/dist/queries/fan.js +1 -1
- package/dist/queries/files.d.ts +2 -2
- package/dist/queries/files.js +1 -1
- package/dist/queries/health.d.ts +3 -3
- package/dist/queries/health.js +1 -1
- package/dist/queries/hierarchy.d.ts +2 -2
- package/dist/queries/hierarchy.js +1 -1
- package/dist/queries/hotspots.d.ts +2 -2
- package/dist/queries/hotspots.js +1 -1
- package/dist/queries/imports.d.ts +2 -2
- package/dist/queries/imports.js +1 -1
- package/dist/queries/incomplete-migration.d.ts +2 -2
- package/dist/queries/incomplete-migration.js +1 -1
- package/dist/queries/index.d.ts +5 -5
- package/dist/queries/index.js +1 -1
- package/dist/queries/isolated.d.ts +2 -2
- package/dist/queries/isolated.js +1 -1
- package/dist/queries/locality-candidates.d.ts +2 -2
- package/dist/queries/locality-candidates.js +1 -1
- package/dist/queries/members.d.ts +2 -2
- package/dist/queries/members.js +1 -1
- package/dist/queries/methods.d.ts +2 -2
- package/dist/queries/methods.js +1 -1
- package/dist/queries/not-implemented.d.ts +2 -2
- package/dist/queries/not-implemented.js +1 -1
- package/dist/queries/outline.d.ts +2 -2
- package/dist/queries/outline.js +1 -1
- package/dist/queries/passthrough-candidates.d.ts +2 -2
- package/dist/queries/passthrough-candidates.js +1 -1
- package/dist/queries/plan-context.d.ts +2 -2
- package/dist/queries/plan-context.js +1 -1
- package/dist/queries/react-component-duplicates.d.ts +2 -2
- package/dist/queries/react-component-duplicates.js +1 -1
- package/dist/queries/react-hook-candidates.d.ts +2 -2
- package/dist/queries/react-hook-candidates.js +1 -1
- package/dist/queries/react-large-component-pressure.d.ts +2 -2
- package/dist/queries/react-large-component-pressure.js +1 -1
- package/dist/queries/recent-duplicates.d.ts +2 -2
- package/dist/queries/recent-duplicates.js +1 -1
- package/dist/queries/redundant-reexports.d.ts +2 -2
- package/dist/queries/redundant-reexports.js +1 -1
- package/dist/queries/reference-neighborhood.d.ts +2 -2
- package/dist/queries/reference-neighborhood.js +1 -1
- package/dist/queries/reference-reachability.d.ts +2 -2
- package/dist/queries/reference-reachability.js +1 -1
- package/dist/queries/refs.d.ts +2 -2
- package/dist/queries/refs.js +1 -1
- package/dist/queries/self-audit.d.ts +2 -2
- package/dist/queries/self-audit.js +1 -1
- package/dist/queries/similar-chains.d.ts +2 -2
- package/dist/queries/similar-chains.js +1 -1
- package/dist/queries/similar-files.d.ts +2 -2
- package/dist/queries/similar-files.js +1 -1
- package/dist/queries/similar-signatures.d.ts +2 -2
- package/dist/queries/similar-signatures.js +1 -1
- package/dist/queries/similar.d.ts +2 -2
- package/dist/queries/similar.js +1 -1
- package/dist/queries/slice.d.ts +2 -2
- package/dist/queries/slice.js +1 -1
- package/dist/queries/source-inspection.d.ts +4 -4
- package/dist/queries/source-inspection.js +1 -1
- package/dist/queries/source-search.d.ts +2 -2
- package/dist/queries/source-search.js +1 -1
- package/dist/queries/stale-abstractions.d.ts +2 -2
- package/dist/queries/stale-abstractions.js +1 -1
- package/dist/queries/stats.d.ts +2 -2
- package/dist/queries/surface.d.ts +2 -2
- package/dist/queries/surface.js +1 -1
- package/dist/queries/symbols.d.ts +2 -2
- package/dist/queries/symbols.js +1 -1
- package/dist/queries/system-map.d.ts +2 -2
- package/dist/queries/system-map.js +1 -1
- package/dist/queries/system.d.ts +2 -2
- package/dist/queries/system.js +1 -1
- package/dist/queries/test-quality.d.ts +2 -2
- package/dist/queries/test-quality.js +1 -1
- package/dist/queries/trace.d.ts +2 -2
- package/dist/queries/trace.js +1 -1
- package/dist/queries/twin-ab.d.ts +2 -2
- package/dist/queries/twin-ab.js +1 -1
- package/dist/queries/twin-drift.d.ts +2 -2
- package/dist/queries/twin-drift.js +1 -1
- package/dist/queries/unused-imports.d.ts +2 -2
- package/dist/queries/unused-imports.js +1 -1
- package/dist/queries/unused-params.d.ts +2 -2
- package/dist/queries/unused-params.js +1 -1
- package/dist/queries/value-flow.d.ts +3 -3
- package/dist/queries/value-flow.js +1 -1
- package/dist/queries/vue-component-duplicates.d.ts +2 -2
- package/dist/queries/vue-component-duplicates.js +1 -1
- package/dist/queries/vue-composable-candidates.d.ts +2 -2
- package/dist/queries/vue-composable-candidates.js +1 -1
- package/dist/queries/vue-large-view-pressure.d.ts +2 -2
- package/dist/queries/vue-large-view-pressure.js +1 -1
- package/dist/queries/wrapper-candidates.d.ts +2 -2
- package/dist/queries/wrapper-candidates.js +1 -1
- package/dist/query-service-fastpath.js +5 -5
- package/dist/query-service-server.js +2 -2
- package/dist/refs-ARMA6XUJ.js +2 -0
- package/dist/refs-pagination-VUGIWN6U.js +2 -0
- package/dist/reindex-worker.js +125 -66
- package/dist/reindex.d.ts +5 -3
- package/dist/reindex.js +135 -76
- package/dist/runtime.d.ts +5 -5
- package/dist/runtime.js +4 -4
- package/dist/rust-semantic-session-server.js +1 -1
- package/dist/rust-semantic-session-worker.js +1 -1
- package/dist/rust-semantic-worker.js +1 -1
- package/dist/{scip-cli-CppzF5MK.d.ts → scip-cli-H-n59izO.d.ts} +1 -1
- package/dist/slice-YOB5YFAM.js +2 -0
- package/dist/surface-VY5EFWTW.js +2 -0
- package/dist/symbol-resolution-DGQN4XIV.js +2 -0
- package/dist/system-2KQ3QD2P.js +2 -0
- package/dist/trace-HTIPTXAE.js +2 -0
- package/dist/typescript-mailbox-worker.js +1 -1
- package/dist/value-flow-5FV3VQI7.js +2 -0
- package/dist/watch-server.js +3 -3
- package/docs/CLI_JSON_OUTPUT.md +2 -2
- package/docs/COMMAND_REFERENCE.md +2 -2
- package/docs/schemas/project-config.schema.json +11 -1
- package/package.json +6 -5
- package/skills/scip-explore/SKILL.md +73 -3
- package/skills/scip-explore/agents/openai.yaml +3 -3
- package/skills/scip-explore/references/delegated-exploration.md +51 -0
- package/skills/scip-explore/references/external-evidence.md +72 -0
- package/skills/scip-explore/references/information-model.md +51 -0
- package/skills/scip-explore/scripts/capture-evidence.mjs +666 -0
- package/skills/scip-query/SKILL.md +22 -1
- package/dist/by-kind-CI3O6PQG.js +0 -2
- package/dist/call-graph-6QTUTXH7.js +0 -2
- package/dist/chunk-2COFMIVK.js +0 -60
- package/dist/chunk-35ELD3RM.js +0 -2
- package/dist/chunk-3FQ3KMCD.js +0 -2
- package/dist/chunk-3VLJ2DCA.js +0 -2
- package/dist/chunk-4DCKBY6T.js +0 -5
- package/dist/chunk-4N6QSEMZ.js +0 -10
- package/dist/chunk-4OE2JO6I.js +0 -2
- package/dist/chunk-4UUCUASK.js +0 -554
- package/dist/chunk-54EOGFBR.js +0 -2
- package/dist/chunk-5IZTXSOL.js +0 -117
- package/dist/chunk-5ZJH6DDE.js +0 -2
- package/dist/chunk-63MBA7EG.js +0 -3
- package/dist/chunk-6T7H2AFY.js +0 -3
- package/dist/chunk-7COHFNJK.js +0 -38
- package/dist/chunk-7HU2IJ2T.js +0 -3
- package/dist/chunk-7PPYXENX.js +0 -2
- package/dist/chunk-AA7K3XLM.js +0 -21
- package/dist/chunk-AUP6YI5M.js +0 -2
- package/dist/chunk-CA5RE6H7.js +0 -2
- package/dist/chunk-CT5SI2I4.js +0 -2
- package/dist/chunk-D5EKVZPI.js +0 -2
- package/dist/chunk-DMQ7ZKJG.js +0 -81
- package/dist/chunk-ELNRLMC5.js +0 -29
- package/dist/chunk-F7WQ337U.js +0 -308
- package/dist/chunk-FEQIQ26E.js +0 -2
- package/dist/chunk-FN6EJM6Q.js +0 -2
- package/dist/chunk-FTSQNONX.js +0 -2
- package/dist/chunk-G2F6T5BV.js +0 -2
- package/dist/chunk-G6OGPXJW.js +0 -9
- package/dist/chunk-GFLTPNWV.js +0 -3
- package/dist/chunk-GTDP2SKQ.js +0 -2
- package/dist/chunk-HEOMG7IM.js +0 -8
- package/dist/chunk-I3U2FN2T.js +0 -13
- package/dist/chunk-IUJ3ZFEE.js +0 -7
- package/dist/chunk-LXLD46LH.js +0 -21
- package/dist/chunk-MEI3PTUK.js +0 -2
- package/dist/chunk-MO226P4Q.js +0 -4
- package/dist/chunk-MYUKI5VN.js +0 -4
- package/dist/chunk-OIRWZIYL.js +0 -38
- package/dist/chunk-OIVZ7PW6.js +0 -438
- package/dist/chunk-PNISDVYC.js +0 -3
- package/dist/chunk-PQOL42AW.js +0 -2
- package/dist/chunk-PUVZNFVY.js +0 -11
- package/dist/chunk-PZEI2TVL.js +0 -4
- package/dist/chunk-Q2J2VZZT.js +0 -2
- package/dist/chunk-QDCCHMVZ.js +0 -2
- package/dist/chunk-QLQBZOJH.js +0 -3
- package/dist/chunk-S73HBCGI.js +0 -11
- package/dist/chunk-SDPA5DKN.js +0 -210
- package/dist/chunk-SEUJVWT2.js +0 -3
- package/dist/chunk-SF7X6QNW.js +0 -2
- package/dist/chunk-SWFAFA4G.js +0 -49
- package/dist/chunk-T6FRID7Y.js +0 -3
- package/dist/chunk-TNOHGHZQ.js +0 -2
- package/dist/chunk-U2GPTA5U.js +0 -3
- package/dist/chunk-URTX2BEA.js +0 -6
- package/dist/chunk-VGRUM7JI.js +0 -3
- package/dist/chunk-VWLIOEEF.js +0 -11
- package/dist/chunk-WK4FD4PG.js +0 -2
- package/dist/chunk-X434XZAI.js +0 -2
- package/dist/chunk-YIEFEPG6.js +0 -16
- package/dist/chunk-YRVERHJR.js +0 -49
- package/dist/chunk-ZD3Z54IW.js +0 -2
- package/dist/chunk-ZDVDSDFG.js +0 -4
- package/dist/code-EQL6ZBLH.js +0 -2
- package/dist/code-result-json-6E4J6LGZ.js +0 -2
- package/dist/command-descriptors-QH3G2OVD.js +0 -346
- package/dist/dataflow-2BLMUZBP.js +0 -2
- package/dist/dependence-slice-MGAJDZXB.js +0 -2
- package/dist/deps-GQMUYVKW.js +0 -2
- package/dist/direct-navigation-6RUJKLAV.js +0 -3
- package/dist/entry-map-V2NQP5JU.js +0 -2
- package/dist/files-VM53I4IU.js +0 -2
- package/dist/hierarchy-D553WRSZ.js +0 -2
- package/dist/imports-DOZAJWLW.js +0 -2
- package/dist/members-HE67475K.js +0 -2
- package/dist/methods-K5JK4PPH.js +0 -2
- package/dist/output-continuation-command-LKBUTNRL.js +0 -3
- package/dist/project-reindex-4ARU6QCM.js +0 -3
- package/dist/refs-NBHKL4UQ.js +0 -2
- package/dist/refs-pagination-BBVTIHMH.js +0 -2
- package/dist/slice-U6S6LBSB.js +0 -2
- package/dist/surface-C7SS5CDQ.js +0 -2
- package/dist/symbol-resolution-3FVEKDTJ.js +0 -2
- package/dist/system-6K2NOO5C.js +0 -2
- package/dist/trace-II5K2TMH.js +0 -2
- package/dist/value-flow-MKFUUE5B.js +0 -2
|
@@ -0,0 +1,666 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/* global process */
|
|
3
|
+
|
|
4
|
+
import { spawnSync } from 'node:child_process';
|
|
5
|
+
import { createHash } from 'node:crypto';
|
|
6
|
+
import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from 'node:fs';
|
|
7
|
+
import { isAbsolute, join, resolve } from 'node:path';
|
|
8
|
+
|
|
9
|
+
const EVIDENCE_DIR_ENV = 'SCIP_EXPLORE_EVIDENCE_DIR';
|
|
10
|
+
const MAX_PROJECTION_CHARACTERS = 32_000;
|
|
11
|
+
const SAFE_ID = /^[a-z0-9][a-z0-9_-]{0,63}$/u;
|
|
12
|
+
const FORBIDDEN_OUTPUT_ARGUMENTS = [
|
|
13
|
+
'--agent-output',
|
|
14
|
+
'--json',
|
|
15
|
+
'--json-output',
|
|
16
|
+
'--output-cursor',
|
|
17
|
+
'--output-page-size',
|
|
18
|
+
'--raw-json',
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
main();
|
|
22
|
+
|
|
23
|
+
function main() {
|
|
24
|
+
const { id, queryArgs } = parseArguments(process.argv.slice(2));
|
|
25
|
+
const configuredRoot = process.env[EVIDENCE_DIR_ENV];
|
|
26
|
+
if (!configuredRoot) fail(`${EVIDENCE_DIR_ENV} is not set.`);
|
|
27
|
+
const evidenceRoot = resolve(configuredRoot);
|
|
28
|
+
mkdirSync(evidenceRoot, { recursive: true, mode: 0o700 });
|
|
29
|
+
const rawPath = join(evidenceRoot, `${id}.json`);
|
|
30
|
+
const receiptPath = join(evidenceRoot, `${id}.receipt.json`);
|
|
31
|
+
if (existsSync(rawPath) || existsSync(receiptPath)) fail(`Evidence id already exists: ${id}`);
|
|
32
|
+
|
|
33
|
+
for (const argument of queryArgs) {
|
|
34
|
+
if (FORBIDDEN_OUTPUT_ARGUMENTS.some((flag) => argument === flag || argument.startsWith(`${flag}=`))) {
|
|
35
|
+
fail(`The capture wrapper owns ${argument.split('=', 1)[0]}; remove it from the scip-query arguments.`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const priorReceipts = readPriorReceipts(evidenceRoot);
|
|
40
|
+
const reusableReceipts = receiptsForLatestObservation(priorReceipts);
|
|
41
|
+
const request = requestIdentity(queryArgs);
|
|
42
|
+
const reuse = findReusableObservation(request, reusableReceipts);
|
|
43
|
+
if (reuse) {
|
|
44
|
+
process.stdout.write(
|
|
45
|
+
`${JSON.stringify({
|
|
46
|
+
kind: 'scip-explore-evidence-reuse',
|
|
47
|
+
schemaVersion: 1,
|
|
48
|
+
requestedId: id,
|
|
49
|
+
status: 'already-captured',
|
|
50
|
+
request,
|
|
51
|
+
existingReceiptIds: reuse.receiptIds,
|
|
52
|
+
rawEvidence: reuse.rawEvidence,
|
|
53
|
+
recovery: 'Reuse the named receipt ids in the ledger; do not rerun this observation.',
|
|
54
|
+
})}\n`,
|
|
55
|
+
);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const overlap = findOverlappingCodeRanges(request, reusableReceipts);
|
|
60
|
+
if (overlap) {
|
|
61
|
+
process.stdout.write(
|
|
62
|
+
`${JSON.stringify({
|
|
63
|
+
kind: 'scip-explore-evidence-reuse',
|
|
64
|
+
schemaVersion: 1,
|
|
65
|
+
requestedId: id,
|
|
66
|
+
status: 'overlap-requires-uncovered-query',
|
|
67
|
+
request,
|
|
68
|
+
existingReceiptIds: overlap.receiptIds,
|
|
69
|
+
uncoveredSelectors: overlap.uncoveredSelectors,
|
|
70
|
+
recovery:
|
|
71
|
+
'The requested code ranges overlap delivered evidence. Capture only the uncovered selectors under a new id; do not reread covered bytes.',
|
|
72
|
+
})}\n`,
|
|
73
|
+
);
|
|
74
|
+
process.exitCode = 2;
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const execution = spawnSync('scip-query', [...queryArgs, '--json', '--json-output', rawPath], {
|
|
79
|
+
cwd: process.cwd(),
|
|
80
|
+
env: process.env,
|
|
81
|
+
encoding: 'utf8',
|
|
82
|
+
maxBuffer: 4 * 1024 * 1024,
|
|
83
|
+
});
|
|
84
|
+
if (execution.error) fail(execution.error.message);
|
|
85
|
+
if (execution.status !== 0) {
|
|
86
|
+
fail((execution.stderr || execution.stdout || `scip-query exited ${execution.status}`).trim());
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const exportReceipt = parseLastJsonLine(execution.stdout, 'scip-query export receipt');
|
|
90
|
+
if (!isAbsolute(exportReceipt.path) || resolve(exportReceipt.path) !== rawPath) {
|
|
91
|
+
fail('scip-query wrote the evidence packet to an unexpected path.');
|
|
92
|
+
}
|
|
93
|
+
const envelope = JSON.parse(readFileSync(rawPath, 'utf8'));
|
|
94
|
+
const projection = projectCommandResult(envelope);
|
|
95
|
+
if (projection.status !== 'complete') {
|
|
96
|
+
const refusal = {
|
|
97
|
+
kind: 'scip-explore-evidence-receipt',
|
|
98
|
+
schemaVersion: 1,
|
|
99
|
+
id,
|
|
100
|
+
command: envelope.command,
|
|
101
|
+
request,
|
|
102
|
+
rawEvidence: {
|
|
103
|
+
path: rawPath,
|
|
104
|
+
bytes: exportReceipt.bytes,
|
|
105
|
+
sha256: exportReceipt.sha256,
|
|
106
|
+
},
|
|
107
|
+
status: projection.status,
|
|
108
|
+
coverage: envelope.coverage,
|
|
109
|
+
recovery: projection.recovery,
|
|
110
|
+
};
|
|
111
|
+
writeFileSync(receiptPath, `${JSON.stringify(refusal, null, 2)}\n`, { flag: 'wx', mode: 0o600 });
|
|
112
|
+
process.stdout.write(`${JSON.stringify(refusal)}\n`);
|
|
113
|
+
process.exitCode = 2;
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
const receipt = {
|
|
117
|
+
kind: 'scip-explore-evidence-receipt',
|
|
118
|
+
schemaVersion: 1,
|
|
119
|
+
id,
|
|
120
|
+
command: envelope.command,
|
|
121
|
+
request,
|
|
122
|
+
rawEvidence: {
|
|
123
|
+
path: rawPath,
|
|
124
|
+
bytes: exportReceipt.bytes,
|
|
125
|
+
sha256: exportReceipt.sha256,
|
|
126
|
+
},
|
|
127
|
+
observation: {
|
|
128
|
+
...(envelope.operationRole === undefined ? {} : { operationRole: envelope.operationRole }),
|
|
129
|
+
...(envelope.evidence === undefined ? {} : { evidence: envelope.evidence }),
|
|
130
|
+
args: envelope.args,
|
|
131
|
+
coverage: envelope.coverage,
|
|
132
|
+
...(envelope.evidenceContext === undefined
|
|
133
|
+
? {}
|
|
134
|
+
: { evidenceCalibration: projectEvidenceCalibration(envelope.evidenceContext, priorReceipts) }),
|
|
135
|
+
result: projection.result,
|
|
136
|
+
},
|
|
137
|
+
};
|
|
138
|
+
const serialized = JSON.stringify(receipt);
|
|
139
|
+
if (serialized.length > MAX_PROJECTION_CHARACTERS) {
|
|
140
|
+
const refusal = {
|
|
141
|
+
kind: 'scip-explore-evidence-receipt',
|
|
142
|
+
schemaVersion: 1,
|
|
143
|
+
id,
|
|
144
|
+
command: envelope.command,
|
|
145
|
+
rawEvidence: receipt.rawEvidence,
|
|
146
|
+
projectionCharacters: serialized.length,
|
|
147
|
+
status: 'projection-too-large',
|
|
148
|
+
recovery: `Narrow the query so its agent projection is at most ${MAX_PROJECTION_CHARACTERS} characters; use a new evidence id.`,
|
|
149
|
+
};
|
|
150
|
+
writeFileSync(receiptPath, `${JSON.stringify(refusal, null, 2)}\n`, { flag: 'wx', mode: 0o600 });
|
|
151
|
+
process.stdout.write(`${JSON.stringify(refusal)}\n`);
|
|
152
|
+
process.exitCode = 2;
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
writeFileSync(receiptPath, `${JSON.stringify(receipt, null, 2)}\n`, { flag: 'wx', mode: 0o600 });
|
|
157
|
+
process.stdout.write(`${serialized}\n`);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function projectCommandResult(envelope) {
|
|
161
|
+
if (envelope.command === 'inspect') return projectInspectResult(envelope.result);
|
|
162
|
+
if (envelope.command !== 'search') return { status: 'complete', result: envelope.agentResult ?? envelope.result };
|
|
163
|
+
|
|
164
|
+
const result = envelope.result;
|
|
165
|
+
const identityCoverage = result?.identityCoverage;
|
|
166
|
+
const identities = result?.identities;
|
|
167
|
+
const scopeHints = result?.scopeHints;
|
|
168
|
+
const commandProjectionComplete =
|
|
169
|
+
Array.isArray(identities) &&
|
|
170
|
+
identityCoverage?.mode === 'complete' &&
|
|
171
|
+
identityCoverage.omitted === 0 &&
|
|
172
|
+
identityCoverage.returned === identities.length &&
|
|
173
|
+
identityCoverage.total === identities.length;
|
|
174
|
+
const exhaustivePacketComplete =
|
|
175
|
+
Array.isArray(identities) &&
|
|
176
|
+
Number.isSafeInteger(identityCoverage?.total) &&
|
|
177
|
+
identities.length === identityCoverage.total &&
|
|
178
|
+
result.matchingLines === identityCoverage.total;
|
|
179
|
+
const identitiesComplete = commandProjectionComplete || exhaustivePacketComplete;
|
|
180
|
+
const scopeHintsComplete = Array.isArray(scopeHints) && result.omittedScopeHints === 0;
|
|
181
|
+
if (!identitiesComplete || !scopeHintsComplete) {
|
|
182
|
+
return {
|
|
183
|
+
status: 'incomplete-locator-projection',
|
|
184
|
+
recovery:
|
|
185
|
+
'The exhaustive packet did not contain a complete search identity and scope-hint manifest. Narrow the exact query or scope, or follow the command-owned recovery until coverage is complete.',
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
return {
|
|
190
|
+
status: 'complete',
|
|
191
|
+
result: {
|
|
192
|
+
kind: 'complete-search-identity-manifest',
|
|
193
|
+
schemaVersion: 1,
|
|
194
|
+
pattern: result.pattern,
|
|
195
|
+
mode: result.mode,
|
|
196
|
+
matchingLines: result.matchingLines,
|
|
197
|
+
matchingFiles: result.matchingFiles,
|
|
198
|
+
identityCoverage: commandProjectionComplete
|
|
199
|
+
? identityCoverage
|
|
200
|
+
: {
|
|
201
|
+
mode: 'complete-exhaustive-packet',
|
|
202
|
+
returned: identities.length,
|
|
203
|
+
total: identities.length,
|
|
204
|
+
omitted: 0,
|
|
205
|
+
commandProjection: identityCoverage,
|
|
206
|
+
},
|
|
207
|
+
identityManifest: groupSearchIdentities(identities),
|
|
208
|
+
scopeHints,
|
|
209
|
+
scopeHintCoverage: {
|
|
210
|
+
returned: scopeHints.length,
|
|
211
|
+
omitted: result.omittedScopeHints,
|
|
212
|
+
},
|
|
213
|
+
scannedFiles: result.scannedFiles,
|
|
214
|
+
textCoverage: compactTextCoverage(result.textCoverage),
|
|
215
|
+
sourceMaterialization: {
|
|
216
|
+
state: 'stored-in-raw-packet',
|
|
217
|
+
excludedFromReceipt: true,
|
|
218
|
+
reason: 'Search locates exact roots; inspect or code establishes behavior for a named gap.',
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
function groupSearchIdentities(identities) {
|
|
225
|
+
const files = new Map();
|
|
226
|
+
for (const identity of identities) {
|
|
227
|
+
const fileKey = JSON.stringify([identity.relativePath, identity.fileKind, identity.freshness]);
|
|
228
|
+
let file = files.get(fileKey);
|
|
229
|
+
if (!file) {
|
|
230
|
+
file = {
|
|
231
|
+
relativePath: identity.relativePath,
|
|
232
|
+
fileKind: identity.fileKind,
|
|
233
|
+
freshness: compactFreshness(identity.freshness),
|
|
234
|
+
owners: new Map(),
|
|
235
|
+
};
|
|
236
|
+
files.set(fileKey, file);
|
|
237
|
+
}
|
|
238
|
+
const ownerKey = JSON.stringify([
|
|
239
|
+
identity.ownerSymbol,
|
|
240
|
+
identity.ownerShort,
|
|
241
|
+
identity.ownerStartLine,
|
|
242
|
+
identity.ownerEndLine,
|
|
243
|
+
]);
|
|
244
|
+
let owner = file.owners.get(ownerKey);
|
|
245
|
+
if (!owner) {
|
|
246
|
+
owner = {
|
|
247
|
+
ownerSymbol: identity.ownerSymbol,
|
|
248
|
+
ownerShort: identity.ownerShort,
|
|
249
|
+
ownerStartLine: identity.ownerStartLine,
|
|
250
|
+
ownerEndLine: identity.ownerEndLine,
|
|
251
|
+
focusLines: [],
|
|
252
|
+
};
|
|
253
|
+
file.owners.set(ownerKey, owner);
|
|
254
|
+
}
|
|
255
|
+
owner.focusLines.push(identity.focusLine);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
return {
|
|
259
|
+
encoding: 'grouped-file-owner-lines/v1',
|
|
260
|
+
identities: identities.length,
|
|
261
|
+
files: [...files.values()]
|
|
262
|
+
.sort((left, right) => left.relativePath.localeCompare(right.relativePath))
|
|
263
|
+
.map((file) => ({
|
|
264
|
+
relativePath: file.relativePath,
|
|
265
|
+
fileKind: file.fileKind,
|
|
266
|
+
freshness: file.freshness,
|
|
267
|
+
owners: [...file.owners.values()]
|
|
268
|
+
.map((owner) => ({ ...owner, focusLines: [...owner.focusLines].sort((left, right) => left - right) }))
|
|
269
|
+
.sort(
|
|
270
|
+
(left, right) =>
|
|
271
|
+
(left.ownerStartLine ?? Number.MAX_SAFE_INTEGER) - (right.ownerStartLine ?? Number.MAX_SAFE_INTEGER) ||
|
|
272
|
+
String(left.ownerSymbol ?? '').localeCompare(String(right.ownerSymbol ?? '')),
|
|
273
|
+
),
|
|
274
|
+
})),
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
function compactFreshness(freshness) {
|
|
279
|
+
return {
|
|
280
|
+
exactText: freshness?.exactText?.state ?? 'unknown',
|
|
281
|
+
semantic: freshness?.semantic?.state ?? 'unknown',
|
|
282
|
+
verboseProof: 'stored-in-raw-packet',
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
function compactTextCoverage(coverage) {
|
|
287
|
+
if (!coverage) return coverage;
|
|
288
|
+
const binaryPaths = Array.isArray(coverage.skippedBinaryPaths) ? coverage.skippedBinaryPaths : [];
|
|
289
|
+
return {
|
|
290
|
+
basis: coverage.basis,
|
|
291
|
+
candidateFiles: coverage.candidateFiles,
|
|
292
|
+
scannedTextFiles: coverage.scannedTextFiles,
|
|
293
|
+
scannedBytes: coverage.scannedBytes,
|
|
294
|
+
skippedBinary: {
|
|
295
|
+
count: binaryPaths.length,
|
|
296
|
+
sha256: sha256(JSON.stringify(binaryPaths)),
|
|
297
|
+
paths: 'stored-in-raw-packet',
|
|
298
|
+
},
|
|
299
|
+
skippedUnreadablePaths: coverage.skippedUnreadablePaths,
|
|
300
|
+
skippedOversizedPaths: coverage.skippedOversizedPaths,
|
|
301
|
+
semanticFiles: coverage.semanticFiles,
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
function projectInspectResult(result) {
|
|
306
|
+
if (!result || !Array.isArray(result.slices) || !Array.isArray(result.units) || !result.packetCoverage) {
|
|
307
|
+
return {
|
|
308
|
+
status: 'incomplete-inspect-projection',
|
|
309
|
+
recovery:
|
|
310
|
+
'The exhaustive inspect packet did not expose exact slices, unit metadata, and a packet coverage contract. Use a narrower exact selector under a new evidence id.',
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
return {
|
|
315
|
+
status: 'complete',
|
|
316
|
+
result: {
|
|
317
|
+
kind: 'bounded-inspect-behavior-projection',
|
|
318
|
+
schemaVersion: 1,
|
|
319
|
+
view: result.view,
|
|
320
|
+
locations: result.locations,
|
|
321
|
+
searches: result.searches,
|
|
322
|
+
slices: result.slices,
|
|
323
|
+
units: result.units.map(compactInspectUnit),
|
|
324
|
+
bindingClosure: result.bindingClosure,
|
|
325
|
+
packetCoverage: result.packetCoverage,
|
|
326
|
+
omissionGroups: result.omissionGroups,
|
|
327
|
+
continuation: result.continuation,
|
|
328
|
+
causalFrontier: compactCausalFrontier(result.causalFrontier),
|
|
329
|
+
stoppingSummary: result.stoppingSummary,
|
|
330
|
+
externalizedFields: {
|
|
331
|
+
state: 'stored-in-raw-packet',
|
|
332
|
+
fields: [
|
|
333
|
+
'units[].source',
|
|
334
|
+
'units[].behavior.lines',
|
|
335
|
+
'causalFrontier.*[].id',
|
|
336
|
+
'causalFrontier.*[].callsite.text',
|
|
337
|
+
'causalFrontier.withheldAnchors[]',
|
|
338
|
+
],
|
|
339
|
+
reason:
|
|
340
|
+
'Exact source is present once in slices; duplicate behavioral lines and withheld frontier leads remain checksum-addressed in the exhaustive packet with exact recovery commands in the receipt.',
|
|
341
|
+
},
|
|
342
|
+
},
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
function compactInspectUnit(unit) {
|
|
347
|
+
const behavior = unit.behavior;
|
|
348
|
+
return {
|
|
349
|
+
kind: unit.kind,
|
|
350
|
+
relativePath: unit.relativePath,
|
|
351
|
+
startLine: unit.startLine,
|
|
352
|
+
endLine: unit.endLine,
|
|
353
|
+
focusLine: unit.focusLine,
|
|
354
|
+
unitType: unit.unitType,
|
|
355
|
+
unitStartLine: unit.unitStartLine,
|
|
356
|
+
unitEndLine: unit.unitEndLine,
|
|
357
|
+
omittedLines: unit.omittedLines,
|
|
358
|
+
reasons: unit.reasons,
|
|
359
|
+
focusLines: unit.focusLines,
|
|
360
|
+
ownerSymbol: unit.ownerSymbol,
|
|
361
|
+
ownerShort: unit.ownerShort,
|
|
362
|
+
roles: unit.roles,
|
|
363
|
+
symbols: unit.symbols,
|
|
364
|
+
id: unit.id,
|
|
365
|
+
omittedCharacters: unit.omittedCharacters,
|
|
366
|
+
...(behavior
|
|
367
|
+
? {
|
|
368
|
+
behavior: {
|
|
369
|
+
callable: behavior.callable,
|
|
370
|
+
representation: behavior.representation,
|
|
371
|
+
constructKind: behavior.constructKind,
|
|
372
|
+
signature: behavior.signature,
|
|
373
|
+
signals: behavior.signals,
|
|
374
|
+
testCases: behavior.testCases,
|
|
375
|
+
coverage: behavior.coverage,
|
|
376
|
+
rawCharacters: behavior.rawCharacters,
|
|
377
|
+
outlineCharacters: behavior.outlineCharacters,
|
|
378
|
+
candidateLines: behavior.candidateLines,
|
|
379
|
+
omittedLines: behavior.omittedLines,
|
|
380
|
+
},
|
|
381
|
+
}
|
|
382
|
+
: {}),
|
|
383
|
+
};
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
function compactCausalFrontier(frontier) {
|
|
387
|
+
if (!frontier) return frontier;
|
|
388
|
+
return {
|
|
389
|
+
anchors: Array.isArray(frontier.anchors) ? frontier.anchors.map(compactFrontierAnchor) : [],
|
|
390
|
+
withheldAnchorManifest: {
|
|
391
|
+
count: Array.isArray(frontier.withheldAnchors) ? frontier.withheldAnchors.length : 0,
|
|
392
|
+
state: 'stored-in-raw-packet',
|
|
393
|
+
recovery: 'Use remainingInspectCommands only when a named material claim depends on a withheld frontier.',
|
|
394
|
+
},
|
|
395
|
+
candidateAnchors: frontier.candidateAnchors,
|
|
396
|
+
omittedAnchors: frontier.omittedAnchors,
|
|
397
|
+
scannedBehaviorSteps: frontier.scannedBehaviorSteps,
|
|
398
|
+
visibleCallsites: frontier.visibleCallsites,
|
|
399
|
+
graphEvidencedCallsites: frontier.graphEvidencedCallsites,
|
|
400
|
+
identityCandidateCallsites: frontier.identityCandidateCallsites,
|
|
401
|
+
ambiguousCallsites: frontier.ambiguousCallsites,
|
|
402
|
+
unresolvedCallsites: frontier.unresolvedCallsites,
|
|
403
|
+
upstreamCandidates: frontier.upstreamCandidates,
|
|
404
|
+
resultCandidates: frontier.resultCandidates,
|
|
405
|
+
runtimeCandidates: frontier.runtimeCandidates,
|
|
406
|
+
inspectCommand: frontier.inspectCommand,
|
|
407
|
+
remainingInspectCommands: frontier.remainingInspectCommands,
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
function compactFrontierAnchor(anchor) {
|
|
412
|
+
return {
|
|
413
|
+
status: anchor.status,
|
|
414
|
+
direction: anchor.direction,
|
|
415
|
+
causalRole: anchor.causalRole,
|
|
416
|
+
relationKind: anchor.relationKind,
|
|
417
|
+
callsite: anchor.callsite
|
|
418
|
+
? {
|
|
419
|
+
file: anchor.callsite.file,
|
|
420
|
+
line: anchor.callsite.line,
|
|
421
|
+
endLine: anchor.callsite.endLine,
|
|
422
|
+
calleeLeaf: anchor.callsite.calleeLeaf,
|
|
423
|
+
}
|
|
424
|
+
: null,
|
|
425
|
+
alternatives: Array.isArray(anchor.alternatives)
|
|
426
|
+
? anchor.alternatives.map((alternative) => ({
|
|
427
|
+
label: alternative.label,
|
|
428
|
+
file: alternative.file,
|
|
429
|
+
line: alternative.line,
|
|
430
|
+
endLine: alternative.endLine,
|
|
431
|
+
}))
|
|
432
|
+
: [],
|
|
433
|
+
alternativeCount: anchor.alternativeCount,
|
|
434
|
+
evidenceStrengths: Array.isArray(anchor.evidence)
|
|
435
|
+
? [...new Set(anchor.evidence.map((evidence) => evidence.strength))]
|
|
436
|
+
: [],
|
|
437
|
+
};
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
function projectEvidenceCalibration(context, priorReceipts) {
|
|
441
|
+
const stableObservation = context.receipt
|
|
442
|
+
? {
|
|
443
|
+
schemaVersion: context.receipt.schemaVersion,
|
|
444
|
+
facts: context.receipt.facts,
|
|
445
|
+
observedSources: context.receipt.observedSources,
|
|
446
|
+
stabilityProofs: context.receipt.stabilityProofs,
|
|
447
|
+
...(context.receipt.diagnostics === undefined ? {} : { diagnostics: context.receipt.diagnostics }),
|
|
448
|
+
}
|
|
449
|
+
: null;
|
|
450
|
+
const observationIdentity = stableObservation ? sha256(JSON.stringify(stableObservation)) : null;
|
|
451
|
+
const priorObservation = observationIdentity ? findPriorObservation(priorReceipts, observationIdentity) : null;
|
|
452
|
+
return {
|
|
453
|
+
operationRole: context.operationRole,
|
|
454
|
+
analysisManifest: context.analysisManifest,
|
|
455
|
+
...(observationIdentity ? { observationIdentity: { sha256: observationIdentity } } : {}),
|
|
456
|
+
...(stableObservation && priorObservation === null
|
|
457
|
+
? {
|
|
458
|
+
observation: {
|
|
459
|
+
...stableObservation,
|
|
460
|
+
observedAt: context.receipt.observedAt,
|
|
461
|
+
},
|
|
462
|
+
}
|
|
463
|
+
: {}),
|
|
464
|
+
...(priorObservation
|
|
465
|
+
? {
|
|
466
|
+
observationReference: {
|
|
467
|
+
receiptId: priorObservation.receiptId,
|
|
468
|
+
sha256: observationIdentity,
|
|
469
|
+
schemaVersion: stableObservation.schemaVersion,
|
|
470
|
+
observedAt: context.receipt.observedAt,
|
|
471
|
+
},
|
|
472
|
+
}
|
|
473
|
+
: {}),
|
|
474
|
+
};
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
function requestIdentity(queryArgs) {
|
|
478
|
+
return {
|
|
479
|
+
schemaVersion: 1,
|
|
480
|
+
args: queryArgs,
|
|
481
|
+
sha256: sha256(JSON.stringify(queryArgs)),
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
function readPriorReceipts(evidenceRoot) {
|
|
486
|
+
return readdirSync(evidenceRoot)
|
|
487
|
+
.filter((name) => name.endsWith('.receipt.json'))
|
|
488
|
+
.sort()
|
|
489
|
+
.flatMap((name) => {
|
|
490
|
+
try {
|
|
491
|
+
return [JSON.parse(readFileSync(join(evidenceRoot, name), 'utf8'))];
|
|
492
|
+
} catch {
|
|
493
|
+
return [];
|
|
494
|
+
}
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
function receiptsForLatestObservation(priorReceipts) {
|
|
499
|
+
const observed = priorReceipts.flatMap((receipt) => {
|
|
500
|
+
const calibration = receipt.observation?.evidenceCalibration;
|
|
501
|
+
const identity = calibration?.observationIdentity?.sha256;
|
|
502
|
+
const observedAt = calibration?.observation?.observedAt ?? calibration?.observationReference?.observedAt;
|
|
503
|
+
return typeof identity === 'string' && typeof observedAt === 'string' ? [{ receipt, identity, observedAt }] : [];
|
|
504
|
+
});
|
|
505
|
+
if (observed.length === 0) return [];
|
|
506
|
+
const latest = observed.reduce((left, right) => (right.observedAt > left.observedAt ? right : left));
|
|
507
|
+
return observed.filter(({ identity }) => identity === latest.identity).map(({ receipt }) => receipt);
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
function findReusableObservation(request, priorReceipts) {
|
|
511
|
+
const exact = priorReceipts.find(
|
|
512
|
+
(receipt) => receipt.observation !== undefined && receipt.request?.sha256 === request.sha256,
|
|
513
|
+
);
|
|
514
|
+
if (exact) return reuseSummary([exact]);
|
|
515
|
+
|
|
516
|
+
if (request.args[0] !== 'code') return null;
|
|
517
|
+
const requestedRanges = parseCodeRanges(request.args.slice(1));
|
|
518
|
+
if (requestedRanges === null) return null;
|
|
519
|
+
const coverage = priorSourceCoverage(priorReceipts);
|
|
520
|
+
const coveringReceipts = new Set();
|
|
521
|
+
const fullyCovered = requestedRanges.every((range) => {
|
|
522
|
+
const intervals = coverage.get(range.path) ?? [];
|
|
523
|
+
const covered = subtractIntervals(range, intervals);
|
|
524
|
+
if (covered.length > 0) return false;
|
|
525
|
+
for (const interval of intervals) {
|
|
526
|
+
if (interval.end >= range.start && interval.start <= range.end) coveringReceipts.add(interval.receipt);
|
|
527
|
+
}
|
|
528
|
+
return true;
|
|
529
|
+
});
|
|
530
|
+
return fullyCovered ? reuseSummary([...coveringReceipts]) : null;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
function findOverlappingCodeRanges(request, priorReceipts) {
|
|
534
|
+
if (request.args[0] !== 'code') return null;
|
|
535
|
+
const requestedRanges = parseCodeRanges(request.args.slice(1));
|
|
536
|
+
if (requestedRanges === null) return null;
|
|
537
|
+
const coverage = priorSourceCoverage(priorReceipts);
|
|
538
|
+
const receiptIds = new Set();
|
|
539
|
+
const uncoveredSelectors = [];
|
|
540
|
+
let overlap = false;
|
|
541
|
+
for (const range of requestedRanges) {
|
|
542
|
+
const intervals = coverage.get(range.path) ?? [];
|
|
543
|
+
for (const interval of intervals) {
|
|
544
|
+
if (interval.end < range.start || interval.start > range.end) continue;
|
|
545
|
+
overlap = true;
|
|
546
|
+
receiptIds.add(interval.receipt.id);
|
|
547
|
+
}
|
|
548
|
+
uncoveredSelectors.push(...subtractIntervals(range, intervals).map(formatCodeRange));
|
|
549
|
+
}
|
|
550
|
+
if (!overlap) return null;
|
|
551
|
+
return { receiptIds: [...receiptIds].sort(), uncoveredSelectors };
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
function parseCodeRanges(selectors) {
|
|
555
|
+
if (selectors.length === 0) return null;
|
|
556
|
+
const ranges = [];
|
|
557
|
+
for (const selector of selectors) {
|
|
558
|
+
const match = /^(.*):([1-9]\d*)-([1-9]\d*)$/u.exec(selector);
|
|
559
|
+
if (!match) return null;
|
|
560
|
+
const start = Number(match[2]);
|
|
561
|
+
const end = Number(match[3]);
|
|
562
|
+
if (!Number.isSafeInteger(start) || !Number.isSafeInteger(end) || start > end) return null;
|
|
563
|
+
ranges.push({ path: match[1], start, end });
|
|
564
|
+
}
|
|
565
|
+
return ranges;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
function priorSourceCoverage(priorReceipts) {
|
|
569
|
+
const coverage = new Map();
|
|
570
|
+
for (const receipt of priorReceipts) {
|
|
571
|
+
if (receipt.observation === undefined) continue;
|
|
572
|
+
const ranges = [];
|
|
573
|
+
if (receipt.request?.args?.[0] === 'code') {
|
|
574
|
+
const codeRanges = parseCodeRanges(receipt.request.args.slice(1));
|
|
575
|
+
if (codeRanges !== null) ranges.push(...codeRanges);
|
|
576
|
+
}
|
|
577
|
+
if (receipt.observation.result?.kind === 'bounded-inspect-behavior-projection') {
|
|
578
|
+
for (const slice of receipt.observation.result.slices ?? []) {
|
|
579
|
+
if (
|
|
580
|
+
typeof slice.relativePath === 'string' &&
|
|
581
|
+
Number.isSafeInteger(slice.startLine) &&
|
|
582
|
+
Number.isSafeInteger(slice.endLine) &&
|
|
583
|
+
slice.startLine <= slice.endLine
|
|
584
|
+
) {
|
|
585
|
+
ranges.push({ path: slice.relativePath, start: slice.startLine, end: slice.endLine });
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
for (const range of ranges) {
|
|
590
|
+
const intervals = coverage.get(range.path) ?? [];
|
|
591
|
+
intervals.push({ ...range, receipt });
|
|
592
|
+
coverage.set(range.path, intervals);
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
return coverage;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
function subtractIntervals(range, intervals) {
|
|
599
|
+
let remaining = [{ start: range.start, end: range.end }];
|
|
600
|
+
for (const interval of intervals.sort((left, right) => left.start - right.start || left.end - right.end)) {
|
|
601
|
+
remaining = remaining.flatMap((candidate) => {
|
|
602
|
+
if (interval.end < candidate.start || interval.start > candidate.end) return [candidate];
|
|
603
|
+
const next = [];
|
|
604
|
+
if (interval.start > candidate.start) next.push({ start: candidate.start, end: interval.start - 1 });
|
|
605
|
+
if (interval.end < candidate.end) next.push({ start: interval.end + 1, end: candidate.end });
|
|
606
|
+
return next;
|
|
607
|
+
});
|
|
608
|
+
}
|
|
609
|
+
return remaining.map((candidate) => ({ path: range.path, ...candidate }));
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
function formatCodeRange(range) {
|
|
613
|
+
return `${range.path}:${range.start}-${range.end}`;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
function reuseSummary(receipts) {
|
|
617
|
+
return {
|
|
618
|
+
receiptIds: receipts.map((receipt) => receipt.id).sort(),
|
|
619
|
+
rawEvidence: receipts.map((receipt) => receipt.rawEvidence),
|
|
620
|
+
};
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
function findPriorObservation(priorReceipts, observationIdentity) {
|
|
624
|
+
for (const receipt of priorReceipts) {
|
|
625
|
+
const calibration = receipt.observation?.evidenceCalibration;
|
|
626
|
+
if (calibration?.observationIdentity?.sha256 !== observationIdentity) continue;
|
|
627
|
+
return {
|
|
628
|
+
receiptId: calibration.observationReference?.receiptId ?? receipt.id,
|
|
629
|
+
};
|
|
630
|
+
}
|
|
631
|
+
return null;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
function sha256(value) {
|
|
635
|
+
return createHash('sha256').update(value).digest('hex');
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
function parseArguments(args) {
|
|
639
|
+
const separator = args.indexOf('--');
|
|
640
|
+
if (separator < 0) usage();
|
|
641
|
+
const wrapperArgs = args.slice(0, separator);
|
|
642
|
+
const queryArgs = args.slice(separator + 1);
|
|
643
|
+
if (wrapperArgs.length !== 2 || wrapperArgs[0] !== '--id' || !SAFE_ID.test(wrapperArgs[1] ?? '')) usage();
|
|
644
|
+
if (queryArgs.length === 0 || queryArgs[0] === 'continue') usage();
|
|
645
|
+
return { id: wrapperArgs[1], queryArgs };
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
function parseLastJsonLine(output, label) {
|
|
649
|
+
const lines = output.trim().split(/\r?\n/u);
|
|
650
|
+
const last = lines.at(-1);
|
|
651
|
+
if (!last) fail(`Missing ${label}.`);
|
|
652
|
+
try {
|
|
653
|
+
return JSON.parse(last);
|
|
654
|
+
} catch (error) {
|
|
655
|
+
fail(`Invalid ${label}: ${error instanceof Error ? error.message : String(error)}`);
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
function usage() {
|
|
660
|
+
fail('Usage: capture-evidence.mjs --id <lowercase-id> -- <scip-query command and arguments>');
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
function fail(message) {
|
|
664
|
+
process.stderr.write(`${message}\n`);
|
|
665
|
+
process.exit(1);
|
|
666
|
+
}
|