agentic-qe 3.9.4 → 3.9.5
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 +20 -0
- package/dist/cli/bundle.js +5 -5
- package/dist/cli/chunks/adapter-HOBCL2VF.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-MGGEPROV.js → agent-booster-wasm-AW36VJXL.js} +2 -2
- package/dist/cli/chunks/{agent-handler-AFHYFQXV.js → agent-handler-AQFW2CMW.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-SQ3KDIG6.js → agent-memory-branch-VA6A47U5.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-77FVV2ZJ.js +2 -0
- package/dist/cli/chunks/{audit-SM5CK2K5.js → audit-WVJHTVUU.js} +2 -2
- package/dist/cli/chunks/base-2IXMPGJV.js +2 -0
- package/dist/cli/chunks/{better-sqlite3-UGOYRNXI.js → better-sqlite3-HCMGVEDO.js} +2 -2
- package/dist/cli/chunks/{brain-handler-SKXTB63O.js → brain-handler-JZISBH2W.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-77NSOLNK.js → branch-enumerator-3TQXIETD.js} +2 -2
- package/dist/cli/chunks/{browser-MCE5DWPV.js → browser-4GZXU4YT.js} +2 -2
- package/dist/cli/chunks/browser-workflow-AQYKV2NE.js +2 -0
- package/dist/cli/chunks/{chunk-MN2MYLVW.js → chunk-2XJRSIM5.js} +2 -2
- package/dist/cli/chunks/{chunk-72EC26AS.js → chunk-35DP6LX6.js} +2 -2
- package/dist/cli/chunks/{chunk-Z75DMTMI.js → chunk-3DGO7NJK.js} +1 -1
- package/dist/cli/chunks/{chunk-EZTUUOVI.js → chunk-3KYKE7B6.js} +1 -1
- package/dist/cli/chunks/{chunk-RE6XD6RI.js → chunk-3QH67ZYC.js} +2 -2
- package/dist/cli/chunks/{chunk-RRQEIGLS.js → chunk-3UE5GART.js} +2 -2
- package/dist/cli/chunks/{chunk-GAG2P4I2.js → chunk-3UFAEGSS.js} +1 -1
- package/dist/cli/chunks/{chunk-HKTNFHWI.js → chunk-3VNEMHOO.js} +1 -1
- package/dist/cli/chunks/{chunk-QPC4STR6.js → chunk-45WEXMKC.js} +2 -2
- package/dist/cli/chunks/{chunk-TNWTQWLL.js → chunk-4EOSDCDM.js} +1 -1
- package/dist/cli/chunks/{chunk-UJLSCJJS.js → chunk-4FPCCKNQ.js} +1 -1
- package/dist/cli/chunks/{chunk-KELYPHMV.js → chunk-4QGNSNQL.js} +2 -2
- package/dist/cli/chunks/{chunk-MS6LTE4L.js → chunk-53J3R7PZ.js} +2 -2
- package/dist/cli/chunks/{chunk-5UKAEBKC.js → chunk-55EAFHVH.js} +3 -3
- package/dist/cli/chunks/{chunk-J6KBI5NW.js → chunk-5NBYV7FL.js} +1 -1
- package/dist/cli/chunks/{chunk-NZ5LY2BT.js → chunk-673PL3DG.js} +1 -1
- package/dist/cli/chunks/{chunk-RGRYL4MG.js → chunk-6AMXWB6Y.js} +2 -2
- package/dist/cli/chunks/{chunk-UUL3D5HR.js → chunk-6FM5DJHR.js} +4 -4
- package/dist/cli/chunks/{chunk-SHJZ3YNX.js → chunk-6QKGLIIY.js} +2 -2
- package/dist/cli/chunks/{chunk-ZODUKKPC.js → chunk-6QR7GSNJ.js} +2 -2
- package/dist/cli/chunks/{chunk-C567IO5M.js → chunk-6VB4VZCR.js} +2 -2
- package/dist/cli/chunks/{chunk-JVUNZBKX.js → chunk-73LG5ELL.js} +2 -2
- package/dist/cli/chunks/{chunk-UPJZRDZK.js → chunk-74YG34UH.js} +2 -2
- package/dist/cli/chunks/{chunk-SKWI5QBM.js → chunk-7JQOOPA2.js} +2 -2
- package/dist/cli/chunks/{chunk-XB5HXTL4.js → chunk-ALX5RJSR.js} +2 -2
- package/dist/cli/chunks/{chunk-NS4CCCTZ.js → chunk-BM7VSJTE.js} +2 -2
- package/dist/cli/chunks/{chunk-ZKWNZ3ZK.js → chunk-BNYHBEDE.js} +2 -2
- package/dist/cli/chunks/{chunk-EFD2J6GG.js → chunk-BQUN2NB4.js} +3 -3
- package/dist/cli/chunks/{chunk-IGJ472XJ.js → chunk-BYD54ZUF.js} +2 -2
- package/dist/cli/chunks/{chunk-KSMQH2CV.js → chunk-CGYOMD6X.js} +1 -1
- package/dist/cli/chunks/{chunk-DHJJJ24V.js → chunk-CGYTM7AB.js} +2 -2
- package/dist/cli/chunks/{chunk-4GJAYXB7.js → chunk-CNGRXBKO.js} +2 -2
- package/dist/cli/chunks/{chunk-3MN7E6HY.js → chunk-CQT3IEEX.js} +2 -2
- package/dist/cli/chunks/{chunk-VBYREHZI.js → chunk-DFOANC7Z.js} +1 -1
- package/dist/cli/chunks/{chunk-QEYPK7KS.js → chunk-DPEX4UOC.js} +1 -1
- package/dist/cli/chunks/{chunk-WHT46PJM.js → chunk-DSOEKRQL.js} +2 -2
- package/dist/cli/chunks/{chunk-RUJU5XEQ.js → chunk-E55RROAP.js} +1 -1
- package/dist/cli/chunks/{chunk-VFXTZWNF.js → chunk-EPH2GZQM.js} +2 -2
- package/dist/cli/chunks/{chunk-QOU4R6AF.js → chunk-ERV3OVUG.js} +2 -2
- package/dist/cli/chunks/{chunk-ENKPW6MA.js → chunk-FDFJHGRZ.js} +2 -2
- package/dist/cli/chunks/{chunk-53M65YFH.js → chunk-G7XBTBM7.js} +2 -2
- package/dist/cli/chunks/{chunk-7ST2YENJ.js → chunk-GFXAKQ77.js} +2 -2
- package/dist/cli/chunks/{chunk-XYVMKCSI.js → chunk-GFZRXQWH.js} +1 -1
- package/dist/cli/chunks/{chunk-C2HGOUEB.js → chunk-GHFXURNS.js} +1 -1
- package/dist/cli/chunks/{chunk-A6ZBQCYB.js → chunk-GSTDQLXR.js} +2 -2
- package/dist/cli/chunks/{chunk-Q6FSXNQP.js → chunk-HA4COQ66.js} +2 -2
- package/dist/cli/chunks/{chunk-G6RTCJFY.js → chunk-HT5EZYPZ.js} +2 -2
- package/dist/cli/chunks/{chunk-J222JLZ6.js → chunk-I27OTSC7.js} +2 -2
- package/dist/cli/chunks/{chunk-7ZXNJT4Q.js → chunk-I4HGIQC2.js} +2 -2
- package/dist/cli/chunks/{chunk-GX7MEHQ2.js → chunk-IHXDXFUX.js} +1 -1
- package/dist/cli/chunks/{chunk-BH5XPYA3.js → chunk-IMCYFQWF.js} +2 -2
- package/dist/cli/chunks/{chunk-2JLKOGNU.js → chunk-IMGRYCAT.js} +1 -1
- package/dist/cli/chunks/{chunk-GSKZL36U.js → chunk-ITIYGUIL.js} +2 -2
- package/dist/cli/chunks/{chunk-27FNBMUC.js → chunk-J4SEGMXL.js} +2 -2
- package/dist/cli/chunks/{chunk-JMBUIVVE.js → chunk-JUBICWL2.js} +1 -1
- package/dist/cli/chunks/{chunk-J72Q6ERO.js → chunk-JYJXVTUP.js} +2 -2
- package/dist/cli/chunks/{chunk-3SPYUOSS.js → chunk-KCQ2GFRN.js} +2 -2
- package/dist/cli/chunks/{chunk-GQ7DCSKS.js → chunk-KQ7VBUO4.js} +2 -2
- package/dist/cli/chunks/{chunk-C3BXT3ZC.js → chunk-KUDPFLL4.js} +4 -4
- package/dist/cli/chunks/{chunk-54OLXGXJ.js → chunk-KWIDDPKG.js} +2 -2
- package/dist/cli/chunks/{chunk-BZ22GI4E.js → chunk-LLXBL36X.js} +1 -1
- package/dist/cli/chunks/{chunk-3RHIPCBG.js → chunk-LPVQ6QCW.js} +2 -2
- package/dist/cli/chunks/{chunk-IQE6GOH6.js → chunk-MBXSHGDD.js} +2 -2
- package/dist/cli/chunks/{chunk-EEARIB4C.js → chunk-MO3IIM7L.js} +1 -1
- package/dist/cli/chunks/{chunk-U7YC7VCM.js → chunk-MRTDOSHR.js} +2 -2
- package/dist/cli/chunks/{chunk-F6AU2MAZ.js → chunk-MYIDAWGQ.js} +2 -2
- package/dist/cli/chunks/{chunk-NRH2QE4X.js → chunk-N66G743A.js} +3 -3
- package/dist/cli/chunks/{chunk-VBXJBXMG.js → chunk-NDWWN2YC.js} +4 -4
- package/dist/cli/chunks/{chunk-7EL65Y27.js → chunk-NGP3DRFU.js} +1 -1
- package/dist/cli/chunks/{chunk-GVFHRHXC.js → chunk-NHIQ5HP3.js} +2 -2
- package/dist/cli/chunks/{chunk-LH3ZL2OK.js → chunk-NNNH36RU.js} +2 -2
- package/dist/cli/chunks/{chunk-QVZSIFSJ.js → chunk-OPOTKH42.js} +3 -3
- package/dist/cli/chunks/{chunk-RPYUKEAH.js → chunk-OQCEI7Q4.js} +2 -2
- package/dist/cli/chunks/{chunk-TT2TB6UF.js → chunk-OTOQXMP6.js} +3 -3
- package/dist/cli/chunks/{chunk-LW3DV23G.js → chunk-PGFHFPDP.js} +2 -2
- package/dist/cli/chunks/{chunk-OZC42UMD.js → chunk-PMFZHFCB.js} +2 -2
- package/dist/cli/chunks/{chunk-YS6C2Q4F.js → chunk-PTAUZ3XL.js} +1 -1
- package/dist/cli/chunks/{chunk-4BQTEPAD.js → chunk-PVLOT5BL.js} +2 -2
- package/dist/cli/chunks/{chunk-GT35EJKR.js → chunk-QHMDETCU.js} +1 -1
- package/dist/cli/chunks/{chunk-B6HLXE3D.js → chunk-QPW2O5TR.js} +9 -9
- package/dist/cli/chunks/{chunk-VSNPI2NO.js → chunk-REXMKRR2.js} +8 -8
- package/dist/cli/chunks/{chunk-NEYZXYFH.js → chunk-S4F3CNSP.js} +2 -2
- package/dist/cli/chunks/{chunk-4TZTGYBQ.js → chunk-T4KMG3GJ.js} +1 -1
- package/dist/cli/chunks/{chunk-G72E5DL3.js → chunk-TRO45ZLC.js} +1 -1
- package/dist/cli/chunks/{chunk-ONOYANDX.js → chunk-TRPCOY3C.js} +1 -1
- package/dist/cli/chunks/{chunk-COIRFVFO.js → chunk-TRRJP27A.js} +1 -1
- package/dist/cli/chunks/{chunk-P3EOWBME.js → chunk-TSA5MUTQ.js} +2 -2
- package/dist/cli/chunks/{chunk-V57PXZIK.js → chunk-TUMXWCB7.js} +3 -3
- package/dist/cli/chunks/{chunk-MR5I6UR2.js → chunk-UO2R7ZN3.js} +2 -2
- package/dist/cli/chunks/{chunk-Q2ZYUIS2.js → chunk-UPFCV7MX.js} +2 -2
- package/dist/cli/chunks/{chunk-RS7ZGWHV.js → chunk-VKT4STAE.js} +2 -2
- package/dist/cli/chunks/{chunk-DZHGYZJP.js → chunk-W73AYMDP.js} +1 -1
- package/dist/cli/chunks/{chunk-ZQSEPDIJ.js → chunk-WIZOYPFT.js} +2 -2
- package/dist/cli/chunks/{chunk-OHZ6RJLS.js → chunk-WTGUS7DD.js} +2 -2
- package/dist/cli/chunks/{chunk-27P4VTCY.js → chunk-WV7K5A7J.js} +2 -2
- package/dist/cli/chunks/{chunk-2MQMXI7C.js → chunk-X6J7VYVD.js} +2 -2
- package/dist/cli/chunks/{chunk-B252DDC5.js → chunk-XG2JAIQT.js} +1 -1
- package/dist/cli/chunks/{chunk-MUX762XZ.js → chunk-Y6XYH7EV.js} +2 -2
- package/dist/cli/chunks/{chunk-RN3SN4ZC.js → chunk-YDBMYTOV.js} +2 -2
- package/dist/cli/chunks/{chunk-MGRE767N.js → chunk-YGZBS4RW.js} +2 -2
- package/dist/cli/chunks/{chunk-7FJIIB4H.js → chunk-YHKJYBWK.js} +1 -1
- package/dist/cli/chunks/{chunk-RTC3ZCPK.js → chunk-YHSIUFFY.js} +2 -2
- package/dist/cli/chunks/{chunk-ZW5DRPZY.js → chunk-YQTPEQO6.js} +2 -2
- package/dist/cli/chunks/{chunk-YDJKQKQH.js → chunk-YZ3WB4TN.js} +2 -2
- package/dist/cli/chunks/chunk-Z2GK7COI.js +2 -0
- package/dist/cli/chunks/{chunk-RAZ2PGZD.js → chunk-ZD2FS4Q7.js} +2 -2
- package/dist/cli/chunks/{chunk-3MRFR534.js → chunk-ZFCRDCHW.js} +2 -2
- package/dist/cli/chunks/{chunk-O6QAOPUA.js → chunk-ZJWDWM6B.js} +3 -3
- package/dist/cli/chunks/{chunk-DLMEBVLF.js → chunk-ZP237D7K.js} +2 -2
- package/dist/cli/chunks/{chunk-EHGTXIT7.js → chunk-ZWS7J73Q.js} +1 -1
- package/dist/cli/chunks/{ci-THZEECIQ.js → ci-3ATT6NMC.js} +2 -2
- package/dist/cli/chunks/{ci-output-G6QLGL4S.js → ci-output-2JR3J753.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-5MTYQM34.js → claude-flow-setup-SG2BSEED.js} +2 -2
- package/dist/cli/chunks/client-3CA57H5P.js +2 -0
- package/dist/cli/chunks/{cline-installer-E2LF2DQS.js → cline-installer-A26SXDX6.js} +2 -2
- package/dist/cli/chunks/{code-QRF7ZGXG.js → code-WIXKPGAQ.js} +2 -2
- package/dist/cli/chunks/{code-index-extractor-II6IRWU6.js → code-index-extractor-W2NO6MR3.js} +2 -2
- package/dist/cli/chunks/{codex-installer-LGOQ23ZS.js → codex-installer-VBSJHXI4.js} +2 -2
- package/dist/cli/chunks/{completions-LB2RR2OQ.js → completions-JFXIUS2V.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-PUIPIRX3.js → complexity-analyzer-GPO4ZAIZ.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-HQAEAQZU.js → continuedev-installer-OULSFVLB.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-3PKCX5K5.js → copilot-installer-QS7EG5DW.js} +2 -2
- package/dist/cli/chunks/{cost-tracker-JG3SZ2Q3.js → cost-tracker-D7LNB633.js} +2 -2
- package/dist/cli/chunks/{coverage-D3PZTOKT.js → coverage-YUQ4MQYK.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-GECFIALH.js +2 -0
- package/dist/cli/chunks/{cursor-installer-UY6GWKTO.js → cursor-installer-UOZGHZHD.js} +2 -2
- package/dist/cli/chunks/{daemon-UNO3LRRN.js → daemon-27TMWDPY.js} +3 -3
- package/dist/cli/chunks/{dag-attention-scheduler-S2MXANYL.js → dag-attention-scheduler-PVAFQBDL.js} +2 -2
- package/dist/cli/chunks/{detect-DU2FTRKR.js → detect-FUKMZ37Y.js} +2 -2
- package/dist/cli/chunks/{domain-handler-KPNO36LF.js → domain-handler-SP3QB5VN.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-6X3ZZF6A.js → domain-transfer-A2WL6HEJ.js} +2 -2
- package/dist/cli/chunks/dream-CJ4MKM5G.js +2 -0
- package/dist/cli/chunks/esm-node-X7U3YS4M.js +2 -0
- package/dist/cli/chunks/{eval-6RXEDTBZ.js → eval-6MIZUXEO.js} +2 -2
- package/dist/cli/chunks/{fast-paths-FYODFGZB.js → fast-paths-XT542LOU.js} +2 -2
- package/dist/cli/chunks/{feature-flags-YOULURDA.js → feature-flags-NWACCWCB.js} +2 -2
- package/dist/cli/chunks/{feature-flags-ZJ42B4IL.js → feature-flags-WBF5B6WE.js} +2 -2
- package/dist/cli/chunks/{file-discovery-KOL7FSBQ.js → file-discovery-GKCJFWTD.js} +2 -2
- package/dist/cli/chunks/{fleet-22I74LGD.js → fleet-V2MKGNMG.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-DFHTHLIZ.js → gnn-wrapper-HUUMTTSV.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-SQ6VYEAA.js → heartbeat-handler-UY3TCEN7.js} +4 -4
- package/dist/cli/chunks/{heartbeat-scheduler-W6PQJ5SG.js → heartbeat-scheduler-YWXPSCH2.js} +2 -2
- package/dist/cli/chunks/hnsw-adapter-LJGOH772.js +2 -0
- package/dist/cli/chunks/hnsw-index-V6SST2MB.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-AYTRT54U.js → hnsw-legacy-bridge-IYYYSRK5.js} +2 -2
- package/dist/cli/chunks/{hnswlib-node-4IA56UH4.js → hnswlib-node-WDWAE74R.js} +2 -2
- package/dist/cli/chunks/{hooks-T6UMR72X.js → hooks-DTBJK6LL.js} +6 -6
- package/dist/cli/chunks/{hypergraph-engine-WVPYKMFY.js → hypergraph-engine-K47IBQNO.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-NB6GL4CR.js → hypergraph-handler-2NDPG2N4.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-MTOVFD3O.js +2 -0
- package/dist/cli/chunks/{init-handler-UOFNBXEP.js → init-handler-VRZS6KO2.js} +6 -6
- package/dist/cli/chunks/init-wizard-IH6PSRJY.js +2 -0
- package/dist/cli/chunks/kernel-3MC7WV5G.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-VWMNI4QX.js → kilocode-installer-XZAHWQEA.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-RNM47FV5.js → kiro-installer-53C7DXEF.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-HLUQJ2GI.js +2 -0
- package/dist/cli/chunks/{learning-L4RB5XYP.js → learning-XYW2EEVX.js} +3 -3
- package/dist/cli/chunks/{llm-router-BZYZL3YI.js → llm-router-64SKMJ7B.js} +2 -2
- package/dist/cli/chunks/{load-4UGEGRMO.js → load-HVL4O7EY.js} +2 -2
- package/dist/cli/chunks/load-test-VVVME7GZ.js +2 -0
- package/dist/cli/chunks/{mcp-FWWZIWCI.js → mcp-4H2NJ3EO.js} +2 -2
- package/dist/cli/chunks/{memory-5OXPMXU6.js → memory-2CD4BAJK.js} +5 -5
- package/dist/cli/chunks/memory-backend-O3U2QDU3.js +2 -0
- package/dist/cli/chunks/{memory-handlers-JS7BTWJK.js → memory-handlers-XRYZBE5I.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-BS5TQKHB.js → opencode-installer-I23QAZC6.js} +2 -2
- package/dist/cli/chunks/{orchestrator-G6BUZ6QE.js → orchestrator-7BL6R54P.js} +5 -5
- package/dist/cli/chunks/{pipeline-3MZ5COPR.js → pipeline-7UN7LP6B.js} +2 -2
- package/dist/cli/chunks/{platform-TKD4JCUG.js → platform-P44YUHPK.js} +2 -2
- package/dist/cli/chunks/{plugin-XXJ7R6SY.js → plugin-YWYR7FKS.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-JLJ6NKIP.js → prime-radiant-advanced-wasm-A7CDGUK6.js} +2 -2
- package/dist/cli/chunks/protocol-executor-HLNTSRYC.js +2 -0
- package/dist/cli/chunks/{protocol-handler-ZLYGQPHG.js → protocol-handler-BM7RLC4Z.js} +2 -2
- package/dist/cli/chunks/{prove-E2WZ335X.js → prove-UVBYODRV.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-JK5CK4D4.js +2 -0
- package/dist/cli/chunks/{quality-6MHHBINU.js → quality-4L42LN5Q.js} +2 -2
- package/dist/cli/chunks/queen-coordinator-FLF6XYLX.js +2 -0
- package/dist/cli/chunks/{real-embeddings-QN5BY3WS.js → real-embeddings-4CYZTWHT.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-GTVII272.js → roocode-installer-UOSJS7KT.js} +2 -2
- package/dist/cli/chunks/router-DUFZW3WQ.js +2 -0
- package/dist/cli/chunks/routing-feedback-6U76TI6X.js +2 -0
- package/dist/cli/chunks/{routing-handler-HYKZ3ISS.js → routing-handler-43G4D5UP.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-LBWHPUTZ.js → ruvector-commands-H7A7LG6Q.js} +2 -2
- package/dist/cli/chunks/{rvf-dual-writer-TVCJ2Y6N.js → rvf-dual-writer-USU2IWO7.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-adapter-34ITXLU3.js → rvf-migration-adapter-DZMYVJJY.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-coordinator-SX2C7777.js → rvf-migration-coordinator-AZ5JDT33.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-4UD7SUMB.js +2 -0
- package/dist/cli/chunks/safe-db-32Q5RXHR.js +2 -0
- package/dist/cli/chunks/schedule-ZHCM3L6H.js +2 -0
- package/dist/cli/chunks/scheduler-HBSSLDOD.js +2 -0
- package/dist/cli/chunks/{security-7A4EW77M.js → security-RXG4H3UK.js} +3 -3
- package/dist/cli/chunks/shared-rvf-adapter-PLZVKKW7.js +2 -0
- package/dist/cli/chunks/{shared-rvf-dual-writer-27L4R5WK.js → shared-rvf-dual-writer-2PUFIGX5.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-YUZMB44Y.js +2 -0
- package/dist/cli/chunks/{status-handler-JN6PRYLD.js → status-handler-SXQKG6VP.js} +2 -2
- package/dist/cli/chunks/{structural-health-JSY3DY7H.js → structural-health-LPXOOMG3.js} +2 -2
- package/dist/cli/chunks/{sync-ET3LYW2V.js → sync-5NX7GQQY.js} +2 -2
- package/dist/cli/chunks/{task-handler-R24MR74L.js → task-handler-Y4KVNCOI.js} +2 -2
- package/dist/cli/chunks/{task-handlers-YNPEEPPZ.js → task-handlers-CG27Z3CP.js} +2 -2
- package/dist/cli/chunks/{test-7BZXFZCT.js → test-PWVTWOWS.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-EVIFD5EY.js → test-scheduling-5S5EBVE7.js} +3 -3
- package/dist/cli/chunks/{token-bootstrap-QYYQRXM5.js → token-bootstrap-QMPUKGQC.js} +2 -2
- package/dist/cli/chunks/{token-usage-H4OZA77I.js → token-usage-OZNRTJLE.js} +2 -2
- package/dist/cli/chunks/{transformers-ILQFO5HZ.js → transformers-DRPOBWCW.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-KTST5NWH.js → tree-sitter-wasm-parser-VLX6HQW2.js} +2 -2
- package/dist/cli/chunks/{types-4Z7XELU6.js → types-TUF6HUPE.js} +2 -2
- package/dist/cli/chunks/unified-memory-3D4VDY4G.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-AAQ5IA6M.js +2 -0
- package/dist/cli/chunks/unified-persistence-PY7MVJTL.js +2 -0
- package/dist/cli/chunks/{validate-GSQCH6VN.js → validate-H7QFV2CI.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-SP2RPOYD.js → validate-swarm-BGH6YM4S.js} +2 -2
- package/dist/cli/chunks/{vibium-2SGOFYTF.js → vibium-DQOGR2PH.js} +2 -2
- package/dist/cli/chunks/visual-security-ZBNB7LEG.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-QSQ27UTH.js → web-tree-sitter-TOI4XJIL.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-NIEH46E2.js → windsurf-installer-EUMBFA42.js} +2 -2
- package/dist/cli/chunks/witness-chain-CS76OJFL.js +2 -0
- package/dist/cli/chunks/{witness-chain-62GJTCT5.js → witness-chain-MWPUR4Q2.js} +2 -2
- package/dist/cli/chunks/{workflow-WZMV2MGW.js → workflow-V5HI3AQR.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-FS4HGYI7.js +2 -0
- package/dist/cli/chunks/{wrappers-LNTV533I.js → wrappers-VOU4IVAQ.js} +2 -2
- package/dist/integrations/ruvector/feature-flags.js +1 -1
- package/dist/mcp/bundle.js +2 -2
- package/package.json +1 -1
- package/dist/cli/chunks/adapter-5ODIX6ZG.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-PWGRS6KK.js +0 -2
- package/dist/cli/chunks/base-TJGIYR7L.js +0 -2
- package/dist/cli/chunks/browser-workflow-GUR7RLFP.js +0 -2
- package/dist/cli/chunks/chunk-MDFXPCBO.js +0 -2
- package/dist/cli/chunks/client-IFMC3AYQ.js +0 -2
- package/dist/cli/chunks/cross-domain-router-2LPBUUWY.js +0 -2
- package/dist/cli/chunks/dream-NGRDMOTE.js +0 -2
- package/dist/cli/chunks/esm-node-3COTOSO3.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-BASJNTEV.js +0 -2
- package/dist/cli/chunks/hnsw-index-NFN2AUIX.js +0 -2
- package/dist/cli/chunks/impact-analyzer-ZMQXHQDV.js +0 -2
- package/dist/cli/chunks/init-wizard-QHAA4GWF.js +0 -2
- package/dist/cli/chunks/kernel-SNJFYN3T.js +0 -2
- package/dist/cli/chunks/knowledge-graph-EP5UTODP.js +0 -2
- package/dist/cli/chunks/load-test-KMMRHABK.js +0 -2
- package/dist/cli/chunks/memory-backend-Q5MWPMDE.js +0 -2
- package/dist/cli/chunks/protocol-executor-ORFR4WJ3.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-PLTOH4SG.js +0 -2
- package/dist/cli/chunks/queen-coordinator-L3TRAX7H.js +0 -2
- package/dist/cli/chunks/router-3PBJJLRQ.js +0 -2
- package/dist/cli/chunks/routing-feedback-Q775MZ3Z.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-HLY2652E.js +0 -2
- package/dist/cli/chunks/safe-db-CCKCBZ5I.js +0 -2
- package/dist/cli/chunks/schedule-WZ5VV55N.js +0 -2
- package/dist/cli/chunks/scheduler-6PIKLCH7.js +0 -2
- package/dist/cli/chunks/shared-rvf-adapter-VCJNSACZ.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-HMXYD56G.js +0 -2
- package/dist/cli/chunks/unified-memory-RBHCTAWW.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-UBF5PT6D.js +0 -2
- package/dist/cli/chunks/unified-persistence-ZIJDP6GW.js +0 -2
- package/dist/cli/chunks/visual-security-WKIWOUTH.js +0 -2
- package/dist/cli/chunks/witness-chain-4BRX3GGH.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-G6VU7QZ4.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a as ye}from"./chunk-MDFXPCBO.js";import{c as oe,d as ce,e as fe}from"./chunk-RPYUKEAH.js";import{b as N,d as le}from"./chunk-4GJAYXB7.js";import{b as w,c as L}from"./chunk-VBYREHZI.js";import{a as j,b as D,c as V}from"./chunk-F6AU2MAZ.js";ye();import{createRequire as be}from"module";var O;function W(){if(!O){let h=be(import.meta.url);try{O=h("typescript")}catch{try{O=h("typescript/lib/typescript.js")}catch{O=new Proxy({},{get(e,t){if(!(t==="__esModule"||typeof t=="symbol"))throw new Error("TypeScript is required for code analysis. Install it: npm install -g typescript")}})}}}return O}var p=new Proxy({},{get(h,e){return W()[e]},has(h,e){return e in W()},ownKeys(){return Object.keys(W())},getOwnPropertyDescriptor(h,e){let t=W()[e];if(t!==void 0)return{configurable:!0,enumerable:!0,value:t}}});var F=class{parseFile(e,t){return p.createSourceFile(e,t,p.ScriptTarget.Latest,!0,this.getScriptKind(e))}extractFunctions(e){let t=[],s=n=>{p.isFunctionDeclaration(n)&&n.name?t.push(this.extractFunctionDeclaration(n,e)):p.isVariableStatement(n)&&this.extractArrowFunctions(n,e,t),p.forEachChild(n,s)};return p.forEachChild(e,s),t}extractClasses(e){let t=[],s=n=>{p.isClassDeclaration(n)&&n.name&&t.push(this.extractClassDeclaration(n,e)),p.forEachChild(n,s)};return p.forEachChild(e,s),t}extractImports(e){let t=[],s=n=>{p.isImportDeclaration(n)&&t.push(this.extractImportDeclaration(n)),p.forEachChild(n,s)};return p.forEachChild(e,s),t}extractExports(e){let t=[],s=n=>{if(p.isExportDeclaration(n))this.extractExportDeclaration(n,t);else if(p.isExportAssignment(n))t.push({name:this.getExportAssignmentName(n),type:"unknown",isDefault:!0,isReexport:!1,sourceModule:void 0});else if(p.isFunctionDeclaration(n)&&n.name&&this.hasExportModifier(n))t.push({name:n.name.text,type:"function",isDefault:this.hasDefaultModifier(n),isReexport:!1,sourceModule:void 0});else if(p.isClassDeclaration(n)&&n.name&&this.hasExportModifier(n))t.push({name:n.name.text,type:"class",isDefault:this.hasDefaultModifier(n),isReexport:!1,sourceModule:void 0});else if(p.isVariableStatement(n)&&this.hasExportModifier(n))for(let r of n.declarationList.declarations)p.isIdentifier(r.name)&&t.push({name:r.name.text,type:"variable",isDefault:!1,isReexport:!1,sourceModule:void 0});else p.isInterfaceDeclaration(n)&&this.hasExportModifier(n)?t.push({name:n.name.text,type:"interface",isDefault:!1,isReexport:!1,sourceModule:void 0}):p.isTypeAliasDeclaration(n)&&this.hasExportModifier(n)?t.push({name:n.name.text,type:"type",isDefault:!1,isReexport:!1,sourceModule:void 0}):p.isEnumDeclaration(n)&&this.hasExportModifier(n)&&t.push({name:n.name.text,type:"enum",isDefault:!1,isReexport:!1,sourceModule:void 0});p.forEachChild(n,s)};return p.forEachChild(e,s),t}extractInterfaces(e){let t=[],s=n=>{p.isInterfaceDeclaration(n)&&t.push(this.extractInterfaceDeclaration(n,e)),p.forEachChild(n,s)};return p.forEachChild(e,s),t}extractEntities(e,t){let s=this.parseFile(t,e),n=[],r=this.extractFunctions(s);for(let a of r)n.push({name:a.name,type:"function",line:a.startLine,endLine:a.endLine,visibility:a.isExported?"public":"internal",isAsync:a.isAsync,isExported:a.isExported,parameters:a.parameters,returnType:a.returnType});let o=this.extractClasses(s);for(let a of o)n.push({name:a.name,type:"class",line:a.startLine,endLine:a.endLine,visibility:a.isExported?"public":"internal",isAsync:!1,isExported:a.isExported,extends:a.extends,implements:a.implements});let i=this.extractInterfaces(s);for(let a of i)n.push({name:a.name,type:"interface",line:a.startLine,endLine:a.endLine,visibility:a.isExported?"public":"internal",isAsync:!1,isExported:a.isExported});return n}getScriptKind(e){return e.endsWith(".tsx")?p.ScriptKind.TSX:e.endsWith(".ts")?p.ScriptKind.TS:e.endsWith(".jsx")?p.ScriptKind.JSX:e.endsWith(".js")?p.ScriptKind.JS:p.ScriptKind.TS}extractFunctionDeclaration(e,t){let{line:s}=t.getLineAndCharacterOfPosition(e.getStart()),{line:n}=t.getLineAndCharacterOfPosition(e.getEnd());return{name:e.name?.text??"anonymous",parameters:this.extractParameters(e.parameters),returnType:e.type?e.type.getText(t):void 0,startLine:s+1,endLine:n+1,isAsync:this.hasAsyncModifier(e),isExported:this.hasExportModifier(e),isGenerator:!!e.asteriskToken,typeParameters:this.extractTypeParameters(e.typeParameters)}}extractArrowFunctions(e,t,s){for(let n of e.declarationList.declarations)if(p.isIdentifier(n.name)&&n.initializer&&p.isArrowFunction(n.initializer)){let r=n.initializer,{line:o}=t.getLineAndCharacterOfPosition(e.getStart()),{line:i}=t.getLineAndCharacterOfPosition(e.getEnd());s.push({name:n.name.text,parameters:this.extractParameters(r.parameters),returnType:r.type?r.type.getText(t):void 0,startLine:o+1,endLine:i+1,isAsync:this.hasAsyncModifier(r),isExported:this.hasExportModifier(e),isGenerator:!1,typeParameters:this.extractTypeParameters(r.typeParameters)})}}extractClassDeclaration(e,t){let{line:s}=t.getLineAndCharacterOfPosition(e.getStart()),{line:n}=t.getLineAndCharacterOfPosition(e.getEnd()),r=[],o=[];for(let c of e.members)p.isMethodDeclaration(c)&&c.name?r.push(this.extractMethodDeclaration(c,t)):p.isPropertyDeclaration(c)&&c.name?o.push(this.extractPropertyDeclaration(c,t)):p.isConstructorDeclaration(c)&&(r.push(this.extractConstructor(c,t)),this.extractParameterProperties(c,o,t));let i,a=[];if(e.heritageClauses){for(let c of e.heritageClauses)if(c.token===p.SyntaxKind.ExtendsKeyword)i=c.types[0]?.expression.getText(t);else if(c.token===p.SyntaxKind.ImplementsKeyword)for(let l of c.types)a.push(l.expression.getText(t))}return{name:e.name?.text??"anonymous",methods:r,properties:o,extends:i,implements:a,isAbstract:this.hasAbstractModifier(e),isExported:this.hasExportModifier(e),startLine:s+1,endLine:n+1,typeParameters:this.extractTypeParameters(e.typeParameters)}}extractMethodDeclaration(e,t){let{line:s}=t.getLineAndCharacterOfPosition(e.getStart()),{line:n}=t.getLineAndCharacterOfPosition(e.getEnd());return{name:this.getPropertyName(e.name,t),parameters:this.extractParameters(e.parameters),returnType:e.type?e.type.getText(t):void 0,isAsync:this.hasAsyncModifier(e),isStatic:this.hasStaticModifier(e),isAbstract:this.hasAbstractModifier(e),visibility:this.getVisibility(e),startLine:s+1,endLine:n+1}}extractConstructor(e,t){let{line:s}=t.getLineAndCharacterOfPosition(e.getStart()),{line:n}=t.getLineAndCharacterOfPosition(e.getEnd());return{name:"constructor",parameters:this.extractParameters(e.parameters),returnType:void 0,isAsync:!1,isStatic:!1,isAbstract:!1,visibility:"public",startLine:s+1,endLine:n+1}}extractParameterProperties(e,t,s){for(let n of e.parameters)this.isParameterProperty(n)&&t.push({name:p.isIdentifier(n.name)?n.name.text:n.name.getText(s),type:n.type?n.type.getText(s):void 0,isStatic:!1,isReadonly:this.hasReadonlyModifier(n),visibility:this.getVisibility(n),hasInitializer:!!n.initializer})}isParameterProperty(e){return!!e.modifiers?.some(t=>t.kind===p.SyntaxKind.PublicKeyword||t.kind===p.SyntaxKind.PrivateKeyword||t.kind===p.SyntaxKind.ProtectedKeyword||t.kind===p.SyntaxKind.ReadonlyKeyword)}extractPropertyDeclaration(e,t){return{name:this.getPropertyName(e.name,t),type:e.type?e.type.getText(t):void 0,isStatic:this.hasStaticModifier(e),isReadonly:this.hasReadonlyModifier(e),visibility:this.getVisibility(e),hasInitializer:!!e.initializer}}extractImportDeclaration(e){let t=e.moduleSpecifier.text,s=[],n,r,o=e.importClause?.isTypeOnly??!1;if(e.importClause&&(e.importClause.name&&(n=e.importClause.name.text),e.importClause.namedBindings)){if(p.isNamespaceImport(e.importClause.namedBindings))r=e.importClause.namedBindings.name.text;else if(p.isNamedImports(e.importClause.namedBindings))for(let i of e.importClause.namedBindings.elements)s.push({name:i.propertyName?.text??i.name.text,alias:i.propertyName?i.name.text:void 0})}return{module:t,namedImports:s,defaultImport:n,namespaceImport:r,isTypeOnly:o}}extractExportDeclaration(e,t){let s=e.moduleSpecifier?e.moduleSpecifier.text:void 0;if(e.exportClause&&p.isNamedExports(e.exportClause))for(let n of e.exportClause.elements)t.push({name:n.name.text,type:"unknown",isDefault:!1,isReexport:!!s,sourceModule:s});else!e.exportClause&&s&&t.push({name:"*",type:"unknown",isDefault:!1,isReexport:!0,sourceModule:s})}extractInterfaceDeclaration(e,t){let{line:s}=t.getLineAndCharacterOfPosition(e.getStart()),{line:n}=t.getLineAndCharacterOfPosition(e.getEnd()),r=[],o=[];for(let a of e.members)p.isPropertySignature(a)&&a.name?r.push({name:this.getPropertyName(a.name,t),type:a.type?a.type.getText(t):void 0,isOptional:!!a.questionToken,isReadonly:this.hasReadonlyModifier(a)}):p.isMethodSignature(a)&&a.name&&o.push({name:this.getPropertyName(a.name,t),parameters:this.extractParameters(a.parameters),returnType:a.type?a.type.getText(t):void 0,isOptional:!!a.questionToken});let i=[];if(e.heritageClauses){for(let a of e.heritageClauses)if(a.token===p.SyntaxKind.ExtendsKeyword)for(let c of a.types)i.push(c.expression.getText(t))}return{name:e.name.text,properties:r,methods:o,extends:i,isExported:this.hasExportModifier(e),startLine:s+1,endLine:n+1,typeParameters:this.extractTypeParameters(e.typeParameters)}}extractParameters(e){return e.map(t=>{let s=t.getSourceFile();return{name:p.isIdentifier(t.name)?t.name.text:t.name.getText(s),type:t.type?t.type.getText(s):void 0,isOptional:!!t.questionToken||!!t.initializer,isRest:!!t.dotDotDotToken,defaultValue:t.initializer?t.initializer.getText(s):void 0}})}extractTypeParameters(e){return e?e.map(t=>t.name.text):[]}getPropertyName(e,t){return p.isIdentifier(e)||p.isStringLiteral(e)||p.isNumericLiteral(e)?e.text:e.getText(t)}getExportAssignmentName(e){return p.isIdentifier(e.expression)?e.expression.text:"default"}hasExportModifier(e){return p.canHaveModifiers(e)&&!!p.getModifiers(e)?.some(t=>t.kind===p.SyntaxKind.ExportKeyword)}hasDefaultModifier(e){return p.canHaveModifiers(e)&&!!p.getModifiers(e)?.some(t=>t.kind===p.SyntaxKind.DefaultKeyword)}hasAsyncModifier(e){return p.canHaveModifiers(e)&&!!p.getModifiers(e)?.some(t=>t.kind===p.SyntaxKind.AsyncKeyword)}hasStaticModifier(e){return p.canHaveModifiers(e)&&!!p.getModifiers(e)?.some(t=>t.kind===p.SyntaxKind.StaticKeyword)}hasAbstractModifier(e){return p.canHaveModifiers(e)&&!!p.getModifiers(e)?.some(t=>t.kind===p.SyntaxKind.AbstractKeyword)}hasReadonlyModifier(e){return p.canHaveModifiers(e)&&!!p.getModifiers(e)?.some(t=>t.kind===p.SyntaxKind.ReadonlyKeyword)}getVisibility(e){if(!p.canHaveModifiers(e))return"public";let t=p.getModifiers(e);return t?t.some(s=>s.kind===p.SyntaxKind.PrivateKeyword)?"private":t.some(s=>s.kind===p.SyntaxKind.ProtectedKeyword)?"protected":"public":"public"}},Me=new F,q=class{language="typescript";supportedExtensions=[".ts",".tsx",".js",".jsx",".mjs",".cjs"];parser=new F;async parseFile(e,t){let s=this.parser.parseFile(t,e),n=this.parser.extractFunctions(s),r=this.parser.extractClasses(s),o=this.parser.extractImports(s);return{functions:n.map(i=>this.mapFunction(i)),classes:r.map(i=>this.mapClass(i)),imports:o.map(i=>this.mapImport(i)),language:t.endsWith(".js")||t.endsWith(".jsx")||t.endsWith(".mjs")||t.endsWith(".cjs")?"javascript":"typescript",filePath:t}}mapFunction(e){return{name:e.name,parameters:e.parameters.map(t=>({name:t.name,type:t.type,isOptional:t.isOptional,defaultValue:t.defaultValue})),returnType:e.returnType,isAsync:e.isAsync,isPublic:e.isExported,complexity:1,decorators:[],genericParams:e.typeParameters,startLine:e.startLine,endLine:e.endLine}}mapClass(e){return{name:e.name,methods:e.methods.map(t=>({name:t.name,parameters:t.parameters.map(s=>({name:s.name,type:s.type,isOptional:s.isOptional,defaultValue:s.defaultValue})),returnType:t.returnType,isAsync:t.isAsync,isPublic:t.visibility==="public",complexity:1,decorators:[],genericParams:[],startLine:t.startLine,endLine:t.endLine})),properties:e.properties.map(t=>this.mapProperty(t)),isPublic:e.isExported,implements:e.implements,extends:e.extends,decorators:[],startLine:e.startLine,endLine:e.endLine}}mapProperty(e){return{name:e.name,type:e.type,isPublic:e.visibility==="public",isReadonly:e.isReadonly}}mapImport(e){return{module:e.module,namedImports:e.namedImports.map(t=>t.alias||t.name),isTypeOnly:e.isTypeOnly}}},Se=new q;fe();var E=1e3;function I(h){let e=h.split(`
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.5");process.exit(0)}
|
|
2
|
+
import{a as ye}from"./chunk-Z2GK7COI.js";import{c as oe,d as ce,e as fe}from"./chunk-OQCEI7Q4.js";import{b as N,d as le}from"./chunk-CNGRXBKO.js";import{b as w,c as L}from"./chunk-DFOANC7Z.js";import{a as j,b as D,c as V}from"./chunk-MYIDAWGQ.js";ye();import{createRequire as be}from"module";var O;function W(){if(!O){let h=be(import.meta.url);try{O=h("typescript")}catch{try{O=h("typescript/lib/typescript.js")}catch{O=new Proxy({},{get(e,t){if(!(t==="__esModule"||typeof t=="symbol"))throw new Error("TypeScript is required for code analysis. Install it: npm install -g typescript")}})}}}return O}var p=new Proxy({},{get(h,e){return W()[e]},has(h,e){return e in W()},ownKeys(){return Object.keys(W())},getOwnPropertyDescriptor(h,e){let t=W()[e];if(t!==void 0)return{configurable:!0,enumerable:!0,value:t}}});var F=class{parseFile(e,t){return p.createSourceFile(e,t,p.ScriptTarget.Latest,!0,this.getScriptKind(e))}extractFunctions(e){let t=[],s=n=>{p.isFunctionDeclaration(n)&&n.name?t.push(this.extractFunctionDeclaration(n,e)):p.isVariableStatement(n)&&this.extractArrowFunctions(n,e,t),p.forEachChild(n,s)};return p.forEachChild(e,s),t}extractClasses(e){let t=[],s=n=>{p.isClassDeclaration(n)&&n.name&&t.push(this.extractClassDeclaration(n,e)),p.forEachChild(n,s)};return p.forEachChild(e,s),t}extractImports(e){let t=[],s=n=>{p.isImportDeclaration(n)&&t.push(this.extractImportDeclaration(n)),p.forEachChild(n,s)};return p.forEachChild(e,s),t}extractExports(e){let t=[],s=n=>{if(p.isExportDeclaration(n))this.extractExportDeclaration(n,t);else if(p.isExportAssignment(n))t.push({name:this.getExportAssignmentName(n),type:"unknown",isDefault:!0,isReexport:!1,sourceModule:void 0});else if(p.isFunctionDeclaration(n)&&n.name&&this.hasExportModifier(n))t.push({name:n.name.text,type:"function",isDefault:this.hasDefaultModifier(n),isReexport:!1,sourceModule:void 0});else if(p.isClassDeclaration(n)&&n.name&&this.hasExportModifier(n))t.push({name:n.name.text,type:"class",isDefault:this.hasDefaultModifier(n),isReexport:!1,sourceModule:void 0});else if(p.isVariableStatement(n)&&this.hasExportModifier(n))for(let r of n.declarationList.declarations)p.isIdentifier(r.name)&&t.push({name:r.name.text,type:"variable",isDefault:!1,isReexport:!1,sourceModule:void 0});else p.isInterfaceDeclaration(n)&&this.hasExportModifier(n)?t.push({name:n.name.text,type:"interface",isDefault:!1,isReexport:!1,sourceModule:void 0}):p.isTypeAliasDeclaration(n)&&this.hasExportModifier(n)?t.push({name:n.name.text,type:"type",isDefault:!1,isReexport:!1,sourceModule:void 0}):p.isEnumDeclaration(n)&&this.hasExportModifier(n)&&t.push({name:n.name.text,type:"enum",isDefault:!1,isReexport:!1,sourceModule:void 0});p.forEachChild(n,s)};return p.forEachChild(e,s),t}extractInterfaces(e){let t=[],s=n=>{p.isInterfaceDeclaration(n)&&t.push(this.extractInterfaceDeclaration(n,e)),p.forEachChild(n,s)};return p.forEachChild(e,s),t}extractEntities(e,t){let s=this.parseFile(t,e),n=[],r=this.extractFunctions(s);for(let a of r)n.push({name:a.name,type:"function",line:a.startLine,endLine:a.endLine,visibility:a.isExported?"public":"internal",isAsync:a.isAsync,isExported:a.isExported,parameters:a.parameters,returnType:a.returnType});let o=this.extractClasses(s);for(let a of o)n.push({name:a.name,type:"class",line:a.startLine,endLine:a.endLine,visibility:a.isExported?"public":"internal",isAsync:!1,isExported:a.isExported,extends:a.extends,implements:a.implements});let i=this.extractInterfaces(s);for(let a of i)n.push({name:a.name,type:"interface",line:a.startLine,endLine:a.endLine,visibility:a.isExported?"public":"internal",isAsync:!1,isExported:a.isExported});return n}getScriptKind(e){return e.endsWith(".tsx")?p.ScriptKind.TSX:e.endsWith(".ts")?p.ScriptKind.TS:e.endsWith(".jsx")?p.ScriptKind.JSX:e.endsWith(".js")?p.ScriptKind.JS:p.ScriptKind.TS}extractFunctionDeclaration(e,t){let{line:s}=t.getLineAndCharacterOfPosition(e.getStart()),{line:n}=t.getLineAndCharacterOfPosition(e.getEnd());return{name:e.name?.text??"anonymous",parameters:this.extractParameters(e.parameters),returnType:e.type?e.type.getText(t):void 0,startLine:s+1,endLine:n+1,isAsync:this.hasAsyncModifier(e),isExported:this.hasExportModifier(e),isGenerator:!!e.asteriskToken,typeParameters:this.extractTypeParameters(e.typeParameters)}}extractArrowFunctions(e,t,s){for(let n of e.declarationList.declarations)if(p.isIdentifier(n.name)&&n.initializer&&p.isArrowFunction(n.initializer)){let r=n.initializer,{line:o}=t.getLineAndCharacterOfPosition(e.getStart()),{line:i}=t.getLineAndCharacterOfPosition(e.getEnd());s.push({name:n.name.text,parameters:this.extractParameters(r.parameters),returnType:r.type?r.type.getText(t):void 0,startLine:o+1,endLine:i+1,isAsync:this.hasAsyncModifier(r),isExported:this.hasExportModifier(e),isGenerator:!1,typeParameters:this.extractTypeParameters(r.typeParameters)})}}extractClassDeclaration(e,t){let{line:s}=t.getLineAndCharacterOfPosition(e.getStart()),{line:n}=t.getLineAndCharacterOfPosition(e.getEnd()),r=[],o=[];for(let c of e.members)p.isMethodDeclaration(c)&&c.name?r.push(this.extractMethodDeclaration(c,t)):p.isPropertyDeclaration(c)&&c.name?o.push(this.extractPropertyDeclaration(c,t)):p.isConstructorDeclaration(c)&&(r.push(this.extractConstructor(c,t)),this.extractParameterProperties(c,o,t));let i,a=[];if(e.heritageClauses){for(let c of e.heritageClauses)if(c.token===p.SyntaxKind.ExtendsKeyword)i=c.types[0]?.expression.getText(t);else if(c.token===p.SyntaxKind.ImplementsKeyword)for(let l of c.types)a.push(l.expression.getText(t))}return{name:e.name?.text??"anonymous",methods:r,properties:o,extends:i,implements:a,isAbstract:this.hasAbstractModifier(e),isExported:this.hasExportModifier(e),startLine:s+1,endLine:n+1,typeParameters:this.extractTypeParameters(e.typeParameters)}}extractMethodDeclaration(e,t){let{line:s}=t.getLineAndCharacterOfPosition(e.getStart()),{line:n}=t.getLineAndCharacterOfPosition(e.getEnd());return{name:this.getPropertyName(e.name,t),parameters:this.extractParameters(e.parameters),returnType:e.type?e.type.getText(t):void 0,isAsync:this.hasAsyncModifier(e),isStatic:this.hasStaticModifier(e),isAbstract:this.hasAbstractModifier(e),visibility:this.getVisibility(e),startLine:s+1,endLine:n+1}}extractConstructor(e,t){let{line:s}=t.getLineAndCharacterOfPosition(e.getStart()),{line:n}=t.getLineAndCharacterOfPosition(e.getEnd());return{name:"constructor",parameters:this.extractParameters(e.parameters),returnType:void 0,isAsync:!1,isStatic:!1,isAbstract:!1,visibility:"public",startLine:s+1,endLine:n+1}}extractParameterProperties(e,t,s){for(let n of e.parameters)this.isParameterProperty(n)&&t.push({name:p.isIdentifier(n.name)?n.name.text:n.name.getText(s),type:n.type?n.type.getText(s):void 0,isStatic:!1,isReadonly:this.hasReadonlyModifier(n),visibility:this.getVisibility(n),hasInitializer:!!n.initializer})}isParameterProperty(e){return!!e.modifiers?.some(t=>t.kind===p.SyntaxKind.PublicKeyword||t.kind===p.SyntaxKind.PrivateKeyword||t.kind===p.SyntaxKind.ProtectedKeyword||t.kind===p.SyntaxKind.ReadonlyKeyword)}extractPropertyDeclaration(e,t){return{name:this.getPropertyName(e.name,t),type:e.type?e.type.getText(t):void 0,isStatic:this.hasStaticModifier(e),isReadonly:this.hasReadonlyModifier(e),visibility:this.getVisibility(e),hasInitializer:!!e.initializer}}extractImportDeclaration(e){let t=e.moduleSpecifier.text,s=[],n,r,o=e.importClause?.isTypeOnly??!1;if(e.importClause&&(e.importClause.name&&(n=e.importClause.name.text),e.importClause.namedBindings)){if(p.isNamespaceImport(e.importClause.namedBindings))r=e.importClause.namedBindings.name.text;else if(p.isNamedImports(e.importClause.namedBindings))for(let i of e.importClause.namedBindings.elements)s.push({name:i.propertyName?.text??i.name.text,alias:i.propertyName?i.name.text:void 0})}return{module:t,namedImports:s,defaultImport:n,namespaceImport:r,isTypeOnly:o}}extractExportDeclaration(e,t){let s=e.moduleSpecifier?e.moduleSpecifier.text:void 0;if(e.exportClause&&p.isNamedExports(e.exportClause))for(let n of e.exportClause.elements)t.push({name:n.name.text,type:"unknown",isDefault:!1,isReexport:!!s,sourceModule:s});else!e.exportClause&&s&&t.push({name:"*",type:"unknown",isDefault:!1,isReexport:!0,sourceModule:s})}extractInterfaceDeclaration(e,t){let{line:s}=t.getLineAndCharacterOfPosition(e.getStart()),{line:n}=t.getLineAndCharacterOfPosition(e.getEnd()),r=[],o=[];for(let a of e.members)p.isPropertySignature(a)&&a.name?r.push({name:this.getPropertyName(a.name,t),type:a.type?a.type.getText(t):void 0,isOptional:!!a.questionToken,isReadonly:this.hasReadonlyModifier(a)}):p.isMethodSignature(a)&&a.name&&o.push({name:this.getPropertyName(a.name,t),parameters:this.extractParameters(a.parameters),returnType:a.type?a.type.getText(t):void 0,isOptional:!!a.questionToken});let i=[];if(e.heritageClauses){for(let a of e.heritageClauses)if(a.token===p.SyntaxKind.ExtendsKeyword)for(let c of a.types)i.push(c.expression.getText(t))}return{name:e.name.text,properties:r,methods:o,extends:i,isExported:this.hasExportModifier(e),startLine:s+1,endLine:n+1,typeParameters:this.extractTypeParameters(e.typeParameters)}}extractParameters(e){return e.map(t=>{let s=t.getSourceFile();return{name:p.isIdentifier(t.name)?t.name.text:t.name.getText(s),type:t.type?t.type.getText(s):void 0,isOptional:!!t.questionToken||!!t.initializer,isRest:!!t.dotDotDotToken,defaultValue:t.initializer?t.initializer.getText(s):void 0}})}extractTypeParameters(e){return e?e.map(t=>t.name.text):[]}getPropertyName(e,t){return p.isIdentifier(e)||p.isStringLiteral(e)||p.isNumericLiteral(e)?e.text:e.getText(t)}getExportAssignmentName(e){return p.isIdentifier(e.expression)?e.expression.text:"default"}hasExportModifier(e){return p.canHaveModifiers(e)&&!!p.getModifiers(e)?.some(t=>t.kind===p.SyntaxKind.ExportKeyword)}hasDefaultModifier(e){return p.canHaveModifiers(e)&&!!p.getModifiers(e)?.some(t=>t.kind===p.SyntaxKind.DefaultKeyword)}hasAsyncModifier(e){return p.canHaveModifiers(e)&&!!p.getModifiers(e)?.some(t=>t.kind===p.SyntaxKind.AsyncKeyword)}hasStaticModifier(e){return p.canHaveModifiers(e)&&!!p.getModifiers(e)?.some(t=>t.kind===p.SyntaxKind.StaticKeyword)}hasAbstractModifier(e){return p.canHaveModifiers(e)&&!!p.getModifiers(e)?.some(t=>t.kind===p.SyntaxKind.AbstractKeyword)}hasReadonlyModifier(e){return p.canHaveModifiers(e)&&!!p.getModifiers(e)?.some(t=>t.kind===p.SyntaxKind.ReadonlyKeyword)}getVisibility(e){if(!p.canHaveModifiers(e))return"public";let t=p.getModifiers(e);return t?t.some(s=>s.kind===p.SyntaxKind.PrivateKeyword)?"private":t.some(s=>s.kind===p.SyntaxKind.ProtectedKeyword)?"protected":"public":"public"}},Me=new F,q=class{language="typescript";supportedExtensions=[".ts",".tsx",".js",".jsx",".mjs",".cjs"];parser=new F;async parseFile(e,t){let s=this.parser.parseFile(t,e),n=this.parser.extractFunctions(s),r=this.parser.extractClasses(s),o=this.parser.extractImports(s);return{functions:n.map(i=>this.mapFunction(i)),classes:r.map(i=>this.mapClass(i)),imports:o.map(i=>this.mapImport(i)),language:t.endsWith(".js")||t.endsWith(".jsx")||t.endsWith(".mjs")||t.endsWith(".cjs")?"javascript":"typescript",filePath:t}}mapFunction(e){return{name:e.name,parameters:e.parameters.map(t=>({name:t.name,type:t.type,isOptional:t.isOptional,defaultValue:t.defaultValue})),returnType:e.returnType,isAsync:e.isAsync,isPublic:e.isExported,complexity:1,decorators:[],genericParams:e.typeParameters,startLine:e.startLine,endLine:e.endLine}}mapClass(e){return{name:e.name,methods:e.methods.map(t=>({name:t.name,parameters:t.parameters.map(s=>({name:s.name,type:s.type,isOptional:s.isOptional,defaultValue:s.defaultValue})),returnType:t.returnType,isAsync:t.isAsync,isPublic:t.visibility==="public",complexity:1,decorators:[],genericParams:[],startLine:t.startLine,endLine:t.endLine})),properties:e.properties.map(t=>this.mapProperty(t)),isPublic:e.isExported,implements:e.implements,extends:e.extends,decorators:[],startLine:e.startLine,endLine:e.endLine}}mapProperty(e){return{name:e.name,type:e.type,isPublic:e.visibility==="public",isReadonly:e.isReadonly}}mapImport(e){return{module:e.module,namedImports:e.namedImports.map(t=>t.alias||t.name),isTypeOnly:e.isTypeOnly}}},Se=new q;fe();var E=1e3;function I(h){let e=h.split(`
|
|
3
3
|
`),t=[],s=[],n="",r=0,o=0,i=0,a=0;for(let c=0;c<e.length;c++){let l=e[c],d=l.trim();if(d===""||d.startsWith("//")||d.startsWith("#")||d.startsWith("*")){if(n){n+=" "+d;continue}t.push(l),s.push(c+1);continue}n||(r=c+1),n=n?n+" "+d:l;for(let u of d)u==="("?o++:u===")"?o=Math.max(0,o-1):u==="<"?i++:u===">"?i=Math.max(0,i-1):u==="["?a++:u==="]"&&(a=Math.max(0,a-1));o===0&&i===0&&a===0&&(t.push(n),s.push(r),n="")}return n&&(t.push(n),s.push(r)),{logicalLines:t,lineMap:s}}function G(h,e,t="<",s=">"){if(h[e]!==t)return;let n=1,r=e+1;for(;r<h.length&&n>0;)h[r]===t?n++:h[r]===s&&n--,r++;if(n===0)return h.substring(e+1,r-1)}function R(h,e,t){let s=[];for(let n=e-1;n>=0;n--){let r=h[n].trim();if(r.startsWith(t))s.unshift(r);else{if(r===""||r.startsWith("//")||r.startsWith("*")||r.startsWith("#"))continue;break}}return s}function S(h){let e=[],t=0,s="";for(let n of h)n==="<"||n==="("?t++:(n===">"||n===")")&&t--,n===","&&t===0?(e.push(s.trim()),s=""):s+=n;return s.trim()&&e.push(s.trim()),e}function re(h){let e=0,t=!1,s="";for(let n=0;n<h.length;n++){let r=h[n];if(t){r===s&&h[n-1]!=="\\"&&(t=!1);continue}r==='"'||r==="'"||r==="`"?(t=!0,s=r):r==="{"?e++:r==="}"&&e--}return e}var H=class{language="python";supportedExtensions=[".py"];async parseFile(e,t){return{functions:this.extractFunctions(e),classes:this.extractClasses(e),imports:this.extractImports(e),language:"python",filePath:t}}extractFunctions(e){let t=[],s=e.split(`
|
|
4
4
|
`),{logicalLines:n,lineMap:r}=I(e),o=/^(\s*)(async\s+)?def\s+(\w+)\s*\(([^)]*)\)(?:\s*->\s*([^:]*\S))?\s*:/;for(let i=0;i<n.length;i++){if(n[i].length>E)continue;let a=n[i].match(o);if(a){let c=a[1].length,l=!!a[2],d=a[3],u=a[4],m=a[5]?.trim(),g=r[i]-1,f=g+1;for(let y=g+1;y<s.length;y++){let b=s[y];if(b.trim()===""||b.trim().startsWith("#"))continue;if((b.match(/^(\s*)/)?.[1].length??0)<=c&&b.trim()!==""){f=y;break}f=y+1}let x=R(s,g,"@");t.push({name:d,parameters:this.parseParams(u),returnType:m,isAsync:l,isPublic:!d.startsWith("_"),complexity:1,decorators:x,genericParams:[],startLine:r[i],endLine:f})}}return t}extractClasses(e){let t=[],s=e.split(`
|
|
5
5
|
`),{logicalLines:n,lineMap:r}=I(e),o=/^(\s*)class\s+(\w+)(?:\(([^)]*)\))?\s*:/;for(let i=0;i<n.length;i++){let a=n[i].match(o);if(a){let c=a[1].length,l=a[2],d=a[3]?a[3].split(",").map(y=>y.trim()):[],u=r[i]-1,m=u+1;for(let y=u+1;y<s.length;y++){let b=s[y];if(b.trim()===""||b.trim().startsWith("#"))continue;if((b.match(/^(\s*)/)?.[1].length??0)<=c&&b.trim()!==""){m=y;break}m=y+1}let g=s.slice(u+1,m).join(`
|
|
@@ -20,7 +20,7 @@ import{a as ye}from"./chunk-MDFXPCBO.js";import{c as oe,d as ce,e as fe}from"./c
|
|
|
20
20
|
`),{logicalLines:n,lineMap:r}=I(e),o=/^\s*(public|private|protected|internal)?\s*(suspend)?\s*fun\s+(?:<[^{]*> +)?(\w+)\s*\(([^)]*)\)(?:\s*:\s*([^{=\s]+(?:\s+[^{=\s]+)*))?\s*/,i=0;for(let a=0;a<n.length;a++){let c=n[a];if(c.length>E){i+=(c.match(/\{/g)?.length??0)-(c.match(/\}/g)?.length??0);continue}let l=c.match(o);if(l&&i<=1){let d=l[1]||"public",u=!!l[2],m=l[3],g=l[4],f=l[5]?.trim();if(f&&f.includes("<")){let b=f.indexOf("<"),P=G(f,b);P!==void 0&&(f=f.substring(0,b)+"<"+P+">")}let x=r[a]-1,y=R(s,x,"@");t.push({name:m,parameters:this.parseParams(g),returnType:f,isAsync:u,isPublic:d==="public",complexity:1,decorators:y,genericParams:[],startLine:r[a],endLine:r[a]})}i+=re(c),i<0&&(i=0)}return t}extractClasses(e){let t=[],s=e.split(`
|
|
21
21
|
`),{logicalLines:n,lineMap:r}=I(e),o=/^\s*(public|private|protected|internal)?\s*(data|sealed|abstract|open)?\s*class\s+(\w+)(?:<[^{]*>)?(?:\s*(?:\([^)]*\))?\s*:\s*([^{\s]+(?:\s+[^{\s]+)*))?\s*\{?/;for(let i=0;i<n.length;i++){if(n[i].length>E)continue;let a=n[i].match(o);if(a){let c=a[3],l=a[4]?a[4].split(",").map(m=>m.trim().split("(")[0].trim()):[],d=r[i]-1,u=R(s,d,"@");t.push({name:c,methods:[],properties:[],isPublic:(a[1]||"public")==="public",implements:l.slice(1),extends:l[0]||void 0,decorators:u,startLine:r[i],endLine:r[i]})}}return t}extractImports(e){let t=[],s=e.split(`
|
|
22
22
|
`);for(let n of s){let r=n.match(/^\s*import\s+([^\s]+)/);r&&t.push({module:r[1],namedImports:[],isTypeOnly:!1})}return t}parseParams(e){return e.trim()?S(e).map(t=>{let s=t.indexOf(":");if(s===-1)return{name:t.replace("val ","").replace("var ","").trim(),type:void 0,isOptional:!1,defaultValue:void 0};let n=t.substring(0,s).replace("val ","").replace("var ","").trim(),r=t.substring(s+1).trim(),o=r.indexOf("="),i=o>=0?r.substring(0,o).trim():r,a=o>=0;return{name:n,type:i,isOptional:a||i?.endsWith("?")||!1,defaultValue:void 0}}):[]}},te=class{language="dart";supportedExtensions=[".dart"];async parseFile(e,t){return{functions:this.extractFunctions(e),classes:this.extractClasses(e),imports:this.extractImports(e),language:"dart",filePath:t}}extractFunctions(e){let t=[],{logicalLines:s,lineMap:n}=I(e),r=/^\s*([\w<>,.?]+(?:\s+[\w<>,.?]+)*)\s+(\w+)\s*\(([^)]*)\)(?:\s*(async))?\s*\{/;for(let o=0;o<s.length;o++){let i=s[o];if(i.includes(" class ")||i.length>E)continue;let a=i.match(r);if(a){let c=a[1].trim(),l=c;if(c&&c.includes("<")){let g=c.indexOf("<"),f=G(c,g);f!==void 0&&(l=c.substring(0,g)+"<"+f+">")}let d=a[2],u=a[3],m=!!a[4]||l.includes("Future");t.push({name:d,parameters:this.parseParams(u),returnType:l==="void"?void 0:l,isAsync:m,isPublic:!d.startsWith("_"),complexity:1,decorators:[],genericParams:[],startLine:n[o],endLine:n[o]})}}return t}extractClasses(e){let t=[],{logicalLines:s,lineMap:n}=I(e),r=/^\s*(abstract +)?class\s+(\w+)(?:<[^{]*>)?(?:\s+extends\s+(\w+))?(?:\s+(?:with|implements)\s+([^{\s]+(?:\s+[^{\s]+)*))?\s*\{/;for(let o=0;o<s.length;o++){if(s[o].length>E)continue;let i=s[o].match(r);if(i){let a=i[2],c=i[3],l=i[4]?i[4].split(",").map(d=>d.trim()):[];t.push({name:a,methods:[],properties:[],isPublic:!a.startsWith("_"),implements:l,extends:c,decorators:[],startLine:n[o],endLine:n[o]})}}return t}extractImports(e){let t=[],s=e.split(`
|
|
23
|
-
`);for(let n of s){let r=n.match(/^\s*import\s+'([^']+)'/);r&&t.push({module:r[1],namedImports:[],isTypeOnly:!1})}return t}parseParams(e){if(!e.trim())return[];let t=e.replace(/[{}[\]]/g,"");return S(t).map(s=>s.trim()).filter(s=>s).map(s=>{let n=s.replace("required ","").trim().split(/\s+/),r=n[n.length-1]||"",o=n.slice(0,-1).join(" ")||void 0;return{name:r,type:o,isOptional:s.includes("?")||s.includes("{"),defaultValue:void 0}})}},$=ce("ParserRegistry"),de=["python","java","csharp","rust","swift"],se=class h{language;supportedExtensions;wasmParser;regexParser;wasmFailCount=0;static MAX_WASM_RETRIES=3;constructor(e,t){this.wasmParser=e,this.regexParser=t,this.language=e.language,this.supportedExtensions=e.supportedExtensions}async parseFile(e,t){if(this.wasmFailCount<h.MAX_WASM_RETRIES)try{return await this.wasmParser.parseFile(e,t)}catch(s){this.wasmFailCount++;let n=s instanceof Error?s.message:String(s),r=this.wasmFailCount>=h.MAX_WASM_RETRIES;$.warn(`[${this.language}] tree-sitter WASM parser failed (attempt ${this.wasmFailCount}/${h.MAX_WASM_RETRIES}): ${n}. Falling back to regex parser (~97-98% accuracy). `+(r?"Set AQE_PARSER_REGEX_ONLY=1 to silence this warning.":"Will retry WASM on next parse."))}return this.regexParser.parseFile(e,t)}},ne=class{parsers=new Map;_wasmInitPromise=null;constructor(){this.register(new H),this.register(new J),this.register(new Q),this.register(new X),this.register(new Y),this.register(new Z),this.register(new ee),this.register(new te),this._wasmInitPromise=this._tryLoadWasmParsers()}async _tryLoadWasmParsers(){try{let e=await import("./tree-sitter-wasm-parser-KTST5NWH.js");if(!e.isWasmAvailable()){$.info("tree-sitter WASM parsers disabled or unavailable. Using regex parsers (~97-98% accuracy). Set AQE_PARSER_REGEX_ONLY=0 or ensure web-tree-sitter is installed to enable WASM.");return}let t=e.createWasmParsers();for(let s of de){let n=t.get(s),r=this.parsers.get(s);n&&r&&this.parsers.set(s,new se(n,r))}$.info("tree-sitter WASM parsers available for: "+de.join(", "))}catch{$.info("tree-sitter WASM parser module not available. Using regex parsers for all languages.")}}register(e){this.parsers.set(e.language,e)}getParser(e){return this.parsers.get(e)}async parseFile(e,t,s){this._wasmInitPromise&&(await this._wasmInitPromise,this._wasmInitPromise=null);let n=this.parsers.get(s);if(n)return n.parseFile(e,t)}getSupportedLanguages(){return Array.from(this.parsers.keys())}supportsLanguage(e){return this.parsers.has(e)}},De=new ne;import*as M from"node:fs/promises";import*as C from"node:path";var xe=[/\.\./,/%2e%2e/i,/%252e%252e/i,/\.\.%2f/i,/%2f\.\./i,/\.\.%5c/i,/\.\.\\/,/%c0%ae/i,/%c0%2f/i,/%c1%9c/i,/\0/,/%00/i],ve=[/^\/etc\//i,/^\/proc\//i,/^\/sys\//i,/^\/dev\//i,/^\/root\//i,/^\/home\/.+\/\./i,/^[A-Z]:\\Windows/i,/^[A-Z]:\\System/i,/^[A-Z]:\\Users\\.+\\AppData/i],ie=class{name="path-traversal";getRiskLevel(){return"critical"}validate(e,t={}){let{basePath:s="",allowAbsolute:n=!1,allowedExtensions:r=[],deniedExtensions:o=[".exe",".bat",".cmd",".sh",".ps1",".dll",".so"],maxDepth:i=10,maxLength:a=4096}=t;if(e.length>a)return{valid:!1,error:`Path exceeds maximum length of ${a}`,riskLevel:"medium"};for(let g of xe)if(g.test(e))return{valid:!1,error:"Path traversal attempt detected",riskLevel:"critical"};if(!n&&(e.startsWith("/")||/^[A-Z]:/i.test(e)))return{valid:!1,error:"Absolute paths are not allowed",riskLevel:"high"};for(let g of ve)if(g.test(e))return{valid:!1,error:"Access to system paths is not allowed",riskLevel:"critical"};let c=this.normalizePath(e);if(c.includes(".."))return{valid:!1,error:"Path traversal detected after normalization",riskLevel:"critical"};if(c.split("/").filter(Boolean).length>i)return{valid:!1,error:`Path depth exceeds maximum of ${i}`,riskLevel:"low"};let d=this.getExtension(c);if(d){let g=`.${d.toLowerCase()}`,f=d.toLowerCase();if(o.length>0&&o.some(y=>y.toLowerCase()===g||y.toLowerCase()===f))return{valid:!1,error:`File extension '${d}' is not allowed`,riskLevel:"high"};if(r.length>0&&!r.some(y=>y.toLowerCase()===g||y.toLowerCase()===f))return{valid:!1,error:`File extension '${d}' is not in allowed list`,riskLevel:"medium"}}let u=s?this.joinPathsAbsolute(s,c):c,m=s.startsWith("/")?`/${this.normalizePath(s)}`:this.normalizePath(s);return s&&!u.startsWith(m)?{valid:!1,error:"Path escapes base directory",riskLevel:"critical"}:{valid:!0,normalizedPath:u,riskLevel:"none"}}normalizePath(e){let t=e.replace(/\\/g,"/");t=t.replace(/\/+/g,"/");let s=t.split("/"),n=[];for(let r of s)r==="."||r===""||(r===".."?n.length>0&&n[n.length-1]!==".."&&n.pop():n.push(r));return n.join("/")}joinPaths(...e){return e.length===0?"":e.map(t=>t.replace(/^\/+/,"").replace(/\/+$/,"")).filter(Boolean).join("/")}joinPathsAbsolute(...e){if(e.length===0)return"";let t=e[0].startsWith("/"),s=e.map(n=>{for(;n.startsWith("/");)n=n.slice(1);for(;n.endsWith("/");)n=n.slice(0,-1);return n}).filter(Boolean).join("/");return t?`/${s}`:s}getExtension(e){let t=e.match(/\.([^./\\]+)$/);return t?t[1]:null}},Ee=new ie,pe=(h,e)=>Ee.validate(h,e);le();var A=class extends Error{constructor(t,s,n,r){super(t);this.filePath=s;this.code=n;this.cause=r;this.name="FileReadError"}},z=class extends Error{constructor(t,s,n){super(t);this.filePath=s;this.cause=n;this.name="JsonParseError"}},T=class extends Error{constructor(t,s,n){super(`Path traversal detected: ${s.join(", ")}`);this.requestedPath=t;this.issues=s;this.riskLevel=n;this.name="PathTraversalError"}},ae=class{constructor(e,t){this.maxSize=e;this.ttlMs=t}cache=new Map;accessOrder=[];get(e){let t=this.cache.get(e);if(t){if(Date.now()-t.timestamp>this.ttlMs){this.delete(e);return}return this.updateAccessOrder(e),t.value}}set(e,t,s){for(this.cache.has(e)&&this.delete(e);this.cache.size>=this.maxSize&&this.accessOrder.length>0;){let n=this.accessOrder.shift();n&&this.cache.delete(n)}this.cache.set(e,{value:t,timestamp:Date.now(),size:s}),this.accessOrder.push(e)}delete(e){let t=this.cache.delete(e);if(t){let s=this.accessOrder.indexOf(e);s>-1&&this.accessOrder.splice(s,1)}return t}clear(){this.cache.clear(),this.accessOrder=[]}get size(){return this.cache.size}get totalBytes(){let e=0;return this.cache.forEach(t=>{e+=t.size}),e}updateAccessOrder(e){let t=this.accessOrder.indexOf(e);t>-1&&(this.accessOrder.splice(t,1),this.accessOrder.push(e))}prune(){let e=Date.now(),t=0,s=[];return this.cache.forEach((n,r)=>{e-n.timestamp>this.ttlMs&&s.push(r)}),s.forEach(n=>{this.delete(n),t++}),t}};function Ie(h){let e="",t=0;for(;t<h.length;){let s=h[t],n=h[t+1];s==="*"&&n==="*"?h[t+2]==="/"?(e+="(?:.*/)?",t+=3):(e+=".*",t+=2):s==="*"?(e+="[^/]*",t++):s==="?"?(e+="[^/]",t++):".+^${}()|[]\\".includes(s)?(e+="\\"+s,t++):(e+=s,t++)}return new RegExp("^"+e+"$")}async function ue(h,e,t,s){try{let n=await M.readdir(h,{withFileTypes:!0});for(let r of n){let o=C.join(h,r.name),i=C.relative(s,o);if(r.isDirectory())r.name!=="node_modules"&&!r.name.startsWith(".")&&await ue(o,e,t,s);else if(r.isFile()){let a=i.replace(/\\/g,"/");e.test(a)&&t.push(o)}}}catch(n){console.debug("[FileReader] Directory read error:",n instanceof Error?n.message:n)}}var k=class{basePath;cache;enableCache;stats={cacheHits:0,cacheMisses:0,totalReads:0,cacheSize:0,cacheEntries:0};constructor(e={}){this.basePath=e.basePath??process.cwd(),this.enableCache=e.enableCache??!0,this.cache=new ae(e.maxCacheSize??100,e.cacheTtlMs??300*1e3)}resolvePath(e){let t=C.isAbsolute(e),s=pe(e,{basePath:t?"":this.basePath,allowAbsolute:!0,deniedExtensions:[".exe",".bat",".cmd",".ps1",".dll",".so"]});if(!s.valid)throw new T(e,[s.error||"Path validation failed"],s.riskLevel);if(t&&this.basePath){let n=C.resolve(this.basePath),r=C.resolve(e);if(!r.startsWith(n))throw new T(e,["Path escapes base directory"],"critical");return r}return s.normalizedPath?s.normalizedPath:t?e:C.resolve(this.basePath,e)}async readFile(e){let t;try{t=this.resolvePath(e)}catch(s){if(s instanceof T)return L(s);throw s}if(this.stats.totalReads++,this.enableCache){let s=this.cache.get(t);if(s!==void 0)return this.stats.cacheHits++,this.updateCacheStats(),w(s);this.stats.cacheMisses++}try{let s=await M.readFile(t,"utf-8");return this.enableCache&&(this.cache.set(t,s,Buffer.byteLength(s,"utf-8")),this.updateCacheStats()),w(s)}catch(s){let n=s,r;switch(n.code){case"ENOENT":r="File not found: "+t;break;case"EACCES":r="Permission denied: "+t;break;case"EISDIR":r="Path is a directory: "+t;break;default:r="Failed to read file: "+t}return L(new A(r,t,n.code,n))}}async readJSON(e){let t=await this.readFile(e);if(!t.success)return t;try{let s=N(t.value);return w(s)}catch(s){let n=s,r=e;try{r=this.resolvePath(e)}catch{}return L(new z("Invalid JSON in file: "+r+" - "+n.message,r,n))}}async fileExists(e){let t;try{t=this.resolvePath(e)}catch(s){if(s instanceof T)return L(s);throw s}try{return await M.access(t,M.constants.F_OK),w(!0)}catch(s){let n=s;return n.code==="ENOENT"?w(!1):L(new A("Cannot check file existence: "+t,t,n.code,n))}}async listFiles(e,t){let s;try{s=t?this.resolvePath(t):this.basePath}catch(n){if(n instanceof T)return L(n);throw n}try{if(!(await M.stat(s)).isDirectory())return L(new A("Base path is not a directory: "+s,s,"ENOTDIR"));let r=Ie(e),o=[];return await ue(s,r,o,s),o.sort(),w(o)}catch(n){let r=n;return L(new A("Failed to list files in: "+s,s,r.code,r))}}invalidateCache(e){let t=this.resolvePath(e);this.cache.delete(t),this.updateCacheStats()}clearCache(){this.cache.clear(),this.updateCacheStats()}pruneCache(){let e=this.cache.prune();return this.updateCacheStats(),e}getStats(){return{...this.stats}}resetStats(){this.stats={cacheHits:0,cacheMisses:0,totalReads:0,cacheSize:this.cache.totalBytes,cacheEntries:this.cache.size}}updateCacheStats(){this.stats.cacheSize=this.cache.totalBytes,this.stats.cacheEntries=this.cache.size}};V();var v={MODEL:"all-MiniLM-L6-v2",DIMENSIONS:384,CONTEXT_WINDOW:8192,BATCH_SIZE:100,MAX_RETRIES:3,RETRY_DELAY_MS:1e3,TIMEOUT_MS:3e4,DEFAULT_OLLAMA_URL:"http://localhost:11434"};var K=class{baseUrl;maxRetries;retryDelayMs;timeoutMs;constructor(e=v.DEFAULT_OLLAMA_URL,t=v.MAX_RETRIES,s=v.RETRY_DELAY_MS,n=v.TIMEOUT_MS){this.baseUrl=e.replace(/\/$/,""),this.maxRetries=t,this.retryDelayMs=s,this.timeoutMs=n}async healthCheck(){try{let e=await this.fetchWithTimeout(`${this.baseUrl}/api/tags`,{method:"GET",headers:{"Content-Type":"application/json"}},5e3);if(!e.ok)return!1;let t=await e.json();return t.models?t.models.some(s=>s.name?.startsWith(v.MODEL)||s.model?.startsWith(v.MODEL)):!1}catch{return!1}}async generateEmbedding(e){let t={model:v.MODEL,prompt:e},s=null;for(let n=0;n<this.maxRetries;n++)try{let r=await this.fetchWithTimeout(`${this.baseUrl}/api/embeddings`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)},this.timeoutMs);if(!r.ok){let i=await r.text();throw new Error(`Ollama API error (${r.status}): ${i}`)}let o=await r.json();if(o.embedding.length!==v.DIMENSIONS)throw new Error(`Invalid embedding dimensions: expected ${v.DIMENSIONS}, got ${o.embedding.length}`);return o.embedding}catch(r){if(s=D(r),s.message.includes("Invalid embedding dimensions"))throw s;if(n<this.maxRetries-1){let o=this.retryDelayMs*Math.pow(2,n);await this.sleep(o)}}throw new Error(`Failed to generate embedding after ${this.maxRetries} attempts: ${s?.message}`)}async fetchWithTimeout(e,t,s){let n=new AbortController,r=setTimeout(()=>n.abort(),s);try{return await fetch(e,{...t,signal:n.signal})}finally{clearTimeout(r)}}sleep(e){return new Promise(t=>setTimeout(t,e))}async getServerInfo(){try{let e=await this.fetchWithTimeout(`${this.baseUrl}/api/tags`,{method:"GET",headers:{"Content-Type":"application/json"}},5e3);return e.ok?await e.json():null}catch{return null}}async ensureModelAvailable(){if(!await this.healthCheck())throw new Error(`Ollama model '${v.MODEL}' is not available. Please run: ollama pull ${v.MODEL}`)}};import{createHash as Pe}from"crypto";var U=class{cache;maxSize;hits;misses;constructor(e=1e4){this.cache=new Map,this.maxSize=e,this.hits=0,this.misses=0}hashContent(e,t){return Pe("sha256").update(`${t}:${e}`).digest("hex")}get(e,t){let s=this.hashContent(e,t),n=this.cache.get(s);return n?(this.hits++,this.cache.delete(s),this.cache.set(s,n),n.embedding):(this.misses++,null)}set(e,t,s){let n=this.hashContent(e,t);if(this.cache.size>=this.maxSize&&!this.cache.has(n)){let o=this.cache.keys().next().value;o&&this.cache.delete(o)}let r={embedding:s,timestamp:Date.now(),model:t};this.cache.set(n,r)}has(e,t){let s=this.hashContent(e,t);return this.cache.has(s)}getStats(){let e=this.hits+this.misses,t=e>0?this.hits/e:0;return{size:this.cache.size,hitRate:t,hits:this.hits,misses:this.misses}}clear(){this.cache.clear(),this.hits=0,this.misses=0}evictOlderThan(e){let s=Date.now()-e,n=0;for(let[r,o]of this.cache.entries())o.timestamp<s&&(this.cache.delete(r),n++);return n}getMemoryUsageEstimate(){return this.cache.size*3172}export(){return Array.from(this.cache.entries()).map(([e,t])=>({key:e,entry:t}))}import(e){this.cache.clear();for(let{key:t,entry:s}of e)this.cache.size<this.maxSize&&this.cache.set(t,s)}};V();var _=class{client;cache;batchSize;enableFallback;ollamaAvailable=null;constructor(e={}){this.client=new K(e.ollamaBaseUrl),this.cache=e.cache??new U(e.maxCacheSize),this.batchSize=e.batchSize??v.BATCH_SIZE,this.enableFallback=e.enableFallback??!0}async embed(e){let t=this.cache.get(e,v.MODEL);if(t)return t;let s;if(await this.isOllamaAvailable())s=await this.client.generateEmbedding(e);else if(this.enableFallback)s=this.generatePseudoEmbedding(e);else throw new Error(`Ollama is not available and fallback is disabled. Please run: ollama pull ${v.MODEL}`);return this.cache.set(e,v.MODEL,s),s}formatForEmbedding(e){let t=[];e.language&&t.push(e.language),e.type&&t.push(e.type),e.name&&t.push(e.name);let s=t.length>0?`${t.join(" ")}: `:"",n=v.CONTEXT_WINDOW*4,r=e.content.trim();if(s.length+r.length>n){let o=n-s.length-3;r=r.substring(0,o)+"..."}return s+r}async embedBatch(e){let t=[];for(let s of e){let n=await this.embed(s);t.push(n)}return t}async embedCodeChunks(e,t){let s=Date.now(),n=[],r=0,o=0,i=await this.isOllamaAvailable();if(i)await this.client.ensureModelAvailable();else if(!this.enableFallback)throw new Error(`Ollama is not available and fallback is disabled. Please run: ollama pull ${v.MODEL}`);for(let c=0;c<e.length;c+=this.batchSize){let l=e.slice(c,Math.min(c+this.batchSize,e.length)),d=await this.processBatch(l,i);n.push(...d);for(let u of d)u.cached?r++:o++;if(t){let u=c+l.length,m=e.length,f=(Date.now()-s)/u,y=(m-u)*f;t({current:u,total:m,percentage:u/m*100,estimatedTimeRemainingMs:y})}}let a=Date.now()-s;return{results:n,stats:{totalChunks:e.length,cachedHits:r,computedNew:o,totalTimeMs:a,avgTimePerChunk:a/e.length}}}async processBatch(e,t){let s=[],n=e.map(async o=>{let i=this.formatForEmbedding(o),a=Date.now(),c=this.cache.get(i,v.MODEL);if(c)return{chunkId:o.id,embedding:c,model:v.MODEL,cached:!0,computeTimeMs:Date.now()-a};try{let l;return t?l=await this.client.generateEmbedding(i):l=this.generatePseudoEmbedding(i),this.cache.set(i,v.MODEL,l),{chunkId:o.id,embedding:l,model:t?v.MODEL:"pseudo-embedding",cached:!1,computeTimeMs:Date.now()-a}}catch(l){throw new Error(`Failed to generate embedding for chunk ${o.id}: ${j(l)}`)}}),r=await Promise.all(n);return s.push(...r),s}async isOllamaAvailable(){return this.ollamaAvailable!==null?this.ollamaAvailable:(this.ollamaAvailable=await this.client.healthCheck(),this.ollamaAvailable)}resetOllamaCheck(){this.ollamaAvailable=null}generatePseudoEmbedding(e){let t=new Array(v.DIMENSIONS).fill(0),s=e.split(/\s+|[^\w]+/).filter(o=>o.length>0);for(let o=0;o<s.length;o++){let i=s[o];for(let a=0;a<i.length&&a<t.length;a++)t[(o+a)%t.length]+=i.charCodeAt(a)/1e3}let n=[[/class\s+\w+/,0],[/function\s+\w+/,1],[/async\s+|await\s+|Promise/,2],[/interface\s+\w+/,3],[/export\s+/,4],[/import\s+/,5],[/try\s*{/,6],[/\.(map|filter|reduce)\(/,7]];for(let[o,i]of n)o.test(e)&&(t[i]+=.5);let r=Math.sqrt(t.reduce((o,i)=>o+i*i,0))||1;return t.map(o=>o/r)}clearCache(){this.cache.clear()}getCacheStats(){return this.cache.getStats()}async healthCheck(){return await this.client.healthCheck()}async getServerInfo(){return await this.client.getServerInfo()}getDimensions(){return v.DIMENSIONS}getConfig(){return{model:v.MODEL,dimensions:v.DIMENSIONS,contextWindow:v.CONTEXT_WINDOW,batchSize:this.batchSize,maxRetries:v.MAX_RETRIES,enableFallback:this.enableFallback}}};V();le();var we={maxNodes:1e5,maxEdgesPerNode:500,namespace:"code-intelligence:kg",enableVectorEmbeddings:!0,embeddingDimension:384,enableLLMExtraction:!0,llmModelTier:2,llmMaxTokens:2048},me=oe.create("code-intelligence/knowledge-graph"),he=class{config;memory;nodeCache=new Map;edgeIndex=new Map;tsParser;fileReader;embedder;llmRouter;constructor(e,t={}){this.config={...we,...t},this.isKnowledgeGraphDependencies(e)?(this.memory=e.memory,this.llmRouter=e.llmRouter):(this.memory=e,this.llmRouter=void 0),this.tsParser=new F,this.fileReader=new k,this.embedder=new _({enableFallback:!0})}isKnowledgeGraphDependencies(e){return e.memory!==void 0}async index(e){let t=Date.now(),s=[],n=0,r=0;try{let{paths:o,incremental:i=!1,includeTests:a=!0,languages:c}=e;i||await this.clear();for(let d of o)try{if(c&&c.length>0){let m=this.getFileExtension(d);if(!this.matchesLanguage(m,c))continue}if(!a&&this.isTestFile(d))continue;let u=await this.indexFile(d);n+=u.nodes,r+=u.edges}catch(u){s.push({file:d,error:j(u)})}let l=Date.now()-t;return await this.storeIndexMetadata({filesIndexed:o.length-s.length,nodesCreated:n,edgesCreated:r,duration:l,indexedAt:new Date().toISOString()}),w({filesIndexed:o.length-s.length,nodesCreated:n,edgesCreated:r,duration:l,errors:s})}catch(o){return L(D(o))}}async query(e){try{let{query:t,type:s,limit:n=100}=e;return s==="cypher"?this.executeCypherQuery(t,n):this.executeNaturalLanguageQuery(t,n)}catch(t){return L(D(t))}}async mapDependencies(e){try{let{files:t,direction:s,depth:n=3}=e,r=[],o=[],i=new Set,a=[];for(let l of t)await this.traverseDependencies(l,s,n,i,r,o,[],a);let c=this.calculateDependencyMetrics(r,o);return w({nodes:r,edges:o,cycles:a,metrics:c})}catch(t){return L(D(t))}}async getNode(e){if(this.nodeCache.has(e))return this.nodeCache.get(e);let t=`${this.config.namespace}:node:${e}`,s=await this.memory.get(t);return s&&this.nodeCache.set(e,s),s}async getEdges(e,t){let s=[],n=this.edgeIndex.get(e);if(n)return this.filterEdgesByDirection(n,e,t);let r=`${this.config.namespace}:edge:*`,o=await this.memory.search(r,this.config.maxEdgesPerNode*2);for(let i of o){let a=await this.memory.get(i);a&&(t!=="outgoing"&&a.target===e||t!=="incoming"&&a.source===e)&&s.push(a)}return s}async clear(){this.nodeCache.clear(),this.edgeIndex.clear()}isLLMExtractionAvailable(){return this.config.enableLLMExtraction===!0&&this.llmRouter!==void 0}getModelForTier(e){switch(e){case 1:return"claude-3-5-haiku-20241022";case 2:return"claude-sonnet-4-20250514";case 3:return"claude-sonnet-4-20250514";case 4:return"claude-opus-4-5-20251101";default:return"claude-sonnet-4-20250514"}}async extractRelationshipsWithLLM(e,t){if(!this.llmRouter)return{semanticRelationships:[],designPatterns:[],architecturalBoundaries:[],dependencyImpacts:[]};try{let s=this.buildRelationshipExtractionPrompt(e,t),n=this.getModelForTier(this.config.llmModelTier??2),r=await this.llmRouter.chat({messages:[{role:"system",content:`You are an expert software architect analyzing code structure. Extract:
|
|
23
|
+
`);for(let n of s){let r=n.match(/^\s*import\s+'([^']+)'/);r&&t.push({module:r[1],namedImports:[],isTypeOnly:!1})}return t}parseParams(e){if(!e.trim())return[];let t=e.replace(/[{}[\]]/g,"");return S(t).map(s=>s.trim()).filter(s=>s).map(s=>{let n=s.replace("required ","").trim().split(/\s+/),r=n[n.length-1]||"",o=n.slice(0,-1).join(" ")||void 0;return{name:r,type:o,isOptional:s.includes("?")||s.includes("{"),defaultValue:void 0}})}},$=ce("ParserRegistry"),de=["python","java","csharp","rust","swift"],se=class h{language;supportedExtensions;wasmParser;regexParser;wasmFailCount=0;static MAX_WASM_RETRIES=3;constructor(e,t){this.wasmParser=e,this.regexParser=t,this.language=e.language,this.supportedExtensions=e.supportedExtensions}async parseFile(e,t){if(this.wasmFailCount<h.MAX_WASM_RETRIES)try{return await this.wasmParser.parseFile(e,t)}catch(s){this.wasmFailCount++;let n=s instanceof Error?s.message:String(s),r=this.wasmFailCount>=h.MAX_WASM_RETRIES;$.warn(`[${this.language}] tree-sitter WASM parser failed (attempt ${this.wasmFailCount}/${h.MAX_WASM_RETRIES}): ${n}. Falling back to regex parser (~97-98% accuracy). `+(r?"Set AQE_PARSER_REGEX_ONLY=1 to silence this warning.":"Will retry WASM on next parse."))}return this.regexParser.parseFile(e,t)}},ne=class{parsers=new Map;_wasmInitPromise=null;constructor(){this.register(new H),this.register(new J),this.register(new Q),this.register(new X),this.register(new Y),this.register(new Z),this.register(new ee),this.register(new te),this._wasmInitPromise=this._tryLoadWasmParsers()}async _tryLoadWasmParsers(){try{let e=await import("./tree-sitter-wasm-parser-VLX6HQW2.js");if(!e.isWasmAvailable()){$.info("tree-sitter WASM parsers disabled or unavailable. Using regex parsers (~97-98% accuracy). Set AQE_PARSER_REGEX_ONLY=0 or ensure web-tree-sitter is installed to enable WASM.");return}let t=e.createWasmParsers();for(let s of de){let n=t.get(s),r=this.parsers.get(s);n&&r&&this.parsers.set(s,new se(n,r))}$.info("tree-sitter WASM parsers available for: "+de.join(", "))}catch{$.info("tree-sitter WASM parser module not available. Using regex parsers for all languages.")}}register(e){this.parsers.set(e.language,e)}getParser(e){return this.parsers.get(e)}async parseFile(e,t,s){this._wasmInitPromise&&(await this._wasmInitPromise,this._wasmInitPromise=null);let n=this.parsers.get(s);if(n)return n.parseFile(e,t)}getSupportedLanguages(){return Array.from(this.parsers.keys())}supportsLanguage(e){return this.parsers.has(e)}},De=new ne;import*as M from"node:fs/promises";import*as C from"node:path";var xe=[/\.\./,/%2e%2e/i,/%252e%252e/i,/\.\.%2f/i,/%2f\.\./i,/\.\.%5c/i,/\.\.\\/,/%c0%ae/i,/%c0%2f/i,/%c1%9c/i,/\0/,/%00/i],ve=[/^\/etc\//i,/^\/proc\//i,/^\/sys\//i,/^\/dev\//i,/^\/root\//i,/^\/home\/.+\/\./i,/^[A-Z]:\\Windows/i,/^[A-Z]:\\System/i,/^[A-Z]:\\Users\\.+\\AppData/i],ie=class{name="path-traversal";getRiskLevel(){return"critical"}validate(e,t={}){let{basePath:s="",allowAbsolute:n=!1,allowedExtensions:r=[],deniedExtensions:o=[".exe",".bat",".cmd",".sh",".ps1",".dll",".so"],maxDepth:i=10,maxLength:a=4096}=t;if(e.length>a)return{valid:!1,error:`Path exceeds maximum length of ${a}`,riskLevel:"medium"};for(let g of xe)if(g.test(e))return{valid:!1,error:"Path traversal attempt detected",riskLevel:"critical"};if(!n&&(e.startsWith("/")||/^[A-Z]:/i.test(e)))return{valid:!1,error:"Absolute paths are not allowed",riskLevel:"high"};for(let g of ve)if(g.test(e))return{valid:!1,error:"Access to system paths is not allowed",riskLevel:"critical"};let c=this.normalizePath(e);if(c.includes(".."))return{valid:!1,error:"Path traversal detected after normalization",riskLevel:"critical"};if(c.split("/").filter(Boolean).length>i)return{valid:!1,error:`Path depth exceeds maximum of ${i}`,riskLevel:"low"};let d=this.getExtension(c);if(d){let g=`.${d.toLowerCase()}`,f=d.toLowerCase();if(o.length>0&&o.some(y=>y.toLowerCase()===g||y.toLowerCase()===f))return{valid:!1,error:`File extension '${d}' is not allowed`,riskLevel:"high"};if(r.length>0&&!r.some(y=>y.toLowerCase()===g||y.toLowerCase()===f))return{valid:!1,error:`File extension '${d}' is not in allowed list`,riskLevel:"medium"}}let u=s?this.joinPathsAbsolute(s,c):c,m=s.startsWith("/")?`/${this.normalizePath(s)}`:this.normalizePath(s);return s&&!u.startsWith(m)?{valid:!1,error:"Path escapes base directory",riskLevel:"critical"}:{valid:!0,normalizedPath:u,riskLevel:"none"}}normalizePath(e){let t=e.replace(/\\/g,"/");t=t.replace(/\/+/g,"/");let s=t.split("/"),n=[];for(let r of s)r==="."||r===""||(r===".."?n.length>0&&n[n.length-1]!==".."&&n.pop():n.push(r));return n.join("/")}joinPaths(...e){return e.length===0?"":e.map(t=>t.replace(/^\/+/,"").replace(/\/+$/,"")).filter(Boolean).join("/")}joinPathsAbsolute(...e){if(e.length===0)return"";let t=e[0].startsWith("/"),s=e.map(n=>{for(;n.startsWith("/");)n=n.slice(1);for(;n.endsWith("/");)n=n.slice(0,-1);return n}).filter(Boolean).join("/");return t?`/${s}`:s}getExtension(e){let t=e.match(/\.([^./\\]+)$/);return t?t[1]:null}},Ee=new ie,pe=(h,e)=>Ee.validate(h,e);le();var A=class extends Error{constructor(t,s,n,r){super(t);this.filePath=s;this.code=n;this.cause=r;this.name="FileReadError"}},z=class extends Error{constructor(t,s,n){super(t);this.filePath=s;this.cause=n;this.name="JsonParseError"}},T=class extends Error{constructor(t,s,n){super(`Path traversal detected: ${s.join(", ")}`);this.requestedPath=t;this.issues=s;this.riskLevel=n;this.name="PathTraversalError"}},ae=class{constructor(e,t){this.maxSize=e;this.ttlMs=t}cache=new Map;accessOrder=[];get(e){let t=this.cache.get(e);if(t){if(Date.now()-t.timestamp>this.ttlMs){this.delete(e);return}return this.updateAccessOrder(e),t.value}}set(e,t,s){for(this.cache.has(e)&&this.delete(e);this.cache.size>=this.maxSize&&this.accessOrder.length>0;){let n=this.accessOrder.shift();n&&this.cache.delete(n)}this.cache.set(e,{value:t,timestamp:Date.now(),size:s}),this.accessOrder.push(e)}delete(e){let t=this.cache.delete(e);if(t){let s=this.accessOrder.indexOf(e);s>-1&&this.accessOrder.splice(s,1)}return t}clear(){this.cache.clear(),this.accessOrder=[]}get size(){return this.cache.size}get totalBytes(){let e=0;return this.cache.forEach(t=>{e+=t.size}),e}updateAccessOrder(e){let t=this.accessOrder.indexOf(e);t>-1&&(this.accessOrder.splice(t,1),this.accessOrder.push(e))}prune(){let e=Date.now(),t=0,s=[];return this.cache.forEach((n,r)=>{e-n.timestamp>this.ttlMs&&s.push(r)}),s.forEach(n=>{this.delete(n),t++}),t}};function Ie(h){let e="",t=0;for(;t<h.length;){let s=h[t],n=h[t+1];s==="*"&&n==="*"?h[t+2]==="/"?(e+="(?:.*/)?",t+=3):(e+=".*",t+=2):s==="*"?(e+="[^/]*",t++):s==="?"?(e+="[^/]",t++):".+^${}()|[]\\".includes(s)?(e+="\\"+s,t++):(e+=s,t++)}return new RegExp("^"+e+"$")}async function ue(h,e,t,s){try{let n=await M.readdir(h,{withFileTypes:!0});for(let r of n){let o=C.join(h,r.name),i=C.relative(s,o);if(r.isDirectory())r.name!=="node_modules"&&!r.name.startsWith(".")&&await ue(o,e,t,s);else if(r.isFile()){let a=i.replace(/\\/g,"/");e.test(a)&&t.push(o)}}}catch(n){console.debug("[FileReader] Directory read error:",n instanceof Error?n.message:n)}}var k=class{basePath;cache;enableCache;stats={cacheHits:0,cacheMisses:0,totalReads:0,cacheSize:0,cacheEntries:0};constructor(e={}){this.basePath=e.basePath??process.cwd(),this.enableCache=e.enableCache??!0,this.cache=new ae(e.maxCacheSize??100,e.cacheTtlMs??300*1e3)}resolvePath(e){let t=C.isAbsolute(e),s=pe(e,{basePath:t?"":this.basePath,allowAbsolute:!0,deniedExtensions:[".exe",".bat",".cmd",".ps1",".dll",".so"]});if(!s.valid)throw new T(e,[s.error||"Path validation failed"],s.riskLevel);if(t&&this.basePath){let n=C.resolve(this.basePath),r=C.resolve(e);if(!r.startsWith(n))throw new T(e,["Path escapes base directory"],"critical");return r}return s.normalizedPath?s.normalizedPath:t?e:C.resolve(this.basePath,e)}async readFile(e){let t;try{t=this.resolvePath(e)}catch(s){if(s instanceof T)return L(s);throw s}if(this.stats.totalReads++,this.enableCache){let s=this.cache.get(t);if(s!==void 0)return this.stats.cacheHits++,this.updateCacheStats(),w(s);this.stats.cacheMisses++}try{let s=await M.readFile(t,"utf-8");return this.enableCache&&(this.cache.set(t,s,Buffer.byteLength(s,"utf-8")),this.updateCacheStats()),w(s)}catch(s){let n=s,r;switch(n.code){case"ENOENT":r="File not found: "+t;break;case"EACCES":r="Permission denied: "+t;break;case"EISDIR":r="Path is a directory: "+t;break;default:r="Failed to read file: "+t}return L(new A(r,t,n.code,n))}}async readJSON(e){let t=await this.readFile(e);if(!t.success)return t;try{let s=N(t.value);return w(s)}catch(s){let n=s,r=e;try{r=this.resolvePath(e)}catch{}return L(new z("Invalid JSON in file: "+r+" - "+n.message,r,n))}}async fileExists(e){let t;try{t=this.resolvePath(e)}catch(s){if(s instanceof T)return L(s);throw s}try{return await M.access(t,M.constants.F_OK),w(!0)}catch(s){let n=s;return n.code==="ENOENT"?w(!1):L(new A("Cannot check file existence: "+t,t,n.code,n))}}async listFiles(e,t){let s;try{s=t?this.resolvePath(t):this.basePath}catch(n){if(n instanceof T)return L(n);throw n}try{if(!(await M.stat(s)).isDirectory())return L(new A("Base path is not a directory: "+s,s,"ENOTDIR"));let r=Ie(e),o=[];return await ue(s,r,o,s),o.sort(),w(o)}catch(n){let r=n;return L(new A("Failed to list files in: "+s,s,r.code,r))}}invalidateCache(e){let t=this.resolvePath(e);this.cache.delete(t),this.updateCacheStats()}clearCache(){this.cache.clear(),this.updateCacheStats()}pruneCache(){let e=this.cache.prune();return this.updateCacheStats(),e}getStats(){return{...this.stats}}resetStats(){this.stats={cacheHits:0,cacheMisses:0,totalReads:0,cacheSize:this.cache.totalBytes,cacheEntries:this.cache.size}}updateCacheStats(){this.stats.cacheSize=this.cache.totalBytes,this.stats.cacheEntries=this.cache.size}};V();var v={MODEL:"all-MiniLM-L6-v2",DIMENSIONS:384,CONTEXT_WINDOW:8192,BATCH_SIZE:100,MAX_RETRIES:3,RETRY_DELAY_MS:1e3,TIMEOUT_MS:3e4,DEFAULT_OLLAMA_URL:"http://localhost:11434"};var K=class{baseUrl;maxRetries;retryDelayMs;timeoutMs;constructor(e=v.DEFAULT_OLLAMA_URL,t=v.MAX_RETRIES,s=v.RETRY_DELAY_MS,n=v.TIMEOUT_MS){this.baseUrl=e.replace(/\/$/,""),this.maxRetries=t,this.retryDelayMs=s,this.timeoutMs=n}async healthCheck(){try{let e=await this.fetchWithTimeout(`${this.baseUrl}/api/tags`,{method:"GET",headers:{"Content-Type":"application/json"}},5e3);if(!e.ok)return!1;let t=await e.json();return t.models?t.models.some(s=>s.name?.startsWith(v.MODEL)||s.model?.startsWith(v.MODEL)):!1}catch{return!1}}async generateEmbedding(e){let t={model:v.MODEL,prompt:e},s=null;for(let n=0;n<this.maxRetries;n++)try{let r=await this.fetchWithTimeout(`${this.baseUrl}/api/embeddings`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)},this.timeoutMs);if(!r.ok){let i=await r.text();throw new Error(`Ollama API error (${r.status}): ${i}`)}let o=await r.json();if(o.embedding.length!==v.DIMENSIONS)throw new Error(`Invalid embedding dimensions: expected ${v.DIMENSIONS}, got ${o.embedding.length}`);return o.embedding}catch(r){if(s=D(r),s.message.includes("Invalid embedding dimensions"))throw s;if(n<this.maxRetries-1){let o=this.retryDelayMs*Math.pow(2,n);await this.sleep(o)}}throw new Error(`Failed to generate embedding after ${this.maxRetries} attempts: ${s?.message}`)}async fetchWithTimeout(e,t,s){let n=new AbortController,r=setTimeout(()=>n.abort(),s);try{return await fetch(e,{...t,signal:n.signal})}finally{clearTimeout(r)}}sleep(e){return new Promise(t=>setTimeout(t,e))}async getServerInfo(){try{let e=await this.fetchWithTimeout(`${this.baseUrl}/api/tags`,{method:"GET",headers:{"Content-Type":"application/json"}},5e3);return e.ok?await e.json():null}catch{return null}}async ensureModelAvailable(){if(!await this.healthCheck())throw new Error(`Ollama model '${v.MODEL}' is not available. Please run: ollama pull ${v.MODEL}`)}};import{createHash as Pe}from"crypto";var U=class{cache;maxSize;hits;misses;constructor(e=1e4){this.cache=new Map,this.maxSize=e,this.hits=0,this.misses=0}hashContent(e,t){return Pe("sha256").update(`${t}:${e}`).digest("hex")}get(e,t){let s=this.hashContent(e,t),n=this.cache.get(s);return n?(this.hits++,this.cache.delete(s),this.cache.set(s,n),n.embedding):(this.misses++,null)}set(e,t,s){let n=this.hashContent(e,t);if(this.cache.size>=this.maxSize&&!this.cache.has(n)){let o=this.cache.keys().next().value;o&&this.cache.delete(o)}let r={embedding:s,timestamp:Date.now(),model:t};this.cache.set(n,r)}has(e,t){let s=this.hashContent(e,t);return this.cache.has(s)}getStats(){let e=this.hits+this.misses,t=e>0?this.hits/e:0;return{size:this.cache.size,hitRate:t,hits:this.hits,misses:this.misses}}clear(){this.cache.clear(),this.hits=0,this.misses=0}evictOlderThan(e){let s=Date.now()-e,n=0;for(let[r,o]of this.cache.entries())o.timestamp<s&&(this.cache.delete(r),n++);return n}getMemoryUsageEstimate(){return this.cache.size*3172}export(){return Array.from(this.cache.entries()).map(([e,t])=>({key:e,entry:t}))}import(e){this.cache.clear();for(let{key:t,entry:s}of e)this.cache.size<this.maxSize&&this.cache.set(t,s)}};V();var _=class{client;cache;batchSize;enableFallback;ollamaAvailable=null;constructor(e={}){this.client=new K(e.ollamaBaseUrl),this.cache=e.cache??new U(e.maxCacheSize),this.batchSize=e.batchSize??v.BATCH_SIZE,this.enableFallback=e.enableFallback??!0}async embed(e){let t=this.cache.get(e,v.MODEL);if(t)return t;let s;if(await this.isOllamaAvailable())s=await this.client.generateEmbedding(e);else if(this.enableFallback)s=this.generatePseudoEmbedding(e);else throw new Error(`Ollama is not available and fallback is disabled. Please run: ollama pull ${v.MODEL}`);return this.cache.set(e,v.MODEL,s),s}formatForEmbedding(e){let t=[];e.language&&t.push(e.language),e.type&&t.push(e.type),e.name&&t.push(e.name);let s=t.length>0?`${t.join(" ")}: `:"",n=v.CONTEXT_WINDOW*4,r=e.content.trim();if(s.length+r.length>n){let o=n-s.length-3;r=r.substring(0,o)+"..."}return s+r}async embedBatch(e){let t=[];for(let s of e){let n=await this.embed(s);t.push(n)}return t}async embedCodeChunks(e,t){let s=Date.now(),n=[],r=0,o=0,i=await this.isOllamaAvailable();if(i)await this.client.ensureModelAvailable();else if(!this.enableFallback)throw new Error(`Ollama is not available and fallback is disabled. Please run: ollama pull ${v.MODEL}`);for(let c=0;c<e.length;c+=this.batchSize){let l=e.slice(c,Math.min(c+this.batchSize,e.length)),d=await this.processBatch(l,i);n.push(...d);for(let u of d)u.cached?r++:o++;if(t){let u=c+l.length,m=e.length,f=(Date.now()-s)/u,y=(m-u)*f;t({current:u,total:m,percentage:u/m*100,estimatedTimeRemainingMs:y})}}let a=Date.now()-s;return{results:n,stats:{totalChunks:e.length,cachedHits:r,computedNew:o,totalTimeMs:a,avgTimePerChunk:a/e.length}}}async processBatch(e,t){let s=[],n=e.map(async o=>{let i=this.formatForEmbedding(o),a=Date.now(),c=this.cache.get(i,v.MODEL);if(c)return{chunkId:o.id,embedding:c,model:v.MODEL,cached:!0,computeTimeMs:Date.now()-a};try{let l;return t?l=await this.client.generateEmbedding(i):l=this.generatePseudoEmbedding(i),this.cache.set(i,v.MODEL,l),{chunkId:o.id,embedding:l,model:t?v.MODEL:"pseudo-embedding",cached:!1,computeTimeMs:Date.now()-a}}catch(l){throw new Error(`Failed to generate embedding for chunk ${o.id}: ${j(l)}`)}}),r=await Promise.all(n);return s.push(...r),s}async isOllamaAvailable(){return this.ollamaAvailable!==null?this.ollamaAvailable:(this.ollamaAvailable=await this.client.healthCheck(),this.ollamaAvailable)}resetOllamaCheck(){this.ollamaAvailable=null}generatePseudoEmbedding(e){let t=new Array(v.DIMENSIONS).fill(0),s=e.split(/\s+|[^\w]+/).filter(o=>o.length>0);for(let o=0;o<s.length;o++){let i=s[o];for(let a=0;a<i.length&&a<t.length;a++)t[(o+a)%t.length]+=i.charCodeAt(a)/1e3}let n=[[/class\s+\w+/,0],[/function\s+\w+/,1],[/async\s+|await\s+|Promise/,2],[/interface\s+\w+/,3],[/export\s+/,4],[/import\s+/,5],[/try\s*{/,6],[/\.(map|filter|reduce)\(/,7]];for(let[o,i]of n)o.test(e)&&(t[i]+=.5);let r=Math.sqrt(t.reduce((o,i)=>o+i*i,0))||1;return t.map(o=>o/r)}clearCache(){this.cache.clear()}getCacheStats(){return this.cache.getStats()}async healthCheck(){return await this.client.healthCheck()}async getServerInfo(){return await this.client.getServerInfo()}getDimensions(){return v.DIMENSIONS}getConfig(){return{model:v.MODEL,dimensions:v.DIMENSIONS,contextWindow:v.CONTEXT_WINDOW,batchSize:this.batchSize,maxRetries:v.MAX_RETRIES,enableFallback:this.enableFallback}}};V();le();var we={maxNodes:1e5,maxEdgesPerNode:500,namespace:"code-intelligence:kg",enableVectorEmbeddings:!0,embeddingDimension:384,enableLLMExtraction:!0,llmModelTier:2,llmMaxTokens:2048},me=oe.create("code-intelligence/knowledge-graph"),he=class{config;memory;nodeCache=new Map;edgeIndex=new Map;tsParser;fileReader;embedder;llmRouter;constructor(e,t={}){this.config={...we,...t},this.isKnowledgeGraphDependencies(e)?(this.memory=e.memory,this.llmRouter=e.llmRouter):(this.memory=e,this.llmRouter=void 0),this.tsParser=new F,this.fileReader=new k,this.embedder=new _({enableFallback:!0})}isKnowledgeGraphDependencies(e){return e.memory!==void 0}async index(e){let t=Date.now(),s=[],n=0,r=0;try{let{paths:o,incremental:i=!1,includeTests:a=!0,languages:c}=e;i||await this.clear();for(let d of o)try{if(c&&c.length>0){let m=this.getFileExtension(d);if(!this.matchesLanguage(m,c))continue}if(!a&&this.isTestFile(d))continue;let u=await this.indexFile(d);n+=u.nodes,r+=u.edges}catch(u){s.push({file:d,error:j(u)})}let l=Date.now()-t;return await this.storeIndexMetadata({filesIndexed:o.length-s.length,nodesCreated:n,edgesCreated:r,duration:l,indexedAt:new Date().toISOString()}),w({filesIndexed:o.length-s.length,nodesCreated:n,edgesCreated:r,duration:l,errors:s})}catch(o){return L(D(o))}}async query(e){try{let{query:t,type:s,limit:n=100}=e;return s==="cypher"?this.executeCypherQuery(t,n):this.executeNaturalLanguageQuery(t,n)}catch(t){return L(D(t))}}async mapDependencies(e){try{let{files:t,direction:s,depth:n=3}=e,r=[],o=[],i=new Set,a=[];for(let l of t)await this.traverseDependencies(l,s,n,i,r,o,[],a);let c=this.calculateDependencyMetrics(r,o);return w({nodes:r,edges:o,cycles:a,metrics:c})}catch(t){return L(D(t))}}async getNode(e){if(this.nodeCache.has(e))return this.nodeCache.get(e);let t=`${this.config.namespace}:node:${e}`,s=await this.memory.get(t);return s&&this.nodeCache.set(e,s),s}async getEdges(e,t){let s=[],n=this.edgeIndex.get(e);if(n)return this.filterEdgesByDirection(n,e,t);let r=`${this.config.namespace}:edge:*`,o=await this.memory.search(r,this.config.maxEdgesPerNode*2);for(let i of o){let a=await this.memory.get(i);a&&(t!=="outgoing"&&a.target===e||t!=="incoming"&&a.source===e)&&s.push(a)}return s}async clear(){this.nodeCache.clear(),this.edgeIndex.clear()}isLLMExtractionAvailable(){return this.config.enableLLMExtraction===!0&&this.llmRouter!==void 0}getModelForTier(e){switch(e){case 1:return"claude-3-5-haiku-20241022";case 2:return"claude-sonnet-4-20250514";case 3:return"claude-sonnet-4-20250514";case 4:return"claude-opus-4-5-20251101";default:return"claude-sonnet-4-20250514"}}async extractRelationshipsWithLLM(e,t){if(!this.llmRouter)return{semanticRelationships:[],designPatterns:[],architecturalBoundaries:[],dependencyImpacts:[]};try{let s=this.buildRelationshipExtractionPrompt(e,t),n=this.getModelForTier(this.config.llmModelTier??2),r=await this.llmRouter.chat({messages:[{role:"system",content:`You are an expert software architect analyzing code structure. Extract:
|
|
24
24
|
1. Semantic relationships between code entities (inheritance, composition, dependency, collaboration)
|
|
25
25
|
2. Design patterns used (Factory, Singleton, Observer, Strategy, etc.)
|
|
26
26
|
3. Architectural boundaries (layers, modules, domains)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{d as m}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.5");process.exit(0)}
|
|
2
|
+
import{d as m}from"./chunk-TSA5MUTQ.js";import{d as T}from"./chunk-UPFCV7MX.js";T();function p(t,r,o){let e=0,n=t.length;for(;e<n;){let i=e+n>>>1;o(t[i],r)<=0?e=i+1:n=i}return e}function a(t,r,o){let e=p(t,r,o);return t.splice(e,0,r),e}function s(){return(t,r)=>t.createdAt.getTime()-r.createdAt.getTime()}m();export{a,s as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.5");process.exit(0)}
|
|
2
2
|
var l=class{approxMinCut(e){let t=Date.now();if(e.isEmpty())return this.emptyResult(t,"weighted-degree");let r=e.getVertexIds(),n=1/0,i=null;for(let o of r){let c=e.weightedDegree(o);c<n&&(n=c,i=o)}if(i===null||r.length===1)return this.emptyResult(t,"weighted-degree");let a=e.getEdgesForVertex(i);return{value:n,sourceSide:[i],targetSide:r.filter(o=>o!==i),cutEdges:a,calculatedAt:new Date,algorithm:"weighted-degree",durationMs:Date.now()-t}}findWeakVertices(e,t){if(e.isEmpty())return[];let r=e.getVertices(),n=[],i=new Map,a=0;for(let g of r){let h=e.weightedDegree(g.id);i.set(g.id,h),a+=h}let o=a/r.length,c=0;for(let g of i.values())c+=(g-o)**2;let s=Math.sqrt(c/r.length),d=1/0;for(let g of i.values())g<d&&(d=g);let u=t??o-s;for(let g of r){let h=i.get(g.id);if(h<=u){let w=this.calculateRiskScore(h,o,s,d),y=this.determineWeakReason(g,h,o,e),v=this.generateStrengtheningActions(g,e,h);n.push({vertexId:g.id,vertex:g,weightedDegree:h,riskScore:w,reason:y,suggestions:v})}}return n.sort((g,h)=>h.riskScore-g.riskScore),n}getMinCutValue(e){if(e.isEmpty())return 0;let t=1/0;for(let r of e.getVertexIds()){let n=e.weightedDegree(r);n<t&&(t=n)}return t===1/0?0:t}isConnectivityCritical(e,t){return this.getMinCutValue(e)<t}getMinDegreeVertex(e){if(e.isEmpty())return null;let t=1/0,r=null;for(let n of e.getVertexIds()){let i=e.weightedDegree(n);i<t&&(t=i,r=n)}return r?{vertexId:r,degree:t}:null}getLocalMinCut(e,t){return e.hasVertex(t)?e.weightedDegree(t):0}findPartitioningPoints(e){if(e.isEmpty()||e.vertexCount<2)return[];let t=this.findArticulationPoints(e),r=[];for(let n of e.getVertices()){let i=this.getLocalMinCut(e,n.id);r.push({vertexId:n.id,localMinCut:i,wouldDisconnect:t.has(n.id)&&e.vertexCount>2})}return r.sort((n,i)=>n.localMinCut-i.localMinCut),r}findArticulationPoints(e){let t=new Map,r=new Map,n=new Map,i=new Set,a=0,o=e.getVertexIds();for(let s of o)t.set(s,-1),r.set(s,-1),n.set(s,null);let c=s=>{let d=0;t.set(s,a),r.set(s,a),a++;for(let u of e.neighborIds(s))t.get(u)===-1?(d++,n.set(u,s),c(u),r.set(s,Math.min(r.get(s),r.get(u))),n.get(s)===null&&d>1&&i.add(s),n.get(s)!==null&&r.get(u)>=t.get(s)&&i.add(s)):u!==n.get(s)&&r.set(s,Math.min(r.get(s),t.get(u)))};for(let s of o)t.get(s)===-1&&c(s);return i}suggestEdgeAdditions(e,t){let r=this.findWeakVertices(e),n=[],i=0,a=e.getVertices().map(o=>({vertex:o,degree:e.weightedDegree(o.id)})).sort((o,c)=>c.degree-o.degree);for(let o of r){if(i>=t)break;let c=new Set(e.neighborIds(o.vertexId));for(let{vertex:s}of a){if(s.id===o.vertexId||c.has(s.id))continue;let d={source:o.vertexId,target:s.id,weight:1,type:"coordination",bidirectional:!0};n.push(d),i+=1;break}}return n}emptyResult(e,t){return{value:0,sourceSide:[],targetSide:[],cutEdges:[],calculatedAt:new Date,algorithm:t,durationMs:Date.now()-e}}calculateRiskScore(e,t,r,n){if(r===0)return .5;let i=(t-e)/r,a=1/(1+Math.exp(-i)),o=n>0?n/e:1;return Math.min(1,a*o)}determineWeakReason(e,t,r,n){return t===0?"Isolated vertex with no connections":n.degree(e.id)===1?"Single connection point (leaf node)":t<r*.5?`Low connectivity (${(t/r*100).toFixed(0)}% of average)`:"Below average connectivity threshold"}generateStrengtheningActions(e,t,r){let n=[],i=new Set(t.neighborIds(e.id)),a=t.getStats().averageDegree,o=Math.max(a,3),c=Math.ceil(o-r),s=t.getVertices().filter(d=>d.id!==e.id&&!i.has(d.id)).sort((d,u)=>t.weightedDegree(u.id)-t.weightedDegree(d.id)).slice(0,c);for(let d of s)n.push({type:"add_edge",targetVertex:d.id,priority:"high",estimatedImprovement:1});return e.type==="agent"&&e.domain&&r<1&&n.push({type:"spawn_agent",domain:e.domain,priority:"critical",estimatedImprovement:2}),i.size>0&&i.size<3&&n.push({type:"increase_weight",weightDelta:.5,priority:"medium",estimatedImprovement:.5*i.size}),n}};function p(){return new l}var f=class m{vertices=new Map;edges=new Map;adjacencyList=new Map;totalWeight=0;addVertex(e){if(this.vertices.has(e.id)){this.vertices.set(e.id,e);return}this.vertices.set(e.id,e),this.adjacencyList.set(e.id,[])}removeVertex(e){if(!this.vertices.has(e))return!1;let t=this.adjacencyList.get(e)||[];for(let r of t)this.removeEdge(e,r.neighborId);for(let[,r]of this.adjacencyList){let n=r.findIndex(i=>i.neighborId===e);n!==-1&&(this.totalWeight-=r[n].weight,r.splice(n,1))}return this.vertices.delete(e),this.adjacencyList.delete(e),!0}getVertex(e){return this.vertices.get(e)}hasVertex(e){return this.vertices.has(e)}getVertices(){return Array.from(this.vertices.values())}getVertexIds(){return Array.from(this.vertices.keys())}getVerticesByDomain(e){return this.getVertices().filter(t=>t.domain===e)}getVerticesByType(e){return this.getVertices().filter(t=>t.type===e)}addEdge(e){if(!this.vertices.has(e.source))throw new Error(`Source vertex ${e.source} does not exist`);if(!this.vertices.has(e.target))throw new Error(`Target vertex ${e.target} does not exist`);let t=this.edgeKey(e.source,e.target);if(this.edges.has(t)){let r=this.edges.get(t);this.totalWeight-=r.weight,this.removeFromAdjacency(e.source,e.target),r.bidirectional&&this.removeFromAdjacency(e.target,e.source)}this.edges.set(t,e),this.totalWeight+=e.weight,this.addToAdjacency(e.source,e.target,e.weight,e),e.bidirectional&&this.addToAdjacency(e.target,e.source,e.weight,e)}removeEdge(e,t){let r=this.edgeKey(e,t),n=this.edges.get(r);return n?(this.totalWeight-=n.weight,this.edges.delete(r),this.removeFromAdjacency(e,t),n.bidirectional&&this.removeFromAdjacency(t,e),!0):!1}getEdge(e,t){return this.edges.get(this.edgeKey(e,t))}hasEdge(e,t){return this.edges.has(this.edgeKey(e,t))}getEdges(){return Array.from(this.edges.values())}getEdgesForVertex(e){return(this.adjacencyList.get(e)||[]).map(r=>r.edge)}degree(e){return this.adjacencyList.get(e)?.length||0}weightedDegree(e){let t=this.adjacencyList.get(e);return t?t.reduce((r,n)=>r+n.weight,0):0}neighbors(e){return(this.adjacencyList.get(e)||[]).map(r=>({vertex:this.vertices.get(r.neighborId),weight:r.weight})).filter(r=>r.vertex!==void 0)}neighborIds(e){return(this.adjacencyList.get(e)||[]).map(r=>r.neighborId)}getStats(){let e=this.vertices.size,t=this.edges.size,r=0;for(let[,s]of this.adjacencyList)r+=s.length;let n=e>0?r/e:0,i=e>1?e*(e-1)/2:0,a=i>0?t/i:0,o=this.countConnectedComponents(),c=o===1&&e>0;return{vertexCount:e,edgeCount:t,totalWeight:this.totalWeight,averageDegree:n,density:a,isConnected:c,componentCount:o}}countConnectedComponents(){let e=new Set,t=0;for(let r of this.vertices.keys())e.has(r)||(this.dfs(r,e),t++);return t}dfs(e,t){t.add(e);let r=this.adjacencyList.get(e)||[];for(let n of r)t.has(n.neighborId)||this.dfs(n.neighborId,t)}isConnected(){if(this.vertices.size===0||this.vertices.size===1)return!0;let e=new Set,t=this.vertices.keys().next().value;return t===void 0?!0:(this.dfs(t,e),e.size===this.vertices.size)}getConnectedComponent(e){if(!this.vertices.has(e))return[];let t=new Set;return this.dfs(e,t),Array.from(t)}snapshot(){return{timestamp:new Date,vertices:this.getVertices(),edges:this.getEdges(),stats:this.getStats()}}clone(){let e=new m;for(let t of this.vertices.values())e.addVertex({...t});for(let t of this.edges.values())e.addEdge({...t});return e}static fromSnapshot(e){let t=new m;for(let r of e.vertices)t.addVertex(r);for(let r of e.edges)t.addEdge(r);return t}clear(){this.vertices.clear(),this.edges.clear(),this.adjacencyList.clear(),this.totalWeight=0}get vertexCount(){return this.vertices.size}get edgeCount(){return this.edges.size}isEmpty(){return this.vertices.size===0}edgeKey(e,t){return e<t?`${e}:${t}`:`${t}:${e}`}addToAdjacency(e,t,r,n){let i=this.adjacencyList.get(e);i&&(i.find(o=>o.neighborId===t)||i.push({neighborId:t,weight:r,edge:n}))}removeFromAdjacency(e,t){let r=this.adjacencyList.get(e);if(r){let n=r.findIndex(i=>i.neighborId===t);n!==-1&&r.splice(n,1)}}};function x(){return new f}export{l as a,p as b,f as c,x as d};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a as D}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.5");process.exit(0)}
|
|
2
|
+
import{a as D}from"./chunk-W73AYMDP.js";import{c as x,d as $}from"./chunk-QHMDETCU.js";import{a as j}from"./chunk-45WEXMKC.js";import"./chunk-DFOANC7Z.js";import"./chunk-GHFXURNS.js";import{Command as U}from"commander";import o from"chalk";import*as I from"fs";import*as p from"path";import*as F from"fs";import*as R from"path";var P={version:"1",name:"aqe-ci",phases:[{name:"Test Generation",type:"test",enabled:!0,config:{target:".",framework:"vitest",type:"unit"},continueOnFailure:!1,timeout:300},{name:"Coverage Analysis",type:"coverage",enabled:!0,config:{target:".",threshold:80},continueOnFailure:!0,timeout:300},{name:"Security Scan",type:"security",enabled:!0,config:{sast:!0},continueOnFailure:!0,timeout:300},{name:"Quality Gate",type:"quality-gate",enabled:!0,config:{},continueOnFailure:!1,timeout:60}],output:{format:"json",directory:".aqe-ci-output",combinedReport:!0},qualityGate:{enforced:!0,thresholds:{coverage:80,security:"medium",quality:70}}},Q=[".aqe-ci.yml",".aqe-ci.yaml","aqe-ci.yml","aqe-ci.yaml"];function G(s=process.cwd()){let n=R.resolve(s);for(let r=0;r<10;r++){for(let a of Q){let e=R.join(n,a);if(F.existsSync(e))return e}let l=R.dirname(n);if(l===n)break;n=l}return null}function T(s){if(!F.existsSync(s))return{success:!1,errors:[`Config file not found: ${s}`]};let n;try{n=F.readFileSync(s,"utf-8")}catch(r){return{success:!1,errors:[`Failed to read config: ${r}`]}}return N(n,s)}function N(s,n){let r=[],l;try{l=j(s)}catch(e){return{success:!1,errors:[`Invalid YAML: ${e}`]}}let a={version:l.version||P.version,name:l.name||P.name,phases:[],output:{...P.output},qualityGate:{...P.qualityGate,thresholds:{...P.qualityGate.thresholds}}};if(l.output&&typeof l.output=="object"){let e=l.output;e.format&&(a.output.format=e.format),e.directory&&(a.output.directory=e.directory),e.combined_report!==void 0&&(a.output.combinedReport=e.combined_report)}if(l.quality_gate&&typeof l.quality_gate=="object"){let e=l.quality_gate;if(e.enforced!==void 0&&(a.qualityGate.enforced=e.enforced),e.thresholds&&typeof e.thresholds=="object"){let t=e.thresholds;t.coverage!==void 0&&(a.qualityGate.thresholds.coverage=t.coverage),t.security!==void 0&&(a.qualityGate.thresholds.security=t.security),t.quality!==void 0&&(a.qualityGate.thresholds.quality=t.quality)}}if(l.phases&&Array.isArray(l.phases))for(let e=0;e<l.phases.length;e++){let t=l.phases[e];if(!t.name){r.push(`Phase ${e+1} must have a "name" field`);continue}if(!t.type){r.push(`Phase "${t.name}" must have a "type" field`);continue}let i=["test","coverage","security","quality-gate","code-intelligence","custom"];if(!i.includes(t.type)){r.push(`Phase "${t.name}" has invalid type "${t.type}". Valid: ${i.join(", ")}`);continue}let h={name:t.name,type:t.type,enabled:t.enabled!==!1,config:t.config||{},continueOnFailure:t.continue_on_failure||!1,timeout:t.timeout||300};a.phases.push(h)}else a.phases=[...P.phases];return a.phases.length===0&&r.push("Config must have at least one phase"),r.length>0?{success:!1,config:a,errors:r}:{success:!0,config:a,errors:[],configPath:n}}function E(){return{...P,phases:P.phases.map(s=>({...s,config:{...s.config}})),output:{...P.output},qualityGate:{...P.qualityGate,thresholds:{...P.qualityGate.thresholds}}}}async function W(s,n,r,l){let a=Date.now(),e=[];if(!s.enabled)return{phase:s.name,type:s.type,status:"skipped",duration:0,exitCode:0,summary:"Phase disabled",artifacts:[]};try{let t={},i="passed",h="";switch(s.type){case"test":{let f=await n.kernel.getDomainAPIAsync("test-generation");if(!f)return A(s,a,"failed",1,"Test generation domain not available",e);let C=s.config.target||".",{walkSourceFiles:m}=await import("./file-discovery-GKCJFWTD.js"),w=p.resolve(C),v=m(w,{includeTests:!1}),y=await f.generateTests({sourceFiles:v,testType:s.config.type||"unit",framework:s.config.framework||"vitest",coverageTarget:80});if(y.success&&y.value){let g=y.value;t={testsGenerated:g.tests.length,coverageEstimate:g.coverageEstimate},h=`Generated ${g.tests.length} tests (est. ${g.coverageEstimate}% coverage)`;let d=p.join(r,"test-generation.json");I.writeFileSync(d,$(g),"utf-8"),e.push(d)}else i="failed",h=y.error?.message||"Test generation failed";break}case"coverage":{let f=await n.kernel.getDomainAPIAsync("coverage-analysis");if(!f)return A(s,a,"failed",1,"Coverage analysis domain not available",e);let C=s.config.target||".",m=s.config.threshold||80,{walkSourceFiles:w}=await import("./file-discovery-GKCJFWTD.js"),v=p.resolve(C),y=w(v,{includeTests:!1}),g=D(y),d=await f.analyze({coverageData:g,threshold:m,includeFileDetails:!0});if(d.success&&d.value){let b=d.value;t={...b.summary,meetsThreshold:b.meetsThreshold,threshold:m},i=b.meetsThreshold?"passed":"warning",h=`Line: ${b.summary.line}%, Branch: ${b.summary.branch}% \u2014 ${b.meetsThreshold?"meets":"below"} ${m}% threshold`;let q=p.join(r,"coverage.json");I.writeFileSync(q,$(d.value),"utf-8"),e.push(q)}else i="failed",h=d.error?.message||"Coverage analysis failed";break}case"security":{let f=await n.kernel.getDomainAPIAsync("security-compliance");if(!f)return A(s,a,"failed",1,"Security domain not available",e);let C=s.config.target||".",{walkSourceFiles:m}=await import("./file-discovery-GKCJFWTD.js"),w=p.resolve(C),v=m(w,{includeTests:!0}),y=await f.runSASTScan(v);if(y.success&&y.value){let g=y.value,d=g.vulnerabilities||[],b=d.filter(S=>S.severity==="high"||S.severity==="critical").length;t={vulnerabilities:d.length,high:b},i=b>0?"failed":d.length>0?"warning":"passed",h=d.length===0?"No vulnerabilities found":`${d.length} vulnerabilities (${b} high/critical)`;let{toSARIF:q}=await import("./ci-output-2JR3J753.js"),c=p.join(r,"security.sarif");I.writeFileSync(c,q({vulnerabilities:d,target:C,scanType:"SAST"}),"utf-8"),e.push(c);let u=p.join(r,"security.json");I.writeFileSync(u,$(g),"utf-8"),e.push(u)}else i="failed",h=y.error?.message||"Security scan failed";break}case"quality-gate":{let f=await n.kernel.getDomainAPIAsync("quality-assessment");if(!f)return A(s,a,"failed",1,"Quality assessment domain not available",e);let C=await f.evaluate({runGate:!0,includeAdvice:!0});if(C.success&&C.value){let m=C.value,w=m.passed??m.meetsThreshold??!0;t={passed:w,score:m.score||m.grade,checks:m.checks},i=w?"passed":"failed",h=`Quality gate: ${w?"PASSED":"FAILED"} (score: ${m.score||m.grade||"N/A"})`;let v=p.join(r,"quality-gate.json");I.writeFileSync(v,$(m),"utf-8"),e.push(v)}else i="failed",h=C.error?.message||"Quality gate evaluation failed";break}case"code-intelligence":{let f=await n.kernel.getDomainAPIAsync("code-intelligence");if(!f)return A(s,a,"failed",1,"Code intelligence domain not available",e);let C=s.config.target||".",{walkSourceFiles:m}=await import("./file-discovery-GKCJFWTD.js"),w=p.resolve(C),v=m(w,{includeTests:!1}),y=await f.index({paths:v,incremental:!0});if(y.success&&y.value){let g=y.value;t=g,h=`Indexed ${g.filesIndexed} files, ${g.nodesCreated} nodes`;let d=p.join(r,"code-intelligence.json");I.writeFileSync(d,$(g),"utf-8"),e.push(d)}else i="warning",h=y.error?.message||"Code intelligence indexing incomplete";break}default:h=`Custom phase "${s.name}" \u2014 no built-in handler`,i="warning"}let k=Date.now()-a;return{phase:s.name,type:s.type,status:i,duration:k,exitCode:i==="failed"?1:0,summary:h,artifacts:e,details:t}}catch(t){let i=Date.now()-a;return{phase:s.name,type:s.type,status:"failed",duration:i,exitCode:1,summary:`Error: ${t instanceof Error?t.message:String(t)}`,artifacts:e}}}function A(s,n,r,l,a,e){return{phase:s.name,type:s.type,status:r,duration:Date.now()-n,exitCode:l,summary:a,artifacts:e}}function _(s){let n=`# AQE CI/CD Report
|
|
3
3
|
|
|
4
4
|
`;n+=`**Status:** ${s.overallStatus==="passed"?"PASSED":s.overallStatus==="warning"?"WARNING":"FAILED"}
|
|
5
5
|
`,n+=`**Duration:** ${(s.duration/1e3).toFixed(1)}s
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i,j}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.5");process.exit(0)}
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i,j}from"./chunk-QHMDETCU.js";import"./chunk-GHFXURNS.js";export{a as FORMAT_OPTION,b as OUTPUT_OPTION,g as coverageToMarkdown,h as qualityGateToMarkdown,i as securityToMarkdown,j as testRunToMarkdown,d as toJSON,f as toJUnit,e as toSARIF,c as writeOutput};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{b as p}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.5");process.exit(0)}
|
|
2
|
+
import{b as p}from"./chunk-53J3R7PZ.js";import{b as f,d as h}from"./chunk-CNGRXBKO.js";import{a as c,c as b}from"./chunk-MYIDAWGQ.js";import{a as v}from"./chunk-GHFXURNS.js";h();b();import{existsSync as u,writeFileSync as g,readFileSync as m}from"node:fs";import{join as a}from"node:path";import{execSync as C}from"node:child_process";async function y(t,e){let o=p(t);if(e&&o.available&&console.log(`[ClaudeFlow] Detected via ${o.method}${o.version?`: v${o.version}`:""}`),!o.available)return{available:!1};let n={"mcp-config":"mcp","local-binary":"cli","npx-cached":"cli","npm-dependency":"npm"};return{available:!0,version:o.version,method:o.method?n[o.method]:void 0}}async function F(t){return{trajectories:!0,modelRouting:!0,pretrain:!0,workers:!0,patternSearch:!0}}function S(t,e){return{version:"1.0",projectRoot:t,integration:{enabled:!0,features:{trajectories:e.trajectories,modelRouting:e.modelRouting,pretrain:e.pretrain,workers:e.workers}},learning:{trajectoryStorage:e.trajectories?"claude-flow":"local",patternSearch:e.patternSearch?"claude-flow":"local"},routing:{modelRouting:e.modelRouting?"claude-flow":"rule-based",preferences:{simple:"haiku",standard:"sonnet",complex:"opus"}},pretrain:{enabled:e.pretrain,depth:"medium",autoRun:!0},workers:{enabled:e.workers,autoDispatch:["optimize","consolidate"]}}}function R(t){let e=a(t,".claude","settings.json"),o={};if(u(e))try{o=f(m(e,"utf-8"))}catch{}o.mcpServers||(o.mcpServers={});let n=o.mcpServers;!n.ruflo&&!n["claude-flow"]&&(n.ruflo={command:"npx",args:["ruflo@3.5.18","mcp"],env:{}}),g(e,JSON.stringify(o,null,2))}async function j(t,e){try{e&&console.log("[ClaudeFlow] Running pretrain analysis..."),C("npx --no-install ruflo hooks pretrain --depth medium",{encoding:"utf-8",timeout:12e4,cwd:t,stdio:["pipe","pipe","pipe"]}),e&&console.log("[ClaudeFlow] Pretrain analysis complete")}catch(o){e&&console.log("[ClaudeFlow] Pretrain analysis skipped:",c(o))}}async function D(t){let{projectRoot:e,force:o,checkOnly:n,debug:s}=t,r=await y(e,s);if(!r.available&&!o)return{available:!1,features:{trajectories:!1,modelRouting:!1,pretrain:!1,workers:!1,patternSearch:!1}};let i=await F(e);if(n)return{available:r.available,version:r.version,features:i};let w=a(e,".agentic-qe"),d=a(w,"claude-flow-integration.json");try{let l=S(e,i);g(d,JSON.stringify(l,null,2)),s&&console.log(`[ClaudeFlow] Config written to: ${d}`)}catch(l){return{available:r.available,version:r.version,features:i,error:`Failed to write config: ${c(l)}`}}try{R(e)}catch(l){s&&console.log("[ClaudeFlow] MCP config update failed:",c(l))}return i.pretrain&&await j(e,s),{available:!0,version:r.version,features:i,configPath:d}}function J(t){let e=a(t,".agentic-qe","claude-flow-integration.json");return u(e)}function N(t){let e=a(t,".agentic-qe","claude-flow-integration.json");if(!u(e))return null;try{return f(m(e,"utf-8"))}catch{return null}}function I(t){let e=a(t,".agentic-qe","claude-flow-integration.json");if(u(e))try{return v("node:fs").rmSync(e),!0}catch{return!1}return!0}export{N as getClaudeFlowConfig,J as isClaudeFlowConfigured,I as removeClaudeFlowIntegration,D as setupClaudeFlowIntegration};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.5");process.exit(0)}
|
|
2
|
+
import{c as a,d as b,e as c}from"./chunk-BQUN2NB4.js";import"./chunk-ZFCRDCHW.js";import"./chunk-MYIDAWGQ.js";import"./chunk-GHFXURNS.js";c();export{a as VibiumClientImpl,b as VibiumClientProvider};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{b as p}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.5");process.exit(0)}
|
|
2
|
+
import{b as p}from"./chunk-IMGRYCAT.js";import{a as f,c as v}from"./chunk-MYIDAWGQ.js";import"./chunk-GHFXURNS.js";v();import{existsSync as s,mkdirSync as m,readFileSync as u,writeFileSync as a}from"fs";import{join as h,dirname as d}from"path";var l=class{projectRoot;overwrite;generator;constructor(r){this.projectRoot=r.projectRoot,this.overwrite=r.overwrite??!1,this.generator=p()}async install(){let r={success:!0,mcpConfigured:!1,modeInstalled:!1,errors:[],configPath:"",modePath:""};try{let t=this.generator.generateMcpConfig("cline"),e=h(this.projectRoot,t.path);if(r.configPath=e,!s(e)||this.overwrite){let o=d(e);if(s(o)||m(o,{recursive:!0}),s(e)&&this.overwrite){let c=this.mergeExistingConfig(e,t.content);a(e,c)}else a(e,t.content);r.mcpConfigured=!0}let n=this.generator.generateBehavioralRules("cline"),i=h(this.projectRoot,n.path);if(r.modePath=i,!s(i)||this.overwrite){let o=d(i);if(s(o)||m(o,{recursive:!0}),s(i)&&this.overwrite){let c=this.mergeExistingModes(i,n.content);a(i,c)}else a(i,n.content);r.modeInstalled=!0}}catch(t){r.success=!1,r.errors.push(`Cline installation failed: ${f(t)}`)}return r}mergeExistingConfig(r,t){try{let e=JSON.parse(u(r,"utf-8")),n=JSON.parse(t);return e.mcpServers||(e.mcpServers={}),Object.assign(e.mcpServers,n.mcpServers),JSON.stringify(e,null,2)+`
|
|
3
3
|
`}catch{return t}}mergeExistingModes(r,t){try{let e=JSON.parse(u(r,"utf-8")),n=JSON.parse(t);if(!Array.isArray(e))return t;let i=e.filter(o=>o.slug!=="qe-engineer");return i.push(...n),JSON.stringify(i,null,2)+`
|
|
4
4
|
`}catch{return t}}};function x(g){return new l(g)}export{l as ClineInstaller,x as createClineInstaller};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a as A,b as $}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.5");process.exit(0)}
|
|
2
|
+
import{a as A,b as $}from"./chunk-MO3IIM7L.js";import{c as b,d as x}from"./chunk-QHMDETCU.js";import"./chunk-GHFXURNS.js";import{Command as z}from"commander";import e from"chalk";function j(S,w,P){return new z("code").description("Code intelligence analysis").argument("<action>","Action (index|search|impact|deps|complexity)").argument("[target]","Target path or query").option("--depth <depth>","Analysis depth","3").option("--include-tests","Include test files").option("--incremental","Incremental indexing (index action only)").option("--git-since <ref>","Index changes since git ref (index action only)").option("-F, --format <format>","Output format (text|json)","text").option("-o, --output <path>","Write output to file").addHelpText("after",`
|
|
3
3
|
Examples:
|
|
4
4
|
aqe code index src/ Index source files into knowledge graph
|
|
5
5
|
aqe code index src/ --incremental Incremental index (only changed files)
|
package/dist/cli/chunks/{code-index-extractor-II6IRWU6.js → code-index-extractor-W2NO6MR3.js}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.5");process.exit(0)}
|
|
2
|
+
import"./chunk-GHFXURNS.js";import{readFile as m}from"fs/promises";var d=new Set(["if","for","while","switch","catch","return","new","throw","import","export","constructor"]),h=50;function x(o,c){let n=c.split(`
|
|
3
3
|
`),e=[],i=[];for(let t=0;t<n.length;t++){let s=n[t],a=s.match(/(?:export\s+)?(?:default\s+)?(?:async\s+)?function\s+(\w+)/);if(a){e.push({type:"function",name:a[1],lineStart:t+1});continue}let l=s.match(/(?:export\s+)?(?:const|let|var)\s+(\w+)\s*=\s*(?:async\s+)?(?:\([^)]*\)|[a-zA-Z_]\w*)\s*(?::\s*[^=]+)?\s*=>/);if(l){e.push({type:"function",name:l[1],lineStart:t+1});continue}let u=s.match(/(?:export\s+)?(?:default\s+)?(?:abstract\s+)?class\s+(\w+)/);if(u){e.push({type:"class",name:u[1],lineStart:t+1});continue}let f=s.match(/(?:export\s+)?interface\s+(\w+)/);if(f){e.push({type:"interface",name:f[1],lineStart:t+1});continue}let r=s.match(/^\s+(?:(?:public|private|protected|static|readonly|override|abstract|async)\s+)*(\w+)\s*(?:<[^>]*>)?\s*\([^)]*\)\s*(?::\s*[^{]+)?\s*\{?\s*$/);if(r&&!d.has(r[1])){e.push({type:"function",name:r[1],lineStart:t+1});continue}let p=s.match(/(?:import|from)\s+['"](\.[^'"]+)['"]/);p&&i.push(p[1])}return{path:o,entities:e,imports:i}}async function y(o){let c=[];for(let n=0;n<o.length;n+=h){let e=o.slice(n,n+h),i=await Promise.allSettled(e.map(async t=>{let s=await m(t,"utf-8");return x(t,s)}));for(let t of i)t.status==="fulfilled"&&c.push(t.value)}return{files:c}}export{y as extractCodeIndex};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{b as f}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.5");process.exit(0)}
|
|
2
|
+
import{b as f}from"./chunk-IMGRYCAT.js";import{a as l,c as m}from"./chunk-MYIDAWGQ.js";import"./chunk-GHFXURNS.js";m();import{existsSync as o,mkdirSync as h,readFileSync as d,writeFileSync as s}from"fs";import{join as u,dirname as x}from"path";var c=class{projectRoot;overwrite;generator;constructor(t){this.projectRoot=t.projectRoot,this.overwrite=t.overwrite??!1,this.generator=f()}async install(){let t={success:!0,mcpConfigured:!1,agentsMdInstalled:!1,errors:[],configPath:"",agentsMdPath:""};try{let r=this.generator.generateMcpConfig("codex"),e=u(this.projectRoot,r.path);if(t.configPath=e,!o(e)||this.overwrite){let i=x(e);if(o(i)||h(i,{recursive:!0}),o(e)&&this.overwrite){let p=this.mergeExistingTomlConfig(e,r.content);s(e,p)}else s(e,r.content);t.mcpConfigured=!0}let a=this.generator.generateBehavioralRules("codex"),n=u(this.projectRoot,a.path);if(t.agentsMdPath=n,!o(n)||this.overwrite){if(o(n)&&this.overwrite){let i=this.mergeExistingAgentsMd(n,a.content);s(n,i)}else s(n,a.content);t.agentsMdInstalled=!0}}catch(r){t.success=!1,t.errors.push(`Codex installation failed: ${l(r)}`)}return t}mergeExistingTomlConfig(t,r){try{let e=d(t,"utf-8");return e.includes("[mcp_servers.agentic-qe]")?e:e.trimEnd()+`
|
|
3
3
|
|
|
4
4
|
`+r}catch{return r}}mergeExistingAgentsMd(t,r){try{let e=d(t,"utf-8");return e.includes("Agentic QE")||e.includes("fleet_init")?e:e.trimEnd()+`
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.5");process.exit(0)}
|
|
2
|
+
import"./chunk-GHFXURNS.js";import{Command as N}from"commander";import o from"chalk";var c=["test-generation","test-execution","coverage-analysis","quality-assessment","defect-intelligence","requirements-validation","code-intelligence","security-compliance","contract-testing","visual-accessibility","chaos-resilience","learning-optimization"],a=["qe-tdd-specialist","qe-test-architect","qe-parallel-executor","qe-flaky-hunter","qe-retry-handler","qe-coverage-specialist","qe-gap-detector","qe-quality-gate","qe-deployment-advisor","qe-code-complexity","qe-qx-partner","qe-security-scanner","qe-security-auditor","qe-contract-validator","qe-integration-tester","qe-graphql-tester","qe-visual-tester","qe-accessibility-auditor","qe-responsive-tester","qe-performance-tester","qe-load-tester","qe-chaos-engineer","qe-code-intelligence","qe-dependency-mapper","qe-kg-builder","qe-requirements-validator","qe-bdd-generator","qe-defect-predictor","qe-root-cause-analyzer","qe-regression-analyzer","qe-impact-analyzer","qe-risk-assessor","qe-learning-coordinator","qe-pattern-learner","qe-transfer-specialist","qe-metrics-optimizer","qe-fleet-commander","qe-queen-coordinator","qe-property-tester","qe-mutation-tester","qe-tdd-red","qe-tdd-green","qe-tdd-refactor","qe-code-reviewer","qe-integration-reviewer","qe-performance-reviewer","qe-security-reviewer"],i=["tester","reviewer","security-auditor","security-architect","performance-engineer","code-analyzer","cicd-engineer","reasoningbank-learner","adr-architect","ddd-domain-expert","v3-integration-architect","memory-specialist","claims-authorizer","sparc-orchestrator","sona-learning-optimizer","safla-neural","production-validator","tdd-london-swarm","queen-coordinator","swarm-memory-manager","worker-specialist","collective-intelligence-coordinator","scout-explorer","adaptive-coordinator","mesh-coordinator","hierarchical-coordinator","consensus-coordinator","byzantine-coordinator","raft-manager","crdt-synchronizer","n8n-workflow-executor","n8n-unit-tester","n8n-integration-test","n8n-trigger-test","n8n-security-auditor"],S=[...a,...i];var p=["generate-tests","execute-tests","analyze-coverage","assess-quality","predict-defects","validate-requirements","analyze-code","scan-security","validate-contracts","test-accessibility","chaos-test","optimize-learning"],b=["p0","p1","p2","p3"],y=["pending","running","completed","failed","cancelled"],d=["jest","vitest","pytest","junit","playwright","cypress","go-test","node-test"],w=["unit","integration","e2e"],C=["sqlite","agentdb","hybrid"];function q(){return`#!/bin/bash
|
|
3
3
|
# AQE CLI Bash Completion Script
|
|
4
4
|
# Generated by aqe completions bash
|
|
5
5
|
# ADR-041: Shell Completions for Enhanced Developer Experience
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.5");process.exit(0)}
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i}from"./chunk-ITIYGUIL.js";import"./chunk-PTAUZ3XL.js";import"./chunk-JUBICWL2.js";import"./chunk-GHFXURNS.js";export{g as ComplexityAnalyzer,c as ScoreCalculator,a as SignalCollector,e as TierRecommender,h as createComplexityAnalyzer,i as createComplexityAnalyzerWithDependencies,d as createScoreCalculator,b as createSignalCollector,f as createTierRecommender};
|
package/dist/cli/chunks/{continuedev-installer-HQAEAQZU.js → continuedev-installer-OULSFVLB.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{b as g}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.5");process.exit(0)}
|
|
2
|
+
import{b as g}from"./chunk-IMGRYCAT.js";import{a as u,c as h}from"./chunk-MYIDAWGQ.js";import"./chunk-GHFXURNS.js";h();import{existsSync as o,mkdirSync as f,readFileSync as d,writeFileSync as a}from"fs";import{join as m,dirname as p}from"path";var c=class{projectRoot;overwrite;generator;constructor(t){this.projectRoot=t.projectRoot,this.overwrite=t.overwrite??!1,this.generator=g()}async install(){let t={success:!0,mcpConfigured:!1,rulesInstalled:!1,errors:[],configPath:"",rulesPath:""};try{let r=this.generator.generateMcpConfig("continuedev"),e=m(this.projectRoot,r.path);if(t.configPath=e,!o(e)||this.overwrite){let n=p(e);if(o(n)||f(n,{recursive:!0}),o(e)&&this.overwrite){let v=this.mergeExistingYamlConfig(e,r.content);a(e,v)}else a(e,r.content);t.mcpConfigured=!0}let s=this.generator.generateBehavioralRules("continuedev"),i=m(this.projectRoot,s.path);if(t.rulesPath=i,!o(i)||this.overwrite){let n=p(i);o(n)||f(n,{recursive:!0}),a(i,s.content),t.rulesInstalled=!0}}catch(r){t.success=!1,t.errors.push(`Continue.dev installation failed: ${u(r)}`)}return t}mergeExistingYamlConfig(t,r){try{let e=d(t,"utf-8");return e.includes("agentic-qe")?e:e.includes("mcpServers:")?e.trimEnd()+`
|
|
3
3
|
`+` - name: agentic-qe
|
|
4
4
|
command: npx
|
|
5
5
|
args:
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{b as g}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.5");process.exit(0)}
|
|
2
|
+
import{b as g}from"./chunk-IMGRYCAT.js";import{a as p,c as v}from"./chunk-MYIDAWGQ.js";import"./chunk-GHFXURNS.js";v();import{existsSync as s,mkdirSync as f,readFileSync as C,writeFileSync as l}from"fs";import{join as u,dirname as h}from"path";var a=class{projectRoot;overwrite;generator;constructor(t){this.projectRoot=t.projectRoot,this.overwrite=t.overwrite??!1,this.generator=g()}async install(){let t={success:!0,mcpConfigured:!1,rulesInstalled:!1,errors:[],configPath:"",rulesPath:""};try{let r=this.generator.generateMcpConfig("copilot"),e=u(this.projectRoot,r.path);if(t.configPath=e,!s(e)||this.overwrite){let o=h(e);if(s(o)||f(o,{recursive:!0}),s(e)&&this.overwrite){let m=this.mergeExistingConfig(e,r.content);l(e,m)}else l(e,r.content);t.mcpConfigured=!0}let i=this.generator.generateBehavioralRules("copilot"),n=u(this.projectRoot,i.path);if(t.rulesPath=n,!s(n)||this.overwrite){let o=h(n);s(o)||f(o,{recursive:!0}),l(n,i.content),t.rulesInstalled=!0}}catch(r){t.success=!1,t.errors.push(`Copilot installation failed: ${p(r)}`)}return t}mergeExistingConfig(t,r){try{let e=JSON.parse(C(t,"utf-8")),i=JSON.parse(r);return e.servers||(e.servers={}),Object.assign(e.servers,i.servers),JSON.stringify(e,null,2)+`
|
|
3
3
|
`}catch{return r}}};function y(c){return new a(c)}export{a as CopilotInstaller,y as createCopilotInstaller};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a,b,c,d}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.5");process.exit(0)}
|
|
2
|
+
import{a,b,c,d}from"./chunk-673PL3DG.js";import"./chunk-GHFXURNS.js";export{b as CostTracker,a as MODEL_PRICING,c as getGlobalCostTracker,d as resetGlobalCostTracker};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a as V}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.5");process.exit(0)}
|
|
2
|
+
import{a as V}from"./chunk-W73AYMDP.js";import{a as u,b as j,c as F,d as x,e as N,f as O,g as L,h as D,i as B,j as M}from"./chunk-LLXBL36X.js";import{b as I}from"./chunk-MO3IIM7L.js";import{c as P,d as W,g as G}from"./chunk-QHMDETCU.js";import"./chunk-GHFXURNS.js";import{Command as q}from"commander";import e from"chalk";var R={low:{minRisk:.7,maxGaps:10,description:"Only critical gaps with high risk scores"},medium:{minRisk:.5,maxGaps:20,description:"Moderate gaps including medium risk items"},high:{minRisk:.3,maxGaps:50,description:"All gaps including low risk items"}},$=class extends M{constructor(t={}){super(t)}getTitle(){return"Coverage Analysis Wizard"}getSubtitle(){return"Analyze code coverage with O(log n) gap detection"}getConfirmationPrompt(){return"Proceed with coverage analysis?"}isNonInteractive(){return this.options.nonInteractive??!1}getCommands(){return[new D({id:"target",stepNumber:"1/7",title:"Target Directory",description:"Enter the directory or file to analyze for coverage",examples:"src/, ./lib, coverage/lcov.info",defaultValue:this.options.defaultTarget||".",suggestionsProvider:j.getCoverageTargets,validatePath:!0}),new x({id:"sensitivity",stepNumber:"2/7",title:"Gap Detection Sensitivity",description:"Select how sensitive the gap detection should be",options:[{key:"1",value:"low",label:"low",description:R.low.description},{key:"2",value:"medium",label:"medium",description:R.medium.description},{key:"3",value:"high",label:"high",description:R.high.description}],defaultValue:this.options.defaultSensitivity||"medium",validValues:["low","medium","high"]}),new x({id:"format",stepNumber:"3/7",title:"Report Format",description:"Select the output format for the coverage report",options:[{key:"1",value:"json",label:"json",description:"JSON - Machine-readable, good for CI/CD pipelines"},{key:"2",value:"html",label:"html",description:"HTML - Interactive, visual report with charts"},{key:"3",value:"markdown",label:"markdown",description:"Markdown - Documentation-friendly format"},{key:"4",value:"text",label:"text",description:"Text - Simple console output"}],defaultValue:this.options.defaultFormat||"json",validValues:["json","html","markdown","text"]}),new N({id:"priorityFocus",stepNumber:"4/7",title:"Priority Focus Areas",description:"Select coverage metrics to prioritize (comma-separated or numbers)",instructions:"Example: 1,2 or functions,branches",options:[{key:"1",value:"functions",label:"functions",description:"Functions - Focus on function coverage"},{key:"2",value:"branches",label:"branches",description:"Branches - Focus on branch/decision coverage"},{key:"3",value:"lines",label:"lines",description:"Lines - Focus on line coverage"},{key:"4",value:"statements",label:"statements",description:"Statements - Focus on statement coverage"}],defaultValue:this.options.defaultPriorityFocus||["functions","branches"],validValues:["functions","branches","lines","statements"]}),new O({id:"riskScoring",stepNumber:"5/7",title:"Enable risk scoring",description:"Enable risk scoring to prioritize coverage gaps by potential impact",additionalInfo:"Risk scores consider code complexity, change frequency, and criticality",defaultValue:this.options.defaultRiskScoring??!0}),new L({id:"threshold",stepNumber:"6/7",title:"Coverage threshold %",description:"Set the minimum coverage percentage required. Files below this threshold will be flagged.",presets:[{key:"1",value:60,label:"60% - Legacy/maintenance projects"},{key:"2",value:70,label:"70% - Standard projects"},{key:"3",value:80,label:"80% - Quality-focused projects"},{key:"4",value:90,label:"90% - Critical/high-reliability projects"}],defaultValue:this.options.defaultThreshold||80,min:0,max:100}),new B({id:"patterns",stepNumber:"7/7",title:"File Patterns (Optional)",description:"Specify patterns to include or exclude from analysis. Leave blank to analyze all files."})]}buildResult(t){let h=t.patterns;return{target:t.target,sensitivity:t.sensitivity,format:t.format,priorityFocus:t.priorityFocus,riskScoring:t.riskScoring,threshold:t.threshold,includePatterns:h?.include,excludePatterns:h?.exclude,cancelled:!1}}printSummary(t){u.printSummaryHeader();let h=F.relativePath(t.target,this.cwd);u.printSummaryField("Target",h),u.printSummaryField("Sensitivity",t.sensitivity),u.printSummaryField("Report Format",t.format),u.printSummaryField("Priority Focus",t.priorityFocus.join(", ")),u.printSummaryField("Risk Scoring",F.enabledDisabled(t.riskScoring)),u.printSummaryField("Threshold",F.percentage(t.threshold)),t.includePatterns&&t.includePatterns.length>0&&u.printSummaryField("Include",t.includePatterns.join(", ")),t.excludePatterns&&t.excludePatterns.length>0&&u.printSummaryField("Exclude",t.excludePatterns.join(", "));let b=R[t.sensitivity];u.printDerivedSettings({"Min risk score":String(b.minRisk),"Max gaps shown":String(b.maxGaps)})}getDefaults(){return{target:this.options.defaultTarget||this.cwd,sensitivity:this.options.defaultSensitivity||"medium",format:this.options.defaultFormat||"json",priorityFocus:this.options.defaultPriorityFocus||["functions","branches"],riskScoring:this.options.defaultRiskScoring??!0,threshold:this.options.defaultThreshold||80,cancelled:!1}}getCancelled(){return{target:".",sensitivity:"medium",format:"json",priorityFocus:["functions","branches"],riskScoring:!0,threshold:80,cancelled:!0}}};async function E(p={}){return new $(p).run()}function z(p){return p>=80?e.green:p>=50?e.yellow:e.red}function te(p,t,h){let b=new q("coverage").description("Coverage analysis shortcut").argument("[target]","Target file or directory",".").option("--risk","Include risk scoring").option("--gaps","Detect coverage gaps").option("--threshold <percent>","Coverage threshold percentage","80").option("--sensitivity <level>","Gap detection sensitivity (low|medium|high)","medium").option("--wizard","Run interactive coverage analysis wizard").option("--ghost","Include ghost intent coverage analysis (detect untested behavioral intents)").option("-F, --format <format>","Output format (text|json|markdown)","text").option("-o, --output <path>","Write output to file").action(async(y,i)=>{let g=y,w=i.risk,k=i.gaps,d=parseInt(i.threshold,10);if(i.wizard)try{let s=await E({defaultTarget:y!=="."?y:void 0,defaultThreshold:i.threshold!=="80"?parseInt(i.threshold,10):void 0,defaultRiskScoring:i.risk,defaultSensitivity:i.sensitivity!=="medium"?i.sensitivity:void 0});s.cancelled&&(console.log(e.yellow(`
|
|
3
3
|
Coverage analysis cancelled.
|
|
4
4
|
`)),await t(0)),g=s.target,w=s.riskScoring,k=!0,d=s.threshold,console.log(e.green(`
|
|
5
5
|
Starting coverage analysis...
|
|
@@ -19,7 +19,7 @@ import{a as V}from"./chunk-DZHGYZJP.js";import{a as u,b as j,c as F,d as x,e as
|
|
|
19
19
|
Risk Analysis:`));let o=[...c.files].sort((n,r)=>n.lines.covered/n.lines.total-r.lines.covered/r.lines.total).slice(0,5);for(let n of o){let r=await s.calculateRisk({file:n.path,uncoveredLines:n.uncoveredLines});if(r.success&&r.value){let l=r.value,C=l.riskLevel==="high"?e.red:l.riskLevel==="medium"?e.yellow:e.green,A=n.path.replace(process.cwd()+"/","");console.log(` ${C(`[${l.riskLevel}]`)} ${e.white(A)}`),console.log(e.gray(` Risk: ${(l.overallRisk*100).toFixed(0)}%, Coverage: ${Math.round(n.lines.covered/n.lines.total*100)}%`))}}}if(a&&f==="json"?P(W(a),i.output):a&&f==="markdown"?P(G(a),i.output):f==="text"&&console.log(e.green(`
|
|
20
20
|
Coverage analysis complete
|
|
21
21
|
`)),a&&!a.meetsThreshold&&await t(1),a){let o=(a.summary.line+a.summary.branch+a.summary.function+a.summary.statement)/4;o<d+5&&o>=d&&await t(2)}await t(0)}catch(s){console.error(e.red(`
|
|
22
|
-
Failed:`),s),await t(1)}});return b.command("gaps").description("Enumerate unhandled branches in source files").argument("<file>","Source file to analyze").option("--mechanical","Exhaustive mode: report all branches without filtering").option("--json","Output as JSON").option("--markdown","Output as markdown report").action(async(y,i)=>{try{let{readFileSync:g,existsSync:w}=await import("fs"),k=await import("path"),{enumerateBranches:d,formatBranchReport:s,formatBranchJSON:T}=await import("./branch-enumerator-
|
|
22
|
+
Failed:`),s),await t(1)}});return b.command("gaps").description("Enumerate unhandled branches in source files").argument("<file>","Source file to analyze").option("--mechanical","Exhaustive mode: report all branches without filtering").option("--json","Output as JSON").option("--markdown","Output as markdown report").action(async(y,i)=>{try{let{readFileSync:g,existsSync:w}=await import("fs"),k=await import("path"),{enumerateBranches:d,formatBranchReport:s,formatBranchJSON:T}=await import("./branch-enumerator-3TQXIETD.js"),v=k.resolve(y);w(v)||(console.error(e.red(`
|
|
23
23
|
File not found: ${v}
|
|
24
24
|
`)),await t(1));let S=g(v,"utf-8"),c=d(S,v);if(i.json)console.log(T(c));else if(i.markdown)console.log(s(c));else{if(console.log(`
|
|
25
25
|
${e.cyan("Branch Enumeration:")} ${e.white(y)}`),console.log(e.gray(`Found ${c.unhandledCount} unhandled branches (${c.duration}ms)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.5");process.exit(0)}
|
|
2
|
+
import{a,b}from"./chunk-6QKGLIIY.js";import"./chunk-T4KMG3GJ.js";import"./chunk-DFOANC7Z.js";import"./chunk-TRO45ZLC.js";import"./chunk-GHFXURNS.js";export{a as CrossDomainEventRouter,b as createCrossDomainRouter};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{b as g}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.5");process.exit(0)}
|
|
2
|
+
import{b as g}from"./chunk-IMGRYCAT.js";import{a as u,c as m}from"./chunk-MYIDAWGQ.js";import"./chunk-GHFXURNS.js";m();import{existsSync as s,mkdirSync as h,readFileSync as v,writeFileSync as i}from"fs";import{join as f,dirname as C}from"path";var a=class{projectRoot;overwrite;generator;constructor(r){this.projectRoot=r.projectRoot,this.overwrite=r.overwrite??!1,this.generator=g()}async install(){let r={success:!0,mcpConfigured:!1,rulesInstalled:!1,errors:[],configPath:"",rulesPath:""};try{let t=this.generator.generateMcpConfig("cursor"),e=f(this.projectRoot,t.path);if(r.configPath=e,!s(e)||this.overwrite){let l=C(e);if(s(l)||h(l,{recursive:!0}),s(e)&&this.overwrite){let p=this.mergeExistingConfig(e,t.content);i(e,p)}else i(e,t.content);r.mcpConfigured=!0}let o=this.generator.generateBehavioralRules("cursor"),n=f(this.projectRoot,o.path);r.rulesPath=n,(!s(n)||this.overwrite)&&(i(n,o.content),r.rulesInstalled=!0)}catch(t){r.success=!1,r.errors.push(`Cursor installation failed: ${u(t)}`)}return r}mergeExistingConfig(r,t){try{let e=JSON.parse(v(r,"utf-8")),o=JSON.parse(t);return e.mcpServers||(e.mcpServers={}),Object.assign(e.mcpServers,o.mcpServers),JSON.stringify(e,null,2)+`
|
|
3
3
|
`}catch{return t}}};function R(c){return new a(c)}export{a as CursorInstaller,R as createCursorInstaller};
|