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-U2FPY5XA.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{B as te,C as Ee}from"./chunk-NWLVNU66.js";import{$d as G,C as K,Df as _e,H as Re,J as Ie,M as Q,Me as re,Ne as Ae,Oe as ne,Pe,Qd as S,Qe as xe,Rd as We,Re as ie,Sd as L,Td as X,Ud as M,X as Y,Xa as ke,Y as C,Z as be,_d as k,ba as w,ca as Ce,da as we,ia as A,oe as Z,pe as ee,qe as R,re as $,se as j,sf as Te,tf as qe,u as v,za as P}from"./chunk-2XWIUW5Z.js";import{spawn as Tt}from"child_process";import{existsSync as qt,rmSync as Ue}from"fs";import{dirname as _t,resolve as z}from"path";import{fileURLToPath as Dt}from"url";import{createHash as gt,randomUUID as oe}from"crypto";import{existsSync as vt,linkSync as St,readdirSync as Rt,rmSync as W}from"fs";import{basename as It,dirname as bt,join as m}from"path";var I=1,Ct=10*6e4,wt=10080*6e4,F="requests",x="claims",N="completions",Oe="staging";function Le(e,t,r={}){let n=r.now?.()??new Date,i=Et(r.ttlMs),o=At(r.idempotencyKey),a=o?`key-${gt("sha256").update(o).digest("hex")}`:`request-${(r.randomId??oe)()}`,s={version:I,requestId:a,...o?{idempotencyKey:o}:{},createdAt:n.toISOString(),deadlineAt:new Date(n.getTime()+i).toISOString(),detail:t.trim().slice(0,2048)||"stale index observed by a command"},c=Fe(e,a),d=ae(e,c,s,r.onStage);if(d.published)return{disposition:"accepted",request:s,achievedDurability:d.achievedDurability,directorySync:d.directorySync};let l=se(c);if(!l)throw new Error(`Watch refresh request identity ${a} exists but is malformed.`);return{disposition:"duplicate",request:l}}function sr(e,t={}){let r=t.now?.()??new Date,n=`claim-${(t.randomId??oe)()}`,i=Math.max(1,Math.floor(t.limit??64)),o=$e(e).sort(Pt),a=[];for(let s of o){if(a.length>=i)break;if(De(e,s.requestId))continue;if(Date.parse(s.deadlineAt)<=r.getTime()){Ge(e,{version:I,requestId:s.requestId,outcome:"expired",completedAt:r.toISOString()});continue}let c={version:I,requestId:s.requestId,claimId:n,claimedAt:r.toISOString()};if(ae(e,He(e,s.requestId),c).published){if(De(e,s.requestId)){je(e,s.requestId,n);continue}a.push(s)}}return{claimId:n,requests:a}}function ar(e,t,r=()=>new Date,n){let i=r().toISOString();for(let o of t.requests)Ge(e,{version:I,requestId:o.requestId,claimId:t.claimId,outcome:"completed",completedAt:i});n?.("after-completion"),kt(e,t),n?.("after-claim-release")}function kt(e,t){for(let r of t.requests)je(e,r.requestId,t.claimId)}function cr(e){let t=0;for(let r of b(m(e,x)))W(r,{force:!0}),t++;return t>0&&C(m(e,x)),Ne(e),t}function dr(e){let t=$e(e),r=new Map,n=Wt(m(e,F),se);for(let c of b(m(e,N))){let d=H(c);if(!d){n++;continue}r.set(d.requestId,d)}let i=new Set;for(let c of b(m(e,x))){let d=Me(c);if(!d){n++;continue}i.add(d.requestId)}let o=t.filter(c=>!r.has(c.requestId)&&!i.has(c.requestId)),a=[...r.values()].filter(c=>c.outcome==="completed").length,s=[...r.values()].filter(c=>c.outcome==="expired").length;return{pending:o.length,claimed:t.filter(c=>!r.has(c.requestId)&&i.has(c.requestId)).length,completed:a,expired:s,invalid:n,...o.length>0?{oldestPendingAt:o.map(c=>c.createdAt).reduce((c,d)=>xt(c,d))}:{}}}function lr(e,t={}){let r=(t.now?.()??new Date).getTime(),n=Math.max(0,t.retentionMs??wt),i=0;for(let o of b(m(e,N))){let a=H(o);!a||r-Date.parse(a.completedAt)<n||(W(o,{force:!0}),W(Fe(e,a.requestId),{force:!0}),i++)}return i>0&&(C(m(e,N)),C(m(e,F))),Ne(e),i}function se(e){return ce(e,t=>{let r=t;return r.version===I&&T(r.requestId)&&(r.idempotencyKey===void 0||typeof r.idempotencyKey=="string")&&P(r.createdAt)&&P(r.deadlineAt)&&Date.parse(r.deadlineAt)>=Date.parse(r.createdAt)&&typeof r.detail=="string"&&r.detail.length>0})}function Me(e){return ce(e,t=>{let r=t;return r.version===I&&T(r.requestId)&&T(r.claimId)&&P(r.claimedAt)})}function H(e){return ce(e,t=>{let r=t;return r.version===I&&T(r.requestId)&&(r.claimId===void 0||T(r.claimId))&&(r.outcome==="completed"||r.outcome==="expired")&&P(r.completedAt)})}function Ge(e,t){let r=Ve(e,t.requestId);if(ae(e,r,t).published)return;let n=H(r);if(!n||n.requestId!==t.requestId||n.outcome!==t.outcome)throw new Error(`Watch refresh completion ${t.requestId} conflicts with an existing record.`)}function ae(e,t,r,n){let i=m(e,Oe),o=bt(t),a=Y(i),s=Y(o),c=m(i,`${It(t)}.${process.pid}.${oe()}.tmp`);try{let d=G(c,r,{spacing:2,trailingNewline:!0});n?.("after-staged");try{St(c,t)}catch(u){if(u.code==="EEXIST")return{published:!1};throw u}let l=be(a,s,d.directorySync,C(o));return n?.("after-published"),{published:!0,achievedDurability:l==="synced"?"directory-durable":"file-flushed",directorySync:l}}finally{W(c,{force:!0})}}function $e(e){let t=[];for(let r of b(m(e,F))){let n=se(r);n&&t.push(n)}return t}function je(e,t,r){let n=He(e,t),i=Me(n);!i||i.claimId!==r||(W(n,{force:!0}),C(m(e,x)))}function Ne(e){for(let t of b(m(e,Oe),".tmp"))W(t,{force:!0})}function Wt(e,t){return b(e).filter(r=>!t(r)).length}function b(e,t=".json"){return vt(e)?Rt(e,{withFileTypes:!0}).filter(r=>r.isFile()&&r.name.endsWith(t)).map(r=>m(e,r.name)).sort():[]}function ce(e,t){try{let r=JSON.parse(v(e,"watch refresh request record"));return t(r)?r:null}catch{return null}}function Fe(e,t){return m(e,F,`${t}.json`)}function He(e,t){return m(e,x,`${t}.json`)}function Ve(e,t){return m(e,N,`${t}.json`)}function De(e,t){return H(Ve(e,t))!==null}function Et(e){if(e===void 0)return Ct;if(!Number.isFinite(e)||e<=0)throw new Error("Watch refresh request ttlMs must be positive.");return Math.floor(e)}function At(e){let t=e?.trim();return t?t.slice(0,512):void 0}function T(e){return typeof e=="string"&&/^[a-z0-9][a-z0-9-]{0,127}$/i.test(e)}function Pt(e,t){return Date.parse(e.createdAt)-Date.parse(t.createdAt)||e.requestId.localeCompare(t.requestId)}function xt(e,t){return Date.parse(t)<Date.parse(e)?t:e}var Be=5e3,Ot=6e3,Lt=1e3,le=10,Mt=new Set(["capabilities","check-deps","config-validate","continue","doctor","init","install-skills","reindex","setup","setup-agent","status","suppress","uninstall","watch"]);function xr(e){let t=e.classification;if(t.kind!=="live")return;let{state:r}=t;return r.watcher.state==="idle"&&r.lastError===void 0?r.indexGeneration:void 0}function Gt(e,t=process.env){return t.SCIP_QUERY_SKIP_WATCH_SERVICE!=="1"&&!e.startsWith("__")&&!Mt.has(e)}function Tr(e){let t=e.env??process.env;if(t.SCIP_QUERY_SKIP_WATCH_SERVICE==="1")return{kind:"skipped",reason:"environment"};if(!Gt(e.commandName,t))return{kind:"skipped",reason:"excluded-command"};if(e.config.watch?.enabled!==!0)return{kind:"skipped",reason:"disabled"};if(e.config.watch.autoStart===!1)return{kind:"skipped",reason:"auto-start-disabled"};try{let r=$t({projectRoot:e.projectRoot,cacheDir:e.cacheDir,cliVersion:e.cliVersion,gitContext:e.gitContext,runtime:e.runtime});return{kind:r.disposition,state:r.state}}catch(r){return{kind:"failed",message:r instanceof Error?r.message:String(r)}}}function Qe(e,t,r){let n=Q(z(e));if(r&&Q(r.projectRoot)===n)return{projectRoot:n,worktreeKind:"git",worktreeId:r.worktreeId,cliVersion:t};let i=Re(n);if(i.kind==="error")throw new Error(`Could not establish Git worktree identity for ${n}: ${i.message}`);return i.kind==="non-git"?{projectRoot:n,worktreeKind:"non-git",cliVersion:t}:{projectRoot:n,worktreeKind:"git",worktreeId:i.identity.worktreeId,cliVersion:t}}function qr(e){return U(e,Qe(e.projectRoot,e.cliVersion,e.gitContext))}function U(e,t){let r=e.runtime??fe,n=R(e.cacheDir),i=$(n.statePath),o=he(n.lockPath);return{identity:t,classification:jt(i,t,r.now(),r.isProcessAlive),lock:o,lockIsLive:o!==null&&r.isProcessAlive(o.pid),paths:n}}function $t(e){let t=e.runtime??fe,r=Qe(e.projectRoot,e.cliVersion,e.gitContext),n=U(e,r),i=ue("ensure",n.classification);if(i.kind==="reuse")return V(n.paths.activityPath,t),{disposition:"reused",state:i.state};if(i.kind==="refuse-replace")throw new Error(`scip-query watch service pid ${i.state.pid} is still alive but its heartbeat is old. Refusing automatic replacement because civil-clock age alone cannot authorize a process signal.`);if(i.kind==="replace")pe(i.state,e,t),q(n.paths,i.state.pid,t);else if(i.kind==="start"){if(n.lockIsLive){let s=ze(e,r,t,Math.min(e.startupTimeoutMs??1e3,1e3));if(s)return V(n.paths.activityPath,t),{disposition:"reused",state:s};throw new Error(`scip-query watch is already running for ${z(e.projectRoot)} (pid ${n.lock?.pid}; lock: ${n.paths.lockPath}) without compatible daemon state. Stop the foreground watcher before starting the service.`)}n.classification.kind==="stale"&&q(n.paths,n.classification.state.pid,t)}else throw new Error(`Unexpected ensure action: ${i.kind}`);if(n=U(e,r),i=ue("ensure",n.classification),i.kind==="reuse")return V(n.paths.activityPath,t),{disposition:"reused",state:i.state};if(i.kind==="refuse-replace")throw new Error(`scip-query watch service pid ${i.state.pid} remains alive with an old heartbeat; automatic replacement is not authorized.`);let o=e.serverPath??Dt(new URL("./watch-server.js",import.meta.url));t.spawnServer(o,r.projectRoot,e.cliVersion,e.watchOverrides??{});let a=ze(e,r,t,e.startupTimeoutMs??Be);if(!a)throw new Error(`scip-query watch service did not become ready within ${e.startupTimeoutMs??Be}ms.`);return V(n.paths.activityPath,t),{disposition:"started",state:a}}function Ye(e){let t=e.runtime??fe,r=R(e.cacheDir),n=$(r.statePath),i=n?Je(n,t)?{kind:"live",state:n}:{kind:"stale",state:n,reason:"dead-process"}:{kind:"stopped"},o=ue("stop",i);if(o.kind==="signal-stop")return pe(o.state,e,t),q(r,o.state.pid,t),{disposition:"stopped",pid:o.state.pid};if(o.kind==="clean-stale")return q(r,o.state.pid,t),{disposition:"stopped",pid:o.state.pid};let a=he(r.lockPath);return o.kind==="already-stopped"&&a?(Je(a,t)&&pe(a,e,t),q(r,a.pid,t),{disposition:"stopped",pid:a.pid}):{disposition:"already-stopped"}}function _r(e,t,r={}){let{durability:n="durable",...i}=r;n==="durable"?G(e,t,i):k(e,t,i)}function Xe(e,t=Date.now()){k(e,{version:1,at:new Date(t).toISOString()})}function Dr(e,t,r=Date.now(),n={}){Le(R(_t(e)).refreshRequestsPath,t,{...n,now:()=>new Date(r)}),Xe(e,r)}function Or(e){try{let t=JSON.parse(v(e,"watch activity record"));return t.version!==1||!j(t.at)||t.refreshRequestedAt!==void 0&&!j(t.refreshRequestedAt)||t.refreshDetail!==void 0&&typeof t.refreshDetail!="string"?null:{atMs:Date.parse(t.at),...t.refreshRequestedAt===void 0?{}:{refreshRequestedAtMs:Date.parse(t.refreshRequestedAt)},...t.refreshDetail===void 0?{}:{refreshDetail:t.refreshDetail}}}catch{return null}}function Lr(e,t,r={}){let n=r.pid??process.pid,i=r.isProcessAlive??S,o=()=>{},a=r.readProcessIdentity??X,s=r.now??(()=>new Date),c={...re,wallNow:()=>s().getTime(),isProcessAlive:i,readProcessIdentity:a},d=Ae(e,{kind:"watch",pid:n,processIdentity:a(n),detail:{projectRoot:z(t)},parseLegacy:B,runtime:c});if(d.kind==="contended"){let l=Ze(d.observation);return{acquired:!1,lockPath:e,message:Nt(e,t,l),release:o}}return{acquired:!0,lockPath:e,message:"",release:()=>{d.lock.release()}}}function he(e){return Ze(ne(e,{parseLegacy:B}))}var B=e=>{let t=et(e);return t?{pid:t.pid,...t.processIdentity?{processIdentity:t.processIdentity}:{}}:null};function Ze(e){if(e.state==="valid"&&e.record?.kind==="watch"){let t=e.record.detail?.projectRoot;return typeof t!="string"?null:{version:1,pid:e.record.pid,...e.record.processIdentity?{processIdentity:e.record.processIdentity}:{},projectRoot:t,startedAt:e.record.startedAt}}return et(e.parsed)}function et(e){try{let t=e;if(t.version!==1||typeof t.pid!="number"||!Number.isInteger(t.pid)||t.pid<=0||typeof t.projectRoot!="string"||!j(t.startedAt))return null;let r=t.processIdentity===void 0?null:We(t.processIdentity);return t.processIdentity!==void 0&&(!r||r.pid!==t.pid)?null:{version:1,pid:t.pid,...r?{processIdentity:r}:{},projectRoot:t.projectRoot,startedAt:t.startedAt}}catch{return null}}function jt(e,t,r,n){if(!e)return{kind:"stopped"};if(e.protocolVersion!==Z)return{kind:"incompatible",state:e,reason:"protocol"};if(e.projectRoot!==t.projectRoot)return{kind:"incompatible",state:e,reason:"project"};let i=t.worktreeKind==="git"?t.worktreeId:void 0;if(e.worktreeId!==i)return{kind:"incompatible",state:e,reason:"worktree"};if(e.cliVersion!==t.cliVersion)return{kind:"incompatible",state:e,reason:"cli-version"};if(!n(e.pid))return{kind:"stale",state:e,reason:"dead-process"};let o=Date.parse(e.heartbeatAt);return r-o>ee?{kind:"stale",state:e,reason:"old-heartbeat"}:{kind:"live",state:e}}function ue(e,t){switch(e){case"status":return{kind:"report",classification:t};case"ensure":switch(t.kind){case"stopped":return{kind:"start"};case"stale":return t.reason==="old-heartbeat"?{kind:"refuse-replace",state:t.state,reason:"old-heartbeat"}:{kind:"start"};case"live":return{kind:"reuse",state:t.state};case"incompatible":return{kind:"replace",state:t.state};default:return de(t)}case"stop":switch(t.kind){case"stopped":return{kind:"already-stopped"};case"stale":return t.reason==="old-heartbeat"?{kind:"signal-stop",state:t.state}:{kind:"clean-stale",state:t.state};case"live":case"incompatible":return{kind:"signal-stop",state:t.state};default:return de(t)}default:return de(e)}}function Mr(e){return e.idleTimeoutMs===0||e.watcher.state!=="idle"?!1:e.nowMs-e.lastActivityAtMs>=e.idleTimeoutMs}function ze(e,t,r,n){let i=r.monotonicNow??M,o=i()+n;for(;i()<=o;){let a=U(e,t).classification;if(a.kind==="live")return a.state;r.sleep(le)}return null}function pe(e,t,r){let{pid:n}=e;if(!r.isProcessAlive(n))return;Ke(e,r),r.signalProcess(n);let i=t.stopTimeoutMs??Ot,o=r.monotonicNow??M,a=o()+i;for(;o()<=a;){if(!r.isProcessAlive(n))return;r.sleep(le)}if(!r.forceSignalProcess)throw new Error(`scip-query watch service pid ${n} did not stop within ${i}ms and forced termination is unavailable.`);Ke(e,r),r.forceSignalProcess(n);let s=t.forceStopTimeoutMs??Lt,c=o()+s;for(;o()<=c;){if(!r.isProcessAlive(n))return;let d=r.readProcessIdentity(n);if(e.processIdentity&&d&&!L(e.processIdentity,d))return;r.sleep(le)}throw new Error(`scip-query watch service pid ${n} remained alive ${s}ms after forced termination.`)}function q(e,t,r){if(Ue(e.statePath,{force:!0}),Ue(e.activityPath,{force:!0}),he(e.lockPath)?.pid===t){let i={...re,wallNow:r.now,isProcessAlive:r.isProcessAlive,readProcessIdentity:r.readProcessIdentity},o=ne(e.lockPath,{parseLegacy:B,runtime:i});Pe(e.lockPath,o,{parseLegacy:B,runtime:i})}}function Je(e,t){if(!t.isProcessAlive(e.pid))return!1;if(!e.processIdentity)return!0;let r=t.readProcessIdentity(e.pid);return r===null||L(e.processIdentity,r)}function Nt(e,t,r){return`error: scip-query watch is already running for ${z(t)}${r?` (pid ${r.pid}, started ${r.startedAt}; lock: ${e})`:` (lock: ${e})`}. Stop that watcher before starting another.`}function V(e,t){try{(t.recordActivity??Xe)(e,t.now())}catch(r){let n=Ft(r);if(n!=="EPERM"&&n!=="EACCES"&&n!=="EROFS")throw r}}function Ft(e){return e.code}var fe={now:Date.now,monotonicNow:M,isProcessAlive:S,readProcessIdentity:X,spawnServer(e,t,r,n){if(!qt(e))throw new Error(`Watch service helper was not found at ${e}. Run npm run build first.`);Tt(process.execPath,[e,t,r,JSON.stringify(n)],{detached:!0,stdio:"ignore",env:{...process.env,SCIP_QUERY_SKIP_WATCH_SERVICE:"1"}}).unref()},signalProcess(e){process.kill(e,"SIGTERM")},forceSignalProcess(e){process.kill(e,"SIGKILL")},sleep(e){let t=new Int32Array(new SharedArrayBuffer(4));Atomics.wait(t,0,0,e)}};function Ke(e,t){if(!e.processIdentity)throw new Error(`Refusing to signal scip-query watch pid ${e.pid}: its ownership record has no process identity.`);let r=t.readProcessIdentity(e.pid);if(!r)throw new Error(`Refusing to signal scip-query watch pid ${e.pid}: its process identity is unavailable.`);if(!L(e.processIdentity,r))throw new Error(`Refusing to signal scip-query watch pid ${e.pid}: its process identity does not match the ownership record.`)}function de(e){throw new Error(`Unhandled watch service value: ${JSON.stringify(e)}`)}import{existsSync as J,lstatSync as _,readdirSync as nt,realpathSync as tt,rmSync as E,statSync as it}from"fs";import{join as p,resolve as D,sep as ot}from"path";var Ht=3600*1e3,Vt=2*1024*1024*1024,st=300*1e3,Ut="gc-state.json",Bt="gc.lock";function zt(e){let t=e.leases.filter(s=>s.managed&&!s.live&&!s.busy),r=at(e.leases,e.locks),n={};for(let s of e.generations)r.has(s.generationId)||(n[s.generationId]=s.unreferencedAt??e.nowMs);let i=e.generations.filter(s=>!r.has(s.generationId)).sort((s,c)=>n[s.generationId]-n[c.generationId]||s.generationId.localeCompare(c.generationId)),o=new Set;for(let s of i)e.nowMs-n[s.generationId]>=e.policy.generationTtlMs&&o.add(s.generationId);let a=e.generations.filter(s=>!o.has(s.generationId)).reduce((s,c)=>s+c.size,0);for(let s of i){if(a<=e.policy.budgetBytes)break;o.has(s.generationId)||(o.add(s.generationId),a-=s.size)}for(let s of o)delete n[s];return{deleteWorktrees:t,deleteGenerations:e.generations.filter(s=>o.has(s.generationId)),deleteLocks:e.locks.filter(s=>!s.live),deleteTemporaries:e.temporaries.filter(s=>!s.live),protectedGenerationIds:[...r].sort(),unreferencedSince:n}}function at(e,t){let r=new Set(e.filter(n=>n.managed&&(n.live||n.busy)).flatMap(n=>[n.lease.baseGenerationId,n.lease.activeGenerationId]).filter(n=>n!==void 0));for(let n of t)n.live&&r.add(n.generationId);return r}function Xr(e,t,r={}){if(!we())return{kind:"disabled"};let n=r.repositoryId===void 0?K(e)?.repositoryId:r.repositoryId;if(!n)return{kind:"unavailable"};let i=p(w(),"repositories",n),o=(r.now??Date.now)(),a=J(i)?ct(e,i,n,t,o,r):{kind:"unavailable"};return Jt(e,n,t,o,r),a}function ct(e,t,r,n,i,o){let a=p(t,"gc-state.json"),s=lt(a);if(!o.force&&s&&i-Date.parse(s.lastSweepAt)<st)return{kind:"throttled",sweptAt:s.lastSweepAt};let c=xe(t,{now:()=>i});if(!c)return{kind:"busy"};try{let d=dt(e,t,r,s?.unreferencedSince??{}),l=zt({nowMs:i,...d,policy:{generationTtlMs:o.policy?.generationTtlMs??Ht,budgetBytes:o.policy?.budgetBytes??Vt}}),u=0,f=0;for(let h of l.deleteWorktrees){if(!ge(h.lease))continue;if(!J(h.lease.localCacheDir)){E(h.leasePath,{force:!0}),f+=1;continue}if(!Qt(h.lease))continue;let Se=ie(p(h.lease.localCacheDir,"cache-lifecycle.lock"));if(Se)try{if(me(h.lease,!0))continue;try{Ye({projectRoot:h.lease.projectRoot,cacheDir:h.lease.localCacheDir,cliVersion:n})}catch{continue}if(me(h.lease,!0))continue;E(h.lease.localCacheDir,{recursive:!0,force:!0}),E(h.leasePath,{force:!0}),f+=1}finally{Se.release()}}for(let h of l.deleteLocks)E(h.path,{force:!0});for(let h of l.deleteTemporaries)E(h.path,{recursive:!0,force:!0});for(let h of l.deleteGenerations)E(h.path,{recursive:!0,force:!0}),u+=h.size;ke(p(t,"evidence.db"));let g={kind:"swept",sweptAt:new Date(i).toISOString(),deletedWorktrees:f,deletedGenerations:l.deleteGenerations.length,deletedBytes:u,protectedGenerations:l.protectedGenerationIds.length},y={version:1,lastSweepAt:g.sweptAt,unreferencedSince:l.unreferencedSince,lastResult:g};return k(a,y,{spacing:2,trailingNewline:!0}),g}catch(d){return{kind:"failed",error:d instanceof Error?d.message:String(d)}}finally{c.release()}}function Jt(e,t,r,n,i){let o=p(w(),"repositories");if(!J(o))return;let a=p(o,Ut),s=Xt(a);if(!i.force&&s!==void 0&&n-s<st)return;let c=ie(p(o,Bt));if(c)try{for(let d of O(o)){if(d===t||!/^[a-f0-9]{24}$/.test(d))continue;let l=p(o,d),u;try{u=_(l)}catch{continue}if(!u.isDirectory()||u.isSymbolicLink())continue;let f=Yt(l)??e;ct(f,l,d,r,n,i)}k(a,{version:1,lastSweepAt:new Date(n).toISOString()},{spacing:2,trailingNewline:!0})}finally{c.release()}}function Zr(e,t,r){let n=Te(e,r.dbPath,t);if(n)return{state:"bypassed",reason:n,localCacheDir:r.cacheDir,generations:0,generationBytes:0,protectedGenerations:0,unreferencedGenerations:0,unreferencedBytes:0,temporaryGenerations:0,sharedEvidence:{exists:!1,bytes:0}};let i=K(e);if(!i)return{state:"unavailable",reason:"Git worktree identity is unavailable",localCacheDir:r.cacheDir,generations:0,generationBytes:0,protectedGenerations:0,unreferencedGenerations:0,unreferencedBytes:0,temporaryGenerations:0,sharedEvidence:{exists:!1,bytes:0}};let o=p(w(),"repositories",i.repositoryId),a=ve(p(o,"worktrees",`${i.worktreeId}.json`)),s=lt(p(o,"gc-state.json")),c=dt(e,o,i.repositoryId,s?.unreferencedSince??{}),d=at(c.leases,c.locks),l=c.generations.filter(y=>!d.has(y.generationId)),u=c.generations.reduce((y,h)=>y+h.size,0),f=qe(e,t),g=0;return f&&(g=Kt(f)),{state:"managed",repositoryId:i.repositoryId,worktreeId:i.worktreeId,localCacheDir:r.cacheDir,...a?{baseGenerationId:a.baseGenerationId,activeGenerationId:a.activeGenerationId,lastAction:a.lastAction,reason:a.lastReason,lastSeenAt:a.lastSeenAt}:{},generations:c.generations.length,generationBytes:u,protectedGenerations:c.generations.filter(y=>d.has(y.generationId)).length,unreferencedGenerations:l.length,unreferencedBytes:l.reduce((y,h)=>y+h.size,0),temporaryGenerations:c.temporaries.length,sharedEvidence:{path:f,exists:g>0,bytes:g},cleanup:s?.lastResult}}function Kt(e){return[e,`${e}-wal`,`${e}-shm`].reduce((t,r)=>{try{return t+it(r).size}catch{return t}},0)}function dt(e,t,r,n){let i=new Set(Ie(e).map(d=>D(d.path))),o=[];for(let d of O(p(t,"worktrees"))){if(!d.endsWith(".json"))continue;let l=p(t,"worktrees",d),u=ve(l);if(!u)continue;let f=D(u.projectRoot);o.push({leasePath:l,lease:u,managed:u.repositoryId===r&&ge(u),live:i.has(f)||J(f),busy:me(u)})}let a=[];for(let d of O(p(t,"locks"))){let l=/^([a-f0-9]{64})\.lock$/.exec(d);if(!l)continue;let u=p(t,"locks",d),f=ye(u),g=f!==void 0&&S(f),y=l[1];a.push({generationId:y,path:u,live:g})}let s=[],c=[];for(let d of O(p(t,"generations"))){let l=/^\.tmp-(\d+)-/.exec(d);if(l){let g=p(t,"generations",d),y=Number(l[1]);try{c.push({path:g,size:rt(g),live:Number.isSafeInteger(y)&&S(y)})}catch{}continue}if(!/^[a-f0-9]{64}$/.test(d))continue;let u=p(t,"generations",d),f;try{f=_(u)}catch{continue}!f.isDirectory()||f.isSymbolicLink()||s.push({generationId:d,path:u,size:rt(u),...n[d]===void 0?{}:{unreferencedAt:n[d]}})}return{leases:o,generations:s,locks:a,temporaries:c}}function ge(e){if(e.ownershipChecksum!==_e(e)||A(e.localCacheDir)!==A(Ce(e.projectRoot)))return!1;let t=A(p(w(),"projects"));return A(e.localCacheDir).startsWith(`${t}${ot}`)}function Qt(e){if(!ge(e))return!1;let t=D(w()),r=D(p(t,"projects")),n=D(e.localCacheDir);try{let i=_(t),o=_(r),a=_(n);if(!i.isDirectory()||i.isSymbolicLink()||!o.isDirectory()||o.isSymbolicLink()||!a.isDirectory()||a.isSymbolicLink())return!1;let s=tt(r);return tt(n).startsWith(`${s}${ot}`)}catch{return!1}}function Yt(e){for(let t of O(p(e,"worktrees"))){if(!t.endsWith(".json"))continue;let r=ve(p(e,"worktrees",t));if(r)return r.projectRoot}}function me(e,t=!1){for(let n of t?["index.lock"]:["index.lock","cache-lifecycle.lock"]){let i=ye(p(e.localCacheDir,n));if(i!==void 0&&S(i))return!0}let r=ye(R(e.localCacheDir).lockPath);return r!==void 0&&S(r)}function ve(e){try{let t=JSON.parse(v(e,"worktree cache lease"));return t.version!==1||typeof t.repositoryId!="string"||typeof t.worktreeId!="string"||typeof t.projectRoot!="string"||t.treeOid!==void 0&&typeof t.treeOid!="string"||typeof t.localCacheDir!="string"||t.baseGenerationId!==void 0&&typeof t.baseGenerationId!="string"||t.activeGenerationId!==void 0&&typeof t.activeGenerationId!="string"||typeof t.ownershipChecksum!="string"||!/^[a-f0-9]{64}$/.test(t.ownershipChecksum)||typeof t.lastAction!="string"||t.lastReason!==void 0&&typeof t.lastReason!="string"||typeof t.lastSeenAt!="string"?null:t}catch{return null}}function ye(e){try{let t=JSON.parse(v(e,"watch lock record"));return typeof t.pid=="number"&&Number.isSafeInteger(t.pid)&&t.pid>0?t.pid:void 0}catch{return}}function lt(e){try{let t=JSON.parse(v(e,"repository cache GC state"));return t.version!==1||typeof t.lastSweepAt!="string"||!Number.isFinite(Date.parse(t.lastSweepAt))||!t.unreferencedSince||typeof t.unreferencedSince!="object"||!t.lastResult?null:t}catch{return null}}function Xt(e){try{let t=JSON.parse(v(e,"global repository cache GC state"));if(t.version!==1||typeof t.lastSweepAt!="string")return;let r=Date.parse(t.lastSweepAt);return Number.isFinite(r)?r:void 0}catch{return}}function O(e){try{return nt(e)}catch{return[]}}function rt(e){let t=0,r=[e];for(;r.length>0;){let n=r.pop();for(let i of nt(n,{withFileTypes:!0})){let o=p(n,i.name);i.isDirectory()?r.push(o):i.isFile()&&(t+=it(o).size)}}return t}var ut=[{question:"Who can call or reach this?",family:"execution",direction:"incoming"},{question:"What can this call or reach?",family:"execution",direction:"outgoing"},{question:"Where can this value come from?",family:"dataflow",direction:"incoming"},{question:"Where can this value go?",family:"dataflow",direction:"outgoing"},{question:"Which producer and consumer rendezvous?",family:"runtime",direction:"both"},{question:"What resource is observed or changed?",family:"state",direction:"both"},{question:"What occurs before or after this?",family:"temporal",direction:"both"},{question:"What interface constrains this?",family:"contract",direction:"both"},{question:"Are these observations the same entity?",family:"identity",direction:"both"},{question:"What contains or owns this?",family:"ownership",direction:"both"},{question:"What does this statically rely on?",family:"dependencies",direction:"outgoing"}],pt={execution:{establishes:"Static may-call reachability between resolved program constructs.",nonClaims:["A may-call edge does not prove that a runtime invocation occurred."]},runtime:{establishes:"A source-grounded handoff between producer and consumer participants through a runtime mechanism.",nonClaims:["An unresolved or candidate join does not prove a runtime handoff."]},dataflow:{establishes:"A value, definition, argument, parameter, return, or statically resolved value may flow to another construct.",nonClaims:["Current partial providers do not establish general interprocedural definition-use coverage."]},state:{establishes:"A construct reads, writes, creates, deletes, or otherwise changes an identified state resource.",nonClaims:["A state edge does not prove transactionality, durability, or exclusive ownership unless qualified."]},temporal:{establishes:"One observed construct is locally ordered before or after another under the reported source evidence.",nonClaims:["Source order does not imply cross-process happens-before or durability."]},contract:{establishes:"A program construct implements, constrains, or is typed by an identified contract.",nonClaims:["Contract identity does not prove runtime invocation or conformance outside reported checks."]},identity:{establishes:"Two observations refer to the same compiler-owned or source-owned program entity.",nonClaims:["Shared identity does not establish execution or value transfer."]},ownership:{establishes:"A source construct, symbol, runtime observation, or state resource is contained or owned by another program entity.",nonClaims:["Structural ownership does not establish lifetime, singleton scope, or runtime execution unless qualified."]},dependencies:{establishes:"A file, module, or symbol statically relies on another indexed entity.",nonClaims:["A dependency edge does not establish that the depended-on code executes."]}};function ht(e){return te.flatMap(t=>t.relations.filter(r=>r.family===e).map(r=>({...r,providerId:t.id,providerLabel:t.label})))}function ft(e){return[...new Set(te.filter(t=>t.relations.some(r=>r.family===e)).map(t=>t.label))]}var nn=Ee.map(e=>({family:e,...pt[e],providers:ft(e),relations:ht(e)}));function mt(e){return{family:e,...pt[e],providers:ft(e),relations:ht(e)}}var an=["search","outline","entrypoints","evidence","inspect","code"];function cn(){return ut.map(e=>{let t=mt(e.family);return{...e,establishes:t.establishes,evidenceStrengths:yt(t.relations.flatMap(r=>r.evidenceStrengths)),supportCeilings:yt(t.relations.map(r=>r.supportCeiling)),nonClaim:t.nonClaims.join(" ")}})}function yt(e){return[...new Set(e)]}export{nn as a,Le as b,sr as c,ar as d,kt as e,cr as f,dr as g,lr as h,xr as i,Gt as j,Tr as k,Qe as l,qr as m,$t as n,Ye as o,_r as p,Dr as q,Or as r,Lr as s,he as t,Mr as u,st as v,Xr as w,Zr as x,an as y,cn as z};
|
|
3
|
-
//# sourceMappingURL=chunk-U2FPY5XA.js.map
|
package/dist/chunk-U3SXIMII.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import{c as ee,d as P,e as ne,f as te,n as oe}from"./chunk-SKKXTABJ.js";import{a as X}from"./chunk-BOW7SSQH.js";import{d as re,e as ie}from"./chunk-MTDBHTSF.js";import{B as Z,C as q,e as w,i as V,v as N,w as _}from"./chunk-C7C6AKAT.js";import{A as Q,n as A,t as F,y as z}from"./chunk-RBAD4GJ2.js";import{A as k}from"./chunk-ZLMXIQLC.js";import{c as Y,d as R}from"./chunk-KNLQGXVH.js";import{E as U,H as J,d as T}from"./chunk-JZ2A7LDM.js";import{existsSync as Me}from"fs";import{SymbolRole as Oe}from"@c4312/scip";import{deserializeSCIP as ge}from"@c4312/scip";function ce(n,e){return ge(J(n,{inputKind:e,maxBytes:U}))}import{fromBinary as ye}from"@bufbuild/protobuf";import{DocumentSchema as Se,SymbolRole as j}from"@c4312/scip";import{zstdDecompressSync as Ce}from"zlib";var he=Y("scip-chunk-occurrence-targets",{clearGroups:["whole-project","definition-catalog","source-file"],maxEntries:256}),Le=R("scip-chunk-occurrence-definitions",{clearGroups:["whole-project","definition-catalog"]}),le=1,Ee=R("scip-chunk-occurrence-data-present",{clearGroups:["whole-project"]});function B(n){return Ee.get(n,()=>{let e=n.get("SELECT length(occurrences) AS size FROM chunks LIMIT 1");return e!==void 0&&(e.size??0)>le})}function ae(n,e){return he.get(n,e,()=>Ie(n,e))}function K(n,e){return`${n}\0${e}`}function Ie(n,e){let t=n.get("SELECT id FROM documents WHERE relative_path = ?",e);if(!t)return{available:!1,reason:"no-document"};let r=n.all("SELECT occurrences FROM chunks WHERE document_id = ? ORDER BY chunk_index",t.id);if(r.length===0)return B(n)?{available:!0,targets:[],externalLeafKeys:new Set,locals:[]}:{available:!1,reason:"no-occurrence-data"};let i=Le.get(n,()=>new Map(_(n).map(u=>[u.symbol,u]))),c=[],a=new Set,s=[];try{for(let u of r){let d=u.occurrences;if(!d||d.length<=le)return{available:!1,reason:"no-occurrence-data"};let l=ye(Se,new Uint8Array(Ce(d)));for(let m of l.occurrences){if(!m.symbol)continue;let b=m.range[0];if(!Number.isInteger(b))continue;if(m.symbol.startsWith("local ")){s.push(Re(m.symbol,m.range,m.symbolRoles));continue}if((m.symbolRoles&j.Definition)!==0)continue;let o=i.get(m.symbol);if(o){c.push({sourceLine:b,definition:o});continue}let f=_e(m.symbol);f&&a.add(K(b,f))}}}catch{return{available:!1,reason:"no-occurrence-data"}}return{available:!0,targets:c,externalLeafKeys:a,locals:s}}function Re(n,e,t){let r=e.length===4;return{symbol:n,line:e[0],startChar:e[1]??0,endLine:r?e[2]:e[0],endChar:r?e[3]??0:e[2]??0,definition:(t&j.Definition)!==0,write:(t&j.WriteAccess)!==0}}function _e(n){if(n.startsWith("local "))return null;try{let e=w(n);return e.length>0?e:null}catch{return null}}var $=new WeakMap;function M(n,e){let t=ae(n,e);if(t.available)return{targets:t.targets,externalLeafKeys:t.externalLeafKeys,locals:t.locals};if(t.reason==="no-document")return null;if(B(n))return{targets:[],externalLeafKeys:new Set,locals:[]};let r=ve(n);return r?{targets:r.byFile.get(e)??[],externalLeafKeys:new Set,locals:[]}:null}function mn(n,e,t,r){let i=A(n,e),c=(i?.callSites??[]).filter(o=>o.line>=t&&o.line<=r);if(!i||c.length===0)return{available:!!i,targets:[],resolvedCallsites:0,unresolvedCallsites:0};let a=M(n,e);if(!a)return{available:!1,targets:[],resolvedCallsites:0,unresolvedCallsites:c.length};let s=a.targets.filter(o=>o.sourceLine>=t&&o.sourceLine<=r).map(o=>({...o,calleeLeaf:o.definition.leaf})),u=se(c.map(o=>({line:o.line,leaf:o.calleeLeaf}))),d=se(s.map(o=>({line:o.sourceLine,leaf:o.calleeLeaf}))),l=new Set([...u].flatMap(([o,f])=>d.get(o)===f?[o]:[])),m=s.filter(o=>l.has(ue(o.sourceLine,o.calleeLeaf))),b=[...l].reduce((o,f)=>o+(u.get(f)??0),0);return{available:!0,targets:m,resolvedCallsites:b,unresolvedCallsites:Math.max(0,c.length-b)}}function fn(n,e,t,r){let i=M(n,e);return i?{available:!0,targets:i.targets.filter(c=>c.sourceLine>=t&&c.sourceLine<=r)}:{available:!1,targets:[]}}function dn(n,e,t,r){let i=M(n,e);return i?{available:!0,targets:i.targets.filter(c=>c.sourceLine>=t&&c.sourceLine<=r&&xe(n,c.definition)).map(c=>({...c,calleeLeaf:c.definition.leaf}))}:{available:!1,targets:[]}}function ve(n){if($.has(n))return $.get(n)??null;let e=we(n);return $.set(n,e),e}function we(n){if(!n.generation.indexPath||!Me(n.generation.indexPath))return null;try{let e=_(n),t=new Map(e.map(c=>[c.symbol,c])),r=ce(n.generation.indexPath,"SCIP source-range call-target index"),i=new Map;for(let c of r.documents??[]){let a=c.relativePath;if(!a||n.isIgnored(a))continue;let s=[];for(let u of c.occurrences??[]){if(!u.symbol||(u.symbolRoles&Oe.Definition)!==0)continue;let d=t.get(u.symbol),l=u.range?.[0];!d||!Number.isInteger(l)||s.push({sourceLine:l,definition:d})}i.set(a,s)}return{byFile:i}}catch{return null}}function xe(n,e){if(!e.isFunctionLike)return!1;let t=A(n,e.relativePath);return!t||t.callables.some(r=>r.name===e.leaf&&r.startLine===e.startLine&&r.endLine===e.endLine)?!0:De(e)}function De(n){let e=n.documentation;if(!e)return!1;let t=n.leaf.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&");return new RegExp(`\\bfunction\\s+${t}\\s*(?:<[^>]*>)?\\s*\\(`,"u").test(e)||new RegExp(`\\b(?:const|let|var)\\s+${t}\\s*:\\s*(?:<[^>]*>\\s*)?\\([^\\n]*\\)\\s*=>`,"u").test(e)}function se(n){let e=new Map;for(let t of n){let r=ue(t.line,t.leaf);e.set(r,(e.get(r)??0)+1)}return e}function ue(n,e){return`${n}\0${e}`}function vn(n,e,t={}){let r=fe(n,[e],{additive:t.additive,semantic:t.semantic,semanticEvidence:t.semanticEvidence}),i=t.callableOnly?(r.get(e.symbolId)??[]).filter(c=>V(c.symbol)||c.source==="ast-callsite"||c.source==="scip-occurrence"):r.get(e.symbolId)??[];return typeof t.limit=="number"?i.slice(0,t.limit):i}function wn(n,e,t){return Te(n,[e],t).get(e.symbolId)??[]}function Te(n,e,t){let r=Ne(n)?je(n,e,{semantic:t.semantic!==!1,semanticEvidence:t.semanticEvidence}):Pe(n,t.semanticEvidence);return typeof t.limit!="number"?new Map(e.map(i=>[i.symbolId,r.get(i.symbolId)??[]])):new Map(e.map(i=>[i.symbolId,(r.get(i.symbolId)??[]).slice(0,t.limit)]))}var ke=R("caller-rows",{clearGroups:["whole-project"]}),Ae=R("targeted-caller-strategy",{clearGroups:["whole-project"]}),Fe=2e4;function Ne(n){return Ae.get(n,()=>(n.get("SELECT COUNT(*) AS count FROM global_symbols")?.count??0)>Fe)}function Pe(n,e){return ke.get(n,()=>{let t=_(n),r=fe(n,t,{semanticEvidence:e}),i=new Map;for(let s of t)i.set(s.symbol,s.symbolId);let c=new Map,a=new Map;for(let s of t){let u=r.get(s.symbolId);if(!(!u||u.length===0))for(let d of u){let l=i.get(d.symbol);if(l===void 0||l===s.symbolId)continue;let m=c.get(l);m||(m=[],c.set(l,m),a.set(l,new Set));let b=`${s.symbol}|${s.relativePath}`;a.get(l).has(b)||(a.get(l).add(b),m.push({symbol:s.symbol,file:s.relativePath,source:"caller-map-inversion",callEvidence:d.source}))}}return c})}function je(n,e,t){let r=t.semantic&&t.semanticEvidence?e.flatMap(o=>{let f=Be(n,o);return f?[f]:[]}):[],i=new Map(r.map(o=>[o.symbolId,o])),c=t.semanticEvidence?.referenceMap(n,r)??new Map,a=oe(n,e),s=new Set(e.map(o=>o.symbol)),d=[...new Set(e.flatMap(o=>X(n,"reverse",[o.relativePath])))].flatMap(o=>N(n,o)),l=new Map,m=de(n,d);for(let o of d)for(let f of m.get(o.symbolId)??[]){if(!s.has(f.symbol))continue;let S=l.get(f.symbol)??[];S.push({symbol:o.symbol,file:o.relativePath,source:"caller-map-inversion",callEvidence:f.source}),l.set(f.symbol,S)}let b=new Map;for(let o of e){let f=[],S=new Set,C=p=>{if(p.symbol===o.symbol)return;let h=`${p.symbol}|${p.file}`;S.has(h)||(S.add(h),f.push(p))};for(let p of l.get(o.symbol)??[])C(p);for(let p of a.get(o.symbolId)??[])p.file!==o.relativePath&&C({symbol:p.enclosingSymbol??p.file,file:p.file,source:"resolved-reference"});let O=i.get(o.symbolId);if(O)for(let p of c.get(O.symbolId)??[]){if(p.file===o.relativePath||n.isIgnored(p.file))continue;let h=q(N(n,p.file),p.line);C({symbol:h?.symbol??p.file,file:p.file,source:"semantic-reference"})}b.set(o.symbolId,f)}return b}function Be(n,e){let t=re().join(", "),r=ie().join(", ");return n.get(`SELECT
|
|
2
|
-
d.id AS documentId,
|
|
3
|
-
gs.id AS symbolId,
|
|
4
|
-
gs.symbol,
|
|
5
|
-
d.relative_path AS relativePath,
|
|
6
|
-
COALESCE(der.start_line, c.start_line) AS startLine,
|
|
7
|
-
COALESCE(der.end_line, c.end_line) AS endLine,
|
|
8
|
-
COALESCE(gs.display_name, '') AS leaf,
|
|
9
|
-
NULL AS parentTypeName,
|
|
10
|
-
CASE WHEN gs.kind IN (${t}) OR gs.symbol LIKE '%().' THEN 1 ELSE 0 END AS isFunctionLike,
|
|
11
|
-
CASE WHEN gs.kind IN (${r}) THEN 1 ELSE 0 END AS isTypeLike,
|
|
12
|
-
gs.kind AS kind,
|
|
13
|
-
gs.documentation AS documentation,
|
|
14
|
-
gs.enclosing_symbol AS enclosingSymbol
|
|
15
|
-
FROM global_symbols gs
|
|
16
|
-
LEFT JOIN defn_enclosing_ranges der ON der.symbol_id = gs.id
|
|
17
|
-
LEFT JOIN chunks c ON c.document_id = der.document_id
|
|
18
|
-
JOIN documents d ON d.id = COALESCE(der.document_id, c.document_id)
|
|
19
|
-
WHERE gs.id = ?
|
|
20
|
-
LIMIT 1`,e.symbolId)??null}function fe(n,e,t={}){if(e.length===0)return new Map;let r=t.additive??!1,i=[],c=[];for(let l of e)k(l.relativePath)&&F(n,l.relativePath)!==null?i.push(l):c.push(l);let a=new Map,s=new Map,u=l=>{for(let[m,b]of l){let o=a.get(m);o||(o=[],a.set(m,o));let f=s.get(m);f||(f=new Set,s.set(m,f));for(let S of b){let C=`${S.symbol}|${S.chunkId}`;f.has(C)||(f.add(C),o.push(S))}}};i.length>0&&u(de(n,i)),t.semantic!==!1&&t.semanticEvidence&&u(Ye(t.semanticEvidence.calleeMap(n,e)));let d=r?e:c;return d.length>0&&u(Ue(n,d)),a}function de(n,e){let t=new Map,r=He(e,t),i=te(n);for(let[c,a]of r){let s=F(n,c);if(!s)continue;let u=Z(a),d=Ke(M(n,c));for(let l of s){let m=u.get(l.line);if(!m)continue;let b=d?$e(d,l):null,o=b??(d?.externalLeafKeys.has(K(l.line,l.calleeLeaf))?null:We(n,c,i,l));o&&o.symbol!==m.symbol&&t.get(m.symbolId).push({symbol:o.symbol,file:o.file,chunkId:l.line,source:b?"scip-occurrence":"ast-callsite",callsiteLine:l.line,...l.kind==="jsx-render"?{kind:"jsx-render"}:{}})}}return t}function Ke(n){if(!n)return null;let e=new Map;for(let t of n.targets){let r=e.get(t.sourceLine);r?r.push(t.definition):e.set(t.sourceLine,[t.definition])}return{targetsByLine:e,externalLeafKeys:n.externalLeafKeys}}function $e(n,e){let t=n.targetsByLine.get(e.line);if(!t)return null;let r=null;for(let i of t)if(i.leaf===e.calleeLeaf){if(r&&r.symbol!==i.symbol)return null;r=i}return r?{symbol:r.symbol,file:r.relativePath}:null}function He(n,e){let t=new Map;for(let r of n){let i=t.get(r.relativePath);i?i.push(r):t.set(r.relativePath,[r]),e.set(r.symbolId,[])}for(let r of t.values())r.sort((i,c)=>i.endLine-i.startLine-(c.endLine-c.startLine));return t}function We(n,e,t,r){let i=Q(n,e,r.calleeLeaf);if(i){let s=P(e,t.get(i.importedName)??[]).filter(u=>T(i.sourcePath,u.file));return s.length===1?s[0]:null}let c=P(e,t.get(r.calleeLeaf)??[]);if(c.length===0)return null;let a=Ge(n,e,c,r.calleeQualifier);return a||ne(n,e,c,r.memberAccess,r.calleeQualifier)}function Ge(n,e,t,r){if(!r||k(e)!=="clojure")return null;let c=z(n,e).filter(a=>a.kind==="namespace"&&a.localName===r&&a.sourcePath).map(a=>a.sourcePath);for(let a of c){let s=t.find(u=>T(a,u.file));if(s)return s}return t.find(a=>/`([^`]+)`\//.exec(a.symbol)?.[1]===r)??null}function Ue(n,e){if(e.length===0)return new Map;let r=H(e.map(o=>o.documentId)).flatMap(o=>n.all(`SELECT c.document_id, c.id AS chunk_id, c.start_line, c.end_line, m.symbol_id
|
|
21
|
-
FROM mentions m
|
|
22
|
-
JOIN chunks c ON m.chunk_id = c.id
|
|
23
|
-
WHERE m.role != 1
|
|
24
|
-
AND c.document_id IN (${o.map(()=>"?").join(",")})`,...o)),i=new Map;for(let o of r)i.has(o.document_id)||i.set(o.document_id,[]),i.get(o.document_id).push(o);let a=H(r.map(o=>o.symbol_id)).flatMap(o=>n.all(`SELECT gs.id AS symbol_id, gs.symbol,
|
|
25
|
-
COALESCE(der.document_id, def_chunk.document_id) AS document_id
|
|
26
|
-
FROM global_symbols gs
|
|
27
|
-
LEFT JOIN defn_enclosing_ranges der ON der.symbol_id = gs.id
|
|
28
|
-
LEFT JOIN (
|
|
29
|
-
SELECT m.symbol_id, MIN(c.document_id) AS document_id
|
|
30
|
-
FROM mentions m
|
|
31
|
-
JOIN chunks c ON m.chunk_id = c.id
|
|
32
|
-
WHERE m.role = 1
|
|
33
|
-
AND m.symbol_id IN (${o.map(()=>"?").join(",")})
|
|
34
|
-
GROUP BY m.symbol_id
|
|
35
|
-
) def_chunk ON def_chunk.symbol_id = gs.id
|
|
36
|
-
WHERE gs.id IN (${o.map(()=>"?").join(",")})`,...o,...o)),s=H([...e.map(o=>o.documentId),...a.flatMap(o=>o.document_id===null?[]:[o.document_id])]),u=new Map(s.flatMap(o=>n.all(`SELECT id, relative_path FROM documents
|
|
37
|
-
WHERE id IN (${o.map(()=>"?").join(",")})`,...o).map(f=>[f.id,f.relative_path]))),d=new Map;for(let o of a)d.has(o.symbol_id)||d.set(o.symbol_id,{symbol:o.symbol,file:o.document_id!==null?u.get(o.document_id)??"":""});let l=new Map,m=u,b=Je(e);for(let[o,f]of b){let C=[...i.get(o)??[]].sort((g,L)=>g.start_line-L.start_line||g.end_line-L.end_line),O=[...f].sort((g,L)=>g.startLine-L.startLine||g.endLine-L.endLine),p=new Set,h=0;for(let g of O){for(;h<C.length&&C[h].start_line<=g.endLine;)p.add(C[h]),h+=1;for(let y of p)y.end_line<g.startLine&&p.delete(y);let L=new Set,W=[],x=null,pe=()=>{if(x)return x;let y=m.get(g.documentId)??"",E=new Set;if(y){let D=ee(n,y),v=Math.max(0,g.startLine),G=Math.min(D.length-1,g.endLine);for(let I=v;I<=G;I+=1)for(let be of D[I])E.add(be)}return x=E,E};for(let y of p){if(y.symbol_id===g.symbolId)continue;let E=d.get(y.symbol_id);if(!E)continue;if(!(y.start_line>=g.startLine&&y.end_line<=g.endLine)){if(!(y.start_line<=g.endLine&&y.end_line>=g.startLine))continue;let I=w(E.symbol);if(!I||!pe().has(I))continue}let v=`${E.symbol}|${y.chunk_id}`;L.has(v)||(L.add(v),W.push({...E,chunkId:y.chunk_id,source:"scip-chunk"}))}l.set(g.symbolId,W)}}return l}var me=500;function H(n){let e=[...new Set(n)],t=[];for(let r=0;r<e.length;r+=me)t.push(e.slice(r,r+me));return t}function Je(n){let e=new Map;for(let t of n){let r=e.get(t.documentId);r?r.push(t):e.set(t.documentId,[t])}return e}function Ye(n){let e=new Map;for(let[t,r]of n){let i=[];for(let c of r)i.push({symbol:c.symbol,file:c.file,chunkId:-1,source:"semantic-callee",...c.callsiteLine===void 0?{}:{callsiteLine:c.callsiteLine},...c.kind==="jsx-render"?{kind:"jsx-render"}:{}});e.set(t,i)}return e}export{M as a,mn as b,fn as c,dn as d,xe as e,vn as f,wn as g,Te as h,fe as i};
|
|
38
|
-
//# sourceMappingURL=chunk-U3SXIMII.js.map
|
package/dist/chunk-U6KCHXJ4.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as p}from"./chunk-ATXPTSEI.js";import{f as o,h as d,j as s,k as c}from"./chunk-T3CZAZSI.js";import{c as a}from"./chunk-H5EXS3HM.js";import{join as b}from"path";var u=3,S=2,x="typescript-semantic";function R(n){let e=b(n,x),t=d(e);return{...t,requestDir:t.legacyRequestDir}}function q(n){let e=JSON.parse(n),t=e.protocolVersion,r=t===S;if(!r&&t!==u||typeof e.id!="string"||typeof e.generation!="string"||typeof e.deadlineAtMs!="number"||!Number.isFinite(e.deadlineAtMs)||e.profileEnvironment!==void 0&&!a(e.profileEnvironment)||!e.request||!g(e.request)||!r&&(e.mailboxVersion!==o||typeof e.operationKey!="string"||!/^[a-f0-9]{64}$/.test(e.operationKey)||e.id!==c(e.operationKey)||typeof e.clientId!="string"||!e.clientId||typeof e.enqueuedAtMs!="number"||!Number.isFinite(e.enqueuedAtMs)||e.deadlineAtMs<e.enqueuedAtMs))throw new Error("TypeScript semantic service received an invalid mailbox request.");if(!r){let i=e,y=s("typescript-semantic-v3",{generation:i.generation,profileEnvironment:i.profileEnvironment,request:i.request});if(i.operationKey!==y)throw new Error("TypeScript semantic service received a mismatched mailbox operation identity.");return i}let m=s("typescript-semantic-v2",{id:e.id,generation:e.generation,request:e.request});return{protocolVersion:u,mailboxVersion:o,id:e.id,operationKey:m,clientId:"legacy-v2",enqueuedAtMs:e.deadlineAtMs,deadlineAtMs:e.deadlineAtMs,generation:e.generation,...e.profileEnvironment?{profileEnvironment:e.profileEnvironment}:{},request:e.request}}function g(n){if(!n||typeof n!="object"||!("kind"in n))return!1;let e=n;switch(e.kind){case"availability":return!0;case"import-usage":return typeof e.file=="string";case"reference-fragments":return p(e.files)!==null;case"references":return l(e.definitions)&&(e.exact===void 0||typeof e.exact=="boolean");case"callees":case"callee-coverage":return l(e.definitions);case"signature":return f(e.definition);default:return!1}}function l(n){return Array.isArray(n)&&n.every(f)}function f(n){if(!n||typeof n!="object")return!1;let e=n;return typeof e.symbolId=="number"&&typeof e.documentId=="number"&&typeof e.symbol=="string"&&typeof e.relativePath=="string"&&typeof e.leaf=="string"&&typeof e.startLine=="number"&&typeof e.endLine=="number"}export{u as a,R as b,q as c};
|
|
2
|
-
//# sourceMappingURL=chunk-U6KCHXJ4.js.map
|
package/dist/chunk-UH3XSKS5.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{closeSync as q,fstatSync as U,openSync as $,readFileSync as be,readSync as Se}from"fs";import{createHash as It}from"crypto";var W=8*1024*1024,Fe=64*1024*1024,xe=512*1024*1024,ke=256*1024*1024,m=class extends Error{constructor(r,n,i,o,s){let c=i==="too-large"?`is ${o} bytes; the safety limit is ${s} bytes`:i==="not-regular"?"is not a regular file":"changed while it was being read";super(`${r} ${JSON.stringify(n)} ${c}`);this.inputKind=r;this.inputPath=n;this.reason=i;this.observedBytes=o;this.limitBytes=s;this.name="BoundedFileReadError"}inputKind;inputPath;reason;observedBytes;limitBytes;code="SCIP_QUERY_BOUNDED_FILE_READ"};function z(e,t){G(t.maxBytes);let r=String(e),n=$(e,"r");try{let i=U(n);we(i,t,r);let o=be(n),s=U(n);if(s.dev!==i.dev||s.ino!==i.ino||s.size!==i.size||o.byteLength!==i.size)throw new m(t.inputKind,r,"changed-during-read",s.size,t.maxBytes);return o}finally{q(n)}}function J(e,t,r="utf8"){return z(e,t).toString(r)}function b(e,t){return J(e,{maxBytes:W,inputKind:t})}function j(e,t){G(t.maxBytes);let r=[],n=Buffer.allocUnsafe(64*1024),i=0;for(;;){let o=Se(e,n,0,n.length,null);if(o===0)break;if(i+=o,!Number.isSafeInteger(i)||i>t.maxBytes)throw new m(t.inputKind,`file descriptor ${e}`,"too-large",i,t.maxBytes);r.push(Buffer.from(n.subarray(0,o)))}return Buffer.concat(r,i)}function Y(e,t){let r=$(e,"r");try{return j(r,t)}finally{q(r)}}function P(e,t,r="utf8"){return Y(e,t).toString(r)}function we(e,t,r){if(!e.isFile())throw new m(t.inputKind,r,"not-regular",Number(e.size),t.maxBytes);if(e.size>t.maxBytes)throw new m(t.inputKind,r,"too-large",Number(e.size),t.maxBytes)}function G(e){if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`maxBytes must be a non-negative safe integer; received ${e}`)}var he=new Map([[8,"\u2408"],[9,"\u2409"],[10,"\u2424"],[13,"\u240D"]]),Tt=6500,Dt=8e3,Ot=6500,Nt=3500;function Ee(e,t={}){let r=t.allowNewlines??!0,n=t.allowTabs??!0,i="";for(let o=0;o<e.length;){let s=e.charCodeAt(o);if(s===27){o=Pe(e,o);continue}if(s===155){o=X(e,o+1);continue}if(s===144||s===152||s===157||s===158||s===159){o=K(e,o+1);continue}if(Ie(s)){s===10&&r?i+=`
|
|
2
|
-
`:s===9&&n?i+=" ":i+=he.get(s)??"\uFFFD",o+=1;continue}if(Le(s)){i+="\uFFFD",o+=1;continue}i+=e[o],o+=1}return i}function vt(e){return Ee(e,{allowNewlines:!1,allowTabs:!1})}function _t(e,t=r=>process.stdout.write(r)){t(`${e}
|
|
3
|
-
`)}function Pe(e,t){let r=e.charCodeAt(t+1);if(Number.isNaN(r))return e.length;if(r===91)return X(e,t+2);if(r===80||r===88||r===93||r===94||r===95)return K(e,t+2);let n=t+1;for(;n<e.length&&Re(e.charCodeAt(n));)n+=1;return n<e.length&&Ae(e.charCodeAt(n))?n+1:t+1}function X(e,t){let r=t;for(;r<e.length;){let n=e.charCodeAt(r);if(r+=1,n>=64&&n<=126)return r}return e.length}function K(e,t){let r=t;for(;r<e.length;){let n=e.charCodeAt(r);if(n===7||n===156)return r+1;if(n===27&&e.charCodeAt(r+1)===92)return r+2;r+=1}return e.length}function Re(e){return e>=32&&e<=47}function Ae(e){return e>=48&&e<=126}function Ie(e){return e<=31||e>=127&&e<=159}function Le(e){return e===1564||e===8206||e===8207||e>=8234&&e<=8238||e>=8294&&e<=8297}function Jt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function jt(e){return typeof e=="string"&&Number.isFinite(Date.parse(e))}function Yt(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0}function Gt(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>0}var Te=/^[a-f0-9]{64}$/u;function Xt(e){return typeof e=="string"&&Te.test(e)}function Kt(e){return typeof e=="string"&&e.length>0&&e.length<=256&&!/[\0\r\n]/u.test(e)}function Vt(e){return typeof e=="number"&&Number.isFinite(e)&&e>=0}var De=new Set(["aix","android","darwin","freebsd","haiku","linux","openbsd","sunos","win32","cygwin","netbsd"]);function R(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let t=e;return t.version!==1||typeof t.pid!="number"||!Number.isSafeInteger(t.pid)||t.pid<=0||typeof t.platform!="string"||!De.has(t.platform)||typeof t.startToken!="string"||t.startToken.trim()===""?null:{version:1,pid:t.pid,platform:t.platform,startToken:t.startToken}}function x(e,t){return e.version===t.version&&e.pid===t.pid&&e.platform===t.platform&&e.startToken===t.startToken}import{execFileSync as Oe}from"child_process";import{platform as Ne}from"os";var ve=1e3,V=16*1024,A;function Z(e,t=Q){if(!Number.isSafeInteger(e)||e<=0)return null;let r=e===process.pid&&t===Q;if(r&&A)return{...A};try{let n=_e(e,t);if(!n)return null;let i={version:1,pid:e,platform:t.platform,startToken:n};return r&&(A=i),{...i}}catch{return null}}function _e(e,t){if(t.platform==="linux"||t.platform==="android")return Ce(t.readFile(`/proc/${e}/stat`));if(t.platform==="win32"){let r=`([DateTimeOffset](Get-Process -Id ${e} -ErrorAction Stop).StartTime).ToUnixTimeMilliseconds()`;return H(t.run("powershell.exe",["-NoProfile","-NonInteractive","-Command",r]))}return t.platform==="darwin"||t.platform==="freebsd"||t.platform==="openbsd"||t.platform==="netbsd"?H(t.run("ps",["-p",String(e),"-o","lstart="])):null}function Ce(e){let t=e.lastIndexOf(")");if(t<0)return null;let n=e.slice(t+1).trim().split(/\s+/)[19];return n&&/^\d+$/.test(n)?n:null}function H(e){let t=e.trim();return t===""?null:t}var Q={platform:Ne(),readFile(e){return P(e,{maxBytes:V,inputKind:"process identity pseudo-file"})},run(e,t){return Oe(e,[...t],{encoding:"utf8",timeout:ve,maxBuffer:V,env:{...process.env,LC_ALL:"C",LANG:"C"},stdio:["ignore","pipe","ignore"]})}};function ee(e){try{return process.kill(e,0),!0}catch(t){return typeof t=="object"&&t!==null&&"code"in t&&t.code==="EPERM"}}import{randomUUID as Me}from"crypto";import{closeSync as Be,fsyncSync as Ue,linkSync as qe,mkdirSync as $e,openSync as We,statSync as ze,unlinkSync as Je,writeSync as je}from"fs";import{dirname as O}from"path";function S(e,t,r,n){let i=0;for(;i<t.length;){let o=r.writeFile(e,t,i,t.length-i);if(!Number.isSafeInteger(o)||o<=0||o>t.length-i)throw new Error(`${n} write did not make valid forward progress`);i+=o}}function p(e,t){if(t!=="win32")return!1;let r=e.code;return r==="EACCES"||r==="EBADF"||r==="EINVAL"||r==="EISDIR"||r==="EPERM"}var L="scip-query-process-lock",T=1,k=Object.freeze({wallNow:()=>Date.now(),isProcessAlive:ee,readProcessIdentity:Z,randomToken:()=>Me(),makeDirectory:e=>$e(e,{recursive:!0}),openFile:(e,t,r)=>We(e,t,r),writeFile:(e,t,r,n)=>je(e,t,r,n),syncFile:e=>Ue(e),closeFile:e=>Be(e),linkFile:(e,t)=>qe(e,t),readFile:e=>b(e,"process lock record"),statFile:e=>{let t=ze(e);return{dev:t.dev,ino:t.ino,size:t.size,mtimeMs:t.mtimeMs}},removeFile:e=>Je(e)});function te(e,t){let r=t.runtime??k;r.makeDirectory(O(e));let n;for(let i=0;i<2;i+=1)try{return{kind:"acquired",lock:re(e,t,r),...n?{reclaimed:n}:{}}}catch(o){if(o.code!=="EEXIST")throw o;let s=y(e,{parseLegacy:t.parseLegacy,runtime:r});if(i===0&&Ge(e,s,{creationGraceMs:t.creationGraceMs,parseLegacy:t.parseLegacy,runtime:r})){n=s;continue}return{kind:"contended",observation:s}}return{kind:"contended",observation:y(e,{parseLegacy:t.parseLegacy,runtime:r})}}function y(e,t={}){let r=t.runtime??k,n,i;try{n=r.statFile(e),i=r.readFile(e)}catch(l){return l.code==="ENOENT"?{state:"missing"}:{state:"malformed"}}let o;try{o=JSON.parse(i)}catch{return{state:"malformed",raw:i,identity:n}}let s=Ye(o);if(s)return{state:"valid",raw:i,identity:n,record:s,owner:Ve(s),parsed:o};let c=t.parseLegacy?.(o)??null;return c?{state:"legacy",raw:i,identity:n,owner:c,parsed:o}:{state:"malformed",raw:i,identity:n,parsed:o}}function Ye(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let t=e;if(t.protocol!==L||t.version!==T||typeof t.kind!="string"||t.kind.trim()===""||typeof t.pid!="number"||!Number.isSafeInteger(t.pid)||t.pid<=0||typeof t.token!="string"||t.token.trim()===""||typeof t.startedAt!="string"||!Number.isFinite(Date.parse(t.startedAt))||t.detail!==void 0&&(typeof t.detail!="object"||t.detail===null||Array.isArray(t.detail)))return null;let r=t.processIdentity===void 0?null:R(t.processIdentity);return t.processIdentity!==void 0&&(!r||r.pid!==t.pid)?null:{protocol:L,version:T,kind:t.kind,pid:t.pid,token:t.token,...r?{processIdentity:r}:{},startedAt:t.startedAt,...t.detail?{detail:t.detail}:{}}}function Ge(e,t,r={}){let n=r.runtime??k;if(!D(t,n))return!1;let i=Ke(`${e}.reclaim`,n);if(!i)return!1;try{let o=y(e,{parseLegacy:r.parseLegacy,runtime:n});return!ie(t,o)||!D(o,n)?!1:N(e,n)}finally{i.release()}}function re(e,t,r){let n=t.directoryDurability??"durable",i=t.pid??process.pid,o=r.randomToken(),s=t.processIdentity===void 0?r.readProcessIdentity(i):t.processIdentity,c={protocol:L,version:T,kind:t.kind,pid:i,token:o,...s?{processIdentity:s}:{},startedAt:new Date(r.wallNow()).toISOString(),...t.detail?{detail:t.detail}:{}},l=`${e}.${o}.candidate`,a=r.openFile(l,"wx",384),u;try{S(a,Buffer.from(`${JSON.stringify(c)}
|
|
4
|
-
`),r,"process lock"),r.syncFile(a)}catch(d){u=d}try{r.closeFile(a)}catch(d){u??=d}if(u!==void 0)throw I(l,r),u;try{r.linkFile(l,e)}catch(d){throw I(l,r),d}if(I(l,r),n==="durable")try{oe(O(e),r)}catch(d){throw Xe(e,c,r),d}let f=!1;return{path:e,record:c,release:()=>f?!1:(f=!0,ne(e,c,r,n))}}function Xe(e,t,r=k){return ne(e,t,r,"durable")}function ne(e,t,r,n){let i=y(e,{runtime:r});return i.state!=="valid"||!i.record||i.record.pid!==t.pid||i.record.token!==t.token||t.processIdentity&&(!i.record.processIdentity||!x(t.processIdentity,i.record.processIdentity))?!1:N(e,r,n)}function Ke(e,t){for(let r=0;r<2;r+=1)try{return re(e,{kind:"reclaim-guard",runtime:t},t)}catch(n){if(n.code!=="EEXIST")return null;let i=y(e,{runtime:t});if(r>0||!D(i,t))return null;let o=y(e,{runtime:t});if(!ie(i,o)||!N(e,t))return null}return null}function D(e,t){if(e.state==="missing")return!1;if(e.owner){if(!t.isProcessAlive(e.owner.pid))return!0;if(!e.owner.processIdentity)return!1;let r=t.readProcessIdentity(e.owner.pid);return r!==null&&!x(e.owner.processIdentity,r)}return!1}function ie(e,t){return e.state===t.state&&e.raw===t.raw&&e.identity!==void 0&&t.identity!==void 0&&e.identity.dev===t.identity.dev&&e.identity.ino===t.identity.ino&&e.identity.size===t.identity.size&&e.identity.mtimeMs===t.identity.mtimeMs}function Ve(e){return{pid:e.pid,...e.processIdentity?{processIdentity:e.processIdentity}:{}}}function oe(e,t){let r;try{r=t.openFile(e,"r")}catch(n){if(p(n,process.platform))return;throw n}try{t.syncFile(r)}catch(n){if(!p(n,process.platform))throw n}finally{t.closeFile(r)}}function N(e,t,r="durable"){try{return t.removeFile(e),r==="durable"&&oe(O(e),t),!0}catch{return!1}}function I(e,t){try{t.removeFile(e)}catch{}}import{randomUUID as rt}from"crypto";import{closeSync as nt,existsSync as it,fsyncSync as ot,linkSync as st,mkdirSync as ct,openSync as at,renameSync as lt,unlinkSync as ut,writeSync as dt}from"fs";import{dirname as ae}from"path";import{closeSync as He,existsSync as Qe,fsyncSync as Ze,mkdirSync as et,openSync as tt}from"fs";import{dirname as se}from"path";var ce=Object.freeze({platform:process.platform,pathExists:e=>Qe(e),makeDirectory:e=>et(e,{recursive:!0}),openFile:(e,t,r)=>tt(e,t,r),syncFile:e=>Ze(e),closeFile:e=>He(e)});function w(e,t=ce){let r=[],n=e;for(;!t.pathExists(n);){r.push(n);let o=se(n);if(o===n)throw new Error(`Cannot establish a durable directory path without an existing ancestor: ${e}`);n=o}let i="synced";for(let o of r.reverse())t.makeDirectory(o),i=F(i,g(se(o),t));return i}function g(e,t=ce){let r;try{r=t.openFile(e,"r")}catch(n){if(p(n,t.platform))return"unsupported";throw n}try{t.syncFile(r)}catch(n){try{t.closeFile(r)}catch{}if(p(n,t.platform))return"unsupported";throw n}return t.closeFile(r),"synced"}function F(...e){return e.every(t=>t==="not-requested")?"not-requested":e.includes("unsupported")?"unsupported":"synced"}var le=Object.freeze({platform:process.platform,randomToken:()=>rt(),pathExists:e=>it(e),makeDirectory:e=>ct(e,{recursive:!0}),openFile:(e,t,r)=>at(e,t,r),writeFile:(e,t,r,n)=>dt(e,t,r,n),syncFile:e=>ot(e),closeFile:e=>nt(e),renameFile:(e,t)=>lt(e,t),linkFile:(e,t)=>st(e,t),removeFile:e=>ut(e)});function ue(e,t,r={}){let n=r.durability??"visibility",i=r.runtime??le,o=ae(e),s=n==="durable"?w(o,i):(i.makeDirectory(o),"not-requested"),c=`${e}.tmp-${i.randomToken()}`,l=typeof t=="string"?Buffer.from(t):t,a,u=!1;try{a=i.openFile(c,"wx",r.mode??384),u=!0,S(a,l,i,"atomic file"),n==="durable"&&i.syncFile(a),i.closeFile(a),a=void 0,i.renameFile(c,e),u=!1;let f=n==="durable"?F(s,g(o,i)):"not-requested";return de(n,f)}finally{if(a!==void 0)try{i.closeFile(a)}catch{}if(u)try{i.removeFile(c)}catch{}}}function hr(e,t,r={}){let n=r.durability??"visibility",i=r.runtime??le;if(!i.linkFile)throw new Error("Exclusive atomic file publication requires hard-link support.");let o=ae(e),s=n==="durable"?w(o,i):(i.makeDirectory(o),"not-requested"),c=`${e}.tmp-${i.randomToken()}`,l=typeof t=="string"?Buffer.from(t):t,a,u=!1;try{a=i.openFile(c,"wx",r.mode??384),u=!0,S(a,l,i,"exclusive atomic file"),n==="durable"&&i.syncFile(a),i.closeFile(a),a=void 0,i.linkFile(c,e);let f=n==="durable"?g(o,i):"not-requested";i.removeFile(c),u=!1;let d=n==="durable"?F(s,f,g(o,i)):"not-requested";return de(n,d)}finally{if(a!==void 0)try{i.closeFile(a)}catch{}if(u)try{i.removeFile(c)}catch{}}}function de(e,t){return{requestedDurability:e,achievedDurability:e==="visibility"?"visibility":t==="synced"?"directory-durable":"file-flushed",directorySync:t}}function h(e,t,r={}){ue(e,mt(t,r),{durability:"visibility",runtime:r.runtime})}function mt(e,t){let r=JSON.stringify(e,null,t.spacing);return t.trailingNewline?`${r}
|
|
5
|
-
`:r}import{createHash as ft}from"crypto";import{existsSync as _,mkdirSync as pt,rmSync as yt}from"fs";import{tmpdir as gt}from"os";import{isAbsolute as bt,join as pe,resolve as E}from"path";var ye=1,St="SCIP_QUERY_SESSION",me="SCIP_QUERY_SESSION_DIR",Ft=128,xt=8,kt=32768,fe=new Map;function _r(e,t,r,n=!0,i){if(!n||e!=="anchors"&&e!=="system-map")return;let o=B();if(!o)return;let s=ge(t),c=M(s,o);if(e==="system-map"){r?yt(c,{force:!0}):_(c)&&i&&v(c,()=>{let l=C(c,s,o);l&&h(c,{...l,pendingMapContinuation:i,mapExecution:void 0,updatedAt:new Date().toISOString()},{spacing:2,trailingNewline:!0})});return}v(c,()=>{let l=wt(s,o),a={version:ye,projectRoot:s,sessionIdentity:o,mapRequired:!0,...l.length>0?{recommendedMapCommands:l}:{},updatedAt:new Date().toISOString()};h(c,a,{spacing:2,trailingNewline:!0})})}function Cr(e,t=!0){if(!t)return;let r=B();if(!r)return;let n=ge(e),i=M(n,r);_(i)&&v(i,()=>{let o=C(i,n,r);if(o){if(o.pendingMapContinuation)throw new Error(["MAP TRANSPORT INCOMPLETE","The selected system map has already been computed. Restarting it would repeat the same repository work.",`Continue exactly: ${o.pendingMapContinuation}`].join(`
|
|
6
|
-
`));if(o.mapExecution&&Et(o.mapExecution.processId))throw new Error(["NAVIGATION MAP ALREADY RUNNING","A selected system map is already computing in this SCIP_QUERY_SESSION.","Poll the existing terminal execution. Do not launch a duplicate map or inspect in parallel."].join(`
|
|
7
|
-
`));h(i,{...o,mapExecution:{processId:process.pid,startedAt:new Date().toISOString()},updatedAt:new Date().toISOString()},{spacing:2,trailingNewline:!0})}})}function Mr(e,t,r=!0){if(!r)return;let n=B();if(!n)return;let i=M(E(e),n);if(!_(i))return;let o=C(i,E(e),n);if(!o?.mapRequired)return;let s=o.recommendedMapCommands?.length?["This refusal is a recoverable protocol step, not evidence that the requested code cannot be explored.","Run exactly one of the ranked map commands below, then finish every emitted continuation:",...o.recommendedMapCommands.map((c,l)=>` [${l+1}] ${c}`)]:[`Do not retry ${t}. Run one printed next-abstraction system-map command and finish every emitted continuation first.`];throw new Error(["NAVIGATION MAP REQUIRED","An anchors locator completed in this SCIP_QUERY_SESSION, but its selected system map has not reached transport completion.",`Do not retry ${t}.`,...s,"The map must complete before the agent can choose source detail; map and detail exploration cannot run concurrently."].join(`
|
|
8
|
-
`))}function C(e,t,r){try{let n=JSON.parse(b(e,"navigation session state"));return n.version===ye&&n.projectRoot===t&&n.sessionIdentity===r&&n.mapRequired===!0&&(n.recommendedMapCommands===void 0||Array.isArray(n.recommendedMapCommands)&&n.recommendedMapCommands.length<=xt&&n.recommendedMapCommands.every(i=>typeof i=="string"&&i.startsWith("scip-query system-map ")&&i.length<=kt))&&(n.pendingMapContinuation===void 0||typeof n.pendingMapContinuation=="string")&&(n.mapExecution===void 0||typeof n.mapExecution=="object"&&n.mapExecution!==null&&Number.isSafeInteger(n.mapExecution.processId)&&typeof n.mapExecution.startedAt=="string")?n:null}catch{return null}}function wt(e,t){let r=ht(e,t),n=fe.get(r)??[];return fe.delete(r),n}function ht(e,t){return`${e}\0${t}`}function Et(e){try{return process.kill(e,0),!0}catch(t){return t.code==="EPERM"}}function M(e,t){let r=Pt();pt(r,{recursive:!0,mode:448});let n=ft("sha256").update(e).update("\0").update(t).digest("hex");return pe(r,`navigation-${n}.json`)}function Pt(){let e=process.env[me];if(!e)return pe(gt(),`scip-query-source-sessions-${process.getuid?.()??"user"}`);if(!bt(e))throw new Error(`${me} must be an absolute path.`);return E(e)}function ge(e){let t=process.env.SCIP_QUERY_PROJECT_ROOT?.trim();return E(t||e)}function B(){let e=process.env[St]?.trim();if(e&&!(e.length>Ft||!/^[A-Za-z0-9._:-]+$/u.test(e)))return`explicit:${e}`}function v(e,t){let r=te(`${e}.lock`,{kind:"navigation-session",detail:{state:e.slice(-17,-5)}});if(r.kind!=="acquired")throw new Error("Navigation session state is busy. Retry the completed command.");try{t()}finally{r.lock.release()}}export{W as a,m as b,J as c,b as d,Tt as e,Dt as f,Ot as g,Nt as h,vt as i,_t as j,S as k,ce as l,w as m,g as n,F as o,Jt as p,jt as q,Yt as r,Gt as s,Xt as t,Kt as u,Vt as v,R as w,x,Z as y,ee as z,te as A,y as B,hr as C,h as D,_r as E,Cr as F,Mr as G};
|
|
9
|
-
//# sourceMappingURL=chunk-UH3XSKS5.js.map
|
package/dist/chunk-UIFUZVCC.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{e as y}from"./chunk-JFMI5SGB.js";import{b as h,e as b}from"./chunk-2USA3S3P.js";import{C as m,p as l}from"./chunk-2VAHDDLM.js";import{c as u,d as i,f as c}from"./chunk-BL6DCHQP.js";import{basename as f}from"path";function g(t,o){let n=o.className,e=h(t,n);return e.match?e.total>1?{kind:"ambiguous",query:n,total:e.total,candidates:[p(e.match),...e.candidates]}:{kind:"matched",query:n,owner:L(e.match),methods:M(t,e.match)}:{kind:"missing",query:n,suggestions:b(t,n,5)}}function j(t,o){let n=g(t,{className:o});if(n.kind==="missing")throw new Error(`No class definition matched '${o}'.`);if(n.kind==="ambiguous"){let e=n.candidates.map(s=>`${s.relativePath}:${s.startLine+1}`).join(", ");throw new Error(`Class '${o}' is ambiguous across ${n.total} definitions (${e}). Qualify it with a path or exact SCIP symbol identity.`)}return n.methods}function M(t,o){let n=i(o.symbol),s=new y(t).definitionsForFile(o.relativePath).filter(r=>c(r.symbol)),a=s.filter(r=>r.parentTypeName===n||r.symbol.includes(n)),d=(a.length>0?a:S(f(o.relativePath))===n?s.filter(r=>r.symbol.includes("<invalid-global-code>")):[]).map(r=>({startLine:r.startLine,endLine:r.endLine,name:i(r.symbol)}));return l(o.relativePath)!=="clojure"?d:R(d,w(t,o))}function p(t){return{symbol:t.symbol,shortName:u(t.symbol),relativePath:t.relativePath,startLine:t.startLine}}function L(t){return{...p(t),endLine:t.endLine}}function S(t){return t.replace(/\.[^.]+$/,"")}function w(t,o){let n=i(o.symbol);return n?(m(t,o.relativePath)?.clojureMembers??[]).filter(e=>e.ownerName===n).map(e=>({startLine:e.startLine,endLine:e.endLine,name:e.memberName})):[]}function R(t,o){let n=new Map;for(let e of[...t,...o])n.set(`${e.name}:${e.startLine}:${e.endLine}`,e);return[...n.values()].sort((e,s)=>e.startLine-s.startLine||e.endLine-s.endLine)}export{g as a,j as b};
|
|
2
|
-
//# sourceMappingURL=chunk-UIFUZVCC.js.map
|
package/dist/chunk-UXKURIVI.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as p}from"./chunk-2BMSSRBH.js";import{a as y}from"./chunk-BJWFVAA5.js";import{f as h}from"./chunk-U3SXIMII.js";import{o as u}from"./chunk-SKKXTABJ.js";import{a as S,c as b}from"./chunk-F5GSBHC6.js";import{C as d,d as m}from"./chunk-C7C6AKAT.js";function x(e,o,r={}){let{direction:c="backward",maxDepth:s=3}=r,l=S(e,o);return l?c==="backward"?k(e,l,s,{semantic:r.semantic!==!1}):D(e,l,{semantic:r.semantic!==!1}):null}function j(e,o,r={}){return x(e,o,r)}function k(e,o,r,c){let s=[],l=new Set([o.symbol]),t=[o];for(let n=1;n<=r&&t.length!==0;n++){let i=[];for(let g of t){let w=h(e,g,{semantic:c.semantic,semanticEvidence:y});for(let a of w){if(l.has(a.symbol))continue;l.add(a.symbol),s.push({symbol:a.symbol,shortName:m(a.symbol),file:a.file,relationship:n===1?"referenced within definition (callee)":`depth ${n} callee`});let f=b(e,a.symbol);f&&!e.isIgnored(f.relativePath)&&i.push(f)}}t=i}return{symbol:o.symbol,shortName:m(o.symbol),direction:"backward",connectedSymbols:s}}function D(e,o,r){let c=new Set,s=[],l=new p(e);for(let t of u(e,o,{semantic:r.semantic,semanticEvidence:y})){if(s.length>=30)break;let n=t.enclosingSymbol??d(l.definitionsForFile(t.file),t.line)?.symbol??null;if(!n||n===o.symbol)continue;let i=b(e,n);!i||e.isIgnored(i.relativePath)||c.has(i.symbol)||(c.add(i.symbol),s.push({symbol:i.symbol,shortName:m(i.symbol),file:i.relativePath,relationship:`references target at ${t.file}:${t.line+1}`}))}return s.sort((t,n)=>t.file.localeCompare(n.file)),{symbol:o.symbol,shortName:m(o.symbol),direction:"forward",connectedSymbols:s}}export{x as a,j as b};
|
|
2
|
-
//# sourceMappingURL=chunk-UXKURIVI.js.map
|
package/dist/chunk-V2RBODHL.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{y as u}from"./chunk-KNLQGXVH.js";function x(e,i){let l=new Map;return e.forEach((t,f)=>{let o=new Set;for(let r of i(t)){if(o.has(r))continue;o.add(r);let n=l.get(r);n?n.push(f):l.set(r,[f])}}),{candidatesFor:(t,f)=>{let o=new Set;for(let r of i(t)){let n=l.get(r);if(n)for(let a of n)a!==f&&o.add(a)}return[...o].sort((r,n)=>r-n)}}}function R(e){let i=c(e.profile?.name),l=()=>{let t=[];i=c(e.profile?.name,e);let f=(r,n)=>{let a=e.profiles[r],s=e.profiles[n];i.candidatePairs+=1,i.comparedPairs+=1;let d=e.compare(a,s);d&&t.push(d)};if(e.filePattern){let r=e.profiles.findIndex(n=>n.file.includes(e.filePattern));if(r>=0){let n=e.profiles[r];for(let a of m(e,r)){let s=e.profiles[a];e.focusFiles&&!e.focusFiles.has(n.file)&&!e.focusFiles.has(s.file)||f(r,a)}}}else if(e.focusFiles?.size!==0){let r=typeof e.overrunFactor=="number"&&Number.isFinite(e.limit)?e.limit*e.overrunFactor:Number.POSITIVE_INFINITY;for(let n=0;n<e.profiles.length;n+=1){let a=e.profiles[n],s=e.focusFiles?.has(a.file)??!1;for(let d of p(e,n))e.focusFiles&&!s&&!e.focusFiles.has(e.profiles[d].file)||f(n,d);if(t.length>r){i.overrunApplied=!0;break}}}t.sort(e.sort??((r,n)=>n.similarity-r.similarity)),i.matchedResults=t.length;let o=t.slice(0,e.limit);return i.emittedResults=o.length,e.onProfile?.({...i}),o};return e.profile?u(`pairwise-profile:${e.profile.name}`,l,()=>({...b(e.profile?.metadata),...i})):l()}function m(e,i){if(e.candidateIndex)return P(e,i,-1);let l=[];for(let t=0;t<e.profiles.length;t+=1)t!==i&&l.push(t);return l}function p(e,i){if(e.candidateIndex)return P(e,i,i);let l=[];for(let t=i+1;t<e.profiles.length;t+=1)l.push(t);return l}function P(e,i,l){let t=e.profiles[i],f=new Set;for(let o of e.candidateIndex?.candidatesFor(t,i,e.profiles)??[])o<=l||o!==i&&(o<0||o>=e.profiles.length||f.add(o));return[...f].sort((o,r)=>o-r)}function c(e,i){return{pipeline:e,profileCount:i?.profiles.length??0,focusedProfileCount:i?.focusFiles?i.profiles.filter(l=>i.focusFiles.has(l.file)).length:0,candidatePairs:0,comparedPairs:0,matchedResults:0,emittedResults:0,candidateIndexApplied:i?.candidateIndex!==void 0,focusApplied:i?.focusFiles!==void 0,filePatternApplied:i?.filePattern!==void 0,overrunApplied:!1}}function b(e){return typeof e=="function"?e():e??{}}export{x as a,R as b};
|
|
2
|
-
//# sourceMappingURL=chunk-V2RBODHL.js.map
|
package/dist/chunk-VBKUWB6N.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as h}from"./chunk-VZPWVCLN.js";import{c as y,d as x}from"./chunk-HMEWLMML.js";import{z as b}from"./chunk-RMDPFPNW.js";import{a as S}from"./chunk-MWN53KRN.js";import{z as g}from"./chunk-7HXT6YLU.js";import{h as m}from"./chunk-7F45LJKI.js";import{existsSync as E,statSync as V}from"fs";import{join as j}from"path";import{existsSync as w,readdirSync as D}from"fs";import{createHash as O}from"crypto";import{join as f}from"path";function l(t){let r=0,e=0,n=0,o=0,i=0,a=[];for(let s of t)switch(s.state){case"legacy":r+=1;break;case"current":e+=1;break;case"unsupported-older":n+=1,a.push(u(s));break;case"unsupported-future":o+=1,a.push(u(s));break;case"malformed":i+=1,a.push(u(s));break}let c=r+e,p=n+o+i;return{complete:p===0,total:t.length,accepted:c,legacy:r,current:e,unsupportedOlder:n,unsupportedFuture:o,malformed:i,omitted:p,issues:a}}function u(t){if(t.state==="legacy"||t.state==="current")throw new Error(`accepted record ${t.path} cannot become a compatibility issue`);return{path:t.path,state:t.state,reason:t.reason??t.state}}var F=f(".scipquery","suppressions"),C="scip-query-suppression",P=1,d=2;function v(t){return f(t,F)}function _(t){if(t.id&&t.id.trim()!=="")return`${t.id.trim()}.json`;let r=`${t.check??""}\0${t.file??""}`;return`CHECK-${O("sha256").update(r).digest("hex").slice(0,12).toUpperCase()}.json`}function A(t){return _(t).slice(0,-5)}function $(t,r){if(typeof t!="object"||t===null||Array.isArray(t))return{state:"malformed",error:"not a suppression object"};let e=t;if(e.schemaVersion===void 0&&(e.kind!==void 0||e.suppressionIdentity!==void 0||e.writer!==void 0))return{state:"malformed",error:"suppression envelope metadata requires schemaVersion"};if(e.schemaVersion!==void 0){if(!Number.isSafeInteger(e.schemaVersion))return{state:"malformed",error:"schemaVersion must be a positive safe integer"};if(e.schemaVersion!==P&&e.schemaVersion!==d)return{state:e.schemaVersion>d?"unsupported-future":"unsupported-older",error:`unsupported schemaVersion ${String(e.schemaVersion)}`};if(e.kind!==void 0&&e.kind!==C)return{state:"malformed",error:`kind must be ${C}`}}if(e.schemaVersion===P&&e.decision!==void 0)return{state:"malformed",error:"schemaVersion 1 cannot carry automated adjudication metadata"};if(e.schemaVersion===d&&!y(e.decision))return{state:"malformed",error:"schemaVersion 2 requires a valid automated adjudication decision"};if(typeof e.reason!="string"||e.reason.trim()==="")return{state:"malformed",error:"missing reason"};if(!e.id&&!e.check)return{state:"malformed",error:"needs an id or a check"};let n=N(e);if(e.schemaVersion===void 0)return{state:"legacy",suppression:n,record:e,schemaVersion:0};let o=A(n);return e.suppressionIdentity!==o||r!==void 0&&e.suppressionIdentity!==r?{state:"malformed",error:"suppressionIdentity does not match the suppression target or filename"}:!e.writer||e.writer.tool!=="scip-query"||typeof e.writer.version!="string"||e.writer.version.trim()===""?{state:"malformed",error:"missing valid writer metadata"}:typeof e.createdAt!="string"||!Number.isFinite(Date.parse(e.createdAt))?{state:"malformed",error:"missing valid createdAt timestamp"}:e.updatedAt!==void 0&&(typeof e.updatedAt!="string"||!Number.isFinite(Date.parse(e.updatedAt)))?{state:"malformed",error:"invalid updatedAt timestamp"}:{state:e.schemaVersion===d?"current":"legacy",suppression:n,record:e,schemaVersion:e.schemaVersion}}function R(t){let r=v(t);if(!w(r))return{suppressions:[],compatibility:l([]),warnings:[]};let e=[],n=[];for(let i of D(r).sort()){if(!i.endsWith(".json"))continue;let a=f(r,i),c=`${F}/${i}`,p;try{p=JSON.parse(m(a,"suppression record"))}catch{n.push({path:c,state:"malformed",reason:"malformed JSON"});continue}let s=$(p,i.slice(0,-5));if("error"in s){n.push({path:c,state:s.state,reason:s.error});continue}n.push({path:c,state:s.state}),e.push(s.suppression)}let o=l(n);return{suppressions:e,compatibility:o,warnings:o.issues.map(i=>`${i.path}: ${i.reason} \u2014 ignored`)}}function N(t){return{...typeof t.id=="string"?{id:t.id}:{},...typeof t.check=="string"?{check:t.check}:{},...typeof t.file=="string"?{file:t.file}:{},reason:t.reason,...typeof t.expiresAt=="string"?{expiresAt:t.expiresAt}:{},...typeof t.createdAt=="string"?{createdAt:t.createdAt}:{},...t.decision?{decision:t.decision}:{}}}function W(){return process.env.SCIP_QUERY_PROJECT_ROOT??process.cwd()}var I;function L(t=W(),r=void 0){if(r===void 0&&I?.projectRoot===t)return I;let e=x(t),n=g(t,e),o=process.env.SCIP_QUERY_INDEX_DB;if(o)return{projectRoot:t,config:e,paths:n,dbPath:o,dbPathSource:"env",gitContext:r};if(E(n.dbPath))return{projectRoot:t,config:e,paths:n,dbPath:n.dbPath,dbPathSource:"configured",gitContext:r};let i=j(t,"index.db");return{projectRoot:t,config:e,paths:n,dbPath:i,dbPathSource:"root-fallback",rootFallbackWarning:G(i,n.dbPath),gitContext:r}}function oe(t,r={}){let{config:e,paths:n,dbPath:o,dbPathSource:i,rootFallbackWarning:a,gitContext:c}=L(t);if(!E(o))throw new Error("No index.db found. Run: scip-query reindex");r.warnOnRootFallback&&i==="root-fallback"&&a&&console.error(a);let p=R(t).suppressions,s={dbPath:o,indexPath:process.env.SCIP_QUERY_INDEX_SCIP??n.indexPath,projectRoot:t,collaborationDomainId:e.collaborationDomainId,sharedEvidenceDbPath:b(t,e,c),entryRoots:e.entryRoots,semantic:e.semantic,suppressions:[...e.suppressions??[],...p],declaredCouplings:e.declaredCouplings,locality:e.locality,architecture:e.architecture,coverageContracts:e.coverageContracts,docs:e.docs},k=S(t);return new h(s,k)}function G(t,r){let e="unknown time";try{e=V(t).mtime.toISOString()}catch{}return`warning: using legacy project-root index.db (${t}, modified ${e}) because the configured index was not found at ${r}. This fallback may be stale; run 'scip-query reindex' to refresh the configured index.`}export{oe as a};
|
|
2
|
-
//# sourceMappingURL=chunk-VBKUWB6N.js.map
|
package/dist/chunk-VBV6ALJE.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as o}from"./chunk-BOJ5SVE2.js";import{y as u}from"./chunk-KNLQGXVH.js";function P(e){let t=m(e.profile?.name),r=()=>{let d=e.candidates(),a=e.filterCandidate?d.filter(e.filterCandidate):d,C=e.orderCandidates?[...a].sort(e.orderCandidates):a,i=o(C,e.scanLimit);t={pipeline:e.profile?.name,loadedCandidates:d.length,filteredCandidates:a.length,scannedCandidates:i.length,evaluatedCandidates:0,matchedResults:0,emittedResults:0,scanLimitApplied:i.length<a.length,resultLimitApplied:!1};let f=e.prepare?.(i)??void 0,n=[];for(let c of i){t.evaluatedCandidates+=1;let s=e.evaluate(c,f);s&&n.push(s)}t.matchedResults=n.length,e.orderResults&&n.sort(e.orderResults);let l=typeof e.limit=="number"?n.slice(0,e.limit):n;return t.emittedResults=l.length,t.resultLimitApplied=l.length<n.length,e.onProfile?.({...t}),l};return e.profile?u(`candidate-pipeline:${e.profile.name}`,r,()=>({...p(e.profile?.metadata),...t})):r()}function m(e){return{pipeline:e,loadedCandidates:0,filteredCandidates:0,scannedCandidates:0,evaluatedCandidates:0,matchedResults:0,emittedResults:0,scanLimitApplied:!1,resultLimitApplied:!1}}function p(e){return typeof e=="function"?e():e??{}}export{P as a};
|
|
2
|
-
//# sourceMappingURL=chunk-VBV6ALJE.js.map
|
package/dist/chunk-VDGFWCQV.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as T,b as $}from"./chunk-XDAUYDFT.js";import{b as k}from"./chunk-CD6M6LS2.js";import{d as f}from"./chunk-BOJ5SVE2.js";import{d as j}from"./chunk-C7C6AKAT.js";var y=["execution","runtime","dataflow","state","temporal","contract","identity","ownership","dependencies"];import{createHash as Y}from"crypto";var Ce=["causal","structure","complete"],Q={causal:["execution","runtime","dataflow","state","temporal"],structure:["contract","identity","ownership","dependencies"],complete:y},Z=2,ee=48,H=64,ne=5e4;function Fe(e,n,t={}){let a=f([...n.symbols??[],...n.locations??[]]),o=f(n.searches??[]);if(a.length===0&&o.length===0)throw new Error("evidence requires at least one positional symbol, --symbol, --at, or --search selector.");let r=t.view??"causal",i=te(t.families,r),s=t.direction??"both",g=f(t.subtypes??[]),l=t.connecting??!1,c=t.inventoryOnly??!1,p=f(t.foldIds??[]),u=t.maxDepth??Z,m=t.maxEdges??ee;if(!Number.isSafeInteger(u)||u<0)throw new RangeError(`Evidence depth must be a non-negative safe integer; received ${u}.`);if(!Number.isSafeInteger(m)||m<=0)throw new RangeError(`Evidence max edges must be a positive safe integer; received ${m}.`);if(!["incoming","outgoing","both"].includes(s))throw new Error(`Unsupported graph evidence direction: ${s}.`);if(c&&p.length>0)throw new Error("Evidence fold materialization cannot be combined with --inventory-only.");let h=k(e,{symbols:a,searches:o,maxDepth:u,maxTopologyCharacters:ne,relations:oe(i)}),w=new Map(h.nodes.map(d=>[d.id,d])),v=h.edges.filter(d=>d.disposition==="emitted"||d.disposition==="folded").flatMap(d=>re(d,w)),E=v.filter(d=>i.includes(d.family)).filter(d=>g.length===0||g.includes(d.subtype)),b=new Set(h.anchors.flatMap(d=>d.nodeIds));if(l&&b.size<2)throw new Error("Connecting evidence requires at least two resolved root nodes.");let S=new Set(E.map(d=>d.id)),P=F(v,b,"incoming").filter(d=>S.has(d.id)),_=F(v,b,"outgoing").filter(d=>S.has(d.id)),O=F(v,b,"both").filter(d=>S.has(d.id)),U=de(i,g,P,_,O),A=s==="incoming"?P:s==="outgoing"?_:O,N=l?Ee(A,[...b],s):A,K=ye(N,b,s),G=[...N].sort((d,X)=>ve(d,X,K)),D=le(G,m),z=ge(D,p),x=c?[]:p.length>0?G.filter(d=>z.has(d.id)):G,I=p.length>0?x:x.slice(0,m),B=p.length>0||c?[]:D,R=Math.max(0,x.length-I.length),J=h.frontiers.filter(d=>d.disposition==="unsupported").length,C=h.coverage.status==="incomplete"?"incomplete":R>0?"bounded":"accounted";return{kind:"graph",view:t.families&&t.families.length>0?"custom":r,families:i,selection:{direction:s,subtypes:g,connecting:l,inventoryOnly:c,foldIds:p},targets:h.anchors.map(d=>({kind:d.kind,query:d.query,status:d.status,nodeIds:[...d.nodeIds],omittedCandidates:d.omittedCandidates})),inventory:U,edges:I,folds:B,coverage:{status:C,topologyStatus:h.coverage.status,scope:h.coverage.scope,maxDepth:u,maxEdges:m,matchedEdges:G.length,eligibleEdges:x.length,returnedEdges:I.length,omittedEdges:R,frontierGroups:h.frontiers.length,unsupportedFrontiers:J,blindSpots:f([...h.coverage.blindSpots,...T(i)]),explanation:c?`${G.length} relationship(s) match the explicit projection; only exact inventory counts were requested.`:p.length>0?`Every relationship in ${p.length} explicitly selected recoverable fold(s) was emitted.`:C==="accounted"?"Every selected relationship in the bounded topology was emitted.":C==="bounded"?`${R} selected relationship(s) were withheld by the explicit edge budget.`:h.coverage.explanation}}}function te(e,n){let t=e&&e.length>0?e:Q[n],a=t.filter(o=>!y.includes(o));if(a.length>0)throw new Error(`Unsupported graph evidence family: ${a.join(", ")}.`);return f(t)}function oe(e){return["call","contract-symbol","import","reference","runtime-boundary"]}function re(e,n){let t=n.get(e.fromNodeId),a=n.get(e.toNodeId);return!t||!a?[]:(e.semantics??[]).flatMap((o,r)=>{let i=se(o);if(!i)return[];let s=$(i,o.subtype);if(!s)throw new Error(`No graph relation provider contract is registered for ${i}/${o.subtype}.`);let g=ce(e);return s.relation.evidenceStrengths.includes(g)?[{id:`${e.id}:${r}:${i}`,family:i,semanticFamily:o.family,subtype:o.subtype,from:V(t),to:V(a),sourceKind:e.kind,providerId:s.provider.id,supportCeiling:s.relation.supportCeiling,establishes:s.relation.establishes,nonClaims:[...s.relation.nonClaims],recoverWith:[...s.relation.recoverWith],evidenceStrength:g,evidenceMethods:f(e.evidence.map(l=>l.method)),evidenceConstituents:ie(e.evidence),context:o.context?{...o.context}:null,attributes:o.attributes?{...o.attributes}:null}]:[]})}function ie(e){let n=new Map;for(let t of e)n.set(`${t.method}\0${t.strength}`,t);return[...n.values()].map(({method:t,strength:a})=>({method:t,strength:a}))}function se(e){switch(e.family){case"control":return e.context?.crossesRuntimeBoundary===!0||e.subtype==="runtime-handoff"?"runtime":"execution";case"data":return"dataflow";case"state":return"state";case"temporal":return"temporal";case"contract":return"contract";case"identity":return e.subtype.startsWith("contains")||e.subtype.startsWith("owns-")?"ownership":e.subtype.startsWith("import")?"dependencies":"identity"}}function V(e){let n=ae(e);return{id:e.id,kind:e.kind,label:n?j(n):e.label,symbol:n,location:e.location?{...e.location}:null}}function ae(e){return e.kind!=="symbol"||!e.id.startsWith("symbol:")?null:decodeURIComponent(e.id.slice(7))}function ce(e){let n=f(e.evidence.map(t=>t.strength));return n.length===1?n[0]:n.includes("exact")&&n.every(t=>t==="exact"||t==="derived")?"mixed":n.includes("candidate")?"candidate":n.includes("unknown")||n.length===0?"unknown":"mixed"}function F(e,n,t){let a=M(e,t),o=new Map,r=new Map,i=[...n].sort();for(let s of i)r.set(s,0);for(let s=0;s<i.length;s+=1){let g=i[s],l=r.get(g);for(let c of a.get(g)??[])o.set(c.edge.id,c.edge),!r.has(c.next)&&(r.set(c.next,l+1),i.push(c.next))}return[...o.values()]}function M(e,n){let t=new Map,a=(o,r,i)=>{let s=t.get(o)??[];s.push({edge:i,next:r}),t.set(o,s)};for(let o of e)n!=="incoming"&&a(o.from.id,o.to.id,o),n!=="outgoing"&&a(o.to.id,o.from.id,o);for(let o of t.values())o.sort((r,i)=>r.edge.id.localeCompare(i.edge.id)||r.next.localeCompare(i.next));return t}function de(e,n,t,a,o){let r=new Set;for(let c of[...t,...a,...o])r.add(`${c.family}\0${c.subtype}`);if(n.length>0)for(let c of e)for(let p of n)r.add(`${c}\0${p}`);let i=c=>{let p=new Map;for(let u of c){let m=`${u.family}\0${u.subtype}`;p.set(m,(p.get(m)??0)+1)}return p},s=i(t),g=i(a),l=i(o);return[...r].map(c=>{let[p,u]=c.split("\0");return{family:p,subtype:u,incoming:s.get(c)??0,outgoing:g.get(c)??0,both:l.get(c)??0}}).sort((c,p)=>y.indexOf(c.family)-y.indexOf(p.family)||c.subtype.localeCompare(p.subtype))}function le(e,n){let t=e.slice(n),a=new Map;for(let i of t){let s=pe(i),g=`${i.family}\0${s}`,l=a.get(g)??[];l.push(i),a.set(g,l)}let o=new Map(e.map((i,s)=>[i.id,s+1])),r=[];for(let[i,s]of[...a].sort(([g],[l])=>g.localeCompare(l))){let[g,l]=i.split("\0"),c=[...s].sort((p,u)=>p.id.localeCompare(u.id));for(let p=0;p<c.length;p+=H){let u=c.slice(p,p+H),m=u.map(E=>E.id),h=f(u.map(E=>E.subtype)).sort(),w=h.length===1?h[0]:"mixed",v=[...new Set(u.flatMap(E=>[E.from.id,E.to.id]))].sort();r.push({id:me(g,h.join("\0"),m),mode:ue(u),family:g,subtype:w,subtypes:h,region:l,edgeCount:m.length,edgeIds:m,nodeIds:v,minimumMaxEdges:Math.max(...m.map(E=>o.get(E)??e.length))})}}return r.sort((i,s)=>y.indexOf(i.family)-y.indexOf(s.family)||(i.region??"").localeCompare(s.region??"")||i.id.localeCompare(s.id))}function pe(e){let n=e.from.location?.file??`kind:${e.from.kind}`,t=e.to.location?.file??`kind:${e.to.kind}`;return n===t?n:`${n} -> ${t}`}function ge(e,n){if(n.length===0)return new Set;let t=new Map(e.map(o=>[o.id,o])),a=n.filter(o=>!t.has(o));if(a.length>0){let o=e.map(r=>r.id).sort();throw new Error(`Unknown evidence fold ${a.join(", ")} for this projection. Available folds: ${o.join(", ")||"(none)"}.`)}return new Set(n.flatMap(o=>t.get(o).edgeIds))}function ue(e){let n=new Map,t=new Map,a=new Set;for(let r of e){a.add(r.from.id),a.add(r.to.id);let i=n.get(r.from.id)??new Set;i.add(r.to.id),n.set(r.from.id,i);let s=t.get(r.to.id)??new Set;s.add(r.from.id),t.set(r.to.id,s)}return he(a,n)?"scc":[...a].every(r=>(t.get(r)?.size??0)<=1&&(n.get(r)?.size??0)<=1)?"linear":"topology"}function he(e,n){let t=new Set,a=new Set,o=r=>{if(t.has(r))return!0;if(a.has(r))return!1;t.add(r);for(let i of n.get(r)??[])if(o(i))return!0;return t.delete(r),a.add(r),!1};return[...e].some(o)}function me(e,n,t){return`fold:${Y("sha256").update([e,n,...t].join("\0")).digest("hex").slice(0,16)}`}function Ee(e,n,t){let a=new Map,o=[...new Set(n)].sort();for(let r=0;r<o.length;r+=1)for(let i=r+1;i<o.length;i+=1)for(let s of fe(e,o[r],o[i],t))a.set(s.id,s);return[...a.values()]}function fe(e,n,t,a){let o=M(e,a),r=new Map([[n,0]]),i=new Map,s=[n];for(let l=0;l<s.length;l+=1){let c=s[l],p=r.get(c);if(c!==t)for(let u of o.get(c)??[])r.has(u.next)||(r.set(u.next,p+1),i.set(u.next,{node:c,edge:u.edge}),s.push(u.next))}if(!r.has(t))return[];let g=[];for(let l=t;l!==n;){let c=i.get(l);if(!c)return[];g.push(c.edge),l=c.node}return g.reverse()}function ye(e,n,t){let a=M(e,t),o=new Map,r=[...n];for(let i of n)o.set(i,0);for(let i=0;i<r.length;i+=1){let s=r[i],g=o.get(s);for(let{next:l}of a.get(s)??[])o.has(l)||(o.set(l,g+1),r.push(l))}return o}function ve(e,n,t){return L(e,t)-L(n,t)||q(e)-q(n)||W(e.evidenceStrength)-W(n.evidenceStrength)||y.indexOf(e.family)-y.indexOf(n.family)||e.from.label.localeCompare(n.from.label)||e.to.label.localeCompare(n.to.label)||e.subtype.localeCompare(n.subtype)||e.id.localeCompare(n.id)}function L(e,n){return Math.min(n.get(e.from.id)??Number.MAX_SAFE_INTEGER,n.get(e.to.id)??Number.MAX_SAFE_INTEGER)}function q(e){let n=[e.from,e.to].filter(t=>t.kind==="structural-region").length;return n===2?2:n}function W(e){switch(e){case"exact":return 0;case"mixed":return 1;case"derived":return 2;case"candidate":return 3;case"unknown":return 4}}export{y as a,Ce as b,Fe as c};
|
|
2
|
-
//# sourceMappingURL=chunk-VDGFWCQV.js.map
|
package/dist/chunk-VDSDOEWF.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as u}from"./chunk-BOJ5SVE2.js";import{a as t}from"./chunk-BJWFVAA5.js";import{f as p,g as h}from"./chunk-U3SXIMII.js";import{a as m}from"./chunk-F5GSBHC6.js";import{d as i,j as d}from"./chunk-C7C6AKAT.js";function k(c,v,y={}){let l=m(c,v);if(!l)return null;let o=y.semantic!==!1,b=h(c,l,{semantic:o,semanticEvidence:t}).filter(e=>d(e.symbol)).slice(0,50),g=u(p(c,l,{limit:50,additive:!0,callableOnly:!0,semantic:o,semanticEvidence:t})),r=b.map(e=>({symbol:e.symbol,shortName:i(e.symbol),file:e.file,relationship:e.source!=="caller-map-inversion"?"reference-candidate":e.callEvidence==="scip-chunk"?"chunk-candidate":"resolved-call",evidenceStrength:e.source==="caller-map-inversion"&&e.callEvidence!=="scip-chunk"?"exact":"candidate",evidenceSource:e.callEvidence??e.source})),s=g.map(e=>({symbol:e.symbol,shortName:i(e.symbol),file:e.file,relationship:e.source==="scip-chunk"?"chunk-candidate":"resolved-call",evidenceStrength:e.source==="scip-chunk"?"candidate":"exact",evidenceSource:e.source,...e.kind==="jsx-render"?{interaction:"render"}:{}}));return{symbol:l.symbol,shortName:i(l.symbol),callers:r.map(({symbol:e,shortName:a,file:n})=>({symbol:e,shortName:a,file:n})),callees:s.map(({symbol:e,shortName:a,file:n})=>({symbol:e,shortName:a,file:n})),callerEvidence:r,calleeEvidence:s,coverage:{scope:"indexed-static-call-graph",blindSpots:["unresolved dynamic dispatch and reflection","external or unindexed callees without a resolved symbol identity","SCIP chunk co-occurrence is retained only as candidate call evidence"]}}}export{k as a};
|
|
2
|
-
//# sourceMappingURL=chunk-VDSDOEWF.js.map
|
package/dist/chunk-VZPWVCLN.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import{a as l,b as d,d as u}from"./chunk-RMDPFPNW.js";import{r as c}from"./chunk-7HXT6YLU.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-VZPWVCLN.js.map
|
package/dist/chunk-WDSFQDPN.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as N,c as y,d as b,e as O,g as T,h as _,i as z}from"./chunk-ANLNLY66.js";import{a as B}from"./chunk-JCSAZ35V.js";import{b as U}from"./chunk-L7KTFEAV.js";import{d as J}from"./chunk-5BIKR67W.js";import{i as d}from"./chunk-2VAHDDLM.js";import{b as M,c as g,m as $,o as P}from"./chunk-ATXPTSEI.js";import{c as A}from"./chunk-IW5XQG5G.js";import{a as j,e as m}from"./chunk-HGFDYOVB.js";var ce={references:T,referenceMap:_,callerMap:(t,s)=>b(t).callerMap(s),calleeMap:q};function q(t,s){let a=j(),i=new Map,l=O(t,s),r=[],n=[],u=0,c=0,p=0,f=0,E=0,k=0,H=0;for(let{definition:e,callees:o}of l.hits)E+=1,o.length>0&&(k+=1,H+=o.length,i.set(e.symbolId,o));let h=K(t,l.hits);if(h.entries.length>0&&m("semantic.callees.prefetch-cache-write",()=>P(t,h.entries),()=>({entries:h.entries.length,sourceMissing:h.sourceMissing,skippedUnsupportedLanguage:h.skippedUnsupportedLanguage})),m("semantic.callees.cache-scan",()=>{for(let[e,o]of N(l.misses)){if(!y(e)){a&&(u+=o.length);continue}let R=d(t,e);if(!R){a&&(c+=o.length),n.push(...o);continue}let x=g(t,e,R),C=G(t,e);if(!C){n.push(...o);continue}let Y=$(t,e,x,C);for(let D of o){let L=Y.get(D.symbol)??null;if(L!==null){let v=V(L);if(v){a&&(p+=1),v.length>0&&i.set(D.symbolId,v);continue}a&&(f+=1)}r.push({def:D,contentHash:x,depsDigest:C})}}},()=>({definitions:s.length,skippedUnsupportedLanguage:u,sourceMissing:c,cacheHits:p,parseFailures:f,misses:r.length,unkeyed:n.length,inMemoryHits:E,inMemoryRows:k,inMemoryCalleeCount:H,resultRows:i.size,missSample:r.slice(0,8).map(e=>`${e.def.relativePath}#${e.def.symbol}`),unkeyedSample:n.slice(0,4).map(e=>`${e.relativePath}#${e.symbol}`)})),r.length===0&&n.length===0)return i;let I=[...n,...r.map(e=>e.def)],w=0,F=m("semantic.callees.compute-misses",()=>{let e=z(t,I);return w=e.size,e},()=>({definitions:I.length,misses:r.length,unkeyed:n.length,rows:w}));for(let[e,o]of F)i.set(e,o);let S=r.filter(e=>b(t).capability("semantic-callees",e.def.relativePath).available).map(e=>({relativePath:e.def.relativePath,symbol:e.def.symbol,contentHash:e.contentHash,depsDigest:e.depsDigest,payload:JSON.stringify(F.get(e.def.symbolId)??[])}));return S.length>0?m("semantic.callees.cache-write",()=>P(t,S),()=>({entries:S.length})):m("semantic.callees.cache-write-skip",()=>{},()=>({reason:"provider-unavailable",misses:r.length})),i}function K(t,s){let a=[],i=new Map,l=0,r=0;for(let{definition:n,callees:u}of s){if(!y(n.relativePath)){r+=1;continue}if(!i.has(n.relativePath)){let p=d(t,n.relativePath),f=p?G(t,n.relativePath):null;i.set(n.relativePath,p&&f?{contentHash:g(t,n.relativePath,p),depsDigest:f}:null)}let c=i.get(n.relativePath);if(!c){l+=1;continue}a.push({relativePath:n.relativePath,symbol:n.symbol,contentHash:c.contentHash,depsDigest:c.depsDigest,payload:JSON.stringify(u)})}return{entries:a,sourceMissing:l,skippedUnsupportedLanguage:r}}var Q="typescript-callees-v3-alias-resolved";function G(t,s){let a=y(s);if(a==="typescript")return B(t,s,Q)?.key??null;let i=X(t,s);return a==="rust"?M(JSON.stringify({kind:"semantic-callees",language:a,engine:J(t.config.projectRoot),positionMapping:"nearby-leaf-v2-callsite-line",depsDigest:i})):i}function V(t){try{return JSON.parse(t)}catch{return null}}var W=A("semantic-deps-digest",{clearGroups:["whole-project","source-file"]});function X(t,s){return W.get(t,s,()=>{let i=[...U(t).get(s)??[]].sort().map(l=>`${l}:${g(t,l,d(t,l))}`);return M(i.join("|"))})}export{ce as a,q as b};
|
|
2
|
-
//# sourceMappingURL=chunk-WDSFQDPN.js.map
|
package/dist/chunk-WFA35BGR.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{d as j}from"./chunk-A4WEAK35.js";import{a as k}from"./chunk-MHGDSBFX.js";import{a as _}from"./chunk-2GJSD5GY.js";import{b as C}from"./chunk-ZGIQN2SX.js";import{a as T}from"./chunk-GC4DG2V5.js";import{i as S}from"./chunk-U3SXIMII.js";import{a as O,b as w,e as $}from"./chunk-F5GSBHC6.js";import{d as L,e as I,v as g}from"./chunk-C7C6AKAT.js";import{n as B,y as M}from"./chunk-RBAD4GJ2.js";import{k as P}from"./chunk-ETC674NS.js";import{a as F}from"./chunk-JZ2A7LDM.js";import{basename as le,extname as U}from"path";var ee=12,ne=280;function y(n,e,t,o){let i=te(n,e,t,o);if(i.size===0)return se();let r=[],s=new Set,l=(a,d,c,f)=>{if(d===e&&c<=o&&f>=t)return;let b=`${d}:${c}:${f}:${a}`;s.has(b)||(s.add(b),r.push({name:a,relativePath:d,startLine:c,endLine:f}))};for(let a of g(n,e))i.has(a.leaf)&&l(a.leaf,a.relativePath,a.startLine,a.endLine);for(let a of M(n,e)){let d=a.localName;if(!d||!i.has(d)||!a.sourcePath||a.kind==="namespace")continue;let c=a.importedName==="default"?d:a.importedName;for(let f of T(n,a.sourcePath,c,{maxReexportDepth:3}))l(d,f.relativePath,f.startLine,f.endLine)}r.sort(W);let u=r.map(a=>{let d=ie(n,a);return d?{...a,source:d}:null}).filter(a=>a!==null).slice(0,ee);return D(u)}function A(n,e=[]){return D(re(n.flatMap(t=>t?.inline??[]),e))}function Ne(n){return n?n.inline.reduce((e,t)=>e+t.name.length+t.source.length+32,0):0}function te(n,e,t,o){let i=B(n,e),r=new Set;if(!i)return r;for(let s=t;s<=o;s+=1)for(let l of i.identifiersByLine[s]??[])r.add(l);return r}function ie(n,e){if(e.startLine!==e.endLine)return null;let t=(P(n,e.relativePath)[e.startLine]??"").trim();if(!t||t.length>ne)return null;let o=t.indexOf("=");if(o<0||t[o+1]===">")return null;let i=t.slice(o+1).replace(/(?:\/\/|#).*$/u,"").trim();if(!i||i.includes("${")||/\b(?:function|class|struct|interface|trait|enum|lambda)\b/u.test(i))return null;let s=i.replace(/(['"`])(?:\\.|(?!\1).)*\1/gu,"").replace(/\b(?:0[xX][\dA-Fa-f_]+|0[bB][01_]+|0[oO][0-7_]+|\d[\d_]*(?:\.\d[\d_]*)?(?:[eE][+-]?\d+)?)n?\b/gu,""),l=new Set(["true","false","null","undefined","None","True","False"]);return(s.match(/[A-Za-z_][A-Za-z0-9_]*/gu)??[]).some(a=>!l.has(a))?null:t}function re(n,e){let t=new Map;for(let o of n){if(oe(o,e))continue;let i=`${o.relativePath}:${o.startLine}:${o.endLine}:${o.name}`;t.has(i)||t.set(i,{...o})}return[...t.values()].sort(W)}function oe(n,e){return e.some(t=>t.relativePath===n.relativePath&&t.startLine<=n.startLine&&t.endLine>=n.endLine)}function W(n,e){return n.relativePath.localeCompare(e.relativePath)||n.startLine-e.startLine||n.name.localeCompare(e.name)}function D(n){return{coverage:"indexed-project-literal-values",inline:n}}function se(){return D([])}function Ae(n,e,t={}){let{context:o=0}=t,i=Y(e);if(i)return q(n,i.filePath,i.startLine,i.endLine,o);let r=Q(n,e);if(r)return K(n,r);let s=O(n,e);return s?p(n,s,o):null}function We(n,e,t={}){if(e.length===0)throw new RangeError("code requires at least one selector.");if(e.length>24)throw new RangeError(`code accepts at most ${24} selectors per complete packet; received ${e.length}.`);let o=t.context??0,i=t.members??"exported",r=e.map(u=>ue(n,u,o,i)),s=r.flatMap(u=>u.results),l=s.map(u=>({relativePath:u.relativePath,startLine:u.startLine,endLine:u.endLine}));return{requested:e.length,matched:r.filter(u=>u.status==="matched").length,ambiguous:r.filter(u=>u.status==="ambiguous").length,missing:r.filter(u=>u.status==="missing").length,entries:r,bindingClosure:A(s.map(u=>u.bindingClosure),l)}}function ue(n,e,t,o){let i=Y(e);if(i){let d=q(n,i.filePath,i.startLine,i.endLine,t);return d?de(n,e,d,t):x(n,e,"definition-source-unreadable")}let r=Q(n,e);if(r)return fe(n,e,r,t,o);let s=w(n,e);if(!s.match)return x(n,e,"definition-not-found");let l=Le(n,s),u=l.map(V);if(s.total>1){let d=s.total<=4&&l.length===s.total;return{selector:e,status:"ambiguous",kind:"source",totalCandidates:s.total,results:d?l.flatMap(c=>{let f=p(n,c,t);return f?[f]:[]}):[],definitions:[],candidates:u,omittedCandidates:Math.max(0,s.total-u.length),suggestions:[]}}let a=p(n,s.match,t);return a?ve(e,a):x(n,e,"definition-source-unreadable")}function de(n,e,t,o){let i=g(n,t.relativePath).filter(a=>!X(a,t.relativePath)),r=ce(n,t,i),s=G(r.map(a=>p(n,a,o)).filter(a=>a!==null)).filter(a=>!J(t,a)),l=new Set(s.map(a=>a.symbol)),u=r.filter(a=>!l.has(a.symbol)&&!(t.startLine<=a.startLine&&t.endLine>=a.endLine)).map(V);return{selector:e,status:"matched",kind:"source",totalCandidates:1,results:[t,...s],definitions:[],candidates:[],omittedCandidates:0,suggestions:[],rangeCoverage:{basis:"requested-range-and-same-file-call-closure",referencedDefinitions:r.length,returnedDefinitions:r.length-u.length,returnedBodies:s.length,omittedDefinitions:u.length,omittedLedger:u}}}function ce(n,e,t){if(!h(e.freshness))return[];if(t.length===0)return[];let o=S(n,t,{additive:!1,semantic:!1}),i=new Map;for(let s of t){let l=i.get(s.symbol)??[];l.push(s),i.set(s.symbol,l)}let r=new Map;for(let s of t)if(!(s.endLine<e.startLine||s.startLine>e.endLine)){for(let l of o.get(s.symbolId)??[])if(l.file===e.relativePath&&!((l.source==="ast-callsite"||l.source==="scip-occurrence")&&(l.chunkId<e.startLine||l.chunkId>e.endLine)))for(let u of i.get(l.symbol)??[])r.set(u.symbolId,u)}return H(n,[...r.values()],t)}function fe(n,e,t,o,i){let r=t.relativePath,s=ge(n,r),l=h(t.freshness)?g(n,r).filter(m=>!X(m,r)):[],u=l.filter(m=>_(n,m)),a=u.length>0?u:me(s,l),d=i==="all"?[]:H(n,a,l),c=i==="all"||l.length===0?[K(n,t)]:G(d.map(m=>p(n,m,o)).filter(m=>m!==null)),f=he(s,c),b=be(r,s,c),N=Ce(s);return{selector:e,status:"matched",kind:"file-source",totalCandidates:1,results:c,definitions:[],candidates:[],omittedCandidates:0,suggestions:[],fileCoverage:{members:i,basis:i==="all"||l.length===0?"complete-file-source":u.length>0?"explicit-exports-and-same-file-reference-closure":"top-level-and-same-file-reference-closure",totalDefinitions:N,returnedDefinitions:f,returnedBodies:c.length,omittedDefinitions:Math.max(0,N-f),omittedLedger:b}}}function me(n,e){let t=new Set(n.map(o=>o.symbol));return e.filter(o=>t.has(o.symbol))}function ge(n,e){return k(n,e).flatMap(t=>pe(t,e)?t.children:[t])}function X(n,e){return z(e).has(n.leaf)}function pe(n,e){return z(e).has(I(n.symbol))}function z(n){let e=le(n);return new Set([e,e.slice(0,Math.max(0,e.length-U(e).length))])}function H(n,e,t){if(e.length===0)return[];let o=S(n,t,{additive:!0,semantic:!1}),i=new Map;for(let l of t){let u=i.get(l.symbol)??[];u.push(l),i.set(l.symbol,u)}let r=new Map,s=[...e];for(;s.length>0;){let l=s.shift();if(!r.has(l.symbolId)){r.set(l.symbolId,l);for(let u of o.get(l.symbolId)??[])for(let a of i.get(u.symbol)??[])r.has(a.symbolId)||s.push(a)}}return[...r.values()].sort(ye)}function G(n){let e=[...n].sort((o,i)=>o.relativePath.localeCompare(i.relativePath)||o.startLine-i.startLine||i.endLine-o.endLine),t=[];for(let o of e)t.some(i=>J(i,o))||t.push(o);return t}function K(n,e){let t=e.text.split(`
|
|
2
|
-
`);return{symbol:e.relativePath,shortName:e.relativePath,relativePath:e.relativePath,startLine:0,endLine:Math.max(0,t.length-1),language:n.get("SELECT language FROM documents WHERE relative_path = ?",e.relativePath)?.language??E(e.relativePath),source:e.text,freshness:e.freshness,...h(e.freshness)?{bindingClosure:y(n,e.relativePath,0,Math.max(0,t.length-1))}:{}}}function he(n,e){return v(n).filter(t=>e.some(o=>R(t,o))).length}function be(n,e,t){let o=[];return Z(o,n,e,t,0),o}function Z(n,e,t,o,i){for(let r of t){if(o.some(l=>R(r,l)))continue;let s=v(r.children).filter(l=>!o.some(u=>R(l,u))).length;n.push({symbol:r.symbol,shortName:r.shortName,relativePath:e,startLine:r.startLine,endLine:r.endLine,signature:r.signature,depth:i,nestedDefinitions:s}),Z(n,e,r.children,o,i+1)}}function v(n){return n.flatMap(e=>[e,...v(e.children)])}function Ce(n){return v(n).length}function R(n,e){return e.startLine<=n.startLine&&e.endLine>=n.endLine}function J(n,e){return n.relativePath===e.relativePath&&n.startLine<=e.startLine&&n.endLine>=e.endLine}function ye(n,e){return n.startLine-e.startLine||e.endLine-n.endLine||n.symbol.localeCompare(e.symbol)}function ve(n,e){return{selector:n,status:"matched",kind:"source",totalCandidates:1,results:[e],definitions:[],candidates:[],omittedCandidates:0,suggestions:[]}}function x(n,e,t){return{selector:e,status:"missing",kind:"source",totalCandidates:0,results:[],definitions:[],candidates:[],omittedCandidates:0,suggestions:$(n,e,5),reason:t}}function Q(n,e){try{return C(n,e)}catch(t){if(t instanceof F)return null;throw t}}function Le(n,e){if(!e.match)return[];let t=[e.match];for(let i of e.candidates){let r=g(n,i.relativePath).find(s=>s.symbol===i.symbol&&s.startLine===i.startLine);r&&t.push(r)}let o=new Set;return t.filter(i=>{let r=`${i.relativePath}:${i.startLine}:${i.endLine}:${i.symbol}`;return o.has(r)?!1:(o.add(r),!0)})}function V(n){return{symbol:n.symbol,shortName:L(n.symbol),relativePath:n.relativePath,startLine:n.startLine,endLine:n.endLine}}function Y(n){let e=n.match(/^(.+):(\d+)-(\d+)$/);if(!e)return null;let t=Number(e[2]),o=Number(e[3]);if(!Number.isSafeInteger(t)||t<1)throw new RangeError(`Source range start line must be a positive integer, got "${e[2]}".`);if(!Number.isSafeInteger(o)||o<t)throw new RangeError(`Source range end line must be an integer at or after ${t}, got "${e[3]}".`);return{filePath:e[1],startLine:t,endLine:o}}function p(n,e,t){let o=n.get("SELECT language FROM documents WHERE relative_path = ?",e.relativePath),i=C(n,e.relativePath);if(!i)return null;let s=i.text.split(`
|
|
3
|
-
`),l=e.endLine<=e.startLine?j(n,e.relativePath,e.startLine,Number.MAX_SAFE_INTEGER):null,u=l?.unitType?l.unitStartLine:e.startLine,a=l?.unitType?l.unitEndLine:e.endLine,d=Math.max(0,u-t),c=Math.min(s.length-1,a+t),f=s.slice(d,c+1).join(`
|
|
4
|
-
`);return{symbol:e.symbol,shortName:L(e.symbol),relativePath:e.relativePath,startLine:d,endLine:c,language:o?.language??E(e.relativePath),source:f,freshness:i.freshness,...h(i.freshness)?{bindingClosure:y(n,e.relativePath,d,c)}:{}}}function q(n,e,t,o,i){let r=C(n,e);if(!r)return null;let s=n.get("SELECT language FROM documents WHERE relative_path = ?",r.relativePath),u=r.text.split(`
|
|
5
|
-
`);if(t>u.length)return null;let a=Math.max(0,t-1-i),d=Math.min(u.length-1,o-1+i),c=u.slice(a,d+1).join(`
|
|
6
|
-
`);return{symbol:`${r.relativePath}:${t}-${o}`,shortName:`${r.relativePath}:${t}-${o}`,relativePath:r.relativePath,startLine:a,endLine:d,language:s?.language??E(r.relativePath),source:c,freshness:r.freshness,...h(r.freshness)?{bindingClosure:y(n,r.relativePath,a,d)}:{}}}function h(n){return!!(n&&n.semantic.state!=="stale"&&n.semantic.basis!=="no-compiler-document")}function E(n){switch(U(n).toLowerCase()){case".ts":case".tsx":case".mts":case".cts":return"typescript";case".js":case".jsx":case".mjs":case".cjs":return"javascript";case".py":case".pyi":return"python";case".rs":return"rust";case".go":return"go";case".java":return"java";case".kt":case".kts":return"kotlin";case".scala":return"scala";case".rb":return"ruby";case".php":return"php";case".cs":return"csharp";case".vb":return"vb";case".dart":return"dart";case".c":case".h":return"c";case".cc":case".cpp":case".cxx":case".hpp":case".hh":case".hxx":return"cpp";case".vue":return"vue";default:return null}}export{y as a,A as b,Ne as c,Ae as d,We as e};
|
|
7
|
-
//# sourceMappingURL=chunk-WFA35BGR.js.map
|
package/dist/chunk-WLMP3OCW.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as R,b as F}from"./chunk-V2RBODHL.js";import{a as k,b as C,c as V,e as o,f as v}from"./chunk-B3X6KU75.js";import{a as B,b as g}from"./chunk-KMVGRIO2.js";import{Q as y}from"./chunk-ZLMXIQLC.js";function j(e,s={}){let{minSimilarity:m=.45,minSharedBehaviors:t=6,limit:i=20,scope:l,scanLimit:c,filePattern:d,focusFiles:h}=s,u=y(e).vueProfiles({scope:l,minBehaviorTokens:Math.max(3,t),scanLimit:c}).map(r=>({file:r.file,tokens:r.behaviorTokens,profile:r})),n=R(u,r=>r.tokens);return F({profiles:u,limit:i,filePattern:d,focusFiles:h,candidateIndex:n,profile:{name:"vue-composable-candidates"},compare:(r,a)=>T(r,a,m,t),sort:(r,a)=>a.similarity-r.similarity||r.fileA.localeCompare(a.fileA)||r.fileB.localeCompare(a.fileB)})}function T(e,s,m,t){let i=B(e.tokens,s.tokens);if(i.size<t||!P(i))return null;let l=C(e.tokens,s.tokens);if(l<m)return null;let c=o(i,"composable:"),d=o(i,"store:"),h=o(i,"reactivity:"),u=o(i,"lifecycle:"),n=o(i,"request:"),r=o(i,"function:"),a=o(i,"function-verb:"),b=o(i,"template-binding:"),p=o(i,"template-event:"),f=q({sharedComposables:c,sharedStores:d,sharedReactivity:h,sharedLifecycle:u,sharedRequests:n,sharedFunctions:r,sharedFunctionVerbs:a,sharedBindings:b,sharedTemplateEvents:p});return{fileA:e.file,fileB:s.file,similarity:l,tokenCountA:e.tokens.size,tokenCountB:s.tokens.size,sharedTokens:v(i),sharedComposables:c,sharedStores:d,sharedReactivity:h,sharedLifecycle:u,sharedRequests:n,sharedFunctions:r,sharedFunctionVerbs:a,sharedBindings:b,sharedTemplateEvents:p,evidenceClass:f.evidenceClass,actionTier:f.actionTier,evidenceClassReasons:f.reasons,recommendation:f.recommendation,uniqueToA:v(g(e.tokens,s.tokens)).slice(0,25),uniqueToB:v(g(s.tokens,e.tokens)).slice(0,25),reason:S({sharedComposables:c,sharedStores:d,sharedRequests:n,sharedLifecycle:u,sharedFunctions:r,sharedFunctionVerbs:a,sharedBindings:b}),locA:e.profile.totalLines,locB:s.profile.totalLines}}function q(e){return k({genericWords:A,primitiveGroups:[{values:e.sharedReactivity,reasonPrefix:"shared reactivity primitive",bucket:"generic"},{values:e.sharedLifecycle,reasonPrefix:"shared lifecycle primitive",bucket:"generic"}],nameGroups:[{names:e.sharedComposables,label:"shared composable",fallbackBucket:"shared-abstraction"},{names:e.sharedStores,label:"shared store",fallbackBucket:"shared-abstraction"},{names:e.sharedRequests,label:"shared request",fallbackBucket:"generic"},{names:e.sharedFunctions,label:"shared function",fallbackBucket:"generic"},{names:e.sharedFunctionVerbs,label:"shared action verb",fallbackBucket:"generic"},{names:e.sharedBindings,label:"shared binding",fallbackBucket:"generic"},{names:e.sharedTemplateEvents,label:"shared template event",fallbackBucket:"generic"}],recommendation:w})}function w(e){switch(e){case"domain-behavior":return"Review for a shared composable, store, or feature module around the named domain behavior.";case"mixed":return"Separate generic Vue mechanics from domain-specific behavior before extracting a composable.";case"shared-abstraction":return"Review the existing composable/store usage first; extract only if duplicated behavior remains outside it.";case"generic-workflow-scaffolding":return"Treat as support evidence for a repeated workflow shape, not direct composable-extraction evidence."}}function P(e){let s=0,m=0,t=0,i=0,l=0,c=0,d=0;for(let n of e)n.startsWith("composable:")?s+=1:n.startsWith("store:")?m+=1:n.startsWith("request:")?t+=1:n.startsWith("lifecycle:")?i+=1:n.startsWith("function:")?l+=1:n.startsWith("reactivity:")?c+=1:(n.startsWith("function-verb:")||n.startsWith("template-binding:")||n.startsWith("template-event:"))&&(d+=1);let h=s+m,u=h+t+i+l+d;return V([{name:"requests",count:t},{name:"lifecycle",count:i},{name:"functions",count:l},{name:"reusableHooks",count:h},{name:"reactivity",count:c},{name:"namedBehavior",count:u}],[{min:{requests:1,namedBehavior:4},reason:"shared request workflow"},{min:{lifecycle:1,functions:2,namedBehavior:4},reason:"shared lifecycle workflow"},{min:{reusableHooks:2,requests:1,namedBehavior:5},reason:"shared reusable Vue hooks and requests"},{min:{reusableHooks:2,functions:2,namedBehavior:5},reason:"shared reusable Vue hooks and functions"},{min:{functions:2,reactivity:1,namedBehavior:4},reason:"shared reactive functions"}]).pass}function S(e){let s=[];return e.sharedComposables.length&&s.push(`shared composables: ${e.sharedComposables.join(", ")}`),e.sharedStores.length&&s.push(`shared stores: ${e.sharedStores.join(", ")}`),e.sharedRequests.length&&s.push(`shared request helpers: ${e.sharedRequests.join(", ")}`),e.sharedLifecycle.length&&s.push(`shared lifecycle: ${e.sharedLifecycle.join(", ")}`),e.sharedFunctions.length&&s.push(`shared functions: ${e.sharedFunctions.slice(0,6).join(", ")}`),e.sharedFunctionVerbs.length&&s.push(`shared action verbs: ${e.sharedFunctionVerbs.slice(0,6).join(", ")}`),e.sharedBindings.length&&s.push(`shared template bindings: ${e.sharedBindings.slice(0,6).join(", ")}`),s.join("; ")||"shared Vue behavior profile"}var A=new Set(["add","apply","cancel","change","clear","close","composable","create","data","delete","draft","edit","error","fetch","filter","form","item","items","load","loading","name","open","reactive","ref","refresh","remove","request","reset","resource","row","rows","save","saving","search","select","selected","store","submit","toggle","update","use","value","watch"]);export{j as a};
|
|
2
|
-
//# sourceMappingURL=chunk-WLMP3OCW.js.map
|
package/dist/chunk-WSA52GOR.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d}from"./chunk-Y5DFAW5W.js";import{E as c}from"./chunk-ZLMXIQLC.js";import{k as s}from"./chunk-ETC674NS.js";var p=new Set(["arrow_function","class_declaration","constructor_declaration","field_definition","function_declaration","function_definition","function_expression","function_item","generator_function_declaration","generator_function","lexical_declaration","method","method_declaration","method_definition","object_method","variable_declaration"]);function b(n,t,e){let o=c(n,t)?.rootNode??null,r=L(o,e);if(!r)return null;let a=s(n,t);if(a.length===0)return null;let u=Math.max(0,r.startPosition.row),i=r.endPosition.column===0?r.endPosition.row-1:r.endPosition.row;return{type:r.type,startLine:u,endLine:Math.min(a.length-1,Math.max(u,i))}}function y(n,t,e,o,r){let a=d(n,t,o,r,[e]),u=a.startLine===a.endLine&&/(?:=>|\(|\{|\[|,)\s*$/u.test(s(n,t)[a.startLine]??"");if(!u&&(a.startLine>o||a.endLine<r))return a;let i=b(n,t,e);return u&&i?{startLine:i.startLine,endLine:i.endLine}:i&&i.startLine>=o&&i.endLine<=r?{startLine:i.startLine,endLine:i.endLine}:{startLine:o,endLine:r}}function L(n,t){if(!n||!f(n,t))return null;let e=m(n,t);for(;e;){if(p.has(e.type))return e;e=e.parent}return null}function m(n,t){let e=n.namedChildren.filter(o=>f(o,t)).sort((o,r)=>l(o)-l(r));return e.length>0?m(e[0],t):n}function f(n,t){return n.startPosition.row<=t&&n.endPosition.row>=t}function l(n){return n.endIndex-n.startIndex}export{b as a,y as b};
|
|
2
|
-
//# sourceMappingURL=chunk-WSA52GOR.js.map
|
package/dist/chunk-WYPL7GF7.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as l}from"./chunk-3AF4TUFK.js";import{d as u}from"./chunk-JFMEXGFE.js";function a(e,r){return e.reason instanceof Error?e.reason:new Error(r)}function y(e,r){if(e?.aborted)throw a(e,r)}import{join as m}from"path";var w=e=>{if(!e||typeof e!="object"||Array.isArray(e))return null;let r=e.pid;return typeof r=="number"&&Number.isSafeInteger(r)&&r>0?{pid:r}:null};function h(e,r={}){return L(m(e,"gc.lock"),r)}function L(e,r={}){let i=r.waitMs??0,t=r.pollMs??10,o=r.now??u,n=o()+i;do{let c=b(e,r.directoryDurability);if(c)return d(c);let s=n-o();if(s<=0)return null;f(Math.min(t,s))}while(o()<=n);return null}async function D(e,r={}){let i=r.waitMs??0,t=r.pollMs??10,o=r.now??u,n=o()+i;do{y(r.signal,"Lock acquisition was aborted.");let c=b(e,r.directoryDurability);if(c)return d(c);let s=n-o();if(s<=0)return null;await k(Math.min(t,s),r.signal)}while(o()<=n);return null}function b(e,r){let i=l(e,{kind:"generic",parseLegacy:w,...r?{directoryDurability:r}:{}});return i.kind==="acquired"?i.lock:null}function d(e){return{release:()=>{e.release()}}}function f(e){let r=new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT));Atomics.wait(r,0,0,e)}function k(e,r){return r?.aborted?Promise.reject(a(r,"Lock acquisition was aborted.")):new Promise((i,t)=>{let o=setTimeout(()=>{r?.removeEventListener("abort",n),i()},e),n=()=>{clearTimeout(o),r?.removeEventListener("abort",n),t(r?a(r,"Lock acquisition was aborted."):new Error("Lock acquisition was aborted."))};r?.addEventListener("abort",n,{once:!0})})}export{a,y as b,h as c,L as d,D as e};
|
|
2
|
-
//# sourceMappingURL=chunk-WYPL7GF7.js.map
|
package/dist/chunk-X3YVZAKZ.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{b as L}from"./chunk-WSA52GOR.js";import{d as S}from"./chunk-ZGIQN2SX.js";import{a as h,b as T}from"./chunk-FLMTCX5R.js";import{a as C}from"./chunk-DHEQMPLW.js";import{C as I,d as f,k as w,v as F}from"./chunk-C7C6AKAT.js";import{n as v}from"./chunk-RBAD4GJ2.js";import{K as x}from"./chunk-ZLMXIQLC.js";import{j as g}from"./chunk-ETC674NS.js";function z(e,t,n){let r=[],o=[],s=new Map;for(let i of[...e].sort(n)){let l=i.channel??"default",d=t[l]??Number.MAX_SAFE_INTEGER,a=s.get(l)??0;if(a>=d){o.push(i);continue}r.push(i),s.set(l,a+1)}return{selected:r,omitted:o}}function k(e,t,n,r,o=!1){let s=[...e],i=[],l=new Set,d=0;for(;s.length>0&&i.length<t;){let a=s.filter(u=>d+u.evidenceCharacters<=n||o&&i.length===0);if(a.length===0)break;let c=a.filter(u=>u.roles.includes("location")||u.roles.includes("definition")).sort(r);a.sort((u,p)=>R(p,l)-R(u,l)||r(u,p));let m=c[0]??a[0];i.push(m),d+=m.evidenceCharacters;for(let u of P(m))l.add(u.key);s.splice(s.indexOf(m),1)}return{selected:i,omitted:s.sort(r)}}function R(e,t){let n=P(e).reduce((s,i)=>s+(t.has(i.key)?0:i.weight),0),r=Math.max(0,8-e.priority)*20,o=Math.min(500,Math.ceil(e.evidenceCharacters/160));return n+r-o}function P(e){return[...e.reasons.map(K),...e.roles.map(t=>({key:`role:${t}`,weight:$(t)})),{key:`file:${e.relativePath}`,weight:180},{key:`scope:${A(e.relativePath)}`,weight:120},{key:`kind:${e.fileKind}`,weight:40},...e.symbols.map(t=>({key:`symbol:${t}`,weight:100})),...e.behaviorSignals.map(t=>({key:`behavior:${t}`,weight:70}))]}function K(e){let t=e.indexOf(":"),n=t<0?e:e.slice(0,t);return n==="dependency"||n==="consumer"?{key:`reason:${n}`,weight:220}:{key:`reason:${e}`,weight:n==="location"||n==="definition"?1400:800}}function $(e){switch(e){case"location":return 1200;case"definition":return 1100;case"reference":return 600;case"caller":case"callee":return 550;case"dependency":case"consumer":return 500;case"search":return 400;default:return 300}}function A(e){let t=e.lastIndexOf("/");return t<0?e:e.slice(0,t)}var E=64,M=12;function te(e,t,n={}){if(t.length===0)return[];let r=n.context??6;if(!Number.isSafeInteger(r)||r<0)throw new RangeError(`context must be a non-negative safe integer; received ${r}`);let o=n.limit??12;if(!Number.isSafeInteger(o)||o<=0)throw new RangeError(`limit must be a positive safe integer; received ${o}`);let s=t.map(i=>{if(i.length===0)throw new Error("The source search pattern must not be empty.");return{pattern:i,regexp:n.regexp?C(i,"source search pattern",n.ignoreCase?"iu":"u"):null,literal:n.ignoreCase?i.toLocaleLowerCase():i,identities:[],fileCoverage:[],textByPath:new Map}});if(!n.regexp&&!n.ignoreCase){let i=s.map(d=>Buffer.from(d.pattern,"utf8")),l=S(e,{scope:n.scope,literalBytes:i.length===1?i[0]:i},(d,a)=>{let c=g(d.text);if(c.length!==0)for(let m of a){let u=s[m];u&&_(e,u,d,c,n)}});return s.map(d=>B(d,l,r,o,n))}return s.map(i=>{let l=S(e,{scope:n.scope},d=>{let a=g(d.text);a.length>0&&_(e,i,d,a,n)});return B(i,l,r,o,n)})}function _(e,t,n,r,o){let s=[];for(let a=0;a<r.length;a+=1){let c=r[a]??"",m=c.endsWith("\r")?c.slice(0,-1):c;(t.regexp?t.regexp.test(m):(o.ignoreCase?m.toLocaleLowerCase():m).includes(t.literal))&&s.push(a)}if(s.length===0)return;let i=n.relativePath;t.textByPath.set(i,n.text);let l=n.freshness.semantic.state!=="stale"&&n.freshness.semantic.basis!=="no-compiler-document"?F(e,i):[],d=v(e,i)?.callables??[];for(let a of s){let c=I(l,a),m=x(d,a),u=c&&!w(c.symbol)?c:null,p=u?.startLine??m?.startLine??c?.startLine??a,y=u?.endLine??m?.endLine??c?.endLine??a,b=L(e,i,a,p,y);t.identities.push({relativePath:i,focusLine:a,ownerSymbol:u?.symbol??null,ownerShort:u?f(u.symbol):m?.name??(c?f(c.symbol):null),ownerStartLine:b.startLine,ownerEndLine:b.endLine,fileKind:T(i),freshness:n.freshness})}t.fileCoverage.push({relativePath:i,matchingLines:s.length,returnedMatches:0,freshness:n.freshness})}function B(e,t,n,r,o){e.identities.sort(N);let s=e.identities.length>E?O(e.identities,E):e.identities,l=(r===Number.MAX_SAFE_INTEGER?e.identities:o.ranking?O(e.identities,r):e.identities.slice(0,r)).flatMap(c=>{let m=e.textByPath.get(c.relativePath),u=m===void 0?null:D(c.relativePath,m,c.focusLine,n);return u?[{...u,...c}]:[]}),d=new Map;for(let c of l)d.set(c.relativePath,(d.get(c.relativePath)??0)+1);for(let c of e.fileCoverage)c.returnedMatches=d.get(c.relativePath)??0;let a=H(e.fileCoverage);return{pattern:e.pattern,mode:o.regexp?"regexp":"literal",identities:e.identities,...s.length<e.identities.length?{identityManifest:s}:{},identityCoverage:{mode:s.length===e.identities.length?"complete":"bounded",returned:s.length,total:e.identities.length,omitted:e.identities.length-s.length},matches:l,matchingLines:e.identities.length,matchingFiles:e.fileCoverage.length,omittedMatches:Math.max(0,e.identities.length-l.length),fileCoverage:e.fileCoverage,scopeHints:a.slice(0,M),omittedScopeHints:Math.max(0,a.length-M),scannedFiles:t.scannedTextFiles,textCoverage:{basis:"current-project-text-files",candidateFiles:t.candidateFiles,scannedTextFiles:t.scannedTextFiles,scannedBytes:t.scannedBytes,skippedBinaryPaths:t.skippedBinaryPaths,skippedUnreadablePaths:t.skippedUnreadablePaths,skippedOversizedPaths:t.skippedOversizedPaths,semanticFiles:t.semanticFiles}}}function D(e,t,n,r){let o=t.split(`
|
|
2
|
-
`),s=t.endsWith(`
|
|
3
|
-
`)?o.length-1:o.length;if(n<0||n>=s)return null;let i=Math.max(0,n-r),l=Math.min(s-1,n+r);return{relativePath:e,startLine:i,endLine:l,focusLine:n,source:o.slice(i,l+1).join(`
|
|
4
|
-
`)}}function H(e){let t=new Map;for(let n of e){let r=j(n.relativePath),o=t.get(r)??{matchingLines:0,matchingFiles:0};o.matchingLines+=n.matchingLines,o.matchingFiles+=1,t.set(r,o)}return[...t.entries()].map(([n,r])=>({scope:n,...r})).sort((n,r)=>r.matchingLines-n.matchingLines||r.matchingFiles-n.matchingFiles||n.scope.localeCompare(r.scope))}function j(e){let t=e.lastIndexOf("/");return t<0?e:e.slice(0,t)}function O(e,t){let n=e.map((o,s)=>({...o,priority:h(o.fileKind),sequence:s,evidenceCharacters:1,roles:["search"],reasons:["search"],symbols:o.ownerSymbol?[o.ownerSymbol]:[],behaviorSignals:[]})),r=[];for(let o of[0,1,2]){let s=t-r.length;if(s===0)break;let i=n.filter(l=>h(l.fileKind)===o);r.push(...k(i,s,Number.MAX_SAFE_INTEGER,N).selected)}return r.map(({priority:o,sequence:s,evidenceCharacters:i,roles:l,reasons:d,symbols:a,behaviorSignals:c,...m})=>m)}function N(e,t){return h(e.fileKind)-h(t.fileKind)||+(t.ownerSymbol!==null)-+(e.ownerSymbol!==null)||e.relativePath.localeCompare(t.relativePath)||e.focusLine-t.focusLine}export{z as a,k as b,te as c};
|
|
5
|
-
//# sourceMappingURL=chunk-X3YVZAKZ.js.map
|
package/dist/chunk-X6OGVFIT.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as z,d as B,e as E}from"./chunk-EHYDXE3Z.js";import{a as O,b as G,c as M,d as J}from"./chunk-3AF4TUFK.js";import{b as Y,c as k}from"./chunk-T3CZAZSI.js";import{a as x}from"./chunk-B3PYOSCX.js";import{b as g}from"./chunk-H5EXS3HM.js";import{a as U,b as w,c as C,d as T}from"./chunk-JFMEXGFE.js";import{J as Q,N as D,j as _,k as m,l as K}from"./chunk-7HXT6YLU.js";import{h as I}from"./chunk-7F45LJKI.js";import{statSync as ve,watch as ge}from"fs";function He(e){let t=!1,r=!1,i,n=[],s=[...new Set(e)],c=new Map,a=u=>{try{return ve(u).mtimeMs}catch{return null}},o=()=>{for(let u of s)c.set(u,a(u))},d=()=>s.some(u=>a(u)!==c.get(u));o();let p=()=>{r=!0;let u=i;i=void 0,u?.()};for(let u of s)try{let v=ge(u,{persistent:!1},p);v.on("error",()=>{}),n.push(v)}catch{}return{wait(u){return t||u<=0?(r=!1,Promise.resolve()):new Promise(v=>{let Se=setTimeout(()=>{i===W&&(i=void 0),v()},u),W=()=>{clearTimeout(Se),i===W&&(i=void 0),v()};i=W,(r||t||d())&&(r=!1,o(),W())})},close(){if(!t){t=!0;for(let u of n)try{u.close()}catch{}n.length=0}p()}}}import{spawn as xe}from"child_process";import{existsSync as Oe,rmSync as ae}from"fs";import{dirname as at,resolve as V}from"path";import{fileURLToPath as ut}from"url";import{createHash as ye,randomUUID as L}from"crypto";import{existsSync as Re,linkSync as We,readdirSync as Ie,rmSync as S}from"fs";import{basename as we,dirname as ke,join as l}from"path";var h=1,Ee=10*6e4,be=10080*6e4,A="requests",y="claims",b="completions",Z="staging";function ze(e,t,r={}){let i=r.now?.()??new Date,n=qe(r.ttlMs),s=Ce(r.idempotencyKey),c=s?`key-${ye("sha256").update(s).digest("hex")}`:`request-${(r.randomId??L)()}`,a={version:h,requestId:c,...s?{idempotencyKey:s}:{},createdAt:i.toISOString(),deadlineAt:new Date(i.getTime()+n).toISOString(),detail:t.trim().slice(0,2048)||"stale index observed by a command"},o=se(e,c),d=$(e,o,a,r.onStage);if(d.published)return{disposition:"accepted",request:a,achievedDurability:d.achievedDurability,directorySync:d.directorySync};let p=N(o);if(!p)throw new Error(`Watch refresh request identity ${c} exists but is malformed.`);return{disposition:"duplicate",request:p}}function Be(e,t={}){let r=t.now?.()??new Date,i=`claim-${(t.randomId??L)()}`,n=Math.max(1,Math.floor(t.limit??64)),s=re(e).sort(Te),c=[];for(let a of s){if(c.length>=n)break;if(X(e,a.requestId))continue;if(Date.parse(a.deadlineAt)<=r.getTime()){te(e,{version:h,requestId:a.requestId,outcome:"expired",completedAt:r.toISOString()});continue}let o={version:h,requestId:a.requestId,claimId:i,claimedAt:r.toISOString()};if($(e,oe(e,a.requestId),o).published){if(X(e,a.requestId)){ie(e,a.requestId,i);continue}c.push(a)}}return{claimId:i,requests:c}}function Xe(e,t,r=()=>new Date,i){let n=r().toISOString();for(let s of t.requests)te(e,{version:h,requestId:s.requestId,claimId:t.claimId,outcome:"completed",completedAt:n});i?.("after-completion"),Ae(e,t),i?.("after-claim-release")}function Ae(e,t){for(let r of t.requests)ie(e,r.requestId,t.claimId)}function Ze(e){let t=0;for(let r of f(l(e,y)))S(r,{force:!0}),t++;return t>0&&m(l(e,y)),ne(e),t}function et(e){let t=re(e),r=new Map,i=Pe(l(e,A),N);for(let o of f(l(e,b))){let d=P(o);if(!d){i++;continue}r.set(d.requestId,d)}let n=new Set;for(let o of f(l(e,y))){let d=ee(o);if(!d){i++;continue}n.add(d.requestId)}let s=t.filter(o=>!r.has(o.requestId)&&!n.has(o.requestId)),c=[...r.values()].filter(o=>o.outcome==="completed").length,a=[...r.values()].filter(o=>o.outcome==="expired").length;return{pending:s.length,claimed:t.filter(o=>!r.has(o.requestId)&&n.has(o.requestId)).length,completed:c,expired:a,invalid:i,...s.length>0?{oldestPendingAt:s.map(o=>o.createdAt).reduce((o,d)=>_e(o,d))}:{}}}function tt(e,t={}){let r=(t.now?.()??new Date).getTime(),i=Math.max(0,t.retentionMs??be),n=0;for(let s of f(l(e,b))){let c=P(s);!c||r-Date.parse(c.completedAt)<i||(S(s,{force:!0}),S(se(e,c.requestId),{force:!0}),n++)}return n>0&&(m(l(e,b)),m(l(e,A))),ne(e),n}function N(e){return F(e,t=>{let r=t;return r.version===h&&R(r.requestId)&&(r.idempotencyKey===void 0||typeof r.idempotencyKey=="string")&&g(r.createdAt)&&g(r.deadlineAt)&&Date.parse(r.deadlineAt)>=Date.parse(r.createdAt)&&typeof r.detail=="string"&&r.detail.length>0})}function ee(e){return F(e,t=>{let r=t;return r.version===h&&R(r.requestId)&&R(r.claimId)&&g(r.claimedAt)})}function P(e){return F(e,t=>{let r=t;return r.version===h&&R(r.requestId)&&(r.claimId===void 0||R(r.claimId))&&(r.outcome==="completed"||r.outcome==="expired")&&g(r.completedAt)})}function te(e,t){let r=ce(e,t.requestId);if($(e,r,t).published)return;let i=P(r);if(!i||i.requestId!==t.requestId||i.outcome!==t.outcome)throw new Error(`Watch refresh completion ${t.requestId} conflicts with an existing record.`)}function $(e,t,r,i){let n=l(e,Z),s=ke(t),c=_(n),a=_(s),o=l(n,`${we(t)}.${process.pid}.${L()}.tmp`);try{let d=k(o,r,{spacing:2,trailingNewline:!0});i?.("after-staged");try{We(o,t)}catch(u){if(u.code==="EEXIST")return{published:!1};throw u}let p=K(c,a,d.directorySync,m(s));return i?.("after-published"),{published:!0,achievedDurability:p==="synced"?"directory-durable":"file-flushed",directorySync:p}}finally{S(o,{force:!0})}}function re(e){let t=[];for(let r of f(l(e,A))){let i=N(r);i&&t.push(i)}return t}function ie(e,t,r){let i=oe(e,t),n=ee(i);!n||n.claimId!==r||(S(i,{force:!0}),m(l(e,y)))}function ne(e){for(let t of f(l(e,Z),".tmp"))S(t,{force:!0})}function Pe(e,t){return f(e).filter(r=>!t(r)).length}function f(e,t=".json"){return Re(e)?Ie(e,{withFileTypes:!0}).filter(r=>r.isFile()&&r.name.endsWith(t)).map(r=>l(e,r.name)).sort():[]}function F(e,t){try{let r=JSON.parse(I(e,"watch refresh request record"));return t(r)?r:null}catch{return null}}function se(e,t){return l(e,A,`${t}.json`)}function oe(e,t){return l(e,y,`${t}.json`)}function ce(e,t){return l(e,b,`${t}.json`)}function X(e,t){return P(ce(e,t))!==null}function qe(e){if(e===void 0)return Ee;if(!Number.isFinite(e)||e<=0)throw new Error("Watch refresh request ttlMs must be positive.");return Math.floor(e)}function Ce(e){let t=e?.trim();return t?t.slice(0,512):void 0}function R(e){return typeof e=="string"&&/^[a-z0-9][a-z0-9-]{0,127}$/i.test(e)}function Te(e,t){return Date.parse(e.createdAt)-Date.parse(t.createdAt)||e.requestId.localeCompare(t.requestId)}function _e(e,t){return Date.parse(t)<Date.parse(e)?t:e}var Me=6e3,De=1e3,de=10;function yt(e,t,r){let i=D(V(e));if(r&&D(r.projectRoot)===i)return{projectRoot:i,worktreeKind:"git",worktreeId:r.worktreeId,cliVersion:t};let n=Q(i);if(n.kind==="error")throw new Error(`Could not establish Git worktree identity for ${i}: ${n.message}`);return n.kind==="non-git"?{projectRoot:i,worktreeKind:"non-git",cliVersion:t}:{projectRoot:i,worktreeKind:"git",worktreeId:n.identity.worktreeId,cliVersion:t}}function Rt(e){let t=e.runtime??$e,r=z(e.cacheDir),i=B(r.statePath),n=i?le(i,t)?{kind:"live",state:i}:{kind:"stale",state:i,reason:"dead-process"}:{kind:"stopped"},s=Le("stop",n);if(s.kind==="signal-stop")return ue(s.state,e,t),H(r,s.state.pid,t),{disposition:"stopped",pid:s.state.pid};if(s.kind==="clean-stale")return H(r,s.state.pid,t),{disposition:"stopped",pid:s.state.pid};let c=he(r.lockPath);return s.kind==="already-stopped"&&c?(le(c,t)&&ue(c,e,t),H(r,c.pid,t),{disposition:"stopped",pid:c.pid}):{disposition:"already-stopped"}}function Wt(e,t,r={}){let{durability:i="durable",...n}=r;i==="durable"?k(e,t,n):Y(e,t,n)}function It(e){try{let t=JSON.parse(I(e,"watch activity record"));return t.version!==1||!E(t.at)||t.refreshRequestedAt!==void 0&&!E(t.refreshRequestedAt)||t.refreshDetail!==void 0&&typeof t.refreshDetail!="string"?null:{atMs:Date.parse(t.at),...t.refreshRequestedAt===void 0?{}:{refreshRequestedAtMs:Date.parse(t.refreshRequestedAt)},...t.refreshDetail===void 0?{}:{refreshDetail:t.refreshDetail}}}catch{return null}}function wt(e,t,r={}){let i=r.pid??process.pid,n=r.isProcessAlive??x,s=()=>{},c=r.readProcessIdentity??C,a=r.now??(()=>new Date),o={...O,wallNow:()=>a().getTime(),isProcessAlive:n,readProcessIdentity:c},d=G(e,{kind:"watch",pid:i,processIdentity:c(i),detail:{projectRoot:V(t)},parseLegacy:q,runtime:o});if(d.kind==="contended"){let p=fe(d.observation);return{acquired:!1,lockPath:e,message:Ne(e,t,p),release:s}}return{acquired:!0,lockPath:e,message:"",release:()=>{d.lock.release()}}}function he(e){return fe(M(e,{parseLegacy:q}))}var q=e=>{let t=me(e);return t?{pid:t.pid,...t.processIdentity?{processIdentity:t.processIdentity}:{}}:null};function fe(e){if(e.state==="valid"&&e.record?.kind==="watch"){let t=e.record.detail?.projectRoot;return typeof t!="string"?null:{version:1,pid:e.record.pid,...e.record.processIdentity?{processIdentity:e.record.processIdentity}:{},projectRoot:t,startedAt:e.record.startedAt}}return me(e.parsed)}function me(e){try{let t=e;if(t.version!==1||typeof t.pid!="number"||!Number.isInteger(t.pid)||t.pid<=0||typeof t.projectRoot!="string"||!E(t.startedAt))return null;let r=t.processIdentity===void 0?null:U(t.processIdentity);return t.processIdentity!==void 0&&(!r||r.pid!==t.pid)?null:{version:1,pid:t.pid,...r?{processIdentity:r}:{},projectRoot:t.projectRoot,startedAt:t.startedAt}}catch{return null}}function Le(e,t){switch(e){case"status":return{kind:"report",classification:t};case"ensure":switch(t.kind){case"stopped":return{kind:"start"};case"stale":return t.reason==="old-heartbeat"?{kind:"refuse-replace",state:t.state,reason:"old-heartbeat"}:{kind:"start"};case"live":return{kind:"reuse",state:t.state};case"incompatible":return{kind:"replace",state:t.state};default:return j(t)}case"stop":switch(t.kind){case"stopped":return{kind:"already-stopped"};case"stale":return t.reason==="old-heartbeat"?{kind:"signal-stop",state:t.state}:{kind:"clean-stale",state:t.state};case"live":case"incompatible":return{kind:"signal-stop",state:t.state};default:return j(t)}default:return j(e)}}function kt(e){return e.idleTimeoutMs===0||e.watcher.state!=="idle"?!1:e.nowMs-e.lastActivityAtMs>=e.idleTimeoutMs}function ue(e,t,r){let{pid:i}=e;if(!r.isProcessAlive(i))return;pe(e,r),r.signalProcess(i);let n=t.stopTimeoutMs??Me,s=r.monotonicNow??T,c=s()+n;for(;s()<=c;){if(!r.isProcessAlive(i))return;r.sleep(de)}if(!r.forceSignalProcess)throw new Error(`scip-query watch service pid ${i} did not stop within ${n}ms and forced termination is unavailable.`);pe(e,r),r.forceSignalProcess(i);let a=t.forceStopTimeoutMs??De,o=s()+a;for(;s()<=o;){if(!r.isProcessAlive(i))return;let d=r.readProcessIdentity(i);if(e.processIdentity&&d&&!w(e.processIdentity,d))return;r.sleep(de)}throw new Error(`scip-query watch service pid ${i} remained alive ${a}ms after forced termination.`)}function H(e,t,r){if(ae(e.statePath,{force:!0}),ae(e.activityPath,{force:!0}),he(e.lockPath)?.pid===t){let n={...O,wallNow:r.now,isProcessAlive:r.isProcessAlive,readProcessIdentity:r.readProcessIdentity},s=M(e.lockPath,{parseLegacy:q,runtime:n});J(e.lockPath,s,{parseLegacy:q,runtime:n})}}function le(e,t){if(!t.isProcessAlive(e.pid))return!1;if(!e.processIdentity)return!0;let r=t.readProcessIdentity(e.pid);return r===null||w(e.processIdentity,r)}function Ne(e,t,r){return`error: scip-query watch is already running for ${V(t)}${r?` (pid ${r.pid}, started ${r.startedAt}; lock: ${e})`:` (lock: ${e})`}. Stop that watcher before starting another.`}var $e={now:Date.now,monotonicNow:T,isProcessAlive:x,readProcessIdentity:C,spawnServer(e,t,r,i){if(!Oe(e))throw new Error(`Watch service helper was not found at ${e}. Run npm run build first.`);xe(process.execPath,[e,t,r,JSON.stringify(i)],{detached:!0,stdio:"ignore",env:{...process.env,SCIP_QUERY_SKIP_WATCH_SERVICE:"1"}}).unref()},signalProcess(e){process.kill(e,"SIGTERM")},forceSignalProcess(e){process.kill(e,"SIGKILL")},sleep(e){let t=new Int32Array(new SharedArrayBuffer(4));Atomics.wait(t,0,0,e)}};function pe(e,t){if(!e.processIdentity)throw new Error(`Refusing to signal scip-query watch pid ${e.pid}: its ownership record has no process identity.`);let r=t.readProcessIdentity(e.pid);if(!r)throw new Error(`Refusing to signal scip-query watch pid ${e.pid}: its process identity is unavailable.`);if(!w(e.processIdentity,r))throw new Error(`Refusing to signal scip-query watch pid ${e.pid}: its process identity does not match the ownership record.`)}function j(e){throw new Error(`Unhandled watch service value: ${JSON.stringify(e)}`)}export{He as a,ze as b,Be as c,Xe as d,Ae as e,Ze as f,et as g,tt as h,yt as i,Rt as j,Wt as k,It as l,wt as m,kt as n};
|
|
2
|
-
//# sourceMappingURL=chunk-X6OGVFIT.js.map
|
package/dist/chunk-XDAUYDFT.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var a=[{id:"general-interprocedural-value-flow",families:["dataflow"],capability:"Whole-program definition-use flow through arbitrary calls and returns is unavailable.",consequence:"Missing dataflow edges cannot establish that a value never crosses an unmodeled call.",recoverWith:["value-flow","dependence-slice","inspect","code"]},{id:"heap-aliasing",families:["dataflow","state"],capability:"Heap points-to and cross-instance alias analysis are unavailable.",consequence:"Missing field or state edges cannot establish that two references never reach the same object.",recoverWith:["value-flow","dependence-slice","inspect","code"]},{id:"exceptional-flow",families:["execution","dataflow","temporal"],capability:"Interprocedural exception propagation and finally completion flow are unavailable.",consequence:"Normal-path reachability and ordering do not establish behavior after a throw or rejection.",recoverWith:["dependence-slice","inspect","code"]},{id:"reflection",families:["execution","runtime","identity","dependencies"],capability:"Reflective lookup, dynamic loading, and name-computed invocation are unavailable without exact evidence.",consequence:"Missing static edges cannot establish that a construct is unreachable through reflection.",recoverWith:["search","inspect","code"]},{id:"generated-dispatch",families:["execution","runtime","identity"],capability:"Dispatch tables or names created only by generated or unavailable source are unavailable.",consequence:"Missing dispatch edges cannot establish that no generated consumer exists.",recoverWith:["search","inspect","code"]},{id:"unsupported-framework-adapters",families:["runtime","dataflow","state","temporal"],capability:"Framework runtime crossings without a registered source adapter are unavailable.",consequence:"Missing boundary edges cannot establish that no producer, consumer, state effect, or ordering exists.",recoverWith:["search","inspect","code"]}];function s(t){let i=new Set(t);return a.filter(n=>n.families.some(r=>i.has(r)))}function u(t){return s(t).map(i=>`[${i.id}] ${i.capability} ${i.consequence} Recover selected paths with: ${i.recoverWith.map(n=>`scip-query ${n}`).join(", ")}.`)}var c=["incoming","outgoing","both"];function e(t,i,n,r={}){return{family:t,subtype:i,...r.match?{match:r.match}:{},directions:c,evidenceStrengths:r.strengths??["exact","derived","mixed"],supportCeiling:r.supportCeiling??"partial",establishes:n,nonClaims:r.nonClaims??[],recoverWith:r.recoverWith??["inspect","code"]}}var l=["predicate-consequence","predicate-alternative","predicate-fallthrough","predicate-case","predicate-default","predicate-return","predicate-throw","loop-iteration","loop-exit","exception-handler","finally-cleanup","handler-return","handler-throw"],d=["captured-value-to-state","constant-to-state","expression-to-state","property-to-state","return-to-state","value-to-state"],p=["await-completion-before","awaits-completion","inside-lock-scope","lexical-successor"],h=[{id:"indexed-program-identity",label:"SCIP/compiler identity and source ownership",requirements:["indexed-graph"],relations:[e("execution","call","The source construct may call the resolved target.",{strengths:["exact","derived","candidate","mixed"],nonClaims:["Static may-call reachability does not prove that an invocation occurred at runtime."],recoverWith:["call-graph","inspect","code"]}),e("execution","result-callback","The referenced callable can produce the result consumed by this path.",{nonClaims:["A callback relationship does not prove invocation order or runtime selection."],recoverWith:["call-graph","inspect","code"]}),e("contract","uses-contract-symbol","The source construct refers to the identified contract symbol.",{supportCeiling:"exact",nonClaims:["Contract identity does not prove runtime invocation or behavioral conformance."],recoverWith:["hierarchy","inspect","code"]}),e("identity","references","The occurrence resolves to the identified compiler-owned symbol.",{supportCeiling:"exact",nonClaims:["A reference does not establish execution or value transfer."],recoverWith:["refs","trace","inspect"]}),e("ownership","contains","The owner contains the identified program construct.",{supportCeiling:"exact",nonClaims:["Structural containment does not establish runtime lifetime or sharing scope."],recoverWith:["outline","inspect"]}),e("ownership","contains-","The owner contains the identified program construct.",{match:"prefix",supportCeiling:"exact",nonClaims:["Structural containment does not establish runtime lifetime or sharing scope."],recoverWith:["outline","inspect"]}),e("ownership","owns-","The owner owns the identified source or runtime observation.",{match:"prefix",supportCeiling:"exact",nonClaims:["Observation ownership does not establish singleton lifetime or exclusive ownership."],recoverWith:["inspect","code"]}),e("dependencies","imports","The source file or module statically imports the indexed target.",{nonClaims:["An import does not establish that imported code executes."],recoverWith:["imports","deps","code"]}),e("dependencies","imports-external","The source region statically imports an external package.",{nonClaims:["An external import does not establish which package behavior executes."],recoverWith:["imports","code"]})]},{id:"runtime-boundary-join",label:"source-grounded runtime-boundary joins",requirements:["indexed-graph","source-facts"],relations:[e("runtime","runtime-handoff","A producer and consumer share a source-grounded runtime rendezvous.",{strengths:["exact","derived","candidate","mixed"],nonClaims:["A candidate or unresolved join does not prove a runtime handoff."],recoverWith:["evidence","inspect","code"]}),e("runtime","discriminator-dispatch","A serialized discriminator selects the reported consumer.",{strengths:["exact","derived","mixed"],nonClaims:["The dispatch edge does not prove delivery, retry, or successful handling."],recoverWith:["evidence","inspect","code"]}),e("dataflow","serialized-discriminator-transfer","The producer serializes the discriminator consumed by dispatch.",{strengths:["exact","derived","mixed"],nonClaims:["This edge does not establish the flow of every payload field."],recoverWith:["value-flow","inspect","code"]}),e("temporal","enqueue-before-consume","The reported enqueue precedes a possible consume through the queue.",{strengths:["exact","derived","mixed"],nonClaims:["Queue order does not establish delivery time, uniqueness, retry count, or durability."],recoverWith:["evidence","inspect","code"]})]},{id:"parser-control-dependence",label:"parser-proved intraprocedural control dependence",requirements:["indexed-graph","source-facts"],relations:[...l.map(t=>e("execution",t,"The outcome is control-dependent on the reported predicate or handler.",{strengths:["exact"],nonClaims:["Local control dependence does not establish that the containing function executes."],recoverWith:["dependence-slice","inspect","code"]})),e("execution","returns","The selected construct contains the reported return terminal.",{strengths:["exact"],nonClaims:["A local return terminal does not establish that the containing callable executes."],recoverWith:["inspect","code"]}),e("execution","throws","The selected construct contains the reported throw terminal.",{strengths:["exact"],nonClaims:["A local throw terminal does not establish propagation, handling, or callable execution."],recoverWith:["inspect","code"]})]},{id:"bounded-static-value-flow",label:"compiler callsites and bounded static value evaluation",requirements:["indexed-graph","source-facts"],relations:["argument-to-parameter","constant-to-parameter","property-to-parameter","return-to-parameter","return-to-call-result"].map(t=>e("dataflow",t,"The reported value may reach the target through the evidenced callsite transfer.",{strengths:["exact","derived","mixed"],nonClaims:["This provider does not establish general local definition-use, alias, field, or heap flow."],recoverWith:["value-flow","dependence-slice","inspect","code"]}))},{id:"typescript-local-dependence",label:"TypeScript compiler identities, control-flow graph, and reaching definitions",requirements:["typescript-semantic"],relations:[e("dataflow","definition-to-use","The definition reaches the reported read on a feasible local control-flow path.",{strengths:["exact"],nonClaims:["Local reaching definitions do not establish heap aliasing, exceptional flow, or the runtime order of closure invocation."],recoverWith:["value-flow","dependence-slice","inspect","code"]}),e("dataflow","value-to-definition","The reported right-hand-side read supplies the assigned local definition.",{strengths:["exact"],nonClaims:["A local assignment edge does not establish field or heap points-to flow."],recoverWith:["value-flow","dependence-slice","inspect","code"]}),e("dataflow","closure-capture","The nested callable reads the reported binding from an enclosing callable.",{strengths:["candidate"],supportCeiling:"candidate",nonClaims:["Closure capture does not establish whether or when the nested callable executes."],recoverWith:["call-graph","inspect","code"]}),e("dataflow","field-definition-to-use","The reported same-owner field definition can reach the field read.",{strengths:["exact","candidate"],nonClaims:["Field-name identity does not establish whole-program heap aliasing or cross-instance flow."],recoverWith:["value-flow","dependence-slice","inspect","code"]}),e("execution","control-dependence","Execution of the reported statement depends on the outcome of the predicate.",{strengths:["exact"],nonClaims:["Intraprocedural control dependence does not establish that the containing callable executes."],recoverWith:["dependence-slice","inspect","code"]})]},{id:"parser-state-temporal",label:"parser-proved local state and temporal facts",requirements:["indexed-graph","source-facts"],relations:[...d.map(t=>e("dataflow",t,"The reported source value is assigned into the identified state resource.",{strengths:["exact"],nonClaims:["The edge does not establish alias, heap, or later read flow."],recoverWith:["value-flow","inspect","code"]})),...["writes-resource","deletes-resource","reads-resource","enqueues-resource","consumes-resource"].map(t=>e("state",t,"The reported construct performs the named operation on the identified resource.",{strengths:["exact"],nonClaims:["A state operation does not establish transactionality, durability, or exclusive ownership."],recoverWith:["evidence","inspect","code"]})),...p.map(t=>e("temporal",t,"The reported source constructs have the named local ordering relationship.",{strengths:["exact"],nonClaims:["Local source order does not establish cross-process happens-before or durable completion."],recoverWith:["evidence","inspect","code"]}))]}];function m(t,i){let n=h.flatMap(r=>r.relations.filter(o=>o.family===t&&(o.match==="prefix"?i.startsWith(o.subtype):i===o.subtype)).map(o=>({provider:r,relation:o})));if(n.length>1)throw new Error(`Ambiguous graph relation provider for ${t}/${i}: ${n.map(r=>r.provider.id).join(", ")}`);return n[0]??null}export{u as a,m as b};
|
|
2
|
-
//# sourceMappingURL=chunk-XDAUYDFT.js.map
|
package/dist/chunk-XKXTR6ZI.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{a as _}from"./chunk-P5XHIJHI.js";import{c as E,e as M}from"./chunk-ETC674NS.js";import{d as P}from"./chunk-KNLQGXVH.js";import{execFileSync as U}from"child_process";var L=2e3,S=50,J=64,Y=8,V=3,W=2160*60*60,X=/\b(?:fix(?:es|ed)?|bug|regression|hotfix)\b/i,Z=3,Q=/#\d+|\b[A-Z][A-Z0-9]+-\d+\b/g,q=/^([a-z][a-z0-9-]+)(?:\([^)]+\))?!?:/i;function tt(t){let e=P(t,{clearGroups:["whole-project"]});return(i,n,r)=>{let o=r??H(i.config.projectRoot);if(!o)return null;let s=e.has(i)?e.get(i,()=>({head:"",value:null})):null;return s&&s.head===o?s.value:(e.invalidate(i),e.get(i,()=>({head:o,value:n(i.config.projectRoot,o)})).value)}}function F(t){let e=P(t,{clearGroups:["whole-project"]});return(i,n,r,o)=>{let s=o??H(i.config.projectRoot);if(!s)return null;let c=e.has(i)?e.get(i,()=>({head:"",values:new Map})):null;(!c||c.head!==s)&&e.invalidate(i);let l=e.get(i,()=>({head:s,values:new Map}));if(l.values.has(n))return l.values.get(n)??null;let d=r(i.config.projectRoot,s);return l.values.set(n,d),d}}var et=F("git-commit-history");function nt(t,e={}){let i=e.historyMode??"bounded",n=e.head;return{capability:r=>it(t,r,n),commitHistory:()=>x(t,i,n),fileChurn:()=>st(t,i,n),changeAmplification:()=>at(t,i,n),trackedFiles:()=>lt(t,n),fileAddRecords:()=>dt(t,i,n),coChangePairs:(r={})=>bt(t,r,i,n),coChangePairsForFiles:(r,o={})=>z(t,r,o,i,n),directionalCoChangePairsForFiles:(r,o={})=>yt(t,r,o,i,n)}}function x(t,e="bounded",i){return et(t,y(e),(n,r)=>rt(n,r,e),i)}function it(t,e,i){let n=i??H(t.config.projectRoot);return n?{slot:e,available:!0,head:n}:{slot:e,available:!1,head:null,reason:"git history is unavailable for this project"}}function H(t){try{return C(t,["rev-parse","HEAD"]).trim()||null}catch{return null}}function C(t,e){return U("git",["-C",t,...e],{encoding:"utf-8",maxBuffer:64*1024*1024,stdio:["ignore","pipe","ignore"],timeout:3e4,killSignal:"SIGKILL"})}function rt(t,e,i){let n;try{n=C(t,["log","--no-merges","--name-only",...R(i),"--pretty=format:%x01%H%x00%ct%x00%s"])}catch{return null}return{head:e,...w(n,S)}}function ot(t){return X.test(t.subject)}function st(t,e,i){let n=x(t,e,i);if(!n)return null;let r=new Map;for(let o of n.commits){let s=ot(o);for(let c of o.files){let l=r.get(c)??{changes:0,fixChanges:0,lastChangedAt:0};l.changes+=1,s&&(l.fixChanges+=1),o.timestamp>l.lastChangedAt&&(l.lastChangedAt=o.timestamp),r.set(c,l)}}return r}function at(t,e,i){let n=x(t,e,i);if(!n||n.commits.length===0)return null;let r=n.commits.map(o=>o.files.length).filter(o=>o>0).sort((o,s)=>o-s);return r.length===0?null:{medianFilesPerCommit:O(r,.5),p90FilesPerCommit:O(r,.9),commitsAnalyzed:r.length}}function O(t,e){let i=Math.min(t.length-1,Math.floor(t.length*e));return t[i]}var ct=tt("git-tracked-files");function lt(t,e){return ct(t,i=>{try{let n=C(i,["ls-files"]);return new Set(n.split(`
|
|
2
|
-
`).map(r=>r.trim()).filter(r=>r!==""))}catch{return null}},e)}var ut=F("git-file-adds"),D="__git__/file-adds",k=E({kind:"git-file-adds",invalidation:M("git-file-adds"),serialize:gt,deserialize:ft});function _t(t){return nt(t).fileAddRecords()}function dt(t,e,i){let n=y(e);return ut(t,n,(r,o)=>mt(t,r,o,e),i)}function mt(t,e,i,n){let r=k.read(t,I(n),i);if(r)return r;let o=ht(e,n);return o&&k.write(t,I(n),i,o),o}function gt(t){return JSON.stringify([...t.entries()])}function ft(t){if(!t)return null;try{let e=JSON.parse(t);if(!Array.isArray(e))return null;let i=new Map;for(let n of e){if(!Array.isArray(n)||n.length!==2||typeof n[0]!="string")return null;let r=n[1];if(!r||typeof r.commitsAgo!="number"||!Number.isFinite(r.commitsAgo)||typeof r.addedAt!="number"||!Number.isFinite(r.addedAt))return null;i.set(n[0],{commitsAgo:r.commitsAgo,addedAt:r.addedAt})}return i}catch{return null}}function ht(t,e){let i;try{i=C(t,["log","--no-merges","--find-renames","--name-status",...R(e),"--pretty=format:%x01%H%x00%ct%x00%s"])}catch{return null}let n=new Map,r=new Map,o=-1;for(let s of i.split("")){if(s.trim()==="")continue;o+=1;let c=s.indexOf(`
|
|
3
|
-
`),l=c>=0?s.slice(0,c):s,[,d]=l.split("\0"),f=Number(d)||0;if(!(c<0))for(let u of s.slice(c+1).split(`
|
|
4
|
-
`)){let a=pt(u);if(!a)continue;if(a.status==="R"&&a.from&&a.to){let p=r.get(a.to)??new Set([a.to]);r.set(a.from,p);continue}if(a.status!=="A"||!a.to)continue;let m={commitsAgo:o,addedAt:f};n.set(a.to,m);for(let p of r.get(a.to)??[])n.set(p,m)}}return n}function pt(t){let e=t.trim().split(" "),i=e[0]??"";if(!i)return null;let n=i[0]??"";if(n==="R"){let o=e[1],s=e[2];return o&&s?{status:n,from:o,to:s}:null}let r=e[1];return r?{status:n,to:r}:null}var j=F("git-co-change-pairs"),Ct=F("git-directional-co-change-pairs");function bt(t,e,i,n){let r=`all\0${y(i)}\0${T(e)}`,o=j(t,r,()=>{let s=x(t,i,n);return s?G(s,e):null},n);return o&&[...o]}function z(t,e,i,n,r){if(e.size===0)return[];let o=`files\0${y(n)}\0${N(e)}\0${T(i)}`,s=j(t,o,()=>{let c=x(t,n,r);return c?G(c,i,e):null},r);return s&&[...s]}function yt(t,e,i,n,r){if(e.size===0)return[];let o=i.maxFilesPerCommit??S;if(e.size>J)return z(t,e,i,n,r);let s=`directional\0${y(n)}\0${N(e)}\0${T({...i,maxFilesPerCommit:o})}`,c=Ct(t,s,(l,d)=>{let f=At(l,d,e,o,n);return f?G(f,i,e):null},r);return c&&[...c]}function T(t){let e=t.minTogether??4,i=t.minConfidence??.6,n=t.maxFilesPerCommit??S;return`${e}\0${i}\0${n}`}function N(t){return[...t].sort().join("\0")}function G(t,e,i){let{minTogether:n=4,minConfidence:r=.6,maxFilesPerCommit:o=S}=e,s=new Map,c=new Map,l=t.newestAnalyzedAt??0;for(let u of t.commits){let a=[...new Set(u.files)].sort();if(a.length>o)continue;t.newestAnalyzedAt===void 0&&u.timestamp>l&&(l=u.timestamp);let m=Ft(a),p=i===void 0||a.some(g=>i.has(g));for(let g of a)s.set(g,(s.get(g)??0)+1);if(p)for(let g=0;g<a.length;g++)for(let b=g+1;b<a.length;b++){if(i&&!i.has(a[g])&&!i.has(a[b]))continue;let A=`${a[g]}\0${a[b]}`,h=c.get(A)??{together:0,focusedTogether:0,broadTogether:0,lastTogetherAt:0,timestamps:[],subjects:[]};h.together+=1,m?h.broadTogether+=1:h.focusedTogether+=1,u.timestamp>h.lastTogetherAt&&(h.lastTogetherAt=u.timestamp),h.timestamps.push(u.timestamp),h.subjects.push(u.subject),c.set(A,h)}}let d=[],f=l-W;for(let[u,a]of c){let m=a.together;if(m<n)continue;let[p,g]=u.split("\0"),b=s.get(p)??m,A=s.get(g)??m,h=Math.max(m/b,m/A);if(h<r)continue;let $=a.broadTogether/m,v=a.timestamps.filter(K=>K>=f).length;d.push({fileA:p,fileB:g,together:m,confidence:h,changesA:b,changesB:A,focusedTogether:a.focusedTogether,broadTogether:a.broadTogether,broadCommitRatio:$,lastTogetherAt:a.lastTogetherAt,recentTogether:v,commitScope:Pt(a.broadTogether,m),recency:v>0?"recent":"stale",subjectContext:Ht(a.subjects)})}return d.sort((u,a)=>a.together-u.together||a.confidence-u.confidence||u.fileA.localeCompare(a.fileA)),d}function At(t,e,i,n,r){let o;try{o=xt(t,r)}catch{return null}if(o.length===0)return{head:e,commits:[],skippedBulkCommits:0,newestAnalyzedAt:0};let s;try{s=C(t,["log","--no-merges","--format=%H",...R(r),"--",...[...i].sort()])}catch{return null}let c=new Set(o.map(a=>a.hash)),l=s.split(`
|
|
5
|
-
`).map(a=>a.trim()).filter(a=>a!==""&&c.has(a)),d=St(t,o,n);if(l.length===0)return{head:e,commits:[],skippedBulkCommits:0,newestAnalyzedAt:d};let f;try{f=C(t,["show","--no-walk=unsorted","--name-only","--pretty=format:%x01%H%x00%ct%x00%s",...l])}catch{return null}let u=w(f,n);return{head:e,...u,newestAnalyzedAt:d}}function xt(t,e){return C(t,["log","--no-merges","--format=%H%x00%ct",...R(e)]).split(`
|
|
6
|
-
`).map(n=>n.trim()).filter(n=>n!=="").map(n=>{let[r,o]=n.split("\0");return{hash:r??"",timestamp:Number(o)||0}}).filter(n=>n.hash!=="")}function R(t){return t==="full"?[]:["-n",String(B())]}function B(){return _(process.env.SCIP_QUERY_GIT_HISTORY_MAX_COMMITS)??L}function y(t){return t==="full"?"full":`bounded:${B()}`}function I(t){let e=y(t);return e===`bounded:${L}`?D:`${D}:${e}`}function St(t,e,i){for(let r=0;r<e.length;r+=20){let o=e.slice(r,r+20),s;try{s=C(t,["show","--no-walk=unsorted","--name-only","--pretty=format:%x01%H%x00%ct%x00%s",...o.map(l=>l.hash)])}catch{return e[0]?.timestamp??0}let c=w(s,i);if(c.commits.length>0)return c.commits[0].timestamp}return 0}function w(t,e){let i=[],n=0;for(let r of t.split("")){if(r.trim()==="")continue;let o=r.indexOf(`
|
|
7
|
-
`),s=o>=0?r.slice(0,o):r,[c,l,d]=s.split("\0");if(!c||!l)continue;let f=o>=0?r.slice(o+1).split(`
|
|
8
|
-
`).map(u=>u.trim()).filter(u=>u!==""):[];if(f.length>e){n+=1;continue}i.push({hash:c,timestamp:Number(l)||0,subject:d??"",files:f})}return{commits:i,skippedBulkCommits:n}}function Ft(t){return t.length>=Y?!0:Rt(t).size>=V}function Rt(t){let e=new Set;for(let i of t){let n=i.indexOf("/");e.add(n>=0?i.slice(0,n):".")}return e}function Pt(t,e){return t===0?"focused":t/e>=.5?"broad-sweep":"mixed"}function Ht(t){let e=new Set,i=[],n=[];for(let r of t){!n.includes(r)&&n.length<Z&&n.push(r);for(let o of Tt(r))e.add(o);for(let o of r.match(Q)??[])i.includes(o)||i.push(o)}return{subjectLabels:[...e].sort(),issueRefs:i,sampleSubjects:n,externalIssueLabelStatus:"unavailable"}}function Tt(t){let e=new Set,i=q.exec(t)?.[1]?.toLowerCase();return i&&e.add(Gt(i)),/\b(?:feat|feature)\b/i.test(t)&&e.add("feature"),/\b(?:fix(?:es|ed)?|bug|regression|hotfix)\b/i.test(t)&&e.add("fix"),/\b(?:docs?|documentation|guide|readme)\b/i.test(t)&&e.add("docs"),/\brefactor(?:ing|ed)?\b/i.test(t)&&e.add("refactor"),/\btests?\b/i.test(t)&&e.add("test"),/\b(?:release|version|v\d+\.\d+)\b/i.test(t)&&e.add("release"),/\bchore\b/i.test(t)&&e.add("chore"),/\bbuild\b/i.test(t)&&e.add("build"),/\bci\b/i.test(t)&&e.add("ci"),/\bperf(?:ormance)?\b/i.test(t)&&e.add("perf"),[...e]}function Gt(t){return t==="feat"?"feature":t}export{nt as a,C as b,_t as c};
|
|
9
|
-
//# sourceMappingURL=chunk-XKXTR6ZI.js.map
|