agentic-qe 3.13.3 → 3.13.4
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/.agents/skills/aqe-plan-work/SKILL.md +31 -0
- package/.agents/skills/aqe-plan-work/agents/openai.yaml +4 -0
- package/.agents/skills/aqe-plan-work/references/planning-framework.md +39 -0
- package/.agents/skills/aqe-research/SKILL.md +31 -0
- package/.agents/skills/aqe-research/agents/openai.yaml +4 -0
- package/.agents/skills/aqe-research/references/evidence-rules.md +21 -0
- package/.agents/skills/aqe-ruflo/SKILL.md +29 -0
- package/.claude/commands/pair/README.md +261 -0
- package/.claude/commands/pair/commands.md +546 -0
- package/.claude/commands/pair/config.md +510 -0
- package/.claude/commands/pair/examples.md +512 -0
- package/.claude/commands/pair/modes.md +348 -0
- package/.claude/commands/pair/session.md +407 -0
- package/.claude/commands/pair/start.md +209 -0
- package/.claude/commands/stream-chain/pipeline.md +121 -0
- package/.claude/commands/stream-chain/run.md +70 -0
- package/.claude/commands/training/README.md +9 -0
- package/.claude/commands/training/model-update.md +25 -0
- package/.claude/commands/training/neural-patterns.md +108 -0
- package/.claude/commands/training/neural-train.md +75 -0
- package/.claude/commands/training/pattern-learn.md +25 -0
- package/.claude/commands/training/specialization.md +63 -0
- package/.claude/commands/truth/start.md +143 -0
- package/.claude/commands/verify/check.md +50 -0
- package/.claude/commands/verify/start.md +128 -0
- package/.claude/helpers/v3/advisor-call.cjs +283 -0
- package/.claude/skills/README.md +54 -64
- package/.claude/skills/dual-mode/README.md +71 -0
- package/.claude/skills/dual-mode/dual-collect.md +103 -0
- package/.claude/skills/dual-mode/dual-coordinate.md +85 -0
- package/.claude/skills/dual-mode/dual-spawn.md +81 -0
- package/.claude/skills/skills-manifest.json +1 -1
- package/.codex/hooks/aqe-codex-hook.cjs +34 -9
- package/.codex/hooks.json +9 -9
- package/CHANGELOG.md +42 -0
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/cli/bundle.js +5 -5
- package/dist/cli/chunks/adapter-JISQ35YY.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-YIGGREZN.js → agent-booster-wasm-PR3RQWXF.js} +2 -2
- package/dist/cli/chunks/{agent-handler-64O7R55A.js → agent-handler-J5EPFBSZ.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-2ZZBYUP3.js → agent-memory-branch-CCHI6QAA.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-TVTNP76S.js +2 -0
- package/dist/cli/chunks/{arena-PF5WL2WM.js → arena-KMKBGSMY.js} +2 -2
- package/dist/cli/chunks/{arena-6YRNQNCX.js → arena-SI7IPVZ3.js} +4 -4
- package/dist/cli/chunks/{audit-R53FOYCK.js → audit-ZDKR3HT6.js} +3 -3
- package/dist/cli/chunks/base-WBCYKM45.js +2 -0
- package/dist/cli/chunks/{hnswlib-node-QOULNHXS.js → better-sqlite3-FXJFG2WH.js} +2 -2
- package/dist/cli/chunks/{brain-handler-J4ICUOUX.js → brain-handler-MSYMTM5B.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-YVPD43TG.js → branch-enumerator-FRAHCBTO.js} +2 -2
- package/dist/cli/chunks/{browser-TKVHX53S.js → browser-4KHKVNYC.js} +2 -2
- package/dist/cli/chunks/browser-workflow-4JM3IWCS.js +2 -0
- package/dist/cli/chunks/{chunk-GSG5FASF.js → chunk-26SNR2EK.js} +3 -3
- package/dist/cli/chunks/{chunk-JG267MVB.js → chunk-27FWRWOB.js} +2 -2
- package/dist/cli/chunks/{chunk-NIA6VTIH.js → chunk-27REOPQK.js} +2 -2
- package/dist/cli/chunks/{chunk-4RYU4WMW.js → chunk-2Q73TQUQ.js} +1 -1
- package/dist/cli/chunks/{chunk-A22RTEJ3.js → chunk-344CLTV7.js} +2 -2
- package/dist/cli/chunks/{chunk-MGKJFO57.js → chunk-3RSF7POD.js} +2 -2
- package/dist/cli/chunks/{chunk-CVFUANMU.js → chunk-44SYMJ4T.js} +2 -2
- package/dist/cli/chunks/{chunk-22WFXSXB.js → chunk-4FP4PJ45.js} +2 -2
- package/dist/cli/chunks/{chunk-DTOKJKSE.js → chunk-4HVVVVUF.js} +2 -2
- package/dist/cli/chunks/{chunk-QGJYKXUO.js → chunk-55E62F4T.js} +1 -1
- package/dist/cli/chunks/{chunk-RWPWD5GG.js → chunk-56QR72EB.js} +2 -2
- package/dist/cli/chunks/{chunk-NUPAGPN6.js → chunk-5DESO7E4.js} +2 -2
- package/dist/cli/chunks/{chunk-PHNNAIFA.js → chunk-5IVXM3TE.js} +1 -1
- package/dist/cli/chunks/{chunk-TW5QWNT4.js → chunk-5R26MAMK.js} +2 -2
- package/dist/cli/chunks/{chunk-IZIYFVAZ.js → chunk-5RVWL2U3.js} +3 -3
- package/dist/cli/chunks/{chunk-OX6WPOGR.js → chunk-6BHRSGR7.js} +3 -3
- package/dist/cli/chunks/{chunk-4Z2AKQP4.js → chunk-6CZUQA4G.js} +1 -1
- package/dist/cli/chunks/{chunk-FGIZVGIE.js → chunk-6GNVVQW3.js} +2 -2
- package/dist/cli/chunks/{chunk-7AHQ7ROU.js → chunk-6VNUASTQ.js} +2 -2
- package/dist/cli/chunks/{chunk-B7XZJBMT.js → chunk-6XCULO27.js} +2 -2
- package/dist/cli/chunks/{chunk-LOZRBK2Z.js → chunk-6XVP6BGM.js} +2 -2
- package/dist/cli/chunks/{chunk-APXJJRU4.js → chunk-75CFWCQV.js} +2 -2
- package/dist/cli/chunks/{chunk-37GCWGXT.js → chunk-7EL5QEMJ.js} +2 -2
- package/dist/cli/chunks/{chunk-3NML6POU.js → chunk-7YAHECC5.js} +2 -2
- package/dist/cli/chunks/{chunk-N3KQRDTM.js → chunk-A2G26WU4.js} +1 -1
- package/dist/cli/chunks/{chunk-X737I4SO.js → chunk-AROPZPNG.js} +1 -1
- package/dist/cli/chunks/{chunk-IKPBQZQP.js → chunk-BQRCNRTJ.js} +2 -2
- package/dist/cli/chunks/{chunk-JLFU5SCI.js → chunk-C3AF5Z55.js} +2 -2
- package/dist/cli/chunks/{chunk-FF53QW6C.js → chunk-C75V5PTW.js} +1 -1
- package/dist/cli/chunks/{chunk-HJNFXYX4.js → chunk-CQP6BDSF.js} +1 -1
- package/dist/cli/chunks/{chunk-ADBTOUOX.js → chunk-CTNDSP2M.js} +1 -1
- package/dist/cli/chunks/{chunk-VRTNRI4H.js → chunk-CW7LDLJ2.js} +2 -2
- package/dist/cli/chunks/{chunk-PHBGMXTR.js → chunk-DQ247474.js} +2 -2
- package/dist/cli/chunks/{chunk-66KIIH6V.js → chunk-E7FCVH32.js} +2 -2
- package/dist/cli/chunks/{chunk-64C4SS66.js → chunk-EEHEMDNV.js} +2 -2
- package/dist/cli/chunks/{chunk-2MLPO3RZ.js → chunk-EPSF2ERW.js} +2 -2
- package/dist/cli/chunks/{chunk-AXXFY7PX.js → chunk-ERKYIV25.js} +2 -2
- package/dist/cli/chunks/{chunk-VFZNVJP2.js → chunk-ESMSH7HG.js} +2 -2
- package/dist/cli/chunks/{chunk-PS32DXYF.js → chunk-EUIUWZF4.js} +3 -3
- package/dist/cli/chunks/{chunk-764G7VK6.js → chunk-FBXWU37F.js} +1 -1
- package/dist/cli/chunks/{chunk-NF2N2FIY.js → chunk-FJSL7TWU.js} +1 -1
- package/dist/cli/chunks/{chunk-6I2L22WS.js → chunk-FZ4MUDHZ.js} +1 -1
- package/dist/cli/chunks/{chunk-62F5M5OO.js → chunk-GGZB2ZBB.js} +1 -1
- package/dist/cli/chunks/{chunk-HOIH542Y.js → chunk-GIU26D5G.js} +1 -1
- package/dist/cli/chunks/{chunk-7TG7LJAB.js → chunk-GNFKG2LX.js} +2 -2
- package/dist/cli/chunks/{chunk-J5AIMM2J.js → chunk-GOFP47XU.js} +1 -1
- package/dist/cli/chunks/{chunk-AJ45QR3K.js → chunk-GOHWEQEP.js} +2 -2
- package/dist/cli/chunks/{chunk-MNEQESQJ.js → chunk-GRMKN44A.js} +3 -3
- package/dist/cli/chunks/{chunk-H4XZOIV6.js → chunk-HGBVGEUE.js} +2 -2
- package/dist/cli/chunks/{chunk-JQTDNUHA.js → chunk-HGY62IYZ.js} +2 -2
- package/dist/cli/chunks/{chunk-2G2XD6EM.js → chunk-HN2DD2DQ.js} +2 -2
- package/dist/cli/chunks/{chunk-N4OBRS6S.js → chunk-II2RP3MY.js} +2 -2
- package/dist/cli/chunks/{chunk-CXPMA7LY.js → chunk-IN5KRJSE.js} +1 -1
- package/dist/cli/chunks/{chunk-TNM7X2GD.js → chunk-ISGKDLZ7.js} +2 -2
- package/dist/cli/chunks/{chunk-TGVDKSSS.js → chunk-ITQCSIYG.js} +1 -1
- package/dist/cli/chunks/{chunk-PY55ZD2G.js → chunk-IU5SILCS.js} +2 -2
- package/dist/cli/chunks/{chunk-JOHWWTJF.js → chunk-IUFNB6I6.js} +2 -2
- package/dist/cli/chunks/{chunk-UAXFRKR3.js → chunk-IVZA5XTW.js} +2 -2
- package/dist/cli/chunks/{chunk-A6J5MAVO.js → chunk-JBHGMLN7.js} +10 -10
- package/dist/cli/chunks/{chunk-UF7JKDWB.js → chunk-JDADACZZ.js} +1 -1
- package/dist/cli/chunks/{chunk-5IH22DLD.js → chunk-JJ5YIKTJ.js} +3 -3
- package/dist/cli/chunks/{chunk-TRPRFW27.js → chunk-KB4S7MGB.js} +2 -2
- package/dist/cli/chunks/{chunk-XRF5MX4Q.js → chunk-KDICUKYX.js} +2 -2
- package/dist/cli/chunks/{chunk-EEG4G5JG.js → chunk-KE656E6T.js} +3 -3
- package/dist/cli/chunks/{chunk-F6V5POSK.js → chunk-KO3UQYGY.js} +10 -10
- package/dist/cli/chunks/{chunk-WRC66JTK.js → chunk-KQLJILCZ.js} +1 -1
- package/dist/cli/chunks/{chunk-C7AXBCMS.js → chunk-KZAVYHH7.js} +4 -4
- package/dist/cli/chunks/{chunk-7MBPKAQ3.js → chunk-L3UTZEVW.js} +2 -2
- package/dist/cli/chunks/{chunk-RRHIEG4Y.js → chunk-LASZCR5G.js} +2 -2
- package/dist/cli/chunks/{chunk-PHGOMAIS.js → chunk-LEIG3KIG.js} +2 -2
- package/dist/cli/chunks/{chunk-ZIYCZZYD.js → chunk-LIMFWEUI.js} +2 -2
- package/dist/cli/chunks/{chunk-VGWHFFK6.js → chunk-LJSHQU2P.js} +5 -5
- package/dist/cli/chunks/{chunk-3J2QITXC.js → chunk-LUAYTM77.js} +1 -1
- package/dist/cli/chunks/{chunk-GNCGRDQ2.js → chunk-MANWLRAW.js} +1 -1
- package/dist/cli/chunks/{chunk-JBWXBDJX.js → chunk-MP3RCZ75.js} +1 -1
- package/dist/cli/chunks/{chunk-WVWWTRKT.js → chunk-MPVOZKUP.js} +1 -1
- package/dist/cli/chunks/{chunk-A547LEUW.js → chunk-MWWTYPFL.js} +2 -2
- package/dist/cli/chunks/{chunk-IRX2THND.js → chunk-N57M7UPQ.js} +2 -2
- package/dist/cli/chunks/{chunk-TK6CHESH.js → chunk-N7LIYK7Z.js} +1 -1
- package/dist/cli/chunks/{chunk-ORXDKBZC.js → chunk-NAAPL2HK.js} +1 -1
- package/dist/cli/chunks/{chunk-IH47VGC7.js → chunk-NAZFAGJ5.js} +2 -2
- package/dist/cli/chunks/{chunk-M7XDTQHX.js → chunk-NQJLUY2K.js} +2 -2
- package/dist/cli/chunks/{chunk-6C3PDY72.js → chunk-NQVF4M7L.js} +1 -1
- package/dist/cli/chunks/{chunk-SJWTNKPY.js → chunk-NW4YPUPN.js} +3 -3
- package/dist/cli/chunks/{chunk-46U73TST.js → chunk-O45CEMVF.js} +1 -1
- package/dist/cli/chunks/{chunk-37I4AMCT.js → chunk-O74V7MB4.js} +2 -2
- package/dist/cli/chunks/{chunk-ZI7BWJJW.js → chunk-OF7674H5.js} +2 -2
- package/dist/cli/chunks/{chunk-P5CQMDFQ.js → chunk-OR2RC7ZH.js} +2 -2
- package/dist/cli/chunks/{chunk-ZLTAAROU.js → chunk-OU2YHXJY.js} +2 -2
- package/dist/cli/chunks/{chunk-JHOJG5VO.js → chunk-OU3SYEYJ.js} +1 -1
- package/dist/cli/chunks/{chunk-N7IRBQ4D.js → chunk-PD2ZSCEH.js} +1 -1
- package/dist/cli/chunks/{chunk-DSUEJK33.js → chunk-PFQLB4XP.js} +2 -2
- package/dist/cli/chunks/{chunk-V6W4IHS5.js → chunk-PI55PHUL.js} +2 -2
- package/dist/cli/chunks/{chunk-EMH54CO7.js → chunk-PIYDPOW6.js} +2 -2
- package/dist/cli/chunks/{chunk-DSGKRXHF.js → chunk-PJFQGNRW.js} +1 -1
- package/dist/cli/chunks/{chunk-L4O2645U.js → chunk-PRHLV6FS.js} +1 -1
- package/dist/cli/chunks/chunk-Q4VZXT6X.js +2 -0
- package/dist/cli/chunks/{chunk-H2BR5MCX.js → chunk-QENUKXPP.js} +2 -2
- package/dist/cli/chunks/chunk-QGH54HTH.js +2 -0
- package/dist/cli/chunks/{chunk-2BYRQ5MV.js → chunk-QXF6EQFP.js} +2 -2
- package/dist/cli/chunks/{chunk-ZU3XUBDQ.js → chunk-RCRKCMN5.js} +1 -1
- package/dist/cli/chunks/{chunk-5A5EC5RD.js → chunk-RKNKFLCQ.js} +2 -2
- package/dist/cli/chunks/{chunk-5IVOY76M.js → chunk-RLZZTFEN.js} +2 -2
- package/dist/cli/chunks/{chunk-CBLKYGKT.js → chunk-RO4BYINM.js} +2 -2
- package/dist/cli/chunks/{chunk-K2D3YW2N.js → chunk-SFRYDGLF.js} +1 -1
- package/dist/cli/chunks/{chunk-UX434RY5.js → chunk-SJ26ZR75.js} +2 -2
- package/dist/cli/chunks/{chunk-LLQG3F4H.js → chunk-SPTCNM45.js} +2 -2
- package/dist/cli/chunks/{chunk-KQFMCVBH.js → chunk-SQCACQUM.js} +2 -2
- package/dist/cli/chunks/{chunk-3CFWNT3F.js → chunk-TCYSMSBO.js} +2 -2
- package/dist/cli/chunks/{chunk-W6OIDL4J.js → chunk-TFFEB7XD.js} +2 -2
- package/dist/cli/chunks/{chunk-RU23JXCG.js → chunk-TM6LLT4G.js} +3 -3
- package/dist/cli/chunks/{chunk-WHUQDBV7.js → chunk-TO7FTPRV.js} +2 -2
- package/dist/cli/chunks/{chunk-QZ3EIONO.js → chunk-U52IQFMP.js} +1 -1
- package/dist/cli/chunks/{chunk-33SPAMQZ.js → chunk-UAEP2ZUQ.js} +2 -2
- package/dist/cli/chunks/{chunk-OD5R7HRI.js → chunk-UNMWI4QU.js} +1 -1
- package/dist/cli/chunks/{chunk-U7DGRHSB.js → chunk-UOO7P2AK.js} +2 -2
- package/dist/cli/chunks/{chunk-QFANYWC5.js → chunk-UQFMQOZB.js} +1 -1
- package/dist/cli/chunks/{chunk-2QKSIHXO.js → chunk-VDPQ7NVG.js} +1 -1
- package/dist/cli/chunks/{chunk-QP4UKSUJ.js → chunk-VLELNETG.js} +2 -2
- package/dist/cli/chunks/{chunk-KQ5GLUOB.js → chunk-VOAXVNO5.js} +4 -4
- package/dist/cli/chunks/{chunk-QZS3XCU5.js → chunk-VZO4V4R4.js} +2 -2
- package/dist/cli/chunks/{chunk-BDOD534O.js → chunk-W37WY3OL.js} +2 -2
- package/dist/cli/chunks/{chunk-UWBHR4EZ.js → chunk-WCUXA3NV.js} +1 -1
- package/dist/cli/chunks/{chunk-RMQRSZB4.js → chunk-WSQE3VZB.js} +1 -1
- package/dist/cli/chunks/{chunk-MYR6CBXC.js → chunk-WUXCL65V.js} +2 -2
- package/dist/cli/chunks/{chunk-OU5CZFBG.js → chunk-X5JMTHXC.js} +3 -3
- package/dist/cli/chunks/{chunk-XRQGWUDX.js → chunk-X67O2KUE.js} +2 -2
- package/dist/cli/chunks/{chunk-HEF6XKA5.js → chunk-XBSBVPSM.js} +2 -2
- package/dist/cli/chunks/{chunk-KBQRYAHZ.js → chunk-XEI5LLHX.js} +2 -2
- package/dist/cli/chunks/{chunk-LWPCGOQM.js → chunk-XF4F5ZXO.js} +2 -2
- package/dist/cli/chunks/{chunk-SAMAYDVS.js → chunk-XLP44YGX.js} +2 -2
- package/dist/cli/chunks/{chunk-CW7BWFFF.js → chunk-XTHRSBMJ.js} +2 -2
- package/dist/cli/chunks/{chunk-VKUH57JE.js → chunk-Y7VWCP35.js} +1 -1
- package/dist/cli/chunks/{chunk-6R6QGQ7D.js → chunk-YQI6SOUO.js} +1 -1
- package/dist/cli/chunks/{chunk-GTURQ454.js → chunk-YZGA4ELM.js} +2 -2
- package/dist/cli/chunks/{chunk-SSXCHSVM.js → chunk-Z6FK7T7J.js} +2 -2
- package/dist/cli/chunks/{chunk-UOJ26GXD.js → chunk-Z7FVGJYC.js} +2 -2
- package/dist/cli/chunks/{chunk-DPJLA7JW.js → chunk-ZAT65V6I.js} +2 -2
- package/dist/cli/chunks/{chunk-J65XQ6WE.js → chunk-ZYCPTARG.js} +2 -2
- package/dist/cli/chunks/{ci-G2NEYLVO.js → ci-DK4FGREO.js} +2 -2
- package/dist/cli/chunks/{ci-output-SZFEXGBU.js → ci-output-HQBBQQES.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-ZD7PJY6N.js → circuit-breaker-MJCS46DN.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-DAVANGUJ.js → claude-flow-setup-IIQT52H4.js} +2 -2
- package/dist/cli/chunks/client-FNDZB4TY.js +2 -0
- package/dist/cli/chunks/{cline-installer-WCPKWLY7.js → cline-installer-7SPKUNNZ.js} +2 -2
- package/dist/cli/chunks/{code-324ZJR3V.js → code-V2B4FP3X.js} +2 -2
- package/dist/cli/chunks/{code-index-extractor-EWVSXJHR.js → code-index-extractor-IRGAI76Y.js} +2 -2
- package/dist/cli/chunks/codex-installer-PDFCYRU6.js +15 -0
- package/dist/cli/chunks/{completions-ZAWBZWYK.js → completions-TAJ6N7YZ.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-S3H2IRON.js → complexity-analyzer-JHQKQKBG.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-4DDFAJ26.js → continuedev-installer-DESZXCLC.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-KBBAL3G5.js → copilot-installer-OQPXBLWS.js} +2 -2
- package/dist/cli/chunks/core-handlers-S37RHLKP.js +2 -0
- package/dist/cli/chunks/{cost-tracker-2YM7SGBW.js → cost-tracker-KHDFSCAJ.js} +2 -2
- package/dist/cli/chunks/{coverage-6CCBAORJ.js → coverage-T7EENIDE.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-7ZHDB2V3.js +2 -0
- package/dist/cli/chunks/{cursor-installer-24DKXNU5.js → cursor-installer-X6BFU5QU.js} +2 -2
- package/dist/cli/chunks/{daemon-M2PSDIZF.js → daemon-22NOG5XI.js} +3 -3
- package/dist/cli/chunks/{daemon-JLF6CRBS.js → daemon-UTPP4JCG.js} +4 -4
- package/dist/cli/chunks/{dag-attention-scheduler-Y5HSZDRV.js → dag-attention-scheduler-XI6DG3FW.js} +2 -2
- package/dist/cli/chunks/{detect-6Y227IJ6.js → detect-7IMQGJ5I.js} +2 -2
- package/dist/cli/chunks/{dist-node-EGOJXGTA.js → dist-node-YMLM4K7J.js} +2 -2
- package/dist/cli/chunks/{domain-handler-G3JEWRE5.js → domain-handler-LRTJGTEH.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-XOHI3EMJ.js → domain-transfer-HZJ3WUCT.js} +2 -2
- package/dist/cli/chunks/dream-BEVYNIOO.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-CSSA55L4.js → embed-and-insert-pattern-QSRN7Z5Q.js} +2 -2
- package/dist/cli/chunks/{eval-NHBXOXDV.js → eval-JVVVQVV6.js} +2 -2
- package/dist/cli/chunks/{experience-capture-middleware-B7ZDV5UY.js → experience-capture-middleware-ORZN3ROJ.js} +3 -3
- package/dist/cli/chunks/{fast-paths-XGKSBALA.js → fast-paths-LUFARZR5.js} +2 -2
- package/dist/cli/chunks/{feature-flags-NBUDJSWJ.js → feature-flags-2XC4ECLW.js} +2 -2
- package/dist/cli/chunks/{feature-flags-ZVD73ZYK.js → feature-flags-ZHQESXIP.js} +2 -2
- package/dist/cli/chunks/{file-discovery-C42TEUKT.js → file-discovery-UHXZQ7GS.js} +2 -2
- package/dist/cli/chunks/{fleet-LF77P3BW.js → fleet-FUQ6G4SB.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-UXNT7BEN.js → gnn-wrapper-A4E6OKGD.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-C4LMU5LA.js → heartbeat-handler-3JKQORXA.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-K4YLB3X4.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-PPR3LTMA.js +2 -0
- package/dist/cli/chunks/hnsw-index-ZSKFT4LZ.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-EHHBIWS3.js → hnsw-legacy-bridge-AHKFKM2J.js} +2 -2
- package/dist/cli/chunks/{better-sqlite3-OW5HIPEN.js → hnswlib-node-BP5CZGMD.js} +2 -2
- package/dist/cli/chunks/{hooks-AGE3HCFI.js → hooks-JNW5ZB2E.js} +10 -10
- package/dist/cli/chunks/hybrid-router-4SXBHTOY.js +2 -0
- package/dist/cli/chunks/{hypergraph-engine-E5QX5MEB.js → hypergraph-engine-3DTAMNSJ.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-ZZHBANYB.js → hypergraph-handler-ZV4AZRGF.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-55GE7EQD.js +2 -0
- package/dist/cli/chunks/{init-handler-PNVRBZZT.js → init-handler-NPOUX47N.js} +10 -6
- package/dist/cli/chunks/init-wizard-EUQLSGI6.js +2 -0
- package/dist/cli/chunks/kernel-BSGSVYPM.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-TR53QKPU.js → kilocode-installer-D35TR6LG.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-MJW6LCAX.js → kiro-installer-OHHTQENO.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-OITIVT5J.js +2 -0
- package/dist/cli/chunks/{learning-6LLGHP2Q.js → learning-24PCHLWU.js} +3 -3
- package/dist/cli/chunks/{llm-router-DBLV3VGG.js → llm-router-XLTE52H5.js} +4 -4
- package/dist/cli/chunks/llm-router-service-RUPU52AR.js +2 -0
- package/dist/cli/chunks/{load-LAZ3E5PE.js → load-BHMK4FIL.js} +2 -2
- package/dist/cli/chunks/load-test-ZV3C55ZE.js +2 -0
- package/dist/cli/chunks/{mcp-L5QXHSEY.js → mcp-V4MAYT7C.js} +2 -2
- package/dist/cli/chunks/{memory-YR5PCMWA.js → memory-PDA7MQ7E.js} +5 -5
- package/dist/cli/chunks/memory-backend-S3KCPHCF.js +2 -0
- package/dist/cli/chunks/{memory-handlers-BSRTZQYR.js → memory-handlers-X5BLXOSH.js} +2 -2
- package/dist/cli/chunks/{multi-model-executor-RECZ3ACW.js → multi-model-executor-KECHOXKD.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-4TDUB7HH.js → opencode-installer-LWSCQOOZ.js} +2 -2
- package/dist/cli/chunks/{orchestrator-PHDKJ5C4.js → orchestrator-ENEBTEUW.js} +6 -6
- package/dist/cli/chunks/pattern-null-store-ILVDKSCX.js +2 -0
- package/dist/cli/chunks/{pattern-usage-recorder-QK2FADRS.js → pattern-usage-recorder-XIHGXYZZ.js} +2 -2
- package/dist/cli/chunks/{pipeline-JQJYSN43.js → pipeline-GQOJM3LU.js} +2 -2
- package/dist/cli/chunks/platform-L56TGXGZ.js +2 -0
- package/dist/cli/chunks/{plugin-766MBGK6.js → plugin-SZ6PZKYX.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-XQERZNSK.js → prime-radiant-advanced-wasm-SID5FQFW.js} +2 -2
- package/dist/cli/chunks/protocol-executor-GDRHCW3Q.js +2 -0
- package/dist/cli/chunks/{protocol-handler-FAK4MMNA.js → protocol-handler-5MMNVVPX.js} +2 -2
- package/dist/cli/chunks/{prove-HYBVXOGW.js → prove-DJ6BQ2AK.js} +2 -2
- package/dist/cli/chunks/provider-manager-BS4MVCSH.js +2 -0
- package/dist/cli/chunks/qe-reasoning-bank-P3ARGHDN.js +2 -0
- package/dist/cli/chunks/{quality-EGSO2RAX.js → quality-WKC4JCB3.js} +2 -2
- package/dist/cli/chunks/{quality-gate-RK32VMO7.js → quality-gate-CVHVSORK.js} +3 -3
- package/dist/cli/chunks/queen-coordinator-GI7GNVDM.js +2 -0
- package/dist/cli/chunks/{real-embeddings-GI7CRHE2.js → real-embeddings-DN2MEJVM.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-BS3XWJJI.js → roocode-installer-LTAQJWIH.js} +2 -2
- package/dist/cli/chunks/router-YU6MLJBV.js +2 -0
- package/dist/cli/chunks/routing-feedback-D6B2SK5V.js +2 -0
- package/dist/cli/chunks/{routing-handler-XMGRJDHH.js → routing-handler-PSWR2UCT.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-NDL3ONNC.js → ruvector-commands-VTP6Y7PN.js} +2 -2
- package/dist/cli/chunks/{rvf-dual-writer-XAJOYGJ2.js → rvf-dual-writer-EBUMXPRO.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-adapter-WXFRZZ26.js → rvf-migration-adapter-5N7GHMD3.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-coordinator-WFXA2VUQ.js → rvf-migration-coordinator-GQKDBNRR.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-M7ZVRN5Z.js +2 -0
- package/dist/cli/chunks/{rvf-store-integrity-I7PFJZCK.js → rvf-store-integrity-LR3SYGQK.js} +2 -2
- package/dist/cli/chunks/safe-db-3OHTLXG7.js +2 -0
- package/dist/cli/chunks/schedule-H43ADREQ.js +2 -0
- package/dist/cli/chunks/scheduler-CGSXNEPJ.js +2 -0
- package/dist/cli/chunks/{security-H3WY76GF.js → security-YDWLYXYD.js} +3 -3
- package/dist/cli/chunks/{shared-rvf-adapter-GRTJCLW6.js → shared-rvf-adapter-I3HQY7DE.js} +2 -2
- package/dist/cli/chunks/{shared-rvf-dual-writer-46XE5R2B.js → shared-rvf-dual-writer-2UADEA5N.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-V6U5FKVK.js +2 -0
- package/dist/cli/chunks/{status-handler-VUIFMY4F.js → status-handler-QRHI3F4V.js} +2 -2
- package/dist/cli/chunks/{structural-health-I7HC477E.js → structural-health-FWKE63CM.js} +2 -2
- package/dist/cli/chunks/{sync-M6LUV5R4.js → sync-2QRCT5MT.js} +2 -2
- package/dist/cli/chunks/{sync-RO2YGMBF.js → sync-E32MBAOF.js} +2 -2
- package/dist/cli/chunks/{task-handler-BJJTZ7AU.js → task-handler-C7BKMOCL.js} +2 -2
- package/dist/cli/chunks/{task-handlers-B6S4NEN3.js → task-handlers-PADWLLDO.js} +3 -3
- package/dist/cli/chunks/{test-BE7EM6Y6.js → test-KX4UKHSX.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-4ISKEFR6.js → test-scheduling-5WKIWH4H.js} +3 -3
- package/dist/cli/chunks/{token-bootstrap-BOIYBZHW.js → token-bootstrap-6SKOJM3U.js} +2 -2
- package/dist/cli/chunks/{token-usage-6ZZC7RLT.js → token-usage-V6JW55RV.js} +2 -2
- package/dist/cli/chunks/{transformers-55VI4OGW.js → transformers-3UPFBYSB.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-6GRRGB3K.js → tree-sitter-wasm-parser-UCY4S2DU.js} +2 -2
- package/dist/cli/chunks/{types-SXDF7QQT.js → types-XNMNQGET.js} +2 -2
- package/dist/cli/chunks/unified-memory-H2J5BHPY.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-LFGIWMTS.js +2 -0
- package/dist/cli/chunks/unified-persistence-F6W7EXU5.js +2 -0
- package/dist/cli/chunks/{upgrade-PMPB7NGB.js → upgrade-MVTMTOPL.js} +2 -2
- package/dist/cli/chunks/{validate-G37QKKXK.js → validate-OJWR2AGZ.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-6X22J3VD.js → validate-swarm-2RGSF2K2.js} +2 -2
- package/dist/cli/chunks/{vibium-SGBJKHQL.js → vibium-O3ZLAEEZ.js} +2 -2
- package/dist/cli/chunks/visual-security-EHVU32UE.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-S46Y5BUJ.js → web-tree-sitter-6VPASTI4.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-PTYCETNM.js → windsurf-installer-CINHOW3N.js} +2 -2
- package/dist/cli/chunks/{witness-chain-5SCRFT2K.js → witness-chain-2NXW7FT7.js} +2 -2
- package/dist/cli/chunks/witness-chain-BIICGRHC.js +2 -0
- package/dist/cli/chunks/{witness-key-manager-XIAMRVUZ.js → witness-key-manager-ODW4DJWT.js} +2 -2
- package/dist/cli/chunks/{workflow-BPQA2NAI.js → workflow-BFGS2GAU.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-PVTYPYY4.js +2 -0
- package/dist/cli/chunks/{wrappers-IWZZZOAU.js → wrappers-VEVVSVMS.js} +2 -2
- package/dist/cli/commands/platform.d.ts +17 -0
- package/dist/cli/commands/platform.js +91 -41
- package/dist/cli/handlers/init-handler.d.ts +1 -0
- package/dist/cli/handlers/init-handler.js +9 -3
- package/dist/init/codex-installer.d.ts +22 -3
- package/dist/init/codex-installer.js +132 -54
- package/dist/init/codex-skill-manifest.d.ts +43 -0
- package/dist/init/codex-skill-manifest.js +21 -0
- package/dist/init/orchestrator.js +1 -0
- package/dist/init/phases/09-assets.js +10 -1
- package/dist/init/phases/phase-interface.d.ts +2 -0
- package/dist/mcp/bundle.js +2 -2
- package/package.json +5 -1
- package/dist/cli/chunks/adapter-NIUFP6QX.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-DC4DNCPB.js +0 -2
- package/dist/cli/chunks/base-EXD3ULZT.js +0 -2
- package/dist/cli/chunks/browser-workflow-KOMASCB7.js +0 -2
- package/dist/cli/chunks/chunk-T5L65R23.js +0 -2
- package/dist/cli/chunks/client-ZJQMJO5N.js +0 -2
- package/dist/cli/chunks/codex-installer-HVSZBHH2.js +0 -10
- package/dist/cli/chunks/core-handlers-U2YJLH6O.js +0 -2
- package/dist/cli/chunks/cross-domain-router-E7EMKZEK.js +0 -2
- package/dist/cli/chunks/dream-ZMNQYBJO.js +0 -2
- package/dist/cli/chunks/heartbeat-scheduler-2JL4MAJR.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-AZD6O35G.js +0 -2
- package/dist/cli/chunks/hnsw-index-WJLE4S5L.js +0 -2
- package/dist/cli/chunks/hybrid-router-YTKJBAS2.js +0 -2
- package/dist/cli/chunks/impact-analyzer-CX56GZXA.js +0 -2
- package/dist/cli/chunks/init-wizard-WE6HIC66.js +0 -2
- package/dist/cli/chunks/kernel-MT55LNNI.js +0 -2
- package/dist/cli/chunks/knowledge-graph-WN3LQ2W7.js +0 -2
- package/dist/cli/chunks/llm-router-service-NKHEQQMN.js +0 -2
- package/dist/cli/chunks/load-test-3WIQASDF.js +0 -2
- package/dist/cli/chunks/memory-backend-W6YSNT6O.js +0 -2
- package/dist/cli/chunks/pattern-null-store-IV3ZESTR.js +0 -2
- package/dist/cli/chunks/platform-FA5TOPTH.js +0 -2
- package/dist/cli/chunks/protocol-executor-GFAG5G6K.js +0 -2
- package/dist/cli/chunks/provider-manager-TIVIJIYH.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-BYE7YF6Y.js +0 -2
- package/dist/cli/chunks/queen-coordinator-WOHYVV7A.js +0 -2
- package/dist/cli/chunks/router-VUW2UVCN.js +0 -2
- package/dist/cli/chunks/routing-feedback-WSUQMZAK.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-RHZCXVN6.js +0 -2
- package/dist/cli/chunks/safe-db-NTWEW7ZM.js +0 -2
- package/dist/cli/chunks/schedule-WEVC2GW2.js +0 -2
- package/dist/cli/chunks/scheduler-XHI5AJIS.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-QZUPKMHP.js +0 -2
- package/dist/cli/chunks/unified-memory-QKWUSEBV.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-Z2UQZRTK.js +0 -2
- package/dist/cli/chunks/unified-persistence-AVK2NSMI.js +0 -2
- package/dist/cli/chunks/visual-security-64UFH23G.js +0 -2
- package/dist/cli/chunks/witness-chain-ZIVSDX6C.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-TYP4MI2V.js +0 -2
- package/dist/cli/commands/init.d.ts +0 -19
- package/dist/cli/commands/init.js +0 -318
|
@@ -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.13.
|
|
2
|
-
import{a as c,c as f}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.13.4");process.exit(0)}
|
|
2
|
+
import{a as c,c as f}from"./chunk-KDICUKYX.js";import"./chunk-GGZB2ZBB.js";f();import{Command as $}from"commander";import r from"chalk";function x(v,g,p){let m=new $("arena").description("Competitive test-strategy tournaments (ADR-104)").addHelpText("after",`
|
|
3
3
|
Examples:
|
|
4
4
|
# Run a 4-strategy tournament against the demo fixture (reproducible under --seed)
|
|
5
5
|
aqe arena run --strategies 4 --target fixtures/arena-demo --seed 42
|
|
@@ -9,10 +9,10 @@ Examples:
|
|
|
9
9
|
|
|
10
10
|
# List persisted runs
|
|
11
11
|
aqe arena list
|
|
12
|
-
`);return m.command("run").description("Run a seeded strategy tournament against an arena fixture").requiredOption("--target <dir>","Arena fixture directory (src/*.mjs + tests/*.test.mjs)").option("--strategies <n>","Number of strategies","4").option("--seed <n>","RNG seed (same seed = same tournament)","42").option("--max-mutants <n>","Mutant sample cap","24").option("--evolve <steps>","Hill-climb steps from the winner","0").option("--json","Output the full arena-result@1 envelope as JSON").action(async a=>{try{let{runArena:i}=await import("./arena-
|
|
12
|
+
`);return m.command("run").description("Run a seeded strategy tournament against an arena fixture").requiredOption("--target <dir>","Arena fixture directory (src/*.mjs + tests/*.test.mjs)").option("--strategies <n>","Number of strategies","4").option("--seed <n>","RNG seed (same seed = same tournament)","42").option("--max-mutants <n>","Mutant sample cap","24").option("--evolve <steps>","Hill-climb steps from the winner","0").option("--json","Output the full arena-result@1 envelope as JSON").action(async a=>{try{let{runArena:i}=await import("./arena-KMKBGSMY.js"),t=i({target:a.target,strategies:parseInt(a.strategies,10),seed:parseInt(a.seed,10),maxMutants:parseInt(a.maxMutants,10),evolveSteps:parseInt(a.evolve,10),log:a.json?()=>{}:e=>console.error(r.dim(` ${e}`))});try{let{getUnifiedMemory:e}=await import("./unified-memory-H2J5BHPY.js"),s=e();s.isInitialized()||await s.initialize(),s.getDatabase().prepare("INSERT OR REPLACE INTO kv_store (namespace, key, value) VALUES ('arena', ?, ?)").run(`run:${t.seed}:${t.target}`,JSON.stringify(t))}catch(e){console.error(r.dim(` note: run not persisted (${c(e)})`))}if(a.json){console.log(JSON.stringify(t,null,2));return}let d=new Map(t.strategies.map(e=>[e.id,e]));console.log(r.blue(`
|
|
13
13
|
Arena: ${t.target} \xB7 seed ${t.seed} \xB7 ${t.mutantsTotal} mutants
|
|
14
14
|
`)),console.log(" rank id kill-rate coverage cost fitness groups"),t.ranking.forEach((e,s)=>{let n=d.get(e),u=n.coveragePct===null?" n/a":`${n.coveragePct.toFixed(2)}%`.padStart(7);console.log(` ${String(s+1).padEnd(5)}${n.id.padEnd(5)}${(n.killRate*100).toFixed(1).padStart(6)}% ${u} ${n.suiteCostRatio.toFixed(2).padEnd(6)}${n.fitness.toFixed(4).padEnd(9)}${n.name}`+(n.baselinePassed?"":r.red(" [baseline FAILED]")))}),console.log(`
|
|
15
15
|
competitive array (row beats column = 1):`);let o=t.strategies.map(e=>e.id);if(console.log(` ${o.map(e=>e.padEnd(4)).join("")}`),t.competitiveArray.forEach((e,s)=>{console.log(` ${o[s].padEnd(4)}${e.map(n=>String(n).padStart(2).padEnd(4)).join("")}`)}),t.evolution.length>0){console.log(`
|
|
16
16
|
evolution:`);for(let e of t.evolution)console.log(` step ${e.step}: [${e.groups.join("+")}] fitness ${e.fitness.toFixed(4)} ${e.accepted?r.green("accepted"):"rejected"}`)}let l=d.get(t.ranking[0]);console.log(r.green(`
|
|
17
17
|
winner: ${l.id} [${l.name}] \u2014 kill ${(l.killRate*100).toFixed(1)}%, fitness ${l.fitness.toFixed(4)}
|
|
18
|
-
`))}catch(i){console.error(r.red(` \u2717 ${c(i)}`)),await g(1)}}),m.command("list").description("List persisted arena runs").option("--json","Output as JSON").action(async a=>{if(await p())try{let{getUnifiedMemory:i}=await import("./unified-memory-
|
|
18
|
+
`))}catch(i){console.error(r.red(` \u2717 ${c(i)}`)),await g(1)}}),m.command("list").description("List persisted arena runs").option("--json","Output as JSON").action(async a=>{if(await p())try{let{getUnifiedMemory:i}=await import("./unified-memory-H2J5BHPY.js"),t=i();t.isInitialized()||await t.initialize();let d=t.getDatabase().prepare("SELECT key, value FROM kv_store WHERE namespace = 'arena' ORDER BY key").all();if(a.json){console.log(JSON.stringify(d.map(o=>({key:o.key,result:JSON.parse(o.value)})),null,2));return}if(d.length===0){console.log(r.yellow(" no persisted arena runs"));return}for(let o of d){let l=JSON.parse(o.value),e=l.strategies.find(s=>s.id===l.ranking[0]);console.log(` ${r.green(o.key)} \u2014 winner ${e?.id} [${e?.name}] fitness ${e?.fitness}`)}}catch(i){console.error(r.red(` \u2717 ${c(i)}`)),await g(1)}}),m}export{x as createArenaCommand};
|
|
@@ -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.13.
|
|
2
|
-
import{d as f,e as g,f as m,g as y}from"./chunk-
|
|
3
|
-
`)}function V(){try{let n=l(),i=b.join(n,".agentic-qe","memory.db");if(!p(i))return null;let e=(w(),v(E)),t=new e(i),r=f(t),s=m(r);return t.close(),s}catch{return null}}async function O(n){let i=y(),t=(V()??g()).verifyChain(),r={featureEnabled:i,chainLength:t.length,integrity:t.valid,brokenAt:t.brokenAt,lastHash:t.lastHash,message:t.message};return n.format==="json"?console.log(JSON.stringify(r,null,2)):console.log(C(t,i)),r}async function j(n){let{WitnessChain:i,hashWith:e,serializeEntry:t}=await import("./witness-chain-
|
|
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.13.4");process.exit(0)}
|
|
2
|
+
import{d as f,e as g,f as m,g as y}from"./chunk-OF7674H5.js";import{m as L}from"./chunk-ZAT65V6I.js";import"./chunk-XTHRSBMJ.js";import"./chunk-TO7FTPRV.js";import"./chunk-QGH54HTH.js";import"./chunk-E7FCVH32.js";import{b as l}from"./chunk-27REOPQK.js";import"./chunk-HN2DD2DQ.js";import"./chunk-KDICUKYX.js";import"./chunk-QXF6EQFP.js";import{p as E,q as w}from"./chunk-OR2RC7ZH.js";import"./chunk-PI55PHUL.js";import"./chunk-GOHWEQEP.js";import"./chunk-SJ26ZR75.js";import"./chunk-DQ247474.js";import"./chunk-HGBVGEUE.js";import"./chunk-YZGA4ELM.js";import"./chunk-ERKYIV25.js";import{g as v}from"./chunk-GGZB2ZBB.js";import{Command as x}from"commander";import c from"chalk";L();import{existsSync as p}from"node:fs";import b from"node:path";function C(n,i){let e=[];e.push(c.bold("Witness Chain Audit Verification")),e.push("");let t=i?c.green("ENABLED"):c.yellow("DISABLED");e.push(` Feature Flag: ${t}`),e.push(` Chain Length: ${n.length} receipts`);let r=n.valid?c.green("VALID"):c.red("BROKEN");return e.push(` Integrity: ${r}`),n.length>0&&e.push(` Last Hash: ${n.lastHash.slice(0,16)}...`),!n.valid&&n.brokenAt>=0&&(e.push(""),e.push(c.red(` Break detected at index ${n.brokenAt}`)),e.push(c.red(` ${n.message}`))),e.push(""),e.join(`
|
|
3
|
+
`)}function V(){try{let n=l(),i=b.join(n,".agentic-qe","memory.db");if(!p(i))return null;let e=(w(),v(E)),t=new e(i),r=f(t),s=m(r);return t.close(),s}catch{return null}}async function O(n){let i=y(),t=(V()??g()).verifyChain(),r={featureEnabled:i,chainLength:t.length,integrity:t.valid,brokenAt:t.brokenAt,lastHash:t.lastHash,message:t.message};return n.format==="json"?console.log(JSON.stringify(r,null,2)):console.log(C(t,i)),r}async function j(n){let{WitnessChain:i,hashWith:e,serializeEntry:t}=await import("./witness-chain-BIICGRHC.js"),r=l(),s=b.join(r,".agentic-qe","memory.db"),a;if(!p(s))a={featureEnabled:!0,chainLength:0,integrity:!0,brokenAt:-1,lastHash:"",message:`No database found at ${s} \u2014 nothing to verify`};else{let{default:A}=await import("./better-sqlite3-FXJFG2WH.js"),h=new A(s,{readonly:!0});try{let d=new i(h);await d.initialize();let o=d.verify({includeArchive:!0,checkSignatures:!0}),u=h.prepare("SELECT * FROM witness_chain ORDER BY id DESC LIMIT 1").get(),k=u?e(u.hash_algo||"sha256",t(u)):"";a={featureEnabled:!0,chainLength:o.entriesChecked,integrity:o.valid,brokenAt:o.brokenAt??-1,lastHash:k,message:o.valid?`Audit chain verified: ${o.entriesChecked} entries checked, ${o.signatureFailures??0} signature failures`:`Audit chain BROKEN at id=${o.brokenAt} (${o.entriesChecked} entries checked before the break)`}}finally{h.close()}}return n.format==="json"?console.log(JSON.stringify(a,null,2)):console.log(C({valid:a.integrity,length:a.chainLength,brokenAt:a.brokenAt,lastHash:a.lastHash,message:a.message},a.featureEnabled)),a}function R(n,i,e){let t=new x("audit").description("Witness chain audit trail management");return t.command("verify").description("Verify witness chain integrity").option("-F, --format <format>","Output format (json|text)","text").option("-C, --chain <chain>","Which chain to verify: governance (29 decision receipts) or audit (full QE audit trail)","governance").action(async r=>{try{let s=r.format,a=r.chain==="audit"?await j({format:s}):await O({format:s});await i(a.integrity?0:1)}catch(s){console.error("Failed to verify witness chain:",s),await i(1)}}),t}export{R as createAuditCommand,C as formatVerificationText,j as handleAuditChainVerify,O 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.13.4");process.exit(0)}
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l}from"./chunk-NQJLUY2K.js";import"./chunk-6VNUASTQ.js";import"./chunk-ZAT65V6I.js";import"./chunk-XTHRSBMJ.js";import"./chunk-TO7FTPRV.js";import"./chunk-QGH54HTH.js";import"./chunk-E7FCVH32.js";import"./chunk-27REOPQK.js";import"./chunk-HN2DD2DQ.js";import"./chunk-KDICUKYX.js";import"./chunk-C75V5PTW.js";import"./chunk-TCYSMSBO.js";import"./chunk-QXF6EQFP.js";import"./chunk-OR2RC7ZH.js";import"./chunk-PI55PHUL.js";import"./chunk-GOHWEQEP.js";import"./chunk-SJ26ZR75.js";import"./chunk-DQ247474.js";import"./chunk-HGBVGEUE.js";import"./chunk-YZGA4ELM.js";import"./chunk-ERKYIV25.js";import"./chunk-GGZB2ZBB.js";export{l as MCPToolBase,k as defaultToolLogger,j as getKernel,i as getLLMRouter,e as getMemoryBackend,g as getSharedLLMRouter,c as getSharedMemoryBackend,a as isMemoryOnlyMode,b as registerRvfResetFn,h as resetSharedLLMRouter,d as resetSharedMemoryBackend,f as setSharedLLMRouter};
|
|
@@ -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.13.
|
|
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.13.4");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-OR2RC7ZH.js";import"./chunk-GGZB2ZBB.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.13.
|
|
2
|
-
import{a as N,b as P,c as j,d as S,e as Y,f as T,g as V,h as C,i as J,j as Z,k as U,l as he,m as M,n as ee,o as we,p as _,q as W,r as z,s as H}from"./chunk-IH47VGC7.js";import{h as be}from"./chunk-64C4SS66.js";import{b as ye}from"./chunk-SAMAYDVS.js";import"./chunk-DPJLA7JW.js";import"./chunk-CW7BWFFF.js";import"./chunk-WHUQDBV7.js";import"./chunk-T5L65R23.js";import"./chunk-66KIIH6V.js";import"./chunk-NIA6VTIH.js";import{b as x,d as X}from"./chunk-2G2XD6EM.js";import{a as ue,b as pe,c as ge,d as k,f as Ke}from"./chunk-PHGOMAIS.js";import"./chunk-XRF5MX4Q.js";import{a as A,b as He}from"./chunk-2BYRQ5MV.js";import"./chunk-P5CQMDFQ.js";import"./chunk-V6W4IHS5.js";import"./chunk-AJ45QR3K.js";import"./chunk-UX434RY5.js";import"./chunk-PHBGMXTR.js";import"./chunk-H4XZOIV6.js";import"./chunk-GTURQ454.js";import"./chunk-AXXFY7PX.js";import"./chunk-62F5M5OO.js";import B from"path";import o from"chalk";He();X();import{existsSync as K,mkdirSync as Ge,writeFileSync as Qe,readFileSync as ne}from"fs";import{join as E,resolve as te}from"path";var Xe={rl_q_values:"includeQValues",dream_insights:"includeDreamInsights",dream_cycles:"includeDreamInsights",witness_chain:"includeWitnessChain",vectors:"includeVectors"};function Ye(e,n){let r=Xe[e.tableName];return!(r&&n[r]===!1)}var Ze=1e4;function en(e,n,r,t){if(!Ye(n,r))return ee(E(t,n.fileName),[]),{count:0,rows:[]};let[a,i]=n.domainColumn?M(r.domains,n.domainColumn):[void 0,[]];if(Z(e,n.tableName,a,i)>=Ze){let l=n.blobColumns,f=l&&l.length>0?y=>T(y,l):void 0;return{count:we(E(t,n.fileName),he(e,n.tableName,a,i),f)}}let s=U(e,n.tableName,a,i);return n.blobColumns&&n.blobColumns.length>0&&(s=s.map(l=>T(l,n.blobColumns))),ee(E(t,n.fileName),s),{count:s.length,rows:s}}function ve(e){let n=[];for(let r of S){let t=E(e,r.fileName);K(t)?n.push(C(ne(t,"utf-8"))):n.push(C(""))}return C(n.join(":"))}function Re(e,n,r="memory.db"){let t=te(n.outputPath);K(t)||Ge(t,{recursive:!0});let a=0,i={},d=new Set;for(let u of S){let y=en(e,u,n,t);if(i[u.tableName]=y.count,a+=y.count,u.tableName==="qe_patterns"){if(y.rows)for(let c of y.rows)c.qe_domain&&d.add(c.qe_domain);else if(y.count>0){let[c,w]=u.domainColumn?M(n.domains,u.domainColumn):[void 0,[]],p=`SELECT DISTINCT qe_domain FROM qe_patterns ${c?`WHERE ${c} AND qe_domain IS NOT NULL`:"WHERE qe_domain IS NOT NULL"}`;try{let g=e.prepare(p).all(...w||[]);for(let v of g)d.add(v.qe_domain)}catch{}}}}let s=n.includeVectors!==!1?Z(e,"vectors"):0,l=ve(t),f={version:"3.0",exportedAt:new Date().toISOString(),sourceDb:r,stats:{patternCount:i.qe_patterns||0,vectorCount:s,qValueCount:i.rl_q_values||0,dreamInsightCount:i.dream_insights||0,witnessChainLength:i.witness_chain||0,totalRecords:a},domains:[...d].sort(),checksum:l,tableRecordCounts:i};return Qe(E(t,"manifest.json"),JSON.stringify(f,null,2),"utf-8"),f}var nn=new Set(["qe_patterns","rl_q_values","dream_insights","witness_chain"]);function tn(e){return e==="1.0"?S.filter(n=>nn.has(n.tableName)):e==="3.0"?S:(console.warn(`[brain-import] Unknown manifest version '${e}'. Attempting full import \u2014 some files may be missing.`),S)}function Se(e,n,r){let t=te(n),a=E(t,"manifest.json");if(!K(a))throw new Error(`Manifest not found at ${a}`);let i=x(ne(a,"utf-8")),d=ve(t);if(d!==i.checksum)throw new Error(`Checksum mismatch: expected ${i.checksum}, got ${d}. The export may have been tampered with or corrupted.`);let s=tn(i.version);if(r.dryRun){let c=0;for(let w of s){let m=_(E(t,w.fileName),x);c+=m.length}return{imported:c,skipped:0,conflicts:0}}H(e);let l=0,f=0,u=0;return e.transaction(()=>{for(let c of s){let w=E(t,c.fileName),m=_(w,x);c.blobColumns&&c.blobColumns.length>0&&(m=m.map(p=>V(p,c.blobColumns)));for(let p of m){let g;if(c.dedupColumns&&c.dedupColumns.length>0)g=z(e,c.tableName,p,c.dedupColumns);else{let v=N[c.tableName]||"id",h=j[c.tableName],I=P[c.tableName];g=W(e,c.tableName,p,v,r.mergeStrategy,h,I)}l+=g.imported,f+=g.skipped,u+=g.conflicts}}})(),{imported:l,skipped:f,conflicts:u}}function xe(e){let n=te(e),r=E(n,"manifest.json");if(!K(r))throw new Error(`Manifest not found at ${r}`);return x(ne(r,"utf-8"))}Ke();import{existsSync as q,readdirSync as rn,renameSync as on,statSync as an,unlinkSync as re,writeFileSync as sn}from"fs";import{basename as ln,dirname as dn,join as cn,resolve as oe}from"path";var Ee=["",".idmap.json",".manifest.json"],fn=[...Ee,".lock"];function Ce(e){for(let n of fn)try{let r=`${e}${n}`;q(r)&&re(r)}catch{}}function mn(e){let n=dn(e),r=`${ln(e)}.tmp.`,t;try{t=rn(n)}catch{return}for(let a of t){if(!a.startsWith(r))continue;let i=Number.parseInt(a.slice(r.length).split(".")[0],10);if(!(!Number.isInteger(i)||i<=0)&&!(i!==process.pid&&un(i)))try{re(cn(n,a))}catch{}}}function un(e){try{return process.kill(e,0),!0}catch(n){return n.code==="EPERM"}}function Be(e,n,r="memory.db"){if(!k())throw new Error("@ruvector/rvf-node is not available. Install it or use --format jsonl instead.");let t=oe(n.outputPath),a=n.dimension??384,i=`${t}.tmp.${process.pid}`;mn(t),Ce(i);let d=ue(i,a),s=!1;try{let l={},f=new Set,u=0;for(let R of S){let[b,O]=R.domainColumn?M(n.domains,R.domainColumn):[void 0,[]],$=U(e,R.tableName,b,O);if(R.tableName==="qe_patterns")for(let L of $)L.qe_domain&&f.add(L.qe_domain);let Q=Y[R.tableName];Q&&Q.length>0&&($=$.map(L=>T(L,Q))),l[R.tableName]=$,u+=$.length}let y=0,c=[];if(J(e,"qe_pattern_embeddings")){let R=e.prepare("SELECT pattern_id, embedding, dimension FROM qe_pattern_embeddings").all();for(let b of R)b.embedding&&b.dimension===a&&c.push({id:`pe:${b.pattern_id}`,vector:new Float32Array(b.embedding.buffer,b.embedding.byteOffset,a),metadata:{tableName:"qe_pattern_embeddings"}})}if(J(e,"captured_experiences")){let R=e.prepare("SELECT id, embedding, embedding_dimension, domain, quality FROM captured_experiences WHERE embedding IS NOT NULL").all();for(let b of R)b.embedding_dimension===a&&c.push({id:`exp:${b.id}`,vector:new Float32Array(b.embedding.buffer,b.embedding.byteOffset,a),metadata:{tableName:"captured_experiences",domain:b.domain,confidence:b.quality}})}if(J(e,"sona_patterns")){let R=e.prepare("SELECT id, state_embedding, domain, confidence FROM sona_patterns WHERE state_embedding IS NOT NULL").all();for(let b of R)b.state_embedding.byteLength/4===a&&c.push({id:`sona:${b.id}`,vector:new Float32Array(b.state_embedding.buffer,b.state_embedding.byteOffset,a),metadata:{tableName:"sona_patterns",domain:b.domain,confidence:b.confidence}})}c.length>0&&(y=d.ingest(c).accepted);let w={version:"3.0",format:"rvf",exportedAt:new Date().toISOString(),sourceDb:r,domains:[...f].sort(),tables:l},m=JSON.stringify(w),p=C(m),g=Buffer.from(m);d.embedKernel(g);let v=n.sign?d.sign(g)??void 0:void 0,h=v?n.signerKeyId??"default":void 0,I=d.fileId(),F=I?{fileId:I,parentId:d.parentId(),lineageDepth:d.lineageDepth()}:void 0,D=d.status(),me={version:"3.0",format:"rvf",exportedAt:w.exportedAt,sourceDb:r,stats:{patternCount:(l.qe_patterns||[]).length,embeddingCount:y,qValueCount:(l.rl_q_values||[]).length,dreamInsightCount:(l.dream_insights||[]).length,witnessChainLength:(l.witness_chain||[]).length,totalRecords:u},domains:w.domains,checksum:p,rvfStatus:{totalVectors:D.totalVectors,totalSegments:D.totalSegments,fileSizeBytes:D.fileSizeBytes},...v?{signature:v,signerKeyId:h}:{},...F?{lineage:F}:{}};if(v)try{d.freeze()}catch{}sn(`${i}.manifest.json`,JSON.stringify(me,null,2),"utf-8"),d.close(),s=!0;for(let R of[...Ee].reverse()){let b=`${i}${R}`,O=`${t}${R}`;q(b)?on(b,O):q(O)&&re(O)}return me}catch(l){if(!s)try{d.close()}catch{}throw Ce(i),l}}var pn={patterns:"qe_patterns",qValues:"rl_q_values",dreamInsights:"dream_insights",witnessChain:"witness_chain"};function _e(e,n,r){if(!k())throw new Error("@ruvector/rvf-node is not available. Install it or use JSONL format.");let t=oe(n);if(!q(t))throw new Error(`RVF file not found: ${t}`);let a=pe(t);try{let i=a.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 d=a.extractKernel();if(!d||!d.image)throw new Error("No brain data found in RVF file (missing kernel segment)");let s;try{s=JSON.parse(d.image.toString("utf-8"))}catch(m){throw new Error(`Failed to parse brain kernel data as JSON: ${m instanceof Error?m.message:m}`)}if(r.dryRun){let m=0;if(s.tables)for(let p of Object.values(s.tables))m+=p?.length??0;else m=(s.patterns?.length??0)+(s.qValues?.length??0)+(s.dreamInsights?.length??0)+(s.witnessChain?.length??0);return{imported:m,skipped:0,conflicts:0,embeddingsRestored:0}}H(e);let l=0,f=0,u=0,y=0,c={};if(s.tables)Object.assign(c,s.tables);else for(let[m,p]of Object.entries(pn)){let g=s[m];Array.isArray(g)&&(c[p]=g)}if(e.transaction(()=>{for(let m of S){let p=c[m.tableName];if(!p||!Array.isArray(p))continue;let g=Y[m.tableName];if(g&&g.length>0){p=p.map(v=>V(v,g));for(let v of p)for(let h of g)v[h]instanceof Buffer&&y++}for(let v of p){let h;if(m.dedupColumns&&m.dedupColumns.length>0)h=z(e,m.tableName,v,m.dedupColumns);else{let I=N[m.tableName]||"id",F=j[m.tableName],D=P[m.tableName];h=W(e,m.tableName,v,I,r.mergeStrategy,F,D)}l+=h.imported,f+=h.skipped,u+=h.conflicts}}})(),u>0)try{a.compact()}catch{}return{imported:l,skipped:f,conflicts:u,embeddingsRestored:y}}finally{a.close()}}function G(e){if(!k())throw new Error("@ruvector/rvf-node is not available.");let n=oe(e);if(!q(n))throw new Error(`RVF file not found: ${n}`);let r=ge(n);try{let t=r.extractKernel();if(!t||!t.image)throw new Error("No brain data found in RVF file");let a=t.image.toString("utf-8"),i;try{i=JSON.parse(a)}catch(w){throw new Error(`Failed to parse brain kernel data as JSON: ${w instanceof Error?w.message:w}`)}let d=r.status(),s=an(n).size,l=i.tables,f=l?l.qe_patterns?.length??0:i.patterns?.length??0,u=l?l.rl_q_values?.length??0:i.qValues?.length??0,y=l?l.dream_insights?.length??0:i.dreamInsights?.length??0,c=l?l.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:d.totalVectors,qValueCount:u,dreamInsightCount:y,witnessChainLength:c},domains:i.domains??[],checksum:C(a),rvfStatus:{totalVectors:d.totalVectors,totalSegments:d.totalSegments,fileSizeBytes:s}}}finally{r.close()}}function ae(){return k()}X();import{existsSync as se,readFileSync as gn,statSync as yn}from"fs";import{join as ie,resolve as Ie}from"path";function De(e,n,r={}){let t=Ie(e),a=Ie(n),i=Oe(t),d=Oe(a),s=Ae(t,i),l=Ae(a,d),f=i==="jsonl"&&d==="jsonl",u=wn({pathA:t,pathB:a,manifestA:s,manifestB:l,recordLevel:f,tableFilter:r.tableFilter,maxIdsPerBucket:r.maxIdsPerBucket??500}),y=new Set(s.domains),c=new Set(l.domains),w=s.domains.filter(h=>!c.has(h)),m=l.domains.filter(h=>!y.has(h)),p=s.checksum===l.checksum,g=s.version===l.version,v=p&&g&&u.every(h=>h.delta===0&&(h.added?.length??0)===0&&(h.removed?.length??0)===0&&(h.changed?.length??0)===0);return{pathA:t,pathB:a,formatA:i,formatB:d,manifestA:s,manifestB:l,checksumMatch:p,versionMatch:g,identical:v,recordLevel:f,tableDiffs:u,domainsOnlyInA:w,domainsOnlyInB:m}}function Oe(e){if(!se(e))throw new Error(`Path not found: ${e}`);if(e.endsWith(".rvf"))return"rvf";if(yn(e).isFile())throw new Error(`Unsupported brain export: ${e} (expected a .rvf file or a JSONL directory)`);return"jsonl"}function Ae(e,n){return n==="rvf"?hn(e):bn(e)}function bn(e){let n=ie(e,"manifest.json");if(!se(n))throw new Error(`Manifest not found at ${n}`);let r=x(gn(n,"utf-8"));return $e(r,"jsonl")}function hn(e){let n=G(e);return $e(n,"rvf")}function $e(e,n){return{format:n,version:e.version??"unknown",exportedAt:e.exportedAt??"unknown",sourceDb:e.sourceDb??"unknown",checksum:e.checksum??"",totalRecords:e.stats?.totalRecords??0,domains:e.domains??[],tableRecordCounts:e.tableRecordCounts??{}}}function wn(e){let n=e.tableFilter?S.filter(t=>t.tableName===e.tableFilter):S;if(e.tableFilter&&n.length===0)throw new Error(`Unknown table: ${e.tableFilter}`);let r=[];for(let t of n){let a=e.manifestA.tableRecordCounts[t.tableName]??0,i=e.manifestB.tableRecordCounts[t.tableName]??0,d=i-a,s,l,f;if(e.recordLevel&&vn(t)){let u=Rn(ie(e.pathA,t.fileName),ie(e.pathB,t.fileName),t,e.maxIdsPerBucket);s=u.added,l=u.removed,f=u.changed}r.push({tableName:t.tableName,countA:a,countB:i,delta:d,...s!==void 0?{added:s}:{},...l!==void 0?{removed:l}:{},...f!==void 0?{changed:f}:{}})}return r}function vn(e){return!0}function Rn(e,n,r,t){let a=Ne(e,r),i=Ne(n,r),d=[],s=[],l=[];for(let[f,u]of a){let y=i.get(f);if(y===void 0)s.length<t&&s.push(f);else if(y!==u){if(r.dedupColumns&&r.dedupColumns.length>0)continue;l.length<t&&l.push(f)}}for(let f of i.keys())a.has(f)||d.length<t&&d.push(f);return d.sort(),s.sort(),l.sort(),{added:d,removed:s,changed:l}}function Ne(e,n){let r=new Map;if(!se(e))return r;let t=_(e,x);for(let a of t){let i=Sn(a,n);if(i===void 0)continue;let d=xn(a);r.set(i,Cn(d))}return r}function Sn(e,n){if(n.dedupColumns&&n.dedupColumns.length>0){let a=[];for(let i of n.dedupColumns){let d=e[i];if(d==null)return;a.push(String(d))}return a.join("")}let r=N[n.tableName]??"id",t=e[r];if(t!=null)return String(t)}function xn(e){let n=Object.keys(e).sort(),r={};for(let t of n)r[t]=e[t];return JSON.stringify(r)}function Cn(e){return C(e)}X();import{existsSync as le,statSync as En}from"fs";import{join as ke,resolve as Bn}from"path";var _n=20,In="qe_patterns";function Te(e,n={}){let r=Bn(e);Nn(r);let t=n.table??In,a=S.find(g=>g.tableName===t);if(!a)throw new Error(`Unknown table: ${t}`);let i=ke(r,a.fileName);if(!le(i))throw new Error(`Table file not found: ${a.fileName} (expected in ${r}). Was this export generated with --format jsonl?`);let d=_(i,x),s=a.domainColumn,l=Math.max(1,n.limit??_n),f=n.query?n.query.toLowerCase():void 0,u=n.domains&&n.domains.length>0?new Set(n.domains):void 0,y=n.since,c=n.until,w=n.patternType,m=0,p=[];for(let g of d)On(g,{domainColumn:s,domains:u,patternType:w,since:y,until:c,queryLower:f})&&(m++,p.length<l&&p.push(An(g,a.tableName,s)));return{table:t,inputPath:r,totalScanned:d.length,totalMatched:m,limit:l,hits:p,truncated:m>l}}function On(e,n){if(n.domains){if(!n.domainColumn)return!1;let r=e[n.domainColumn];if(typeof r!="string"||!n.domains.has(r))return!1}if(n.patternType!==void 0&&e.pattern_type!==n.patternType)return!1;if(n.since!==void 0||n.until!==void 0){let r=Me(e);if(r===void 0||n.since!==void 0&&r<n.since||n.until!==void 0&&r>n.until)return!1}if(n.queryLower!==void 0){let r=typeof e.name=="string"?e.name.toLowerCase():"",t=typeof e.description=="string"?e.description.toLowerCase():"";if(!r.includes(n.queryLower)&&!t.includes(n.queryLower))return!1}return!0}function Me(e){for(let n of["updated_at","created_at","timestamp"]){let r=e[n];if(typeof r=="string"&&r.length>0)return r}}function An(e,n,r){let t=(typeof e.id=="string"||typeof e.id=="number"?String(e.id):void 0)??`${n}:?`,a={name:typeof e.name=="string"?e.name:void 0,description:typeof e.description=="string"?e.description:void 0,domain:r&&typeof e[r]=="string"?e[r]:void 0,patternType:typeof e.pattern_type=="string"?e.pattern_type:void 0,confidence:typeof e.confidence=="number"?e.confidence:void 0,updatedAt:Me(e)};return{id:t,display:a,row:e}}function Nn(e){if(!le(e))throw new Error(`Path not found: ${e}`);if(En(e).isFile())throw e.endsWith(".rvf")?new Error("Brain search does not support RVF exports. Re-export with --format jsonl, or use `aqe brain info` for RVF summaries."):new Error(`Unsupported brain export: ${e} (expected a JSONL directory)`);let r=ke(e,"manifest.json");if(!le(r))throw new Error(`Manifest not found at ${r}. Is this a brain export directory?`)}function qe(e,n){if(!e.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='qe_patterns'").get())return{created:0,skipped:0};e.exec(`
|
|
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.13.4");process.exit(0)}
|
|
2
|
+
import{a as N,b as P,c as j,d as S,e as Y,f as T,g as V,h as C,i as J,j as Z,k as U,l as he,m as M,n as ee,o as we,p as _,q as W,r as z,s as H}from"./chunk-NAZFAGJ5.js";import{h as be}from"./chunk-EEHEMDNV.js";import{b as ye}from"./chunk-XLP44YGX.js";import"./chunk-ZAT65V6I.js";import"./chunk-XTHRSBMJ.js";import"./chunk-TO7FTPRV.js";import"./chunk-QGH54HTH.js";import"./chunk-E7FCVH32.js";import"./chunk-27REOPQK.js";import{b as x,d as X}from"./chunk-HN2DD2DQ.js";import{a as ue,b as pe,c as ge,d as k,f as Ke}from"./chunk-LEIG3KIG.js";import"./chunk-KDICUKYX.js";import{a as A,b as He}from"./chunk-QXF6EQFP.js";import"./chunk-OR2RC7ZH.js";import"./chunk-PI55PHUL.js";import"./chunk-GOHWEQEP.js";import"./chunk-SJ26ZR75.js";import"./chunk-DQ247474.js";import"./chunk-HGBVGEUE.js";import"./chunk-YZGA4ELM.js";import"./chunk-ERKYIV25.js";import"./chunk-GGZB2ZBB.js";import B from"path";import o from"chalk";He();X();import{existsSync as K,mkdirSync as Ge,writeFileSync as Qe,readFileSync as ne}from"fs";import{join as E,resolve as te}from"path";var Xe={rl_q_values:"includeQValues",dream_insights:"includeDreamInsights",dream_cycles:"includeDreamInsights",witness_chain:"includeWitnessChain",vectors:"includeVectors"};function Ye(e,n){let r=Xe[e.tableName];return!(r&&n[r]===!1)}var Ze=1e4;function en(e,n,r,t){if(!Ye(n,r))return ee(E(t,n.fileName),[]),{count:0,rows:[]};let[a,i]=n.domainColumn?M(r.domains,n.domainColumn):[void 0,[]];if(Z(e,n.tableName,a,i)>=Ze){let l=n.blobColumns,f=l&&l.length>0?y=>T(y,l):void 0;return{count:we(E(t,n.fileName),he(e,n.tableName,a,i),f)}}let s=U(e,n.tableName,a,i);return n.blobColumns&&n.blobColumns.length>0&&(s=s.map(l=>T(l,n.blobColumns))),ee(E(t,n.fileName),s),{count:s.length,rows:s}}function ve(e){let n=[];for(let r of S){let t=E(e,r.fileName);K(t)?n.push(C(ne(t,"utf-8"))):n.push(C(""))}return C(n.join(":"))}function Re(e,n,r="memory.db"){let t=te(n.outputPath);K(t)||Ge(t,{recursive:!0});let a=0,i={},d=new Set;for(let u of S){let y=en(e,u,n,t);if(i[u.tableName]=y.count,a+=y.count,u.tableName==="qe_patterns"){if(y.rows)for(let c of y.rows)c.qe_domain&&d.add(c.qe_domain);else if(y.count>0){let[c,w]=u.domainColumn?M(n.domains,u.domainColumn):[void 0,[]],p=`SELECT DISTINCT qe_domain FROM qe_patterns ${c?`WHERE ${c} AND qe_domain IS NOT NULL`:"WHERE qe_domain IS NOT NULL"}`;try{let g=e.prepare(p).all(...w||[]);for(let v of g)d.add(v.qe_domain)}catch{}}}}let s=n.includeVectors!==!1?Z(e,"vectors"):0,l=ve(t),f={version:"3.0",exportedAt:new Date().toISOString(),sourceDb:r,stats:{patternCount:i.qe_patterns||0,vectorCount:s,qValueCount:i.rl_q_values||0,dreamInsightCount:i.dream_insights||0,witnessChainLength:i.witness_chain||0,totalRecords:a},domains:[...d].sort(),checksum:l,tableRecordCounts:i};return Qe(E(t,"manifest.json"),JSON.stringify(f,null,2),"utf-8"),f}var nn=new Set(["qe_patterns","rl_q_values","dream_insights","witness_chain"]);function tn(e){return e==="1.0"?S.filter(n=>nn.has(n.tableName)):e==="3.0"?S:(console.warn(`[brain-import] Unknown manifest version '${e}'. Attempting full import \u2014 some files may be missing.`),S)}function Se(e,n,r){let t=te(n),a=E(t,"manifest.json");if(!K(a))throw new Error(`Manifest not found at ${a}`);let i=x(ne(a,"utf-8")),d=ve(t);if(d!==i.checksum)throw new Error(`Checksum mismatch: expected ${i.checksum}, got ${d}. The export may have been tampered with or corrupted.`);let s=tn(i.version);if(r.dryRun){let c=0;for(let w of s){let m=_(E(t,w.fileName),x);c+=m.length}return{imported:c,skipped:0,conflicts:0}}H(e);let l=0,f=0,u=0;return e.transaction(()=>{for(let c of s){let w=E(t,c.fileName),m=_(w,x);c.blobColumns&&c.blobColumns.length>0&&(m=m.map(p=>V(p,c.blobColumns)));for(let p of m){let g;if(c.dedupColumns&&c.dedupColumns.length>0)g=z(e,c.tableName,p,c.dedupColumns);else{let v=N[c.tableName]||"id",h=j[c.tableName],I=P[c.tableName];g=W(e,c.tableName,p,v,r.mergeStrategy,h,I)}l+=g.imported,f+=g.skipped,u+=g.conflicts}}})(),{imported:l,skipped:f,conflicts:u}}function xe(e){let n=te(e),r=E(n,"manifest.json");if(!K(r))throw new Error(`Manifest not found at ${r}`);return x(ne(r,"utf-8"))}Ke();import{existsSync as q,readdirSync as rn,renameSync as on,statSync as an,unlinkSync as re,writeFileSync as sn}from"fs";import{basename as ln,dirname as dn,join as cn,resolve as oe}from"path";var Ee=["",".idmap.json",".manifest.json"],fn=[...Ee,".lock"];function Ce(e){for(let n of fn)try{let r=`${e}${n}`;q(r)&&re(r)}catch{}}function mn(e){let n=dn(e),r=`${ln(e)}.tmp.`,t;try{t=rn(n)}catch{return}for(let a of t){if(!a.startsWith(r))continue;let i=Number.parseInt(a.slice(r.length).split(".")[0],10);if(!(!Number.isInteger(i)||i<=0)&&!(i!==process.pid&&un(i)))try{re(cn(n,a))}catch{}}}function un(e){try{return process.kill(e,0),!0}catch(n){return n.code==="EPERM"}}function Be(e,n,r="memory.db"){if(!k())throw new Error("@ruvector/rvf-node is not available. Install it or use --format jsonl instead.");let t=oe(n.outputPath),a=n.dimension??384,i=`${t}.tmp.${process.pid}`;mn(t),Ce(i);let d=ue(i,a),s=!1;try{let l={},f=new Set,u=0;for(let R of S){let[b,O]=R.domainColumn?M(n.domains,R.domainColumn):[void 0,[]],$=U(e,R.tableName,b,O);if(R.tableName==="qe_patterns")for(let L of $)L.qe_domain&&f.add(L.qe_domain);let Q=Y[R.tableName];Q&&Q.length>0&&($=$.map(L=>T(L,Q))),l[R.tableName]=$,u+=$.length}let y=0,c=[];if(J(e,"qe_pattern_embeddings")){let R=e.prepare("SELECT pattern_id, embedding, dimension FROM qe_pattern_embeddings").all();for(let b of R)b.embedding&&b.dimension===a&&c.push({id:`pe:${b.pattern_id}`,vector:new Float32Array(b.embedding.buffer,b.embedding.byteOffset,a),metadata:{tableName:"qe_pattern_embeddings"}})}if(J(e,"captured_experiences")){let R=e.prepare("SELECT id, embedding, embedding_dimension, domain, quality FROM captured_experiences WHERE embedding IS NOT NULL").all();for(let b of R)b.embedding_dimension===a&&c.push({id:`exp:${b.id}`,vector:new Float32Array(b.embedding.buffer,b.embedding.byteOffset,a),metadata:{tableName:"captured_experiences",domain:b.domain,confidence:b.quality}})}if(J(e,"sona_patterns")){let R=e.prepare("SELECT id, state_embedding, domain, confidence FROM sona_patterns WHERE state_embedding IS NOT NULL").all();for(let b of R)b.state_embedding.byteLength/4===a&&c.push({id:`sona:${b.id}`,vector:new Float32Array(b.state_embedding.buffer,b.state_embedding.byteOffset,a),metadata:{tableName:"sona_patterns",domain:b.domain,confidence:b.confidence}})}c.length>0&&(y=d.ingest(c).accepted);let w={version:"3.0",format:"rvf",exportedAt:new Date().toISOString(),sourceDb:r,domains:[...f].sort(),tables:l},m=JSON.stringify(w),p=C(m),g=Buffer.from(m);d.embedKernel(g);let v=n.sign?d.sign(g)??void 0:void 0,h=v?n.signerKeyId??"default":void 0,I=d.fileId(),F=I?{fileId:I,parentId:d.parentId(),lineageDepth:d.lineageDepth()}:void 0,D=d.status(),me={version:"3.0",format:"rvf",exportedAt:w.exportedAt,sourceDb:r,stats:{patternCount:(l.qe_patterns||[]).length,embeddingCount:y,qValueCount:(l.rl_q_values||[]).length,dreamInsightCount:(l.dream_insights||[]).length,witnessChainLength:(l.witness_chain||[]).length,totalRecords:u},domains:w.domains,checksum:p,rvfStatus:{totalVectors:D.totalVectors,totalSegments:D.totalSegments,fileSizeBytes:D.fileSizeBytes},...v?{signature:v,signerKeyId:h}:{},...F?{lineage:F}:{}};if(v)try{d.freeze()}catch{}sn(`${i}.manifest.json`,JSON.stringify(me,null,2),"utf-8"),d.close(),s=!0;for(let R of[...Ee].reverse()){let b=`${i}${R}`,O=`${t}${R}`;q(b)?on(b,O):q(O)&&re(O)}return me}catch(l){if(!s)try{d.close()}catch{}throw Ce(i),l}}var pn={patterns:"qe_patterns",qValues:"rl_q_values",dreamInsights:"dream_insights",witnessChain:"witness_chain"};function _e(e,n,r){if(!k())throw new Error("@ruvector/rvf-node is not available. Install it or use JSONL format.");let t=oe(n);if(!q(t))throw new Error(`RVF file not found: ${t}`);let a=pe(t);try{let i=a.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 d=a.extractKernel();if(!d||!d.image)throw new Error("No brain data found in RVF file (missing kernel segment)");let s;try{s=JSON.parse(d.image.toString("utf-8"))}catch(m){throw new Error(`Failed to parse brain kernel data as JSON: ${m instanceof Error?m.message:m}`)}if(r.dryRun){let m=0;if(s.tables)for(let p of Object.values(s.tables))m+=p?.length??0;else m=(s.patterns?.length??0)+(s.qValues?.length??0)+(s.dreamInsights?.length??0)+(s.witnessChain?.length??0);return{imported:m,skipped:0,conflicts:0,embeddingsRestored:0}}H(e);let l=0,f=0,u=0,y=0,c={};if(s.tables)Object.assign(c,s.tables);else for(let[m,p]of Object.entries(pn)){let g=s[m];Array.isArray(g)&&(c[p]=g)}if(e.transaction(()=>{for(let m of S){let p=c[m.tableName];if(!p||!Array.isArray(p))continue;let g=Y[m.tableName];if(g&&g.length>0){p=p.map(v=>V(v,g));for(let v of p)for(let h of g)v[h]instanceof Buffer&&y++}for(let v of p){let h;if(m.dedupColumns&&m.dedupColumns.length>0)h=z(e,m.tableName,v,m.dedupColumns);else{let I=N[m.tableName]||"id",F=j[m.tableName],D=P[m.tableName];h=W(e,m.tableName,v,I,r.mergeStrategy,F,D)}l+=h.imported,f+=h.skipped,u+=h.conflicts}}})(),u>0)try{a.compact()}catch{}return{imported:l,skipped:f,conflicts:u,embeddingsRestored:y}}finally{a.close()}}function G(e){if(!k())throw new Error("@ruvector/rvf-node is not available.");let n=oe(e);if(!q(n))throw new Error(`RVF file not found: ${n}`);let r=ge(n);try{let t=r.extractKernel();if(!t||!t.image)throw new Error("No brain data found in RVF file");let a=t.image.toString("utf-8"),i;try{i=JSON.parse(a)}catch(w){throw new Error(`Failed to parse brain kernel data as JSON: ${w instanceof Error?w.message:w}`)}let d=r.status(),s=an(n).size,l=i.tables,f=l?l.qe_patterns?.length??0:i.patterns?.length??0,u=l?l.rl_q_values?.length??0:i.qValues?.length??0,y=l?l.dream_insights?.length??0:i.dreamInsights?.length??0,c=l?l.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:d.totalVectors,qValueCount:u,dreamInsightCount:y,witnessChainLength:c},domains:i.domains??[],checksum:C(a),rvfStatus:{totalVectors:d.totalVectors,totalSegments:d.totalSegments,fileSizeBytes:s}}}finally{r.close()}}function ae(){return k()}X();import{existsSync as se,readFileSync as gn,statSync as yn}from"fs";import{join as ie,resolve as Ie}from"path";function De(e,n,r={}){let t=Ie(e),a=Ie(n),i=Oe(t),d=Oe(a),s=Ae(t,i),l=Ae(a,d),f=i==="jsonl"&&d==="jsonl",u=wn({pathA:t,pathB:a,manifestA:s,manifestB:l,recordLevel:f,tableFilter:r.tableFilter,maxIdsPerBucket:r.maxIdsPerBucket??500}),y=new Set(s.domains),c=new Set(l.domains),w=s.domains.filter(h=>!c.has(h)),m=l.domains.filter(h=>!y.has(h)),p=s.checksum===l.checksum,g=s.version===l.version,v=p&&g&&u.every(h=>h.delta===0&&(h.added?.length??0)===0&&(h.removed?.length??0)===0&&(h.changed?.length??0)===0);return{pathA:t,pathB:a,formatA:i,formatB:d,manifestA:s,manifestB:l,checksumMatch:p,versionMatch:g,identical:v,recordLevel:f,tableDiffs:u,domainsOnlyInA:w,domainsOnlyInB:m}}function Oe(e){if(!se(e))throw new Error(`Path not found: ${e}`);if(e.endsWith(".rvf"))return"rvf";if(yn(e).isFile())throw new Error(`Unsupported brain export: ${e} (expected a .rvf file or a JSONL directory)`);return"jsonl"}function Ae(e,n){return n==="rvf"?hn(e):bn(e)}function bn(e){let n=ie(e,"manifest.json");if(!se(n))throw new Error(`Manifest not found at ${n}`);let r=x(gn(n,"utf-8"));return $e(r,"jsonl")}function hn(e){let n=G(e);return $e(n,"rvf")}function $e(e,n){return{format:n,version:e.version??"unknown",exportedAt:e.exportedAt??"unknown",sourceDb:e.sourceDb??"unknown",checksum:e.checksum??"",totalRecords:e.stats?.totalRecords??0,domains:e.domains??[],tableRecordCounts:e.tableRecordCounts??{}}}function wn(e){let n=e.tableFilter?S.filter(t=>t.tableName===e.tableFilter):S;if(e.tableFilter&&n.length===0)throw new Error(`Unknown table: ${e.tableFilter}`);let r=[];for(let t of n){let a=e.manifestA.tableRecordCounts[t.tableName]??0,i=e.manifestB.tableRecordCounts[t.tableName]??0,d=i-a,s,l,f;if(e.recordLevel&&vn(t)){let u=Rn(ie(e.pathA,t.fileName),ie(e.pathB,t.fileName),t,e.maxIdsPerBucket);s=u.added,l=u.removed,f=u.changed}r.push({tableName:t.tableName,countA:a,countB:i,delta:d,...s!==void 0?{added:s}:{},...l!==void 0?{removed:l}:{},...f!==void 0?{changed:f}:{}})}return r}function vn(e){return!0}function Rn(e,n,r,t){let a=Ne(e,r),i=Ne(n,r),d=[],s=[],l=[];for(let[f,u]of a){let y=i.get(f);if(y===void 0)s.length<t&&s.push(f);else if(y!==u){if(r.dedupColumns&&r.dedupColumns.length>0)continue;l.length<t&&l.push(f)}}for(let f of i.keys())a.has(f)||d.length<t&&d.push(f);return d.sort(),s.sort(),l.sort(),{added:d,removed:s,changed:l}}function Ne(e,n){let r=new Map;if(!se(e))return r;let t=_(e,x);for(let a of t){let i=Sn(a,n);if(i===void 0)continue;let d=xn(a);r.set(i,Cn(d))}return r}function Sn(e,n){if(n.dedupColumns&&n.dedupColumns.length>0){let a=[];for(let i of n.dedupColumns){let d=e[i];if(d==null)return;a.push(String(d))}return a.join("")}let r=N[n.tableName]??"id",t=e[r];if(t!=null)return String(t)}function xn(e){let n=Object.keys(e).sort(),r={};for(let t of n)r[t]=e[t];return JSON.stringify(r)}function Cn(e){return C(e)}X();import{existsSync as le,statSync as En}from"fs";import{join as ke,resolve as Bn}from"path";var _n=20,In="qe_patterns";function Te(e,n={}){let r=Bn(e);Nn(r);let t=n.table??In,a=S.find(g=>g.tableName===t);if(!a)throw new Error(`Unknown table: ${t}`);let i=ke(r,a.fileName);if(!le(i))throw new Error(`Table file not found: ${a.fileName} (expected in ${r}). Was this export generated with --format jsonl?`);let d=_(i,x),s=a.domainColumn,l=Math.max(1,n.limit??_n),f=n.query?n.query.toLowerCase():void 0,u=n.domains&&n.domains.length>0?new Set(n.domains):void 0,y=n.since,c=n.until,w=n.patternType,m=0,p=[];for(let g of d)On(g,{domainColumn:s,domains:u,patternType:w,since:y,until:c,queryLower:f})&&(m++,p.length<l&&p.push(An(g,a.tableName,s)));return{table:t,inputPath:r,totalScanned:d.length,totalMatched:m,limit:l,hits:p,truncated:m>l}}function On(e,n){if(n.domains){if(!n.domainColumn)return!1;let r=e[n.domainColumn];if(typeof r!="string"||!n.domains.has(r))return!1}if(n.patternType!==void 0&&e.pattern_type!==n.patternType)return!1;if(n.since!==void 0||n.until!==void 0){let r=Me(e);if(r===void 0||n.since!==void 0&&r<n.since||n.until!==void 0&&r>n.until)return!1}if(n.queryLower!==void 0){let r=typeof e.name=="string"?e.name.toLowerCase():"",t=typeof e.description=="string"?e.description.toLowerCase():"";if(!r.includes(n.queryLower)&&!t.includes(n.queryLower))return!1}return!0}function Me(e){for(let n of["updated_at","created_at","timestamp"]){let r=e[n];if(typeof r=="string"&&r.length>0)return r}}function An(e,n,r){let t=(typeof e.id=="string"||typeof e.id=="number"?String(e.id):void 0)??`${n}:?`,a={name:typeof e.name=="string"?e.name:void 0,description:typeof e.description=="string"?e.description:void 0,domain:r&&typeof e[r]=="string"?e[r]:void 0,patternType:typeof e.pattern_type=="string"?e.pattern_type:void 0,confidence:typeof e.confidence=="number"?e.confidence:void 0,updatedAt:Me(e)};return{id:t,display:a,row:e}}function Nn(e){if(!le(e))throw new Error(`Path not found: ${e}`);if(En(e).isFile())throw e.endsWith(".rvf")?new Error("Brain search does not support RVF exports. Re-export with --format jsonl, or use `aqe brain info` for RVF summaries."):new Error(`Unsupported brain export: ${e} (expected a JSONL directory)`);let r=ke(e,"manifest.json");if(!le(r))throw new Error(`Manifest not found at ${r}. Is this a brain export directory?`)}function qe(e,n){if(!e.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='qe_patterns'").get())return{created:0,skipped:0};e.exec(`
|
|
3
3
|
CREATE TEMP TABLE IF NOT EXISTS _covered_patterns (
|
|
4
4
|
pattern_id TEXT PRIMARY KEY
|
|
5
5
|
)
|
|
@@ -74,7 +74,7 @@ Examples:
|
|
|
74
74
|
aqe brain diff ./brain-a ./brain-b --verbose
|
|
75
75
|
aqe brain search -i ./brain-export --query oauth --domain test-generation
|
|
76
76
|
aqe brain search -i ./brain-export --since 2026-03-01 --limit 50 --json
|
|
77
|
-
`}};async function de(e){if(e)return e;let{findProjectRoot:n}=await import("./unified-memory-
|
|
77
|
+
`}};async function de(e){if(e)return e;let{findProjectRoot:n}=await import("./unified-memory-H2J5BHPY.js");return B.join(n(),".agentic-qe","memory.db")}function We(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function $n(e){let n=Number.parseInt(e,10);return!Number.isFinite(n)||n<1?20:n}function kn(e){if(e===void 0)return;let n=Array.isArray(e)?e:[e],r=[];for(let t of n)for(let a of t.split(",")){let i=a.trim();i&&r.push(i)}return r.length>0?r:void 0}function Tn(e,n){console.log(o.blue(`
|
|
78
78
|
Brain Diff
|
|
79
79
|
`)),console.log(` A: ${o.cyan(e.pathA)} (${e.formatA})`),console.log(` B: ${o.cyan(e.pathB)} (${e.formatB})`),console.log(` Versions: ${o.cyan(e.manifestA.version)} \u2192 ${o.cyan(e.manifestB.version)}`+(e.versionMatch?o.gray(" (match)"):o.yellow(" (differ)"))),console.log(` Checksums: ${o.gray(e.manifestA.checksum.slice(0,12))}\u2026 \u2192 ${o.gray(e.manifestB.checksum.slice(0,12))}\u2026`+(e.checksumMatch?o.gray(" (match)"):o.yellow(" (differ)"))),console.log(` Exported: ${o.gray(e.manifestA.exportedAt)} \u2192 ${o.gray(e.manifestB.exportedAt)}`),console.log(` Records: ${o.cyan(e.manifestA.totalRecords)} \u2192 ${o.cyan(e.manifestB.totalRecords)} `+ze(e.manifestB.totalRecords-e.manifestA.totalRecords)),(e.domainsOnlyInA.length>0||e.domainsOnlyInB.length>0)&&(console.log(o.blue(`
|
|
80
80
|
Domains:`)),e.domainsOnlyInA.length>0&&console.log(` Only in A: ${o.yellow(e.domainsOnlyInA.join(", "))}`),e.domainsOnlyInB.length>0&&console.log(` Only in B: ${o.yellow(e.domainsOnlyInB.join(", "))}`)),e.recordLevel||console.log(o.gray(`
|
|
@@ -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.13.
|
|
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.13.4");process.exit(0)}
|
|
2
|
+
import"./chunk-GGZB2ZBB.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.13.
|
|
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.13.4");process.exit(0)}
|
|
2
|
+
import{a as p}from"./chunk-WSQE3VZB.js";import"./chunk-GGZB2ZBB.js";import{readFile as m,readdir as k}from"fs/promises";import{join as c,basename as y,dirname as W}from"path";import{fileURLToPath as v}from"url";import{parse as d}from"yaml";var b=v(import.meta.url),E=W(b),l=class{templatesDir;cache=new Map;constructor(r){this.templatesDir=r||c(E,"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)}},x=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 T(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"],A={"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 _(a){return h[a]}function P(a){return g.includes(a)}function L(){return g.map(a=>{let r=Object.entries(h).find(([e,n])=>n.includes(a))?.[0]||"other";return{name:a,description:A[a],category:r}})}export{h as WORKFLOW_CATEGORIES,A as WORKFLOW_DESCRIPTIONS,g as WORKFLOW_TEMPLATES,l as WorkflowLoader,x as defaultWorkflowLoader,T as evaluateCondition,L as getAllWorkflowTemplates,_ as getWorkflowsByCategory,w as interpolateVariables,P 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.13.4");process.exit(0)}
|
|
2
|
+
import{a}from"./chunk-WUXCL65V.js";import"./chunk-NQJLUY2K.js";import"./chunk-6VNUASTQ.js";import"./chunk-ZAT65V6I.js";import"./chunk-XTHRSBMJ.js";import"./chunk-TO7FTPRV.js";import"./chunk-QGH54HTH.js";import"./chunk-E7FCVH32.js";import"./chunk-27REOPQK.js";import"./chunk-HN2DD2DQ.js";import"./chunk-KDICUKYX.js";import"./chunk-C75V5PTW.js";import"./chunk-TCYSMSBO.js";import"./chunk-QXF6EQFP.js";import"./chunk-OR2RC7ZH.js";import"./chunk-PI55PHUL.js";import"./chunk-GOHWEQEP.js";import"./chunk-SJ26ZR75.js";import"./chunk-DQ247474.js";import"./chunk-HGBVGEUE.js";import"./chunk-YZGA4ELM.js";import"./chunk-ERKYIV25.js";import"./chunk-GGZB2ZBB.js";export{a as BrowserWorkflowTool};
|
|
@@ -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.13.
|
|
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.13.4");process.exit(0)}
|
|
2
|
+
import{a as X}from"./chunk-VOAXVNO5.js";import{a as D,b as _,c as $,d as I}from"./chunk-JDADACZZ.js";import{c as K,d as Y,e as J,f as Z}from"./chunk-RKNKFLCQ.js";import{b as C,f as G,i as U}from"./chunk-WCUXA3NV.js";import{g as R}from"./chunk-EEHEMDNV.js";import{d as H}from"./chunk-XF4F5ZXO.js";import{i as j,m as de}from"./chunk-ZAT65V6I.js";import{a as z}from"./chunk-QGH54HTH.js";import{c as T}from"./chunk-E7FCVH32.js";import{b as k,c as A}from"./chunk-RCRKCMN5.js";import{a as h,b as V,c as W}from"./chunk-KDICUKYX.js";import{S as pe,b as B}from"./chunk-ERKYIV25.js";z();W();var N={enableLearning:!0,enableGuidance:!0,enableRouting:!0,embeddingDimension:384,useONNXEmbeddings:!0,maxRoutingCandidates:10,routingWeights:{similarity:.3,performance:.4,capabilities:.3},coherenceThreshold:.4};var q=[{patternType:"test-template",name:"AAA Unit Test",description:"Arrange-Act-Assert pattern for clear, maintainable unit tests",template:{type:"code",content:`describe('{{className}}', () => {
|
|
3
3
|
describe('{{methodName}}', () => {
|
|
4
4
|
it('should {{expectedBehavior}}', {{async}} () => {
|
|
5
5
|
// Arrange
|
|
@@ -317,4 +317,4 @@ On promotion:
|
|
|
317
317
|
AND agent_id = 'aqe-hook-router'
|
|
318
318
|
AND state_key = ?
|
|
319
319
|
AND action_key = ?
|
|
320
|
-
`);return s=>{try{let a=o.get(e,s);return a?{qValue:a.q_value,visits:a.visits}:void 0}catch{return}}}catch{return()=>{}}}getGuidance(e,r){return D(e)}generateContext(e,r){return I(e,r||{})}checkAntiPatterns(e,r){return $(e,r)}async embed(e){if(this.config.useONNXEmbeddings)try{let{computeRealEmbedding:r}=await import("./real-embeddings-
|
|
320
|
+
`);return s=>{try{let a=o.get(e,s);return a?{qValue:a.q_value,visits:a.visits}:void 0}catch{return}}}catch{return()=>{}}}getGuidance(e,r){return D(e)}generateContext(e,r){return I(e,r||{})}checkAntiPatterns(e,r){return $(e,r)}async embed(e){if(this.config.useONNXEmbeddings)try{let{computeRealEmbedding:r}=await import("./real-embeddings-DN2MEJVM.js"),t=await r(e);return t.length!==this.config.embeddingDimension?oe(t,this.config.embeddingDimension):t}catch(r){let{isUsingEndpoint:t}=await import("./real-embeddings-DN2MEJVM.js");if(t())throw r;process.env.DEBUG&&f.warn("ONNX embeddings unavailable, using hash fallback",{error:h(r)})}return se(e,this.config.embeddingDimension)}async getStats(){this.initialized||await this.initialize();let e=await this.patternStore.getStats(),r={};for(let a of U)r[a]=e.byDomain[a]||0;let t=this.stats.routingRequests,i=this.stats.routingRequests>0?this.stats.totalRoutingConfidence/this.stats.routingRequests:0,o=this.stats.learningOutcomes,s=this.stats.learningOutcomes>0?this.stats.successfulOutcomes/this.stats.learningOutcomes:0;try{let a=this.getSqliteStore().getAggregateOutcomeStats();a.routingRequests>t&&(t=a.routingRequests,i=a.avgRoutingConfidence),a.learningOutcomes>o&&(o=a.learningOutcomes,s=a.learningOutcomes>0?a.successfulOutcomes/a.learningOutcomes:a.avgPatternSuccessRate)}catch{}return{totalPatterns:e.totalPatterns,byDomain:r,routingRequests:t,avgRoutingConfidence:i,learningOutcomes:o,patternSuccessRate:s,patternStoreStats:e}}async dispose(){if(await this.patternStore.dispose(),this.sqliteStore&&(this.sqliteStore.close(),this.sqliteStore=null),this.rvfDualWriter){try{this.rvfDualWriter.close()}catch{}this.rvfDualWriter=null}this.initialized=!1}};function pt(n,e,r,t){return new L(n,e,r,t)}export{N as a,q as b,x as c,ne as d,Q as e,M as f,L as g,pt as h};
|
|
@@ -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.13.
|
|
2
|
-
import{a as f}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.13.4");process.exit(0)}
|
|
2
|
+
import{a as f}from"./chunk-QGH54HTH.js";import{c as p}from"./chunk-E7FCVH32.js";import{a as l,d as b}from"./chunk-GOHWEQEP.js";import{a as d,c as g}from"./chunk-HGBVGEUE.js";f();g();b();var v={dimensions:384,M:16,efConstruction:200,efSearch:100,metric:"cosine",namespace:"coverage-hnsw",maxElements:1e5},S=p.create("coverage-analysis/hnsw-index"),u=class{constructor(e,t={}){this.memory=e;this.config={...v,...t},this.stats={vectorCount:0,searchOperations:0,insertOperations:0}}memory;config;stats;searchLatencies=[];backendType="ruvector-gnn";adapter=null;initialized=!1;metadataStore=new Map;async initialize(){if(this.initialized)return;let e=this.config.metric==="cosine"?"cosine":"euclidean",t=`coverage-${this.config.namespace}`;d.close(t),this.adapter=d.create(t,{dimensions:this.config.dimensions,M:this.config.M,efConstruction:this.config.efConstruction,efSearch:this.config.efSearch,metric:e}),S.info(`HnswAdapter initialized: dimension=${this.config.dimensions}, metric=${this.config.metric}, M=${this.config.M} (unified backend via ADR-071)`),this.initialized=!0}isNativeAvailable(){return this.initialized&&this.adapter!==null}getBackendType(){return this.backendType}isRuvectorAvailable(){return this.initialized&&this.adapter!==null&&this.adapter.isRuvectorAvailable()}async insert(e,t,a){this.initialized||await this.initialize(),t=this.validateVector(t),this.adapter.addByStringId(e,t),a&&this.metadataStore.set(e,a),this.stats.insertOperations++,this.stats.vectorCount=this.adapter.size()}async search(e,t){this.initialized||await this.initialize(),e=this.validateVector(e);let a=performance.now(),n=[];this.adapter.size()>0&&(n=this.adapter.searchByArray(e,t).map(({id:i,score:o})=>({key:i,score:o,distance:1-o,metadata:this.metadataStore.get(i)})));let s=performance.now()-a;return this.recordSearchLatency(s),this.stats.searchOperations++,n}async batchInsert(e){this.initialized||await this.initialize();let t=100;for(let a=0;a<e.length;a+=t){let n=e.slice(a,a+t);await Promise.all(n.map(r=>this.insert(r.key,r.vector,r.metadata)))}}async delete(e){if(!this.adapter)return!1;let t=this.adapter.removeByStringId(e);if(t){this.metadataStore.delete(e);let a=this.buildKey(e);await this.memory.delete(a),this.stats.vectorCount=this.adapter.size()}return t}async getStats(){return{nativeHNSW:this.initialized&&this.adapter!==null,backendType:this.backendType,vectorCount:this.stats.vectorCount,indexSizeBytes:this.stats.vectorCount*this.config.dimensions*4,avgSearchLatencyMs:this.calculateAvgLatency(),p95SearchLatencyMs:this.calculatePercentileLatency(95),p99SearchLatencyMs:this.calculatePercentileLatency(99),searchOperations:this.stats.searchOperations,insertOperations:this.stats.insertOperations}}async clear(){this.metadataStore.clear(),this.adapter&&this.adapter.clear(),this.stats.vectorCount=0,this.searchLatencies=[]}validateVector(e){if(e.length!==this.config.dimensions)return this.resizeVector(e,this.config.dimensions);for(let t=0;t<e.length;t++)if(!Number.isFinite(e[t]))throw new Error(`Invalid vector value at index ${t}: ${e[t]}`);return e}resizeVector(e,t){if(e.length===t)return e;if(e.length>t){let n=new Array(t).fill(0),r=e.length/t;for(let s=0;s<t;s++){let h=Math.floor(s*r),i=Math.floor((s+1)*r),o=0;for(let m=h;m<i;m++)o+=e[m];n[s]=o/(i-h)}return n}let a=new Array(t).fill(0);for(let n=0;n<e.length;n++)a[n]=e[n];return a}buildKey(e){return`${this.config.namespace}:${e}`}recordSearchLatency(e){this.searchLatencies.push(e);let t=1e3;this.searchLatencies.length>t&&(this.searchLatencies=this.searchLatencies.slice(-t))}calculateAvgLatency(){return this.searchLatencies.length===0?0:this.searchLatencies.reduce((t,a)=>t+a,0)/this.searchLatencies.length}calculatePercentileLatency(e){if(this.searchLatencies.length===0)return 0;let t=[...this.searchLatencies].sort((n,r)=>n-r),a=Math.ceil(e/100*t.length)-1;return t[Math.max(0,a)]}setEfSearch(e){this.config.efSearch=e}};function C(c,e){return new u(c,e)}async function H(c,e=1e4,t=1e3){let n=performance.now();for(let i=0;i<e;i++){let o=Array.from({length:384},()=>l());await c.insert(`bench-${i}`,o)}let r=performance.now()-n,s=performance.now();for(let i=0;i<t;i++){let o=Array.from({length:384},()=>l());await c.search(o,10)}let h=performance.now()-s;return{insertTimeMs:r,searchTimeMs:h,avgSearchLatencyMs:h/t,isNative:c.isNativeAvailable(),backendType:c.getBackendType()}}export{v as a,u as b,C as c,H as d};
|
|
@@ -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.13.
|
|
2
|
-
import{c as f}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.13.4");process.exit(0)}
|
|
2
|
+
import{c as f}from"./chunk-GGZB2ZBB.js";import*as o from"fs";import*as n from"path";function u(){t=null}function g(c=process.cwd()){if(t)return t;if(process.env.AQE_PROJECT_ROOT)return t=process.env.AQE_PROJECT_ROOT,t;let l=c,a=n.parse(l).root,e=l,i=null,s=null,r=null;for(;e!==a;)o.existsSync(n.join(e,".agentic-qe"))&&i===null&&(i=e),o.existsSync(n.join(e,".git"))&&s===null&&(s=e),o.existsSync(n.join(e,"package.json"))&&(r=e),e=n.dirname(e);return i?t=i:s?t=s:r?t=r:t=process.cwd(),t}var t,p=f(()=>{"use strict";t=null});export{u as a,g as b,p as c};
|
|
@@ -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.13.
|
|
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.13.4");process.exit(0)}
|
|
2
2
|
var p={"claude-sonnet-4-5":{canonical:"Claude Sonnet 4.5",family:"claude",tier:"standard",providers:{anthropic:"claude-sonnet-4-5-20250929",openrouter:"anthropic/claude-sonnet-4.5",bedrock:"anthropic.claude-sonnet-4-5-v2:0"}},"claude-opus-4":{canonical:"Claude Opus 4",family:"claude",tier:"flagship",providers:{anthropic:"claude-opus-4-20250514",openrouter:"anthropic/claude-opus-4",bedrock:"anthropic.claude-opus-4-v1:0"}},"claude-opus-4-5":{canonical:"Claude Opus 4.5",family:"claude",tier:"flagship",providers:{anthropic:"claude-opus-4-5-20251101",openrouter:"anthropic/claude-opus-4.5",bedrock:"anthropic.claude-opus-4-5-v1:0"}},"claude-haiku-3-5":{canonical:"Claude Haiku 3.5",family:"claude",tier:"economy",providers:{anthropic:"claude-3-5-haiku-20241022",openrouter:"anthropic/claude-3.5-haiku",bedrock:"anthropic.claude-3-5-haiku-v1:0"}},"claude-sonnet-4":{canonical:"Claude Sonnet 4",family:"claude",tier:"standard",providers:{anthropic:"claude-sonnet-4-20250514",openrouter:"anthropic/claude-sonnet-4",bedrock:"anthropic.claude-sonnet-4-v1:0"}},"claude-opus-4-7":{canonical:"Claude Opus 4.7",family:"claude",tier:"flagship",providers:{anthropic:"claude-opus-4-7",openrouter:"anthropic/claude-opus-4.7",bedrock:"anthropic.claude-opus-4-7-v1:0"}},"claude-sonnet-4-6":{canonical:"Claude Sonnet 4.6",family:"claude",tier:"standard",providers:{anthropic:"claude-sonnet-4-6",openrouter:"anthropic/claude-sonnet-4.6",bedrock:"anthropic.claude-sonnet-4-6-v1:0"}},"claude-haiku-4-5":{canonical:"Claude Haiku 4.5",family:"claude",tier:"economy",providers:{anthropic:"claude-haiku-4-5-20251001",openrouter:"anthropic/claude-haiku-4.5",bedrock:"anthropic.claude-haiku-4-5-v1:0"}},"gpt-4o":{canonical:"GPT-4o",family:"gpt",tier:"standard",providers:{openai:"gpt-4o",azure:"gpt-4o",openrouter:"openai/gpt-4o"}},"gpt-4o-mini":{canonical:"GPT-4o Mini",family:"gpt",tier:"economy",providers:{openai:"gpt-4o-mini",azure:"gpt-4o-mini",openrouter:"openai/gpt-4o-mini"}},"gpt-4-turbo":{canonical:"GPT-4 Turbo",family:"gpt",tier:"premium",providers:{openai:"gpt-4-turbo",azure:"gpt-4-turbo",openrouter:"openai/gpt-4-turbo"}},"gpt-4":{canonical:"GPT-4",family:"gpt",tier:"premium",providers:{openai:"gpt-4",azure:"gpt-4",openrouter:"openai/gpt-4"}},o1:{canonical:"OpenAI o1",family:"gpt",tier:"flagship",providers:{openai:"o1",azure:"o1",openrouter:"openai/o1"}},"o1-mini":{canonical:"OpenAI o1 Mini",family:"gpt",tier:"standard",providers:{openai:"o1-mini",azure:"o1-mini",openrouter:"openai/o1-mini"}},"gemini-pro":{canonical:"Gemini Pro",family:"gemini",tier:"standard",providers:{gemini:"gemini-pro",openrouter:"google/gemini-pro"}},"gemini-pro-1.5":{canonical:"Gemini Pro 1.5",family:"gemini",tier:"standard",providers:{gemini:"gemini-1.5-pro",openrouter:"google/gemini-pro-1.5"}},"gemini-flash-1.5":{canonical:"Gemini Flash 1.5",family:"gemini",tier:"economy",providers:{gemini:"gemini-1.5-flash",openrouter:"google/gemini-flash-1.5"}},"gemini-ultra":{canonical:"Gemini Ultra",family:"gemini",tier:"flagship",providers:{gemini:"gemini-ultra",openrouter:"google/gemini-ultra"}},llama3:{canonical:"Llama 3",family:"llama",tier:"economy",providers:{ollama:"llama3",openrouter:"meta-llama/llama-3-8b-instruct"}},"llama3.1":{canonical:"Llama 3.1",family:"llama",tier:"economy",providers:{ollama:"llama3.1",openrouter:"meta-llama/llama-3.1-8b-instruct"}},codellama:{canonical:"CodeLlama",family:"llama",tier:"economy",providers:{ollama:"codellama",openrouter:"meta-llama/codellama-34b-instruct"}},mistral:{canonical:"Mistral",family:"mistral",tier:"economy",providers:{ollama:"mistral",openrouter:"mistralai/mistral-7b-instruct"}},mixtral:{canonical:"Mixtral",family:"mistral",tier:"standard",providers:{ollama:"mixtral",openrouter:"mistralai/mixtral-8x7b-instruct"}},phi3:{canonical:"Phi-3",family:"phi",tier:"economy",providers:{ollama:"phi3",azure:"phi-3-mini-128k-instruct"}},qwen2:{canonical:"Qwen 2",family:"qwen",tier:"economy",providers:{ollama:"qwen2",openrouter:"qwen/qwen-2-7b-instruct"}},"qwen3:8b":{canonical:"Qwen3 8B",family:"qwen",tier:"economy",providers:{ollama:"qwen3:8b"}},"qwen3:30b-a3b":{canonical:"Qwen3 30B-A3B",family:"qwen",tier:"economy",providers:{ollama:"qwen3:30b-a3b"}},"qwen3-coder:30b":{canonical:"Qwen3 Coder 30B-A3B",family:"qwen",tier:"economy",providers:{ollama:"qwen3-coder:30b"}}};function a(){let t=new Map;for(let[e,s]of Object.entries(p)){t.set(e,e),t.set(e.toLowerCase(),e);for(let[r,o]of Object.entries(s.providers))o&&(t.set(o,e),t.set(o.toLowerCase(),e),t.set(`${r}/${o}`,e),t.set(`${r}/${o}`.toLowerCase(),e))}return t}var n=a();function c(t,e){let s=i(t),r=p[s];if(!r)throw new Error(`Unknown model: ${t}`);let o=r.providers[e];if(!o)throw new Error(`Model '${s}' (${r.canonical}) is not available on provider '${e}'`);return o}function i(t){let e=n.get(t);if(e||(e=n.get(t.toLowerCase()),e))return e;let s=[/^anthropic\//i,/^openai\//i,/^google\//i,/^meta-llama\//i,/^mistralai\//i,/^qwen\//i];for(let r of s){let o=t.replace(r,"");if(e=n.get(o),e||(e=n.get(o.toLowerCase()),e))return e}throw new Error(`Unknown model ID: ${t}`)}function u(t){try{let e=i(t);return p[e]}catch{return}}var l={"claude-sonnet-4-5":{name:"Claude Sonnet 4.5",family:"claude",tier:"standard",description:"Most intelligent model, best for complex reasoning and coding tasks",releaseDate:"2025-09-29",recommended:!0,capabilities:{contextLength:2e5,maxOutputTokens:16384,supportsTools:!0,supportsStreaming:!0,supportsVision:!0,supportsJsonMode:!0,supportsSystemPrompt:!0,supportsExtendedThinking:!0,supportsMCP:!0,supportsEmbeddings:!1,supportsCodeExecution:!1},cost:{inputCostPerMillion:3,outputCostPerMillion:15}},"claude-opus-4":{name:"Claude Opus 4",family:"claude",tier:"flagship",description:"Flagship model with exceptional reasoning and reliability",releaseDate:"2025-05-14",recommended:!0,capabilities:{contextLength:2e5,maxOutputTokens:16384,supportsTools:!0,supportsStreaming:!0,supportsVision:!0,supportsJsonMode:!0,supportsSystemPrompt:!0,supportsExtendedThinking:!0,supportsMCP:!0,supportsEmbeddings:!1,supportsCodeExecution:!1},cost:{inputCostPerMillion:15,outputCostPerMillion:75}},"claude-opus-4-5":{name:"Claude Opus 4.5",family:"claude",tier:"flagship",description:"Latest flagship model with enhanced reasoning capabilities",releaseDate:"2025-11-01",recommended:!0,capabilities:{contextLength:2e5,maxOutputTokens:32768,supportsTools:!0,supportsStreaming:!0,supportsVision:!0,supportsJsonMode:!0,supportsSystemPrompt:!0,supportsExtendedThinking:!0,supportsMCP:!0,supportsEmbeddings:!1,supportsCodeExecution:!1},cost:{inputCostPerMillion:15,outputCostPerMillion:75}},"claude-haiku-3-5":{name:"Claude Haiku 3.5",family:"claude",tier:"economy",description:"Fast and cost-effective for routine tasks",releaseDate:"2024-10-22",deprecationDate:"2026-02-19",recommended:!1,capabilities:{contextLength:2e5,maxOutputTokens:8192,supportsTools:!0,supportsStreaming:!0,supportsVision:!0,supportsJsonMode:!0,supportsSystemPrompt:!0,supportsExtendedThinking:!1,supportsMCP:!0,supportsEmbeddings:!1,supportsCodeExecution:!1},cost:{inputCostPerMillion:1,outputCostPerMillion:5}},"claude-sonnet-4":{name:"Claude Sonnet 4",family:"claude",tier:"standard",description:"Balanced model for general-purpose tasks",releaseDate:"2025-05-14",deprecationDate:"2026-06-15",recommended:!1,capabilities:{contextLength:2e5,maxOutputTokens:16384,supportsTools:!0,supportsStreaming:!0,supportsVision:!0,supportsJsonMode:!0,supportsSystemPrompt:!0,supportsExtendedThinking:!0,supportsMCP:!0,supportsEmbeddings:!1,supportsCodeExecution:!1},cost:{inputCostPerMillion:3,outputCostPerMillion:15}},"claude-opus-4-7":{name:"Claude Opus 4.7",family:"claude",tier:"flagship",description:"Flagship agentic-coding model (2026-04-16). 1M context at standard pricing, xhigh effort level, adaptive thinking only. New tokenizer emits 1.0\u20131.35\xD7 more tokens.",releaseDate:"2026-04-16",recommended:!0,capabilities:{contextLength:1e6,maxOutputTokens:128e3,supportsTools:!0,supportsStreaming:!0,supportsVision:!0,supportsJsonMode:!0,supportsSystemPrompt:!0,supportsExtendedThinking:!0,supportsMCP:!0,supportsEmbeddings:!1,supportsCodeExecution:!1,supportsAdaptiveThinking:!0,supportsEffortXHigh:!0,tokenizerVersion:"opus-4-7"},cost:{inputCostPerMillion:5,outputCostPerMillion:25}},"claude-sonnet-4-6":{name:"Claude Sonnet 4.6",family:"claude",tier:"standard",description:"Steady-state agentic-coding workhorse (2026). Standard 200k context, same pricing as Sonnet 4. ADR-093 Tier 3 default for the AQE fleet.",releaseDate:"2026-02-01",recommended:!0,capabilities:{contextLength:2e5,maxOutputTokens:64e3,supportsTools:!0,supportsStreaming:!0,supportsVision:!0,supportsJsonMode:!0,supportsSystemPrompt:!0,supportsExtendedThinking:!0,supportsMCP:!0,supportsEmbeddings:!1,supportsCodeExecution:!1,supportsAdaptiveThinking:!1,supportsEffortXHigh:!1,tokenizerVersion:"legacy"},cost:{inputCostPerMillion:3,outputCostPerMillion:15}},"claude-haiku-4-5":{name:"Claude Haiku 4.5",family:"claude",tier:"economy",description:"Fast economy model replacing Haiku 3.5 (retired 2026-02-19). Extended thinking support.",releaseDate:"2025-10-01",recommended:!0,capabilities:{contextLength:2e5,maxOutputTokens:16384,supportsTools:!0,supportsStreaming:!0,supportsVision:!0,supportsJsonMode:!0,supportsSystemPrompt:!0,supportsExtendedThinking:!0,supportsMCP:!0,supportsEmbeddings:!1,supportsCodeExecution:!1,supportsAdaptiveThinking:!1,supportsEffortXHigh:!1,tokenizerVersion:"legacy"},cost:{inputCostPerMillion:1,outputCostPerMillion:5}},"gpt-4o":{name:"GPT-4o",family:"gpt",tier:"standard",description:"OpenAI flagship multimodal model, fast and capable",releaseDate:"2024-05-13",recommended:!0,capabilities:{contextLength:128e3,maxOutputTokens:16384,supportsTools:!0,supportsStreaming:!0,supportsVision:!0,supportsJsonMode:!0,supportsSystemPrompt:!0,supportsExtendedThinking:!1,supportsMCP:!1,supportsEmbeddings:!1,supportsCodeExecution:!1},cost:{inputCostPerMillion:5,outputCostPerMillion:15,imageCostPerUnit:.00765}},"gpt-4o-mini":{name:"GPT-4o Mini",family:"gpt",tier:"economy",description:"Small, fast, and affordable for lightweight tasks",releaseDate:"2024-07-18",recommended:!0,capabilities:{contextLength:128e3,maxOutputTokens:16384,supportsTools:!0,supportsStreaming:!0,supportsVision:!0,supportsJsonMode:!0,supportsSystemPrompt:!0,supportsExtendedThinking:!1,supportsMCP:!1,supportsEmbeddings:!1,supportsCodeExecution:!1},cost:{inputCostPerMillion:.15,outputCostPerMillion:.6,imageCostPerUnit:.001275}},"gpt-4-turbo":{name:"GPT-4 Turbo",family:"gpt",tier:"premium",description:"Previous flagship with vision and function calling",releaseDate:"2024-04-09",recommended:!1,capabilities:{contextLength:128e3,maxOutputTokens:4096,supportsTools:!0,supportsStreaming:!0,supportsVision:!0,supportsJsonMode:!0,supportsSystemPrompt:!0,supportsExtendedThinking:!1,supportsMCP:!1,supportsEmbeddings:!1,supportsCodeExecution:!1},cost:{inputCostPerMillion:10,outputCostPerMillion:30}},"gpt-4":{name:"GPT-4",family:"gpt",tier:"premium",description:"Original GPT-4 model, now superseded by GPT-4o",releaseDate:"2023-03-14",deprecationDate:"2025-06-01",recommended:!1,capabilities:{contextLength:8192,maxOutputTokens:8192,supportsTools:!0,supportsStreaming:!0,supportsVision:!1,supportsJsonMode:!0,supportsSystemPrompt:!0,supportsExtendedThinking:!1,supportsMCP:!1,supportsEmbeddings:!1,supportsCodeExecution:!1},cost:{inputCostPerMillion:30,outputCostPerMillion:60}},o1:{name:"OpenAI o1",family:"gpt",tier:"flagship",description:"Reasoning-focused model with extended thinking",releaseDate:"2024-12-05",recommended:!0,capabilities:{contextLength:2e5,maxOutputTokens:1e5,supportsTools:!0,supportsStreaming:!0,supportsVision:!0,supportsJsonMode:!0,supportsSystemPrompt:!0,supportsExtendedThinking:!0,supportsMCP:!1,supportsEmbeddings:!1,supportsCodeExecution:!1},cost:{inputCostPerMillion:15,outputCostPerMillion:60}},"o1-mini":{name:"OpenAI o1 Mini",family:"gpt",tier:"standard",description:"Faster reasoning model optimized for STEM tasks",releaseDate:"2024-09-12",recommended:!0,capabilities:{contextLength:128e3,maxOutputTokens:65536,supportsTools:!0,supportsStreaming:!0,supportsVision:!1,supportsJsonMode:!0,supportsSystemPrompt:!0,supportsExtendedThinking:!0,supportsMCP:!1,supportsEmbeddings:!1,supportsCodeExecution:!1},cost:{inputCostPerMillion:3,outputCostPerMillion:12}},"gemini-pro":{name:"Gemini Pro",family:"gemini",tier:"standard",description:"Google balanced model for diverse tasks",releaseDate:"2023-12-06",recommended:!1,capabilities:{contextLength:32e3,maxOutputTokens:8192,supportsTools:!0,supportsStreaming:!0,supportsVision:!1,supportsJsonMode:!0,supportsSystemPrompt:!0,supportsExtendedThinking:!1,supportsMCP:!1,supportsEmbeddings:!1,supportsCodeExecution:!1},cost:{inputCostPerMillion:.5,outputCostPerMillion:1.5}},"gemini-pro-1.5":{name:"Gemini Pro 1.5",family:"gemini",tier:"standard",description:"Google mid-size model with 1M context window",releaseDate:"2024-02-15",recommended:!0,capabilities:{contextLength:1e6,maxOutputTokens:8192,supportsTools:!0,supportsStreaming:!0,supportsVision:!0,supportsJsonMode:!0,supportsSystemPrompt:!0,supportsExtendedThinking:!1,supportsMCP:!1,supportsEmbeddings:!1,supportsCodeExecution:!0},cost:{inputCostPerMillion:3.5,outputCostPerMillion:10.5}},"gemini-flash-1.5":{name:"Gemini Flash 1.5",family:"gemini",tier:"economy",description:"Fast and efficient with 1M context window",releaseDate:"2024-05-14",recommended:!0,capabilities:{contextLength:1e6,maxOutputTokens:8192,supportsTools:!0,supportsStreaming:!0,supportsVision:!0,supportsJsonMode:!0,supportsSystemPrompt:!0,supportsExtendedThinking:!1,supportsMCP:!1,supportsEmbeddings:!1,supportsCodeExecution:!0},cost:{inputCostPerMillion:.075,outputCostPerMillion:.3}},"gemini-ultra":{name:"Gemini Ultra",family:"gemini",tier:"flagship",description:"Google most capable model",releaseDate:"2024-02-08",recommended:!1,capabilities:{contextLength:32e3,maxOutputTokens:8192,supportsTools:!0,supportsStreaming:!0,supportsVision:!0,supportsJsonMode:!0,supportsSystemPrompt:!0,supportsExtendedThinking:!1,supportsMCP:!1,supportsEmbeddings:!1,supportsCodeExecution:!1},cost:{inputCostPerMillion:12,outputCostPerMillion:36}},llama3:{name:"Llama 3",family:"llama",tier:"economy",description:"Meta open-source 8B model, runs locally",releaseDate:"2024-04-18",recommended:!0,capabilities:{contextLength:8192,maxOutputTokens:4096,supportsTools:!1,supportsStreaming:!0,supportsVision:!1,supportsJsonMode:!1,supportsSystemPrompt:!0,supportsExtendedThinking:!1,supportsMCP:!1,supportsEmbeddings:!1,supportsCodeExecution:!1},cost:{inputCostPerMillion:0,outputCostPerMillion:0}},"llama3.1":{name:"Llama 3.1",family:"llama",tier:"economy",description:"Meta latest open-source model with tool support",releaseDate:"2024-07-23",recommended:!0,capabilities:{contextLength:128e3,maxOutputTokens:8192,supportsTools:!0,supportsStreaming:!0,supportsVision:!1,supportsJsonMode:!0,supportsSystemPrompt:!0,supportsExtendedThinking:!1,supportsMCP:!1,supportsEmbeddings:!1,supportsCodeExecution:!1},cost:{inputCostPerMillion:0,outputCostPerMillion:0}},codellama:{name:"CodeLlama",family:"llama",tier:"economy",description:"Meta code-specialized model",releaseDate:"2023-08-24",recommended:!0,capabilities:{contextLength:1e5,maxOutputTokens:4096,supportsTools:!1,supportsStreaming:!0,supportsVision:!1,supportsJsonMode:!1,supportsSystemPrompt:!0,supportsExtendedThinking:!1,supportsMCP:!1,supportsEmbeddings:!1,supportsCodeExecution:!1},cost:{inputCostPerMillion:0,outputCostPerMillion:0}},mistral:{name:"Mistral",family:"mistral",tier:"economy",description:"Mistral AI 7B instruction-tuned model",releaseDate:"2023-09-27",recommended:!0,capabilities:{contextLength:32e3,maxOutputTokens:4096,supportsTools:!1,supportsStreaming:!0,supportsVision:!1,supportsJsonMode:!1,supportsSystemPrompt:!0,supportsExtendedThinking:!1,supportsMCP:!1,supportsEmbeddings:!1,supportsCodeExecution:!1},cost:{inputCostPerMillion:0,outputCostPerMillion:0}},mixtral:{name:"Mixtral",family:"mistral",tier:"standard",description:"Mistral AI mixture of experts model",releaseDate:"2023-12-11",recommended:!0,capabilities:{contextLength:32e3,maxOutputTokens:4096,supportsTools:!0,supportsStreaming:!0,supportsVision:!1,supportsJsonMode:!0,supportsSystemPrompt:!0,supportsExtendedThinking:!1,supportsMCP:!1,supportsEmbeddings:!1,supportsCodeExecution:!1},cost:{inputCostPerMillion:0,outputCostPerMillion:0}},phi3:{name:"Phi-3",family:"phi",tier:"economy",description:"Microsoft small language model, efficient",releaseDate:"2024-04-23",recommended:!0,capabilities:{contextLength:128e3,maxOutputTokens:4096,supportsTools:!1,supportsStreaming:!0,supportsVision:!1,supportsJsonMode:!1,supportsSystemPrompt:!0,supportsExtendedThinking:!1,supportsMCP:!1,supportsEmbeddings:!1,supportsCodeExecution:!1},cost:{inputCostPerMillion:0,outputCostPerMillion:0}},qwen2:{name:"Qwen 2",family:"qwen",tier:"economy",description:"Alibaba multilingual model",releaseDate:"2024-06-07",recommended:!0,capabilities:{contextLength:32e3,maxOutputTokens:4096,supportsTools:!0,supportsStreaming:!0,supportsVision:!1,supportsJsonMode:!0,supportsSystemPrompt:!0,supportsExtendedThinking:!1,supportsMCP:!1,supportsEmbeddings:!1,supportsCodeExecution:!1},cost:{inputCostPerMillion:0,outputCostPerMillion:0}},"qwen3:8b":{name:"Qwen3 8B",family:"qwen",tier:"economy",description:"Alibaba Qwen3 8B \u2014 tools + thinking; below the QE test-gen floor (use for judge/triage)",releaseDate:"2025-04-29",recommended:!1,capabilities:{contextLength:40960,maxOutputTokens:8192,supportsTools:!0,supportsStreaming:!0,supportsVision:!1,supportsJsonMode:!0,supportsSystemPrompt:!0,supportsExtendedThinking:!0,supportsMCP:!1,supportsEmbeddings:!1,supportsCodeExecution:!1},cost:{inputCostPerMillion:0,outputCostPerMillion:0}},"qwen3:30b-a3b":{name:"Qwen3 30B-A3B",family:"qwen",tier:"economy",description:"Alibaba Qwen3 30B MoE (3B active) \u2014 fast general local model; clears the QE test-gen floor",releaseDate:"2025-04-29",recommended:!0,capabilities:{contextLength:262144,maxOutputTokens:8192,supportsTools:!0,supportsStreaming:!0,supportsVision:!1,supportsJsonMode:!0,supportsSystemPrompt:!0,supportsExtendedThinking:!0,supportsMCP:!1,supportsEmbeddings:!1,supportsCodeExecution:!1},cost:{inputCostPerMillion:0,outputCostPerMillion:0}},"qwen3-coder:30b":{name:"Qwen3 Coder 30B-A3B",family:"qwen",tier:"economy",description:"Alibaba Qwen3-Coder 30B MoE (3B active) \u2014 code-tuned, non-thinking; preferred local QE test-gen model",releaseDate:"2025-07-31",recommended:!0,capabilities:{contextLength:262144,maxOutputTokens:8192,supportsTools:!0,supportsStreaming:!0,supportsVision:!1,supportsJsonMode:!0,supportsSystemPrompt:!0,supportsExtendedThinking:!1,supportsMCP:!1,supportsEmbeddings:!1,supportsCodeExecution:!1},cost:{inputCostPerMillion:0,outputCostPerMillion:0}}};function d(t){let e=i(t),s=l[e];if(!s)throw new Error(`Model not found in registry: ${t}`);return{...s.capabilities}}function M(t){try{return d(t).supportsTools}catch{return!0}}var h="claude-opus-4-7";export{c as a,i as b,u as c,d,M as e,h as f};
|
|
@@ -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.13.
|
|
2
|
-
import{p as O,q}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.13.4");process.exit(0)}
|
|
2
|
+
import{p as O,q}from"./chunk-CW7LDLJ2.js";import{i as T,m as U}from"./chunk-ZAT65V6I.js";import{i as b}from"./chunk-C75V5PTW.js";import{b as M,c as H}from"./chunk-HGBVGEUE.js";import{g as C}from"./chunk-GGZB2ZBB.js";U();var _=null;function w(){if(_)return _;let E=(q(),C(O));if(!E.HierarchicalNSW)throw new Error("hnswlib-node module missing HierarchicalNSW export");return _=E.HierarchicalNSW,_}function L(){return!0}var x=class{indexes;config;initialized;nextId;unifiedAdapters=null;useUnified;constructor(e={}){this.config={M:e.M||16,efConstruction:e.efConstruction||200,efSearch:e.efSearch||50,dimension:e.dimension||384,metric:e.metric||"cosine",quantization:e.quantization||"none"},this.indexes=new Map,this.initialized=new Set,this.nextId=new Map,this.useUnified=L(),this.useUnified&&(this.unifiedAdapters=new Map)}initializeIndex(e){if(this.initialized.has(e))return;if(this.useUnified&&this.unifiedAdapters)try{let{HnswAdapter:s}=(H(),C(M)),d=new s(`embedding-${e}`,{dimensions:this.config.dimension,M:this.config.M,efConstruction:this.config.efConstruction,efSearch:this.config.efSearch,metric:this.config.metric==="dotproduct"?"cosine":this.config.metric});this.unifiedAdapters.set(e,d),this.initialized.add(e),this.nextId.set(e,0);return}catch{}let t={cosine:"cosine",euclidean:"l2",dotproduct:"ip"}[this.config.metric]||"cosine",n=w(),r=new n(t,this.config.dimension);r.initIndex({maxElements:1e4,m:this.config.M,efConstruction:this.config.efConstruction}),this.indexes.set(e,r),this.initialized.add(e),this.nextId.set(e,0)}addEmbedding(e,i){let t=e.namespace;this.initialized.has(t)||this.initializeIndex(t);let n=i??this.nextId.get(t);i===void 0&&this.nextId.set(t,n+1);let r=this.unifiedAdapters?.get(t);if(r){let o=e.vector instanceof Float32Array?e.vector:new Float32Array(this.toFloatArray(e.vector));return r.add(n,o),n}let s=this.indexes.get(t),d=this.toFloatArray(e.vector);return s.addPoint(d,n),n}addEmbeddingsBatch(e){return e.map(i=>this.addEmbedding(i.embedding,i.id))}search(e,i={}){let t=i.namespace||e.namespace;if(!this.initialized.has(t))return[];let n=i.limit||10,r=this.unifiedAdapters?.get(t);if(r){let l=e.vector instanceof Float32Array?e.vector:new Float32Array(this.toFloatArray(e.vector));return r.search(l,n).map(u=>({id:u.id,distance:1-u.score}))}let s=this.indexes.get(t),d=this.toFloatArray(e.vector),o=s.searchKnn(d,n);return o.neighbors.map((l,m)=>({id:l,distance:o.distances[m]}))}getIndexStats(e){if(!this.initialized.has(e))return null;let i=this.unifiedAdapters?.get(e);return i?{size:i.size(),maxElements:1e4,dimension:i.dimensions(),metric:this.config.metric}:{size:this.indexes.get(e).getCurrentCount(),maxElements:1e4,dimension:this.config.dimension,metric:this.config.metric}}async saveIndex(e,i){if(!this.initialized.has(e))throw new Error(`Namespace ${e} not initialized`);if(this.unifiedAdapters?.has(e)){console.warn(`[HNSWEmbeddingIndex] saveIndex() is a no-op for namespace '${e}' \u2014 unified HnswAdapter manages persistence internally.`);return}await this.indexes.get(e).writeIndex(i)}async loadIndex(e,i){if(this.useUnified){console.warn(`[HNSWEmbeddingIndex] loadIndex() is a no-op for namespace '${e}' \u2014 unified HnswAdapter manages persistence internally. Initialize via initializeIndex() instead.`);return}let n={cosine:"cosine",euclidean:"l2",dotproduct:"ip"}[this.config.metric]||"cosine",r=w(),s=new r(n,this.config.dimension);await s.readIndex(i),this.indexes.set(e,s),this.initialized.add(e)}clearIndex(e){if(this.initialized.has(e)){let i=this.unifiedAdapters?.get(e);i&&(i.clear?.(),this.unifiedAdapters.delete(e)),this.indexes.delete(e),this.initialized.delete(e),this.nextId.delete(e)}}clearAll(){if(this.unifiedAdapters){for(let e of this.unifiedAdapters.values())e.clear?.();this.unifiedAdapters.clear()}this.indexes.clear(),this.initialized.clear(),this.nextId.clear()}resizeIndex(e,i){this.initialized.has(e)&&(this.clearIndex(e),this.initializeIndex(e))}setEfSearch(e){this.config.efSearch=e}toFloatArray(e){if(Array.isArray(e))return e;if(e instanceof Float32Array)return Array.from(e);if(e instanceof Int8Array){let i=new Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]/128;return i}if(e instanceof Uint8Array){let i=new Array(e.length);for(let t=0;t<e.length;t++)i[t]=(e[t]-128)/128;return i}throw new Error(`Unsupported vector type: ${typeof e}`)}getConfig(){return{...this.config}}isInitialized(e){return this.initialized.has(e)}getInitializedNamespaces(){return Array.from(this.initialized)}getSize(e){if(!this.initialized.has(e))return 0;let i=this.unifiedAdapters?.get(e);return i?i.size():this.nextId.get(e)||0}};var W={mergeSimilarityThreshold:.85,maxMergesPerRun:50,softThreshold:400,hardThreshold:2e3,archiveMinAgeDays:30,archiveQualityThreshold:.15,mergeQualityBoost:.02,contradictionSimilarityThreshold:.85,contradictionQualityDelta:.4},R=class{config;db=null;initialized=!1;constructor(e={}){this.config={...W,...e}}async initialize(e){if(!this.initialized){if(e)this.db=e;else{let i=T();await i.initialize(),this.db=i.getDatabase()}this.initialized=!0}}async consolidateAll(e){this.ensureInitialized();let i={merged:0,contradicted:0,qualityUpdated:0,archived:0,hardDeleted:0,activeRemaining:0,domainsProcessed:[]},t=this.db.prepare("SELECT domain, COUNT(*) as cnt FROM captured_experiences WHERE consolidated_into IS NULL GROUP BY domain").all(),n=e?t.filter(s=>e.includes(s.domain)):t.filter(s=>s.cnt>this.config.softThreshold);for(let{domain:s,cnt:d}of n){let o=await this.consolidateDomain(s,d);i.merged+=o.merged,i.contradicted+=o.contradicted,i.qualityUpdated+=o.qualityUpdated,i.archived+=o.archived,i.hardDeleted+=o.hardDeleted,i.domainsProcessed.push(s)}let r=this.db.prepare("SELECT COUNT(*) as cnt FROM captured_experiences WHERE consolidated_into IS NULL").get();return i.activeRemaining=r.cnt,(i.merged>0||i.archived>0||i.contradicted>0)&&console.log(`[ExperienceConsolidator] Consolidated: ${i.merged} merged, ${i.contradicted} contradicted, ${i.archived} archived, ${i.activeRemaining} active`),i}async consolidateDomain(e,i){this.ensureInitialized();let t={merged:0,contradicted:0,qualityUpdated:0,archived:0,hardDeleted:0,activeRemaining:0,domainsProcessed:[e]},n=await this.clusterAndMerge(e);t.merged=n.merged,t.contradicted=n.contradicted,t.qualityUpdated=this.reinforceQuality(e),t.archived=this.archiveValueless(e);let r=this.db.prepare("SELECT COUNT(*) as cnt FROM captured_experiences WHERE domain = ? AND consolidated_into IS NULL").get(e).cnt,s=0;return r>this.config.hardThreshold&&(s=this.hardDeleteExcess(e,r),t.archived+=s),t.activeRemaining=r-s,t}async bootstrapDomain(e){if(this.ensureInitialized(),this.db.prepare("SELECT value FROM kv_store WHERE key = ?").get(`consolidation_bootstrap_${e}`))return console.log(`[ExperienceConsolidator] Domain ${e} already bootstrapped`),{merged:0,contradicted:0,qualityUpdated:0,archived:0,hardDeleted:0,activeRemaining:0,domainsProcessed:[e]};let t={...this.config};this.config.mergeSimilarityThreshold=.8,this.config.maxMergesPerRun=200;let n=await this.consolidateDomain(e);Object.assign(this.config,t);try{this.db.prepare("INSERT OR REPLACE INTO kv_store (key, value, namespace) VALUES (?, ?, 'system')").run(`consolidation_bootstrap_${e}`,new Date().toISOString())}catch{}return console.log(`[ExperienceConsolidator] Bootstrap ${e}: ${n.merged} merged, ${n.archived} archived`),n}async clusterAndMerge(e){let i=this.db.prepare(`
|
|
3
3
|
SELECT id, task, domain, quality, success, application_count,
|
|
4
4
|
consolidation_count, reuse_success_count, reuse_failure_count,
|
|
5
5
|
embedding, embedding_dimension, started_at
|
|
@@ -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.13.
|
|
2
|
-
import{a as b}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.13.4");process.exit(0)}
|
|
2
|
+
import{a as b}from"./chunk-QGH54HTH.js";import{c as k}from"./chunk-E7FCVH32.js";import{b as p,d as C}from"./chunk-HN2DD2DQ.js";C();b();var m=k.create("skill-validation-learner"),v=class{constructor(e){this.reasoningBank=e}reasoningBank;memoryNamespace="skill-validation";feedbackLoop=null;connectFeedbackLoop(e){this.feedbackLoop=e}async recordValidationOutcome(e){await this.reasoningBank.storeQEPattern({patternType:"test-template",name:`${e.skillName}-validation-${e.validationLevel}`,description:`Validation outcome for ${e.skillName} at level ${e.validationLevel}`,context:{tags:["skill-validation",e.skillName,e.model,e.validationLevel],testType:"integration"},template:{type:"config",content:JSON.stringify({outcome:{skillName:e.skillName,trustTier:e.trustTier,validationLevel:e.validationLevel,model:e.model,passed:e.passed,score:e.score,testCaseCount:e.testCaseResults.length,passedTests:e.testCaseResults.filter(s=>s.passed).length,avgReasoningQuality:this.calculateAvgReasoningQuality(e.testCaseResults),timestamp:e.timestamp.toISOString(),runId:e.runId,metadata:e.metadata}}),variables:[]}}),await this.updateSkillConfidence(e),e.validationLevel==="eval"&&await this.trackCrossModelBehavior(e),this.feedbackLoop&&e.runId&&await this.recordToFeedbackLoop(e)}async updateSkillConfidence(e){let s=`skill-confidence-${e.skillName}`,n=await this.reasoningBank.searchQEPatterns(s,{limit:1}),t;if(n.success&&n.value.length>0)try{let r=n.value[0].pattern.template?.content;if(r){let i=p(r);i&&typeof i=="object"&&Array.isArray(i.outcomes)?t=i:t=this.createEmptyConfidence(e.skillName)}else t=this.createEmptyConfidence(e.skillName)}catch(a){m.debug("Confidence history parse failed",{skill:e.skillName,error:a instanceof Error?a.message:String(a)}),t=this.createEmptyConfidence(e.skillName)}else t=this.createEmptyConfidence(e.skillName);t.outcomes.push({score:e.score,timestamp:e.timestamp,model:e.model,validationLevel:e.validationLevel,passed:e.passed}),t.outcomes.length>100&&(t.outcomes=t.outcomes.slice(-100)),t.avgScore=t.outcomes.reduce((a,r)=>a+r.score,0)/t.outcomes.length,t.lastUpdated=new Date,t.trend=this.calculateTrend(t.outcomes),t.byLevel=this.calculateConfidenceByLevel(t.outcomes),await this.reasoningBank.storeQEPattern({patternType:"test-template",name:s,description:`Skill confidence tracking for ${e.skillName}`,context:{tags:["skill-confidence",e.skillName]},template:{type:"config",content:JSON.stringify(t),variables:[]}})}async trackCrossModelBehavior(e){let s=`cross-model-${e.skillName}`,n=await this.reasoningBank.searchQEPatterns(s,{limit:1}),t;if(n.success&&n.value.length>0)try{let c=n.value[0].pattern.template?.content;if(c){let l=p(c);l&&typeof l=="object"&&typeof l.models=="object"?t=l:t=this.createEmptyCrossModelAnalysis()}else t=this.createEmptyCrossModelAnalysis()}catch(o){m.debug("Cross-model analysis parse failed",{error:o instanceof Error?o.message:String(o)}),t=this.createEmptyCrossModelAnalysis()}else t=this.createEmptyCrossModelAnalysis();t.models||(t.models={}),t.models[e.model]||(t.models[e.model]={scores:[],passRate:0,avgReasoningQuality:0,sampleCount:0});let a=t.models[e.model];a.scores.push(e.score),a.sampleCount++,a.scores.length>50&&(a.scores=a.scores.slice(-50));let r=this.calculateAvgReasoningQuality(e.testCaseResults);a.passRate=a.scores.filter(o=>o>=.9).length/a.scores.length,a.avgReasoningQuality=(a.avgReasoningQuality*(a.sampleCount-1)+r)/a.sampleCount;let i=Object.values(t.models).map(o=>o.passRate);if(i.length>1){let o=i.reduce((l,d)=>l+d,0)/i.length,c=i.reduce((l,d)=>l+Math.pow(d-o,2),0)/i.length;t.variance=c,t.hasAnomalies=c>.04,t.anomalies=[];for(let[l,d]of Object.entries(t.models))Math.abs(d.passRate-o)>.2&&t.anomalies.push({model:l,type:d.passRate<o?"low_performance":"high_variance",description:`Model ${l} has ${((d.passRate-o)*100).toFixed(1)}% difference from average`})}t.lastUpdated=new Date,await this.reasoningBank.storeQEPattern({patternType:"test-template",name:s,description:`Cross-model behavior tracking for ${e.skillName}`,context:{tags:["cross-model",e.skillName]},template:{type:"config",content:JSON.stringify(t),variables:[]}})}async recordToFeedbackLoop(e){if(!this.feedbackLoop)return;let s={taskId:e.runId,taskDescription:`Skill validation: ${e.skillName} (${e.validationLevel})`,recommendedAgent:"skill-validator",usedAgent:"skill-validator",followedRecommendation:!0,success:e.passed,qualityScore:e.score,durationMs:e.metadata?.duration||0,timestamp:e.timestamp};await this.feedbackLoop.recordRoutingOutcome(s)}async getSkillConfidence(e){let s=`skill-confidence-${e}`,n=await this.reasoningBank.searchQEPatterns(s,{limit:1});if(n.success&&n.value.length>0)try{let t=n.value[0].pattern.template?.content;if(t)return p(t)}catch(t){m.debug("Skill confidence pattern content invalid",{skill:e,error:t instanceof Error?t.message:String(t)})}return null}async getCrossModelAnalysis(e){let s=`cross-model-${e}`,n=await this.reasoningBank.searchQEPatterns(s,{limit:1});if(n.success&&n.value.length>0)try{let t=n.value[0].pattern.template?.content;if(t)return p(t)}catch(t){m.debug("Cross-model pattern content invalid",{skill:e,error:t instanceof Error?t.message:String(t)})}return null}async queryValidationPatterns(e,s=10){let n=await this.reasoningBank.searchQEPatterns(`${e} validation`,{limit:s});return n.success?n.value.filter(t=>t.pattern.context?.tags?.includes("skill-validation")).map(t=>t.pattern):[]}async getValidationTrends(e){let s=await this.getSkillConfidence(e),n=await this.getCrossModelAnalysis(e);if(!s)return null;let t={};if(n)for(let i of Object.keys(n.models)){let o=s.outcomes.filter(c=>c.model===i).map(c=>({score:c.score}));t[i]=this.calculateTrend(o)}let a=s.outcomes.slice(-20),r=a.filter(i=>i.passed).length/a.length;return{overall:s.trend||"stable",byModel:t,recentPassRate:r}}async extractLearnedPatterns(e){let s=await this.queryValidationPatterns(e,50),n=[],t=new Map;for(let a of s)try{let i=p(a.template?.content||"{}").outcome?.metadata?.category||"general";t.has(i)||t.set(i,[]),t.get(i).push(a)}catch(r){m.debug("Invalid pattern during category grouping",{error:r instanceof Error?r.message:String(r)})}for(let[a,r]of Array.from(t.entries())){let i=new Set,o=new Set,c=new Set,l=0;for(let d of r)try{let f=p(d.template?.content||"{}").outcome;if(!f)continue;c.add(f.model),l+=f.score;let h=d.context?.tags||[];f.passed?h.filter(g=>!["skill-validation",e].includes(g)).forEach(g=>i.add(g)):h.filter(g=>!["skill-validation",e].includes(g)).forEach(g=>o.add(g))}catch(u){m.debug("Invalid pattern during category extraction",{error:u instanceof Error?u.message:String(u)})}r.length>0&&n.push({id:`${e}-${a}`,skillName:e,category:a,successIndicators:Array.from(i),failureIndicators:Array.from(o),models:Array.from(c),confidence:l/r.length,observationCount:r.length})}return n}createEmptyConfidence(e){return{skillName:e,avgScore:0,outcomes:[],lastUpdated:new Date}}createEmptyCrossModelAnalysis(){return{models:{},variance:0,hasAnomalies:!1,lastUpdated:new Date}}calculateAvgReasoningQuality(e){return e.length===0?0:e.reduce((s,n)=>s+n.reasoningQuality,0)/e.length}calculateTrend(e){if(e.length<5)return"stable";let s=e.slice(-10),n=e.slice(-20,-10);if(n.length===0)return"stable";let t=s.reduce((i,o)=>i+o.score,0)/s.length,a=n.reduce((i,o)=>i+o.score,0)/n.length,r=t-a;return r>.05?"improving":r<-.05?"declining":"stable"}calculateConfidenceByLevel(e){let s={schema:[],validator:[],eval:[]};for(let t of e)t.validationLevel&&s[t.validationLevel].push(t.score);let n={};for(let[t,a]of Object.entries(s))a.length>0&&(n[t]=a.reduce((r,i)=>r+i,0)/a.length);return n}};function L(y){return new v(y)}export{L 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.13.
|
|
2
|
-
var e=null,f=null,t=null,u=!1;async function W(){return u&&!t?e:t||(t=(async()=>{try{if(process.env.AQE_RVF_MODE==="sqlite-only"||process.env.AQE_MEMORY_BACKEND==="memory")return null;let{isRvfNativeAvailable:d}=await import("./rvf-native-adapter-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.13.4");process.exit(0)}
|
|
2
|
+
var e=null,f=null,t=null,u=!1;async function W(){return u&&!t?e:t||(t=(async()=>{try{if(process.env.AQE_RVF_MODE==="sqlite-only"||process.env.AQE_MEMORY_BACKEND==="memory")return null;let{isRvfNativeAvailable:d}=await import("./rvf-native-adapter-M7ZVRN5Z.js");if(!d())return null;let{getUnifiedMemory:v,findProjectRoot:p}=await import("./unified-memory-H2J5BHPY.js"),o=v().getDatabase();if(!o)return null;let{join:m}=await import("node:path"),g=m(process.env.AQE_PROJECT_ROOT??p(),".agentic-qe","brain.rvf"),{RvfDualWriter:R}=await import("./rvf-dual-writer-EBUMXPRO.js"),l=new R(o,{rvfPath:g,mode:"dual-write",dimensions:384});await l.initialize(),e=l;try{let{getRvfMigrationStage:y}=await import("./feature-flags-ZHQESXIP.js"),a=y();if(a>=2){let{RvfMigrationAdapter:A}=await import("./rvf-migration-adapter-5N7GHMD3.js"),s=new A({stage:a});s.setSqliteDb(o);let{getSharedRvfAdapter:D}=await import("./shared-rvf-adapter-I3HQY7DE.js"),i=D();if(i){let h={ingest:n=>i.ingest(n),search:(n,M)=>i.search(n,M).map(c=>({id:c.id,score:c.score})),delete:n=>i.delete(n),status:()=>i.status(),close:()=>{}};s.setRvfStore(h)}f=s,console.log(`[RVF] Migration adapter active at stage ${a} (${["sqlite-only","hybrid","dual-sqlite","dual-rvf","rvf-primary"][a]})`)}}catch{}return l}catch(r){return(process.env.DEBUG||process.env.AQE_VERBOSE)&&console.debug("[RVF] Dual-writer init failed, degrading to sqlite-only:",r instanceof Error?r.message:r),null}finally{u=!0,t=null,import("./base-WBCYKM45.js").then(({registerRvfResetFn:r})=>r(w)).catch(()=>{})}})(),t)}function S(){return e}function b(){return f}function w(){if(e){try{e.close()}catch{}e=null}f=null,t=null,u=!1}export{W as a,S as b,b as c,w as d};
|
|
@@ -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.13.
|
|
2
|
-
import{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.13.4");process.exit(0)}
|
|
2
|
+
import{g}from"./chunk-X5JMTHXC.js";import{b as p,c as d}from"./chunk-RCRKCMN5.js";import{b as m,c as f}from"./chunk-KDICUKYX.js";import{i as h}from"./chunk-C75V5PTW.js";f();var I={maxDepth:5,riskWeights:{directImpact:.4,transitiveImpact:.2,testCoverage:.2,criticalPath:.15,dependencyCount:.05},testPatterns:["**/*.test.ts","**/*.test.tsx","**/*.spec.ts","**/*.spec.tsx","**/test_*.py","**/*_test.py","**/*_test.go"],criticalPaths:["**/auth/**","**/security/**","**/payment/**","**/api/**","**/core/**"],namespace:"code-intelligence:impact"},u=class{constructor(e,t,i={}){this.memory=e;this.config={...I,...i},this.knowledgeGraph=t||new g(e)}memory;config;knowledgeGraph;async analyzeImpact(e){try{let{changedFiles:t,depth:i=this.config.maxDepth,includeTests:r=!0}=e;if(t.length===0)return p({directImpact:[],transitiveImpact:[],impactedTests:[],riskLevel:"info",recommendations:[]});let n=await this.analyzeDirectImpact(t),l=await this.analyzeTransitiveImpact(t,n,i),s=[];if(r){let a=await this.getImpactedTests(t);a.success&&(s=a.value)}let c={directImpact:n,transitiveImpact:l,impactedTests:s,riskLevel:"info",recommendations:[]};return c.riskLevel=this.calculateRiskLevel(c),c.recommendations=this.getRecommendations(c),await this.storeAnalysis(t,c),p(c)}catch(t){return d(m(t))}}async getImpactedTests(e){try{let t=new Set;for(let i of e){if(this.isTestFile(i)){t.add(i);continue}let r=await this.knowledgeGraph.mapDependencies({files:[i],direction:"incoming",depth:3});if(r.success)for(let s of r.value.nodes)this.isTestFile(s.path)&&t.add(s.path);let n=this.getBaseName(i),l=[`${n}.test`,`${n}.spec`,`test_${n}`,`${n}_test`];for(let s of l){let c=await this.memory.search(`code-intelligence:kg:node:*${s}*`,10,{namespace:"code-intelligence:kg"});for(let a of c){let o=await this.memory.get(a,{namespace:"code-intelligence:kg"});o?.properties?.path&&this.isTestFile(o.properties.path)&&t.add(o.properties.path)}}}return p(Array.from(t))}catch(t){return d(m(t))}}calculateRiskLevel(e){let t=this.config.riskWeights,i=0,r=Math.min(1,e.directImpact.length/10);i+=r*t.directImpact;let n=Math.min(1,e.transitiveImpact.length/20);i+=n*t.transitiveImpact;let l=e.impactedTests.length>0?Math.max(0,1-e.impactedTests.length/(e.directImpact.length||1)):1;i+=l*t.testCoverage;let s=this.countCriticalFiles([...e.directImpact.map(o=>o.file),...e.transitiveImpact.map(o=>o.file)]),c=Math.min(1,s/5);i+=c*t.criticalPath;let a=this.calculateAverageRiskScore([...e.directImpact,...e.transitiveImpact]);return i+=a*t.dependencyCount,i>=.8?"critical":i>=.6?"high":i>=.4?"medium":i>=.2?"low":"info"}getRecommendations(e){let t=[];(e.riskLevel==="critical"||e.riskLevel==="high")&&t.push("This change has significant impact - consider peer review before merging"),e.impactedTests.length===0&&e.directImpact.length>0?t.push("No tests found for impacted files - add test coverage"):e.impactedTests.length<e.directImpact.length/2&&t.push("Test coverage appears low for impacted files"),e.impactedTests.length>0&&(e.impactedTests.length<=10?t.push(`Run these ${e.impactedTests.length} tests: ${e.impactedTests.slice(0,3).join(", ")}${e.impactedTests.length>3?"...":""}`):t.push(`Run all ${e.impactedTests.length} impacted tests before deployment`));let i=[...e.directImpact,...e.transitiveImpact].filter(n=>this.isCriticalPath(n.file));i.length>0&&t.push(`${i.length} critical path files affected - extra scrutiny recommended`),e.transitiveImpact.length>10&&t.push("Large transitive impact - consider breaking down into smaller changes");let r=[...e.directImpact,...e.transitiveImpact].filter(n=>n.riskScore>=.7);return r.length>0&&t.push(`${r.length} high-risk files impacted: ${r.slice(0,2).map(n=>this.getFileName(n.file)).join(", ")}`),t}async analyzeDirectImpact(e){let t=[];for(let i of e){let r=await this.knowledgeGraph.mapDependencies({files:[i],direction:"incoming",depth:1});if(r.success){let{nodes:n,edges:l}=r.value;for(let s of n){if(s.path===i)continue;let c=l.find(o=>o.target===s.id||o.source===s.id),a=this.calculateFileRiskScore(s.path,s.inDegree,s.outDegree);t.push({file:s.path,reason:`Directly ${c?.type||"depends on"} ${this.getFileName(i)}`,distance:1,riskScore:a})}}}return this.deduplicateImpact(t)}async analyzeTransitiveImpact(e,t,i){let r=[],n=new Set([...e,...t.map(s=>s.file)]),l=t.map(s=>({file:s.file,distance:1}));for(;l.length>0;){let s=l.shift();if(s.distance>=i)continue;let c=await this.knowledgeGraph.mapDependencies({files:[s.file],direction:"incoming",depth:1});if(c.success)for(let a of c.value.nodes){if(n.has(a.path)||a.path===s.file)continue;n.add(a.path);let o=this.calculateFileRiskScore(a.path,a.inDegree,a.outDegree,s.distance+1);r.push({file:a.path,reason:`Transitively depends via ${this.getFileName(s.file)}`,distance:s.distance+1,riskScore:o}),l.push({file:a.path,distance:s.distance+1})}}return this.deduplicateImpact(r)}calculateFileRiskScore(e,t,i,r=1){let n=0;return n+=Math.min(.3,t/20),n+=Math.min(.2,i/30),this.isCriticalPath(e)&&(n+=.3),this.isEntryPoint(e)&&(n+=.2),n=n*Math.pow(.8,r-1),Math.min(1,Math.max(0,n))}calculateAverageRiskScore(e){return e.length===0?0:e.reduce((i,r)=>i+r.riskScore,0)/e.length}countCriticalFiles(e){return e.filter(t=>this.isCriticalPath(t)).length}isTestFile(e){return[/\.test\.[tj]sx?$/,/\.spec\.[tj]sx?$/,/_test\.[tj]sx?$/,/test_.*\.py$/,/.*_test\.py$/,/.*_test\.go$/].some(i=>i.test(e))}isCriticalPath(e){return this.config.criticalPaths.map(i=>i.replace(/\*\*/g,".*").replace(/\*/g,"[^/]*")).some(i=>new RegExp(i).test(e))}isEntryPoint(e){return[/\/index\.[tj]sx?$/,/\/main\.[tj]sx?$/,/\/app\.[tj]sx?$/,/^src\/[^/]+\.[tj]sx?$/,/\/server\.[tj]sx?$/,/\/__init__\.py$/,/\/main\.go$/].some(i=>i.test(e))}getBaseName(e){return this.getFileName(e).replace(/\.[^.]+$/,"")}getFileName(e){return e.split(/[/\\]/).pop()||e}deduplicateImpact(e){let t=new Map;for(let i of e){let r=t.get(i.file);(!r||i.distance<r.distance)&&t.set(i.file,i)}return Array.from(t.values()).sort((i,r)=>r.riskScore!==i.riskScore?r.riskScore-i.riskScore:i.distance-r.distance)}async storeAnalysis(e,t){let i=h();await this.memory.set(`${this.config.namespace}:analysis:${i}`,{id:i,changedFiles:e,analysis:t,timestamp:new Date().toISOString()},{namespace:this.config.namespace,persist:!0})}};export{u 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.13.
|
|
2
|
-
import{d as m}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.13.4");process.exit(0)}
|
|
2
|
+
import{d as m}from"./chunk-GOHWEQEP.js";import{d as T}from"./chunk-DQ247474.js";T();function p(t,r,o){let e=0,n=t.length;for(;e<n;){let i=e+n>>>1;o(t[i],r)<=0?e=i+1:n=i}return e}function a(t,r,o){let e=p(t,r,o);return t.splice(e,0,r),e}function s(){return(t,r)=>t.createdAt.getTime()-r.createdAt.getTime()}m();export{a,s as b};
|
|
@@ -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.13.
|
|
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.13.4");process.exit(0)}
|
|
2
2
|
var i={copilot:{id:"copilot",name:"GitHub Copilot",configPath:".vscode/mcp.json",configFormat:"json",configKey:"servers",rulesPath:".github/copilot-instructions.md",rulesFormat:"markdown",supportsAutoApprove:!1,supportsCustomModes:!1,globalConfig:!1},cursor:{id:"cursor",name:"Cursor",configPath:".cursor/mcp.json",configFormat:"json",configKey:"mcpServers",rulesPath:".cursorrules",rulesFormat:"markdown",supportsAutoApprove:!1,supportsCustomModes:!1,globalConfig:!1},cline:{id:"cline",name:"Cline",configPath:".vscode/cline_mcp_settings.json",configFormat:"json",configKey:"mcpServers",rulesPath:".vscode/cline_custom_modes.json",rulesFormat:"json",supportsAutoApprove:!0,supportsCustomModes:!0,globalConfig:!1},kilocode:{id:"kilocode",name:"Kilo Code",configPath:".kilocode/mcp.json",configFormat:"json",configKey:"mcpServers",rulesPath:".kilocode/modes.json",rulesFormat:"json",supportsAutoApprove:!0,supportsCustomModes:!0,globalConfig:!1},roocode:{id:"roocode",name:"Roo Code",configPath:".roo/mcp.json",configFormat:"json",configKey:"mcpServers",rulesPath:".roo/modes.json",rulesFormat:"json",supportsAutoApprove:!0,supportsCustomModes:!0,globalConfig:!1},codex:{id:"codex",name:"OpenAI Codex CLI",configPath:".codex/config.toml",configFormat:"toml",configKey:"mcp_servers",rulesPath:"AGENTS.md",rulesFormat:"markdown",supportsAutoApprove:!1,supportsCustomModes:!1,globalConfig:!1},windsurf:{id:"windsurf",name:"Windsurf",configPath:".windsurf/mcp_config.json",configFormat:"json",configKey:"mcpServers",rulesPath:".windsurfrules",rulesFormat:"markdown",supportsAutoApprove:!1,supportsCustomModes:!1,globalConfig:!1},continuedev:{id:"continuedev",name:"Continue.dev",configPath:".continue/config.yaml",configFormat:"yaml",configKey:"mcpServers",rulesPath:".continue/rules/aqe-qe-standards.yaml",rulesFormat:"yaml",supportsAutoApprove:!1,supportsCustomModes:!1,globalConfig:!1}},l=["fleet_init","fleet_status","fleet_health","agent_list","agent_metrics","agent_status","team_list","team_health","task_list","task_status","test_generate_enhanced","coverage_analyze_sublinear","quality_assess","defect_predict","code_index","memory_store","memory_retrieve","memory_query","memory_usage","model_route","routing_metrics","aqe_health"];function u(t){return t?{AQE_MEMORY_BACKEND:"memory",AQE_V3_MODE:"true"}:{AQE_MEMORY_PATH:".agentic-qe/memory.db",AQE_V3_MODE:"true"}}function m(t,o){let e={command:"npx",args:["-y","agentic-qe@latest","mcp"],env:u(o)};return t&&(e.disabled=!1,e.alwaysAllow=l),e}function g(t,o){let e=m(t.supportsAutoApprove,o);if(t.id==="copilot"){let r={[t.configKey]:{"agentic-qe":{type:"stdio",...e}}};return JSON.stringify(r,null,2)+`
|
|
3
3
|
`}let n={[t.configKey]:{"agentic-qe":e}};return JSON.stringify(n,null,2)+`
|
|
4
4
|
`}function f(t){return`# Agentic QE MCP Server
|
|
@@ -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.13.
|
|
2
|
-
import{i as e}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.13.4");process.exit(0)}
|
|
2
|
+
import{i as e}from"./chunk-C75V5PTW.js";function g(t,n,r,a){return{id:e(),type:t,timestamp:new Date,source:n,correlationId:a,payload:r}}var i={TestGenerated:"test-generation.TestGenerated",TestSuiteCreated:"test-generation.TestSuiteCreated",PatternLearned:"test-generation.PatternLearned",GenerationFailed:"test-generation.GenerationFailed"},s={TestRunStarted:"test-execution.TestRunStarted",TestRunCompleted:"test-execution.TestRunCompleted",FlakyTestDetected:"test-execution.FlakyTestDetected",RetryTriggered:"test-execution.RetryTriggered"},o={CoverageReportCreated:"coverage-analysis.CoverageReportCreated",CoverageGapDetected:"coverage-analysis.CoverageGapDetected",RiskZoneIdentified:"coverage-analysis.RiskZoneIdentified"},d={QualityGateEvaluated:"quality-assessment.QualityGateEvaluated",DeploymentApproved:"quality-assessment.DeploymentApproved",DeploymentBlocked:"quality-assessment.DeploymentBlocked"},l={DefectPredicted:"defect-intelligence.DefectPredicted",RootCauseIdentified:"defect-intelligence.RootCauseIdentified",RegressionRiskAnalyzed:"defect-intelligence.RegressionRiskAnalyzed"},c={KnowledgeGraphUpdated:"code-intelligence.KnowledgeGraphUpdated",ImpactAnalysisCompleted:"code-intelligence.ImpactAnalysisCompleted",SemanticSearchCompleted:"code-intelligence.SemanticSearchCompleted",C4DiagramsGenerated:"code-intelligence.C4DiagramsGenerated"},m={VulnerabilityDetected:"security-compliance.VulnerabilityDetected",ComplianceValidated:"security-compliance.ComplianceValidated",SecurityAuditCompleted:"security-compliance.SecurityAuditCompleted"},p={PatternConsolidated:"learning-optimization.PatternConsolidated",TransferCompleted:"learning-optimization.TransferCompleted",OptimizationApplied:"learning-optimization.OptimizationApplied",DreamCycleCompleted:"learning-optimization.dream.completed"},y={...i,...s,...o,...d,...l,...c,...m,...p};export{g as a,i as b,s as c,o as d,d as e,l as f,c as g,m as h,p as i};
|