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,4 @@
|
|
|
1
|
+
import{a as L}from"./chunk-BGBBVSH4.js";import{d as Pe}from"./chunk-WULAPQUD.js";import{a as I}from"./chunk-FTSQNONX.js";import{b}from"./chunk-OUB4J26T.js";import{b as de,d as me,e as ge,f as be,g as Se,h as ye,i as K,j as he,m as Re}from"./chunk-2I3RSUWX.js";import{a as pe}from"./chunk-4N6QSEMZ.js";import{b as F}from"./chunk-OIRWZIYL.js";import{c as ie}from"./chunk-GFLTPNWV.js";import{a as xe}from"./chunk-DHEQMPLW.js";import{J as re,K as P,M as se,P as oe,V as E,W as le,X as ue,Y as fe,Z as B,p as ee,r as te,s as w,v as R,w as ne}from"./chunk-SDPA5DKN.js";import{c as g,f as h}from"./chunk-VWLIOEEF.js";import{d as k,f as $,g as V,i as ae,j as ce}from"./chunk-DRENNWRG.js";import{e as J}from"./chunk-HGFDYOVB.js";import{da as T,ea as Q,fa as z,z as x}from"./chunk-4DCKBY6T.js";import{existsSync as A,readdirSync as Ee}from"fs";import{join as M}from"path";var ze={files:new Set,pathPrefixes:[]};var X=/^(?:dist|build|lib|out|output|esm|cjs|umd)\//,et=/\.(?:d\.ts|d\.mts|d\.cts|ts|tsx|mts|cts|js|jsx|mjs|cjs)$/,De=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs"],tt=new Set([".git",".next",".turbo","build","coverage","dist","node_modules","out"]),nt=4,rt=g("package-surface",{clearGroups:["whole-project"]}),fn=g("package-operational-surface",{clearGroups:["whole-project"]});function Me(t){return rt.get(t,()=>it(t.config.projectRoot))}function G(t,e){let n=Me(t);return n.files.has(e)?!0:n.pathPrefixes.some(r=>e.startsWith(r))}function ve(t,e){return Me(t).files.has(e)}function it(t){let e=new Set,n=[];for(let{manifest:r,packageRoot:s}of st(t))for(let i of ot(r))at(t,s,i,e,n);return e.size===0&&n.length===0?ze:{files:e,pathPrefixes:n}}function st(t){let e=[],n=Te(t,"");return n&&e.push({manifest:n,packageRoot:""}),Ce(t,"",e,0),e}function Ce(t,e,n,r){if(r>=nt)return;let s=M(t,e);if(A(s))for(let i of Ee(s,{withFileTypes:!0})){if(!i.isDirectory()||tt.has(i.name))continue;let o=e?`${e}/${i.name}`:i.name,a=Te(t,o);a&&n.push({manifest:a,packageRoot:o}),Ce(t,o,n,r+1)}}function Te(t,e){let n;try{n=T(t,M(e,"package.json"),{maxBytes:8*1024*1024,inputKind:"package manifest"})}catch(r){if(!Q(r))throw r;return null}try{let r=JSON.parse(n);return r&&typeof r=="object"?r:null}catch{return null}}function ot(t){let e=[];for(let r of["main","module","types","browser"])typeof t[r]=="string"&&e.push(t[r]);let n=t.bin;if(typeof n=="string")e.push(n);else if(n&&typeof n=="object")for(let r of Object.values(n))typeof r=="string"&&e.push(r);return we(t.exports,e),e}function we(t,e){if(typeof t=="string"){e.push(t);return}if(!(!t||typeof t!="object"))for(let n of Object.values(t))we(n,e)}function at(t,e,n,r,s){let i=n.replace(/\\/g,"/").replace(/^\.\//,"");if(i===""||i.startsWith(".."))return;let o=i.indexOf("*");if(o>=0){let l=i.slice(0,o);for(let u of ke(l))u!==""&&s.push(S(e,u));return}let a=i.replace(et,"");for(let l of ke(a)){l===a&&l===i&&r.add(S(e,i));for(let u of De)ct(t,r,e,l+u)}r.add(S(e,i))}function ke(t){let e=[t];return X.test(t)&&(e.push(t.replace(X,"src/")),e.push(t.replace(X,""))),e}function ct(t,e,n,r){let s=S(n,r);if(e.add(s),!r.startsWith("src/")||A(M(t,s)))return;let i=De.find(c=>r.endsWith(c));if(!i)return;let o=r.slice(0,-i.length);lt(t,e,n,o,i);let a=o.lastIndexOf("/");if(a<=4)return;let l=o.slice(0,a),u=o.slice(a+1);for(let c of Fe(t,n,l,`${u}${i}`))e.add(c)}function lt(t,e,n,r,s){let i=S(n,`${r}/index${s}`);A(M(t,i))&&e.add(i)}function Fe(t,e,n,r){let s=M(t,e,n);if(!A(s))return[];let i=[];for(let o of Ee(s,{withFileTypes:!0})){let a=`${n}/${o.name}`;o.isDirectory()?i.push(...Fe(t,e,a,r)):o.isFile()&&o.name===r&&i.push(S(e,a))}return i}function S(t,e){return t?`${t}/${e}`:e}import{existsSync as q,readdirSync as ut}from"fs";import{dirname as ft,join as U}from"path";var dt={rootFiles:new Set,sourcePrefixes:[]},pt=new Set([".git",".scipquery","node_modules","target"]),mt=6,gt=g("rust-library-surface",{clearGroups:["whole-project"]});function Ie(t,e,n){if(!n.endsWith(".rs")||!yt(bt(t),n))return!1;let r=E(t,n).find(s=>s.symbol===e);return r?ht(te(t,n)[r.startLine]??""):!1}function bt(t){return gt.get(t,()=>St(t.config.projectRoot))}function St(t){let e=new Set,n=new Set;for(let r of Rt(t)){let s=T(t,U(r,"Cargo.toml"),{maxBytes:8388608,inputKind:"Cargo manifest"}),i=xt(s),o=S(r,"src/lib.rs"),a=i?S(r,i):!Pt(s)&&z(t,o)?o:null;if(!a)continue;e.add(a);let l=ft(a).replaceAll("\\","/");n.add(l==="."?"":`${l}/`)}return e.size===0?dt:{rootFiles:e,sourcePrefixes:[...n].sort()}}function yt(t,e){return e.endsWith(".rs")?t.rootFiles.has(e)?!0:kt(e)?!1:t.sourcePrefixes.some(n=>e.startsWith(n)):!1}function ht(t){return/^\s*pub\s+(?!\()/.test(t)}function Rt(t){if(!q(t))return[];let e=[];return Le(t,"",e,0),e}function Le(t,e,n,r){let s=U(t,e);if(q(s)&&(q(U(s,"Cargo.toml"))&&n.push(e),!(r>=mt)))for(let i of ut(s,{withFileTypes:!0})){if(!i.isDirectory()||pt.has(i.name))continue;let o=e?`${e}/${i.name}`:i.name;Le(t,o,n,r+1)}}function xt(t){let e=!1;for(let n of t.split(`
|
|
2
|
+
`)){let r=n.replace(/\s+#.*$/,"").trim(),s=/^\[([^\]]+)\]$/.exec(r);if(s){e=s[1]==="lib";continue}if(!e)continue;let i=/^path\s*=\s*["']([^"']+)["']/.exec(r)?.[1];if(i)return i.replaceAll("\\","/").replace(/^\.\//,"")}return null}function Pt(t){let e=!1;for(let n of t.split(`
|
|
3
|
+
`)){let r=n.replace(/\s+#.*$/,"").trim(),s=/^\[([^\]]+)\]$/.exec(r);if(s){e=s[1]==="package";continue}if(e&&/^autolib\s*=\s*false\b/.test(r))return!0}return!1}function kt(t){return/(?:^|\/)src\/main\.rs$/.test(t)||/(?:^|\/)src\/bin\//.test(t)||/(?:^|\/)(?:examples|tests|benches)\//.test(t)}function Et(t){return Dt.get(t,()=>{let n=h(t,{includeIgnored:!1}).filter(o=>{let a=b(o);return a==="entry"||a==="worker"});if(n.length===0)return new Set;let r=F(t),s=new Set,i=new Set;for(;n.length>0;){let o=n.shift();if(!s.has(o)){s.add(o),b(o)==="barrel"&&i.add(o);for(let a of r.get(o)??[])s.has(a)||n.push(a)}}return i})}var Dt=g("live-barrels",{clearGroups:["whole-project"]});function Mt(t,e){return Et(t).has(x(e))}function Ne(t,e){let n=x(e),r=b(e);return r==="entry"||r==="worker"||Gt(n)||Mt(t,n)}function vt(t,e,n){let r=x(n),s=[];G(t,r)&&s.push("package-surface-file"),wt(t,e,r)&&s.push("transitive-package-surface"),Ie(t,e,r)&&s.push("rust-public-library"),Xt(e,r)&&s.push("framework-entrypoint");let i=t.config.entryRoots;return i&&(i.files?.some(o=>x(o)===r)&&s.push("configured-file"),i.pathPrefixes?.some(o=>r.startsWith(x(o)))&&s.push("configured-path-prefix"),i.qualifiedVars?.some(o=>Ut(e,o))&&s.push("configured-qualified-var"),i.symbolPatterns?.some(o=>{try{return xe(o,"entryRoots.symbolPatterns entry").test(e)}catch{return!1}})&&s.push("configured-symbol-pattern")),s}function _e(t,e,n){return vt(t,e,n).length>0}var Ct=g("package-surface-reachability",{clearGroups:["whole-project"]}),Tt=g("explicit-package-surface-reachability",{clearGroups:["whole-project"]});function wt(t,e,n){let r=Ft(t).get(n);return r===void 0?!1:r===null||r.has(k(e))}function In(t,e,n){let r=It(t).get(n);return r===void 0?!1:r===null||r.has(k(e))}function Ft(t){return Ct.get(t,()=>je(t,e=>G(t,e)))}function It(t){return Tt.get(t,()=>je(t,e=>ve(t,e)))}function je(t,e){let n=new Map,r=[];for(let s of h(t,{includeIgnored:!1}))e(s)&&(n.set(s,null),r.push(s));for(;r.length>0;){let s=r.shift(),i=n.get(s);if(i!==void 0)for(let o of se(t,s)){if(!o.sourcePath||t.isIgnored(o.sourcePath))continue;let a=Lt(i,o);a!==void 0&&At(n,o.sourcePath,a)&&r.push(o.sourcePath)}}return n}function Lt(t,e){if(t===null)return e.kind==="named"?new Set(e.names):null;if(e.kind==="star")return new Set(t);if(e.kind==="star-as")return e.names.some(r=>t.has(r))?null:void 0;let n=e.names.filter(r=>t.has(r));return n.length>0?new Set(n):void 0}function At(t,e,n){if(!t.has(e))return t.set(e,n),!0;let r=t.get(e);if(r===void 0)return!1;if(r===null||n===null)return r===null?!1:(t.set(e,null),!0);let s=!1;for(let i of n)r.has(i)||(r.add(i),s=!0);return s}var Oe=new Set(["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]),Nt=new Set(["default","generateMetadata","generateStaticParams"]),_t=new Set(["default","getStaticProps","getServerSideProps","getStaticPaths","config"]),jt=new Set(["default","middleware","config"]),Ot=new Set(["register","onRequestError"]),$t=new Set(["onRouterTransitionStart"]),Vt=new Set(["default","loader","action","clientLoader","clientAction","headers","links","meta","shouldRevalidate","ErrorBoundary","HydrateFallback"]),Bt=new Set(["load","actions","entries",...Oe]),Kt=new Set(["default"]);function Xt(t,e){let n=k(t);return n===""?!1:$e(e)?Oe.has(n):Ve(e)?Nt.has(n):Be(e)?_t.has(n):Ke(e)?jt.has(n):Xe(e)?Ot.has(n):Ge(e)?$t.has(n):qe(e)?Vt.has(n):Ue(e)?Bt.has(n):qt(e)?Kt.has(n):!1}function Gt(t){return $e(t)||Ve(t)||Be(t)||Ke(t)||Xe(t)||Ge(t)||qe(t)||Ue(t)}function $e(t){return/(?:^|\/)app(?:\/[^/]+)*\/route\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function Ve(t){return/(?:^|\/)app(?:\/[^/]+)*\/(?:page|layout|template|loading|error|not-found|global-error|head|default)\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function Be(t){return/(?:^|\/)pages\/.+\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function Ke(t){return W(t,"(?:middleware|proxy)\\.(?:ts|js|mts|mjs)")}function Xe(t){return W(t,"instrumentation\\.(?:ts|js|mts|mjs)")}function Ge(t){return W(t,"instrumentation-client\\.(?:ts|js|mts|mjs)")}function W(t,e){return new RegExp(`^(?:src/)?${e}$`).test(t)||new RegExp(`(?:^|/)src/${e}$`).test(t)||new RegExp(`(?:^|/)(?:apps|services|packages)/[^/]+/(?:src/)?${e}$`).test(t)}function qe(t){return/(?:^|\/)app\/routes\/.+\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function Ue(t){return/(?:^|\/)src\/routes\/(?:.*\/)?\+(?:page|page\.server|layout|layout\.server|server)\.(?:ts|js)$/.test(t)}function qt(t){return/(?:^|\/)src\/(?:pages|views|routes)\/.+\.(?:ts|tsx|js|jsx|vue)$/.test(t)}function Ut(t,e){let n=e.lastIndexOf("/");if(n<0)return!1;let r=e.slice(0,n),s=e.slice(n+1);return t.includes(Ae(r)+"/")&&t.includes(Ae(s)+".")}function Ae(t){return/^[A-Za-z0-9_$+-]+$/.test(t)?t:"`"+t.replace(/`/g,"``")+"`"}function We(t,e,n={}){let r=new Map;if(e&&e.length===0)return r;let s=h(t,{includeIgnored:!1}),i=be(t),o=e??le(t),a=new Set(o.map(u=>u.symbolId)),l=zt(o);return Wt(t,r,s,i,a,l),Ht(t,r,o,a),Qt(t,r,s,i,a,l),n.semantic!==!1&&n.semanticEvidence&&tn(r,n.semanticEvidence.callerMap(t,en(o))),r}function Wt(t,e,n,r,s,i){for(let o of n){if(!R(o))continue;let a=re(t,o);if(a)for(let l of a){if(i&&!i.has(l.calleeLeaf))continue;let u=me(o,r.get(l.calleeLeaf)??[]);if(!u||u.length===0)continue;let c=ge(t,o,u,l.memberAccess,l.calleeQualifier);c&&s.has(c.symbolId)&&c.file!==o&&H(e,c.symbolId,o)}}}function Ht(t,e,n,r){let s=Zt(n);for(let i of Yt(t,r))t.isIgnored(i.relative_path)||Jt(i,s.get(i.symbol_id))||H(e,i.symbol_id,i.relative_path)}function Yt(t,e){return pe(t,e?[...e]:void 0)}function Zt(t){let e=new Map;for(let n of t)e.set(n.symbolId,{docId:n.documentId,startLine:n.startLine,endLine:n.endLine});return e}function Jt(t,e){return!!e&&e.docId===t.document_id&&t.chunk_start>=e.startLine&&t.chunk_end<=e.endLine}function Qt(t,e,n,r,s,i){for(let o of n){if(R(o)!=="rust")continue;let a=P(t,o,{includeRustAttributeNames:!0});if(a.length!==0)for(let{name:l}of a){if(i&&!i.has(l))continue;let u=r.get(l);if(u)for(let c of u)s.has(c.symbolId)&&c.file!==o&&H(e,c.symbolId,o)}}}function H(t,e,n){let r=t.get(e);r||(r=new Set,t.set(e,r)),r.add(n)}function zt(t){let e=new Set;for(let n of t){let r="leaf"in n&&typeof n.leaf=="string"?n.leaf:"symbol"in n&&typeof n.symbol=="string"?k(n.symbol):"";r&&e.add(r)}return e.size>0?e:null}function en(t){return t.filter(e=>"relativePath"in e&&"symbol"in e&&"leaf"in e)}function tn(t,e){for(let[n,r]of e){let s=t.get(n);s||(s=new Set,t.set(n,s));for(let i of r)s.add(i)}}function Y(t,e,n={}){return We(t,e,n)}function Z(t,e,n={}){return Re(t,e,n)}function He(t,e,n={}){let r=Y(t,e,{semantic:n.semantic,semanticEvidence:n.semanticEvidence});return n.sourceFallback===!1?r:nn(r,Z(t,e))}function nn(t,e){let n=new Map;for(let[r,s]of t)n.set(r,new Set(s));for(let[r,s]of e){let i=n.get(r)??new Set;for(let o of s)i.add(o);n.set(r,i)}return n}function Ye(t,e,n){let r=e.identifierResolution==="strict"?K:he,s=e.candidateNames?Se(e.candidateNames):null,i=0,o=0,a=0,l=0,u="";for(let c of e.paths)if(i+=1,u=c,!(!R(c)&&!(e.includeVueSfc&&ne(c)))&&!t.isIgnored(c)&&!e.skipPath?.(c))try{if(s&&!ye(ee(t,c),s))continue;o+=1;let v=(d,m,j,D)=>{if(e.candidateNames&&!e.candidateNames.has(d))return;a+=1;let C=e.resolveTargets?e.resolveTargets({sourceFile:c,name:d,kind:m,defaultTargets:D}):D();for(let O of C)l+=1,n({sourceFile:c,name:d,target:O,occurrences:j,kind:m})},_=de(t,c);for(let[d,m]of _)v(d,"identifier",m.length,()=>r(t,c,d));for(let d of P(t,c,{includeCrossLanguageDispatchNames:e.includeCrossLanguageDispatchNames,includeRustAttributeNames:e.includeRustAttributeNames})){let m=d.kind==="cross-language-dispatch"?()=>K(t,c,d.name):()=>r(t,c,d.name);v(d.name,d.kind,d.occurrences,m)}}finally{e.afterPath?.(c),i%10===0&&J("source-reference-scan.progress",()=>{},()=>({scannedPaths:i,currentPath:u,candidateMatchedPaths:o,visitedNames:a,visitedHits:l}))}}function Ze(t,e={}){let{scope:n,files:r,minLoc:s=1,maxLoc:i=Number.POSITIVE_INFINITY,excludeSymbol:o,excludeEntrySurfaces:a=!1,excludeTypesFiles:l=!1,excludeRootedSymbols:u=!1,requireFunctionLikeSymbol:c=!1,requireCallableSymbol:N=!1,excludeRustTraitImplMembers:v=!1,includeSuppressed:_=!1,sortByLocDesc:d=!1}=e,m=[],j=rn(t,{scope:n,files:r,requireFunctionLikeSymbol:c,requireCallableSymbol:N}),D=new Map,C=new Map,O=f=>{let p=D.get(f);if(p!==void 0)return p;let y=Ne(t,f);return D.set(f,y),y},Qe=f=>{let p=C.get(f);if(p!==void 0)return p;let y=b(f);return C.set(f,y),y};for(let f of j){let p=f.relativePath;if(t.isIgnored(p)||a&&O(p)||!sn(f,{requireFunctionLikeSymbol:c,requireCallableSymbol:N})||o!==void 0&&f.symbol===o)continue;let y=L(f);y<s||y>i||l&&on(p)||u&&_e(t,f.symbol,p)||v&&ae(f.symbol)||Qe(p)!=="test"&&(ce(f.symbol)||!_&&w(t,p,f.startLine)||m.push(f))}return d?m.sort((f,p)=>L(p)-L(f)):m}function rn(t,e){return e.files!==void 0?[...new Set(e.files.map(r=>r.replace(/\\/g,"/")))].sort().filter(r=>!e.scope||r.includes(e.scope)).flatMap(r=>E(t,r)):e.requireCallableSymbol?B(t,{scope:e.scope,symbolMatches:$,sqlPrefilter:"callable"}):e.requireFunctionLikeSymbol?B(t,{scope:e.scope,symbolMatches:V,sqlPrefilter:"function-like"}):fe(t,e.scope)}function sn(t,e){return e.requireCallableSymbol?$(t.symbol):e.requireFunctionLikeSymbol?V(t.symbol):t.isFunctionLike}function on(t){return(t.split("/").pop()??"").includes("types")}var Je=class{constructor(e){this.db=e}db;scopedDefinitions(e){return ue(this.db,e)}definitionsForFile(e){return E(this.db,e)}productionCallableDefinitions(e={}){return Ze(this.db,e)}calleeMap(e,n={}){return Pe(this.db,e,{...n,semanticEvidence:I})}crossFileCallerMap(e,n={}){return Y(this.db,e,{...n,semanticEvidence:I})}sourceFallbackCallerFiles(e,n={}){return Z(this.db,e,n)}callerFileMap(e,n={}){return He(this.db,e,{...n,semanticEvidence:I})}frameworkReferencedSymbolIds(e){let n=new Map;for(let s of e){if(!s.leaf)continue;let i=n.get(s.leaf)??[];i.push(s.symbolId),n.set(s.leaf,i)}let r=new Set;for(let s of h(this.db,{includeIgnored:!1}))if(R(s)==="rust")for(let{name:i}of P(this.db,s,{includeRustAttributeNames:!0}))for(let o of n.get(i)??[])r.add(o);return r}symbolsWithNonSelfCallees(e,n={}){if(e.length===0)return new Set;let r=new Map(e.map(i=>[i.symbolId,i.symbol])),s=this.calleeMap(e,n);return new Set([...s.entries()].filter(([i,o])=>{let a=r.get(i);return o.some(l=>l.symbol!==a)}).map(([i])=>i))}fileDependencyGraph(e){return F(this.db,e)}fileKind(e){return b(e)}hasSuppressionComment(e){return w(this.db,e.relativePath,e.startLine)}sourceFiles(){return ie(this.db)}scanSourceReferences(e,n){Ye(this.db,e,n)}callableSignature(e){let n=oe(this.db).forFile(e.relativePath,{facts:!0}).facts?.callables.find(r=>r.startLine===e.startLine&&r.endLine===e.endLine);return n?{paramCount:n.paramCount}:null}};export{Ne as a,vt as b,In as c,Je as d};
|
|
4
|
+
//# sourceMappingURL=chunk-ZBNL3QCY.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as f,e as v,g as y}from"./chunk-SEUJVWT2.js";import{v as h,x as m,y as a}from"./chunk-SF7X6QNW.js";import{d as u}from"./chunk-DOPCR5BY.js";import{m as S}from"./chunk-G6OGPXJW.js";import{c as l}from"./chunk-3VLJ2DCA.js";import{n as d,o as p}from"./chunk-4DCKBY6T.js";import{randomUUID as j}from"crypto";import{resolve as b}from"path";var o=class{loadModule;discoverTsconfigs;createProjects;createProvider;db;module=null;projects=null;provider=null;stats={providerRequests:0,sessionsCreated:0,sessionsReused:0,sessionsRefreshed:0,sessionsReplaced:0,projectsCreated:0};constructor(t,e={}){this.db=t,this.loadModule=e.loadModule??h,this.discoverTsconfigs=e.discoverTsconfigs??v,this.createProjects=e.createProjects??m,this.createProvider=e.createProvider??((r,i,n)=>y(r,i,n,{reusedProjects:!0}))}semanticProvider(){return this.stats.providerRequests+=1,this.provider?(this.stats.sessionsReused+=1,this.provider):this.createSession()}advanceGeneration(t,e){let r=T(e);return this.provider?.dispose?.(),this.provider=null,this.db=t,this.projects?r.mode==="replace"?(this.projects=null,this.module=null,this.stats.sessionsReplaced+=1,r):(r.mode==="refresh"&&(M(this.projects,t.config.projectRoot,r),this.stats.sessionsRefreshed+=1),r):r}snapshotStats(){return{...this.stats}}dispose(){this.provider?.dispose?.(),this.provider=null,this.projects=null,this.module=null}createSession(){let t=this.module??this.loadModule();if(!t)return this.provider=a("ts-morph is not installed"),this.provider;if(this.module=t,!this.projects){let e=this.discoverTsconfigs(this.db);if(e.length===0)return this.provider=a("no tsconfig found"),this.provider;this.projects=this.createProjects(t,e),this.stats.projectsCreated+=this.projects.length}return this.provider=this.createProvider(this.db,t,this.projects),this.stats.sessionsCreated+=1,this.provider}};function T(s){let t=new Set;s.projectIdentityChanged&&t.add("project-identity-changed");for(let n of s.uncertainty)t.add(n);for(let n of s.changes)n.inputKind!=="source"&&t.add(`${n.inputKind}-input-changed`);if(t.size>0)return{mode:"replace",addedFiles:[],modifiedFiles:[],deletedFiles:[],reasons:[...t].sort()};let e=c(s.changes,"added"),r=c(s.changes,"modified"),i=c(s.changes,"deleted");return{mode:e.length+r.length+i.length===0?"reuse":"refresh",addedFiles:e,modifiedFiles:r,deletedFiles:i,reasons:[]}}function c(s,t){return s.filter(e=>e.kind===t).map(e=>e.path).sort()}function M(s,t,e){for(let r of s){for(let i of e.deletedFiles)r.project.getSourceFile(b(t,i))?.forget();for(let i of e.modifiedFiles){let n=r.project.getSourceFile(b(t,i));n&&n.refreshFromFileSystemSync()}e.addedFiles.length>0&&r.project.addSourceFilesFromTsConfig(r.tsconfigPath)}}var g=class{openDb;createHost;generationIdentity;readSnapshot;now;db=null;host=null;generation=null;snapshot=null;requests=0;lastRequestAtMs=null;lastError=null;available=null;constructor(t){this.openDb=t.openDb,this.createHost=t.createHost??(e=>new o(e)),this.generationIdentity=t.generationIdentity?e=>t.generationIdentity(e.config.dbPath):e=>e.generation.identity,this.readSnapshot=t.readSnapshot?e=>t.readSnapshot(e.config.dbPath):I,this.now=t.now??Date.now}handle(t,e){try{this.syncGeneration(t);let r=this.host.semanticProvider();switch(this.available=r.availability().available,this.requests+=1,this.lastRequestAtMs=this.now(),this.lastError=null,e.kind){case"availability":return r.availability();case"import-usage":return r.importUsage(e.file);case"references":return[...R(r,e.definitions,{exact:e.exact===!0})];case"reference-fragments":if(!r.referenceFragmentsForFiles)throw new Error("TypeScript provider does not support reference fragments.");return[...r.referenceFragmentsForFiles(e.files)];case"callees":return[...w(r,e.definitions)];case"signature":return r.signatureFor(e.definition);default:return E(e)}}catch(r){throw this.lastError=r instanceof Error?r.message:String(r),r}}status(t){let e=this.host?.snapshotStats();return{protocolVersion:f,state:this.lastError?"error":this.host?this.available?"ready":"unavailable":"idle",requests:this.requests,...this.lastRequestAtMs===null?{}:{lastRequestAt:new Date(this.lastRequestAtMs).toISOString()},...this.lastError?{lastError:this.lastError}:{},sessionsCreated:e?.sessionsCreated??0,sessionsReused:e?.sessionsReused??0,sessionsRefreshed:e?.sessionsRefreshed??0,sessionsReplaced:e?.sessionsReplaced??0,projectsCreated:e?.projectsCreated??0,...t?{mailbox:t}:{}}}closeTypeScriptService(){this.host?.dispose(),this.db?.close(),this.host=null,this.db=null,this.generation=null,this.snapshot=null,this.available=null}syncGeneration(t){if(this.generation===t&&this.host&&this.db)return;let e=this.openDb(),r=this.generationIdentity(e);if(!r||r!==t)throw e.close(),new Error("TypeScript semantic request does not match the currently published index generation.");let i=this.readSnapshot(e);if(!this.host||!this.db)this.db=e,this.host=this.createHost(e);else{let n=this.db;this.host.advanceGeneration(e,C(this.snapshot,i)),this.db=e,n.close()}this.generation=r,this.snapshot=i,this.available=null}};function z(s){S(s)}function R(s,t,e){return s.referencesForDefinitions?.(t,e)??new Map(t.map(r=>[r.symbolId,s.referencesFor(r)]))}function w(s,t){return s.calleesForDefinitions?.(t)??new Map(t.map(e=>[e.symbolId,s.calleesFor(e)]))}function I(s){if(!s.generation.metadataRaw)return null;let t=u(s.generation.metadataRaw);return t.kind!=="legacy"&&t.kind!=="supported"||!t.capabilities.usableForEvidenceCache?null:d(t.metadata.fingerprint)}function C(s,t){return t?p(s,t):{version:1,changes:[],projectIdentityChanged:!0,uncertainty:["prior-snapshot-unavailable"]}}function E(s){throw new Error(`Unhandled TypeScript semantic request: ${JSON.stringify(s)}`)}var X=`typescript-semantic-${process.pid}-${j()}`,P=l(process.pid),K={pid:process.pid,...P?{processIdentity:P}:{}};export{g as a,z as b};
|
|
2
|
+
//# sourceMappingURL=chunk-ZD3Z54IW.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{G as Re,I as we,a as k,b as me,e as ye,o as G}from"./chunk-MYUKI5VN.js";import{b as L}from"./chunk-7COHFNJK.js";import{a as he}from"./chunk-AA7K3XLM.js";import{d as be,g as X,r as Y,u as Se,w as xe}from"./chunk-DMQ7ZKJG.js";import{d as Me,e as Ie}from"./chunk-7HU2IJ2T.js";import{E as fe,H as x,Q as ge,R as B,S as K,g as ae,i as ce,m as de,o as c,s as le,t as ue,v as pe}from"./chunk-MO226P4Q.js";import{execFileSync as Be}from"child_process";import{createHash as Xe}from"crypto";import{existsSync as N,statSync as Ye}from"fs";import{createRequire as Qe}from"module";import{platform as Ze}from"os";import{dirname as ve,join as F}from"path";var et=Qe(import.meta.url),un={language:"rust",indexerBinary:"rust-analyzer",installUrl:"https://github.com/rust-lang/rust-analyzer"};function Q(t){return[t.indexerBinary,...t.binaryAliases??[]]}function tt(t){let e=Q(t);return e.length===1?e[0]:e.join(" or ")}function Z(t){for(let e of Q(t)){let n=we(e);if(n)return n}return rt(t)}function pn(t){return Z(t)!==null||nt(t)}function nt(t){return Fe(t)!==null}function rt(t){let e=Fe(t);if(!e)return null;let r=JSON.parse(x(e,"indexer package manifest")).bin;if(!r)return null;if(typeof r=="string")return F(ve(e),r);for(let i of Q(t)){let o=r[i];if(o)return F(ve(e),o)}return null}function Fe(t){if(!t.bundledNpmPackage)return null;try{return et.resolve(`${t.bundledNpmPackage}/package.json`)}catch{return null}}function it(t,e){for(let n of t.projectLocalBinaries??[]){let r=F(e,n);if(N(r))return r}return null}function ot(t,e){for(let n of t.projectLocalBinaries??[]){let r=F(e,n);if(N(r))return Pe(e,n,r)}return null}function mn(t,e){let n=st(t,e);if(!n||n.canonicalPath!==e.canonicalPath||n.sha256!==e.sha256||n.size!==e.size||n.mtimeMs!==e.mtimeMs||n.device!==e.device||n.inode!==e.inode||n.executable!==e.executable)throw new Error(`refusing changed project-local indexer ${e.relativePath}; review the current file and rerun with --trust-project-tools`)}function st(t,e){try{return Pe(t,e.relativePath,e.configuredPath)}catch{return null}}function Pe(t,e,n){let r={maxBytes:268435456,inputKind:"project-local indexer"},i=Me(t,e,r),o=Ie(t,e,r),s=Ye(i.absolutePath);return{configuredPath:n,canonicalPath:i.absolutePath,relativePath:e,sha256:Xe("sha256").update(o).digest("hex"),size:i.size,mtimeMs:i.mtimeMs,device:i.device,inode:i.inode,executable:(s.mode&73)!==0}}function at(t,e,n={}){return(n.trustProjectTools?ot(t,e)?.canonicalPath:null)??Z(t)}function fn(t,e=process.env,n=t.indexerBinary){if(t.indexerBinary!=="scip-dotnet"||ee(n,e))return e;let r=Ae(n,e);return r?{...e,DOTNET_ROOT:r}:e}function yn(t,e,n={}){let r=tt(t),i=e?at(t,e,n):Z(t);if(!i)return{language:t.language,binaryLabel:r,installed:!1,runnable:!1,resolvedBinary:null,installUrl:t.installUrl,...e&&it(t,e)?{note:"project-local indexer available only with --trust-project-tools"}:{}};if(t.indexerBinary!=="scip-dotnet")return{language:t.language,binaryLabel:r,installed:!0,runnable:!0,resolvedBinary:i};let o=ct(i);return{language:t.language,binaryLabel:r,installed:!0,runnable:o.runnable,resolvedBinary:i,installUrl:t.installUrl,note:o.note}}function ct(t){if(ee(t,process.env))return{runnable:!0};let e=Ae(t,process.env);if(e)return{runnable:!0,note:`using .NET 9 runtime from ${e}`};let n=Te(process.env);return{runnable:!1,note:n.length>0?`.NET 9 runtime still unavailable after checking ${n.join(", ")}`:"binary is present, but scip-dotnet still needs a .NET 9 runtime"}}function Ae(t,e){for(let n of Te(e))if(ee(t,{...e,DOTNET_ROOT:n}))return n;return null}function Te(t){let e=[],n=t.DOTNET_ROOT;if(n&&N(n)&&e.push(n),Ze()==="darwin"&&Re("brew"))try{let r=Be("brew",["--prefix","dotnet@9"],{stdio:"pipe",env:t,timeout:1e4,killSignal:"SIGKILL"}).toString().trim(),i=F(r,"libexec");N(i)&&!e.includes(i)&&e.push(i)}catch{}return e}function ee(t,e){try{return Be(t,["--version"],{stdio:"pipe",env:e,timeout:1e4,killSignal:"SIGKILL"}),!0}catch{return!1}}var dt=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs"];function C(t){let e=t.toLowerCase();return dt.some(n=>e.endsWith(n))}function q(t){let e=O(t.projectFiles),n=new Set(e),r=new Map(t.snapshot.files.map(d=>[d.path,d])),i=t.snapshot.files.filter(d=>{let f=ae(d.path,["typescript"]);return f==="config"||f==="ambient"}).map(d=>d.path),o=O([...e,...i]),s=o.find(d=>!r.has(d)),a=new Set(t.snapshot.files.map(d=>d.path)).size!==t.snapshot.files.length,l=!s&&o.some(d=>Ee(r.get(d))),p=X(JSON.stringify({pnpmWorkspaces:t.snapshot.pnpmWorkspaces,typescriptProjectMode:t.snapshot.typescriptProjectMode,typescriptProjects:O(t.snapshot.typescriptProjects),membership:e})),u=new Map;return{identityFor(d,f){if(!n.has(d))return I("target-outside-project");if(a)return I("duplicate-input-path");if(s)return I("missing-input-fingerprint");if(l)return I("unreadable-input");let g=[],m,S;if(t.graph===null)g.push("dependency-graph-unavailable"),S="whole-project",m=o;else{let j=ut(d,t.graph,u);if(j.find(V=>!r.has(V)))return I("missing-input-fingerprint");if(m=O([...j,...i]),m.some(V=>Ee(r.get(V))))return I("unreadable-input");S="dependency-closure"}let D=m.map(j=>pt(r.get(j)));return{version:1,key:X(JSON.stringify({version:1,engineIdentity:t.engineIdentity,schemaVersion:f,projectIdentity:p,inputs:D})),mode:S,inputFiles:m,reasons:g}}}}function lt(t,e){let n=new Set,r=[t];for(let i=0;i<r.length;i+=1){let o=r[i];if(!(o===void 0||n.has(o))){n.add(o);for(let s of[...e.get(o)??[]].sort())n.has(s)||r.push(s)}}return[...n].sort()}function ut(t,e,n){let r=n.get(t);if(r)return r;let i=lt(t,e);return n.set(t,i),i}function pt(t){return{path:t.path,size:t.size,hash:t.hash}}function Ee(t){return t.size<0||t.hash==="unreadable"}function I(t){return{version:1,key:null,mode:"unkeyed",inputFiles:[],reasons:[t]}}function O(t){return[...new Set(t)].sort()}import{createRequire as mt}from"module";var De=mt(import.meta.url),P,$;function ft(){if(P!==void 0)return P;try{P=De("ts-morph")}catch{P=null}return P}function _(){if($)return $;let t=ft();if(!t)return"ts-morph:unavailable";let e="unknown";try{e=De("ts-morph/package.json").version??"unknown"}catch{}return $=`ts-morph:${e}:typescript:${t.ts.version}`,$}function In(t,e){return e.map(n=>({tsconfigPath:n,project:new t.Project({tsConfigFilePath:n,skipFileDependencyResolution:!0})}))}function Rn(t,e,n){return{language:"typescript",availability:()=>({available:!1,reason:t,tsconfigPath:e,tsconfigPaths:n}),importUsage:()=>[],referencesFor:()=>[],calleesFor:()=>[],signatureFor:()=>null}}var yt=be("typescript-semantic-identity-context",{clearGroups:["whole-project"]});function te(t,e,n){let r=yt.get(t,()=>gt(t));if(!r)return null;let i=`${n}\0${e}`,o=r.identities.get(i);if(o)return o;let s=r.builder.identityFor(e,n);return r.identities.set(i,s),s}function A(t){return he(t,{includeIgnored:!1}).filter(C).sort()}function gt(t){try{if(!t.generation.metadataRaw)return null;let e=pe(t.generation.metadataRaw);if(e.kind!=="legacy"&&e.kind!=="supported"||!e.capabilities.usableForEvidenceCache)return null;let n=ce(e.metadata.fingerprint);return n?{builder:q({projectFiles:A(t),snapshot:n,graph:L(t),engineIdentity:_()}),identities:new Map}:null}catch{return null}}function W(t,e){let n=new Map(t.map(i=>[i.symbol,i])),r=new Map(t.map(i=>[i.symbolId,[]]));for(let i of e.values())for(let o of i){let s=n.get(o.targetSymbol);s&&r.get(s.symbolId).push(o.location)}for(let[i,o]of r)r.set(i,bt(o));return r}function Le(t,e,n){let r=ke(t,e),i=ke(t,n),o=[...r].filter(d=>!i.has(d)).sort(),s=[...i].filter(d=>!r.has(d)).sort(),a=je(t,e),l=je(t,n),p=[...a].filter(d=>!l.has(d)).sort(),u=[...l].filter(d=>!a.has(d)).sort();return{passed:o.length===0&&s.length===0,expectedCount:r.size,actualCount:i.size,missing:o,extra:s,callerFiles:{passed:p.length===0&&u.length===0,expectedCount:a.size,actualCount:l.size,missing:p,extra:u}}}function je(t,e){let n=new Set;for(let r of t)for(let i of e.get(r.symbolId)??[])i.file!==r.relativePath&&n.add(`${r.symbol}\0${i.file}`);return n}function kn(t,e,n){let r=new Set(n),i=new Map(n.map(o=>[o,[]]));for(let o of t)for(let s of e.get(o.symbolId)??[])r.has(s.file)&&i.get(s.file).push({targetSymbol:o.symbol,location:s});for(let[o,s]of i)i.set(o,ht(s));return i}function ke(t,e){let n=new Set;for(let r of t)for(let i of e.get(r.symbolId)??[])n.add(`${r.symbol}\0${i.file}\0${i.line}\0${i.column}`);return n}function bt(t){let e=new Map;for(let n of t)e.set(`${n.file}\0${n.line}\0${n.column}`,n);return[...e.values()].sort(Ne)}function ht(t){let e=new Map;for(let n of t){let{location:r}=n;e.set(`${n.targetSymbol}\0${r.file}\0${r.line}\0${r.column}`,n)}return[...e.values()].sort((n,r)=>n.targetSymbol.localeCompare(r.targetSymbol)||Ne(n.location,r.location))}function Ne(t,e){return t.file.localeCompare(e.file)||t.line-e.line||t.column-e.column}var ne="typescript-reference-fragment-v2",U=Se({kind:"typescript-reference-fragments",invalidation:xe("typescript-reference-fragments"),serialize:t=>JSON.stringify(t),deserialize:xt});function Un(t,e,n,r=t){let i=A(t),o=q({projectFiles:i,snapshot:e,graph:L(t),engineIdentity:_()}),s=[...n].map(([a,l])=>({relativePath:a,contentHash:o.identityFor(a,ne).key,value:[...l]}));if(s.some(a=>a.contentHash===null))throw new Error("TypeScript reference fragment identity is unavailable for an affected document.");return U.writeBatch(r,s.map(a=>({...a,contentHash:a.contentHash}))),s.length}function zn(t,e,n,r){let i=e.filter(s=>C(s.relativePath));if(i.length===0)return J("no TypeScript definitions");let o=J("shadow did not run");return Y("typescript.reference-fragments.shadow",()=>{try{let s=r(i[0].relativePath);if(!s.availability().available||!s.referenceFragmentsForFiles)return o=J("TypeScript reference fragment provider is unavailable"),o;let a=A(t),l=new Set(a),p=s.referenceFragmentsForFiles(a),u=W(i,p),d=Le(i,St(n,l),u);if(!d.passed)return o={state:"failing",files:a.length,keyedFiles:0,writtenFiles:0,...d},o;let f=[];for(let g of a){let m=te(t,g,ne);m?.key&&f.push({relativePath:g,contentHash:m.key,value:p.get(g)??[]})}return U.writeBatch(t,f),o={state:"passing",files:a.length,keyedFiles:f.length,writtenFiles:f.length,...d},o}catch(s){return o=J(s instanceof Error?s.message:String(s)),o}},()=>({...o}))}function St(t,e){return new Map([...t].map(([n,r])=>[n,r.filter(i=>e.has(i.file))]))}function Hn(t,e,n){if(e.length===0)return{references:new Map,files:0,cacheHits:0,cacheMisses:0,computedFiles:0};let r="fallback",i=0,o=0,s=0,a=0;return Y("typescript.reference-fragments.materialize",()=>{try{let l=A(t);i=l.length;let p=new Map,u=new Map,d=[];for(let m of l){let S=te(t,m,ne);if(!S?.key)return null;p.set(m,S.key);let D=U.read(t,m,S.key);D===null?(s+=1,d.push(m)):(o+=1,u.set(m,D))}if(s===0)return r="hit",{references:W(e,u),files:i,cacheHits:o,cacheMisses:s,computedFiles:a};let f=n(e[0].relativePath);if(!f.availability().available||!f.referenceFragmentsForFiles)return null;let g=f.referenceFragmentsForFiles(d);if(d.some(m=>!g.has(m)))return null;a=g.size,U.writeBatch(t,d.map(m=>({relativePath:m,contentHash:p.get(m),value:g.get(m)??[]})));for(let[m,S]of g)u.set(m,S);return r="computed",{references:W(e,u),files:i,cacheHits:o,cacheMisses:s,computedFiles:a}}catch{return null}},()=>({state:r,files:i,cacheHits:o,cacheMisses:s,computedFiles:a}))}function J(t){return{state:"unavailable",files:0,keyedFiles:0,writtenFiles:0,expectedCount:0,actualCount:0,missing:[],extra:[],reason:t}}function xt(t){try{let e=JSON.parse(t);return!Array.isArray(e)||!e.every(Mt)?null:e}catch{return null}}function Mt(t){if(!t||typeof t!="object")return!1;let e=t,n=e.location;return typeof e.targetSymbol=="string"&&!!n&&typeof n.file=="string"&&typeof n.line=="number"&&typeof n.column=="number"}import{createHash as Rt,randomUUID as We}from"crypto";import{existsSync as v,lstatSync as E,mkdirSync as Qn,readdirSync as w,renameSync as Je,rmSync as M}from"fs";import{basename as z,dirname as wt,join as y}from"path";function Ce(t){return re(t,It)}function re(t,e){return Array.isArray(t)?`[${t.map(n=>re(n,e)).join(",")}]`:t&&typeof t=="object"?`{${Object.entries(t).sort(([n],[r])=>e(n,r)).map(([n,r])=>`${JSON.stringify(n)}:${re(r,e)}`).join(",")}}`:JSON.stringify(t)}function It(t,e){return t.localeCompare(e)}var vt=1,Bt=Object.freeze({maxItems:1024,maxBytes:512*1024*1024,maxItemBytes:64*1024*1024,maxBatch:16,claimLeaseMs:5*6e4,responseRetentionMs:10*6e4,deadLetterRetentionMs:1440*6e4,temporaryRetentionMs:6e4,cleanupBatch:64}),R=class extends Error{constructor(n,r,i,o){let s=n==="item-too-large"?`request is ${o} bytes; per-item limit is ${i.maxItemBytes}`:n==="item-capacity"?`mailbox has ${r.totalItems} retained items; limit is ${i.maxItems}`:n==="byte-capacity"?`mailbox retains ${r.totalBytes} bytes and the request adds ${o}; limit is ${i.maxBytes}`:"another writer held the admission coordinator through the bounded wait";super(`Mailbox backpressure: ${s}. Retry after the service drains or expires retained work.`);this.code=n;this.status=r;this.limits=i;this.attemptedBytes=o;this.name="MailboxBackpressureError"}code;status;limits;attemptedBytes},Ft=".owner.json",Pt={isProcessAlive:()=>!0,readProcessIdentity:()=>null};function or(t){return{rootDir:t,pendingDir:y(t,"pending"),inflightDir:y(t,"inflight"),responseDir:y(t,"responses"),deadLetterDir:y(t,"dead-letter"),legacyRequestDir:y(t,"requests")}}function At(t={}){let e={...Bt,...t};for(let[n,r]of Object.entries(e))if(!Number.isFinite(r)||r<=0||!Number.isInteger(r))throw new Error(`Mailbox limit ${n} must be a positive integer.`);return e}function Ue(t){let e=[t.pendingDir,t.inflightDir,t.responseDir,t.deadLetterDir,t.legacyRequestDir].map(n=>ge(n));return K(...e)}function sr(t,e){return Rt("sha256").update(Ce({namespace:t,payload:e})).digest("hex")}function ze(t){if(!/^[a-f0-9]{64}$/.test(t))throw new Error("Mailbox operation keys must be lowercase SHA-256 identities.");return`op-${t}`}function ar(t,e,n={}){let r=At(n.limits),i=n.nowMs??Date.now(),o=Ue(t);return Ct(e),Et(t,r,n.admissionLockTimeoutMs??2e3,n.monotonicNow??ye,n.durability??"durable",()=>{Tt(t,i,r);let s=y(t.pendingDir,`${e.id}.json`),a=y(t.responseDir,`${e.id}.json`),l=Oe(t,e.id);if(l){let f=qe(l,e.operationKey,e.id);return{disposition:"duplicate",requestId:e.id,responsePath:a,authoritativeDeadlineAtMs:f.deadlineAtMs??e.deadlineAtMs}}let p=`${JSON.stringify(e)}
|
|
2
|
+
`,u=Buffer.byteLength(p),d=He(t);if(u>r.maxItemBytes)throw new R("item-too-large",d,r,u);if(d.totalItems+1>r.maxItems)throw new R("item-capacity",d,r,u);if(d.totalBytes+u>r.maxBytes)throw new R("byte-capacity",d,r,u);n.onBeforePublish?.();try{let f=n.durability??"durable",g=G(s,p,{durability:f}),m=f==="durable"?K(o,g.directorySync):"not-requested";return{disposition:"accepted",requestId:e.id,responsePath:a,authoritativeDeadlineAtMs:e.deadlineAtMs,achievedDurability:g.achievedDurability,directorySync:m}}catch(f){if(f.code!=="EEXIST")throw f;let g=Oe(t,e.id);if(!g)throw f;let m=qe(g,e.operationKey,e.id);return{disposition:"duplicate",requestId:e.id,responsePath:a,authoritativeDeadlineAtMs:m.deadlineAtMs??e.deadlineAtMs}}})}function Tt(t,e,n,r=Pt){let i={reclaimed:0,completedClaimsRemoved:0,responsesRemoved:0,deadLettersRemoved:0,temporaryFilesRemoved:0},o=n.cleanupBatch;for(let s of oe(t.inflightDir)){if(o<=0)break;let a=y(t.responseDir,`${s.requestId}.json`);if(v(a)){M(s.path,{force:!0}),i.completedClaimsRemoved++,o--;continue}if(s.claimExpiresAtMs>e||Lt(t,s.ownerId,r)!=="dead")continue;let l=y(t.pendingDir,s.originalFile);try{Je(s.path,l),i.reclaimed++}catch(p){if(p.code!=="EEXIST")throw p;M(s.path,{force:!0})}B(wt(s.path)),B(t.pendingDir),o--}o=$e(t.responseDir,o,(s,a)=>a+n.responseRetentionMs,e,()=>{i.responsesRemoved++}),o=$e(t.deadLetterDir,o,(s,a)=>a+n.deadLetterRetentionMs,e,()=>{i.deadLettersRemoved++});for(let s of[t.pendingDir,t.inflightDir,t.responseDir,t.deadLetterDir,t.legacyRequestDir]){if(o<=0)break;for(let a of Ve(s)){if(o<=0)break;if(!z(a).includes(".tmp-"))continue;let l;try{l=E(a).mtimeMs}catch(p){if(p.code==="ENOENT")continue;throw p}l+n.temporaryRetentionMs>e||(M(a,{force:!0}),i.temporaryFilesRemoved++,o--)}}return Ot(t.inflightDir),i}function He(t){Ue(t);let e=[...T(t.pendingDir).map(l=>({path:l,pending:!0})),...T(t.legacyRequestDir).map(l=>({path:l,pending:!0}))],n=oe(t.inflightDir).map(l=>({path:l.path,pending:!1})),r=T(t.responseDir).map(l=>({path:l,pending:!1})),i=T(t.deadLetterDir).map(l=>({path:l,pending:!1})),o=[...e,...n,...r,...i],s=0,a;for(let l of e){let p=se(l.path);if(!p){s++;continue}let u=p.enqueuedAtMs;if(u===void 0)try{u=E(l.path).mtimeMs}catch(d){if(d.code==="ENOENT")continue;throw d}a=a===void 0?u:Math.min(a,u)}return{pending:e.length,inflight:n.length,responses:r.length,deadLetters:i.length,invalid:s,totalItems:o.length,totalBytes:o.reduce((l,p)=>l+qt(p.path),0),...a===void 0?{}:{oldestPendingAt:new Date(a).toISOString()}}}function Et(t,e,n,r,i,o){let s=y(t.rootDir,".admission.lock"),a=`${process.pid}-${We()}`,l=r()+Math.max(0,n);for(;!Dt(t.rootDir,s,a,i);){if(jt(s),r()>=l)throw new R("admission-busy",He(t),e,0);Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,5)}try{return o()}finally{try{ie(s).ownerToken===a&&(M(s,{recursive:!0,force:!0}),i==="durable"&&B(t.rootDir))}catch{}}}function Dt(t,e,n,r){let i=`${JSON.stringify({ownerToken:n,pid:process.pid,acquiredAtMs:Date.now()})}
|
|
3
|
+
`;try{return G(e,i,{durability:r}),!0}catch(o){if(o.code==="EEXIST")return!1;try{ie(e).ownerToken===n&&(M(e,{force:!0}),r==="durable"&&B(t))}catch{}throw o}}function jt(t){let e=null;try{let r=ie(t);typeof r.ownerToken=="string"&&Number.isSafeInteger(r.pid)&&Number(r.pid)>0&&(e=Number(r.pid))}catch{}if(e===null||kt(e))return;let n=`${t}.stale-${We()}`;try{Je(t,n)}catch(r){let i=r.code;if(i==="ENOENT"||i==="EEXIST")return;throw r}M(n,{recursive:!0,force:!0})}function ie(t){try{return JSON.parse(x(t,"mailbox lock record"))}catch(e){if(e.code!=="EISDIR"&&!(e instanceof fe&&e.reason==="not-regular"))throw e;return JSON.parse(x(y(t,"owner.json"),"mailbox lock owner record"))}}function kt(t){try{return process.kill(t,0),!0}catch(e){let n=e.code;return n==="EPERM"||n!=="ESRCH"}}function Lt(t,e,n){let r=Nt(y(t.inflightDir,Ke(e),Ft));if(!r)return"unknown";if(!n.isProcessAlive(r.pid))return"dead";if(!r.processIdentity)return"live";let i=n.readProcessIdentity(r.pid);return i?me(r.processIdentity,i)?"live":"dead":"unknown"}function Nt(t){try{let e=JSON.parse(x(t,"mailbox owner record"));if(e.version!==1||typeof e.ownerId!="string"||!e.ownerId||typeof e.pid!="number"||!Number.isSafeInteger(e.pid)||e.pid<=0)return null;let n=e.processIdentity===void 0?null:k(e.processIdentity);return e.processIdentity!==void 0&&(!n||n.pid!==e.pid)?null:{version:1,ownerId:e.ownerId,pid:e.pid,...n?{processIdentity:n}:{}}}catch{return null}}function Oe(t,e){for(let n of[y(t.pendingDir,`${e}.json`),y(t.legacyRequestDir,`${e}.json`),y(t.responseDir,`${e}.json`)])if(v(n))return n;for(let n of oe(t.inflightDir))if(n.requestId===e)return n.path;return null}function qe(t,e,n){let r=se(t);if(r?.operationKey===e)return r;if(z(t)===`${ze(e)}.json`)return{id:n,operationKey:e};throw new Error(`Mailbox operation ${n} conflicts with an existing retained record.`)}function Ct(t){if(t.mailboxVersion!==vt||t.id!==ze(t.operationKey)||!t.clientId.trim()||!Number.isFinite(t.enqueuedAtMs)||!Number.isFinite(t.deadlineAtMs)||t.deadlineAtMs<t.enqueuedAtMs)throw new Error("Mailbox request has an invalid lifecycle identity.")}function oe(t){if(!v(t))return[];let e=[];for(let n of w(t,{withFileTypes:!0})){if(!n.isDirectory())continue;let r=_e(n.name);if(r===null)continue;let i=y(t,n.name);for(let o of w(i,{withFileTypes:!0})){if(!o.isFile()||!o.name.endsWith(".claim"))continue;let s=/^(.*)\.(\d+)\.claim$/.exec(o.name);if(!s)continue;let a=_e(s[1]),l=Number(s[2]);if(a===null||z(a)!==a||!a.endsWith(".json")||!Number.isSafeInteger(l))continue;let p=y(i,o.name),u=se(p)??{id:z(a,".json")},d;try{d=E(p)}catch(f){if(f.code==="ENOENT")continue;throw f}e.push({requestId:u.id,ownerId:r,path:p,originalFile:a,claimedAtMs:d.mtimeMs,claimExpiresAtMs:l,byteLength:d.size,...u.operationKey?{operationKey:u.operationKey}:{},...u.clientId?{clientId:u.clientId}:{},...u.enqueuedAtMs===void 0?{}:{enqueuedAtMs:u.enqueuedAtMs},...u.deadlineAtMs===void 0?{}:{deadlineAtMs:u.deadlineAtMs},legacy:u.operationKey===void 0})}}return e.sort((n,r)=>n.claimedAtMs-r.claimedAtMs||n.path.localeCompare(r.path))}function se(t){try{let e=JSON.parse(x(t,"mailbox record"));return typeof e.id!="string"||!e.id?null:{id:e.id,...typeof e.operationKey=="string"?{operationKey:e.operationKey}:{},...typeof e.clientId=="string"?{clientId:e.clientId}:{},...typeof e.enqueuedAtMs=="number"?{enqueuedAtMs:e.enqueuedAtMs}:{},...typeof e.deadlineAtMs=="number"?{deadlineAtMs:e.deadlineAtMs}:{}}}catch{return null}}function $e(t,e,n,r,i){for(let o of T(t)){if(e<=0)break;let s;try{s=E(o)}catch(a){if(a.code==="ENOENT")continue;throw a}n(o,s.mtimeMs)>r||(M(o,{force:!0}),i(),e--)}return e}function T(t){return v(t)?w(t,{withFileTypes:!0}).filter(e=>e.isFile()).map(e=>y(t,e.name)).sort():[]}function Ve(t){if(!v(t))return[];let e=[];for(let n of w(t,{withFileTypes:!0})){let r=y(t,n.name);n.isFile()?e.push(r):n.isDirectory()&&e.push(...Ve(r))}return e.sort()}function Ot(t){if(v(t))for(let e of w(t,{withFileTypes:!0})){if(!e.isDirectory())continue;let n=y(t,e.name);w(n).some(r=>r.endsWith(".claim"))||M(n,{recursive:!0,force:!0})}}function qt(t){try{return E(t).size}catch{return 0}}function Ke(t){return Buffer.from(t,"utf8").toString("base64url")}function _e(t){try{let e=Buffer.from(t,"base64url").toString("utf8");return Ke(e)===t?e:null}catch{return null}}import{join as H}from"path";var fr=1e4,$t="watch.lock",_t="watch-state.json",Wt="watch-activity.json",Jt="watch-refresh-requests";function yr(t){return{lockPath:H(t,$t),statePath:H(t,_t),activityPath:H(t,Wt),refreshRequestsPath:H(t,Jt)}}function gr(t){try{return Ut(JSON.parse(x(t,"watch service state")))}catch{return null}}function Ut(t){if(!t||typeof t!="object")return null;let e=t;if(e.version!==1||typeof e.protocolVersion!="number"||typeof e.pid!="number"||!Number.isInteger(e.pid)||e.pid<=0||typeof e.projectRoot!="string"||e.worktreeId!==void 0&&(typeof e.worktreeId!="string"||e.worktreeId.length===0)||typeof e.cliVersion!="string"||!b(e.startedAt)||!b(e.heartbeatAt)||!b(e.lastActivityAt)||!zt(e.watcher)||e.idleDeadlineAt!==void 0&&!b(e.idleDeadlineAt))return null;if(e.processIdentity!==void 0){let n=k(e.processIdentity);if(!n||n.pid!==e.pid)return null;e.processIdentity=n}return e.indexGeneration!==void 0&&!/^[a-f0-9]{64}$/.test(e.indexGeneration)||e.lastError!==void 0&&!Ht(e.lastError)||e.lastRefresh!==void 0&&!Vt(e.lastRefresh)||e.reindexActivity!==void 0&&!Kt(e.reindexActivity)||e.refreshRequests!==void 0&&!Xt(e.refreshRequests)||e.typescriptSemantic!==void 0&&!Yt(e.typescriptSemantic)||e.typescriptIndex!==void 0&&!Qt(e.typescriptIndex)?null:e}function b(t){return de(t)}function zt(t){if(!t||typeof t!="object"||!("state"in t))return!1;let e=t;switch(e.state){case"idle":return!0;case"waiting":return h(e.changedFiles)&&h(e.reindexAt);case"indexing":return h(e.startedAt);case"cooldown":return h(e.until)&&typeof e.dirty=="boolean";case"budget-paused":return h(e.until)&&typeof e.dirty=="boolean"&&typeof e.reason=="string"&&c(e.rebuilt)&&c(e.estimatedWriteBytes);case"draining":return h(e.startedAt)&&typeof e.reason=="string";default:return!1}}function Ht(t){if(!t||typeof t!="object")return!1;let e=t;return b(e.at)&&typeof e.message=="string"}function Vt(t){if(!t||typeof t!="object")return!1;let e=t;return typeof e.trigger?.kind=="string"&&typeof e.result=="string"&&b(e.startedAt)&&b(e.completedAt)&&h(e.durationMs)}function Kt(t){if(!t||typeof t!="object")return!1;let e=t;return e.confidence!==void 0&&e.confidence!=="complete"&&e.confidence!=="partial"&&e.confidence!=="unavailable"||e.recordsRead!==void 0&&!c(e.recordsRead)||e.invalidRecords!==void 0&&!c(e.invalidRecords)||e.skippedRecords!==void 0&&!c(e.skippedRecords)||e.readErrors!==void 0&&!c(e.readErrors)||e.ignoredPartialTailBytes!==void 0&&!c(e.ignoredPartialTailBytes)||!b(e.windowStartedAt)||!b(e.windowEndedAt)||!c(e.runs)||!c(e.rebuilt)||e.fullRebuilds!==void 0&&!c(e.fullRebuilds)||!c(e.reused)||!c(e.failed)||!c(e.suppressed)||!h(e.estimatedLogicalOutputBytes)||e.estimatedWriteBytes!==void 0&&!c(e.estimatedWriteBytes)||e.reflinkedBytes!==void 0&&!c(e.reflinkedBytes)||e.fallbackCopiedBytes!==void 0&&!c(e.fallbackCopiedBytes)||e.oldestRebuildAt!==void 0&&!b(e.oldestRebuildAt)||e.oldestWriteAt!==void 0&&!b(e.oldestWriteAt)||e.languageAttribution!==void 0&&e.languageAttribution!=="complete"&&e.languageAttribution!=="partial"&&e.languageAttribution!=="unavailable"||e.attributedRuns!==void 0&&!c(e.attributedRuns)||e.unattributedRuns!==void 0&&!c(e.unattributedRuns)||e.invalidLanguageDetails!==void 0&&!c(e.invalidLanguageDetails)||e.estimatedLogicalOutputBytes<0||!e.byTrigger||typeof e.byTrigger!="object"||Array.isArray(e.byTrigger)||e.byLanguage!==void 0&&!Gt(e.byLanguage)?!1:Object.values(e.byTrigger).every(n=>n===void 0||c(n))}function Gt(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;for(let[e,n]of Object.entries(t)){if(!ue.includes(e)||!n||typeof n!="object")return!1;let r=n;if(!c(r.runs)||!c(r.rebuilt)||!c(r.reused)||!c(r.producedOutputBytes)||!le(r.durationMs)||r.rebuilt+r.reused!==r.runs)return!1}return!0}function Xt(t){if(!t||typeof t!="object")return!1;let e=t;return c(e.pending)&&c(e.claimed)&&c(e.completed)&&c(e.expired)&&c(e.invalid)&&(e.oldestPendingAt===void 0||b(e.oldestPendingAt))}function Yt(t){if(!t||typeof t!="object")return!1;let e=t;return typeof e.protocolVersion=="number"&&(e.state==="idle"||e.state==="ready"||e.state==="unavailable"||e.state==="error")&&h(e.requests)&&h(e.sessionsCreated)&&h(e.sessionsReused)&&h(e.sessionsRefreshed)&&h(e.sessionsReplaced)&&h(e.projectsCreated)&&(e.lastRequestAt===void 0||b(e.lastRequestAt))&&(e.lastError===void 0||typeof e.lastError=="string")&&(e.busyUntil===void 0||b(e.busyUntil))&&(e.mailbox===void 0||Ge(e.mailbox))}function Qt(t){if(!t||typeof t!="object")return!1;let e=t;return typeof e.protocolVersion=="number"&&(e.state==="idle"||e.state==="ready"||e.state==="unavailable"||e.state==="error")&&c(e.requests)&&c(e.sessionsCreated)&&c(e.sessionsReplaced)&&(e.sessionsEvicted===void 0||c(e.sessionsEvicted))&&(e.activeSessions===void 0||c(e.activeSessions))&&(e.maxActiveSessions===void 0||c(e.maxActiveSessions))&&(e.heapUsedBytes===void 0||c(e.heapUsedBytes))&&(e.heapLimitBytes===void 0||c(e.heapLimitBytes))&&(e.softMemoryLimitBytes===void 0||c(e.softMemoryLimitBytes))&&(e.retireRequested===void 0||typeof e.retireRequested=="boolean")&&c(e.initializations)&&c(e.programUpdates)&&c(e.documentsEmitted)&&c(e.documentsRemoved)&&(e.lastRequestAt===void 0||b(e.lastRequestAt))&&(e.lastDurationMs===void 0||h(e.lastDurationMs)&&e.lastDurationMs>=0)&&(e.lastError===void 0||typeof e.lastError=="string")&&(e.busyUntil===void 0||b(e.busyUntil))&&(e.mailbox===void 0||Ge(e.mailbox))}function Ge(t){if(!t||typeof t!="object")return!1;let e=t;return c(e.pending)&&c(e.inflight)&&c(e.responses)&&c(e.deadLetters)&&c(e.invalid)&&c(e.totalItems)&&h(e.totalBytes)&&e.totalBytes>=0&&e.totalItems===e.pending+e.inflight+e.responses+e.deadLetters&&(e.oldestPendingAt===void 0||b(e.oldestPendingAt))}function h(t){return typeof t=="number"&&Number.isFinite(t)}export{un as a,tt as b,Z as c,pn as d,it as e,ot as f,mn as g,fn as h,yn as i,Ce as j,vt as k,or as l,sr as m,ze as n,ar as o,fr as p,yr as q,gr as r,dt as s,C as t,ft as u,In as v,Rn as w,kn as x,q as y,te as z,Un as A,zn as B,Hn as C};
|
|
4
|
+
//# sourceMappingURL=chunk-ZDVDSDFG.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{
|
|
2
|
-
* Generated by 'scip-query twin-ab'.
|
|
1
|
+
import{a as y}from"./chunk-VETXXOYU.js";import{b as f}from"./chunk-LPGDO2XA.js";import{c as h,d as w}from"./chunk-MTDBHTSF.js";import{d as u,e as m,h as b,p,q as g}from"./chunk-5IZTXSOL.js";import{dirname as $,isAbsolute as k,relative as x,resolve as v}from"path";var C=new Set(w());function R(t,e){return`tests/generated/twin-ab/${d(t)}-vs-${d(e)}.test.ts`}function d(t){return(t.split(/[/#]/).pop()||t).replace(/[^A-Za-z0-9_-]+/g,"-").replace(/^-+|-+$/g,"")||"symbol"}function P(t,e,a,n){let{refA:l,refB:s,outFile:r}=typeof e=="string"?{refA:e,refB:a,outFile:n}:e;if(typeof l!="string"||typeof s!="string"||typeof r!="string")throw new TypeError("twinAb requires refA, refB, and outFile.");if(!k(r))throw new TypeError("twinAb outFile must be an absolute path.");let i=A(t,l);if(!i.ok)return i;let o=A(t,s);if(!o.ok)return o;let c=i.symbol.paramCount===null||o.symbol.paramCount===null?null:i.symbol.paramCount===o.symbol.paramCount,S=N(i.symbol,o.symbol,t.config.projectRoot,r,c);return{ok:!0,a:i.symbol,b:o.symbol,signatureCompatible:c,testSource:S}}function A(t,e){let n=f(t,e).match;if(!n)return{ok:!1,reason:`${e} does not resolve to an indexed symbol.`};let s=t.get("SELECT kind FROM global_symbols WHERE id = ?",n.symbolId)?.kind??null;if(!(s!==null?C.has(s):b(n.symbol)))return{ok:!1,reason:`${e} resolves to ${u(n.symbol)}${s!==null?` with SCIP kind ${h(s)}`:""} \u2014 twin-ab compares call outputs, so both referents must be functions or methods.`};if(!y(t,n))return{ok:!1,reason:`${e} (${u(n.symbol)} at ${n.relativePath}:${n.startLine+1}) is not exported \u2014 twin-ab needs an importable named binding for both twins.`};let i=t.get("SELECT documentation FROM global_symbols WHERE id = ?",n.symbolId),o=p(g(i?.documentation??null));return{ok:!0,symbol:{ref:e,symbol:n.symbol,shortName:m(n.symbol)||u(n.symbol),file:n.relativePath,startLine:n.startLine,signature:o,paramCount:o?E(o):null}}}function E(t){let e=t.indexOf("(");if(e===-1)return null;let a=0,n=-1;for(let i=e;i<t.length;i+=1){let o=t[i];if(o==="(")a+=1;else if(o===")"&&(a-=1,a===0)){n=i;break}}if(n===-1)return null;let l=t.slice(e+1,n).trim();if(!l)return 0;let s=1,r=0;for(let i of l)i==="("||i==="["||i==="{"?r+=1:i===")"||i==="]"||i==="}"?r=Math.max(0,r-1):i===","&&r===0&&(s+=1);return s}function T(t,e,a){let n=$(e),l=v(t,a),r=x(n,l).replace(/\\/g,"/").replace(/\.tsx?$/,".js");return r.startsWith(".")?r:`./${r}`}function N(t,e,a,n,l){let s=T(a,n,t.file),r=T(a,n,e.file),i=l===null?"Signature comparison: unknown (one or both signatures unavailable in the index) \u2014 check by hand.":l?"Signature comparison: param counts match.":"Signature comparison: param counts DIFFER \u2014 twins may not be directly comparable; check by hand.";return`/**
|
|
2
|
+
* Generated by 'scip-query twin-ab'. Cleanup integrity scenario.
|
|
3
3
|
* ("cross-examine same-concept twins"): where one concept is computed in
|
|
4
4
|
* more than one place, feed both the same input and require the same
|
|
5
5
|
* answer. Disagreement between twins means at least one is wrong \u2014
|
|
@@ -37,4 +37,4 @@ describe.skipIf(inputs.length === 0)('twin-ab: ${t.shortName} vs ${e.shortName}'
|
|
|
37
37
|
});
|
|
38
38
|
});
|
|
39
39
|
`}export{R as a,P as b};
|
|
40
|
-
//# sourceMappingURL=chunk-
|
|
40
|
+
//# sourceMappingURL=chunk-ZHSARYVS.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{d as x}from"./chunk-R2MOKIVO.js";import{f,g as p}from"./chunk-PIZY2GX6.js";import{a as L}from"./chunk-URMZLV2N.js";import{b as D}from"./chunk-BOJ5SVE2.js";import{c as v}from"./chunk-JVZNWJBH.js";import{a as E}from"./chunk-BGBBVSH4.js";import{a as C}from"./chunk-6BJ7SOY7.js";import{a as y}from"./chunk-ICUQONOG.js";import{b}from"./chunk-LPGDO2XA.js";import{d as m,t as g}from"./chunk-5IZTXSOL.js";import{c as u,l as h}from"./chunk-I3U2FN2T.js";var A=/^(?:validate|verify|check|assert)(?:[A-Z].*)?$/,N=/^(?:is|has)(?:[A-Z].*)?$/,k=/[{,]\s*(?:ok|success|valid|isValid)\s*:\s*false\b/,d=/\breturn\b/g,I=/\bfunction\b|=>|\)\s*(?::\s*[^{;=]+)?\s*\{/,_=/\.(?:addIssue|push)\s*\(/;function M(e,t={}){let{scope:n,limit:i=30,scanLimit:l}=t,a=new v(e),r=D(a.productionCallableDefinitions({scope:n,minLoc:1,requireFunctionLikeSymbol:!0,excludeTypesFiles:!0}),l),s=[];for(let o of r){let c=P(e,o);c&&s.push({symbol:o.symbol,shortName:m(o.symbol),file:o.relativePath,startLine:o.startLine,endLine:o.endLine,loc:E(o),...c})}return s.sort((o,c)=>o.file.localeCompare(c.file)||o.startLine-c.startLine||o.loc-c.loc),i?s.slice(0,i):s}function w(e){return A.test(e)?"imperative":N.test(e)?"predicate":null}function P(e,t){let n=w(t.leaf);if(!n||L(e,t))return null;let i=f(e,t);if(!i||!I.test(i))return null;let l=h(e,t.relativePath)?.callables.find(r=>r.startLine===t.startLine&&r.endLine===t.endLine);if(n==="predicate"&&l?.paramCount===0)return null;if(x(i)){let r=O(e,t);return!r||S(r.body,T(r.snippet))||R(r.body)?null:{nameKind:n,resolvedVia:"one-hop-delegate",delegateTarget:r.shortName}}let a=p(i);return S(a,T(i))||R(a)?null:{nameKind:n,resolvedVia:"direct"}}var F=new Set(["if","for","while","switch","catch","function"]);function R(e){let t=u(e);for(let n of t.matchAll(/\b([A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*)\s*\(/g))if(!F.has(n[1]))return!0;return!1}function T(e){let t=e.indexOf("=>");return t===-1?!1:!/^\s*\{/.test(e.slice(t+2))}function S(e,t){let n=u(e);if(/\bthrow\b/.test(n)||/\.reject\s*\(/.test(n)||k.test(n)||_.test(n))return!0;let i=K(n);if(t&&i.length===0){let l=n.trim();return l!==""&&l!=="true"}for(let l of i)if(l!==""&&l!=="true")return!0;return!1}function K(e){let t=[];d.lastIndex=0;let n;for(;n=d.exec(e);){let i=n.index+n[0].length,l=0,a=e.length;for(let r=i;r<e.length;r+=1){let s=e[r];if(s==="("||s==="["||s==="{")l+=1;else if(s===")"||s==="]"||s==="}"){if(l===0){a=r;break}l-=1}else if(s===";"&&l===0){a=r;break}}t.push(e.slice(i,a).trim()),d.lastIndex=a}return t}function O(e,t){let n=y(e,t,{callableOnly:!0,limit:3,semanticEvidence:C}),i=[...new Set(n.map(o=>o.symbol))].filter(o=>o!==t.symbol);if(i.length!==1)return null;let a=b(e,i[0]).match;if(!a)return null;let r=g(e,a.relativePath).find(o=>o.symbolId===a.symbolId);if(!r)return null;let s=f(e,r);return s?{body:p(s),snippet:s,shortName:m(r.symbol)}:null}export{M as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ZW44MCJM.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{A as l,z as c}from"./chunk-DMQ7ZKJG.js";function h(e,a,i,r,n,o){let t=new Set;d(e,a,i,r)&&t.add(n);for(let s of o)s.value&&p(t,s.label,s.value);return[...t].slice(0,6)}function p(e,a,i){let r=u(i);a.endsWith("name")&&y(r)&&e.add(`${a} has type-guard boundary shape`);for(let n of r){let o=f.get(n);o&&e.add(`${a} has ${o} term: ${n}`)}}function d(e,a,i,r){if(i<=0)return!1;let n=c(e,a);if(n.length===0)return!1;for(let o=i-1;o>=0&&o>=i-5;o-=1){let t=(n[o]??"").trim();if(t!==""){if(l(t)===r)return!0;if(!t.startsWith("//")&&!t.startsWith("*")&&!t.startsWith("/*")&&!t.startsWith("@")&&!t.startsWith("#"))return!1}}return!1}function u(e){return e.replace(/([A-Z])([A-Z][a-z])/g,"$1 $2").replace(/([a-z0-9])([A-Z])/g,"$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean)}function y(e){return e.some(a=>g.has(a))&&e.some(a=>m.has(a))}var f=new Map([["access","access policy"],["accessible","access policy"],["adapter","adapter"],["adapters","adapter"],["allow","access policy"],["allowed","access policy"],["animation","animation calculation"],["api","api surface"],["apply","settings/application"],["audit","side-effect boundary"],["auth","authorization"],["authorize","authorization"],["audio","audio side-effect"],["can","access policy"],["capabilities","capability boundary"],["capability","capability boundary"],["boundary","boundary"],["begin","lifecycle"],["bridge","bridge"],["bridges","bridge"],["cache","state cache"],["chase","gameplay action"],["command","command boundary"],["context","context policy"],["cooldown","temporal state"],["cooldowns","temporal state"],["controller","controller"],["controllers","controller"],["diagnostic","diagnostics"],["diagnostics","diagnostics"],["effect","side-effect boundary"],["effects","side-effect boundary"],["energy","gameplay calculation"],["expired","temporal state"],["facade","facade"],["facades","facade"],["fire","gameplay action"],["gateway","gateway"],["gateways","gateway"],["guard","guard"],["guards","guard"],["haptic","haptic side-effect"],["haptics","haptic side-effect"],["head","sequence boundary"],["history","state history"],["input","input boundary"],["jump","gameplay action"],["keyboard","input boundary"],["log","side-effect boundary"],["logger","side-effect boundary"],["lock","coordination boundary"],["middleware","middleware"],["multiplier","gameplay calculation"],["mute","audio side-effect"],["normalize","normalization"],["normalise","normalization"],["normalizer","normalization"],["oscillate","animation calculation"],["oscillation","animation calculation"],["overlap","collision predicate"],["performance","diagnostics"],["permission","access policy"],["permissions","access policy"],["policy","policy"],["pool","state pool"],["pooled","state pool"],["pools","state pool"],["predict","prediction"],["presenter","presenter"],["presenters","presenter"],["projectile","gameplay entity"],["provider","provider boundary"],["providers","provider boundary"],["public","public surface"],["quality","settings/application"],["rate","calculation"],["register","registry"],["registry","registry"],["relay","relay"],["relays","relay"],["reseed","state lifecycle"],["reset","state lifecycle"],["respond","response boundary"],["response","response boundary"],["resolve","resolution"],["resolver","resolution"],["route","route boundary"],["routes","route boundary"],["run","lifecycle"],["sample","diagnostics"],["score","gameplay calculation"],["scope","scope policy"],["scroll","position state"],["scrolled","position state"],["seed","state lifecycle"],["seeded","state lifecycle"],["segment","segment boundary"],["segments","segment boundary"],["setting","settings/application"],["settings","settings/application"],["spawn","gameplay lifecycle"],["spawning","gameplay lifecycle"],["speed","gameplay calculation"],["surface","public surface"],["tail","sequence boundary"],["tick","temporal state"],["transaction","transaction"],["transactional","transaction"],["transform","transformation"],["transformer","transformation"],["translate","translation"],["translator","translation"],["try","fallible action"],["validate","validation"],["validation","validation"],["validator","validation"],["visual","diagnostics"],["window","settings/application"],["socket","transport boundary"],["websocket","transport boundary"]]),g=new Set(["can","has","is","should"]),m=new Set(["access","api","auth","collision","expired","input","keyboard","overlap","permission","permissions","policy","projectile","response","route","routes","scope"]);export{h as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ZYREOING.js.map
|
package/dist/cli-main.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{c as pe,d as le,e as v,f as fe,i as he,l,n as P}from"./chunk-6T7H2AFY.js";import{a as re,b as oe,d as ie}from"./chunk-OVPS2ILI.js";import{c as ae,d as se,e as ce,f as me,g as de,h as ue}from"./chunk-COTMS5KM.js";import{$b as $e,Bb as X,Cb as K,Db as Z,Fb as ee,Nb as S,Ob as te,Qb as ne,lb as C,mb as B,wb as Y,xb as y,zb as Q}from"./chunk-4UUCUASK.js";import{Aa as H,B as _,Cd as J,Ma as m,Sa as R,V as T,W as $,ea as W,fa as M,ga as G,ha as F,ia as q,ra as U,rd as z,sa as b,va as L,xa as V}from"./chunk-OIVZ7PW6.js";import{Help as bt,program as d}from"commander";import{existsSync as Rt,realpathSync as _e}from"fs";import{fileURLToPath as St}from"url";var We=new Set(["code","outline","refs"]),Me=["--symbol","--at","--search","--view","--edge","--direction","--subtype","--connecting","--inventory-only","--fold","--depth","--max-edges"];function ge(e){if(e[2]!=="evidence")return;let n=e[3];if(!n||n.startsWith("-"))return;if(e.slice(4).some(o=>Me.some(r=>o===r||o.startsWith(`${r}=`)))){e.splice(3,1,"--symbol",n);return}e[2]="evidence-source"}function Ge(e){return e!==void 0&&We.has(e)}async function Ce(e){if(e==="continue"){let{outputContinuationCommandDescriptor:t}=await import("./output-continuation-command-LKBUTNRL.js");return[t]}if(Ge(e)){let{directNavigationQueryCommandDescriptors:t}=await import("./direct-navigation-6RUJKLAV.js"),i=t.find(o=>o.id===e);if(!i)throw new Error(`Direct navigation command descriptor is unavailable: ${e}`);return[i]}let{commandDescriptors:n}=await import("./command-descriptors-QH3G2OVD.js");return n}import{Option as Ue}from"commander";function O(e){return e.evidence?e.evidence:Fe.has(e.id)?"mixed":e.heuristic?"heuristic":"graph-fact"}var Fe=new Set(["health","context","co-change"]);function ye(e){if(e.claims){if(e.claims.origin==="mixed"&&!e.claims.families?.length)throw new Error(`Mixed command ${e.id} must declare at least one claim family.`);return e.claims}let n=O(e);if(n==="mixed")throw new Error(`Mixed command ${e.id} must declare claim families.`);let t=e.agent?se(e.agent.operation):[];return t.length>0&&t.every(o=>o==="repository-observation"||o==="repository-preview")?{origin:n==="heuristic"?"heuristic":"compiler-graph",observedSources:["index-generation"],producerValidation:{status:"not-evaluated"}}:{origin:"unknown",observedSources:["process"],producerValidation:{status:"not-evaluated"}}}import{basename as qe}from"path";function ve(e=process.argv,n=process.execPath){let t=e[1];return!t||qe(t)==="scip-query"?["scip-query"]:[n,t]}function Ee(e,n){return me(new Map(n.map(t=>[t.id,O(t)]))),ue(new Map(n.map(t=>[t.id,ye(t)]))),de(new Map(n.flatMap(t=>t.agent?[[t.id,{...t.agent,resultUnits:Ve(t)}]]:[]))),n.map(t=>{let i=t.hidden?e.command(t.command,{hidden:!0}):e.command(t.command);i.description(t.description),t.helpAfter&&i.addHelpText("after",`
|
|
3
|
+
${t.helpAfter.trim()}
|
|
4
|
+
`);for(let o of t.arguments??[])i.argument(o.name);for(let o of t.options??[])if(o.hidden){let r=new Ue(o.flags,o.description).hideHelp();o.parser&&r.argParser(o.parser),Object.hasOwn(o,"defaultValue")&&r.default(o.defaultValue),i.addOption(r)}else o.parser&&Object.hasOwn(o,"defaultValue")?i.option(o.flags,o.description,o.parser,o.defaultValue):o.parser?i.option(o.flags,o.description,o.parser):Object.hasOwn(o,"defaultValue")?i.option(o.flags,o.description,o.defaultValue):i.option(o.flags,o.description);return i.action(async(...o)=>{try{let r=i.optsWithGlobals();Le(r);let a=()=>t.id===re?t.handler(...o):oe({command:t.id,producerVersion:m,invocationPrefix:ve(),argv:process.argv.slice(2),cwd:process.cwd(),json:r.json===!0,agentOutput:r.agentOutput===!0,...typeof r.jsonOutput=="string"?{jsonOutputPath:r.jsonOutput}:{},sourceSession:r.session!==!1,reemitSource:r.reemit===!0,...typeof r.outputPageSize=="number"?{pageSize:r.outputPageSize}:{},...typeof r.outputCursor=="string"?{cursor:r.outputCursor}:{}},()=>t.handler(...o)),c=t.agent?ae(t.agent.operation,{args:o.slice(0,-1),options:r}):void 0;await(c?ce(c,a):a())}catch(r){He(r)}}),{descriptor:t,command:i}})}function Le(e){if(e.resultOnly===!0&&e.json!==!0)throw new Error("--result-only requires --json.");if(e.compact===!0&&e.json!==!0)throw new Error("--compact requires --json.");if(e.agentOutput===!0&&e.json!==!0)throw new Error("--agent-output requires --json.");if(typeof e.jsonOutput=="string"&&e.json!==!0)throw new Error("--json-output requires --json.");if(e.rawJson===!0&&e.json!==!0)throw new Error("--raw-json requires --json.");if(e.agentOutput===!0&&e.rawJson===!0)throw new Error("--agent-output cannot be combined with --raw-json.");if(typeof e.jsonOutput=="string"){if(e.agentOutput===!0||e.rawJson===!0)throw new Error("--json-output cannot be combined with --agent-output or --raw-json.");if(e.outputPageSize!==void 0||e.outputCursor!==void 0)throw new Error("--json-output cannot be combined with output pagination.")}if(e.rawJson===!0&&(e.outputPageSize!==void 0||e.outputCursor!==void 0))throw new Error("--raw-json cannot be combined with output pagination.")}function Ve(e){let n=e.agent?.resultUnits;if(n?.kind==="field"&&n.field.trim()==="")throw new Error(`Command ${e.id} declares an empty result-unit field.`);return n||(e.renderShape==="list"||e.renderShape==="table"||e.renderShape==="grouped-by-file"?{kind:"rows"}:{kind:"report"})}function He(e){let n=e instanceof Error?e.message:String(e);console.error(`error: ${te(n)}`),process.exitCode=1}var ze=new Set(P),xe=new Map(P.map((e,n)=>[e,n])),Je=new Set(["Navigation","Graph","Impact","Exploration"]),Be=new Set(["Cleanup","Health"]),Ye=new Set(["Indexing","Core","Maintenance"]);function Qe(e){if(e.hidden||e.agent?.semantic?.compatibility==="deprecated")return"compatibility";if(ze.has(e.id))return"primary-exploration";let n=e.docs?.category;if(n&&Je.has(n))return"specialized-analysis";if(n&&Be.has(n))return"quality-cleanup";if(n&&Ye.has(n))return"maintenance";if(n==="Formal Models")return"formal-modeling";throw new Error(`Visible command ${e.id} has no cockpit panel (docs category: ${n??"missing"}).`)}function Xe(e,n={}){let i=[{id:"primary-exploration",title:"Primary exploration",purpose:"Locate exact referents, project chosen relationships, and read only named implementation gaps."},{id:"specialized-analysis",title:"Specialized analysis",purpose:"Run a named graph, impact, or structural analysis when that exact analysis answers the task."},{id:"quality-cleanup",title:"Quality and cleanup",purpose:"Evaluate repository quality, cleanup candidates, and configured architecture findings."},{id:"maintenance",title:"Maintenance",purpose:"Build, inspect, configure, and maintain the project index and local integrations."},{id:"formal-modeling",title:"Formal modeling",purpose:"Create, verify, and check explicit state-machine models and traces."},{id:"compatibility",title:"Compatibility and deprecated controls",purpose:"Preserved invocation surfaces for existing consumers; do not choose these for new workflows."}].map(r=>({...r,commands:e.filter(a=>Qe(a)===r.id).sort((a,c)=>r.id==="primary-exploration"?(xe.get(a.id)??Number.MAX_SAFE_INTEGER)-(xe.get(c.id)??Number.MAX_SAFE_INTEGER):0)})),o=new Set(["primary-exploration","maintenance"]);return i.filter(r=>r.commands.length>0&&(n.includeCompatibility||o.has(r.id)))}function D(e,n,t={}){let i=[`Usage: ${e.name()} [options] [command]`,"",e.description(),"","Options:"],o=e.options.map(a=>a.flags),r=Math.max(...o.map(a=>a.length),0);for(let a of e.options)i.push(` ${a.flags.padEnd(r)} ${a.description}`);i.push(` ${"-h, --help".padEnd(r)} Display this grouped command help`);for(let a of Xe(n,t)){i.push("",`${a.title}:`,` ${a.purpose}`);let c=Math.max(...a.commands.map(s=>s.command.length),0);for(let s of a.commands)i.push(` ${s.command.padEnd(c)} ${s.description}`)}return t.includeCompatibility||i.push("","Run `scip-query --help-all` to include advanced, compatibility, and deprecated controls."),i.push("Run `scip-query <command> --help` for one control's options and examples.",""),i.join(`
|
|
5
|
+
`)}import{createHash as Ke}from"crypto";import{lstatSync as Ze}from"fs";import{isAbsolute as et,join as Pe}from"path";var Oe="git-worktree-context.json",we=16*1024,be=/^[0-9a-f]{40,64}$/,Re=/^[0-9a-f]{24}$/,Se=/^[0-9a-f]{64}$/;function De(e,n,t=b){let i=t!==b||H(),o=i?tt(e,n):void 0;if(o){let a=V(e,o,t);if(a)return a}let r=L(e,t);if(r&&i)try{nt(e,n,r.context,o)}catch{}return r}function tt(e,n){try{let t=R(e,n),i=Pe(t.physicalCacheDir,Oe),o=Ze(i);if(!o.isFile()||o.isSymbolicLink()||o.size>we)return;let r=JSON.parse(T(i,{inputKind:"Git worktree context receipt",maxBytes:we}));return!rt(r)||r.requestedProjectRoot!==t.record.canonicalProjectRoot||r.cacheOwnerSha256!==t.ownerSha256||r.checksum!==je(r)?void 0:r}catch{return}}function nt(e,n,t,i){if(!t.headCommit||!t.treeOid)return;let o=R(e,n),r={version:1,requestedProjectRoot:o.record.canonicalProjectRoot,cacheOwnerSha256:o.ownerSha256,projectRoot:t.projectRoot,gitDir:t.gitDir,commonDir:t.commonDir,repositoryId:t.repositoryId,worktreeId:t.worktreeId,headCommit:t.headCommit,treeOid:t.treeOid},a={...r,checksum:je(r)};i?.checksum!==a.checksum&&z(Pe(o.physicalCacheDir,Oe),a,{spacing:2,trailingNewline:!0})}function rt(e){return ot(e)?e.version===1&&E(e.requestedProjectRoot)&&p(Se,e.cacheOwnerSha256)&&E(e.projectRoot)&&E(e.gitDir)&&E(e.commonDir)&&p(Re,e.repositoryId)&&p(Re,e.worktreeId)&&p(be,e.headCommit)&&p(be,e.treeOid)&&p(Se,e.checksum):!1}function ot(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function E(e){return typeof e=="string"&&et(e)}function je(e){return Ke("sha256").update(JSON.stringify({version:e.version,requestedProjectRoot:e.requestedProjectRoot,cacheOwnerSha256:e.cacheOwnerSha256,projectRoot:e.projectRoot,gitDir:e.gitDir,commonDir:e.commonDir,repositoryId:e.repositoryId,worktreeId:e.worktreeId,headCommit:e.headCommit,treeOid:e.treeOid})).digest("hex")}function p(e,n){return typeof n=="string"&&e.test(n)}import{existsSync as it,mkdirSync as at,writeFileSync as st}from"fs";import{homedir as ct}from"os";import{join as x}from"path";var mt=1440*60*1e3,Ae="update-check.json",dt="https://registry.npmjs.org/scip-query/latest";async function j(e={}){let n=e.env??process.env;if(n.SCIP_QUERY_UPDATE_CHECK==="0"||n.NO_UPDATE_NOTIFIER)return;let t=e.cacheDir??lt(n),i=e.now??Date.now(),o=e.currentVersion??m,r=ft(t),a=r&&i-r.checkedAt<mt?r.latestVersion:await ht(t,e.fetchLatestVersion??Ct,i);if(!a||!pt(a,o))return;(e.writeNotice??(s=>console.error(s)))(ut(o,a))}function ut(e,n){return[`scip-query update available: ${e} -> ${n}.`,"Agent: tell your human to update with: npm install -g scip-query@latest",""].join(`
|
|
6
|
+
`)}function pt(e,n){let t=Ie(e),i=Ie(n);if(!t||!i)return e!==n;for(let o=0;o<t.length;o++){let r=t[o]-i[o];if(r>0)return!0;if(r<0)return!1}return!1}function lt(e){let n=e.XDG_CACHE_HOME||x(ct(),".cache");return x(n,"scip-query")}function ft(e){let n=x(e,Ae);if(!it(n))return null;try{let t=JSON.parse($(n,"update notice cache"));return typeof t.checkedAt=="number"&&(typeof t.latestVersion=="string"||t.latestVersion===null)?{checkedAt:t.checkedAt,latestVersion:t.latestVersion}:null}catch{return null}}async function ht(e,n,t){let i;try{i=await n()}catch{i=null}return gt(e,{checkedAt:t,latestVersion:i}),i}function gt(e,n){try{at(e,{recursive:!0}),st(x(e,Ae),`${JSON.stringify(n,null,2)}
|
|
7
|
+
`)}catch{}}async function Ct(){let e=await fetch(dt,{signal:AbortSignal.timeout(1e3)});if(!e.ok)return null;let n=await e.json();return typeof n.version=="string"?n.version:null}function Ie(e){let n=/^v?(\d+)\.(\d+)\.(\d+)(?:[-+].*)?$/.exec(e);return n?[Number(n[1]),Number(n[2]),Number(n[3])]:null}var yt=5e3,vt=100,Et={prepare:X,freshness:B,ensureService:v,inspectService:fe,requestRefresh:he,async reindex(e,n,t,i){let{reindexConfiguredProject:o}=await import("./project-reindex-4ARU6QCM.js");return o(e,n,t,i)},wait(e){return new Promise(n=>setTimeout(n,e))},now:Date.now};async function Ne(e,n=Et,t={}){if(e.dbPathSource==="env")return{source:"explicit-index",service:{kind:"skipped",reason:"environment"}};let i=xt(e,n),o=n.prepare(e.projectRoot,e.config,e.paths,{gitContext:e.gitContext,gitObservation:e.gitObservation,...i?{watcherGeneration:i}:{}}),r=o.kind==="local-fresh"&&o.freshness?o.freshness:n.freshness(e.projectRoot,e.config,e.paths,{gitContext:e.gitContext}),a=n.ensureService({commandName:e.commandName,projectRoot:e.projectRoot,cacheDir:e.paths.cacheDir,cliVersion:m,config:e.config,gitContext:e.gitContext});if(r.state==="fresh")return{source:o.kind==="local-fresh"?"existing":"shared-generation",service:a};let c=a.kind==="started"||a.kind==="reused";if(c&&n.requestRefresh(J(e.paths.cacheDir).activityPath,`evidence command ${e.commandName} requires a fresh generation`),C(r))return{source:"stale",service:a};if(c){let s=a.state.watcher.state;if(s==="budget-paused"||s==="indexing")throw new Error(`Could not prepare fresh evidence for scip-query ${e.commandName}: index remained ${r.state} (${r.reason}) while the watcher is ${s}`);if(r=await wt(e,r,n,t,a),r.state==="fresh")return{source:"watcher",service:a};if(C(r))return{source:"stale",service:a}}try{await n.reindex(e.projectRoot,e.config,e.paths,{allowPartial:!1,skipAutoInstall:!0,trigger:{kind:"watch-demand",detail:`scip-query ${e.commandName}`},onStatus:()=>{}})}catch(s){throw new Error(`Could not prepare fresh evidence for scip-query ${e.commandName}: ${s instanceof Error?s.message:String(s)}`,{cause:s})}if(r=n.freshness(e.projectRoot,e.config,e.paths,{gitContext:e.gitContext}),r.state!=="fresh"&&!C(r))throw new Error(`Could not prepare fresh evidence for scip-query ${e.commandName}: index remained ${r.state} (${r.reason})`);return{source:"synchronous-reindex",service:a}}function xt(e,n){if(e.config.watch?.enabled===!0)try{return pe(n.inspectService({projectRoot:e.projectRoot,cacheDir:e.paths.cacheDir,cliVersion:m,gitContext:e.gitContext}))}catch{return}}async function wt(e,n,t,i,o){if(o.state.watcher.state==="budget-paused")return n;let r=Math.max(0,i.waitMs??yt),a=Math.max(1,i.pollMs??vt),c=t.now()+r,s=n;for(;t.now()<c;)if(await t.wait(Math.min(a,Math.max(1,c-t.now()))),s=t.freshness(e.projectRoot,e.config,e.paths,{gitContext:e.gitContext}),s.state==="fresh")return s;return s}async function ke(e,n={}){try{await e()}catch(t){let i=t instanceof Error?t.message:String(t);console.error(`error: ${i}`),(n.debug??process.env.SCIP_QUERY_DEBUG!==void 0)&&t instanceof Error&&t.stack&&console.error(t.stack),process.exitCode=1}}var w=Dt();w&&(ne(),d.configureOutput({writeOut:e=>process.stdout.write(S(e)),writeErr:e=>process.stderr.write(S(e))}));d.name("scip-query").description("Language-agnostic code intelligence CLI powered by SCIP indexes").version(m).option("--output-page-size <characters>","Return bounded output pages with an exact continuation command",ie).option("--output-cursor <cursor>","Continue a bounded output page").option("--agent-output","Emit a bounded JSON projection for model-facing clients (requires --json)").option("--json-output <path>","Atomically write the complete JSON result and print a small receipt").option("--raw-json","Explicitly retain the legacy unpaged JSON stream (requires --json)").option("--no-session","Disable the explicit exploration evidence ledger").option("--reemit","Recovery only: render source and graph evidence again instead of citing session receipts").option("--help-all","Display every command, including compatibility and deprecated controls");w&&ge(process.argv);var A=await Ce(w?process.argv[2]:void 0);Ee(d,A);var f,Pt=new bt;d.configureHelp({formatHelp:(e,n)=>e===d?D(d,A):Pt.formatHelp(e,n)});d.hook("preAction",async(e,n)=>{let t=n.name();if(t==="continue"){I();return}let i=K(t),o=le(t);if(i&&(f=U()),!i&&!o){I(),await j({commandName:t});return}let r=Y(),a=Q(r);y(a),I(),await j({commandName:t});let c=De(r,a.paths.cacheDir),s=c?.context;a={...a,gitContext:s},y(a);let{config:N,paths:k}=a;if(i){let u;try{u=await Ne({commandName:t,projectRoot:r,config:N,paths:k,dbPathSource:a.dbPathSource,gitContext:s,gitObservation:c})}catch(g){if(!Z(t)||!Rt(a.dbPath))throw g;let Te=g instanceof Error?g.message:String(g);console.error(`warning: index refresh failed; ${t} is using the existing index. Current file text remains exact, but index-derived symbols and relationships may be stale. ${Te}`),l(r,m,{repositoryId:s?.repositoryId??null});return}process.env.SCIP_QUERY_DEBUG&&console.error(`evidence-freshness: ${u.source}`),u.service.kind==="failed"&&console.error(`warning: scip-query watch service did not start: ${u.service.message}`),(u.service.kind==="failed"||u.service.kind==="skipped")&&l(r,m,{repositoryId:s?.repositoryId??null});return}if(!o){l(r,m,{repositoryId:s?.repositoryId??null});return}let h=v({commandName:t,projectRoot:r,cacheDir:k.cacheDir,cliVersion:m,config:N,gitContext:s});h.kind==="failed"&&console.error(`warning: scip-query watch service did not start: ${h.message}`),(h.kind==="failed"||h.kind==="skipped")&&l(r,m,{repositoryId:s?.repositoryId??null})});d.hook("postAction",()=>{y(void 0),f?.(),f=void 0});function I(){if(G(),!W()||F())return;let e=null;try{e=ee(n=>_(n))}catch{}q({command:M()??`scip-query ${process.argv.slice(2).join(" ")}`,toolVersion:m,projectFingerprint:e})}async function Ot(){try{process.argv.includes("--help-all")?process.stdout.write(D(d,A,{includeCompatibility:!0})):await d.parseAsync()}finally{f?.(),f=void 0}}w&&await ke(Ot);function Dt(){if(!process.argv[1])return!1;let e=St(import.meta.url);try{return _e(e)===_e(process.argv[1])}catch{return e===process.argv[1]}}export{d as program,$e as renderHeuristicNotice,Ot as runCli};
|
|
8
|
+
//# sourceMappingURL=cli-main.js.map
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{
|
|
3
|
-
`)}function pe(e,t){let n=H(e),o=H(t);if(!n||!o)return e!==t;for(let r=0;r<n.length;r++){let i=n[r]-o[r];if(i>0)return!0;if(i<0)return!1}return!1}function le(e){let t=e.XDG_CACHE_HOME||u(se(),".cache");return u(t,"scip-query")}function fe(e){let t=u(e,B);if(!oe(t))return null;try{let n=JSON.parse(D(t,"update notice cache"));return typeof n.checkedAt=="number"&&(typeof n.latestVersion=="string"||n.latestVersion===null)?{checkedAt:n.checkedAt,latestVersion:n.latestVersion}:null}catch{return null}}async function ge(e,t,n){let o;try{o=await t()}catch{o=null}return he(e,{checkedAt:n,latestVersion:o}),o}function he(e,t){try{ie(e,{recursive:!0}),ae(u(e,B),`${JSON.stringify(t,null,2)}
|
|
4
|
-
`)}catch{}}async function Ce(){let e=await fetch(me,{signal:AbortSignal.timeout(1e3)});if(!e.ok)return null;let t=await e.json();return typeof t.version=="string"?t.version:null}function H(e){let t=/^v?(\d+)\.(\d+)\.(\d+)(?:[-+].*)?$/.exec(e);return t?[Number(t[1]),Number(t[2]),Number(t[3])]:null}var y=we();y&&(V(),c.configureOutput({writeOut:e=>process.stdout.write(g(e)),writeErr:e=>process.stderr.write(g(e))}));c.name("scip-query").description("Language-agnostic code intelligence CLI powered by SCIP indexes").version(a).option("--output-page-size <characters>","Return bounded output pages with an exact continuation command",G).option("--output-cursor <cursor>","Continue a bounded output page");var ve=await W(y?process.argv[2]:void 0);J(c,ve);c.hook("preAction",async(e,t)=>{let n=t.name(),o=U(n),r=z(n);if(!o&&!r){Q(),await C({commandName:n});return}let i=A(),s=k(i),p=j(i,s);f(p),Q(),await C({commandName:n});let{config:m,paths:l}=p,v;if(r&&m.watch?.enabled===!0)try{v=M($({projectRoot:i,cacheDir:l.cacheDir,cliVersion:a,gitContext:s}))}catch{}if(o){let w=O(i,m,l,{gitContext:s,watcherGeneration:v});w.kind==="failed"&&process.env.SCIP_QUERY_DEBUG&&console.error(`shared-cache: ${w.reason}`)}if(!r){h(i,a);return}let d=L({commandName:n,projectRoot:i,cacheDir:l.cacheDir,cliVersion:a,config:m,gitContext:s});d.kind==="failed"&&console.error(`warning: scip-query watch service did not start: ${d.message}`),(d.kind==="failed"||d.kind==="skipped")&&h(i,a)});c.hook("postAction",()=>f(void 0));function Q(){if(S(),!N()||P())return;let e=null;try{e=R(t=>E(t))}catch{}x({command:b()??`scip-query ${process.argv.slice(2).join(" ")}`,toolVersion:a,projectFingerprint:e})}y&&await c.parseAsync();function we(){if(!process.argv[1])return!1;let e=ye(import.meta.url);try{return K(e)===K(process.argv[1])}catch{return e===process.argv[1]}}export{c as program,X as renderHeuristicNotice};
|
|
2
|
+
import{realpathSync as s}from"fs";import{fileURLToPath as n}from"url";async function t(e,r={}){try{await e()}catch(o){let i=o instanceof Error?o.message:String(o);console.error(`error: ${i}`),(r.debug??process.env.SCIP_QUERY_DEBUG!==void 0)&&o instanceof Error&&o.stack&&console.error(o.stack),process.exitCode=1}}c()&&await t(async()=>{let e=process.argv.slice(2),r=!1;if(l(e)){let{tryRunQueryServiceFastPath:o}=await import("./query-service-fastpath.js");r=await o(e)}if(!r){let{runCli:o}=await import("./cli-main.js");await o()}});function c(){if(!process.argv[1])return!1;let e=n(import.meta.url);try{return s(e)===s(process.argv[1])}catch{return e===process.argv[1]}}function l(e){return(e[0]==="search"||e[0]==="outline"||e[0]==="code"||e[0]==="entrypoints"||e[0]==="files"||e[0]==="stats"||e[0]==="members"||e[0]==="methods"||e[0]==="deps"||e[0]==="rdeps"||e[0]==="imported-by"||e[0]==="hierarchy"||e[0]==="by-kind"||e[0]==="kind-counts"||e[0]==="refs"||e[0]==="trace"||e[0]==="value-flow"||e[0]==="dependence-slice"||e[0]==="call-graph"||e[0]==="reference-neighborhood"||e[0]==="reference-reachability"||e[0]==="slice"||e[0]==="dataflow"||e[0]==="imports"||e[0]==="unused-imports"||e[0]==="system"||e[0]==="surface")&&e.includes("--json")&&e.includes("--result-only")&&e.includes("--compact")&&process.env.SCIP_QUERY_PROFILE!=="1"&&process.env.SCIP_QUERY_PROFILE!=="true"}
|
|
5
3
|
//# sourceMappingURL=cli.js.map
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { S as SourceObservationFreshness } from './repository-text-C0Q8VYdN.js';
|
|
2
|
+
import { S as ScipDatabase } from './db-LKJXAlNS.js';
|
|
3
|
+
import { OutlineNode } from './queries/outline.js';
|
|
4
|
+
|
|
5
|
+
interface BindingDefinitionEvidence {
|
|
6
|
+
name: string;
|
|
7
|
+
relativePath: string;
|
|
8
|
+
startLine: number;
|
|
9
|
+
endLine: number;
|
|
10
|
+
source: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Literal project values needed to interpret a returned source range.
|
|
14
|
+
*
|
|
15
|
+
* This is a bounded evidence enhancement, not a lexical-completeness claim:
|
|
16
|
+
* callable, dynamic, external-package, and non-foldable bindings stay silent
|
|
17
|
+
* instead of becoming exploration obligations.
|
|
18
|
+
*/
|
|
19
|
+
interface BindingClosure {
|
|
20
|
+
coverage: 'indexed-project-literal-values';
|
|
21
|
+
inline: BindingDefinitionEvidence[];
|
|
22
|
+
}
|
|
23
|
+
interface CoveredSourceRange {
|
|
24
|
+
relativePath: string;
|
|
25
|
+
startLine: number;
|
|
26
|
+
endLine: number;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
interface CodeResult {
|
|
30
|
+
symbol: string;
|
|
31
|
+
shortName: string;
|
|
32
|
+
relativePath: string;
|
|
33
|
+
startLine: number;
|
|
34
|
+
endLine: number;
|
|
35
|
+
language: string | null;
|
|
36
|
+
source: string;
|
|
37
|
+
freshness?: SourceObservationFreshness;
|
|
38
|
+
bindingClosure?: BindingClosure;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
type CodeSelectorStatus = 'matched' | 'ambiguous' | 'missing';
|
|
42
|
+
type CodeSelectorKind = 'source' | 'file-source';
|
|
43
|
+
type CodeFileMemberMode = 'exported' | 'all';
|
|
44
|
+
interface CodeResolutionCandidate {
|
|
45
|
+
symbol: string;
|
|
46
|
+
shortName: string;
|
|
47
|
+
relativePath: string;
|
|
48
|
+
startLine: number;
|
|
49
|
+
endLine: number;
|
|
50
|
+
}
|
|
51
|
+
interface CodeFileDefinitionLedgerEntry extends CodeResolutionCandidate {
|
|
52
|
+
signature: string | null;
|
|
53
|
+
depth: number;
|
|
54
|
+
nestedDefinitions: number;
|
|
55
|
+
}
|
|
56
|
+
interface CodeFileCoverage {
|
|
57
|
+
members: CodeFileMemberMode;
|
|
58
|
+
basis: 'explicit-exports-and-same-file-reference-closure' | 'top-level-and-same-file-reference-closure' | 'complete-file-source';
|
|
59
|
+
totalDefinitions: number;
|
|
60
|
+
returnedDefinitions: number;
|
|
61
|
+
returnedBodies: number;
|
|
62
|
+
omittedDefinitions: number;
|
|
63
|
+
omittedLedger: CodeFileDefinitionLedgerEntry[];
|
|
64
|
+
}
|
|
65
|
+
/** Semantic coverage added to an exact line-range selector. */
|
|
66
|
+
interface CodeRangeCoverage {
|
|
67
|
+
basis: 'requested-range-and-same-file-call-closure';
|
|
68
|
+
referencedDefinitions: number;
|
|
69
|
+
returnedDefinitions: number;
|
|
70
|
+
returnedBodies: number;
|
|
71
|
+
omittedDefinitions: number;
|
|
72
|
+
omittedLedger: CodeResolutionCandidate[];
|
|
73
|
+
}
|
|
74
|
+
/** One selector's exact outcome inside a complete multi-selector code packet. */
|
|
75
|
+
interface CodeBatchEntry {
|
|
76
|
+
selector: string;
|
|
77
|
+
status: CodeSelectorStatus;
|
|
78
|
+
kind: CodeSelectorKind;
|
|
79
|
+
totalCandidates: number;
|
|
80
|
+
results: CodeResult[];
|
|
81
|
+
definitions: OutlineNode[];
|
|
82
|
+
candidates: CodeResolutionCandidate[];
|
|
83
|
+
omittedCandidates: number;
|
|
84
|
+
suggestions: string[];
|
|
85
|
+
fileCoverage?: CodeFileCoverage;
|
|
86
|
+
rangeCoverage?: CodeRangeCoverage;
|
|
87
|
+
reason?: 'definition-source-unreadable' | 'definition-not-found';
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* A complete accounting of several exact source or file-surface selectors.
|
|
91
|
+
*
|
|
92
|
+
* The packet never ranks selectors against each other or drops one for a byte
|
|
93
|
+
* budget. Ambiguity is an explicit result, never a silent first-match choice.
|
|
94
|
+
*/
|
|
95
|
+
interface CodeBatchResult {
|
|
96
|
+
requested: number;
|
|
97
|
+
matched: number;
|
|
98
|
+
ambiguous: number;
|
|
99
|
+
missing: number;
|
|
100
|
+
entries: CodeBatchEntry[];
|
|
101
|
+
bindingClosure: BindingClosure;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Read the source code for a symbol, bounded to its definition range.
|
|
105
|
+
* Language-agnostic: just reads the file and extracts the relevant lines.
|
|
106
|
+
*
|
|
107
|
+
* Accepts:
|
|
108
|
+
* - Symbol name pattern: "processVegaMention"
|
|
109
|
+
* - Full short name: "src:modules:chat:processVegaMention"
|
|
110
|
+
* - File:line-line syntax: "src/chat/service.ts:100-200"
|
|
111
|
+
*/
|
|
112
|
+
declare function code(db: ScipDatabase, symbolPattern: string, opts?: {
|
|
113
|
+
context?: number;
|
|
114
|
+
}): CodeResult | null;
|
|
115
|
+
/** Read up to 24 selectors with complete, per-selector resolution accounting. */
|
|
116
|
+
declare function codeBatch(db: ScipDatabase, selectors: readonly string[], opts?: {
|
|
117
|
+
context?: number;
|
|
118
|
+
members?: CodeFileMemberMode;
|
|
119
|
+
}): CodeBatchResult;
|
|
120
|
+
|
|
121
|
+
export { type BindingClosure as B, type CodeResult as C, type BindingDefinitionEvidence as a, type CodeBatchEntry as b, type CodeBatchResult as c, type CodeFileCoverage as d, type CodeFileDefinitionLedgerEntry as e, type CodeFileMemberMode as f, type CodeRangeCoverage as g, type CodeResolutionCandidate as h, type CodeSelectorKind as i, type CodeSelectorStatus as j, type CoveredSourceRange as k, code as l, codeBatch as m };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as a,c as b}from"./chunk-AJVMVE7X.js";import"./chunk-Z3GCK3PD.js";import"./chunk-7PPYXENX.js";import"./chunk-SKUMCCC5.js";import"./chunk-EA4SH4U5.js";import"./chunk-PZEI2TVL.js";import"./chunk-WULAPQUD.js";import"./chunk-MTDBHTSF.js";import"./chunk-3EX7DNBC.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-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 code,b as codeBatch};
|
|
2
|
+
//# sourceMappingURL=code-EQL6ZBLH.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a,b,c,d,e}from"./chunk-ANWGXPPN.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{d as codeBatchResultOnlyJson,e as codeBatchResultOnlyJsonForSelectors,c as codeResultOnlyJson,b as singleExactCodeResult,a as symbolResolutionJson};
|
|
2
|
+
//# sourceMappingURL=code-result-json-6E4J6LGZ.js.map
|