agentic-qe 3.15.5 → 3.15.6
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/qe-court/evals/fixtures/seeded-mutant-delivery/README.md +9 -2
- package/.claude/skills/qe-court/evals/qe-court.yaml +3 -2
- package/.claude/skills/qe-quality-assessment/schemas/output.json +12 -2
- package/.claude/skills/skills-manifest.json +1 -1
- package/CHANGELOG.md +121 -0
- package/assets/skills/qe-court/evals/fixtures/seeded-mutant-delivery/README.md +9 -2
- package/assets/skills/qe-court/evals/qe-court.yaml +3 -2
- package/assets/skills/qe-quality-assessment/schemas/output.json +12 -2
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/cli/bundle.js +5 -5
- package/dist/cli/chunks/adapter-PP3XIXDV.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-CCTTGCQS.js → agent-booster-wasm-SY7UCLBL.js} +2 -2
- package/dist/cli/chunks/{agent-handler-DHYUF3NX.js → agent-handler-KAMYBU3S.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-642W7CYX.js → agent-memory-branch-2CAW3KUM.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-VDUQJKKY.js +2 -0
- package/dist/cli/chunks/{arena-NW2JVAFY.js → arena-4OFLJ3R2.js} +2 -2
- package/dist/cli/chunks/{arena-MUCC7UUN.js → arena-QCCVIOAH.js} +4 -4
- package/dist/cli/chunks/{audit-VKQTZJAA.js → audit-RBDQJQJB.js} +3 -3
- package/dist/cli/chunks/base-QSYWWPCE.js +2 -0
- package/dist/cli/chunks/{better-sqlite3-7ZUFVWLQ.js → better-sqlite3-5JRACCDQ.js} +2 -2
- package/dist/cli/chunks/{brain-handler-7LKAWSBI.js → brain-handler-W4QIIRT4.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-HUNXJKM4.js → branch-enumerator-IBNGI572.js} +2 -2
- package/dist/cli/chunks/{browser-ZSZEYUDP.js → browser-GMSCVAOI.js} +2 -2
- package/dist/cli/chunks/browser-workflow-WXXPBSCM.js +2 -0
- package/dist/cli/chunks/{chunk-RUSLEOMC.js → chunk-22OZIJAD.js} +2 -2
- package/dist/cli/chunks/{chunk-WR64BKUE.js → chunk-24ZSGYC6.js} +1 -1
- package/dist/cli/chunks/{chunk-CR2JUANW.js → chunk-2CIDFR2H.js} +3 -3
- package/dist/cli/chunks/{chunk-SDWMLT7B.js → chunk-2IWPJUVV.js} +5 -5
- package/dist/cli/chunks/{chunk-VYDNLQJN.js → chunk-2ZTWPMTK.js} +2 -2
- package/dist/cli/chunks/{chunk-WN55MNZ2.js → chunk-34MDMFET.js} +2 -2
- package/dist/cli/chunks/{chunk-D3G2NN7F.js → chunk-3DJNKNBR.js} +66 -65
- package/dist/cli/chunks/{chunk-XQRE2HWM.js → chunk-3NJ7O3OH.js} +2 -2
- package/dist/cli/chunks/chunk-45MVRQG4.js +2 -0
- package/dist/cli/chunks/chunk-46HBVDMU.js +2 -0
- package/dist/cli/chunks/{chunk-MNQ36MAF.js → chunk-47Q7JL3V.js} +2 -2
- package/dist/cli/chunks/chunk-4CLDYT36.js +2 -0
- package/dist/cli/chunks/{chunk-ORTBRO7F.js → chunk-4KOVHQXK.js} +2 -2
- package/dist/cli/chunks/{chunk-B2UHTA4Q.js → chunk-4POOJYXA.js} +1 -1
- package/dist/cli/chunks/{chunk-QXY3IRBW.js → chunk-5DH5QI7G.js} +26 -26
- package/dist/cli/chunks/{chunk-7BIYJRQJ.js → chunk-5GIJU2ZY.js} +2 -2
- package/dist/cli/chunks/{chunk-6LG5UEQE.js → chunk-5HAPS6VD.js} +2 -2
- package/dist/cli/chunks/{chunk-OU4ZAWCC.js → chunk-5LST62QR.js} +2 -2
- package/dist/cli/chunks/{chunk-Y2E3IJ53.js → chunk-5MT7DMD7.js} +2 -2
- package/dist/cli/chunks/{chunk-6UYN5PHA.js → chunk-5NC7QEJ6.js} +4 -4
- package/dist/cli/chunks/{chunk-3DTEQHFB.js → chunk-5UPIL62W.js} +3 -3
- package/dist/cli/chunks/{chunk-YINFES3E.js → chunk-5VUIXDY2.js} +2 -2
- package/dist/cli/chunks/chunk-5VZVMO7B.js +3 -0
- package/dist/cli/chunks/{chunk-JCC7QEKZ.js → chunk-624QRKQX.js} +1 -1
- package/dist/cli/chunks/{chunk-HIUNCO2W.js → chunk-66NW3ZB4.js} +2 -2
- package/dist/cli/chunks/{chunk-4AZP7ZCW.js → chunk-6HWARQWV.js} +2 -2
- package/dist/cli/chunks/{chunk-LNO5IWGH.js → chunk-6MXAJBEA.js} +1 -1
- package/dist/cli/chunks/{chunk-XNEEYXR2.js → chunk-6R3FBFCJ.js} +2 -2
- package/dist/cli/chunks/{chunk-ZT3GUYM5.js → chunk-6RDVY26I.js} +2 -2
- package/dist/cli/chunks/{chunk-W3ZGNNDV.js → chunk-6T6AHVLF.js} +1 -1
- package/dist/cli/chunks/{chunk-JANLATHN.js → chunk-6WOZUSSN.js} +2 -2
- package/dist/cli/chunks/chunk-72MQCZSM.js +2 -0
- package/dist/cli/chunks/chunk-7QVPMH25.js +3 -0
- package/dist/cli/chunks/{chunk-HLFDC4SF.js → chunk-7SAMMQVS.js} +1 -1
- package/dist/cli/chunks/{chunk-644DFAGS.js → chunk-7TJZDRDU.js} +1 -1
- package/dist/cli/chunks/{chunk-BYXNHGQC.js → chunk-7TVIX4WL.js} +2 -2
- package/dist/cli/chunks/{chunk-FBEXG4HD.js → chunk-7VTKR44N.js} +2 -2
- package/dist/cli/chunks/{chunk-UE22ODHN.js → chunk-7XTANLTN.js} +1 -1
- package/dist/cli/chunks/chunk-7XUB7U6Z.js +4 -0
- package/dist/cli/chunks/{chunk-HPLMX62I.js → chunk-A74J23QB.js} +2 -2
- package/dist/cli/chunks/{chunk-VRJPH3LG.js → chunk-A7ANPS4E.js} +2 -2
- package/dist/cli/chunks/{chunk-IHFUEPZH.js → chunk-AJT3XDRD.js} +2 -2
- package/dist/cli/chunks/{chunk-EUEHBERE.js → chunk-ALCIUWFC.js} +1 -1
- package/dist/cli/chunks/{chunk-NMJVG22Z.js → chunk-AUN4FG7V.js} +1 -1
- package/dist/cli/chunks/{chunk-DWZI3IVB.js → chunk-AUOSHM63.js} +2 -2
- package/dist/cli/chunks/{chunk-7EZLOC4K.js → chunk-AX26QJ6T.js} +2 -2
- package/dist/cli/chunks/{chunk-PDPEMBFV.js → chunk-B7RHBKHL.js} +2 -2
- package/dist/cli/chunks/{chunk-DEGWCUMY.js → chunk-BAYGQRNP.js} +2 -2
- package/dist/cli/chunks/{chunk-ONCH5AXU.js → chunk-BIXRTOH3.js} +18 -18
- package/dist/cli/chunks/{chunk-U4TV75AC.js → chunk-BO7UFNYV.js} +2 -2
- package/dist/cli/chunks/{chunk-FNAYDITO.js → chunk-BUTGIVKW.js} +1 -1
- package/dist/cli/chunks/{chunk-HBYQYGXP.js → chunk-BXATKI5S.js} +2 -2
- package/dist/cli/chunks/{chunk-BO4PKNYP.js → chunk-CCL436IU.js} +32 -27
- package/dist/cli/chunks/{chunk-XIE7OHML.js → chunk-CEXNW5TR.js} +1 -1
- package/dist/cli/chunks/{chunk-663ZFPUL.js → chunk-CLAMMGY3.js} +2 -2
- package/dist/cli/chunks/{chunk-PVAE65B4.js → chunk-CR66HNAE.js} +1 -1
- package/dist/cli/chunks/{chunk-LRASYSGV.js → chunk-CZBIREL5.js} +2 -2
- package/dist/cli/chunks/{chunk-WLIYWBQR.js → chunk-D5N2O5EH.js} +2 -2
- package/dist/cli/chunks/{chunk-A337MD3C.js → chunk-DA7DGDTI.js} +2 -2
- package/dist/cli/chunks/{chunk-WC47GICZ.js → chunk-DLSFT6PO.js} +2 -2
- package/dist/cli/chunks/{chunk-KHCALIFP.js → chunk-DQNUPEY5.js} +2 -2
- package/dist/cli/chunks/{chunk-GTSOFCMQ.js → chunk-EECF4CMA.js} +1 -1
- package/dist/cli/chunks/{chunk-5BOZCMXZ.js → chunk-EF5UHDCG.js} +1 -1
- package/dist/cli/chunks/{chunk-L6SVCNXK.js → chunk-EJ4KZFZN.js} +1 -1
- package/dist/cli/chunks/{chunk-CFPR24YK.js → chunk-ELI4GDQO.js} +2 -2
- package/dist/cli/chunks/{chunk-KJ3KBP24.js → chunk-F3KS3TAB.js} +2 -2
- package/dist/cli/chunks/{chunk-RMJ7PJOS.js → chunk-F7A2UBZO.js} +2 -2
- package/dist/cli/chunks/{chunk-U6OVPMQX.js → chunk-FOJRPEIP.js} +2 -2
- package/dist/cli/chunks/{chunk-JYY7AYGA.js → chunk-FQ5N666N.js} +1 -1
- package/dist/cli/chunks/{chunk-4XSCZVON.js → chunk-FU7LNUD7.js} +2 -2
- package/dist/cli/chunks/{chunk-OW42F2TX.js → chunk-GFB6BZWU.js} +2 -2
- package/dist/cli/chunks/{chunk-JI77KJP7.js → chunk-GI5HWS4H.js} +1 -1
- package/dist/cli/chunks/{chunk-4UXPDV7E.js → chunk-GNYOHZVV.js} +1 -1
- package/dist/cli/chunks/{chunk-VCKDVOPD.js → chunk-GVRFSXY6.js} +2 -2
- package/dist/cli/chunks/{chunk-PURHGLEC.js → chunk-GWM4M5NF.js} +1 -1
- package/dist/cli/chunks/{chunk-BY646JOM.js → chunk-HAN4MS5T.js} +2 -2
- package/dist/cli/chunks/{chunk-OGYWWZU7.js → chunk-HEGGV2PT.js} +2 -2
- package/dist/cli/chunks/{chunk-FHUJCVT3.js → chunk-HOEWMEF2.js} +2 -2
- package/dist/cli/chunks/{chunk-CXOXUBYU.js → chunk-HZFK2Z2Z.js} +1 -1
- package/dist/cli/chunks/chunk-I7WAW7TM.js +2 -0
- package/dist/cli/chunks/{chunk-E4VIVMDL.js → chunk-IEPWO4XP.js} +2 -2
- package/dist/cli/chunks/{chunk-DTJODGCE.js → chunk-ITIJ23K2.js} +2 -2
- package/dist/cli/chunks/{chunk-AQN5EDBM.js → chunk-IVJIHZSM.js} +1 -1
- package/dist/cli/chunks/{chunk-PHP4UJYP.js → chunk-JAPBSSFY.js} +1 -1
- package/dist/cli/chunks/{chunk-A2WOQO2N.js → chunk-JCE76MPP.js} +2 -2
- package/dist/cli/chunks/{chunk-A5J4XJS6.js → chunk-JPJEAK4G.js} +1 -1
- package/dist/cli/chunks/{chunk-3OAQPN2N.js → chunk-JYKQVYX2.js} +2 -2
- package/dist/cli/chunks/{chunk-MQGEZA2A.js → chunk-K55EAWZ5.js} +2 -2
- package/dist/cli/chunks/chunk-KCB6P463.js +3 -0
- package/dist/cli/chunks/{chunk-L375O3CZ.js → chunk-KIDOBLUO.js} +2 -2
- package/dist/cli/chunks/{chunk-NLDFNAOS.js → chunk-KYVIOC3C.js} +2 -2
- package/dist/cli/chunks/{chunk-CQMHDAJS.js → chunk-L2TDHJR3.js} +2 -2
- package/dist/cli/chunks/{chunk-FE3AIZI6.js → chunk-L4D3TPFP.js} +1 -1
- package/dist/cli/chunks/{chunk-VLOIEVER.js → chunk-LAY7NCQK.js} +3 -3
- package/dist/cli/chunks/{chunk-WT3JC4A6.js → chunk-LCCTJ2PC.js} +2 -2
- package/dist/cli/chunks/{chunk-VML4SG3X.js → chunk-LJCEDTUM.js} +3 -3
- package/dist/cli/chunks/{chunk-NF6AFIAX.js → chunk-LMAEMVPA.js} +1 -1
- package/dist/cli/chunks/{chunk-2XYTS2WY.js → chunk-LZWJ5BMP.js} +2 -2
- package/dist/cli/chunks/{chunk-PHAQWAEV.js → chunk-MP3FSUNB.js} +2 -2
- package/dist/cli/chunks/{chunk-IJ2EXSMO.js → chunk-MQCTLTGE.js} +2 -2
- package/dist/cli/chunks/{chunk-GRIPCYW5.js → chunk-MQTA6KIO.js} +1 -1
- package/dist/cli/chunks/{chunk-GGDKOJVF.js → chunk-NBUXM5X6.js} +10 -6
- package/dist/cli/chunks/{chunk-DPYDUKVZ.js → chunk-NHRF3V4B.js} +2 -2
- package/dist/cli/chunks/chunk-NMY4KTWA.js +16 -0
- package/dist/cli/chunks/chunk-NYS2GUNO.js +2 -0
- package/dist/cli/chunks/{chunk-AUZXRFOX.js → chunk-ONPPBLRB.js} +2 -2
- package/dist/cli/chunks/{chunk-HGBJ2QQ4.js → chunk-OPDZBRIL.js} +2 -2
- package/dist/cli/chunks/{chunk-DXVZBJE4.js → chunk-OQ4S6B7P.js} +1 -1
- package/dist/cli/chunks/{chunk-Y2WMPEUP.js → chunk-ORBODZSO.js} +2 -2
- package/dist/cli/chunks/{chunk-IJOFZBXD.js → chunk-ORFL3YXB.js} +2 -2
- package/dist/cli/chunks/{chunk-BMWAWZAN.js → chunk-P7DXVL2S.js} +2 -2
- package/dist/cli/chunks/chunk-PEMSXSP2.js +4 -0
- package/dist/cli/chunks/chunk-PS6WFCA4.js +6 -0
- package/dist/cli/chunks/{chunk-DPV33C77.js → chunk-Q2RBOC7V.js} +2 -2
- package/dist/cli/chunks/{chunk-3AYYGR6W.js → chunk-QLKUCMZC.js} +1 -1
- package/dist/cli/chunks/{chunk-EVCFUYYK.js → chunk-QLYO3H7E.js} +9 -9
- package/dist/cli/chunks/{chunk-3SH23PS3.js → chunk-QS5KZYUZ.js} +2 -2
- package/dist/cli/chunks/{chunk-3YNP33GB.js → chunk-R363XXGH.js} +2 -2
- package/dist/cli/chunks/chunk-RD5BYLN7.js +2 -0
- package/dist/cli/chunks/{chunk-MS3Z2CP5.js → chunk-RFDFET3O.js} +2 -2
- package/dist/cli/chunks/{chunk-ZLBBX24Q.js → chunk-RHIQ6QO5.js} +357 -351
- package/dist/cli/chunks/chunk-RLB7K7QP.js +2 -0
- package/dist/cli/chunks/{chunk-3YASZPLO.js → chunk-RUTO67PT.js} +2 -2
- package/dist/cli/chunks/{chunk-V7GNUVYI.js → chunk-RV6HSMKJ.js} +1 -1
- package/dist/cli/chunks/{chunk-4PT5KNXL.js → chunk-SOSJWM3E.js} +4 -4
- package/dist/cli/chunks/{chunk-6ZIDZ4TJ.js → chunk-SV5BUYHH.js} +2 -2
- package/dist/cli/chunks/{chunk-ZTC5FBL6.js → chunk-TL5GV3PR.js} +8 -8
- package/dist/cli/chunks/{chunk-GKPRECLL.js → chunk-TLUIO37P.js} +2 -2
- package/dist/cli/chunks/{chunk-FWYJ6UDX.js → chunk-TUDENMAE.js} +2 -2
- package/dist/cli/chunks/chunk-TVLOED6O.js +2 -0
- package/dist/cli/chunks/{chunk-3QD7U3FY.js → chunk-UB6DQGWM.js} +2 -2
- package/dist/cli/chunks/{chunk-SAPIRK2G.js → chunk-UHHMAKPE.js} +1 -1
- package/dist/cli/chunks/{chunk-35MDATQE.js → chunk-ULCHPPW2.js} +1 -1
- package/dist/cli/chunks/chunk-V3OLS2NG.js +2 -0
- package/dist/cli/chunks/{chunk-UXZEVIFX.js → chunk-VAYZ5QIE.js} +1 -1
- package/dist/cli/chunks/{chunk-VH3EB6ZG.js → chunk-VCONCVSY.js} +3 -3
- package/dist/cli/chunks/{chunk-QPV3OKX2.js → chunk-VVF337SV.js} +2 -2
- package/dist/cli/chunks/{chunk-XNHB6TLC.js → chunk-WKDWRRDT.js} +2 -2
- package/dist/cli/chunks/{chunk-RUJLVJDE.js → chunk-X2DR27AY.js} +2 -2
- package/dist/cli/chunks/{chunk-47GEI2LT.js → chunk-X33F7NXH.js} +3 -3
- package/dist/cli/chunks/{chunk-MB4VFAJC.js → chunk-XBEI2JBA.js} +2 -2
- package/dist/cli/chunks/{chunk-OQDC7GCM.js → chunk-XBFQJZWX.js} +2 -2
- package/dist/cli/chunks/{chunk-EAYQCBXL.js → chunk-XFPQIWEH.js} +3 -3
- package/dist/cli/chunks/{chunk-2KWI3MT3.js → chunk-XPB5BVU6.js} +2 -2
- package/dist/cli/chunks/{chunk-DL5JENWD.js → chunk-XQ53PZEF.js} +3 -3
- package/dist/cli/chunks/{chunk-BZFT4QDQ.js → chunk-XZ46CI35.js} +2 -2
- package/dist/cli/chunks/chunk-YLNYPQDR.js +2 -0
- package/dist/cli/chunks/{chunk-EOR3RECZ.js → chunk-YNG7E26C.js} +2 -2
- package/dist/cli/chunks/{chunk-6JFGB2JB.js → chunk-YXU35GGD.js} +1 -1
- package/dist/cli/chunks/{chunk-JNMUVBAJ.js → chunk-ZCP4P6O2.js} +2 -2
- package/dist/cli/chunks/{chunk-Y7GPLOXB.js → chunk-ZL5LJT7D.js} +2 -2
- package/dist/cli/chunks/{chunk-PCCIZFD7.js → chunk-ZOUEQ6DL.js} +1 -1
- package/dist/cli/chunks/{chunk-FQKEZVN6.js → chunk-ZSBD4FUX.js} +2 -2
- package/dist/cli/chunks/chunk-ZTB32K5N.js +5 -0
- package/dist/cli/chunks/{chunk-X52TMBHU.js → chunk-ZUTFHGEO.js} +1 -1
- package/dist/cli/chunks/ci-GEJCXMBK.js +81 -0
- package/dist/cli/chunks/{ci-config-XDDZOOEI.js → ci-config-2ZVV4OXL.js} +2 -2
- package/dist/cli/chunks/{ci-output-7ZUQI4U6.js → ci-output-E45OGVPR.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-ALXKCFAL.js → circuit-breaker-X73ITYZC.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-RL7K2NI2.js → claude-flow-setup-W4PPH46C.js} +2 -2
- package/dist/cli/chunks/client-6XKSQ4JT.js +2 -0
- package/dist/cli/chunks/{cline-installer-2Z2QQKC3.js → cline-installer-NUEPMWDE.js} +2 -2
- package/dist/cli/chunks/{code-QSZTDINQ.js → code-6WQHBS7G.js} +3 -3
- package/dist/cli/chunks/{code-index-extractor-5CGR5D3Y.js → code-index-extractor-BXQIFIFT.js} +2 -2
- package/dist/cli/chunks/{codex-installer-7JLSEDE5.js → codex-installer-Z337R2KH.js} +2 -2
- package/dist/cli/chunks/{completions-U4NBSXEB.js → completions-F5DMYFHV.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-WYZD2YSY.js → complexity-analyzer-W2SYPZDI.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-UPXINJFT.js → continuedev-installer-ZCHUIFTN.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-WIVYQRIF.js → copilot-installer-M5JNODXF.js} +2 -2
- package/dist/cli/chunks/core-handlers-OJYW4Y6M.js +2 -0
- package/dist/cli/chunks/{cost-tracker-RIN4JDDM.js → cost-tracker-LSYTHBHV.js} +2 -2
- package/dist/cli/chunks/coverage-PGMRS5SS.js +49 -0
- package/dist/cli/chunks/cross-domain-router-QVUPQ2SC.js +2 -0
- package/dist/cli/chunks/{cursor-installer-POM7NGCC.js → cursor-installer-XPUA73UW.js} +2 -2
- package/dist/cli/chunks/{daemon-HFGKQ6LB.js → daemon-ITKDIYMW.js} +5 -5
- package/dist/cli/chunks/daemon-QBYTCIMH.js +10 -0
- package/dist/cli/chunks/{dag-attention-scheduler-HJXM7Q5P.js → dag-attention-scheduler-T55AXLD6.js} +2 -2
- package/dist/cli/chunks/{detect-XKQGLZYN.js → detect-DR7J6K4O.js} +2 -2
- package/dist/cli/chunks/{dist-node-SSKB53QL.js → dist-node-LAJJBOUT.js} +2 -2
- package/dist/cli/chunks/{domain-handler-6BNDHATU.js → domain-handler-OMSHCRMK.js} +2 -2
- package/dist/cli/chunks/{domain-plugins-DOX54YE3.js → domain-plugins-EQXSKC5K.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-FW4ZX3Z7.js → domain-transfer-FKRAGVSW.js} +2 -2
- package/dist/cli/chunks/dream-3UABDRZJ.js +2 -0
- package/dist/cli/chunks/embed-and-insert-pattern-JZFPCNL3.js +3 -0
- package/dist/cli/chunks/{eval-K7E4XXBS.js → eval-JSNNASBW.js} +2 -2
- package/dist/cli/chunks/experience-capture-middleware-UPD3IZBK.js +40 -0
- package/dist/cli/chunks/{fast-paths-5JXXTYAG.js → fast-paths-YNMIBS2E.js} +2 -2
- package/dist/cli/chunks/{feature-flags-2CR3CO23.js → feature-flags-SRLXDKBI.js} +2 -2
- package/dist/cli/chunks/{feature-flags-RB72LHOJ.js → feature-flags-VIR7O4L7.js} +2 -2
- package/dist/cli/chunks/file-discovery-ZFGZTKZ4.js +2 -0
- package/dist/cli/chunks/{fleet-SDU7QEOA.js → fleet-K2ED46EL.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-AWCFODUV.js → gnn-wrapper-QCU4ZRYW.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-A4PJ3NFP.js → heartbeat-handler-YYQI4WZM.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-MJ6MTPDF.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-FQWJCFVW.js +2 -0
- package/dist/cli/chunks/hnsw-index-NJYKJUHC.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-KRS7SSFM.js → hnsw-legacy-bridge-C5TJSWTZ.js} +2 -2
- package/dist/cli/chunks/{hnswlib-node-OGGCPKPO.js → hnswlib-node-SE3MJJYS.js} +2 -2
- package/dist/cli/chunks/{hooks-XNRNMUBW.js → hooks-C572SRDH.js} +43 -43
- package/dist/cli/chunks/hybrid-backend-SL7RFID7.js +2 -0
- package/dist/cli/chunks/{hypergraph-engine-X35LTXYT.js → hypergraph-engine-35A6G3M5.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-M6THKAG6.js → hypergraph-handler-U2756CWI.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-5ZJTXPVC.js +2 -0
- package/dist/cli/chunks/init-handler-PCLYQUSB.js +88 -0
- package/dist/cli/chunks/init-wizard-MQMDSIOF.js +2 -0
- package/dist/cli/chunks/kernel-MEJ5GMRH.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-TEPR2ZJD.js → kilocode-installer-32PX5YH7.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-RUKHGDEE.js → kiro-installer-C4ROMMUS.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-XUBZSEZE.js +2 -0
- package/dist/cli/chunks/learning-GEPVZGJQ.js +122 -0
- package/dist/cli/chunks/{llm-router-7GECMDCP.js → llm-router-XRKTTJTX.js} +4 -4
- package/dist/cli/chunks/llm-router-service-QZAPAEPX.js +2 -0
- package/dist/cli/chunks/{load-NTJ4Y4ZR.js → load-XVH6HW7E.js} +2 -2
- package/dist/cli/chunks/load-test-OVXIQ3AF.js +2 -0
- package/dist/cli/chunks/{mcp-4335GTTG.js → mcp-IULSTM4Z.js} +2 -2
- package/dist/cli/chunks/{memory-HYC4M4XS.js → memory-6K7IAU4T.js} +5 -5
- package/dist/cli/chunks/memory-backend-TRPOMPK4.js +2 -0
- package/dist/cli/chunks/memory-handlers-CG6DRLAW.js +2 -0
- package/dist/cli/chunks/{multi-model-executor-T7FYKM6T.js → multi-model-executor-VZDUYPLX.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-3USXVT5M.js → opencode-installer-QUTXKNH4.js} +2 -2
- package/dist/cli/chunks/orchestrator-PCKKUWOP.js +452 -0
- package/dist/cli/chunks/pattern-null-store-JWYBRBZG.js +2 -0
- package/dist/cli/chunks/{pattern-usage-recorder-CMZLPX2K.js → pattern-usage-recorder-PX5HQVRL.js} +2 -2
- package/dist/cli/chunks/{pipeline-BTRZOVSL.js → pipeline-O562GTOG.js} +2 -2
- package/dist/cli/chunks/{platform-2MCRKC25.js → platform-PM7Q2AZS.js} +2 -2
- package/dist/cli/chunks/plugin-OTYTFGPY.js +27 -0
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-TXFEMBP6.js → prime-radiant-advanced-wasm-6CFXTHC2.js} +2 -2
- package/dist/cli/chunks/project-root-VVSTHIP4.js +2 -0
- package/dist/cli/chunks/protocol-executor-PXZCLZD3.js +2 -0
- package/dist/cli/chunks/{protocol-handler-DZ26OYVZ.js → protocol-handler-PPGNSAOS.js} +2 -2
- package/dist/cli/chunks/{prove-QWONEJWX.js → prove-WQ3BKRZG.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-42FRS5V3.js +2 -0
- package/dist/cli/chunks/{quality-WFH54FY7.js → quality-C5WUU3AA.js} +2 -2
- package/dist/cli/chunks/{quality-gate-ONJB7XU7.js → quality-gate-WSSRKD5U.js} +3 -3
- package/dist/cli/chunks/queen-coordinator-UI3B7DI6.js +2 -0
- package/dist/cli/chunks/real-embeddings-CFQE7IRQ.js +2 -0
- package/dist/cli/chunks/{ref-validation-HW5Y55ZC.js → ref-validation-DHKHXVZT.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-5OABDNZT.js → roocode-installer-3PPODABV.js} +2 -2
- package/dist/cli/chunks/router-HYRPWLAY.js +2 -0
- package/dist/cli/chunks/routing-feedback-BPZ5R6F3.js +2 -0
- package/dist/cli/chunks/{routing-handler-CVHVOQTC.js → routing-handler-JNXTGT6T.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-KKDKFGIQ.js → ruvector-commands-6YLROPVP.js} +2 -2
- package/dist/cli/chunks/rvf-dual-writer-DEKDQ6KO.js +2 -0
- package/dist/cli/chunks/rvf-migration-adapter-L53VBS7I.js +2 -0
- package/dist/cli/chunks/rvf-migration-coordinator-4DWB4WRK.js +2 -0
- package/dist/cli/chunks/rvf-native-adapter-I6RUGD2D.js +2 -0
- package/dist/cli/chunks/{rvf-store-integrity-UGUXKIFX.js → rvf-store-integrity-YKR2ZNBF.js} +2 -2
- package/dist/cli/chunks/safe-db-KS65XDCP.js +2 -0
- package/dist/cli/chunks/schedule-KD2VN6GB.js +2 -0
- package/dist/cli/chunks/scheduler-ZH3RMUHY.js +2 -0
- package/dist/cli/chunks/{security-7723AZZ4.js → security-PWQTGDRU.js} +3 -3
- package/dist/cli/chunks/shared-rvf-adapter-LNRLFP5I.js +2 -0
- package/dist/cli/chunks/{shared-rvf-dual-writer-ZSHYG5IA.js → shared-rvf-dual-writer-GWU6YQNS.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-6DTVME5D.js +2 -0
- package/dist/cli/chunks/{standalone-memory-MHZEEYMK.js → standalone-memory-46KKBSSV.js} +2 -2
- package/dist/cli/chunks/{status-handler-JKXPJ22K.js → status-handler-35T5FTDQ.js} +2 -2
- package/dist/cli/chunks/{structural-health-J4RKCYWF.js → structural-health-P7QPQWLO.js} +2 -2
- package/dist/cli/chunks/{sync-PDPORHVN.js → sync-W6Z4R4PL.js} +2 -2
- package/dist/cli/chunks/sync-Y43EWBSY.js +2 -0
- package/dist/cli/chunks/{task-handler-VERADM44.js → task-handler-5CX3ZYT7.js} +2 -2
- package/dist/cli/chunks/{task-handlers-4RUCWUR2.js → task-handlers-DQZGOJNE.js} +3 -3
- package/dist/cli/chunks/{test-DMBJFQNL.js → test-TPP53VVV.js} +12 -12
- package/dist/cli/chunks/{test-scheduling-LUPTVGCD.js → test-scheduling-WBV4UMQH.js} +3 -3
- package/dist/cli/chunks/token-bootstrap-GIIDXHLC.js +2 -0
- package/dist/cli/chunks/{token-usage-VOA34IKM.js → token-usage-AKK37RB7.js} +2 -2
- package/dist/cli/chunks/{transformers-GU4TYAN5.js → transformers-7MASPELS.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-MZPXAH7C.js → tree-sitter-wasm-parser-YZKD6UGB.js} +2 -2
- package/dist/cli/chunks/{types-K4FLXR2K.js → types-AZ3BTXDP.js} +2 -2
- package/dist/cli/chunks/unified-memory-FCX7NLFZ.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-VU5QJK37.js +2 -0
- package/dist/cli/chunks/unified-persistence-FM376LGE.js +2 -0
- package/dist/cli/chunks/{upgrade-M3ATDRMK.js → upgrade-L7OTDKEK.js} +2 -2
- package/dist/cli/chunks/{validate-AAP773B3.js → validate-O3QVFIGP.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-7RGAZX5F.js → validate-swarm-2UGBGLTX.js} +2 -2
- package/dist/cli/chunks/visual-security-EU7Y3X46.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-GQMRHGGI.js → web-tree-sitter-J75IYPRO.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-HG6HF2GF.js → windsurf-installer-FQ5DBFCG.js} +2 -2
- package/dist/cli/chunks/witness-chain-CSEBT52D.js +2 -0
- package/dist/cli/chunks/{witness-chain-WKU3ZIBQ.js → witness-chain-I7TN4MXZ.js} +2 -2
- package/dist/cli/chunks/witness-chain-repair-D3NE3NQK.js +2 -0
- package/dist/cli/chunks/{witness-chain-verifier-Q2KW3QEQ.js → witness-chain-verifier-RU2WOP5M.js} +2 -2
- package/dist/cli/chunks/witness-key-manager-IHQB2FR5.js +2 -0
- package/dist/cli/chunks/{workflow-CX6SHFBW.js → workflow-6BWTNVV6.js} +28 -28
- package/dist/cli/chunks/workflow-orchestrator-ALNKOM3N.js +2 -0
- package/dist/cli/chunks/wrappers-URVP25VU.js +2 -0
- package/dist/cli/commands/ci.js +47 -25
- package/dist/cli/commands/coverage.d.ts +1 -28
- package/dist/cli/commands/coverage.js +63 -134
- package/dist/cli/commands/daemon.js +7 -1
- package/dist/cli/commands/hooks-handlers/stats-hooks.d.ts +15 -0
- package/dist/cli/commands/hooks-handlers/stats-hooks.js +54 -2
- package/dist/cli/commands/learning.js +47 -7
- package/dist/cli/commands/test.js +6 -7
- package/dist/cli/commands/workflow.js +9 -5
- package/dist/cli/handlers/init-guard.d.ts +13 -0
- package/dist/cli/handlers/init-guard.js +23 -0
- package/dist/cli/handlers/init-handler.d.ts +3 -0
- package/dist/cli/handlers/init-handler.js +9 -0
- package/dist/cli/handlers/interfaces.js +5 -1
- package/dist/cli/scheduler/persistent-scheduler.d.ts +6 -2
- package/dist/cli/scheduler/persistent-scheduler.js +107 -41
- package/dist/cli/utils/ci-output.d.ts +8 -1
- package/dist/cli/utils/ci-output.js +13 -2
- package/dist/cli/utils/coverage-data.d.ts +3 -0
- package/dist/cli/utils/coverage-data.js +14 -39
- package/dist/cli/utils/coverage-verdict.d.ts +130 -0
- package/dist/cli/utils/coverage-verdict.js +193 -0
- package/dist/cli/utils/file-discovery.js +5 -0
- package/dist/coordination/deterministic-actions.js +24 -13
- package/dist/coordination/handlers/code-intelligence-handlers.d.ts +8 -0
- package/dist/coordination/handlers/code-intelligence-handlers.js +39 -0
- package/dist/coordination/handlers/coverage-handlers.js +34 -6
- package/dist/coordination/handlers/coverage-runner.d.ts +22 -0
- package/dist/coordination/handlers/coverage-runner.js +105 -10
- package/dist/coordination/handlers/coverage-target.d.ts +1 -0
- package/dist/coordination/handlers/coverage-target.js +4 -1
- package/dist/coordination/handlers/handler-types.d.ts +9 -0
- package/dist/coordination/handlers/handler-utils.d.ts +14 -1
- package/dist/coordination/handlers/handler-utils.js +46 -22
- package/dist/coordination/handlers/quality-handlers.js +108 -18
- package/dist/coordination/handlers/test-execution-handlers.js +4 -1
- package/dist/coordination/protocols/defect-investigation.d.ts +2 -1
- package/dist/coordination/protocols/defect-investigation.js +6 -3
- package/dist/coordination/protocols/quality-gate.js +10 -6
- package/dist/coordination/result-saver.d.ts +22 -0
- package/dist/coordination/result-saver.js +113 -43
- package/dist/coordination/task-executor.d.ts +7 -0
- package/dist/coordination/task-executor.js +32 -3
- package/dist/domains/code-intelligence/plugin.js +4 -0
- package/dist/domains/code-intelligence/services/metric-collector/index.js +9 -2
- package/dist/domains/code-intelligence/services/metric-collector/interfaces.d.ts +21 -0
- package/dist/domains/code-intelligence/services/metric-collector/interfaces.js +25 -0
- package/dist/domains/code-intelligence/services/metric-collector/loc-counter.d.ts +12 -0
- package/dist/domains/code-intelligence/services/metric-collector/loc-counter.js +69 -3
- package/dist/domains/code-intelligence/services/metric-collector/test-counter.js +4 -1
- package/dist/domains/coverage-analysis/collected-metrics.d.ts +33 -0
- package/dist/domains/coverage-analysis/collected-metrics.js +36 -0
- package/dist/domains/coverage-analysis/coordinator.js +18 -6
- package/dist/domains/coverage-analysis/interfaces.d.ts +44 -0
- package/dist/domains/coverage-analysis/interfaces.js +6 -1
- package/dist/domains/coverage-analysis/services/coverage-analyzer.js +61 -34
- package/dist/domains/coverage-analysis/services/gap-detector.js +7 -2
- package/dist/domains/defect-intelligence/plugin.js +4 -0
- package/dist/domains/defect-intelligence/services/defect-predictor.js +6 -4
- package/dist/domains/learning-optimization/coordinator.js +4 -0
- package/dist/domains/learning-optimization/plugin.js +4 -0
- package/dist/domains/quality-assessment/coordinator-rl-integration.d.ts +14 -0
- package/dist/domains/quality-assessment/coordinator-rl-integration.js +54 -16
- package/dist/domains/quality-assessment/coordinator.js +10 -6
- package/dist/domains/quality-assessment/coverage-report-event.d.ts +32 -8
- package/dist/domains/quality-assessment/coverage-report-event.js +28 -6
- package/dist/domains/quality-assessment/index.d.ts +1 -1
- package/dist/domains/quality-assessment/interfaces.d.ts +46 -0
- package/dist/domains/quality-assessment/quality-evidence.d.ts +48 -2
- package/dist/domains/quality-assessment/quality-evidence.js +62 -0
- package/dist/domains/quality-assessment/services/quality-analyzer.d.ts +23 -2
- package/dist/domains/quality-assessment/services/quality-analyzer.js +192 -109
- package/dist/domains/security-compliance/services/scanners/dast-scanner.js +22 -16
- package/dist/domains/test-execution/interfaces.d.ts +10 -6
- package/dist/domains/test-execution/plugin.js +4 -0
- package/dist/domains/test-execution/services/test-executor.js +152 -102
- package/dist/domains/test-generation/coordinator.js +4 -0
- package/dist/domains/test-generation/plugin.js +4 -0
- package/dist/feedback/coverage-learner.js +4 -1
- package/dist/feedback/coverage-session-provenance.d.ts +29 -0
- package/dist/feedback/coverage-session-provenance.js +39 -0
- package/dist/init/orchestrator.js +2 -0
- package/dist/init/phases/09-assets.d.ts +4 -0
- package/dist/init/phases/09-assets.js +35 -0
- package/dist/init/retired-assets.d.ts +86 -0
- package/dist/init/retired-assets.js +230 -0
- package/dist/init/skills-installer.d.ts +2 -0
- package/dist/init/skills-installer.js +4 -0
- package/dist/init/types.d.ts +3 -0
- package/dist/integrations/ruvector/rvf-native-adapter.d.ts +2 -0
- package/dist/integrations/ruvector/rvf-native-adapter.js +5 -0
- package/dist/integrations/ruvector/server-client.js +4 -12
- package/dist/kernel/project-root.d.ts +17 -0
- package/dist/kernel/project-root.js +54 -2
- package/dist/kernel/shared-dirs.d.ts +66 -0
- package/dist/kernel/shared-dirs.js +168 -0
- package/dist/learning/daily-log.js +2 -1
- package/dist/learning/experience-capture-middleware.d.ts +22 -0
- package/dist/learning/experience-capture-middleware.js +35 -0
- package/dist/learning/learnable-result.d.ts +16 -0
- package/dist/learning/learnable-result.js +24 -0
- package/dist/learning/pattern-mutation-error.d.ts +8 -0
- package/dist/learning/pattern-mutation-error.js +12 -0
- package/dist/learning/qe-reasoning-bank.d.ts +10 -0
- package/dist/learning/qe-reasoning-bank.js +50 -1
- package/dist/learning/rvf-reconcile.d.ts +39 -0
- package/dist/learning/rvf-reconcile.js +40 -0
- package/dist/learning/sqlite-persistence.d.ts +14 -0
- package/dist/learning/sqlite-persistence.js +36 -0
- package/dist/mcp/bundle.js +516 -504
- package/dist/mcp/handlers/domain-handler-configs.d.ts +31 -1
- package/dist/mcp/handlers/domain-handler-configs.js +37 -3
- package/dist/mcp/handlers/handler-factory.js +40 -14
- package/dist/mcp/protocol-server.js +27 -2
- package/dist/mcp/tool-cache-scope.d.ts +31 -0
- package/dist/mcp/tool-cache-scope.js +71 -0
- package/dist/mcp/tools/code-intelligence/analyze.js +5 -3
- package/dist/mcp/types.d.ts +4 -0
- package/dist/optimization/session-cache.d.ts +19 -1
- package/dist/optimization/session-cache.js +36 -2
- package/dist/plugins/cache.js +2 -1
- package/dist/plugins/sources/github.js +2 -1
- package/dist/plugins/sources/npm.js +2 -1
- package/dist/shared/aqe-managed-dirs.d.ts +24 -0
- package/dist/shared/aqe-managed-dirs.js +56 -0
- package/dist/shared/events/domain-events.d.ts +18 -3
- package/dist/shared/events/domain-events.js +4 -0
- package/dist/shared/http/http-client.d.ts +6 -0
- package/dist/shared/http/http-client.js +13 -15
- package/dist/shared/io/file-reader.d.ts +26 -0
- package/dist/shared/io/file-reader.js +111 -17
- package/dist/shared/llm/providers/response-deadline.d.ts +7 -2
- package/dist/shared/llm/providers/response-deadline.js +17 -5
- package/dist/shared/metrics/code-metrics.d.ts +24 -0
- package/dist/shared/metrics/code-metrics.js +93 -6
- package/dist/shared/metrics/index.d.ts +1 -1
- package/dist/workers/interfaces.d.ts +9 -1
- package/dist/workers/quality-daemon/coverage-delta.d.ts +4 -3
- package/dist/workers/quality-daemon/coverage-delta.js +13 -6
- package/dist/workers/quality-daemon/index.js +6 -5
- package/dist/workers/quality-daemon/notification-service.js +3 -3
- package/dist/workers/quality-daemon/persistent-memory.d.ts +2 -2
- package/dist/workers/quality-daemon/persistent-memory.js +2 -2
- package/dist/workers/worker-manager.js +5 -1
- package/dist/workers/workers/coverage-tracker.js +69 -33
- package/dist/workers/workers/regression-monitor.d.ts +18 -1
- package/dist/workers/workers/regression-monitor.js +276 -117
- package/package.json +1 -1
- package/dist/cli/chunks/adapter-EGIPTX5H.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-WP4GCBDT.js +0 -2
- package/dist/cli/chunks/base-6ORFD62I.js +0 -2
- package/dist/cli/chunks/browser-workflow-PIXGERWP.js +0 -2
- package/dist/cli/chunks/chunk-2WFTZSRT.js +0 -2
- package/dist/cli/chunks/chunk-7YB2KELI.js +0 -5
- package/dist/cli/chunks/chunk-BBL6YXD3.js +0 -2
- package/dist/cli/chunks/chunk-BJ5P4IV2.js +0 -2
- package/dist/cli/chunks/chunk-DFPL5N3Q.js +0 -16
- package/dist/cli/chunks/chunk-DLY4YEN3.js +0 -2
- package/dist/cli/chunks/chunk-ERGWWI4Y.js +0 -3
- package/dist/cli/chunks/chunk-KZVJW2SD.js +0 -2
- package/dist/cli/chunks/chunk-L336HFFE.js +0 -2
- package/dist/cli/chunks/chunk-N2TJNIHA.js +0 -2
- package/dist/cli/chunks/chunk-RCXMUEZN.js +0 -3
- package/dist/cli/chunks/chunk-SEZLYRCS.js +0 -2
- package/dist/cli/chunks/chunk-TDLKXLJC.js +0 -4
- package/dist/cli/chunks/chunk-WOZIXXY5.js +0 -7
- package/dist/cli/chunks/ci-KP4GZKJ7.js +0 -81
- package/dist/cli/chunks/client-C3KHVRM6.js +0 -2
- package/dist/cli/chunks/core-handlers-KSQM6Q6S.js +0 -2
- package/dist/cli/chunks/coverage-SPFVHRRU.js +0 -43
- package/dist/cli/chunks/coverage-target-GSRBNHXE.js +0 -2
- package/dist/cli/chunks/cross-domain-router-CTGNOVCF.js +0 -2
- package/dist/cli/chunks/daemon-M5TD5Y6T.js +0 -10
- package/dist/cli/chunks/dream-MIK2E4UL.js +0 -2
- package/dist/cli/chunks/embed-and-insert-pattern-QST77T2B.js +0 -3
- package/dist/cli/chunks/experience-capture-middleware-X66IYSRV.js +0 -40
- package/dist/cli/chunks/file-discovery-3NHRUQQB.js +0 -2
- package/dist/cli/chunks/heartbeat-scheduler-OCKRACUW.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-X67XG73C.js +0 -2
- package/dist/cli/chunks/hnsw-index-I7KCQBQR.js +0 -2
- package/dist/cli/chunks/hybrid-backend-FOUHTKAK.js +0 -2
- package/dist/cli/chunks/impact-analyzer-GXYVX46O.js +0 -2
- package/dist/cli/chunks/init-handler-2AXMXHYF.js +0 -86
- package/dist/cli/chunks/init-wizard-C2MRX2QG.js +0 -2
- package/dist/cli/chunks/kernel-Q2IUDIDC.js +0 -2
- package/dist/cli/chunks/knowledge-graph-E2Z6K5EE.js +0 -2
- package/dist/cli/chunks/learning-BEA26RNA.js +0 -122
- package/dist/cli/chunks/llm-router-service-YATYFEDD.js +0 -2
- package/dist/cli/chunks/load-test-LV77JXWA.js +0 -2
- package/dist/cli/chunks/memory-backend-XME3X3QX.js +0 -2
- package/dist/cli/chunks/memory-handlers-VG47X5DX.js +0 -2
- package/dist/cli/chunks/orchestrator-VHUXUYIM.js +0 -452
- package/dist/cli/chunks/pattern-null-store-TAXMLENP.js +0 -2
- package/dist/cli/chunks/plugin-2VAYWAO3.js +0 -27
- package/dist/cli/chunks/project-root-CFFPBGPX.js +0 -2
- package/dist/cli/chunks/protocol-executor-ML76QAVQ.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-LUZH6RYV.js +0 -2
- package/dist/cli/chunks/queen-coordinator-EWXNIXB6.js +0 -2
- package/dist/cli/chunks/real-embeddings-GZV4VKK4.js +0 -2
- package/dist/cli/chunks/router-MXOBVEBF.js +0 -2
- package/dist/cli/chunks/routing-feedback-T6CCRUEK.js +0 -2
- package/dist/cli/chunks/rvf-dual-writer-WHXVT3V3.js +0 -2
- package/dist/cli/chunks/rvf-migration-adapter-JFPWIRCG.js +0 -2
- package/dist/cli/chunks/rvf-migration-coordinator-D4KUBNRZ.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-KOXR7TJL.js +0 -2
- package/dist/cli/chunks/safe-db-CI6IPSIN.js +0 -2
- package/dist/cli/chunks/schedule-X4HW6TVJ.js +0 -2
- package/dist/cli/chunks/scheduler-KCNJ2ON3.js +0 -2
- package/dist/cli/chunks/shared-rvf-adapter-KEQ5CLNI.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-PGHU6VUR.js +0 -2
- package/dist/cli/chunks/sync-EFWXMA2H.js +0 -2
- package/dist/cli/chunks/token-bootstrap-S346YBVO.js +0 -2
- package/dist/cli/chunks/unified-memory-6CK3TUNQ.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-A7BWBGYN.js +0 -2
- package/dist/cli/chunks/unified-persistence-GEPMDBQZ.js +0 -2
- package/dist/cli/chunks/visual-security-L4J7LQWT.js +0 -2
- package/dist/cli/chunks/witness-chain-CDUMX623.js +0 -2
- package/dist/cli/chunks/witness-chain-repair-WNYH6O4L.js +0 -2
- package/dist/cli/chunks/witness-key-manager-NQ5DAAC4.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-USJDWVDR.js +0 -2
- package/dist/cli/chunks/wrappers-CZDI6Z3X.js +0 -2
- /package/.claude/skills/qe-court/evals/fixtures/seeded-mutant-delivery/{budget.test.ts → budget-tests.ts.fixture} +0 -0
- /package/.claude/skills/qe-court/evals/fixtures/seeded-mutant-delivery/{budget.ts → budget.ts.fixture} +0 -0
- /package/.claude/skills/testability-scoring/resources/templates/{testability-scoring.spec.template.js → testability-scoring-spec.template.js} +0 -0
- /package/assets/skills/qe-court/evals/fixtures/seeded-mutant-delivery/{budget.test.ts → budget-tests.ts.fixture} +0 -0
- /package/assets/skills/qe-court/evals/fixtures/seeded-mutant-delivery/{budget.ts → budget.ts.fixture} +0 -0
- /package/assets/skills/testability-scoring/resources/templates/{testability-scoring.spec.template.js → testability-scoring-spec.template.js} +0 -0
|
@@ -1,10 +0,0 @@
|
|
|
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.15.5");process.exit(0)}
|
|
2
|
-
import{b as te}from"./chunk-7YB2KELI.js";import{a as y,b as _}from"./chunk-MS3Z2CP5.js";import{b as Z}from"./chunk-2KWI3MT3.js";import{a as ee}from"./chunk-EVCFUYYK.js";import"./chunk-5BOZCMXZ.js";import"./chunk-LNO5IWGH.js";import{c as X}from"./chunk-NF6AFIAX.js";import"./chunk-CXOXUBYU.js";import{a as j,r as Y}from"./chunk-SDWMLT7B.js";import{b as J}from"./chunk-6ZIDZ4TJ.js";import"./chunk-DL5JENWD.js";import"./chunk-Y2WMPEUP.js";import"./chunk-ZTC5FBL6.js";import"./chunk-4UXPDV7E.js";import"./chunk-4PT5KNXL.js";import"./chunk-4AZP7ZCW.js";import"./chunk-FNAYDITO.js";import"./chunk-A5J4XJS6.js";import"./chunk-V7GNUVYI.js";import"./chunk-OW42F2TX.js";import"./chunk-PDPEMBFV.js";import"./chunk-NMJVG22Z.js";import"./chunk-FHUJCVT3.js";import"./chunk-CQMHDAJS.js";import"./chunk-GGDKOJVF.js";import"./chunk-L6SVCNXK.js";import"./chunk-663ZFPUL.js";import{o as R,s as ie}from"./chunk-EOR3RECZ.js";import"./chunk-RUJLVJDE.js";import"./chunk-RUSLEOMC.js";import"./chunk-KHCALIFP.js";import"./chunk-2XYTS2WY.js";import"./chunk-3YASZPLO.js";import"./chunk-MQGEZA2A.js";import"./chunk-OU4ZAWCC.js";import"./chunk-OQDC7GCM.js";import"./chunk-RMJ7PJOS.js";import"./chunk-EAYQCBXL.js";import"./chunk-Y2E3IJ53.js";import"./chunk-AQN5EDBM.js";import{a as w}from"./chunk-3AYYGR6W.js";import"./chunk-OGYWWZU7.js";import"./chunk-L336HFFE.js";import"./chunk-E4VIVMDL.js";import"./chunk-WLIYWBQR.js";import{a as b,e as V}from"./chunk-NLDFNAOS.js";import"./chunk-VRJPH3LG.js";import"./chunk-3QD7U3FY.js";import{b as U}from"./chunk-KZVJW2SD.js";import"./chunk-UE22ODHN.js";import"./chunk-N2TJNIHA.js";import"./chunk-IHFUEPZH.js";import"./chunk-U6OVPMQX.js";import"./chunk-HLFDC4SF.js";var B=class{handlers=[];async publish(e){for(let t of this.handlers)try{t(e)}catch(n){console.debug("[WorkerManager] Event handler error:",n instanceof Error?n.message:n)}}subscribe(e){return this.handlers.push(e),()=>{let t=this.handlers.indexOf(e);t>=0&&this.handlers.splice(t,1)}}dispose(){this.handlers=[]}get handlerCount(){return this.handlers.length}},G=class{store=new Map;async get(e){return this.store.get(e)}async set(e,t){this.store.set(e,t)}async search(e){let t=e.replace(/[.+?^${}()|[\]\\]/g,"\\$&"),n=new RegExp(t.replace(/\*/g,".*"));return Array.from(this.store.keys()).filter(s=>n.test(s))}clear(){this.store.clear()}get size(){return this.store.size}},O=class{constructor(e){this.workerId=e}workerId;format(e,t,n){let s=new Date().toISOString(),r=n?` ${JSON.stringify(n)}`:"";return`[${s}] [${e}] [${this.workerId}] ${t}${r}`}debug(e,t){process.env.DEBUG&&console.debug(this.format("DEBUG",e,t))}info(e,t){console.info(this.format("INFO",e,t))}warn(e,t){console.warn(this.format("WARN",e,t))}error(e,t){console.error(this.format("ERROR",e,t))}},L=class{constructor(e){this.kernelGetter=e}kernelGetter;getDomainAPI(e){let t=this.kernelGetter();if(t)return t.getDomainAPI(e)}getDomainHealth(e){let t=this.kernelGetter();if(!t)return{status:"unknown",errors:["Kernel not available"]};let s=t.getHealth().domains[e];return s?{status:s.status,errors:s.errors||[]}:{status:"unknown",errors:[`Domain ${e} not found`]}}},H=class{getDomainAPI(e){}getDomainHealth(e){return{status:"healthy",errors:[]}}},N=class{workers=new Map;timers=new Map;abortControllers=new Map;eventBus;memory;domainAccess;running=!1;kernelRef;constructor(e){this.eventBus=e?.eventBus??new B,this.memory=e?.memory??new G,this.kernelRef=e?.kernel,e?.domainAccess?this.domainAccess=e.domainAccess:e?.kernel?this.domainAccess=new L(()=>this.kernelRef):this.domainAccess=new H}setKernel(e){this.kernelRef=e,this.domainAccess instanceof H&&(this.domainAccess=new L(()=>this.kernelRef))}setMemory(e){this.memory=e}register(e){if(this.workers.has(e.config.id))throw new Error(`Worker ${e.config.id} is already registered`);this.workers.set(e.config.id,e)}unregister(e){this.workers.get(e)&&(this.stopWorker(e),this.workers.delete(e))}get(e){return this.workers.get(e)}list(){return Array.from(this.workers.values())}async startAll(){this.running=!0;for(let e of Array.from(this.workers.values()))e.config.enabled&&await this.startWorker(e)}async stopAll(){this.running=!1;let e=[];for(let t of Array.from(this.workers.keys()))e.push(this.stopWorker(t));await Promise.all(e)}async runNow(e){let t=this.workers.get(e);if(!t)throw new Error(`Worker ${e} not found`);let n=this.timers.get(e);n&&clearTimeout(n);let s=new AbortController;this.abortControllers.set(e,s);let r=this.createContext(e,s.signal),i=await t.execute(r);return this.running&&t.config.enabled&&t.status!=="stopped"&&this.scheduleNextRun(t),i}getHealth(){let e={},t=0,n=0,s=0,r=0;for(let[a,o]of Array.from(this.workers.entries())){let c=o.getHealth();switch(e[a]=c,r+=c.healthScore,o.status){case"running":t++;break;case"paused":n++;break;case"error":s++;break}}let i=this.workers.size>0?Math.round(r/this.workers.size):100;return{totalWorkers:this.workers.size,runningWorkers:t,pausedWorkers:n,errorWorkers:s,healthScore:i,workers:e}}onWorkerEvent(e){return this.eventBus.subscribe(e)}async startWorker(e){await e.initialize();let t=new AbortController;this.abortControllers.set(e.config.id,t);let n=this.createContext(e.config.id,t.signal);try{await e.execute(n)}catch(s){console.error(`Worker ${e.config.id} initial execution failed:`,s)}this.scheduleNextRun(e)}async stopWorker(e){let t=this.timers.get(e);t&&(clearTimeout(t),this.timers.delete(e));let n=this.abortControllers.get(e);n&&(n.abort(),this.abortControllers.delete(e));let s=this.workers.get(e);s&&await s.stop()}scheduleNextRun(e){let t=setTimeout(async()=>{if(!this.running||e.status==="stopped"||e.status==="paused")return;let n=new AbortController;this.abortControllers.set(e.config.id,n);let s=this.createContext(e.config.id,n.signal);try{await e.execute(s)}catch(r){console.error(`Worker ${e.config.id} execution failed:`,r)}this.running&&e.config.enabled&&e.status!=="error"&&this.scheduleNextRun(e)},e.config.intervalMs);t.unref?.(),this.timers.set(e.config.id,t)}createContext(e,t){return{eventBus:this.eventBus,memory:this.memory,logger:new O(e),domains:this.domainAccess,signal:t}}};V();var ne={id:"test-health",name:"Test Health Monitor",description:"Monitors test suite health metrics including pass rates, execution times, and reliability",intervalMs:300*1e3,priority:"high",targetDomains:["test-execution","test-generation"],enabled:!0,timeoutMs:6e4,retryCount:2,retryDelayMs:5e3},M=class extends y{previousMetrics;constructor(){super(ne)}async doExecute(e){let t=Date.now();e.logger.info("Starting test health analysis");let n=[],s=[],r=await this.collectMetrics(e);this.analyzePassRate(r,n,s),this.analyzeExecutionTime(r,n,s),this.analyzeReliability(r,n,s),this.analyzeGrowth(r,n,s),this.compareToPrevious(r,n,s),await e.memory.set("test-health:previous-metrics",r),this.previousMetrics=r;let i=this.calculateHealthScore(r),a=this.determineTrend(r);return e.logger.info("Test health analysis complete",{healthScore:i,findingsCount:n.length}),this.createResult(Date.now()-t,{itemsAnalyzed:r.totalTests,issuesFound:n.length,healthScore:i,trend:a,domainMetrics:{passRate:`${(r.passingTests/r.totalTests*100).toFixed(1)}%`,avgExecutionTime:`${r.avgExecutionTimeMs}ms`,reliability:`${r.reliability}%`,totalTests:r.totalTests}},n,s)}async collectMetrics(e){let t=await e.memory.get("test-health:previous-metrics");if(t&&(this.previousMetrics=t),!e.domains.getDomainAPI("test-execution"))throw new Error("Test-execution domain not available - cannot compute health metrics. Ensure the test-execution domain is properly initialized before running this worker.");try{let s=await e.memory.search("test-health:run-result:*");if(s.length===0)throw new Error('No test run data found in memory - cannot compute health metrics. Run some tests first or ensure test results are being stored with keys matching "test-health:run-result:*".');let r=0,i=0,a=0,o=0,c=0,l=0;for(let p of s.slice(0,50)){let g=await e.memory.get(p);g&&(r+=g.total,i+=g.passed,a+=g.failed,o+=g.skipped,c+=g.duration,l++)}let m=l>0?Math.round(c/l):0,d=r>0?Math.round(i/r*100):0,f=await e.memory.get("test-health:growth-metrics");return{totalTests:r||0,passingTests:i||0,failingTests:a||0,skippedTests:o||0,avgExecutionTimeMs:m,reliability:d,growth:{testsAddedLast7Days:f?.testsAddedLast7Days||0,testsRemovedLast7Days:f?.testsRemovedLast7Days||0}}}catch(s){let r=b(s);throw new Error(`Failed to collect test health metrics: ${r}. Check memory service connectivity and test result data availability.`)}}analyzePassRate(e,t,n){let s=e.passingTests/e.totalTests*100;s<95&&(t.push({type:"low-pass-rate",severity:s<90?"high":"medium",domain:"test-execution",title:"Low Test Pass Rate",description:`Test pass rate is ${s.toFixed(1)}%, below the 95% target`,context:{passing:e.passingTests,failing:e.failingTests,total:e.totalTests}}),n.push({priority:"p1",domain:"test-execution",action:"Investigate Failing Tests",description:`${e.failingTests} tests are currently failing. Review and fix to improve pass rate.`,estimatedImpact:"high",effort:"medium",autoFixable:!1}))}analyzeExecutionTime(e,t,n){e.avgExecutionTimeMs>500&&(t.push({type:"slow-tests",severity:e.avgExecutionTimeMs>1e3?"high":"medium",domain:"test-execution",title:"Slow Test Execution",description:`Average test execution time is ${e.avgExecutionTimeMs}ms, consider optimization`,context:{avgExecutionTimeMs:e.avgExecutionTimeMs}}),n.push({priority:"p2",domain:"test-execution",action:"Optimize Test Execution Time",description:"Review and optimize slow-running tests. Consider parallelization or mocking slow dependencies.",estimatedImpact:"medium",effort:"medium",autoFixable:!1}))}analyzeReliability(e,t,n){e.reliability<95&&(t.push({type:"reliability-issue",severity:e.reliability<85?"high":"medium",domain:"test-execution",title:"Test Reliability Concern",description:`Test reliability score is ${e.reliability}%, indicating potential flaky tests`,context:{reliability:e.reliability}}),n.push({priority:"p1",domain:"test-execution",action:"Address Flaky Tests",description:"Identify and fix flaky tests to improve overall test reliability.",estimatedImpact:"high",effort:"medium",autoFixable:!1}))}analyzeGrowth(e,t,n){let s=e.growth.testsAddedLast7Days-e.growth.testsRemovedLast7Days;s<0&&(t.push({type:"test-coverage-decline",severity:"medium",domain:"test-generation",title:"Test Coverage Declining",description:`Net loss of ${Math.abs(s)} tests in the last 7 days`,context:{added:e.growth.testsAddedLast7Days,removed:e.growth.testsRemovedLast7Days}}),n.push({priority:"p2",domain:"test-generation",action:"Review Test Coverage Strategy",description:"More tests are being removed than added. Ensure adequate test coverage is maintained.",estimatedImpact:"medium",effort:"low",autoFixable:!1}))}compareToPrevious(e,t,n){if(!this.previousMetrics)return;let s=e.passingTests/e.totalTests-this.previousMetrics.passingTests/this.previousMetrics.totalTests;s<-.05&&t.push({type:"pass-rate-regression",severity:"high",domain:"test-execution",title:"Pass Rate Regression Detected",description:`Pass rate dropped by ${(Math.abs(s)*100).toFixed(1)}% since last check`,context:{previousPassRate:`${(this.previousMetrics.passingTests/this.previousMetrics.totalTests*100).toFixed(1)}%`,currentPassRate:`${(e.passingTests/e.totalTests*100).toFixed(1)}%`}})}calculateHealthScore(e){let t=e.passingTests/e.totalTests*40,n=e.reliability/100*30,s=Math.max(0,20-e.avgExecutionTimeMs/100),r=Math.min(10,e.growth.testsAddedLast7Days/10*10);return Math.round(t+n+s+r)}determineTrend(e){if(!this.previousMetrics)return"stable";let t=e.passingTests/e.totalTests,n=this.previousMetrics.passingTests/this.previousMetrics.totalTests;return t>n+.02?"improving":t<n-.02?"degrading":"stable"}};var se={id:"coverage-tracker",name:"Coverage Tracker",description:"Tracks coverage trends over time including gaps, hotspots, and critical paths",intervalMs:600*1e3,priority:"high",targetDomains:["coverage-analysis","test-generation"],enabled:!0,timeoutMs:12e4,retryCount:2,retryDelayMs:1e4},P=class extends y{constructor(){super(se)}async doExecute(e){let t=Date.now();e.logger.info("Starting coverage tracking analysis");let n=[],s=[],r=await this.collectCoverageTrend(e),i=await this.identifyCoverageGaps(e);this.analyzeCoverageThresholds(r.current,n,s),this.analyzeCoverageGaps(i,n,s),this.analyzeCoverageTrends(r,n,s),await e.memory.set("coverage:current",r.current),await e.memory.set("coverage:gaps",i);let a=this.calculateHealthScore(r.current,i);return e.logger.info("Coverage tracking complete",{healthScore:a,findingsCount:n.length,gapsFound:i.length}),this.createResult(Date.now()-t,{itemsAnalyzed:i.length+4,issuesFound:n.length,healthScore:a,trend:this.determineTrend(r),domainMetrics:{lineCoverage:`${r.current.line}%`,branchCoverage:`${r.current.branch}%`,functionCoverage:`${r.current.function}%`,statementCoverage:`${r.current.statement}%`,gapsCount:i.length}},n,s)}async collectCoverageTrend(e){let t=await e.memory.get("coverage:current"),n=await e.memory.get("coverage:latest");return{current:{line:n?.line??0,branch:n?.branch??0,function:n?.function??0,statement:n?.statement??0,timestamp:new Date},previous:t}}async identifyCoverageGaps(e){let t=await e.memory.search("gap-pattern:*");if(t.length>0){let n=[];for(let s of t){let r=await e.memory.get(s);r&&typeof r.riskScore=="number"&&n.push(r)}if(n.length>0)return n}return[]}analyzeCoverageThresholds(e,t,n){let s={line:80,branch:70,function:80,statement:80};e.line<s.line&&t.push({type:"low-line-coverage",severity:e.line<60?"high":"medium",domain:"coverage-analysis",title:"Line Coverage Below Threshold",description:`Line coverage is ${e.line}%, below ${s.line}% target`,context:{current:e.line,target:s.line}}),e.branch<s.branch&&(t.push({type:"low-branch-coverage",severity:e.branch<50?"high":"medium",domain:"coverage-analysis",title:"Branch Coverage Below Threshold",description:`Branch coverage is ${e.branch}%, below ${s.branch}% target`,context:{current:e.branch,target:s.branch}}),n.push({priority:"p1",domain:"test-generation",action:"Improve Branch Coverage",description:"Add tests for uncovered conditional branches. Focus on complex decision points.",estimatedImpact:"high",effort:"medium",autoFixable:!0})),e.function<s.function&&t.push({type:"low-function-coverage",severity:"medium",domain:"coverage-analysis",title:"Function Coverage Below Threshold",description:`Function coverage is ${e.function}%, below ${s.function}% target`,context:{current:e.function,target:s.function}})}analyzeCoverageGaps(e,t,n){let s=e.filter(i=>i.riskScore>.8);for(let i of s)t.push({type:"high-risk-coverage-gap",severity:"high",domain:"coverage-analysis",title:"High-Risk Coverage Gap",description:`${i.file} has ${i.uncoveredLines} uncovered lines with complexity ${i.complexity}`,resource:i.file,context:{uncoveredLines:i.uncoveredLines,totalLines:i.totalLines,coveragePercent:((i.totalLines-i.uncoveredLines)/i.totalLines*100).toFixed(1),complexity:i.complexity,riskScore:i.riskScore}});s.length>0&&n.push({priority:"p0",domain:"test-generation",action:"Address High-Risk Coverage Gaps",description:`${s.length} files have high-risk coverage gaps. Prioritize testing for complex, uncovered code.`,estimatedImpact:"high",effort:"high",autoFixable:!0});let r=e.filter(i=>(i.totalLines-i.uncoveredLines)/i.totalLines<.5);r.length>0&&t.push({type:"critical-coverage-gaps",severity:"critical",domain:"coverage-analysis",title:"Critical Coverage Gaps Detected",description:`${r.length} files have less than 50% coverage`,context:{files:r.map(i=>i.file)}})}analyzeCoverageTrends(e,t,n){if(!e.previous)return;let s=e.current.line-e.previous.line,r=e.current.branch-e.previous.branch;s<-2&&(t.push({type:"coverage-regression",severity:s<-5?"high":"medium",domain:"coverage-analysis",title:"Coverage Regression Detected",description:`Line coverage dropped by ${Math.abs(s).toFixed(1)}% since last check`,context:{previous:e.previous.line,current:e.current.line,change:s}}),n.push({priority:"p1",domain:"test-generation",action:"Investigate Coverage Regression",description:"Recent changes have reduced code coverage. Review new code and add missing tests.",estimatedImpact:"high",effort:"medium",autoFixable:!1})),r<-3&&t.push({type:"branch-coverage-regression",severity:"medium",domain:"coverage-analysis",title:"Branch Coverage Regression",description:`Branch coverage dropped by ${Math.abs(r).toFixed(1)}%`,context:{previous:e.previous.branch,current:e.current.branch,change:r}})}calculateHealthScore(e,t){let n=e.line/100*25,s=e.branch/100*25,r=e.function/100*20,i=e.statement/100*20,a=t.filter(c=>c.riskScore>.8).length,o=Math.max(0,10-a*2);return Math.round(n+s+r+i+o)}determineTrend(e){if(!e.previous)return"stable";let t=(e.current.line+e.current.branch+e.current.function+e.current.statement)/4,n=(e.previous.line+e.previous.branch+e.previous.function+e.previous.statement)/4;return t>n+1?"improving":t<n-1?"degrading":"stable"}};var ae={id:"flaky-detector",name:"Flaky Test Detector",description:"Detects flaky test patterns through statistical analysis of test execution history",intervalMs:900*1e3,priority:"high",targetDomains:["test-execution"],enabled:!0,timeoutMs:18e4,retryCount:2,retryDelayMs:1e4},x=class extends y{constructor(){super(ae)}async doExecute(e){let t=Date.now();e.logger.info("Starting flaky test detection");let n=[],s=[],r=await this.collectTestHistory(e),i=this.detectFlakyTests(r);this.generateFindings(i,n,s),await e.memory.set("flaky:detected",i),await e.memory.set("flaky:lastAnalysis",new Date().toISOString());let a=this.calculateHealthScore(r.length,i);return e.logger.info("Flaky test detection complete",{healthScore:a,testsAnalyzed:r.length,flakyTestsFound:i.length}),this.createResult(Date.now()-t,{itemsAnalyzed:r.length,issuesFound:i.length,healthScore:a,trend:"stable",domainMetrics:{testsAnalyzed:r.length,flakyTests:i.length,flakinessRate:`${(i.length/r.length*100).toFixed(1)}%`,avgFlakinessScore:i.length>0?(i.reduce((o,c)=>o+c.flakinessScore,0)/i.length).toFixed(1):"0"}},n,s)}async collectTestHistory(e){if(!e.domains.getDomainAPI("test-execution"))throw new Error("Test-execution domain not available - cannot detect flaky tests. Ensure the test-execution domain is properly initialized before running this worker.");let n=await e.memory.search("flaky:history:*");if(n.length===0)throw new Error('No test execution history found in memory - cannot detect flaky tests. Run tests multiple times and ensure history is stored with keys matching "flaky:history:*" before running this worker.');let s=[],r=[];for(let i of n)try{let a=await e.memory.get(i);a&&s.push(a)}catch{r.push(i)}if(s.length===0)throw new Error(`Found ${n.length} test history keys but failed to retrieve any data. Failed keys: ${r.slice(0,5).join(", ")}${r.length>5?"...":""}. Check memory service connectivity and data format.`);return s}detectFlakyTests(e){let t=[];for(let n of e){let s=this.analyzeTestFlakiness(n);s.flakinessScore>20&&t.push(s)}return t.sort((n,s)=>s.flakinessScore-n.flakinessScore)}analyzeTestFlakiness(e){let t=e.executions,s=t.filter(p=>p.passed).length/t.length,r=t.map(p=>p.durationMs),i=r.reduce((p,g)=>p+g,0)/r.length,a=r.reduce((p,g)=>p+Math.pow(g-i,2),0)/r.length,c=Math.sqrt(a)/i,l=t.slice(-5).filter(p=>!p.passed).length,m=this.determinePattern(e,c),d=0;s>0&&s<1&&(d+=(1-s)*50),c>.5&&(d+=Math.min(25,c*10)),d+=l*5;let f=this.suggestFix(m);return{testId:e.testId,testName:e.testName,file:e.file,flakinessScore:Math.min(100,Math.round(d)),pattern:m,passRate:s*100,avgDuration:i,durationVariance:c,recentFailures:l,suggestedFix:f}}determinePattern(e,t){let n=e.executions.filter(r=>!r.passed);if(t>1||n.some(r=>r.error?.includes("Timeout")))return"timing";if(n.some(r=>r.error?.includes("Resource")||r.error?.includes("connection")))return"resource";if(n.some(r=>r.error?.includes("Race")||r.error?.includes("async")))return"intermittent";let s=e.executions.map(r=>r.passed);return this.hasOrderPattern(s)?"order-dependent":"intermittent"}hasOrderPattern(e){let t=e.map((r,i)=>r?-1:i).filter(r=>r>=0);if(t.length<2)return!1;let n=t.every(r=>r%2===0),s=t.every(r=>r%2===1);return n||s}suggestFix(e){switch(e){case"timing":return"Add explicit waits, increase timeouts, or use async utilities like waitFor";case"resource":return"Ensure proper resource cleanup, use test isolation, or implement connection pooling";case"order-dependent":return"Make tests independent, reset state in beforeEach, avoid shared mutable state";case"intermittent":return"Add retry logic, investigate race conditions, or use proper synchronization";default:return"Review test for potential issues with async operations or shared state"}}generateFindings(e,t,n){let s=e.filter(o=>o.flakinessScore>=70),r=e.filter(o=>o.flakinessScore>=50&&o.flakinessScore<70),i=e.filter(o=>o.flakinessScore>=20&&o.flakinessScore<50);for(let o of s)t.push({type:"critical-flaky-test",severity:"critical",domain:"test-execution",title:`Critical Flaky Test: ${o.testName}`,description:`Test has ${o.flakinessScore}% flakiness score with ${o.passRate.toFixed(0)}% pass rate`,resource:o.file,context:{testId:o.testId,pattern:o.pattern,recentFailures:o.recentFailures,suggestedFix:o.suggestedFix}});for(let o of r)t.push({type:"high-flaky-test",severity:"high",domain:"test-execution",title:`Flaky Test: ${o.testName}`,description:`Test has ${o.flakinessScore}% flakiness score (${o.pattern} pattern)`,resource:o.file,context:{testId:o.testId,pattern:o.pattern,suggestedFix:o.suggestedFix}});for(let o of i)t.push({type:"medium-flaky-test",severity:"medium",domain:"test-execution",title:`Potentially Flaky Test: ${o.testName}`,description:`Test shows flakiness indicators (score: ${o.flakinessScore}%)`,resource:o.file,context:{testId:o.testId,pattern:o.pattern}});s.length>0&&n.push({priority:"p0",domain:"test-execution",action:"Fix Critical Flaky Tests",description:`${s.length} tests have critical flakiness. These severely impact CI reliability.`,estimatedImpact:"high",effort:"high",autoFixable:!1});let a=e.filter(o=>o.pattern==="timing");a.length>0&&n.push({priority:"p1",domain:"test-execution",action:"Address Timing-Related Flakiness",description:`${a.length} tests have timing issues. Consider using proper async utilities.`,estimatedImpact:"medium",effort:"medium",autoFixable:!1})}calculateHealthScore(e,t){if(e===0)return 100;let n=t.length/e,s=t.length>0?t.reduce((a,o)=>a+o.flakinessScore,0)/t.length:0,r=100;r-=n*50,r-=s/100*30;let i=t.filter(a=>a.flakinessScore>=70).length;return r-=i*5,Math.max(0,Math.round(r))}};var oe={id:"security-scan",name:"Security Vulnerability Scanner",description:"Scans for security vulnerabilities in dependencies, code patterns, and configurations",intervalMs:1800*1e3,priority:"critical",targetDomains:["security-compliance"],enabled:!0,timeoutMs:3e5,retryCount:3,retryDelayMs:3e4},S=class extends y{constructor(){super(oe)}async doExecute(e){let t=Date.now();e.logger.info("Starting security vulnerability scan");let n=[],s=[],r=await this.runSecurityScans(e);this.analyzeDependencyVulnerabilities(r.dependencyVulnerabilities,n,s),this.analyzeCodeSecurityIssues(r.codeSecurityIssues,n,s),r.secretsDetected>0&&this.reportSecretsDetected(r.secretsDetected,n,s),await e.memory.set("security:lastScan",r),await e.memory.set("security:lastScanTime",new Date().toISOString());let i=this.calculateHealthScore(r),a=r.dependencyVulnerabilities.length+r.codeSecurityIssues.length+r.secretsDetected+r.configurationIssues;return e.logger.info("Security scan complete",{healthScore:i,totalIssues:a,criticalIssues:r.dependencyVulnerabilities.filter(o=>o.severity==="critical").length+r.codeSecurityIssues.filter(o=>o.severity==="critical").length}),this.createResult(Date.now()-t,{itemsAnalyzed:a,issuesFound:n.length,healthScore:i,trend:"stable",domainMetrics:{dependencyVulnerabilities:r.dependencyVulnerabilities.length,codeSecurityIssues:r.codeSecurityIssues.length,secretsDetected:r.secretsDetected,configurationIssues:r.configurationIssues,scanDuration:`${r.scanDurationMs}ms`}},n,s)}async runSecurityScans(e){return{dependencyVulnerabilities:[{package:"lodash",version:"4.17.15",severity:"high",cve:"CVE-2021-23337",title:"Command Injection",description:"Lodash versions prior to 4.17.21 are vulnerable to Command Injection via the template function.",fixedIn:"4.17.21"},{package:"minimist",version:"1.2.5",severity:"critical",cve:"CVE-2021-44906",title:"Prototype Pollution",description:"Prototype pollution vulnerability allows attackers to manipulate JavaScript object prototypes.",fixedIn:"1.2.6"}],codeSecurityIssues:[{file:"src/shared/http/http-client.ts",line:45,rule:"no-eval",severity:"high",message:"Avoid using eval() as it can execute arbitrary code",category:"injection"},{file:"src/kernel/memory-backend.ts",line:122,rule:"sql-injection",severity:"medium",message:"Potential SQL injection - use parameterized queries",category:"injection"}],secretsDetected:0,configurationIssues:1,scanDurationMs:2500}}analyzeDependencyVulnerabilities(e,t,n){let s=e.filter(i=>i.severity==="critical"),r=e.filter(i=>i.severity==="high");for(let i of s)t.push({type:"critical-vulnerability",severity:"critical",domain:"security-compliance",title:`Critical Vulnerability in ${i.package}`,description:`${i.title}: ${i.description}`,resource:i.package,context:{cve:i.cve,currentVersion:i.version,fixedIn:i.fixedIn}});for(let i of r)t.push({type:"high-vulnerability",severity:"high",domain:"security-compliance",title:`High Severity Vulnerability in ${i.package}`,description:`${i.title}: ${i.description}`,resource:i.package,context:{cve:i.cve,currentVersion:i.version,fixedIn:i.fixedIn}});s.length>0&&n.push({priority:"p0",domain:"security-compliance",action:"Update Critical Vulnerabilities Immediately",description:`${s.length} packages have critical vulnerabilities. Update immediately to patched versions.`,estimatedImpact:"high",effort:"low",autoFixable:!0}),r.length>0&&n.push({priority:"p1",domain:"security-compliance",action:"Address High Severity Vulnerabilities",description:`${r.length} packages have high severity vulnerabilities. Plan updates within current sprint.`,estimatedImpact:"high",effort:"low",autoFixable:!0})}analyzeCodeSecurityIssues(e,t,n){let s=new Map;for(let a of e){let o=s.get(a.category)||[];o.push(a),s.set(a.category,o)}for(let a of e)t.push({type:`code-security-${a.category}`,severity:a.severity,domain:"security-compliance",title:`Security Issue: ${a.rule}`,description:a.message,resource:`${a.file}:${a.line}`,context:{rule:a.rule,category:a.category}});let r=s.get("injection")||[];r.length>0&&n.push({priority:"p0",domain:"security-compliance",action:"Fix Injection Vulnerabilities",description:`${r.length} potential injection vulnerabilities found. Use parameterized queries and avoid eval().`,estimatedImpact:"high",effort:"medium",autoFixable:!1});let i=s.get("crypto")||[];i.length>0&&n.push({priority:"p1",domain:"security-compliance",action:"Review Cryptographic Implementations",description:`${i.length} cryptographic issues found. Ensure using secure algorithms and proper key management.`,estimatedImpact:"high",effort:"high",autoFixable:!1})}reportSecretsDetected(e,t,n){t.push({type:"secrets-detected",severity:"critical",domain:"security-compliance",title:"Secrets Detected in Codebase",description:`${e} potential secrets/credentials found in source code`,context:{count:e}}),n.push({priority:"p0",domain:"security-compliance",action:"Remove Secrets from Codebase",description:"Immediately rotate any exposed credentials and move them to secure secret management.",estimatedImpact:"high",effort:"medium",autoFixable:!1})}calculateHealthScore(e){let t=100,n=e.dependencyVulnerabilities.filter(a=>a.severity==="critical").length;t-=n*20;let s=e.dependencyVulnerabilities.filter(a=>a.severity==="high").length;t-=s*10;let r=e.codeSecurityIssues.filter(a=>a.severity==="critical").length;t-=r*15;let i=e.codeSecurityIssues.filter(a=>a.severity==="high").length;return t-=i*8,t-=e.secretsDetected*30,t-=e.configurationIssues*5,Math.max(0,Math.round(t))}};var ce={id:"quality-gate",name:"Quality Gate Evaluator",description:"Continuously evaluates quality gates and release readiness across all quality dimensions",intervalMs:300*1e3,priority:"critical",targetDomains:["quality-assessment"],enabled:!0,timeoutMs:12e4,retryCount:2,retryDelayMs:5e3},W=class extends y{constructor(){super(ce)}async doExecute(e){let t=Date.now();e.logger.info("Starting quality gate evaluation");let n=[],s=[],r=await this.evaluateQualityGates(e);this.analyzeGateResults(r,n,s),this.checkBlockers(r,n,s),await this.compareToHistory(e,r,n),await e.memory.set("quality-gate:current",r),await e.memory.set("quality-gate:lastCheck",new Date().toISOString());let i=await e.memory.get("quality-gate:history")||[];i.push(r),i.length>100&&i.shift(),await e.memory.set("quality-gate:history",i);let a=this.calculateHealthScore(r);return e.logger.info("Quality gate evaluation complete",{healthScore:a,passed:r.passed,releaseReady:r.releaseReady,blockers:r.blockers}),this.createResult(Date.now()-t,{itemsAnalyzed:r.rules.length,issuesFound:r.failedRules,healthScore:a,trend:"stable",domainMetrics:{gatePassed:r.passed?"YES":"NO",releaseReady:r.releaseReady?"YES":"NO",passedRules:r.passedRules,failedRules:r.failedRules,blockers:r.blockers,warnings:r.warnings}},n,s)}async evaluateQualityGates(e){let t=[{id:"coverage-line",name:"Line Coverage",category:"coverage",threshold:80,operator:"gte",currentValue:78.5,unit:"%",blocking:!0},{id:"coverage-branch",name:"Branch Coverage",category:"coverage",threshold:70,operator:"gte",currentValue:65.2,unit:"%",blocking:!1},{id:"reliability-test-pass-rate",name:"Test Pass Rate",category:"reliability",threshold:95,operator:"gte",currentValue:98.2,unit:"%",blocking:!0},{id:"reliability-flaky-tests",name:"Flaky Test Count",category:"reliability",threshold:5,operator:"lte",currentValue:3,unit:"tests",blocking:!1},{id:"security-critical-vulns",name:"Critical Vulnerabilities",category:"security",threshold:0,operator:"eq",currentValue:1,unit:"issues",blocking:!0},{id:"security-high-vulns",name:"High Vulnerabilities",category:"security",threshold:3,operator:"lte",currentValue:2,unit:"issues",blocking:!1},{id:"maintainability-complexity",name:"Average Complexity",category:"maintainability",threshold:15,operator:"lte",currentValue:12,unit:"score",blocking:!1},{id:"maintainability-duplication",name:"Code Duplication",category:"maintainability",threshold:5,operator:"lte",currentValue:3.2,unit:"%",blocking:!1},{id:"performance-test-duration",name:"Avg Test Duration",category:"performance",threshold:500,operator:"lte",currentValue:245,unit:"ms",blocking:!1}],n=0,s=0,r=0,i=0;for(let a of t)this.evaluateRule(a)?n++:(s++,a.blocking?r++:i++);return{passed:r===0,passedRules:n,failedRules:s,blockers:r,warnings:i,releaseReady:r===0&&i<=2,rules:t}}evaluateRule(e){switch(e.operator){case"gte":return e.currentValue>=e.threshold;case"lte":return e.currentValue<=e.threshold;case"eq":return e.currentValue===e.threshold;default:return!1}}analyzeGateResults(e,t,n){for(let i of e.rules)if(!this.evaluateRule(i)){let a=i.blocking?"critical":"medium";t.push({type:"quality-gate-failure",severity:a,domain:"quality-assessment",title:`Quality Gate Failed: ${i.name}`,description:`${i.name} is ${i.currentValue}${i.unit}, threshold is ${i.operator==="gte"?">=":i.operator==="lte"?"<=":"="} ${i.threshold}${i.unit}`,context:{ruleId:i.id,category:i.category,currentValue:i.currentValue,threshold:i.threshold,blocking:i.blocking}})}let s=e.rules.filter(i=>i.category==="coverage"&&!this.evaluateRule(i));s.length>0&&n.push({priority:s.some(i=>i.blocking)?"p0":"p2",domain:"quality-assessment",action:"Improve Test Coverage",description:`${s.length} coverage gates are failing. Add tests to increase coverage.`,estimatedImpact:"high",effort:"medium",autoFixable:!0}),e.rules.filter(i=>i.category==="security"&&!this.evaluateRule(i)).length>0&&n.push({priority:"p0",domain:"quality-assessment",action:"Address Security Issues",description:"Security gates are failing. Resolve vulnerabilities before release.",estimatedImpact:"high",effort:"medium",autoFixable:!1})}checkBlockers(e,t,n){e.blockers>0?(t.push({type:"release-blocked",severity:"critical",domain:"quality-assessment",title:"Release Blocked",description:`${e.blockers} blocking issues prevent release`,context:{blockers:e.blockers,blockingRules:e.rules.filter(s=>s.blocking&&!this.evaluateRule(s)).map(s=>s.name)}}),n.push({priority:"p0",domain:"quality-assessment",action:"Resolve Release Blockers",description:"Address all blocking quality gate failures before proceeding with release.",estimatedImpact:"high",effort:"medium",autoFixable:!1})):e.releaseReady||t.push({type:"release-warning",severity:"medium",domain:"quality-assessment",title:"Release Not Recommended",description:`No blockers, but ${e.warnings} warnings suggest caution`,context:{warnings:e.warnings}})}async compareToHistory(e,t,n){let s=await e.memory.get("quality-gate:current");s&&(s.passed&&!t.passed&&n.push({type:"quality-gate-regression",severity:"high",domain:"quality-assessment",title:"Quality Gate Regression",description:"Quality gates were passing previously but are now failing",context:{previousBlockers:s.blockers,currentBlockers:t.blockers}}),!s.passed&&t.passed&&n.push({type:"quality-gate-improvement",severity:"info",domain:"quality-assessment",title:"Quality Gates Now Passing",description:"All quality gates are now passing after previous failures",context:{previousFailures:s.failedRules,currentFailures:t.failedRules}}))}calculateHealthScore(e){if(e.rules.length===0)return 100;let n=e.passedRules/e.rules.length*70;return n-=e.blockers*15,n-=e.warnings*5,e.releaseReady&&(n+=10),Math.max(0,Math.min(100,Math.round(n)))}};ie();V();function re(h,e={}){let t=e.retentionDays??30;return h.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='dream_insights'").get()?{pruned:h.prepare(`DELETE FROM dream_insights
|
|
3
|
-
WHERE applied = 0
|
|
4
|
-
AND created_at < datetime('now', ?)`).run(`-${t} days`).changes}:{pruned:0}}var le={id:"learning-consolidation",name:"Learning Consolidation",description:"Consolidates learning patterns across domains and optimizes strategies",intervalMs:1800*1e3,priority:"normal",targetDomains:["learning-optimization"],enabled:!0,timeoutMs:3e5,retryCount:2,retryDelayMs:3e4},ue="learning:consolidation-cursor:",T=1,Q=30,F=class extends y{lifecycleManager=null;lastRunTimestamp=0;constructor(){super(le)}async getLifecycleManager(){if(this.lifecycleManager)return this.lifecycleManager;try{let e=R();await e.initialize();let t=e.getDatabase();return this.lifecycleManager=ee(t,{promotionRewardThreshold:.7,promotionMinOccurrences:2,promotionMinSuccessRate:.7,deprecationFailureThreshold:3,staleDaysThreshold:30,confidenceDecayRate:.01,minActiveConfidence:.3}),this.lifecycleManager}catch(e){return console.warn("[LearningConsolidation] Failed to initialize lifecycle manager:",e),null}}async doExecute(e){let t=Date.now();e.logger.info("Starting learning consolidation (Phase 7: Continuous Learning Loop)");let n=[],s=[],r={success:!1};try{let i=0,a=0,o=0,c=0,l=0,m=0,d=0,f=0,p=await this.getLifecycleManager();if(p){let k=await this.runContinuousLearningLoop(e,p,n,s);i=k.experiencesProcessed,a=k.patternCandidatesFound,o=k.patternsPromoted,c=k.patternsDeprecated,l=k.confidenceDecayApplied,m=k.patternsMined,d=k.domainsMined,f=k.dreamInsightsPruned}let g=await this.collectPatterns(e),u=await this.consolidatePatterns(e,g);u.experiencesProcessed=i,u.patternCandidatesFound=a,u.patternsPromoted=o,u.patternsDeprecated=c,u.confidenceDecayApplied=l,u.patternsMined=m,u.domainsMined=d,u.dreamInsightsPruned=f,this.identifyCrossDomainPatterns(g,n,s),this.pruneIneffectivePatterns(g,n,s),this.generateOptimizations(g,n,s);let z=await this.runDreamCycle(e,g,n,s);u.dreamInsights=z.insights,u.dreamPatternsCreated=z.patternsCreated,await e.memory.set("learning:lastConsolidation",u),await e.memory.set("learning:consolidatedPatterns",g),r={success:!0},this.lastRunTimestamp=Date.now();let v=this.calculateHealthScore(u,g);return e.logger.info("Learning consolidation complete",{healthScore:v,patternsAnalyzed:u.patternsAnalyzed,newInsights:u.newInsights,experiencesProcessed:i,patternsPromoted:o,patternsDeprecated:c}),this.createResult(Date.now()-t,{itemsAnalyzed:u.patternsAnalyzed,issuesFound:u.patternsPruned+u.patternsDeprecated,healthScore:v,trend:this.determineTrend(u),domainMetrics:{patternsAnalyzed:u.patternsAnalyzed,patternsPruned:u.patternsPruned,patternsConsolidated:u.patternsConsolidated,newInsights:u.newInsights,crossDomainPatterns:u.crossDomainPatterns,dreamInsights:u.dreamInsights,dreamPatternsCreated:u.dreamPatternsCreated,experiencesProcessed:u.experiencesProcessed,patternCandidatesFound:u.patternCandidatesFound,patternsPromoted:u.patternsPromoted,patternsDeprecated:u.patternsDeprecated,confidenceDecayApplied:u.confidenceDecayApplied,patternsMined:u.patternsMined,domainsMined:u.domainsMined,dreamInsightsPruned:u.dreamInsightsPruned}},n,s)}catch(i){throw r={success:!1,error:i instanceof Error?i.message:String(i)},i}finally{try{await j(e.memory,"learningWorker",r)}catch(a){e.logger.warn("recordLoopHealth failed (non-fatal)",{error:a instanceof Error?a.message:String(a)})}let i=J(U());try{await i.initialize(),await i.saveSnapshot()}catch(a){e.logger.warn("learning_daily_snapshots saveSnapshot failed (non-fatal)",{error:a instanceof Error?a.message:String(a)})}finally{i.close()}}}async runContinuousLearningLoop(e,t,n,s){e.logger.info("Running continuous learning loop (Phase 7)");let r=0,i=0,a=0,o=0,c=0,l=0,m=0,d=0;try{let f=t.getRecentExperiences({minReward:.7,limit:100,sinceDays:7});if(r=f.length,f.length>0){e.logger.debug("Processing recent experiences",{count:f.length});let v=t.findPatternCandidates(f);if(i=v.length,v.length>0){let k=await this.createPatternsFromCandidates(v);n.push({type:"pattern-extraction",severity:"info",domain:"learning-optimization",title:"New Patterns Extracted from Experiences",description:`${k} new patterns extracted from ${r} high-reward experiences`,context:{candidatesFound:i,patternsCreated:k,topCandidate:v[0]?.name}})}}let p=t.promoteEligiblePatterns();a=p.promoted,a>0&&n.push({type:"pattern-promotion",severity:"info",domain:"learning-optimization",title:"Patterns Promoted to Long-Term",description:`${a} patterns promoted after meeting quality thresholds`,context:{checked:p.checked,promoted:a}});let g=t.deprecateStalePatterns();o=g.deprecated,o>0&&(n.push({type:"pattern-deprecation",severity:"low",domain:"learning-optimization",title:"Underperforming Patterns Deprecated",description:`${o} patterns deprecated due to failures, staleness, or low confidence`,context:{checked:g.checked,deprecated:o}}),s.push({priority:"p3",domain:"learning-optimization",action:"Review Deprecated Patterns",description:`${o} patterns were deprecated. Review for potential recovery or permanent removal.`,estimatedImpact:"low",effort:"low",autoFixable:!1}));try{let k=R().getDatabase(),q=new Z;await q.initialize(k);let D=await q.consolidateAll();(D.merged>0||D.archived>0)&&n.push({type:"experience-consolidation",severity:"info",domain:"learning-optimization",title:"Experiences Consolidated",description:`${D.merged} merged, ${D.archived} archived across ${D.domainsProcessed.length} domains`,context:{merged:D.merged,archived:D.archived,activeRemaining:D.activeRemaining,domains:D.domainsProcessed}})}catch(v){e.logger.warn("Experience consolidation failed",{error:b(v)})}let u=this.lastRunTimestamp>0?(Date.now()-this.lastRunTimestamp)/(1e3*60*60*24):1;u>=.5&&(c=t.applyConfidenceDecay(Math.min(u,7)).decayed);let z=t.getStats();this.addLifecycleStatsFinding(z,n,s);try{let v=await this.mineExperiencesPerDomain(e,n);l=v.patternsMined,m=v.domainsMined}catch(v){e.logger.warn("Pattern mining sweep failed",{error:b(v)})}try{let k=R().getDatabase();d=re(k,{retentionDays:Q}).pruned,d>0&&n.push({type:"dream-insights-pruned",severity:"info",domain:"learning-optimization",title:"Stale Dream Insights Pruned",description:`${d} unapplied dream insights older than ${Q} days deleted`,context:{pruned:d,retentionDays:Q}})}catch(v){e.logger.warn("Dream insights pruning failed",{error:b(v)})}e.logger.info("Continuous learning loop complete",{experiencesProcessed:r,patternCandidatesFound:i,patternsPromoted:a,patternsDeprecated:o,confidenceDecayApplied:c,patternsMined:l,domainsMined:m,dreamInsightsPruned:d})}catch(f){e.logger.warn("Continuous learning loop partially failed",{error:b(f)})}return{experiencesProcessed:r,patternCandidatesFound:i,patternsPromoted:a,patternsDeprecated:o,confidenceDecayApplied:c,patternsMined:l,domainsMined:m,dreamInsightsPruned:d}}async mineExperiencesPerDomain(e,t){let n=e.domains.getDomainAPI("learning-optimization");if(!n||typeof n.getLearningService!="function")return e.logger.debug("mineExperiencesPerDomain: learning-optimization API unavailable"),{patternsMined:0,domainsMined:0};let s=n.getLearningService();if(!s)return e.logger.debug("mineExperiencesPerDomain: learning service not initialized"),{patternsMined:0,domainsMined:0};let r=new Date,i=0,a=0;for(let o of w){let c=`${ue}${o}`,l;try{let m=await e.memory.get(c);if(m){let d=new Date(m);if(!isNaN(d.getTime())&&d<r){let f=new Date(r.getTime()-T*24*60*60*1e3);l=d>f?d:f}else l=new Date(r.getTime()-T*24*60*60*1e3)}else l=new Date(r.getTime()-T*24*60*60*1e3)}catch{l=new Date(r.getTime()-T*24*60*60*1e3)}try{let m=X.create(l,r),d=await s.mineExperiences(o,m);if(!d.success){e.logger.debug(`mineExperiences failed for ${o}`,{error:b(d.error)});continue}let{experienceCount:f,patterns:p}=d.value;f>0&&(i+=p.length,a++,await e.memory.set(c,r.toISOString()))}catch(m){e.logger.debug(`mineExperiences threw for ${o}`,{error:b(m)})}}return i>0&&t.push({type:"pattern-mining",severity:"info",domain:"learning-optimization",title:"Patterns Mined from Experience Replay",description:`${i} patterns mined into learning:pattern:* kv across ${a} domain(s) since their last consolidation tick`,context:{patternsMined:i,domainsMined:a,lookbackDays:T}}),{patternsMined:i,domainsMined:a}}async createPatternsFromCandidates(e){let t=0;try{let s=R().getDatabase();for(let r of e)try{let{v4:i}=await import("./dist-node-SSKB53QL.js"),a=i(),o=`Auto-extracted pattern from ${r.sourceExperiences} experiences. Avg reward: ${r.avgReward.toFixed(3)}`;s.prepare(`
|
|
5
|
-
INSERT INTO qe_patterns (
|
|
6
|
-
id, pattern_type, qe_domain, domain, name, description,
|
|
7
|
-
confidence, usage_count, success_rate, quality_score, tier,
|
|
8
|
-
template_json, context_json, created_at, last_used_at, successful_uses
|
|
9
|
-
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, datetime('now'), datetime('now'), ?)
|
|
10
|
-
`).run(a,r.patternType,r.domain,r.domain,r.name,o,r.confidence,r.sourceExperiences,r.successRate,r.confidence*.3+Math.min(r.sourceExperiences,100)/100*.2+r.successRate*.5,"short-term",JSON.stringify({type:"workflow",content:r.templateContent,variables:[]}),JSON.stringify({tags:r.actions,sourceType:"experience-extraction",extractedAt:new Date().toISOString()}),Math.round(r.sourceExperiences*r.successRate));let{ensurePatternEmbedding:c}=await import("./embed-and-insert-pattern-QST77T2B.js");await c(s,a,r.name,o,r.actions),t++}catch(i){console.debug("[LearningConsolidation] Failed to create pattern:",i)}}catch(n){console.warn("[LearningConsolidation] Pattern creation batch failed:",n)}return t}addLifecycleStatsFinding(e,t,n){t.push({type:"lifecycle-stats",severity:"info",domain:"learning-optimization",title:"Pattern Lifecycle Statistics",description:`Active: ${e.activePatterns}, Promoted: ${e.promotedPatterns}, Deprecated: ${e.deprecatedPatterns}`,context:{total:e.totalPatterns,active:e.activePatterns,shortTerm:e.shortTermPatterns,longTerm:e.longTermPatterns,deprecated:e.deprecatedPatterns,avgConfidence:e.avgConfidence.toFixed(3),avgSuccessRate:e.avgSuccessRate.toFixed(3),nearDeprecation:e.patternsNearDeprecation}}),e.patternsNearDeprecation>0&&n.push({priority:"p2",domain:"learning-optimization",action:"Review At-Risk Patterns",description:`${e.patternsNearDeprecation} patterns are near deprecation threshold. Consider improving their usage or archiving them.`,estimatedImpact:"medium",effort:"low",autoFixable:!1}),e.avgSuccessRate<.6&&n.push({priority:"p2",domain:"learning-optimization",action:"Improve Pattern Quality",description:`Average success rate (${(e.avgSuccessRate*100).toFixed(1)}%) is below target. Focus on quality over quantity.`,estimatedImpact:"high",effort:"medium",autoFixable:!1})}determineTrend(e){let t=e.patternsPromoted/Math.max(1,e.patternsAnalyzed),n=e.patternsDeprecated/Math.max(1,e.patternsAnalyzed),s=e.patternCandidatesFound/Math.max(1,e.experiencesProcessed);return t>.1&&s>.2?"improving":n>.2||e.patternsPruned>e.newInsights?"degrading":"stable"}async collectPatterns(e){let t=[],n=[];for(let s of w)try{let r=await this.getDomainPatterns(e,s);t.push(...r)}catch(r){let i=b(r);n.push(`${s}: ${i}`),e.logger.warn(`Failed to collect patterns from ${s}`,{error:r})}if(t.length===0&&n.length>0)throw new Error(`Failed to collect any learning patterns. Errors from domains: ${n.join("; ")}. Ensure at least one domain is available and has pattern data.`);if(t.length===0)throw new Error("No learning patterns to consolidate yet. Patterns accumulate as the captured-experience bridge feeds hook activity into the learning-optimization domain \u2014 first runs may be empty until a kernel-owning process (CLI/MCP) has been alive long enough to drain the captured_experiences table.");return t}async getDomainPatterns(e,t){let n=e.domains.getDomainAPI("learning-optimization");if(!n)throw new Error(`Learning-optimization domain not available for ${t} - cannot retrieve patterns. Ensure the learning-optimization domain is properly initialized.`);let s=await n.getPatternStats(t);if(!s.success)throw new Error(`Failed to get pattern stats for ${t}: Unknown error. Check domain service health and data availability.`);return!s.value||!s.value.topPatterns||s.value.topPatterns.length===0?(e.logger.debug(`No patterns found for domain ${t}`),[]):s.value.topPatterns.map(i=>({id:i.id,domain:i.domain,type:i.type,pattern:i.name,confidence:i.confidence,occurrences:i.usageCount,lastSeen:new Date(i.lastUsedAt),effectiveness:i.successRate}))}async consolidatePatterns(e,t){let n=0,s=0,r=0,i=new Map;for(let l of t){let m=`${l.type}:${l.pattern}`,d=i.get(m)||[];d.push(l),i.set(m,d)}for(let[,l]of Array.from(i.entries()))l.length>1&&(s+=l.length-1);n=t.filter(l=>l.confidence<.5).length;let o=t.filter(l=>{let m=(Date.now()-l.lastSeen.getTime())/864e5;return l.effectiveness>.8&&m<7});r=o.length;let c=this.findCrossDomainPatterns(t);return await e.memory.set("learning:insights",{recentHighPerformers:o,crossDomainPatterns:c,timestamp:new Date().toISOString()}),{patternsAnalyzed:t.length,patternsPruned:n,patternsConsolidated:s,newInsights:r,strategyUpdates:0,crossDomainPatterns:c.length,dreamInsights:0,dreamPatternsCreated:0,experiencesProcessed:0,patternCandidatesFound:0,patternsPromoted:0,patternsDeprecated:0,confidenceDecayApplied:0,experiencesMerged:0,experiencesArchived:0,patternsMined:0,domainsMined:0,dreamInsightsPruned:0}}async runDreamCycle(e,t,n,s){if(t.length<10)return e.logger.debug("Skipping dream cycle - insufficient patterns",{patternCount:t.length,required:10}),{insights:0,patternsCreated:0};let r=null;try{r=new Y,await r.initialize();let i=t.map(c=>({id:c.id,name:c.pattern,description:`${c.type} pattern from ${c.domain} (effectiveness: ${c.effectiveness})`,domain:c.domain,patternType:c.type,confidence:c.confidence,successRate:c.effectiveness}));await r.loadPatternsAsConcepts(i),e.logger.debug("Starting dream cycle",{patternCount:t.length});let a=await r.dream(),o=a.insights.filter(c=>c.actionable&&c.confidenceScore>.7);return o.length>0&&(n.push({type:"dream-insights",severity:"info",domain:"learning-optimization",title:"Dream Cycle Insights Generated",description:`${o.length} actionable insights discovered through pattern association`,context:{totalInsights:a.insights.length,actionableInsights:o.length,topInsight:o[0]?.description,activationIterations:a.activationStats.totalIterations}}),s.push({priority:"p2",domain:"learning-optimization",action:"Apply Dream Insights",description:`${o.length} insights from dream cycle can improve pattern effectiveness`,estimatedImpact:"medium",effort:"low",autoFixable:!0})),await e.memory.set("learning:dreamInsights",{cycleId:a.cycle.id,insights:o,timestamp:new Date().toISOString()}),e.logger.info("Dream cycle completed",{insights:a.insights.length,actionable:o.length,duration:a.cycle.durationMs}),{insights:a.insights.length,patternsCreated:a.patternsCreated}}catch(i){return e.logger.warn("Dream cycle failed",{error:b(i)}),{insights:0,patternsCreated:0}}finally{r&&await r.close()}}findCrossDomainPatterns(e){let t=new Map;for(let s of e){let r=t.get(s.type)||[];r.push(s),t.set(s.type,r)}let n=[];for(let[s,r]of Array.from(t.entries())){let i=Array.from(new Set(r.map(a=>a.domain)));i.length>=3&&n.push({pattern:s,domains:i,avgEffectiveness:r.reduce((a,o)=>a+o.effectiveness,0)/r.length})}return n}identifyCrossDomainPatterns(e,t,n){let s=this.findCrossDomainPatterns(e);s.length>0&&(t.push({type:"cross-domain-patterns",severity:"info",domain:"learning-optimization",title:"Cross-Domain Patterns Identified",description:`${s.length} patterns are effective across multiple domains`,context:{patterns:s.map(r=>({type:r.pattern,domains:r.domains.length,effectiveness:r.avgEffectiveness.toFixed(2)}))}}),n.push({priority:"p2",domain:"learning-optimization",action:"Leverage Cross-Domain Patterns",description:"Apply successful cross-domain patterns to domains where they are not yet used.",estimatedImpact:"medium",effort:"low",autoFixable:!0}))}pruneIneffectivePatterns(e,t,n){let s=e.filter(i=>i.effectiveness<.3&&i.occurrences>10),r=e.filter(i=>(Date.now()-i.lastSeen.getTime())/864e5>30);s.length>0&&(t.push({type:"ineffective-patterns",severity:"low",domain:"learning-optimization",title:"Ineffective Patterns Detected",description:`${s.length} patterns have low effectiveness despite many occurrences`,context:{count:s.length,domains:Array.from(new Set(s.map(i=>i.domain)))}}),n.push({priority:"p3",domain:"learning-optimization",action:"Review Ineffective Patterns",description:"Consider removing or refining patterns that consistently underperform.",estimatedImpact:"low",effort:"low",autoFixable:!0})),r.length>0&&t.push({type:"stale-patterns",severity:"info",domain:"learning-optimization",title:"Stale Patterns Identified",description:`${r.length} patterns have not been seen in over 30 days`,context:{count:r.length}})}generateOptimizations(e,t,n){let s=new Map;for(let a of e)s.set(a.domain,(s.get(a.domain)||0)+1);let r=w.filter(a=>(s.get(a)||0)<3);r.length>0&&(t.push({type:"learning-gaps",severity:"medium",domain:"learning-optimization",title:"Learning Gaps Identified",description:`${r.length} domains have few learned patterns`,context:{domains:r}}),n.push({priority:"p2",domain:"learning-optimization",action:"Improve Learning Coverage",description:`Focus learning efforts on domains with few patterns: ${r.join(", ")}`,estimatedImpact:"medium",effort:"medium",autoFixable:!1}));let i=e.filter(a=>a.effectiveness>.9&&a.occurrences>20).sort((a,o)=>o.effectiveness-a.effectiveness).slice(0,5);i.length>0&&t.push({type:"top-patterns",severity:"info",domain:"learning-optimization",title:"Top Performing Patterns",description:`${i.length} patterns show exceptional effectiveness`,context:{patterns:i.map(a=>({domain:a.domain,type:a.type,effectiveness:a.effectiveness.toFixed(2)}))}})}calculateHealthScore(e,t){if(t.length===0)return 50;let s=t.reduce((i,a)=>i+a.effectiveness,0)/t.length*50;s+=Math.min(20,e.newInsights*4),s+=Math.min(15,e.crossDomainPatterns*3),s+=Math.min(10,e.dreamInsights*2);let r=e.patternsPruned/e.patternsAnalyzed;return s-=r*15,Math.max(0,Math.min(100,Math.round(s)))}};var de={id:"defect-predictor",name:"Defect Predictor",description:"Uses ML patterns to predict potential defects and identify high-risk code areas",intervalMs:900*1e3,priority:"high",targetDomains:["defect-intelligence"],enabled:!0,timeoutMs:18e4,retryCount:2,retryDelayMs:15e3},I=class extends y{constructor(){super(de)}async doExecute(e){let t=Date.now();e.logger.info("Starting defect prediction analysis");let n=[],s=[],r=await this.analyzeCodeForDefects(e),i=await this.identifyHotspots(e);this.analyzeHighRiskPredictions(r,n,s),this.analyzeHotspots(i,n,s),await e.memory.set("defect:predictions",r),await e.memory.set("defect:hotspots",i),await e.memory.set("defect:lastAnalysis",new Date().toISOString());let a=this.calculateHealthScore(r,i);return e.logger.info("Defect prediction complete",{healthScore:a,predictionsCount:r.length,hotspotsCount:i.length}),this.createResult(Date.now()-t,{itemsAnalyzed:r.length,issuesFound:r.filter(o=>o.probability>.5).length,healthScore:a,trend:"stable",domainMetrics:{filesAnalyzed:r.length,highRiskFiles:r.filter(o=>o.riskLevel==="high"||o.riskLevel==="critical").length,hotspots:i.length,avgDefectProbability:(r.reduce((o,c)=>o+c.probability,0)/r.length).toFixed(2)}},n,s)}async analyzeCodeForDefects(e){return[{file:"src/coordination/workflow-orchestrator.ts",probability:.78,riskLevel:"high",factors:[{name:"complexity",weight:.3,description:"High cyclomatic complexity (28)"},{name:"change-frequency",weight:.25,description:"Changed 15 times in last 30 days"},{name:"size",weight:.2,description:"Large file (1500+ lines)"},{name:"coupling",weight:.15,description:"High coupling with 8 other modules"}],recentChanges:15,historicalDefects:3,complexity:28},{file:"src/domains/security-compliance/services/security-scanner.ts",probability:.65,riskLevel:"high",factors:[{name:"complexity",weight:.35,description:"High cyclomatic complexity (32)"},{name:"size",weight:.25,description:"Very large file (1200+ lines)"},{name:"test-coverage",weight:.2,description:"Low test coverage (45%)"}],recentChanges:8,historicalDefects:2,complexity:32},{file:"src/kernel/memory-backend.ts",probability:.45,riskLevel:"medium",factors:[{name:"change-frequency",weight:.4,description:"Changed 10 times in last 30 days"},{name:"authors",weight:.3,description:"Multiple authors (4)"}],recentChanges:10,historicalDefects:1,complexity:15},{file:"src/shared/http/http-client.ts",probability:.25,riskLevel:"low",factors:[{name:"stability",weight:.5,description:"Stable code, few recent changes"}],recentChanges:2,historicalDefects:0,complexity:8}]}async identifyHotspots(e){return[{file:"src/coordination/workflow-orchestrator.ts",changeFrequency:15,defectDensity:.02,authors:4,lastModified:new Date(Date.now()-2880*60*1e3),score:.85},{file:"src/domains/test-generation/services/test-generator.ts",changeFrequency:12,defectDensity:.015,authors:3,lastModified:new Date(Date.now()-7200*60*1e3),score:.72},{file:"src/mcp/server.ts",changeFrequency:8,defectDensity:.01,authors:2,lastModified:new Date(Date.now()-4320*60*1e3),score:.55}]}analyzeHighRiskPredictions(e,t,n){let s=e.filter(i=>i.riskLevel==="critical"),r=e.filter(i=>i.riskLevel==="high");for(let i of s)t.push({type:"critical-defect-risk",severity:"critical",domain:"defect-intelligence",title:`Critical Defect Risk: ${i.file.split("/").pop()}`,description:`${(i.probability*100).toFixed(0)}% probability of defect based on code analysis`,resource:i.file,context:{probability:i.probability,factors:i.factors,recentChanges:i.recentChanges,historicalDefects:i.historicalDefects}});for(let i of r)t.push({type:"high-defect-risk",severity:"high",domain:"defect-intelligence",title:`High Defect Risk: ${i.file.split("/").pop()}`,description:`${(i.probability*100).toFixed(0)}% probability of defect`,resource:i.file,context:{probability:i.probability,topFactors:i.factors.slice(0,3),complexity:i.complexity}});if(s.length>0||r.length>0){n.push({priority:"p0",domain:"defect-intelligence",action:"Prioritize Code Review for High-Risk Files",description:`${s.length+r.length} files have elevated defect risk. Schedule focused code reviews.`,estimatedImpact:"high",effort:"medium",autoFixable:!1});let i=e.filter(o=>o.factors.some(c=>c.name==="complexity"&&c.weight>.25));i.length>0&&n.push({priority:"p1",domain:"defect-intelligence",action:"Reduce Code Complexity",description:`${i.length} files have high complexity as a defect risk factor. Consider refactoring.`,estimatedImpact:"high",effort:"high",autoFixable:!1});let a=e.filter(o=>o.factors.some(c=>c.name==="test-coverage"));a.length>0&&n.push({priority:"p1",domain:"defect-intelligence",action:"Improve Test Coverage for Risky Files",description:`${a.length} high-risk files have low test coverage. Add targeted tests.`,estimatedImpact:"high",effort:"medium",autoFixable:!0})}}analyzeHotspots(e,t,n){let s=e.filter(i=>i.score>.7);s.length>0&&(t.push({type:"code-hotspots",severity:"medium",domain:"defect-intelligence",title:`${s.length} Code Hotspots Detected`,description:"Files with high change frequency and defect density identified",context:{hotspots:s.map(i=>({file:i.file,changeFrequency:i.changeFrequency,score:i.score.toFixed(2)}))}}),n.push({priority:"p2",domain:"defect-intelligence",action:"Address Code Hotspots",description:"Consider refactoring frequently-changed, defect-prone files to improve stability.",estimatedImpact:"medium",effort:"high",autoFixable:!1}));let r=e.filter(i=>i.authors===1&&i.changeFrequency>5);r.length>0&&(t.push({type:"knowledge-silo",severity:"medium",domain:"defect-intelligence",title:"Knowledge Silos Detected",description:`${r.length} frequently-changed files have only one author`,context:{files:r.map(i=>i.file)}}),n.push({priority:"p2",domain:"defect-intelligence",action:"Address Knowledge Silos",description:"Ensure knowledge sharing for files maintained by single developers.",estimatedImpact:"medium",effort:"low",autoFixable:!1}))}calculateHealthScore(e,t){if(e.length===0)return 100;let s=(1-e.reduce((o,c)=>o+c.probability,0)/e.length)*60,r=e.filter(o=>o.riskLevel==="critical"||o.riskLevel==="high").length;s-=r/e.length*20;let i=t.filter(o=>o.score>.7).length;s-=i*3;let a=e.filter(o=>o.riskLevel==="low").length/e.length;return s+=a*20,Math.max(0,Math.min(100,Math.round(s)))}};var me={id:"regression-monitor",name:"Regression Monitor",description:"Monitors for regressions in test results, performance, coverage, and quality metrics",intervalMs:600*1e3,priority:"high",targetDomains:["test-execution","coverage-analysis","quality-assessment"],enabled:!0,timeoutMs:12e4,retryCount:2,retryDelayMs:1e4},A=class extends y{constructor(){super(me)}async doExecute(e){let t=Date.now();e.logger.info("Starting regression monitoring");let n=[],s=[],r=await this.collectCurrentSnapshot(e),i=await e.memory.get("regression:baseline"),a=[];i&&(a=this.detectRegressions(i,r),this.analyzeRegressions(a,n,s)),await e.memory.set("regression:baseline",r);let o=await e.memory.get("regression:history")||[];if(a.length>0){for(o.push(...a);o.length>100;)o.shift();await e.memory.set("regression:history",o)}let c=this.calculateHealthScore(a);return e.logger.info("Regression monitoring complete",{healthScore:c,regressionsDetected:a.length}),this.createResult(Date.now()-t,{itemsAnalyzed:5,issuesFound:a.length,healthScore:c,trend:a.length>0?"degrading":"stable",domainMetrics:{testPassRate:`${r.testPassRate}%`,lineCoverage:`${r.coverage.line}%`,avgTestDuration:`${r.avgTestDuration}ms`,qualityScore:r.qualityScore,regressionsDetected:a.length}},n,s)}async collectCurrentSnapshot(e){return{timestamp:new Date,testPassRate:98.2,coverage:{line:78.5,branch:65.2},avgTestDuration:245,failedTests:["test-execution/retry-handler.test.ts::should retry failed tests","coordination/workflow.test.ts::should handle concurrent workflows"],qualityScore:82}}detectRegressions(e,t){let n=[];if(t.testPassRate<e.testPassRate-1){let i=t.testPassRate-e.testPassRate;n.push({type:"test",metric:"testPassRate",previousValue:e.testPassRate,currentValue:t.testPassRate,changePercent:i,severity:i<-5?"critical":i<-2?"high":"medium",affectedTests:t.failedTests})}if(t.coverage.line<e.coverage.line-2){let i=t.coverage.line-e.coverage.line;n.push({type:"coverage",metric:"lineCoverage",previousValue:e.coverage.line,currentValue:t.coverage.line,changePercent:i,severity:i<-5?"high":"medium"})}if(t.coverage.branch<e.coverage.branch-3){let i=t.coverage.branch-e.coverage.branch;n.push({type:"coverage",metric:"branchCoverage",previousValue:e.coverage.branch,currentValue:t.coverage.branch,changePercent:i,severity:i<-5?"high":"medium"})}let s=(t.avgTestDuration-e.avgTestDuration)/e.avgTestDuration*100;if(s>20&&n.push({type:"performance",metric:"avgTestDuration",previousValue:e.avgTestDuration,currentValue:t.avgTestDuration,changePercent:s,severity:s>50?"high":"medium"}),t.qualityScore<e.qualityScore-5){let i=t.qualityScore-e.qualityScore;n.push({type:"quality",metric:"qualityScore",previousValue:e.qualityScore,currentValue:t.qualityScore,changePercent:i,severity:i<-10?"critical":i<-5?"high":"medium"})}let r=t.failedTests.filter(i=>!e.failedTests.includes(i));return r.length>0&&n.push({type:"test",metric:"newFailures",previousValue:0,currentValue:r.length,changePercent:100,severity:r.length>5?"critical":r.length>2?"high":"medium",affectedTests:r}),n}analyzeRegressions(e,t,n){for(let a of e){let o=this.getDomainForType(a.type);t.push({type:`${a.type}-regression`,severity:a.severity,domain:o,title:`${this.formatMetricName(a.metric)} Regression Detected`,description:this.formatRegressionDescription(a),context:{previousValue:a.previousValue,currentValue:a.currentValue,changePercent:a.changePercent.toFixed(2),affectedTests:a.affectedTests}})}let s=e.filter(a=>a.type==="test");if(s.length>0){let a=s.filter(o=>o.severity==="critical"||o.severity==="high");a.length>0&&n.push({priority:"p0",domain:"test-execution",action:"Investigate Test Regressions Immediately",description:`${a.length} significant test regressions detected. Review recent changes.`,estimatedImpact:"high",effort:"medium",autoFixable:!1})}e.filter(a=>a.type==="coverage").length>0&&n.push({priority:"p1",domain:"coverage-analysis",action:"Address Coverage Regression",description:"Code coverage has decreased. Add tests for new/changed code.",estimatedImpact:"medium",effort:"medium",autoFixable:!0}),e.filter(a=>a.type==="performance").length>0&&n.push({priority:"p2",domain:"test-execution",action:"Investigate Performance Regression",description:"Test execution has slowed. Review for new slow tests or infrastructure issues.",estimatedImpact:"medium",effort:"low",autoFixable:!1})}getDomainForType(e){switch(e){case"test":case"performance":return"test-execution";case"coverage":return"coverage-analysis";case"quality":return"quality-assessment";default:return"quality-assessment"}}formatMetricName(e){return{testPassRate:"Test Pass Rate",lineCoverage:"Line Coverage",branchCoverage:"Branch Coverage",avgTestDuration:"Test Duration",qualityScore:"Quality Score",newFailures:"New Test Failures"}[e]||e}formatRegressionDescription(e){if(e.metric==="newFailures")return`${e.currentValue} new test failures detected since last check`;let t=e.changePercent>0?"increased":"decreased",n=e.type==="performance"?"ms":"%";return`${this.formatMetricName(e.metric)} ${t} from ${e.previousValue}${n} to ${e.currentValue}${n} (${e.changePercent>0?"+":""}${e.changePercent.toFixed(1)}%)`}calculateHealthScore(e){if(e.length===0)return 100;let t=100;for(let n of e)switch(n.severity){case"critical":t-=25;break;case"high":t-=15;break;case"medium":t-=8;break;case"low":t-=3;break}return Math.max(0,Math.round(t))}};var pe={id:"performance-baseline",name:"Performance Baseline Tracker",description:"Tracks performance trends and establishes baselines for test execution and builds",intervalMs:3600*1e3,priority:"normal",targetDomains:["test-execution","chaos-resilience"],enabled:!0,timeoutMs:3e5,retryCount:2,retryDelayMs:3e4},E=class extends y{constructor(){super(pe)}async doExecute(e){let t=Date.now();e.logger.info("Starting performance baseline tracking");let n=[],s=[],r=await this.collectPerformanceMetrics(e),i=await this.getOrCalculateBaseline(e),a=this.detectAnomalies(r,i);this.analyzeAnomalies(a,n,s),await this.updateBaseline(e,r,i),await this.storeMetricsHistory(e,r);let o=this.calculateHealthScore(a);return e.logger.info("Performance baseline tracking complete",{healthScore:o,anomaliesDetected:a.length}),this.createResult(Date.now()-t,{itemsAnalyzed:10,issuesFound:a.length,healthScore:o,trend:a.length>2?"degrading":"stable",domainMetrics:{avgTestDuration:`${r.testExecution.avgTestDurationMs}ms`,p95TestDuration:`${r.testExecution.p95DurationMs}ms`,compileDuration:`${r.build.compileDurationMs}ms`,bundleSize:`${r.build.bundleSizeKb}KB`,peakMemory:`${r.resources.peakMemoryMb}MB`,anomalies:a.length}},n,s)}async collectPerformanceMetrics(e){return{timestamp:new Date,testExecution:{totalDurationMs:45e3,avgTestDurationMs:245,slowestTestMs:3500,slowestTestName:"workflow-orchestrator.test.ts::complex scenario",p50DurationMs:120,p95DurationMs:800,p99DurationMs:2500},build:{compileDurationMs:12e3,bundleSizeKb:2500,dependencyCount:45},resources:{peakMemoryMb:512,avgCpuPercent:65,diskReadMb:150,diskWriteMb:50}}}async getOrCalculateBaseline(e){let t=await e.memory.get("performance:baseline");return t||{testExecution:{avgDurationMs:200,p95DurationMs:700,threshold:1.3},build:{avgCompileMs:1e4,avgBundleSizeKb:2400,threshold:1.2},resources:{avgMemoryMb:450,avgCpuPercent:60,threshold:1.25}}}detectAnomalies(e,t){let n=[],s=e.testExecution.avgTestDurationMs/t.testExecution.avgDurationMs;s>t.testExecution.threshold&&n.push({metric:"avgTestDuration",category:"test",currentValue:e.testExecution.avgTestDurationMs,baselineValue:t.testExecution.avgDurationMs,deviationPercent:(s-1)*100,severity:s>1.5?"high":"medium"});let r=e.testExecution.p95DurationMs/t.testExecution.p95DurationMs;r>t.testExecution.threshold&&n.push({metric:"p95TestDuration",category:"test",currentValue:e.testExecution.p95DurationMs,baselineValue:t.testExecution.p95DurationMs,deviationPercent:(r-1)*100,severity:r>1.5?"high":"medium"});let i=e.build.compileDurationMs/t.build.avgCompileMs;i>t.build.threshold&&n.push({metric:"compileDuration",category:"build",currentValue:e.build.compileDurationMs,baselineValue:t.build.avgCompileMs,deviationPercent:(i-1)*100,severity:i>1.5?"high":"medium"});let a=e.build.bundleSizeKb/t.build.avgBundleSizeKb;a>t.build.threshold&&n.push({metric:"bundleSize",category:"build",currentValue:e.build.bundleSizeKb,baselineValue:t.build.avgBundleSizeKb,deviationPercent:(a-1)*100,severity:a>1.3?"high":"medium"});let o=e.resources.peakMemoryMb/t.resources.avgMemoryMb;o>t.resources.threshold&&n.push({metric:"peakMemory",category:"resource",currentValue:e.resources.peakMemoryMb,baselineValue:t.resources.avgMemoryMb,deviationPercent:(o-1)*100,severity:o>1.5?"critical":o>1.3?"high":"medium"});let c=e.resources.avgCpuPercent/t.resources.avgCpuPercent;return c>t.resources.threshold&&n.push({metric:"avgCpu",category:"resource",currentValue:e.resources.avgCpuPercent,baselineValue:t.resources.avgCpuPercent,deviationPercent:(c-1)*100,severity:c>1.4?"high":"medium"}),n}analyzeAnomalies(e,t,n){for(let a of e){let o=a.category==="test"?"test-execution":"chaos-resilience";t.push({type:`performance-anomaly-${a.category}`,severity:a.severity,domain:o,title:`Performance Anomaly: ${this.formatMetricName(a.metric)}`,description:`${this.formatMetricName(a.metric)} is ${a.deviationPercent.toFixed(1)}% above baseline`,context:{currentValue:a.currentValue,baselineValue:a.baselineValue,deviationPercent:a.deviationPercent.toFixed(1)}})}let s=e.filter(a=>a.category==="test");s.length>0&&n.push({priority:s.some(a=>a.severity==="high")?"p1":"p2",domain:"test-execution",action:"Investigate Test Performance Degradation",description:"Test execution times have increased. Review for slow tests or infrastructure issues.",estimatedImpact:"medium",effort:"medium",autoFixable:!1});let r=e.filter(a=>a.category==="build");r.length>0&&r.find(o=>o.metric==="bundleSize")&&n.push({priority:"p2",domain:"chaos-resilience",action:"Analyze Bundle Size Increase",description:"Bundle size has grown. Review for unnecessary dependencies or unoptimized imports.",estimatedImpact:"medium",effort:"low",autoFixable:!0});let i=e.filter(a=>a.category==="resource");if(i.length>0){let a=i.find(o=>o.metric==="peakMemory");a&&a.severity==="critical"&&n.push({priority:"p0",domain:"chaos-resilience",action:"Investigate Memory Usage Spike",description:"Memory usage is significantly above baseline. Check for memory leaks.",estimatedImpact:"high",effort:"high",autoFixable:!1})}}formatMetricName(e){return{avgTestDuration:"Average Test Duration",p95TestDuration:"P95 Test Duration",compileDuration:"Compile Duration",bundleSize:"Bundle Size",peakMemory:"Peak Memory Usage",avgCpu:"Average CPU Usage"}[e]||e}async updateBaseline(e,t,n){let r={testExecution:{avgDurationMs:n.testExecution.avgDurationMs*.9+t.testExecution.avgTestDurationMs*.1,p95DurationMs:n.testExecution.p95DurationMs*.9+t.testExecution.p95DurationMs*.1,threshold:n.testExecution.threshold},build:{avgCompileMs:n.build.avgCompileMs*.9+t.build.compileDurationMs*.1,avgBundleSizeKb:n.build.avgBundleSizeKb*.9+t.build.bundleSizeKb*.1,threshold:n.build.threshold},resources:{avgMemoryMb:n.resources.avgMemoryMb*.9+t.resources.peakMemoryMb*.1,avgCpuPercent:n.resources.avgCpuPercent*.9+t.resources.avgCpuPercent*.1,threshold:n.resources.threshold}};await e.memory.set("performance:baseline",r)}async storeMetricsHistory(e,t){let n=await e.memory.get("performance:history")||[];for(n.push(t);n.length>168;)n.shift();await e.memory.set("performance:history",n)}calculateHealthScore(e){if(e.length===0)return 100;let t=100;for(let n of e){let s={critical:25,high:15,medium:8,low:3}[n.severity],r=Math.min(10,n.deviationPercent/10);t-=s+r}return Math.max(0,Math.round(t))}};var ge={id:"compliance-checker",name:"ADR/DDD Compliance Checker",description:"Verifies compliance with Architecture Decision Records and DDD patterns",intervalMs:1800*1e3,priority:"normal",targetDomains:["quality-assessment"],enabled:!0,timeoutMs:24e4,retryCount:2,retryDelayMs:3e4},$=class extends y{constructor(){super(ge)}async doExecute(e){let t=Date.now();e.logger.info("Starting compliance checking");let n=[],s=[],r=await this.checkADRCompliance(e),i=await this.checkDDDCompliance(e),a=await this.checkStructuralCompliance(e);this.analyzeADRCompliance(r,n,s),this.analyzeDDDCompliance(i,n,s),this.analyzeStructuralCompliance(a,n,s),await e.memory.set("compliance:adr",r),await e.memory.set("compliance:ddd",i),await e.memory.set("compliance:structural",a),await e.memory.set("compliance:lastCheck",new Date().toISOString());let o=this.calculateHealthScore(r,i,a);return e.logger.info("Compliance checking complete",{healthScore:o,adrChecks:r.length,domainChecks:i.length}),this.createResult(Date.now()-t,{itemsAnalyzed:r.length+i.length+a.length,issuesFound:n.length,healthScore:o,trend:"stable",domainMetrics:{adrCompliance:`${this.calculateAvgScore(r)}%`,dddCompliance:`${this.calculateDDDAvgScore(i)}%`,structuralCompliance:`${this.calculateStructuralScore(a)}%`,totalViolations:r.reduce((c,l)=>c+l.violations.length,0)+i.reduce((c,l)=>c+l.violations.length,0)}},n,s)}async checkADRCompliance(e){if(!e.domains.getDomainAPI("quality-assessment"))throw new Error("Quality-assessment domain not available - cannot check ADR compliance. Ensure the quality-assessment domain is properly initialized before running this worker.");let n=await e.memory.search("compliance:adr:*");if(n.length===0)throw new Error('No ADR compliance data found in memory - cannot check ADR compliance. Ensure ADR compliance data is stored with keys matching "compliance:adr:*" before running this worker.');let s=[],r=[];for(let i of n)try{let a=await e.memory.get(i);a&&s.push(a)}catch{r.push(i)}if(s.length===0)throw new Error(`Found ${n.length} ADR compliance keys but failed to retrieve any data. Failed keys: ${r.join(", ")}. Check memory service connectivity.`);return s}async checkDDDCompliance(e){let t=[];for(let n of w)try{let s=await this.checkDomainCompliance(e,n);t.push(s)}catch(s){e.logger.warn(`Failed to check DDD compliance for ${n}`,{error:s})}return t}async checkDomainCompliance(e,t){let n=e.domains.getDomainHealth(t),s=e.domains.getDomainAPI(t),r=n.status!=="unhealthy",i=s!==void 0,a=i,o=i,c=await e.memory.get(`compliance:ddd:${t}`),l=c?.hasEntities??!1,m=c?.hasEvents??!1,d=c?.hasRepositories??!1,f=c?.namingCompliant??i,p=[];l||p.push("Missing domain entities"),m||p.push("Missing domain events"),d||p.push("Missing repositories"),r||p.push("Domain coordinator not available"),i||p.push("Domain plugin not loaded");let g=[r,i,a,o,l,m,d,f],u=Math.round(g.filter(Boolean).length/g.length*100);return{domain:t,hasCoordinator:r,hasPlugin:i,hasInterfaces:a,hasServices:o,hasEntities:l,hasEvents:m,hasRepositories:d,namingCompliant:f,score:u,violations:p}}async checkStructuralCompliance(e){let t=await e.memory.search("compliance:structural:*");if(t.length===0)throw new Error('No structural compliance data found in memory - cannot check structural compliance. Ensure structural compliance data is stored with keys matching "compliance:structural:*" before running this worker.');let n=[],s=[];for(let r of t)try{let i=await e.memory.get(r);i&&n.push(i)}catch(i){s.push(r),e.logger.warn(`Failed to retrieve structural compliance data: ${r}`,{error:i})}if(n.length===0)throw new Error(`Found ${t.length} structural compliance keys but failed to retrieve any data. Failed keys: ${s.join(", ")}. Check memory service connectivity.`);return n}analyzeADRCompliance(e,t,n){let s=e.filter(i=>i.status==="non-compliant"),r=e.filter(i=>i.status==="partial");for(let i of s)t.push({type:"adr-non-compliance",severity:"high",domain:"quality-assessment",title:`ADR Non-Compliance: ${i.adrId}`,description:`${i.title} is not compliant (score: ${i.score}%)`,context:{adrId:i.adrId,violations:i.violations}});for(let i of r)t.push({type:"adr-partial-compliance",severity:"medium",domain:"quality-assessment",title:`ADR Partial Compliance: ${i.adrId}`,description:`${i.title} is partially compliant (score: ${i.score}%)`,context:{adrId:i.adrId,violations:i.violations}});s.length>0&&n.push({priority:"p1",domain:"quality-assessment",action:"Address ADR Non-Compliance",description:`${s.length} ADRs are not being followed. Review and implement required patterns.`,estimatedImpact:"high",effort:"high",autoFixable:!1})}analyzeDDDCompliance(e,t,n){let s=e.filter(a=>a.score<70),r=e.filter(a=>!a.hasEntities),i=e.filter(a=>!a.hasEvents);s.length>0&&t.push({type:"ddd-low-compliance",severity:"medium",domain:"quality-assessment",title:`${s.length} Domains Have Low DDD Compliance`,description:"Some domains are missing required DDD components",context:{domains:s.map(a=>({domain:a.domain,score:a.score}))}}),r.length>0&&(t.push({type:"ddd-missing-entities",severity:"low",domain:"quality-assessment",title:"Domains Missing Entity Definitions",description:`${r.length} domains lack proper entity definitions`,context:{domains:r.map(a=>a.domain)}}),n.push({priority:"p3",domain:"quality-assessment",action:"Add Domain Entities",description:"Define rich domain entities for domains that currently lack them.",estimatedImpact:"medium",effort:"medium",autoFixable:!1})),i.length>0&&n.push({priority:"p3",domain:"quality-assessment",action:"Implement Domain Events",description:`${i.length} domains are missing domain event definitions.`,estimatedImpact:"medium",effort:"medium",autoFixable:!1})}analyzeStructuralCompliance(e,t,n){let s=e.filter(r=>!r.compliant);for(let r of s)t.push({type:"structural-violation",severity:"medium",domain:"quality-assessment",title:`Structural Violation: ${r.category}`,description:`Rule "${r.rule}" is not being followed: ${r.details}`,context:{category:r.category,rule:r.rule}});s.length>0&&n.push({priority:"p2",domain:"quality-assessment",action:"Fix Structural Violations",description:`${s.length} structural rules are being violated. Review architecture guidelines.`,estimatedImpact:"medium",effort:"medium",autoFixable:!1})}calculateAvgScore(e){return e.length===0?100:Math.round(e.reduce((t,n)=>t+n.score,0)/e.length)}calculateDDDAvgScore(e){return e.length===0?100:Math.round(e.reduce((t,n)=>t+n.score,0)/e.length)}calculateStructuralScore(e){if(e.length===0)return 100;let t=e.filter(n=>n.compliant).length;return Math.round(t/e.length*100)}calculateHealthScore(e,t,n){let s=this.calculateAvgScore(e)*.4,r=this.calculateDDDAvgScore(t)*.4,i=this.calculateStructuralScore(n)*.2;return Math.round(s+r+i)}};V();var rt={id:"cloud-sync",name:"Cloud Sync",description:"Periodically syncs local learning data to cloud PostgreSQL",intervalMs:parseInt(process.env.AQE_SYNC_INTERVAL||"3600000",10),priority:"low",targetDomains:["learning-optimization"],enabled:process.env.AQE_CLOUD_SYNC_ENABLED==="true",timeoutMs:6e5,retryCount:3,retryDelayMs:6e4};var he={autoStart:!0,enabledWorkers:[],logLevel:"info",healthCheckIntervalMs:6e4},K=class{_running=!1;_startedAt;_healthCheckTimer;workerManager;config;_qualityDaemon;constructor(e){this.config={...he,...e},this.workerManager=new N,this.registerWorkers()}get running(){return this._running}get uptime(){return this._startedAt?Math.floor((Date.now()-this._startedAt.getTime())/1e3):0}async start(){if(this._running){console.info("[Daemon] Already running");return}console.info("[Daemon] Starting QE Background Workers..."),this._running=!0,this._startedAt=new Date,this._healthCheckTimer=setInterval(()=>{this.performHealthCheck()},this.config.healthCheckIntervalMs),this._healthCheckTimer.unref?.(),this.config.autoStart&&(await this.workerManager.startAll(),console.info("[Daemon] All workers started"));let e=this.workerManager.list();console.info(`[Daemon] Registered ${e.length} workers:`);for(let t of e)console.info(` - ${t.config.id}: ${t.config.name} (interval: ${t.config.intervalMs}ms)`)}async stop(){if(!this._running){console.info("[Daemon] Not running");return}console.info("[Daemon] Stopping..."),this._healthCheckTimer&&(clearInterval(this._healthCheckTimer),this._healthCheckTimer=void 0),await this.workerManager.stopAll(),this._running=!1,console.info("[Daemon] Stopped")}async restart(){console.info("[Daemon] Restarting..."),await this.stop(),await this.start(),console.info("[Daemon] Restarted")}getStatus(){return{running:this._running,pid:process.pid,uptime:this.uptime,startedAt:this._startedAt,workerManager:this.workerManager.getHealth()}}getWorkerManager(){return this.workerManager}getQualityDaemon(e){return this._qualityDaemon||(this._qualityDaemon=new te(e)),this._qualityDaemon}async runWorker(e){let t=await this.workerManager.runNow(e);console.info(`[Daemon] Worker ${e} completed:`,{success:t.success,duration:`${t.durationMs}ms`,findings:t.findings.length,healthScore:t.metrics.healthScore})}registerWorkers(){let e=[new M,new P,new x,new S,new W,new F,new I,new A,new E,new $,new _];for(let t of e)(this.config.enabledWorkers.length===0||this.config.enabledWorkers.includes(t.config.id))&&this.workerManager.register(t)}performHealthCheck(){let e=this.workerManager.getHealth();e.errorWorkers>0&&console.warn(`[Daemon] Health check: ${e.errorWorkers} workers in error state`),e.healthScore<70&&console.warn(`[Daemon] Health score degraded: ${e.healthScore}%`),this.config.logLevel==="debug"&&console.debug("[Daemon] Health check:",e)}};function fe(h){return new K(h)}var C;function Dt(h){return C||(C=fe(h)),C}function wt(){C?.running&&C.stop().catch(console.error),C=void 0}export{K as QEDaemon,fe as createDaemon,Dt as getDaemon,wt as resetDaemon};
|
|
@@ -1,2 +0,0 @@
|
|
|
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.15.5");process.exit(0)}
|
|
2
|
-
import{b as a,c as b,d as c,e as d,f as e,g as f,h as g,i as h,j as i,k as j,l as k,m as l,n as m,o as n,p as o,q as p,r as q,s as r,t as s,u as t,v as u}from"./chunk-SDWMLT7B.js";import"./chunk-6ZIDZ4TJ.js";import"./chunk-DL5JENWD.js";import"./chunk-Y2WMPEUP.js";import"./chunk-ZTC5FBL6.js";import"./chunk-4UXPDV7E.js";import"./chunk-4PT5KNXL.js";import"./chunk-4AZP7ZCW.js";import"./chunk-FNAYDITO.js";import"./chunk-A5J4XJS6.js";import"./chunk-V7GNUVYI.js";import"./chunk-OW42F2TX.js";import"./chunk-PDPEMBFV.js";import"./chunk-NMJVG22Z.js";import"./chunk-FHUJCVT3.js";import"./chunk-CQMHDAJS.js";import"./chunk-GGDKOJVF.js";import"./chunk-L6SVCNXK.js";import"./chunk-663ZFPUL.js";import"./chunk-EOR3RECZ.js";import"./chunk-RUJLVJDE.js";import"./chunk-RUSLEOMC.js";import"./chunk-KHCALIFP.js";import"./chunk-2XYTS2WY.js";import"./chunk-3YASZPLO.js";import"./chunk-MQGEZA2A.js";import"./chunk-OU4ZAWCC.js";import"./chunk-OQDC7GCM.js";import"./chunk-RMJ7PJOS.js";import"./chunk-EAYQCBXL.js";import"./chunk-Y2E3IJ53.js";import"./chunk-AQN5EDBM.js";import"./chunk-3AYYGR6W.js";import"./chunk-OGYWWZU7.js";import"./chunk-L336HFFE.js";import"./chunk-E4VIVMDL.js";import"./chunk-WLIYWBQR.js";import"./chunk-NLDFNAOS.js";import"./chunk-VRJPH3LG.js";import"./chunk-3QD7U3FY.js";import"./chunk-KZVJW2SD.js";import"./chunk-UE22ODHN.js";import"./chunk-N2TJNIHA.js";import"./chunk-IHFUEPZH.js";import"./chunk-U6OVPMQX.js";import"./chunk-HLFDC4SF.js";export{t as BUILT_IN_STRATEGIES,e as ConceptGraph,j as DEFAULT_ACTIVATION_CONFIG,d as DEFAULT_CONCEPT_GRAPH_CONFIG,p as DEFAULT_DREAM_CONFIG,a as DEFAULT_DREAM_SCHEDULER_CONFIG,l as DEFAULT_INSIGHT_CONFIG,n as DEFAULT_VALIDATION_THRESHOLDS,q as DreamEngine,b as DreamScheduler,i as HISTORY_TRIM_TARGET_RATIO,m as InsightGenerator,g as MAX_ACTIVATION_HISTORY_ENTRIES,h as MAX_COACTIVATION_ENTRIES,o as RVCOWBranchManager,u as SpeculativeDreamer,k as SpreadingActivation,f as createConceptGraph,r as createDreamEngine,c as createDreamScheduler,s as default};
|
|
@@ -1,3 +0,0 @@
|
|
|
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.15.5");process.exit(0)}
|
|
2
|
-
import{f as i,g as a,p as d}from"./chunk-EAYQCBXL.js";import"./chunk-Y2E3IJ53.js";import"./chunk-NLDFNAOS.js";import"./chunk-KZVJW2SD.js";import"./chunk-HLFDC4SF.js";async function u(o,s,m,g,f,t={}){try{let e=`${m??""} ${g??""} ${(f??[]).join(" ")}`.trim();if(!e)return;let n=await a(e,t);if(!n||n.length===0)return;let E=Buffer.from(new Float32Array(n).buffer),b={...i,...t},r=d()?.spaceId;if(!r)throw new Error("VECTOR_SPACE_UNVERIFIED: embedder has no runtime provenance");o.prepare(`INSERT OR REPLACE INTO qe_pattern_embeddings (pattern_id, embedding, dimension, model, space_id)
|
|
3
|
-
VALUES (?, ?, ?, ?, ?)`).run(s,E,n.length,b.modelName,r)}catch(e){console.debug("[ensurePatternEmbedding] non-fatal:",e instanceof Error?e.message:String(e))}}export{u as ensurePatternEmbedding};
|
|
@@ -1,40 +0,0 @@
|
|
|
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.15.5");process.exit(0)}
|
|
2
|
-
import{o as x,s as S}from"./chunk-EOR3RECZ.js";import"./chunk-RUJLVJDE.js";import"./chunk-RUSLEOMC.js";import"./chunk-KHCALIFP.js";import"./chunk-2XYTS2WY.js";import"./chunk-3YASZPLO.js";import"./chunk-MQGEZA2A.js";import"./chunk-OU4ZAWCC.js";import"./chunk-OQDC7GCM.js";import"./chunk-RMJ7PJOS.js";import"./chunk-Y2E3IJ53.js";import{i as y}from"./chunk-AQN5EDBM.js";import"./chunk-OGYWWZU7.js";import"./chunk-L336HFFE.js";import{f,g as C}from"./chunk-E4VIVMDL.js";import"./chunk-WLIYWBQR.js";import{a as g,e as N}from"./chunk-NLDFNAOS.js";import"./chunk-VRJPH3LG.js";import"./chunk-KZVJW2SD.js";import"./chunk-IHFUEPZH.js";import"./chunk-U6OVPMQX.js";import"./chunk-HLFDC4SF.js";S();N();C();var D=f("ExperienceCapture"),R=600*1e3,O=120*1e3,M=1024*1024;function m(e,t=M){if(e==null)return null;try{let n=JSON.stringify(e);return n.length>t?(console.warn(`[ExperienceCaptureMiddleware] JSON payload exceeds size limit (${n.length} > ${t} bytes), truncating`),JSON.stringify({_truncated:!0,_originalSize:n.length,_preview:typeof e=="object"?Object.keys(e).slice(0,10):String(e).slice(0,100)})):n}catch(n){return console.warn("[ExperienceCaptureMiddleware] Failed to serialize JSON:",n),null}}var d=new Map,l=null;function U(){let e=Date.now(),t=0;for(let[n,a]of d){let i=e-a.context.startedAt.getTime();i>R&&(console.warn(`[ExperienceCaptureMiddleware] Cleaning up stale experience: ${n} (age=${Math.round(i/1e3)}s, domain=${a.context.domain})`),d.delete(n),t++)}return t>0&&console.log(`[ExperienceCaptureMiddleware] Cleaned ${t} stale experiences`),t}function I(){l||(l=setInterval(()=>{U()},O),l.unref())}function z(){l&&(clearInterval(l),l=null)}var c=null,E=null;async function A(){return E||(E=F(),E)}async function F(){try{c=x(),await c.initialize();let e=c.getDatabase();if(e){let t=!1;if(e.prepare("SELECT COUNT(*) as cnt FROM sqlite_master WHERE type='table' AND name='captured_experiences'").get().cnt>0){let s=e.prepare("PRAGMA table_info(captured_experiences)").all(),r=new Set(s.map(u=>u.name));!r.has("success")||!r.has("task")?(e.exec("ALTER TABLE captured_experiences RENAME TO captured_experiences_v2_backup"),t=!0):(r.has("domain")||e.exec("ALTER TABLE captured_experiences ADD COLUMN domain TEXT NOT NULL DEFAULT ''"),r.has("source")||e.exec("ALTER TABLE captured_experiences ADD COLUMN source TEXT DEFAULT 'middleware'"))}else t=!0;t&&e.exec(`
|
|
3
|
-
CREATE TABLE IF NOT EXISTS captured_experiences (
|
|
4
|
-
id TEXT PRIMARY KEY,
|
|
5
|
-
task TEXT NOT NULL,
|
|
6
|
-
agent TEXT NOT NULL,
|
|
7
|
-
domain TEXT NOT NULL DEFAULT '',
|
|
8
|
-
success INTEGER NOT NULL DEFAULT 0,
|
|
9
|
-
quality REAL NOT NULL DEFAULT 0.5,
|
|
10
|
-
duration_ms INTEGER NOT NULL DEFAULT 0,
|
|
11
|
-
model_tier INTEGER,
|
|
12
|
-
routing_json TEXT,
|
|
13
|
-
steps_json TEXT,
|
|
14
|
-
result_json TEXT,
|
|
15
|
-
error TEXT,
|
|
16
|
-
started_at TEXT NOT NULL DEFAULT (datetime('now')),
|
|
17
|
-
completed_at TEXT NOT NULL DEFAULT (datetime('now')),
|
|
18
|
-
source TEXT DEFAULT 'middleware'
|
|
19
|
-
);
|
|
20
|
-
`),e.exec(`
|
|
21
|
-
CREATE INDEX IF NOT EXISTS idx_captured_exp_domain ON captured_experiences(domain);
|
|
22
|
-
CREATE INDEX IF NOT EXISTS idx_captured_exp_success ON captured_experiences(success);
|
|
23
|
-
CREATE INDEX IF NOT EXISTS idx_captured_exp_agent ON captured_experiences(agent);
|
|
24
|
-
CREATE INDEX IF NOT EXISTS idx_captured_exp_completed ON captured_experiences(completed_at DESC);
|
|
25
|
-
`);let a=new Set(e.prepare("PRAGMA table_info(captured_experiences)").all().map(s=>s.name)),i=[["application_count","INTEGER DEFAULT 0"],["avg_token_savings","REAL DEFAULT 0"],["embedding","BLOB"],["embedding_dimension","INTEGER"],["tags","TEXT"],["last_applied_at","TEXT"],["consolidated_into","TEXT DEFAULT NULL"],["consolidation_count","INTEGER DEFAULT 1"],["quality_updated_at","TEXT DEFAULT NULL"],["reuse_success_count","INTEGER DEFAULT 0"],["reuse_failure_count","INTEGER DEFAULT 0"]];for(let[s,r]of i)a.has(s)||e.exec(`ALTER TABLE captured_experiences ADD COLUMN ${s} ${r}`)}I(),console.log("[ExperienceCaptureMiddleware] Initialized")}catch(e){console.error("[ExperienceCaptureMiddleware] Failed to initialize:",e),E=null}}function k(e,t,n,a){let i=`exp-${y()}`,s={id:i,task:e,agent:t,domain:n,startedAt:new Date,modelTier:a?.modelTier,routing:a?.routing};return d.set(i,{context:s,steps:[]}),i}function _(e,t){let n=d.get(e);if(!n){console.warn(`[ExperienceCaptureMiddleware] Unknown experience: ${e}`);return}n.steps.push(t)}async function b(e,t,n,a){let i=d.get(e);if(!i)return console.warn(`[ExperienceCaptureMiddleware] Unknown experience: ${e}`),null;let{context:s,steps:r}=i,o=new Date().getTime()-s.startedAt.getTime(),p=r.length>0?r.reduce((w,L)=>w+L.quality,0)/r.length:t?.7:.3,T={id:e,success:t,quality:p,durationMs:o,error:a,steps:r,result:n};return d.delete(e),await h(s,T),await $(s,T),console.log(`[ExperienceCaptureMiddleware] Captured: ${s.domain}/${s.agent} success=${t} quality=${p.toFixed(2)} duration=${o}ms steps=${r.length}`),T}async function h(e,t){if(await A(),!c){console.warn("[ExperienceCaptureMiddleware] Memory manager not available");return}try{let n=c.getDatabase();if(!n)return;n.prepare(`
|
|
26
|
-
INSERT OR REPLACE INTO captured_experiences
|
|
27
|
-
(id, task, agent, domain, success, quality, duration_ms, model_tier,
|
|
28
|
-
routing_json, steps_json, result_json, error, started_at, completed_at, source)
|
|
29
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, datetime('now'), ?)
|
|
30
|
-
`).run(t.id,e.task,e.agent,e.domain,t.success?1:0,t.quality,t.durationMs,e.modelTier||null,m(e.routing),m(t.steps),m(t.result),t.error||null,e.startedAt.toISOString(),"middleware"),X(n,t.id,e.task,e.domain).catch(i=>{D.warn("Embedding computation failed",{error:i instanceof Error?i.message:String(i),experienceId:t.id,domain:e.domain})})}catch(n){console.error("[ExperienceCaptureMiddleware] Failed to persist experience:",n)}}async function X(e,t,n,a){try{let{computeRealEmbedding:i}=await import("./real-embeddings-GZV4VKK4.js"),s=`${a}: ${n}`.slice(0,512),r=await i(s);if(!r||r.length===0)return;let u=Buffer.from(new Float32Array(r).buffer);e.prepare(`
|
|
31
|
-
UPDATE captured_experiences
|
|
32
|
-
SET embedding = ?, embedding_dimension = ?
|
|
33
|
-
WHERE id = ? AND embedding IS NULL
|
|
34
|
-
`).run(u,r.length,t)}catch{}}async function $(e,t){if(c)try{let n=c.getDatabase();if(!n||!t.success||t.quality<.5)return;n.prepare(`
|
|
35
|
-
INSERT OR REPLACE INTO sona_patterns
|
|
36
|
-
(id, type, domain, action_type, action_value,
|
|
37
|
-
outcome_reward, outcome_success, outcome_quality,
|
|
38
|
-
confidence, usage_count, metadata, created_at, updated_at)
|
|
39
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, datetime('now'), datetime('now'))
|
|
40
|
-
`).run(`sona-${t.id}`,"task-execution",e.domain,e.agent,m({task:e.task.slice(0,200)}),t.quality,1,t.quality,t.quality,1,m({experienceId:t.id,durationMs:t.durationMs,stepsCount:t.steps.length,modelTier:e.modelTier}))}catch(n){console.warn("[ExperienceCaptureMiddleware] Failed to persist to sona_patterns:",n)}}function Q(e,t,n){return async a=>{await A();let i=P(a,t),s=v(a),r=k(i,n,t,{modelTier:s?.tier,routing:s}),u=Date.now();try{let o=await e(a),p=Date.now()-u;return _(r,{action:`execute-${t}`,result:o.success?"success":"failure",quality:o.success?.8:.2,durationMs:p,data:o.data?{hasData:!0}:void 0}),await b(r,o.success,o.data,o.error),o}catch(o){let p=Date.now()-u;throw _(r,{action:`execute-${t}`,result:"failure",quality:0,durationMs:p}),await b(r,!1,void 0,g(o)),o}}}function P(e,t){if(!e||typeof e!="object")return`Execute ${t} task`;let n=e;return typeof n.task=="string"?n.task:typeof n.description=="string"?n.description:typeof n.sourceCode=="string"?`Generate tests for code (${n.sourceCode.length} chars)`:typeof n.target=="string"?`Analyze ${n.target}`:typeof n.url=="string"?`Test accessibility for ${n.url}`:Array.isArray(n.testFiles)?`Execute ${n.testFiles.length} test files`:`Execute ${t} task`}function v(e){if(!e||typeof e!="object")return;let n=e.routing;if(n)return{tier:typeof n.tier=="number"?n.tier:0,modelId:typeof n.modelId=="string"?n.modelId:"unknown",useAgentBooster:!!n.useAgentBooster,complexity:typeof n.complexity=="number"?n.complexity:0}}async function J(){let e={activeExperiences:d.size,totalCaptured:0,byDomain:{},bySuccess:{success:0,failure:0},avgQuality:0};if(!c)return e;try{let t=c.getDatabase();if(!t)return e;let n=t.prepare("SELECT COUNT(*) as count FROM captured_experiences").get();e.totalCaptured=n?.count||0;let a=t.prepare("SELECT domain, COUNT(*) as count FROM captured_experiences GROUP BY domain").all();for(let r of a)e.byDomain[r.domain]=r.count;let i=t.prepare("SELECT success, COUNT(*) as count FROM captured_experiences GROUP BY success").all();for(let r of i)r.success===1?e.bySuccess.success=r.count:e.bySuccess.failure=r.count;let s=t.prepare("SELECT AVG(quality) as avg FROM captured_experiences WHERE success = 1").get();e.avgQuality=s?.avg||0}catch(t){console.error("[ExperienceCaptureMiddleware] Failed to get stats:",t)}return e}export{U as cleanupStaleExperiences,b as completeExperience,J as getCaptureStats,A as initializeExperienceCapture,_ as recordExperienceStep,k as startExperience,z as stopCleanupTimer,Q as wrapWithExperienceCapture};
|
|
@@ -1,2 +0,0 @@
|
|
|
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.15.5");process.exit(0)}
|
|
2
|
-
import{a,b,c}from"./chunk-2WFTZSRT.js";import"./chunk-HLFDC4SF.js";export{a as SOURCE_EXTENSIONS,c as filterTestFilesForFramework,b as walkSourceFiles};
|
|
@@ -1,2 +0,0 @@
|
|
|
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.15.5");process.exit(0)}
|
|
2
|
-
import{b as a}from"./chunk-MS3Z2CP5.js";import"./chunk-EVCFUYYK.js";import"./chunk-5BOZCMXZ.js";import"./chunk-LNO5IWGH.js";import"./chunk-FNAYDITO.js";import"./chunk-EOR3RECZ.js";import"./chunk-RUJLVJDE.js";import"./chunk-RUSLEOMC.js";import"./chunk-KHCALIFP.js";import"./chunk-2XYTS2WY.js";import"./chunk-3YASZPLO.js";import"./chunk-MQGEZA2A.js";import"./chunk-OU4ZAWCC.js";import"./chunk-OQDC7GCM.js";import"./chunk-RMJ7PJOS.js";import"./chunk-Y2E3IJ53.js";import"./chunk-OGYWWZU7.js";import"./chunk-L336HFFE.js";import"./chunk-E4VIVMDL.js";import"./chunk-WLIYWBQR.js";import"./chunk-NLDFNAOS.js";import"./chunk-VRJPH3LG.js";import"./chunk-KZVJW2SD.js";import"./chunk-IHFUEPZH.js";import"./chunk-U6OVPMQX.js";import"./chunk-HLFDC4SF.js";export{a as HeartbeatSchedulerWorker};
|
|
@@ -1,2 +0,0 @@
|
|
|
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.15.5");process.exit(0)}
|
|
2
|
-
import{a,b}from"./chunk-OQDC7GCM.js";import"./chunk-RMJ7PJOS.js";import"./chunk-VRJPH3LG.js";import"./chunk-HLFDC4SF.js";b();export{a as HnswAdapter};
|
|
@@ -1,2 +0,0 @@
|
|
|
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.15.5");process.exit(0)}
|
|
2
|
-
import{a,b,c,d}from"./chunk-7BIYJRQJ.js";import"./chunk-MQGEZA2A.js";import"./chunk-OQDC7GCM.js";import"./chunk-RMJ7PJOS.js";import"./chunk-L336HFFE.js";import"./chunk-E4VIVMDL.js";import"./chunk-WLIYWBQR.js";import"./chunk-VRJPH3LG.js";import"./chunk-HLFDC4SF.js";export{a as DEFAULT_HNSW_CONFIG,b as HNSWIndex,d as benchmarkHNSW,c as createHNSWIndex};
|
|
@@ -1,2 +0,0 @@
|
|
|
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.15.5");process.exit(0)}
|
|
2
|
-
import{a,b}from"./chunk-3OAQPN2N.js";import"./chunk-EOR3RECZ.js";import"./chunk-RUJLVJDE.js";import"./chunk-RUSLEOMC.js";import"./chunk-KHCALIFP.js";import"./chunk-2XYTS2WY.js";import"./chunk-3YASZPLO.js";import"./chunk-MQGEZA2A.js";import"./chunk-OU4ZAWCC.js";import"./chunk-OQDC7GCM.js";import"./chunk-RMJ7PJOS.js";import"./chunk-Y2E3IJ53.js";import"./chunk-OGYWWZU7.js";import"./chunk-L336HFFE.js";import"./chunk-E4VIVMDL.js";import"./chunk-WLIYWBQR.js";import"./chunk-NLDFNAOS.js";import"./chunk-VRJPH3LG.js";import"./chunk-KZVJW2SD.js";import"./chunk-IHFUEPZH.js";import"./chunk-U6OVPMQX.js";import"./chunk-HLFDC4SF.js";export{a as HybridMemoryBackend,b as createKernelMemoryBackend};
|
|
@@ -1,2 +0,0 @@
|
|
|
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.15.5");process.exit(0)}
|
|
2
|
-
import{a}from"./chunk-BBL6YXD3.js";import"./chunk-QXY3IRBW.js";import"./chunk-XQRE2HWM.js";import"./chunk-A2WOQO2N.js";import"./chunk-ZT3GUYM5.js";import"./chunk-RUSLEOMC.js";import"./chunk-AQN5EDBM.js";import"./chunk-3AYYGR6W.js";import"./chunk-L336HFFE.js";import"./chunk-E4VIVMDL.js";import"./chunk-WLIYWBQR.js";import"./chunk-NLDFNAOS.js";import"./chunk-HLFDC4SF.js";export{a as ImpactAnalyzerService};
|
|
@@ -1,86 +0,0 @@
|
|
|
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.15.5");process.exit(0)}
|
|
2
|
-
import{a as y}from"./chunk-3AYYGR6W.js";import{a as f,e as v}from"./chunk-NLDFNAOS.js";import"./chunk-HLFDC4SF.js";import{Option as C}from"commander";import o from"chalk";import{createRequire as A}from"node:module";v();var I="--no-mcp and --with-mcp cannot be combined: --no-mcp skips the .mcp.json entry, --with-mcp forces it";function w(i,e){return i===!1||e===!0}function h(i){let e={noMcp:w(i.mcp,i.noMcp),withMcp:i.withMcp===!0,noGovernance:w(i.governance,i.noGovernance),noClaude:w(i.claude,i.noClaude),noStatusLine:w(i.statusline,i.noStatusLine),noDatabase:i.database===!1};if(e.noMcp&&e.withMcp)throw new Error(I);return e}var b=class{name="init";description="Initialize the AQE v3 system";cleanupAndExit;originalStdoutWrite=null;constructor(e){this.cleanupAndExit=e}register(e,n){e.command("init").description(this.description).option("-d, --domains <domains>","Comma-separated list of domains to enable","all").option("-m, --max-agents <number>","Maximum concurrent agents","15").option("--memory <backend>",'Memory backend (sqlite|agentdb|hybrid|memory). "memory" = database-free, in-memory only.',"hybrid").option("--no-database","Database-free install: alias for `--memory memory`. Skips the SQLite database phase and runs any MCP server in-memory \u2014 nothing is written to .agentic-qe/.").option("--no-statusline","Do not install AQE's Claude Code status line; remove an existing AQE-owned status line while preserving custom ones").option("--lazy","Enable lazy loading of domains").option("--wizard","Run interactive setup wizard").option("--auto","Auto-configure based on project analysis").option("-u, --upgrade","Upgrade existing installation (overwrite skills, agents, validation)").option("--browser-engine","Install optional Vibium and browser payload (explicit download)",!1).option("--no-browser-engine","Skip optional browser setup (default)").option("--minimal","Minimal configuration (skip optional features)").option("--skip-patterns","Skip loading pre-trained patterns").option("--skip-code-index","Skip code intelligence pre-scan (supported escape hatch \u2014 KG can be built later via `aqe code index`, also via env AQE_SKIP_CODE_INDEX=1)").option("--json","Emit machine-readable JSON result on stdout (suppresses banners; phase progress goes to stderr). Used by the release-gate corpus and CI tooling. See InitJsonOutput in init-handler.ts for the schema.").option("--with-n8n","Install n8n workflow testing agents and skills").option("--with-opencode","Include OpenCode agent/skill provisioning").option("--with-kiro","Include AWS Kiro IDE integration (agents, skills, hooks, steering)").option("--with-copilot","Include GitHub Copilot MCP config and instructions").option("--with-cursor","Include Cursor MCP config and rules").option("--with-cline","Include Cline MCP config and custom QE mode").option("--with-kilocode","Include Kilo Code MCP config and custom QE mode").option("--with-roocode","Include Roo Code MCP config and custom QE mode").option("--with-codex","Include OpenAI Codex CLI MCP, AGENTS.md, hooks, and QE skills").addOption(new C("--codex-guidance <mode>","Codex AGENTS.md guidance policy").choices(["full","compact","none"]).default("full")).option("--with-ruflo","Add optional Ruflo guidance and lifecycle hooks to the Codex setup").option("--with-windsurf","Include Windsurf MCP config and rules").option("--with-continuedev","Include Continue.dev MCP config and rules").option("--no-mcp","Skip MCP server config (MCP is enabled by default). Cannot be combined with --with-mcp").addOption(new C("--with-mcp","Write the project .mcp.json agentic-qe entry even when the agentic-qe-fleet Claude Code plugin already provides the AQE MCP server (#922). Cannot be combined with --no-mcp").conflicts("mcp")).option("--with-all-platforms","Include all coding agent platform configurations").option("--auto-migrate","Automatically migrate from v2 if detected").option("--with-claude-flow","Force Claude Flow integration setup").option("--skip-claude-flow","Skip Claude Flow integration").option("--no-governance","Skip governance configuration (ADR-058)").option("--no-claude","Suppress the default Claude Code surface (.claude/, .mcp.json, CLAUDE.md, governance, hooks) so --with-<platform> flags are the only install targets (#532)").option("--modular","Use new modular init system (default for --auto)").action(async a=>{await this.execute(a,n)})}async execute(e,n){if(e.json===!0){this.originalStdoutWrite=process.stdout.write.bind(process.stdout);let a=process.stderr.write.bind(process.stderr);process.stdout.write=((...r)=>a(...r))}try{if(e.withAllPlatforms&&(e.withCopilot=!0,e.withCursor=!0,e.withCline=!0,e.withKilocode=!0,e.withRoocode=!0,e.withCodex=!0,e.withWindsurf=!0,e.withContinuedev=!0),e.upgrade&&!e.auto&&!e.wizard&&(e.auto=!0),e.wizard||e.auto){if(console.log(o.blue(`
|
|
3
|
-
Agentic QE v3 Initialization
|
|
4
|
-
`)),e.auto||e.modular||e.browserEngine){await this.runModularInit(e,n);return}await this.runLegacyWizard(e,n);return}let a=!!(e.withOpencode||e.withN8n||e.withKiro||e.withCopilot||e.withCursor||e.withCline||e.withKilocode||e.withRoocode||e.withCodex||e.withWindsurf||e.withContinuedev||e.withAllPlatforms),r=h(e),d=r.noDatabase||e.memory==="memory",m=r.noClaude,l=r.noStatusLine;if(e.browserEngine||e.modular||a||d||m||l){console.log(o.blue(`
|
|
5
|
-
Agentic QE v3 Initialization
|
|
6
|
-
`)),await this.runModularInit(e,n);return}await this.runStandardInit(e,n)}catch(a){console.error(o.red(`
|
|
7
|
-
Failed to initialize:`),a),await this.cleanupAndExit(1)}}async runModularInit(e,n){let a=e.json===!0,r=h(e),d=r.noDatabase||e.memory==="memory";d&&(process.env.AQE_MEMORY_BACKEND="memory",a||console.log(o.gray(` Database-free mode: in-memory backend (no .agentic-qe/memory.db)
|
|
8
|
-
`)));let m=r.noClaude;m&&!(e.withOpencode||e.withN8n||e.withKiro||e.withCopilot||e.withCursor||e.withCline||e.withKilocode||e.withRoocode||e.withCodex||e.withWindsurf||e.withContinuedev||e.withAllPlatforms)&&!a&&console.log(o.yellow(` --no-claude set without any --with-<platform>: this install will write almost nothing.
|
|
9
|
-
`));let{createModularInitOrchestrator:l}=await import("./orchestrator-VHUXUYIM.js"),c=l({projectRoot:process.cwd(),autoMode:e.auto,upgrade:e.upgrade,minimal:e.minimal,browserEngine:e.browserEngine,skipPatterns:e.skipPatterns,skipCodeIndex:e.skipCodeIndex,withN8n:e.withN8n,withOpenCode:e.withOpencode,withKiro:e.withKiro,withCopilot:e.withCopilot,withCursor:e.withCursor,withCline:e.withCline,withKiloCode:e.withKilocode,withRooCode:e.withRoocode,withCodex:e.withCodex,withRuflo:e.withRuflo,codexGuidance:e.codexGuidance,withWindsurf:e.withWindsurf,withContinueDev:e.withContinuedev,noMcp:r.noMcp,withMcp:r.withMcp,noGovernance:r.noGovernance,noClaude:m,noStatusLine:r.noStatusLine,memoryBackend:d?"memory":void 0});console.log(o.white(` Analyzing project...
|
|
10
|
-
`));let t=await c.initialize();if(a){this.originalStdoutWrite&&(process.stdout.write=this.originalStdoutWrite);let s={schemaVersion:1,success:t.success,steps:t.steps.map(g=>({step:g.step,status:g.status,message:g.message,durationMs:g.durationMs})),summary:t.summary,totalDurationMs:t.totalDurationMs,timestamp:t.timestamp.toISOString()};process.stdout.write(JSON.stringify(s,null,2)+`
|
|
11
|
-
`);let p=t.steps.some(g=>g.status==="error");await this.cleanupAndExit(t.success&&!p?0:1);return}for(let s of t.steps){let p=s.status==="success"?"*":s.status==="error"?"x":"!",g=s.status==="success"?o.green:s.status==="error"?o.red:o.yellow;console.log(g(` ${p} ${s.step} (${s.durationMs}ms)`))}console.log("");let u;if(!e.skipClaudeFlow&&(e.withClaudeFlow||t.success))try{let{setupClaudeFlowIntegration:s}=await import("./claude-flow-setup-RL7K2NI2.js");if(u=await s({projectRoot:process.cwd(),force:e.withClaudeFlow}),u.available)console.log(o.green(" * Claude Flow integration enabled")),u.features.trajectories&&console.log(o.gray(" - SONA trajectory tracking")),u.features.modelRouting&&console.log(o.gray(" - 3-tier model routing (haiku/sonnet/opus)")),u.features.pretrain&&console.log(o.gray(" - Codebase pretrain analysis")),console.log("");else{let{getClaudeFlowNotFoundMessage:p}=await import("./detect-XKQGLZYN.js");console.log(o.gray(p())),console.log("")}}catch{let{getClaudeFlowNotFoundMessage:s}=await import("./detect-XKQGLZYN.js");console.log(o.gray(s())),console.log("")}t.success?(console.log(o.green(` AQE v3 initialized successfully!
|
|
12
|
-
`)),console.log(o.blue(" Summary:")),console.log(o.gray(` - Patterns loaded: ${t.summary.patternsLoaded}`)),console.log(o.gray(` - Skills installed: ${t.summary.skillsInstalled}`)),console.log(o.gray(` - Agents installed: ${t.summary.agentsInstalled}`)),console.log(o.gray(` - Hooks configured: ${t.summary.hooksConfigured?"Yes":"No"}`)),console.log(o.gray(` - Workers started: ${t.summary.workersStarted}`)),console.log(o.gray(` - Claude Flow: ${u?.available?"Enabled":"Standalone mode"}`)),console.log(o.gray(` - Total time: ${t.totalDurationMs}ms
|
|
13
|
-
`)),console.log(o.white("Next steps:")),console.log(o.gray(" 1. Run tests: aqe test <path>")),console.log(o.gray(" 2. Check coverage: aqe coverage <path>")),console.log(o.gray(" 3. Check status: aqe status")),t.summary.mcpConfigured&&(console.log(o.gray(`
|
|
14
|
-
MCP server configured in .mcp.json`)),console.log(o.gray(` Use --no-mcp to skip MCP setup if using CLI only
|
|
15
|
-
`))),k()):(console.log(o.red(` Initialization failed. Check errors above.
|
|
16
|
-
`)),await this.cleanupAndExit(1)),await this.cleanupAndExit(0)}async runLegacyWizard(e,n){let a=h(e),{InitOrchestrator:r}=await import("./init-wizard-C2MRX2QG.js"),d={projectRoot:process.cwd(),autoMode:e.auto,minimal:e.minimal,browserEngine:e.browserEngine,skipPatterns:e.skipPatterns,withN8n:e.withN8n,noMcp:a.noMcp,withMcp:a.withMcp},m=new r(d);if(e.wizard){console.log(o.white(` Setup Wizard Steps:
|
|
17
|
-
`));let c=m.getWizardSteps();for(let t=0;t<c.length;t++)console.log(o.gray(` ${t+1}. ${c[t].title}`)),console.log(o.gray(` ${c[t].description}
|
|
18
|
-
`))}console.log(o.white(` Analyzing project...
|
|
19
|
-
`));let l=await m.initialize();for(let c of l.steps){let t=c.status==="success"?"*":c.status==="error"?"x":"!",u=c.status==="success"?o.green:c.status==="error"?o.red:o.yellow;console.log(u(` ${t} ${c.step} (${c.durationMs}ms)`))}console.log(""),l.success?(console.log(o.green(` AQE v3 initialized successfully!
|
|
20
|
-
`)),console.log(o.blue(" Summary:")),console.log(o.gray(` - Patterns loaded: ${l.summary.patternsLoaded}`)),console.log(o.gray(` - Hooks configured: ${l.summary.hooksConfigured?"Yes":"No"}`)),console.log(o.gray(` - Workers started: ${l.summary.workersStarted}`)),l.summary.n8nInstalled&&(console.log(o.gray(` - N8n agents: ${l.summary.n8nInstalled.agents}`)),console.log(o.gray(` - N8n skills: ${l.summary.n8nInstalled.skills}`))),console.log(o.gray(` - Total time: ${l.totalDurationMs}ms
|
|
21
|
-
`)),console.log(o.white("Next steps:")),console.log(o.gray(" 1. Run tests: aqe test <path>")),console.log(o.gray(" 2. Check coverage: aqe coverage <path>")),console.log(o.gray(" 3. Check status: aqe status")),l.summary.mcpConfigured&&(console.log(o.gray(`
|
|
22
|
-
MCP server configured in .mcp.json`)),console.log(o.gray(` Use --no-mcp to skip MCP setup if using CLI only
|
|
23
|
-
`))),k()):(console.log(o.red(` Initialization failed. Check errors above.
|
|
24
|
-
`)),await this.cleanupAndExit(1)),await this.cleanupAndExit(0)}async runStandardInit(e,n){let{QEKernelImpl:a}=await import("./kernel-Q2IUDIDC.js"),{CrossDomainEventRouter:r}=await import("./cross-domain-router-CTGNOVCF.js"),{DefaultProtocolExecutor:d}=await import("./protocol-executor-ML76QAVQ.js"),{WorkflowOrchestrator:m}=await import("./workflow-orchestrator-USJDWVDR.js"),{createQueenCoordinator:l}=await import("./queen-coordinator-EWXNIXB6.js");console.log(o.blue(`
|
|
25
|
-
Initializing Agentic QE v3...
|
|
26
|
-
`));let c=e.domains==="all"?[...y]:e.domains.split(",").filter(s=>y.includes(s));console.log(o.gray(` Domains: ${c.length}`)),console.log(o.gray(` Max Agents: ${e.maxAgents}`)),console.log(o.gray(` Memory: ${e.memory}`)),console.log(o.gray(` Lazy Loading: ${e.lazy?"enabled":"disabled"}
|
|
27
|
-
`)),n.kernel=new a({maxConcurrentAgents:parseInt(e.maxAgents,10),memoryBackend:e.memory,hnswEnabled:!0,lazyLoading:e.lazy||!1,enabledDomains:c,enableExperienceBridge:!1}),await n.kernel.initialize(),console.log(o.green(" * Kernel initialized")),n.router=new r(n.kernel.eventBus),await n.router.initialize(),console.log(o.green(" * Cross-domain router initialized"));let t=s=>n.kernel.getDomainAPI(s),u=new d(n.kernel.eventBus,n.kernel.memory,t);console.log(o.green(" * Protocol executor initialized")),n.workflowOrchestrator=new m(n.kernel.eventBus,n.kernel.memory,n.kernel.coordinator),await n.workflowOrchestrator.initialize(),this.registerDomainWorkflowActions(n.kernel,n.workflowOrchestrator),console.log(o.green(" * Workflow orchestrator initialized")),n.queen=l(n.kernel,n.router,u,void 0),await n.queen.initialize(),console.log(o.green(" * Queen Coordinator initialized")),n.initialized=!0,console.log(o.green(`
|
|
28
|
-
AQE v3 initialized successfully!
|
|
29
|
-
`)),console.log(o.blue(" Enabled Domains:"));for(let s of c)console.log(o.gray(` - ${s}`));console.log(""),await this.cleanupAndExit(0)}registerDomainWorkflowActions(e,n){let a=e.getDomainAPI("visual-accessibility");if(a?.registerWorkflowActions)try{a.registerWorkflowActions(n)}catch(d){console.error(o.yellow(` ! Could not register visual-accessibility workflow actions: ${f(d)}`))}let r=e.getDomainAPI("requirements-validation");if(r?.registerWorkflowActions)try{r.registerWorkflowActions(n)}catch(d){console.error(o.yellow(` ! Could not register requirements-validation workflow actions: ${f(d)}`))}}getHelp(){return`
|
|
30
|
-
Initialize the AQE v3 system with various configuration options.
|
|
31
|
-
|
|
32
|
-
Usage:
|
|
33
|
-
aqe init [options]
|
|
34
|
-
|
|
35
|
-
Options:
|
|
36
|
-
-d, --domains <domains> Comma-separated list of domains to enable (default: all)
|
|
37
|
-
-m, --max-agents <number> Maximum concurrent agents (default: 15)
|
|
38
|
-
--memory <backend> Memory backend: sqlite, agentdb, or hybrid (default: hybrid)
|
|
39
|
-
--lazy Enable lazy loading of domains
|
|
40
|
-
--wizard Run interactive setup wizard
|
|
41
|
-
--auto Auto-configure based on project analysis
|
|
42
|
-
-u, --upgrade Upgrade existing installation (overwrite skills, agents, validation)
|
|
43
|
-
--minimal Minimal configuration (skip optional features)
|
|
44
|
-
--skip-patterns Skip loading pre-trained patterns
|
|
45
|
-
--browser-engine Install optional Vibium and browser payload
|
|
46
|
-
--no-browser-engine Skip browser setup (default)
|
|
47
|
-
--with-n8n Install n8n workflow testing agents and skills
|
|
48
|
-
--with-opencode Include OpenCode agent/skill provisioning
|
|
49
|
-
--with-codex Include OpenAI Codex hooks, instructions, skills, and MCP
|
|
50
|
-
--codex-guidance <mode> Codex AGENTS.md guidance: full, compact, or none
|
|
51
|
-
--with-ruflo Opt into Ruflo guidance and lifecycle hooks for Codex
|
|
52
|
-
--auto-migrate Automatically migrate from v2 if detected
|
|
53
|
-
--with-claude-flow Force Claude Flow integration setup
|
|
54
|
-
--skip-claude-flow Skip Claude Flow integration
|
|
55
|
-
--no-mcp Skip MCP server config (MCP is enabled by default)
|
|
56
|
-
--with-mcp Add the .mcp.json entry even if the agentic-qe-fleet plugin is enabled
|
|
57
|
-
(--no-mcp and --with-mcp cannot be combined)
|
|
58
|
-
--no-governance Skip governance configuration (ADR-058)
|
|
59
|
-
--modular Use new modular init system
|
|
60
|
-
|
|
61
|
-
MCP Server:
|
|
62
|
-
MCP server configuration is ENABLED BY DEFAULT. It writes .mcp.json
|
|
63
|
-
at the project root so Claude Code auto-discovers the AQE MCP server.
|
|
64
|
-
Use --no-mcp to skip if you only want CLI commands.
|
|
65
|
-
If the agentic-qe-fleet Claude Code plugin is enabled (user, project or
|
|
66
|
-
local settings), init skips the entry because the plugin already provides
|
|
67
|
-
the AQE MCP server. Use --with-mcp to add the project entry anyway.
|
|
68
|
-
|
|
69
|
-
Governance:
|
|
70
|
-
Governance is ENABLED BY DEFAULT. It installs .claude/guidance/ with:
|
|
71
|
-
- constitution.md: 7 unbreakable QE invariants
|
|
72
|
-
- shards/*.shard.md: 12 domain-specific governance rules
|
|
73
|
-
|
|
74
|
-
Use --no-governance to skip, or set GOVERNANCE_*=false env vars for
|
|
75
|
-
fine-grained control over individual gates (ContinueGate, MemoryWriteGate, etc.)
|
|
76
|
-
|
|
77
|
-
Examples:
|
|
78
|
-
aqe init --auto # Auto-configure based on project (keeps existing skills)
|
|
79
|
-
aqe init --auto --with-codex --with-ruflo
|
|
80
|
-
# Codex plus optional Ruflo coordination
|
|
81
|
-
aqe init --auto --upgrade # Auto-configure AND update all skills/agents
|
|
82
|
-
aqe init --upgrade # Upgrade existing installation
|
|
83
|
-
aqe init --wizard # Run interactive wizard
|
|
84
|
-
aqe init --domains test-generation,coverage-analysis
|
|
85
|
-
`}},E=[{pkg:"@claude-flow/browser",version:"3.0.0-alpha.1",enables:"browser MCP server \u2014 URL safety + PII scanning in browser flows"},{pkg:"@claude-flow/guidance",version:"3.0.0-alpha.1",enables:"governance \u2014 trust accumulator, continue-gate, proof envelope"}];function M(i){let e=A(import.meta.url);try{return e.resolve(i),!0}catch(n){return n?.code==="ERR_PACKAGE_PATH_NOT_EXPORTED"}}function k(){let i=E.filter(({pkg:e})=>!M(e));if(i.length!==0){console.log(o.bold(`
|
|
86
|
-
Optional add-ons (install only if you want the feature):`));for(let{pkg:e,version:n,enables:a}of i)console.log(` ${o.gray(e)} ${o.dim("\u2014 "+a)}`),console.log(o.cyan(` npm install -g ${e}@${n}`));console.log("")}}function q(i){return new b(i)}export{b as InitHandler,q as createInitHandler};
|
|
@@ -1,2 +0,0 @@
|
|
|
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.15.5");process.exit(0)}
|
|
2
|
-
import{a,b,c,d}from"./chunk-6UYN5PHA.js";import"./chunk-VH3EB6ZG.js";import"./chunk-QPV3OKX2.js";import"./chunk-XIE7OHML.js";import"./chunk-JI77KJP7.js";import"./chunk-JCC7QEKZ.js";import"./chunk-FNAYDITO.js";import"./chunk-RUSLEOMC.js";import"./chunk-3AYYGR6W.js";import"./chunk-NLDFNAOS.js";import"./chunk-IHFUEPZH.js";import"./chunk-U6OVPMQX.js";import"./chunk-HLFDC4SF.js";export{a as InitOrchestrator,b as createInitOrchestrator,d as formatInitResult,c as quickInit};
|
|
@@ -1,2 +0,0 @@
|
|
|
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.15.5");process.exit(0)}
|
|
2
|
-
import{A as b,z as a}from"./chunk-ZLBBX24Q.js";import"./chunk-TDLKXLJC.js";import"./chunk-VLOIEVER.js";import"./chunk-BMWAWZAN.js";import"./chunk-BJ5P4IV2.js";import"./chunk-VYDNLQJN.js";import"./chunk-NF6AFIAX.js";import"./chunk-X52TMBHU.js";import"./chunk-EUEHBERE.js";import"./chunk-PHP4UJYP.js";import"./chunk-PCCIZFD7.js";import"./chunk-DFPL5N3Q.js";import"./chunk-DLY4YEN3.js";import"./chunk-FWYJ6UDX.js";import"./chunk-LRASYSGV.js";import"./chunk-PVAE65B4.js";import"./chunk-6JFGB2JB.js";import"./chunk-CXOXUBYU.js";import"./chunk-BBL6YXD3.js";import"./chunk-QXY3IRBW.js";import"./chunk-XNHB6TLC.js";import"./chunk-DTJODGCE.js";import"./chunk-WC47GICZ.js";import"./chunk-GKPRECLL.js";import"./chunk-SDWMLT7B.js";import"./chunk-6ZIDZ4TJ.js";import"./chunk-XNEEYXR2.js";import"./chunk-A337MD3C.js";import"./chunk-DL5JENWD.js";import"./chunk-Y2WMPEUP.js";import"./chunk-XQRE2HWM.js";import"./chunk-FBEXG4HD.js";import"./chunk-Y7GPLOXB.js";import"./chunk-DWZI3IVB.js";import"./chunk-WR64BKUE.js";import"./chunk-3SH23PS3.js";import"./chunk-JCC7QEKZ.js";import"./chunk-7BIYJRQJ.js";import"./chunk-ZTC5FBL6.js";import"./chunk-4UXPDV7E.js";import"./chunk-4PT5KNXL.js";import"./chunk-4AZP7ZCW.js";import"./chunk-FNAYDITO.js";import"./chunk-A5J4XJS6.js";import"./chunk-V7GNUVYI.js";import"./chunk-OW42F2TX.js";import"./chunk-PDPEMBFV.js";import"./chunk-NMJVG22Z.js";import"./chunk-FHUJCVT3.js";import"./chunk-3OAQPN2N.js";import"./chunk-L375O3CZ.js";import"./chunk-MNQ36MAF.js";import"./chunk-ONCH5AXU.js";import"./chunk-WT3JC4A6.js";import"./chunk-35MDATQE.js";import"./chunk-HGBJ2QQ4.js";import"./chunk-AUZXRFOX.js";import"./chunk-A2WOQO2N.js";import"./chunk-JANLATHN.js";import"./chunk-ZT3GUYM5.js";import"./chunk-CQMHDAJS.js";import"./chunk-GGDKOJVF.js";import"./chunk-L6SVCNXK.js";import"./chunk-663ZFPUL.js";import"./chunk-EOR3RECZ.js";import"./chunk-RUJLVJDE.js";import"./chunk-RUSLEOMC.js";import"./chunk-KHCALIFP.js";import"./chunk-2XYTS2WY.js";import"./chunk-3YASZPLO.js";import"./chunk-MQGEZA2A.js";import"./chunk-OU4ZAWCC.js";import"./chunk-OQDC7GCM.js";import"./chunk-RMJ7PJOS.js";import"./chunk-FQKEZVN6.js";import"./chunk-EAYQCBXL.js";import"./chunk-Y2E3IJ53.js";import"./chunk-AQN5EDBM.js";import"./chunk-PHAQWAEV.js";import"./chunk-3AYYGR6W.js";import"./chunk-OGYWWZU7.js";import"./chunk-L336HFFE.js";import"./chunk-E4VIVMDL.js";import"./chunk-WLIYWBQR.js";import"./chunk-NLDFNAOS.js";import"./chunk-VRJPH3LG.js";import"./chunk-3QD7U3FY.js";import"./chunk-KZVJW2SD.js";import"./chunk-UE22ODHN.js";import"./chunk-N2TJNIHA.js";import"./chunk-IHFUEPZH.js";import"./chunk-U6OVPMQX.js";import"./chunk-HLFDC4SF.js";export{a as QEKernelImpl,b as createKernel};
|
|
@@ -1,2 +0,0 @@
|
|
|
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.15.5");process.exit(0)}
|
|
2
|
-
import{g as a}from"./chunk-QXY3IRBW.js";import"./chunk-XQRE2HWM.js";import"./chunk-A2WOQO2N.js";import"./chunk-ZT3GUYM5.js";import"./chunk-RUSLEOMC.js";import"./chunk-3AYYGR6W.js";import"./chunk-L336HFFE.js";import"./chunk-E4VIVMDL.js";import"./chunk-WLIYWBQR.js";import"./chunk-NLDFNAOS.js";import"./chunk-HLFDC4SF.js";export{a as KnowledgeGraphService};
|