scip-query 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +72 -0
- package/dist/augment-vue-worker.js +1 -1
- package/dist/by-kind-4IYG2SKW.js +2 -0
- package/dist/call-graph-WQNXMNNN.js +2 -0
- package/dist/{chunk-AQDWTCDC.js → chunk-25GWKRUZ.js} +2 -2
- package/dist/chunk-2BTJALUS.js +454 -0
- package/dist/chunk-2KVU55CW.js +11 -0
- package/dist/{chunk-BBWPOMGU.js → chunk-2OXVP5U5.js} +2 -2
- package/dist/{chunk-D5W4UZY5.js → chunk-2RE5OCHZ.js} +2 -2
- package/dist/{chunk-2I3RSUWX.js → chunk-2XCGSDIT.js} +2 -2
- package/dist/{chunk-V7LQZTTZ.js → chunk-2YC7YNKT.js} +2 -2
- package/dist/chunk-3QXC54FQ.js +3 -0
- package/dist/{chunk-32A42O5B.js → chunk-3TJY6M3B.js} +2 -2
- package/dist/chunk-42W3LFUK.js +13 -0
- package/dist/chunk-44T4DUAA.js +2 -0
- package/dist/chunk-4GAQ6FI4.js +43 -0
- package/dist/{chunk-4S4DF62J.js → chunk-4HE7MVWD.js} +2 -2
- package/dist/{chunk-TGWNNMPF.js → chunk-4TQU4TX2.js} +2 -2
- package/dist/{chunk-SKUMCCC5.js → chunk-56NQAEPJ.js} +2 -2
- package/dist/chunk-57N6LN2A.js +3 -0
- package/dist/{chunk-LPGDO2XA.js → chunk-5H5WTJSD.js} +2 -2
- package/dist/{chunk-EA4SH4U5.js → chunk-5YRQIE2B.js} +2 -2
- package/dist/{chunk-O2RM7E7L.js → chunk-5ZMBRQFC.js} +4 -4
- package/dist/{chunk-ICHBVITH.js → chunk-6HRZQLOI.js} +2 -2
- package/dist/{chunk-WULAPQUD.js → chunk-6NC3YSPY.js} +2 -2
- package/dist/{chunk-IDPLC3FI.js → chunk-6VEFRPTD.js} +2 -2
- package/dist/{chunk-IOKWFRFQ.js → chunk-7C26EKLZ.js} +2 -2
- package/dist/{chunk-S3RTPPLQ.js → chunk-7IQXARSQ.js} +2 -2
- package/dist/chunk-7JYHQAH2.js +22 -0
- package/dist/chunk-7KSO2OAP.js +2 -0
- package/dist/{chunk-2ZBMOQGG.js → chunk-7U2YQSDE.js} +2 -2
- package/dist/{chunk-EKZRF57O.js → chunk-7XA3OM44.js} +2 -2
- package/dist/{chunk-4EXFZP6H.js → chunk-7XZGZBSQ.js} +2 -2
- package/dist/chunk-7YQOCABQ.js +2 -0
- package/dist/chunk-A77SCPW2.js +3 -0
- package/dist/chunk-AK3PYTIK.js +5 -0
- package/dist/chunk-AMIMMNA4.js +11 -0
- package/dist/{chunk-MOBF2GH6.js → chunk-AQ2PORIO.js} +2 -2
- package/dist/{chunk-YUFWLWIC.js → chunk-ARVO6TTW.js} +2 -2
- package/dist/chunk-AUY5BL74.js +2 -0
- package/dist/{chunk-RGCJ4646.js → chunk-AYPDH2LU.js} +2 -2
- package/dist/{chunk-73Z33VFI.js → chunk-AZS7YPCB.js} +2 -2
- package/dist/{chunk-SYUNTKO2.js → chunk-BDGTPN27.js} +2 -2
- package/dist/{chunk-BATIVRU2.js → chunk-BDHFVH2M.js} +2 -2
- package/dist/chunk-BECZLYNU.js +8 -0
- package/dist/chunk-BJT7LSPK.js +3 -0
- package/dist/{chunk-6SWA6B24.js → chunk-BTVKZGWT.js} +2 -2
- package/dist/{chunk-QD7IFBCR.js → chunk-BUTEIZKP.js} +2 -2
- package/dist/{chunk-UZFCZ7SJ.js → chunk-BVFYEEBH.js} +2 -2
- package/dist/{chunk-ICUQONOG.js → chunk-BWVQP3LB.js} +2 -2
- package/dist/chunk-BYDAFMSR.js +57 -0
- package/dist/{chunk-BHE44MHT.js → chunk-C76O5MDS.js} +2 -2
- package/dist/chunk-C7IJMOFP.js +134 -0
- package/dist/{chunk-CN2WGM7D.js → chunk-CBBHFNLX.js} +2 -2
- package/dist/{chunk-COTMS5KM.js → chunk-CKRWA452.js} +2 -2
- package/dist/{chunk-ANWGXPPN.js → chunk-CLG6DWVS.js} +2 -2
- package/dist/chunk-D2MVJSP4.js +21 -0
- package/dist/chunk-D35XIZGN.js +2 -0
- package/dist/{chunk-U7DR7MJD.js → chunk-DEAB5TGT.js} +2 -2
- package/dist/{chunk-6GJAP4OE.js → chunk-DJAO2OZJ.js} +2 -2
- package/dist/chunk-DKM723YF.js +79 -0
- package/dist/{chunk-4IIMPWMR.js → chunk-DPWKKNKI.js} +2 -2
- package/dist/chunk-E44IVWIJ.js +367 -0
- package/dist/chunk-EDMB6SSO.js +7 -0
- package/dist/{chunk-KWARB5FZ.js → chunk-EELG7D3Q.js} +2 -2
- package/dist/chunk-EELPBR7E.js +3 -0
- package/dist/chunk-EETGXQY7.js +3 -0
- package/dist/chunk-ENWQWA2R.js +2 -0
- package/dist/{chunk-HUZNZ3H2.js → chunk-ERCYGVAM.js} +2 -2
- package/dist/{chunk-WSG3DK5H.js → chunk-EWWY2ZFL.js} +2 -2
- package/dist/chunk-F24G5NBE.js +3 -0
- package/dist/{chunk-XRXCANFQ.js → chunk-F24QUEQP.js} +2 -2
- package/dist/{chunk-KFK7GF5C.js → chunk-FBCVASUG.js} +2 -2
- package/dist/{chunk-35IW3P4H.js → chunk-FELGD32K.js} +2 -2
- package/dist/{chunk-UNORWZIJ.js → chunk-FFJQZG6J.js} +5 -5
- package/dist/{chunk-5SE323LF.js → chunk-FGNCOQUX.js} +2 -2
- package/dist/chunk-FKGQOTKD.js +2 -0
- package/dist/chunk-GDRJB3SB.js +3 -0
- package/dist/chunk-GH5YSGZL.js +5 -0
- package/dist/{chunk-X7PJJYKX.js → chunk-GIQ6CSL4.js} +2 -2
- package/dist/{chunk-2RP27XLR.js → chunk-GPGRZJ3R.js} +2 -2
- package/dist/{chunk-IYV2YBHM.js → chunk-GQIDEID3.js} +2 -2
- package/dist/chunk-GRX7JOXQ.js +2 -0
- package/dist/{chunk-H46QMB7E.js → chunk-GVOMSPGL.js} +2 -2
- package/dist/{chunk-KTRGJLY7.js → chunk-GY7CCCEZ.js} +2 -2
- package/dist/{chunk-VNKYRJKN.js → chunk-H7CG6LOE.js} +2 -2
- package/dist/chunk-HCVJR2V4.js +3 -0
- package/dist/chunk-HG722PO7.js +3 -0
- package/dist/{chunk-LHTT5C3Z.js → chunk-HISEUIL2.js} +2 -2
- package/dist/{chunk-K5MZYZV7.js → chunk-HXOU4XNH.js} +2 -2
- package/dist/chunk-I6UTXNHU.js +6 -0
- package/dist/{chunk-I7PFL5P3.js → chunk-IJMD6BRI.js} +2 -2
- package/dist/{chunk-XXJ7WL3F.js → chunk-IKVNEGTW.js} +2 -2
- package/dist/chunk-IMKZEXZG.js +2 -0
- package/dist/chunk-ISIQLPJ2.js +61 -0
- package/dist/{chunk-DEUGHURX.js → chunk-ISWFRGJ6.js} +2 -2
- package/dist/chunk-IW5XQG5G.js +2 -0
- package/dist/chunk-IXESDH3J.js +2 -0
- package/dist/{chunk-FGB567HK.js → chunk-JAT6C3VX.js} +2 -2
- package/dist/{chunk-7TWP3MCP.js → chunk-JFQBRL3J.js} +2 -2
- package/dist/{chunk-Q7HB7BFJ.js → chunk-JHH5SCZ3.js} +2 -2
- package/dist/{chunk-ZHSARYVS.js → chunk-JJ62MTQH.js} +2 -2
- package/dist/chunk-JT6XX7QY.js +8 -0
- package/dist/{chunk-5H7IWVXJ.js → chunk-JUN5DOAK.js} +2 -2
- package/dist/{chunk-DOPCR5BY.js → chunk-K3XFWJI2.js} +2 -2
- package/dist/{chunk-Y4XQ7LES.js → chunk-KFOYCQAJ.js} +1 -1
- package/dist/{chunk-N5C65OFK.js → chunk-KFVSJX25.js} +2 -2
- package/dist/chunk-KK7GPALL.js +28 -0
- package/dist/{chunk-DHKBIOXF.js → chunk-KQHJEU6V.js} +2 -2
- package/dist/{chunk-WB6LGCFB.js → chunk-KZYID5KV.js} +2 -2
- package/dist/{chunk-KW6B5OL4.js → chunk-LO5JSW2C.js} +2 -2
- package/dist/{chunk-ZW44MCJM.js → chunk-LRI5OMPE.js} +2 -2
- package/dist/{chunk-HG5YI7PV.js → chunk-LXQUF2RP.js} +2 -2
- package/dist/{chunk-TM5XEDDR.js → chunk-MHIEP7EG.js} +2 -2
- package/dist/{chunk-FHV7NMFU.js → chunk-MSR2QRUE.js} +2 -2
- package/dist/chunk-N7FP5H5U.js +57 -0
- package/dist/{chunk-3653GTR7.js → chunk-NEIQPFBI.js} +2 -2
- package/dist/chunk-NK3JMP22.js +2 -0
- package/dist/{chunk-7IOAZRVL.js → chunk-NRBNAECH.js} +2 -2
- package/dist/{chunk-HGKEAP7F.js → chunk-NVSZNESQ.js} +2 -2
- package/dist/{chunk-R2MOKIVO.js → chunk-OJNK5ALA.js} +2 -2
- package/dist/{chunk-RFWAUHVW.js → chunk-OPSAW5DT.js} +2 -2
- package/dist/chunk-OTSPRVNW.js +2 -0
- package/dist/chunk-OXYAWIEA.js +2 -0
- package/dist/chunk-OZETODHH.js +2 -0
- package/dist/chunk-PBUH2P5S.js +3 -0
- package/dist/{chunk-QBANU5BQ.js → chunk-PIFTZEEM.js} +2 -2
- package/dist/{chunk-CKDOY6JA.js → chunk-PLJUQFQN.js} +2 -2
- package/dist/{chunk-JVZNWJBH.js → chunk-PLYUVM4F.js} +2 -2
- package/dist/chunk-PXXYQK55.js +2 -0
- package/dist/{chunk-WZQFY5S7.js → chunk-Q55NF3ZG.js} +2 -2
- package/dist/{chunk-OVPS2ILI.js → chunk-Q5TA4OY4.js} +2 -2
- package/dist/{chunk-OUB4J26T.js → chunk-Q6T2CAJL.js} +2 -2
- package/dist/chunk-Q7GBK5T7.js +81 -0
- package/dist/chunk-QKT4UI2Y.js +2 -0
- package/dist/{chunk-PIZY2GX6.js → chunk-QLBSG7U5.js} +2 -2
- package/dist/chunk-QWKHW6VZ.js +2 -0
- package/dist/{chunk-E7BJXRNV.js → chunk-R6M456QG.js} +2 -2
- package/dist/{chunk-MJNV7OCG.js → chunk-RDULNRSJ.js} +2 -2
- package/dist/{chunk-SSSJO4RG.js → chunk-RHHCLWQ6.js} +2 -2
- package/dist/chunk-RNKPYYYE.js +4 -0
- package/dist/{chunk-IXJ26KJJ.js → chunk-RPL3ARU7.js} +2 -2
- package/dist/{chunk-3EX7DNBC.js → chunk-RYOYJMGF.js} +2 -2
- package/dist/chunk-SB25YMEQ.js +2 -0
- package/dist/chunk-SV2LEFVM.js +2 -0
- package/dist/{chunk-ZBNL3QCY.js → chunk-SVHTMVA4.js} +3 -3
- package/dist/{chunk-6IEVHGWG.js → chunk-SWK4XPUS.js} +2 -2
- package/dist/chunk-T6QD2ZQB.js +43 -0
- package/dist/{chunk-VETXXOYU.js → chunk-TAYD3AE7.js} +2 -2
- package/dist/chunk-TD7VKJ2Y.js +117 -0
- package/dist/{chunk-UQ7XPRWU.js → chunk-TH6IC56G.js} +2 -2
- package/dist/{chunk-XVDMJMES.js → chunk-TKDNDQA7.js} +2 -2
- package/dist/{chunk-CSDDOUA4.js → chunk-TNG2FYS5.js} +2 -2
- package/dist/chunk-TQZV7KV4.js +2 -0
- package/dist/{chunk-AJVMVE7X.js → chunk-TUQIPUDS.js} +2 -2
- package/dist/chunk-TUSPIVZ3.js +4 -0
- package/dist/{chunk-ORBKAUCH.js → chunk-U2N2KE7A.js} +2 -2
- package/dist/{chunk-3PII3JI5.js → chunk-UAQ4T73O.js} +2 -2
- package/dist/{chunk-OFY4HTMI.js → chunk-UDY7MIAW.js} +2 -2
- package/dist/{chunk-WKPZCQLI.js → chunk-URSGGIZX.js} +2 -2
- package/dist/{chunk-UL4VJUMD.js → chunk-UT7TADJX.js} +2 -2
- package/dist/chunk-V4NG5OMS.js +554 -0
- package/dist/{chunk-2H4IAJHO.js → chunk-VMWUV6WB.js} +2 -2
- package/dist/{chunk-46JLFIGA.js → chunk-VTCIYFEK.js} +2 -2
- package/dist/chunk-VU6LIWHT.js +2 -0
- package/dist/chunk-VUSKPCUB.js +2 -0
- package/dist/{chunk-URMZLV2N.js → chunk-VXJJTQYE.js} +2 -2
- package/dist/{chunk-IPAL6DP2.js → chunk-VZ7NXSHV.js} +2 -2
- package/dist/{chunk-FUG6RPYY.js → chunk-WHADK6OS.js} +2 -2
- package/dist/chunk-WN3TCGJ4.js +2 -0
- package/dist/{chunk-B7ECWJAZ.js → chunk-WOOAY3PA.js} +2 -2
- package/dist/chunk-WRQXLNYE.js +9 -0
- package/dist/chunk-WSLEJSFR.js +2 -0
- package/dist/chunk-WYZIHUPZ.js +16 -0
- package/dist/{chunk-ZYREOING.js → chunk-XE33FV5W.js} +2 -2
- package/dist/chunk-XFMVKFSF.js +2 -0
- package/dist/{chunk-BBEDPVPB.js → chunk-XGGBK66W.js} +2 -2
- package/dist/{chunk-OFUBXBYX.js → chunk-XJX6LGHL.js} +2 -2
- package/dist/{chunk-Z3GCK3PD.js → chunk-XN22RGSR.js} +2 -2
- package/dist/{chunk-HWLCBKFE.js → chunk-XSWYJCAK.js} +2 -2
- package/dist/{chunk-IGKKTHJR.js → chunk-XU75YQN4.js} +2 -2
- package/dist/{chunk-E4EJBGDZ.js → chunk-Y2VM4CJC.js} +2 -2
- package/dist/{chunk-U7LRSQG6.js → chunk-Y334QQU5.js} +2 -2
- package/dist/{chunk-APLKXICZ.js → chunk-YAGYMBEX.js} +2 -2
- package/dist/{chunk-XITQLISP.js → chunk-YIHNPKWD.js} +2 -2
- package/dist/chunk-YXPUP5G2.js +11 -0
- package/dist/{chunk-6BJ7SOY7.js → chunk-Z2AWCTN6.js} +2 -2
- package/dist/{chunk-PHSPBQM6.js → chunk-Z2PZVKPR.js} +2 -2
- package/dist/{chunk-QXR5QPSF.js → chunk-ZAZGGSM3.js} +2 -2
- package/dist/{chunk-5236NQV3.js → chunk-ZGW4HLPD.js} +2 -2
- package/dist/chunk-ZOXKSQQB.js +2 -0
- package/dist/{chunk-BD6CV7PN.js → chunk-ZPASRBLF.js} +2 -2
- package/dist/{chunk-DMUGTKMD.js → chunk-ZYM4HOFA.js} +2 -2
- package/dist/{chunk-4ILHWBYF.js → chunk-ZZ3Z7D56.js} +2 -2
- package/dist/cli-main.js +4 -4
- package/dist/{code-CczEvHui.d.ts → code-B17qEMbt.d.ts} +1 -1
- package/dist/code-EQJFDT6I.js +2 -0
- package/dist/code-result-json-7UWIWBOO.js +2 -0
- package/dist/command-descriptors-ORNTVNYV.js +342 -0
- package/dist/{config-types-Cm-VSEBb.d.ts → config-types-B9B60MiR.d.ts} +10 -0
- package/dist/dataflow-6VL54GX5.js +2 -0
- package/dist/{db-LKJXAlNS.d.ts → db-BwIVAYNB.d.ts} +1 -1
- package/dist/dependence-slice-DT2NUHD2.js +2 -0
- package/dist/deps-DB7H5IKC.js +2 -0
- package/dist/direct-navigation-O3LUAYWQ.js +3 -0
- package/dist/entry-map-6K62RV3D.js +2 -0
- package/dist/files-MSLD7MO6.js +2 -0
- package/dist/{graph-evidence-CbUPCSKV.d.ts → graph-evidence-Bjyky2V4.d.ts} +1 -1
- package/dist/{health-Wl5G_LRt.d.ts → health-CPp2Jf1Z.d.ts} +1 -1
- package/dist/hierarchy-IVBXAKFA.js +2 -0
- package/dist/imports-FRAVZ3Y2.js +2 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/members-KJOJDYGO.js +2 -0
- package/dist/methods-2AYABBT3.js +2 -0
- package/dist/output-continuation-command-JHMPH6NC.js +3 -0
- package/dist/{output-pagination-VAWOGX4R.js → output-pagination-3OFL2MJV.js} +2 -2
- package/dist/project-reindex-HYO4WD7Z.js +3 -0
- package/dist/queries/affected.d.ts +2 -2
- package/dist/queries/affected.js +1 -1
- package/dist/queries/anchors.d.ts +2 -2
- package/dist/queries/anchors.js +1 -1
- package/dist/queries/architecture.d.ts +2 -2
- package/dist/queries/architecture.js +1 -1
- package/dist/queries/bottlenecks.d.ts +2 -2
- package/dist/queries/bottlenecks.js +1 -1
- package/dist/queries/by-kind.d.ts +2 -2
- package/dist/queries/by-kind.js +1 -1
- package/dist/queries/call-graph.d.ts +2 -2
- package/dist/queries/call-graph.js +1 -1
- package/dist/queries/change-surface.d.ts +2 -2
- package/dist/queries/change-surface.js +1 -1
- package/dist/queries/cleanup-plan.d.ts +2 -2
- package/dist/queries/cleanup-plan.js +1 -1
- package/dist/queries/co-change.d.ts +2 -2
- package/dist/queries/co-change.js +1 -1
- package/dist/queries/code.d.ts +3 -3
- package/dist/queries/code.js +1 -1
- package/dist/queries/complexity-hotspots.d.ts +2 -2
- package/dist/queries/complexity-hotspots.js +1 -1
- package/dist/queries/complexity.d.ts +13 -2
- package/dist/queries/complexity.js +1 -1
- package/dist/queries/context.d.ts +2 -2
- package/dist/queries/context.js +1 -1
- package/dist/queries/convergence.d.ts +2 -2
- package/dist/queries/convergence.js +1 -1
- package/dist/queries/coupling.d.ts +2 -2
- package/dist/queries/coupling.js +1 -1
- package/dist/queries/cycles.d.ts +2 -2
- package/dist/queries/cycles.js +1 -1
- package/dist/queries/dataflow.d.ts +2 -2
- package/dist/queries/dataflow.js +1 -1
- package/dist/queries/dead.d.ts +2 -2
- package/dist/queries/dead.js +1 -1
- package/dist/queries/decorative-checkers.d.ts +2 -2
- package/dist/queries/decorative-checkers.js +1 -1
- package/dist/queries/deep-chains.d.ts +2 -2
- package/dist/queries/deep-chains.js +1 -1
- package/dist/queries/dependence-slice.d.ts +3 -3
- package/dist/queries/dependence-slice.js +1 -1
- package/dist/queries/dependency-depth.d.ts +2 -2
- package/dist/queries/dependency-depth.js +1 -1
- package/dist/queries/deps.d.ts +2 -2
- package/dist/queries/deps.js +1 -1
- package/dist/queries/diff-impact.d.ts +2 -2
- package/dist/queries/diff-impact.js +1 -1
- package/dist/queries/doc-drift.d.ts +2 -2
- package/dist/queries/doc-drift.js +1 -1
- package/dist/queries/drift.d.ts +2 -2
- package/dist/queries/drift.js +1 -1
- package/dist/queries/duplicate-bodies.d.ts +2 -2
- package/dist/queries/duplicate-bodies.js +1 -1
- package/dist/queries/entry-map.d.ts +2 -2
- package/dist/queries/entry-map.js +1 -1
- package/dist/queries/evidence.d.ts +3 -3
- package/dist/queries/evidence.js +1 -1
- package/dist/queries/extract-candidates.d.ts +2 -2
- package/dist/queries/extract-candidates.js +1 -1
- package/dist/queries/fan.d.ts +2 -2
- package/dist/queries/fan.js +1 -1
- package/dist/queries/files.d.ts +2 -2
- package/dist/queries/files.js +1 -1
- package/dist/queries/health.d.ts +3 -3
- package/dist/queries/health.js +1 -1
- package/dist/queries/hierarchy.d.ts +2 -2
- package/dist/queries/hierarchy.js +1 -1
- package/dist/queries/hotspots.d.ts +2 -2
- package/dist/queries/hotspots.js +1 -1
- package/dist/queries/imports.d.ts +2 -2
- package/dist/queries/imports.js +1 -1
- package/dist/queries/incomplete-migration.d.ts +2 -2
- package/dist/queries/incomplete-migration.js +1 -1
- package/dist/queries/index.d.ts +5 -5
- package/dist/queries/index.js +1 -1
- package/dist/queries/isolated.d.ts +2 -2
- package/dist/queries/isolated.js +1 -1
- package/dist/queries/locality-candidates.d.ts +2 -2
- package/dist/queries/locality-candidates.js +1 -1
- package/dist/queries/members.d.ts +2 -2
- package/dist/queries/members.js +1 -1
- package/dist/queries/methods.d.ts +2 -2
- package/dist/queries/methods.js +1 -1
- package/dist/queries/not-implemented.d.ts +2 -2
- package/dist/queries/not-implemented.js +1 -1
- package/dist/queries/outline.d.ts +2 -2
- package/dist/queries/outline.js +1 -1
- package/dist/queries/passthrough-candidates.d.ts +2 -2
- package/dist/queries/passthrough-candidates.js +1 -1
- package/dist/queries/plan-context.d.ts +2 -2
- package/dist/queries/plan-context.js +1 -1
- package/dist/queries/react-component-duplicates.d.ts +2 -2
- package/dist/queries/react-component-duplicates.js +1 -1
- package/dist/queries/react-hook-candidates.d.ts +2 -2
- package/dist/queries/react-hook-candidates.js +1 -1
- package/dist/queries/react-large-component-pressure.d.ts +2 -2
- package/dist/queries/react-large-component-pressure.js +1 -1
- package/dist/queries/recent-duplicates.d.ts +2 -2
- package/dist/queries/recent-duplicates.js +1 -1
- package/dist/queries/redundant-reexports.d.ts +2 -2
- package/dist/queries/redundant-reexports.js +1 -1
- package/dist/queries/reference-neighborhood.d.ts +2 -2
- package/dist/queries/reference-neighborhood.js +1 -1
- package/dist/queries/reference-reachability.d.ts +2 -2
- package/dist/queries/reference-reachability.js +1 -1
- package/dist/queries/refs.d.ts +2 -2
- package/dist/queries/refs.js +1 -1
- package/dist/queries/self-audit.d.ts +2 -2
- package/dist/queries/self-audit.js +1 -1
- package/dist/queries/similar-chains.d.ts +2 -2
- package/dist/queries/similar-chains.js +1 -1
- package/dist/queries/similar-files.d.ts +2 -2
- package/dist/queries/similar-files.js +1 -1
- package/dist/queries/similar-signatures.d.ts +2 -2
- package/dist/queries/similar-signatures.js +1 -1
- package/dist/queries/similar.d.ts +2 -2
- package/dist/queries/similar.js +1 -1
- package/dist/queries/slice.d.ts +2 -2
- package/dist/queries/slice.js +1 -1
- package/dist/queries/source-inspection.d.ts +4 -4
- package/dist/queries/source-inspection.js +1 -1
- package/dist/queries/source-search.d.ts +2 -2
- package/dist/queries/source-search.js +1 -1
- package/dist/queries/stale-abstractions.d.ts +2 -2
- package/dist/queries/stale-abstractions.js +1 -1
- package/dist/queries/stats.d.ts +2 -2
- package/dist/queries/surface.d.ts +2 -2
- package/dist/queries/surface.js +1 -1
- package/dist/queries/symbols.d.ts +2 -2
- package/dist/queries/symbols.js +1 -1
- package/dist/queries/system-map.d.ts +2 -2
- package/dist/queries/system-map.js +1 -1
- package/dist/queries/system.d.ts +2 -2
- package/dist/queries/system.js +1 -1
- package/dist/queries/test-quality.d.ts +2 -2
- package/dist/queries/test-quality.js +1 -1
- package/dist/queries/trace.d.ts +2 -2
- package/dist/queries/trace.js +1 -1
- package/dist/queries/twin-ab.d.ts +2 -2
- package/dist/queries/twin-ab.js +1 -1
- package/dist/queries/twin-drift.d.ts +2 -2
- package/dist/queries/twin-drift.js +1 -1
- package/dist/queries/unused-imports.d.ts +2 -2
- package/dist/queries/unused-imports.js +1 -1
- package/dist/queries/unused-params.d.ts +2 -2
- package/dist/queries/unused-params.js +1 -1
- package/dist/queries/value-flow.d.ts +3 -3
- package/dist/queries/value-flow.js +1 -1
- package/dist/queries/vue-component-duplicates.d.ts +2 -2
- package/dist/queries/vue-component-duplicates.js +1 -1
- package/dist/queries/vue-composable-candidates.d.ts +2 -2
- package/dist/queries/vue-composable-candidates.js +1 -1
- package/dist/queries/vue-large-view-pressure.d.ts +2 -2
- package/dist/queries/vue-large-view-pressure.js +1 -1
- package/dist/queries/wrapper-candidates.d.ts +2 -2
- package/dist/queries/wrapper-candidates.js +1 -1
- package/dist/query-service-fastpath.js +5 -5
- package/dist/query-service-server.js +2 -2
- package/dist/refs-ARMA6XUJ.js +2 -0
- package/dist/refs-pagination-VUGIWN6U.js +2 -0
- package/dist/reindex-worker.js +125 -66
- package/dist/reindex.d.ts +5 -3
- package/dist/reindex.js +135 -76
- package/dist/runtime.d.ts +5 -5
- package/dist/runtime.js +4 -4
- package/dist/rust-semantic-session-server.js +1 -1
- package/dist/rust-semantic-session-worker.js +1 -1
- package/dist/rust-semantic-worker.js +1 -1
- package/dist/{scip-cli-CppzF5MK.d.ts → scip-cli-H-n59izO.d.ts} +1 -1
- package/dist/slice-YOB5YFAM.js +2 -0
- package/dist/surface-VY5EFWTW.js +2 -0
- package/dist/symbol-resolution-DGQN4XIV.js +2 -0
- package/dist/system-2KQ3QD2P.js +2 -0
- package/dist/trace-HTIPTXAE.js +2 -0
- package/dist/typescript-mailbox-worker.js +1 -1
- package/dist/value-flow-5FV3VQI7.js +2 -0
- package/dist/watch-server.js +3 -3
- package/docs/CLI_JSON_OUTPUT.md +2 -2
- package/docs/COMMAND_REFERENCE.md +2 -2
- package/docs/schemas/project-config.schema.json +11 -1
- package/package.json +6 -5
- package/skills/scip-explore/SKILL.md +73 -3
- package/skills/scip-explore/agents/openai.yaml +3 -3
- package/skills/scip-explore/references/delegated-exploration.md +51 -0
- package/skills/scip-explore/references/external-evidence.md +72 -0
- package/skills/scip-explore/references/information-model.md +51 -0
- package/skills/scip-explore/scripts/capture-evidence.mjs +666 -0
- package/skills/scip-query/SKILL.md +22 -1
- package/dist/by-kind-CI3O6PQG.js +0 -2
- package/dist/call-graph-6QTUTXH7.js +0 -2
- package/dist/chunk-2COFMIVK.js +0 -60
- package/dist/chunk-35ELD3RM.js +0 -2
- package/dist/chunk-3FQ3KMCD.js +0 -2
- package/dist/chunk-3VLJ2DCA.js +0 -2
- package/dist/chunk-4DCKBY6T.js +0 -5
- package/dist/chunk-4N6QSEMZ.js +0 -10
- package/dist/chunk-4OE2JO6I.js +0 -2
- package/dist/chunk-4UUCUASK.js +0 -554
- package/dist/chunk-54EOGFBR.js +0 -2
- package/dist/chunk-5IZTXSOL.js +0 -117
- package/dist/chunk-5ZJH6DDE.js +0 -2
- package/dist/chunk-63MBA7EG.js +0 -3
- package/dist/chunk-6T7H2AFY.js +0 -3
- package/dist/chunk-7COHFNJK.js +0 -38
- package/dist/chunk-7HU2IJ2T.js +0 -3
- package/dist/chunk-7PPYXENX.js +0 -2
- package/dist/chunk-AA7K3XLM.js +0 -21
- package/dist/chunk-AUP6YI5M.js +0 -2
- package/dist/chunk-CA5RE6H7.js +0 -2
- package/dist/chunk-CT5SI2I4.js +0 -2
- package/dist/chunk-D5EKVZPI.js +0 -2
- package/dist/chunk-DMQ7ZKJG.js +0 -81
- package/dist/chunk-ELNRLMC5.js +0 -29
- package/dist/chunk-F7WQ337U.js +0 -308
- package/dist/chunk-FEQIQ26E.js +0 -2
- package/dist/chunk-FN6EJM6Q.js +0 -2
- package/dist/chunk-FTSQNONX.js +0 -2
- package/dist/chunk-G2F6T5BV.js +0 -2
- package/dist/chunk-G6OGPXJW.js +0 -9
- package/dist/chunk-GFLTPNWV.js +0 -3
- package/dist/chunk-GTDP2SKQ.js +0 -2
- package/dist/chunk-HEOMG7IM.js +0 -8
- package/dist/chunk-I3U2FN2T.js +0 -13
- package/dist/chunk-IUJ3ZFEE.js +0 -7
- package/dist/chunk-LXLD46LH.js +0 -21
- package/dist/chunk-MEI3PTUK.js +0 -2
- package/dist/chunk-MO226P4Q.js +0 -4
- package/dist/chunk-MYUKI5VN.js +0 -4
- package/dist/chunk-OIRWZIYL.js +0 -38
- package/dist/chunk-OIVZ7PW6.js +0 -438
- package/dist/chunk-PNISDVYC.js +0 -3
- package/dist/chunk-PQOL42AW.js +0 -2
- package/dist/chunk-PUVZNFVY.js +0 -11
- package/dist/chunk-PZEI2TVL.js +0 -4
- package/dist/chunk-Q2J2VZZT.js +0 -2
- package/dist/chunk-QDCCHMVZ.js +0 -2
- package/dist/chunk-QLQBZOJH.js +0 -3
- package/dist/chunk-S73HBCGI.js +0 -11
- package/dist/chunk-SDPA5DKN.js +0 -210
- package/dist/chunk-SEUJVWT2.js +0 -3
- package/dist/chunk-SF7X6QNW.js +0 -2
- package/dist/chunk-SWFAFA4G.js +0 -49
- package/dist/chunk-T6FRID7Y.js +0 -3
- package/dist/chunk-TNOHGHZQ.js +0 -2
- package/dist/chunk-U2GPTA5U.js +0 -3
- package/dist/chunk-URTX2BEA.js +0 -6
- package/dist/chunk-VGRUM7JI.js +0 -3
- package/dist/chunk-VWLIOEEF.js +0 -11
- package/dist/chunk-WK4FD4PG.js +0 -2
- package/dist/chunk-X434XZAI.js +0 -2
- package/dist/chunk-YIEFEPG6.js +0 -16
- package/dist/chunk-YRVERHJR.js +0 -49
- package/dist/chunk-ZD3Z54IW.js +0 -2
- package/dist/chunk-ZDVDSDFG.js +0 -4
- package/dist/code-EQL6ZBLH.js +0 -2
- package/dist/code-result-json-6E4J6LGZ.js +0 -2
- package/dist/command-descriptors-QH3G2OVD.js +0 -346
- package/dist/dataflow-2BLMUZBP.js +0 -2
- package/dist/dependence-slice-MGAJDZXB.js +0 -2
- package/dist/deps-GQMUYVKW.js +0 -2
- package/dist/direct-navigation-6RUJKLAV.js +0 -3
- package/dist/entry-map-V2NQP5JU.js +0 -2
- package/dist/files-VM53I4IU.js +0 -2
- package/dist/hierarchy-D553WRSZ.js +0 -2
- package/dist/imports-DOZAJWLW.js +0 -2
- package/dist/members-HE67475K.js +0 -2
- package/dist/methods-K5JK4PPH.js +0 -2
- package/dist/output-continuation-command-LKBUTNRL.js +0 -3
- package/dist/project-reindex-4ARU6QCM.js +0 -3
- package/dist/refs-NBHKL4UQ.js +0 -2
- package/dist/refs-pagination-BBVTIHMH.js +0 -2
- package/dist/slice-U6S6LBSB.js +0 -2
- package/dist/surface-C7SS5CDQ.js +0 -2
- package/dist/symbol-resolution-3FVEKDTJ.js +0 -2
- package/dist/system-6K2NOO5C.js +0 -2
- package/dist/trace-II5K2TMH.js +0 -2
- package/dist/value-flow-MKFUUE5B.js +0 -2
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: scip-query
|
|
3
|
-
description: Use FIRST for codebase work when compiler-resolved identity, runtime boundaries, callers, dependencies, consumers, architecture, change impact, or cleanup relationships can affect the answer. It exposes exact referents, explicit typed-graph projections, and source evidence; it does not infer task relevance.
|
|
3
|
+
description: Use FIRST for codebase work when compiler-resolved identity, runtime boundaries, callers, dependencies, consumers, architecture, change impact, or cleanup relationships can affect the answer. It exposes exact referents, explicit typed-graph projections, and source evidence; it does not infer task relevance. Pair it with scip-explore when the task is to understand a repository system end to end.
|
|
4
4
|
metadata:
|
|
5
5
|
commands:
|
|
6
|
+
- template: 'scip-query watch --daemon'
|
|
7
|
+
when: 'When the user explicitly asks to use scip-query, make sure the background watcher for the exact target worktree is running before the first exploration command.'
|
|
8
|
+
- template: 'scip-query watch --status'
|
|
9
|
+
when: 'Check whether the watcher for the current worktree is running, refreshing, idle, or failed.'
|
|
10
|
+
- template: 'scip-query watch --stop'
|
|
11
|
+
when: 'Stop the watcher owned by the current worktree when the user asks to turn it off.'
|
|
6
12
|
- template: 'scip-query search <text>'
|
|
7
13
|
when: 'Locate exact repository text, a runtime key, or a compiler symbol; use `scip-query search -- <text>` when the literal starts with a dash.'
|
|
8
14
|
- template: 'scip-query outline <file>'
|
|
@@ -30,6 +36,9 @@ metadata:
|
|
|
30
36
|
|
|
31
37
|
| Command syntax | Question it answers |
|
|
32
38
|
| --- | --- |
|
|
39
|
+
| `scip-query watch --daemon` | When the user explicitly asks to use scip-query, make sure the background watcher for the exact target worktree is running before the first exploration command. |
|
|
40
|
+
| `scip-query watch --status` | Check whether the watcher for the current worktree is running, refreshing, idle, or failed. |
|
|
41
|
+
| `scip-query watch --stop` | Stop the watcher owned by the current worktree when the user asks to turn it off. |
|
|
33
42
|
| `scip-query search <text>` | Locate exact repository text, a runtime key, or a compiler symbol; use \`scip-query search -- <text>\` when the literal starts with a dash. |
|
|
34
43
|
| `scip-query outline <file>` | Locate compiler-owned constructs in a known file. |
|
|
35
44
|
| `scip-query entrypoints <text>` | Locate an external callable root when its entry surface is known. |
|
|
@@ -43,6 +52,16 @@ metadata:
|
|
|
43
52
|
These commands are controls, not a checklist. Use every capability needed by the task, but make each query answer a distinct question. There is no required sequence or query limit. Run a command's `--help` when you need a flag not shown in its template.
|
|
44
53
|
<!-- END GENERATED SKILL COMMANDS -->
|
|
45
54
|
|
|
55
|
+
## Watcher lifecycle
|
|
56
|
+
|
|
57
|
+
The scip-query watcher is a project-scoped background refresh service: one process owned by one worktree that observes that worktree's configured compiler inputs and keeps its index current after relevant changes. It is not a global service, and starting it in one worktree must not start watchers for sibling worktrees.
|
|
58
|
+
|
|
59
|
+
When the user explicitly names scip-query, invokes `$scip-query`, or asks the agent to use it, run `scip-query watch --daemon` from the exact target project root before the first exploration command. Treat both a newly started watcher and an already-running watcher as success; reuse the existing process instead of starting another. This automatic start applies only to an explicit request to use scip-query. Merely opening a repository or shell must not start it.
|
|
60
|
+
|
|
61
|
+
Use the normal command without `CHOKIDAR_USEPOLLING` or another forced polling override. If startup fails, report the exact failure; do not silently start a watcher in another worktree, force polling, or substitute an unbounded full rebuild.
|
|
62
|
+
|
|
63
|
+
Run `scip-query watch --status` from the same project root to inspect the watcher. Run `scip-query watch --stop` from that root when the user asks to stop it. The stop command targets only that worktree's watcher; do not stop watchers owned by other worktrees unless the user names them.
|
|
64
|
+
|
|
46
65
|
<!-- BEGIN GENERATED EXPLORATION MANUAL -->
|
|
47
66
|
### Choose a relationship deliberately
|
|
48
67
|
|
|
@@ -67,6 +86,8 @@ The controls above are complete for ordinary exploration. Run `scip-query capabi
|
|
|
67
86
|
|
|
68
87
|
scip-query is a repository exploration surface: an indexed code reader that joins exact current text to compiler-owned identities and typed relationships. Native text and file tools expose matches and slices; scip-query additionally exposes how code units call, carry data, cross runtime boundaries, observe or change state, occur in order, satisfy contracts, share identity, contain one another, and depend on one another. It performs the control you select; it does not infer task relevance or decide what the user meant.
|
|
69
88
|
|
|
89
|
+
For end-to-end system understanding, load `$scip-explore` alongside this skill. `scip-explore` owns the material-fact model, evidence integration, answer audit, and stopping judgment; this skill remains the calibrated sensing and source-reading surface.
|
|
90
|
+
|
|
70
91
|
Use scip-query as the primary exploration surface for tracked repository text. Treat its commands as controls, not a checklist. Use every capability needed by the task, but make each query answer a distinct repository question. There is no mandatory sequence, required anchor phase, or query-count limit. Thoroughness means understanding the relevant system end to end, not exhausting the repository.
|
|
71
92
|
|
|
72
93
|
Use one discriminating exact `search`, `outline`, or `entrypoints` locator, then reuse every returned symbol or `file:line` as an `evidence` root. Do not repeat generic synonym searches after usable candidates exist. Locator ordering does not establish relevance. When several implementations match the same vocabulary, do not select one by path, naming, apparent recency, or result order. Compare their entry surfaces, incoming execution, ownership, callers, or runtime connections; if the repository does not establish one as authoritative, explain the alternatives and their scopes.
|
package/dist/by-kind-CI3O6PQG.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a,b}from"./chunk-FGB567HK.js";import"./chunk-MTDBHTSF.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 byKind,b as kindCounts};
|
|
2
|
-
//# sourceMappingURL=by-kind-CI3O6PQG.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-IYV2YBHM.js";import"./chunk-7KCZELVM.js";import"./chunk-BGBBVSH4.js";import"./chunk-WULAPQUD.js";import"./chunk-MTDBHTSF.js";import"./chunk-FTSQNONX.js";import"./chunk-35ELD3RM.js";import"./chunk-GTDP2SKQ.js";import"./chunk-2I3RSUWX.js";import"./chunk-4N6QSEMZ.js";import"./chunk-OIRWZIYL.js";import"./chunk-VGRUM7JI.js";import"./chunk-GFLTPNWV.js";import"./chunk-CT5SI2I4.js";import"./chunk-54EOGFBR.js";import"./chunk-F4FNK44D.js";import"./chunk-T6FRID7Y.js";import"./chunk-UZFCZ7SJ.js";import"./chunk-Q7HB7BFJ.js";import"./chunk-SEUJVWT2.js";import"./chunk-SF7X6QNW.js";import"./chunk-SDPA5DKN.js";import"./chunk-DOPCR5BY.js";import"./chunk-VWLIOEEF.js";import"./chunk-G6OGPXJW.js";import"./chunk-DRENNWRG.js";import"./chunk-H5EXS3HM.js";import"./chunk-HGFDYOVB.js";import"./chunk-3VLJ2DCA.js";import"./chunk-4DCKBY6T.js";export{a as callGraph};
|
|
2
|
-
//# sourceMappingURL=call-graph-6QTUTXH7.js.map
|
package/dist/chunk-2COFMIVK.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import{A as f,G as u}from"./chunk-MO226P4Q.js";import b from"ignore";import{existsSync as y,readdirSync as v}from"fs";import{dirname as d,isAbsolute as m,join as l,relative as T,resolve as S}from"path";function E(n){let t=b();return _(n,t)||t.add(F),{isIgnored:e=>g(t,n,e),filter:e=>e.filter(i=>!g(t,n,i))}}function _(n,t){let r=new Set,e=(s,a)=>{if(!(r.has(s)||!y(s)))try{let c=u(s,{maxBytes:f,inputKind:"gitignore file"});t.add(a?$(c,a):c),r.add(s)}catch{}},i=d(n),o=0;for(;i!==d(i)&&o<5&&(e(l(i,".gitignore"),""),!y(l(i,".git")));)i=d(i),o++;return h(n,"",t,e),r.size>0}function h(n,t,r,e){let i=t?l(n,t):n;e(l(i,".gitignore"),t);let o;try{o=v(i,{withFileTypes:!0})}catch{return}for(let s of o){if(!s.isDirectory()||s.name===".git")continue;let a=t?`${t}/${s.name}`:s.name;g(r,n,`${a}/`)||h(n,a,r,e)}}function $(n,t){let r=t.replaceAll("\\","/").replace(/\/+$/,"");return n.split(/\r?\n/).map(e=>A(e,r)).join(`
|
|
2
|
-
`)}function A(n,t){let r=n.trimStart();if(!r||r.startsWith("#"))return n;let e=n.slice(0,n.length-r.length),i=r.startsWith("!"),o=i?r.slice(1):r;if(!o||o.startsWith("#"))return n;let s=o.startsWith("/"),a=s?o.slice(1):o,p=(a.endsWith("/")?a.slice(0,-1):a).includes("/")||s?`${t}/${a}`:`${t}/**/${a}`;return`${e}${i?"!":""}${p}`}var F=`
|
|
3
|
-
# Dependencies
|
|
4
|
-
node_modules/
|
|
5
|
-
vendor/
|
|
6
|
-
.bundle/
|
|
7
|
-
|
|
8
|
-
# Build output
|
|
9
|
-
dist/
|
|
10
|
-
build/
|
|
11
|
-
out/
|
|
12
|
-
target/
|
|
13
|
-
bin/
|
|
14
|
-
obj/
|
|
15
|
-
|
|
16
|
-
# Python
|
|
17
|
-
__pycache__/
|
|
18
|
-
*.pyc
|
|
19
|
-
*.pyo
|
|
20
|
-
.venv/
|
|
21
|
-
venv/
|
|
22
|
-
.env/
|
|
23
|
-
env/
|
|
24
|
-
*.egg-info/
|
|
25
|
-
|
|
26
|
-
# Rust
|
|
27
|
-
target/
|
|
28
|
-
|
|
29
|
-
# Java / Kotlin / Scala
|
|
30
|
-
*.class
|
|
31
|
-
.gradle/
|
|
32
|
-
.mvn/
|
|
33
|
-
|
|
34
|
-
# C# / .NET
|
|
35
|
-
bin/
|
|
36
|
-
obj/
|
|
37
|
-
packages/
|
|
38
|
-
|
|
39
|
-
# Go
|
|
40
|
-
vendor/
|
|
41
|
-
|
|
42
|
-
# Dart
|
|
43
|
-
.dart_tool/
|
|
44
|
-
build/
|
|
45
|
-
|
|
46
|
-
# PHP
|
|
47
|
-
vendor/
|
|
48
|
-
|
|
49
|
-
# IDE / OS
|
|
50
|
-
.idea/
|
|
51
|
-
.vscode/
|
|
52
|
-
*.swp
|
|
53
|
-
*.swo
|
|
54
|
-
.DS_Store
|
|
55
|
-
Thumbs.db
|
|
56
|
-
|
|
57
|
-
# Type definitions (often noise in queries)
|
|
58
|
-
*.d.ts
|
|
59
|
-
`;function g(n,t,r){let e=x(t,r);if(!e)return!1;try{return n.ignores(e)}catch{return!1}}function x(n,t){if(!t||t===".")return null;if(!m(t)&&!t.startsWith(".."))return t.replaceAll("\\","/");let r=m(t)?t:S(n,t),e=T(n,r).replaceAll("\\","/");return!e||e==="."||e.startsWith("..")?null:e}export{E as a};
|
|
60
|
-
//# sourceMappingURL=chunk-2COFMIVK.js.map
|
package/dist/chunk-35ELD3RM.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as fe,d as Ve,e as Qe}from"./chunk-GTDP2SKQ.js";import{a as rt}from"./chunk-4N6QSEMZ.js";import{a as mt,b as ft,c as pt,d as Se,i as K,j as Y,k as dt,l as Z,n as St}from"./chunk-CT5SI2I4.js";import{j as lt}from"./chunk-54EOGFBR.js";import{h as ut}from"./chunk-T6FRID7Y.js";import{c as ct,d as de}from"./chunk-UZFCZ7SJ.js";import{a as V,b as gt,f as yt}from"./chunk-SEUJVWT2.js";import{u as Ze}from"./chunk-SF7X6QNW.js";import{D as Ge,G,L as Ke,N as Ye,V as tt,W as nt,a as oe,c as ce,f as He,h as $e,i as le,j as ue,k as z,t as me,v as Je}from"./chunk-SDPA5DKN.js";import{a as We,c as qe}from"./chunk-VWLIOEEF.js";import{a as Ne,k as it,n as st,o as at,p as ot}from"./chunk-G6OGPXJW.js";import{d as Xe,g as et,i as pe}from"./chunk-DRENNWRG.js";import{a as ae,c as Oe,e as T}from"./chunk-HGFDYOVB.js";import{b as ke,c as Le,d as J}from"./chunk-3VLJ2DCA.js";import{W as Be,c as Fe,da as je,ea as ze,f as _e,g as Ue}from"./chunk-4DCKBY6T.js";function Rt(e){let t=new Map,n=Jt(e),r=new Map;return i=>{let s=$t(i),a=r.get(s);if(a!==void 0)return a;if(!n.has(i.file))return r.set(s,i.symbol),i.symbol;let o=t.get(i.file);o||(o=Gt(tt(e,i.file)),t.set(i.file,o));let u=Kt(o,i);return r.set(s,u),u}}function $t(e){return`${e.file}\0${e.symbol}\0${e.line}`}function Jt(e){return new Set(e.all("SELECT relative_path FROM documents").map(t=>t.relative_path))}function Gt(e){let t=new Map,n=new Map;for(let r of e){let i=t.get(r.leaf);i?i.push(r):t.set(r.leaf,[r]);let s=n.get(r.startLine);s?s.push(r):n.set(r.startLine,[r])}return{definitions:e,byLeaf:t,byStartLine:n}}function Kt(e,t){if(e.definitions.length===0)return t.symbol;let n=Vt(t.symbol),r=Yt(e.byLeaf,n),i=Zt(r,t.line);if(i)return i.symbol;let s=e.byStartLine.get(t.line)??[];return s.length===1?s[0].symbol:t.symbol}function Yt(e,t){let n=[],r=new Set;for(let i of t)for(let s of e.get(i)??[])r.has(s.symbolId)||(r.add(s.symbolId),n.push(s));return n}function Zt(e,t){let n=null;for(let r of e)if(!(r.startLine>t||r.endLine<t)){if(r.startLine===t)return r;(!n||r.endLine-r.startLine<n.endLine-n.startLine)&&(n=r)}return n}function Vt(e){let t=new Set([e]),r=e.split(/::|\.|#/).filter(Boolean).at(-1);return r&&t.add(r),t}function bt(e,t){let r=Ye(e,t).map(i=>Xt(t,i));return{usage:r,positions:en(e,t,r)}}function vt(e,t){return{importUsage(n){let r=e.importUsageFacts(n);if(!t||r.positions.length===0)return r.usage;let i=t.importDefinitionsForFile(n,r.positions);return i.available?Qt(r.usage,i.sourcePaths):r.usage}}}function Qt(e,t){return e.map((n,r)=>{let i=t.get(String(r));return i?{...n,sourcePath:i}:n})}function Xt(e,t){let n=t.isTypeOnly===!0,r=t.kind==="side-effect"||n||t.used;return{importer:e,sourcePath:t.sourcePath,importedName:t.importedName,localName:t.localName,kind:t.kind,isTypeOnly:n,isUsed:r,isTypeUsed:n,isValueUsed:t.kind==="side-effect"||!n&&t.used,references:[]}}function en(e,t,n){let r=Ge(e,t);if(!r)return[];let i=tn(r.rootNode),s=new Map;for(let o of i){let u=s.get(ye(o.importedName,o.localName));u?u.push(o.position):s.set(ye(o.importedName,o.localName),[o.position])}let a=[];return n.forEach((o,u)=>{let l=s.get(ye(o.importedName,o.localName??o.importedName))?.shift();l&&a.push({...l,id:String(u),file:t})}),a}function tn(e){let t=[];for(let n of e.descendantsOfType("use_declaration")){let r=n.namedChildren.find(i=>i.type!=="visibility_modifier");r&&t.push(...Q(r,""))}return t.filter(n=>n.importedName!=="*")}function Q(e,t){switch(e.type){case"identifier":case"super":case"self":case"crate":return[{importedName:e.text,localName:e.text,position:ge(e,e.text)}];case"scoped_identifier":{let n=e.text.split("::").pop()??e.text;return[{importedName:n,localName:n,position:ge(e,n)}]}case"scoped_use_list":{let n=e.namedChild(0),r=e.namedChild(1);if(!n||!r)return[];let i=Ke(t,n.text);return r.namedChildren.flatMap(s=>Q(s,i))}case"use_list":return e.namedChildren.flatMap(n=>Q(n,t));case"use_as_clause":{let n=e.namedChild(0),r=e.namedChild(1);return!n||!r?[]:Q(n,t).map(i=>({...i,localName:r.text}))}case"use_wildcard":{let n=e.namedChild(0),r="*";return[{importedName:r,localName:r,position:ge(n??e,r)}]}default:return[]}}function ge(e,t){let n=Math.max(0,e.text.lastIndexOf(t));return{id:"",file:"",line:e.startPosition.row,column:e.startPosition.column+n+nn(t)}}function nn(e){return Math.max(0,Math.min(e.length-1,1))}function ye(e,t){return`${e}\0${t}`}import{spawnSync as Re}from"child_process";import{existsSync as be}from"fs";import{fileURLToPath as rn}from"url";var ve=15e3,he=8;function Dt(e,t={}){let n=t.status??pt,r=on(e,n),i=cn(e,n),s=ln(e,n),a=t.referenceResolver||t.calleeResolver||t.signatureResolver||!sn(t)?null:dt(e,n,{fallbackReferenceResolver:r,fallbackCalleeResolver:i,fallbackSignatureResolver:s}),o=t.referenceResolver??a??r,u=t.calleeResolver??a??i,l=t.signatureResolver??a??s,p=t.importUsageResolver??vt(t.sourceImportUsageResolver??an(),t.importDefinitionResolver??a),c=t.calleeSymbolResolver,m=t.sourceZeroCalleeOracle,S=t.scipOccurrenceCalleeOracle,M=new Map,D=new Map,A=null,v=null,x=()=>(A??=n(e),A),w=()=>{let g=x();return g.dependencyAvailable?v??g:g},y=g=>{if(g.length===0)return new Map;let f=q(g);try{let d=o.referencesForDefinitions(f),R=x();return v=X(R,d),d.available?new Map(d.references):K(f,d.references)}catch(d){let R=x();return v=W(R,d),L(f)}},I=g=>{if(g.length===0)return new Map;let f=q(g),d=f.filter(ht);if(d.length===0)return O(f);let R=new Map,U=Ct(d,S),E=[];for(let b of d)D.has(b.symbolId)?R.set(b.symbolId,D.get(b.symbolId)??[]):U.has(b.symbolId)?R.set(b.symbolId,U.get(b.symbolId)??[]):It(b,m)?R.set(b.symbolId,[]):E.push(b);if(E.length===0)return N(f,R,void 0);try{let b=u.calleesForDefinitions(E),F=x();v=X(F,b);let P=N(E,b.callees,c);for(let[j,re]of P)R.set(j,re);return N(f,R,void 0)}catch(b){let F=x();return v=W(F,b),O(f)}},C=(g,f)=>{let d=q(g),R=q(f),U=R.filter(ht),E=new Map,b=Ct(U,S),F=[];for(let P of U)b.has(P.symbolId)?E.set(P.symbolId,b.get(P.symbolId)??[]):It(P,m)?E.set(P.symbolId,[]):F.push(P);if(d.length===0&&F.length===0)return{references:L(d),callees:N(R,E,void 0)};try{let P=a?a.referencesAndCalleesForDefinitions(d,F):pn(o,u,{referenceDefinitions:d,calleeDefinitions:F}),j=x();v=X(j,P);let re=P.available?new Map(P.references):K(d,P.references);for(let[ie,se]of P.callees)E.set(ie,se);let Ee=N(R,E,c);for(let[ie,se]of Ee)D.set(ie,se);return{references:re,callees:Ee}}catch(P){let j=x();return v=W(j,P),{references:L(d),callees:O(R)}}},h=g=>{if(g.length===0)return new Map;let f=q(g);try{let d=l.signaturesForDefinitions(f),R=x();return v=X(R,d),Mt(f,d.signatures)}catch(d){let R=x();return v=W(R,d),ee(f)}};return{language:"rust",availability:w,dispose:()=>{a?.dispose()},importUsage:g=>{let f=M.get(g);if(f)return f;try{let d=p.importUsage(g);return M.set(g,d),d}catch(d){let R=x();return v=W(R,d),[]}},referencesFor:g=>y([g]).get(g.symbolId)??[],referencesForDefinitions:y,referencesAndCalleesForDefinitions:C,calleesFor:g=>I([g]).get(g.symbolId)??[],calleesForDefinitions:I,signatureFor:g=>h([g]).get(g.symbolId)??null}}function X(e,t){let n={dependencyAvailable:e.dependencyAvailable,resolvedBinary:t.resolvedBinary??e.resolvedBinary,...e.note?{note:e.note}:{}};return t.available?{available:!0,...n}:{available:!1,reason:t.reason,...n}}function W(e,t){return{available:!1,dependencyAvailable:e.dependencyAvailable,resolvedBinary:e.resolvedBinary,...e.note?{note:e.note}:{},reason:t instanceof Error?t.message:String(t)}}function sn(e){if(e.usePersistentSession!==void 0)return e.usePersistentSession;let t=process.env.SCIP_RUST_SEMANTIC_SESSION;return t!=="0"&&t!=="false"}function an(){return{importUsageFacts:()=>({usage:[],positions:[]})}}function q(e){return e.map(t=>{let n=t;return{...t,leaf:typeof n.leaf=="string"?n.leaf:Xe(t.symbol),parentTypeName:n.parentTypeName??null,isFunctionLike:typeof n.isFunctionLike=="boolean"?n.isFunctionLike:et(t.symbol),isTypeLike:n.isTypeLike??!1,kind:n.kind??null,documentation:n.documentation??null,enclosingSymbol:n.enclosingSymbol??null}})}function ht(e){return e.isFunctionLike}function It(e,t){if(!t)return!1;try{return t(e)}catch{return!1}}function Ct(e,t){if(!t||e.length===0)return new Map;try{return t(e)}catch{return new Map}}function on(e,t){return{referencesForDefinitions:n=>un(e,t,n)}}function cn(e,t){return{calleesForDefinitions:n=>mn(e,t,n)}}function ln(e,t){return{signaturesForDefinitions:n=>fn(e,t,n)}}function un(e,t,n){let r=t(e);if(!r.available||!r.resolvedBinary)return{available:!1,resolvedBinary:r.resolvedBinary,reason:De(r),references:L(n)};let i=Ie();if(!be(i))return{available:!1,resolvedBinary:r.resolvedBinary,reason:`Rust semantic worker was not found at ${i}. Run npm run build before using built semantic Rust queries.`,references:L(n)};let s=B(process.env.SCIP_RUST_SEMANTIC_REQUEST_TIMEOUT_MS,ve),a=te(process.env.SCIP_RUST_SEMANTIC_REFERENCE_RETRY_TIMEOUT_MS,0),o=B(process.env.SCIP_RUST_SEMANTIC_CONCURRENCY,he),u=te(process.env.SCIP_RUST_SEMANTIC_DIAGNOSTICS_TIMEOUT_MS,Math.min(s,1e4)),l=Z(process.env.SCIP_RUST_SEMANTIC_SETTLE_MS,{definitionCount:n.length,includeReferences:!0}),p={projectRoot:e,rustAnalyzerBinary:r.resolvedBinary,definitions:[...n],requestTimeoutMs:s,...a>0?{referenceRetryTimeoutMs:a}:{},diagnosticsTimeoutMs:u,settleDelayMs:l,concurrency:o},c=Re(process.execPath,[i],{cwd:e,input:JSON.stringify(p),encoding:"utf8",maxBuffer:50*1024*1024,timeout:Y(n.length,St(s,p.referenceRetryTimeoutMs),o)}),m=Me(c.stdout);if(m)return{...Ce(m),resolvedBinary:r.resolvedBinary,references:K(n,new Map(m.references),new Set(m.incompleteReferenceSymbolIds??[]))};let S=c.error instanceof Error?c.error.message:c.stderr.trim()||`Rust semantic worker exited with status ${c.status??"unknown"}.`;return{available:!1,resolvedBinary:r.resolvedBinary,reason:S,references:L(n)}}function mn(e,t,n){let r=t(e);if(!r.available||!r.resolvedBinary)return{available:!1,resolvedBinary:r.resolvedBinary,reason:De(r),callees:O(n)};let i=Ie();if(!be(i))return{available:!1,resolvedBinary:r.resolvedBinary,reason:`Rust semantic worker was not found at ${i}. Run npm run build before using built semantic Rust queries.`,callees:O(n)};let s=B(process.env.SCIP_RUST_SEMANTIC_REQUEST_TIMEOUT_MS,ve),a=B(process.env.SCIP_RUST_SEMANTIC_CONCURRENCY,he),o=te(process.env.SCIP_RUST_SEMANTIC_DIAGNOSTICS_TIMEOUT_MS,Math.min(s,1e4)),u=Z(process.env.SCIP_RUST_SEMANTIC_SETTLE_MS,{definitionCount:n.length,includeReferences:!1,includeCallees:!0}),l={projectRoot:e,rustAnalyzerBinary:r.resolvedBinary,definitions:[...n],requestTimeoutMs:s,diagnosticsTimeoutMs:o,settleDelayMs:u,concurrency:a,includeReferences:!1,includeCallees:!0},p=Re(process.execPath,[i],{cwd:e,input:JSON.stringify(l),encoding:"utf8",maxBuffer:50*1024*1024,timeout:Y(n.length,s,a)}),c=Me(p.stdout);if(c)return{...Ce(c),resolvedBinary:r.resolvedBinary,callees:N(n,new Map(c.callees??[]),void 0)};let m=p.error instanceof Error?p.error.message:p.stderr.trim()||`Rust semantic worker exited with status ${p.status??"unknown"}.`;return{available:!1,resolvedBinary:r.resolvedBinary,reason:m,callees:O(n)}}function fn(e,t,n){let r=t(e);if(!r.available||!r.resolvedBinary)return{available:!1,resolvedBinary:r.resolvedBinary,reason:De(r),signatures:ee(n)};let i=Ie();if(!be(i))return{available:!1,resolvedBinary:r.resolvedBinary,reason:`Rust semantic worker was not found at ${i}. Run npm run build before using built semantic Rust queries.`,signatures:ee(n)};let s=B(process.env.SCIP_RUST_SEMANTIC_REQUEST_TIMEOUT_MS,ve),a=B(process.env.SCIP_RUST_SEMANTIC_CONCURRENCY,he),o=te(process.env.SCIP_RUST_SEMANTIC_DIAGNOSTICS_TIMEOUT_MS,Math.min(s,1e4)),u=Z(process.env.SCIP_RUST_SEMANTIC_SETTLE_MS,{definitionCount:n.length,includeReferences:!1,includeCallees:!1,includeSignatures:!0}),l={projectRoot:e,rustAnalyzerBinary:r.resolvedBinary,definitions:[...n],requestTimeoutMs:s,diagnosticsTimeoutMs:o,settleDelayMs:u,concurrency:a,includeReferences:!1,includeCallees:!1,includeSignatures:!0},p=Re(process.execPath,[i],{cwd:e,input:JSON.stringify(l),encoding:"utf8",maxBuffer:50*1024*1024,timeout:Y(n.length,s,a)}),c=Me(p.stdout);if(c)return{...Ce(c),resolvedBinary:r.resolvedBinary,signatures:Mt(n,new Map(c.signatures??[]))};let m=p.error instanceof Error?p.error.message:p.stderr.trim()||`Rust semantic worker exited with status ${p.status??"unknown"}.`;return{available:!1,resolvedBinary:r.resolvedBinary,reason:m,signatures:ee(n)}}function pn(e,t,n){let r=n.referenceDefinitions.length>0?e.referencesForDefinitions(n.referenceDefinitions):{available:!0,references:L(n.referenceDefinitions)},i=n.calleeDefinitions.length>0?t.calleesForDefinitions(n.calleeDefinitions):{available:!0,callees:O(n.calleeDefinitions)},s={resolvedBinary:r.resolvedBinary??i.resolvedBinary,references:r.references,callees:i.callees};return r.available&&i.available?{available:!0,...s}:{available:!1,reason:(r.available?void 0:r.reason)??(i.available?void 0:i.reason)??"Rust semantic resolution was unavailable.",...s}}function L(e){return new Map(e.map(t=>[t.symbolId,[]]))}function O(e){return new Map(e.map(t=>[t.symbolId,[]]))}function ee(e){return new Map(e.map(t=>[t.symbolId,null]))}function N(e,t,n){let r=0,i=0;return T("rust.semantic.callees.complete-map",()=>{let s=new Map;for(let a of e){let o=t.get(a.symbolId)??[];o.length>0&&(r+=1),i+=o.length,s.set(a.symbolId,o.map(u=>({...u,symbol:n?n(u):u.symbol})))}return s},()=>({definitions:e.length,rows:r,callees:i,resolveSymbols:!!n}))}function Mt(e,t){return new Map(e.map(n=>[n.symbolId,t.get(n.symbolId)??null]))}function Ie(){return rn(new URL("./rust-semantic-worker.js",import.meta.url))}function Ce(e){return e.available?{available:!0}:{available:!1,reason:e.reason}}function De(e){return e.available?"rust-analyzer binary path is unavailable.":e.reason}function Me(e){try{let t=JSON.parse(e);if(!t||typeof t!="object")return null;let n=t;if(typeof n.available!="boolean"||!Array.isArray(n.references)||n.available===!1&&typeof n.reason!="string"||n.available===!0&&n.reason!==void 0)return null;let r={references:n.references,incompleteReferenceSymbolIds:Array.isArray(n.incompleteReferenceSymbolIds)?n.incompleteReferenceSymbolIds.filter(i=>typeof i=="number"):void 0,callees:Array.isArray(n.callees)?n.callees:void 0,signatures:Array.isArray(n.signatures)?n.signatures:void 0};return n.available===!0?{available:!0,...r}:{available:!1,reason:String(n.reason),...r}}catch{return null}}function B(e,t){return lt(e)??t}function te(e,t){if(!e)return t;let n=Number(e);return Number.isInteger(n)&&n>=0?n:t}import{existsSync as dn}from"fs";import{deserializeSCIP as Sn,SymbolRole as gn}from"@c4312/scip";var xe=new WeakMap;function Pt(e,t){let n=t.filter(yn);if(n.length===0)return new Map;let r=!1,i=0,s=0;return T("rust.scip-occurrence.callees",()=>{let a=vn(e);if(r=!!a,!a)return new Map;let o=new Map;for(let u of n){let l=Rn(e,a,u);l!==null&&(o.set(u.symbolId,l),i+=1,s+=l.length)}return o},()=>({definitions:t.length,candidates:n.length,indexAvailable:r,resolvedDefinitions:i,resolvedCallees:s}))}function yn(e){return!(!e.symbol.startsWith("rust-analyzer ")||!e.relativePath.endsWith(".rs")||!e.isFunctionLike||e.leaf==="main"||pe(e.symbol))}function Rn(e,t,n){let r=G(e,n.relativePath);if(!r||r.language!=="rust")return null;let i=r.callables.find(l=>l.startLine!==n.startLine||l.endLine!==n.endLine?!1:l.name===n.leaf||n.leaf.endsWith(l.name)||l.name.endsWith(n.leaf));if(!i)return null;let s=r.callSites.filter(l=>l.line>=i.startLine&&l.line<=i.endLine);if(s.length===0)return null;let a=(t.occurrencesByFile.get(n.relativePath)??[]).filter(l=>l.line>=i.startLine&&l.line<=i.endLine&&l.callee.symbol!==n.symbol);if(a.some(l=>l.traitImplMember)||!bn(s,a))return null;let o=[],u=new Set;for(let l of a){let p=`${l.callee.symbol}\0${l.callee.file}\0${l.callee.line}`;u.has(p)||(u.add(p),o.push(l.callee))}return o}function bn(e,t){let n=xt(e),r=xt(t);if(n.size!==r.size)return!1;for(let[i,s]of n)if(r.get(i)!==s)return!1;return!0}function xt(e){let t=new Map;for(let n of e){let r=n.calleeLeaf??n.leaf;if(!r)continue;let i=`${n.line}\0${r}`;t.set(i,(t.get(i)??0)+1)}return t}function vn(e){if(xe.has(e))return xe.get(e)??null;let t=hn(e);return xe.set(e,t),t}function hn(e){if(!e.generation.indexPath||!dn(e.generation.indexPath))return null;try{let t=nt(e).filter(s=>s.symbol.startsWith("rust-analyzer ")&&s.relativePath.endsWith(".rs")&&s.isFunctionLike),n=new Map(t.map(s=>[s.symbol,s])),r=Sn(_e(e.generation.indexPath,{inputKind:"SCIP occurrence-callee index",maxBytes:Fe})),i=new Map;for(let s of r.documents??[]){let a=s.relativePath;if(!a||!a.endsWith(".rs")||e.isIgnored(a))continue;let o=[];for(let u of s.occurrences??[]){if(!u.symbol||(u.symbolRoles&gn.Definition)!==0)continue;let l=n.get(u.symbol);if(!l)continue;let p=u.range?.[0];Number.isInteger(p)&&o.push({line:p,leaf:l.leaf,traitImplMember:pe(l.symbol),callee:{symbol:l.symbol,file:l.relativePath,line:l.startLine,callsiteLine:p}})}i.set(a,o)}return{occurrencesByFile:i}}catch{return null}}var ne=class{sessions=new WeakMap;getOrCreate(t,n,r){let i=In(t,n),s=this.sessions.get(t);s||(s=new Map,this.sessions.set(t,s));let a=s.get(i);if(a)return a.hits+=1,a.lastUsedAtMs=Date.now(),a.provider;let o=Date.now(),u=r();return s.set(i,{key:i,language:n,projectRoot:t.config.projectRoot,provider:u,createdAtMs:o,lastUsedAtMs:o,hits:1}),u}sessionsFor(t){return[...this.sessions.get(t)?.values()??[]]}clear(t){let n=this.sessions.get(t);if(n)for(let r of n.values())r.provider.dispose?.();this.sessions.delete(t)}};function In(e,t){return`${e.config.projectRoot}:${t}-workspace`}import{randomUUID as Cn}from"crypto";import{existsSync as Dn}from"fs";import{dirname as Mn}from"path";function wt(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let t=e;if(typeof t.available!="boolean"||t.dependencyAvailable!==void 0&&typeof t.dependencyAvailable!="boolean"||t.tsconfigPath!==void 0&&typeof t.tsconfigPath!="string"||t.tsconfigPaths!==void 0&&(!Array.isArray(t.tsconfigPaths)||!t.tsconfigPaths.every(n=>typeof n=="string"))||t.resolvedBinary!==void 0&&typeof t.resolvedBinary!="string"||t.note!==void 0&&typeof t.note!="string")return null;if(t.available===!0){if(t.reason!==void 0)return null}else if(typeof t.reason!="string"||t.reason.length===0)return null;return t}var xn=12e4,Pn=5;function Et(e,t,n={}){let r=new Pe(e,n),i=null,s=null,a=process.env.SCIP_QUERY_SKIP_WATCH_SERVICE==="1",o=()=>(i??=yt(e,t),i),u=(c,m,S)=>{if(a)return S();try{return m(r.request(c))}catch{return a=!0,S()}},l=(c,m)=>u({kind:"references",definitions:[...c],...m?.exact?{exact:!0}:{}},S=>At(S),()=>o().referencesForDefinitions?.(c,m)??new Map(c.map(S=>[S.symbolId,o().referencesFor(S)]))),p=c=>u({kind:"callees",definitions:[...c]},m=>At(m),()=>o().calleesForDefinitions?.(c)??new Map(c.map(m=>[m.symbolId,o().calleesFor(m)])));return{language:"typescript",availability:()=>(s??=u({kind:"availability"},An,()=>o().availability()),s),importUsage:c=>u({kind:"import-usage",file:c},m=>m,()=>o().importUsage(c)),referencesFor:c=>l([c]).get(c.symbolId)??[],referencesForDefinitions:l,referenceFragmentsForFiles:c=>u({kind:"reference-fragments",files:[...c]},m=>Tn(m),()=>o().referenceFragmentsForFiles?.(c)??new Map),calleesFor:c=>p([c]).get(c.symbolId)??[],calleesForDefinitions:p,signatureFor:c=>u({kind:"signature",definition:c},En,()=>o().signatureFor(c)),dispose:()=>i?.dispose?.()}}var Pe=class{constructor(t,n={}){this.db=t;this.runtime=n.runtime??_n,this.timeoutMs=n.timeoutMs??Fn(),this.mailboxLimits=n.mailboxLimits??{},this.cacheDir=Mn(t.config.dbPath),this.projectRoot=Be(t.config.projectRoot)}db;runtime;timeoutMs;cacheDir;projectRoot;mailboxLimits;request(t){let n=ct(this.cacheDir),r=gt(this.cacheDir),i=de(n.statePath);if(!Tt(i,this.projectRoot,this.runtime))throw new Error("Compatible TypeScript semantic service is not running.");let s=this.db.generation.identity;if(!s)throw new Error("Published TypeScript generation identity is unavailable.");let a=this.runtime.now(),o=a+this.timeoutMs,u=(this.runtime.monotonicNow??J)()+this.timeoutMs,l=Oe(),p=st("typescript-semantic-v3",{generation:s,profileEnvironment:l,request:t}),c=at(p),m=ot(r,{mailboxVersion:it,operationKey:p,clientId:this.runtime.randomId(),enqueuedAtMs:a,deadlineAtMs:o,protocolVersion:V,id:c,generation:s,profileEnvironment:l,request:t},{nowMs:a,limits:this.mailboxLimits});for(;(this.runtime.monotonicNow??J)()<=u;){if(Dn(m.responsePath))return wn(Ue(m.responsePath,{maxBytes:this.mailboxLimits.maxItemBytes??64*1024*1024,inputKind:"TypeScript semantic mailbox response"}),c,s,p);let S=de(n.statePath);if(!Tt(S,this.projectRoot,this.runtime))throw new Error("TypeScript semantic service stopped while processing a request.");this.runtime.sleep(Pn)}throw new Error(`TypeScript semantic service timed out after ${this.timeoutMs}ms.`)}};function Tt(e,t,n){let r=e?.processIdentity?n.readProcessIdentity?.(e.pid):null;return e!==null&&e.projectRoot===t&&e.typescriptSemantic?.protocolVersion===V&&n.isProcessAlive(e.pid)&&(!e.processIdentity||r!=null&&ke(e.processIdentity,r))}function wn(e,t,n,r){let i=JSON.parse(e);if(i.protocolVersion!==V||i.id!==t||i.operationKey!==r||i.ok===!0&&i.generation!==n)throw new Error("TypeScript semantic service wrote an incompatible response.");if(i.ok===!0)return i.response;throw new Error(typeof i.error=="string"?i.error:"TypeScript semantic service request failed.")}function At(e){if(!Array.isArray(e))throw new Error("TypeScript semantic service wrote an invalid numeric map.");return new Map(e)}function Tn(e){if(!Array.isArray(e))throw new Error("TypeScript semantic service wrote an invalid string map.");return new Map(e)}function An(e){let t=wt(e);if(!t)throw new Error("TypeScript semantic service wrote invalid availability.");return t}function En(e){if(e!==null&&typeof e!="string")throw new Error("TypeScript semantic service wrote an invalid signature.");return e}function Fn(){let e=Number(process.env.SCIP_TYPESCRIPT_SEMANTIC_TIMEOUT_MS);return Number.isInteger(e)&&e>0?e:xn}var _n={now:Date.now,monotonicNow:J,randomId:Cn,sleep(e){let t=new Int32Array(new SharedArrayBuffer(4));Atomics.wait(t,0,0,e)},isProcessAlive:Ne,readProcessIdentity:Le};var Ft=new ne;We({name:"semantic-provider",groups:["semantic-provider"],clearAll:e=>Ft.clear(e)});function H(e,t){let n=_(t)??"typescript";return Ft.getOrCreate(e,n,()=>n==="rust"?Dt(e.config.projectRoot,{sourceImportUsageResolver:{importUsageFacts:r=>bt(e,r)},calleeSymbolResolver:Rt(e),sourceZeroCalleeOracle:r=>Un(e,r),scipOccurrenceCalleeOracle:r=>Pt(e,r)}):Et(e,t))}function _(e){return e?Je(e)==="rust"?"rust":Ze(e)?"typescript":null:"typescript"}function Un(e,t){let n=G(e,t.relativePath);if(!n||n.language!=="rust")return!1;let r=n.callables.find(i=>i.startLine===t.startLine&&i.endLine===t.endLine&&i.name===t.leaf)??n.callables.find(i=>i.startLine===t.startLine&&i.endLine===t.endLine);return r?!n.callSites.some(i=>i.line>=r.startLine&&i.line<=r.endLine):!1}var kn=/^[A-Za-z_][A-Za-z0-9_]*$/,_t=/\bDefault::default\b/g,Ln=/^\.\.\s*Default::default\b/;function Ut(e,t){let n=new Map,r=new Map;for(let i of t){let s=we(e,i,r);s!==null&&n.set(i.symbolId,s)}return n}function we(e,t,n=new Map){let r=Nn(t.symbol);if(!r)return null;let i=rt(e,[t.symbolId]);if(i.length===0)return null;let s=new RegExp(`(^|[^A-Za-z0-9_])${me(r)}::default\\b`,"g"),a=new RegExp(`(^|[^A-Za-z0-9_])${me(r)}\\s*$`),o=On(e,t.symbolId),u=[];for(let l of i){let p=Bn(e,l.relative_path,n);if(p===null)return null;let c=p.split(/\r?\n/),m=0,S=[],M=0;for(let D=l.chunk_start;D<=l.chunk_end&&D<c.length;D+=1){let v=c[D]??"",x=new Set;s.lastIndex=0;let w;for(;w=s.exec(v);)u.push({file:l.relative_path,line:D,column:w.index+w[1].length+r.length+2}),M+=1;for(let y=0;y<v.length;y+=1){let I=Ln.exec(v.slice(y));if(I){if(o&&S.includes(m)){let h=y+I[0].lastIndexOf("default");u.push({file:l.relative_path,line:D,column:h}),x.add(h),M+=1}y+=I[0].length-1;continue}let C=v[y];if(C==="{"){let h=a.test(v.slice(0,y));m+=1,h&&S.push(m);continue}if(C==="}")for(m=Math.max(0,m-1);S.length>0&&S[S.length-1]>m;)S.pop()}for(_t.lastIndex=0;w=_t.exec(v);){let y=w.index+9;if(!x.has(y))return null}}if(M===0)return null}return ut(u)}function On(e,t){return e.get("SELECT 1 AS present FROM mentions WHERE symbol_id = ? AND role = 1 LIMIT 1",t)?.present===1}function Nn(e){let t=/impl#\[([^\]]+)\]\[Default\]default\(\)\./.exec(e)?.[1]??null;return!t||!kn.test(t)?null:t}function Bn(e,t,n){if(n.has(t))return n.get(t)??null;let r=e.get("SELECT text FROM documents WHERE relative_path = ?",t),i=typeof r?.text=="string"?r.text:jn(e,t);return n.set(t,i),i}function jn(e,t){try{return je(e.config.projectRoot,t,{inputKind:"indexed Rust source file"})}catch(n){if(!ze(n))throw n;return null}}function kt(e){let t=new Map;for(let n of e){let r=t.get(n.relativePath)??[];r.push(n),t.set(n.relativePath,r)}return t}var zn="typescript-import-usage-v1",Wn="typescript-signatures-v1",Te=qe("semantic-prefetched-callees",{clearGroups:["whole-project","source-file","semantic-provider"]}),Lt=ue({kind:"semantic-import-usage",invalidation:z("semantic-import-usage"),serialize:e=>JSON.stringify(e),deserialize:qt}),Ot=ue({kind:"semantic-signatures",invalidation:z("semantic-signatures"),serialize:e=>JSON.stringify(e),deserialize:er}),Nt=le({kind:"typescript-import-usage",invalidation:z("typescript-import-usage"),serialize:e=>JSON.stringify(e),deserialize:qt}),Bt=le({kind:"typescript-signatures",invalidation:z("typescript-signatures"),serialize:e=>JSON.stringify(e),deserialize:tr});function Ae(e){let t=new Map,n=new Set;return{capability:(r,i)=>Ht(e,r,i),importUsage:r=>Hn(e,r),references:r=>$n(e,r),materializeReferences:(r,i)=>zt(e,r,t,n,i),callerMap:r=>Jn(e,r,t,n),calleeMap:r=>Vn(e,r),signature:r=>Qn(e,r)}}function qn(e,t){if(t.size===0)return;let n=Te.get(e,()=>new Map);for(let[r,i]of t)n.set(r,[...i])}function Ri(e,t){if(!Te.has(e))return{hits:[],misses:[...t]};let n=Te.get(e,()=>new Map),r=[],i=[];for(let s of t)n.has(s.symbolId)?r.push({definition:s,callees:n.get(s.symbolId)??[]}):i.push(s);return{hits:r,misses:i}}function bi(e,t){return Ae(e).importUsage(t)}function Hn(e,t){if(_(t)==="typescript"){let s="fallback",a=0,o=0,u=0,l=0;return T("typescript.import-usage.materialize",()=>{let p=fe(e,t,zn);if(p?.key){a=1;let m=Nt.read(e,t,p.key);if(m)return s="hit",o=1,m;u=1;let S=k(e,t);if(!S)return s="unavailable",[];let M=S.importUsage(t);return Nt.write(e,t,p.key,M),s="computed",M}l=1;let c=k(e,t);return c?(s="direct-fallback",c.importUsage(t)):(s="unavailable",[])},()=>({state:s,eligible:a,cacheHits:o,cacheMisses:u,fallbacks:l}))}let n=Wt(e,"semantic-import-usage",t);if(n){let s=Lt.read(e,t,n);if(s)return s}let r=k(e,t);if(!r)return[];let i=r.importUsage(t);return n&&Lt.write(e,t,n,i),i}function vi(e,t){return Ae(e).references(t)}function $n(e,t){let n=we(e,t);if(n)return n;let r=ft(e,t);if(r)return r;let i=k(e,t.relativePath);return i?i.referencesFor(t):[]}function Jn(e,t,n=new Map,r=new Set){let i=new Map,s=zt(e,t,n,r),a=0;return T("semantic.callers.from-references",()=>{for(let o of t)a+=Yn(e,i,o,n.get(o.symbolId)??[])},()=>({definitions:t.length,materialized:s.definitions,inMemoryHits:s.inMemoryHits,incompleteInMemoryHits:s.incompleteInMemoryHits,resultRows:i.size,callerFiles:a})),i}function zt(e,t,n,r,i={}){let s=ce(e),a=[],o=[],u=[],l=0,p=0,c=0,m=0,S=0,M=0,D=0,A=0,v=0,x=0,w=0,y=0,I=[],C=new Map,h=t.filter(f=>_(f.relativePath)==="typescript"&&!n.has(f.symbolId)&&!r.has(f.symbolId)),g=Qe(e,h,f=>H(e,f));if(g){v=h.length,x=g.cacheHits,w=g.cacheMisses,y=g.computedFiles;for(let f of h)n.set(f.symbolId,g.references.get(f.symbolId)??[])}if(T("semantic.references.cache-scan",()=>{for(let[f,d]of kt(t)){let R=[];for(let b of d)n.has(b.symbolId)?p+=1:r.has(b.symbolId)?A+=1:R.push(b);if(R.length===0){D+=1;continue}let U=Gn(e,s,f);if(!U){for(let b of R)_(b.relativePath)||(l+=1),u.push(b);continue}M+=1;let E=He(e,f,U);for(let b of R){let F=E.get(b.symbol)??null;if(F!==null){let P=Zn(F);if(P){c+=1,n.set(b.symbolId,P);continue}m+=1}o.push({definition:b,cacheFingerprint:U})}}},()=>({definitions:t.length,skippedUnsupportedLanguage:l,cacheHits:c,parseFailures:m,misses:o.length,unkeyed:u.length,inMemoryHits:p,incompleteInMemoryHits:A,fullyInMemoryFiles:D,cacheReadFiles:M})),o.length>0||u.length>0){I=[...u,...o.map(f=>f.definition)],C=T("semantic.references.compute-misses",()=>{let f=Kn(e,I,i);return S=f.size,f},()=>({definitions:I.length,misses:o.length,unkeyed:u.length,rows:S}));for(let f of I)C.has(f.symbolId)?(n.set(f.symbolId,C.get(f.symbolId)??[]),r.delete(f.symbolId)):r.add(f.symbolId);for(let{definition:f,cacheFingerprint:d}of o)C.has(f.symbolId)&&Ht(e,"semantic-references",f.relativePath).available&&a.push({relativePath:f.relativePath,symbol:f.symbol,projectFingerprint:d,payload:JSON.stringify(C.get(f.symbolId)??[])})}return a.length>0&&T("semantic.references.cache-write",()=>$e(e,a),()=>({entries:a.length})),C.size>0&&Ve(e,I,C,f=>H(e,f)),{definitions:t.length,inMemoryHits:p,incompleteInMemoryHits:A,cacheHits:c,misses:o.length,unkeyed:u.length,skippedUnsupportedLanguage:l,parseFailures:m,computed:S,incomplete:r.size,cacheWrites:a.length,fragmentDefinitions:v,fragmentCacheHits:x,fragmentCacheMisses:w,fragmentComputedFiles:y}}function Gn(e,t,n){if(!t)return null;let r=_(n);return r==="typescript"?t:r==="rust"?oe(JSON.stringify({kind:"semantic-references",language:r,engine:Se(e.config.projectRoot),projectFingerprint:t})):null}function Kn(e,t,n={}){let r=ae(),i=new Map,s=0,a=0,o=0,u=0,l=0,p=0,c=0,m=0,S=0;return T("semantic.references.provider-loop",()=>{let M=Ut(e,t),D=mt(e,t),A=new Map,v=n.prefetchCallees?new Map:null,x=[];for(let y of t){let I,C=()=>(I??=k(e,y.relativePath),I);if(v){let d=C();if(d?.referencesAndCalleesForDefinitions){let R=v.get(d);R?R.push(y):v.set(d,[y]),S+=1}}let h=M.get(y.symbolId);if(h){o+=1,u+=h.length,$(i,y.symbolId,h,r,d=>{c+=1,m+=d});continue}let g=D.get(y.symbolId);if(g){l+=1,p+=g.length,$(i,y.symbolId,g,r,d=>{c+=1,m+=d});continue}let f=C();if(!f){r&&(a+=1);continue}if(r&&(s+=1),f.referencesForDefinitions){let d=A.get(f);d?d.push(y):A.set(f,[y])}else x.push({provider:f,definition:y})}let w=new Set;if(v)for(let[y,I]of v){if(!y.referencesAndCalleesForDefinitions)continue;let C=A.get(y)??[],h=y.referencesAndCalleesForDefinitions(C,I);w.add(y),qn(e,h.callees);for(let g of C){if(!h.references.has(g.symbolId))continue;let f=h.references.get(g.symbolId)??[];$(i,g.symbolId,f,r,d=>{c+=1,m+=d})}}for(let[y,I]of A){if(w.has(y))continue;let C=y.referencesForDefinitions(I);for(let h of I){if(!C.has(h.symbolId))continue;let g=C.get(h.symbolId)??[];$(i,h.symbolId,g,r,f=>{c+=1,m+=f})}}for(let{provider:y,definition:I}of x){let C=y.referencesFor(I);$(i,I.symbolId,C,r,h=>{c+=1,m+=h})}return i},()=>({definitions:t.length,providerHits:s,providerMisses:a,rustDefaultFastPathRows:o,rustDefaultFastPathReferences:u,rustScipOccurrenceFastPathRows:l,rustScipOccurrenceFastPathReferences:p,prefetchCalleeDefinitions:S,definitionsWithReferences:c,referenceCount:m,rows:i.size}))}function $(e,t,n,r,i){e.set(t,n),r&&n.length>0&&i(n.length)}function Yn(e,t,n,r){let i=0;for(let s of r){if(s.file===n.relativePath||e.isIgnored(s.file))continue;let a=t.get(n.symbolId);a||(a=new Set,t.set(n.symbolId,a));let o=a.size;a.add(s.file),a.size!==o&&(i+=1)}return i}function Zn(e){try{return JSON.parse(e)}catch{return null}}function hi(e,t){return Ae(e).calleeMap(t)}function Vn(e,t){let n=ae(),r=new Map,i=0,s=0,a=0,o=0;return T("semantic.callees.provider-loop",()=>{let u=new Map,l=[];for(let p of t){let c=k(e,p.relativePath);if(!c){n&&(s+=1);continue}n&&(i+=1);let m=p;if(c.calleesForDefinitions){let S=u.get(c);S?S.push(m):u.set(c,[m])}else l.push({provider:c,definition:m})}for(let[p,c]of u){let m=p.calleesForDefinitions(c);for(let S of c){let M=m.get(S.symbolId)??[];jt(r,S.symbolId,M,n,D=>{a+=1,o+=D})}}for(let{provider:p,definition:c}of l){let m=p.calleesFor(c);jt(r,c.symbolId,m,n,S=>{a+=1,o+=S})}return r},()=>({definitions:t.length,providerHits:i,providerMisses:s,definitionsWithCallees:a,calleeCount:o,rows:r.size}))}function jt(e,t,n,r,i){n.length>0&&(e.set(t,n),r&&i(n.length))}function Qn(e,t){if(_(t.relativePath)==="typescript"){let a="fallback",o=0,u=0,l=0,p=0;return T("typescript.signature.materialize",()=>{let c=fe(e,t.relativePath,Wn);if(c?.key){o=1;let S=Bt.read(e,t.relativePath,c.key)??{};if(Object.prototype.hasOwnProperty.call(S,t.symbol))return a="hit",u=1,S[t.symbol]??null;l=1;let M=k(e,t.relativePath);if(!M)return a="unavailable",null;let D=M.signatureFor(t);return Bt.write(e,t.relativePath,c.key,{...S,[t.symbol]:D}),a="computed",D}p=1;let m=k(e,t.relativePath);return m?(a="direct-fallback",m.signatureFor(t)):(a="unavailable",null)},()=>({state:a,eligible:o,cacheHits:u,cacheMisses:l,fallbacks:p}))}let n=Wt(e,"semantic-signatures",t.relativePath),r=Xn(t);if(n){let a=Ot.read(e,r,n);if(a)return a.signature}let i=k(e,t.relativePath);if(!i)return null;let s=i.signatureFor(t);return n&&Ot.write(e,r,n,{signature:s}),s}function Wt(e,t,n){let r=ce(e);if(!r)return null;let i=_(n);return i!=="rust"?null:oe(JSON.stringify({kind:t,language:i,engine:Se(e.config.projectRoot),projectFingerprint:r}))}function Xn(e){return`${e.relativePath}\0${e.symbol}`}function qt(e){try{let t=JSON.parse(e);return Array.isArray(t)?t:null}catch{return null}}function er(e){try{let t=JSON.parse(e);if(!t||typeof t!="object")return null;let n=t.signature;return n!==null&&typeof n!="string"?null:{signature:n}}catch{return null}}function tr(e){try{let t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t))return null;for(let n of Object.values(t))if(n!==null&&typeof n!="string")return null;return t}catch{return null}}function Ht(e,t,n){let r=_(n);if(!r)return{slot:t,language:"typescript",available:!1,reason:"semantic evidence is only available for TypeScript or Rust files"};try{return{slot:t,language:r,...H(e,n).availability()}}catch(i){return{slot:t,language:r,available:!1,reason:i instanceof Error?i.message:String(i)}}}function k(e,t){if(!_(t))return null;let n=H(e,t);return n.availability().available?n:null}export{kt as a,_ as b,Ae as c,Ri as d,bi as e,vi as f,Kn as g,hi as h};
|
|
2
|
-
//# sourceMappingURL=chunk-35ELD3RM.js.map
|
package/dist/chunk-3FQ3KMCD.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d as p}from"./chunk-ZBNL3QCY.js";import{a as h}from"./chunk-WULAPQUD.js";import{a as y}from"./chunk-FTSQNONX.js";import{p as u}from"./chunk-2I3RSUWX.js";import{a as S,c as b}from"./chunk-VGRUM7JI.js";import{aa as d}from"./chunk-SDPA5DKN.js";import{c as m}from"./chunk-DRENNWRG.js";function x(e,o,r={}){let{direction:c="backward",maxDepth:s=3}=r,l=S(e,o);return l?c==="backward"?k(e,l,s,{semantic:r.semantic!==!1}):D(e,l,{semantic:r.semantic!==!1}):null}function j(e,o,r={}){return x(e,o,r)}function k(e,o,r,c){let s=[],l=new Set([o.symbol]),t=[o];for(let n=1;n<=r&&t.length!==0;n++){let i=[];for(let g of t){let w=h(e,g,{semantic:c.semantic,semanticEvidence:y});for(let a of w){if(l.has(a.symbol))continue;l.add(a.symbol),s.push({symbol:a.symbol,shortName:m(a.symbol),file:a.file,relationship:n===1?"referenced within definition (callee)":`depth ${n} callee`});let f=b(e,a.symbol);f&&!e.isIgnored(f.relativePath)&&i.push(f)}}t=i}return{symbol:o.symbol,shortName:m(o.symbol),direction:"backward",connectedSymbols:s}}function D(e,o,r){let c=new Set,s=[],l=new p(e);for(let t of u(e,o,{semantic:r.semantic,semanticEvidence:y})){if(s.length>=30)break;let n=t.enclosingSymbol??d(l.definitionsForFile(t.file),t.line)?.symbol??null;if(!n||n===o.symbol)continue;let i=b(e,n);!i||e.isIgnored(i.relativePath)||c.has(i.symbol)||(c.add(i.symbol),s.push({symbol:i.symbol,shortName:m(i.symbol),file:i.relativePath,relationship:`references target at ${t.file}:${t.line+1}`}))}return s.sort((t,n)=>t.file.localeCompare(n.file)),{symbol:o.symbol,shortName:m(o.symbol),direction:"forward",connectedSymbols:s}}export{x as a,j as b};
|
|
2
|
-
//# sourceMappingURL=chunk-3FQ3KMCD.js.map
|
package/dist/chunk-3VLJ2DCA.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i}from"./chunk-4DCKBY6T.js";var c=new Set(["aix","android","darwin","freebsd","haiku","linux","openbsd","sunos","win32","cygwin","netbsd"]);function m(r){if(!r||typeof r!="object"||Array.isArray(r))return null;let t=r;return t.version!==1||typeof t.pid!="number"||!Number.isSafeInteger(t.pid)||t.pid<=0||typeof t.platform!="string"||!c.has(t.platform)||typeof t.startToken!="string"||t.startToken.trim()===""?null:{version:1,pid:t.pid,platform:t.platform,startToken:t.startToken}}function d(r,t){return r.version===t.version&&r.pid===t.pid&&r.platform===t.platform&&r.startToken===t.startToken}import{execFileSync as u}from"child_process";import{platform as p}from"os";var y=1e3,a=16*1024,o;function x(r,t=f){if(!Number.isSafeInteger(r)||r<=0)return null;let e=r===process.pid&&t===f;if(e&&o)return{...o};try{let n=P(r,t);if(!n)return null;let s={version:1,pid:r,platform:t.platform,startToken:n};return e&&(o=s),{...s}}catch{return null}}function P(r,t){if(t.platform==="linux"||t.platform==="android")return I(t.readFile(`/proc/${r}/stat`));if(t.platform==="win32"){let e=`([DateTimeOffset](Get-Process -Id ${r} -ErrorAction Stop).StartTime).ToUnixTimeMilliseconds()`;return l(t.run("powershell.exe",["-NoProfile","-NonInteractive","-Command",e]))}return t.platform==="darwin"||t.platform==="freebsd"||t.platform==="openbsd"||t.platform==="netbsd"?l(t.run("ps",["-p",String(r),"-o","lstart="])):null}function I(r){let t=r.lastIndexOf(")");if(t<0)return null;let n=r.slice(t+1).trim().split(/\s+/)[19];return n&&/^\d+$/.test(n)?n:null}function l(r){let t=r.trim();return t===""?null:t}var f={platform:p(),readFile(r){return i(r,{maxBytes:a,inputKind:"process identity pseudo-file"})},run(r,t){return u(r,[...t],{encoding:"utf8",timeout:y,maxBuffer:a,env:{...process.env,LC_ALL:"C",LANG:"C"},stdio:["ignore","pipe","ignore"]})}};function E(){return performance.now()}export{m as a,d as b,x as c,E as d};
|
|
2
|
-
//# sourceMappingURL=chunk-3VLJ2DCA.js.map
|
package/dist/chunk-4DCKBY6T.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{isAbsolute as ze,relative as Qt}from"path";var g=class extends Error{constructor(r,n){super(`refusing unsafe project file path ${JSON.stringify(r)} (${n})`);this.relativePath=r;this.reason=n;this.name="UnsafeProjectPathError"}relativePath;reason;code="SCIP_QUERY_UNSAFE_PROJECT_PATH"};function le(e){return e.replace(/\\/g,"/").replace(/^\.\//,"")}function si(e){return e.replace(/\\/g,"/")}function ci(e,t){return le(e)===le(t)}function b(e,t){let r=Qt(e,t);return r===""||!r.startsWith("..")&&!ze(r)}function w(e){if(!e)throw new g(e,"empty-path");if(e.includes("\0"))throw new g(e,"nul-byte");if(ze(e)||/^[A-Za-z]:/.test(e)||e.startsWith("//")||e.startsWith("\\\\"))throw new g(e,"absolute-path");let t=le(e);if(t.split("/").some(n=>n===".."))throw new g(e,"parent-traversal");if(!t||t===".")throw new g(e,"empty-path");return t}import{createHash as Ze,randomUUID as gr}from"crypto";import{chmodSync as et,existsSync as B,linkSync as hr,lstatSync as ee,readdirSync as he,realpathSync as j,unlinkSync as mr,writeSync as yr}from"fs";import{homedir as br}from"os";import{basename as Sr,dirname as te,isAbsolute as Ve,join as m,resolve as re}from"path";import{closeSync as Zt,existsSync as er,fsyncSync as tr,mkdirSync as rr,openSync as nr}from"fs";import{dirname as We}from"path";function J(e,t,r,n){let i=0;for(;i<t.length;){let o=r.writeFile(e,t,i,t.length-i);if(!Number.isSafeInteger(o)||o<=0||o>t.length-i)throw new Error(`${n} write did not make valid forward progress`);i+=o}}function de(e,t){if(t!=="win32")return!1;let r=e.code;return r==="EACCES"||r==="EBADF"||r==="EINVAL"||r==="EISDIR"||r==="EPERM"}var G=Object.freeze({platform:process.platform,pathExists:e=>er(e),makeDirectory:e=>rr(e,{recursive:!0}),openFile:(e,t,r)=>nr(e,t,r),syncFile:e=>tr(e),closeFile:e=>Zt(e)});function $e(e,t=G){let r=[],n=e;for(;!t.pathExists(n);){r.push(n);let o=We(n);if(o===n)throw new Error(`Cannot establish a durable directory path without an existing ancestor: ${e}`);n=o}let i="synced";for(let o of r.reverse())t.makeDirectory(o),i=Y(i,K(We(o),t));return i}function K(e,t=G){let r;try{r=t.openFile(e,"r")}catch(n){if(de(n,t.platform))return"unsupported";throw n}try{t.syncFile(r)}catch(n){try{t.closeFile(r)}catch{}if(de(n,t.platform))return"unsupported";throw n}return t.closeFile(r),"synced"}function Y(...e){return e.every(t=>t==="not-requested")?"not-requested":e.includes("unsupported")?"unsupported":"synced"}import{createRequire as ir}from"module";var or=ir(import.meta.url),Ue=sr().version;function sr(){for(let e of["../package.json","../../package.json"])try{return or(e)}catch{}return{version:"0.0.0"}}import{closeSync as fe,fstatSync as X,openSync as pe,readFileSync as cr,readSync as He}from"fs";import{createHash as ar}from"crypto";var qe=8*1024*1024,ur=64*1024*1024,lr=512*1024*1024,dr=256*1024*1024,k=class extends Error{constructor(r,n,i,o,s){let c=i==="too-large"?`is ${o} bytes; the safety limit is ${s} bytes`:i==="not-regular"?"is not a regular file":"changed while it was being read";super(`${r} ${JSON.stringify(n)} ${c}`);this.inputKind=r;this.inputPath=n;this.reason=i;this.observedBytes=o;this.limitBytes=s;this.name="BoundedFileReadError"}inputKind;inputPath;reason;observedBytes;limitBytes;code="SCIP_QUERY_BOUNDED_FILE_READ"};function V(e,t){R(t.maxBytes);let r=String(e),n=pe(e,"r");try{let i=X(n);Xe(i,t,r);let o=cr(n),s=X(n);if(s.dev!==i.dev||s.ino!==i.ino||s.size!==i.size||o.byteLength!==i.size)throw new k(t.inputKind,r,"changed-during-read",s.size,t.maxBytes);return o}finally{fe(n)}}function Je(e,t,r="utf8"){return V(e,t).toString(r)}function M(e,t){return Je(e,{maxBytes:qe,inputKind:t})}function Ke(e,t){R(t.maxBytes);let r=[],n=Buffer.allocUnsafe(64*1024),i=0;for(;;){let o=He(e,n,0,n.length,null);if(o===0)break;if(i+=o,!Number.isSafeInteger(i)||i>t.maxBytes)throw new k(t.inputKind,`file descriptor ${e}`,"too-large",i,t.maxBytes);r.push(Buffer.from(n.subarray(0,o)))}return Buffer.concat(r,i)}function Ye(e,t){let r=pe(e,"r");try{return Ke(r,t)}finally{fe(r)}}function fr(e,t,r="utf8"){return Ye(e,t).toString(r)}function Q(e,t,r){R(t.maxBytes);let n=String(e),i=pe(e,"r");try{let o=X(i);Xe(o,t,n);let s=Buffer.allocUnsafe(Math.min(1024*1024,Math.max(1,o.size))),c=0;for(;c<o.size;){let u=He(i,s,0,Math.min(s.length,o.size-c),c);if(u===0)break;r(s.subarray(0,u)),c+=u}let a=X(i);if(a.dev!==o.dev||a.ino!==o.ino||a.size!==o.size||c!==o.size)throw new k(t.inputKind,n,"changed-during-read",a.size,t.maxBytes);return c}finally{fe(i)}}function pr(e,t){let r=ar("sha256");return Q(e,t,n=>r.update(n)),r.digest("hex")}function Xe(e,t,r){if(!e.isFile())throw new k(t.inputKind,r,"not-regular",Number(e.size),t.maxBytes);if(e.size>t.maxBytes)throw new k(t.inputKind,r,"too-large",Number(e.size),t.maxBytes)}function R(e){if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`maxBytes must be a non-negative safe integer; received ${e}`)}var tt=1,W=".scip-query-cache-owner.json",Pr=16*1024,rt=Object.freeze({...G,randomToken:()=>gr(),linkFile:(e,t)=>hr(e,t),removeFile:e=>mr(e),writeFile:(e,t,r,n)=>yr(e,t,r,n)});function Z(e,t){return Object.assign(new Error(`refusing unsafe project dbPath ${JSON.stringify(e)} (${t}); use a repository-relative directory that remains inside the checkout`),{name:"UnsafeCachePathError",code:"SCIP_QUERY_UNSAFE_CACHE_PATH",configuredPath:e,reason:t})}function F(e,t){return Object.assign(new Error(`refusing unowned cache directory ${JSON.stringify(e)} (${t}); move unrelated data elsewhere or choose a new empty dbPath`),{name:"CacheOwnershipError",code:"SCIP_QUERY_CACHE_OWNERSHIP",cacheDir:e,reason:t})}function jr(e,t){let r=j(e);return Fr(r,me(r,t))}function me(e,t){let r=j(e),n=process.env.SCIP_QUERY_CACHE_DIR;return n?re(n):t?.dbPath?wr(r,t.dbPath):xr(r)}function nt(){let e=process.env.XDG_CACHE_HOME;return m(e||m(br(),".cache"),"scip-query")}function xr(e){let t=re(e);try{t=j(t)}catch{}let r=Ze("sha256").update(t).digest("hex").slice(0,12);return m(nt(),"projects",r)}function Di(e){if(!/^[a-f0-9]{24}$/.test(e))throw new Error(`invalid repository cache identity: ${e}`);let t=m(nt(),"repositories",e);return st(t),j(t)}function Li(e){return process.env.SCIP_QUERY_SHARED_CACHE!=="0"&&!process.env.SCIP_QUERY_CACHE_DIR&&!process.env.SCIP_QUERY_INDEX_DB&&!e?.dbPath}function Bi(e,t){let r=jr(e,t);return{cacheDir:r,dbPath:m(r,"index.db"),indexPath:m(r,"index.scip"),metaPath:m(r,"meta.json")}}function Fr(e,t,r=rt){return Cr(e,t,r).cacheDir}function Cr(e,t,r=rt){let n=j(e),i=B(t)?"synced":st(t,r),o=j(t),s=m(o,W);if(B(s))return ge(n,o),ye(s),z(o),{kind:"existing",cacheDir:o};Qe(o),Rr(o),Qe(o);let a=`${JSON.stringify({schemaVersion:tt,canonicalProjectRoot:n,canonicalCacheDir:o,creatorVersion:Ue},null,2)}
|
|
2
|
-
`;try{let u=Tr(s,a,r),d=Y(i,u);return{kind:"published",cacheDir:o,achievedDurability:d==="synced"?"directory-durable":"file-flushed",directorySync:d}}catch(u){if(Dr(u))return ge(n,o),{kind:"existing",cacheDir:o};throw u}}function ge(e,t){let r=j(e),n=j(t);return Er(n,r,n)}function _i(e,t){return B(m(t,W))?(ge(e,t),it(t),!0):!1}function wr(e,t){let r;try{r=w(t)}catch(s){throw s instanceof g?Z(t,s.reason):s}let n=re(e,...r.split("/"));if(n===e||!b(e,n))throw Z(t,"outside-project");let i=kr(n),o=j(i);if(!b(e,o)&&o!==e)throw Z(t,"symlink-escape");return n}function kr(e){let t=e;for(;!B(t);){let r=te(t);if(r===t)throw Z(e,"no-existing-ancestor");t=r}return t}function Er(e,t,r){let n=m(e,W);if(!B(n)||ee(n).isSymbolicLink())throw F(e,"missing regular ownership record");let i=ee(n);if(!i.isFile()||i.size>Pr)throw F(e,"invalid ownership record file");let o=M(n,"cache ownership record"),s=Ir(o,e);if(t!==void 0&&s.canonicalProjectRoot!==t)throw F(e,"ownership record belongs to a different project");if(s.canonicalCacheDir!==r)throw F(e,"ownership record names a different cache directory");return{record:s,ownerSha256:Ze("sha256").update(o).digest("hex"),physicalCacheDir:e}}function Ir(e,t){try{let r=JSON.parse(e);if(r.schemaVersion!==tt||typeof r.canonicalProjectRoot!="string"||typeof r.canonicalCacheDir!="string"||typeof r.creatorVersion!="string"||!Ve(r.canonicalProjectRoot)||!Ve(r.canonicalCacheDir))throw new Error("invalid fields");return r}catch(r){throw F(t,`malformed ownership record: ${r instanceof Error?r.message:String(r)}`)}}function Qe(e){let t=he(e).filter(r=>r!==W&&!vr(r));if(t.length>0)throw F(e,`unrecognized existing entries: ${t.slice(0,3).join(", ")}`)}function vr(e){return e.startsWith(`${W}.tmp-`)||e.startsWith("git-worktree-context.json.tmp-")||[".scipquery-generations","affected-shadow-latest.json","affected-shadow.jsonl","agent-hooks","augment-vue-meta.json","cache-lifecycle.lock","evidence.db","evidence.db-shm","evidence.db-wal","health-report-cache.json","git-worktree-context.json","index.db","index.db-shm","index.db-wal","index.lock","index.scip","language-indexes","meta.json","reindex-activity.jsonl","shared-cache.json","typescript-index","typescript-scip-fragments","typescript-scip-overlays","typescript-semantic","watch-activity.json","watch-refresh-requests","watch-state.json","watch.lock"].includes(e)?!0:/^(?:reindex-|rust-|typescript-)/.test(e)}function Rr(e){for(let t of he(e)){let r=m(e,t);try{let n=ee(r);if(n.isSymbolicLink())throw F(e,`legacy cache entry ${t} is a symlink`);if(n.isDirectory())z(r);else if(n.isFile())ye(r);else throw F(e,`legacy cache entry ${t} is not a file or directory`)}catch(n){if(ot(n))continue;throw n}}z(e)}function it(e,t=!1){try{let r=ee(e);if(r.isSymbolicLink())throw F(e,"managed cache tree contains a symlink");if(r.isFile()){ye(e);return}if(!r.isDirectory())throw F(e,"managed cache tree contains a special file");z(e);for(let n of he(e))it(m(e,n),!0)}catch(r){if(t&&ot(r))return;throw r}}function ot(e){let t=e?.code;return t==="ENOENT"||t==="ENOTDIR"}function st(e,t=G){let r=$e(e,t);return z(e),r}function Tr(e,t,r){let n=`${e}.tmp-${process.pid}-${r.randomToken()}`,i,o=!1;try{i=r.openFile(n,"wx",384),o=!0,J(i,Buffer.from(t),r,"cache ownership record"),r.syncFile(i),r.closeFile(i),i=void 0,r.linkFile(n,e);let s=K(te(e),r);return r.removeFile(n),o=!1,Y(s,K(te(e),r))}finally{if(i!==void 0)try{r.closeFile(i)}catch{}if(o)try{r.removeFile(n)}catch{}}}function z(e){process.platform!=="win32"&&et(e,448)}function ye(e){process.platform!=="win32"&&et(e,384)}function Or(e){if(B(e))return j(e);let t=j(te(e));return m(t,Sr(e))}function Ai(e){return Or(re(e))}function Dr(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="EEXIST"}import{spawnSync as Br}from"child_process";import{createHash as _r}from"crypto";import{existsSync as Ar,lstatSync as Nr,realpathSync as Gr}from"fs";import{dirname as Mr,isAbsolute as zr,join as Wr,relative as Ui,resolve as ie,sep as Hi}from"path";var ct=Symbol.for("scip-query.project-file-listing-context.v1"),at=globalThis,be=at[ct],E=be&&typeof be=="object"?be:{};at[ct]=E;function ut(e,t){let r=E.active?E.canonicalProjectRoots:void 0,n=r?.get(e);if(n!==void 0)return n;let i=t();return r?.set(e,i),i}function lt(){return E.sequence??0}function dt(e,t,r){let n=E.active,i=n?.get(e);if(i&&i.pathBytes<=t)return i;let o=Lr(r(),(E.sequence??0)+1);if(E.sequence=o.sequence,o.pathBytes>t)throw new RangeError(`Git project file listing exceeded ${t} path bytes.`);return n?.set(e,o),o}function ft(e,t){let r=E.active?.get(e);return r&&r.sequence>t?r.indexAllowsTreeFingerprintReuse:void 0}function*pt(e){let t=0;for(;t<e.taggedOutput.length;){let r=e.taggedOutput.indexOf("\0",t);if(r<0)return;yield e.taggedOutput.slice(t+2,r),t=r+1}}function Lr(e,t){let r=0,n=0,i=!0;for(;r<e.length;){let o=e.indexOf("\0",r);if(o<0||o<=r+2||e[r+1]!==" ")throw new Error("Git returned a malformed tagged project file listing.");let s=e[r];i&&=s==="H"||s==="?",n+=1,r=o+1}return{taggedOutput:e,pathBytes:Buffer.byteLength(e,"utf8")-n*2,indexAllowsTreeFingerprintReuse:i,sequence:t}}var I={run(e,t){let r=ht(e,t);return r.kind==="success"?r.output:void 0},runResult:ht},$r=["rev-parse","--show-toplevel","--absolute-git-dir","--git-common-dir","HEAD","HEAD^{tree}"],je=["status","--porcelain=v2","--branch","-z","--untracked-files=all"],Se=/^[0-9a-f]{40,64}$/;function Ji(e,t=I){return Ur(e,t)?.context}function Ur(e,t=I){let r=t.runResult(e,$r);if(r.kind==="success"){let i=Hr(r.output);if(i){let o=qr(i,t);if(o)return gt(o)}}let n=Jr(e,t);return n?gt(n):void 0}function Ki(e,t=I){if(!e.headCommit)return;let r=t.run(e.projectRoot,je);if(r===void 0)return;let n=xe(r);if(!(!n?.headCommit||n.headCommit!==e.headCommit))return{...e,clean:n.clean}}function Yi(e,t=I,r={}){let n=t===I&&r.cachedInventoryAfterSequence!==void 0?ft(e,r.cachedInventoryAfterSequence):void 0;if(n!==void 0)return n;let i=t.run(e,["ls-files","-v","-z"]);return i===void 0?!1:i.split("\0").filter(Boolean).every(o=>o.startsWith("H "))}function gt(e){return{context:e,projectFileInventorySequence:lt()}}function xe(e){let t=e.split("\0").filter(Boolean),r=t.find(i=>i.startsWith("# branch.oid "))?.slice(13),n=r==="(initial)"?void 0:r;if(!(n!==void 0&&!Se.test(n))&&r!==void 0)return{headCommit:n,clean:t.every(i=>i.startsWith("# "))}}function Hr(e){let t=e.split(`
|
|
3
|
-
`).map(a=>a.trim());if(t.length!==5)return;let[r,n,i,o,s]=t;if(!r||!n||!i||!o||!s||!Se.test(o)||!Se.test(s))return;let c=C(r);return{root:c,gitDir:C(ne(c,n)),commonDir:C(ne(c,i)),headCommit:o,treeOid:s}}function qr(e,t){let r=t.run(e.root,je);if(r===void 0)return;let n=xe(r);return n?.headCommit!==e.headCommit?void 0:{...mt(e.root,e.gitDir),commonDir:e.commonDir,repositoryId:Fe("repository",e.commonDir),headCommit:e.headCommit,treeOid:e.treeOid,clean:n.clean}}function Jr(e,t){let r=Kr(e,t);if(r.kind!=="worktree")return;let n=r.identity,i=n.projectRoot,o=t.run(i,["rev-parse","--git-common-dir"])?.trim();if(!o)return;let s=C(ne(i,o)),c=Pe(t.run(i,["rev-parse","--verify","HEAD"])),a=Pe(t.run(i,["rev-parse","--verify","HEAD^{tree}"])),u=t.run(i,je);if(u===void 0)return;let d=xe(u);if(!(!d||d.headCommit!==c))return{...n,commonDir:s,repositoryId:Fe("repository",s),headCommit:c,treeOid:a,clean:d.clean}}function Kr(e,t=I){let r=t.runResult(e,["rev-parse","--show-toplevel"]);if(r.kind==="not-repository")return{kind:"non-git"};if(r.kind==="error")return r;let n=r.output.trim();if(!n)return{kind:"error",message:"Git returned an empty worktree root."};let i=C(n),o=t.run(i,["rev-parse","--absolute-git-dir"])?.trim();if(!o)return{kind:"error",message:"Git did not return an absolute worktree directory."};let s=C(ne(i,o));return{kind:"worktree",identity:mt(i,s)}}function mt(e,t){return{projectRoot:e,gitDir:t,worktreeId:Fe("worktree",`${e}\0${t}`)}}function Xi(e,t=I){let r=t.run(e,["worktree","list","--porcelain","-z"]);return r===void 0?[]:Yr(r)}function Yr(e){let t=[],r;for(let n of e.split("\0")){if(n===""){r&&t.push(r),r=void 0;continue}let i=n.indexOf(" "),o=i<0?n:n.slice(0,i),s=i<0?"":n.slice(i+1);if(o==="worktree"){r&&t.push(r),r={path:C(s),detached:!1,bare:!1,prunable:!1,locked:!1};continue}r&&(o==="HEAD"?r.head=s:o==="branch"?r.branch=s:o==="detached"?r.detached=!0:o==="bare"?r.bare=!0:o==="prunable"?r.prunable=!0:o==="locked"&&(r.locked=!0))}return r&&t.push(r),t}function Vi(e,t,r=I){return Pe(r.run(e,t))}function ne(e,t){return zr(t)?t:ie(e,t)}function C(e){try{return Gr(e)}catch{return ie(e)}}function Fe(e,t){return _r("sha256").update(`${e}\0${t}`).digest("hex").slice(0,24)}function Pe(e){return e?.trim()||void 0}function ht(e,t){let r=Br("git",["-C",e,...t],{encoding:"utf-8",env:{...process.env,LC_ALL:"C"},maxBuffer:52428800,stdio:["ignore","pipe","pipe"],timeout:3e4,killSignal:"SIGKILL"});if(r.status===0)return{kind:"success",output:r.stdout.trimEnd()};let i=(typeof r.stderr=="string"?r.stderr.trim():"")||r.error?.message||`git exited with status ${r.status??"unknown"}`,o=r.error?.code;return(/not a git repository/i.test(i)||o==="ENOENT"&&Ar(ie(e)))&&!Xr(e)?{kind:"not-repository"}:{kind:"error",message:i}}function Xr(e){if(process.env.GIT_DIR||process.env.GIT_COMMON_DIR)return!0;let t=ie(e);for(;;){try{return Nr(Wr(t,".git")),!0}catch(n){let i=n.code;if(i!=="ENOENT"&&i!=="ENOTDIR")return!0}let r=Mr(t);if(r===t)return!1;t=r}}import{execFileSync as On}from"child_process";import{isUtf8 as Ut}from"buffer";import{createHash as Te}from"crypto";import{closeSync as Jt,fstatSync as $,lstatSync as De,openSync as Kt,readdirSync as Dn,readFileSync as Ln,readSync as Ht,readlinkSync as Bn,realpathSync as H}from"fs";import{isAbsolute as _n,join as Le,relative as An,resolve as Nn,sep as Gn}from"path";function se(e,t,r=[]){let n=Ce(e);if(xt.has(n)||r.some(o=>oe(n,o))||t.some(o=>Ft(n,o)))return"config";if(t.some(wt)&&/\.d\.(?:ts|mts|cts)$/.test(n.toLowerCase()))return"ambient";let i=Ct(n);return t.some(o=>(kt[o]??[]).includes(i))?"source":"other"}function jt(e,t,r){let n=Ce(e);if(xt.has(n)||r?.some(o=>oe(n,o))||Ft(n,t)||wt(t)&&/\.d\.(?:ts|mts|cts)$/.test(n.toLowerCase()))return!0;let i=Ct(n);return(kt[t]??[]).includes(i)}function Zi(e){if(typeof e!="object"||e===null)return null;let t=e;return typeof t.version!="number"||!yt(t.languages)||typeof t.pnpmWorkspaces!="boolean"||typeof t.typescriptProjectMode!="string"||!yt(t.typescriptProjects)||t.clojureConfigPath!==void 0&&typeof t.clojureConfigPath!="string"||!Array.isArray(t.files)||!t.files.every(Vr)?null:t}function eo(e,t){let r=new Map((e?.files??[]).map(c=>[c.path,c])),n=new Map(t.files.map(c=>[c.path,c])),i=new Set([...r.keys(),...n.keys()]),o=[];for(let c of[...i].sort()){let a=r.get(c),u=n.get(c),d=se(c,t.languages);!a&&u?o.push({kind:"added",path:c,inputKind:d,after:u}):a&&!u?o.push({kind:"deleted",path:c,inputKind:d,before:a}):a&&u&&(a.hash!==u.hash||a.size!==u.size)&&o.push({kind:"modified",path:c,inputKind:d,before:a,after:u})}let s=new Set;return e||s.add("prior-snapshot-unavailable"),e&&e.version!==t.version&&s.add("snapshot-version-changed"),(bt(e?.files??[])||bt(t.files))&&s.add("duplicate-input-path"),[...e?.files??[],...t.files].some(Qr)&&s.add("unreadable-input"),{version:1,changes:o,projectIdentityChanged:e?!Zr(e,t):!0,uncertainty:[...s].sort()}}function yt(e){return Array.isArray(e)&&e.every(t=>typeof t=="string")}function bt(e){return new Set(e.map(t=>t.path)).size!==e.length}function Vr(e){if(typeof e!="object"||e===null)return!1;let t=e;return typeof t.path=="string"&&typeof t.size=="number"&&Number.isFinite(t.size)&&typeof t.hash=="string"}function Qr(e){return e.hash==="unreadable"||e.size<0}function Zr(e,t){return St(e.languages,t.languages)&&e.pnpmWorkspaces===t.pnpmWorkspaces&&e.typescriptProjectMode===t.typescriptProjectMode&&St(e.typescriptProjects,t.typescriptProjects)&&e.clojureConfigPath===t.clojureConfigPath}function St(e,t){if(e.length!==t.length)return!1;let r=[...e].sort(),n=[...t].sort();return r.every((i,o)=>i===n[o])}var xt=new Set([".scipquery.json"]),en={typescript:["tsconfig.json"],javascript:["package.json"],java:["pom.xml","build.gradle"],scala:["build.sbt"],kotlin:["build.gradle.kts"],rust:["Cargo.toml"],python:["pyproject.toml","setup.py"],ruby:["Gemfile"],go:["go.mod"],cpp:["CMakeLists.txt","Makefile"],c:["CMakeLists.txt","Makefile"],csharp:["*.csproj","*.sln"],vb:["*.vbproj","*.sln"],dart:["pubspec.yaml"],php:["composer.json"],clojure:["deps.edn","project.clj","bb.edn","shadow-cljs.edn"]},tn={typescript:["package.json","package-lock.json","pnpm-lock.yaml","yarn.lock","bun.lock","bun.lockb","tsconfig.*.json","jsconfig.json","jsconfig.*.json"],javascript:["package-lock.json","pnpm-lock.yaml","yarn.lock","bun.lock","bun.lockb","tsconfig.json","tsconfig.*.json","jsconfig.json","jsconfig.*.json"],java:["build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","gradle.lockfile","gradle-wrapper.properties"],scala:["plugins.sbt","build.properties"],kotlin:["pom.xml","build.gradle","settings.gradle","settings.gradle.kts","gradle.properties","gradle.lockfile","gradle-wrapper.properties"],rust:["Cargo.lock","rust-project.json","rust-toolchain","rust-toolchain.toml"],python:["setup.cfg","requirements*.txt","Pipfile","Pipfile.lock","poetry.lock","uv.lock"],ruby:["Gemfile.lock","gems.locked"],go:["go.sum","go.work","go.work.sum"],cpp:["compile_commands.json"],c:["compile_commands.json"],csharp:["Directory.Build.props","Directory.Build.targets","Directory.Packages.props","packages.lock.json","NuGet.Config","global.json"],vb:["Directory.Build.props","Directory.Build.targets","Directory.Packages.props","packages.lock.json","NuGet.Config","global.json"],dart:["pubspec.lock","analysis_options.yaml"],php:["composer.lock"],clojure:[]},Pt=new Map;function Ft(e,t){return en[t].some(r=>oe(e,r))||tn[t].some(r=>oe(e,r))}function oe(e,t){let r=Ce(t).replace(/^\.\//,"");if(!r)return!1;let n=e.split("/").at(-1)??e,i=r.includes("/")?e:n;if(!r.includes("*")&&!r.includes("?"))return i===r;let o=Pt.get(r);if(!o){let s=r.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,"[^/]*").replace(/\?/g,"[^/]");o=new RegExp(`^${s}$`),Pt.set(r,o)}return o.test(i)}function Ce(e){return e.replaceAll("\\","/").replace(/^\.\//,"")}function Ct(e){return e.includes(".")?`.${e.split(".").at(-1).toLowerCase()}`:""}function wt(e){return e==="typescript"||e==="javascript"}var kt={typescript:[".ts",".tsx",".mts",".cts"],javascript:[".js",".jsx",".mjs",".cjs",".vue"],java:[".java"],scala:[".scala"],kotlin:[".kt",".kts"],rust:[".rs"],python:[".py",".pyi"],ruby:[".rb"],go:[".go"],cpp:[".cc",".cpp",".cxx",".hpp",".hh",".hxx"],c:[".c",".h"],csharp:[".cs"],vb:[".vb"],dart:[".dart"],php:[".php"],clojure:[".clj",".cljs",".cljc"]};import{AsyncLocalStorage as rn}from"async_hooks";var nn=new rn;function T(e,t){let r=ce(e);if(!r||r.missing.has(t))return;let n=r.files.get(t);if(n)return n;let i=r.readBaseFile?.(t);return i&&r.files.set(t,i),i}function O(e,t){let r=ce(e);if(r)return r.missing.has(t)?"missing":r.paths.includes(t)?"present":"missing"}function Et(e,t){return ce(e)?.fingerprints.get(t)}function D(e){return ce(e)?.paths}function ce(e){let t=nn.getStore();if(t)return t.projectRoot===C(e)?t:void 0}import{createRequire as on}from"module";import{existsSync as sn,lstatSync as It,readdirSync as cn,statSync as an}from"fs";import f from"path";var un=on(import.meta.url),vt=new Set([".cache",".git",".next",".nuxt",".turbo",".nx","build","coverage","dist","node_modules","tmp","vendor"]);function Dt(e,t=[]){let r=f.resolve(e),n=t.flatMap(a=>dn(r,a));if(n.length>0)return Rt(r,Ot(n));let i=ln(r),o=Ot(i),s=fn(r,o)?[r,...o]:o,c=s.length>0?s:[r];return Rt(r,c)}function Lt(e,t,r=[]){let n;try{n=un("@ts-morph/common/dist/typescript.js")}catch{return null}let i=f.resolve(e),o=t==="workspace"?Dt(i,r):["."],s=new Set;for(let c of o){let a=c==="."?i:f.join(i,c),u=f.join(a,"tsconfig.json"),d=gn(n,i);if(!d.fileExists(u))return null;let l=n.readConfigFile(u,d.readFile);if(l.error)return null;let p=n.parseJsonConfigFileContent(l.config,d,a);if(p.errors.length>0)return null;for(let x of p.fileNames){let h=f.resolve(x);b(i,h)&&s.add(f.relative(i,h).split(f.sep).join("/"))}}return s}function fo(e,t,r,n){let i=f.resolve(e),o=new Set(n);for(let c of r){let a=f.resolve(i,c);if(b(i,a))try{let u=It(a);if(u.isSymbolicLink()||u.isFile()&&!o.has(L(i,a)))return!1}catch{}}let s=t==="workspace"?Dt(i,r):["."];for(let c of s){let a=c==="."?i:f.join(i,c),u=f.join(a,"tsconfig.json");if(!_t(i,u))continue;let d=L(i,u);if(!o.has(d))return!1;try{if(It(u).isSymbolicLink())return!1;let l=At(i,u);if(l.includes("extends")||l.includes("\\"))return!1}catch{return!1}}return!0}function Rt(e,t){return[...new Set(t.map(r=>L(e,r)))].sort((r,n)=>r.localeCompare(n))}function ln(e){let t=D(e);if(t)return t.flatMap(i=>{if(i.split("/").some(s=>vt.has(s)))return[];let o=f.join(e,...i.split("/"));return Tt(e,o)?[f.dirname(o)]:[]});let r=[],n=[e];for(;n.length>0;){let i=n.pop(),o;try{o=cn(i,{withFileTypes:!0})}catch{continue}for(let s of o){let c=f.join(i,s.name);if(s.isDirectory()){!vt.has(s.name)&&!s.name.startsWith(".")&&n.push(c);continue}s.isFile()&&Tt(e,c)&&r.push(f.dirname(c))}}return r}function dn(e,t){let r=t.trim();if(!r)return[];let n=f.resolve(e,r);if(!b(e,n))return[];let i=D(e);if(i){let o=L(e,n);if(i.includes(o)&&we(f.basename(n)))return[f.dirname(n)];let s=o==="."?"":`${o}/`;return i.some(c=>c.startsWith(s))?[n]:[]}try{let o=an(n);if(o.isDirectory())return[n];if(o.isFile()&&we(f.basename(n)))return[f.dirname(n)]}catch{return[]}return[]}function Tt(e,t){if(!we(f.basename(t)))return!1;let r=Bt(e,t);return r?f.basename(t)==="tsconfig.json"||"include"in r||"files"in r||"references"in r:!1}function we(e){return e.startsWith("tsconfig")&&e.endsWith(".json")}function Ot(e){let t=[...new Set(e.map(r=>f.resolve(r)))].sort((r,n)=>r.localeCompare(n));return t.length<=1?t:t.filter(r=>!t.some(n=>n!==r&&mn(r,n)))}function fn(e,t){if(t.length===0||t.some(n=>f.resolve(n)===e))return!1;let r=f.join(e,"tsconfig.json");return _t(e,r)&&pn(e,r)}function pn(e,t){let n=Bt(e,t)?.include;return Array.isArray(n)?n.some(i=>typeof i=="string"&&i.trim()!==""&&!i.startsWith("!")&&(i.includes("/")||i.includes("**")||!f.extname(i))):!1}function Bt(e,t){try{let r=JSON.parse(At(e,t));return r&&typeof r=="object"&&!Array.isArray(r)?r:null}catch{return null}}function _t(e,t){let r=L(e,t),n=O(e,r);return n?n==="present":sn(t)}function At(e,t){let r=L(e,t);if(D(e)){let i=T(e,r);if(!i)throw Object.assign(new Error(`Snapshot file ${r} is missing.`),{code:"ENOENT"});return i.content.toString("utf8")}return M(t,"TypeScript project config")}function gn(e,t){let r=D(t);if(!r)return e.sys;let n=f.resolve(t),i=new Set(r),o=hn(n,r),s=e,c=a=>{let u=f.resolve(a);return b(n,u)?L(n,u):null};return{useCaseSensitiveFileNames:e.sys.useCaseSensitiveFileNames,fileExists(a){let u=c(a);return u===null?e.sys.fileExists(a):i.has(u)},readFile(a){let u=c(a);return u===null?e.sys.readFile(a):T(n,u)?.content.toString("utf8")},readDirectory(a,u,d,l,p){let x=f.resolve(a);return b(n,x)?s.matchFiles(x,u,d,l,e.sys.useCaseSensitiveFileNames,n,p,h=>o.get(f.resolve(h))??{files:[],directories:[]},h=>h):e.sys.readDirectory(a,u,d,l,p)}}}function hn(e,t){let r=new Map,n=new Map,i=o=>{r.has(o)||r.set(o,new Set),n.has(o)||n.set(o,new Set)};i(e);for(let o of t){let s=o.split("/"),c=e;for(let a=0;a<s.length-1;a+=1){let u=s[a];i(c),n.get(c).add(u),c=f.join(c,u),i(c)}r.get(c).add(s.at(-1))}return new Map([...r].map(([o,s])=>[o,{files:[...s].sort(),directories:[...n.get(o)??[]].sort()}]))}function L(e,t){let r=f.relative(e,t);return r?r.split(f.sep).join("/"):"."}function mn(e,t){let r=f.relative(e,t);return!!r&&!r.startsWith("..")&&!f.isAbsolute(r)}import{closeSync as Nt,existsSync as Ee,openSync as yn,realpathSync as bn,renameSync as Sn,unlinkSync as Gt,writeSync as Pn}from"fs";import{dirname as jn,join as xn}from"path";var Fn="fingerprint-stat-cache.json",Mt=1,Cn=8*1024*1024,ke=new Map;function Ie(e,t,r,n){let i=zt(e),o=i.files.get(t);if(!(!o||!Wt(o,r,n)))return i.hits+=1,{hash:o.hash,size:o.fingerprintSize}}function ve(e,t,r,n,i){if(i.hash==="unreadable"||i.size<0||!Number.isFinite(i.size))return;let o=zt(e),s={kind:r,dev:n.dev,ino:n.ino,mtimeMs:n.mtimeMs,ctimeMs:n.ctimeMs,size:n.size,hash:i.hash,fingerprintSize:i.size},c=o.files.get(t);c&&Rn(c,s)||(o.files.set(t,s),o.stores+=1,o.dirty=!0)}function Re(e){let t=ke.get($t(e));if(!(!t?.dirty||!t.cachePath))try{let r=jn(t.cachePath);if(!Ee(r))return;Tn(t.cachePath,En(t)),t.dirty=!1}catch{}}function zt(e){let t=$t(e),r=ke.get(t);if(r)return r;let n=wn(t),i=kn(n),o={cachePath:n,files:i,dirty:!1,hits:0,stores:0};return ke.set(t,o),o}function wn(e){try{let t=me(e);return Ee(t)?xn(t,Fn):null}catch{return null}}function kn(e){let t=new Map;if(!e||!Ee(e))return t;try{let r=JSON.parse(V(e,{inputKind:"fingerprint stat cache",maxBytes:Cn}).toString("utf8"));if(!In(r))return t;for(let[n,i]of Object.entries(r.files))i&&t.set(n,i)}catch{return t}return t}function En(e){return{version:Mt,files:Object.fromEntries(e.files)}}function In(e){if(typeof e!="object"||e===null)return!1;let t=e;return t.version!==Mt||typeof t.files!="object"||t.files===null?!1:Object.values(t.files).every(vn)}function vn(e){if(typeof e!="object"||e===null)return!1;let t=e;return(t.kind==="file"||t.kind==="symlink")&&Number.isFinite(t.dev)&&Number.isFinite(t.ino)&&Number.isFinite(t.mtimeMs)&&Number.isFinite(t.ctimeMs)&&Number.isFinite(t.size)&&Number.isFinite(t.fingerprintSize)&&typeof t.hash=="string"&&t.hash!=="unreadable"}function Wt(e,t,r){return e.kind===t&&e.dev===r.dev&&e.ino===r.ino&&e.mtimeMs===r.mtimeMs&&e.ctimeMs===r.ctimeMs&&e.size===r.size}function Rn(e,t){return Wt(e,t.kind,t)&&e.hash===t.hash&&e.fingerprintSize===t.fingerprintSize}function Tn(e,t){let r=`${e}.${process.pid}.tmp`;try{Gt(r)}catch{}let n=Buffer.from(`${JSON.stringify(t)}
|
|
4
|
-
`,"utf8"),i=yn(r,"wx",384);try{J(i,n,{writeFile:(o,s,c,a)=>Pn(o,s,c,a)},"fingerprint stat cache")}catch(o){throw Nt(i),Gt(r),o}Nt(i),Sn(r,e)}function $t(e){return bn(e)}var q=64*1024*1024,Mn=1024*1024,zn=1024,_=class extends Error{constructor(r,n,i,o){super(`${r} ${JSON.stringify(n)} is ${i} bytes; the safety limit is ${o} bytes`);this.inputKind=r;this.inputPath=n;this.observedBytes=i;this.limitBytes=o;this.name="InputTooLargeError"}inputKind;inputPath;observedBytes;limitBytes;code="SCIP_QUERY_INPUT_TOO_LARGE"};function Wn(e){return[...new Set((e??[]).map(t=>t.trim()).filter(Boolean))].sort((t,r)=>t.localeCompare(r))}function Be(e,t,r={}){let n=w(t),i=ut(e,()=>H(e)),o=Nn(i,...n.split("/"));if(!b(i,o)||o===i)throw new g(t,"outside-project");let s=H(o);if(!b(i,s)||s===i)throw new g(t,"outside-project");let c=De(s);if(!c.isFile())throw new g(t,"not-a-file");let a={projectRoot:i,relativePath:n,absolutePath:s,size:c.size,mtimeMs:c.mtimeMs,device:c.dev,inode:c.ino},u=r.maxBytes??q;if(R(u),a.size>u)throw new _(r.inputKind??"project file",a.relativePath,a.size,u);return a}function $n(e,t,r={}){let n=w(t),i=O(e,n);if(i){if(i==="missing")throw Object.assign(new Error(`Snapshot project file ${JSON.stringify(n)} does not exist.`),{code:"ENOENT"});let a=T(e,n);if(!a)throw new g(n,"changed-during-read");let u=r.maxBytes??q;if(R(u),a.size>u)throw new _(r.inputKind??"project file",n,a.size,u);return Buffer.from(a.content)}let o=Be(e,t,r),s=r.maxBytes??q,c=Kt(o.absolutePath,"r");try{let a=$(c);if(U(a,o,t),a.size>s)throw new _(r.inputKind??"project file",o.relativePath,a.size,s);let u=Ln(c),d=$(c);if(U(d,o,t),u.byteLength!==a.size)throw new g(t,"changed-during-read");return u}finally{Jt(c)}}function Oo(e,t,r,n={}){if(r.byteLength===0)throw new Error("Project file probe literal must not be empty.");let{matchedLiteralIndexes:i,...o}=Un(e,t,[r],n);return{...o,includesLiteral:i.length>0}}function Un(e,t,r,n={}){if(r.length===0||r.some(a=>a.byteLength===0))throw new Error("Project file probe literals must not be empty.");let i=w(t),o=O(e,i);if(o){if(o==="missing")throw Object.assign(new Error(`Snapshot project file ${JSON.stringify(i)} does not exist.`),{code:"ENOENT"});let a=T(e,i);if(!a)throw new g(i,"changed-during-read");let u=n.maxBytes??q;if(R(u),a.size>u)throw new _(n.inputKind??"project file",i,a.size,u);let d=!a.content.includes(0)&&Ut(a.content),l=r.map(qt),p=d?qn(a.content,r,l):[];return{byteLength:a.size,isUtf8Text:d,matchedLiteralIndexes:p,bytes:p.length>0?Buffer.from(a.content):null,...n.computeSha256?{sha256:a.sha256}:{}}}let s=Be(e,t,n),c=Kt(s.absolutePath,"r");try{let a=$(c);U(a,s,t);let u=n.computeSha256?Te("sha256"):null,d=n.scratchBuffer??Buffer.allocUnsafe(Mn);if(d.byteLength===0)throw new Error("Project file probe scratch buffer must not be empty.");let l=0,p=r.map(()=>!1),x=!1,h=!0,v=Buffer.alloc(0),Ae=r.map(()=>Buffer.alloc(0)),Vt=r.map(qt);for(;l<a.size;){let S=Ht(c,d,0,Math.min(d.byteLength,a.size-l),l);if(S<=0)throw new g(t,"changed-during-read");let P=d.subarray(0,S);if(u?.update(P),x||=P.includes(0),h){let y=v.byteLength>0?Buffer.concat([v,P]):P,N=Hn(y);h=Ut(y.subarray(0,N)),v=Buffer.from(y.subarray(N))}for(let y=0;y<r.length;y+=1){if(p[y])continue;let N=r[y],Me=Ae[y];p[y]=Jn(P,N,Me,Vt[y]),Ae[y]=Kn(P,N,Me)}l+=S}h&&=v.byteLength===0,U($(c),s,t);let Ne=!x&&h,Ge=Ne?p.flatMap((S,P)=>S?[P]:[]):[],A=null;if(Ge.length>0){A=Buffer.allocUnsafe(a.size);let S=0;for(;S<A.byteLength;){let P=Ht(c,A,S,A.byteLength-S,S);if(P<=0)throw new g(t,"changed-during-read");S+=P}U($(c),s,t)}return{byteLength:a.size,isUtf8Text:Ne,matchedLiteralIndexes:Ge,bytes:A,...u?{sha256:u.digest("hex")}:{}}}finally{Jt(c)}}function Do(e,t,r={}){return $n(e,t,r).toString("utf8")}function U(e,t,r){if(!e.isFile()||e.dev!==t.device||e.ino!==t.inode||e.size!==t.size)throw new g(r,"changed-during-read")}function Hn(e){if(e.byteLength===0)return 0;let t=e.byteLength-1,r=0;for(;t>=0&&r<3&&(e[t]&192)===128;)r+=1,t-=1;if(t<0)return e.byteLength;let n=e[t];return((n&128)===0?1:(n&224)===192?2:(n&240)===224?3:(n&248)===240?4:0)>e.byteLength-t?t:e.byteLength}function qn(e,t,r){return t.flatMap((n,i)=>Oe(e,n,r[i])?[i]:[])}function Jn(e,t,r,n){if(Oe(e,t,n))return!0;if(r.byteLength===0||t.byteLength===1)return!1;let i=e.subarray(0,Math.min(e.byteLength,t.byteLength-1));return Oe(Buffer.concat([r,i]),t,n)}function Oe(e,t,r){if(r<0)return e.includes(t);let n=t[r],i=e.indexOf(n),o=0;for(;i>=0;){if(o+=1,o>zn)return e.includes(t);let s=i-r;if(s>=0&&s+t.byteLength<=e.byteLength&&e.compare(t,0,t.byteLength,s,s+t.byteLength)===0)return!0;i=e.indexOf(n,i+1)}return!1}function qt(e){for(let r=1;r<e.byteLength;r+=1){let n=e[r];if(n>=65&&n<=90)return r}let t=e[0];return t>=65&&t<=90?0:-1}function Kn(e,t,r){let n=t.byteLength-1;if(n===0)return Buffer.alloc(0);if(e.byteLength>=n)return Buffer.from(e.subarray(e.byteLength-n));let i=Buffer.concat([r,e]);return Buffer.from(i.subarray(Math.max(0,i.byteLength-n)))}function _e(e){return typeof e=="object"&&e!==null&&"code"in e&&(e.code==="ENOENT"||e.code==="ENOTDIR")}function Lo(e,t){try{return Be(e,t),!0}catch(r){if(_e(r))return!1;throw r}}function Yn(e){let t=D(e);return t?t.filter(r=>r&&!ue(r)).sort():(ri(e)??ni(e)).filter(r=>r&&!ue(r)).sort()}function Xn(e,t={}){let r=(t.includePaths??[]).map(w),n=[...new Set([...Yn(e),...r])].filter(s=>!ue(s)).filter(s=>!t.language||jt(s,t.language,t.markerFiles)).filter(s=>!t.includePath||t.includePath(s)).sort(),i=H(e),o=n.flatMap(s=>Yt(e,i,s));return Re(i),o}function Yt(e,t,r){let n=Et(e,r);if(n)return[{path:r,size:n.fingerprintSize??n.size,hash:n.sha256}];if(O(e,r)==="present"){let o=T(e,r);if(o)return[{path:r,size:o.fingerprintSize??o.size,hash:o.sha256}]}let i=Le(e,r);try{let o=De(i);if(o.isSymbolicLink()){let d=Ie(t,r,"symlink",ae(o));if(d)return[{path:r,size:d.size,hash:d.hash}];let l=H(i),p=An(t,l);if(p===".."||p.startsWith(`..${Gn}`)||_n(p))throw new Error("external symlink");let x=Bn(i),h=Te("sha256").update("symlink\0").update(x).digest("hex"),v=Buffer.byteLength(x);return ve(t,r,"symlink",ae(o),{hash:h,size:v}),[{path:r,size:v,hash:h}]}let s=Ie(t,r,"file",ae(o));if(s)return[{path:r,size:s.size,hash:s.hash}];let c=Te("sha256"),a=Q(i,{inputKind:"project fingerprint input",maxBytes:q},d=>c.update(d)),u=c.digest("hex");return ve(t,r,"file",ae(o),{hash:u,size:a}),[{path:r,size:a,hash:u}]}catch(o){return _e(o)?[]:[{path:r,size:-1,hash:"unreadable"}]}}function ae(e){return{dev:e.dev,ino:e.ino,mtimeMs:e.mtimeMs,ctimeMs:e.ctimeMs,size:e.size}}function Vn(e,t,r){let n=Xt(t,r),i=[...n.typescriptProjects.filter(s=>ei(e,s)),...n.clojureConfigPath?[n.clojureConfigPath]:[]],o=n.languages.includes("typescript")?Lt(e,n.typescriptProjectMode,n.typescriptProjects):null;return{...n,files:Xn(e,{includePath:s=>{let c=se(s,t,i);return c==="other"?!1:c!=="source"||!Zn(s)||!o?!0:o.has(s)},includePaths:i})}}function Bo(e,t,r,n,i,o){let s=l=>({mode:"full",fingerprint:Vn(e,t,r),reason:l});if(!i)return s("change-journal-unavailable");if(!i.complete)return s(`change-journal-incomplete:${i.incompleteReason??"unknown"}`);if(!o)return s("accepted-generation-unavailable");if(i.baseGeneration!==o)return s("change-journal-base-mismatch");if(!n)return s("prior-project-input-snapshot-unavailable");let c=Xt(t,r);if(!Qn(n,c))return s("project-input-configuration-changed");if(new Set(n.files.map(l=>l.path)).size!==n.files.length)return s("prior-project-input-snapshot-has-duplicate-paths");if(i.entries.length===0)return{mode:"delta",fingerprint:{...c,files:[...n.files].sort((l,p)=>l.path.localeCompare(p.path))},changedPaths:[]};let a=[...c.typescriptProjects,...c.clojureConfigPath?[c.clojureConfigPath]:[]],u=new Map(n.files.map(l=>[l.path,l]));for(let l of i.entries){let p=u.get(l.path);if(se(l.path,t,a)!=="source")return s("non-source-project-input-changed");if(l.kind==="add"&&p)return s("added-path-already-in-prior-project-input-snapshot");if(l.kind==="delete"&&!p)return s("deleted-path-not-in-prior-project-input-snapshot");if(l.kind==="change"&&!p)return s("changed-path-not-in-prior-project-input-snapshot");if(p&&(p.hash==="unreadable"||p.size<0))return s("changed-path-was-unreadable")}let d=H(e);for(let l of i.entries){let p=Yt(e,d,l.path);if(l.kind==="delete"){if(p.length!==0)return s("deleted-source-is-still-readable");u.delete(l.path);continue}if(p.length!==1||p[0].hash==="unreadable"||p[0].size<0)return s(l.kind==="add"?"added-source-is-not-readable":"changed-source-no-longer-readable");u.set(l.path,p[0])}return Re(d),{mode:"delta",fingerprint:{...c,files:[...u.values()].sort((l,p)=>l.path.localeCompare(p.path))},changedPaths:i.entries.map(l=>l.path).sort()}}function Qn(e,t){return e.version===t.version&&JSON.stringify([...e.languages].sort())===JSON.stringify(t.languages)&&e.pnpmWorkspaces===t.pnpmWorkspaces&&e.typescriptProjectMode===t.typescriptProjectMode&&JSON.stringify([...e.typescriptProjects].sort())===JSON.stringify(t.typescriptProjects)&&e.clojureConfigPath===t.clojureConfigPath}function Zn(e){return/\.(?:[cm]?[jt]sx?|vue)$/iu.test(e)}function ei(e,t){let r;try{r=w(t)}catch{return!1}let n=O(e,r);if(n)return n==="present";try{return De(Le(e,r)).isFile()}catch(i){if(_e(i))return!1;throw i}}function Xt(e,t){return{version:3,languages:[...e].sort(),pnpmWorkspaces:t.typescriptProjectMode!=="workspace"&&t.pnpmWorkspaces===!0,typescriptProjectMode:t.typescriptProjectMode??"single",typescriptProjects:Wn(t.typescriptProjects),clojureConfigPath:ti(t.clojureConfigPath)}}function ti(e){return e?.trim()||void 0}function ri(e){try{let t=dt(e,52428800,()=>On("git",["-C",e,"ls-files","-co","-v","-z","--exclude-standard","--","."],{encoding:"utf-8",maxBuffer:104857600,stdio:["ignore","pipe","ignore"],timeout:3e4,killSignal:"SIGKILL"}));return[...pt(t)]}catch{return null}}function ni(e){let t=[],r=[""];for(;r.length>0;){let n=r.pop(),i=n?Le(e,n):e,o;try{o=Dn(i,{withFileTypes:!0})}catch{continue}for(let s of o){let c=n?`${n}/${s.name}`:s.name;if(s.isDirectory()){ue(c)||r.push(c);continue}t.push(c)}}return t}function ue(e){let t=e.split("/");return e==="meta.json"||t[0]===".scipquery"&&(t[1]==="events"||t[1]==="ledger"||t[1]==="releases"||t[1]==="suppressions")||t.some(r=>ii.has(r))||e.endsWith(".db")||e.endsWith(".db-wal")||e.endsWith(".db-shm")||e.endsWith(".scip")}var ii=new Set([".git","node_modules",".scipquery-cache",".scipquery-generations",".stryker-tmp","dist","build","coverage",".next",".nuxt","target"]);export{qe as a,ur as b,lr as c,dr as d,k as e,V as f,Je as g,M as h,fr as i,Q as j,pr as k,se as l,jt as m,Zi as n,eo as o,Vr as p,en as q,J as r,de as s,G as t,$e as u,K as v,Y as w,g as x,le as y,si as z,ci as A,b as B,w as C,Ue as D,me as E,nt as F,xr as G,Di as H,Li as I,Bi as J,_i as K,Ai as L,dt as M,pt as N,I as O,Ji as P,Ki as Q,Yi as R,Kr as S,Xi as T,Vi as U,ne as V,C as W,Dt as X,fo as Y,_ as Z,Wn as _,Be as $,$n as aa,Oo as ba,Un as ca,Do as da,_e as ea,Lo as fa,Yn as ga,Xn as ha,Vn as ia,Bo as ja,Xt as ka};
|
|
5
|
-
//# sourceMappingURL=chunk-4DCKBY6T.js.map
|
package/dist/chunk-4N6QSEMZ.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
function m(o,e){return i(o,e,n=>{let t=n?`AND m.symbol_id IN (${n.map(()=>"?").join(",")})`:"";return o.all(`SELECT DISTINCT m.symbol_id, d.relative_path, c.document_id,
|
|
2
|
-
c.start_line AS chunk_start, c.end_line AS chunk_end
|
|
3
|
-
FROM mentions m
|
|
4
|
-
JOIN chunks c ON m.chunk_id = c.id
|
|
5
|
-
JOIN documents d ON c.document_id = d.id
|
|
6
|
-
WHERE m.role != 1
|
|
7
|
-
${t}
|
|
8
|
-
${o.pathExclusionsFor("d")}
|
|
9
|
-
ORDER BY d.relative_path, c.start_line`,...n??[])})}function i(o,e,n){if(!e)return n();if(e.length===0)return[];let t=[];for(let r=0;r<e.length;r+=750)t.push(...n(e.slice(r,r+750)));return t}export{m as a};
|
|
10
|
-
//# sourceMappingURL=chunk-4N6QSEMZ.js.map
|
package/dist/chunk-4OE2JO6I.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as le}from"./chunk-QXR5QPSF.js";import{a as de}from"./chunk-32A42O5B.js";import{a as pe}from"./chunk-ORBKAUCH.js";import{a as he}from"./chunk-6YTSKJJ3.js";import{a as ge}from"./chunk-UL4VJUMD.js";import{a as se}from"./chunk-46JLFIGA.js";import{a as ue}from"./chunk-VNKYRJKN.js";import{a as ce}from"./chunk-DMUGTKMD.js";import{a as oe}from"./chunk-WKPZCQLI.js";import{a as ae}from"./chunk-4EXFZP6H.js";import{a as ne}from"./chunk-RFWAUHVW.js";import{a as me}from"./chunk-CKDOY6JA.js";import{a as ie}from"./chunk-HGKEAP7F.js";import{a as re}from"./chunk-KTRGJLY7.js";import{a as J}from"./chunk-BD6CV7PN.js";import{b as ee}from"./chunk-R2MOKIVO.js";import{a as Z}from"./chunk-PIZY2GX6.js";import{b as te}from"./chunk-XDAUYDFT.js";import{a as M,b as U}from"./chunk-U2GPTA5U.js";import{b as Y}from"./chunk-Q2J2VZZT.js";import{a as K}from"./chunk-DEUGHURX.js";import{a as X}from"./chunk-IOKWFRFQ.js";import{f as Q}from"./chunk-IDPLC3FI.js";import{b as W}from"./chunk-QDCCHMVZ.js";import{f as A,h as T}from"./chunk-HEOMG7IM.js";import{a as G}from"./chunk-I3U2FN2T.js";import{C as O,z as j}from"./chunk-AA7K3XLM.js";import{x as k}from"./chunk-DMQ7ZKJG.js";import{h as q,i as z}from"./chunk-7HU2IJ2T.js";import{readdirSync as Ye}from"fs";import{basename as Xe,join as fe}from"path";function Qe(e,r,t={}){let i=new Set(e),n=new Set(r),o=[...n].filter(s=>!i.has(s)).sort(),a=t.allowExtra?[]:[...i].filter(s=>!n.has(s)).sort();return{missing:o,extra:a}}function Je(e,r){let t=Ze(e,r.file,r.keys);if(!t.ok)return{name:r.name,file:r.file,status:"unavailable",missing:[],extra:[],unavailableReason:t.reason};let i=ot(e.config.projectRoot,r.mustEqual),n=Qe(t.keys,i,{allowExtra:r.allowExtra??!1}),o=n.missing.length>0||n.extra.length>0?"violated":"ok";return{name:r.name,file:r.file,status:o,missing:n.missing,extra:n.extra}}function ve(e,r){return r.map(t=>Je(e,t))}function Ze(e,r,t){return t.type==="markdown-list"?nt(e,r,t.marker):et(e,r,t)}function et(e,r,t){if(!k(e,r))return{ok:!1,reason:`file not found: ${r}`};let n=j(r);if(!n)return{ok:!1,reason:`unsupported file type for ${t.type} extraction: ${r}`};let o=O(e,r);if(!o)return{ok:!1,reason:`tree-sitter parser unavailable for ${n} (${r}) \u2014 contract skipped, not silently passed`,disclosedUnavailable:{language:n,reason:"parser-unavailable"}};let a=t.type==="object-literal-keys"?tt(o,t.identifier):it(o,t.identifier);return a===null?{ok:!1,reason:`no ${t.type==="object-literal-keys"?"object literal":"string array"} named "${t.identifier}" found in ${r}`}:{ok:!0,keys:a}}function be(e){let r=e.childForFieldName("value");return r?r.type==="as_expression"||r.type==="satisfies_expression"?r.namedChild(0):r:null}function tt(e,r){for(let t of e.rootNode.descendantsOfType("variable_declarator")){if(t.childForFieldName("name")?.text!==r)continue;let n=be(t);if(n?.type==="object")return rt(n)}return null}function rt(e){let r=new Set;for(let t of e.namedChildren)if(t.type==="pair"){let i=t.childForFieldName("key");i&&r.add(ye(i.text))}else t.type==="shorthand_property_identifier"&&r.add(t.text);return[...r].sort()}function it(e,r){for(let t of e.rootNode.descendantsOfType("variable_declarator")){if(t.childForFieldName("name")?.text!==r)continue;let n=be(t);if(n?.type!=="array")continue;let o=new Set;for(let a of n.namedChildren)a.type==="string"&&o.add(ye(a.text));return[...o].sort()}return null}function ye(e){return e.length>=2&&(e[0]==="'"&&e.endsWith("'")||e[0]==='"'&&e.endsWith('"'))?e.slice(1,-1):e}function nt(e,r,t){let i=k(e,r);if(!i)return{ok:!1,reason:`file not found: ${r}`};let n=Se(i,t);return n===null?{ok:!1,reason:`no <!-- BEGIN GENERATED ${t} --> ... <!-- END GENERATED ${t} --> block in ${r}`}:{ok:!0,keys:xe(n)}}function Se(e,r){let t=G(r),n=new RegExp(`<!--\\s*BEGIN GENERATED ${t}\\s*-->([\\s\\S]*?)<!--\\s*END GENERATED ${t}\\s*-->`).exec(e);return n?n[1]:null}function xe(e){let r=new Set;for(let t of e.matchAll(/`([a-z][a-z0-9-]*)`/g))r.add(t[1]);for(let t of e.matchAll(/\[([a-z][a-z0-9-]*)\]\([^)]*\)/g))r.add(t[1]);return[...r].sort()}function ot(e,r){switch(r.type){case"top-level-dirs":return Ce(fe(e,r.path));case"file-glob":return[...new Set(W(e,r.pattern).map(t=>Xe(t)))].sort();case"registered-commands":return at(e);case"builtin-skills":return Ce(fe(e,"skills"))}}function Ce(e){let r;try{r=Ye(e,{withFileTypes:!0})}catch{return[]}return r.filter(t=>t.isDirectory()&&!t.name.startsWith(".")).map(t=>t.name).sort()}function at(e){let r;try{r=q(e,"docs/COMMAND_REFERENCE.md",{maxBytes:8*1024*1024,inputKind:"generated command reference"})}catch(i){if(!z(i))throw i;return[]}let t=Se(r,"COMMAND REFERENCE");return t?xe(t):[]}function h(e){return e.scoreCount??e.count}function B(e){let r=lt(e),{breakdown:t,pressure:i}=dt(e),n=He(t,"risk"),o=He(t,"hygiene");return{score:Math.min(n,o),riskScore:n,hygieneScore:o,scoreBreakdown:t,overview:{documents:e.statsResult.documents,symbols:e.statsResult.symbols,indexSizeBytes:e.statsResult.indexSizeBytes},findings:{deadSymbols:e.dead.count,deadLoc:e.dead.loc,isolatedSymbols:e.isolated.count,isolatedLoc:e.isolated.loc,cycles:e.realCycleCount,similarPairs:e.similarCount,duplicateBodyGroups:e.duplicateBodies.count,duplicateBodyLoc:e.duplicateBodies.loc,twinDriftGroups:e.twinDrift.count,twinDriftLoc:e.twinDrift.loc,reactComponentDuplicatePairs:e.reactComponentDuplicates.count,reactHookCandidatePairs:e.reactHookCandidates.count,reactHookCandidateScoreCount:h(e.reactHookCandidates),reactLargeComponentPressureFiles:e.reactLargeComponentPressure.count,vueComponentDuplicatePairs:e.vueComponentDuplicates.count,vueComposableCandidatePairs:e.vueComposableCandidates.count,vueComposableCandidateScoreCount:h(e.vueComposableCandidates),vueLargeViewPressureFiles:e.vueLargeViewPressure.count,extractionCandidates:e.extractCount,wrappers:e.wrappers.count,wrapperScoreCount:h(e.wrappers),passthroughs:e.passthroughs.count,staleTypes:e.stale.count,driftedFiles:e.drift.count,complexityHotspotCount:e.complexity.extremeCount,hiddenCouplingPairs:e.gitEvidence?.hiddenCoupling.pairCount??null,hiddenCouplingScoreCount:e.gitEvidence?.hiddenCoupling.scoreCount??null,coverageContractViolations:e.coverageContracts.count},axes:st(e),validation:ut(e),suppressions:e.suppressions,actions:r,pressure:i,topComplexity:e.complexity.top,detectorEvidence:e.detectorEvidence,warnings:e.warnings.length>0?e.warnings:void 0}}function st(e){return{deletable:{loc:e.dead.loc+e.isolated.loc,symbols:e.dead.count+e.isolated.count},cycles:{count:e.realCycleCount},changeAmplification:e.gitEvidence?.amplification??null,hiddenCoupling:e.gitEvidence?.hiddenCoupling??null,churnWeightedComplexity:ct(e),evidenceQuality:{graphFindings:e.dead.count+e.isolated.count+e.realCycleCount,heuristicFindings:e.similarCount+e.duplicateBodies.count+e.twinDrift.count+e.reactComponentDuplicates.count+e.reactHookCandidates.count+e.reactLargeComponentPressure.count+e.vueComponentDuplicates.count+e.vueComposableCandidates.count+e.vueLargeViewPressure.count+e.extractCount+e.wrappers.count+e.passthroughs.count+e.stale.count+e.drift.count,userSuppressed:e.suppressions?.total??0}}}function ct(e){let r=e.gitEvidence?.fileStats;return r?e.complexity.top.map(t=>{let i=t.file?r[t.file]?.changes??0:0;return{...t,changes:i,weighted:p(t.score*Math.log2(1+i))}}).sort((t,i)=>i.weighted-t.weighted):null}function ut(e){let r=e.gitEvidence?.fileStats;if(!r)return null;let t={dead:e.dead.files??[],isolated:e.isolated.files??[],twinDrift:e.twinDrift.files??[],wrappers:e.wrappers.files??[],passthroughs:e.passthroughs.files??[],stale:e.stale.files??[],reactComponents:e.reactComponentDuplicates.files??[],reactHooks:e.reactHookCandidates.files??[],reactLargeComponents:e.reactLargeComponentPressure.files??[],vueComponents:e.vueComponentDuplicates.files??[],vueComposables:e.vueComposableCandidates.files??[],vueLargeViews:e.vueLargeViewPressure.files??[]},i=new Set(Object.values(t).flat()),n=0,o=0,a=0;for(let[v,g]of Object.entries(r))i.has(v)?n+=g.fixChanges:(o+=g.fixChanges,a+=1);let s=i.size>0?p(n/i.size):0,l=a>0?p(o/a):0,S={};for(let[v,g]of Object.entries(t)){let f=new Set(g);if(f.size===0)continue;let b=0;for(let R of f)b+=r[R]?.fixChanges??0;let x=p(b/f.size);S[v]={flaggedFiles:f.size,fixDensity:x,lift:l>0?p(x/l):null}}return{flaggedFiles:i.size,flaggedFixDensity:s,baselineFixDensity:l,ratio:i.size>0&&l>0?p(s/l):null,byCategory:S,validationBasis:{method:"subject-regex",commitsScanned:e.gitEvidence?.commitsScanned??0}}}function p(e){return Math.round(e*100)/100}function Ee(e){return Number.isInteger(e)?String(e):e.toFixed(2).replace(/0+$/,"").replace(/\.$/,"")}function E(e,r="existing shared infrastructure discount"){let t=h(e);return Math.abs(t-e.count)<.01?"":` (${Ee(t)} score-weighted after ${r})`}function y(e,r){let t=h(e),i=`${e.count} ${r}`;return Math.abs(t-e.count)<.01?i:`${i} (${Ee(t)} score-weighted)`}function lt(e){let r=[];if(e.dead.count>0&&r.push({category:"Dead code",evidence:"graph-fact",evidenceContractId:"dead-visible-references",description:`${e.dead.count} indexed symbols with no visible repository references \u2014 review runtime/framework roots and the capability disclosure, then verify any deletion with cleanup-plan --verify`,effort:"low",impact:"high",count:e.dead.count,locRecoverable:e.dead.loc}),e.isolated.count>0&&r.push({category:"Isolated symbols",evidence:"graph-fact",evidenceContractId:"isolated-visible-connectivity",description:`${e.isolated.count} symbols with no visible indexed or source-supported caller/callee after root exclusions \u2014 runtime reflection and generated dispatch remain disclosed blind spots`,effort:"low",impact:"medium",count:e.isolated.count,locRecoverable:e.isolated.loc}),e.realCycleCount>0&&r.push({category:"Circular dependencies",evidence:"graph-fact",description:`${e.realCycleCount} indexed dependency cycle(s) \u2014 inspect ownership and runtime order before choosing whether or how to break them`,effort:"medium",impact:"high",count:e.realCycleCount,locRecoverable:0}),e.similarCount>0&&r.push({category:"Similar functions",evidence:"heuristic",evidenceContractId:"duplicate-structural-candidate",description:`${e.similarCount} pairs share disclosed call or source-token evidence beyond imports \u2014 review domain identity before considering consolidation`,effort:"medium",impact:"medium",count:e.similarCount,locRecoverable:0}),e.duplicateBodies.count>0&&r.push({category:"Duplicate function bodies",evidence:"heuristic",evidenceContractId:"duplicate-structural-candidate",description:`${e.duplicateBodies.count} exact small-body group(s) across files \u2014 consolidate only when the domain concept matches`,effort:"low",impact:"medium",count:e.duplicateBodies.count,locRecoverable:e.duplicateBodies.loc}),e.twinDrift.count>0&&r.push({category:"Drifted twin implementations",evidence:"heuristic",description:`${e.twinDrift.count} same-name (or near-name) function group(s) across files with diverged or identical bodies \u2014 determine whether they represent the same concept before acting`,effort:"medium",impact:"medium",count:e.twinDrift.count,locRecoverable:0}),e.reactComponentDuplicates.count>0&&r.push({category:"Duplicated React components",evidence:"heuristic",description:`${e.reactComponentDuplicates.count} React component pair(s) share JSX structure \u2014 review whether local product intent justifies reuse`,effort:"medium",impact:"medium",count:e.reactComponentDuplicates.count,locRecoverable:e.reactComponentDuplicates.loc}),e.reactHookCandidates.count>0&&r.push({category:"Duplicated React hook behavior",evidence:"heuristic",description:`${e.reactHookCandidates.count} React component pair(s) share state/effect/request behavior${E(e.reactHookCandidates)} \u2014 review whether a common hook would preserve ownership and lifecycle semantics`,effort:"medium",impact:"medium",count:e.reactHookCandidates.count,locRecoverable:e.reactHookCandidates.loc}),e.reactLargeComponentPressure.count>0&&r.push({category:"Large React components",evidence:"heuristic",description:`${e.reactLargeComponentPressure.count} React component(s) concentrate JSX/behavior pressure \u2014 split by reason to change`,effort:"medium",impact:"medium",count:e.reactLargeComponentPressure.count,locRecoverable:0}),e.vueComponentDuplicates.count>0&&r.push({category:"Duplicated Vue components",evidence:"heuristic",description:`${e.vueComponentDuplicates.count} Vue component pair(s) share template structure \u2014 review whether local product intent justifies reuse`,effort:"medium",impact:"medium",count:e.vueComponentDuplicates.count,locRecoverable:e.vueComponentDuplicates.loc}),e.vueComposableCandidates.count>0&&r.push({category:"Duplicated Vue behavior",evidence:"heuristic",description:`${e.vueComposableCandidates.count} Vue component pair(s) share state/effect/request behavior${E(e.vueComposableCandidates)} \u2014 review whether a common composable would preserve ownership and lifecycle semantics`,effort:"medium",impact:"medium",count:e.vueComposableCandidates.count,locRecoverable:e.vueComposableCandidates.loc}),e.vueLargeViewPressure.count>0&&r.push({category:"Large Vue views",evidence:"heuristic",description:`${e.vueLargeViewPressure.count} Vue file(s) concentrate template/script/style pressure \u2014 split by reason to change`,effort:"medium",impact:"medium",count:e.vueLargeViewPressure.count,locRecoverable:0}),e.extractCount>0&&r.push({category:"Extraction candidates",evidence:"heuristic",description:`${e.extractCount} large functions with isolated callee clusters \u2014 review same-file or feature-local extraction seams`,effort:"medium",impact:"medium",count:e.extractCount,locRecoverable:0}),e.wrappers.count>0&&r.push({category:"Wrapper functions",evidence:"heuristic",evidenceContractId:"wrapper-indirection-candidate",description:`${e.wrappers.count} single-consumer symbols${E(e.wrappers,"boundary-evidence discount")} \u2014 inspect whether each is indirection or an intentional API, framework, or ownership boundary`,effort:"low",impact:"low",count:e.wrappers.count,locRecoverable:e.wrappers.loc}),e.passthroughs.count>0&&r.push({category:"Passthrough functions",evidence:"heuristic",evidenceContractId:"passthrough-forwarding-candidate",description:`${e.passthroughs.count} functions that literally forward to one callee \u2014 inspect whether each is unnecessary indirection or an intentional boundary`,effort:"low",impact:"low",count:e.passthroughs.count,locRecoverable:e.passthroughs.loc}),e.stale.count>0){let n=[];e.stale.unused>0&&n.push(`${e.stale.unused} unused`),e.stale.singleUse>0&&n.push(`${e.stale.singleUse} single-consumer (not in types file)`),r.push({category:"Stale abstractions",evidence:"heuristic",evidenceContractId:"stale-abstraction-candidate",description:`${n.join(", ")} \u2014 review public, runtime-registration, and ownership evidence before removing, moving, or inlining`,effort:"low",impact:"medium",count:e.stale.count,locRecoverable:e.stale.loc})}if(e.drift.count>0){let n=[];e.drift.unusedImports>0&&n.push(`${e.drift.unusedImports} unused imports`),e.drift.architectureViolations>0&&n.push(`${e.drift.architectureViolations} declared architecture violations`),r.push({category:"Structural drift",evidence:"heuristic",description:`${n.join(", ")} \u2014 repair direct dependency-rule breaks; inspect boundary signals with \`drift --architecture\``,effort:e.drift.architectureViolations>0?"medium":"low",impact:e.drift.architectureViolations>0?"medium":"low",count:e.drift.count,locRecoverable:0})}if(e.coverageContracts.count>0&&r.push({category:"Coverage contract drift",evidence:"graph-fact",description:`${e.coverageContracts.count} configured coverage contract(s) drifted from their ground-truth source (enumeration rot) \u2014 run \`scip-query health --json\` for the missing/extra keys`,effort:"low",impact:"medium",count:e.coverageContracts.count,locRecoverable:0}),e.gitEvidence&&e.gitEvidence.hiddenCoupling.pairCount>0){let n=e.gitEvidence.hiddenCoupling.top[0];r.push({category:"Hidden coupling",evidence:"change-graph",description:`${e.gitEvidence.hiddenCoupling.pairCount} file pair(s) co-change without a structural link`+E({count:e.gitEvidence.hiddenCoupling.pairCount,scoreCount:e.gitEvidence.hiddenCoupling.scoreCount},"broad/stale-history discount")+(n?` (e.g. ${n.fileA} \u2194 ${n.fileB})`:"")+" \u2014 inspect whether a shared concept, generated artifact, or coordinated contract explains the history",effort:"medium",impact:"high",count:e.gitEvidence.hiddenCoupling.pairCount,locRecoverable:0})}let t={high:3,medium:2,low:1},i={low:3,medium:2,high:1};return r.sort((n,o)=>{let a=t[n.impact]*i[n.effort];return t[o.impact]*i[o.effort]-a}),r}var we={"dead-code":"risk",isolated:"risk",cycles:"risk",complexity:"risk","hidden-coupling":"risk","cycles-pressure":"risk","complexity-pressure":"risk","hidden-coupling-pressure":"risk",similar:"hygiene","duplicate-bodies":"hygiene","twin-drift":"hygiene","react-component-duplicates":"hygiene","react-hook-candidates":"hygiene","react-large-component-pressure":"hygiene","vue-component-duplicates":"hygiene","vue-composable-candidates":"hygiene","vue-large-view-pressure":"hygiene",extract:"hygiene",wrappers:"hygiene",passthroughs:"hygiene","stale-abstractions":"hygiene",drift:"hygiene","similar-pressure":"hygiene","duplicate-bodies-pressure":"hygiene","twin-drift-pressure":"hygiene","react-component-duplicates-pressure":"hygiene","react-hook-candidates-pressure":"hygiene","react-large-component-pressure-pressure":"hygiene","vue-component-duplicates-pressure":"hygiene","vue-composable-candidates-pressure":"hygiene","vue-large-view-pressure-pressure":"hygiene","extract-pressure":"hygiene","wrappers-pressure":"hygiene","passthroughs-pressure":"hygiene","stale-abstractions-pressure":"hygiene","drift-pressure":"hygiene"};function He(e,r){let t=e.filter(i=>i.kind===r).reduce((i,n)=>i+n.points,0);return Math.max(0,Math.min(100,100-t))}function dt(e){let r=Math.max(e.statsResult.documents,1),t=Math.max(e.statsResult.symbols,1),i=[],n=[],o=(d,w,C)=>{w>0&&i.push({axis:d,points:w,detail:C,kind:we[d]??"hygiene"})},a=(d,w,C,je,Oe,We,Ue)=>{let H=Math.max(je,1);if(C<=H)return;let D=C/H,P=Math.min(Oe,Math.ceil(Math.log2(D)*We));if(P<=0)return;let Ke=we[d]??"hygiene";n.push({axis:d,category:w,kind:Ke,count:C,threshold:p(H),ratio:p(D),extraPenalty:P}),o(d,P,`${C} ${Ue} exceed pressure threshold ${p(H)} (${p(D)}x)`)},s=e.dead.count/t;o("dead-code",Math.min(20,Math.round(s*200)),`${e.dead.count} dead symbols (${e.dead.loc} LOC deletable)`);let l=e.isolated.count/t;o("isolated",Math.min(10,Math.round(l*200)),`${e.isolated.count} isolated symbols (${e.isolated.loc} LOC deletable)`),o("cycles",Math.min(15,e.realCycleCount*5),`${e.realCycleCount} real dependency cycle(s)`);let S=e.similarCount/t*1e3;o("similar",Math.min(10,Math.round(S)),`${e.similarCount} similar function pair(s)`);let v=e.duplicateBodies.count/t*1e3;o("duplicate-bodies",Math.min(10,Math.round(v*2)),`${e.duplicateBodies.count} exact duplicate small-body group(s) (${e.duplicateBodies.loc} duplicate LOC)`);let g=e.twinDrift.count/t*1e3;o("twin-drift",Math.min(10,Math.round(g*2)),`${e.twinDrift.count} drifted twin implementation group(s) (same or near-same name, diverged or identical bodies)`);let f=e.reactComponentDuplicates.count/r*1e3;o("react-component-duplicates",Math.min(10,Math.round(f)),`${e.reactComponentDuplicates.count} duplicated React component pair(s)`);let b=h(e.reactHookCandidates),x=b/r*1e3;o("react-hook-candidates",Math.min(10,Math.round(x)),y(e.reactHookCandidates,"duplicated React behavior pair(s)"));let R=e.reactLargeComponentPressure.count/r*1e3;o("react-large-component-pressure",Math.min(5,Math.round(R/2)),`${e.reactLargeComponentPressure.count} large React component pressure file(s)`);let Fe=e.vueComponentDuplicates.count/r*1e3;o("vue-component-duplicates",Math.min(10,Math.round(Fe)),`${e.vueComponentDuplicates.count} duplicated Vue component pair(s)`);let _=h(e.vueComposableCandidates),qe=_/r*1e3;o("vue-composable-candidates",Math.min(10,Math.round(qe)),y(e.vueComposableCandidates,"duplicated Vue behavior pair(s)"));let ze=e.vueLargeViewPressure.count/r*1e3;o("vue-large-view-pressure",Math.min(5,Math.round(ze/2)),`${e.vueLargeViewPressure.count} large Vue view pressure file(s)`);let I=h(e.wrappers);o("wrappers",Math.min(3,I),y(e.wrappers,"wrapper candidate(s)"));let F=h(e.passthroughs);o("passthroughs",Math.min(3,F),y(e.passthroughs,"passthrough candidate(s)")),o("stale-abstractions",Math.min(8,e.stale.unused),`${e.stale.unused} unused stale abstraction(s); ${e.stale.singleUse} single-consumer signal(s)`);let Ge=e.drift.direct/r;if(o("drift",Math.min(5,Math.round(Ge*50)),`${e.drift.direct} direct drift finding(s); ${e.drift.signal} signal drift finding(s)`),o("complexity",Math.min(5,e.complexity.extremeCount*2),`${e.complexity.extremeCount} extreme complexity hotspot(s)`),e.gitEvidence){let d=e.gitEvidence.hiddenCoupling.scoreCount;o("hidden-coupling",Math.min(5,Math.ceil(d/10)),y({count:e.gitEvidence.hiddenCoupling.pairCount,scoreCount:d},"co-changing pair(s) without a structural link"))}if(a("cycles-pressure","Circular dependencies",e.realCycleCount,3,10,3,"cycle(s)"),a("complexity-pressure","Extreme complexity",e.complexity.extremeCount,3,5,2,"extreme complexity hotspot(s)"),e.gitEvidence){let d=e.gitEvidence.hiddenCoupling.scoreCount;a("hidden-coupling-pressure","Hidden coupling",d,50,10,4,"score-weighted co-changing pair(s)")}return a("similar-pressure","Similar functions",e.similarCount,Math.max(50,t*.01),8,4,"similar function pair(s)"),a("duplicate-bodies-pressure","Duplicate function bodies",e.duplicateBodies.count,Math.max(20,t*.005),8,4,"exact duplicate small-body group(s)"),a("twin-drift-pressure","Drifted twin implementations",e.twinDrift.count,Math.max(20,t*.005),8,4,"drifted twin implementation group(s)"),a("react-component-duplicates-pressure","Duplicated React components",e.reactComponentDuplicates.count,Math.max(10,r*.01),8,4,"duplicated React component pair(s)"),a("react-hook-candidates-pressure","Duplicated React hook behavior",b,Math.max(10,r*.01),8,4,"duplicated React behavior pair(s)"),a("react-large-component-pressure-pressure","Large React components",e.reactLargeComponentPressure.count,Math.max(10,r*.01),4,2,"large React component pressure file(s)"),a("vue-component-duplicates-pressure","Duplicated Vue components",e.vueComponentDuplicates.count,Math.max(10,r*.01),8,4,"duplicated Vue component pair(s)"),a("vue-composable-candidates-pressure","Duplicated Vue behavior",_,Math.max(10,r*.01),8,4,"duplicated Vue behavior pair(s)"),a("vue-large-view-pressure-pressure","Large Vue views",e.vueLargeViewPressure.count,Math.max(10,r*.01),4,2,"large Vue view pressure file(s)"),a("extract-pressure","Extraction candidates",e.extractCount,Math.max(50,t*.01),4,2,"extraction candidate(s)"),a("wrappers-pressure","Wrapper functions",I,50,4,2,"wrapper candidate(s)"),a("passthroughs-pressure","Passthrough functions",F,50,4,2,"passthrough candidate(s)"),a("stale-abstractions-pressure","Single-consumer stale abstraction signals",e.stale.singleUse,Math.max(50,t*.02),4,2,"single-consumer stale abstraction signal(s)"),a("drift-pressure","Structural drift signals",e.drift.signal,Math.max(10,r*.1),4,2,"signal drift finding(s)"),{breakdown:i,pressure:n}}var m={dead:{minLoc:1,skipBarrels:!1,deadCodeOnly:!1},isolated:{minLoc:3},similar:{minSimilarity:.6,limit:50,minCallees:4},duplicateBodies:{maxLoc:15,limit:50},extract:{minLoc:15,minCallees:5,limit:50},wrappers:{maxLoc:15,limit:50},passthroughs:{maxLoc:15,limit:50},stale:{minLoc:3,limit:50},drift:{},twinDrift:{minSimilarity:.3}};import{getHeapStatistics as mt}from"v8";var pt=64*1024*1024;function $(){let e=globalThis.gc;if(!e)return;let r=mt();r.heap_size_limit-r.used_heap_size<pt||e()}var ht=[{id:"dead-visible-references",detector:"dead",claim:"The symbol has no visible repository reference after entry, framework, and rooted-symbol exclusions.",relationRequirements:[{family:"identity",subtype:"references",minimumStrength:"exact"},{family:"execution",subtype:"call",minimumStrength:"exact"}],structuralEvidence:["entry-surface exclusions","framework/source fallback references","rooted-symbol exclusions"],calibration:"mixed",providerCoverage:"partial",nonClaims:["Absence of visible references does not prove absence of reflection, generated dispatch, or external use."],recoverWith:"scip-query evidence --symbol <symbol> --edge execution --edge runtime --edge identity --direction both --depth 2 --max-edges 100"},{id:"isolated-visible-connectivity",detector:"isolated",claim:"The callable has no visible non-self caller or callee after entry, framework, and rooted-symbol exclusions.",relationRequirements:[{family:"execution",subtype:"call",minimumStrength:"exact"},{family:"identity",subtype:"references",minimumStrength:"exact"}],structuralEvidence:["entry-surface exclusions","framework contract exclusions","source fallback callers"],calibration:"mixed",providerCoverage:"partial",nonClaims:["Visible graph isolation does not establish runtime unreachability through reflection or generated dispatch."],recoverWith:"scip-query evidence --symbol <symbol> --edge execution --edge runtime --edge identity --direction both --depth 2 --max-edges 100"},{id:"wrapper-indirection-candidate",detector:"wrapper-candidates",claim:"A small callable has one visible consumer and wrapper-shaped delegation, after boundary evidence is disclosed.",relationRequirements:[{family:"execution",subtype:"call",minimumStrength:"exact"},{family:"ownership",subtype:"contains",minimumStrength:"exact"}],structuralEvidence:["callable body shape","public and runtime-boundary signals","consumer fan-in"],calibration:"candidate",providerCoverage:"partial",nonClaims:["Wrapper shape does not prove that an API, ownership, observability, or compatibility boundary is unnecessary."],recoverWith:"scip-query inspect --symbol <symbol> --view behavior"},{id:"passthrough-forwarding-candidate",detector:"passthrough-candidates",claim:"A small callable visibly forwards to one callee, with public-facade and boundary signals disclosed.",relationRequirements:[{family:"execution",subtype:"call",minimumStrength:"exact"},{family:"contract",subtype:"uses-contract-symbol",minimumStrength:"exact"}],structuralEvidence:["statement-complete forwarding shape","public facade evidence","runtime-boundary signals"],calibration:"mixed",providerCoverage:"partial",nonClaims:["Literal forwarding does not prove the callable has no contract, naming, policy, or compatibility role."],recoverWith:"scip-query inspect --symbol <symbol> --view behavior"},{id:"stale-abstraction-candidate",detector:"stale-abstractions",claim:"A type-like abstraction has zero or one visible real consumer after re-export and ownership distinctions.",relationRequirements:[{family:"identity",subtype:"references",minimumStrength:"exact"},{family:"ownership",subtype:"contains",minimumStrength:"exact"}],structuralEvidence:["definition kind","barrel-only consumer distinction","defining-file usage"],calibration:"mixed",providerCoverage:"partial",nonClaims:["Low visible consumer count does not prove a public contract or runtime-registered type is obsolete."],recoverWith:"scip-query evidence --symbol <symbol> --edge identity --edge ownership --edge contract --direction both --depth 2 --max-edges 100"},{id:"complexity-control-pressure",detector:"complexity-hotspots",claim:"A callable concentrates local branch/control pressure and graph fan-in or fan-out.",relationRequirements:[{family:"execution",subtype:"predicate-consequence",minimumStrength:"exact"},{family:"execution",subtype:"call",minimumStrength:"exact"}],structuralEvidence:["AST branch count or disclosed regex fallback","call fan-in","callee count"],calibration:"mixed",providerCoverage:"partial",nonClaims:["Structural complexity does not establish runtime frequency, latency, defect density, or a required refactor."],recoverWith:"scip-query inspect --symbol <symbol> --view behavior"},{id:"decorative-checker-terminal-behavior",detector:"decorative-checkers",claim:"A checker-shaped callable lacks a visible failure terminal directly or through one resolved delegate.",relationRequirements:[{family:"execution",subtype:"returns",minimumStrength:"exact"},{family:"execution",subtype:"throws",minimumStrength:"exact"}],structuralEvidence:["checker naming shape","direct terminal behavior","one-hop delegate body"],calibration:"mixed",providerCoverage:"partial",nonClaims:["No visible terminal does not prove the checker cannot fail through an opaque call, exception, or process exit."],recoverWith:"scip-query inspect --symbol <symbol> --view behavior"},{id:"duplicate-structural-candidate",detector:"duplicate and similarity detectors",claim:"Two source units share the detector-specific structural or token pattern.",relationRequirements:[],structuralEvidence:["normalized source/token/JSX/template similarity"],calibration:"candidate",providerCoverage:"partial",nonClaims:["Structural similarity does not establish shared domain identity or justify consolidation."],recoverWith:"scip-query inspect --symbol <symbol-a> --symbol <symbol-b> --view behavior"}];function Le(e=new Set(["indexed-graph","source-facts"])){return ht.map(r=>{let t=r.relationRequirements.map(n=>{let o=te(n.family,n.subtype);if(!o)throw new Error(`Detector ${r.id} names an unregistered relation ${n.family}/${n.subtype}`);if(!o.relation.evidenceStrengths.includes(n.minimumStrength))throw new Error(`Detector ${r.id} requires unsupported strength ${n.minimumStrength} for ${n.family}/${n.subtype}`);return o.provider}),i=[...new Set(t.flatMap(n=>n.requirements))].filter(n=>!e.has(n));return{...r,status:i.length>0?"unsupported":r.calibration,providerIds:[...new Set(t.map(n=>n.id))],unavailableRequirements:i}})}var gt=50,ft=25e3,Ct=2500,Re=2500,De=50,vt=10,bt=["overview","dead","isolated","cycles","similar","duplicate-bodies","twin-drift","react-component-duplicates","react-hook-candidates","react-large-component-pressure","vue-component-duplicates","vue-composable-candidates","vue-large-view-pressure","extract-candidates","wrapper-candidates","passthrough-candidates","stale-abstractions","drift","complexity-hotspots","git-evidence","suppressions","coverage-contracts"],Ae={overview:(e,r,t,i)=>({phase:"overview",statsResult:i,warnings:t.warnings}),dead:(e,r,t)=>({phase:"dead",dead:xt(e,r,t)}),isolated:(e,r,t)=>({phase:"isolated",isolated:wt(e,r,t)}),cycles:(e,r,t)=>({phase:"cycles",realCycleCount:Ht(e,r,t)}),similar:(e,r,t)=>({phase:"similar",similarCount:Et(e,r,t)}),"duplicate-bodies":(e,r,t)=>({phase:"duplicate-bodies",duplicateBodies:Rt(e,r,t)}),"twin-drift":(e,r,t)=>({phase:"twin-drift",twinDrift:Dt(e,r,t)}),"react-component-duplicates":(e,r,t)=>({phase:"react-component-duplicates",reactComponentDuplicates:Pt(e,r,t)}),"react-hook-candidates":(e,r,t)=>({phase:"react-hook-candidates",reactHookCandidates:kt(e,r,t)}),"react-large-component-pressure":(e,r,t)=>({phase:"react-large-component-pressure",reactLargeComponentPressure:At(e,r,t)}),"vue-component-duplicates":(e,r,t)=>({phase:"vue-component-duplicates",vueComponentDuplicates:Tt(e,r,t)}),"vue-composable-candidates":(e,r,t)=>({phase:"vue-composable-candidates",vueComposableCandidates:Mt(e,r,t)}),"vue-large-view-pressure":(e,r,t)=>({phase:"vue-large-view-pressure",vueLargeViewPressure:Bt(e,r,t)}),"extract-candidates":(e,r,t)=>({phase:"extract-candidates",extractCount:Lt(e,r,t)}),"wrapper-candidates":(e,r,t)=>({phase:"wrapper-candidates",wrappers:$t(e,r,t)}),"passthrough-candidates":(e,r,t)=>({phase:"passthrough-candidates",passthroughs:Vt(e,r,t)}),"stale-abstractions":(e,r,t)=>({phase:"stale-abstractions",stale:Nt(e,r,t)}),drift:(e,r,t)=>({phase:"drift",drift:qt(e,r,t)}),"complexity-hotspots":(e,r,t)=>({phase:"complexity-hotspots",complexity:zt(e,r,t)}),"git-evidence":(e,r,t)=>({phase:"git-evidence",gitEvidence:_t(e,t)}),suppressions:(e,r,t)=>({phase:"suppressions",suppressions:It(e,t)}),"coverage-contracts":(e,r,t)=>({phase:"coverage-contracts",coverageContracts:Ft(e,t)})};function Gr(e,r={}){return Te(e,r.full!==!1,(t,i)=>{let n=St(e,r.scope,t,i);return B(n)})}function jr(e,r,t={}){return yt(e,[r],t)[0]}function yt(e,r,t={}){return Te(e,t.full!==!1,(i,n)=>{let o={...n,releaseCachesBetweenPhases:!1};return r.map(a=>Ae[a](e,t.scope,o,i))})}function Te(e,r,t){let i=he(e),n=Gt(i,r);try{return t(i,n)}finally{M(e,{semanticProvider:!0}),$()}}function Or(e){return B(Me(e))}function Me(e){let r=u(e,"overview");return{statsResult:r.statsResult,warnings:r.warnings,detectorEvidence:Le(),dead:u(e,"dead").dead,isolated:u(e,"isolated").isolated,realCycleCount:u(e,"cycles").realCycleCount,similarCount:u(e,"similar").similarCount,duplicateBodies:u(e,"duplicate-bodies").duplicateBodies,twinDrift:u(e,"twin-drift").twinDrift,reactComponentDuplicates:u(e,"react-component-duplicates").reactComponentDuplicates,reactHookCandidates:u(e,"react-hook-candidates").reactHookCandidates,reactLargeComponentPressure:u(e,"react-large-component-pressure").reactLargeComponentPressure,vueComponentDuplicates:u(e,"vue-component-duplicates").vueComponentDuplicates,vueComposableCandidates:u(e,"vue-composable-candidates").vueComposableCandidates,vueLargeViewPressure:u(e,"vue-large-view-pressure").vueLargeViewPressure,extractCount:u(e,"extract-candidates").extractCount,wrappers:u(e,"wrapper-candidates").wrappers,passthroughs:u(e,"passthrough-candidates").passthroughs,stale:u(e,"stale-abstractions").stale,drift:u(e,"drift").drift,complexity:u(e,"complexity-hotspots").complexity,gitEvidence:Pe(e,"git-evidence")?.gitEvidence??null,suppressions:Pe(e,"suppressions")?.suppressions??null,coverageContracts:u(e,"coverage-contracts").coverageContracts}}function Pe(e,r){return e.find(t=>t.phase===r)}function u(e,r){let t=e.find(i=>i.phase===r);if(!t)throw new Error(`Missing health phase result: ${r}`);return t}function St(e,r,t,i){return Me(bt.map(n=>Ae[n](e,r,i,t)))}function xt(e,r,t){return c(e,t,"dead",()=>{let i=U(e,{scope:r,...m.dead,scanLimit:t.candidateScanLimit,semantic:t.semantic});return L(Wt(e,i.symbols))})}function wt(e,r,t){return c(e,t,"isolated",()=>{let i=ne(e,{scope:r,...m.isolated,scanLimit:t.candidateScanLimit,semantic:t.semantic});return L(Ut(e,i))})}function Ht(e,r,t){return c(e,t,"cycles",()=>J(e,{scope:r}).filter(n=>n.kind==="real").length)}function Et(e,r,t){let i=c(e,t,"similar",()=>Q(e,{scope:r,...m.similar,scanLimit:t.candidateScanLimit,semantic:t.semantic}));return Math.min(i,t.candidateResultLimit)}function Lt(e,r,t){return c(e,t,"extract-candidates",()=>ie(e,{scope:r,...m.extract,limit:t.candidateResultLimit,scanLimit:t.candidateScanLimit,semantic:t.semantic}).length)}function Rt(e,r,t){return c(e,t,"duplicate-bodies",()=>{let i=Z(e,{scope:r,...m.duplicateBodies,limit:t.candidateResultLimit,scanLimit:t.candidateScanLimit}),n=new Set,o=0;for(let a of i)for(let s of a.functions.slice(1))n.add(s.file),o+=s.loc;return{count:i.length,loc:o,files:[...n]}})}function Dt(e,r,t){return c(e,t,"twin-drift",()=>{let i=ee(e,{scope:r,...m.twinDrift,scanLimit:t.candidateScanLimit}).filter(a=>a.relationship==="divergent"||a.relationship==="identical"),n=new Set,o=0;for(let a of i)for(let s of a.members)n.add(s.file),o+=s.loc;return{count:i.length,loc:o,files:[...n].sort()}})}function Pt(e,r,t){return c(e,t,"react-component-duplicates",()=>{let i=oe(e,{scope:r,limit:t.candidateResultLimit,scanLimit:t.candidateScanLimit});return V(i)})}function kt(e,r,t){return c(e,t,"react-hook-candidates",()=>{let i=ae(e,{scope:r,limit:t.candidateResultLimit,scanLimit:t.candidateScanLimit});return $e(i,Yt)})}function At(e,r,t){return c(e,t,"react-large-component-pressure",()=>{let i=se(e,{scope:r,limit:t.candidateResultLimit,scanLimit:t.candidateScanLimit});return Kt(i)})}function Tt(e,r,t){return c(e,t,"vue-component-duplicates",()=>{let i=ce(e,{scope:r,limit:t.candidateResultLimit,scanLimit:t.candidateScanLimit});return V(i)})}function Mt(e,r,t){return c(e,t,"vue-composable-candidates",()=>{let i=ue(e,{scope:r,limit:t.candidateResultLimit,scanLimit:t.candidateScanLimit});return $e(i,Xt)})}function Bt(e,r,t){return c(e,t,"vue-large-view-pressure",()=>{let i=le(e,{scope:r,limit:t.candidateResultLimit,scanLimit:t.candidateScanLimit});return L(i)})}function $t(e,r,t){return c(e,t,"wrapper-candidates",()=>{let i=de(e,{scope:r,...m.wrappers,limit:t.candidateResultLimit,scanLimit:t.candidateScanLimit,semantic:t.semantic});return Be(i,Qt)})}function Vt(e,r,t){return c(e,t,"passthrough-candidates",()=>{let i=me(e,{scope:r,...m.passthroughs,limit:t.candidateResultLimit,scanLimit:t.candidateScanLimit,semantic:t.semantic});return Be(i,Jt)})}function Nt(e,r,t){return c(e,t,"stale-abstractions",()=>{let i=pe(e,{scope:r,...m.stale,limit:t.candidateResultLimit,scanLimit:t.candidateScanLimit,semantic:t.semantic}),n=i.filter(o=>o.consumers===0).length;return{count:i.length,loc:i.reduce((o,a)=>o+a.loc,0),files:[...new Set(i.map(o=>o.file))],unused:n,singleUse:i.length-n}})}function _t(e,r){return c(e,r,"git-evidence",()=>{let t=K(e,{historyMode:r.gitHistoryMode}),i=t.fileChurn();if(!i)return null;let n=t.commitHistory(),o=Y(e,void 0,{limit:r.candidateResultLimit,historyMode:r.gitHistoryMode}),a={};for(let[s,l]of i)a[s]={changes:l.changes,fixChanges:l.fixChanges};return{amplification:t.changeAmplification(),hiddenCoupling:{pairCount:o.findings.length,scoreCount:N(o.findings.reduce((s,l)=>s+ke(l),0)),top:o.findings.slice(0,5).map(s=>({fileA:s.fileA,fileB:s.fileB,together:s.together,confidence:s.confidence,focusedTogether:s.focusedTogether,broadTogether:s.broadTogether,broadCommitRatio:s.broadCommitRatio,lastTogetherAt:s.lastTogetherAt,recentTogether:s.recentTogether,commitScope:s.commitScope,recency:s.recency,scoreWeight:ke(s),subjectContext:s.subjectContext}))},fileStats:a,commitsScanned:n?.commits.length??0}})}function It(e,r){return c(e,r,"suppressions",()=>{let t=ge(e);return{total:t.total,byCategory:{...t.byCategory}}})}function Ft(e,r){return c(e,r,"coverage-contracts",()=>{let t=e.config.coverageContracts??[],n=ve(e,t).filter(o=>o.status!=="ok");return{count:n.length,loc:0,files:[...new Set(n.map(o=>o.file))].sort()}})}function qt(e,r,t){return c(e,t,"drift",()=>{let i=re(e,{scope:r,...m.drift,includePatternDeviations:!1,limit:Number.POSITIVE_INFINITY,semantic:t.semantic}),n=i.results.filter(s=>s.kind!=="pattern-deviation"),o=n.filter(s=>s.actionTier==="direct").length,a=n.length-o;return{count:n.length,unusedImports:i.unusedImports,architectureViolations:i.architectureViolations,layerViolations:i.layerViolations,direct:o,signal:a}})}function zt(e,r,t){return c(e,t,"complexity-hotspots",()=>{let i=X(e,{scope:r,minLoc:10,limit:t.complexityResultLimit,scanLimit:t.candidateScanLimit,semantic:t.semantic});return{top:i.slice(0,5).map(n=>({symbol:n.shortName,score:n.score,file:n.file})),extremeCount:i.filter(n=>n.score>gt).length}})}function Gt(e,r){let t=e.symbols>=ft||e.documents>=Ct,i=r?Number.POSITIVE_INFINITY:De,n=r?Number.POSITIVE_INFINITY:vt;return!t||r?{candidateScanLimit:void 0,candidateResultLimit:i,complexityResultLimit:n,semantic:!0,gitHistoryMode:r?"full":"bounded",releaseCachesBetweenPhases:!0,warnings:r&&t?["Large index detected; running health without candidate scan or result caps because full mode is enabled."]:[]}:{candidateScanLimit:Re,candidateResultLimit:i,complexityResultLimit:n,semantic:!1,gitHistoryMode:"bounded",releaseCachesBetweenPhases:!0,warnings:[`Large index detected; candidate-style health checks scanned their highest-priority ${Re} symbols and reported their top ${De} findings. Enable full mode for unbounded candidate counts.`]}}function jt(e,r){r.releaseCachesBetweenPhases&&(M(e),$())}function c(e,r,t,i){Ot(t);try{return i()}finally{jt(e,r)}}function Ot(e){process.env.SCIP_QUERY_HEALTH_TRACE==="1"&&console.error(`[health] ${e}`)}function Wt(e,r){return r.filter(t=>!A(e,t.relativePath)&&!T(e,t.symbol,t.relativePath)&&t.kind==="dead-code")}function Ut(e,r){return r.filter(t=>!A(e,t.relativePath)&&!T(e,t.symbol,t.relativePath))}function L(e){let r=new Set;for(let t of e){let i=t.relativePath??t.file;i&&r.add(i)}return{count:e.length,loc:e.reduce((t,i)=>t+i.loc,0),files:[...r]}}function Be(e,r){return{...L(e),scoreCount:N(e.reduce((i,n)=>i+r(n),0))}}function Kt(e){let r=new Map;for(let t of e)r.set(t.file,Math.max(r.get(t.file)??0,t.loc));return{count:r.size,loc:[...r.values()].reduce((t,i)=>t+i,0),files:[...r.keys()]}}function V(e){let r=new Map;for(let t of e)r.set(t.fileA,Math.max(r.get(t.fileA)??0,t.locA)),r.set(t.fileB,Math.max(r.get(t.fileB)??0,t.locB));return{count:e.length,loc:[...r.values()].reduce((t,i)=>t+i,0),files:[...r.keys()]}}function $e(e,r){return{...V(e),scoreCount:N(e.reduce((i,n)=>i+r(n),0))}}function Yt(e){let r=e.sharedHooks.length>0,t=Ve({namedState:e.sharedState,requests:e.sharedRequests,lifecycle:e.sharedEffects,functions:e.sharedHandlers});return r&&t<=2?0:r?.5:Ne(e.sharedState,e.sharedHandlers,e.sharedHandlerVerbs)?.25:t>=2?1:.5}function Xt(e){let r=e.sharedComposables.length+e.sharedStores.length>0,t=Ve({namedState:e.sharedBindings,requests:e.sharedRequests,lifecycle:e.sharedLifecycle,functions:e.sharedFunctions});return r&&t<=2?0:r?.5:Ne(e.sharedBindings,e.sharedFunctions,e.sharedFunctionVerbs)?.25:t>=2?1:.5}function Ve(e){return e.requests.length*2+e.lifecycle.length+e.namedState.filter(r=>!Ie.has(_e(r))).length+Math.min(e.functions.length,3)}function Ne(e,r,t){let i=[...e,...r,...t].map(_e);return i.length>0&&i.every(n=>Ie.has(n))}function _e(e){return e.replace(/^handle/,"").replace(/^is/,"").replace(/^has/,"").toLowerCase()}function Qt(e){return e.actionTier==="signal"?.25:1}function Jt(e){return e.actionTier==="signal"?.25:1}function ke(e){return e.commitScope==="broad-sweep"?e.recency==="recent"?.25:0:e.commitScope==="mixed"?e.recency==="recent"?.5:.25:e.recency==="recent"?1:.5}function N(e){return Math.round(e*100)/100}var Ie=new Set(["add","apply","cancel","change","clear","close","create","delete","draft","edit","error","filter","form","load","loading","name","open","refresh","remove","reset","save","saving","search","select","selected","submit","toggle","update","value"]);export{m as a,bt as b,Gr as c,jr as d,yt as e,Or as f};
|
|
2
|
-
//# sourceMappingURL=chunk-4OE2JO6I.js.map
|