scip-query 0.20.0 → 0.21.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 +69 -0
- package/README.md +255 -884
- package/dist/augment-vue-worker.js +1 -1
- package/dist/by-kind-CI3O6PQG.js +2 -0
- package/dist/call-graph-6QTUTXH7.js +2 -0
- package/dist/call-graph-evidence-lZa2dwQA.d.ts +11 -0
- package/dist/change-analysis-types-CCtoCHbC.d.ts +9 -0
- package/dist/chunk-26CT72HM.js +2 -0
- package/dist/{chunk-7PIO7NKH.js → chunk-2COFMIVK.js} +2 -2
- package/dist/chunk-2H4IAJHO.js +2 -0
- package/dist/chunk-2I3RSUWX.js +16 -0
- package/dist/chunk-2RP27XLR.js +2 -0
- package/dist/chunk-2ZBMOQGG.js +3 -0
- package/dist/{chunk-HX4GQPZP.js → chunk-32A42O5B.js} +3 -3
- package/dist/chunk-35ELD3RM.js +2 -0
- package/dist/chunk-35IW3P4H.js +2 -0
- package/dist/{chunk-DQGFVPUV.js → chunk-3653GTR7.js} +3 -3
- package/dist/chunk-3EX7DNBC.js +2 -0
- package/dist/chunk-3FQ3KMCD.js +2 -0
- package/dist/{chunk-5E4WNAVD.js → chunk-3PII3JI5.js} +2 -2
- package/dist/chunk-3TNRNKAT.js +2 -0
- package/dist/chunk-3VLJ2DCA.js +2 -0
- package/dist/{chunk-XSRF6Q77.js → chunk-46JLFIGA.js} +2 -2
- package/dist/chunk-4DCKBY6T.js +5 -0
- package/dist/chunk-4EXFZP6H.js +2 -0
- package/dist/chunk-4IIMPWMR.js +29 -0
- package/dist/chunk-4ILHWBYF.js +2 -0
- package/dist/chunk-4N6QSEMZ.js +10 -0
- package/dist/chunk-4OE2JO6I.js +2 -0
- package/dist/{chunk-7BAVHKMJ.js → chunk-4S4DF62J.js} +9 -9
- package/dist/chunk-4UUCUASK.js +554 -0
- package/dist/chunk-5236NQV3.js +2 -0
- package/dist/chunk-54EOGFBR.js +2 -0
- package/dist/{chunk-LY4WC4AD.js → chunk-5H7IWVXJ.js} +2 -2
- package/dist/chunk-5IZTXSOL.js +117 -0
- package/dist/{chunk-AZJQQKDD.js → chunk-5SE323LF.js} +2 -2
- package/dist/chunk-5ZJH6DDE.js +2 -0
- package/dist/chunk-63MBA7EG.js +3 -0
- package/dist/chunk-6BJ7SOY7.js +2 -0
- package/dist/chunk-6GJAP4OE.js +2 -0
- package/dist/chunk-6IEVHGWG.js +26 -0
- package/dist/chunk-6SWA6B24.js +7 -0
- package/dist/chunk-6T7H2AFY.js +3 -0
- package/dist/chunk-73Z33VFI.js +4 -0
- package/dist/chunk-7COHFNJK.js +38 -0
- package/dist/chunk-7HU2IJ2T.js +3 -0
- package/dist/chunk-7IOAZRVL.js +60 -0
- package/dist/chunk-7KCZELVM.js +2 -0
- package/dist/chunk-7PPYXENX.js +2 -0
- package/dist/chunk-7TWP3MCP.js +2 -0
- package/dist/chunk-AA7K3XLM.js +21 -0
- package/dist/chunk-AJVMVE7X.js +7 -0
- package/dist/chunk-ANWGXPPN.js +4 -0
- package/dist/chunk-APLKXICZ.js +3 -0
- package/dist/{chunk-JDOEX4E6.js → chunk-AQDWTCDC.js} +2 -2
- package/dist/chunk-AUP6YI5M.js +2 -0
- package/dist/chunk-B7ECWJAZ.js +2 -0
- package/dist/{chunk-ZHXX42OH.js → chunk-BATIVRU2.js} +4 -4
- package/dist/chunk-BBEDPVPB.js +4 -0
- package/dist/chunk-BBWPOMGU.js +2 -0
- package/dist/chunk-BD6CV7PN.js +2 -0
- package/dist/{chunk-XKWKXZKW.js → chunk-BHE44MHT.js} +2 -2
- package/dist/chunk-BOJ5SVE2.js +2 -0
- package/dist/chunk-BZYSGZRK.js +2 -0
- package/dist/chunk-CA5RE6H7.js +2 -0
- package/dist/chunk-CKDOY6JA.js +2 -0
- package/dist/chunk-CN2WGM7D.js +2 -0
- package/dist/chunk-COTMS5KM.js +3 -0
- package/dist/chunk-CSDDOUA4.js +3 -0
- package/dist/chunk-CT5SI2I4.js +2 -0
- package/dist/chunk-D5EKVZPI.js +2 -0
- package/dist/{chunk-FKSELJQF.js → chunk-D5W4UZY5.js} +2 -2
- package/dist/{chunk-RUJURYSV.js → chunk-DEUGHURX.js} +2 -2
- package/dist/chunk-DHKBIOXF.js +7 -0
- package/dist/chunk-DMQ7ZKJG.js +81 -0
- package/dist/chunk-DMUGTKMD.js +2 -0
- package/dist/chunk-DOPCR5BY.js +2 -0
- package/dist/chunk-DRENNWRG.js +2 -0
- package/dist/chunk-E4EJBGDZ.js +2 -0
- package/dist/chunk-E7BJXRNV.js +2 -0
- package/dist/chunk-EA4SH4U5.js +5 -0
- package/dist/{chunk-L7AW2QB5.js → chunk-EKZRF57O.js} +2 -2
- package/dist/chunk-ELNRLMC5.js +29 -0
- package/dist/chunk-F4FNK44D.js +2 -0
- package/dist/chunk-F7WQ337U.js +308 -0
- package/dist/chunk-FEQIQ26E.js +2 -0
- package/dist/chunk-FGB567HK.js +23 -0
- package/dist/chunk-FHV7NMFU.js +29 -0
- package/dist/chunk-FN6EJM6Q.js +2 -0
- package/dist/chunk-FTSQNONX.js +2 -0
- package/dist/chunk-FUG6RPYY.js +6 -0
- package/dist/chunk-G2F6T5BV.js +2 -0
- package/dist/chunk-G6OGPXJW.js +9 -0
- package/dist/chunk-GFLTPNWV.js +3 -0
- package/dist/chunk-GTDP2SKQ.js +2 -0
- package/dist/chunk-H46QMB7E.js +2 -0
- package/dist/chunk-H5EXS3HM.js +2 -0
- package/dist/chunk-HEOMG7IM.js +8 -0
- package/dist/chunk-HG5YI7PV.js +2 -0
- package/dist/{chunk-7SQQWSY3.js → chunk-HGKEAP7F.js} +2 -2
- package/dist/chunk-HUZNZ3H2.js +2 -0
- package/dist/chunk-HWLCBKFE.js +2 -0
- package/dist/chunk-I3U2FN2T.js +13 -0
- package/dist/{chunk-JAYYFEQY.js → chunk-I7PFL5P3.js} +2 -2
- package/dist/{chunk-2HPVVXM5.js → chunk-ICHBVITH.js} +2 -2
- package/dist/chunk-ICUQONOG.js +38 -0
- package/dist/chunk-IDPLC3FI.js +5 -0
- package/dist/{chunk-A73XVBCR.js → chunk-IGKKTHJR.js} +2 -2
- package/dist/chunk-IOKWFRFQ.js +4 -0
- package/dist/chunk-IPAL6DP2.js +3 -0
- package/dist/chunk-IUJ3ZFEE.js +7 -0
- package/dist/chunk-IXJ26KJJ.js +16 -0
- package/dist/chunk-IYV2YBHM.js +2 -0
- package/dist/chunk-JVZNWJBH.js +2 -0
- package/dist/chunk-K5MZYZV7.js +3 -0
- package/dist/{chunk-3G66UZBH.js → chunk-KFK7GF5C.js} +2 -2
- package/dist/chunk-KTRGJLY7.js +18 -0
- package/dist/chunk-KW6B5OL4.js +2 -0
- package/dist/chunk-KWARB5FZ.js +2 -0
- package/dist/chunk-LHTT5C3Z.js +2 -0
- package/dist/chunk-LPGDO2XA.js +3 -0
- package/dist/chunk-LXLD46LH.js +21 -0
- package/dist/chunk-MEI3PTUK.js +2 -0
- package/dist/chunk-MJNV7OCG.js +5 -0
- package/dist/chunk-MO226P4Q.js +4 -0
- package/dist/{chunk-3CLX5EOX.js → chunk-MOBF2GH6.js} +2 -2
- package/dist/chunk-MXNGIEPU.js +3 -0
- package/dist/chunk-MYUKI5VN.js +4 -0
- package/dist/{chunk-TFRAYKN6.js → chunk-N5C65OFK.js} +2 -2
- package/dist/{chunk-PXY7F6Y4.js → chunk-O2RM7E7L.js} +5 -5
- package/dist/chunk-OFUBXBYX.js +3 -0
- package/dist/chunk-OFY4HTMI.js +2 -0
- package/dist/chunk-OIRWZIYL.js +38 -0
- package/dist/chunk-OIVZ7PW6.js +438 -0
- package/dist/chunk-ORBKAUCH.js +4 -0
- package/dist/chunk-OUB4J26T.js +2 -0
- package/dist/chunk-OVPS2ILI.js +20 -0
- package/dist/chunk-PHSPBQM6.js +5 -0
- package/dist/{chunk-JVYA47YU.js → chunk-PIZY2GX6.js} +2 -2
- package/dist/chunk-PNISDVYC.js +3 -0
- package/dist/chunk-PQOL42AW.js +2 -0
- package/dist/chunk-PUVZNFVY.js +11 -0
- package/dist/chunk-PZEI2TVL.js +4 -0
- package/dist/{chunk-ZK26BAQL.js → chunk-Q2J2VZZT.js} +2 -2
- package/dist/chunk-Q7HB7BFJ.js +2 -0
- package/dist/{chunk-ZTETIQ35.js → chunk-QBANU5BQ.js} +2 -2
- package/dist/chunk-QD7IFBCR.js +10 -0
- package/dist/chunk-QDCCHMVZ.js +2 -0
- package/dist/chunk-QLQBZOJH.js +3 -0
- package/dist/{chunk-PQCI4SQX.js → chunk-QXR5QPSF.js} +2 -2
- package/dist/chunk-R2MOKIVO.js +2 -0
- package/dist/{chunk-EN3O7VJA.js → chunk-RFWAUHVW.js} +2 -2
- package/dist/chunk-RGCJ4646.js +16 -0
- package/dist/{chunk-BPAPWKP6.js → chunk-S3RTPPLQ.js} +8 -8
- package/dist/chunk-S73HBCGI.js +11 -0
- package/dist/chunk-SDPA5DKN.js +210 -0
- package/dist/chunk-SEUJVWT2.js +3 -0
- package/dist/chunk-SF7X6QNW.js +2 -0
- package/dist/chunk-SKUMCCC5.js +2 -0
- package/dist/chunk-SSSJO4RG.js +2 -0
- package/dist/chunk-SWFAFA4G.js +49 -0
- package/dist/chunk-SYUNTKO2.js +2 -0
- package/dist/chunk-T6FRID7Y.js +3 -0
- package/dist/chunk-TGWNNMPF.js +3 -0
- package/dist/chunk-TM5XEDDR.js +4 -0
- package/dist/chunk-TNOHGHZQ.js +2 -0
- package/dist/chunk-U2GPTA5U.js +3 -0
- package/dist/{chunk-SXP2MBJH.js → chunk-U7DR7MJD.js} +2 -2
- package/dist/chunk-U7LRSQG6.js +3 -0
- package/dist/chunk-UL4VJUMD.js +2 -0
- package/dist/chunk-UNORWZIJ.js +16 -0
- package/dist/chunk-UQ7XPRWU.js +2 -0
- package/dist/{chunk-6SHPK5ZE.js → chunk-URMZLV2N.js} +2 -2
- package/dist/chunk-URTX2BEA.js +6 -0
- package/dist/chunk-UZFCZ7SJ.js +2 -0
- package/dist/{chunk-KMKTIO2G.js → chunk-V7LQZTTZ.js} +2 -2
- package/dist/chunk-VETXXOYU.js +3 -0
- package/dist/chunk-VGRUM7JI.js +3 -0
- package/dist/{chunk-WXZLAAWK.js → chunk-VNKYRJKN.js} +2 -2
- package/dist/chunk-VWLIOEEF.js +11 -0
- package/dist/chunk-WB6LGCFB.js +6 -0
- package/dist/{chunk-W4ETQAXM.js → chunk-WK4FD4PG.js} +2 -2
- package/dist/{chunk-O64IZ6UX.js → chunk-WKPZCQLI.js} +2 -2
- package/dist/chunk-WSG3DK5H.js +2 -0
- package/dist/chunk-WULAPQUD.js +38 -0
- package/dist/chunk-WZQFY5S7.js +4 -0
- package/dist/chunk-X434XZAI.js +2 -0
- package/dist/chunk-X7PJJYKX.js +29 -0
- package/dist/chunk-XDAUYDFT.js +2 -0
- package/dist/chunk-XITQLISP.js +2 -0
- package/dist/chunk-XRXCANFQ.js +4 -0
- package/dist/chunk-XVDMJMES.js +3 -0
- package/dist/chunk-XXJ7WL3F.js +35 -0
- package/dist/chunk-Y4XQ7LES.js +9 -0
- package/dist/chunk-YIEFEPG6.js +16 -0
- package/dist/chunk-YRVERHJR.js +49 -0
- package/dist/{chunk-CJST5ETY.js → chunk-YUFWLWIC.js} +2 -2
- package/dist/chunk-YUKYB54I.js +1 -0
- package/dist/chunk-Z3GCK3PD.js +3 -0
- package/dist/chunk-ZBNL3QCY.js +4 -0
- package/dist/chunk-ZD3Z54IW.js +2 -0
- package/dist/chunk-ZDVDSDFG.js +4 -0
- package/dist/{chunk-32LVLCLN.js → chunk-ZHSARYVS.js} +3 -3
- package/dist/{chunk-BDCC2NPY.js → chunk-ZW44MCJM.js} +2 -2
- package/dist/{chunk-N5W4YZMK.js → chunk-ZYREOING.js} +2 -2
- package/dist/cli-main.js +8 -0
- package/dist/cli.js +1 -3
- package/dist/code-CczEvHui.d.ts +121 -0
- package/dist/code-EQL6ZBLH.js +2 -0
- package/dist/code-result-json-6E4J6LGZ.js +2 -0
- package/dist/command-descriptors-QH3G2OVD.js +346 -0
- package/dist/{config-types-jVM3D7MA.d.ts → config-types-Cm-VSEBb.d.ts} +189 -23
- package/dist/dataflow-2BLMUZBP.js +2 -0
- package/dist/{db-B5PM5yNk.d.ts → db-LKJXAlNS.d.ts} +1 -1
- package/dist/dependence-slice-MGAJDZXB.js +2 -0
- package/dist/deps-GQMUYVKW.js +2 -0
- package/dist/direct-navigation-6RUJKLAV.js +3 -0
- package/dist/entry-map-V2NQP5JU.js +2 -0
- package/dist/exploration-topology-BG4v30HZ.d.ts +256 -0
- package/dist/file-dep-graph-Bqg3t3Px.d.ts +4 -0
- package/dist/file-kind-BKCVMNUf.d.ts +10 -0
- package/dist/files-VM53I4IU.js +2 -0
- package/dist/graph-evidence-CbUPCSKV.d.ts +126 -0
- package/dist/graph-exploration-contract-CqDsnPQL.d.ts +7 -0
- package/dist/{health-Do5TKSJI.d.ts → health-Wl5G_LRt.d.ts} +33 -34
- package/dist/hierarchy-D553WRSZ.js +2 -0
- package/dist/imports-DOZAJWLW.js +2 -0
- package/dist/index.d.ts +4 -31
- package/dist/index.js +1 -1
- package/dist/members-HE67475K.js +2 -0
- package/dist/methods-K5JK4PPH.js +2 -0
- package/dist/next-anchor-candidates-BwMczMvX.d.ts +90 -0
- package/dist/output-continuation-command-LKBUTNRL.js +3 -0
- package/dist/output-pagination-VAWOGX4R.js +19 -0
- package/dist/postinstall.js +1 -1
- package/dist/project-reindex-4ARU6QCM.js +3 -0
- package/dist/queries/affected.d.ts +22 -4
- package/dist/queries/affected.js +1 -1
- package/dist/queries/anchors.d.ts +123 -0
- package/dist/queries/anchors.js +2 -0
- package/dist/queries/architecture.d.ts +3 -2
- package/dist/queries/architecture.js +1 -1
- package/dist/queries/bottlenecks.d.ts +26 -7
- 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 +17 -3
- 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 +5 -26
- 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 +2 -2
- package/dist/queries/complexity.js +1 -1
- package/dist/queries/context.d.ts +145 -0
- package/dist/queries/context.js +2 -0
- package/dist/queries/convergence.d.ts +2 -2
- package/dist/queries/convergence.js +1 -1
- package/dist/queries/coupling.d.ts +8 -3
- package/dist/queries/coupling.js +1 -1
- package/dist/queries/cycles.d.ts +34 -7
- package/dist/queries/cycles.js +1 -1
- package/dist/queries/dataflow.d.ts +40 -14
- 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 +3 -3
- package/dist/queries/decorative-checkers.js +1 -1
- package/dist/queries/deep-chains.d.ts +4 -38
- package/dist/queries/deep-chains.js +1 -1
- package/dist/queries/dependence-slice.d.ts +47 -0
- package/dist/queries/dependence-slice.js +2 -0
- package/dist/queries/dependency-depth.d.ts +49 -0
- package/dist/queries/dependency-depth.js +2 -0
- package/dist/queries/deps.d.ts +4 -2
- package/dist/queries/deps.js +1 -1
- package/dist/queries/diff-impact.d.ts +3 -3
- package/dist/queries/diff-impact.js +1 -1
- package/dist/queries/doc-drift.d.ts +4 -4
- 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 +121 -0
- package/dist/queries/entry-map.js +2 -0
- package/dist/queries/evidence.d.ts +70 -0
- package/dist/queries/evidence.js +2 -0
- package/dist/queries/extract-candidates.d.ts +2 -2
- package/dist/queries/extract-candidates.js +1 -1
- package/dist/queries/fan.d.ts +18 -5
- 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 +4 -3
- package/dist/queries/health.js +1 -1
- package/dist/queries/hierarchy.d.ts +5 -3
- package/dist/queries/hierarchy.js +1 -1
- package/dist/queries/hotspots.d.ts +11 -5
- 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 +4 -4
- package/dist/queries/incomplete-migration.js +1 -1
- package/dist/queries/index.d.ts +56 -136
- 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 +3 -3
- 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 +5 -9
- package/dist/queries/passthrough-candidates.js +1 -1
- package/dist/queries/plan-context.d.ts +27 -64
- 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 +4 -0
- package/dist/queries/reference-neighborhood.js +2 -0
- package/dist/queries/reference-reachability.d.ts +48 -0
- package/dist/queries/reference-reachability.js +2 -0
- 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 +3 -36
- package/dist/queries/slice.js +1 -1
- package/dist/queries/source-inspection.d.ts +209 -0
- package/dist/queries/source-inspection.js +2 -0
- package/dist/queries/source-search.d.ts +13 -0
- package/dist/queries/source-search.js +2 -0
- 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 +13 -4
- 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 +449 -0
- package/dist/queries/system-map.js +2 -0
- package/dist/queries/system.d.ts +5 -3
- 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 +47 -3
- package/dist/queries/trace.js +1 -1
- package/dist/queries/twin-ab.d.ts +3 -3
- package/dist/queries/twin-ab.js +1 -1
- package/dist/queries/twin-drift.d.ts +3 -3
- 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 +43 -0
- package/dist/queries/value-flow.js +2 -0
- 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 +6 -0
- package/dist/query-service-server.js +5 -0
- package/dist/refs-NBHKL4UQ.js +2 -0
- package/dist/refs-pagination-BBVTIHMH.js +2 -0
- package/dist/reindex-worker.js +27 -45
- package/dist/reindex.d.ts +62 -42
- package/dist/reindex.js +32 -33
- package/dist/repository-text-C0Q8VYdN.d.ts +19 -0
- package/dist/runtime.d.ts +286 -7
- package/dist/runtime.js +4 -3
- 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-BnEwZRLJ.d.ts → scip-cli-CppzF5MK.d.ts} +33 -2
- package/dist/slice-U6S6LBSB.js +2 -0
- package/dist/source-search-types-Dwz8KeuW.d.ts +79 -0
- package/dist/source-snippet-_wrcgmZc.d.ts +15 -0
- package/dist/stats-OOJ74B32.js +2 -0
- package/dist/surface-C7SS5CDQ.js +2 -0
- package/dist/symbol-resolution-3FVEKDTJ.js +2 -0
- package/dist/system-6K2NOO5C.js +2 -0
- package/dist/trace-II5K2TMH.js +2 -0
- package/dist/typescript-mailbox-worker.js +1 -1
- package/dist/value-flow-MKFUUE5B.js +2 -0
- package/dist/watch-server.js +3 -2
- package/docs/AGENT_GUIDE.md +133 -476
- package/docs/AI_FAILURE_MODES.md +30 -301
- package/docs/API.md +1 -1
- package/docs/API_EVOLUTION.md +6 -0
- package/docs/CLI_JSON_OUTPUT.md +207 -29
- package/docs/COMMAND_REFERENCE.md +255 -154
- package/docs/CONFIGURATION_WRITE_SAFETY.md +14 -13
- package/docs/DETECTOR_EVIDENCE_CONTRACTS.md +84 -0
- package/docs/DETECTOR_GUIDE.md +46 -138
- package/docs/DURABILITY.md +7 -1
- package/docs/INDEX_GENERATIONS.md +6 -0
- package/docs/LOCK_PROTOCOL.md +8 -0
- package/docs/REINDEX_METADATA_COMPATIBILITY.md +13 -3
- package/docs/SECURITY_MODEL.md +39 -42
- package/docs/accuracy-audit-checklist.md +4 -0
- package/docs/accuracy-hardening-goal.md +9 -2
- package/docs/analyzer-inventory.md +59 -264
- package/docs/analyzer-validation-protocol.md +62 -170
- package/docs/architecture-coherence-vision.md +18 -12
- package/docs/locality-analyzer-design.md +1 -1
- package/docs/schemas/cli-json-envelope.schema.json +212 -27
- package/docs/schemas/cli-json-export-receipt.schema.json +25 -0
- package/docs/schemas/cli-output-page.schema.json +1 -1
- package/docs/schemas/observation-receipt.schema.json +164 -0
- package/docs/schemas/project-config.schema.json +27 -45
- package/docs/schemas/suppression-record.schema.json +1 -34
- package/package.json +65 -8
- package/skills/concrete-plan/SKILL.md +8 -0
- package/skills/concrete-plan/agents/openai.yaml +4 -0
- package/skills/scip-explore/SKILL.md +3 -85
- package/skills/scip-explore/agents/openai.yaml +3 -3
- package/skills/scip-integrity-audit/SKILL.md +185 -0
- package/skills/scip-integrity-audit/agents/openai.yaml +4 -0
- package/skills/scip-plan/SKILL.md +67 -49
- package/skills/scip-plan/agents/openai.yaml +3 -3
- package/skills/scip-query/SKILL.md +77 -77
- package/skills/scip-query/agents/openai.yaml +3 -3
- package/skills/scip-setup/SKILL.md +10 -102
- package/skills/scip-setup/agents/openai.yaml +3 -3
- package/dist/chunk-26QA6FAI.js +0 -8
- package/dist/chunk-2KAZEZ6M.js +0 -2
- package/dist/chunk-3ORVDL3H.js +0 -2
- package/dist/chunk-46XGSFNI.js +0 -2
- package/dist/chunk-4MAK2HOY.js +0 -6
- package/dist/chunk-4TURLRL5.js +0 -16
- package/dist/chunk-4UQVNCQE.js +0 -2
- package/dist/chunk-55Q3WLZX.js +0 -2
- package/dist/chunk-5I5G2QOX.js +0 -3
- package/dist/chunk-6LDJQXAH.js +0 -2
- package/dist/chunk-6O5TICIZ.js +0 -3
- package/dist/chunk-7O5IKBTZ.js +0 -16
- package/dist/chunk-7S5E7KWT.js +0 -2
- package/dist/chunk-7WPLAODU.js +0 -5
- package/dist/chunk-AFHORGLH.js +0 -42
- package/dist/chunk-AIE7TFJW.js +0 -9
- package/dist/chunk-AQOFWNQJ.js +0 -1
- package/dist/chunk-B2PX5I6M.js +0 -2
- package/dist/chunk-B75HZHUP.js +0 -2
- package/dist/chunk-B7PBSLZN.js +0 -2
- package/dist/chunk-BBW6JFHN.js +0 -2
- package/dist/chunk-BNXCIFVY.js +0 -2
- package/dist/chunk-BS2NMXQZ.js +0 -4
- package/dist/chunk-C3KV2II6.js +0 -2
- package/dist/chunk-C43RDDP4.js +0 -20
- package/dist/chunk-DAFAHMNB.js +0 -42
- package/dist/chunk-DQLPXMH6.js +0 -8
- package/dist/chunk-EKZTZXHZ.js +0 -117
- package/dist/chunk-EW2NTSFA.js +0 -18
- package/dist/chunk-F3Z4OUDS.js +0 -8
- package/dist/chunk-FJH2NW7J.js +0 -66
- package/dist/chunk-FTFP6O3L.js +0 -11
- package/dist/chunk-FYLK2DEJ.js +0 -2
- package/dist/chunk-GH74ASD6.js +0 -11
- package/dist/chunk-GMXWZP2B.js +0 -2
- package/dist/chunk-GOUBFH5O.js +0 -3
- package/dist/chunk-HLF2TX6R.js +0 -2
- package/dist/chunk-HX7M4BDI.js +0 -30
- package/dist/chunk-HZ72SESS.js +0 -128
- package/dist/chunk-IB2N4FIY.js +0 -10
- package/dist/chunk-IZYYAFN5.js +0 -2
- package/dist/chunk-JFGGXWQF.js +0 -947
- package/dist/chunk-JN4NMBEX.js +0 -8
- package/dist/chunk-JW56N3KI.js +0 -4
- package/dist/chunk-JZ2OXNWB.js +0 -2
- package/dist/chunk-KFZNKUNT.js +0 -2
- package/dist/chunk-L5GJNV2T.js +0 -8
- package/dist/chunk-L7JDSCDF.js +0 -4
- package/dist/chunk-LU47HG23.js +0 -14
- package/dist/chunk-LVY7NPF7.js +0 -2
- package/dist/chunk-MKCDWWGV.js +0 -4
- package/dist/chunk-MNE7YG56.js +0 -2
- package/dist/chunk-MRXBEXSY.js +0 -26
- package/dist/chunk-MV7OWDUX.js +0 -2
- package/dist/chunk-NGEXCJJW.js +0 -11
- package/dist/chunk-NIW6JDC5.js +0 -29
- package/dist/chunk-PBUQFCNB.js +0 -16
- package/dist/chunk-POAVPHH7.js +0 -2
- package/dist/chunk-QZ4JVECJ.js +0 -2
- package/dist/chunk-RDO52JGY.js +0 -2
- package/dist/chunk-RJT3TUUZ.js +0 -2
- package/dist/chunk-RVLDN63O.js +0 -4
- package/dist/chunk-RXOXSKY3.js +0 -2
- package/dist/chunk-S7OYBOCK.js +0 -2
- package/dist/chunk-SMNXQT5Z.js +0 -3
- package/dist/chunk-SRAFT254.js +0 -2
- package/dist/chunk-T7YQSHPQ.js +0 -3
- package/dist/chunk-UJCOIXDY.js +0 -2
- package/dist/chunk-UJPRPGCO.js +0 -13
- package/dist/chunk-WCCFZ7V7.js +0 -113
- package/dist/chunk-WUPW3UN3.js +0 -3
- package/dist/chunk-X54AGLVX.js +0 -2
- package/dist/chunk-Y2MVPNKY.js +0 -5
- package/dist/chunk-YKUU5AIC.js +0 -3
- package/dist/chunk-YLCJLTPL.js +0 -2
- package/dist/chunk-YTQVETEO.js +0 -2
- package/dist/chunk-Z4N3MZYA.js +0 -38
- package/dist/chunk-ZJOOT3BG.js +0 -2
- package/dist/command-descriptors-DSS46KXI.js +0 -642
- package/dist/diff-gate-types-B0QYpDv1.d.ts +0 -11
- package/dist/direct-navigation-6YHV6IB5.js +0 -3
- package/dist/queries/diff-gate.d.ts +0 -253
- package/dist/queries/diff-gate.js +0 -2
- package/docs/COMMITTED_RECORD_COMPATIBILITY.md +0 -154
- package/docs/analyzer-validation-ledger.md +0 -516
- package/docs/schemas/outcome-event-record.schema.json +0 -95
- package/skills/_shared/SKILL.md +0 -101
- package/skills/_shared/agents/openai.yaml +0 -4
- package/skills/_shared/references/agent-contract-catalog.md +0 -105
- package/skills/_shared/references/command-catalog.md +0 -118
- package/skills/_shared/references/detector-precision-and-diffgate.md +0 -59
- package/skills/_shared/references/evidence-and-dead-code.md +0 -25
- package/skills/scip-audit/SKILL.md +0 -77
- package/skills/scip-audit/agents/openai.yaml +0 -4
- package/skills/scip-audit/references/claims.md +0 -98
- package/skills/scip-audit/references/cleanup.md +0 -100
- package/skills/scip-audit/references/directory.md +0 -222
- package/skills/scip-audit/references/frontend.md +0 -130
- package/skills/scip-audit/references/integrity.md +0 -154
- package/skills/scip-audit/references/maintainability.md +0 -162
- package/skills/scip-audit/references/twin-drift.md +0 -104
- package/skills/scip-diagnose/SKILL.md +0 -52
- package/skills/scip-diagnose/agents/openai.yaml +0 -4
- package/skills/scip-diagnose/references/debug.md +0 -117
- package/skills/scip-diagnose/references/probe-reachability.md +0 -77
- package/skills/scip-diagnose/references/root-cause.md +0 -145
- package/skills/scip-diagnose/references/triage.md +0 -119
- package/skills/scip-explore/references/diagrams.md +0 -40
- package/skills/scip-explore/references/language-playbook.md +0 -49
- package/skills/scip-improve/SKILL.md +0 -56
- package/skills/scip-improve/agents/openai.yaml +0 -4
- package/skills/scip-improve/references/cleanup-batches.md +0 -53
- package/skills/scip-improve/references/directory-moves.md +0 -53
- package/skills/scip-improve/references/doc-reconcile.md +0 -30
- package/skills/scip-improve/references/frontend-extraction.md +0 -39
- package/skills/scip-improve/references/maintainability-mechanism.md +0 -43
- package/skills/scip-improve/references/twin-drift.md +0 -35
- package/skills/scip-plan/references/api-impact.md +0 -19
- package/skills/scip-plan/references/conductor.md +0 -41
- package/skills/scip-plan/references/high-assurance.md +0 -43
- package/skills/scip-plan/references/hyper-optimization.md +0 -50
- package/skills/scip-plan/references/tla-model.md +0 -88
- package/skills/scip-setup/references/bootstrap-workflow.md +0 -119
- package/skills/scip-setup/references/language-verification.md +0 -61
- package/skills/scip-setup/references/lifecycle-commands.md +0 -119
- package/skills/scip-setup/references/per-repo-triage.md +0 -24
- package/skills/scip-verify/SKILL.md +0 -229
- package/skills/scip-verify/agents/openai.yaml +0 -4
- package/skills/scip-verify/references/calibrate-detectors.md +0 -170
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { S as ScipDatabase } from './db-LKJXAlNS.js';
|
|
2
|
+
import { G as GraphEvidenceFamily, a as GraphProjectionDirection } from './graph-exploration-contract-CqDsnPQL.js';
|
|
3
|
+
import { P as ProgramEdgeSemantic, E as ExplorationSourceLocation, a as ExplorationEvidenceStrength } from './exploration-topology-BG4v30HZ.js';
|
|
4
|
+
|
|
5
|
+
declare const GRAPH_EVIDENCE_VIEWS: readonly ["causal", "structure", "complete"];
|
|
6
|
+
type GraphEvidenceView = (typeof GRAPH_EVIDENCE_VIEWS)[number];
|
|
7
|
+
interface GraphEvidenceSelectors {
|
|
8
|
+
symbols?: readonly string[];
|
|
9
|
+
locations?: readonly string[];
|
|
10
|
+
searches?: readonly string[];
|
|
11
|
+
}
|
|
12
|
+
interface GraphEvidenceOptions {
|
|
13
|
+
view?: GraphEvidenceView;
|
|
14
|
+
families?: readonly GraphEvidenceFamily[];
|
|
15
|
+
direction?: GraphProjectionDirection;
|
|
16
|
+
subtypes?: readonly string[];
|
|
17
|
+
connecting?: boolean;
|
|
18
|
+
inventoryOnly?: boolean;
|
|
19
|
+
/** Materialize the exact membership of recoverable folds from the same projection. */
|
|
20
|
+
foldIds?: readonly string[];
|
|
21
|
+
maxDepth?: number;
|
|
22
|
+
maxEdges?: number;
|
|
23
|
+
}
|
|
24
|
+
interface GraphEvidenceSelection {
|
|
25
|
+
direction: GraphProjectionDirection;
|
|
26
|
+
subtypes: string[];
|
|
27
|
+
connecting: boolean;
|
|
28
|
+
inventoryOnly: boolean;
|
|
29
|
+
foldIds: string[];
|
|
30
|
+
}
|
|
31
|
+
interface GraphEvidenceInventoryRow {
|
|
32
|
+
family: GraphEvidenceFamily;
|
|
33
|
+
subtype: string;
|
|
34
|
+
incoming: number;
|
|
35
|
+
outgoing: number;
|
|
36
|
+
both: number;
|
|
37
|
+
}
|
|
38
|
+
interface GraphEvidenceFold {
|
|
39
|
+
id: string;
|
|
40
|
+
mode: 'linear' | 'scc' | 'topology';
|
|
41
|
+
family: GraphEvidenceFamily;
|
|
42
|
+
/** One subtype name, or `mixed` when this structural fold contains several. */
|
|
43
|
+
subtype: string;
|
|
44
|
+
/** Complete subtype inventory for the folded relationships. */
|
|
45
|
+
subtypes?: string[];
|
|
46
|
+
/** Query-neutral structural region shared by the folded relationships. */
|
|
47
|
+
region?: string;
|
|
48
|
+
edgeCount: number;
|
|
49
|
+
edgeIds: string[];
|
|
50
|
+
nodeIds: string[];
|
|
51
|
+
minimumMaxEdges: number;
|
|
52
|
+
}
|
|
53
|
+
interface GraphEvidenceTarget {
|
|
54
|
+
kind: string;
|
|
55
|
+
query: string;
|
|
56
|
+
status: 'matched' | 'ambiguous' | 'missing';
|
|
57
|
+
nodeIds: string[];
|
|
58
|
+
omittedCandidates: number;
|
|
59
|
+
}
|
|
60
|
+
interface GraphEvidenceNode {
|
|
61
|
+
id: string;
|
|
62
|
+
kind: string;
|
|
63
|
+
label: string;
|
|
64
|
+
symbol: string | null;
|
|
65
|
+
location: ExplorationSourceLocation | null;
|
|
66
|
+
}
|
|
67
|
+
interface GraphEvidenceEdge {
|
|
68
|
+
id: string;
|
|
69
|
+
family: GraphEvidenceFamily;
|
|
70
|
+
/** Original typed-program semantic family before presentation grouping. */
|
|
71
|
+
semanticFamily: ProgramEdgeSemantic['family'];
|
|
72
|
+
subtype: string;
|
|
73
|
+
from: GraphEvidenceNode;
|
|
74
|
+
to: GraphEvidenceNode;
|
|
75
|
+
sourceKind: string;
|
|
76
|
+
providerId: string;
|
|
77
|
+
supportCeiling: 'exact' | 'partial' | 'candidate';
|
|
78
|
+
establishes: string;
|
|
79
|
+
nonClaims: readonly string[];
|
|
80
|
+
recoverWith: readonly string[];
|
|
81
|
+
evidenceStrength: ExplorationEvidenceStrength;
|
|
82
|
+
evidenceMethods: string[];
|
|
83
|
+
evidenceConstituents?: Array<{
|
|
84
|
+
method: string;
|
|
85
|
+
strength: ExplorationEvidenceStrength;
|
|
86
|
+
}>;
|
|
87
|
+
context: ProgramEdgeSemantic['context'] | null;
|
|
88
|
+
attributes: ProgramEdgeSemantic['attributes'] | null;
|
|
89
|
+
}
|
|
90
|
+
interface GraphEvidenceCoverage {
|
|
91
|
+
status: 'accounted' | 'bounded' | 'incomplete';
|
|
92
|
+
topologyStatus: 'accounted' | 'incomplete';
|
|
93
|
+
scope: string;
|
|
94
|
+
maxDepth: number;
|
|
95
|
+
maxEdges: number;
|
|
96
|
+
/** Present for projection-aware callers; omitted by results produced before projection metadata existed. */
|
|
97
|
+
matchedEdges?: number;
|
|
98
|
+
eligibleEdges: number;
|
|
99
|
+
returnedEdges: number;
|
|
100
|
+
omittedEdges: number;
|
|
101
|
+
frontierGroups: number;
|
|
102
|
+
unsupportedFrontiers: number;
|
|
103
|
+
blindSpots: string[];
|
|
104
|
+
explanation: string;
|
|
105
|
+
}
|
|
106
|
+
interface GraphEvidenceResult {
|
|
107
|
+
kind: 'graph';
|
|
108
|
+
view: GraphEvidenceView | 'custom';
|
|
109
|
+
families: GraphEvidenceFamily[];
|
|
110
|
+
/** Explicit projection applied by the current implementation. */
|
|
111
|
+
selection?: GraphEvidenceSelection;
|
|
112
|
+
targets: GraphEvidenceTarget[];
|
|
113
|
+
/** Complete relationship counts before materialization budgeting. */
|
|
114
|
+
inventory?: GraphEvidenceInventoryRow[];
|
|
115
|
+
edges: GraphEvidenceEdge[];
|
|
116
|
+
/** Recoverable membership for relationships withheld by the materialization budget. */
|
|
117
|
+
folds?: GraphEvidenceFold[];
|
|
118
|
+
coverage: GraphEvidenceCoverage;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Compose the existing system-map topology into one small, agent-selected
|
|
122
|
+
* relationship packet. This function performs no task-relevance inference.
|
|
123
|
+
*/
|
|
124
|
+
declare function graphEvidence(db: ScipDatabase, selectors: GraphEvidenceSelectors, options?: GraphEvidenceOptions): GraphEvidenceResult;
|
|
125
|
+
|
|
126
|
+
export { type GraphEvidenceCoverage as G, type GraphEvidenceEdge as a, type GraphEvidenceTarget as b, GRAPH_EVIDENCE_VIEWS as c, type GraphEvidenceFold as d, type GraphEvidenceInventoryRow as e, type GraphEvidenceNode as f, type GraphEvidenceOptions as g, type GraphEvidenceResult as h, type GraphEvidenceSelection as i, type GraphEvidenceSelectors as j, type GraphEvidenceView as k, graphEvidence as l };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Agent-facing graph families. Provider-specific detail belongs in edge subtypes. */
|
|
2
|
+
declare const GRAPH_EVIDENCE_FAMILIES: readonly ["execution", "runtime", "dataflow", "state", "temporal", "contract", "identity", "ownership", "dependencies"];
|
|
3
|
+
type GraphEvidenceFamily = (typeof GRAPH_EVIDENCE_FAMILIES)[number];
|
|
4
|
+
declare const GRAPH_PROJECTION_DIRECTIONS: readonly ["incoming", "outgoing", "both"];
|
|
5
|
+
type GraphProjectionDirection = (typeof GRAPH_PROJECTION_DIRECTIONS)[number];
|
|
6
|
+
|
|
7
|
+
export { type GraphEvidenceFamily as G, type GraphProjectionDirection as a, GRAPH_EVIDENCE_FAMILIES as b };
|
|
@@ -1,5 +1,33 @@
|
|
|
1
|
-
import { S as ScipDatabase } from './db-
|
|
1
|
+
import { S as ScipDatabase } from './db-LKJXAlNS.js';
|
|
2
2
|
import { stats } from './queries/stats.js';
|
|
3
|
+
import { G as GraphEvidenceFamily } from './graph-exploration-contract-CqDsnPQL.js';
|
|
4
|
+
|
|
5
|
+
type GraphRelationEvidenceStrength = 'exact' | 'derived' | 'candidate' | 'mixed' | 'unknown';
|
|
6
|
+
type GraphRelationSupportCeiling = 'exact' | 'partial' | 'candidate';
|
|
7
|
+
type GraphRelationProviderRequirement = 'indexed-graph' | 'source-facts' | 'typescript-semantic';
|
|
8
|
+
|
|
9
|
+
type DetectorEvidenceCalibration = 'exact' | 'derived' | 'candidate' | 'mixed' | 'unsupported';
|
|
10
|
+
interface DetectorRelationRequirement {
|
|
11
|
+
family: GraphEvidenceFamily;
|
|
12
|
+
subtype: string;
|
|
13
|
+
minimumStrength: GraphRelationEvidenceStrength;
|
|
14
|
+
}
|
|
15
|
+
interface DetectorEvidenceContract {
|
|
16
|
+
id: string;
|
|
17
|
+
detector: string;
|
|
18
|
+
claim: string;
|
|
19
|
+
relationRequirements: readonly DetectorRelationRequirement[];
|
|
20
|
+
structuralEvidence: readonly string[];
|
|
21
|
+
calibration: Exclude<DetectorEvidenceCalibration, 'unsupported'>;
|
|
22
|
+
providerCoverage: GraphRelationSupportCeiling;
|
|
23
|
+
nonClaims: readonly string[];
|
|
24
|
+
recoverWith: string;
|
|
25
|
+
}
|
|
26
|
+
interface DetectorEvidenceAssessment extends DetectorEvidenceContract {
|
|
27
|
+
status: DetectorEvidenceCalibration;
|
|
28
|
+
providerIds: string[];
|
|
29
|
+
unavailableRequirements: GraphRelationProviderRequirement[];
|
|
30
|
+
}
|
|
3
31
|
|
|
4
32
|
/**
|
|
5
33
|
* Structural copy of analysis/git-history's ChangeAmplification — defined
|
|
@@ -79,32 +107,6 @@ interface SuppressionSummary {
|
|
|
79
107
|
byCategory: Record<string, number>;
|
|
80
108
|
}
|
|
81
109
|
|
|
82
|
-
/**
|
|
83
|
-
* Pure finding-outcome ledger math. Closes the round-1 finding "the
|
|
84
|
-
* validation axis computes per-detector lift and feeds nothing": this
|
|
85
|
-
* module tracks, per finding identity, whether a detector's output is
|
|
86
|
-
* actually being acted on — and reports that, without changing which
|
|
87
|
-
* findings get emitted (downranking stays a human/config decision).
|
|
88
|
-
*
|
|
89
|
-
* Storage lives in src/storage/evidence-cache.ts (finding_outcome_ledger
|
|
90
|
-
* table); this module is the pure transition + stats core the storage
|
|
91
|
-
* layer's rows flow through. Clock is injected everywhere so tests never
|
|
92
|
-
* depend on wall time.
|
|
93
|
-
*/
|
|
94
|
-
|
|
95
|
-
interface DetectorPrecisionStats {
|
|
96
|
-
check: string;
|
|
97
|
-
/** Distinct finding identities ever recorded for this check. */
|
|
98
|
-
seen: number;
|
|
99
|
-
resolved: number;
|
|
100
|
-
suppressed: number;
|
|
101
|
-
stillOpen: number;
|
|
102
|
-
resolutionRate: number;
|
|
103
|
-
suppressionRate: number;
|
|
104
|
-
/** Age (days) of the oldest still-open finding; null when none are open. */
|
|
105
|
-
oldestOpenAgeDays: number | null;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
110
|
type FindingEvidence = 'graph-fact' | 'heuristic' | 'change-graph';
|
|
109
111
|
interface HealthAction {
|
|
110
112
|
category: string;
|
|
@@ -115,6 +117,8 @@ interface HealthAction {
|
|
|
115
117
|
locRecoverable: number;
|
|
116
118
|
/** What kind of evidence backs this action — agents should trust accordingly. */
|
|
117
119
|
evidence: FindingEvidence;
|
|
120
|
+
/** Descriptor id in detectorEvidence; absent for analyses without a typed detector contract. */
|
|
121
|
+
evidenceContractId?: string;
|
|
118
122
|
}
|
|
119
123
|
/** One deduction line — the score is the sum of these, so it is auditable. */
|
|
120
124
|
interface ScoreDeduction {
|
|
@@ -245,14 +249,9 @@ interface HealthReport {
|
|
|
245
249
|
score: number;
|
|
246
250
|
file?: string;
|
|
247
251
|
}>;
|
|
252
|
+
/** Calibrated claim limits and recovery paths for detector evidence. */
|
|
253
|
+
detectorEvidence: DetectorEvidenceAssessment[];
|
|
248
254
|
warnings?: string[];
|
|
249
|
-
/**
|
|
250
|
-
* Per-check finding-outcome stats from the finding_outcome_ledger
|
|
251
|
-
* (populated by `diff-gate --hook` runs) — resolution/suppression rate
|
|
252
|
-
* and open-finding age. Reports, never affects the score above. Empty
|
|
253
|
-
* until the ledger has data.
|
|
254
|
-
*/
|
|
255
|
-
detectorPrecision: DetectorPrecisionStats[];
|
|
256
255
|
}
|
|
257
256
|
|
|
258
257
|
declare const HEALTH_PHASES: readonly ["overview", "dead", "isolated", "cycles", "similar", "duplicate-bodies", "twin-drift", "react-component-duplicates", "react-hook-candidates", "react-large-component-pressure", "vue-component-duplicates", "vue-composable-candidates", "vue-large-view-pressure", "extract-candidates", "wrapper-candidates", "passthrough-candidates", "stale-abstractions", "drift", "complexity-hotspots", "git-evidence", "suppressions", "coverage-contracts"];
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a,b}from"./chunk-2ZBMOQGG.js";import"./chunk-VGRUM7JI.js";import"./chunk-SDPA5DKN.js";import"./chunk-DOPCR5BY.js";import"./chunk-VWLIOEEF.js";import"./chunk-DRENNWRG.js";import"./chunk-H5EXS3HM.js";import"./chunk-HGFDYOVB.js";import"./chunk-4DCKBY6T.js";export{a as hierarchy,b as ownershipChain};
|
|
2
|
+
//# sourceMappingURL=hierarchy-D553WRSZ.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a,b,c}from"./chunk-XXJ7WL3F.js";import"./chunk-SKUMCCC5.js";import"./chunk-35ELD3RM.js";import"./chunk-GTDP2SKQ.js";import"./chunk-4N6QSEMZ.js";import"./chunk-OIRWZIYL.js";import"./chunk-VGRUM7JI.js";import"./chunk-CT5SI2I4.js";import"./chunk-54EOGFBR.js";import"./chunk-F4FNK44D.js";import"./chunk-T6FRID7Y.js";import"./chunk-UZFCZ7SJ.js";import"./chunk-Q7HB7BFJ.js";import"./chunk-SEUJVWT2.js";import"./chunk-SF7X6QNW.js";import"./chunk-SDPA5DKN.js";import"./chunk-DOPCR5BY.js";import"./chunk-VWLIOEEF.js";import"./chunk-G6OGPXJW.js";import"./chunk-DRENNWRG.js";import"./chunk-H5EXS3HM.js";import"./chunk-HGFDYOVB.js";import"./chunk-3VLJ2DCA.js";import"./chunk-4DCKBY6T.js";export{b as importedBy,a as imports,c as unusedImports};
|
|
2
|
+
//# sourceMappingURL=imports-DOZAJWLW.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,37 +1,10 @@
|
|
|
1
|
-
import { S as ScipDatabase } from './db-
|
|
1
|
+
import { S as ScipDatabase } from './db-LKJXAlNS.js';
|
|
2
2
|
import { I as IndexedDefinition, S as SymbolMatch, a as ScipSymbol, b as ScipLocalSymbol } from './symbol-types-BIQwfoAx.js';
|
|
3
|
-
|
|
3
|
+
import { c as classifyFile } from './file-kind-BKCVMNUf.js';
|
|
4
|
+
import { C as CalleeRow } from './call-graph-evidence-lZa2dwQA.js';
|
|
5
|
+
export { S as ScipQueryConfig } from './config-types-Cm-VSEBb.js';
|
|
4
6
|
import 'better-sqlite3';
|
|
5
7
|
|
|
6
|
-
/**
|
|
7
|
-
* File classifier — one place to decide what role a source file plays.
|
|
8
|
-
*
|
|
9
|
-
* Multiple queries (dead, health, cycles, drift) all need to ask
|
|
10
|
-
* questions like "is this a test file?", "is this an entry point?",
|
|
11
|
-
* "is this a barrel?" Pre-this-module each query had its own answer
|
|
12
|
-
* with subtle divergences. classifyFile gives every query one
|
|
13
|
-
* consistent verdict.
|
|
14
|
-
*
|
|
15
|
-
* `FileKind` is closed — when a future contributor adds a kind they
|
|
16
|
-
* edit the type, and the compiler forces every consumer's switch to
|
|
17
|
-
* handle it.
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
type FileKind = 'entry' | 'barrel' | 'worker' | 'test' | 'source';
|
|
21
|
-
/**
|
|
22
|
-
* Classify a file by role. Pure pattern matching — doesn't need a DB.
|
|
23
|
-
* For "is this barrel reachable?" use `isLiveBarrel(db, file)` instead.
|
|
24
|
-
*/
|
|
25
|
-
declare function classifyFile(file: string): FileKind;
|
|
26
|
-
|
|
27
|
-
type CalleeEvidenceSource = 'ast-callsite' | 'semantic-callee' | 'scip-chunk';
|
|
28
|
-
interface CalleeRow {
|
|
29
|
-
symbol: string;
|
|
30
|
-
file: string;
|
|
31
|
-
chunkId: number;
|
|
32
|
-
source: CalleeEvidenceSource;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
8
|
declare function sourceFallbackCallerEvidenceMap(db: ScipDatabase, definitions: ReadonlyArray<IndexedDefinition>, opts?: {
|
|
36
9
|
skipPath?: (relativePath: string) => boolean;
|
|
37
10
|
}): Map<number, Set<string>>;
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-IGKKTHJR.js";import{a as m}from"./chunk-2COFMIVK.js";import{c as p}from"./chunk-JVZNWJBH.js";import"./chunk-BGBBVSH4.js";import"./chunk-6BJ7SOY7.js";import"./chunk-63MBA7EG.js";import"./chunk-P5XHIJHI.js";import"./chunk-ICUQONOG.js";import"./chunk-ZDVDSDFG.js";import"./chunk-RGCJ4646.js";import"./chunk-ELNRLMC5.js";import"./chunk-LPGDO2XA.js";import"./chunk-MYUKI5VN.js";import"./chunk-HEOMG7IM.js";import"./chunk-35IW3P4H.js";import"./chunk-YUKYB54I.js";import"./chunk-DHEQMPLW.js";import"./chunk-7COHFNJK.js";import"./chunk-MTDBHTSF.js";import{b as o,d as r,e as t}from"./chunk-5IZTXSOL.js";import"./chunk-I3U2FN2T.js";import"./chunk-AA7K3XLM.js";import"./chunk-DMQ7ZKJG.js";import"./chunk-7HU2IJ2T.js";import"./chunk-MO226P4Q.js";export{p as ProjectIndex,e as ScipDatabase,m as createGitignoreFilter,t as leafName,o as parseSymbol,r as shortenSymbol};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-SSSJO4RG.js";import"./chunk-ZBNL3QCY.js";import"./chunk-BGBBVSH4.js";import"./chunk-WULAPQUD.js";import"./chunk-MTDBHTSF.js";import"./chunk-FTSQNONX.js";import"./chunk-35ELD3RM.js";import"./chunk-GTDP2SKQ.js";import"./chunk-OUB4J26T.js";import"./chunk-2I3RSUWX.js";import"./chunk-4N6QSEMZ.js";import"./chunk-OIRWZIYL.js";import"./chunk-VGRUM7JI.js";import"./chunk-YUKYB54I.js";import"./chunk-GFLTPNWV.js";import"./chunk-CT5SI2I4.js";import"./chunk-54EOGFBR.js";import"./chunk-F4FNK44D.js";import"./chunk-T6FRID7Y.js";import"./chunk-UZFCZ7SJ.js";import"./chunk-Q7HB7BFJ.js";import"./chunk-DHEQMPLW.js";import"./chunk-SEUJVWT2.js";import"./chunk-SF7X6QNW.js";import"./chunk-SDPA5DKN.js";import"./chunk-DOPCR5BY.js";import"./chunk-VWLIOEEF.js";import"./chunk-G6OGPXJW.js";import"./chunk-DRENNWRG.js";import"./chunk-H5EXS3HM.js";import"./chunk-HGFDYOVB.js";import"./chunk-3VLJ2DCA.js";import"./chunk-4DCKBY6T.js";export{a as members};
|
|
2
|
+
//# sourceMappingURL=members-HE67475K.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a,b}from"./chunk-OFY4HTMI.js";import"./chunk-ZBNL3QCY.js";import"./chunk-BGBBVSH4.js";import"./chunk-WULAPQUD.js";import"./chunk-MTDBHTSF.js";import"./chunk-FTSQNONX.js";import"./chunk-35ELD3RM.js";import"./chunk-GTDP2SKQ.js";import"./chunk-OUB4J26T.js";import"./chunk-2I3RSUWX.js";import"./chunk-4N6QSEMZ.js";import"./chunk-OIRWZIYL.js";import"./chunk-VGRUM7JI.js";import"./chunk-YUKYB54I.js";import"./chunk-GFLTPNWV.js";import"./chunk-CT5SI2I4.js";import"./chunk-54EOGFBR.js";import"./chunk-F4FNK44D.js";import"./chunk-T6FRID7Y.js";import"./chunk-UZFCZ7SJ.js";import"./chunk-Q7HB7BFJ.js";import"./chunk-DHEQMPLW.js";import"./chunk-SEUJVWT2.js";import"./chunk-SF7X6QNW.js";import"./chunk-SDPA5DKN.js";import"./chunk-DOPCR5BY.js";import"./chunk-VWLIOEEF.js";import"./chunk-G6OGPXJW.js";import"./chunk-DRENNWRG.js";import"./chunk-H5EXS3HM.js";import"./chunk-HGFDYOVB.js";import"./chunk-3VLJ2DCA.js";import"./chunk-4DCKBY6T.js";export{b as methods,a as resolveMethods};
|
|
2
|
+
//# sourceMappingURL=methods-K5JK4PPH.js.map
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { a as ExplorationEvidenceStrength, c as ExplorationEvidenceSource } from './exploration-topology-BG4v30HZ.js';
|
|
2
|
+
|
|
3
|
+
/** Compatibility projection used by current renderers while evidence axes remain independent. */
|
|
4
|
+
type BoundaryEvidenceStrength = 'exact' | 'derived' | 'candidate';
|
|
5
|
+
type BoundaryResolutionState = 'locally-linked' | 'external' | 'unresolved' | 'ambiguous';
|
|
6
|
+
type BoundarySourceScope = 'production' | 'test' | 'fixture' | 'example' | 'generated' | 'script' | 'unknown';
|
|
7
|
+
|
|
8
|
+
type BehaviorSignal = 'anchor' | 'signature' | 'binding' | 'branch' | 'loop' | 'call' | 'await' | 'return' | 'throw' | 'mutation' | 'shape' | 'spread' | 'catch' | 'finally';
|
|
9
|
+
interface BehaviorSkeletonLine {
|
|
10
|
+
line: number;
|
|
11
|
+
endLine: number;
|
|
12
|
+
depth: number;
|
|
13
|
+
signals: BehaviorSignal[];
|
|
14
|
+
text: string;
|
|
15
|
+
copied: boolean;
|
|
16
|
+
}
|
|
17
|
+
interface BehaviorSkeleton {
|
|
18
|
+
callable?: {
|
|
19
|
+
name: string;
|
|
20
|
+
startLine: number;
|
|
21
|
+
endLine: number;
|
|
22
|
+
};
|
|
23
|
+
representation: 'outline';
|
|
24
|
+
constructKind: string;
|
|
25
|
+
signature: string;
|
|
26
|
+
lines: BehaviorSkeletonLine[];
|
|
27
|
+
signals: BehaviorSignal[];
|
|
28
|
+
testCases: string[];
|
|
29
|
+
coverage: {
|
|
30
|
+
sourceStatements: number;
|
|
31
|
+
representedStatements: number;
|
|
32
|
+
copiedStatements: number;
|
|
33
|
+
omittedStatements: 0;
|
|
34
|
+
};
|
|
35
|
+
rawCharacters: number;
|
|
36
|
+
outlineCharacters: number;
|
|
37
|
+
/** @deprecated Prefer coverage.sourceStatements. */
|
|
38
|
+
candidateLines: number;
|
|
39
|
+
/** @deprecated Behavioral outlines never silently omit statements. */
|
|
40
|
+
omittedLines: number;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
interface SystemMapNextAnchorAlternative {
|
|
44
|
+
symbol: string | null;
|
|
45
|
+
label: string;
|
|
46
|
+
file: string;
|
|
47
|
+
line: number;
|
|
48
|
+
endLine: number | null;
|
|
49
|
+
}
|
|
50
|
+
interface SystemMapNextAnchor {
|
|
51
|
+
id: string;
|
|
52
|
+
status: ExplorationEvidenceStrength | 'ambiguous';
|
|
53
|
+
source: 'graph-call' | 'graph-relation' | 'leaf-identity-candidate';
|
|
54
|
+
/** Optional on legacy call candidates; populated for newly rendered causal targets. */
|
|
55
|
+
direction?: 'upstream' | 'downstream' | 'connector';
|
|
56
|
+
causalRole?: 'caller' | 'callee' | 'result-callback' | 'callable-reference' | 'runtime-producer' | 'runtime-consumer';
|
|
57
|
+
relationKind?: string;
|
|
58
|
+
fromStepId: string;
|
|
59
|
+
fromLabel: string;
|
|
60
|
+
callsite: {
|
|
61
|
+
file: string;
|
|
62
|
+
line: number;
|
|
63
|
+
endLine: number;
|
|
64
|
+
text: string;
|
|
65
|
+
signals: BehaviorSignal[];
|
|
66
|
+
calleeLeaf: string;
|
|
67
|
+
};
|
|
68
|
+
alternatives: SystemMapNextAnchorAlternative[];
|
|
69
|
+
alternativeCount: number;
|
|
70
|
+
evidence: ExplorationEvidenceSource[];
|
|
71
|
+
}
|
|
72
|
+
interface SystemMapNextAnchorPacket {
|
|
73
|
+
anchors: SystemMapNextAnchor[];
|
|
74
|
+
withheldAnchors: SystemMapNextAnchor[];
|
|
75
|
+
candidateAnchors: number;
|
|
76
|
+
omittedAnchors: number;
|
|
77
|
+
scannedBehaviorSteps: number;
|
|
78
|
+
visibleCallsites: number;
|
|
79
|
+
graphEvidencedCallsites: number;
|
|
80
|
+
identityCandidateCallsites: number;
|
|
81
|
+
ambiguousCallsites: number;
|
|
82
|
+
unresolvedCallsites: number;
|
|
83
|
+
upstreamCandidates?: number;
|
|
84
|
+
resultCandidates?: number;
|
|
85
|
+
runtimeCandidates?: number;
|
|
86
|
+
inspectCommand: string | null;
|
|
87
|
+
remainingInspectCommands: string[];
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export type { BehaviorSignal as B, SystemMapNextAnchorPacket as S, BoundarySourceScope as a, SystemMapNextAnchor as b, SystemMapNextAnchorAlternative as c, BehaviorSkeleton as d, BoundaryEvidenceStrength as e, BoundaryResolutionState as f };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import{A as fe,D as _,E as k,F as H,a as R,b as x,c as D,d as $,e as de,o as U,p as T,r as pe,t as b,w as he,x as ge,y as J,z as le}from"./chunk-Y4XQ7LES.js";import{createHash as A,randomBytes as Ce}from"crypto";import{chmodSync as it,closeSync as L,fstatSync as ve,lstatSync as ot,mkdirSync as xe,openSync as Y,readSync as at,readdirSync as Te,renameSync as _e,rmSync as Q,statSync as ut,writeSync as Ae}from"fs";import{tmpdir as ct}from"os";import{dirname as dt,join as N,resolve as pt}from"path";import{StringDecoder as Z}from"string_decoder";import{InvalidArgumentError as we}from"commander";var Ye=/^[A-Za-z0-9_@%+=:,./-]+$/u;function me(e,t={}){return t.omitSafeQuotes&&Ye.test(e)?e:(t.platform??process.platform)==="win32"?`"${e.replaceAll("%","%%").replaceAll('"','\\"')}"`:`'${e.replaceAll("'",`'"'"'`)}'`}import{AsyncLocalStorage as Qe}from"async_hooks";import{createHash as rn}from"crypto";import{existsSync as on,mkdirSync as an}from"fs";import{tmpdir as cn}from"os";import{isAbsolute as pn,join as hn,resolve as Ze}from"path";var Ke="SCIP_QUERY_SESSION";var et=128,ye=new Qe;function Se(e,t){let n=e.sessionEnabled===!1||e.json?void 0:st(),r={enabled:n!==void 0,reemit:e.reemit===!0,command:e.command,projectRoot:Ze(e.cwd),sessionIdentity:n,staged:[],stagedEvidence:[],finalized:!1};return ye.run(r,t)}function B(e){let t=ye.getStore();if(!t||t.finalized)return;t.finalized=!0;let n=t.state;if(!n){t.staged.length=0,t.stagedEvidence.length=0;return}try{if(e&&(t.staged.length>0||t.stagedEvidence.length>0)){let r=n.ledger.nextOrdinal,s=tt(t.staged).map(i=>({...i,ordinal:r,command:t.command})),o=rt(t.stagedEvidence).map(i=>({...i,ordinal:r,command:t.command}));n.ledger.ranges.push(...s),n.ledger.evidence.push(...o),n.ledger.nextOrdinal+=1,n.ledger.updatedAt=new Date().toISOString(),_(n.ledgerPath,n.ledger,{spacing:2,trailingNewline:!0})}}catch{}finally{n.lock.release(),t.state=null,t.staged.length=0,t.stagedEvidence.length=0}}function tt(e){let t=[...e].sort((r,s)=>r.relativePath.localeCompare(s.relativePath)||r.startLine-s.startLine||r.endLine-s.endLine),n=[];for(let r of t){let s=n[n.length-1];if(s&&s.relativePath===r.relativePath&&s.ownerSymbol===r.ownerSymbol&&s.policy===r.policy&&r.startLine<=s.endLine+1&&nt(s,r)){let o=r.startLine-s.startLine;for(let i=0;i<r.lineHashes.length;i+=1)s.lineHashes[o+i]??=r.lineHashes[i];s.endLine=Math.max(s.endLine,r.endLine)}else n.push({...r,lineHashes:[...r.lineHashes]})}return n}function nt(e,t){let n=Math.max(e.startLine,t.startLine),r=Math.min(e.endLine,t.endLine);for(let s=n;s<=r;s+=1)if(e.lineHashes[s-e.startLine]!==t.lineHashes[s-t.startLine])return!1;return!0}function rt(e){let t=new Set,n=[];for(let r of e){let s=`${r.kind}\0${r.identity}\0${r.contentHash}`;t.has(s)||(t.add(s),n.push(r))}return n}function st(){let e=process.env[Ke]?.trim();if(e&&!(e.length>et||!/^[A-Za-z0-9._:-]+$/.test(e)))return`explicit:${e}`}var K="scip-query-output-page",ee=1,ht="continue",w=256,C=1e5,j=4096,m=32e6,Le=64*1024*1024,gt=256*1024*1024,lt=32,Ne=32768,Re=16,ft=$*Re,M=4096,Oe=Le,te=3600*1e3,mt="scip-query-json-export",yt=1,$e=3;function ne(){return N(ct(),`scip-query-output-pages-${typeof process.getuid=="function"?process.getuid():"user"}`)}var re=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,Ue=/^[A-Za-z0-9_][A-Za-z0-9_-]{11}$/u,St=/^4\.([A-Za-z0-9_-]{22})\.([0-9a-z]{1,10})$/u,vt=/^([A-Za-z0-9_][A-Za-z0-9_-]{11})(?:\.([0-9a-z]{1,10}))?$/u,ke=1,wt="quota.lock",Ot=2e3,bt=5,be=1024*1024,It=new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)),F,Et=Object.freeze({maxSnapshotBytes:Le,maxAggregateBytes:gt,maxSnapshotCount:lt});function Pt(e){if(!T(e))return{kind:"malformed",reason:"Output page envelope must be an object."};if(e.kind!==K||e.schemaVersion!==ee)return{kind:"malformed",reason:"Output page envelope kind or schema version is unsupported."};if(!T(e.producer)||e.producer.name!=="scip-query"||typeof e.producer.version!="string"||e.producer.version.length===0||typeof e.command!="string"||e.command.length===0||e.contentType!=="text/plain"&&e.contentType!=="application/json"||e.agentInstruction!==void 0&&typeof e.agentInstruction!="string"||typeof e.content!="string"||!T(e.page))return{kind:"malformed",reason:"Output page envelope contains invalid common fields."};let t=e.page;if(["offset","returnedCharacters","totalCharacters","omittedCharacters","remainingCharacters"].some(c=>!pe(t[c]))||!b(t.outputHash))return{kind:"malformed",reason:"Output page counts or output hash are invalid."};let r=Number(t.offset),s=Number(t.returnedCharacters),o=Number(t.totalCharacters),i=Number(t.omittedCharacters),a=Number(t.remainingCharacters);if(s!==e.content.length||i!==o-s||a!==o-r-s||a<0)return{kind:"malformed",reason:"Output page character counts are inconsistent."};if(t.complete===!0){if(t.remainingCharacters!==0||t.continuation!==void 0)return{kind:"malformed",reason:"A complete output page cannot have remaining content or a continuation."}}else if(t.complete===!1){let c=t.continuation;if(t.remainingCharacters===0||!T(c)||typeof c.cursor!="string"||c.cursor.length===0||typeof c.command!="string"||c.command.length===0)return{kind:"malformed",reason:"An incomplete output page requires a non-empty continuation."}}else return{kind:"malformed",reason:"Output page complete must be a Boolean."};return{kind:"supported",envelope:e}}function Ln(e){let t=Pt(e);if(t.kind==="malformed")throw new Error(t.reason);return t.envelope}var He={writeStdout:e=>{process.stdout.write(e)},writeStderr:e=>{process.stderr.write(e)}};async function Ct(e,t,n=He){return Se({command:e.command,cwd:e.cwd,argv:e.argv,json:e.json,sessionEnabled:e.sourceSession,reemit:e.reemitSource},async()=>{try{await xt(e,t,n)}finally{B(!1)}})}async function xt(e,t,n){let r=e.pageSize??R,s=e.snapshotRoot??ne(),o=kt(e.snapshotLimits),i=e.maxOutputCharacters??m;if(!Number.isSafeInteger(i)||i<=0)throw new Error("Output character safety limit must be a positive integer.");let a=Math.min(i,m,e.agentOutput?ft:m);if(Be(r),e.cursor!==void 0&&e.cursor.length>j)throw new Error(`Output cursor exceeds the ${j}-character limit. Run the command again without --output-cursor.`);if(e.jsonOutputPath!==void 0){if(!e.json)throw new Error("--json-output requires --json.");if(e.agentOutput||e.pageSize!==void 0||e.cursor!==void 0)throw new Error("--json-output cannot be combined with --agent-output or output pagination.");e.command==="system-map"&&H(e.cwd,e.sourceSession!==!1),await Tt(e,t,n,a);return}if(e.json&&!e.agentOutput&&e.pageSize===void 0&&e.cursor===void 0){e.command==="system-map"&&H(e.cwd,e.sourceSession!==!1),await At(e,t,n);return}let c=Je(e.argv),p=Ge(e.invocationPrefix),h=De(e.command,e.cwd,p,c),g=e.cursor===void 0?void 0:Gt(e.cursor,h);e.command==="system-map"&&!g&&H(e.cwd,e.sourceSession!==!1);let d=g?.snapshotId,u;if(g)try{u=Nt(g,h,r,a,s,e.onSnapshotRead)}catch(y){let q=y instanceof Error?y.message:String(y);throw new Error(`${q} Restart with: ${Fe(p,c,r)}`,{cause:y})}else{let y=new W(h,p,e.command,e.cwd,c,r,a,Jt(e,p),s,o,e.agentOutput?Re:Ne,!e.json,se(a,e.agentOutput===!0)),q=Me(V=>y.write(V)),ce=!1;try{await t(),ce=!0}finally{q(),ce||y.abort()}let P;try{P=y.complete()}catch(V){throw y.abort(),V}d=P.snapshotId,u={content:P.content,offset:0,pageIndex:0,pageCount:P.pageCount,totalCharacters:P.totalCharacters,outputHash:P.outputHash}}let v=u.offset+u.content.length,l=u.pageIndex+1>=u.pageCount,f=l?void 0:Dt({invocationPrefix:p,nextPageIndex:u.pageIndex+1,snapshotId:qt(d)});if(k(e.command,e.cwd,l,e.sourceSession!==!1,f?.command),u.offset===0&&l&&e.cursor===void 0){n.writeStdout(u.content),B(!0),d&&I(d,s);return}let E={kind:K,schemaVersion:ee,producer:{name:"scip-query",version:e.producerVersion},command:e.command,contentType:e.json?"application/json":"text/plain",agentInstruction:f?"INCOMPLETE EVIDENCE: do not draw conclusions or report completion from this partial page. Run page.continuation.command exactly, then repeat until page.complete is true.":"OUTPUT COMPLETE: all rendered characters have been retrieved. Evaluate the command result's own coverage separately.",page:f?{offset:u.offset,returnedCharacters:u.content.length,totalCharacters:u.totalCharacters,omittedCharacters:u.totalCharacters-u.content.length,remainingCharacters:u.totalCharacters-v,complete:!1,outputHash:u.outputHash,continuation:f}:{offset:u.offset,returnedCharacters:u.content.length,totalCharacters:u.totalCharacters,omittedCharacters:u.totalCharacters-u.content.length,remainingCharacters:u.totalCharacters-v,complete:!0,outputHash:u.outputHash},content:u.content};if(e.json){n.writeStdout(`${JSON.stringify(E)}
|
|
2
|
+
`),l&&d&&I(d,s);return}n.writeStdout(Kt(E)),l&&d&&I(d,s)}async function Nn(e,t,n=ne(),r=He){if(e.length>j)throw new Error(`Output cursor exceeds the ${j}-character limit.`);let s=ae(e);if(!s)throw new Error("Invalid output cursor. Run the original command again.");let o=ie(s.snapshotId,n);await Ct({command:o.command,producerVersion:t,invocationPrefix:o.invocationPrefix,argv:[...o.argv,"--output-page-size",String(o.pageSize),"--output-cursor",e],cwd:o.cwd,json:o.argv.some(i=>i==="--json"||i.startsWith("--json=")),sourceSession:!o.argv.some(i=>i==="--no-session"),agentOutput:o.argv.some(i=>i==="--agent-output"),pageSize:o.pageSize,cursor:e,snapshotRoot:n},()=>{throw new Error("Output continuation attempted to rerun the original command.")},r)}async function Tt(e,t,n,r){let s=e.jsonOutputPath;if(s===void 0||s.length===0||Buffer.byteLength(s)>M||s.includes("\0"))throw new Error(`--json-output requires a path from 1 through ${M} UTF-8 bytes.`);let o=pt(e.cwd,s);if(Buffer.byteLength(o)>M)throw new Error(`The resolved --json-output path exceeds ${M} UTF-8 bytes.`);let i=new Z("utf8"),a=A("sha256"),c=0,p=0,h=f=>{if(p+=f.length,!Number.isSafeInteger(p)||p>r)throw new Error(se(r,!1))};xe(dt(o),{recursive:!0});let g=`${o}.tmp-${Ce(12).toString("hex")}`,d=Y(g,"wx",384),u=!0,v=Me(f=>{let E=c+f.length;if(!Number.isSafeInteger(E)||E>Oe)throw new Error(`JSON export exceeds the ${Oe}-byte file safety limit. Narrow the query before retrying.`);if(h(i.write(f)),d===void 0)throw new Error("JSON export writer is closed.");_t(d,f),a.update(f),c=E});try{await t(),h(i.end()),v(),L(d),d=void 0,_e(g,o),u=!1}finally{if(v(),d!==void 0)try{L(d)}catch{}u&&Q(g,{force:!0})}let l={kind:mt,schemaVersion:yt,producer:{name:"scip-query",version:e.producerVersion},command:e.command,path:o,bytes:c,sha256:a.digest("hex")};n.writeStdout(`${JSON.stringify(l)}
|
|
3
|
+
`),k(e.command,e.cwd,!0,e.sourceSession!==!1),B(!0)}function _t(e,t){let n=0;for(;n<t.length;){let r=Ae(e,t,n,t.length-n);if(r<=0)throw new Error("JSON export write made no forward progress.");n+=r}}function se(e,t){let n=`Command output exceeds the ${e}-character safety limit. Narrow the query before retrying.`;return t?`${n} For the complete machine result, use --json --json-output <path> and inspect the file programmatically.`:n}function Rn(e){if(!/^\d+$/u.test(e))throw new we(`Output page size must be an integer from ${w} through ${C}.`);let t=Number(e);try{Be(t)}catch{throw new we(`Output page size must be an integer from ${w} through ${C}.`)}return t}function Be(e){if(!Number.isSafeInteger(e)||e<w||e>C)throw new Error(`Output page size must be an integer from ${w} through ${C}.`)}async function At(e,t,n){let r=new G(x,e.maxOutputCharacters??m),s=process.stdout.write,o=!1,i=`${de(`scip-query: JSON output exceeds the ${x}-byte client-safe budget and may be truncated by the client. Do not use possibly partial client output as evidence. Read every page with: ${Fe(Ge(e.invocationPrefix),Qt(Je(e.argv)),R)}`)}
|
|
4
|
+
`;process.stdout.write=((a,c,p)=>{let h=r.push(a,c);return h!==void 0&&(o||(o=!0,n.writeStderr(i)),s.call(process.stdout,h)),je(c,p),!0});try{await t();let a=r.finish();a.crossedPageBoundary&&!o&&(o=!0,n.writeStderr(i)),a.bytes.length>0&&s.call(process.stdout,a.bytes),o&&n.writeStderr(i),k(e.command,e.cwd,!0,e.sourceSession!==!1)}finally{process.stdout.write=s}}function Me(e){let t=process.stdout.write;return process.stdout.write=((n,r,s)=>{let o=Lt(n,r);return e(o),je(r,s),!0}),()=>{process.stdout.write=t}}function Lt(e,t){return typeof e=="string"?Buffer.from(e,typeof t=="string"?t:"utf8"):Buffer.from(e)}function je(e,t){let n=typeof e=="function"?e:t;typeof n=="function"&&n()}var G=class{constructor(t,n){this.byteLimit=t;this.maxOutputCharacters=n}byteLimit;maxOutputCharacters;decoder=new Z("utf8");chunks=[];overflowed=!1;totalCharacters=0;totalBytes=0;push(t,n){let r=typeof t=="string"?Buffer.from(t,typeof n=="string"?n:"utf8"):Buffer.from(t);if(this.totalBytes+=r.length,this.addCharacters(this.decoder.write(r)),this.overflowed)return r;if(this.chunks.push(r),this.totalBytes<=this.byteLimit)return;this.overflowed=!0;let s=Buffer.concat(this.chunks);return this.chunks.length=0,s}finish(){this.addCharacters(this.decoder.end());let t=this.totalBytes>this.byteLimit,n=Buffer.concat(this.chunks);return this.chunks.length=0,{bytes:n,crossedPageBoundary:t}}addCharacters(t){if(this.totalCharacters+=t.length,!Number.isSafeInteger(this.totalCharacters)||this.totalCharacters>this.maxOutputCharacters)throw new Error(`Command output exceeds the ${this.maxOutputCharacters}-character safety limit. Narrow the query before retrying.`)}},W=class{constructor(t,n,r,s,o,i,a,c,p,h,g,d,u=se(a,!1)){this.invocationHash=t;this.invocationPrefix=n;this.command=r;this.cwd=s;this.argv=o;this.pageSize=i;this.maxOutputCharacters=a;this.pageContentByteLimit=c;this.snapshotRoot=p;this.limits=h;this.maxPages=g;this.preferLineBoundaries=d;this.overflowMessage=u;oe(p);do this.snapshotId=Ce(9).toString("base64url");while(this.snapshotId.startsWith("-"));this.temporaryPath=S(p,this.snapshotId,"tmp")}invocationHash;invocationPrefix;command;cwd;argv;pageSize;maxOutputCharacters;pageContentByteLimit;snapshotRoot;limits;maxPages;preferLineBoundaries;overflowMessage;snapshotId;temporaryPath;decoder=new Z("utf8");hash=A("sha256");pages=[];descriptor=null;pending="";firstPageContent="";totalCharacters=0;pageCharacterOffset=0;byteLength=0;reservedBytes=0;opened=!1;finished=!1;write(t){if(this.finished)throw new Error("Output snapshot writer is closed.");this.appendDecoded(this.decoder.write(t))}complete(){if(this.finished)throw new Error("Output snapshot writer is closed.");if(this.appendDecoded(this.decoder.end()),this.finished=!0,!this.opened){let s=this.pending,o=Buffer.from(s);return this.assertWithinByteLimit(o.length),this.hash.update(o),this.pending="",{content:s,totalCharacters:this.totalCharacters,outputHash:this.hash.digest("hex"),pageCount:1}}if((this.pending.length>0||this.pages.length===0)&&(this.flushPage(this.pending),this.pending=""),this.descriptor===null)throw new Error("Output snapshot writer is not open.");L(this.descriptor),this.descriptor=null;let t=this.hash.digest("hex"),n=S(this.snapshotRoot,this.snapshotId,"output"),r=S(this.snapshotRoot,this.snapshotId,"json");try{_e(this.temporaryPath,n);let s={version:$e,snapshotId:this.snapshotId,invocationHash:this.invocationHash,invocationPrefix:[...this.invocationPrefix],command:this.command,cwd:this.cwd,argv:[...this.argv],outputHash:t,pageSize:this.pageSize,pages:this.pages,totalCharacters:this.totalCharacters,byteLength:this.byteLength,createdAtMs:Date.now()};return _(r,s),Ie(this.snapshotRoot,this.snapshotId,this.byteLength,"complete",this.limits),this.reservedBytes=this.byteLength,{content:this.firstPageContent,totalCharacters:this.totalCharacters,outputHash:t,pageCount:this.pages.length,snapshotId:this.snapshotId}}catch(s){throw I(this.snapshotId,this.snapshotRoot),s}}abort(){this.descriptor!==null&&(L(this.descriptor),this.descriptor=null),this.finished=!0,I(this.snapshotId,this.snapshotRoot)}appendDecoded(t){if(t.length===0)return;let n=this.totalCharacters+t.length;if(!Number.isSafeInteger(n)||n>this.maxOutputCharacters)throw new Error(this.overflowMessage);for(this.totalCharacters=n,this.pending+=t,this.assertWithinByteLimit(this.byteLength+Buffer.byteLength(this.pending));this.pending.length>this.pageSize||Buffer.byteLength(this.pending)>this.pageContentByteLimit;){this.open();let r=Vt(this.pending,this.pageSize,this.pageContentByteLimit,this.preferLineBoundaries),s=this.pending.slice(0,r);this.pending=this.pending.slice(r),this.flushPage(s)}}open(){if(!this.opened){Ht(this.snapshotRoot,this.snapshotId,0,this.limits);try{this.descriptor=Y(this.temporaryPath,"wx",384),this.opened=!0}catch(t){throw Bt(this.snapshotRoot,this.snapshotId),t}}}flushPage(t){if(this.descriptor===null)throw new Error("Output snapshot writer is not open.");if(this.pages.length>=this.maxPages)throw new Error(`Command output requires more than ${this.maxPages} snapshot pages. Retry with a larger --output-page-size, narrow the query, or use --json --json-output <path>.`);let n=Buffer.from(t),r=this.byteLength+n.length;if(this.assertWithinByteLimit(r),r>this.reservedBytes){let i=Math.min(this.limits.maxSnapshotBytes,Math.ceil(r/be)*be);Ie(this.snapshotRoot,this.snapshotId,i,"active",this.limits),this.reservedBytes=i}let s=0;for(;s<n.length;){let i=Ae(this.descriptor,n,s,n.length-s);if(i<=0)throw new Error("Output snapshot write made no progress.");s+=i}let o={characterOffset:this.pageCharacterOffset,characterLength:t.length,byteOffset:this.byteLength,byteLength:n.length,hash:A("sha256").update(n).digest("hex")};this.pages.length===0&&(this.firstPageContent=t),this.pages.push(o),this.hash.update(n),this.pageCharacterOffset+=t.length,this.byteLength=r}assertWithinByteLimit(t){if(!Number.isSafeInteger(t)||t>this.limits.maxSnapshotBytes)throw new Error(`Command output exceeds the ${this.limits.maxSnapshotBytes}-byte snapshot limit. Narrow the query before retrying.`)}};function Nt(e,t,n,r,s,o){oe(s);let i=ie(e.snapshotId,s);if(i.invocationHash!==t)throw new Error("This output cursor belongs to a different command, working directory, or argument set. Run again without --output-cursor.");if(i.snapshotId!==e.snapshotId||e.version===3&&(i.invocationHash!==e.invocationHash||i.outputHash!==e.outputHash))throw new Error("Output snapshot identity does not match this cursor.");if(i.pageSize!==n||e.version===3&&e.pageSize!==n)throw new Error(`Output page size changed after this cursor was issued; use ${i.pageSize}.`);let a=i.pages[e.pageIndex];if(!a)throw new Error("Output cursor points past the current result.");if(i.totalCharacters>r)throw new Error(`Output snapshot exceeds the ${r}-character safety limit.`);if(Date.now()-i.createdAtMs>te)throw I(e.snapshotId,s),new Error("Output snapshot expired before all pages were read.");let c=S(s,e.snapshotId,"output"),p=Y(c,"r");try{let h=ve(p);if(!h.isFile()||h.size!==i.byteLength)throw new Error("Output snapshot size or type changed.");let g=Buffer.allocUnsafe(a.byteLength),d=0;for(;d<g.length;){let l=at(p,g,d,g.length-d,a.byteOffset+d);if(l===0)break;d+=l,o?.(l)}let u=ve(p);if(u.dev!==h.dev||u.ino!==h.ino||u.size!==h.size||d!==a.byteLength)throw new Error("Output snapshot changed while it was being read.");if(A("sha256").update(g).digest("hex")!==a.hash)throw new Error("Output snapshot page no longer matches its metadata.");let v=g.toString("utf8");if(v.length!==a.characterLength)throw new Error("Output snapshot page character count changed.");return{content:v,offset:a.characterOffset,pageIndex:e.pageIndex,pageCount:i.pages.length,totalCharacters:i.totalCharacters,outputHash:i.outputHash}}catch(h){throw I(e.snapshotId,s),h}finally{L(p)}}function ie(e,t){if(!O(e))throw new Error("Output snapshot identifier is invalid.");let n;try{n=JSON.parse(U(S(t,e,"json"),"output snapshot metadata"))}catch(r){throw new Error("Output snapshot is unavailable.",{cause:r})}if(!Rt(n))throw new Error("Output snapshot metadata is invalid.");return n}function Rt(e){if(!e||typeof e!="object")return!1;let t=e;return t.version===$e&&typeof t.snapshotId=="string"&&O(t.snapshotId)&&b(t.invocationHash)&&We(t.invocationPrefix)&&typeof t.command=="string"&&t.command.length>0&&t.command.length<=256&&typeof t.cwd=="string"&&t.cwd.length>0&&t.cwd.length<=8192&&Zt(t.argv)&&De(t.command,t.cwd,t.invocationPrefix,t.argv)===t.invocationHash&&b(t.outputHash)&&Number.isSafeInteger(t.pageSize)&&(t.pageSize??0)>=w&&(t.pageSize??0)<=C&&Array.isArray(t.pages)&&t.pages.length>1&&t.pages.length<=Ne&&t.pages.every($t)&&Ut(t.pages)&&Number.isSafeInteger(t.totalCharacters)&&(t.totalCharacters??-1)>=0&&t.pages.reduce((n,r)=>n+r.characterLength,0)===t.totalCharacters&&Number.isSafeInteger(t.byteLength)&&(t.byteLength??-1)>=0&&t.pages.reduce((n,r)=>n+r.byteLength,0)===t.byteLength&&Number.isSafeInteger(t.createdAtMs)&&(t.createdAtMs??-1)>=0}function $t(e){if(!e||typeof e!="object")return!1;let t=e;return Number.isSafeInteger(t.characterOffset)&&(t.characterOffset??-1)>=0&&Number.isSafeInteger(t.characterLength)&&(t.characterLength??0)>0&&Number.isSafeInteger(t.byteOffset)&&(t.byteOffset??-1)>=0&&Number.isSafeInteger(t.byteLength)&&(t.byteLength??0)>0&&b(t.hash)}function Ut(e){let t=0,n=0;for(let r of e){if(r.characterOffset!==t||r.byteOffset!==n)return!1;t+=r.characterLength,n+=r.byteLength}return!0}function oe(e){xe(e,{recursive:!0,mode:448});let t=ot(e);if(!t.isDirectory()||t.isSymbolicLink())throw new Error(`Output snapshot root is not a private directory: ${e}`);if(typeof process.getuid=="function"&&t.uid!==process.getuid())throw new Error(`Output snapshot root is not owned by the current user: ${e}`);process.platform!=="win32"&&it(e,448)}function kt(e){let t={...Et,...e};for(let[n,r]of Object.entries(t))if(!Number.isSafeInteger(r)||r<=0)throw new Error(`Output snapshot ${n} must be a positive integer.`);if(t.maxSnapshotBytes>t.maxAggregateBytes)throw new Error("Output snapshot maxSnapshotBytes cannot exceed maxAggregateBytes.");return t}function Ht(e,t,n,r){z(e,()=>{jt(e),ze(e,t,n,"active",r)})}function Ie(e,t,n,r,s){if(!Number.isSafeInteger(n)||n<0||n>s.maxSnapshotBytes)throw new Error(`Command output exceeds the ${s.maxSnapshotBytes}-byte snapshot limit.`);z(e,()=>{ze(e,t,n,r,s)})}function ze(e,t,n,r,s){if(!Number.isSafeInteger(n)||n<0||n>s.maxSnapshotBytes)throw new Error(`Command output exceeds the ${s.maxSnapshotBytes}-byte snapshot limit.`);let o=Mt(e),i=o.find(g=>g.snapshotId===t),a=o.reduce((g,d)=>g+d.reservedBytes,0)-(i?.reservedBytes??0)+n,c=o.length+(i?0:1);if(c>s.maxSnapshotCount||a>s.maxAggregateBytes)throw new Error(`Output snapshot capacity is full (${c}/${s.maxSnapshotCount} snapshots, ${a}/${s.maxAggregateBytes} bytes). Narrow the query or finish an existing pagination sequence before retrying.`);let p=Date.now(),h={version:ke,snapshotId:t,pid:process.pid,...X()?{processIdentity:X()}:{},reservedBytes:n,state:r,createdAtMs:i?.createdAtMs??p,updatedAtMs:p};_(S(e,t,"reserve"),h)}function Bt(e,t){z(e,()=>{Q(S(e,t,"reserve"),{force:!0})})}function Mt(e){let t=[];for(let n of Te(e,{withFileTypes:!0})){if(!n.isFile()||!n.name.endsWith(".reserve"))continue;let r=n.name.slice(0,-8);if(O(r))try{let s=JSON.parse(U(N(e,n.name),"output snapshot reservation"));if(!qe(s)||s.snapshotId!==r)throw new Error("reservation identity is invalid");t.push(s)}catch(s){throw new Error(`Output snapshot reservation ${n.name} is invalid; retry after its owning process or snapshot expires.`,{cause:s})}}return t}function qe(e){if(!e||typeof e!="object")return!1;let t=e;return t.version===ke&&typeof t.snapshotId=="string"&&O(t.snapshotId)&&Number.isSafeInteger(t.pid)&&(t.pid??0)>0&&(t.processIdentity===void 0||he(t.processIdentity)!==null&&t.processIdentity.pid===t.pid)&&Number.isSafeInteger(t.reservedBytes)&&(t.reservedBytes??-1)>=0&&(t.state==="active"||t.state==="complete")&&Number.isSafeInteger(t.createdAtMs)&&Number.isSafeInteger(t.updatedAtMs)}function jt(e){let t=Date.now();for(let n of Te(e,{withFileTypes:!0})){if(!n.isFile()||!n.name.endsWith(".reserve"))continue;let r=n.name.slice(0,-8);if(!O(r))continue;let s=null;try{let c=JSON.parse(U(N(e,n.name),"output snapshot reservation"));s=qe(c)?c:null}catch{s=null}let o=zt(S(e,r,"json")),i=s?.state==="active"&&le(s.pid)&&(s.processIdentity===void 0||(()=>{let c=J(s.pid);return c!==null&&ge(s.processIdentity,c)})()),a=s?t-s.updatedAtMs>te:!1;i||o&&!a||!o&&s&&!a&&s.state==="complete"||Ve(r,e)}}function zt(e){try{return ut(e),!0}catch{return!1}}function z(e,t){oe(e);let n=N(e,wt),r=Date.now()+Ot;for(;;){let s=fe(n,{kind:"output-snapshot-quota",processIdentity:X()});if(s.kind==="acquired")try{return t()}finally{s.lock.release()}if(Date.now()>=r)throw new Error("Output snapshot quota is busy. Retry the command.");Atomics.wait(It,0,0,bt)}}function X(){return F===void 0&&(F=J(process.pid)),F}function I(e,t){O(e)&&z(t,()=>Ve(e,t))}function Ve(e,t){for(let n of["json","output","tmp","reserve"])Q(S(t,e,n),{force:!0})}function S(e,t,n){if(!O(t))throw new Error("Output snapshot identifier is invalid.");return N(e,`${t}.${n}`)}function qt(e){if(!e)throw new Error("Incomplete output did not create a resumable snapshot.");return e}function Ee(e){return e>=55296&&e<=56319}function Vt(e,t,n,r){let s=Math.min(e.length,t);if(Ee(e.charCodeAt(s-1))&&(s-=1),Buffer.byteLength(e.slice(0,s))>n){let o=0,i=s;for(;o<i;){let a=Math.ceil((o+i)/2);Buffer.byteLength(e.slice(0,a))<=n?o=a:i=a-1}s=o,Ee(e.charCodeAt(s-1))&&(s-=1)}if(s<=0)throw new Error("Output page byte limit cannot contain one UTF-8 character.");if(r){let o=e.lastIndexOf(`
|
|
5
|
+
`,s-1);if(o>=0)return o+1}return s}function Dt(e){let t=Ft({pageIndex:e.nextPageIndex,snapshotId:e.snapshotId});return{cursor:t,command:ue(e.invocationPrefix,t)}}function Jt(e,t){let n="c".repeat(64),r={cursor:n,command:ue(t,n)};if(!e.json){let i="9".repeat(String(m).length),a=`[scip-query output page: characters ${i}-${i} of ${i}]
|
|
6
|
+
|
|
7
|
+
[Incomplete: ${i} characters remain. Continue exactly:
|
|
8
|
+
${r.command}]
|
|
9
|
+
`;return Pe(D,Buffer.byteLength(a),1)}let s={kind:K,schemaVersion:ee,producer:{name:"scip-query",version:e.producerVersion},command:e.command,contentType:"application/json",agentInstruction:"INCOMPLETE EVIDENCE: do not draw conclusions or report completion from this partial page. Run page.continuation.command exactly, then repeat until page.complete is true.",page:{offset:m,returnedCharacters:m,totalCharacters:m,omittedCharacters:m,remainingCharacters:m,complete:!1,outputHash:"f".repeat(64),continuation:r},content:""},o=Buffer.byteLength(`${JSON.stringify(s)}
|
|
10
|
+
`);return Pe($,o,2)}function Pe(e,t,n){let r=Math.floor((x-t)/n);if(r<w)throw new Error(`The command invocation leaves fewer than ${w} bytes for client-safe output content. Use a shorter executable path.`);return Math.min(e,r)}function Ft(e){return Ue.test(e.snapshotId)?e.pageIndex===1?e.snapshotId:`${e.snapshotId}.${e.pageIndex.toString(36)}`:`4.${Xt(e.snapshotId)}.${e.pageIndex.toString(36)}`}function Gt(e,t){let n=ae(e);if(!n)throw new Error("Invalid output cursor. Run the command again without --output-cursor.");if(n.version===3&&n.invocationHash!==t)throw new Error("This output cursor belongs to a different command, working directory, or argument set. Run again without --output-cursor.");return n}function ae(e){let t=vt.exec(e);if(t){let r=t[2]??"1",s=Number.parseInt(r,36);return Number.isSafeInteger(s)&&s>=1&&s.toString(36)===r?{version:4,pageIndex:s,snapshotId:t[1]}:null}let n=St.exec(e);if(n){let r=Yt(n[1]),s=Number.parseInt(n[2],36);return r&&Number.isSafeInteger(s)&&s>=1&&s.toString(36)===n[2]?{version:4,pageIndex:s,snapshotId:r}:null}try{let r=JSON.parse(Buffer.from(e,"base64url").toString("utf8"));return Wt(r)?r:null}catch{return null}}function $n(e,t=ne()){let n=ae(e);if(n)try{let r=ie(n.snapshotId,t);if(r.snapshotId!==n.snapshotId||n.version===3&&(r.invocationHash!==n.invocationHash||r.outputHash!==n.outputHash||r.pageSize!==n.pageSize)||Date.now()-r.createdAtMs>te||!r.pages[n.pageIndex])return;let s=r.pages[n.pageIndex];return{snapshotId:r.snapshotId,pageIndex:n.pageIndex,command:r.command,cwd:r.cwd,continuationCommand:ue(r.invocationPrefix,e),remainingCharacters:r.totalCharacters-s.characterOffset,totalCharacters:r.totalCharacters,outputHash:r.outputHash,createdAtMs:r.createdAtMs}}catch{return}}function Wt(e){if(!e||typeof e!="object")return!1;let t=e;return t.version===3&&b(t.invocationHash)&&Number.isSafeInteger(t.pageIndex)&&(t.pageIndex??-1)>=1&&Number.isSafeInteger(t.pageSize)&&(t.pageSize??0)>=w&&(t.pageSize??0)<=C&&b(t.outputHash)&&typeof t.snapshotId=="string"&&O(t.snapshotId)}function Xt(e){if(!re.test(e))throw new Error("Output snapshot identifier is invalid.");return Buffer.from(e.replaceAll("-",""),"hex").toString("base64url")}function Yt(e){let t=Buffer.from(e,"base64url");if(t.length!==16)return null;let n=t.toString("hex"),r=`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`;return re.test(r)?r:null}function O(e){return typeof e=="string"&&(Ue.test(e)||re.test(e))}function De(e,t,n,r){return A("sha256").update(JSON.stringify({command:e,cwd:t,invocationPrefix:n,argv:r})).digest("hex")}function Je(e){let t=[];for(let n=0;n<e.length;n+=1){let r=e[n];if(r==="--output-page-size"||r==="--output-cursor"){n+=1;continue}r.startsWith("--output-page-size=")||r.startsWith("--output-cursor=")||t.push(r)}return t}function Qt(e){return e.filter(t=>t!=="--raw-json"&&t!=="--raw-json=true")}function Fe(e,t,n){return Xe([...e,...t,"--output-page-size",String(n)])}function ue(e,t){return Xe([...e,ht,t])}function Ge(e){let t=e===void 0?["scip-query"]:[...e];if(!We(t))throw new Error("Output pagination invocation prefix must contain one to sixteen non-empty shell arguments.");return t}function We(e){return Array.isArray(e)&&e.length>0&&e.length<=16&&e.every(t=>typeof t=="string"&&t.length>0&&t.length<=2048&&!t.includes("\0")&&!t.includes("\r")&&!t.includes(`
|
|
11
|
+
`))}function Zt(e){return Array.isArray(e)&&e.length>0&&e.length<=256&&e.every(t=>typeof t=="string"&&t.length<=8192&&!t.includes("\0")&&!t.includes("\r")&&!t.includes(`
|
|
12
|
+
`))}function Xe(e){return e.map(t=>me(t,{omitSafeQuotes:!0})).join(" ")}function Kt(e){let t=e.page.continuation,n=Math.max(e.page.offset,e.page.offset+e.page.returnedCharacters-1),r=`[scip-query output page: characters ${e.page.offset}-${n} of ${e.page.totalCharacters}]
|
|
13
|
+
`,s=t?`
|
|
14
|
+
[Incomplete: ${e.page.remainingCharacters} characters remain. Continue exactly:
|
|
15
|
+
${t.command}]
|
|
16
|
+
`:`
|
|
17
|
+
[scip-query transport complete; evaluate command coverage separately]
|
|
18
|
+
`;return`${r}${e.content}${s}`}export{x as CLIENT_SAFE_OUTPUT_BYTES,mt as CLI_JSON_EXPORT_RECEIPT_KIND,yt as CLI_JSON_EXPORT_RECEIPT_SCHEMA_VERSION,ht as CLI_OUTPUT_CONTINUATION_COMMAND,K as CLI_OUTPUT_PAGE_KIND,ee as CLI_OUTPUT_PAGE_SCHEMA_VERSION,R as DEFAULT_OUTPUT_PAGE_SIZE,D as HUMAN_OUTPUT_PAGE_CONTENT_BYTES,$ as JSON_OUTPUT_PAGE_CONTENT_BYTES,ft as MAX_AGENT_OUTPUT_CHARACTERS,Re as MAX_AGENT_OUTPUT_PAGES,Oe as MAX_JSON_OUTPUT_FILE_BYTES,M as MAX_JSON_OUTPUT_PATH_LENGTH,j as MAX_OUTPUT_CURSOR_LENGTH,C as MAX_OUTPUT_PAGE_SIZE,gt as MAX_OUTPUT_SNAPSHOT_AGGREGATE_BYTES,Le as MAX_OUTPUT_SNAPSHOT_BYTES,lt as MAX_OUTPUT_SNAPSHOT_COUNT,Ne as MAX_OUTPUT_SNAPSHOT_PAGES,m as MAX_TRACKED_OUTPUT_CHARACTERS,w as MIN_OUTPUT_PAGE_SIZE,te as OUTPUT_SNAPSHOT_TTL_MS,Nn as continueCliOutput,Pt as decodeCliOutputPageEnvelope,$n as inspectPendingCliOutputCursor,Rn as parseOutputPageSize,Ln as requireCliOutputPageEnvelope,Ct as runWithCliOutputPagination};
|
|
19
|
+
//# sourceMappingURL=output-pagination-VAWOGX4R.js.map
|
package/dist/postinstall.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-BZYSGZRK.js";import"./chunk-F4FNK44D.js";import{existsSync as n,mkdirSync as i,symlinkSync as o,readlinkSync as r,unlinkSync as l,readdirSync as c}from"fs";import{join as u,dirname as p,resolve as d,relative as k,isAbsolute as g}from"path";import{homedir as m,platform as t}from"os";import{fileURLToPath as y}from"url";var h=t()==="win32";function s(){console.log("scip-query installed (Node.js 24 LTS recommended; minimum Node.js 22) -- run 'scip-query setup' in a repo to install skills and build the index.")}s();
|
|
3
3
|
//# sourceMappingURL=postinstall.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { S as ScipDatabase } from '../db-
|
|
1
|
+
import { S as ScipDatabase } from '../db-LKJXAlNS.js';
|
|
2
2
|
import 'better-sqlite3';
|
|
3
|
-
import '../config-types-
|
|
3
|
+
import '../config-types-Cm-VSEBb.js';
|
|
4
4
|
|
|
5
5
|
interface AffectedResult {
|
|
6
6
|
symbol: string;
|
|
@@ -8,8 +8,21 @@ interface AffectedResult {
|
|
|
8
8
|
file: string;
|
|
9
9
|
depth: number;
|
|
10
10
|
}
|
|
11
|
+
interface PossibleImpactCoverage {
|
|
12
|
+
status: 'accounted' | 'bounded' | 'incomplete';
|
|
13
|
+
edgeBasis: 'reverse-static-call-or-reference-evidence';
|
|
14
|
+
maxDepth: number;
|
|
15
|
+
reachedDepth: number;
|
|
16
|
+
perSymbolEvidenceLimit: number | null;
|
|
17
|
+
remainingFrontierSymbols: number;
|
|
18
|
+
reasons: string[];
|
|
19
|
+
}
|
|
20
|
+
interface PossibleImpactClosureResult {
|
|
21
|
+
rows: AffectedResult[];
|
|
22
|
+
coverage: PossibleImpactCoverage;
|
|
23
|
+
}
|
|
11
24
|
/**
|
|
12
|
-
*
|
|
25
|
+
* Bounded reverse closure of symbols that may consume a given symbol.
|
|
13
26
|
* BFS from the target through the mention graph: depth 1 = direct consumers,
|
|
14
27
|
* depth 2 = consumers of consumers, etc.
|
|
15
28
|
*/
|
|
@@ -17,5 +30,10 @@ declare function affected(db: ScipDatabase, symbolPattern: string, opts?: {
|
|
|
17
30
|
maxDepth?: number;
|
|
18
31
|
scope?: string;
|
|
19
32
|
}): AffectedResult[];
|
|
33
|
+
/** Conservative reverse reference/caller closure; rows are possible impacts, not predicted failures. */
|
|
34
|
+
declare function possibleImpactClosure(db: ScipDatabase, symbolPattern: string, opts?: {
|
|
35
|
+
maxDepth?: number;
|
|
36
|
+
scope?: string;
|
|
37
|
+
}): PossibleImpactClosureResult;
|
|
20
38
|
|
|
21
|
-
export { type AffectedResult, affected };
|
|
39
|
+
export { type AffectedResult, type PossibleImpactClosureResult, type PossibleImpactCoverage, affected, possibleImpactClosure };
|
package/dist/queries/affected.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a,b}from"../chunk-QD7IFBCR.js";import"../chunk-6BJ7SOY7.js";import"../chunk-63MBA7EG.js";import"../chunk-P5XHIJHI.js";import"../chunk-ICUQONOG.js";import"../chunk-ZDVDSDFG.js";import"../chunk-RGCJ4646.js";import"../chunk-ELNRLMC5.js";import"../chunk-LPGDO2XA.js";import"../chunk-MYUKI5VN.js";import"../chunk-7COHFNJK.js";import"../chunk-MTDBHTSF.js";import"../chunk-5IZTXSOL.js";import"../chunk-I3U2FN2T.js";import"../chunk-AA7K3XLM.js";import"../chunk-DMQ7ZKJG.js";import"../chunk-7HU2IJ2T.js";import"../chunk-MO226P4Q.js";export{a as affected,b as possibleImpactClosure};
|
|
2
2
|
//# sourceMappingURL=affected.js.map
|