agentic-qe 3.8.13 → 3.9.0
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 +48 -0
- package/dist/adapters/a2ui/integration/agui-sync.js +2 -1
- package/dist/audit/witness-chain.js +15 -3
- package/dist/boot/fast-paths.d.ts +24 -0
- package/dist/boot/fast-paths.js +43 -0
- package/dist/boot/parallel-prefetch.d.ts +26 -0
- package/dist/boot/parallel-prefetch.js +36 -0
- package/dist/cli/bundle.js +12 -9431
- package/dist/cli/chunks/adapter-WBR5NXS3.js +2 -0
- package/dist/cli/chunks/agent-booster-wasm-PQYB7VRU.js +2 -0
- package/dist/cli/chunks/agent-handler-QDAB5NQS.js +33 -0
- package/dist/cli/chunks/aqe-learning-engine-TK4JQCGT.js +2 -0
- package/dist/cli/chunks/audit-S7JUYYVP.js +3 -0
- package/dist/cli/chunks/base-2WXOSMBQ.js +2 -0
- package/dist/cli/chunks/better-sqlite3-7KY2RDXO.js +2 -0
- package/dist/cli/chunks/brain-handler-PPEGDCN4.js +68 -0
- package/dist/cli/chunks/branch-enumerator-XK4V5W7L.js +7 -0
- package/dist/cli/chunks/browser-PALA5PL3.js +4 -0
- package/dist/cli/chunks/browser-workflow-42F7GK5T.js +2 -0
- package/dist/cli/chunks/chunk-24FKIJNC.js +15 -0
- package/dist/cli/chunks/chunk-263XS447.js +2 -0
- package/dist/cli/chunks/chunk-2BZFNEN2.js +4 -0
- package/dist/cli/chunks/chunk-2E5NQNSU.js +180 -0
- package/dist/cli/chunks/chunk-2I7J3O6V.js +2 -0
- package/dist/cli/chunks/chunk-3ADGXLTM.js +14 -0
- package/dist/cli/chunks/chunk-3IHG3WOY.js +12 -0
- package/dist/cli/chunks/chunk-3IUNFTIF.js +2 -0
- package/dist/cli/chunks/chunk-3JPRUND5.js +2 -0
- package/dist/cli/chunks/chunk-3NZLZHJI.js +2 -0
- package/dist/cli/chunks/chunk-3THRQEZ2.js +95 -0
- package/dist/cli/chunks/chunk-3ZOONQG6.js +2 -0
- package/dist/cli/chunks/chunk-4B6NCELM.js +2 -0
- package/dist/cli/chunks/chunk-4I2IOUS4.js +2 -0
- package/dist/cli/chunks/chunk-4VBTXZRM.js +2 -0
- package/dist/cli/chunks/chunk-4VUPRTVX.js +3 -0
- package/dist/cli/chunks/chunk-4YOMLWEK.js +70 -0
- package/dist/cli/chunks/chunk-4YS3IJ45.js +2 -0
- package/dist/cli/chunks/chunk-5SKGFSKD.js +2 -0
- package/dist/cli/chunks/chunk-5T2ZQWKF.js +27 -0
- package/dist/cli/chunks/chunk-62ADTHV7.js +2 -0
- package/dist/cli/chunks/chunk-6EOS7KX2.js +2 -0
- package/dist/cli/chunks/chunk-6SVX4DJC.js +6 -0
- package/dist/cli/chunks/chunk-72WOAVK6.js +2 -0
- package/dist/cli/chunks/chunk-7R6YMLVS.js +3 -0
- package/dist/cli/chunks/chunk-7VDBAVTY.js +2 -0
- package/dist/cli/chunks/chunk-AFLLQ5PP.js +15 -0
- package/dist/cli/chunks/chunk-AKE543X2.js +2 -0
- package/dist/cli/chunks/chunk-B36CDR4U.js +2 -0
- package/dist/cli/chunks/chunk-B6LLWYQ6.js +2 -0
- package/dist/cli/chunks/chunk-BDIEMZ22.js +91 -0
- package/dist/cli/chunks/chunk-BGXNSCXX.js +4 -0
- package/dist/cli/chunks/chunk-BLBRY5UD.js +2 -0
- package/dist/cli/chunks/chunk-BPWXXEH2.js +3029 -0
- package/dist/cli/chunks/chunk-BR26T7ZS.js +180 -0
- package/dist/cli/chunks/chunk-BTREG4IW.js +2 -0
- package/dist/cli/chunks/chunk-BULKFVYX.js +2 -0
- package/dist/cli/chunks/chunk-BXAXGEFC.js +24 -0
- package/dist/cli/chunks/chunk-CL6POIX4.js +2 -0
- package/dist/cli/chunks/chunk-CS2KS7LP.js +2 -0
- package/dist/cli/chunks/chunk-CWFB6BSA.js +316 -0
- package/dist/cli/chunks/chunk-DRT3WKQW.js +2 -0
- package/dist/cli/chunks/chunk-EHDQJQ6Y.js +27 -0
- package/dist/cli/chunks/chunk-ESVQ6MEB.js +2 -0
- package/dist/cli/chunks/chunk-FEKY7T6Q.js +2 -0
- package/dist/cli/chunks/chunk-FGA7VIFR.js +7 -0
- package/dist/cli/chunks/chunk-FIA6X7UL.js +2 -0
- package/dist/cli/chunks/chunk-GAOJV3OX.js +2 -0
- package/dist/cli/chunks/chunk-GKNNSCLC.js +5 -0
- package/dist/cli/chunks/chunk-GPQ57KA4.js +2 -0
- package/dist/cli/chunks/chunk-GRUUQAR6.js +2 -0
- package/dist/cli/chunks/chunk-HRO6OZQD.js +2 -0
- package/dist/cli/chunks/chunk-HY6PMO5W.js +66 -0
- package/dist/cli/chunks/chunk-IAV2JMIX.js +167 -0
- package/dist/cli/chunks/chunk-IFNIIK34.js +21 -0
- package/dist/cli/chunks/chunk-IGJPMN4I.js +3 -0
- package/dist/cli/chunks/chunk-J3KWWR6Z.js +1 -0
- package/dist/cli/chunks/chunk-JBANAPWG.js +2 -0
- package/dist/cli/chunks/chunk-JJO7Y4H3.js +604 -0
- package/dist/cli/chunks/chunk-JRYGQO2W.js +2 -0
- package/dist/cli/chunks/chunk-JXM26HEE.js +2 -0
- package/dist/cli/chunks/chunk-JZSDOIXA.js +2 -0
- package/dist/cli/chunks/chunk-KP5NUODU.js +3 -0
- package/dist/cli/chunks/chunk-LHJQD2VU.js +750 -0
- package/dist/cli/chunks/chunk-LNQIY6BP.js +2 -0
- package/dist/cli/chunks/chunk-MDUHYUHF.js +2 -0
- package/dist/cli/chunks/chunk-MV6CMOJQ.js +65 -0
- package/dist/cli/chunks/chunk-MZOFWJTM.js +2 -0
- package/dist/cli/chunks/chunk-N2NS2PHA.js +45 -0
- package/dist/cli/chunks/chunk-N4TL73TH.js +314 -0
- package/dist/cli/chunks/chunk-N5UXCLFI.js +2 -0
- package/dist/cli/chunks/chunk-NZ2VCPN4.js +2 -0
- package/dist/cli/chunks/chunk-OF4D7MYI.js +2 -0
- package/dist/cli/chunks/chunk-OI5NGQO2.js +2 -0
- package/dist/cli/chunks/chunk-OLHKGP35.js +2 -0
- package/dist/cli/chunks/chunk-QOVHWZEP.js +1 -0
- package/dist/cli/chunks/chunk-RFSN6IDA.js +79 -0
- package/dist/cli/chunks/chunk-RTGGL7D7.js +4 -0
- package/dist/cli/chunks/chunk-RU5WAHB7.js +3 -0
- package/dist/cli/chunks/chunk-SUSEVMZT.js +2 -0
- package/dist/cli/chunks/chunk-TLHP5EII.js +2 -0
- package/dist/cli/chunks/chunk-TWUWL5EJ.js +2 -0
- package/dist/cli/chunks/chunk-U5RN7YQW.js +2 -0
- package/dist/cli/chunks/chunk-UFUVUO3J.js +2 -0
- package/dist/cli/chunks/chunk-UQHYFOBX.js +16 -0
- package/dist/cli/chunks/chunk-VOS4NQSF.js +2 -0
- package/dist/cli/chunks/chunk-VSVXUTJN.js +256 -0
- package/dist/cli/chunks/chunk-WBQSXPBI.js +2 -0
- package/dist/cli/chunks/chunk-WGMPEW2T.js +2 -0
- package/dist/cli/chunks/chunk-WIEC7VKK.js +2 -0
- package/dist/cli/chunks/chunk-WJ3DLOXF.js +14 -0
- package/dist/cli/chunks/chunk-X3KI6JOY.js +9 -0
- package/dist/cli/chunks/chunk-X5IJGWYG.js +2 -0
- package/dist/cli/chunks/chunk-XIBDETCS.js +146 -0
- package/dist/cli/chunks/chunk-XLRQYLWW.js +2 -0
- package/dist/cli/chunks/chunk-XO6PVK2P.js +3 -0
- package/dist/cli/chunks/chunk-XRE2HCWG.js +3 -0
- package/dist/cli/chunks/chunk-XT2V2322.js +2 -0
- package/dist/cli/chunks/chunk-Y7BHKZFJ.js +18 -0
- package/dist/cli/chunks/chunk-YAGODYIG.js +59 -0
- package/dist/cli/chunks/chunk-YANUP2RO.js +2 -0
- package/dist/cli/chunks/chunk-YPFOCNOE.js +30 -0
- package/dist/cli/chunks/chunk-YR6ZZGH7.js +81 -0
- package/dist/cli/chunks/chunk-YVA65UZL.js +2 -0
- package/dist/cli/chunks/chunk-YW2THB5Q.js +2 -0
- package/dist/cli/chunks/chunk-ZAPS3UGQ.js +20 -0
- package/dist/cli/chunks/chunk-ZDATDCYN.js +2 -0
- package/dist/cli/chunks/ci-J374KDLI.js +81 -0
- package/dist/cli/chunks/ci-output-7JN7F6CI.js +2 -0
- package/dist/cli/chunks/claude-flow-setup-245JLJCN.js +2 -0
- package/dist/cli/chunks/client-MCSNSH2C.js +2 -0
- package/dist/cli/chunks/cline-installer-LBA2M5N3.js +4 -0
- package/dist/cli/chunks/code-U4N4WONM.js +38 -0
- package/dist/cli/chunks/code-index-extractor-A57Z6BO4.js +3 -0
- package/dist/cli/chunks/codex-installer-UXMK2N4T.js +8 -0
- package/dist/cli/chunks/completions-W66BSCOE.js +1364 -0
- package/dist/cli/chunks/complexity-analyzer-AB4OZARV.js +2 -0
- package/dist/cli/chunks/continuedev-installer-LRFZ2SJM.js +14 -0
- package/dist/cli/chunks/copilot-installer-CQ3JYBIB.js +3 -0
- package/dist/cli/chunks/cost-tracker-4F723RB6.js +2 -0
- package/dist/cli/chunks/coverage-4PUEQXAY.js +27 -0
- package/dist/cli/chunks/cross-domain-router-OWR5IJ5G.js +2 -0
- package/dist/cli/chunks/cursor-installer-JZEDEDHA.js +3 -0
- package/dist/cli/chunks/daemon-B7TWGHXQ.js +19 -0
- package/dist/cli/chunks/dag-attention-scheduler-JWO6XI6A.js +2 -0
- package/dist/cli/chunks/detect-L6ZZHUSX.js +2 -0
- package/dist/cli/chunks/domain-handler-FT5FLZWL.js +25 -0
- package/dist/cli/chunks/domain-transfer-5Y4FGJAJ.js +2 -0
- package/dist/cli/chunks/dream-4TDBIYED.js +2 -0
- package/dist/cli/chunks/esm-node-2PKHKOTS.js +2 -0
- package/dist/cli/chunks/eval-GHMPFGWV.js +15 -0
- package/dist/cli/chunks/fast-paths-B3R647KN.js +2 -0
- package/dist/cli/chunks/feature-flags-DWS7ARSX.js +2 -0
- package/dist/cli/chunks/feature-flags-IVQ3AL4Q.js +2 -0
- package/dist/cli/chunks/file-discovery-QFPA6GMV.js +2 -0
- package/dist/cli/chunks/fleet-EKOKMOMW.js +43 -0
- package/dist/cli/chunks/gnn-wrapper-OYC55N5E.js +2 -0
- package/dist/cli/chunks/heartbeat-handler-MBBS4IBU.js +48 -0
- package/dist/cli/chunks/heartbeat-scheduler-XDGMOT7X.js +2 -0
- package/dist/cli/chunks/hnsw-index-YO7CT23I.js +2 -0
- package/dist/cli/chunks/hnswlib-node-56YWVXFE.js +2 -0
- package/dist/cli/chunks/hooks-L5VLZGEK.js +101 -0
- package/dist/cli/chunks/hypergraph-engine-A4Y2ZRAG.js +2 -0
- package/dist/cli/chunks/hypergraph-handler-3HDGB5SZ.js +35 -0
- package/dist/cli/chunks/impact-analyzer-UEIGXSZ4.js +2 -0
- package/dist/cli/chunks/init-handler-JDET6WUN.js +68 -0
- package/dist/cli/chunks/init-wizard-JWZUGIPJ.js +2 -0
- package/dist/cli/chunks/kernel-YNDTVKIW.js +2 -0
- package/dist/cli/chunks/kilocode-installer-GZZG5AFW.js +4 -0
- package/dist/cli/chunks/kiro-installer-IWNY5TKH.js +74 -0
- package/dist/cli/chunks/knowledge-graph-NGJKFTSN.js +2 -0
- package/dist/cli/chunks/learning-722ZNSZ6.js +107 -0
- package/dist/cli/chunks/llm-router-DNAV746L.js +30 -0
- package/dist/cli/chunks/load-Y3GCUFM4.js +2 -0
- package/dist/cli/chunks/load-test-GZUBXFF3.js +2 -0
- package/dist/cli/chunks/mcp-LKPIBZ3W.js +2 -0
- package/dist/cli/chunks/memory-L57MLFOP.js +32 -0
- package/dist/cli/chunks/memory-backend-3NQIZUXE.js +2 -0
- package/dist/cli/chunks/memory-handlers-MDZQ7HVW.js +2 -0
- package/dist/cli/chunks/opencode-installer-4HUB36H5.js +3 -0
- package/dist/cli/chunks/orchestrator-QHSBB2UC.js +371 -0
- package/dist/cli/chunks/pipeline-D3QER35Z.js +19 -0
- package/dist/cli/chunks/platform-T4E7Q3RD.js +2 -0
- package/dist/cli/chunks/plugin-JHW2YPRC.js +27 -0
- package/dist/cli/chunks/prime-radiant-advanced-wasm-G7CFNNQV.js +2 -0
- package/dist/cli/chunks/protocol-executor-SPUVRDWT.js +2 -0
- package/dist/cli/chunks/protocol-handler-2BQQ4HDM.js +20 -0
- package/dist/cli/chunks/prove-UQ6JFT73.js +3 -0
- package/dist/cli/chunks/qe-reasoning-bank-3HBK2FVD.js +2 -0
- package/dist/cli/chunks/quality-JRZYMC77.js +7 -0
- package/dist/cli/chunks/queen-coordinator-RW3NKO5A.js +2 -0
- package/dist/cli/chunks/real-embeddings-GK63VF35.js +2 -0
- package/dist/cli/chunks/roocode-installer-F4E2LAYR.js +4 -0
- package/dist/cli/chunks/router-RJGHWDQ3.js +2 -0
- package/dist/cli/chunks/routing-feedback-ZXBXFKX6.js +2 -0
- package/dist/cli/chunks/routing-handler-VNKFUUGB.js +20 -0
- package/dist/cli/chunks/ruvector-commands-2TLNHC3A.js +8 -0
- package/dist/cli/chunks/rvf-dual-writer-MQW2SJLT.js +2 -0
- package/dist/cli/chunks/rvf-native-adapter-LKFKTMUN.js +2 -0
- package/dist/cli/chunks/safe-db-G22E5ROA.js +2 -0
- package/dist/cli/chunks/schedule-Y7VVCPYV.js +2 -0
- package/dist/cli/chunks/scheduler-AUQIFQB7.js +2 -0
- package/dist/cli/chunks/security-EBEG2OPU.js +14 -0
- package/dist/cli/chunks/shared-rvf-dual-writer-BVSCQAFS.js +2 -0
- package/dist/cli/chunks/sqlite-persistence-JAVHUGGL.js +2 -0
- package/dist/cli/chunks/status-handler-VZ32M4G4.js +45 -0
- package/dist/cli/chunks/structural-health-K6LRCKV6.js +2 -0
- package/dist/cli/chunks/sync-MHSHNLIM.js +23 -0
- package/dist/cli/chunks/task-handler-JNOIBZ2G.js +49 -0
- package/dist/cli/chunks/task-handlers-P5DSUKND.js +2 -0
- package/dist/cli/chunks/test-DO22BNIL.js +33 -0
- package/dist/cli/chunks/test-scheduling-VLRQZEFL.js +15 -0
- package/dist/cli/chunks/token-bootstrap-4VJKGVMK.js +2 -0
- package/dist/cli/chunks/token-usage-LG3PXRXH.js +25 -0
- package/dist/cli/chunks/transformers-GY7SIKEU.js +2 -0
- package/dist/cli/chunks/tree-sitter-wasm-parser-FT2KB66N.js +2 -0
- package/dist/cli/chunks/types-QJGNBKP2.js +2 -0
- package/dist/cli/chunks/unified-memory-XYGENQUT.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-MVEGQBF3.js +2 -0
- package/dist/cli/chunks/unified-persistence-PFRCWEUG.js +2 -0
- package/dist/cli/chunks/validate-VQCRSVNQ.js +21 -0
- package/dist/cli/chunks/validate-swarm-A5DHAWTP.js +14 -0
- package/dist/cli/chunks/vibium-RZBSL4EB.js +2 -0
- package/dist/cli/chunks/visual-security-V47BLGJM.js +2 -0
- package/dist/cli/chunks/web-tree-sitter-7C4NXEOF.js +2 -0
- package/dist/cli/chunks/windsurf-installer-ES3KPQG3.js +7 -0
- package/dist/cli/chunks/witness-chain-BR63P4A7.js +2 -0
- package/dist/cli/chunks/workflow-JETHX4ML.js +51 -0
- package/dist/cli/chunks/workflow-orchestrator-7PZMX3JZ.js +2 -0
- package/dist/cli/chunks/wrappers-WP5RH745.js +2 -0
- package/dist/cli/commands/daemon.d.ts +13 -0
- package/dist/cli/commands/daemon.js +224 -0
- package/dist/cli/commands/hooks-handlers/hooks-shared.js +2 -1
- package/dist/cli/commands/plugin.d.ts +12 -0
- package/dist/cli/commands/plugin.js +135 -0
- package/dist/cli/commands/workflow.d.ts +10 -0
- package/dist/cli/commands/workflow.js +587 -0
- package/dist/cli/handlers/brain-handler.js +13 -8
- package/dist/cli/handlers/heartbeat-handler.d.ts +1 -0
- package/dist/cli/handlers/heartbeat-handler.js +20 -10
- package/dist/cli/handlers/hypergraph-handler.js +3 -3
- package/dist/cli/handlers/init-handler.js +10 -9
- package/dist/cli/handlers/interfaces.d.ts +4 -4
- package/dist/cli/index.js +159 -638
- package/dist/cli/lazy-registry.d.ts +27 -0
- package/dist/cli/lazy-registry.js +70 -0
- package/dist/context/compaction/context-budget.d.ts +71 -0
- package/dist/context/compaction/context-budget.js +120 -0
- package/dist/context/compaction/index.d.ts +96 -0
- package/dist/context/compaction/index.js +259 -0
- package/dist/context/compaction/llm-caller-adapter.d.ts +14 -0
- package/dist/context/compaction/llm-caller-adapter.js +47 -0
- package/dist/context/compaction/tier1-microcompact.d.ts +33 -0
- package/dist/context/compaction/tier1-microcompact.js +47 -0
- package/dist/context/compaction/tier2-session-summary.d.ts +72 -0
- package/dist/context/compaction/tier2-session-summary.js +172 -0
- package/dist/context/compaction/tier3-llm-compact.d.ts +65 -0
- package/dist/context/compaction/tier3-llm-compact.js +166 -0
- package/dist/context/compaction/tier4-reactive.d.ts +54 -0
- package/dist/context/compaction/tier4-reactive.js +129 -0
- package/dist/coordination/consensus/providers/claude-provider.d.ts +1 -0
- package/dist/coordination/consensus/providers/claude-provider.js +23 -3
- package/dist/domains/test-generation/generators/base-test-generator.d.ts +1 -1
- package/dist/domains/test-generation/generators/base-test-generator.js +11 -11
- package/dist/domains/test-generation/generators/go-test-generator.js +12 -12
- package/dist/domains/test-generation/generators/junit5-generator.js +9 -9
- package/dist/domains/test-generation/generators/kotlin-junit-generator.js +10 -10
- package/dist/domains/test-generation/generators/pytest-generator.js +8 -8
- package/dist/domains/test-generation/generators/swift-testing-generator.js +8 -8
- package/dist/domains/test-generation/generators/test-value-helpers.d.ts +20 -0
- package/dist/domains/test-generation/generators/test-value-helpers.js +48 -0
- package/dist/domains/test-generation/generators/xunit-generator.js +11 -11
- package/dist/hooks/cross-phase-hooks.d.ts +11 -0
- package/dist/hooks/cross-phase-hooks.js +73 -9
- package/dist/hooks/security/config-snapshot.d.ts +21 -0
- package/dist/hooks/security/config-snapshot.js +33 -0
- package/dist/hooks/security/exit-codes.d.ts +28 -0
- package/dist/hooks/security/exit-codes.js +33 -0
- package/dist/hooks/security/index.d.ts +15 -0
- package/dist/hooks/security/index.js +15 -0
- package/dist/hooks/security/ssrf-guard.d.ts +25 -0
- package/dist/hooks/security/ssrf-guard.js +69 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -2
- package/dist/init/init-wizard-hooks.js +15 -1
- package/dist/init/phases/07-hooks.js +2 -2
- package/dist/init/settings-merge.js +3 -7
- package/dist/kernel/kernel.js +35 -0
- package/dist/kernel/memory-backend.js +3 -1
- package/dist/mcp/bundle.js +416 -362
- package/dist/mcp/entry.js +132 -77
- package/dist/mcp/http-server.js +4 -1
- package/dist/mcp/index.d.ts +2 -2
- package/dist/mcp/index.js +5 -4
- package/dist/mcp/middleware/batch-executor.d.ts +46 -0
- package/dist/mcp/middleware/batch-executor.js +150 -0
- package/dist/mcp/middleware/microcompact.d.ts +97 -0
- package/dist/mcp/middleware/microcompact.js +179 -0
- package/dist/mcp/middleware/middleware-chain.d.ts +37 -0
- package/dist/mcp/middleware/middleware-chain.js +60 -0
- package/dist/mcp/protocol-server.d.ts +16 -0
- package/dist/mcp/protocol-server.js +140 -36
- package/dist/mcp/services/session-durability-middleware.d.ts +22 -0
- package/dist/mcp/services/session-durability-middleware.js +64 -0
- package/dist/mcp/services/session-resume.d.ts +29 -0
- package/dist/mcp/services/session-resume.js +221 -0
- package/dist/mcp/services/session-store.d.ts +84 -0
- package/dist/mcp/services/session-store.js +163 -0
- package/dist/mcp/tool-registry.d.ts +9 -0
- package/dist/mcp/tool-registry.js +30 -1
- package/dist/mcp/types.d.ts +1 -0
- package/dist/plugins/cache.d.ts +44 -0
- package/dist/plugins/cache.js +149 -0
- package/dist/plugins/index.d.ts +15 -0
- package/dist/plugins/index.js +15 -0
- package/dist/plugins/lifecycle.d.ts +67 -0
- package/dist/plugins/lifecycle.js +175 -0
- package/dist/plugins/manifest.d.ts +45 -0
- package/dist/plugins/manifest.js +173 -0
- package/dist/plugins/resolver.d.ts +37 -0
- package/dist/plugins/resolver.js +80 -0
- package/dist/plugins/security.d.ts +23 -0
- package/dist/plugins/security.js +125 -0
- package/dist/plugins/sources/github.d.ts +17 -0
- package/dist/plugins/sources/github.js +77 -0
- package/dist/plugins/sources/local.d.ts +20 -0
- package/dist/plugins/sources/local.js +32 -0
- package/dist/plugins/sources/npm.d.ts +18 -0
- package/dist/plugins/sources/npm.js +82 -0
- package/dist/shared/llm/retry.d.ts +5 -2
- package/dist/shared/llm/retry.js +7 -3
- package/dist/shared/prompt-cache-latch.d.ts +41 -0
- package/dist/shared/prompt-cache-latch.js +63 -0
- package/dist/shared/retry-engine.d.ts +77 -0
- package/dist/shared/retry-engine.js +194 -0
- package/dist/workers/daemon.d.ts +8 -0
- package/dist/workers/daemon.js +13 -0
- package/dist/workers/quality-daemon/ci-monitor.d.ts +55 -0
- package/dist/workers/quality-daemon/ci-monitor.js +147 -0
- package/dist/workers/quality-daemon/coverage-delta.d.ts +72 -0
- package/dist/workers/quality-daemon/coverage-delta.js +135 -0
- package/dist/workers/quality-daemon/git-watcher.d.ts +51 -0
- package/dist/workers/quality-daemon/git-watcher.js +209 -0
- package/dist/workers/quality-daemon/index.d.ts +119 -0
- package/dist/workers/quality-daemon/index.js +343 -0
- package/dist/workers/quality-daemon/nightly-consolidation.d.ts +74 -0
- package/dist/workers/quality-daemon/nightly-consolidation.js +136 -0
- package/dist/workers/quality-daemon/notification-service.d.ts +67 -0
- package/dist/workers/quality-daemon/notification-service.js +178 -0
- package/dist/workers/quality-daemon/persistent-memory.d.ts +31 -0
- package/dist/workers/quality-daemon/persistent-memory.js +30 -0
- package/dist/workers/quality-daemon/priority-queue.d.ts +97 -0
- package/dist/workers/quality-daemon/priority-queue.js +126 -0
- package/dist/workers/quality-daemon/test-suggester.d.ts +50 -0
- package/dist/workers/quality-daemon/test-suggester.js +121 -0
- package/dist/workers/worker-manager.js +2 -1
- package/package.json +1 -1
- package/dist/mcp/server.d.ts +0 -46
- package/dist/mcp/server.js +0 -802
|
@@ -0,0 +1,587 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agentic QE v3 - Workflow Command (ADR-041)
|
|
3
|
+
*
|
|
4
|
+
* Extracted from index.ts to enable lazy loading.
|
|
5
|
+
* Manages QE workflows and pipelines.
|
|
6
|
+
*/
|
|
7
|
+
import { Command } from 'commander';
|
|
8
|
+
import chalk from 'chalk';
|
|
9
|
+
import { parsePipelineFile, validatePipeline, describeCronSchedule, } from '../utils/workflow-parser.js';
|
|
10
|
+
import { parseJsonOption } from '../helpers/safe-json.js';
|
|
11
|
+
import { createScheduleEntry } from '../scheduler/index.js';
|
|
12
|
+
import { formatDuration } from '../handlers/interfaces.js';
|
|
13
|
+
function collectWorkflowVars(val, acc) {
|
|
14
|
+
const idx = val.indexOf('=');
|
|
15
|
+
if (idx > 0) {
|
|
16
|
+
acc[val.substring(0, idx)] = val.substring(idx + 1);
|
|
17
|
+
}
|
|
18
|
+
return acc;
|
|
19
|
+
}
|
|
20
|
+
export function createWorkflowCommand(context, cleanupAndExit, ensureInitialized) {
|
|
21
|
+
const workflowCmd = new Command('workflow')
|
|
22
|
+
.description('Manage QE workflows and pipelines (ADR-041)');
|
|
23
|
+
workflowCmd
|
|
24
|
+
.command('run <file>')
|
|
25
|
+
.description('Execute a QE pipeline from YAML file')
|
|
26
|
+
.option('-w, --watch', 'Watch execution progress')
|
|
27
|
+
.option('-v, --verbose', 'Show detailed output')
|
|
28
|
+
.option('--params <json>', 'Additional parameters as JSON', '{}')
|
|
29
|
+
.action(async (file, options) => {
|
|
30
|
+
if (!await ensureInitialized())
|
|
31
|
+
return;
|
|
32
|
+
const fs = await import('fs');
|
|
33
|
+
const pathModule = await import('path');
|
|
34
|
+
const filePath = pathModule.resolve(file);
|
|
35
|
+
try {
|
|
36
|
+
console.log(chalk.blue(`\n Running workflow from: ${file}\n`));
|
|
37
|
+
const parseResult = parsePipelineFile(filePath);
|
|
38
|
+
if (!parseResult.success || !parseResult.workflow) {
|
|
39
|
+
console.log(chalk.red('Failed to parse pipeline:'));
|
|
40
|
+
for (const error of parseResult.errors) {
|
|
41
|
+
console.log(chalk.red(` ${error}`));
|
|
42
|
+
}
|
|
43
|
+
await cleanupAndExit(1);
|
|
44
|
+
}
|
|
45
|
+
const additionalParams = parseJsonOption(options.params, 'params');
|
|
46
|
+
const input = { ...additionalParams };
|
|
47
|
+
if (parseResult.pipeline) {
|
|
48
|
+
for (const stage of parseResult.pipeline.stages) {
|
|
49
|
+
if (stage.params) {
|
|
50
|
+
for (const [key, value] of Object.entries(stage.params)) {
|
|
51
|
+
input[key] = value;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
const existingWorkflow = context.workflowOrchestrator.getWorkflow(parseResult.workflow.id);
|
|
57
|
+
if (!existingWorkflow) {
|
|
58
|
+
const registerResult = context.workflowOrchestrator.registerWorkflow(parseResult.workflow);
|
|
59
|
+
if (!registerResult.success) {
|
|
60
|
+
console.log(chalk.red(`Failed to register workflow: ${registerResult.error.message}`));
|
|
61
|
+
await cleanupAndExit(1);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
const execResult = await context.workflowOrchestrator.executeWorkflow(parseResult.workflow.id, input);
|
|
65
|
+
if (!execResult.success) {
|
|
66
|
+
console.log(chalk.red(`Failed to start workflow: ${execResult.error.message}`));
|
|
67
|
+
await cleanupAndExit(1);
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
const executionId = execResult.value;
|
|
71
|
+
console.log(chalk.cyan(` Execution ID: ${executionId}`));
|
|
72
|
+
console.log(chalk.gray(` Workflow: ${parseResult.workflow.name}`));
|
|
73
|
+
console.log(chalk.gray(` Stages: ${parseResult.workflow.steps.length}`));
|
|
74
|
+
console.log('');
|
|
75
|
+
if (options.watch) {
|
|
76
|
+
console.log(chalk.blue('Workflow Progress:\n'));
|
|
77
|
+
let lastStatus;
|
|
78
|
+
const startTime = Date.now();
|
|
79
|
+
while (true) {
|
|
80
|
+
const status = context.workflowOrchestrator.getWorkflowStatus(executionId);
|
|
81
|
+
if (!status)
|
|
82
|
+
break;
|
|
83
|
+
if (!lastStatus ||
|
|
84
|
+
lastStatus.progress !== status.progress ||
|
|
85
|
+
lastStatus.status !== status.status ||
|
|
86
|
+
JSON.stringify(lastStatus.currentSteps) !== JSON.stringify(status.currentSteps)) {
|
|
87
|
+
process.stdout.write('\r\x1b[K');
|
|
88
|
+
const progressBar = String.fromCharCode(0x2588).repeat(Math.floor(status.progress / 5)) +
|
|
89
|
+
String.fromCharCode(0x2591).repeat(20 - Math.floor(status.progress / 5));
|
|
90
|
+
const statusColor = status.status === 'completed' ? chalk.green :
|
|
91
|
+
status.status === 'failed' ? chalk.red :
|
|
92
|
+
status.status === 'running' ? chalk.yellow : chalk.gray;
|
|
93
|
+
console.log(` [${progressBar}] ${status.progress}% - ${statusColor(status.status)}`);
|
|
94
|
+
if (status.currentSteps.length > 0 && options.verbose) {
|
|
95
|
+
console.log(chalk.gray(` Running: ${status.currentSteps.join(', ')}`));
|
|
96
|
+
}
|
|
97
|
+
lastStatus = status;
|
|
98
|
+
}
|
|
99
|
+
if (status.status === 'completed' || status.status === 'failed' || status.status === 'cancelled') {
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
await new Promise(resolve => setTimeout(resolve, 500));
|
|
103
|
+
}
|
|
104
|
+
const finalStatus = context.workflowOrchestrator.getWorkflowStatus(executionId);
|
|
105
|
+
if (finalStatus) {
|
|
106
|
+
console.log('');
|
|
107
|
+
const duration = finalStatus.duration || (Date.now() - startTime);
|
|
108
|
+
if (finalStatus.status === 'completed') {
|
|
109
|
+
console.log(chalk.green(`Workflow completed successfully`));
|
|
110
|
+
console.log(chalk.gray(` Duration: ${formatDuration(duration)}`));
|
|
111
|
+
console.log(chalk.gray(` Completed: ${finalStatus.completedSteps.length} stages`));
|
|
112
|
+
if (finalStatus.skippedSteps.length > 0) {
|
|
113
|
+
console.log(chalk.yellow(` Skipped: ${finalStatus.skippedSteps.length} stages`));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
else if (finalStatus.status === 'failed') {
|
|
117
|
+
console.log(chalk.red(`Workflow failed`));
|
|
118
|
+
console.log(chalk.red(` Error: ${finalStatus.error}`));
|
|
119
|
+
console.log(chalk.gray(` Failed stages: ${finalStatus.failedSteps.join(', ')}`));
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
console.log(chalk.yellow(`Workflow ${finalStatus.status}`));
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
console.log(chalk.green('Workflow execution started'));
|
|
128
|
+
console.log(chalk.gray(` Use 'aqe workflow status ${executionId}' to check progress`));
|
|
129
|
+
}
|
|
130
|
+
console.log('');
|
|
131
|
+
await cleanupAndExit(0);
|
|
132
|
+
}
|
|
133
|
+
catch (error) {
|
|
134
|
+
console.error(chalk.red('\nFailed to run workflow:'), error);
|
|
135
|
+
await cleanupAndExit(1);
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
workflowCmd
|
|
139
|
+
.command('schedule <file>')
|
|
140
|
+
.description('Schedule a QE pipeline for recurring execution')
|
|
141
|
+
.option('-c, --cron <expression>', 'Override cron schedule from file')
|
|
142
|
+
.option('-e, --enable', 'Enable immediately', true)
|
|
143
|
+
.action(async (file, options) => {
|
|
144
|
+
if (!await ensureInitialized())
|
|
145
|
+
return;
|
|
146
|
+
const pathModule = await import('path');
|
|
147
|
+
const filePath = pathModule.resolve(file);
|
|
148
|
+
try {
|
|
149
|
+
console.log(chalk.blue(`\nScheduling workflow from: ${file}\n`));
|
|
150
|
+
const parseResult = parsePipelineFile(filePath);
|
|
151
|
+
if (!parseResult.success || !parseResult.pipeline || !parseResult.workflow) {
|
|
152
|
+
console.log(chalk.red('Failed to parse pipeline:'));
|
|
153
|
+
for (const error of parseResult.errors) {
|
|
154
|
+
console.log(chalk.red(` ${error}`));
|
|
155
|
+
}
|
|
156
|
+
await cleanupAndExit(1);
|
|
157
|
+
}
|
|
158
|
+
const schedule = options.cron || parseResult.pipeline.schedule;
|
|
159
|
+
if (!schedule) {
|
|
160
|
+
console.log(chalk.red('No schedule specified'));
|
|
161
|
+
console.log(chalk.gray(' Add "schedule" field to YAML or use --cron option'));
|
|
162
|
+
await cleanupAndExit(1);
|
|
163
|
+
}
|
|
164
|
+
const existingWorkflow = context.workflowOrchestrator.getWorkflow(parseResult.workflow.id);
|
|
165
|
+
if (!existingWorkflow) {
|
|
166
|
+
const registerResult = context.workflowOrchestrator.registerWorkflow(parseResult.workflow);
|
|
167
|
+
if (!registerResult.success) {
|
|
168
|
+
console.log(chalk.red(`Failed to register workflow: ${registerResult.error.message}`));
|
|
169
|
+
await cleanupAndExit(1);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
const persistedSchedule = createScheduleEntry({
|
|
173
|
+
workflowId: parseResult.workflow.id,
|
|
174
|
+
pipelinePath: filePath,
|
|
175
|
+
schedule,
|
|
176
|
+
scheduleDescription: describeCronSchedule(schedule),
|
|
177
|
+
enabled: options.enable !== false,
|
|
178
|
+
});
|
|
179
|
+
await context.persistentScheduler.saveSchedule(persistedSchedule);
|
|
180
|
+
const scheduledWorkflow = {
|
|
181
|
+
id: persistedSchedule.id,
|
|
182
|
+
workflowId: persistedSchedule.workflowId,
|
|
183
|
+
pipelinePath: persistedSchedule.pipelinePath,
|
|
184
|
+
schedule: persistedSchedule.schedule,
|
|
185
|
+
scheduleDescription: persistedSchedule.scheduleDescription,
|
|
186
|
+
nextRun: new Date(persistedSchedule.nextRun),
|
|
187
|
+
enabled: persistedSchedule.enabled,
|
|
188
|
+
createdAt: new Date(persistedSchedule.createdAt),
|
|
189
|
+
};
|
|
190
|
+
context.scheduledWorkflows.set(scheduledWorkflow.id, scheduledWorkflow);
|
|
191
|
+
console.log(chalk.green('Workflow scheduled successfully (persisted to disk)'));
|
|
192
|
+
console.log(chalk.cyan(` Schedule ID: ${persistedSchedule.id}`));
|
|
193
|
+
console.log(chalk.gray(` Workflow: ${parseResult.workflow.name}`));
|
|
194
|
+
console.log(chalk.gray(` Schedule: ${schedule}`));
|
|
195
|
+
console.log(chalk.gray(` Description: ${persistedSchedule.scheduleDescription}`));
|
|
196
|
+
console.log(chalk.gray(` Next run: ${persistedSchedule.nextRun}`));
|
|
197
|
+
console.log(chalk.gray(` Status: ${persistedSchedule.enabled ? chalk.green('enabled') : chalk.yellow('disabled')}`));
|
|
198
|
+
console.log(chalk.yellow('\nNote: Scheduled workflows require daemon mode to run automatically'));
|
|
199
|
+
console.log(chalk.gray(' Start daemon with: npx aqe daemon start'));
|
|
200
|
+
console.log(chalk.gray(' Schedules are persisted to: ~/.aqe/schedules.json'));
|
|
201
|
+
console.log('');
|
|
202
|
+
await cleanupAndExit(0);
|
|
203
|
+
}
|
|
204
|
+
catch (error) {
|
|
205
|
+
console.error(chalk.red('\nFailed to schedule workflow:'), error);
|
|
206
|
+
await cleanupAndExit(1);
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
workflowCmd
|
|
210
|
+
.command('list')
|
|
211
|
+
.description('List workflows')
|
|
212
|
+
.option('-s, --scheduled', 'Show only scheduled workflows')
|
|
213
|
+
.option('-a, --active', 'Show only active executions')
|
|
214
|
+
.option('--all', 'Show all workflows (registered + scheduled + active)')
|
|
215
|
+
.action(async (options) => {
|
|
216
|
+
if (!await ensureInitialized())
|
|
217
|
+
return;
|
|
218
|
+
try {
|
|
219
|
+
console.log(chalk.blue('\nWorkflows\n'));
|
|
220
|
+
if (options.scheduled || options.all) {
|
|
221
|
+
console.log(chalk.cyan('Scheduled Workflows:'));
|
|
222
|
+
const scheduled = await context.persistentScheduler.getSchedules();
|
|
223
|
+
if (scheduled.length === 0) {
|
|
224
|
+
console.log(chalk.gray(' No scheduled workflows\n'));
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
for (const sched of scheduled) {
|
|
228
|
+
const statusIcon = sched.enabled ? chalk.green('*') : chalk.gray('o');
|
|
229
|
+
console.log(` ${statusIcon} ${chalk.white(sched.workflowId)}`);
|
|
230
|
+
console.log(chalk.gray(` ID: ${sched.id}`));
|
|
231
|
+
console.log(chalk.gray(` Schedule: ${sched.schedule} (${sched.scheduleDescription})`));
|
|
232
|
+
console.log(chalk.gray(` File: ${sched.pipelinePath}`));
|
|
233
|
+
console.log(chalk.gray(` Next run: ${sched.nextRun}`));
|
|
234
|
+
if (sched.lastRun) {
|
|
235
|
+
console.log(chalk.gray(` Last run: ${sched.lastRun}`));
|
|
236
|
+
}
|
|
237
|
+
console.log(chalk.gray(` Status: ${sched.enabled ? chalk.green('enabled') : chalk.yellow('disabled')}`));
|
|
238
|
+
console.log('');
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
if (options.active || options.all) {
|
|
243
|
+
console.log(chalk.cyan('Active Executions:'));
|
|
244
|
+
const activeExecutions = context.workflowOrchestrator.getActiveExecutions();
|
|
245
|
+
if (activeExecutions.length === 0) {
|
|
246
|
+
console.log(chalk.gray(' No active executions\n'));
|
|
247
|
+
}
|
|
248
|
+
else {
|
|
249
|
+
for (const exec of activeExecutions) {
|
|
250
|
+
const statusColor = exec.status === 'running' ? chalk.yellow : chalk.gray;
|
|
251
|
+
console.log(` ${statusColor('*')} ${chalk.white(exec.workflowName)}`);
|
|
252
|
+
console.log(chalk.gray(` Execution: ${exec.executionId}`));
|
|
253
|
+
console.log(chalk.gray(` Status: ${exec.status}`));
|
|
254
|
+
console.log(chalk.gray(` Progress: ${exec.progress}%`));
|
|
255
|
+
if (exec.currentSteps.length > 0) {
|
|
256
|
+
console.log(chalk.gray(` Current: ${exec.currentSteps.join(', ')}`));
|
|
257
|
+
}
|
|
258
|
+
console.log('');
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
if (!options.scheduled && !options.active || options.all) {
|
|
263
|
+
console.log(chalk.cyan('Registered Workflows:'));
|
|
264
|
+
const workflows = context.workflowOrchestrator.listWorkflows();
|
|
265
|
+
if (workflows.length === 0) {
|
|
266
|
+
console.log(chalk.gray(' No registered workflows\n'));
|
|
267
|
+
}
|
|
268
|
+
else {
|
|
269
|
+
for (const workflow of workflows) {
|
|
270
|
+
console.log(` ${chalk.white(workflow.name)} (${chalk.cyan(workflow.id)})`);
|
|
271
|
+
console.log(chalk.gray(` Version: ${workflow.version}`));
|
|
272
|
+
console.log(chalk.gray(` Steps: ${workflow.stepCount}`));
|
|
273
|
+
if (workflow.description) {
|
|
274
|
+
console.log(chalk.gray(` ${workflow.description}`));
|
|
275
|
+
}
|
|
276
|
+
if (workflow.tags && workflow.tags.length > 0) {
|
|
277
|
+
console.log(chalk.gray(` Tags: ${workflow.tags.join(', ')}`));
|
|
278
|
+
}
|
|
279
|
+
if (workflow.triggers && workflow.triggers.length > 0) {
|
|
280
|
+
console.log(chalk.gray(` Triggers: ${workflow.triggers.join(', ')}`));
|
|
281
|
+
}
|
|
282
|
+
console.log('');
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
await cleanupAndExit(0);
|
|
287
|
+
}
|
|
288
|
+
catch (error) {
|
|
289
|
+
console.error(chalk.red('\nFailed to list workflows:'), error);
|
|
290
|
+
await cleanupAndExit(1);
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
workflowCmd
|
|
294
|
+
.command('validate <file>')
|
|
295
|
+
.description('Validate a pipeline YAML file')
|
|
296
|
+
.option('-v, --verbose', 'Show detailed validation results')
|
|
297
|
+
.action(async (file, options) => {
|
|
298
|
+
const fs = await import('fs');
|
|
299
|
+
const pathModule = await import('path');
|
|
300
|
+
const filePath = pathModule.resolve(file);
|
|
301
|
+
try {
|
|
302
|
+
console.log(chalk.blue(`\nValidating pipeline: ${file}\n`));
|
|
303
|
+
if (!fs.existsSync(filePath)) {
|
|
304
|
+
console.log(chalk.red(`File not found: ${filePath}`));
|
|
305
|
+
await cleanupAndExit(1);
|
|
306
|
+
}
|
|
307
|
+
const parseResult = parsePipelineFile(filePath);
|
|
308
|
+
if (!parseResult.success) {
|
|
309
|
+
console.log(chalk.red('Parse errors:'));
|
|
310
|
+
for (const error of parseResult.errors) {
|
|
311
|
+
console.log(chalk.red(` * ${error}`));
|
|
312
|
+
}
|
|
313
|
+
await cleanupAndExit(1);
|
|
314
|
+
}
|
|
315
|
+
const validationResult = validatePipeline(parseResult.pipeline);
|
|
316
|
+
if (validationResult.valid) {
|
|
317
|
+
console.log(chalk.green('Pipeline is valid\n'));
|
|
318
|
+
}
|
|
319
|
+
else {
|
|
320
|
+
console.log(chalk.red('Pipeline has errors:\n'));
|
|
321
|
+
for (const error of validationResult.errors) {
|
|
322
|
+
console.log(chalk.red(` x [${error.path}] ${error.message}`));
|
|
323
|
+
}
|
|
324
|
+
console.log('');
|
|
325
|
+
}
|
|
326
|
+
if (validationResult.warnings.length > 0) {
|
|
327
|
+
console.log(chalk.yellow('Warnings:'));
|
|
328
|
+
for (const warning of validationResult.warnings) {
|
|
329
|
+
console.log(chalk.yellow(` * [${warning.path}] ${warning.message}`));
|
|
330
|
+
}
|
|
331
|
+
console.log('');
|
|
332
|
+
}
|
|
333
|
+
if (options.verbose && parseResult.pipeline) {
|
|
334
|
+
const pipeline = parseResult.pipeline;
|
|
335
|
+
console.log(chalk.cyan('Pipeline Details:\n'));
|
|
336
|
+
console.log(chalk.gray(` Name: ${pipeline.name}`));
|
|
337
|
+
console.log(chalk.gray(` Version: ${pipeline.version || '1.0.0'}`));
|
|
338
|
+
if (pipeline.description) {
|
|
339
|
+
console.log(chalk.gray(` Description: ${pipeline.description}`));
|
|
340
|
+
}
|
|
341
|
+
if (pipeline.schedule) {
|
|
342
|
+
console.log(chalk.gray(` Schedule: ${pipeline.schedule} (${describeCronSchedule(pipeline.schedule)})`));
|
|
343
|
+
}
|
|
344
|
+
if (pipeline.tags && pipeline.tags.length > 0) {
|
|
345
|
+
console.log(chalk.gray(` Tags: ${pipeline.tags.join(', ')}`));
|
|
346
|
+
}
|
|
347
|
+
console.log(chalk.cyan('\n Stages:'));
|
|
348
|
+
for (let i = 0; i < pipeline.stages.length; i++) {
|
|
349
|
+
const stage = pipeline.stages[i];
|
|
350
|
+
console.log(` ${i + 1}. ${chalk.white(stage.name)}`);
|
|
351
|
+
console.log(chalk.gray(` Command: ${stage.command}`));
|
|
352
|
+
if (stage.params) {
|
|
353
|
+
console.log(chalk.gray(` Params: ${JSON.stringify(stage.params)}`));
|
|
354
|
+
}
|
|
355
|
+
if (stage.depends_on && stage.depends_on.length > 0) {
|
|
356
|
+
console.log(chalk.gray(` Depends on: ${stage.depends_on.join(', ')}`));
|
|
357
|
+
}
|
|
358
|
+
if (stage.timeout) {
|
|
359
|
+
console.log(chalk.gray(` Timeout: ${stage.timeout}s`));
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
if (pipeline.triggers && pipeline.triggers.length > 0) {
|
|
363
|
+
console.log(chalk.cyan('\n Triggers:'));
|
|
364
|
+
for (const trigger of pipeline.triggers) {
|
|
365
|
+
console.log(chalk.gray(` * ${trigger.event}`));
|
|
366
|
+
if (trigger.branches) {
|
|
367
|
+
console.log(chalk.gray(` Branches: ${trigger.branches.join(', ')}`));
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
if (options.verbose && parseResult.workflow) {
|
|
373
|
+
console.log(chalk.cyan('\n Converted Workflow ID: ') + chalk.white(parseResult.workflow.id));
|
|
374
|
+
console.log(chalk.gray(` Steps: ${parseResult.workflow.steps.length}`));
|
|
375
|
+
for (const step of parseResult.workflow.steps) {
|
|
376
|
+
console.log(chalk.gray(` * ${step.id}: ${step.domain}.${step.action}`));
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
console.log('');
|
|
380
|
+
await cleanupAndExit(validationResult.valid ? 0 : 1);
|
|
381
|
+
}
|
|
382
|
+
catch (error) {
|
|
383
|
+
console.error(chalk.red('\nValidation failed:'), error);
|
|
384
|
+
await cleanupAndExit(1);
|
|
385
|
+
}
|
|
386
|
+
});
|
|
387
|
+
workflowCmd
|
|
388
|
+
.command('status <executionId>')
|
|
389
|
+
.description('Get workflow execution status')
|
|
390
|
+
.option('-v, --verbose', 'Show detailed step results')
|
|
391
|
+
.action(async (executionId, options) => {
|
|
392
|
+
if (!await ensureInitialized())
|
|
393
|
+
return;
|
|
394
|
+
try {
|
|
395
|
+
const status = context.workflowOrchestrator.getWorkflowStatus(executionId);
|
|
396
|
+
if (!status) {
|
|
397
|
+
console.log(chalk.red(`\nExecution not found: ${executionId}\n`));
|
|
398
|
+
await cleanupAndExit(1);
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
401
|
+
console.log(chalk.blue(`\nWorkflow Execution Status\n`));
|
|
402
|
+
const statusColor = status.status === 'completed' ? chalk.green :
|
|
403
|
+
status.status === 'failed' ? chalk.red :
|
|
404
|
+
status.status === 'running' ? chalk.yellow : chalk.gray;
|
|
405
|
+
console.log(` Execution ID: ${chalk.cyan(status.executionId)}`);
|
|
406
|
+
console.log(` Workflow: ${chalk.white(status.workflowName)} (${status.workflowId})`);
|
|
407
|
+
console.log(` Status: ${statusColor(status.status)}`);
|
|
408
|
+
console.log(` Progress: ${status.progress}%`);
|
|
409
|
+
console.log(` Started: ${status.startedAt.toISOString()}`);
|
|
410
|
+
if (status.completedAt) {
|
|
411
|
+
console.log(` Completed: ${status.completedAt.toISOString()}`);
|
|
412
|
+
}
|
|
413
|
+
if (status.duration) {
|
|
414
|
+
console.log(` Duration: ${formatDuration(status.duration)}`);
|
|
415
|
+
}
|
|
416
|
+
console.log(chalk.cyan('\n Step Summary:'));
|
|
417
|
+
console.log(chalk.gray(` Completed: ${status.completedSteps.length}`));
|
|
418
|
+
console.log(chalk.gray(` Skipped: ${status.skippedSteps.length}`));
|
|
419
|
+
console.log(chalk.gray(` Failed: ${status.failedSteps.length}`));
|
|
420
|
+
if (status.currentSteps.length > 0) {
|
|
421
|
+
console.log(chalk.yellow(` Running: ${status.currentSteps.join(', ')}`));
|
|
422
|
+
}
|
|
423
|
+
if (status.error) {
|
|
424
|
+
console.log(chalk.red(`\n Error: ${status.error}`));
|
|
425
|
+
}
|
|
426
|
+
if (options.verbose && status.stepResults.size > 0) {
|
|
427
|
+
console.log(chalk.cyan('\n Step Results:'));
|
|
428
|
+
for (const [stepId, result] of status.stepResults) {
|
|
429
|
+
const stepStatusColor = result.status === 'completed' ? chalk.green :
|
|
430
|
+
result.status === 'failed' ? chalk.red :
|
|
431
|
+
result.status === 'skipped' ? chalk.yellow : chalk.gray;
|
|
432
|
+
console.log(` ${stepStatusColor('*')} ${chalk.white(stepId)}: ${stepStatusColor(result.status)}`);
|
|
433
|
+
if (result.duration) {
|
|
434
|
+
console.log(chalk.gray(` Duration: ${formatDuration(result.duration)}`));
|
|
435
|
+
}
|
|
436
|
+
if (result.error) {
|
|
437
|
+
console.log(chalk.red(` Error: ${result.error}`));
|
|
438
|
+
}
|
|
439
|
+
if (result.retryCount && result.retryCount > 0) {
|
|
440
|
+
console.log(chalk.yellow(` Retries: ${result.retryCount}`));
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
console.log('');
|
|
445
|
+
await cleanupAndExit(0);
|
|
446
|
+
}
|
|
447
|
+
catch (error) {
|
|
448
|
+
console.error(chalk.red('\nFailed to get workflow status:'), error);
|
|
449
|
+
await cleanupAndExit(1);
|
|
450
|
+
}
|
|
451
|
+
});
|
|
452
|
+
workflowCmd
|
|
453
|
+
.command('cancel <executionId>')
|
|
454
|
+
.description('Cancel a running workflow')
|
|
455
|
+
.action(async (executionId) => {
|
|
456
|
+
if (!await ensureInitialized())
|
|
457
|
+
return;
|
|
458
|
+
try {
|
|
459
|
+
const result = await context.workflowOrchestrator.cancelWorkflow(executionId);
|
|
460
|
+
if (result.success) {
|
|
461
|
+
console.log(chalk.green(`\nWorkflow cancelled: ${executionId}\n`));
|
|
462
|
+
}
|
|
463
|
+
else {
|
|
464
|
+
console.log(chalk.red(`\nFailed to cancel workflow: ${result.error.message}\n`));
|
|
465
|
+
}
|
|
466
|
+
await cleanupAndExit(result.success ? 0 : 1);
|
|
467
|
+
}
|
|
468
|
+
catch (error) {
|
|
469
|
+
console.error(chalk.red('\nFailed to cancel workflow:'), error);
|
|
470
|
+
await cleanupAndExit(1);
|
|
471
|
+
}
|
|
472
|
+
});
|
|
473
|
+
workflowCmd
|
|
474
|
+
.command('browser-list')
|
|
475
|
+
.description('List available browser workflow templates')
|
|
476
|
+
.action(async () => {
|
|
477
|
+
try {
|
|
478
|
+
const { BrowserWorkflowTool } = await import('../../mcp/tools/test-execution/browser-workflow.js');
|
|
479
|
+
const tool = new BrowserWorkflowTool();
|
|
480
|
+
const result = await tool.invoke({});
|
|
481
|
+
if (result.success && result.data) {
|
|
482
|
+
console.log(chalk.blue('\n Browser Workflow Templates:\n'));
|
|
483
|
+
for (const t of result.data.availableTemplates) {
|
|
484
|
+
console.log(` ${chalk.cyan(t)}`);
|
|
485
|
+
}
|
|
486
|
+
console.log('');
|
|
487
|
+
}
|
|
488
|
+
else {
|
|
489
|
+
console.log(chalk.red(`Failed: ${result.error || 'Unknown error'}`));
|
|
490
|
+
}
|
|
491
|
+
await cleanupAndExit(0);
|
|
492
|
+
}
|
|
493
|
+
catch (error) {
|
|
494
|
+
console.error(chalk.red('\nFailed:'), error);
|
|
495
|
+
await cleanupAndExit(1);
|
|
496
|
+
}
|
|
497
|
+
});
|
|
498
|
+
workflowCmd
|
|
499
|
+
.command('browser-load [template]')
|
|
500
|
+
.description('Load and validate a browser workflow template or inline YAML')
|
|
501
|
+
.option('--yaml <yaml>', 'Inline YAML workflow definition')
|
|
502
|
+
.option('-v, --var <key=value>', 'Variable override (repeatable)', collectWorkflowVars, {})
|
|
503
|
+
.option('-F, --format <format>', 'Output format (text|json)', 'text')
|
|
504
|
+
.option('-o, --output <path>', 'Write output to file')
|
|
505
|
+
.action(async (template, options) => {
|
|
506
|
+
try {
|
|
507
|
+
const { BrowserWorkflowTool } = await import('../../mcp/tools/test-execution/browser-workflow.js');
|
|
508
|
+
const { writeOutput, toJSON } = await import('../utils/ci-output.js');
|
|
509
|
+
const tool = new BrowserWorkflowTool();
|
|
510
|
+
const params = {
|
|
511
|
+
variables: options.var || {},
|
|
512
|
+
};
|
|
513
|
+
if (options.yaml) {
|
|
514
|
+
params.workflowYaml = options.yaml;
|
|
515
|
+
}
|
|
516
|
+
else if (template) {
|
|
517
|
+
if (template.endsWith('.yaml') || template.endsWith('.yml')) {
|
|
518
|
+
const fs = await import('fs');
|
|
519
|
+
const pathModule = await import('path');
|
|
520
|
+
const filePath = pathModule.resolve(template);
|
|
521
|
+
if (!fs.existsSync(filePath)) {
|
|
522
|
+
console.log(chalk.red(`\nFile not found: ${filePath}\n`));
|
|
523
|
+
await cleanupAndExit(1);
|
|
524
|
+
}
|
|
525
|
+
params.workflowYaml = fs.readFileSync(filePath, 'utf-8');
|
|
526
|
+
}
|
|
527
|
+
else {
|
|
528
|
+
params.templateName = template;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
else {
|
|
532
|
+
console.log(chalk.red('\nProvide a template name or --yaml. Use "workflow browser-list" to see templates.\n'));
|
|
533
|
+
await cleanupAndExit(1);
|
|
534
|
+
}
|
|
535
|
+
console.log(chalk.blue(`\n Loading browser workflow${template ? ': ' + template : ''}...\n`));
|
|
536
|
+
const result = await tool.invoke(params);
|
|
537
|
+
if (result.success && result.data) {
|
|
538
|
+
const data = result.data;
|
|
539
|
+
if (options.format === 'json') {
|
|
540
|
+
writeOutput(toJSON(data), options.output);
|
|
541
|
+
}
|
|
542
|
+
else {
|
|
543
|
+
console.log(chalk.green(` Workflow: ${data.workflowName}`));
|
|
544
|
+
if (data.description) {
|
|
545
|
+
console.log(chalk.gray(` ${data.description}`));
|
|
546
|
+
}
|
|
547
|
+
console.log(` Source: ${chalk.cyan(data.source)}`);
|
|
548
|
+
console.log(` Steps: ${chalk.white(data.steps.length)}`);
|
|
549
|
+
if (data.steps.length > 0) {
|
|
550
|
+
console.log(chalk.cyan('\n Steps:'));
|
|
551
|
+
for (const step of data.steps) {
|
|
552
|
+
const optTag = step.optional ? chalk.gray(' (optional)') : '';
|
|
553
|
+
const assertTag = step.assertionCount > 0 ? chalk.gray(` [${step.assertionCount} assertions]`) : '';
|
|
554
|
+
console.log(` ${chalk.white(step.name)} — ${step.action}${optTag}${assertTag}`);
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
if (data.variables.defined.length > 0) {
|
|
558
|
+
console.log(chalk.cyan('\n Variables:'));
|
|
559
|
+
for (const v of data.variables.defined) {
|
|
560
|
+
const req = v.required ? chalk.red('*') : '';
|
|
561
|
+
const def = v.hasDefault ? chalk.gray(' (has default)') : '';
|
|
562
|
+
console.log(` ${req}${chalk.white(v.name)}: ${v.type}${def}`);
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
if (!data.validation.valid) {
|
|
566
|
+
console.log(chalk.red('\n Validation errors:'));
|
|
567
|
+
for (const err of data.validation.errors) {
|
|
568
|
+
console.log(chalk.red(` - ${err}`));
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
console.log('');
|
|
572
|
+
}
|
|
573
|
+
await cleanupAndExit(data.validation.valid ? 0 : 1);
|
|
574
|
+
}
|
|
575
|
+
else {
|
|
576
|
+
console.log(chalk.red(`Failed: ${result.error || 'Unknown error'}`));
|
|
577
|
+
await cleanupAndExit(1);
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
catch (error) {
|
|
581
|
+
console.error(chalk.red('\nFailed:'), error);
|
|
582
|
+
await cleanupAndExit(1);
|
|
583
|
+
}
|
|
584
|
+
});
|
|
585
|
+
return workflowCmd;
|
|
586
|
+
}
|
|
587
|
+
//# sourceMappingURL=workflow.js.map
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import path from 'path';
|
|
8
8
|
import chalk from 'chalk';
|
|
9
|
-
import { findProjectRoot } from '../../kernel/unified-memory.js';
|
|
10
9
|
import { exportBrain, importBrain, brainInfo, witnessBackfill, } from '../brain-commands.js';
|
|
11
10
|
// ============================================================================
|
|
12
11
|
// Brain Handler
|
|
@@ -29,7 +28,7 @@ export class BrainHandler {
|
|
|
29
28
|
.description('Export brain state to a portable directory')
|
|
30
29
|
.requiredOption('-o, --output <path>', 'Output directory path')
|
|
31
30
|
.option('--format <format>', 'Export format: rvf (default) or jsonl', 'rvf')
|
|
32
|
-
.option('--db <path>', 'Source database path'
|
|
31
|
+
.option('--db <path>', 'Source database path')
|
|
33
32
|
.action(async (options) => {
|
|
34
33
|
await this.executeExport(options);
|
|
35
34
|
});
|
|
@@ -39,7 +38,7 @@ export class BrainHandler {
|
|
|
39
38
|
.requiredOption('-i, --input <path>', 'Path to brain export directory')
|
|
40
39
|
.option('--strategy <strategy>', 'Merge strategy', 'skip-conflicts')
|
|
41
40
|
.option('--dry-run', 'Preview import without writing', false)
|
|
42
|
-
.option('--db <path>', 'Target database path'
|
|
41
|
+
.option('--db <path>', 'Target database path')
|
|
43
42
|
.action(async (options) => {
|
|
44
43
|
await this.executeImport(options);
|
|
45
44
|
});
|
|
@@ -53,7 +52,7 @@ export class BrainHandler {
|
|
|
53
52
|
brain
|
|
54
53
|
.command('witness-backfill')
|
|
55
54
|
.description('Create witness chain entries for patterns that predate the witness chain')
|
|
56
|
-
.option('--db <path>', 'Database path'
|
|
55
|
+
.option('--db <path>', 'Database path')
|
|
57
56
|
.action(async (options) => {
|
|
58
57
|
await this.executeWitnessBackfill(options);
|
|
59
58
|
});
|
|
@@ -61,7 +60,8 @@ export class BrainHandler {
|
|
|
61
60
|
async executeExport(options) {
|
|
62
61
|
try {
|
|
63
62
|
console.log(chalk.blue(`\n Exporting brain state (format: ${options.format})...\n`));
|
|
64
|
-
const
|
|
63
|
+
const dbPath = await resolveDbPath(options.db);
|
|
64
|
+
const manifest = await exportBrain(dbPath, {
|
|
65
65
|
outputPath: path.resolve(options.output),
|
|
66
66
|
format: options.format,
|
|
67
67
|
});
|
|
@@ -97,7 +97,8 @@ export class BrainHandler {
|
|
|
97
97
|
else {
|
|
98
98
|
console.log(chalk.blue('\n Importing brain state...\n'));
|
|
99
99
|
}
|
|
100
|
-
const
|
|
100
|
+
const importDbPath = await resolveDbPath(options.db);
|
|
101
|
+
const result = await importBrain(importDbPath, path.resolve(options.input), {
|
|
101
102
|
mergeStrategy: options.strategy,
|
|
102
103
|
dryRun: options.dryRun,
|
|
103
104
|
});
|
|
@@ -226,7 +227,8 @@ export class BrainHandler {
|
|
|
226
227
|
async executeWitnessBackfill(options) {
|
|
227
228
|
try {
|
|
228
229
|
console.log(chalk.blue('\n Running witness chain backfill...\n'));
|
|
229
|
-
const
|
|
230
|
+
const backfillDbPath = await resolveDbPath(options.db);
|
|
231
|
+
const result = await witnessBackfill(backfillDbPath);
|
|
230
232
|
console.log(chalk.green(' Backfill complete.'));
|
|
231
233
|
console.log(` Created: ${chalk.cyan(result.created)} new witness entries`);
|
|
232
234
|
console.log(` Skipped: ${chalk.cyan(result.skipped)} (already witnessed)`);
|
|
@@ -270,7 +272,10 @@ Examples:
|
|
|
270
272
|
// ============================================================================
|
|
271
273
|
// Helpers
|
|
272
274
|
// ============================================================================
|
|
273
|
-
function
|
|
275
|
+
async function resolveDbPath(optionValue) {
|
|
276
|
+
if (optionValue)
|
|
277
|
+
return optionValue;
|
|
278
|
+
const { findProjectRoot } = await import('../../kernel/unified-memory.js');
|
|
274
279
|
return path.join(findProjectRoot(), '.agentic-qe', 'memory.db');
|
|
275
280
|
}
|
|
276
281
|
function formatBytes(bytes) {
|
|
@@ -13,6 +13,7 @@ export declare class HeartbeatHandler implements ICommandHandler {
|
|
|
13
13
|
private cleanupAndExit;
|
|
14
14
|
private worker;
|
|
15
15
|
constructor(cleanupAndExit: (code: number) => Promise<never>);
|
|
16
|
+
private getWorker;
|
|
16
17
|
register(program: Command, _context: CLIContext): void;
|
|
17
18
|
private executeStatus;
|
|
18
19
|
private executeRunNow;
|