agentic-qe 3.9.30 → 3.9.32
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/skills-manifest.json +1 -1
- package/CHANGELOG.md +208 -0
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/bridge/captured-experience-bridge.js +31 -2
- package/dist/cli/bundle.js +5 -5
- package/dist/cli/chunks/adapter-CDQOF5TF.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-TOSXWTUQ.js → agent-booster-wasm-WKS3E6KT.js} +2 -2
- package/dist/cli/chunks/{agent-handler-2BU6TYZZ.js → agent-handler-LYCAWE7S.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-JFG3BXZY.js → agent-memory-branch-XF7IOMRK.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-RZK22CJB.js +2 -0
- package/dist/cli/chunks/{audit-4IGZZKUW.js → audit-D2AY3HFP.js} +2 -2
- package/dist/cli/chunks/base-UGH6TVO4.js +2 -0
- package/dist/cli/chunks/{hnswlib-node-STKRZIU3.js → better-sqlite3-K2VWFDKT.js} +2 -2
- package/dist/cli/chunks/{brain-handler-RIDW27HH.js → brain-handler-NNW4TAO2.js} +4 -4
- package/dist/cli/chunks/{branch-enumerator-GMYHLLWD.js → branch-enumerator-OM5HNZKV.js} +2 -2
- package/dist/cli/chunks/{browser-N76A3I2P.js → browser-Y2FU2NV4.js} +2 -2
- package/dist/cli/chunks/browser-workflow-SGOL3FCJ.js +2 -0
- package/dist/cli/chunks/{chunk-ETEHVG76.js → chunk-2L5GAOST.js} +2 -2
- package/dist/cli/chunks/{chunk-ECX6VXMW.js → chunk-2XC4XVCI.js} +1 -1
- package/dist/cli/chunks/{chunk-L7X3A36M.js → chunk-2Z2IQBIJ.js} +1 -1
- package/dist/cli/chunks/{chunk-UYLHIGNC.js → chunk-33PGBYTC.js} +2 -2
- package/dist/cli/chunks/{chunk-OOFWYDG6.js → chunk-3MHWBCSC.js} +1 -1
- package/dist/cli/chunks/{chunk-FI4HRS2G.js → chunk-3R4CMTWF.js} +2 -2
- package/dist/cli/chunks/{chunk-IP6ZTXNJ.js → chunk-45N22VAB.js} +2 -2
- package/dist/cli/chunks/{chunk-FG5GL26L.js → chunk-4H4PEZUX.js} +2 -2
- package/dist/cli/chunks/{chunk-CNNVL5W4.js → chunk-4VAZSCTZ.js} +2 -2
- package/dist/cli/chunks/{chunk-AWWD3EI3.js → chunk-5A6LBGRU.js} +2 -2
- package/dist/cli/chunks/{chunk-ER6BT4GS.js → chunk-5DSANX6S.js} +2 -2
- package/dist/cli/chunks/chunk-5R5WOLZM.js +5 -0
- package/dist/cli/chunks/{chunk-RNO6CE7I.js → chunk-5WR42V5O.js} +2 -2
- package/dist/cli/chunks/{chunk-UEXOMDRS.js → chunk-5XY6SULI.js} +2 -2
- package/dist/cli/chunks/{chunk-WVODEWH5.js → chunk-62UXGD5J.js} +14 -8
- package/dist/cli/chunks/{chunk-EWNJ6OAT.js → chunk-667I4RTC.js} +1 -1
- package/dist/cli/chunks/{chunk-ND6VCNN5.js → chunk-6EKXBWJD.js} +2 -2
- package/dist/cli/chunks/{chunk-Y57V4FDT.js → chunk-6R6QCGNU.js} +2 -2
- package/dist/cli/chunks/{chunk-VRP4GB4Y.js → chunk-6SYP7QX6.js} +4 -4
- package/dist/cli/chunks/{chunk-BFJLKG3D.js → chunk-6YGFAJ3X.js} +1 -1
- package/dist/cli/chunks/{chunk-UWWX4RK7.js → chunk-6ZG6TBWF.js} +4 -4
- package/dist/cli/chunks/{chunk-QSV4ROZD.js → chunk-7AISRWBS.js} +2 -2
- package/dist/cli/chunks/{chunk-SJCEPKZO.js → chunk-7IDPVSTF.js} +1 -1
- package/dist/cli/chunks/{chunk-HQIWLMDS.js → chunk-7PTW3M67.js} +2 -2
- package/dist/cli/chunks/{chunk-TA3QYAZ6.js → chunk-A4UNK5SY.js} +2 -2
- package/dist/cli/chunks/chunk-A6VI5BZU.js +95 -0
- package/dist/cli/chunks/{chunk-XVTZXCHI.js → chunk-BBPOTFIY.js} +2 -2
- package/dist/cli/chunks/{chunk-OEGFOMXP.js → chunk-BDXEL3GM.js} +2 -2
- package/dist/cli/chunks/{chunk-YETPSL6H.js → chunk-BGRC4676.js} +3 -3
- package/dist/cli/chunks/chunk-BQML7B4W.js +180 -0
- package/dist/cli/chunks/{chunk-DEDFPHJL.js → chunk-BV3SGEV7.js} +1 -1
- package/dist/cli/chunks/{chunk-FGMHVSLV.js → chunk-DBE2LIYG.js} +2 -2
- package/dist/cli/chunks/{chunk-2GBBZLXT.js → chunk-DFY7F4TE.js} +1 -1
- package/dist/cli/chunks/{chunk-LDGNVPBZ.js → chunk-EFEJLZDN.js} +1 -1
- package/dist/cli/chunks/{chunk-ZKZTSYPU.js → chunk-ESNBKAT6.js} +2 -2
- package/dist/cli/chunks/{chunk-5F26LSG2.js → chunk-EVSUZKD5.js} +2 -2
- package/dist/cli/chunks/{chunk-QOJ7EAF5.js → chunk-FFBF5BLQ.js} +1 -1
- package/dist/cli/chunks/{chunk-3AICELMQ.js → chunk-FIONYUVH.js} +2 -2
- package/dist/cli/chunks/{chunk-UROPIIB2.js → chunk-FNQCWEVJ.js} +2 -2
- package/dist/cli/chunks/{chunk-5DJAJPBG.js → chunk-FV2MU6CY.js} +2 -2
- package/dist/cli/chunks/{chunk-QTS2DS42.js → chunk-FWEYOD3S.js} +2 -2
- package/dist/cli/chunks/{chunk-XK6YXCS7.js → chunk-G6AJMFWL.js} +3 -3
- package/dist/cli/chunks/{chunk-R57J3O6I.js → chunk-G6VVOUUF.js} +2 -2
- package/dist/cli/chunks/{chunk-2O5TT3UT.js → chunk-G77CYF7H.js} +3 -3
- package/dist/cli/chunks/{chunk-TULNR2AH.js → chunk-H7YKTJMY.js} +2 -2
- package/dist/cli/chunks/{chunk-GEXVUFK4.js → chunk-HGWQC7PR.js} +2 -2
- package/dist/cli/chunks/{chunk-QLNS6DGB.js → chunk-HHBFI3YA.js} +2 -2
- package/dist/cli/chunks/{chunk-WP6X67YI.js → chunk-HPQZSXED.js} +1 -1
- package/dist/cli/chunks/{chunk-HA7N45KB.js → chunk-HR6NX6DW.js} +2 -2
- package/dist/cli/chunks/{chunk-HB52S6IV.js → chunk-I6Q6BPVH.js} +1 -1
- package/dist/cli/chunks/{chunk-BM73MJLE.js → chunk-IGEZVFOM.js} +2 -2
- package/dist/cli/chunks/{chunk-QBDXUI2H.js → chunk-IGQPGXP7.js} +2 -2
- package/dist/cli/chunks/{chunk-Q26GG6WO.js → chunk-IJQJV7BC.js} +3 -3
- package/dist/cli/chunks/chunk-JDW6GN3A.js +2 -0
- package/dist/cli/chunks/{chunk-GZ3U2QT2.js → chunk-JRYNHFZA.js} +1 -1
- package/dist/cli/chunks/{chunk-MV3NUANS.js → chunk-KHZRNJ3A.js} +1 -1
- package/dist/cli/chunks/chunk-LHDTXTS7.js +2 -0
- package/dist/cli/chunks/{chunk-52TRKIAQ.js → chunk-LI2IOJMM.js} +1 -1
- package/dist/cli/chunks/{heartbeat-scheduler-CNJBAO5C.js → chunk-LR5VW3OS.js} +2 -2
- package/dist/cli/chunks/{chunk-2NFGUFYU.js → chunk-LTSNDM5N.js} +2 -2
- package/dist/cli/chunks/{chunk-3EP2YZSY.js → chunk-M5PYPGBC.js} +2 -2
- package/dist/cli/chunks/{chunk-JCWHX4XV.js → chunk-MEHNT37H.js} +2 -2
- package/dist/cli/chunks/{chunk-QHKK2H4H.js → chunk-MERMCKPG.js} +1 -1
- package/dist/cli/chunks/{chunk-Q53UMLLC.js → chunk-MIHQIAVK.js} +2 -2
- package/dist/cli/chunks/{chunk-VOBNJWZF.js → chunk-MMVSERJQ.js} +2 -2
- package/dist/cli/chunks/{chunk-37I6K7QO.js → chunk-MQQANXFS.js} +2 -2
- package/dist/cli/chunks/{chunk-YKFURJNP.js → chunk-MTOHV22P.js} +1 -1
- package/dist/cli/chunks/{chunk-MOLOWMON.js → chunk-NVZHCAEB.js} +2 -2
- package/dist/cli/chunks/{chunk-YXR5RYRE.js → chunk-NW5FYGDE.js} +2 -2
- package/dist/cli/chunks/{chunk-NMBHF7ZD.js → chunk-NZRJWK5H.js} +61 -121
- package/dist/cli/chunks/chunk-O5NEZCTB.js +2 -0
- package/dist/cli/chunks/{chunk-E7UHOKKL.js → chunk-O5UGJ3OI.js} +2 -2
- package/dist/cli/chunks/{chunk-Q4HJRYQB.js → chunk-OK2TFTXP.js} +2 -2
- package/dist/cli/chunks/{chunk-FGDEM4HU.js → chunk-OKEHGXIS.js} +2 -2
- package/dist/cli/chunks/{chunk-C6TNYLD7.js → chunk-OKRY4LNE.js} +3 -3
- package/dist/cli/chunks/{chunk-3WIU2E2Y.js → chunk-OMOGD2NN.js} +2 -2
- package/dist/cli/chunks/{chunk-DJRWVNHK.js → chunk-ONNTJXU7.js} +2 -2
- package/dist/cli/chunks/chunk-OPOGZAN5.js +14 -0
- package/dist/cli/chunks/{chunk-OTFJCZNY.js → chunk-PG5F2VHA.js} +2 -2
- package/dist/cli/chunks/{chunk-MYF7F3ZP.js → chunk-PHRMWRXA.js} +2 -2
- package/dist/cli/chunks/{chunk-7D2DM23U.js → chunk-PIXUX2NR.js} +2 -2
- package/dist/cli/chunks/{chunk-IWC6GR24.js → chunk-PLGMPG7S.js} +2 -2
- package/dist/cli/chunks/{chunk-T2DIMSQF.js → chunk-PPS6VN24.js} +1 -1
- package/dist/cli/chunks/{chunk-AUNNGKLN.js → chunk-PQAYCK2U.js} +2 -2
- package/dist/cli/chunks/{chunk-FU74OETU.js → chunk-PS6ISBED.js} +2 -2
- package/dist/cli/chunks/{chunk-JNRRDG7O.js → chunk-QPYNQSWD.js} +2 -2
- package/dist/cli/chunks/{chunk-MHPK4ZPK.js → chunk-QRTZ67BC.js} +2 -2
- package/dist/cli/chunks/{chunk-Z3TXQOS7.js → chunk-REW3W3ZW.js} +1 -1
- package/dist/cli/chunks/{chunk-3PZDXE5E.js → chunk-RHXYZ6AZ.js} +127 -127
- package/dist/cli/chunks/{chunk-IEGAEXQX.js → chunk-RZXAXWBD.js} +2 -2
- package/dist/cli/chunks/{chunk-4UZQSPR4.js → chunk-S4M7U6CZ.js} +2 -2
- package/dist/cli/chunks/{chunk-H27XUYWZ.js → chunk-SJETAUZA.js} +1 -1
- package/dist/cli/chunks/{chunk-MZ7M2CDV.js → chunk-SLH7LFVY.js} +2 -2
- package/dist/cli/chunks/{chunk-6EP3GHED.js → chunk-SRJ5N7LD.js} +2 -2
- package/dist/cli/chunks/{chunk-XDYTQPJM.js → chunk-T5ADVYPH.js} +1 -1
- package/dist/cli/chunks/{chunk-TYZGEVP6.js → chunk-THYGFSTA.js} +12 -6
- package/dist/cli/chunks/{chunk-XKH4E2IQ.js → chunk-TX2DBLTL.js} +1 -1
- package/dist/cli/chunks/{chunk-HJDHQBMJ.js → chunk-UJMGNO6L.js} +1 -1
- package/dist/cli/chunks/{chunk-MCXRS2TZ.js → chunk-UUQ3SOKM.js} +1 -1
- package/dist/cli/chunks/{chunk-USN2JKUW.js → chunk-V5RLGPEW.js} +2 -2
- package/dist/cli/chunks/chunk-V6HM2BKJ.js +2 -0
- package/dist/cli/chunks/{chunk-R5IW5ARI.js → chunk-V7I6FTLG.js} +1 -1
- package/dist/cli/chunks/{chunk-2MKSEL6F.js → chunk-V7ZBPSVG.js} +1 -1
- package/dist/cli/chunks/{chunk-IOINZWNA.js → chunk-VJL7DNUU.js} +29 -17
- package/dist/cli/chunks/{chunk-JCDEMPJS.js → chunk-VKCWWR6C.js} +1 -1
- package/dist/cli/chunks/chunk-VKNCMGOJ.js +29 -0
- package/dist/cli/chunks/{chunk-GRPEDIYG.js → chunk-W2VTHUDK.js} +2 -2
- package/dist/cli/chunks/{chunk-SAVITYEX.js → chunk-W3JB3G7C.js} +2 -2
- package/dist/cli/chunks/{chunk-WTXRPYNN.js → chunk-WQ4MT74X.js} +1 -1
- package/dist/cli/chunks/{chunk-GY4EGQO3.js → chunk-WTNM7NA4.js} +1 -1
- package/dist/cli/chunks/chunk-XB3SIYGU.js +62 -0
- package/dist/cli/chunks/{chunk-IHRFR5SV.js → chunk-XCUNQ3FK.js} +2 -2
- package/dist/cli/chunks/{chunk-ITBPDVK5.js → chunk-XHQFVTFD.js} +1 -1
- package/dist/cli/chunks/{chunk-KJZXBZQR.js → chunk-YBUUAFKR.js} +1 -1
- package/dist/cli/chunks/{chunk-KR2PGNXX.js → chunk-YJV6TTCW.js} +2 -2
- package/dist/cli/chunks/{chunk-BQLFOJ5G.js → chunk-YUSGT2CU.js} +1 -1
- package/dist/cli/chunks/{chunk-5E3YCZC5.js → chunk-YUTSN5BK.js} +2 -2
- package/dist/cli/chunks/{chunk-DDMFTEJP.js → chunk-YVMJTBXB.js} +3 -3
- package/dist/cli/chunks/chunk-YVQ4PR4H.js +2 -0
- package/dist/cli/chunks/{chunk-RYMHYTOK.js → chunk-Z2EDNMCQ.js} +3 -3
- package/dist/cli/chunks/{chunk-QNSUPXUU.js → chunk-ZESMMAKZ.js} +2 -2
- package/dist/cli/chunks/chunk-ZIVOT3B7.js +2 -0
- package/dist/cli/chunks/{ci-BYCH3NPL.js → ci-NSF6OHB4.js} +2 -2
- package/dist/cli/chunks/{ci-output-P7P4XH6F.js → ci-output-ZPDJ42U3.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-VLX556ZI.js → circuit-breaker-Y2RUJDYG.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-JPR425PL.js → claude-flow-setup-OH6G6KM2.js} +2 -2
- package/dist/cli/chunks/client-QQGRKAY7.js +2 -0
- package/dist/cli/chunks/{cline-installer-FOY47NSH.js → cline-installer-IHH4F27G.js} +2 -2
- package/dist/cli/chunks/{code-57SN4ZDY.js → code-SFAHWFTX.js} +2 -2
- package/dist/cli/chunks/{code-index-extractor-GT7UFRYU.js → code-index-extractor-GXECMOM2.js} +2 -2
- package/dist/cli/chunks/{codex-installer-JAGWONAV.js → codex-installer-UPMSAFCQ.js} +2 -2
- package/dist/cli/chunks/{completions-7YLHPGSV.js → completions-5TX6LDHY.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-TQUF6BEI.js → complexity-analyzer-J2ZR3XZB.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-TICV6IGT.js → continuedev-installer-GWYZKB5A.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-A6PDMI52.js → copilot-installer-DQZMQWI7.js} +2 -2
- package/dist/cli/chunks/{cost-tracker-NZPNHNV2.js → cost-tracker-V7KIGCLZ.js} +2 -2
- package/dist/cli/chunks/{coverage-HBEB2LKS.js → coverage-3X6LA2GZ.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-3SHAGRVP.js +2 -0
- package/dist/cli/chunks/{cursor-installer-R4FM7MGN.js → cursor-installer-ENDG4JIU.js} +2 -2
- package/dist/cli/chunks/daemon-4XVAO7GT.js +16 -0
- package/dist/cli/chunks/daemon-TC65CQFK.js +10 -0
- package/dist/cli/chunks/{dag-attention-scheduler-2L7VCYZ3.js → dag-attention-scheduler-JOSCDRZC.js} +2 -2
- package/dist/cli/chunks/{detect-EEWB4IYE.js → detect-KWZX3OMK.js} +2 -2
- package/dist/cli/chunks/{dist-node-7RM6BB2X.js → dist-node-R4U2PJ47.js} +2 -2
- package/dist/cli/chunks/{domain-handler-RVGHBDUJ.js → domain-handler-BMYYZO2L.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-M5MERQG5.js → domain-transfer-MSDBBDLC.js} +2 -2
- package/dist/cli/chunks/dream-OCZK42FM.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-MS55QS73.js → embed-and-insert-pattern-MFINPOLS.js} +2 -2
- package/dist/cli/chunks/{eval-MBTMI7KN.js → eval-OER6UNUY.js} +2 -2
- package/dist/cli/chunks/{experience-capture-middleware-Z5XB7D6A.js → experience-capture-middleware-F5I77ECG.js} +3 -3
- package/dist/cli/chunks/{fast-paths-FSWLHI4I.js → fast-paths-P3KT5DUQ.js} +2 -2
- package/dist/cli/chunks/{feature-flags-QUPNH2J5.js → feature-flags-5EBWQ5WU.js} +2 -2
- package/dist/cli/chunks/{feature-flags-ATYOPR5D.js → feature-flags-DYFZSQLV.js} +2 -2
- package/dist/cli/chunks/{file-discovery-SOJJEQ2E.js → file-discovery-MOBVABSM.js} +2 -2
- package/dist/cli/chunks/{fleet-PWBTDWVG.js → fleet-J3R3NQNC.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-2N67VQOQ.js → gnn-wrapper-QD76SULF.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-5PSG2UPO.js → heartbeat-handler-AJEWTPZ4.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-EAVZR6TJ.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-BY4XB7FB.js +2 -0
- package/dist/cli/chunks/hnsw-index-657CZRG7.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-YIXH5T4U.js → hnsw-legacy-bridge-5VRM5N7K.js} +2 -2
- package/dist/cli/chunks/{better-sqlite3-3U2AVWQ3.js → hnswlib-node-BWUH4OQT.js} +2 -2
- package/dist/cli/chunks/hooks-7PMVKQOE.js +248 -0
- package/dist/cli/chunks/{hybrid-router-RL47S47Z.js → hybrid-router-2K2LW45J.js} +2 -2
- package/dist/cli/chunks/{hypergraph-engine-XW2IHFWW.js → hypergraph-engine-2CQ735JO.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-AQXKY4UF.js → hypergraph-handler-AQ53GVIW.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-GI6UVAMT.js +2 -0
- package/dist/cli/chunks/{init-handler-KXYGJQI5.js → init-handler-ZOVJPAWO.js} +6 -6
- package/dist/cli/chunks/init-wizard-HOH577MH.js +2 -0
- package/dist/cli/chunks/kernel-JDYBG5GE.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-VSULDGRO.js → kilocode-installer-GWQCNLKI.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-SH4D2UXW.js → kiro-installer-6KVES4MO.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-RAQOWLG3.js +2 -0
- package/dist/cli/chunks/learning-6XMNWXRT.js +117 -0
- package/dist/cli/chunks/{llm-router-YXXSQX5K.js → llm-router-GS4AZJJC.js} +4 -4
- package/dist/cli/chunks/{load-S52R2SLL.js → load-FEMEQNE6.js} +2 -2
- package/dist/cli/chunks/load-test-3MEJ43U2.js +2 -0
- package/dist/cli/chunks/{mcp-ZWMAJIU7.js → mcp-6V2H7EXU.js} +2 -2
- package/dist/cli/chunks/{memory-4YTWWDK7.js → memory-YLGPOB2H.js} +5 -5
- package/dist/cli/chunks/memory-backend-2A47ZRGO.js +2 -0
- package/dist/cli/chunks/memory-handlers-UBTBC7D2.js +2 -0
- package/dist/cli/chunks/{multi-model-executor-F3VEM2UF.js → multi-model-executor-SL2EKAH2.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-Z2CUJQ6D.js → opencode-installer-ADOJVGNA.js} +2 -2
- package/dist/cli/chunks/{orchestrator-UPXR2XOF.js → orchestrator-O4IWW2VU.js} +37 -18
- package/dist/cli/chunks/{pipeline-6MEMAIXM.js → pipeline-5BD5YQNQ.js} +2 -2
- package/dist/cli/chunks/{platform-H72FLOM7.js → platform-HXSUOOJH.js} +2 -2
- package/dist/cli/chunks/{plugin-GIMQFDVR.js → plugin-HOLH5CUH.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-DM5FR5SV.js → prime-radiant-advanced-wasm-PJTL7OLS.js} +2 -2
- package/dist/cli/chunks/protocol-executor-3FR7FBVM.js +2 -0
- package/dist/cli/chunks/{protocol-handler-YW3N333B.js → protocol-handler-K27YGLC7.js} +2 -2
- package/dist/cli/chunks/{prove-IJY524KK.js → prove-MHCLHQQ6.js} +2 -2
- package/dist/cli/chunks/{provider-manager-FNG6YR2V.js → provider-manager-3645PPXX.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-CHNYPYQW.js +2 -0
- package/dist/cli/chunks/{quality-EZLAMSCP.js → quality-NDE6EDOY.js} +2 -2
- package/dist/cli/chunks/queen-coordinator-J6ZRYTBX.js +2 -0
- package/dist/cli/chunks/{real-embeddings-MFRCC6GH.js → real-embeddings-VD3EVV3U.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-H3ZIRGWU.js → roocode-installer-63Y45UUG.js} +2 -2
- package/dist/cli/chunks/router-23HRN2Z6.js +2 -0
- package/dist/cli/chunks/routing-feedback-R6A4B6ZG.js +2 -0
- package/dist/cli/chunks/{routing-handler-T2A7FYHW.js → routing-handler-76XISU2E.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-TCLWBP2M.js → ruvector-commands-AEKOZZHZ.js} +2 -2
- package/dist/cli/chunks/{rvf-dual-writer-BE3JCPYC.js → rvf-dual-writer-4DMUIZQF.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-adapter-MLUX5YGR.js → rvf-migration-adapter-YUTXFOZ3.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-coordinator-OAQXTASZ.js → rvf-migration-coordinator-XJ5N2W37.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-QINEJZM7.js +2 -0
- package/dist/cli/chunks/safe-db-YXMCSKFH.js +2 -0
- package/dist/cli/chunks/schedule-XVFD27P5.js +2 -0
- package/dist/cli/chunks/scheduler-NWH2IDEU.js +2 -0
- package/dist/cli/chunks/{security-SHWJWJ4M.js → security-6YS6GQGO.js} +3 -3
- package/dist/cli/chunks/shared-rvf-adapter-FTZY35WI.js +2 -0
- package/dist/cli/chunks/{shared-rvf-dual-writer-BKSR2FFK.js → shared-rvf-dual-writer-MH2Y65HA.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-BR6YJF5P.js +2 -0
- package/dist/cli/chunks/{status-handler-QK5KMKYC.js → status-handler-57JQMPY5.js} +2 -2
- package/dist/cli/chunks/{structural-health-3BRNCAYQ.js → structural-health-34D5VWRD.js} +2 -2
- package/dist/cli/chunks/sync-HJD2US5P.js +2 -0
- package/dist/cli/chunks/sync-TTQ6ZB5D.js +17 -0
- package/dist/cli/chunks/{task-handler-VH2CLUIA.js → task-handler-4RF57637.js} +2 -2
- package/dist/cli/chunks/{task-handlers-BUZNV2VX.js → task-handlers-BRSK7HDE.js} +3 -3
- package/dist/cli/chunks/{test-K24JQQZ2.js → test-GMUW2VR3.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-MHXRV5VI.js → test-scheduling-7LF24IFV.js} +3 -3
- package/dist/cli/chunks/{token-bootstrap-3NZDLG52.js → token-bootstrap-VYT4RTHU.js} +2 -2
- package/dist/cli/chunks/{token-usage-C4BGA2O7.js → token-usage-NFNCPQGW.js} +2 -2
- package/dist/cli/chunks/{transformers-ZIIFB2V4.js → transformers-GGD5GIEY.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-GES2AV7A.js → tree-sitter-wasm-parser-GKYG6NKT.js} +2 -2
- package/dist/cli/chunks/{types-L3MO5VNC.js → types-WJ3ZTRD5.js} +2 -2
- package/dist/cli/chunks/unified-memory-AT3Z4CY7.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-6FOIGINN.js +2 -0
- package/dist/cli/chunks/unified-persistence-TCJB7MQS.js +2 -0
- package/dist/cli/chunks/{upgrade-EKJYS5S5.js → upgrade-IMBT4F6K.js} +2 -2
- package/dist/cli/chunks/{validate-WYWWB5PQ.js → validate-76OVF45Z.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-SBSWKJ3H.js → validate-swarm-HH2ZYWXA.js} +2 -2
- package/dist/cli/chunks/{vibium-VEMTLNFV.js → vibium-74WQNDBX.js} +2 -2
- package/dist/cli/chunks/visual-security-IBAUX2K5.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-STW2WR2J.js → web-tree-sitter-W6RGE4SL.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-6ZXMJASZ.js → windsurf-installer-7DMSFCA2.js} +2 -2
- package/dist/cli/chunks/{witness-chain-PTULB4MR.js → witness-chain-BLZ4ZKAD.js} +2 -2
- package/dist/cli/chunks/witness-chain-GNNF23XU.js +2 -0
- package/dist/cli/chunks/{workflow-TEBAAHNR.js → workflow-RNSDKRZ4.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-S2YONHGM.js +2 -0
- package/dist/cli/chunks/{wrappers-DVMVRKXK.js → wrappers-J7RXMIOY.js} +2 -2
- package/dist/cli/commands/hooks-handlers/editing-hooks.js +9 -3
- package/dist/cli/commands/hooks-handlers/hooks-dream-learning.js +16 -24
- package/dist/cli/commands/hooks-handlers/hooks-shared.d.ts +1 -1
- package/dist/cli/commands/hooks-handlers/hooks-shared.js +8 -1
- package/dist/cli/commands/hooks-handlers/routing-hooks.js +15 -3
- package/dist/cli/commands/hooks-handlers/task-hooks.js +37 -46
- package/dist/cli/commands/learning.js +194 -0
- package/dist/domains/learning-optimization/services/learning-coordinator.js +37 -17
- package/dist/init/phases/10-workers.js +20 -1
- package/dist/kernel/hybrid-backend.d.ts +17 -7
- package/dist/kernel/hybrid-backend.js +24 -10
- package/dist/kernel/interfaces.d.ts +33 -6
- package/dist/kernel/kernel.d.ts +1 -0
- package/dist/kernel/kernel.js +57 -0
- package/dist/kernel/memory-backend.d.ts +5 -5
- package/dist/kernel/memory-backend.js +14 -7
- package/dist/kernel/unified-memory-schemas.d.ts +1 -1
- package/dist/kernel/unified-memory-schemas.js +7 -1
- package/dist/learning/agent-routing.d.ts +134 -1
- package/dist/learning/agent-routing.js +185 -2
- package/dist/learning/dream/dream-insights-pruner.d.ts +49 -0
- package/dist/learning/dream/dream-insights-pruner.js +53 -0
- package/dist/learning/dream/dream-scheduler.js +17 -0
- package/dist/learning/loop-health.d.ts +84 -0
- package/dist/learning/loop-health.js +91 -0
- package/dist/learning/pattern-usage-recorder.d.ts +58 -0
- package/dist/learning/pattern-usage-recorder.js +72 -0
- package/dist/learning/qe-reasoning-bank-types.d.ts +11 -0
- package/dist/learning/qe-reasoning-bank.d.ts +11 -0
- package/dist/learning/qe-reasoning-bank.js +86 -3
- package/dist/learning/routing-topology-gate.d.ts +40 -0
- package/dist/learning/routing-topology-gate.js +55 -0
- package/dist/learning/sqlite-persistence.d.ts +6 -1
- package/dist/learning/sqlite-persistence.js +14 -20
- package/dist/mcp/bundle.js +3837 -3811
- package/dist/mcp/handlers/core-handlers.js +21 -0
- package/dist/routing/routing-feedback.js +7 -3
- package/dist/routing/routing-outcomes-migration.d.ts +31 -0
- package/dist/routing/routing-outcomes-migration.js +60 -0
- package/dist/workers/interfaces.d.ts +26 -0
- package/dist/workers/worker-manager.d.ts +15 -12
- package/dist/workers/worker-manager.js +11 -0
- package/dist/workers/workers/learning-consolidation.d.ts +28 -0
- package/dist/workers/workers/learning-consolidation.js +302 -71
- package/package.json +3 -1
- package/dist/cli/chunks/adapter-HV42JOZD.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-GL22PE2V.js +0 -2
- package/dist/cli/chunks/base-4KQ2FGUX.js +0 -2
- package/dist/cli/chunks/browser-workflow-CTE7BDM4.js +0 -2
- package/dist/cli/chunks/chunk-3NGNSKL3.js +0 -14
- package/dist/cli/chunks/chunk-6HSFZ6SL.js +0 -180
- package/dist/cli/chunks/chunk-7Z3GBQNV.js +0 -2
- package/dist/cli/chunks/chunk-AQJ6XS34.js +0 -2
- package/dist/cli/chunks/chunk-H2IMXQCJ.js +0 -2
- package/dist/cli/chunks/chunk-SPCANEJY.js +0 -95
- package/dist/cli/chunks/client-FRVNMXQO.js +0 -2
- package/dist/cli/chunks/cross-domain-router-BVCPAWG2.js +0 -2
- package/dist/cli/chunks/daemon-PHIZPZIE.js +0 -19
- package/dist/cli/chunks/dream-77ODIFIF.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-CQGQS3V7.js +0 -2
- package/dist/cli/chunks/hnsw-index-2ACF6FOJ.js +0 -2
- package/dist/cli/chunks/hooks-YROFO6PE.js +0 -259
- package/dist/cli/chunks/impact-analyzer-LWEGK23B.js +0 -2
- package/dist/cli/chunks/init-wizard-7BS3QMWR.js +0 -2
- package/dist/cli/chunks/kernel-TX67WXSI.js +0 -2
- package/dist/cli/chunks/knowledge-graph-TDSP2UE2.js +0 -2
- package/dist/cli/chunks/learning-RRWV3SEL.js +0 -107
- package/dist/cli/chunks/load-test-GEBBBUMV.js +0 -2
- package/dist/cli/chunks/memory-backend-WQS2MLW2.js +0 -2
- package/dist/cli/chunks/memory-handlers-RTY5MBA5.js +0 -2
- package/dist/cli/chunks/protocol-executor-DT7XHMLL.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-LDNETZVA.js +0 -2
- package/dist/cli/chunks/queen-coordinator-AF7HCQSM.js +0 -2
- package/dist/cli/chunks/router-OWQ5EI72.js +0 -2
- package/dist/cli/chunks/routing-feedback-B43DEQMK.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-XBJDXHNI.js +0 -2
- package/dist/cli/chunks/safe-db-RT3LEDUG.js +0 -2
- package/dist/cli/chunks/schedule-EHUDCKS2.js +0 -2
- package/dist/cli/chunks/scheduler-GEGZ4J3C.js +0 -2
- package/dist/cli/chunks/shared-rvf-adapter-LNBUNRAM.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-3DGRJH3K.js +0 -2
- package/dist/cli/chunks/sync-5CDYOT3H.js +0 -23
- package/dist/cli/chunks/unified-memory-ZSBX4LYU.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-Y6EKAMRP.js +0 -2
- package/dist/cli/chunks/unified-persistence-2PDVU2U5.js +0 -2
- package/dist/cli/chunks/visual-security-RHMFLKVQ.js +0 -2
- package/dist/cli/chunks/witness-chain-QO237QOF.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-RHM5MIGE.js +0 -2
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a as Ie}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.32");process.exit(0)}
|
|
2
|
+
import{a as Ie}from"./chunk-HHBFI3YA.js";import{c as De}from"./chunk-W3JB3G7C.js";import{a as ne,b as ue,c as we,d as Ce,e as Pe,f as Se,g as Ee,h as Re,i as xe,j as _e,k as $e}from"./chunk-O5UGJ3OI.js";import"./chunk-3MHWBCSC.js";import{a as Ae}from"./chunk-REW3W3ZW.js";import"./chunk-UJMGNO6L.js";import"./chunk-G6AJMFWL.js";import"./chunk-THYGFSTA.js";import"./chunk-ONNTJXU7.js";import{b as x,d as te}from"./chunk-OK2TFTXP.js";import"./chunk-YVQ4PR4H.js";import"./chunk-OMOGD2NN.js";import{a as S,b as ke,c as ee}from"./chunk-5WR42V5O.js";import"./chunk-JDW6GN3A.js";import{a as _,b as de}from"./chunk-4VAZSCTZ.js";import"./chunk-H7YKTJMY.js";import"./chunk-PIXUX2NR.js";import"./chunk-MQQANXFS.js";import"./chunk-BBPOTFIY.js";import"./chunk-YJV6TTCW.js";import"./chunk-HGWQC7PR.js";import"./chunk-ZESMMAKZ.js";import"./chunk-33PGBYTC.js";import{a as ce}from"./chunk-XHQFVTFD.js";ee();ee();var y=class{requiresPhases;requiresEnhancements;async shouldRun(e){return!0}async execute(e){let t=Date.now();try{return{success:!0,data:await this.run(e),durationMs:Date.now()-t,message:`${this.description} completed`}}catch(s){return{success:!1,error:ke(s),durationMs:Date.now()-t,message:`${this.description} failed: ${S(s)}`}}}checkDependencies(e){if(!this.requiresPhases?.length)return!0;for(let t of this.requiresPhases)if(!e.results.get(t)?.success)return e.services.warn(`Phase ${this.name} requires ${t} which has not completed`),!1;return!0}checkEnhancements(e){if(!this.requiresEnhancements?.length)return!0;for(let t of this.requiresEnhancements)if(!(t==="claudeFlow"?e.enhancements.claudeFlow:t==="ruvector"?e.enhancements.ruvector:!1))return e.services.warn(`Phase ${this.name} requires ${t} which is not available`),!1;return!0}};te();de();import{existsSync as j}from"fs";import{join as T}from"path";var N=class extends y{name="detection";description="Detect existing installations";order=10;critical=!0;async run(e){let{projectRoot:t}=e,s=await this.detectV2Installation(t),n=j(T(t,".agentic-qe","config.yaml")),o=s.version?.startsWith("3."),r=s.detected,i=n||o||!1,c=!r&&!i;return e.v2Detection=s,{v2Detected:r,v3Detected:i,freshInstall:c,v2Detection:s}}async detectV2Installation(e){let t=T(e,".agentic-qe","memory.db"),s=T(e,".agentic-qe","config"),n=T(e,".claude","agents"),o=T(e,".agentic-qe","config","learning.json"),r=j(t),i=j(s),c=j(n),d=j(o),u=j(T(e,".agentic-qe","config.yaml")),m,p=!1;return r&&(m=this.readVersionFromDb(t),m?p=m.startsWith("3."):m="2.x.x"),{detected:!p&&r&&(!m?.startsWith("3.")||d&&!u),memoryDbPath:r?t:void 0,configPath:i?s:void 0,agentsPath:c?n:void 0,hasMemoryDb:r,hasConfig:i,hasAgents:c,version:m}}readVersionFromDb(e){try{let t=_(e,{readonly:!0,fileMustExist:!0});try{if(!t.prepare(`
|
|
3
3
|
SELECT name FROM sqlite_master
|
|
4
4
|
WHERE type='table' AND name='kv_store'
|
|
5
5
|
`).get()){t.close();return}let n=t.prepare(`
|
|
6
6
|
SELECT value FROM kv_store
|
|
7
7
|
WHERE key = 'aqe_version' AND namespace = '_system'
|
|
8
|
-
`).get();return t.close(),n?x(n.value):void 0}catch{t.close();return}}catch{return}}};var Q=class extends y{name="analysis";description="Analyze project structure";order=20;critical=!0;requiresPhases=["detection"];async run(e){let s=await
|
|
8
|
+
`).get();return t.close(),n?x(n.value):void 0}catch{t.close();return}}catch{return}}};var Q=class extends y{name="analysis";description="Analyze project structure";order=20;critical=!0;requiresPhases=["detection"];async run(e){let s=await we(e.projectRoot).analyze();return e.analysis=s,e.services.log(` Project: ${s.projectName}`),e.services.log(` Languages: ${s.languages.map(n=>n.name).join(", ")}`),e.services.log(` Frameworks: ${s.frameworks.map(n=>n.name).join(", ")}`),s}};var L=class extends y{name="configuration";description="Generate configuration";order=30;critical=!0;requiresPhases=["analysis"];async run(e){if(!e.analysis)throw new Error("Analysis phase must complete before configuration");let s=Ce({minimal:e.options.minimal}).recommend(e.analysis);return s=this.applyOptions(s,e),e.config=s,e.services.log(` Version: ${s.version}`),e.services.log(` Learning: ${s.learning.enabled?"enabled":"disabled"}`),e.services.log(` Workers: ${s.workers.enabled.length}`),s}applyOptions(e,t){let{options:s}=t;return s.minimal&&(e.skills.install=!1,e.learning.pretrainedPatterns=!1,e.workers.enabled=[],e.workers.daemonAutoStart=!1),s.skipPatterns&&(e.learning.pretrainedPatterns=!1),s.wizardAnswers&&(e=this.applyWizardAnswers(e,s.wizardAnswers)),e}applyWizardAnswers(e,t){switch(t["project-type"]&&t["project-type"]!=="auto"&&(e.project.type=t["project-type"]),t["learning-mode"]){case"full":e.learning.enabled=!0,e.learning.embeddingModel="transformer";break;case"basic":e.learning.enabled=!0,e.learning.embeddingModel="hash";break;case"disabled":e.learning.enabled=!1;break}return t["load-patterns"]===!1&&(e.learning.pretrainedPatterns=!1),t.hooks===!1&&(e.hooks.claudeCode=!1),t.workers===!1&&(e.workers.daemonAutoStart=!1),t.skills===!1&&(e.skills.install=!1),e}};import{existsSync as B,mkdirSync as pe}from"fs";import{join as V}from"path";var H=class extends y{name="database";description="Initialize persistence database";order=40;critical=!0;requiresPhases=["configuration"];async run(e){let{projectRoot:t}=e,s=V(t,"vectors.db");B(s)&&e.services.log(` \u26A0 Stale vectors.db detected at ${s}
|
|
9
9
|
This file is left over from @ruvector/router (pre-v3.9.6).
|
|
10
10
|
It is no longer read or written by AQE. Safe to delete:
|
|
11
|
-
rm "${s}"`);let n=
|
|
11
|
+
rm "${s}"`);let n=V(t,".agentic-qe");B(n)||pe(n,{recursive:!0});let o=V(n,"workers");B(o)||pe(o,{recursive:!0});let r=V(n,"data");B(r)||pe(r,{recursive:!0});let i=V(n,"memory.db"),c=!B(i);try{let{initializeUnifiedMemory:d,resetUnifiedMemory:u}=await import("./unified-memory-AT3Z4CY7.js"),m=await d({dbPath:i,walMode:!0,busyTimeout:5e3}),h=m.getStats().tables.map(A=>A.name);await m.kvSet("_init_marker",{initialized:new Date().toISOString(),projectRoot:t,version:ne()},"_system");let k=m.getDatabase().prepare("SELECT version FROM schema_version WHERE id = 1").get()?.version??0;return u(),e.services.log(` Database: ${i}`),e.services.log(` Schema version: v${k}`),e.services.log(` Tables: ${h.length} (v3 full schema)`),{dbPath:i,created:c,tablesCreated:h,schemaVersion:k}}catch(d){throw new Error(`SQLite persistence initialization FAILED: ${d}
|
|
12
12
|
Database path: ${i}
|
|
13
|
-
Ensure the directory is writable and has sufficient disk space.`)}}};import{existsSync as se,mkdirSync as me,writeFileSync as
|
|
13
|
+
Ensure the directory is writable and has sufficient disk space.`)}}};import{existsSync as se,mkdirSync as me,writeFileSync as qe}from"fs";import{join as $}from"path";var W=class extends y{name="learning";description="Initialize learning system";order=50;critical=!1;requiresPhases=["database","configuration"];async shouldRun(e){return e.config?.learning?.enabled??!0}async run(e){let t=e.config,{projectRoot:s,options:n}=e;if(!t.learning.enabled)return{enabled:!1,dataDir:"",hnswDir:"",patternsLoaded:0};let o=$(s,".agentic-qe","data");se(o)||me(o,{recursive:!0});let r=$(o,"hnsw");se(r)||me(r,{recursive:!0});let i=$(o,"learning-config.json"),c={embeddingModel:t.learning.embeddingModel,hnswConfig:t.learning.hnswConfig,qualityThreshold:t.learning.qualityThreshold,promotionThreshold:t.learning.promotionThreshold,databasePath:$(o,"memory.db"),hnswIndexPath:$(r,"index.bin"),initialized:new Date().toISOString()};qe(i,JSON.stringify(c,null,2),"utf-8");let d=0;return t.learning.pretrainedPatterns&&!n.skipPatterns&&(d=await this.loadPretrainedPatterns(o,e)),e.services.log(` Data dir: ${o}`),e.services.log(` HNSW dir: ${r}`),e.services.log(` Patterns loaded: ${d}`),{enabled:!0,dataDir:o,hnswDir:r,patternsLoaded:d}}async loadPretrainedPatterns(e,t){try{let s=$(e,"patterns");se(s)||me(s,{recursive:!0});let n=$(s,"index.json");return se(n)||qe(n,JSON.stringify({version:ne(),domains:[],loadedAt:new Date().toISOString()},null,2),"utf-8"),0}catch(s){return t.services.warn(`Could not load pre-trained patterns: ${s}`),0}}};te();de();import{existsSync as Je,statSync as Xe}from"fs";import{join as re}from"path";var je=3e4,Te=18e4,Me=["**/node_modules/**","**/dist/**","**/build/**","**/out/**","**/coverage/**","**/.agentic-qe/**","**/.git/**","**/.next/**","**/.nuxt/**","**/.output/**","**/__pycache__/**","**/.pytest_cache/**","**/target/**","**/vendor/**","**/.venv/**","**/venv/**","**/.tox/**","**/*.min.js","**/*.min.css","**/*.bundle.js","**/*.map","**/package-lock.json","**/yarn.lock","**/pnpm-lock.yaml","**/Pipfile.lock","**/poetry.lock","**/.env","**/.env.*"],U=class extends y{name="code-intelligence";description="Code intelligence pre-scan";order=60;critical=!1;requiresPhases=["database"];async shouldRun(e){let t=process.env.AQE_SKIP_CODE_INDEX;return t==="1"||t==="true"?(e.services.log(" Code intelligence skipped (AQE_SKIP_CODE_INDEX=1)"),e.services.log(" Run `aqe code index` later to build the KG on demand."),!1):e.options.skipCodeIndex?(e.services.log(" Code intelligence skipped (--skip-code-index)"),e.services.log(" Run `aqe code index` later to build the KG on demand."),!1):!0}async run(e){let{projectRoot:t}=e,s=re(t,".agentic-qe","memory.db");if(!Je(s))return e.services.log(" Building knowledge graph..."),await this.runCodeIntelligenceScan(t,e,!1);let n=_(s);try{if(!this.checkCodeIntelligenceIndex(n))return n.close(),e.services.log(" Building knowledge graph..."),await this.runCodeIntelligenceScan(t,e,!1);let r=this.getLastIndexedAt(n);if(!r){let d=this.getKGEntryCount(n);return n.close(),e.services.log(` Using existing index (${d} entries)`),{status:"existing",entries:d}}let i=this.getKGEntryCount(n);n.close();let c=await this.findChangedFiles(t,r);return c.length===0?(e.services.log(` Index up to date (${i} entries)`),{status:"existing",entries:i}):(e.services.log(` Delta scan: ${c.length} files changed since last index...`),await this.runCodeIntelligenceScan(t,e,!0,c))}catch(o){try{n.close()}catch{}throw o}}checkCodeIntelligenceIndex(e){try{return e.prepare(`
|
|
14
14
|
SELECT COUNT(*) as count FROM kv_store
|
|
15
15
|
WHERE namespace = 'code-intelligence:kg'
|
|
16
16
|
`).get().count>0}catch{return!1}}getKGEntryCount(e){try{return e.prepare(`
|
|
17
17
|
SELECT COUNT(*) as count FROM kv_store
|
|
18
18
|
WHERE namespace LIKE 'code-intelligence:kg%'
|
|
19
|
-
`).get().count}catch{return 0}}async runCodeIntelligenceScan(e,t,s,n){let{KnowledgeGraphService:o}=await import("./knowledge-graph-
|
|
19
|
+
`).get().count}catch{return 0}}async runCodeIntelligenceScan(e,t,s,n){let{KnowledgeGraphService:o}=await import("./knowledge-graph-RAQOWLG3.js"),r=re(e,".agentic-qe","memory.db"),i={type:"sqlite",sqlite:{path:r,walMode:!0}},{backend:c}=await Ie(i,!0),d=new o(c,{namespace:"code-intelligence:kg",enableVectorEmbeddings:!0});try{let u;n?u=n:u=(await(await import("fast-glob")).default(["**/*.ts","**/*.tsx","**/*.js","**/*.jsx","**/*.py"],{cwd:e,ignore:Me})).map(f=>re(e,f)),t.services.log(` Scanning ${u.length} source files...`);let m=await this.runBoundedScan(d,u,s,t);if(m.status==="timeout")return t.services.warn(` \u26A0 Code intelligence pre-scan exceeded ${Te/1e3}s phase cap. Indexed ${m.entries} entries before timeout. Last file: ${m.timeoutFile??"(unknown)"}. Init is continuing \u2014 re-run 'aqe code index' later, or report this file to https://github.com/proffesor-for-testing/agentic-qe/issues.`),m;if(m.status==="indexed"){let p=s?"Delta indexed":"Indexed";t.services.log(` ${p} ${m.entries} entries to ${r}`),await this.buildHypergraph(r,u,t)}return m}finally{try{d.destroy()}catch{}try{await c.dispose()}catch{}}}async runBoundedScan(e,t,s,n){let o=0,r=0,i=0,c="",d=Date.now(),u=!1;s||await e.clear();let m=n.projectRoot,p=f=>f.startsWith(m)?f.slice(m.length+1):f;for(let f of t){if(Date.now()-d>Te){u=!0;break}c=f,n.services.log(` [${i+1}/${t.length}] ${p(f)}`);try{let v=await this.withTimeout(e.index({paths:[f],incremental:!0,includeTests:!0}),je,f);v.success&&(o+=v.value.nodesCreated,r+=v.value.edgesCreated)}catch(v){let k=v instanceof Error?v.message:String(v);k.startsWith("AQE_PER_FILE_TIMEOUT")?n.services.warn(` \u26A0 Skipped ${p(f)} \u2014 indexing exceeded ${je/1e3}s`):n.services.warn(` \u26A0 Failed to index ${p(f)}: ${k}`)}i++}let h=o+r;return u?{status:"timeout",entries:h,timeoutFile:c}:{status:"indexed",entries:h}}withTimeout(e,t,s){return new Promise((n,o)=>{let r=setTimeout(()=>{o(new Error(`AQE_PER_FILE_TIMEOUT: ${s}`))},t);typeof r.unref=="function"&&r.unref(),e.then(i=>{clearTimeout(r),n(i)},i=>{clearTimeout(r),o(i)})})}async buildHypergraph(e,t,s){try{let{extractCodeIndex:n}=await import("./code-index-extractor-GXECMOM2.js"),{createHypergraphEngine:o}=await import("./hypergraph-engine-2CQ735JO.js"),r=_(e),i=await o({db:r,maxTraversalDepth:10,maxQueryResults:1e3,enableVectorSearch:!1}),c=await n(t),d=await i.buildFromIndexResult(c);r.close(),d.nodesCreated+d.edgesCreated>0&&s.services.log(` Hypergraph: ${d.nodesCreated} nodes, ${d.edgesCreated} edges`)}catch(n){s.services.warn?.(` Hypergraph build skipped: ${n}`)}}getLastIndexedAt(e){try{let t=e.prepare(`
|
|
20
20
|
SELECT value FROM kv_store
|
|
21
21
|
WHERE namespace = 'code-intelligence:kg'
|
|
22
22
|
AND key = 'metadata:index'
|
|
23
|
-
`).get();if(!t)return null;let s=x(t.value);if(!s.indexedAt)return null;let n=new Date(s.indexedAt);return isNaN(n.getTime())?null:n}catch{return null}}async findChangedFiles(e,t){let n=await(await import("fast-glob")).default(["**/*.ts","**/*.tsx","**/*.js","**/*.jsx","**/*.py"],{cwd:e,ignore:Me}),o=t.getTime(),r=[];for(let i of n){let c=re(e,i);try{Xe(c).mtimeMs>o&&r.push(c)}catch{}}return r}};te();import{existsSync as P,mkdirSync as oe,readFileSync as Oe,writeFileSync as M}from"fs";import{join as
|
|
24
|
-
`);M(s,n,"utf-8")}installHookAssets(e,t){let{projectRoot:s}=t;this.installBrainCheckpoint(s,t),this.installStatusline(s,t);let n=
|
|
25
|
-
`),"utf-8")}let o=
|
|
23
|
+
`).get();if(!t)return null;let s=x(t.value);if(!s.indexedAt)return null;let n=new Date(s.indexedAt);return isNaN(n.getTime())?null:n}catch{return null}}async findChangedFiles(e,t){let n=await(await import("fast-glob")).default(["**/*.ts","**/*.tsx","**/*.js","**/*.jsx","**/*.py"],{cwd:e,ignore:Me}),o=t.getTime(),r=[];for(let i of n){let c=re(e,i);try{Xe(c).mtimeMs>o&&r.push(c)}catch{}}return r}};te();import{existsSync as P,mkdirSync as oe,readFileSync as Oe,writeFileSync as M}from"fs";import{join as w,dirname as Ze}from"path";import{fileURLToPath as et}from"url";var tt=et(import.meta.url),kn=Ze(tt),G=class extends y{name="hooks";description="Configure Claude Code hooks";order=70;critical=!1;requiresPhases=["configuration"];async shouldRun(e){return e.config?.hooks?.claudeCode??!0}async run(e){let t=e.config,{projectRoot:s}=e;if(!t.hooks.claudeCode)return{configured:!1,settingsPath:"",hookTypes:[],existingAqeDetected:!1};let n=w(s,".claude");P(n)||oe(n,{recursive:!0});let o=w(n,"hooks");P(o)||oe(o,{recursive:!0});let r=w(n,"settings.json"),i={};if(P(r))try{let v=Oe(r,"utf-8");i=x(v)}catch{i={}}let c=this.generateHooksConfig(t,s),d=Object.keys(c),u=i.hooks||{},m=this.hasExistingAqeHooks(u);m&&e.services.log(" Detected existing AQE hooks \u2014 replacing with updated config"),i.hooks=Se(u,c);let p=i.env||{};i.env={...p,...Ee(t)};let h=Re(t,s);for(let[v,k]of Object.entries(h))if(v==="_aqePermissions"){let A=i.permissions||{},le=A.allow||[],I=k,g=[...new Set([...le,...I])];i.permissions={...A,allow:g}}else i[v]=k;let f=i.enabledMcpjsonServers||[];f=f.filter(v=>v!=="aqe"),f.includes("agentic-qe")||f.push("agentic-qe"),i.enabledMcpjsonServers=f,M(r,JSON.stringify(i,null,2),"utf-8"),this.writeHooksReadme(o,d),this.installHookAssets(o,e);try{let v=Oe(r,"utf-8"),A=x(v).hooks;(!A||!this.hasExistingAqeHooks(A))&&e.services.log(" WARNING: settings.json written but AQE hooks not detected \u2014 check settings-merge logic")}catch{e.services.log(" WARNING: Could not verify settings.json after write")}return e.services.log(` Settings: ${r}`),e.services.log(` Hooks dir: ${o}`),e.services.log(` Hook types: ${d.join(", ")}`),{configured:!0,settingsPath:r,hookTypes:d,existingAqeDetected:m}}writeHooksReadme(e,t){let s=w(e,"README.txt");if(P(s))return;let n=["AQE Hooks Directory","====================","","Claude Code hooks are configured in .claude/settings.json (not as files here).","This directory contains supporting infrastructure for the learning system.","","Configured hook types: "+t.join(", "),"","Files:"," settings.json \u2014 Hook definitions (in parent .claude/ directory)"," helpers/brain-checkpoint.cjs \u2014 Auto-exports brain to aqe.rvf on session end"," cross-phase-memory.yaml \u2014 QCSD feedback loop configuration","","Manual testing:"," npx agentic-qe hooks session-start --session-id test --json",' npx agentic-qe hooks route --task "generate tests" --json'," npx agentic-qe hooks post-edit --file src/example.ts --success --json",""].join(`
|
|
24
|
+
`);M(s,n,"utf-8")}installHookAssets(e,t){let{projectRoot:s}=t;this.installBrainCheckpoint(s,t),this.installStatusline(s,t);let n=w(e,"cross-phase-memory.yaml");if(!P(n)){let r=[w(s,"v3","assets","hooks","cross-phase-memory.yaml"),w(s,"assets","hooks","cross-phase-memory.yaml"),w(s,"node_modules","agentic-qe","v3","assets","hooks","cross-phase-memory.yaml")],i=!1;for(let c of r)if(P(c)){let{copyFileSync:d}=ce("fs");d(c,n),t.services.log(" Installed cross-phase memory config"),i=!0;break}i||M(n,["# Cross-Phase Memory Hooks Configuration","# Generated by aqe init",'version: "1.0"',"enabled: true",""].join(`
|
|
25
|
+
`),"utf-8")}let o=w(e,"v3-domain-workers.json");P(o)||M(o,JSON.stringify({version:"3.0",workers:[{name:"pattern-consolidator",interval:"5m",enabled:!0},{name:"routing-accuracy-monitor",interval:"10m",enabled:!0},{name:"coverage-gap-scanner",interval:"15m",enabled:!0},{name:"flaky-test-detector",interval:"30m",enabled:!0}]},null,2),"utf-8")}hasExistingAqeHooks(e){for(let t of Object.values(e))if(Array.isArray(t)){for(let s of t)if(Pe(s))return!0}return!1}installBrainCheckpoint(e,t){let s=w(e,".claude","helpers");P(s)||oe(s,{recursive:!0});let n=w(s,"brain-checkpoint.cjs"),o=[w(e,".claude","helpers","brain-checkpoint.cjs"),w(e,"node_modules","agentic-qe",".claude","helpers","brain-checkpoint.cjs")];for(let r of o)if(P(r)&&r!==n){let{copyFileSync:i}=ce("fs");i(r,n),t.services.log(" Installed brain-checkpoint.cjs (copied)");return}P(n)||(M(n,this.generateBrainCheckpointScript(),"utf-8"),t.services.log(" Installed brain-checkpoint.cjs (generated)"))}installStatusline(e,t){let s=w(e,".claude","helpers");P(s)||oe(s,{recursive:!0});let n=w(s,"statusline-v3.cjs"),o=[w(e,"node_modules","agentic-qe","assets","helpers","statusline-v3.cjs"),w(e,"assets","helpers","statusline-v3.cjs")];for(let r of o)if(P(r)&&r!==n){let{copyFileSync:i}=ce("fs");i(r,n),t.services.log(" Installed statusline-v3.cjs (copied)");return}P(n)||(M(n,this.generateMinimalStatuslineScript(),"utf-8"),t.services.log(" Installed statusline-v3.cjs (generated)"))}generateMinimalStatuslineScript(){return`#!/usr/bin/env node
|
|
26
26
|
/**
|
|
27
27
|
* Agentic QE v3 Statusline (minimal fallback, generated by aqe init)
|
|
28
28
|
* For the full statusline, reinstall: npx agentic-qe init --auto
|
|
@@ -107,10 +107,10 @@ function verifyBrain() {
|
|
|
107
107
|
const cmd = process.argv[2] || 'verify';
|
|
108
108
|
const result = cmd === 'export' ? exportBrain() : verifyBrain();
|
|
109
109
|
if (process.argv.includes('--json')) process.stdout.write(JSON.stringify(result));
|
|
110
|
-
`}generateHooksConfig(e,t){return{PreToolUse:[{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'npx agentic-qe hooks guard --file "$TOOL_INPUT_file_path" --json',timeout:3e3,continueOnError:!0}]},{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'npx agentic-qe hooks pre-edit --file "$TOOL_INPUT_file_path" --json',timeout:5e3,continueOnError:!0}]},{matcher:"^Bash$",hooks:[{type:"command",command:'npx agentic-qe hooks pre-command --command "$TOOL_INPUT_command" --json',timeout:3e3,continueOnError:!0}]},{matcher:"^(Task|Agent)$",hooks:[{type:"command",command:'npx agentic-qe hooks pre-task --description "$TOOL_INPUT_prompt" --json',timeout:5e3,continueOnError:!0}]}],PostToolUse:[{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'npx agentic-qe hooks post-edit --file "$TOOL_INPUT_file_path" --success --json',timeout:5e3,continueOnError:!0}]},{matcher:"^Bash$",hooks:[{type:"command",command:'npx agentic-qe hooks post-command --command "$TOOL_INPUT_command" --success --json',timeout:5e3,continueOnError:!0}]},{matcher:"^(Task|Agent)$",hooks:[{type:"command",command:'npx agentic-qe hooks post-task --task-id "$TOOL_RESULT_agent_id" --success --json',timeout:5e3,continueOnError:!0}]}],UserPromptSubmit:[{hooks:[{type:"command",command:"npx agentic-qe hooks route --json",timeout:5e3,continueOnError:!0}]}],SessionStart:[{hooks:[{type:"command",command:'npx agentic-qe hooks session-start --session-id "$SESSION_ID" --json',timeout:1e4,continueOnError:!0}]},{hooks:[{type:"command",command:`sh -c 'exec node "\${CLAUDE_PROJECT_DIR:-.}/.claude/helpers/brain-checkpoint.cjs" verify --json'`,timeout:5e3,continueOnError:!0}]}],Stop:[{hooks:[{type:"command",command:"npx agentic-qe hooks session-end --save-state --json",timeout:5e3,continueOnError:!0}]},{hooks:[{type:"command",command:"npx agentic-qe hooks post-route --success true --json",timeout:5e3,continueOnError:!0}]},{hooks:[{type:"command",command:`sh -c 'exec node "\${CLAUDE_PROJECT_DIR:-.}/.claude/helpers/brain-checkpoint.cjs" export --json'`,timeout:6e4,continueOnError:!0}]}]}}};te();import{existsSync as nt,readFileSync as st,writeFileSync as rt}from"fs";import{join as ot}from"path";var z=class extends y{name="mcp";description="Configure MCP server";order=80;critical=!1;requiresPhases=["configuration","database"];async run(e){let{projectRoot:t}=e;if(e.options.noMcp)return e.services.log(" MCP: skipped (--no-mcp)"),e.services.log(" CLI commands available: aqe memory, aqe test, aqe coverage, etc."),{configured:!1,mcpPath:"",serverName:""};let s={command:"aqe-mcp",args:[],env:{AQE_LEARNING_ENABLED:"true",AQE_WORKERS_ENABLED:"true",NODE_ENV:"production"}},n=ot(t,".mcp.json"),o={};if(nt(n))try{let i=st(n,"utf-8");o=x(i)}catch{o={}}o.mcpServers||(o.mcpServers={});let r=o.mcpServers;return r["agentic-qe"]=s,rt(n,JSON.stringify(o,null,2),"utf-8"),e.services.log(` MCP config: ${n}`),e.services.log(" Server: agentic-qe"),e.services.log(" Learning: enabled"),e.services.log(" Workers: enabled"),{configured:!0,mcpPath:n,serverName:"agentic-qe"}}};import{existsSync as E,readFileSync as lt,readdirSync as ct}from"fs";import{join as R}from"path";ee();import{spawnSync as it}from"node:child_process";import*as ie from"node:os";import*as Qe from"node:fs";var fe="vibium@^26.3.18",Le={platform:()=>ie.platform(),arch:()=>ie.arch(),existsSync:l=>Qe.existsSync(l)},Fe=["/usr/bin/chromium","/usr/bin/chromium-browser","/usr/bin/google-chrome","/usr/bin/google-chrome-stable","/snap/bin/chromium"];function at(l=Le){if(l.platform()!=="linux"||l.arch()!=="arm64")return;let e=Fe.find(t=>l.existsSync(t));return e?{code:"linux-arm64-system-chromium-found",browserPath:e,message:`Linux aarch64 detected. Vibium v26.3.x does not auto-download Chrome for Testing on ARM64. Found system browser at ${e}. Export VIBIUM_BROWSER_PATH=${e} before running vibium.`}:{code:"linux-arm64-no-system-chromium",message:`Linux aarch64 detected. Vibium v26.3.x does not auto-download Chrome for Testing on ARM64, and no system chromium was found on PATH (checked: ${Fe.join(", ")}). Install via \`apt-get install chromium\` (or your distro's equivalent), then export VIBIUM_BROWSER_PATH=/usr/bin/chromium before running vibium.`}}function ge(l,e,t,s){return l(e,t,{encoding:"utf8",timeout:s,maxBuffer:8*1024*1024})}var
|
|
110
|
+
`}generateHooksConfig(e,t){return{PreToolUse:[{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'npx agentic-qe hooks guard --file "$TOOL_INPUT_file_path" --json',timeout:3e3,continueOnError:!0}]},{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'npx agentic-qe hooks pre-edit --file "$TOOL_INPUT_file_path" --json',timeout:5e3,continueOnError:!0}]},{matcher:"^Bash$",hooks:[{type:"command",command:'npx agentic-qe hooks pre-command --command "$TOOL_INPUT_command" --json',timeout:3e3,continueOnError:!0}]},{matcher:"^(Task|Agent)$",hooks:[{type:"command",command:'npx agentic-qe hooks pre-task --description "$TOOL_INPUT_prompt" --json',timeout:5e3,continueOnError:!0}]}],PostToolUse:[{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'npx agentic-qe hooks post-edit --file "$TOOL_INPUT_file_path" --success --json',timeout:5e3,continueOnError:!0}]},{matcher:"^Bash$",hooks:[{type:"command",command:'npx agentic-qe hooks post-command --command "$TOOL_INPUT_command" --success --json',timeout:5e3,continueOnError:!0}]},{matcher:"^(Task|Agent)$",hooks:[{type:"command",command:'npx agentic-qe hooks post-task --task-id "$TOOL_RESULT_agent_id" --success --json',timeout:5e3,continueOnError:!0}]}],UserPromptSubmit:[{hooks:[{type:"command",command:"npx agentic-qe hooks route --json",timeout:5e3,continueOnError:!0}]}],SessionStart:[{hooks:[{type:"command",command:'npx agentic-qe hooks session-start --session-id "$SESSION_ID" --json',timeout:1e4,continueOnError:!0}]},{hooks:[{type:"command",command:`sh -c 'exec node "\${CLAUDE_PROJECT_DIR:-.}/.claude/helpers/brain-checkpoint.cjs" verify --json'`,timeout:5e3,continueOnError:!0}]}],Stop:[{hooks:[{type:"command",command:"npx agentic-qe hooks session-end --save-state --json",timeout:5e3,continueOnError:!0}]},{hooks:[{type:"command",command:"npx agentic-qe hooks post-route --success true --json",timeout:5e3,continueOnError:!0}]},{hooks:[{type:"command",command:`sh -c 'exec node "\${CLAUDE_PROJECT_DIR:-.}/.claude/helpers/brain-checkpoint.cjs" export --json'`,timeout:6e4,continueOnError:!0}]}]}}};te();import{existsSync as nt,readFileSync as st,writeFileSync as rt}from"fs";import{join as ot}from"path";var z=class extends y{name="mcp";description="Configure MCP server";order=80;critical=!1;requiresPhases=["configuration","database"];async run(e){let{projectRoot:t}=e;if(e.options.noMcp)return e.services.log(" MCP: skipped (--no-mcp)"),e.services.log(" CLI commands available: aqe memory, aqe test, aqe coverage, etc."),{configured:!1,mcpPath:"",serverName:""};let s={command:"aqe-mcp",args:[],env:{AQE_LEARNING_ENABLED:"true",AQE_WORKERS_ENABLED:"true",NODE_ENV:"production"}},n=ot(t,".mcp.json"),o={};if(nt(n))try{let i=st(n,"utf-8");o=x(i)}catch{o={}}o.mcpServers||(o.mcpServers={});let r=o.mcpServers;return r["agentic-qe"]=s,rt(n,JSON.stringify(o,null,2),"utf-8"),e.services.log(` MCP config: ${n}`),e.services.log(" Server: agentic-qe"),e.services.log(" Learning: enabled"),e.services.log(" Workers: enabled"),{configured:!0,mcpPath:n,serverName:"agentic-qe"}}};import{existsSync as E,readFileSync as lt,readdirSync as ct}from"fs";import{join as R}from"path";ee();import{spawnSync as it}from"node:child_process";import*as ie from"node:os";import*as Qe from"node:fs";var fe="vibium@^26.3.18",Le={platform:()=>ie.platform(),arch:()=>ie.arch(),existsSync:l=>Qe.existsSync(l)},Fe=["/usr/bin/chromium","/usr/bin/chromium-browser","/usr/bin/google-chrome","/usr/bin/google-chrome-stable","/snap/bin/chromium"];function at(l=Le){if(l.platform()!=="linux"||l.arch()!=="arm64")return;let e=Fe.find(t=>l.existsSync(t));return e?{code:"linux-arm64-system-chromium-found",browserPath:e,message:`Linux aarch64 detected. Vibium v26.3.x does not auto-download Chrome for Testing on ARM64. Found system browser at ${e}. Export VIBIUM_BROWSER_PATH=${e} before running vibium.`}:{code:"linux-arm64-no-system-chromium",message:`Linux aarch64 detected. Vibium v26.3.x does not auto-download Chrome for Testing on ARM64, and no system chromium was found on PATH (checked: ${Fe.join(", ")}). Install via \`apt-get install chromium\` (or your distro's equivalent), then export VIBIUM_BROWSER_PATH=/usr/bin/chromium before running vibium.`}}function ge(l,e,t,s){return l(e,t,{encoding:"utf8",timeout:s,maxBuffer:8*1024*1024})}var Be=(l,e,t)=>it(l,e,t);function Ne(l=Be,e=5e3){let t=ge(l,"vibium",["--version"],e);if(t.status!==0)return null;let s=(t.stdout||"").trim(),n=(t.stderr||"").trim(),o=s||n;if(!o)return"unknown";let r=o.match(/v?(\d+\.\d+\.\d+(?:[-+][\w.]+)?)/);return r?r[1]:o.split(/\s+/)[0]||"unknown"}function he(l={}){let e=l.packageSpec||fe;if(l.skip)return{status:"skipped",packageSpec:e,message:"install skipped by options"};let t=l.spawner||Be,s=l.platformProbe||Le,n=at(s),o=Ne(t);if(o)return{status:"already-installed",version:o,packageSpec:e,platformHint:n};let r=l.npmBin||"npm",i=ge(t,r,["--version"],5e3);if(i.error||i.status!==0)return{status:"npm-unavailable",packageSpec:e,message:`npm is not available on PATH. Install Node.js + npm, then run \`npm install -g ${e}\`.`};let c=l.timeoutMs||18e4,d=ge(t,r,["install","-g",e],c);return d.status!==0?{status:"install-failed",packageSpec:e,message:d.stderr?.trim()||d.stdout?.trim()||S(d.error)||"unknown npm install failure"}:{status:"installed",version:Ne(t)||"unknown",packageSpec:e,platformHint:n}}var K=class extends y{name="assets";description="Install skills and agents";order=90;critical=!1;requiresPhases=["configuration"];async run(e){let t=e.config,{projectRoot:s,options:n}=e,o=this.detectVersionUpgrade(e),r=n.upgrade||t.skills.overwrite||n.autoMode&&o,i=0,c=0,d=0,u=0,m=0,p=0,h=0,f=0,v=0;if(n.upgrade?e.services.log(" Upgrade mode: overwriting existing files"):n.autoMode&&o&&e.services.log(" Version upgrade detected: updating skills and agents"),t.skills.install){let b=await xe({projectRoot:s,installV2Skills:t.skills.installV2,installV3Skills:t.skills.installV3,overwrite:r}).install();i=b.installed.length,b.errors.length>0&&e.services.warn(`Skills warnings: ${b.errors.join(", ")}`)}try{let b=await _e({projectRoot:s,installQEAgents:!0,installSubagents:!0,overwrite:r}).install();c=b.installed.length,b.errors.length>0&&e.services.warn(`Agents warnings: ${b.errors.join(", ")}`)}catch(g){e.services.warn(`Agents install error: ${g instanceof Error?g.message:g}`)}De(s);let k;if(n.minimal)k={status:"skipped",packageSpec:fe,message:"minimal mode"};else try{let g=he({skip:!1,timeoutMs:5e3});if(g.status==="already-installed")k=g,e.services.log(` Browser engine: vibium ${k.version} (already installed)`);else switch(e.services.log(" Browser engine: installing vibium via npm (this can take 1\u20133 minutes on first run; downloads Chrome for Testing lazily)\u2026"),k=he({skip:!1}),k.status){case"installed":e.services.log(` Browser engine: vibium ${k.version} installed`);break;case"skipped":e.services.log(" Browser engine: skipped");break;case"install-failed":e.services.warn(`Browser engine install failed (qe-browser skill will be unavailable until you run \`npm install -g vibium\`): ${k.message||"unknown"}`);break;case"npm-unavailable":e.services.warn("Browser engine: npm not on PATH \u2014 install Node.js + npm, then `npm install -g vibium` to enable qe-browser");break}k?.platformHint&&e.services.warn(` Browser engine platform hint: ${k.platformHint.message}`)}catch(g){let b=g instanceof Error?g.message:String(g);e.services.warn(`Browser engine install error: ${b}
|
|
111
111
|
qe-browser fleet skill will be unavailable until you run:
|
|
112
112
|
npm install -g vibium
|
|
113
|
-
Then re-run \`aqe init\` to verify. The rest of the AQE install will continue.`)}if(n.withN8n){let
|
|
113
|
+
Then re-run \`aqe init\` to verify. The rest of the AQE install will continue.`)}if(n.withN8n){let b=await $e({projectRoot:s,installAgents:!0,installSkills:!0,overwrite:r,n8nApiConfig:n.n8nApiConfig}).install();d=b.agentsInstalled.length,u=b.skillsInstalled.length,b.errors.length>0&&e.services.warn(`N8n warnings: ${b.errors.join(", ")}`)}let A=n.autoMode&&E(R(s,"opencode.json"));if(n.withOpenCode||A){let{createOpenCodeInstaller:g}=await import("./opencode-installer-ADOJVGNA.js"),a=await g({projectRoot:s,installAgents:!0,installSkills:!0,installTools:!0,overwrite:r}).install();m=a.agentsInstalled.length,p=a.skillsInstalled.length,a.errors.length>0&&e.services.warn(`OpenCode warnings: ${a.errors.join(", ")}`)}e.services.log(` Skills: ${i}`),e.services.log(` Agents: ${c}`),n.withN8n&&(e.services.log(` N8n agents: ${d}`),e.services.log(` N8n skills: ${u}`)),(n.withOpenCode||A)&&(e.services.log(` OpenCode agents: ${m}`),e.services.log(` OpenCode skills: ${p}`));let le=n.autoMode&&E(R(s,".kiro"));if(n.withKiro||le){let{createKiroInstaller:g}=await import("./kiro-installer-6KVES4MO.js"),a=await g({projectRoot:s,installAgents:!0,installSkills:!0,installHooks:!0,installSteering:!0,overwrite:r}).install();h=a.agentsInstalled.length,f=a.skillsInstalled.length,v=a.hooksInstalled.length,a.errors.length>0&&e.services.warn(`Kiro warnings: ${a.errors.join(", ")}`),e.services.log(` Kiro agents: ${h}`),e.services.log(` Kiro skills: ${f}`),e.services.log(` Kiro hooks: ${v}`),e.services.log(` Kiro steering: ${a.steeringInstalled.length}`),a.mcpConfigured&&e.services.log(" Kiro MCP: .kiro/settings/mcp.json")}let I=[];if(n.withCopilot||n.autoMode&&E(R(s,".vscode"))){let{createCopilotInstaller:g}=await import("./copilot-installer-DQZMQWI7.js"),a=await g({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&I.push("copilot"),a.errors.length>0&&e.services.warn(`Copilot warnings: ${a.errors.join(", ")}`),a.mcpConfigured&&e.services.log(` Copilot MCP: ${a.configPath}`),a.rulesInstalled&&e.services.log(` Copilot rules: ${a.rulesPath}`)}if(n.withCursor||n.autoMode&&E(R(s,".cursor"))){let{createCursorInstaller:g}=await import("./cursor-installer-ENDG4JIU.js"),a=await g({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&I.push("cursor"),a.errors.length>0&&e.services.warn(`Cursor warnings: ${a.errors.join(", ")}`),a.mcpConfigured&&e.services.log(` Cursor MCP: ${a.configPath}`),a.rulesInstalled&&e.services.log(` Cursor rules: ${a.rulesPath}`)}if(n.withCline){let{createClineInstaller:g}=await import("./cline-installer-IHH4F27G.js"),a=await g({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&I.push("cline"),a.errors.length>0&&e.services.warn(`Cline warnings: ${a.errors.join(", ")}`),a.mcpConfigured&&e.services.log(` Cline MCP: ${a.configPath}`),a.modeInstalled&&e.services.log(` Cline mode: ${a.modePath}`)}if(n.withKiloCode||n.autoMode&&E(R(s,".kilocode"))){let{createKiloCodeInstaller:g}=await import("./kilocode-installer-GWQCNLKI.js"),a=await g({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&I.push("kilocode"),a.errors.length>0&&e.services.warn(`Kilo Code warnings: ${a.errors.join(", ")}`),a.mcpConfigured&&e.services.log(` Kilo Code MCP: ${a.configPath}`),a.modeInstalled&&e.services.log(` Kilo Code mode: ${a.modePath}`)}if(n.withRooCode||n.autoMode&&E(R(s,".roo"))){let{createRooCodeInstaller:g}=await import("./roocode-installer-63Y45UUG.js"),a=await g({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&I.push("roocode"),a.errors.length>0&&e.services.warn(`Roo Code warnings: ${a.errors.join(", ")}`),a.mcpConfigured&&e.services.log(` Roo Code MCP: ${a.configPath}`),a.modeInstalled&&e.services.log(` Roo Code mode: ${a.modePath}`)}if(n.withCodex||n.autoMode&&E(R(s,".codex"))){let{createCodexInstaller:g}=await import("./codex-installer-UPMSAFCQ.js"),a=await g({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&I.push("codex"),a.errors.length>0&&e.services.warn(`Codex warnings: ${a.errors.join(", ")}`),a.mcpConfigured&&e.services.log(` Codex MCP: ${a.configPath}`),a.agentsMdInstalled&&e.services.log(` Codex AGENTS.md: ${a.agentsMdPath}`)}if(n.withWindsurf||n.autoMode&&E(R(s,".windsurf"))){let{createWindsurfInstaller:g}=await import("./windsurf-installer-7DMSFCA2.js"),a=await g({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&I.push("windsurf"),a.errors.length>0&&e.services.warn(`Windsurf warnings: ${a.errors.join(", ")}`),a.mcpConfigured&&e.services.log(` Windsurf MCP: ${a.configPath}`),a.rulesInstalled&&e.services.log(` Windsurf rules: ${a.rulesPath}`)}if(n.withContinueDev||n.autoMode&&E(R(s,".continue"))){let{createContinueDevInstaller:g}=await import("./continuedev-installer-GWYZKB5A.js"),a=await g({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&I.push("continuedev"),a.errors.length>0&&e.services.warn(`Continue.dev warnings: ${a.errors.join(", ")}`),a.mcpConfigured&&e.services.log(` Continue.dev MCP: ${a.configPath}`),a.rulesInstalled&&e.services.log(` Continue.dev rules: ${a.rulesPath}`)}return I.length>0&&e.services.log(` Platforms configured: ${I.join(", ")}`),{skillsInstalled:i,agentsInstalled:c,n8nAgents:d,n8nSkills:u,openCodeAgents:m,openCodeSkills:p,kiroAgents:h,kiroSkills:f,kiroHooks:v,platformsConfigured:I,browserEngine:k}}detectVersionUpgrade(e){let t=e.config.version,s=R(e.projectRoot,".agentic-qe","config.yaml");if(E(s))try{let i=lt(s,"utf-8").match(/version:\s*"?([^"\n]+)"?/)?.[1];if(i===t)return!1;if(i!==void 0)return!0}catch{}let n=R(e.projectRoot,".claude","agents","v3");try{return E(n)&&ct(n).some(o=>o.endsWith(".md")&&o.startsWith("qe-"))}catch{return!1}}};import{existsSync as dt,mkdirSync as ut,writeFileSync as ae}from"fs";import{join as O,dirname as pt}from"path";import{fileURLToPath as mt}from"url";var gt=mt(import.meta.url),Wn=pt(gt),Y=class extends y{name="workers";description="Configure background workers";order=100;critical=!1;requiresPhases=["configuration"];async shouldRun(e){let t=e.config;return t?.workers?.daemonAutoStart&&(t?.workers?.enabled?.length??0)>0}async run(e){let t=e.config,{projectRoot:s}=e;if(!t.workers.daemonAutoStart||t.workers.enabled.length===0)return{workersDir:"",workersConfigured:0,registryPath:"",daemonStarted:!1,daemonPid:null};let n=O(s,".agentic-qe","workers");dt(n)||ut(n,{recursive:!0});let o={"learning-consolidation":18e5,"pattern-consolidator":18e5,"test-health":3e5,"coverage-tracker":6e5,"coverage-gap-scanner":6e5,"flaky-detector":9e5,"flaky-test-detector":9e5,"security-scan":18e5,"quality-gate":3e5,"compliance-checker":18e5,"defect-predictor":9e5,"regression-monitor":6e5,"routing-accuracy-monitor":9e5,"performance-baseline":36e5,"cloud-sync":3e5},r={};for(let h of t.workers.enabled)r[h]={name:h,enabled:!0,interval:t.workers.intervals[h]||o[h]||6e4,lastRun:null,status:"pending"};let i=O(n,"registry.json"),c={version:t.version,maxConcurrent:t.workers.maxConcurrent,workers:r,createdAt:new Date().toISOString(),daemonPid:null};ae(i,JSON.stringify(c,null,2),"utf-8");for(let h of t.workers.enabled){let f=O(n,`${h}.json`),v={name:h,enabled:!0,interval:t.workers.intervals[h]||o[h]||6e4,projectRoot:s,dataDir:O(s,".agentic-qe","data"),createdAt:new Date().toISOString()};ae(f,JSON.stringify(v,null,2),"utf-8")}let d=O(n,"start-daemon.cjs");ae(d,`#!/usr/bin/env node
|
|
114
114
|
// AQE v3 Worker Daemon Startup Script (cross-platform)
|
|
115
115
|
// Generated by aqe init
|
|
116
116
|
// Starts the MCP server with background workers enabled
|
|
@@ -133,12 +133,30 @@ if (existsSync(pidFile)) {
|
|
|
133
133
|
const ts = new Date().toISOString();
|
|
134
134
|
appendFileSync(logFile, '[' + ts + '] Starting AQE v3 Worker Daemon...\\n');
|
|
135
135
|
|
|
136
|
-
// Find the best way to run aqe-mcp
|
|
136
|
+
// Find the best way to run aqe-mcp.
|
|
137
|
+
//
|
|
138
|
+
// #488 B.1: candidate ordering matters for the pidfile contract. When we
|
|
139
|
+
// spawn the real MCP binary directly, child.pid is the long-lived process
|
|
140
|
+
// \u2014 \`process.kill(pid, 0)\` against the pidfile correctly reports liveness.
|
|
141
|
+
// When we fall back to \`npx --yes agentic-qe mcp\`, child.pid is the npx
|
|
142
|
+
// wrapper PID, which exits as soon as it has forked the real bundle. The
|
|
143
|
+
// pidfile then points at a dead process and idempotency checks misbehave.
|
|
144
|
+
//
|
|
145
|
+
// We try in order: local .bin \u2192 local node_modules bundle \u2192 global install
|
|
146
|
+
// via require.resolve \u2192 npx wrapper (last resort, with the caveat above).
|
|
137
147
|
const candidates = [
|
|
138
148
|
join(projectRoot, 'node_modules', '.bin', 'aqe-mcp'),
|
|
139
149
|
join(projectRoot, 'node_modules', 'agentic-qe', 'dist', 'mcp', 'bundle.js'),
|
|
140
150
|
];
|
|
141
151
|
|
|
152
|
+
// Probe globally-installed agentic-qe (npm install -g) via require.resolve.
|
|
153
|
+
// This is the case the npx fallback used to silently cover with a bad PID.
|
|
154
|
+
try {
|
|
155
|
+
candidates.push(require.resolve('agentic-qe/dist/mcp/bundle.js'));
|
|
156
|
+
} catch {
|
|
157
|
+
// Not globally installed \u2014 fall through to npx fallback below.
|
|
158
|
+
}
|
|
159
|
+
|
|
142
160
|
let mcpCmd, mcpArgs;
|
|
143
161
|
const binCandidate = candidates.find(c => existsSync(c));
|
|
144
162
|
|
|
@@ -151,6 +169,7 @@ if (binCandidate && binCandidate.endsWith('bundle.js')) {
|
|
|
151
169
|
} else {
|
|
152
170
|
mcpCmd = process.platform === 'win32' ? 'npx.cmd' : 'npx';
|
|
153
171
|
mcpArgs = ['--yes', 'agentic-qe', 'mcp'];
|
|
172
|
+
appendFileSync(logFile, '[' + ts + '] WARNING: using npx fallback \u2014 daemon.pid will point at the npx wrapper, not the MCP server. \`aqe daemon status\` may misreport liveness after the wrapper exits.\\n');
|
|
154
173
|
}
|
|
155
174
|
|
|
156
175
|
appendFileSync(logFile, '[' + ts + '] Using: ' + mcpCmd + ' ' + mcpArgs.join(' ') + '\\n');
|
|
@@ -189,7 +208,7 @@ try {
|
|
|
189
208
|
console.log('Daemon not running (stale PID file)');
|
|
190
209
|
try { unlinkSync(pidFile); } catch {}
|
|
191
210
|
}
|
|
192
|
-
`),e.services.log(` Workers dir: ${n}`),e.services.log(` Workers: ${t.workers.enabled.join(", ")}`),e.services.log(` Registry: ${i}`),{workersDir:n,workersConfigured:t.workers.enabled.length,registryPath:i,daemonStarted:!1,daemonPid:null}}};import{existsSync as ft,readFileSync as ht,writeFileSync as ye}from"fs";import{join as
|
|
211
|
+
`),e.services.log(` Workers dir: ${n}`),e.services.log(` Workers: ${t.workers.enabled.join(", ")}`),e.services.log(` Registry: ${i}`),{workersDir:n,workersConfigured:t.workers.enabled.length,registryPath:i,daemonStarted:!1,daemonPid:null}}};import{existsSync as ft,readFileSync as ht,writeFileSync as ye}from"fs";import{join as Ve}from"path";var J=class extends y{name="claude-md";description="Generate CLAUDE.md";order=110;critical=!1;requiresPhases=["configuration"];async run(e){let t=e.config,{projectRoot:s}=e,n=Ve(s,"CLAUDE.md"),o=this.generateContent(t),r=!1;if(ft(n)){let i=ht(n,"utf-8");if(i.includes("## Agentic QE v3"))return e.services.log(" CLAUDE.md already has AQE section"),{generated:!1,path:n,backupCreated:!1};let c=Ve(s,"CLAUDE.md.backup");ye(c,i,"utf-8"),r=!0,ye(n,i+`
|
|
193
212
|
|
|
194
213
|
`+o,"utf-8")}else ye(n,o,"utf-8");return e.services.log(` Path: ${n}`),r&&e.services.log(" Backup created"),{generated:!0,path:n,backupCreated:r}}generateContent(e){let t=e.domains.enabled.slice(0,6).join(", "),s=Math.max(0,e.domains.enabled.length-6);return`## Agentic QE v3
|
|
195
214
|
|
|
@@ -353,7 +372,7 @@ Task({ prompt: "Security audit", subagent_type: "qe-security-scanner", run_in_ba
|
|
|
353
372
|
|
|
354
373
|
---
|
|
355
374
|
*Generated by AQE v3 init - ${new Date().toISOString()}*
|
|
356
|
-
`}};import{existsSync as D,readFileSync as yt}from"fs";import{join as F,dirname as vt}from"path";import{mkdirSync as He,writeFileSync as
|
|
375
|
+
`}};import{existsSync as D,readFileSync as yt}from"fs";import{join as F,dirname as vt}from"path";import{mkdirSync as He,writeFileSync as bt}from"fs";de();var X=class extends y{name="verification";description="Verify installation";order=120;critical=!0;requiresPhases=["database","configuration"];async run(e){let t=e.config,{projectRoot:s}=e,n=[],o=F(s,".agentic-qe","memory.db");n.push({name:"Database exists",passed:D(o)}),n.push({name:".agentic-qe directory",passed:D(F(s,".agentic-qe"))});let r=F(s,".agentic-qe","config.yaml");await this.saveConfig(t,s),n.push({name:"Config saved",passed:D(r)});let i=await this.writeVersionToDb(t.version,s);n.push({name:"Version marker",passed:i});let c=["Database exists",".agentic-qe directory","Config saved"],d=n.filter(u=>c.includes(u.name)).every(u=>u.passed);e.services.log(" Verification checks:");for(let u of n){let m=c.includes(u.name),p=u.passed?"\u2713":m?"\u2717":"\u26A0",h=!m&&!u.passed?" (optional)":"";e.services.log(` ${p} ${u.name}${h}`)}return{verified:d,versionWritten:i,configSaved:D(r),checks:n}}async writeVersionToDb(e,t){let s=F(t,".agentic-qe","memory.db");try{let n=vt(s);D(n)||He(n,{recursive:!0});let o=_(s);try{o.exec(`
|
|
357
376
|
CREATE TABLE IF NOT EXISTS kv_store (
|
|
358
377
|
key TEXT NOT NULL,
|
|
359
378
|
namespace TEXT NOT NULL,
|
|
@@ -368,9 +387,9 @@ Task({ prompt: "Security audit", subagent_type: "qe-security-scanner", run_in_ba
|
|
|
368
387
|
`).run("aqe_version",JSON.stringify(e),r),o.prepare(`
|
|
369
388
|
INSERT OR REPLACE INTO kv_store (key, namespace, value, created_at)
|
|
370
389
|
VALUES (?, '_system', ?, ?)
|
|
371
|
-
`).run("init_timestamp",JSON.stringify(new Date().toISOString()),r),o.close(),!0}catch{return o.close(),!1}}catch{return!1}}async saveConfig(e,t){let s=F(t,".agentic-qe");D(s)||He(s,{recursive:!0});let n=F(s,"config.yaml");if(D(n)){let r=this.loadExistingConfig(n);r&&(e=this.mergeConfigs(e,r))}let o=this.configToYAML(e);
|
|
390
|
+
`).run("init_timestamp",JSON.stringify(new Date().toISOString()),r),o.close(),!0}catch{return o.close(),!1}}catch{return!1}}async saveConfig(e,t){let s=F(t,".agentic-qe");D(s)||He(s,{recursive:!0});let n=F(s,"config.yaml");if(D(n)){let r=this.loadExistingConfig(n);r&&(e=this.mergeConfigs(e,r))}let o=this.configToYAML(e);bt(n,o,"utf-8")}loadExistingConfig(e){try{let t=yt(e,"utf-8");return this.parseYAML(t)}catch{return null}}parseYAML(e){try{let t={},s=e.split(`
|
|
372
391
|
`),n="",o="";for(let i of s){if(i.trim().startsWith("#")||i.trim()==="")continue;let c=i.match(/^(\w+):\s*(.*)$/);if(c){n=c[1],o="";let p=c[2].trim();p&&!p.startsWith('"')?t[n]=this.parseValue(p):p?t[n]=this.parseValue(p):t[n]={};continue}let d=i.match(/^ (\w+):\s*(.*)$/);if(d&&n){o=d[1];let p=d[2].trim();t[n]||(t[n]={}),p?t[n][o]=this.parseValue(p):t[n][o]={};continue}let u=i.match(/^ ([\w-]+):\s*(.*)$/);if(u&&n&&o){let p=u[1],h=u[2].trim(),f=t[n];f[o]||(f[o]={}),typeof f[o]=="object"&&!Array.isArray(f[o])&&(f[o][p]=this.parseValue(h));continue}let m=i.match(/^ - "?([^"]*)"?$/);if(m&&n&&o){let p=t[n];Array.isArray(p[o])||(p[o]=[]),p[o].push(m[1])}}let r=[["domains","enabled"],["domains","disabled"],["workers","enabled"]];for(let[i,c]of r){let d=t[i];d&&c in d&&!Array.isArray(d[c])&&(d[c]=[])}return t}catch{return null}}parseValue(e){return e==="true"?!0:e==="false"?!1:/^\d+$/.test(e)?parseInt(e,10):/^\d+\.\d+$/.test(e)?parseFloat(e):e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e}mergeConfigs(e,t){if(t.domains?.enabled&&Array.isArray(t.domains.enabled)){let s=new Set(t.domains.enabled),n=new Set(e.domains.enabled);for(let r of n)s.add(r);let o=new Set(Array.isArray(t.domains?.disabled)?t.domains.disabled:[]);e.domains.enabled=Array.from(s).filter(r=>!o.has(r))}return t.domains?.disabled&&Array.isArray(t.domains.disabled)&&(e.domains.disabled=t.domains.disabled),t.learning?.enabled!==void 0&&(e.learning.enabled=t.learning.enabled),t.hooks?.claudeCode!==void 0&&(e.hooks.claudeCode=t.hooks.claudeCode),t.hooks?.preCommit!==void 0&&(e.hooks.preCommit=t.hooks.preCommit),t.hooks?.ciIntegration!==void 0&&(e.hooks.ciIntegration=t.hooks.ciIntegration),t.workers?.enabled&&Array.isArray(t.workers.enabled)&&(e.workers.enabled=t.workers.enabled),t.workers?.daemonAutoStart!==void 0&&(e.workers.daemonAutoStart=t.workers.daemonAutoStart),t.agents?.maxConcurrent!==void 0&&(e.agents.maxConcurrent=t.agents.maxConcurrent),t.agents?.defaultTimeout!==void 0&&(e.agents.defaultTimeout=t.agents.defaultTimeout),e}configToYAML(e){return["# Agentic QE v3 Configuration","# Generated by aqe init",`# ${new Date().toISOString()}`,"#",'# NOTE: Your customizations are PRESERVED when you run "aqe init" again.','# You do NOT need to re-run "aqe init" after editing this file - changes',"# take effect immediately. The following settings are merged on reinstall:","# - domains.enabled (custom domains like visual-accessibility)","# - domains.disabled","# - learning.enabled","# - hooks.* preferences","# - workers.enabled","# - agents.maxConcurrent and defaultTimeout","",`version: "${e.version}"`,"","project:",` name: "${e.project.name}"`,` root: "${e.project.root}"`,` type: "${e.project.type}"`,"","learning:",` enabled: ${e.learning.enabled}`,` embeddingModel: "${e.learning.embeddingModel}"`," hnswConfig:",` M: ${e.learning.hnswConfig.M}`,` efConstruction: ${e.learning.hnswConfig.efConstruction}`,` efSearch: ${e.learning.hnswConfig.efSearch}`,` qualityThreshold: ${e.learning.qualityThreshold}`,` promotionThreshold: ${e.learning.promotionThreshold}`,` pretrainedPatterns: ${e.learning.pretrainedPatterns}`,"","routing:",` mode: "${e.routing.mode}"`,` confidenceThreshold: ${e.routing.confidenceThreshold}`,` feedbackEnabled: ${e.routing.feedbackEnabled}`,"","# ADR-092: Advisor Strategy \u2014 agents consult a stronger model for strategic guidance","# Set provider/model to override auto-detection from environment API keys","advisor:",' # provider: "openrouter" # openrouter | claude | ollama (auto-detected if not set)',' # model: "anthropic/claude-opus-4.7" # provider-specific model ID',' # maxUses: "3" # per-task advisor call cap',' redact: "strict" # strict | balanced | off',"","workers:"," enabled:",...e.workers.enabled.map(s=>` - "${s}"`)," intervals:",...Object.entries(e.workers.intervals).map(([s,n])=>` ${s}: ${n}`),` maxConcurrent: ${e.workers.maxConcurrent}`,` daemonAutoStart: ${e.workers.daemonAutoStart}`,"","hooks:",` claudeCode: ${e.hooks.claudeCode}`,` preCommit: ${e.hooks.preCommit}`,` ciIntegration: ${e.hooks.ciIntegration}`,"","skills:",` install: ${e.skills.install}`,` installV2: ${e.skills.installV2}`,` installV3: ${e.skills.installV3}`,` overwrite: ${e.skills.overwrite}`,"","domains:"," enabled:",...e.domains.enabled.map(s=>` - "${s}"`)," disabled:",...e.domains.disabled.map(s=>` - "${s}"`),"","agents:",` maxConcurrent: ${e.agents.maxConcurrent}`,` defaultTimeout: ${e.agents.defaultTimeout}`,""].join(`
|
|
373
|
-
`)}};ee();import{existsSync as
|
|
392
|
+
`)}};ee();import{existsSync as q,mkdirSync as We,readdirSync as Ue,copyFileSync as Ge}from"fs";import{join as C,dirname as kt}from"path";import{fileURLToPath as wt}from"url";var Ct=wt(import.meta.url),ze=kt(Ct);function It(){let l=[C(ze,"../../assets/governance"),C(ze,"../assets/governance")],e=Ae(import.meta.url);e&&(l.push(C(e,"assets/governance")),l.push(C(e,"dist/assets/governance"))),l.push(C(process.cwd(),"node_modules/agentic-qe/assets/governance")),l.push(C(process.cwd(),"assets/governance"));for(let t of l)if(q(t))return t;throw new Error(`Governance assets not found. Package may be corrupted. Searched: ${l.join(", ")}`)}var ve=class{projectRoot;overwrite;skipShards;assetsPath;constructor(e){this.projectRoot=e.projectRoot,this.overwrite=e.overwrite??!1,this.skipShards=e.skipShards??!1,this.assetsPath=It()}async install(){let e=[],t=[],s=[],n=C(this.projectRoot,".claude","guidance"),o=C(n,"shards");try{We(n,{recursive:!0}),this.skipShards||We(o,{recursive:!0})}catch(u){return s.push(`Failed to create governance directory: ${S(u)}`),{installed:e,skipped:t,errors:s,governanceDir:n,constitutionInstalled:!1,shardsInstalled:0}}let r=!1,i=C(this.assetsPath,"constitution.md"),c=C(n,"constitution.md");if(q(i))try{!q(c)||this.overwrite?(Ge(i,c),e.push("constitution.md"),r=!0):t.push("constitution.md")}catch(u){s.push(`Failed to install constitution.md: ${S(u)}`)}else s.push("constitution.md not found in assets");let d=0;if(!this.skipShards){let u=C(this.assetsPath,"shards");if(q(u))try{let m=Ue(u).filter(p=>p.endsWith(".shard.md"));for(let p of m){let h=C(u,p),f=C(o,p);try{!q(f)||this.overwrite?(Ge(h,f),e.push(`shards/${p}`),d++):t.push(`shards/${p}`)}catch(v){s.push(`Failed to install ${p}: ${S(v)}`)}}}catch(m){s.push(`Failed to read shards directory: ${S(m)}`)}else s.push("Shards directory not found in assets")}return{installed:e,skipped:t,errors:s,governanceDir:n,constitutionInstalled:r,shardsInstalled:d}}isInstalled(){let e=C(this.projectRoot,".claude","guidance","constitution.md");return q(e)}getInstalledShards(){let e=C(this.projectRoot,".claude","guidance","shards");if(!q(e))return[];try{return Ue(e).filter(t=>t.endsWith(".shard.md"))}catch{return[]}}};function Ke(l){return new ve(l)}var Z=class extends y{name="governance";description="Install governance configuration";order=95;critical=!1;requiresPhases=["configuration"];async shouldRun(e){return e.options.noGovernance?(e.services.log(" Governance skipped (--no-governance flag)"),!1):e.options.minimal?(e.services.log(" Governance skipped (minimal mode)"),!1):!0}async run(e){let{projectRoot:t,options:s}=e,n=s.upgrade,o=Ke({projectRoot:t,overwrite:n});if(o.isInstalled()&&!n){let i=o.getInstalledShards();return e.services.log(` Governance already installed (${i.length} shards)`),e.services.log(" Use --upgrade to overwrite existing files"),{filesInstalled:0,filesSkipped:1+i.length,constitutionInstalled:!1,shardsInstalled:0,governanceDir:`${t}/.claude/guidance`,skippedByFlag:!1}}let r=await o.install();if(r.errors.length>0)for(let i of r.errors)e.services.warn(` ${i}`);return e.services.log(` Constitution: ${r.constitutionInstalled?"installed":"skipped"}`),e.services.log(` Shards: ${r.shardsInstalled} installed, ${r.skipped.filter(i=>i.startsWith("shards/")).length} skipped`),r.installed.length>0&&(e.services.log(" Governance enabled (non-strict mode by default)"),e.services.log(" Set GOVERNANCE_STRICT_MODE=true for strict enforcement")),{filesInstalled:r.installed.length,filesSkipped:r.skipped.length,constitutionInstalled:r.constitutionInstalled,shardsInstalled:r.shardsInstalled,governanceDir:r.governanceDir,skippedByFlag:!1}}};var Pt=new N,St=new Q,Et=new L,Rt=new H,At=new W,xt=new U,_t=new G,$t=new z,Dt=new K,qt=new Y,jt=new J,Tt=new X,Mt=new Z;function Ye(){return[Pt,St,Et,Rt,At,xt,_t,$t,Dt,Mt,qt,jt,Tt]}var be=class{phases;context;constructor(e){this.context=this.createContext(e),this.phases=e.customPhases??Ye()}createContext(e){let t=e.withAllPlatforms;return{projectRoot:e.projectRoot,options:{autoMode:e.autoMode,upgrade:e.upgrade,skipPatterns:e.skipPatterns,skipCodeIndex:e.skipCodeIndex,minimal:e.minimal,withN8n:e.withN8n,withOpenCode:e.withOpenCode,withKiro:e.withKiro,withCopilot:e.withCopilot||t,withCursor:e.withCursor||t,withCline:e.withCline||t,withKiloCode:e.withKiloCode||t,withRooCode:e.withRooCode||t,withCodex:e.withCodex||t,withWindsurf:e.withWindsurf||t,withContinueDev:e.withContinueDev||t,withAllPlatforms:e.withAllPlatforms,n8nApiConfig:e.n8nApiConfig,wizardAnswers:e.wizardAnswers,noGovernance:e.noGovernance,noMcp:e.noMcp},config:{},enhancements:{claudeFlow:!1,ruvector:!1},results:new Map,services:{log:s=>console.log(s),warn:s=>console.warn(s),error:s=>console.error(s)}}}async initialize(){let e=Date.now(),t=[];try{let s=[...this.phases].sort((n,o)=>n.order-o.order);for(let n of s){if(!await n.shouldRun(this.context))continue;console.log(`
|
|
374
393
|
\u{1F4CB} ${n.description}...`);let r=await n.execute(this.context);if(this.context.results.set(n.name,r),t.push({step:n.description,status:r.success?"success":"error",message:r.message||"",durationMs:r.durationMs}),!r.success&&n.critical){if(console.error(`
|
|
375
|
-
\u274C Critical phase failed: ${n.name}`),n.rollback)try{await n.rollback(this.context)}catch(i){console.error(`Rollback failed: ${i}`)}return this.createFailureResult(t,e)}if(r.skipRemaining)break}return this.createSuccessResult(t,e)}catch(s){return t.push({step:"Initialization Failed",status:"error",message:S(s),durationMs:0}),this.createFailureResult(t,e)}}createSuccessResult(e,t){let s=this.context.config,n=this.context.results.get("learning"),o=this.context.results.get("code-intelligence"),r=this.context.results.get("assets"),i=this.context.results.get("hooks"),c=this.context.results.get("mcp"),d=this.context.results.get("claude-md"),u=this.context.results.get("workers");return{success:!0,config:s||ue("unknown",this.context.projectRoot),steps:e,summary:{projectAnalyzed:this.context.results.has("analysis"),configGenerated:this.context.results.has("configuration"),codeIntelligenceIndexed:o?.data?.entries??0,patternsLoaded:n?.data?.patternsLoaded??0,skillsInstalled:r?.data?.skillsInstalled??0,agentsInstalled:r?.data?.agentsInstalled??0,hooksConfigured:i?.data?.configured??!1,mcpConfigured:c?.data?.configured??!1,claudeMdGenerated:d?.data?.generated??!1,workersStarted:u?.data?.workersConfigured??0},totalDurationMs:Date.now()-t,timestamp:new Date}}createFailureResult(e,t){return{success:!1,config:ue("unknown",this.context.projectRoot),steps:e,summary:{projectAnalyzed:!1,configGenerated:!1,codeIntelligenceIndexed:0,patternsLoaded:0,skillsInstalled:0,agentsInstalled:0,hooksConfigured:!1,mcpConfigured:!1,claudeMdGenerated:!1,workersStarted:0},totalDurationMs:Date.now()-t,timestamp:new Date}}getPhase(e){return this.phases.find(t=>t.name===e)}getPhases(){return[...this.phases]}getContext(){return this.context}};function Ot(l){return new
|
|
376
|
-
`)}export{
|
|
394
|
+
\u274C Critical phase failed: ${n.name}`),n.rollback)try{await n.rollback(this.context)}catch(i){console.error(`Rollback failed: ${i}`)}return this.createFailureResult(t,e)}if(r.skipRemaining)break}return this.createSuccessResult(t,e)}catch(s){return t.push({step:"Initialization Failed",status:"error",message:S(s),durationMs:0}),this.createFailureResult(t,e)}}createSuccessResult(e,t){let s=this.context.config,n=this.context.results.get("learning"),o=this.context.results.get("code-intelligence"),r=this.context.results.get("assets"),i=this.context.results.get("hooks"),c=this.context.results.get("mcp"),d=this.context.results.get("claude-md"),u=this.context.results.get("workers");return{success:!0,config:s||ue("unknown",this.context.projectRoot),steps:e,summary:{projectAnalyzed:this.context.results.has("analysis"),configGenerated:this.context.results.has("configuration"),codeIntelligenceIndexed:o?.data?.entries??0,patternsLoaded:n?.data?.patternsLoaded??0,skillsInstalled:r?.data?.skillsInstalled??0,agentsInstalled:r?.data?.agentsInstalled??0,hooksConfigured:i?.data?.configured??!1,mcpConfigured:c?.data?.configured??!1,claudeMdGenerated:d?.data?.generated??!1,workersStarted:u?.data?.workersConfigured??0},totalDurationMs:Date.now()-t,timestamp:new Date}}createFailureResult(e,t){return{success:!1,config:ue("unknown",this.context.projectRoot),steps:e,summary:{projectAnalyzed:!1,configGenerated:!1,codeIntelligenceIndexed:0,patternsLoaded:0,skillsInstalled:0,agentsInstalled:0,hooksConfigured:!1,mcpConfigured:!1,claudeMdGenerated:!1,workersStarted:0},totalDurationMs:Date.now()-t,timestamp:new Date}}getPhase(e){return this.phases.find(t=>t.name===e)}getPhases(){return[...this.phases]}getContext(){return this.context}};function Ot(l){return new be(l)}async function Gs(l){return await Ot({projectRoot:l,autoMode:!0}).initialize()}function zs(l){let e=[];e.push(""),e.push("\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"),e.push("\u2502 AQE v3 Initialization \u2502"),e.push("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524");for(let s of l.steps){let n=s.status==="success"?"\u2713":s.status==="error"?"\u2717":"\u25CB",o=s.step.substring(0,48).padEnd(48);e.push(`\u2502 ${n} ${o} ${String(s.durationMs).padStart(4)}ms \u2502`)}e.push("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524"),e.push(`\u2502 Project: ${l.config.project.name.substring(0,45).padEnd(45)} \u2502`),e.push(`\u2502 Type: ${l.config.project.type.padEnd(48)} \u2502`),e.push(`\u2502 Code Intel: ${String(l.summary.codeIntelligenceIndexed).padEnd(43)} \u2502`),e.push(`\u2502 Patterns: ${String(l.summary.patternsLoaded).padEnd(45)} \u2502`),e.push(`\u2502 Skills: ${String(l.summary.skillsInstalled).padEnd(47)} \u2502`),e.push(`\u2502 Agents: ${String(l.summary.agentsInstalled).padEnd(47)} \u2502`),e.push(`\u2502 Workers: ${String(l.summary.workersStarted).padEnd(46)} \u2502`),e.push(`\u2502 Hooks: ${l.summary.hooksConfigured?"Yes":"No".padEnd(48)} \u2502`),e.push(`\u2502 MCP: ${l.summary.mcpConfigured?"Yes":"No".padEnd(50)} \u2502`),e.push(`\u2502 CLAUDE.md: ${l.summary.claudeMdGenerated?"Yes":"No".padEnd(44)} \u2502`),e.push("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524");let t=l.success?"\u2713 AQE v3 initialized successfully":"\u2717 Initialization failed";return e.push(`\u2502 ${t.padEnd(57)} \u2502`),e.push("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518"),e.push(""),e.join(`
|
|
395
|
+
`)}export{be as ModularInitOrchestrator,Ot as createModularInitOrchestrator,zs as formatInitResultModular,Gs as quickInitModular};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a as y,b as w,c as u}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.32");process.exit(0)}
|
|
2
|
+
import{a as y,b as w,c as u}from"./chunk-EFEJLZDN.js";import"./chunk-XHQFVTFD.js";import{Command as O}from"commander";import{resolve as A}from"path";import s from"chalk";import*as M from"node:fs/promises";import{parse as W}from"yaml";var E=["eq","neq","gt","gte","lt","lte","contains","exists"],D=["sequential","parallel"],N=/\$\{([^}]+)\}/g,k=class{parse(r,t){try{let n=this.interpolateVariables(r,t??{}),a=W(n);return this.validateAndConvert(a)}catch(n){return u(n instanceof Error?new Error(`YAML parse error: ${n.message}`):new Error(`YAML parse error: ${String(n)}`))}}async loadFromFile(r,t){try{let n=await M.readFile(r,"utf-8");return this.parse(n,t)}catch(n){return u(n instanceof Error?new Error(`Failed to read pipeline file '${r}': ${n.message}`):new Error(`Failed to read pipeline file '${r}': ${String(n)}`))}}interpolateVariables(r,t){return r.replace(N,(n,a)=>{let o=this.resolveVarPath(t,a);return o===void 0?n:String(o)})}validateSchema(r){return this.validateAndConvert(r)}validateAndConvert(r){if(!r||typeof r!="object"||Array.isArray(r))return u(new Error("YAML must parse to an object"));let t=r;if(!t.id||typeof t.id!="string")return u(new Error("Missing or invalid required field 'id' (string)"));if(!t.name||typeof t.name!="string")return u(new Error("Missing or invalid required field 'name' (string)"));if(!t.steps||!Array.isArray(t.steps)||t.steps.length===0)return u(new Error("'steps' must be a non-empty array"));let n=typeof t.description=="string"?t.description:"",a=typeof t.version=="string"?t.version:"1.0.0",o;if(t.defaultMode!==void 0){if(!D.includes(t.defaultMode))return u(new Error(`Invalid defaultMode '${String(t.defaultMode)}'. Must be one of: ${D.join(", ")}`));o=t.defaultMode}let e;if(t.timeout!==void 0){if(typeof t.timeout!="number"||t.timeout<=0)return u(new Error("'timeout' must be a positive number"));e=t.timeout}let i=Array.isArray(t.tags)?t.tags.filter(g=>typeof g=="string"):void 0,l=this.validateSteps(t.steps);if(!l.success)return l;let d;if(t.triggers!==void 0){if(!Array.isArray(t.triggers))return u(new Error("'triggers' must be an array"));let g=this.validateTriggers(t.triggers);if(!g.success)return g;d=g.value}let p=this.detectCircularDependencies(l.value);if(p)return u(new Error(`Circular dependency detected: ${p}`));let c={id:t.id,name:t.name,description:n,version:a,steps:l.value,...o!==void 0&&{defaultMode:o},...e!==void 0&&{timeout:e},...i!==void 0&&{tags:i},...d!==void 0&&{triggers:d}};return w(c)}validateSteps(r){let t=[],n=new Set;for(let a=0;a<r.length;a++){let o=r[a];if(!o||typeof o!="object"||Array.isArray(o))return u(new Error(`Step at index ${a} must be an object`));let e=o;if(!e.id||typeof e.id!="string")return u(new Error(`Step at index ${a}: missing or invalid 'id' (string)`));if(n.has(e.id))return u(new Error(`Duplicate step ID: ${e.id}`));if(n.add(e.id),!e.name||typeof e.name!="string")return u(new Error(`Step '${e.id}': missing or invalid 'name' (string)`));if(!e.domain||typeof e.domain!="string")return u(new Error(`Step '${e.id}': missing or invalid 'domain' (string)`));if(!y.includes(e.domain))return u(new Error(`Step '${e.id}': invalid domain '${e.domain}'. Must be one of: ${y.join(", ")}`));if(!e.action||typeof e.action!="string")return u(new Error(`Step '${e.id}': missing or invalid 'action' (string)`));let i=this.validateStringRecord(e.inputMapping,`Step '${e.id}'.inputMapping`);if(i!==void 0&&i instanceof Error)return u(i);let l=this.validateStringRecord(e.outputMapping,`Step '${e.id}'.outputMapping`);if(l!==void 0&&l instanceof Error)return u(l);let d;if(e.dependsOn!==void 0){if(!Array.isArray(e.dependsOn)||!e.dependsOn.every(f=>typeof f=="string"))return u(new Error(`Step '${e.id}': 'dependsOn' must be an array of strings`));for(let f of e.dependsOn)if(!r.some(j=>j.id===f))return u(new Error(`Step '${e.id}' depends on unknown step: ${f}`));d=e.dependsOn}let p;if(e.condition!==void 0){let f=this.validateCondition(e.condition,`Step '${e.id}'.condition`);if(!f.success)return f;p=f.value}let c;if(e.skipCondition!==void 0){let f=this.validateCondition(e.skipCondition,`Step '${e.id}'.skipCondition`);if(!f.success)return f;c=f.value}let g;if(e.timeout!==void 0){if(typeof e.timeout!="number"||e.timeout<=0)return u(new Error(`Step '${e.id}': 'timeout' must be a positive number`));g=e.timeout}let $;if(e.retry!==void 0){let f=this.validateRetry(e.retry,e.id);if(!f.success)return f;$=f.value}let b;if(e.rollback!==void 0){let f=this.validateRollback(e.rollback,e.id);if(!f.success)return f;b=f.value}let R=typeof e.continueOnFailure=="boolean"?e.continueOnFailure:void 0,S;if(e.approval!==void 0){let f=this.validateApproval(e.approval,e.id);if(!f.success)return f;S=f.value}let C={id:e.id,name:e.name,domain:e.domain,action:e.action,...i!==void 0&&{inputMapping:i},...l!==void 0&&{outputMapping:l},...d!==void 0&&{dependsOn:d},...p!==void 0&&{condition:p},...c!==void 0&&{skipCondition:c},...g!==void 0&&{timeout:g},...$!==void 0&&{retry:$},...b!==void 0&&{rollback:b},...R!==void 0&&{continueOnFailure:R},...S!==void 0&&{approval:S}};t.push(C)}return w(t)}validateCondition(r,t){if(!r||typeof r!="object"||Array.isArray(r))return u(new Error(`${t}: must be an object with path, operator, value`));let n=r;return!n.path||typeof n.path!="string"?u(new Error(`${t}: missing or invalid 'path' (string)`)):!n.operator||typeof n.operator!="string"?u(new Error(`${t}: missing or invalid 'operator' (string)`)):E.includes(n.operator)?n.value===void 0?u(new Error(`${t}: missing 'value'`)):w({path:n.path,operator:n.operator,value:n.value}):u(new Error(`${t}: invalid operator '${n.operator}'. Must be one of: ${E.join(", ")}`))}validateTriggers(r){let t=[];for(let n=0;n<r.length;n++){let a=r[n];if(!a||typeof a!="object"||Array.isArray(a))return u(new Error(`Trigger at index ${n} must be an object`));let o=a;if(!o.eventType||typeof o.eventType!="string")return u(new Error(`Trigger at index ${n}: missing or invalid 'eventType' (string)`));let e;if(o.sourceDomain!==void 0){if(typeof o.sourceDomain!="string"||!y.includes(o.sourceDomain))return u(new Error(`Trigger at index ${n}: invalid 'sourceDomain' '${String(o.sourceDomain)}'`));e=o.sourceDomain}let i;if(o.condition!==void 0){let d=this.validateCondition(o.condition,`Trigger at index ${n}.condition`);if(!d.success)return d;i=d.value}let l=this.validateStringRecord(o.inputMapping,`Trigger at index ${n}.inputMapping`);if(l!==void 0&&l instanceof Error)return u(l);t.push({eventType:o.eventType,...e!==void 0&&{sourceDomain:e},...i!==void 0&&{condition:i},...l!==void 0&&{inputMapping:l}})}return w(t)}validateRetry(r,t){if(!r||typeof r!="object"||Array.isArray(r))return u(new Error(`Step '${t}': 'retry' must be an object`));let n=r;return typeof n.maxAttempts!="number"||n.maxAttempts<1?u(new Error(`Step '${t}': retry.maxAttempts must be a positive integer`)):typeof n.backoffMs!="number"||n.backoffMs<0?u(new Error(`Step '${t}': retry.backoffMs must be a non-negative number`)):w({maxAttempts:n.maxAttempts,backoffMs:n.backoffMs,...typeof n.backoffMultiplier=="number"&&{backoffMultiplier:n.backoffMultiplier}})}validateRollback(r,t){if(!r||typeof r!="object"||Array.isArray(r))return u(new Error(`Step '${t}': 'rollback' must be an object`));let n=r;return!n.domain||typeof n.domain!="string"||!y.includes(n.domain)?u(new Error(`Step '${t}': rollback.domain is invalid or missing`)):!n.action||typeof n.action!="string"?u(new Error(`Step '${t}': rollback.action is required (string)`)):w({domain:n.domain,action:n.action,...n.input!==void 0&&typeof n.input=="object"&&{input:n.input}})}validateApproval(r,t){if(typeof r=="boolean")return w(r);if(!r||typeof r!="object"||Array.isArray(r))return u(new Error(`Step '${t}': 'approval' must be a boolean or object`));let n=r,a={};if(n.autoApproveAfter!==void 0){if(typeof n.autoApproveAfter!="number"||n.autoApproveAfter<0)return u(new Error(`Step '${t}': approval.autoApproveAfter must be a non-negative number`));a.autoApproveAfter=n.autoApproveAfter}if(n.message!==void 0){if(typeof n.message!="string")return u(new Error(`Step '${t}': approval.message must be a string`));a.message=n.message}return w(a)}validateStringRecord(r,t){if(r==null)return;if(typeof r!="object"||Array.isArray(r))return new Error(`${t}: must be an object with string values`);let n=r;for(let[a,o]of Object.entries(n))if(typeof o!="string")return new Error(`${t}: value for key '${a}' must be a string, got ${typeof o}`);return n}resolveVarPath(r,t){if(t in r)return r[t];let n=t.split("."),a=r;for(let o of n){if(a==null||typeof a!="object")return;a=a[o]}return a}detectCircularDependencies(r){let t=new Set,n=new Set,a=(o,e)=>{if(n.has(o))return[...e,o].join(" -> ");if(t.has(o))return null;t.add(o),n.add(o);let i=r.find(l=>l.id===o);if(i?.dependsOn)for(let l of i.dependsOn){let d=a(l,[...e,o]);if(d)return d}return n.delete(o),null};for(let o of r){let e=a(o.id,[]);if(e)return e}return null}};function h(m){let r={};for(let t of m){let n=t.indexOf("=");if(n===-1)r[t]=!0;else{let a=t.slice(0,n),o=t.slice(n+1);o==="true"?r[a]=!0:o==="false"?r[a]=!1:!isNaN(Number(o))&&o!==""?r[a]=Number(o):r[a]=o}}return r}function T(m){return h(m)}function v(m){return m.workflowOrchestrator}function X(m,r,t){let n=new k,a=new O("pipeline").description("Manage YAML deterministic pipelines (Imp-9)");return a.command("load <file>").description("Load and register a pipeline from a YAML file").option("--vars <entries...>","Variable substitutions (key=value)").action(async(o,e)=>{if(!await t())return;let i=v(m);if(!i){console.error(s.red(' Workflow orchestrator not available. Run "aqe fleet init" first.')),await r(1);return}let l=A(o),d=e.vars?h(e.vars):void 0;console.log(s.blue(`
|
|
3
3
|
Loading pipeline from: ${o}
|
|
4
4
|
`));let p=await n.loadFromFile(l,d);if(!p.success){console.error(s.red(` Parse error: ${p.error.message}`)),await r(1);return}let c=p.value,g=i.registerWorkflow(c);if(!g.success){console.error(s.red(` Registration error: ${g.error.message}`)),await r(1);return}console.log(s.green(" Pipeline loaded successfully.")),console.log(` ID: ${s.cyan(c.id)}`),console.log(` Name: ${s.cyan(c.name)}`),console.log(` Steps: ${s.cyan(c.steps.length)}`),console.log(` Version: ${s.cyan(c.version)}`),c.tags?.length&&console.log(` Tags: ${s.cyan(c.tags.join(", "))}`),console.log(""),await r(0)}),a.command("validate <file>").description("Validate a YAML pipeline without registering it").option("--vars <entries...>","Variable substitutions (key=value)").action(async(o,e)=>{let i=A(o),l=e.vars?h(e.vars):void 0;console.log(s.blue(`
|
|
5
5
|
Validating pipeline: ${o}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a as u}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.32");process.exit(0)}
|
|
2
|
+
import{a as u}from"./chunk-JRYNHFZA.js";import{a as y,c as w}from"./chunk-5WR42V5O.js";import{b as $}from"./chunk-XHQFVTFD.js";import{Command as v}from"commander";import o from"chalk";import{existsSync as d,readFileSync as P}from"node:fs";import m from"node:path";w();var C=$({});var p=Object.keys(u);function h(s){return p.includes(s)}function x(s,e){let t=m.join(s,e.configPath),n=m.join(s,e.rulesPath);return{configExists:d(t),rulesExists:d(n)}}function E(s,e){try{let t=P(s,"utf-8");return e==="json"?{valid:!0,data:JSON.parse(t)}:e==="toml"?t.trim().length===0?{valid:!1,error:"File is empty"}:{valid:!0}:e==="yaml"?t.trim().length===0?{valid:!1,error:"File is empty"}:{valid:!0}:{valid:!0}}catch(t){return{valid:!1,error:y(t)}}}function I(s,e){try{return P(s,"utf-8").includes("agentic-qe")}catch{return!1}}function j(){let s=new v("platform").description("Manage coding agent platform configurations");return s.command("list").description("List all supported platforms and their configuration status").action(async()=>{let e=process.cwd();console.log(""),console.log(o.bold.blue(" Supported Platforms")),console.log(o.gray(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500")),console.log("");let t=18,n=36,r=14;console.log(o.gray(` ${"Platform".padEnd(t)}${"Config Path".padEnd(n)}${"Status".padEnd(r)}`)),console.log(o.gray(` ${"\u2500".repeat(t+n+r)}`));for(let l of p){let f=u[l],{configExists:c,rulesExists:a}=x(e,f),i=c&&a?o.green("configured"):c||a?o.yellow("partial"):o.gray("not configured");console.log(` ${o.white(f.name.padEnd(t))}${o.gray(f.configPath.padEnd(n))}${i}`)}console.log(""),console.log(o.gray(' Use "aqe platform setup <name>" to configure a platform')),console.log(o.gray(' Use "aqe init --with-all-platforms" to configure all at once')),console.log("")}),s.command("setup <name>").description("Set up a specific platform configuration").option("--overwrite","Overwrite existing configuration files").action(async(e,t)=>{let n=process.cwd();h(e)||(console.log(""),console.log(o.red(` Unknown platform: ${e}`)),console.log(o.gray(` Valid platforms: ${p.join(", ")}`)),console.log(""),process.exit(1));let r=u[e];console.log(""),console.log(o.bold.blue(` Setting up ${r.name}`)),console.log(o.gray(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500")),console.log("");try{let l=await C(`../../init/${e}-installer.js`),c=[`create${e.charAt(0).toUpperCase()}${e.slice(1).replace(/([a-z])([A-Z])/g,"$1$2")}Installer`,`create${R(e)}Installer`],a;for(let i of c)if(typeof l[i]=="function"){a=l[i];break}if(!a){for(let i of Object.keys(l))if(i.startsWith("create")&&i.endsWith("Installer")&&typeof l[i]=="function"){a=l[i];break}}a||(console.log(o.red(` Could not find installer factory for ${e}`)),process.exit(1));let g=await a({projectRoot:n,overwrite:t.overwrite}).install();if(g.success)console.log(o.green(` ${r.name} configured successfully`)),g.mcpConfigured&&console.log(o.gray(` MCP config: ${r.configPath}`)),g.rulesInstalled&&console.log(o.gray(` Rules: ${r.rulesPath}`));else if(console.log(o.red(` ${r.name} setup failed`)),g.errors)for(let i of g.errors)console.log(o.red(` ${i}`))}catch(l){console.log(o.red(` Failed to set up ${r.name}: ${y(l)}`))}console.log("")}),s.command("verify <name>").description("Verify a platform configuration is correct").action(async e=>{let t=process.cwd();h(e)||(console.log(""),console.log(o.red(` Unknown platform: ${e}`)),console.log(o.gray(` Valid platforms: ${p.join(", ")}`)),console.log(""),process.exit(1));let n=u[e];console.log(""),console.log(o.bold.blue(` Verifying ${n.name}`)),console.log(o.gray(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500")),console.log("");let r=!0,l=m.join(t,n.configPath);if(d(l)?console.log(o.green(` [pass] Config file exists: ${n.configPath}`)):(console.log(o.red(` [fail] Config file missing: ${n.configPath}`)),r=!1),d(l)){let c=E(l,n.configFormat);c.valid?console.log(o.green(` [pass] Config file is valid ${n.configFormat.toUpperCase()}`)):(console.log(o.red(` [fail] Config file is invalid: ${c.error}`)),r=!1),I(l,n)?console.log(o.green(" [pass] Config contains agentic-qe entry")):(console.log(o.red(" [fail] Config does not contain agentic-qe entry")),r=!1)}let f=m.join(t,n.rulesPath);d(f)?console.log(o.green(` [pass] Rules file exists: ${n.rulesPath}`)):(console.log(o.red(` [fail] Rules file missing: ${n.rulesPath}`)),r=!1),console.log(""),r?console.log(o.green(` ${n.name} configuration is valid`)):(console.log(o.yellow(` ${n.name} configuration has issues`)),console.log(o.gray(` Run "aqe platform setup ${e}" to fix`))),console.log("")}),s}function R(s){return s.charAt(0).toUpperCase()+s.slice(1)}var V=j;export{j as createPlatformCommand,V as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a as p,b as d,c as h}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.32");process.exit(0)}
|
|
2
|
+
import{a as p,b as d,c as h}from"./chunk-TX2DBLTL.js";import"./chunk-XHQFVTFD.js";import{Command as _}from"commander";import*as g from"path";import{execFileSync as v}from"child_process";var $=/^[a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+$/,w=/^[a-zA-Z0-9._\-/]+$/;function E(i,n){if(!$.test(i))throw new Error(`Invalid GitHub repo "${i}": must be owner/repo with alphanumeric, dots, hyphens, underscores only`);if(n&&!w.test(n))throw new Error(`Invalid tag "${n}": must be alphanumeric with dots, hyphens, underscores, slashes only`)}var u=class{type="github";cacheDir;constructor(n){this.cacheDir=n??g.join(process.cwd(),".agentic-qe","plugins-cache")}async resolve(n){let e=await this.getPluginPath(n),t=g.join(e,"qe-plugin.json"),o=await import("fs");if(!o.existsSync(t))throw new Error(`No qe-plugin.json found in ${n}`);let r=o.readFileSync(t,"utf-8");return p(r)}async getPluginPath(n){let{repo:e,tag:t}=this.parseLocation(n);E(e,t);let o=g.join(this.cacheDir,e.replace("/","__"),t||"latest"),r=await import("fs");if(r.existsSync(o))return o;r.mkdirSync(o,{recursive:!0});try{let a=`https://github.com/${e}.git`,c=["clone","--depth","1"];t&&c.push("--branch",t),c.push(a,o),v("git",c,{stdio:"pipe",timeout:6e4})}catch(a){throw r.rmSync(o,{recursive:!0,force:!0}),new Error(`Failed to clone ${e}: ${a instanceof Error?a.message:String(a)}`)}return o}parseLocation(n){let[e,t]=n.split("@");if(!e||!e.includes("/"))throw new Error(`Invalid GitHub location "${n}". Expected "owner/repo" or "owner/repo@tag"`);return{repo:e,tag:t}}};import*as l from"path";import*as s from"fs";import{execFileSync as y}from"child_process";var P=/^(@[a-zA-Z0-9._-]+\/)?[a-zA-Z0-9._-]+$/,S=/^[a-zA-Z0-9._\-+]+$/;function x(i,n){if(!P.test(i))throw new Error(`Invalid npm package name "${i}": contains unsafe characters`);if(n&&!S.test(n))throw new Error(`Invalid version "${n}": contains unsafe characters`)}var m=class{type="npm";cacheDir;constructor(n){this.cacheDir=n??l.join(process.cwd(),".agentic-qe","plugins-cache","npm")}async resolve(n){let e=await this.getPluginPath(n),t=l.join(e,"qe-plugin.json");if(!s.existsSync(t))throw new Error(`No qe-plugin.json found in npm package ${n}`);let o=s.readFileSync(t,"utf-8");return p(o)}async getPluginPath(n){let{name:e,version:t}=this.parseLocation(n);x(e,t);let o=e.replace(/\//g,"__"),r=l.join(this.cacheDir,`${o}@${t||"latest"}`);if(s.existsSync(r)&&s.readdirSync(r).length>0)return r;s.mkdirSync(r,{recursive:!0});try{let a=t?`${e}@${t}`:e,c=y("npm",["pack",a,"--pack-destination",r],{stdio:"pipe",timeout:6e4}).toString().trim(),f=l.join(r,c);y("tar",["-xzf",f,"-C",r,"--strip-components=1"],{stdio:"pipe"}),s.existsSync(f)&&s.unlinkSync(f)}catch(a){throw s.rmSync(r,{recursive:!0,force:!0}),new Error(`Failed to fetch npm package ${n}: ${a instanceof Error?a.message:String(a)}`)}return r}parseLocation(n){let e=n.lastIndexOf("@");return e>0?{name:n.slice(0,e),version:n.slice(e+1)||void 0}:{name:n}}};function N(){let i=I(),n=new _("plugin").description("Manage external QE domain plugins").addHelpText("after",`
|
|
3
3
|
Examples:
|
|
4
4
|
aqe plugin install ./my-plugin Install from local directory
|
|
5
5
|
aqe plugin install owner/repo --source github Install from GitHub
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.32");process.exit(0)}
|
|
2
|
+
import"./chunk-XHQFVTFD.js";import{createRequire as t}from"module";var n=t(import.meta.url),e=n("prime-radiant-advanced-wasm"),r=e,{RuvectorLayer:i,TensorCompress:a,differentiableSearch:c,hierarchicalForward:p,getCompressionLevel:s,init:d,FlashAttention:l,DotProductAttention:m,MultiHeadAttention:u,HyperbolicAttention:A,LinearAttention:f,MoEAttention:h,SonaEngine:_,pipeline:v}=e||{};export{m as DotProductAttention,l as FlashAttention,A as HyperbolicAttention,f as LinearAttention,h as MoEAttention,u as MultiHeadAttention,i as RuvectorLayer,_ as SonaEngine,a as TensorCompress,r as default,c as differentiableSearch,s as getCompressionLevel,p as hierarchicalForward,d as init,v as pipeline};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.32");process.exit(0)}
|
|
2
|
+
import{a,b}from"./chunk-2L5GAOST.js";import"./chunk-KHZRNJ3A.js";import"./chunk-NW5FYGDE.js";import"./chunk-EFEJLZDN.js";import"./chunk-5WR42V5O.js";import"./chunk-WTNM7NA4.js";import"./chunk-XHQFVTFD.js";export{a as DefaultProtocolExecutor,b as createProtocolExecutor};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.32");process.exit(0)}
|
|
2
|
+
import"./chunk-7PTW3M67.js";import{c as i}from"./chunk-OK2TFTXP.js";import"./chunk-XHQFVTFD.js";import n from"chalk";var a=class{name="protocol";description="Execute coordination protocols";cleanupAndExit;ensureInitialized;constructor(o,e){this.cleanupAndExit=o,this.ensureInitialized=e}register(o,e){o.command("protocol").description(this.description).command("run <protocolId>").description("Execute a protocol").option("--params <json>","Protocol parameters as JSON","{}").action(async(r,t)=>{await this.executeRun(r,t,e)})}async executeRun(o,e,c){if(await this.ensureInitialized())try{let r=i(e.params,"params");console.log(n.blue(`
|
|
3
3
|
Executing protocol: ${o}
|
|
4
4
|
`));let t=await c.queen.executeProtocol(o,r);t.success?(console.log(n.green(" Protocol execution started")),console.log(n.cyan(` Execution ID: ${t.value}`))):console.log(n.red(` Failed to execute protocol: ${t.error.message}`)),console.log("")}catch(r){console.error(n.red(`
|
|
5
5
|
Failed to execute protocol:`),r),await this.cleanupAndExit(1)}}getHelp(){return`
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.32");process.exit(0)}
|
|
2
|
+
import"./chunk-XHQFVTFD.js";import{Command as l}from"commander";import*as c from"crypto";import*as n from"fs";import*as r from"path";function m(t){let e=JSON.stringify(t,null,0);return c.createHash("sha256").update(e).digest("hex")}async function d(t){let e={testCount:0,passRate:0,coveragePercent:0,vulnerabilities:0,qualityScore:0,patternsUsed:0};try{let a=r.join(t,"junit.xml");if(n.existsSync(a)){let o=n.readFileSync(a,"utf-8"),s=o.match(/tests="(\d+)"/),i=o.match(/failures="(\d+)"/);if(s){e.testCount=parseInt(s[1],10);let u=i?parseInt(i[1],10):0;e.passRate=e.testCount>0?(e.testCount-u)/e.testCount*100:0}}}catch{}try{let a=r.join(t,"coverage","coverage-summary.json");if(n.existsSync(a)){let o=JSON.parse(n.readFileSync(a,"utf-8"));e.coveragePercent=o?.total?.lines?.pct??0}}catch{}try{let a=r.join(t,".agentic-qe","memory.db");n.existsSync(a)&&(e.patternsUsed=1)}catch{}return e.qualityScore=Math.round(e.passRate*.4+e.coveragePercent*.3+(e.vulnerabilities===0?100:Math.max(0,100-e.vulnerabilities*10))*.3),e}function y(t,e){let a={version:"1.0.0",timestamp:new Date().toISOString(),projectRoot:t,attestation:{testsExecuted:e.testCount>0,coverageChecked:e.coveragePercent>0,securityScanned:e.vulnerabilities===0,qualityGatePassed:e.qualityScore>=70},metrics:e,generatedBy:"agentic-qe prove"},o=m(a);return{...a,hash:o}}function f(t){return["# Proof of Quality","",`**Generated:** ${t.timestamp}`,`**Project:** ${t.projectRoot}`,`**Hash:** \`${t.hash}\``,"","## Attestation","","| Check | Status |","|-------|--------|",`| Tests Executed | ${t.attestation.testsExecuted?"PASS":"FAIL"} |`,`| Coverage Checked | ${t.attestation.coverageChecked?"PASS":"FAIL"} |`,`| Security Scanned | ${t.attestation.securityScanned?"PASS":"FAIL"} |`,`| Quality Gate | ${t.attestation.qualityGatePassed?"PASSED":"FAILED"} |`,"","## Metrics","","| Metric | Value |","|--------|-------|",`| Tests | ${t.metrics.testCount} |`,`| Pass Rate | ${t.metrics.passRate.toFixed(1)}% |`,`| Coverage | ${t.metrics.coveragePercent.toFixed(1)}% |`,`| Vulnerabilities | ${t.metrics.vulnerabilities} |`,`| Quality Score | ${t.metrics.qualityScore}/100 |`,"","---",`*${t.generatedBy}*`].join(`
|
|
3
3
|
`)}async function p(t){let e=t.projectRoot??process.cwd(),a=await d(e),o=y(e,a),s=t.format==="markdown"?f(o):JSON.stringify(o,null,2);return t.output?(n.writeFileSync(t.output,s),console.log(`Quality attestation written to ${t.output}`)):console.log(s),o}function g(t,e,a){return new l("prove").description("Generate a verifiable Proof-of-Quality attestation").option("-F, --format <format>","Output format (json|markdown)","json").option("-o, --output <path>","Write attestation to file").action(async o=>{try{await p({format:o.format,output:o.output}),await e(0)}catch(s){console.error("Failed to generate proof-of-quality:",s),await e(1)}})}export{y as buildAttestation,d as collectMetrics,g as createProveCommand,f as formatMarkdown,p as handleProve,m as hashAttestation};
|