codebaseiq 0.2.0 → 0.3.1
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 +59 -2
- package/README.md +1 -1
- package/dist/augment-vue-worker.js +1 -1
- package/dist/{chunk-WH5SYOMD.js → chunk-2E6OUPCF.js} +2 -2
- package/dist/chunk-2I2UHZET.js +2 -0
- package/dist/{chunk-CSZOQ7YO.js → chunk-2OMXFE64.js} +2 -2
- package/dist/{chunk-57KFVPVZ.js → chunk-2XBJRZEM.js} +2 -2
- package/dist/{chunk-PFPHS4NO.js → chunk-2Z7K66D7.js} +2 -2
- package/dist/{chunk-5WXOEJ4G.js → chunk-356EZBIP.js} +2 -2
- package/dist/{chunk-DLC6JDN7.js → chunk-3H2H5ODK.js} +2 -2
- package/dist/{chunk-HBQGKMM3.js → chunk-3LQJRS4I.js} +2 -2
- package/dist/{chunk-H3CKAL6P.js → chunk-3ON3A2QV.js} +2 -2
- package/dist/{chunk-MTMF4N7F.js → chunk-3VJ3OCRE.js} +2 -2
- package/dist/{chunk-QMGWSEPL.js → chunk-4GWN76B2.js} +2 -2
- package/dist/{chunk-IBM3F2BJ.js → chunk-4LK5OIPW.js} +2 -2
- package/dist/{chunk-6SDEQTVY.js → chunk-53ELMZRF.js} +2 -2
- package/dist/{chunk-OJFLPVBP.js → chunk-57OPIQFM.js} +2 -2
- package/dist/{chunk-2E6BTWER.js → chunk-5CR4U5X2.js} +2 -2
- package/dist/{chunk-IYBIBMPF.js → chunk-5FWR5HLG.js} +2 -2
- package/dist/{chunk-HHBBGWES.js → chunk-5LL4KEHO.js} +2 -2
- package/dist/{chunk-NTRW52UR.js → chunk-5MPBSFZH.js} +2 -2
- package/dist/chunk-5T44HG5Y.js +88 -0
- package/dist/chunk-5TZNHP4T.js +8 -0
- package/dist/{chunk-L3YSDLNB.js → chunk-5YBDBY5L.js} +2 -2
- package/dist/{chunk-YFQPWKHR.js → chunk-5ZI2PPI7.js} +2 -2
- package/dist/{chunk-WO47BIPY.js → chunk-6EYESTJM.js} +2 -2
- package/dist/{chunk-PHPQ24UG.js → chunk-6FXXYYQM.js} +2 -2
- package/dist/chunk-6O3KXIDL.js +2 -0
- package/dist/{chunk-PLZXWZHY.js → chunk-7GAK2F3H.js} +2 -2
- package/dist/{chunk-W3FK73MD.js → chunk-7UCDGXRW.js} +2 -2
- package/dist/{chunk-U2XX3BT4.js → chunk-AGGR2BKS.js} +2 -2
- package/dist/{chunk-ZB3V5QM7.js → chunk-ALOEHWJS.js} +2 -2
- package/dist/{chunk-NDGTJHQN.js → chunk-AXQCHG77.js} +2 -2
- package/dist/{chunk-X5I2BQGX.js → chunk-BFANZRQ5.js} +2 -2
- package/dist/{chunk-VVCBMH5O.js → chunk-BGGB5N53.js} +2 -2
- package/dist/{chunk-PARCKE3Q.js → chunk-BGYRF5YX.js} +2 -2
- package/dist/{chunk-CIVYHK7U.js → chunk-BIADXGC3.js} +2 -2
- package/dist/{chunk-NK76RSB6.js → chunk-BPKNP3KZ.js} +2 -2
- package/dist/{chunk-ZOEDRCR4.js → chunk-BRQL7AFJ.js} +2 -2
- package/dist/{chunk-KDYQQJ6X.js → chunk-BWL3PMPT.js} +2 -2
- package/dist/{chunk-M7LAIM77.js → chunk-C6WKPKCF.js} +2 -2
- package/dist/{chunk-37TKC6MB.js → chunk-CB5AVJMM.js} +2 -2
- package/dist/{chunk-BX2U3QQV.js → chunk-CCIYWXX6.js} +2 -2
- package/dist/{chunk-3AC56WAR.js → chunk-CIYA2KZN.js} +2 -2
- package/dist/{chunk-6OVNYYY4.js → chunk-CJTKGAGH.js} +2 -2
- package/dist/{chunk-FIXYHQ3W.js → chunk-CLPCFGRT.js} +2 -2
- package/dist/{chunk-LY2NB5XR.js → chunk-CSPDQLLU.js} +2 -2
- package/dist/{chunk-CMXW7MFV.js → chunk-CYJS33YX.js} +2 -2
- package/dist/{chunk-ACZDU5GK.js → chunk-D7DOB27N.js} +7 -7
- package/dist/{chunk-XUJM6474.js → chunk-DDRA3QKN.js} +2 -2
- package/dist/{chunk-3NUZVLR7.js → chunk-DECN422G.js} +2 -2
- package/dist/{chunk-RRPK327J.js → chunk-DJKOXMNG.js} +2 -2
- package/dist/{chunk-SJZQ2PTZ.js → chunk-DWBAESVW.js} +2 -2
- package/dist/{chunk-S5SKXCND.js → chunk-EHPOTEQX.js} +2 -2
- package/dist/chunk-EIBGSU2R.js +2 -0
- package/dist/{chunk-DVYG3JTA.js → chunk-ELYMY5S2.js} +2 -2
- package/dist/chunk-EOKVZXNF.js +355 -0
- package/dist/chunk-EQNMD62X.js +51 -0
- package/dist/{chunk-YIOQJ45A.js → chunk-F3QSL4W2.js} +2 -2
- package/dist/{chunk-VG55NFXF.js → chunk-F5CJO5JN.js} +2 -2
- package/dist/{chunk-JOALNFY3.js → chunk-F74LZWCE.js} +2 -2
- package/dist/chunk-G7GVV2TV.js +27 -0
- package/dist/{chunk-U24M5RQM.js → chunk-GQLDYCWS.js} +2 -2
- package/dist/{chunk-B2E3HZ2A.js → chunk-GV2CEZCW.js} +2 -2
- package/dist/{chunk-AM5SUGHF.js → chunk-GVAF222T.js} +2 -2
- package/dist/{chunk-T3YFIJ5P.js → chunk-HJTM3C4Y.js} +2 -2
- package/dist/{chunk-FY5V4V4F.js → chunk-HNXRVGMY.js} +2 -2
- package/dist/{chunk-UWB5WMC2.js → chunk-I3OK27P7.js} +2 -2
- package/dist/{chunk-RVYLJDXC.js → chunk-ICUL7XRT.js} +2 -2
- package/dist/{chunk-QVHZB75Z.js → chunk-IHSLIIL3.js} +2 -2
- package/dist/chunk-ILGTMRMZ.js +2 -0
- package/dist/{chunk-XNUWRTYM.js → chunk-IZDPGOZR.js} +2 -2
- package/dist/{chunk-BH5CE4LN.js → chunk-J7AMBVWF.js} +2 -2
- package/dist/chunk-JAFDMV5I.js +2 -0
- package/dist/{chunk-YXJ4IAHH.js → chunk-JCMFBF4Z.js} +2 -2
- package/dist/{chunk-BLKYYQ7C.js → chunk-JNXI6NQ7.js} +95 -95
- package/dist/{chunk-DKJXK3HA.js → chunk-JSB43EX6.js} +2 -2
- package/dist/chunk-JYRJYXUV.js +2 -0
- package/dist/chunk-K4S2VH42.js +82 -0
- package/dist/{chunk-QLTFXVUI.js → chunk-K6FNTQQW.js} +2 -2
- package/dist/{chunk-JYX5UZSZ.js → chunk-KEJ2HLRW.js} +2 -2
- package/dist/{chunk-VCWAJPXQ.js → chunk-KFTHI2R6.js} +2 -2
- package/dist/chunk-KLX6NSWT.js +3 -0
- package/dist/{chunk-DFPAZXLU.js → chunk-KPZGTB2O.js} +2 -2
- package/dist/{chunk-T55YPJGB.js → chunk-KUKKLWJD.js} +2 -2
- package/dist/{chunk-RWKEXCHU.js → chunk-KUKWHP4R.js} +2 -2
- package/dist/{chunk-ZJZQ7Q2Q.js → chunk-KWRQVLPX.js} +2 -2
- package/dist/{chunk-FQA3KIFX.js → chunk-L37EQYAX.js} +2 -2
- package/dist/{chunk-PNVZIJ57.js → chunk-LCW3PSGL.js} +2 -2
- package/dist/{chunk-7Z7HCZ7J.js → chunk-LKUTSP4G.js} +2 -2
- package/dist/{chunk-HIEXRDJF.js → chunk-LMTSB3TB.js} +2 -2
- package/dist/{chunk-SF34QLK2.js → chunk-LQHYYIOB.js} +2 -2
- package/dist/{chunk-EXMVF3JR.js → chunk-LSZYMN2A.js} +3 -3
- package/dist/{chunk-RCPZOPV6.js → chunk-M2Y6PCFE.js} +2 -2
- package/dist/chunk-MC46AL7B.js +343 -0
- package/dist/{chunk-SRY26ITJ.js → chunk-MDFT325O.js} +2 -2
- package/dist/{chunk-WJOQC4P7.js → chunk-MEUHIDI3.js} +2 -2
- package/dist/{chunk-FLLXYUOL.js → chunk-MQW6SJ4P.js} +2 -2
- package/dist/{chunk-57KEZDPT.js → chunk-MSI3K7PJ.js} +2 -2
- package/dist/{chunk-27PHVDKL.js → chunk-MZNMASFM.js} +2 -2
- package/dist/{chunk-VYZQZ4ZN.js → chunk-N2XDMNVI.js} +2 -2
- package/dist/{chunk-JN5LIBT3.js → chunk-NDKOVQFG.js} +2 -2
- package/dist/{chunk-W6C6QTXJ.js → chunk-NEWHKGVD.js} +2 -2
- package/dist/chunk-NNG6M6XD.js +3 -0
- package/dist/chunk-O2KWU34K.js +278 -0
- package/dist/{chunk-HBXZAGY6.js → chunk-O2M3VNDY.js} +2 -2
- package/dist/{chunk-FPDL2TUB.js → chunk-OBC7HSSO.js} +2 -2
- package/dist/{chunk-J24VICI5.js → chunk-OKAF4OQS.js} +2 -2
- package/dist/{chunk-I5FCDTK2.js → chunk-OP6BUIV6.js} +2 -2
- package/dist/{chunk-2DMVFAY7.js → chunk-OQ3DK7FW.js} +2 -2
- package/dist/{chunk-FEBLLMTL.js → chunk-OQUCBKOI.js} +2 -2
- package/dist/chunk-OT5ISJSR.js +2 -0
- package/dist/{chunk-N3Q3AWGW.js → chunk-OWJWOEDU.js} +96 -96
- package/dist/{chunk-M4EVGA5S.js → chunk-PIFYOWS4.js} +3 -3
- package/dist/{chunk-35YYZD3D.js → chunk-PTR3EOXC.js} +2 -2
- package/dist/{chunk-5XEVXVTK.js → chunk-PUVNH4PO.js} +2 -2
- package/dist/{chunk-I645ZF75.js → chunk-QEOWONKY.js} +2 -2
- package/dist/{chunk-JXHLB7TP.js → chunk-QMOZZ2VX.js} +2 -2
- package/dist/{chunk-NIO346UL.js → chunk-QY7QB7I6.js} +2 -2
- package/dist/{chunk-YYFV32WR.js → chunk-R4OJGTMP.js} +2 -2
- package/dist/{chunk-2VKB5CMA.js → chunk-RCIGX23V.js} +2 -2
- package/dist/{chunk-TUTSO7UZ.js → chunk-RIO3JXHM.js} +2 -2
- package/dist/{chunk-4IFISPQW.js → chunk-SA7G6GJX.js} +2 -2
- package/dist/{chunk-OMBRP7BB.js → chunk-SB53KPWA.js} +2 -2
- package/dist/chunk-SB7NASHU.js +2 -0
- package/dist/{chunk-3XFJUWJE.js → chunk-SGMNWYTH.js} +2 -2
- package/dist/{chunk-A7XQT7MH.js → chunk-SUE7SHZL.js} +2 -2
- package/dist/{chunk-IOVPAZWP.js → chunk-SX72EVMY.js} +2 -2
- package/dist/{chunk-OVKZM2XI.js → chunk-SZ4P7MF7.js} +2 -2
- package/dist/{chunk-EM5UHLAM.js → chunk-T2M5HWBQ.js} +2 -2
- package/dist/{chunk-CZEIHYMP.js → chunk-T6MQNNAC.js} +2 -2
- package/dist/chunk-T75DS2E6.js +21 -0
- package/dist/{chunk-57GCCPLS.js → chunk-TEANKHUU.js} +2 -2
- package/dist/{chunk-MT5W4DUG.js → chunk-TEMM2FEL.js} +2 -2
- package/dist/{chunk-I2KP4AGR.js → chunk-TJWVT4DO.js} +2 -2
- package/dist/{chunk-77GHPR2R.js → chunk-TLTSESB4.js} +2 -2
- package/dist/{chunk-KM4QRWI5.js → chunk-TNJGTQWO.js} +2 -2
- package/dist/{chunk-EFFMFK7C.js → chunk-TOTWJZIX.js} +2 -2
- package/dist/{chunk-54K6556S.js → chunk-U33PMPNW.js} +2 -2
- package/dist/{chunk-GXVDTHFC.js → chunk-U7NUXDQO.js} +2 -2
- package/dist/chunk-UC2FD2PS.js +4 -0
- package/dist/{chunk-MRGTCMDK.js → chunk-UIAUPFBJ.js} +2 -2
- package/dist/{chunk-LAGDJXFY.js → chunk-UJIXCI3L.js} +2 -2
- package/dist/{chunk-IVJJNVSX.js → chunk-UMEPSVKT.js} +2 -2
- package/dist/{chunk-4O52YNKL.js → chunk-UQYQBLJX.js} +2 -2
- package/dist/{chunk-JUO3Z644.js → chunk-UW6KD57C.js} +2 -2
- package/dist/{chunk-TAJ6UGCO.js → chunk-V4NGDIEA.js} +3 -3
- package/dist/{chunk-VLTUX4IF.js → chunk-VGWZ4MOY.js} +2 -2
- package/dist/{chunk-KNV5VFDV.js → chunk-VSGOIZMQ.js} +2 -2
- package/dist/{chunk-K5G7SPAG.js → chunk-W7QDASTN.js} +4 -4
- package/dist/{chunk-IWAMYGPN.js → chunk-W7YLRXZE.js} +2 -2
- package/dist/{chunk-QKVTWODE.js → chunk-WK2IQJPK.js} +2 -2
- package/dist/{chunk-HYKSLTAR.js → chunk-WO6OFKUC.js} +2 -2
- package/dist/{chunk-S64NCE2Z.js → chunk-WWCV4E6J.js} +2 -2
- package/dist/{chunk-2F5ERMNI.js → chunk-XJBK3QDV.js} +2 -2
- package/dist/{chunk-IGYAZPRX.js → chunk-XN3EKMLI.js} +2 -2
- package/dist/{chunk-FWY2PRIF.js → chunk-XQAVQVIL.js} +2 -2
- package/dist/{chunk-NJA4MMBD.js → chunk-XUPFA6GH.js} +2 -2
- package/dist/{chunk-4AOOSCZ7.js → chunk-YHPG3S2U.js} +2 -2
- package/dist/{chunk-CDWSLAPN.js → chunk-YPBKBYPS.js} +2 -2
- package/dist/{chunk-5BDK6QC3.js → chunk-YRKP7PM7.js} +2 -2
- package/dist/{chunk-4NHWNAWQ.js → chunk-YT4DVWUV.js} +2 -2
- package/dist/{chunk-5NJPH3QZ.js → chunk-YTJHCGYB.js} +2 -2
- package/dist/{chunk-ZNQCR656.js → chunk-Z66XYVLZ.js} +2 -2
- package/dist/{chunk-A67HT5FR.js → chunk-ZB4C5TTR.js} +2 -2
- package/dist/chunk-ZMA5HWXY.js +3 -0
- package/dist/{chunk-CWMHWD56.js → chunk-ZNH33XIB.js} +2 -2
- package/dist/{cli-context-XEPPF4RX.js → cli-context-FJL2JHOE.js} +2 -2
- package/dist/{cli-context-TSADTXLB.js → cli-context-PQNWHMCQ.js} +2 -2
- package/dist/{cli-program-KJGQEM72.js → cli-program-SCHOHOQE.js} +2 -2
- package/dist/cli.js +1 -1
- package/dist/{code-CDe-mIjx.d.ts → code-DfX3xeWy.d.ts} +1 -1
- package/dist/{code-viewer-ZCTHXQ5C.js → code-viewer-AMRXV444.js} +2 -2
- package/dist/{code-viewer-YGDON6SY.js → code-viewer-EXI5SFFR.js} +2 -2
- package/dist/{command-descriptors-5VAB2MZX.js → command-descriptors-H6A4UY72.js} +129 -129
- package/dist/{command-descriptors-EAHKIRAG.js → command-descriptors-ROIOTCCW.js} +130 -130
- package/dist/{db-DmRNdCtm.d.ts → db-BoG_PWYH.d.ts} +1 -1
- package/dist/direct-navigation-3JOYP2MO.js +3 -0
- package/dist/direct-navigation-SJMJLBY7.js +2 -0
- package/dist/{graph-evidence-Bs54NWws.d.ts → graph-evidence-D1jx1Cql.d.ts} +1 -1
- package/dist/{health-BnzbSLCE.d.ts → health-DkYBS5BI.d.ts} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/invocation-command-descriptors-GMZX3UAD.js +2 -0
- package/dist/invocation-command-descriptors-HNMKDEF6.js +3 -0
- package/dist/{scip-cli-BRFKkHQn.d.ts → maintenance-types-CdL5eQii.d.ts} +1 -20
- package/dist/output-continuation-command-5NWVDQT7.js +2 -0
- package/dist/output-continuation-command-RNEHNYPU.js +3 -0
- package/dist/postinstall.js +1 -1
- package/dist/project-reindex-MIW5CYEG.js +3 -0
- package/dist/project-reindex-VQ23LWDA.js +2 -0
- package/dist/queries/affected.d.ts +1 -1
- package/dist/queries/affected.js +1 -1
- package/dist/queries/anchors.d.ts +1 -1
- package/dist/queries/anchors.js +1 -1
- package/dist/queries/architecture.d.ts +1 -1
- package/dist/queries/architecture.js +1 -1
- package/dist/queries/bottlenecks.d.ts +1 -1
- package/dist/queries/bottlenecks.js +1 -1
- package/dist/queries/by-kind.d.ts +1 -1
- package/dist/queries/by-kind.js +1 -1
- package/dist/queries/call-graph.d.ts +1 -1
- package/dist/queries/call-graph.js +1 -1
- package/dist/queries/change-surface.d.ts +1 -1
- package/dist/queries/change-surface.js +1 -1
- package/dist/queries/cleanup-plan.d.ts +1 -1
- package/dist/queries/cleanup-plan.js +1 -1
- package/dist/queries/co-change.d.ts +1 -1
- package/dist/queries/co-change.js +1 -1
- package/dist/queries/code.d.ts +2 -2
- package/dist/queries/code.js +1 -1
- package/dist/queries/complexity-hotspots.d.ts +1 -1
- package/dist/queries/complexity-hotspots.js +1 -1
- package/dist/queries/complexity.d.ts +1 -1
- package/dist/queries/complexity.js +1 -1
- package/dist/queries/context.d.ts +1 -1
- package/dist/queries/context.js +1 -1
- package/dist/queries/convergence.d.ts +1 -1
- package/dist/queries/convergence.js +1 -1
- package/dist/queries/coupling.d.ts +1 -1
- package/dist/queries/coupling.js +1 -1
- package/dist/queries/cycles.d.ts +1 -1
- package/dist/queries/cycles.js +1 -1
- package/dist/queries/dataflow.d.ts +1 -1
- package/dist/queries/dataflow.js +1 -1
- package/dist/queries/dead.d.ts +1 -1
- package/dist/queries/dead.js +1 -1
- package/dist/queries/decorative-checkers.d.ts +1 -1
- package/dist/queries/decorative-checkers.js +1 -1
- package/dist/queries/deep-chains.d.ts +1 -1
- package/dist/queries/deep-chains.js +1 -1
- package/dist/queries/dependence-slice.d.ts +2 -2
- package/dist/queries/dependence-slice.js +1 -1
- package/dist/queries/dependency-depth.d.ts +1 -1
- package/dist/queries/dependency-depth.js +1 -1
- package/dist/queries/deps.d.ts +1 -1
- package/dist/queries/deps.js +1 -1
- package/dist/queries/diff-impact.d.ts +1 -1
- package/dist/queries/diff-impact.js +1 -1
- package/dist/queries/doc-drift.d.ts +1 -1
- package/dist/queries/doc-drift.js +1 -1
- package/dist/queries/drift.d.ts +1 -1
- package/dist/queries/drift.js +1 -1
- package/dist/queries/duplicate-bodies.d.ts +1 -1
- package/dist/queries/duplicate-bodies.js +1 -1
- package/dist/queries/entry-map.d.ts +1 -1
- package/dist/queries/entry-map.js +1 -1
- package/dist/queries/evidence.d.ts +2 -2
- package/dist/queries/evidence.js +1 -1
- package/dist/queries/extract-candidates.d.ts +1 -1
- package/dist/queries/extract-candidates.js +1 -1
- package/dist/queries/fan.d.ts +1 -1
- package/dist/queries/fan.js +1 -1
- package/dist/queries/files.d.ts +1 -1
- package/dist/queries/files.js +1 -1
- package/dist/queries/health.d.ts +2 -2
- package/dist/queries/health.js +1 -1
- package/dist/queries/hierarchy.d.ts +1 -1
- package/dist/queries/hierarchy.js +1 -1
- package/dist/queries/hotspots.d.ts +1 -1
- package/dist/queries/hotspots.js +1 -1
- package/dist/queries/imports.d.ts +1 -1
- package/dist/queries/imports.js +1 -1
- package/dist/queries/incomplete-migration.d.ts +1 -1
- package/dist/queries/incomplete-migration.js +1 -1
- package/dist/queries/index.d.ts +4 -4
- package/dist/queries/index.js +1 -1
- package/dist/queries/isolated.d.ts +1 -1
- package/dist/queries/isolated.js +1 -1
- package/dist/queries/locality-candidates.d.ts +1 -1
- package/dist/queries/locality-candidates.js +1 -1
- package/dist/queries/members.d.ts +1 -1
- package/dist/queries/members.js +1 -1
- package/dist/queries/methods.d.ts +1 -1
- package/dist/queries/methods.js +1 -1
- package/dist/queries/not-implemented.d.ts +1 -1
- package/dist/queries/not-implemented.js +1 -1
- package/dist/queries/outline.d.ts +1 -1
- package/dist/queries/outline.js +1 -1
- package/dist/queries/passthrough-candidates.d.ts +1 -1
- package/dist/queries/passthrough-candidates.js +1 -1
- package/dist/queries/plan-context.d.ts +1 -1
- package/dist/queries/plan-context.js +1 -1
- package/dist/queries/react-component-duplicates.d.ts +1 -1
- package/dist/queries/react-component-duplicates.js +1 -1
- package/dist/queries/react-hook-candidates.d.ts +1 -1
- package/dist/queries/react-hook-candidates.js +1 -1
- package/dist/queries/react-large-component-pressure.d.ts +1 -1
- package/dist/queries/react-large-component-pressure.js +1 -1
- package/dist/queries/recent-duplicates.d.ts +1 -1
- package/dist/queries/recent-duplicates.js +1 -1
- package/dist/queries/redundant-reexports.d.ts +1 -1
- package/dist/queries/redundant-reexports.js +1 -1
- package/dist/queries/reference-neighborhood.d.ts +1 -1
- package/dist/queries/reference-neighborhood.js +1 -1
- package/dist/queries/reference-reachability.d.ts +1 -1
- package/dist/queries/reference-reachability.js +1 -1
- package/dist/queries/refs.d.ts +1 -1
- package/dist/queries/refs.js +1 -1
- package/dist/queries/self-audit.d.ts +1 -1
- package/dist/queries/self-audit.js +1 -1
- package/dist/queries/similar-chains.d.ts +1 -1
- package/dist/queries/similar-chains.js +1 -1
- package/dist/queries/similar-files.d.ts +1 -1
- package/dist/queries/similar-files.js +1 -1
- package/dist/queries/similar-signatures.d.ts +1 -1
- package/dist/queries/similar-signatures.js +1 -1
- package/dist/queries/similar.d.ts +1 -1
- package/dist/queries/similar.js +1 -1
- package/dist/queries/slice.d.ts +1 -1
- package/dist/queries/slice.js +1 -1
- package/dist/queries/source-inspection.d.ts +3 -3
- package/dist/queries/source-inspection.js +1 -1
- package/dist/queries/source-search.d.ts +1 -1
- package/dist/queries/source-search.js +1 -1
- package/dist/queries/stale-abstractions.d.ts +1 -1
- package/dist/queries/stale-abstractions.js +1 -1
- package/dist/queries/stats.d.ts +1 -1
- package/dist/queries/surface.d.ts +1 -1
- package/dist/queries/surface.js +1 -1
- package/dist/queries/symbols.d.ts +1 -1
- package/dist/queries/symbols.js +1 -1
- package/dist/queries/system-map.d.ts +1 -1
- package/dist/queries/system-map.js +1 -1
- package/dist/queries/system.d.ts +1 -1
- package/dist/queries/system.js +1 -1
- package/dist/queries/test-quality.d.ts +1 -1
- package/dist/queries/test-quality.js +1 -1
- package/dist/queries/trace.d.ts +1 -1
- package/dist/queries/trace.js +1 -1
- package/dist/queries/twin-ab.d.ts +1 -1
- package/dist/queries/twin-ab.js +1 -1
- package/dist/queries/twin-drift.d.ts +1 -1
- package/dist/queries/twin-drift.js +1 -1
- package/dist/queries/unused-imports.d.ts +1 -1
- package/dist/queries/unused-imports.js +1 -1
- package/dist/queries/unused-params.d.ts +1 -1
- package/dist/queries/unused-params.js +1 -1
- package/dist/queries/value-flow.d.ts +2 -2
- package/dist/queries/value-flow.js +1 -1
- package/dist/queries/vue-component-duplicates.d.ts +1 -1
- package/dist/queries/vue-component-duplicates.js +1 -1
- package/dist/queries/vue-composable-candidates.d.ts +1 -1
- package/dist/queries/vue-composable-candidates.js +1 -1
- package/dist/queries/vue-large-view-pressure.d.ts +1 -1
- package/dist/queries/vue-large-view-pressure.js +1 -1
- package/dist/queries/wrapper-candidates.d.ts +1 -1
- package/dist/queries/wrapper-candidates.js +1 -1
- package/dist/reindex-worker.js +2 -2
- package/dist/reindex.d.ts +2 -4
- package/dist/reindex.js +71 -32
- package/dist/runtime.d.ts +1 -2
- package/dist/runtime.js +3 -3
- package/dist/rust-semantic-session-server.js +1 -1
- package/dist/rust-semantic-session-worker.js +1 -1
- package/dist/rust-semantic-worker.js +1 -1
- package/dist/sentinel-ensure-command-H66AZ3VE.js +2 -0
- package/dist/sentinel-ensure-command-R4YAUCJB.js +3 -0
- package/dist/sentinel-worker.js +1 -1
- package/dist/typescript-mailbox-worker.js +1 -1
- package/dist/watch-server.js +2 -2
- package/docs/INDEX_GENERATIONS.md +2 -2
- package/docs/NPM_RELEASE.md +323 -0
- package/docs/schemas/npm-release-state.schema.json +4 -13
- package/package.json +3 -11
- package/dist/chunk-2Q2LW5JW.js +0 -14
- package/dist/chunk-327YK6TB.js +0 -4
- package/dist/chunk-347TXATM.js +0 -2
- package/dist/chunk-36WRYYTE.js +0 -3
- package/dist/chunk-5IO2APSS.js +0 -2
- package/dist/chunk-6OAHRI2D.js +0 -6
- package/dist/chunk-6URCE5QY.js +0 -2
- package/dist/chunk-6ZV5EDUT.js +0 -5
- package/dist/chunk-7R64XY4Y.js +0 -12
- package/dist/chunk-CANBLFVQ.js +0 -15
- package/dist/chunk-CCRZLRWJ.js +0 -2
- package/dist/chunk-G2XUZCF2.js +0 -88
- package/dist/chunk-H5QXP63L.js +0 -2
- package/dist/chunk-HCMQZPEO.js +0 -2
- package/dist/chunk-IEL6Q5W3.js +0 -308
- package/dist/chunk-IGQQUENU.js +0 -109
- package/dist/chunk-K2O7SBAU.js +0 -2
- package/dist/chunk-QVWDQTMG.js +0 -2
- package/dist/chunk-RJWAB4VR.js +0 -345
- package/dist/chunk-VCL7FK3E.js +0 -3
- package/dist/chunk-WOOTEWQT.js +0 -239
- package/dist/chunk-XYLV727H.js +0 -21
- package/dist/chunk-YMGZZEW4.js +0 -2
- package/dist/direct-navigation-B3SGOOBW.js +0 -2
- package/dist/direct-navigation-ZL362KXF.js +0 -3
- package/dist/invocation-command-descriptors-CSUGUHTT.js +0 -2
- package/dist/invocation-command-descriptors-PPVZOIE5.js +0 -3
- package/dist/output-continuation-command-FTVVBVSN.js +0 -2
- package/dist/output-continuation-command-ITPRC3YV.js +0 -3
- package/dist/project-reindex-7HZSLLLY.js +0 -3
- package/dist/project-reindex-NGM3DYBN.js +0 -2
- package/dist/sentinel-ensure-command-KYYULCFU.js +0 -2
- package/dist/sentinel-ensure-command-RIZA3RY7.js +0 -3
- package/docs/WINDOWS_SIDECAR_RELEASE.md +0 -424
- package/docs/schemas/windows-sidecar-provenance.schema.json +0 -137
- package/scripts/build-codebaseiq-windows.mjs +0 -197
- package/scripts/codebaseiq-windows-provenance.mjs +0 -364
- package/scripts/verify-codebaseiq-windows.mjs +0 -29
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{d as ee,f as ne}from"./chunk-
|
|
1
|
+
import{d as ee,f as ne}from"./chunk-ILGTMRMZ.js";import{a as J,b as se,d as W,e as Z,f as H}from"./chunk-BGGB5N53.js";import{h as re}from"./chunk-GQLDYCWS.js";import{a as G}from"./chunk-J7AMBVWF.js";import{f as Y}from"./chunk-F74LZWCE.js";import{C as ae}from"./chunk-ICUL7XRT.js";import{x as X}from"./chunk-7GAK2F3H.js";var he=16,Se=4,Le=3e3,be=800,ve=new Set(["assignment","const_declaration","const_item","field_declaration","lexical_declaration","local_declaration_statement","local_variable_declaration","static_item","variable_declaration"]);function Xe(t,n,r={}){let c=r.maxSteps??he;if(!Number.isSafeInteger(c)||c<=0)throw new RangeError(`maxSteps must be a positive safe integer; received ${c}`);let g=new Map(n.nodes.map(e=>[e.id,e])),f=we(r.focusLocations??[]),s=new Set,d=new Map(n.edges.map(e=>[e.id,e])),u=O(n.paths.flatMap(e=>e.nodeIds)),h=O(n.anchors.filter(e=>e.status==="matched").flatMap(e=>e.nodeIds)),v=n.nodes.filter(e=>e.disposition==="emitted"&&e.attributes.upstreamCausalPath===!0).sort((e,L)=>Number(L.attributes.upstreamCausalDistance??0)-Number(e.attributes.upstreamCausalDistance??0)||e.id.localeCompare(L.id)).map(e=>e.id),a=new Set(v),y=Math.max(0,c-h.length),w=Ne(n,h,f,y).slice(0,y),k=new Set(w),P=new Set(w),b=new Set([...u,...v,...h]),l=n.edges.filter(e=>e.disposition==="emitted"&&e.kind!=="structural-membership"),p=n.edges.filter(e=>e.disposition!=="excluded"&&e.disposition!=="unsupported"&&e.kind!=="structural-membership"),x=new Set([...n.paths.flatMap(e=>e.edgeIds),...l.filter(e=>a.has(e.fromNodeId)&&a.has(e.toNodeId)).map(e=>e.id)]),C=n.paths.some(e=>e.edgeIds.length>0),N=new Set(h);for(let e of w)N.add(e);for(let e of n.paths){let L=e.nodeIds[0],I=d.get(e.edgeIds[0]??""),$=e.nodeIds[1];L&&$&&I?.fromNodeId===L&&I.toNodeId===$&&N.add(L)}if(n.paths.every(e=>e.nodeIds.length===0))for(let e of n.anchors)for(let L of e.nodeIds)N.add(L);let R=ke(h,p,g,Se),E=O(l.filter(e=>e.kind==="call"&&h.includes(e.fromNodeId)).map(e=>e.toNodeId)),S=new Set(O([...R,...C?[]:E]));for(let e of S)N.add(e);let T=O(l.flatMap(e=>b.has(e.fromNodeId)||b.has(e.toNodeId)?[e.fromNodeId,e.toNodeId]:[])),_=n.nodes.filter(e=>e.disposition==="emitted"&&e.kind!=="structural-region"&&l.some(L=>L.fromNodeId===e.id||L.toNodeId===e.id)).map(e=>e.id),A=O([...v,...u,...h,...w,...S,...T,..._]).filter(e=>g.has(e)),F=[];for(let e of A)C&&!b.has(e)&&!k.has(e)&&!S.has(e)||F.length>=c&&!b.has(e)||F.push(e);let o=new Set(F),i=new Map(F.map(e=>[e,Pe(e)])),m=new Set([...u,...v]),j=new Set(n.anchors.flatMap(e=>e.nodeIds)),D=F.map((e,L)=>{let I=g.get(e),$=Ee(I,f);for(let z of $)s.add(V(I.location.file,z));return{id:i.get(e),nodeId:e,order:L,role:j.has(e)?"anchor":m.has(e)?"connector":"junction",kind:I.kind,label:I.label,location:I.location,behavior:Ie(t,I,j.has(e),[...new Set([...$,...Ce(t,I,p,g,x,N)])],$,N.has(I.id)&&($.length===0||j.has(I.id)),S.has(I.id),P.has(I.id)&&$.length===0)}}),U=new Map;for(let e of n.paths)for(let L=0;L<e.edgeIds.length;L+=1){let I=d.get(e.edgeIds[L]),$=e.nodeIds[L],z=e.nodeIds[L+1];!I||!$||!z||U.set(I.id,I.fromNodeId===$&&I.toNodeId===z?"forward":"reverse")}let B=p.filter(e=>o.has(e.fromNodeId)&&o.has(e.toNodeId)).sort((e,L)=>_e(e,L,n)).map((e,L)=>({id:Ae(e.id),edgeId:e.id,order:L,kind:e.kind,fromStepId:i.get(e.fromNodeId),toStepId:i.get(e.toNodeId),directed:!0,pathTraversal:U.get(e.id)??"adjacent",evidence:e.evidence})),q=new Map(B.map(e=>[e.edgeId,e.id])),K=n.paths.map(e=>({id:e.id,status:e.status,stepIds:e.nodeIds.flatMap(L=>{let I=i.get(L);return I?[I]:[]}),transitionIds:e.edgeIds.flatMap(L=>{let I=q.get(L);return I?[I]:[]})})),oe=D.flatMap(e=>e.location?[`${e.location.file}:${e.location.line+1}`]:[]),me=n.anchors.some(e=>e.status==="ambiguous"),ge=K.some(e=>e.status==="connected"||e.status==="candidate"),ie=K.some(e=>e.status==="partial");return{status:D.length===0?"unavailable":me?"ambiguous":ge&&!ie?"connected":ie?"partial":"connected",steps:D,transitions:B,paths:K,coverage:{candidateNodes:A.length,returnedNodes:F.length,omittedNodeIds:A.filter(e=>!o.has(e)),returnedTransitions:B.length,withheldStatements:D.reduce((e,L)=>e+(L.behavior?.coverage.omittedStatements??0),0),requestedFocusLocations:f,matchedFocusLocations:f.filter(e=>s.has(V(e.file,e.line))),unmatchedFocusLocations:f.filter(e=>!s.has(V(e.file,e.line)))},behaviorCommand:pe(oe,"behavior"),exactSourceCommand:pe(oe,"source")}}function Ne(t,n,r,c){if(c<=0||r.length===0)return[];let g=new Set(n),f=new Set(r.map(s=>V(s.file,s.line)));return O(t.edges.filter(s=>s.disposition!=="excluded"&&s.disposition!=="unsupported"&&["call","runtime-boundary"].includes(s.kind)&&g.has(s.fromNodeId)&&s.evidence.some(d=>!["candidate","unknown"].includes(d.strength)&&d.location&&f.has(V(d.location.file,d.location.line)))).sort((s,d)=>{let u=s.evidence.find(v=>v.location)?.location,h=d.evidence.find(v=>v.location)?.location;return(u?.file??"").localeCompare(h?.file??"")||(u?.line??Number.MAX_SAFE_INTEGER)-(h?.line??Number.MAX_SAFE_INTEGER)||s.id.localeCompare(d.id)}).map(s=>s.toNodeId)).slice(0,c)}function Ie(t,n,r,c,g,f,s,d){if(!n.location||!["symbol","source-construct","runtime-boundary-participant"].includes(n.kind))return null;let u=n.location.endLine??n.location.line,h=X(t,n.location.file),v=c.length>0?c:[n.location.line],a=n.kind==="runtime-boundary-participant"?W(t,n.location.file,0,Math.max(0,h.length-1),[n.location.line]):W(t,n.location.file,n.location.line,u,v),y=c.filter(S=>S>=a.startLine&&S<=a.endLine),M=J(t,n.location.file,a.startLine,a.endLine,y),w=M??(y.length>0?J(t,n.location.file,a.startLine,a.endLine,y,{requireSavings:!1}):null),k=y.length>0?Te(t,n,a.startLine,a.endLine,y,w,f):null,P=h.slice(a.startLine,a.endLine+1).join(`
|
|
2
2
|
`).length,b=H(t,n.location.file,a.startLine,a.endLine),l=h.slice(a.startLine,a.endLine+1).some((S,T)=>S.length>be&&(b.get(a.startLine+T)??[]).some(_=>["binding","branch","loop","call","return","throw","mutation"].includes(_))),p=S=>ye(t,n,a.startLine,a.endLine,g.filter(T=>T>=a.startLine&&T<=a.endLine),S),x=(s||n.kind==="runtime-boundary-participant"||n.anchorIds.length>0)&&P<=Le,C=r&&(y.length===0||x);if(M&&(d||C))return p(ce(M));if(!d&&!C&&k&&!l&&!x&&k.renderedCharacters<(w?.outlineCharacters??P))return p(k);if(M)return p(ce(M));let N=h.slice(a.startLine,a.endLine+1),R=N.join(`
|
|
3
3
|
`),E=H(t,n.location.file,a.startLine,a.endLine);return p({kind:"source",constructKind:"source construct",signature:N.find(S=>S.trim().length>0)?.trim()??n.label,lines:N.map((S,T)=>({line:a.startLine+T,endLine:a.startLine+T,depth:0,signals:E.get(a.startLine+T)??[],text:S,copied:!0})),coverage:{sourceStatements:N.length,representedStatements:N.length,copiedStatements:N.length,omittedStatements:0},rawCharacters:R.length,renderedCharacters:R.length})}function ye(t,n,r,c,g,f){if(!n.location)return f;let s=ee(t,n.location.file,r,c);if(!s.available)return f;let d=H(t,n.location.file,r,c),u=X(t,n.location.file),h=new Set(g);for(let l of g){let p=Q(u[l]??"");if(!p)continue;let x=G(t,n.location.file,p).find(C=>C>l&&C<=c);x!==void 0&&h.add(x)}let v=[...new Map(s.targets.flatMap(l=>{let p=l.definition,x=p.relativePath===n.location.file&&p.startLine<=c&&p.endLine>=r;if(p.isTypeLike||x)return[];let C=ne(t,p),N=g.length>0&&C&&d.get(l.sourceLine)?.includes("return"),R=C&&h.has(l.sourceLine);return C&&!N&&!R?[]:[[p.symbol,{definition:p,kind:N?"return-value-transformer":R?"focused-causal-target":"compiler-referenced-declaration"}]]})).values()].sort((l,p)=>l.definition.relativePath.localeCompare(p.definition.relativePath)||l.definition.startLine-p.definition.startLine||l.definition.symbol.localeCompare(p.definition.symbol)),a=[],y=v.filter(({kind:l})=>l!=="compiler-referenced-declaration").map(({definition:l})=>({owner:l,depth:1})),M=new Set,w=new Set(v.map(({definition:l})=>l.symbol));for(;y.length>0;){let l=y.shift();if(!l||M.has(l.owner.symbol))continue;M.add(l.owner.symbol);let{owner:p,depth:x}=l,C=ee(t,p.relativePath,p.startLine,p.endLine);if(!C.available)continue;let N=H(t,p.relativePath,p.startLine,p.endLine),R=X(t,p.relativePath);for(let E of C.targets){let S=E.definition,T=S.relativePath===p.relativePath&&S.startLine<=p.endLine&&S.endLine>=p.startLine;if(S.isTypeLike||T)continue;let _=ne(t,S),A=Q(R[E.sourceLine]??""),F=_&&A!==null&&G(t,p.relativePath,A).some(i=>i>E.sourceLine&&i<=p.endLine&&(N.get(i)??[]).some(m=>["branch","return","throw"].includes(m))),o=_&&((N.get(E.sourceLine)??[]).some(i=>["branch","return","throw"].includes(i))||F);_&&!o||(w.has(S.symbol)||(w.add(S.symbol),a.push({definition:S,kind:_?"focused-causal-target":"compiler-referenced-declaration"})),_&&x<2&&y.push({owner:S,depth:x+1}))}}let k=[...new Map([...v,...a].map(l=>[l.definition.symbol,l])).values()].sort((l,p)=>l.definition.relativePath.localeCompare(p.definition.relativePath)||l.definition.startLine-p.definition.startLine||l.definition.symbol.localeCompare(p.definition.symbol)),P=[],b=[];for(let{definition:l,kind:p}of k){let x=p==="compiler-referenced-declaration"?xe(t,l.relativePath,l.startLine,l.endLine):{startLine:l.startLine,endLine:l.endLine},C=X(t,l.relativePath).slice(x.startLine,x.endLine+1).join(`
|
|
4
4
|
`),N=p==="compiler-referenced-declaration"?null:J(t,l.relativePath,l.startLine,l.endLine,[]),R=N?[N.signature,...N.lines.map(A=>`${A.line+1}${A.signals.length>0?`[${A.signals.join(",")}]`:""} ${A.text}`)].join(" | "):null,E=R&&R.length<C.length?R:C,S={symbol:l.symbol,label:l.leaf,file:l.relativePath,line:x.startLine,endLine:x.endLine},T=p==="compiler-referenced-declaration"?1e3:8e3,_=p==="compiler-referenced-declaration"?12:120;if(E.length>T||x.endLine-x.startLine>_){b.push({...S,reason:"source-too-large"});continue}P.push({kind:p,...S,text:E})}return{...f,...P.length===0?{}:{supportingDeclarations:P},...b.length===0?{}:{omittedSupportingDeclarations:b}}}function xe(t,n,r,c){let g=ae(t,n);if(!g)return{startLine:r,endLine:c};let f=[];fe(g.rootNode,d=>{ve.has(d.type)&&d.startPosition.row<=r&&d.endPosition.row>=c&&f.push(d)});let s=f.sort((d,u)=>d.endPosition.row-d.startPosition.row-(u.endPosition.row-u.startPosition.row)||d.endIndex-d.startIndex-(u.endIndex-u.startIndex))[0];return s?{startLine:s.startPosition.row,endLine:s.endPosition.row}:{startLine:r,endLine:c}}function fe(t,n){n(t);for(let r of t.namedChildren)fe(r,n)}function ce(t){return{kind:"outline",constructKind:t.constructKind,signature:t.signature,lines:t.lines,coverage:t.coverage,rawCharacters:t.rawCharacters,renderedCharacters:t.outlineCharacters}}function Ce(t,n,r,c,g,f){if(!n.location||!["symbol","source-construct","runtime-boundary-participant"].includes(n.kind))return[];let s=new Set,d=new Set(Y(t,n.location.file)?.callSites.map(u=>u.line)??[]);if(n.kind==="runtime-boundary-participant"&&s.add(n.location.line),f.has(n.id))for(let u of re(t,{files:[n.location.file]}))u.source.startLine>=n.location.line&&u.source.startLine<=(n.location.endLine??n.location.line)&&s.add(u.source.startLine);for(let u of r){if(u.fromNodeId!==n.id&&u.toNodeId!==n.id)continue;let h=c.get(u.fromNodeId===n.id?u.toNodeId:u.fromNodeId),v=f.has(n.id)&&["call","reference","runtime-boundary"].includes(u.kind)&&u.fromNodeId===n.id,a=(h?.anchorIds.length??0)>0;if(!g.has(u.id)&&!v&&!a)continue;let y=u.evidence.flatMap(b=>b.location?.file===n.location.file?[b.location.line]:[]),M=y.filter(b=>d.has(b));for(let b of M.length>0?M:y)s.add(b);let w=h?.attributes.leaf;if(typeof w!="string"||w.length===0)continue;let k=G(t,n.location.file,w).filter(b=>b>=n.location.line&&b<=(n.location.endLine??n.location.line)),P=k.find(b=>d.has(b))??k[0];P!==void 0&&s.add(P)}return[...s].sort((u,h)=>u-h)}function Ee(t,n){if(!t.location)return[];let r=t.location.endLine??t.location.line;return n.filter(c=>c.file===t.location.file&&c.line>=t.location.line&&c.line<=r).map(c=>c.line)}function we(t){let n=new Map;for(let r of t){if(!r.file||!Number.isSafeInteger(r.line)||r.line<0)throw new RangeError(`Behavior focus locations require a repository file and non-negative line; received ${JSON.stringify(r)}.`);n.set(V(r.file,r.line),{file:r.file,line:r.line})}return[...n.values()].sort((r,c)=>r.file.localeCompare(c.file)||r.line-c.line)}function V(t,n){return`${t}\0${n}`}function Te(t,n,r,c,g,f,s){if(!n.location)return null;let d=X(t,n.location.file),u=H(t,n.location.file,r,c),h=[...u].filter(([,o])=>o.length>0).map(([o])=>o).sort((o,i)=>o-i),v=g.map(o=>(u.get(o)??[]).length>0?o:h.find(i=>i>o&&i-o<=8)??o),a=new Set([...g,...v]),y=s?Z(t,n.location.file,r,c,{minimumBodyLines:0}):null,M=f?[...new Map(v.flatMap(o=>f.lines.filter(i=>i.text.length<=500&&i.signals.some(m=>["branch","loop","catch","finally"].includes(m))&&o>=i.line&&o<=i.endLine).sort((i,m)=>i.endLine-i.line-(m.endLine-m.line)||i.line-m.line).slice(0,2).map(i=>[`${i.line}\0${i.endLine}`,i]))).values()]:se(t,n.location.file,r,c,v);for(let o of y?.lines??[])a.add(o.line);for(let o of M)a.add(o.line);for(let[o,i]of u)i.includes("call")&&i.includes("shape")&&a.add(o);let w=[];for(let o of v){let i=Q(d[o]??"");if(!i)continue;let m=G(t,n.location.file,i).filter(B=>B>o&&B<=c),j=m[0];j!==void 0&&a.add(j);let D=m.find(B=>(u.get(B)??[]).some(q=>q==="branch"||q==="loop"));if(D===void 0)continue;a.add(D);let U=(f?.lines??[]).find(B=>B.line===D)??{line:D,endLine:Math.min(c,D+40),depth:0,signals:u.get(D)??[],text:(d[D]??"").trim(),copied:!0},te=f?.lines??d.slice(U.line,U.endLine+1).map((B,q)=>{let K=U.line+q;return{line:K,endLine:K,depth:0,signals:u.get(K)??[],text:B.trim(),copied:!0}});w.push({focusLine:o,governingUse:D,lines:te.filter(B=>B.line>=U.line&&B.line<=U.endLine&&B.text.length<=500&&B.signals.some(q=>["binding","branch","call","mutation"].includes(q)))})}for(let o of w.sort((i,m)=>m.governingUse-m.focusLine-(i.governingUse-i.focusLine)||i.focusLine-m.focusLine).slice(0,2))for(let i of o.lines.slice(0,14))a.add(i.line);let k=new Set(["binding","branch","loop","call","return","throw","mutation"]);for(let o of M)for(let i of f?.lines??[])i.line<o.line||i.line>o.endLine||i.signals.some(m=>k.has(m))&&a.add(i.line);let P=d.slice(r,c+1).flatMap((o,i)=>{let m=Q(o);return m?[{name:m,line:r+i}]:[]}),b=!0;for(;b;){b=!1;for(let o of P)if([...a].some(m=>Me(d[m]??"",o.name))){a.has(o.line)||(a.add(o.line),b=!0);for(let m of G(t,n.location.file,o.name))m<r||m>c||a.has(m)||(u.get(m)??[]).some(j=>k.has(j))&&(a.add(m),b=!0)}}for(let o of f?.lines??[])if(o.signals.some(i=>["branch","loop","catch","finally"].includes(i))&&a.has(o.line))for(let i of f?.lines??[])i.line<o.line||i.line>o.endLine||i.signals.some(m=>k.has(m))&&a.add(i.line);let l=Y(t,n.location.file),p=new Set(l?.callSites.map(o=>o.line)??[]),x=u,C=new Map([...f?.lines??[],...M].filter(o=>o.signals.some(i=>["branch","loop","catch","finally"].includes(i))).map(o=>[o.line,o])),N=new Map((f?.lines??[]).filter(o=>o.text.length<=500&&o.signals.includes("shape")&&(o.signals.includes("call")||o.signals.includes("mutation")||o.signals.includes("return"))).sort((o,i)=>o.endLine-o.line-(i.endLine-i.line)||o.line-i.line).map(o=>[o.line,o])),R=new Map((y?.lines??[]).map(o=>[o.line,o.signals.filter(i=>i!=="lifecycle")])),E=[...a].filter(o=>o>=r&&o<=c).sort((o,i)=>o-i).map(o=>{let i=C.get(o)??N.get(o);return{line:o,endLine:i?.endLine??o,depth:i?.depth??0,signals:Be([...x.get(o)??[],...f?.lines.filter(m=>o>=m.line&&o<=m.endLine).flatMap(m=>m.signals)??[],...R.get(o)??[],...g.includes(o)?["anchor"]:[],...p.has(o)?["call"]:[]]),text:i?.text??(d[o]??"").trim(),copied:i?.copied??!0}}).filter(o=>o.text.length>0);if(E.length===0)return null;let S=y?.candidateLines??Z(t,n.location.file,r,c,{minimumBodyLines:0})?.candidateLines??0,T=Math.max(f?.coverage.sourceStatements??0,S,E.length),_=f?.signature??(d[r]??n.label).trim(),A=_.length+E.reduce((o,i)=>o+i.text.length+i.signals.join(",").length+12,0),F=d.slice(r,c+1).join(`
|
|
5
5
|
`).length;return{kind:"connector-slice",constructKind:f?.constructKind??"source construct",signature:_,lines:E,coverage:{sourceStatements:T,representedStatements:E.length,copiedStatements:E.length,omittedStatements:Math.max(0,T-E.length)},rawCharacters:F,renderedCharacters:A}}function Be(t){let n=["anchor","signature","binding","branch","loop","call","await","return","throw","mutation","shape","spread","catch","finally"],r=new Set(t);return n.filter(c=>r.has(c))}function Q(t){return/\b(?:const|let|var)\s+([\p{L}_$][\p{L}\p{N}_$]*)\s*(?:=|\bof\b|\bin\b)/u.exec(t)?.[1]??null}function Me(t,n){let r=n.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&");return new RegExp(`(?:^|[^\\p{L}\\p{N}_$])${r}(?:$|[^\\p{L}\\p{N}_$])`,"u").test(t)}function Re(t,n,r){return O(t.flatMap(c=>{let g=r.get(c),f=n.filter(s=>s.kind==="call"&&s.toNodeId===c).map(s=>({edge:s,node:r.get(s.fromNodeId)})).filter(s=>s.node!==void 0&&["symbol","source-construct","runtime-boundary-participant"].includes(s.node.kind)&&s.node.location!==null).sort((s,d)=>{let u=le(d.edge)-le(s.edge);if(u!==0)return u;let h=de(s.node,g)?0:1,v=de(d.node,g)?0:1,a=(s.node.location?.endLine??s.node.location?.line??0)-(s.node.location?.line??0),y=(d.node.location?.endLine??d.node.location?.line??0)-(d.node.location?.line??0);return h-v||a-y||s.node.label.localeCompare(d.node.label)});return f[0]?[f[0].node.id]:[]}))}function le(t){let n={exact:4,mixed:3,derived:2,candidate:1,unknown:0};return Math.max(0,...t.evidence.map(r=>n[r.strength]))}function de(t,n){return!t.location||!n?.location?!1:ue(t.location.file)===ue(n.location.file)}function ue(t){return t.split("/").filter(Boolean).slice(0,2).join("/")}function ke(t,n,r,c){let g=new Set(t),f=new Set,s=[],d=O(t);for(let u=0;u<c&&d.length>0;u+=1){let h=d.filter(a=>!f.has(a));for(let a of h)f.add(a);let v=Re(h,n,r);d=[];for(let a of v)!g.has(a)&&!s.includes(a)&&s.push(a),f.has(a)||d.push(a)}return s}function _e(t,n,r){let c=new Map(r.paths.flatMap(g=>g.edgeIds).map((g,f)=>[g,f]));return(c.get(t.id)??Number.MAX_SAFE_INTEGER)-(c.get(n.id)??Number.MAX_SAFE_INTEGER)||t.id.localeCompare(n.id)}function Pe(t){return`step:${t}`}function Ae(t){return`transition:${t}`}function pe(t,n){return t.length===0?null:`codebaseiq inspect ${t.map(r=>`--at ${De(r)}`).join(" ")} --view ${n}`}function De(t){return`'${t.replace(/'/gu,`'"'"'`)}'`}function O(t){return[...new Set(t)]}export{Le as a,Xe as b};
|
|
6
|
-
//# sourceMappingURL=chunk-
|
|
6
|
+
//# sourceMappingURL=chunk-CYJS33YX.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{a as P,
|
|
2
|
-
`),t,"process lock"),t.syncFile(a)}catch(y){d=y}try{t.closeFile(a)}catch(y){d??=y}if(d!==void 0)throw j(c,t),d;try{t.linkFile(c,e)}catch(y){throw j(c,t),y}j(c,t);try{be(U(e),t)}catch(y){throw ye(e,s,t),y}let l=!1;return{path:e,record:s,release:()=>l?!1:(l=!0,ye(e,s,t))}}function ye(e,r,t=O){let n=R(e,{runtime:t});return n.state!=="valid"||!n.record||n.record.pid!==r.pid||n.record.token!==r.token||r.processIdentity&&(!n.record.processIdentity||!k(r.processIdentity,n.record.processIdentity))?!1:z(e,t)}function Ve(e,r){for(let t=0;t<2;t+=1)try{return fe(e,{kind:"reclaim-guard",runtime:r},r)}catch(n){if(n.code!=="EEXIST")return null;let i=R(e,{runtime:r});if(t>0||!K(i,r))return null;let o=R(e,{runtime:r});if(!pe(i,o)||!z(e,r))return null}return null}function K(e,r){if(e.state==="missing")return!1;if(e.owner){if(!r.isProcessAlive(e.owner.pid))return!0;if(!e.owner.processIdentity)return!1;let t=r.readProcessIdentity(e.owner.pid);return t!==null&&!k(e.owner.processIdentity,t)}return!1}function pe(e,r){return e.state===r.state&&e.raw===r.raw&&e.identity!==void 0&&r.identity!==void 0&&e.identity.dev===r.identity.dev&&e.identity.ino===r.identity.ino&&e.identity.size===r.identity.size&&e.identity.mtimeMs===r.identity.mtimeMs}function He(e){return{pid:e.pid,...e.processIdentity?{processIdentity:e.processIdentity}:{}}}function be(e,r){let t;try{t=r.openFile(e,"r")}catch(n){if($(n,process.platform))return;throw n}try{r.syncFile(t)}catch(n){if(!$(n,process.platform))throw n}finally{r.closeFile(t)}}function z(e,r){try{return r.removeFile(e),be(U(e),r),!0}catch{return!1}}function j(e,r){try{r.removeFile(e)}catch{}}import{randomUUID as sr}from"crypto";import{closeSync as cr,existsSync as ar,fsyncSync as dr,linkSync as lr,mkdirSync as ur,openSync as mr,renameSync as yr,unlinkSync as fr,writeSync as pr}from"fs";import{dirname as we}from"path";var Ye=Object.freeze(["EPERM","EACCES","EBUSY"]),Ge=Object.freeze([10,20,40,80,160,320,640,1e3,1e3,1e3]);function Qe(e){Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,e)}var X=Object.freeze({platform:process.platform,sleep:Qe});function Ze(e,r){if(r!=="win32")return!1;let t=e?.code;return typeof t=="string"&&Ye.includes(t)}function ge(e,r={}){let t=r.runtime??X,n=r.delaysMs??Ge;for(let i of n)try{return e()}catch(o){if(!Ze(o,t.platform))throw o;t.sleep(i)}return e()}import{chmodSync as er,constants as rr,copyFileSync as tr}from"fs";import{dirname as nr}from"path";var xe=Object.freeze({...
|
|
3
|
-
`:t}import{createHash as Y,randomUUID as Ae}from"crypto";import{existsSync as M,lstatSync as D,readdirSync as I,renameSync as G,rmSync as g}from"fs";import{basename as A,dirname as Q,join as m}from"path";function T(e){return Array.isArray(e)?`[${e.map(T).join(",")}]`:e&&typeof e=="object"?`{${Object.entries(e).sort(([r],[t])=>r.localeCompare(t)).map(([r,t])=>`${JSON.stringify(r)}:${T(t)}`).join(",")}}`:JSON.stringify(e)}var Z=1,br=Object.freeze({maxItems:1024,maxBytes:512*1024*1024,maxItemBytes:64*1024*1024,maxBatch:16,claimLeaseMs:5*6e4,responseRetentionMs:10*6e4,deadLetterRetentionMs:1440*6e4,temporaryRetentionMs:6e4,cleanupBatch:64}),x=class extends Error{constructor(t,n,i,o){let s=t==="item-too-large"?`request is ${o} bytes; per-item limit is ${i.maxItemBytes}`:t==="item-capacity"?`mailbox has ${n.totalItems} retained items; limit is ${i.maxItems}`:t==="byte-capacity"?`mailbox retains ${n.totalBytes} bytes and the request adds ${o}; limit is ${i.maxBytes}`:"another writer held the admission coordinator through the bounded wait";super(`Mailbox backpressure: ${s}. Retry after the service drains or expires retained work.`);this.code=t;this.status=n;this.limits=i;this.attemptedBytes=o;this.name="MailboxBackpressureError"}code;status;limits;attemptedBytes},Ee=".owner.json",ee={isProcessAlive:()=>!0,readProcessIdentity:()=>null};function pt(e){return{rootDir:e,pendingDir:m(e,"pending"),inflightDir:m(e,"inflight"),responseDir:m(e,"responses"),deadLetterDir:m(e,"dead-letter"),legacyRequestDir:m(e,"requests")}}function S(e={}){let r={...br,...e};for(let[t,n]of Object.entries(r))if(!Number.isFinite(n)||n<=0||!Number.isInteger(n))throw new Error(`Mailbox limit ${t} must be a positive integer.`);return r}function C(e){let r=[e.pendingDir,e.inflightDir,e.responseDir,e.deadLetterDir,e.legacyRequestDir].map(t=>w(t));return b(...r)}function bt(e,r){return Y("sha256").update(T({namespace:e,payload:r})).digest("hex")}function gr(e){if(!/^[a-f0-9]{64}$/.test(e))throw new Error("Mailbox operation keys must be lowercase SHA-256 identities.");return`op-${e}`}function gt(e,r,t={}){let n=S(t.limits),i=t.nowMs??Date.now(),o=C(e);return Sr(r),te(e,n,t.admissionLockTimeoutMs??2e3,t.monotonicNow??
|
|
4
|
-
`,l=Buffer.byteLength(d),y=q(e);if(l>n.maxItemBytes)throw new x("item-too-large",y,n,l);if(y.totalItems+1>n.maxItems)throw new x("item-capacity",y,n,l);if(y.totalBytes+l>n.maxBytes)throw new x("byte-capacity",y,n,l);t.onBeforePublish?.();try{let u=N(s,d,{durability:"durable"}),p=b(o,u.directorySync);return{disposition:"accepted",requestId:r.id,responsePath:c,authoritativeDeadlineAtMs:r.deadlineAtMs,achievedDurability:p==="synced"?"directory-durable":"file-flushed",directorySync:p}}catch(u){if(u.code!=="EEXIST")throw u;let p=Ie(e,r.id);if(!p)throw u;let v=ke(p,r.operationKey,r.id);return{disposition:"duplicate",requestId:r.id,responsePath:c,authoritativeDeadlineAtMs:v.deadlineAtMs??r.deadlineAtMs}}})}function xr(e,r){if(!r.ownerId.trim())throw new Error("Mailbox claim owner identity is required.");if(r.owner&&(!Number.isSafeInteger(r.owner.pid)||r.owner.pid<=0||r.owner.processIdentity!==void 0&&r.owner.processIdentity.pid!==r.owner.pid))throw new Error("Mailbox claim process identity is invalid.");let t=r.nowMs??Date.now(),n=S(r.limits),i=C(e);try{return te(e,n,2e3,r.monotonicNow??
|
|
1
|
+
import{a as P,c as B,d as k,e as ue}from"./chunk-6O3KXIDL.js";import{e as ae,g as de,h as F,s as L,t as $,u as le,v as w,w as f,x as b}from"./chunk-UQYQBLJX.js";function me(e){try{return process.kill(e,0),!0}catch(r){return typeof r=="object"&&r!==null&&"code"in r&&r.code==="EPERM"}}import{randomUUID as _e}from"crypto";import{closeSync as Ce,fsyncSync as qe,linkSync as $e,mkdirSync as je,openSync as Je,statSync as We,unlinkSync as Ke,writeSync as Ue}from"fs";import{dirname as U}from"path";var J="codebaseiq-process-lock",W=1,O=Object.freeze({wallNow:()=>Date.now(),isProcessAlive:me,readProcessIdentity:ue,randomToken:()=>_e(),makeDirectory:e=>je(e,{recursive:!0}),openFile:(e,r,t)=>Je(e,r,t),writeFile:(e,r,t,n)=>Ue(e,r,t,n),syncFile:e=>qe(e),closeFile:e=>Ce(e),linkFile:(e,r)=>$e(e,r),readFile:e=>F(e,"process lock record"),statFile:e=>{let r=We(e);return{dev:r.dev,ino:r.ino,size:r.size,mtimeMs:r.mtimeMs}},removeFile:e=>Ke(e)});function $r(e,r){let t=r.runtime??O;t.makeDirectory(U(e));let n;for(let i=0;i<2;i+=1)try{return{kind:"acquired",lock:fe(e,r,t),...n?{reclaimed:n}:{}}}catch(o){if(o.code!=="EEXIST")throw o;let s=R(e,{parseLegacy:r.parseLegacy,runtime:t});if(i===0&&Xe(e,s,{creationGraceMs:r.creationGraceMs,parseLegacy:r.parseLegacy,runtime:t})){n=s;continue}return{kind:"contended",observation:s}}return{kind:"contended",observation:R(e,{parseLegacy:r.parseLegacy,runtime:t})}}function R(e,r={}){let t=r.runtime??O,n,i;try{n=t.statFile(e),i=t.readFile(e)}catch(a){return a.code==="ENOENT"?{state:"missing"}:{state:"malformed"}}let o;try{o=JSON.parse(i)}catch{return{state:"malformed",raw:i,identity:n}}let s=ze(o);if(s)return{state:"valid",raw:i,identity:n,record:s,owner:He(s),parsed:o};let c=r.parseLegacy?.(o)??null;return c?{state:"legacy",raw:i,identity:n,owner:c,parsed:o}:{state:"malformed",raw:i,identity:n,parsed:o}}function ze(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let r=e;if(r.protocol!==J||r.version!==W||typeof r.kind!="string"||r.kind.trim()===""||typeof r.pid!="number"||!Number.isSafeInteger(r.pid)||r.pid<=0||typeof r.token!="string"||r.token.trim()===""||typeof r.startedAt!="string"||!Number.isFinite(Date.parse(r.startedAt))||r.detail!==void 0&&(typeof r.detail!="object"||r.detail===null||Array.isArray(r.detail)))return null;let t=r.processIdentity===void 0?null:B(r.processIdentity);return r.processIdentity!==void 0&&(!t||t.pid!==r.pid)?null:{protocol:J,version:W,kind:r.kind,pid:r.pid,token:r.token,...t?{processIdentity:t}:{},startedAt:r.startedAt,...r.detail?{detail:r.detail}:{}}}function Xe(e,r,t={}){let n=t.runtime??O;if(!K(r,n))return!1;let i=Ve(`${e}.reclaim`,n);if(!i)return!1;try{let o=R(e,{parseLegacy:t.parseLegacy,runtime:n});return!pe(r,o)||!K(o,n)?!1:z(e,n)}finally{i.release()}}function fe(e,r,t){let n=r.pid??process.pid,i=t.randomToken(),o=r.processIdentity===void 0?t.readProcessIdentity(n):r.processIdentity,s={protocol:J,version:W,kind:r.kind,pid:n,token:i,...o?{processIdentity:o}:{},startedAt:new Date(t.wallNow()).toISOString(),...r.detail?{detail:r.detail}:{}},c=`${e}.${i}.candidate`,a=t.openFile(c,"wx",384),d;try{L(a,Buffer.from(`${JSON.stringify(s)}
|
|
2
|
+
`),t,"process lock"),t.syncFile(a)}catch(y){d=y}try{t.closeFile(a)}catch(y){d??=y}if(d!==void 0)throw j(c,t),d;try{t.linkFile(c,e)}catch(y){throw j(c,t),y}j(c,t);try{be(U(e),t)}catch(y){throw ye(e,s,t),y}let l=!1;return{path:e,record:s,release:()=>l?!1:(l=!0,ye(e,s,t))}}function ye(e,r,t=O){let n=R(e,{runtime:t});return n.state!=="valid"||!n.record||n.record.pid!==r.pid||n.record.token!==r.token||r.processIdentity&&(!n.record.processIdentity||!k(r.processIdentity,n.record.processIdentity))?!1:z(e,t)}function Ve(e,r){for(let t=0;t<2;t+=1)try{return fe(e,{kind:"reclaim-guard",runtime:r},r)}catch(n){if(n.code!=="EEXIST")return null;let i=R(e,{runtime:r});if(t>0||!K(i,r))return null;let o=R(e,{runtime:r});if(!pe(i,o)||!z(e,r))return null}return null}function K(e,r){if(e.state==="missing")return!1;if(e.owner){if(!r.isProcessAlive(e.owner.pid))return!0;if(!e.owner.processIdentity)return!1;let t=r.readProcessIdentity(e.owner.pid);return t!==null&&!k(e.owner.processIdentity,t)}return!1}function pe(e,r){return e.state===r.state&&e.raw===r.raw&&e.identity!==void 0&&r.identity!==void 0&&e.identity.dev===r.identity.dev&&e.identity.ino===r.identity.ino&&e.identity.size===r.identity.size&&e.identity.mtimeMs===r.identity.mtimeMs}function He(e){return{pid:e.pid,...e.processIdentity?{processIdentity:e.processIdentity}:{}}}function be(e,r){let t;try{t=r.openFile(e,"r")}catch(n){if($(n,process.platform))return;throw n}try{r.syncFile(t)}catch(n){if(!$(n,process.platform))throw n}finally{r.closeFile(t)}}function z(e,r){try{return r.removeFile(e),be(U(e),r),!0}catch{return!1}}function j(e,r){try{r.removeFile(e)}catch{}}import{randomUUID as sr}from"crypto";import{closeSync as cr,existsSync as ar,fsyncSync as dr,linkSync as lr,mkdirSync as ur,openSync as mr,renameSync as yr,unlinkSync as fr,writeSync as pr}from"fs";import{dirname as we}from"path";var Ye=Object.freeze(["EPERM","EACCES","EBUSY"]),Ge=Object.freeze([10,20,40,80,160,320,640,1e3,1e3,1e3]);function Qe(e){Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,e)}var X=Object.freeze({platform:process.platform,sleep:Qe});function Ze(e,r){if(r!=="win32")return!1;let t=e?.code;return typeof t=="string"&&Ye.includes(t)}function ge(e,r={}){let t=r.runtime??X,n=r.delaysMs??Ge;for(let i of n)try{return e()}catch(o){if(!Ze(o,t.platform))throw o;t.sleep(i)}return e()}import{chmodSync as er,constants as rr,copyFileSync as tr}from"fs";import{dirname as nr}from"path";var xe=Object.freeze({...le,copyFile:(e,r)=>tr(e,r,rr.COPYFILE_FICLONE),chmodFile:(e,r)=>er(e,r)});function ir(e,r,t={}){let n=t.runtime??xe,i=nr(r),o=w(i,n);if(n.copyFile(e,r),n.platform==="win32")or(r,t.mode,n);else{t.mode!==void 0&&n.chmodFile(r,t.mode);let s=n.openFile(r,"r");try{n.syncFile(s)}finally{n.closeFile(s)}}return b(o,f(i,n))}function or(e,r,t){let n=!1,i;try{i=t.openFile(e,"r+")}catch(o){let s=o.code;if(s!=="EACCES"&&s!=="EPERM")throw o;t.chmodFile(e,384),n=!0,i=t.openFile(e,"r+")}try{t.syncFile(i)}finally{t.closeFile(i)}r!==void 0?t.chmodFile(e,r):n&&t.chmodFile(e,292)}var Me=Object.freeze({platform:process.platform,randomToken:()=>sr(),pathExists:e=>ar(e),makeDirectory:e=>ur(e,{recursive:!0}),openFile:(e,r,t)=>mr(e,r,t),writeFile:(e,r,t,n)=>pr(e,r,t,n),syncFile:e=>dr(e),closeFile:e=>cr(e),renameFile:(e,r)=>yr(e,r),linkFile:(e,r)=>lr(e,r),removeFile:e=>fr(e)});function V(e,r,t={}){let n=t.durability??"visibility",i=t.runtime??Me,o=we(e),s=n==="durable"?w(o,i):(i.makeDirectory(o),"not-requested"),c=`${e}.tmp-${i.randomToken()}`,a=typeof r=="string"?Buffer.from(r):r,d,l=!1;try{d=i.openFile(c,"wx",t.mode??384),l=!0,L(d,a,i,"atomic file"),n==="durable"&&i.syncFile(d),i.closeFile(d),d=void 0,ge(()=>i.renameFile(c,e),{runtime:{platform:i.platform,sleep:i.sleep??X.sleep}}),l=!1;let y=n==="durable"?b(s,f(o,i)):"not-requested";return Fe(n,y)}finally{if(d!==void 0)try{i.closeFile(d)}catch{}if(l)try{i.removeFile(c)}catch{}}}function N(e,r,t={}){let n=t.durability??"visibility",i=t.runtime??Me;if(!i.linkFile)throw new Error("Exclusive atomic file publication requires hard-link support.");let o=we(e),s=n==="durable"?w(o,i):(i.makeDirectory(o),"not-requested"),c=`${e}.tmp-${i.randomToken()}`,a=typeof r=="string"?Buffer.from(r):r,d,l=!1;try{d=i.openFile(c,"wx",t.mode??384),l=!0,L(d,a,i,"exclusive atomic file"),n==="durable"&&i.syncFile(d),i.closeFile(d),d=void 0,i.linkFile(c,e);let y=n==="durable"?f(o,i):"not-requested";i.removeFile(c),l=!1;let u=n==="durable"?b(s,y,f(o,i)):"not-requested";return Fe(n,u)}finally{if(d!==void 0)try{i.closeFile(d)}catch{}if(l)try{i.removeFile(c)}catch{}}}function Fe(e,r){return{requestedDurability:e,achievedDurability:e==="visibility"?"visibility":r==="synced"?"directory-durable":"file-flushed",directorySync:r}}function nt(e,r,t={}){V(e,he(r,t),{durability:"visibility",runtime:t.runtime})}function H(e,r,t={}){return V(e,he(r,t),{durability:"durable",runtime:t.runtime})}function he(e,r){let t=JSON.stringify(e,null,r.spacing);return r.trailingNewline?`${t}
|
|
3
|
+
`:t}import{createHash as Y,randomUUID as Ae}from"crypto";import{existsSync as M,lstatSync as D,readdirSync as I,renameSync as G,rmSync as g}from"fs";import{basename as A,dirname as Q,join as m}from"path";function T(e){return Array.isArray(e)?`[${e.map(T).join(",")}]`:e&&typeof e=="object"?`{${Object.entries(e).sort(([r],[t])=>r.localeCompare(t)).map(([r,t])=>`${JSON.stringify(r)}:${T(t)}`).join(",")}}`:JSON.stringify(e)}var Z=1,br=Object.freeze({maxItems:1024,maxBytes:512*1024*1024,maxItemBytes:64*1024*1024,maxBatch:16,claimLeaseMs:5*6e4,responseRetentionMs:10*6e4,deadLetterRetentionMs:1440*6e4,temporaryRetentionMs:6e4,cleanupBatch:64}),x=class extends Error{constructor(t,n,i,o){let s=t==="item-too-large"?`request is ${o} bytes; per-item limit is ${i.maxItemBytes}`:t==="item-capacity"?`mailbox has ${n.totalItems} retained items; limit is ${i.maxItems}`:t==="byte-capacity"?`mailbox retains ${n.totalBytes} bytes and the request adds ${o}; limit is ${i.maxBytes}`:"another writer held the admission coordinator through the bounded wait";super(`Mailbox backpressure: ${s}. Retry after the service drains or expires retained work.`);this.code=t;this.status=n;this.limits=i;this.attemptedBytes=o;this.name="MailboxBackpressureError"}code;status;limits;attemptedBytes},Ee=".owner.json",ee={isProcessAlive:()=>!0,readProcessIdentity:()=>null};function pt(e){return{rootDir:e,pendingDir:m(e,"pending"),inflightDir:m(e,"inflight"),responseDir:m(e,"responses"),deadLetterDir:m(e,"dead-letter"),legacyRequestDir:m(e,"requests")}}function S(e={}){let r={...br,...e};for(let[t,n]of Object.entries(r))if(!Number.isFinite(n)||n<=0||!Number.isInteger(n))throw new Error(`Mailbox limit ${t} must be a positive integer.`);return r}function C(e){let r=[e.pendingDir,e.inflightDir,e.responseDir,e.deadLetterDir,e.legacyRequestDir].map(t=>w(t));return b(...r)}function bt(e,r){return Y("sha256").update(T({namespace:e,payload:r})).digest("hex")}function gr(e){if(!/^[a-f0-9]{64}$/.test(e))throw new Error("Mailbox operation keys must be lowercase SHA-256 identities.");return`op-${e}`}function gt(e,r,t={}){let n=S(t.limits),i=t.nowMs??Date.now(),o=C(e);return Sr(r),te(e,n,t.admissionLockTimeoutMs??2e3,t.monotonicNow??P,()=>{re(e,i,n);let s=m(e.pendingDir,`${r.id}.json`),c=m(e.responseDir,`${r.id}.json`),a=Ie(e,r.id);if(a){let u=ke(a,r.operationKey,r.id);return{disposition:"duplicate",requestId:r.id,responsePath:c,authoritativeDeadlineAtMs:u.deadlineAtMs??r.deadlineAtMs}}let d=`${JSON.stringify(r)}
|
|
4
|
+
`,l=Buffer.byteLength(d),y=q(e);if(l>n.maxItemBytes)throw new x("item-too-large",y,n,l);if(y.totalItems+1>n.maxItems)throw new x("item-capacity",y,n,l);if(y.totalBytes+l>n.maxBytes)throw new x("byte-capacity",y,n,l);t.onBeforePublish?.();try{let u=N(s,d,{durability:"durable"}),p=b(o,u.directorySync);return{disposition:"accepted",requestId:r.id,responsePath:c,authoritativeDeadlineAtMs:r.deadlineAtMs,achievedDurability:p==="synced"?"directory-durable":"file-flushed",directorySync:p}}catch(u){if(u.code!=="EEXIST")throw u;let p=Ie(e,r.id);if(!p)throw u;let v=ke(p,r.operationKey,r.id);return{disposition:"duplicate",requestId:r.id,responsePath:c,authoritativeDeadlineAtMs:v.deadlineAtMs??r.deadlineAtMs}}})}function xr(e,r){if(!r.ownerId.trim())throw new Error("Mailbox claim owner identity is required.");if(r.owner&&(!Number.isSafeInteger(r.owner.pid)||r.owner.pid<=0||r.owner.processIdentity!==void 0&&r.owner.processIdentity.pid!==r.owner.pid))throw new Error("Mailbox claim process identity is invalid.");let t=r.nowMs??Date.now(),n=S(r.limits),i=C(e);try{return te(e,n,2e3,r.monotonicNow??P,()=>wr(e,r.ownerId,t,n,r.liveness??ee,r.owner??{pid:process.pid},i,r.onClaimStage))}catch(o){if(o instanceof x&&o.code==="admission-busy")return[];throw o}}function xt(e,r){return!Se(e.pendingDir)&&!Se(e.legacyRequestDir)?[]:xr(e,r)}function wr(e,r,t,n,i,o,s,c){re(e,t,n,i);let a=m(e.inflightDir,_(r)),d=[...Re(e.pendingDir,!1),...Re(e.legacyRequestDir,!0)].sort((u,p)=>u.orderAtMs-p.orderAtMs||u.header.id.localeCompare(p.header.id)||u.path.localeCompare(p.path)),l=s;d.length>0&&(l=b(l,w(a)),c?.("after-owner-directory-durable"),Rr(a,r,o),c?.("after-owner-record-published"));let y=[];for(let u of d){if(y.length>=n.maxBatch)break;let p=m(e.responseDir,`${u.header.id}.json`);if(M(p)){g(u.path,{force:!0});continue}let v=Math.max(t+n.claimLeaseMs,(u.header.deadlineAtMs??t)+5e3),Be=`${_(u.originalFile)}.${v}.claim`,oe=m(a,Be);try{G(u.path,oe)}catch(se){let ce=se.code;if(ce==="ENOENT"||ce==="EEXIST")continue;throw se}c?.("after-claim-renamed");let Oe=f(Q(u.path));c?.("after-source-directory-synced");let Ne=f(a);c?.("after-destination-directory-synced");let Te=b(l,Oe,Ne);y.push({requestId:u.header.id,ownerId:r,path:oe,originalFile:u.originalFile,claimedAtMs:t,claimExpiresAtMs:v,byteLength:u.byteLength,...u.header.operationKey?{operationKey:u.header.operationKey}:{},...u.header.clientId?{clientId:u.header.clientId}:{},...u.header.enqueuedAtMs===void 0?{}:{enqueuedAtMs:u.header.enqueuedAtMs},...u.header.deadlineAtMs===void 0?{}:{deadlineAtMs:u.header.deadlineAtMs},legacy:u.legacy,directorySync:Te})}return y}function wt(e,r={}){let t=S(r);if(e.byteLength>t.maxItemBytes)throw new x("item-too-large",{pending:0,inflight:1,responses:0,deadLetters:0,invalid:0,totalItems:1,totalBytes:e.byteLength},t,e.byteLength);return de(e.path,{maxBytes:t.maxItemBytes,inputKind:"bounded mailbox item"})}function Mr(e,r,t,n={}){let i=n.nowMs??Date.now(),o=S(n.limits),s={...t,mailboxVersion:Z,operationKey:r.operationKey??`legacy-${r.requestId}`,clientId:r.clientId??"legacy",...r.deadlineAtMs===void 0?{}:{deadlineAtMs:r.deadlineAtMs},completedAtMs:i,expiresAtMs:i+o.responseRetentionMs},c=Buffer.byteLength(`${JSON.stringify(s)}
|
|
5
5
|
`),a=q(e);if(c>o.maxItemBytes)throw new x("item-too-large",a,o,c);let d=Math.max(0,a.totalBytes-r.byteLength)+c;if(d>o.maxBytes&&d>a.totalBytes)throw new x("byte-capacity",a,o,c);Fr(e,r,s),n.onAfterResponsePublished?.(),g(r.path,{force:!0});let l=Q(r.path);f(M(l)?l:e.inflightDir)}function Mt(e,r,t,n,i={}){let o=i.nowMs??Date.now(),s=S(i.limits);if(Mr(e,r,t,{...i,nowMs:o,limits:s}),!M(r.path)){let c=m(e.deadLetterDir,`${Er(r.requestId)}.${o}.${Y("sha256").update(n).digest("hex").slice(0,12)}.json`),a={mailboxVersion:Z,requestId:r.requestId,ownerId:r.ownerId,rejectedAtMs:o,reason:n,originalFile:r.originalFile},d=Buffer.byteLength(`${JSON.stringify(a,null,2)}
|
|
6
|
-
`),l=q(e);l.totalItems<s.maxItems&&l.totalBytes+d<=s.maxBytes&&H(c,a,{spacing:2,trailingNewline:!0})}}function Ft(e,r={}){let t=r.nowMs??Date.now(),n=S(r.limits);return C(e),te(e,n,2e3,r.monotonicNow??
|
|
6
|
+
`),l=q(e);l.totalItems<s.maxItems&&l.totalBytes+d<=s.maxBytes&&H(c,a,{spacing:2,trailingNewline:!0})}}function Ft(e,r={}){let t=r.nowMs??Date.now(),n=S(r.limits);return C(e),te(e,n,2e3,r.monotonicNow??P,()=>re(e,t,n,r.liveness??ee))}function re(e,r,t,n=ee){let i={reclaimed:0,completedClaimsRemoved:0,responsesRemoved:0,deadLettersRemoved:0,temporaryFilesRemoved:0},o=t.cleanupBatch;for(let s of ie(e.inflightDir)){if(o<=0)break;let c=m(e.responseDir,`${s.requestId}.json`);if(M(c)){g(s.path,{force:!0}),i.completedClaimsRemoved++,o--;continue}if(s.claimExpiresAtMs>r||Dr(e,s.ownerId,n)!=="dead")continue;let a=m(e.pendingDir,s.originalFile);try{G(s.path,a),i.reclaimed++}catch(d){if(d.code!=="EEXIST")throw d;g(s.path,{force:!0})}f(Q(s.path)),f(e.pendingDir),o--}o=De(e.responseDir,o,(s,c)=>c+t.responseRetentionMs,r,()=>{i.responsesRemoved++}),o=De(e.deadLetterDir,o,(s,c)=>c+t.deadLetterRetentionMs,r,()=>{i.deadLettersRemoved++});for(let s of[e.pendingDir,e.inflightDir,e.responseDir,e.deadLetterDir,e.legacyRequestDir]){if(o<=0)break;for(let c of Pe(s)){if(o<=0)break;A(c).includes(".tmp-")&&(D(c).mtimeMs+t.temporaryRetentionMs>r||(g(c,{force:!0}),i.temporaryFilesRemoved++,o--))}}return Lr(e.inflightDir),i}function q(e){C(e);let r=[...h(e.pendingDir).map(a=>({path:a,pending:!0})),...h(e.legacyRequestDir).map(a=>({path:a,pending:!0}))],t=ie(e.inflightDir).map(a=>({path:a.path,pending:!1})),n=h(e.responseDir).map(a=>({path:a,pending:!1})),i=h(e.deadLetterDir).map(a=>({path:a,pending:!1})),o=[...r,...t,...n,...i],s=0,c;for(let a of r){let d=E(a.path);if(!d){s++;continue}let l=d.enqueuedAtMs??D(a.path).mtimeMs;c=c===void 0?l:Math.min(c,l)}return{pending:r.length,inflight:t.length,responses:n.length,deadLetters:i.length,invalid:s,totalItems:o.length,totalBytes:o.reduce((a,d)=>a+Ar(d.path),0),...c===void 0?{}:{oldestPendingAt:new Date(c).toISOString()}}}function Fr(e,r,t){let n=m(e.responseDir,`${r.requestId}.json`),i=`${JSON.stringify(t)}
|
|
7
7
|
`;try{N(n,i,{durability:"durable"})}catch(o){if(o.code!=="EEXIST")throw o;let s=E(n),c=r.operationKey??`legacy-${r.requestId}`;if(s?.operationKey!==c)throw new Error(`Mailbox completion ${r.requestId} conflicts with an existing operation.`,{cause:o})}}function te(e,r,t,n,i){let o=m(e.rootDir,".admission.lock"),s=`${process.pid}-${Ae()}`,c=n()+Math.max(0,t);for(;!hr(e.rootDir,o,s);){if(Ir(o),n()>=c)throw new x("admission-busy",q(e),r,0);Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,5)}try{return i()}finally{try{ne(o).ownerToken===s&&(g(o,{recursive:!0,force:!0}),f(e.rootDir))}catch{}}}function hr(e,r,t){let n=`${JSON.stringify({ownerToken:t,pid:process.pid,acquiredAtMs:Date.now()})}
|
|
8
|
-
`;try{return N(r,n,{durability:"durable"}),!0}catch(i){if(i.code==="EEXIST")return!1;try{ne(r).ownerToken===t&&(g(r,{force:!0}),f(e))}catch{}throw i}}function Ir(e){let r=null;try{let n=ne(e);typeof n.ownerToken=="string"&&Number.isSafeInteger(n.pid)&&Number(n.pid)>0&&(r=Number(n.pid))}catch{}if(r===null||kr(r))return;let t=`${e}.stale-${Ae()}`;try{G(e,t)}catch(n){let i=n.code;if(i==="ENOENT"||i==="EEXIST")return;throw n}g(t,{recursive:!0,force:!0})}function ne(e){try{return JSON.parse(F(e,"mailbox lock record"))}catch(r){if(r.code!=="EISDIR"&&!(r instanceof ae&&r.reason==="not-regular"))throw r;return JSON.parse(F(m(e,"owner.json"),"mailbox lock owner record"))}}function kr(e){try{return process.kill(e,0),!0}catch(r){let t=r.code;return t==="EPERM"||t!=="ESRCH"}}function Rr(e,r,t){let n=m(e,Ee),i=t.processIdentity,o=ve(n);if(!(o&&o.ownerId===r&&o.pid===t.pid&&(!o.processIdentity&&!i||o.processIdentity&&i&&k(o.processIdentity,i)))){if(h(e).some(s=>s.endsWith(".claim")))throw new Error(`Mailbox owner identity ${r} collides with retained work from another process instance.`);H(n,{version:1,ownerId:r,pid:t.pid,...i?{processIdentity:i}:{}})}}function Dr(e,r,t){let n=ve(m(e.inflightDir,_(r),Ee));if(!n)return"unknown";if(!t.isProcessAlive(n.pid))return"dead";if(!n.processIdentity)return"live";let i=t.readProcessIdentity(n.pid);return i?k(n.processIdentity,i)?"live":"dead":"unknown"}function ve(e){try{let r=JSON.parse(F(e,"mailbox owner record"));if(r.version!==1||typeof r.ownerId!="string"||!r.ownerId||typeof r.pid!="number"||!Number.isSafeInteger(r.pid)||r.pid<=0)return null;let t=r.processIdentity===void 0?null:
|
|
9
|
-
//# sourceMappingURL=chunk-
|
|
8
|
+
`;try{return N(r,n,{durability:"durable"}),!0}catch(i){if(i.code==="EEXIST")return!1;try{ne(r).ownerToken===t&&(g(r,{force:!0}),f(e))}catch{}throw i}}function Ir(e){let r=null;try{let n=ne(e);typeof n.ownerToken=="string"&&Number.isSafeInteger(n.pid)&&Number(n.pid)>0&&(r=Number(n.pid))}catch{}if(r===null||kr(r))return;let t=`${e}.stale-${Ae()}`;try{G(e,t)}catch(n){let i=n.code;if(i==="ENOENT"||i==="EEXIST")return;throw n}g(t,{recursive:!0,force:!0})}function ne(e){try{return JSON.parse(F(e,"mailbox lock record"))}catch(r){if(r.code!=="EISDIR"&&!(r instanceof ae&&r.reason==="not-regular"))throw r;return JSON.parse(F(m(e,"owner.json"),"mailbox lock owner record"))}}function kr(e){try{return process.kill(e,0),!0}catch(r){let t=r.code;return t==="EPERM"||t!=="ESRCH"}}function Rr(e,r,t){let n=m(e,Ee),i=t.processIdentity,o=ve(n);if(!(o&&o.ownerId===r&&o.pid===t.pid&&(!o.processIdentity&&!i||o.processIdentity&&i&&k(o.processIdentity,i)))){if(h(e).some(s=>s.endsWith(".claim")))throw new Error(`Mailbox owner identity ${r} collides with retained work from another process instance.`);H(n,{version:1,ownerId:r,pid:t.pid,...i?{processIdentity:i}:{}})}}function Dr(e,r,t){let n=ve(m(e.inflightDir,_(r),Ee));if(!n)return"unknown";if(!t.isProcessAlive(n.pid))return"dead";if(!n.processIdentity)return"live";let i=t.readProcessIdentity(n.pid);return i?k(n.processIdentity,i)?"live":"dead":"unknown"}function ve(e){try{let r=JSON.parse(F(e,"mailbox owner record"));if(r.version!==1||typeof r.ownerId!="string"||!r.ownerId||typeof r.pid!="number"||!Number.isSafeInteger(r.pid)||r.pid<=0)return null;let t=r.processIdentity===void 0?null:B(r.processIdentity);return r.processIdentity!==void 0&&(!t||t.pid!==r.pid)?null:{version:1,ownerId:r.ownerId,pid:r.pid,...t?{processIdentity:t}:{}}}catch{return null}}function Ie(e,r){for(let t of[m(e.pendingDir,`${r}.json`),m(e.legacyRequestDir,`${r}.json`),m(e.responseDir,`${r}.json`)])if(M(t))return t;for(let t of ie(e.inflightDir))if(t.requestId===r)return t.path;return null}function ke(e,r,t){let n=E(e);if(!n||n.operationKey!==r)throw new Error(`Mailbox operation ${t} conflicts with an existing retained record.`);return n}function Sr(e){if(e.mailboxVersion!==Z||e.id!==gr(e.operationKey)||!e.clientId.trim()||!Number.isFinite(e.enqueuedAtMs)||!Number.isFinite(e.deadlineAtMs)||e.deadlineAtMs<e.enqueuedAtMs)throw new Error("Mailbox request has an invalid lifecycle identity.")}function Re(e,r){return h(e).filter(t=>t.endsWith(".json")).map(t=>{let n=D(t),i=A(t,".json"),o=E(t)??{id:i};return{path:t,originalFile:A(t),header:o,byteLength:n.size,orderAtMs:o.enqueuedAtMs??n.mtimeMs,legacy:r}})}function ie(e){if(!M(e))return[];let r=[];for(let t of I(e,{withFileTypes:!0})){if(!t.isDirectory())continue;let n=Le(t.name);if(n===null)continue;let i=m(e,t.name);for(let o of I(i,{withFileTypes:!0})){if(!o.isFile()||!o.name.endsWith(".claim"))continue;let s=/^(.*)\.(\d+)\.claim$/.exec(o.name);if(!s)continue;let c=Le(s[1]),a=Number(s[2]);if(c===null||A(c)!==c||!c.endsWith(".json")||!Number.isSafeInteger(a))continue;let d=m(i,o.name),l=E(d)??{id:A(c,".json")},y=D(d);r.push({requestId:l.id,ownerId:n,path:d,originalFile:c,claimedAtMs:y.mtimeMs,claimExpiresAtMs:a,byteLength:y.size,...l.operationKey?{operationKey:l.operationKey}:{},...l.clientId?{clientId:l.clientId}:{},...l.enqueuedAtMs===void 0?{}:{enqueuedAtMs:l.enqueuedAtMs},...l.deadlineAtMs===void 0?{}:{deadlineAtMs:l.deadlineAtMs},legacy:l.operationKey===void 0})}}return r.sort((t,n)=>t.claimedAtMs-n.claimedAtMs||t.path.localeCompare(n.path))}function E(e){try{let r=JSON.parse(F(e,"mailbox record"));return typeof r.id!="string"||!r.id?null:{id:r.id,...typeof r.operationKey=="string"?{operationKey:r.operationKey}:{},...typeof r.clientId=="string"?{clientId:r.clientId}:{},...typeof r.enqueuedAtMs=="number"?{enqueuedAtMs:r.enqueuedAtMs}:{},...typeof r.deadlineAtMs=="number"?{deadlineAtMs:r.deadlineAtMs}:{}}}catch{return null}}function De(e,r,t,n,i){for(let o of h(e)){if(r<=0)break;let s=D(o);t(o,s.mtimeMs)>n||(g(o,{force:!0}),i(),r--)}return r}function h(e){return M(e)?I(e,{withFileTypes:!0}).filter(r=>r.isFile()).map(r=>m(e,r.name)).sort():[]}function Se(e){try{return I(e).some(r=>r.endsWith(".json"))}catch{return!1}}function Pe(e){if(!M(e))return[];let r=[];for(let t of I(e,{withFileTypes:!0})){let n=m(e,t.name);t.isFile()?r.push(n):t.isDirectory()&&r.push(...Pe(n))}return r.sort()}function Lr(e){if(M(e))for(let r of I(e,{withFileTypes:!0})){if(!r.isDirectory())continue;let t=m(e,r.name);I(t).some(n=>n.endsWith(".claim"))||g(t,{recursive:!0,force:!0})}}function Ar(e){try{return D(e).size}catch{return 0}}function _(e){return Buffer.from(e,"utf8").toString("base64url")}function Le(e){try{let r=Buffer.from(e,"base64url").toString("utf8");return _(r)===e?r:null}catch{return null}}function Er(e){return/^[a-z0-9][a-z0-9-]{0,127}$/i.test(e)?e:`invalid-${Y("sha256").update(e).digest("hex")}`}function vr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function It(e){return typeof e=="string"&&Number.isFinite(Date.parse(e))}function kt(e){return vr(e)&&Object.values(e).every(r=>typeof r=="string"||r===null)}function Rt(e){return typeof e=="string"&&e.length>0}function Dt(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0}function St(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>0}function Lt(e){return typeof e=="string"&&e.length>0&&e.length<=256&&!/[\0\r\n]/u.test(e)}function At(e){return typeof e=="number"&&Number.isFinite(e)&&e>=0}export{vr as a,It as b,kt as c,Rt as d,Dt as e,St as f,Lt as g,At as h,ge as i,me as j,O as k,$r as l,R as m,Xe as n,ir as o,V as p,N as q,nt as r,H as s,T as t,Z as u,pt as v,C as w,bt as x,gr as y,gt as z,xt as A,wt as B,Mr as C,Mt as D,Ft as E,q as F};
|
|
9
|
+
//# sourceMappingURL=chunk-D7DOB27N.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{c as S}from"./chunk-
|
|
1
|
+
import{c as S}from"./chunk-ELYMY5S2.js";import{a as y,b as h}from"./chunk-W7YLRXZE.js";import{a as f}from"./chunk-SB53KPWA.js";import{d as v}from"./chunk-JCMFBF4Z.js";import{c as p}from"./chunk-VGWZ4MOY.js";import{b as d}from"./chunk-SGMNWYTH.js";import{d as l,t as m}from"./chunk-GVAF222T.js";import{x as u}from"./chunk-7GAK2F3H.js";function B(i,r,c={}){let t=g(i,r,c);if(t.kind!=="matched")return t;let{referenceEvidence:n,claimSupport:e,...s}=t;return s}function g(i,r,c={}){let t=d(i,r);if(!t.match)return{kind:"missing",query:r};if(t.total>1)return{kind:"ambiguous",query:r,total:t.total,candidates:[{symbol:t.match.symbol,shortName:l(t.match.symbol),relativePath:t.match.relativePath,startLine:t.match.startLine},...t.candidates]};let n=t.match,e=R(c.parts),s=e.includes("definition")||e.includes("references")?S(i,n.symbol,{semantic:c.semantic,referenceContext:c.referenceContext}):{definitions:[],referencedBy:[],referenceEvidence:[],claimSupport:null},o=e.includes("callers")||e.includes("callees")?f(i,n.symbol,{semantic:c.semantic}):null,a=c.relatedSourceLines??80;return{kind:"matched",query:r,symbol:n.symbol,shortName:l(n.symbol),file:n.relativePath,parts:e,definition:e.includes("definition")?v(i,n.symbol):null,referenceWindows:e.includes("references")?L(i,s.referencedBy):[],callers:e.includes("callers")?E(i,o?.callers??[],a):[],callees:e.includes("callees")?E(i,o?.callees??[],a):[],dependencies:e.includes("dependencies")?y(i,n.relativePath):[],consumers:e.includes("consumers")?h(i,n.relativePath):[],referenceEvidence:s.referenceEvidence,claimSupport:s.claimSupport}}function L(i,r){let c=r.filter(n=>n.sourceStartLine!==null&&n.sourceEndLine!==null&&n.source!==null).sort((n,e)=>n.relativePath.localeCompare(e.relativePath)||n.sourceStartLine-e.sourceStartLine||n.line-e.line),t=[];for(let n of c){let e=t[t.length-1];if(e&&e.relativePath===n.relativePath&&n.sourceStartLine<=e.endLine+1){e.endLine=Math.max(e.endLine,n.sourceEndLine),e.references.push(b(n)),e.source=u(i,e.relativePath).slice(e.startLine,e.endLine+1).join(`
|
|
2
2
|
`);continue}t.push({relativePath:n.relativePath,startLine:n.sourceStartLine,endLine:n.sourceEndLine,source:n.source,references:[b(n)]})}return t}function b(i){return{line:i.line,enclosingSymbol:i.enclosingSymbol,enclosingShort:i.enclosingShort}}function R(i){let r=i&&i.length>0?i:["definition","references"];return[...new Set(r)]}function E(i,r,c){let t=[],n=new Set;for(let e of r){if(n.has(e.symbol))continue;n.add(e.symbol);let s=(e.file?m(i,e.file).find(a=>a.symbol===e.symbol):void 0)??d(i,e.symbol).match;if(!s)continue;let o=p(i,s.relativePath,s.startLine,s.endLine,c);o&&t.push({...o,symbol:e.symbol,shortName:e.shortName,omittedLines:Math.max(0,s.endLine-o.endLine)})}return t}export{B as a,g as b};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
//# sourceMappingURL=chunk-DDRA3QKN.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as P}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as P}from"./chunk-QMOZZ2VX.js";import{a as d}from"./chunk-U7NUXDQO.js";import{a as y}from"./chunk-DGXRDLV5.js";import{a as v}from"./chunk-B75HZHUP.js";import{c as b}from"./chunk-BPKNP3KZ.js";import{a as p}from"./chunk-BGBBVSH4.js";import{a as g,h}from"./chunk-NDKOVQFG.js";import{d as c,h as u}from"./chunk-GVAF222T.js";import{h as f,i as m}from"./chunk-F74LZWCE.js";import{basename as x,extname as S}from"path";function z(i,e){let{scope:r,maxLoc:n=15,limit:o=30,scanLimit:l}=e??{},a=new b(i);return y({candidates:()=>E(i,a,r,n),orderCandidates:v,scanLimit:l,profile:{name:"passthrough-candidates"},prepare:t=>a.calleeEvidenceMap(t,{semantic:e?.semantic!==!1}),evaluate:(t,s)=>s.incompleteSymbolIds.has(t.symbolId)||s.unavailableSymbolIds.has(t.symbolId)?null:L(i,t,s.rows.get(t.symbolId)??[]),orderResults:(t,s)=>t.loc-s.loc||t.file.localeCompare(s.file),limit:o})}function L(i,e,r){let n=C(r);if(n.size!==1||!f(i,e.relativePath,e.startLine,e.endLine))return null;let[,o]=[...n.entries()][0],l=I(i,e,o),a=T(i,e),t=l.length>0||a.length>0?"signal":"direct";return{symbol:e.symbol,shortName:c(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:p(e),forwardsTo:o.symbol,forwardsToShort:c(o.symbol),forwardsToFile:o.file,actionTier:t,boundaryEvidence:l,publicFacadeEvidence:a,recommendation:D(t,l,a)}}function I(i,e,r){return P(i,e.relativePath,e.startLine,"passthrough","explicit ignore-passthrough comment",[{label:"passthrough name",value:c(e.symbol)},{label:"callee name",value:c(r.symbol)},{label:"passthrough module",value:x(e.relativePath,S(e.relativePath))},{label:"callee module",value:x(r.file,S(r.file))}])}function D(i,e,r){if(i==="signal"){if(r.length>0)return`Review the public API before inlining; public-facade evidence: ${r.slice(0,2).join("; ")}.`;let n=e.filter(w);return n.length>0?`Review the public API before inlining; public-surface evidence: ${n.slice(0,2).join("; ")}.`:`Review the boundary before inlining; boundary evidence: ${e.slice(0,2).join("; ")}.`}return"Inline or remove this passthrough unless an external API or runtime registration depends on the forwarding name."}function T(i,e){return d(i,e)?g(i,e.relativePath)?["exported passthrough is declared on the package public surface"]:h(i,e.symbol,e.relativePath)?["exported passthrough matches configured or framework public entry surface"]:[]:[]}function w(i){return i.includes("public surface")}function C(i){let e=i.some(n=>u(n.symbol))?i.filter(n=>u(n.symbol)):i,r=new Map;for(let n of e)r.has(n.symbol)||r.set(n.symbol,n);return r}function E(i,e,r,n){return e.productionCallableDefinitions({scope:r,minLoc:3,maxLoc:n,requireFunctionLikeSymbol:!0,excludeRustTraitImplMembers:!0}).filter(o=>!m(i,o))}export{z as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DECN422G.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{m as u,r as p,t as h}from"./chunk-
|
|
1
|
+
import{m as u,r as p,t as h}from"./chunk-G7GVV2TV.js";import{a as c,e as d}from"./chunk-7GAK2F3H.js";import{h as l}from"./chunk-UC2FD2PS.js";import b from"better-sqlite3";var f=["busy_timeout = 5000","query_only = ON","temp_store = MEMORY","cache_size = -64000","mmap_size = 268435456"],i=class{constructor(t,e){this.connection=t;this.releaseGenerationReader=e}connection;releaseGenerationReader;active=!0;initialize(t){try{for(let e of f)this.connection.pragma(e);t(this.connection)}catch(e){try{this.close()}catch(n){throw new AggregateError([e,n],"SQLite initialization and rollback both failed.",{cause:n})}throw e}}close(){if(!this.active)return;this.active=!1;let t,e;try{this.connection.close()}catch(n){t=n}try{this.releaseGenerationReader()}catch(n){e=n}if(t!==void 0&&e!==void 0)throw new AggregateError([t,e],"SQLite connection close and generation-reader release both failed.");if(t!==void 0)throw t;if(e!==void 0)throw e}},g=["node_modules",".git","dist","build","out","coverage","target",".next",".nuxt",".cache",".turbo",".nbb",".cpcache",".shadow-cljs",".codebaseiq-cache","__pycache__",".venv","venv"],m=class{db;config;generation;pathFilter;connection;connectionOwnership;statementCache=new Map;closed=!1;constructor(t,e){this.config=t,this.pathFilter=e??null;let n=S(t),o=new i(n.db,n.release);try{o.initialize(E),this.generation=n.generation,this.connection=n.db,this.connectionOwnership=o,this.db=w(n.db)}catch(r){try{o.close()}catch(s){throw new AggregateError([r,s],"SQLite construction and rollback both failed.",{cause:s})}throw r}}isIgnored(t){return this.pathFilter?.isIgnored(t)??!1}get localSymbolPredicate(){return`(
|
|
2
2
|
EXISTS (
|
|
3
3
|
SELECT 1
|
|
4
4
|
FROM defn_enclosing_ranges local_der
|
|
@@ -17,4 +17,4 @@ import{m as u,r as p,t as h}from"./chunk-6ZV5EDUT.js";import{a as c,e as d}from"
|
|
|
17
17
|
)
|
|
18
18
|
)`}get pathExclusions(){return this.pathExclusionsFor("d")}get symbolNoise(){return this.symbolNoiseFor("gs")}pathExclusionsFor(...t){return t.flatMap(e=>g.flatMap(n=>[`AND ${e}.relative_path NOT LIKE '${n}/%'`,`AND ${e}.relative_path NOT LIKE '%/${n}/%'`])).join(`
|
|
19
19
|
`)}symbolNoiseFor(t){return`AND ${t}.symbol NOT LIKE '%().(%' AND ${t}.symbol NOT LIKE '%typeLiteral%'`}all(t,...e){return this.statement(t).all(...e)}get(t,...e){return this.statement(t).get(...e)}close(){if(this.closed)return;this.closed=!0,this.statementCache.clear();let t,e;try{d(this)}catch(n){t=n}try{this.connectionOwnership.close()}catch(n){e=n}if(t!==void 0&&e!==void 0)throw new AggregateError([t,e],"Database-owned resource and SQLite connection cleanup both failed.");if(t!==void 0)throw t;if(e!==void 0)throw e}statement(t){let e=this.statementCache.get(t);return e||(e=this.connection.prepare(t),this.statementCache.set(t,e)),e}};function w(a){return Object.freeze({prepare(t){let e=a.prepare(t);if(!e.readonly||!e.reader)throw new Error("ScipDatabase.db only permits read-only statements that return rows.");return y(e)}})}function y(a){let t={get:(...e)=>a.get(...e),all:(...e)=>a.all(...e),iterate:(...e)=>a.iterate(...e),pluck(e){return e===void 0?a.pluck():a.pluck(e),t},expand(e){return e===void 0?a.expand():a.expand(e),t},raw(e){return e===void 0?a.raw():a.raw(e),t},bind(...e){return a.bind(...e),t},columns:()=>a.columns(),safeIntegers(e){return e===void 0?a.safeIntegers():a.safeIntegers(e),t}};return Object.freeze(t)}function E(a){if(!a.prepare("SELECT 1 AS present FROM sqlite_master WHERE type = 'table' AND name = 'documents'").get())return;let e=a.prepare("SELECT relative_path FROM documents").iterate();for(let n of e)l(n.relative_path)}function S(a){for(let t=0;t<4;t+=1){let e=u(a),n=e.generation,o;try{o=new b(c(n.databasePath),{readonly:!0,fileMustExist:!0})}catch(r){throw e.release(),r}if(n.source==="immutable")return{db:o,generation:n,release:e.release};try{let r=p(a);if(n.databaseFileIdentity===h(n.databasePath)&&r.source==="legacy"&&r.identity===n.identity&&r.databaseFileIdentity===n.databaseFileIdentity&&r.metadataRaw===n.metadataRaw)return{db:o,generation:n,release:e.release}}catch(r){throw o.close(),e.release(),r}o.close(),e.release()}throw new Error("SQLite index publication changed repeatedly while opening a coherent generation.")}export{m as a};
|
|
20
|
-
//# sourceMappingURL=chunk-
|
|
20
|
+
//# sourceMappingURL=chunk-DJKOXMNG.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as F}from"./chunk-
|
|
1
|
+
import{a as F}from"./chunk-LMTSB3TB.js";import{c as w}from"./chunk-BPKNP3KZ.js";import{k as E}from"./chunk-KLX6NSWT.js";import{a as S,b as y,j as _}from"./chunk-NDKOVQFG.js";import{a as x}from"./chunk-BRQL7AFJ.js";import{d as k}from"./chunk-GVAF222T.js";import{f as v,g as R}from"./chunk-SX72EVMY.js";import{c as p}from"./chunk-UC2FD2PS.js";function L(e,t){let a=p(t),n=[],r="complete",i=x(a);i==="entry"&&s(n,"operational-root","structural entrypoint path"),i==="worker"&&s(n,"operational-root","worker launch convention"),_(a)&&s(n,"operational-root","framework-discovered entrypoint"),M(e,a)&&s(n,"operational-root","configured entry root");let l=!1;try{l=S(e,a),l&&s(n,"published-api","package manifest export");for(let o of y(e,a))s(n,"operational-root",o)}catch(o){r="partial",s(n,"metadata-unavailable",`package metadata unavailable: ${I(o)}`)}try{let o=v(e.config.projectRoot,a,{maxBytes:8388608,inputKind:"change-surface source"});N(o)&&s(n,"operational-root","module contains a direct-execution process guard")}catch(o){r="partial",s(n,"metadata-unavailable",R(o)?"indexed source file is unavailable on disk":`source metadata unavailable: ${I(o)}`)}return{operationalRoot:n.some(o=>o.kind==="operational-root"),publishedApi:l,coverage:r,reasons:n}}function M(e,t){let a=e.config.entryRoots;return a?a.files?.some(n=>p(n)===t)?!0:a.pathPrefixes?.some(n=>t.startsWith(p(n)))??!1:!1}function N(e){return e.includes("import.meta.url")&&/process\.argv\s*\[\s*1\s*\]/.test(e)||/require\.main\s*===\s*module/.test(e)||/__name__\s*==\s*['"]__main__['"]/.test(e)}function s(e,t,a){e.some(n=>n.kind===t&&n.detail===a)||e.push({kind:t,detail:a})}function I(e){return e instanceof Error?e.message:String(e)}function V(e,t,a={}){let n=F(e,t);if(!n)return null;let r=T(e,n);if(!r||e.isIgnored(r.relative_path))return null;let i=[],l=0,o=!0,h=j(e,r.relative_path),f=L(e,r.relative_path),b=a.semantic===!1?{callers:new Map,incompleteSymbolIds:new Set,unavailableSymbolIds:new Set}:E(e,h);for(let u of h){let c=O(e,r,u,b.callers.get(u.symbolId)??new Set);l+=c;let m=P(a.semantic!==!1,u.symbolId,b),d=m==="complete"||m==="disabled";d||(o=!1);let g=d?c:null,C=g===null?void 0:$(g),D=[...f.reasons,...c>0?[{kind:"external-consumers",detail:`${c} known external consumer${c===1?"":"s"}`}]:[],...d?[]:[{kind:"semantic-consumer-coverage",detail:`compiler-resolved consumer evidence is ${m}`}]];i.push({symbol:u.symbol,shortName:k(u.symbol),startLine:u.startLine,endLine:u.endLine,externalConsumers:g,knownExternalConsumers:c,consumerCoverage:m,externalConsumerRiskLevel:C,riskLevel:A(C,f,!d),riskReasons:D})}return{file:r.relative_path,symbols:i,totalExternalConsumers:o?l:null,knownTotalExternalConsumers:l,fileRisk:f}}function P(e,t,a){if(!e)return"disabled";let n=a.incompleteSymbolIds.has(t),r=a.unavailableSymbolIds.has(t);return n&&r?"incomplete-and-unavailable":n?"incomplete":r?"unavailable":"complete"}function T(e,t){return e.get(`SELECT id, relative_path FROM documents
|
|
2
2
|
WHERE relative_path = ?
|
|
3
3
|
${e.pathExclusionsFor("documents")}
|
|
4
4
|
LIMIT 1`,t)??null}function j(e,t){return new w(e).definitionsForFile(t).sort((a,n)=>a.startLine-n.startLine||a.endLine-n.endLine)}function O(e,t,a,n){let r=e.all(`SELECT DISTINCT consumer_d.relative_path
|
|
@@ -8,4 +8,4 @@ import{a as F}from"./chunk-HIEXRDJF.js";import{c as w}from"./chunk-NK76RSB6.js";
|
|
|
8
8
|
WHERE m.symbol_id = ?
|
|
9
9
|
AND m.role != 1
|
|
10
10
|
AND c.document_id != ?`,a.symbolId,t.id);return new Set([...r.map(i=>i.relative_path),...[...n].filter(i=>i!==t.relative_path)]).size}function $(e){return e>10?"high":e>0?"medium":"low"}function A(e,t,a){return e==="high"?"high":a||e==="medium"||t.operationalRoot||t.publishedApi||t.coverage==="partial"?"medium":"low"}export{V as a};
|
|
11
|
-
//# sourceMappingURL=chunk-
|
|
11
|
+
//# sourceMappingURL=chunk-DWBAESVW.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as G}from"./chunk-QOKYJ33H.js";import{a as O,c as z}from"./chunk-
|
|
1
|
+
import{a as G}from"./chunk-QOKYJ33H.js";import{a as O,c as z}from"./chunk-BPKNP3KZ.js";import{j as $}from"./chunk-KLX6NSWT.js";import{d as k,g as S,i as j}from"./chunk-GVAF222T.js";import{C as A}from"./chunk-ICUL7XRT.js";import{f as _}from"./chunk-SX72EVMY.js";import{ba as C,h as b}from"./chunk-UC2FD2PS.js";import{execFileSync as g}from"child_process";import{existsSync as ne}from"fs";import{basename as W}from"path";var ie="Unable to compute git diff.",se={semanticConsumers:$,sourceFallbackConsumers:O},w={resolveCommit:C,readBatch({projectRoot:e,resolvedBase:i,relativePaths:t}){let n=t.map(a=>`${i}:./${a}
|
|
2
2
|
`).join("");return g("git",["cat-file","--batch"],{cwd:e,input:n,maxBuffer:256*1024*1024,timeout:1e4,stdio:["pipe","pipe","ignore"],windowsHide:!0})}};function Ze(e,i={}){let t=i.plan??ae(e,i);return t.note?ce(t.note,t.changedFileLines):t.changedFiles.length===0?le(t.changedFileLines):oe(t.changedFiles,[re(e,t.changedFiles,t.changedFiles,t.changedRanges)])}function ae(e,i={}){let{base:t="HEAD"}=i;try{let n=C(e.config.projectRoot,t),a=de(e.config.projectRoot,n),s=a.changedFileLines,o=be(e,s),r=ye(e,a.changedRanges);return{changedFileLines:s,changedFiles:o,changedRanges:r,renamedFiles:ge(e.config.projectRoot,n,o,a),note:s.length===0?"No changed files found.":void 0}}catch{return{changedFileLines:[],changedFiles:[],changedRanges:[],renamedFiles:[],note:ie}}}function re(e,i,t,n=[],a={}){let s=a.evidenceRuntime??se,o=new z(e),r=new Set(t),l=G(n),u=[],d=new Map,c=i.flatMap(f=>o.definitionsForFile(f)).filter(Ne),m=c.filter(f=>Ce(f,l)),p=ve(e,c,m,l),y=Ie([...m,...p.definitions]).sort((f,h)=>f.relativePath.localeCompare(h.relativePath)||f.startLine-h.startLine),B=y.map(f=>f.symbolId),M=Pe(e,B),ee=Ee(e,B,t),R=y.filter(f=>(M.get(f.symbolId)??0)===0),P=q("semantic-consumers",R.length,()=>s.semanticConsumers(e,R)),E=P.values,T=R.filter(f=>(E.get(f.symbolId)?.size??0)===0),N=q("source-fallback-consumers",T.length,()=>s.sourceFallbackConsumers(e,T)),te=N.values;for(let f of y)Fe(e,f,r,u,d,E.get(f.symbolId)??new Set,te.get(f.symbolId)??new Set,M.get(f.symbolId)??0,ee.get(f.symbolId)??new Set);return{changedSymbols:u,consumerEntries:[...d.entries()].map(([f,h])=>({file:f,symbols:[...h].sort()})),attributionNotes:p.notes,evidenceTiers:[P.status,N.status]}}function oe(e,i){let t=new Map,n=i.flatMap(r=>r.changedSymbols),a=i.flatMap(r=>r.attributionNotes??[]),s=Be(i);for(let r of i)for(let l of r.consumerEntries){let u=t.get(l.file);u||(u=new Set,t.set(l.file,u));for(let d of l.symbols)u.add(d)}let o=Te(t);return{changedFiles:[...e],changedSymbols:n,affectedConsumers:o,attributionNotes:a,evidenceTiers:s,summary:{totalChangedFiles:e.length,totalChangedSymbols:n.length,totalAffectedFiles:o.length}}}function ce(e,i=[]){return{changedFiles:i,changedSymbols:[],affectedConsumers:[],attributionNotes:[],evidenceTiers:X(),summary:{totalChangedFiles:i.length,totalChangedSymbols:0,totalAffectedFiles:0,note:e}}}function le(e){return{changedFiles:e,changedSymbols:[],affectedConsumers:[],attributionNotes:[],evidenceTiers:X(),summary:{totalChangedFiles:e.length,totalChangedSymbols:0,totalAffectedFiles:0,note:"Changed files are not present in the current SCIP index."}}}function de(e,i){let t=g("git",["diff","--name-status","--find-renames",i,"--"],{encoding:"utf-8",cwd:e,timeout:3e4,maxBuffer:67108864,windowsHide:!0}),n=g("git",["diff","--name-status","--find-renames","--cached",i,"--"],{encoding:"utf-8",cwd:e,timeout:3e4,maxBuffer:64*1024*1024,windowsHide:!0}),a=g("git",["ls-files","--others","--exclude-standard"],{encoding:"utf-8",cwd:e,timeout:3e4,maxBuffer:64*1024*1024,windowsHide:!0}),s=g("git",["diff","--unified=0",i,"--"],{encoding:"utf-8",cwd:e,timeout:3e4,maxBuffer:64*1024*1024,windowsHide:!0}),o=g("git",["diff","--unified=0","--cached",i,"--"],{encoding:"utf-8",cwd:e,timeout:3e4,maxBuffer:64*1024*1024,windowsHide:!0}),r=pe([t,n]);return{changedFileLines:[...new Set([...r.changedFiles,...V(a)])],changedRanges:K([...U(s),...U(o)]),renamedFiles:r.renamedFiles,deletedFiles:r.deletedFiles}}function ue(e,i,t){let n=typeof e=="string"?{projectRoot:e,base:i,relativePath:t}:e;if(typeof n.projectRoot!="string"||typeof n.base!="string"||typeof n.relativePath!="string")throw new TypeError("fileContentAtBase requires projectRoot, base, and relativePath.");let a={projectRoot:n.projectRoot,base:n.base,relativePath:n.relativePath},{relativePath:s}=a,o=J(a);if(o.state==="unavailable")throw new Error(`Base content unavailable for ${s}: ${o.reason}`);return o.state==="present"?o.content:null}function J(e,i=w){return Z(e.relativePath),x({projectRoot:e.projectRoot,base:e.base,relativePaths:[e.relativePath]},i).get(e.relativePath)??{state:"unavailable",reason:`Base-content lookup omitted ${e.relativePath}.`}}function x(e,i=w){for(let o of e.relativePaths)Z(o);let t=[...new Set(e.relativePaths)];if(t.length===0)return new Map;let n;try{n=i.resolveCommit(e.projectRoot,e.base)}catch(o){return v(t,D(o))}let a;try{a=i.readBatch({projectRoot:e.projectRoot,resolvedBase:n,relativePaths:t})}catch(o){return v(t,D(o))}let s;try{s=me(a,t)}catch(o){return v(t,`Malformed git cat-file batch output: ${D(o)}`)}return new Map(t.map(o=>{let r=s.get(o)??null;return[o,r===null?{state:"absent"}:{state:"present",content:r}]}))}function fe(e,i=w){let t=x({projectRoot:e.projectRoot,base:e.base,relativePaths:e.preloadPaths??[]},i);return n=>(t.has(n)||t.set(n,J({projectRoot:e.projectRoot,base:e.base,relativePath:n},i)),t.get(n)??{state:"unavailable",reason:`Base-content reader omitted ${n}.`})}function Ve(e,i,t=[]){let n=typeof e=="string"?{projectRoot:e,base:i,preloadPaths:t}:e;if(typeof n.projectRoot!="string"||typeof n.base!="string")throw new TypeError("createBaseContentReader requires projectRoot and base.");let a={projectRoot:n.projectRoot,base:n.base,preloadPaths:n.preloadPaths},s=fe(a);return o=>{let r=s(o);if(r.state==="unavailable")throw new Error(`Base content unavailable for ${o}: ${r.reason}`);return r.state==="present"?r.content:null}}function Ye(e,i=e.changedFiles){let t=new Map(e.renamedFiles.map(n=>[n.to,n.from]));return[...new Set(i.map(n=>t.get(n)??n))]}function Ke(e,i,t){let n=typeof e=="string"?{projectRoot:e,base:i,relativePaths:t}:e;if(typeof n.projectRoot!="string"||typeof n.base!="string"||!Array.isArray(n.relativePaths))throw new TypeError("fileContentsAtBase requires projectRoot, base, and relativePaths.");let a=x(n),s=new Map;for(let[o,r]of a){if(r.state==="unavailable")throw new Error(`Base content unavailable for ${o}: ${r.reason}`);s.set(o,r.state==="present"?r.content:null)}return s}function Z(e){b(e)}function v(e,i){return new Map(e.map(t=>[t,{state:"unavailable",reason:i}]))}function D(e){let t=(e instanceof Error?e.message:String(e)).replaceAll(/\s+/g," ").trim().slice(0,500);return t===""?"Git base-content lookup failed without a reason.":t}function me(e,i){let t=new Map,n=0;for(let a of i){let s=e.indexOf(10,n);if(s<0)throw new Error("git cat-file batch output ended before object header");let o=e.subarray(n,s).toString("utf-8");if(n=s+1,o.endsWith(" missing")){t.set(a,null);continue}let r=/^[0-9a-f]+ ([^ ]+) (\d+)$/.exec(o);if(!r)throw new Error(`unexpected git cat-file batch header: ${o}`);let[,l,u]=r,d=Number(u);if(!Number.isFinite(d)||d<0)throw new Error(`unexpected git cat-file batch size: ${o}`);if(n+d>e.length)throw new Error("git cat-file batch output ended before blob payload");let c=e.subarray(n,n+d);t.set(a,l==="blob"?c.toString("utf-8"):null),n+=d,e[n]===10&&(n+=1)}return t}function ge(e,i,t,n){if(t.length===0)return[];let a=new Map,s=new Set;for(let r of n.renamedFiles)t.includes(r.to)&&(a.set(r.to,r),s.add(r.from));let o=n.deletedFiles;if(o.length===0)return[...a.values()].sort((r,l)=>r.to.localeCompare(l.to));for(let r of t){if(a.has(r)||!ne(`${e}/${r}`))continue;let l=o.filter(c=>!s.has(c)).filter(c=>W(c)===W(r));if(l.length===0)continue;let u=_(e,r),d=l.map(c=>({from:c,to:r,similarity:he(ue({projectRoot:e,base:i,relativePath:c})??"",u)})).sort((c,m)=>m.similarity-c.similarity)[0];d&&d.similarity>=.45&&(a.set(r,d),s.add(d.from))}return[...a.values()].sort((r,l)=>r.to.localeCompare(l.to))}function pe(e){let i=new Set,t=new Map,n=new Set;for(let a of e.flatMap(s=>V(s))){let[s,o,r]=a.split(" ");if(!(!s||!o)){if(s.startsWith("R")&&r){i.add(r),t.set(r,{from:o,to:r,similarity:Number(s.slice(1))/100});continue}i.add(o),s.startsWith("D")&&n.add(o)}}return{changedFiles:[...i],renamedFiles:[...t.values()],deletedFiles:[...n]}}function he(e,i){let t=new Set(H(e)),n=new Set(H(i));if(t.size===0&&n.size===0)return 1;if(t.size===0||n.size===0)return 0;let a=0;for(let s of t)n.has(s)&&(a+=1);return 2*a/(t.size+n.size)}function H(e){return e.match(/[A-Za-z_$][\w$]*|[{}()[\].,]/g)??[]}function V(e){return e.split(`
|
|
3
3
|
`).map(i=>i.trim()).filter(i=>i.length>0)}function be(e,i){let t=Y(e),n=[];for(let a of i){let s=t(a);s&&!e.isIgnored(s)&&n.push(s)}return n}function ye(e,i){let t=Y(e),n=[];for(let a of i){let s=t(a.file);s&&!e.isIgnored(s)&&n.push({...a,file:s})}return K(n)}function Y(e){let t=e.all(`SELECT relative_path FROM documents
|
|
4
4
|
ORDER BY id`).map(a=>a.relative_path).map(a=>({path:a,normalized:b(a)})),n=new Map;for(let a of t){let s=n.get(a.normalized);n.set(a.normalized,s===void 0||s===a.path?a.path:null)}return a=>{let s=b(a),o=n.get(s);if(o)return o;let r=t.filter(l=>l.normalized.endsWith(s));return r.length===1?r[0].path:null}}function U(e){let i=[],t=null;for(let n of e.split(`
|
|
@@ -15,4 +15,4 @@ import{a as G}from"./chunk-QOKYJ33H.js";import{a as O,c as z}from"./chunk-NK76RS
|
|
|
15
15
|
AND m.role != 1
|
|
16
16
|
AND ref_d.relative_path NOT IN (${t.map(()=>"?").join(",")})
|
|
17
17
|
${e.pathExclusionsFor("ref_d")}`,...i,...t),a=new Map;for(let s of n){let o=a.get(s.symbol_id);o||(o=new Set,a.set(s.symbol_id,o)),o.add(s.relative_path)}return a}function I(e,i,t,n,a){if(e.isIgnored(n)||i.has(n))return;let s=t.get(n);s||(s=new Set,t.set(n,s)),s.add(a)}function Te(e){return[...e.entries()].map(([i,t])=>({file:i,consumedSymbols:t.size})).sort((i,t)=>t.consumedSymbols-i.consumedSymbols)}function Ne(e){return!(j(e.symbol)||e.parentTypeName!==null&&!S(e.symbol))}function _e(e,i){return S(e.symbol)||e.isTypeLike?!0:e.parentTypeName===null&&i>0}export{ie as a,Ze as b,ae as c,re as d,oe as e,ue as f,J as g,x as h,fe as i,Ve as j,Ye as k,Ke as l,Se as m};
|
|
18
|
-
//# sourceMappingURL=chunk-
|
|
18
|
+
//# sourceMappingURL=chunk-EHPOTEQX.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as P,d as w}from"./chunk-CIYA2KZN.js";import{b as g,c as T}from"./chunk-4LK5OIPW.js";import{t as v,v as b,w as d}from"./chunk-C6WKPKCF.js";import{T as M}from"./chunk-MEUHIDI3.js";import{d as f}from"./chunk-T75DS2E6.js";import{w as l}from"./chunk-D7DOB27N.js";import{a as y,e as c}from"./chunk-6O3KXIDL.js";import{o as h,p as S}from"./chunk-UQYQBLJX.js";import{randomUUID as A}from"crypto";import{resolve as q}from"path";var E=class{projectRoot;currentGeneration;createEmitter;wallNow;monotonicNow;active=new Map;requests=0;sessionsCreated=0;sessionsReplaced=0;lastRequestAtMs=null;lastDurationMs=null;lastError=null;unavailable=!1;constructor(e){this.projectRoot=q(e.projectRoot),this.currentGeneration=e.currentGeneration,this.createEmitter=e.createEmitter??g,this.wallNow=e.wallNow??e.now??Date.now,this.monotonicNow=e.monotonicNow??e.now??y}handle(e,t){let r=this.monotonicNow();try{if(this.currentGeneration()!==e)throw new Error("TypeScript index request does not match the currently published generation.");let s=this.emitterFor(t);if(s.emitter.producerIdentity!==t.producerIdentity)throw new Error("TypeScript index producer identity changed.");let o=s.emitter.snapshotStats(),a=s.emitter.advance({modifiedFiles:t.modifiedFiles,affectedFiles:t.affectedFiles}),m=this.monotonicNow()-r;return this.requests+=1,this.lastRequestAtMs=this.wallNow(),this.lastDurationMs=m,this.lastError=null,this.unavailable=!1,{producerIdentity:a.producerIdentity,cold:a.stats.initializations>o.initializations,durationMs:m,fragments:a.fragments.map(n=>({relativePath:n.relativePath,bytesBase64:n.bytes===null?null:Buffer.from(n.bytes).toString("base64"),occurrences:n.occurrences,symbols:n.symbols,referenceFragments:n.referenceFragments}))}}catch(s){throw this.lastError=s instanceof Error?s.message:String(s),s}}status(e){let t=[...this.active.values()].map(s=>s.emitter.snapshotStats()),r=s=>t.reduce((o,a)=>o+a[s],0);return{protocolVersion:T,state:this.unavailable?"unavailable":this.lastError?"error":this.active.size>0?"ready":"idle",requests:this.requests,sessionsCreated:this.sessionsCreated,sessionsReplaced:this.sessionsReplaced,initializations:r("initializations"),programUpdates:r("programUpdates"),documentsEmitted:r("documentsEmitted"),documentsRemoved:r("documentsRemoved"),...this.lastRequestAtMs===null?{}:{lastRequestAt:new Date(this.lastRequestAtMs).toISOString()},...this.lastDurationMs===null?{}:{lastDurationMs:this.lastDurationMs},...this.lastError?{lastError:this.lastError}:{},...e?{mailbox:e}:{}}}close(){this.active.clear()}emitterFor(e){let t=`${e.tsconfigPath}\0${e.projectArgument}`,r=this.active.get(t);if(r?.projectIdentity===e.projectIdentity)return r;let s=this.createEmitter({workspaceRoot:this.projectRoot,tsconfigPath:e.tsconfigPath,projectRoot:e.projectArgument});if(!s.available)throw this.unavailable=!0,new Error(s.reason);r&&(this.sessionsReplaced+=1);let o={projectIdentity:e.projectIdentity,emitter:s.emitter};return this.active.set(t,o),this.sessionsCreated+=1,o}};function Q(i){l(i)}var Z=`typescript-index-${process.pid}-${A()}`,I=c(process.pid),ee={pid:process.pid,...I?{processIdentity:I}:{}};import{randomUUID as _}from"crypto";import{resolve as R}from"path";var p=class{loadModule;discoverTsconfigs;createProjects;createProvider;db;module=null;projects=null;provider=null;stats={providerRequests:0,sessionsCreated:0,sessionsReused:0,sessionsRefreshed:0,sessionsReplaced:0,projectsCreated:0};constructor(e,t={}){this.db=e,this.loadModule=t.loadModule??v,this.discoverTsconfigs=t.discoverTsconfigs??P,this.createProjects=t.createProjects??b,this.createProvider=t.createProvider??((r,s,o)=>w(r,s,o,{reusedProjects:!0}))}semanticProvider(){return this.stats.providerRequests+=1,this.provider?(this.stats.sessionsReused+=1,this.provider):this.createSession()}advanceGeneration(e,t){let r=O(t);return this.provider?.dispose?.(),this.provider=null,this.db=e,this.projects?r.mode==="replace"?(this.projects=null,this.module=null,this.stats.sessionsReplaced+=1,r):(r.mode==="refresh"&&(B(this.projects,e.config.projectRoot,r),this.stats.sessionsRefreshed+=1),r):r}snapshotStats(){return{...this.stats}}dispose(){this.provider?.dispose?.(),this.provider=null,this.projects=null,this.module=null}createSession(){let e=this.module??this.loadModule();if(!e)return this.provider=d("ts-morph is not installed"),this.provider;if(this.module=e,!this.projects){let t=this.discoverTsconfigs(this.db);if(t.length===0)return this.provider=d("no tsconfig found"),this.provider;this.projects=this.createProjects(e,t),this.stats.projectsCreated+=this.projects.length}return this.provider=this.createProvider(this.db,e,this.projects),this.stats.sessionsCreated+=1,this.provider}};function O(i){let e=new Set;i.projectIdentityChanged&&e.add("project-identity-changed");for(let o of i.uncertainty)e.add(o);for(let o of i.changes)o.inputKind!=="source"&&e.add(`${o.inputKind}-input-changed`);if(e.size>0)return{mode:"replace",addedFiles:[],modifiedFiles:[],deletedFiles:[],reasons:[...e].sort()};let t=u(i.changes,"added"),r=u(i.changes,"modified"),s=u(i.changes,"deleted");return{mode:t.length+r.length+s.length===0?"reuse":"refresh",addedFiles:t,modifiedFiles:r,deletedFiles:s,reasons:[]}}function u(i,e){return i.filter(t=>t.kind===e).map(t=>t.path).sort()}function B(i,e,t){for(let r of i){for(let s of t.deletedFiles)r.project.getSourceFile(R(e,s))?.forget();for(let s of t.modifiedFiles){let o=r.project.getSourceFile(R(e,s));o&&o.refreshFromFileSystemSync()}t.addedFiles.length>0&&r.project.addSourceFilesFromTsConfig(r.tsconfigPath)}}var j=class{openDb;createHost;generationIdentity;readSnapshot;now;db=null;host=null;generation=null;snapshot=null;requests=0;lastRequestAtMs=null;lastError=null;available=null;constructor(e){this.openDb=e.openDb,this.createHost=e.createHost??(t=>new p(t)),this.generationIdentity=e.generationIdentity?t=>e.generationIdentity(t.config.dbPath):t=>t.generation.identity,this.readSnapshot=e.readSnapshot?t=>e.readSnapshot(t.config.dbPath):k,this.now=e.now??Date.now}handle(e,t){try{this.syncGeneration(e);let r=this.host.semanticProvider();switch(this.available=r.availability().available,this.requests+=1,this.lastRequestAtMs=this.now(),this.lastError=null,t.kind){case"availability":return r.availability();case"import-usage":return r.importUsage(t.file);case"references":return[...H(r,t.definitions,{exact:t.exact===!0})];case"reference-fragments":if(!r.referenceFragmentsForFiles)throw new Error("TypeScript provider does not support reference fragments.");return[...r.referenceFragmentsForFiles(t.files)];case"callees":return[...L(r,t.definitions)];case"signature":return r.signatureFor(t.definition);default:return Y(t)}}catch(r){throw this.lastError=r instanceof Error?r.message:String(r),r}}status(e){let t=this.host?.snapshotStats();return{protocolVersion:M,state:this.lastError?"error":this.host?this.available?"ready":"unavailable":"idle",requests:this.requests,...this.lastRequestAtMs===null?{}:{lastRequestAt:new Date(this.lastRequestAtMs).toISOString()},...this.lastError?{lastError:this.lastError}:{},sessionsCreated:t?.sessionsCreated??0,sessionsReused:t?.sessionsReused??0,sessionsRefreshed:t?.sessionsRefreshed??0,sessionsReplaced:t?.sessionsReplaced??0,projectsCreated:t?.projectsCreated??0,...e?{mailbox:e}:{}}}closeTypeScriptService(){this.host?.dispose(),this.db?.close(),this.host=null,this.db=null,this.generation=null,this.snapshot=null,this.available=null}syncGeneration(e){if(this.generation===e&&this.host&&this.db)return;let t=this.openDb(),r=this.generationIdentity(t);if(!r||r!==e)throw t.close(),new Error("TypeScript semantic request does not match the currently published index generation.");let s=this.readSnapshot(t);if(!this.host||!this.db)this.db=t,this.host=this.createHost(t);else{let o=this.db;this.host.advanceGeneration(t,G(this.snapshot,s)),this.db=t,o.close()}this.generation=r,this.snapshot=s,this.available=null}};function Se(i){l(i)}function H(i,e,t){return i.referencesForDefinitions?.(e,t)??new Map(e.map(r=>[r.symbolId,i.referencesFor(r)]))}function L(i,e){return i.calleesForDefinitions?.(e)??new Map(e.map(t=>[t.symbolId,i.calleesFor(t)]))}function k(i){if(!i.generation.metadataRaw)return null;let e=f(i.generation.metadataRaw);return e.kind!=="legacy"&&e.kind!=="supported"||!e.capabilities.usableForEvidenceCache?null:h(e.metadata.fingerprint)}function G(i,e){return e?S(i,e):{version:1,changes:[],projectIdentityChanged:!0,uncertainty:["prior-snapshot-unavailable"]}}function Y(i){throw new Error(`Unhandled TypeScript semantic request: ${JSON.stringify(i)}`)}var fe=`typescript-semantic-${process.pid}-${_()}`,x=c(process.pid),ye={pid:process.pid,...x?{processIdentity:x}:{}};export{E as a,Q as b,j as c,Se as d};
|
|
2
|
+
//# sourceMappingURL=chunk-EIBGSU2R.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as y}from"./chunk-
|
|
1
|
+
import{b as y}from"./chunk-VGWZ4MOY.js";import{a as v}from"./chunk-57OPIQFM.js";import{p as S}from"./chunk-J7AMBVWF.js";import{a as b}from"./chunk-SGMNWYTH.js";import{d as u,e as f,h as m,p,q as g}from"./chunk-GVAF222T.js";import{w as d}from"./chunk-7GAK2F3H.js";function q(e,t,i={}){let n=T(e,t,i);return{definitions:n.definitions,referencedBy:n.referencedBy.map(r=>({relativePath:r.relativePath,line:r.line,enclosingSymbol:r.enclosingSymbol,enclosingShort:r.enclosingShort}))}}function T(e,t,i={}){let n=R(e,t,i);return{definitions:n.definitions,referencedBy:n.referencedBy}}function R(e,t,i={}){let n=b(e,t);if(!n)return{definitions:[],referencedBy:[],referenceEvidence:[],claimSupport:null};let r=e.get("SELECT display_name, documentation FROM global_symbols WHERE id = ?",n.symbolId),c=g(r?.documentation??null),o=e.isIgnored(n.relativePath)?[]:[{relativePath:n.relativePath,startLine:n.startLine,endLine:n.endLine,signature:K(c,r?.display_name??null,n.symbol),source:B(e,n.relativePath,n.startLine,n.endLine)}],h=i.referenceContext??2,s=S(e,n,{semantic:i.semantic,semanticEvidence:v}).map(l=>{let a=y(e,l.file,l.line,h,f(n.symbol));return{relativePath:l.file,line:l.line,enclosingSymbol:l.enclosingSymbol,enclosingShort:l.enclosingSymbol?u(l.enclosingSymbol):"(top-level)",provenance:l.provenance,sourceStartLine:a?.startLine??null,sourceEndLine:a?.endLine??null,source:a?.source??null,sourceKind:a?.kind??"unavailable"}}),E=s.map(x);return{definitions:o,referencedBy:E,referenceEvidence:s.map(l=>({relativePath:l.relativePath,line:l.line,provenance:l.provenance,sourceKind:l.sourceKind})),claimSupport:P(s)}}function x(e){return{relativePath:e.relativePath,line:e.line,enclosingSymbol:e.enclosingSymbol,enclosingShort:e.enclosingShort,sourceStartLine:e.sourceStartLine,sourceEndLine:e.sourceEndLine,source:e.source}}function P(e){let t="resolved source-attributed or SCIP-indexed references to this exact symbol",i=["Dynamic dispatch, reflection, generated calls, and unindexed source are outside this scope."],n=e.filter(c=>c.sourceKind!=="complete-call-expression"&&c.sourceKind!=="non-call-reference"),r="direct, statically visible call expressions among the resolved reference sites";return{referenceAbsence:{status:"eligible",scope:t,limitations:i},callsitePredicates:n.length===0?{status:"eligible",scope:r,limitations:i}:{status:"ineligible",scope:r,reason:`${n.length} reference site(s) lack one unambiguous complete call expression.`,followup:L(n)}}}function L(e){let t=[...new Set(e.map(i=>`${i.relativePath}:${i.line+1}`))];return t.length===0||t.length>24?null:`codebaseiq inspect ${t.map(i=>`--at ${C(i)}`).join(" ")} --view behavior`}function C(e){return`'${e.replaceAll("'","'\\''")}'`}function B(e,t,i,n){let r=d(e,t);if(!r)return null;let o=r.split(`
|
|
2
2
|
`).slice(i,n+1).join(`
|
|
3
3
|
`).trimEnd();return o.length>0?o:null}function K(e,t,i){let n=p(e);if(n&&!A(n))return n;let r=(t??"").trim();return r?m(i)&&!r.endsWith("()")?`${r}()`:r:u(i)}function A(e){return e.startsWith("undefined")||e.includes("|")||e.includes("```")}export{q as a,T as b,R as c};
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
4
|
+
//# sourceMappingURL=chunk-ELYMY5S2.js.map
|