codebaseiq 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +65 -0
- package/dist/augment-vue-worker.js +1 -1
- package/dist/{chunk-7GAK2F3H.js → chunk-23AD24QZ.js} +12 -12
- package/dist/chunk-24TEZJST.js +2 -0
- package/dist/{chunk-356EZBIP.js → chunk-26EDDGAX.js} +2 -2
- package/dist/{chunk-O2M3VNDY.js → chunk-26EZWQ24.js} +2 -2
- package/dist/{chunk-U33PMPNW.js → chunk-2L3NCI52.js} +2 -2
- package/dist/{chunk-MSI3K7PJ.js → chunk-2QJAVISG.js} +2 -2
- package/dist/{chunk-4LK5OIPW.js → chunk-2ZBZRYX4.js} +2 -2
- package/dist/{chunk-JYRJYXUV.js → chunk-33AXWMO2.js} +2 -2
- package/dist/{chunk-EQNMD62X.js → chunk-37K55EG3.js} +2 -2
- package/dist/{chunk-LCW3PSGL.js → chunk-3EFZ5KQ4.js} +2 -2
- package/dist/{chunk-D7DOB27N.js → chunk-3F23W57G.js} +2 -2
- package/dist/{chunk-BGGB5N53.js → chunk-3GKKCVKK.js} +2 -2
- package/dist/{chunk-MQW6SJ4P.js → chunk-3SYRGMCL.js} +2 -2
- package/dist/{chunk-DWBAESVW.js → chunk-3VDL7GTY.js} +2 -2
- package/dist/{chunk-BFANZRQ5.js → chunk-3XBZ5PKL.js} +2 -2
- package/dist/{chunk-K6FNTQQW.js → chunk-42PXSE74.js} +2 -2
- package/dist/{chunk-ALOEHWJS.js → chunk-4GIERC2P.js} +2 -2
- package/dist/{chunk-W7YLRXZE.js → chunk-4UXDBRIF.js} +2 -2
- package/dist/chunk-4XMZYLW5.js +2 -0
- package/dist/{chunk-JSB43EX6.js → chunk-55NUXP2V.js} +2 -2
- package/dist/chunk-5AJQCOZZ.js +21 -0
- package/dist/{chunk-L37EQYAX.js → chunk-5NUPFZFA.js} +2 -2
- package/dist/{chunk-PIFYOWS4.js → chunk-65QIFIF6.js} +2 -2
- package/dist/{chunk-SUE7SHZL.js → chunk-66Q5VLH6.js} +2 -2
- package/dist/{chunk-KFTHI2R6.js → chunk-6CQPIIS7.js} +2 -2
- package/dist/{chunk-GV2CEZCW.js → chunk-6CTSFS7R.js} +2 -2
- package/dist/{chunk-SB53KPWA.js → chunk-6EBUAKJT.js} +2 -2
- package/dist/chunk-6I55VYFG.js +4 -0
- package/dist/chunk-6NUURWPF.js +3 -0
- package/dist/{chunk-TEMM2FEL.js → chunk-6P5QMOM7.js} +2 -2
- package/dist/{chunk-3LQJRS4I.js → chunk-6S5FE4ZF.js} +2 -2
- package/dist/chunk-74LRKLNC.js +22 -0
- package/dist/{chunk-NNG6M6XD.js → chunk-75A23IID.js} +2 -2
- package/dist/chunk-75VNTSO6.js +7 -0
- package/dist/chunk-7HBBVZJ6.js +3 -0
- package/dist/{chunk-AGGR2BKS.js → chunk-7PPBMBH6.js} +2 -2
- package/dist/{chunk-DECN422G.js → chunk-7WG57A5X.js} +2 -2
- package/dist/{chunk-ILGTMRMZ.js → chunk-7XHZX6FX.js} +2 -2
- package/dist/{chunk-OKAF4OQS.js → chunk-A5HJ3CJW.js} +2 -2
- package/dist/{chunk-JNXI6NQ7.js → chunk-AJ5HVC5Z.js} +2 -2
- package/dist/{chunk-SZ4P7MF7.js → chunk-AYRHOFLV.js} +2 -2
- package/dist/chunk-AZDY3EKD.js +93 -0
- package/dist/{chunk-SA7G6GJX.js → chunk-AZZNG5Z2.js} +2 -2
- package/dist/chunk-BEKCTUPY.js +3 -0
- package/dist/{chunk-PTR3EOXC.js → chunk-BKKX2OU5.js} +2 -2
- package/dist/{chunk-5LL4KEHO.js → chunk-BQKRYKDD.js} +2 -2
- package/dist/{chunk-UIAUPFBJ.js → chunk-BVDQU2XJ.js} +2 -2
- package/dist/chunk-C3PPB2T5.js +5 -0
- package/dist/chunk-CABIZQXQ.js +21 -0
- package/dist/{chunk-M2Y6PCFE.js → chunk-CAH322MC.js} +2 -2
- package/dist/{chunk-EIBGSU2R.js → chunk-CBOOHUK4.js} +2 -2
- package/dist/chunk-CFIICAOM.js +2 -0
- package/dist/{chunk-UMEPSVKT.js → chunk-CPWYEPWQ.js} +2 -2
- package/dist/{chunk-LQHYYIOB.js → chunk-CRT7I7RJ.js} +2 -2
- package/dist/{chunk-IZDPGOZR.js → chunk-CZVSQQDU.js} +2 -2
- package/dist/{chunk-TNJGTQWO.js → chunk-D3KE26FS.js} +2 -2
- package/dist/{chunk-CB5AVJMM.js → chunk-DNRHRVKS.js} +2 -2
- package/dist/{chunk-SGMNWYTH.js → chunk-DOQLO74K.js} +2 -2
- package/dist/{chunk-DDRA3QKN.js → chunk-DP3EJ6XL.js} +2 -2
- package/dist/{chunk-OWJWOEDU.js → chunk-DQZF7MP6.js} +2 -2
- package/dist/{chunk-VSGOIZMQ.js → chunk-DTM4EHD2.js} +2 -2
- package/dist/{chunk-YRKP7PM7.js → chunk-DUM7GR6B.js} +2 -2
- package/dist/{chunk-HNXRVGMY.js → chunk-DZ4QOIRY.js} +2 -2
- package/dist/{chunk-CSPDQLLU.js → chunk-E3R6TJ5T.js} +2 -2
- package/dist/chunk-E4DP45YU.js +3 -0
- package/dist/{chunk-PUVNH4PO.js → chunk-E5U6N5WI.js} +2 -2
- package/dist/chunk-E7T22WET.js +21 -0
- package/dist/{chunk-QEOWONKY.js → chunk-ED7ZAZ5V.js} +2 -2
- package/dist/{chunk-RCIGX23V.js → chunk-EDMG5CSO.js} +2 -2
- package/dist/{chunk-IHSLIIL3.js → chunk-EOSUV7H5.js} +2 -2
- package/dist/{chunk-EHPOTEQX.js → chunk-ESWVTSHU.js} +2 -2
- package/dist/{chunk-57OPIQFM.js → chunk-ETZBIG6K.js} +2 -2
- package/dist/chunk-EYSJHKX6.js +3 -0
- package/dist/{chunk-MC46AL7B.js → chunk-F4AGM7ZE.js} +37 -37
- package/dist/{chunk-EOKVZXNF.js → chunk-FPUJRBHL.js} +55 -55
- package/dist/{chunk-CCIYWXX6.js → chunk-G2UU6PQP.js} +2 -2
- package/dist/{chunk-C6WKPKCF.js → chunk-G3KRXNNT.js} +2 -2
- package/dist/{chunk-TEANKHUU.js → chunk-G3ZBP72R.js} +2 -2
- package/dist/{chunk-ELYMY5S2.js → chunk-GC4I33OD.js} +2 -2
- package/dist/{chunk-NDKOVQFG.js → chunk-GLXEWYQY.js} +2 -2
- package/dist/{chunk-CYJS33YX.js → chunk-GRHNPFHT.js} +2 -2
- package/dist/{chunk-QY7QB7I6.js → chunk-GWESWURK.js} +2 -2
- package/dist/{chunk-R4OJGTMP.js → chunk-GXOFPAIR.js} +2 -2
- package/dist/{chunk-OBC7HSSO.js → chunk-H4FGIFEU.js} +2 -2
- package/dist/{chunk-LKUTSP4G.js → chunk-HOGS6JFP.js} +2 -2
- package/dist/{chunk-RIO3JXHM.js → chunk-HSJLK5MC.js} +2 -2
- package/dist/{chunk-BWL3PMPT.js → chunk-HTPEUJ42.js} +2 -2
- package/dist/{chunk-DJKOXMNG.js → chunk-IBPXUGJV.js} +2 -2
- package/dist/{chunk-2XBJRZEM.js → chunk-ITA3N7G6.js} +2 -2
- package/dist/chunk-JG5OWAEB.js +22 -0
- package/dist/{chunk-LSZYMN2A.js → chunk-JGJKRTTB.js} +2 -2
- package/dist/{chunk-TJWVT4DO.js → chunk-JGXLB7PR.js} +2 -2
- package/dist/{chunk-5TZNHP4T.js → chunk-JKUF2UG6.js} +2 -2
- package/dist/{chunk-CIYA2KZN.js → chunk-JOYASZRF.js} +2 -2
- package/dist/{chunk-U7NUXDQO.js → chunk-K3PFL5QQ.js} +2 -2
- package/dist/{chunk-WK2IQJPK.js → chunk-KAXBWTSX.js} +2 -2
- package/dist/{chunk-5ZI2PPI7.js → chunk-KHHAGHAW.js} +2 -2
- package/dist/{chunk-UW6KD57C.js → chunk-KJLUQVBG.js} +2 -2
- package/dist/{chunk-WWCV4E6J.js → chunk-KOVUXHIZ.js} +2 -2
- package/dist/chunk-KPMMOAV5.js +4 -0
- package/dist/{chunk-2Z7K66D7.js → chunk-LKJZNGMA.js} +2 -2
- package/dist/{chunk-3VJ3OCRE.js → chunk-LMPOC372.js} +2 -2
- package/dist/{chunk-F3QSL4W2.js → chunk-LTPNP6D5.js} +2 -2
- package/dist/{chunk-O2KWU34K.js → chunk-M3IBH6C3.js} +9 -9
- package/dist/{chunk-UJIXCI3L.js → chunk-MAGBSB6E.js} +2 -2
- package/dist/{chunk-QMOZZ2VX.js → chunk-MFMHD36E.js} +2 -2
- package/dist/{chunk-LMTSB3TB.js → chunk-MJX2J5QE.js} +2 -2
- package/dist/{chunk-WO6OFKUC.js → chunk-N26LGGSF.js} +2 -2
- package/dist/{chunk-J7AMBVWF.js → chunk-NB2DAVPP.js} +2 -2
- package/dist/{chunk-MDFT325O.js → chunk-NJDXNYLG.js} +2 -2
- package/dist/{chunk-BRQL7AFJ.js → chunk-NMKQOIYZ.js} +2 -2
- package/dist/{chunk-ICUL7XRT.js → chunk-NRNVMB2R.js} +2 -2
- package/dist/{chunk-JAFDMV5I.js → chunk-O5BWFNIH.js} +2 -2
- package/dist/{chunk-3H2H5ODK.js → chunk-O7PCDZ5B.js} +2 -2
- package/dist/{chunk-KPZGTB2O.js → chunk-OAJYNPRU.js} +2 -2
- package/dist/{chunk-KUKWHP4R.js → chunk-OFUC6R46.js} +2 -2
- package/dist/chunk-OSZ7PW5K.js +5 -0
- package/dist/{chunk-B3UYV66Z.js → chunk-OZ2M2X7A.js} +2 -2
- package/dist/{chunk-6O3KXIDL.js → chunk-OZI44VCR.js} +2 -2
- package/dist/{chunk-XN3EKMLI.js → chunk-PCKIKOUA.js} +2 -2
- package/dist/{chunk-I3OK27P7.js → chunk-PFMQRHC6.js} +2 -2
- package/dist/{chunk-K4S2VH42.js → chunk-PVKSZBX5.js} +2 -2
- package/dist/{chunk-NEWHKGVD.js → chunk-QANCT4MO.js} +2 -2
- package/dist/{chunk-ZNH33XIB.js → chunk-QEWN7BLP.js} +2 -2
- package/dist/{chunk-OQUCBKOI.js → chunk-QFJ46F6F.js} +2 -2
- package/dist/{chunk-2E6OUPCF.js → chunk-QPQWR6CW.js} +2 -2
- package/dist/{chunk-YTJHCGYB.js → chunk-QX4HDF2I.js} +2 -2
- package/dist/{chunk-KLX6NSWT.js → chunk-R2F2CTBA.js} +2 -2
- package/dist/{chunk-2OMXFE64.js → chunk-R7PXHYMY.js} +2 -2
- package/dist/{chunk-F74LZWCE.js → chunk-RGBZDOUO.js} +2 -2
- package/dist/{chunk-362QOSFD.js → chunk-RNPG5P4P.js} +2 -2
- package/dist/{chunk-D62CTZX6.js → chunk-RS6UYNEP.js} +2 -2
- package/dist/{chunk-VGWZ4MOY.js → chunk-RVBRPBLQ.js} +2 -2
- package/dist/{chunk-BGYRF5YX.js → chunk-RWAZCEJD.js} +2 -2
- package/dist/{chunk-Z66XYVLZ.js → chunk-RWDIONS7.js} +2 -2
- package/dist/{chunk-CJTKGAGH.js → chunk-S3CJYDXP.js} +2 -2
- package/dist/{chunk-53ELMZRF.js → chunk-S6UTKCBT.js} +2 -2
- package/dist/chunk-SLLFJXTW.js +27 -0
- package/dist/{chunk-TOTWJZIX.js → chunk-T3KTMLQT.js} +2 -2
- package/dist/{chunk-HJTM3C4Y.js → chunk-TB575ZGO.js} +2 -2
- package/dist/{chunk-YHPG3S2U.js → chunk-TG4GMU73.js} +2 -2
- package/dist/{chunk-N2XDMNVI.js → chunk-THKM7OXM.js} +2 -2
- package/dist/{chunk-GVAF222T.js → chunk-TNLOX4TN.js} +2 -2
- package/dist/{chunk-BPKNP3KZ.js → chunk-UHFZDQZJ.js} +2 -2
- package/dist/{chunk-YT4DVWUV.js → chunk-UUMAM5LM.js} +2 -2
- package/dist/{chunk-TLTSESB4.js → chunk-UUT5P3V7.js} +2 -2
- package/dist/{chunk-W7QDASTN.js → chunk-VEPK6M5C.js} +2 -2
- package/dist/{chunk-XJBK3QDV.js → chunk-VPCHKZ3I.js} +2 -2
- package/dist/{chunk-3ON3A2QV.js → chunk-VZY3XOBU.js} +2 -2
- package/dist/{chunk-XQAVQVIL.js → chunk-W6E6ME7G.js} +2 -2
- package/dist/{chunk-KEJ2HLRW.js → chunk-WGYZBS5S.js} +2 -2
- package/dist/{chunk-5MPBSFZH.js → chunk-WUP24Q4U.js} +2 -2
- package/dist/chunk-WXUHXSLN.js +2 -0
- package/dist/{chunk-F5CJO5JN.js → chunk-X4YZD2MP.js} +2 -2
- package/dist/chunk-XARPGCTL.js +2 -0
- package/dist/{chunk-5FWR5HLG.js → chunk-XDQ6QJF5.js} +20 -20
- package/dist/{chunk-JCMFBF4Z.js → chunk-XRH7R5SX.js} +2 -2
- package/dist/{chunk-T2M5HWBQ.js → chunk-XVJ2E7W7.js} +2 -2
- package/dist/{chunk-AXQCHG77.js → chunk-Y7GFAU5N.js} +2 -2
- package/dist/{chunk-T6MQNNAC.js → chunk-YBDLHFZZ.js} +2 -2
- package/dist/{chunk-ZB4C5TTR.js → chunk-YI3CJPOY.js} +2 -2
- package/dist/chunk-YMAGXBLT.js +3 -0
- package/dist/{chunk-MZNMASFM.js → chunk-YRAGNEBZ.js} +2 -2
- package/dist/chunk-YXZAAQHZ.js +3 -0
- package/dist/chunk-Z2L5H2HF.js +3 -0
- package/dist/{chunk-5CR4U5X2.js → chunk-ZHK7TVAJ.js} +2 -2
- package/dist/chunk-ZJNV27DZ.js +4 -0
- package/dist/{chunk-GQLDYCWS.js → chunk-ZQ6GAIUV.js} +2 -2
- package/dist/{chunk-4GWN76B2.js → chunk-ZQE2QYAC.js} +2 -2
- package/dist/chunk-ZUQ2MDFT.js +2 -0
- package/dist/cli-context-4R2LREXQ.js +3 -0
- package/dist/cli-context-6X7JYARX.js +2 -0
- package/dist/cli-failure-RECEHOM2.js +3 -0
- package/dist/cli-program-MXA3WTAO.js +7 -0
- package/dist/cli.js +1 -1
- package/dist/{code-viewer-AMRXV444.js → code-viewer-C6HE4DFC.js} +2 -2
- package/dist/{code-viewer-EXI5SFFR.js → code-viewer-XHSSAMBX.js} +2 -2
- package/dist/{command-descriptors-ROIOTCCW.js → command-descriptors-NWW34Z54.js} +171 -171
- package/dist/{command-descriptors-H6A4UY72.js → command-descriptors-XHK3PK2I.js} +116 -116
- package/dist/{command-panels-SZONPMLJ.js → command-panels-OXMCJ2QZ.js} +2 -2
- package/dist/direct-navigation-236VXYBZ.js +3 -0
- package/dist/direct-navigation-36YSILY6.js +2 -0
- package/dist/index.js +1 -1
- package/dist/invocation-command-descriptors-35JULLNR.js +3 -0
- package/dist/invocation-command-descriptors-FEWSFUO2.js +2 -0
- package/dist/output-continuation-command-MJBVH3A5.js +2 -0
- package/dist/output-continuation-command-TBXIOPHQ.js +3 -0
- package/dist/project-reindex-5TCGOVSK.js +2 -0
- package/dist/project-reindex-BUNTSYKM.js +3 -0
- package/dist/queries/affected.js +1 -1
- package/dist/queries/anchors.js +1 -1
- package/dist/queries/architecture.js +1 -1
- package/dist/queries/bottlenecks.js +1 -1
- package/dist/queries/by-kind.js +1 -1
- package/dist/queries/call-graph.js +1 -1
- package/dist/queries/change-surface.js +1 -1
- package/dist/queries/cleanup-plan.js +1 -1
- package/dist/queries/co-change.js +1 -1
- package/dist/queries/code.js +1 -1
- package/dist/queries/complexity-hotspots.js +1 -1
- package/dist/queries/complexity.js +1 -1
- package/dist/queries/context.js +1 -1
- package/dist/queries/convergence.js +1 -1
- package/dist/queries/coupling.js +1 -1
- package/dist/queries/cycles.js +1 -1
- package/dist/queries/dataflow.js +1 -1
- package/dist/queries/dead.js +1 -1
- package/dist/queries/decorative-checkers.js +1 -1
- package/dist/queries/deep-chains.js +1 -1
- package/dist/queries/dependence-slice.js +1 -1
- package/dist/queries/dependency-depth.js +1 -1
- package/dist/queries/deps.js +1 -1
- package/dist/queries/diff-impact.js +1 -1
- package/dist/queries/doc-drift.js +1 -1
- package/dist/queries/drift.js +1 -1
- package/dist/queries/duplicate-bodies.js +1 -1
- package/dist/queries/entry-map.js +1 -1
- package/dist/queries/evidence.js +1 -1
- package/dist/queries/extract-candidates.js +1 -1
- package/dist/queries/fan.js +1 -1
- package/dist/queries/files.js +1 -1
- package/dist/queries/health.js +1 -1
- package/dist/queries/hierarchy.js +1 -1
- package/dist/queries/hotspots.js +1 -1
- package/dist/queries/imports.js +1 -1
- package/dist/queries/incomplete-migration.js +1 -1
- package/dist/queries/index.js +1 -1
- package/dist/queries/isolated.js +1 -1
- package/dist/queries/locality-candidates.js +1 -1
- package/dist/queries/members.js +1 -1
- package/dist/queries/methods.js +1 -1
- package/dist/queries/not-implemented.js +1 -1
- package/dist/queries/outline.js +1 -1
- package/dist/queries/passthrough-candidates.js +1 -1
- package/dist/queries/plan-context.js +1 -1
- package/dist/queries/react-component-duplicates.js +1 -1
- package/dist/queries/react-hook-candidates.js +1 -1
- package/dist/queries/react-large-component-pressure.js +1 -1
- package/dist/queries/recent-duplicates.js +1 -1
- package/dist/queries/redundant-reexports.js +1 -1
- package/dist/queries/reference-neighborhood.js +1 -1
- package/dist/queries/reference-reachability.js +1 -1
- package/dist/queries/refs.js +1 -1
- package/dist/queries/self-audit.js +1 -1
- package/dist/queries/similar-chains.js +1 -1
- package/dist/queries/similar-files.js +1 -1
- package/dist/queries/similar-signatures.js +1 -1
- package/dist/queries/similar.js +1 -1
- package/dist/queries/slice.js +1 -1
- package/dist/queries/source-inspection.js +1 -1
- package/dist/queries/source-search.js +1 -1
- package/dist/queries/stale-abstractions.js +1 -1
- package/dist/queries/surface.js +1 -1
- package/dist/queries/symbols.js +1 -1
- package/dist/queries/system-map.js +1 -1
- package/dist/queries/system.js +1 -1
- package/dist/queries/test-quality.js +1 -1
- package/dist/queries/trace.js +1 -1
- package/dist/queries/twin-ab.js +1 -1
- package/dist/queries/twin-drift.js +1 -1
- package/dist/queries/unused-imports.js +1 -1
- package/dist/queries/unused-params.js +1 -1
- package/dist/queries/value-flow.js +1 -1
- package/dist/queries/vue-component-duplicates.js +1 -1
- package/dist/queries/vue-composable-candidates.js +1 -1
- package/dist/queries/vue-large-view-pressure.js +1 -1
- package/dist/queries/wrapper-candidates.js +1 -1
- package/dist/reindex-worker.js +1 -1
- package/dist/reindex.js +30 -30
- package/dist/runtime.js +1 -1
- 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-3MZCLPQY.js +2 -0
- package/dist/sentinel-ensure-command-LEWHIRLL.js +3 -0
- package/dist/sentinel-worker.js +1 -1
- package/dist/typescript-mailbox-worker.js +1 -1
- package/dist/watch-server.js +6 -6
- package/docs/COMMAND_REFERENCE.md +2 -2
- package/docs/SECURITY_MODEL.md +3 -0
- package/package.json +1 -1
- package/skills/codebaseiq/SKILL.md +15 -3
- package/dist/chunk-2I2UHZET.js +0 -2
- package/dist/chunk-5T44HG5Y.js +0 -88
- package/dist/chunk-5YBDBY5L.js +0 -2
- package/dist/chunk-6EYESTJM.js +0 -3
- package/dist/chunk-6FXXYYQM.js +0 -22
- package/dist/chunk-7UCDGXRW.js +0 -8
- package/dist/chunk-BIADXGC3.js +0 -22
- package/dist/chunk-CLPCFGRT.js +0 -3
- package/dist/chunk-DUKHVPU5.js +0 -4
- package/dist/chunk-G7GVV2TV.js +0 -27
- package/dist/chunk-KUKKLWJD.js +0 -3
- package/dist/chunk-KWRQVLPX.js +0 -3
- package/dist/chunk-MEUHIDI3.js +0 -7
- package/dist/chunk-OP6BUIV6.js +0 -2
- package/dist/chunk-OQ3DK7FW.js +0 -2
- package/dist/chunk-OT5ISJSR.js +0 -2
- package/dist/chunk-SX72EVMY.js +0 -3
- package/dist/chunk-T75DS2E6.js +0 -21
- package/dist/chunk-UC2FD2PS.js +0 -4
- package/dist/chunk-UQYQBLJX.js +0 -5
- package/dist/chunk-V4NGDIEA.js +0 -21
- package/dist/chunk-XUPFA6GH.js +0 -2
- package/dist/chunk-YPBKBYPS.js +0 -21
- package/dist/chunk-ZMA5HWXY.js +0 -3
- package/dist/cli-context-FJL2JHOE.js +0 -3
- package/dist/cli-context-PQNWHMCQ.js +0 -2
- package/dist/cli-program-SCHOHOQE.js +0 -7
- package/dist/direct-navigation-3JOYP2MO.js +0 -3
- package/dist/direct-navigation-SJMJLBY7.js +0 -2
- package/dist/invocation-command-descriptors-GMZX3UAD.js +0 -2
- package/dist/invocation-command-descriptors-HNMKDEF6.js +0 -3
- package/dist/output-continuation-command-5NWVDQT7.js +0 -2
- package/dist/output-continuation-command-RNEHNYPU.js +0 -3
- package/dist/project-reindex-MIW5CYEG.js +0 -3
- package/dist/project-reindex-VQ23LWDA.js +0 -2
- package/dist/sentinel-ensure-command-H66AZ3VE.js +0 -2
- package/dist/sentinel-ensure-command-R4YAUCJB.js +0 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as O}from"./chunk-P5XHIJHI.js";import{h as H,t as v,v as M}from"./chunk-
|
|
1
|
+
import{a as O}from"./chunk-P5XHIJHI.js";import{h as H,t as v,v as M}from"./chunk-23AD24QZ.js";import{execFileSync as U}from"child_process";var L=2e3,S=50,J=64,V=8,W=3,X=2160*60*60,Y=/\b(?:fix(?:es|ed)?|bug|regression|hotfix)\b/i,Z=3,Q=/#\d+|\b[A-Z][A-Z0-9]+-\d+\b/g,q=/^([a-z][a-z0-9-]+)(?:\([^)]+\))?!?:/i;function tt(t){let e=H(t,{clearGroups:["whole-project"]});return(i,n,r)=>{let o=r??P(i.config.projectRoot);if(!o)return null;let s=e.has(i)?e.get(i,()=>({head:"",value:null})):null;return s&&s.head===o?s.value:(e.invalidate(i),e.get(i,()=>({head:o,value:n(i.config.projectRoot,o)})).value)}}function F(t){let e=H(t,{clearGroups:["whole-project"]});return(i,n,r,o)=>{let s=o??P(i.config.projectRoot);if(!s)return null;let c=e.has(i)?e.get(i,()=>({head:"",values:new Map})):null;(!c||c.head!==s)&&e.invalidate(i);let l=e.get(i,()=>({head:s,values:new Map}));if(l.values.has(n))return l.values.get(n)??null;let d=r(i.config.projectRoot,s);return l.values.set(n,d),d}}var et=F("git-commit-history");function nt(t,e={}){let i=e.historyMode??"bounded",n=e.head;return{capability:r=>it(t,r,n),commitHistory:()=>x(t,i,n),fileChurn:()=>st(t,i,n),changeAmplification:()=>at(t,i,n),trackedFiles:()=>lt(t,n),fileAddRecords:()=>dt(t,i,n),coChangePairs:(r={})=>bt(t,r,i,n),coChangePairsForFiles:(r,o={})=>z(t,r,o,i,n),directionalCoChangePairsForFiles:(r,o={})=>yt(t,r,o,i,n)}}function x(t,e="bounded",i){return et(t,y(e),(n,r)=>rt(n,r,e),i)}function it(t,e,i){let n=i??P(t.config.projectRoot);return n?{slot:e,available:!0,head:n}:{slot:e,available:!1,head:null,reason:"git history is unavailable for this project"}}function P(t){try{return C(t,["rev-parse","HEAD"]).trim()||null}catch{return null}}function C(t,e){return U("git",["-C",t,...e],{encoding:"utf-8",maxBuffer:64*1024*1024,stdio:["ignore","pipe","ignore"],windowsHide:!0,timeout:3e4,killSignal:"SIGKILL"})}function rt(t,e,i){let n;try{n=C(t,["log","--no-merges","--name-only",...R(i),"--pretty=format:%x01%H%x00%ct%x00%s"])}catch{return null}return{head:e,...w(n,S)}}function ot(t){return Y.test(t.subject)}function st(t,e,i){let n=x(t,e,i);if(!n)return null;let r=new Map;for(let o of n.commits){let s=ot(o);for(let c of o.files){let l=r.get(c)??{changes:0,fixChanges:0,lastChangedAt:0};l.changes+=1,s&&(l.fixChanges+=1),o.timestamp>l.lastChangedAt&&(l.lastChangedAt=o.timestamp),r.set(c,l)}}return r}function at(t,e,i){let n=x(t,e,i);if(!n||n.commits.length===0)return null;let r=n.commits.map(o=>o.files.length).filter(o=>o>0).sort((o,s)=>o-s);return r.length===0?null:{medianFilesPerCommit:D(r,.5),p90FilesPerCommit:D(r,.9),commitsAnalyzed:r.length}}function D(t,e){let i=Math.min(t.length-1,Math.floor(t.length*e));return t[i]}var ct=tt("git-tracked-files");function lt(t,e){return ct(t,i=>{try{let n=C(i,["ls-files"]);return new Set(n.split(`
|
|
2
2
|
`).map(r=>r.trim()).filter(r=>r!==""))}catch{return null}},e)}var ut=F("git-file-adds"),_="__git__/file-adds",k=v({kind:"git-file-adds",invalidation:M("git-file-adds"),serialize:gt,deserialize:ft});function Ot(t){return nt(t).fileAddRecords()}function dt(t,e,i){let n=y(e);return ut(t,n,(r,o)=>mt(t,r,o,e),i)}function mt(t,e,i,n){let r=k.read(t,I(n),i);if(r)return r;let o=ht(e,n);return o&&k.write(t,I(n),i,o),o}function gt(t){return JSON.stringify([...t.entries()])}function ft(t){if(!t)return null;try{let e=JSON.parse(t);if(!Array.isArray(e))return null;let i=new Map;for(let n of e){if(!Array.isArray(n)||n.length!==2||typeof n[0]!="string")return null;let r=n[1];if(!r||typeof r.commitsAgo!="number"||!Number.isFinite(r.commitsAgo)||typeof r.addedAt!="number"||!Number.isFinite(r.addedAt))return null;i.set(n[0],{commitsAgo:r.commitsAgo,addedAt:r.addedAt})}return i}catch{return null}}function ht(t,e){let i;try{i=C(t,["log","--no-merges","--find-renames","--name-status",...R(e),"--pretty=format:%x01%H%x00%ct%x00%s"])}catch{return null}let n=new Map,r=new Map,o=-1;for(let s of i.split("")){if(s.trim()==="")continue;o+=1;let c=s.indexOf(`
|
|
3
3
|
`),l=c>=0?s.slice(0,c):s,[,d]=l.split("\0"),f=Number(d)||0;if(!(c<0))for(let u of s.slice(c+1).split(`
|
|
4
4
|
`)){let a=pt(u);if(!a)continue;if(a.status==="R"&&a.from&&a.to){let p=r.get(a.to)??new Set([a.to]);r.set(a.from,p);continue}if(a.status!=="A"||!a.to)continue;let m={commitsAgo:o,addedAt:f};n.set(a.to,m);for(let p of r.get(a.to)??[])n.set(p,m)}}return n}function pt(t){let e=t.trim().split(" "),i=e[0]??"";if(!i)return null;let n=i[0]??"";if(n==="R"){let o=e[1],s=e[2];return o&&s?{status:n,from:o,to:s}:null}let r=e[1];return r?{status:n,to:r}:null}var j=F("git-co-change-pairs"),Ct=F("git-directional-co-change-pairs");function bt(t,e,i,n){let r=`all\0${y(i)}\0${T(e)}`,o=j(t,r,()=>{let s=x(t,i,n);return s?G(s,e):null},n);return o&&[...o]}function z(t,e,i,n,r){if(e.size===0)return[];let o=`files\0${y(n)}\0${B(e)}\0${T(i)}`,s=j(t,o,()=>{let c=x(t,n,r);return c?G(c,i,e):null},r);return s&&[...s]}function yt(t,e,i,n,r){if(e.size===0)return[];let o=i.maxFilesPerCommit??S;if(e.size>J)return z(t,e,i,n,r);let s=`directional\0${y(n)}\0${B(e)}\0${T({...i,maxFilesPerCommit:o})}`,c=Ct(t,s,(l,d)=>{let f=At(l,d,e,o,n);return f?G(f,i,e):null},r);return c&&[...c]}function T(t){let e=t.minTogether??4,i=t.minConfidence??.6,n=t.maxFilesPerCommit??S;return`${e}\0${i}\0${n}`}function B(t){return[...t].sort().join("\0")}function G(t,e,i){let{minTogether:n=4,minConfidence:r=.6,maxFilesPerCommit:o=S}=e,s=new Map,c=new Map,l=t.newestAnalyzedAt??0;for(let u of t.commits){let a=[...new Set(u.files)].sort();if(a.length>o)continue;t.newestAnalyzedAt===void 0&&u.timestamp>l&&(l=u.timestamp);let m=Ft(a),p=i===void 0||a.some(g=>i.has(g));for(let g of a)s.set(g,(s.get(g)??0)+1);if(p)for(let g=0;g<a.length;g++)for(let b=g+1;b<a.length;b++){if(i&&!i.has(a[g])&&!i.has(a[b]))continue;let A=`${a[g]}\0${a[b]}`,h=c.get(A)??{together:0,focusedTogether:0,broadTogether:0,lastTogetherAt:0,timestamps:[],subjects:[]};h.together+=1,m?h.broadTogether+=1:h.focusedTogether+=1,u.timestamp>h.lastTogetherAt&&(h.lastTogetherAt=u.timestamp),h.timestamps.push(u.timestamp),h.subjects.push(u.subject),c.set(A,h)}}let d=[],f=l-X;for(let[u,a]of c){let m=a.together;if(m<n)continue;let[p,g]=u.split("\0"),b=s.get(p)??m,A=s.get(g)??m,h=Math.max(m/b,m/A);if(h<r)continue;let $=a.broadTogether/m,E=a.timestamps.filter(K=>K>=f).length;d.push({fileA:p,fileB:g,together:m,confidence:h,changesA:b,changesB:A,focusedTogether:a.focusedTogether,broadTogether:a.broadTogether,broadCommitRatio:$,lastTogetherAt:a.lastTogetherAt,recentTogether:E,commitScope:Ht(a.broadTogether,m),recency:E>0?"recent":"stale",subjectContext:Pt(a.subjects)})}return d.sort((u,a)=>a.together-u.together||a.confidence-u.confidence||u.fileA.localeCompare(a.fileA)),d}function At(t,e,i,n,r){let o;try{o=xt(t,r)}catch{return null}if(o.length===0)return{head:e,commits:[],skippedBulkCommits:0,newestAnalyzedAt:0};let s;try{s=C(t,["log","--no-merges","--format=%H",...R(r),"--",...[...i].sort()])}catch{return null}let c=new Set(o.map(a=>a.hash)),l=s.split(`
|
|
@@ -6,4 +6,4 @@ import{a as O}from"./chunk-P5XHIJHI.js";import{h as H,t as v,v as M}from"./chunk
|
|
|
6
6
|
`).map(n=>n.trim()).filter(n=>n!=="").map(n=>{let[r,o]=n.split("\0");return{hash:r??"",timestamp:Number(o)||0}}).filter(n=>n.hash!=="")}function R(t){return t==="full"?[]:["-n",String(N())]}function N(){return O(process.env.CODEBASEIQ_GIT_HISTORY_MAX_COMMITS)??L}function y(t){return t==="full"?"full":`bounded:${N()}`}function I(t){let e=y(t);return e===`bounded:${L}`?_:`${_}:${e}`}function St(t,e,i){for(let r=0;r<e.length;r+=20){let o=e.slice(r,r+20),s;try{s=C(t,["show","--no-walk=unsorted","--name-only","--pretty=format:%x01%H%x00%ct%x00%s",...o.map(l=>l.hash)])}catch{return e[0]?.timestamp??0}let c=w(s,i);if(c.commits.length>0)return c.commits[0].timestamp}return 0}function w(t,e){let i=[],n=0;for(let r of t.split("")){if(r.trim()==="")continue;let o=r.indexOf(`
|
|
7
7
|
`),s=o>=0?r.slice(0,o):r,[c,l,d]=s.split("\0");if(!c||!l)continue;let f=o>=0?r.slice(o+1).split(`
|
|
8
8
|
`).map(u=>u.trim()).filter(u=>u!==""):[];if(f.length>e){n+=1;continue}i.push({hash:c,timestamp:Number(l)||0,subject:d??"",files:f})}return{commits:i,skippedBulkCommits:n}}function Ft(t){return t.length>=V?!0:Rt(t).size>=W}function Rt(t){let e=new Set;for(let i of t){let n=i.indexOf("/");e.add(n>=0?i.slice(0,n):".")}return e}function Ht(t,e){return t===0?"focused":t/e>=.5?"broad-sweep":"mixed"}function Pt(t){let e=new Set,i=[],n=[];for(let r of t){!n.includes(r)&&n.length<Z&&n.push(r);for(let o of Tt(r))e.add(o);for(let o of r.match(Q)??[])i.includes(o)||i.push(o)}return{subjectLabels:[...e].sort(),issueRefs:i,sampleSubjects:n,externalIssueLabelStatus:"unavailable"}}function Tt(t){let e=new Set,i=q.exec(t)?.[1]?.toLowerCase();return i&&e.add(Gt(i)),/\b(?:feat|feature)\b/i.test(t)&&e.add("feature"),/\b(?:fix(?:es|ed)?|bug|regression|hotfix)\b/i.test(t)&&e.add("fix"),/\b(?:docs?|documentation|guide|readme)\b/i.test(t)&&e.add("docs"),/\brefactor(?:ing|ed)?\b/i.test(t)&&e.add("refactor"),/\btests?\b/i.test(t)&&e.add("test"),/\b(?:release|version|v\d+\.\d+)\b/i.test(t)&&e.add("release"),/\bchore\b/i.test(t)&&e.add("chore"),/\bbuild\b/i.test(t)&&e.add("build"),/\bci\b/i.test(t)&&e.add("ci"),/\bperf(?:ormance)?\b/i.test(t)&&e.add("perf"),[...e]}function Gt(t){return t==="feat"?"feature":t}export{nt as a,C as b,Ot as c};
|
|
9
|
-
//# sourceMappingURL=chunk-
|
|
9
|
+
//# sourceMappingURL=chunk-G2UU6PQP.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as we}from"./chunk-
|
|
1
|
+
import{c as we}from"./chunk-W6E6ME7G.js";import{a as Xt,b as oe,c as Kt,d as Gt,e as Ae,g as Zt}from"./chunk-DRENNWRG.js";import{C as Jt,D as de,E as re,F as Qt,G as O,H as _e,I as ge,J as ct,M as De,a as Ht,b as $,c as it,i as V,k as W,l as x,m as Ee,q as te,u as G,v as C,w as fe,x as at,y as ne,z as Ce}from"./chunk-XDQ6QJF5.js";import{p as K,q as L}from"./chunk-E7T22WET.js";import{a as k,b as pe,c as me,d as qt,e as Ie}from"./chunk-UUMAM5LM.js";import{A as I,h as Pe}from"./chunk-C3PPB2T5.js";var Cr=new Set(["identifier","type_identifier","field_identifier"]),_r=new Set(["identifier"]),Tr=new Set(["identifier","property_identifier","type_identifier","shorthand_property_identifier","shorthand_property_identifier_pattern"]),Fr=new Set(["rust","python"]),Rr=/\{([^{}]*)\}/g,kr=/\b([A-Za-z_][\w]*)\b/g;function Yt(e,t){return Lr(t).has(e.type)}function en(e,t){return Fr.has(t)&&e.type==="string_content"}function lt(e){let t=0;for(let r of e.values()){let o=r[r.length-1];o!==void 0&&o>t&&(t=o)}let n=new Array(t+1);for(let r=0;r<=t;r+=1)n[r]=new Set;for(let[r,o]of e)for(let s of o)n[s].add(r);return n}function Lr(e){return e==="rust"?Cr:e==="python"?_r:Tr}function tn(e,t){let n=e.startPosition.row;for(let r of e.text.matchAll(Rr)){let o=r[1]??"";for(let s of o.matchAll(kr))s[1]&&t(s[1],n)}}var vr=[/\bdefault\s*=\s*"([^"]+)"/g,/\bwith\s*=\s*"([^"]+)"/g,/\bserialize_with\s*=\s*"([^"]+)"/g,/\bdeserialize_with\s*=\s*"([^"]+)"/g,/\bskip_serializing_if\s*=\s*"([^"]+)"/g,/\bgetter\s*=\s*"([^"]+)"/g,/\brename_all_with\s*=\s*"([^"]+)"/g,/\bschema_with\s*=\s*"([^"]+)"/g],Pr=/^#!?\[\s*serde\s*\(/,Er=/^#!?\[\s*schemars\s*\(/,Dr=/^#!?\[\s*validate\s*\(/,wr=new Set(["invoke","invokeTauriCommand","listen","once","emit","subscribe","dispatch","sendCommand","callRust"]);function nn(e,t,n){if(t!=="typescript"&&t!=="tsx"&&t!=="javascript"||e.type!=="call_expression")return;let r=e.childForFieldName("function")??e.namedChild(0);if(!r)return;let o=ct(r);if(!o||!wr.has(o))return;let s=e.namedChildren.find(c=>c.type==="arguments");if(!s)return;let i=s.namedChild(0);if(!i||i.type!=="string")return;let a=i.namedChildren.find(c=>c.type==="string_fragment");a&&n.add(a.text)}function rn(e,t){let n=Pr.test(e),r=Er.test(e),o=Dr.test(e);if(!(!n&&!r&&!o))for(let s of vr){s.lastIndex=0;let i;for(;(i=s.exec(e))!==null;){let a=i[1],c=a.split("::").pop()??a;c==="is_none"&&/\bOption\b/.test(a)||c==="is_empty"&&/\b(String|Vec|HashMap|BTreeMap|HashSet|BTreeSet)\b/.test(a)||c&&t.add(c)}}}function on(e,t){let n=new Map,r=(i,a)=>{if(i===a)return;let c=n.get(i);c||(c=new Set,n.set(i,c)),c.add(a)},o=t==="python"?new Set(["identifier"]):new Set(["type_identifier"]),s=(i,a)=>{let c=l=>{o.has(l.type)&&l.text!==a&&r(l.text,a);for(let u of l.children)c(u)};for(let l of i.children)c(l)};if(t==="rust")for(let i of e.rootNode.descendantsOfType(["struct_item","enum_item","union_item","type_item"])){let a=i.namedChildren.find(l=>l.type==="type_identifier")?.text;if(!a)continue;let c=i.namedChildren.find(l=>l.type==="field_declaration_list"||l.type==="enum_variant_list"||l.type==="ordered_field_declaration_list");c&&s(c,a),i.type==="type_item"&&s(i,a)}else if(t==="python")for(let i of e.rootNode.descendantsOfType("class_definition")){let a=i.namedChildren.find(u=>u.type==="identifier")?.text;if(!a)continue;let c=i.childForFieldName("superclasses");c&&s(c,a);let l=i.namedChildren.find(u=>u.type==="block");if(l)for(let u of l.descendantsOfType("type"))for(let p of u.descendantsOfType("identifier"))p.text!==a&&r(p.text,a)}else for(let i of e.rootNode.descendantsOfType(["interface_declaration","type_alias_declaration","class_declaration"])){let a=i.namedChildren.find(c=>c.type==="type_identifier")?.text;a&&s(i,a)}return n}var Ar=new Map([["defn","function"],["defn-","function"],["defmacro","macro"],["defmacro-","macro"],["defmethod","method"]]),ut=new Set(["catch","comment","def","defprotocol","defrecord","deftype","defmethod","defmacro","defmacro-","defn","defn-","do","doseq","dotimes","fn","for","if","let","loop","ns","quote","recur","throw","try","extend-protocol","extend-type","when","when-let","when-not"]);function sn(e){let t=[],n=[],r=[],o=new Map,s=[],i=0,a=0,c=(l,u)=>{let p=o.get(l);if(!p){o.set(l,[u]);return}p[p.length-1]!==u&&p.push(u)};for(;a<e.length;){let l=e[a];if(l===`
|
|
2
2
|
`){i+=1,a+=1;continue}if(/\s|,/.test(l)){a+=1;continue}if(l===";"){a=Me(e,a);continue}if(l==='"'){let g=Fe(e,a,i);i=g.line,a=g.index;continue}if(l==="("||l==="["||l==="{"){s.push({kind:l,startLine:i,endLine:i,headTokens:[],tokens:[],children:[]}),a+=1;continue}if(l===")"||l==="]"||l==="}"){let g=s.pop();g&&(g.endLine=i,Or(g,{callables:t,callSites:n,clojureMembers:r,recordIdentifier:c}),s[s.length-1]?.children.push(g)),a+=1;continue}if(pt(l)){a+=1;continue}let u=i,p=a;for(;a<e.length&&!mt(e[a]);)a+=1;let m=e.slice(p,a);if(!m)continue;let f={text:m,line:u};Mr(s[s.length-1],f),c(v(m),u)}return{language:"clojure",callables:t,callSites:n,clojureMembers:r,typeContainerMap:new Map,identifierLineMap:o,identifiersByLine:Wr(o),fileIdentifiers:new Set(o.keys()),rustAttrReferencedNames:new Set,crossLanguageDispatchNames:new Set}}function Or(e,t){if(e.kind!=="("||e.headTokens.length===0)return;let n=e.headTokens[0],r=v(n.text),o=Ar.get(n.text);if(o){let i=e.headTokens[1];if(i){let a=v(i.text);t.recordIdentifier(a,i.line),t.callables.push({name:a,startLine:e.startLine,endLine:e.endLine,paramCount:0,params:[],paramsEndLine:i.line,isLiteralPassthrough:!1,clojureKind:o})}}if(jr(e,t),!r||ut.has(n.text)||ut.has(r)||r.startsWith(":"))return;let s=Vr(n.text);t.callSites.push({calleeLeaf:s.leaf,calleeQualifier:s.qualifier,calleeText:s.text,memberAccess:!1,line:n.line})}function Mr(e,t){e&&(e.headTokens.length<2&&e.headTokens.push(t),e.tokens.length<200&&e.tokens.push(t))}function jr(e,t){let n=v(e.tokens[0]?.text??"");if(n==="defprotocol"){let r=v(e.tokens[1]?.text??"");if(!r)return;for(let o of Oe(e))Te(t,r,"protocol",o,"protocol-method");return}if(n==="defrecord"||n==="deftype"){let r=v(e.tokens[1]?.text??"");if(!r)return;let o=n==="defrecord"?"record":"type",s=n==="defrecord"?"record-method":"type-method";for(let i of Oe(e))Te(t,r,o,i,s);return}if(n==="extend-type"){let r=v(e.tokens[1]?.text??"");if(!r)return;for(let o of Oe(e))Te(t,r,"extension",o,"extension-method");return}if(n==="extend-protocol"){let r=v(e.tokens[1]?.text??"");for(let o of Oe(e)){r&&Te(t,r,"extension",o,"extension-method");let s=Br(e,o.startLine);s&&s!==r&&Te(t,s,"extension",o,"extension-method")}}}function Oe(e){return e.children.filter($r)}function $r(e){if(e.kind!=="(")return!1;let t=v(e.tokens[0]?.text??"");return!!(t&&!ut.has(t)&&!t.startsWith(":"))}function Te(e,t,n,r,o){let s=r.tokens[0],i=v(s?.text??"");!s||!i||(e.recordIdentifier(i,s.line),e.clojureMembers.push({ownerName:t,ownerKind:n,memberName:i,memberKind:o,startLine:r.startLine,endLine:r.endLine}))}function Br(e,t){let n=null;for(let r=2;r<e.tokens.length;r+=1){let o=e.tokens[r];if(o.line>t)break;let s=v(o.text);s&&!s.startsWith(":")&&(n=s)}return n}function v(e){return e.replace(/^#?['`~@]+/,"").split("/").pop()?.replace(/^\./,"")??""}function Vr(e){let t=e.replace(/^#?['`~@]+/,""),n=t.lastIndexOf("/"),r=v(t);if(n<=0)return{leaf:r,text:t};let o=t.slice(0,n);return{leaf:r,qualifier:o,text:t}}function Me(e,t){let n=t;for(;n<e.length&&e[n]!==`
|
|
3
3
|
`;)n+=1;return n}function Fe(e,t,n){let r=t+1,o=n;for(;r<e.length;){let s=e[r];if(s==="\\"){r+=2;continue}if(s===`
|
|
4
4
|
`&&(o+=1),r+=1,s==='"')break}return{index:r,line:o}}function pt(e){return e==="'"||e==="`"||e==="~"||e==="@"||e==="^"||e==="#"}function mt(e){return/\s|,/.test(e)||e==="("||e===")"||e==="["||e==="]"||e==="{"||e==="}"||e==='"'||e===";"}function Wr(e){let t=[];for(let[n,r]of e)for(let o of r)t[o]??=new Set,t[o].add(n);return t}var an=6,zr=qt("source-facts",{clearGroups:["whole-project","source-file"]}),ft=V({kind:"source-facts",invalidation:W("source-facts"),serialize:Hr,deserialize:Jr});function z(e,t){return dt(e,t).facts}function dt(e,t){let n=x(e,t);if(!n)return{facts:null};let r=Ur(e,t,n);return r?zr.get(e,t,n,()=>qr(e,t,r,n)):{facts:null}}function Ur(e,t,n){return Ce(t)?Qt(e,t,n)?.language??null:ne(t)}function qr(e,t,n,r){let o=$(e,t,r),s=ft.read(e,t,o);if(s&&s.language===n)return{facts:s};if(n==="clojure"){let c=sn(r);return ft.write(e,t,o,c),{facts:c}}let i=O(e,t);if(!i)return{facts:null,unavailable:{language:n,reason:"parser-unavailable"}};let a=Gr(i,n);return ft.write(e,t,o,a),{facts:a}}function Hr(e){let t={version:an,language:e.language,callables:e.callables,callSites:e.callSites,clojureMembers:e.clojureMembers,typeContainerMap:[...e.typeContainerMap.entries()].map(([n,r])=>[n,[...r]]),identifierLineMap:[...e.identifierLineMap.entries()],rustAttrReferencedNames:[...e.rustAttrReferencedNames],crossLanguageDispatchNames:[...e.crossLanguageDispatchNames]};return JSON.stringify(t)}function Jr(e){try{let t=JSON.parse(e);if(t.version!==an||t.language==="clojure"&&(t.clojureMembers===void 0||t.callSites.some(r=>r.calleeText===void 0)))return null;let n=new Map(t.identifierLineMap);return{language:t.language,callables:t.callables,callSites:t.callSites,clojureMembers:t.clojureMembers??[],typeContainerMap:new Map(t.typeContainerMap.map(([r,o])=>[r,new Set(o)])),identifierLineMap:n,identifiersByLine:lt(n),fileIdentifiers:new Set(n.keys()),rustAttrReferencedNames:new Set(t.rustAttrReferencedNames),crossLanguageDispatchNames:new Set(t.crossLanguageDispatchNames)}}catch{return null}}function Qr(e,t,n,r){let o=z(e,t);return o?Kr(o,n,r)?.isLiteralPassthrough??!0:!0}function Xr(e,t){return t.relativePath.includes(".clj-kondo/hooks/")?!0:z(e,t.relativePath)?.callables.find(r=>r.startLine===t.startLine&&r.endLine===t.endLine)?.clojureKind==="macro"}function Kr(e,t,n){return e.callables.find(r=>r.startLine===t&&r.endLine===n)??null}function Gr(e,t){let n=[],r=[],o=new Set,s=new Set,i=new Map,a=(l,u)=>{let p=i.get(l);if(!p){i.set(l,[u]);return}p[p.length-1]!==u&&p.push(u)},c=l=>{let u=De(l,t);u&&n.push(u);let p=ge(l,t);p&&r.push(p),nn(l,t,s),t==="rust"&&(l.type==="attribute_item"||l.type==="inner_attribute_item")&&rn(l.text,o),Yt(l,t)&&a(l.text,l.startPosition.row),en(l,t)&&tn(l,a);for(let m of l.children)c(m)};return c(e.rootNode),{language:t,callables:n,callSites:r,clojureMembers:[],typeContainerMap:on(e,t),identifierLineMap:i,identifiersByLine:lt(i),fileIdentifiers:new Set(i.keys()),rustAttrReferencedNames:o,crossLanguageDispatchNames:s}}var cn=new Set(["rust","typescript","tsx","javascript","python","clojure"]);function gt(e,t){let n=z(e,t);return!n||!cn.has(n.language)?null:n.callables.map(r=>({name:r.name,startLine:r.startLine,endLine:r.endLine}))}function Zr(e,t){let n=z(e,t);return!n||!cn.has(n.language)?null:n.callSites}function Yr(e,t){return z(e,t)?.typeContainerMap??new Map}import{ElementTypes as to,NodeTypes as ht,parse as no}from"@vue/compiler-dom";import{parse as Xc}from"@vue/compiler-sfc";var eo=new Set(["children","className","data","e","err","error","ev","event","false","id","idx","index","item","key","null","props","res","result","state","style","true","undefined","val","value"]);function je(e){return e.length<=2||eo.has(e)}function $e(e,t){return e.split(t).filter(Boolean).map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join("")}var ro=me("vue-template-facts"),oo=new Set(["component","keep-alive","slot","suspense","teleport","template","transition","transition-group"]),so=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"]),io=new Set(["div","span","template"]),ao=new Set(["as","await","break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","if","import","in","instanceof","let","new","null","of","return","super","switch","this","throw","true","try","typeof","undefined","var","void","while","with","yield"]);function Be(e,t){let n=t.replace(/\\/g,"/"),r=x(e,n);return ro.get(e,n,r,()=>co(n,de(e,n).template))}function co(e,t){let n={relativePath:e,template:t?{startLine:t.startLine,endLine:t.endLine}:null,componentTags:[],nativeTags:[],builtinTags:[],props:[],events:[],directives:[],slots:[],expressionIdentifiers:[],structuralTokens:[]};if(!t)return n;let r;try{r=no(t.body,{comments:!1})}catch{return n}let o=new Set,s=i=>{i.trim()&&o.add(i)};return un(r.children,t.startLine,n,s),n.structuralTokens=[...o].sort(),n}function un(e,t,n,r){for(let o of e)if(o.type===ht.ELEMENT)lo(o,t,n,r),un(o.children,t,n,r);else if(o.type===ht.INTERPOLATION){r("interpolation");let s=St(o.content);s&&pn(s,t,o.loc.start.line,n,r)}}function lo(e,t,n,r){let o=So(e.tag),s={tag:e.tag,normalized:o,kind:ho(e),startLine:he(t,e.loc.start.line),endLine:he(t,e.loc.end.line)};s.kind==="component"?(n.componentTags.push(s),r(`component:${o}`)):s.kind==="builtin"?(n.builtinTags.push(s),r(`builtin:${o}`)):(n.nativeTags.push(s),io.has(e.tag)||r(`native:${e.tag}`));for(let i of e.props)uo(i,t,n,r)}function uo(e,t,n,r){if(e.type===ht.ATTRIBUTE){let a=e.value?.content??null,c=ln("prop",e.name,a,t,e.loc.start.line,e.loc.end.line);n.props.push(c),r(`prop:${e.name}`);return}let o=mo(e),s=St(e.exp),i=ln(po(e.name),o,s,t,e.loc.start.line,e.loc.end.line);switch(i.kind){case"prop":n.props.push(i),r(`prop:${o}`);break;case"event":n.events.push(i),r(`event:${o}`);break;case"slot":n.slots.push(i),r(`slot:${o}`);break;case"directive":n.directives.push(i),r(`directive:${o}`);break}s&&pn(s,t,e.loc.start.line,n,r)}function ln(e,t,n,r,o,s){return{kind:e,name:t,value:n,startLine:he(r,o),endLine:he(r,s)}}function po(e){switch(e){case"bind":case"model":return"prop";case"on":return"event";case"slot":return"slot";default:return"directive"}}function mo(e){let t=St(e.arg);return t||e.name}function St(e){if(!e)return null;let t=("content"in e&&typeof e.content=="string"?e.content:e.loc.source).trim();return t||null}function pn(e,t,n,r,o){for(let s of fo(e)){let i={name:s,startLine:he(t,n),endLine:he(t,n)};r.expressionIdentifiers.push(i),o(`id:${s}`)}}function fo(e){let t=new Set,n=go(e),r=/\b[A-Za-z_$][A-Za-z0-9_$]*\b/g,o;for(;o=r.exec(n);){let s=o[0];ao.has(s)||je(s)||/^[A-Z_]+$/.test(s)||t.add(s)}return[...t].sort()}function go(e){return e.replace(/\/\*[\s\S]*?\*\//g," ").replace(/\/\/.*$/gm," ").replace(/`(?:\\[\s\S]|\$\{([^}]*)\}|[^`\\])*`/g,(t,n)=>n??" ").replace(/'(?:\\[\s\S]|[^'\\])*'/g," ").replace(/"(?:\\[\s\S]|[^"\\])*"/g," ")}function ho(e){let t=e.tag;return e.tagType===to.COMPONENT?"component":oo.has(t)?"builtin":so.has(t)?"native":/^[A-Z]/.test(t)||t.includes("-")?"component":"native"}function So(e){return $e(e,/[-_:]/)}function he(e,t){return e+Math.max(0,t-1)}import{createRequire as ko}from"module";import{existsSync as ae}from"fs";import{basename as fn,dirname as T,extname as U,join as P,relative as se,resolve as b,sep as Lo}from"path";import{existsSync as xt,readdirSync as yo,statSync as xo}from"fs";import{join as Se,relative as bo}from"path";function mn(e){let t=No(e)??To(e);if(!t||t.length===0)return[];let n=[],r=new Set;for(let o of t)for(let s of Fo(e,o)){if(r.has(s))continue;r.add(s);let i=Ro(e,s);i&&n.push(i)}return n}function No(e){let t=Se(e,"pnpm-workspace.yaml");if(!xt(t))return null;try{return Io(Pe(t,"pnpm workspace manifest"))}catch{return null}}function Io(e){let t=[],n=!1;for(let r of e.split(/\r?\n/)){let o=Co(r);if(!n){/^packages\s*:\s*$/.test(o.trim())&&(n=!0);continue}let s=/^\s+-\s*(.+)$/.exec(o);if(s){let i=_o(s[1].trim());i&&t.push(i);continue}if(o.trim()!=="")break}return t}function Co(e){let t=e.indexOf("#");return t===-1?e:e.slice(0,t)}function _o(e){return e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")?e.slice(1,-1):e}function To(e){let t=Se(e,"package.json");if(!xt(t))return null;try{let n=JSON.parse(Pe(t,"workspace package manifest"));return n.workspaces?Array.isArray(n.workspaces)?n.workspaces:n.workspaces.packages??[]:null}catch{return null}}function Fo(e,t){if(!t||t.startsWith("!")||t.includes("node_modules"))return[];if(!t.includes("*")){let i=Se(e,t);return yt(i)?[i]:[]}let n=t.indexOf("*"),r=t.slice(0,n).replace(/\/$/,""),o=t.slice(n+1).replace(/^\//,""),s=Se(e,r||".");return yt(s)?yo(s).map(i=>Se(s,i,o)).filter(yt):[]}function yt(e){try{return xo(e).isDirectory()}catch{return!1}}function Ro(e,t){let n=Se(t,"package.json");if(!xt(n))return null;try{let r=JSON.parse(Pe(n,"workspace package manifest"));return typeof r.name!="string"||r.name.length===0?null:{name:r.name,relativeDir:bo(e,t).replace(/\\/g,"/"),exports:r.exports}}catch{return null}}var vo=pe("indexed-paths",{clearGroups:[]}),Po=pe("indexed-path-digest",{clearGroups:[]}),Eo=k("tsconfig-alias-config",{clearGroups:["whole-project"]}),Do=k("tsconfig-alias-config-for-dir",{clearGroups:["whole-project"]}),wo=ko(import.meta.url),Re;function Ao(){if(Re!==void 0)return Re;try{Re=wo("typescript")}catch{Re=null}return Re}var Oo=["tsconfig.json","tsconfig.app.json","tsconfig.node.json","tsconfig.base.json"],Mo=pe("workspace-packages",{clearGroups:["whole-project"]}),ie=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs",".vue"],Ve=[".py",".pyi"],F=[".java",".scala",".kt",".kts"],We=[".rs"],ze=[".rb"],Ue=[".c",".h",".cc",".cpp",".cxx",".hpp",".hh",".hxx"],Z=[".cs",".vb"],qe=[".dart"],ce=[".php"],ye=[".clj",".cljs",".cljc"],jo=new Set(ie),bt=new Set(Ve),dn=new Set(F),Nt=new Set(We),It=new Set(ze),gn=new Set(Ue),hn=new Set(Z),Ct=new Set(qe),Sn=new Set(ce),yn=new Set(ye),$o=[{extensions:ie,lookup:jo},{extensions:Ve,lookup:bt},{extensions:F,lookup:dn},{extensions:We,lookup:Nt},{extensions:ze,lookup:It},{extensions:Ue,lookup:gn},{extensions:Z,lookup:hn},{extensions:qe,lookup:Ct},{extensions:ce,lookup:Sn},{extensions:ye,lookup:yn}];function q(e,t){return t.has(U(e).toLowerCase())}function Bo(e){return q(e,bt)}function Vo(e){return q(e,dn)}function Wo(e){return q(e,Nt)}function zo(e){return q(e,It)}function Uo(e){return q(e,gn)}function qo(e){return q(e,hn)}function xn(e){return U(e).toLowerCase()===".vb"}function Ho(e){return q(e,Ct)}function Jo(e){return q(e,Sn)}function Qo(e){return q(e,yn)}function _t(e){let t=U(e).toLowerCase();for(let n of $o)if(n.lookup.has(t))return n.extensions;return ie}function Xo(e){return Vo(e)||qo(e)||Jo(e)}function B(e,t,n){return Bo(t)?xe(e,t,n):Wo(t)?H(e,t,n):zo(t)?He(e,t,n):Uo(t)?Je(e,t,n):Xo(t)?S(e,n.replace(/\\/g,"."),_t(t)):Ho(t)?Qe(e,t,n):Qo(t)?Tt(e,n):Ko(e,t,n)}function Ko(e,t,n){if(!n.startsWith(".")&&!n.startsWith("/"))return Go(e,t,n)??Yo(e,n);let r=T(P(e.config.projectRoot,t)),o=b(r,n),s=J(e);for(let i of Rt(o)){let a=I(se(e.config.projectRoot,i));if(s.has(a)||ae(i))return a}return I(se(e.config.projectRoot,o))}function Go(e,t,n){let r=ss(e,t);if(!r)return null;let o=J(e);for(let s of Zo(r,n)){let i=b(r.baseUrl,s);for(let a of Rt(i)){let c=I(se(e.config.projectRoot,a));if(o.has(c)||ae(a))return c}}return null}function Zo(e,t){let n=[];for(let[r,o]of Object.entries(e.paths)){let s=r.indexOf("*");if(s===-1){if(t!==r)continue;n.push(...o);continue}let i=r.slice(0,s),a=r.slice(s+1);if(!t.startsWith(i)||!t.endsWith(a)||t.length<i.length+a.length)continue;let c=t.slice(i.length,t.length-a.length);for(let l of o)n.push(l.includes("*")?l.replace("*",c):l)}return n}function Yo(e,t){let n=ts(es(e),t);if(!n)return null;let r=J(e);for(let o of ns(n)){let s=b(e.config.projectRoot,n.pkg.relativeDir,o);for(let i of Rt(s)){let a=I(se(e.config.projectRoot,i));if(r.has(a)||ae(i))return a}}return null}function es(e){return Mo.get(e,()=>mn(e.config.projectRoot))}function ts(e,t){let n=null;for(let r of e){let o=null;t===r.name?o="":t.startsWith(`${r.name}/`)&&(o=t.slice(r.name.length+1)),o!==null&&(!n||r.name.length>n.pkg.name.length)&&(n={pkg:r,subpath:o})}return n}function ns(e){let t=[],n=rs(e.pkg.exports,e.subpath);if(n){let r=os(n);r&&t.push(r)}return t.push(e.subpath?`src/${e.subpath}`:"src/index"),t}function rs(e,t){if(!e||typeof e!="object")return null;let n=t===""?".":`./${t}`;return bn(e[n])}function bn(e){if(typeof e=="string")return e;if(!e||typeof e!="object")return null;let t=e;for(let n of["types","import","default","require","node"]){let r=bn(t[n]);if(r)return r}return null}function os(e){let t=e.replace(/^\.\//,"");return t.startsWith("dist/")?`src/${t.slice(5)}`:null}function ss(e,t){let n=I(T(t));return Do.get(e,n,()=>is(e,n))}function is(e,t){let n=Ao();if(!n)return null;let r=b(e.config.projectRoot),o=b(r,t);for(;o===r||o.startsWith(r+Lo);){for(let i of Oo){let a=P(o,i);if(!ae(a))continue;let c=Eo.get(e,a,()=>as(n,a));if(c)return c}let s=T(o);if(s===o)break;o=s}return null}function as(e,t){try{let n=e.readConfigFile(t,e.sys.readFile);if(n.error||!n.config)return null;let r=e.parseJsonConfigFileContent(n.config,e.sys,T(t)),o=r.options.paths;return!o||Object.keys(o).length===0?null:{baseUrl:r.options.baseUrl?b(T(t),r.options.baseUrl):T(t),paths:o}}catch{return null}}function xe(e,t,n){let r=J(e),o;if(n.startsWith(".")){let s=n.match(/^(\.+)(.*)$/);if(!s)return null;let i=s[1].length,a=s[2].replace(/^\./,""),c=T(P(e.config.projectRoot,t));for(let l=1;l<i;l++)c=T(c);o=a?b(c,a.replace(/\./g,"/")):c}else o=b(e.config.projectRoot,n.replace(/\./g,"/"));for(let s of cs(o)){let i=I(se(e.config.projectRoot,s));if(r.has(i)||ae(s))return i}return null}function H(e,t,n){if(!n)return null;let r=n.replace(/\s+as\s+.+$/,"").trim();if(!r.startsWith("crate::")&&!r.startsWith("self::")&&!r.startsWith("super::"))return null;let o=T(P(e.config.projectRoot,t)),s;return r.startsWith("crate::")?s=b(e.config.projectRoot,"src",r.slice(7).replace(/::/g,"/")):r.startsWith("self::")?s=b(o,r.slice(6).replace(/::/g,"/")):s=b(T(o),r.slice(7).replace(/::/g,"/")),Ft(e,ls(s))}function He(e,t,n){let r=T(P(e.config.projectRoot,t)),o=b(r,n);return Ft(e,us(o))}function Je(e,t,n){let r=T(P(e.config.projectRoot,t)),o=[b(r,n),b(e.config.projectRoot,n),b(e.config.projectRoot,"include",n),b(e.config.projectRoot,"src",n)];return Ft(e,o)}function S(e,t,n){let r=J(e),o=t.replace(/\\/g,".").replace(/::/g,".").replace(/^global::/,""),s=o.replace(/\./g,"/"),i=o.split(".").pop()??o;for(let c of n){let l=`${s}${c}`,u=[...r].find(p=>p.endsWith(l));if(u)return u}for(let c of n){let l=[...r].find(u=>fn(u)===`${i}${c}`);if(l)return l}let a=[...r].filter(c=>n.includes(U(c).toLowerCase())).filter(c=>c.includes(`/${s}/`)||c.includes(`/${i}/`)).sort((c,l)=>c.localeCompare(l));return a.length===1?a[0]:null}function Qe(e,t,n){let r=J(e);if(n.startsWith("package:")){let i=n.slice(8),a=i.indexOf("/");if(a<0)return null;let c=i.slice(a+1),l=I(c.startsWith("lib/")?c:`lib/${c}`);return r.has(l)?l:null}let o=T(P(e.config.projectRoot,t)),s=b(o,n);for(let i of ps(s)){let a=I(se(e.config.projectRoot,i));if(r.has(a)||ae(i))return a}return null}function Tt(e,t){let n=t.replace(/-/g,"_").replace(/\./g,"/"),r=J(e);for(let o of ye){let s=`${n}${o}`,i=[...r].find(a=>a.endsWith(s));if(i)return i}for(let o of ye){let s=[...r].find(i=>fn(i)===`${n.split("/").pop()}${o}`);if(s)return s}return null}function cs(e){let t=U(e);return bt.has(t)?[e]:[`${e}.py`,`${e}.pyi`,P(e,"__init__.py"),P(e,"__init__.pyi")]}function Ft(e,t){let n=J(e);for(let r of t){let o=I(se(e.config.projectRoot,r));if(n.has(o)||ae(r))return o}return null}function ls(e){let t=U(e);return Nt.has(t)?[e]:[`${e}.rs`,P(e,"mod.rs")]}function us(e){let t=U(e);return It.has(t)?[e]:[`${e}.rb`,P(e,"index.rb")]}function ps(e){let t=U(e);return Ct.has(t)?[e]:[`${e}.dart`,e]}function Rt(e){let t=U(e),n=new Set;if(t){n.add(e);for(let r of ie)n.add(e.slice(0,-t.length)+r)}else for(let r of ie)n.add(`${e}${r}`),n.add(P(e,`index${r}`));return[...n]}function J(e){return vo.get(e,()=>new Set(Ie(e,{includeIgnored:!1}).map(I)))}function kt(e){return Po.get(e,()=>Ht([...J(e)].sort().join(`
|
|
@@ -124,4 +124,4 @@ ${m}`,l+=1+m.length,u+=at(m),r+=m.length+1}let p=da(c);p&&n.push({...p,start:a,e
|
|
|
124
124
|
${e.symbolNoiseFor("gs")}
|
|
125
125
|
GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path
|
|
126
126
|
ORDER BY d.relative_path, start_line, end_line`,...s)}function tc(e){return`(${e}.symbol LIKE '%().' OR ${e}.symbol LIKE '%()')`}function hr(e,t){return t==="callable"?tc(e):nc(e)}function nc(e){return`(${e}.symbol LIKE '%.' OR ${e}.symbol LIKE '%()')`}function pr(e){let t=new Map;for(let n of e){let r=t.get(n.relative_path);r?r.push(n):t.set(n.relative_path,[n])}return t}function tm(e,t,n={}){if(t.length===0)return[];let r=t.flatMap(o=>Ut(e,o)).filter(o=>!e.isIgnored(o.relativePath));return n.onlyDocumented&&(r=r.filter(o=>o.documentation!==null&&o.documentation!=="")),n.sort&&(r=r.sort((o,s)=>o.relativePath.localeCompare(s.relativePath)||o.startLine-s.startLine||o.endLine-s.endLine)),r.map(o=>({startLine:o.startLine,endLine:o.endLine,symbol:o.symbol,shortName:Kt(o.symbol),signature:cr(lr(o.documentation)),relativePath:o.relativePath,enclosingSymbol:o.enclosingSymbol}))}function rc(e){let t=new Map,n=e.map((r,o)=>({definition:r,index:o,span:r.endLine-r.startLine})).sort((r,o)=>r.span-o.span||r.index-o.index);for(let{definition:r}of n)for(let o=r.startLine;o<=r.endLine;o+=1)t.has(o)||t.set(o,r);return t}function nm(e,t){let n=ur.get(e);return n||(n=rc(e),ur.set(e,n)),n.get(t)??null}function rm(e,t){let n=Ut(e,t.relative_path).find(r=>r.symbolId===t.id);return n?{symbolId:n.symbolId,symbol:n.symbol,documentId:n.documentId,startLine:n.startLine,startChar:n.startChar,endLine:n.endLine,endChar:n.endChar,relativePath:n.relativePath}:{symbolId:t.id,symbol:t.symbol,documentId:t.document_id,startLine:t.start_line,startChar:t.start_char??0,endLine:t.end_line,endChar:t.end_char??0,relativePath:t.relative_path}}function Sr(e,t,n){let r=rt(e).forFile(t,{text:!0}).text,o=gt(e,t);return o?lc(n,o,r):r?oc(n,r):n}function oc(e,t){let n=t.split(/\r?\n/),r=sc(e,n),o=ic(e,r),s=ac(o,n);return cc(e,s)}function sc(e,t){let n=e.some(o=>ot(o.symbol))?hc(t):null,r=new Map;for(let o of e)r.set(o.symbolId,gc(t,n,o));return r}function ic(e,t){return e.filter(n=>ot(n.symbol)).map(n=>({definition:n,startLine:t.get(n.symbolId)??n.startLine})).sort((n,r)=>n.startLine-r.startLine||n.definition.startLine-r.definition.startLine||n.definition.symbol.localeCompare(r.definition.symbol))}function ac(e,t){let n=new Map;for(let r=0;r<e.length;r+=1){let o=e[r],s=e[r+1],i=s?Math.max(o.startLine,s.startLine-1):t.length-1;n.set(o.definition.symbolId,{startLine:o.startLine,endLine:Sc(t,o.definition,o.startLine,i)})}return n}function cc(e,t){return e.map(n=>{let r=t.get(n.symbolId);return r?{...n,startLine:r.startLine,endLine:r.endLine}:n})}function lc(e,t,n=null){let r=new Map;for(let o of t){let s=r.get(o.name);s?s.push(o):r.set(o.name,[o])}return e.map(o=>{if(!dc(o)||!o.leaf)return mr(o,n);let s=r.get(o.leaf);if(!s||s.length===0)return mr(o,n);let i=n?uc(o,s,n):null;if(i)return{...o,startLine:i.startLine,endLine:i.endLine};let a=s[0],c=Math.abs(a.startLine-o.startLine);for(let l=1;l<s.length;l+=1){let u=s[l],p=Math.abs(u.startLine-o.startLine);p<c&&(a=u,c=p)}return{...o,startLine:a.startLine,endLine:a.endLine}})}function uc(e,t,n){let r=pc(e.symbol);if(!r)return null;let o=n.split(/\r?\n/),s=new RegExp(`\\b${te(r)}\\b`);for(let i of t){let a=mc(o,i.startLine);if(a&&s.test(a))return i}return null}function pc(e){return e.match(/\/impl#\[([^\]]+)\]/)?.[1]??null}function mc(e,t){for(let n=t;n>=0;n-=1){let r=e[n]?.trim()??"";if(r){if(/^impl\b/.test(r))return fc(e,n,t);if(/^(?:struct|enum|trait|mod)\b/.test(r))return null}}return null}function fc(e,t,n){let r=[];for(let o=t;o<=n;o+=1){let s=e[o]??"";if(r.push(s),s.includes("{"))break}return r.join(" ")}function dc(e){return ot(e.symbol)?!0:Ae(e.symbol)==="term"&&oe(e.symbol)===null}function mr(e,t){if(!t||!e.leaf||Ae(e.symbol)!=="term"||oe(e.symbol)!==null)return e;let n=te(e.leaf),r=new RegExp(`\\b(?:export\\s+)?(?:const|let|var)\\s+${n}\\b`),s=t.split(/\r?\n/).findIndex(i=>r.test(i));return s>=0?{...e,startLine:s,endLine:s}:e}function gc(e,t,n){if(!ot(n.symbol))return n.startLine;let r=Math.max(0,Math.min(n.startLine,e.length-1));if(!t)return r;let o=t.get(n.leaf);if(!o||o.length===0)return r;let s=null;for(let i of o){let a=Math.abs(i-n.startLine);(!s||a<s.distance)&&(s={line:i,distance:a})}return s?.line??r}function hc(e){let t=/\b(?:function|def|fn)\s+([A-Za-z_$][\w$]*)/g,n=/\b([A-Za-z_$][\w$]*)\s*[:=]\s*(?:async\s*)?(?:function\b|\()/g,r=/^\s*(?:(?:export|public|private|protected|static|readonly|async|abstract|get|set)\s+)*([A-Za-z_$][\w$]*)\s*(?:<[^(]*>)?\s*\(/,o=/\b([A-Za-z_$][\w$]*)\s*\(/g,s=new Map,i=(a,c)=>{let l=s.get(a);if(!l){s.set(a,[c]);return}l[l.length-1]!==c&&l.push(c)};for(let a=0;a<e.length;a+=1){let c=e[a]??"";for(let u of c.matchAll(t))u[1]&&i(u[1],a);for(let u of c.matchAll(n))u[1]&&i(u[1],a);let l=c.match(r);l?.[1]&&i(l[1],a);for(let u of c.matchAll(o))u[1]&&i(u[1],a)}return s}function Sc(e,t,n,r){let o=Math.max(n,Math.min(e.length-1,r)),s=Math.max(n,Math.min(o,t.endLine)),i=0,a=0,c=!1;for(let l=n;l<=o;l+=1){let u=yc(e[l]??"");for(let p of u)p==="{"?(i+=1,c=!0):p==="}"?i=Math.max(0,i-1):p==="("?a+=1:p===")"&&(a=Math.max(0,a-1));if(c&&i===0||!c&&a===0&&l>=s)return l}return s}function yc(e){let t="",n=null,r=!1;for(let o=0;o<e.length;o+=1){let s=e[o],i=e[o+1];if(!n&&s==="/"&&i==="/"){t+=" ".repeat(e.length-o);break}if(n){if(r){r=!1,t+=" ";continue}if(s==="\\"){r=!0,t+=" ";continue}s===n&&(n=null),t+=" ";continue}if(s==='"'||s==="'"||s==="`"){n=s,t+=" ";continue}t+=s}return t}function ot(e){return e.includes("().")}function om(e){let t=Xt(e);if("kind"in t)return[];let n=[];for(let r=t.descriptors.length-2;r>=0;r-=1){let o=t.descriptors[r];o?.suffix==="type"&&o.name&&n.push(o.name)}return n}var xc=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs"];function am(e){let t=e.toLowerCase();return xc.some(n=>t.endsWith(n))}import{createRequire as bc}from"module";var yr=bc(import.meta.url),ve,st;function Nc(){if(ve!==void 0)return ve;try{ve=yr("ts-morph")}catch{ve=null}return ve}function um(){if(st)return st;let e=Nc();if(!e)return"ts-morph:unavailable";let t="unknown";try{t=yr("ts-morph/package.json").version??"unknown"}catch{}return st=`ts-morph:${t}:typescript:${e.ts.version}`,st}function pm(e,t){return t.map(n=>({tsconfigPath:n,project:new e.Project({tsConfigFilePath:n,skipFileDependencyResolution:!0})}))}function mm(e,t,n){return{language:"typescript",availability:()=>({available:!1,reason:e,tsconfigPath:t,tsconfigPaths:n}),importUsage:()=>[],referencesFor:()=>[],calleesFor:()=>[],signatureFor:()=>null}}function dm(e,t){let n=new Map(e.map(o=>[o.symbol,o])),r=new Map(e.map(o=>[o.symbolId,[]]));for(let o of t.values())for(let s of o){let i=n.get(s.targetSymbol);i&&r.get(i.symbolId).push(s.location)}for(let[o,s]of r)r.set(o,Ic(s));return r}function gm(e,t,n){let r=br(e,t),o=br(e,n),s=[...r].filter(p=>!o.has(p)).sort(),i=[...o].filter(p=>!r.has(p)).sort(),a=xr(e,t),c=xr(e,n),l=[...a].filter(p=>!c.has(p)).sort(),u=[...c].filter(p=>!a.has(p)).sort();return{passed:s.length===0&&i.length===0,expectedCount:r.size,actualCount:o.size,missing:s,extra:i,callerFiles:{passed:l.length===0&&u.length===0,expectedCount:a.size,actualCount:c.size,missing:l,extra:u}}}function xr(e,t){let n=new Set;for(let r of e)for(let o of t.get(r.symbolId)??[])o.file!==r.relativePath&&n.add(`${r.symbol}\0${o.file}`);return n}function hm(e,t,n){let r=new Set(n),o=new Map(n.map(s=>[s,[]]));for(let s of e)for(let i of t.get(s.symbolId)??[])r.has(i.file)&&o.get(i.file).push({targetSymbol:s.symbol,location:i});for(let[s,i]of o)o.set(s,Cc(i));return o}function br(e,t){let n=new Set;for(let r of e)for(let o of t.get(r.symbolId)??[])n.add(`${r.symbol}\0${o.file}\0${o.line}\0${o.column}`);return n}function Ic(e){let t=new Map;for(let n of e)t.set(`${n.file}\0${n.line}\0${n.column}`,n);return[...t.values()].sort(Nr)}function Cc(e){let t=new Map;for(let n of e){let{location:r}=n;t.set(`${n.targetSymbol}\0${r.file}\0${r.line}\0${r.column}`,n)}return[...t.values()].sort((n,r)=>n.targetSymbol.localeCompare(r.targetSymbol)||Nr(n.location,r.location))}function Nr(e,t){return e.file.localeCompare(t.file)||e.line-t.line||e.column-t.column}export{mn as a,Fo as b,ye as c,B as d,z as e,Qr as f,Xr as g,gt as h,Zr as i,Yr as j,ql as k,di as l,tt as m,xp as n,nr as o,rr as p,kp as q,xc as r,am as s,Nc as t,um as u,pm as v,mm as w,dm as x,gm as y,hm as z,rt as A,Ap as B,Op as C,cr as D,lr as E,Wt as F,Gp as G,Ut as H,Zp as I,Za as J,Yp as K,em as L,tm as M,rc as N,nm as O,rm as P,om as Q};
|
|
127
|
-
//# sourceMappingURL=chunk-
|
|
127
|
+
//# sourceMappingURL=chunk-G3KRXNNT.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
1
|
+
import{a as s}from"./chunk-MJX2J5QE.js";var _=`SELECT COUNT(*) AS shared
|
|
2
2
|
FROM (
|
|
3
3
|
SELECT definition_m.symbol_id
|
|
4
4
|
FROM documents definition_d
|
|
@@ -46,4 +46,4 @@ import{a as s}from"./chunk-LMTSB3TB.js";var _=`SELECT COUNT(*) AS shared
|
|
|
46
46
|
GROUP BY file1, file2
|
|
47
47
|
ORDER BY shared DESC, file1, file2
|
|
48
48
|
LIMIT ?`,...o,n).filter(d=>!e.isIgnored(d.file1)&&!e.isIgnored(d.file2)).map(d=>c(d.file1,d.file2,d.shared))}function h(e,i={}){return f(e,i)}function c(e,i,n){return{file1:e,file2:i,sharedSymbols:n,actionTier:"signal",couplingKind:"shared-symbol-coupling",evidenceReasons:[`${n} symbol(s) are defined in one file and referenced by the other`],recommendation:"Review whether the shared symbol surface is an intentional boundary or hidden coordination pressure before moving code."}}export{l as a,N as b,f as c,h as d};
|
|
49
|
-
//# sourceMappingURL=chunk-
|
|
49
|
+
//# sourceMappingURL=chunk-G3ZBP72R.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as y}from"./chunk-
|
|
1
|
+
import{b as y}from"./chunk-RVBRPBLQ.js";import{a as v}from"./chunk-ETZBIG6K.js";import{p as S}from"./chunk-NB2DAVPP.js";import{a as b}from"./chunk-DOQLO74K.js";import{d as u,e as f,h as m,p,q as g}from"./chunk-TNLOX4TN.js";import{w as d}from"./chunk-23AD24QZ.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-GC4I33OD.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{a as p}from"./chunk-
|
|
1
|
+
import{a as p}from"./chunk-NMKQOIYZ.js";import{a as w}from"./chunk-OANDYLJQ.js";import{a as O}from"./chunk-6CTSFS7R.js";import{a as A,e as b,t as D}from"./chunk-TNLOX4TN.js";import{o as _}from"./chunk-RGBZDOUO.js";import{a as S}from"./chunk-NRNVMB2R.js";import{h as u,x as j}from"./chunk-23AD24QZ.js";import{f as m,g as R,h as T}from"./chunk-YMAGXBLT.js";import{c as l}from"./chunk-6I55VYFG.js";import{existsSync as h,readdirSync as M}from"fs";import{join as d}from"path";var et={files:new Set,pathPrefixes:[]},nt={reasonsByFile:new Map},P=/^(?:dist|build|lib|out|output|esm|cjs|umd)\//,rt=/\.(?:d\.ts|d\.mts|d\.cts|ts|tsx|mts|cts|js|jsx|mjs|cjs)$/,$=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs"],st=new Set([".git",".next",".turbo","build","coverage","dist","node_modules","out"]),it=4,at=u("package-surface",{clearGroups:["whole-project"]}),ot=u("package-operational-surface",{clearGroups:["whole-project"]});function C(t){return at.get(t,()=>ut(t.config.projectRoot))}function x(t,e){let n=C(t);return n.files.has(e)?!0:n.pathPrefixes.some(r=>e.startsWith(r))}function N(t,e){return C(t).files.has(e)}function ct(t){return ot.get(t,()=>ft(t.config.projectRoot))}function ne(t,e){return ct(t).reasonsByFile.get(e)??[]}function ut(t){let e=new Set,n=[];for(let{manifest:r,packageRoot:s}of L(t))for(let i of lt(r))X(t,s,i,e,n);return e.size===0&&n.length===0?et:{files:e,pathPrefixes:n}}function ft(t){let e=new Map;for(let{manifest:n,packageRoot:r}of L(t)){let s=gt(n);for(let a of s)v(t,r,a,"package binary",e);let i=n.scripts;if(!(!i||typeof i!="object")){for(let[a,o]of Object.entries(i))if(typeof o=="string")for(let c of pt(o))v(t,r,c,`package script "${a}"`,e)}}return e.size===0?nt:{reasonsByFile:e}}function L(t){let e=[],n=V(t,"");return n&&e.push({manifest:n,packageRoot:""}),I(t,"",e,0),e}function I(t,e,n,r){if(r>=it)return;let s=d(t,e);if(h(s))for(let i of M(s,{withFileTypes:!0})){if(!i.isDirectory()||st.has(i.name))continue;let a=e?`${e}/${i.name}`:i.name,o=V(t,a);o&&n.push({manifest:o,packageRoot:a}),I(t,a,n,r+1)}}function V(t,e){let n;try{n=m(t,d(e,"package.json"),{maxBytes:8*1024*1024,inputKind:"package manifest"})}catch(r){if(!R(r))throw r;return null}try{let r=JSON.parse(n);return r&&typeof r=="object"?r:null}catch{return null}}function lt(t){let e=[];for(let r of["main","module","types","browser"])typeof t[r]=="string"&&e.push(t[r]);let n=t.bin;if(typeof n=="string")e.push(n);else if(n&&typeof n=="object")for(let r of Object.values(n))typeof r=="string"&&e.push(r);return B(t.exports,e),e}function gt(t){let e=t.bin;return typeof e=="string"?[e]:!e||typeof e!="object"?[]:Object.values(e).filter(n=>typeof n=="string")}function pt(t){let e=[],n=/(?:^|&&|\|\||;)\s*(?:(?:cross-env|env)(?:\s+[A-Za-z_][A-Za-z0-9_]*=\S+)*\s+)?(?:node|bun|tsx|ts-node|vite-node|python3?|deno\s+run)\s+(?:(?:--?[A-Za-z0-9-]+(?:=\S+)?)\s+)*["']?([^"'`\s]+\.(?:ts|tsx|mts|cts|js|jsx|mjs|cjs|py))["']?/g;for(let r of t.matchAll(n)){let s=r[1];s&&!s.startsWith("node_modules/")&&!s.startsWith("./node_modules/")&&e.push(s)}return e}function v(t,e,n,r,s){let i=new Set;X(t,e,n,i,[]);for(let a of i){let o=s.get(a)??[];o.includes(r)||o.push(r),s.set(a,o)}}function B(t,e){if(typeof t=="string"){e.push(t);return}if(!(!t||typeof t!="object"))for(let n of Object.values(t))B(n,e)}function X(t,e,n,r,s){let i=n.replace(/\\/g,"/").replace(/^\.\//,"");if(i===""||i.startsWith(".."))return;let a=i.indexOf("*");if(a>=0){let c=i.slice(0,a);for(let g of F(c))g!==""&&s.push(f(e,g));return}let o=i.replace(rt,"");for(let c of F(o)){c===o&&c===i&&r.add(f(e,i));for(let g of $)dt(t,r,e,c+g)}r.add(f(e,i))}function F(t){let e=[t];return P.test(t)&&(e.push(t.replace(P,"src/")),e.push(t.replace(P,""))),e}function dt(t,e,n,r){let s=f(n,r);if(e.add(s),!r.startsWith("src/")||h(d(t,s)))return;let i=$.find(y=>r.endsWith(y));if(!i)return;let a=r.slice(0,-i.length);St(t,e,n,a,i);let o=a.lastIndexOf("/");if(o<=4)return;let c=a.slice(0,o),g=a.slice(o+1);for(let y of G(t,n,c,`${g}${i}`))e.add(y)}function St(t,e,n,r,s){let i=f(n,`${r}/index${s}`);h(d(t,i))&&e.add(i)}function G(t,e,n,r){let s=d(t,e,n);if(!h(s))return[];let i=[];for(let a of M(s,{withFileTypes:!0})){let o=`${n}/${a.name}`;a.isDirectory()?i.push(...G(t,e,o,r)):a.isFile()&&a.name===r&&i.push(f(e,o))}return i}function f(t,e){return t?`${t}/${e}`:e}import{existsSync as E,readdirSync as mt}from"fs";import{dirname as bt,join as k}from"path";var ht={rootFiles:new Set,sourcePrefixes:[]},yt=new Set([".git",".codebaseiq","node_modules","target"]),Pt=6,xt=u("rust-library-surface",{clearGroups:["whole-project"]});function U(t,e,n){if(!n.endsWith(".rs")||!wt(Et(t),n))return!1;let r=D(t,n).find(s=>s.symbol===e);return r?Rt(j(t,n)[r.startLine]??""):!1}function Et(t){return xt.get(t,()=>kt(t.config.projectRoot))}function kt(t){let e=new Set,n=new Set;for(let r of Tt(t)){let s=m(t,k(r,"Cargo.toml"),{maxBytes:8388608,inputKind:"Cargo manifest"}),i=jt(s),a=f(r,"src/lib.rs"),o=i?f(r,i):!_t(s)&&T(t,a)?a:null;if(!o)continue;e.add(o);let c=bt(o).replaceAll("\\","/");n.add(c==="."?"":`${c}/`)}return e.size===0?ht:{rootFiles:e,sourcePrefixes:[...n].sort()}}function wt(t,e){return e.endsWith(".rs")?t.rootFiles.has(e)?!0:Ot(e)?!1:t.sourcePrefixes.some(n=>e.startsWith(n)):!1}function Rt(t){return/^\s*pub\s+(?!\()/.test(t)}function Tt(t){if(!E(t))return[];let e=[];return W(t,"",e,0),e}function W(t,e,n,r){let s=k(t,e);if(E(s)&&(E(k(s,"Cargo.toml"))&&n.push(e),!(r>=Pt)))for(let i of mt(s,{withFileTypes:!0})){if(!i.isDirectory()||yt.has(i.name))continue;let a=e?`${e}/${i.name}`:i.name;W(t,a,n,r+1)}}function jt(t){let e=!1;for(let n of t.split(`
|
|
2
2
|
`)){let r=n.replace(/\s+#.*$/,"").trim(),s=/^\[([^\]]+)\]$/.exec(r);if(s){e=s[1]==="lib";continue}if(!e)continue;let i=/^path\s*=\s*["']([^"']+)["']/.exec(r)?.[1];if(i)return i.replaceAll("\\","/").replace(/^\.\//,"")}return null}function _t(t){let e=!1;for(let n of t.split(`
|
|
3
3
|
`)){let r=n.replace(/\s+#.*$/,"").trim(),s=/^\[([^\]]+)\]$/.exec(r);if(s){e=s[1]==="package";continue}if(e&&/^autolib\s*=\s*false\b/.test(r))return!0}return!1}function Ot(t){return/(?:^|\/)src\/main\.rs$/.test(t)||/(?:^|\/)src\/bin\//.test(t)||/(?:^|\/)(?:examples|tests|benches)\//.test(t)}function At(t){return p(t)==="barrel"}function K(t){return Dt.get(t,()=>{let n=S(t,{includeIgnored:!1}).filter(a=>{let o=p(a);return o==="entry"||o==="worker"});if(n.length===0)return new Set;let r=O(t),s=new Set,i=new Set;for(;n.length>0;){let a=n.shift();if(!s.has(a)){s.add(a),p(a)==="barrel"&&i.add(a);for(let o of r.get(a)??[])s.has(o)||n.push(o)}}return i})}var Dt=u("live-barrels",{clearGroups:["whole-project"]});function vt(t,e){return K(t).has(l(e))}function ke(t){let e=K(t);return S(t,{includeIgnored:!1}).filter(n=>At(n)&&!e.has(n)&&!Ft(t,n))}function Ft(t,e){let n=l(e),r=A(t).forFile(n,{facts:!0}).facts?.callables;return r&&r.length>0?!0:(t.get(`SELECT COUNT(*) AS n
|
|
4
4
|
FROM defn_enclosing_ranges der
|
|
5
5
|
JOIN documents d ON d.id = der.document_id
|
|
6
6
|
WHERE d.relative_path = ?
|
|
7
7
|
AND der.end_line - der.start_line >= 2`,n)?.n??0)>0}function we(t,e){let n=l(e),r=p(e);return r==="entry"||r==="worker"||qt(n)||vt(t,n)}function Mt(t,e,n){let r=l(n),s=[];x(t,r)&&s.push("package-surface-file"),Nt(t,e,r)&&s.push("transitive-package-surface"),U(t,e,r)&&s.push("rust-public-library"),Kt(e,r)&&s.push("framework-entrypoint");let i=t.config.entryRoots;return i&&(i.files?.some(a=>l(a)===r)&&s.push("configured-file"),i.pathPrefixes?.some(a=>r.startsWith(l(a)))&&s.push("configured-path-prefix"),i.qualifiedVars?.some(a=>Jt(e,a))&&s.push("configured-qualified-var"),i.symbolPatterns?.some(a=>{try{return w(a,"entryRoots.symbolPatterns entry").test(e)}catch{return!1}})&&s.push("configured-symbol-pattern")),s}function Re(t,e,n){return Mt(t,e,n).length>0}var $t=u("package-surface-reachability",{clearGroups:["whole-project"]}),Ct=u("explicit-package-surface-reachability",{clearGroups:["whole-project"]});function Nt(t,e,n){let r=Lt(t).get(n);return r===void 0?!1:r===null||r.has(b(e))}function Te(t,e,n){let r=It(t).get(n);return r===void 0?!1:r===null||r.has(b(e))}function Lt(t){return $t.get(t,()=>q(t,e=>x(t,e)))}function It(t){return Ct.get(t,()=>q(t,e=>N(t,e)))}function q(t,e){let n=new Map,r=[];for(let s of S(t,{includeIgnored:!1}))e(s)&&(n.set(s,null),r.push(s));for(;r.length>0;){let s=r.shift(),i=n.get(s);if(i!==void 0)for(let a of _(t,s)){if(!a.sourcePath||t.isIgnored(a.sourcePath))continue;let o=Vt(i,a);o!==void 0&&Bt(n,a.sourcePath,o)&&r.push(a.sourcePath)}}return n}function Vt(t,e){if(t===null)return e.kind==="named"?new Set(e.names):null;if(e.kind==="star")return new Set(t);if(e.kind==="star-as")return e.names.some(r=>t.has(r))?null:void 0;let n=e.names.filter(r=>t.has(r));return n.length>0?new Set(n):void 0}function Bt(t,e,n){if(!t.has(e))return t.set(e,n),!0;let r=t.get(e);if(r===void 0)return!1;if(r===null||n===null)return r===null?!1:(t.set(e,null),!0);let s=!1;for(let i of n)r.has(i)||(r.add(i),s=!0);return s}var Y=new Set(["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]),Xt=new Set(["default","generateMetadata","generateStaticParams"]),Gt=new Set(["default","getStaticProps","getServerSideProps","getStaticPaths","config"]),Ut=new Set(["default","loader","action","clientLoader","clientAction","headers","links","meta","shouldRevalidate","ErrorBoundary","HydrateFallback"]),Wt=new Set(["load","actions","entries",...Y]),Ht=new Set(["default"]);function Kt(t,e){let n=b(t);return n===""?!1:Z(e)?Y.has(n):J(e)?Xt.has(n):Q(e)?Gt.has(n):z(e)?Ut.has(n):tt(e)?Wt.has(n):Zt(e)?Ht.has(n):!1}function qt(t){return Z(t)||J(t)||Q(t)||Yt(t)||z(t)||tt(t)}function Z(t){return/(?:^|\/)app(?:\/[^/]+)*\/route\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function J(t){return/(?:^|\/)app(?:\/[^/]+)*\/(?:page|layout|template|loading|error|not-found|global-error|head|default)\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function Q(t){return/(?:^|\/)pages\/.+\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function Yt(t){let e="(?:middleware|proxy|instrumentation)\\.(?:ts|js|mts|mjs)";return new RegExp(`^(?:src/)?${e}$`).test(t)||new RegExp(`(?:^|/)src/${e}$`).test(t)||new RegExp(`(?:^|/)(?:apps|services|packages)/[^/]+/(?:src/)?${e}$`).test(t)}function z(t){return/(?:^|\/)app\/routes\/.+\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function tt(t){return/(?:^|\/)src\/routes\/(?:.*\/)?\+(?:page|page\.server|layout|layout\.server|server)\.(?:ts|js)$/.test(t)}function Zt(t){return/(?:^|\/)src\/(?:pages|views|routes)\/.+\.(?:ts|tsx|js|jsx|vue)$/.test(t)}function Jt(t,e){let n=e.lastIndexOf("/");if(n<0)return!1;let r=e.slice(0,n),s=e.slice(n+1);return t.includes(H(r)+"/")&&t.includes(H(s)+".")}function H(t){return/^[A-Za-z0-9_$+-]+$/.test(t)?t:"`"+t.replace(/`/g,"``")+"`"}export{x as a,ne as b,At as c,vt as d,ke as e,we as f,Mt as g,Re as h,Te as i,qt as j};
|
|
8
|
-
//# sourceMappingURL=chunk-
|
|
8
|
+
//# sourceMappingURL=chunk-GLXEWYQY.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{d as ee,f as ne}from"./chunk-
|
|
1
|
+
import{d as ee,f as ne}from"./chunk-7XHZX6FX.js";import{a as J,b as se,d as W,e as Z,f as H}from"./chunk-3GKKCVKK.js";import{h as re}from"./chunk-ZQ6GAIUV.js";import{a as G}from"./chunk-NB2DAVPP.js";import{f as Y}from"./chunk-RGBZDOUO.js";import{C as ae}from"./chunk-NRNVMB2R.js";import{x as X}from"./chunk-23AD24QZ.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-GRHNPFHT.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{k as x}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{k as x}from"./chunk-R2F2CTBA.js";import{a as y,e as b}from"./chunk-TNLOX4TN.js";import{z as v}from"./chunk-NRNVMB2R.js";import{g,l as D,m as F,t as E,v as I}from"./chunk-23AD24QZ.js";import{a as _,d as p}from"./chunk-3LCDIREB.js";import{spawnSync as P}from"child_process";import{createHash as U}from"crypto";import{existsSync as k}from"fs";import{dirname as L,join as T}from"path";import{fileURLToPath as j}from"url";var R=g("definition-consumer-file-usage",{clearGroups:["whole-project","source-file"]}),M=E({kind:"consumer-file-usage",invalidation:I("consumer-file-usage"),serialize:Q,deserialize:W});function Le(e,n){return{forDefinitions(r,i){return B(e,n,r,i)}}}function Me(e){let n=new Map;for(let[r,i]of e)n.set(r,new Set(i.files.map(t=>t.file)));return n}function Ne(e,n,r){return w(e,n,r).partition}function B(e,n,r,i){let t=h(r.length),s=_()?F(e):null,a=s?V(r,i,s):void 0,o=a?{workIdentity:a,workOutcome:"computed"}:{};return p("consumer-evidence.product",()=>{let l=p("consumer-evidence.provenance",()=>z(e,n,r,i),()=>({...o,definitions:r.length,semantic:i.semantic,sourceFallback:i.sourceFallback!==!1})),u=new Map;t={...t,...l.counters};let c=q(r,l.sources);return p("consumer-evidence.classify",()=>{let f=Y(e,r,l.sources,c);for(let d of r){let m=f.get(d.symbolId)??$();t.realFiles+=m.partition.realConsumers.length,t.reexportOnlyFiles+=m.partition.barrelConsumers,t.importOnlyFiles+=m.partition.importOnlyConsumers,u.set(d.symbolId,{definition:d,files:m.files,semanticIncomplete:l.incompleteSymbolIds.has(d.symbolId),semanticUnavailable:l.unavailableSymbolIds.has(d.symbolId),...m.partition})}},()=>({...o,...c,realFiles:t.realFiles,reexportOnlyFiles:t.reexportOnlyFiles,importOnlyFiles:t.importOnlyFiles})),u},()=>({...o,...t}))}function V(e,n,r){let i=U("sha256").update("consumer-evidence-v3-calibrated-semantic\0").update(r).update("\0").update(n.semantic?"semantic\0":"indexed\0").update(n.sourceFallback===!1?"no-source-fallback":"source-fallback");for(let t of e.map(s=>s.symbol).sort())i.update("\0").update(t);return i.digest("hex").slice(0,24)}function h(e){return{definitions:e,indexedFiles:0,semanticFiles:0,fallbackFiles:0,totalFiles:0,realFiles:0,reexportOnlyFiles:0,importOnlyFiles:0}}function z(e,n,r,i){let t=h(r.length),s=new Map,a=new Set,o=new Set;if(S(s,t,"indexed",n.crossFileCallerMap(r,{semantic:!1})),i.semantic){let l=x(e,r);S(s,t,"semantic",l.callers);for(let u of l.incompleteSymbolIds)a.add(u);for(let u of l.unavailableSymbolIds)o.add(u)}return i.sourceFallback!==!1&&S(s,t,"source-fallback",n.sourceFallbackCallerFiles(r)),t.totalFiles=[...s.values()].reduce((l,u)=>l+u.size,0),{sources:s,counters:t,incompleteSymbolIds:a,unavailableSymbolIds:o}}function q(e,n){return{definitions:e.length,consumerFiles:[...n.values()].reduce((r,i)=>r+i.size,0),nativeAttempted:!1,nativeUsed:!1,nativeReason:"not-attempted"}}function S(e,n,r,i){let t=0;for(let[s,a]of i){let o=e.get(s);o||(o=new Map,e.set(s,o));for(let l of a){t++;let u=o.get(l)??new Set;u.add(r),o.set(l,u)}}r==="indexed"?n.indexedFiles+=t:r==="semantic"?n.semanticFiles+=t:n.fallbackFiles+=t}function Y(e,n,r,i){let t=re(e,n,r,i);return t||H(e,n,r)}function H(e,n,r){let i=new Map;for(let t of n){let s=r.get(t.symbolId)??new Map;i.set(t.symbolId,w(e,t,[...s.keys()],s))}return i}function w(e,n,r,i=new Map){let t=[],s=0,a=0,o=b(n.symbol),l=[];for(let u of r){let c;X(e,u,n.relativePath,o)?(s++,c="reexport-only"):J(e,u,o)?(a++,c="import-only"):(t.push(u),c="real"),l.push({file:u,sources:[...i.get(u)??[]],classification:c})}return{partition:{realConsumers:t,barrelConsumers:s,importOnlyConsumers:a},files:l}}function $(){return{partition:{realConsumers:[],barrelConsumers:0,importOnlyConsumers:0},files:[]}}function J(e,n,r){if(!r)return!1;let i=v(n);if(!i)return!1;let t=R.get(e,n,()=>A(e,n,i));return t.importedLeaves.has(r)&&!t.usedLeaves.has(r)}function A(e,n,r){let i=y(e).forFile(n,{text:!0,ast:!0}),t=i.text;if(!t)return G();let s=D(e,n,t),a=M.read(e,n,s);if(a)return a;let o=K(i.ast,r);return M.write(e,n,s,o),o}function K(e,n){let r=new Set,i=new Set;if(!e)return{importedLeaves:r,usedLeaves:i};let t=n==="rust"?new Set(["use_declaration"]):n==="python"?new Set(["import_statement","import_from_statement"]):new Set(["import_statement"]),s=(a,o)=>{let l=o||t.has(a.type);(a.type==="identifier"||a.type==="type_identifier"||a.type==="property_identifier"||a.type==="field_identifier")&&(l?r.add(a.text):i.add(a.text));for(let u of a.children)s(u,l)};return s(e.rootNode,!1),{importedLeaves:r,usedLeaves:i}}function G(){return{importedLeaves:new Set,usedLeaves:new Set}}function Q(e){return JSON.stringify({importedLeaves:[...e.importedLeaves],usedLeaves:[...e.usedLeaves]})}function W(e){try{let n=JSON.parse(e);return!Array.isArray(n.importedLeaves)||!Array.isArray(n.usedLeaves)?null:{importedLeaves:new Set(n.importedLeaves.filter(r=>typeof r=="string")),usedLeaves:new Set(n.usedLeaves.filter(r=>typeof r=="string"))}}catch{return null}}function X(e,n,r,i){if(!i)return!1;let t=y(e).forFile(n,{lines:!0,reexports:!0}),s=t.lines??[];if(s.length===0)return!1;let a=t.reexports??[];return O(s,a,i)}function O(e,n,r){if(e.length===0||n.length===0)return!1;let i=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),t=new RegExp(`\\b${i}\\b`),s=0;for(let a=0;a<e.length;a++){if(!t.test(e[a]??""))continue;if(s++,!n.find(l=>l.startLine<=a&&a<=l.endLine))return!1}return s>0}var Z="CODEBASEIQ_NATIVE_CONSUMER_CLASSIFY",ee="CODEBASEIQ_NATIVE_KERNELS_BIN",ne="CODEBASEIQ_NATIVE_CONSUMER_CLASSIFY_MIN_FILES",N=1e3,ie=5e3,te=64*1024*1024,C;function re(e,n,r,i){let t=process.env[Z]?.toLowerCase();if(t!=="1"&&t!=="true")return i.nativeReason=t==="0"||t==="false"?"disabled":"opt-in-required",null;if(i.consumerFiles<fe())return i.nativeReason="below-threshold",null;let s=me();if(!s)return i.nativeReason="binary-missing",null;i.nativeAttempted=!0;let a=se(e,n,r),o=P(s,["consumer-classify"],{input:JSON.stringify(a),encoding:"utf8",timeout:ie,maxBuffer:te,windowsHide:!0});if(o.status!==0||o.error)return i.nativeReason=o.error?`spawn-error:${o.error.message}`:`exit-${o.status??"null"}`,null;try{let l=JSON.parse(o.stdout),u=ae(l,n);return u?(i.nativeUsed=!0,i.nativeReason="used",u):(i.nativeReason="invalid-response",null)}catch{return i.nativeReason="invalid-json",null}}function se(e,n,r){let i=new Map,t=[];for(let o of n){let l=b(o.symbol),c=[...(r.get(o.symbolId)??new Map).entries()].map(([f,d])=>{let m=i.get(f)??new Set;return l&&m.add(l),i.set(f,m),{file:f,sources:[...d]}});t.push({symbol_id:o.symbolId,leaf:l,consumer_files:c})}let s={},a={};for(let[o,l]of i){let u=v(o);if(u){let f=R.get(e,o,()=>A(e,o,u));s[o]={imported_leaves:[...f.importedLeaves],used_leaves:[...f.usedLeaves]}}let c=oe(e,o,l);c.length>0&&(a[o]=c)}return{definitions:t,file_usages:s,reexport_only_leaves:a}}function oe(e,n,r){if(r.size===0)return[];let i=y(e).forFile(n,{lines:!0,reexports:!0}),t=i.lines??[],s=i.reexports??[];return t.length===0||s.length===0?[]:[...r].filter(a=>O(t,s,a))}function ae(e,n){if(!Array.isArray(e.entries)||e.entries.length!==n.length)return null;let r=new Set(n.map(t=>t.symbolId)),i=new Map;for(let t of e.entries){let s=le(t);if(!s||!r.has(s.symbol_id))return null;i.set(s.symbol_id,{partition:{realConsumers:s.real_consumers,barrelConsumers:s.barrel_consumers,importOnlyConsumers:s.import_only_consumers},files:s.files})}for(let t of r)if(!i.has(t))return null;return i}function le(e){if(!e||typeof e!="object")return null;let n=e;if(typeof n.symbol_id!="number"||!Array.isArray(n.real_consumers)||typeof n.barrel_consumers!="number"||typeof n.import_only_consumers!="number"||!Array.isArray(n.files)||!n.real_consumers.every(i=>typeof i=="string"))return null;let r=[];for(let i of n.files){if(!i||typeof i!="object")return null;let t=i;if(typeof t.file!="string"||!Array.isArray(t.sources)||!t.sources.every(ue)||!ce(t.classification))return null;r.push({file:t.file,sources:t.sources,classification:t.classification})}return{symbol_id:n.symbol_id,real_consumers:n.real_consumers,barrel_consumers:n.barrel_consumers,import_only_consumers:n.import_only_consumers,files:r}}function ue(e){return e==="indexed"||e==="semantic"||e==="source-fallback"}function ce(e){return e==="real"||e==="reexport-only"||e==="import-only"}function fe(){let e=process.env[ne];if(!e)return N;let n=Number(e);return Number.isFinite(n)&&n>=0?n:N}function me(){if(C!==void 0)return C;let e=process.env[ee],n=process.platform==="win32"?"codebaseiq-kernels.exe":"codebaseiq-kernels";return C=[...e?[e]:[],...de().map(i=>T(i,"target","release",n))].find(i=>k(i))??null,C}function de(){let e=new Set,n=L(j(import.meta.url));for(let r=0;r<5;r++)e.add(n),n=L(n);return[...e]}export{Le as a,Me as b,Ne as c,J as d};
|
|
2
|
+
//# sourceMappingURL=chunk-GWESWURK.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{s as Y}from"./chunk-JG5OWAEB.js";import{f as H}from"./chunk-FPUJRBHL.js";import{d as L,e as W}from"./chunk-RS6UYNEP.js";import{Fb as F,Gb as J,Qb as M,R as $,S as w,W as G,m as B,o as m,p as N,q as z,t as v}from"./chunk-AZDY3EKD.js";import{e as A,g as O,k as C,s as R}from"./chunk-KPMMOAV5.js";import{existsSync as k,lstatSync as b,readdirSync as K,realpathSync as U,rmSync as S,statSync as Q}from"fs";import{join as l,resolve as P,sep as V}from"path";var ne=3600*1e3,oe=2*1024*1024*1024,x=300*1e3,se="gc-state.json",ae="gc.lock",ie="projects-gc-state.json",ce="projects-gc.lock",le=1440*60*1e3;function de(t){let e=t.leases.filter(o=>o.managed&&!o.live&&!o.busy),n=X(t.leases,t.locks),r={};for(let o of t.generations)n.has(o.generationId)||(r[o.generationId]=o.unreferencedAt??t.nowMs);let a=t.generations.filter(o=>!n.has(o.generationId)).sort((o,d)=>r[o.generationId]-r[d.generationId]||o.generationId.localeCompare(d.generationId)),s=new Set;for(let o of a)t.nowMs-r[o.generationId]>=t.policy.generationTtlMs&&s.add(o.generationId);let c=t.generations.filter(o=>!s.has(o.generationId)).reduce((o,d)=>o+d.size,0);for(let o of a){if(c<=t.policy.budgetBytes)break;s.has(o.generationId)||(s.add(o.generationId),c-=o.size)}for(let o of s)delete r[o];return{deleteWorktrees:e,deleteGenerations:t.generations.filter(o=>s.has(o.generationId)),deleteLocks:t.locks.filter(o=>!o.live),deleteTemporaries:t.temporaries.filter(o=>!o.live),protectedGenerationIds:[...n].sort(),unreferencedSince:r}}function X(t,e){let n=new Set(t.filter(r=>r.managed&&(r.live||r.busy)).flatMap(r=>[r.lease.baseGenerationId,r.lease.activeGenerationId]).filter(r=>r!==void 0));for(let r of e)r.live&&n.add(r.generationId);return n}function Le(t,e,n={}){if(!z())return{kind:"disabled"};let r=A(t);if(!r)return{kind:"unavailable"};let a=l(m(),"repositories",r.repositoryId),s=(n.now??Date.now)(),c=k(a)?Z(t,a,r.repositoryId,e,s,n):{kind:"unavailable"};return fe(t,r.repositoryId,e,s,n),ue(s,n),c}function ue(t,e){let n=l(m(),"projects"),r={examined:0,reclaimed:0};if(!k(n))return r;let a=l(n,ie),s=re(a);if(!e.force&&s!==void 0&&t-s<x)return r;let c=w(l(n,ce));if(!c)return r;try{for(let o of I(n)){let d=l(n,o),i;try{i=b(d)}catch{continue}if(!(!i.isDirectory()||i.isSymbolicLink())&&(r.examined+=1,!!pe(d,t)))try{S(d,{recursive:!0,force:!0}),r.reclaimed+=1}catch{}}G(a,{version:1,lastSweepAt:new Date(t).toISOString()},{spacing:2,trailingNewline:!0})}finally{c.release()}return r}function pe(t,e){let n=l(t,B),r;try{let c=JSON.parse(R(n,"cache-ownership"));if(typeof c.canonicalProjectRoot!="string"||c.canonicalProjectRoot.length===0)return!1;r=c.canonicalProjectRoot}catch{return!1}if(k(r))return!1;try{if(e-b(t).mtimeMs<le)return!1}catch{return!1}let a=W(L(t).statePath);if(a&&C(a.pid))return!1;let s=w(l(t,"cache-lifecycle.lock"));return s===null?!1:(s.release(),!0)}function Z(t,e,n,r,a,s){let c=l(e,"gc-state.json"),o=te(c);if(!s.force&&o&&a-Date.parse(o.lastSweepAt)<x)return{kind:"throttled",sweptAt:o.lastSweepAt};let d=$(e,{now:()=>a});if(!d)return{kind:"busy"};try{let i=ee(t,e,n,o?.unreferencedSince??{}),u=de({nowMs:a,...i,policy:{generationTtlMs:s.policy?.generationTtlMs??ne,budgetBytes:s.policy?.budgetBytes??oe}}),p=0,y=0;for(let f of u.deleteWorktrees){if(!T(f.lease))continue;if(!k(f.lease.localCacheDir)){S(f.leasePath,{force:!0}),y+=1;continue}if(!he(f.lease))continue;let _=w(l(f.lease.localCacheDir,"cache-lifecycle.lock"));if(_)try{if(E(f.lease,!0))continue;try{Y({projectRoot:f.lease.projectRoot,cacheDir:f.lease.localCacheDir,cliVersion:r})}catch{continue}if(E(f.lease,!0))continue;S(f.lease.localCacheDir,{recursive:!0,force:!0}),S(f.leasePath,{force:!0}),y+=1}finally{_.release()}}for(let f of u.deleteLocks)S(f.path,{force:!0});for(let f of u.deleteTemporaries)S(f.path,{recursive:!0,force:!0});for(let f of u.deleteGenerations)S(f.path,{recursive:!0,force:!0}),p+=f.size;H(l(e,"evidence.db"));let g={kind:"swept",sweptAt:new Date(a).toISOString(),deletedWorktrees:y,deletedGenerations:u.deleteGenerations.length,deletedBytes:p,protectedGenerations:u.protectedGenerationIds.length},h={version:1,lastSweepAt:g.sweptAt,unreferencedSince:u.unreferencedSince,lastResult:g};return G(c,h,{spacing:2,trailingNewline:!0}),g}catch(i){return{kind:"failed",error:i instanceof Error?i.message:String(i)}}finally{d.release()}}function fe(t,e,n,r,a){let s=l(m(),"repositories");if(!k(s))return;let c=l(s,se),o=re(c);if(!a.force&&o!==void 0&&r-o<x)return;let d=w(l(s,ae));if(d)try{for(let i of I(s)){if(i===e||!/^[a-f0-9]{24}$/.test(i))continue;let u=l(s,i),p;try{p=b(u)}catch{continue}if(!p.isDirectory()||p.isSymbolicLink())continue;let y=ge(u)??t;Z(y,u,i,n,r,a)}G(c,{version:1,lastSweepAt:new Date(r).toISOString()},{spacing:2,trailingNewline:!0})}finally{d.release()}}function Ee(t,e,n){let r=F(t,n.dbPath,e);if(r)return{state:"bypassed",reason:r,localCacheDir:n.cacheDir,generations:0,generationBytes:0,protectedGenerations:0,unreferencedGenerations:0,unreferencedBytes:0,temporaryGenerations:0,sharedEvidence:{exists:!1,bytes:0}};let a=A(t);if(!a)return{state:"unavailable",reason:"Git worktree identity is unavailable",localCacheDir:n.cacheDir,generations:0,generationBytes:0,protectedGenerations:0,unreferencedGenerations:0,unreferencedBytes:0,temporaryGenerations:0,sharedEvidence:{exists:!1,bytes:0}};let s=l(m(),"repositories",a.repositoryId),c=j(l(s,"worktrees",`${a.worktreeId}.json`)),o=te(l(s,"gc-state.json")),d=ee(t,s,a.repositoryId,o?.unreferencedSince??{}),i=X(d.leases,d.locks),u=d.generations.filter(h=>!i.has(h.generationId)),p=d.generations.reduce((h,f)=>h+f.size,0),y=J(t,e),g=0;return y&&(g=ye(y)),{state:"managed",repositoryId:a.repositoryId,worktreeId:a.worktreeId,localCacheDir:n.cacheDir,...c?{baseGenerationId:c.baseGenerationId,activeGenerationId:c.activeGenerationId,lastAction:c.lastAction,reason:c.lastReason,lastSeenAt:c.lastSeenAt}:{},generations:d.generations.length,generationBytes:p,protectedGenerations:d.generations.filter(h=>i.has(h.generationId)).length,unreferencedGenerations:u.length,unreferencedBytes:u.reduce((h,f)=>h+f.size,0),temporaryGenerations:d.temporaries.length,sharedEvidence:{path:y,exists:g>0,bytes:g},cleanup:o?.lastResult}}function ye(t){return[t,`${t}-wal`,`${t}-shm`].reduce((e,n)=>{try{return e+Q(n).size}catch{return e}},0)}function ee(t,e,n,r){let a=new Set(O(t).map(i=>P(i.path))),s=[];for(let i of I(l(e,"worktrees"))){if(!i.endsWith(".json"))continue;let u=l(e,"worktrees",i),p=j(u);if(!p)continue;let y=P(p.projectRoot);s.push({leasePath:u,lease:p,managed:p.repositoryId===n&&T(p),live:a.has(y)||k(y),busy:E(p)})}let c=[];for(let i of I(l(e,"locks"))){let u=/^([a-f0-9]{64})\.lock$/.exec(i);if(!u)continue;let p=l(e,"locks",i),y=D(p),g=y!==void 0&&C(y),h=u[1];c.push({generationId:h,path:p,live:g})}let o=[],d=[];for(let i of I(l(e,"generations"))){let u=/^\.tmp-(\d+)-/.exec(i);if(u){let g=l(e,"generations",i),h=Number(u[1]);try{d.push({path:g,size:q(g),live:Number.isSafeInteger(h)&&C(h)})}catch{}continue}if(!/^[a-f0-9]{64}$/.test(i))continue;let p=l(e,"generations",i),y;try{y=b(p)}catch{continue}!y.isDirectory()||y.isSymbolicLink()||o.push({generationId:i,path:p,size:q(p),...r[i]===void 0?{}:{unreferencedAt:r[i]}})}return{leases:s,generations:o,locks:c,temporaries:d}}function T(t){if(t.ownershipChecksum!==M(t)||v(t.localCacheDir)!==v(N(t.projectRoot)))return!1;let e=v(l(m(),"projects"));return v(t.localCacheDir).startsWith(`${e}${V}`)}function he(t){if(!T(t))return!1;let e=P(m()),n=P(l(e,"projects")),r=P(t.localCacheDir);try{let a=b(e),s=b(n),c=b(r);if(!a.isDirectory()||a.isSymbolicLink()||!s.isDirectory()||s.isSymbolicLink()||!c.isDirectory()||c.isSymbolicLink())return!1;let o=U(n);return U(r).startsWith(`${o}${V}`)}catch{return!1}}function ge(t){for(let e of I(l(t,"worktrees"))){if(!e.endsWith(".json"))continue;let n=j(l(t,"worktrees",e));if(n)return n.projectRoot}}function E(t,e=!1){for(let r of e?["index.lock"]:["index.lock","cache-lifecycle.lock"]){let a=D(l(t.localCacheDir,r));if(a!==void 0&&C(a))return!0}let n=D(L(t.localCacheDir).lockPath);return n!==void 0&&C(n)}function j(t){try{let e=JSON.parse(R(t,"worktree cache lease"));return e.version!==1||typeof e.repositoryId!="string"||typeof e.worktreeId!="string"||typeof e.projectRoot!="string"||e.treeOid!==void 0&&typeof e.treeOid!="string"||typeof e.localCacheDir!="string"||e.baseGenerationId!==void 0&&typeof e.baseGenerationId!="string"||e.activeGenerationId!==void 0&&typeof e.activeGenerationId!="string"||typeof e.ownershipChecksum!="string"||!/^[a-f0-9]{64}$/.test(e.ownershipChecksum)||typeof e.lastAction!="string"||e.lastReason!==void 0&&typeof e.lastReason!="string"||typeof e.lastSeenAt!="string"?null:e}catch{return null}}function D(t){try{let e=JSON.parse(R(t,"watch lock record"));return typeof e.pid=="number"&&Number.isSafeInteger(e.pid)&&e.pid>0?e.pid:void 0}catch{return}}function te(t){try{let e=JSON.parse(R(t,"repository cache GC state"));return e.version!==1||typeof e.lastSweepAt!="string"||!Number.isFinite(Date.parse(e.lastSweepAt))||!e.unreferencedSince||typeof e.unreferencedSince!="object"||!e.lastResult?null:e}catch{return null}}function re(t){try{let e=JSON.parse(R(t,"global repository cache GC state"));if(e.version!==1||typeof e.lastSweepAt!="string")return;let n=Date.parse(e.lastSweepAt);return Number.isFinite(n)?n:void 0}catch{return}}function I(t){try{return K(t)}catch{return[]}}function q(t){let e=0,n=[t];for(;n.length>0;){let r=n.pop();for(let a of K(r,{withFileTypes:!0})){let s=l(r,a.name);a.isDirectory()?n.push(s):a.isFile()&&(e+=Q(s).size)}}return e}export{Le as a,Ee as b};
|
|
3
|
+
//# sourceMappingURL=chunk-GXOFPAIR.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{A as G,D as P,a as y,b as ce,i as k,j as le,t as B,u as de,w as j,x as ue,y as b}from"./chunk-
|
|
2
|
+
import{A as G,D as P,a as y,b as ce,i as k,j as le,t as B,u as de,w as j,x as ue,y as b}from"./chunk-YXZAAQHZ.js";import{c as Y,d as H,e as Z,g as X,i as ee,k as x}from"./chunk-74LRKLNC.js";import{E,a as g,b as Q,c as C,e as S,v as se,x as ae}from"./chunk-DQZF7MP6.js";import{E as W}from"./chunk-OSZ7PW5K.js";import{Ga as N,Ha as L,Ja as M,V as te,Wa as oe,Xa as re,Za as ie,ga as T,ka as ne}from"./chunk-FPUJRBHL.js";function ge(e,n,t){if(!Number.isSafeInteger(t.limit)||t.limit<=0)throw new Error("Reference page limit must be a positive safe integer.");let o=N(e,n);if(!o)return{rows:[],hasMore:!1,producer:t.producer??"source-keyset",semanticEnrichment:!1};if(t.producer==="complete-only"||t.semantic===!0||o.relativePath.endsWith(".rb"))return F(e,n,t);let i=oe(e,o);if(!i)return F(e,n,t);let s=fe(e,o),c=Te(e,s),a=[],l=t.producer==="source-keyset";for(let u of c){if(t.after&&u<t.after.relativePath)continue;t.instrumentation?.fileScanned?.(u);let f=re(e,i,u);f.length>0&&(l=!0);let d=new Set(f);s?.relativePath===u&&d.add(s.line);for(let m of[...d].sort((p,Ae)=>p-Ae)){let p={relativePath:u,line:m};if(!(t.after&&R(p,t.after)<=0)&&(a.push(p),t.instrumentation?.rowAccepted?.(p),l&&a.length>t.limit))return me(a,t.limit)}}return l?me(a,t.limit):F(e,n,t,s)}function R(e,n){return(e.relativePath<n.relativePath?-1:e.relativePath>n.relativePath?1:0)||e.line-n.line}function me(e,n){return{rows:e.slice(0,n),hasMore:e.length>n,producer:"source-keyset",semanticEnrichment:!1}}function F(e,n,t,o){let r=N(e,n),i=t.semantic===!0||r?.relativePath.endsWith(".rb")?E(e,n,{semantic:t.semantic}):De(e,n,o),s=Me(i).filter(c=>!t.after||R(c,t.after)>0);for(let c of s.slice(0,t.limit+1))t.instrumentation?.rowAccepted?.(c);return{rows:s.slice(0,t.limit),hasMore:s.length>t.limit,producer:"complete-only",semanticEnrichment:t.semantic===!0}}function De(e,n,t){let o=N(e,n);if(!o)return[];let r=t===void 0?fe(e,o):t,i=ie(e,o).map(s=>({relativePath:s.file,line:s.line}));return r?[r,...i]:i}function fe(e,n){return!ne(n.symbol)&&!e.isIgnored(n.relativePath)?{relativePath:n.relativePath,line:n.startLine}:null}function Te(e,n){let t=te(e);return!n||t.includes(n.relativePath)?t:[...t,n.relativePath].sort((o,r)=>o<r?-1:o>r?1:0)}function Me(e){let n=new Map;for(let t of e)n.set(`${t.relativePath}\0${t.line}`,t);return[...n.values()].sort(R)}import{InvalidArgumentError as v}from"commander";var St=W,Be=/^[+-]?\d+$/u,je=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/u,xt=(e=>V(e,"an integer")),pe=(e=>{let n=V(e,"a non-negative integer");if(n<0)throw new v(`Expected a non-negative integer, got "${e}".`);return n}),he=(e=>{let n=V(e,"a positive integer");if(n<1)throw new v(`Expected a positive integer, got "${e}".`);return n}),Et=(e=>{if(!je.test(e))throw new v(`Expected a number, got "${e}".`);let n=Number(e);if(!Number.isFinite(n))throw new v(`Expected a finite number, got "${e}".`);return n});function V(e,n){if(!Be.test(e))throw new v(`Expected ${n}, got "${e}".`);let t=Number(e);if(!Number.isSafeInteger(t))throw new v(`Expected ${n}, got "${e}".`);return t}function h(e,n,t,...o){return o.length>0?{flags:e,description:n,parser:t,defaultValue:o[0]}:{flags:e,description:n,parser:t}}function Ge(){return h("--json","Output as JSON for programmatic consumption")}function Fe(){return h("--compact","Emit minified one-line JSON (use with --json)")}function Ve(){return h("--result-only","Emit only the command-owned result (use with --json)")}function Ce(e=[]){return I(e)}function I(e=[]){let n=[Ge(),Ve(),Fe()],t=new Set(n.map(o=>o.flags));return[...e.filter(o=>!t.has(o.flags)),...n]}function $(e,n=[]){return{category:e,examples:n}}function Pt(e,n){return{origin:"mixed",observedSources:e,producerValidation:{status:"not-evaluated"},families:n}}function $t(e,n){return{origin:e,observedSources:n,producerValidation:{status:"not-evaluated"}}}function wt(e,n,t){return{id:e,selector:n,origin:{kind:"fixed",origin:t}}}function Ot(e,n,t,o){return{id:e,selector:n,origin:{kind:"result-field",field:t,values:o}}}function w(e,n,t,o,r,i,s){return{answers:typeof e=="string"?[e]:e,returns:typeof n=="string"?[n]:n,inputs:t,coverage:o,operation:i,semantic:s,...r?{scope:r}:{}}}function Nt(e,n,t,o,r,i=y){let s=typeof e=="string"?[e]:e,c=typeof n=="string"?[n]:n;return w(s,c,t,o,r,i,K(s.join(" "),c.join("; "),["This command establishes only its declared result units and evidence contract."],void 0,{outputCost:o==="complete"?"bounded":"variable"}))}function ye(e,n,t,o,r,i=y){let s=typeof e=="string"?[e]:e,c=typeof n=="string"?[n]:n;return w(s,c,t,o,r,i,Ke(c.join("; "),["This command does not establish repository graph relationships unless its result says so explicitly."]))}function be(e,n,t={ranking:"identity-only"}){return{kind:"locator",locates:e,nonClaims:n,outputCost:"small",frontierClosure:["evidence","inspect","code"],...t}}function Lt(e){return{kind:"graph-projection",outputCost:"bounded",frontierClosure:["inspect","code"],...e}}function Re(e,n,t,o={}){return{kind:"source-read",reads:e,nonClaims:n,outputCost:"potentially-large",frontierClosure:[],...t?{compatibility:t}:{},...o}}function K(e,n,t,o,r={}){return{kind:"analysis",analysis:e,resultMeaning:n,nonClaims:t,outputCost:"bounded",frontierClosure:["inspect","code"],...o?{compatibility:o}:{},...r}}function Ke(e,n,t,o={}){return{kind:"maintenance",effect:e,nonClaims:n,outputCost:"variable",frontierClosure:[],...t?{compatibility:t}:{},...o}}function J(e){return Buffer.from(JSON.stringify(e),"utf8").toString("base64url")}function A(e){return e.generation.identity}function U(e){return"after"in e?J({version:2,...e}):J({version:1,...e})}function ve(e,n){let t=_e(e);if(!Je(t)&&!Ue(t))throw new Error("Invalid result cursor. Run the command again without --cursor.");return ze(t,n),t}function Je(e){if(!e||typeof e!="object")return!1;let n=e;return n.version===1&&typeof n.command=="string"&&typeof n.target=="string"&&Number.isSafeInteger(n.offset)&&(n.offset??-1)>=0&&typeof n.indexGeneration=="string"&&n.indexGeneration.length>0}function Ue(e){if(!e||typeof e!="object")return!1;let n=e,t=n.after;return n.version===2&&typeof n.command=="string"&&typeof n.target=="string"&&!!t&&typeof t.relativePath=="string"&&t.relativePath.length>0&&Number.isSafeInteger(t.line)&&(t.line??-1)>=0&&(n.producer==="source-keyset"||n.producer==="complete-only")&&typeof n.semanticEnrichment=="boolean"&&typeof n.indexGeneration=="string"&&n.indexGeneration.length>0}function _e(e){try{return JSON.parse(Buffer.from(e,"base64url").toString("utf8"))}catch{throw new Error("Invalid result cursor. Run the command again without --cursor.")}}function ze(e,n){if(e.command!==n.command||e.target!==n.target)throw new Error("This cursor belongs to a different command or target. Run again without --cursor.");if(e.indexGeneration!==n.indexGeneration)throw new Error("The index changed after this cursor was issued. Run again without --cursor.")}function Se(e,n){let t=L(e,n),o=qe(t);for(let r of o)console.log(r)}function xe(e,n,t="No results found for resolved symbol."){return L(e,n).match?t:z(n,M(e,n,5))}function _(e,n,t,o){return{...D(e,n),[o]:t}}function D(e,n){let t=L(e,n);return t.match?{matched:!0,resolved:{symbol:t.match.symbol,shortName:T(t.match.symbol),relativePath:t.match.relativePath},otherMatches:t.candidates.map(o=>({shortName:o.shortName,relativePath:o.relativePath,startLine:o.startLine})),totalMatches:t.total}:{matched:!1,suggestions:M(e,n,5)}}function z(e,n){let t=`No definition matched '${e}'.`;return n.length>0?`${t} Suggestions: ${n.join(", ")}`:t}function qe(e){if(!e.match||e.total<=1)return[];let n=e.match,t=Math.max(0,e.total-1),o=[`Resolved: ${T(n.symbol)} (${n.relativePath}) -- ${t} other definition(s) share this name; qualify as <dir/leaf> to target another.`],r=e.candidates.slice(0,3);return r.length>0&&o.push(`Alternates: ${r.map(i=>`${i.shortName} (${i.relativePath}:${g(i.startLine)})`).join("; ")}`),o.push(""),o}var We=k(({db:e,args:n,opts:t})=>{let o=B(n,0),r=b(t,"signatures"),i=se(e,o);if(b(t,"json")){P("outline",n,t,i);return}if(console.log(`\u2550\u2550\u2550 REQUEST \u2550\u2550\u2550
|
|
3
3
|
file=${JSON.stringify(o)}; signatures=${r?"shown":"hidden"}`),i.length===0){console.log(`
|
|
4
4
|
\u2550\u2550\u2550 OBSERVED FACTS \u2550\u2550\u2550
|
|
5
5
|
No compiler-owned constructs were found for ${JSON.stringify(o)}.`),console.log(`
|
|
@@ -28,4 +28,4 @@ ${p}continue with --cursor ${d.cursor}`)}});function Ye(e,n,t){let o=E(e,n,{sema
|
|
|
28
28
|
`),o=0,r=0;for(let i=0;i<t.length;i++){let s=t[i].length+12;i>o&&r+s>Ee&&(n.push(`${e.relativePath}:${g(e.startLine+o)}-${g(e.startLine+i-1)}`),o=i,r=0),r+=s}return n.push(`${e.relativePath}:${g(e.startLine+o)}-${g(e.endLine)}`),n}function Pe(e,n){return{requested:n.length,matched:n.filter(t=>t.status==="matched").length,ambiguous:n.filter(t=>t.status==="ambiguous").length,missing:n.filter(t=>t.status==="missing").length,entries:[...n],bindingClosure:e.bindingClosure}}function $e(e,n){return["codebaseiq","code",...e.map(O),...n.members==="all"?["--members","all"]:[],...n.context>0?["--context",String(n.context)]:[]].join(" ")}function dt(e,n,t){if(!t)return D(e,n);let o={file:t.relativePath,symbol:t.shortName,language:t.language??"unknown",range:{startLine:g(t.startLine),endLine:g(t.endLine)},...t.freshness?{freshness:t.freshness}:{},lines:t.source.split(`
|
|
29
29
|
`).map((s,c)=>({line:g(t.startLine+c),text:s}))},r=D(e,n),i=r.totalMatches??0;return!r.matched||!r.resolved||i<=1?o:{...o,resolution:{selected:r.resolved,alternatives:r.otherMatches??[],totalMatches:i}}}function ut(e){return{requested:e.requested,matched:e.matched,ambiguous:e.ambiguous,missing:e.missing,entries:e.entries.map(n=>({selector:n.selector,status:n.status,kind:n.kind,totalCandidates:n.totalCandidates,sources:n.results.map(t=>({file:t.relativePath,symbol:t.shortName,language:t.language??"unknown",range:{startLine:g(t.startLine),endLine:g(t.endLine)},...t.freshness?{freshness:t.freshness}:{},lines:t.source.split(`
|
|
30
30
|
`).map((o,r)=>({line:g(t.startLine+r),text:o}))})),definitions:n.definitions,...n.fileCoverage?{fileCoverage:n.fileCoverage}:{},...n.rangeCoverage?{rangeCoverage:n.rangeCoverage}:{},candidates:n.candidates,omittedCandidates:n.omittedCandidates,suggestions:n.suggestions,...n.reason?{reason:n.reason}:{}})),literalValues:e.bindingClosure.inline}}function O(e){return`'${e.replaceAll("'","'\\''")}'`}var Zt=[{id:"session",command:"session",description:"Show evidence already delivered in this agent exploration session",options:[h("--reset","Clear this agent exploration-session ledger")],agent:ye("Which indexed source ranges and graph facts have already been delivered in this exploration session?","prior command ordinals, exact source ranges, and content-bound graph receipts",[],"complete","repository",ce("repository-observation",[{when:{kind:"option",name:"reset",equals:!0},role:"mutation"}])),renderShape:"custom",docs:$("Navigation"),handler:et},{id:"refs",command:"refs <symbol>",description:"Find all files referencing a symbol",options:Ce([h("--full","Run unbounded semantic analysis on large indexes"),h("-n, --limit <n>","Maximum reference sites to return",he),h("--cursor <cursor>","Continue a prior bounded result (implies --limit 50 when omitted)")]),budget:"semantic",agent:{operation:y,answers:["Which files reference this symbol?","Is this symbol used anywhere, or only defined?"],returns:["referencing file paths","reference line numbers grouped by file"],inputs:["symbol"],coverage:"bounded",semantic:K("Resolve the exact reference sites attributed to one compiler symbol identity.","Referencing file paths and reference line numbers grouped by file.",["Reference sites do not establish runtime execution, data flow, or task relevance."]),contrasts:[{command:"imported-by",distinction:"imported-by lists files importing the symbol; refs covers every reference site, imported or not."},{command:"affected",distinction:"refs is one hop out; affected is the transitive closure of what could break."}]},renderShape:"grouped-by-file",docs:$("Navigation",["codebaseiq refs login"]),handler:Qe},{id:"outline",command:"outline <file>",description:"Tree view of symbols in a file, with line ranges",agent:{...w("What symbols and nesting exist in this file?","symbol names, nesting, and line ranges",["file"],"complete",void 0,y,be(["file","symbol","construct"],["File ownership and nesting do not establish execution or task relevance."],{ranking:"identity-only",manualInput:"One exact current project file path.",evidenceCeiling:"Exact compiler-owned constructs and ranges when the file is indexed; no invented semantic overlay."})),contrasts:[{command:"search",distinction:"outline enumerates constructs in one known file; search locates exact text across current project text."},{command:"code",distinction:"outline returns identities and ranges; code materializes exact source for selected identities."}]},options:I([h("--signatures","Show trimmed symbol signatures")]),renderShape:"custom",docs:$("Navigation"),handler:We},{id:"code",command:"code <selectors...>",description:"Read exact definitions, ranges with local call closure, or file export surfaces",agent:{...w("What exact source defines these symbols, ranges, or file surfaces?","per-selector resolution, complete definition source, exact ranges with statically attributed same-file call closure, file export surfaces, omitted-local ledgers, and line ranges",[["symbol","file"]],"complete",void 0,y,Re(["construct","exact-source"],["Source materialization does not establish callers, runtime reachability, or task relevance by itself."],void 0,{manualInput:"One or more exact symbols, file:line ranges, or file paths.",evidenceCeiling:"Exact current source bytes for every resolved selector, with omitted file-local constructs disclosed."})),resultUnits:{kind:"field",field:"code"},contrasts:[{command:"inspect",distinction:"code materializes complete exact source; inspect batches bounded behavior or source gaps."},{command:"outline",distinction:"code reads selected implementations; outline enumerates file structure without reading every body."}]},options:I([h("-C, --context <n>","Extra lines of context above/below",pe,0),h("--members <exported|all>","For file selectors, return the exported surface or the complete file",void 0,"exported")]),renderShape:"custom",docs:$("Navigation",["codebaseiq code parseRequest handleRequest","codebaseiq code src/api.ts src/web.ts"]),handler:Xe}];export{St as a,xt as b,pe as c,he as d,Et as e,h as f,Fe as g,Ce as h,I as i,$ as j,Pt as k,$t as l,wt as m,Ot as n,w as o,Nt as p,ye as q,be as r,Lt as s,Re as t,K as u,Se as v,xe as w,_ as x,D as y,Zt as z};
|
|
31
|
-
//# sourceMappingURL=chunk-
|
|
31
|
+
//# sourceMappingURL=chunk-H4FGIFEU.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as b,b as y,c as m}from"./chunk-SGX43S2L.js";import{b as f,d as g,f as d,u as p}from"./chunk-
|
|
1
|
+
import{a as b,b as y,c as m}from"./chunk-SGX43S2L.js";import{b as f,d as g,f as d,u as p}from"./chunk-TNLOX4TN.js";import{a as c}from"./chunk-NRNVMB2R.js";import{SymbolInformation_Kind as o}from"@c4312/scip";var _=500;function K(n){let s=parseInt(n,10);if(!isNaN(s))return s;let t=n.toLowerCase(),e=y.get(t);if(e!==void 0)return e;for(let[i,l]of b)if(l.toLowerCase().includes(t))return i;return null}function v(n,s,t={}){let{scope:e,limit:i=100}=t,l=K(s);return l===null?[]:h(n,e).map(r=>({row:r,resolvedKind:k(r)})).filter(r=>r.resolvedKind===l).slice(0,i).map(({row:r,resolvedKind:a})=>({symbol:r.symbol,shortName:g(r.symbol),kind:a,kindName:m(a),relativePath:r.relative_path,startLine:r.start_line,endLine:r.end_line}))}function T(n,s={}){let t=I(n,s.scope);for(let e of S(n,s.scope)){let i=k(e);i===null||i===0||t.set(i,(t.get(i)??0)+1)}return[...t.entries()].sort((e,i)=>i[1]-e[1]||e[0]-i[0]).map(([e,i])=>({kind:e,kindName:m(e),count:i}))}function h(n,s){return p(n,{scope:s}).map(R)}function I(n,s){let t=new Map;for(let e of N(c(n,{scope:s,includeIgnored:!1}))){let i=e.map(()=>"?").join(", "),l=n.all(`SELECT gs.kind AS kind, COUNT(*) AS count
|
|
2
2
|
FROM defn_enclosing_ranges der
|
|
3
3
|
JOIN global_symbols gs ON der.symbol_id = gs.id
|
|
4
4
|
JOIN documents d ON der.document_id = d.id
|
|
@@ -20,4 +20,4 @@ import{a as b,b as y,c as m}from"./chunk-SGX43S2L.js";import{b as f,d as g,f as
|
|
|
20
20
|
${n.symbolNoiseFor("gs")}
|
|
21
21
|
AND d.relative_path IN (${i})
|
|
22
22
|
ORDER BY d.relative_path, der.start_line, der.end_line, gs.symbol`,...e))}return t}function N(n){let s=[];for(let t=0;t<n.length;t+=_)s.push(n.slice(t,t+_));return s}function R(n){return{symbol:n.symbol,kind:n.kind,documentation:n.documentation,enclosing_symbol:n.enclosingSymbol,relative_path:n.relativePath,start_line:n.startLine,end_line:n.endLine}}function k(n){return n.kind!==null&&n.kind!==0?D(n.kind,n.symbol,n.documentation):C(n.symbol,n.documentation,n.enclosing_symbol)}function D(n,s,t){let e=(t??"").toLowerCase();if(d(s)==="type"){if(e.includes("type "))return o.TypeAlias;if(e.includes("interface "))return o.Interface;if(e.includes("struct "))return o.Struct;if(e.includes("trait "))return o.Trait;if(e.includes("class "))return o.Class}return n}function C(n,s,t){let e=f(n);if("kind"in e)return null;let i=e.descriptors,l=i[i.length-2]??null,u=d(n),r=(s??"").toLowerCase();return u==="type"?r.includes("type ")?o.TypeAlias:r.includes("interface ")?o.Interface:r.includes("struct ")?o.Struct:r.includes("trait ")?o.Trait:r.includes("class ")?o.Class:o.Class:u==="method"?l?.suffix==="type"?o.Method:o.Function:u==="namespace"?o.Module:u!=="term"?null:r.includes("async def ")||r.includes("def ")?o.Function:(t?d(t):l?.suffix??null)==="type"?o.Field:o.Variable}export{v as a,T as b};
|
|
23
|
-
//# sourceMappingURL=chunk-
|
|
23
|
+
//# sourceMappingURL=chunk-HOGS6JFP.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as x}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as x}from"./chunk-TG4GMU73.js";import{b as g}from"./chunk-B75HZHUP.js";import{c as k}from"./chunk-UHFZDQZJ.js";import{a as n}from"./chunk-BGBBVSH4.js";import{k as v}from"./chunk-R2F2CTBA.js";import{a as L}from"./chunk-NMKQOIYZ.js";import{d as S}from"./chunk-TNLOX4TN.js";import{d as a}from"./chunk-3LCDIREB.js";function B(c,f={}){let{scope:P,minLoc:F=3,scanLimit:d}=f,o=new k(c),u=f.semantic!==!1,y=0,m=a("isolated.candidates",()=>{let t=g(o.productionCallableDefinitions({scope:P,minLoc:F,excludeEntrySurfaces:!0,excludeRootedSymbols:!0,excludeRustTraitImplMembers:!0,includeSuppressed:!0,requireFunctionLikeSymbol:!0,sortByLocDesc:typeof d=="number"&&d>0}),d).filter(w=>!x(c,w));return y=t.length,t},()=>({definitions:y})),p=0,i=a("isolated.strict-callees",()=>{let e=o.symbolsWithNonSelfCallees(m,{additive:!1,semantic:!1});return p=e.size,e},()=>({definitions:m.length,symbols:p})),r=m.filter(e=>!i.has(e.symbolId)),C=0,N=a("isolated.scip-callers",()=>{let e=o.crossFileCallerMap(r,{semantic:!1});return C=e.size,e},()=>({definitions:r.length,symbols:C})),s=new Set(N.keys());for(let e of o.frameworkReferencedSymbolIds(r))s.add(e);let l=r.filter(e=>!s.has(e.symbolId));if(u&&l.length>0){let e=v(c,l);for(let t of e.callers.keys())s.add(t);for(let t of e.incompleteSymbolIds)s.add(t);for(let t of e.unavailableSymbolIds)s.add(t);for(let t of o.symbolsWithNonSelfCallees(l,{additive:!1,semantic:!0}))i.add(t);l=l.filter(t=>!s.has(t.symbolId)).filter(t=>!i.has(t.symbolId))}let h=0,W=a("isolated.source-fallback-callers",()=>{let e=o.sourceFallbackCallerFiles(l,{skipPath:t=>L(t)==="test"});return h=e.size,e},()=>({definitions:l.length,symbols:h}));for(let e of W.keys())s.add(e);let b=l.filter(e=>!s.has(e.symbolId)),I=0,R=a("isolated.additive-callees",()=>{let e=o.symbolsWithNonSelfCallees(b,{additive:!0,semantic:u});return I=e.size,e},()=>({definitions:b.length,symbols:I}));for(let e of R)i.add(e);return b.filter(e=>!i.has(e.symbolId)).sort((e,t)=>n(t)-n(e)||e.relativePath.localeCompare(t.relativePath)||e.startLine-t.startLine).map(e=>({symbol:e.symbol,shortName:S(e.symbol),relativePath:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:n(e)}))}export{B as a};
|
|
2
|
+
//# sourceMappingURL=chunk-HSJLK5MC.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{d}from"./chunk-3GKKCVKK.js";import{C as c}from"./chunk-NRNVMB2R.js";import{x as s}from"./chunk-23AD24QZ.js";var p=new Set(["arrow_function","class_declaration","constructor_declaration","field_definition","function_declaration","function_definition","function_expression","function_item","generator_function_declaration","generator_function","lexical_declaration","method","method_declaration","method_definition","object_method","variable_declaration"]);function b(n,t,e){let o=c(n,t)?.rootNode??null,r=L(o,e);if(!r)return null;let a=s(n,t);if(a.length===0)return null;let u=Math.max(0,r.startPosition.row),i=r.endPosition.column===0?r.endPosition.row-1:r.endPosition.row;return{type:r.type,startLine:u,endLine:Math.min(a.length-1,Math.max(u,i))}}function y(n,t,e,o,r){let a=d(n,t,o,r,[e]),u=a.startLine===a.endLine&&/(?:=>|\(|\{|\[|,)\s*$/u.test(s(n,t)[a.startLine]??"");if(!u&&(a.startLine>o||a.endLine<r))return a;let i=b(n,t,e);return u&&i?{startLine:i.startLine,endLine:i.endLine}:i&&i.startLine>=o&&i.endLine<=r?{startLine:i.startLine,endLine:i.endLine}:{startLine:o,endLine:r}}function L(n,t){if(!n||!f(n,t))return null;let e=m(n,t);for(;e;){if(p.has(e.type))return e;e=e.parent}return null}function m(n,t){let e=n.namedChildren.filter(o=>f(o,t)).sort((o,r)=>l(o)-l(r));return e.length>0?m(e[0],t):n}function f(n,t){return n.startPosition.row<=t&&n.endPosition.row>=t}function l(n){return n.endIndex-n.startIndex}export{b as a,y as b};
|
|
2
|
+
//# sourceMappingURL=chunk-HTPEUJ42.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-SLLFJXTW.js";import{a as c,e as d}from"./chunk-23AD24QZ.js";import{h as l}from"./chunk-6I55VYFG.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-G7GVV2TV.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-IBPXUGJV.js.map
|