codebaseiq 0.1.0 → 0.2.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 +47 -0
- package/dist/augment-vue-worker.js +1 -1
- package/dist/{chunk-DQMDCD24.js → chunk-27PHVDKL.js} +2 -2
- package/dist/{chunk-ZMI2JSX2.js → chunk-2DMVFAY7.js} +2 -2
- package/dist/{chunk-5PUWMSDU.js → chunk-2E6BTWER.js} +2 -2
- package/dist/{chunk-YESXMKX3.js → chunk-2F5ERMNI.js} +2 -2
- package/dist/chunk-2VKB5CMA.js +60 -0
- package/dist/{chunk-NNJ2KZZG.js → chunk-327YK6TB.js} +4 -4
- package/dist/chunk-347TXATM.js +2 -0
- package/dist/{chunk-VEXUL62T.js → chunk-35YYZD3D.js} +2 -2
- package/dist/chunk-36WRYYTE.js +3 -0
- package/dist/chunk-37TKC6MB.js +2 -0
- package/dist/{chunk-FAJQ7LWY.js → chunk-3AC56WAR.js} +2 -2
- package/dist/{chunk-JE3WZ6II.js → chunk-3NUZVLR7.js} +2 -2
- package/dist/{chunk-UZGZB3VB.js → chunk-3XFJUWJE.js} +2 -2
- package/dist/{chunk-OVTS4DKB.js → chunk-4AOOSCZ7.js} +2 -2
- package/dist/{chunk-LU3BMVH2.js → chunk-4IFISPQW.js} +2 -2
- package/dist/chunk-4NHWNAWQ.js +11 -0
- package/dist/chunk-4O52YNKL.js +5 -0
- package/dist/{chunk-HPJRBHVT.js → chunk-54K6556S.js} +2 -2
- package/dist/{chunk-HRWGYWRJ.js → chunk-57GCCPLS.js} +2 -2
- package/dist/{chunk-J77SU6VA.js → chunk-57KEZDPT.js} +2 -2
- package/dist/{chunk-OFBE4NGP.js → chunk-57KFVPVZ.js} +2 -2
- package/dist/{chunk-WOQBZPIF.js → chunk-5BDK6QC3.js} +2 -2
- package/dist/{chunk-7MGU3HPH.js → chunk-5IO2APSS.js} +2 -2
- package/dist/chunk-5NJPH3QZ.js +61 -0
- package/dist/{chunk-GW6Z3WGY.js → chunk-5WXOEJ4G.js} +2 -2
- package/dist/chunk-5XEVXVTK.js +3 -0
- package/dist/{chunk-RR7SX44N.js → chunk-6OVNYYY4.js} +2 -2
- package/dist/{chunk-ZV3JV5G5.js → chunk-6SDEQTVY.js} +2 -2
- package/dist/{chunk-EF2R3WNQ.js → chunk-6URCE5QY.js} +2 -2
- package/dist/{chunk-UCD3H3UZ.js → chunk-6ZV5EDUT.js} +2 -2
- package/dist/{chunk-C6SBF2WH.js → chunk-77GHPR2R.js} +2 -2
- package/dist/{chunk-YVCIMIOC.js → chunk-7R64XY4Y.js} +2 -2
- package/dist/{chunk-VXYS3FZD.js → chunk-7Z7HCZ7J.js} +2 -2
- package/dist/{chunk-CO5R3UNA.js → chunk-A67HT5FR.js} +2 -2
- package/dist/{chunk-UDS562V4.js → chunk-A7XQT7MH.js} +2 -2
- package/dist/{chunk-RDBI2RXU.js → chunk-ACZDU5GK.js} +2 -2
- package/dist/{chunk-FETNQCFO.js → chunk-AM5SUGHF.js} +2 -2
- package/dist/{chunk-NNOKTMZT.js → chunk-B2E3HZ2A.js} +2 -2
- package/dist/{chunk-CVYSU6BX.js → chunk-BH5CE4LN.js} +2 -2
- package/dist/chunk-BLKYYQ7C.js +543 -0
- package/dist/{chunk-4WKDMDEW.js → chunk-BX2U3QQV.js} +2 -2
- package/dist/{chunk-ZKX2FRS6.js → chunk-CANBLFVQ.js} +2 -2
- package/dist/{chunk-SMRBZ6EC.js → chunk-CCRZLRWJ.js} +2 -2
- package/dist/chunk-CDWSLAPN.js +21 -0
- package/dist/chunk-CIVYHK7U.js +22 -0
- package/dist/{chunk-L57ZKWVG.js → chunk-CMXW7MFV.js} +2 -2
- package/dist/{chunk-T3DGWPXM.js → chunk-CSZOQ7YO.js} +2 -2
- package/dist/{chunk-ZZXSWSN6.js → chunk-CWMHWD56.js} +2 -2
- package/dist/{chunk-6NW7MU72.js → chunk-CZEIHYMP.js} +2 -2
- package/dist/{chunk-DO6WQD2T.js → chunk-D62CTZX6.js} +2 -2
- package/dist/{chunk-XWUOUWYI.js → chunk-DFPAZXLU.js} +2 -2
- package/dist/{chunk-MOVBWNIP.js → chunk-DKJXK3HA.js} +2 -2
- package/dist/{chunk-XMQ23E27.js → chunk-DLC6JDN7.js} +2 -2
- package/dist/chunk-DUKHVPU5.js +4 -0
- package/dist/{chunk-ID63777H.js → chunk-DVYG3JTA.js} +2 -2
- package/dist/{chunk-NE6IU5ZD.js → chunk-EFFMFK7C.js} +2 -2
- package/dist/{chunk-I2T2LLK2.js → chunk-EM5UHLAM.js} +2 -2
- package/dist/chunk-EN4AHLL3.js +3 -0
- package/dist/chunk-EXMVF3JR.js +3 -0
- package/dist/{chunk-SWHMHUKF.js → chunk-FEBLLMTL.js} +2 -2
- package/dist/chunk-FIXYHQ3W.js +3 -0
- package/dist/{chunk-RKEJ6VTF.js → chunk-FLLXYUOL.js} +2 -2
- package/dist/{chunk-KWVHSKHK.js → chunk-FPDL2TUB.js} +2 -2
- package/dist/chunk-FQA3KIFX.js +17 -0
- package/dist/chunk-FWY2PRIF.js +3 -0
- package/dist/chunk-FY5V4V4F.js +2 -0
- package/dist/chunk-G2XUZCF2.js +88 -0
- package/dist/{chunk-QHRNXP3C.js → chunk-GXVDTHFC.js} +2 -2
- package/dist/{chunk-6MUIJMVL.js → chunk-H3CKAL6P.js} +2 -2
- package/dist/chunk-H5QXP63L.js +2 -0
- package/dist/{chunk-VUIYB2V3.js → chunk-HBQGKMM3.js} +2 -2
- package/dist/{chunk-PYAB5SM6.js → chunk-HBXZAGY6.js} +2 -2
- package/dist/{chunk-NNO6A2PO.js → chunk-HCMQZPEO.js} +2 -2
- package/dist/{chunk-Q65CQ4XL.js → chunk-HHBBGWES.js} +2 -2
- package/dist/{chunk-GTXSJDCO.js → chunk-HIEXRDJF.js} +2 -2
- package/dist/{chunk-4FC325IF.js → chunk-HYKSLTAR.js} +2 -2
- package/dist/{chunk-XLQ3GLWZ.js → chunk-I2KP4AGR.js} +2 -2
- package/dist/chunk-I5FCDTK2.js +2 -0
- package/dist/{chunk-QKPLA6IC.js → chunk-I645ZF75.js} +2 -2
- package/dist/{chunk-FDGD5AB5.js → chunk-IBM3F2BJ.js} +2 -2
- package/dist/{chunk-Q72QSKXC.js → chunk-IEL6Q5W3.js} +38 -38
- package/dist/{chunk-NCZUNH3E.js → chunk-IGQQUENU.js} +12 -12
- package/dist/chunk-IGYAZPRX.js +4 -0
- package/dist/chunk-IOVPAZWP.js +3 -0
- package/dist/{chunk-OL6KJP3N.js → chunk-IVJJNVSX.js} +2 -2
- package/dist/{chunk-AKB7V7TV.js → chunk-IWAMYGPN.js} +2 -2
- package/dist/chunk-IYBIBMPF.js +90 -0
- package/dist/{chunk-IOP6FWIM.js → chunk-J24VICI5.js} +2 -2
- package/dist/{chunk-C7QOQX32.js → chunk-JN5LIBT3.js} +2 -2
- package/dist/{chunk-O6QTXQPJ.js → chunk-JOALNFY3.js} +2 -2
- package/dist/{chunk-GCHRX4YW.js → chunk-JUO3Z644.js} +2 -2
- package/dist/{chunk-BJ6SQAEN.js → chunk-JXHLB7TP.js} +2 -2
- package/dist/{chunk-IJ4HMYBE.js → chunk-JYX5UZSZ.js} +2 -2
- package/dist/chunk-K2O7SBAU.js +2 -0
- package/dist/{chunk-OLF4MA5W.js → chunk-K5G7SPAG.js} +2 -2
- package/dist/{chunk-YSNONTJ2.js → chunk-KDYQQJ6X.js} +2 -2
- package/dist/{chunk-7NVGT435.js → chunk-KM4QRWI5.js} +2 -2
- package/dist/{chunk-HKQUXIFO.js → chunk-KNV5VFDV.js} +2 -2
- package/dist/chunk-L3YSDLNB.js +2 -0
- package/dist/{chunk-EZNMUY67.js → chunk-LAGDJXFY.js} +2 -2
- package/dist/{chunk-ENCCHKM6.js → chunk-LY2NB5XR.js} +4 -4
- package/dist/chunk-M4EVGA5S.js +14 -0
- package/dist/chunk-M7LAIM77.js +127 -0
- package/dist/{chunk-BVAJLC5A.js → chunk-MRGTCMDK.js} +2 -2
- package/dist/{chunk-OZYRSMSH.js → chunk-MT5W4DUG.js} +2 -2
- package/dist/{chunk-VE5AVNMP.js → chunk-MTMF4N7F.js} +2 -2
- package/dist/chunk-N3Q3AWGW.js +545 -0
- package/dist/{chunk-TXXOEMZJ.js → chunk-NDGTJHQN.js} +2 -2
- package/dist/chunk-NIO346UL.js +2 -0
- package/dist/chunk-NJA4MMBD.js +2 -0
- package/dist/{chunk-7FND7D7N.js → chunk-NK76RSB6.js} +2 -2
- package/dist/{chunk-H3LGFZVK.js → chunk-NTRW52UR.js} +2 -2
- package/dist/{chunk-JOIRNPPY.js → chunk-OJFLPVBP.js} +2 -2
- package/dist/{chunk-KMITESMT.js → chunk-OMBRP7BB.js} +2 -2
- package/dist/{chunk-UP3BUZR5.js → chunk-OVKZM2XI.js} +2 -2
- package/dist/{chunk-MVB3DAEY.js → chunk-PARCKE3Q.js} +2 -2
- package/dist/{chunk-CAUCPUOF.js → chunk-PFPHS4NO.js} +2 -2
- package/dist/chunk-PHPQ24UG.js +22 -0
- package/dist/chunk-PLZXWZHY.js +77 -0
- package/dist/{chunk-34WBMAYK.js → chunk-PNVZIJ57.js} +2 -2
- package/dist/{chunk-SYDJMPES.js → chunk-QKVTWODE.js} +2 -2
- package/dist/{chunk-FW53T7EB.js → chunk-QLTFXVUI.js} +2 -2
- package/dist/{chunk-PBI2LFKH.js → chunk-QMGWSEPL.js} +2 -2
- package/dist/{chunk-CQP3THUZ.js → chunk-QVHZB75Z.js} +2 -2
- package/dist/{chunk-6BQ3DSPK.js → chunk-QVWDQTMG.js} +2 -2
- package/dist/{chunk-ST7V3SKN.js → chunk-RCPZOPV6.js} +2 -2
- package/dist/chunk-RJWAB4VR.js +345 -0
- package/dist/chunk-RRPK327J.js +20 -0
- package/dist/chunk-RVYLJDXC.js +21 -0
- package/dist/chunk-RWKEXCHU.js +3 -0
- package/dist/{chunk-L4NRUAGJ.js → chunk-S5SKXCND.js} +2 -2
- package/dist/{chunk-RBAS5ZHI.js → chunk-S64NCE2Z.js} +2 -2
- package/dist/{chunk-WMPRTGH2.js → chunk-SF34QLK2.js} +2 -2
- package/dist/{chunk-ANFVSJWQ.js → chunk-SJZQ2PTZ.js} +2 -2
- package/dist/{chunk-4XTAUQFD.js → chunk-SRY26ITJ.js} +2 -2
- package/dist/chunk-SV2LEFVM.js +2 -0
- package/dist/{chunk-7XAN6GKB.js → chunk-T3YFIJ5P.js} +2 -2
- package/dist/chunk-T55YPJGB.js +3 -0
- package/dist/chunk-TAJ6UGCO.js +21 -0
- package/dist/{chunk-PIOMTC27.js → chunk-TUTSO7UZ.js} +2 -2
- package/dist/{chunk-FQKZWM4L.js → chunk-U24M5RQM.js} +5 -5
- package/dist/{chunk-XME3HPXZ.js → chunk-U2XX3BT4.js} +2 -2
- package/dist/{chunk-SZD2KF7Q.js → chunk-UWB5WMC2.js} +2 -2
- package/dist/{chunk-6CS3UQTN.js → chunk-VCL7FK3E.js} +2 -2
- package/dist/{chunk-N3IQCBCF.js → chunk-VCWAJPXQ.js} +2 -2
- package/dist/{chunk-LZYFLFEH.js → chunk-VG55NFXF.js} +2 -2
- package/dist/{chunk-PTAWHLVJ.js → chunk-VLTUX4IF.js} +2 -2
- package/dist/{chunk-JEJLSICM.js → chunk-VVCBMH5O.js} +2 -2
- package/dist/{chunk-JSOYNVWH.js → chunk-VYZQZ4ZN.js} +2 -2
- package/dist/chunk-W3FK73MD.js +8 -0
- package/dist/{chunk-UNBY47BC.js → chunk-W6C6QTXJ.js} +2 -2
- package/dist/chunk-WH5SYOMD.js +2 -0
- package/dist/chunk-WJOQC4P7.js +7 -0
- package/dist/chunk-WO47BIPY.js +3 -0
- package/dist/chunk-WOOTEWQT.js +239 -0
- package/dist/{chunk-UBGWN7I4.js → chunk-X5I2BQGX.js} +2 -2
- package/dist/{chunk-PX4RYAAK.js → chunk-XNUWRTYM.js} +2 -2
- package/dist/{chunk-ICFDQHAM.js → chunk-XUJM6474.js} +2 -2
- package/dist/chunk-XYLV727H.js +21 -0
- package/dist/{chunk-TRRC4ZJ7.js → chunk-YFQPWKHR.js} +2 -2
- package/dist/{chunk-NEDP5RFQ.js → chunk-YIOQJ45A.js} +2 -2
- package/dist/{chunk-Y6KHROC3.js → chunk-YXJ4IAHH.js} +2 -2
- package/dist/chunk-YYFV32WR.js +3 -0
- package/dist/{chunk-BH5F2Q4O.js → chunk-ZB3V5QM7.js} +2 -2
- package/dist/chunk-ZJZQ7Q2Q.js +3 -0
- package/dist/{chunk-EMNIHCRB.js → chunk-ZNQCR656.js} +2 -2
- package/dist/{chunk-TIIC3ZE7.js → chunk-ZOEDRCR4.js} +2 -2
- package/dist/cli-context-TSADTXLB.js +2 -0
- package/dist/cli-context-XEPPF4RX.js +3 -0
- package/dist/cli-program-KJGQEM72.js +7 -0
- package/dist/cli.js +1 -1
- package/dist/{code-DlqpBDd0.d.ts → code-CDe-mIjx.d.ts} +1 -1
- package/dist/code-viewer-YGDON6SY.js +12 -0
- package/dist/code-viewer-ZCTHXQ5C.js +11 -0
- package/dist/command-descriptors-5VAB2MZX.js +335 -0
- package/dist/command-descriptors-EAHKIRAG.js +337 -0
- package/dist/{config-types-BNoC96J3.d.ts → config-types-D6X5S68_.d.ts} +50 -0
- package/dist/{db-D7sauVFH.d.ts → db-DmRNdCtm.d.ts} +1 -1
- package/dist/direct-navigation-B3SGOOBW.js +2 -0
- package/dist/direct-navigation-ZL362KXF.js +3 -0
- package/dist/{graph-evidence-BIFqyisO.d.ts → graph-evidence-Bs54NWws.d.ts} +1 -1
- package/dist/{health-DJaZXg8I.d.ts → health-BnzbSLCE.d.ts} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/invocation-command-descriptors-CSUGUHTT.js +2 -0
- package/dist/invocation-command-descriptors-PPVZOIE5.js +3 -0
- package/dist/output-continuation-command-FTVVBVSN.js +2 -0
- package/dist/output-continuation-command-ITPRC3YV.js +3 -0
- package/dist/project-reindex-7HZSLLLY.js +3 -0
- package/dist/project-reindex-NGM3DYBN.js +2 -0
- package/dist/queries/affected.d.ts +2 -2
- package/dist/queries/affected.js +1 -1
- package/dist/queries/anchors.d.ts +2 -2
- package/dist/queries/anchors.js +1 -1
- package/dist/queries/architecture.d.ts +2 -2
- package/dist/queries/architecture.js +1 -1
- package/dist/queries/bottlenecks.d.ts +2 -2
- package/dist/queries/bottlenecks.js +1 -1
- package/dist/queries/by-kind.d.ts +2 -2
- package/dist/queries/by-kind.js +1 -1
- package/dist/queries/call-graph.d.ts +2 -2
- package/dist/queries/call-graph.js +1 -1
- package/dist/queries/change-surface.d.ts +2 -2
- package/dist/queries/change-surface.js +1 -1
- package/dist/queries/cleanup-plan.d.ts +2 -2
- package/dist/queries/cleanup-plan.js +1 -1
- package/dist/queries/co-change.d.ts +2 -2
- package/dist/queries/co-change.js +1 -1
- package/dist/queries/code.d.ts +3 -3
- package/dist/queries/code.js +1 -1
- package/dist/queries/complexity-hotspots.d.ts +2 -2
- package/dist/queries/complexity-hotspots.js +1 -1
- package/dist/queries/complexity.d.ts +2 -2
- package/dist/queries/complexity.js +1 -1
- package/dist/queries/context.d.ts +2 -2
- package/dist/queries/context.js +1 -1
- package/dist/queries/convergence.d.ts +2 -2
- package/dist/queries/convergence.js +1 -1
- package/dist/queries/coupling.d.ts +2 -2
- package/dist/queries/coupling.js +1 -1
- package/dist/queries/cycles.d.ts +2 -2
- package/dist/queries/cycles.js +1 -1
- package/dist/queries/dataflow.d.ts +2 -2
- package/dist/queries/dataflow.js +1 -1
- package/dist/queries/dead.d.ts +2 -2
- package/dist/queries/dead.js +1 -1
- package/dist/queries/decorative-checkers.d.ts +2 -2
- package/dist/queries/decorative-checkers.js +1 -1
- package/dist/queries/deep-chains.d.ts +2 -2
- package/dist/queries/deep-chains.js +1 -1
- package/dist/queries/dependence-slice.d.ts +3 -3
- package/dist/queries/dependence-slice.js +1 -1
- package/dist/queries/dependency-depth.d.ts +2 -2
- package/dist/queries/dependency-depth.js +1 -1
- package/dist/queries/deps.d.ts +2 -2
- package/dist/queries/deps.js +1 -1
- package/dist/queries/diff-impact.d.ts +2 -2
- package/dist/queries/diff-impact.js +1 -1
- package/dist/queries/doc-drift.d.ts +2 -2
- package/dist/queries/doc-drift.js +1 -1
- package/dist/queries/drift.d.ts +2 -2
- package/dist/queries/drift.js +1 -1
- package/dist/queries/duplicate-bodies.d.ts +2 -2
- package/dist/queries/duplicate-bodies.js +1 -1
- package/dist/queries/entry-map.d.ts +2 -2
- package/dist/queries/entry-map.js +1 -1
- package/dist/queries/evidence.d.ts +3 -3
- package/dist/queries/evidence.js +1 -1
- package/dist/queries/extract-candidates.d.ts +2 -2
- package/dist/queries/extract-candidates.js +1 -1
- package/dist/queries/fan.d.ts +2 -2
- package/dist/queries/fan.js +1 -1
- package/dist/queries/files.d.ts +2 -2
- package/dist/queries/files.js +1 -1
- package/dist/queries/health.d.ts +3 -3
- package/dist/queries/health.js +1 -1
- package/dist/queries/hierarchy.d.ts +2 -2
- package/dist/queries/hierarchy.js +1 -1
- package/dist/queries/hotspots.d.ts +2 -2
- package/dist/queries/hotspots.js +1 -1
- package/dist/queries/imports.d.ts +2 -2
- package/dist/queries/imports.js +1 -1
- package/dist/queries/incomplete-migration.d.ts +2 -2
- package/dist/queries/incomplete-migration.js +1 -1
- package/dist/queries/index.d.ts +5 -5
- package/dist/queries/index.js +1 -1
- package/dist/queries/isolated.d.ts +2 -2
- package/dist/queries/isolated.js +1 -1
- package/dist/queries/locality-candidates.d.ts +2 -2
- package/dist/queries/locality-candidates.js +1 -1
- package/dist/queries/members.d.ts +2 -2
- package/dist/queries/members.js +1 -1
- package/dist/queries/methods.d.ts +2 -2
- package/dist/queries/methods.js +1 -1
- package/dist/queries/not-implemented.d.ts +2 -2
- package/dist/queries/not-implemented.js +1 -1
- package/dist/queries/outline.d.ts +2 -2
- package/dist/queries/outline.js +1 -1
- package/dist/queries/passthrough-candidates.d.ts +2 -2
- package/dist/queries/passthrough-candidates.js +1 -1
- package/dist/queries/plan-context.d.ts +2 -2
- package/dist/queries/plan-context.js +1 -1
- package/dist/queries/react-component-duplicates.d.ts +2 -2
- package/dist/queries/react-component-duplicates.js +1 -1
- package/dist/queries/react-hook-candidates.d.ts +2 -2
- package/dist/queries/react-hook-candidates.js +1 -1
- package/dist/queries/react-large-component-pressure.d.ts +2 -2
- package/dist/queries/react-large-component-pressure.js +1 -1
- package/dist/queries/recent-duplicates.d.ts +2 -2
- package/dist/queries/recent-duplicates.js +1 -1
- package/dist/queries/redundant-reexports.d.ts +2 -2
- package/dist/queries/redundant-reexports.js +1 -1
- package/dist/queries/reference-neighborhood.d.ts +2 -2
- package/dist/queries/reference-neighborhood.js +1 -1
- package/dist/queries/reference-reachability.d.ts +2 -2
- package/dist/queries/reference-reachability.js +1 -1
- package/dist/queries/refs.d.ts +2 -2
- package/dist/queries/refs.js +1 -1
- package/dist/queries/self-audit.d.ts +2 -2
- package/dist/queries/self-audit.js +1 -1
- package/dist/queries/similar-chains.d.ts +2 -2
- package/dist/queries/similar-chains.js +1 -1
- package/dist/queries/similar-files.d.ts +2 -2
- package/dist/queries/similar-files.js +1 -1
- package/dist/queries/similar-signatures.d.ts +2 -2
- package/dist/queries/similar-signatures.js +1 -1
- package/dist/queries/similar.d.ts +2 -2
- package/dist/queries/similar.js +1 -1
- package/dist/queries/slice.d.ts +2 -2
- package/dist/queries/slice.js +1 -1
- package/dist/queries/source-inspection.d.ts +4 -4
- package/dist/queries/source-inspection.js +1 -1
- package/dist/queries/source-search.d.ts +2 -2
- package/dist/queries/source-search.js +1 -1
- package/dist/queries/stale-abstractions.d.ts +2 -2
- package/dist/queries/stale-abstractions.js +1 -1
- package/dist/queries/stats.d.ts +2 -2
- package/dist/queries/surface.d.ts +2 -2
- package/dist/queries/surface.js +1 -1
- package/dist/queries/symbols.d.ts +2 -2
- package/dist/queries/symbols.js +1 -1
- package/dist/queries/system-map.d.ts +2 -2
- package/dist/queries/system-map.js +1 -1
- package/dist/queries/system.d.ts +2 -2
- package/dist/queries/system.js +1 -1
- package/dist/queries/test-quality.d.ts +2 -2
- package/dist/queries/test-quality.js +1 -1
- package/dist/queries/trace.d.ts +2 -2
- package/dist/queries/trace.js +1 -1
- package/dist/queries/twin-ab.d.ts +2 -2
- package/dist/queries/twin-ab.js +1 -1
- package/dist/queries/twin-drift.d.ts +2 -2
- package/dist/queries/twin-drift.js +1 -1
- package/dist/queries/unused-imports.d.ts +2 -2
- package/dist/queries/unused-imports.js +1 -1
- package/dist/queries/unused-params.d.ts +2 -2
- package/dist/queries/unused-params.js +1 -1
- package/dist/queries/value-flow.d.ts +3 -3
- package/dist/queries/value-flow.js +1 -1
- package/dist/queries/vue-component-duplicates.d.ts +2 -2
- package/dist/queries/vue-component-duplicates.js +1 -1
- package/dist/queries/vue-composable-candidates.d.ts +2 -2
- package/dist/queries/vue-composable-candidates.js +1 -1
- package/dist/queries/vue-large-view-pressure.d.ts +2 -2
- package/dist/queries/vue-large-view-pressure.js +1 -1
- package/dist/queries/wrapper-candidates.d.ts +2 -2
- package/dist/queries/wrapper-candidates.js +1 -1
- package/dist/reindex-worker.js +1 -1
- package/dist/reindex.d.ts +3 -3
- package/dist/reindex.js +31 -31
- package/dist/runtime.d.ts +24 -4
- package/dist/runtime.js +3 -3
- package/dist/rust-semantic-session-server.js +1 -1
- package/dist/rust-semantic-session-worker.js +1 -1
- package/dist/rust-semantic-worker.js +1 -1
- package/dist/{scip-cli-B7N3haxa.d.ts → scip-cli-BRFKkHQn.d.ts} +1 -1
- package/dist/sentinel-ensure-command-KYYULCFU.js +2 -0
- package/dist/sentinel-ensure-command-RIZA3RY7.js +3 -0
- package/dist/sentinel-hook.js +39 -0
- package/dist/sentinel-worker.js +16 -0
- package/dist/typescript-mailbox-worker.js +1 -1
- package/dist/watch-server.js +6 -6
- package/docs/COMMAND_REFERENCE.md +5 -3
- package/docs/schemas/project-config.schema.json +159 -0
- package/package.json +9 -5
- package/skills/codebaseiq/SKILL.md +1 -1
- package/skills/concrete-plan/SKILL.md +1 -1
- package/ui/view/api.js +450 -0
- package/ui/view/app.js +394 -0
- package/ui/view/builder.js +323 -0
- package/ui/view/file-panel.js +170 -0
- package/ui/view/focus.js +379 -0
- package/ui/view/index.html +54 -0
- package/ui/view/map.js +424 -0
- package/ui/view/styles.css +1125 -0
- package/dist/chunk-2X7V4HS4.js +0 -88
- package/dist/chunk-3IER7Q6H.js +0 -12
- package/dist/chunk-3JSXXYTZ.js +0 -345
- package/dist/chunk-476NR5B7.js +0 -2
- package/dist/chunk-5VKBFZZU.js +0 -3
- package/dist/chunk-ADTBPVUZ.js +0 -21
- package/dist/chunk-BFFZDZQV.js +0 -2
- package/dist/chunk-BMYOV5GP.js +0 -77
- package/dist/chunk-C74PPYLA.js +0 -3
- package/dist/chunk-CWONGW6P.js +0 -3
- package/dist/chunk-DDZ7VHWV.js +0 -20
- package/dist/chunk-DR2LURYU.js +0 -3
- package/dist/chunk-ECQBG7PW.js +0 -564
- package/dist/chunk-FM5BPL4V.js +0 -60
- package/dist/chunk-G6XFR4ZL.js +0 -4
- package/dist/chunk-GTIYTDRE.js +0 -562
- package/dist/chunk-HOA5YGOH.js +0 -3
- package/dist/chunk-KUW32IRO.js +0 -2
- package/dist/chunk-LTA3BRZX.js +0 -2
- package/dist/chunk-NAUD7LCA.js +0 -2
- package/dist/chunk-OGTFJ3XD.js +0 -2
- package/dist/chunk-Q5ELPRKQ.js +0 -2
- package/dist/chunk-QCN62RTF.js +0 -3
- package/dist/chunk-QW7EP6WI.js +0 -21
- package/dist/chunk-RU65DDUP.js +0 -215
- package/dist/chunk-SELM5MER.js +0 -2
- package/dist/chunk-SNNWPCN7.js +0 -4
- package/dist/chunk-TFZB6XTM.js +0 -239
- package/dist/chunk-UXM43C7T.js +0 -3
- package/dist/chunk-VFY6Y2H6.js +0 -61
- package/dist/chunk-WE5RZHZ7.js +0 -5
- package/dist/chunk-Z54RD7VL.js +0 -3
- package/dist/cli-context-3SNLDYBM.js +0 -3
- package/dist/cli-context-T3B7W6GG.js +0 -2
- package/dist/cli-program-YNOXO72B.js +0 -7
- package/dist/command-descriptors-6AOUKWW7.js +0 -346
- package/dist/command-descriptors-ZFKJSRUP.js +0 -344
- package/dist/direct-navigation-DP4LVMRX.js +0 -3
- package/dist/direct-navigation-FLUS3BT6.js +0 -2
- package/dist/invocation-command-descriptors-QT2JMY5J.js +0 -3
- package/dist/invocation-command-descriptors-YN4QJEAX.js +0 -2
- package/dist/output-continuation-command-2V2SL4TD.js +0 -2
- package/dist/output-continuation-command-65J5IP3O.js +0 -3
- package/dist/project-reindex-5JOKXAXT.js +0 -2
- package/dist/project-reindex-UQBIKO4M.js +0 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as x}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as x}from"./chunk-4AOOSCZ7.js";import{b as g}from"./chunk-B75HZHUP.js";import{c as k}from"./chunk-NK76RSB6.js";import{a as n}from"./chunk-BGBBVSH4.js";import{k as v}from"./chunk-VCL7FK3E.js";import{a as L}from"./chunk-ZOEDRCR4.js";import{d as S}from"./chunk-AM5SUGHF.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-TUTSO7UZ.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{a as z}from"./chunk-
|
|
1
|
+
import{a as z}from"./chunk-MTMF4N7F.js";import{p as We}from"./chunk-BH5CE4LN.js";import{a as Ze}from"./chunk-ZOEDRCR4.js";import{A as oe,t as I}from"./chunk-AM5SUGHF.js";import{f as ae,o as Xe,p as D}from"./chunk-JOALNFY3.js";import{A as Ge,C as B,F as Ke,K as H,z as He}from"./chunk-RVYLJDXC.js";import{a as Ue,g as Z,w as M}from"./chunk-PLZXWZHY.js";function se(e){let t=e.replaceAll("\\","/");return Ze(t)==="test"?/(?:^|\/)__fixtures__\//iu.test(t)?"fixture":"test":/(?:^|\/)(?:fixtures?|testdata)\//iu.test(t)?"fixture":/(?:^|\/)(?:examples?|demos?|previews?)\//iu.test(t)?"example":/(?:^|\/)(?:generated|dist|build|coverage)\//iu.test(t)||/\.generated\./iu.test(t)?"generated":/^(?:scripts?|tools?)\//iu.test(t)?"script":"production"}import Mt from"better-sqlite3";var ue="codebaseiq_runtime_boundaries",j="codebaseiq_runtime_observations",ce="codebaseiq_runtime_relation_groups",de="codebaseiq_runtime_relation_participants";function Vt(e,t){let n=new Mt(Ue(e));try{n.exec(`
|
|
2
2
|
CREATE TABLE IF NOT EXISTS ${ue} (
|
|
3
3
|
singleton INTEGER PRIMARY KEY CHECK (singleton = 1),
|
|
4
4
|
schema_version INTEGER NOT NULL,
|
|
5
5
|
extractor_version TEXT NOT NULL,
|
|
6
6
|
payload TEXT NOT NULL
|
|
7
7
|
)
|
|
8
|
-
`),
|
|
8
|
+
`),jt(n),n.transaction(()=>{n.prepare(`INSERT OR REPLACE INTO ${ue} (singleton, schema_version, extractor_version, payload) VALUES (1, ?, ?, ?)`).run(t.schemaVersion,t.extractorVersion,JSON.stringify(t)),n.prepare(`DELETE FROM ${j}`).run(),n.prepare(`DELETE FROM ${de}`).run(),n.prepare(`DELETE FROM ${ce}`).run();let r=n.prepare(`INSERT INTO ${j}
|
|
9
9
|
(id, protocol, action, role, strength, source_scope, resolution, file, start_line, end_line, owner_symbol, payload)
|
|
10
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`);for(let o of t.observations)r.run(o.id,o.protocol,o.action,o.role,o.strength,o.sourceScope,o.resolution,o.source.file,o.source.startLine,o.source.endLine,o.owner.symbol,JSON.stringify(o));let i=n.prepare(`INSERT INTO ${ce} (id, protocol, join_rule, normalized_key, payload) VALUES (?, ?, ?, ?, ?)`),a=n.prepare(`INSERT INTO ${de} (group_id, observation_id, participant_role) VALUES (?, ?, ?)`);for(let o of t.relationGroups){i.run(o.id,o.protocol,o.joinRule,o.normalizedKey,JSON.stringify(o));for(let s of o.producerIds)a.run(o.id,s,"producer");for(let s of o.consumerIds)a.run(o.id,s,"consumer");for(let s of o.declarationIds)a.run(o.id,s,"declaration")}})()}finally{n.close()}}function
|
|
10
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`);for(let o of t.observations)r.run(o.id,o.protocol,o.action,o.role,o.strength,o.sourceScope,o.resolution,o.source.file,o.source.startLine,o.source.endLine,o.owner.symbol,JSON.stringify(o));let i=n.prepare(`INSERT INTO ${ce} (id, protocol, join_rule, normalized_key, payload) VALUES (?, ?, ?, ?, ?)`),a=n.prepare(`INSERT INTO ${de} (group_id, observation_id, participant_role) VALUES (?, ?, ?)`);for(let o of t.relationGroups){i.run(o.id,o.protocol,o.joinRule,o.normalizedKey,JSON.stringify(o));for(let s of o.producerIds)a.run(o.id,s,"producer");for(let s of o.consumerIds)a.run(o.id,s,"consumer");for(let s of o.declarationIds)a.run(o.id,s,"declaration")}})()}finally{n.close()}}function zt(e,t={}){if(!qt(e,j))return Ye(e)?.observations??[];let n=[],r=[];return le(n,r,"protocol",t.protocols),le(n,r,"action",t.actions),le(n,r,"source_scope",t.sourceScopes),le(n,r,"file",t.files),e.all(`SELECT payload FROM ${j}${n.length>0?` WHERE ${n.join(" AND ")}`:""} ORDER BY file, start_line, id`,...r).flatMap(a=>Ut(a.payload))}function jt(e){e.exec(`
|
|
11
11
|
CREATE TABLE IF NOT EXISTS ${j} (
|
|
12
12
|
id TEXT PRIMARY KEY,
|
|
13
13
|
protocol TEXT NOT NULL,
|
|
@@ -45,5 +45,5 @@ import{a as z}from"./chunk-VE5AVNMP.js";import{p as Ze}from"./chunk-CVYSU6BX.js"
|
|
|
45
45
|
);
|
|
46
46
|
CREATE INDEX IF NOT EXISTS idx_runtime_participants_observation
|
|
47
47
|
ON ${de}(observation_id, participant_role);
|
|
48
|
-
`)}function jt(e,t){return!!e.get("SELECT name FROM sqlite_master WHERE type = 'table' AND name = ?",t)}function le(e,t,n,r){!r||r.length===0||(e.push(`${n} IN (${r.map(()=>"?").join(", ")})`),t.push(...r))}function qt(e){try{return[JSON.parse(e)]}catch{return[]}}function We(e){if(!e.get("SELECT name FROM sqlite_master WHERE type = 'table' AND name = ?",ue))return null;let n=e.get(`SELECT schema_version, payload FROM ${ue} WHERE singleton = 1`);if(!n||n.schema_version!==2)return null;try{let r=JSON.parse(n.payload);return r.schemaVersion===2&&Array.isArray(r.observations)&&Array.isArray(r.relationGroups)&&Array.isArray(r.links)?r:null}catch{return null}}import{createHash as Tt}from"crypto";import{createHash as un}from"crypto";var pe=8;function G(e,t,n){return Pe(Ye(e,t,we(n),0,new Set))}function Fe(e,t,n){return Ce(e,t,n,0,new Set)}function Ye(e,t,n,r,i){if(r>pe)return[];let a=/^([A-Za-z_$][\w$]*)\.([A-Za-z_$][\w$]*)$/u.exec(n);return a?Je(e,t,a[1],a[2],r,i):/^[A-Za-z_$][\w$]*$/u.test(n)?Qe(e,t,n,r,i):[]}function Je(e,t,n,r,i,a){let o=[];for(let s of Ce(e,t,n,i+1,new Set(a))){let l=Xt(s.initializer);for(let u of l.namedChildren){if(u.type==="pair"){let c=u.childForFieldName("key")??u.namedChild(0);if(Zt(c)!==r)continue;let d=u.childForFieldName("value")??u.namedChild(1);d&&o.push(...Ye(e,s.definition.relativePath,we(d.text),i+1,new Set(a)));continue}if(/(?:method|function)/u.test(u.type)){if((u.childForFieldName("name")??u.namedChild(0))?.text!==r)continue;let d=Gt(e,s.definition.relativePath,r,u);o.push(...d.length>0?d:[Ut(s.definition,r,u)]);continue}if(u.type==="spread_element"){let c=u.namedChild(0);if(!c)continue;for(let d of Ce(e,s.definition.relativePath,we(c.text),i+1,new Set(a)))o.push(...Je(e,d.definition.relativePath,d.definition.leaf,r,i+1,new Set(a)))}}}return Pe(o)}function Ut(e,t,n){return{documentId:e.documentId,symbolId:-1,symbol:`source-callable:${e.relativePath}:${n.startPosition.row}:${t}`,relativePath:e.relativePath,startLine:n.startPosition.row,startChar:n.startPosition.column,endLine:n.endPosition.row,endChar:n.endPosition.column,leaf:t,parentTypeName:e.leaf,isFunctionLike:!0,isTypeLike:!1,kind:null,documentation:null,enclosingSymbol:e.symbol}}function Ce(e,t,n,r,i){return r>pe||!/^[A-Za-z_$][\w$]*$/u.test(n)?[]:Qe(e,t,n,r,i).flatMap(a=>{let o=B(e,a.relativePath)?.rootNode,s=o?Kt(o,a.leaf):null;return s?[{definition:a,initializer:s}]:[]})}function Qe(e,t,n,r,i){if(r>pe)return[];let a=`${t}\0${n}`;if(i.has(a))return[];i.add(a);let o=I(e,t).filter(u=>u.leaf===n);if(o.length>0)return o;let s=Ht(e,t,n);if(s.length>0)return s;let l=D(e,t).find(u=>u.localName===n&&u.sourcePath);if(l?.sourcePath){let u=l.kind==="namespace"||l.importedName==="default"?n:l.importedName;return Ie(e,l.sourcePath,u,r+1,new Set(i))}return Ie(e,t,n,r+1,new Set(i))}function Ht(e,t,n){let r=e.get("SELECT id FROM documents WHERE relative_path = ?",t)?.id;return r===void 0?[]:(ae(e,t)?.callables??[]).filter(i=>i.name===n).map(i=>({documentId:r,symbolId:-1,symbol:`source-callable:${t}:${i.startLine}:${n}`,relativePath:t,startLine:i.startLine,startChar:0,endLine:i.endLine,endChar:0,leaf:n,parentTypeName:null,isFunctionLike:!0,isTypeLike:!1,kind:null,documentation:null,enclosingSymbol:null}))}function Ie(e,t,n,r,i){if(r>pe)return[];let a=I(e,t).filter(o=>o.leaf===n);return a.length>0?a:Pe(Ke(e,t).flatMap(o=>o.sourcePath?o.kind==="named"&&!o.names.includes(n)?[]:Ie(e,o.sourcePath,n,r+1,new Set(i)):[]))}function Gt(e,t,n,r){return I(e,t).filter(i=>i.leaf===n&&i.startLine<=r.startPosition.row&&i.endLine>=r.endPosition.row)}function Kt(e,t){let n=null;return et(e,r=>{n||r.type!=="variable_declarator"||(r.childForFieldName("name")??r.namedChild(0))?.text.trim()!==t||(n=r.childForFieldName("value")??r.namedChild(1))}),n}function Xt(e){let t=e;for(;["as_expression","satisfies_expression","type_assertion","parenthesized_expression"].includes(t.type)&&t.namedChildren.length>0;)t=t.namedChildren[0];return t}function Zt(e){return e?.text.replace(/^['"`]|['"`]$/gu,"")??null}function we(e){return e.replace(/\s+/gu,"").replace(/^\.\.\./u,"")}function Pe(e){return[...new Map(e.map(t=>[t.symbol,t])).values()]}function et(e,t){t(e);for(let n of e.namedChildren)et(n,t)}var Wt=8;function R(e,t){return t?K(e,t,0,new Set):null}function K(e,t,n,r){if(n>Wt)return _(t,"value-evaluation-depth");let i=nt(t),a=nn(i);if(a)return rn(e.file,i,a.term,a.value,a.precision);if(i.type==="binary_expression"&&/\+/u.test(i.text)){let l=i.namedChildren.map(u=>K(e,u,n+1,new Set(r)));if(l.length>=2&&l.every(u=>u!==null)){let u={kind:"concat",parts:l.map(d=>d.term)},c=l.map(d=>d.value).join("");return an(e.file,i,u,c,l.some(d=>d.precision!=="literal")?"constrained-pattern":"literal",l)}}let o=i.text.trim();if(/^[A-Za-z_$][\w$]*$/u.test(o))return en(e,o,i,n,r);let s=on(i);return s?tn(e,s.base,s.properties,i,n,r):i.type==="call_expression"||i.type==="call"?Yt(e,i,n,r):_(i,`unsupported-expression:${i.type}`)}function Yt(e,t,n,r){let a=(t.childForFieldName("function")??t.namedChild(0))?.text.replace(/\s+/gu,"").replace(/<.*>$/u,"")??"",o=Jt(e,a);if(o.length!==1)return _(t,o.length===0?"call-target-unresolved":"call-target-ambiguous");let s=o[0],l=`${s.relativePath}\0${s.symbol}`;if(r.has(l))return _(t,"call-return-cycle");let u=B(e.db,s.relativePath)?.rootNode;if(!u)return _(t,"call-target-unparsed");let c=ln(u,s.startLine,s.endLine);if(!c)return _(t,"call-target-syntax-unavailable");let d=Qt(c);if(!d)return _(t,"call-return-not-single-expression");let m=new Set(r);m.add(l);let p=K({db:e.db,file:s.relativePath,root:u},d,n+1,m);return p?me(t,"bounded-call-return",p,s.symbol):_(t,"call-return-unresolved")}function Jt(e,t){if(/^[A-Za-z_$][\w$]*$/u.test(t)){let i=I(e.db,e.file).filter(o=>o.isFunctionLike&&o.leaf===t);if(i.length>0)return i;let a=D(e.db,e.file).find(o=>o.localName===t&&o.sourcePath&&o.kind!=="namespace");return a?.sourcePath?z(e.db,a.sourcePath,a.importedName==="default"?t:a.importedName).filter(o=>o.isFunctionLike):[]}let n=/^([A-Za-z_$][\w$]*)\.([A-Za-z_$][\w$]*)$/u.exec(t);if(!n)return[];let r=D(e.db,e.file).find(i=>i.kind==="namespace"&&i.localName===n[1]&&i.sourcePath);return r?.sourcePath?z(e.db,r.sourcePath,n[2]).filter(i=>i.isFunctionLike):[]}function Qt(e){let t=e.childForFieldName("body");if(e.type==="arrow_function"&&t&&t.type!=="statement_block")return t;let n=[];return tt(t??e,t??e,n),n.length!==1?null:n[0].childForFieldName("argument")??n[0].namedChild(0)}function tt(e,t,n){if(!(t!==e&&(/(?:function|method|lambda)/u.test(t.type)||t.type==="arrow_function"))){if(t.type==="return_statement"){n.push(t);return}for(let r of t.namedChildren)tt(e,r,n)}}function en(e,t,n,r,i){let a=`${e.file}\0${t}`;if(i.has(a))return _(n,"value-cycle");i.add(a);let o=Be(e.root,t);if(o){let f=K(e,o,r+1,i);return f?me(n,"local-constant",f):_(n,"non-foldable-local")}let s=D(e.db,e.file).find(f=>f.localName===t&&f.sourcePath);if(!s?.sourcePath)return E(n,t,"unresolved-identifier");if(s.kind==="namespace")return E(n,t,"namespace-import-requires-property");let l=s.importedName==="default"?t:s.importedName,u=z(e.db,s.sourcePath,l);if(u.length!==1)return E(n,t,u.length===0?"import-definition-missing":"import-definition-ambiguous");let c=u[0],d=B(e.db,c.relativePath)?.rootNode;if(!d)return E(n,c.symbol,"import-definition-unparsed");let m=Be(d,c.leaf);if(!m)return E(n,c.symbol,"import-definition-non-value");let p=K({db:e.db,file:c.relativePath,root:d},m,r+1,i);return p?me(n,"imported-constant",p,c.symbol):E(n,c.symbol,"import-value-unresolved")}function tn(e,t,n,r,i,a){let o=D(e.db,e.file).find(p=>p.localName===t&&p.sourcePath),s=e.file,l=t,u;if(o?.sourcePath){o.kind==="namespace"?(l=n[0]??"",n=n.slice(1)):l=o.importedName==="default"?t:o.importedName;let p=z(e.db,o.sourcePath,l);if(p.length!==1)return E(r,`${t}.${n.join(".")}`,p.length===0?"member-definition-missing":"member-definition-ambiguous");s=p[0].relativePath,l=p[0].leaf,u=p[0].symbol}let c=s===e.file?e.root:B(e.db,s)?.rootNode;if(!c)return E(r,u??t,"member-definition-unparsed");let d=Be(c,l);if(!d)return E(r,u??t,"member-base-non-value");for(let p of n){let f=nt(d);if(d=sn(f,p),!d)return E(r,u??`${t}.${n.join(".")}`,`member-property-missing:${p}`)}let m=K({db:e.db,file:s,root:c},d,i+1,a);return m?me(r,"member-constant",m,u):E(r,u??t,"member-value-unresolved")}function nn(e){let t=e.text.trim(),n=t[0];if(n!=="'"&&n!=='"'&&n!=="`"||t.at(-1)!==n)return null;let r=t.slice(1,-1);if(n!=="`"||!r.includes("${"))return{term:{kind:"literal",value:r},value:r,precision:"literal"};let i=[],a=0,o=/\$\{([^}]*)\}/gu;for(let s of r.matchAll(o)){let l=s.index??0;l>a&&i.push({kind:"literal",value:r.slice(a,l)}),i.push({kind:"unknown",reason:`template-hole:${s[1]?.trim()||"expression"}`}),a=l+s[0].length}return a<r.length&&i.push({kind:"literal",value:r.slice(a)}),{term:{kind:"pattern",language:"template",value:r.replace(o,"{}")},value:r.replace(o,"{}"),precision:"constrained-pattern"}}function rn(e,t,n,r,i){return{value:r,evidence:"literal",term:n,precision:i,derivation:fe("direct-literal","direct",e,t)}}function an(e,t,n,r,i,a){return{value:r,evidence:"constant",term:n,precision:i,derivation:{...fe("constant-concatenation","mechanically-derived",e,t),inputFactIds:a.flatMap(o=>o.derivation.inputFactIds),sourceSpans:a.flatMap(o=>o.derivation.sourceSpans)}}}function me(e,t,n,r){return n.evidence==="expression"?{...n,derivation:{kind:"heuristic",rule:t,ruleVersion:"1",inputFactIds:[...n.derivation.inputFactIds,...r?[r]:[]],sourceSpans:n.derivation.sourceSpans}}:{...n,evidence:"constant",derivation:{kind:"mechanically-derived",rule:t,ruleVersion:"1",inputFactIds:[...n.derivation.inputFactIds,...r?[r]:[]],sourceSpans:n.derivation.sourceSpans}}}function E(e,t,n){return{value:e.text.trim(),evidence:"expression",term:{kind:"symbol",symbol:t},precision:"symbolic",derivation:fe(n,"heuristic","",e)}}function _(e,t){return{value:e.text.trim(),evidence:"expression",term:{kind:"unknown",reason:t},precision:"unknown",derivation:fe(t,"heuristic","",e)}}function fe(e,t,n,r){return{kind:t,rule:e,ruleVersion:"1",inputFactIds:[],sourceSpans:n?[{file:n,startLine:r.startPosition.row,endLine:r.endPosition.row}]:[]}}function on(e){let t=e.text.replace(/\s+/gu,"");if(!/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)+$/u.test(t))return null;let[n,...r]=t.split(".");return n?{base:n,properties:r}:null}function Be(e,t){let n=null;return $e(e,r=>{if(n||r.type!=="variable_declarator"||(r.childForFieldName("name")??r.namedChild(0))?.text.trim()!==t)return;let a=r.parent;!a||a.type!=="lexical_declaration"||!/^\s*(?:export\s+)?const\b/u.test(a.text)||(n=r.childForFieldName("value")??r.namedChild(1))}),n}function sn(e,t){for(let n of e.namedChildren)if(!(n.type!=="pair"||(n.childForFieldName("key")??n.namedChild(0))?.text.replace(/^['"`]|['"`]$/gu,"")!==t))return n.childForFieldName("value")??n.namedChild(1);return null}function nt(e){let t=e;for(;["as_expression","satisfies_expression","type_assertion","parenthesized_expression"].includes(t.type)&&t.namedChildren.length>0;)t=t.namedChildren[0];return t}function ln(e,t,n){let r=null;return $e(e,i=>{!/(?:function|method|lambda)/u.test(i.type)&&i.type!=="arrow_function"||i.startPosition.row>t||i.endPosition.row<n||(!r||i.endIndex-i.startIndex<r.endIndex-r.startIndex)&&(r=i)}),r}function $e(e,t){t(e);for(let n of e.namedChildren)$e(n,t)}var ot=new Set(["delete","get","head","options","patch","post","put"]),cn=/(?:^|\.)(?:app|router|server)$/u,dn=new Set(["findFirst","findMany","findUnique","from","get","select"]),pn=new Set(["create","delete","insert","remove","update","upsert"]),mn=new Set(["execute","query","raw"]),ke=[gn(),hn(),fn(),vn(),xn(),Sn(),Cn()],Re=new Set(["exec","execFile","execFileSync","execSync","fork","spawn","spawnSync"]);function fn(){return{id:"builtin.node-child-process",supports:e=>/(?:from\s*|require\s*\(\s*)['"](?:node:)?child_process['"]/u.test(e)&&/\b(?:exec|execFile|execFileSync|execSync|fork|spawn|spawnSync)\s*\(/u.test(e),extract:e=>{let t=yn(e.source),n=[];return k(e.root,r=>{if(r.type!=="call_expression")return;let i=J(r);if(!i)return;let a=t.direct.get(i),o=/^(.*?)\.([A-Za-z_$][\w$]*)$/u.exec(i),s=o&&t.namespaces.has(o[1])?o[2]:null,l=a??s;if(!l||!Re.has(l))return;let u=q(r),c=$(u[0],e)??{value:u[0]?.text.trim()||"<missing>",evidence:"expression"},d=["exec","execFile","execFileSync","execSync"].includes(l)?"process.exec":"process.spawn";n.push(S(e,r,"builtin.node-child-process",d,[{name:"operation",value:l,evidence:"literal"},{name:"executable",...c}],"exact","node-child-process-import"))}),n}}}function yn(e){let t=new Map,n=new Set,r=String.raw`['"](?:node:)?child_process['"]`,i=new RegExp(String.raw`\bimport\s*\{([^}]*)\}\s*from\s*${r}`,"gu");for(let l of e.matchAll(i))for(let u of(l[1]??"").split(",")){let c=/^\s*([A-Za-z_$][\w$]*)(?:\s+as\s+([A-Za-z_$][\w$]*))?\s*$/u.exec(u);c&&Re.has(c[1])&&t.set(c[2]??c[1],c[1])}let a=new RegExp(String.raw`\b(?:const|let)\s*\{([^}]*)\}\s*=\s*require\s*\(\s*${r}\s*\)`,"gu");for(let l of e.matchAll(a))for(let u of(l[1]??"").split(",")){let c=/^\s*([A-Za-z_$][\w$]*)(?:\s*:\s*([A-Za-z_$][\w$]*))?\s*$/u.exec(u);c&&Re.has(c[1])&&t.set(c[2]??c[1],c[1])}let o=new RegExp(String.raw`\bimport\s*\*\s*as\s*([A-Za-z_$][\w$]*)\s*from\s*${r}`,"gu");for(let l of e.matchAll(o))n.add(l[1]);let s=new RegExp(String.raw`\b(?:const|let)\s+([A-Za-z_$][\w$]*)\s*=\s*require\s*\(\s*${r}\s*\)`,"gu");for(let l of e.matchAll(s))n.add(l[1]);return{direct:t,namespaces:n}}function N(e,t){let n=B(e,t)?.rootNode;if(!n)return null;let r=M(e,t),i=I(e,t),a=ae(e,t)?.callables??[];return{db:e,file:t,source:r,root:n,constants:$n(n),ownerAt:o=>{let s=i.filter(u=>u.startLine<=o&&u.endLine>=o).sort((u,c)=>u.endLine-u.startLine-(c.endLine-c.startLine)||u.startLine-c.startLine)[0];if(s)return{file:t,symbol:s.symbol,name:s.leaf,startLine:s.startLine,endLine:s.endLine};let l=a.filter(u=>u.startLine<=o&&u.endLine>=o).sort((u,c)=>u.endLine-u.startLine-(c.endLine-c.startLine)||u.startLine-c.startLine)[0];return{file:t,symbol:null,name:l?.name??null,startLine:l?.startLine??o,endLine:l?.endLine??o}}}}function hn(){return{id:"builtin.effect-httpapi",supports:e=>W(e,"HttpApiEndpoint").size>0||W(e,"HttpApiBuilder").size>0,extract:e=>{let t=[],n=W(e.source,"HttpApiEndpoint"),r=W(e.source,"HttpApiGroup"),i=W(e.source,"HttpApiBuilder");return k(e.root,a=>{if(a.type!=="call_expression")return;let o=st(a);if(!o)return;let s=q(a);if(n.has(o.receiver)&&ot.has(o.member)){let y=$(s[0],e),h=$(s[1],e),C=it(a,r,"make",0,e);if(!y||!h||!C)return;let P=o.member.toUpperCase();t.push(S(e,a,"builtin.effect-httpapi","http.handle",[{name:"method",value:P,evidence:"literal"},{name:"path",...h}],T([{name:"path",...h}]),"effect-httpapi-endpoint-declaration")),t.push(S(e,a,"builtin.effect-httpapi","framework.declare",Ee(C,y),T(Ee(C,y)),"effect-httpapi-operation-declaration"));return}if(!["handle","handleRaw"].includes(o.member))return;let l=it(a,i,"group",1,e),u=$(s[0],e),c=s[1];if(!l||!u||!c)return;let d=Ee(l,u),m=G(e.db,e.file,c.text),p=S(e,a,"builtin.effect-httpapi","framework.handle",d,m.length===1?T(d):"candidate","effect-httpapi-handler-registration"),f=m[0];m.length===1&&f&&(p.owner={file:f.relativePath,symbol:f.symbol,name:f.leaf,startLine:f.startLine,endLine:f.endLine}),t.push(p)}),t}}}function Ee(e,t){return[{name:"adapter",value:"effect-httpapi",evidence:"literal"},{name:"group",...e},{name:"operation",...t}]}function W(e,t){let n=new Set,r=/\bimport\s*\{([\s\S]*?)\}\s*from\s*['"]([^'"]+)['"]/gu;for(let a of e.matchAll(r)){let o=a[2]??"";if(rt(o))for(let s of(a[1]??"").split(",")){let l=s.trim().replace(/^type\s+/u,""),u=/^([A-Za-z_$][\w$]*)(?:\s+as\s+([A-Za-z_$][\w$]*))?$/u.exec(l);u?.[1]===t&&n.add(u[2]??u[1])}}let i=/\bimport\s*\*\s*as\s*([A-Za-z_$][\w$]*)\s*from\s*['"]([^'"]+)['"]/gu;for(let a of e.matchAll(i)){let o=a[2]??"";o.endsWith(`/${t}`)&&rt(o)&&n.add(a[1])}return n}function rt(e){return e==="effect/unstable/httpapi"||e==="@effect/platform"||e.startsWith("@effect/platform/HttpApi")}function it(e,t,n,r,i){let a=e.parent;for(;a;){if(a.type==="call_expression"){let o=at(a,t,n,r,i);if(o)return o;let s=a.childForFieldName("function")??a.namedChild(0),l=null;if(s&&k(s,u=>{!l&&u.type==="call_expression"&&(l=at(u,t,n,r,i))}),l)return l}a=a.parent}return null}function at(e,t,n,r,i){let a=st(e);return!a||a.member!==n||!t.has(a.receiver)?null:$(q(e)[r],i)}function st(e){let t=e.childForFieldName("function")??e.namedChild(0);if(!t||!["member_expression","subscript_expression"].includes(t.type))return null;let n=t.childForFieldName("object")??t.namedChild(0),r=t.childForFieldName("property")??t.childForFieldName("index")??t.namedChild(1);return!n||!r?null:{receiver:n.text.replace(/\s+/gu,""),member:r.text.replace(/^['"`]|['"`]$/gu,"")}}function gn(){return{id:"builtin.http",supports:e=>/\bfetch\s*\(|\baxios\b|\b(?:app|router|server)\s*\.\s*(?:get|post|put|patch|delete|options|head)\s*\(/u.test(e)||Y(e,["axios"])||/\b(?:FastAPI|Flask|APIRouter|axum|Router::new)\b/u.test(e),extract:e=>{let t=[];return k(e.root,n=>{if(n.type==="decorator"){let m=/^@[^\s(]+\.(get|post|put|patch|delete|options|head)\s*\(\s*(['"`])([^'"`]+)\2/iu.exec(n.text.trim());if(!m||!Y(e.source,["fastapi","flask"]))return;t.push(S(e,n,"builtin.http","http.handle",[{name:"method",value:m[1].toUpperCase(),evidence:"literal"},{name:"path",value:m[3],evidence:"literal"}],"exact","framework-decorator"));return}if(n.type!=="call_expression")return;let r=J(n);if(!r)return;let i=r.split(".").at(-1)?.toLowerCase()??"",a=r.includes(".")?r.slice(0,r.lastIndexOf(".")):"",o=q(n);if(i==="route"&&Y(e.source,["axum"])){let m=$(o[0],e),p=/^\s*(get|post|put|patch|delete|options|head)\s*\(/iu.exec(o[1]?.text??"")?.[1];if(!m||!p)return;t.push(S(e,n,"builtin.http","http.handle",[{name:"method",value:p.toUpperCase(),evidence:"literal"},{name:"path",...m}],T([{name:"path",...m}]),"framework-adapter"));return}if(r==="fetch"||r.endsWith(".fetch")){let m=$(o[0],e);if(!m)return;let f=/\bmethod\s*:\s*['"`]([A-Za-z]+)['"`]/u.exec(o[1]?.text??"")?.[1]?.toUpperCase()??(o[1]?null:"GET"),y=[...f?[{name:"method",value:f,evidence:"literal"}]:[],{name:"path",...m}];t.push(S(e,n,"builtin.http","http.request",y,f?T(y):"candidate","call-expression"));return}if(!ot.has(i))return;let s=$(o[0],e);if(!s)return;let l=i.toUpperCase();if(cn.test(a)&&Y(e.source,["express","fastify","hono","koa-router","@koa/router"])){t.push(S(e,n,"builtin.http","http.handle",[{name:"method",value:l,evidence:"literal"},{name:"path",...s}],T([{name:"path",...s}]),"framework-adapter"));return}let c=Fn(e.source,["axios"]),d=a.split(".")[0]??"";c.has(d)&&t.push(S(e,n,"builtin.http","http.request",[{name:"method",value:l,evidence:"literal"},{name:"path",...s}],T([{name:"path",...s}]),"client-adapter"))}),t}}}function vn(){return{id:"builtin.capability-registry",supports:e=>/\b(?:execute|handler|invoke|run)\s*(?:[:(])/u.test(e)||/['"`][^'"`\n]{0,256}\b[A-Za-z_$][\w$-]*\s*\(/u.test(e),extract:e=>{let t=[],n=new Set;return k(e.root,r=>{if(r.type==="pair"){let a=r.childForFieldName("key")??r.namedChild(0),o=r.childForFieldName("value")??r.namedChild(1),s=a?.text.replace(/^['"`]|['"`]$/gu,"");if(s!=="name"&&s!=="id")return;let l=lt(o,e),u=Rn(r);if(!l||l.evidence!=="literal"||!u)return;let c=`handle\0${l.value}\0${u.startPosition.row}`;if(n.has(c))return;n.add(c),t.push(S(e,u,"builtin.capability-registry","registry.handle",[{name:"key",...l}],"exact","capability-descriptor"));return}if(!["string","string_literal","template_string"].includes(r.type))return;let i=r.text.replace(/^['"`]|['"`]$/gu,"");for(let a of i.matchAll(/\b([A-Za-z_$][\w$-]*)\s*\(/gu)){let o=a[1];if(!bn(i,o,a.index))continue;let s=`reference\0${o}\0${r.startPosition.row}`;n.has(s)||(n.add(s),t.push(S(e,r,"builtin.capability-registry","registry.reference",[{name:"key",value:o,evidence:"literal"}],"exact","capability-instruction-reference")))}}),t}}}function bn(e,t,n){if(t.includes("_")||t.includes("-"))return!0;let r=e.slice(Math.max(0,n-64),n);return/\b(?:use|call|invoke|run|via|with|read|stop)(?:\s+the)?(?:\s+(?:tool|capability|command))?\s*$/iu.test(r)}function xn(){return{id:"builtin.registry",supports:e=>/(?:Handlers?|Registry|Routes?)\b/iu.test(e),extract:e=>{let t=[];return k(e.root,n=>{if(n.type==="pair"){let a=En(n);if(!a)return;let o=n.childForFieldName("key")??n.namedChild(0),s=n.childForFieldName("value")??n.namedChild(1),l=lt(o,e);if(!l||!s||!ut(s))return;let u=Le(s)?"exact":"candidate";t.push(S(e,n,"builtin.registry","registry.handle",[{name:"registry",value:a,evidence:"identifier"},{name:"key",...l}],T([{name:"key",...l}],u),"object-member"));return}if(n.type!=="call_expression")return;let r=n.childForFieldName("function")??n.namedChild(0);if(!r)return;let i=/^([A-Za-z_$][\w$]*)\s*\[\s*(['"`])([^'"`]+)\2\s*\]$/u.exec(r.text.trim());i&&t.push(S(e,n,"builtin.registry","registry.dispatch",[{name:"registry",value:i[1],evidence:"identifier"},{name:"key",value:i[3],evidence:"literal"}],"exact","indexed-access-call"))}),t}}}function Sn(){return{id:"builtin.persistence",supports:e=>/\b(?:db|database|prisma|drizzle|[A-Za-z_$][\w$]*(?:Repository|Repo))\b[^;]{0,1024}?\.\s*(?:findFirst|findMany|findUnique|from|get|select|create|delete|insert|remove|update|upsert|execute|query|raw|transaction)(?:\s*<[^()]{1,512}>)?\s*\(/iu.test(e),extract:e=>{let t=[],n=Ln(e.root);return k(e.root,r=>{if(r.type!=="call_expression")return;let i=J(r);if(!i)return;let a=i.split("."),o=a.at(-1)??"",s=q(r),l=s[0]?.text??"",u=kn(o,l);if(!u)return;let c=ct(a,n);if(!c)return;let d=Nn(s[0],e)??_n(l),m=Tn(c,a,o,d);if(!m)return;let p=o==="insert"?"persistence-insert":u==="database.read"&&/\bFOR\s+UPDATE\s+SKIP\s+LOCKED\b/iu.test(l)?"persistence-skip-locked-claim":"persistence-adapter";t.push(S(e,r,"builtin.persistence",u,[{name:"resource",...m}],T([{name:"resource",...m}]),p))}),t}}}function Nn(e,t){if(!e)return null;let n=e.text.replace(/\s+/gu,"");return/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*$/u.test(n)?{value:n.split(".").at(-1),evidence:"identifier",term:{kind:"symbol",symbol:n}}:$(e,t)}function Cn(){return{id:"builtin.queue",supports:e=>Y(e,["amqplib","bullmq","kafkajs","@aws-sdk/client-sqs","rabbitmq"])&&/\.(?:sendToQueue|consume|send|subscribe)\s*\(/u.test(e),extract:e=>{let t=[];return k(e.root,n=>{if(n.type!=="call_expression")return;let r=J(n);if(!r)return;let i=r.split(".").at(-1)??"",a=q(n),o=i==="sendToQueue"||i==="send"?"queue.send":i==="consume"||i==="subscribe"?"queue.consume":null;if(!o)return;let s=i==="send"||i==="subscribe"?Pn(a[0],"topic",e):$(a[0],e);s&&t.push(S(e,n,"builtin.queue",o,[{name:"address",...s}],T([{name:"address",...s}]),"framework-adapter"))}),t}}}function S(e,t,n,r,i,a,o){let s=e.ownerAt(t.startPosition.row),l=JSON.stringify({extractor:n,action:r,file:e.file,line:t.startPosition.row,keyParts:i});return{id:`boundary:${un("sha256").update(l).digest("hex").slice(0,16)}`,extractor:n,action:r,owner:s,source:{file:e.file,startLine:t.startPosition.row,endLine:t.endPosition.row},keyParts:i,evidence:o,strength:a,protocol:r.split(".")[0]??r,role:In(r),executionDomain:wn(e.file),derivation:{kind:a==="candidate"?"heuristic":a==="derived"?"mechanically-derived":"direct",rule:o,ruleVersion:"1",inputFactIds:i.flatMap(u=>u.derivation?.inputFactIds??[]),sourceSpans:[{file:e.file,startLine:t.startPosition.row,endLine:t.endPosition.row},...i.flatMap(u=>u.derivation?.sourceSpans??[])]},valuePrecision:i.some(u=>u.evidence==="expression")?"unknown":i.some(u=>u.evidence==="identifier")?"symbolic":"literal",modality:"may",resolution:"unresolved",sourceScope:se(e.file)}}function In(e){let t=e.split(".").at(-1)??e;return["handle","subscribe","consume","read"].includes(t)?"consumer":["request","publish","send","write","dispatch","reference","invoke","spawn","exec"].includes(t)?"producer":"observe"}function wn(e){let t=e.replaceAll("\\","/"),n=/^(apps|services|packages)\/([^/]+)/u.exec(t);return n?`${n[1]}/${n[2]}`:null}function Y(e,t){return t.some(n=>{let r=n.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&");return new RegExp(`(?:\\bfrom\\s+${r}\\b|\\buse\\s+${r}\\b|(?:\\bfrom\\s*|\\brequire\\s*\\(\\s*)['"]${r}(?:[/']|"))`,"u").test(e)})}function Fn(e,t){let n=new Set;for(let r of t){let i=r.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&"),a=new RegExp(`(?:import\\s+([A-Za-z_$][\\w$]*)[^;]*?\\sfrom\\s*|(?:const|let)\\s+([A-Za-z_$][\\w$]*)\\s*=\\s*require\\s*\\(\\s*)['"]${i}(?:[/']|")`,"gu");for(let o of e.matchAll(a)){let s=o[1]??o[2];s&&n.add(s)}}return n}function ye(e,t,n,r,i,a,o){return S(e,t,n,r,i,a,o)}function J(e){return(e.childForFieldName("function")??e.namedChild(0))?.text.replace(/\s+/gu,"")??null}function q(e){return(e.childForFieldName("arguments")??e.namedChildren.find(n=>n.type==="arguments"))?.namedChildren??[]}function $(e,t){let n=R(t,e);return n?{value:n.value,evidence:n.evidence,term:n.term,derivation:n.derivation}:null}function Pn(e,t,n){if(!e)return null;let r=e.namedChildren.find(a=>a.type!=="pair"?!1:(a.childForFieldName("key")??a.namedChild(0))?.text.replace(/^['"`]|['"`]$/gu,"")===t),i=r?.childForFieldName("value")??r?.namedChild(1);return $(i,n)}function lt(e,t){if(!e)return null;let n=$(e,t);if(n?.evidence==="literal"||n?.evidence==="constant")return n;let r=e.text.trim();return/^[A-Za-z_$][\w$]*$/u.test(r)?{value:r,evidence:"identifier",term:{kind:"symbol",symbol:r}}:n}function T(e,t="exact"){return t==="candidate"||e.some(n=>n.evidence==="expression")?"candidate":t==="derived"||e.some(n=>n.evidence==="constant")?"derived":"exact"}function Bn(e){let t=e.text.trim(),n=t[0];if(n!=="'"&&n!=='"'&&n!=="`"||t.at(-1)!==n)return null;let r=t.slice(1,-1);return n==="`"&&r.includes("${")?null:r}function $n(e){let t=new Map;return k(e,n=>{if(n.type!=="variable_declarator")return;let r=n.childForFieldName("name")??n.namedChild(0),i=n.childForFieldName("value")??n.namedChild(1);if(!r||!i||!/^[A-Za-z_$][\w$]*$/u.test(r.text))return;let a=Bn(i);a!==null&&t.set(r.text,a)}),t}function En(e){let t=e.parent,n=t?.parent??null;for(;n&&["as_expression","satisfies_expression","type_assertion","parenthesized_expression"].includes(n.type);)n=n.parent;if(!t||!n||n.type!=="variable_declarator")return null;let i=(n.childForFieldName("name")??n.namedChild(0))?.text??"";return/(?:handlers?|registry|routes?)$/iu.test(i)?i:null}function Le(e){return/(?:function|lambda|method)/u.test(e.type)||e.type==="arrow_function"}function ut(e){return Le(e)||e.type==="member_expression"?!0:e.type==="identifier"&&/(?:command|controller|dispatch|handle|handler)/iu.test(e.text)}function Rn(e){let t=e.parent;for(;t&&t.type!=="variable_declarator";){if(["object","object_literal","dictionary"].includes(t.type))for(let n of t.namedChildren){if(n.type==="pair"){let i=n.childForFieldName("key")??n.namedChild(0),a=n.childForFieldName("value")??n.namedChild(1),o=i?.text.replace(/^['"`]|['"`]$/gu,"");if(o&&["execute","handler","invoke","run"].includes(o)&&a&&ut(a))return t}let r=n.childForFieldName("name")??n.namedChild(0);if(r&&["execute","handler","invoke","run"].includes(r.text.replace(/^['"`]|['"`]$/gu,""))&&/(?:function|method)/u.test(n.type))return t}t=t.parent}return null}function ct(e,t=new Set){let n=e.slice(0,-1).map(r=>r.replace(/\([^)]*\)/gu,""));return n.some(r=>/^(?:prisma|drizzle)$/iu.test(r))?"orm":n.some(r=>/(?:Repository|Repo)$/u.test(r))?"repository":n.some(r=>/^(?:db|database)$/iu.test(r)||t.has(r))?"database":null}function kn(e,t){if(dn.has(e))return"database.read";if(pn.has(e))return"database.write";if(!mn.has(e))return null;let n=/\b(SELECT|INSERT|UPDATE|DELETE)\b/iu.exec(t)?.[1]?.toUpperCase();return n==="SELECT"?"database.read":n?"database.write":null}function Ln(e){let t=new Set;return k(e,n=>{if(n.type!=="call_expression")return;let r=J(n);if(!r)return;let i=r.split(".");if(!(i.at(-1)!=="transaction"||!ct(i)))for(let a of q(n)){if(!Le(a))continue;let s=(a.childForFieldName("parameters")??a.namedChildren.find(u=>/parameters/u.test(u.type)))?.namedChildren[0],l=s?dt(s):null;l&&t.add(l)}}),t}function dt(e){if(e.type==="identifier")return e.text;let t=e.childForFieldName("name")??e.childForFieldName("pattern");return t?dt(t):e.namedChildren.find(n=>n.type==="identifier")?.text??null}function _n(e){let t=pt(e);return t?{value:t,evidence:"identifier",term:{kind:"symbol",symbol:t}}:null}function Tn(e,t,n,r){if(e==="orm"&&t.length>=3)return{value:t.at(-2).replace(/\([^)]*\)/gu,""),evidence:"identifier"};if(e==="repository"){let a=t.at(-2)?.replace(/(?:Repository|Repo)$/u,"");return a?{value:a,evidence:"identifier"}:null}if(!r)return null;if(n==="from"||n==="insert")return r;let i=pt(r.value);return i?{value:i,evidence:r.evidence}:null}function pt(e){return/\b(?:from|into|update|table)\s+(?:\$\{\s*)?['"`]?([A-Za-z_$][\w$.-]*)/iu.exec(e)?.[1]??null}function k(e,t){t(e);for(let n of e.namedChildren)k(n,t)}var On=Z("resolved-call-syntax",{clearGroups:[]}),An=Z("resolved-call-sites",{clearGroups:[]});function Q(e,t){return An.get(e,t.symbolId,()=>Dn(e,t))}function Dn(e,t){let n=[],r=[],i=new Set,a=new Set;for(let o of Ze(e,t,{semantic:!1})){i.add(o.file);let s=On.get(e,o.file,()=>Mn(e,o.file));if(!s){r.push({callee:t,file:o.file,line:o.line,reason:"ast-unavailable",candidates:0,referenceProvenance:o.provenance});continue}let l=(s.byLeaf.get(t.leaf)??[]).filter(({callNode:d})=>d.startPosition.row<=o.line&&d.endPosition.row>=o.line);if(l.length!==1){r.push({callee:t,file:o.file,line:o.line,reason:l.length===0?"call-not-found":"ambiguous-call",candidates:l.length,referenceProvenance:o.provenance});continue}let u=l[0],c=`${o.file}\0${u.callNode.startIndex}\0${u.callNode.endIndex}`;a.has(c)||(a.add(c),n.push({callee:t,caller:oe(I(e,o.file),u.callNode.startPosition.row),file:o.file,line:o.line,startLine:u.callNode.startPosition.row,endLine:u.callNode.endPosition.row,targetText:u.targetNode.text,callNode:u.callNode,targetNode:u.targetNode,arguments:u.arguments,referenceProvenance:o.provenance}))}return{sites:n,unresolved:r,filesVisited:i.size}}function Mn(e,t){let n=B(e,t)?.rootNode;if(!n)return null;let r=new Map;return mt(n,i=>{if(i.type!=="call_expression"&&i.type!=="call")return;let a=i.childForFieldName("function")??i.namedChild(0);if(!a)return;let o=Ge(a);if(!o)return;let s=i.childForFieldName("arguments")??i.namedChildren.find(c=>c.type==="arguments"),l={callNode:i,targetNode:a,arguments:s?.namedChildren??[]},u=r.get(o);u?u.push(l):r.set(o,[l])}),{byLeaf:r}}function mt(e,t){t(e);for(let n of e.namedChildren)mt(n,t)}var Vn=Z("call-parameter-value-flow",{clearGroups:[]});function ee(e,t){let n=`${t.callee.symbolId}\0${t.file}\0${t.callNode.startIndex}\0${t.callNode.endIndex}`;return Vn.get(e,n,()=>zn(e,t))}function te(e,t){let n=new Set(t);return[...new Set(e.transfers.flatMap(r=>n.has(r.calleePosition)?[r.callerPosition]:[]))].sort((r,i)=>r-i)}function zn(e,t){let n={file:t.file,startLine:t.startLine,endLine:t.endLine};if(!t.caller)return{callee:t.callee,caller:null,call:n,transfers:[],unknown:t.arguments.map((l,u)=>({calleePosition:u,argumentText:l.text.trim(),reason:"caller-unavailable",proof:n}))};let r=B(e,t.caller.relativePath)?.rootNode,i=r?jn(r,t.caller.startLine,t.caller.endLine):null;if(!i)return{callee:t.callee,caller:t.caller,call:n,transfers:[],unknown:t.arguments.map((l,u)=>({calleePosition:u,argumentText:l.text.trim(),reason:"caller-syntax-unavailable",proof:n}))};let a=qn(i),o=[],s=[];return t.arguments.forEach((l,u)=>{let c=l.text.trim(),d=a.indexOf(c);d>=0?o.push({calleePosition:u,callerPosition:d,argumentText:c,proof:n}):s.push({calleePosition:u,argumentText:c,reason:"argument-not-direct-parameter",proof:n})}),{callee:t.callee,caller:t.caller,call:n,transfers:o,unknown:s}}function jn(e,t,n){let r=null;return yt(e,i=>{!/(?:function|method|lambda)/u.test(i.type)&&i.type!=="arrow_function"||i.startPosition.row>t||i.endPosition.row<n||(!r||i.endIndex-i.startIndex<r.endIndex-r.startIndex)&&(r=i)}),r}function qn(e){return(e.childForFieldName("parameters")??e.namedChildren.find(n=>/parameters/u.test(n.type)))?.namedChildren.map(ft)??[]}function ft(e){if(e.type==="identifier")return e.text;let t=e.childForFieldName("name")??e.childForFieldName("pattern");return t?ft(t):e.namedChildren.find(n=>n.type==="identifier")?.text??null}function yt(e,t){t(e);for(let n of e.namedChildren)yt(n,t)}var Un=8,Hn=8;function gt(e,t){let n=[],r=Gn(e,n),i=r.summaries,a=Kn(e,t,i,n),o=Xn(e,t,n);return{observations:ar([...a.observations,...o]),bodySummaries:i.size,discriminatorSummaries:a.summaries,filesInspected:r.filesInspected,errors:n}}function Gn(e,t){let n=new Map,r=[],i=H(e);for(let a of i){let o=M(e,a);if(!/\bJSON\.stringify\s*\(/u.test(o)||!/\bbody\s*:/u.test(o))continue;let s=N(e,a);if(s)for(let[l,u]of Zn(s)){let c={definition:l,parameterIndexes:u,depth:0,proofSpans:[{file:a,startLine:l.startLine,endLine:l.endLine}]};n.set(l.symbol,c),r.push(c)}}for(;r.length>0;){let a=r.shift();if(!(a.depth>=Un))try{for(let o of Q(e,a.definition).sites){if(!N(e,o.file))continue;let l=o.caller;if(!l)continue;let u=te(ee(e,o),a.parameterIndexes);if(u.length===0)continue;let c={definition:l,parameterIndexes:It(u),depth:a.depth+1,proofSpans:[...a.proofSpans,{file:o.file,startLine:o.startLine,endLine:o.endLine}]};Qn(n,c)&&r.push(n.get(l.symbol))}}catch(o){t.push(`builtin.carrier body summary failed for ${a.definition.relativePath}: ${Ae(o)}`)}}return{summaries:n,filesInspected:i.length}}function Kn(e,t,n,r){let i=new Map,a=[],o=[];for(let s of t){if(s.action!=="http.request"||s.strength==="candidate"||s.sourceScope!=="production")continue;let l=vt(s);if(!l)continue;let u=N(e,s.source.file);if(!u)continue;let c=St(u.root,s.source.startLine),d=c.find(P=>P.startPosition.row===s.source.startLine)??c[0];if(!d)continue;let m=Oe(d);if(!m)continue;let p=G(e,s.source.file,m.text);if(p.length!==1)continue;let f=n.get(p[0].symbol);if(!f)continue;let y=s.owner.symbol?I(e,s.owner.file).find(P=>P.symbol===s.owner.symbol):null;if(!y)continue;let h=er(u,y),C=ge(d);for(let P of f.parameterIndexes){let O=nr(u,C[P]);if(O)for(let v of rr(O)){let w=Nt(v),L=Ct(v);if(!w||!L)continue;let A=h.indexOf(L.text.trim());if(A>=0){let F={definition:y,carrier:l,field:w,parameterIndex:A,depth:0,proofObservationIds:[s.id],proofSpans:[s.source,{file:s.source.file,startLine:v.startPosition.row,endLine:v.endPosition.row}]},x=ht(F);i.has(x)||(i.set(x,F),a.push(F));continue}let b=R(u,L);!b||b.evidence==="expression"||o.push(Te(u,v,"carrier.publish",l,w,b.value,[s.id]))}}}for(;a.length>0;){let s=a.shift();if(!(s.depth>=Hn))try{for(let l of Q(e,s.definition).sites){let u=N(e,l.file);if(!u)continue;let c=l.callNode,d=ge(c)[s.parameterIndex];if(!d)continue;let m=R(u,d);m&&m.evidence!=="expression"&&o.push(Te(u,c,"carrier.publish",s.carrier,s.field,m.value,s.proofObservationIds));let p=l.caller;if(!p)continue;let f=ee(e,l).transfers.find(C=>C.calleePosition===s.parameterIndex)?.callerPosition;if(f===void 0)continue;let y={...s,definition:p,parameterIndex:f,depth:s.depth+1,proofSpans:[...s.proofSpans,{file:l.file,startLine:l.startLine,endLine:l.endLine}]},h=ht(y);i.has(h)||(i.set(h,y),a.push(y))}}catch(l){r.push(`builtin.carrier discriminator summary failed for ${s.definition.relativePath}: ${Ae(l)}`)}}return{observations:o,summaries:i.size}}function Xn(e,t,n){let r=[],i=t.filter(a=>a.action==="registry.handle"&&a.strength!=="candidate"&&a.sourceScope==="production");for(let a of t){if(a.action!=="http.handle"||a.strength==="candidate"||a.sourceScope!=="production")continue;let o=vt(a);if(!o)continue;let s=N(e,a.source.file);if(!s)continue;let l=St(s.root,a.source.startLine)[0];if(l)for(let u of ge(l).slice(1)){let c=G(e,a.source.file,u.text);for(let d of c)try{let m=N(e,d.relativePath);if(!m)continue;let p=he(m.root,d.startLine,d.endLine);if(!p)continue;V(p,f=>{if(f.type!=="call_expression")return;let y=Oe(f);if(!y)return;let h=/^([A-Za-z_$][\w$]*)\s*\[\s*([A-Za-z_$][\w$]*)\s*\]$/u.exec(y.text.trim());if(!h)return;let C=h[1],P=h[2],O=Yn(e,m,d,P);if(!O)return;let v=Jn(e,d.relativePath,C);for(let w of i){let L=w.keyParts.find(x=>x.name==="registry")?.value,A=w.keyParts.find(x=>x.name==="key")?.value;if(!L||!A||!v.some(x=>x.file===w.source.file&&x.binding===L))continue;let b=N(e,w.source.file),F=b?tr(b.root,w.source.startLine):null;!b||!F||r.push(Te(b,F,"carrier.consume",o,O,A,[a.id,w.id]))}})}catch(m){n.push(`builtin.carrier consumer analysis failed for ${d.relativePath}: ${Ae(m)}`)}}}return r}function Zn(e){let t=I(e.db,e.file),n=new Map;return V(e.root,r=>{if(r.type!=="pair"||Nt(r)?.toLowerCase()!=="body")return;let i=Ct(r);if(!i||!/\bJSON\.stringify\s*\(/u.test(i.text))return;let a=oe(t,r.startPosition.row),o=Wn(r);if(!a||!o)return;let s=bt(o),l=new Set;ir(i,s,l);let u=n.get(a.symbol)??new Set;s.forEach((c,d)=>{c&&l.has(c)&&u.add(d)}),u.size>0&&n.set(a.symbol,u)}),t.flatMap(r=>{let i=n.get(r.symbol);return i?[[r,[...i].sort((a,o)=>a-o)]]:[]})}function Wn(e){let t=e.parent;for(;t;){if(/(?:function|method|lambda)/u.test(t.type)||t.type==="arrow_function")return t;t=t.parent}return null}function Yn(e,t,n,r){let i=he(t.root,n.startLine,n.endLine);if(!i)return null;let a=new RegExp(`\\.body\\??\\.${_e(r)}\\b`,"u");if(a.test(i.text))return r;let o=null;if(V(i,c=>{if(o||c.type!=="variable_declarator")return;let d=c.childForFieldName("name")??c.namedChild(0),m=c.childForFieldName("value")??c.namedChild(1);!d||!m||!new RegExp(`(?:^|[,{}])\\s*${_e(r)}\\s*(?:[,}]|$)`,"u").test(d.text)||m.type==="call_expression"&&(o=Oe(m)?.text??null)}),!o)return null;let s=G(e,n.relativePath,o);if(s.length!==1)return null;let l=N(e,s[0].relativePath),u=l?he(l.root,s[0].startLine,s[0].endLine):null;return u&&a.test(u.text)&&new RegExp(`\\b${_e(r)}\\s*[,}]`,"u").test(u.text)?r:null}function Jn(e,t,n){let r=[];for(let i of Fe(e,t,n)){let a=ne(i.initializer);if(a.type==="call_expression")for(let o of ge(a)){let s=o.text.trim();if(/^[A-Za-z_$][\w$]*$/u.test(s))for(let l of Fe(e,i.definition.relativePath,s))r.push({file:l.definition.relativePath,binding:l.definition.leaf})}}return[...new Map(r.map(i=>[`${i.file}\0${i.binding}`,i])).values()]}function Te(e,t,n,r,i,a,o){let l=ye(e,t,"builtin.carrier",n,[{name:"carrier",value:r,evidence:"constant",term:{kind:"literal",value:r}},{name:"field",value:i,evidence:"literal",term:{kind:"literal",value:i}},{name:"value",value:a,evidence:"constant",term:{kind:"literal",value:a}}],"derived","http-body-registry-discriminator");return l.derivation={kind:"mechanically-derived",rule:"http-body-registry-discriminator",ruleVersion:"1",inputFactIds:[...o],sourceSpans:[l.source]},l}function vt(e){let t=e.keyParts.find(r=>r.name==="method"&&r.evidence!=="expression")?.value,n=e.keyParts.find(r=>r.name==="path"&&r.evidence!=="expression")?.value;return t&&n?`${t.toUpperCase()} ${n}`:null}function Qn(e,t){let n=e.get(t.definition.symbol);if(!n)return e.set(t.definition.symbol,t),!0;let r=It([...n.parameterIndexes,...t.parameterIndexes]);return r.length===n.parameterIndexes.length&&t.depth>=n.depth?!1:(e.set(t.definition.symbol,{...n,parameterIndexes:r,depth:Math.min(n.depth,t.depth),proofSpans:[...n.proofSpans,...t.proofSpans]}),!0)}function ht(e){return`${e.definition.symbol}\0${e.carrier}\0${e.field}\0${e.parameterIndex}`}function er(e,t){let n=he(e.root,t.startLine,t.endLine);return n?bt(n):[]}function bt(e){return(e.childForFieldName("parameters")??e.namedChildren.find(n=>/parameters/u.test(n.type)))?.namedChildren.map(xt)??[]}function xt(e){if(e.type==="identifier")return e.text;let t=e.childForFieldName("name")??e.childForFieldName("pattern");return t?xt(t):e.namedChildren.find(n=>n.type==="identifier")?.text??null}function he(e,t,n){let r=null;return V(e,i=>{!/(?:function|method|lambda)/u.test(i.type)&&i.type!=="arrow_function"||i.startPosition.row>t||i.endPosition.row<n||(!r||i.endIndex-i.startIndex<r.endIndex-r.startIndex)&&(r=i)}),r}function tr(e,t){let n=null;return V(e,r=>{r.startPosition.row>t||r.endPosition.row<t||(!n||r.endIndex-r.startIndex<n.endIndex-n.startIndex)&&(n=r)}),n}function St(e,t){let n=[];return V(e,r=>{r.type==="call_expression"&&r.startPosition.row<=t&&r.endPosition.row>=t&&n.push(r)}),n.sort((r,i)=>r.endIndex-r.startIndex-(i.endIndex-i.startIndex))}function Oe(e){return e.childForFieldName("function")??e.namedChild(0)}function ge(e){return(e.childForFieldName("arguments")??e.namedChildren.find(n=>n.type==="arguments"))?.namedChildren??[]}function nr(e,t){if(!t)return null;let n=t.text.trim();if(!/^[A-Za-z_$][\w$]*$/u.test(n))return ne(t);let r=null;return V(e.root,i=>{r||i.type!=="variable_declarator"||(i.childForFieldName("name")??i.namedChild(0))?.text.trim()!==n||(r=i.childForFieldName("value")??i.namedChild(1))}),ne(r||t)}function rr(e){let t=ne(e);return t.type==="object"?t.namedChildren.filter(n=>n.type==="pair"||n.type==="shorthand_property_identifier"):[]}function Nt(e){return e.type==="shorthand_property_identifier"?e.text:(e.childForFieldName("key")??e.namedChild(0))?.text.replace(/^['"`]|['"`]$/gu,"")??null}function Ct(e){return e.type==="shorthand_property_identifier"?e:e.childForFieldName("value")??e.namedChild(1)}function ne(e){let t=e;for(;["as_expression","satisfies_expression","type_assertion","parenthesized_expression"].includes(t.type)&&t.namedChildren.length>0;)t=t.namedChildren[0];return t}function ir(e,t,n){let r=new Set(e.text.match(/[A-Za-z_$][\w$]*/gu)??[]);for(let i of t)i&&r.has(i)&&n.add(i)}function It(e){return[...new Set(e)].sort((t,n)=>t-n)}function ar(e){return[...new Map(e.map(t=>[t.id,t])).values()]}function _e(e){return e.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&")}function Ae(e){return e instanceof Error?e.message:String(e)}function V(e,t){t(e);for(let n of e.namedChildren)V(n,t)}import{createHash as or}from"crypto";function wt(e,t){let n=new Map;for(let a of t){if(a.action!=="http.handle"||a.sourceScope!=="production")continue;let o=n.get(a.source.file)??[];o.push(a),n.set(a.source.file,o)}let r=[],i=sr(e);for(let a of i.mounts)for(let o of a.targetFiles)for(let s of n.get(o)??[]){let l=s.keyParts.find(m=>m.name==="path");if(!l||l.evidence==="expression")continue;let u=ur(a.prefix.value,l.value),c=s.keyParts.map(m=>m.name==="path"?{name:"path",value:u,evidence:"constant",term:{kind:"concat",parts:[a.prefix.term??{kind:"literal",value:a.prefix.value},l.term??{kind:"literal",value:l.value}]},derivation:{kind:"mechanically-derived",rule:"http.mount-prefix",ruleVersion:"1",inputFactIds:[s.id],sourceSpans:[s.source,{file:a.file,startLine:a.line,endLine:a.line},...a.prefix.derivation?.sourceSpans??[],...l.derivation?.sourceSpans??[]]}}:m),d=`${s.id}\0${a.file}\0${a.line}\0${u}`;r.push({...s,id:`boundary:${or("sha256").update(d).digest("hex").slice(0,16)}`,keyParts:c,strength:"derived",evidence:"framework-mount-composition",derivation:{kind:"mechanically-derived",rule:"http.mount-prefix",ruleVersion:"1",inputFactIds:[s.id],sourceSpans:[s.source,{file:a.file,startLine:a.line,endLine:a.line}]},resolution:"unresolved"}),s.strength="candidate",s.resolution="unresolved"}return{observations:r,filesInspected:i.filesInspected,mounts:i.mounts.length}}function sr(e){let t=[],n=H(e);for(let r of n){let i=M(e,r);if(!cr(i))continue;let a=N(e,r);a&&Ft(a.root,o=>{if(o.type!=="call_expression")return;let s=o.childForFieldName("function")??o.namedChild(0);if(!s||!/\.use$/u.test(s.text.replace(/\s+/gu,"")))return;let l=dr(o);if(l.length<2)return;let u=R(a,l[0]);if(!u||u.evidence==="expression")return;let c=lr(e,r,l[1]);c.length!==0&&t.push({file:r,line:o.startPosition.row,prefix:{value:u.value,evidence:u.evidence,term:u.term,derivation:u.derivation},targetFiles:c})})}return{mounts:t,filesInspected:n.length}}function lr(e,t,n){let r=n.text.replace(/\s+/gu,""),i=/^([A-Za-z_$][\w$]*)/u.exec(r)?.[1];if(!i)return[];let a=D(e,t).find(l=>l.localName===i&&l.sourcePath);if(!a?.sourcePath)return[t];if(a.kind==="namespace")return[a.sourcePath];let o=a.importedName==="default"?i:a.importedName,s=z(e,a.sourcePath,o);return[...new Set(s.map(l=>l.relativePath))]}function ur(e,t){let n=e==="/"?"":e.replace(/\/+$/u,""),r=t.startsWith("/")?t:`/${t}`;return`${n}${r}`||"/"}function cr(e){return/(?:\bfrom\s*|\brequire\s*\(\s*)['"](?:express|fastify|hono|koa-router|@koa\/router)(?:[/']|")/u.test(e)}function dr(e){return(e.childForFieldName("arguments")??e.namedChildren.find(n=>n.type==="arguments"))?.namedChildren??[]}function Ft(e,t){t(e);for(let n of e.namedChildren)Ft(n,t)}import{createHash as pr}from"crypto";var De=new Set(["DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT"]),mr=8;function $t(e,t){let n=new Map,r=[],i=[],a=new Set,o=[],s=[];for(let l of t){if(l.action!=="http.request"||!l.owner.symbol||l.evidence!=="call-expression"&&l.evidence!=="client-adapter")continue;let u=I(e,l.owner.file).find(p=>p.symbol===l.owner.symbol);if(!u)continue;let c=N(e,u.relativePath);if(!c)continue;let d=Pt(c,u),m={definition:u,...d,constantMethods:l.keyParts.flatMap(p=>p.name==="method"&&p.evidence!=="expression"&&De.has(p.value.toUpperCase())?[p.value.toUpperCase()]:[]),depth:0,proofObservationIds:[l.id],proofSpans:[l.source]};Bt(n,m)&&r.push(n.get(u.symbol))}for(;r.length>0;){let l=r.shift();if(!(l.depth>=mr))try{let u=Q(e,l.definition);s.push(...u.unresolved.map(c=>fr(l,c)));for(let c of u.sites){let d=N(e,c.file);if(!d)continue;a.add(c.file);let m=c.callNode,p=hr(l,m,d);p&&i.push(p);let f=c.caller;if(!f)continue;let y=Pt(d,f),h=gr(e,l,c),C={definition:f,pathParameterIndexes:ve([...y.pathParameterIndexes,...h.pathParameterIndexes]),methodParameterIndexes:ve([...y.methodParameterIndexes,...h.methodParameterIndexes]),constantMethods:X([...l.constantMethods,...y.constantMethods]),depth:l.depth+1,proofObservationIds:X([...l.proofObservationIds,...p?[p.id]:[]]),proofSpans:[...l.proofSpans,{file:c.file,startLine:c.startLine,endLine:c.endLine}]};Bt(n,C)&&r.push(n.get(f.symbol))}}catch(u){o.push(`builtin.http-summary failed for ${l.definition.relativePath}:${l.definition.startLine+1}: ${u instanceof Error?u.message:String(u)}`)}}return{observations:i,frontiers:yr(s),summaries:n.size,filesInspected:a.size,errors:o}}function fr(e,t){let n=X([...e.pathParameterIndexes.length>0?["path"]:[],...e.methodParameterIndexes.length>0&&e.constantMethods.length!==1?["method"]:[]]),r=e.constantMethods.length===1?e.constantMethods[0]:"?",i=`${e.definition.symbol}\0${t.file}\0${t.line}\0${t.reason}`;return{observationId:`frontier:${pr("sha256").update(i).digest("hex").slice(0,16)}`,kind:"call-resolution",action:"http.request",strength:"candidate",source:{file:t.file,startLine:t.line,endLine:t.line},ownerShortName:null,address:`method=${r??"?"} path=?`,reason:`Compiler identity found a reference to ${e.definition.leaf}, but exact call recovery stopped with ${t.reason} (${t.candidates} syntax candidate(s)); HTTP value propagation did not cross this site.`,missingKeyParts:n.length>0?n:["call"],sourceScope:se(t.file)}}function yr(e){return[...new Map(e.map(t=>[t.observationId,t])).values()].sort((t,n)=>t.observationId.localeCompare(n.observationId))}function hr(e,t,n){let r=Rt(t),i=e.pathParameterIndexes.flatMap(d=>{let m=R(n,r[d]);return m&&m.evidence!=="expression"&&Sr(m.value)?[{index:d,value:m}]:[]}),a=e.methodParameterIndexes.flatMap(d=>{let m=R(n,r[d]),p=m?.value.toUpperCase();return m&&p&&m.evidence!=="expression"&&De.has(p)?[{index:d,value:{...m,value:p}}]:[]}),o=X([...e.constantMethods,...a.map(d=>d.value.value)]);if(i.length!==1||o.length!==1)return null;let s=i[0].value,l=a.find(d=>d.value.value===o[0])?.value,u=[{name:"method",value:o[0],evidence:l?"constant":"literal",term:l?.term??{kind:"literal",value:o[0]},derivation:l?.derivation},{name:"path",value:s.value,evidence:"constant",term:s.term,derivation:s.derivation}],c=ye(n,t,"builtin.http-summary","http.request",u,"derived","compiler-resolved-http-summary");return c.derivation={kind:"mechanically-derived",rule:"compiler-resolved-http-summary",ruleVersion:"1",inputFactIds:e.proofObservationIds,sourceSpans:[...e.proofSpans,c.source]},c}function Pt(e,t){let n=xr(e.root,t.startLine,t.endLine);if(!n)return{pathParameterIndexes:[],methodParameterIndexes:[],constantMethods:[]};let r=br(n),i=new Set,a=new Set,o=new Set;return Me(n,s=>{if(s.type==="call_expression"&&((s.childForFieldName("function")??s.namedChild(0))?.text.replace(/\s+/gu,"").split(".").at(-1)??"")==="fetch"){let p=Rt(s);re(p[0],r,i);let f=vr(p[1],"method");if(f){re(f,r,a);let y=R(e,f),h=y?.value.toUpperCase();h&&y?.evidence!=="expression"&&De.has(h)&&o.add(h)}else re(p[1],r,a)}if(s.type!=="pair")return;let l=s.childForFieldName("key")??s.namedChild(0),u=s.childForFieldName("value")??s.namedChild(1),c=l?.text.replace(/^['"`]|['"`]$/gu,"").toLowerCase();(c==="url"||c==="path"||c==="endpoint")&&re(u,r,i),(c==="init"||c==="requestinit"||c==="options")&&re(u,r,a)}),{pathParameterIndexes:r.flatMap((s,l)=>s&&i.has(s)?[l]:[]),methodParameterIndexes:r.flatMap((s,l)=>s&&a.has(s)?[l]:[]),constantMethods:[...o].sort()}}function gr(e,t,n){let r=ee(e,n);return{pathParameterIndexes:te(r,t.pathParameterIndexes),methodParameterIndexes:te(r,t.methodParameterIndexes)}}function Bt(e,t){let n=e.get(t.definition.symbol);if(!n)return e.set(t.definition.symbol,t),!0;let r=ve([...n.pathParameterIndexes,...t.pathParameterIndexes]),i=ve([...n.methodParameterIndexes,...t.methodParameterIndexes]),a=X([...n.constantMethods,...t.constantMethods]);return r.length!==n.pathParameterIndexes.length||i.length!==n.methodParameterIndexes.length||a.length!==n.constantMethods.length||t.depth<n.depth?(e.set(t.definition.symbol,{...n,pathParameterIndexes:r,methodParameterIndexes:i,constantMethods:a,depth:Math.min(n.depth,t.depth),proofObservationIds:X([...n.proofObservationIds,...t.proofObservationIds]),proofSpans:[...n.proofSpans,...t.proofSpans]}),!0):!1}function vr(e,t){if(!e)return null;for(let n of e.namedChildren)if(!(n.type!=="pair"||(n.childForFieldName("key")??n.namedChild(0))?.text.replace(/^['"`]|['"`]$/gu,"").toLowerCase()!==t))return n.childForFieldName("value")??n.namedChild(1);return null}function re(e,t,n){if(!e)return;let r=new Set(e.text.match(/[A-Za-z_$][\w$]*/gu)??[]);for(let i of t)i&&r.has(i)&&n.add(i)}function br(e){return(e.childForFieldName("parameters")??e.namedChildren.find(n=>/parameters/u.test(n.type)))?.namedChildren.map(Et)??[]}function Et(e){if(e.type==="identifier")return e.text;let t=e.childForFieldName("name")??e.childForFieldName("pattern");return t?Et(t):e.namedChildren.find(n=>n.type==="identifier")?.text??null}function xr(e,t,n){let r=null;return Me(e,i=>{!/(?:function|method|lambda)/u.test(i.type)&&i.type!=="arrow_function"||i.startPosition.row>t||i.endPosition.row<n||(!r||i.endIndex-i.startIndex<r.endIndex-r.startIndex)&&(r=i)}),r}function Rt(e){return(e.childForFieldName("arguments")??e.namedChildren.find(n=>n.type==="arguments"))?.namedChildren??[]}function Sr(e){return e.startsWith("/")||/^https?:\/\//iu.test(e)}function ve(e){return[...new Set(e)].sort((t,n)=>t-n)}function X(e){return[...new Set(e)].sort()}function Me(e,t){t(e);for(let n of e.namedChildren)Me(n,t)}import{createHash as Nr}from"crypto";function _t(e){let t=kt(e.filter(r=>r.action==="database.read"&&r.evidence==="persistence-skip-locked-claim")),n=kt(e.filter(r=>r.action==="database.write"&&r.evidence==="persistence-insert"));return e.flatMap(r=>r.action==="database.write"&&r.evidence==="persistence-insert"?Ve(r).flatMap(i=>{let a=t.get(i)?.[0];return a?[Lt(r,a,i,"queue.send")]:[]}):r.action==="database.read"&&r.evidence==="persistence-skip-locked-claim"?Ve(r).flatMap(i=>{let a=n.get(i)?.[0];return a?[Lt(r,a,i,"queue.consume")]:[]}):[])}function kt(e){let t=new Map;for(let n of e)for(let r of Ve(n)){let i=t.get(r);i?i.push(n):t.set(r,[n])}for(let n of t.values())n.sort((r,i)=>r.id.localeCompare(i.id));return t}function Ve(e){return e.keyParts.filter(t=>t.name==="resource").map(t=>t.value)}function Lt(e,t,n,r){let i=`database:${n}`,a=r==="queue.send"?"database-queue-insert":"database-queue-skip-locked-claim",o=[e.id,r,i,a].join("\0");return{...e,id:`boundary:${Nr("sha256").update(o).digest("hex").slice(0,16)}`,extractor:"builtin.database-queue",action:r,keyParts:[{name:"address",value:i,evidence:"identifier",term:{kind:"symbol",symbol:n},derivation:{kind:"mechanically-derived",rule:"database-work-queue.resource",ruleVersion:"1",inputFactIds:[e.id,t.id],sourceSpans:[e.source,t.source]}}],evidence:a,strength:"derived",protocol:"queue",role:r==="queue.send"?"producer":"consumer",derivation:{kind:"mechanically-derived",rule:"database-work-queue.insert-skip-locked",ruleVersion:"1",inputFactIds:[e.id,t.id],sourceSpans:[e.source,t.source]},valuePrecision:"symbolic",resolution:"unresolved"}}var ze="runtime-boundaries-v15",Se=[{id:"http.method-path",protocol:"http",producerActions:["http.request"],consumerActions:["http.handle"],keyNames:["method","path"],traversable:!0},{id:"registry.identity-key",protocol:"registry",producerActions:["registry.dispatch"],consumerActions:["registry.handle"],keyNames:["registry","key"],traversable:!0},{id:"registry.capability-key",protocol:"registry",producerActions:["registry.reference"],consumerActions:["registry.handle"],keyNames:["key"],traversable:!0,requireUniqueConsumer:!0},{id:"queue.address",protocol:"queue",producerActions:["queue.send"],consumerActions:["queue.consume"],keyNames:["address"],traversable:!0},{id:"carrier.discriminator",protocol:"carrier",producerActions:["carrier.publish"],consumerActions:["carrier.consume"],keyNames:["carrier","field","value"],traversable:!0},{id:"resource.identity",protocol:"database",producerActions:["database.write"],consumerActions:["database.read"],keyNames:["resource"],traversable:!1},{id:"framework.effect-httpapi-operation",protocol:"framework",producerActions:[],consumerActions:["framework.handle"],declarationActions:["framework.declare"],keyNames:["adapter","group","operation"],traversable:!0,linkFrom:"declaration",requireUniquePair:!0}],Cr=64;function Ir(e,t={}){let n=H(e),r=new Set(n),i=new Set((t.affectedFiles??[]).map(Br)),a=t.previousGraph?.fileCoverage,o=i.size>0&&t.previousGraph?.extractorVersion===ze&&a!==void 0&&a.length===t.previousGraph.coverage.filesScanned,s=o?a.filter(g=>r.has(g.file)&&!i.has(g.file)):[],l=new Set(s.flatMap(g=>g.observationIds)),u=o?t.previousGraph.observations.filter(g=>l.has(g.id)&&r.has(g.source.file)):[],c=o?n.filter(g=>i.has(g)):n,d=[],m=a?.reduce((g,Ne)=>g+Ne.observationIds.length,0)??0,p=performance.now(),f=wr(e,c);U(d,"direct-extraction",p,c.length,f.observations.length,{filesVisited:c.length,filesReused:s.length,factsReused:u.length,factsInvalidated:Math.max(0,m-u.length)});let y=[...s,...f.fileCoverage].sort((g,Ne)=>g.file.localeCompare(Ne.file)),h=Pr(y),C=y.flatMap(g=>g.extractionErrors),P=ie([...u,...f.observations]),O=ie([...P,..._t(P)]);p=performance.now();let v=$t(e,O);U(d,"http-summary",p,O.length,v.observations.length,{filesVisited:v.filesInspected}),h.set("builtin.wrapper",{id:"builtin.wrapper",applicableFiles:v.filesInspected,observations:v.observations.length,errors:v.errors.length}),C.push(...v.errors);let w=ie([...O,...v.observations]);p=performance.now();let L=wt(e,w);U(d,"http-mount",p,w.length,L.observations.length,{filesVisited:L.filesInspected});let A=ie([...w,...L.observations]);p=performance.now();let b=gt(e,A);U(d,"carrier",p,A.length,b.observations.length,{filesVisited:b.filesInspected}),h.set("builtin.carrier",{id:"builtin.carrier",applicableFiles:b.bodySummaries,observations:b.observations.length,errors:b.errors.length}),C.push(...b.errors);let F=ie([...A,...b.observations]);p=performance.now();let x=$r(F);U(d,"relations",p,F.length,x.length),p=performance.now();let je=Rr(F,x);U(d,"links",p,x.length,je.length),kr(F,x),p=performance.now();let qe=Tr([...Lr(F,x),...v.frontiers]);return U(d,"frontiers",p,F.length,qe.length),{schemaVersion:2,extractorVersion:ze,observations:F,relationGroups:x,links:je,frontiers:qe,coverage:{filesScanned:n.length,filesWithAst:y.filter(g=>g.hasAst).length,filesWithoutAst:y.filter(g=>!g.hasAst).length,...o?{filesReused:s.length}:{},extractors:[...h.values()],extractionErrors:C,phases:d},fileCoverage:y}}function U(e,t,n,r,i,a={}){e.push({id:t,durationMs:Math.max(0,performance.now()-n),inputFacts:r,outputFacts:i,...a})}function wr(e,t){let n=[],r=[];for(let i of t){let a=M(e,i),o=ke.filter(u=>u.supports(a)),s=o.length>0?N(e,i):null,l={file:i,hasAst:s!==null||Fr(i,a),observationIds:[],extractors:[],extractionErrors:[]};if(s)for(let u of o){let c={id:u.id,applicableFiles:1,observations:0,errors:0};try{let d=u.extract(s);c.observations=d.length,n.push(...d),l.observationIds.push(...d.map(m=>m.id))}catch(d){c.errors=1,l.extractionErrors.push(`${u.id} failed for ${i}: ${d instanceof Error?d.message:String(d)}`)}l.extractors.push(c)}r.push(l)}return{observations:n,fileCoverage:r}}function Fr(e,t){return t?He(e)?/<script\b/iu.test(t):Ue(e)!==null:!1}function Pr(e){let t=new Map(ke.map(n=>[n.id,{id:n.id,applicableFiles:0,observations:0,errors:0}]));for(let n of e)for(let r of n.extractors){let i=t.get(r.id);i&&(i.applicableFiles+=r.applicableFiles,i.observations+=r.observations,i.errors+=r.errors)}return t}function Br(e){return e.replaceAll("\\","/").replace(/^\.\//u,"")}function $r(e){let t=new Map;for(let n of Se){let r=new Set([...n.producerActions,...n.consumerActions,...n.declarationActions??[]]);for(let i of e){if(!r.has(i.action)||i.strength==="candidate")continue;let a=Or(i,n.keyNames);if(!a)continue;let o=a.map(d=>`${d.name}=${At(d.name,d.value)}`).join("\0"),s=i.sourceScope==="production"?"production":i.sourceScope,l=`${n.id}\0${s}\0${o}`,u=`boundary-group:${Tt("sha256").update(l).digest("hex").slice(0,16)}`,c=t.get(u)??{id:u,protocol:n.protocol,joinRule:n.id,normalizedKey:o,keyParts:a,producerIds:[],consumerIds:[],declarationIds:[],derivation:{kind:"mechanically-derived",rule:n.id,ruleVersion:"2",inputFactIds:[],sourceSpans:[]}};n.producerActions.includes(i.action)&&c.producerIds.push(i.id),n.consumerActions.includes(i.action)&&c.consumerIds.push(i.id),n.declarationActions?.includes(i.action)&&c.declarationIds.push(i.id),c.derivation.inputFactIds.push(i.id),c.derivation.sourceSpans.push(i.source),t.set(u,c)}}return[...t.values()].map(Er).sort(Dr)}function Er(e){return{...e,producerIds:be(e.producerIds),consumerIds:be(e.consumerIds),declarationIds:be(e.declarationIds),derivation:{...e.derivation,inputFactIds:be(e.derivation.inputFactIds),sourceSpans:[...new Map(e.derivation.sourceSpans.map(t=>[`${t.file}:${t.startLine}:${t.endLine}`,t])).values()]}}}function Rr(e,t){let n=new Map(e.map(i=>[i.id,i])),r=new Map;for(let i of t){let a=Se.find(s=>s.id===i.joinRule);if(!a?.traversable)continue;let o=a.linkFrom==="declaration"?i.declarationIds:i.producerIds;if(!(o.length===0||i.consumerIds.length===0)&&!(a.requireUniquePair&&(o.length!==1||i.consumerIds.length!==1))&&!(a.requireUniqueConsumer&&i.consumerIds.length!==1)&&!(o.length*i.consumerIds.length>Cr))for(let s of o)for(let l of i.consumerIds){let u=n.get(s),c=n.get(l);if(!u||!c||Ar(u,c))continue;let d=u.strength==="derived"||c.strength==="derived"?"derived":"exact",m=`${i.joinRule}\0${s}\0${l}`,p={id:`boundary-link:${Tt("sha256").update(m).digest("hex").slice(0,16)}`,from:s,to:l,joinRule:i.joinRule,matchedKeyParts:i.keyParts,strength:d,derivation:{kind:"mechanically-derived",rule:i.joinRule,ruleVersion:"2",inputFactIds:[s,l],sourceSpans:[u.source,c.source]}};r.set(p.id,p)}}return[...r.values()].sort(Mr)}function kr(e,t){let n=new Set(t.filter(Ot).flatMap(xe)),r=new Set(t.filter(_r).flatMap(xe));for(let i of e)i.resolution=n.has(i.id)?"locally-linked":r.has(i.id)?"ambiguous":"unresolved"}function Lr(e,t){let n=new Set(e.filter(a=>a.strength!=="candidate").map(a=>`${a.action}\0${a.source.file}\0${a.source.startLine}\0${a.source.endLine}`)),r=new Set(t.flatMap(xe)),i=new Set(t.filter(Ot).flatMap(xe));return e.filter(a=>a.sourceScope==="production").filter(a=>a.strength!=="candidate"||!n.has(`${a.action}\0${a.source.file}\0${a.source.startLine}\0${a.source.endLine}`)).filter(a=>!i.has(a.id)).map(a=>{let o=a.keyParts.filter(l=>l.evidence==="expression"||l.value.length===0).map(l=>l.name),s=o.length>0?`${a.extractor} observed ${a.action}, but ${o.join(", ")} remained symbolic or unknown.`:a.resolution==="ambiguous"?`${a.extractor} established the address for ${a.action}, but more than one indexed peer has the same runtime key.`:r.has(a.id)?`${a.extractor} established the address for ${a.action}, but the indexed production scope contains no counterpart role in that relation group.`:`${a.extractor} observed ${a.action}, but no supported factorization rule could establish its addressed relation.`;return{observationId:a.id,reason:s,missingKeyParts:o,sourceScope:a.sourceScope}}).sort((a,o)=>a.observationId.localeCompare(o.observationId))}function xe(e){return[...e.producerIds,...e.consumerIds,...e.declarationIds]}function Ot(e){let t=Se.find(r=>r.id===e.joinRule);if(!t)return!1;let n=t.linkFrom==="declaration"?e.declarationIds:e.producerIds;return n.length===0||e.consumerIds.length===0?!1:!t.requireUniquePair||n.length===1&&e.consumerIds.length===1}function _r(e){let t=Se.find(r=>r.id===e.joinRule);if(!t?.requireUniquePair)return!1;let n=t.linkFrom==="declaration"?e.declarationIds:e.producerIds;return n.length>0&&e.consumerIds.length>0&&(n.length!==1||e.consumerIds.length!==1)}function Tr(e){return[...new Map(e.map(t=>[t.observationId,t])).values()].sort((t,n)=>t.observationId.localeCompare(n.observationId))}function Or(e,t){let n=[];for(let r of t){let i=e.keyParts.find(a=>a.name===r);if(!i||i.evidence==="expression"||i.value.length===0)return null;n.push({...i,value:At(r,i.value)})}return n}function At(e,t){if(e==="method")return t.toUpperCase();if(e!=="path")return t;let n=t.startsWith("/")?t:`/${t}`;return n.length>1?n.replace(/\/+$/u,""):n}function Ar(e,t){return e.source.file===t.source.file&&e.source.startLine===t.source.startLine}function ie(e){return[...new Map(e.map(t=>[t.id,t])).values()].sort((t,n)=>t.source.file.localeCompare(n.source.file)||t.source.startLine-n.source.startLine||t.action.localeCompare(n.action))}function be(e){return[...new Set(e)].sort()}function Dr(e,t){return e.joinRule.localeCompare(t.joinRule)||e.normalizedKey.localeCompare(t.normalizedKey)}function Mr(e,t){return e.joinRule.localeCompare(t.joinRule)||e.from.localeCompare(t.from)||e.to.localeCompare(t.to)}export{se as a,R as b,Q as c,ee as d,ze as e,Ir as f,Mt as g,Vt as h,We as i};
|
|
49
|
-
//# sourceMappingURL=chunk-
|
|
48
|
+
`)}function qt(e,t){return!!e.get("SELECT name FROM sqlite_master WHERE type = 'table' AND name = ?",t)}function le(e,t,n,r){!r||r.length===0||(e.push(`${n} IN (${r.map(()=>"?").join(", ")})`),t.push(...r))}function Ut(e){try{return[JSON.parse(e)]}catch{return[]}}function Ye(e){if(!e.get("SELECT name FROM sqlite_master WHERE type = 'table' AND name = ?",ue))return null;let n=e.get(`SELECT schema_version, payload FROM ${ue} WHERE singleton = 1`);if(!n||n.schema_version!==2)return null;try{let r=JSON.parse(n.payload);return r.schemaVersion===2&&Array.isArray(r.observations)&&Array.isArray(r.relationGroups)&&Array.isArray(r.links)?r:null}catch{return null}}import{createHash as Ot}from"crypto";import{createHash as cn}from"crypto";var pe=8;function G(e,t,n){return Pe(Je(e,t,we(n),0,new Set))}function Fe(e,t,n){return Ce(e,t,n,0,new Set)}function Je(e,t,n,r,i){if(r>pe)return[];let a=/^([A-Za-z_$][\w$]*)\.([A-Za-z_$][\w$]*)$/u.exec(n);return a?Qe(e,t,a[1],a[2],r,i):/^[A-Za-z_$][\w$]*$/u.test(n)?et(e,t,n,r,i):[]}function Qe(e,t,n,r,i,a){let o=[];for(let s of Ce(e,t,n,i+1,new Set(a))){let l=Zt(s.initializer);for(let u of l.namedChildren){if(u.type==="pair"){let c=u.childForFieldName("key")??u.namedChild(0);if(Wt(c)!==r)continue;let d=u.childForFieldName("value")??u.namedChild(1);d&&o.push(...Je(e,s.definition.relativePath,we(d.text),i+1,new Set(a)));continue}if(/(?:method|function)/u.test(u.type)){if((u.childForFieldName("name")??u.namedChild(0))?.text!==r)continue;let d=Kt(e,s.definition.relativePath,r,u);o.push(...d.length>0?d:[Ht(s.definition,r,u)]);continue}if(u.type==="spread_element"){let c=u.namedChild(0);if(!c)continue;for(let d of Ce(e,s.definition.relativePath,we(c.text),i+1,new Set(a)))o.push(...Qe(e,d.definition.relativePath,d.definition.leaf,r,i+1,new Set(a)))}}}return Pe(o)}function Ht(e,t,n){return{documentId:e.documentId,symbolId:-1,symbol:`source-callable:${e.relativePath}:${n.startPosition.row}:${t}`,relativePath:e.relativePath,startLine:n.startPosition.row,startChar:n.startPosition.column,endLine:n.endPosition.row,endChar:n.endPosition.column,leaf:t,parentTypeName:e.leaf,isFunctionLike:!0,isTypeLike:!1,kind:null,documentation:null,enclosingSymbol:e.symbol}}function Ce(e,t,n,r,i){return r>pe||!/^[A-Za-z_$][\w$]*$/u.test(n)?[]:et(e,t,n,r,i).flatMap(a=>{let o=B(e,a.relativePath)?.rootNode,s=o?Xt(o,a.leaf):null;return s?[{definition:a,initializer:s}]:[]})}function et(e,t,n,r,i){if(r>pe)return[];let a=`${t}\0${n}`;if(i.has(a))return[];i.add(a);let o=I(e,t).filter(u=>u.leaf===n);if(o.length>0)return o;let s=Gt(e,t,n);if(s.length>0)return s;let l=D(e,t).find(u=>u.localName===n&&u.sourcePath);if(l?.sourcePath){let u=l.kind==="namespace"||l.importedName==="default"?n:l.importedName;return Ie(e,l.sourcePath,u,r+1,new Set(i))}return Ie(e,t,n,r+1,new Set(i))}function Gt(e,t,n){let r=e.get("SELECT id FROM documents WHERE relative_path = ?",t)?.id;return r===void 0?[]:(ae(e,t)?.callables??[]).filter(i=>i.name===n).map(i=>({documentId:r,symbolId:-1,symbol:`source-callable:${t}:${i.startLine}:${n}`,relativePath:t,startLine:i.startLine,startChar:0,endLine:i.endLine,endChar:0,leaf:n,parentTypeName:null,isFunctionLike:!0,isTypeLike:!1,kind:null,documentation:null,enclosingSymbol:null}))}function Ie(e,t,n,r,i){if(r>pe)return[];let a=I(e,t).filter(o=>o.leaf===n);return a.length>0?a:Pe(Xe(e,t).flatMap(o=>o.sourcePath?o.kind==="named"&&!o.names.includes(n)?[]:Ie(e,o.sourcePath,n,r+1,new Set(i)):[]))}function Kt(e,t,n,r){return I(e,t).filter(i=>i.leaf===n&&i.startLine<=r.startPosition.row&&i.endLine>=r.endPosition.row)}function Xt(e,t){let n=null;return tt(e,r=>{n||r.type!=="variable_declarator"||(r.childForFieldName("name")??r.namedChild(0))?.text.trim()!==t||(n=r.childForFieldName("value")??r.namedChild(1))}),n}function Zt(e){let t=e;for(;["as_expression","satisfies_expression","type_assertion","parenthesized_expression"].includes(t.type)&&t.namedChildren.length>0;)t=t.namedChildren[0];return t}function Wt(e){return e?.text.replace(/^['"`]|['"`]$/gu,"")??null}function we(e){return e.replace(/\s+/gu,"").replace(/^\.\.\./u,"")}function Pe(e){return[...new Map(e.map(t=>[t.symbol,t])).values()]}function tt(e,t){t(e);for(let n of e.namedChildren)tt(n,t)}var Yt=8;function R(e,t){return t?K(e,t,0,new Set):null}function K(e,t,n,r){if(n>Yt)return _(t,"value-evaluation-depth");let i=rt(t),a=rn(i);if(a)return an(e.file,i,a.term,a.value,a.precision);if(i.type==="binary_expression"&&/\+/u.test(i.text)){let l=i.namedChildren.map(u=>K(e,u,n+1,new Set(r)));if(l.length>=2&&l.every(u=>u!==null)){let u={kind:"concat",parts:l.map(d=>d.term)},c=l.map(d=>d.value).join("");return on(e.file,i,u,c,l.some(d=>d.precision!=="literal")?"constrained-pattern":"literal",l)}}let o=i.text.trim();if(/^[A-Za-z_$][\w$]*$/u.test(o))return tn(e,o,i,n,r);let s=sn(i);return s?nn(e,s.base,s.properties,i,n,r):i.type==="call_expression"||i.type==="call"?Jt(e,i,n,r):_(i,`unsupported-expression:${i.type}`)}function Jt(e,t,n,r){let a=(t.childForFieldName("function")??t.namedChild(0))?.text.replace(/\s+/gu,"").replace(/<.*>$/u,"")??"",o=Qt(e,a);if(o.length!==1)return _(t,o.length===0?"call-target-unresolved":"call-target-ambiguous");let s=o[0],l=`${s.relativePath}\0${s.symbol}`;if(r.has(l))return _(t,"call-return-cycle");let u=B(e.db,s.relativePath)?.rootNode;if(!u)return _(t,"call-target-unparsed");let c=un(u,s.startLine,s.endLine);if(!c)return _(t,"call-target-syntax-unavailable");let d=en(c);if(!d)return _(t,"call-return-not-single-expression");let m=new Set(r);m.add(l);let p=K({db:e.db,file:s.relativePath,root:u},d,n+1,m);return p?me(t,"bounded-call-return",p,s.symbol):_(t,"call-return-unresolved")}function Qt(e,t){if(/^[A-Za-z_$][\w$]*$/u.test(t)){let i=I(e.db,e.file).filter(o=>o.isFunctionLike&&o.leaf===t);if(i.length>0)return i;let a=D(e.db,e.file).find(o=>o.localName===t&&o.sourcePath&&o.kind!=="namespace");return a?.sourcePath?z(e.db,a.sourcePath,a.importedName==="default"?t:a.importedName).filter(o=>o.isFunctionLike):[]}let n=/^([A-Za-z_$][\w$]*)\.([A-Za-z_$][\w$]*)$/u.exec(t);if(!n)return[];let r=D(e.db,e.file).find(i=>i.kind==="namespace"&&i.localName===n[1]&&i.sourcePath);return r?.sourcePath?z(e.db,r.sourcePath,n[2]).filter(i=>i.isFunctionLike):[]}function en(e){let t=e.childForFieldName("body");if(e.type==="arrow_function"&&t&&t.type!=="statement_block")return t;let n=[];return nt(t??e,t??e,n),n.length!==1?null:n[0].childForFieldName("argument")??n[0].namedChild(0)}function nt(e,t,n){if(!(t!==e&&(/(?:function|method|lambda)/u.test(t.type)||t.type==="arrow_function"))){if(t.type==="return_statement"){n.push(t);return}for(let r of t.namedChildren)nt(e,r,n)}}function tn(e,t,n,r,i){let a=`${e.file}\0${t}`;if(i.has(a))return _(n,"value-cycle");i.add(a);let o=Be(e.root,t);if(o){let f=K(e,o,r+1,i);return f?me(n,"local-constant",f):_(n,"non-foldable-local")}let s=D(e.db,e.file).find(f=>f.localName===t&&f.sourcePath);if(!s?.sourcePath)return E(n,t,"unresolved-identifier");if(s.kind==="namespace")return E(n,t,"namespace-import-requires-property");let l=s.importedName==="default"?t:s.importedName,u=z(e.db,s.sourcePath,l);if(u.length!==1)return E(n,t,u.length===0?"import-definition-missing":"import-definition-ambiguous");let c=u[0],d=B(e.db,c.relativePath)?.rootNode;if(!d)return E(n,c.symbol,"import-definition-unparsed");let m=Be(d,c.leaf);if(!m)return E(n,c.symbol,"import-definition-non-value");let p=K({db:e.db,file:c.relativePath,root:d},m,r+1,i);return p?me(n,"imported-constant",p,c.symbol):E(n,c.symbol,"import-value-unresolved")}function nn(e,t,n,r,i,a){let o=D(e.db,e.file).find(p=>p.localName===t&&p.sourcePath),s=e.file,l=t,u;if(o?.sourcePath){o.kind==="namespace"?(l=n[0]??"",n=n.slice(1)):l=o.importedName==="default"?t:o.importedName;let p=z(e.db,o.sourcePath,l);if(p.length!==1)return E(r,`${t}.${n.join(".")}`,p.length===0?"member-definition-missing":"member-definition-ambiguous");s=p[0].relativePath,l=p[0].leaf,u=p[0].symbol}let c=s===e.file?e.root:B(e.db,s)?.rootNode;if(!c)return E(r,u??t,"member-definition-unparsed");let d=Be(c,l);if(!d)return E(r,u??t,"member-base-non-value");for(let p of n){let f=rt(d);if(d=ln(f,p),!d)return E(r,u??`${t}.${n.join(".")}`,`member-property-missing:${p}`)}let m=K({db:e.db,file:s,root:c},d,i+1,a);return m?me(r,"member-constant",m,u):E(r,u??t,"member-value-unresolved")}function rn(e){let t=e.text.trim(),n=t[0];if(n!=="'"&&n!=='"'&&n!=="`"||t.at(-1)!==n)return null;let r=t.slice(1,-1);if(n!=="`"||!r.includes("${"))return{term:{kind:"literal",value:r},value:r,precision:"literal"};let i=[],a=0,o=/\$\{([^}]*)\}/gu;for(let s of r.matchAll(o)){let l=s.index??0;l>a&&i.push({kind:"literal",value:r.slice(a,l)}),i.push({kind:"unknown",reason:`template-hole:${s[1]?.trim()||"expression"}`}),a=l+s[0].length}return a<r.length&&i.push({kind:"literal",value:r.slice(a)}),{term:{kind:"pattern",language:"template",value:r.replace(o,"{}")},value:r.replace(o,"{}"),precision:"constrained-pattern"}}function an(e,t,n,r,i){return{value:r,evidence:"literal",term:n,precision:i,derivation:fe("direct-literal","direct",e,t)}}function on(e,t,n,r,i,a){return{value:r,evidence:"constant",term:n,precision:i,derivation:{...fe("constant-concatenation","mechanically-derived",e,t),inputFactIds:a.flatMap(o=>o.derivation.inputFactIds),sourceSpans:a.flatMap(o=>o.derivation.sourceSpans)}}}function me(e,t,n,r){return n.evidence==="expression"?{...n,derivation:{kind:"heuristic",rule:t,ruleVersion:"1",inputFactIds:[...n.derivation.inputFactIds,...r?[r]:[]],sourceSpans:n.derivation.sourceSpans}}:{...n,evidence:"constant",derivation:{kind:"mechanically-derived",rule:t,ruleVersion:"1",inputFactIds:[...n.derivation.inputFactIds,...r?[r]:[]],sourceSpans:n.derivation.sourceSpans}}}function E(e,t,n){return{value:e.text.trim(),evidence:"expression",term:{kind:"symbol",symbol:t},precision:"symbolic",derivation:fe(n,"heuristic","",e)}}function _(e,t){return{value:e.text.trim(),evidence:"expression",term:{kind:"unknown",reason:t},precision:"unknown",derivation:fe(t,"heuristic","",e)}}function fe(e,t,n,r){return{kind:t,rule:e,ruleVersion:"1",inputFactIds:[],sourceSpans:n?[{file:n,startLine:r.startPosition.row,endLine:r.endPosition.row}]:[]}}function sn(e){let t=e.text.replace(/\s+/gu,"");if(!/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)+$/u.test(t))return null;let[n,...r]=t.split(".");return n?{base:n,properties:r}:null}function Be(e,t){let n=null;return $e(e,r=>{if(n||r.type!=="variable_declarator"||(r.childForFieldName("name")??r.namedChild(0))?.text.trim()!==t)return;let a=r.parent;!a||a.type!=="lexical_declaration"||!/^\s*(?:export\s+)?const\b/u.test(a.text)||(n=r.childForFieldName("value")??r.namedChild(1))}),n}function ln(e,t){for(let n of e.namedChildren)if(!(n.type!=="pair"||(n.childForFieldName("key")??n.namedChild(0))?.text.replace(/^['"`]|['"`]$/gu,"")!==t))return n.childForFieldName("value")??n.namedChild(1);return null}function rt(e){let t=e;for(;["as_expression","satisfies_expression","type_assertion","parenthesized_expression"].includes(t.type)&&t.namedChildren.length>0;)t=t.namedChildren[0];return t}function un(e,t,n){let r=null;return $e(e,i=>{!/(?:function|method|lambda)/u.test(i.type)&&i.type!=="arrow_function"||i.startPosition.row>t||i.endPosition.row<n||(!r||i.endIndex-i.startIndex<r.endIndex-r.startIndex)&&(r=i)}),r}function $e(e,t){t(e);for(let n of e.namedChildren)$e(n,t)}var st=new Set(["delete","get","head","options","patch","post","put"]),dn=/(?:^|\.)(?:app|router|server)$/u,pn=new Set(["findFirst","findMany","findUnique","from","get","select"]),mn=new Set(["create","delete","insert","remove","update","upsert"]),fn=new Set(["execute","query","raw"]),ke=[vn(),gn(),yn(),bn(),Sn(),Nn(),In()],Re=new Set(["exec","execFile","execFileSync","execSync","fork","spawn","spawnSync"]);function yn(){return{id:"builtin.node-child-process",supports:e=>/(?:from\s*|require\s*\(\s*)['"](?:node:)?child_process['"]/u.test(e)&&/\b(?:exec|execFile|execFileSync|execSync|fork|spawn|spawnSync)\s*\(/u.test(e),extract:e=>{let t=hn(e.source),n=[];return k(e.root,r=>{if(r.type!=="call_expression")return;let i=J(r);if(!i)return;let a=t.direct.get(i),o=/^(.*?)\.([A-Za-z_$][\w$]*)$/u.exec(i),s=o&&t.namespaces.has(o[1])?o[2]:null,l=a??s;if(!l||!Re.has(l))return;let u=q(r),c=$(u[0],e)??{value:u[0]?.text.trim()||"<missing>",evidence:"expression"},d=["exec","execFile","execFileSync","execSync"].includes(l)?"process.exec":"process.spawn";n.push(S(e,r,"builtin.node-child-process",d,[{name:"operation",value:l,evidence:"literal"},{name:"executable",...c}],"exact","node-child-process-import"))}),n}}}function hn(e){let t=new Map,n=new Set,r=String.raw`['"](?:node:)?child_process['"]`,i=new RegExp(String.raw`\bimport\s*\{([^}]*)\}\s*from\s*${r}`,"gu");for(let l of e.matchAll(i))for(let u of(l[1]??"").split(",")){let c=/^\s*([A-Za-z_$][\w$]*)(?:\s+as\s+([A-Za-z_$][\w$]*))?\s*$/u.exec(u);c&&Re.has(c[1])&&t.set(c[2]??c[1],c[1])}let a=new RegExp(String.raw`\b(?:const|let)\s*\{([^}]*)\}\s*=\s*require\s*\(\s*${r}\s*\)`,"gu");for(let l of e.matchAll(a))for(let u of(l[1]??"").split(",")){let c=/^\s*([A-Za-z_$][\w$]*)(?:\s*:\s*([A-Za-z_$][\w$]*))?\s*$/u.exec(u);c&&Re.has(c[1])&&t.set(c[2]??c[1],c[1])}let o=new RegExp(String.raw`\bimport\s*\*\s*as\s*([A-Za-z_$][\w$]*)\s*from\s*${r}`,"gu");for(let l of e.matchAll(o))n.add(l[1]);let s=new RegExp(String.raw`\b(?:const|let)\s+([A-Za-z_$][\w$]*)\s*=\s*require\s*\(\s*${r}\s*\)`,"gu");for(let l of e.matchAll(s))n.add(l[1]);return{direct:t,namespaces:n}}function N(e,t){let n=B(e,t)?.rootNode;if(!n)return null;let r=M(e,t),i=I(e,t),a=ae(e,t)?.callables??[];return{db:e,file:t,source:r,root:n,constants:En(n),ownerAt:o=>{let s=i.filter(u=>u.startLine<=o&&u.endLine>=o).sort((u,c)=>u.endLine-u.startLine-(c.endLine-c.startLine)||u.startLine-c.startLine)[0];if(s)return{file:t,symbol:s.symbol,name:s.leaf,startLine:s.startLine,endLine:s.endLine};let l=a.filter(u=>u.startLine<=o&&u.endLine>=o).sort((u,c)=>u.endLine-u.startLine-(c.endLine-c.startLine)||u.startLine-c.startLine)[0];return{file:t,symbol:null,name:l?.name??null,startLine:l?.startLine??o,endLine:l?.endLine??o}}}}function gn(){return{id:"builtin.effect-httpapi",supports:e=>W(e,"HttpApiEndpoint").size>0||W(e,"HttpApiBuilder").size>0,extract:e=>{let t=[],n=W(e.source,"HttpApiEndpoint"),r=W(e.source,"HttpApiGroup"),i=W(e.source,"HttpApiBuilder");return k(e.root,a=>{if(a.type!=="call_expression")return;let o=lt(a);if(!o)return;let s=q(a);if(n.has(o.receiver)&&st.has(o.member)){let y=$(s[0],e),h=$(s[1],e),C=at(a,r,"make",0,e);if(!y||!h||!C)return;let P=o.member.toUpperCase();t.push(S(e,a,"builtin.effect-httpapi","http.handle",[{name:"method",value:P,evidence:"literal"},{name:"path",...h}],T([{name:"path",...h}]),"effect-httpapi-endpoint-declaration")),t.push(S(e,a,"builtin.effect-httpapi","framework.declare",Ee(C,y),T(Ee(C,y)),"effect-httpapi-operation-declaration"));return}if(!["handle","handleRaw"].includes(o.member))return;let l=at(a,i,"group",1,e),u=$(s[0],e),c=s[1];if(!l||!u||!c)return;let d=Ee(l,u),m=G(e.db,e.file,c.text),p=S(e,a,"builtin.effect-httpapi","framework.handle",d,m.length===1?T(d):"candidate","effect-httpapi-handler-registration"),f=m[0];m.length===1&&f&&(p.owner={file:f.relativePath,symbol:f.symbol,name:f.leaf,startLine:f.startLine,endLine:f.endLine}),t.push(p)}),t}}}function Ee(e,t){return[{name:"adapter",value:"effect-httpapi",evidence:"literal"},{name:"group",...e},{name:"operation",...t}]}function W(e,t){let n=new Set,r=/\bimport\s*\{([\s\S]*?)\}\s*from\s*['"]([^'"]+)['"]/gu;for(let a of e.matchAll(r)){let o=a[2]??"";if(it(o))for(let s of(a[1]??"").split(",")){let l=s.trim().replace(/^type\s+/u,""),u=/^([A-Za-z_$][\w$]*)(?:\s+as\s+([A-Za-z_$][\w$]*))?$/u.exec(l);u?.[1]===t&&n.add(u[2]??u[1])}}let i=/\bimport\s*\*\s*as\s*([A-Za-z_$][\w$]*)\s*from\s*['"]([^'"]+)['"]/gu;for(let a of e.matchAll(i)){let o=a[2]??"";o.endsWith(`/${t}`)&&it(o)&&n.add(a[1])}return n}function it(e){return e==="effect/unstable/httpapi"||e==="@effect/platform"||e.startsWith("@effect/platform/HttpApi")}function at(e,t,n,r,i){let a=e.parent;for(;a;){if(a.type==="call_expression"){let o=ot(a,t,n,r,i);if(o)return o;let s=a.childForFieldName("function")??a.namedChild(0),l=null;if(s&&k(s,u=>{!l&&u.type==="call_expression"&&(l=ot(u,t,n,r,i))}),l)return l}a=a.parent}return null}function ot(e,t,n,r,i){let a=lt(e);return!a||a.member!==n||!t.has(a.receiver)?null:$(q(e)[r],i)}function lt(e){let t=e.childForFieldName("function")??e.namedChild(0);if(!t||!["member_expression","subscript_expression"].includes(t.type))return null;let n=t.childForFieldName("object")??t.namedChild(0),r=t.childForFieldName("property")??t.childForFieldName("index")??t.namedChild(1);return!n||!r?null:{receiver:n.text.replace(/\s+/gu,""),member:r.text.replace(/^['"`]|['"`]$/gu,"")}}function vn(){return{id:"builtin.http",supports:e=>/\bfetch\s*\(|\baxios\b|\b(?:app|router|server)\s*\.\s*(?:get|post|put|patch|delete|options|head)\s*\(/u.test(e)||Y(e,["axios"])||/\b(?:FastAPI|Flask|APIRouter|axum|Router::new)\b/u.test(e),extract:e=>{let t=[];return k(e.root,n=>{if(n.type==="decorator"){let m=/^@[^\s(]+\.(get|post|put|patch|delete|options|head)\s*\(\s*(['"`])([^'"`]+)\2/iu.exec(n.text.trim());if(!m||!Y(e.source,["fastapi","flask"]))return;t.push(S(e,n,"builtin.http","http.handle",[{name:"method",value:m[1].toUpperCase(),evidence:"literal"},{name:"path",value:m[3],evidence:"literal"}],"exact","framework-decorator"));return}if(n.type!=="call_expression")return;let r=J(n);if(!r)return;let i=r.split(".").at(-1)?.toLowerCase()??"",a=r.includes(".")?r.slice(0,r.lastIndexOf(".")):"",o=q(n);if(i==="route"&&Y(e.source,["axum"])){let m=$(o[0],e),p=/^\s*(get|post|put|patch|delete|options|head)\s*\(/iu.exec(o[1]?.text??"")?.[1];if(!m||!p)return;t.push(S(e,n,"builtin.http","http.handle",[{name:"method",value:p.toUpperCase(),evidence:"literal"},{name:"path",...m}],T([{name:"path",...m}]),"framework-adapter"));return}if(r==="fetch"||r.endsWith(".fetch")){let m=$(o[0],e);if(!m)return;let f=/\bmethod\s*:\s*['"`]([A-Za-z]+)['"`]/u.exec(o[1]?.text??"")?.[1]?.toUpperCase()??(o[1]?null:"GET"),y=[...f?[{name:"method",value:f,evidence:"literal"}]:[],{name:"path",...m}];t.push(S(e,n,"builtin.http","http.request",y,f?T(y):"candidate","call-expression"));return}if(!st.has(i))return;let s=$(o[0],e);if(!s)return;let l=i.toUpperCase();if(dn.test(a)&&Y(e.source,["express","fastify","hono","koa-router","@koa/router"])){t.push(S(e,n,"builtin.http","http.handle",[{name:"method",value:l,evidence:"literal"},{name:"path",...s}],T([{name:"path",...s}]),"framework-adapter"));return}let c=Pn(e.source,["axios"]),d=a.split(".")[0]??"";c.has(d)&&t.push(S(e,n,"builtin.http","http.request",[{name:"method",value:l,evidence:"literal"},{name:"path",...s}],T([{name:"path",...s}]),"client-adapter"))}),t}}}function bn(){return{id:"builtin.capability-registry",supports:e=>/\b(?:execute|handler|invoke|run)\s*(?:[:(])/u.test(e)||/['"`][^'"`\n]{0,256}\b[A-Za-z_$][\w$-]*\s*\(/u.test(e),extract:e=>{let t=[],n=new Set;return k(e.root,r=>{if(r.type==="pair"){let a=r.childForFieldName("key")??r.namedChild(0),o=r.childForFieldName("value")??r.namedChild(1),s=a?.text.replace(/^['"`]|['"`]$/gu,"");if(s!=="name"&&s!=="id")return;let l=ut(o,e),u=kn(r);if(!l||l.evidence!=="literal"||!u)return;let c=`handle\0${l.value}\0${u.startPosition.row}`;if(n.has(c))return;n.add(c),t.push(S(e,u,"builtin.capability-registry","registry.handle",[{name:"key",...l}],"exact","capability-descriptor"));return}if(!["string","string_literal","template_string"].includes(r.type))return;let i=r.text.replace(/^['"`]|['"`]$/gu,"");for(let a of i.matchAll(/\b([A-Za-z_$][\w$-]*)\s*\(/gu)){let o=a[1];if(!xn(i,o,a.index))continue;let s=`reference\0${o}\0${r.startPosition.row}`;n.has(s)||(n.add(s),t.push(S(e,r,"builtin.capability-registry","registry.reference",[{name:"key",value:o,evidence:"literal"}],"exact","capability-instruction-reference")))}}),t}}}function xn(e,t,n){if(t.includes("_")||t.includes("-"))return!0;let r=e.slice(Math.max(0,n-64),n);return/\b(?:use|call|invoke|run|via|with|read|stop)(?:\s+the)?(?:\s+(?:tool|capability|command))?\s*$/iu.test(r)}function Sn(){return{id:"builtin.registry",supports:e=>/(?:Handlers?|Registry|Routes?)\b/iu.test(e),extract:e=>{let t=[];return k(e.root,n=>{if(n.type==="pair"){let a=Rn(n);if(!a)return;let o=n.childForFieldName("key")??n.namedChild(0),s=n.childForFieldName("value")??n.namedChild(1),l=ut(o,e);if(!l||!s||!ct(s))return;let u=Le(s)?"exact":"candidate";t.push(S(e,n,"builtin.registry","registry.handle",[{name:"registry",value:a,evidence:"identifier"},{name:"key",...l}],T([{name:"key",...l}],u),"object-member"));return}if(n.type!=="call_expression")return;let r=n.childForFieldName("function")??n.namedChild(0);if(!r)return;let i=/^([A-Za-z_$][\w$]*)\s*\[\s*(['"`])([^'"`]+)\2\s*\]$/u.exec(r.text.trim());i&&t.push(S(e,n,"builtin.registry","registry.dispatch",[{name:"registry",value:i[1],evidence:"identifier"},{name:"key",value:i[3],evidence:"literal"}],"exact","indexed-access-call"))}),t}}}function Nn(){return{id:"builtin.persistence",supports:e=>/\b(?:db|database|prisma|drizzle|[A-Za-z_$][\w$]*(?:Repository|Repo))\b[^;]{0,1024}?\.\s*(?:findFirst|findMany|findUnique|from|get|select|create|delete|insert|remove|update|upsert|execute|query|raw|transaction)(?:\s*<[^()]{1,512}>)?\s*\(/iu.test(e),extract:e=>{let t=[],n=_n(e.root);return k(e.root,r=>{if(r.type!=="call_expression")return;let i=J(r);if(!i)return;let a=i.split("."),o=a.at(-1)??"",s=q(r),l=s[0]?.text??"",u=Ln(o,l);if(!u)return;let c=dt(a,n);if(!c)return;let d=Cn(s[0],e)??Tn(l),m=On(c,a,o,d);if(!m)return;let p=o==="insert"?"persistence-insert":u==="database.read"&&/\bFOR\s+UPDATE\s+SKIP\s+LOCKED\b/iu.test(l)?"persistence-skip-locked-claim":"persistence-adapter";t.push(S(e,r,"builtin.persistence",u,[{name:"resource",...m}],T([{name:"resource",...m}]),p))}),t}}}function Cn(e,t){if(!e)return null;let n=e.text.replace(/\s+/gu,"");return/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*$/u.test(n)?{value:n.split(".").at(-1),evidence:"identifier",term:{kind:"symbol",symbol:n}}:$(e,t)}function In(){return{id:"builtin.queue",supports:e=>Y(e,["amqplib","bullmq","kafkajs","@aws-sdk/client-sqs","rabbitmq"])&&/\.(?:sendToQueue|consume|send|subscribe)\s*\(/u.test(e),extract:e=>{let t=[];return k(e.root,n=>{if(n.type!=="call_expression")return;let r=J(n);if(!r)return;let i=r.split(".").at(-1)??"",a=q(n),o=i==="sendToQueue"||i==="send"?"queue.send":i==="consume"||i==="subscribe"?"queue.consume":null;if(!o)return;let s=i==="send"||i==="subscribe"?Bn(a[0],"topic",e):$(a[0],e);s&&t.push(S(e,n,"builtin.queue",o,[{name:"address",...s}],T([{name:"address",...s}]),"framework-adapter"))}),t}}}function S(e,t,n,r,i,a,o){let s=e.ownerAt(t.startPosition.row),l=JSON.stringify({extractor:n,action:r,file:e.file,line:t.startPosition.row,keyParts:i});return{id:`boundary:${cn("sha256").update(l).digest("hex").slice(0,16)}`,extractor:n,action:r,owner:s,source:{file:e.file,startLine:t.startPosition.row,endLine:t.endPosition.row},keyParts:i,evidence:o,strength:a,protocol:r.split(".")[0]??r,role:wn(r),executionDomain:Fn(e.file),derivation:{kind:a==="candidate"?"heuristic":a==="derived"?"mechanically-derived":"direct",rule:o,ruleVersion:"1",inputFactIds:i.flatMap(u=>u.derivation?.inputFactIds??[]),sourceSpans:[{file:e.file,startLine:t.startPosition.row,endLine:t.endPosition.row},...i.flatMap(u=>u.derivation?.sourceSpans??[])]},valuePrecision:i.some(u=>u.evidence==="expression")?"unknown":i.some(u=>u.evidence==="identifier")?"symbolic":"literal",modality:"may",resolution:"unresolved",sourceScope:se(e.file)}}function wn(e){let t=e.split(".").at(-1)??e;return["handle","subscribe","consume","read"].includes(t)?"consumer":["request","publish","send","write","dispatch","reference","invoke","spawn","exec"].includes(t)?"producer":"observe"}function Fn(e){let t=e.replaceAll("\\","/"),n=/^(apps|services|packages)\/([^/]+)/u.exec(t);return n?`${n[1]}/${n[2]}`:null}function Y(e,t){return t.some(n=>{let r=n.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&");return new RegExp(`(?:\\bfrom\\s+${r}\\b|\\buse\\s+${r}\\b|(?:\\bfrom\\s*|\\brequire\\s*\\(\\s*)['"]${r}(?:[/']|"))`,"u").test(e)})}function Pn(e,t){let n=new Set;for(let r of t){let i=r.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&"),a=new RegExp(`(?:import\\s+([A-Za-z_$][\\w$]*)[^;]*?\\sfrom\\s*|(?:const|let)\\s+([A-Za-z_$][\\w$]*)\\s*=\\s*require\\s*\\(\\s*)['"]${i}(?:[/']|")`,"gu");for(let o of e.matchAll(a)){let s=o[1]??o[2];s&&n.add(s)}}return n}function ye(e,t,n,r,i,a,o){return S(e,t,n,r,i,a,o)}function J(e){return(e.childForFieldName("function")??e.namedChild(0))?.text.replace(/\s+/gu,"")??null}function q(e){return(e.childForFieldName("arguments")??e.namedChildren.find(n=>n.type==="arguments"))?.namedChildren??[]}function $(e,t){let n=R(t,e);return n?{value:n.value,evidence:n.evidence,term:n.term,derivation:n.derivation}:null}function Bn(e,t,n){if(!e)return null;let r=e.namedChildren.find(a=>a.type!=="pair"?!1:(a.childForFieldName("key")??a.namedChild(0))?.text.replace(/^['"`]|['"`]$/gu,"")===t),i=r?.childForFieldName("value")??r?.namedChild(1);return $(i,n)}function ut(e,t){if(!e)return null;let n=$(e,t);if(n?.evidence==="literal"||n?.evidence==="constant")return n;let r=e.text.trim();return/^[A-Za-z_$][\w$]*$/u.test(r)?{value:r,evidence:"identifier",term:{kind:"symbol",symbol:r}}:n}function T(e,t="exact"){return t==="candidate"||e.some(n=>n.evidence==="expression")?"candidate":t==="derived"||e.some(n=>n.evidence==="constant")?"derived":"exact"}function $n(e){let t=e.text.trim(),n=t[0];if(n!=="'"&&n!=='"'&&n!=="`"||t.at(-1)!==n)return null;let r=t.slice(1,-1);return n==="`"&&r.includes("${")?null:r}function En(e){let t=new Map;return k(e,n=>{if(n.type!=="variable_declarator")return;let r=n.childForFieldName("name")??n.namedChild(0),i=n.childForFieldName("value")??n.namedChild(1);if(!r||!i||!/^[A-Za-z_$][\w$]*$/u.test(r.text))return;let a=$n(i);a!==null&&t.set(r.text,a)}),t}function Rn(e){let t=e.parent,n=t?.parent??null;for(;n&&["as_expression","satisfies_expression","type_assertion","parenthesized_expression"].includes(n.type);)n=n.parent;if(!t||!n||n.type!=="variable_declarator")return null;let i=(n.childForFieldName("name")??n.namedChild(0))?.text??"";return/(?:handlers?|registry|routes?)$/iu.test(i)?i:null}function Le(e){return/(?:function|lambda|method)/u.test(e.type)||e.type==="arrow_function"}function ct(e){return Le(e)||e.type==="member_expression"?!0:e.type==="identifier"&&/(?:command|controller|dispatch|handle|handler)/iu.test(e.text)}function kn(e){let t=e.parent;for(;t&&t.type!=="variable_declarator";){if(["object","object_literal","dictionary"].includes(t.type))for(let n of t.namedChildren){if(n.type==="pair"){let i=n.childForFieldName("key")??n.namedChild(0),a=n.childForFieldName("value")??n.namedChild(1),o=i?.text.replace(/^['"`]|['"`]$/gu,"");if(o&&["execute","handler","invoke","run"].includes(o)&&a&&ct(a))return t}let r=n.childForFieldName("name")??n.namedChild(0);if(r&&["execute","handler","invoke","run"].includes(r.text.replace(/^['"`]|['"`]$/gu,""))&&/(?:function|method)/u.test(n.type))return t}t=t.parent}return null}function dt(e,t=new Set){let n=e.slice(0,-1).map(r=>r.replace(/\([^)]*\)/gu,""));return n.some(r=>/^(?:prisma|drizzle)$/iu.test(r))?"orm":n.some(r=>/(?:Repository|Repo)$/u.test(r))?"repository":n.some(r=>/^(?:db|database)$/iu.test(r)||t.has(r))?"database":null}function Ln(e,t){if(pn.has(e))return"database.read";if(mn.has(e))return"database.write";if(!fn.has(e))return null;let n=/\b(SELECT|INSERT|UPDATE|DELETE)\b/iu.exec(t)?.[1]?.toUpperCase();return n==="SELECT"?"database.read":n?"database.write":null}function _n(e){let t=new Set;return k(e,n=>{if(n.type!=="call_expression")return;let r=J(n);if(!r)return;let i=r.split(".");if(!(i.at(-1)!=="transaction"||!dt(i)))for(let a of q(n)){if(!Le(a))continue;let s=(a.childForFieldName("parameters")??a.namedChildren.find(u=>/parameters/u.test(u.type)))?.namedChildren[0],l=s?pt(s):null;l&&t.add(l)}}),t}function pt(e){if(e.type==="identifier")return e.text;let t=e.childForFieldName("name")??e.childForFieldName("pattern");return t?pt(t):e.namedChildren.find(n=>n.type==="identifier")?.text??null}function Tn(e){let t=mt(e);return t?{value:t,evidence:"identifier",term:{kind:"symbol",symbol:t}}:null}function On(e,t,n,r){if(e==="orm"&&t.length>=3)return{value:t.at(-2).replace(/\([^)]*\)/gu,""),evidence:"identifier"};if(e==="repository"){let a=t.at(-2)?.replace(/(?:Repository|Repo)$/u,"");return a?{value:a,evidence:"identifier"}:null}if(!r)return null;if(n==="from"||n==="insert")return r;let i=mt(r.value);return i?{value:i,evidence:r.evidence}:null}function mt(e){return/\b(?:from|into|update|table)\s+(?:\$\{\s*)?['"`]?([A-Za-z_$][\w$.-]*)/iu.exec(e)?.[1]??null}function k(e,t){t(e);for(let n of e.namedChildren)k(n,t)}var An=Z("resolved-call-syntax",{clearGroups:[]}),Dn=Z("resolved-call-sites",{clearGroups:[]});function Q(e,t){return Dn.get(e,t.symbolId,()=>Mn(e,t))}function Mn(e,t){let n=[],r=[],i=new Set,a=new Set;for(let o of We(e,t,{semantic:!1})){i.add(o.file);let s=An.get(e,o.file,()=>Vn(e,o.file));if(!s){r.push({callee:t,file:o.file,line:o.line,reason:"ast-unavailable",candidates:0,referenceProvenance:o.provenance});continue}let l=(s.byLeaf.get(t.leaf)??[]).filter(({callNode:d})=>d.startPosition.row<=o.line&&d.endPosition.row>=o.line);if(l.length!==1){r.push({callee:t,file:o.file,line:o.line,reason:l.length===0?"call-not-found":"ambiguous-call",candidates:l.length,referenceProvenance:o.provenance});continue}let u=l[0],c=`${o.file}\0${u.callNode.startIndex}\0${u.callNode.endIndex}`;a.has(c)||(a.add(c),n.push({callee:t,caller:oe(I(e,o.file),u.callNode.startPosition.row),file:o.file,line:o.line,startLine:u.callNode.startPosition.row,endLine:u.callNode.endPosition.row,targetText:u.targetNode.text,callNode:u.callNode,targetNode:u.targetNode,arguments:u.arguments,referenceProvenance:o.provenance}))}return{sites:n,unresolved:r,filesVisited:i.size}}function Vn(e,t){let n=B(e,t)?.rootNode;if(!n)return null;let r=new Map;return ft(n,i=>{if(i.type!=="call_expression"&&i.type!=="call")return;let a=i.childForFieldName("function")??i.namedChild(0);if(!a)return;let o=Ke(a);if(!o)return;let s=i.childForFieldName("arguments")??i.namedChildren.find(c=>c.type==="arguments"),l={callNode:i,targetNode:a,arguments:s?.namedChildren??[]},u=r.get(o);u?u.push(l):r.set(o,[l])}),{byLeaf:r}}function ft(e,t){t(e);for(let n of e.namedChildren)ft(n,t)}var zn=Z("call-parameter-value-flow",{clearGroups:[]});function ee(e,t){let n=`${t.callee.symbolId}\0${t.file}\0${t.callNode.startIndex}\0${t.callNode.endIndex}`;return zn.get(e,n,()=>jn(e,t))}function te(e,t){let n=new Set(t);return[...new Set(e.transfers.flatMap(r=>n.has(r.calleePosition)?[r.callerPosition]:[]))].sort((r,i)=>r-i)}function jn(e,t){let n={file:t.file,startLine:t.startLine,endLine:t.endLine};if(!t.caller)return{callee:t.callee,caller:null,call:n,transfers:[],unknown:t.arguments.map((l,u)=>({calleePosition:u,argumentText:l.text.trim(),reason:"caller-unavailable",proof:n}))};let r=B(e,t.caller.relativePath)?.rootNode,i=r?qn(r,t.caller.startLine,t.caller.endLine):null;if(!i)return{callee:t.callee,caller:t.caller,call:n,transfers:[],unknown:t.arguments.map((l,u)=>({calleePosition:u,argumentText:l.text.trim(),reason:"caller-syntax-unavailable",proof:n}))};let a=Un(i),o=[],s=[];return t.arguments.forEach((l,u)=>{let c=l.text.trim(),d=a.indexOf(c);d>=0?o.push({calleePosition:u,callerPosition:d,argumentText:c,proof:n}):s.push({calleePosition:u,argumentText:c,reason:"argument-not-direct-parameter",proof:n})}),{callee:t.callee,caller:t.caller,call:n,transfers:o,unknown:s}}function qn(e,t,n){let r=null;return ht(e,i=>{!/(?:function|method|lambda)/u.test(i.type)&&i.type!=="arrow_function"||i.startPosition.row>t||i.endPosition.row<n||(!r||i.endIndex-i.startIndex<r.endIndex-r.startIndex)&&(r=i)}),r}function Un(e){return(e.childForFieldName("parameters")??e.namedChildren.find(n=>/parameters/u.test(n.type)))?.namedChildren.map(yt)??[]}function yt(e){if(e.type==="identifier")return e.text;let t=e.childForFieldName("name")??e.childForFieldName("pattern");return t?yt(t):e.namedChildren.find(n=>n.type==="identifier")?.text??null}function ht(e,t){t(e);for(let n of e.namedChildren)ht(n,t)}var Hn=8,Gn=8;function vt(e,t){let n=[],r=Kn(e,n),i=r.summaries,a=Xn(e,t,i,n),o=Zn(e,t,n);return{observations:or([...a.observations,...o]),bodySummaries:i.size,discriminatorSummaries:a.summaries,filesInspected:r.filesInspected,errors:n}}function Kn(e,t){let n=new Map,r=[],i=H(e);for(let a of i){let o=M(e,a);if(!/\bJSON\.stringify\s*\(/u.test(o)||!/\bbody\s*:/u.test(o))continue;let s=N(e,a);if(s)for(let[l,u]of Wn(s)){let c={definition:l,parameterIndexes:u,depth:0,proofSpans:[{file:a,startLine:l.startLine,endLine:l.endLine}]};n.set(l.symbol,c),r.push(c)}}for(;r.length>0;){let a=r.shift();if(!(a.depth>=Hn))try{for(let o of Q(e,a.definition).sites){if(!N(e,o.file))continue;let l=o.caller;if(!l)continue;let u=te(ee(e,o),a.parameterIndexes);if(u.length===0)continue;let c={definition:l,parameterIndexes:wt(u),depth:a.depth+1,proofSpans:[...a.proofSpans,{file:o.file,startLine:o.startLine,endLine:o.endLine}]};er(n,c)&&r.push(n.get(l.symbol))}}catch(o){t.push(`builtin.carrier body summary failed for ${a.definition.relativePath}: ${Ae(o)}`)}}return{summaries:n,filesInspected:i.length}}function Xn(e,t,n,r){let i=new Map,a=[],o=[];for(let s of t){if(s.action!=="http.request"||s.strength==="candidate"||s.sourceScope!=="production")continue;let l=bt(s);if(!l)continue;let u=N(e,s.source.file);if(!u)continue;let c=Nt(u.root,s.source.startLine),d=c.find(P=>P.startPosition.row===s.source.startLine)??c[0];if(!d)continue;let m=Oe(d);if(!m)continue;let p=G(e,s.source.file,m.text);if(p.length!==1)continue;let f=n.get(p[0].symbol);if(!f)continue;let y=s.owner.symbol?I(e,s.owner.file).find(P=>P.symbol===s.owner.symbol):null;if(!y)continue;let h=tr(u,y),C=ge(d);for(let P of f.parameterIndexes){let O=rr(u,C[P]);if(O)for(let v of ir(O)){let w=Ct(v),L=It(v);if(!w||!L)continue;let A=h.indexOf(L.text.trim());if(A>=0){let F={definition:y,carrier:l,field:w,parameterIndex:A,depth:0,proofObservationIds:[s.id],proofSpans:[s.source,{file:s.source.file,startLine:v.startPosition.row,endLine:v.endPosition.row}]},x=gt(F);i.has(x)||(i.set(x,F),a.push(F));continue}let b=R(u,L);!b||b.evidence==="expression"||o.push(Te(u,v,"carrier.publish",l,w,b.value,[s.id]))}}}for(;a.length>0;){let s=a.shift();if(!(s.depth>=Gn))try{for(let l of Q(e,s.definition).sites){let u=N(e,l.file);if(!u)continue;let c=l.callNode,d=ge(c)[s.parameterIndex];if(!d)continue;let m=R(u,d);m&&m.evidence!=="expression"&&o.push(Te(u,c,"carrier.publish",s.carrier,s.field,m.value,s.proofObservationIds));let p=l.caller;if(!p)continue;let f=ee(e,l).transfers.find(C=>C.calleePosition===s.parameterIndex)?.callerPosition;if(f===void 0)continue;let y={...s,definition:p,parameterIndex:f,depth:s.depth+1,proofSpans:[...s.proofSpans,{file:l.file,startLine:l.startLine,endLine:l.endLine}]},h=gt(y);i.has(h)||(i.set(h,y),a.push(y))}}catch(l){r.push(`builtin.carrier discriminator summary failed for ${s.definition.relativePath}: ${Ae(l)}`)}}return{observations:o,summaries:i.size}}function Zn(e,t,n){let r=[],i=t.filter(a=>a.action==="registry.handle"&&a.strength!=="candidate"&&a.sourceScope==="production");for(let a of t){if(a.action!=="http.handle"||a.strength==="candidate"||a.sourceScope!=="production")continue;let o=bt(a);if(!o)continue;let s=N(e,a.source.file);if(!s)continue;let l=Nt(s.root,a.source.startLine)[0];if(l)for(let u of ge(l).slice(1)){let c=G(e,a.source.file,u.text);for(let d of c)try{let m=N(e,d.relativePath);if(!m)continue;let p=he(m.root,d.startLine,d.endLine);if(!p)continue;V(p,f=>{if(f.type!=="call_expression")return;let y=Oe(f);if(!y)return;let h=/^([A-Za-z_$][\w$]*)\s*\[\s*([A-Za-z_$][\w$]*)\s*\]$/u.exec(y.text.trim());if(!h)return;let C=h[1],P=h[2],O=Jn(e,m,d,P);if(!O)return;let v=Qn(e,d.relativePath,C);for(let w of i){let L=w.keyParts.find(x=>x.name==="registry")?.value,A=w.keyParts.find(x=>x.name==="key")?.value;if(!L||!A||!v.some(x=>x.file===w.source.file&&x.binding===L))continue;let b=N(e,w.source.file),F=b?nr(b.root,w.source.startLine):null;!b||!F||r.push(Te(b,F,"carrier.consume",o,O,A,[a.id,w.id]))}})}catch(m){n.push(`builtin.carrier consumer analysis failed for ${d.relativePath}: ${Ae(m)}`)}}}return r}function Wn(e){let t=I(e.db,e.file),n=new Map;return V(e.root,r=>{if(r.type!=="pair"||Ct(r)?.toLowerCase()!=="body")return;let i=It(r);if(!i||!/\bJSON\.stringify\s*\(/u.test(i.text))return;let a=oe(t,r.startPosition.row),o=Yn(r);if(!a||!o)return;let s=xt(o),l=new Set;ar(i,s,l);let u=n.get(a.symbol)??new Set;s.forEach((c,d)=>{c&&l.has(c)&&u.add(d)}),u.size>0&&n.set(a.symbol,u)}),t.flatMap(r=>{let i=n.get(r.symbol);return i?[[r,[...i].sort((a,o)=>a-o)]]:[]})}function Yn(e){let t=e.parent;for(;t;){if(/(?:function|method|lambda)/u.test(t.type)||t.type==="arrow_function")return t;t=t.parent}return null}function Jn(e,t,n,r){let i=he(t.root,n.startLine,n.endLine);if(!i)return null;let a=new RegExp(`\\.body\\??\\.${_e(r)}\\b`,"u");if(a.test(i.text))return r;let o=null;if(V(i,c=>{if(o||c.type!=="variable_declarator")return;let d=c.childForFieldName("name")??c.namedChild(0),m=c.childForFieldName("value")??c.namedChild(1);!d||!m||!new RegExp(`(?:^|[,{}])\\s*${_e(r)}\\s*(?:[,}]|$)`,"u").test(d.text)||m.type==="call_expression"&&(o=Oe(m)?.text??null)}),!o)return null;let s=G(e,n.relativePath,o);if(s.length!==1)return null;let l=N(e,s[0].relativePath),u=l?he(l.root,s[0].startLine,s[0].endLine):null;return u&&a.test(u.text)&&new RegExp(`\\b${_e(r)}\\s*[,}]`,"u").test(u.text)?r:null}function Qn(e,t,n){let r=[];for(let i of Fe(e,t,n)){let a=ne(i.initializer);if(a.type==="call_expression")for(let o of ge(a)){let s=o.text.trim();if(/^[A-Za-z_$][\w$]*$/u.test(s))for(let l of Fe(e,i.definition.relativePath,s))r.push({file:l.definition.relativePath,binding:l.definition.leaf})}}return[...new Map(r.map(i=>[`${i.file}\0${i.binding}`,i])).values()]}function Te(e,t,n,r,i,a,o){let l=ye(e,t,"builtin.carrier",n,[{name:"carrier",value:r,evidence:"constant",term:{kind:"literal",value:r}},{name:"field",value:i,evidence:"literal",term:{kind:"literal",value:i}},{name:"value",value:a,evidence:"constant",term:{kind:"literal",value:a}}],"derived","http-body-registry-discriminator");return l.derivation={kind:"mechanically-derived",rule:"http-body-registry-discriminator",ruleVersion:"1",inputFactIds:[...o],sourceSpans:[l.source]},l}function bt(e){let t=e.keyParts.find(r=>r.name==="method"&&r.evidence!=="expression")?.value,n=e.keyParts.find(r=>r.name==="path"&&r.evidence!=="expression")?.value;return t&&n?`${t.toUpperCase()} ${n}`:null}function er(e,t){let n=e.get(t.definition.symbol);if(!n)return e.set(t.definition.symbol,t),!0;let r=wt([...n.parameterIndexes,...t.parameterIndexes]);return r.length===n.parameterIndexes.length&&t.depth>=n.depth?!1:(e.set(t.definition.symbol,{...n,parameterIndexes:r,depth:Math.min(n.depth,t.depth),proofSpans:[...n.proofSpans,...t.proofSpans]}),!0)}function gt(e){return`${e.definition.symbol}\0${e.carrier}\0${e.field}\0${e.parameterIndex}`}function tr(e,t){let n=he(e.root,t.startLine,t.endLine);return n?xt(n):[]}function xt(e){return(e.childForFieldName("parameters")??e.namedChildren.find(n=>/parameters/u.test(n.type)))?.namedChildren.map(St)??[]}function St(e){if(e.type==="identifier")return e.text;let t=e.childForFieldName("name")??e.childForFieldName("pattern");return t?St(t):e.namedChildren.find(n=>n.type==="identifier")?.text??null}function he(e,t,n){let r=null;return V(e,i=>{!/(?:function|method|lambda)/u.test(i.type)&&i.type!=="arrow_function"||i.startPosition.row>t||i.endPosition.row<n||(!r||i.endIndex-i.startIndex<r.endIndex-r.startIndex)&&(r=i)}),r}function nr(e,t){let n=null;return V(e,r=>{r.startPosition.row>t||r.endPosition.row<t||(!n||r.endIndex-r.startIndex<n.endIndex-n.startIndex)&&(n=r)}),n}function Nt(e,t){let n=[];return V(e,r=>{r.type==="call_expression"&&r.startPosition.row<=t&&r.endPosition.row>=t&&n.push(r)}),n.sort((r,i)=>r.endIndex-r.startIndex-(i.endIndex-i.startIndex))}function Oe(e){return e.childForFieldName("function")??e.namedChild(0)}function ge(e){return(e.childForFieldName("arguments")??e.namedChildren.find(n=>n.type==="arguments"))?.namedChildren??[]}function rr(e,t){if(!t)return null;let n=t.text.trim();if(!/^[A-Za-z_$][\w$]*$/u.test(n))return ne(t);let r=null;return V(e.root,i=>{r||i.type!=="variable_declarator"||(i.childForFieldName("name")??i.namedChild(0))?.text.trim()!==n||(r=i.childForFieldName("value")??i.namedChild(1))}),ne(r||t)}function ir(e){let t=ne(e);return t.type==="object"?t.namedChildren.filter(n=>n.type==="pair"||n.type==="shorthand_property_identifier"):[]}function Ct(e){return e.type==="shorthand_property_identifier"?e.text:(e.childForFieldName("key")??e.namedChild(0))?.text.replace(/^['"`]|['"`]$/gu,"")??null}function It(e){return e.type==="shorthand_property_identifier"?e:e.childForFieldName("value")??e.namedChild(1)}function ne(e){let t=e;for(;["as_expression","satisfies_expression","type_assertion","parenthesized_expression"].includes(t.type)&&t.namedChildren.length>0;)t=t.namedChildren[0];return t}function ar(e,t,n){let r=new Set(e.text.match(/[A-Za-z_$][\w$]*/gu)??[]);for(let i of t)i&&r.has(i)&&n.add(i)}function wt(e){return[...new Set(e)].sort((t,n)=>t-n)}function or(e){return[...new Map(e.map(t=>[t.id,t])).values()]}function _e(e){return e.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&")}function Ae(e){return e instanceof Error?e.message:String(e)}function V(e,t){t(e);for(let n of e.namedChildren)V(n,t)}import{createHash as sr}from"crypto";function Ft(e,t){let n=new Map;for(let a of t){if(a.action!=="http.handle"||a.sourceScope!=="production")continue;let o=n.get(a.source.file)??[];o.push(a),n.set(a.source.file,o)}let r=[],i=lr(e);for(let a of i.mounts)for(let o of a.targetFiles)for(let s of n.get(o)??[]){let l=s.keyParts.find(m=>m.name==="path");if(!l||l.evidence==="expression")continue;let u=cr(a.prefix.value,l.value),c=s.keyParts.map(m=>m.name==="path"?{name:"path",value:u,evidence:"constant",term:{kind:"concat",parts:[a.prefix.term??{kind:"literal",value:a.prefix.value},l.term??{kind:"literal",value:l.value}]},derivation:{kind:"mechanically-derived",rule:"http.mount-prefix",ruleVersion:"1",inputFactIds:[s.id],sourceSpans:[s.source,{file:a.file,startLine:a.line,endLine:a.line},...a.prefix.derivation?.sourceSpans??[],...l.derivation?.sourceSpans??[]]}}:m),d=`${s.id}\0${a.file}\0${a.line}\0${u}`;r.push({...s,id:`boundary:${sr("sha256").update(d).digest("hex").slice(0,16)}`,keyParts:c,strength:"derived",evidence:"framework-mount-composition",derivation:{kind:"mechanically-derived",rule:"http.mount-prefix",ruleVersion:"1",inputFactIds:[s.id],sourceSpans:[s.source,{file:a.file,startLine:a.line,endLine:a.line}]},resolution:"unresolved"}),s.strength="candidate",s.resolution="unresolved"}return{observations:r,filesInspected:i.filesInspected,mounts:i.mounts.length}}function lr(e){let t=[],n=H(e);for(let r of n){let i=M(e,r);if(!dr(i))continue;let a=N(e,r);a&&Pt(a.root,o=>{if(o.type!=="call_expression")return;let s=o.childForFieldName("function")??o.namedChild(0);if(!s||!/\.use$/u.test(s.text.replace(/\s+/gu,"")))return;let l=pr(o);if(l.length<2)return;let u=R(a,l[0]);if(!u||u.evidence==="expression")return;let c=ur(e,r,l[1]);c.length!==0&&t.push({file:r,line:o.startPosition.row,prefix:{value:u.value,evidence:u.evidence,term:u.term,derivation:u.derivation},targetFiles:c})})}return{mounts:t,filesInspected:n.length}}function ur(e,t,n){let r=n.text.replace(/\s+/gu,""),i=/^([A-Za-z_$][\w$]*)/u.exec(r)?.[1];if(!i)return[];let a=D(e,t).find(l=>l.localName===i&&l.sourcePath);if(!a?.sourcePath)return[t];if(a.kind==="namespace")return[a.sourcePath];let o=a.importedName==="default"?i:a.importedName,s=z(e,a.sourcePath,o);return[...new Set(s.map(l=>l.relativePath))]}function cr(e,t){let n=e==="/"?"":e.replace(/\/+$/u,""),r=t.startsWith("/")?t:`/${t}`;return`${n}${r}`||"/"}function dr(e){return/(?:\bfrom\s*|\brequire\s*\(\s*)['"](?:express|fastify|hono|koa-router|@koa\/router)(?:[/']|")/u.test(e)}function pr(e){return(e.childForFieldName("arguments")??e.namedChildren.find(n=>n.type==="arguments"))?.namedChildren??[]}function Pt(e,t){t(e);for(let n of e.namedChildren)Pt(n,t)}import{createHash as mr}from"crypto";var De=new Set(["DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT"]),fr=8;function Et(e,t){let n=new Map,r=[],i=[],a=new Set,o=[],s=[];for(let l of t){if(l.action!=="http.request"||!l.owner.symbol||l.evidence!=="call-expression"&&l.evidence!=="client-adapter")continue;let u=I(e,l.owner.file).find(p=>p.symbol===l.owner.symbol);if(!u)continue;let c=N(e,u.relativePath);if(!c)continue;let d=Bt(c,u),m={definition:u,...d,constantMethods:l.keyParts.flatMap(p=>p.name==="method"&&p.evidence!=="expression"&&De.has(p.value.toUpperCase())?[p.value.toUpperCase()]:[]),depth:0,proofObservationIds:[l.id],proofSpans:[l.source]};$t(n,m)&&r.push(n.get(u.symbol))}for(;r.length>0;){let l=r.shift();if(!(l.depth>=fr))try{let u=Q(e,l.definition);s.push(...u.unresolved.map(c=>yr(l,c)));for(let c of u.sites){let d=N(e,c.file);if(!d)continue;a.add(c.file);let m=c.callNode,p=gr(l,m,d);p&&i.push(p);let f=c.caller;if(!f)continue;let y=Bt(d,f),h=vr(e,l,c),C={definition:f,pathParameterIndexes:ve([...y.pathParameterIndexes,...h.pathParameterIndexes]),methodParameterIndexes:ve([...y.methodParameterIndexes,...h.methodParameterIndexes]),constantMethods:X([...l.constantMethods,...y.constantMethods]),depth:l.depth+1,proofObservationIds:X([...l.proofObservationIds,...p?[p.id]:[]]),proofSpans:[...l.proofSpans,{file:c.file,startLine:c.startLine,endLine:c.endLine}]};$t(n,C)&&r.push(n.get(f.symbol))}}catch(u){o.push(`builtin.http-summary failed for ${l.definition.relativePath}:${l.definition.startLine+1}: ${u instanceof Error?u.message:String(u)}`)}}return{observations:i,frontiers:hr(s),summaries:n.size,filesInspected:a.size,errors:o}}function yr(e,t){let n=X([...e.pathParameterIndexes.length>0?["path"]:[],...e.methodParameterIndexes.length>0&&e.constantMethods.length!==1?["method"]:[]]),r=e.constantMethods.length===1?e.constantMethods[0]:"?",i=`${e.definition.symbol}\0${t.file}\0${t.line}\0${t.reason}`;return{observationId:`frontier:${mr("sha256").update(i).digest("hex").slice(0,16)}`,kind:"call-resolution",action:"http.request",strength:"candidate",source:{file:t.file,startLine:t.line,endLine:t.line},ownerShortName:null,address:`method=${r??"?"} path=?`,reason:`Compiler identity found a reference to ${e.definition.leaf}, but exact call recovery stopped with ${t.reason} (${t.candidates} syntax candidate(s)); HTTP value propagation did not cross this site.`,missingKeyParts:n.length>0?n:["call"],sourceScope:se(t.file)}}function hr(e){return[...new Map(e.map(t=>[t.observationId,t])).values()].sort((t,n)=>t.observationId.localeCompare(n.observationId))}function gr(e,t,n){let r=kt(t),i=e.pathParameterIndexes.flatMap(d=>{let m=R(n,r[d]);return m&&m.evidence!=="expression"&&Nr(m.value)?[{index:d,value:m}]:[]}),a=e.methodParameterIndexes.flatMap(d=>{let m=R(n,r[d]),p=m?.value.toUpperCase();return m&&p&&m.evidence!=="expression"&&De.has(p)?[{index:d,value:{...m,value:p}}]:[]}),o=X([...e.constantMethods,...a.map(d=>d.value.value)]);if(i.length!==1||o.length!==1)return null;let s=i[0].value,l=a.find(d=>d.value.value===o[0])?.value,u=[{name:"method",value:o[0],evidence:l?"constant":"literal",term:l?.term??{kind:"literal",value:o[0]},derivation:l?.derivation},{name:"path",value:s.value,evidence:"constant",term:s.term,derivation:s.derivation}],c=ye(n,t,"builtin.http-summary","http.request",u,"derived","compiler-resolved-http-summary");return c.derivation={kind:"mechanically-derived",rule:"compiler-resolved-http-summary",ruleVersion:"1",inputFactIds:e.proofObservationIds,sourceSpans:[...e.proofSpans,c.source]},c}function Bt(e,t){let n=Sr(e.root,t.startLine,t.endLine);if(!n)return{pathParameterIndexes:[],methodParameterIndexes:[],constantMethods:[]};let r=xr(n),i=new Set,a=new Set,o=new Set;return Me(n,s=>{if(s.type==="call_expression"&&((s.childForFieldName("function")??s.namedChild(0))?.text.replace(/\s+/gu,"").split(".").at(-1)??"")==="fetch"){let p=kt(s);re(p[0],r,i);let f=br(p[1],"method");if(f){re(f,r,a);let y=R(e,f),h=y?.value.toUpperCase();h&&y?.evidence!=="expression"&&De.has(h)&&o.add(h)}else re(p[1],r,a)}if(s.type!=="pair")return;let l=s.childForFieldName("key")??s.namedChild(0),u=s.childForFieldName("value")??s.namedChild(1),c=l?.text.replace(/^['"`]|['"`]$/gu,"").toLowerCase();(c==="url"||c==="path"||c==="endpoint")&&re(u,r,i),(c==="init"||c==="requestinit"||c==="options")&&re(u,r,a)}),{pathParameterIndexes:r.flatMap((s,l)=>s&&i.has(s)?[l]:[]),methodParameterIndexes:r.flatMap((s,l)=>s&&a.has(s)?[l]:[]),constantMethods:[...o].sort()}}function vr(e,t,n){let r=ee(e,n);return{pathParameterIndexes:te(r,t.pathParameterIndexes),methodParameterIndexes:te(r,t.methodParameterIndexes)}}function $t(e,t){let n=e.get(t.definition.symbol);if(!n)return e.set(t.definition.symbol,t),!0;let r=ve([...n.pathParameterIndexes,...t.pathParameterIndexes]),i=ve([...n.methodParameterIndexes,...t.methodParameterIndexes]),a=X([...n.constantMethods,...t.constantMethods]);return r.length!==n.pathParameterIndexes.length||i.length!==n.methodParameterIndexes.length||a.length!==n.constantMethods.length||t.depth<n.depth?(e.set(t.definition.symbol,{...n,pathParameterIndexes:r,methodParameterIndexes:i,constantMethods:a,depth:Math.min(n.depth,t.depth),proofObservationIds:X([...n.proofObservationIds,...t.proofObservationIds]),proofSpans:[...n.proofSpans,...t.proofSpans]}),!0):!1}function br(e,t){if(!e)return null;for(let n of e.namedChildren)if(!(n.type!=="pair"||(n.childForFieldName("key")??n.namedChild(0))?.text.replace(/^['"`]|['"`]$/gu,"").toLowerCase()!==t))return n.childForFieldName("value")??n.namedChild(1);return null}function re(e,t,n){if(!e)return;let r=new Set(e.text.match(/[A-Za-z_$][\w$]*/gu)??[]);for(let i of t)i&&r.has(i)&&n.add(i)}function xr(e){return(e.childForFieldName("parameters")??e.namedChildren.find(n=>/parameters/u.test(n.type)))?.namedChildren.map(Rt)??[]}function Rt(e){if(e.type==="identifier")return e.text;let t=e.childForFieldName("name")??e.childForFieldName("pattern");return t?Rt(t):e.namedChildren.find(n=>n.type==="identifier")?.text??null}function Sr(e,t,n){let r=null;return Me(e,i=>{!/(?:function|method|lambda)/u.test(i.type)&&i.type!=="arrow_function"||i.startPosition.row>t||i.endPosition.row<n||(!r||i.endIndex-i.startIndex<r.endIndex-r.startIndex)&&(r=i)}),r}function kt(e){return(e.childForFieldName("arguments")??e.namedChildren.find(n=>n.type==="arguments"))?.namedChildren??[]}function Nr(e){return e.startsWith("/")||/^https?:\/\//iu.test(e)}function ve(e){return[...new Set(e)].sort((t,n)=>t-n)}function X(e){return[...new Set(e)].sort()}function Me(e,t){t(e);for(let n of e.namedChildren)Me(n,t)}import{createHash as Cr}from"crypto";function Tt(e){let t=Lt(e.filter(r=>r.action==="database.read"&&r.evidence==="persistence-skip-locked-claim")),n=Lt(e.filter(r=>r.action==="database.write"&&r.evidence==="persistence-insert"));return e.flatMap(r=>r.action==="database.write"&&r.evidence==="persistence-insert"?Ve(r).flatMap(i=>{let a=t.get(i)?.[0];return a?[_t(r,a,i,"queue.send")]:[]}):r.action==="database.read"&&r.evidence==="persistence-skip-locked-claim"?Ve(r).flatMap(i=>{let a=n.get(i)?.[0];return a?[_t(r,a,i,"queue.consume")]:[]}):[])}function Lt(e){let t=new Map;for(let n of e)for(let r of Ve(n)){let i=t.get(r);i?i.push(n):t.set(r,[n])}for(let n of t.values())n.sort((r,i)=>r.id.localeCompare(i.id));return t}function Ve(e){return e.keyParts.filter(t=>t.name==="resource").map(t=>t.value)}function _t(e,t,n,r){let i=`database:${n}`,a=r==="queue.send"?"database-queue-insert":"database-queue-skip-locked-claim",o=[e.id,r,i,a].join("\0");return{...e,id:`boundary:${Cr("sha256").update(o).digest("hex").slice(0,16)}`,extractor:"builtin.database-queue",action:r,keyParts:[{name:"address",value:i,evidence:"identifier",term:{kind:"symbol",symbol:n},derivation:{kind:"mechanically-derived",rule:"database-work-queue.resource",ruleVersion:"1",inputFactIds:[e.id,t.id],sourceSpans:[e.source,t.source]}}],evidence:a,strength:"derived",protocol:"queue",role:r==="queue.send"?"producer":"consumer",derivation:{kind:"mechanically-derived",rule:"database-work-queue.insert-skip-locked",ruleVersion:"1",inputFactIds:[e.id,t.id],sourceSpans:[e.source,t.source]},valuePrecision:"symbolic",resolution:"unresolved"}}var ze="runtime-boundaries-v15",Se=[{id:"http.method-path",protocol:"http",producerActions:["http.request"],consumerActions:["http.handle"],keyNames:["method","path"],traversable:!0},{id:"registry.identity-key",protocol:"registry",producerActions:["registry.dispatch"],consumerActions:["registry.handle"],keyNames:["registry","key"],traversable:!0},{id:"registry.capability-key",protocol:"registry",producerActions:["registry.reference"],consumerActions:["registry.handle"],keyNames:["key"],traversable:!0,requireUniqueConsumer:!0},{id:"queue.address",protocol:"queue",producerActions:["queue.send"],consumerActions:["queue.consume"],keyNames:["address"],traversable:!0},{id:"carrier.discriminator",protocol:"carrier",producerActions:["carrier.publish"],consumerActions:["carrier.consume"],keyNames:["carrier","field","value"],traversable:!0},{id:"resource.identity",protocol:"database",producerActions:["database.write"],consumerActions:["database.read"],keyNames:["resource"],traversable:!1},{id:"framework.effect-httpapi-operation",protocol:"framework",producerActions:[],consumerActions:["framework.handle"],declarationActions:["framework.declare"],keyNames:["adapter","group","operation"],traversable:!0,linkFrom:"declaration",requireUniquePair:!0}],Ir=64;function wr(e,t={}){let n=H(e),r=new Set(n),i=new Set((t.affectedFiles??[]).map($r)),a=t.previousGraph?.fileCoverage,o=i.size>0&&t.previousGraph?.extractorVersion===ze&&a!==void 0&&a.length===t.previousGraph.coverage.filesScanned,s=o?a.filter(g=>r.has(g.file)&&!i.has(g.file)):[],l=new Set(s.flatMap(g=>g.observationIds)),u=o?t.previousGraph.observations.filter(g=>l.has(g.id)&&r.has(g.source.file)):[],c=o?n.filter(g=>i.has(g)):n,d=[],m=a?.reduce((g,Ne)=>g+Ne.observationIds.length,0)??0,p=performance.now(),f=Fr(e,c);U(d,"direct-extraction",p,c.length,f.observations.length,{filesVisited:c.length,filesReused:s.length,factsReused:u.length,factsInvalidated:Math.max(0,m-u.length)});let y=[...s,...f.fileCoverage].sort((g,Ne)=>g.file.localeCompare(Ne.file)),h=Br(y),C=y.flatMap(g=>g.extractionErrors),P=ie([...u,...f.observations]),O=ie([...P,...Tt(P)]);p=performance.now();let v=Et(e,O);U(d,"http-summary",p,O.length,v.observations.length,{filesVisited:v.filesInspected}),h.set("builtin.wrapper",{id:"builtin.wrapper",applicableFiles:v.filesInspected,observations:v.observations.length,errors:v.errors.length}),C.push(...v.errors);let w=ie([...O,...v.observations]);p=performance.now();let L=Ft(e,w);U(d,"http-mount",p,w.length,L.observations.length,{filesVisited:L.filesInspected});let A=ie([...w,...L.observations]);p=performance.now();let b=vt(e,A);U(d,"carrier",p,A.length,b.observations.length,{filesVisited:b.filesInspected}),h.set("builtin.carrier",{id:"builtin.carrier",applicableFiles:b.bodySummaries,observations:b.observations.length,errors:b.errors.length}),C.push(...b.errors);let F=ie([...A,...b.observations]);p=performance.now();let x=Er(F);U(d,"relations",p,F.length,x.length),p=performance.now();let je=kr(F,x);U(d,"links",p,x.length,je.length),Lr(F,x),p=performance.now();let qe=Or([..._r(F,x),...v.frontiers]);return U(d,"frontiers",p,F.length,qe.length),{schemaVersion:2,extractorVersion:ze,observations:F,relationGroups:x,links:je,frontiers:qe,coverage:{filesScanned:n.length,filesWithAst:y.filter(g=>g.hasAst).length,filesWithoutAst:y.filter(g=>!g.hasAst).length,...o?{filesReused:s.length}:{},extractors:[...h.values()],extractionErrors:C,phases:d},fileCoverage:y}}function U(e,t,n,r,i,a={}){e.push({id:t,durationMs:Math.max(0,performance.now()-n),inputFacts:r,outputFacts:i,...a})}function Fr(e,t){let n=[],r=[];for(let i of t){let a=M(e,i),o=ke.filter(u=>u.supports(a)),s=o.length>0?N(e,i):null,l={file:i,hasAst:s!==null||Pr(i,a),observationIds:[],extractors:[],extractionErrors:[]};if(s)for(let u of o){let c={id:u.id,applicableFiles:1,observations:0,errors:0};try{let d=u.extract(s);c.observations=d.length,n.push(...d),l.observationIds.push(...d.map(m=>m.id))}catch(d){c.errors=1,l.extractionErrors.push(`${u.id} failed for ${i}: ${d instanceof Error?d.message:String(d)}`)}l.extractors.push(c)}r.push(l)}return{observations:n,fileCoverage:r}}function Pr(e,t){return t?Ge(e)?/<script\b/iu.test(t):He(e)!==null:!1}function Br(e){let t=new Map(ke.map(n=>[n.id,{id:n.id,applicableFiles:0,observations:0,errors:0}]));for(let n of e)for(let r of n.extractors){let i=t.get(r.id);i&&(i.applicableFiles+=r.applicableFiles,i.observations+=r.observations,i.errors+=r.errors)}return t}function $r(e){return e.replaceAll("\\","/").replace(/^\.\//u,"")}function Er(e){let t=new Map;for(let n of Se){let r=new Set([...n.producerActions,...n.consumerActions,...n.declarationActions??[]]);for(let i of e){if(!r.has(i.action)||i.strength==="candidate")continue;let a=Ar(i,n.keyNames);if(!a)continue;let o=a.map(d=>`${d.name}=${Dt(d.name,d.value)}`).join("\0"),s=i.sourceScope==="production"?"production":i.sourceScope,l=`${n.id}\0${s}\0${o}`,u=`boundary-group:${Ot("sha256").update(l).digest("hex").slice(0,16)}`,c=t.get(u)??{id:u,protocol:n.protocol,joinRule:n.id,normalizedKey:o,keyParts:a,producerIds:[],consumerIds:[],declarationIds:[],derivation:{kind:"mechanically-derived",rule:n.id,ruleVersion:"2",inputFactIds:[],sourceSpans:[]}};n.producerActions.includes(i.action)&&c.producerIds.push(i.id),n.consumerActions.includes(i.action)&&c.consumerIds.push(i.id),n.declarationActions?.includes(i.action)&&c.declarationIds.push(i.id),c.derivation.inputFactIds.push(i.id),c.derivation.sourceSpans.push(i.source),t.set(u,c)}}return[...t.values()].map(Rr).sort(Mr)}function Rr(e){return{...e,producerIds:be(e.producerIds),consumerIds:be(e.consumerIds),declarationIds:be(e.declarationIds),derivation:{...e.derivation,inputFactIds:be(e.derivation.inputFactIds),sourceSpans:[...new Map(e.derivation.sourceSpans.map(t=>[`${t.file}:${t.startLine}:${t.endLine}`,t])).values()]}}}function kr(e,t){let n=new Map(e.map(i=>[i.id,i])),r=new Map;for(let i of t){let a=Se.find(s=>s.id===i.joinRule);if(!a?.traversable)continue;let o=a.linkFrom==="declaration"?i.declarationIds:i.producerIds;if(!(o.length===0||i.consumerIds.length===0)&&!(a.requireUniquePair&&(o.length!==1||i.consumerIds.length!==1))&&!(a.requireUniqueConsumer&&i.consumerIds.length!==1)&&!(o.length*i.consumerIds.length>Ir))for(let s of o)for(let l of i.consumerIds){let u=n.get(s),c=n.get(l);if(!u||!c||Dr(u,c))continue;let d=u.strength==="derived"||c.strength==="derived"?"derived":"exact",m=`${i.joinRule}\0${s}\0${l}`,p={id:`boundary-link:${Ot("sha256").update(m).digest("hex").slice(0,16)}`,from:s,to:l,joinRule:i.joinRule,matchedKeyParts:i.keyParts,strength:d,derivation:{kind:"mechanically-derived",rule:i.joinRule,ruleVersion:"2",inputFactIds:[s,l],sourceSpans:[u.source,c.source]}};r.set(p.id,p)}}return[...r.values()].sort(Vr)}function Lr(e,t){let n=new Set(t.filter(At).flatMap(xe)),r=new Set(t.filter(Tr).flatMap(xe));for(let i of e)i.resolution=n.has(i.id)?"locally-linked":r.has(i.id)?"ambiguous":"unresolved"}function _r(e,t){let n=new Set(e.filter(a=>a.strength!=="candidate").map(a=>`${a.action}\0${a.source.file}\0${a.source.startLine}\0${a.source.endLine}`)),r=new Set(t.flatMap(xe)),i=new Set(t.filter(At).flatMap(xe));return e.filter(a=>a.sourceScope==="production").filter(a=>a.strength!=="candidate"||!n.has(`${a.action}\0${a.source.file}\0${a.source.startLine}\0${a.source.endLine}`)).filter(a=>!i.has(a.id)).map(a=>{let o=a.keyParts.filter(l=>l.evidence==="expression"||l.value.length===0).map(l=>l.name),s=o.length>0?`${a.extractor} observed ${a.action}, but ${o.join(", ")} remained symbolic or unknown.`:a.resolution==="ambiguous"?`${a.extractor} established the address for ${a.action}, but more than one indexed peer has the same runtime key.`:r.has(a.id)?`${a.extractor} established the address for ${a.action}, but the indexed production scope contains no counterpart role in that relation group.`:`${a.extractor} observed ${a.action}, but no supported factorization rule could establish its addressed relation.`;return{observationId:a.id,reason:s,missingKeyParts:o,sourceScope:a.sourceScope}}).sort((a,o)=>a.observationId.localeCompare(o.observationId))}function xe(e){return[...e.producerIds,...e.consumerIds,...e.declarationIds]}function At(e){let t=Se.find(r=>r.id===e.joinRule);if(!t)return!1;let n=t.linkFrom==="declaration"?e.declarationIds:e.producerIds;return n.length===0||e.consumerIds.length===0?!1:!t.requireUniquePair||n.length===1&&e.consumerIds.length===1}function Tr(e){let t=Se.find(r=>r.id===e.joinRule);if(!t?.requireUniquePair)return!1;let n=t.linkFrom==="declaration"?e.declarationIds:e.producerIds;return n.length>0&&e.consumerIds.length>0&&(n.length!==1||e.consumerIds.length!==1)}function Or(e){return[...new Map(e.map(t=>[t.observationId,t])).values()].sort((t,n)=>t.observationId.localeCompare(n.observationId))}function Ar(e,t){let n=[];for(let r of t){let i=e.keyParts.find(a=>a.name===r);if(!i||i.evidence==="expression"||i.value.length===0)return null;n.push({...i,value:Dt(r,i.value)})}return n}function Dt(e,t){if(e==="method")return t.toUpperCase();if(e!=="path")return t;let n=t.startsWith("/")?t:`/${t}`;return n.length>1?n.replace(/\/+$/u,""):n}function Dr(e,t){return e.source.file===t.source.file&&e.source.startLine===t.source.startLine}function ie(e){return[...new Map(e.map(t=>[t.id,t])).values()].sort((t,n)=>t.source.file.localeCompare(n.source.file)||t.source.startLine-n.source.startLine||t.action.localeCompare(n.action))}function be(e){return[...new Set(e)].sort()}function Mr(e,t){return e.joinRule.localeCompare(t.joinRule)||e.normalizedKey.localeCompare(t.normalizedKey)}function Vr(e,t){return e.joinRule.localeCompare(t.joinRule)||e.from.localeCompare(t.from)||e.to.localeCompare(t.to)}export{se as a,R as b,Q as c,ee as d,ze as e,wr as f,Vt as g,zt as h,Ye as i};
|
|
49
|
+
//# sourceMappingURL=chunk-U24M5RQM.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{c as p}from"./chunk-NK76RSB6.js";import{a as y}from"./chunk-OJFLPVBP.js";import{a as h}from"./chunk-57KEZDPT.js";import{o as u}from"./chunk-BH5CE4LN.js";import{a as S,c as b}from"./chunk-3XFJUWJE.js";import{A as d,d as m}from"./chunk-AM5SUGHF.js";function x(e,o,r={}){let{direction:c="backward",maxDepth:s=3}=r,l=S(e,o);return l?c==="backward"?k(e,l,s,{semantic:r.semantic!==!1}):D(e,l,{semantic:r.semantic!==!1}):null}function j(e,o,r={}){return x(e,o,r)}function k(e,o,r,c){let s=[],l=new Set([o.symbol]),t=[o];for(let n=1;n<=r&&t.length!==0;n++){let i=[];for(let g of t){let w=h(e,g,{semantic:c.semantic,semanticEvidence:y});for(let a of w){if(l.has(a.symbol))continue;l.add(a.symbol),s.push({symbol:a.symbol,shortName:m(a.symbol),file:a.file,relationship:n===1?"referenced within definition (callee)":`depth ${n} callee`});let f=b(e,a.symbol);f&&!e.isIgnored(f.relativePath)&&i.push(f)}}t=i}return{symbol:o.symbol,shortName:m(o.symbol),direction:"backward",connectedSymbols:s}}function D(e,o,r){let c=new Set,s=[],l=new p(e);for(let t of u(e,o,{semantic:r.semantic,semanticEvidence:y})){if(s.length>=30)break;let n=t.enclosingSymbol??d(l.definitionsForFile(t.file),t.line)?.symbol??null;if(!n||n===o.symbol)continue;let i=b(e,n);!i||e.isIgnored(i.relativePath)||c.has(i.symbol)||(c.add(i.symbol),s.push({symbol:i.symbol,shortName:m(i.symbol),file:i.relativePath,relationship:`references target at ${t.file}:${t.line+1}`}))}return s.sort((t,n)=>t.file.localeCompare(n.file)),{symbol:o.symbol,shortName:m(o.symbol),direction:"forward",connectedSymbols:s}}export{x as a,j as b};
|
|
2
|
+
//# sourceMappingURL=chunk-U2XX3BT4.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as j}from"./chunk-MOVBWNIP.js";import{d as D}from"./chunk-FETNQCFO.js";var y=["execution","runtime","dataflow","state","temporal","contract","identity","ownership","dependencies"];import{createHash as ie}from"crypto";var Q=[{id:"general-interprocedural-value-flow",families:["dataflow"],capability:"Whole-program definition-use flow through arbitrary calls and returns is unavailable.",consequence:"Missing dataflow edges cannot establish that a value never crosses an unmodeled call.",recoverWith:["value-flow","dependence-slice","inspect","code"]},{id:"heap-aliasing",families:["dataflow","state"],capability:"Heap points-to and cross-instance alias analysis are unavailable.",consequence:"Missing field or state edges cannot establish that two references never reach the same object.",recoverWith:["value-flow","dependence-slice","inspect","code"]},{id:"exceptional-flow",families:["execution","dataflow","temporal"],capability:"Interprocedural exception propagation and finally completion flow are unavailable.",consequence:"Normal-path reachability and ordering do not establish behavior after a throw or rejection.",recoverWith:["dependence-slice","inspect","code"]},{id:"reflection",families:["execution","runtime","identity","dependencies"],capability:"Reflective lookup, dynamic loading, and name-computed invocation are unavailable without exact evidence.",consequence:"Missing static edges cannot establish that a construct is unreachable through reflection.",recoverWith:["search","inspect","code"]},{id:"generated-dispatch",families:["execution","runtime","identity"],capability:"Dispatch tables or names created only by generated or unavailable source are unavailable.",consequence:"Missing dispatch edges cannot establish that no generated consumer exists.",recoverWith:["search","inspect","code"]},{id:"unsupported-framework-adapters",families:["runtime","dataflow","state","temporal"],capability:"Framework runtime crossings without a registered source adapter are unavailable.",consequence:"Missing boundary edges cannot establish that no producer, consumer, state effect, or ordering exists.",recoverWith:["search","inspect","code"]}];function Z(e){let t=new Set(e);return Q.filter(n=>n.families.some(a=>t.has(a)))}function $(e){return Z(e).map(t=>`[${t.id}] ${t.capability} ${t.consequence} Recover selected paths with: ${t.recoverWith.map(n=>`codebaseiq ${n}`).join(", ")}.`)}var ee=["incoming","outgoing","both"];function h(e,t,n,a={}){return{family:e,subtype:t,...a.match?{match:a.match}:{},directions:ee,evidenceStrengths:a.strengths??["exact","derived","mixed"],supportCeiling:a.supportCeiling??"partial",establishes:n,nonClaims:a.nonClaims??[],recoverWith:a.recoverWith??["inspect","code"]}}var te=["predicate-consequence","predicate-alternative","predicate-fallthrough","predicate-case","predicate-default","predicate-return","predicate-throw","loop-iteration","loop-exit","exception-handler","finally-cleanup","handler-return","handler-throw"],ne=["captured-value-to-state","constant-to-state","expression-to-state","property-to-state","return-to-state","value-to-state"],re=["await-completion-before","awaits-completion","inside-lock-scope","lexical-successor"],oe=[{id:"indexed-program-identity",label:"SCIP/compiler identity and source ownership",requirements:["indexed-graph"],relations:[h("execution","call","The source construct may call the resolved target.",{nonClaims:["Static may-call reachability does not prove that an invocation occurred at runtime."],recoverWith:["call-graph","inspect","code"]}),h("execution","result-callback","The referenced callable can produce the result consumed by this path.",{nonClaims:["A callback relationship does not prove invocation order or runtime selection."],recoverWith:["call-graph","inspect","code"]}),h("contract","uses-contract-symbol","The source construct refers to the identified contract symbol.",{supportCeiling:"exact",nonClaims:["Contract identity does not prove runtime invocation or behavioral conformance."],recoverWith:["hierarchy","inspect","code"]}),h("identity","references","The occurrence resolves to the identified compiler-owned symbol.",{supportCeiling:"exact",nonClaims:["A reference does not establish execution or value transfer."],recoverWith:["refs","trace","inspect"]}),h("ownership","contains","The owner contains the identified program construct.",{supportCeiling:"exact",nonClaims:["Structural containment does not establish runtime lifetime or sharing scope."],recoverWith:["outline","inspect"]}),h("ownership","contains-","The owner contains the identified program construct.",{match:"prefix",supportCeiling:"exact",nonClaims:["Structural containment does not establish runtime lifetime or sharing scope."],recoverWith:["outline","inspect"]}),h("ownership","owns-","The owner owns the identified source or runtime observation.",{match:"prefix",supportCeiling:"exact",nonClaims:["Observation ownership does not establish singleton lifetime or exclusive ownership."],recoverWith:["inspect","code"]}),h("dependencies","imports","The source file or module statically imports the indexed target.",{nonClaims:["An import does not establish that imported code executes."],recoverWith:["imports","deps","code"]}),h("dependencies","imports-external","The source region statically imports an external package.",{nonClaims:["An external import does not establish which package behavior executes."],recoverWith:["imports","code"]})]},{id:"runtime-boundary-join",label:"source-grounded runtime-boundary joins",requirements:["indexed-graph","source-facts"],relations:[h("runtime","runtime-handoff","A producer and consumer share a source-grounded runtime rendezvous.",{strengths:["exact","derived","candidate","mixed"],nonClaims:["A candidate or unresolved join does not prove a runtime handoff."],recoverWith:["evidence","inspect","code"]}),h("runtime","discriminator-dispatch","A serialized discriminator selects the reported consumer.",{strengths:["exact","derived","mixed"],nonClaims:["The dispatch edge does not prove delivery, retry, or successful handling."],recoverWith:["evidence","inspect","code"]}),h("dataflow","serialized-discriminator-transfer","The producer serializes the discriminator consumed by dispatch.",{strengths:["exact","derived","mixed"],nonClaims:["This edge does not establish the flow of every payload field."],recoverWith:["value-flow","inspect","code"]}),h("temporal","enqueue-before-consume","The reported enqueue precedes a possible consume through the queue.",{strengths:["exact","derived","mixed"],nonClaims:["Queue order does not establish delivery time, uniqueness, retry count, or durability."],recoverWith:["evidence","inspect","code"]})]},{id:"parser-control-dependence",label:"parser-proved intraprocedural control dependence",requirements:["indexed-graph","source-facts"],relations:[...te.map(e=>h("execution",e,"The outcome is control-dependent on the reported predicate or handler.",{strengths:["exact"],nonClaims:["Local control dependence does not establish that the containing function executes."],recoverWith:["dependence-slice","inspect","code"]})),h("execution","returns","The selected construct contains the reported return terminal.",{strengths:["exact"],nonClaims:["A local return terminal does not establish that the containing callable executes."],recoverWith:["inspect","code"]}),h("execution","throws","The selected construct contains the reported throw terminal.",{strengths:["exact"],nonClaims:["A local throw terminal does not establish propagation, handling, or callable execution."],recoverWith:["inspect","code"]})]},{id:"bounded-static-value-flow",label:"compiler callsites and bounded static value evaluation",requirements:["indexed-graph","source-facts"],relations:[...["argument-to-parameter","constant-to-parameter","property-to-parameter","return-to-parameter","return-to-call-result"].map(e=>h("dataflow",e,"The reported value may reach the target through the evidenced callsite transfer.",{strengths:["exact","derived","mixed"],nonClaims:["This provider does not establish general local definition-use, alias, field, or heap flow."],recoverWith:["value-flow","dependence-slice","inspect","code"]}))]},{id:"typescript-local-dependence",label:"TypeScript compiler identities, control-flow graph, and reaching definitions",requirements:["typescript-semantic"],relations:[h("dataflow","definition-to-use","The definition reaches the reported read on a feasible local control-flow path.",{strengths:["exact"],nonClaims:["Local reaching definitions do not establish heap aliasing, exceptional flow, or the runtime order of closure invocation."],recoverWith:["value-flow","dependence-slice","inspect","code"]}),h("dataflow","value-to-definition","The reported right-hand-side read supplies the assigned local definition.",{strengths:["exact"],nonClaims:["A local assignment edge does not establish field or heap points-to flow."],recoverWith:["value-flow","dependence-slice","inspect","code"]}),h("dataflow","closure-capture","The nested callable reads the reported binding from an enclosing callable.",{strengths:["candidate"],supportCeiling:"candidate",nonClaims:["Closure capture does not establish whether or when the nested callable executes."],recoverWith:["call-graph","inspect","code"]}),h("dataflow","field-definition-to-use","The reported same-owner field definition can reach the field read.",{strengths:["exact","candidate"],nonClaims:["Field-name identity does not establish whole-program heap aliasing or cross-instance flow."],recoverWith:["value-flow","dependence-slice","inspect","code"]}),h("execution","control-dependence","Execution of the reported statement depends on the outcome of the predicate.",{strengths:["exact"],nonClaims:["Intraprocedural control dependence does not establish that the containing callable executes."],recoverWith:["dependence-slice","inspect","code"]})]},{id:"parser-state-temporal",label:"parser-proved local state and temporal facts",requirements:["indexed-graph","source-facts"],relations:[...ne.map(e=>h("dataflow",e,"The reported source value is assigned into the identified state resource.",{strengths:["exact"],nonClaims:["The edge does not establish alias, heap, or later read flow."],recoverWith:["value-flow","inspect","code"]})),...["writes-resource","deletes-resource","reads-resource","enqueues-resource","consumes-resource"].map(e=>h("state",e,"The reported construct performs the named operation on the identified resource.",{strengths:["exact"],nonClaims:["A state operation does not establish transactionality, durability, or exclusive ownership."],recoverWith:["evidence","inspect","code"]})),...re.map(e=>h("temporal",e,"The reported source constructs have the named local ordering relationship.",{strengths:["exact"],nonClaims:["Local source order does not establish cross-process happens-before or durable completion."],recoverWith:["evidence","inspect","code"]}))]}];function q(e,t){let n=oe.flatMap(a=>a.relations.filter(r=>r.family===e&&(r.match==="prefix"?t.startsWith(r.subtype):t===r.subtype)).map(r=>({provider:a,relation:r})));if(n.length>1)throw new Error(`Ambiguous graph relation provider for ${e}/${t}: ${n.map(a=>a.provider.id).join(", ")}`);return n[0]??null}var Ne=["causal","structure","complete"],ae={causal:["execution","runtime","dataflow","state","temporal"],structure:["contract","identity","ownership","dependencies"],complete:y},se=2,ce=48,k=64,de=5e4;function We(e,t,n={}){let a=E([...t.symbols??[],...t.locations??[]]),r=E(t.searches??[]);if(a.length===0&&r.length===0)throw new Error("evidence requires at least one positional symbol, --symbol, --at, or --search selector.");let o=n.view??"causal",i=le(n.families,o),s=n.direction??"both",u=E(n.subtypes??[]),l=n.connecting??!1,c=n.inventoryOnly??!1,p=E(n.foldIds??[]),g=n.maxDepth??se,f=n.maxEdges??ce;if(!Number.isSafeInteger(g)||g<0)throw new RangeError(`Evidence depth must be a non-negative safe integer; received ${g}.`);if(!Number.isSafeInteger(f)||f<=0)throw new RangeError(`Evidence max edges must be a positive safe integer; received ${f}.`);if(!["incoming","outgoing","both"].includes(s))throw new Error(`Unsupported graph evidence direction: ${s}.`);if(c&&p.length>0)throw new Error("Evidence fold materialization cannot be combined with --inventory-only.");let m=j(e,{symbols:a,searches:r,maxDepth:g,maxTopologyCharacters:de,relations:pe(i)}),R=new Map(m.nodes.map(d=>[d.id,d])),b=m.edges.filter(d=>d.disposition==="emitted"||d.disposition==="folded").flatMap(d=>ue(d,R)),v=b.filter(d=>i.includes(d.family)).filter(d=>u.length===0||u.includes(d.subtype)),x=new Set(m.anchors.flatMap(d=>d.nodeIds));if(l&&x.size<2)throw new Error("Connecting evidence requires at least two resolved root nodes.");let S=new Set(v.map(d=>d.id)),_=A(b,x,"incoming").filter(d=>S.has(d.id)),F=A(b,x,"outgoing").filter(d=>S.has(d.id)),O=A(b,x,"both").filter(d=>S.has(d.id)),B=ve(i,u,_,F,O),M=s==="incoming"?_:s==="outgoing"?F:O,N=l?Re(M,[...x],s):M,z=Ce(N,x,s),w=[...N].sort((d,X)=>Te(d,X,z)),W=ye(w,f),Y=be(W,p),G=c?[]:p.length>0?w.filter(d=>Y.has(d.id)):w,C=p.length>0?G:G.slice(0,f),K=p.length>0||c?[]:W,T=Math.max(0,G.length-C.length),J=m.frontiers.filter(d=>d.disposition==="unsupported").length,I=m.coverage.status==="incomplete"?"incomplete":T>0?"bounded":"accounted";return{kind:"graph",view:n.families&&n.families.length>0?"custom":o,families:i,selection:{direction:s,subtypes:u,connecting:l,inventoryOnly:c,foldIds:p},targets:m.anchors.map(d=>({kind:d.kind,query:d.query,status:d.status,nodeIds:[...d.nodeIds],omittedCandidates:d.omittedCandidates})),inventory:B,edges:C,folds:K,coverage:{status:I,topologyStatus:m.coverage.status,scope:m.coverage.scope,maxDepth:g,maxEdges:f,matchedEdges:w.length,eligibleEdges:G.length,returnedEdges:C.length,omittedEdges:T,frontierGroups:m.frontiers.length,unsupportedFrontiers:J,blindSpots:E([...m.coverage.blindSpots,...$(i)]),explanation:c?`${w.length} relationship(s) match the explicit projection; only exact inventory counts were requested.`:p.length>0?`Every relationship in ${p.length} explicitly selected recoverable fold(s) was emitted.`:I==="accounted"?"Every selected relationship in the bounded topology was emitted.":I==="bounded"?`${T} selected relationship(s) were withheld by the explicit edge budget.`:m.coverage.explanation}}}function le(e,t){let n=e&&e.length>0?e:ae[t],a=n.filter(r=>!y.includes(r));if(a.length>0)throw new Error(`Unsupported graph evidence family: ${a.join(", ")}.`);return E(n)}function pe(e){return["call","contract-symbol","import","reference","runtime-boundary"]}function ue(e,t){let n=t.get(e.fromNodeId),a=t.get(e.toNodeId);return!n||!a?[]:(e.semantics??[]).flatMap((r,o)=>{let i=ge(r);if(!i)return[];let s=q(i,r.subtype);if(!s)throw new Error(`No graph relation provider contract is registered for ${i}/${r.subtype}.`);let u=fe(e);if(!s.relation.evidenceStrengths.includes(u))throw new Error(`Graph relation provider ${s.provider.id} does not admit ${u} evidence for ${i}/${r.subtype}.`);return[{id:`${e.id}:${o}:${i}`,family:i,semanticFamily:r.family,subtype:r.subtype,from:L(n),to:L(a),sourceKind:e.kind,providerId:s.provider.id,supportCeiling:s.relation.supportCeiling,establishes:s.relation.establishes,nonClaims:[...s.relation.nonClaims],recoverWith:[...s.relation.recoverWith],evidenceStrength:u,evidenceMethods:E(e.evidence.map(l=>l.method)),evidenceConstituents:he(e.evidence),context:r.context?{...r.context}:null,attributes:r.attributes?{...r.attributes}:null}]})}function he(e){let t=new Map;for(let n of e)t.set(`${n.method}\0${n.strength}`,n);return[...t.values()].map(({method:n,strength:a})=>({method:n,strength:a}))}function ge(e){switch(e.family){case"control":return e.context?.crossesRuntimeBoundary===!0||e.subtype==="runtime-handoff"?"runtime":"execution";case"data":return"dataflow";case"state":return"state";case"temporal":return"temporal";case"contract":return"contract";case"identity":return e.subtype.startsWith("contains")||e.subtype.startsWith("owns-")?"ownership":e.subtype.startsWith("import")?"dependencies":"identity"}}function L(e){let t=me(e);return{id:e.id,kind:e.kind,label:t?D(t):e.label,symbol:t,location:e.location?{...e.location}:null}}function me(e){return e.kind!=="symbol"||!e.id.startsWith("symbol:")?null:decodeURIComponent(e.id.slice(7))}function fe(e){let t=E(e.evidence.map(n=>n.strength));return t.length===1?t[0]:t.includes("exact")&&t.every(n=>n==="exact"||n==="derived")?"mixed":t.includes("candidate")?"candidate":t.includes("unknown")||t.length===0?"unknown":"mixed"}function A(e,t,n){let a=P(e,n),r=new Map,o=new Map,i=[...t].sort();for(let s of i)o.set(s,0);for(let s=0;s<i.length;s+=1){let u=i[s],l=o.get(u);for(let c of a.get(u)??[])r.set(c.edge.id,c.edge),!o.has(c.next)&&(o.set(c.next,l+1),i.push(c.next))}return[...r.values()]}function P(e,t){let n=new Map,a=(r,o,i)=>{let s=n.get(r)??[];s.push({edge:i,next:o}),n.set(r,s)};for(let r of e)t!=="incoming"&&a(r.from.id,r.to.id,r),t!=="outgoing"&&a(r.to.id,r.from.id,r);for(let r of n.values())r.sort((o,i)=>o.edge.id.localeCompare(i.edge.id)||o.next.localeCompare(i.next));return n}function ve(e,t,n,a,r){let o=new Set;for(let c of[...n,...a,...r])o.add(`${c.family}\0${c.subtype}`);if(t.length>0)for(let c of e)for(let p of t)o.add(`${c}\0${p}`);let i=c=>{let p=new Map;for(let g of c){let f=`${g.family}\0${g.subtype}`;p.set(f,(p.get(f)??0)+1)}return p},s=i(n),u=i(a),l=i(r);return[...o].map(c=>{let[p,g]=c.split("\0");return{family:p,subtype:g,incoming:s.get(c)??0,outgoing:u.get(c)??0,both:l.get(c)??0}}).sort((c,p)=>y.indexOf(c.family)-y.indexOf(p.family)||c.subtype.localeCompare(p.subtype))}function ye(e,t){let n=e.slice(t),a=new Map;for(let i of n){let s=Ee(i),u=`${i.family}\0${s}`,l=a.get(u)??[];l.push(i),a.set(u,l)}let r=new Map(e.map((i,s)=>[i.id,s+1])),o=[];for(let[i,s]of[...a].sort(([u],[l])=>u.localeCompare(l))){let[u,l]=i.split("\0"),c=[...s].sort((p,g)=>p.id.localeCompare(g.id));for(let p=0;p<c.length;p+=k){let g=c.slice(p,p+k),f=g.map(v=>v.id),m=E(g.map(v=>v.subtype)).sort(),R=m.length===1?m[0]:"mixed",b=[...new Set(g.flatMap(v=>[v.from.id,v.to.id]))].sort();o.push({id:Ge(u,m.join("\0"),f),mode:xe(g),family:u,subtype:R,subtypes:m,region:l,edgeCount:f.length,edgeIds:f,nodeIds:b,minimumMaxEdges:Math.max(...f.map(v=>r.get(v)??e.length))})}}return o.sort((i,s)=>y.indexOf(i.family)-y.indexOf(s.family)||(i.region??"").localeCompare(s.region??"")||i.id.localeCompare(s.id))}function Ee(e){let t=e.from.location?.file??`kind:${e.from.kind}`,n=e.to.location?.file??`kind:${e.to.kind}`;return t===n?t:`${t} -> ${n}`}function be(e,t){if(t.length===0)return new Set;let n=new Map(e.map(r=>[r.id,r])),a=t.filter(r=>!n.has(r));if(a.length>0){let r=e.map(o=>o.id).sort();throw new Error(`Unknown evidence fold ${a.join(", ")} for this projection. Available folds: ${r.join(", ")||"(none)"}.`)}return new Set(t.flatMap(r=>n.get(r).edgeIds))}function xe(e){let t=new Map,n=new Map,a=new Set;for(let o of e){a.add(o.from.id),a.add(o.to.id);let i=t.get(o.from.id)??new Set;i.add(o.to.id),t.set(o.from.id,i);let s=n.get(o.to.id)??new Set;s.add(o.from.id),n.set(o.to.id,s)}return we(a,t)?"scc":[...a].every(o=>(n.get(o)?.size??0)<=1&&(t.get(o)?.size??0)<=1)?"linear":"topology"}function we(e,t){let n=new Set,a=new Set,r=o=>{if(n.has(o))return!0;if(a.has(o))return!1;n.add(o);for(let i of t.get(o)??[])if(r(i))return!0;return n.delete(o),a.add(o),!1};return[...e].some(r)}function Ge(e,t,n){return`fold:${ie("sha256").update([e,t,...n].join("\0")).digest("hex").slice(0,16)}`}function Re(e,t,n){let a=new Map,r=[...new Set(t)].sort();for(let o=0;o<r.length;o+=1)for(let i=o+1;i<r.length;i+=1)for(let s of Se(e,r[o],r[i],n))a.set(s.id,s);return[...a.values()]}function Se(e,t,n,a){let r=P(e,a),o=new Map([[t,0]]),i=new Map,s=[t];for(let l=0;l<s.length;l+=1){let c=s[l],p=o.get(c);if(c!==n)for(let g of r.get(c)??[])o.has(g.next)||(o.set(g.next,p+1),i.set(g.next,{node:c,edge:g.edge}),s.push(g.next))}if(!o.has(n))return[];let u=[];for(let l=n;l!==t;){let c=i.get(l);if(!c)return[];u.push(c.edge),l=c.node}return u.reverse()}function Ce(e,t,n){let a=P(e,n),r=new Map,o=[...t];for(let i of t)r.set(i,0);for(let i=0;i<o.length;i+=1){let s=o[i],u=r.get(s);for(let{next:l}of a.get(s)??[])r.has(l)||(r.set(l,u+1),o.push(l))}return r}function Te(e,t,n){return H(e,n)-H(t,n)||U(e)-U(t)||V(e.evidenceStrength)-V(t.evidenceStrength)||y.indexOf(e.family)-y.indexOf(t.family)||e.from.label.localeCompare(t.from.label)||e.to.label.localeCompare(t.to.label)||e.subtype.localeCompare(t.subtype)||e.id.localeCompare(t.id)}function H(e,t){return Math.min(t.get(e.from.id)??Number.MAX_SAFE_INTEGER,t.get(e.to.id)??Number.MAX_SAFE_INTEGER)}function U(e){let t=[e.from,e.to].filter(n=>n.kind==="structural-region").length;return t===2?2:t}function V(e){switch(e){case"exact":return 0;case"mixed":return 1;case"derived":return 2;case"candidate":return 3;case"unknown":return 4}}function E(e){return[...new Set(e.map(t=>t.trim()).filter(Boolean))]}export{y as a,Ne as b,We as c};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as j}from"./chunk-DKJXK3HA.js";import{d as D}from"./chunk-AM5SUGHF.js";var y=["execution","runtime","dataflow","state","temporal","contract","identity","ownership","dependencies"];import{createHash as ie}from"crypto";var Q=[{id:"general-interprocedural-value-flow",families:["dataflow"],capability:"Whole-program definition-use flow through arbitrary calls and returns is unavailable.",consequence:"Missing dataflow edges cannot establish that a value never crosses an unmodeled call.",recoverWith:["value-flow","dependence-slice","inspect","code"]},{id:"heap-aliasing",families:["dataflow","state"],capability:"Heap points-to and cross-instance alias analysis are unavailable.",consequence:"Missing field or state edges cannot establish that two references never reach the same object.",recoverWith:["value-flow","dependence-slice","inspect","code"]},{id:"exceptional-flow",families:["execution","dataflow","temporal"],capability:"Interprocedural exception propagation and finally completion flow are unavailable.",consequence:"Normal-path reachability and ordering do not establish behavior after a throw or rejection.",recoverWith:["dependence-slice","inspect","code"]},{id:"reflection",families:["execution","runtime","identity","dependencies"],capability:"Reflective lookup, dynamic loading, and name-computed invocation are unavailable without exact evidence.",consequence:"Missing static edges cannot establish that a construct is unreachable through reflection.",recoverWith:["search","inspect","code"]},{id:"generated-dispatch",families:["execution","runtime","identity"],capability:"Dispatch tables or names created only by generated or unavailable source are unavailable.",consequence:"Missing dispatch edges cannot establish that no generated consumer exists.",recoverWith:["search","inspect","code"]},{id:"unsupported-framework-adapters",families:["runtime","dataflow","state","temporal"],capability:"Framework runtime crossings without a registered source adapter are unavailable.",consequence:"Missing boundary edges cannot establish that no producer, consumer, state effect, or ordering exists.",recoverWith:["search","inspect","code"]}];function Z(e){let t=new Set(e);return Q.filter(n=>n.families.some(a=>t.has(a)))}function $(e){return Z(e).map(t=>`[${t.id}] ${t.capability} ${t.consequence} Recover selected paths with: ${t.recoverWith.map(n=>`codebaseiq ${n}`).join(", ")}.`)}var ee=["incoming","outgoing","both"];function h(e,t,n,a={}){return{family:e,subtype:t,...a.match?{match:a.match}:{},directions:ee,evidenceStrengths:a.strengths??["exact","derived","mixed"],supportCeiling:a.supportCeiling??"partial",establishes:n,nonClaims:a.nonClaims??[],recoverWith:a.recoverWith??["inspect","code"]}}var te=["predicate-consequence","predicate-alternative","predicate-fallthrough","predicate-case","predicate-default","predicate-return","predicate-throw","loop-iteration","loop-exit","exception-handler","finally-cleanup","handler-return","handler-throw"],ne=["captured-value-to-state","constant-to-state","expression-to-state","property-to-state","return-to-state","value-to-state"],re=["await-completion-before","awaits-completion","inside-lock-scope","lexical-successor"],oe=[{id:"indexed-program-identity",label:"SCIP/compiler identity and source ownership",requirements:["indexed-graph"],relations:[h("execution","call","The source construct may call the resolved target.",{nonClaims:["Static may-call reachability does not prove that an invocation occurred at runtime."],recoverWith:["call-graph","inspect","code"]}),h("execution","result-callback","The referenced callable can produce the result consumed by this path.",{nonClaims:["A callback relationship does not prove invocation order or runtime selection."],recoverWith:["call-graph","inspect","code"]}),h("contract","uses-contract-symbol","The source construct refers to the identified contract symbol.",{supportCeiling:"exact",nonClaims:["Contract identity does not prove runtime invocation or behavioral conformance."],recoverWith:["hierarchy","inspect","code"]}),h("identity","references","The occurrence resolves to the identified compiler-owned symbol.",{supportCeiling:"exact",nonClaims:["A reference does not establish execution or value transfer."],recoverWith:["refs","trace","inspect"]}),h("ownership","contains","The owner contains the identified program construct.",{supportCeiling:"exact",nonClaims:["Structural containment does not establish runtime lifetime or sharing scope."],recoverWith:["outline","inspect"]}),h("ownership","contains-","The owner contains the identified program construct.",{match:"prefix",supportCeiling:"exact",nonClaims:["Structural containment does not establish runtime lifetime or sharing scope."],recoverWith:["outline","inspect"]}),h("ownership","owns-","The owner owns the identified source or runtime observation.",{match:"prefix",supportCeiling:"exact",nonClaims:["Observation ownership does not establish singleton lifetime or exclusive ownership."],recoverWith:["inspect","code"]}),h("dependencies","imports","The source file or module statically imports the indexed target.",{nonClaims:["An import does not establish that imported code executes."],recoverWith:["imports","deps","code"]}),h("dependencies","imports-external","The source region statically imports an external package.",{nonClaims:["An external import does not establish which package behavior executes."],recoverWith:["imports","code"]})]},{id:"runtime-boundary-join",label:"source-grounded runtime-boundary joins",requirements:["indexed-graph","source-facts"],relations:[h("runtime","runtime-handoff","A producer and consumer share a source-grounded runtime rendezvous.",{strengths:["exact","derived","candidate","mixed"],nonClaims:["A candidate or unresolved join does not prove a runtime handoff."],recoverWith:["evidence","inspect","code"]}),h("runtime","discriminator-dispatch","A serialized discriminator selects the reported consumer.",{strengths:["exact","derived","mixed"],nonClaims:["The dispatch edge does not prove delivery, retry, or successful handling."],recoverWith:["evidence","inspect","code"]}),h("dataflow","serialized-discriminator-transfer","The producer serializes the discriminator consumed by dispatch.",{strengths:["exact","derived","mixed"],nonClaims:["This edge does not establish the flow of every payload field."],recoverWith:["value-flow","inspect","code"]}),h("temporal","enqueue-before-consume","The reported enqueue precedes a possible consume through the queue.",{strengths:["exact","derived","mixed"],nonClaims:["Queue order does not establish delivery time, uniqueness, retry count, or durability."],recoverWith:["evidence","inspect","code"]})]},{id:"parser-control-dependence",label:"parser-proved intraprocedural control dependence",requirements:["indexed-graph","source-facts"],relations:[...te.map(e=>h("execution",e,"The outcome is control-dependent on the reported predicate or handler.",{strengths:["exact"],nonClaims:["Local control dependence does not establish that the containing function executes."],recoverWith:["dependence-slice","inspect","code"]})),h("execution","returns","The selected construct contains the reported return terminal.",{strengths:["exact"],nonClaims:["A local return terminal does not establish that the containing callable executes."],recoverWith:["inspect","code"]}),h("execution","throws","The selected construct contains the reported throw terminal.",{strengths:["exact"],nonClaims:["A local throw terminal does not establish propagation, handling, or callable execution."],recoverWith:["inspect","code"]})]},{id:"bounded-static-value-flow",label:"compiler callsites and bounded static value evaluation",requirements:["indexed-graph","source-facts"],relations:[...["argument-to-parameter","constant-to-parameter","property-to-parameter","return-to-parameter","return-to-call-result"].map(e=>h("dataflow",e,"The reported value may reach the target through the evidenced callsite transfer.",{strengths:["exact","derived","mixed"],nonClaims:["This provider does not establish general local definition-use, alias, field, or heap flow."],recoverWith:["value-flow","dependence-slice","inspect","code"]}))]},{id:"typescript-local-dependence",label:"TypeScript compiler identities, control-flow graph, and reaching definitions",requirements:["typescript-semantic"],relations:[h("dataflow","definition-to-use","The definition reaches the reported read on a feasible local control-flow path.",{strengths:["exact"],nonClaims:["Local reaching definitions do not establish heap aliasing, exceptional flow, or the runtime order of closure invocation."],recoverWith:["value-flow","dependence-slice","inspect","code"]}),h("dataflow","value-to-definition","The reported right-hand-side read supplies the assigned local definition.",{strengths:["exact"],nonClaims:["A local assignment edge does not establish field or heap points-to flow."],recoverWith:["value-flow","dependence-slice","inspect","code"]}),h("dataflow","closure-capture","The nested callable reads the reported binding from an enclosing callable.",{strengths:["candidate"],supportCeiling:"candidate",nonClaims:["Closure capture does not establish whether or when the nested callable executes."],recoverWith:["call-graph","inspect","code"]}),h("dataflow","field-definition-to-use","The reported same-owner field definition can reach the field read.",{strengths:["exact","candidate"],nonClaims:["Field-name identity does not establish whole-program heap aliasing or cross-instance flow."],recoverWith:["value-flow","dependence-slice","inspect","code"]}),h("execution","control-dependence","Execution of the reported statement depends on the outcome of the predicate.",{strengths:["exact"],nonClaims:["Intraprocedural control dependence does not establish that the containing callable executes."],recoverWith:["dependence-slice","inspect","code"]})]},{id:"parser-state-temporal",label:"parser-proved local state and temporal facts",requirements:["indexed-graph","source-facts"],relations:[...ne.map(e=>h("dataflow",e,"The reported source value is assigned into the identified state resource.",{strengths:["exact"],nonClaims:["The edge does not establish alias, heap, or later read flow."],recoverWith:["value-flow","inspect","code"]})),...["writes-resource","deletes-resource","reads-resource","enqueues-resource","consumes-resource"].map(e=>h("state",e,"The reported construct performs the named operation on the identified resource.",{strengths:["exact"],nonClaims:["A state operation does not establish transactionality, durability, or exclusive ownership."],recoverWith:["evidence","inspect","code"]})),...re.map(e=>h("temporal",e,"The reported source constructs have the named local ordering relationship.",{strengths:["exact"],nonClaims:["Local source order does not establish cross-process happens-before or durable completion."],recoverWith:["evidence","inspect","code"]}))]}];function q(e,t){let n=oe.flatMap(a=>a.relations.filter(r=>r.family===e&&(r.match==="prefix"?t.startsWith(r.subtype):t===r.subtype)).map(r=>({provider:a,relation:r})));if(n.length>1)throw new Error(`Ambiguous graph relation provider for ${e}/${t}: ${n.map(a=>a.provider.id).join(", ")}`);return n[0]??null}var Ne=["causal","structure","complete"],ae={causal:["execution","runtime","dataflow","state","temporal"],structure:["contract","identity","ownership","dependencies"],complete:y},se=2,ce=48,k=64,de=5e4;function We(e,t,n={}){let a=E([...t.symbols??[],...t.locations??[]]),r=E(t.searches??[]);if(a.length===0&&r.length===0)throw new Error("evidence requires at least one positional symbol, --symbol, --at, or --search selector.");let o=n.view??"causal",i=le(n.families,o),s=n.direction??"both",u=E(n.subtypes??[]),l=n.connecting??!1,c=n.inventoryOnly??!1,p=E(n.foldIds??[]),g=n.maxDepth??se,f=n.maxEdges??ce;if(!Number.isSafeInteger(g)||g<0)throw new RangeError(`Evidence depth must be a non-negative safe integer; received ${g}.`);if(!Number.isSafeInteger(f)||f<=0)throw new RangeError(`Evidence max edges must be a positive safe integer; received ${f}.`);if(!["incoming","outgoing","both"].includes(s))throw new Error(`Unsupported graph evidence direction: ${s}.`);if(c&&p.length>0)throw new Error("Evidence fold materialization cannot be combined with --inventory-only.");let m=j(e,{symbols:a,searches:r,maxDepth:g,maxTopologyCharacters:de,relations:pe(i)}),R=new Map(m.nodes.map(d=>[d.id,d])),b=m.edges.filter(d=>d.disposition==="emitted"||d.disposition==="folded").flatMap(d=>ue(d,R)),v=b.filter(d=>i.includes(d.family)).filter(d=>u.length===0||u.includes(d.subtype)),x=new Set(m.anchors.flatMap(d=>d.nodeIds));if(l&&x.size<2)throw new Error("Connecting evidence requires at least two resolved root nodes.");let S=new Set(v.map(d=>d.id)),_=A(b,x,"incoming").filter(d=>S.has(d.id)),F=A(b,x,"outgoing").filter(d=>S.has(d.id)),O=A(b,x,"both").filter(d=>S.has(d.id)),B=ve(i,u,_,F,O),M=s==="incoming"?_:s==="outgoing"?F:O,N=l?Re(M,[...x],s):M,z=Ce(N,x,s),w=[...N].sort((d,X)=>Te(d,X,z)),W=ye(w,f),Y=be(W,p),G=c?[]:p.length>0?w.filter(d=>Y.has(d.id)):w,C=p.length>0?G:G.slice(0,f),K=p.length>0||c?[]:W,T=Math.max(0,G.length-C.length),J=m.frontiers.filter(d=>d.disposition==="unsupported").length,I=m.coverage.status==="incomplete"?"incomplete":T>0?"bounded":"accounted";return{kind:"graph",view:n.families&&n.families.length>0?"custom":o,families:i,selection:{direction:s,subtypes:u,connecting:l,inventoryOnly:c,foldIds:p},targets:m.anchors.map(d=>({kind:d.kind,query:d.query,status:d.status,nodeIds:[...d.nodeIds],omittedCandidates:d.omittedCandidates})),inventory:B,edges:C,folds:K,coverage:{status:I,topologyStatus:m.coverage.status,scope:m.coverage.scope,maxDepth:g,maxEdges:f,matchedEdges:w.length,eligibleEdges:G.length,returnedEdges:C.length,omittedEdges:T,frontierGroups:m.frontiers.length,unsupportedFrontiers:J,blindSpots:E([...m.coverage.blindSpots,...$(i)]),explanation:c?`${w.length} relationship(s) match the explicit projection; only exact inventory counts were requested.`:p.length>0?`Every relationship in ${p.length} explicitly selected recoverable fold(s) was emitted.`:I==="accounted"?"Every selected relationship in the bounded topology was emitted.":I==="bounded"?`${T} selected relationship(s) were withheld by the explicit edge budget.`:m.coverage.explanation}}}function le(e,t){let n=e&&e.length>0?e:ae[t],a=n.filter(r=>!y.includes(r));if(a.length>0)throw new Error(`Unsupported graph evidence family: ${a.join(", ")}.`);return E(n)}function pe(e){return["call","contract-symbol","import","reference","runtime-boundary"]}function ue(e,t){let n=t.get(e.fromNodeId),a=t.get(e.toNodeId);return!n||!a?[]:(e.semantics??[]).flatMap((r,o)=>{let i=ge(r);if(!i)return[];let s=q(i,r.subtype);if(!s)throw new Error(`No graph relation provider contract is registered for ${i}/${r.subtype}.`);let u=fe(e);if(!s.relation.evidenceStrengths.includes(u))throw new Error(`Graph relation provider ${s.provider.id} does not admit ${u} evidence for ${i}/${r.subtype}.`);return[{id:`${e.id}:${o}:${i}`,family:i,semanticFamily:r.family,subtype:r.subtype,from:L(n),to:L(a),sourceKind:e.kind,providerId:s.provider.id,supportCeiling:s.relation.supportCeiling,establishes:s.relation.establishes,nonClaims:[...s.relation.nonClaims],recoverWith:[...s.relation.recoverWith],evidenceStrength:u,evidenceMethods:E(e.evidence.map(l=>l.method)),evidenceConstituents:he(e.evidence),context:r.context?{...r.context}:null,attributes:r.attributes?{...r.attributes}:null}]})}function he(e){let t=new Map;for(let n of e)t.set(`${n.method}\0${n.strength}`,n);return[...t.values()].map(({method:n,strength:a})=>({method:n,strength:a}))}function ge(e){switch(e.family){case"control":return e.context?.crossesRuntimeBoundary===!0||e.subtype==="runtime-handoff"?"runtime":"execution";case"data":return"dataflow";case"state":return"state";case"temporal":return"temporal";case"contract":return"contract";case"identity":return e.subtype.startsWith("contains")||e.subtype.startsWith("owns-")?"ownership":e.subtype.startsWith("import")?"dependencies":"identity"}}function L(e){let t=me(e);return{id:e.id,kind:e.kind,label:t?D(t):e.label,symbol:t,location:e.location?{...e.location}:null}}function me(e){return e.kind!=="symbol"||!e.id.startsWith("symbol:")?null:decodeURIComponent(e.id.slice(7))}function fe(e){let t=E(e.evidence.map(n=>n.strength));return t.length===1?t[0]:t.includes("exact")&&t.every(n=>n==="exact"||n==="derived")?"mixed":t.includes("candidate")?"candidate":t.includes("unknown")||t.length===0?"unknown":"mixed"}function A(e,t,n){let a=P(e,n),r=new Map,o=new Map,i=[...t].sort();for(let s of i)o.set(s,0);for(let s=0;s<i.length;s+=1){let u=i[s],l=o.get(u);for(let c of a.get(u)??[])r.set(c.edge.id,c.edge),!o.has(c.next)&&(o.set(c.next,l+1),i.push(c.next))}return[...r.values()]}function P(e,t){let n=new Map,a=(r,o,i)=>{let s=n.get(r)??[];s.push({edge:i,next:o}),n.set(r,s)};for(let r of e)t!=="incoming"&&a(r.from.id,r.to.id,r),t!=="outgoing"&&a(r.to.id,r.from.id,r);for(let r of n.values())r.sort((o,i)=>o.edge.id.localeCompare(i.edge.id)||o.next.localeCompare(i.next));return n}function ve(e,t,n,a,r){let o=new Set;for(let c of[...n,...a,...r])o.add(`${c.family}\0${c.subtype}`);if(t.length>0)for(let c of e)for(let p of t)o.add(`${c}\0${p}`);let i=c=>{let p=new Map;for(let g of c){let f=`${g.family}\0${g.subtype}`;p.set(f,(p.get(f)??0)+1)}return p},s=i(n),u=i(a),l=i(r);return[...o].map(c=>{let[p,g]=c.split("\0");return{family:p,subtype:g,incoming:s.get(c)??0,outgoing:u.get(c)??0,both:l.get(c)??0}}).sort((c,p)=>y.indexOf(c.family)-y.indexOf(p.family)||c.subtype.localeCompare(p.subtype))}function ye(e,t){let n=e.slice(t),a=new Map;for(let i of n){let s=Ee(i),u=`${i.family}\0${s}`,l=a.get(u)??[];l.push(i),a.set(u,l)}let r=new Map(e.map((i,s)=>[i.id,s+1])),o=[];for(let[i,s]of[...a].sort(([u],[l])=>u.localeCompare(l))){let[u,l]=i.split("\0"),c=[...s].sort((p,g)=>p.id.localeCompare(g.id));for(let p=0;p<c.length;p+=k){let g=c.slice(p,p+k),f=g.map(v=>v.id),m=E(g.map(v=>v.subtype)).sort(),R=m.length===1?m[0]:"mixed",b=[...new Set(g.flatMap(v=>[v.from.id,v.to.id]))].sort();o.push({id:Ge(u,m.join("\0"),f),mode:xe(g),family:u,subtype:R,subtypes:m,region:l,edgeCount:f.length,edgeIds:f,nodeIds:b,minimumMaxEdges:Math.max(...f.map(v=>r.get(v)??e.length))})}}return o.sort((i,s)=>y.indexOf(i.family)-y.indexOf(s.family)||(i.region??"").localeCompare(s.region??"")||i.id.localeCompare(s.id))}function Ee(e){let t=e.from.location?.file??`kind:${e.from.kind}`,n=e.to.location?.file??`kind:${e.to.kind}`;return t===n?t:`${t} -> ${n}`}function be(e,t){if(t.length===0)return new Set;let n=new Map(e.map(r=>[r.id,r])),a=t.filter(r=>!n.has(r));if(a.length>0){let r=e.map(o=>o.id).sort();throw new Error(`Unknown evidence fold ${a.join(", ")} for this projection. Available folds: ${r.join(", ")||"(none)"}.`)}return new Set(t.flatMap(r=>n.get(r).edgeIds))}function xe(e){let t=new Map,n=new Map,a=new Set;for(let o of e){a.add(o.from.id),a.add(o.to.id);let i=t.get(o.from.id)??new Set;i.add(o.to.id),t.set(o.from.id,i);let s=n.get(o.to.id)??new Set;s.add(o.from.id),n.set(o.to.id,s)}return we(a,t)?"scc":[...a].every(o=>(n.get(o)?.size??0)<=1&&(t.get(o)?.size??0)<=1)?"linear":"topology"}function we(e,t){let n=new Set,a=new Set,r=o=>{if(n.has(o))return!0;if(a.has(o))return!1;n.add(o);for(let i of t.get(o)??[])if(r(i))return!0;return n.delete(o),a.add(o),!1};return[...e].some(r)}function Ge(e,t,n){return`fold:${ie("sha256").update([e,t,...n].join("\0")).digest("hex").slice(0,16)}`}function Re(e,t,n){let a=new Map,r=[...new Set(t)].sort();for(let o=0;o<r.length;o+=1)for(let i=o+1;i<r.length;i+=1)for(let s of Se(e,r[o],r[i],n))a.set(s.id,s);return[...a.values()]}function Se(e,t,n,a){let r=P(e,a),o=new Map([[t,0]]),i=new Map,s=[t];for(let l=0;l<s.length;l+=1){let c=s[l],p=o.get(c);if(c!==n)for(let g of r.get(c)??[])o.has(g.next)||(o.set(g.next,p+1),i.set(g.next,{node:c,edge:g.edge}),s.push(g.next))}if(!o.has(n))return[];let u=[];for(let l=n;l!==t;){let c=i.get(l);if(!c)return[];u.push(c.edge),l=c.node}return u.reverse()}function Ce(e,t,n){let a=P(e,n),r=new Map,o=[...t];for(let i of t)r.set(i,0);for(let i=0;i<o.length;i+=1){let s=o[i],u=r.get(s);for(let{next:l}of a.get(s)??[])r.has(l)||(r.set(l,u+1),o.push(l))}return r}function Te(e,t,n){return H(e,n)-H(t,n)||U(e)-U(t)||V(e.evidenceStrength)-V(t.evidenceStrength)||y.indexOf(e.family)-y.indexOf(t.family)||e.from.label.localeCompare(t.from.label)||e.to.label.localeCompare(t.to.label)||e.subtype.localeCompare(t.subtype)||e.id.localeCompare(t.id)}function H(e,t){return Math.min(t.get(e.from.id)??Number.MAX_SAFE_INTEGER,t.get(e.to.id)??Number.MAX_SAFE_INTEGER)}function U(e){let t=[e.from,e.to].filter(n=>n.kind==="structural-region").length;return t===2?2:t}function V(e){switch(e){case"exact":return 0;case"mixed":return 1;case"derived":return 2;case"candidate":return 3;case"unknown":return 4}}function E(e){return[...new Set(e.map(t=>t.trim()).filter(Boolean))]}export{y as a,Ne as b,We as c};
|
|
2
|
+
//# sourceMappingURL=chunk-UWB5WMC2.js.map
|