agentic-qe 3.9.23 → 3.9.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/skills/skills-manifest.json +1 -1
- package/CHANGELOG.md +23 -0
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/cli/bundle.js +5 -5
- package/dist/cli/chunks/adapter-KIGGXGP6.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-QLYJEECV.js → agent-booster-wasm-YYKCGP5I.js} +2 -2
- package/dist/cli/chunks/{agent-handler-2BAL4D34.js → agent-handler-SDRMLJNW.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-24RGSADY.js → agent-memory-branch-AD5E4475.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-L3OD7COO.js +2 -0
- package/dist/cli/chunks/{audit-SUNUARKM.js → audit-6CXDBP5N.js} +2 -2
- package/dist/cli/chunks/base-D55R3AAK.js +2 -0
- package/dist/cli/chunks/{hnswlib-node-7W776R32.js → better-sqlite3-X4MDD7D3.js} +2 -2
- package/dist/cli/chunks/{brain-handler-IC347IHT.js → brain-handler-QPMGPK4J.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-QCWCWYOV.js → branch-enumerator-RNVAQ47F.js} +2 -2
- package/dist/cli/chunks/{browser-UQBPN73J.js → browser-GCXX35IY.js} +2 -2
- package/dist/cli/chunks/browser-workflow-GVOTUSBY.js +2 -0
- package/dist/cli/chunks/{chunk-4OMHXMCH.js → chunk-25AL3RPA.js} +1 -1
- package/dist/cli/chunks/{chunk-XARQGJM2.js → chunk-2NJO73YD.js} +2 -2
- package/dist/cli/chunks/{chunk-YCM3F3DA.js → chunk-3LHP7G6U.js} +1 -1
- package/dist/cli/chunks/{chunk-DENKSTR5.js → chunk-3NZ7IVRI.js} +2 -2
- package/dist/cli/chunks/{chunk-C2XZKYV2.js → chunk-3Y5C4SE3.js} +2 -2
- package/dist/cli/chunks/{chunk-72GIAZOO.js → chunk-3ZNIACXR.js} +1 -1
- package/dist/cli/chunks/{chunk-7SHZ5BNE.js → chunk-42CCJFXZ.js} +2 -2
- package/dist/cli/chunks/{chunk-2ZUNDAJ5.js → chunk-4AUGLQOE.js} +2 -2
- package/dist/cli/chunks/{chunk-FHFEKMXP.js → chunk-4FCCQJQA.js} +1 -1
- package/dist/cli/chunks/{chunk-I4MDD35Z.js → chunk-4LA24G33.js} +1 -1
- package/dist/cli/chunks/{chunk-7DUURG7X.js → chunk-4SDQZI7D.js} +1 -1
- package/dist/cli/chunks/{chunk-P6CK2HEP.js → chunk-54RVQDTB.js} +1 -1
- package/dist/cli/chunks/{chunk-QWHQUIPC.js → chunk-5OBSLVXI.js} +2 -2
- package/dist/cli/chunks/{chunk-EXXTHDKQ.js → chunk-6FCVDWPR.js} +1 -1
- package/dist/cli/chunks/{chunk-W47CQVJZ.js → chunk-6SWRLJ3I.js} +2 -2
- package/dist/cli/chunks/{chunk-QM7YGBAV.js → chunk-6XXHK6NL.js} +2 -2
- package/dist/cli/chunks/{chunk-CLMIRGMC.js → chunk-73JTRGIQ.js} +2 -2
- package/dist/cli/chunks/{chunk-PYEK56ML.js → chunk-73K34C4S.js} +4 -4
- package/dist/cli/chunks/{chunk-WY5TVPXF.js → chunk-7H36CVZ6.js} +2 -2
- package/dist/cli/chunks/{chunk-SNK365ZD.js → chunk-7I6ULQRI.js} +1 -1
- package/dist/cli/chunks/{chunk-F2BTR5PL.js → chunk-7LIRKYB6.js} +2 -2
- package/dist/cli/chunks/{chunk-N7E2CHLQ.js → chunk-7ODDJI3P.js} +2 -2
- package/dist/cli/chunks/{chunk-72XRUTMI.js → chunk-7TC7HNSA.js} +2 -2
- package/dist/cli/chunks/{chunk-FALKMG3G.js → chunk-7XK73L6C.js} +4 -4
- package/dist/cli/chunks/{chunk-IF2TA7WB.js → chunk-A4CHQJEO.js} +2 -2
- package/dist/cli/chunks/{chunk-67UGSBUX.js → chunk-AJ45BRKK.js} +2 -2
- package/dist/cli/chunks/{chunk-JW3FK26F.js → chunk-BDGKN7GC.js} +1 -1
- package/dist/cli/chunks/{chunk-LHZLX6A5.js → chunk-BWCSNSXR.js} +2 -2
- package/dist/cli/chunks/{chunk-OJWR3I6W.js → chunk-C4ST4NP4.js} +2 -2
- package/dist/cli/chunks/{chunk-6SQTWXV4.js → chunk-CTSTHKH4.js} +1 -1
- package/dist/cli/chunks/{chunk-7TYUZ6LI.js → chunk-DFG3KX7E.js} +2 -2
- package/dist/cli/chunks/chunk-DWNKD2AQ.js +2 -0
- package/dist/cli/chunks/{chunk-OZ3QFUQS.js → chunk-DZHAXSOZ.js} +1 -1
- package/dist/cli/chunks/{chunk-XI7JTYSU.js → chunk-DZPKBTP3.js} +2 -2
- package/dist/cli/chunks/{chunk-J2RELPD3.js → chunk-EAC3PZGH.js} +2 -2
- package/dist/cli/chunks/{chunk-QSUJ6DAT.js → chunk-EALLOFGD.js} +1 -1
- package/dist/cli/chunks/{chunk-3S3SLVU6.js → chunk-EHA2BZ47.js} +2 -2
- package/dist/cli/chunks/{chunk-PTSQ43XG.js → chunk-ERDCTBUC.js} +2 -2
- package/dist/cli/chunks/{chunk-PTX6ANZC.js → chunk-F4GZAQR2.js} +2 -2
- package/dist/cli/chunks/{chunk-GOGDK7LQ.js → chunk-FHRUSW2V.js} +2 -2
- package/dist/cli/chunks/{chunk-ODWVWWYF.js → chunk-FPBCG7CX.js} +2 -2
- package/dist/cli/chunks/{chunk-VMCAEZKC.js → chunk-G73FWR34.js} +3 -3
- package/dist/cli/chunks/{chunk-KOLE2DE4.js → chunk-HFPQVO4O.js} +2 -2
- package/dist/cli/chunks/{chunk-VHDRVB2K.js → chunk-HGOTTQQK.js} +2 -2
- package/dist/cli/chunks/{chunk-LBY4ISY3.js → chunk-HH3ENF7B.js} +1 -1
- package/dist/cli/chunks/{chunk-BX5MBOPH.js → chunk-HQY2BNJT.js} +2 -2
- package/dist/cli/chunks/{chunk-POL7GGDS.js → chunk-HYX3LWLA.js} +2 -2
- package/dist/cli/chunks/{chunk-WGN6OBTF.js → chunk-I3VTEYYF.js} +3 -3
- package/dist/cli/chunks/{chunk-WKNDFV4J.js → chunk-IFCUBSI2.js} +1 -1
- package/dist/cli/chunks/{chunk-3MFRGZ3U.js → chunk-INPP5RW4.js} +2 -2
- package/dist/cli/chunks/{chunk-CBVGJMLJ.js → chunk-IQRLMOTN.js} +1 -1
- package/dist/cli/chunks/{chunk-56CT3U76.js → chunk-JDJ6VEXU.js} +2 -2
- package/dist/cli/chunks/{chunk-AIXYKNIP.js → chunk-JVN5TS5E.js} +2 -2
- package/dist/cli/chunks/{chunk-VN5U55BD.js → chunk-JYMDWMEJ.js} +3 -3
- package/dist/cli/chunks/{chunk-ZXY55ZRR.js → chunk-K2M6UBGI.js} +1 -1
- package/dist/cli/chunks/{chunk-4CFZIIAE.js → chunk-KQRJXVMO.js} +1 -1
- package/dist/cli/chunks/{chunk-WYGUFSG7.js → chunk-KSN6QUCR.js} +2 -2
- package/dist/cli/chunks/{chunk-3X3CAXQM.js → chunk-L4JUOVBW.js} +2 -2
- package/dist/cli/chunks/{chunk-P75EWR76.js → chunk-L5JJKGKJ.js} +1 -1
- package/dist/cli/chunks/{chunk-UVDETKTM.js → chunk-L5Y2BVYX.js} +2 -2
- package/dist/cli/chunks/{chunk-TR7ILKUT.js → chunk-L7EDWT5P.js} +2 -2
- package/dist/cli/chunks/{chunk-J7EWOJJJ.js → chunk-LOFQAI7V.js} +2 -2
- package/dist/cli/chunks/{chunk-RA4RYX4P.js → chunk-LQHWPAQP.js} +2 -2
- package/dist/cli/chunks/{chunk-BBDC4KSK.js → chunk-LVR47OZA.js} +2 -2
- package/dist/cli/chunks/{chunk-UWQEPX7J.js → chunk-LX6XRBJ2.js} +2 -2
- package/dist/cli/chunks/{chunk-FHBOBIXW.js → chunk-M7MA7R2X.js} +1 -1
- package/dist/cli/chunks/{chunk-DVU4MM4I.js → chunk-MDSCVTJZ.js} +2 -2
- package/dist/cli/chunks/{chunk-RGSMJV6B.js → chunk-MG52OB2J.js} +1 -1
- package/dist/cli/chunks/{chunk-LF5NF2KQ.js → chunk-MUH2YGNO.js} +2 -2
- package/dist/cli/chunks/{chunk-AXWSB3WJ.js → chunk-MXXRESCK.js} +2 -2
- package/dist/cli/chunks/{chunk-N7PPEAND.js → chunk-N643IL63.js} +2 -2
- package/dist/cli/chunks/{chunk-PD3L4RVL.js → chunk-NOUDTI2R.js} +2 -2
- package/dist/cli/chunks/{chunk-TTVF2GAJ.js → chunk-NYEVQB5R.js} +2 -2
- package/dist/cli/chunks/{chunk-TFEBX3EF.js → chunk-O3ADCWEC.js} +2 -2
- package/dist/cli/chunks/{chunk-6XX43MT6.js → chunk-O4CTWG4B.js} +2 -2
- package/dist/cli/chunks/{chunk-RUNJYWCO.js → chunk-OJPKAWKD.js} +1 -1
- package/dist/cli/chunks/{chunk-YCV7GVBU.js → chunk-OOU4VQ2T.js} +2 -2
- package/dist/cli/chunks/{chunk-GQZ2OOFA.js → chunk-OPHVJUZK.js} +2 -2
- package/dist/cli/chunks/{chunk-V5FSNDXP.js → chunk-PEKULOY4.js} +1 -1
- package/dist/cli/chunks/{chunk-FYKYAIEC.js → chunk-PSJJNJLE.js} +1 -1
- package/dist/cli/chunks/{chunk-UDWJPVSR.js → chunk-PTIPWMXS.js} +1 -1
- package/dist/cli/chunks/{chunk-RG6ZEBBX.js → chunk-PU3MT7SE.js} +3 -3
- package/dist/cli/chunks/{chunk-4XOK4DHX.js → chunk-Q5OLVIKK.js} +2 -2
- package/dist/cli/chunks/{chunk-FJPQ2ENU.js → chunk-QDUV7TDQ.js} +2 -2
- package/dist/cli/chunks/{chunk-K5YKGHRB.js → chunk-QG63KW2J.js} +2 -2
- package/dist/cli/chunks/{chunk-NLW3NTNN.js → chunk-QLPGWGJT.js} +1 -1
- package/dist/cli/chunks/{chunk-5MTGPW66.js → chunk-QNMIY45G.js} +3 -3
- package/dist/cli/chunks/{chunk-Z4VZUUAW.js → chunk-QUN5QEW5.js} +2 -2
- package/dist/cli/chunks/{chunk-4XN5XAQ4.js → chunk-RGOJFKIY.js} +2 -2
- package/dist/cli/chunks/{chunk-LVNRGZC5.js → chunk-RHFNFYIL.js} +2 -2
- package/dist/cli/chunks/{chunk-6YF74LZ5.js → chunk-RMTPAEZO.js} +2 -2
- package/dist/cli/chunks/{chunk-6C5ZHH74.js → chunk-ROBKPGX5.js} +3 -3
- package/dist/cli/chunks/{chunk-HTT2AURL.js → chunk-RSED3U2F.js} +1 -1
- package/dist/cli/chunks/{chunk-RHU77EOX.js → chunk-SE572JWE.js} +3 -3
- package/dist/cli/chunks/{chunk-EHJKX273.js → chunk-SNTRKHVH.js} +4 -4
- package/dist/cli/chunks/{chunk-KOS2AH4K.js → chunk-TQGEZV6M.js} +2 -2
- package/dist/cli/chunks/{chunk-XPRPADO3.js → chunk-TS5YIHJH.js} +1 -1
- package/dist/cli/chunks/{chunk-MSLVQQCR.js → chunk-TUY3BOQM.js} +2 -2
- package/dist/cli/chunks/{chunk-V2JS2SFV.js → chunk-U6V6R2EF.js} +2 -2
- package/dist/cli/chunks/{chunk-FEJMFYXZ.js → chunk-UGR3JJD7.js} +2 -2
- package/dist/cli/chunks/{chunk-WNBPFZTW.js → chunk-V7IDAZKZ.js} +1 -1
- package/dist/cli/chunks/{chunk-D4U3UAS3.js → chunk-VUKMN54Z.js} +1 -1
- package/dist/cli/chunks/{chunk-QARVHXW3.js → chunk-W7HIJ5DV.js} +8 -8
- package/dist/cli/chunks/{chunk-OSSTNUL5.js → chunk-WB3GQ7X7.js} +2 -2
- package/dist/cli/chunks/{chunk-CFWHICPP.js → chunk-WGEX22Z4.js} +2 -2
- package/dist/cli/chunks/{chunk-K3IHEHKH.js → chunk-WH75EHSK.js} +2 -2
- package/dist/cli/chunks/{chunk-NCQNCCFK.js → chunk-XD6XAYKA.js} +9 -9
- package/dist/cli/chunks/{chunk-I6AEV3VJ.js → chunk-YEVQOQVZ.js} +1 -1
- package/dist/cli/chunks/{chunk-UIH6O2HR.js → chunk-YFWVVYZX.js} +1 -1
- package/dist/cli/chunks/{chunk-D7MI6TUG.js → chunk-YLC6QGNW.js} +2 -2
- package/dist/cli/chunks/{chunk-UKTYWW6X.js → chunk-YRKY76JZ.js} +2 -2
- package/dist/cli/chunks/{chunk-K73MLEXW.js → chunk-Z2CO6ZI5.js} +1 -1
- package/dist/cli/chunks/{chunk-JTJTFILP.js → chunk-ZHVORPKM.js} +2 -2
- package/dist/cli/chunks/{chunk-Z3FVM4RP.js → chunk-ZJNZ5SDG.js} +2 -2
- package/dist/cli/chunks/{chunk-T2B76Y6O.js → chunk-ZSVCK7B2.js} +2 -2
- package/dist/cli/chunks/{ci-HCKL5ZLC.js → ci-F4VZKYED.js} +2 -2
- package/dist/cli/chunks/{ci-output-EAGYFT3G.js → ci-output-LLKTJAKA.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-HZ5H3Y63.js → circuit-breaker-ZQ4747J4.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-6XQMNEE7.js → claude-flow-setup-LHM5WAJN.js} +2 -2
- package/dist/cli/chunks/client-LZ4J7CB2.js +2 -0
- package/dist/cli/chunks/{cline-installer-LVFNRTXU.js → cline-installer-YZOPUVED.js} +2 -2
- package/dist/cli/chunks/{code-DHZNDFYY.js → code-7WPHN4PO.js} +2 -2
- package/dist/cli/chunks/{code-index-extractor-NY46N2IA.js → code-index-extractor-N25SYDBV.js} +2 -2
- package/dist/cli/chunks/{codex-installer-UWTC3IMP.js → codex-installer-53WXU6E4.js} +2 -2
- package/dist/cli/chunks/{completions-DLOP65Q6.js → completions-WPB73WPI.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-3XHPAD5G.js → complexity-analyzer-OLOYWXN5.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-5HYX3CXP.js → continuedev-installer-5QXNYNJG.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-SU77KI4W.js → copilot-installer-POWDJ5TF.js} +2 -2
- package/dist/cli/chunks/{cost-tracker-AZVHCJFV.js → cost-tracker-NCRSKECA.js} +2 -2
- package/dist/cli/chunks/{coverage-CFTRTQBY.js → coverage-ZOWE75NF.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-RQJLKTPC.js +2 -0
- package/dist/cli/chunks/{cursor-installer-ZARQAGI2.js → cursor-installer-W5U432Q4.js} +2 -2
- package/dist/cli/chunks/{daemon-65EXRMRZ.js → daemon-JHXPBUL3.js} +3 -3
- package/dist/cli/chunks/{dag-attention-scheduler-R3MHZGS5.js → dag-attention-scheduler-JKYKYDLZ.js} +2 -2
- package/dist/cli/chunks/{detect-GHLRESNH.js → detect-MNW7EGOS.js} +2 -2
- package/dist/cli/chunks/{dist-node-GZYRURSL.js → dist-node-33BRM2EM.js} +2 -2
- package/dist/cli/chunks/{domain-handler-X45OXYAB.js → domain-handler-PRTXYKNX.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-IEM4PLV6.js → domain-transfer-FJVNUH6Y.js} +2 -2
- package/dist/cli/chunks/dream-LLY2GYI7.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-24KABHSD.js → embed-and-insert-pattern-XST4CYRL.js} +2 -2
- package/dist/cli/chunks/{eval-YPW5A5BY.js → eval-SLBS3MDW.js} +2 -2
- package/dist/cli/chunks/{experience-capture-middleware-NFD2B3IV.js → experience-capture-middleware-MZ4VBCGB.js} +3 -3
- package/dist/cli/chunks/{fast-paths-3LLBHBSC.js → fast-paths-H6Z4TAE7.js} +2 -2
- package/dist/cli/chunks/{feature-flags-I3NCVDC6.js → feature-flags-7UYNPXYB.js} +2 -2
- package/dist/cli/chunks/{feature-flags-UYDE4R4H.js → feature-flags-RF44J4FC.js} +2 -2
- package/dist/cli/chunks/{file-discovery-4VJNIXYH.js → file-discovery-2RZS7M6Q.js} +2 -2
- package/dist/cli/chunks/{fleet-PVQG7US3.js → fleet-XVVAC32S.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-X3PEOE2D.js → gnn-wrapper-XAJR4F5W.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-XZ4374WZ.js → heartbeat-handler-PAPNBHL5.js} +4 -4
- package/dist/cli/chunks/{heartbeat-scheduler-Z2SIX564.js → heartbeat-scheduler-PNGMQ5A2.js} +2 -2
- package/dist/cli/chunks/hnsw-adapter-5KZG2W4N.js +2 -0
- package/dist/cli/chunks/hnsw-index-RVENHJNC.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-BNEGPQHD.js → hnsw-legacy-bridge-EK67OOYT.js} +2 -2
- package/dist/cli/chunks/{better-sqlite3-Y5RYISCI.js → hnswlib-node-PIFTVXNO.js} +2 -2
- package/dist/cli/chunks/{hooks-TDRFWXDT.js → hooks-FXUZIAAW.js} +13 -13
- package/dist/cli/chunks/{hybrid-router-AUJSUAOQ.js → hybrid-router-FA6Q25KJ.js} +2 -2
- package/dist/cli/chunks/{hypergraph-engine-Z22BN2OM.js → hypergraph-engine-PT6AI5VE.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-6MVDLYO5.js → hypergraph-handler-TTP3AY5E.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-NXT3TDYG.js +2 -0
- package/dist/cli/chunks/{init-handler-YDJ4S37G.js → init-handler-GV4RMNLA.js} +6 -6
- package/dist/cli/chunks/init-wizard-WWYKBF4D.js +2 -0
- package/dist/cli/chunks/kernel-HGEE2UL6.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-YRGX6BNB.js → kilocode-installer-MUK6H6PQ.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-WJ2AYUS6.js → kiro-installer-VHOG37LV.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-EOJCWCZL.js +2 -0
- package/dist/cli/chunks/{learning-BVJQR4U6.js → learning-N5NUW6SR.js} +3 -3
- package/dist/cli/chunks/{llm-router-HQMOD6JX.js → llm-router-6D3JJ5MX.js} +4 -4
- package/dist/cli/chunks/{load-WFIFPKRX.js → load-3ZM66OKE.js} +2 -2
- package/dist/cli/chunks/load-test-HRB2KH2Y.js +2 -0
- package/dist/cli/chunks/{mcp-QDCLWKZL.js → mcp-W2JSXQ32.js} +2 -2
- package/dist/cli/chunks/{memory-VRYS37CC.js → memory-J4W4HRUH.js} +5 -5
- package/dist/cli/chunks/memory-backend-DPAKTNVV.js +2 -0
- package/dist/cli/chunks/{memory-handlers-CETDJWFQ.js → memory-handlers-ZBNFDKP4.js} +2 -2
- package/dist/cli/chunks/{multi-model-executor-OVS6GVH5.js → multi-model-executor-MVEFZZSV.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-4P2L2JOC.js → opencode-installer-DGRDAJFV.js} +2 -2
- package/dist/cli/chunks/{orchestrator-YGXY7UIG.js → orchestrator-LPXK5JF7.js} +5 -5
- package/dist/cli/chunks/{pipeline-3O7CG7LQ.js → pipeline-7GABQFX4.js} +2 -2
- package/dist/cli/chunks/{platform-BUSJ5IBS.js → platform-FNGEQTDL.js} +2 -2
- package/dist/cli/chunks/{plugin-THNA3LPT.js → plugin-T4YRNESL.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-YITMHWYP.js → prime-radiant-advanced-wasm-I25PHLYB.js} +2 -2
- package/dist/cli/chunks/protocol-executor-XQX2GJVA.js +2 -0
- package/dist/cli/chunks/{protocol-handler-LGLOHNLV.js → protocol-handler-6KWLEBZJ.js} +2 -2
- package/dist/cli/chunks/{prove-XE5RKJRJ.js → prove-B5XQ3SY4.js} +2 -2
- package/dist/cli/chunks/{provider-manager-TLQ7NMTR.js → provider-manager-WTZ3FGAH.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-FYUB2RJT.js +2 -0
- package/dist/cli/chunks/{quality-URKCSGLA.js → quality-JQ3M7ENY.js} +2 -2
- package/dist/cli/chunks/queen-coordinator-J52B6O53.js +2 -0
- package/dist/cli/chunks/{real-embeddings-MAYTOFAX.js → real-embeddings-EH4WUKDJ.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-4ISSCJTU.js → roocode-installer-6GLCDHDJ.js} +2 -2
- package/dist/cli/chunks/router-WFPO4XXI.js +2 -0
- package/dist/cli/chunks/routing-feedback-2RL7OC36.js +2 -0
- package/dist/cli/chunks/{routing-handler-WDZBBV3U.js → routing-handler-4N2XJFNM.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-4U7JTAUE.js → ruvector-commands-MGWMR2WN.js} +2 -2
- package/dist/cli/chunks/{rvf-dual-writer-PVQGHXKH.js → rvf-dual-writer-6LN3WQEK.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-adapter-HRCYZQLS.js → rvf-migration-adapter-LAZ5EDQG.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-coordinator-N4UXOCG7.js → rvf-migration-coordinator-LRXFWTDN.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-SA4QDDO3.js +2 -0
- package/dist/cli/chunks/safe-db-E5KUJFP2.js +2 -0
- package/dist/cli/chunks/schedule-BF4MDQ4Z.js +2 -0
- package/dist/cli/chunks/scheduler-QG2JMZVB.js +2 -0
- package/dist/cli/chunks/{security-2727QJZS.js → security-JMEQUSTV.js} +3 -3
- package/dist/cli/chunks/shared-rvf-adapter-S4KZM33F.js +2 -0
- package/dist/cli/chunks/{shared-rvf-dual-writer-TMTDHAJF.js → shared-rvf-dual-writer-W3KUF2Z5.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-BXM2XX7R.js +2 -0
- package/dist/cli/chunks/{status-handler-PFRGF4NJ.js → status-handler-T3MU7LJC.js} +2 -2
- package/dist/cli/chunks/{structural-health-VLVOGQGG.js → structural-health-DKLLSKB7.js} +2 -2
- package/dist/cli/chunks/{sync-RDPRZDK4.js → sync-YV4JLAYR.js} +2 -2
- package/dist/cli/chunks/{task-handler-LSBTLJJ6.js → task-handler-WFMLTZFA.js} +2 -2
- package/dist/cli/chunks/{task-handlers-JBVFH3US.js → task-handlers-XPRO67IJ.js} +3 -3
- package/dist/cli/chunks/{test-C4J6XBVS.js → test-6LD3KVOS.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-DFFPSHHV.js → test-scheduling-E5CSY4SE.js} +3 -3
- package/dist/cli/chunks/{token-bootstrap-L6TK6LFF.js → token-bootstrap-TLPEXH6S.js} +2 -2
- package/dist/cli/chunks/{token-usage-VQX5GATD.js → token-usage-2MDI65YN.js} +2 -2
- package/dist/cli/chunks/{transformers-FL5X2DM4.js → transformers-CMZ3QD3F.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-WPG7QDW2.js → tree-sitter-wasm-parser-IXDHBBYF.js} +2 -2
- package/dist/cli/chunks/{types-ZQQGVT3N.js → types-GAK4Q24M.js} +2 -2
- package/dist/cli/chunks/unified-memory-WPVYK4Q5.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-G3PRXB4L.js +2 -0
- package/dist/cli/chunks/unified-persistence-WZ5XANS4.js +2 -0
- package/dist/cli/chunks/{upgrade-3OOJENGN.js → upgrade-TFUW4SLZ.js} +2 -2
- package/dist/cli/chunks/{validate-ICZRW3GO.js → validate-J4GGNKLW.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-XG7A34C5.js → validate-swarm-KCQX46PY.js} +2 -2
- package/dist/cli/chunks/{vibium-JCBQDZOF.js → vibium-WKIFKIZW.js} +2 -2
- package/dist/cli/chunks/visual-security-ZVQG2EY4.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-QY43QSVU.js → web-tree-sitter-OQSGWVGY.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-TZHY2XD3.js → windsurf-installer-D6PIM3JO.js} +2 -2
- package/dist/cli/chunks/witness-chain-F3PHT6MB.js +2 -0
- package/dist/cli/chunks/{witness-chain-LPRLU35H.js → witness-chain-NRVX76IB.js} +2 -2
- package/dist/cli/chunks/{workflow-TPS4NABZ.js → workflow-3X2UQG7E.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-VQVQKILY.js +2 -0
- package/dist/cli/chunks/{wrappers-Y37YFUR6.js → wrappers-UXKMHCHX.js} +2 -2
- package/dist/cli/commands/hooks-handlers/task-hooks.js +24 -7
- package/dist/mcp/bundle.js +1 -1
- package/package.json +1 -1
- package/dist/cli/chunks/adapter-7U6GXVHU.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-O6ISJRDR.js +0 -2
- package/dist/cli/chunks/base-B3HZTLJ2.js +0 -2
- package/dist/cli/chunks/browser-workflow-WB4O6W3A.js +0 -2
- package/dist/cli/chunks/chunk-LCBUXWME.js +0 -2
- package/dist/cli/chunks/client-IMKYND6H.js +0 -2
- package/dist/cli/chunks/cross-domain-router-J7R337XD.js +0 -2
- package/dist/cli/chunks/dream-INJHEIJG.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-SLHJHV7S.js +0 -2
- package/dist/cli/chunks/hnsw-index-EVYP3JDX.js +0 -2
- package/dist/cli/chunks/impact-analyzer-QLEF4H3P.js +0 -2
- package/dist/cli/chunks/init-wizard-VTYQYUT2.js +0 -2
- package/dist/cli/chunks/kernel-RA654UJZ.js +0 -2
- package/dist/cli/chunks/knowledge-graph-6YRRWFGG.js +0 -2
- package/dist/cli/chunks/load-test-MELOZIZY.js +0 -2
- package/dist/cli/chunks/memory-backend-PG2HV7PE.js +0 -2
- package/dist/cli/chunks/protocol-executor-CGA3R6RK.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-PFMDQYAF.js +0 -2
- package/dist/cli/chunks/queen-coordinator-5YTO7HEZ.js +0 -2
- package/dist/cli/chunks/router-54QWT5VU.js +0 -2
- package/dist/cli/chunks/routing-feedback-ZRROMF7R.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-AF53YPR6.js +0 -2
- package/dist/cli/chunks/safe-db-6FQZ63GE.js +0 -2
- package/dist/cli/chunks/schedule-2BNTSEWS.js +0 -2
- package/dist/cli/chunks/scheduler-QIDIW4GS.js +0 -2
- package/dist/cli/chunks/shared-rvf-adapter-XGHP37CT.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-FTL5JKTZ.js +0 -2
- package/dist/cli/chunks/unified-memory-BR5DCUFI.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-G4NG557W.js +0 -2
- package/dist/cli/chunks/unified-persistence-QID37TWH.js +0 -2
- package/dist/cli/chunks/visual-security-2PKM5732.js +0 -2
- package/dist/cli/chunks/witness-chain-BVP6OB7T.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-27KZFXMU.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a as i,b as v,c as d,d as p}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.24");process.exit(0)}
|
|
2
|
+
import{a as i,b as v,c as d,d as p}from"./chunk-L5Y2BVYX.js";import{a as h}from"./chunk-JVN5TS5E.js";import"./chunk-3Y5C4SE3.js";import{a as k}from"./chunk-HFPQVO4O.js";import"./chunk-RSED3U2F.js";import"./chunk-Z2CO6ZI5.js";import"./chunk-Q5OLVIKK.js";import"./chunk-3LHP7G6U.js";import"./chunk-BDGKN7GC.js";import"./chunk-KQRJXVMO.js";import"./chunk-FPBCG7CX.js";import"./chunk-INPP5RW4.js";import"./chunk-3NZ7IVRI.js";import"./chunk-U6V6R2EF.js";import"./chunk-C4ST4NP4.js";import"./chunk-DWNKD2AQ.js";import"./chunk-RGOJFKIY.js";import"./chunk-EAC3PZGH.js";import"./chunk-CTSTHKH4.js";import"./chunk-73JTRGIQ.js";import"./chunk-3ZNIACXR.js";import"./chunk-WB3GQ7X7.js";import"./chunk-HYX3LWLA.js";import"./chunk-AJ45BRKK.js";import"./chunk-BWCSNSXR.js";import"./chunk-O3ADCWEC.js";import"./chunk-HQY2BNJT.js";import"./chunk-4AUGLQOE.js";import"./chunk-HGOTTQQK.js";import"./chunk-7ODDJI3P.js";import"./chunk-4LA24G33.js";import{Command as x}from"commander";import o from"chalk";function _(e,t,a){let c=new x("validate").description("Validation commands for skills and agents");return c.command("swarm").description("Validate skills in parallel using Claude Flow swarms (ADR-056)").option("-s, --skills <skills>",'Comma-separated list of skills to validate, or "all" for P0 skills',"all").option("-m, --models <models>","Comma-separated list of models to validate against",p.join(",")).option("-t, --topology <topology>","Swarm topology: hierarchical or mesh","hierarchical").option("--max-concurrent <number>","Maximum concurrent skill validations",String(i.maxConcurrentSkills)).option("--max-models <number>","Maximum concurrent models per skill",String(i.maxConcurrentModels)).option("--timeout <ms>","Timeout per validation in milliseconds",String(i.timeout)).option("--no-retry","Disable retries on failure").option("-v, --verbose","Show detailed output").option("--json","Output results as JSON").action(async l=>{if(await a())try{console.log(o.blue(`
|
|
3
3
|
Swarm Skill Validation
|
|
4
4
|
`));let r=l.skills==="all"?[...d]:l.skills.split(",").map(y=>y.trim()),u=l.models.split(",").map(y=>y.trim()),g=P(l.topology),n={topology:g,maxConcurrentSkills:parseInt(l.maxConcurrent,10)||i.maxConcurrentSkills,maxConcurrentModels:parseInt(l.maxModels,10)||i.maxConcurrentModels,timeout:parseInt(l.timeout,10)||i.timeout,continueOnFailure:!0,retry:l.retry!==!1?i.retry:void 0};l.verbose&&(console.log(o.gray("Configuration:")),console.log(o.gray(` Topology: ${n.topology}`)),console.log(o.gray(` Skills: ${r.length}`)),console.log(o.gray(` Models: ${u.length}`)),console.log(o.gray(` Max Concurrent Skills: ${n.maxConcurrentSkills}`)),console.log(o.gray(` Max Concurrent Models: ${n.maxConcurrentModels}`)),console.log(o.gray(` Timeout: ${n.timeout}ms`)),console.log(o.gray(` Retry: ${n.retry?"enabled":"disabled"}`)),console.log("")),console.log(o.cyan(` Skills: ${r.join(", ")}`)),console.log(o.cyan(` Models: ${u.join(", ")}`)),console.log(o.cyan(` Topology: ${g}`)),console.log("");let m=await R(e),f=k(m),C=v(n,f),w=Date.now();console.log(o.yellow(` Starting parallel validation...
|
|
5
5
|
`));let $=await C.validateSkillsParallel(r,u),s=C.getSummary($),b=Date.now()-w;l.json?T(s):V(s,l.verbose),console.log(o.blue(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{c as t}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.24");process.exit(0)}
|
|
2
|
+
import{c as t}from"./chunk-4LA24G33.js";import{createRequire as o}from"module";var i,e,a,c,l,p,s,m,u,d,A,f,h,_,b,v,L,n=t(()=>{i=o(import.meta.url),e=i("vibium"),a=e,{RuvectorLayer:c,TensorCompress:l,differentiableSearch:p,hierarchicalForward:s,getCompressionLevel:m,init:u,FlashAttention:d,DotProductAttention:A,MultiHeadAttention:f,HyperbolicAttention:h,LinearAttention:_,MoEAttention:b,SonaEngine:v,pipeline:L}=e||{}});n();export{A as DotProductAttention,d as FlashAttention,h as HyperbolicAttention,_ as LinearAttention,b as MoEAttention,f as MultiHeadAttention,c as RuvectorLayer,v as SonaEngine,l as TensorCompress,a as default,p as differentiableSearch,m as getCompressionLevel,s as hierarchicalForward,u as init,L as pipeline};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.24");process.exit(0)}
|
|
2
|
+
import{a}from"./chunk-7H36CVZ6.js";import"./chunk-6XXHK6NL.js";import"./chunk-L7EDWT5P.js";import"./chunk-3NZ7IVRI.js";import"./chunk-U6V6R2EF.js";import"./chunk-DWNKD2AQ.js";import"./chunk-RGOJFKIY.js";import"./chunk-EAC3PZGH.js";import"./chunk-73JTRGIQ.js";import"./chunk-3ZNIACXR.js";import"./chunk-WB3GQ7X7.js";import"./chunk-HYX3LWLA.js";import"./chunk-AJ45BRKK.js";import"./chunk-BWCSNSXR.js";import"./chunk-O3ADCWEC.js";import"./chunk-HQY2BNJT.js";import"./chunk-4AUGLQOE.js";import"./chunk-HGOTTQQK.js";import"./chunk-7ODDJI3P.js";import"./chunk-4LA24G33.js";export{a as VisualSecurityTool};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.24");process.exit(0)}
|
|
2
|
+
import"./chunk-4LA24G33.js";import{createRequire as t}from"module";var o=t(import.meta.url),e=o("web-tree-sitter"),i=e,{RuvectorLayer:n,TensorCompress:a,differentiableSearch:c,hierarchicalForward:s,getCompressionLevel:l,init:p,FlashAttention:m,DotProductAttention:u,MultiHeadAttention:d,HyperbolicAttention:A,LinearAttention:f,MoEAttention:h,SonaEngine:_,pipeline:b}=e||{};export{u as DotProductAttention,m as FlashAttention,A as HyperbolicAttention,f as LinearAttention,h as MoEAttention,d as MultiHeadAttention,n as RuvectorLayer,_ as SonaEngine,a as TensorCompress,i as default,c as differentiableSearch,l as getCompressionLevel,s as hierarchicalForward,p as init,b as pipeline};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{b as u}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.24");process.exit(0)}
|
|
2
|
+
import{b as u}from"./chunk-PEKULOY4.js";import{a as f,c as h}from"./chunk-73JTRGIQ.js";import"./chunk-4LA24G33.js";h();import{existsSync as i,mkdirSync as d,readFileSync as g,writeFileSync as a}from"fs";import{join as p,dirname as v}from"path";var c=class{projectRoot;overwrite;generator;constructor(e){this.projectRoot=e.projectRoot,this.overwrite=e.overwrite??!1,this.generator=u()}async install(){let e={success:!0,mcpConfigured:!1,rulesInstalled:!1,errors:[],configPath:"",rulesPath:""};try{let t=this.generator.generateMcpConfig("windsurf"),r=p(this.projectRoot,t.path);if(e.configPath=r,!i(r)||this.overwrite){let o=v(r);if(i(o)||d(o,{recursive:!0}),i(r)&&this.overwrite){let m=this.mergeExistingConfig(r,t.content);a(r,m)}else a(r,t.content);e.mcpConfigured=!0}let n=this.generator.generateBehavioralRules("windsurf"),s=p(this.projectRoot,n.path);if(e.rulesPath=s,!i(s)||this.overwrite){if(i(s)&&this.overwrite){let o=this.mergeExistingRules(s,n.content);a(s,o)}else a(s,n.content);e.rulesInstalled=!0}}catch(t){e.success=!1,e.errors.push(`Windsurf installation failed: ${f(t)}`)}return e}mergeExistingConfig(e,t){try{let r=JSON.parse(g(e,"utf-8")),n=JSON.parse(t);return r.mcpServers||(r.mcpServers={}),Object.assign(r.mcpServers,n.mcpServers),JSON.stringify(r,null,2)+`
|
|
3
3
|
`}catch{return t}}mergeExistingRules(e,t){try{let r=g(e,"utf-8");return r.includes("Agentic QE")||r.includes("fleet_init")?r:r.trimEnd()+`
|
|
4
4
|
|
|
5
5
|
---
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.24");process.exit(0)}
|
|
2
|
+
import{a,b,c,d,e,f,g,h}from"./chunk-ZJNZ5SDG.js";import"./chunk-3NZ7IVRI.js";import"./chunk-U6V6R2EF.js";import"./chunk-DWNKD2AQ.js";import"./chunk-RGOJFKIY.js";import"./chunk-EAC3PZGH.js";import"./chunk-73JTRGIQ.js";import"./chunk-WB3GQ7X7.js";import"./chunk-HYX3LWLA.js";import"./chunk-AJ45BRKK.js";import"./chunk-BWCSNSXR.js";import"./chunk-O3ADCWEC.js";import"./chunk-HQY2BNJT.js";import"./chunk-4AUGLQOE.js";import"./chunk-HGOTTQQK.js";import"./chunk-7ODDJI3P.js";import"./chunk-4LA24G33.js";export{a as GENESIS_PREV_HASH,f as WitnessChain,h as createWitnessChain,g as getWitnessChain,d as hashWith,e as serializeEntry,b as sha256,c as shake256};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a,b,c,d,e,f,g}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.24");process.exit(0)}
|
|
2
|
+
import{a,b,c,d,e,f,g}from"./chunk-C4ST4NP4.js";import"./chunk-DWNKD2AQ.js";import"./chunk-RGOJFKIY.js";import"./chunk-7ODDJI3P.js";import"./chunk-4LA24G33.js";export{c as PersistentWitnessChain,a as SPRTAccumulator,b as WitnessChain,f as createPersistentWitnessChain,e as createWitnessChain,d as createWitnessChainSQLitePersistence,g as isWitnessChainFeatureEnabled};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.24");process.exit(0)}
|
|
2
|
+
import"./chunk-2NJO73YD.js";import{b as $}from"./chunk-DZHAXSOZ.js";import{d as R}from"./chunk-DFG3KX7E.js";import{b as k,c as C,d as b}from"./chunk-6SWRLJ3I.js";import{c as W}from"./chunk-EAC3PZGH.js";import"./chunk-CTSTHKH4.js";import"./chunk-73JTRGIQ.js";import"./chunk-4LA24G33.js";import{Command as O}from"commander";import o from"chalk";function P(d,a){let m=d.indexOf("=");return m>0&&(a[d.substring(0,m)]=d.substring(m+1)),a}function x(d,a,m){let y=new O("workflow").description("Manage QE workflows and pipelines (ADR-041)");return y.command("run <file>").description("Execute a QE pipeline from YAML file").option("-w, --watch","Watch execution progress").option("-v, --verbose","Show detailed output").option("--params <json>","Additional parameters as JSON","{}").action(async(t,l)=>{if(!await m())return;let e=await import("fs"),c=(await import("path")).resolve(t);try{console.log(o.blue(`
|
|
3
3
|
Running workflow from: ${t}
|
|
4
4
|
`));let s=k(c);if(!s.success||!s.workflow){console.log(o.red("Failed to parse pipeline:"));for(let w of s.errors)console.log(o.red(` ${w}`));await a(1)}let r={...W(l.params,"params")};if(s.pipeline){for(let w of s.pipeline.stages)if(w.params)for(let[S,h]of Object.entries(w.params))r[S]=h}if(!d.workflowOrchestrator.getWorkflow(s.workflow.id)){let w=d.workflowOrchestrator.registerWorkflow(s.workflow);w.success||(console.log(o.red(`Failed to register workflow: ${w.error.message}`)),await a(1))}let n=await d.workflowOrchestrator.executeWorkflow(s.workflow.id,r);if(!n.success){console.log(o.red(`Failed to start workflow: ${n.error.message}`)),await a(1);return}let p=n.value;if(console.log(o.cyan(` Execution ID: ${p}`)),console.log(o.gray(` Workflow: ${s.workflow.name}`)),console.log(o.gray(` Stages: ${s.workflow.steps.length}`)),console.log(""),l.watch){console.log(o.blue(`Workflow Progress:
|
|
5
5
|
`));let w,S=Date.now();for(;;){let g=d.workflowOrchestrator.getWorkflowStatus(p);if(!g)break;if(!w||w.progress!==g.progress||w.status!==g.status||JSON.stringify(w.currentSteps)!==JSON.stringify(g.currentSteps)){process.stdout.write("\r\x1B[K");let v="\u2588".repeat(Math.floor(g.progress/5))+"\u2591".repeat(20-Math.floor(g.progress/5)),D=g.status==="completed"?o.green:g.status==="failed"?o.red:g.status==="running"?o.yellow:o.gray;console.log(` [${v}] ${g.progress}% - ${D(g.status)}`),g.currentSteps.length>0&&l.verbose&&console.log(o.gray(` Running: ${g.currentSteps.join(", ")}`)),w=g}if(g.status==="completed"||g.status==="failed"||g.status==="cancelled")break;await new Promise(v=>setTimeout(v,500))}let h=d.workflowOrchestrator.getWorkflowStatus(p);if(h){console.log("");let g=h.duration||Date.now()-S;h.status==="completed"?(console.log(o.green("Workflow completed successfully")),console.log(o.gray(` Duration: ${$(g)}`)),console.log(o.gray(` Completed: ${h.completedSteps.length} stages`)),h.skippedSteps.length>0&&console.log(o.yellow(` Skipped: ${h.skippedSteps.length} stages`))):h.status==="failed"?(console.log(o.red("Workflow failed")),console.log(o.red(` Error: ${h.error}`)),console.log(o.gray(` Failed stages: ${h.failedSteps.join(", ")}`))):console.log(o.yellow(`Workflow ${h.status}`))}}else console.log(o.green("Workflow execution started")),console.log(o.gray(` Use 'aqe workflow status ${p}' to check progress`));console.log(""),await a(0)}catch(s){console.error(o.red(`
|
|
@@ -35,10 +35,10 @@ Workflow cancelled: ${t}
|
|
|
35
35
|
`)):console.log(o.red(`
|
|
36
36
|
Failed to cancel workflow: ${l.error.message}
|
|
37
37
|
`)),await a(l.success?0:1)}catch(l){console.error(o.red(`
|
|
38
|
-
Failed to cancel workflow:`),l),await a(1)}}),y.command("browser-list").description("List available browser workflow templates").action(async()=>{try{let{BrowserWorkflowTool:t}=await import("./browser-workflow-
|
|
38
|
+
Failed to cancel workflow:`),l),await a(1)}}),y.command("browser-list").description("List available browser workflow templates").action(async()=>{try{let{BrowserWorkflowTool:t}=await import("./browser-workflow-GVOTUSBY.js"),e=await new t().invoke({});if(e.success&&e.data){console.log(o.blue(`
|
|
39
39
|
Browser Workflow Templates:
|
|
40
40
|
`));for(let u of e.data.availableTemplates)console.log(` ${o.cyan(u)}`);console.log("")}else console.log(o.red(`Failed: ${e.error||"Unknown error"}`));await a(0)}catch(t){console.error(o.red(`
|
|
41
|
-
Failed:`),t),await a(1)}}),y.command("browser-load [template]").description("Load and validate a browser workflow template or inline YAML").option("--yaml <yaml>","Inline YAML workflow definition").option("-v, --var <key=value>","Variable override (repeatable)",P,{}).option("-F, --format <format>","Output format (text|json)","text").option("-o, --output <path>","Write output to file").action(async(t,l)=>{try{let{BrowserWorkflowTool:e}=await import("./browser-workflow-
|
|
41
|
+
Failed:`),t),await a(1)}}),y.command("browser-load [template]").description("Load and validate a browser workflow template or inline YAML").option("--yaml <yaml>","Inline YAML workflow definition").option("-v, --var <key=value>","Variable override (repeatable)",P,{}).option("-F, --format <format>","Output format (text|json)","text").option("-o, --output <path>","Write output to file").action(async(t,l)=>{try{let{BrowserWorkflowTool:e}=await import("./browser-workflow-GVOTUSBY.js"),{writeOutput:u,toJSON:c}=await import("./ci-output-LLKTJAKA.js"),s=new e,f={variables:l.var||{}};if(l.yaml)f.workflowYaml=l.yaml;else if(t)if(t.endsWith(".yaml")||t.endsWith(".yml")){let i=await import("fs"),p=(await import("path")).resolve(t);i.existsSync(p)||(console.log(o.red(`
|
|
42
42
|
File not found: ${p}
|
|
43
43
|
`)),await a(1)),f.workflowYaml=i.readFileSync(p,"utf-8")}else f.templateName=t;else console.log(o.red(`
|
|
44
44
|
Provide a template name or --yaml. Use "workflow browser-list" to see templates.
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.24");process.exit(0)}
|
|
2
|
+
import{a,b,c,d}from"./chunk-QDUV7TDQ.js";import"./chunk-LX6XRBJ2.js";import"./chunk-3NZ7IVRI.js";import"./chunk-U6V6R2EF.js";import"./chunk-DWNKD2AQ.js";import"./chunk-RGOJFKIY.js";import"./chunk-EAC3PZGH.js";import"./chunk-CTSTHKH4.js";import"./chunk-73JTRGIQ.js";import"./chunk-3ZNIACXR.js";import"./chunk-WB3GQ7X7.js";import"./chunk-HYX3LWLA.js";import"./chunk-AJ45BRKK.js";import"./chunk-BWCSNSXR.js";import"./chunk-O3ADCWEC.js";import"./chunk-HQY2BNJT.js";import"./chunk-4AUGLQOE.js";import"./chunk-HGOTTQQK.js";import"./chunk-7ODDJI3P.js";import"./chunk-4LA24G33.js";export{b as DEFAULT_WORKFLOW_CONFIG,a as WorkflowEvents,c as WorkflowOrchestrator,d as createWorkflowOrchestrator};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v as L,w as M,x as N}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.24");process.exit(0)}
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v as L,w as M,x as N}from"./chunk-MUH2YGNO.js";import"./chunk-3NZ7IVRI.js";import"./chunk-U6V6R2EF.js";import"./chunk-DWNKD2AQ.js";import"./chunk-RGOJFKIY.js";import{a as v,b as w,c as x,d as y,e as z,f as A,g as B,h as C,i as D,j as E,k as F,l as G,m as H,n as I,o as J,p as K}from"./chunk-FHRUSW2V.js";import"./chunk-EAC3PZGH.js";import"./chunk-73JTRGIQ.js";import"./chunk-WB3GQ7X7.js";import"./chunk-HYX3LWLA.js";import"./chunk-AJ45BRKK.js";import"./chunk-BWCSNSXR.js";import"./chunk-O3ADCWEC.js";import"./chunk-HQY2BNJT.js";import"./chunk-4AUGLQOE.js";import"./chunk-HGOTTQQK.js";import"./chunk-7ODDJI3P.js";import"./chunk-4LA24G33.js";export{z as GNNLayerFactory,i as QEFlashAttention,x as QEGNNEmbeddingIndex,y as QEGNNIndexFactory,a as QESONA,e as QE_FLASH_ATTENTION_CONFIG,g as QE_PERFORMANCE_TARGETS,f as QE_SONA_CONFIG,A as TensorCompressionFactory,u as batchComputeAttention,K as batchDifferentiableSearch,M as checkRuvectorPackagesAvailable,c as createDomainQESONA,j as createQEFlashAttention,b as createQESONA,D as getDifferentiableSearch,F as getGetCompressionLevel,E as getHierarchicalForward,G as getInit,h as getOptimalBlockConfig,k as getQEFlashAttentionConfig,n as getRuvectorDotProductAttention,m as getRuvectorFlashAttention,p as getRuvectorHyperbolicAttention,B as getRuvectorLayer,q as getRuvectorLinearAttention,r as getRuvectorMoEAttention,o as getRuvectorMultiHeadAttention,L as getRuvectorPackageVersions,C as getTensorCompress,l as getWorkloadTypes,N as initAllRuvectorPackages,w as initGNN,d as isAttentionAvailable,v as isGNNAvailable,s as toFloat32Array,H as toFloat32ArrayGNN,J as toIEmbedding,t as toNumberArrayAttn,I as toNumberArrayGNN};
|
|
@@ -174,8 +174,15 @@ export function registerTaskHooks(hooks) {
|
|
|
174
174
|
// Patch 150: write a routing_outcomes sentinel that post-task UPDATEs
|
|
175
175
|
// with the 6-dim outcome quality. Pre-task cannot know quality yet.
|
|
176
176
|
// success=0/quality=-1 sentinel pair makes the row easy to find later.
|
|
177
|
-
|
|
177
|
+
//
|
|
178
|
+
// Issue #449: PreToolUse hook command sends --description but no
|
|
179
|
+
// --task-id, so the original `&& options.taskId` clause prevented
|
|
180
|
+
// the sentinel from ever being written. Without the sentinel the
|
|
181
|
+
// post-task UPDATE has no row to fill, breaking Stream D. Use the
|
|
182
|
+
// same `hook-${ts}` fallback as post-task.
|
|
183
|
+
if (routing?.recommendedAgent) {
|
|
178
184
|
try {
|
|
185
|
+
const effectivePreTaskId = options.taskId || `hook-${Date.now()}`;
|
|
179
186
|
const outcomeId = `route-${Date.now()}-${randomUUID().slice(0, 8)}`;
|
|
180
187
|
const lowConfidence = routing.confidence < LOW_CONFIDENCE_THRESHOLD;
|
|
181
188
|
db.prepare(`
|
|
@@ -184,7 +191,7 @@ export function registerTaskHooks(hooks) {
|
|
|
184
191
|
followed_recommendation, success, quality_score,
|
|
185
192
|
duration_ms, error
|
|
186
193
|
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
187
|
-
`).run(outcomeId, JSON.stringify({ description: options.description, taskId:
|
|
194
|
+
`).run(outcomeId, JSON.stringify({ description: options.description, taskId: effectivePreTaskId }), JSON.stringify({
|
|
188
195
|
recommended: routing.recommendedAgent,
|
|
189
196
|
confidence: routing.confidence,
|
|
190
197
|
alternatives: routing.alternatives,
|
|
@@ -274,22 +281,32 @@ export function registerTaskHooks(hooks) {
|
|
|
274
281
|
timestamp: Date.now(),
|
|
275
282
|
});
|
|
276
283
|
patternsLearned = results.reduce((sum, r) => sum + (r.patternsLearned || 0), 0);
|
|
277
|
-
// Record as learning experience for every post-task invocation
|
|
278
|
-
|
|
284
|
+
// Record as learning experience for every post-task invocation.
|
|
285
|
+
//
|
|
286
|
+
// Issue #449 / patch 030 (reintroduced in v3.9.23): the PostToolUse
|
|
287
|
+
// hook context for Task/Agent does NOT populate $TOOL_RESULT_agent_id,
|
|
288
|
+
// so the shipped `--task-id "$TOOL_RESULT_agent_id"` arrives empty
|
|
289
|
+
// and `options.taskId` is falsy. The original `if (options.taskId)`
|
|
290
|
+
// gate therefore killed the entire Stream B/D/F learning chain on
|
|
291
|
+
// every real hook invocation (rl_q_values stayed empty forever).
|
|
292
|
+
// Use a synthetic `hook-${ts}` fallback so the pipeline always runs.
|
|
293
|
+
// DO NOT REINTRODUCE the if(options.taskId) gate — see #449.
|
|
294
|
+
{
|
|
295
|
+
const effectiveTaskId = options.taskId || `hook-${Date.now()}`;
|
|
279
296
|
const agent = options.agent || 'unknown';
|
|
280
297
|
const durationMs = options.duration ? parseInt(options.duration, 10) : 0;
|
|
281
298
|
await reasoningBank.recordOutcome({
|
|
282
|
-
patternId: `task:${agent}:${
|
|
299
|
+
patternId: `task:${agent}:${effectiveTaskId}`,
|
|
283
300
|
success,
|
|
284
301
|
metrics: { executionTimeMs: durationMs },
|
|
285
|
-
feedback: `Agent: ${agent}, Task: ${
|
|
302
|
+
feedback: `Agent: ${agent}, Task: ${effectiveTaskId}`,
|
|
286
303
|
});
|
|
287
304
|
// Stream B: full experience pipeline (captured_experiences,
|
|
288
305
|
// experience_applications + per-pattern fan-out, qe_trajectories
|
|
289
306
|
// single-step + multi-step stitch, dream_insights.applied bump).
|
|
290
307
|
// Patches 060/110/120/160/180/300.
|
|
291
308
|
const outcome = await persistTaskOutcome({
|
|
292
|
-
taskId:
|
|
309
|
+
taskId: effectiveTaskId,
|
|
293
310
|
agent,
|
|
294
311
|
durationMs,
|
|
295
312
|
success,
|
package/dist/mcp/bundle.js
CHANGED
|
@@ -5881,7 +5881,7 @@ ${i.errors.join(`
|
|
|
5881
5881
|
ORDER BY ended_at DESC
|
|
5882
5882
|
LIMIT ?
|
|
5883
5883
|
`).all(ibe);if(i.length===0)return;let s=r.prepare("UPDATE qe_trajectories SET feedback = ? WHERE id = ?");for(let a of i)try{let c=await sbe(a,o,e);c&&s.run(JSON.stringify(c),a.id)}catch{}}async function sbe(o,e,t){let r=["You are a quality engineering judge scoring a completed task trajectory.","",`Task: ${o.task.slice(0,400)}`,`Agent: ${o.agent??"unknown"}`,`Domain: ${o.domain??"general"}`,`Outcome: ${o.success?"success":"failure"}`,"",'Respond ONLY with JSON: {"quality": 0..1, "reasoning": "\u2264120 chars", "improvement": "\u2264120 chars or omit"}.'].join(`
|
|
5884
|
-
`),n=await fetch(`${t}/v1/messages`,{method:"POST",headers:{"content-type":"application/json","x-api-key":e,"anthropic-version":"2023-06-01"},body:JSON.stringify({model:rbe,max_tokens:nbe,messages:[{role:"user",content:r}]})});if(!n.ok)return null;let s=(await n.json()).content?.[0]?.text;if(!s)return null;let a=s.match(/\{[\s\S]*\}/);if(!a)return null;try{let c=JSON.parse(a[0]);return typeof c.quality!="number"||typeof c.reasoning!="string"?null:{quality:Math.max(0,Math.min(1,c.quality)),reasoning:c.reasoning.slice(0,200),improvement:typeof c.improvement=="string"?c.improvement.slice(0,200):void 0}}catch{return null}}var rbe,nbe,ibe,fX=y(()=>{"use strict";Y();rbe="claude-haiku-4-5-20251001",nbe=200,ibe=5});var SN={};Q(SN,{handleModelRoute:()=>Bw,handleReasoningBankStats:()=>ube,handleRoutingEconomics:()=>zw,handleRoutingMetrics:()=>Uw,handleTaskCancel:()=>$w,handleTaskList:()=>Nw,handleTaskOrchestrate:()=>qw,handleTaskOutcomeRecord:()=>lbe,handleTaskStatus:()=>Ow,handleTaskStatusWithLearning:()=>dbe,handleTaskSubmit:()=>Fw,subscribeTrajectoryEvents:()=>pbe,unsubscribeTrajectoryEvents:()=>bX});async function Fw(o){if(!ge())return{success:!1,error:"Fleet not initialized. Call fleet_init first."};let{queen:e}=me();try{let t=await e.submitTask({type:o.type,priority:o.priority||"p1",targetDomains:o.targetDomains||[],payload:o.payload||{},timeout:o.timeout||3e5});if(!t.success)return{success:!1,error:t.error.message};let r=e.getTaskStatus(t.value);return{success:!0,data:{taskId:t.value,type:o.type,priority:o.priority||"p1",status:r?.status==="running"?"pending":"queued",assignedDomain:r?.assignedDomain}}}catch(t){return{success:!1,error:`Failed to submit task: ${w(t)}`}}}async function Nw(o){if(!ge())return{success:!1,error:"Fleet not initialized. Call fleet_init first."};let{queen:e}=me();try{let t=e.listTasks({status:o.status,priority:o.priority,domain:o.domain});return{success:!0,data:(typeof o.limit=="number"?t.slice(0,o.limit):t).map(i=>({taskId:i.taskId,type:i.task.type,status:i.status,priority:i.task.priority,assignedDomain:i.assignedDomain,assignedAgents:i.assignedAgents,result:i.result,error:i.error,createdAt:i.task.createdAt.toISOString(),startedAt:i.startedAt?.toISOString(),completedAt:i.completedAt?.toISOString(),duration:i.completedAt&&i.startedAt?i.completedAt.getTime()-i.startedAt.getTime():void 0}))}}catch(t){return{success:!1,error:`Failed to list tasks: ${w(t)}`}}}async function Ow(o){if(!ge())return{success:!1,error:"Fleet not initialized. Call fleet_init first."};let{queen:e}=me();try{let t=e.getTaskStatus(o.taskId);return t?{success:!0,data:{taskId:t.taskId,type:t.task.type,status:t.status,priority:t.task.priority,assignedDomain:t.assignedDomain,assignedAgents:t.assignedAgents,result:o.detailed?t.result:void 0,error:t.error,createdAt:t.task.createdAt.toISOString(),startedAt:t.startedAt?.toISOString(),completedAt:t.completedAt?.toISOString(),duration:t.completedAt&&t.startedAt?t.completedAt.getTime()-t.startedAt.getTime():void 0}}:{success:!1,error:`Task not found: ${o.taskId}`}}catch(t){return{success:!1,error:`Failed to get task status: ${w(t)}`}}}async function $w(o){if(!ge())return{success:!1,error:"Fleet not initialized. Call fleet_init first."};let{queen:e}=me();try{let t=await e.cancelTask(o.taskId);return t.success?{success:!0,data:{taskId:o.taskId,cancelled:!0}}:{success:!1,error:t.error.message}}catch(t){return{success:!1,error:`Failed to cancel task: ${w(t)}`}}}async function qw(o){if(!ge())return{success:!1,error:"Fleet not initialized. Call fleet_init first."};let{queen:e,workflowOrchestrator:t}=me();try{let r=o.context?.project||vX(o.task),n=o.priority==="critical"||/\b(security|vulnerability|cve|owasp|critical|production|exploit)\b/i.test(o.task),s=await(await ms()).routeTask({task:o.task,codeContext:o.codeContext,filePaths:o.filePaths,manualTier:o.manualTier,isCritical:n,agentType:`qe-${r}`,domain:r,metadata:{inferredDomain:r,hasCodeContext:!!o.codeContext,fileCount:o.filePaths?.length}}),a=await yn(),c=await a.getExperienceGuidance(o.task,o.context?.project),l=await a.searchPatterns(o.task,{limit:5,domain:o.context?.project??r}).catch(()=>[]),u=obe(o.task),d=cbe(o.priority||"medium"),p=abe[u];if(p&&t){console.log(`[TaskOrchestrate] Task type '${u}' has workflow '${p}' - executing workflow`);let v=o.task.match(/https?:\/\/[^\s]+/i),b=v?v[0]:void 0;b&&console.log(`[TaskOrchestrate] Detected URL for analysis: ${b}`);let C={targetId:o.context?.project||b||`task-${Date.now()}`,targetType:b?"website":"epic",description:o.task,acceptanceCriteria:o.context?.requirements||[],url:b,routing:{tier:s.decision.tier,modelId:s.modelId,executionStrategy:s.executionStrategy,complexity:s.decision.complexityAnalysis.overall},patternHints:l.length>0?l.map(A=>({patternId:A.id,name:A.name,description:A.description,confidence:A.confidence,similarity:A.qualityScore,canReuse:A.tier==="long-term"})):void 0},R=await t.executeWorkflow(p,C);return R.success?{success:!0,data:{taskId:R.value,type:u,priority:d,strategy:o.strategy||"adaptive",status:"workflow-started",message:`Workflow '${p}' started for task: ${o.task}`,routing:{tier:s.decision.tier,tierName:s.tierInfo.name,modelId:s.modelId,executionStrategy:s.executionStrategy,complexity:s.decision.complexityAnalysis.overall,confidence:s.decision.confidence,useAgentBooster:s.useAgentBooster,rationale:s.decision.rationale,decisionTimeMs:s.decision.metadata.decisionTimeMs}}}:{success:!1,error:`Workflow execution failed: ${R.error.message}`}}let m={description:o.task,strategy:o.strategy||"adaptive",maxAgents:o.maxAgents,context:o.context};u==="generate-tests"&&(m.sourceFiles=o.filePaths||[],m.sourceCode=o.codeContext||"",m.language=m.language||"typescript",m.testType=m.testType||"unit");let g=await e.submitTask({type:u,priority:d,targetDomains:[],payload:{...m,routing:{tier:s.decision.tier,modelId:s.modelId,executionStrategy:s.executionStrategy,useAgentBooster:s.useAgentBooster,agentBoosterTransform:s.decision.agentBoosterTransform,complexity:s.decision.complexityAnalysis.overall,confidence:s.decision.confidence},experienceGuidance:c?{strategy:c.recommendedStrategy,actions:c.suggestedActions,confidence:c.confidence,tokenSavings:c.estimatedTokenSavings}:void 0,patternHints:l.length>0?l.map(v=>({patternId:v.id,name:v.name,description:v.description,confidence:v.confidence,similarity:v.qualityScore,canReuse:v.tier==="long-term"})):void 0},timeout:6e5});if(!g.success)return{success:!1,error:g.error.message};let h=g.value;return await bN(h,o.task,{agent:"queen-coordinator",domain:o.context?.project}),process.env.AQE_TRAJECTORY_JUDGE==="1"&&process.env.ANTHROPIC_API_KEY&&hX().catch(v=>{console.warn("[TrajectoryJudge] failed:",v instanceof Error?v.message:v)}),{success:!0,data:{taskId:h,type:u,priority:d,strategy:o.strategy||"adaptive",status:"submitted",message:`Task orchestrated: ${o.task}${c?" (with experience guidance)":""}`,routing:{tier:s.decision.tier,tierName:s.tierInfo.name,modelId:s.modelId,executionStrategy:s.executionStrategy,complexity:s.decision.complexityAnalysis.overall,confidence:s.decision.confidence,useAgentBooster:s.useAgentBooster,rationale:s.decision.rationale,decisionTimeMs:s.decision.metadata.decisionTimeMs}}}}catch(r){return{success:!1,error:`Failed to orchestrate task: ${w(r)}`}}}async function Bw(o){try{let e=await ms(),t=o.domain||vX(o.task),r=o.isCritical??/\b(security|vulnerability|cve|owasp|critical|production|exploit)\b/i.test(o.task),n=await e.routeTask({task:o.task,codeContext:o.codeContext,filePaths:o.filePaths,manualTier:o.manualTier,isCritical:r,agentType:o.agentType||`qe-${t}`,domain:t,metadata:{inferredDomain:t,hasCodeContext:!!o.codeContext,fileCount:o.filePaths?.length}});return{success:!0,data:{tier:n.decision.tier,tierName:n.tierInfo.name,modelId:n.modelId,executionStrategy:n.executionStrategy,useAgentBooster:n.useAgentBooster,agentBoosterTransform:n.decision.agentBoosterTransform,complexity:{overall:n.decision.complexityAnalysis.overall,code:n.decision.complexityAnalysis.codeComplexity,reasoning:n.decision.complexityAnalysis.reasoningComplexity,scope:n.decision.complexityAnalysis.scopeComplexity},confidence:n.decision.confidence,rationale:n.decision.rationale,warnings:n.decision.warnings,budget:{allowed:n.decision.budgetDecision.allowed,wasDowngraded:n.decision.budgetDecision.wasDowngraded,estimatedCostUsd:n.decision.budgetDecision.estimatedCostUsd},decisionTimeMs:n.decision.metadata.decisionTimeMs}}}catch(e){return{success:!1,error:`Failed to route task: ${w(e)}`}}}async function Uw(o){try{let e=await ms(),t=e.getRoutingStats(),r=e.getMetrics(),n={stats:t,modelRouterMetrics:{totalDecisions:r.totalDecisions,avgDecisionTimeMs:r.avgDecisionTimeMs,agentBoosterStats:r.agentBoosterStats,budgetStats:r.budgetStats}};return o.includeLog&&(n.log=e.getRoutingLog(o.logLimit||100)),{success:!0,data:n}}catch(e){return{success:!1,error:`Failed to get routing metrics: ${w(e)}`}}}async function zw(o){try{let{createRoutingFeedbackCollector:e}=await Promise.resolve().then(()=>(oF(),CK)),{getGlobalCostTracker:t}=await Promise.resolve().then(()=>(iF(),bK)),r=e(100);await r.initialize(),r.enableEconomicRouting({...o.taskComplexity!=null?{}:{}},t());let n=r.getEconomicReport();return n?{success:!0,data:{tierEfficiency:n.tierEfficiency.map(s=>({...s,qualityPerDollar:isFinite(s.qualityPerDollar)?s.qualityPerDollar:"Infinity"})),currentHourlyCostUsd:n.currentHourlyCostUsd,currentDailyCostUsd:n.currentDailyCostUsd,budgetRemaining:n.budgetRemaining,recommendation:n.recommendation,savingsOpportunity:n.savingsOpportunity}}:{success:!1,error:"Economic routing is not available"}}catch(e){return{success:!1,error:`Failed to get economic routing report: ${w(e)}`}}}function vX(o){let e=o.toLowerCase();return/\b(security|vulnerabilit|cve|owasp|secret|credential|injection|xss|csrf)\b/.test(e)?"security-compliance":/\b(chaos|resilience|fault.?inject|disaster|failover)\b/.test(e)?"chaos-resilience":/\b(defect|bug.?predict|risk.?assess|mutation)\b/.test(e)?"defect-intelligence":/\b(coverage|uncovered|gap.?analy)\b/.test(e)?"coverage-analysis":/\b(quality|code.?review|maintain|tech.?debt)\b/.test(e)?"quality-assessment":/\b(contract|api.?compat|breaking.?change|pact)\b/.test(e)?"contract-testing":/\b(index|knowledge.?graph|semantic|code.?intel)\b/.test(e)?"code-intelligence":/\b(accessib|a11y|wcag|screen.?read)\b/.test(e)?"visual-accessibility":/\b(requirement|bdd|acceptance|user.?stor)\b/.test(e)?"requirements-validation":/\b(generat.*test|test.*generat|write.*test|create.*test)\b/.test(e)?"test-generation":/\b(run.*test|execut.*test)\b/.test(e)?"test-execution":"test-generation"}function obe(o){let e=o.toLowerCase();return/run\s+(?:\w+\s+)*tests?/.test(e)||/execute\s+(?:\w+\s+)*tests?/.test(e)||e.includes("run tests")||e.includes("execute tests")?"execute-tests":e.includes("generate test")||e.includes("create test")||e.includes("write test")?"generate-tests":e.includes("coverage")||e.includes("uncovered")?"analyze-coverage":e.includes("quality")||e.includes("code quality")?"assess-quality":e.includes("defect")||e.includes("bug")||e.includes("predict")?"predict-defects":e.includes("requirement")||e.includes("bdd")||e.includes("acceptance")?"validate-requirements":e.includes("index")||e.includes("knowledge graph")||e.includes("semantic")?"index-code":e.includes("security")||e.includes("vulnerability")||e.includes("owasp")?"scan-security":e.includes("contract")||e.includes("api contract")||e.includes("pact")?"validate-contracts":e.includes("accessibility")||e.includes("a11y")||e.includes("wcag")?"test-accessibility":e.includes("chaos")||e.includes("resilience")||e.includes("fault")?"run-chaos":e.includes("learn")||e.includes("optimize")||e.includes("improve")?"optimize-learning":e.includes("ideation")||e.includes("quality criteria")||e.includes("htsm")||e.includes("qcsd")||e.includes("testability")||e.includes("pi planning")||e.includes("sprint planning")?"ideation-assessment":"generate-tests"}function cbe(o){switch(o){case"critical":return"p0";case"high":return"p1";case"medium":return"p2";case"low":return"p3";default:return"p1"}}async function lbe(o){try{let e=await yn(),t={taskId:o.taskId,task:o.task,taskType:o.taskType,success:o.success,executionTimeMs:o.executionTimeMs,agentId:o.agentId,domain:o.domain,modelTier:o.modelTier,qualityScore:o.qualityScore,error:o.error,metrics:o.metrics};await e.recordTaskOutcome(t);let r=o.success&&(o.qualityScore||.5)>=.6;return{success:!0,data:{recorded:!0,patternStored:r,message:r?`Outcome recorded and pattern stored for task ${o.taskId}`:`Outcome recorded for task ${o.taskId}`}}}catch(e){return{success:!1,error:`Failed to record task outcome: ${w(e)}`}}}async function ube(){try{let e=await(await yn()).getStats();return{success:!0,data:{service:e.service,patterns:{totalPatterns:e.reasoningBank.totalPatterns,byDomain:e.reasoningBank.byDomain,byTier:e.reasoningBank.byTier,learningOutcomes:e.reasoningBank.learningOutcomes,patternSuccessRate:e.reasoningBank.patternSuccessRate},embeddings:{cacheSize:e.reasoningBank.embeddingCacheSize,dimension:e.reasoningBank.embeddingDimension,transformerAvailable:e.reasoningBank.transformerAvailable},performance:{avgRoutingLatencyMs:e.reasoningBank.avgRoutingLatencyMs,p95RoutingLatencyMs:e.reasoningBank.p95RoutingLatencyMs}}}}catch(o){return{success:!1,error:`Failed to get ReasoningBank stats: ${w(o)}`}}}async function dbe(o){if(!ge())return{success:!1,error:"Fleet not initialized. Call fleet_init first."};let{queen:e}=me();try{let t=e.getTaskStatus(o.taskId);if(!t)return{success:!1,error:`Task not found: ${o.taskId}`};let r={taskId:t.taskId,type:t.task.type,status:t.status,priority:t.task.priority,assignedDomain:t.assignedDomain,assignedAgents:t.assignedAgents,result:o.detailed?t.result:void 0,error:t.error,createdAt:t.task.createdAt.toISOString(),startedAt:t.startedAt?.toISOString(),completedAt:t.completedAt?.toISOString(),duration:t.completedAt&&t.startedAt?t.completedAt.getTime()-t.startedAt.getTime():void 0};if((t.status==="completed"||t.status==="failed")&&!yX.has(o.taskId)){yX.add(o.taskId);try{let n=await yn(),i=r.duration||0,s=t.status==="completed",a=t.task.payload||{},c=typeof a.description=="string"?a.description:t.task.type,l=a.routing,u=await _g(o.taskId,s,t.error),d=u?.metrics.averageQuality??(s?.7:.3);await n.recordTaskOutcome({taskId:o.taskId,task:c,taskType:t.task.type,success:s,executionTimeMs:i,agentId:t.assignedAgents?.[0],domain:t.assignedDomain,modelTier:l?.tier,qualityScore:d,error:t.error,metrics:{testsGenerated:typeof t.result=="object"&&t.result?t.result.testsGenerated:void 0,testsPassed:typeof t.result=="object"&&t.result?t.result.testsPassed:void 0}}),console.error(`[TaskHandler] Recorded learning outcome: task=${o.taskId} success=${s} quality=${d.toFixed(2)} trajectorySteps=${u?.steps.length??0}`)}catch(n){console.error("[TaskHandler] Failed to record outcome:",n)}}return{success:!0,data:r}}catch(t){return{success:!1,error:`Failed to get task status: ${w(t)}`}}}function pbe(o){bX(o);let e=o.subscribeToEventType("TaskCompleted",async r=>{let{taskId:n}=r.payload;n&&await _g(n,!0).catch(()=>{})}),t=o.subscribeToEventType("TaskFailed",async r=>{let{taskId:n,error:i}=r.payload;n&&await _g(n,!1,i).catch(()=>{})});TN=[e,t]}function bX(o){for(let e of TN)o.unsubscribe(e);TN=[]}var abe,yX,TN,Vw=y(()=>{"use strict";hs();kS();CN();fX();k();abe={"ideation-assessment":"qcsd-ideation-swarm"};yX=new Set;TN=[]});var TX={};Q(TX,{DEFAULT_STRUCTURAL_HEALTH_CONFIG:()=>CX,StructuralHealthMonitor:()=>Gw,createStructuralHealthMonitor:()=>mbe});function mbe(o){return new Gw(o)}var CX,Gw,SX=y(()=>{"use strict";RL();CX={healthyThreshold:.4,warningThreshold:.2,maxHistoryEntries:100,enableLogging:!1},Gw=class{config;minCutService;history=[];constructor(e){this.config={...CX,...e},this.minCutService=vS()}computeFleetHealth(e){if(e.length===0)return this.emptyFleetResult();let t=this.minCutService.buildTaskGraphFromTopology(e);return this.computeFleetHealthFromGraph(t,e.length)}computeFleetHealthFromGraph(e,t){if(e.nodes.length===0)return this.emptyFleetResult();let r=this.minCutService.getStructuralHealth(e),n=this.determineStatus(r.normalizedLambda),i={lambda:r.lambda,healthy:r.healthy,weakPoints:r.weakPoints,normalizedLambda:r.normalizedLambda,riskScore:r.riskScore,status:n,suggestions:r.suggestions,measuredAt:new Date};return this.addHistoryEntry({lambda:r.lambda,healthy:r.healthy,weakPointCount:r.weakPoints.length,agentCount:t??e.nodes.length,timestamp:i.measuredAt}),this.config.enableLogging&&this.logHealth(i),i}getTrend(){if(this.history.length<2)return"stable";let e=Math.min(5,this.history.length),t=this.history.slice(-e),r=t[0].lambda,i=t[t.length-1].lambda-r;return Math.abs(i)<.05?"stable":i>0?"improving":"degrading"}getHistory(e){let t=[...this.history];return e!==void 0&&e<t.length?t.slice(-e):t}clearHistory(){this.history.length=0}getMinCutService(){return this.minCutService}determineStatus(e){return e>=this.config.healthyThreshold?"healthy":e>=this.config.warningThreshold?"warning":"critical"}addHistoryEntry(e){this.history.push(e),this.history.length>this.config.maxHistoryEntries&&this.history.splice(0,this.history.length-this.config.maxHistoryEntries)}emptyFleetResult(){return{lambda:0,healthy:!1,weakPoints:[],normalizedLambda:0,riskScore:1,status:"empty",suggestions:["No agents in fleet. Spawn agents to build a topology."],measuredAt:new Date}}logHealth(e){console.error(`[StructuralHealth] Status: ${e.status} | Lambda: ${e.normalizedLambda.toFixed(3)} | Weak points: ${e.weakPoints.length} | Risk: ${(e.riskScore*100).toFixed(0)}%`)}}});function me(){return z}function ge(){return z.initialized&&z.kernel!==null&&z.queen!==null}function EX(o,e){if(z.topology!=="hierarchical"){let i={agentId:o,domain:e,level:"worker",spawnedAt:new Date};return z.agentLevels.set(o,i),"worker"}let r=Array.from(z.agentLevels.values()).find(i=>i.domain===e&&i.level==="lead")?"worker":"lead",n={agentId:o,domain:e,level:r,spawnedAt:new Date};return z.agentLevels.set(o,n),r}function RX(o){return z.agentLevels.get(o)}async function Lg(o){try{if(z.initialized&&z.kernel&&z.queen)return{success:!0,data:{fleetId:z.fleetId,topology:o.topology||"hierarchical",maxAgents:o.maxAgents||15,enabledDomains:o.enabledDomains||wX,status:"ready"}};z.fleetId=`fleet-${E().slice(0,8)}`;let e=o.enabledDomains||[...Z],t=e.filter(c=>c!=="coordination");z.kernel=new pT({maxConcurrentAgents:o.maxAgents||15,memoryBackend:o.memoryBackend||"hybrid",hnswEnabled:!0,lazyLoading:o.lazyLoading!==!1,enabledDomains:e}),await z.kernel.initialize(),z.router=new XT(z.kernel.eventBus),await z.router.initialize();let r=c=>z.kernel.getDomainAPI(c),n=new _w(z.kernel.eventBus,z.kernel.memory,r),i=z.kernel.plugins;await i.loadAll();let s=new Map;for(let c of i.getLoaded()){let l=i.getPlugin(c);l&&s.set(c,l)}z.queen=V5(z.kernel,z.router,n,void 0,s),await z.queen.initialize(),z.workflowOrchestrator=new bm(z.kernel.eventBus,z.kernel.memory,z.kernel.coordinator),await z.workflowOrchestrator.initialize(),gbe(z.kernel,z.workflowOrchestrator);let{subscribeTrajectoryEvents:a}=await Promise.resolve().then(()=>(Vw(),SN));return a(z.router),z.initialized=!0,z.initTime=new Date,z.topology=o.topology||"hierarchical",z.agentLevels.clear(),{success:!0,data:{fleetId:z.fleetId,topology:z.topology,maxAgents:o.maxAgents||15,enabledDomains:t,status:"initialized"}}}catch(e){return{success:!1,error:`Failed to initialize fleet: ${w(e)}`}}}async function wN(o){if(!ge())return{success:!1,error:"Fleet not initialized. Call fleet_init first."};try{let e=z.queen.getHealth(),t=z.queen.getMetrics(),r={status:e.status,uptime:t.uptime,agents:{total:e.totalAgents,active:e.activeAgents,idle:e.totalAgents-e.activeAgents},tasks:{pending:e.pendingTasks,running:e.runningTasks,completed:t.tasksCompleted,failed:t.tasksFailed}};if(o.includeDomains){let i=[];for(let[s,a]of e.domainHealth)i.push({domain:s,status:a.status,agents:a.agents.total,load:z.queen.getDomainLoad(s)});r.domains=i}let n=z.queen.getDomainTeamManager?.();if(n){let i=n.listDomainTeams(),s=0,a=0;for(let c of i)s+=1+c.teammateIds.length,n.getTeamHealth(c.domain)?.healthy&&a++;r.teams={active:i.length,totalAgentsInTeams:s,healthyCount:a}}o.includeMetrics&&(r.metrics={tasksReceived:t.tasksReceived,tasksCompleted:t.tasksCompleted,tasksFailed:t.tasksFailed,agentUtilization:t.agentUtilization,averageTaskDuration:t.averageTaskDuration});try{let{getUnifiedMemory:i}=await Promise.resolve().then(()=>(Y(),Cr)),s=i();if(s.isInitialized()){let a=l=>{try{return s.queryCount(l)}catch{return 0}},c=await s.vectorCount();r.learning={totalPatterns:a("qe_patterns"),totalExperiences:a("captured_experiences"),totalTrajectories:a("qe_trajectories"),vectorCount:c,experienceApplications:a("experience_applications"),dreamCycles:a("dream_cycles"),embeddingDimension:384}}}catch{}return{success:!0,data:r}}catch(e){return{success:!1,error:`Failed to get fleet status: ${w(e)}`}}}async function EN(o){if(!ge())return{success:!1,error:"Fleet not initialized. Call fleet_init first."};try{if(o.domain){let r=z.queen.getDomainHealth(o.domain);return r?{success:!0,data:{domain:o.domain,status:r.status,agents:r.agents,errors:r.errors,lastActivity:r.lastActivity?.toISOString()}}:{success:!1,error:`Domain not found: ${o.domain}`}}let e=z.queen.getHealth(),t={status:e.status,totalAgents:e.totalAgents,activeAgents:e.activeAgents,pendingTasks:e.pendingTasks,runningTasks:e.runningTasks,workStealingActive:e.workStealingActive,lastHealthCheck:e.lastHealthCheck.toISOString()};if(o.detailed){let r={};for(let[n,i]of e.domainHealth)r[n]={status:i.status,agents:i.agents,errors:i.errors.length,lastActivity:i.lastActivity?.toISOString()};t.domains=r,t.issues=e.issues.map(n=>({severity:n.severity,message:n.message,domain:n.domain,timestamp:n.timestamp.toISOString()}))}try{let{StructuralHealthMonitor:r}=await Promise.resolve().then(()=>(SX(),TX)),n=new r,i=[];for(let[c]of e.domainHealth){let l=z.queen.getAgentsByDomain(c);for(let u of l)i.push({id:u.id,name:u.name,domain:u.domain})}let s=i.map(c=>({id:c.id,name:c.name,domain:c.domain,capabilities:[c.domain],dependsOn:[],weight:1})),a=n.computeFleetHealth(s);t.structuralHealth={lambda:a.lambda,healthy:a.healthy,normalizedLambda:a.normalizedLambda,riskScore:a.riskScore,status:a.status,weakPoints:a.weakPoints,suggestions:a.suggestions}}catch{}return{success:!0,data:t}}catch(e){return{success:!1,error:`Failed to get fleet health: ${w(e)}`}}}async function RN(){if(nK(),BS(),dX(),z.workflowOrchestrator&&(await z.workflowOrchestrator.dispose(),z.workflowOrchestrator=null),z.queen&&(await z.queen.dispose(),z.queen=null),z.router){try{let{unsubscribeTrajectoryEvents:o}=await Promise.resolve().then(()=>(Vw(),SN));o(z.router)}catch{}await z.router.dispose(),z.router=null}z.kernel&&(await z.kernel.dispose(),z.kernel=null),z.initialized=!1,z.fleetId=null,z.initTime=null,z.topology="hierarchical",z.agentLevels.clear()}async function AN(){let o=performance.now();try{let e=ge(),t=z.initTime?Date.now()-z.initTime.getTime():0,r={connected:!1,totalEntries:0,namespaces:0},n={enabled:!1,vectorCount:0},i=0;if(e&&z.kernel){let u=z.kernel.memory;try{r.connected=!0;let d=await u.count("default"),p=await u.count("learning"),m=await u.count("patterns");r.totalEntries=d+p+m;let g=0;for(let h of["default","learning","patterns","mcp-tools","coordination"])await u.count(h)>0&&g++;r.namespaces=g}catch{}try{let d=process.env.AQE_V3_HNSW_ENABLED==="true";n.enabled=d;let p=u;d&&typeof p.vectorCount=="function"&&(n.vectorCount=await p.vectorCount())}catch{}try{i=(await u.search("pattern:*",1e3)).length}catch{}}let s=e&&z.kernel?(z.kernel.getLoadedDomains?.()??wX).length:0,a=null;try{let{getSharedRvfDualWriterSync:u}=await Promise.resolve().then(()=>(rs(),ya)),d=u();if(d){let p=d.status(),m=d.getDivergenceReport();a={mode:p.mode,vectorCount:p.rvf?.totalVectors??0,divergences:m.divergences,promotionSafe:d.isPromotionSafe()}}}catch{}let c=null;try{let{SQLitePatternStore:u}=await Promise.resolve().then(()=>(Rc(),VM)),d=new u;await d.initialize(),c=d.getGhostPatternCount(),d.close()}catch{}return{success:!0,data:{status:e?"healthy":"unhealthy",version:"3.9.23",loadedDomains:s,memory:r,hnsw:n,rvf:a??void 0,ghostPatterns:c??void 0,loadedPatterns:i,uptimeMs:t,timestamp:new Date().toISOString()},metadata:{executionTime:performance.now()-o,timestamp:new Date().toISOString(),requestId:E(),toolName:"aqe_health"}}}catch(e){return{success:!1,error:w(e),metadata:{executionTime:performance.now()-o,timestamp:new Date().toISOString(),requestId:E(),toolName:"aqe_health"}}}}function gbe(o,e){let t=o.getDomainAPI("requirements-validation");t?.registerWorkflowActions&&(t.registerWorkflowActions(e),console.log("[Fleet] Registered requirements-validation workflow actions (includes QCSD Ideation)"));let r=o.getDomainAPI("visual-accessibility");r?.registerWorkflowActions&&(r.registerWorkflowActions(e),console.log("[Fleet] Registered visual-accessibility workflow actions"))}var wX,z,hs=y(()=>{"use strict";N();C3();L();G5();wD();H5();HL();US();vN();pX();k();wX=Z.filter(o=>o!=="coordination"),z={fleetId:null,kernel:null,queen:null,router:null,workflowOrchestrator:null,initialized:!1,initTime:null,topology:"hierarchical",agentLevels:new Map}});import{randomUUID as Zbe}from"crypto";var $e,ir=y(()=>{"use strict";k();$e=class{constructor(e){this.config=e}config;_status="idle";_lastResult;_lastRunAt;_nextRunAt;_totalExecutions=0;_successfulExecutions=0;_failedExecutions=0;_executionDurations=[];_recentResults=[];get status(){return this._status}get lastResult(){return this._lastResult}get lastRunAt(){return this._lastRunAt}get nextRunAt(){return this._nextRunAt}async initialize(){this._status="idle",this._nextRunAt=new Date(Date.now()+this.config.intervalMs)}async execute(e){let t=Date.now();this._status="running",this._lastRunAt=new Date,this._totalExecutions++;let r,n;for(let s=0;s<=this.config.retryCount;s++)try{if(e.signal.aborted)throw new Error("Worker execution aborted");n=await this.executeWithTimeout(()=>this.doExecute(e),this.config.timeoutMs,e.signal);break}catch(a){r=S(a),e.logger.warn(`Worker ${this.config.id} attempt ${s+1} failed: ${r.message}`),s<this.config.retryCount&&await this.delay(this.config.retryDelayMs)}let i=Date.now()-t;return n?(this._successfulExecutions++,this._lastResult=n):(this._failedExecutions++,n=this.createErrorResult(r,i),this._lastResult=n),this._executionDurations.push(i),this._executionDurations.length>100&&this._executionDurations.shift(),this._recentResults.push({timestamp:new Date,success:n.success,durationMs:i}),this._recentResults.length>5&&this._recentResults.shift(),this._nextRunAt=new Date(Date.now()+this.config.intervalMs),this._status=n.success?"idle":"error",await e.eventBus.publish({type:"worker.executed",workerId:this.config.id,timestamp:new Date,payload:{success:n.success,durationMs:i,findingsCount:n.findings.length,healthScore:n.metrics.healthScore}}),n}pause(){this._status!=="stopped"&&(this._status="paused")}resume(){this._status==="paused"&&(this._status="idle")}async stop(){this._status="stopped"}getHealth(){let e=this._executionDurations.length>0?this._executionDurations.reduce((r,n)=>r+n,0)/this._executionDurations.length:0,t=this._totalExecutions>0?this._successfulExecutions/this._totalExecutions:1;return{status:this._status,healthScore:Math.round(t*100),totalExecutions:this._totalExecutions,successfulExecutions:this._successfulExecutions,failedExecutions:this._failedExecutions,avgDurationMs:Math.round(e),recentResults:[...this._recentResults]}}async executeWithTimeout(e,t,r){return new Promise((n,i)=>{let s=setTimeout(()=>{i(new Error(`Worker execution timed out after ${t}ms`))},t),a=()=>{clearTimeout(s),i(new Error("Worker execution aborted"))};r.addEventListener("abort",a,{once:!0}),e().then(c=>{clearTimeout(s),r.removeEventListener("abort",a),n(c)}).catch(c=>{clearTimeout(s),r.removeEventListener("abort",a),i(c)})})}createErrorResult(e,t){return{workerId:this.config.id,timestamp:new Date,durationMs:t,success:!1,error:e.message,metrics:{itemsAnalyzed:0,issuesFound:0,healthScore:0,trend:"degrading",domainMetrics:{}},findings:[],recommendations:[]}}createResult(e,t,r,n){return{workerId:this.config.id,timestamp:new Date,durationMs:e,success:!0,metrics:t,findings:r,recommendations:n}}delay(e){return new Promise(t=>setTimeout(t,e))}generateId(){return`${Date.now()}-${Zbe().slice(0,9)}`}}});var eCe,Pl,dO=y(()=>{"use strict";ir();yw();Y();jF();k();eCe={id:"heartbeat-scheduler",name:"Heartbeat Scheduler",description:"Token-free maintenance: pattern promotion, stale detection, experience buffer monitoring",intervalMs:1800*1e3,priority:"normal",targetDomains:["learning-optimization"],enabled:!0,timeoutMs:6e4,retryCount:1,retryDelayMs:5e3},Pl=class extends $e{lifecycleManager=null;dailyLogger;lastRunTimestamp=0;constructor(){super(eCe),this.dailyLogger=new gg}async getLifecycleManager(){if(this.lifecycleManager)return this.lifecycleManager;try{let e=W();await e.initialize();let t=e.getDatabase();return this.lifecycleManager=mg(t,{promotionRewardThreshold:.7,promotionMinOccurrences:2,promotionMinSuccessRate:.7,deprecationFailureThreshold:3,staleDaysThreshold:30,confidenceDecayRate:.01,minActiveConfidence:.3}),this.lifecycleManager}catch{return null}}getPendingExperienceCount(){try{return W().getDatabase().prepare("SELECT COUNT(*) as pending FROM qe_pattern_usage WHERE created_at > datetime('now', '-1 day')").get()?.pending??0}catch{return 0}}async doExecute(e){let t=Date.now();e.logger.info("Heartbeat scheduler running (token-free maintenance)");let r=[],n=[],i=await this.getLifecycleManager();if(!i)return e.logger.warn("Unified memory unavailable \u2014 returning zero-metric heartbeat"),this.createResult(Date.now()-t,{itemsAnalyzed:0,issuesFound:0,healthScore:50,trend:"stable",domainMetrics:{promoted:0,deprecated:0,decayed:0,stalePatterns:0,pendingExperiences:0,avgConfidence:0,avgSuccessRate:0}},[],[]);let s=0,a=0;try{let b=i.promoteEligiblePatterns();s=b.promoted,a=b.checked,s>0&&r.push({type:"heartbeat-promotion",severity:"info",domain:"learning-optimization",title:"Patterns Promoted",description:`${s} of ${a} short-term patterns promoted to long-term`})}catch(b){e.logger.warn("Pattern promotion failed",{error:w(b)})}let c=0,l=0;try{let b=i.deprecateStalePatterns();c=b.deprecated,l=b.checked,c>0&&r.push({type:"heartbeat-deprecation",severity:"low",domain:"learning-optimization",title:"Stale Patterns Deprecated",description:`${c} of ${l} patterns deprecated (stale, failed, or low confidence)`})}catch(b){e.logger.warn("Stale pattern detection failed",{error:w(b)})}let u=0;try{let b=this.lastRunTimestamp>0?(Date.now()-this.lastRunTimestamp)/864e5:1;u=i.applyConfidenceDecay(Math.min(b,7)).decayed}catch(b){e.logger.warn("Confidence decay failed",{error:w(b)})}let d=this.getPendingExperienceCount(),p={totalPatterns:0,activePatterns:0,deprecatedPatterns:0,promotedPatterns:0,shortTermPatterns:0,longTermPatterns:0,avgConfidence:0,avgSuccessRate:0,patternsNearDeprecation:0};try{p=i.getStats()}catch(b){e.logger.warn("Stats retrieval failed",{error:w(b)})}try{this.dailyLogger.log({timestamp:new Date,type:"pattern-promoted",summary:`Heartbeat: ${s} promoted, ${c} deprecated, ${u} decayed, ${d} pending exp, ${p.activePatterns} active patterns (avg conf: ${p.avgConfidence.toFixed(2)})`,details:{promoted:s,deprecated:c,decayed:u,pendingExperiences:d,totalPatterns:p.totalPatterns,activePatterns:p.activePatterns,avgConfidence:p.avgConfidence,avgSuccessRate:p.avgSuccessRate}}),this.dailyLogger.flush()}catch(b){e.logger.warn("Daily log write failed",{error:w(b)})}this.lastRunTimestamp=Date.now(),p.activePatterns>0&&p.patternsNearDeprecation/p.activePatterns>.5&&n.push({priority:"p2",domain:"learning-optimization",action:"Review At-Risk Patterns",description:`${p.patternsNearDeprecation} of ${p.activePatterns} active patterns are near deprecation. Manual review recommended.`,estimatedImpact:"medium",effort:"low",autoFixable:!1});let m=this.calculateHealthScore(p,s,c),g=this.determineTrend(s,c,p.activePatterns),h=Math.max(a,l),v=s+c+p.patternsNearDeprecation;return e.logger.info("Heartbeat complete",{promoted:s,deprecated:c,decayed:u,pendingExperiences:d,healthScore:m}),this.createResult(Date.now()-t,{itemsAnalyzed:h,issuesFound:v,healthScore:m,trend:g,domainMetrics:{promoted:s,deprecated:c,decayed:u,stalePatterns:p.patternsNearDeprecation,pendingExperiences:d,avgConfidence:Number(p.avgConfidence.toFixed(3)),avgSuccessRate:Number(p.avgSuccessRate.toFixed(3))}},r,n)}calculateHealthScore(e,t,r){let n=70;if(n+=Math.min(15,t*5),e.avgConfidence>0&&(n+=Math.round((e.avgConfidence-.5)*30)),e.activePatterns>0){let i=r/e.activePatterns;n-=Math.round(i*20)}return e.activePatterns>0&&e.patternsNearDeprecation/e.activePatterns>.5&&(n-=10),Math.max(0,Math.min(100,Math.round(n)))}determineTrend(e,t,r){return r===0?"stable":e>t?"improving":t>e&&t/r>.1?"degrading":"stable"}}});var M1,D1,_1,WE,jE,QE,r7=y(()=>{"use strict";M1=class{handlers=[];async publish(e){for(let t of this.handlers)try{t(e)}catch(r){console.debug("[WorkerManager] Event handler error:",r instanceof Error?r.message:r)}}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}},D1=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,"\\$&"),r=new RegExp(t.replace(/\*/g,".*"));return Array.from(this.store.keys()).filter(n=>r.test(n))}clear(){this.store.clear()}get size(){return this.store.size}},_1=class{constructor(e){this.workerId=e}workerId;format(e,t,r){let n=new Date().toISOString(),i=r?` ${JSON.stringify(r)}`:"";return`[${n}] [${e}] [${this.workerId}] ${t}${i}`}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))}},WE=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 n=t.getHealth().domains[e];return n?{status:n.status,errors:n.errors||[]}:{status:"unknown",errors:[`Domain ${e} not found`]}}},jE=class{getDomainAPI(e){}getDomainHealth(e){return{status:"healthy",errors:[]}}},QE=class{workers=new Map;timers=new Map;abortControllers=new Map;eventBus;memory;domainAccess;running=!1;kernelRef;constructor(e){this.eventBus=e?.eventBus??new M1,this.memory=e?.memory??new D1,this.kernelRef=e?.kernel,e?.domainAccess?this.domainAccess=e.domainAccess:e?.kernel?this.domainAccess=new WE(()=>this.kernelRef):this.domainAccess=new jE}setKernel(e){this.kernelRef=e,this.domainAccess instanceof jE&&(this.domainAccess=new WE(()=>this.kernelRef))}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 r=this.timers.get(e);r&&clearTimeout(r);let n=new AbortController;this.abortControllers.set(e,n);let i=this.createContext(e,n.signal),s=await t.execute(i);return this.running&&t.config.enabled&&t.status!=="stopped"&&this.scheduleNextRun(t),s}getHealth(){let e={},t=0,r=0,n=0,i=0;for(let[a,c]of Array.from(this.workers.entries())){let l=c.getHealth();switch(e[a]=l,i+=l.healthScore,c.status){case"running":t++;break;case"paused":r++;break;case"error":n++;break}}let s=this.workers.size>0?Math.round(i/this.workers.size):100;return{totalWorkers:this.workers.size,runningWorkers:t,pausedWorkers:r,errorWorkers:n,healthScore:s,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 r=this.createContext(e.config.id,t.signal);try{await e.execute(r)}catch(n){console.error(`Worker ${e.config.id} initial execution failed:`,n)}this.scheduleNextRun(e)}async stopWorker(e){let t=this.timers.get(e);t&&(clearTimeout(t),this.timers.delete(e));let r=this.abortControllers.get(e);r&&(r.abort(),this.abortControllers.delete(e));let n=this.workers.get(e);n&&await n.stop()}scheduleNextRun(e){let t=setTimeout(async()=>{if(!this.running||e.status==="stopped"||e.status==="paused")return;let r=new AbortController;this.abortControllers.set(e.config.id,r);let n=this.createContext(e.config.id,r.signal);try{await e.execute(n)}catch(i){console.error(`Worker ${e.config.id} execution failed:`,i)}this.running&&e.config.enabled&&e.status!=="error"&&this.scheduleNextRun(e)},e.config.intervalMs);this.timers.set(e.config.id,t)}createContext(e,t){return{eventBus:this.eventBus,memory:this.memory,logger:new _1(e),domains:this.domainAccess,signal:t}}}});var aEe,eh,n7=y(()=>{"use strict";ir();k();aEe={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},eh=class extends $e{previousMetrics;constructor(){super(aEe)}async doExecute(e){let t=Date.now();e.logger.info("Starting test health analysis");let r=[],n=[],i=await this.collectMetrics(e);this.analyzePassRate(i,r,n),this.analyzeExecutionTime(i,r,n),this.analyzeReliability(i,r,n),this.analyzeGrowth(i,r,n),this.compareToPrevious(i,r,n),await e.memory.set("test-health:previous-metrics",i),this.previousMetrics=i;let s=this.calculateHealthScore(i),a=this.determineTrend(i);return e.logger.info("Test health analysis complete",{healthScore:s,findingsCount:r.length}),this.createResult(Date.now()-t,{itemsAnalyzed:i.totalTests,issuesFound:r.length,healthScore:s,trend:a,domainMetrics:{passRate:`${(i.passingTests/i.totalTests*100).toFixed(1)}%`,avgExecutionTime:`${i.avgExecutionTimeMs}ms`,reliability:`${i.reliability}%`,totalTests:i.totalTests}},r,n)}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 n=await e.memory.search("test-health:run-result:*");if(n.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 i=0,s=0,a=0,c=0,l=0,u=0;for(let g of n.slice(0,50)){let h=await e.memory.get(g);h&&(i+=h.total,s+=h.passed,a+=h.failed,c+=h.skipped,l+=h.duration,u++)}let d=u>0?Math.round(l/u):0,p=i>0?Math.round(s/i*100):0,m=await e.memory.get("test-health:growth-metrics");return{totalTests:i||0,passingTests:s||0,failingTests:a||0,skippedTests:c||0,avgExecutionTimeMs:d,reliability:p,growth:{testsAddedLast7Days:m?.testsAddedLast7Days||0,testsRemovedLast7Days:m?.testsRemovedLast7Days||0}}}catch(n){let i=w(n);throw new Error(`Failed to collect test health metrics: ${i}. Check memory service connectivity and test result data availability.`)}}analyzePassRate(e,t,r){let n=e.passingTests/e.totalTests*100;n<95&&(t.push({type:"low-pass-rate",severity:n<90?"high":"medium",domain:"test-execution",title:"Low Test Pass Rate",description:`Test pass rate is ${n.toFixed(1)}%, below the 95% target`,context:{passing:e.passingTests,failing:e.failingTests,total:e.totalTests}}),r.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,r){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}}),r.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,r){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}}),r.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,r){let n=e.growth.testsAddedLast7Days-e.growth.testsRemovedLast7Days;n<0&&(t.push({type:"test-coverage-decline",severity:"medium",domain:"test-generation",title:"Test Coverage Declining",description:`Net loss of ${Math.abs(n)} tests in the last 7 days`,context:{added:e.growth.testsAddedLast7Days,removed:e.growth.testsRemovedLast7Days}}),r.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,r){if(!this.previousMetrics)return;let n=e.passingTests/e.totalTests-this.previousMetrics.passingTests/this.previousMetrics.totalTests;n<-.05&&t.push({type:"pass-rate-regression",severity:"high",domain:"test-execution",title:"Pass Rate Regression Detected",description:`Pass rate dropped by ${(Math.abs(n)*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,r=e.reliability/100*30,n=Math.max(0,20-e.avgExecutionTimeMs/100),i=Math.min(10,e.growth.testsAddedLast7Days/10*10);return Math.round(t+r+n+i)}determineTrend(e){if(!this.previousMetrics)return"stable";let t=e.passingTests/e.totalTests,r=this.previousMetrics.passingTests/this.previousMetrics.totalTests;return t>r+.02?"improving":t<r-.02?"degrading":"stable"}}});var oEe,th,i7=y(()=>{"use strict";ir();oEe={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},th=class extends $e{constructor(){super(oEe)}async doExecute(e){let t=Date.now();e.logger.info("Starting coverage tracking analysis");let r=[],n=[],i=await this.collectCoverageTrend(e),s=await this.identifyCoverageGaps(e);this.analyzeCoverageThresholds(i.current,r,n),this.analyzeCoverageGaps(s,r,n),this.analyzeCoverageTrends(i,r,n),await e.memory.set("coverage:current",i.current),await e.memory.set("coverage:gaps",s);let a=this.calculateHealthScore(i.current,s);return e.logger.info("Coverage tracking complete",{healthScore:a,findingsCount:r.length,gapsFound:s.length}),this.createResult(Date.now()-t,{itemsAnalyzed:s.length+4,issuesFound:r.length,healthScore:a,trend:this.determineTrend(i),domainMetrics:{lineCoverage:`${i.current.line}%`,branchCoverage:`${i.current.branch}%`,functionCoverage:`${i.current.function}%`,statementCoverage:`${i.current.statement}%`,gapsCount:s.length}},r,n)}async collectCoverageTrend(e){let t=await e.memory.get("coverage:current"),r=await e.memory.get("coverage:latest");return{current:{line:r?.line??0,branch:r?.branch??0,function:r?.function??0,statement:r?.statement??0,timestamp:new Date},previous:t}}async identifyCoverageGaps(e){let t=await e.memory.search("gap-pattern:*");if(t.length>0){let r=[];for(let n of t){let i=await e.memory.get(n);i&&typeof i.riskScore=="number"&&r.push(i)}if(r.length>0)return r}return[]}analyzeCoverageThresholds(e,t,r){let n={line:80,branch:70,function:80,statement:80};e.line<n.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 ${n.line}% target`,context:{current:e.line,target:n.line}}),e.branch<n.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 ${n.branch}% target`,context:{current:e.branch,target:n.branch}}),r.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<n.function&&t.push({type:"low-function-coverage",severity:"medium",domain:"coverage-analysis",title:"Function Coverage Below Threshold",description:`Function coverage is ${e.function}%, below ${n.function}% target`,context:{current:e.function,target:n.function}})}analyzeCoverageGaps(e,t,r){let n=e.filter(s=>s.riskScore>.8);for(let s of n)t.push({type:"high-risk-coverage-gap",severity:"high",domain:"coverage-analysis",title:"High-Risk Coverage Gap",description:`${s.file} has ${s.uncoveredLines} uncovered lines with complexity ${s.complexity}`,resource:s.file,context:{uncoveredLines:s.uncoveredLines,totalLines:s.totalLines,coveragePercent:((s.totalLines-s.uncoveredLines)/s.totalLines*100).toFixed(1),complexity:s.complexity,riskScore:s.riskScore}});n.length>0&&r.push({priority:"p0",domain:"test-generation",action:"Address High-Risk Coverage Gaps",description:`${n.length} files have high-risk coverage gaps. Prioritize testing for complex, uncovered code.`,estimatedImpact:"high",effort:"high",autoFixable:!0});let i=e.filter(s=>(s.totalLines-s.uncoveredLines)/s.totalLines<.5);i.length>0&&t.push({type:"critical-coverage-gaps",severity:"critical",domain:"coverage-analysis",title:"Critical Coverage Gaps Detected",description:`${i.length} files have less than 50% coverage`,context:{files:i.map(s=>s.file)}})}analyzeCoverageTrends(e,t,r){if(!e.previous)return;let n=e.current.line-e.previous.line,i=e.current.branch-e.previous.branch;n<-2&&(t.push({type:"coverage-regression",severity:n<-5?"high":"medium",domain:"coverage-analysis",title:"Coverage Regression Detected",description:`Line coverage dropped by ${Math.abs(n).toFixed(1)}% since last check`,context:{previous:e.previous.line,current:e.current.line,change:n}}),r.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})),i<-3&&t.push({type:"branch-coverage-regression",severity:"medium",domain:"coverage-analysis",title:"Branch Coverage Regression",description:`Branch coverage dropped by ${Math.abs(i).toFixed(1)}%`,context:{previous:e.previous.branch,current:e.current.branch,change:i}})}calculateHealthScore(e,t){let r=e.line/100*25,n=e.branch/100*25,i=e.function/100*20,s=e.statement/100*20,a=t.filter(l=>l.riskScore>.8).length,c=Math.max(0,10-a*2);return Math.round(r+n+i+s+c)}determineTrend(e){if(!e.previous)return"stable";let t=(e.current.line+e.current.branch+e.current.function+e.current.statement)/4,r=(e.previous.line+e.previous.branch+e.previous.function+e.previous.statement)/4;return t>r+1?"improving":t<r-1?"degrading":"stable"}}});var cEe,rh,s7=y(()=>{"use strict";ir();cEe={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},rh=class extends $e{constructor(){super(cEe)}async doExecute(e){let t=Date.now();e.logger.info("Starting flaky test detection");let r=[],n=[],i=await this.collectTestHistory(e),s=this.detectFlakyTests(i);this.generateFindings(s,r,n),await e.memory.set("flaky:detected",s),await e.memory.set("flaky:lastAnalysis",new Date().toISOString());let a=this.calculateHealthScore(i.length,s);return e.logger.info("Flaky test detection complete",{healthScore:a,testsAnalyzed:i.length,flakyTestsFound:s.length}),this.createResult(Date.now()-t,{itemsAnalyzed:i.length,issuesFound:s.length,healthScore:a,trend:"stable",domainMetrics:{testsAnalyzed:i.length,flakyTests:s.length,flakinessRate:`${(s.length/i.length*100).toFixed(1)}%`,avgFlakinessScore:s.length>0?(s.reduce((c,l)=>c+l.flakinessScore,0)/s.length).toFixed(1):"0"}},r,n)}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 r=await e.memory.search("flaky:history:*");if(r.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 n=[],i=[];for(let s of r)try{let a=await e.memory.get(s);a&&n.push(a)}catch{i.push(s)}if(n.length===0)throw new Error(`Found ${r.length} test history keys but failed to retrieve any data. Failed keys: ${i.slice(0,5).join(", ")}${i.length>5?"...":""}. Check memory service connectivity and data format.`);return n}detectFlakyTests(e){let t=[];for(let r of e){let n=this.analyzeTestFlakiness(r);n.flakinessScore>20&&t.push(n)}return t.sort((r,n)=>n.flakinessScore-r.flakinessScore)}analyzeTestFlakiness(e){let t=e.executions,n=t.filter(g=>g.passed).length/t.length,i=t.map(g=>g.durationMs),s=i.reduce((g,h)=>g+h,0)/i.length,a=i.reduce((g,h)=>g+Math.pow(h-s,2),0)/i.length,l=Math.sqrt(a)/s,u=t.slice(-5).filter(g=>!g.passed).length,d=this.determinePattern(e,l),p=0;n>0&&n<1&&(p+=(1-n)*50),l>.5&&(p+=Math.min(25,l*10)),p+=u*5;let m=this.suggestFix(d);return{testId:e.testId,testName:e.testName,file:e.file,flakinessScore:Math.min(100,Math.round(p)),pattern:d,passRate:n*100,avgDuration:s,durationVariance:l,recentFailures:u,suggestedFix:m}}determinePattern(e,t){let r=e.executions.filter(i=>!i.passed);if(t>1||r.some(i=>i.error?.includes("Timeout")))return"timing";if(r.some(i=>i.error?.includes("Resource")||i.error?.includes("connection")))return"resource";if(r.some(i=>i.error?.includes("Race")||i.error?.includes("async")))return"intermittent";let n=e.executions.map(i=>i.passed);return this.hasOrderPattern(n)?"order-dependent":"intermittent"}hasOrderPattern(e){let t=e.map((i,s)=>i?-1:s).filter(i=>i>=0);if(t.length<2)return!1;let r=t.every(i=>i%2===0),n=t.every(i=>i%2===1);return r||n}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,r){let n=e.filter(c=>c.flakinessScore>=70),i=e.filter(c=>c.flakinessScore>=50&&c.flakinessScore<70),s=e.filter(c=>c.flakinessScore>=20&&c.flakinessScore<50);for(let c of n)t.push({type:"critical-flaky-test",severity:"critical",domain:"test-execution",title:`Critical Flaky Test: ${c.testName}`,description:`Test has ${c.flakinessScore}% flakiness score with ${c.passRate.toFixed(0)}% pass rate`,resource:c.file,context:{testId:c.testId,pattern:c.pattern,recentFailures:c.recentFailures,suggestedFix:c.suggestedFix}});for(let c of i)t.push({type:"high-flaky-test",severity:"high",domain:"test-execution",title:`Flaky Test: ${c.testName}`,description:`Test has ${c.flakinessScore}% flakiness score (${c.pattern} pattern)`,resource:c.file,context:{testId:c.testId,pattern:c.pattern,suggestedFix:c.suggestedFix}});for(let c of s)t.push({type:"medium-flaky-test",severity:"medium",domain:"test-execution",title:`Potentially Flaky Test: ${c.testName}`,description:`Test shows flakiness indicators (score: ${c.flakinessScore}%)`,resource:c.file,context:{testId:c.testId,pattern:c.pattern}});n.length>0&&r.push({priority:"p0",domain:"test-execution",action:"Fix Critical Flaky Tests",description:`${n.length} tests have critical flakiness. These severely impact CI reliability.`,estimatedImpact:"high",effort:"high",autoFixable:!1});let a=e.filter(c=>c.pattern==="timing");a.length>0&&r.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 r=t.length/e,n=t.length>0?t.reduce((a,c)=>a+c.flakinessScore,0)/t.length:0,i=100;i-=r*50,i-=n/100*30;let s=t.filter(a=>a.flakinessScore>=70).length;return i-=s*5,Math.max(0,Math.round(i))}}});var lEe,nh,a7=y(()=>{"use strict";ir();lEe={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},nh=class extends $e{constructor(){super(lEe)}async doExecute(e){let t=Date.now();e.logger.info("Starting security vulnerability scan");let r=[],n=[],i=await this.runSecurityScans(e);this.analyzeDependencyVulnerabilities(i.dependencyVulnerabilities,r,n),this.analyzeCodeSecurityIssues(i.codeSecurityIssues,r,n),i.secretsDetected>0&&this.reportSecretsDetected(i.secretsDetected,r,n),await e.memory.set("security:lastScan",i),await e.memory.set("security:lastScanTime",new Date().toISOString());let s=this.calculateHealthScore(i),a=i.dependencyVulnerabilities.length+i.codeSecurityIssues.length+i.secretsDetected+i.configurationIssues;return e.logger.info("Security scan complete",{healthScore:s,totalIssues:a,criticalIssues:i.dependencyVulnerabilities.filter(c=>c.severity==="critical").length+i.codeSecurityIssues.filter(c=>c.severity==="critical").length}),this.createResult(Date.now()-t,{itemsAnalyzed:a,issuesFound:r.length,healthScore:s,trend:"stable",domainMetrics:{dependencyVulnerabilities:i.dependencyVulnerabilities.length,codeSecurityIssues:i.codeSecurityIssues.length,secretsDetected:i.secretsDetected,configurationIssues:i.configurationIssues,scanDuration:`${i.scanDurationMs}ms`}},r,n)}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,r){let n=e.filter(s=>s.severity==="critical"),i=e.filter(s=>s.severity==="high");for(let s of n)t.push({type:"critical-vulnerability",severity:"critical",domain:"security-compliance",title:`Critical Vulnerability in ${s.package}`,description:`${s.title}: ${s.description}`,resource:s.package,context:{cve:s.cve,currentVersion:s.version,fixedIn:s.fixedIn}});for(let s of i)t.push({type:"high-vulnerability",severity:"high",domain:"security-compliance",title:`High Severity Vulnerability in ${s.package}`,description:`${s.title}: ${s.description}`,resource:s.package,context:{cve:s.cve,currentVersion:s.version,fixedIn:s.fixedIn}});n.length>0&&r.push({priority:"p0",domain:"security-compliance",action:"Update Critical Vulnerabilities Immediately",description:`${n.length} packages have critical vulnerabilities. Update immediately to patched versions.`,estimatedImpact:"high",effort:"low",autoFixable:!0}),i.length>0&&r.push({priority:"p1",domain:"security-compliance",action:"Address High Severity Vulnerabilities",description:`${i.length} packages have high severity vulnerabilities. Plan updates within current sprint.`,estimatedImpact:"high",effort:"low",autoFixable:!0})}analyzeCodeSecurityIssues(e,t,r){let n=new Map;for(let a of e){let c=n.get(a.category)||[];c.push(a),n.set(a.category,c)}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 i=n.get("injection")||[];i.length>0&&r.push({priority:"p0",domain:"security-compliance",action:"Fix Injection Vulnerabilities",description:`${i.length} potential injection vulnerabilities found. Use parameterized queries and avoid eval().`,estimatedImpact:"high",effort:"medium",autoFixable:!1});let s=n.get("crypto")||[];s.length>0&&r.push({priority:"p1",domain:"security-compliance",action:"Review Cryptographic Implementations",description:`${s.length} cryptographic issues found. Ensure using secure algorithms and proper key management.`,estimatedImpact:"high",effort:"high",autoFixable:!1})}reportSecretsDetected(e,t,r){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}}),r.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,r=e.dependencyVulnerabilities.filter(a=>a.severity==="critical").length;t-=r*20;let n=e.dependencyVulnerabilities.filter(a=>a.severity==="high").length;t-=n*10;let i=e.codeSecurityIssues.filter(a=>a.severity==="critical").length;t-=i*15;let s=e.codeSecurityIssues.filter(a=>a.severity==="high").length;return t-=s*8,t-=e.secretsDetected*30,t-=e.configurationIssues*5,Math.max(0,Math.round(t))}}});var uEe,ih,o7=y(()=>{"use strict";ir();uEe={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},ih=class extends $e{constructor(){super(uEe)}async doExecute(e){let t=Date.now();e.logger.info("Starting quality gate evaluation");let r=[],n=[],i=await this.evaluateQualityGates(e);this.analyzeGateResults(i,r,n),this.checkBlockers(i,r,n),await this.compareToHistory(e,i,r),await e.memory.set("quality-gate:current",i),await e.memory.set("quality-gate:lastCheck",new Date().toISOString());let s=await e.memory.get("quality-gate:history")||[];s.push(i),s.length>100&&s.shift(),await e.memory.set("quality-gate:history",s);let a=this.calculateHealthScore(i);return e.logger.info("Quality gate evaluation complete",{healthScore:a,passed:i.passed,releaseReady:i.releaseReady,blockers:i.blockers}),this.createResult(Date.now()-t,{itemsAnalyzed:i.rules.length,issuesFound:i.failedRules,healthScore:a,trend:"stable",domainMetrics:{gatePassed:i.passed?"YES":"NO",releaseReady:i.releaseReady?"YES":"NO",passedRules:i.passedRules,failedRules:i.failedRules,blockers:i.blockers,warnings:i.warnings}},r,n)}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}],r=0,n=0,i=0,s=0;for(let a of t)this.evaluateRule(a)?r++:(n++,a.blocking?i++:s++);return{passed:i===0,passedRules:r,failedRules:n,blockers:i,warnings:s,releaseReady:i===0&&s<=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,r){for(let s of e.rules)if(!this.evaluateRule(s)){let a=s.blocking?"critical":"medium";t.push({type:"quality-gate-failure",severity:a,domain:"quality-assessment",title:`Quality Gate Failed: ${s.name}`,description:`${s.name} is ${s.currentValue}${s.unit}, threshold is ${s.operator==="gte"?">=":s.operator==="lte"?"<=":"="} ${s.threshold}${s.unit}`,context:{ruleId:s.id,category:s.category,currentValue:s.currentValue,threshold:s.threshold,blocking:s.blocking}})}let n=e.rules.filter(s=>s.category==="coverage"&&!this.evaluateRule(s));n.length>0&&r.push({priority:n.some(s=>s.blocking)?"p0":"p2",domain:"quality-assessment",action:"Improve Test Coverage",description:`${n.length} coverage gates are failing. Add tests to increase coverage.`,estimatedImpact:"high",effort:"medium",autoFixable:!0}),e.rules.filter(s=>s.category==="security"&&!this.evaluateRule(s)).length>0&&r.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,r){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(n=>n.blocking&&!this.evaluateRule(n)).map(n=>n.name)}}),r.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,r){let n=await e.memory.get("quality-gate:current");n&&(n.passed&&!t.passed&&r.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:n.blockers,currentBlockers:t.blockers}}),!n.passed&&t.passed&&r.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:n.failedRules,currentFailures:t.failedRules}}))}calculateHealthScore(e){if(e.rules.length===0)return 100;let r=e.passedRules/e.rules.length*70;return r-=e.blockers*15,r-=e.warnings*5,e.releaseReady&&(r+=10),Math.max(0,Math.min(100,Math.round(r)))}}});var c7={};Q(c7,{ensurePatternEmbedding:()=>dEe});async function dEe(o,e,t,r,n,i={}){try{let s=`${t??""} ${r??""} ${(n??[]).join(" ")}`.trim();if(!s)return;let a=await Pt(s,i);if(!a||a.length===0)return;let c=Buffer.from(new Float32Array(a).buffer),l={...Ls,...i};o.prepare(`INSERT OR REPLACE INTO qe_pattern_embeddings (pattern_id, embedding, dimension, model)
|
|
5884
|
+
`),n=await fetch(`${t}/v1/messages`,{method:"POST",headers:{"content-type":"application/json","x-api-key":e,"anthropic-version":"2023-06-01"},body:JSON.stringify({model:rbe,max_tokens:nbe,messages:[{role:"user",content:r}]})});if(!n.ok)return null;let s=(await n.json()).content?.[0]?.text;if(!s)return null;let a=s.match(/\{[\s\S]*\}/);if(!a)return null;try{let c=JSON.parse(a[0]);return typeof c.quality!="number"||typeof c.reasoning!="string"?null:{quality:Math.max(0,Math.min(1,c.quality)),reasoning:c.reasoning.slice(0,200),improvement:typeof c.improvement=="string"?c.improvement.slice(0,200):void 0}}catch{return null}}var rbe,nbe,ibe,fX=y(()=>{"use strict";Y();rbe="claude-haiku-4-5-20251001",nbe=200,ibe=5});var SN={};Q(SN,{handleModelRoute:()=>Bw,handleReasoningBankStats:()=>ube,handleRoutingEconomics:()=>zw,handleRoutingMetrics:()=>Uw,handleTaskCancel:()=>$w,handleTaskList:()=>Nw,handleTaskOrchestrate:()=>qw,handleTaskOutcomeRecord:()=>lbe,handleTaskStatus:()=>Ow,handleTaskStatusWithLearning:()=>dbe,handleTaskSubmit:()=>Fw,subscribeTrajectoryEvents:()=>pbe,unsubscribeTrajectoryEvents:()=>bX});async function Fw(o){if(!ge())return{success:!1,error:"Fleet not initialized. Call fleet_init first."};let{queen:e}=me();try{let t=await e.submitTask({type:o.type,priority:o.priority||"p1",targetDomains:o.targetDomains||[],payload:o.payload||{},timeout:o.timeout||3e5});if(!t.success)return{success:!1,error:t.error.message};let r=e.getTaskStatus(t.value);return{success:!0,data:{taskId:t.value,type:o.type,priority:o.priority||"p1",status:r?.status==="running"?"pending":"queued",assignedDomain:r?.assignedDomain}}}catch(t){return{success:!1,error:`Failed to submit task: ${w(t)}`}}}async function Nw(o){if(!ge())return{success:!1,error:"Fleet not initialized. Call fleet_init first."};let{queen:e}=me();try{let t=e.listTasks({status:o.status,priority:o.priority,domain:o.domain});return{success:!0,data:(typeof o.limit=="number"?t.slice(0,o.limit):t).map(i=>({taskId:i.taskId,type:i.task.type,status:i.status,priority:i.task.priority,assignedDomain:i.assignedDomain,assignedAgents:i.assignedAgents,result:i.result,error:i.error,createdAt:i.task.createdAt.toISOString(),startedAt:i.startedAt?.toISOString(),completedAt:i.completedAt?.toISOString(),duration:i.completedAt&&i.startedAt?i.completedAt.getTime()-i.startedAt.getTime():void 0}))}}catch(t){return{success:!1,error:`Failed to list tasks: ${w(t)}`}}}async function Ow(o){if(!ge())return{success:!1,error:"Fleet not initialized. Call fleet_init first."};let{queen:e}=me();try{let t=e.getTaskStatus(o.taskId);return t?{success:!0,data:{taskId:t.taskId,type:t.task.type,status:t.status,priority:t.task.priority,assignedDomain:t.assignedDomain,assignedAgents:t.assignedAgents,result:o.detailed?t.result:void 0,error:t.error,createdAt:t.task.createdAt.toISOString(),startedAt:t.startedAt?.toISOString(),completedAt:t.completedAt?.toISOString(),duration:t.completedAt&&t.startedAt?t.completedAt.getTime()-t.startedAt.getTime():void 0}}:{success:!1,error:`Task not found: ${o.taskId}`}}catch(t){return{success:!1,error:`Failed to get task status: ${w(t)}`}}}async function $w(o){if(!ge())return{success:!1,error:"Fleet not initialized. Call fleet_init first."};let{queen:e}=me();try{let t=await e.cancelTask(o.taskId);return t.success?{success:!0,data:{taskId:o.taskId,cancelled:!0}}:{success:!1,error:t.error.message}}catch(t){return{success:!1,error:`Failed to cancel task: ${w(t)}`}}}async function qw(o){if(!ge())return{success:!1,error:"Fleet not initialized. Call fleet_init first."};let{queen:e,workflowOrchestrator:t}=me();try{let r=o.context?.project||vX(o.task),n=o.priority==="critical"||/\b(security|vulnerability|cve|owasp|critical|production|exploit)\b/i.test(o.task),s=await(await ms()).routeTask({task:o.task,codeContext:o.codeContext,filePaths:o.filePaths,manualTier:o.manualTier,isCritical:n,agentType:`qe-${r}`,domain:r,metadata:{inferredDomain:r,hasCodeContext:!!o.codeContext,fileCount:o.filePaths?.length}}),a=await yn(),c=await a.getExperienceGuidance(o.task,o.context?.project),l=await a.searchPatterns(o.task,{limit:5,domain:o.context?.project??r}).catch(()=>[]),u=obe(o.task),d=cbe(o.priority||"medium"),p=abe[u];if(p&&t){console.log(`[TaskOrchestrate] Task type '${u}' has workflow '${p}' - executing workflow`);let v=o.task.match(/https?:\/\/[^\s]+/i),b=v?v[0]:void 0;b&&console.log(`[TaskOrchestrate] Detected URL for analysis: ${b}`);let C={targetId:o.context?.project||b||`task-${Date.now()}`,targetType:b?"website":"epic",description:o.task,acceptanceCriteria:o.context?.requirements||[],url:b,routing:{tier:s.decision.tier,modelId:s.modelId,executionStrategy:s.executionStrategy,complexity:s.decision.complexityAnalysis.overall},patternHints:l.length>0?l.map(A=>({patternId:A.id,name:A.name,description:A.description,confidence:A.confidence,similarity:A.qualityScore,canReuse:A.tier==="long-term"})):void 0},R=await t.executeWorkflow(p,C);return R.success?{success:!0,data:{taskId:R.value,type:u,priority:d,strategy:o.strategy||"adaptive",status:"workflow-started",message:`Workflow '${p}' started for task: ${o.task}`,routing:{tier:s.decision.tier,tierName:s.tierInfo.name,modelId:s.modelId,executionStrategy:s.executionStrategy,complexity:s.decision.complexityAnalysis.overall,confidence:s.decision.confidence,useAgentBooster:s.useAgentBooster,rationale:s.decision.rationale,decisionTimeMs:s.decision.metadata.decisionTimeMs}}}:{success:!1,error:`Workflow execution failed: ${R.error.message}`}}let m={description:o.task,strategy:o.strategy||"adaptive",maxAgents:o.maxAgents,context:o.context};u==="generate-tests"&&(m.sourceFiles=o.filePaths||[],m.sourceCode=o.codeContext||"",m.language=m.language||"typescript",m.testType=m.testType||"unit");let g=await e.submitTask({type:u,priority:d,targetDomains:[],payload:{...m,routing:{tier:s.decision.tier,modelId:s.modelId,executionStrategy:s.executionStrategy,useAgentBooster:s.useAgentBooster,agentBoosterTransform:s.decision.agentBoosterTransform,complexity:s.decision.complexityAnalysis.overall,confidence:s.decision.confidence},experienceGuidance:c?{strategy:c.recommendedStrategy,actions:c.suggestedActions,confidence:c.confidence,tokenSavings:c.estimatedTokenSavings}:void 0,patternHints:l.length>0?l.map(v=>({patternId:v.id,name:v.name,description:v.description,confidence:v.confidence,similarity:v.qualityScore,canReuse:v.tier==="long-term"})):void 0},timeout:6e5});if(!g.success)return{success:!1,error:g.error.message};let h=g.value;return await bN(h,o.task,{agent:"queen-coordinator",domain:o.context?.project}),process.env.AQE_TRAJECTORY_JUDGE==="1"&&process.env.ANTHROPIC_API_KEY&&hX().catch(v=>{console.warn("[TrajectoryJudge] failed:",v instanceof Error?v.message:v)}),{success:!0,data:{taskId:h,type:u,priority:d,strategy:o.strategy||"adaptive",status:"submitted",message:`Task orchestrated: ${o.task}${c?" (with experience guidance)":""}`,routing:{tier:s.decision.tier,tierName:s.tierInfo.name,modelId:s.modelId,executionStrategy:s.executionStrategy,complexity:s.decision.complexityAnalysis.overall,confidence:s.decision.confidence,useAgentBooster:s.useAgentBooster,rationale:s.decision.rationale,decisionTimeMs:s.decision.metadata.decisionTimeMs}}}}catch(r){return{success:!1,error:`Failed to orchestrate task: ${w(r)}`}}}async function Bw(o){try{let e=await ms(),t=o.domain||vX(o.task),r=o.isCritical??/\b(security|vulnerability|cve|owasp|critical|production|exploit)\b/i.test(o.task),n=await e.routeTask({task:o.task,codeContext:o.codeContext,filePaths:o.filePaths,manualTier:o.manualTier,isCritical:r,agentType:o.agentType||`qe-${t}`,domain:t,metadata:{inferredDomain:t,hasCodeContext:!!o.codeContext,fileCount:o.filePaths?.length}});return{success:!0,data:{tier:n.decision.tier,tierName:n.tierInfo.name,modelId:n.modelId,executionStrategy:n.executionStrategy,useAgentBooster:n.useAgentBooster,agentBoosterTransform:n.decision.agentBoosterTransform,complexity:{overall:n.decision.complexityAnalysis.overall,code:n.decision.complexityAnalysis.codeComplexity,reasoning:n.decision.complexityAnalysis.reasoningComplexity,scope:n.decision.complexityAnalysis.scopeComplexity},confidence:n.decision.confidence,rationale:n.decision.rationale,warnings:n.decision.warnings,budget:{allowed:n.decision.budgetDecision.allowed,wasDowngraded:n.decision.budgetDecision.wasDowngraded,estimatedCostUsd:n.decision.budgetDecision.estimatedCostUsd},decisionTimeMs:n.decision.metadata.decisionTimeMs}}}catch(e){return{success:!1,error:`Failed to route task: ${w(e)}`}}}async function Uw(o){try{let e=await ms(),t=e.getRoutingStats(),r=e.getMetrics(),n={stats:t,modelRouterMetrics:{totalDecisions:r.totalDecisions,avgDecisionTimeMs:r.avgDecisionTimeMs,agentBoosterStats:r.agentBoosterStats,budgetStats:r.budgetStats}};return o.includeLog&&(n.log=e.getRoutingLog(o.logLimit||100)),{success:!0,data:n}}catch(e){return{success:!1,error:`Failed to get routing metrics: ${w(e)}`}}}async function zw(o){try{let{createRoutingFeedbackCollector:e}=await Promise.resolve().then(()=>(oF(),CK)),{getGlobalCostTracker:t}=await Promise.resolve().then(()=>(iF(),bK)),r=e(100);await r.initialize(),r.enableEconomicRouting({...o.taskComplexity!=null?{}:{}},t());let n=r.getEconomicReport();return n?{success:!0,data:{tierEfficiency:n.tierEfficiency.map(s=>({...s,qualityPerDollar:isFinite(s.qualityPerDollar)?s.qualityPerDollar:"Infinity"})),currentHourlyCostUsd:n.currentHourlyCostUsd,currentDailyCostUsd:n.currentDailyCostUsd,budgetRemaining:n.budgetRemaining,recommendation:n.recommendation,savingsOpportunity:n.savingsOpportunity}}:{success:!1,error:"Economic routing is not available"}}catch(e){return{success:!1,error:`Failed to get economic routing report: ${w(e)}`}}}function vX(o){let e=o.toLowerCase();return/\b(security|vulnerabilit|cve|owasp|secret|credential|injection|xss|csrf)\b/.test(e)?"security-compliance":/\b(chaos|resilience|fault.?inject|disaster|failover)\b/.test(e)?"chaos-resilience":/\b(defect|bug.?predict|risk.?assess|mutation)\b/.test(e)?"defect-intelligence":/\b(coverage|uncovered|gap.?analy)\b/.test(e)?"coverage-analysis":/\b(quality|code.?review|maintain|tech.?debt)\b/.test(e)?"quality-assessment":/\b(contract|api.?compat|breaking.?change|pact)\b/.test(e)?"contract-testing":/\b(index|knowledge.?graph|semantic|code.?intel)\b/.test(e)?"code-intelligence":/\b(accessib|a11y|wcag|screen.?read)\b/.test(e)?"visual-accessibility":/\b(requirement|bdd|acceptance|user.?stor)\b/.test(e)?"requirements-validation":/\b(generat.*test|test.*generat|write.*test|create.*test)\b/.test(e)?"test-generation":/\b(run.*test|execut.*test)\b/.test(e)?"test-execution":"test-generation"}function obe(o){let e=o.toLowerCase();return/run\s+(?:\w+\s+)*tests?/.test(e)||/execute\s+(?:\w+\s+)*tests?/.test(e)||e.includes("run tests")||e.includes("execute tests")?"execute-tests":e.includes("generate test")||e.includes("create test")||e.includes("write test")?"generate-tests":e.includes("coverage")||e.includes("uncovered")?"analyze-coverage":e.includes("quality")||e.includes("code quality")?"assess-quality":e.includes("defect")||e.includes("bug")||e.includes("predict")?"predict-defects":e.includes("requirement")||e.includes("bdd")||e.includes("acceptance")?"validate-requirements":e.includes("index")||e.includes("knowledge graph")||e.includes("semantic")?"index-code":e.includes("security")||e.includes("vulnerability")||e.includes("owasp")?"scan-security":e.includes("contract")||e.includes("api contract")||e.includes("pact")?"validate-contracts":e.includes("accessibility")||e.includes("a11y")||e.includes("wcag")?"test-accessibility":e.includes("chaos")||e.includes("resilience")||e.includes("fault")?"run-chaos":e.includes("learn")||e.includes("optimize")||e.includes("improve")?"optimize-learning":e.includes("ideation")||e.includes("quality criteria")||e.includes("htsm")||e.includes("qcsd")||e.includes("testability")||e.includes("pi planning")||e.includes("sprint planning")?"ideation-assessment":"generate-tests"}function cbe(o){switch(o){case"critical":return"p0";case"high":return"p1";case"medium":return"p2";case"low":return"p3";default:return"p1"}}async function lbe(o){try{let e=await yn(),t={taskId:o.taskId,task:o.task,taskType:o.taskType,success:o.success,executionTimeMs:o.executionTimeMs,agentId:o.agentId,domain:o.domain,modelTier:o.modelTier,qualityScore:o.qualityScore,error:o.error,metrics:o.metrics};await e.recordTaskOutcome(t);let r=o.success&&(o.qualityScore||.5)>=.6;return{success:!0,data:{recorded:!0,patternStored:r,message:r?`Outcome recorded and pattern stored for task ${o.taskId}`:`Outcome recorded for task ${o.taskId}`}}}catch(e){return{success:!1,error:`Failed to record task outcome: ${w(e)}`}}}async function ube(){try{let e=await(await yn()).getStats();return{success:!0,data:{service:e.service,patterns:{totalPatterns:e.reasoningBank.totalPatterns,byDomain:e.reasoningBank.byDomain,byTier:e.reasoningBank.byTier,learningOutcomes:e.reasoningBank.learningOutcomes,patternSuccessRate:e.reasoningBank.patternSuccessRate},embeddings:{cacheSize:e.reasoningBank.embeddingCacheSize,dimension:e.reasoningBank.embeddingDimension,transformerAvailable:e.reasoningBank.transformerAvailable},performance:{avgRoutingLatencyMs:e.reasoningBank.avgRoutingLatencyMs,p95RoutingLatencyMs:e.reasoningBank.p95RoutingLatencyMs}}}}catch(o){return{success:!1,error:`Failed to get ReasoningBank stats: ${w(o)}`}}}async function dbe(o){if(!ge())return{success:!1,error:"Fleet not initialized. Call fleet_init first."};let{queen:e}=me();try{let t=e.getTaskStatus(o.taskId);if(!t)return{success:!1,error:`Task not found: ${o.taskId}`};let r={taskId:t.taskId,type:t.task.type,status:t.status,priority:t.task.priority,assignedDomain:t.assignedDomain,assignedAgents:t.assignedAgents,result:o.detailed?t.result:void 0,error:t.error,createdAt:t.task.createdAt.toISOString(),startedAt:t.startedAt?.toISOString(),completedAt:t.completedAt?.toISOString(),duration:t.completedAt&&t.startedAt?t.completedAt.getTime()-t.startedAt.getTime():void 0};if((t.status==="completed"||t.status==="failed")&&!yX.has(o.taskId)){yX.add(o.taskId);try{let n=await yn(),i=r.duration||0,s=t.status==="completed",a=t.task.payload||{},c=typeof a.description=="string"?a.description:t.task.type,l=a.routing,u=await _g(o.taskId,s,t.error),d=u?.metrics.averageQuality??(s?.7:.3);await n.recordTaskOutcome({taskId:o.taskId,task:c,taskType:t.task.type,success:s,executionTimeMs:i,agentId:t.assignedAgents?.[0],domain:t.assignedDomain,modelTier:l?.tier,qualityScore:d,error:t.error,metrics:{testsGenerated:typeof t.result=="object"&&t.result?t.result.testsGenerated:void 0,testsPassed:typeof t.result=="object"&&t.result?t.result.testsPassed:void 0}}),console.error(`[TaskHandler] Recorded learning outcome: task=${o.taskId} success=${s} quality=${d.toFixed(2)} trajectorySteps=${u?.steps.length??0}`)}catch(n){console.error("[TaskHandler] Failed to record outcome:",n)}}return{success:!0,data:r}}catch(t){return{success:!1,error:`Failed to get task status: ${w(t)}`}}}function pbe(o){bX(o);let e=o.subscribeToEventType("TaskCompleted",async r=>{let{taskId:n}=r.payload;n&&await _g(n,!0).catch(()=>{})}),t=o.subscribeToEventType("TaskFailed",async r=>{let{taskId:n,error:i}=r.payload;n&&await _g(n,!1,i).catch(()=>{})});TN=[e,t]}function bX(o){for(let e of TN)o.unsubscribe(e);TN=[]}var abe,yX,TN,Vw=y(()=>{"use strict";hs();kS();CN();fX();k();abe={"ideation-assessment":"qcsd-ideation-swarm"};yX=new Set;TN=[]});var TX={};Q(TX,{DEFAULT_STRUCTURAL_HEALTH_CONFIG:()=>CX,StructuralHealthMonitor:()=>Gw,createStructuralHealthMonitor:()=>mbe});function mbe(o){return new Gw(o)}var CX,Gw,SX=y(()=>{"use strict";RL();CX={healthyThreshold:.4,warningThreshold:.2,maxHistoryEntries:100,enableLogging:!1},Gw=class{config;minCutService;history=[];constructor(e){this.config={...CX,...e},this.minCutService=vS()}computeFleetHealth(e){if(e.length===0)return this.emptyFleetResult();let t=this.minCutService.buildTaskGraphFromTopology(e);return this.computeFleetHealthFromGraph(t,e.length)}computeFleetHealthFromGraph(e,t){if(e.nodes.length===0)return this.emptyFleetResult();let r=this.minCutService.getStructuralHealth(e),n=this.determineStatus(r.normalizedLambda),i={lambda:r.lambda,healthy:r.healthy,weakPoints:r.weakPoints,normalizedLambda:r.normalizedLambda,riskScore:r.riskScore,status:n,suggestions:r.suggestions,measuredAt:new Date};return this.addHistoryEntry({lambda:r.lambda,healthy:r.healthy,weakPointCount:r.weakPoints.length,agentCount:t??e.nodes.length,timestamp:i.measuredAt}),this.config.enableLogging&&this.logHealth(i),i}getTrend(){if(this.history.length<2)return"stable";let e=Math.min(5,this.history.length),t=this.history.slice(-e),r=t[0].lambda,i=t[t.length-1].lambda-r;return Math.abs(i)<.05?"stable":i>0?"improving":"degrading"}getHistory(e){let t=[...this.history];return e!==void 0&&e<t.length?t.slice(-e):t}clearHistory(){this.history.length=0}getMinCutService(){return this.minCutService}determineStatus(e){return e>=this.config.healthyThreshold?"healthy":e>=this.config.warningThreshold?"warning":"critical"}addHistoryEntry(e){this.history.push(e),this.history.length>this.config.maxHistoryEntries&&this.history.splice(0,this.history.length-this.config.maxHistoryEntries)}emptyFleetResult(){return{lambda:0,healthy:!1,weakPoints:[],normalizedLambda:0,riskScore:1,status:"empty",suggestions:["No agents in fleet. Spawn agents to build a topology."],measuredAt:new Date}}logHealth(e){console.error(`[StructuralHealth] Status: ${e.status} | Lambda: ${e.normalizedLambda.toFixed(3)} | Weak points: ${e.weakPoints.length} | Risk: ${(e.riskScore*100).toFixed(0)}%`)}}});function me(){return z}function ge(){return z.initialized&&z.kernel!==null&&z.queen!==null}function EX(o,e){if(z.topology!=="hierarchical"){let i={agentId:o,domain:e,level:"worker",spawnedAt:new Date};return z.agentLevels.set(o,i),"worker"}let r=Array.from(z.agentLevels.values()).find(i=>i.domain===e&&i.level==="lead")?"worker":"lead",n={agentId:o,domain:e,level:r,spawnedAt:new Date};return z.agentLevels.set(o,n),r}function RX(o){return z.agentLevels.get(o)}async function Lg(o){try{if(z.initialized&&z.kernel&&z.queen)return{success:!0,data:{fleetId:z.fleetId,topology:o.topology||"hierarchical",maxAgents:o.maxAgents||15,enabledDomains:o.enabledDomains||wX,status:"ready"}};z.fleetId=`fleet-${E().slice(0,8)}`;let e=o.enabledDomains||[...Z],t=e.filter(c=>c!=="coordination");z.kernel=new pT({maxConcurrentAgents:o.maxAgents||15,memoryBackend:o.memoryBackend||"hybrid",hnswEnabled:!0,lazyLoading:o.lazyLoading!==!1,enabledDomains:e}),await z.kernel.initialize(),z.router=new XT(z.kernel.eventBus),await z.router.initialize();let r=c=>z.kernel.getDomainAPI(c),n=new _w(z.kernel.eventBus,z.kernel.memory,r),i=z.kernel.plugins;await i.loadAll();let s=new Map;for(let c of i.getLoaded()){let l=i.getPlugin(c);l&&s.set(c,l)}z.queen=V5(z.kernel,z.router,n,void 0,s),await z.queen.initialize(),z.workflowOrchestrator=new bm(z.kernel.eventBus,z.kernel.memory,z.kernel.coordinator),await z.workflowOrchestrator.initialize(),gbe(z.kernel,z.workflowOrchestrator);let{subscribeTrajectoryEvents:a}=await Promise.resolve().then(()=>(Vw(),SN));return a(z.router),z.initialized=!0,z.initTime=new Date,z.topology=o.topology||"hierarchical",z.agentLevels.clear(),{success:!0,data:{fleetId:z.fleetId,topology:z.topology,maxAgents:o.maxAgents||15,enabledDomains:t,status:"initialized"}}}catch(e){return{success:!1,error:`Failed to initialize fleet: ${w(e)}`}}}async function wN(o){if(!ge())return{success:!1,error:"Fleet not initialized. Call fleet_init first."};try{let e=z.queen.getHealth(),t=z.queen.getMetrics(),r={status:e.status,uptime:t.uptime,agents:{total:e.totalAgents,active:e.activeAgents,idle:e.totalAgents-e.activeAgents},tasks:{pending:e.pendingTasks,running:e.runningTasks,completed:t.tasksCompleted,failed:t.tasksFailed}};if(o.includeDomains){let i=[];for(let[s,a]of e.domainHealth)i.push({domain:s,status:a.status,agents:a.agents.total,load:z.queen.getDomainLoad(s)});r.domains=i}let n=z.queen.getDomainTeamManager?.();if(n){let i=n.listDomainTeams(),s=0,a=0;for(let c of i)s+=1+c.teammateIds.length,n.getTeamHealth(c.domain)?.healthy&&a++;r.teams={active:i.length,totalAgentsInTeams:s,healthyCount:a}}o.includeMetrics&&(r.metrics={tasksReceived:t.tasksReceived,tasksCompleted:t.tasksCompleted,tasksFailed:t.tasksFailed,agentUtilization:t.agentUtilization,averageTaskDuration:t.averageTaskDuration});try{let{getUnifiedMemory:i}=await Promise.resolve().then(()=>(Y(),Cr)),s=i();if(s.isInitialized()){let a=l=>{try{return s.queryCount(l)}catch{return 0}},c=await s.vectorCount();r.learning={totalPatterns:a("qe_patterns"),totalExperiences:a("captured_experiences"),totalTrajectories:a("qe_trajectories"),vectorCount:c,experienceApplications:a("experience_applications"),dreamCycles:a("dream_cycles"),embeddingDimension:384}}}catch{}return{success:!0,data:r}}catch(e){return{success:!1,error:`Failed to get fleet status: ${w(e)}`}}}async function EN(o){if(!ge())return{success:!1,error:"Fleet not initialized. Call fleet_init first."};try{if(o.domain){let r=z.queen.getDomainHealth(o.domain);return r?{success:!0,data:{domain:o.domain,status:r.status,agents:r.agents,errors:r.errors,lastActivity:r.lastActivity?.toISOString()}}:{success:!1,error:`Domain not found: ${o.domain}`}}let e=z.queen.getHealth(),t={status:e.status,totalAgents:e.totalAgents,activeAgents:e.activeAgents,pendingTasks:e.pendingTasks,runningTasks:e.runningTasks,workStealingActive:e.workStealingActive,lastHealthCheck:e.lastHealthCheck.toISOString()};if(o.detailed){let r={};for(let[n,i]of e.domainHealth)r[n]={status:i.status,agents:i.agents,errors:i.errors.length,lastActivity:i.lastActivity?.toISOString()};t.domains=r,t.issues=e.issues.map(n=>({severity:n.severity,message:n.message,domain:n.domain,timestamp:n.timestamp.toISOString()}))}try{let{StructuralHealthMonitor:r}=await Promise.resolve().then(()=>(SX(),TX)),n=new r,i=[];for(let[c]of e.domainHealth){let l=z.queen.getAgentsByDomain(c);for(let u of l)i.push({id:u.id,name:u.name,domain:u.domain})}let s=i.map(c=>({id:c.id,name:c.name,domain:c.domain,capabilities:[c.domain],dependsOn:[],weight:1})),a=n.computeFleetHealth(s);t.structuralHealth={lambda:a.lambda,healthy:a.healthy,normalizedLambda:a.normalizedLambda,riskScore:a.riskScore,status:a.status,weakPoints:a.weakPoints,suggestions:a.suggestions}}catch{}return{success:!0,data:t}}catch(e){return{success:!1,error:`Failed to get fleet health: ${w(e)}`}}}async function RN(){if(nK(),BS(),dX(),z.workflowOrchestrator&&(await z.workflowOrchestrator.dispose(),z.workflowOrchestrator=null),z.queen&&(await z.queen.dispose(),z.queen=null),z.router){try{let{unsubscribeTrajectoryEvents:o}=await Promise.resolve().then(()=>(Vw(),SN));o(z.router)}catch{}await z.router.dispose(),z.router=null}z.kernel&&(await z.kernel.dispose(),z.kernel=null),z.initialized=!1,z.fleetId=null,z.initTime=null,z.topology="hierarchical",z.agentLevels.clear()}async function AN(){let o=performance.now();try{let e=ge(),t=z.initTime?Date.now()-z.initTime.getTime():0,r={connected:!1,totalEntries:0,namespaces:0},n={enabled:!1,vectorCount:0},i=0;if(e&&z.kernel){let u=z.kernel.memory;try{r.connected=!0;let d=await u.count("default"),p=await u.count("learning"),m=await u.count("patterns");r.totalEntries=d+p+m;let g=0;for(let h of["default","learning","patterns","mcp-tools","coordination"])await u.count(h)>0&&g++;r.namespaces=g}catch{}try{let d=process.env.AQE_V3_HNSW_ENABLED==="true";n.enabled=d;let p=u;d&&typeof p.vectorCount=="function"&&(n.vectorCount=await p.vectorCount())}catch{}try{i=(await u.search("pattern:*",1e3)).length}catch{}}let s=e&&z.kernel?(z.kernel.getLoadedDomains?.()??wX).length:0,a=null;try{let{getSharedRvfDualWriterSync:u}=await Promise.resolve().then(()=>(rs(),ya)),d=u();if(d){let p=d.status(),m=d.getDivergenceReport();a={mode:p.mode,vectorCount:p.rvf?.totalVectors??0,divergences:m.divergences,promotionSafe:d.isPromotionSafe()}}}catch{}let c=null;try{let{SQLitePatternStore:u}=await Promise.resolve().then(()=>(Rc(),VM)),d=new u;await d.initialize(),c=d.getGhostPatternCount(),d.close()}catch{}return{success:!0,data:{status:e?"healthy":"unhealthy",version:"3.9.24",loadedDomains:s,memory:r,hnsw:n,rvf:a??void 0,ghostPatterns:c??void 0,loadedPatterns:i,uptimeMs:t,timestamp:new Date().toISOString()},metadata:{executionTime:performance.now()-o,timestamp:new Date().toISOString(),requestId:E(),toolName:"aqe_health"}}}catch(e){return{success:!1,error:w(e),metadata:{executionTime:performance.now()-o,timestamp:new Date().toISOString(),requestId:E(),toolName:"aqe_health"}}}}function gbe(o,e){let t=o.getDomainAPI("requirements-validation");t?.registerWorkflowActions&&(t.registerWorkflowActions(e),console.log("[Fleet] Registered requirements-validation workflow actions (includes QCSD Ideation)"));let r=o.getDomainAPI("visual-accessibility");r?.registerWorkflowActions&&(r.registerWorkflowActions(e),console.log("[Fleet] Registered visual-accessibility workflow actions"))}var wX,z,hs=y(()=>{"use strict";N();C3();L();G5();wD();H5();HL();US();vN();pX();k();wX=Z.filter(o=>o!=="coordination"),z={fleetId:null,kernel:null,queen:null,router:null,workflowOrchestrator:null,initialized:!1,initTime:null,topology:"hierarchical",agentLevels:new Map}});import{randomUUID as Zbe}from"crypto";var $e,ir=y(()=>{"use strict";k();$e=class{constructor(e){this.config=e}config;_status="idle";_lastResult;_lastRunAt;_nextRunAt;_totalExecutions=0;_successfulExecutions=0;_failedExecutions=0;_executionDurations=[];_recentResults=[];get status(){return this._status}get lastResult(){return this._lastResult}get lastRunAt(){return this._lastRunAt}get nextRunAt(){return this._nextRunAt}async initialize(){this._status="idle",this._nextRunAt=new Date(Date.now()+this.config.intervalMs)}async execute(e){let t=Date.now();this._status="running",this._lastRunAt=new Date,this._totalExecutions++;let r,n;for(let s=0;s<=this.config.retryCount;s++)try{if(e.signal.aborted)throw new Error("Worker execution aborted");n=await this.executeWithTimeout(()=>this.doExecute(e),this.config.timeoutMs,e.signal);break}catch(a){r=S(a),e.logger.warn(`Worker ${this.config.id} attempt ${s+1} failed: ${r.message}`),s<this.config.retryCount&&await this.delay(this.config.retryDelayMs)}let i=Date.now()-t;return n?(this._successfulExecutions++,this._lastResult=n):(this._failedExecutions++,n=this.createErrorResult(r,i),this._lastResult=n),this._executionDurations.push(i),this._executionDurations.length>100&&this._executionDurations.shift(),this._recentResults.push({timestamp:new Date,success:n.success,durationMs:i}),this._recentResults.length>5&&this._recentResults.shift(),this._nextRunAt=new Date(Date.now()+this.config.intervalMs),this._status=n.success?"idle":"error",await e.eventBus.publish({type:"worker.executed",workerId:this.config.id,timestamp:new Date,payload:{success:n.success,durationMs:i,findingsCount:n.findings.length,healthScore:n.metrics.healthScore}}),n}pause(){this._status!=="stopped"&&(this._status="paused")}resume(){this._status==="paused"&&(this._status="idle")}async stop(){this._status="stopped"}getHealth(){let e=this._executionDurations.length>0?this._executionDurations.reduce((r,n)=>r+n,0)/this._executionDurations.length:0,t=this._totalExecutions>0?this._successfulExecutions/this._totalExecutions:1;return{status:this._status,healthScore:Math.round(t*100),totalExecutions:this._totalExecutions,successfulExecutions:this._successfulExecutions,failedExecutions:this._failedExecutions,avgDurationMs:Math.round(e),recentResults:[...this._recentResults]}}async executeWithTimeout(e,t,r){return new Promise((n,i)=>{let s=setTimeout(()=>{i(new Error(`Worker execution timed out after ${t}ms`))},t),a=()=>{clearTimeout(s),i(new Error("Worker execution aborted"))};r.addEventListener("abort",a,{once:!0}),e().then(c=>{clearTimeout(s),r.removeEventListener("abort",a),n(c)}).catch(c=>{clearTimeout(s),r.removeEventListener("abort",a),i(c)})})}createErrorResult(e,t){return{workerId:this.config.id,timestamp:new Date,durationMs:t,success:!1,error:e.message,metrics:{itemsAnalyzed:0,issuesFound:0,healthScore:0,trend:"degrading",domainMetrics:{}},findings:[],recommendations:[]}}createResult(e,t,r,n){return{workerId:this.config.id,timestamp:new Date,durationMs:e,success:!0,metrics:t,findings:r,recommendations:n}}delay(e){return new Promise(t=>setTimeout(t,e))}generateId(){return`${Date.now()}-${Zbe().slice(0,9)}`}}});var eCe,Pl,dO=y(()=>{"use strict";ir();yw();Y();jF();k();eCe={id:"heartbeat-scheduler",name:"Heartbeat Scheduler",description:"Token-free maintenance: pattern promotion, stale detection, experience buffer monitoring",intervalMs:1800*1e3,priority:"normal",targetDomains:["learning-optimization"],enabled:!0,timeoutMs:6e4,retryCount:1,retryDelayMs:5e3},Pl=class extends $e{lifecycleManager=null;dailyLogger;lastRunTimestamp=0;constructor(){super(eCe),this.dailyLogger=new gg}async getLifecycleManager(){if(this.lifecycleManager)return this.lifecycleManager;try{let e=W();await e.initialize();let t=e.getDatabase();return this.lifecycleManager=mg(t,{promotionRewardThreshold:.7,promotionMinOccurrences:2,promotionMinSuccessRate:.7,deprecationFailureThreshold:3,staleDaysThreshold:30,confidenceDecayRate:.01,minActiveConfidence:.3}),this.lifecycleManager}catch{return null}}getPendingExperienceCount(){try{return W().getDatabase().prepare("SELECT COUNT(*) as pending FROM qe_pattern_usage WHERE created_at > datetime('now', '-1 day')").get()?.pending??0}catch{return 0}}async doExecute(e){let t=Date.now();e.logger.info("Heartbeat scheduler running (token-free maintenance)");let r=[],n=[],i=await this.getLifecycleManager();if(!i)return e.logger.warn("Unified memory unavailable \u2014 returning zero-metric heartbeat"),this.createResult(Date.now()-t,{itemsAnalyzed:0,issuesFound:0,healthScore:50,trend:"stable",domainMetrics:{promoted:0,deprecated:0,decayed:0,stalePatterns:0,pendingExperiences:0,avgConfidence:0,avgSuccessRate:0}},[],[]);let s=0,a=0;try{let b=i.promoteEligiblePatterns();s=b.promoted,a=b.checked,s>0&&r.push({type:"heartbeat-promotion",severity:"info",domain:"learning-optimization",title:"Patterns Promoted",description:`${s} of ${a} short-term patterns promoted to long-term`})}catch(b){e.logger.warn("Pattern promotion failed",{error:w(b)})}let c=0,l=0;try{let b=i.deprecateStalePatterns();c=b.deprecated,l=b.checked,c>0&&r.push({type:"heartbeat-deprecation",severity:"low",domain:"learning-optimization",title:"Stale Patterns Deprecated",description:`${c} of ${l} patterns deprecated (stale, failed, or low confidence)`})}catch(b){e.logger.warn("Stale pattern detection failed",{error:w(b)})}let u=0;try{let b=this.lastRunTimestamp>0?(Date.now()-this.lastRunTimestamp)/864e5:1;u=i.applyConfidenceDecay(Math.min(b,7)).decayed}catch(b){e.logger.warn("Confidence decay failed",{error:w(b)})}let d=this.getPendingExperienceCount(),p={totalPatterns:0,activePatterns:0,deprecatedPatterns:0,promotedPatterns:0,shortTermPatterns:0,longTermPatterns:0,avgConfidence:0,avgSuccessRate:0,patternsNearDeprecation:0};try{p=i.getStats()}catch(b){e.logger.warn("Stats retrieval failed",{error:w(b)})}try{this.dailyLogger.log({timestamp:new Date,type:"pattern-promoted",summary:`Heartbeat: ${s} promoted, ${c} deprecated, ${u} decayed, ${d} pending exp, ${p.activePatterns} active patterns (avg conf: ${p.avgConfidence.toFixed(2)})`,details:{promoted:s,deprecated:c,decayed:u,pendingExperiences:d,totalPatterns:p.totalPatterns,activePatterns:p.activePatterns,avgConfidence:p.avgConfidence,avgSuccessRate:p.avgSuccessRate}}),this.dailyLogger.flush()}catch(b){e.logger.warn("Daily log write failed",{error:w(b)})}this.lastRunTimestamp=Date.now(),p.activePatterns>0&&p.patternsNearDeprecation/p.activePatterns>.5&&n.push({priority:"p2",domain:"learning-optimization",action:"Review At-Risk Patterns",description:`${p.patternsNearDeprecation} of ${p.activePatterns} active patterns are near deprecation. Manual review recommended.`,estimatedImpact:"medium",effort:"low",autoFixable:!1});let m=this.calculateHealthScore(p,s,c),g=this.determineTrend(s,c,p.activePatterns),h=Math.max(a,l),v=s+c+p.patternsNearDeprecation;return e.logger.info("Heartbeat complete",{promoted:s,deprecated:c,decayed:u,pendingExperiences:d,healthScore:m}),this.createResult(Date.now()-t,{itemsAnalyzed:h,issuesFound:v,healthScore:m,trend:g,domainMetrics:{promoted:s,deprecated:c,decayed:u,stalePatterns:p.patternsNearDeprecation,pendingExperiences:d,avgConfidence:Number(p.avgConfidence.toFixed(3)),avgSuccessRate:Number(p.avgSuccessRate.toFixed(3))}},r,n)}calculateHealthScore(e,t,r){let n=70;if(n+=Math.min(15,t*5),e.avgConfidence>0&&(n+=Math.round((e.avgConfidence-.5)*30)),e.activePatterns>0){let i=r/e.activePatterns;n-=Math.round(i*20)}return e.activePatterns>0&&e.patternsNearDeprecation/e.activePatterns>.5&&(n-=10),Math.max(0,Math.min(100,Math.round(n)))}determineTrend(e,t,r){return r===0?"stable":e>t?"improving":t>e&&t/r>.1?"degrading":"stable"}}});var M1,D1,_1,WE,jE,QE,r7=y(()=>{"use strict";M1=class{handlers=[];async publish(e){for(let t of this.handlers)try{t(e)}catch(r){console.debug("[WorkerManager] Event handler error:",r instanceof Error?r.message:r)}}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}},D1=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,"\\$&"),r=new RegExp(t.replace(/\*/g,".*"));return Array.from(this.store.keys()).filter(n=>r.test(n))}clear(){this.store.clear()}get size(){return this.store.size}},_1=class{constructor(e){this.workerId=e}workerId;format(e,t,r){let n=new Date().toISOString(),i=r?` ${JSON.stringify(r)}`:"";return`[${n}] [${e}] [${this.workerId}] ${t}${i}`}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))}},WE=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 n=t.getHealth().domains[e];return n?{status:n.status,errors:n.errors||[]}:{status:"unknown",errors:[`Domain ${e} not found`]}}},jE=class{getDomainAPI(e){}getDomainHealth(e){return{status:"healthy",errors:[]}}},QE=class{workers=new Map;timers=new Map;abortControllers=new Map;eventBus;memory;domainAccess;running=!1;kernelRef;constructor(e){this.eventBus=e?.eventBus??new M1,this.memory=e?.memory??new D1,this.kernelRef=e?.kernel,e?.domainAccess?this.domainAccess=e.domainAccess:e?.kernel?this.domainAccess=new WE(()=>this.kernelRef):this.domainAccess=new jE}setKernel(e){this.kernelRef=e,this.domainAccess instanceof jE&&(this.domainAccess=new WE(()=>this.kernelRef))}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 r=this.timers.get(e);r&&clearTimeout(r);let n=new AbortController;this.abortControllers.set(e,n);let i=this.createContext(e,n.signal),s=await t.execute(i);return this.running&&t.config.enabled&&t.status!=="stopped"&&this.scheduleNextRun(t),s}getHealth(){let e={},t=0,r=0,n=0,i=0;for(let[a,c]of Array.from(this.workers.entries())){let l=c.getHealth();switch(e[a]=l,i+=l.healthScore,c.status){case"running":t++;break;case"paused":r++;break;case"error":n++;break}}let s=this.workers.size>0?Math.round(i/this.workers.size):100;return{totalWorkers:this.workers.size,runningWorkers:t,pausedWorkers:r,errorWorkers:n,healthScore:s,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 r=this.createContext(e.config.id,t.signal);try{await e.execute(r)}catch(n){console.error(`Worker ${e.config.id} initial execution failed:`,n)}this.scheduleNextRun(e)}async stopWorker(e){let t=this.timers.get(e);t&&(clearTimeout(t),this.timers.delete(e));let r=this.abortControllers.get(e);r&&(r.abort(),this.abortControllers.delete(e));let n=this.workers.get(e);n&&await n.stop()}scheduleNextRun(e){let t=setTimeout(async()=>{if(!this.running||e.status==="stopped"||e.status==="paused")return;let r=new AbortController;this.abortControllers.set(e.config.id,r);let n=this.createContext(e.config.id,r.signal);try{await e.execute(n)}catch(i){console.error(`Worker ${e.config.id} execution failed:`,i)}this.running&&e.config.enabled&&e.status!=="error"&&this.scheduleNextRun(e)},e.config.intervalMs);this.timers.set(e.config.id,t)}createContext(e,t){return{eventBus:this.eventBus,memory:this.memory,logger:new _1(e),domains:this.domainAccess,signal:t}}}});var aEe,eh,n7=y(()=>{"use strict";ir();k();aEe={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},eh=class extends $e{previousMetrics;constructor(){super(aEe)}async doExecute(e){let t=Date.now();e.logger.info("Starting test health analysis");let r=[],n=[],i=await this.collectMetrics(e);this.analyzePassRate(i,r,n),this.analyzeExecutionTime(i,r,n),this.analyzeReliability(i,r,n),this.analyzeGrowth(i,r,n),this.compareToPrevious(i,r,n),await e.memory.set("test-health:previous-metrics",i),this.previousMetrics=i;let s=this.calculateHealthScore(i),a=this.determineTrend(i);return e.logger.info("Test health analysis complete",{healthScore:s,findingsCount:r.length}),this.createResult(Date.now()-t,{itemsAnalyzed:i.totalTests,issuesFound:r.length,healthScore:s,trend:a,domainMetrics:{passRate:`${(i.passingTests/i.totalTests*100).toFixed(1)}%`,avgExecutionTime:`${i.avgExecutionTimeMs}ms`,reliability:`${i.reliability}%`,totalTests:i.totalTests}},r,n)}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 n=await e.memory.search("test-health:run-result:*");if(n.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 i=0,s=0,a=0,c=0,l=0,u=0;for(let g of n.slice(0,50)){let h=await e.memory.get(g);h&&(i+=h.total,s+=h.passed,a+=h.failed,c+=h.skipped,l+=h.duration,u++)}let d=u>0?Math.round(l/u):0,p=i>0?Math.round(s/i*100):0,m=await e.memory.get("test-health:growth-metrics");return{totalTests:i||0,passingTests:s||0,failingTests:a||0,skippedTests:c||0,avgExecutionTimeMs:d,reliability:p,growth:{testsAddedLast7Days:m?.testsAddedLast7Days||0,testsRemovedLast7Days:m?.testsRemovedLast7Days||0}}}catch(n){let i=w(n);throw new Error(`Failed to collect test health metrics: ${i}. Check memory service connectivity and test result data availability.`)}}analyzePassRate(e,t,r){let n=e.passingTests/e.totalTests*100;n<95&&(t.push({type:"low-pass-rate",severity:n<90?"high":"medium",domain:"test-execution",title:"Low Test Pass Rate",description:`Test pass rate is ${n.toFixed(1)}%, below the 95% target`,context:{passing:e.passingTests,failing:e.failingTests,total:e.totalTests}}),r.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,r){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}}),r.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,r){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}}),r.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,r){let n=e.growth.testsAddedLast7Days-e.growth.testsRemovedLast7Days;n<0&&(t.push({type:"test-coverage-decline",severity:"medium",domain:"test-generation",title:"Test Coverage Declining",description:`Net loss of ${Math.abs(n)} tests in the last 7 days`,context:{added:e.growth.testsAddedLast7Days,removed:e.growth.testsRemovedLast7Days}}),r.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,r){if(!this.previousMetrics)return;let n=e.passingTests/e.totalTests-this.previousMetrics.passingTests/this.previousMetrics.totalTests;n<-.05&&t.push({type:"pass-rate-regression",severity:"high",domain:"test-execution",title:"Pass Rate Regression Detected",description:`Pass rate dropped by ${(Math.abs(n)*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,r=e.reliability/100*30,n=Math.max(0,20-e.avgExecutionTimeMs/100),i=Math.min(10,e.growth.testsAddedLast7Days/10*10);return Math.round(t+r+n+i)}determineTrend(e){if(!this.previousMetrics)return"stable";let t=e.passingTests/e.totalTests,r=this.previousMetrics.passingTests/this.previousMetrics.totalTests;return t>r+.02?"improving":t<r-.02?"degrading":"stable"}}});var oEe,th,i7=y(()=>{"use strict";ir();oEe={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},th=class extends $e{constructor(){super(oEe)}async doExecute(e){let t=Date.now();e.logger.info("Starting coverage tracking analysis");let r=[],n=[],i=await this.collectCoverageTrend(e),s=await this.identifyCoverageGaps(e);this.analyzeCoverageThresholds(i.current,r,n),this.analyzeCoverageGaps(s,r,n),this.analyzeCoverageTrends(i,r,n),await e.memory.set("coverage:current",i.current),await e.memory.set("coverage:gaps",s);let a=this.calculateHealthScore(i.current,s);return e.logger.info("Coverage tracking complete",{healthScore:a,findingsCount:r.length,gapsFound:s.length}),this.createResult(Date.now()-t,{itemsAnalyzed:s.length+4,issuesFound:r.length,healthScore:a,trend:this.determineTrend(i),domainMetrics:{lineCoverage:`${i.current.line}%`,branchCoverage:`${i.current.branch}%`,functionCoverage:`${i.current.function}%`,statementCoverage:`${i.current.statement}%`,gapsCount:s.length}},r,n)}async collectCoverageTrend(e){let t=await e.memory.get("coverage:current"),r=await e.memory.get("coverage:latest");return{current:{line:r?.line??0,branch:r?.branch??0,function:r?.function??0,statement:r?.statement??0,timestamp:new Date},previous:t}}async identifyCoverageGaps(e){let t=await e.memory.search("gap-pattern:*");if(t.length>0){let r=[];for(let n of t){let i=await e.memory.get(n);i&&typeof i.riskScore=="number"&&r.push(i)}if(r.length>0)return r}return[]}analyzeCoverageThresholds(e,t,r){let n={line:80,branch:70,function:80,statement:80};e.line<n.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 ${n.line}% target`,context:{current:e.line,target:n.line}}),e.branch<n.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 ${n.branch}% target`,context:{current:e.branch,target:n.branch}}),r.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<n.function&&t.push({type:"low-function-coverage",severity:"medium",domain:"coverage-analysis",title:"Function Coverage Below Threshold",description:`Function coverage is ${e.function}%, below ${n.function}% target`,context:{current:e.function,target:n.function}})}analyzeCoverageGaps(e,t,r){let n=e.filter(s=>s.riskScore>.8);for(let s of n)t.push({type:"high-risk-coverage-gap",severity:"high",domain:"coverage-analysis",title:"High-Risk Coverage Gap",description:`${s.file} has ${s.uncoveredLines} uncovered lines with complexity ${s.complexity}`,resource:s.file,context:{uncoveredLines:s.uncoveredLines,totalLines:s.totalLines,coveragePercent:((s.totalLines-s.uncoveredLines)/s.totalLines*100).toFixed(1),complexity:s.complexity,riskScore:s.riskScore}});n.length>0&&r.push({priority:"p0",domain:"test-generation",action:"Address High-Risk Coverage Gaps",description:`${n.length} files have high-risk coverage gaps. Prioritize testing for complex, uncovered code.`,estimatedImpact:"high",effort:"high",autoFixable:!0});let i=e.filter(s=>(s.totalLines-s.uncoveredLines)/s.totalLines<.5);i.length>0&&t.push({type:"critical-coverage-gaps",severity:"critical",domain:"coverage-analysis",title:"Critical Coverage Gaps Detected",description:`${i.length} files have less than 50% coverage`,context:{files:i.map(s=>s.file)}})}analyzeCoverageTrends(e,t,r){if(!e.previous)return;let n=e.current.line-e.previous.line,i=e.current.branch-e.previous.branch;n<-2&&(t.push({type:"coverage-regression",severity:n<-5?"high":"medium",domain:"coverage-analysis",title:"Coverage Regression Detected",description:`Line coverage dropped by ${Math.abs(n).toFixed(1)}% since last check`,context:{previous:e.previous.line,current:e.current.line,change:n}}),r.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})),i<-3&&t.push({type:"branch-coverage-regression",severity:"medium",domain:"coverage-analysis",title:"Branch Coverage Regression",description:`Branch coverage dropped by ${Math.abs(i).toFixed(1)}%`,context:{previous:e.previous.branch,current:e.current.branch,change:i}})}calculateHealthScore(e,t){let r=e.line/100*25,n=e.branch/100*25,i=e.function/100*20,s=e.statement/100*20,a=t.filter(l=>l.riskScore>.8).length,c=Math.max(0,10-a*2);return Math.round(r+n+i+s+c)}determineTrend(e){if(!e.previous)return"stable";let t=(e.current.line+e.current.branch+e.current.function+e.current.statement)/4,r=(e.previous.line+e.previous.branch+e.previous.function+e.previous.statement)/4;return t>r+1?"improving":t<r-1?"degrading":"stable"}}});var cEe,rh,s7=y(()=>{"use strict";ir();cEe={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},rh=class extends $e{constructor(){super(cEe)}async doExecute(e){let t=Date.now();e.logger.info("Starting flaky test detection");let r=[],n=[],i=await this.collectTestHistory(e),s=this.detectFlakyTests(i);this.generateFindings(s,r,n),await e.memory.set("flaky:detected",s),await e.memory.set("flaky:lastAnalysis",new Date().toISOString());let a=this.calculateHealthScore(i.length,s);return e.logger.info("Flaky test detection complete",{healthScore:a,testsAnalyzed:i.length,flakyTestsFound:s.length}),this.createResult(Date.now()-t,{itemsAnalyzed:i.length,issuesFound:s.length,healthScore:a,trend:"stable",domainMetrics:{testsAnalyzed:i.length,flakyTests:s.length,flakinessRate:`${(s.length/i.length*100).toFixed(1)}%`,avgFlakinessScore:s.length>0?(s.reduce((c,l)=>c+l.flakinessScore,0)/s.length).toFixed(1):"0"}},r,n)}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 r=await e.memory.search("flaky:history:*");if(r.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 n=[],i=[];for(let s of r)try{let a=await e.memory.get(s);a&&n.push(a)}catch{i.push(s)}if(n.length===0)throw new Error(`Found ${r.length} test history keys but failed to retrieve any data. Failed keys: ${i.slice(0,5).join(", ")}${i.length>5?"...":""}. Check memory service connectivity and data format.`);return n}detectFlakyTests(e){let t=[];for(let r of e){let n=this.analyzeTestFlakiness(r);n.flakinessScore>20&&t.push(n)}return t.sort((r,n)=>n.flakinessScore-r.flakinessScore)}analyzeTestFlakiness(e){let t=e.executions,n=t.filter(g=>g.passed).length/t.length,i=t.map(g=>g.durationMs),s=i.reduce((g,h)=>g+h,0)/i.length,a=i.reduce((g,h)=>g+Math.pow(h-s,2),0)/i.length,l=Math.sqrt(a)/s,u=t.slice(-5).filter(g=>!g.passed).length,d=this.determinePattern(e,l),p=0;n>0&&n<1&&(p+=(1-n)*50),l>.5&&(p+=Math.min(25,l*10)),p+=u*5;let m=this.suggestFix(d);return{testId:e.testId,testName:e.testName,file:e.file,flakinessScore:Math.min(100,Math.round(p)),pattern:d,passRate:n*100,avgDuration:s,durationVariance:l,recentFailures:u,suggestedFix:m}}determinePattern(e,t){let r=e.executions.filter(i=>!i.passed);if(t>1||r.some(i=>i.error?.includes("Timeout")))return"timing";if(r.some(i=>i.error?.includes("Resource")||i.error?.includes("connection")))return"resource";if(r.some(i=>i.error?.includes("Race")||i.error?.includes("async")))return"intermittent";let n=e.executions.map(i=>i.passed);return this.hasOrderPattern(n)?"order-dependent":"intermittent"}hasOrderPattern(e){let t=e.map((i,s)=>i?-1:s).filter(i=>i>=0);if(t.length<2)return!1;let r=t.every(i=>i%2===0),n=t.every(i=>i%2===1);return r||n}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,r){let n=e.filter(c=>c.flakinessScore>=70),i=e.filter(c=>c.flakinessScore>=50&&c.flakinessScore<70),s=e.filter(c=>c.flakinessScore>=20&&c.flakinessScore<50);for(let c of n)t.push({type:"critical-flaky-test",severity:"critical",domain:"test-execution",title:`Critical Flaky Test: ${c.testName}`,description:`Test has ${c.flakinessScore}% flakiness score with ${c.passRate.toFixed(0)}% pass rate`,resource:c.file,context:{testId:c.testId,pattern:c.pattern,recentFailures:c.recentFailures,suggestedFix:c.suggestedFix}});for(let c of i)t.push({type:"high-flaky-test",severity:"high",domain:"test-execution",title:`Flaky Test: ${c.testName}`,description:`Test has ${c.flakinessScore}% flakiness score (${c.pattern} pattern)`,resource:c.file,context:{testId:c.testId,pattern:c.pattern,suggestedFix:c.suggestedFix}});for(let c of s)t.push({type:"medium-flaky-test",severity:"medium",domain:"test-execution",title:`Potentially Flaky Test: ${c.testName}`,description:`Test shows flakiness indicators (score: ${c.flakinessScore}%)`,resource:c.file,context:{testId:c.testId,pattern:c.pattern}});n.length>0&&r.push({priority:"p0",domain:"test-execution",action:"Fix Critical Flaky Tests",description:`${n.length} tests have critical flakiness. These severely impact CI reliability.`,estimatedImpact:"high",effort:"high",autoFixable:!1});let a=e.filter(c=>c.pattern==="timing");a.length>0&&r.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 r=t.length/e,n=t.length>0?t.reduce((a,c)=>a+c.flakinessScore,0)/t.length:0,i=100;i-=r*50,i-=n/100*30;let s=t.filter(a=>a.flakinessScore>=70).length;return i-=s*5,Math.max(0,Math.round(i))}}});var lEe,nh,a7=y(()=>{"use strict";ir();lEe={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},nh=class extends $e{constructor(){super(lEe)}async doExecute(e){let t=Date.now();e.logger.info("Starting security vulnerability scan");let r=[],n=[],i=await this.runSecurityScans(e);this.analyzeDependencyVulnerabilities(i.dependencyVulnerabilities,r,n),this.analyzeCodeSecurityIssues(i.codeSecurityIssues,r,n),i.secretsDetected>0&&this.reportSecretsDetected(i.secretsDetected,r,n),await e.memory.set("security:lastScan",i),await e.memory.set("security:lastScanTime",new Date().toISOString());let s=this.calculateHealthScore(i),a=i.dependencyVulnerabilities.length+i.codeSecurityIssues.length+i.secretsDetected+i.configurationIssues;return e.logger.info("Security scan complete",{healthScore:s,totalIssues:a,criticalIssues:i.dependencyVulnerabilities.filter(c=>c.severity==="critical").length+i.codeSecurityIssues.filter(c=>c.severity==="critical").length}),this.createResult(Date.now()-t,{itemsAnalyzed:a,issuesFound:r.length,healthScore:s,trend:"stable",domainMetrics:{dependencyVulnerabilities:i.dependencyVulnerabilities.length,codeSecurityIssues:i.codeSecurityIssues.length,secretsDetected:i.secretsDetected,configurationIssues:i.configurationIssues,scanDuration:`${i.scanDurationMs}ms`}},r,n)}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,r){let n=e.filter(s=>s.severity==="critical"),i=e.filter(s=>s.severity==="high");for(let s of n)t.push({type:"critical-vulnerability",severity:"critical",domain:"security-compliance",title:`Critical Vulnerability in ${s.package}`,description:`${s.title}: ${s.description}`,resource:s.package,context:{cve:s.cve,currentVersion:s.version,fixedIn:s.fixedIn}});for(let s of i)t.push({type:"high-vulnerability",severity:"high",domain:"security-compliance",title:`High Severity Vulnerability in ${s.package}`,description:`${s.title}: ${s.description}`,resource:s.package,context:{cve:s.cve,currentVersion:s.version,fixedIn:s.fixedIn}});n.length>0&&r.push({priority:"p0",domain:"security-compliance",action:"Update Critical Vulnerabilities Immediately",description:`${n.length} packages have critical vulnerabilities. Update immediately to patched versions.`,estimatedImpact:"high",effort:"low",autoFixable:!0}),i.length>0&&r.push({priority:"p1",domain:"security-compliance",action:"Address High Severity Vulnerabilities",description:`${i.length} packages have high severity vulnerabilities. Plan updates within current sprint.`,estimatedImpact:"high",effort:"low",autoFixable:!0})}analyzeCodeSecurityIssues(e,t,r){let n=new Map;for(let a of e){let c=n.get(a.category)||[];c.push(a),n.set(a.category,c)}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 i=n.get("injection")||[];i.length>0&&r.push({priority:"p0",domain:"security-compliance",action:"Fix Injection Vulnerabilities",description:`${i.length} potential injection vulnerabilities found. Use parameterized queries and avoid eval().`,estimatedImpact:"high",effort:"medium",autoFixable:!1});let s=n.get("crypto")||[];s.length>0&&r.push({priority:"p1",domain:"security-compliance",action:"Review Cryptographic Implementations",description:`${s.length} cryptographic issues found. Ensure using secure algorithms and proper key management.`,estimatedImpact:"high",effort:"high",autoFixable:!1})}reportSecretsDetected(e,t,r){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}}),r.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,r=e.dependencyVulnerabilities.filter(a=>a.severity==="critical").length;t-=r*20;let n=e.dependencyVulnerabilities.filter(a=>a.severity==="high").length;t-=n*10;let i=e.codeSecurityIssues.filter(a=>a.severity==="critical").length;t-=i*15;let s=e.codeSecurityIssues.filter(a=>a.severity==="high").length;return t-=s*8,t-=e.secretsDetected*30,t-=e.configurationIssues*5,Math.max(0,Math.round(t))}}});var uEe,ih,o7=y(()=>{"use strict";ir();uEe={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},ih=class extends $e{constructor(){super(uEe)}async doExecute(e){let t=Date.now();e.logger.info("Starting quality gate evaluation");let r=[],n=[],i=await this.evaluateQualityGates(e);this.analyzeGateResults(i,r,n),this.checkBlockers(i,r,n),await this.compareToHistory(e,i,r),await e.memory.set("quality-gate:current",i),await e.memory.set("quality-gate:lastCheck",new Date().toISOString());let s=await e.memory.get("quality-gate:history")||[];s.push(i),s.length>100&&s.shift(),await e.memory.set("quality-gate:history",s);let a=this.calculateHealthScore(i);return e.logger.info("Quality gate evaluation complete",{healthScore:a,passed:i.passed,releaseReady:i.releaseReady,blockers:i.blockers}),this.createResult(Date.now()-t,{itemsAnalyzed:i.rules.length,issuesFound:i.failedRules,healthScore:a,trend:"stable",domainMetrics:{gatePassed:i.passed?"YES":"NO",releaseReady:i.releaseReady?"YES":"NO",passedRules:i.passedRules,failedRules:i.failedRules,blockers:i.blockers,warnings:i.warnings}},r,n)}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}],r=0,n=0,i=0,s=0;for(let a of t)this.evaluateRule(a)?r++:(n++,a.blocking?i++:s++);return{passed:i===0,passedRules:r,failedRules:n,blockers:i,warnings:s,releaseReady:i===0&&s<=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,r){for(let s of e.rules)if(!this.evaluateRule(s)){let a=s.blocking?"critical":"medium";t.push({type:"quality-gate-failure",severity:a,domain:"quality-assessment",title:`Quality Gate Failed: ${s.name}`,description:`${s.name} is ${s.currentValue}${s.unit}, threshold is ${s.operator==="gte"?">=":s.operator==="lte"?"<=":"="} ${s.threshold}${s.unit}`,context:{ruleId:s.id,category:s.category,currentValue:s.currentValue,threshold:s.threshold,blocking:s.blocking}})}let n=e.rules.filter(s=>s.category==="coverage"&&!this.evaluateRule(s));n.length>0&&r.push({priority:n.some(s=>s.blocking)?"p0":"p2",domain:"quality-assessment",action:"Improve Test Coverage",description:`${n.length} coverage gates are failing. Add tests to increase coverage.`,estimatedImpact:"high",effort:"medium",autoFixable:!0}),e.rules.filter(s=>s.category==="security"&&!this.evaluateRule(s)).length>0&&r.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,r){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(n=>n.blocking&&!this.evaluateRule(n)).map(n=>n.name)}}),r.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,r){let n=await e.memory.get("quality-gate:current");n&&(n.passed&&!t.passed&&r.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:n.blockers,currentBlockers:t.blockers}}),!n.passed&&t.passed&&r.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:n.failedRules,currentFailures:t.failedRules}}))}calculateHealthScore(e){if(e.rules.length===0)return 100;let r=e.passedRules/e.rules.length*70;return r-=e.blockers*15,r-=e.warnings*5,e.releaseReady&&(r+=10),Math.max(0,Math.min(100,Math.round(r)))}}});var c7={};Q(c7,{ensurePatternEmbedding:()=>dEe});async function dEe(o,e,t,r,n,i={}){try{let s=`${t??""} ${r??""} ${(n??[]).join(" ")}`.trim();if(!s)return;let a=await Pt(s,i);if(!a||a.length===0)return;let c=Buffer.from(new Float32Array(a).buffer),l={...Ls,...i};o.prepare(`INSERT OR REPLACE INTO qe_pattern_embeddings (pattern_id, embedding, dimension, model)
|
|
5885
5885
|
VALUES (?, ?, ?, ?)`).run(e,c,a.length,l.modelName)}catch(s){console.debug("[ensurePatternEmbedding] non-fatal:",s instanceof Error?s.message:String(s))}}var l7=y(()=>{"use strict";Tr()});var pEe,sh,u7=y(()=>{"use strict";ir();L();vm();yw();Y();k();rL();pEe={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},sh=class extends $e{lifecycleManager=null;lastRunTimestamp=0;constructor(){super(pEe)}async getLifecycleManager(){if(this.lifecycleManager)return this.lifecycleManager;try{let e=W();await e.initialize();let t=e.getDatabase();return this.lifecycleManager=mg(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 r=[],n=[],i=0,s=0,a=0,c=0,l=0,u=await this.getLifecycleManager();if(u){let h=await this.runContinuousLearningLoop(e,u,r,n);i=h.experiencesProcessed,s=h.patternCandidatesFound,a=h.patternsPromoted,c=h.patternsDeprecated,l=h.confidenceDecayApplied}let d=await this.collectPatterns(e),p=await this.consolidatePatterns(e,d);p.experiencesProcessed=i,p.patternCandidatesFound=s,p.patternsPromoted=a,p.patternsDeprecated=c,p.confidenceDecayApplied=l,this.identifyCrossDomainPatterns(d,r,n),this.pruneIneffectivePatterns(d,r,n),this.generateOptimizations(d,r,n);let m=await this.runDreamCycle(e,d,r,n);p.dreamInsights=m.insights,p.dreamPatternsCreated=m.patternsCreated,await e.memory.set("learning:lastConsolidation",p),await e.memory.set("learning:consolidatedPatterns",d),this.lastRunTimestamp=Date.now();let g=this.calculateHealthScore(p,d);return e.logger.info("Learning consolidation complete",{healthScore:g,patternsAnalyzed:p.patternsAnalyzed,newInsights:p.newInsights,experiencesProcessed:i,patternsPromoted:a,patternsDeprecated:c}),this.createResult(Date.now()-t,{itemsAnalyzed:p.patternsAnalyzed,issuesFound:p.patternsPruned+p.patternsDeprecated,healthScore:g,trend:this.determineTrend(p),domainMetrics:{patternsAnalyzed:p.patternsAnalyzed,patternsPruned:p.patternsPruned,patternsConsolidated:p.patternsConsolidated,newInsights:p.newInsights,crossDomainPatterns:p.crossDomainPatterns,dreamInsights:p.dreamInsights,dreamPatternsCreated:p.dreamPatternsCreated,experiencesProcessed:p.experiencesProcessed,patternCandidatesFound:p.patternCandidatesFound,patternsPromoted:p.patternsPromoted,patternsDeprecated:p.patternsDeprecated,confidenceDecayApplied:p.confidenceDecayApplied}},r,n)}async runContinuousLearningLoop(e,t,r,n){e.logger.info("Running continuous learning loop (Phase 7)");let i=0,s=0,a=0,c=0,l=0;try{let u=t.getRecentExperiences({minReward:.7,limit:100,sinceDays:7});if(i=u.length,u.length>0){e.logger.debug("Processing recent experiences",{count:u.length});let h=t.findPatternCandidates(u);if(s=h.length,h.length>0){let v=await this.createPatternsFromCandidates(h);r.push({type:"pattern-extraction",severity:"info",domain:"learning-optimization",title:"New Patterns Extracted from Experiences",description:`${v} new patterns extracted from ${i} high-reward experiences`,context:{candidatesFound:s,patternsCreated:v,topCandidate:h[0]?.name}})}}let d=t.promoteEligiblePatterns();a=d.promoted,a>0&&r.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:d.checked,promoted:a}});let p=t.deprecateStalePatterns();c=p.deprecated,c>0&&(r.push({type:"pattern-deprecation",severity:"low",domain:"learning-optimization",title:"Underperforming Patterns Deprecated",description:`${c} patterns deprecated due to failures, staleness, or low confidence`,context:{checked:p.checked,deprecated:c}}),n.push({priority:"p3",domain:"learning-optimization",action:"Review Deprecated Patterns",description:`${c} patterns were deprecated. Review for potential recovery or permanent removal.`,estimatedImpact:"low",effort:"low",autoFixable:!1}));try{let v=W().getDatabase(),b=new Xc;await b.initialize(v);let C=await b.consolidateAll();(C.merged>0||C.archived>0)&&r.push({type:"experience-consolidation",severity:"info",domain:"learning-optimization",title:"Experiences Consolidated",description:`${C.merged} merged, ${C.archived} archived across ${C.domainsProcessed.length} domains`,context:{merged:C.merged,archived:C.archived,activeRemaining:C.activeRemaining,domains:C.domainsProcessed}})}catch(h){e.logger.warn("Experience consolidation failed",{error:w(h)})}let m=this.lastRunTimestamp>0?(Date.now()-this.lastRunTimestamp)/(1e3*60*60*24):1;m>=.5&&(l=t.applyConfidenceDecay(Math.min(m,7)).decayed);let g=t.getStats();this.addLifecycleStatsFinding(g,r,n),e.logger.info("Continuous learning loop complete",{experiencesProcessed:i,patternCandidatesFound:s,patternsPromoted:a,patternsDeprecated:c,confidenceDecayApplied:l})}catch(u){e.logger.warn("Continuous learning loop partially failed",{error:w(u)})}return{experiencesProcessed:i,patternCandidatesFound:s,patternsPromoted:a,patternsDeprecated:c,confidenceDecayApplied:l}}async createPatternsFromCandidates(e){let t=0;try{let n=W().getDatabase();for(let i of e)try{let{v4:s}=await Promise.resolve().then(()=>(N(),R$)),a=s(),c=`Auto-extracted pattern from ${i.sourceExperiences} experiences. Avg reward: ${i.avgReward.toFixed(3)}`;n.prepare(`
|
|
5886
5886
|
INSERT INTO qe_patterns (
|
|
5887
5887
|
id, pattern_type, qe_domain, domain, name, description,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentic-qe",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.24",
|
|
4
4
|
"description": "Agentic Quality Engineering V3 - Domain-Driven Design Architecture with 13 Bounded Contexts, O(log n) coverage analysis, ReasoningBank learning, 60 specialized QE agents, mathematical Coherence verification, deep Claude Flow integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -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.9.23");process.exit(0)}
|
|
2
|
-
import{a,b,c}from"./chunk-6C5ZHH74.js";import"./chunk-TTVF2GAJ.js";import"./chunk-P6CK2HEP.js";import"./chunk-J2RELPD3.js";import"./chunk-CLMIRGMC.js";import"./chunk-I4MDD35Z.js";export{a as AgentBoosterAdapter,b as createAgentBoosterAdapter,c as createAgentBoosterAdapterSync};
|
|
@@ -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.9.23");process.exit(0)}
|
|
2
|
-
import{a,b,c,d,e,f}from"./chunk-VMCAEZKC.js";import"./chunk-MSLVQQCR.js";import"./chunk-RG6ZEBBX.js";import"./chunk-EHJKX273.js";import"./chunk-JW3FK26F.js";import"./chunk-XPRPADO3.js";import"./chunk-4CFZIIAE.js";import"./chunk-ODWVWWYF.js";import"./chunk-7SHZ5BNE.js";import"./chunk-CFWHICPP.js";import"./chunk-Z3FVM4RP.js";import"./chunk-PTX6ANZC.js";import"./chunk-3MFRGZ3U.js";import"./chunk-DENKSTR5.js";import"./chunk-V2JS2SFV.js";import"./chunk-LCBUXWME.js";import"./chunk-4XN5XAQ4.js";import"./chunk-J2RELPD3.js";import"./chunk-6SQTWXV4.js";import"./chunk-CLMIRGMC.js";import"./chunk-72GIAZOO.js";import"./chunk-OSSTNUL5.js";import"./chunk-POL7GGDS.js";import"./chunk-67UGSBUX.js";import"./chunk-LHZLX6A5.js";import"./chunk-TFEBX3EF.js";import"./chunk-BX5MBOPH.js";import"./chunk-2ZUNDAJ5.js";import"./chunk-VHDRVB2K.js";import"./chunk-N7E2CHLQ.js";import"./chunk-I4MDD35Z.js";export{b as AQELearningEngine,a as DEFAULT_ENGINE_CONFIG,c as DEFAULT_META_LEARNING_CONFIG,d as MetaLearningEngine,e as createAQELearningEngine,f as createDefaultLearningEngine};
|