agentic-qe 3.10.2 → 3.10.4
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/.claude/skills/release/SKILL.md +10 -10
- package/.claude/skills/skills-manifest.json +1 -1
- package/CHANGELOG.md +88 -0
- package/assets/grammars/tree-sitter-c_sharp.wasm +0 -0
- package/assets/grammars/tree-sitter-java.wasm +0 -0
- package/assets/grammars/tree-sitter-javascript.wasm +0 -0
- package/assets/grammars/tree-sitter-python.wasm +0 -0
- package/assets/grammars/tree-sitter-rust.wasm +0 -0
- package/assets/grammars/tree-sitter-swift.wasm +0 -0
- package/assets/grammars/tree-sitter-tsx.wasm +0 -0
- package/assets/grammars/tree-sitter-typescript.wasm +0 -0
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/agents/claim-verifier/claim-verifier-service.js +4 -2
- package/dist/agents/claim-verifier/verifiers/test-verifier.js +31 -23
- package/dist/agents/devils-advocate/agent.js +1 -1
- package/dist/cli/bundle.js +5 -5
- package/dist/cli/chunks/adapter-A62ETL5C.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-DHSIPFTH.js → agent-booster-wasm-EJPDSWON.js} +2 -2
- package/dist/cli/chunks/{agent-handler-FPQVHGGT.js → agent-handler-2DZB7LGI.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-OLOF5ZHV.js → agent-memory-branch-SSFYAVIK.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-MTCRAV6N.js +2 -0
- package/dist/cli/chunks/audit-42XG5JFB.js +3 -0
- package/dist/cli/chunks/base-KKEBUHZC.js +2 -0
- package/dist/cli/chunks/{hnswlib-node-ZGSUMHDC.js → better-sqlite3-PX5JM3DG.js} +2 -2
- package/dist/cli/chunks/{brain-handler-ROZUHCOT.js → brain-handler-LFHX2TYP.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-VK7G4NKJ.js → branch-enumerator-AX7DKGV7.js} +2 -2
- package/dist/cli/chunks/{browser-Q2S75M2F.js → browser-4NYLZ7FA.js} +2 -2
- package/dist/cli/chunks/browser-workflow-XHYAJUB6.js +2 -0
- package/dist/cli/chunks/{chunk-XPCNUX2U.js → chunk-2B6ETC7C.js} +2 -2
- package/dist/cli/chunks/{chunk-YI6GNRQM.js → chunk-2G2PVVQG.js} +2 -2
- package/dist/cli/chunks/{chunk-2244IFZA.js → chunk-2L5VFVCG.js} +1 -1
- package/dist/cli/chunks/{chunk-EVCOCGVJ.js → chunk-2TYO4VZH.js} +4 -4
- package/dist/cli/chunks/{chunk-U3EUH6LX.js → chunk-3ISX5B77.js} +2 -2
- package/dist/cli/chunks/{chunk-WZJUMJ2S.js → chunk-3UGUX34A.js} +1 -1
- package/dist/cli/chunks/{chunk-6ZFHIKQG.js → chunk-4BX72XG4.js} +3 -3
- package/dist/cli/chunks/{chunk-UUFOHMUG.js → chunk-4FTLYIMW.js} +2 -2
- package/dist/cli/chunks/{chunk-XDU624HU.js → chunk-5FNNCVXR.js} +1 -1
- package/dist/cli/chunks/{chunk-7Z46RDDV.js → chunk-5Q3L4QEE.js} +3 -3
- package/dist/cli/chunks/{chunk-AH7FXNFE.js → chunk-5T2HDET6.js} +3 -3
- package/dist/cli/chunks/{chunk-24LUQICS.js → chunk-5T4J3IPG.js} +2 -2
- package/dist/cli/chunks/{chunk-HHCYSAH3.js → chunk-6OLHPWSN.js} +2 -2
- package/dist/cli/chunks/{chunk-5PRFFHFV.js → chunk-6SCIX2W2.js} +2 -2
- package/dist/cli/chunks/{chunk-2JDLQWSV.js → chunk-6WF2MOQB.js} +2 -2
- package/dist/cli/chunks/{chunk-YNNOY3XN.js → chunk-7BQXEYRV.js} +2 -2
- package/dist/cli/chunks/{chunk-MMIQ5DMA.js → chunk-7VO5IEJ2.js} +2 -2
- package/dist/cli/chunks/{chunk-XDSA7YUQ.js → chunk-AIBE3J4A.js} +1 -1
- package/dist/cli/chunks/{chunk-AV7KYE5P.js → chunk-AMW27FSS.js} +5 -5
- package/dist/cli/chunks/{chunk-22D6VBPD.js → chunk-AZJYDM2K.js} +2 -2
- package/dist/cli/chunks/{chunk-PYIHZXCI.js → chunk-B6CT4ILU.js} +4 -4
- package/dist/cli/chunks/{chunk-ZK2BH23O.js → chunk-BEFRQOLH.js} +2 -2
- package/dist/cli/chunks/{chunk-CIRPP7RQ.js → chunk-C2446H7G.js} +2 -2
- package/dist/cli/chunks/{chunk-ON4D4TJ4.js → chunk-D7IWGQTW.js} +2 -2
- package/dist/cli/chunks/{chunk-6KSCXPPL.js → chunk-D7PI4CYZ.js} +2 -2
- package/dist/cli/chunks/{chunk-BQCSCAUC.js → chunk-DAIM72HV.js} +2 -2
- package/dist/cli/chunks/{chunk-XMJTTF5N.js → chunk-DPKECIKN.js} +3 -3
- package/dist/cli/chunks/{chunk-DZZEHPSJ.js → chunk-E6CGBOZY.js} +3 -3
- package/dist/cli/chunks/{chunk-OIRZJCZY.js → chunk-EGTOSQZK.js} +2 -2
- package/dist/cli/chunks/{chunk-WDMPJ2M2.js → chunk-EMZ3DXMG.js} +2 -2
- package/dist/cli/chunks/{chunk-QBRHKTFT.js → chunk-EWI37TJA.js} +1 -1
- package/dist/cli/chunks/{chunk-A5RMQG4N.js → chunk-F34OO2Q7.js} +3 -3
- package/dist/cli/chunks/{chunk-7SWD3D6Y.js → chunk-F6QPAVWS.js} +2 -2
- package/dist/cli/chunks/chunk-F77X5DAF.js +2 -0
- package/dist/cli/chunks/{chunk-Y63MBMOV.js → chunk-FDFJJFQT.js} +2 -2
- package/dist/cli/chunks/{chunk-YWZHMXTO.js → chunk-FQ7I4JBQ.js} +2 -2
- package/dist/cli/chunks/{chunk-S3ZO7JXS.js → chunk-G5FPWH5O.js} +4 -4
- package/dist/cli/chunks/{chunk-QSE67XJO.js → chunk-GDMH7NPV.js} +2 -2
- package/dist/cli/chunks/{chunk-MEY43PIQ.js → chunk-GILL32E2.js} +2 -2
- package/dist/cli/chunks/{chunk-LQTWPSYL.js → chunk-GLMDRGJD.js} +1 -1
- package/dist/cli/chunks/{chunk-MNV3E5KY.js → chunk-GS33ZRJH.js} +4 -4
- package/dist/cli/chunks/chunk-HPYGMKZF.js +2 -0
- package/dist/cli/chunks/{chunk-EQBEGDTG.js → chunk-HTLAPMTK.js} +1 -1
- package/dist/cli/chunks/{chunk-C2M74HCN.js → chunk-IAK76TIZ.js} +1 -1
- package/dist/cli/chunks/{chunk-2EDWGHDA.js → chunk-ICF5RPQU.js} +2 -2
- package/dist/cli/chunks/{chunk-ZXTO4C7R.js → chunk-IPAQ4HVX.js} +2 -2
- package/dist/cli/chunks/{chunk-RLXTBL3H.js → chunk-ISRTT4I7.js} +22 -22
- package/dist/cli/chunks/{chunk-SW4OKUTC.js → chunk-IYFMDIYZ.js} +2 -2
- package/dist/cli/chunks/{chunk-7IZ2OPC2.js → chunk-JRBGHWAM.js} +2 -2
- package/dist/cli/chunks/{chunk-QJ2EHLJ2.js → chunk-JYR3X4OC.js} +1 -1
- package/dist/cli/chunks/{chunk-5QHSLWLP.js → chunk-K72J52JO.js} +2 -2
- package/dist/cli/chunks/{chunk-PIZYRPMT.js → chunk-K7CW2X6U.js} +2 -2
- package/dist/cli/chunks/{chunk-3Z4FHA2E.js → chunk-K7K4TFJM.js} +4 -4
- package/dist/cli/chunks/{chunk-5HB54RUS.js → chunk-KCXE2LZU.js} +2 -2
- package/dist/cli/chunks/{chunk-THRTUW4Z.js → chunk-KGPAWNNR.js} +1 -1
- package/dist/cli/chunks/{chunk-MYWQTCS4.js → chunk-KJ56OXH4.js} +1 -1
- package/dist/cli/chunks/{chunk-ZDHMZPSL.js → chunk-KUFC4DBX.js} +1 -1
- package/dist/cli/chunks/{chunk-CV2SBMBW.js → chunk-KWZEBHAP.js} +2 -2
- package/dist/cli/chunks/{chunk-X2VAOIUY.js → chunk-L6VNEEN6.js} +1 -1
- package/dist/cli/chunks/{chunk-S3OZ7XSY.js → chunk-LHPR7ROV.js} +1 -1
- package/dist/cli/chunks/{chunk-HO37VP4O.js → chunk-LKK3NIHC.js} +1 -1
- package/dist/cli/chunks/{chunk-XRJECWZE.js → chunk-LOFA3U4X.js} +1 -1
- package/dist/cli/chunks/{chunk-AWFIEGR3.js → chunk-LYKSIOOT.js} +2 -2
- package/dist/cli/chunks/chunk-M2PSXKTG.js +2 -0
- package/dist/cli/chunks/{chunk-CMACGG4Z.js → chunk-M3MKP5VN.js} +1 -1
- package/dist/cli/chunks/{chunk-UYYBPWU3.js → chunk-M4ARHDY4.js} +1 -1
- package/dist/cli/chunks/chunk-M5DBKHM4.js +2 -0
- package/dist/cli/chunks/{chunk-7IVQ6OVR.js → chunk-MDWJXSBA.js} +2 -2
- package/dist/cli/chunks/{chunk-IICTTDAA.js → chunk-MFWWPRBV.js} +2 -2
- package/dist/cli/chunks/{chunk-4BXGVM2C.js → chunk-MHWYQHGN.js} +1 -1
- package/dist/cli/chunks/{chunk-HJME6G5M.js → chunk-MIQBRVK2.js} +1 -1
- package/dist/cli/chunks/{chunk-FY3CUPNN.js → chunk-MKZQBBCU.js} +2 -2
- package/dist/cli/chunks/{chunk-MCOFJHSJ.js → chunk-MQ5WMWUK.js} +5 -5
- package/dist/cli/chunks/chunk-MQIAN57O.js +2 -0
- package/dist/cli/chunks/{chunk-6NZHEM4V.js → chunk-MU4P4P4E.js} +3 -3
- package/dist/cli/chunks/{chunk-ETN5563K.js → chunk-MWV4KPOB.js} +2 -2
- package/dist/cli/chunks/{chunk-XTCUN36Z.js → chunk-N244P4MM.js} +2 -2
- package/dist/cli/chunks/{chunk-DRWGK3YO.js → chunk-N3MM4Z33.js} +2 -2
- package/dist/cli/chunks/{chunk-QQNCSEZG.js → chunk-N4CXUGXE.js} +2 -2
- package/dist/cli/chunks/{chunk-PEK6NGVJ.js → chunk-ND6YSW5N.js} +1 -1
- package/dist/cli/chunks/{chunk-7V5UHLNY.js → chunk-NJYI7HX7.js} +3 -3
- package/dist/cli/chunks/{chunk-YACT5WFC.js → chunk-NSRDP7RD.js} +2 -2
- package/dist/cli/chunks/{chunk-L7VIX22Y.js → chunk-NZGLDOU4.js} +15 -15
- package/dist/cli/chunks/{chunk-MNUTRAUV.js → chunk-O3SG32PS.js} +1 -1
- package/dist/cli/chunks/{chunk-ZGNZJJFF.js → chunk-OIFJH7TF.js} +1 -1
- package/dist/cli/chunks/{chunk-LZCBSFAU.js → chunk-OKKTDHHF.js} +6 -6
- package/dist/cli/chunks/{chunk-3RHHKYUR.js → chunk-OO7KJ34Y.js} +2 -2
- package/dist/cli/chunks/{chunk-STEGWLH5.js → chunk-OV4BLIKJ.js} +2 -2
- package/dist/cli/chunks/{chunk-AOI67HA3.js → chunk-PISW5HUX.js} +1 -1
- package/dist/cli/chunks/{chunk-SJH3HYNC.js → chunk-PLD4IGDL.js} +2 -2
- package/dist/cli/chunks/{chunk-2OH3ALYB.js → chunk-PMWWWYUM.js} +1 -1
- package/dist/cli/chunks/{chunk-EA7ZSN3V.js → chunk-PWJZZCHJ.js} +1 -1
- package/dist/cli/chunks/{chunk-HA63NBFK.js → chunk-PZ4PRZXN.js} +37 -37
- package/dist/cli/chunks/chunk-PZCSJZVJ.js +2 -0
- package/dist/cli/chunks/{chunk-CTDLI2ON.js → chunk-Q53M4LI7.js} +1 -1
- package/dist/cli/chunks/{chunk-WSVUSIAZ.js → chunk-QPMAXDJ2.js} +2 -2
- package/dist/cli/chunks/{chunk-MCZHKXB4.js → chunk-RJKYPWFD.js} +2 -2
- package/dist/cli/chunks/{chunk-7QRMARM7.js → chunk-RUC3FCRK.js} +2 -2
- package/dist/cli/chunks/{chunk-5PL7WTCU.js → chunk-SC6UFGJ6.js} +2 -2
- package/dist/cli/chunks/{chunk-FO43SQXP.js → chunk-SJC7OKF3.js} +2 -2
- package/dist/cli/chunks/{chunk-R2O6OKT2.js → chunk-STMMZXS6.js} +1 -1
- package/dist/cli/chunks/{chunk-ORF2UKQH.js → chunk-SVILIQQQ.js} +1 -1
- package/dist/cli/chunks/{chunk-UVU7XLJY.js → chunk-SXMGNMFL.js} +5 -5
- package/dist/cli/chunks/{chunk-OIEQF7PG.js → chunk-SZKFT6CD.js} +2 -2
- package/dist/cli/chunks/{chunk-G5U6Q42D.js → chunk-TBJ566KV.js} +2 -2
- package/dist/cli/chunks/{chunk-SVYTN2GT.js → chunk-TCV5DASI.js} +2 -2
- package/dist/cli/chunks/chunk-TWAWEP4X.js +59 -0
- package/dist/cli/chunks/chunk-U27GVYXA.js +2 -0
- package/dist/cli/chunks/{chunk-FPAW77XV.js → chunk-UFKVKNAA.js} +1 -1
- package/dist/cli/chunks/{chunk-HJORBNXW.js → chunk-USB7GCIC.js} +1 -1
- package/dist/cli/chunks/{chunk-4GTDW2XL.js → chunk-UW3ZSFFB.js} +2 -2
- package/dist/cli/chunks/{chunk-OXCEUR5F.js → chunk-UWAUYDW4.js} +2 -2
- package/dist/cli/chunks/{chunk-4F3ZTXHP.js → chunk-UXJVR323.js} +2 -2
- package/dist/cli/chunks/{chunk-AIUSZC6K.js → chunk-V5G3SMAJ.js} +2 -2
- package/dist/cli/chunks/{chunk-DMQPO43S.js → chunk-VDKMBOUK.js} +1 -1
- package/dist/cli/chunks/{chunk-5WJ3FWL4.js → chunk-VJ2D6FST.js} +24 -24
- package/dist/cli/chunks/chunk-VJOPNK2L.js +2 -0
- package/dist/cli/chunks/{chunk-JF53LRBL.js → chunk-VRE2EBFI.js} +2 -2
- package/dist/cli/chunks/{chunk-WNR2KAUH.js → chunk-WI5WXYIS.js} +2 -2
- package/dist/cli/chunks/{chunk-OWQ6HEYI.js → chunk-WIYWDON4.js} +2 -2
- package/dist/cli/chunks/{chunk-KB5L5TTF.js → chunk-WYMQ6FZR.js} +5 -5
- package/dist/cli/chunks/{chunk-TJKDATEU.js → chunk-XBFEHVBO.js} +2 -2
- package/dist/cli/chunks/{chunk-7SJX4CFK.js → chunk-XDZXLEJK.js} +1 -1
- package/dist/cli/chunks/{chunk-QEPFXY6G.js → chunk-XJXCSCCP.js} +1 -1
- package/dist/cli/chunks/{chunk-OPFN5LFT.js → chunk-XVA56PXZ.js} +4 -4
- package/dist/cli/chunks/{chunk-PXTDEO65.js → chunk-Y2EDDV5U.js} +2 -2
- package/dist/cli/chunks/{chunk-VSUTI4G6.js → chunk-YSLE6NNG.js} +2 -2
- package/dist/cli/chunks/{chunk-XGBAHAGC.js → chunk-Z4BTPQLG.js} +4 -4
- package/dist/cli/chunks/{chunk-NZO4WUSO.js → chunk-ZM4QGYGK.js} +3 -3
- package/dist/cli/chunks/{ci-PYCRCL7G.js → ci-2BLMQNX3.js} +6 -6
- package/dist/cli/chunks/{ci-output-EKQQFE2D.js → ci-output-XK4PPSN7.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-RH3Q2MJO.js → circuit-breaker-W7X4NPFE.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-DUDXB4VV.js → claude-flow-setup-GLBLSYNJ.js} +2 -2
- package/dist/cli/chunks/client-C6CJOCRN.js +2 -0
- package/dist/cli/chunks/{cline-installer-3Q4WIWUG.js → cline-installer-7WX7DBGI.js} +2 -2
- package/dist/cli/chunks/{code-E4Q6DGOO.js → code-SP3HAQWG.js} +20 -19
- package/dist/cli/chunks/{code-index-extractor-2PCISUOW.js → code-index-extractor-44HH36UG.js} +2 -2
- package/dist/cli/chunks/{codex-installer-YNNNOLJ6.js → codex-installer-LMXRWLPU.js} +2 -2
- package/dist/cli/chunks/{completions-2F7TUFBD.js → completions-GL5FTZAN.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-2B6MHO7W.js → complexity-analyzer-CQMYGETL.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-ENOKRU5M.js → continuedev-installer-CYVYS5B7.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-6YD2KM5F.js → copilot-installer-M7XVII2A.js} +2 -2
- package/dist/cli/chunks/{cost-tracker-FCH4QOEA.js → cost-tracker-S4ET4FH3.js} +2 -2
- package/dist/cli/chunks/{coverage-JTOXZE3T.js → coverage-DFVSSQ4A.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-I3GEA5G6.js +2 -0
- package/dist/cli/chunks/{cursor-installer-QZFBUGLQ.js → cursor-installer-KWDSQPQC.js} +2 -2
- package/dist/cli/chunks/{daemon-K4QFB5FQ.js → daemon-2HD54QVO.js} +3 -3
- package/dist/cli/chunks/daemon-CRX46BBO.js +10 -0
- package/dist/cli/chunks/{dag-attention-scheduler-BXAAW33V.js → dag-attention-scheduler-SCP6WPZB.js} +2 -2
- package/dist/cli/chunks/{detect-UGSWIOAD.js → detect-XS2GDCEX.js} +2 -2
- package/dist/cli/chunks/{dist-node-FN3HX3OK.js → dist-node-U43MVQ3F.js} +2 -2
- package/dist/cli/chunks/{domain-handler-7PP7VYA7.js → domain-handler-HITMDULH.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-XZM44W7I.js → domain-transfer-TJF7DNI4.js} +2 -2
- package/dist/cli/chunks/dream-JCQMG2RL.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-JZVERJ5L.js → embed-and-insert-pattern-JKG33YZK.js} +2 -2
- package/dist/cli/chunks/{eval-466NFF2D.js → eval-NF5Y4W37.js} +3 -3
- package/dist/cli/chunks/{experience-capture-middleware-I7IQCC7V.js → experience-capture-middleware-VMMFYJ4D.js} +3 -3
- package/dist/cli/chunks/{fast-paths-34OICNZA.js → fast-paths-W2Q53IR2.js} +2 -2
- package/dist/cli/chunks/{feature-flags-6UBIVTAD.js → feature-flags-B4PBMQJO.js} +2 -2
- package/dist/cli/chunks/{feature-flags-X5WBBWSO.js → feature-flags-PVI7A4RE.js} +2 -2
- package/dist/cli/chunks/{file-discovery-NLMDBWXX.js → file-discovery-E4L3I33I.js} +2 -2
- package/dist/cli/chunks/{fleet-W7CYCHDI.js → fleet-LE5SHVLK.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-K4VTAG5X.js → gnn-wrapper-MWWJBLOH.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-ZGKF2Z6T.js → heartbeat-handler-XOUVNPQK.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-FBHE4ZWH.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-EOOA4WXD.js +2 -0
- package/dist/cli/chunks/hnsw-index-TD3KRPND.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-ELDRLKK5.js → hnsw-legacy-bridge-W3T5ZDDP.js} +2 -2
- package/dist/cli/chunks/{better-sqlite3-5BT5FO64.js → hnswlib-node-3TZFES5I.js} +2 -2
- package/dist/cli/chunks/hooks-RUPQVIUM.js +250 -0
- package/dist/cli/chunks/hybrid-router-64O6PXZ2.js +2 -0
- package/dist/cli/chunks/{hypergraph-engine-UWFW3XP5.js → hypergraph-engine-VDFK3JYH.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-PK2BI46K.js → hypergraph-handler-EUDGEF25.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-ITQHXGTM.js +2 -0
- package/dist/cli/chunks/{init-handler-HNG6KJOU.js → init-handler-MZEAJOZK.js} +6 -6
- package/dist/cli/chunks/init-wizard-DZ4IKGQI.js +2 -0
- package/dist/cli/chunks/kernel-HSVY4ZYK.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-25V7FEJ4.js → kilocode-installer-ECBYWT6M.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-7RMTTCQB.js → kiro-installer-KYFCSYTG.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-H32TXXX4.js +2 -0
- package/dist/cli/chunks/{learning-XQC2MG2R.js → learning-4RAFMDSB.js} +3 -3
- package/dist/cli/chunks/{llm-router-6KTTONH4.js → llm-router-JHBNLYP3.js} +12 -12
- package/dist/cli/chunks/llm-router-service-3FKESBUX.js +2 -0
- package/dist/cli/chunks/{load-BV64P3AL.js → load-4DVQML7P.js} +2 -2
- package/dist/cli/chunks/load-test-LKHURZGZ.js +2 -0
- package/dist/cli/chunks/{mcp-U5ZN77TA.js → mcp-LCWMU4GZ.js} +2 -2
- package/dist/cli/chunks/{memory-WB5BNBK7.js → memory-3DTJAURT.js} +5 -5
- package/dist/cli/chunks/memory-backend-XRJRZ6CK.js +2 -0
- package/dist/cli/chunks/memory-handlers-BL6E3XAK.js +2 -0
- package/dist/cli/chunks/{multi-model-executor-3X3W3UTY.js → multi-model-executor-AVR5SZOO.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-TTTMG7ZZ.js → opencode-installer-DW2426QM.js} +3 -3
- package/dist/cli/chunks/{orchestrator-BLCGSHMZ.js → orchestrator-AHF4W5GS.js} +8 -8
- package/dist/cli/chunks/{pipeline-DZPGMRG7.js → pipeline-N6THEWYE.js} +2 -2
- package/dist/cli/chunks/{platform-EVMZAUNV.js → platform-MRCFQF7X.js} +2 -2
- package/dist/cli/chunks/{plugin-OR55K4HT.js → plugin-6YKUN5QM.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-4ODV27HD.js → prime-radiant-advanced-wasm-2YPAHSVS.js} +2 -2
- package/dist/cli/chunks/protocol-executor-KABPB6PQ.js +2 -0
- package/dist/cli/chunks/{protocol-handler-ZOTI5PID.js → protocol-handler-Y2NMUKWQ.js} +2 -2
- package/dist/cli/chunks/{prove-DIMBYJ7V.js → prove-DZUNWBFD.js} +2 -2
- package/dist/cli/chunks/provider-manager-U7EBM3FA.js +2 -0
- package/dist/cli/chunks/qe-reasoning-bank-64O2OQIW.js +2 -0
- package/dist/cli/chunks/{quality-7MX4VL6M.js → quality-AIFQMGUV.js} +2 -2
- package/dist/cli/chunks/queen-coordinator-SV3COGIL.js +2 -0
- package/dist/cli/chunks/{real-embeddings-YPUHWRN2.js → real-embeddings-5XL4LOG2.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-WG5AU4QM.js → roocode-installer-LV3WONT5.js} +2 -2
- package/dist/cli/chunks/router-QARRPMED.js +2 -0
- package/dist/cli/chunks/routing-feedback-KD2JFTPK.js +2 -0
- package/dist/cli/chunks/{routing-handler-LZB4MN2K.js → routing-handler-WSMUILGD.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-YE4ADBMC.js → ruvector-commands-BCEIDTW3.js} +2 -2
- package/dist/cli/chunks/{rvf-dual-writer-QS5ATW4C.js → rvf-dual-writer-LRSPC6H3.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-adapter-YIGKSBD3.js → rvf-migration-adapter-QHNX6353.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-coordinator-2NDCWP7F.js → rvf-migration-coordinator-SLNB3XPW.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-4LLGF5AY.js +2 -0
- package/dist/cli/chunks/safe-db-RAX3H2P7.js +2 -0
- package/dist/cli/chunks/schedule-RQZGLLUY.js +2 -0
- package/dist/cli/chunks/scheduler-ACWTN4LN.js +2 -0
- package/dist/cli/chunks/{security-HT4SUT24.js → security-CYY6TECQ.js} +3 -3
- package/dist/cli/chunks/shared-rvf-adapter-U6JE4O6A.js +2 -0
- package/dist/cli/chunks/{shared-rvf-dual-writer-ZKFO7CBY.js → shared-rvf-dual-writer-PJBSNBRV.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-SWNBO257.js +2 -0
- package/dist/cli/chunks/{status-handler-AMEMKBI4.js → status-handler-W723LXX5.js} +2 -2
- package/dist/cli/chunks/{structural-health-RBADRLC3.js → structural-health-WZUPZBB5.js} +2 -2
- package/dist/cli/chunks/{sync-PCB23M4K.js → sync-UA22CKUS.js} +2 -2
- package/dist/cli/chunks/sync-ZLMF53TB.js +2 -0
- package/dist/cli/chunks/{task-handler-J26FSCH5.js → task-handler-SENTEEXZ.js} +2 -2
- package/dist/cli/chunks/{task-handlers-AQRLR6BL.js → task-handlers-FGVUZOCC.js} +3 -3
- package/dist/cli/chunks/{test-YXWSIOSB.js → test-Q37C3WI2.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-XY532GI4.js → test-scheduling-E6SPIBTH.js} +4 -4
- package/dist/cli/chunks/token-bootstrap-HQFFMZUF.js +2 -0
- package/dist/cli/chunks/{token-usage-2MJVE4DT.js → token-usage-JHNWTZ7L.js} +3 -3
- package/dist/cli/chunks/{transformers-QSNTOD2Z.js → transformers-TEXDUVNI.js} +2 -2
- package/dist/cli/chunks/tree-sitter-wasm-parser-MWSS52H6.js +2 -0
- package/dist/cli/chunks/{types-RNKRSYMO.js → types-YQRKHYH3.js} +2 -2
- package/dist/cli/chunks/unified-memory-QG3FDRKR.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-KOR4EOIG.js +2 -0
- package/dist/cli/chunks/unified-persistence-J6NIRYKM.js +2 -0
- package/dist/cli/chunks/{upgrade-EKJHIFWP.js → upgrade-JKMEDURI.js} +2 -2
- package/dist/cli/chunks/{validate-KS4T7LWC.js → validate-URO7G6OE.js} +4 -4
- package/dist/cli/chunks/validate-swarm-VZVJ56Z5.js +14 -0
- package/dist/cli/chunks/{vibium-FLUQO4IF.js → vibium-G5WZILL6.js} +2 -2
- package/dist/cli/chunks/visual-security-RAWV6YLN.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-UMC63DWD.js → web-tree-sitter-LECH5T6H.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-V3FQGJIQ.js → windsurf-installer-2NPLC2YW.js} +2 -2
- package/dist/cli/chunks/{witness-chain-GE74TLSO.js → witness-chain-X347C36A.js} +2 -2
- package/dist/cli/chunks/witness-chain-ZO7FIM35.js +2 -0
- package/dist/cli/chunks/{workflow-4YZ2RPWA.js → workflow-V4ALYZ73.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-7SKITNIJ.js +2 -0
- package/dist/cli/chunks/wrappers-QXOPRPR4.js +2 -0
- package/dist/cli/commands/code.js +6 -0
- package/dist/cli/commands/hooks-handlers/task-hooks.js +50 -0
- package/dist/cli/commands/learning.js +5 -5
- package/dist/cli/commands/llm-router.js +1 -1
- package/dist/cli/commands/workflow.js +1 -0
- package/dist/coordination/consensus/providers/native-learning-provider.d.ts +1 -1
- package/dist/coordination/consensus/providers/ollama-provider.d.ts +1 -1
- package/dist/coordination/consensus/providers/openrouter-provider.d.ts +1 -1
- package/dist/coordination/handlers/code-intelligence-handlers.js +6 -0
- package/dist/coordination/mincut/neural-goap.js +24 -20
- package/dist/coordination/protocols/code-intelligence-index.js +31 -25
- package/dist/coordination/queen-coordinator.js +4 -0
- package/dist/coordination/queen-work-stealing.js +1 -2
- package/dist/domains/chaos-resilience/coordinator.js +19 -15
- package/dist/domains/chaos-resilience/services/chaos-engineer.js +5 -2
- package/dist/domains/chaos-resilience/services/load-tester.js +15 -11
- package/dist/domains/code-intelligence/interfaces.d.ts +5 -0
- package/dist/domains/code-intelligence/services/c4-model/index.js +12 -6
- package/dist/domains/code-intelligence/services/impact-analyzer.js +6 -2
- package/dist/domains/code-intelligence/services/knowledge-graph.d.ts +42 -0
- package/dist/domains/code-intelligence/services/knowledge-graph.js +278 -93
- package/dist/domains/code-intelligence/services/semantic-analyzer.js +8 -2
- package/dist/domains/contract-testing/coordinator.js +1 -1
- package/dist/domains/coverage-analysis/coordinator.js +4 -2
- package/dist/domains/learning-optimization/coordinator.js +1 -0
- package/dist/domains/quality-assessment/coherence/gate-controller.js +32 -26
- package/dist/domains/requirements-validation/coordinator.js +1 -0
- package/dist/domains/test-execution/services/e2e/wait-condition-handler.js +1 -1
- package/dist/domains/test-execution/services/retry-handler.js +18 -12
- package/dist/domains/test-generation/coordinator.js +1 -1
- package/dist/domains/test-generation/services/pattern-matcher.js +7 -5
- package/dist/domains/test-generation/services/test-generator.js +3 -2
- package/dist/domains/visual-accessibility/coordinator.js +24 -20
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/init/phases/12-verification.js +3 -3
- package/dist/integrations/agentic-flow/model-router/router.js +1 -1
- package/dist/integrations/embeddings/base/EmbeddingGenerator.js +11 -7
- package/dist/integrations/ruvector/hypergraph-engine.js +2 -2
- package/dist/integrations/ruvector/shared-rvf-adapter.js +12 -1
- package/dist/integrations/ruvector/shared-rvf-dual-writer.js +6 -2
- package/dist/integrations/ruvector/spectral-math.js +2 -2
- package/dist/integrations/ruvector/spectral-sparsifier.js +1 -1
- package/dist/kernel/kernel.js +1 -1
- package/dist/kernel/project-root.d.ts +33 -0
- package/dist/kernel/project-root.js +86 -0
- package/dist/kernel/unified-memory-hnsw.js +1 -0
- package/dist/kernel/unified-memory.d.ts +2 -19
- package/dist/kernel/unified-memory.js +8 -64
- package/dist/learning/experience-capture.js +1 -1
- package/dist/learning/local-judge-client.d.ts +55 -0
- package/dist/learning/local-judge-client.js +127 -0
- package/dist/learning/nagual-client.d.ts +73 -0
- package/dist/learning/nagual-client.js +150 -0
- package/dist/learning/pattern-store.js +10 -3
- package/dist/learning/qe-reasoning-bank.js +9 -1
- package/dist/learning/qe-unified-memory.js +8 -6
- package/dist/mcp/bundle.js +405 -403
- package/dist/mcp/entry.js +44 -33
- package/dist/mcp/handlers/core-handlers.js +2 -2
- package/dist/mcp/handlers/cross-phase-handlers.js +5 -3
- package/dist/mcp/handlers/handler-factory.d.ts +5 -0
- package/dist/mcp/handlers/handler-factory.js +44 -4
- package/dist/mcp/http-server.js +1 -0
- package/dist/mcp/protocol-server.js +2 -2
- package/dist/mcp/tools/code-intelligence/analyze.js +1 -1
- package/dist/mcp/tools/learning-optimization/optimize.js +1 -1
- package/dist/mcp/tools/qx-analysis/heuristics-engine.js +195 -173
- package/dist/mcp/tools/visual-accessibility/index.js +1 -1
- package/dist/mcp/transport/stdio.d.ts +7 -0
- package/dist/mcp/transport/stdio.js +39 -2
- package/dist/mcp/transport/websocket/websocket-transport.js +1 -0
- package/dist/optimization/auto-tuner.js +1 -1
- package/dist/planning/goap-planner.js +1 -0
- package/dist/routing/agent-dependency-graph.js +4 -1
- package/dist/shared/llm/router/config-store.js +1 -1
- package/dist/shared/metrics/system-metrics.js +6 -4
- package/dist/shared/parsers/tree-sitter-wasm-parser.d.ts +12 -0
- package/dist/shared/parsers/tree-sitter-wasm-parser.js +35 -0
- package/dist/shared/parsers/treesitter-ts-extractor.d.ts +39 -0
- package/dist/shared/parsers/treesitter-ts-extractor.js +196 -0
- package/dist/shared/utils/safe-expression-evaluator.js +8 -5
- package/dist/sync/cloud/postgres-writer.js +2 -0
- package/dist/sync/readers/json-reader.js +1 -1
- package/dist/test-scheduling/git-aware/test-selector.js +1 -1
- package/dist/workers/daemon.js +2 -0
- package/dist/workers/quality-daemon/git-watcher.js +2 -0
- package/dist/workers/quality-daemon/index.js +28 -24
- package/dist/workers/worker-manager.js +4 -0
- package/package.json +5 -4
- package/dist/cli/chunks/adapter-CR6J5C76.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-2MNTHMB6.js +0 -2
- package/dist/cli/chunks/audit-ALRYPHGP.js +0 -3
- package/dist/cli/chunks/base-AOQNGMTL.js +0 -2
- package/dist/cli/chunks/browser-workflow-UJ4A2ZXO.js +0 -2
- package/dist/cli/chunks/chunk-7DKYCVJI.js +0 -2
- package/dist/cli/chunks/chunk-FO73PZVU.js +0 -2
- package/dist/cli/chunks/chunk-I677W5BT.js +0 -59
- package/dist/cli/chunks/chunk-IAZEDWRX.js +0 -2
- package/dist/cli/chunks/chunk-RNREAOY4.js +0 -2
- package/dist/cli/chunks/chunk-UWXH2UQK.js +0 -2
- package/dist/cli/chunks/chunk-ZQUXNG5X.js +0 -2
- package/dist/cli/chunks/client-RDPWGOSA.js +0 -2
- package/dist/cli/chunks/cross-domain-router-4K5ZVZEZ.js +0 -2
- package/dist/cli/chunks/daemon-M422U3ZA.js +0 -10
- package/dist/cli/chunks/dream-RPNWM7VS.js +0 -2
- package/dist/cli/chunks/heartbeat-scheduler-JBCXMMZO.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-3SC2HZIG.js +0 -2
- package/dist/cli/chunks/hnsw-index-FQORAR6K.js +0 -2
- package/dist/cli/chunks/hooks-T4CBINAV.js +0 -248
- package/dist/cli/chunks/hybrid-router-6CBFDXPR.js +0 -2
- package/dist/cli/chunks/impact-analyzer-SOEFVZWG.js +0 -2
- package/dist/cli/chunks/init-wizard-3E4IU5M4.js +0 -2
- package/dist/cli/chunks/kernel-GFZP4G5J.js +0 -2
- package/dist/cli/chunks/knowledge-graph-BKRKBU26.js +0 -2
- package/dist/cli/chunks/llm-router-service-KE4IGZPP.js +0 -2
- package/dist/cli/chunks/load-test-VSYJV2AO.js +0 -2
- package/dist/cli/chunks/memory-backend-B72RGHRF.js +0 -2
- package/dist/cli/chunks/memory-handlers-NWCH7AUO.js +0 -2
- package/dist/cli/chunks/protocol-executor-V3F37FPO.js +0 -2
- package/dist/cli/chunks/provider-manager-2PN72TT6.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-P665QNIR.js +0 -2
- package/dist/cli/chunks/queen-coordinator-XD4F7BGB.js +0 -2
- package/dist/cli/chunks/router-4SSNWDJC.js +0 -2
- package/dist/cli/chunks/routing-feedback-O2JSIBW6.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-WIUHYXRB.js +0 -2
- package/dist/cli/chunks/safe-db-WL5Y7ZNS.js +0 -2
- package/dist/cli/chunks/schedule-U7QDGU5A.js +0 -2
- package/dist/cli/chunks/scheduler-LXKGQYXA.js +0 -2
- package/dist/cli/chunks/shared-rvf-adapter-4IZOJL33.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-4KFO3SEB.js +0 -2
- package/dist/cli/chunks/sync-ARDDLQBS.js +0 -2
- package/dist/cli/chunks/token-bootstrap-KL2QIQ36.js +0 -2
- package/dist/cli/chunks/tree-sitter-wasm-parser-QJOKHOIW.js +0 -2
- package/dist/cli/chunks/unified-memory-7AS4LIEF.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-GREESNJX.js +0 -2
- package/dist/cli/chunks/unified-persistence-BPJOMZOA.js +0 -2
- package/dist/cli/chunks/validate-swarm-SKKWRP2H.js +0 -14
- package/dist/cli/chunks/visual-security-BW662FHQ.js +0 -2
- package/dist/cli/chunks/witness-chain-OXVDLNVT.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-KKNR46XV.js +0 -2
- package/dist/cli/chunks/wrappers-37NLMKPE.js +0 -2
|
@@ -1,6 +1,6 @@
|
|
|
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.10.
|
|
2
|
-
import{a 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.10.4");process.exit(0)}
|
|
2
|
+
import{a as F}from"./chunk-LYKSIOOT.js";import{a as b,b as E,c as z,d as M,e as C,f as P,g as B}from"./chunk-USB7GCIC.js";function W(s,e){let n=s.slice(0,e).split(`
|
|
3
3
|
`),r=n.length,o=(n[n.length-1]||"").length;return{line:r,column:o,offset:e}}function p(s,e,n,r,o){return{start:W(s,e),end:W(s,n),oldText:s.slice(e,n),newText:r,description:o}}function _(s,e){let n=[...e].sort((o,t)=>t.start.offset-o.start.offset),r=s;for(let o of n)r=r.slice(0,o.start.offset)+o.newText+r.slice(o.end.offset);return r}function U(s,e){if(s.length===0)return 1;let n=s.reduce((t,a)=>t+Math.abs(a.newText.length-a.oldText.length),0)/s.length,r=Math.max(.5,1-n/1e3),o=Math.max(.7,1-s.length/100);return Math.min(1,e*r*o)}function T(s,e,n,r,o=.9){let t=_(s,n),a=Date.now()-r;return{success:!0,transformType:e,originalCode:s,transformedCode:t,edits:n,changeCount:n.length,confidence:U(n,o),durationMs:a,implementationUsed:"typescript",usedFallback:!1,warnings:[]}}function w(s,e,n,r){return{success:!1,transformType:e,originalCode:s,transformedCode:s,edits:[],changeCount:0,confidence:0,durationMs:Date.now()-r,implementationUsed:"typescript",usedFallback:!1,error:n,warnings:[]}}function Z(s,e={debug:()=>{},info:()=>{},warn:()=>{},error:()=>{}}){let n=Date.now(),r=[],o=[];try{let t=/\bvar\s+([a-zA-Z_$][a-zA-Z0-9_$]*)/g,a=/([a-zA-Z_$][a-zA-Z0-9_$]*)\s*(?:\+\+|--|[+\-*/%&|^]=|\?\?=|&&=|\|\|=|=(?!=))/g,i=[],l;for(;(l=t.exec(s))!==null;)i.push({name:l[1],offset:l.index});let m=new Set;for(;(l=a.exec(s))!==null;)m.add(l[1]);let u=/\bfor\s*\(\s*var\s+([a-zA-Z_$][a-zA-Z0-9_$]*)/g,c=new Set;for(;(l=u.exec(s))!==null;)c.add(l[1]);for(let g of i){let d=c.has(g.name)||m.has(g.name)?"let":"const";r.push(p(s,g.offset,g.offset+3,d,`Convert var ${g.name} to ${d}`))}e.debug("var-to-const transform completed",{declarations:i.length,reassigned:m.size,loopVars:c.size});let f=T(s,"var-to-const",r,n,.95);return f.warnings=o,f}catch(t){return e.error("var-to-const transform failed",t),w(s,"var-to-const",t instanceof Error?t.message:"Unknown error",n)}}function O(s,e={debug:()=>{},info:()=>{},warn:()=>{},error:()=>{}}){let n=Date.now(),r=[],o=[];try{let t=/function\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(([^)]*)\)/g,a=/(?:const|let|var)\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*=\s*\(([^)]*)\)\s*=>/g,i=/([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(([^)]*)\)\s*(?::\s*[^{]+)?\s*\{/g,l;for(;(l=t.exec(s))!==null;){let u=l[2].trim();if(u&&!u.includes(":")){let c=u.split(",").map(d=>{let h=d.trim().replace(/\s*=.*$/,"");return h&&!h.includes(":")?`${h}: unknown`:d.trim()}).join(", "),f=l.index+l[0].indexOf("(")+1,g=f+l[2].length;r.push(p(s,f,g,c,`Add types to function ${l[1]} parameters`))}}for(;(l=a.exec(s))!==null;){let u=l[2].trim();if(u&&!u.includes(":")){let c=u.split(",").map(d=>{let h=d.trim().replace(/\s*=.*$/,"");return h&&!h.includes(":")?`${h}: unknown`:d.trim()}).join(", "),f=l.index+l[0].indexOf("(")+1,g=f+l[2].length;r.push(p(s,f,g,c,`Add types to arrow function ${l[1]} parameters`))}}e.debug("add-types transform completed",{edits:r.length});let m=T(s,"add-types",r,n,.7);return m.warnings=o,r.length>0&&m.warnings.push('Type annotations use "unknown" - manual review recommended'),m}catch(t){return e.error("add-types transform failed",t),w(s,"add-types",t instanceof Error?t.message:"Unknown error",n)}}function I(s,e={debug:()=>{},info:()=>{},warn:()=>{},error:()=>{}}){let n=Date.now(),r=[],o=[];try{let t=/^\s*console\.(log|warn|error|info|debug|trace|dir|table|time|timeEnd|group|groupEnd|assert)\s*\([^)]*\);?\s*$/gm,a=/console\.(log|warn|error|info|debug|trace|dir|table|time|timeEnd|group|groupEnd|assert)\s*\([^)]*\)/g,i,l=new Set;for(;(i=t.exec(s))!==null;)l.has(i.index)||(l.add(i.index),r.push(p(s,i.index,i.index+i[0].length,"",`Remove console.${i[1]}() statement`)));for(;(i=a.exec(s))!==null;){if(l.has(i.index))continue;let u=s.lastIndexOf(`
|
|
4
4
|
`,i.index)+1,c=s.indexOf(`
|
|
5
5
|
`,i.index),f=s.slice(u,c===-1?void 0:c);/^\s*console\./.test(f)||(l.add(i.index),o.push(`Inline console.${i[1]}() at offset ${i.index} - consider manual review`))}e.debug("remove-console transform completed",{removed:r.length,warnings:o.length});let m=T(s,"remove-console",r,n,.95);return m.warnings=o,m}catch(t){return e.error("remove-console transform failed",t),w(s,"remove-console",t instanceof Error?t.message:"Unknown error",n)}}function j(s,e={debug:()=>{},info:()=>{},warn:()=>{},error:()=>{}}){let n=Date.now(),r=[],o=[];try{let t=/([a-zA-Z_$][a-zA-Z0-9_$]*(?:\([^)]*\))?)\s*\.then\s*\(\s*(?:async\s*)?\(?\s*([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\)?\s*=>\s*([^)]+)\)/g,a;for(;(a=t.exec(s))!==null;){let[l,m,u,c]=a;if(c.includes(".then")||c.includes(".catch")){o.push(`Complex promise chain at offset ${a.index} - manual review recommended`);continue}let f=`const ${u} = await ${m};
|
|
6
|
-
${c.trim()}`;r.push(p(s,a.index,a.index+l.length,f,"Convert .then() to await"))}e.debug("promise-to-async transform completed",{converted:r.length,warnings:o.length});let i=T(s,"promise-to-async",r,n,.65);return i.warnings=o,r.length>0&&i.warnings.push("Promise chains converted to await - ensure containing function is async"),i}catch(t){return e.error("promise-to-async transform failed",t),w(s,"promise-to-async",t instanceof Error?t.message:"Unknown error",n)}}function N(s,e={debug:()=>{},info:()=>{},warn:()=>{},error:()=>{}}){let n=Date.now(),r=[],o=[];try{let t,a=/(?:const|let|var)\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*=\s*require\s*\(\s*(['"`][^'"`]+['"`])\s*\)\s*;?/g;for(;(t=a.exec(s))!==null;){let[c,f,g]=t,d=`import ${f} from ${g};`;r.push(p(s,t.index,t.index+c.length,d,"Convert require to import"))}let i=/(?:const|let|var)\s+\{\s*([^}]+)\s*\}\s*=\s*require\s*\(\s*(['"`][^'"`]+['"`])\s*\)\s*;?/g;for(;(t=i.exec(s))!==null;){let[c,f,g]=t,d=`import { ${f.trim()} } from ${g};`;r.push(p(s,t.index,t.index+c.length,d,"Convert destructured require to import"))}let l=/module\.exports\s*=\s*([^;]+);?/g;for(;(t=l.exec(s))!==null;){let[c,f]=t,g=`export default ${f.trim()};`;r.push(p(s,t.index,t.index+c.length,g,"Convert module.exports to export default"))}let m=/exports\.([a-zA-Z_$][a-zA-Z0-9_$]*)\s*=\s*([^;]+);?/g;for(;(t=m.exec(s))!==null;){let[c,f,g]=t,d=g.trim(),h;d.startsWith("function")||d.startsWith("class")?h=`export ${d}`:d.startsWith("async function")?h=`export ${d}`:h=`export const ${f} = ${d};`,r.push(p(s,t.index,t.index+c.length,h,`Convert exports.${f} to named export`))}e.debug("cjs-to-esm transform completed",{edits:r.length});let u=T(s,"cjs-to-esm",r,n,.85);return u.warnings=o,u}catch(t){return e.error("cjs-to-esm transform failed",t),w(s,"cjs-to-esm",t instanceof Error?t.message:"Unknown error",n)}}function H(s,e={debug:()=>{},info:()=>{},warn:()=>{},error:()=>{}}){let n=Date.now(),r=[],o=[];try{let t=/(const|let|var)\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*=\s*function\s*\(([^)]*)\)\s*\{/g,a;for(;(a=t.exec(s))!==null;){let[m,u,c,f]=a,g=a.index,d=1,h=g+m.length;for(;d>0&&h<s.length;)s[h]==="{"&&d++,s[h]==="}"&&d--,h++;let S=s.slice(g,h);if(/\bthis\b/.test(S)){o.push(`Function ${c} uses 'this' - skipping arrow conversion (would change binding)`);continue}if(/\barguments\b/.test(S)){o.push(`Function ${c} uses 'arguments' - skipping arrow conversion (not available in arrow functions)`);continue}let D=`${u} ${c} = (${f}) => {`;r.push(p(s,a.index,a.index+m.length,D,`Convert function ${c} to arrow function`))}let i=/function\s*\(([^)]*)\)\s*\{\s*return\s+([^;]+);\s*\}/g;for(;(a=i.exec(s))!==null;){let[m,u,c]=a;if(/\b(this|arguments)\b/.test(m))continue;let f=u.includes(",")||u.trim()===""?`(${u}) => ${c}`:`${u.trim()} => ${c}`;r.push(p(s,a.index,a.index+m.length,f,"Convert callback to arrow function"))}e.debug("func-to-arrow transform completed",{converted:r.length,warnings:o.length});let l=T(s,"func-to-arrow",r,n,.85);return l.warnings=o,l}catch(t){return e.error("func-to-arrow transform failed",t),w(s,"func-to-arrow",t instanceof Error?t.message:"Unknown error",n)}}var V={"var-to-const":Z,"add-types":O,"remove-console":I,"promise-to-async":j,"cjs-to-esm":N,"func-to-arrow":H};function $(s,e,n){let r=V[e];return r?r(s,n):{success:!1,transformType:e,originalCode:s,transformedCode:s,edits:[],changeCount:0,confidence:0,durationMs:0,implementationUsed:"typescript",usedFallback:!1,error:`Unknown transform type: ${e}`,warnings:[]}}var q={JavaScript:0,TypeScript:1,Python:2,Rust:3,Go:4,Java:5,C:6,Cpp:7},y=null,A=null,x=null,R=!1,k=null;async function G(){if(R)return k===null;if(k)return!1;try{let s=await import("./agent-booster-wasm-DHSIPFTH.js");return y=s.transform,A=s.warmup,x=s.isWasmAvailable,R=!0,!0}catch(s){return k=s,R=!0,!1}}function K(s){return q.TypeScript}var L=class{cache=new Map;ttlMs;enabled;constructor(e,n){this.enabled=e,this.ttlMs=n}generateKey(e,n){let r=0;for(let o=0;o<e.length;o++){let t=e.charCodeAt(o);r=(r<<5)-r+t,r=r&r}return`${n}:${r}:${e.length}`}get(e,n){if(!this.enabled)return null;let r=this.generateKey(e,n),o=this.cache.get(r);return o?Date.now()>o.expiresAt?(this.cache.delete(r),null):o.result:null}set(e,n,r){if(!this.enabled)return;let o=this.generateKey(e,n);this.cache.set(o,{result:r,expiresAt:Date.now()+this.ttlMs})}clear(){this.cache.clear()}getStats(){return{size:this.cache.size,hitRate:0}}},v=class{config;logger;cache;enabledTransforms;metricsTracker;initialized=!1;wasmAvailable=!1;wasmModule=null;patternsLoaded=!1;totalTransforms=0;successfulTransforms=0;totalDurationMs=0;cacheHits=0;cacheMisses=0;constructor(e={},n,r){this.config={...z,...e},this.logger=n||{debug:()=>{},info:()=>{},warn:()=>{},error:()=>{}},this.metricsTracker=r,this.cache=new L(this.config.cacheEnabled,this.config.cacheTtlMs),this.config.transforms.length===0?this.enabledTransforms=new Set(b):this.enabledTransforms=new Set(this.config.transforms)}setMetricsTracker(e){this.metricsTracker=e}async initialize(){this.initialized||(this.logger.info("Initializing Agent Booster adapter",{enabled:this.config.enabled,transforms:Array.from(this.enabledTransforms)}),this.config.transforms.length===0&&await this.loadEligibleTransformsFromPatterns(),this.config.enabled&&await this.tryLoadWasm(),this.initialized=!0,this.logger.info("Agent Booster adapter initialized",{wasmAvailable:this.wasmAvailable,enabledTransforms:Array.from(this.enabledTransforms),patternsLoaded:this.patternsLoaded}))}async loadEligibleTransformsFromPatterns(){try{let n=await F().getEligibleBoosterTransforms();if(n.length>0){let r=n.filter(o=>b.includes(o));if(r.length>0){this.enabledTransforms=new Set(r),this.patternsLoaded=!0,this.logger.info("Loaded eligible transforms from PatternLoader",{fromPatterns:r,invalidIgnored:n.length-r.length});return}}this.logger.debug("PatternLoader returned empty transforms, using defaults")}catch(e){this.logger.warn("Failed to load transforms from PatternLoader, using defaults",{error:e instanceof Error?e.message:"Unknown error"})}this.enabledTransforms=new Set(b),this.patternsLoaded=!1}async tryLoadWasm(){try{if(this.logger.debug("Loading WASM module"),!await G()||!x){this.logger.debug("WASM module could not be loaded, using TypeScript fallback"),this.wasmAvailable=!1;return}this.logger.debug("Checking WASM availability from local module"),await x()&&y&&A?(this.logger.debug("Warming up WASM module"),await A(),this.wasmModule={transform:y,warmup:A,isAvailable:x},this.wasmAvailable=!0,this.logger.info("WASM Agent Booster loaded and warmed up successfully",{source:"local-module"})):(this.logger.debug("WASM not available from local module, using TypeScript fallback"),this.wasmAvailable=!1)}catch(e){this.logger.warn("Failed to load WASM module",{error:e instanceof Error?e.message:"Unknown error"}),this.wasmAvailable=!1}}async dispose(){this.cache.clear(),this.wasmModule=null,this.wasmAvailable=!1,this.initialized=!1,this.logger.info("Agent Booster adapter disposed")}async transform(e,n){this.ensureInitialized(),this.ensureEnabled();let r=Date.now();if(this.totalTransforms++,!this.enabledTransforms.has(n))return this.createErrorResult(e,n,`Transform type '${n}' is not enabled`,r);let o=this.cache.get(e,n);if(o)return this.cacheHits++,this.logger.debug("Cache hit for transform",{type:n}),{...o,durationMs:Date.now()-r};this.cacheMisses++;let t;try{t=await this.executeWithFallback(e,n,r)}catch(a){return this.createErrorResult(e,n,a instanceof Error?a.message:"Unknown error",r)}return t.success&&(this.successfulTransforms++,this.cache.set(e,n,t)),this.totalDurationMs+=t.durationMs,await this.recordMetrics(t,n),t}async recordMetrics(e,n){if(this.metricsTracker)try{let r=`booster-${n}-${Date.now()}`;await this.metricsTracker.recordOutcome("booster",r,e.success,e.durationMs,{subType:n,confidence:e.confidence,usedFallback:e.usedFallback,implementationUsed:e.implementationUsed,itemCount:e.changeCount,errorMessage:e.error})}catch(r){this.logger.warn("Failed to record metrics",{error:r instanceof Error?r.message:"Unknown error"})}}async executeWithFallback(e,n,r){if(this.wasmAvailable)try{let t=await this.executeWasmTransform(e,n,r);if(t.success&&t.confidence>=this.config.confidenceThreshold)return t;this.logger.debug("WASM transform low confidence, trying TypeScript",{confidence:t.confidence,threshold:this.config.confidenceThreshold})}catch(t){this.logger.warn("WASM transform failed, falling back to TypeScript",{error:t instanceof Error?t.message:"Unknown error"})}let o=$(e,n,this.logger);return o.durationMs=Date.now()-r,this.config.fallbackToLLM&&o.confidence<this.config.confidenceThreshold&&(this.logger.debug("TypeScript transform low confidence, LLM fallback available",{confidence:o.confidence,threshold:this.config.confidenceThreshold}),o.warnings.push(`Confidence ${o.confidence.toFixed(2)} is below threshold ${this.config.confidenceThreshold}. LLM fallback recommended for review.`),o.usedFallback=!0),o}async executeWasmTransform(e,n,r){if(!this.wasmAvailable)throw new C;let o=K(n),t=$(e,n,this.logger);if(t.changeCount===0)return{...t,durationMs:Date.now()-r,implementationUsed:"wasm"};if(!y)throw new C("WASM transform function not loaded");let a=await Promise.race([y(e,t.transformedCode,o,{confidenceThreshold:this.config.confidenceThreshold,allowFallback:!0}),new Promise((m,u)=>setTimeout(()=>u(new P("WASM transform timed out",n,this.config.timeoutMs)),this.config.timeoutMs))]),i=Date.now()-r,l=a.success&&a.mergedCode!==e?t.changeCount:0;return{success:a.success,transformType:n,originalCode:e,transformedCode:a.mergedCode,edits:t.edits,changeCount:l,confidence:a.confidence,durationMs:i,implementationUsed:a.source==="wasm"?"wasm":"typescript",usedFallback:a.source!=="wasm",error:a.error,warnings:a.syntaxValid?[]:["WASM reported syntax may be invalid"]}}async batchTransform(e,n){this.ensureInitialized(),this.ensureEnabled();let r=Date.now(),o=[],t=[],a=0,i=0,l=0,m=0;for(let u of e){if(u.content.length>this.config.maxFileSizeBytes){let c=new B(u.path,u.content.length,this.config.maxFileSizeBytes);t.push({path:u.path,error:c.message}),i++;continue}try{let c=await this.transform(u.content,n);o.push({path:u.path,result:c}),c.success?c.changeCount>0?(a++,m+=c.changeCount):l++:(i++,c.error&&t.push({path:u.path,error:c.error}))}catch(c){i++,t.push({path:u.path,error:c instanceof Error?c.message:"Unknown error"})}}return{success:i===0,transformType:n,files:o,totalFiles:e.length,successCount:a,failureCount:i,noChangeCount:l,totalChanges:m,durationMs:Date.now()-r,errors:t}}async detectTransformOpportunities(e){this.ensureInitialized(),this.ensureEnabled();let n=Date.now(),r=[],o={},t=[];for(let a of b)o[a]=0;for(let a of Array.from(this.enabledTransforms))try{let i=await this.transform(e,a);if(i.changeCount>0)for(let l of i.edits){let m={type:a,confidence:i.confidence,location:l.start,codeSnippet:l.oldText.slice(0,100)+(l.oldText.length>100?"...":""),suggestedCode:l.newText.slice(0,100)+(l.newText.length>100?"...":""),reason:l.description,risk:this.confidenceToRisk(i.confidence),estimatedDurationMs:E[a].typicalLatencyMs};r.push(m),o[a]++}}catch(i){t.push(`Failed to analyze for ${a}: ${i instanceof Error?i.message:"Unknown error"}`)}return r.sort((a,i)=>i.confidence-a.confidence),{opportunities:r,totalCount:r.length,byType:o,durationMs:Date.now()-n,complete:t.length===0,warnings:t}}isTransformAvailable(e){return this.enabledTransforms.has(e)}getTransformMetadata(e){return E[e]}getAvailableTransforms(){return Array.from(this.enabledTransforms)}isWasmAvailable(){return this.wasmAvailable}getHealth(){let e=this.totalTransforms>0?this.totalDurationMs/this.totalTransforms:0,n=this.cacheHits+this.cacheMisses>0?this.cacheHits/(this.cacheHits+this.cacheMisses):0,r=[];return this.initialized||r.push("Adapter not initialized"),this.config.enabled||r.push("Adapter is disabled"),this.wasmAvailable||r.push("WASM module not loaded (using TypeScript fallback)"),this.patternsLoaded||r.push("Patterns not loaded from PatternLoader (using defaults)"),{ready:this.initialized&&this.config.enabled,wasmAvailable:this.wasmAvailable,patternsLoaded:this.patternsLoaded,availableTransforms:Array.from(this.enabledTransforms),lastChecked:new Date,issues:r,metrics:{totalTransforms:this.totalTransforms,successfulTransforms:this.successfulTransforms,averageDurationMs:e,cacheHitRate:n}}}ensureInitialized(){if(!this.initialized)throw new M("AgentBoosterAdapter not initialized. Call initialize() first.","var-to-const")}ensureEnabled(){if(!this.config.enabled)throw new M("AgentBoosterAdapter is disabled. Set enabled: true in config.","var-to-const")}createErrorResult(e,n,r,o){return{success:!1,transformType:n,originalCode:e,transformedCode:e,edits:[],changeCount:0,confidence:0,durationMs:Date.now()-o,implementationUsed:"typescript",usedFallback:!1,error:r,warnings:[]}}confidenceToRisk(e){return e>=.95?"info":e>=.85?"low":e>=.7?"medium":e>=.5?"high":"critical"}};async function ee(s={},e,n){let r=new v(s,e,n);return await r.initialize(),r}function re(s={},e,n){return new v(s,e,n)}export{v as a,ee as b,re as c};
|
|
6
|
+
${c.trim()}`;r.push(p(s,a.index,a.index+l.length,f,"Convert .then() to await"))}e.debug("promise-to-async transform completed",{converted:r.length,warnings:o.length});let i=T(s,"promise-to-async",r,n,.65);return i.warnings=o,r.length>0&&i.warnings.push("Promise chains converted to await - ensure containing function is async"),i}catch(t){return e.error("promise-to-async transform failed",t),w(s,"promise-to-async",t instanceof Error?t.message:"Unknown error",n)}}function N(s,e={debug:()=>{},info:()=>{},warn:()=>{},error:()=>{}}){let n=Date.now(),r=[],o=[];try{let t,a=/(?:const|let|var)\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*=\s*require\s*\(\s*(['"`][^'"`]+['"`])\s*\)\s*;?/g;for(;(t=a.exec(s))!==null;){let[c,f,g]=t,d=`import ${f} from ${g};`;r.push(p(s,t.index,t.index+c.length,d,"Convert require to import"))}let i=/(?:const|let|var)\s+\{\s*([^}]+)\s*\}\s*=\s*require\s*\(\s*(['"`][^'"`]+['"`])\s*\)\s*;?/g;for(;(t=i.exec(s))!==null;){let[c,f,g]=t,d=`import { ${f.trim()} } from ${g};`;r.push(p(s,t.index,t.index+c.length,d,"Convert destructured require to import"))}let l=/module\.exports\s*=\s*([^;]+);?/g;for(;(t=l.exec(s))!==null;){let[c,f]=t,g=`export default ${f.trim()};`;r.push(p(s,t.index,t.index+c.length,g,"Convert module.exports to export default"))}let m=/exports\.([a-zA-Z_$][a-zA-Z0-9_$]*)\s*=\s*([^;]+);?/g;for(;(t=m.exec(s))!==null;){let[c,f,g]=t,d=g.trim(),h;d.startsWith("function")||d.startsWith("class")?h=`export ${d}`:d.startsWith("async function")?h=`export ${d}`:h=`export const ${f} = ${d};`,r.push(p(s,t.index,t.index+c.length,h,`Convert exports.${f} to named export`))}e.debug("cjs-to-esm transform completed",{edits:r.length});let u=T(s,"cjs-to-esm",r,n,.85);return u.warnings=o,u}catch(t){return e.error("cjs-to-esm transform failed",t),w(s,"cjs-to-esm",t instanceof Error?t.message:"Unknown error",n)}}function H(s,e={debug:()=>{},info:()=>{},warn:()=>{},error:()=>{}}){let n=Date.now(),r=[],o=[];try{let t=/(const|let|var)\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*=\s*function\s*\(([^)]*)\)\s*\{/g,a;for(;(a=t.exec(s))!==null;){let[m,u,c,f]=a,g=a.index,d=1,h=g+m.length;for(;d>0&&h<s.length;)s[h]==="{"&&d++,s[h]==="}"&&d--,h++;let S=s.slice(g,h);if(/\bthis\b/.test(S)){o.push(`Function ${c} uses 'this' - skipping arrow conversion (would change binding)`);continue}if(/\barguments\b/.test(S)){o.push(`Function ${c} uses 'arguments' - skipping arrow conversion (not available in arrow functions)`);continue}let D=`${u} ${c} = (${f}) => {`;r.push(p(s,a.index,a.index+m.length,D,`Convert function ${c} to arrow function`))}let i=/function\s*\(([^)]*)\)\s*\{\s*return\s+([^;]+);\s*\}/g;for(;(a=i.exec(s))!==null;){let[m,u,c]=a;if(/\b(this|arguments)\b/.test(m))continue;let f=u.includes(",")||u.trim()===""?`(${u}) => ${c}`:`${u.trim()} => ${c}`;r.push(p(s,a.index,a.index+m.length,f,"Convert callback to arrow function"))}e.debug("func-to-arrow transform completed",{converted:r.length,warnings:o.length});let l=T(s,"func-to-arrow",r,n,.85);return l.warnings=o,l}catch(t){return e.error("func-to-arrow transform failed",t),w(s,"func-to-arrow",t instanceof Error?t.message:"Unknown error",n)}}var V={"var-to-const":Z,"add-types":O,"remove-console":I,"promise-to-async":j,"cjs-to-esm":N,"func-to-arrow":H};function $(s,e,n){let r=V[e];return r?r(s,n):{success:!1,transformType:e,originalCode:s,transformedCode:s,edits:[],changeCount:0,confidence:0,durationMs:0,implementationUsed:"typescript",usedFallback:!1,error:`Unknown transform type: ${e}`,warnings:[]}}var q={JavaScript:0,TypeScript:1,Python:2,Rust:3,Go:4,Java:5,C:6,Cpp:7},y=null,A=null,x=null,k=!1,R=null;async function G(){if(k)return R===null;if(R)return!1;try{let s=await import("./agent-booster-wasm-EJPDSWON.js");return y=s.transform,A=s.warmup,x=s.isWasmAvailable,k=!0,!0}catch(s){return R=s,k=!0,!1}}function K(s){return q.TypeScript}var L=class{cache=new Map;ttlMs;enabled;constructor(e,n){this.enabled=e,this.ttlMs=n}generateKey(e,n){let r=0;for(let o=0;o<e.length;o++){let t=e.charCodeAt(o);r=(r<<5)-r+t,r=r&r}return`${n}:${r}:${e.length}`}get(e,n){if(!this.enabled)return null;let r=this.generateKey(e,n),o=this.cache.get(r);return o?Date.now()>o.expiresAt?(this.cache.delete(r),null):o.result:null}set(e,n,r){if(!this.enabled)return;let o=this.generateKey(e,n);this.cache.set(o,{result:r,expiresAt:Date.now()+this.ttlMs})}clear(){this.cache.clear()}getStats(){return{size:this.cache.size,hitRate:0}}},v=class{config;logger;cache;enabledTransforms;metricsTracker;initialized=!1;wasmAvailable=!1;wasmModule=null;patternsLoaded=!1;totalTransforms=0;successfulTransforms=0;totalDurationMs=0;cacheHits=0;cacheMisses=0;constructor(e={},n,r){this.config={...z,...e},this.logger=n||{debug:()=>{},info:()=>{},warn:()=>{},error:()=>{}},this.metricsTracker=r,this.cache=new L(this.config.cacheEnabled,this.config.cacheTtlMs),this.config.transforms.length===0?this.enabledTransforms=new Set(b):this.enabledTransforms=new Set(this.config.transforms)}setMetricsTracker(e){this.metricsTracker=e}async initialize(){this.initialized||(this.logger.info("Initializing Agent Booster adapter",{enabled:this.config.enabled,transforms:Array.from(this.enabledTransforms)}),this.config.transforms.length===0&&await this.loadEligibleTransformsFromPatterns(),this.config.enabled&&await this.tryLoadWasm(),this.initialized=!0,this.logger.info("Agent Booster adapter initialized",{wasmAvailable:this.wasmAvailable,enabledTransforms:Array.from(this.enabledTransforms),patternsLoaded:this.patternsLoaded}))}async loadEligibleTransformsFromPatterns(){try{let n=await F().getEligibleBoosterTransforms();if(n.length>0){let r=n.filter(o=>b.includes(o));if(r.length>0){this.enabledTransforms=new Set(r),this.patternsLoaded=!0,this.logger.info("Loaded eligible transforms from PatternLoader",{fromPatterns:r,invalidIgnored:n.length-r.length});return}}this.logger.debug("PatternLoader returned empty transforms, using defaults")}catch(e){this.logger.warn("Failed to load transforms from PatternLoader, using defaults",{error:e instanceof Error?e.message:"Unknown error"})}this.enabledTransforms=new Set(b),this.patternsLoaded=!1}async tryLoadWasm(){try{if(this.logger.debug("Loading WASM module"),!await G()||!x){this.logger.debug("WASM module could not be loaded, using TypeScript fallback"),this.wasmAvailable=!1;return}this.logger.debug("Checking WASM availability from local module"),await x()&&y&&A?(this.logger.debug("Warming up WASM module"),await A(),this.wasmModule={transform:y,warmup:A,isAvailable:x},this.wasmAvailable=!0,this.logger.info("WASM Agent Booster loaded and warmed up successfully",{source:"local-module"})):(this.logger.debug("WASM not available from local module, using TypeScript fallback"),this.wasmAvailable=!1)}catch(e){this.logger.warn("Failed to load WASM module",{error:e instanceof Error?e.message:"Unknown error"}),this.wasmAvailable=!1}}async dispose(){this.cache.clear(),this.wasmModule=null,this.wasmAvailable=!1,this.initialized=!1,this.logger.info("Agent Booster adapter disposed")}async transform(e,n){this.ensureInitialized(),this.ensureEnabled();let r=Date.now();if(this.totalTransforms++,!this.enabledTransforms.has(n))return this.createErrorResult(e,n,`Transform type '${n}' is not enabled`,r);let o=this.cache.get(e,n);if(o)return this.cacheHits++,this.logger.debug("Cache hit for transform",{type:n}),{...o,durationMs:Date.now()-r};this.cacheMisses++;let t;try{t=await this.executeWithFallback(e,n,r)}catch(a){return this.createErrorResult(e,n,a instanceof Error?a.message:"Unknown error",r)}return t.success&&(this.successfulTransforms++,this.cache.set(e,n,t)),this.totalDurationMs+=t.durationMs,await this.recordMetrics(t,n),t}async recordMetrics(e,n){if(this.metricsTracker)try{let r=`booster-${n}-${Date.now()}`;await this.metricsTracker.recordOutcome("booster",r,e.success,e.durationMs,{subType:n,confidence:e.confidence,usedFallback:e.usedFallback,implementationUsed:e.implementationUsed,itemCount:e.changeCount,errorMessage:e.error})}catch(r){this.logger.warn("Failed to record metrics",{error:r instanceof Error?r.message:"Unknown error"})}}async executeWithFallback(e,n,r){if(this.wasmAvailable)try{let t=await this.executeWasmTransform(e,n,r);if(t.success&&t.confidence>=this.config.confidenceThreshold)return t;this.logger.debug("WASM transform low confidence, trying TypeScript",{confidence:t.confidence,threshold:this.config.confidenceThreshold})}catch(t){this.logger.warn("WASM transform failed, falling back to TypeScript",{error:t instanceof Error?t.message:"Unknown error"})}let o=$(e,n,this.logger);return o.durationMs=Date.now()-r,this.config.fallbackToLLM&&o.confidence<this.config.confidenceThreshold&&(this.logger.debug("TypeScript transform low confidence, LLM fallback available",{confidence:o.confidence,threshold:this.config.confidenceThreshold}),o.warnings.push(`Confidence ${o.confidence.toFixed(2)} is below threshold ${this.config.confidenceThreshold}. LLM fallback recommended for review.`),o.usedFallback=!0),o}async executeWasmTransform(e,n,r){if(!this.wasmAvailable)throw new C;let o=K(n),t=$(e,n,this.logger);if(t.changeCount===0)return{...t,durationMs:Date.now()-r,implementationUsed:"wasm"};if(!y)throw new C("WASM transform function not loaded");let a=await Promise.race([y(e,t.transformedCode,o,{confidenceThreshold:this.config.confidenceThreshold,allowFallback:!0}),new Promise((m,u)=>setTimeout(()=>u(new P("WASM transform timed out",n,this.config.timeoutMs)),this.config.timeoutMs))]),i=Date.now()-r,l=a.success&&a.mergedCode!==e?t.changeCount:0;return{success:a.success,transformType:n,originalCode:e,transformedCode:a.mergedCode,edits:t.edits,changeCount:l,confidence:a.confidence,durationMs:i,implementationUsed:a.source==="wasm"?"wasm":"typescript",usedFallback:a.source!=="wasm",error:a.error,warnings:a.syntaxValid?[]:["WASM reported syntax may be invalid"]}}async batchTransform(e,n){this.ensureInitialized(),this.ensureEnabled();let r=Date.now(),o=[],t=[],a=0,i=0,l=0,m=0;for(let u of e){if(u.content.length>this.config.maxFileSizeBytes){let c=new B(u.path,u.content.length,this.config.maxFileSizeBytes);t.push({path:u.path,error:c.message}),i++;continue}try{let c=await this.transform(u.content,n);o.push({path:u.path,result:c}),c.success?c.changeCount>0?(a++,m+=c.changeCount):l++:(i++,c.error&&t.push({path:u.path,error:c.error}))}catch(c){i++,t.push({path:u.path,error:c instanceof Error?c.message:"Unknown error"})}}return{success:i===0,transformType:n,files:o,totalFiles:e.length,successCount:a,failureCount:i,noChangeCount:l,totalChanges:m,durationMs:Date.now()-r,errors:t}}async detectTransformOpportunities(e){this.ensureInitialized(),this.ensureEnabled();let n=Date.now(),r=[],o={},t=[];for(let a of b)o[a]=0;for(let a of Array.from(this.enabledTransforms))try{let i=await this.transform(e,a);if(i.changeCount>0)for(let l of i.edits){let m={type:a,confidence:i.confidence,location:l.start,codeSnippet:l.oldText.slice(0,100)+(l.oldText.length>100?"...":""),suggestedCode:l.newText.slice(0,100)+(l.newText.length>100?"...":""),reason:l.description,risk:this.confidenceToRisk(i.confidence),estimatedDurationMs:E[a].typicalLatencyMs};r.push(m),o[a]++}}catch(i){t.push(`Failed to analyze for ${a}: ${i instanceof Error?i.message:"Unknown error"}`)}return r.sort((a,i)=>i.confidence-a.confidence),{opportunities:r,totalCount:r.length,byType:o,durationMs:Date.now()-n,complete:t.length===0,warnings:t}}isTransformAvailable(e){return this.enabledTransforms.has(e)}getTransformMetadata(e){return E[e]}getAvailableTransforms(){return Array.from(this.enabledTransforms)}isWasmAvailable(){return this.wasmAvailable}getHealth(){let e=this.totalTransforms>0?this.totalDurationMs/this.totalTransforms:0,n=this.cacheHits+this.cacheMisses>0?this.cacheHits/(this.cacheHits+this.cacheMisses):0,r=[];return this.initialized||r.push("Adapter not initialized"),this.config.enabled||r.push("Adapter is disabled"),this.wasmAvailable||r.push("WASM module not loaded (using TypeScript fallback)"),this.patternsLoaded||r.push("Patterns not loaded from PatternLoader (using defaults)"),{ready:this.initialized&&this.config.enabled,wasmAvailable:this.wasmAvailable,patternsLoaded:this.patternsLoaded,availableTransforms:Array.from(this.enabledTransforms),lastChecked:new Date,issues:r,metrics:{totalTransforms:this.totalTransforms,successfulTransforms:this.successfulTransforms,averageDurationMs:e,cacheHitRate:n}}}ensureInitialized(){if(!this.initialized)throw new M("AgentBoosterAdapter not initialized. Call initialize() first.","var-to-const")}ensureEnabled(){if(!this.config.enabled)throw new M("AgentBoosterAdapter is disabled. Set enabled: true in config.","var-to-const")}createErrorResult(e,n,r,o){return{success:!1,transformType:n,originalCode:e,transformedCode:e,edits:[],changeCount:0,confidence:0,durationMs:Date.now()-o,implementationUsed:"typescript",usedFallback:!1,error:r,warnings:[]}}confidenceToRisk(e){return e>=.95?"info":e>=.85?"low":e>=.7?"medium":e>=.5?"high":"critical"}};async function ee(s={},e,n){let r=new v(s,e,n);return await r.initialize(),r}function re(s={},e,n){return new v(s,e,n)}export{v as a,ee as b,re as c};
|
|
@@ -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.10.
|
|
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.10.4");process.exit(0)}
|
|
2
|
+
import{a as D}from"./chunk-O3SG32PS.js";import{c as T,d as $}from"./chunk-KUFC4DBX.js";import{a as j}from"./chunk-DPKECIKN.js";import"./chunk-UFKVKNAA.js";import"./chunk-SVILIQQQ.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 x(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-E4L3I33I.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-E4L3I33I.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-E4L3I33I.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-XK4PPSN7.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-E4L3I33I.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
|
|
@@ -16,15 +16,15 @@ import{a as D}from"./chunk-MNUTRAUV.js";import{c as x,d as $}from"./chunk-ZDHMZP
|
|
|
16
16
|
`;for(let r of s.phases)if(r.artifacts.length>0){n+=`### ${r.phase}
|
|
17
17
|
`;for(let l of r.artifacts)n+=`- \`${p.basename(l)}\`
|
|
18
18
|
`;n+=`
|
|
19
|
-
`}return n}function H(s,n,r){let l=new U("ci").description("CI/CD pipeline orchestration");return l.command("run").description("Execute CI pipeline from .aqe-ci.yml").option("-c, --config <path>","Path to .aqe-ci.yml config file").option("--phase <phases>","Run only specific phases (comma-separated)").option("--no-quality-gate","Skip quality gate enforcement").option("-F, --format <format>","Output format (text|json|markdown)","text").option("-o, --output <path>","Write combined report to file").action(async a=>{if(await r())try{let e,t=null;if(a.config){let c=
|
|
20
|
-
Config errors:`));for(let u of c.errors)console.error(o.red(` - ${u}`));await n(1);return}e=c.config,t=a.config}else if(t=G(),t){let c=
|
|
19
|
+
`}return n}function H(s,n,r){let l=new U("ci").description("CI/CD pipeline orchestration");return l.command("run").description("Execute CI pipeline from .aqe-ci.yml").option("-c, --config <path>","Path to .aqe-ci.yml config file").option("--phase <phases>","Run only specific phases (comma-separated)").option("--no-quality-gate","Skip quality gate enforcement").option("-F, --format <format>","Output format (text|json|markdown)","text").option("-o, --output <path>","Write combined report to file").action(async a=>{if(await r())try{let e,t=null;if(a.config){let c=x(p.resolve(a.config));if(!c.success){console.error(o.red(`
|
|
20
|
+
Config errors:`));for(let u of c.errors)console.error(o.red(` - ${u}`));await n(1);return}e=c.config,t=a.config}else if(t=G(),t){let c=x(t);if(!c.success){console.error(o.red(`
|
|
21
21
|
Config errors:`));for(let u of c.errors)console.error(o.red(` - ${u}`));await n(1);return}e=c.config}else e=E(),t="(defaults)";if(a.phase){let c=a.phase.split(",").map(u=>u.trim().toLowerCase());e.phases=e.phases.filter(u=>c.includes(u.name.toLowerCase())||c.includes(u.type))}a.qualityGate===!1&&(e.qualityGate.enforced=!1);let i=a.format,h=new Date;i==="text"&&(console.log(o.blue(`
|
|
22
22
|
AQE CI Pipeline
|
|
23
23
|
`)),console.log(o.gray(` Config: ${t}`)),console.log(o.gray(` Phases: ${e.phases.length}`)),console.log(o.gray(` Quality Gate: ${e.qualityGate.enforced?"enforced":"advisory"}
|
|
24
24
|
`)));let k=p.resolve(e.output.directory);I.mkdirSync(k,{recursive:!0});let f=[],C=!1;for(let c of e.phases){if(i==="text"){let S=` [${f.length+1}/${e.phases.length}] ${c.name}...`;process.stdout.write(o.cyan(S))}let u=await W(c,s,k,e.output.format);if(f.push(u),i==="text"){let S=u.status==="passed"?o.green:u.status==="failed"?o.red:u.status==="warning"?o.yellow:o.gray,O=u.status.toUpperCase(),L=`${(u.duration/1e3).toFixed(1)}s`;process.stdout.write(`\r [${f.length}/${e.phases.length}] ${c.name} ${S(O)} (${L})
|
|
25
25
|
`),u.summary&&console.log(o.gray(` ${u.summary}`))}if(u.status==="failed"&&(C=!0,!c.continueOnFailure)){i==="text"&&console.log(o.red(`
|
|
26
26
|
Pipeline stopped: "${c.name}" failed (continue_on_failure: false)
|
|
27
|
-
`));break}}let m=f.some(c=>c.status==="failed"),w=f.some(c=>c.status==="warning"),v=f.find(c=>c.type==="quality-gate"),y=!e.qualityGate.enforced||!v||v.status==="passed",g=m||!y?"failed":w?"warning":"passed",d=new Date,b=d.getTime()-h.getTime(),q={config:t||"(defaults)",startedAt:h,completedAt:d,duration:b,phases:f,qualityGatePassed:y,overallStatus:g,exitCode:g==="failed"?1:0};if(e.output.combinedReport){let c=p.join(k,"ci-report.md");I.writeFileSync(c,_(q),"utf-8");let u=p.join(k,"ci-report.json");I.writeFileSync(u,$(q),"utf-8")}if(i==="json")
|
|
27
|
+
`));break}}let m=f.some(c=>c.status==="failed"),w=f.some(c=>c.status==="warning"),v=f.find(c=>c.type==="quality-gate"),y=!e.qualityGate.enforced||!v||v.status==="passed",g=m||!y?"failed":w?"warning":"passed",d=new Date,b=d.getTime()-h.getTime(),q={config:t||"(defaults)",startedAt:h,completedAt:d,duration:b,phases:f,qualityGatePassed:y,overallStatus:g,exitCode:g==="failed"?1:0};if(e.output.combinedReport){let c=p.join(k,"ci-report.md");I.writeFileSync(c,_(q),"utf-8");let u=p.join(k,"ci-report.json");I.writeFileSync(u,$(q),"utf-8")}if(i==="json")T($(q),a.output);else if(i==="markdown")T(_(q),a.output);else{console.log("");let c=g==="passed"?o.green:g==="failed"?o.red:o.yellow;console.log(` ${c(`Pipeline: ${g.toUpperCase()}`)} (${(b/1e3).toFixed(1)}s)`),console.log(` Quality Gate: ${y?o.green("PASSED"):o.red("FAILED")}`),console.log(o.gray(` Artifacts: ${k}/`)),console.log("")}await n(q.exitCode)}catch(e){console.error(o.red(`
|
|
28
28
|
CI pipeline failed:`),e),await n(1)}}),l.command("init").description("Create a .aqe-ci.yml config file").option("--force","Overwrite existing config").action(async a=>{let e=G();if(e&&!a.force){console.log(o.yellow(`
|
|
29
29
|
Config already exists: ${e}`)),console.log(o.gray(` Use --force to overwrite
|
|
30
30
|
`)),await n(0);return}let t=`# AQE CI/CD Pipeline Configuration
|
|
@@ -76,6 +76,6 @@ quality_gate:
|
|
|
76
76
|
Created: ${i}`)),console.log(o.gray(" Edit the file to customize your CI pipeline")),console.log(o.gray(` Run: aqe ci run
|
|
77
77
|
`)),await n(0)}),l.command("validate").description("Validate .aqe-ci.yml config").option("-c, --config <path>","Path to config file").action(async a=>{let e=a.config?p.resolve(a.config):G();if(!e){console.log(o.red(`
|
|
78
78
|
No .aqe-ci.yml found`)),console.log(o.gray(` Run: aqe ci init
|
|
79
|
-
`)),await n(1);return}let t=
|
|
79
|
+
`)),await n(1);return}let t=x(e);if(t.success){console.log(o.green(`
|
|
80
80
|
Config valid: ${e}`)),console.log(o.gray(` Phases: ${t.config.phases.length}`));for(let i of t.config.phases){let h=i.enabled?o.green("*"):o.gray("o");console.log(` ${h} ${i.name} (${i.type})`)}console.log(o.gray(` Quality Gate: ${t.config.qualityGate.enforced?"enforced":"advisory"}`)),console.log(""),await n(0)}else{console.log(o.red(`
|
|
81
81
|
Config invalid: ${e}`));for(let i of t.errors)console.log(o.red(` - ${i}`));console.log(""),await n(1)}}),l}export{H as createCICommand};
|
|
@@ -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.10.
|
|
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.10.4");process.exit(0)}
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i,j}from"./chunk-KUFC4DBX.js";import"./chunk-SVILIQQQ.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.10.
|
|
2
|
-
import{a,b}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.10.4");process.exit(0)}
|
|
2
|
+
import{a,b}from"./chunk-ND6YSW5N.js";import"./chunk-SVILIQQQ.js";export{a as AdvisorCircuitBreaker,b as AdvisorCircuitBreakerError};
|
|
@@ -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.10.
|
|
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.10.4");process.exit(0)}
|
|
2
|
+
import{b as g}from"./chunk-XBFEHVBO.js";import{b as f,d as h}from"./chunk-IYFMDIYZ.js";import{a as d,c as v}from"./chunk-2B6ETC7C.js";import{a as b}from"./chunk-SVILIQQQ.js";h();v();import{existsSync as c,writeFileSync as p,readFileSync as m}from"node:fs";import{join as a}from"node:path";async function C(t,e){let o=g(t);if(e&&o.available&&console.log(`[ClaudeFlow] Detected via ${o.method}${o.version?`: v${o.version}`:""}`),!o.available)return{available:!1};let r={"mcp-config":"mcp","local-binary":"cli","npx-cached":"cli","npm-dependency":"npm"};return{available:!0,version:o.version,method:o.method?r[o.method]:void 0}}async function S(t){return{trajectories:!0,modelRouting:!0,pretrain:!0,workers:!0,patternSearch:!0}}function F(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 y(t){let e=a(t,".claude","settings.json"),o={};if(c(e))try{o=f(m(e,"utf-8"))}catch{}o.mcpServers||(o.mcpServers={});let r=o.mcpServers;!r.ruflo&&!r["claude-flow"]&&(r.ruflo={command:"npx",args:["ruflo@3.5.18","mcp"],env:{}}),p(e,JSON.stringify(o,null,2))}async function q(t){let{projectRoot:e,force:o,checkOnly:r,debug:s}=t,n=await C(e,s);if(!n.available&&!o)return{available:!1,features:{trajectories:!1,modelRouting:!1,pretrain:!1,workers:!1,patternSearch:!1}};let l=await S(e);if(r)return{available:n.available,version:n.version,features:l};let w=a(e,".agentic-qe"),u=a(w,"claude-flow-integration.json");try{let i=F(e,l);p(u,JSON.stringify(i,null,2)),s&&console.log(`[ClaudeFlow] Config written to: ${u}`)}catch(i){return{available:n.available,version:n.version,features:l,error:`Failed to write config: ${d(i)}`}}try{y(e)}catch(i){s&&console.log("[ClaudeFlow] MCP config update failed:",d(i))}return{available:!0,version:n.version,features:l,configPath:u}}function O(t){let e=a(t,".agentic-qe","claude-flow-integration.json");return c(e)}function $(t){let e=a(t,".agentic-qe","claude-flow-integration.json");if(!c(e))return null;try{return f(m(e,"utf-8"))}catch{return null}}function D(t){let e=a(t,".agentic-qe","claude-flow-integration.json");if(c(e))try{return b("node:fs").rmSync(e),!0}catch{return!1}return!0}export{$ as getClaudeFlowConfig,O as isClaudeFlowConfigured,D as removeClaudeFlowIntegration,q 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.10.4");process.exit(0)}
|
|
2
|
+
import{c as a,d as b,e as c}from"./chunk-F34OO2Q7.js";import"./chunk-4FTLYIMW.js";import"./chunk-2B6ETC7C.js";import"./chunk-SVILIQQQ.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.10.
|
|
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.10.4");process.exit(0)}
|
|
2
|
+
import{b as p}from"./chunk-LOFA3U4X.js";import{a as f,c as v}from"./chunk-2B6ETC7C.js";import"./chunk-SVILIQQQ.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.10.
|
|
2
|
-
import{a as A,b as
|
|
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.10.4");process.exit(0)}
|
|
2
|
+
import{a as A,b as x}from"./chunk-EWI37TJA.js";import{c as b,d as w}from"./chunk-KUFC4DBX.js";import"./chunk-SVILIQQQ.js";import{Command as z}from"commander";import e from"chalk";function j(S,$,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)
|
|
@@ -8,31 +8,32 @@ Examples:
|
|
|
8
8
|
aqe code impact src/auth/ Analyze change impact
|
|
9
9
|
aqe code deps src/ Map dependencies
|
|
10
10
|
aqe code complexity src/ Analyze code complexity metrics
|
|
11
|
-
`).action(async(
|
|
11
|
+
`).action(async(p,d,r)=>{if(await P())try{let f=await S.kernel.getDomainAPIAsync("code-intelligence");if(!f){console.log(e.red("Code intelligence domain not available"));return}let h=await import("path"),v=r.format||"text",I=parseInt(r.depth);if(isNaN(I)||I<1){console.log(e.red(`Invalid --depth value: "${r.depth}" (must be a positive integer)`));return}if(p==="index"){let a=r.incremental||!1,l=r.gitSince,s=a?"Incrementally indexing":"Indexing";console.log(e.blue(`
|
|
12
12
|
${s} codebase at ${d||"."}${l?` (since ${l})`:""}...
|
|
13
|
-
`));let n=h.resolve(d||"."),g;if(l){let{execFileSync:t}=await import("child_process");try{let
|
|
14
|
-
`).filter(
|
|
15
|
-
`));let o=await
|
|
16
|
-
`)),console.log(e.cyan(" Results:")),console.log(` Files indexed: ${e.white(t.filesIndexed)}`),console.log(` Nodes created: ${e.white(t.nodesCreated)}`),console.log(` Edges created: ${e.white(t.edgesCreated)}`),console.log(` Duration: ${e.yellow(t.duration+"ms")}`),t.
|
|
17
|
-
|
|
13
|
+
`));let n=h.resolve(d||"."),g;if(l){let{execFileSync:t}=await import("child_process");try{let m=t("git",["diff","--name-only","--diff-filter=ACMR",l,"--",n],{encoding:"utf-8",cwd:process.cwd()}).trim();g=m?m.split(`
|
|
14
|
+
`).filter(u=>A.has(h.extname(u))).map(u=>h.resolve(u)):[]}catch{console.log(e.yellow(` Warning: git diff failed for ref "${l}", falling back to full scan`)),g=x(n,{includeTests:r.includeTests||!1})}}else g=x(n,{includeTests:r.includeTests||!1});console.log(e.gray(` Found ${g.length} files to index...
|
|
15
|
+
`));let o=await f.index({paths:g,incremental:a,includeTests:r.includeTests||!1});if(o.success&&o.value){let t=o.value;if(v==="json")b(w(t),r.output);else{if(console.log(e.green(`Indexing complete
|
|
16
|
+
`)),console.log(e.cyan(" Results:")),console.log(` Files indexed: ${e.white(t.filesIndexed)}`),console.log(` Nodes created: ${e.white(t.nodesCreated)}`),console.log(` Edges created: ${e.white(t.edgesCreated)}`),console.log(` Duration: ${e.yellow(t.duration+"ms")}`),t.warnings&&t.warnings.length>0){console.log(e.yellow(`
|
|
17
|
+
Warnings (${t.warnings.length}):`));for(let m of t.warnings)console.log(e.yellow(` \u26A0 ${m}`))}if(t.errors.length>0){console.log(e.red(`
|
|
18
|
+
Errors (${t.errors.length}):`));for(let m of t.errors.slice(0,5))console.log(e.red(` ${m.file}: ${m.error}`))}}}else console.log(e.red(`Failed: ${o.error?.message||"Unknown error"}`))}else if(p==="search"){if(!d){console.log(e.red("Search query required"));return}console.log(e.blue(`
|
|
18
19
|
Searching for: "${d}"...
|
|
19
|
-
`));let a=await
|
|
20
|
+
`));let a=await f.search({query:d,type:"semantic",limit:10});if(a.success&&a.value){let l=a.value;if(v==="json")b(w(l),r.output);else{console.log(e.green(`Found ${l.total} results (${l.searchTime}ms)
|
|
20
21
|
`));for(let s of l.results){let n=s.file.replace(process.cwd()+"/","");console.log(` ${e.cyan(n)}${s.line?":"+s.line:""}`),console.log(e.gray(` ${s.snippet.slice(0,100)}...`)),console.log(e.gray(` Score: ${(s.score*100).toFixed(0)}%
|
|
21
|
-
`))}}}else console.log(e.red(`Failed: ${a.error?.message||"Unknown error"}`))}else if(
|
|
22
|
+
`))}}}else console.log(e.red(`Failed: ${a.error?.message||"Unknown error"}`))}else if(p==="impact"){console.log(e.blue(`
|
|
22
23
|
Analyzing impact for ${d||"recent changes"}...
|
|
23
|
-
`));let a=h.resolve(d||"."),l
|
|
24
|
+
`));let a=h.resolve(d||"."),l=x(a,{maxDepth:2}).slice(0,10),s=await f.analyzeImpact({changedFiles:l,depth:I,includeTests:r.includeTests||!1});if(s.success&&s.value){let n=s.value;if(v==="json")b(w(n),r.output);else{let g=n.riskLevel==="high"?e.red:n.riskLevel==="medium"?e.yellow:e.green;console.log(` Risk Level: ${g(n.riskLevel)}
|
|
24
25
|
`),console.log(e.cyan(` Direct Impact (${n.directImpact.length} files):`));for(let o of n.directImpact.slice(0,5)){let t=o.file.replace(process.cwd()+"/","");console.log(` ${e.white(t)}`),console.log(e.gray(` Reason: ${o.reason}, Risk: ${(o.riskScore*100).toFixed(0)}%`))}if(n.transitiveImpact.length>0){console.log(e.cyan(`
|
|
25
26
|
Transitive Impact (${n.transitiveImpact.length} files):`));for(let o of n.transitiveImpact.slice(0,5)){let t=o.file.replace(process.cwd()+"/","");console.log(` ${e.white(t)} (distance: ${o.distance})`)}}if(n.impactedTests.length>0){console.log(e.cyan(`
|
|
26
27
|
Impacted Tests (${n.impactedTests.length}):`));for(let o of n.impactedTests.slice(0,5))console.log(` ${e.gray(o)}`)}if(n.recommendations.length>0){console.log(e.cyan(`
|
|
27
|
-
Recommendations:`));for(let o of n.recommendations)console.log(e.gray(` - ${o}`))}}}else console.log(e.red(`Failed: ${s.error?.message||"Unknown error"}`))}else if(
|
|
28
|
+
Recommendations:`));for(let o of n.recommendations)console.log(e.gray(` - ${o}`))}}}else console.log(e.red(`Failed: ${s.error?.message||"Unknown error"}`))}else if(p==="deps"){console.log(e.blue(`
|
|
28
29
|
Mapping dependencies for ${d||"."}...
|
|
29
|
-
`));let a=h.resolve(d||"."),l
|
|
30
|
+
`));let a=h.resolve(d||"."),l=x(a,{maxDepth:2}).slice(0,50),s=await f.mapDependencies({files:l,direction:"both",depth:I});if(s.success&&s.value){let n=s.value;if(v==="json")b(w(n),r.output);else{if(console.log(e.cyan(" Dependency Metrics:")),console.log(` Nodes: ${e.white(n.metrics.totalNodes)}`),console.log(` Edges: ${e.white(n.metrics.totalEdges)}`),console.log(` Avg Degree: ${e.yellow(n.metrics.avgDegree.toFixed(2))}`),console.log(` Max Depth: ${e.yellow(n.metrics.maxDepth)}`),console.log(` Cyclomatic Complexity: ${e.yellow(n.metrics.cyclomaticComplexity)}`),n.cycles.length>0){console.log(e.red(`
|
|
30
31
|
Circular Dependencies (${n.cycles.length}):`));for(let o of n.cycles.slice(0,3))console.log(e.red(` ${o.join(" -> ")}`))}console.log(e.cyan(`
|
|
31
|
-
Top Dependencies (by connections):`));let g=[...n.nodes].sort((o,t)=>t.inDegree+t.outDegree-(o.inDegree+o.outDegree));for(let o of g.slice(0,8)){let t=o.path.replace(process.cwd()+"/","");console.log(` ${e.white(t)}`),console.log(e.gray(` In: ${o.inDegree}, Out: ${o.outDegree}, Type: ${o.type}`))}}}else console.log(e.red(`Failed: ${s.error?.message||"Unknown error"}`))}else if(
|
|
32
|
+
Top Dependencies (by connections):`));let g=[...n.nodes].sort((o,t)=>t.inDegree+t.outDegree-(o.inDegree+o.outDegree));for(let o of g.slice(0,8)){let t=o.path.replace(process.cwd()+"/","");console.log(` ${e.white(t)}`),console.log(e.gray(` In: ${o.inDegree}, Out: ${o.outDegree}, Type: ${o.type}`))}}}else console.log(e.red(`Failed: ${s.error?.message||"Unknown error"}`))}else if(p==="complexity"){console.log(e.blue(`
|
|
32
33
|
Analyzing complexity for ${d||"."}...
|
|
33
|
-
`));let a=h.resolve(d||"."),l
|
|
34
|
-
Complexity Hotspots:`));for(let c of i){let F=c.file.replace(process.cwd()+"/",""),
|
|
34
|
+
`));let a=h.resolve(d||"."),l=x(a,{includeTests:r.includeTests||!1,maxDepth:3}).slice(0,50);if(l.length===0)return console.log(e.yellow(" No source files found")),await $(0);let s=await import("fs"),n=typeof f.getSemanticAnalyzer=="function"?f.getSemanticAnalyzer():null;if(!n)return console.log(e.red("Semantic analyzer not available \u2014 ensure fleet is initialized")),await $(1);let g=8,o=[];for(let i=0;i<l.length;i+=g){let c=l.slice(i,i+g),F=await Promise.all(c.map(async y=>{try{let q=s.readFileSync(y,"utf-8"),T=await n.analyze(q);if(T.success&&T.value){let D=T.value;return{file:y,cyclomatic:D.complexity.cyclomatic,cognitive:D.complexity.cognitive,halstead:D.complexity.halstead,suggestions:D.suggestions}}}catch{}return null}));for(let y of F)y&&o.push(y)}o.sort((i,c)=>c.cyclomatic-i.cyclomatic);let t=o.reduce((i,c)=>i+c.cyclomatic,0),m=o.length>0?t/o.length:0,u=o.length>0?o[0].cyclomatic:0,k=o.reduce((i,c)=>i+c.halstead.bugs,0),C=o.filter(i=>i.cyclomatic>10).length;if(v==="json")b(w({filesAnalyzed:o.length,aggregate:{totalCyclomatic:t,avgCyclomatic:Math.round(m*100)/100,maxCyclomatic:u,estimatedBugs:Math.round(k*1e3)/1e3,highComplexityFiles:C},files:o}),r.output);else{console.log(e.cyan(" Aggregate Metrics:")),console.log(` Files analyzed: ${e.white(o.length)}`),console.log(` Avg cyclomatic: ${e.yellow(m.toFixed(2))}`),console.log(` Max cyclomatic: ${u>20?e.red(u):u>10?e.yellow(u):e.green(u)}`),console.log(` Estimated bugs: ${e.yellow(k.toFixed(3))}`),console.log(` High complexity (>10): ${C>0?e.red(C):e.green(C)}`);let i=o.filter(c=>c.cyclomatic>5).slice(0,10);if(i.length>0){console.log(e.cyan(`
|
|
35
|
+
Complexity Hotspots:`));for(let c of i){let F=c.file.replace(process.cwd()+"/",""),y=c.cyclomatic>20?e.red:c.cyclomatic>10?e.yellow:e.white;console.log(` ${e.white(F)}`),console.log(e.gray(` Cyclomatic: ${y(c.cyclomatic)} Cognitive: ${c.cognitive} Halstead bugs: ${c.halstead.bugs}`)),c.suggestions.length>0&&console.log(e.gray(` Suggestion: ${c.suggestions[0]}`))}}C===0&&console.log(e.green(`
|
|
35
36
|
All files within acceptable complexity thresholds`))}}else console.log(e.red(`
|
|
36
|
-
Unknown action: ${
|
|
37
|
-
`)),await
|
|
38
|
-
Failed:`),
|
|
37
|
+
Unknown action: ${p}`)),console.log(e.gray(` Available: index, search, impact, deps, complexity
|
|
38
|
+
`)),await $(1);console.log(""),await $(0)}catch(f){console.error(e.red(`
|
|
39
|
+
Failed:`),f),await $(1)}})}export{j as createCodeCommand};
|
package/dist/cli/chunks/{code-index-extractor-2PCISUOW.js → code-index-extractor-44HH36UG.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.10.
|
|
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.10.4");process.exit(0)}
|
|
2
|
+
import"./chunk-SVILIQQQ.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.10.
|
|
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.10.4");process.exit(0)}
|
|
2
|
+
import{b as f}from"./chunk-LOFA3U4X.js";import{a as l,c as m}from"./chunk-2B6ETC7C.js";import"./chunk-SVILIQQQ.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.10.
|
|
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.10.4");process.exit(0)}
|
|
2
|
+
import"./chunk-SVILIQQQ.js";import{Command as x}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"],P=[...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.10.
|
|
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.10.4");process.exit(0)}
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i}from"./chunk-N244P4MM.js";import"./chunk-USB7GCIC.js";import"./chunk-AIBE3J4A.js";import"./chunk-SVILIQQQ.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-ENOKRU5M.js → continuedev-installer-CYVYS5B7.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.10.
|
|
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.10.4");process.exit(0)}
|
|
2
|
+
import{b as g}from"./chunk-LOFA3U4X.js";import{a as u,c as h}from"./chunk-2B6ETC7C.js";import"./chunk-SVILIQQQ.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.10.
|
|
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.10.4");process.exit(0)}
|
|
2
|
+
import{b as g}from"./chunk-LOFA3U4X.js";import{a as p,c as v}from"./chunk-2B6ETC7C.js";import"./chunk-SVILIQQQ.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.10.
|
|
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.10.4");process.exit(0)}
|
|
2
|
+
import{a,b,c,d}from"./chunk-XDZXLEJK.js";import"./chunk-SVILIQQQ.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.10.
|
|
2
|
-
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-
|
|
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.10.4");process.exit(0)}
|
|
2
|
+
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-MU4P4P4E.js";import{a as V}from"./chunk-O3SG32PS.js";import{b as I}from"./chunk-EWI37TJA.js";import{c as P,d as W,g as G}from"./chunk-KUFC4DBX.js";import"./chunk-SVILIQQQ.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 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}fro
|
|
|
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-AX7DKGV7.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.10.4");process.exit(0)}
|
|
2
|
+
import{a,b}from"./chunk-EGTOSQZK.js";import"./chunk-MIQBRVK2.js";import"./chunk-UFKVKNAA.js";import"./chunk-PISW5HUX.js";import"./chunk-SVILIQQQ.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.10.
|
|
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.10.4");process.exit(0)}
|
|
2
|
+
import{b as g}from"./chunk-LOFA3U4X.js";import{a as u,c as m}from"./chunk-2B6ETC7C.js";import"./chunk-SVILIQQQ.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};
|
|
@@ -1,12 +1,12 @@
|
|
|
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.10.
|
|
2
|
-
import{a as u,b 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.10.4");process.exit(0)}
|
|
2
|
+
import{a as u,b as d}from"./chunk-K7K4TFJM.js";import{a as m}from"./chunk-L6VNEEN6.js";import"./chunk-SVILIQQQ.js";import{Command as h}from"commander";import e from"chalk";var t;function Q(){let n=new h("daemon").description("Manage the QE Quality Daemon").addHelpText("after",`
|
|
3
3
|
Examples:
|
|
4
4
|
aqe daemon start Start daemon in foreground
|
|
5
5
|
aqe daemon stop Stop running daemon
|
|
6
6
|
aqe daemon status Show daemon health and queue depth
|
|
7
7
|
aqe daemon notifications List recent notifications
|
|
8
8
|
aqe daemon clear-notifications Clear all notifications
|
|
9
|
-
`);return n.command("start").description("Start the QE Quality Daemon").option("--tick-interval <ms>","Tick interval in milliseconds","30000").option("--ci-interval <ms>","CI poll interval in milliseconds","300000").action(async o=>{if(t?.running){console.log(e.yellow("Daemon is already running"));let i=t.getStatus();console.log(e.gray(` Uptime: ${i.uptimeSeconds}s, Ticks: ${i.tickCount}`));return}let r={tickIntervalMs:parseInt(o.tickInterval,10),ciPollIntervalMs:parseInt(o.ciInterval,10),notifications:{urlValidator:i=>{try{let s=new URL(i).hostname.replace(/^\[|\]$/g,"");return!m(s)}catch{return!1}}}};t=new d(r);let a;try{let{UnifiedMemoryManager:i}=await import("./unified-memory-
|
|
9
|
+
`);return n.command("start").description("Start the QE Quality Daemon").option("--tick-interval <ms>","Tick interval in milliseconds","30000").option("--ci-interval <ms>","CI poll interval in milliseconds","300000").action(async o=>{if(t?.running){console.log(e.yellow("Daemon is already running"));let i=t.getStatus();console.log(e.gray(` Uptime: ${i.uptimeSeconds}s, Ticks: ${i.tickCount}`));return}let r={tickIntervalMs:parseInt(o.tickInterval,10),ciPollIntervalMs:parseInt(o.ciInterval,10),notifications:{urlValidator:i=>{try{let s=new URL(i).hostname.replace(/^\[|\]$/g,"");return!m(s)}catch{return!1}}}};t=new d(r);let a;try{let{UnifiedMemoryManager:i}=await import("./unified-memory-QG3FDRKR.js"),l=await i.getInstanceAsync();a=new u(l),console.log(e.gray(" Storage: SQLite (persistent)"))}catch{let i=new Map;a={async get(l){return i.get(l)},async set(l,s){i.set(l,s)},async search(l){let s=l.replace(/[.+?^${}()|[\]\\]/g,"\\$&"),y=new RegExp(s.replace(/\*/g,".*"));return Array.from(i.keys()).filter(f=>y.test(f))}},console.log(e.yellow(" Storage: in-memory (no SQLite available, state will not persist)"))}console.log(e.green("Starting QE Quality Daemon...")),await t.start(a),console.log(e.green("QE Quality Daemon started")),console.log(e.gray(` Tick interval: ${r.tickIntervalMs}ms`)),console.log(e.gray(` CI poll interval: ${r.ciPollIntervalMs}ms`)),console.log(e.gray(` PID: ${process.pid}`)),console.log(e.gray(`
|
|
10
10
|
Press Ctrl+C to stop`));let c=setInterval(()=>{t?.running||clearInterval(c)},5e3),g=async()=>{console.log(e.yellow(`
|
|
11
11
|
Stopping QE Quality Daemon...`)),await t?.stop(),clearInterval(c),console.log(e.green("Daemon stopped")),process.exit(0)};process.once("SIGINT",g),process.once("SIGTERM",g)}),n.command("stop").description("Stop the QE Quality Daemon").action(async()=>{if(!t?.running){console.log(e.yellow("No running daemon found"));return}await t.stop(),console.log(e.green("Daemon stopped")),t=void 0}),n.command("status").description("Show daemon health and queue status").action(()=>{if(!t){console.log(e.yellow("No daemon instance (start with: aqe daemon start)"));return}let o=t.getStatus();console.log(e.bold(`
|
|
12
12
|
QE Quality Daemon Status`)),console.log(e.gray("\u2500".repeat(40))),console.log(` Running: ${o.running?e.green("yes"):e.red("no")}`),console.log(` Uptime: ${$(o.uptimeSeconds)}`),console.log(` Ticks: ${o.tickCount}`),console.log(` Throttled: ${o.throttled?e.yellow("yes"):e.green("no")}`),console.log(e.bold(`
|