agentic-qe 3.9.2 → 3.9.3
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/CHANGELOG.md +33 -0
- package/dist/cli/bundle.js +5 -5
- package/dist/cli/chunks/adapter-WKI55MLS.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-AKAOHSCX.js → agent-booster-wasm-W6GGSB43.js} +2 -2
- package/dist/cli/chunks/{agent-handler-MTGPOUVP.js → agent-handler-3IRN5WBS.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-UFPKWUFK.js → agent-memory-branch-SO63CIPJ.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-QQHHH3ZL.js +2 -0
- package/dist/cli/chunks/{audit-VBEZHNHO.js → audit-TONGHW5H.js} +2 -2
- package/dist/cli/chunks/base-3ENVJTIL.js +2 -0
- package/dist/cli/chunks/{better-sqlite3-IRPHIXRU.js → better-sqlite3-OK5DP5FC.js} +2 -2
- package/dist/cli/chunks/{brain-handler-7EO3FFRZ.js → brain-handler-MC2S3UHL.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-MZRGP35N.js → branch-enumerator-PRKJKPAE.js} +2 -2
- package/dist/cli/chunks/{browser-VSIWQE7J.js → browser-WTMMBSU3.js} +2 -2
- package/dist/cli/chunks/browser-workflow-QVT343YP.js +2 -0
- package/dist/cli/chunks/{chunk-563PJBDM.js → chunk-2CPNZVGL.js} +2 -2
- package/dist/cli/chunks/{chunk-XFMKJ3UD.js → chunk-2GZ4EG3L.js} +1 -1
- package/dist/cli/chunks/{chunk-X6LCMOGC.js → chunk-2IU6WK32.js} +2 -2
- package/dist/cli/chunks/{chunk-PNL5G6TE.js → chunk-3GMN3PNP.js} +2 -2
- package/dist/cli/chunks/{chunk-56IWS2KY.js → chunk-3Q5FG6M3.js} +2 -2
- package/dist/cli/chunks/{chunk-WXWY2GAF.js → chunk-53YFAERL.js} +2 -2
- package/dist/cli/chunks/{chunk-LMMEUVE5.js → chunk-5B2KXDWF.js} +1 -1
- package/dist/cli/chunks/{chunk-TTOE336G.js → chunk-5OL6UOBM.js} +3 -3
- package/dist/cli/chunks/{chunk-XH53ARZD.js → chunk-5UMSMRJC.js} +2 -2
- package/dist/cli/chunks/{chunk-NRCKGXJJ.js → chunk-5YUNMBIH.js} +1 -1
- package/dist/cli/chunks/{chunk-QNBQBSAI.js → chunk-66RCUQCI.js} +2 -2
- package/dist/cli/chunks/{chunk-MY4LMIG7.js → chunk-6B4CTO5D.js} +2 -2
- package/dist/cli/chunks/{chunk-JOVINE23.js → chunk-6N26CWST.js} +2 -2
- package/dist/cli/chunks/{chunk-YXCU4CJX.js → chunk-7ASGPJWU.js} +1 -1
- package/dist/cli/chunks/{chunk-2Z2TFEOL.js → chunk-7HTSXZ77.js} +2 -2
- package/dist/cli/chunks/{chunk-QIH3E775.js → chunk-7JBIDAXT.js} +2 -2
- package/dist/cli/chunks/{chunk-4PKXIBX2.js → chunk-AS5WPUDR.js} +1 -1
- package/dist/cli/chunks/{chunk-GITD7SRQ.js → chunk-AWSYGQEB.js} +2 -2
- package/dist/cli/chunks/{chunk-AA33R5U4.js → chunk-BK445WWE.js} +2 -2
- package/dist/cli/chunks/{chunk-4LA7IW3V.js → chunk-BRCCPQXN.js} +1 -1
- package/dist/cli/chunks/{chunk-SRRFWTNF.js → chunk-CF4T4YSL.js} +2 -2
- package/dist/cli/chunks/{chunk-AKSJQ6B3.js → chunk-COIFERYS.js} +2 -2
- package/dist/cli/chunks/{chunk-N3F3CX4V.js → chunk-CU36MONI.js} +2 -2
- package/dist/cli/chunks/{chunk-65M7C6SH.js → chunk-D5AQDGTS.js} +1 -1
- package/dist/cli/chunks/{chunk-4D2ZG2QO.js → chunk-D5GIV6O7.js} +1 -1
- package/dist/cli/chunks/{chunk-XYJL6DKI.js → chunk-DBEU5ISS.js} +2 -2
- package/dist/cli/chunks/{chunk-DNLMZTE2.js → chunk-DBSVEWWL.js} +1 -1
- package/dist/cli/chunks/{chunk-5AUKULWO.js → chunk-DGRO6LSI.js} +2 -2
- package/dist/cli/chunks/{chunk-KTYUCZEM.js → chunk-DKOOKULB.js} +5 -5
- package/dist/cli/chunks/{chunk-V6XBAZNH.js → chunk-DTNXHRUF.js} +1 -1
- package/dist/cli/chunks/{chunk-UKDOMLBI.js → chunk-ELU576GE.js} +3 -3
- package/dist/cli/chunks/{chunk-NM6TIEJ3.js → chunk-ERWNQ6NC.js} +3 -3
- package/dist/cli/chunks/{chunk-E25S5E2D.js → chunk-EVIXQR4O.js} +1 -1
- package/dist/cli/chunks/{chunk-7SLN2JGP.js → chunk-EXTVDKH7.js} +3 -3
- package/dist/cli/chunks/{chunk-DSE57A5N.js → chunk-F6O5XLIE.js} +1 -1
- package/dist/cli/chunks/{chunk-7NOIIC7G.js → chunk-FIQ62VOQ.js} +1 -1
- package/dist/cli/chunks/chunk-FONTSK2O.js +2 -0
- package/dist/cli/chunks/{chunk-RITN3XR4.js → chunk-FR26EINS.js} +2 -2
- package/dist/cli/chunks/{chunk-Y6O7CDLI.js → chunk-FSUS5TV6.js} +2 -2
- package/dist/cli/chunks/{chunk-WG4GHAML.js → chunk-GBLX5XOH.js} +2 -2
- package/dist/cli/chunks/{chunk-KZUJBZ7B.js → chunk-GGEVILIS.js} +2 -2
- package/dist/cli/chunks/{chunk-L5YEPSDU.js → chunk-GGKV5IQR.js} +2 -2
- package/dist/cli/chunks/{chunk-BY47GV4T.js → chunk-GGQCAQM4.js} +2 -2
- package/dist/cli/chunks/{chunk-2VVV73PW.js → chunk-HJEWQD2B.js} +1 -1
- package/dist/cli/chunks/{chunk-VUAO4VFC.js → chunk-HVOOYPW6.js} +2 -2
- package/dist/cli/chunks/{chunk-Z54EO6E6.js → chunk-IOW7QTYT.js} +2 -2
- package/dist/cli/chunks/{chunk-CQP7ZFME.js → chunk-ITFNPXZL.js} +2 -2
- package/dist/cli/chunks/{chunk-25LFUL2K.js → chunk-J7QGH6PG.js} +2 -2
- package/dist/cli/chunks/{chunk-KQTJ2YLI.js → chunk-JF6AXXAL.js} +4 -4
- package/dist/cli/chunks/{chunk-J4BS6IWE.js → chunk-JI5MNJSU.js} +1 -1
- package/dist/cli/chunks/{chunk-4UH25U4O.js → chunk-JTIWAUWW.js} +1 -1
- package/dist/cli/chunks/{chunk-X35GP7TR.js → chunk-JXE2DFXM.js} +1 -1
- package/dist/cli/chunks/{chunk-L5WZUPZF.js → chunk-JZXSKPQB.js} +2 -2
- package/dist/cli/chunks/{chunk-2WBCYSUN.js → chunk-K2DDNM4V.js} +8 -8
- package/dist/cli/chunks/{chunk-TKF447CW.js → chunk-KV32LAKU.js} +1 -1
- package/dist/cli/chunks/{chunk-GCMVJS5X.js → chunk-LDLLHLKE.js} +2 -2
- package/dist/cli/chunks/{chunk-QODE4LM6.js → chunk-LHDR6E6F.js} +2 -2
- package/dist/cli/chunks/{chunk-DHE66JRR.js → chunk-LMN72H3V.js} +1 -1
- package/dist/cli/chunks/{chunk-GK72GUHA.js → chunk-LQDAH47F.js} +2 -2
- package/dist/cli/chunks/{chunk-FRJLP7IB.js → chunk-LRE4A464.js} +2 -2
- package/dist/cli/chunks/{chunk-HW4ISY5B.js → chunk-M3EFT3XR.js} +3 -3
- package/dist/cli/chunks/chunk-M7PGW5Z5.js +2 -0
- package/dist/cli/chunks/{chunk-3GZKAORV.js → chunk-MNZ2HHKI.js} +2 -2
- package/dist/cli/chunks/{chunk-KBA7FBK3.js → chunk-MSKVWOND.js} +3 -3
- package/dist/cli/chunks/{chunk-RC5CPXON.js → chunk-NZLJWXXM.js} +2 -2
- package/dist/cli/chunks/{chunk-RJROC5M3.js → chunk-O2O5RO4H.js} +2 -2
- package/dist/cli/chunks/{chunk-6SOJVEU7.js → chunk-OBOCKH47.js} +2 -2
- package/dist/cli/chunks/{chunk-DBE34QES.js → chunk-OJKGRB6D.js} +2 -2
- package/dist/cli/chunks/{chunk-4DAOZQ3V.js → chunk-OV6H3TRU.js} +2 -2
- package/dist/cli/chunks/{chunk-SDTVHR63.js → chunk-OXR2FPHK.js} +2 -2
- package/dist/cli/chunks/{chunk-T5GV6UIO.js → chunk-OZNJZMQL.js} +2 -2
- package/dist/cli/chunks/{chunk-Q4A72ZTV.js → chunk-P4RYVWIR.js} +2 -2
- package/dist/cli/chunks/{chunk-VL7YOOC2.js → chunk-P6OZKWNK.js} +2 -2
- package/dist/cli/chunks/{chunk-SGAW2WLI.js → chunk-PD5YPC2A.js} +4 -4
- package/dist/cli/chunks/{chunk-BKCTNRC5.js → chunk-PKIBG7OJ.js} +2 -2
- package/dist/cli/chunks/{chunk-CQBSGYRA.js → chunk-PRIWFNVU.js} +2 -2
- package/dist/cli/chunks/{chunk-RQGYJK7H.js → chunk-PS6KLLLQ.js} +2 -2
- package/dist/cli/chunks/{chunk-NJY7ZA77.js → chunk-QAXJOCTW.js} +1 -1
- package/dist/cli/chunks/{chunk-PJFLO37I.js → chunk-QB2LOM5O.js} +2 -2
- package/dist/cli/chunks/{chunk-SNVM4YJS.js → chunk-RRELDHZY.js} +2 -2
- package/dist/cli/chunks/{chunk-VHVWAXCF.js → chunk-S23UV7FV.js} +1 -1
- package/dist/cli/chunks/{chunk-KZTO5EVM.js → chunk-SDHZLA45.js} +2 -2
- package/dist/cli/chunks/{chunk-5L6AU3QK.js → chunk-SFFI3MDN.js} +2 -2
- package/dist/cli/chunks/{chunk-BOH22AKC.js → chunk-SJLDTV5B.js} +2 -2
- package/dist/cli/chunks/{chunk-QEQTC4WQ.js → chunk-SVXIAQRW.js} +2 -2
- package/dist/cli/chunks/{chunk-CL3K5EJK.js → chunk-T4GTFSB2.js} +2 -2
- package/dist/cli/chunks/{chunk-Z5HXGVXZ.js → chunk-T4RR4YMH.js} +1 -1
- package/dist/cli/chunks/{chunk-STE42EMB.js → chunk-T5MWENBA.js} +2 -2
- package/dist/cli/chunks/{chunk-BIVIPF4O.js → chunk-TA454OEB.js} +1 -1
- package/dist/cli/chunks/{chunk-MN742FIH.js → chunk-TPFE3BAI.js} +2 -2
- package/dist/cli/chunks/{chunk-CCYMJKWX.js → chunk-TSS6LXJ6.js} +1 -1
- package/dist/cli/chunks/{chunk-5RL66XSH.js → chunk-TTEXJW2U.js} +2 -2
- package/dist/cli/chunks/{chunk-S3RDH5CI.js → chunk-TUHIFT65.js} +2 -2
- package/dist/cli/chunks/{chunk-QPRVX4H2.js → chunk-U6QQS5Z3.js} +2 -2
- package/dist/cli/chunks/{chunk-727BDQ3K.js → chunk-UC3RA5LW.js} +2 -2
- package/dist/cli/chunks/{chunk-4FT3PND7.js → chunk-UVWKIP3U.js} +3 -3
- package/dist/cli/chunks/{chunk-FAXVVLPL.js → chunk-VNSRA5PY.js} +2 -2
- package/dist/cli/chunks/{chunk-ICDXWIFZ.js → chunk-WAWCNUIJ.js} +1 -1
- package/dist/cli/chunks/{chunk-FUIHWBVF.js → chunk-WDTFG5AG.js} +1 -1
- package/dist/cli/chunks/{chunk-2EC5Z2J4.js → chunk-WIY3V5VQ.js} +9 -9
- package/dist/cli/chunks/{chunk-PFNFC43Q.js → chunk-WLK5UVRJ.js} +1 -1
- package/dist/cli/chunks/{chunk-34U7JDCN.js → chunk-WSVWVIVR.js} +2 -2
- package/dist/cli/chunks/{chunk-KDDZYXP4.js → chunk-X5C73DW5.js} +2 -2
- package/dist/cli/chunks/{chunk-SCF7NRVE.js → chunk-XJII5WMD.js} +1 -1
- package/dist/cli/chunks/{chunk-JV7LX6OT.js → chunk-YTBE2MEW.js} +4 -4
- package/dist/cli/chunks/{chunk-GPLERTZU.js → chunk-Z4V3XV7E.js} +2 -2
- package/dist/cli/chunks/{chunk-KNVAAVHH.js → chunk-ZMUVSL5Q.js} +2 -2
- package/dist/cli/chunks/{chunk-4Z27TRQF.js → chunk-ZQCU62JJ.js} +2 -2
- package/dist/cli/chunks/{chunk-4FMHBBG5.js → chunk-ZTIPMKUS.js} +1 -1
- package/dist/cli/chunks/{chunk-Z2IKNC5M.js → chunk-ZVMAE5JD.js} +1 -1
- package/dist/cli/chunks/{ci-2BCOBWFG.js → ci-XQEZTRJN.js} +2 -2
- package/dist/cli/chunks/{ci-output-FB4OJHAC.js → ci-output-ZWGXOIUD.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-NEEFZTMB.js → claude-flow-setup-PFJFHZSD.js} +2 -2
- package/dist/cli/chunks/client-VUKA3X4R.js +2 -0
- package/dist/cli/chunks/{cline-installer-ODO2PS4K.js → cline-installer-L3WC4KUM.js} +2 -2
- package/dist/cli/chunks/{code-NSOF62VE.js → code-QMDXXY6C.js} +2 -2
- package/dist/cli/chunks/{code-index-extractor-YQL5XN52.js → code-index-extractor-YTPMAZPU.js} +2 -2
- package/dist/cli/chunks/{codex-installer-SPEY6VYT.js → codex-installer-KO5G7LHQ.js} +2 -2
- package/dist/cli/chunks/{completions-OWKBUMBE.js → completions-KVDPIXMY.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-PGTXKP73.js → complexity-analyzer-KNIBPEC3.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-KGOXAC7L.js → continuedev-installer-N2GWI5PC.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-BF3UA3TG.js → copilot-installer-EX3UTDQN.js} +2 -2
- package/dist/cli/chunks/{cost-tracker-2HDJ66E2.js → cost-tracker-XX6OMP37.js} +2 -2
- package/dist/cli/chunks/{coverage-KPA2PHIN.js → coverage-FHDDNCPO.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-5SUV5AP6.js +2 -0
- package/dist/cli/chunks/{cursor-installer-7CDZFHTV.js → cursor-installer-M47YCQU7.js} +2 -2
- package/dist/cli/chunks/{daemon-4BPGCKDJ.js → daemon-EV3RXWAG.js} +3 -3
- package/dist/cli/chunks/{dag-attention-scheduler-2MAVGSBB.js → dag-attention-scheduler-J7JDWG5J.js} +2 -2
- package/dist/cli/chunks/{detect-WRPWTGP5.js → detect-4P5RKV5J.js} +2 -2
- package/dist/cli/chunks/{domain-handler-JZVSJ7AG.js → domain-handler-Q35TYDGA.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-XGIZOR2X.js → domain-transfer-XC34MV5U.js} +2 -2
- package/dist/cli/chunks/dream-2UNEPNI2.js +2 -0
- package/dist/cli/chunks/esm-node-TPR2KU6L.js +2 -0
- package/dist/cli/chunks/{eval-T7YPAS4G.js → eval-QZGRW7XD.js} +2 -2
- package/dist/cli/chunks/{fast-paths-QECJTKCQ.js → fast-paths-O42GG56B.js} +2 -2
- package/dist/cli/chunks/{feature-flags-LIFURSFZ.js → feature-flags-G6SJTDVO.js} +2 -2
- package/dist/cli/chunks/{feature-flags-R4QZYTIW.js → feature-flags-GIGWUPEX.js} +2 -2
- package/dist/cli/chunks/{file-discovery-4W3K3W4C.js → file-discovery-D4NXB3JP.js} +2 -2
- package/dist/cli/chunks/{fleet-NLLQWCI5.js → fleet-ZXZ5AAPW.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-XEII72LN.js → gnn-wrapper-YK6NAPJV.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-DJ65RE5D.js → heartbeat-handler-DD4T6U36.js} +4 -4
- package/dist/cli/chunks/{heartbeat-scheduler-H664265Q.js → heartbeat-scheduler-CBPO5KUB.js} +2 -2
- package/dist/cli/chunks/hnsw-adapter-BLMGBVDE.js +2 -0
- package/dist/cli/chunks/hnsw-index-UWMXU7RN.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-SQIDTWAA.js → hnsw-legacy-bridge-REKPPJ75.js} +2 -2
- package/dist/cli/chunks/{hnswlib-node-WICYCU5U.js → hnswlib-node-PMWK24KT.js} +2 -2
- package/dist/cli/chunks/{hooks-GZUHUD63.js → hooks-UDKFTCJ7.js} +6 -6
- package/dist/cli/chunks/{hypergraph-engine-MLCDZ6BL.js → hypergraph-engine-FIAZJD7K.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-NNDDI4R3.js → hypergraph-handler-NN2EBNBW.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-RK2VPRRL.js +2 -0
- package/dist/cli/chunks/{init-handler-IJ6BHE6A.js → init-handler-RK256F2M.js} +6 -6
- package/dist/cli/chunks/init-wizard-HA2VADPV.js +2 -0
- package/dist/cli/chunks/kernel-QMZBPOWP.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-EPZFFPFE.js → kilocode-installer-6XPW7IAO.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-5VACG3HU.js → kiro-installer-DOHZGTBZ.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-INYQCVMS.js +2 -0
- package/dist/cli/chunks/{learning-6FITK6XY.js → learning-GRSMZRPZ.js} +3 -3
- package/dist/cli/chunks/{llm-router-4DDC6AKJ.js → llm-router-MTZPLM7A.js} +2 -2
- package/dist/cli/chunks/{load-KGDNVUBX.js → load-CQXXMUR7.js} +2 -2
- package/dist/cli/chunks/load-test-YSEU2TUL.js +2 -0
- package/dist/cli/chunks/mcp-IIPV4IWF.js +2 -0
- package/dist/cli/chunks/{memory-II4I4QMO.js → memory-GIODHUAL.js} +5 -5
- package/dist/cli/chunks/memory-backend-MNSPY44E.js +2 -0
- package/dist/cli/chunks/{memory-handlers-TQXTOJGQ.js → memory-handlers-O6UVJSAG.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-EU6JCWBW.js → opencode-installer-DDIIEIKL.js} +2 -2
- package/dist/cli/chunks/{orchestrator-YLMGJVSP.js → orchestrator-PAQTJDA3.js} +18 -19
- package/dist/cli/chunks/{pipeline-MPZJWYKK.js → pipeline-6HFLH75G.js} +2 -2
- package/dist/cli/chunks/{platform-YH35ZZFZ.js → platform-UKK776G2.js} +2 -2
- package/dist/cli/chunks/{plugin-B7JYZFNQ.js → plugin-ERW5YBXU.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-KTUK6UE2.js → prime-radiant-advanced-wasm-WB5A4ULB.js} +2 -2
- package/dist/cli/chunks/protocol-executor-CBKER6RL.js +2 -0
- package/dist/cli/chunks/{protocol-handler-3NXMVU34.js → protocol-handler-AKDFZI6G.js} +2 -2
- package/dist/cli/chunks/{prove-H5LMGSUC.js → prove-GT5XEWVF.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-C3J4RA2M.js +2 -0
- package/dist/cli/chunks/{quality-RCWHY6GO.js → quality-VZAG6B54.js} +2 -2
- package/dist/cli/chunks/queen-coordinator-ZXTNAEYV.js +2 -0
- package/dist/cli/chunks/{real-embeddings-NKH4VURF.js → real-embeddings-KOOT5MTA.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-SB7QJYM3.js → roocode-installer-KHGDU6QK.js} +2 -2
- package/dist/cli/chunks/router-YMQF6M2D.js +2 -0
- package/dist/cli/chunks/routing-feedback-MM7LNDS7.js +2 -0
- package/dist/cli/chunks/{routing-handler-SY7GKG2W.js → routing-handler-HVCNYSJM.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-HATTO3UQ.js → ruvector-commands-D46MOJ32.js} +2 -2
- package/dist/cli/chunks/{rvf-dual-writer-D57EXQUD.js → rvf-dual-writer-WASNBBMN.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-adapter-OWDYN6KD.js → rvf-migration-adapter-ESLGEE5X.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-coordinator-SIQVJB5S.js → rvf-migration-coordinator-S5NAMHTP.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-3EEWPK4C.js +2 -0
- package/dist/cli/chunks/safe-db-5P6ABYNG.js +2 -0
- package/dist/cli/chunks/schedule-ZGESH3FK.js +2 -0
- package/dist/cli/chunks/scheduler-AC4AA2BD.js +2 -0
- package/dist/cli/chunks/{security-DS3XLZWN.js → security-4AHBDCJJ.js} +3 -3
- package/dist/cli/chunks/shared-rvf-adapter-UQQUEC52.js +2 -0
- package/dist/cli/chunks/{shared-rvf-dual-writer-YB7AH6XJ.js → shared-rvf-dual-writer-ZFNW4C3N.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-KXDW2Q66.js +2 -0
- package/dist/cli/chunks/{status-handler-TUYHE4FT.js → status-handler-ZVC4HX5J.js} +2 -2
- package/dist/cli/chunks/{structural-health-XNGBNRRD.js → structural-health-DPFQ4GEF.js} +2 -2
- package/dist/cli/chunks/{sync-K6CIRKBB.js → sync-7A5JMQNB.js} +2 -2
- package/dist/cli/chunks/{task-handler-7PJY67DR.js → task-handler-OFZ5YMXH.js} +2 -2
- package/dist/cli/chunks/{task-handlers-WB5CDWUR.js → task-handlers-IRSHSFQW.js} +2 -2
- package/dist/cli/chunks/{test-WV5ALEBB.js → test-F6XPB2DN.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-N55ZGGA2.js → test-scheduling-CPHQ7DBP.js} +3 -3
- package/dist/cli/chunks/{token-bootstrap-SINWHAKR.js → token-bootstrap-5YD6K4LL.js} +2 -2
- package/dist/cli/chunks/{token-usage-R7TGEVGL.js → token-usage-KQYGQAEK.js} +2 -2
- package/dist/cli/chunks/{transformers-6DBLXPV7.js → transformers-P7TT2MJB.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-7C7FKMQW.js → tree-sitter-wasm-parser-SUSDXGOP.js} +2 -2
- package/dist/cli/chunks/{types-VNPMOKQT.js → types-OEGMO7AH.js} +2 -2
- package/dist/cli/chunks/unified-memory-MNW25PVU.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-4RZRP37O.js +2 -0
- package/dist/cli/chunks/unified-persistence-6UBNXF25.js +2 -0
- package/dist/cli/chunks/{validate-53MNIRAF.js → validate-XI4GTLQR.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-ZY4RGUFO.js → validate-swarm-UZQR6AWZ.js} +2 -2
- package/dist/cli/chunks/{vibium-PBADBIV6.js → vibium-VPJH2KD5.js} +2 -2
- package/dist/cli/chunks/visual-security-7742DBSK.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-O7VI6RLB.js → web-tree-sitter-LUNFY67E.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-HV3C3TAD.js → windsurf-installer-LTJCP7AT.js} +2 -2
- package/dist/cli/chunks/witness-chain-QVPNOHDC.js +2 -0
- package/dist/cli/chunks/{witness-chain-4WIMYP4X.js → witness-chain-YWBIN5MQ.js} +2 -2
- package/dist/cli/chunks/{workflow-5RVAQ4TM.js → workflow-UGXLNO36.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-K3Q2GOEG.js +2 -0
- package/dist/cli/chunks/{wrappers-RRHCCA3E.js → wrappers-LUJRP2YI.js} +2 -2
- package/dist/cli/commands/mcp.js +27 -17
- package/dist/init/phases/06-code-intelligence.d.ts +33 -1
- package/dist/init/phases/06-code-intelligence.js +125 -10
- package/dist/init/phases/10-workers.d.ts +0 -14
- package/dist/init/phases/10-workers.js +19 -164
- package/dist/kernel/hnsw-adapter.d.ts +14 -0
- package/dist/kernel/hnsw-adapter.js +25 -1
- package/dist/kernel/hnsw-index-provider.d.ts +16 -0
- package/dist/kernel/native-hnsw-backend.d.ts +11 -0
- package/dist/kernel/native-hnsw-backend.js +20 -0
- package/dist/kernel/progressive-hnsw-backend.d.ts +9 -0
- package/dist/kernel/progressive-hnsw-backend.js +41 -12
- package/dist/kernel/unified-memory.js +10 -0
- package/dist/mcp/bundle.js +216 -216
- package/dist/optimization/token-optimizer-service.d.ts +31 -2
- package/dist/optimization/token-optimizer-service.js +85 -23
- package/package.json +1 -1
- package/dist/cli/chunks/adapter-53WBPKXU.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-MV7NGY24.js +0 -2
- package/dist/cli/chunks/base-DZVGMQN2.js +0 -2
- package/dist/cli/chunks/browser-workflow-3J5YNMEI.js +0 -2
- package/dist/cli/chunks/chunk-LCAA6H4J.js +0 -2
- package/dist/cli/chunks/chunk-XIBVVZGB.js +0 -2
- package/dist/cli/chunks/client-EF555KYW.js +0 -2
- package/dist/cli/chunks/cross-domain-router-GXFNK5TS.js +0 -2
- package/dist/cli/chunks/dream-3IKF5XH4.js +0 -2
- package/dist/cli/chunks/esm-node-DHAE52OW.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-DML5KXQR.js +0 -2
- package/dist/cli/chunks/hnsw-index-BUPPGVR6.js +0 -2
- package/dist/cli/chunks/impact-analyzer-DPTMJRYS.js +0 -2
- package/dist/cli/chunks/init-wizard-35PUDJPW.js +0 -2
- package/dist/cli/chunks/kernel-2HZ44ZJ4.js +0 -2
- package/dist/cli/chunks/knowledge-graph-JL62G72U.js +0 -2
- package/dist/cli/chunks/load-test-LN245SSD.js +0 -2
- package/dist/cli/chunks/mcp-4LETGVIV.js +0 -2
- package/dist/cli/chunks/memory-backend-SVM7YRIE.js +0 -2
- package/dist/cli/chunks/protocol-executor-IEN2XB4L.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-Q3ZV3JRG.js +0 -2
- package/dist/cli/chunks/queen-coordinator-E6ON3JUR.js +0 -2
- package/dist/cli/chunks/router-WMC3LZ3C.js +0 -2
- package/dist/cli/chunks/routing-feedback-VKCZRCE3.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-C7NBH5UN.js +0 -2
- package/dist/cli/chunks/safe-db-5KLXCNXN.js +0 -2
- package/dist/cli/chunks/schedule-HAWWOXWB.js +0 -2
- package/dist/cli/chunks/scheduler-HTRDY5BC.js +0 -2
- package/dist/cli/chunks/shared-rvf-adapter-6I2Z5UGL.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-WNNRGTGG.js +0 -2
- package/dist/cli/chunks/unified-memory-72SKVZ7Y.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-TMN2L77W.js +0 -2
- package/dist/cli/chunks/unified-persistence-MDN3SRCR.js +0 -2
- package/dist/cli/chunks/visual-security-TRBCXPIB.js +0 -2
- package/dist/cli/chunks/witness-chain-JOI2YYGK.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-2NQ72S3C.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,39 @@ All notable changes to the Agentic QE project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [3.9.3] - 2026-04-06
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **`aqe init --auto` hangs at "Code intelligence pre-scan"** — v3.9.2's fix only addressed the `AQELearningEngine → getSharedRvfDualWriter` deadlock, but the phase 06 hang in real projects (ruview, cf-devpod) had a different root cause: the indexer had no per-file or whole-phase timeout, so a single pathological file or a native-layer stall on overlay filesystems blocked the CLI indefinitely with no diagnostic. Phase 06 now drives indexing file-by-file with a **30 s per-file cap** and a **180 s whole-phase cap**. Partial results are preserved on timeout, the warning names the exact file responsible, and init continues. Progress lines log every 100 files so users can see where the indexer actually is.
|
|
13
|
+
- **`aqe init --auto` leaves cosmetic errors in the output** — Phase 10 workers spawned `aqe mcp` as a detached child to "pre-warm" the MCP daemon, but that spawn raced the parent for file locks and emitted a cascade of misleading errors: `[RVF] Shared adapter init failed: FsyncFailed`, `VectorDb creation failed: Database already open`, `Error: Could not find MCP server entry point`. None of these were real failures — the daemon was never needed, because Claude Code starts the MCP server on demand via `.mcp.json`. The spawn has been removed entirely. Phase 10 now completes in ~1 ms instead of 1500 ms.
|
|
14
|
+
- **`aqe mcp --help` / `aqe mcp` fails with "Could not find MCP server entry point"** — v3.9.0's esbuild code-splitting (`lazy-load CLI handlers`) placed CLI chunks under `dist/cli/chunks/`, breaking the fixed `__dirname + '..'` paths the MCP command used to locate `dist/mcp/bundle.js`. A regression of the v3.7.10 fix. `findMcpEntry()` now walks up to the nearest `package.json` with `name=agentic-qe` via the existing `findPackageRoot()` helper, with legacy sibling-path fallback for dev mode and an extra chunk-split candidate.
|
|
15
|
+
- **Every CLI command opens `patterns.rvf` and `memory.db` at startup** — `bootstrapTokenTracking()` was creating an `RvfPatternStore` (which auto-attached a `SQLitePatternStore`, which initialized `UnifiedMemory`) *before* commander had parsed argv, so `aqe --version`, `aqe --help`, and `aqe init` all grabbed exclusive file locks they never used. This is what was holding the locks that `cf-devpod`'s spawned daemon then fought with. `TokenOptimizerService.initialize()` is now a lazy registration — it stores the memory backend reference and config but defers pattern-store creation until the first `checkEarlyExit()` or `storePattern()` call. Commands that never touch the optimizer no longer open any files. `aqe --version` on a project with an existing `.agentic-qe/` directory now prints a single line instead of 6+ lines of bootstrap noise.
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- **Phase 06 per-file and phase-level watchdogs** — Configurable via `PER_FILE_TIMEOUT_MS` (30 s) and `PHASE_TIMEOUT_MS` (180 s) constants in `src/init/phases/06-code-intelligence.ts`. New `CodeIntelligenceResult.status = 'timeout'` variant with `timeoutFile` diagnostic field. Progress logged every `PROGRESS_LOG_INTERVAL` (100) files.
|
|
20
|
+
- **`IHnswIndexProvider.dispose()` contract** — Optional `dispose()` method for backends to release native resources. `NativeHnswBackend.dispose()` nulls the `nativeDb` reference so NAPI GC can reclaim the Rust-side index. `ProgressiveHnswBackend.dispose()` is a no-op. `HnswAdapter.close(name)` now invokes the backend dispose chain for tests and explicit shutdown.
|
|
21
|
+
- **Lazy `TokenOptimizerService` lifecycle** — `ensurePatternStoreReady()` is a private idempotent method invoked on first use by `checkEarlyExit()` and `storePattern()`. Concurrent callers share one `readyPromise`. Failure leaves the service in a "registered but unready" state that degrades to session-cache-only mode.
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- **Phase 10 Workers no longer spawns MCP daemon** — The `startDaemon()` / `findMcpCommand()` helpers have been removed. Users who want to run the MCP daemon manually can still use the generated `.agentic-qe/workers/start-daemon.cjs` helper script. Phase 10 continues to write the worker registry and individual worker configs.
|
|
26
|
+
- **`TokenOptimizerServiceImpl.initialize()` is now idempotent in both directions** — Calling it twice is still a no-op when `initialized=true`, but when `initialized` is externally reset to `false` (tests), the next `initialize()` call proactively clears stale `readyPromise` / `patternStore` / `optimizer` state to avoid picking up references to disposed memory backends.
|
|
27
|
+
|
|
28
|
+
### Verification
|
|
29
|
+
|
|
30
|
+
- 17/17 `token-optimizer-service` tests pass.
|
|
31
|
+
- 99/99 HNSW tests pass (native-hnsw-backend, hnsw-legacy-bridge, hnsw-unification).
|
|
32
|
+
- 53/53 `unified-memory` tests pass.
|
|
33
|
+
- 65/65 `pattern-store` / `rvf-pattern-store` tests pass.
|
|
34
|
+
- 32/32 init orchestrator + database-phase tests pass.
|
|
35
|
+
- Empty-project fixture: init completes in 436 ms (v3.9.2: 1787 ms) with zero errors.
|
|
36
|
+
- 200-file fixture: init completes in 621 ms with progress logs at 100/200 and 200/200.
|
|
37
|
+
- 15 k-entity heavy fixture: init completes in 2167 ms (v3.9.2: 3401 ms).
|
|
38
|
+
- Pre-existing `.agentic-qe/` + `aqe --version`: prints single line `3.9.3`, does not create `patterns.rvf`.
|
|
39
|
+
- `aqe mcp --help` exits 0 with usage text (v3.9.2: "Could not find MCP server entry point").
|
|
40
|
+
|
|
8
41
|
## [3.9.2] - 2026-04-06
|
|
9
42
|
|
|
10
43
|
### Fixed
|
package/dist/cli/bundle.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
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.
|
|
3
|
-
import{a as y}from"./chunks/chunk-
|
|
2
|
+
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.3");process.exit(0)}
|
|
3
|
+
import{a as y}from"./chunks/chunk-TA454OEB.js";import{a as f,c as A}from"./chunks/chunk-OXR2FPHK.js";import"./chunks/chunk-7ASGPJWU.js";A();import{Command as P}from"commander";import m from"chalk";function h(e,i,a,s){let l=e.command(i).description(a);if(s)for(let u of s)l.alias(u);return l.helpOption(!1),l.allowUnknownOption(!0),l.allowExcessArguments(!0),l}function w(e,i){let a=e.commands,s=a.indexOf(i);s>=0&&a.splice(s,1)}function r(e,i){let a=h(e,i.name,i.description,i.aliases);a.action(async()=>{try{let s=await i.factory();w(e,a),e.addCommand(s),await e.parseAsync(process.argv)}catch(s){console.error(`Failed to load command '${i.name}':`,s instanceof Error?s.message:s),process.exit(1)}})}function d(e,i,a,s,l,u){let g=h(e,i,a,u);g.action(async()=>{try{let p=await s();w(e,g),p.register(e,l),await e.parseAsync(process.argv)}catch(p){console.error(`Failed to load command '${i}':`,p instanceof Error?p.message:p),process.exit(1)}})}var S=["[UnifiedMemory]","[HybridBackend]","[UnifiedPersistence]","[PersistentSONAEngine]","[QueenGovernance]","[QueenCoordinator]","[Queen]","[QUEEN]","[DomainBreakerRegistry]","[RealEmbeddings]","[HNSWIndex]","[PatternStore]","[TestGenerationCoordinator]","[CodeIntelligence]","[ProductFactorsBridge]","[LearningOptimizationCoordinator]","[DreamEngine]","[DreamScheduler]","[SecurityCompliance]","[Providers]","[GNN]","[test-generation]","[test-execution]","[coverage-analysis]","[quality-assessment]","[defect-intelligence]","[requirements-validation]","[code-intelligence]","[security-compliance]","[contract-testing]","[visual-accessibility]","[chaos-resilience]","[learning-optimization]","[enterprise-integration]","[coordination]","[PatternLearnerService]","[RequirementsValidation]","[ParserRegistry]","[AdversarialDefense]","[ContinueGateIntegration]","[ContinueGate]","[SQLitePatternStore]","[TokenTracking]","[InfraHealing]","[ExperienceCapture]"],I=/^\[\d{2}:\d{2}:\d{2}\.\d{3}\]\s+\[/,b=console.log.bind(console);console.log=(...e)=>{let a=(typeof e[0]=="string"?e[0]:"").trimStart();if(S.some(s=>a.startsWith(s))||I.test(a)){process.stderr.write(e.map(String).join(" ")+`
|
|
4
4
|
`);return}b(...e)};var O=console.info.bind(console);console.info=(...e)=>{process.stderr.write(e.map(String).join(" ")+`
|
|
5
|
-
`)};var t={kernel:null,queen:null,router:null,workflowOrchestrator:null,scheduledWorkflows:new Map,persistentScheduler:null,initialized:!1};function C(e,i){let a=e.getDomainAPI("visual-accessibility");if(a?.registerWorkflowActions)try{a.registerWorkflowActions(i)}catch(l){console.error(m.yellow(` Warning: Could not register visual-accessibility workflow actions: ${f(l)}`))}let s=e.getDomainAPI("requirements-validation");if(s?.registerWorkflowActions)try{s.registerWorkflowActions(i)}catch(l){console.error(m.yellow(` Warning: Could not register requirements-validation workflow actions: ${f(l)}`))}}async function D(){let{QEKernelImpl:e}=await import("./chunks/kernel-
|
|
5
|
+
`)};var t={kernel:null,queen:null,router:null,workflowOrchestrator:null,scheduledWorkflows:new Map,persistentScheduler:null,initialized:!1};function C(e,i){let a=e.getDomainAPI("visual-accessibility");if(a?.registerWorkflowActions)try{a.registerWorkflowActions(i)}catch(l){console.error(m.yellow(` Warning: Could not register visual-accessibility workflow actions: ${f(l)}`))}let s=e.getDomainAPI("requirements-validation");if(s?.registerWorkflowActions)try{s.registerWorkflowActions(i)}catch(l){console.error(m.yellow(` Warning: Could not register requirements-validation workflow actions: ${f(l)}`))}}async function D(){let{QEKernelImpl:e}=await import("./chunks/kernel-QMZBPOWP.js"),{CrossDomainEventRouter:i}=await import("./chunks/cross-domain-router-5SUV5AP6.js"),{DefaultProtocolExecutor:a}=await import("./chunks/protocol-executor-CBKER6RL.js"),{WorkflowOrchestrator:s}=await import("./chunks/workflow-orchestrator-K3Q2GOEG.js"),{createQueenCoordinator:l}=await import("./chunks/queen-coordinator-ZXTNAEYV.js"),{createPersistentScheduler:u}=await import("./chunks/scheduler-AC4AA2BD.js");t.kernel=new e({maxConcurrentAgents:15,memoryBackend:"sqlite",hnswEnabled:!0,lazyLoading:!0,enabledDomains:[...y]}),await t.kernel.initialize(),t.router=new i(t.kernel.eventBus),await t.router.initialize();let g=E=>t.kernel.getDomainAPI(E),p=new a(t.kernel.eventBus,t.kernel.memory,g);t.workflowOrchestrator=new s(t.kernel.eventBus,t.kernel.memory,t.kernel.coordinator),await t.workflowOrchestrator.initialize(),C(t.kernel,t.workflowOrchestrator),t.persistentScheduler=u(),t.queen=l(t.kernel,t.router,p,void 0),await t.queen.initialize(),t.initialized=!0}async function k(){if(t.initialized&&t.kernel&&t.queen)return!0;let e=await import("fs"),a=(await import("path")).resolve(".agentic-qe");return e.existsSync(a)?c():(console.error(m.red(`
|
|
6
6
|
Error: AQE system not initialized in this directory.`)),console.log(m.yellow("Run `aqe init` first to set up this project.\n")),!1)}async function c(){if(t.initialized&&t.kernel&&t.queen)return!0;process.stderr.write(m.gray("Auto-initializing v3 system...")+`
|
|
7
7
|
`);let e=3e4,i=new Promise((a,s)=>{setTimeout(()=>s(new Error("Initialization timeout after 30 seconds")),e)});try{return await Promise.race([D(),i]),process.stderr.write(m.green("System ready")+`
|
|
8
8
|
|
|
9
|
-
`),!0}catch(a){return a.message.includes("timeout")?(console.error(m.red("Initialization timed out after 30 seconds.")),console.log(m.yellow("Try running `aqe init` manually."))):(console.error(m.red("Failed to auto-initialize:"),a),console.log(m.yellow("Try running `aqe init` manually."))),!1}}async function o(e=0){try{t.workflowOrchestrator&&t.workflowOrchestrator.dispose().catch(()=>{}),t.queen&&t.queen.dispose().catch(()=>{}),t.router&&t.router.dispose().catch(()=>{}),t.kernel&&t.kernel.dispose().catch(()=>{})}catch{}process.exit(e)}var n=new P,v="3.9.
|
|
9
|
+
`),!0}catch(a){return a.message.includes("timeout")?(console.error(m.red("Initialization timed out after 30 seconds.")),console.log(m.yellow("Try running `aqe init` manually."))):(console.error(m.red("Failed to auto-initialize:"),a),console.log(m.yellow("Try running `aqe init` manually."))),!1}}async function o(e=0){try{t.workflowOrchestrator&&t.workflowOrchestrator.dispose().catch(()=>{}),t.queen&&t.queen.dispose().catch(()=>{}),t.router&&t.router.dispose().catch(()=>{}),t.kernel&&t.kernel.dispose().catch(()=>{})}catch{}process.exit(e)}var n=new P,v="3.9.3";n.name("aqe").description("Agentic QE - Domain-Driven Quality Engineering").version(v);d(n,"init","Initialize the AQE v3 system",()=>import("./chunks/init-handler-RK256F2M.js").then(e=>e.createInitHandler(o)),t);d(n,"status","Show system status",()=>import("./chunks/status-handler-ZVC4HX5J.js").then(e=>e.createStatusHandler(o,k)),t);d(n,"health","Check system health",()=>import("./chunks/status-handler-ZVC4HX5J.js").then(e=>e.createHealthHandler(o,k)),t);d(n,"task","Manage QE tasks",()=>import("./chunks/task-handler-OFZ5YMXH.js").then(e=>e.createTaskHandler(o,c)),t);d(n,"agent","Manage QE agents",()=>import("./chunks/agent-handler-3IRN5WBS.js").then(e=>e.createAgentHandler(o,c)),t);d(n,"domain","Domain operations",()=>import("./chunks/domain-handler-Q35TYDGA.js").then(e=>e.createDomainHandler(o,c)),t);d(n,"protocol","Execute coordination protocols",()=>import("./chunks/protocol-handler-AKDFZI6G.js").then(e=>e.createProtocolHandler(o,c)),t);d(n,"brain","Export, import, and inspect QE brain state",()=>import("./chunks/brain-handler-MC2S3UHL.js").then(e=>e.createBrainHandler(o,c)),t);d(n,"hypergraph","Query the code knowledge hypergraph",()=>import("./chunks/hypergraph-handler-NN2EBNBW.js").then(e=>e.createHypergraphHandler(o,c)),t,["hg"]);d(n,"heartbeat","Manage the token-free heartbeat scheduler",()=>import("./chunks/heartbeat-handler-DD4T6U36.js").then(e=>e.createHeartbeatHandler(o)),t);d(n,"routing","View routing performance, economics, and accuracy",()=>import("./chunks/routing-handler-HVCNYSJM.js").then(e=>e.createRoutingHandler(o)),t);r(n,{name:"workflow",description:"Manage QE workflows and pipelines (ADR-041)",factory:()=>import("./chunks/workflow-UGXLNO36.js").then(e=>e.createWorkflowCommand(t,o,c))});r(n,{name:"test",description:"Test generation, execution, scheduling, and load testing",factory:()=>import("./chunks/test-F6XPB2DN.js").then(e=>e.createTestCommand(t,o,c))});r(n,{name:"coverage",description:"Coverage analysis shortcut",factory:()=>import("./chunks/coverage-FHDDNCPO.js").then(e=>e.createCoverageCommand(t,o,c))});r(n,{name:"quality",description:"Quality assessment shortcut",factory:()=>import("./chunks/quality-VZAG6B54.js").then(e=>e.createQualityCommand(t,o,c))});r(n,{name:"security",description:"Security scanning and URL validation",factory:()=>import("./chunks/security-4AHBDCJJ.js").then(e=>e.createSecurityCommand(t,o,c))});r(n,{name:"code",description:"Code intelligence analysis",factory:()=>import("./chunks/code-QMDXXY6C.js").then(e=>e.createCodeCommand(t,o,c))});r(n,{name:"completions",description:"Generate shell completions for aqe",factory:()=>import("./chunks/completions-KVDPIXMY.js").then(e=>e.createCompletionsCommand(o))});r(n,{name:"fleet",description:"Fleet operations with multi-agent progress tracking",factory:()=>import("./chunks/fleet-ZXZ5AAPW.js").then(e=>e.createFleetCommand(t,o,c,C))});r(n,{name:"validate",description:"Validation commands for skills and agents",factory:()=>import("./chunks/validate-swarm-UZQR6AWZ.js").then(e=>e.createValidateSwarmCommand(t,o,c))});r(n,{name:"skill",description:"Skill validation and reporting (ADR-056)",factory:()=>import("./chunks/validate-XI4GTLQR.js").then(e=>e.createValidateCommand(t,o,c))});r(n,{name:"eval",description:"Run skill evaluation suites in parallel",factory:()=>import("./chunks/eval-QZGRW7XD.js").then(e=>e.createEvalCommand())});r(n,{name:"ci",description:"CI/CD pipeline orchestration",factory:()=>import("./chunks/ci-XQEZTRJN.js").then(e=>e.createCICommand(t,o,c))});r(n,{name:"token-usage",description:"View and analyze token consumption metrics (ADR-042)",factory:()=>import("./chunks/token-usage-KQYGQAEK.js").then(e=>e.createTokenUsageCommand())});r(n,{name:"llm",description:"LLM Router management (ADR-043)",factory:()=>import("./chunks/llm-router-MTZPLM7A.js").then(e=>e.createLLMRouterCommand())});r(n,{name:"sync",description:"Sync local learning data to cloud PostgreSQL",factory:()=>import("./chunks/sync-7A5JMQNB.js").then(e=>e.createSyncCommands())});r(n,{name:"hooks",description:"Self-learning QE hooks for pattern recognition and guidance",factory:()=>import("./chunks/hooks-UDKFTCJ7.js").then(e=>e.createHooksCommand())});r(n,{name:"learning",description:"AQE self-learning system management (standalone, no claude-flow required)",factory:()=>import("./chunks/learning-GRSMZRPZ.js").then(e=>e.createLearningCommand())});r(n,{name:"memory",description:"Memory store, retrieve, search, and delete operations",factory:()=>import("./chunks/memory-GIODHUAL.js").then(e=>e.createMemoryCommand(t,o,c))});r(n,{name:"mcp",description:"Start the MCP protocol server for Claude Code integration",factory:()=>import("./chunks/mcp-IIPV4IWF.js").then(e=>e.createMcpCommand())});r(n,{name:"platform",description:"Manage coding agent platform configurations",factory:()=>import("./chunks/platform-UKK776G2.js").then(e=>e.createPlatformCommand())});r(n,{name:"prove",description:"Generate a verifiable Proof-of-Quality attestation",factory:()=>import("./chunks/prove-GT5XEWVF.js").then(e=>e.createProveCommand(t,o,c))});r(n,{name:"ruvector",description:"RuVector integration management",factory:()=>import("./chunks/ruvector-commands-D46MOJ32.js").then(e=>e.createRuVectorCommand())});r(n,{name:"audit",description:"Witness chain audit trail management",factory:()=>import("./chunks/audit-TONGHW5H.js").then(e=>e.createAuditCommand(t,o,c))});r(n,{name:"pipeline",description:"Manage YAML deterministic pipelines (Imp-9)",factory:()=>import("./chunks/pipeline-6HFLH75G.js").then(e=>e.createPipelineCommand(t,o,c))});r(n,{name:"plugin",description:"Manage external QE domain plugins",factory:()=>import("./chunks/plugin-ERW5YBXU.js").then(e=>e.createPluginCommand())});r(n,{name:"daemon",description:"Manage the QE Quality Daemon",factory:()=>import("./chunks/daemon-EV3RXWAG.js").then(e=>e.createDaemonCommand())});process.on("SIGINT",async()=>{console.log(m.yellow(`
|
|
10
10
|
|
|
11
11
|
Shutting down...`)),console.log(m.green(`Shutdown complete
|
|
12
12
|
`)),await o(0)});process.on("SIGTERM",async()=>{console.log(m.yellow(`
|
|
13
|
-
Received SIGTERM, shutting down gracefully...`)),await o(0)});async function z(){let{isVersionFastPath:e}=await import("./chunks/fast-paths-
|
|
13
|
+
Received SIGTERM, shutting down gracefully...`)),await o(0)});async function z(){let{isVersionFastPath:e}=await import("./chunks/fast-paths-O42GG56B.js");e(process.argv)&&(console.log(v),process.exit(0));let{bootstrapTokenTracking:i}=await import("./chunks/token-bootstrap-5YD6K4LL.js");await i({enableOptimization:!0,enablePersistence:!0,verbose:process.env.AQE_VERBOSE==="true"}),await n.parseAsync(),await o(0)}z().catch(async e=>{console.error(m.red("Fatal error:"),e),await o(1)});
|
|
@@ -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.3");process.exit(0)}
|
|
2
|
+
import{a,b,c}from"./chunk-MSKVWOND.js";import"./chunk-SJLDTV5B.js";import"./chunk-D5GIV6O7.js";import"./chunk-CU36MONI.js";import"./chunk-OXR2FPHK.js";import"./chunk-7ASGPJWU.js";export{a as AgentBoosterAdapter,b as createAgentBoosterAdapter,c as createAgentBoosterAdapterSync};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a as x}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.3");process.exit(0)}
|
|
2
|
+
import{a as x}from"./chunk-FONTSK2O.js";import{c as f}from"./chunk-6N26CWST.js";import"./chunk-7ASGPJWU.js";x();import{createRequire as w}from"module";var S=f.create("agent-booster-wasm"),t={JavaScript:0,TypeScript:1,Python:2,Rust:3,Go:4,Java:5,C:6,Cpp:7},l={ExactReplace:0,FuzzyReplace:1,InsertAfter:2,InsertBefore:3,Append:4},v={0:"JavaScript",1:"TypeScript",2:"Python",3:"Rust",4:"Go",5:"Java",6:"C",7:"Cpp"},a=null,u=null,p=null;async function g(){if(a)return!0;if(p)return!1;try{if(a=w(import.meta.url)("./agent_booster_wasm.js"),!a)throw new Error("WASM module loaded but is null");return u=new a.AgentBoosterWasm,!0}catch(e){return p=e,console.warn("[AgentBoosterWASM] Failed to load WASM module:",e),!1}}function A(e){return{".js":t.JavaScript,".mjs":t.JavaScript,".cjs":t.JavaScript,".jsx":t.JavaScript,".ts":t.TypeScript,".tsx":t.TypeScript,".mts":t.TypeScript,".cts":t.TypeScript,".py":t.Python,".rs":t.Rust,".go":t.Go,".java":t.Java,".c":t.C,".h":t.C,".cpp":t.Cpp,".cc":t.Cpp,".cxx":t.Cpp,".hpp":t.Cpp}[e.toLowerCase()]??t.JavaScript}var M=[{name:"var-to-const",detect:(e,r)=>e.includes("var ")&&r.includes("const "),apply:(e,r)=>e.replace(/\bvar\s+/g,"const ")},{name:"var-to-let",detect:(e,r)=>e.includes("var ")&&r.includes("let "),apply:(e,r)=>e.replace(/\bvar\s+/g,"let ")},{name:"add-types-function",detect:(e,r)=>e.includes("function")&&!e.includes(":")&&r.includes(":"),apply:(e,r)=>r},{name:"async-wrapper",detect:(e,r)=>!e.includes("async")&&r.includes("async")&&r.includes("await"),apply:(e,r)=>r},{name:"try-catch-wrapper",detect:(e,r)=>!e.includes("try {")&&r.includes("try {"),apply:(e,r)=>r},{name:"null-check",detect:(e,r)=>!e.includes("if (!")&&!e.includes("if (!")&&(r.includes("if (!")||r.includes("?.")),apply:(e,r)=>r},{name:"test-assertion",detect:(e,r)=>e.includes("test(")&&!e.includes("expect(")&&r.includes("expect("),apply:(e,r)=>r}];function y(e,r){for(let n of M)if(n.detect(e,r))try{return{success:!0,code:n.apply(e,r),pattern:n.name}}catch(s){S.debug("Pattern transform failed, trying next",{pattern:n.name,error:s instanceof Error?s.message:String(s)});continue}return{success:!1,code:r}}async function b(e,r,n,s={}){let o=performance.now(),{confidenceThreshold:T=.5,allowFallback:d=!0}=s;if(!e.trim())return{success:!0,mergedCode:r,confidence:1,strategy:l.Append,syntaxValid:!0,source:"fallback",latencyMs:performance.now()-o};if(await g()&&u&&a)try{let c=a.WasmLanguage[v[n]],i=u.apply_edit(e,r,c);return{success:!0,mergedCode:i.merged_code,confidence:i.confidence,strategy:i.strategy,syntaxValid:i.syntax_valid,source:"wasm",latencyMs:performance.now()-o}}catch(c){let i=c;if(d){let m=y(e,r);if(m.success)return{success:!0,mergedCode:m.code,confidence:.7,strategy:l.FuzzyReplace,syntaxValid:!0,source:"pattern",latencyMs:performance.now()-o}}return{success:!1,mergedCode:r,confidence:0,strategy:l.Append,syntaxValid:!1,source:"fallback",latencyMs:performance.now()-o,error:i.message}}if(d){let c=y(e,r);return{success:c.success,mergedCode:c.code,confidence:c.success?.7:0,strategy:l.FuzzyReplace,syntaxValid:!0,source:"pattern",latencyMs:performance.now()-o}}return{success:!1,mergedCode:r,confidence:0,strategy:l.Append,syntaxValid:!1,source:"fallback",latencyMs:performance.now()-o,error:p?.message??"WASM not available"}}async function W(e,r={}){return Promise.all(e.map(({original:n,edit:s,language:o})=>b(n,s,o,r)))}async function C(){return g()}async function L(){return await g()&&a?a.AgentBoosterWasm.version():"unavailable"}async function R(){if(await g(),u&&a)try{u.apply_edit("function x() {}","function x() {}",a.WasmLanguage.JavaScript)}catch(e){console.debug("[AgentBoosterWASM] Warmup error:",e instanceof Error?e.message:e)}}var _={transform:b,batchTransform:W,isWasmAvailable:C,getVersion:L,warmup:R,Language:t,MergeStrategy:l,languageFromExtension:A};export{t as Language,l as MergeStrategy,W as batchTransform,_ as default,L as getVersion,C as isWasmAvailable,A as languageFromExtension,b as transform,R as warmup};
|
|
@@ -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 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.3");process.exit(0)}
|
|
2
|
+
import{b as p}from"./chunk-TTEXJW2U.js";import{a as g}from"./chunk-D5AQDGTS.js";import"./chunk-CU36MONI.js";import"./chunk-7ASGPJWU.js";import s from"chalk";var l=class{name="agent";description="Manage QE agents";cleanupAndExit;ensureInitialized;constructor(n,t){this.cleanupAndExit=n,this.ensureInitialized=t}register(n,t){let a=n.command("agent").description(this.description);a.command("list").description("List all agents").option("-d, --domain <domain>","Filter by domain").option("-s, --status <status>","Filter by status").action(async e=>{await this.executeList(e,t)}),a.command("spawn <domain>").description("Spawn an agent in a domain").option("-t, --type <type>","Agent type","worker").option("-c, --capabilities <caps>","Comma-separated capabilities","general").option("--no-progress","Disable progress indicator").action(async(e,o)=>{await this.executeSpawn(e,o,t)})}async executeList(n,t){if(await this.ensureInitialized())try{let a=n.domain?t.queen.getAgentsByDomain(n.domain):t.queen.listAllAgents();if(n.status&&(a=a.filter(e=>e.status===n.status)),console.log(s.blue(`
|
|
3
3
|
Agents (${a.length})
|
|
4
4
|
`)),a.length===0)console.log(s.gray(" No agents found"));else{let e=new Map;for(let i of a)e.has(i.domain)||e.set(i.domain,[]),e.get(i.domain).push(i);let o=Array.from(e.entries());for(let[i,m]of o){console.log(s.cyan(` ${i}:`));for(let r of m)console.log(` ${r.id}`),console.log(` Type: ${r.type}`),console.log(` Status: ${g(r.status)}`),r.startedAt&&console.log(s.gray(` Started: ${r.startedAt.toISOString()}`));console.log("")}}}catch(a){console.error(s.red(`
|
|
5
5
|
Failed to list agents:`),a),await this.cleanupAndExit(1)}}async executeSpawn(n,t,a){if(await this.ensureInitialized())try{let e=t.capabilities.split(",");console.log(s.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"./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.3");process.exit(0)}
|
|
2
|
+
import"./chunk-7ASGPJWU.js";import{existsSync as i,mkdirSync as d,unlinkSync as s,readdirSync as p,statSync as f}from"fs";import{join as o,basename as l}from"path";var v={branchDir:".agentic-qe/branches",defaultStrategy:"child-wins",orphanMaxAgeMs:36e5},g=class{config;parentAdapter;activeBranches=new Map;witnessChain=null;constructor(t,e){this.parentAdapter=t,this.config={...v,...e}}setWitnessChain(t){this.witnessChain=t}createBranch(t){if(this.activeBranches.has(t))throw new Error(`Branch already exists for agent ${t}`);i(this.config.branchDir)||d(this.config.branchDir,{recursive:!0});let e=o(this.config.branchDir,`${t}.rvf`),r=this.parentAdapter.path(),n=this.parentAdapter.derive(e),a={agentId:t,childPath:e,parentPath:r,childAdapter:n,createdAt:Date.now(),ingestLog:[]};return this.activeBranches.set(t,a),a}recordIngest(t,e){let r=this.activeBranches.get(t);if(r)for(let n of e)r.ingestLog.push({id:n.id,vector:n.vector})}async mergeBranch(t,e){let r=e??this.config.defaultStrategy,n=performance.now(),a=0;if(r==="child-wins"&&t.ingestLog.length>0)try{a=this.parentAdapter.ingest(t.ingestLog).accepted}catch(c){console.warn(`[AgentMemoryBranch] Merge replay failed for ${t.agentId}:`,c)}return this.witnessChain?.append("BRANCH_MERGE",{agentId:t.agentId,strategy:r,vectorsMerged:a,branchPath:t.childPath},`agent-${t.agentId}`),this.cleanupBranchFile(t),this.activeBranches.delete(t.agentId),{vectorsMerged:a,strategy:r,durationMs:performance.now()-n}}discardBranch(t){this.witnessChain?.append("BRANCH_DISCARD",{agentId:t.agentId,action:"discard",branchPath:t.childPath},`agent-${t.agentId}`),this.cleanupBranchFile(t),this.activeBranches.delete(t.agentId)}getBranch(t){return this.activeBranches.get(t)}getActiveBranches(){return Array.from(this.activeBranches.values())}listBranchFiles(){return i(this.config.branchDir)?p(this.config.branchDir).filter(e=>e.endsWith(".rvf")).map(e=>{let r=o(this.config.branchDir,e),n=f(r);return{agentId:l(e,".rvf"),path:r,sizeBytes:n.size,modifiedAt:n.mtime}}):[]}cleanupOrphans(t){let e=t??this.config.orphanMaxAgeMs,r=Date.now(),n=0;for(let a of this.listBranchFiles())if(r-a.modifiedAt.getTime()>e&&!this.activeBranches.has(a.agentId))try{s(a.path);let h=`${a.path}.idmap.json`;i(h)&&s(h),n++}catch{}return n}cleanupBranchFile(t){try{t.childAdapter.close()}catch{}try{i(t.childPath)&&s(t.childPath);let e=`${t.childPath}.idmap.json`;i(e)&&s(e)}catch{}}};export{g as AgentMemoryBranch};
|
|
@@ -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.3");process.exit(0)}
|
|
2
|
+
import{a,b,c,d,e,f}from"./chunk-UVWKIP3U.js";import"./chunk-JZXSKPQB.js";import"./chunk-EXTVDKH7.js";import"./chunk-PD5YPC2A.js";import"./chunk-JTIWAUWW.js";import"./chunk-AS5WPUDR.js";import"./chunk-KV32LAKU.js";import"./chunk-SFFI3MDN.js";import"./chunk-TUHIFT65.js";import"./chunk-LRE4A464.js";import"./chunk-SVXIAQRW.js";import"./chunk-PS6KLLLQ.js";import"./chunk-2CPNZVGL.js";import"./chunk-LQDAH47F.js";import"./chunk-RRELDHZY.js";import"./chunk-FONTSK2O.js";import"./chunk-6N26CWST.js";import"./chunk-CU36MONI.js";import"./chunk-TA454OEB.js";import"./chunk-OXR2FPHK.js";import"./chunk-EVIXQR4O.js";import"./chunk-DBEU5ISS.js";import"./chunk-GGKV5IQR.js";import"./chunk-ZMUVSL5Q.js";import"./chunk-WSVWVIVR.js";import"./chunk-TPFE3BAI.js";import"./chunk-OV6H3TRU.js";import"./chunk-M7PGW5Z5.js";import"./chunk-UC3RA5LW.js";import"./chunk-OJKGRB6D.js";import"./chunk-7ASGPJWU.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};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{f as s,o 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.3");process.exit(0)}
|
|
2
|
+
import{f as s,o as p}from"./chunk-LQDAH47F.js";import"./chunk-RRELDHZY.js";import{d as c,e as u,f as h,g as m}from"./chunk-FSUS5TV6.js";import"./chunk-FONTSK2O.js";import"./chunk-6N26CWST.js";import"./chunk-CU36MONI.js";import"./chunk-OXR2FPHK.js";import"./chunk-DBEU5ISS.js";import{p as l,q as d}from"./chunk-GGKV5IQR.js";import"./chunk-ZMUVSL5Q.js";import"./chunk-WSVWVIVR.js";import"./chunk-TPFE3BAI.js";import"./chunk-OV6H3TRU.js";import"./chunk-M7PGW5Z5.js";import"./chunk-UC3RA5LW.js";import"./chunk-OJKGRB6D.js";import{g as f}from"./chunk-7ASGPJWU.js";import{Command as g}from"commander";import a from"chalk";p();import{existsSync as y}from"node:fs";import b from"node:path";function C(n,i){let t=[];t.push(a.bold("Witness Chain Audit Verification")),t.push("");let e=i?a.green("ENABLED"):a.yellow("DISABLED");t.push(` Feature Flag: ${e}`),t.push(` Chain Length: ${n.length} receipts`);let r=n.valid?a.green("VALID"):a.red("BROKEN");return t.push(` Integrity: ${r}`),n.length>0&&t.push(` Last Hash: ${n.lastHash.slice(0,16)}...`),!n.valid&&n.brokenAt>=0&&(t.push(""),t.push(a.red(` Break detected at index ${n.brokenAt}`)),t.push(a.red(` ${n.message}`))),t.push(""),t.join(`
|
|
3
3
|
`)}function x(){try{let n=s(),i=b.join(n,".agentic-qe","memory.db");if(!y(i))return null;let t=(d(),f(l)),e=new t(i),r=c(e),o=h(r);return e.close(),o}catch{return null}}async function A(n){let i=m(),e=(x()??u()).verifyChain(),r={featureEnabled:i,chainLength:e.length,integrity:e.valid,brokenAt:e.brokenAt,lastHash:e.lastHash,message:e.message};return n.format==="json"?console.log(JSON.stringify(r,null,2)):console.log(C(e,i)),r}function v(n,i,t){let e=new g("audit").description("Witness chain audit trail management");return e.command("verify").description("Verify witness chain integrity").option("-F, --format <format>","Output format (json|text)","text").action(async r=>{try{await A({format:r.format}),await i(0)}catch(o){console.error("Failed to verify witness chain:",o),await i(1)}}),e}export{v as createAuditCommand,C as formatVerificationText,A as handleAuditVerify};
|
|
@@ -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.3");process.exit(0)}
|
|
2
|
+
import{a,b,c,d,e,f}from"./chunk-BK445WWE.js";import"./chunk-MNZ2HHKI.js";import"./chunk-LQDAH47F.js";import"./chunk-RRELDHZY.js";import"./chunk-FONTSK2O.js";import"./chunk-6N26CWST.js";import"./chunk-CU36MONI.js";import"./chunk-OXR2FPHK.js";import"./chunk-EVIXQR4O.js";import"./chunk-DBEU5ISS.js";import"./chunk-GGKV5IQR.js";import"./chunk-ZMUVSL5Q.js";import"./chunk-WSVWVIVR.js";import"./chunk-TPFE3BAI.js";import"./chunk-OV6H3TRU.js";import"./chunk-M7PGW5Z5.js";import"./chunk-UC3RA5LW.js";import"./chunk-OJKGRB6D.js";import"./chunk-7ASGPJWU.js";export{f as MCPToolBase,e as defaultToolLogger,d as getMemoryBackend,b as getSharedMemoryBackend,a as registerRvfResetFn,c as resetSharedMemoryBackend};
|
|
@@ -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,q 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.3");process.exit(0)}
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,q as p}from"./chunk-GGKV5IQR.js";import"./chunk-7ASGPJWU.js";p();export{i as DotProductAttention,h as FlashAttention,k as HyperbolicAttention,l as LinearAttention,m as MoEAttention,j as MultiHeadAttention,b as RuvectorLayer,n as SonaEngine,c as TensorCompress,a as default,d as differentiableSearch,f as getCompressionLevel,e as hierarchicalForward,g as init,o 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{a as $,b as M,c as L,d as v,e as H,f as k,g as F,h as _,i as P,j as G,k as V,l as ce,m as q,n as Q,o as de,p as Y,q as j,r as W,s 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.3");process.exit(0)}
|
|
2
|
+
import{a as $,b as M,c as L,d as v,e as H,f as k,g as F,h as _,i as P,j as G,k as V,l as ce,m as q,n as Q,o as de,p as Y,q as j,r as W,s as U}from"./chunk-7JBIDAXT.js";import{h as ae}from"./chunk-SVXIAQRW.js";import{a as se,b as ie,c as le,d as O,f as Ne}from"./chunk-PS6KLLLQ.js";import"./chunk-LQDAH47F.js";import"./chunk-RRELDHZY.js";import"./chunk-FONTSK2O.js";import"./chunk-6N26CWST.js";import{b as N,d as Be}from"./chunk-CU36MONI.js";import"./chunk-OXR2FPHK.js";import{a as S,b as Ie}from"./chunk-DBEU5ISS.js";import"./chunk-GGKV5IQR.js";import"./chunk-ZMUVSL5Q.js";import"./chunk-WSVWVIVR.js";import"./chunk-TPFE3BAI.js";import"./chunk-OV6H3TRU.js";import"./chunk-M7PGW5Z5.js";import"./chunk-UC3RA5LW.js";import"./chunk-OJKGRB6D.js";import"./chunk-7ASGPJWU.js";import T from"path";import r from"chalk";Ie();Be();import{existsSync as z,mkdirSync as Oe,writeFileSync as ke,readFileSync as X}from"fs";import{join as E,resolve as Z}from"path";var qe={rl_q_values:"includeQValues",dream_insights:"includeDreamInsights",dream_cycles:"includeDreamInsights",witness_chain:"includeWitnessChain",vectors:"includeVectors"};function Te(n,t){let o=qe[n.tableName];return!(o&&t[o]===!1)}var Ae=1e4;function De(n,t,o,e){if(!Te(t,o))return Q(E(e,t.fileName),[]),{count:0,rows:[]};let[s,i]=t.domainColumn?q(o.domains,t.domainColumn):[void 0,[]];if(G(n,t.tableName,s,i)>=Ae){let d=t.blobColumns,f=d&&d.length>0?p=>k(p,d):void 0;return{count:de(E(e,t.fileName),ce(n,t.tableName,s,i),f)}}let a=V(n,t.tableName,s,i);return t.blobColumns&&t.blobColumns.length>0&&(a=a.map(d=>k(d,t.blobColumns))),Q(E(e,t.fileName),a),{count:a.length,rows:a}}function me(n){let t=[];for(let o of v){let e=E(n,o.fileName);z(e)?t.push(_(X(e,"utf-8"))):t.push(_(""))}return _(t.join(":"))}function fe(n,t,o="memory.db"){let e=Z(t.outputPath);z(e)||Oe(e,{recursive:!0});let s=0,i={},c=new Set;for(let u of v){let p=De(n,u,t,e);if(i[u.tableName]=p.count,s+=p.count,u.tableName==="qe_patterns"){if(p.rows)for(let l of p.rows)l.qe_domain&&c.add(l.qe_domain);else if(p.count>0){let[l,h]=u.domainColumn?q(t.domains,u.domainColumn):[void 0,[]],b=`SELECT DISTINCT qe_domain FROM qe_patterns ${l?`WHERE ${l} AND qe_domain IS NOT NULL`:"WHERE qe_domain IS NOT NULL"}`;try{let y=n.prepare(b).all(...h||[]);for(let R of y)c.add(R.qe_domain)}catch{}}}}let a=t.includeVectors!==!1?G(n,"vectors"):0,d=me(e),f={version:"3.0",exportedAt:new Date().toISOString(),sourceDb:o,stats:{patternCount:i.qe_patterns||0,vectorCount:a,qValueCount:i.rl_q_values||0,dreamInsightCount:i.dream_insights||0,witnessChainLength:i.witness_chain||0,totalRecords:s},domains:[...c].sort(),checksum:d,tableRecordCounts:i};return ke(E(e,"manifest.json"),JSON.stringify(f,null,2),"utf-8"),f}var $e=new Set(["qe_patterns","rl_q_values","dream_insights","witness_chain"]);function Me(n){return n==="1.0"?v.filter(t=>$e.has(t.tableName)):n==="3.0"?v:(console.warn(`[brain-import] Unknown manifest version '${n}'. Attempting full import \u2014 some files may be missing.`),v)}function ue(n,t,o){let e=Z(t),s=E(e,"manifest.json");if(!z(s))throw new Error(`Manifest not found at ${s}`);let i=N(X(s,"utf-8")),c=me(e);if(c!==i.checksum)throw new Error(`Checksum mismatch: expected ${i.checksum}, got ${c}. The export may have been tampered with or corrupted.`);let a=Me(i.version);if(o.dryRun){let l=0;for(let h of a){let m=Y(E(e,h.fileName),N);l+=m.length}return{imported:l,skipped:0,conflicts:0}}U(n);let d=0,f=0,u=0;return n.transaction(()=>{for(let l of a){let h=E(e,l.fileName),m=Y(h,N);l.blobColumns&&l.blobColumns.length>0&&(m=m.map(b=>F(b,l.blobColumns)));for(let b of m){let y;if(l.dedupColumns&&l.dedupColumns.length>0)y=W(n,l.tableName,b,l.dedupColumns);else{let R=$[l.tableName]||"id",C=L[l.tableName],x=M[l.tableName];y=j(n,l.tableName,b,R,o.mergeStrategy,C,x)}d+=y.imported,f+=y.skipped,u+=y.conflicts}}})(),{imported:d,skipped:f,conflicts:u}}function pe(n){let t=Z(n),o=E(t,"manifest.json");if(!z(o))throw new Error(`Manifest not found at ${o}`);return N(X(o,"utf-8"))}Ne();import{existsSync as K,statSync as Le,unlinkSync as ge,writeFileSync as Fe}from"fs";import{resolve as ee}from"path";function be(n,t,o="memory.db"){if(!O())throw new Error("@ruvector/rvf-node is not available. Install it or use --format jsonl instead.");let e=ee(t.outputPath),s=t.dimension??384;K(e)&&ge(e);let i=`${e}.idmap.json`;K(i)&&ge(i);let c=se(e,s);try{let a={},d=new Set,f=0;for(let w of v){let[g,oe]=w.domainColumn?q(t.domains,w.domainColumn):[void 0,[]],B=V(n,w.tableName,g,oe);if(w.tableName==="qe_patterns")for(let D of B)D.qe_domain&&d.add(D.qe_domain);let J=H[w.tableName];J&&J.length>0&&(B=B.map(D=>k(D,J))),a[w.tableName]=B,f+=B.length}let u=0,p=[];if(P(n,"qe_pattern_embeddings")){let w=n.prepare("SELECT pattern_id, embedding, dimension FROM qe_pattern_embeddings").all();for(let g of w)g.embedding&&g.dimension===s&&p.push({id:`pe:${g.pattern_id}`,vector:new Float32Array(g.embedding.buffer,g.embedding.byteOffset,s),metadata:{tableName:"qe_pattern_embeddings"}})}if(P(n,"captured_experiences")){let w=n.prepare("SELECT id, embedding, embedding_dimension, domain, quality FROM captured_experiences WHERE embedding IS NOT NULL").all();for(let g of w)g.embedding_dimension===s&&p.push({id:`exp:${g.id}`,vector:new Float32Array(g.embedding.buffer,g.embedding.byteOffset,s),metadata:{tableName:"captured_experiences",domain:g.domain,confidence:g.quality}})}if(P(n,"sona_patterns")){let w=n.prepare("SELECT id, state_embedding, domain, confidence FROM sona_patterns WHERE state_embedding IS NOT NULL").all();for(let g of w)g.state_embedding.byteLength/4===s&&p.push({id:`sona:${g.id}`,vector:new Float32Array(g.state_embedding.buffer,g.state_embedding.byteOffset,s),metadata:{tableName:"sona_patterns",domain:g.domain,confidence:g.confidence}})}p.length>0&&(u=c.ingest(p).accepted);let l={version:"3.0",format:"rvf",exportedAt:new Date().toISOString(),sourceDb:o,domains:[...d].sort(),tables:a},h=JSON.stringify(l),m=_(h),b=Buffer.from(h);c.embedKernel(b);let y=t.sign?c.sign(b)??void 0:void 0,R=y?t.signerKeyId??"default":void 0,C=c.fileId(),x=C?{fileId:C,parentId:c.parentId(),lineageDepth:c.lineageDepth()}:void 0,I=c.status(),A={version:"3.0",format:"rvf",exportedAt:l.exportedAt,sourceDb:o,stats:{patternCount:(a.qe_patterns||[]).length,embeddingCount:u,qValueCount:(a.rl_q_values||[]).length,dreamInsightCount:(a.dream_insights||[]).length,witnessChainLength:(a.witness_chain||[]).length,totalRecords:f},domains:l.domains,checksum:m,rvfStatus:{totalVectors:I.totalVectors,totalSegments:I.totalSegments,fileSizeBytes:I.fileSizeBytes},...y?{signature:y,signerKeyId:R}:{},...x?{lineage:x}:{}};if(y)try{c.freeze()}catch{}let Se=`${e}.manifest.json`;return Fe(Se,JSON.stringify(A,null,2),"utf-8"),A}finally{c.close()}}var Pe={patterns:"qe_patterns",qValues:"rl_q_values",dreamInsights:"dream_insights",witnessChain:"witness_chain"};function ye(n,t,o){if(!O())throw new Error("@ruvector/rvf-node is not available. Install it or use JSONL format.");let e=ee(t);if(!K(e))throw new Error(`RVF file not found: ${e}`);let s=ie(e);try{let i=s.verifyWitness();if(!i.valid&&(i.totalEntries>0||i.errors.length>0)){let m=i.errors.length>0?i.errors.join("; "):"unknown integrity error";throw new Error(`RVF witness verification failed: ${m}`)}let c=s.extractKernel();if(!c||!c.image)throw new Error("No brain data found in RVF file (missing kernel segment)");let a;try{a=JSON.parse(c.image.toString("utf-8"))}catch(m){throw new Error(`Failed to parse brain kernel data as JSON: ${m instanceof Error?m.message:m}`)}if(o.dryRun){let m=0;if(a.tables)for(let b of Object.values(a.tables))m+=b?.length??0;else m=(a.patterns?.length??0)+(a.qValues?.length??0)+(a.dreamInsights?.length??0)+(a.witnessChain?.length??0);return{imported:m,skipped:0,conflicts:0,embeddingsRestored:0}}U(n);let d=0,f=0,u=0,p=0,l={};if(a.tables)Object.assign(l,a.tables);else for(let[m,b]of Object.entries(Pe)){let y=a[m];Array.isArray(y)&&(l[b]=y)}if(n.transaction(()=>{for(let m of v){let b=l[m.tableName];if(!b||!Array.isArray(b))continue;let y=H[m.tableName];if(y&&y.length>0){b=b.map(R=>F(R,y));for(let R of b)for(let C of y)R[C]instanceof Buffer&&p++}for(let R of b){let C;if(m.dedupColumns&&m.dedupColumns.length>0)C=W(n,m.tableName,R,m.dedupColumns);else{let x=$[m.tableName]||"id",I=L[m.tableName],A=M[m.tableName];C=j(n,m.tableName,R,x,o.mergeStrategy,I,A)}d+=C.imported,f+=C.skipped,u+=C.conflicts}}})(),u>0)try{s.compact()}catch{}return{imported:d,skipped:f,conflicts:u,embeddingsRestored:p}}finally{s.close()}}function he(n){if(!O())throw new Error("@ruvector/rvf-node is not available.");let t=ee(n);if(!K(t))throw new Error(`RVF file not found: ${t}`);let o=le(t);try{let e=o.extractKernel();if(!e||!e.image)throw new Error("No brain data found in RVF file");let s=e.image.toString("utf-8"),i;try{i=JSON.parse(s)}catch(h){throw new Error(`Failed to parse brain kernel data as JSON: ${h instanceof Error?h.message:h}`)}let c=o.status(),a=Le(t).size,d=i.tables,f=d?d.qe_patterns?.length??0:i.patterns?.length??0,u=d?d.rl_q_values?.length??0:i.qValues?.length??0,p=d?d.dream_insights?.length??0:i.dreamInsights?.length??0,l=d?d.witness_chain?.length??0:i.witnessChain?.length??0;return{version:"3.0",format:"rvf",exportedAt:i.exportedAt??"unknown",sourceDb:i.sourceDb??"unknown",stats:{patternCount:f,embeddingCount:c.totalVectors,qValueCount:u,dreamInsightCount:p,witnessChainLength:l},domains:i.domains??[],checksum:_(s),rvfStatus:{totalVectors:c.totalVectors,totalSegments:c.totalSegments,fileSizeBytes:a}}}finally{o.close()}}function te(){return O()}function we(n,t){if(!n.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='qe_patterns'").get())return{created:0,skipped:0};n.exec(`
|
|
3
3
|
CREATE TEMP TABLE IF NOT EXISTS _covered_patterns (
|
|
4
4
|
pattern_id TEXT PRIMARY KEY
|
|
5
5
|
)
|
|
@@ -65,4 +65,4 @@ Examples:
|
|
|
65
65
|
aqe brain import -i .agentic-qe/brain.rvf --strategy latest-wins
|
|
66
66
|
aqe brain import -i .agentic-qe/brain.rvf --dry-run
|
|
67
67
|
aqe brain info -i .agentic-qe/brain.rvf
|
|
68
|
-
`}};async function ne(n){if(n)return n;let{findProjectRoot:t}=await import("./unified-memory-
|
|
68
|
+
`}};async function ne(n){if(n)return n;let{findProjectRoot:t}=await import("./unified-memory-MNW25PVU.js");return T.join(t(),".agentic-qe","memory.db")}function xe(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/(1024*1024)).toFixed(1)} MB`}function lt(n,t){return new re(n,t)}export{re as BrainHandler,lt as createBrainHandler};
|
|
@@ -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.3");process.exit(0)}
|
|
2
|
+
import"./chunk-7ASGPJWU.js";var f=class{language;constructor(e="typescript"){this.language=e}enumerate(e,s){let r=[],n=e.split(`
|
|
3
3
|
`),l=!1;for(let i=0;i<n.length;i++){let d=n[i],t=d.trim(),c=i+1,u=d.length-d.trimStart().length+1;if(l){t.includes("*/")&&(l=!1);continue}if(t.startsWith("/*")){l=!t.includes("*/");continue}if(t.startsWith("//"))continue;if(/^\s*if\s*\(/.test(d)&&(this.findMatchingElse(n,i)||r.push({file:s,line:c,column:u,language:this.language,construct:"if-without-else",triggerCondition:"when condition is false",currentHandling:"falls through \u2014 no else branch",suggestedGuard:"Add else branch or document why falsy path is safe",severity:"medium"})),/^\s*switch\s*\(/.test(d)){let a=this.extractBlock(n,i);if(a&&!a.includes("default:")&&!a.includes("default :")&&r.push({file:s,line:c,column:u,language:this.language,construct:"switch-no-default",triggerCondition:"when value matches no case",currentHandling:"falls through \u2014 no default case",suggestedGuard:"Add default case with error handling or exhaustive check",severity:"high"}),a){let g=a.match(/case\s+[^:]+:/g)||[],h=a.match(/\b(break|return|throw|continue)\b/g)||[];g.length>0&&h.length<g.length&&r.push({file:s,line:c,column:u,language:this.language,construct:"switch-missing-break",triggerCondition:"when case falls through to next case",currentHandling:"fall-through \u2014 may execute unintended cases",suggestedGuard:"Add break/return to each case or add explicit // falls through comment",severity:"medium"})}}if(/\bcatch\s*\(/.test(t)||/\bcatch\s*\{/.test(t)){let a=this.extractBlock(n,i);if(a!==null){let g=a.replace(/[{}]/g,"").trim();(g.length===0||/^\s*\/\//.test(g))&&r.push({file:s,line:c,column:u,language:this.language,construct:"try-empty-catch",triggerCondition:"when exception is thrown",currentHandling:"exception silently swallowed",suggestedGuard:"Log the error or rethrow with context",severity:"high"})}}if(/\btry\s*\{/.test(t)&&this.extractBlock(n,i)&&(n.slice(i,Math.min(i+30,n.length)).join(`
|
|
4
4
|
`).includes("finally")||r.push({file:s,line:c,column:u,language:this.language,construct:"try-no-finally",triggerCondition:"when cleanup is needed regardless of success/failure",currentHandling:"no finally block \u2014 cleanup may be skipped on exception",suggestedGuard:"Add finally block for resource cleanup if applicable",severity:"low"})),t.includes("?.")){let a=t.match(/(\w+(?:\.\w+)*)\?\./g)||[];for(let g of a)if(!t.includes("??")&&!t.includes("|| ")&&!t.includes("if")){r.push({file:s,line:c,column:u,language:this.language,construct:"optional-chaining-null-path",triggerCondition:`when ${g.replace("?.","")} is null/undefined`,currentHandling:"returns undefined \u2014 may propagate",suggestedGuard:"Add ?? fallback or explicit null check",severity:"low"});break}}if(t.includes("??")&&!t.includes("?.")&&r.push({file:s,line:c,column:u,language:this.language,construct:"nullish-coalescing-fallback",triggerCondition:"when left side is null/undefined",currentHandling:"uses fallback value",suggestedGuard:"Verify fallback value is appropriate for all null cases",severity:"low"}),/\.\s*then\s*\(/.test(t)&&!t.includes(".catch")&&!t.includes("await")){let a=n.slice(i,Math.min(i+5,n.length)).join(" ");!a.includes(".catch")&&!a.includes("try")&&r.push({file:s,line:c,column:u,language:this.language,construct:"promise-no-catch",triggerCondition:"when promise rejects",currentHandling:"unhandled rejection \u2014 may crash process",suggestedGuard:"Add .catch() handler or use try/catch with await",severity:"high"})}let p=["map","filter","reduce","forEach","find","some","every","flatMap"];for(let a of p)if(new RegExp(`\\.${a}\\s*\\(`).test(t)){let h=n.slice(Math.max(0,i-3),i).join(" ");if(!h.includes(".length")&&!h.includes("if (")&&!h.includes("?.")){r.push({file:s,line:c,column:u,language:this.language,construct:"array-callback-empty",triggerCondition:`when array is empty before .${a}()`,currentHandling:a==="reduce"?"may throw without initial value":"returns empty result \u2014 may cause downstream issues",suggestedGuard:a==="reduce"?"Provide initial value or check array length":"Check array length or handle empty result",severity:a==="reduce"?"high":"low"});break}}/\|\|\s*['"`\d]/.test(t)&&!t.includes("??")&&r.push({file:s,line:c,column:u,language:this.language,construct:"logical-or-falsy",triggerCondition:'when left side is falsy (0, "", false, null, undefined)',currentHandling:'uses fallback \u2014 may unintentionally override 0, "", or false',suggestedGuard:"Use ?? instead of || if only null/undefined should trigger fallback",severity:"medium"}),/&&\s*\w+\s*\(/.test(t)&&!t.includes("if")&&!t.includes("while")&&r.push({file:s,line:c,column:u,language:this.language,construct:"logical-and-short-circuit",triggerCondition:"when left side is falsy \u2014 right side never executes",currentHandling:"short-circuits \u2014 function call skipped silently",suggestedGuard:"Use explicit if-statement for clarity when side effects matter",severity:"low"}),(t.match(/\?/g)||[]).length>=2&&t.includes(":")&&r.push({file:s,line:c,column:u,language:this.language,construct:"ternary-complex",triggerCondition:"when nested ternary conditions interact",currentHandling:"nested ternary \u2014 hard to read and maintain",suggestedGuard:"Refactor to if/else or switch for readability",severity:"medium"}),(/\btypeof\s+\w+\s*===?\s*['"]/.test(t)||/\binstanceof\b/.test(t))&&!t.includes("else")&&!this.findMatchingElse(n,i)&&r.push({file:s,line:c,column:u,language:this.language,construct:"type-guard-unhandled",triggerCondition:"when value does not match the guarded type",currentHandling:"unguarded type path \u2014 may cause runtime type errors",suggestedGuard:"Add else branch or exhaustive type checking",severity:"medium"})}return r}findMatchingElse(e,s){let r={depth:0};for(let n=s;n<Math.min(s+30,e.length);n++){let l=e[n];for(let i of l)i==="{"&&r.depth++,i==="}"&&r.depth--;if(r.depth===0&&n>s){if((e[n+1]?.trim()||"").startsWith("else")||e[n].trim().endsWith("else")||e[n].trim().endsWith("else {")||e[n].includes("} else"))return!0;break}}return!1}extractBlock(e,s){let r=0,n=!1,l=[];for(let i=s;i<Math.min(s+50,e.length);i++){let d=e[i];for(let t of d)t==="{"&&(r++,n=!0),t==="}"&&r--;if(n&&(l.push(d),r===0))return l.join(`
|
|
5
5
|
`)}return null}};function y(o,e,s){let r=Date.now(),n=s||(e.endsWith(".ts")||e.endsWith(".tsx")?"typescript":"javascript"),i=new f(n).enumerate(o,e);return{file:e,language:n,branches:i,totalConstructs:i.length,unhandledCount:i.length,duration:Date.now()-r}}function b(o){let e=[];if(e.push(`# Branch Enumeration Report: ${o.file}`),e.push(""),e.push(`**Language**: ${o.language} | **Branches**: ${o.unhandledCount} | **Duration**: ${o.duration}ms`),e.push(""),o.branches.length===0)return e.push("No unhandled branches detected."),e.join(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a 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.3");process.exit(0)}
|
|
2
|
+
import{a as p}from"./chunk-BRCCPQXN.js";import"./chunk-7ASGPJWU.js";import{readFile as m,readdir as k}from"fs/promises";import{join as c,basename as y}from"path";import{parse as d}from"yaml";var l=class{templatesDir;cache=new Map;constructor(r){this.templatesDir=r||c(__dirname,"templates")}async load(r){if(this.cache.has(r))return this.cache.get(r);try{let e=c(this.templatesDir,`${r}.yaml`),n=await m(e,"utf-8"),o=d(n),i=await this.validate(o);if(!i.valid)throw new Error(`Invalid workflow template ${r}:
|
|
3
3
|
${i.errors.join(`
|
|
4
4
|
`)}`);return this.cache.set(r,o),o}catch(e){throw e.code==="ENOENT"?new Error(`Workflow template not found: ${r}`):e}}async list(){try{return(await k(this.templatesDir)).filter(e=>e.endsWith(".yaml")||e.endsWith(".yml")).map(e=>y(e,e.endsWith(".yaml")?".yaml":".yml")).sort()}catch(r){if(r.code==="ENOENT")return[];throw r}}async validate(r){let e=[],n=[];if(r.name||e.push("Workflow must have a name"),r.version||e.push("Workflow must have a version"),r.description||n.push("Workflow should have a description"),Array.isArray(r.variables)?r.variables.forEach((o,i)=>{o.name||e.push(`Variable at index ${i} must have a name`),o.type||e.push(`Variable ${o.name} must have a type`),o.required===void 0&&n.push(`Variable ${o.name} should specify if it's required`)}):e.push("Workflow must have a variables array"),!Array.isArray(r.steps))e.push("Workflow must have a steps array");else if(r.steps.length===0)e.push("Workflow must have at least one step");else{r.steps.forEach((t,s)=>{t.name||e.push(`Step at index ${s} must have a name`),t.action||e.push(`Step ${t.name||s} must have an action`),(!t.config||typeof t.config!="object")&&e.push(`Step ${t.name||s} must have a config object`),t.assertions&&Array.isArray(t.assertions)&&t.assertions.forEach((f,u)=>{f.condition||e.push(`Assertion ${u} in step ${t.name||s} must have a condition`),f.message||n.push(`Assertion ${u} in step ${t.name||s} should have a message`)})});let o=r.steps.map(t=>t.name),i=o.filter((t,s)=>o.indexOf(t)!==s);i.length>0&&e.push(`Duplicate step names found: ${i.join(", ")}`)}return{valid:e.length===0,errors:e,warnings:n}}async createContext(r,e){let n=await this.load(r),o=n.variables.filter(t=>t.required&&!(t.name in e)).map(t=>t.name);if(o.length>0)throw new Error(`Missing required variables: ${o.join(", ")}`);let i={};return n.variables.forEach(t=>{t.name in e?i[t.name]=e[t.name]:"default"in t&&(i[t.name]=t.default)}),{variables:i,results:new Map,metadata:{startTime:Date.now(),workflow:n.name,templateName:r}}}async getMetadata(r){try{let e=c(this.templatesDir,`${r}.yaml`),n=await m(e,"utf-8"),o=d(n);return{name:o.name,version:o.version,description:o.description}}catch(e){throw e.code==="ENOENT"?new Error(`Workflow template not found: ${r}`):e}}clearCache(){this.cache.clear()}async reload(r){return this.cache.delete(r),this.load(r)}},W=new l;function w(a,r){return a.replace(/\{\{([^}]+)\}\}/g,(e,n)=>{let i=n.trim().split("."),t=r;for(let s of i)if(t&&typeof t=="object"&&s in t)t=t[s];else return e;return t!=null?String(t):e})}function v(a,r){let e={...r.variables,result:r.results.get("__last_result__")},n=w(a,e);return p(n,e,!1)}var g=["login-flow","oauth-flow","scraping-workflow","visual-regression","form-validation","navigation-flow","api-integration","performance-audit","accessibility-audit"],b={"login-flow":"Authentication testing workflow for login forms with credential validation","oauth-flow":"OAuth2/OIDC authentication testing workflow with provider integration","scraping-workflow":"Data extraction workflow for web scraping with pagination and structured output","visual-regression":"Screenshot comparison workflow for visual regression testing across breakpoints","form-validation":"Input validation testing workflow for form fields with error handling","navigation-flow":"Multi-page navigation workflow for testing user journeys and state persistence","api-integration":"Browser-API hybrid testing workflow for validating frontend-backend integration","performance-audit":"Lighthouse-style performance audit workflow with Core Web Vitals","accessibility-audit":"WCAG 2.1 Level AA compliance audit workflow with automated accessibility testing"},h={authentication:["login-flow","oauth-flow"],testing:["form-validation","navigation-flow","api-integration"],quality:["visual-regression","performance-audit","accessibility-audit"],automation:["scraping-workflow"]};function R(a){return h[a]}function S(a){return g.includes(a)}function $(){return g.map(a=>{let r=Object.entries(h).find(([e,n])=>n.includes(a))?.[0]||"other";return{name:a,description:b[a],category:r}})}export{h as WORKFLOW_CATEGORIES,b as WORKFLOW_DESCRIPTIONS,g as WORKFLOW_TEMPLATES,l as WorkflowLoader,W as defaultWorkflowLoader,v as evaluateCondition,$ as getAllWorkflowTemplates,R as getWorkflowsByCategory,w as interpolateVariables,S as isValidWorkflowTemplate};
|
|
@@ -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.3");process.exit(0)}
|
|
2
|
+
import{a}from"./chunk-5UMSMRJC.js";import"./chunk-BK445WWE.js";import"./chunk-MNZ2HHKI.js";import"./chunk-LQDAH47F.js";import"./chunk-RRELDHZY.js";import"./chunk-FONTSK2O.js";import"./chunk-6N26CWST.js";import"./chunk-CU36MONI.js";import"./chunk-OXR2FPHK.js";import"./chunk-EVIXQR4O.js";import"./chunk-DBEU5ISS.js";import"./chunk-GGKV5IQR.js";import"./chunk-ZMUVSL5Q.js";import"./chunk-WSVWVIVR.js";import"./chunk-TPFE3BAI.js";import"./chunk-OV6H3TRU.js";import"./chunk-M7PGW5Z5.js";import"./chunk-UC3RA5LW.js";import"./chunk-OJKGRB6D.js";import"./chunk-7ASGPJWU.js";export{a as BrowserWorkflowTool};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a as F,c as D}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.3");process.exit(0)}
|
|
2
|
+
import{a as F,c as D}from"./chunk-OXR2FPHK.js";import{d as $}from"./chunk-OV6H3TRU.js";$();D();var b=null,l=null,d=null,g=!1,f="",h={modelName:"Xenova/all-MiniLM-L6-v2",quantized:!0,enableCache:!0,maxCacheSize:1e4},o=new Map,P=36e5;function I(t){let e=t.trim();return!!(e.startsWith("{")&&/["']metrics["']/.test(e)||e.startsWith("[")&&e.endsWith("]")&&e.length>50||(e.match(/[a-zA-Z]/g)||[]).length/Math.max(e.length,1)<.3&&e.length>20)}async function A(t={}){if(g)throw new Error(`Transformer initialization previously failed: ${f}`);if(d)return d;let e={...h,...t};return d=(async()=>{try{b=(await import("./transformers-P7TT2MJB.js")).pipeline,console.log(`[RealEmbeddings] Loading model: ${e.modelName}`);let a=performance.now();l=await b("feature-extraction",e.modelName,{quantized:e.quantized});let s=performance.now()-a;console.log(`[RealEmbeddings] Model loaded in ${s.toFixed(0)}ms`)}catch(r){throw g=!0,f=F(r),new Error(`Failed to initialize transformer model: ${f}`)}})(),d}async function q(t,e={}){let r={...h,...e};if(I(t))return new Array(N()).fill(0);if(r.enableCache){let i=o.get(t);if(i&&Date.now()-i.timestamp<P)return i.embedding}if(l||await A(e),!l)throw new Error("Embedding model failed to initialize");let a=performance.now(),s=await l(t,{pooling:"mean",normalize:!0}),m=Array.from(s.data),n=performance.now()-a;if(n>500&&console.warn(`[RealEmbeddings] Slow embedding computation: ${n.toFixed(1)}ms for "${t.slice(0,50)}..."`),r.enableCache){if(o.size>=r.maxCacheSize){let i=o.keys().next().value;i&&o.delete(i)}o.set(t,{embedding:m,timestamp:Date.now()})}return m}async function B(t,e={}){let r={...h,...e},a=[],s=[],m=new Array(t.length).fill(null);if(r.enableCache)for(let n=0;n<t.length;n++){let i=o.get(t[n]);i&&Date.now()-i.timestamp<P?m[n]=i.embedding:(a.push(t[n]),s.push(n))}else{a.push(...t);for(let n=0;n<t.length;n++)s.push(n)}if(a.length>0){if(l||await A(e),!l)throw new Error("Embedding model failed to initialize");let n=performance.now(),i=32;for(let c=0;c<a.length;c+=i){let M=Math.min(c+i,a.length),p=a.slice(c,M),E=await l(p,{pooling:"mean",normalize:!0}),w=E.dims||[p.length,384],R=w[0],C=w[1];for(let u=0;u<R;u++){let z=u*C,x=Array.from(E.data.slice(z,z+C)),y=c+u,v=s[y];if(m[v]=x,r.enableCache){if(o.size>=r.maxCacheSize){let T=o.keys().next().value;T&&o.delete(T)}o.set(a[y],{embedding:x,timestamp:Date.now()})}}}let S=performance.now()-n;console.log(`[RealEmbeddings] Batch computed ${a.length} embeddings in ${S.toFixed(0)}ms`)}return m.filter(n=>n!==null)}function O(){o.clear(),console.log("[RealEmbeddings] Cache cleared")}function W(){return{size:o.size,hitRate:0}}function k(){return!g&&l!==null}function N(){return 384}function G(){b=null,l=null,d=null,g=!1,f="",o.clear()}export{h as a,q as b,B as c,O as d,W as e,k as f,N as g,G as h};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
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.3");process.exit(0)}
|
|
2
2
|
import*as h from"fs";import*as M from"path";var S=["coverage/coverage-final.json","coverage/coverage-summary.json",".coverage/coverage-final.json"];function x(s){for(let v of S){let i=M.join(s,v);if(h.existsSync(i))try{let n=JSON.parse(h.readFileSync(i,"utf-8"));if(n.total&&n.total.lines)return L(n,s);let o=new Map;for(let[r,C]of Object.entries(n)){let c=C,g=Object.keys(c.s),u=g.filter(a=>c.s[a]>0).length,b=Object.keys(c.b),p=0,m=0;for(let a of b)for(let y of c.b[a])p++,y>0&&m++;let e=Object.keys(c.f),t=e.filter(a=>c.f[a]>0).length,f=new Set,d=new Set;for(let a of g){let y=c.statementMap[a];for(let F=y.start.line;F<=y.end.line;F++)d.add(F),c.s[a]>0&&f.add(F)}let l=[...d].filter(a=>!f.has(a)).sort((a,y)=>a-y);o.set(r,{path:r,lines:{covered:f.size,total:d.size},branches:{covered:m,total:p},functions:{covered:t,total:e.length},statements:{covered:u,total:g.length},uncoveredLines:l,uncoveredBranches:l.slice(0,Math.floor(l.length/2))})}return o.size>0?o:null}catch{continue}}return null}function L(s,v){let i=new Map;for(let[n,o]of Object.entries(s)){if(n==="total")continue;let r=o;i.set(n,{path:n,lines:{covered:r.lines.covered,total:r.lines.total},branches:{covered:r.branches.covered,total:r.branches.total},functions:{covered:r.functions.covered,total:r.functions.total},statements:{covered:r.statements.covered,total:r.statements.total},uncoveredLines:[],uncoveredBranches:[]})}return i.size>0?i:null}function B(s,v){let n=v.split(`
|
|
3
3
|
`).length,r=[s.replace(".ts",".test.ts").replace("/src/","/tests/"),s.replace(".ts",".spec.ts").replace("/src/","/tests/"),s.replace(".ts",".test.ts"),s.replace("/src/","/test/").replace(".ts",".test.ts")].some(d=>h.existsSync(d)),C=(v.match(/\bexport\b/g)||[]).length,c=(v.match(/\b(function|=>)\b/g)||[]).length,g=(v.match(/\b(if|switch|case|\?\?|\|\|)\b/g)||[]).length,u;if(r){let d=Math.min(g*.005,.15),l=Math.min(n*1e-4,.1);u=.85-d-l}else u=.2+(C>5?.1:0);u=Math.max(.05,Math.min(.95,u));let b=Math.floor(n*u),p=Math.max(c,1),m=Math.max(g,1),e=Math.floor(b*.7),t=Math.floor(p*u*.9),f=Array.from({length:n-b},(d,l)=>l+b+1);return{path:s,lines:{covered:b,total:n},branches:{covered:Math.min(e,m),total:m},functions:{covered:Math.min(t,p),total:p},statements:{covered:b,total:n},uncoveredLines:f,uncoveredBranches:f.slice(0,Math.floor(f.length/2))}}function j(s,v){let i=v||process.cwd(),n=x(i),o=[],r=!1;if(n&&n.size>0){r=!0;for(let e of s){let t=M.resolve(e),f=n.get(t)||n.get(e)||n.get(M.relative(i,t));if(f)o.push({...f,path:e});else{let l=(h.existsSync(e)?h.readFileSync(e,"utf-8"):"").split(`
|
|
4
4
|
`).length;o.push({path:e,lines:{covered:0,total:l},branches:{covered:0,total:1},functions:{covered:0,total:1},statements:{covered:0,total:l},uncoveredLines:Array.from({length:l},(a,y)=>y+1),uncoveredBranches:[]})}}}else for(let e of s){let t=h.existsSync(e)?h.readFileSync(e,"utf-8"):"";o.push(B(e,t))}let C=o.reduce((e,t)=>e+t.lines.total,0),c=o.reduce((e,t)=>e+t.lines.covered,0),g=o.reduce((e,t)=>e+t.branches.total,0),u=o.reduce((e,t)=>e+t.branches.covered,0),b=o.reduce((e,t)=>e+t.functions.total,0),p=o.reduce((e,t)=>e+t.functions.covered,0),m=(e,t)=>t>0?Math.round(e/t*100):0;return{files:o,summary:{line:m(c,C),branch:m(u,g),function:m(p,b),statement:m(c,C),files:o.length},instrumented:r}}export{j as a};
|
|
@@ -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
|
-
var e=null,f=null,t=null,u=!1;async function M(){return u&&!t?e:t||(t=(async()=>{try{if(process.env.AQE_RVF_MODE==="sqlite-only")return null;let{isRvfNativeAvailable:d}=await import("./rvf-native-adapter-
|
|
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.3");process.exit(0)}
|
|
2
|
+
var e=null,f=null,t=null,u=!1;async function M(){return u&&!t?e:t||(t=(async()=>{try{if(process.env.AQE_RVF_MODE==="sqlite-only")return null;let{isRvfNativeAvailable:d}=await import("./rvf-native-adapter-3EEWPK4C.js");if(!d())return null;let{getUnifiedMemory:v}=await import("./unified-memory-MNW25PVU.js"),l=v().getDatabase();if(!l)return null;let{RvfDualWriter:p}=await import("./rvf-dual-writer-WASNBBMN.js"),o=new p(l,{rvfPath:".agentic-qe/brain.rvf",mode:"dual-write",dimensions:384});await o.initialize(),e=o;try{let{getRvfMigrationStage:g}=await import("./feature-flags-GIGWUPEX.js"),n=g();if(n>=2){let{RvfMigrationAdapter:m}=await import("./rvf-migration-adapter-ESLGEE5X.js"),s=new m({stage:n});s.setSqliteDb(l);let{getSharedRvfAdapter:R}=await import("./shared-rvf-adapter-UQQUEC52.js"),i=R();if(i){let y={ingest:a=>i.ingest(a),search:(a,D)=>i.search(a,D).map(c=>({id:c.id,score:c.score})),delete:a=>i.delete(a),status:()=>i.status(),close:()=>{}};s.setRvfStore(y)}f=s,console.log(`[RVF] Migration adapter active at stage ${n} (${["sqlite-only","hybrid","dual-sqlite","dual-rvf","rvf-primary"][n]})`)}}catch{}return o}catch(r){return(process.env.DEBUG||process.env.AQE_VERBOSE)&&console.debug("[RVF] Dual-writer init failed, degrading to sqlite-only:",r instanceof Error?r.message:r),null}finally{u=!0,t=null,import("./base-3ENVJTIL.js").then(({registerRvfResetFn:r})=>r(h)).catch(()=>{})}})(),t)}function w(){return e}function W(){return f}function h(){if(e){try{e.close()}catch{}e=null}f=null,t=null,u=!1}export{M as a,w as b,W as c,h as d};
|
|
@@ -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 _}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.3");process.exit(0)}
|
|
2
|
+
import{a as _}from"./chunk-JI5MNJSU.js";import{e as E}from"./chunk-KV32LAKU.js";import{a as T}from"./chunk-FONTSK2O.js";import{c as h}from"./chunk-6N26CWST.js";import{b as p,d as b}from"./chunk-CU36MONI.js";import{S,j as g}from"./chunk-OJKGRB6D.js";b();T();S();var o=h.create("pattern-lifecycle"),A={promotionRewardThreshold:.7,promotionMinOccurrences:E,promotionMinSuccessRate:.7,deprecationFailureThreshold:3,staleDaysThreshold:30,confidenceDecayRate:.01,minActiveConfidence:.3,maxAgeForActivePatterns:90,promotionActivityWindowDays:30,asymmetricLearning:{}},f=class{constructor(e,t={}){this.db=e;this.config={...A,...t},this.asymmetricEngine=new _(this.config.asymmetricLearning),this.ensureSchema()}config;asymmetricEngine;_witnessChain=null;set witnessChain(e){this._witnessChain=e}_compressionService=null;set compressionService(e){this._compressionService=e}ensureSchema(){try{this.db.prepare(`
|
|
3
3
|
SELECT deprecated_at FROM qe_patterns LIMIT 1
|
|
4
4
|
`).get()}catch(e){o.debug("Adding missing deprecated_at column",{error:e instanceof Error?e.message:String(e)}),this.db.exec(`
|
|
5
5
|
ALTER TABLE qe_patterns ADD COLUMN deprecated_at TEXT DEFAULT NULL
|
|
@@ -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 T}from"./chunk-XIBVVZGB.js";import{c as S}from"./chunk-JOVINE23.js";import{b as C,d as P}from"./chunk-N3F3CX4V.js";import{a as w,c as $}from"./chunk-SDTVHR63.js";import{a as b,d as M}from"./chunk-34U7JDCN.js";$();M();import{randomUUID as D}from"crypto";var V={topology:"hierarchical",maxConcurrentSkills:10,maxConcurrentModels:3,timeout:3e5,continueOnFailure:!0,retry:{maxRetries:2,retryDelayMs:1e3}},R=class{config;learner;skillValidator=null;workers=new Map;taskQueue=[];isRunning=!1;constructor(e,t){this.config={...V,...e},this.learner=t}setSkillValidator(e){this.skillValidator=e}async validateSkillsParallel(e,t,i){let s=Date.now(),a=i?.trustTier??3,n=i?.validationLevel??"eval",c=this.determineTopology(e.length,t.length),r=this.createValidationTasks(e,t,a,n),o=await this.executeTasksParallel(r,c),l=new Map;for(let u of o){let p=l.get(u.skill)||[];p.push(u),l.set(u.skill,p)}return await this.recordOutcomesToLearner(o,a,n),l}async validateSkillCrossModel(e,t,i){return(await this.validateSkillsParallel([e],t,i)).get(e)||[]}getSummary(e){let t=[],i=new Map,s=new Map;for(let[c,r]of e){i.set(c,r);for(let o of r){t.push(o);let l=s.get(o.model)||[];l.push(o),s.set(o.model,l)}}let a=t.filter(c=>c.errors.length===0&&c.evalPassRate>=.9).length,n=t.reduce((c,r)=>c+r.durationMs,0);return{totalSkills:i.size,totalModels:s.size,successCount:a,failureCount:t.length-a,overallPassRate:t.length>0?a/t.length:0,totalDurationMs:n,avgDurationMs:t.length>0?n/t.length:0,topology:this.config.topology,bySkill:i,byModel:s,results:t}}determineTopology(e,t){if(this.config.topology){let i=e*t;return i>20&&this.config.topology==="mesh"&&console.warn(`[SwarmSkillValidator] Large workload (${i} tasks) may be more efficient with hierarchical topology`),this.config.topology}return e>5||e>t*2?"hierarchical":t>5&&e<=3?"mesh":"hierarchical"}createValidationTasks(e,t,i,s){let a=[];for(let n of e)for(let c of t)a.push({id:`${n}-${c}-${Date.now()}-${D().slice(0,8)}`,skill:n,model:c,trustTier:i,validationLevel:s,timeout:this.config.timeout,retryCount:0});return a}async executeTasksParallel(e,t){this.isRunning=!0,this.taskQueue=[...e];let i=[],s=t==="hierarchical"?this.config.maxConcurrentSkills:Math.min(this.config.maxConcurrentSkills*this.config.maxConcurrentModels,e.length),a=[];for(let n=0;n<Math.min(s,e.length);n++){let c=`worker-${n}`;this.workers.set(c,{id:c,task:null,status:"idle"}),a.push(this.runWorker(c,i))}return await Promise.all(a),this.isRunning=!1,this.workers.clear(),i}async runWorker(e,t){let i=this.workers.get(e);if(i){for(;this.taskQueue.length>0&&this.isRunning;){let s=this.taskQueue.shift();if(!s)break;i.task=s,i.status="running",i.startTime=Date.now();try{let a=await this.executeValidationTask(s);t.push(a),i.result=a,i.status="completed"}catch(a){let n=this.createErrorResult(s,a);this.config.retry&&s.retryCount<this.config.retry.maxRetries&&this.config.continueOnFailure?(s.retryCount++,this.taskQueue.push(s),await this.delay(this.config.retry.retryDelayMs)):(t.push(n),i.result=n,i.status="failed")}}i.task=null,i.status="idle"}}async executeValidationTask(e){let t=Date.now();if(!this.skillValidator)return this.createSimulatedResult(e,t);let i=new Promise((n,c)=>{setTimeout(()=>c(new Error(`Validation timeout after ${e.timeout}ms`)),e.timeout)}),s=await Promise.race([this.skillValidator(e.skill,e.model,{trustTier:e.trustTier,validationLevel:e.validationLevel,timeout:e.timeout}),i]),a=Date.now()-t;return this.outcomeToResult(s,e,a)}outcomeToResult(e,t,i){let s=e.testCaseResults.filter(c=>c.passed).length,a=e.testCaseResults.length,n=a>0?s/a:e.score;return{skill:t.skill,model:t.model,schemaValid:e.validationLevel!=="schema"||e.passed,validatorPassed:e.validationLevel!=="validator"||e.passed,evalPassRate:n,durationMs:i,errors:e.passed?[]:["Validation failed"],trustTier:t.trustTier,validationLevel:t.validationLevel,retryCount:t.retryCount,timestamp:new Date}}createSimulatedResult(e,t){let i=Date.now()-t+b()*100,s=.85+b()*.15;return{skill:e.skill,model:e.model,schemaValid:!0,validatorPassed:s>.8,evalPassRate:s,durationMs:i,errors:s>.8?[]:["Simulated validation failure"],trustTier:e.trustTier,validationLevel:e.validationLevel,retryCount:e.retryCount,timestamp:new Date}}createErrorResult(e,t){let i=w(t);return{skill:e.skill,model:e.model,schemaValid:!1,validatorPassed:!1,evalPassRate:0,durationMs:0,errors:[i],trustTier:e.trustTier,validationLevel:e.validationLevel,retryCount:e.retryCount,timestamp:new Date}}async recordOutcomesToLearner(e,t,i){for(let s of e){let a={skillName:s.skill,trustTier:s.trustTier||t,validationLevel:s.validationLevel||i,model:s.model,passed:s.errors.length===0&&s.evalPassRate>=.9,score:s.evalPassRate,testCaseResults:this.createTestCaseResults(s),timestamp:s.timestamp,runId:`swarm-${Date.now()}`,metadata:{duration:s.durationMs,retryCount:s.retryCount}};await this.learner.recordValidationOutcome(a)}}createTestCaseResults(e){return[{testId:`${e.skill}-${e.model}-aggregate`,passed:e.errors.length===0,expectedPatterns:["valid-output"],actualPatterns:e.errors.length===0?["valid-output"]:[],reasoningQuality:e.evalPassRate,executionTimeMs:e.durationMs,category:"swarm-validation",priority:"high",error:e.errors.length>0?e.errors.join("; "):void 0}]}delay(e){return new Promise(t=>setTimeout(t,e))}getConfig(){return{...this.config}}isValidationRunning(){return this.isRunning}getWorkerStatus(){return Array.from(this.workers.values())}cancel(){this.isRunning=!1,this.taskQueue=[]}};function A(y,e){return new R(y,e)}var F=["security-testing","accessibility-testing","api-testing","performance-testing","visual-regression-testing","mutation-testing","contract-testing","chaos-testing","compliance-testing","penetration-testing"],I=["claude-sonnet","claude-haiku","claude-opus"];P();import{readFileSync as L,writeFileSync as N,existsSync as E}from"fs";var O={varianceThreshold:.04,regressionThreshold:.1,minSamples:3,autoUpdateManifest:!1},k=class{constructor(e,t,i={}){this.learner=e;this.manifestPath=t;this.config={...O,...i}}config;async aggregateResults(e){let t=`agg-${Date.now()}`,i=new Date,s=this.buildSkillResultsMap(e),a=this.calculateSummary(s,e),n=await this.detectCrossModelAnomalies(e),c=await this.detectRegressions(e,this.config.regressionThreshold),r=this.generateRecommendations(s,n,c),o={timestamp:i,runId:t,summary:a,skillResults:s,crossModelAnalysis:n,regressions:c,recommendations:r,metadata:{version:"1.0.0",environment:e[0]?.metadata?.environment,generatedBy:"ValidationResultAggregator",inputs:{runIds:e.map(l=>l.runId),models:[...new Set(e.map(l=>l.model))]}}};return this.config.autoUpdateManifest&&await this.updateManifest(o),o}buildSkillResultsMap(e){let t=new Map;for(let i of e)for(let s of i.outcomes){let a=s.skillName;t.has(a)||t.set(a,{skill:a,trustTier:s.trustTier,passRateByModel:new Map,avgPassRate:0,schemaValid:!0,validatorPassed:!0,evalPassed:!0,issues:[],executionTimeMs:0,testCount:0,passedTests:0,failedTests:0});let n=t.get(a),c=s.testCaseResults.filter(r=>r.passed).length/(s.testCaseResults.length||1);n.passRateByModel.set(i.model,c),n.testCount+=s.testCaseResults.length,n.passedTests+=s.testCaseResults.filter(r=>r.passed).length,n.failedTests+=s.testCaseResults.filter(r=>!r.passed).length,n.executionTimeMs+=s.metadata?.duration||0,s.validationLevel==="schema"&&!s.passed&&(n.schemaValid=!1),s.validationLevel==="validator"&&!s.passed&&(n.validatorPassed=!1),s.validationLevel==="eval"&&!s.passed&&(n.evalPassed=!1);for(let r of s.testCaseResults)!r.passed&&r.error&&n.issues.push({skill:a,model:i.model,severity:r.priority==="critical"?"critical":r.priority==="high"?"high":r.priority==="medium"?"medium":"low",type:this.categorizeIssueType(s.validationLevel,r.error),message:r.error,testId:r.testId})}for(let i of t.values()){let s=Array.from(i.passRateByModel.values());i.avgPassRate=s.length>0?s.reduce((a,n)=>a+n,0)/s.length:0}return t}categorizeIssueType(e,t){return t.toLowerCase().includes("timeout")?"timeout":e==="schema"?"schema_failure":e==="validator"?"validator_failure":e==="eval"?"eval_failure":"error"}calculateSummary(e,t){let i=Array.from(e.values()),s=i.filter(n=>n.avgPassRate>=.9).length,a=i.length>0?i.reduce((n,c)=>n+c.avgPassRate,0)/i.length:0;return{totalSkills:i.length,passedSkills:s,failedSkills:i.length-s,avgPassRate:a,totalDurationMs:t.reduce((n,c)=>n+c.durationMs,0),totalTests:i.reduce((n,c)=>n+c.testCount,0),passedTests:i.reduce((n,c)=>n+c.passedTests,0),failedTests:i.reduce((n,c)=>n+c.failedTests,0),modelsUsed:[...new Set(t.map(n=>n.model))]}}async detectCrossModelAnomalies(e){let t=new Map,i=new Map,s=new Map;for(let d of e){t.has(d.model)||(t.set(d.model,[]),i.set(d.model,{totalTests:0,passedTests:0,skillCount:0}));for(let g of d.outcomes){let h=g.testCaseResults.filter(m=>m.passed).length/(g.testCaseResults.length||1);t.get(d.model).push(h);let f=i.get(d.model);f.totalTests+=g.testCaseResults.length,f.passedTests+=g.testCaseResults.filter(m=>m.passed).length,f.skillCount++,s.has(g.skillName)||s.set(g.skillName,{passRates:[],models:[]}),s.get(g.skillName).passRates.push(h),s.get(g.skillName).models.push(d.model)}}let a=[];for(let d of t.values())a.push(...d);let n=a.length>0?a.reduce((d,g)=>d+g,0)/a.length:0,c=a.length>1?a.reduce((d,g)=>d+Math.pow(g-n,2),0)/a.length:0,r=Math.sqrt(c),o=[],l=new Map;for(let[d,g]of t.entries()){let h=g.reduce((v,x)=>v+x,0)/g.length,f=h-n,m=i.get(d);l.set(d,{avgPassRate:h,skillCount:m.skillCount,totalTests:m.totalTests}),Math.abs(f)>this.config.varianceThreshold*2&&o.push({model:d,type:f<0?"low_performance":"high_variance",description:`Model ${d} has ${(f*100).toFixed(1)}% difference from average`,passRate:h,avgPassRate:n,deviation:Math.abs(f)})}let u=[],p=[];for(let[d,g]of s.entries()){if(g.passRates.length<2)continue;let h=g.passRates.reduce((m,v)=>m+v,0)/g.passRates.length;g.passRates.reduce((m,v)=>m+Math.pow(v-h,2),0)/g.passRates.length<this.config.varianceThreshold?u.push(d):p.push(d)}return{variance:c,stdDeviation:r,anomalies:o,consistentSkills:u,inconsistentSkills:p,modelPerformance:l}}async detectRegressions(e,t){let i=[],s=new Set;for(let a of e)for(let n of a.outcomes){let c=`${n.skillName}-${a.model}`;if(s.has(c))continue;s.add(c);let r=await this.learner.getValidationTrends(n.skillName);if(!r)continue;let o=n.testCaseResults.filter(p=>p.passed).length/(n.testCaseResults.length||1),l=r.recentPassRate,u=l-o;u>=t&&i.push({skill:n.skillName,model:a.model,previousPassRate:l,currentPassRate:o,regressionAmount:u,trend:r.overall,possibleCauses:this.analyzePossibleCauses(n,u),severity:this.categorizeRegressionSeverity(u)})}return i.sort((a,n)=>{let c={critical:0,high:1,medium:2,low:3},r=c[a.severity]-c[n.severity];return r!==0?r:n.regressionAmount-a.regressionAmount})}analyzePossibleCauses(e,t){let i=[],s=e.testCaseResults.filter(c=>!c.passed);if(s.length>0){let c=[...new Set(s.map(r=>r.category).filter(Boolean))];c.length>0&&i.push(`Failures in categories: ${c.join(", ")}`)}let a=s.filter(c=>c.priority==="critical");a.length>0&&i.push(`${a.length} critical test(s) failing`);let n=e.testCaseResults.reduce((c,r)=>c+r.reasoningQuality,0)/(e.testCaseResults.length||1);return n<.7&&i.push(`Low reasoning quality score: ${(n*100).toFixed(1)}%`),t>.3&&i.push("Possible model behavior change or prompt drift"),i.length===0&&i.push("No specific cause identified - review test details"),i}categorizeRegressionSeverity(e){return e>=.5?"critical":e>=.3?"high":e>=.15?"medium":"low"}generateRecommendations(e,t,i){let s=[];if(t.inconsistentSkills.length>0&&s.push(`Review ${t.inconsistentSkills.length} skills with inconsistent cross-model behavior: `+t.inconsistentSkills.slice(0,3).join(", ")+(t.inconsistentSkills.length>3?` and ${t.inconsistentSkills.length-3} more`:"")),t.anomalies.some(r=>r.type==="low_performance")){let r=t.anomalies.filter(o=>o.type==="low_performance").map(o=>o.model);s.push(`Investigate low performance on model(s): ${r.join(", ")}`)}let a=i.filter(r=>r.severity==="critical");a.length>0&&s.push(`URGENT: ${a.length} critical regression(s) detected - immediate review required`);let n=Array.from(e.values()).filter(r=>r.avgPassRate<.9);if(n.length>0){let r=n.filter(l=>!l.schemaValid),o=n.filter(l=>!l.validatorPassed);r.length>0&&s.push(`Fix schema validation for: ${r.map(l=>l.skill).slice(0,3).join(", ")}`),o.length>0&&s.push(`Review validator scripts for: ${o.map(l=>l.skill).slice(0,3).join(", ")}`)}return Array.from(e.values()).reduce((r,o)=>r+o.avgPassRate,0)/e.size<.8&&s.push("Overall pass rate below 80% - consider reviewing skill definitions and test expectations"),s.length===0&&s.push("All validations passing - no immediate action required"),s}async updateManifest(e){if(!E(this.manifestPath))throw new Error(`Manifest file not found: ${this.manifestPath}`);let t=C(L(this.manifestPath,"utf-8"));for(let[s,a]of e.skillResults.entries())if(t.skills&&t.skills[s]){let n=t.skills[s];n.validation||(n.validation={}),n.validation.passRate=a.avgPassRate,n.validation.lastValidated=e.timestamp.toISOString(),n.validation.status=a.avgPassRate>=.9?"passing":"failing",n.validation.passRateByModel=Object.fromEntries(a.passRateByModel)}let i=Array.from(e.skillResults.values());t.validationStatus={passing:i.filter(s=>s.avgPassRate>=.9).length,failing:i.filter(s=>s.avgPassRate<.9).length,unknown:0,skipped:t.summary?.tier0||0},t.generatedAt=new Date().toISOString(),t.lastValidationRun={runId:e.runId,timestamp:e.timestamp.toISOString(),avgPassRate:e.summary.avgPassRate,modelsUsed:e.summary.modelsUsed},N(this.manifestPath,JSON.stringify(t,null,2))}generateMarkdownReport(e){let{summary:t,crossModelAnalysis:i,regressions:s,recommendations:a,skillResults:n}=e,c=(t.avgPassRate>=.9||t.avgPassRate>=.7,"`"),r=[];if(r.push(`# Validation Report
|
|
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.3");process.exit(0)}
|
|
2
|
+
import{a as T}from"./chunk-FONTSK2O.js";import{c as S}from"./chunk-6N26CWST.js";import{b as C,d as P}from"./chunk-CU36MONI.js";import{a as w,c as $}from"./chunk-OXR2FPHK.js";import{a as b,d as M}from"./chunk-WSVWVIVR.js";$();M();import{randomUUID as D}from"crypto";var V={topology:"hierarchical",maxConcurrentSkills:10,maxConcurrentModels:3,timeout:3e5,continueOnFailure:!0,retry:{maxRetries:2,retryDelayMs:1e3}},R=class{config;learner;skillValidator=null;workers=new Map;taskQueue=[];isRunning=!1;constructor(e,t){this.config={...V,...e},this.learner=t}setSkillValidator(e){this.skillValidator=e}async validateSkillsParallel(e,t,i){let s=Date.now(),a=i?.trustTier??3,n=i?.validationLevel??"eval",c=this.determineTopology(e.length,t.length),r=this.createValidationTasks(e,t,a,n),o=await this.executeTasksParallel(r,c),l=new Map;for(let u of o){let p=l.get(u.skill)||[];p.push(u),l.set(u.skill,p)}return await this.recordOutcomesToLearner(o,a,n),l}async validateSkillCrossModel(e,t,i){return(await this.validateSkillsParallel([e],t,i)).get(e)||[]}getSummary(e){let t=[],i=new Map,s=new Map;for(let[c,r]of e){i.set(c,r);for(let o of r){t.push(o);let l=s.get(o.model)||[];l.push(o),s.set(o.model,l)}}let a=t.filter(c=>c.errors.length===0&&c.evalPassRate>=.9).length,n=t.reduce((c,r)=>c+r.durationMs,0);return{totalSkills:i.size,totalModels:s.size,successCount:a,failureCount:t.length-a,overallPassRate:t.length>0?a/t.length:0,totalDurationMs:n,avgDurationMs:t.length>0?n/t.length:0,topology:this.config.topology,bySkill:i,byModel:s,results:t}}determineTopology(e,t){if(this.config.topology){let i=e*t;return i>20&&this.config.topology==="mesh"&&console.warn(`[SwarmSkillValidator] Large workload (${i} tasks) may be more efficient with hierarchical topology`),this.config.topology}return e>5||e>t*2?"hierarchical":t>5&&e<=3?"mesh":"hierarchical"}createValidationTasks(e,t,i,s){let a=[];for(let n of e)for(let c of t)a.push({id:`${n}-${c}-${Date.now()}-${D().slice(0,8)}`,skill:n,model:c,trustTier:i,validationLevel:s,timeout:this.config.timeout,retryCount:0});return a}async executeTasksParallel(e,t){this.isRunning=!0,this.taskQueue=[...e];let i=[],s=t==="hierarchical"?this.config.maxConcurrentSkills:Math.min(this.config.maxConcurrentSkills*this.config.maxConcurrentModels,e.length),a=[];for(let n=0;n<Math.min(s,e.length);n++){let c=`worker-${n}`;this.workers.set(c,{id:c,task:null,status:"idle"}),a.push(this.runWorker(c,i))}return await Promise.all(a),this.isRunning=!1,this.workers.clear(),i}async runWorker(e,t){let i=this.workers.get(e);if(i){for(;this.taskQueue.length>0&&this.isRunning;){let s=this.taskQueue.shift();if(!s)break;i.task=s,i.status="running",i.startTime=Date.now();try{let a=await this.executeValidationTask(s);t.push(a),i.result=a,i.status="completed"}catch(a){let n=this.createErrorResult(s,a);this.config.retry&&s.retryCount<this.config.retry.maxRetries&&this.config.continueOnFailure?(s.retryCount++,this.taskQueue.push(s),await this.delay(this.config.retry.retryDelayMs)):(t.push(n),i.result=n,i.status="failed")}}i.task=null,i.status="idle"}}async executeValidationTask(e){let t=Date.now();if(!this.skillValidator)return this.createSimulatedResult(e,t);let i=new Promise((n,c)=>{setTimeout(()=>c(new Error(`Validation timeout after ${e.timeout}ms`)),e.timeout)}),s=await Promise.race([this.skillValidator(e.skill,e.model,{trustTier:e.trustTier,validationLevel:e.validationLevel,timeout:e.timeout}),i]),a=Date.now()-t;return this.outcomeToResult(s,e,a)}outcomeToResult(e,t,i){let s=e.testCaseResults.filter(c=>c.passed).length,a=e.testCaseResults.length,n=a>0?s/a:e.score;return{skill:t.skill,model:t.model,schemaValid:e.validationLevel!=="schema"||e.passed,validatorPassed:e.validationLevel!=="validator"||e.passed,evalPassRate:n,durationMs:i,errors:e.passed?[]:["Validation failed"],trustTier:t.trustTier,validationLevel:t.validationLevel,retryCount:t.retryCount,timestamp:new Date}}createSimulatedResult(e,t){let i=Date.now()-t+b()*100,s=.85+b()*.15;return{skill:e.skill,model:e.model,schemaValid:!0,validatorPassed:s>.8,evalPassRate:s,durationMs:i,errors:s>.8?[]:["Simulated validation failure"],trustTier:e.trustTier,validationLevel:e.validationLevel,retryCount:e.retryCount,timestamp:new Date}}createErrorResult(e,t){let i=w(t);return{skill:e.skill,model:e.model,schemaValid:!1,validatorPassed:!1,evalPassRate:0,durationMs:0,errors:[i],trustTier:e.trustTier,validationLevel:e.validationLevel,retryCount:e.retryCount,timestamp:new Date}}async recordOutcomesToLearner(e,t,i){for(let s of e){let a={skillName:s.skill,trustTier:s.trustTier||t,validationLevel:s.validationLevel||i,model:s.model,passed:s.errors.length===0&&s.evalPassRate>=.9,score:s.evalPassRate,testCaseResults:this.createTestCaseResults(s),timestamp:s.timestamp,runId:`swarm-${Date.now()}`,metadata:{duration:s.durationMs,retryCount:s.retryCount}};await this.learner.recordValidationOutcome(a)}}createTestCaseResults(e){return[{testId:`${e.skill}-${e.model}-aggregate`,passed:e.errors.length===0,expectedPatterns:["valid-output"],actualPatterns:e.errors.length===0?["valid-output"]:[],reasoningQuality:e.evalPassRate,executionTimeMs:e.durationMs,category:"swarm-validation",priority:"high",error:e.errors.length>0?e.errors.join("; "):void 0}]}delay(e){return new Promise(t=>setTimeout(t,e))}getConfig(){return{...this.config}}isValidationRunning(){return this.isRunning}getWorkerStatus(){return Array.from(this.workers.values())}cancel(){this.isRunning=!1,this.taskQueue=[]}};function A(y,e){return new R(y,e)}var F=["security-testing","accessibility-testing","api-testing","performance-testing","visual-regression-testing","mutation-testing","contract-testing","chaos-testing","compliance-testing","penetration-testing"],I=["claude-sonnet","claude-haiku","claude-opus"];P();import{readFileSync as L,writeFileSync as N,existsSync as E}from"fs";var O={varianceThreshold:.04,regressionThreshold:.1,minSamples:3,autoUpdateManifest:!1},k=class{constructor(e,t,i={}){this.learner=e;this.manifestPath=t;this.config={...O,...i}}config;async aggregateResults(e){let t=`agg-${Date.now()}`,i=new Date,s=this.buildSkillResultsMap(e),a=this.calculateSummary(s,e),n=await this.detectCrossModelAnomalies(e),c=await this.detectRegressions(e,this.config.regressionThreshold),r=this.generateRecommendations(s,n,c),o={timestamp:i,runId:t,summary:a,skillResults:s,crossModelAnalysis:n,regressions:c,recommendations:r,metadata:{version:"1.0.0",environment:e[0]?.metadata?.environment,generatedBy:"ValidationResultAggregator",inputs:{runIds:e.map(l=>l.runId),models:[...new Set(e.map(l=>l.model))]}}};return this.config.autoUpdateManifest&&await this.updateManifest(o),o}buildSkillResultsMap(e){let t=new Map;for(let i of e)for(let s of i.outcomes){let a=s.skillName;t.has(a)||t.set(a,{skill:a,trustTier:s.trustTier,passRateByModel:new Map,avgPassRate:0,schemaValid:!0,validatorPassed:!0,evalPassed:!0,issues:[],executionTimeMs:0,testCount:0,passedTests:0,failedTests:0});let n=t.get(a),c=s.testCaseResults.filter(r=>r.passed).length/(s.testCaseResults.length||1);n.passRateByModel.set(i.model,c),n.testCount+=s.testCaseResults.length,n.passedTests+=s.testCaseResults.filter(r=>r.passed).length,n.failedTests+=s.testCaseResults.filter(r=>!r.passed).length,n.executionTimeMs+=s.metadata?.duration||0,s.validationLevel==="schema"&&!s.passed&&(n.schemaValid=!1),s.validationLevel==="validator"&&!s.passed&&(n.validatorPassed=!1),s.validationLevel==="eval"&&!s.passed&&(n.evalPassed=!1);for(let r of s.testCaseResults)!r.passed&&r.error&&n.issues.push({skill:a,model:i.model,severity:r.priority==="critical"?"critical":r.priority==="high"?"high":r.priority==="medium"?"medium":"low",type:this.categorizeIssueType(s.validationLevel,r.error),message:r.error,testId:r.testId})}for(let i of t.values()){let s=Array.from(i.passRateByModel.values());i.avgPassRate=s.length>0?s.reduce((a,n)=>a+n,0)/s.length:0}return t}categorizeIssueType(e,t){return t.toLowerCase().includes("timeout")?"timeout":e==="schema"?"schema_failure":e==="validator"?"validator_failure":e==="eval"?"eval_failure":"error"}calculateSummary(e,t){let i=Array.from(e.values()),s=i.filter(n=>n.avgPassRate>=.9).length,a=i.length>0?i.reduce((n,c)=>n+c.avgPassRate,0)/i.length:0;return{totalSkills:i.length,passedSkills:s,failedSkills:i.length-s,avgPassRate:a,totalDurationMs:t.reduce((n,c)=>n+c.durationMs,0),totalTests:i.reduce((n,c)=>n+c.testCount,0),passedTests:i.reduce((n,c)=>n+c.passedTests,0),failedTests:i.reduce((n,c)=>n+c.failedTests,0),modelsUsed:[...new Set(t.map(n=>n.model))]}}async detectCrossModelAnomalies(e){let t=new Map,i=new Map,s=new Map;for(let d of e){t.has(d.model)||(t.set(d.model,[]),i.set(d.model,{totalTests:0,passedTests:0,skillCount:0}));for(let g of d.outcomes){let h=g.testCaseResults.filter(m=>m.passed).length/(g.testCaseResults.length||1);t.get(d.model).push(h);let f=i.get(d.model);f.totalTests+=g.testCaseResults.length,f.passedTests+=g.testCaseResults.filter(m=>m.passed).length,f.skillCount++,s.has(g.skillName)||s.set(g.skillName,{passRates:[],models:[]}),s.get(g.skillName).passRates.push(h),s.get(g.skillName).models.push(d.model)}}let a=[];for(let d of t.values())a.push(...d);let n=a.length>0?a.reduce((d,g)=>d+g,0)/a.length:0,c=a.length>1?a.reduce((d,g)=>d+Math.pow(g-n,2),0)/a.length:0,r=Math.sqrt(c),o=[],l=new Map;for(let[d,g]of t.entries()){let h=g.reduce((v,x)=>v+x,0)/g.length,f=h-n,m=i.get(d);l.set(d,{avgPassRate:h,skillCount:m.skillCount,totalTests:m.totalTests}),Math.abs(f)>this.config.varianceThreshold*2&&o.push({model:d,type:f<0?"low_performance":"high_variance",description:`Model ${d} has ${(f*100).toFixed(1)}% difference from average`,passRate:h,avgPassRate:n,deviation:Math.abs(f)})}let u=[],p=[];for(let[d,g]of s.entries()){if(g.passRates.length<2)continue;let h=g.passRates.reduce((m,v)=>m+v,0)/g.passRates.length;g.passRates.reduce((m,v)=>m+Math.pow(v-h,2),0)/g.passRates.length<this.config.varianceThreshold?u.push(d):p.push(d)}return{variance:c,stdDeviation:r,anomalies:o,consistentSkills:u,inconsistentSkills:p,modelPerformance:l}}async detectRegressions(e,t){let i=[],s=new Set;for(let a of e)for(let n of a.outcomes){let c=`${n.skillName}-${a.model}`;if(s.has(c))continue;s.add(c);let r=await this.learner.getValidationTrends(n.skillName);if(!r)continue;let o=n.testCaseResults.filter(p=>p.passed).length/(n.testCaseResults.length||1),l=r.recentPassRate,u=l-o;u>=t&&i.push({skill:n.skillName,model:a.model,previousPassRate:l,currentPassRate:o,regressionAmount:u,trend:r.overall,possibleCauses:this.analyzePossibleCauses(n,u),severity:this.categorizeRegressionSeverity(u)})}return i.sort((a,n)=>{let c={critical:0,high:1,medium:2,low:3},r=c[a.severity]-c[n.severity];return r!==0?r:n.regressionAmount-a.regressionAmount})}analyzePossibleCauses(e,t){let i=[],s=e.testCaseResults.filter(c=>!c.passed);if(s.length>0){let c=[...new Set(s.map(r=>r.category).filter(Boolean))];c.length>0&&i.push(`Failures in categories: ${c.join(", ")}`)}let a=s.filter(c=>c.priority==="critical");a.length>0&&i.push(`${a.length} critical test(s) failing`);let n=e.testCaseResults.reduce((c,r)=>c+r.reasoningQuality,0)/(e.testCaseResults.length||1);return n<.7&&i.push(`Low reasoning quality score: ${(n*100).toFixed(1)}%`),t>.3&&i.push("Possible model behavior change or prompt drift"),i.length===0&&i.push("No specific cause identified - review test details"),i}categorizeRegressionSeverity(e){return e>=.5?"critical":e>=.3?"high":e>=.15?"medium":"low"}generateRecommendations(e,t,i){let s=[];if(t.inconsistentSkills.length>0&&s.push(`Review ${t.inconsistentSkills.length} skills with inconsistent cross-model behavior: `+t.inconsistentSkills.slice(0,3).join(", ")+(t.inconsistentSkills.length>3?` and ${t.inconsistentSkills.length-3} more`:"")),t.anomalies.some(r=>r.type==="low_performance")){let r=t.anomalies.filter(o=>o.type==="low_performance").map(o=>o.model);s.push(`Investigate low performance on model(s): ${r.join(", ")}`)}let a=i.filter(r=>r.severity==="critical");a.length>0&&s.push(`URGENT: ${a.length} critical regression(s) detected - immediate review required`);let n=Array.from(e.values()).filter(r=>r.avgPassRate<.9);if(n.length>0){let r=n.filter(l=>!l.schemaValid),o=n.filter(l=>!l.validatorPassed);r.length>0&&s.push(`Fix schema validation for: ${r.map(l=>l.skill).slice(0,3).join(", ")}`),o.length>0&&s.push(`Review validator scripts for: ${o.map(l=>l.skill).slice(0,3).join(", ")}`)}return Array.from(e.values()).reduce((r,o)=>r+o.avgPassRate,0)/e.size<.8&&s.push("Overall pass rate below 80% - consider reviewing skill definitions and test expectations"),s.length===0&&s.push("All validations passing - no immediate action required"),s}async updateManifest(e){if(!E(this.manifestPath))throw new Error(`Manifest file not found: ${this.manifestPath}`);let t=C(L(this.manifestPath,"utf-8"));for(let[s,a]of e.skillResults.entries())if(t.skills&&t.skills[s]){let n=t.skills[s];n.validation||(n.validation={}),n.validation.passRate=a.avgPassRate,n.validation.lastValidated=e.timestamp.toISOString(),n.validation.status=a.avgPassRate>=.9?"passing":"failing",n.validation.passRateByModel=Object.fromEntries(a.passRateByModel)}let i=Array.from(e.skillResults.values());t.validationStatus={passing:i.filter(s=>s.avgPassRate>=.9).length,failing:i.filter(s=>s.avgPassRate<.9).length,unknown:0,skipped:t.summary?.tier0||0},t.generatedAt=new Date().toISOString(),t.lastValidationRun={runId:e.runId,timestamp:e.timestamp.toISOString(),avgPassRate:e.summary.avgPassRate,modelsUsed:e.summary.modelsUsed},N(this.manifestPath,JSON.stringify(t,null,2))}generateMarkdownReport(e){let{summary:t,crossModelAnalysis:i,regressions:s,recommendations:a,skillResults:n}=e,c=(t.avgPassRate>=.9||t.avgPassRate>=.7,"`"),r=[];if(r.push(`# Validation Report
|
|
3
3
|
|
|
4
4
|
> ${c} Generated: ${e.timestamp.toISOString()}
|
|
5
5
|
> Run ID: ${e.runId}
|