agentic-qe 3.11.3 → 3.11.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/hooks/aqe-hook.cjs +44 -10
- package/.claude/skills/skills-manifest.json +1 -1
- package/CHANGELOG.md +106 -0
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/audit/witness-chain.d.ts +25 -0
- package/dist/audit/witness-chain.js +69 -22
- package/dist/audit/witness-key-manager.d.ts +11 -0
- package/dist/audit/witness-key-manager.js +24 -0
- package/dist/cli/brain-commands.js +2 -1
- package/dist/cli/bundle.js +5 -5
- package/dist/cli/chunks/adapter-KNM5R47J.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-BFRW7HEU.js → agent-booster-wasm-CSTBLNYZ.js} +2 -2
- package/dist/cli/chunks/{agent-handler-ZVC3VFPC.js → agent-handler-M4W4GTXN.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-3WU3CVSX.js → agent-memory-branch-VGXFYLSQ.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-MXPJLVR3.js +2 -0
- package/dist/cli/chunks/{arena-QMRLNQUC.js → arena-FKSD3LLM.js} +4 -4
- package/dist/cli/chunks/{arena-JMVTWWG5.js → arena-IQBRGWAG.js} +2 -2
- package/dist/cli/chunks/audit-7NSGRR4Z.js +3 -0
- package/dist/cli/chunks/base-X4EXQ2AS.js +2 -0
- package/dist/cli/chunks/{hnswlib-node-EBRXKEX5.js → better-sqlite3-2KR4LQRU.js} +2 -2
- package/dist/cli/chunks/brain-handler-M6A3UB66.js +89 -0
- package/dist/cli/chunks/{branch-enumerator-CJJG6X3I.js → branch-enumerator-2JGKY4BB.js} +2 -2
- package/dist/cli/chunks/{browser-LI2CDWVR.js → browser-J43WQPJL.js} +2 -2
- package/dist/cli/chunks/browser-workflow-4HX6RP5F.js +2 -0
- package/dist/cli/chunks/{chunk-DS7AZD26.js → chunk-26WEI3P4.js} +2 -2
- package/dist/cli/chunks/{chunk-OVEG5MEL.js → chunk-2XPMATEK.js} +2 -2
- package/dist/cli/chunks/{chunk-36HTS4EP.js → chunk-2XQHG56O.js} +2 -2
- package/dist/cli/chunks/{chunk-CGKHG46K.js → chunk-354367AP.js} +2 -2
- package/dist/cli/chunks/{chunk-FPKKKUWF.js → chunk-37ZUF5NX.js} +1 -1
- package/dist/cli/chunks/{chunk-H7Y43HBQ.js → chunk-3I4TCMOJ.js} +1 -1
- package/dist/cli/chunks/{chunk-WV66MXJI.js → chunk-3JF5A72M.js} +2 -2
- package/dist/cli/chunks/{chunk-MX5FMAY5.js → chunk-3LY7OCSO.js} +1 -1
- package/dist/cli/chunks/{chunk-KHUN65Q3.js → chunk-3V36WMIO.js} +1 -1
- package/dist/cli/chunks/{chunk-VFEU4JM4.js → chunk-3WR35GFF.js} +2 -2
- package/dist/cli/chunks/{chunk-A43MKBSX.js → chunk-4LODYRNV.js} +2 -2
- package/dist/cli/chunks/{chunk-3E3PSEC5.js → chunk-4MHN7JWC.js} +3 -3
- package/dist/cli/chunks/chunk-4QOI5JS7.js +14 -0
- package/dist/cli/chunks/{chunk-LKLWIP4Z.js → chunk-4RTWPR3X.js} +1 -1
- package/dist/cli/chunks/chunk-4XJ2A3HY.js +65 -0
- package/dist/cli/chunks/{chunk-PMHSTMHV.js → chunk-4Y3LGBKJ.js} +3 -3
- package/dist/cli/chunks/{chunk-SFDBIO64.js → chunk-52U5BFZP.js} +2 -2
- package/dist/cli/chunks/{chunk-YPRM6ZFL.js → chunk-53YOYZW5.js} +2 -2
- package/dist/cli/chunks/{chunk-REZ2GZQ3.js → chunk-5WMU7XCF.js} +1 -1
- package/dist/cli/chunks/{chunk-VUEYLW5P.js → chunk-62OTU2AP.js} +2 -2
- package/dist/cli/chunks/{chunk-3XLGXCSX.js → chunk-62UM7Q5N.js} +1 -1
- package/dist/cli/chunks/{chunk-DZZ4AJQI.js → chunk-6Q57K4YD.js} +2 -2
- package/dist/cli/chunks/chunk-6R3YOAKO.js +2 -0
- package/dist/cli/chunks/chunk-6T65OKUM.js +2 -0
- package/dist/cli/chunks/{chunk-VTDWQ7WI.js → chunk-7BCRULCP.js} +2 -2
- package/dist/cli/chunks/{chunk-XCSEJQXR.js → chunk-7DTMENY6.js} +2 -2
- package/dist/cli/chunks/{chunk-N2K2EQFH.js → chunk-7KXPNNMR.js} +2 -2
- package/dist/cli/chunks/{chunk-XKUN5PDH.js → chunk-7P6X4BFO.js} +3 -3
- package/dist/cli/chunks/{chunk-3CBYKKRW.js → chunk-7YSBATSN.js} +2 -2
- package/dist/cli/chunks/{chunk-ZDPQB67L.js → chunk-ABU64UWB.js} +1 -1
- package/dist/cli/chunks/{chunk-IJHPZMEQ.js → chunk-AF6P5RWY.js} +2 -2
- package/dist/cli/chunks/{chunk-7S7QF4HJ.js → chunk-AGJOGUP5.js} +1 -1
- package/dist/cli/chunks/{chunk-EHEFI6LR.js → chunk-AL5VJJN4.js} +1 -1
- package/dist/cli/chunks/{chunk-Q2A2XQGF.js → chunk-AOQYORVA.js} +2 -2
- package/dist/cli/chunks/{chunk-6WWNK67C.js → chunk-AOXJFDH5.js} +180 -176
- package/dist/cli/chunks/{chunk-SWRGPCZ2.js → chunk-AXKWV5NF.js} +4 -4
- package/dist/cli/chunks/{chunk-3BREKEL5.js → chunk-B2VBDMDI.js} +2 -2
- package/dist/cli/chunks/{chunk-RXN5DWVM.js → chunk-BJLA2IX7.js} +2 -2
- package/dist/cli/chunks/{chunk-DPYNXEBC.js → chunk-BLPWJQTY.js} +2 -2
- package/dist/cli/chunks/{chunk-SMHYPPO6.js → chunk-BTLUWH4R.js} +2 -2
- package/dist/cli/chunks/{chunk-PUK5NE47.js → chunk-C4EZNOWK.js} +1 -1
- package/dist/cli/chunks/{chunk-ATFADWGD.js → chunk-C5C4W572.js} +2 -2
- package/dist/cli/chunks/{chunk-WTKT2AD3.js → chunk-CDJP6COA.js} +2 -2
- package/dist/cli/chunks/{chunk-G6MPXBCD.js → chunk-CKOF27L7.js} +2 -2
- package/dist/cli/chunks/{chunk-BQ5EJPK3.js → chunk-D45QLJEL.js} +1 -1
- package/dist/cli/chunks/{chunk-WCVZHXWL.js → chunk-DFRRWOEX.js} +2 -2
- package/dist/cli/chunks/{chunk-PSL53AQ4.js → chunk-DLBVADWQ.js} +92 -92
- package/dist/cli/chunks/{chunk-HRD5I7ES.js → chunk-DPL762HU.js} +1 -1
- package/dist/cli/chunks/{chunk-7QIYYYUE.js → chunk-DVW66FPU.js} +1 -1
- package/dist/cli/chunks/{chunk-ABD6JBNO.js → chunk-EDOGRFAG.js} +1 -1
- package/dist/cli/chunks/{chunk-7SBMTSGY.js → chunk-EEKG35K5.js} +5 -5
- package/dist/cli/chunks/{chunk-PW4GGJMP.js → chunk-EK3HPH6A.js} +1 -1
- package/dist/cli/chunks/{chunk-QPMISAWB.js → chunk-FGD6HINU.js} +1 -1
- package/dist/cli/chunks/{chunk-SLU35IDJ.js → chunk-FGSIID5C.js} +2 -2
- package/dist/cli/chunks/{chunk-DNOBN3IR.js → chunk-FHTYEAQ3.js} +2 -2
- package/dist/cli/chunks/{chunk-S2T2BXUL.js → chunk-FII3WCCY.js} +2 -2
- package/dist/cli/chunks/{chunk-77QJQRL2.js → chunk-FIPKIIMS.js} +2 -2
- package/dist/cli/chunks/{chunk-WYJFVSEB.js → chunk-FMNXHVIN.js} +2 -2
- package/dist/cli/chunks/{chunk-FZLCKIPP.js → chunk-G2ZIJZJ7.js} +2 -2
- package/dist/cli/chunks/{chunk-L6PH7JIE.js → chunk-GODAWJMZ.js} +2 -2
- package/dist/cli/chunks/{chunk-KTYESESI.js → chunk-GW6XWMX2.js} +2 -2
- package/dist/cli/chunks/{chunk-AC6OZTY4.js → chunk-HC6KTVFR.js} +2 -2
- package/dist/cli/chunks/{chunk-EXCU4J7T.js → chunk-HJWT4KME.js} +1 -1
- package/dist/cli/chunks/{chunk-GBCDJJWH.js → chunk-I3ANRYQ6.js} +2 -2
- package/dist/cli/chunks/{chunk-KXRI4MR3.js → chunk-I3NWKPXJ.js} +2 -2
- package/dist/cli/chunks/chunk-IBDQWKI3.js +2 -0
- package/dist/cli/chunks/{chunk-7FVWETN4.js → chunk-IU5RSN6M.js} +2 -2
- package/dist/cli/chunks/{chunk-L44XXD3X.js → chunk-J5XDKVI7.js} +2 -2
- package/dist/cli/chunks/{chunk-NJ2RY4OL.js → chunk-J6PFPY7V.js} +2 -2
- package/dist/cli/chunks/{chunk-27MMZQ7X.js → chunk-JATLFS6A.js} +1 -1
- package/dist/cli/chunks/{chunk-SIAJP3YA.js → chunk-JBKZ5TUM.js} +2 -2
- package/dist/cli/chunks/{chunk-PLQADRA6.js → chunk-JDSHUECG.js} +2 -2
- package/dist/cli/chunks/chunk-K4C25BWV.js +24 -0
- package/dist/cli/chunks/{chunk-UFZCHVLH.js → chunk-K4I7UIU5.js} +1 -1
- package/dist/cli/chunks/{chunk-6F43POT6.js → chunk-KP3R2M2G.js} +1 -1
- package/dist/cli/chunks/chunk-KQVIWE3W.js +2 -0
- package/dist/cli/chunks/{chunk-JWTMVC6E.js → chunk-KVVJVMDM.js} +2 -2
- package/dist/cli/chunks/{chunk-EZ4GKHSI.js → chunk-LOE2JETO.js} +2 -2
- package/dist/cli/chunks/{chunk-O7ZDQ5FF.js → chunk-LPR2R3AN.js} +3 -3
- package/dist/cli/chunks/{chunk-AKOGQT3A.js → chunk-M6FW56MV.js} +2 -2
- package/dist/cli/chunks/{chunk-NBOEXSV2.js → chunk-MCHEUSY4.js} +1 -1
- package/dist/cli/chunks/{chunk-B7XPSXK6.js → chunk-MEIU7457.js} +2 -2
- package/dist/cli/chunks/{chunk-3FOFPGHH.js → chunk-MHMQ6MCT.js} +2 -2
- package/dist/cli/chunks/{chunk-6JR2RSY2.js → chunk-MIU5RUBJ.js} +2 -2
- package/dist/cli/chunks/{chunk-QCCXH5DK.js → chunk-MMEXHZUC.js} +37 -12
- package/dist/cli/chunks/{chunk-LW5TUN5F.js → chunk-MTBGOWJA.js} +2 -2
- package/dist/cli/chunks/{chunk-JVXPKHND.js → chunk-NCSXLMDL.js} +77 -27
- package/dist/cli/chunks/{chunk-WLLGPGQY.js → chunk-O7J54OHN.js} +1 -1
- package/dist/cli/chunks/{chunk-ZM7WOA3K.js → chunk-OGNTCZKK.js} +1 -1
- package/dist/cli/chunks/{chunk-CYJ6O5VZ.js → chunk-OS2HHJTM.js} +2 -2
- package/dist/cli/chunks/{chunk-242B625Q.js → chunk-OS62Y77J.js} +2 -2
- package/dist/cli/chunks/{chunk-CLZ5RQVA.js → chunk-PVDXNQPL.js} +2 -2
- package/dist/cli/chunks/{chunk-PUUGIBFF.js → chunk-PW72M2FE.js} +2 -2
- package/dist/cli/chunks/{chunk-RWUGXU2K.js → chunk-Q5TR6ETB.js} +22 -22
- package/dist/cli/chunks/{chunk-CCDGNJZX.js → chunk-QKK7VBVB.js} +2 -2
- package/dist/cli/chunks/{chunk-BHZI6PDR.js → chunk-RFLHPLET.js} +1 -1
- package/dist/cli/chunks/{chunk-KULBMV6K.js → chunk-RJN2RM76.js} +2 -2
- package/dist/cli/chunks/{chunk-LGEZ3ZJX.js → chunk-RKXZLTWR.js} +2 -2
- package/dist/cli/chunks/{chunk-OFMVC6P3.js → chunk-SE3JFUKP.js} +1 -1
- package/dist/cli/chunks/{chunk-S7KDHA6P.js → chunk-SK754ZSH.js} +4 -4
- package/dist/cli/chunks/{chunk-OQGELUM2.js → chunk-SO6G4IX3.js} +2 -2
- package/dist/cli/chunks/{chunk-5746QYRF.js → chunk-SUL3I6QZ.js} +2 -2
- package/dist/cli/chunks/{chunk-22CUJA33.js → chunk-TBT3OFRW.js} +2 -2
- package/dist/cli/chunks/{chunk-26KHL4VO.js → chunk-TEIWJ3GJ.js} +1 -1
- package/dist/cli/chunks/{chunk-SFGBC5RP.js → chunk-TRNBQFFG.js} +8 -20
- package/dist/cli/chunks/{chunk-UTGW75AZ.js → chunk-TTJJ4DQE.js} +2 -2
- package/dist/cli/chunks/{chunk-H6YFMUFG.js → chunk-UBI2EOS3.js} +1 -1
- package/dist/cli/chunks/{chunk-GCIL7PK7.js → chunk-UBY322ED.js} +2 -2
- package/dist/cli/chunks/{chunk-P4UGVVVX.js → chunk-UORTQXJ2.js} +1 -1
- package/dist/cli/chunks/{chunk-BFBZFUBP.js → chunk-URP75DL4.js} +1 -1
- package/dist/cli/chunks/chunk-V6NAB5UZ.js +2 -0
- package/dist/cli/chunks/{chunk-DZ7PWB6E.js → chunk-VMFAANWX.js} +2 -2
- package/dist/cli/chunks/{chunk-6KKKPVOF.js → chunk-VMWRMINE.js} +1 -1
- package/dist/cli/chunks/{chunk-ECGASTG7.js → chunk-VN2HHBZN.js} +2 -2
- package/dist/cli/chunks/{chunk-6GVRP64A.js → chunk-W72FJA2H.js} +2 -2
- package/dist/cli/chunks/chunk-W7TYKPLY.js +27 -0
- package/dist/cli/chunks/{chunk-2OUXYSQV.js → chunk-WHHQIL4F.js} +2 -2
- package/dist/cli/chunks/{chunk-RRSUW2TK.js → chunk-WMZ2QGGS.js} +2 -2
- package/dist/cli/chunks/{chunk-54TDOQAH.js → chunk-WPSK237F.js} +3 -3
- package/dist/cli/chunks/{chunk-LMA6KEZH.js → chunk-XKQY2Z3Q.js} +1 -1
- package/dist/cli/chunks/{chunk-UMWYL37S.js → chunk-XLT3FYS7.js} +2 -2
- package/dist/cli/chunks/{chunk-5EW36WTI.js → chunk-XT4TDLOB.js} +2 -2
- package/dist/cli/chunks/{chunk-7UOH55UT.js → chunk-Y25PO65W.js} +2 -2
- package/dist/cli/chunks/{chunk-ED7MD6OI.js → chunk-Y6DWJKHU.js} +3 -3
- package/dist/cli/chunks/{chunk-A4NYOH7P.js → chunk-YBPLJRVT.js} +2 -2
- package/dist/cli/chunks/{chunk-BA7PJS3Y.js → chunk-YFCULQBP.js} +2 -2
- package/dist/cli/chunks/{chunk-B65CRJN6.js → chunk-YGVDP6X7.js} +1 -1
- package/dist/cli/chunks/chunk-YR2JKBZO.js +2 -0
- package/dist/cli/chunks/{chunk-FJRRXCIS.js → chunk-YZSTZUGJ.js} +1 -1
- package/dist/cli/chunks/{chunk-H2YOWAEB.js → chunk-ZG5UAEEO.js} +2 -2
- package/dist/cli/chunks/{chunk-MU36VPXV.js → chunk-ZLBY25MB.js} +1 -1
- package/dist/cli/chunks/chunk-ZMPAM4DY.js +2 -0
- package/dist/cli/chunks/{chunk-4ITHKHR5.js → chunk-ZPP57WQU.js} +2 -2
- package/dist/cli/chunks/{chunk-B6USJW5E.js → chunk-ZXEWTZFR.js} +1 -1
- package/dist/cli/chunks/{ci-JW4O2J3W.js → ci-CBNVLOOQ.js} +2 -2
- package/dist/cli/chunks/{ci-output-JNXJV4B2.js → ci-output-I4HY2FYJ.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-XDD4KUGR.js → circuit-breaker-5VRBKGWL.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-L6IZOGYZ.js → claude-flow-setup-XPJPKHIO.js} +2 -2
- package/dist/cli/chunks/client-AHXNCOHK.js +2 -0
- package/dist/cli/chunks/{cline-installer-PK5SMN2B.js → cline-installer-OFRDUUWZ.js} +2 -2
- package/dist/cli/chunks/{code-ZDVX3SQH.js → code-QIZQVB3E.js} +2 -2
- package/dist/cli/chunks/{code-index-extractor-VXZNKEU5.js → code-index-extractor-LMUUWEX4.js} +2 -2
- package/dist/cli/chunks/{codex-installer-OXKSIX7H.js → codex-installer-N2MKIZ2S.js} +2 -2
- package/dist/cli/chunks/{completions-VRFFK223.js → completions-Y36S3C5J.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-FTIMV74J.js → complexity-analyzer-73YS3WUD.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-KTYBBPN4.js → continuedev-installer-SAOTP6J3.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-WDC3YNUR.js → copilot-installer-A4HXF6HE.js} +2 -2
- package/dist/cli/chunks/core-handlers-EEFLLMAZ.js +2 -0
- package/dist/cli/chunks/{cost-tracker-6MH4H33B.js → cost-tracker-P26XUVZS.js} +2 -2
- package/dist/cli/chunks/{coverage-NHATLNS4.js → coverage-HVNHSMVJ.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-LT3H4SNJ.js +2 -0
- package/dist/cli/chunks/{cursor-installer-VQSUJDFB.js → cursor-installer-46BQFTYZ.js} +2 -2
- package/dist/cli/chunks/{daemon-3VAOEKQW.js → daemon-Y54O3FLT.js} +3 -3
- package/dist/cli/chunks/daemon-YE7K2AZF.js +10 -0
- package/dist/cli/chunks/{dag-attention-scheduler-HZ6OGYIH.js → dag-attention-scheduler-ETA7YY52.js} +2 -2
- package/dist/cli/chunks/{detect-CGU3SC63.js → detect-5WLQ2J3E.js} +2 -2
- package/dist/cli/chunks/{dist-node-DIBQ7PTA.js → dist-node-45WW6I7J.js} +2 -2
- package/dist/cli/chunks/{domain-handler-DCMGAYXS.js → domain-handler-J7DQV74M.js} +2 -2
- package/dist/cli/chunks/domain-transfer-GD2EGQVR.js +2 -0
- package/dist/cli/chunks/dream-4K3BK4IG.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-7247LAU3.js → embed-and-insert-pattern-JELNEA2D.js} +2 -2
- package/dist/cli/chunks/{eval-6KR7TFOK.js → eval-A4PA5G2U.js} +2 -2
- package/dist/cli/chunks/{experience-capture-middleware-IIOR6RVV.js → experience-capture-middleware-MLHTYWTA.js} +3 -3
- package/dist/cli/chunks/{fast-paths-M7OGD4ZI.js → fast-paths-QYDTITRV.js} +2 -2
- package/dist/cli/chunks/{feature-flags-U75KFIGH.js → feature-flags-H4MSY26Z.js} +2 -2
- package/dist/cli/chunks/{feature-flags-GGUXHRJI.js → feature-flags-MQYYRHIK.js} +2 -2
- package/dist/cli/chunks/{file-discovery-V52AYEB7.js → file-discovery-RMFVJNGL.js} +2 -2
- package/dist/cli/chunks/{fleet-2UH72CK4.js → fleet-7KZQOTAC.js} +4 -4
- package/dist/cli/chunks/{gnn-wrapper-J2GDLT3P.js → gnn-wrapper-NMZFTGVH.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-QIDQHRXT.js → heartbeat-handler-7BQDK7MG.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-IMPPGQUK.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-EIAA6R2L.js +2 -0
- package/dist/cli/chunks/hnsw-index-ZXXP6AXZ.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-IU62PIY5.js → hnsw-legacy-bridge-TPPGBPKF.js} +2 -2
- package/dist/cli/chunks/{better-sqlite3-QNZJOJAB.js → hnswlib-node-E6NSZPP2.js} +2 -2
- package/dist/cli/chunks/{hooks-ZI4D3ATS.js → hooks-CYZIUYSH.js} +48 -52
- package/dist/cli/chunks/hybrid-router-LXWG4MLH.js +2 -0
- package/dist/cli/chunks/{hypergraph-engine-6JEERAGA.js → hypergraph-engine-WC6DMTYQ.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-YMDGYCB6.js → hypergraph-handler-GTGA3TXJ.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-TP5LRFYH.js +2 -0
- package/dist/cli/chunks/{init-handler-N57NW3QI.js → init-handler-N3Z72JNI.js} +6 -6
- package/dist/cli/chunks/init-wizard-AIOA5KOY.js +2 -0
- package/dist/cli/chunks/kernel-SQALRU6Q.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-7ABTGXJ5.js → kilocode-installer-FUX4V6II.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-2JFOHLVI.js → kiro-installer-ZSNZT7ZR.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-JFVT6SNN.js +2 -0
- package/dist/cli/chunks/{learning-3P3ZXRGD.js → learning-UQY64COU.js} +3 -3
- package/dist/cli/chunks/{llm-router-AWB2KHDW.js → llm-router-CMHGGX6N.js} +4 -4
- package/dist/cli/chunks/llm-router-service-XHFKTH3I.js +2 -0
- package/dist/cli/chunks/{load-GGVBCBGX.js → load-E6WH4QN2.js} +2 -2
- package/dist/cli/chunks/load-test-JEIFJKNN.js +2 -0
- package/dist/cli/chunks/{mcp-33NHIBN3.js → mcp-UM5VTW6N.js} +2 -2
- package/dist/cli/chunks/{memory-IVAQS4OW.js → memory-7Q3XDUE5.js} +5 -5
- package/dist/cli/chunks/memory-backend-NT7I37CP.js +2 -0
- package/dist/cli/chunks/memory-handlers-746D7NE7.js +2 -0
- package/dist/cli/chunks/{multi-model-executor-NWQY6IN2.js → multi-model-executor-LZENWVRR.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-FBB4JOEV.js → opencode-installer-O2JAIPLF.js} +2 -2
- package/dist/cli/chunks/{orchestrator-GDAXR7DH.js → orchestrator-DKZWXDRI.js} +5 -5
- package/dist/cli/chunks/pattern-null-store-6QU6WHDW.js +2 -0
- package/dist/cli/chunks/pattern-usage-recorder-CLUL4M55.js +2 -0
- package/dist/cli/chunks/{pipeline-VIKAOIBE.js → pipeline-2VDLTR5J.js} +2 -2
- package/dist/cli/chunks/{platform-FFVP36LH.js → platform-4N4Q5XYX.js} +2 -2
- package/dist/cli/chunks/{plugin-TI6QOLXH.js → plugin-GY5AU5CS.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-AZRNI2OL.js → prime-radiant-advanced-wasm-TQ4DKDZS.js} +2 -2
- package/dist/cli/chunks/protocol-executor-GT2MZYUU.js +2 -0
- package/dist/cli/chunks/{protocol-handler-J4EA34B3.js → protocol-handler-T3LZ3WRG.js} +2 -2
- package/dist/cli/chunks/{prove-ADVRMAWS.js → prove-OV7S5J4W.js} +2 -2
- package/dist/cli/chunks/provider-manager-OATJ7R3D.js +2 -0
- package/dist/cli/chunks/qe-reasoning-bank-IJXNQ67O.js +2 -0
- package/dist/cli/chunks/{quality-GB5SJFSD.js → quality-AXD4NLQA.js} +2 -2
- package/dist/cli/chunks/queen-coordinator-6RBHWCUG.js +2 -0
- package/dist/cli/chunks/{real-embeddings-GDRJ4XSH.js → real-embeddings-2PUCC7FG.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-Q6EISUDV.js → roocode-installer-WJ5ARGLW.js} +2 -2
- package/dist/cli/chunks/router-XKQRT5JK.js +2 -0
- package/dist/cli/chunks/routing-feedback-ACPSD4LW.js +2 -0
- package/dist/cli/chunks/{routing-handler-RO4RTRAG.js → routing-handler-CU6657SZ.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-FFIHCGVQ.js → ruvector-commands-IIF6VSFW.js} +2 -2
- package/dist/cli/chunks/{rvf-dual-writer-JGEK3A5Y.js → rvf-dual-writer-YMQI7XO2.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-adapter-OVYC4QM6.js → rvf-migration-adapter-HDE3PR2W.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-coordinator-U6L77QTS.js → rvf-migration-coordinator-MQV5OA7K.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-SIWRKE33.js +2 -0
- package/dist/cli/chunks/safe-db-LCPUYMX4.js +2 -0
- package/dist/cli/chunks/schedule-HIQJCWXG.js +2 -0
- package/dist/cli/chunks/scheduler-QE5EJ5LE.js +2 -0
- package/dist/cli/chunks/{security-QPQIDAIL.js → security-UM3IGDSM.js} +3 -3
- package/dist/cli/chunks/{shared-rvf-adapter-JRJTI4UD.js → shared-rvf-adapter-I3SOJ6M4.js} +2 -2
- package/dist/cli/chunks/{shared-rvf-dual-writer-DSHGURDA.js → shared-rvf-dual-writer-KQGC2UO7.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-EU54UTMH.js +2 -0
- package/dist/cli/chunks/status-handler-OX4CJZME.js +46 -0
- package/dist/cli/chunks/{structural-health-UVECCN7U.js → structural-health-PYUMVBXJ.js} +2 -2
- package/dist/cli/chunks/{sync-XXIGTGCG.js → sync-2TED3YTY.js} +2 -2
- package/dist/cli/chunks/{sync-ZLZ4CZFJ.js → sync-VALFNTA6.js} +2 -2
- package/dist/cli/chunks/{task-handler-73YAVOKJ.js → task-handler-VPGAJVPC.js} +2 -2
- package/dist/cli/chunks/{task-handlers-PKECV27D.js → task-handlers-IB4UAMU6.js} +3 -3
- package/dist/cli/chunks/{test-U3SXW4SV.js → test-OMRJOZB6.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-POJND3GV.js → test-scheduling-ZL3YFPBU.js} +3 -3
- package/dist/cli/chunks/{token-bootstrap-ICX6SIXJ.js → token-bootstrap-DNWZI7SH.js} +2 -2
- package/dist/cli/chunks/{token-usage-WCHJUVGT.js → token-usage-IYO7RGFF.js} +2 -2
- package/dist/cli/chunks/{transformers-L77UIHIY.js → transformers-53ALC34T.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-CVAXURQP.js → tree-sitter-wasm-parser-WUKJ2I2Q.js} +2 -2
- package/dist/cli/chunks/{types-LNVJBDM2.js → types-47FTEPMV.js} +2 -2
- package/dist/cli/chunks/unified-memory-CJLMC2I4.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-FDGR4D2J.js +2 -0
- package/dist/cli/chunks/unified-persistence-UFH5GLDN.js +2 -0
- package/dist/cli/chunks/{upgrade-4ND5RQFY.js → upgrade-QPLMJA5Z.js} +2 -2
- package/dist/cli/chunks/{validate-ZA4XT6K2.js → validate-3GVKZOVF.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-FNK3GCJ4.js → validate-swarm-XCRTLVM6.js} +2 -2
- package/dist/cli/chunks/{vibium-E2CK2GBQ.js → vibium-CH4VPKVZ.js} +2 -2
- package/dist/cli/chunks/visual-security-4ARJ7J2Y.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-63VRNKZV.js → web-tree-sitter-JDBNAZTV.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-5BTCVOLH.js → windsurf-installer-3MNPVJBP.js} +2 -2
- package/dist/cli/chunks/witness-chain-73QC33ED.js +2 -0
- package/dist/cli/chunks/{witness-chain-6CUUGISD.js → witness-chain-HR5UBV5J.js} +2 -2
- package/dist/cli/chunks/witness-key-manager-G5SQTIBZ.js +2 -0
- package/dist/cli/chunks/{workflow-V7ED22XT.js → workflow-43EMD5FY.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-RKMMPXNA.js +2 -0
- package/dist/cli/chunks/{wrappers-7S3NTTLW.js → wrappers-3N7AYNM3.js} +2 -2
- package/dist/cli/commands/audit.d.ts +12 -0
- package/dist/cli/commands/audit.js +64 -4
- package/dist/cli/commands/hooks-handlers/hooks-dream-learning.js +45 -19
- package/dist/cli/commands/hooks-handlers/hooks-shared.d.ts +13 -0
- package/dist/cli/commands/hooks-handlers/hooks-shared.js +38 -0
- package/dist/cli/commands/hooks-handlers/task-hooks.js +19 -1
- package/dist/cli/handlers/status-handler.d.ts +18 -0
- package/dist/cli/handlers/status-handler.js +47 -0
- package/dist/coordination/consensus/providers/ollama-provider.js +3 -2
- package/dist/coordination/mincut/queen-integration.js +24 -7
- package/dist/coordination/protocol-executor.js +2 -1
- package/dist/coordination/queen-lifecycle.js +4 -1
- package/dist/domains/code-intelligence/coordinator.js +10 -6
- package/dist/domains/code-intelligence/services/product-factors-bridge.js +3 -1
- package/dist/domains/defect-intelligence/services/defect-predictor.d.ts +6 -0
- package/dist/domains/defect-intelligence/services/defect-predictor.js +21 -0
- package/dist/domains/learning-optimization/interfaces.d.ts +7 -0
- package/dist/domains/learning-optimization/plugin.js +5 -0
- package/dist/domains/learning-optimization/services/learning-coordinator.d.ts +10 -0
- package/dist/domains/learning-optimization/services/learning-coordinator.js +57 -0
- package/dist/domains/test-execution/plugin.js +2 -2
- package/dist/domains/test-execution/services/flaky-detector.js +1 -1
- package/dist/domains/test-generation/coordinator.js +22 -8
- package/dist/domains/test-generation/interfaces.d.ts +3 -0
- package/dist/domains/test-generation/services/test-generator.js +9 -1
- package/dist/integrations/ruvector/delta-tracker.js +10 -1
- package/dist/integrations/ruvector/proof-gate.d.ts +68 -0
- package/dist/integrations/ruvector/proof-gate.js +135 -0
- package/dist/integrations/ruvector/sona-persistence.d.ts +24 -0
- package/dist/integrations/ruvector/sona-persistence.js +76 -0
- package/dist/integrations/ruvector/sona-three-loop.d.ts +15 -0
- package/dist/integrations/ruvector/sona-three-loop.js +17 -0
- package/dist/kernel/unified-memory-schemas.d.ts +2 -2
- package/dist/kernel/unified-memory-schemas.js +48 -2
- package/dist/kernel/unified-memory.d.ts +57 -0
- package/dist/kernel/unified-memory.js +148 -0
- package/dist/learning/aqe-learning-engine.js +3 -1
- package/dist/learning/dream/concept-graph.d.ts +31 -1
- package/dist/learning/dream/concept-graph.js +109 -3
- package/dist/learning/dream/dream-engine.d.ts +13 -1
- package/dist/learning/dream/dream-engine.js +146 -10
- package/dist/learning/dream/index.d.ts +1 -1
- package/dist/learning/dream/types.d.ts +23 -0
- package/dist/learning/local-judge-client.js +2 -1
- package/dist/learning/pattern-store.d.ts +2 -2
- package/dist/learning/pattern-store.js +14 -3
- package/dist/learning/qe-reasoning-bank.js +34 -31
- package/dist/learning/routing-topology-gate.d.ts +12 -2
- package/dist/learning/routing-topology-gate.js +15 -3
- package/dist/learning/rvf-pattern-store.d.ts +1 -1
- package/dist/learning/rvf-pattern-store.js +21 -8
- package/dist/learning/sqlite-persistence.js +12 -9
- package/dist/mcp/bundle.js +524 -445
- package/dist/mcp/qe-tool-bridge.js +7 -2
- package/dist/mcp/tools/base.d.ts +29 -0
- package/dist/mcp/tools/base.js +25 -0
- package/dist/mcp/tools/coverage-analysis/index.js +6 -4
- package/dist/mcp/tools/learning-optimization/dream.d.ts +4 -13
- package/dist/mcp/tools/learning-optimization/dream.js +10 -96
- package/dist/mcp/tools/planning/goap-execute.d.ts +13 -1
- package/dist/mcp/tools/planning/goap-execute.js +33 -18
- package/dist/mcp/tools/registry.js +7 -2
- package/dist/persistence/rvf-migration-coordinator.js +2 -1
- package/dist/planning/actions/qe-action-library.js +124 -1
- package/dist/planning/goap-planner.d.ts +14 -2
- package/dist/planning/goap-planner.js +51 -9
- package/dist/planning/index.d.ts +1 -1
- package/dist/planning/plan-executor.d.ts +84 -4
- package/dist/planning/plan-executor.js +221 -56
- package/dist/planning/types.d.ts +27 -0
- package/dist/routing/free-tier/coordinator-support.d.ts +6 -3
- package/dist/routing/free-tier/coordinator-support.js +6 -3
- package/dist/routing/free-tier/executor.d.ts +14 -0
- package/dist/routing/free-tier/executor.js +21 -0
- package/dist/routing/free-tier/index.d.ts +1 -0
- package/dist/routing/free-tier/index.js +1 -0
- package/dist/routing/free-tier/pattern-cache.d.ts +57 -0
- package/dist/routing/free-tier/pattern-cache.js +148 -0
- package/dist/routing/free-tier/provider.js +9 -1
- package/dist/routing/value-score.js +3 -0
- package/dist/shared/embeddings/ollama-client.js +2 -1
- package/dist/shared/events/domain-events.d.ts +2 -0
- package/dist/shared/llm/model-mapping.js +26 -0
- package/dist/shared/llm/model-registry.d.ts +10 -0
- package/dist/shared/llm/model-registry.js +92 -0
- package/dist/shared/llm/ollama-url.d.ts +17 -0
- package/dist/shared/llm/ollama-url.js +25 -0
- package/dist/shared/llm/providers/ollama-timeout.d.ts +26 -0
- package/dist/shared/llm/providers/ollama-timeout.js +31 -0
- package/dist/shared/llm/providers/ollama.d.ts +10 -0
- package/dist/shared/llm/providers/ollama.js +31 -4
- package/dist/shared/llm/router/hybrid-router.js +18 -1
- package/dist/workers/workers/learning-consolidation.js +21 -1
- package/package.json +5 -1
- package/dist/cli/chunks/adapter-IU3H3MD7.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-BGOC63IN.js +0 -2
- package/dist/cli/chunks/audit-TTWAAV7P.js +0 -3
- package/dist/cli/chunks/base-DVPRE3WO.js +0 -2
- package/dist/cli/chunks/brain-handler-FXPLJCPV.js +0 -89
- package/dist/cli/chunks/browser-workflow-MP5P7KZF.js +0 -2
- package/dist/cli/chunks/chunk-2SZQDTI5.js +0 -2
- package/dist/cli/chunks/chunk-6IHB3T6M.js +0 -2
- package/dist/cli/chunks/chunk-7PDUD7FF.js +0 -2
- package/dist/cli/chunks/chunk-EBCUWMLX.js +0 -27
- package/dist/cli/chunks/chunk-NWUVXLBB.js +0 -65
- package/dist/cli/chunks/chunk-OCACCUFO.js +0 -2
- package/dist/cli/chunks/chunk-PY2Q6MN3.js +0 -24
- package/dist/cli/chunks/chunk-UNH2DE2G.js +0 -2
- package/dist/cli/chunks/client-ADCDBTEE.js +0 -2
- package/dist/cli/chunks/core-handlers-HCACMLUW.js +0 -2
- package/dist/cli/chunks/cross-domain-router-HXFQAU4M.js +0 -2
- package/dist/cli/chunks/daemon-ZSK6CLQR.js +0 -10
- package/dist/cli/chunks/domain-transfer-UWFKBZTJ.js +0 -2
- package/dist/cli/chunks/dream-SVWQH62A.js +0 -2
- package/dist/cli/chunks/heartbeat-scheduler-QW5TW5QS.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-D6EJWYAL.js +0 -2
- package/dist/cli/chunks/hnsw-index-4MWR4U5W.js +0 -2
- package/dist/cli/chunks/hybrid-router-BYVUBHER.js +0 -2
- package/dist/cli/chunks/impact-analyzer-OK2UIMSG.js +0 -2
- package/dist/cli/chunks/init-wizard-6NNPNS6J.js +0 -2
- package/dist/cli/chunks/kernel-F4A4GRNO.js +0 -2
- package/dist/cli/chunks/knowledge-graph-MSJDEZCF.js +0 -2
- package/dist/cli/chunks/llm-router-service-27IQAO7G.js +0 -2
- package/dist/cli/chunks/load-test-TT5VLAN7.js +0 -2
- package/dist/cli/chunks/memory-backend-FVSK53IM.js +0 -2
- package/dist/cli/chunks/memory-handlers-OPUDOZNT.js +0 -2
- package/dist/cli/chunks/pattern-null-store-7MVEDWCY.js +0 -2
- package/dist/cli/chunks/protocol-executor-BLDDYEJ4.js +0 -2
- package/dist/cli/chunks/provider-manager-ZYCFRYZQ.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-P66CCPHM.js +0 -2
- package/dist/cli/chunks/queen-coordinator-LPHT3SX5.js +0 -2
- package/dist/cli/chunks/router-XQ2TERUT.js +0 -2
- package/dist/cli/chunks/routing-feedback-K52O752B.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-G4DV7FK3.js +0 -2
- package/dist/cli/chunks/safe-db-TMSEITES.js +0 -2
- package/dist/cli/chunks/schedule-RWFLA43O.js +0 -2
- package/dist/cli/chunks/scheduler-2V55MJJR.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-L7QM6IWF.js +0 -2
- package/dist/cli/chunks/status-handler-SBT3MZTX.js +0 -45
- package/dist/cli/chunks/unified-memory-ZSULA46X.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-SQEWFUBN.js +0 -2
- package/dist/cli/chunks/unified-persistence-EDCTT6SE.js +0 -2
- package/dist/cli/chunks/visual-security-SOGAETFP.js +0 -2
- package/dist/cli/chunks/witness-chain-AJCECBH5.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-UXRUCOZR.js +0 -2
|
@@ -13,6 +13,15 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import type { GOAPPlan, ExecutionStep, V3WorldState } from './types.js';
|
|
15
15
|
import type { GOAPPlanner } from './goap-planner.js';
|
|
16
|
+
import type { DomainName } from '../shared/types/index.js';
|
|
17
|
+
/**
|
|
18
|
+
* A14: resolves a real, initialized domain plugin's public API — the same
|
|
19
|
+
* shape `Kernel.getDomainAPI<T>()` returns and `DefaultProtocolExecutor`
|
|
20
|
+
* dispatches through. Returns undefined when the domain isn't loaded/no
|
|
21
|
+
* kernel is available; PlanExecutor must degrade to a clear "not
|
|
22
|
+
* available" error, never a fabricated result, when this returns undefined.
|
|
23
|
+
*/
|
|
24
|
+
export type GetDomainAPIFn = (domain: DomainName) => unknown | undefined;
|
|
16
25
|
/**
|
|
17
26
|
* Configuration for plan execution
|
|
18
27
|
*/
|
|
@@ -34,6 +43,16 @@ export interface ExecutionConfig {
|
|
|
34
43
|
* @default true
|
|
35
44
|
*/
|
|
36
45
|
useUnified: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* A14: when true, every step is simulated via the injected AgentSpawner
|
|
48
|
+
* regardless of an action's `implemented` flag — for previews/testing.
|
|
49
|
+
* When false (default), implemented actions dispatch to a real domain API
|
|
50
|
+
* method (via the constructor's `getDomainAPI`); actions with no real
|
|
51
|
+
* binding return a clear "not implemented" failure rather than a
|
|
52
|
+
* simulated success.
|
|
53
|
+
* @default false
|
|
54
|
+
*/
|
|
55
|
+
dryRun: boolean;
|
|
37
56
|
}
|
|
38
57
|
/**
|
|
39
58
|
* Result of executing a complete plan
|
|
@@ -118,6 +137,18 @@ export interface AgentSpawner {
|
|
|
118
137
|
* ```
|
|
119
138
|
*/
|
|
120
139
|
export declare class PlanExecutor {
|
|
140
|
+
/**
|
|
141
|
+
* A14: resolves real domain plugin APIs, mirroring
|
|
142
|
+
* DefaultProtocolExecutor's constructor-injected getDomainAPI. When
|
|
143
|
+
* provided (non-undefined), `implemented: true` actions dispatch to a
|
|
144
|
+
* real domain method instead of the simulated `spawner` — this is an
|
|
145
|
+
* opt-in so every EXISTING caller/test that constructs a PlanExecutor
|
|
146
|
+
* without this param keeps its current (simulated) behavior unchanged.
|
|
147
|
+
* `implemented: false` actions always fail clearly regardless of this
|
|
148
|
+
* param — fabricating success for a known-unimplemented action is
|
|
149
|
+
* exactly the problem this exists to eliminate.
|
|
150
|
+
*/
|
|
151
|
+
private readonly getDomainAPI?;
|
|
121
152
|
private db;
|
|
122
153
|
private planner;
|
|
123
154
|
private spawner;
|
|
@@ -133,13 +164,32 @@ export declare class PlanExecutor {
|
|
|
133
164
|
* @param dbPath - Path to SQLite database (defaults to in-memory, ignored if useUnified=true)
|
|
134
165
|
* @param config - Execution configuration options
|
|
135
166
|
*/
|
|
136
|
-
constructor(planner: GOAPPlanner, spawner: AgentSpawner, dbPath?: string, config?: Partial<ExecutionConfig
|
|
167
|
+
constructor(planner: GOAPPlanner, spawner: AgentSpawner, dbPath?: string, config?: Partial<ExecutionConfig>,
|
|
168
|
+
/**
|
|
169
|
+
* A14: resolves real domain plugin APIs, mirroring
|
|
170
|
+
* DefaultProtocolExecutor's constructor-injected getDomainAPI. When
|
|
171
|
+
* provided (non-undefined), `implemented: true` actions dispatch to a
|
|
172
|
+
* real domain method instead of the simulated `spawner` — this is an
|
|
173
|
+
* opt-in so every EXISTING caller/test that constructs a PlanExecutor
|
|
174
|
+
* without this param keeps its current (simulated) behavior unchanged.
|
|
175
|
+
* `implemented: false` actions always fail clearly regardless of this
|
|
176
|
+
* param — fabricating success for a known-unimplemented action is
|
|
177
|
+
* exactly the problem this exists to eliminate.
|
|
178
|
+
*/
|
|
179
|
+
getDomainAPI?: GetDomainAPIFn | undefined);
|
|
137
180
|
/**
|
|
138
181
|
* Initialize the executor - creates database tables
|
|
139
182
|
*/
|
|
140
183
|
initialize(): Promise<void>;
|
|
141
184
|
/**
|
|
142
|
-
* Create execution tracking tables
|
|
185
|
+
* Create execution tracking tables.
|
|
186
|
+
*
|
|
187
|
+
* A14: previously invented parallel execution_results/executed_steps
|
|
188
|
+
* tables with no relationship to the canonical schema. Now uses the same
|
|
189
|
+
* goap_execution_steps table the unified-storage path relies on (created
|
|
190
|
+
* via unified-memory-schemas.ts's GOAP_SCHEMA + v11 migration) — this
|
|
191
|
+
* legacy (non-unified) path just needs to create it directly since it
|
|
192
|
+
* doesn't go through that migration chain.
|
|
143
193
|
*/
|
|
144
194
|
private createTables;
|
|
145
195
|
/**
|
|
@@ -164,6 +214,16 @@ export declare class PlanExecutor {
|
|
|
164
214
|
* Execute a single step
|
|
165
215
|
*/
|
|
166
216
|
private executeStep;
|
|
217
|
+
/**
|
|
218
|
+
* A14: dispatch an `implemented: true` action to its real domain API
|
|
219
|
+
* method — mirrors DefaultProtocolExecutor.executeAction()'s resolve →
|
|
220
|
+
* lookup → invoke pattern, but for GOAPActions instead of ProtocolActions.
|
|
221
|
+
* Every non-success path returns a clear, specific reason (no domain
|
|
222
|
+
* loaded, no such method, threw, timed out) rather than a generic
|
|
223
|
+
* failure — this is what a user should see instead of a fabricated
|
|
224
|
+
* `successRate: 0.95` roll.
|
|
225
|
+
*/
|
|
226
|
+
private executeRealAction;
|
|
167
227
|
/**
|
|
168
228
|
* Build a task description for an agent
|
|
169
229
|
*/
|
|
@@ -186,19 +246,39 @@ export declare class PlanExecutor {
|
|
|
186
246
|
*/
|
|
187
247
|
isExecuting(): boolean;
|
|
188
248
|
/**
|
|
189
|
-
* Get execution history
|
|
249
|
+
* Get execution history.
|
|
250
|
+
*
|
|
251
|
+
* A14: reconstructed from goap_execution_steps (grouped by execution_id)
|
|
252
|
+
* instead of read from an invented execution_results table. The
|
|
253
|
+
* execution-level `status` is derived, not stored directly — steps don't
|
|
254
|
+
* carry an execution-level concept of 'partial' (a replan-specific
|
|
255
|
+
* in-memory result of executeWithCallbacks' recursion), so a replanned
|
|
256
|
+
* execution that ultimately succeeded may read back here as 'completed'
|
|
257
|
+
* rather than 'partial'. 'cancelled' is inferred from recording fewer
|
|
258
|
+
* steps than the plan called for; 'failed' takes priority when any step
|
|
259
|
+
* failed.
|
|
190
260
|
*
|
|
191
261
|
* @param planId - Filter by plan ID (optional)
|
|
192
262
|
* @param limit - Maximum number of results (default: 100)
|
|
193
263
|
* @returns Array of execution results
|
|
194
264
|
*/
|
|
195
265
|
getExecutionHistory(planId?: string, limit?: number): Promise<ExecutionResult[]>;
|
|
266
|
+
/** Number of actions in a saved plan, or null if the plan can't be found/parsed. */
|
|
267
|
+
private getPlannedActionCount;
|
|
196
268
|
/**
|
|
197
269
|
* Get executed steps for an execution
|
|
198
270
|
*/
|
|
199
271
|
private getExecutedSteps;
|
|
200
272
|
/**
|
|
201
|
-
* Persist execution result to database
|
|
273
|
+
* Persist execution result to database.
|
|
274
|
+
*
|
|
275
|
+
* A14: writes to the canonical goap_execution_steps table (one row per
|
|
276
|
+
* step per execution attempt, grouped by executionId) instead of an
|
|
277
|
+
* invented execution_results/executed_steps pair. The execution-level
|
|
278
|
+
* summary (status/timing) that execution_results used to hold now lives
|
|
279
|
+
* on goap_plans itself — status/executed_at/completed_at were already
|
|
280
|
+
* part of that table's schema but never actually written by anything
|
|
281
|
+
* before this fix.
|
|
202
282
|
*/
|
|
203
283
|
private persistExecutionResult;
|
|
204
284
|
/**
|
|
@@ -27,7 +27,23 @@ const DEFAULT_CONFIG = {
|
|
|
27
27
|
parallelExecution: false,
|
|
28
28
|
recordWorldState: true,
|
|
29
29
|
useUnified: true, // ADR-046: Default to unified storage
|
|
30
|
+
dryRun: false, // A14: real dispatch is the default going forward
|
|
30
31
|
};
|
|
32
|
+
/**
|
|
33
|
+
* A14: safely render a real domain method's return value into
|
|
34
|
+
* ExecutedStep.agentOutput (a string field). Truncates to keep large
|
|
35
|
+
* results (e.g. a full coverage report) out of the execution log; never
|
|
36
|
+
* throws on circular references or non-serializable values.
|
|
37
|
+
*/
|
|
38
|
+
function safeStringify(value, maxLength = 2000) {
|
|
39
|
+
try {
|
|
40
|
+
const str = typeof value === 'string' ? value : JSON.stringify(value);
|
|
41
|
+
return str.length > maxLength ? `${str.slice(0, maxLength)}...(truncated)` : str;
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
return String(value);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
31
47
|
// ============================================================================
|
|
32
48
|
// Plan Executor Class
|
|
33
49
|
// ============================================================================
|
|
@@ -50,6 +66,7 @@ const DEFAULT_CONFIG = {
|
|
|
50
66
|
* ```
|
|
51
67
|
*/
|
|
52
68
|
export class PlanExecutor {
|
|
69
|
+
getDomainAPI;
|
|
53
70
|
db;
|
|
54
71
|
planner;
|
|
55
72
|
spawner;
|
|
@@ -65,7 +82,20 @@ export class PlanExecutor {
|
|
|
65
82
|
* @param dbPath - Path to SQLite database (defaults to in-memory, ignored if useUnified=true)
|
|
66
83
|
* @param config - Execution configuration options
|
|
67
84
|
*/
|
|
68
|
-
constructor(planner, spawner, dbPath, config
|
|
85
|
+
constructor(planner, spawner, dbPath, config,
|
|
86
|
+
/**
|
|
87
|
+
* A14: resolves real domain plugin APIs, mirroring
|
|
88
|
+
* DefaultProtocolExecutor's constructor-injected getDomainAPI. When
|
|
89
|
+
* provided (non-undefined), `implemented: true` actions dispatch to a
|
|
90
|
+
* real domain method instead of the simulated `spawner` — this is an
|
|
91
|
+
* opt-in so every EXISTING caller/test that constructs a PlanExecutor
|
|
92
|
+
* without this param keeps its current (simulated) behavior unchanged.
|
|
93
|
+
* `implemented: false` actions always fail clearly regardless of this
|
|
94
|
+
* param — fabricating success for a known-unimplemented action is
|
|
95
|
+
* exactly the problem this exists to eliminate.
|
|
96
|
+
*/
|
|
97
|
+
getDomainAPI) {
|
|
98
|
+
this.getDomainAPI = getDomainAPI;
|
|
69
99
|
this.planner = planner;
|
|
70
100
|
this.spawner = spawner;
|
|
71
101
|
this.config = { ...DEFAULT_CONFIG, ...config };
|
|
@@ -110,49 +140,39 @@ export class PlanExecutor {
|
|
|
110
140
|
this.initialized = true;
|
|
111
141
|
}
|
|
112
142
|
/**
|
|
113
|
-
* Create execution tracking tables
|
|
143
|
+
* Create execution tracking tables.
|
|
144
|
+
*
|
|
145
|
+
* A14: previously invented parallel execution_results/executed_steps
|
|
146
|
+
* tables with no relationship to the canonical schema. Now uses the same
|
|
147
|
+
* goap_execution_steps table the unified-storage path relies on (created
|
|
148
|
+
* via unified-memory-schemas.ts's GOAP_SCHEMA + v11 migration) — this
|
|
149
|
+
* legacy (non-unified) path just needs to create it directly since it
|
|
150
|
+
* doesn't go through that migration chain.
|
|
114
151
|
*/
|
|
115
152
|
createTables() {
|
|
116
|
-
// Execution results table
|
|
117
153
|
this.db.exec(`
|
|
118
|
-
CREATE TABLE IF NOT EXISTS
|
|
154
|
+
CREATE TABLE IF NOT EXISTS goap_execution_steps (
|
|
119
155
|
id TEXT PRIMARY KEY,
|
|
120
156
|
plan_id TEXT NOT NULL,
|
|
121
|
-
status TEXT NOT NULL,
|
|
122
|
-
steps_completed INTEGER DEFAULT 0,
|
|
123
|
-
steps_failed INTEGER DEFAULT 0,
|
|
124
|
-
total_duration_ms INTEGER DEFAULT 0,
|
|
125
|
-
final_world_state TEXT,
|
|
126
|
-
error_message TEXT,
|
|
127
|
-
created_at TEXT DEFAULT (datetime('now'))
|
|
128
|
-
)
|
|
129
|
-
`);
|
|
130
|
-
// Executed steps table
|
|
131
|
-
this.db.exec(`
|
|
132
|
-
CREATE TABLE IF NOT EXISTS executed_steps (
|
|
133
|
-
id TEXT PRIMARY KEY,
|
|
134
157
|
execution_id TEXT NOT NULL,
|
|
135
|
-
plan_id TEXT NOT NULL,
|
|
136
158
|
action_id TEXT NOT NULL,
|
|
137
159
|
step_order INTEGER NOT NULL,
|
|
138
|
-
|
|
160
|
+
world_state_before TEXT,
|
|
161
|
+
world_state_after TEXT,
|
|
162
|
+
status TEXT NOT NULL DEFAULT 'pending',
|
|
139
163
|
retries INTEGER DEFAULT 0,
|
|
140
|
-
started_at TEXT
|
|
141
|
-
completed_at TEXT,
|
|
164
|
+
started_at TEXT,
|
|
142
165
|
duration_ms INTEGER,
|
|
143
166
|
agent_id TEXT,
|
|
144
167
|
agent_output TEXT,
|
|
145
|
-
world_state_before TEXT,
|
|
146
|
-
world_state_after TEXT,
|
|
147
168
|
error_message TEXT,
|
|
148
|
-
|
|
169
|
+
created_at TEXT DEFAULT (datetime('now'))
|
|
149
170
|
)
|
|
150
171
|
`);
|
|
151
|
-
// Indexes
|
|
152
172
|
this.db.exec(`
|
|
153
|
-
CREATE INDEX IF NOT EXISTS
|
|
154
|
-
CREATE INDEX IF NOT EXISTS
|
|
155
|
-
CREATE INDEX IF NOT EXISTS
|
|
173
|
+
CREATE INDEX IF NOT EXISTS idx_goap_exec_steps_plan ON goap_execution_steps(plan_id);
|
|
174
|
+
CREATE INDEX IF NOT EXISTS idx_goap_exec_steps_execution ON goap_execution_steps(execution_id);
|
|
175
|
+
CREATE INDEX IF NOT EXISTS idx_goap_exec_steps_action ON goap_execution_steps(action_id);
|
|
156
176
|
`);
|
|
157
177
|
}
|
|
158
178
|
// ==========================================================================
|
|
@@ -316,6 +336,25 @@ export class PlanExecutor {
|
|
|
316
336
|
error: `Preconditions not met for action: ${action.name}`,
|
|
317
337
|
};
|
|
318
338
|
}
|
|
339
|
+
// A14: an action explicitly marked as having no real domain backing
|
|
340
|
+
// must never report a fabricated success — regardless of dryRun or
|
|
341
|
+
// whether a kernel is available. This is the actual fix for the "mock
|
|
342
|
+
// executor fabricates successRate: 0.95 results indistinguishable from
|
|
343
|
+
// real execution" problem: known-unimplemented actions now fail
|
|
344
|
+
// honestly instead of rolling dice.
|
|
345
|
+
if (action.implemented === false) {
|
|
346
|
+
return {
|
|
347
|
+
success: false,
|
|
348
|
+
newState: currentState,
|
|
349
|
+
error: `Action '${action.name}' has no real implementation yet (not simulated — see GOAPAction.implemented)`,
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
// A14: real dispatch — opt-in via constructor-injected getDomainAPI
|
|
353
|
+
// (mirrors DefaultProtocolExecutor). Existing callers that construct a
|
|
354
|
+
// PlanExecutor without it keep today's simulated behavior unchanged.
|
|
355
|
+
if (!this.config.dryRun && this.getDomainAPI && action.implemented === true) {
|
|
356
|
+
return this.executeRealAction(action, currentState);
|
|
357
|
+
}
|
|
319
358
|
// Build task description
|
|
320
359
|
const taskDescription = this.buildTaskDescription(action);
|
|
321
360
|
try {
|
|
@@ -350,6 +389,76 @@ export class PlanExecutor {
|
|
|
350
389
|
};
|
|
351
390
|
}
|
|
352
391
|
}
|
|
392
|
+
/**
|
|
393
|
+
* A14: dispatch an `implemented: true` action to its real domain API
|
|
394
|
+
* method — mirrors DefaultProtocolExecutor.executeAction()'s resolve →
|
|
395
|
+
* lookup → invoke pattern, but for GOAPActions instead of ProtocolActions.
|
|
396
|
+
* Every non-success path returns a clear, specific reason (no domain
|
|
397
|
+
* loaded, no such method, threw, timed out) rather than a generic
|
|
398
|
+
* failure — this is what a user should see instead of a fabricated
|
|
399
|
+
* `successRate: 0.95` roll.
|
|
400
|
+
*/
|
|
401
|
+
async executeRealAction(action, currentState) {
|
|
402
|
+
if (!action.qeDomain) {
|
|
403
|
+
return {
|
|
404
|
+
success: false,
|
|
405
|
+
newState: currentState,
|
|
406
|
+
error: `Action '${action.name}' has no qeDomain to resolve a real API from`,
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
if (!action.method) {
|
|
410
|
+
return {
|
|
411
|
+
success: false,
|
|
412
|
+
newState: currentState,
|
|
413
|
+
error: `Action '${action.name}' is marked implemented but has no method binding`,
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
let api;
|
|
417
|
+
try {
|
|
418
|
+
api = this.getDomainAPI(action.qeDomain);
|
|
419
|
+
}
|
|
420
|
+
catch (error) {
|
|
421
|
+
return {
|
|
422
|
+
success: false,
|
|
423
|
+
newState: currentState,
|
|
424
|
+
error: `Failed to resolve domain '${action.qeDomain}': ${toErrorMessage(error)}`,
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
if (!api) {
|
|
428
|
+
return {
|
|
429
|
+
success: false,
|
|
430
|
+
newState: currentState,
|
|
431
|
+
error: `Domain '${action.qeDomain}' is not available (kernel not initialized, or the domain isn't loaded — try fleet_init)`,
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
const method = api[action.method];
|
|
435
|
+
if (typeof method !== 'function') {
|
|
436
|
+
return {
|
|
437
|
+
success: false,
|
|
438
|
+
newState: currentState,
|
|
439
|
+
error: `Domain '${action.qeDomain}' has no method '${action.method}'`,
|
|
440
|
+
};
|
|
441
|
+
}
|
|
442
|
+
try {
|
|
443
|
+
const timeoutPromise = new Promise((_, reject) => setTimeout(() => reject(new Error(`Step timeout after ${this.config.stepTimeoutMs}ms`)), this.config.stepTimeoutMs));
|
|
444
|
+
const invokePromise = method.call(api, action.params ?? {});
|
|
445
|
+
const result = await Promise.race([invokePromise, timeoutPromise]);
|
|
446
|
+
const newState = this.applyEffects(currentState, action.effects);
|
|
447
|
+
return {
|
|
448
|
+
success: true,
|
|
449
|
+
newState,
|
|
450
|
+
output: safeStringify(result),
|
|
451
|
+
agentId: `domain:${action.qeDomain}`,
|
|
452
|
+
};
|
|
453
|
+
}
|
|
454
|
+
catch (error) {
|
|
455
|
+
return {
|
|
456
|
+
success: false,
|
|
457
|
+
newState: currentState,
|
|
458
|
+
error: toErrorMessage(error),
|
|
459
|
+
};
|
|
460
|
+
}
|
|
461
|
+
}
|
|
353
462
|
/**
|
|
354
463
|
* Build a task description for an agent
|
|
355
464
|
*/
|
|
@@ -420,7 +529,17 @@ export class PlanExecutor {
|
|
|
420
529
|
// Execution History
|
|
421
530
|
// ==========================================================================
|
|
422
531
|
/**
|
|
423
|
-
* Get execution history
|
|
532
|
+
* Get execution history.
|
|
533
|
+
*
|
|
534
|
+
* A14: reconstructed from goap_execution_steps (grouped by execution_id)
|
|
535
|
+
* instead of read from an invented execution_results table. The
|
|
536
|
+
* execution-level `status` is derived, not stored directly — steps don't
|
|
537
|
+
* carry an execution-level concept of 'partial' (a replan-specific
|
|
538
|
+
* in-memory result of executeWithCallbacks' recursion), so a replanned
|
|
539
|
+
* execution that ultimately succeeded may read back here as 'completed'
|
|
540
|
+
* rather than 'partial'. 'cancelled' is inferred from recording fewer
|
|
541
|
+
* steps than the plan called for; 'failed' takes priority when any step
|
|
542
|
+
* failed.
|
|
424
543
|
*
|
|
425
544
|
* @param planId - Filter by plan ID (optional)
|
|
426
545
|
* @param limit - Maximum number of results (default: 100)
|
|
@@ -428,37 +547,65 @@ export class PlanExecutor {
|
|
|
428
547
|
*/
|
|
429
548
|
async getExecutionHistory(planId, limit = 100) {
|
|
430
549
|
await this.initialize();
|
|
431
|
-
let query =
|
|
550
|
+
let query = `
|
|
551
|
+
SELECT
|
|
552
|
+
execution_id,
|
|
553
|
+
plan_id,
|
|
554
|
+
MIN(created_at) as started_at,
|
|
555
|
+
SUM(CASE WHEN status = 'completed' THEN 1 ELSE 0 END) as steps_completed,
|
|
556
|
+
SUM(CASE WHEN status = 'failed' THEN 1 ELSE 0 END) as steps_failed,
|
|
557
|
+
SUM(COALESCE(duration_ms, 0)) as total_duration_ms,
|
|
558
|
+
COUNT(*) as steps_recorded,
|
|
559
|
+
MAX(CASE WHEN status = 'failed' THEN error_message END) as last_error
|
|
560
|
+
FROM goap_execution_steps
|
|
561
|
+
`;
|
|
432
562
|
const params = [];
|
|
433
563
|
if (planId) {
|
|
434
564
|
query += ' WHERE plan_id = ?';
|
|
435
565
|
params.push(planId);
|
|
436
566
|
}
|
|
437
|
-
query += ' ORDER BY
|
|
567
|
+
query += ' GROUP BY execution_id, plan_id ORDER BY started_at DESC LIMIT ?';
|
|
438
568
|
params.push(limit);
|
|
439
569
|
const rows = this.db.prepare(query).all(...params);
|
|
440
570
|
return Promise.all(rows.map(async (row) => {
|
|
441
|
-
const steps = await this.getExecutedSteps(row.
|
|
571
|
+
const steps = await this.getExecutedSteps(row.execution_id);
|
|
572
|
+
const finalWorldState = [...steps].reverse().find((s) => s.worldStateAfter)?.worldStateAfter;
|
|
573
|
+
const plannedStepCount = this.getPlannedActionCount(row.plan_id);
|
|
574
|
+
let status;
|
|
575
|
+
if (row.steps_failed > 0)
|
|
576
|
+
status = 'failed';
|
|
577
|
+
else if (plannedStepCount != null && row.steps_recorded < plannedStepCount)
|
|
578
|
+
status = 'cancelled';
|
|
579
|
+
else
|
|
580
|
+
status = 'completed';
|
|
442
581
|
return {
|
|
443
582
|
planId: row.plan_id,
|
|
444
|
-
status
|
|
583
|
+
status,
|
|
445
584
|
stepsCompleted: row.steps_completed,
|
|
446
585
|
stepsFailed: row.steps_failed,
|
|
447
586
|
totalDurationMs: row.total_duration_ms,
|
|
448
|
-
finalWorldState
|
|
449
|
-
|
|
450
|
-
: undefined,
|
|
451
|
-
error: row.error_message ?? undefined,
|
|
587
|
+
finalWorldState,
|
|
588
|
+
error: row.last_error ?? undefined,
|
|
452
589
|
steps,
|
|
453
590
|
};
|
|
454
591
|
}));
|
|
455
592
|
}
|
|
593
|
+
/** Number of actions in a saved plan, or null if the plan can't be found/parsed. */
|
|
594
|
+
getPlannedActionCount(planId) {
|
|
595
|
+
const row = this.db
|
|
596
|
+
.prepare('SELECT action_sequence FROM goap_plans WHERE id = ?')
|
|
597
|
+
.get(planId);
|
|
598
|
+
if (!row)
|
|
599
|
+
return null;
|
|
600
|
+
const actionIds = safeJsonParse(row.action_sequence);
|
|
601
|
+
return Array.isArray(actionIds) ? actionIds.length : null;
|
|
602
|
+
}
|
|
456
603
|
/**
|
|
457
604
|
* Get executed steps for an execution
|
|
458
605
|
*/
|
|
459
606
|
async getExecutedSteps(executionId) {
|
|
460
607
|
const rows = this.db
|
|
461
|
-
.prepare(`SELECT * FROM
|
|
608
|
+
.prepare(`SELECT * FROM goap_execution_steps WHERE execution_id = ? ORDER BY step_order`)
|
|
462
609
|
.all(executionId);
|
|
463
610
|
return rows.map((row) => ({
|
|
464
611
|
id: row.id,
|
|
@@ -480,8 +627,10 @@ export class PlanExecutor {
|
|
|
480
627
|
agentId: row.agent_id ?? undefined,
|
|
481
628
|
error: row.error_message ?? undefined,
|
|
482
629
|
retries: row.retries,
|
|
483
|
-
startedAt: new Date(row.started_at),
|
|
484
|
-
completedAt: row.
|
|
630
|
+
startedAt: row.started_at ? new Date(row.started_at) : new Date(row.created_at),
|
|
631
|
+
completedAt: row.started_at && row.duration_ms != null
|
|
632
|
+
? new Date(new Date(row.started_at).getTime() + row.duration_ms)
|
|
633
|
+
: undefined,
|
|
485
634
|
agentOutput: row.agent_output ?? undefined,
|
|
486
635
|
worldStateBefore: row.world_state_before
|
|
487
636
|
? safeJsonParse(row.world_state_before)
|
|
@@ -495,28 +644,44 @@ export class PlanExecutor {
|
|
|
495
644
|
// Persistence
|
|
496
645
|
// ==========================================================================
|
|
497
646
|
/**
|
|
498
|
-
* Persist execution result to database
|
|
647
|
+
* Persist execution result to database.
|
|
648
|
+
*
|
|
649
|
+
* A14: writes to the canonical goap_execution_steps table (one row per
|
|
650
|
+
* step per execution attempt, grouped by executionId) instead of an
|
|
651
|
+
* invented execution_results/executed_steps pair. The execution-level
|
|
652
|
+
* summary (status/timing) that execution_results used to hold now lives
|
|
653
|
+
* on goap_plans itself — status/executed_at/completed_at were already
|
|
654
|
+
* part of that table's schema but never actually written by anything
|
|
655
|
+
* before this fix.
|
|
499
656
|
*/
|
|
500
657
|
async persistExecutionResult(executionId, result) {
|
|
501
|
-
// Insert execution result
|
|
502
|
-
this.db
|
|
503
|
-
.prepare(`
|
|
504
|
-
INSERT INTO execution_results (
|
|
505
|
-
id, plan_id, status, steps_completed, steps_failed,
|
|
506
|
-
total_duration_ms, final_world_state, error_message
|
|
507
|
-
) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
|
|
508
|
-
`)
|
|
509
|
-
.run(executionId, result.planId, result.status, result.stepsCompleted, result.stepsFailed, result.totalDurationMs, result.finalWorldState ? JSON.stringify(result.finalWorldState) : null, result.error ?? null);
|
|
510
|
-
// Insert executed steps
|
|
511
658
|
const insertStep = this.db.prepare(`
|
|
512
|
-
INSERT INTO
|
|
513
|
-
id,
|
|
514
|
-
retries, started_at,
|
|
659
|
+
INSERT INTO goap_execution_steps (
|
|
660
|
+
id, plan_id, execution_id, action_id, step_order, status,
|
|
661
|
+
retries, started_at, duration_ms, agent_id,
|
|
515
662
|
agent_output, world_state_before, world_state_after, error_message
|
|
516
|
-
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
|
|
663
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
517
664
|
`);
|
|
518
665
|
for (const step of result.steps) {
|
|
519
|
-
insertStep.run(step.id,
|
|
666
|
+
insertStep.run(step.id, step.planId, executionId, step.action.id, step.stepOrder, step.status, step.retries, step.startedAt.toISOString(), step.durationMs ?? null, step.agentId ?? null, step.agentOutput ?? null, step.worldStateBefore ? JSON.stringify(step.worldStateBefore) : null, step.worldStateAfter ? JSON.stringify(step.worldStateAfter) : null, step.error ?? null);
|
|
667
|
+
}
|
|
668
|
+
// Reflects only the most recent execution attempt for this plan — a
|
|
669
|
+
// deliberate, documented scope limit: goap_plans is one row per plan,
|
|
670
|
+
// not per attempt. Full per-attempt history remains queryable via
|
|
671
|
+
// goap_execution_steps grouped by execution_id (see getExecutionHistory).
|
|
672
|
+
try {
|
|
673
|
+
this.db.prepare(`
|
|
674
|
+
UPDATE goap_plans SET status = ?, executed_at = COALESCE(executed_at, ?), completed_at = ?
|
|
675
|
+
WHERE id = ?
|
|
676
|
+
`).run(result.status === 'completed' ? 'completed'
|
|
677
|
+
: result.status === 'cancelled' ? 'cancelled'
|
|
678
|
+
: 'failed', new Date(Date.now() - result.totalDurationMs).toISOString(), new Date().toISOString(), result.planId);
|
|
679
|
+
}
|
|
680
|
+
catch (error) {
|
|
681
|
+
// Best-effort — a plan row might not exist yet in edge cases (e.g.
|
|
682
|
+
// executing a plan object that was never saved). Must not fail the
|
|
683
|
+
// execution result the caller is waiting on.
|
|
684
|
+
console.warn('[PlanExecutor] Failed to update goap_plans status (non-fatal):', error);
|
|
520
685
|
}
|
|
521
686
|
}
|
|
522
687
|
/**
|
package/dist/planning/types.d.ts
CHANGED
|
@@ -123,6 +123,27 @@ export interface GOAPAction {
|
|
|
123
123
|
category: 'test' | 'security' | 'performance' | 'analysis' | 'coverage' | 'fleet' | 'quality';
|
|
124
124
|
/** QE domain this action belongs to */
|
|
125
125
|
qeDomain?: QEDomain;
|
|
126
|
+
/**
|
|
127
|
+
* A14: real domain API method to invoke when this action is executed —
|
|
128
|
+
* `kernel.getDomainAPI(qeDomain)[method](params)`, mirroring how
|
|
129
|
+
* DefaultProtocolExecutor dispatches ProtocolActions. Undefined when
|
|
130
|
+
* `implemented` is not true.
|
|
131
|
+
*/
|
|
132
|
+
method?: string;
|
|
133
|
+
/**
|
|
134
|
+
* Static params template passed to `method`. GOAP actions are abstract
|
|
135
|
+
* plan steps (not bound to concrete files/targets at definition time),
|
|
136
|
+
* so this is often `{}` — many real domain methods need runtime context
|
|
137
|
+
* a plan step doesn't carry, and will legitimately error on missing
|
|
138
|
+
* required params rather than being fabricated a plausible-looking value.
|
|
139
|
+
*/
|
|
140
|
+
params?: Record<string, unknown>;
|
|
141
|
+
/**
|
|
142
|
+
* True only when `method` names a real, non-stub domain API method.
|
|
143
|
+
* Actions without a real implementation MUST report "not implemented"
|
|
144
|
+
* when executed, not a fabricated success/failure — see GOAPExecutor.
|
|
145
|
+
*/
|
|
146
|
+
implemented?: boolean;
|
|
126
147
|
}
|
|
127
148
|
/**
|
|
128
149
|
* GOAP Goal - Target state to achieve through planning
|
|
@@ -240,6 +261,12 @@ export interface GOAPActionRecord {
|
|
|
240
261
|
qe_domain: string | null;
|
|
241
262
|
created_at: string;
|
|
242
263
|
updated_at: string;
|
|
264
|
+
/** A14: real domain API method binding, null when not implemented */
|
|
265
|
+
method: string | null;
|
|
266
|
+
/** A14: JSON params template */
|
|
267
|
+
params: string | null;
|
|
268
|
+
/** A14: 1 when `method` is a real (non-stub) domain API binding, else 0 */
|
|
269
|
+
implemented: number;
|
|
243
270
|
}
|
|
244
271
|
/**
|
|
245
272
|
* Database record for goap_plans table
|
|
@@ -14,9 +14,12 @@
|
|
|
14
14
|
import { FreeTierEscalatingExecutor, type QeExecutionResult, type QeVerifier } from './executor.js';
|
|
15
15
|
import { type RoutingFeedbackLike } from './feedback-sink.js';
|
|
16
16
|
import type { FreeTierProviderConfig } from './types.js';
|
|
17
|
-
/** Default cheap tier. qwen3:30b
|
|
18
|
-
*
|
|
19
|
-
|
|
17
|
+
/** Default cheap tier. qwen3-coder:30b — same 30B MoE class/RAM as qwen3:30b-a3b
|
|
18
|
+
* and IDENTICAL measured quality (2026-06-29 oracle bench, 8 fixtures: both 6/8,
|
|
19
|
+
* 75% avg mutation kill), but ~14× faster wall-clock (the code-tuned model does
|
|
20
|
+
* not spend ~70s "thinking" before answering). qwen3:8b stays off-default: D3
|
|
21
|
+
* measured it well below this (3/8). */
|
|
22
|
+
export declare const DEFAULT_FREE_TIER_MODEL = "qwen3-coder:30b";
|
|
20
23
|
/** Per-coordinator config knobs (mix into a coordinator's CoordinatorConfig). */
|
|
21
24
|
export interface FreeTierCoordinatorConfig {
|
|
22
25
|
/** Opt-in the cheap-first free local tier. Also via env `AQE_FREE_TIER=1`. */
|
|
@@ -14,9 +14,12 @@
|
|
|
14
14
|
import { FreeTierEscalatingExecutor } from './executor.js';
|
|
15
15
|
import { defaultFreeTierLadder } from './ladder.js';
|
|
16
16
|
import { createRoutingFeedbackSink } from './feedback-sink.js';
|
|
17
|
-
/** Default cheap tier. qwen3:30b
|
|
18
|
-
*
|
|
19
|
-
|
|
17
|
+
/** Default cheap tier. qwen3-coder:30b — same 30B MoE class/RAM as qwen3:30b-a3b
|
|
18
|
+
* and IDENTICAL measured quality (2026-06-29 oracle bench, 8 fixtures: both 6/8,
|
|
19
|
+
* 75% avg mutation kill), but ~14× faster wall-clock (the code-tuned model does
|
|
20
|
+
* not spend ~70s "thinking" before answering). qwen3:8b stays off-default: D3
|
|
21
|
+
* measured it well below this (3/8). */
|
|
22
|
+
export const DEFAULT_FREE_TIER_MODEL = 'qwen3-coder:30b';
|
|
20
23
|
/**
|
|
21
24
|
* Build a cheap-first escalating executor from coordinator config + (optional)
|
|
22
25
|
* router. Returns `null` when the free tier is not opted in — callers store the
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* never leaves the start tier (the "no escalation yet" mode).
|
|
16
16
|
*/
|
|
17
17
|
import { type ChatMessage } from './provider.js';
|
|
18
|
+
import { TestGenPatternCache } from './pattern-cache.js';
|
|
18
19
|
import { AutoEscalationTracker } from '../escalation/auto-escalation-tracker.js';
|
|
19
20
|
import type { QeRoutingLadder, FreeTierProviderConfig } from './types.js';
|
|
20
21
|
import type { AgentTier } from '../routing-config.js';
|
|
@@ -57,6 +58,12 @@ export interface QeTaskRequest {
|
|
|
57
58
|
* `objective` (existing callers inject real oracles, e.g. a coverage/test run).
|
|
58
59
|
*/
|
|
59
60
|
oracleKind?: 'objective' | 'self-authored';
|
|
61
|
+
/**
|
|
62
|
+
* #6: the code under test, for the pattern cache. When set AND the executor
|
|
63
|
+
* has a `patternCache`, a cache hit (re-verified by `verify`) short-circuits
|
|
64
|
+
* generation entirely. Omit to disable caching for this task.
|
|
65
|
+
*/
|
|
66
|
+
cacheText?: string;
|
|
60
67
|
}
|
|
61
68
|
export interface TierAttempt {
|
|
62
69
|
tier: string;
|
|
@@ -113,6 +120,11 @@ export interface FreeTierExecutorOptions {
|
|
|
113
120
|
* Omit ⇒ single-model best-of-k (unchanged).
|
|
114
121
|
*/
|
|
115
122
|
candidateProviders?: FreeTierProviderConfig[];
|
|
123
|
+
/**
|
|
124
|
+
* #6: ruvLLM-style pattern cache. When provided and a request carries
|
|
125
|
+
* `cacheText`, a verified cache hit skips all LLM tiers. Omit to disable.
|
|
126
|
+
*/
|
|
127
|
+
patternCache?: TestGenPatternCache;
|
|
116
128
|
/** D9 sink: record each completed task outcome (→ routing-feedback). */
|
|
117
129
|
onOutcome?: (o: {
|
|
118
130
|
agentId: string;
|
|
@@ -139,6 +151,8 @@ export declare class FreeTierEscalatingExecutor {
|
|
|
139
151
|
private readonly onOutcome?;
|
|
140
152
|
/** Resolved cross-model generator pool (A12); undefined ⇒ single-model best-of-k. */
|
|
141
153
|
private readonly candidateProviders?;
|
|
154
|
+
/** #6: optional pattern cache; undefined ⇒ caching disabled. */
|
|
155
|
+
private readonly patternCache?;
|
|
142
156
|
constructor(opts: FreeTierExecutorOptions);
|
|
143
157
|
/** Expose the tracker so a coordinator can inspect/share adaptation state. */
|
|
144
158
|
getTracker(): AutoEscalationTracker<string>;
|