agentic-qe 3.9.5 → 3.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/skills/skills-manifest.json +1 -1
- package/CHANGELOG.md +18 -0
- package/dist/cli/bundle.js +5 -5
- package/dist/cli/chunks/adapter-XV7RUOO7.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-AW36VJXL.js → agent-booster-wasm-ID2COJCQ.js} +2 -2
- package/dist/cli/chunks/{agent-handler-AQFW2CMW.js → agent-handler-EWK6FHKU.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-VA6A47U5.js → agent-memory-branch-BDKB7HER.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-Q5CC43GW.js +2 -0
- package/dist/cli/chunks/{audit-WVJHTVUU.js → audit-EB62PPY4.js} +2 -2
- package/dist/cli/chunks/base-UL4PX45P.js +2 -0
- package/dist/cli/chunks/{better-sqlite3-HCMGVEDO.js → better-sqlite3-C4HK6YT3.js} +2 -2
- package/dist/cli/chunks/{brain-handler-JZISBH2W.js → brain-handler-QLIHJDGD.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-3TQXIETD.js → branch-enumerator-HWWHSETZ.js} +2 -2
- package/dist/cli/chunks/{browser-4GZXU4YT.js → browser-PEMYUQ6B.js} +2 -2
- package/dist/cli/chunks/browser-workflow-K77KPDRF.js +2 -0
- package/dist/cli/chunks/{chunk-PVLOT5BL.js → chunk-2DGTT6D2.js} +2 -2
- package/dist/cli/chunks/{chunk-GFXAKQ77.js → chunk-2FTTRGRS.js} +2 -2
- package/dist/cli/chunks/{chunk-OPOTKH42.js → chunk-3BAC7NLV.js} +3 -3
- package/dist/cli/chunks/{chunk-W73AYMDP.js → chunk-3TAJSNCZ.js} +1 -1
- package/dist/cli/chunks/{chunk-NGP3DRFU.js → chunk-3U3NUFII.js} +1 -1
- package/dist/cli/chunks/{chunk-TRO45ZLC.js → chunk-3VBPPW7H.js} +1 -1
- package/dist/cli/chunks/{chunk-KUDPFLL4.js → chunk-3WQ7MLAJ.js} +4 -4
- package/dist/cli/chunks/{chunk-45WEXMKC.js → chunk-46442R6Q.js} +2 -2
- package/dist/cli/chunks/{chunk-NDWWN2YC.js → chunk-4H3YCKAI.js} +4 -4
- package/dist/cli/chunks/{chunk-73LG5ELL.js → chunk-4NYVSHN3.js} +2 -2
- package/dist/cli/chunks/{chunk-PGFHFPDP.js → chunk-5A5ECZCN.js} +2 -2
- package/dist/cli/chunks/{chunk-WIZOYPFT.js → chunk-5AXU6KCI.js} +2 -2
- package/dist/cli/chunks/{chunk-4QGNSNQL.js → chunk-5CKG46BM.js} +2 -2
- package/dist/cli/chunks/{chunk-MBXSHGDD.js → chunk-64SU2UFL.js} +2 -2
- package/dist/cli/chunks/{chunk-GFZRXQWH.js → chunk-67WBMX7K.js} +1 -1
- package/dist/cli/chunks/{chunk-6AMXWB6Y.js → chunk-6T6TPZCK.js} +2 -2
- package/dist/cli/chunks/{chunk-DPEX4UOC.js → chunk-6X6NWAVQ.js} +1 -1
- package/dist/cli/chunks/{chunk-ALX5RJSR.js → chunk-775KESYW.js} +2 -2
- package/dist/cli/chunks/{chunk-ZD2FS4Q7.js → chunk-7B3IZBNN.js} +2 -2
- package/dist/cli/chunks/{chunk-BYD54ZUF.js → chunk-7B46Q5OU.js} +2 -2
- package/dist/cli/chunks/{chunk-OTOQXMP6.js → chunk-7CSZCRSS.js} +3 -3
- package/dist/cli/chunks/{chunk-DSOEKRQL.js → chunk-7EDVNITA.js} +2 -2
- package/dist/cli/chunks/{chunk-XG2JAIQT.js → chunk-7MD7PQYH.js} +1 -1
- package/dist/cli/chunks/{chunk-ERV3OVUG.js → chunk-AFOGTLSY.js} +2 -2
- package/dist/cli/chunks/{chunk-WV7K5A7J.js → chunk-AJX44TJ7.js} +2 -2
- package/dist/cli/chunks/{chunk-UO2R7ZN3.js → chunk-AMLREU5W.js} +2 -2
- package/dist/cli/chunks/{chunk-QHMDETCU.js → chunk-ARRJKSDK.js} +1 -1
- package/dist/cli/chunks/{chunk-OQCEI7Q4.js → chunk-BHOJLQLF.js} +2 -2
- package/dist/cli/chunks/{chunk-Y6XYH7EV.js → chunk-BKCIW3O2.js} +2 -2
- package/dist/cli/chunks/{chunk-KWIDDPKG.js → chunk-C723FDLL.js} +2 -2
- package/dist/cli/chunks/{chunk-X6J7VYVD.js → chunk-CJ6GN5QT.js} +2 -2
- package/dist/cli/chunks/{chunk-J4SEGMXL.js → chunk-CLVHHUZB.js} +2 -2
- package/dist/cli/chunks/{chunk-CQT3IEEX.js → chunk-CQNNNR53.js} +2 -2
- package/dist/cli/chunks/{chunk-YDBMYTOV.js → chunk-CU3LGMOK.js} +2 -2
- package/dist/cli/chunks/{chunk-IMCYFQWF.js → chunk-DAWI2HRN.js} +2 -2
- package/dist/cli/chunks/{chunk-ZFCRDCHW.js → chunk-E5J3GKCP.js} +2 -2
- package/dist/cli/chunks/{chunk-UPFCV7MX.js → chunk-EJSRKZ5M.js} +2 -2
- package/dist/cli/chunks/{chunk-HA4COQ66.js → chunk-EMKI4ZV5.js} +2 -2
- package/dist/cli/chunks/{chunk-7JQOOPA2.js → chunk-ESFKNND3.js} +2 -2
- package/dist/cli/chunks/{chunk-KQ7VBUO4.js → chunk-EVRJS6CN.js} +2 -2
- package/dist/cli/chunks/{chunk-S4F3CNSP.js → chunk-FZ77DJFC.js} +2 -2
- package/dist/cli/chunks/{chunk-WTGUS7DD.js → chunk-G3VIZON2.js} +2 -2
- package/dist/cli/chunks/{chunk-NNNH36RU.js → chunk-GXVUDSYW.js} +2 -2
- package/dist/cli/chunks/{chunk-QPW2O5TR.js → chunk-H3KGRTY2.js} +9 -9
- package/dist/cli/chunks/{chunk-4FPCCKNQ.js → chunk-H4J456F2.js} +1 -1
- package/dist/cli/chunks/{chunk-GSTDQLXR.js → chunk-H5OYJKPR.js} +2 -2
- package/dist/cli/chunks/{chunk-4EOSDCDM.js → chunk-H7OP3RI2.js} +1 -1
- package/dist/cli/chunks/{chunk-ZP237D7K.js → chunk-HUPIHL55.js} +2 -2
- package/dist/cli/chunks/{chunk-FDFJHGRZ.js → chunk-HZSYBKRI.js} +2 -2
- package/dist/cli/chunks/{chunk-MRTDOSHR.js → chunk-JB3G5ZLL.js} +2 -2
- package/dist/cli/chunks/{chunk-YQTPEQO6.js → chunk-JDGUTBC3.js} +2 -2
- package/dist/cli/chunks/{chunk-ITIYGUIL.js → chunk-JEF3S4ER.js} +2 -2
- package/dist/cli/chunks/{chunk-LLXBL36X.js → chunk-JRPYXCDT.js} +1 -1
- package/dist/cli/chunks/{chunk-55EAFHVH.js → chunk-K52WNOTU.js} +3 -3
- package/dist/cli/chunks/{chunk-YZ3WB4TN.js → chunk-K5RE6ODJ.js} +2 -2
- package/dist/cli/chunks/{chunk-ZWS7J73Q.js → chunk-K6XC52U3.js} +1 -1
- package/dist/cli/chunks/{chunk-DFOANC7Z.js → chunk-KI4W6CVC.js} +1 -1
- package/dist/cli/chunks/{chunk-ZJWDWM6B.js → chunk-KIEXP4F3.js} +3 -3
- package/dist/cli/chunks/{chunk-3VNEMHOO.js → chunk-L6HQVZQL.js} +1 -1
- package/dist/cli/chunks/{chunk-EPH2GZQM.js → chunk-LFTQYU65.js} +2 -2
- package/dist/cli/chunks/{chunk-I27OTSC7.js → chunk-LSFJKCAQ.js} +2 -2
- package/dist/cli/chunks/{chunk-IMGRYCAT.js → chunk-LZ5LS4LF.js} +1 -1
- package/dist/cli/chunks/chunk-MA7OLK56.js +2 -0
- package/dist/cli/chunks/{chunk-6QKGLIIY.js → chunk-MAZWSPEQ.js} +2 -2
- package/dist/cli/chunks/{chunk-E55RROAP.js → chunk-MRDXDXPW.js} +1 -1
- package/dist/cli/chunks/{chunk-CNGRXBKO.js → chunk-MROCXAXJ.js} +2 -2
- package/dist/cli/chunks/{chunk-T4KMG3GJ.js → chunk-MV52OH7P.js} +1 -1
- package/dist/cli/chunks/{chunk-3UE5GART.js → chunk-MX3ORXM3.js} +2 -2
- package/dist/cli/chunks/{chunk-GHFXURNS.js → chunk-N5CEEWWJ.js} +1 -1
- package/dist/cli/chunks/{chunk-YHSIUFFY.js → chunk-NA5ZOZIF.js} +2 -2
- package/dist/cli/chunks/{chunk-53J3R7PZ.js → chunk-NOK2ICQT.js} +2 -2
- package/dist/cli/chunks/{chunk-6VB4VZCR.js → chunk-NPNGSE7X.js} +2 -2
- package/dist/cli/chunks/{chunk-2XJRSIM5.js → chunk-NSRIYP76.js} +2 -2
- package/dist/cli/chunks/{chunk-3KYKE7B6.js → chunk-O65ZAUG3.js} +1 -1
- package/dist/cli/chunks/{chunk-REXMKRR2.js → chunk-P4X6YTOY.js} +8 -8
- package/dist/cli/chunks/{chunk-673PL3DG.js → chunk-PKD6LEQZ.js} +1 -1
- package/dist/cli/chunks/{chunk-G7XBTBM7.js → chunk-QBQ52YUU.js} +2 -2
- package/dist/cli/chunks/{chunk-6FM5DJHR.js → chunk-QE255FHS.js} +4 -4
- package/dist/cli/chunks/{chunk-YHKJYBWK.js → chunk-QGEZJKVO.js} +1 -1
- package/dist/cli/chunks/{chunk-NHIQ5HP3.js → chunk-QWVILMUX.js} +2 -2
- package/dist/cli/chunks/{chunk-BQUN2NB4.js → chunk-QYGI32T4.js} +3 -3
- package/dist/cli/chunks/{chunk-VKT4STAE.js → chunk-RD5N2722.js} +2 -2
- package/dist/cli/chunks/{chunk-KCQ2GFRN.js → chunk-RZLRPLRC.js} +2 -2
- package/dist/cli/chunks/{chunk-HT5EZYPZ.js → chunk-SQCNABS4.js} +2 -2
- package/dist/cli/chunks/chunk-SYYGXU7I.js +2 -0
- package/dist/cli/chunks/{chunk-IHXDXFUX.js → chunk-T4L6MHRW.js} +1 -1
- package/dist/cli/chunks/{chunk-74YG34UH.js → chunk-TG7PATSN.js} +2 -2
- package/dist/cli/chunks/{chunk-6QR7GSNJ.js → chunk-TPXS5KEC.js} +2 -2
- package/dist/cli/chunks/{chunk-YGZBS4RW.js → chunk-TSZ6VMCF.js} +2 -2
- package/dist/cli/chunks/{chunk-MO3IIM7L.js → chunk-UB53OWSL.js} +1 -1
- package/dist/cli/chunks/{chunk-3QH67ZYC.js → chunk-V2IUGAJ7.js} +2 -2
- package/dist/cli/chunks/{chunk-JUBICWL2.js → chunk-V3D6AA2P.js} +1 -1
- package/dist/cli/chunks/{chunk-3UFAEGSS.js → chunk-VJKIPTA2.js} +1 -1
- package/dist/cli/chunks/{chunk-LPVQ6QCW.js → chunk-VMDSTKVR.js} +2 -2
- package/dist/cli/chunks/{chunk-35DP6LX6.js → chunk-WFWVSI2W.js} +2 -2
- package/dist/cli/chunks/{chunk-BNYHBEDE.js → chunk-WOR67NKR.js} +2 -2
- package/dist/cli/chunks/{chunk-N66G743A.js → chunk-WQ76RMU3.js} +3 -3
- package/dist/cli/chunks/{chunk-TRPCOY3C.js → chunk-XKU2LJIM.js} +1 -1
- package/dist/cli/chunks/{chunk-CGYTM7AB.js → chunk-XOTBE543.js} +2 -2
- package/dist/cli/chunks/{chunk-PTAUZ3XL.js → chunk-XQAZHVHD.js} +1 -1
- package/dist/cli/chunks/{chunk-TUMXWCB7.js → chunk-Y2BEI3DL.js} +3 -3
- package/dist/cli/chunks/{chunk-5NBYV7FL.js → chunk-Y65KKN4T.js} +1 -1
- package/dist/cli/chunks/{chunk-3DGO7NJK.js → chunk-YI54PU4P.js} +1 -1
- package/dist/cli/chunks/{chunk-JYJXVTUP.js → chunk-YOLOT7MX.js} +2 -2
- package/dist/cli/chunks/{chunk-TSA5MUTQ.js → chunk-YQ7X6LKA.js} +2 -2
- package/dist/cli/chunks/{chunk-I4HGIQC2.js → chunk-YV34KLBV.js} +2 -2
- package/dist/cli/chunks/{chunk-CGYOMD6X.js → chunk-YWWQRNKI.js} +1 -1
- package/dist/cli/chunks/{chunk-TRRJP27A.js → chunk-Z4UUJUZO.js} +1 -1
- package/dist/cli/chunks/{chunk-MYIDAWGQ.js → chunk-Z5IOTEQI.js} +2 -2
- package/dist/cli/chunks/{chunk-BM7VSJTE.js → chunk-ZV6CCRP2.js} +2 -2
- package/dist/cli/chunks/{ci-3ATT6NMC.js → ci-6L22RUNC.js} +2 -2
- package/dist/cli/chunks/{ci-output-2JR3J753.js → ci-output-C2PAMUXM.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-SG2BSEED.js → claude-flow-setup-S3HHSSIM.js} +2 -2
- package/dist/cli/chunks/client-KXLRKXSG.js +2 -0
- package/dist/cli/chunks/{cline-installer-A26SXDX6.js → cline-installer-YIXOIHBL.js} +2 -2
- package/dist/cli/chunks/{code-WIXKPGAQ.js → code-QVFF72Z4.js} +2 -2
- package/dist/cli/chunks/{code-index-extractor-W2NO6MR3.js → code-index-extractor-BRNK2X4M.js} +2 -2
- package/dist/cli/chunks/{codex-installer-VBSJHXI4.js → codex-installer-TLRH3SG7.js} +2 -2
- package/dist/cli/chunks/{completions-JFXIUS2V.js → completions-A46MED6L.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-GPO4ZAIZ.js → complexity-analyzer-FJSG676O.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-OULSFVLB.js → continuedev-installer-7HHND63H.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-QS7EG5DW.js → copilot-installer-UQ4IEG4H.js} +2 -2
- package/dist/cli/chunks/{cost-tracker-D7LNB633.js → cost-tracker-R6FXO2MO.js} +2 -2
- package/dist/cli/chunks/{coverage-YUQ4MQYK.js → coverage-3AGGT36D.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-I2WPLKVN.js +2 -0
- package/dist/cli/chunks/{cursor-installer-UOZGHZHD.js → cursor-installer-7PABDYDI.js} +2 -2
- package/dist/cli/chunks/{daemon-27TMWDPY.js → daemon-YTCKYJB4.js} +3 -3
- package/dist/cli/chunks/{dag-attention-scheduler-PVAFQBDL.js → dag-attention-scheduler-LZZ4O2PT.js} +2 -2
- package/dist/cli/chunks/{detect-FUKMZ37Y.js → detect-OBCGJIYW.js} +2 -2
- package/dist/cli/chunks/{domain-handler-SP3QB5VN.js → domain-handler-5PHN6YQM.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-A2WL6HEJ.js → domain-transfer-K6YSBC2L.js} +2 -2
- package/dist/cli/chunks/dream-BH35JQRS.js +2 -0
- package/dist/cli/chunks/esm-node-VI5DSKCM.js +2 -0
- package/dist/cli/chunks/{eval-6MIZUXEO.js → eval-UAAFW3YU.js} +2 -2
- package/dist/cli/chunks/{fast-paths-XT542LOU.js → fast-paths-7IFG4BYW.js} +2 -2
- package/dist/cli/chunks/{feature-flags-WBF5B6WE.js → feature-flags-AEO5C73R.js} +2 -2
- package/dist/cli/chunks/{feature-flags-NWACCWCB.js → feature-flags-TVJAGLLH.js} +2 -2
- package/dist/cli/chunks/{file-discovery-GKCJFWTD.js → file-discovery-STTTDBN3.js} +2 -2
- package/dist/cli/chunks/{fleet-V2MKGNMG.js → fleet-L6RVZQ2B.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-HUUMTTSV.js → gnn-wrapper-W4QHVBUD.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-UY3TCEN7.js → heartbeat-handler-3KZOB7MZ.js} +4 -4
- package/dist/cli/chunks/{heartbeat-scheduler-YWXPSCH2.js → heartbeat-scheduler-IR57JOZR.js} +2 -2
- package/dist/cli/chunks/hnsw-adapter-2SFTC2VH.js +2 -0
- package/dist/cli/chunks/hnsw-index-OBEYJRMU.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-IYYYSRK5.js → hnsw-legacy-bridge-5BYAJDVC.js} +2 -2
- package/dist/cli/chunks/{hnswlib-node-WDWAE74R.js → hnswlib-node-MUXAWCUE.js} +2 -2
- package/dist/cli/chunks/{hooks-DTBJK6LL.js → hooks-QT4NVEDG.js} +6 -6
- package/dist/cli/chunks/{hypergraph-engine-K47IBQNO.js → hypergraph-engine-MLLU5WQB.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-2NDPG2N4.js → hypergraph-handler-LJWRQ2WW.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-C5SKESHG.js +2 -0
- package/dist/cli/chunks/{init-handler-VRZS6KO2.js → init-handler-MKAZHZJS.js} +6 -6
- package/dist/cli/chunks/init-wizard-DV34KMTN.js +2 -0
- package/dist/cli/chunks/kernel-3HL4J5WJ.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-XZAHWQEA.js → kilocode-installer-5MAYAROV.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-53C7DXEF.js → kiro-installer-3JJ7TSXH.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-XPFESDWZ.js +2 -0
- package/dist/cli/chunks/{learning-XYW2EEVX.js → learning-G7MWQMRY.js} +3 -3
- package/dist/cli/chunks/{llm-router-64SKMJ7B.js → llm-router-HYK5VS4A.js} +2 -2
- package/dist/cli/chunks/{load-HVL4O7EY.js → load-YVN3F5ZP.js} +2 -2
- package/dist/cli/chunks/load-test-EF3BRFGO.js +2 -0
- package/dist/cli/chunks/{mcp-4H2NJ3EO.js → mcp-I43GRN5E.js} +2 -2
- package/dist/cli/chunks/{memory-2CD4BAJK.js → memory-TMKTUI37.js} +5 -5
- package/dist/cli/chunks/memory-backend-FJDNXX6N.js +2 -0
- package/dist/cli/chunks/{memory-handlers-XRYZBE5I.js → memory-handlers-YFJOLCGN.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-I23QAZC6.js → opencode-installer-KYDQUOAW.js} +2 -2
- package/dist/cli/chunks/{orchestrator-7BL6R54P.js → orchestrator-C6XRSC6Z.js} +25 -22
- package/dist/cli/chunks/{pipeline-7UN7LP6B.js → pipeline-IULH5B62.js} +2 -2
- package/dist/cli/chunks/{platform-P44YUHPK.js → platform-CACMGVB3.js} +2 -2
- package/dist/cli/chunks/{plugin-YWYR7FKS.js → plugin-6VSTK54C.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-A7CDGUK6.js → prime-radiant-advanced-wasm-UA6FGPKX.js} +2 -2
- package/dist/cli/chunks/protocol-executor-OFL7H2VR.js +2 -0
- package/dist/cli/chunks/{protocol-handler-BM7RLC4Z.js → protocol-handler-UYJISQUT.js} +2 -2
- package/dist/cli/chunks/{prove-UVBYODRV.js → prove-H7PAIHGE.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-4NWLHIEM.js +2 -0
- package/dist/cli/chunks/{quality-4L42LN5Q.js → quality-NT3N4UDM.js} +2 -2
- package/dist/cli/chunks/queen-coordinator-I7YDKGZD.js +2 -0
- package/dist/cli/chunks/{real-embeddings-4CYZTWHT.js → real-embeddings-K46PTHOR.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-UOSJS7KT.js → roocode-installer-K47KSTXW.js} +2 -2
- package/dist/cli/chunks/router-LNGYBIC4.js +2 -0
- package/dist/cli/chunks/routing-feedback-4RFHNTYV.js +2 -0
- package/dist/cli/chunks/{routing-handler-43G4D5UP.js → routing-handler-5RXV3FRV.js} +2 -2
- package/dist/cli/chunks/ruvector-commands-V46KRNUZ.js +8 -0
- package/dist/cli/chunks/{rvf-dual-writer-USU2IWO7.js → rvf-dual-writer-YX5K3XO7.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-adapter-DZMYVJJY.js → rvf-migration-adapter-SURDRXWQ.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-coordinator-AZ5JDT33.js → rvf-migration-coordinator-FMUHUWTB.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-7REIX6DO.js +2 -0
- package/dist/cli/chunks/safe-db-SVN2BQFW.js +2 -0
- package/dist/cli/chunks/schedule-S6Z3DNRK.js +2 -0
- package/dist/cli/chunks/scheduler-BE5RHB4R.js +2 -0
- package/dist/cli/chunks/{security-RXG4H3UK.js → security-ENEWXTNE.js} +3 -3
- package/dist/cli/chunks/shared-rvf-adapter-PNVIYEDK.js +2 -0
- package/dist/cli/chunks/{shared-rvf-dual-writer-2PUFIGX5.js → shared-rvf-dual-writer-KJ67FATL.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-XBTALZ2S.js +2 -0
- package/dist/cli/chunks/{status-handler-SXQKG6VP.js → status-handler-CEMWQKE6.js} +2 -2
- package/dist/cli/chunks/{structural-health-LPXOOMG3.js → structural-health-B4VGYG4F.js} +2 -2
- package/dist/cli/chunks/{sync-5NX7GQQY.js → sync-P7PLECMB.js} +2 -2
- package/dist/cli/chunks/{task-handler-Y4KVNCOI.js → task-handler-YGKMS5E2.js} +2 -2
- package/dist/cli/chunks/{task-handlers-CG27Z3CP.js → task-handlers-LKTBRIPS.js} +2 -2
- package/dist/cli/chunks/{test-PWVTWOWS.js → test-ZWWGVM5X.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-5S5EBVE7.js → test-scheduling-HTFVIWWL.js} +3 -3
- package/dist/cli/chunks/{token-bootstrap-QMPUKGQC.js → token-bootstrap-7VYNREQH.js} +2 -2
- package/dist/cli/chunks/{token-usage-OZNRTJLE.js → token-usage-D67GP7FV.js} +2 -2
- package/dist/cli/chunks/{transformers-DRPOBWCW.js → transformers-CI3CZC2C.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-VLX6HQW2.js → tree-sitter-wasm-parser-BMRWIP7P.js} +2 -2
- package/dist/cli/chunks/{types-TUF6HUPE.js → types-SAPPKMCS.js} +2 -2
- package/dist/cli/chunks/unified-memory-OYIJOZ2E.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-JRWF6EEB.js +2 -0
- package/dist/cli/chunks/unified-persistence-OOUATKAN.js +2 -0
- package/dist/cli/chunks/{validate-H7QFV2CI.js → validate-UZL2Y3GR.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-BGH6YM4S.js → validate-swarm-ILNS64DZ.js} +2 -2
- package/dist/cli/chunks/{vibium-DQOGR2PH.js → vibium-CJMPXUAU.js} +2 -2
- package/dist/cli/chunks/visual-security-77T3APRH.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-TOI4XJIL.js → web-tree-sitter-HO5UYPPH.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-EUMBFA42.js → windsurf-installer-TEXMCEBB.js} +2 -2
- package/dist/cli/chunks/witness-chain-QIARNA6D.js +2 -0
- package/dist/cli/chunks/{witness-chain-MWPUR4Q2.js → witness-chain-TF35D7QS.js} +2 -2
- package/dist/cli/chunks/{workflow-V5HI3AQR.js → workflow-APRDB3SB.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-IRZVM4MZ.js +2 -0
- package/dist/cli/chunks/{wrappers-VOU4IVAQ.js → wrappers-VGV5RU5Q.js} +2 -2
- package/dist/cli/commands/ruvector-commands.js +5 -2
- package/dist/cli/index.js +5 -4
- package/dist/init/phases/04-database.js +19 -0
- package/dist/init/phases/06-code-intelligence.js +9 -6
- package/dist/init/phases/10-workers.js +2 -0
- package/dist/integrations/ruvector/feature-flags.d.ts +27 -5
- package/dist/integrations/ruvector/feature-flags.js +15 -2
- package/dist/kernel/hnsw-adapter.js +1 -1
- package/dist/kernel/native-hnsw-backend.d.ts +100 -37
- package/dist/kernel/native-hnsw-backend.js +207 -192
- package/dist/kernel/unified-memory.js +15 -10
- package/dist/mcp/bundle.js +189 -189
- package/package.json +1 -1
- package/dist/cli/chunks/adapter-HOBCL2VF.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-77FVV2ZJ.js +0 -2
- package/dist/cli/chunks/base-2IXMPGJV.js +0 -2
- package/dist/cli/chunks/browser-workflow-AQYKV2NE.js +0 -2
- package/dist/cli/chunks/chunk-PMFZHFCB.js +0 -2
- package/dist/cli/chunks/chunk-Z2GK7COI.js +0 -2
- package/dist/cli/chunks/client-3CA57H5P.js +0 -2
- package/dist/cli/chunks/cross-domain-router-GECFIALH.js +0 -2
- package/dist/cli/chunks/dream-CJ4MKM5G.js +0 -2
- package/dist/cli/chunks/esm-node-X7U3YS4M.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-LJGOH772.js +0 -2
- package/dist/cli/chunks/hnsw-index-V6SST2MB.js +0 -2
- package/dist/cli/chunks/impact-analyzer-MTOVFD3O.js +0 -2
- package/dist/cli/chunks/init-wizard-IH6PSRJY.js +0 -2
- package/dist/cli/chunks/kernel-3MC7WV5G.js +0 -2
- package/dist/cli/chunks/knowledge-graph-HLUQJ2GI.js +0 -2
- package/dist/cli/chunks/load-test-VVVME7GZ.js +0 -2
- package/dist/cli/chunks/memory-backend-O3U2QDU3.js +0 -2
- package/dist/cli/chunks/protocol-executor-HLNTSRYC.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-JK5CK4D4.js +0 -2
- package/dist/cli/chunks/queen-coordinator-FLF6XYLX.js +0 -2
- package/dist/cli/chunks/router-DUFZW3WQ.js +0 -2
- package/dist/cli/chunks/routing-feedback-6U76TI6X.js +0 -2
- package/dist/cli/chunks/ruvector-commands-H7A7LG6Q.js +0 -8
- package/dist/cli/chunks/rvf-native-adapter-4UD7SUMB.js +0 -2
- package/dist/cli/chunks/safe-db-32Q5RXHR.js +0 -2
- package/dist/cli/chunks/schedule-ZHCM3L6H.js +0 -2
- package/dist/cli/chunks/scheduler-HBSSLDOD.js +0 -2
- package/dist/cli/chunks/shared-rvf-adapter-PLZVKKW7.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-YUZMB44Y.js +0 -2
- package/dist/cli/chunks/unified-memory-3D4VDY4G.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-AAQ5IA6M.js +0 -2
- package/dist/cli/chunks/unified-persistence-PY7MVJTL.js +0 -2
- package/dist/cli/chunks/visual-security-ZBNB7LEG.js +0 -2
- package/dist/cli/chunks/witness-chain-CS76OJFL.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-FS4HGYI7.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,24 @@ 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.6] - 2026-04-06
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **Native HNSW search now actually works** ([#399](https://github.com/proffesor-for-testing/agentic-qe/issues/399), [ADR-090](docs/implementation/adrs/ADR-090-hnswlib-node-migration.md)) — the previous `NativeHnswBackend` wrapped `@ruvector/router 0.1.28`'s `VectorDb`, which was found to have **four serious bugs**: (1) HNSW search returned essentially random results — recall@10 ≈ 0–10% on textbook unit-Gaussian random vectors, could not find self-vectors; (2) the `VectorDb` constructor unconditionally wrote a `vectors.db` redb file to the user's project root, polluting CWD with multi-MB files outside the unified memory architecture; (3) only one `VectorDb` instance could exist per process due to a process-wide redb file lock; (4) NAPI dispose did not synchronously release the redb lock, which was the root cause of v3.9.5's futex deadlock. `NativeHnswBackend` was rewritten to wrap `hnswlib-node@^3.0.0` (the canonical Yury Malkov C++ Hnswlib reference implementation, used by Pinecone, Weaviate, Qdrant, LangChain, ChromaDB), which fixes all four bugs in one swap. Empirical verification on the same fixture: **100% recall@10** vs `@ruvector/router`'s 10%, faster inserts, multiple instances coexist, no CWD pollution. The `useNativeHNSW` default is flipped back to `true` so users with large codebases get sublinear HNSW search by default again. No new dependency was added — `hnswlib-node` was already in `package.json`.
|
|
13
|
+
|
|
14
|
+
- **Code-intelligence semantic search returns correct nearest neighbors.** Prior to the migration, every `qe-kernel` namespace search was going through the broken `@ruvector/router` HNSW and returning essentially random non-neighbors. Pattern matching, dream insights, and KG search now return the actual nearest neighbors.
|
|
15
|
+
|
|
16
|
+
### Removed
|
|
17
|
+
|
|
18
|
+
- **`vectors.db` is no longer auto-created in users' project roots.** This was a side-effect of `@ruvector/router`'s `VectorDb` constructor and existed in violation of the unified memory architecture (CLAUDE.md: "all data goes through SQLite — one DB, one schema"). `aqe init` now warns when a stale `vectors.db` is detected from a previous version and tells the user it is safe to delete. **It does not auto-delete** — per CLAUDE.md data protection rules, AQE never touches `.db` files without explicit user confirmation. Users can clean up with `rm vectors.db`.
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- **Real-fixture HNSW recall test** (`tests/integration/ruvector/native-hnsw-real-fixture.test.ts`) — loads the project's own `qe-kernel` namespace from `.agentic-qe/memory.db` and asserts top-1 == self with recall@10 ≥ 0.9 across 5 deterministic queries against ~2,000 real sentence-transformer embeddings. Plus regression guards for the four `@ruvector/router` bugs (CWD pollution, concurrent instances, dispose lifecycle, resize past initial capacity).
|
|
23
|
+
- **Diagnostic scripts** (`scripts/diagnose-issue-399*.mjs`) — four self-contained scripts that reproduce each of the four `@ruvector/router` bugs and verify hnswlib-node's correctness on the same fixtures. Kept for any future revisit of the HNSW backend.
|
|
24
|
+
- **ADR-090** documenting the migration with the empirical numbers, the four bugs, the rejected alternatives, and the migration path for users with stale `vectors.db` files.
|
|
25
|
+
|
|
8
26
|
## [3.9.5] - 2026-04-06
|
|
9
27
|
|
|
10
28
|
### 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.6");process.exit(0)}
|
|
3
|
+
import{a as y}from"./chunks/chunk-KI4W6CVC.js";import{a as f,c as A}from"./chunks/chunk-Z5IOTEQI.js";import"./chunks/chunk-N5CEEWWJ.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-3HL4J5WJ.js"),{CrossDomainEventRouter:i}=await import("./chunks/cross-domain-router-I2WPLKVN.js"),{DefaultProtocolExecutor:a}=await import("./chunks/protocol-executor-OFL7H2VR.js"),{WorkflowOrchestrator:s}=await import("./chunks/workflow-orchestrator-IRZVM4MZ.js"),{createQueenCoordinator:l}=await import("./chunks/queen-coordinator-I7YDKGZD.js"),{createPersistentScheduler:u}=await import("./chunks/scheduler-BE5RHB4R.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.6";n.name("aqe").description("Agentic QE - Domain-Driven Quality Engineering").version(v);d(n,"init","Initialize the AQE v3 system",()=>import("./chunks/init-handler-MKAZHZJS.js").then(e=>e.createInitHandler(o)),t);d(n,"status","Show system status",()=>import("./chunks/status-handler-CEMWQKE6.js").then(e=>e.createStatusHandler(o,k)),t);d(n,"health","Check system health",()=>import("./chunks/status-handler-CEMWQKE6.js").then(e=>e.createHealthHandler(o,k)),t);d(n,"task","Manage QE tasks",()=>import("./chunks/task-handler-YGKMS5E2.js").then(e=>e.createTaskHandler(o,c)),t);d(n,"agent","Manage QE agents",()=>import("./chunks/agent-handler-EWK6FHKU.js").then(e=>e.createAgentHandler(o,c)),t);d(n,"domain","Domain operations",()=>import("./chunks/domain-handler-5PHN6YQM.js").then(e=>e.createDomainHandler(o,c)),t);d(n,"protocol","Execute coordination protocols",()=>import("./chunks/protocol-handler-UYJISQUT.js").then(e=>e.createProtocolHandler(o,c)),t);d(n,"brain","Export, import, and inspect QE brain state",()=>import("./chunks/brain-handler-QLIHJDGD.js").then(e=>e.createBrainHandler(o,c)),t);d(n,"hypergraph","Query the code knowledge hypergraph",()=>import("./chunks/hypergraph-handler-LJWRQ2WW.js").then(e=>e.createHypergraphHandler(o,c)),t,["hg"]);d(n,"heartbeat","Manage the token-free heartbeat scheduler",()=>import("./chunks/heartbeat-handler-3KZOB7MZ.js").then(e=>e.createHeartbeatHandler(o)),t);d(n,"routing","View routing performance, economics, and accuracy",()=>import("./chunks/routing-handler-5RXV3FRV.js").then(e=>e.createRoutingHandler(o)),t);r(n,{name:"workflow",description:"Manage QE workflows and pipelines (ADR-041)",factory:()=>import("./chunks/workflow-APRDB3SB.js").then(e=>e.createWorkflowCommand(t,o,c))});r(n,{name:"test",description:"Test generation, execution, scheduling, and load testing",factory:()=>import("./chunks/test-ZWWGVM5X.js").then(e=>e.createTestCommand(t,o,c))});r(n,{name:"coverage",description:"Coverage analysis shortcut",factory:()=>import("./chunks/coverage-3AGGT36D.js").then(e=>e.createCoverageCommand(t,o,c))});r(n,{name:"quality",description:"Quality assessment shortcut",factory:()=>import("./chunks/quality-NT3N4UDM.js").then(e=>e.createQualityCommand(t,o,c))});r(n,{name:"security",description:"Security scanning and URL validation",factory:()=>import("./chunks/security-ENEWXTNE.js").then(e=>e.createSecurityCommand(t,o,c))});r(n,{name:"code",description:"Code intelligence analysis",factory:()=>import("./chunks/code-QVFF72Z4.js").then(e=>e.createCodeCommand(t,o,c))});r(n,{name:"completions",description:"Generate shell completions for aqe",factory:()=>import("./chunks/completions-A46MED6L.js").then(e=>e.createCompletionsCommand(o))});r(n,{name:"fleet",description:"Fleet operations with multi-agent progress tracking",factory:()=>import("./chunks/fleet-L6RVZQ2B.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-ILNS64DZ.js").then(e=>e.createValidateSwarmCommand(t,o,c))});r(n,{name:"skill",description:"Skill validation and reporting (ADR-056)",factory:()=>import("./chunks/validate-UZL2Y3GR.js").then(e=>e.createValidateCommand(t,o,c))});r(n,{name:"eval",description:"Run skill evaluation suites in parallel",factory:()=>import("./chunks/eval-UAAFW3YU.js").then(e=>e.createEvalCommand())});r(n,{name:"ci",description:"CI/CD pipeline orchestration",factory:()=>import("./chunks/ci-6L22RUNC.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-D67GP7FV.js").then(e=>e.createTokenUsageCommand())});r(n,{name:"llm",description:"LLM Router management (ADR-043)",factory:()=>import("./chunks/llm-router-HYK5VS4A.js").then(e=>e.createLLMRouterCommand())});r(n,{name:"sync",description:"Sync local learning data to cloud PostgreSQL",factory:()=>import("./chunks/sync-P7PLECMB.js").then(e=>e.createSyncCommands())});r(n,{name:"hooks",description:"Self-learning QE hooks for pattern recognition and guidance",factory:()=>import("./chunks/hooks-QT4NVEDG.js").then(e=>e.createHooksCommand())});r(n,{name:"learning",description:"AQE self-learning system management (standalone, no claude-flow required)",factory:()=>import("./chunks/learning-G7MWQMRY.js").then(e=>e.createLearningCommand())});r(n,{name:"memory",description:"Memory store, retrieve, search, and delete operations",factory:()=>import("./chunks/memory-TMKTUI37.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-I43GRN5E.js").then(e=>e.createMcpCommand())});r(n,{name:"platform",description:"Manage coding agent platform configurations",factory:()=>import("./chunks/platform-CACMGVB3.js").then(e=>e.createPlatformCommand())});r(n,{name:"prove",description:"Generate a verifiable Proof-of-Quality attestation",factory:()=>import("./chunks/prove-H7PAIHGE.js").then(e=>e.createProveCommand(t,o,c))});r(n,{name:"ruvector",description:"RuVector integration management",factory:()=>import("./chunks/ruvector-commands-V46KRNUZ.js").then(e=>e.createRuVectorCommand())});r(n,{name:"audit",description:"Witness chain audit trail management",factory:()=>import("./chunks/audit-EB62PPY4.js").then(e=>e.createAuditCommand(t,o,c))});r(n,{name:"pipeline",description:"Manage YAML deterministic pipelines (Imp-9)",factory:()=>import("./chunks/pipeline-IULH5B62.js").then(e=>e.createPipelineCommand(t,o,c))});r(n,{name:"plugin",description:"Manage external QE domain plugins",factory:()=>import("./chunks/plugin-6VSTK54C.js").then(e=>e.createPluginCommand())});r(n,{name:"daemon",description:"Manage the QE Quality Daemon",factory:()=>import("./chunks/daemon-YTCKYJB4.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-7IFG4BYW.js");e(process.argv)&&(console.log(v),process.exit(0));let{bootstrapTokenTracking:i}=await import("./chunks/token-bootstrap-7VYNREQH.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.6");process.exit(0)}
|
|
2
|
+
import{a,b,c}from"./chunk-7CSZCRSS.js";import"./chunk-H5OYJKPR.js";import"./chunk-XQAZHVHD.js";import"./chunk-MROCXAXJ.js";import"./chunk-Z5IOTEQI.js";import"./chunk-N5CEEWWJ.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.6");process.exit(0)}
|
|
2
|
+
import{a as x}from"./chunk-MA7OLK56.js";import{c as f}from"./chunk-BHOJLQLF.js";import"./chunk-N5CEEWWJ.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.6");process.exit(0)}
|
|
2
|
+
import{b as p}from"./chunk-CLVHHUZB.js";import{a as g}from"./chunk-YI54PU4P.js";import"./chunk-MROCXAXJ.js";import"./chunk-N5CEEWWJ.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.6");process.exit(0)}
|
|
2
|
+
import"./chunk-N5CEEWWJ.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.6");process.exit(0)}
|
|
2
|
+
import{a,b,c,d,e,f}from"./chunk-3BAC7NLV.js";import"./chunk-DAWI2HRN.js";import"./chunk-WQ76RMU3.js";import"./chunk-4H3YCKAI.js";import"./chunk-L6HQVZQL.js";import"./chunk-O65ZAUG3.js";import"./chunk-H4J456F2.js";import"./chunk-MX3ORXM3.js";import"./chunk-NOK2ICQT.js";import"./chunk-AJX44TJ7.js";import"./chunk-BKCIW3O2.js";import"./chunk-EMKI4ZV5.js";import"./chunk-VMDSTKVR.js";import"./chunk-SQCNABS4.js";import"./chunk-YV34KLBV.js";import"./chunk-MA7OLK56.js";import"./chunk-BHOJLQLF.js";import"./chunk-MROCXAXJ.js";import"./chunk-KI4W6CVC.js";import"./chunk-Z5IOTEQI.js";import"./chunk-3VBPPW7H.js";import"./chunk-CU3LGMOK.js";import"./chunk-775KESYW.js";import"./chunk-5AXU6KCI.js";import"./chunk-YQ7X6LKA.js";import"./chunk-5CKG46BM.js";import"./chunk-EJSRKZ5M.js";import"./chunk-SYYGXU7I.js";import"./chunk-V2IUGAJ7.js";import"./chunk-NSRIYP76.js";import"./chunk-N5CEEWWJ.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.6");process.exit(0)}
|
|
2
|
+
import{f as s,o as p}from"./chunk-SQCNABS4.js";import"./chunk-YV34KLBV.js";import{d as c,e as u,f as h,g as m}from"./chunk-7EDVNITA.js";import"./chunk-MA7OLK56.js";import"./chunk-BHOJLQLF.js";import"./chunk-MROCXAXJ.js";import"./chunk-Z5IOTEQI.js";import"./chunk-CU3LGMOK.js";import{p as l,q as d}from"./chunk-775KESYW.js";import"./chunk-5AXU6KCI.js";import"./chunk-YQ7X6LKA.js";import"./chunk-5CKG46BM.js";import"./chunk-EJSRKZ5M.js";import"./chunk-SYYGXU7I.js";import"./chunk-V2IUGAJ7.js";import"./chunk-NSRIYP76.js";import{g as f}from"./chunk-N5CEEWWJ.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.6");process.exit(0)}
|
|
2
|
+
import{a,b,c,d,e,f}from"./chunk-K5RE6ODJ.js";import"./chunk-NPNGSE7X.js";import"./chunk-SQCNABS4.js";import"./chunk-YV34KLBV.js";import"./chunk-MA7OLK56.js";import"./chunk-BHOJLQLF.js";import"./chunk-MROCXAXJ.js";import"./chunk-Z5IOTEQI.js";import"./chunk-3VBPPW7H.js";import"./chunk-CU3LGMOK.js";import"./chunk-775KESYW.js";import"./chunk-5AXU6KCI.js";import"./chunk-YQ7X6LKA.js";import"./chunk-5CKG46BM.js";import"./chunk-EJSRKZ5M.js";import"./chunk-SYYGXU7I.js";import"./chunk-V2IUGAJ7.js";import"./chunk-NSRIYP76.js";import"./chunk-N5CEEWWJ.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.6");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-775KESYW.js";import"./chunk-N5CEEWWJ.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.6");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-JDGUTBC3.js";import{h as ae}from"./chunk-BKCIW3O2.js";import{a as se,b as ie,c as le,d as O,f as Ne}from"./chunk-EMKI4ZV5.js";import"./chunk-SQCNABS4.js";import"./chunk-YV34KLBV.js";import"./chunk-MA7OLK56.js";import"./chunk-BHOJLQLF.js";import{b as N,d as Be}from"./chunk-MROCXAXJ.js";import"./chunk-Z5IOTEQI.js";import{a as S,b as Ie}from"./chunk-CU3LGMOK.js";import"./chunk-775KESYW.js";import"./chunk-5AXU6KCI.js";import"./chunk-YQ7X6LKA.js";import"./chunk-5CKG46BM.js";import"./chunk-EJSRKZ5M.js";import"./chunk-SYYGXU7I.js";import"./chunk-V2IUGAJ7.js";import"./chunk-NSRIYP76.js";import"./chunk-N5CEEWWJ.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-OYIJOZ2E.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.6");process.exit(0)}
|
|
2
|
+
import"./chunk-N5CEEWWJ.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.6");process.exit(0)}
|
|
2
|
+
import{a as p}from"./chunk-MRDXDXPW.js";import"./chunk-N5CEEWWJ.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.6");process.exit(0)}
|
|
2
|
+
import{a}from"./chunk-64SU2UFL.js";import"./chunk-K5RE6ODJ.js";import"./chunk-NPNGSE7X.js";import"./chunk-SQCNABS4.js";import"./chunk-YV34KLBV.js";import"./chunk-MA7OLK56.js";import"./chunk-BHOJLQLF.js";import"./chunk-MROCXAXJ.js";import"./chunk-Z5IOTEQI.js";import"./chunk-3VBPPW7H.js";import"./chunk-CU3LGMOK.js";import"./chunk-775KESYW.js";import"./chunk-5AXU6KCI.js";import"./chunk-YQ7X6LKA.js";import"./chunk-5CKG46BM.js";import"./chunk-EJSRKZ5M.js";import"./chunk-SYYGXU7I.js";import"./chunk-V2IUGAJ7.js";import"./chunk-NSRIYP76.js";import"./chunk-N5CEEWWJ.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{d as s}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.6");process.exit(0)}
|
|
2
|
+
import{d as s}from"./chunk-MROCXAXJ.js";s();
|
|
@@ -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 x,c as N}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.6");process.exit(0)}
|
|
2
|
+
import{a as x,c as N}from"./chunk-Z5IOTEQI.js";import{b as w,c as P,d as O}from"./chunk-YQ7X6LKA.js";N();O();import*as k from"fs";import*as T from"path";import*as L from"yaml";var D=5,F=4,U=3e4,W=".claude/skills",G=5e3,$=500,A=100,V=1e3,I=500,H=.8,Q=.2,K=.1,v=.1,q=.1,B=.1,z=.1,X=200,j=500,Y=300,J=1,Z=.9,M={maxWorkers:D,batchSize:F,retryFailedTests:!0,timeout:U,skillsDir:W,progressIntervalMs:G},R=class{async execute(e,s,t){let r=P(A,$+A);return await new Promise(i=>setTimeout(i,r)),{output:this.generateMockResponse(e),tokensUsed:w(I,V+I),durationMs:r}}generateMockResponse(e){let s=[];return e.includes("alt")&&s.push("alt","1.1.1","perceivable"),e.includes("contrast")&&s.push("contrast","1.4.3","4.5:1"),e.includes("keyboard")&&s.push("keyboard","2.1.1","operable","button"),e.includes("label")&&s.push("label","3.3.2","understandable"),e.includes("ARIA")&&s.push("ARIA","4.1.2","robust"),e.includes("focus")&&s.push("focus","2.4.7","outline"),e.includes("lang")&&s.push("lang","3.1.1","language"),e.includes("caption")&&s.push("caption","1.2.2","track"),e.includes("accessible")&&s.push("accessible","compliant"),s.length===0&&s.push("accessibility","WCAG","finding"),`Analysis complete. Found issues related to: ${s.join(", ")}.
|
|
3
3
|
Recommendations: Implement proper ${s[0]} attributes for better accessibility.
|
|
4
4
|
Severity: ${e.includes("critical")?"critical":"serious"}`}},y=class{constructor(e,s,t){this.executor=s;this.config=t;this.id=e}id;status="idle";tasksCompleted=0;tasksFailed=0;lastHeartbeat=Date.now();async executeBatch(e){this.status="running";let s=[];for(let t of e){this.lastHeartbeat=Date.now();try{let r=await this.executeTestCase(t);if(s.push(r),r.passed)this.tasksCompleted++;else if(this.tasksFailed++,this.config.retryFailedTests&&!r.passed){let a=await this.executeTestCase(t,!0);a.passed&&(s[s.length-1]=a,this.tasksCompleted++,this.tasksFailed--)}}catch(r){this.tasksFailed++,s.push({testId:t.testCaseId,passed:!1,expectedPatterns:t.testCase.expected_output.must_contain||[],actualPatterns:[],reasoningQuality:0,category:t.testCase.category,priority:t.testCase.priority,error:x(r)})}}return this.status="idle",s}async executeTestCase(e,s=!1){let t=Date.now(),r=this.buildPrompt(e),a=await this.executor.execute(r,e.model,{timeout:this.config.timeout}),i=this.validateResponse(a.output,e.testCase.expected_output,e.testCase.validation);return{testId:e.testCaseId,passed:i.passed,expectedPatterns:e.testCase.expected_output.must_contain||[],actualPatterns:i.foundPatterns,reasoningQuality:i.reasoningQuality,executionTimeMs:Date.now()-t,category:e.testCase.category,priority:e.testCase.priority,error:i.error}}buildPrompt(e){let{testCase:s}=e,t=s.input.context;return`Analyze the following ${t.language||"HTML"} code for accessibility issues.
|
|
5
5
|
Context: ${t.description||s.description}
|
|
@@ -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 U,b as G}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.6");process.exit(0)}
|
|
2
|
+
import{a as U,b as G}from"./chunk-DAWI2HRN.js";import{g as W}from"./chunk-WQ76RMU3.js";import{a as _}from"./chunk-4H3YCKAI.js";import{e as S}from"./chunk-H4J456F2.js";import{b as v,c as x}from"./chunk-NOK2ICQT.js";import{a as ne}from"./chunk-MA7OLK56.js";import{c as z}from"./chunk-BHOJLQLF.js";import{b as k,d as q}from"./chunk-MROCXAXJ.js";import{b,c as E}from"./chunk-KI4W6CVC.js";import{a as y,c as I}from"./chunk-Z5IOTEQI.js";import{f as O}from"./chunk-3VBPPW7H.js";import{S as ae,b as N}from"./chunk-NSRIYP76.js";import{randomUUID as Z}from"crypto";I();q();import{randomUUID as se}from"node:crypto";var j=x(),P=class{constructor(e){this.options=e}claudeFlowAvailable=!1;localTrajectories=new Map;async initialize(){this.claudeFlowAvailable=await this.checkClaudeFlow()}async checkClaudeFlow(){return v(this.options.projectRoot).available}async startTrajectory(e,t){let i=`trajectory-${se()}`;if(this.claudeFlowAvailable)try{let{execFileSync:r}=await import("child_process"),n=["--no-install",j,"hooks","intelligence","trajectory-start","--task",e];t&&n.push("--agent",t);let s=r("npx",n,{encoding:"utf-8",timeout:1e4,cwd:this.options.projectRoot}).match(/trajectoryId[:\s]+["']?([^"'\s,}]+)/i);if(s?.[1])return s[1]}catch(r){console.debug("[TrajectoryBridge] Claude Flow trajectory start failed:",r instanceof Error?r.message:r)}return this.localTrajectories.set(i,{id:i,task:e,agent:t,steps:[],startedAt:Date.now()}),i}async recordStep(e,t,i,r){if(this.claudeFlowAvailable)try{let{execFileSync:a}=await import("child_process"),s=["--no-install",j,"hooks","intelligence","trajectory-step","--trajectory-id",e,"--action",t];i&&s.push("--result",i),r!==void 0&&s.push("--quality",String(r)),a("npx",s,{encoding:"utf-8",timeout:1e4,cwd:this.options.projectRoot});return}catch(a){console.debug("[TrajectoryBridge] Claude Flow trajectory step failed:",a instanceof Error?a.message:a)}let n=this.localTrajectories.get(e);n&&n.steps.push({id:`step-${n.steps.length+1}`,action:t,result:i,quality:r,timestamp:Date.now()})}async endTrajectory(e,t,i){if(this.claudeFlowAvailable)try{let{execFileSync:n}=await import("child_process"),a=["--no-install",j,"hooks","intelligence","trajectory-end","--trajectory-id",e,"--success",String(t)];i&&a.push("--feedback",i),n("npx",a,{encoding:"utf-8",timeout:1e4,cwd:this.options.projectRoot})}catch{}let r=this.localTrajectories.get(e);if(r)return r.success=t,r.feedback=i,r.completedAt=Date.now(),await this.persistTrajectory(r),r}getTrajectory(e){return this.localTrajectories.get(e)}isClaudeFlowAvailable(){return this.claudeFlowAvailable}async persistTrajectory(e){try{let{join:t}=await import("path"),{existsSync:i,mkdirSync:r}=await import("fs"),{createRequire:n}=await import("module"),a=n(import.meta.url),{openDatabase:s}=a("../../shared/safe-db.js"),o=t(this.options.projectRoot,".agentic-qe","trajectories.db"),u=t(this.options.projectRoot,".agentic-qe");i(u)||r(u,{recursive:!0});let p=s(o);p.exec(`
|
|
3
3
|
CREATE TABLE IF NOT EXISTS trajectories (
|
|
4
4
|
id TEXT PRIMARY KEY,
|
|
5
5
|
task TEXT NOT NULL,
|
|
@@ -21,4 +21,4 @@ Steps:
|
|
|
21
21
|
${e.steps.map((n,a)=>`${a+1}. ${n.action}${n.result?` \u2192 ${n.result}`:""}`).join(`
|
|
22
22
|
`)}
|
|
23
23
|
|
|
24
|
-
Duration: ${e.durationMs}ms`;return{patternType:t,name:this.generatePatternName(e),description:`Pattern extracted from: ${e.task}`,context:{tags:this.extractTags(e),testType:this.detectTestType(e.task)},template:{type:"workflow",content:r,variables:[{name:"task",type:"string",description:"The task to execute",required:!0}]}}}detectPatternType(e){let t=e.toLowerCase();return t.includes("test")||t.includes("spec")?(t.includes("unit")||t.includes("integration")||t.includes("e2e"),"test-template"):t.includes("mock")||t.includes("stub")?"mock-pattern":t.includes("assert")||t.includes("expect")?"assertion-pattern":t.includes("coverage")?"coverage-strategy":t.includes("api")||t.includes("contract")?"api-contract":t.includes("visual")||t.includes("screenshot")?"visual-baseline":t.includes("accessibility")||t.includes("a11y")?"a11y-check":t.includes("performance")||t.includes("perf")?"perf-benchmark":t.includes("flaky")?"flaky-fix":t.includes("refactor")?"refactor-safe":t.includes("error")||t.includes("exception")?"error-handling":"test-template"}generatePatternName(e){let t=e.task.replace(/[^a-zA-Z0-9\s-]/g,"").slice(0,50).trim();return`${e.domain?`[${e.domain}] `:""}${t}`}extractTags(e){let t=[];e.domain&&t.push(e.domain),e.agent&&t.push(e.agent),e.model&&t.push(`model:${e.model}`);let i=e.task.toLowerCase().split(/\s+/),r=["unit","integration","e2e","api","mock","coverage","security"];for(let n of r)i.some(a=>a.includes(n))&&t.push(n);return t}detectTestType(e){let t=e.toLowerCase();if(t.includes("unit"))return"unit";if(t.includes("integration"))return"integration";if(t.includes("e2e")||t.includes("end-to-end"))return"e2e";if(t.includes("contract")||t.includes("api"))return"contract";if(t.includes("smoke"))return"smoke"}getRelatedDomains(e){return{"test-generation":["test-execution","coverage-analysis"],"test-execution":["test-generation","coverage-analysis","quality-assessment"],"coverage-analysis":["test-generation","test-execution"],"quality-assessment":["test-execution","defect-intelligence"],"defect-intelligence":["quality-assessment","code-intelligence"],"requirements-validation":["test-generation","quality-assessment"],"code-intelligence":["defect-intelligence","security-compliance"],"security-compliance":["code-intelligence","quality-assessment"],"contract-testing":["test-generation","test-execution"],"visual-accessibility":["quality-assessment","test-execution"],"chaos-resilience":["test-execution","quality-assessment"],"learning-optimization":[]}[e]||[]}emitExperienceCaptured(e){this.eventBus&&this.eventBus.publish({id:`exp-captured-${e.id}`,type:"learning.ExperienceCaptured",source:"learning-optimization",timestamp:new Date,payload:{experience:e,reward:e.reward,testOutcome:e.testOutcome}})}async loadStats(){try{let e=await this.memory.get(`${this.config.namespace}:stats`);e&&(this.stats.totalCaptured=e.totalCaptured,this.stats.successfulCaptures=e.successfulCaptures,this.stats.patternsExtracted=e.patternsExtracted,this.stats.patternsPromoted=e.patternsPromoted,this.stats.byDomain=new Map(e.byDomain))}catch(e){M.debug("Stats restoration failed, starting fresh",{error:e instanceof Error?e.message:String(e)})}}async saveStats(){try{await this.memory.set(`${this.config.namespace}:stats`,{totalCaptured:this.stats.totalCaptured,successfulCaptures:this.stats.successfulCaptures,patternsExtracted:this.stats.patternsExtracted,patternsPromoted:this.stats.patternsPromoted,byDomain:Array.from(this.stats.byDomain.entries())},{persist:!0})}catch(e){console.error("[ExperienceCapture] Failed to save stats:",e)}}};function Y(l,e,t,i){return new Q(l,e,t,i)}var ue={enableClaudeFlow:!0,enableExperienceCapture:!0,enablePatternPromotion:!0,promotionThreshold:S},L=class{constructor(e,t,i){this.memory=e;this.eventBus=i;this.config={...ue,...t}}config;reasoningBank;claudeFlowBridge;experienceCapture;patternStore;coherenceService;initialized=!1;_domainTransferEngine=null;_domainTransferInterval=null;activeTasks=new Map;completedTasks=0;claudeFlowErrors=0;async initialize(){if(!this.initialized){try{this.coherenceService=await U(G),this.coherenceService.isInitialized()&&console.log("[AQELearningEngine] CoherenceService initialized with WASM engines")}catch(e){console.log("[AQELearningEngine] CoherenceService WASM unavailable, using fallback:",y(e))}this.patternStore=_(this.memory,{promotionThreshold:this.config.promotionThreshold}),await this.patternStore.initialize(),this.reasoningBank=W(this.memory,this.eventBus,this.config.reasoningBank,this.coherenceService),await this.reasoningBank.initialize();try{let{getSharedRvfDualWriter:e}=await import("./shared-rvf-dual-writer-2PUFIGX5.js"),t=await e();t&&this.reasoningBank.setRvfDualWriter(t)}catch(e){process.env.DEBUG&&console.debug("[AQELearningEngine] RVF wiring skipped:",e instanceof Error?e.message:e)}if(this.config.enableExperienceCapture){this.experienceCapture=Y(this.memory,this.patternStore,this.eventBus,{promotionThreshold:this.config.promotionThreshold}),await this.experienceCapture.initialize();try{let{isWitnessChainFeatureEnabled:e}=await import("./witness-chain-MWPUR4Q2.js");if(e()){let{createPersistentWitnessChain:t,createWitnessChainSQLitePersistence:i}=await import("./witness-chain-MWPUR4Q2.js"),{getUnifiedPersistence:r}=await import("./unified-persistence-PY7MVJTL.js"),n=r();if(n.isInitialized()){let a=n.getDatabase(),s=i(a),o=t(s);this.experienceCapture.setWitnessChain(o)}}}catch(e){process.env.DEBUG&&console.debug("[AQELearningEngine] Witness chain wiring skipped:",e instanceof Error?e.message:e)}}try{let{isCrossDomainTransferEnabled:e}=await import("./feature-flags-WBF5B6WE.js");if(e()&&this.patternStore){let{createDomainTransferEngine:t}=await import("./domain-transfer-A2WL6HEJ.js"),i=t(),r=this.patternStore,n=await r.getStats();this._domainTransferInterval=setInterval(async()=>{try{n=await r.getStats()}catch(a){process.env.DEBUG&&console.debug("[AQELearningEngine] Stats refresh failed:",a instanceof Error?a.message:a)}},6e4),this._domainTransferInterval.unref?.(),i.setPerformanceProvider(a=>{let s=n.byDomain?.[a]??0,o=n.totalPatterns??0;return{domain:a,successRate:o>0?s/o:.5,avgConfidence:n.avgConfidence??.5,patternCount:s,timestamp:Date.now()}}),this._domainTransferEngine=i}}catch(e){process.env.DEBUG&&console.debug("[AQELearningEngine] Domain transfer wiring skipped:",e instanceof Error?e.message:e)}if(this.config.enableClaudeFlow)try{this.claudeFlowBridge=V({projectRoot:this.config.projectRoot}),await this.claudeFlowBridge.initialize(),this.claudeFlowBridge.isAvailable()&&console.log("[AQELearningEngine] Claude Flow integration enabled")}catch(e){process.env.DEBUG&&console.log("[AQELearningEngine] Claude Flow not available, using standalone mode:",y(e))}this.initialized=!0,console.log("[AQELearningEngine] Initialized")}}getStatus(){let e=this.claudeFlowBridge?.getStatus();return{initialized:this.initialized,claudeFlowAvailable:e?.available??!1,features:{patternLearning:!0,vectorSearch:!0,taskRouting:!0,trajectories:e?.features.trajectories??!1,modelRouting:e?.features.modelRouting??!1,pretrain:e?.features.pretrain??!1}}}async getStats(){if(!this.initialized||!this.reasoningBank)throw new Error("Engine not initialized");let e=await this.reasoningBank.getStats(),t=this.experienceCapture?await this.experienceCapture.getStats():{totalExperiences:0,byDomain:{},successRate:0,avgQuality:0,patternsExtracted:0,patternsPromoted:0};return{...e,activeTasks:this.activeTasks.size,completedTasks:this.completedTasks,claudeFlowStatus:this.claudeFlowBridge?.getStatus()??{available:!1,features:{trajectories:!1,modelRouting:!1,pretrain:!1,patternSearch:!1}},claudeFlowErrors:this.claudeFlowErrors,experienceCapture:t}}async storePattern(e){return!this.initialized||!this.reasoningBank?E(new Error("Engine not initialized")):this.reasoningBank.storePattern(e)}async searchPatterns(e,t){return!this.initialized||!this.reasoningBank?E(new Error("Engine not initialized")):this.reasoningBank.searchPatterns(e,t)}async getPattern(e){return!this.initialized||!this.reasoningBank?null:this.reasoningBank.getPattern(e)}async recordOutcome(e){return!this.initialized||!this.reasoningBank?E(new Error("Engine not initialized")):this.reasoningBank.recordOutcome(e)}async routeTask(e){if(!this.initialized||!this.reasoningBank)return E(new Error("Engine not initialized"));let t=await this.searchPatternsForTask(e.task,{limit:5,minConfidence:.4,domain:e.domain});t.success&&t.value.length>0&&await this.trackPatternSearch(e.task,t.value);let i=await this.reasoningBank.routeTask(e);if(i.success&&this.claudeFlowBridge?.pretrain.isClaudeFlowAvailable(),i.success&&t.success){let r=this.enhanceRoutingWithPatterns(i.value,t.value);return b(r)}return i}async route(e,t){let i=await this.routeTask({task:e,context:t});return i.success?i.value:null}async searchPatternsForTask(e,t={}){if(!this.reasoningBank)return b([]);try{return await this.reasoningBank.searchPatterns(e,{limit:t.limit||5,minConfidence:t.minConfidence||.4,domain:t.domain,useVectorSearch:!0})}catch(i){return console.warn("[AQELearningEngine] Pattern search failed:",y(i)),b([])}}async trackPatternSearch(e,t){let i={timestamp:Date.now(),task:e.slice(0,500),patternsFound:t.length,patternIds:t.map(r=>r.pattern.id),avgSimilarity:t.length>0?t.reduce((r,n)=>r+n.similarity,0)/t.length:0};try{let r=`pattern-usage:search:${Date.now()}-${Z().slice(0,8)}`;await this.memory.set(r,i,{persist:!0,ttl:10080*60*1e3})}catch(r){console.debug("[AQELearningEngine] Failed to track pattern search:",y(r))}}enhanceRoutingWithPatterns(e,t){let i=t.filter(o=>o.similarity>=.5&&o.pattern.qualityScore>=.3);if(i.length===0)return e;let r=i.map(o=>{let u=o.pattern;return`[Pattern: ${u.name}] ${u.description} (confidence: ${(u.confidence*100).toFixed(0)}%, similarity: ${(o.similarity*100).toFixed(0)}%)`}),n=[...e.guidance,"--- Relevant Patterns ---",...r],a=[...e.patterns,...i.map(o=>o.pattern)],s=i.length>0?`; Found ${i.length} relevant pattern(s) with avg similarity ${(i.reduce((o,u)=>o+u.similarity,0)/i.length*100).toFixed(0)}%`:"";return{...e,patterns:a,guidance:n,reasoning:e.reasoning+s,confidence:Math.min(1,e.confidence+i.length*.02)}}async recommendModel(e){if(this.claudeFlowBridge?.modelRouter.isClaudeFlowAvailable())try{return await this.claudeFlowBridge.modelRouter.routeTask(e)}catch(t){console.debug("[AQELearningEngine] Claude Flow model routing failed:",t instanceof Error?t.message:t)}return this.localModelRoute(e)}async recordModelOutcome(e,t,i){this.claudeFlowBridge?.modelRouter.isClaudeFlowAvailable()&&await this.claudeFlowBridge.modelRouter.recordOutcome({task:e,model:t,outcome:i})}localModelRoute(e){let t=e.toLowerCase(),i=[/simple/i,/basic/i,/fix typo/i,/rename/i,/format/i,/add comment/i,/lint/i,/minor/i,/quick/i,/small/i];for(let n of i)if(n.test(t))return{model:"haiku",confidence:.75,reasoning:"Low complexity task - using haiku for speed"};let r=[/architect/i,/design/i,/complex/i,/security/i,/performance/i,/refactor.*large/i,/critical/i,/analysis/i,/multi.*file/i,/distributed/i,/concurrent/i,/migration/i];for(let n of r)if(n.test(t))return{model:"opus",confidence:.8,reasoning:"High complexity task - using opus for capability"};return e.length>500?{model:"opus",confidence:.65,reasoning:"Long task description - using opus for complex reasoning"}:e.length<50?{model:"haiku",confidence:.6,reasoning:"Short task - using haiku for efficiency"}:{model:"sonnet",confidence:.7,reasoning:"Medium complexity - using sonnet for balance"}}async startTask(e,t,i){let r=`task-${Date.now()}-${Z().slice(0,8)}`,n=r;if(this.claudeFlowBridge?.trajectory.isClaudeFlowAvailable())try{n=await this.claudeFlowBridge.trajectory.startTrajectory(e,t)}catch(o){this.claudeFlowErrors++,console.warn(`[AQELearningEngine] Claude Flow startTrajectory failed (${this.claudeFlowErrors} total errors):`,y(o))}let a;this.experienceCapture&&(a=this.experienceCapture.startCapture(e,{agent:t,domain:i,trajectoryId:n!==r?n:void 0}));let s={id:a||n,task:e,agent:t,startedAt:Date.now(),steps:[]};return this.activeTasks.set(s.id,s),s.id}async recordStep(e,t,i,r){if(this.claudeFlowBridge?.trajectory.isClaudeFlowAvailable())try{await this.claudeFlowBridge.trajectory.recordStep(e,t,i,r)}catch(a){this.claudeFlowErrors++,console.warn(`[AQELearningEngine] Claude Flow recordStep failed (${this.claudeFlowErrors} total errors):`,y(a))}this.experienceCapture&&this.experienceCapture.recordStep(e,{action:t,result:i,quality:r});let n=this.activeTasks.get(e);n&&n.steps.push({action:t,result:i,quality:r,timestamp:Date.now()})}async endTask(e,t,i){if(this.claudeFlowBridge?.trajectory.isClaudeFlowAvailable())try{await this.claudeFlowBridge.trajectory.endTrajectory(e,t,i)}catch(n){this.claudeFlowErrors++,console.warn(`[AQELearningEngine] Claude Flow endTrajectory failed (${this.claudeFlowErrors} total errors):`,y(n))}let r=this.activeTasks.get(e);if(r)return this.activeTasks.delete(e),this.completedTasks++,this.config.enableExperienceCapture&&t&&await this.captureExperience(r),r}getTask(e){return this.activeTasks.get(e)}async analyzeCodebase(e,t="medium"){let i=e||this.config.projectRoot;if(this.claudeFlowBridge?.pretrain.isClaudeFlowAvailable())try{return await this.claudeFlowBridge.pretrain.analyze(i,t)}catch(r){console.debug("[AQELearningEngine] Claude Flow pretrain analyze failed:",r instanceof Error?r.message:r)}return this.localAnalyze(i,t)}async generateAgentConfigs(e="yaml"){if(this.claudeFlowBridge?.pretrain.isClaudeFlowAvailable())try{return await this.claudeFlowBridge.pretrain.generateAgentConfigs(e)}catch(t){console.debug("[AQELearningEngine] Claude Flow agent config failed:",t instanceof Error?t.message:t)}return[{name:"qe-test-architect",type:"worker",capabilities:["test-generation","test-design"],model:"sonnet"},{name:"qe-coverage-specialist",type:"worker",capabilities:["coverage-analysis","gap-detection"],model:"haiku"},{name:"qe-security-scanner",type:"worker",capabilities:["security-scanning","vulnerability-detection"],model:"opus"}]}async captureExperience(e){if(!this.experienceCapture||!this.config.enableExperienceCapture)return;let t=e.steps.length>0?e.steps.reduce((r,n)=>r+(n.quality??.5),0)/e.steps.length:.5;await this.experienceCapture.completeCapture(e.id,{success:!0,quality:t});let i=await this.experienceCapture.getExperience(e.id);i&&i.quality>=.7&&await this.experienceCapture.shareAcrossDomains(i)}startExperienceCapture(e,t){if(this.experienceCapture)return this.experienceCapture.startCapture(e,t)}getExperienceCaptureService(){return this.experienceCapture}async localAnalyze(e,t){try{let i=await import("fast-glob"),{existsSync:r,readFileSync:n}=await import("fs"),{join:a}=await import("path"),s=t==="shallow"?["*.ts","*.js","*.json"]:t==="medium"?["**/*.ts","**/*.js","**/*.json","**/*.py"]:["**/*"],o=["node_modules/**","dist/**","coverage/**",".git/**"],u=await i.default(s,{cwd:e,ignore:o,onlyFiles:!0}),p=new Set,g=new Set;for(let m of u.slice(0,100))(m.endsWith(".ts")||m.endsWith(".tsx"))&&p.add("typescript"),(m.endsWith(".js")||m.endsWith(".jsx"))&&p.add("javascript"),m.endsWith(".py")&&p.add("python"),m.endsWith(".go")&&p.add("go"),m.endsWith(".rs")&&p.add("rust");let w=a(e,"package.json");if(r(w))try{let m=k(n(w,"utf-8")),d={...m.dependencies,...m.devDependencies};d.react&&g.add("react"),d.vue&&g.add("vue"),d.vitest&&g.add("vitest"),d.jest&&g.add("jest"),d.playwright&&g.add("playwright")}catch(m){console.debug("[AQELearningEngine] package.json parse failed:",m instanceof Error?m.message:m)}return{success:!0,repositoryPath:e,depth:t,analysis:{languages:Array.from(p),frameworks:Array.from(g),patterns:[],complexity:u.length>500?3:u.length>100?2:1}}}catch(i){return{success:!1,repositoryPath:e,depth:t,error:y(i)}}}getGuidance(e,t){if(!this.reasoningBank)throw new Error("Engine not initialized");return this.reasoningBank.getGuidance(e,t)}generateContext(e,t){if(!this.reasoningBank)throw new Error("Engine not initialized");return this.reasoningBank.generateContext(e,t)}checkAntiPatterns(e,t){if(!this.reasoningBank)throw new Error("Engine not initialized");return this.reasoningBank.checkAntiPatterns(e,t)}async dispose(){this._domainTransferInterval&&(clearInterval(this._domainTransferInterval),this._domainTransferInterval=null),this._domainTransferEngine=null,this.experienceCapture&&await this.experienceCapture.dispose(),this.patternStore&&await this.patternStore.dispose(),this.reasoningBank&&await this.reasoningBank.dispose(),this.activeTasks.clear(),this.initialized=!1}},de={enabled:!1,snapshotIntervalMs:3e5,minSnapshotsForAnalysis:5,autoApplyThreshold:.8},ee=class{config;constructor(e){this.config={...de,...e}}runMetaLearningCycle(e){if(process.env.AQE_META_LEARNING_ENABLED!=="true")return[];if(!this.config.enabled)return[];if(e.length<this.config.minSnapshotsForAnalysis)return[];let t=Math.floor(e.length/2),i=e.slice(0,t),r=e.slice(t),n=[],a=Date.now(),s=h(i.map(c=>c.tokenMetrics.costUsd)),o=h(r.map(c=>c.tokenMetrics.costUsd)),u=h(i.map(c=>c.tokenMetrics.savingsUsd)),p=h(r.map(c=>c.tokenMetrics.savingsUsd));if(o>s*1.1&&p<=u*1.05){let c=Math.min(1,(o-s)/(s||1));n.push({id:`meta-tw-${a}`,type:"token-waste",description:`Token cost increased by ${((o/(s||1)-1)*100).toFixed(1)}% while savings remained flat`,confidence:F(c),suggestedAction:"Review cache configuration and increase pattern reuse thresholds",detectedAt:a})}let g=h(i.map(c=>c.qualityMetrics.gatePassRate)),w=h(r.map(c=>c.qualityMetrics.gatePassRate));Math.abs(w-g)<.02&&e.length>=this.config.minSnapshotsForAnalysis&&n.push({id:`meta-qp-${a}`,type:"quality-plateau",description:`Gate pass rate has been flat at ${(w*100).toFixed(1)}% across ${e.length} snapshots`,confidence:F(.6+(e.length-this.config.minSnapshotsForAnalysis)*.05),suggestedAction:"Consider reviewing quality thresholds or adding new test coverage domains",detectedAt:a});let d=h(i.map(c=>c.learningMetrics.patternCount)),f=h(r.map(c=>c.learningMetrics.patternCount)),te=h(i.map(c=>c.learningMetrics.averageConfidence)),$=h(r.map(c=>c.learningMetrics.averageConfidence)),ie=Math.abs(f-d),re=Math.abs($-te);ie<1&&re<.02&&n.push({id:`meta-ls-${a}`,type:"learning-stall",description:`Pattern count (~${Math.round(f)}) and confidence (~${$.toFixed(2)}) have stagnated`,confidence:F(.65+(e.length-this.config.minSnapshotsForAnalysis)*.04),suggestedAction:"Expand to new QE domains or lower pattern creation thresholds to encourage exploration",detectedAt:a});let C=h(i.map(c=>c.performanceMetrics.p95LatencyMs)),A=h(r.map(c=>c.performanceMetrics.p95LatencyMs));if(A>C*1.2&&C>0){let c=Math.min(1,(A-C)/(C||1));n.push({id:`meta-pr-${a}`,type:"performance-regression",description:`P95 latency increased from ${C.toFixed(0)}ms to ${A.toFixed(0)}ms`,confidence:F(c),suggestedAction:"Profile hot paths and consider HNSW index tuning or batch size reduction",detectedAt:a})}return n}shouldAutoApply(e,t){let i=(t??this.config).autoApplyThreshold;return e.confidence>=i}};function h(l){return l.length===0?0:l.reduce((e,t)=>e+t,0)/l.length}function F(l){return Math.max(0,Math.min(1,l))}function pe(l,e,t){return new L(l,e,t)}function et(l,e,t){return pe(l,{projectRoot:e},t)}export{ue as a,L as b,de as c,ee as d,pe as e,et as f};
|
|
24
|
+
Duration: ${e.durationMs}ms`;return{patternType:t,name:this.generatePatternName(e),description:`Pattern extracted from: ${e.task}`,context:{tags:this.extractTags(e),testType:this.detectTestType(e.task)},template:{type:"workflow",content:r,variables:[{name:"task",type:"string",description:"The task to execute",required:!0}]}}}detectPatternType(e){let t=e.toLowerCase();return t.includes("test")||t.includes("spec")?(t.includes("unit")||t.includes("integration")||t.includes("e2e"),"test-template"):t.includes("mock")||t.includes("stub")?"mock-pattern":t.includes("assert")||t.includes("expect")?"assertion-pattern":t.includes("coverage")?"coverage-strategy":t.includes("api")||t.includes("contract")?"api-contract":t.includes("visual")||t.includes("screenshot")?"visual-baseline":t.includes("accessibility")||t.includes("a11y")?"a11y-check":t.includes("performance")||t.includes("perf")?"perf-benchmark":t.includes("flaky")?"flaky-fix":t.includes("refactor")?"refactor-safe":t.includes("error")||t.includes("exception")?"error-handling":"test-template"}generatePatternName(e){let t=e.task.replace(/[^a-zA-Z0-9\s-]/g,"").slice(0,50).trim();return`${e.domain?`[${e.domain}] `:""}${t}`}extractTags(e){let t=[];e.domain&&t.push(e.domain),e.agent&&t.push(e.agent),e.model&&t.push(`model:${e.model}`);let i=e.task.toLowerCase().split(/\s+/),r=["unit","integration","e2e","api","mock","coverage","security"];for(let n of r)i.some(a=>a.includes(n))&&t.push(n);return t}detectTestType(e){let t=e.toLowerCase();if(t.includes("unit"))return"unit";if(t.includes("integration"))return"integration";if(t.includes("e2e")||t.includes("end-to-end"))return"e2e";if(t.includes("contract")||t.includes("api"))return"contract";if(t.includes("smoke"))return"smoke"}getRelatedDomains(e){return{"test-generation":["test-execution","coverage-analysis"],"test-execution":["test-generation","coverage-analysis","quality-assessment"],"coverage-analysis":["test-generation","test-execution"],"quality-assessment":["test-execution","defect-intelligence"],"defect-intelligence":["quality-assessment","code-intelligence"],"requirements-validation":["test-generation","quality-assessment"],"code-intelligence":["defect-intelligence","security-compliance"],"security-compliance":["code-intelligence","quality-assessment"],"contract-testing":["test-generation","test-execution"],"visual-accessibility":["quality-assessment","test-execution"],"chaos-resilience":["test-execution","quality-assessment"],"learning-optimization":[]}[e]||[]}emitExperienceCaptured(e){this.eventBus&&this.eventBus.publish({id:`exp-captured-${e.id}`,type:"learning.ExperienceCaptured",source:"learning-optimization",timestamp:new Date,payload:{experience:e,reward:e.reward,testOutcome:e.testOutcome}})}async loadStats(){try{let e=await this.memory.get(`${this.config.namespace}:stats`);e&&(this.stats.totalCaptured=e.totalCaptured,this.stats.successfulCaptures=e.successfulCaptures,this.stats.patternsExtracted=e.patternsExtracted,this.stats.patternsPromoted=e.patternsPromoted,this.stats.byDomain=new Map(e.byDomain))}catch(e){M.debug("Stats restoration failed, starting fresh",{error:e instanceof Error?e.message:String(e)})}}async saveStats(){try{await this.memory.set(`${this.config.namespace}:stats`,{totalCaptured:this.stats.totalCaptured,successfulCaptures:this.stats.successfulCaptures,patternsExtracted:this.stats.patternsExtracted,patternsPromoted:this.stats.patternsPromoted,byDomain:Array.from(this.stats.byDomain.entries())},{persist:!0})}catch(e){console.error("[ExperienceCapture] Failed to save stats:",e)}}};function Y(l,e,t,i){return new Q(l,e,t,i)}var ue={enableClaudeFlow:!0,enableExperienceCapture:!0,enablePatternPromotion:!0,promotionThreshold:S},L=class{constructor(e,t,i){this.memory=e;this.eventBus=i;this.config={...ue,...t}}config;reasoningBank;claudeFlowBridge;experienceCapture;patternStore;coherenceService;initialized=!1;_domainTransferEngine=null;_domainTransferInterval=null;activeTasks=new Map;completedTasks=0;claudeFlowErrors=0;async initialize(){if(!this.initialized){try{this.coherenceService=await U(G),this.coherenceService.isInitialized()&&console.log("[AQELearningEngine] CoherenceService initialized with WASM engines")}catch(e){console.log("[AQELearningEngine] CoherenceService WASM unavailable, using fallback:",y(e))}this.patternStore=_(this.memory,{promotionThreshold:this.config.promotionThreshold}),await this.patternStore.initialize(),this.reasoningBank=W(this.memory,this.eventBus,this.config.reasoningBank,this.coherenceService),await this.reasoningBank.initialize();try{let{getSharedRvfDualWriter:e}=await import("./shared-rvf-dual-writer-KJ67FATL.js"),t=await e();t&&this.reasoningBank.setRvfDualWriter(t)}catch(e){process.env.DEBUG&&console.debug("[AQELearningEngine] RVF wiring skipped:",e instanceof Error?e.message:e)}if(this.config.enableExperienceCapture){this.experienceCapture=Y(this.memory,this.patternStore,this.eventBus,{promotionThreshold:this.config.promotionThreshold}),await this.experienceCapture.initialize();try{let{isWitnessChainFeatureEnabled:e}=await import("./witness-chain-TF35D7QS.js");if(e()){let{createPersistentWitnessChain:t,createWitnessChainSQLitePersistence:i}=await import("./witness-chain-TF35D7QS.js"),{getUnifiedPersistence:r}=await import("./unified-persistence-OOUATKAN.js"),n=r();if(n.isInitialized()){let a=n.getDatabase(),s=i(a),o=t(s);this.experienceCapture.setWitnessChain(o)}}}catch(e){process.env.DEBUG&&console.debug("[AQELearningEngine] Witness chain wiring skipped:",e instanceof Error?e.message:e)}}try{let{isCrossDomainTransferEnabled:e}=await import("./feature-flags-AEO5C73R.js");if(e()&&this.patternStore){let{createDomainTransferEngine:t}=await import("./domain-transfer-K6YSBC2L.js"),i=t(),r=this.patternStore,n=await r.getStats();this._domainTransferInterval=setInterval(async()=>{try{n=await r.getStats()}catch(a){process.env.DEBUG&&console.debug("[AQELearningEngine] Stats refresh failed:",a instanceof Error?a.message:a)}},6e4),this._domainTransferInterval.unref?.(),i.setPerformanceProvider(a=>{let s=n.byDomain?.[a]??0,o=n.totalPatterns??0;return{domain:a,successRate:o>0?s/o:.5,avgConfidence:n.avgConfidence??.5,patternCount:s,timestamp:Date.now()}}),this._domainTransferEngine=i}}catch(e){process.env.DEBUG&&console.debug("[AQELearningEngine] Domain transfer wiring skipped:",e instanceof Error?e.message:e)}if(this.config.enableClaudeFlow)try{this.claudeFlowBridge=V({projectRoot:this.config.projectRoot}),await this.claudeFlowBridge.initialize(),this.claudeFlowBridge.isAvailable()&&console.log("[AQELearningEngine] Claude Flow integration enabled")}catch(e){process.env.DEBUG&&console.log("[AQELearningEngine] Claude Flow not available, using standalone mode:",y(e))}this.initialized=!0,console.log("[AQELearningEngine] Initialized")}}getStatus(){let e=this.claudeFlowBridge?.getStatus();return{initialized:this.initialized,claudeFlowAvailable:e?.available??!1,features:{patternLearning:!0,vectorSearch:!0,taskRouting:!0,trajectories:e?.features.trajectories??!1,modelRouting:e?.features.modelRouting??!1,pretrain:e?.features.pretrain??!1}}}async getStats(){if(!this.initialized||!this.reasoningBank)throw new Error("Engine not initialized");let e=await this.reasoningBank.getStats(),t=this.experienceCapture?await this.experienceCapture.getStats():{totalExperiences:0,byDomain:{},successRate:0,avgQuality:0,patternsExtracted:0,patternsPromoted:0};return{...e,activeTasks:this.activeTasks.size,completedTasks:this.completedTasks,claudeFlowStatus:this.claudeFlowBridge?.getStatus()??{available:!1,features:{trajectories:!1,modelRouting:!1,pretrain:!1,patternSearch:!1}},claudeFlowErrors:this.claudeFlowErrors,experienceCapture:t}}async storePattern(e){return!this.initialized||!this.reasoningBank?E(new Error("Engine not initialized")):this.reasoningBank.storePattern(e)}async searchPatterns(e,t){return!this.initialized||!this.reasoningBank?E(new Error("Engine not initialized")):this.reasoningBank.searchPatterns(e,t)}async getPattern(e){return!this.initialized||!this.reasoningBank?null:this.reasoningBank.getPattern(e)}async recordOutcome(e){return!this.initialized||!this.reasoningBank?E(new Error("Engine not initialized")):this.reasoningBank.recordOutcome(e)}async routeTask(e){if(!this.initialized||!this.reasoningBank)return E(new Error("Engine not initialized"));let t=await this.searchPatternsForTask(e.task,{limit:5,minConfidence:.4,domain:e.domain});t.success&&t.value.length>0&&await this.trackPatternSearch(e.task,t.value);let i=await this.reasoningBank.routeTask(e);if(i.success&&this.claudeFlowBridge?.pretrain.isClaudeFlowAvailable(),i.success&&t.success){let r=this.enhanceRoutingWithPatterns(i.value,t.value);return b(r)}return i}async route(e,t){let i=await this.routeTask({task:e,context:t});return i.success?i.value:null}async searchPatternsForTask(e,t={}){if(!this.reasoningBank)return b([]);try{return await this.reasoningBank.searchPatterns(e,{limit:t.limit||5,minConfidence:t.minConfidence||.4,domain:t.domain,useVectorSearch:!0})}catch(i){return console.warn("[AQELearningEngine] Pattern search failed:",y(i)),b([])}}async trackPatternSearch(e,t){let i={timestamp:Date.now(),task:e.slice(0,500),patternsFound:t.length,patternIds:t.map(r=>r.pattern.id),avgSimilarity:t.length>0?t.reduce((r,n)=>r+n.similarity,0)/t.length:0};try{let r=`pattern-usage:search:${Date.now()}-${Z().slice(0,8)}`;await this.memory.set(r,i,{persist:!0,ttl:10080*60*1e3})}catch(r){console.debug("[AQELearningEngine] Failed to track pattern search:",y(r))}}enhanceRoutingWithPatterns(e,t){let i=t.filter(o=>o.similarity>=.5&&o.pattern.qualityScore>=.3);if(i.length===0)return e;let r=i.map(o=>{let u=o.pattern;return`[Pattern: ${u.name}] ${u.description} (confidence: ${(u.confidence*100).toFixed(0)}%, similarity: ${(o.similarity*100).toFixed(0)}%)`}),n=[...e.guidance,"--- Relevant Patterns ---",...r],a=[...e.patterns,...i.map(o=>o.pattern)],s=i.length>0?`; Found ${i.length} relevant pattern(s) with avg similarity ${(i.reduce((o,u)=>o+u.similarity,0)/i.length*100).toFixed(0)}%`:"";return{...e,patterns:a,guidance:n,reasoning:e.reasoning+s,confidence:Math.min(1,e.confidence+i.length*.02)}}async recommendModel(e){if(this.claudeFlowBridge?.modelRouter.isClaudeFlowAvailable())try{return await this.claudeFlowBridge.modelRouter.routeTask(e)}catch(t){console.debug("[AQELearningEngine] Claude Flow model routing failed:",t instanceof Error?t.message:t)}return this.localModelRoute(e)}async recordModelOutcome(e,t,i){this.claudeFlowBridge?.modelRouter.isClaudeFlowAvailable()&&await this.claudeFlowBridge.modelRouter.recordOutcome({task:e,model:t,outcome:i})}localModelRoute(e){let t=e.toLowerCase(),i=[/simple/i,/basic/i,/fix typo/i,/rename/i,/format/i,/add comment/i,/lint/i,/minor/i,/quick/i,/small/i];for(let n of i)if(n.test(t))return{model:"haiku",confidence:.75,reasoning:"Low complexity task - using haiku for speed"};let r=[/architect/i,/design/i,/complex/i,/security/i,/performance/i,/refactor.*large/i,/critical/i,/analysis/i,/multi.*file/i,/distributed/i,/concurrent/i,/migration/i];for(let n of r)if(n.test(t))return{model:"opus",confidence:.8,reasoning:"High complexity task - using opus for capability"};return e.length>500?{model:"opus",confidence:.65,reasoning:"Long task description - using opus for complex reasoning"}:e.length<50?{model:"haiku",confidence:.6,reasoning:"Short task - using haiku for efficiency"}:{model:"sonnet",confidence:.7,reasoning:"Medium complexity - using sonnet for balance"}}async startTask(e,t,i){let r=`task-${Date.now()}-${Z().slice(0,8)}`,n=r;if(this.claudeFlowBridge?.trajectory.isClaudeFlowAvailable())try{n=await this.claudeFlowBridge.trajectory.startTrajectory(e,t)}catch(o){this.claudeFlowErrors++,console.warn(`[AQELearningEngine] Claude Flow startTrajectory failed (${this.claudeFlowErrors} total errors):`,y(o))}let a;this.experienceCapture&&(a=this.experienceCapture.startCapture(e,{agent:t,domain:i,trajectoryId:n!==r?n:void 0}));let s={id:a||n,task:e,agent:t,startedAt:Date.now(),steps:[]};return this.activeTasks.set(s.id,s),s.id}async recordStep(e,t,i,r){if(this.claudeFlowBridge?.trajectory.isClaudeFlowAvailable())try{await this.claudeFlowBridge.trajectory.recordStep(e,t,i,r)}catch(a){this.claudeFlowErrors++,console.warn(`[AQELearningEngine] Claude Flow recordStep failed (${this.claudeFlowErrors} total errors):`,y(a))}this.experienceCapture&&this.experienceCapture.recordStep(e,{action:t,result:i,quality:r});let n=this.activeTasks.get(e);n&&n.steps.push({action:t,result:i,quality:r,timestamp:Date.now()})}async endTask(e,t,i){if(this.claudeFlowBridge?.trajectory.isClaudeFlowAvailable())try{await this.claudeFlowBridge.trajectory.endTrajectory(e,t,i)}catch(n){this.claudeFlowErrors++,console.warn(`[AQELearningEngine] Claude Flow endTrajectory failed (${this.claudeFlowErrors} total errors):`,y(n))}let r=this.activeTasks.get(e);if(r)return this.activeTasks.delete(e),this.completedTasks++,this.config.enableExperienceCapture&&t&&await this.captureExperience(r),r}getTask(e){return this.activeTasks.get(e)}async analyzeCodebase(e,t="medium"){let i=e||this.config.projectRoot;if(this.claudeFlowBridge?.pretrain.isClaudeFlowAvailable())try{return await this.claudeFlowBridge.pretrain.analyze(i,t)}catch(r){console.debug("[AQELearningEngine] Claude Flow pretrain analyze failed:",r instanceof Error?r.message:r)}return this.localAnalyze(i,t)}async generateAgentConfigs(e="yaml"){if(this.claudeFlowBridge?.pretrain.isClaudeFlowAvailable())try{return await this.claudeFlowBridge.pretrain.generateAgentConfigs(e)}catch(t){console.debug("[AQELearningEngine] Claude Flow agent config failed:",t instanceof Error?t.message:t)}return[{name:"qe-test-architect",type:"worker",capabilities:["test-generation","test-design"],model:"sonnet"},{name:"qe-coverage-specialist",type:"worker",capabilities:["coverage-analysis","gap-detection"],model:"haiku"},{name:"qe-security-scanner",type:"worker",capabilities:["security-scanning","vulnerability-detection"],model:"opus"}]}async captureExperience(e){if(!this.experienceCapture||!this.config.enableExperienceCapture)return;let t=e.steps.length>0?e.steps.reduce((r,n)=>r+(n.quality??.5),0)/e.steps.length:.5;await this.experienceCapture.completeCapture(e.id,{success:!0,quality:t});let i=await this.experienceCapture.getExperience(e.id);i&&i.quality>=.7&&await this.experienceCapture.shareAcrossDomains(i)}startExperienceCapture(e,t){if(this.experienceCapture)return this.experienceCapture.startCapture(e,t)}getExperienceCaptureService(){return this.experienceCapture}async localAnalyze(e,t){try{let i=await import("fast-glob"),{existsSync:r,readFileSync:n}=await import("fs"),{join:a}=await import("path"),s=t==="shallow"?["*.ts","*.js","*.json"]:t==="medium"?["**/*.ts","**/*.js","**/*.json","**/*.py"]:["**/*"],o=["node_modules/**","dist/**","coverage/**",".git/**"],u=await i.default(s,{cwd:e,ignore:o,onlyFiles:!0}),p=new Set,g=new Set;for(let m of u.slice(0,100))(m.endsWith(".ts")||m.endsWith(".tsx"))&&p.add("typescript"),(m.endsWith(".js")||m.endsWith(".jsx"))&&p.add("javascript"),m.endsWith(".py")&&p.add("python"),m.endsWith(".go")&&p.add("go"),m.endsWith(".rs")&&p.add("rust");let w=a(e,"package.json");if(r(w))try{let m=k(n(w,"utf-8")),d={...m.dependencies,...m.devDependencies};d.react&&g.add("react"),d.vue&&g.add("vue"),d.vitest&&g.add("vitest"),d.jest&&g.add("jest"),d.playwright&&g.add("playwright")}catch(m){console.debug("[AQELearningEngine] package.json parse failed:",m instanceof Error?m.message:m)}return{success:!0,repositoryPath:e,depth:t,analysis:{languages:Array.from(p),frameworks:Array.from(g),patterns:[],complexity:u.length>500?3:u.length>100?2:1}}}catch(i){return{success:!1,repositoryPath:e,depth:t,error:y(i)}}}getGuidance(e,t){if(!this.reasoningBank)throw new Error("Engine not initialized");return this.reasoningBank.getGuidance(e,t)}generateContext(e,t){if(!this.reasoningBank)throw new Error("Engine not initialized");return this.reasoningBank.generateContext(e,t)}checkAntiPatterns(e,t){if(!this.reasoningBank)throw new Error("Engine not initialized");return this.reasoningBank.checkAntiPatterns(e,t)}async dispose(){this._domainTransferInterval&&(clearInterval(this._domainTransferInterval),this._domainTransferInterval=null),this._domainTransferEngine=null,this.experienceCapture&&await this.experienceCapture.dispose(),this.patternStore&&await this.patternStore.dispose(),this.reasoningBank&&await this.reasoningBank.dispose(),this.activeTasks.clear(),this.initialized=!1}},de={enabled:!1,snapshotIntervalMs:3e5,minSnapshotsForAnalysis:5,autoApplyThreshold:.8},ee=class{config;constructor(e){this.config={...de,...e}}runMetaLearningCycle(e){if(process.env.AQE_META_LEARNING_ENABLED!=="true")return[];if(!this.config.enabled)return[];if(e.length<this.config.minSnapshotsForAnalysis)return[];let t=Math.floor(e.length/2),i=e.slice(0,t),r=e.slice(t),n=[],a=Date.now(),s=h(i.map(c=>c.tokenMetrics.costUsd)),o=h(r.map(c=>c.tokenMetrics.costUsd)),u=h(i.map(c=>c.tokenMetrics.savingsUsd)),p=h(r.map(c=>c.tokenMetrics.savingsUsd));if(o>s*1.1&&p<=u*1.05){let c=Math.min(1,(o-s)/(s||1));n.push({id:`meta-tw-${a}`,type:"token-waste",description:`Token cost increased by ${((o/(s||1)-1)*100).toFixed(1)}% while savings remained flat`,confidence:F(c),suggestedAction:"Review cache configuration and increase pattern reuse thresholds",detectedAt:a})}let g=h(i.map(c=>c.qualityMetrics.gatePassRate)),w=h(r.map(c=>c.qualityMetrics.gatePassRate));Math.abs(w-g)<.02&&e.length>=this.config.minSnapshotsForAnalysis&&n.push({id:`meta-qp-${a}`,type:"quality-plateau",description:`Gate pass rate has been flat at ${(w*100).toFixed(1)}% across ${e.length} snapshots`,confidence:F(.6+(e.length-this.config.minSnapshotsForAnalysis)*.05),suggestedAction:"Consider reviewing quality thresholds or adding new test coverage domains",detectedAt:a});let d=h(i.map(c=>c.learningMetrics.patternCount)),f=h(r.map(c=>c.learningMetrics.patternCount)),te=h(i.map(c=>c.learningMetrics.averageConfidence)),$=h(r.map(c=>c.learningMetrics.averageConfidence)),ie=Math.abs(f-d),re=Math.abs($-te);ie<1&&re<.02&&n.push({id:`meta-ls-${a}`,type:"learning-stall",description:`Pattern count (~${Math.round(f)}) and confidence (~${$.toFixed(2)}) have stagnated`,confidence:F(.65+(e.length-this.config.minSnapshotsForAnalysis)*.04),suggestedAction:"Expand to new QE domains or lower pattern creation thresholds to encourage exploration",detectedAt:a});let C=h(i.map(c=>c.performanceMetrics.p95LatencyMs)),A=h(r.map(c=>c.performanceMetrics.p95LatencyMs));if(A>C*1.2&&C>0){let c=Math.min(1,(A-C)/(C||1));n.push({id:`meta-pr-${a}`,type:"performance-regression",description:`P95 latency increased from ${C.toFixed(0)}ms to ${A.toFixed(0)}ms`,confidence:F(c),suggestedAction:"Profile hot paths and consider HNSW index tuning or batch size reduction",detectedAt:a})}return n}shouldAutoApply(e,t){let i=(t??this.config).autoApplyThreshold;return e.confidence>=i}};function h(l){return l.length===0?0:l.reduce((e,t)=>e+t,0)/l.length}function F(l){return Math.max(0,Math.min(1,l))}function pe(l,e,t){return new L(l,e,t)}function et(l,e,t){return pe(l,{projectRoot:e},t)}export{ue as a,L as b,de as c,ee as d,pe as e,et as f};
|
|
@@ -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.6");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.
|
|
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.6");process.exit(0)}
|
|
2
2
|
var l=["ECONNREFUSED","ETIMEOUT","ENOMEM","ENOSPC"];var s={successRate:.1,failureRate:1,viabilityThreshold:.3,rehabilitationThreshold:10,maxQuarantineDurationMs:6048e5,domainOverrides:{"security-compliance":{successRate:.05,failureRate:1,viabilityThreshold:.5},"test-generation":{successRate:.15,failureRate:1,viabilityThreshold:.2},"quality-assessment":{successRate:.1,failureRate:1,viabilityThreshold:.4}}},a=class{config;_witnessChain=null;set witnessChain(e){this._witnessChain=e}constructor(e={}){this.config={...s,...e,domainOverrides:{...s.domainOverrides,...e.domainOverrides}}}computeConfidenceUpdate(e,r,i){let{successRate:u,failureRate:o}=this.getConfigForDomain(i),n=r==="success"?u:-o;if(r==="failure")try{this._witnessChain?.append("HEBBIAN_PENALTY",{previousConfidence:e,delta:n,domain:i},"asymmetric-learning")}catch{}return c(e+n,0,1)}shouldQuarantine(e,r){let{viabilityThreshold:i}=this.getConfigForDomain(r);return{shouldQuarantine:e<i,confidence:e,viabilityThreshold:i,domain:r}}classifyFailure(e){if(e.infrastructureHealthy===!1||e.durationMs!==void 0&&e.durationMs>3e4)return"infrastructure";if(e.errorMessage){let r=e.errorMessage.toUpperCase();for(let i of l)if(r.includes(i))return"infrastructure"}return e.failureCategory==="infrastructure"?"infrastructure":(e.failureCategory==="pattern","pattern")}checkRehabilitation(e,r){let i=this.config.rehabilitationThreshold;return{canRehabilitate:e>=i,consecutiveSuccesses:e,requiredSuccesses:i,domain:r}}getConfigForDomain(e){return e&&this.config.domainOverrides?.[e]?this.config.domainOverrides[e]:{successRate:this.config.successRate,failureRate:this.config.failureRate,viabilityThreshold:this.config.viabilityThreshold}}getAsymmetryRatio(e){let{successRate:r,failureRate:i}=this.getConfigForDomain(e);return r===0?1/0:i/r}};function c(t,e,r){return t<e?e:t>r?r:t}export{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.
|
|
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.6");process.exit(0)}
|
|
2
2
|
import T from"crypto";var h=new Uint8Array(256),y=h.length;function s(){return y>h.length-16&&(T.randomFillSync(h),y=0),h.slice(y,y+=16)}var A=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function q(r){return typeof r=="string"&&A.test(r)}var u=q;var o=[];for(let r=0;r<256;++r)o.push((r+256).toString(16).slice(1));function p(r,e=0){return o[r[e+0]]+o[r[e+1]]+o[r[e+2]]+o[r[e+3]]+"-"+o[r[e+4]]+o[r[e+5]]+"-"+o[r[e+6]]+o[r[e+7]]+"-"+o[r[e+8]]+o[r[e+9]]+"-"+o[r[e+10]]+o[r[e+11]]+o[r[e+12]]+o[r[e+13]]+o[r[e+14]]+o[r[e+15]]}function N(r,e=0){let t=p(r,e);if(!u(t))throw TypeError("Stringified UUID is invalid");return t}var _=N;var E,U,I=0,w=0;function R(r,e,t){let n=e&&t||0,f=e||new Array(16);r=r||{};let d=r.node||E,l=r.clockseq!==void 0?r.clockseq:U;if(d==null||l==null){let a=r.random||(r.rng||s)();d==null&&(d=E=[a[0]|1,a[1],a[2],a[3],a[4],a[5]]),l==null&&(l=U=(a[6]<<8|a[7])&16383)}let c=r.msecs!==void 0?r.msecs:Date.now(),x=r.nsecs!==void 0?r.nsecs:w+1,i=c-I+(x-w)/1e4;if(i<0&&r.clockseq===void 0&&(l=l+1&16383),(i<0||c>I)&&r.nsecs===void 0&&(x=0),x>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");I=c,w=x,U=l,c+=122192928e5;let m=((c&268435455)*1e4+x)%4294967296;f[n++]=m>>>24&255,f[n++]=m>>>16&255,f[n++]=m>>>8&255,f[n++]=m&255;let v=c/4294967296*1e4&268435455;f[n++]=v>>>8&255,f[n++]=v&255,f[n++]=v>>>24&15|16,f[n++]=v>>>16&255,f[n++]=l>>>8|128,f[n++]=l&255;for(let a=0;a<6;++a)f[n+a]=d[a];return e||p(f)}var C=R;function H(r){if(!u(r))throw TypeError("Invalid UUID");let e,t=new Uint8Array(16);return t[0]=(e=parseInt(r.slice(0,8),16))>>>24,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=e&255,t[4]=(e=parseInt(r.slice(9,13),16))>>>8,t[5]=e&255,t[6]=(e=parseInt(r.slice(14,18),16))>>>8,t[7]=e&255,t[8]=(e=parseInt(r.slice(19,23),16))>>>8,t[9]=e&255,t[10]=(e=parseInt(r.slice(24,36),16))/1099511627776&255,t[11]=e/4294967296&255,t[12]=e>>>24&255,t[13]=e>>>16&255,t[14]=e>>>8&255,t[15]=e&255,t}var D=H;function L(r){r=unescape(encodeURIComponent(r));let e=[];for(let t=0;t<r.length;++t)e.push(r.charCodeAt(t));return e}var M="6ba7b810-9dad-11d1-80b4-00c04fd430c8",P="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function g(r,e,t){function n(f,d,l,c){var x;if(typeof f=="string"&&(f=L(f)),typeof d=="string"&&(d=D(d)),((x=d)===null||x===void 0?void 0:x.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let i=new Uint8Array(16+f.length);if(i.set(d),i.set(f,d.length),i=t(i),i[6]=i[6]&15|e,i[8]=i[8]&63|128,l){c=c||0;for(let m=0;m<16;++m)l[c+m]=i[m];return l}return p(i)}try{n.name=r}catch{}return n.DNS=M,n.URL=P,n}import F from"crypto";function G(r){return Array.isArray(r)?r=Buffer.from(r):typeof r=="string"&&(r=Buffer.from(r,"utf8")),F.createHash("md5").update(r).digest()}var k=G;var X=g("v3",48,k),$=X;import j from"crypto";var S={randomUUID:j.randomUUID};function z(r,e,t){if(S.randomUUID&&!e&&!r)return S.randomUUID();r=r||{};let n=r.random||(r.rng||s)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){t=t||0;for(let f=0;f<16;++f)e[t+f]=n[f];return e}return p(n)}var J=z;import K from"crypto";function O(r){return Array.isArray(r)?r=Buffer.from(r):typeof r=="string"&&(r=Buffer.from(r,"utf8")),K.createHash("sha1").update(r).digest()}var B=O;var Q=g("v5",80,B),V=Q;var W="00000000-0000-0000-0000-000000000000";function Y(r){if(!u(r))throw TypeError("Invalid UUID");return parseInt(r.slice(14,15),16)}var Z=Y;export{u as a,_ as b,C as c,D as d,$ as e,J as f,V as g,W as h,Z as i};
|