scip-query 0.24.0 → 0.26.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 +247 -1
- package/README.md +111 -124
- package/dist/augment-vue-worker.js +1 -1
- package/dist/by-kind-PRVFAGTQ.js +2 -0
- package/dist/call-graph-DVPAQV2F.js +2 -0
- package/dist/{call-graph-evidence-BociKRpF.d.ts → call-graph-evidence-CUtj8V2I.d.ts} +1 -1
- package/dist/chunk-2FSBGL5P.js +2 -0
- package/dist/chunk-2HLAFUCY.js +2 -0
- package/dist/chunk-2IWUT6CJ.js +3 -0
- package/dist/chunk-2KNN7GTQ.js +2 -0
- package/dist/chunk-2LHXRE2B.js +8 -0
- package/dist/{chunk-E65ELFKU.js → chunk-2YXE77TJ.js} +2 -2
- package/dist/chunk-36SGVCGX.js +2 -0
- package/dist/chunk-3ABBFPTP.js +2 -0
- package/dist/chunk-3IVFU4FD.js +3 -0
- package/dist/chunk-3JIQS44J.js +7 -0
- package/dist/chunk-3ZRB6DNK.js +7 -0
- package/dist/{chunk-6YTSKJJ3.js → chunk-42EOW5VI.js} +1 -1
- package/dist/{chunk-BHKK5RJY.js → chunk-4BHGBMNO.js} +2 -2
- package/dist/chunk-4BP3UBDG.js +2 -0
- package/dist/chunk-4D6RO7G4.js +2 -0
- package/dist/chunk-4FEWQ6RH.js +2 -0
- package/dist/chunk-4IGEOBG7.js +2 -0
- package/dist/chunk-4QZXBUKC.js +2 -0
- package/dist/chunk-4WBDEVX2.js +4 -0
- package/dist/chunk-4WCUBZU3.js +8 -0
- package/dist/chunk-4WTUBQ36.js +40 -0
- package/dist/chunk-4XQ4O6IM.js +3 -0
- package/dist/chunk-55UQAMZO.js +4 -0
- package/dist/chunk-5D2LVK7O.js +125 -0
- package/dist/chunk-5IYJ56TT.js +2 -0
- package/dist/chunk-5PLMJC7Q.js +2 -0
- package/dist/chunk-5TNQJUR2.js +5 -0
- package/dist/chunk-62BDNPMI.js +2 -0
- package/dist/chunk-64DZ5TXR.js +7 -0
- package/dist/chunk-65245JCM.js +2 -0
- package/dist/chunk-6FFVZZL4.js +2 -0
- package/dist/chunk-6KO5JHAR.js +2 -0
- package/dist/chunk-6LRXOOSX.js +2 -0
- package/dist/chunk-6LSEIIF7.js +2 -0
- package/dist/chunk-6YMNWD3H.js +6 -0
- package/dist/chunk-72AD6ZRR.js +5 -0
- package/dist/chunk-73AAKPUC.js +4 -0
- package/dist/chunk-76CZ77DF.js +2 -0
- package/dist/chunk-7VPEEAAG.js +2 -0
- package/dist/chunk-7WTPQ4NX.js +14 -0
- package/dist/chunk-7Y5T6XDP.js +2 -0
- package/dist/chunk-A2IIGFMJ.js +5 -0
- package/dist/chunk-AB5KCTEV.js +2 -0
- package/dist/chunk-AC566WBP.js +6 -0
- package/dist/chunk-AGWFSTXC.js +3 -0
- package/dist/chunk-AOSIYPTA.js +2 -0
- package/dist/chunk-AUVEWPIF.js +2 -0
- package/dist/chunk-B56T42J3.js +25 -0
- package/dist/chunk-BIQEF5NE.js +2 -0
- package/dist/chunk-BL6XJKTA.js +3 -0
- package/dist/chunk-BMKOQJRI.js +2 -0
- package/dist/chunk-BOZ4EXBB.js +3 -0
- package/dist/chunk-BUTWYEPH.js +2 -0
- package/dist/chunk-BZB4QPIP.js +2 -0
- package/dist/{chunk-6ILKOOGH.js → chunk-CE357GEE.js} +4 -4
- package/dist/chunk-CFN45HFP.js +2 -0
- package/dist/chunk-CFYMZFXT.js +368 -0
- package/dist/chunk-CN5EH7O3.js +2 -0
- package/dist/chunk-D254DNNQ.js +4 -0
- package/dist/chunk-D3FDISIC.js +2 -0
- package/dist/chunk-D3NX5XIE.js +3 -0
- package/dist/chunk-DA7RPPDF.js +3 -0
- package/dist/chunk-DDMC3FON.js +3 -0
- package/dist/chunk-DIO3FUSG.js +2 -0
- package/dist/chunk-DJ2NNSUK.js +3 -0
- package/dist/chunk-DKYQIM3C.js +18 -0
- package/dist/{chunk-OHIV323X.js → chunk-DOOEL2IV.js} +2 -2
- package/dist/chunk-DVFP6PZI.js +2 -0
- package/dist/chunk-E3FDPXZK.js +2 -0
- package/dist/chunk-E7YNJLCB.js +2 -0
- package/dist/chunk-EFGW5JPH.js +2 -0
- package/dist/chunk-EJVTR244.js +13 -0
- package/dist/chunk-EOV7RTRZ.js +2 -0
- package/dist/chunk-ETOIKRHO.js +2 -0
- package/dist/chunk-EYK3ZAO2.js +3 -0
- package/dist/chunk-F2V2LPET.js +52 -0
- package/dist/chunk-F4LUHJTF.js +2 -0
- package/dist/chunk-F4PUT6IT.js +2 -0
- package/dist/chunk-F56GCXXS.js +5 -0
- package/dist/chunk-FC2EVQRM.js +2 -0
- package/dist/chunk-FL7NBMHP.js +3 -0
- package/dist/chunk-FMRN2TRL.js +3 -0
- package/dist/chunk-FVULPZDF.js +20 -0
- package/dist/chunk-GCKCF5FL.js +43 -0
- package/dist/chunk-GH2PYF46.js +2 -0
- package/dist/chunk-GHJAGXIP.js +2 -0
- package/dist/{chunk-2GJSD5GY.js → chunk-GMVSHUKZ.js} +2 -2
- package/dist/chunk-GS6KDO4R.js +2 -0
- package/dist/chunk-GUUBXNN7.js +2 -0
- package/dist/chunk-GVWX5T43.js +80 -0
- package/dist/chunk-GZKFETP5.js +2 -0
- package/dist/chunk-H4EQHO6J.js +9 -0
- package/dist/chunk-H73WY2RM.js +2 -0
- package/dist/chunk-H75GSPRV.js +60 -0
- package/dist/chunk-HDR3AHSV.js +61 -0
- package/dist/chunk-HQBSL74Y.js +2 -0
- package/dist/chunk-HRRFKWPZ.js +2 -0
- package/dist/chunk-HXENDJC6.js +2 -0
- package/dist/chunk-IIBAZNSW.js +21 -0
- package/dist/chunk-INLMWEUU.js +12 -0
- package/dist/chunk-IWQPAF4F.js +2 -0
- package/dist/chunk-IZJ6YUKP.js +35 -0
- package/dist/chunk-J2TMAIN5.js +60 -0
- package/dist/chunk-J5FJMODQ.js +142 -0
- package/dist/chunk-J7HZPIO3.js +2 -0
- package/dist/chunk-JEVRKFRL.js +2 -0
- package/dist/chunk-JFXSGAEB.js +30 -0
- package/dist/chunk-JVRTHGFS.js +3 -0
- package/dist/chunk-JYWEX7RR.js +360 -0
- package/dist/chunk-K3YL22N6.js +2 -0
- package/dist/chunk-K4CN7GXK.js +12 -0
- package/dist/chunk-K5TBVXU4.js +30 -0
- package/dist/chunk-KDDIE2DP.js +9 -0
- package/dist/chunk-KHWRRPV4.js +2 -0
- package/dist/chunk-KI6NBKDY.js +14 -0
- package/dist/chunk-KU3QRSTH.js +2 -0
- package/dist/chunk-KZBJWZJB.js +2 -0
- package/dist/chunk-L7GFM3NP.js +3 -0
- package/dist/chunk-LMO6PK3V.js +35 -0
- package/dist/chunk-LN4YXJJU.js +2 -0
- package/dist/chunk-LOVIZBJ4.js +43 -0
- package/dist/chunk-LPCRK4A2.js +11 -0
- package/dist/chunk-MMHZKBFA.js +2 -0
- package/dist/{chunk-A4WEAK35.js → chunk-MOQQBQRD.js} +2 -2
- package/dist/chunk-N2WN6I3L.js +2 -0
- package/dist/chunk-N3ORQT7L.js +2 -0
- package/dist/chunk-NAZ3RAIW.js +2 -0
- package/dist/chunk-NDUNO5JQ.js +2 -0
- package/dist/chunk-NEIWRNAZ.js +4 -0
- package/dist/chunk-NJJMVD65.js +2 -0
- package/dist/chunk-NLOQOBXI.js +20 -0
- package/dist/chunk-NOLZOVCU.js +2 -0
- package/dist/chunk-NOWINRRN.js +2 -0
- package/dist/chunk-NZAXKGRL.js +16 -0
- package/dist/chunk-O2C4UILI.js +2 -0
- package/dist/chunk-O3RHA6ZT.js +3 -0
- package/dist/chunk-O4UZSPPI.js +3 -0
- package/dist/chunk-OGFV2BUX.js +2 -0
- package/dist/chunk-OZCJXZK6.js +499 -0
- package/dist/chunk-P6ODM7BY.js +2 -0
- package/dist/{chunk-GHNPACNP.js → chunk-PAVGPRHJ.js} +2 -2
- package/dist/chunk-PH52RA7D.js +2 -0
- package/dist/chunk-PKN354TH.js +3 -0
- package/dist/chunk-PWOASWEG.js +11 -0
- package/dist/chunk-QIWXRW72.js +2 -0
- package/dist/chunk-QJRMOK5N.js +2 -0
- package/dist/{chunk-YXPUP5G2.js → chunk-QOIXNWQR.js} +2 -2
- package/dist/chunk-QXEUDXBT.js +3 -0
- package/dist/chunk-QYUVVBMR.js +6 -0
- package/dist/chunk-QZ7KQZRN.js +2 -0
- package/dist/chunk-R6LQBUDH.js +2 -0
- package/dist/chunk-RBS42E55.js +20 -0
- package/dist/chunk-RSJKPCFX.js +26 -0
- package/dist/chunk-S6CZA3MV.js +2 -0
- package/dist/chunk-STMVAHJP.js +2 -0
- package/dist/chunk-SYVPTTVW.js +2 -0
- package/dist/chunk-T6DK3ZP7.js +2 -0
- package/dist/chunk-TKD34PHN.js +4 -0
- package/dist/chunk-TNNQFH7W.js +2 -0
- package/dist/chunk-TNV7SSUF.js +2 -0
- package/dist/chunk-TO7ZR3EH.js +8 -0
- package/dist/chunk-TOU3CHK4.js +2 -0
- package/dist/chunk-TRBI4UKT.js +2 -0
- package/dist/chunk-TZCVNCAN.js +4 -0
- package/dist/chunk-U4LZA5LL.js +3 -0
- package/dist/chunk-U5RIG3JP.js +3 -0
- package/dist/chunk-UP5KXN2I.js +2 -0
- package/dist/chunk-UQFR3NDH.js +5 -0
- package/dist/chunk-UXYXF7GV.js +2 -0
- package/dist/chunk-VB3GOKOS.js +2 -0
- package/dist/{chunk-4FR6GQIT.js → chunk-VF5JZICY.js} +2 -2
- package/dist/chunk-VTY3VK6E.js +2 -0
- package/dist/chunk-VX2O4RIS.js +2 -0
- package/dist/chunk-WKPV2TDZ.js +2 -0
- package/dist/chunk-WOFQ5DTB.js +2 -0
- package/dist/chunk-WS4C6TCK.js +2 -0
- package/dist/chunk-WXU3DGPU.js +2 -0
- package/dist/{chunk-ATXPTSEI.js → chunk-X6RMKHJQ.js} +7 -7
- package/dist/{chunk-44IETFOU.js → chunk-XHMN6ZX7.js} +2 -2
- package/dist/chunk-XHTVFLWW.js +2 -0
- package/dist/chunk-XKIDJCIK.js +2 -0
- package/dist/chunk-XTYTYZPT.js +2 -0
- package/dist/chunk-Y2JHHTTA.js +2 -0
- package/dist/chunk-YGVRMGYN.js +4 -0
- package/dist/chunk-YNQCGEQE.js +2 -0
- package/dist/chunk-YOQVEXVE.js +14 -0
- package/dist/chunk-YRT2WLYY.js +2 -0
- package/dist/chunk-YTAP5Y2G.js +2 -0
- package/dist/chunk-YTYWI7VB.js +2 -0
- package/dist/chunk-YULZRALL.js +2 -0
- package/dist/chunk-Z33WQG4Q.js +2 -0
- package/dist/chunk-ZGTYGDMF.js +16 -0
- package/dist/chunk-ZHMRSZFD.js +43 -0
- package/dist/chunk-ZHSP366W.js +10 -0
- package/dist/chunk-ZIBYCYKK.js +7 -0
- package/dist/chunk-ZLADLUE6.js +3 -0
- package/dist/chunk-ZO4YXUT6.js +4 -0
- package/dist/{chunk-MZPXPSUJ.js → chunk-ZR4HBC2H.js} +2 -2
- package/dist/cli-main.js +6 -6
- package/dist/cli.js +1 -1
- package/dist/{code-B17qEMbt.d.ts → code-BNyrCF3_.d.ts} +3 -2
- package/dist/code-IL5WH3NZ.js +2 -0
- package/dist/code-result-json-ANTBEDFP.js +4 -0
- package/dist/command-descriptors-HEEMDHTU.js +222 -0
- package/dist/deps-EOWFC6FD.js +2 -0
- package/dist/direct-navigation-Y5B6OSIQ.js +3 -0
- package/dist/{exploration-topology-BG4v30HZ.d.ts → exploration-topology-CSgEyAz-.d.ts} +3 -1
- package/dist/files-K4AI3JUM.js +2 -0
- package/dist/{health-BI2a9WPy.d.ts → health-BtfmNrfa.d.ts} +5 -79
- package/dist/hierarchy-6W5NDIFI.js +2 -0
- package/dist/imports-WH365QY4.js +2 -0
- package/dist/index.d.ts +13 -1
- package/dist/index.js +1 -1
- package/dist/members-K3PHMF5S.js +2 -0
- package/dist/methods-E7KVMBX4.js +2 -0
- package/dist/output-continuation-command-BJSY67SN.js +3 -0
- package/dist/output-pagination-UZJ5ACIX.js +24 -0
- package/dist/postinstall.js +1 -1
- package/dist/project-reindex-EP24WT4X.js +3 -0
- package/dist/queries/affected.js +1 -1
- package/dist/queries/architecture.d.ts +15 -4
- package/dist/queries/architecture.js +1 -1
- package/dist/queries/bottlenecks.js +1 -1
- package/dist/queries/by-kind.js +1 -1
- package/dist/queries/call-graph.d.ts +1 -1
- package/dist/queries/call-graph.js +1 -1
- package/dist/queries/change-surface.d.ts +1 -0
- package/dist/queries/change-surface.js +1 -1
- package/dist/queries/cleanup-plan.d.ts +3 -3
- package/dist/queries/cleanup-plan.js +1 -1
- package/dist/queries/co-change.js +1 -1
- package/dist/queries/code.d.ts +1 -1
- package/dist/queries/code.js +1 -1
- package/dist/queries/complexity.d.ts +6 -3
- package/dist/queries/complexity.js +1 -1
- package/dist/queries/context.d.ts +1 -7
- package/dist/queries/context.js +1 -1
- package/dist/queries/coupling.js +1 -1
- package/dist/queries/cycles.js +1 -1
- package/dist/queries/dead.js +1 -1
- package/dist/queries/decorative-checkers.js +1 -1
- package/dist/queries/dependence-slice.d.ts +46 -22
- package/dist/queries/dependence-slice.js +1 -1
- package/dist/queries/dependency-depth.d.ts +1 -7
- package/dist/queries/dependency-depth.js +1 -1
- package/dist/queries/deps.js +1 -1
- package/dist/queries/diff-impact.d.ts +3 -1
- package/dist/queries/diff-impact.js +1 -1
- package/dist/queries/doc-drift.js +1 -1
- package/dist/queries/drift.d.ts +1 -1
- package/dist/queries/drift.js +1 -1
- package/dist/queries/duplicate-bodies.d.ts +1 -1
- package/dist/queries/duplicate-bodies.js +1 -1
- package/dist/queries/entry-map.d.ts +2 -4
- package/dist/queries/entry-map.js +1 -1
- package/dist/queries/evidence.d.ts +121 -61
- package/dist/queries/evidence.js +1 -1
- package/dist/queries/fan.js +1 -1
- package/dist/queries/files.js +1 -1
- package/dist/queries/health.d.ts +1 -1
- 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 +1 -1
- package/dist/queries/hotspots.js +1 -1
- package/dist/queries/imports.d.ts +1 -0
- package/dist/queries/imports.js +1 -1
- package/dist/queries/incomplete-migration.d.ts +3 -3
- package/dist/queries/incomplete-migration.js +1 -1
- package/dist/queries/index.d.ts +15 -64
- package/dist/queries/index.js +1 -1
- package/dist/queries/locality-candidates.d.ts +4 -4
- 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.js +1 -1
- package/dist/queries/not-implemented.d.ts +2 -6
- package/dist/queries/not-implemented.js +1 -1
- package/dist/queries/outline.js +1 -1
- package/dist/queries/passthrough-candidates.js +1 -1
- package/dist/queries/react-component-duplicates.js +1 -1
- package/dist/queries/react-hook-candidates.js +1 -1
- package/dist/queries/react-large-component-pressure.js +1 -1
- package/dist/queries/recent-duplicates.js +1 -1
- package/dist/queries/redundant-reexports.d.ts +4 -14
- package/dist/queries/redundant-reexports.js +1 -1
- package/dist/queries/refs.d.ts +4 -1
- package/dist/queries/refs.js +1 -1
- package/dist/queries/review.d.ts +188 -0
- package/dist/queries/review.js +2 -0
- package/dist/queries/similar-files.d.ts +7 -10
- package/dist/queries/similar-files.js +1 -1
- package/dist/queries/similar-signatures.js +1 -1
- package/dist/queries/similar.d.ts +19 -1
- package/dist/queries/similar.js +1 -1
- package/dist/queries/slice-cohesion.d.ts +205 -0
- package/dist/queries/slice-cohesion.js +2 -0
- package/dist/queries/source-inspection.d.ts +6 -202
- package/dist/queries/source-inspection.js +1 -1
- package/dist/queries/source-search.d.ts +2 -3
- package/dist/queries/source-search.js +1 -1
- package/dist/queries/stats.d.ts +1 -0
- package/dist/queries/stats.js +1 -1
- package/dist/queries/surface.js +1 -1
- package/dist/queries/symbols.js +1 -1
- package/dist/queries/system.d.ts +4 -2
- package/dist/queries/system.js +1 -1
- package/dist/queries/test-quality.d.ts +1 -1
- package/dist/queries/test-quality.js +1 -1
- package/dist/queries/twin-drift.d.ts +1 -1
- package/dist/queries/twin-drift.js +1 -1
- package/dist/queries/unused-imports.js +1 -1
- package/dist/queries/unused-params.d.ts +3 -15
- package/dist/queries/unused-params.js +1 -1
- package/dist/queries/vue-component-duplicates.js +1 -1
- package/dist/queries/vue-composable-candidates.js +1 -1
- package/dist/queries/vue-large-view-pressure.js +1 -1
- package/dist/query-service-fastpath.js +5 -5
- package/dist/query-service-server.js +4 -4
- package/dist/refs-CCBJG7WK.js +2 -0
- package/dist/refs-pagination-DRNLVU4S.js +2 -0
- package/dist/reindex-worker.js +79 -29
- package/dist/reindex.js +45 -45
- package/dist/repository-cache-worker.js +2 -0
- package/dist/runtime.d.ts +8 -8
- package/dist/runtime.js +3 -4
- package/dist/rust-semantic-session-server.js +1 -1
- package/dist/rust-semantic-session-worker.js +1 -1
- package/dist/rust-semantic-worker.js +1 -1
- package/dist/service-queries-2WAJI7R6.js +6 -0
- package/dist/source-inspection-91U9zdO3.d.ts +341 -0
- package/dist/{source-search-types-Dwz8KeuW.d.ts → source-search-types-DWGYNg8M.d.ts} +15 -2
- package/dist/stats-G7DIV6VU.js +2 -0
- package/dist/surface-IO55UALI.js +2 -0
- package/dist/system-ZBMSHJXU.js +2 -0
- package/dist/{queries/trace.d.ts → trace-BMjw3prn.d.ts} +1 -18
- package/dist/typescript-indexer.js +2 -0
- package/dist/typescript-mailbox-worker.js +1 -1
- package/dist/watch-server.js +3 -3
- package/docs/AGENT_GUIDE.md +19 -128
- package/docs/CLI_JSON_OUTPUT.md +21 -17
- package/docs/COMMAND_REFERENCE.md +34 -49
- package/docs/CURRENT_COMMANDS.md +123 -0
- package/docs/DETECTOR_EVIDENCE_CONTRACTS.md +0 -40
- package/docs/DETECTOR_GUIDE.md +27 -23
- package/docs/PRODUCT_VISION.md +135 -0
- package/docs/PROPERTY_TESTING.md +73 -0
- package/docs/REVIEW.md +76 -0
- package/docs/SKILLS.md +51 -0
- package/docs/WINDOWS_SIDECAR_RELEASE.md +12 -3
- package/docs/accuracy-audit-checklist.md +34 -0
- package/docs/analyzer-inventory.md +2 -2
- package/package.json +18 -80
- package/scripts/evidence-product-contract.mjs +7 -3
- package/scripts/record-review-coverage.mjs +118 -0
- package/scripts/scip-windows-provenance.mjs +29 -19
- package/skills/scip-architecture-review/SKILL.md +57 -0
- package/skills/scip-architecture-review/agents/openai.yaml +4 -0
- package/skills/scip-architecture-review/references/design-checks.md +17 -0
- package/skills/scip-explore/SKILL.md +15 -59
- package/skills/scip-explore/agents/openai.yaml +3 -3
- package/skills/scip-explore/references/external-evidence.md +2 -2
- package/skills/scip-explore/references/information-model.md +26 -29
- package/skills/scip-explore/scripts/capture-evidence.mjs +68 -34
- package/skills/scip-integrity-audit/SKILL.md +53 -181
- package/skills/scip-integrity-audit/agents/openai.yaml +3 -3
- package/skills/scip-integrity-audit/references/integrity-probes.md +27 -0
- package/skills/scip-plan/SKILL.md +39 -65
- package/skills/scip-plan/agents/openai.yaml +2 -2
- package/skills/scip-query/SKILL.md +28 -81
- package/skills/scip-query/agents/openai.yaml +2 -2
- package/skills/scip-query/references/command-guide.md +169 -0
- package/skills/scip-setup/SKILL.md +4 -2
- package/skills/scip-setup/agents/openai.yaml +3 -3
- package/dist/by-kind-H3P6BR5G.js +0 -2
- package/dist/call-graph-VTG2CUOQ.js +0 -2
- package/dist/chunk-26CT72HM.js +0 -2
- package/dist/chunk-2BMSSRBH.js +0 -2
- package/dist/chunk-2M2LSIMY.js +0 -7
- package/dist/chunk-2N6WBNDC.js +0 -29
- package/dist/chunk-2OOY75BW.js +0 -2
- package/dist/chunk-2USA3S3P.js +0 -3
- package/dist/chunk-2VAHDDLM.js +0 -133
- package/dist/chunk-2XWIUW5Z.js +0 -455
- package/dist/chunk-35NLDRZC.js +0 -2
- package/dist/chunk-3AF4TUFK.js +0 -3
- package/dist/chunk-3D4BOXW6.js +0 -20
- package/dist/chunk-3LO4FST5.js +0 -16
- package/dist/chunk-3WTY4LP2.js +0 -3
- package/dist/chunk-3Z5AMSK6.js +0 -29
- package/dist/chunk-4KBTHJLP.js +0 -2
- package/dist/chunk-5BIKR67W.js +0 -2
- package/dist/chunk-5PROPLHI.js +0 -2
- package/dist/chunk-5V7EPTII.js +0 -2
- package/dist/chunk-62LPZCBQ.js +0 -3
- package/dist/chunk-64O2JHQA.js +0 -2
- package/dist/chunk-6D4F5VWG.js +0 -10
- package/dist/chunk-6ERFBC3X.js +0 -3
- package/dist/chunk-6MFXCMZC.js +0 -2
- package/dist/chunk-6O7FACKB.js +0 -2
- package/dist/chunk-6TS3KOXR.js +0 -2
- package/dist/chunk-76QOU4PK.js +0 -3
- package/dist/chunk-7DUI77BN.js +0 -2
- package/dist/chunk-7F45LJKI.js +0 -2
- package/dist/chunk-7F7T6DCR.js +0 -2
- package/dist/chunk-7H6VHWWJ.js +0 -2
- package/dist/chunk-7HXT6YLU.js +0 -5
- package/dist/chunk-7KCZELVM.js +0 -2
- package/dist/chunk-7R4V5ES6.js +0 -6
- package/dist/chunk-7RIRIADH.js +0 -7
- package/dist/chunk-7ZLWLOGT.js +0 -2
- package/dist/chunk-AADQLOQ4.js +0 -38
- package/dist/chunk-AN76MGUE.js +0 -2
- package/dist/chunk-ANLNLY66.js +0 -2
- package/dist/chunk-AX7IDVFT.js +0 -2
- package/dist/chunk-B3X6KU75.js +0 -2
- package/dist/chunk-B7MPDEAK.js +0 -3
- package/dist/chunk-BBB5FBX4.js +0 -2
- package/dist/chunk-BJT7LSPK.js +0 -3
- package/dist/chunk-BJWFVAA5.js +0 -2
- package/dist/chunk-BKVWUP7Y.js +0 -2
- package/dist/chunk-BKZYTLGE.js +0 -35
- package/dist/chunk-BL6DCHQP.js +0 -2
- package/dist/chunk-BOW7SSQH.js +0 -43
- package/dist/chunk-C4RHHCKL.js +0 -7
- package/dist/chunk-C7C6AKAT.js +0 -117
- package/dist/chunk-CD6M6LS2.js +0 -16
- package/dist/chunk-CFE6PSG6.js +0 -2
- package/dist/chunk-CFNIGQMT.js +0 -2
- package/dist/chunk-CKBUBRYD.js +0 -2
- package/dist/chunk-CZW5MZ5B.js +0 -2
- package/dist/chunk-DBBZ63ZX.js +0 -2
- package/dist/chunk-DBN7DMJB.js +0 -18
- package/dist/chunk-DUULLZHZ.js +0 -3
- package/dist/chunk-DV5Y5NOS.js +0 -2
- package/dist/chunk-DZOIKCTM.js +0 -3
- package/dist/chunk-E4PKTOL3.js +0 -2
- package/dist/chunk-E7QR35ST.js +0 -2
- package/dist/chunk-EFSXAINW.js +0 -2
- package/dist/chunk-EHVEIEQN.js +0 -18
- package/dist/chunk-EHYDXE3Z.js +0 -2
- package/dist/chunk-EP63Y6LD.js +0 -2
- package/dist/chunk-EPX6NQN6.js +0 -4
- package/dist/chunk-ETC674NS.js +0 -5
- package/dist/chunk-F5GSBHC6.js +0 -3
- package/dist/chunk-FH3DGXC6.js +0 -2
- package/dist/chunk-FI7VGOR4.js +0 -16
- package/dist/chunk-FJF6VO2P.js +0 -2
- package/dist/chunk-FLMTCX5R.js +0 -2
- package/dist/chunk-FVFDOIM3.js +0 -2
- package/dist/chunk-G2HU5WRN.js +0 -2
- package/dist/chunk-G4ALYS4J.js +0 -2
- package/dist/chunk-G56I7K4W.js +0 -26
- package/dist/chunk-GC4DG2V5.js +0 -2
- package/dist/chunk-GG45PK4S.js +0 -4
- package/dist/chunk-GINH3YQU.js +0 -20
- package/dist/chunk-GTZZVLKJ.js +0 -2
- package/dist/chunk-GXXW5ZHH.js +0 -2
- package/dist/chunk-H5EXS3HM.js +0 -2
- package/dist/chunk-HAXXKRTD.js +0 -4
- package/dist/chunk-HEZWBAZY.js +0 -2
- package/dist/chunk-HMEWLMML.js +0 -2
- package/dist/chunk-HOBOVYPO.js +0 -11
- package/dist/chunk-HRFQ6GW5.js +0 -8
- package/dist/chunk-HX4X7KG3.js +0 -2
- package/dist/chunk-HYT2R7LX.js +0 -4
- package/dist/chunk-IKQVBVQL.js +0 -40
- package/dist/chunk-IW5XQG5G.js +0 -2
- package/dist/chunk-J6GLBBRK.js +0 -4
- package/dist/chunk-J7A4PWFX.js +0 -3
- package/dist/chunk-JCSAZ35V.js +0 -2
- package/dist/chunk-JDU2IV3A.js +0 -2
- package/dist/chunk-JFMEXGFE.js +0 -2
- package/dist/chunk-JFMI5SGB.js +0 -4
- package/dist/chunk-JJP37RGX.js +0 -57
- package/dist/chunk-JZ2A7LDM.js +0 -5
- package/dist/chunk-KMVGRIO2.js +0 -2
- package/dist/chunk-KNLQGXVH.js +0 -80
- package/dist/chunk-KVQCECPR.js +0 -2
- package/dist/chunk-KXXORBZ2.js +0 -4
- package/dist/chunk-L5KYH6U3.js +0 -35
- package/dist/chunk-L6XHYJPZ.js +0 -21
- package/dist/chunk-L7KTFEAV.js +0 -43
- package/dist/chunk-LDXHR5EL.js +0 -23
- package/dist/chunk-LEECKFCJ.js +0 -2
- package/dist/chunk-MHGDSBFX.js +0 -2
- package/dist/chunk-MLQVVDG3.js +0 -74
- package/dist/chunk-MOKUWRHO.js +0 -3
- package/dist/chunk-MPYAPMNE.js +0 -2
- package/dist/chunk-MTDBHTSF.js +0 -2
- package/dist/chunk-MV6SPXCR.js +0 -7
- package/dist/chunk-MWN53KRN.js +0 -60
- package/dist/chunk-MXNGIEPU.js +0 -3
- package/dist/chunk-N55KIE46.js +0 -2
- package/dist/chunk-NB4D3BNM.js +0 -2
- package/dist/chunk-NGKBOT6G.js +0 -23
- package/dist/chunk-NJGKXKQF.js +0 -2
- package/dist/chunk-NJQISBL4.js +0 -8
- package/dist/chunk-NJT3ZEKY.js +0 -16
- package/dist/chunk-NKMKZP6A.js +0 -2
- package/dist/chunk-NODFZ6ED.js +0 -2
- package/dist/chunk-NSM5IEVW.js +0 -2
- package/dist/chunk-NTGUVNR2.js +0 -3
- package/dist/chunk-NU3KFF2O.js +0 -57
- package/dist/chunk-NWLVNU66.js +0 -557
- package/dist/chunk-NYKZMCRC.js +0 -4
- package/dist/chunk-O6BUXZEH.js +0 -6
- package/dist/chunk-ODPDP7A4.js +0 -3
- package/dist/chunk-OIAPEKMT.js +0 -3
- package/dist/chunk-OIOC5EHF.js +0 -3
- package/dist/chunk-ONPPQM4G.js +0 -2
- package/dist/chunk-OUHEZBYI.js +0 -2
- package/dist/chunk-OVGYW7UD.js +0 -29
- package/dist/chunk-OYKU4B3Y.js +0 -2
- package/dist/chunk-POBJ6FR2.js +0 -5
- package/dist/chunk-PSZPMMWN.js +0 -2
- package/dist/chunk-PXTRBKRK.js +0 -3
- package/dist/chunk-Q5JRIHT3.js +0 -4
- package/dist/chunk-Q7ATHARX.js +0 -2
- package/dist/chunk-Q7CSKIDM.js +0 -5
- package/dist/chunk-QBQE7ZJ5.js +0 -3
- package/dist/chunk-QH22UIXP.js +0 -5
- package/dist/chunk-QXCKQTKR.js +0 -60
- package/dist/chunk-RBAD4GJ2.js +0 -13
- package/dist/chunk-RMDPFPNW.js +0 -2
- package/dist/chunk-ROPJDEJZ.js +0 -4
- package/dist/chunk-RVZC6TJE.js +0 -2
- package/dist/chunk-S4QZBKSR.js +0 -3
- package/dist/chunk-SCPMZ73U.js +0 -2
- package/dist/chunk-SIAP5RGI.js +0 -73
- package/dist/chunk-SIX4RFR3.js +0 -3
- package/dist/chunk-SKKXTABJ.js +0 -16
- package/dist/chunk-SSRFUQBD.js +0 -2
- package/dist/chunk-SYVJEEUJ.js +0 -3
- package/dist/chunk-T3CZAZSI.js +0 -8
- package/dist/chunk-T6DWDI5E.js +0 -3
- package/dist/chunk-T6HRIROJ.js +0 -7
- package/dist/chunk-TAA7HXHE.js +0 -2
- package/dist/chunk-TJ2JQYT3.js +0 -2
- package/dist/chunk-TULNMD5T.js +0 -368
- package/dist/chunk-U2FPY5XA.js +0 -3
- package/dist/chunk-U3SXIMII.js +0 -38
- package/dist/chunk-U6KCHXJ4.js +0 -2
- package/dist/chunk-UH3XSKS5.js +0 -9
- package/dist/chunk-UIFUZVCC.js +0 -2
- package/dist/chunk-UXKURIVI.js +0 -2
- package/dist/chunk-V2RBODHL.js +0 -2
- package/dist/chunk-VBKUWB6N.js +0 -2
- package/dist/chunk-VBV6ALJE.js +0 -2
- package/dist/chunk-VDGFWCQV.js +0 -2
- package/dist/chunk-VDSDOEWF.js +0 -2
- package/dist/chunk-VZPWVCLN.js +0 -20
- package/dist/chunk-WDSFQDPN.js +0 -2
- package/dist/chunk-WFA35BGR.js +0 -7
- package/dist/chunk-WLMP3OCW.js +0 -2
- package/dist/chunk-WSA52GOR.js +0 -2
- package/dist/chunk-WYPL7GF7.js +0 -2
- package/dist/chunk-X3YVZAKZ.js +0 -5
- package/dist/chunk-X6OGVFIT.js +0 -2
- package/dist/chunk-XDAUYDFT.js +0 -2
- package/dist/chunk-XKXTR6ZI.js +0 -9
- package/dist/chunk-Y5DFAW5W.js +0 -4
- package/dist/chunk-YSYPDRD5.js +0 -3
- package/dist/chunk-ZFVPWH62.js +0 -5
- package/dist/chunk-ZGIHTH27.js +0 -2
- package/dist/chunk-ZGIQN2SX.js +0 -2
- package/dist/chunk-ZHG4WAHR.js +0 -12
- package/dist/chunk-ZKB2XUEN.js +0 -4
- package/dist/chunk-ZLMXIQLC.js +0 -21
- package/dist/chunk-ZMCQIHI4.js +0 -2
- package/dist/code-TAVIKWJI.js +0 -2
- package/dist/code-result-json-5FEFQCAQ.js +0 -2
- package/dist/command-descriptors-7BKH53Y3.js +0 -343
- package/dist/dataflow-GFBTVDH3.js +0 -2
- package/dist/dependence-slice-GWGQCODG.js +0 -2
- package/dist/deps-4QHVDPYA.js +0 -2
- package/dist/direct-navigation-4UBC6HNW.js +0 -3
- package/dist/entry-map-QCTF4RVY.js +0 -2
- package/dist/files-M2UBF5HJ.js +0 -2
- package/dist/graph-evidence-Bjyky2V4.d.ts +0 -126
- package/dist/hierarchy-2UIHRLW4.js +0 -2
- package/dist/imports-WIE3YZOB.js +0 -2
- package/dist/members-YKD636DA.js +0 -2
- package/dist/methods-VDF4IMYG.js +0 -2
- package/dist/next-anchor-candidates-BwMczMvX.d.ts +0 -90
- package/dist/output-continuation-command-4UMDOOLO.js +0 -3
- package/dist/output-pagination-2GME6OPY.js +0 -19
- package/dist/project-reindex-XEQTRCV5.js +0 -3
- package/dist/queries/anchors.d.ts +0 -123
- package/dist/queries/anchors.js +0 -2
- package/dist/queries/complexity-hotspots.d.ts +0 -40
- package/dist/queries/complexity-hotspots.js +0 -2
- package/dist/queries/convergence.d.ts +0 -33
- package/dist/queries/convergence.js +0 -2
- package/dist/queries/dataflow.d.ts +0 -77
- package/dist/queries/dataflow.js +0 -2
- package/dist/queries/deep-chains.d.ts +0 -5
- package/dist/queries/deep-chains.js +0 -2
- package/dist/queries/extract-candidates.d.ts +0 -79
- package/dist/queries/extract-candidates.js +0 -2
- package/dist/queries/isolated.d.ts +0 -24
- package/dist/queries/isolated.js +0 -2
- package/dist/queries/plan-context.d.ts +0 -33
- package/dist/queries/plan-context.js +0 -2
- package/dist/queries/reference-neighborhood.d.ts +0 -4
- package/dist/queries/reference-neighborhood.js +0 -2
- package/dist/queries/reference-reachability.d.ts +0 -48
- package/dist/queries/reference-reachability.js +0 -2
- package/dist/queries/self-audit.d.ts +0 -69
- package/dist/queries/self-audit.js +0 -2
- package/dist/queries/similar-chains.d.ts +0 -48
- package/dist/queries/similar-chains.js +0 -2
- package/dist/queries/slice.d.ts +0 -4
- package/dist/queries/slice.js +0 -2
- package/dist/queries/stale-abstractions.d.ts +0 -72
- package/dist/queries/stale-abstractions.js +0 -2
- package/dist/queries/system-map.d.ts +0 -449
- package/dist/queries/system-map.js +0 -2
- package/dist/queries/trace.js +0 -2
- package/dist/queries/twin-ab.d.ts +0 -66
- package/dist/queries/twin-ab.js +0 -2
- package/dist/queries/value-flow.d.ts +0 -43
- package/dist/queries/value-flow.js +0 -2
- package/dist/queries/wrapper-candidates.d.ts +0 -49
- package/dist/queries/wrapper-candidates.js +0 -2
- package/dist/refs-JNK5CLM7.js +0 -2
- package/dist/refs-pagination-6BLRYGMV.js +0 -2
- package/dist/slice-PHPVNCWX.js +0 -2
- package/dist/source-snippet-_wrcgmZc.d.ts +0 -15
- package/dist/stats-OOJ74B32.js +0 -2
- package/dist/surface-MQX5MPIV.js +0 -2
- package/dist/symbol-resolution-DBLVXLBC.js +0 -2
- package/dist/system-JOPKV4OG.js +0 -2
- package/dist/trace-I2P2YFH4.js +0 -2
- package/dist/value-flow-JJVMF7NP.js +0 -2
- package/skills/concrete-plan/SKILL.md +0 -8
- package/skills/concrete-plan/agents/openai.yaml +0 -4
- package/skills/conductor/SKILL.md +0 -110
- package/skills/conductor/agents/openai.yaml +0 -4
- package/skills/principal-maintainability-review/SKILL.md +0 -273
- package/skills/principal-maintainability-review/agents/openai.yaml +0 -4
- package/skills/scip-calibrate/SKILL.md +0 -102
- package/skills/scip-calibrate/agents/openai.yaml +0 -4
- package/skills/scip-claim-audit/SKILL.md +0 -113
- package/skills/scip-claim-audit/agents/openai.yaml +0 -4
- package/skills/scip-probe-reachability/SKILL.md +0 -93
- package/skills/scip-probe-reachability/agents/openai.yaml +0 -4
- package/skills/scip-root-cause/SKILL.md +0 -160
- package/skills/scip-root-cause/agents/openai.yaml +0 -4
- package/skills/scip-system-compression/SKILL.md +0 -252
- package/skills/scip-system-compression/agents/openai.yaml +0 -4
- package/skills/scip-system-compression/references/compression-atlas.md +0 -116
- package/skills/scip-system-compression/references/compression-patterns.md +0 -87
- package/skills/scip-twin-drift/SKILL.md +0 -109
- package/skills/scip-twin-drift/agents/openai.yaml +0 -4
package/dist/chunk-DZOIKCTM.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a as He}from"./chunk-7R4V5ES6.js";import{b as Pe}from"./chunk-7H6VHWWJ.js";import{c as je}from"./chunk-ZGIQN2SX.js";import{d as Te}from"./chunk-Y5DFAW5W.js";import{i as We}from"./chunk-NU3KFF2O.js";import{e as E}from"./chunk-BOJ5SVE2.js";import{c as Ue}from"./chunk-2BMSSRBH.js";import{b as ge}from"./chunk-U3SXIMII.js";import{d as Ke,e as Be,f as ze}from"./chunk-SKKXTABJ.js";import{a as x,b as U}from"./chunk-FLMTCX5R.js";import{C as qe,d as te,k as oe,v as be}from"./chunk-C7C6AKAT.js";import{A as Xe,n as Q}from"./chunk-RBAD4GJ2.js";import{K as $e}from"./chunk-ZLMXIQLC.js";import{j as Re,k as we}from"./chunk-ETC674NS.js";import{d as Ge}from"./chunk-JZ2A7LDM.js";var Ye=4,bn=3,gn=12,Sn=48,vn=64,J=10,V=6,An=24,Mn=320,Ie=6,Dn=12,Ln=1,Cn=4,Rn=7,wn=12,_e="source-construct:",Tn=96,Pn=32,Qe=4,In=32,xn=8,Ve=new Set(["a","an","and","are","as","at","be","become","becomes","by","can","does","for","from","how","in","into","is","it","its","of","on","or","that","the","their","then","this","through","to","what","when","where","which","with"]);function Bt(e,n,i={}){let a=En(n),r=bt(n);if(a.length===0)throw new Error("Anchor discovery requires at least one non-trivial repository term.");let o=i.limit??Ye,t=i.full===!0;if(!Number.isSafeInteger(o)||o<=0)throw new RangeError(`anchor group limit must be a positive safe integer; received ${o}`);let s=new Ue(e),m=s.scopedDefinitions(i.scope).filter(g=>!oe(g.symbol)),l=[...m],c=new Map(l.map(g=>[g.symbol,g])),d=new Map;for(let g of m)Ze(d,g,a);let u=je(e,{scope:i.scope});for(let g of u.files){let fe=be(e,g.relativePath).filter(O=>!oe(O.symbol));if(fe.length===0)continue;let ne=Re(g.text);for(let O=0;O<ne.length;O+=1){let pe=T(ne[O]??""),ae=a.filter(N=>pe.has(N));if(ae.length===0)continue;let L=qe(fe,O);if(!(!L||oe(L.symbol)))for(let N of ae)le(d,L,N,"source",g.relativePath,O)}}let h=Je(d),y=[...d.values()].map(g=>Se(g,h,r)).sort(R),b=kn(u.files,y,a),v=-1;for(let g of b){let z=be(e,g.relativePath),fe=z.filter(L=>!oe(L.symbol)),ne=Q(e,g.relativePath)?.callables??[],O=new Map,pe=L=>{let N=`${L.startLine}\0${L.endLine}\0${L.name}`,Y=O.get(N);if(Y)return Y;let G=Fn(g.relativePath,z,L,()=>v--);return G?(O.set(N,G),l.push(G),c.set(G.symbol,G),Ze(d,G,a),G):null};for(let L of ne){let N=T(L.name);a.some(Y=>N.has(Y))&&pe(L)}if(ne.length===0)continue;let ae=Re(g.text);for(let L=0;L<ae.length;L+=1){let N=T(ae[L]??""),Y=a.filter(Ce=>N.has(Ce));if(Y.length===0)continue;let G=$e(ne,L),ce=G?pe(G):null;if(!ce)continue;let Ne=en(fe,L);if(en(Ne?[Ne,ce]:[ce],L)?.symbol===ce.symbol)for(let Ce of Y)le(d,ce,Ce,"source",g.relativePath,L)}}let S=Je(d),M=new Map(u.files.map(g=>[g.relativePath,g.text.split(/\r?\n/u)]));for(let g of d.values()){let z=M.get(g.definition.relativePath);z&&(g.sourceCharacters=z.slice(g.definition.startLine,g.definition.endLine+1).join(`
|
|
2
|
-
`).length)}let f=[...d.values()].map(g=>Se(g,S,r)).sort(R),C=Math.min(f.length,Math.max(gn,o*bn)),A=t?f:re([...f.slice(0,C),...[...f].sort(Ee).slice(0,Math.max(Sn,C)),...mt(f,a),...dt(f,a,S)]),P=A.length,I=A.map(g=>c.get(g.symbol)).filter(g=>g?.isFunctionLike===!0),H=_n(l),F=On(e,s,A,I,c,H,new Set(d.keys()),i.semantic!==!1),B=$n(F,A,d,S,c),k=Xn(B,S,a),q=et(e,s,F,d,S,l,c,i.semantic!==!1),D=[...Kn(e,s,B,c,S,i.semantic!==!1),...k,...B,...q].map(g=>({...g,queryPathMatches:ht(g)})).sort((g,z)=>Z(g,z,S)),_=t?D:yt(D,o,S),p=a.filter(g=>S.has(g)),w=a.filter(g=>!S.has(g)),ee=Math.max(0,f.length-P),ye=Math.max(0,D.length-_.length)+ee,pn=t?f.length:Math.min(f.length,o+Ye);return{query:n,queryPathFragments:r,normalizedTerms:a,matchedTerms:p,unmatchedTerms:w,groups:_,candidateRoots:f,candidateRootCount:f.length,analyzedRootCount:P,omittedRootCount:ee,omittedGroupCount:ye,scannedFiles:u.files.length,scannedBytes:u.scannedBytes,recoveryCommand:ye===0?null:`scip-query anchors ${De(n)}${i.scope?` --scope ${De(i.scope)}`:""} --limit ${pn}`}}function En(e){let n=Le(e).filter(i=>!Ve.has(i.toLocaleLowerCase())).map(Oe).filter(i=>i.length>=3&&!Ve.has(i));return[...new Set(n)]}function Ze(e,n,i){let a=T(n.leaf),r=T(n.relativePath),o=T(n.documentation??"");for(let s of i)a.has(s)&&le(e,n,s,"symbol"),r.has(s)&&le(e,n,s,"path"),o.has(s)&&le(e,n,s,"documentation");let t=e.get(n.symbol);t&&(t.symbolPhraseLength=St(n.leaf,i))}function le(e,n,i,a,r,o){let t=e.get(n.symbol)??{definition:n,matches:new Map,symbolPhraseLength:0},s=t.matches.get(i)??{sources:new Set,locations:new Map};s.sources.add(a),r!==void 0&&o!==void 0&&s.locations.set(`${r}\0${o}`,{file:r,line:o}),t.matches.set(i,s),e.set(n.symbol,t)}function Je(e){let n=new Map;for(let i of e.values())for(let a of i.matches.keys())n.set(a,(n.get(a)??0)+1);return n}function Fn(e,n,i,a){let r=n[0]?.documentId;if(r===void 0||n.find(s=>s.isFunctionLike&&s.leaf===i.name&&s.startLine===i.startLine&&s.endLine===i.endLine))return null;let t=a();return{documentId:r,symbolId:t,symbol:`${_e}${e}:${i.startLine}:${i.endLine}:${i.name}`,relativePath:e,startLine:i.startLine,startChar:0,endLine:i.endLine,endChar:0,leaf:i.name,parentTypeName:null,isFunctionLike:!0,isTypeLike:!1,kind:null,documentation:null,enclosingSymbol:null}}function kn(e,n,i){let a=new Set(n.slice(0,Tn).map(t=>t.file)),r=new Set(i),o=e.map(t=>{let s=T(t.relativePath),m=t.relativePath.slice(t.relativePath.lastIndexOf("/")+1).replace(/\.[^.]+$/u,""),l=T(m),c=[...s].filter(u=>r.has(u)).length,d=[...l].filter(u=>r.has(u)).length;return{file:t,score:d*4+c}}).filter(t=>t.score>0).sort((t,s)=>s.score-t.score||x(U(t.file.relativePath))-x(U(s.file.relativePath))||t.file.relativePath.localeCompare(s.file.relativePath)).slice(0,Pn);for(let t of o)a.add(t.file.relativePath);return e.filter(t=>a.has(t.relativePath))}function _n(e){let n=new Map;for(let i of e){if(!$(i))continue;let a=`${i.relativePath}\0${E(i.leaf)}`,r=n.get(a)??[];r.push(i),n.set(a,r)}return n}function en(e,n){return e.filter(i=>i.startLine<=n&&i.endLine>=n).sort((i,a)=>i.endLine-i.startLine-(a.endLine-a.startLine)||Number($(a))-Number($(i))||i.startLine-a.startLine||i.symbol.localeCompare(a.symbol))[0]}function $(e){return e.symbol.startsWith(_e)}function W(e){return $(e)?e.leaf:te(e.symbol)}function Se(e,n,i=[]){let a=e.definition,r=[...e.matches.entries()].map(([l,c])=>({term:l,sources:[...c.sources].sort(vt),locations:[...c.locations.values()].sort(fn).slice(0,3)})).sort((l,c)=>l.term.localeCompare(c.term)),o=r.filter(l=>l.sources.some(c=>c!=="source")).map(l=>l.term),t=r.filter(l=>l.sources.includes("symbol")).map(l=>l.term),s=r.reduce((l,c)=>l+1/Math.max(1,n.get(c.term)??1),0),m=r.filter(l=>l.sources.includes("symbol")).reduce((l,c)=>l+1/Math.max(1,n.get(c.term)??1),0);return{symbol:a.symbol,label:W(a),leaf:a.leaf,file:a.relativePath,line:a.startLine,endLine:a.endLine,kind:a.isFunctionLike?"callable":a.isTypeLike?"type":"symbol",fileKind:U(a.relativePath),matches:r,focusLocations:Dt(e,n),matchedTerms:r.map(l=>l.term),symbolMatchedTerms:t,symbolPhraseLength:e.symbolPhraseLength,identityMatchedTerms:o,rarity:s,symbolRarity:m,queryPathMatches:gt(a.relativePath,i),...e.sourceCharacters===void 0?{}:{sourceCharacters:e.sourceCharacters}}}function On(e,n,i,a,r,o,t,s){let m=a.filter(b=>!$(b)),l=n.calleeMap(m,{additive:!1,semantic:s}),c=new Map,d=new Map;for(let b of i){let v=r.get(b.symbol),S=v?$(v)?nn(e,v,r,o,1):ve(e,v,l.get(v.symbolId)??[],r,1,t):[];c.set(b.symbol,S);for(let M of S){let f=r.get(M.toSymbol);f?.isFunctionLike&&(!v||!$(v)||$(f))&&d.set(f.symbol,f)}}let u=[...d.values()],h=n.calleeMap(u.filter(b=>!$(b)),{additive:!1,semantic:s}),y=new Map;for(let b of u)y.set(b.symbol,$(b)?nn(e,b,r,o,2):ve(e,b,h.get(b.symbolId)??[],r,2,t));return i.map(b=>{let v=c.get(b.symbol)??[],S=v.flatMap(f=>y.get(f.toSymbol)??[]),M=K([...v,...S]);return{root:b,relations:M,nodeSymbols:new Set([b.symbol,...M.flatMap(f=>[f.fromSymbol,f.toSymbol])])}})}function ve(e,n,i,a,r,o=new Set){let t=new Map;for(let s of i){let m=a.get(s.symbol);if(!m?.isFunctionLike||m.symbol===n.symbol||s.source==="ast-callsite"&&!Gn(e,n,m,s.callsiteLine))continue;let l=t.get(m.symbol);(!l||pt(s,l)<0)&&t.set(m.symbol,s)}return[...t.entries()].map(([s,m])=>{let l=a.get(s);return{kind:"call",fromSymbol:n.symbol,fromLabel:te(n.symbol),fromFile:n.relativePath,toSymbol:l.symbol,toLabel:te(l.symbol),toFile:l.relativePath,depth:r,strength:ke(m.source),evidence:m.source,callsiteLine:m.callsiteLine??Nn(e,n,l)}}).sort((s,m)=>Number(o.has(m.toSymbol))-Number(o.has(s.toSymbol))||X(s,m)).slice(0,vn)}function nn(e,n,i,a,r){let o=ge(e,n.relativePath,n.startLine,n.endLine).targets.flatMap(t=>{let s=i.get(t.definition.symbol)??t.definition;return!s.isFunctionLike||s.symbol===n.symbol?[]:[{kind:"call",fromSymbol:n.symbol,fromLabel:W(n),fromFile:n.relativePath,toSymbol:s.symbol,toLabel:W(s),toFile:s.relativePath,depth:r,strength:"exact",evidence:"scip-occurrence-callsite",callsiteLine:t.sourceLine}]});for(let t of Pe(e,n.relativePath,{ranges:[{startLine:n.startLine,endLine:n.endLine}],excludeIndexedTargets:!1}).targets){let s=[...a.get(`${t.targetFile}\0${E(t.calleeLeaf)}`)??[],...be(e,t.targetFile).filter(m=>m.isFunctionLike&&E(m.leaf)===t.calleeLeaf)].find(m=>m.startLine===t.targetStartLine&&m.endLine===t.targetEndLine);!s||s.symbol===n.symbol||o.push({kind:"call",fromSymbol:n.symbol,fromLabel:W(n),fromFile:n.relativePath,toSymbol:s.symbol,toLabel:W(s),toFile:s.relativePath,depth:r,strength:t.strength==="exact"?"exact":"derived",evidence:"ast-member-import-candidate",callsiteLine:t.line})}for(let t of Q(e,n.relativePath)?.callSites??[]){if(t.line<n.startLine||t.line>n.endLine||t.memberAccess)continue;let s=(a.get(`${n.relativePath}\0${E(t.calleeLeaf)}`)??[]).filter(l=>l.symbol!==n.symbol);if(s.length!==1)continue;let m=s[0];o.push({kind:"call",fromSymbol:n.symbol,fromLabel:W(n),fromFile:n.relativePath,toSymbol:m.symbol,toLabel:W(m),toFile:m.relativePath,depth:r,strength:"derived",evidence:"ast-callsite",callsiteLine:t.line})}return K(o).sort(X)}function Nn(e,n,i){let a=E(i.leaf);return Q(e,n.relativePath)?.callSites.find(r=>r.line>=n.startLine&&r.line<=n.endLine&&E(r.calleeLeaf)===a)?.line??null}function Gn(e,n,i,a){if(a===void 0)return!1;let r=E(i.leaf);return Q(e,n.relativePath)?.callSites.some(o=>{if(o.line!==a)return!1;if(E(o.calleeLeaf)===r)return!0;let t=Xe(e,n.relativePath,o.calleeLeaf);return t!==null&&E(t.importedName)===r&&Ge(t.sourcePath,i.relativePath)})??!1}function $n(e,n,i,a,r){let o=new Map(n.map((c,d)=>[c.symbol,d])),t=n.map((c,d)=>d),s=c=>{let d=c;for(;t[d]!==d;)d=t[d];for(;t[c]!==c;){let u=t[c];t[c]=d,c=u}return d},m=(c,d)=>{let u=s(c),h=s(d);u!==h&&(t[h]=u)};for(let c of e){let d=o.get(c.root.symbol);if(d!==void 0)for(let u of c.nodeSymbols){let h=o.get(u);h!==void 0&&m(d,h)}}let l=new Map;for(let c=0;c<n.length;c+=1){let d=s(c),u=l.get(d)??[];u.push(n[c]),l.set(d,u)}return[...l.values()].map((c,d)=>{let u=new Set(c.map(f=>f.symbol)),h=K(e.filter(f=>u.has(f.root.symbol)).flatMap(f=>f.relations)).sort(X),y=new Map(c.map(f=>[f.symbol,f]));for(let f of new Set(h.flatMap(C=>[C.fromSymbol,C.toSymbol]))){let C=i.get(f);if(C)y.has(f)||y.set(f,Se(C,a));else{let A=r.get(f);A&&y.set(f,hn(A))}}let b=at(c,h,y),v=c.filter(f=>h.some(C=>C.fromSymbol===f.symbol)).length,S=[...new Set(c.flatMap(f=>f.matchedTerms))].sort(),M=it(h,b,u,y);return{id:`anchor-set:${d+1}:${de(c[0])}`,kind:"connected-flow",roots:[...c].sort(R),keyAnchors:b,candidateOwnerCount:b.length,omittedCandidateOwners:[],ownerRecoveryCommands:[],upstreamEntries:[],matchedTerms:S,relations:M,relationCount:h.length,orchestrationRootCount:v,omittedRelations:Math.max(0,h.length-J),systemMapCommand:he(b,h,S)}})}function Xn(e,n,i){let a=new Map(i.map((o,t)=>[o,t])),r=[];for(let o=0;o<e.length;o+=1){let t=e[o],s=tn(t);if(s.size!==0)for(let m=o+1;m<e.length;m+=1){let l=e[m],c=tn(l),d=[...s].filter(A=>c.has(A));if(d.length===0||![...s].some(A=>!c.has(A))||![...c].some(A=>!s.has(A)))continue;let u=qn(t,l);if(u.length<2)continue;let h=K([...t.relations,...l.relations]).sort(X),y=h.slice(0,J),b=re([...t.roots,...l.roots]).sort(R),v=[...new Set([...t.matchedTerms,...l.matchedTerms])].sort(),S=d.sort((A,P)=>(a.get(A)??Number.MAX_SAFE_INTEGER)-(a.get(P)??Number.MAX_SAFE_INTEGER)||A.localeCompare(P)),M=+(t.relationCount>0)+ +(l.relationCount>0),f=+((t.orchestrationRootCount??0)>0)+ +((l.orchestrationRootCount??0)>0),C=Math.min(...S.map(A=>n.get(A)??Number.MAX_SAFE_INTEGER));r.push({sharedOrder:Math.min(...S.map(A=>a.get(A)??Number.MAX_SAFE_INTEGER)),sharedFrequency:C,connectedSides:M,orchestrationSides:f,group:{id:`parallel-paths:${de(t.roots[0])}:${de(l.roots[0])}`,kind:"parallel-paths",roots:b,keyAnchors:u,candidateOwnerCount:u.length,omittedCandidateOwners:[],ownerRecoveryCommands:[],upstreamEntries:[...t.upstreamEntries,...l.upstreamEntries],matchedTerms:v,relations:y,relationCount:h.length,parallelConnectedSides:M,parallelOrchestrationSides:f,parallelSharedPathTerms:S,parallelSharedPathFrequency:C,orchestrationRootCount:(t.orchestrationRootCount??0)+(l.orchestrationRootCount??0),omittedRelations:Math.max(0,h.length-y.length),systemMapCommand:he(u,h,v)}})}}return r.sort((o,t)=>o.sharedFrequency-t.sharedFrequency||t.orchestrationSides-o.orchestrationSides||t.connectedSides-o.connectedSides||o.sharedOrder-t.sharedOrder||t.group.matchedTerms.length-o.group.matchedTerms.length||Z(o.group,t.group,n)).slice(0,wn).map(o=>o.group)}function tn(e){return new Set(e.roots.flatMap(n=>n.matches.filter(i=>i.sources.includes("path")).map(i=>i.term)))}function qn(e,n){return re([on(e),on(n)].filter(i=>i!==void 0))}function on(e){let n=new Set(e.keyAnchors.map(a=>a.symbol)),i=new Map;for(let a of e.relations)!n.has(a.fromSymbol)||!n.has(a.toSymbol)||i.set(a.fromSymbol,(i.get(a.fromSymbol)??0)+1);return[...e.keyAnchors].sort((a,r)=>+((i.get(r.symbol)??0)>0)-+((i.get(a.symbol)??0)>0)||rn(r)-rn(a)||r.identityMatchedTerms.length-a.identityMatchedTerms.length||r.symbolMatchedTerms.length-a.symbolMatchedTerms.length||(i.get(r.symbol)??0)-(i.get(a.symbol)??0)||R(a,r))[0]}function rn(e){return e.matchedTerms.length+e.identityMatchedTerms.length*2+(e.queryPathMatches?.length??0)*4}function Kn(e,n,i,a,r,o){let t=We(e);if(!t||t.links.length===0||i.length<2)return[];let s=new Map(t.observations.map(h=>[h.id,h])),m=new Map,l=new Map,c=[...i].sort((h,y)=>Z(h,y,r)).slice(0,Dn),d=t.links.filter(h=>h.strength!=="candidate").sort((h,y)=>j(y.strength)-j(h.strength)||y.matchedKeyParts.length-h.matchedKeyParts.length||h.id.localeCompare(y.id));for(let h of c)for(let y of d){let b=s.get(y.from),v=s.get(y.to);if(!b||!v||!Bn(h,b,a))continue;let S=zn(h,b,a);if(!S)continue;let M=m.get(v.id)??jn(e,n,v,a,o,Cn);if(m.set(v.id,M),M.reachedSymbols.size===0)continue;let f=i.filter(D=>D.id!==h.id&&Un(D).some(_=>M.reachedSymbols.has(_))&&xe(S,D)>=2).sort((D,_)=>xe(S,_)-xe(S,D)||Z(D,_,r)).slice(0,Ln);if(f.length===0)continue;let C=[h.id,b.id,...f.map(D=>D.id).sort()].join("\0");if(l.has(C))continue;let A=new Set(f.flatMap(ue)),P=Zn(me(v),A,M.relations);if(P.length===0)continue;let I=Vn(b,v,y.joinRule,y.matchedKeyParts,y.strength),H=K([I,...M.relations,...h.relations,...f.flatMap(D=>D.relations)]),F=Jn([I,...P],H,h,f),B=re([S,...f.flatMap(D=>D.roots)]).sort(R),k=re([S,...f.flatMap(D=>D.keyAnchors)]).slice(0,Rn),q=[...new Set([...S.matchedTerms,...f.flatMap(D=>D.matchedTerms)])].sort(),ie=Wn(e,n,S,a,o);B.length===0||k.length<2||l.set(C,{id:`cross-boundary-set:${de(S)}:${l.size+1}`,kind:"cross-boundary-flow",roots:B,keyAnchors:k,candidateOwnerCount:k.length,omittedCandidateOwners:[],ownerRecoveryCommands:[],upstreamEntries:ie,matchedTerms:q,relations:F,relationCount:H.length,omittedRelations:Math.max(0,H.length-F.length),systemMapCommand:he(k,H,q)})}let u=new Map;for(let[h,y]of l){let b=h.slice(0,h.indexOf("\0")),v=u.get(b);(!v||Z(y,v,r)<0)&&u.set(b,y)}return[...u.values()]}function Bn(e,n,i){let a=new Set(ue(e));return n.owner.symbol&&a.has(n.owner.symbol)?!0:[...a].map(r=>i.get(r)).some(r=>r?.relativePath===n.source.file&&r.startLine<=n.source.startLine&&r.endLine>=n.source.endLine)}function zn(e,n,i){let a=re([...e.roots,...e.keyAnchors]);if(n.owner.symbol){let r=a.find(o=>o.symbol===n.owner.symbol);if(r)return r}return a.find(r=>{let o=i.get(r.symbol);return o?.relativePath===n.source.file&&o.startLine<=n.source.startLine&&o.endLine>=n.source.endLine})??null}function ue(e){return[...new Set([...e.roots.map(n=>n.symbol),...e.keyAnchors.map(n=>n.symbol),...e.relations.flatMap(n=>[n.fromSymbol,n.toSymbol])])]}function Un(e){return[...new Set([...e.roots,...e.keyAnchors].map(n=>n.symbol))]}function xe(e,n){let i=T(e.leaf),a=[...n.roots,...n.keyAnchors].map(o=>T(o.leaf)),r=0;for(let o of a){let t=0;for(let s of i)o.has(s)&&(t+=1);r=Math.max(r,t)}return r}function Wn(e,n,i,a,r){let o=a.get(i.symbol);if(!o?.isFunctionLike)return[];let t=n.callerFileMap([o],{semantic:r,sourceFallback:!0}).get(o.symbolId);if(!t)return[];let s=T(i.leaf);return[...t].filter(m=>m!==i.file&&U(m)!=="test").flatMap(m=>{let l=Q(e,m);return(l?.callSites??[]).filter(c=>E(c.calleeLeaf)===E(i.leaf)).flatMap(c=>{let d=(l?.callables??[]).filter(h=>h.startLine<=c.line&&h.endLine>=c.line).sort((h,y)=>h.endLine-h.startLine-(y.endLine-y.startLine)||h.startLine-y.startLine)[0];if(!d)return[];let u=[...T(d.name)].filter(h=>s.has(h)).length;return u>=2?[{name:d.name,file:m,line:d.startLine,endLine:d.endLine,callsiteLine:c.line,overlap:u}]:[]})}).sort((m,l)=>l.overlap-m.overlap||m.file.localeCompare(l.file)||m.line-l.line).slice(0,1).map(({name:m,file:l,line:c,endLine:d,callsiteLine:u})=>({name:m,file:l,line:c,endLine:d,callsiteLine:u}))}function jn(e,n,i,a,r,o){let t=Hn(e,i,a),s=t.map(({definition:u,evidence:h,line:y})=>({kind:"call",fromSymbol:me(i),fromLabel:Ae(i),fromFile:i.source.file,toSymbol:u.symbol,toLabel:te(u.symbol),toFile:u.relativePath,depth:1,strength:h==="scip-occurrence-callsite"?"exact":"derived",evidence:h,callsiteLine:y})),m=Yn(e,i);s.push(...m.relations);let l=un([...t.map(u=>u.definition),...m.definitions]),c=l,d=new Set(c.map(u=>u.symbol));for(let u=2;u<=o+1&&c.length>0;u+=1){let h=n.calleeMap(c,{additive:!1,semantic:r}),y=new Map;for(let b of c){let v=ve(e,b,h.get(b.symbolId)??[],a,u);s.push(...v);for(let S of v){let M=a.get(S.toSymbol);M?.isFunctionLike&&!d.has(M.symbol)&&y.set(M.symbol,M)}}c=[...y.values()];for(let b of c)d.add(b.symbol)}return{entryDefinitions:l,relations:K(s),reachedSymbols:new Set([...l.map(u=>u.symbol),...s.flatMap(u=>[u.fromSymbol,u.toSymbol])])}}function Hn(e,n,i){let a=n.owner.symbol?i.get(n.owner.symbol):void 0;if(a?.isFunctionLike&&!oe(a.symbol))return[{definition:a,evidence:"scip-occurrence-callsite",line:n.source.startLine}];let r=we(e,n.source.file),o=Te(e,n.source.file,0,Math.max(0,r.length-1),[n.source.startLine]),t=ge(e,n.source.file,o.startLine,o.endLine).targets.map(c=>({definition:c.definition,evidence:"scip-occurrence-callsite",line:c.sourceLine})),s=Q(e,n.source.file),m=ze(e),l=(s?.callSites??[]).flatMap(c=>{if(c.line<o.startLine||c.line>o.endLine)return[];let d=Ke(n.source.file,m.get(c.calleeLeaf)??[]),u=Be(e,n.source.file,d,c.memberAccess,c.calleeQualifier),h=u?i.get(u.symbol):void 0;return h?.isFunctionLike?[{definition:h,evidence:"ast-callsite",line:c.line}]:[]});return Qn([...t,...l])}function Yn(e,n){let i=we(e,n.source.file),a=Te(e,n.source.file,0,Math.max(0,i.length-1),[n.source.startLine]),r=Pe(e,n.source.file,{ranges:[a],excludeIndexedTargets:!1}).targets,o=[],t=[];for(let s of r){let m=`source-construct:${s.targetFile}:${s.targetStartLine}:${s.targetEndLine}:${s.calleeLeaf}`;t.push({kind:"call",fromSymbol:me(n),fromLabel:Ae(n),fromFile:n.source.file,toSymbol:m,toLabel:s.calleeLeaf,toFile:s.targetFile,depth:1,strength:"derived",evidence:"ast-member-import-candidate",callsiteLine:s.line});let l=ge(e,s.targetFile,s.targetStartLine,s.targetEndLine).targets;for(let c of l)o.push(c.definition),t.push({kind:"call",fromSymbol:m,fromLabel:s.calleeLeaf,fromFile:s.targetFile,toSymbol:c.definition.symbol,toLabel:te(c.definition.symbol),toFile:c.definition.relativePath,depth:2,strength:"exact",evidence:"scip-occurrence-callsite",callsiteLine:c.sourceLine})}return{definitions:un(o),relations:K(t)}}function Qn(e){return[...new Map(e.map(n=>[n.definition.symbol,n])).values()]}function un(e){return[...new Map(e.map(n=>[n.symbol,n])).values()]}function me(e){return e.owner.symbol??e.id}function Ae(e){return e.owner.name??`${e.source.file}:${e.source.startLine+1}`}function Vn(e,n,i,a,r){return{kind:"runtime-boundary",fromSymbol:me(e),fromLabel:Ae(e),fromFile:e.source.file,toSymbol:me(n),toLabel:Ae(n),toFile:n.source.file,depth:1,strength:r,evidence:`runtime-boundary:${i}`,callsiteLine:e.source.startLine,runtimeBoundaryKey:a.map(o=>`${o.name}=${o.value}`).join(" ")}}function Zn(e,n,i){let a=new Map;for(let t of i){let s=a.get(t.fromSymbol)??[];s.push(t),a.set(t.fromSymbol,s)}let r=[{symbol:e,path:[]}],o=new Set([e]);for(;r.length>0;){let t=r.shift();if(t.path.length>0&&n.has(t.symbol))return t.path;for(let s of(a.get(t.symbol)??[]).sort(X))o.has(s.toSymbol)||(o.add(s.toSymbol),r.push({symbol:s.toSymbol,path:[...t.path,s]}))}return[]}function Jn(e,n,i,a){let r=K(e),o=new Set([i,...a].flatMap(t=>[...ue(t),...t.keyAnchors.map(s=>s.symbol)]));for(let t of n){if(r.length>=J)break;!o.has(t.fromSymbol)&&!o.has(t.toSymbol)||r.some(s=>s.fromSymbol===t.fromSymbol&&s.toSymbol===t.toSymbol)||r.push(t)}return r.slice(0,J)}function et(e,n,i,a,r,o,t,s){let m=i.filter(c=>!c.root.symbol.startsWith(_e)).map(c=>({root:c.root,relations:c.relations.filter(d=>d.depth===1&&d.fromSymbol===c.root.symbol)}));return nt(m).flatMap((c,d)=>{let u=new Set(c.map(p=>p.root.symbol)),h=new Map;for(let p of c)for(let w of new Set(p.relations.map(ee=>ee.toSymbol)))h.set(w,(h.get(w)??0)+1);let y=[...h].filter(([,p])=>p>=2).sort(([p,w],[ee,ye])=>ye-w||tt(p,ee,a,r,t)).map(([p])=>t.get(p)).filter(p=>p?.isFunctionLike===!0).slice(0,An);if(y.length===0)return[];let b=n.callerFileMap(y,{semantic:s,sourceFallback:!0}),v=new Set;for(let p of y){v.add(p.relativePath);for(let w of b.get(p.symbolId)??[])v.add(w)}let S=o.filter(p=>p.isFunctionLike&&v.has(p.relativePath)).sort(ot).slice(0,Mn),M=n.calleeMap(S,{additive:!1,semantic:s}),f=new Set(y.map(p=>p.symbol)),C=K(S.flatMap(p=>ve(e,p,M.get(p.symbolId)??[],t,1,f).filter(w=>f.has(w.toSymbol)))),A=new Map;for(let p of C){let w=A.get(p.fromSymbol)??new Set;w.add(p.toSymbol),A.set(p.fromSymbol,w)}let P=new Set([...A].filter(([p,w])=>w.size>=2||u.has(p)).map(([p])=>p)),I=C.filter(p=>P.has(p.fromSymbol));if(P.size<2||I.length===0)return[];let F=[...new Set(I.map(p=>p.toSymbol))].map(p=>Me(p,a,r,t)).filter(p=>p!==null).sort(R),B=[...P].map(p=>Me(p,a,r,t)).filter(p=>p!==null),k=rt(B,I),q=k.slice(0,Ie),ie=k.slice(Ie);if(F.length===0||q.length===0)return[];let D=[...new Set([...F.flatMap(p=>p.matchedTerms),...c.flatMap(p=>p.root.matchedTerms)])].sort(),_=st(I,q);return[{id:`effect-owner-set:${d+1}:${de(F[0])}`,kind:"shared-callee-owners",roots:F,keyAnchors:q,candidateOwnerCount:k.length,omittedCandidateOwners:ie,ownerRecoveryCommands:Lt(ie,Ie),upstreamEntries:[],matchedTerms:D,relations:_,relationCount:I.length,omittedRelations:Math.max(0,I.length-_.length),systemMapCommand:he(q,I,D)}]})}function nt(e){let n=e.map((t,s)=>s),i=t=>{for(;n[t]!==t;)n[t]=n[n[t]],t=n[t];return t},a=(t,s)=>{let m=i(t),l=i(s);m!==l&&(n[l]=m)},r=e.map(t=>new Set(t.relations.map(s=>s.toSymbol)));for(let t=0;t<e.length;t+=1)for(let s=t+1;s<e.length;s+=1){let m=0;for(let l of r[t]??[])if((r[s]??new Set).has(l)&&(m+=1),m>=2)break;m>=2&&a(t,s)}let o=new Map;for(let t=0;t<e.length;t+=1){let s=i(t),m=o.get(s)??[];m.push(e[t]),o.set(s,m)}return[...o.values()].filter(t=>t.length>=2)}function tt(e,n,i,a,r){let o=Me(e,i,a,r),t=Me(n,i,a,r);return o?t?R(o,t):-1:t?1:e.localeCompare(n)}function ot(e,n){return x(U(e.relativePath))-x(U(n.relativePath))||e.relativePath.localeCompare(n.relativePath)||e.startLine-n.startLine}function Me(e,n,i,a){let r=n.get(e);if(r)return Se(r,i);let o=a.get(e);return o?hn(o):null}function rt(e,n){let i=new Map;for(let r of n){let o=i.get(r.toSymbol)??new Set;o.add(r.fromSymbol),i.set(r.toSymbol,o)}let a=new Map;for(let r of n){let o=i.get(r.toSymbol)?.size??1;a.set(r.fromSymbol,(a.get(r.fromSymbol)??0)+o*o)}return[...e].sort((r,o)=>Number(r.leaf.startsWith("#"))-Number(o.leaf.startsWith("#"))||o.identityMatchedTerms.length-r.identityMatchedTerms.length||(a.get(o.symbol)??0)-(a.get(r.symbol)??0)||R(r,o))}function st(e,n){let i=new Map(n.map((t,s)=>[t.symbol,s])),a=n.map(t=>e.filter(s=>s.fromSymbol===t.symbol).sort(X)),r=[],o=0;for(;r.length<J&&a.some(t=>o<t.length);){for(let t of a){let s=t[o];if(s&&r.push(s),r.length>=J)break}o+=1}return r.sort((t,s)=>i.get(t.fromSymbol)-i.get(s.fromSymbol)||X(t,s))}function it(e,n,i,a){let r=new Map(n.map((s,m)=>[s.symbol,m])),o=new Map;for(let s of e)o.set(s.fromSymbol,(o.get(s.fromSymbol)??0)+1);return[...e].sort((s,m)=>{let l=c=>{let d=0;return r.has(c.fromSymbol)&&(d+=100),i.has(c.toSymbol)&&(d+=60),d+=Math.min(40,(o.get(c.toSymbol)??0)*8),(a.get(c.toSymbol)?.matchedTerms.length??0)>0&&(d+=25),c.fromFile!==c.toFile&&(d+=15),c.strength==="exact"&&(d+=5),d};return l(m)-l(s)||X(s,m)}).slice(0,J).sort((s,m)=>(r.get(s.fromSymbol)??V)-(r.get(m.fromSymbol)??V)||s.depth-m.depth||(s.callsiteLine??Number.MAX_SAFE_INTEGER)-(m.callsiteLine??Number.MAX_SAFE_INTEGER)||X(s,m))}function hn(e){return{symbol:e.symbol,label:W(e),leaf:e.leaf,file:e.relativePath,line:e.startLine,endLine:e.endLine,kind:e.isFunctionLike?"callable":e.isTypeLike?"type":"symbol",fileKind:U(e.relativePath),matches:[],focusLocations:[],matchedTerms:[],symbolMatchedTerms:[],symbolPhraseLength:0,identityMatchedTerms:[],rarity:0,symbolRarity:0}}function at(e,n,i){let a=[...e].sort(R),r=[],o=new Map;for(let c of n)o.set(c.fromSymbol,(o.get(c.fromSymbol)??0)+1);let t=new Set,s=new Set,m=c=>{if(!(!c||r.some(d=>d.symbol===c.symbol))){r.push(c);for(let d of c.matchedTerms)t.add(d);for(let d of c.symbolMatchedTerms)s.add(d)}},l=a.filter(c=>c.symbolPhraseLength>=2&&(o.get(c.symbol)??0)>=2);for(;r.length<Math.min(2,V);){let c=l.filter(d=>!r.some(u=>u.symbol===d.symbol)).sort((d,u)=>u.symbolMatchedTerms.filter(h=>!s.has(h)).length-d.symbolMatchedTerms.filter(h=>!s.has(h)).length||u.symbolPhraseLength-d.symbolPhraseLength||(o.get(u.symbol)??0)-(o.get(d.symbol)??0)||Ee(d,u))[0];if(!c||r.length>0&&c.symbolMatchedTerms.every(d=>s.has(d)))break;m(c)}if(m(a[0]),r.length>=2){let c=ct(r[0].symbol,r[1].symbol,n,i);for(let d of c?.slice(1,-1)??[]){if(r.length>=V)break;m(i.get(d))}if(r.length<V){let d=new Set(r.map(y=>y.symbol)),u=new Set(n.filter(y=>y.depth===1&&d.has(y.fromSymbol)&&d.has(y.toSymbol)).map(y=>y.fromSymbol)),h=n.filter(y=>y.depth===1&&u.has(y.fromSymbol)&&!d.has(y.toSymbol)).map(y=>({relation:y,candidate:i.get(y.toSymbol)})).filter(y=>y.candidate!==void 0&&y.candidate.symbolPhraseLength>=2&&y.candidate.symbolMatchedTerms.length>=2).sort((y,b)=>(o.get(y.relation.fromSymbol)??0)-(o.get(b.relation.fromSymbol)??0)||Ee(y.candidate,b.candidate))[0]?.candidate;m(h)}}else for(;r.length<Math.min(3,V);){let c=a.filter(d=>!r.some(u=>u.symbol===d.symbol)).sort((d,u)=>u.matchedTerms.filter(h=>!t.has(h)).length-d.matchedTerms.filter(h=>!t.has(h)).length||R(d,u))[0];if(!c||c.matchedTerms.every(d=>t.has(d)))break;m(c)}for(;r.length>=2&&r.length<V;){let c=new Set(r.map(u=>u.symbol)),d=[...i.values()].filter(u=>!c.has(u.symbol)&&(o.get(u.symbol)??0)>0&&n.some(h=>c.has(h.fromSymbol)&&h.toSymbol===u.symbol)).sort((u,h)=>h.identityMatchedTerms.length-u.identityMatchedTerms.length||h.symbolMatchedTerms.length-u.symbolMatchedTerms.length||h.matchedTerms.length-u.matchedTerms.length||(o.get(h.symbol)??0)-(o.get(u.symbol)??0)||R(u,h))[0];if(!d)break;m(d)}if(r.length<2){let c=r[0],d=c?a.filter(u=>u.symbol!==c.symbol).map(u=>({root:u,path:lt(u.symbol,c.symbol,n)})).filter(u=>u.path!==null).sort((u,h)=>+(h.root.file!==c.file)-+(u.root.file!==c.file)||u.path.length-h.path.length||R(u.root,h.root))[0]?.root:void 0;m(d)}return r}function ct(e,n,i,a){let r=new Map;for(let s of i){let m=r.get(s.fromSymbol)??new Set;m.add(s.toSymbol),r.set(s.fromSymbol,m);let l=r.get(s.toSymbol)??new Set;l.add(s.fromSymbol),r.set(s.toSymbol,l)}let o=[{path:[e],cost:0}],t=new Map([[e,0]]);for(;o.length>0;){o.sort((c,d)=>c.cost-d.cost||c.path.length-d.path.length);let{path:s,cost:m}=o.shift(),l=s.at(-1);if(l===n)return s;for(let c of r.get(l)??[]){let d=a.get(c),u=c===n?1:!d||d.matchedTerms.length===0?9:d.symbolPhraseLength>=2?1:d.identityMatchedTerms.length>=2?2:4,h=m+u;h>=(t.get(c)??Number.POSITIVE_INFINITY)||(t.set(c,h),o.push({path:[...s,c],cost:h}))}}return null}function lt(e,n,i){let a=new Map;for(let t of i){let s=a.get(t.fromSymbol)??[];s.push(t.toSymbol),a.set(t.fromSymbol,s)}let r=[[e]],o=new Set([e]);for(;r.length>0;){let t=r.shift(),s=t.at(-1);if(s===n)return t;for(let m of a.get(s)??[])o.has(m)||(o.add(m),r.push([...t,m]))}return null}function R(e,n){return(n.queryPathMatches?.length??0)-(e.queryPathMatches?.length??0)||n.identityMatchedTerms.length-e.identityMatchedTerms.length||n.matchedTerms.length-e.matchedTerms.length||n.rarity-e.rarity||se(e.kind)-se(n.kind)||x(e.fileKind)-x(n.fileKind)||e.file.localeCompare(n.file)||e.line-n.line}function Ee(e,n){return n.symbolPhraseLength-e.symbolPhraseLength||n.symbolMatchedTerms.length-e.symbolMatchedTerms.length||se(e.kind)-se(n.kind)||n.symbolRarity-e.symbolRarity||R(e,n)}function mt(e,n){return n.flatMap(i=>{let a=e.filter(t=>t.matchedTerms.includes(i)).sort((t,s)=>ut(t,s,i)),r=[],o=new Set;for(let t of a)if(!o.has(t.file)&&(r.push(t),o.add(t.file),r.length>=Qe))return r;for(let t of a)if(!r.some(s=>s.symbol===t.symbol)&&(r.push(t),r.length>=Qe))break;return r})}function dt(e,n,i){let a=new Set(n),r=new Map;for(let o of e){if(o.kind!=="callable")continue;let t=o.file.slice(o.file.lastIndexOf("/")+1).replace(/\.[^.]+$/u,"");if(![...T(t)].some(m=>a.has(m)))continue;let s=r.get(o.file)??[];s.push(o),r.set(o.file,s)}return[...r.entries()].map(([o,t])=>{let s=o.slice(o.lastIndexOf("/")+1).replace(/\.[^.]+$/u,""),m=[...T(s)].filter(l=>a.has(l));return{file:o,fileCandidates:t,sharedFrequency:Math.min(...m.map(l=>i.get(l)??Number.MAX_SAFE_INTEGER))}}).sort((o,t)=>x(o.fileCandidates[0].fileKind)-x(t.fileCandidates[0].fileKind)||o.sharedFrequency-t.sharedFrequency||o.file.localeCompare(t.file)).flatMap(({fileCandidates:o})=>[...o].sort(R).slice(0,xn)).slice(0,In)}function ut(e,n,i){return sn(e,i)-sn(n,i)||x(e.fileKind)-x(n.fileKind)||n.symbolPhraseLength-e.symbolPhraseLength||se(e.kind)-se(n.kind)||R(e,n)}function sn(e,n){let i=e.matches.find(a=>a.term===n)?.sources??[];return Math.min(...i.map(Fe),Number.MAX_SAFE_INTEGER)}function re(e){return[...new Map(e.map(n=>[n.symbol,n])).values()]}function Z(e,n,i){let a=new Set(e.roots.flatMap(o=>o.symbolMatchedTerms)),r=new Set(n.roots.flatMap(o=>o.symbolMatchedTerms));return(n.queryPathMatches?.length??0)-(e.queryPathMatches?.length??0)||mn(e.kind)-mn(n.kind)||cn(e)-cn(n)||ln(e)-ln(n)||(e.kind==="parallel-paths"&&n.kind==="parallel-paths"?(e.parallelSharedPathFrequency??Number.MAX_SAFE_INTEGER)-(n.parallelSharedPathFrequency??Number.MAX_SAFE_INTEGER)||(n.parallelOrchestrationSides??0)-(e.parallelOrchestrationSides??0)||(n.parallelSharedPathTerms?.length??0)-(e.parallelSharedPathTerms?.length??0):0)||an(n,i)-an(e,i)||n.matchedTerms.length-e.matchedTerms.length||Math.max(...n.roots.map(o=>o.symbolPhraseLength))-Math.max(...e.roots.map(o=>o.symbolPhraseLength))||r.size-a.size||R(e.roots[0],n.roots[0])||n.roots.length-e.roots.length||e.relationCount-n.relationCount||e.id.localeCompare(n.id)}function an(e,n){return e.matchedTerms.reduce((i,a)=>i+1/Math.max(1,n.get(a)??1),0)}function ht(e){return[...new Set(e.roots.flatMap(n=>n.queryPathMatches??[]))].sort()}function cn(e){let n=e.keyAnchors.length>0?e.keyAnchors:e.roots;return Math.max(...n.map(i=>x(i.fileKind)))}function ln(e){return e.kind==="parallel-paths"?2-(e.parallelConnectedSides??0):e.kind!=="connected-flow"||e.relationCount>0?0:1}function yt(e,n,i){let a=e.slice(0,n);if(n<2||a.some(o=>o.kind==="shared-callee-owners"))return a;let r=e.filter(o=>o.kind==="shared-callee-owners");for(let o of a){if(o.kind==="shared-callee-owners"||o.kind==="parallel-paths")continue;let t=new Set(ue(o)),s=r.map(l=>({group:l,overlap:ft(l,t)})).filter(({overlap:l})=>l>0).sort(({group:l,overlap:c},{group:d,overlap:u})=>u-c||Z(l,d,i))[0]?.group;if(!s)continue;let m=a.length-1;for(;m>=0&&a[m]===o;)m-=1;return m<0?a:(a[m]=s,[...a].sort((l,c)=>Z(l,c,i)))}return a}function ft(e,n){return ue(e).filter(i=>n.has(i)).length}function mn(e){switch(e){case"cross-boundary-flow":return 0;case"parallel-paths":case"connected-flow":return 1;case"shared-callee-owners":return 2}}function X(e,n){return e.depth-n.depth||j(n.strength)-j(e.strength)||e.fromLabel.localeCompare(n.fromLabel)||e.toLabel.localeCompare(n.toLabel)||(e.callsiteLine??Number.MAX_SAFE_INTEGER)-(n.callsiteLine??Number.MAX_SAFE_INTEGER)}function pt(e,n){return j(ke(n.source))-j(ke(e.source))||(e.callsiteLine??Number.MAX_SAFE_INTEGER)-(n.callsiteLine??Number.MAX_SAFE_INTEGER)||e.symbol.localeCompare(n.symbol)}function K(e){let n=new Map;for(let i of e){let a=`${i.fromSymbol}\0${i.toSymbol}`,r=n.get(a);(!r||X(i,r)<0)&&n.set(a,i)}return[...n.values()]}function Le(e){return e.replace(/([\p{Ll}\d])([\p{Lu}])/gu,"$1 $2").replace(/([\p{Lu}]+)([\p{Lu}][\p{Ll}])/gu,"$1 $2").match(/[\p{L}\d]+/gu)??[]}function bt(e){let n=e.match(/[\p{L}\d_.-]+(?:\/[\p{L}\d_.-]+)+/gu)??[];return[...new Set(n.map(i=>i.replace(/[.;:!?]+$/gu,"").toLocaleLowerCase()))]}function gt(e,n){let i=e.replace(/\\/gu,"/").toLocaleLowerCase();return n.filter(a=>{let r=i.indexOf(a);if(r<0)return!1;let o=r===0?"/":i[r-1],t=i[r+a.length];return o==="/"&&(t===void 0||t==="/")})}function St(e,n){let i=Le(e).map(Oe),a=0;for(let r=0;r<i.length;r+=1)for(let o=0;o<n.length;o+=1){let t=0;for(;r+t<i.length&&o+t<n.length&&i[r+t]===n[o+t];)t+=1;a=Math.max(a,t)}return a}function T(e){return new Set(Le(e).flatMap(yn).filter(n=>n.length>=3))}function yn(e){let n=Oe(e);return n.length>4&&n.endsWith("e")?[n,n.slice(0,-1)]:[n]}function Oe(e){let n=e.toLocaleLowerCase();return n.length>5&&n.endsWith("ies")?`${n.slice(0,-3)}y`:n.length>4&&n.endsWith("ied")?`${n.slice(0,-3)}y`:n.length>4&&n.endsWith("ed")?dn(n.slice(0,-2)):n.length>5&&n.endsWith("ing")?dn(n.slice(0,-3)):n.length>4&&n.endsWith("ers")||n.length>3&&n.endsWith("s")&&!n.endsWith("ss")?n.slice(0,-1):n}function dn(e){if(e.length<2)return e;let n=e.at(-1),i=e.at(-2);return n===i&&!"aeiou".includes(n)?e.slice(0,-1):e}function vt(e,n){return Fe(e)-Fe(n)}function Fe(e){switch(e){case"symbol":return 0;case"path":return 1;case"documentation":return 2;case"source":return 3}}function se(e){return e==="callable"?0:e==="type"?1:2}function ke(e){return e==="semantic-callee"||e==="scip-chunk"||e==="scip-occurrence"?"exact":"derived"}function j(e){return e==="exact"?2:1}function fn(e,n){return e.file.localeCompare(n.file)||e.line-n.line}function de(e){return`${e.file}:${e.line+1}`}function he(e,n=[],i=[]){let a=e.map(t=>`--symbol ${De(`${t.file}:${t.line+1}-${t.endLine+1}`)}`),r=new Set(e.map(t=>t.symbol)),o=e.flatMap(t=>(t.sourceCharacters??0)>He?At(t,n,i,r).map(s=>`--focus-at ${De(`${s.file}:${s.line+1}`)}`):[]);return`scip-query system-map ${[...a,...o,"--relation call","--relation runtime-boundary"].join(" ")}`}function At(e,n,i,a){let r=new Set(i),o=n.filter(l=>l.fromSymbol===e.symbol&&l.callsiteLine!==null&&l.callsiteLine>=e.line&&l.callsiteLine<=e.endLine).map(l=>({file:e.file,line:l.callsiteLine,connectsAnchor:a.has(l.toSymbol),overlap:new Set(Le(Mt(l.toLabel)).flatMap(yn).filter(c=>r.has(c))).size,strength:l.strength})).filter(l=>l.overlap>0).sort((l,c)=>Number(c.connectsAnchor)-Number(l.connectsAnchor)||c.overlap-l.overlap||l.line-c.line||j(c.strength)-j(l.strength)),t=o.filter(l=>l.connectsAnchor),s=[...t.length>0?t:o,...t.length>0?[]:e.focusLocations.map(l=>({...l,connectsAnchor:!1,overlap:0,strength:"derived"}))],m=[];for(let l of s)if(!m.some(c=>c.file===l.file&&c.line===l.line)&&(m.push({file:l.file,line:l.line}),m.length>=3))break;return m}function Mt(e){return e.slice(Math.max(e.lastIndexOf(":"),e.lastIndexOf("."))+1)}function Dt(e,n){let i=new Map;for(let[o,t]of e.matches)for(let s of t.locations.values()){if(s.file!==e.definition.relativePath||s.line<e.definition.startLine||s.line>e.definition.endLine)continue;let m=`${s.file}\0${s.line}`,l=i.get(m)??{...s,matchedTerms:new Set};l.matchedTerms.add(o),i.set(m,l)}let a=[...i.values()].sort((o,t)=>t.matchedTerms.size-o.matchedTerms.size||[...t.matchedTerms].reduce((s,m)=>s+1/Math.max(1,n.get(m)??1),0)-[...o.matchedTerms].reduce((s,m)=>s+1/Math.max(1,n.get(m)??1),0)||fn(o,t)),r=[];for(let o of a)if(!r.some(t=>t.file===o.file&&Math.abs(t.line-o.line)<8)&&(r.push(o),r.length>=3))break;return r.map(o=>({file:o.file,line:o.line,matchedTerms:[...o.matchedTerms].sort()}))}function Lt(e,n){let i=[];for(let a=0;a<e.length;a+=n)i.push(he(e.slice(a,a+n)));return i}function De(e){return`'${e.replaceAll("'",`'"'"'`)}'`}export{Bt as a,En as b};
|
|
3
|
-
//# sourceMappingURL=chunk-DZOIKCTM.js.map
|
package/dist/chunk-E4PKTOL3.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as N}from"./chunk-VBV6ALJE.js";import{c as _}from"./chunk-2BMSSRBH.js";import{a as v}from"./chunk-BGBBVSH4.js";import{a as $}from"./chunk-U3SXIMII.js";import{d as m}from"./chunk-C7C6AKAT.js";import{k as A}from"./chunk-ETC674NS.js";var F=3,B=8,j=.75,G=2,U=.5,P=2,k=5,O=2,M=2;function ge(e,r={}){let{scope:i,minLoc:n=10,minCallees:s=6,limit:o=20,scanLimit:a}=r,t=new _(e);return N({candidates:()=>t.productionCallableDefinitions({scope:i,minLoc:n,excludeTypesFiles:!0,requireFunctionLikeSymbol:!0,sortByLocDesc:!0}),scanLimit:a,profile:{name:"extract-candidates"},prepare:c=>({callees:t.calleeMap(c,{semantic:r.semantic!==!1})}),evaluate:(c,u)=>K(c,u.callees.get(c.symbolId)??[],s,X(e,c.relativePath)),orderResults:(c,u)=>L(c.actionTier)-L(u.actionTier)||u.regions[0].lines-c.regions[0].lines||u.loc-c.loc,limit:o})}function L(e){return e==="signal"?0:1}function X(e,r){let i=$(e,r)?.locals??[];return{available:i.length>0,occurrences:i,lines:A(e,r)}}function K(e,r,i,n){let{uses:s,unpositioned:o}=J(e,r);if(s.length<i)return null;let a=v(e),t=[],c=[];for(let l of s){let d=Math.min(...l.lines),p=Math.max(...l.lines);l.lines.length>=2&&p-d+1>=U*a?t.push(l):c.push({symbol:l.symbol,min:d,max:p,render:l.render})}let u=new Set(s.flatMap(l=>l.lines)),f=q(Y(c),n.lines,z(e,n.lines)).map(l=>Z(l,e,n.lines,u)),h=f.filter(l=>te(l,c.length,a)).map(l=>se(e,l,t,n)).sort((l,d)=>d.lines-l.lines||l.startLine-d.startLine);if(h.length===0)return null;let x=new Set(s.flatMap(l=>l.lines)),b=[...h].sort((l,d)=>{let p=L(w(l,n.available,R(n.lines,l,x)).tier),D=L(w(d,n.available,R(n.lines,d,x)).tier);return p-D||d.lines-l.lines||l.startLine-d.startLine})[0],g=[`${s.length} callees placed on call lines across ${a} lines`+(o>0?`; ${o} callee row(s) without a call line ignored`:"")];t.length>0&&g.push(`${t.length} ambient callee(s) used across the body: ${t.map(l=>m(l.symbol)).join(", ")}`);for(let l of h)g.push(`lines ${l.startLine+1}-${l.endLine+1} (${l.lines} lines) use ${l.callees.length} callees exclusively`+(n.available?`; ${l.inboundLocals.length} local(s) in, ${l.outboundLocals.length} out`:"; local data flow unknown"));g.push(`${c.length-re(f,b)} callee(s) stay outside the largest region`);let I=R(n.lines,b,x),S=w(b,n.available,I);return g.push(S.reason),{symbol:e.symbol,shortName:m(e.symbol),relativePath:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:a,totalCallees:s.length,unpositionedCallees:o,ambientCallees:t.map(l=>m(l.symbol)),localsAvailable:n.available,extractionKind:b.kind,actionTier:S.tier,tierReason:S.reason,ownReturnsInRegion:I,evidenceReasons:g,recommendation:ae(b,n.available),regions:h}}function J(e,r){let i=new Map,n=new Set;for(let o of r){if(o.symbol===e.symbol)continue;let a=o.callsiteLine;if(a===void 0||a<e.startLine||a>e.endLine){n.add(o.symbol);continue}let t=i.get(o.symbol);t?(t.lines.includes(a)||t.lines.push(a),t.render||=o.kind==="jsx-render"):i.set(o.symbol,{symbol:o.symbol,lines:[a],render:o.kind==="jsx-render"})}let s=0;for(let o of n)i.has(o)||(s+=1);return{uses:[...i.values()],unpositioned:s}}function Y(e){let r=[...e].sort((n,s)=>n.min-s.min||n.max-s.max),i=[];for(let n of r){let s=i[i.length-1];s&&n.min<=s.end?(s.end=Math.max(s.end,n.max),s.members.push(n)):i.push({start:n.min,end:n.max,members:[n]})}return i}function q(e,r,i){let n=[];for(let s of e){let o=n[n.length-1],a=o!==void 0&&!E(o)&&!E(s)&&!H(r,o.end,s.start,i);o&&(s.start-o.end<=P||a)?(o.end=s.end,o.members.push(...s.members)):n.push({start:s.start,end:s.end,members:[...s.members]})}return n}function E(e){return e.members.some(r=>r.render)}function z(e,r){for(let i=e.startLine+1;i<e.endLine;i+=1){let n=r[i]??"";if(n.trim().length>0)return y(n)}return 0}function H(e,r,i,n){for(let s=r+1;s<i;s+=1){let o=e[s]??"";if(o.trim().length!==0&&y(o)===n)return!0}return!1}function Z(e,r,i,n){let s=e.start,o=e.end;for(let a=0;a<M;a+=1){let t=s-1;if(t<=r.startLine||n.has(t)||!ee(i[t]??""))break;s=t}for(let a=0;a<M;a+=1){let t=o+1;if(t>=r.endLine||n.has(t)||!ne(i[t]??""))break;o=t}if(E(e)){let a=C(i,s,o);for(let t=0;a>0&&t<T&&o+1<r.endLine;t+=1)o+=1,a=C(i,s,o);for(let t=0;a<0&&t<T&&s-1>r.startLine&&!/^\s*return\b/.test(i[s-1]??"");t+=1)s-=1,a=C(i,s,o)}return{start:s,end:o,members:e.members}}var T=40,V=/<([A-Za-z][\w.:-]*)(?=[\s/>])/g,Q=/<\/[A-Za-z][\w.:-]*\s*>/g,W=/\/>/g;function C(e,r,i){let n=0;for(let s=r;s<=i;s+=1){let o=e[s]??"";n+=(o.match(V)??[]).length,n-=(o.match(Q)??[]).length,n-=(o.match(W)??[]).length}return n}function ee(e){let r=e.trim();return r.length>0&&/(?:\{|\(|\[|=>|:)$/u.test(r)&&!/^(?:\/\/|\*|\/\*)/u.test(r)}function ne(e){return/^[\s)\]}>;,]+$/u.test(e)&&e.trim().length>0}function te(e,r,i){let n=e.end-e.start+1;return e.members.length>=F&&n>=B&&n<=j*i&&r-e.members.length>=G}function re(e,r){return e.find(i=>i.start===r.startLine&&i.end===r.endLine)?.members.length??0}function se(e,r,i,n){let s=[...r.members].sort((t,c)=>t.min-c.min),o=s.filter(t=>t.render).length,a=oe(e,r,n);return{startLine:r.start,endLine:r.end,lines:r.end-r.start+1,kind:o*2>s.length?"render-region":"call-region",callees:s.map(t=>m(t.symbol)),renderCallees:o,inboundLocals:a.inbound,outboundLocals:a.outbound,ambientCallees:i.filter(t=>t.lines.some(c=>c>=r.start&&c<=r.end)).map(t=>m(t.symbol))}}function oe(e,r,i){if(!i.available)return{inbound:[],outbound:[]};let n=new Map;for(let t of i.occurrences){if(t.line<e.startLine||t.line>e.endLine)continue;let c=n.get(t.symbol);c||(c={declaredAt:null,name:"",uses:[],writes:[]},n.set(t.symbol,c)),t.definition?(c.declaredAt=t.line,c.name=ie(i.lines,t)):(c.uses.push(t.line),t.write&&c.writes.push(t.line))}let s=t=>t>=r.start&&t<=r.end,o=new Set,a=new Set;for(let t of n.values()){if(t.declaredAt===null||t.name==="")continue;let c=s(t.declaredAt),u=t.uses.some(f=>f>r.end);!c&&t.declaredAt<r.start&&t.uses.some(s)&&o.add(t.name),c&&u&&a.add(t.name),!c&&t.writes.some(s)&&u&&a.add(t.name)}return{inbound:[...o].sort(),outbound:[...a].sort()}}function ie(e,r){return r.endLine!==r.line?"":e[r.line]?.slice(r.startChar,r.endChar).trim()??""}function w(e,r,i){if(i>0)return{tier:"support",reason:`support tier: the largest region holds ${i} return statement(s) of the function itself, so it is the function's control flow rather than a helper`};if(!r)return{tier:"signal",reason:"signal tier: local data flow unknown, interface cost not assessed"};let n=e.inboundLocals.length,s=e.outboundLocals.length;return n<=k&&s<=O?{tier:"signal",reason:`signal tier: the largest region takes ${n} local(s) in and hands ${s} back`}:{tier:"support",reason:`support tier: the largest region would take ${n} local(s) in and hand ${s} back, more than ${k} in or ${O} out`}}function R(e,r,i){let n=Number.POSITIVE_INFINITY;for(let o=r.startLine;o<=r.endLine;o+=1)i.has(o)&&(n=Math.min(n,y(e[o]??"")));if(!Number.isFinite(n))return 0;let s=0;for(let o=r.startLine;o<=r.endLine;o+=1){let a=e[o]??"";/^\s*return\b/u.test(a)&&y(a)<=n&&(s+=1)}return s}function y(e){return e.length-e.trimStart().length}function ae(e,r){let i=`${e.startLine+1}-${e.endLine+1}`,n=r?`; an extraction would take ${e.inboundLocals.length} local(s) in`+(e.inboundLocals.length>0?` (${e.inboundLocals.join(", ")})`:"")+` and hand ${e.outboundLocals.length} back`+(e.outboundLocals.length>0?` (${e.outboundLocals.join(", ")})`:""):"; local data flow is unknown because the indexer emitted no local symbols for this file";return e.kind==="render-region"?`Review lines ${i} as a child component: its ${e.callees.length} rendered or called names appear nowhere else in this component${n}. Extract only if the new name states what the subtree shows.`:`Review lines ${i} as a helper: its ${e.callees.length} callees are used nowhere else in this function${n}. Extract only if the new name states what the region does.`}export{ge as a};
|
|
2
|
-
//# sourceMappingURL=chunk-E4PKTOL3.js.map
|
package/dist/chunk-E7QR35ST.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{E as s}from"./chunk-ZLMXIQLC.js";var p=new Set(["componentDidCatch","componentDidMount","componentDidUpdate","componentWillUnmount","getDerivedStateFromError","getDerivedStateFromProps","getSnapshotBeforeUpdate","render","shouldComponentUpdate","UNSAFE_componentWillMount","UNSAFE_componentWillReceiveProps","UNSAFE_componentWillUpdate"]);function l(i,t){if(!t.parentTypeName||!/\.[cm]?[jt]sx?$/.test(t.relativePath))return!1;let r=s(i,t.relativePath);if(!r)return!1;let n=r.rootNode.descendantsOfType("method_definition").find(a=>a.startPosition.row<=t.startLine&&a.endPosition.row>=t.endLine);if(!n)return!1;if(/\boverride\b/.test(n.text.slice(0,Math.max(0,n.text.indexOf("{")))))return!0;let e=n.parent;for(;e&&e.type!=="class_declaration"&&e.type!=="class";)e=e.parent;if(!e)return!1;let o=e.text.slice(0,Math.max(0,e.text.indexOf("{")));return/\bimplements\b/.test(o)||/\bextends\b/.test(o)?!0:p.has(t.leaf)&&/\bextends\s+(?:React\.)?(?:Component|PureComponent)\b/.test(o)}export{l as a};
|
|
2
|
-
//# sourceMappingURL=chunk-E7QR35ST.js.map
|
package/dist/chunk-EFSXAINW.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as g}from"./chunk-VBV6ALJE.js";import{c as d}from"./chunk-2BMSSRBH.js";import{b as c}from"./chunk-SKKXTABJ.js";import{d as p}from"./chunk-C7C6AKAT.js";import{n as o}from"./chunk-RBAD4GJ2.js";import{A as u}from"./chunk-ZLMXIQLC.js";function F(r,a={}){let{scope:l,limit:s=30,scanLimit:b}=a,f=new d(r);return g({candidates:()=>f.productionCallableDefinitions({scope:l,files:a.files,minLoc:2,excludeRootedSymbols:!0,requireFunctionLikeSymbol:!0}),filterCandidate:e=>y(e.relativePath),scanLimit:b,profile:{name:"unused-params"},evaluate:e=>{let n=o(r,e.relativePath)?.callables.find(t=>t.startLine===e.startLine&&t.endLine===e.endLine);if(!n||n.params.length===0||n.params.some(t=>!t.simple)||n.paramsEndLine>=n.endLine)return null;let L=c(r,e.relativePath),m=[];for(let t=n.params.length-1;t>=0;t--){let i=n.params[t];if(i.name===""||i.name.startsWith("_")||h(L.get(i.name),n.paramsEndLine,n.endLine))break;m.unshift(i.name)}return m.length===0?null:{symbol:e.symbol,shortName:p(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,paramCount:n.paramCount,unusedTrailing:m}},orderResults:(e,n)=>n.unusedTrailing.length-e.unusedTrailing.length||e.file.localeCompare(n.file)||e.startLine-n.startLine,limit:s})}function y(r){let a=u(r);return a==="typescript"||a==="tsx"||a==="javascript"}function h(r,a,l){return r?r.some(s=>s>a&&s<=l):!1}export{F as a};
|
|
2
|
-
//# sourceMappingURL=chunk-EFSXAINW.js.map
|
package/dist/chunk-EHVEIEQN.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import{d as S}from"./chunk-TAA7HXHE.js";import{c as m}from"./chunk-2BMSSRBH.js";import{g as y}from"./chunk-YSYPDRD5.js";import{b as h}from"./chunk-FLMTCX5R.js";import{y as p}from"./chunk-RBAD4GJ2.js";import{a as g}from"./chunk-ZLMXIQLC.js";import f from"path";function W(e,t){let{scope:i,minDeviation:r=5,limit:n=50}=t??{},a=t?.semantic!==!1,u=t?.includePatternDeviations===!0,o=new m(e).fileDependencyGraph(i),l=S(e,{scope:i}),c=x([...D(e,o,{scope:i,semantic:a}),...R(l.forbiddenEdges),...u?E(o,r):[]]);return t?.includeArchitecture===!0&&(c.architecture=l),n<=0||c.results.length<=n?c:{...c,results:c.results.slice(0,n),totalResults:c.results.length}}function D(e,t,i){let r=_(e,i.scope),n=[],a=new Set;for(let[s,o]of t){if(d(s))continue;let l=r.get(s)??new Set;for(let c of o)d(c)||l.has(c)||v(e,s,c,i)||(n.push({file:s,dep:c}),a.add(s))}a.size>0&&w(e,r,{paths:[...a]});let u=[];for(let{file:s,dep:o}of n)(r.get(s)??new Set).has(o)||u.push({file:s,kind:"unused-import",description:`Depends on ${o} but references none of its symbols`,dep:o,actionTier:"direct",evidenceReasons:[`dependency edge exists from ${s} to ${o}`,"no semantic, source, type-only, side-effect, or Vue-template usage survived the conservative skip gates"],recommendation:"Remove the unused import or dependency edge after running the project checks."});return u}function v(e,t,i,r){return C(e,t,i)||M(e,t,i)||O(i)||P(e,t,i)||N(i)?!0:r.semantic&&A(e,t,i)}function R(e){return e.flatMap(t=>{let i=t.examples[0];return i?[{file:i.fromFile,kind:"architecture-violation",description:`${t.from} depends on forbidden boundary ${t.to} through ${t.fileEdgeCount} file edge(s)`,dep:i.toFile,detail:`${t.from} may not depend on ${t.to}`,actionTier:"direct",policyBasis:"explicit",architecture:{fromBoundary:t.from,toBoundary:t.to,fileEdgeCount:t.fileEdgeCount,importerCount:t.importerCount,importedFileCount:t.importedFileCount,examples:t.examples},evidenceReasons:[`configured dependency row for ${t.from} does not allow ${t.to}`,`${t.fileEdgeCount} file edge(s) connect ${t.importerCount} importer(s) to ${t.importedFileCount} imported file(s)`,...t.examples.map(r=>`${r.fromFile} imports ${r.toFile}`)],recommendation:"Move the dependency behind an allowed boundary, reverse the dependency through an owned interface, or deliberately update the project architecture rule."}]:[]})}function E(e,t){let i=[];for(let[r,n]of k(e)){let a=n.filter(s=>!d(s));if(a.length<t)continue;let u=I(e,a);for(let s of a)for(let o of e.get(s)??[])d(o)||(u.get(o)??0)===1&&f.dirname(o)!==r&&f.dirname(o)!==f.dirname(r)&&i.push({file:s,kind:"pattern-deviation",description:`Only file in ${r}/ that depends on ${o}`,dep:o,actionTier:"signal",evidenceReasons:[`${a.length} sibling file(s) in ${r}/ were compared`,`${s} is the only non-skipped sibling depending on ${o}`],recommendation:"Review sibling ownership before changing this import; unique dependency shape can be intentional specialization."})}return i}function x(e){let t=e.filter(i=>i.kind==="architecture-violation").length;return{results:e,unusedImports:e.filter(i=>i.kind==="unused-import").length,architectureViolations:t,layerViolations:t,patternDeviations:e.filter(i=>i.kind==="pattern-deviation").length}}function k(e){let t=new Map;for(let i of e.keys()){let r=f.dirname(i),n=t.get(r);n||(n=[],t.set(r,n)),n.push(i)}return t}function I(e,t){let i=new Map;for(let r of t)for(let n of e.get(r)??[])d(n)||i.set(n,(i.get(n)??0)+1);return i}function _(e,t){let i=new Map;return $(e,i,t),i}function $(e,t,i){for(let r of F(e,i))b(e,t,r.from_file,r.to_file)}function F(e,t){let i=t?"AND d1.relative_path LIKE ?":"",r=t?[`%${t}%`]:[];return e.all(`SELECT DISTINCT d1.relative_path AS from_file, d2.relative_path AS to_file
|
|
2
|
-
FROM mentions m
|
|
3
|
-
JOIN chunks c ON m.chunk_id = c.id
|
|
4
|
-
JOIN documents d1 ON c.document_id = d1.id
|
|
5
|
-
JOIN global_symbols gs ON m.symbol_id = gs.id
|
|
6
|
-
JOIN (
|
|
7
|
-
SELECT m2.symbol_id, c2.document_id
|
|
8
|
-
FROM mentions m2
|
|
9
|
-
JOIN chunks c2 ON m2.chunk_id = c2.id
|
|
10
|
-
WHERE m2.role = 1
|
|
11
|
-
GROUP BY m2.symbol_id
|
|
12
|
-
) sym_def ON sym_def.symbol_id = gs.id
|
|
13
|
-
JOIN documents d2 ON sym_def.document_id = d2.id
|
|
14
|
-
WHERE d1.id != d2.id
|
|
15
|
-
AND m.role != 1
|
|
16
|
-
${e.pathExclusionsFor("d1","d2")}
|
|
17
|
-
${i}`,...r)}function w(e,t,i={}){new m(e).scanSourceReferences({paths:i.paths??g(e,{includeIgnored:!1}),includeRustAttributeNames:!0,identifierResolution:"permissive"},n=>{n.target.relativePath!==n.sourceFile&&(e.isIgnored(n.target.relativePath)||b(e,t,n.sourceFile,n.target.relativePath))})}function b(e,t,i,r){if(e.isIgnored(i)||e.isIgnored(r))return;let n=t.get(i);n||(n=new Set,t.set(i,n)),n.add(r)}function O(e){return e.includes("types")||e.endsWith(".d.ts")}function A(e,t,i){return y(e,t).filter(n=>n.sourcePath===i).some(n=>n.isUsed)}function C(e,t,i){return p(e,t).filter(n=>n.sourcePath===i).some(n=>n.used)}function M(e,t,i){let r=p(e,t).filter(n=>n.sourcePath===i);return r.length>0&&r.every(n=>n.isTypeOnly===!0)}function N(e){return e.endsWith(".vue")}function P(e,t,i){let r=p(e,t).filter(n=>n.sourcePath===i);return r.length===0?!1:r.every(n=>n.kind==="side-effect"||n.kind==="namespace"&&n.usedMembers.length===0&&!n.used)}function d(e){let t=h(e);return!!(t==="entry"||t==="barrel"||t==="test"||t==="worker"||T(f.basename(e)))}function T(e){return!!(e==="index.ts"||e==="index.js"||e==="cli.ts"||e==="main.ts"||e==="main.rs"||e.includes("worker.")||e.includes("postinstall.")||e==="health.ts"||e==="health.js")}export{W as a};
|
|
18
|
-
//# sourceMappingURL=chunk-EHVEIEQN.js.map
|
package/dist/chunk-EHYDXE3Z.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as f}from"./chunk-CKBUBRYD.js";import{b as l,e as n,i as c}from"./chunk-H5EXS3HM.js";import{a as d}from"./chunk-JFMEXGFE.js";import{h as u}from"./chunk-7F45LJKI.js";import{join as o}from"path";var L=6,q=1e4,y="watch.lock",m="watch-state.json",b="watch-activity.json",S="watch-refresh-requests";function C(t){return{lockPath:o(t,y),statePath:o(t,m),activityPath:o(t,b),refreshRequestsPath:o(t,S)}}function j(t){try{return g(JSON.parse(u(t,"watch service state")))}catch{return null}}function g(t){if(!t||typeof t!="object")return null;let e=t;if(e.version!==1||typeof e.protocolVersion!="number"||typeof e.pid!="number"||!Number.isInteger(e.pid)||e.pid<=0||typeof e.projectRoot!="string"||e.worktreeId!==void 0&&(typeof e.worktreeId!="string"||e.worktreeId.length===0)||typeof e.cliVersion!="string"||!r(e.startedAt)||!r(e.heartbeatAt)||!r(e.lastActivityAt)||!h(e.watcher)||e.idleDeadlineAt!==void 0&&!r(e.idleDeadlineAt))return null;if(e.processIdentity!==void 0){let i=d(e.processIdentity);if(!i||i.pid!==e.pid)return null;e.processIdentity=i}return e.indexGeneration!==void 0&&!/^[a-f0-9]{64}$/.test(e.indexGeneration)||e.lastError!==void 0&&!R(e.lastError)||e.lastRefresh!==void 0&&!A(e.lastRefresh)||e.reindexActivity!==void 0&&!v(e.reindexActivity)||e.refreshRequests!==void 0&&!E(e.refreshRequests)||e.typescriptSemantic!==void 0&&!w(e.typescriptSemantic)||e.typescriptIndex!==void 0&&!T(e.typescriptIndex)?null:e}function r(t){return l(t)}function h(t){if(!t||typeof t!="object"||!("state"in t))return!1;let e=t;switch(e.state){case"idle":return!0;case"waiting":return s(e.changedFiles)&&s(e.reindexAt);case"indexing":return s(e.startedAt);case"cooldown":return s(e.until)&&typeof e.dirty=="boolean";case"budget-paused":return s(e.until)&&typeof e.dirty=="boolean"&&typeof e.reason=="string"&&n(e.rebuilt)&&n(e.estimatedWriteBytes);case"draining":return s(e.startedAt)&&typeof e.reason=="string";default:return!1}}function R(t){if(!t||typeof t!="object")return!1;let e=t;return r(e.at)&&typeof e.message=="string"}function A(t){if(!t||typeof t!="object")return!1;let e=t;return typeof e.trigger?.kind=="string"&&typeof e.result=="string"&&r(e.startedAt)&&r(e.completedAt)&&s(e.durationMs)}function v(t){if(!t||typeof t!="object")return!1;let e=t;return e.confidence!==void 0&&e.confidence!=="complete"&&e.confidence!=="partial"&&e.confidence!=="unavailable"||e.recordsRead!==void 0&&!n(e.recordsRead)||e.invalidRecords!==void 0&&!n(e.invalidRecords)||e.skippedRecords!==void 0&&!n(e.skippedRecords)||e.readErrors!==void 0&&!n(e.readErrors)||e.ignoredPartialTailBytes!==void 0&&!n(e.ignoredPartialTailBytes)||!r(e.windowStartedAt)||!r(e.windowEndedAt)||!n(e.runs)||!n(e.rebuilt)||e.fullRebuilds!==void 0&&!n(e.fullRebuilds)||!n(e.reused)||!n(e.failed)||!n(e.suppressed)||!s(e.estimatedLogicalOutputBytes)||e.estimatedWriteBytes!==void 0&&!n(e.estimatedWriteBytes)||e.reflinkedBytes!==void 0&&!n(e.reflinkedBytes)||e.fallbackCopiedBytes!==void 0&&!n(e.fallbackCopiedBytes)||e.oldestRebuildAt!==void 0&&!r(e.oldestRebuildAt)||e.oldestWriteAt!==void 0&&!r(e.oldestWriteAt)||e.languageAttribution!==void 0&&e.languageAttribution!=="complete"&&e.languageAttribution!=="partial"&&e.languageAttribution!=="unavailable"||e.attributedRuns!==void 0&&!n(e.attributedRuns)||e.unattributedRuns!==void 0&&!n(e.unattributedRuns)||e.invalidLanguageDetails!==void 0&&!n(e.invalidLanguageDetails)||e.estimatedLogicalOutputBytes<0||!e.byTrigger||typeof e.byTrigger!="object"||Array.isArray(e.byTrigger)||e.byLanguage!==void 0&&!x(e.byLanguage)?!1:Object.values(e.byTrigger).every(i=>i===void 0||n(i))}function x(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;for(let[e,i]of Object.entries(t)){if(!f.includes(e)||!i||typeof i!="object")return!1;let a=i;if(!n(a.runs)||!n(a.rebuilt)||!n(a.reused)||!n(a.producedOutputBytes)||!c(a.durationMs)||a.rebuilt+a.reused!==a.runs)return!1}return!0}function E(t){if(!t||typeof t!="object")return!1;let e=t;return n(e.pending)&&n(e.claimed)&&n(e.completed)&&n(e.expired)&&n(e.invalid)&&(e.oldestPendingAt===void 0||r(e.oldestPendingAt))}function w(t){if(!t||typeof t!="object")return!1;let e=t;return typeof e.protocolVersion=="number"&&(e.state==="idle"||e.state==="ready"||e.state==="unavailable"||e.state==="error")&&s(e.requests)&&s(e.sessionsCreated)&&s(e.sessionsReused)&&s(e.sessionsRefreshed)&&s(e.sessionsReplaced)&&s(e.projectsCreated)&&(e.lastRequestAt===void 0||r(e.lastRequestAt))&&(e.lastError===void 0||typeof e.lastError=="string")&&(e.busyUntil===void 0||r(e.busyUntil))&&(e.mailbox===void 0||p(e.mailbox))}function T(t){if(!t||typeof t!="object")return!1;let e=t;return typeof e.protocolVersion=="number"&&(e.state==="idle"||e.state==="ready"||e.state==="unavailable"||e.state==="error")&&n(e.requests)&&n(e.sessionsCreated)&&n(e.sessionsReplaced)&&(e.sessionsEvicted===void 0||n(e.sessionsEvicted))&&(e.activeSessions===void 0||n(e.activeSessions))&&(e.maxActiveSessions===void 0||n(e.maxActiveSessions))&&(e.heapUsedBytes===void 0||n(e.heapUsedBytes))&&(e.heapLimitBytes===void 0||n(e.heapLimitBytes))&&(e.softMemoryLimitBytes===void 0||n(e.softMemoryLimitBytes))&&(e.retireRequested===void 0||typeof e.retireRequested=="boolean")&&n(e.initializations)&&n(e.programUpdates)&&n(e.documentsEmitted)&&n(e.documentsRemoved)&&(e.lastRequestAt===void 0||r(e.lastRequestAt))&&(e.lastDurationMs===void 0||s(e.lastDurationMs)&&e.lastDurationMs>=0)&&(e.lastError===void 0||typeof e.lastError=="string")&&(e.busyUntil===void 0||r(e.busyUntil))&&(e.mailbox===void 0||p(e.mailbox))}function p(t){if(!t||typeof t!="object")return!1;let e=t;return n(e.pending)&&n(e.inflight)&&n(e.responses)&&n(e.deadLetters)&&n(e.invalid)&&n(e.totalItems)&&s(e.totalBytes)&&e.totalBytes>=0&&e.totalItems===e.pending+e.inflight+e.responses+e.deadLetters&&(e.oldestPendingAt===void 0||r(e.oldestPendingAt))}function s(t){return typeof t=="number"&&Number.isFinite(t)}export{L as a,q as b,C as c,j as d,r as e};
|
|
2
|
-
//# sourceMappingURL=chunk-EHYDXE3Z.js.map
|
package/dist/chunk-EP63Y6LD.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as t}from"./chunk-VDGFWCQV.js";function i(r,s,e={}){let a=t(r,s,{families:["dataflow"],...e.maxDepth!==void 0?{maxDepth:e.maxDepth}:{},...e.maxEdges!==void 0?{maxEdges:e.maxEdges}:{}});return{kind:"value-flow",targets:a.targets,edges:a.edges,coverage:{status:a.coverage.status,basis:"proved-bounded-static-value-flow",analysisBasis:"partial-system-definition-use",providers:["bounded-static-value-flow","typescript-local-dependence"],supportedRelations:["compiler-identified local definitions reaching local reads through a TypeScript control-flow graph","right-hand-side local reads supplying assignments and declarations","candidate closure captures and bounded same-owner field flow with explicit evidence strength","direct argument-to-parameter forwarding at compiler-resolved calls","bounded mechanically derived static arguments","callee return value to a consumed compiler-resolved call result"],unsupportedRelations:["general heap alias and cross-instance field points-to flow","exceptional control and value flow","closure invocation order","downstream local definition-use after a call result","dynamic calls not resolved by the semantic provider"],graph:a.coverage}}}export{i as a};
|
|
2
|
-
//# sourceMappingURL=chunk-EP63Y6LD.js.map
|
package/dist/chunk-EPX6NQN6.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{a as C}from"./chunk-VBV6ALJE.js";import{c as M}from"./chunk-NJT3ZEKY.js";import{b as f,c as I}from"./chunk-2BMSSRBH.js";import{e as d}from"./chunk-YSYPDRD5.js";import{d as h}from"./chunk-MTDBHTSF.js";import{d as g}from"./chunk-C7C6AKAT.js";import{n as y}from"./chunk-RBAD4GJ2.js";var x=new Set(h());function N(e,n){let{scope:o,minLoc:r=10,limit:i=30,scanLimit:t}=n??{},s=new I(e);return C({candidates:()=>s.productionCallableDefinitions({scope:o,minLoc:r,requireFunctionLikeSymbol:!0,includeSuppressed:!0,sortByLocDesc:typeof t=="number"&&t>0}),scanLimit:t,filterCandidate:S,profile:{name:"complexity-hotspots"},prepare:a=>{let l=B(e,a),m=n?.semantic!==!1,c=m?d(e):null;c?.materializeReferences(a,{prefetchCallees:!0});let u=s.crossFileCallerMap(a,{semantic:!1});return{callerMap:c?f(u,c.callerMap(a)):u,calleeMap:s.calleeMap(a,{semantic:m}),languageByFile:l,clojureCallableIds:D(e,a,l),branchEstimates:M(e,a)}},evaluate:(a,l)=>L(a,l,r),orderResults:(a,l)=>l.score-a.score||l.loc-a.loc,limit:i})}function S(e){return e.symbol.startsWith("rust-analyzer ")?typeof e.kind=="number"&&x.has(e.kind):!0}function L(e,n,o){if(n.languageByFile.get(e.relativePath)==="clojure"&&!n.clojureCallableIds.has(e.symbolId))return null;let r=e.endLine-e.startLine+1;if(r<o)return null;let i=n.callerMap.get(e.symbolId)?.size??0,t=n.calleeMap.get(e.symbolId)??[],s=new Set,a=new Set;for(let p of t){let b=`${p.symbol}|${p.file}`;s.add(b),p.file!==e.relativePath&&a.add(b)}let l=a.size,m=s.size,c=n.branchEstimates.get(e.symbolId)??{branches:0,estimateBasis:"regex-fallback"},u=c.branches+1;return{symbol:e.symbol,shortName:g(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:r,fanIn:i,fanOut:l,calleeCount:m,branches:c.branches,estimateBasis:c.estimateBasis,score:Math.round(r/50*(i/5)*Math.max(l/5,1)*Math.max(u/5,1)*100)/100}}function B(e,n){let o=[...new Set(n.map(t=>t.relativePath))];if(o.length===0)return new Map;let r=o.map(()=>"?").join(", "),i=e.all(`SELECT relative_path, language
|
|
2
|
-
FROM documents
|
|
3
|
-
WHERE relative_path IN (${r})`,...o);return new Map(i.map(t=>[t.relative_path,t.language?.toLowerCase()??null]))}function D(e,n,o){let r=new Set,i=new Map;for(let t of n){if(o.get(t.relativePath)!=="clojure")continue;let s=i.get(t.relativePath);s||(s=new Set((y(e,t.relativePath)?.callables??[]).map(a=>`${a.name}:${a.startLine}`)),i.set(t.relativePath,s)),s.has(`${t.leaf}:${t.startLine}`)&&r.add(t.symbolId)}return r}export{N as a};
|
|
4
|
-
//# sourceMappingURL=chunk-EPX6NQN6.js.map
|
package/dist/chunk-ETC674NS.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{c as g,j as k,k as E,l as w,m as T,n as j,o as b,p as x,v as h,w as v,y}from"./chunk-KNLQGXVH.js";import{Ba as m,Ca as P}from"./chunk-JZ2A7LDM.js";function M(e){return typeof e=="object"&&e!==null}function R(e){return Array.isArray(e)&&e.every(t=>typeof t=="string")?e:null}var F=[r("source-facts",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/source/source-facts.ts"}),r("file-definitions",{dependsOn:["content-hash","project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","contentHash","projectFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/symbols/definition-catalog.ts"}),r("definition-exclusions",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/analysis/framework-patterns.ts"}),r("doc-path-tokens",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-products.test.ts",owner:"tests/storage/evidence-cache.test.ts"}),r("doc-path-evidence",{dependsOn:["content-hash","git-history","git-head","tool-version"],keyParts:["kind","relativePath","contentHash","trackedFiles","historyWindow","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/queries/cleanup/doc-drift.ts"}),r("source-imports",{dependsOn:["content-hash","import-resolution-fingerprint","config","tool-version"],keyParts:["kind","relativePath","contentHash","importResolutionFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/language-parsers/index.ts"}),r("source-reexports",{dependsOn:["content-hash","import-resolution-fingerprint","config","tool-version"],keyParts:["kind","relativePath","contentHash","importResolutionFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/language-parsers/index.ts"}),r("source-fingerprints",{dependsOn:["content-hash","project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","contentHash","projectFingerprint","payloadVersion"],stalenessTest:"tests/symbols/definition-catalog.test.ts",owner:"src/queries/cleanup/similar.ts"}),r("consumer-file-usage",{dependsOn:["content-hash","project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","contentHash","projectFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/queries/internal/consumer-evidence.ts"}),r("react-component-behavior-profiles",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/source/react-profile.ts"}),r("git-file-adds",{dependsOn:["git-head","git-history","tool-version"],keyParts:["kind","cacheKey","head","historyWindow","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/analysis/git-history.ts"}),r("typescript-reference-fragments",{dependsOn:["content-hash","transitive-deps-digest","config","tool-version"],keyParts:["kind","relativePath","semanticIdentity","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-reference-fragments.test.ts",owner:"src/semantic/typescript/reference-fragment-shadow.ts"}),r("typescript-import-usage",{dependsOn:["content-hash","transitive-deps-digest","config","tool-version"],keyParts:["kind","relativePath","semanticIdentity","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-semantic-provider.test.ts",owner:"src/semantic/shared-primitives.ts"}),r("typescript-signatures",{dependsOn:["content-hash","transitive-deps-digest","config","tool-version"],keyParts:["kind","relativePath","semanticIdentity","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-semantic-provider.test.ts",owner:"src/semantic/shared-primitives.ts"}),r("runtime-boundary-http-roles",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/analysis/runtime-boundaries.test.ts",owner:"src/analysis/runtime-boundaries/http-summaries.ts"}),r("runtime-boundary-source-hashes",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/analysis/runtime-boundaries.test.ts",owner:"src/analysis/runtime-boundaries/graph.ts"}),r("runtime-boundary-direct-extraction",{dependsOn:["content-hash","direct-deps-digest","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/analysis/runtime-boundaries.test.ts",owner:"src/analysis/runtime-boundaries/graph.ts"}),p("file-dependency-graph",{dependsOn:["project-fingerprint","indexed-language-set","import-resolution-fingerprint","tool-version"],keyParts:["kind","scope","projectFingerprint","payloadVersion"],stalenessTest:"tests/symbols/file-dep-graph.test.ts",owner:"src/symbols/graph/file-dep-graph.ts"}),p("semantic-import-usage",{dependsOn:["project-fingerprint","indexed-language-set","import-resolution-fingerprint","tool-version"],keyParts:["kind","relativePath","projectFingerprint","language","semanticEngine","payloadVersion"],stalenessTest:"tests/semantic/rust/rust-semantic-cache-gate.test.ts",owner:"src/semantic/shared-primitives.ts"}),p("semantic-signatures",{dependsOn:["project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","symbol","projectFingerprint","language","semanticEngine","payloadVersion"],stalenessTest:"tests/semantic/rust/rust-semantic-cache-gate.test.ts",owner:"src/semantic/shared-primitives.ts"}),p("health-semantic-prewarm",{dependsOn:["project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","scope","cliVersion","projectFingerprint","payloadVersion"],stalenessTest:"tests/runtime/cli-support.test.ts",owner:"src/runtime/cli-support.ts"}),p("typescript-hierarchy-targets",{dependsOn:["project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","definitionSet","projectFingerprint","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-semantic-provider.test.ts",owner:"src/semantic/typescript/ts-morph-provider.ts"})];function N(e){let t=new Map;return{kind:e.kind,read(n,i,s){let o=!1,d=0,a;if(h()){let c=k(n);if(c){let l=`${c}\0${i}\0${s}`;a=t.get(l),a||(a=v(["evidence-product-file-read-v1",e.kind,c,i,s]),t.set(l,a))}}return y("evidence-product.file.read",()=>{let c=E(n,e.kind,i,s);if(c===null)return null;d=c.length;try{let l=e.deserialize(c);return o=l!==null,l}catch{return null}},()=>({...a?{workIdentity:a,workOutcome:"computed"}:{},scope:"file",kind:e.kind,available:!0,hit:o,payloadBytes:d}))},has(n,i,s){return w(n,e.kind,i,s)},write(n,i,s,o){T(n,e.kind,i,s,e.serialize(o))},writeBatch(n,i){j(n,i.map(s=>({kind:e.kind,relativePath:s.relativePath,contentHash:s.contentHash,payload:e.serialize(s.value)})))}}}function B(e){let t=new Map;return{kind:e.kind,read(n,i,s){let o=!1,d=0,a;if(h()){let c=`${s}\0${i}`;a=t.get(c),a||(a=v(["evidence-product-project-read-v1",e.kind,s,i]),t.set(c,a))}return y("evidence-product.project.read",()=>{let c=b(n,e.kind,i,s);if(c===null)return null;d=c.length;try{let l=e.deserialize(c);return o=l!==null,l}catch{return null}},()=>({...a?{workIdentity:a,workOutcome:"computed"}:{},scope:"project",kind:e.kind,available:!0,hit:o,payloadBytes:d}))},write(n,i,s,o){x(n,e.kind,i,s,e.serialize(o))}}}function U(e){let t=F.find(n=>n.kind===e);if(!t)throw new Error(`missing evidence product manifest entry for ${e}`);return t.invalidation}function r(e,t){return{scope:"file",kind:e,invalidation:{scope:"file",...t}}}function p(e,t){return{scope:"project",kind:e,invalidation:{scope:"project",...t}}}var u=null;function f(e){u?.(e)}function L(e,t){let n=u;u=e;try{return t()}finally{u=n}}var S=g("source-text",{clearGroups:["whole-project","source-file"]}),V=g("source-lines",{clearGroups:["whole-project","source-file"]});function C(e,t){let n=t.replace(/\\/g,"/");return f(n),S.get(e,n,()=>I(e,n))}function I(e,t){let n=t.replace(/\\/g,"/");f(n);try{return m(e.config.projectRoot,n,{inputKind:"indexed source file"})}catch(i){if(P(i))return"";throw i}}function Y(e){if(e.length===0)return[];let t=e.split(`
|
|
2
|
-
`);return e.endsWith(`
|
|
3
|
-
`)&&t.pop(),t}function D(e,t){let n=t.replace(/\\/g,"/");return V.get(e,n,()=>{let i=C(e,n);return i?i.split(`
|
|
4
|
-
`):[]})}var H=/^\s*(?:\/\/|#|\/\*+|\*)\s*scip-query[\s:-]*ignore(?:[\s:-]+(dead(?:-code)?|stale|wrapper|passthrough|drift|extract|similar|twin))?\b/i;function K(e){let t=H.exec(e);return t?t[1]??"":null}function Z(e,t,n){return O(e,t,n).length>0}function ee(e,t,n,i){let s=i.toLowerCase();return O(e,t,n).some(o=>o.toLowerCase()===s)}function O(e,t,n){if(n<=0)return[];let i=D(e,t);if(i.length===0)return[];let s=[];for(let o=n-1;o>=0&&o>=n-5;o-=1){let d=(i[o]??"").trim();if(d==="")continue;let a=K(d);if(a!==null){s.push(a);continue}if(!d.startsWith("//")&&!d.startsWith("*")&&!d.startsWith("/*")&&!d.startsWith("@")&&!d.startsWith("#"))return s}return s}export{M as a,R as b,N as c,B as d,U as e,f,L as g,C as h,I as i,Y as j,D as k,K as l,Z as m,ee as n};
|
|
5
|
-
//# sourceMappingURL=chunk-ETC674NS.js.map
|
package/dist/chunk-F5GSBHC6.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{D as M,c as N,d as _,e as w,i as k,j as A,k as z,p as f,q as S,t as R}from"./chunk-C7C6AKAT.js";import{b as B}from"./chunk-ZLMXIQLC.js";import{c as O}from"./chunk-KNLQGXVH.js";var T=O("symbol-resolution",{clearGroups:[]});function he(e,n){return G(e,n).match}function G(e,n){return T.get(e,n,()=>{let t=W(e,n.trim()).filter(i=>!e.isIgnored(i.relative_path));if(t.length>0)return L(e,t);let o=P(e,n);if(o&&!e.isIgnored(o.relative_path))return L(e,[o]);let r=H(e,n);if(r.length>0)return L(e,r);let s=U(e,n);return s.length>0?L(e,s):J(e,n)})}function H(e,n){let t=n.trim().replace(/\(\)$/u,""),o=t.lastIndexOf(":");if(o<=0||o===t.length-1||t.startsWith("local:"))return[];let r=t.slice(o+1);if(!/^[\p{L}_$][\p{L}\p{N}_$]*$/u.test(r))return[];let s=[`/${r}().`,`/${r}.`,`/${r}#`,`#${r}().`,`#${r}.`,`/${r}/`],i=`gs.display_name = ? OR ${s.map(()=>"instr(gs.symbol, ?) > 0").join(" OR ")}`,a=[r,...s],l=f(e,{where:i,params:a,orderBy:"d.relative_path, der.start_line",limit:200}),u=l.length>0?[]:S(e,{where:i,params:a,orderBy:"d.relative_path, start_line",limit:200}),p=R(l,u).filter(m=>!e.isIgnored(m.relative_path)).filter(m=>_(m.symbol).replace(/\(\)$/u,"")===t);return[...new Map(p.map(m=>[`${m.symbol}\0${m.relative_path}`,m])).values()]}function U(e,n){let t=Q(n),o=E(t);if(!o)return[];let r=`%${o.path}%`,s=o.leaf;return X(e,r,s,t)}function X(e,n,t,o){let r=R([],[...Y(e,n,t),...Z(e,n,t)]).filter(s=>!e.isIgnored(s.relative_path)).filter(s=>C(s,o)>1);return r.sort((s,i)=>C(i,o)-C(s,o)||s.end_line-s.start_line-(i.end_line-i.start_line)||s.start_line-i.start_line||s.symbol.localeCompare(i.symbol)),r}function Y(e,n,t){return f(e,{where:"d.relative_path LIKE ? AND (gs.display_name = ? OR gs.symbol LIKE ?)",params:[n,t,`%/${t}.%`]})}function Z(e,n,t){return S(e,{where:"d.relative_path LIKE ? AND (gs.display_name = ? OR gs.symbol LIKE ?)",params:[n,t,`%/${t}.%`]})}function J(e,n){let t=Q(n),o=ae(n),r=oe(e,o),s=se(r,n,t).filter(a=>!e.isIgnored(a.relative_path));if(s.length>0)return L(e,s);let i=[];for(let a of r){if(e.isIgnored(a.relative_path))continue;let l=re(a,n,t,o);l<=0||i.push({row:a,score:l})}return i.sort((a,l)=>l.score-a.score||a.row.end_line-a.row.start_line-(l.row.end_line-l.row.start_line)||a.row.relative_path.localeCompare(l.row.relative_path)||a.row.symbol.localeCompare(l.row.symbol)),L(e,i.map(a=>a.row))}function L(e,n){let t=n.map(r=>M(e,r)),o=t[0]??null;return{match:o,candidates:o?V(t,o):[],total:t.length}}function V(e,n){let t=new Set([`${n.symbolId}:${n.relativePath}:${n.startLine}`]),o=[];for(let r of e){let s=`${r.symbolId}:${r.relativePath}:${r.startLine}`;if(!t.has(s)&&(t.add(s),o.push({symbol:r.symbol,shortName:_(r.symbol),relativePath:r.relativePath,startLine:r.startLine}),o.length>=5))break}return o}function P(e,n){let t=n.match(/^(.+):(\d+)(?:-(\d+))?$/);if(!t)return;let[,o,r,s]=t,i=B(e,o,{allowMultiple:!1,requirePathMatch:!0})[0]?.relativePath;if(!i)return;let a=Math.max(0,parseInt(r,10)-1),l=s?Math.max(a,parseInt(s,10)-1):a;return ee(e,i,a,l)??te(e,i,a,l)}function ee(e,n,t,o){return f(e,{where:"d.relative_path = ? AND der.start_line <= ? AND der.end_line >= ?",params:[n,t,o],orderBy:"(der.end_line - der.start_line) ASC",limit:1})[0]}function te(e,n,t,o){return S(e,{where:"d.relative_path = ? AND c.start_line <= ? AND c.end_line >= ?",params:[n,t,o],orderBy:"(MAX(c.end_line) - MIN(c.start_line)) ASC",limit:1})[0]}function be(e,n){let t=W(e,n).find(o=>!e.isIgnored(o.relative_path));return t?M(e,t):null}function W(e,n){let t=f(e,{where:"gs.symbol = ?",params:[n],orderBy:"d.relative_path, der.start_line"}),o=t.length>0?[]:S(e,{where:"gs.symbol = ?",params:[n],orderBy:"d.relative_path, start_line"});return R(t,o)}function Se(e,n){if("symbol"in n&&"relativePath"in n)return n;let t=ne(e,n.symbolId)[0];return t?M(e,t):null}function ne(e,n){let t=f(e,{where:"gs.id = ?",params:[n],orderBy:"der.start_line, der.end_line"}),o=S(e,{where:"gs.id = ?",params:[n],orderBy:"start_line, end_line"});return R(t,o)}function oe(e,n){let t=n.map(()=>"(gs.symbol LIKE ? OR d.relative_path LIKE ? OR COALESCE(gs.display_name, '') LIKE ?)"),o=n.flatMap(a=>{let l=`%${a}%`;return[l,l,l]}),r=t.join(`
|
|
2
|
-
AND `),s=f(e,{where:r,params:o,limit:200}),i=S(e,{where:r,params:o,limit:200});return R(s,i)}function re(e,n,t,o){let r=n.trim(),s=t,i=s.replace(/\(\)$/,""),a=n.toLowerCase(),l=t.toLowerCase(),u=l.replace(/\(\)$/,""),p=e.symbol,m=_(e.symbol),y=w(e.symbol),g=e.display_name??"",$=e.symbol.toLowerCase(),d=m.toLowerCase(),h=y.toLowerCase(),x=g.toLowerCase(),b=e.relative_path.toLowerCase(),j=/[/:.]/.test(t),I=E(t),v=I?.leaf.toLowerCase(),c=0;return(p===r||p===s)&&(c+=1150),(m===r||m===s)&&(c+=1100),g===i&&(c+=1180),y===i&&(c+=1160),(`${y}()`===r||`${y}()`===s)&&(c+=955),($===a||$===l)&&(c+=1e3),(d===a||d===l)&&(c+=950),(b===a||b===l)&&(c+=925),(b.endsWith(`/${l}`)||b.endsWith(`/${a}`))&&(c+=875),x===u&&(c+=850),h===u&&(c+=825),(`${h}()`===a||`${h}()`===l)&&(c+=820),(d.endsWith(`:${l}`)||d.endsWith(`:${u}`)||d.endsWith(`:${u}()`))&&(c+=800),$.includes(l)&&(c+=120),d.includes(l)&&(c+=140),b.includes(l)&&(c+=140),x.includes(l)&&(c+=110),o.every(q=>{let D=q.toLowerCase();return $.includes(D)||d.includes(D)||b.includes(D)||x.includes(D)})&&(c+=100+o.length*15),I&&b.includes(I.path.toLowerCase())&&(c+=360,v&&(h===v||`${h}()`===v||`${h}()`==`${v}()`)&&(c+=700),k(e.symbol)&&(c+=180)),A(e.symbol)&&h===u&&(c+=60),!j&&z(e.symbol)&&(c-=160),c-=Math.min(50,Math.max(0,e.end_line-e.start_line)),c}function E(e){let n=e.trim().replace(/\\/g,"/"),t=n.lastIndexOf("/");if(t<=0||t===n.length-1)return null;let o=n.slice(t+1).replace(/\(\)$/,"");return!o||o.includes(".")?null:{path:n.slice(0,t),leaf:o}}function Q(e){return e.trim().replace(/\(\)$/,"").replace(/\(.*$/,"")}function ae(e){let n=Q(e),t=n.split(/[^A-Za-z0-9_]+/).map(o=>o.trim()).filter(o=>o.length>0);return t.length>0?[...new Set(t)]:[n]}function se(e,n,t){let o=n.trim(),r=e.filter(a=>{let l=_(a.symbol),u=w(a.symbol),p=(a.display_name??"").trim();return a.symbol===o||l===o||l===t||u===o||u===t||`${u}()`===o||p===o||p===t||`${p}()`===o||C(a,t)>1||a.relative_path===o});if(r.length===0)return[];let s=t.replace(/\(\)$/u,""),i=r.filter(a=>w(a.symbol)===s);if(i.length>0){i.sort((l,u)=>F(l,u,t));let a=i.filter(l=>A(l.symbol));return a.length>0?a:i}return r.sort((a,l)=>F(a,l,t)),r}function F(e,n,t){return C(n,t)-C(e,t)||e.end_line-e.start_line-(n.end_line-n.start_line)||e.relative_path.localeCompare(n.relative_path)||e.symbol.localeCompare(n.symbol)}function C(e,n){let t=E(n);if(!t)return 0;let o=e.relative_path.toLowerCase(),r=w(e.symbol).toLowerCase(),s=t.path.toLowerCase(),i=t.leaf.toLowerCase();return o.includes(s)?r!==i?1:k(e.symbol)?N(e.symbol)===null?5:4:N(e.symbol)===null?3:2:0}function ge(e,n,t=5){let o=K(n);if(!o)return[];let r=f(e,{where:"1 = 1",orderBy:"d.relative_path, der.start_line",limit:5e3}),s=new Map;for(let i of r){if(e.isIgnored(i.relative_path))continue;let a=_(i.symbol),l=w(i.symbol),u=i.display_name??l,p=[a,l,u].filter(g=>g.trim().length>0),m=Math.min(...p.map(g=>ie(K(g),o))),y=s.get(a);(!y||m<y.distance)&&s.set(a,{shortName:a,distance:m})}return[...s.values()].sort((i,a)=>i.distance-a.distance||i.shortName.localeCompare(a.shortName)).slice(0,t).map(i=>i.shortName)}function K(e){return Q(e).toLowerCase().replace(/[^a-z0-9_]+/g,"")}function ie(e,n){if(e===n)return 0;if(e.length===0)return n.length;if(n.length===0)return e.length;let t=Array.from({length:n.length+1},(o,r)=>r);for(let o=0;o<e.length;o++){let r=[o+1];for(let s=0;s<n.length;s++){let i=e[o]===n[s]?0:1;r[s+1]=Math.min(r[s]+1,t[s+1]+1,t[s]+i)}t=r}return t[n.length]}export{he as a,G as b,be as c,Se as d,ge as e};
|
|
3
|
-
//# sourceMappingURL=chunk-F5GSBHC6.js.map
|
package/dist/chunk-FH3DGXC6.js
DELETED
package/dist/chunk-FI7VGOR4.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{a as z}from"./chunk-WRQXLNYE.js";import{d as y}from"./chunk-2USA3S3P.js";import{c as v}from"./chunk-BJT7LSPK.js";import{C as L,K as R,T as O,_ as $,i as p,n as A,o as F,p as T}from"./chunk-2VAHDDLM.js";import{b as E,d as b}from"./chunk-BL6DCHQP.js";import{c as h,d as k}from"./chunk-IW5XQG5G.js";import{n as P,p as g}from"./chunk-7HXT6YLU.js";function _e(e,n){let t=B(e);return t?n.filter(r=>B(r.file)===t):n}function xe(e,n,t,r,i){let o=R(e,n);if(r){let f=i?.match(/^[A-Za-z_$][\w$]*/u)?.[0];if(!f)return null;let d=new Set(o.filter(u=>u.localName===f||u.importedName===f).map(u=>u.sourcePath).filter(u=>!!u));for(let u of t)for(let S of d)if(g(S,u.file))return u;if(f==="this"||f==="self"||f==="cls"){let u=t.filter(S=>S.file===n&&E(S.symbol)!==null);if(u.length===1)return u[0]}let m=X(p(e,n)??"",f);if(m.size===0)return null;let V=new Set(o.filter(u=>m.has(u.localName??u.importedName)).map(u=>u.sourcePath).filter(u=>!!u)),D=t.filter(u=>m.has(E(u.symbol)??"")&&(u.file===n||[...V].some(S=>g(S,u.file))));return D.length===1?D[0]:null}let s=t.filter(f=>E(f.symbol)===null),c=s.find(f=>f.file===n);if(c)return c;let a=b(t[0].symbol),l=o.filter(f=>f.kind!=="namespace"&&f.kind!=="side-effect"&&(f.localName===a||f.localName===null&&f.importedName===a));if(l.length>0){let f=s.filter(d=>l.some(m=>m.sourcePath!==null&&g(m.sourcePath,d.file)));return f.length===1?f[0]:null}return s.length===1?s[0]:null}function X(e,n){let t=n.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&"),r=new Set,i=[new RegExp(`\\b${t}\\s*:\\s*([A-Za-z_$][\\w$]*)`,"gu"),new RegExp(`\\b${t}\\s*=\\s*(?:new\\s+)?([A-Za-z_$][\\w$]*)\\s*\\(`,"gu")];for(let o of i)for(let s of e.matchAll(o))r.add(s[1]);return r.size===1?r:new Set}function B(e){let n=T(e);return n?n==="typescript"||n==="tsx"||n==="javascript"?"javascript-family":n:null}var q=k("global-leaf-index",{clearGroups:["whole-project"]});function N(e){return q.get(e,()=>{let n=e.all(`SELECT gs.id, gs.symbol,
|
|
2
|
-
COALESCE(der_doc.relative_path, mention_doc.relative_path) AS relative_path
|
|
3
|
-
FROM global_symbols gs
|
|
4
|
-
LEFT JOIN defn_enclosing_ranges der ON der.symbol_id = gs.id
|
|
5
|
-
LEFT JOIN documents der_doc ON der_doc.id = der.document_id
|
|
6
|
-
LEFT JOIN (
|
|
7
|
-
SELECT m.symbol_id, MIN(d.relative_path) AS relative_path
|
|
8
|
-
FROM mentions m
|
|
9
|
-
JOIN chunks c ON m.chunk_id = c.id
|
|
10
|
-
JOIN documents d ON c.document_id = d.id
|
|
11
|
-
WHERE m.role = 1
|
|
12
|
-
GROUP BY m.symbol_id
|
|
13
|
-
) mention_doc ON mention_doc.symbol_id = gs.id
|
|
14
|
-
WHERE 1 = 1
|
|
15
|
-
${e.symbolNoiseFor("gs")}`),t=new Map;for(let r of n){if(!r.relative_path||e.isIgnored(r.relative_path))continue;let i=b(r.symbol);if(!i)continue;let o=t.get(i);o||(o=[],t.set(i,o)),o.some(s=>s.symbolId===r.id)||o.push({symbol:r.symbol,symbolId:r.id,file:r.relative_path})}return t})}function _(e,n,t,r={}){if(!t)return[];let i=p(e,n);return i?i.indexOf(t)===-1?[]:(M(e,n).get(t)??[]).filter(s=>!K(s,r)):[]}function K(e,n){return typeof n.excludeStartLine=="number"&&typeof n.excludeEndLine=="number"&&e>=n.excludeStartLine&&e<=n.excludeEndLine}var Q=h("file-identifiers",{clearGroups:["whole-project","source-file"]});function j(e,n){let t=L(e,n);return t?t.fileIdentifiers:Q.get(e,n,()=>new Set(M(e,n).keys()))}var ee=h("file-ident-lines",{clearGroups:["whole-project","source-file"]});function M(e,n){let t=L(e,n);return t?t.identifierLineMap:ee.get(e,n,()=>ne(e,n))}var te=h("file-idents-by-line",{clearGroups:["whole-project","source-file"]});function De(e,n){let t=L(e,n);return t?t.identifiersByLine:te.get(e,n,()=>{let r=M(e,n),i=0;for(let s of r.values()){let c=s[s.length-1];c!==void 0&&c>i&&(i=c)}let o=new Array(i+1);for(let s=0;s<=i;s+=1)o[s]=new Set;for(let[s,c]of r)for(let a of c)o[a].add(s);return o})}function ne(e,n){let t=new Map,r=(c,a)=>{let l=t.get(c);if(!l){t.set(c,[a]);return}l[l.length-1]!==a&&l.push(a)},i=p(e,n);if(!i)return t;let o=F(i).split(/\r?\n/),s=/\b([A-Za-z_$][\w$]*)\b/g;for(let c=0;c<o.length;c+=1){let a=o[c]??"";for(let l of a.matchAll(s))l[1]&&r(l[1],c)}return t}var G=/[A-Za-z_$][A-Za-z0-9_$]*/g,Z=/^[A-Za-z_$][A-Za-z0-9_$]*$/,re=512;function C(e){let n=[],t=!1;for(let r of e)r&&(t=!0,Z.test(r)||n.push(r));return{candidateNames:e,hasUsableCandidate:t,nonIdentifierNames:n}}function H(e,n){let t=ie(n)?n:C(n);if(t.candidateNames.size===0||!t.hasUsableCandidate)return!0;if(t.candidateNames.size<=re){for(let i of t.candidateNames)if(i){if(Z.test(i)){if(oe(i).test(e))return!0;continue}if(e.includes(i))return!0}return!1}G.lastIndex=0;let r;for(;(r=G.exec(e))!==null;)if(t.candidateNames.has(r[0]))return!0;for(let i of t.nonIdentifierNames)if(e.includes(i))return!0;return!1}function ie(e){return"candidateNames"in e}function oe(e){return new RegExp(`(?<![A-Za-z_$0-9])${A(e)}(?![A-Za-z_$0-9])`)}var se=h("source-import-paths-by-local-name",{clearGroups:["whole-project","source-file"]});function J(e,n){let t=P(n);return se.get(e,t,()=>ae(e,t))}function ae(e,n){let t=new Map;for(let r of R(e,n)){if(!r.sourcePath)continue;let i=r.localName??r.importedName;if(i&&U(t,i,r.sourcePath),r.kind==="namespace")for(let o of r.usedMembers)U(t,o,r.sourcePath)}return t}function U(e,n,t){let r=e.get(n);r||(r=new Set,e.set(n,r)),r.add(t)}function w(e,n,t){let r=N(e).get(t);if(!r||r.length===0)return[];if(r.length===1)return[I(r[0])];let i=r.filter(a=>a.file===n);if(i.length>0)return i.map(I);let o=J(e,n),s=o.get(t);if(s)for(let a of s){let l=r.filter(f=>g(a,f.file));if(l.length>0)return l.map(I)}let c=new Set;for(let a of o.values())for(let l of a)c.add(l);for(let a of c){let l=r.filter(f=>g(a,f.file));if(l.length>0&&l.length===r.length)return l.map(I)}return[]}function Ve(e,n,t){let r=w(e,n,t);if(r.length>0)return r;let i=N(e).get(t);return!i||i.length===0?[]:i.map(I)}function Y(e,n,t={}){let r=ce(e,n);if(!r)return[];let i=y(e,n);if(t.semantic!==!1&&t.semanticEvidence){let s=t.semanticEvidence.references(e,{...i,leaf:r.identifier,parentTypeName:null,isFunctionLike:!1,isTypeLike:!1,kind:null,documentation:null,enclosingSymbol:null});if(s.length>0){let c=new Map;for(let a of s){let l=c.get(a.file)??[];l.push(a.line),c.set(a.file,l)}return x(e,c)}}let o=new Map;for(let s of v(e)){let c=le(e,r,s);c.length>0&&o.set(s,c)}return x(e,o)}function ce(e,n){let t=y(e,n);if(!t)return null;let r=b(t.symbol);return r?{symbolId:t.symbolId,relativePath:t.relativePath,startLine:t.startLine,endLine:t.endLine,identifier:r}:null}function le(e,n,t){let r=p(e,t);return!r||r.indexOf(n.identifier)===-1?[]:t!==n.relativePath&&!w(e,t,n.identifier).some(o=>o.symbolId===n.symbolId)?[]:_(e,t,n.identifier,t===n.relativePath?{excludeStartLine:n.startLine,excludeEndLine:n.endLine}:{})}function Xe(e,n,t={}){let r=new Map;for(let a of n){if(!a.leaf)continue;let l=r.get(a.leaf)??[];l.push(a),r.set(a.leaf,l)}if(r.size===0)return new Map;let i=new Set(n.map(a=>a.symbolId)),o=new Set(r.keys()),s=C(o),c=new Map;for(let a of v(e)){if(t.skipPath?.(a)||!H(p(e,a),s))continue;let l=j(e,a);if(l.size!==0){for(let f of l)if(r.has(f))for(let d of w(e,a,f)){if(!i.has(d.symbolId)||a===d.relativePath)continue;let m=c.get(d.symbolId);m||(m=new Set,c.set(d.symbolId,m)),m.add(a)}}}return c}function I(e){return{symbolId:e.symbolId,symbol:e.symbol,relativePath:e.file}}function x(e,n){let t=[],r=new Set;for(let[i,o]of n){let s=O(e,i);for(let c of o){let a=$(s,c),l=`${i}|${c}|${a?.symbol??""}`;r.has(l)||(r.add(l),t.push({file:i,line:c,enclosingSymbol:a?.symbol??null}))}}return t}function fe(e,n){return ue(e,[n]).get(n.symbolId)??[]}function ue(e,n){let t=n.map(o=>({symbolId:o.symbolId,prelude:Se(e,o)})).filter(o=>o.prelude!==null),r=pe(e,t.map(o=>o.symbolId)),i=new Map;for(let{symbolId:o,prelude:s}of t){let c=de(e,r.get(o)??new Map,s.match,s.identifier);i.set(o,x(e,c))}return i}function rt(e,n,t={}){return me(e,n,t).map(r=>({file:r.file,line:r.line,enclosingSymbol:r.enclosingSymbol}))}function me(e,n,t={}){let r=Y(e,n,{semantic:t.semantic,semanticEvidence:t.semanticEvidence}),i=r.length>0?W(r,"source-attribution"):W(fe(e,n),"scip-reference-chunk");return t.includeIgnored===!0?i:i.filter(o=>!e.isIgnored(o.file))}function W(e,n){return e.map(t=>({...t,provenance:n}))}function de(e,n,t,r){let i=new Map;for(let[o,s]of n)i.set(o,ge(e,o,s,t,r));return i}function pe(e,n){let t=new Map;for(let r of z(e,n)){if(e.isIgnored(r.relative_path))continue;let i=t.get(r.symbol_id);i||(i=new Map,t.set(r.symbol_id,i));let o=i.get(r.relative_path);o||(o=[],i.set(r.relative_path,o)),o.push({start_line:r.chunk_start,end_line:r.chunk_end})}return t}function ge(e,n,t,r,i){let o=n===r.relativePath?{excludeStartLine:r.startLine,excludeEndLine:r.endLine}:{},s=i?_(e,n,i,o):[];return t.flatMap(c=>be(s,c))}function be(e,n){let t=e.filter(r=>r>=n.start_line&&r<=n.end_line);return t.length>0?t:[n.start_line]}function Se(e,n){let t=y(e,n);return t?{match:t,identifier:b(t.symbol)||null}:null}export{_ as a,M as b,De as c,_e as d,xe as e,N as f,C as g,H as h,w as i,Ve as j,ce as k,le as l,Xe as m,fe as n,ue as o,rt as p,me as q};
|
|
16
|
-
//# sourceMappingURL=chunk-FI7VGOR4.js.map
|
package/dist/chunk-FJF6VO2P.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as d}from"./chunk-ZLMXIQLC.js";import{d as m}from"./chunk-KNLQGXVH.js";import{Ba as f,Ca as p,c as l}from"./chunk-JZ2A7LDM.js";import{existsSync as g,readdirSync as h,statSync as D}from"fs";import{join as c}from"path";var y="components.json",K=new Set([".git",".next",".turbo","build","coverage","dist","node_modules","out"]),U=3,b=/(?:^|\/)components\/ui$/i,A=m("ui-kit-surface",{clearGroups:["whole-project"]});function N(r){return A.get(r,()=>E(r))}function x(r,i){let n=l(i),t=n.lastIndexOf("/");if(t<0)return null;let e=n.slice(0,t);for(let o of N(r).directories)if(e===o.directory)return o;return b.test(e)?{directory:e,source:"ui-directory-convention"}:null}function P(r,i){return x(r,i)!==null}function E(r){let i=new Map;for(let n of _(r.config.projectRoot)){let t=I(r,n);t&&!i.has(t)&&i.set(t,{directory:t,source:"shadcn-components-manifest",manifest:n})}return{directories:[...i.values()].sort((n,t)=>n.directory.localeCompare(t.directory))}}function _(r){let i=[],n=(t,e)=>{let o=t?c(r,t):r,s=t?`${t}/${y}`:y;if(g(c(r,s))&&i.push(s),e>=U)return;let a;try{a=h(o,{withFileTypes:!0})}catch{return}for(let u of a)!u.isDirectory()||K.has(u.name)||u.name.startsWith(".")||n(t?`${t}/${u.name}`:u.name,e+1)};return n("",0),i}function I(r,i){let n;try{n=JSON.parse(f(r.config.projectRoot,i,{inputKind:"components manifest"}))}catch(a){return a instanceof Error&&p(a),null}if(!S(n))return null;let t=n.aliases;if(!S(t))return null;let e=typeof t.ui=="string"?t.ui:null,o=typeof t.components=="string"?t.components:null,s=e??(o?`${o}/ui`:null);return s?M(r,i,s):null}function M(r,i,n){let t=i.includes("/")?i.slice(0,i.lastIndexOf("/")):"",e=[];if(n.startsWith("./")||n.startsWith("../")||n.startsWith("/"))e.push(l(c(t,n)));else{let o=d(r,i,n);o&&e.push(o);let s=n.replace(/^[@~]\//,"");e.push(l(c(t,"src",s)),l(c(t,s)))}for(let o of e){let s=c(r.config.projectRoot,o);if(g(s)&&D(s).isDirectory())return o.replace(/\/+$/,"")}return null}function S(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}export{x as a,P as b};
|
|
2
|
-
//# sourceMappingURL=chunk-FJF6VO2P.js.map
|
package/dist/chunk-FLMTCX5R.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as r}from"./chunk-JZ2A7LDM.js";function _(t){switch(t){case"entry":case"source":case"worker":return 0;case"barrel":return 1;case"test":return 2}}function a(t){let s=r(t);return i(s)?"test":n(s)?"worker":u(s)?"entry":f(s)?"barrel":"source"}function i(t){return!!(/\.(?:test|spec)\.[a-z0-9]+$/i.test(t)||/(?:^|\/)(?:_)?test_[^/]+$/i.test(t)||/(?:^|\/)spec_[^/]+$/i.test(t)||/(?:^|\/)[^/]+_test\.[a-z0-9]+$/i.test(t)||/(?:^|\/)[^/]+_tests\.rs$/i.test(t)||/(?:^|\/)tests\.rs$/i.test(t)||/(?:^|\/)[^/]+_spec\.[a-z0-9]+$/i.test(t)||/(?:^|\/)__tests__\//i.test(t)||/(?:^|\/)test\//i.test(t)||/(?:^|\/)tests\//i.test(t)||/(?:^|\/)__fixtures__\//i.test(t)||/(?:^|\/)__mocks__\//i.test(t)||/(?:^|\/)test-support\//i.test(t)||/(?:^|\/)test-utils\//i.test(t)||/(?:^|\/)testing\//i.test(t))}function n(t){return/(?:^|\/)[^/]*worker\.(?:ts|tsx|js|mjs|cjs|rs|py|go)$/.test(t)}function u(t){let s=t.split("/"),e=s[s.length-1]??t;return e==="cli.ts"||e==="cli.js"||e==="postinstall.ts"||e==="postinstall.js"||e==="main.ts"||e==="main.js"||e==="main.rs"||e==="main.go"||e==="main.py"||e==="build.rs"||e==="lib.rs"||/\bsrc\/bin\/[^/]+\.rs$/.test(t)||/(?:^|\/)examples\/[^/]+\.rs$/.test(t)||/(?:^|\/)tests\/[^/]+\.rs$/.test(t)||/(?:^|\/)benches\/[^/]+\.rs$/.test(t)?!0:e==="index.ts"||e==="index.js"?/(?:^|\/)(?:apps|services)\/[^/]+\/src\/index\.(?:ts|js)$/.test(t)?!0:s.length<=2:!1}function f(t){return t==="index.ts"||t==="index.js"||t.endsWith("/index.ts")||t.endsWith("/index.js")||t.endsWith("/mod.rs")||t.endsWith("/__init__.py")}export{_ as a,a as b};
|
|
2
|
-
//# sourceMappingURL=chunk-FLMTCX5R.js.map
|
package/dist/chunk-FVFDOIM3.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as p}from"./chunk-T3I6NHBH.js";import{realpathSync as F}from"fs";import{createRequire as b}from"module";import{dirname as h,resolve as M}from"path";var g=b(import.meta.url),u,d;function x(){if(u!==void 0)return u;try{u=g("ts-morph")}catch{u=null}return u}function O(){if(d)return d;let r=x();if(!r)return"ts-morph:unavailable";let n="unknown";try{n=g("ts-morph/package.json").version??"unknown"}catch{}return d=`ts-morph:${n}:typescript:${r.ts.version}`,d}function D(r,n,e={}){return n.map(t=>j(r,t,e))}function j(r,n,e){let t=null,o,i,s=()=>(o===void 0&&(o=C(r,n)),o),c=()=>{if(i===void 0){let l=e.fileBudget??p(),f=s();i=(f===null?0:Math.ceil(f.size/2))>l*P?"file-closure":"project"}return i};return{tsconfigPath:n,get project(){return t??=new r.Project({tsConfigFilePath:n,skipFileDependencyResolution:!0,...c()==="file-closure"?{skipAddingFilesFromTsConfig:!0}:{}}),t},get loaded(){return t!==null},get fileNames(){return s()},get scope(){return c()}}}var P=1.35,k="TypeScript project-wide semantics are unavailable: a compiler project is file-scoped because its tsconfig lists more files than the worker heap can hold.";function z(r){return r.some(n=>n.scope==="file-closure")}function C(r,n){try{let e=r.ts,t=e.readConfigFile(n,e.sys.readFile);if(t.error||!t.config)return null;let o=e.parseJsonConfigFileContent(t.config,e.sys,h(n),void 0,n),i=new Set;for(let s of o.fileNames){let c=M(s);i.add(c);try{i.add(F(c))}catch{}}return i}catch{return null}}function A(r,n,e){return{language:"typescript",availability:()=>({available:!1,reason:r,tsconfigPath:n,tsconfigPaths:e}),importUsage:()=>[],referencesFor:()=>[],calleesFor:()=>[],signatureFor:()=>null}}var T=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs"];function _(r){let n=r.toLowerCase();return T.some(e=>n.endsWith(e))}function K(r,n){let e=I(r);for(let t of n.values())e.add(t);return e.finish()}function I(r){let n=new Map(r.map(t=>[t.symbol,t])),e=new Map(r.map(t=>[t.symbolId,[]]));return{add(t){for(let o of t){let i=n.get(o.targetSymbol);i&&e.get(i.symbolId).push(o.location)}},finish(){for(let[t,o]of e)e.set(t,v(o));return e}}}function J(r,n,e){let t=S(r,n),o=S(r,e),i=[...t].filter(a=>!o.has(a)).sort(),s=[...o].filter(a=>!t.has(a)).sort(),c=y(r,n),l=y(r,e),f=[...c].filter(a=>!l.has(a)).sort(),m=[...l].filter(a=>!c.has(a)).sort();return{passed:i.length===0&&s.length===0,expectedCount:t.size,actualCount:o.size,missing:i,extra:s,callerFiles:{passed:f.length===0&&m.length===0,expectedCount:c.size,actualCount:l.size,missing:f,extra:m}}}function y(r,n){let e=new Set;for(let t of r)for(let o of n.get(t.symbolId)??[])o.file!==t.relativePath&&e.add(`${t.symbol}\0${o.file}`);return e}function U(r,n,e){let t=new Set(e),o=new Map(e.map(i=>[i,[]]));for(let i of r)for(let s of n.get(i.symbolId)??[])t.has(s.file)&&o.get(s.file).push({targetSymbol:i.symbol,location:s});for(let[i,s]of o)o.set(i,w(s));return o}function S(r,n){let e=new Set;for(let t of r)for(let o of n.get(t.symbolId)??[])e.add(`${t.symbol}\0${o.file}\0${o.line}\0${o.column}`);return e}function v(r){let n=new Map;for(let e of r)n.set(`${e.file}\0${e.line}\0${e.column}`,e);return[...n.values()].sort(R)}function w(r){let n=new Map;for(let e of r){let{location:t}=e;n.set(`${e.targetSymbol}\0${t.file}\0${t.line}\0${t.column}`,e)}return[...n.values()].sort((e,t)=>e.targetSymbol.localeCompare(t.targetSymbol)||R(e.location,t.location))}function R(r,n){return r.file.localeCompare(n.file)||r.line-n.line||r.column-n.column}export{T as a,_ as b,x as c,O as d,D as e,k as f,z as g,A as h,K as i,I as j,J as k,U as l};
|
|
2
|
-
//# sourceMappingURL=chunk-FVFDOIM3.js.map
|
package/dist/chunk-G2HU5WRN.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as i}from"./chunk-ZFVPWH62.js";function l(n,o,s,t={}){let e=i(n,o,s,t);return e?{symbolA:e.symbolA,symbolB:e.symbolB,similarity:e.similarity,sharedCallees:e.sharedEvidence,uniqueToA:e.uniqueToA,uniqueToB:e.uniqueToB,consolidationStrategy:e.consolidationStrategy}:null}export{l as a};
|
|
2
|
-
//# sourceMappingURL=chunk-G2HU5WRN.js.map
|
package/dist/chunk-G4ALYS4J.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d as m,f as y}from"./chunk-CKBUBRYD.js";import{f as d,h as x,j as p,k as b}from"./chunk-T3CZAZSI.js";import{h as l}from"./chunk-7F45LJKI.js";import{createHash as S}from"crypto";import{dirname as R,join as f}from"path";var c=5,T=4,E=2,P="typescript-index";function _(t){let e=f(t,P),n=x(e);return{...n,requestDir:n.legacyRequestDir}}function F(t){let e=JSON.parse(t),n=e.protocolVersion,r=n===E,i=n===T,o=e.request,s=(r||i)&&o&&typeof o=="object"&&!Array.isArray(o)?{...o,removedFiles:o.removedFiles??[]}:o;if(!r&&!i&&n!==c||typeof e.id!="string"||!e.id||typeof e.baseGeneration!="string"||!e.baseGeneration||typeof e.deadlineAtMs!="number"||!Number.isFinite(e.deadlineAtMs)||!q(s)||!r&&(e.mailboxVersion!==d||typeof e.operationKey!="string"||!/^[a-f0-9]{64}$/.test(e.operationKey)||e.id!==b(e.operationKey)||typeof e.clientId!="string"||!e.clientId||typeof e.enqueuedAtMs!="number"||!Number.isFinite(e.enqueuedAtMs)||e.deadlineAtMs<e.enqueuedAtMs))throw new Error("TypeScript index service received an invalid mailbox request.");if(!r){let a=e,g=p(i?"typescript-index-v4":"typescript-index-v5",{baseGeneration:a.baseGeneration,request:o});if(a.operationKey!==g)throw new Error("TypeScript index service received a mismatched mailbox operation identity.");return{...a,protocolVersion:c,request:s}}let I=p("typescript-index-v2",{id:e.id,baseGeneration:e.baseGeneration,request:o});return{protocolVersion:c,mailboxVersion:d,id:e.id,operationKey:I,clientId:"legacy-v2",enqueuedAtMs:e.deadlineAtMs,deadlineAtMs:e.deadlineAtMs,baseGeneration:e.baseGeneration,request:s}}function D(t){try{let e=y(m(l(f(R(t),"meta.json"),"reindex metadata")));return e?S("sha256").update(e).digest("hex"):null}catch{return null}}function q(t){if(!t||typeof t!="object")return!1;let e=t,n=u(e.modifiedFiles)?e.modifiedFiles:null,r=u(e.removedFiles)?e.removedFiles:null,i=u(e.affectedFiles)?e.affectedFiles:null;return e.kind==="emit-documents"&&typeof e.tsconfigPath=="string"&&!!e.tsconfigPath&&typeof e.projectArgument=="string"&&!!e.projectArgument&&typeof e.projectIdentity=="string"&&!!e.projectIdentity&&typeof e.producerIdentity=="string"&&!!e.producerIdentity&&n!==null&&new Set(n).size===n.length&&r!==null&&new Set(r).size===r.length&&i!==null&&(i.length>0||r.length>0)&&new Set(i).size===i.length}function u(t){return Array.isArray(t)&&t.every(e=>typeof e=="string"&&e.length>0)}export{c as a,_ as b,F as c,D as d};
|
|
2
|
-
//# sourceMappingURL=chunk-G4ALYS4J.js.map
|
package/dist/chunk-G56I7K4W.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import{a as d}from"./chunk-BJWFVAA5.js";import{g as l}from"./chunk-U3SXIMII.js";import{d as r,w as m}from"./chunk-C7C6AKAT.js";function u(o,t={}){let{limit:i=30,scope:e}=t,n=e?"AND def_d.relative_path LIKE ?":"",f=e?[`%${e}%`]:[],c=o.all(`SELECT
|
|
2
|
-
gs.symbol,
|
|
3
|
-
COUNT(*) AS ref_count,
|
|
4
|
-
COUNT(DISTINCT ref_d.id) AS file_count,
|
|
5
|
-
def_d.relative_path AS defined_in
|
|
6
|
-
FROM mentions m
|
|
7
|
-
JOIN chunks c ON m.chunk_id = c.id
|
|
8
|
-
JOIN documents ref_d ON c.document_id = ref_d.id
|
|
9
|
-
JOIN global_symbols gs ON m.symbol_id = gs.id
|
|
10
|
-
JOIN (
|
|
11
|
-
SELECT m2.symbol_id, c2.document_id
|
|
12
|
-
FROM mentions m2
|
|
13
|
-
JOIN chunks c2 ON m2.chunk_id = c2.id
|
|
14
|
-
WHERE m2.role = 1
|
|
15
|
-
GROUP BY m2.symbol_id
|
|
16
|
-
) sym_def ON sym_def.symbol_id = gs.id
|
|
17
|
-
JOIN documents def_d ON sym_def.document_id = def_d.id
|
|
18
|
-
WHERE m.role != 1
|
|
19
|
-
AND def_d.id != ref_d.id
|
|
20
|
-
${o.pathExclusionsFor("def_d")}
|
|
21
|
-
${o.symbolNoiseFor("gs")}
|
|
22
|
-
${n}
|
|
23
|
-
GROUP BY gs.id
|
|
24
|
-
ORDER BY ref_count DESC
|
|
25
|
-
LIMIT ?`,...f,i).filter(s=>!o.isIgnored(s.defined_in)).map(s=>({symbol:s.symbol,shortName:r(s.symbol),refCount:s.ref_count,fileCount:s.file_count,definedIn:s.defined_in,basis:"scip-cross-file-mentions",countUnit:"reference-occurrences"}));return c.length>0?c:a(o,e,i)}function C(o,t={}){return u(o,t)}function a(o,t,i){return m(o,{scope:t}).filter(e=>!o.isIgnored(e.relativePath)).map(e=>p(o,e)).filter(e=>e.refCount>0).sort((e,n)=>n.refCount-e.refCount||n.fileCount-e.fileCount).slice(0,i)}function p(o,t){let e=l(o,t,{limit:500,semanticEvidence:d}).filter(n=>n.file!==t.relativePath);return{symbol:t.symbol,shortName:r(t.symbol),refCount:e.length,fileCount:new Set(e.map(n=>n.file)).size,definedIn:t.relativePath,basis:"source-backed-incoming-evidence",countUnit:"distinct-incoming-evidence-rows"}}export{u as a,C as b};
|
|
26
|
-
//# sourceMappingURL=chunk-G56I7K4W.js.map
|
package/dist/chunk-GC4DG2V5.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{v as c}from"./chunk-C7C6AKAT.js";import{x as a}from"./chunk-RBAD4GJ2.js";var D=4;function m(e,i,t,r={}){return p(e,i,t,r.maxReexportDepth??D,0,new Set)}function p(e,i,t,r,s,o){let f=`${i}\0${t}`;if(o.has(f)||s>r)return[];o.add(f);let u=c(e,i).filter(n=>n.leaf===t);return u.length>0?u:a(e,i).flatMap(n=>n.sourcePath?n.kind==="named"&&!n.names.includes(t)?[]:p(e,n.sourcePath,t,r,s+1,new Set(o)):[])}export{m as a};
|
|
2
|
-
//# sourceMappingURL=chunk-GC4DG2V5.js.map
|
package/dist/chunk-GG45PK4S.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{g as H,h as S}from"./chunk-OIOC5EHF.js";import{b as V}from"./chunk-BOJ5SVE2.js";import{a as j}from"./chunk-BGBBVSH4.js";import{c as Z,j as G}from"./chunk-NJQISBL4.js";import{b as _}from"./chunk-FLMTCX5R.js";import{d as W}from"./chunk-MTDBHTSF.js";import{d as B,i as F,l as N,w as k}from"./chunk-C7C6AKAT.js";import{b as L,t as z,x as I,y as R}from"./chunk-RBAD4GJ2.js";import{n as v}from"./chunk-ETC674NS.js";import{y}from"./chunk-KNLQGXVH.js";import{d as T}from"./chunk-JZ2A7LDM.js";var ie=new Set(W());function Qe(e,t={}){let{includeHomonyms:n=!1,limit:r}=t,s=se(e,t).filter(i=>i.relationship==="divergent"||n&&i.relationship==="homonym");return r?s.slice(0,r):s}function se(e,t={}){let{scope:n,minSimilarity:r=.3,scanLimit:s}=t,i=ce(e,{scope:n,scanLimit:s});return oe(i,{minSimilarity:r,isDelegatePair:Be(e)}).filter(a=>!a.members.some(o=>v(e,o.file,o.startLine,"twin")))}function oe(e,t={}){let n=t.minSimilarity??.3,r=t.isDelegatePair,s=e.filter(c=>!re(c.leaf)&&!Se(c.leaf)&&!Q(c.symbol,c.leaf)&&!X(c.file,c.leaf)&&_(c.file)!=="test"&&!N(c.symbol)&&!J(c.symbol)&&!ee(c.symbol,c.leaf)),{recordsByLeaf:i,recordOrder:a}=y("twin-drift.group-by-leaf",()=>ae(s),()=>({records:s.length})),o=y("twin-drift.cluster-leaf-names",()=>q([...i.keys()]),()=>({leaves:i.size}));return y("twin-drift.compare-clusters",()=>{let c=[];for(let l of o){let m=le(l,i,a),b=new Set(m.filter(u=>m.some(g=>g!==u&&g.file!==u.file&&r?.(u,g,m))).map(u=>u.symbol)),h=m.filter(u=>!b.has(u.symbol));if(h.length<2||new Set(h.map(u=>u.file)).size<2)continue;let w=null,x=!1,E=!1,D=new Set;for(let u=0;u<h.length;u+=1)for(let g=u+1;g<h.length;g+=1){let d=h[u],p=h[g];if(d.file===p.file||!xe(d,p)||r?.(d,p,h)||r?.(p,d,h)||K(d,p)||K(p,d))continue;if(x=!0,D.add(d.symbol),D.add(p.symbol),d.normalizedBody===p.normalizedBody){E=!0;continue}let O=ye(d.tokens,p.tokens);(!w||O>w.similarity)&&(w={a:d,b:p,similarity:O})}if(!x)continue;let P=h.filter(u=>D.has(u.symbol)).sort((u,g)=>u.file.localeCompare(g.file)||u.startLine-g.startLine).map(we);if(!w){c.push({leaf:Y(l),relationship:E?"identical":"homonym",maxDivergence:0,members:P});continue}let $=w.similarity>=n?"divergent":"homonym";c.push({leaf:Y(l),relationship:$,maxDivergence:Math.round((1-w.similarity)*1e3)/1e3,members:P,...$==="divergent"?{firstDivergentTokens:be(w.a.tokens,w.b.tokens)}:{}})}return c},()=>({clusters:o.length,records:s.length})).sort((c,l)=>l.members.length-c.members.length||l.maxDivergence-c.maxDivergence||c.leaf.localeCompare(l.leaf))}function ae(e){let t=new Map,n=new Map;for(let[r,s]of e.entries()){let i=t.get(s.leaf)??[];i.push(s),t.set(s.leaf,i),n.set(s,r)}return{recordsByLeaf:t,recordOrder:n}}function le(e,t,n){let r=[...e].flatMap(s=>t.get(s)??[]);return e.size>1&&r.sort((s,i)=>(n.get(s)??0)-(n.get(i)??0)),r}function ce(e,t){let n=y("twin-drift.load-definitions",()=>k(e,{scope:t.scope}).filter(i=>fe(i)&&!e.isIgnored(i.relativePath)).filter(i=>!Z(i.relativePath)));y("twin-drift.sort-definitions",()=>n.sort((i,a)=>i.relativePath.localeCompare(a.relativePath)||i.startLine-a.startLine),()=>({definitions:n.length}));let r=V(n,t.scanLimit),s=y("twin-drift.select-candidates",()=>ue(r),()=>({scanned:r.length}));return y("twin-drift.build-records",()=>{let i=[];for(let a of s){let o=me(e,a);o&&i.push(o)}return i},()=>({candidates:s.length,scanned:r.length}))}function fe(e){return e.isFunctionLike?e.symbol.startsWith("rust-analyzer ")?typeof e.kind=="number"&&ie.has(e.kind):!0:!1}function ue(e){let t=e.filter(i=>i.leaf&&!re(i.leaf)&&!Q(i.symbol,i.leaf)&&!X(i.relativePath,i.leaf)&&!N(i.symbol)&&!J(i.symbol)&&!ee(i.symbol,i.leaf)),n=new Map;for(let i of t){let a=n.get(i.leaf)??[];a.push(i),n.set(i.leaf,a)}let r=q([...n.keys()]),s=new Set;for(let i of r){let a=[...i].flatMap(o=>n.get(o)??[]);if(!(a.length<2)&&!(new Set(a.map(o=>o.relativePath)).size<2)&&!a.every(o=>_(o.relativePath)==="test"))for(let o of a)s.add(o)}return e.filter(i=>s.has(i))}function me(e,t){if(!t.leaf)return null;let n=H(e,t);if(!n||!F(t.symbol)&&!pe(n,t.leaf)||ge(n,t.leaf))return null;let r=L(S(n)),s=r.replace(/\s+/g,"");if(!s||s.length<8)return null;let i=r.match(he)??[];return i.length===0?null:{leaf:t.leaf,symbol:t.symbol,shortName:B(t.symbol),file:t.relativePath,startLine:t.startLine,endLine:t.endLine,loc:j(t),normalizedBody:s,tokens:i,isThinForwarder:A(r),forwardTargetLeaf:de(r)}}function ge(e,t){let n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=e.split(`
|
|
2
|
-
`).slice(0,2).join(`
|
|
3
|
-
`);return new RegExp(`\\b(?:abstract|override)\\b[^\\n]*\\b${n}\\s*[(<]`).test(r)}function de(e){if(!A(e))return null;let t=M(e.trim()),n=C(t[t.length-1]),r=/^([A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*)\s*\(/.exec(n)?.[1];return r?r.split(".").pop()??null:null}function K(e,t){let n=e.forwardTargetLeaf;return typeof n=="string"&&n!==e.leaf&&n!==t.leaf&&!t.isThinForwarder}function pe(e,t){let n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`\\b(?:const|let|var)\\s+${n}(?:\\s*:[^=]+)?\\s*=\\s*(?:async\\s*)?(?:\\([^)]*\\)|[A-Za-z_$][\\w$]*)\\s*=>`,"s").test(e)}var he=/[A-Za-z_$][A-Za-z0-9_$]*|\d+(?:\.\d+)?|[^\sA-Za-z0-9_$]/g;function we(e){return{symbol:e.symbol,shortName:e.shortName,file:e.file,startLine:e.startLine,endLine:e.endLine,loc:e.loc}}function ye(e,t){let n=new Set(e),r=new Set(t);if(n.size===0&&r.size===0)return 1;if(n.size===0||r.size===0)return 0;let s=0;for(let a of n)r.has(a)&&(s+=1);let i=n.size+r.size-s;return i===0?0:s/i}function be(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e[r]===t[r];)r+=1;let s=e.slice(r,r+6).join(" "),i=t.slice(r,r+6).join(" ");return!s&&!i?"(bodies differ only in trailing length)":`A: ${s||"(end)"} | B: ${i||"(end)"}`}function q(e){let t=new Map;for(let a of e)t.set(a,a);let n=a=>{let o=a;for(;t.get(o)!==o;)o=t.get(o);let f=a;for(;t.get(f)!==o;){let c=t.get(f);t.set(f,o),f=c}return o},r=(a,o)=>{let f=n(a),c=n(o);f!==c&&t.set(f,c)},s=new Map;for(let a of e){let o=a.slice(0,2).toLowerCase(),f=s.get(o)??[];f.push(a),s.set(o,f)}for(let a of s.values())for(let o=0;o<a.length;o+=1)for(let f=o+1;f<a.length;f+=1)Te(a[o],a[f])&&r(a[o],a[f]);let i=new Map;for(let a of e){let o=n(a),f=i.get(o)??new Set;f.add(a),i.set(o,f)}return[...i.values()]}function Te(e,t){if(e===t||e.toLowerCase()===t.toLowerCase())return!0;if(e.length<8||t.length<8||Math.abs(e.length-t.length)>2)return!1;let[n,r]=e.length<=t.length?[e,t]:[t,e];return r.length>n.length&&r.startsWith(n)&&/^[A-Z]/.test(r.slice(n.length))||Le(e.toLowerCase(),t.toLowerCase())/Math.max(e.length,t.length)<.8?!1:Ee(e.toLowerCase(),t.toLowerCase(),2)}function Le(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e[r]===t[r];)r+=1;return r}function Se(e){return/^[A-Z][A-Z0-9_]*$/.test(e)||/^__[^_].*__$/.test(e)||De.has(e.toLowerCase())}var De=new Set(["main","row"]),Re=new Set(["close","connect","count","create","delete","destroy","disconnect","dispose","execute","exists","find","findAll","findById","findOne","get","getAll","getById","handle","init","initialize","list","load","open","patch","process","read","remove","reset","run","save","shutdown","start","stop","toJSON","toString","update","upsert"]),Ne=/#(?:`[^`]+`|[^#/`]+)\(\)\.$/,_e=/^(?:get|find|list|load|fetch|count|delete|remove|update|upsert)(?:By|For)[A-Z]\w*$/;function Q(e,t){return(Re.has(t)||_e.test(t))&&Ne.test(e)}var Ae=/^(?:handler|handle(?:Get|Post|Put|Patch|Delete|Options|Head|Request)|(?:get|post|put|patch|delete|options|head|route|request)Handler|generateMetadata|generateStaticParams|generateViewport|generateSitemaps|loader|action|clientLoader|clientAction|middleware|config|default|load|actions|[A-Z][A-Za-z0-9]*(?:Page|Layout|Loading|Template|Route|Screen))$/;function X(e,t){return Ae.test(t)&&G(e.replace(/\\/g,"/"))}var Ce=new Set(["app","component","components","feature","features","impl","index","lib","route","routes","shared","src","tsx","typescript","ui"]);function J(e){return e.startsWith("rust-analyzer ")&&/\/(?:tests?|benches?)\//.test(e)}var Me=new Set(["default","new","reset"]);function ee(e,t){return e.startsWith("rust-analyzer ")&&Me.has(t.toLowerCase())}function xe(e,t){if(e.leaf.toLowerCase()!==t.leaf.toLowerCase()||e.leaf.length>4)return!0;let n=U(e);return[...U(t)].some(r=>n.has(r))}function U(e){let t=e.leaf.toLowerCase();return new Set(`${e.file}/${e.shortName}`.replace(/([a-z0-9])([A-Z])/g,"$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter(n=>n.length>2&&n!==t&&!Ce.has(n)))}function Ee(e,t,n){if(Math.abs(e.length-t.length)>n)return!1;let r=Array.from({length:t.length+1},(s,i)=>i);for(let s=1;s<=e.length;s+=1){let i=[s],a=i[0];for(let o=1;o<=t.length;o+=1){let f=e[s-1]===t[o-1]?0:1,c=Math.min(r[o]+1,i[o-1]+1,r[o-1]+f);i.push(c),a=Math.min(a,c)}if(a>n)return!1;r=i}return r[t.length]<=n}function Xe(e){return A(L(S(e)))}function Je(e){let t=L(S(e)).trim();if(!t||te.test(t))return!1;let n=M(t);if(n.length!==1)return!1;let r=C(n[0]),s=Pe.exec(r);if(!s)return!1;let i=s[1].replace(/\[\s*\]|\{\s*\}/g,"");return!$e.test(i)}var Pe=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\[[^[\]]*\])*\(([\s\S]*)\)$/,$e=/[()[\]{}]|=>|\b(?:await|new|function)\b/;function A(e){let t=e.trim();if(!t||te.test(t))return!1;let n=M(t);return n.length===0||n.length>2?!1:ve(n[n.length-1])}var te=/\b(?:if|else|for|while|switch|try|catch|do)\b/,Oe=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\[[^[\]]*\])*\((?:[^()]|\([^()]*\))*\)$/;function ve(e){return Oe.test(C(e))}function C(e){return ze(e.trim().replace(/^return\s+/,"").replace(/^await\s+/,"").replace(/;\s*$/,"").trim())}function ze(e){let t=e.indexOf("<");if(t<0||!/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*$/.test(e.slice(0,t)))return e;let n=0;for(let r=t;r<e.length;r+=1){let s=e[r];if(s==="<")n+=1;else if(s===">"&&(n-=1,n===0))return e[r+1]==="("?e.slice(0,t)+e.slice(r+1):e}return e}function M(e){let t=[],n=0,r="";for(let s of e){if(s==="("||s==="["||s==="{"?n+=1:(s===")"||s==="]"||s==="}")&&(n=Math.max(0,n-1)),s===";"&&n===0){t.push(r),r="";continue}r+=s}return r.trim()&&t.push(r),t.map(s=>s.trim()).filter(s=>s.length>0)}var Ie=3;function Be(e){let t=new Map;return(n,r,s)=>{let i=`${n.symbol}\0${r.symbol}`,a=t.get(i);if(a!==void 0)return a;let o=ne(e,n,r,s,Ie,new Set);return t.set(i,o),o}}function ne(e,t,n,r,s,i){if(s<=0||i.has(t.symbol))return!1;i.add(t.symbol);let a=R(e,t.file),o=new Set;for(let l of a)l.importedName===n.leaf&&l.localName&&l.localName!==n.leaf&&o.add(l.localName);o.size===0&&o.add(n.leaf);let f=(z(e,t.file)??[]).filter(l=>l.line>=t.startLine&&l.line<=t.endLine&&o.has(l.calleeLeaf));if(f.length===0)return!1;for(let l of f){if(!l.calleeQualifier)continue;let m=a.find(b=>b.localName===l.calleeQualifier&&b.sourcePath);if(m?.sourcePath){if(T(m.sourcePath,n.file))return!0;for(let b of R(e,m.sourcePath))if(b.sourcePath&&T(b.sourcePath,n.file))return!0}}let c=new Set(a.filter(l=>l.sourcePath&&(l.kind!=="namespace"||l.usedMembers.includes(n.leaf))).map(l=>l.sourcePath));for(let l of[...c])for(let m of I(e,l))m.sourcePath&&c.add(m.sourcePath);if([...c].some(l=>T(l,n.file)))return!0;for(let l of r)if(!(l.symbol===t.symbol||l.symbol===n.symbol||!l.isThinForwarder)&&[...c].some(m=>T(m,l.file))&&ne(e,l,n,r,s-1,i))return!0;return!1}function re(e){return e.startsWith("<")&&e.endsWith(">")}function Y(e){return[...e].sort()[0]}export{Qe as a,se as b,oe as c,Xe as d,Je as e,M as f};
|
|
4
|
-
//# sourceMappingURL=chunk-GG45PK4S.js.map
|
package/dist/chunk-GINH3YQU.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import{o as l,t as d,w as u}from"./chunk-SYVJEEUJ.js";import{f as c}from"./chunk-JZ2A7LDM.js";import h from"better-sqlite3";var m=["busy_timeout = 5000","query_only = ON","temp_store = MEMORY","cache_size = -64000","mmap_size = 268435456"],o=class{constructor(t,e){this.connection=t;this.releaseGenerationReader=e}connection;releaseGenerationReader;active=!0;initialize(t){try{for(let e of m)this.connection.pragma(e);t(this.connection)}catch(e){try{this.close()}catch(n){throw new AggregateError([e,n],"SQLite initialization and rollback both failed.",{cause:n})}throw e}}close(){if(!this.active)return;this.active=!1;let t,e;try{this.connection.close()}catch(n){t=n}try{this.releaseGenerationReader()}catch(n){e=n}if(t!==void 0&&e!==void 0)throw new AggregateError([t,e],"SQLite connection close and generation-reader release both failed.");if(t!==void 0)throw t;if(e!==void 0)throw e}},b=["node_modules",".git","dist","build","out","coverage","target",".next",".nuxt",".cache",".turbo",".nbb",".cpcache",".shadow-cljs",".scipquery-cache","__pycache__",".venv","venv"],p=class{db;config;generation;pathFilter;connection;connectionOwnership;statementCache=new Map;constructor(t,e){this.config=t,this.pathFilter=e??null;let n=S(t),i=new o(n.db,n.release);try{i.initialize(y),this.generation=n.generation,this.connection=n.db,this.connectionOwnership=i,this.db=g(n.db)}catch(r){try{i.close()}catch(s){throw new AggregateError([r,s],"SQLite construction and rollback both failed.",{cause:s})}throw r}}isIgnored(t){return this.pathFilter?.isIgnored(t)??!1}get localSymbolPredicate(){return`(
|
|
2
|
-
EXISTS (
|
|
3
|
-
SELECT 1
|
|
4
|
-
FROM defn_enclosing_ranges local_der
|
|
5
|
-
JOIN documents local_d ON local_der.document_id = local_d.id
|
|
6
|
-
WHERE local_der.symbol_id = gs.id
|
|
7
|
-
${this.pathExclusionsFor("local_d").trimStart()}
|
|
8
|
-
)
|
|
9
|
-
OR EXISTS (
|
|
10
|
-
SELECT 1
|
|
11
|
-
FROM mentions local_m
|
|
12
|
-
JOIN chunks local_c ON local_m.chunk_id = local_c.id
|
|
13
|
-
JOIN documents local_d ON local_c.document_id = local_d.id
|
|
14
|
-
WHERE local_m.symbol_id = gs.id
|
|
15
|
-
AND local_m.role = 1
|
|
16
|
-
${this.pathExclusionsFor("local_d").trimStart()}
|
|
17
|
-
)
|
|
18
|
-
)`}get pathExclusions(){return this.pathExclusionsFor("d")}get symbolNoise(){return this.symbolNoiseFor("gs")}pathExclusionsFor(...t){return t.flatMap(e=>b.flatMap(n=>[`AND ${e}.relative_path NOT LIKE '${n}/%'`,`AND ${e}.relative_path NOT LIKE '%/${n}/%'`])).join(`
|
|
19
|
-
`)}symbolNoiseFor(t){return`AND ${t}.symbol NOT LIKE '%().(%' AND ${t}.symbol NOT LIKE '%typeLiteral%'`}all(t,...e){return this.statement(t).all(...e)}get(t,...e){return this.statement(t).get(...e)}close(){this.statementCache.clear(),this.connectionOwnership.close()}statement(t){let e=this.statementCache.get(t);return e||(e=this.connection.prepare(t),this.statementCache.set(t,e)),e}};function g(a){return Object.freeze({prepare(t){let e=a.prepare(t);if(!e.readonly||!e.reader)throw new Error("ScipDatabase.db only permits read-only statements that return rows.");return f(e)}})}function f(a){let t={get:(...e)=>a.get(...e),all:(...e)=>a.all(...e),iterate:(...e)=>a.iterate(...e),pluck(e){return e===void 0?a.pluck():a.pluck(e),t},expand(e){return e===void 0?a.expand():a.expand(e),t},raw(e){return e===void 0?a.raw():a.raw(e),t},bind(...e){return a.bind(...e),t},columns:()=>a.columns(),safeIntegers(e){return e===void 0?a.safeIntegers():a.safeIntegers(e),t}};return Object.freeze(t)}function y(a){if(!a.prepare("SELECT 1 AS present FROM sqlite_master WHERE type = 'table' AND name = 'documents'").get())return;let e=a.prepare("SELECT relative_path FROM documents").iterate();for(let n of e)c(n.relative_path)}function S(a){for(let t=0;t<4;t+=1){let e=l(a),n=e.generation,i;try{i=new h(n.databasePath,{readonly:!0,fileMustExist:!0})}catch(r){throw e.release(),r}if(n.source==="immutable")return{db:i,generation:n,release:e.release};try{let r=d(a);if(n.databaseFileIdentity===u(n.databasePath)&&r.source==="legacy"&&r.identity===n.identity&&r.databaseFileIdentity===n.databaseFileIdentity&&r.metadataRaw===n.metadataRaw)return{db:i,generation:n,release:e.release}}catch(r){throw i.close(),e.release(),r}i.close(),e.release()}throw new Error("SQLite index publication changed repeatedly while opening a coherent generation.")}export{p as a};
|
|
20
|
-
//# sourceMappingURL=chunk-GINH3YQU.js.map
|
package/dist/chunk-GTZZVLKJ.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as I}from"./chunk-YSYPDRD5.js";import{a as p,e as g}from"./chunk-C7C6AKAT.js";import{A as v}from"./chunk-ZLMXIQLC.js";import{c as E,e as x}from"./chunk-ETC674NS.js";import{c as b,i as D,j as F,v as _,y}from"./chunk-KNLQGXVH.js";import{spawnSync as O}from"child_process";import{createHash as U}from"crypto";import{existsSync as k}from"fs";import{dirname as L,join as T}from"path";import{fileURLToPath as j}from"url";var N=b("definition-consumer-file-usage",{clearGroups:["whole-project","source-file"]}),M=E({kind:"consumer-file-usage",invalidation:x("consumer-file-usage"),serialize:W,deserialize:X});function Me(e,n){return{forDefinitions(t,r){return V(e,n,t,r)}}}function Re(e){let n=new Map;for(let[t,r]of e)n.set(t,new Set(r.files.map(i=>i.file)));return n}function Ne(e,n,t){return w(e,n,t).partition}function V(e,n,t,r){let i=h(t.length),s=_()?F(e):null,a=s?B(t,r,s):void 0,o=a?{workIdentity:a,workOutcome:"computed"}:{};return y("consumer-evidence.product",()=>{let l=y("consumer-evidence.provenance",()=>Y(e,n,t,r),()=>({...o,definitions:t.length,semantic:r.semantic,sourceFallback:r.sourceFallback!==!1})),u=new Map;i={...i,...l.counters};let c=z(t,l.sources);return y("consumer-evidence.classify",()=>{let f=q(e,t,l.sources,c);for(let d of t){let m=f.get(d.symbolId)??H();i.realFiles+=m.partition.realConsumers.length,i.reexportOnlyFiles+=m.partition.barrelConsumers,i.importOnlyFiles+=m.partition.importOnlyConsumers,u.set(d.symbolId,{definition:d,files:m.files,...m.partition})}},()=>({...o,...c,realFiles:i.realFiles,reexportOnlyFiles:i.reexportOnlyFiles,importOnlyFiles:i.importOnlyFiles})),u},()=>({...o,...i}))}function B(e,n,t){let r=U("sha256").update("consumer-evidence-v1\0").update(t).update("\0").update(n.semantic?"semantic\0":"indexed\0").update(n.sourceFallback===!1?"no-source-fallback":"source-fallback");for(let i of e.map(s=>s.symbol).sort())r.update("\0").update(i);return r.digest("hex").slice(0,24)}function h(e){return{definitions:e,indexedFiles:0,semanticFiles:0,fallbackFiles:0,totalFiles:0,realFiles:0,reexportOnlyFiles:0,importOnlyFiles:0}}function Y(e,n,t,r){let i=h(t.length),s=new Map;return S(s,i,"indexed",n.crossFileCallerMap(t,{semantic:!1})),r.semantic&&S(s,i,"semantic",I(e,t)),r.sourceFallback!==!1&&S(s,i,"source-fallback",n.sourceFallbackCallerFiles(t)),i.totalFiles=[...s.values()].reduce((a,o)=>a+o.size,0),{sources:s,counters:i}}function z(e,n){return{definitions:e.length,consumerFiles:[...n.values()].reduce((t,r)=>t+r.size,0),nativeAttempted:!1,nativeUsed:!1,nativeReason:"not-attempted"}}function S(e,n,t,r){let i=0;for(let[s,a]of r){let o=e.get(s);o||(o=new Map,e.set(s,o));for(let l of a){i++;let u=o.get(l)??new Set;u.add(t),o.set(l,u)}}t==="indexed"?n.indexedFiles+=i:t==="semantic"?n.semanticFiles+=i:n.fallbackFiles+=i}function q(e,n,t,r){let i=se(e,n,t,r);return i||$(e,n,t)}function $(e,n,t){let r=new Map;for(let i of n){let s=t.get(i.symbolId)??new Map;r.set(i.symbolId,w(e,i,[...s.keys()],s))}return r}function w(e,n,t,r=new Map){let i=[],s=0,a=0,o=g(n.symbol),l=[];for(let u of t){let c;Z(e,u,n.relativePath,o)?(s++,c="reexport-only"):J(e,u,o)?(a++,c="import-only"):(i.push(u),c="real"),l.push({file:u,sources:[...r.get(u)??[]],classification:c})}return{partition:{realConsumers:i,barrelConsumers:s,importOnlyConsumers:a},files:l}}function H(){return{partition:{realConsumers:[],barrelConsumers:0,importOnlyConsumers:0},files:[]}}function J(e,n,t){if(!t)return!1;let r=v(n);if(!r)return!1;let i=N.get(e,n,()=>A(e,n,r));return i.importedLeaves.has(t)&&!i.usedLeaves.has(t)}function A(e,n,t){let r=p(e).forFile(n,{text:!0}).text;if(!r)return Q();let i=D(e,n,r),s=M.read(e,n,i);if(s)return s;let a=G(p(e).forFile(n,{ast:!0}).ast,t);return M.write(e,n,i,a),a}var K=new Set(["identifier","type_identifier","property_identifier","field_identifier"]);function G(e,n){let t=new Set,r=new Set;if(!e)return{importedLeaves:t,usedLeaves:r};let i=n==="rust"?new Set(["use_declaration"]):n==="python"?new Set(["import_statement","import_from_statement"]):new Set(["import_statement"]),s=e.walk(),a=0,o=!1;for(;!o;){let l=s.nodeType,u=i.has(l);if(u&&(a+=1),K.has(l)&&(a>0?t:r).add(s.nodeText),!s.gotoFirstChild())for(u&&(a-=1);!s.gotoNextSibling();){if(!s.gotoParent()){o=!0;break}i.has(s.nodeType)&&(a-=1)}}return{importedLeaves:t,usedLeaves:r}}function Q(){return{importedLeaves:new Set,usedLeaves:new Set}}function W(e){return JSON.stringify({importedLeaves:[...e.importedLeaves],usedLeaves:[...e.usedLeaves]})}function X(e){try{let n=JSON.parse(e);return!Array.isArray(n.importedLeaves)||!Array.isArray(n.usedLeaves)?null:{importedLeaves:new Set(n.importedLeaves.filter(t=>typeof t=="string")),usedLeaves:new Set(n.usedLeaves.filter(t=>typeof t=="string"))}}catch{return null}}function Z(e,n,t,r){if(!r)return!1;let i=p(e).forFile(n,{lines:!0,reexports:!0}),s=i.lines??[];if(s.length===0)return!1;let a=i.reexports??[];return P(s,a,r)}function P(e,n,t){if(e.length===0||n.length===0)return!1;let r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=new RegExp(`\\b${r}\\b`),s=0;for(let a=0;a<e.length;a++){if(!i.test(e[a]??""))continue;if(s++,!n.find(l=>l.startLine<=a&&a<=l.endLine))return!1}return s>0}var ee="SCIP_QUERY_NATIVE_CONSUMER_CLASSIFY",ne="SCIP_QUERY_NATIVE_KERNELS_BIN",ie="SCIP_QUERY_NATIVE_CONSUMER_CLASSIFY_MIN_FILES",R=1e3,re=5e3,te=64*1024*1024,C;function se(e,n,t,r){let i=process.env[ee]?.toLowerCase();if(i!=="1"&&i!=="true")return r.nativeReason=i==="0"||i==="false"?"disabled":"opt-in-required",null;if(r.consumerFiles<me())return r.nativeReason="below-threshold",null;let s=de();if(!s)return r.nativeReason="binary-missing",null;r.nativeAttempted=!0;let a=oe(e,n,t),o=O(s,["consumer-classify"],{input:JSON.stringify(a),encoding:"utf8",timeout:re,maxBuffer:te});if(o.status!==0||o.error)return r.nativeReason=o.error?`spawn-error:${o.error.message}`:`exit-${o.status??"null"}`,null;try{let l=JSON.parse(o.stdout),u=le(l,n);return u?(r.nativeUsed=!0,r.nativeReason="used",u):(r.nativeReason="invalid-response",null)}catch{return r.nativeReason="invalid-json",null}}function oe(e,n,t){let r=new Map,i=[];for(let o of n){let l=g(o.symbol),c=[...(t.get(o.symbolId)??new Map).entries()].map(([f,d])=>{let m=r.get(f)??new Set;return l&&m.add(l),r.set(f,m),{file:f,sources:[...d]}});i.push({symbol_id:o.symbolId,leaf:l,consumer_files:c})}let s={},a={};for(let[o,l]of r){let u=v(o);if(u){let f=N.get(e,o,()=>A(e,o,u));s[o]={imported_leaves:[...f.importedLeaves],used_leaves:[...f.usedLeaves]}}let c=ae(e,o,l);c.length>0&&(a[o]=c)}return{definitions:i,file_usages:s,reexport_only_leaves:a}}function ae(e,n,t){if(t.size===0)return[];let r=p(e).forFile(n,{lines:!0,reexports:!0}),i=r.lines??[],s=r.reexports??[];return i.length===0||s.length===0?[]:[...t].filter(a=>P(i,s,a))}function le(e,n){if(!Array.isArray(e.entries)||e.entries.length!==n.length)return null;let t=new Set(n.map(i=>i.symbolId)),r=new Map;for(let i of e.entries){let s=ue(i);if(!s||!t.has(s.symbol_id))return null;r.set(s.symbol_id,{partition:{realConsumers:s.real_consumers,barrelConsumers:s.barrel_consumers,importOnlyConsumers:s.import_only_consumers},files:s.files})}for(let i of t)if(!r.has(i))return null;return r}function ue(e){if(!e||typeof e!="object")return null;let n=e;if(typeof n.symbol_id!="number"||!Array.isArray(n.real_consumers)||typeof n.barrel_consumers!="number"||typeof n.import_only_consumers!="number"||!Array.isArray(n.files)||!n.real_consumers.every(r=>typeof r=="string"))return null;let t=[];for(let r of n.files){if(!r||typeof r!="object")return null;let i=r;if(typeof i.file!="string"||!Array.isArray(i.sources)||!i.sources.every(ce)||!fe(i.classification))return null;t.push({file:i.file,sources:i.sources,classification:i.classification})}return{symbol_id:n.symbol_id,real_consumers:n.real_consumers,barrel_consumers:n.barrel_consumers,import_only_consumers:n.import_only_consumers,files:t}}function ce(e){return e==="indexed"||e==="semantic"||e==="source-fallback"}function fe(e){return e==="real"||e==="reexport-only"||e==="import-only"}function me(){let e=process.env[ie];if(!e)return R;let n=Number(e);return Number.isFinite(n)&&n>=0?n:R}function de(){if(C!==void 0)return C;let e=process.env[ne],n=process.platform==="win32"?"scip-query-kernels.exe":"scip-query-kernels";return C=[...e?[e]:[],...pe().map(r=>T(r,"target","release",n))].find(r=>k(r))??null,C}function pe(){let e=new Set,n=L(j(import.meta.url));for(let t=0;t<5;t++)e.add(n),n=L(n);return[...e]}export{Me as a,Re as b,Ne as c,J as d};
|
|
2
|
-
//# sourceMappingURL=chunk-GTZZVLKJ.js.map
|
package/dist/chunk-GXXW5ZHH.js
DELETED
package/dist/chunk-H5EXS3HM.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function e(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function i(n){return typeof n=="string"&&Number.isFinite(Date.parse(n))}function o(n){return e(n)&&Object.values(n).every(t=>typeof t=="string"||t===null)}function s(n){return typeof n=="string"&&n.length>0}function u(n){return typeof n=="number"&&Number.isSafeInteger(n)&&n>=0}function g(n){return typeof n=="number"&&Number.isSafeInteger(n)&&n>0}var r=/^[a-f0-9]{64}$/u;function f(n){return typeof n=="string"&&r.test(n)}function p(n){return typeof n=="string"&&n.length>0&&n.length<=256&&!/[\0\r\n]/u.test(n)}function c(n){return typeof n=="number"&&Number.isFinite(n)&&n>=0}export{e as a,i as b,o as c,s as d,u as e,g as f,f as g,p as h,c as i};
|
|
2
|
-
//# sourceMappingURL=chunk-H5EXS3HM.js.map
|
package/dist/chunk-HAXXKRTD.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{b as be}from"./chunk-NJGKXKQF.js";import{C as G,i as ye,l as O,u as M,y as P}from"./chunk-2VAHDDLM.js";import{e as pe}from"./chunk-IW5XQG5G.js";var Oe=12,De=20,oe=200,ie=800,Ie=.9,Me=64,ke=pe("behavior-construct-ranges"),ge={if_statement:"branch",conditional_expression:"branch",ternary_expression:"branch",switch_statement:"branch",switch_expression:"branch",switch_case:"branch",case_statement:"branch",match_statement:"branch",match_expression:"branch",match_arm:"branch",for_statement:"loop",for_in_statement:"loop",for_of_statement:"loop",while_statement:"loop",do_statement:"loop",await_expression:"await",return_statement:"return",throw_statement:"throw",raise_statement:"throw",assignment_expression:"mutation",augmented_assignment_expression:"mutation",assignment:"mutation",pair:"shape",field_initializer:"shape",spread_element:"spread",dictionary_splat:"spread",catch_clause:"catch",except_clause:"catch",finally_clause:"finally"},Z=["anchor","signature","binding","branch","loop","call","await","return","throw","mutation","shape","spread","catch","finally"],Ce=[...Z,"lifecycle"],_e=["loop","await","throw","mutation","spread","catch","finally","lifecycle"],Ye=new Set(["onBeforeMount","onBeforeUnmount","onMounted","onUnmounted","useEffect","useInsertionEffect","useLayoutEffect"]);var Ne=new Set(["object","object_pattern","dictionary","field_declaration_list","struct_expression","struct_pattern"]);function Ct(e,n,t,o,r=[],a={}){let s=P(e,n);if(!s)return null;let l=O(e,n),c=ee(e,n,t,o,r),u=ne(e,n,c.startLine,c.endLine),d=u?.startLine??t,p=u?.endLine??o,N=(u?I(s.rootNode,c.startLine,c.endLine):null)??M(s.rootNode,d,p);if(!N)return null;let b=Le(N,l,d,p,r);if(!b||b.lines.length===0||b.lines.some(S=>S.text.length>ie))return null;let h=ot(l,d,p),C=it(b);if((a.requireSavings??!0)&&C>=h*Ie)return null;let x=Z.filter(S=>b.lines.some(v=>v.signals.includes(S)));return{...u?{callable:{name:u.name,startLine:u.startLine,endLine:u.endLine}}:{},representation:"outline",constructKind:b.constructKind,signature:b.signature,lines:b.lines,signals:x,testCases:be(n)==="test"?ut(l,d,p):[],coverage:{sourceStatements:b.sourceStatements,representedStatements:b.sourceStatements,copiedStatements:b.copiedStatements,omittedStatements:0},rawCharacters:h,outlineCharacters:C,candidateLines:b.sourceStatements,omittedLines:0}}function _t(e,n,t,o,r){if(r.length===0)return[];let a=P(e,n);if(!a)return[];let s=O(e,n),l=ee(e,n,t,o,r),c=ne(e,n,l.startLine,l.endLine),u=c?.startLine??t,d=c?.endLine??o,p=(c?I(a.rootNode,l.startLine,l.endLine):null)??M(a.rootNode,u,d);if(!p)return[];let N=Le(p,s,u,d,r);return N?N.lines.filter(b=>b.text.length<=ie&&b.signals.some(h=>["branch","loop","catch","finally"].includes(h))&&r.some(h=>h>=b.line&&h<=b.endLine)):[]}function Nt(e,n,t,o){let r=P(e,n);if(!r)return null;let a=I(r.rootNode,t,o)??M(r.rootNode,t,o);if(!a)return null;let s=[],l=se(a),c=[];return ce(a,a,u=>{if(Y.has(u.type)||je.has(u.type)){ze(s,c,u);return}if(te.has(u.type)){He(s,c,u);return}if(z.has(u.type)){Ue(s,c,u);return}H.has(u.type)&&Ke(s,u)}),{facts:Je(s),terminals:we(l),unsupported:c}}function ee(e,n,t,o,r=[]){let a=r.filter(d=>d>=t&&d<=o),s=ke.get(e,n,ye(e,n)??"",()=>new Map),l=`${t}:${o}:${a.join(",")}`,c=s.get(l);if(c)return s.delete(l),s.set(l,c),{startLine:c[0],endLine:c[1]};let u=$e(e,n,t,o,a);if(s.set(l,[u.startLine,u.endLine]),s.size>Me){let d=s.keys().next().value;d!==void 0&&s.delete(d)}return u}function $e(e,n,t,o,r){let a=P(e,n),s=[];if(r.length>0&&a){let d=[],p=r[0],N=p;for(let h of r)p=Math.min(p,h),N=Math.max(N,h);Ee(a.rootNode,p,N,h=>{Qe(h)&&h.startPosition.row>=t&&h.endPosition.row<=o&&r.every(C=>h.startPosition.row<=C&&h.endPosition.row>=C)&&d.push(h),T.has(h.type)&&h.startPosition.row>=t&&h.endPosition.row<=o&&r.every(C=>h.startPosition.row<=C&&h.endPosition.row>=C)&&s.push(h)});let b=d.sort((h,C)=>h.endPosition.row-h.startPosition.row-(C.endPosition.row-C.startPosition.row)||h.startPosition.row-C.startPosition.row)[0];if(b)return{startLine:b.startPosition.row,endLine:b.endPosition.row}}let l=ne(e,n,t,o);if(l)return{startLine:l.startLine,endLine:l.endLine};if(r.length===0)return{startLine:t,endLine:o};let c=(G(e,n)?.callables??[]).filter(d=>d.startLine>=t&&d.endLine<=o&&r.every(p=>d.startLine<=p&&d.endLine>=p)).sort((d,p)=>d.endLine-d.startLine-(p.endLine-p.startLine)||d.startLine-p.startLine)[0];if(!a)return c?{startLine:c.startLine,endLine:c.endLine}:{startLine:t,endLine:o};let u=s.sort((d,p)=>d.endPosition.row-d.startPosition.row-(p.endPosition.row-p.startPosition.row)||d.startPosition.row-p.startPosition.row)[0];return u?{startLine:u.startPosition.row,endLine:u.endPosition.row}:c?{startLine:c.startLine,endLine:c.endLine}:{startLine:t,endLine:o}}function xt(e,n,t,o,r={}){if(o-t+1<(r.minimumBodyLines??De))return null;let s=Re(e,n,t,o,[],!1);if(!s)return null;let l=s.candidates.map(S=>({...S,signals:S.signals.filter(v=>v!=="anchor"&&v!=="signature")})).filter(S=>S.signals.length>0);if(l.length===0)return null;let c=ct(l),u=l.filter(S=>S.text.length<=oe);if(u.length===0)return null;let d=_e.filter(S=>(c[S]??0)>0),p=d.filter(S=>S!=="await"),N=s.shapes.reduce((S,v)=>S+v.fields.length,0);if(p.length===0&&!((c.await??0)>0&&N>0)&&N<3)return null;let b=lt(u,c),h=new Map;for(let S of d){let v=b.find(m=>m.signals.includes(S));v&&h.set(v.line,v)}if(h.size===0){let S=b.find(v=>v.signals.includes("branch"));S&&h.set(S.line,S)}let C=Math.min(10,Math.max(1,r.maxLines??h.size)),x=new Map;for(let S of h.values()){if(x.size>=C)break;x.set(S.line,S)}return x.size>=l.length&&s.shapes.length===0?null:{owner:s.callable?.name??null,startLine:t,endLine:o,lines:[...x.values()].sort((S,v)=>S.line-v.line),shapes:s.shapes,signalCounts:c,candidateLines:l.length,omittedLines:l.length-x.size}}function vt(e,n,t,o){let r=Re(e,n,t,o,[],!1);return r?new Map(r.candidates.map(a=>[a.line,a.signals.filter(s=>s!=="lifecycle")])):new Map}var T=new Set(["arrow_function","constructor_declaration","function_declaration","function_definition","function_expression","generator_function","generator_function_declaration","function_item","lambda","lambda_expression","method","method_declaration","method_definition"]),B=new Set(["block","body","compound_statement","declaration_list","statement_block"]),Y=new Set(["if_expression","if_statement","unless","unless_statement"]),je=new Set(["conditional_expression","ternary_expression"]),te=new Set(["do_statement","enhanced_for_statement","for_expression","for_in_statement","for_of_statement","for_statement","loop_expression","while_statement"]),z=new Set(["match_expression","match_statement","switch_expression","switch_statement"]),xe=new Set(["case_statement","match_arm","switch_case","switch_default"]),H=new Set(["try_expression","try_statement"]),X=new Set(["catch_clause","except_clause","rescue"]),j=new Set(["ensure","finally_clause"]),$=new Set(["else","else_clause"]),ve=new Set(["raise_statement","return_statement","throw_statement"]),qe=new Set(["block_comment","comment","line_comment"]);function ze(e,n,t){let o=t.childForFieldName("condition")??ue(t),r=t.childForFieldName("consequence")??t.childForFieldName("body")??t.namedChildren.find(c=>B.has(c.type)),a=t.childForFieldName("alternative")??t.namedChildren.find(c=>$.has(c.type));if(!o||!r){n.push(le(t,"conditional-fields-unresolved"));return}let s=F(o,"predicate",o.text),l=F(r,Se(r),"consequence");if(E(e,s,l,"predicate-consequence",{branchRole:"consequence"}),J(e,s,r,"consequence"),a){let c=F(a,Se(a),"alternative");E(e,s,c,"predicate-alternative",{branchRole:"alternative"}),J(e,s,a,"alternative");return}E(e,s,ae(s,"otherwise continue"),"predicate-fallthrough",{branchRole:"fallthrough"})}function He(e,n,t){let o=t.childForFieldName("body")??t.namedChildren.find(s=>B.has(s.type));if(!o){n.push(le(t,"loop-body-unresolved"));return}let r=t.childForFieldName("condition"),a=F(r??t,"predicate",r?.text??R(t,o));E(e,a,F(o,"outcome","iteration"),"loop-iteration",{branchRole:"iteration"}),J(e,a,o,"iteration"),E(e,a,ae(a,"loop exits"),"loop-exit",{branchRole:"exit"})}function Ue(e,n,t){let o=t.childForFieldName("body")??t.namedChildren.find(c=>B.has(c.type)),r=t.childForFieldName("value")??t.childForFieldName("condition")??t.childForFieldName("subject")??ue(t),a=We(o??t);if(!r||a.length===0){n.push(le(t,"switch-cases-unresolved"));return}let s=F(r,"predicate",r.text),l=!1;for(let c of a){let u=Xe(c);l||=u;let d=R(c,c.namedChildren.find(p=>Q(p)));E(e,s,F(c,"outcome",d||(u?"default":"case")),u?"predicate-default":"predicate-case",{branchRole:u?"default":"case"}),J(e,s,c,u?"default":"case")}l||E(e,s,ae(s,"no case matched"),"predicate-fallthrough",{branchRole:"fallthrough"})}function Ke(e,n){let t=F(n,"scope","try");for(let o of Ve(n)){let r=j.has(o.type),a=F(o,"handler",r?"finally":R(o,W(o)));E(e,t,a,r?"finally-cleanup":"exception-handler",{branchRole:r?"finally":"catch"}),Ge(e,a,o,r?"finally":"catch")}}function Ge(e,n,t,o){for(let r of se(t)){let a=r.label.startsWith("throw")||r.label.startsWith("raise")?"throw":"return";E(e,n,r,a==="throw"?"handler-throw":"handler-return",{branchRole:o,terminalKind:a})}}function J(e,n,t,o){for(let r of se(t)){let a=r.label.startsWith("throw")||r.label.startsWith("raise")?"throw":"return";E(e,n,r,a==="throw"?"predicate-throw":"predicate-return",{branchRole:o,terminalKind:a})}}function E(e,n,t,o,r){e.push({controller:n,outcome:t,subtype:o,attributes:r})}function F(e,n,t){return{kind:n,label:q(t).slice(0,ie),startLine:e.startPosition.row,endLine:e.endPosition.row,implicit:!1}}function ae(e,n){return{...e,kind:"outcome",label:n,implicit:!0}}function Se(e){return ve.has(e.type)?"terminal":"outcome"}function se(e){let n=[];return ce(e,e,t=>{ve.has(t.type)&&n.push(F(t,"terminal",t.text))}),we(n)}function ce(e,n,t){t(n);for(let o of n.namedChildren)o!==e&&T.has(o.type)||ce(e,o,t)}function We(e){let n=[],t=o=>{for(let r of o.namedChildren)z.has(r.type)||(xe.has(r.type)?n.push(r):t(r))};return t(e),n}function Ve(e){let n=[],t=o=>{for(let r of o.namedChildren)H.has(r.type)||(X.has(r.type)||j.has(r.type)?n.push(r):T.has(r.type)||t(r))};return t(e),n}function Xe(e){let n=R(e,e.namedChildren.find(t=>Q(t))).trim();return e.type==="switch_default"||/^(?:default\b|_\s*=>)/u.test(n)}function le(e,n){return{startLine:e.startPosition.row,endLine:e.endPosition.row,reason:n}}function Je(e){let n=new Map;for(let t of e)n.set(`${t.controller.startLine}\0${t.controller.endLine}\0${t.outcome.startLine}\0${t.outcome.endLine}\0${t.subtype}\0${t.outcome.label}`,t);return[...n.values()]}function we(e){let n=new Map;for(let t of e)n.set(`${t.startLine}\0${t.endLine}\0${t.kind}\0${t.label}`,t);return[...n.values()]}function Qe(e){return T.has(e.type)||te.has(e.type)||z.has(e.type)||H.has(e.type)||X.has(e.type)||j.has(e.type)}function Le(e,n,t,o,r){let s=I(e,t,o)??e,l=W(s),c=[],u=0,d=0,p=(i,f,y,g,w=!1,D=!0)=>{let K=w?y.trim():q(y);if(!K)return;let A=Math.max(t,i.startPosition.row),fe=Math.min(o,i.endPosition.row);c.push({line:A,endLine:Math.max(A,fe),depth:f,signals:Z.filter(me=>g.includes(me)||me==="anchor"&&r.some(he=>he>=A&&he<=fe)),text:K,copied:w}),D&&(u+=1,w&&(d+=1))},N=(i,f)=>{for(let y of i.namedChildren)_(y,f)},b=(i,f)=>{if(Y.has(i.type)){h(i,f,"else if");return}if($.has(i.type)){let y=i.namedChildren.find(w=>Y.has(w.type));if(y){h(y,f,"else if");return}p(i,f,"else",["branch"],!1,!1);let g=W(i)??i.namedChildren.find(w=>B.has(w.type));if(g)_(g,f+1);else for(let w of i.namedChildren)_(w,f+1);return}p(i,f,"else",["branch"],!1,!1),_(i,f+1)},h=(i,f,y=i.type.startsWith("unless")?"unless":"if")=>{let g=i.childForFieldName("condition")??ue(i),w=i.childForFieldName("consequence")??i.childForFieldName("body")??i.namedChildren.find(A=>B.has(A.type)),D=i.childForFieldName("alternative")??i.namedChildren.find(A=>$.has(A.type)),K=g?g.text:R(i,w);p(i,f,`${y} ${nt(K)}`,k(g,["branch"])),w&&_(w,f+1),D&&b(D,f)},C=(i,f)=>{let y=i.childForFieldName("body")??i.namedChildren.find(g=>B.has(g.type));p(i,f,R(i,y),k(i,["loop"])),y&&_(y,f+1)},x=(i,f)=>{let y=i.childForFieldName("body")??i.namedChildren.find(g=>B.has(g.type));p(i,f,R(i,y),k(i,["branch"])),y&&_(y,f+1)},S=(i,f)=>{let y=i.namedChildren.find(g=>Q(g));p(i,f,R(i,y),["branch"],!1,!1);for(let g of i.namedChildren)(g===y||Q(g))&&_(g,f+1)},v=(i,f)=>{p(i,f,"try",[],!1);for(let y of i.namedChildren)B.has(y.type)?_(y,f+1):(X.has(y.type)||j.has(y.type))&&_(y,f)},m=(i,f,y)=>{let g=i.childForFieldName("body")??i.namedChildren.find(D=>B.has(D.type)),w=y==="finally"?"finally":R(i,g);p(i,f,w,[y],!1,!1),g&&_(g,f+1)},L=(i,f)=>{let y=W(i);p(i,f,R(i,y),k(i,["binding"])),y&&_(y,f+1)},_=(i,f)=>{if(i.startPosition.row>o||i.endPosition.row<t||qe.has(i.type)||i.type==="empty_statement")return;if(B.has(i.type)){N(i,f);return}if(Y.has(i.type)){h(i,f);return}if(te.has(i.type)){C(i,f);return}if(z.has(i.type)){x(i,f);return}if(xe.has(i.type)){S(i,f);return}if(H.has(i.type)){v(i,f);return}if(X.has(i.type)){m(i,f,"catch");return}if(j.has(i.type)){m(i,f,"finally");return}if($.has(i.type)){b(i,f);return}if(T.has(i.type)){L(i,f);return}let g=!Be(i)||rt(i);p(i,f,i.text,k(i),g)};return _(l&&l!==s?l:s,0),u===0?null:{constructKind:tt(s),signature:et(s,l,n,t),lines:c,sourceStatements:u,copiedStatements:d}}function I(e,n,t){let o=e.namedChildren.filter(r=>r.startPosition.row<=n&&r.endPosition.row>=t);for(let r of o.sort(Ze)){let a=I(r,n,t);if(a)return a}return T.has(e.type)&&e.startPosition.row<=n&&e.endPosition.row>=t?e:null}function Ze(e,n){return e.endPosition.row-e.startPosition.row-(n.endPosition.row-n.startPosition.row)||e.startPosition.row-n.startPosition.row}function W(e){return e.childForFieldName("body")??e.childForFieldName("consequence")??e.namedChildren.find(n=>B.has(n.type))??null}function et(e,n,t,o){let r=R(e,n);return r||(t[o]??e.text).trim()}function tt(e){return e.type.includes("constructor")?"constructor":e.type.includes("method")||e.type==="method"?re(e,new Set(["class_body","class_declaration","class_definition"]))?"class method":"object method":e.type==="arrow_function"||e.type==="function_expression"||e.type==="lambda"?re(e,new Set(["object","pair"]))?"object member":"function value":e.type.includes("function")?re(e,T)?"nested function":"module function":"source construct"}function re(e,n){let t=e.parent;for(;t;){if(n.has(t.type))return!0;t=t.parent}return!1}function ue(e){return e.namedChildren.find(n=>!B.has(n.type)&&!$.has(n.type))??null}function R(e,n){if(!n)return q(e.text);let t=Math.max(0,n.startIndex-e.startIndex);return q(e.text.slice(0,t)).replace(/[:{]\s*$/u,"").trim()}function nt(e){let n=q(e);return n.startsWith("(")&&n.endsWith(")")?n.slice(1,-1).trim():n}function q(e){return e.trim().replace(/\r?\n[\t ]*/gu," ")}function k(e,n=[]){let t=new Set(n);return e&&U(e,o=>{let r=ge[o.type];r&&t.add(r),o.type==="call_expression"&&(t.add("call"),Fe(o)&&t.add("shape")),de.has(o.type)&&t.add("binding")}),Z.filter(o=>t.has(o))}function rt(e){let n=!1;return U(e,t=>{n||!t.text.includes(`
|
|
2
|
-
`)||/(?:string|template|heredoc|raw_string)/u.test(t.type)&&(n=!0)}),n}function Q(e){return B.has(e.type)||Y.has(e.type)||te.has(e.type)||z.has(e.type)||H.has(e.type)||T.has(e.type)||Be(e)}function Be(e){return/(?:statement|declaration|expression|assignment|return|throw|raise|break|continue|yield|with_item)$/u.test(e.type)||de.has(e.type)}function ot(e,n,t){let o=0;for(let r=n;r<=t;r+=1)o+=(e[r]?.length??0)+10;return o}function it(e){return e.constructKind.length+e.signature.length+80+e.lines.reduce((n,t)=>n+t.text.length+t.depth*2+10,0)}function Re(e,n,t,o,r,a){let s=P(e,n);if(!s)return null;let l=O(e,n),c=ne(e,n,t,o),u=a?c?.startLine??t:t,d=a?c?.endLine??o:o,N=(c?.startLine===u&&c.endLine===d?I(s.rootNode,u,d):null)??M(s.rootNode,u,d);if(!N)return null;let b=new Map,h=new Map,C=new Map,x=(m,L)=>{if(m<u||m>d)return;let _=b.get(m)??new Set;_.add(L),b.set(m,_)};c&&x(c.startLine,"signature");for(let m of r)x(m,"anchor");U(N,m=>{let L=ge[m.type];if(L&&x(m.startPosition.row,L),L==="shape"&&at(h,m,N,u,d),m.type==="call_expression"){let i=(m.childForFieldName("function")??m.namedChild(0))?.text.split(".").at(-1);if(Fe(m)){x(m.startPosition.row,"shape");let f=V(m.text);f.length<=oe&&C.set(m.startPosition.row,f)}if(i&&Ye.has(i)){x(m.startPosition.row,"lifecycle");let f=V(m.text);f.length<=oe&&C.set(m.startPosition.row,f)}}de.has(m.type)&&x(m.startPosition.row,"binding")});let S=G(e,n);for(let m of S?.callSites??[])m.line<u||m.line>d||(x(m.line,"call"),m.calleeLeaf==="catch"&&x(m.line,"catch"));let v=[...b.entries()].sort(([m],[L])=>m-L).map(([m,L])=>({line:m,signals:Ce.filter(_=>L.has(_)),text:C.get(m)??V(l[m]??"")})).filter(m=>m.text.length>0||m.signals.includes("anchor"));return{...c?{callable:c}:{},rangeStart:u,rangeEnd:d,sourceLines:l,candidates:v,shapes:[...h.values()].sort((m,L)=>m.startLine-L.startLine)}}function at(e,n,t,o,r){if(n.startPosition.row<o||n.endPosition.row>r)return;let a=n.childForFieldName("key")??n.childForFieldName("name")??n.namedChild(0),s=V(a?.text??"");if(!s||s.includes(`
|
|
3
|
-
`)||s.length>60)return;let l=st(n,t);if(l.startPosition.row<o||l.endPosition.row>r)return;let c=`${l.startPosition.row}:${l.endPosition.row}`,u=e.get(c)??{startLine:l.startPosition.row,endLine:l.endPosition.row,fields:[]};u.fields.some(d=>d.name===s&&d.line===n.startPosition.row)||u.fields.push({name:s,line:n.startPosition.row}),e.set(c,u)}function st(e,n){let t=e.parent;for(;t&&t!==n.parent;){if(Ne.has(t.type))return t;if(t===n)break;t=t.parent}return e.parent??e}function ne(e,n,t,o){return G(e,n)?.callables.filter(r=>r.startLine<=t&&r.endLine>=o).sort((r,a)=>r.endLine-r.startLine-(a.endLine-a.startLine)||r.startLine-a.startLine)[0]}function U(e,n){n(e);for(let t of e.namedChildren)U(t,n)}function Ee(e,n,t,o){o(e);for(let r of e.namedChildren)r.startPosition.row>n||r.endPosition.row<t||Ee(r,n,t,o)}function V(e){return e.trim().replace(/\s+/gu," ")}function Fe(e){if(e.type!=="call_expression")return!1;let n=e.childForFieldName("arguments")??e.namedChildren.find(o=>o.type==="arguments"||o.type==="argument_list");if(!n)return!1;let t=!1;return U(n,o=>{Ne.has(o.type)&&(t=!0)}),t}function ct(e){let n={};for(let t of Ce){let o=e.filter(r=>r.signals.includes(t)).length;o>0&&(n[t]=o)}return n}function lt(e,n){let t=new Map;for(let a of e){let s=a.signals.join(",");t.set(s,(t.get(s)??0)+1)}let o=new Set(_e),r=a=>{let s=t.get(a.signals.join(","))??1,l=Math.min(...a.signals.map(d=>n[d]??1)),c=a.signals.some(d=>o.has(d))?3:1,u=Math.max(0,a.signals.length-1)*1e3;return c*(1e3/s+1e3/l)+u};return[...e].sort((a,s)=>r(s)-r(a)||s.line-a.line)}var de=new Set(["lexical_declaration","variable_declarator","const_item","static_item","let_declaration","assignment"]);function ut(e,n,t){let o=[],r=/\b(?:describe|it|test)(?:\.(?:only|skip|todo))?\s*\(\s*(['"`])([^'"`]+)\1/u;for(let a=n;a<=t;a+=1){let s=r.exec(e[a]??"")?.[2];if(!(!s||o.includes(s))&&(o.push(s),o.length>=Oe))break}return o}var dt=new Set(["arrow_function","class_declaration","constructor_declaration","field_definition","function_declaration","function_definition","function_expression","function_item","generator_function_declaration","generator_function","lexical_declaration","method","method_declaration","method_definition","object_method","variable_declaration"]);function ft(e,n,t){let o=P(e,n)?.rootNode??null,r=mt(o,t);if(!r)return null;let a=O(e,n);if(a.length===0)return null;let s=Math.max(0,r.startPosition.row),l=r.endPosition.column===0?r.endPosition.row-1:r.endPosition.row;return{type:r.type,startLine:s,endLine:Math.min(a.length-1,Math.max(s,l))}}function Et(e,n,t,o,r){let a=ee(e,n,o,r,[t]),s=a.startLine===a.endLine&&/(?:=>|\(|\{|\[|,)\s*$/u.test(O(e,n)[a.startLine]??"");if(!s&&(a.startLine>o||a.endLine<r))return a;let l=ft(e,n,t);return s&&l?{startLine:l.startLine,endLine:l.endLine}:l&&l.startLine>=o&&l.endLine<=r?{startLine:l.startLine,endLine:l.endLine}:{startLine:o,endLine:r}}function mt(e,n){if(!e||!Ae(e,n))return null;let t=Te(e,n);for(;t;){if(dt.has(t.type))return t;t=t.parent}return null}function Te(e,n){let t=e.namedChildren.filter(o=>Ae(o,n)).sort((o,r)=>Pe(o)-Pe(r));return t.length>0?Te(t[0],n):e}function Ae(e,n){return e.startPosition.row<=n&&e.endPosition.row>=n}function Pe(e){return e.endIndex-e.startIndex}export{Ct as a,_t as b,Nt as c,ee as d,xt as e,vt as f,ft as g,Et as h};
|
|
4
|
-
//# sourceMappingURL=chunk-HAXXKRTD.js.map
|
package/dist/chunk-HEZWBAZY.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as q}from"./chunk-2BMSSRBH.js";import{a as z}from"./chunk-BJWFVAA5.js";import{e as L,h as F,l as K,m as B,n as E}from"./chunk-YSYPDRD5.js";import{o as w}from"./chunk-SKKXTABJ.js";import{d as M}from"./chunk-C7C6AKAT.js";import{n as h}from"./chunk-RBAD4GJ2.js";import{A as y}from"./chunk-ZLMXIQLC.js";function ue(e,n={}){let{samples:i=50,scope:s,maxDisagreements:u=5}=n,c=new q(e),d=Z(c.productionCallableDefinitions({scope:s,minLoc:2,requireFunctionLikeSymbol:!0}),i),a=$(e,d);if(d.length===0||!a)return{available:!1,sampleSize:d.length,oracleCoverage:0,scores:[],topDisagreements:[]};let t={references:v(),callees:v(),renders:v()},l=[],m=0,p=a==="semantic"?K(e,d):new Map,f=a==="semantic"?E(e,d):new Map,S=a==="semantic"?B(e):null,x=o=>S===null||S(o)!==null,N=(o,g)=>S===null||S(g)===S(o.relativePath),T=a==="source"?oe(e,c,d):null;for(let o of d){let g=b(o,a==="semantic"?F(e,o).map(r=>r.file):[...T?.referencesBySymbolId.get(o.symbolId)??[]]),P=a==="semantic"?p.get(o.symbolId)??[]:[...T?.calleesBySymbolId.get(o.symbolId)??[]].map(r=>({file:r})),V=b(o,P.filter(r=>r.kind!=="jsx-render").map(r=>r.file)),G=b(o,P.filter(r=>r.kind==="jsx-render").map(r=>r.file));m+=1;let H=b(o,w(e,o,{semanticEvidence:z}).map(r=>r.file)),A=c.calleeMap([o],{semantic:!1}).get(o.symbolId)??[];for(let r of A){let k=(r.kind==="jsx-render"?t.renders:t.callees).sources;k[r.source]=(k[r.source]??0)+1}let J=b(o,A.filter(r=>r.kind!=="jsx-render").map(r=>r.file)),U=b(o,A.filter(r=>r.kind==="jsx-render").map(r=>r.file)),j=ne(e,o),Q=f.get(o.symbolId),R=Q!==void 0&&Q.unresolved===0,W=D(a,"references"),X=D(a,"callees")||R||j.calls===0,Y=D(a,"renders")||R||j.renders===0;C(t.references,o,"references",H,g,W,l,r=>N(o,r)),C(t.callees,o,"callees",J,V,X,l,x),C(t.renders,o,"renders",U,G,Y,l,x)}return l.sort((o,g)=>g.cheapOnly.length+g.oracleOnly.length-(o.cheapOnly.length+o.oracleOnly.length)),{available:!0,sampleSize:d.length,oracleCoverage:d.length>0?O(m/d.length):0,oracleKind:a,scores:["references","callees","renders"].map(o=>te(o,t[o],a)),topDisagreements:l.slice(0,u)}}function v(){return{comparedSymbols:0,agreed:0,cheapTotal:0,oracleTotal:0,skippedOraclePartial:0,completeSymbols:0,completeCheapTotal:0,completeAgreed:0,outsideCoverage:0,sources:{}}}function Z(e,n){let i=[...e].sort((c,d)=>c.symbolId-d.symbolId);if(i.length<=n)return i;let s=i.length/n,u=[];for(let c=0;c<n;c++)u.push(i[Math.floor(c*s)]);return u}function $(e,n){let i=n[0];if(!i)return null;if(I(e,i))return"source";try{if(L(e).capability("semantic-references",i.relativePath).available)return"semantic"}catch{}return n.some(s=>I(e,s))?"source":null}function b(e,n){let i=new Set;for(let s of n)s!==e.relativePath&&i.add(s);return i}function C(e,n,i,s,u,c,d,a=()=>!0){if(!c&&u.size===0){e.skippedOraclePartial+=1;return}let t=[...s].filter(f=>!u.has(f)&&!a(f));e.outsideCoverage+=t.length;let l=s.size-t.length;e.comparedSymbols+=1,e.cheapTotal+=l,e.oracleTotal+=u.size,c&&(e.completeSymbols+=1,e.completeCheapTotal+=l);let m=[],p=[];for(let f of s)u.has(f)?(e.agreed+=1,c&&(e.completeAgreed+=1)):a(f)&&m.push(f);for(let f of u)s.has(f)||p.push(f);(m.length>0||p.length>0)&&d.push({symbol:M(n.symbol),question:i,cheapOnly:m,oracleOnly:p})}var ee={references:!0,callees:!1,renders:!1};function ne(e,n){let i=h(e,n.relativePath),s=0,u=0;for(let c of i?.callSites??[])c.line<n.startLine||c.line>n.endLine||(c.kind==="jsx-render"?u+=1:s+=1);return{calls:s,renders:u}}function te(e,n,i){let s=n.oracleTotal>0?n.agreed/n.oracleTotal:1,u=n.completeCheapTotal>0?O(n.completeAgreed/n.completeCheapTotal):null,c=n.cheapTotal-n.agreed-(n.completeCheapTotal-n.completeAgreed);return{question:e,comparedSymbols:n.comparedSymbols,precision:u,recall:O(s),unverified:c,skippedOraclePartial:n.skippedOraclePartial,completeOracleSymbols:n.completeSymbols,outsideOracleCoverage:n.outsideCoverage,cheapSources:n.sources}}function D(e,n){return e==="semantic"?ee[n]:!1}function I(e,n){return y(n.relativePath)==="clojure"&&h(e,n.relativePath)!==null}function oe(e,n,i){let s=new Map,u=new Map,c=i.filter(t=>I(e,t)),d=new Map;for(let t of c){let l=d.get(t.leaf)??[];l.push(t),d.set(t.leaf,l)}for(let t of n.sourceFiles()){if(y(t)!=="clojure")continue;let l=h(e,t);if(l)for(let m of l.fileIdentifiers)for(let p of d.get(m)??[])_(s,p.symbolId,t)}let a=new Map;for(let t of n.scopedDefinitions()){if(y(t.relativePath)!=="clojure")continue;let l=a.get(t.leaf)??[];l.push(t),a.set(t.leaf,l)}for(let t of c){let l=h(e,t.relativePath);if(l){for(let m of l.callSites)if(!(m.line<t.startLine||m.line>t.endLine))for(let p of a.get(m.calleeLeaf)??[])_(u,t.symbolId,p.relativePath)}}return{referencesBySymbolId:s,calleesBySymbolId:u}}function _(e,n,i){let s=e.get(n);if(s){s.add(i);return}e.set(n,new Set([i]))}function O(e){return Math.round(e*1e3)/1e3}export{ue as a};
|
|
2
|
-
//# sourceMappingURL=chunk-HEZWBAZY.js.map
|