agentic-qe 3.10.8 → 3.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/v3/qe-learning-coordinator.md +1 -1
- package/.claude/skills/README.md +2 -2
- package/.claude/skills/agentic-quality-engineering/SKILL.md +6 -5
- package/.claude/skills/agentic-quality-engineering/schemas/output.json +7 -3
- package/.claude/skills/holistic-testing-pact/SKILL.md +50 -17
- package/.claude/skills/skills-manifest.json +6 -6
- package/.opencode/skills/qe-agentic-quality-engineering.yaml +5 -5
- package/.opencode/skills/qe-holistic-testing-pact.yaml +11 -11
- package/CHANGELOG.md +88 -1
- package/README.md +17 -0
- package/assets/agents/v3/qe-learning-coordinator.md +1 -1
- package/assets/skills/README.md +2 -2
- package/assets/skills/agentic-quality-engineering/SKILL.md +6 -5
- package/assets/skills/agentic-quality-engineering/schemas/output.json +7 -3
- package/assets/skills/holistic-testing-pact/SKILL.md +50 -17
- package/assets/skills/skills-manifest.json +6 -6
- package/dist/cli/bundle.js +5 -5
- package/dist/cli/chunks/adapter-WLFT5VMV.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-4JSL6LF6.js → agent-booster-wasm-5CSKQB4O.js} +2 -2
- package/dist/cli/chunks/{agent-handler-6YOFH7KL.js → agent-handler-EBV3OKTE.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-O3IBK4BY.js → agent-memory-branch-RZ53YM2U.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-JBH4GZUM.js +2 -0
- package/dist/cli/chunks/{arena-BLCAZNAY.js → arena-QWYTIQ6I.js} +2 -2
- package/dist/cli/chunks/{arena-KLGRZTTU.js → arena-UCP74DRO.js} +4 -4
- package/dist/cli/chunks/{audit-FKKLR22S.js → audit-M4FNIX47.js} +2 -2
- package/dist/cli/chunks/base-A7JGM473.js +2 -0
- package/dist/cli/chunks/{hnswlib-node-PNPV64M3.js → better-sqlite3-RIBLRHJL.js} +2 -2
- package/dist/cli/chunks/{brain-handler-YTGYC2QW.js → brain-handler-OY6Q2GY5.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-KIIBEJ5S.js → branch-enumerator-TQWN4NIX.js} +2 -2
- package/dist/cli/chunks/{browser-7YZLTV2C.js → browser-2EH3RXJ2.js} +2 -2
- package/dist/cli/chunks/browser-workflow-TIDJWULK.js +2 -0
- package/dist/cli/chunks/{chunk-4IGSL7CX.js → chunk-2BBKA5J4.js} +1 -1
- package/dist/cli/chunks/{chunk-LZVKR7HV.js → chunk-2QU6C3OS.js} +2 -2
- package/dist/cli/chunks/{chunk-B3B5QZYN.js → chunk-2TUVBEWK.js} +2 -2
- package/dist/cli/chunks/{chunk-W72CUJRB.js → chunk-2WVLFT2I.js} +1 -1
- package/dist/cli/chunks/{chunk-JZYXYHEE.js → chunk-2ZC7S4UG.js} +2 -2
- package/dist/cli/chunks/{chunk-PG7KISET.js → chunk-3GWSHRDA.js} +2 -2
- package/dist/cli/chunks/{chunk-VKLPSPPI.js → chunk-3J6LYF6I.js} +2 -2
- package/dist/cli/chunks/{chunk-ZSMHQENA.js → chunk-3LP5GPGU.js} +1 -1
- package/dist/cli/chunks/{chunk-MWAEUJDC.js → chunk-453UDYD2.js} +229 -225
- package/dist/cli/chunks/{chunk-DI7REPYC.js → chunk-4OTA6KYJ.js} +2 -2
- package/dist/cli/chunks/{chunk-SDVL5TZK.js → chunk-5ASPEVVF.js} +1 -1
- package/dist/cli/chunks/{chunk-LCDMB5SP.js → chunk-5DG6H553.js} +1 -1
- package/dist/cli/chunks/{chunk-JFTRHS5V.js → chunk-5OJXVVTI.js} +2 -2
- package/dist/cli/chunks/{chunk-6B3COND2.js → chunk-6VQKNPGY.js} +2 -2
- package/dist/cli/chunks/{chunk-NKKDO5W4.js → chunk-72QNONO6.js} +2 -2
- package/dist/cli/chunks/{chunk-OZDRAKFF.js → chunk-73EWPVBJ.js} +2 -2
- package/dist/cli/chunks/{chunk-CP4CSI5R.js → chunk-7BD7DZCB.js} +2 -2
- package/dist/cli/chunks/{chunk-DNC27OP7.js → chunk-7E5NYLJT.js} +2 -2
- package/dist/cli/chunks/{chunk-CDNXXNQM.js → chunk-7MBF3S25.js} +1 -1
- package/dist/cli/chunks/{chunk-IFQPGBKQ.js → chunk-7PTA7AVW.js} +1 -1
- package/dist/cli/chunks/{chunk-QNNH5TDV.js → chunk-7Q6CMSMD.js} +3 -3
- package/dist/cli/chunks/{chunk-SDGRU6SG.js → chunk-ACV2WVMX.js} +1 -1
- package/dist/cli/chunks/{chunk-XRJH5KXF.js → chunk-AURDGQNB.js} +2 -2
- package/dist/cli/chunks/{chunk-LIOK7WBX.js → chunk-AVKGDS6F.js} +2 -2
- package/dist/cli/chunks/{chunk-DPSLJ6IW.js → chunk-AYOTODUV.js} +1 -1
- package/dist/cli/chunks/{chunk-OK6CSJOX.js → chunk-B4QA3YN6.js} +1 -1
- package/dist/cli/chunks/{chunk-MTWBYHMS.js → chunk-BA4WZIAQ.js} +2 -2
- package/dist/cli/chunks/{chunk-RNJRKFMX.js → chunk-BEOGI5FC.js} +2 -2
- package/dist/cli/chunks/{chunk-XYXRO7VP.js → chunk-C33BMWYZ.js} +2 -2
- package/dist/cli/chunks/chunk-C4OYHUJV.js +2 -0
- package/dist/cli/chunks/{chunk-ON6C2OYG.js → chunk-CERSTEAJ.js} +2 -2
- package/dist/cli/chunks/{chunk-YATW2RWQ.js → chunk-D3S4SRSA.js} +2 -2
- package/dist/cli/chunks/{chunk-CCUUTTTJ.js → chunk-DCJIXDO6.js} +2 -2
- package/dist/cli/chunks/chunk-DDQWW22L.js +6 -0
- package/dist/cli/chunks/{chunk-FWQZZ22V.js → chunk-DV7662EZ.js} +1 -1
- package/dist/cli/chunks/{chunk-HVE3EH36.js → chunk-ETGEGMYS.js} +3 -3
- package/dist/cli/chunks/{chunk-CO6UY7ZU.js → chunk-ETZ62NFD.js} +1 -1
- package/dist/cli/chunks/{chunk-G73PIM7X.js → chunk-F62ZQZQQ.js} +2 -2
- package/dist/cli/chunks/{chunk-AGQIJWAD.js → chunk-F6Y7DTHR.js} +2 -2
- package/dist/cli/chunks/{chunk-LT4OZHMK.js → chunk-FGOVDO3R.js} +2 -2
- package/dist/cli/chunks/{chunk-YUK4KU2B.js → chunk-FMKALHT3.js} +2 -2
- package/dist/cli/chunks/{chunk-X3NEQ3SL.js → chunk-FMULOSBL.js} +1 -1
- package/dist/cli/chunks/{chunk-3AG2MM7U.js → chunk-FTOICJQG.js} +2 -2
- package/dist/cli/chunks/{chunk-YQYTQRTR.js → chunk-G25YZ7Z6.js} +2 -2
- package/dist/cli/chunks/{chunk-QHLENBGB.js → chunk-G5VE3HQW.js} +2 -2
- package/dist/cli/chunks/{chunk-XLQX77KP.js → chunk-GBFAQ4DW.js} +1 -1
- package/dist/cli/chunks/{chunk-Z57UERQZ.js → chunk-GGSXHGWD.js} +2 -2
- package/dist/cli/chunks/{chunk-TXLLF7XR.js → chunk-HHSEIPSQ.js} +1 -1
- package/dist/cli/chunks/{chunk-4G2GTX2V.js → chunk-HJFQVKPI.js} +1 -1
- package/dist/cli/chunks/{chunk-WKLI5Z3L.js → chunk-HMSPPGUF.js} +2 -2
- package/dist/cli/chunks/{chunk-2KP5TJS2.js → chunk-HNSZDIQU.js} +2 -2
- package/dist/cli/chunks/{chunk-77BVW2CT.js → chunk-I2HQLBWG.js} +2 -2
- package/dist/cli/chunks/{chunk-G2J7WGOG.js → chunk-IFTEM672.js} +2 -2
- package/dist/cli/chunks/{chunk-Q7B7T4YK.js → chunk-IHNBZ5XG.js} +2 -2
- package/dist/cli/chunks/{chunk-5GPOSKGP.js → chunk-IKNDGXZZ.js} +2 -2
- package/dist/cli/chunks/{chunk-ALFF4AAM.js → chunk-IOQYSR5S.js} +2 -2
- package/dist/cli/chunks/{chunk-7LHN6WBX.js → chunk-IQSPL2H4.js} +2 -2
- package/dist/cli/chunks/{chunk-E5GUTKET.js → chunk-ISVBO4XO.js} +2 -2
- package/dist/cli/chunks/{chunk-KTBBSOZG.js → chunk-ITRUZ3WE.js} +2 -2
- package/dist/cli/chunks/{chunk-OIU6PKLF.js → chunk-J425SQFE.js} +2 -2
- package/dist/cli/chunks/{chunk-NFZY6ZVY.js → chunk-JN3IQB4L.js} +1 -1
- package/dist/cli/chunks/{chunk-6B32USSC.js → chunk-JNX7IRSI.js} +2 -2
- package/dist/cli/chunks/{chunk-PRYSWF6F.js → chunk-JQM64WJ2.js} +1 -1
- package/dist/cli/chunks/{chunk-4B676LUC.js → chunk-JQSA6EMI.js} +2 -2
- package/dist/cli/chunks/{chunk-NL4EKO2J.js → chunk-JZFA2PWY.js} +2 -2
- package/dist/cli/chunks/{chunk-54PBHRRW.js → chunk-KBVXKFDI.js} +4 -4
- package/dist/cli/chunks/{chunk-Z4WAJ647.js → chunk-KOOY72E3.js} +2 -2
- package/dist/cli/chunks/{chunk-M5PBVK3V.js → chunk-KZE5UR4T.js} +3 -3
- package/dist/cli/chunks/{chunk-2RDWYJJY.js → chunk-L7GQKJLV.js} +2 -2
- package/dist/cli/chunks/{chunk-GXKCRIHK.js → chunk-LCDRRAES.js} +2 -2
- package/dist/cli/chunks/{chunk-VL4MSE3J.js → chunk-LFT7WYHW.js} +2 -2
- package/dist/cli/chunks/{chunk-LBR5FXPD.js → chunk-LTH6XARD.js} +5 -5
- package/dist/cli/chunks/{chunk-KWKGROPS.js → chunk-LYV7WJWA.js} +1 -1
- package/dist/cli/chunks/{chunk-HVFHPDXV.js → chunk-MDYI4IIW.js} +1 -1
- package/dist/cli/chunks/{chunk-KTEWRRDZ.js → chunk-MKLLB4PM.js} +4 -4
- package/dist/cli/chunks/{chunk-34LWJDCM.js → chunk-MTSMFEWK.js} +2 -2
- package/dist/cli/chunks/{chunk-CHPL7TA4.js → chunk-N3R3JGUY.js} +1 -1
- package/dist/cli/chunks/{chunk-HWJEHXPQ.js → chunk-N52ZBTPM.js} +2 -2
- package/dist/cli/chunks/{chunk-X4CHPEOQ.js → chunk-N7MKF4F4.js} +1 -1
- package/dist/cli/chunks/{chunk-H35FNLQJ.js → chunk-NBTKI2TX.js} +2 -2
- package/dist/cli/chunks/{chunk-FPEFIJQ6.js → chunk-NI7O3GKZ.js} +3 -3
- package/dist/cli/chunks/{chunk-2UL4UK6V.js → chunk-NQD4CMXC.js} +2 -2
- package/dist/cli/chunks/{chunk-DNEYBK7X.js → chunk-O6FN53HB.js} +1 -1
- package/dist/cli/chunks/{chunk-XPAH7SEX.js → chunk-OZQIDDXB.js} +2 -2
- package/dist/cli/chunks/{chunk-474ZUVGP.js → chunk-P3NV6KN3.js} +1 -1
- package/dist/cli/chunks/{chunk-JITZAJJN.js → chunk-PC3VIR2A.js} +3 -3
- package/dist/cli/chunks/{chunk-WYAHOUK2.js → chunk-PJ4HSXH3.js} +1 -1
- package/dist/cli/chunks/{chunk-Z7FWPSOK.js → chunk-PUTRXS5I.js} +2 -2
- package/dist/cli/chunks/{chunk-GDHJZPNC.js → chunk-PVBJUANU.js} +2 -2
- package/dist/cli/chunks/{chunk-PTPGYUT2.js → chunk-QCJ7YOVN.js} +2 -2
- package/dist/cli/chunks/{chunk-T2Z3M6HA.js → chunk-QGBXENIP.js} +1 -1
- package/dist/cli/chunks/{chunk-OLOKPY5O.js → chunk-QYXTESM3.js} +2 -2
- package/dist/cli/chunks/{chunk-OV3ESWN4.js → chunk-QZQGYSDG.js} +2 -2
- package/dist/cli/chunks/{chunk-HEC2UWY3.js → chunk-R3YO3Z7I.js} +4 -4
- package/dist/cli/chunks/{chunk-JQBD4JO2.js → chunk-R7FHQQAV.js} +2 -2
- package/dist/cli/chunks/{chunk-MSWBVPVQ.js → chunk-RKDNLPZM.js} +2 -2
- package/dist/cli/chunks/{chunk-BALWMVCX.js → chunk-RPYYS6BX.js} +2 -2
- package/dist/cli/chunks/{chunk-R2LWUBET.js → chunk-RVQW6CBF.js} +2 -2
- package/dist/cli/chunks/{chunk-VM5C4DIV.js → chunk-SHW43QQV.js} +2 -2
- package/dist/cli/chunks/{chunk-S6PGWJDK.js → chunk-SKL225P5.js} +2 -2
- package/dist/cli/chunks/{chunk-Y4XTPEAC.js → chunk-SLWJNHCR.js} +2 -2
- package/dist/cli/chunks/{chunk-XNFYQRJ2.js → chunk-SQPDGRYR.js} +1 -1
- package/dist/cli/chunks/{chunk-NOP5ZJ7E.js → chunk-T6KT63NC.js} +2 -2
- package/dist/cli/chunks/{chunk-C6TUX7YJ.js → chunk-TGLEREP5.js} +2 -2
- package/dist/cli/chunks/{chunk-O75ODKCX.js → chunk-TYS77XHV.js} +2 -2
- package/dist/cli/chunks/{chunk-Q32LITZL.js → chunk-UEH6C5JA.js} +1 -1
- package/dist/cli/chunks/{chunk-6R6RC6YJ.js → chunk-UFMW25MS.js} +2 -2
- package/dist/cli/chunks/{chunk-BMSMDD72.js → chunk-V6WJVFRN.js} +2 -2
- package/dist/cli/chunks/{chunk-GHIHW3IE.js → chunk-VGYUVMSN.js} +2 -2
- package/dist/cli/chunks/{chunk-33CLP2NE.js → chunk-VHON5NDM.js} +3 -3
- package/dist/cli/chunks/{chunk-D7IH2A3C.js → chunk-VVJXQ4FR.js} +2 -2
- package/dist/cli/chunks/{chunk-K5Y64X2U.js → chunk-WBQEOACC.js} +2 -2
- package/dist/cli/chunks/{chunk-NWIKNQLJ.js → chunk-WP6XUSVW.js} +1 -1
- package/dist/cli/chunks/{chunk-FXPAGKVS.js → chunk-X2L4POJE.js} +1 -1
- package/dist/cli/chunks/{chunk-H73AA2JI.js → chunk-X2TUDGFL.js} +18 -18
- package/dist/cli/chunks/{chunk-WDZT344G.js → chunk-XKRG2U3V.js} +15 -13
- package/dist/cli/chunks/{chunk-D7ZVIL3C.js → chunk-XMZ2DHUL.js} +1 -1
- package/dist/cli/chunks/{chunk-LJEO5R32.js → chunk-XSG4XKGO.js} +2 -2
- package/dist/cli/chunks/{chunk-UU422SST.js → chunk-XVQUVCFR.js} +2 -2
- package/dist/cli/chunks/{chunk-SSRMFU4P.js → chunk-XW5OXBVV.js} +2 -2
- package/dist/cli/chunks/{chunk-DDMKCHYT.js → chunk-Y7TBCHW4.js} +2 -2
- package/dist/cli/chunks/{chunk-XKIVOADM.js → chunk-Y7UJC5OL.js} +3 -3
- package/dist/cli/chunks/{chunk-HE3KLHNO.js → chunk-YQIMO7VJ.js} +2 -2
- package/dist/cli/chunks/{chunk-RXWPYY6H.js → chunk-YR44KQUK.js} +1 -1
- package/dist/cli/chunks/{chunk-QHGHWATK.js → chunk-YRP73HO4.js} +1 -1
- package/dist/cli/chunks/{chunk-5KUINS3D.js → chunk-YSTWLDVD.js} +3 -3
- package/dist/cli/chunks/{chunk-YMJ5AVVU.js → chunk-Z45QDDZQ.js} +1 -1
- package/dist/cli/chunks/{chunk-2F4VRCT6.js → chunk-ZEUUVLS2.js} +1 -1
- package/dist/cli/chunks/{chunk-7NKVEEXD.js → chunk-ZFP3O5FM.js} +1 -1
- package/dist/cli/chunks/{chunk-4AG2TQEF.js → chunk-ZK56THZT.js} +3 -3
- package/dist/cli/chunks/{chunk-4OHLPG6B.js → chunk-ZT4NPTML.js} +2 -2
- package/dist/cli/chunks/{ci-2G4BBIQD.js → ci-4JK2NFCD.js} +2 -2
- package/dist/cli/chunks/{ci-output-SI3ME52L.js → ci-output-LCGTJQWC.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-KTICF3EC.js → circuit-breaker-EJF7D3L4.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-F44PULFU.js → claude-flow-setup-3RUC6OB4.js} +2 -2
- package/dist/cli/chunks/client-ZLJ3JMBC.js +2 -0
- package/dist/cli/chunks/cline-installer-6LY5C5QH.js +4 -0
- package/dist/cli/chunks/{code-EDLIBN77.js → code-MPDG4UHS.js} +2 -2
- package/dist/cli/chunks/{code-index-extractor-P4NBWGTV.js → code-index-extractor-OY5GQJBM.js} +2 -2
- package/dist/cli/chunks/codex-installer-BO7E2ZVA.js +8 -0
- package/dist/cli/chunks/{completions-XPCXB5SR.js → completions-VGL3KJ2R.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-LAL5RSB7.js → complexity-analyzer-5DPUK7IL.js} +2 -2
- package/dist/cli/chunks/continuedev-installer-LFDG2D42.js +15 -0
- package/dist/cli/chunks/copilot-installer-SEMMMIZH.js +3 -0
- package/dist/cli/chunks/core-handlers-EM7FUYTI.js +2 -0
- package/dist/cli/chunks/{cost-tracker-EUJFKHGT.js → cost-tracker-OPBC6FQM.js} +2 -2
- package/dist/cli/chunks/{coverage-C75LPZYB.js → coverage-CFDUSRKU.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-DYGHQ6P5.js +2 -0
- package/dist/cli/chunks/cursor-installer-6TXUUVY4.js +3 -0
- package/dist/cli/chunks/{daemon-JR2MSTSK.js → daemon-5KO46YQR.js} +4 -4
- package/dist/cli/chunks/{daemon-BPVBZZQO.js → daemon-7BDBPPAF.js} +3 -3
- package/dist/cli/chunks/{dag-attention-scheduler-I5H7DBNU.js → dag-attention-scheduler-6DQKZOUW.js} +2 -2
- package/dist/cli/chunks/{detect-O5TMML24.js → detect-R2QAYDPI.js} +2 -2
- package/dist/cli/chunks/{dist-node-MDZ6UQ3V.js → dist-node-3POCIJ4N.js} +2 -2
- package/dist/cli/chunks/{domain-handler-BGBTZETG.js → domain-handler-KW63CHUH.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-C2D2IEYV.js → domain-transfer-2QPOJCUD.js} +2 -2
- package/dist/cli/chunks/dream-DBE5D5BD.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-UJREBJF5.js → embed-and-insert-pattern-OIDJZQEP.js} +2 -2
- package/dist/cli/chunks/{eval-BDD24HQC.js → eval-UGEKTTAQ.js} +2 -2
- package/dist/cli/chunks/{experience-capture-middleware-KLVXIIYH.js → experience-capture-middleware-3BIM2TT7.js} +3 -3
- package/dist/cli/chunks/{fast-paths-5HIKAQZ7.js → fast-paths-HCJQXB7W.js} +2 -2
- package/dist/cli/chunks/{feature-flags-YE5SJPDS.js → feature-flags-GDGJKLN4.js} +2 -2
- package/dist/cli/chunks/{feature-flags-NM3S7OEW.js → feature-flags-W4JSFBMV.js} +2 -2
- package/dist/cli/chunks/{file-discovery-PWRQZNJQ.js → file-discovery-JMUZ4MUH.js} +2 -2
- package/dist/cli/chunks/{fleet-UIPKNQX3.js → fleet-YNNK2CKW.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-GWGKZRTO.js → gnn-wrapper-R2ZY6CDD.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-GQHJPNAY.js → heartbeat-handler-OZX2EJHQ.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-NFHAANNL.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-HMPCZFBY.js +2 -0
- package/dist/cli/chunks/hnsw-index-KRIWSXX4.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-NE5JIRG3.js → hnsw-legacy-bridge-3S6TYCG3.js} +2 -2
- package/dist/cli/chunks/{better-sqlite3-MROES2Y7.js → hnswlib-node-HMZC5TXM.js} +2 -2
- package/dist/cli/chunks/{hooks-3NBBUOB6.js → hooks-KM7WR35T.js} +10 -10
- package/dist/cli/chunks/hybrid-router-BAB32B2W.js +2 -0
- package/dist/cli/chunks/{hypergraph-engine-6NRFVDV7.js → hypergraph-engine-RX53A73M.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-F3OOGTXF.js → hypergraph-handler-3QQB3H3Z.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-3D6XHWQE.js +2 -0
- package/dist/cli/chunks/{init-handler-DOTXTVUI.js → init-handler-Y62RH4ZI.js} +22 -21
- package/dist/cli/chunks/init-wizard-LLU3WVGC.js +2 -0
- package/dist/cli/chunks/kernel-ZFHAYHHJ.js +2 -0
- package/dist/cli/chunks/kilocode-installer-26R253L2.js +4 -0
- package/dist/cli/chunks/{kiro-installer-WBJDXY7Q.js → kiro-installer-PFA5QPZZ.js} +4 -4
- package/dist/cli/chunks/knowledge-graph-ETZ65KOY.js +2 -0
- package/dist/cli/chunks/{learning-BC5N4V3D.js → learning-CQLM5ANX.js} +3 -3
- package/dist/cli/chunks/{llm-router-T427WD6R.js → llm-router-QZ5PG4PF.js} +4 -4
- package/dist/cli/chunks/llm-router-service-R6CTGF5I.js +2 -0
- package/dist/cli/chunks/{load-M6SL2O3M.js → load-UPA6LPHM.js} +2 -2
- package/dist/cli/chunks/load-test-UOWIJUCH.js +2 -0
- package/dist/cli/chunks/mcp-LSWTLAJ4.js +2 -0
- package/dist/cli/chunks/{memory-FJAO3CSF.js → memory-VGEYYGCG.js} +5 -5
- package/dist/cli/chunks/memory-backend-E3ZQKW7A.js +2 -0
- package/dist/cli/chunks/{memory-handlers-S3W6IQJL.js → memory-handlers-QBURG7NA.js} +2 -2
- package/dist/cli/chunks/{multi-model-executor-FYOVZ4OH.js → multi-model-executor-VZVFBIKC.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-APSBE4UR.js → opencode-installer-PBQAXNLV.js} +2 -2
- package/dist/cli/chunks/{orchestrator-LN53EQ45.js → orchestrator-YND7JB5O.js} +16 -16
- package/dist/cli/chunks/pattern-null-store-OUOJO2RH.js +2 -0
- package/dist/cli/chunks/{pipeline-BYWXY2NO.js → pipeline-GM5RRUES.js} +2 -2
- package/dist/cli/chunks/{platform-CZ774YPS.js → platform-L7OGGRSL.js} +2 -2
- package/dist/cli/chunks/{plugin-72NXRX5Z.js → plugin-N4YAE6H5.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-G4DE6YKJ.js → prime-radiant-advanced-wasm-7D67XV6Z.js} +2 -2
- package/dist/cli/chunks/protocol-executor-KHAPG5CP.js +2 -0
- package/dist/cli/chunks/{protocol-handler-UH6CV63V.js → protocol-handler-V2WTFU7N.js} +2 -2
- package/dist/cli/chunks/{prove-V7FAT5HF.js → prove-33DS5Z3N.js} +2 -2
- package/dist/cli/chunks/provider-manager-FGPPW7T4.js +2 -0
- package/dist/cli/chunks/qe-reasoning-bank-TS7XOJDA.js +2 -0
- package/dist/cli/chunks/{quality-N2K62FQM.js → quality-WCSEA5GH.js} +2 -2
- package/dist/cli/chunks/queen-coordinator-J35FNFQ3.js +2 -0
- package/dist/cli/chunks/{real-embeddings-TKHUE2RL.js → real-embeddings-OQ5F37DG.js} +2 -2
- package/dist/cli/chunks/roocode-installer-II7LIR2X.js +4 -0
- package/dist/cli/chunks/router-AFTKPDI5.js +2 -0
- package/dist/cli/chunks/routing-feedback-SABZUJTF.js +2 -0
- package/dist/cli/chunks/{routing-handler-UUWD4IKG.js → routing-handler-6OFHARIY.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-B4WPTGCI.js → ruvector-commands-GD5JTR4M.js} +2 -2
- package/dist/cli/chunks/{rvf-dual-writer-MNRJGNIX.js → rvf-dual-writer-HSK6BYZV.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-adapter-P2RDBFA4.js → rvf-migration-adapter-554SMF5S.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-coordinator-DFESZQSS.js → rvf-migration-coordinator-OFDBCAYE.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-57MDDSFQ.js +2 -0
- package/dist/cli/chunks/safe-db-2HR6MVYM.js +2 -0
- package/dist/cli/chunks/schedule-KLVAN6XI.js +2 -0
- package/dist/cli/chunks/scheduler-WYZ6BC5Y.js +2 -0
- package/dist/cli/chunks/{security-MHLTNKFX.js → security-GN4J6DSS.js} +3 -3
- package/dist/cli/chunks/{shared-rvf-adapter-LR7E2EQI.js → shared-rvf-adapter-Q4PM3QCN.js} +2 -2
- package/dist/cli/chunks/{shared-rvf-dual-writer-RFFON2F3.js → shared-rvf-dual-writer-R5WK5BXQ.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-2CGU5INO.js +2 -0
- package/dist/cli/chunks/{status-handler-ROPTYGQC.js → status-handler-AHS5WVMG.js} +2 -2
- package/dist/cli/chunks/{structural-health-YGUFXGJ6.js → structural-health-5KUKNLHZ.js} +2 -2
- package/dist/cli/chunks/{sync-6JTRTDL3.js → sync-PUMM3SR6.js} +2 -2
- package/dist/cli/chunks/{sync-NZZUMTKC.js → sync-TQLGD5HX.js} +2 -2
- package/dist/cli/chunks/{task-handler-KYMV3AC6.js → task-handler-D7VXV4AF.js} +2 -2
- package/dist/cli/chunks/{task-handlers-Z63YBQVU.js → task-handlers-QMN4SWUG.js} +3 -3
- package/dist/cli/chunks/{test-O6BQ7FGP.js → test-HEWZR6YQ.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-T3IOXEFI.js → test-scheduling-VTMLBEPA.js} +3 -3
- package/dist/cli/chunks/{token-bootstrap-CTI2ULJF.js → token-bootstrap-IYBG7PQ6.js} +2 -2
- package/dist/cli/chunks/{token-usage-TNQTNAVT.js → token-usage-C7H27BFZ.js} +2 -2
- package/dist/cli/chunks/{transformers-CJQDNQER.js → transformers-5ZJVC6NB.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-RBZWLEVQ.js → tree-sitter-wasm-parser-EARBJG2H.js} +2 -2
- package/dist/cli/chunks/{types-OMFCO364.js → types-3IHE42PZ.js} +2 -2
- package/dist/cli/chunks/unified-memory-PMYRQC5K.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-7TRL2K5Q.js +2 -0
- package/dist/cli/chunks/unified-persistence-S4BNJK4S.js +2 -0
- package/dist/cli/chunks/{upgrade-KRVOYWN3.js → upgrade-YP3VFSXO.js} +2 -2
- package/dist/cli/chunks/{validate-32FKHMKQ.js → validate-VSBNKPN6.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-45RPBPPH.js → validate-swarm-GOCJVWXE.js} +2 -2
- package/dist/cli/chunks/{vibium-LCTNDCKK.js → vibium-U6YKCLDF.js} +2 -2
- package/dist/cli/chunks/visual-security-RPMZ3J7L.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-FX2EFCLH.js → web-tree-sitter-TSNVGWSN.js} +2 -2
- package/dist/cli/chunks/windsurf-installer-2VKMEFSD.js +7 -0
- package/dist/cli/chunks/witness-chain-BTDZSQ6P.js +2 -0
- package/dist/cli/chunks/{witness-chain-YG2UWTYZ.js → witness-chain-BWZCW52H.js} +2 -2
- package/dist/cli/chunks/{workflow-AEJ37RNV.js → workflow-J6SCYLU3.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-42B62D3V.js +2 -0
- package/dist/cli/chunks/{wrappers-GSU6VNU6.js → wrappers-M5C7DONW.js} +2 -2
- package/dist/cli/commands/mcp.js +28 -28
- package/dist/cli/handlers/init-handler.d.ts +2 -0
- package/dist/cli/handlers/init-handler.js +22 -1
- package/dist/domains/test-generation/coordinator.d.ts +24 -1
- package/dist/domains/test-generation/coordinator.js +137 -2
- package/dist/domains/test-generation/plugin.js +23 -1
- package/dist/init/cline-installer.d.ts +6 -0
- package/dist/init/cline-installer.js +3 -1
- package/dist/init/codex-installer.d.ts +6 -0
- package/dist/init/codex-installer.js +3 -1
- package/dist/init/continuedev-installer.d.ts +6 -0
- package/dist/init/continuedev-installer.js +10 -3
- package/dist/init/copilot-installer.d.ts +6 -0
- package/dist/init/copilot-installer.js +3 -1
- package/dist/init/cursor-installer.d.ts +6 -0
- package/dist/init/cursor-installer.js +3 -1
- package/dist/init/kilocode-installer.d.ts +6 -0
- package/dist/init/kilocode-installer.js +3 -1
- package/dist/init/kiro-installer.d.ts +5 -0
- package/dist/init/kiro-installer.js +4 -4
- package/dist/init/orchestrator.js +1 -0
- package/dist/init/phases/07-hooks.js +5 -0
- package/dist/init/phases/08-mcp.js +34 -7
- package/dist/init/phases/09-assets.js +30 -27
- package/dist/init/phases/11-claude-md.d.ts +1 -0
- package/dist/init/phases/11-claude-md.js +8 -0
- package/dist/init/phases/13-governance.js +5 -0
- package/dist/init/phases/phase-interface.d.ts +8 -0
- package/dist/init/platform-config-generator.d.ts +3 -1
- package/dist/init/platform-config-generator.js +31 -17
- package/dist/init/roocode-installer.d.ts +6 -0
- package/dist/init/roocode-installer.js +3 -1
- package/dist/init/windsurf-installer.d.ts +6 -0
- package/dist/init/windsurf-installer.js +3 -1
- package/dist/integrations/darwin/index.d.ts +10 -0
- package/dist/integrations/darwin/index.js +2 -0
- package/dist/integrations/darwin/qe-fitness.d.ts +83 -0
- package/dist/integrations/darwin/qe-fitness.js +147 -0
- package/dist/integrations/darwin/types.d.ts +62 -0
- package/dist/integrations/darwin/types.js +14 -0
- package/dist/mcp/bundle.js +376 -371
- package/dist/mcp/entry.js +10 -1
- package/dist/mcp/protocol-server.js +17 -0
- package/dist/optimization/session-cache.d.ts +11 -0
- package/dist/optimization/session-cache.js +31 -0
- package/dist/routing/escalation/auto-escalation-tracker.d.ts +34 -15
- package/dist/routing/escalation/auto-escalation-tracker.js +24 -15
- package/dist/routing/free-tier/executor.d.ts +119 -0
- package/dist/routing/free-tier/executor.js +139 -0
- package/dist/routing/free-tier/feedback-sink.d.ts +49 -0
- package/dist/routing/free-tier/feedback-sink.js +52 -0
- package/dist/routing/free-tier/index.d.ts +14 -0
- package/dist/routing/free-tier/index.js +5 -0
- package/dist/routing/free-tier/ladder.d.ts +41 -0
- package/dist/routing/free-tier/ladder.js +78 -0
- package/dist/routing/free-tier/provider.d.ts +57 -0
- package/dist/routing/free-tier/provider.js +111 -0
- package/dist/routing/free-tier/types.d.ts +80 -0
- package/dist/routing/free-tier/types.js +16 -0
- package/package.json +6 -2
- package/dist/cli/chunks/adapter-PAMPC2X7.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-DGKLEC6I.js +0 -2
- package/dist/cli/chunks/base-6HJR4VJT.js +0 -2
- package/dist/cli/chunks/browser-workflow-OWNU5XK7.js +0 -2
- package/dist/cli/chunks/chunk-2B2RLPK3.js +0 -2
- package/dist/cli/chunks/chunk-NSI3WL6P.js +0 -6
- package/dist/cli/chunks/client-E6GK5NWT.js +0 -2
- package/dist/cli/chunks/cline-installer-A7G7OXIS.js +0 -4
- package/dist/cli/chunks/codex-installer-JB3ULDQP.js +0 -8
- package/dist/cli/chunks/continuedev-installer-GSYBLQV7.js +0 -14
- package/dist/cli/chunks/copilot-installer-7B56CNU2.js +0 -3
- package/dist/cli/chunks/core-handlers-HJUORTFU.js +0 -2
- package/dist/cli/chunks/cross-domain-router-35WVZFAZ.js +0 -2
- package/dist/cli/chunks/cursor-installer-WXQFM4KJ.js +0 -3
- package/dist/cli/chunks/dream-QTZDMP6D.js +0 -2
- package/dist/cli/chunks/heartbeat-scheduler-N433NZCG.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-MR6W2OA4.js +0 -2
- package/dist/cli/chunks/hnsw-index-XC6EMJA2.js +0 -2
- package/dist/cli/chunks/hybrid-router-SH4IEAJA.js +0 -2
- package/dist/cli/chunks/impact-analyzer-RUTVXE7P.js +0 -2
- package/dist/cli/chunks/init-wizard-56NY5BSP.js +0 -2
- package/dist/cli/chunks/kernel-7JAN7WCO.js +0 -2
- package/dist/cli/chunks/kilocode-installer-3AXYSZTO.js +0 -4
- package/dist/cli/chunks/knowledge-graph-ST4LW3V4.js +0 -2
- package/dist/cli/chunks/llm-router-service-JNDF5MVJ.js +0 -2
- package/dist/cli/chunks/load-test-I3P3DUS5.js +0 -2
- package/dist/cli/chunks/mcp-F2V3KKG6.js +0 -2
- package/dist/cli/chunks/memory-backend-27BBT57O.js +0 -2
- package/dist/cli/chunks/pattern-null-store-SRBYJRNX.js +0 -2
- package/dist/cli/chunks/protocol-executor-WJLJHWO2.js +0 -2
- package/dist/cli/chunks/provider-manager-UKUHSHAL.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-IMUECSFZ.js +0 -2
- package/dist/cli/chunks/queen-coordinator-EC4SVNMB.js +0 -2
- package/dist/cli/chunks/roocode-installer-DFUA6FXW.js +0 -4
- package/dist/cli/chunks/router-TVTOUQLL.js +0 -2
- package/dist/cli/chunks/routing-feedback-Y4WDXNXW.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-4YSC6QKO.js +0 -2
- package/dist/cli/chunks/safe-db-RGAY54O5.js +0 -2
- package/dist/cli/chunks/schedule-KJ4GWLPJ.js +0 -2
- package/dist/cli/chunks/scheduler-AONSLVA3.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-7RZUEPM4.js +0 -2
- package/dist/cli/chunks/unified-memory-G3BYQ3WU.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-F7XUZMKW.js +0 -2
- package/dist/cli/chunks/unified-persistence-V35NXJSO.js +0 -2
- package/dist/cli/chunks/visual-security-K47U7KUM.js +0 -2
- package/dist/cli/chunks/windsurf-installer-I3TSJCNL.js +0 -7
- package/dist/cli/chunks/witness-chain-G6GJXZD3.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-SKF7GC5X.js +0 -2
package/dist/mcp/entry.js
CHANGED
|
@@ -363,5 +363,14 @@ async function main() {
|
|
|
363
363
|
process.exit(1);
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
|
-
main()
|
|
366
|
+
// H3: main() runs fire-and-forget, so a rejection that escapes its internal
|
|
367
|
+
// try/catch would otherwise hit the unhandledRejection handler above — which
|
|
368
|
+
// deliberately keeps the server alive at *runtime*. A failed *startup* must
|
|
369
|
+
// instead exit non-zero, especially on the in-process `agentic-qe mcp` path
|
|
370
|
+
// (#528) where the CLI wrapper awaits a never-resolving promise and would
|
|
371
|
+
// otherwise hang with a half-dead server and a zero exit code.
|
|
372
|
+
main().catch((error) => {
|
|
373
|
+
process.stderr.write(`[MCP Entry] Fatal startup error: ${error instanceof Error ? error.stack || error.message : String(error)}\n`);
|
|
374
|
+
process.exit(1);
|
|
375
|
+
});
|
|
367
376
|
//# sourceMappingURL=entry.js.map
|
|
@@ -472,6 +472,23 @@ export class MCPProtocolServer {
|
|
|
472
472
|
success = true;
|
|
473
473
|
// IMP-00: Execute post-tool-result middleware
|
|
474
474
|
const processedResult = await this.middlewareChain.executePostHooks(processedCtx, result);
|
|
475
|
+
// Issue #535: a mutating tool must evict its domain's cached reads, or a
|
|
476
|
+
// follow-up read (e.g. memory_retrieve after memory_delete) serves a
|
|
477
|
+
// stale "found" result and the write looks like a no-op. Writes aren't
|
|
478
|
+
// cacheable themselves; gate on a mutation-verb suffix and invalidate the
|
|
479
|
+
// same domain the sibling reads were cached under. Best-effort.
|
|
480
|
+
if (!cacheable && process.env.AQE_SESSION_CACHE !== 'off' &&
|
|
481
|
+
/_(store|delete|set|share|update|remove|clear|promote|cleanup)$/.test(name) &&
|
|
482
|
+
this.isSuccessfulResult(processedResult)) {
|
|
483
|
+
try {
|
|
484
|
+
const { getSessionCache } = await import('../optimization/session-cache.js');
|
|
485
|
+
const { domain } = parseToolDomainAction(name);
|
|
486
|
+
getSessionCache().invalidateDomain(domain);
|
|
487
|
+
}
|
|
488
|
+
catch {
|
|
489
|
+
// never block tool execution on cache invalidation
|
|
490
|
+
}
|
|
491
|
+
}
|
|
475
492
|
// Issue #473: Store successful results for future cache hits.
|
|
476
493
|
// Only cache successful results — error objects shouldn't be served back.
|
|
477
494
|
if (cacheable && cacheFingerprint && this.isSuccessfulResult(processedResult)) {
|
|
@@ -69,10 +69,21 @@ export declare class SessionOperationCache {
|
|
|
69
69
|
getStats(): SessionCacheStats;
|
|
70
70
|
/** Clear all cache entries and reset counters */
|
|
71
71
|
clear(): void;
|
|
72
|
+
/**
|
|
73
|
+
* Invalidate every cached entry for a domain. Issue #535: a mutating tool
|
|
74
|
+
* (e.g. memory_delete / memory_store) must evict the sibling read entries in
|
|
75
|
+
* its domain, or a follow-up memory_retrieve serves a stale "found" result
|
|
76
|
+
* from cache and the delete looks like a no-op. Also drops the persisted
|
|
77
|
+
* rows so a later loadFromDb() can't resurrect the stale entries. Returns the
|
|
78
|
+
* number of entries removed.
|
|
79
|
+
*/
|
|
80
|
+
invalidateDomain(domain: string): number;
|
|
72
81
|
/** Evict the oldest entry by cachedAt */
|
|
73
82
|
private evictOldest;
|
|
74
83
|
/** Persist a single entry to kv_store */
|
|
75
84
|
private persistEntry;
|
|
85
|
+
/** Delete a single persisted entry from kv_store (used by invalidateDomain). */
|
|
86
|
+
private deletePersisted;
|
|
76
87
|
}
|
|
77
88
|
export declare function getSessionCache(config?: Partial<SessionCacheConfig>): SessionOperationCache;
|
|
78
89
|
/** Reset the singleton (for testing) */
|
|
@@ -158,6 +158,25 @@ export class SessionOperationCache {
|
|
|
158
158
|
this.hits = 0;
|
|
159
159
|
this.misses = 0;
|
|
160
160
|
}
|
|
161
|
+
/**
|
|
162
|
+
* Invalidate every cached entry for a domain. Issue #535: a mutating tool
|
|
163
|
+
* (e.g. memory_delete / memory_store) must evict the sibling read entries in
|
|
164
|
+
* its domain, or a follow-up memory_retrieve serves a stale "found" result
|
|
165
|
+
* from cache and the delete looks like a no-op. Also drops the persisted
|
|
166
|
+
* rows so a later loadFromDb() can't resurrect the stale entries. Returns the
|
|
167
|
+
* number of entries removed.
|
|
168
|
+
*/
|
|
169
|
+
invalidateDomain(domain) {
|
|
170
|
+
let removed = 0;
|
|
171
|
+
for (const [key, entry] of this.cache) {
|
|
172
|
+
if (entry.domain === domain) {
|
|
173
|
+
this.cache.delete(key);
|
|
174
|
+
this.deletePersisted(entry.fingerprint);
|
|
175
|
+
removed++;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
return removed;
|
|
179
|
+
}
|
|
161
180
|
/** Evict the oldest entry by cachedAt */
|
|
162
181
|
evictOldest() {
|
|
163
182
|
let oldestKey = null;
|
|
@@ -184,6 +203,18 @@ export class SessionOperationCache {
|
|
|
184
203
|
/* non-critical - cache works without persistence */
|
|
185
204
|
}
|
|
186
205
|
}
|
|
206
|
+
/** Delete a single persisted entry from kv_store (used by invalidateDomain). */
|
|
207
|
+
deletePersisted(fingerprint) {
|
|
208
|
+
try {
|
|
209
|
+
const db = tryGetDb();
|
|
210
|
+
if (!db)
|
|
211
|
+
return;
|
|
212
|
+
db.prepare(`DELETE FROM kv_store WHERE namespace = 'session_cache' AND key = ?`).run(`session_cache:${fingerprint}`);
|
|
213
|
+
}
|
|
214
|
+
catch {
|
|
215
|
+
/* non-critical */
|
|
216
|
+
}
|
|
217
|
+
}
|
|
187
218
|
}
|
|
188
219
|
// ============================================================================
|
|
189
220
|
// DB Helper
|
|
@@ -5,23 +5,40 @@
|
|
|
5
5
|
* Tracks consecutive failures/successes per agent and recommends
|
|
6
6
|
* tier escalation (after N failures) or de-escalation (after M successes).
|
|
7
7
|
* Uses existing AgentTier and FallbackConfig.chain for tier ordering.
|
|
8
|
+
*
|
|
9
|
+
* D7 (cross-pollination plan 06): the class is generic over the tier-name type
|
|
10
|
+
* and the ladder is configurable via `EscalationConfig.tierOrder`. This lets a
|
|
11
|
+
* caller insert a FREE local tier BELOW haiku (e.g.
|
|
12
|
+
* `['local','haiku','sonnet','opus']`) so cheap/local models handle the bulk and
|
|
13
|
+
* only failures escalate up the chain (Ruv's SWE-bench Round-3 economics).
|
|
14
|
+
* Default behaviour is byte-identical to before: with no `tierOrder`, the ladder
|
|
15
|
+
* is the original `['booster','haiku','sonnet','opus']` over `AgentTier`.
|
|
8
16
|
*/
|
|
9
17
|
import type { AgentTier } from '../routing-config.js';
|
|
10
|
-
export interface EscalationConfig {
|
|
18
|
+
export interface EscalationConfig<Tier extends string = AgentTier> {
|
|
11
19
|
/** Consecutive failures before escalation (default: 2) */
|
|
12
20
|
escalateAfterFailures: number;
|
|
13
21
|
/** Consecutive successes before de-escalation (default: 5) */
|
|
14
22
|
deEscalateAfterSuccesses: number;
|
|
15
23
|
/** Maximum tier to escalate to (default: 'opus') */
|
|
16
|
-
maxTier:
|
|
24
|
+
maxTier: Tier;
|
|
17
25
|
/** Minimum tier to de-escalate to (default: 'haiku') */
|
|
18
|
-
minTier:
|
|
26
|
+
minTier: Tier;
|
|
27
|
+
/**
|
|
28
|
+
* Tier ladder in ascending order of capability/cost. Optional — when omitted,
|
|
29
|
+
* resolves to the default Claude ladder `['booster','haiku','sonnet','opus']`.
|
|
30
|
+
* Supply a custom ladder to prepend a free local tier, e.g.
|
|
31
|
+
* `['local','haiku','sonnet','opus']`.
|
|
32
|
+
*/
|
|
33
|
+
tierOrder?: Tier[];
|
|
19
34
|
}
|
|
20
35
|
export declare const DEFAULT_ESCALATION_CONFIG: EscalationConfig;
|
|
21
|
-
|
|
36
|
+
/** The default Claude ladder (kept out of DEFAULT_ESCALATION_CONFIG for back-compat). */
|
|
37
|
+
export declare const DEFAULT_TIER_ORDER: AgentTier[];
|
|
38
|
+
export interface EscalationState<Tier extends string = AgentTier> {
|
|
22
39
|
agentId: string;
|
|
23
|
-
currentTier:
|
|
24
|
-
baseTier:
|
|
40
|
+
currentTier: Tier;
|
|
41
|
+
baseTier: Tier;
|
|
25
42
|
consecutiveFailures: number;
|
|
26
43
|
consecutiveSuccesses: number;
|
|
27
44
|
escalationCount: number;
|
|
@@ -29,31 +46,33 @@ export interface EscalationState {
|
|
|
29
46
|
lastAction: 'escalate' | 'de-escalate' | 'none';
|
|
30
47
|
lastActionTimestamp: Date;
|
|
31
48
|
}
|
|
32
|
-
export type EscalationAction = {
|
|
49
|
+
export type EscalationAction<Tier extends string = AgentTier> = {
|
|
33
50
|
action: 'escalate' | 'de-escalate' | 'none';
|
|
34
|
-
previousTier:
|
|
35
|
-
newTier:
|
|
51
|
+
previousTier: Tier;
|
|
52
|
+
newTier: Tier;
|
|
36
53
|
};
|
|
37
|
-
export declare class AutoEscalationTracker {
|
|
54
|
+
export declare class AutoEscalationTracker<Tier extends string = AgentTier> {
|
|
38
55
|
private readonly config;
|
|
56
|
+
private readonly tierOrder;
|
|
39
57
|
private states;
|
|
40
|
-
constructor(config?: Partial<EscalationConfig
|
|
58
|
+
constructor(config?: Partial<EscalationConfig<Tier>>);
|
|
59
|
+
private tierIndex;
|
|
41
60
|
/**
|
|
42
61
|
* Record an outcome for an agent and determine escalation action.
|
|
43
62
|
*/
|
|
44
|
-
recordOutcome(agentId: string, success: boolean, baseTier:
|
|
63
|
+
recordOutcome(agentId: string, success: boolean, baseTier: Tier): EscalationAction<Tier>;
|
|
45
64
|
/**
|
|
46
65
|
* Get the current tier for an agent, or null if not tracked.
|
|
47
66
|
*/
|
|
48
|
-
getCurrentTier(agentId: string):
|
|
67
|
+
getCurrentTier(agentId: string): Tier | null;
|
|
49
68
|
/**
|
|
50
69
|
* Get full escalation state for an agent, or null if not tracked.
|
|
51
70
|
*/
|
|
52
|
-
getState(agentId: string): EscalationState | null;
|
|
71
|
+
getState(agentId: string): EscalationState<Tier> | null;
|
|
53
72
|
/**
|
|
54
73
|
* Get all tracked escalation states.
|
|
55
74
|
*/
|
|
56
|
-
getAllStates(): EscalationState[];
|
|
75
|
+
getAllStates(): EscalationState<Tier>[];
|
|
57
76
|
/**
|
|
58
77
|
* Reset state for a specific agent, or all agents if no ID provided.
|
|
59
78
|
*/
|
|
@@ -5,6 +5,14 @@
|
|
|
5
5
|
* Tracks consecutive failures/successes per agent and recommends
|
|
6
6
|
* tier escalation (after N failures) or de-escalation (after M successes).
|
|
7
7
|
* Uses existing AgentTier and FallbackConfig.chain for tier ordering.
|
|
8
|
+
*
|
|
9
|
+
* D7 (cross-pollination plan 06): the class is generic over the tier-name type
|
|
10
|
+
* and the ladder is configurable via `EscalationConfig.tierOrder`. This lets a
|
|
11
|
+
* caller insert a FREE local tier BELOW haiku (e.g.
|
|
12
|
+
* `['local','haiku','sonnet','opus']`) so cheap/local models handle the bulk and
|
|
13
|
+
* only failures escalate up the chain (Ruv's SWE-bench Round-3 economics).
|
|
14
|
+
* Default behaviour is byte-identical to before: with no `tierOrder`, the ladder
|
|
15
|
+
* is the original `['booster','haiku','sonnet','opus']` over `AgentTier`.
|
|
8
16
|
*/
|
|
9
17
|
export const DEFAULT_ESCALATION_CONFIG = {
|
|
10
18
|
escalateAfterFailures: 2,
|
|
@@ -12,22 +20,23 @@ export const DEFAULT_ESCALATION_CONFIG = {
|
|
|
12
20
|
maxTier: 'opus',
|
|
13
21
|
minTier: 'haiku',
|
|
14
22
|
};
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
// ============================================================================
|
|
18
|
-
/** Tiers in ascending order of capability/cost */
|
|
19
|
-
const TIER_ORDER = ['booster', 'haiku', 'sonnet', 'opus'];
|
|
20
|
-
function tierIndex(tier) {
|
|
21
|
-
return TIER_ORDER.indexOf(tier);
|
|
22
|
-
}
|
|
23
|
+
/** The default Claude ladder (kept out of DEFAULT_ESCALATION_CONFIG for back-compat). */
|
|
24
|
+
export const DEFAULT_TIER_ORDER = ['booster', 'haiku', 'sonnet', 'opus'];
|
|
23
25
|
// ============================================================================
|
|
24
26
|
// Auto-Escalation Tracker
|
|
25
27
|
// ============================================================================
|
|
26
28
|
export class AutoEscalationTracker {
|
|
27
29
|
config;
|
|
30
|
+
tierOrder;
|
|
28
31
|
states = new Map();
|
|
29
32
|
constructor(config) {
|
|
30
33
|
this.config = { ...DEFAULT_ESCALATION_CONFIG, ...config };
|
|
34
|
+
// Resolve the ladder here (not in DEFAULT_ESCALATION_CONFIG) so the exported
|
|
35
|
+
// default object stays a pure {failures, successes, maxTier, minTier}.
|
|
36
|
+
this.tierOrder = this.config.tierOrder ?? DEFAULT_TIER_ORDER;
|
|
37
|
+
}
|
|
38
|
+
tierIndex(tier) {
|
|
39
|
+
return this.tierOrder.indexOf(tier);
|
|
31
40
|
}
|
|
32
41
|
/**
|
|
33
42
|
* Record an outcome for an agent and determine escalation action.
|
|
@@ -53,10 +62,10 @@ export class AutoEscalationTracker {
|
|
|
53
62
|
state.consecutiveFailures++;
|
|
54
63
|
state.consecutiveSuccesses = 0;
|
|
55
64
|
if (state.consecutiveFailures >= this.config.escalateAfterFailures) {
|
|
56
|
-
const currentIdx = tierIndex(state.currentTier);
|
|
57
|
-
const maxIdx = tierIndex(this.config.maxTier);
|
|
58
|
-
if (currentIdx < maxIdx) {
|
|
59
|
-
state.currentTier =
|
|
65
|
+
const currentIdx = this.tierIndex(state.currentTier);
|
|
66
|
+
const maxIdx = this.tierIndex(this.config.maxTier);
|
|
67
|
+
if (currentIdx >= 0 && currentIdx < maxIdx) {
|
|
68
|
+
state.currentTier = this.tierOrder[currentIdx + 1];
|
|
60
69
|
state.escalationCount++;
|
|
61
70
|
state.consecutiveFailures = 0;
|
|
62
71
|
state.lastAction = 'escalate';
|
|
@@ -69,10 +78,10 @@ export class AutoEscalationTracker {
|
|
|
69
78
|
state.consecutiveSuccesses++;
|
|
70
79
|
state.consecutiveFailures = 0;
|
|
71
80
|
if (state.consecutiveSuccesses >= this.config.deEscalateAfterSuccesses) {
|
|
72
|
-
const currentIdx = tierIndex(state.currentTier);
|
|
73
|
-
const minIdx = tierIndex(this.config.minTier);
|
|
81
|
+
const currentIdx = this.tierIndex(state.currentTier);
|
|
82
|
+
const minIdx = this.tierIndex(this.config.minTier);
|
|
74
83
|
if (currentIdx > minIdx) {
|
|
75
|
-
state.currentTier =
|
|
84
|
+
state.currentTier = this.tierOrder[currentIdx - 1];
|
|
76
85
|
state.deEscalationCount++;
|
|
77
86
|
state.consecutiveSuccesses = 0;
|
|
78
87
|
state.lastAction = 'de-escalate';
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Free-tier escalating executor (cross-pollination plan 06, D7-wire + D8).
|
|
3
|
+
*
|
|
4
|
+
* Implements Ruv's SWE-bench economics for a QE task:
|
|
5
|
+
* 1. run on the CHEAP/free local tier
|
|
6
|
+
* 2. verify with an objective QE oracle (pass/fail [+ feedback])
|
|
7
|
+
* 3. D8 REPAIR LOOP: on failure, feed the failure back to the SAME tier and
|
|
8
|
+
* retry (Round-2 lever: 7.7% -> 15.3% on a fixed model), up to `repairAttempts`
|
|
9
|
+
* 4. only then escalate up the ladder (when `escalate` is true)
|
|
10
|
+
* 5. record the start-tier outcome so the base tier adapts across tasks
|
|
11
|
+
*
|
|
12
|
+
* Decoupled by injection: free tiers via `freeTierChat`; Claude tiers via an
|
|
13
|
+
* injected `ClaudeTierRunner` (no Anthropic SDK dep; coordinator delegates to
|
|
14
|
+
* its HybridRouter). No runner → local-only. `escalate:false` = repair-only,
|
|
15
|
+
* never leaves the start tier (the "no escalation yet" mode).
|
|
16
|
+
*/
|
|
17
|
+
import { type ChatMessage } from './provider.js';
|
|
18
|
+
import { AutoEscalationTracker } from '../escalation/auto-escalation-tracker.js';
|
|
19
|
+
import type { QeRoutingLadder } from './types.js';
|
|
20
|
+
import type { AgentTier } from '../routing-config.js';
|
|
21
|
+
/** Serves a Claude tier. Injected by the host (e.g. delegates to HybridRouter). */
|
|
22
|
+
export type ClaudeTierRunner = (claudeTier: AgentTier, messages: ChatMessage[]) => Promise<{
|
|
23
|
+
content: string;
|
|
24
|
+
}>;
|
|
25
|
+
/** Rich verdict — lets the repair loop feed *why* it failed back to the model. */
|
|
26
|
+
export interface QeVerdict {
|
|
27
|
+
passed: boolean;
|
|
28
|
+
/** Human/model-readable reason a failed output was rejected (drives repair). */
|
|
29
|
+
feedback?: string;
|
|
30
|
+
}
|
|
31
|
+
/** The objective QE oracle: did the tier's output satisfy the task? */
|
|
32
|
+
export type QeVerifier = (output: string) => boolean | QeVerdict | Promise<boolean | QeVerdict>;
|
|
33
|
+
export interface QeTaskRequest {
|
|
34
|
+
/** Tracker key — usually `${agentRole}:${repo}` so adaptation is per-context. */
|
|
35
|
+
agentId: string;
|
|
36
|
+
/** The QE prompt sent to whichever tier handles it. */
|
|
37
|
+
messages: ChatMessage[];
|
|
38
|
+
/** Objective pass/fail check on the produced output (coverage run, arena, schema, …). */
|
|
39
|
+
verify: QeVerifier;
|
|
40
|
+
/** D8: same-tier repair retries after a failure, before escalating. Default 0. */
|
|
41
|
+
repairAttempts?: number;
|
|
42
|
+
/** Climb the ladder on failure. Default true; set false for repair-only (local). */
|
|
43
|
+
escalate?: boolean;
|
|
44
|
+
/** Cap on tiers tried for one task (default: full ladder). */
|
|
45
|
+
maxEscalations?: number;
|
|
46
|
+
}
|
|
47
|
+
export interface TierAttempt {
|
|
48
|
+
tier: string;
|
|
49
|
+
provider: 'free-tier' | 'claude';
|
|
50
|
+
/** 0 = first try at this tier; 1.. = repair rounds (D8). */
|
|
51
|
+
repairRound: number;
|
|
52
|
+
ok: boolean;
|
|
53
|
+
passed: boolean;
|
|
54
|
+
latencyMs: number;
|
|
55
|
+
feedback?: string;
|
|
56
|
+
error?: string;
|
|
57
|
+
}
|
|
58
|
+
export interface QeExecutionResult {
|
|
59
|
+
/** True iff some attempt produced output that passed `verify`. */
|
|
60
|
+
ok: boolean;
|
|
61
|
+
/** The passing output (or the last output tried). */
|
|
62
|
+
content: string;
|
|
63
|
+
/** The tier that produced the passing output, or the last tier tried. */
|
|
64
|
+
tierUsed: string;
|
|
65
|
+
/** True iff the task needed a tier above the starting one. */
|
|
66
|
+
escalated: boolean;
|
|
67
|
+
/** True iff a same-tier repair round produced the passing output. */
|
|
68
|
+
repaired: boolean;
|
|
69
|
+
/** Per-attempt trace, cheapest → most capable. */
|
|
70
|
+
attempts: TierAttempt[];
|
|
71
|
+
}
|
|
72
|
+
export interface FreeTierExecutorOptions {
|
|
73
|
+
ladder: QeRoutingLadder;
|
|
74
|
+
/** Serves Claude tiers; omit for local-only operation. */
|
|
75
|
+
claudeRunner?: ClaudeTierRunner;
|
|
76
|
+
/** Reuse an existing tracker (e.g. the coordinator's) or create one. */
|
|
77
|
+
tracker?: AutoEscalationTracker<string>;
|
|
78
|
+
/** Read env for free-tier keys (injectable for tests). */
|
|
79
|
+
env?: NodeJS.ProcessEnv;
|
|
80
|
+
/** Default same-tier repair retries when a request omits `repairAttempts`. */
|
|
81
|
+
defaultRepairAttempts?: number;
|
|
82
|
+
/** D9 sink: record each completed task outcome (→ routing-feedback). */
|
|
83
|
+
onOutcome?: (o: {
|
|
84
|
+
agentId: string;
|
|
85
|
+
startTier: string;
|
|
86
|
+
tierUsed: string;
|
|
87
|
+
passed: boolean;
|
|
88
|
+
escalated: boolean;
|
|
89
|
+
repaired: boolean;
|
|
90
|
+
durationMs: number;
|
|
91
|
+
attempts: number;
|
|
92
|
+
}) => void;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Executes QE tasks cheap-first with repair-then-escalate. Holds the per-agent
|
|
96
|
+
* adaptive base tier in an `AutoEscalationTracker`.
|
|
97
|
+
*/
|
|
98
|
+
export declare class FreeTierEscalatingExecutor {
|
|
99
|
+
private readonly ladder;
|
|
100
|
+
private readonly claudeRunner?;
|
|
101
|
+
private readonly tracker;
|
|
102
|
+
private readonly env;
|
|
103
|
+
private readonly baseTier;
|
|
104
|
+
private readonly defaultRepairAttempts;
|
|
105
|
+
private readonly onOutcome?;
|
|
106
|
+
constructor(opts: FreeTierExecutorOptions);
|
|
107
|
+
/** Expose the tracker so a coordinator can inspect/share adaptation state. */
|
|
108
|
+
getTracker(): AutoEscalationTracker<string>;
|
|
109
|
+
/** Run ONE tier once; never throws — failure becomes `{ok:false}` so we repair/escalate. */
|
|
110
|
+
private runTier;
|
|
111
|
+
/** Build the D8 repair turn: show the model its rejected output + why. */
|
|
112
|
+
private repairMessages;
|
|
113
|
+
/**
|
|
114
|
+
* Execute a QE task cheap-first: try a tier, repair in place on failure, then
|
|
115
|
+
* (optionally) escalate to the next tier; repeat until pass or top.
|
|
116
|
+
*/
|
|
117
|
+
execute(req: QeTaskRequest): Promise<QeExecutionResult>;
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=executor.d.ts.map
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Free-tier escalating executor (cross-pollination plan 06, D7-wire + D8).
|
|
3
|
+
*
|
|
4
|
+
* Implements Ruv's SWE-bench economics for a QE task:
|
|
5
|
+
* 1. run on the CHEAP/free local tier
|
|
6
|
+
* 2. verify with an objective QE oracle (pass/fail [+ feedback])
|
|
7
|
+
* 3. D8 REPAIR LOOP: on failure, feed the failure back to the SAME tier and
|
|
8
|
+
* retry (Round-2 lever: 7.7% -> 15.3% on a fixed model), up to `repairAttempts`
|
|
9
|
+
* 4. only then escalate up the ladder (when `escalate` is true)
|
|
10
|
+
* 5. record the start-tier outcome so the base tier adapts across tasks
|
|
11
|
+
*
|
|
12
|
+
* Decoupled by injection: free tiers via `freeTierChat`; Claude tiers via an
|
|
13
|
+
* injected `ClaudeTierRunner` (no Anthropic SDK dep; coordinator delegates to
|
|
14
|
+
* its HybridRouter). No runner → local-only. `escalate:false` = repair-only,
|
|
15
|
+
* never leaves the start tier (the "no escalation yet" mode).
|
|
16
|
+
*/
|
|
17
|
+
import { freeTierChat } from './provider.js';
|
|
18
|
+
import { resolveTier } from './ladder.js';
|
|
19
|
+
import { AutoEscalationTracker } from '../escalation/auto-escalation-tracker.js';
|
|
20
|
+
function normalizeVerdict(v) {
|
|
21
|
+
return typeof v === 'boolean' ? { passed: v } : v;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Executes QE tasks cheap-first with repair-then-escalate. Holds the per-agent
|
|
25
|
+
* adaptive base tier in an `AutoEscalationTracker`.
|
|
26
|
+
*/
|
|
27
|
+
export class FreeTierEscalatingExecutor {
|
|
28
|
+
ladder;
|
|
29
|
+
claudeRunner;
|
|
30
|
+
tracker;
|
|
31
|
+
env;
|
|
32
|
+
baseTier;
|
|
33
|
+
defaultRepairAttempts;
|
|
34
|
+
onOutcome;
|
|
35
|
+
constructor(opts) {
|
|
36
|
+
this.ladder = opts.ladder;
|
|
37
|
+
this.claudeRunner = opts.claudeRunner;
|
|
38
|
+
this.env = opts.env ?? process.env;
|
|
39
|
+
this.onOutcome = opts.onOutcome;
|
|
40
|
+
this.defaultRepairAttempts = opts.defaultRepairAttempts ?? 0;
|
|
41
|
+
this.baseTier = opts.ladder.tierOrder[0];
|
|
42
|
+
this.tracker =
|
|
43
|
+
opts.tracker ??
|
|
44
|
+
new AutoEscalationTracker({
|
|
45
|
+
tierOrder: opts.ladder.tierOrder,
|
|
46
|
+
minTier: opts.ladder.minTier ?? opts.ladder.tierOrder[0],
|
|
47
|
+
maxTier: opts.ladder.maxTier ?? opts.ladder.tierOrder[opts.ladder.tierOrder.length - 1],
|
|
48
|
+
escalateAfterFailures: opts.ladder.escalateAfterFailures ?? 2,
|
|
49
|
+
deEscalateAfterSuccesses: opts.ladder.deEscalateAfterSuccesses ?? 5,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/** Expose the tracker so a coordinator can inspect/share adaptation state. */
|
|
53
|
+
getTracker() {
|
|
54
|
+
return this.tracker;
|
|
55
|
+
}
|
|
56
|
+
/** Run ONE tier once; never throws — failure becomes `{ok:false}` so we repair/escalate. */
|
|
57
|
+
async runTier(resolved, messages) {
|
|
58
|
+
const started = Date.now();
|
|
59
|
+
if (resolved.provider === 'free-tier') {
|
|
60
|
+
const r = await freeTierChat(resolved.resolved, messages);
|
|
61
|
+
return { ok: r.ok, content: r.content, latencyMs: r.latencyMs, error: r.error };
|
|
62
|
+
}
|
|
63
|
+
if (!this.claudeRunner) {
|
|
64
|
+
return { ok: false, content: '', latencyMs: Date.now() - started, error: 'no claudeRunner (local-only mode)' };
|
|
65
|
+
}
|
|
66
|
+
try {
|
|
67
|
+
const r = await this.claudeRunner(resolved.claudeTier, messages);
|
|
68
|
+
return { ok: (r.content ?? '').trim().length > 0, content: r.content ?? '', latencyMs: Date.now() - started };
|
|
69
|
+
}
|
|
70
|
+
catch (e) {
|
|
71
|
+
return { ok: false, content: '', latencyMs: Date.now() - started, error: e.message };
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/** Build the D8 repair turn: show the model its rejected output + why. */
|
|
75
|
+
repairMessages(base, lastOutput, feedback) {
|
|
76
|
+
return [
|
|
77
|
+
...base,
|
|
78
|
+
{ role: 'assistant', content: lastOutput },
|
|
79
|
+
{
|
|
80
|
+
role: 'user',
|
|
81
|
+
content: 'That output did not pass verification' +
|
|
82
|
+
(feedback ? `: ${feedback}` : '.') +
|
|
83
|
+
' Fix it and return the corrected full output only.',
|
|
84
|
+
},
|
|
85
|
+
];
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Execute a QE task cheap-first: try a tier, repair in place on failure, then
|
|
89
|
+
* (optionally) escalate to the next tier; repeat until pass or top.
|
|
90
|
+
*/
|
|
91
|
+
async execute(req) {
|
|
92
|
+
const order = this.ladder.tierOrder;
|
|
93
|
+
const escalate = req.escalate ?? true;
|
|
94
|
+
const repairAttempts = req.repairAttempts ?? this.defaultRepairAttempts;
|
|
95
|
+
const startTier = this.tracker.getCurrentTier(req.agentId) ?? this.baseTier;
|
|
96
|
+
const startIdx = Math.max(0, order.indexOf(startTier));
|
|
97
|
+
const maxIdx = order.indexOf(this.ladder.maxTier ?? order[order.length - 1]);
|
|
98
|
+
const topIdx = escalate
|
|
99
|
+
? (req.maxEscalations != null ? Math.min(startIdx + req.maxEscalations, maxIdx) : maxIdx)
|
|
100
|
+
: startIdx; // repair-only: never leave the start tier
|
|
101
|
+
const attempts = [];
|
|
102
|
+
let passedAtStart = false;
|
|
103
|
+
const t0 = Date.now();
|
|
104
|
+
let result = { ok: false, content: '', tierUsed: startTier, escalated: false, repaired: false, attempts };
|
|
105
|
+
outer: for (let idx = startIdx; idx <= topIdx; idx++) {
|
|
106
|
+
const tier = order[idx];
|
|
107
|
+
const resolved = resolveTier(this.ladder, tier, this.env);
|
|
108
|
+
// first try (round 0) + up to `repairAttempts` repair rounds
|
|
109
|
+
for (let round = 0; round <= repairAttempts; round++) {
|
|
110
|
+
const messages = round === 0 ? req.messages : this.repairMessages(req.messages, result.content, attempts[attempts.length - 1]?.feedback);
|
|
111
|
+
const run = await this.runTier(resolved, messages);
|
|
112
|
+
const verdict = run.ok ? normalizeVerdict(await Promise.resolve(req.verify(run.content))) : { passed: false, feedback: run.error };
|
|
113
|
+
attempts.push({ tier, provider: resolved.provider, repairRound: round, ok: run.ok, passed: verdict.passed, latencyMs: run.latencyMs, feedback: verdict.feedback, error: run.error });
|
|
114
|
+
if (idx === startIdx && round === 0)
|
|
115
|
+
passedAtStart = verdict.passed;
|
|
116
|
+
if (verdict.passed) {
|
|
117
|
+
result = { ok: true, content: run.content, tierUsed: tier, escalated: idx > startIdx, repaired: round > 0, attempts };
|
|
118
|
+
break outer;
|
|
119
|
+
}
|
|
120
|
+
result = { ok: false, content: run.content || result.content, tierUsed: tier, escalated: idx > startIdx, repaired: round > 0, attempts };
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
// Cross-task adaptation: feed the START-tier verdict to the tracker so the
|
|
124
|
+
// base tier drifts up when the cheap tier keeps failing, down when it wins.
|
|
125
|
+
this.tracker.recordOutcome(req.agentId, passedAtStart, this.baseTier);
|
|
126
|
+
this.onOutcome?.({
|
|
127
|
+
agentId: req.agentId,
|
|
128
|
+
startTier,
|
|
129
|
+
tierUsed: result.tierUsed,
|
|
130
|
+
passed: result.ok,
|
|
131
|
+
escalated: result.escalated,
|
|
132
|
+
repaired: result.repaired,
|
|
133
|
+
durationMs: Date.now() - t0,
|
|
134
|
+
attempts: attempts.length,
|
|
135
|
+
});
|
|
136
|
+
return result;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
//# sourceMappingURL=executor.js.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* D9 — route free-tier executor outcomes into the existing routing-feedback
|
|
3
|
+
* machinery so the stuck-at-40% routing confidence starts moving from REAL
|
|
4
|
+
* cheap-vs-escalated results.
|
|
5
|
+
*
|
|
6
|
+
* `RoutingFeedbackCollector.recordOutcome` already updates the calibrator, the
|
|
7
|
+
* auto-escalation tracker, the economic model, and the confidence metrics. This
|
|
8
|
+
* adapter maps a `FreeTierEscalatingExecutor.onOutcome` event onto that call,
|
|
9
|
+
* constructing a minimal-but-valid QETask + synthetic QERoutingDecision.
|
|
10
|
+
*
|
|
11
|
+
* Decoupled by a structural interface (`RoutingFeedbackLike`) so this module has
|
|
12
|
+
* no hard dependency on the concrete collector's constructor/DB — the coordinator
|
|
13
|
+
* passes whatever it already holds, and tests pass a stub.
|
|
14
|
+
*/
|
|
15
|
+
import type { QETask, QERoutingDecision, RoutingOutcome } from '../types.js';
|
|
16
|
+
/** The slice of RoutingFeedbackCollector this adapter needs. */
|
|
17
|
+
export interface RoutingFeedbackLike {
|
|
18
|
+
recordOutcome(task: QETask, decision: QERoutingDecision, usedAgent: string, outcome: {
|
|
19
|
+
success: boolean;
|
|
20
|
+
qualityScore: number;
|
|
21
|
+
durationMs: number;
|
|
22
|
+
error?: string;
|
|
23
|
+
}): RoutingOutcome;
|
|
24
|
+
}
|
|
25
|
+
/** The executor's onOutcome payload (kept structural to avoid a circular import). */
|
|
26
|
+
export interface FreeTierOutcomeEvent {
|
|
27
|
+
agentId: string;
|
|
28
|
+
startTier: string;
|
|
29
|
+
tierUsed: string;
|
|
30
|
+
passed: boolean;
|
|
31
|
+
escalated: boolean;
|
|
32
|
+
repaired: boolean;
|
|
33
|
+
durationMs: number;
|
|
34
|
+
attempts: number;
|
|
35
|
+
}
|
|
36
|
+
export interface RoutingFeedbackSinkOptions {
|
|
37
|
+
/** Short label for the task description (e.g. 'test-generation'). */
|
|
38
|
+
taskKind?: string;
|
|
39
|
+
/** Confidence to attribute to the cheap-first decision (0..1). Default 0.5. */
|
|
40
|
+
decisionConfidence?: number;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Build an `onOutcome` handler that records each free-tier task result into the
|
|
44
|
+
* routing-feedback collector. `usedAgent` is set to the TIER that produced the
|
|
45
|
+
* result so the calibrator/escalation tracker learn per-tier reliability — i.e.
|
|
46
|
+
* sustained cheap-tier wins raise its confidence and keep work cheap.
|
|
47
|
+
*/
|
|
48
|
+
export declare function createRoutingFeedbackSink(collector: RoutingFeedbackLike, opts?: RoutingFeedbackSinkOptions): (o: FreeTierOutcomeEvent) => void;
|
|
49
|
+
//# sourceMappingURL=feedback-sink.d.ts.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* D9 — route free-tier executor outcomes into the existing routing-feedback
|
|
3
|
+
* machinery so the stuck-at-40% routing confidence starts moving from REAL
|
|
4
|
+
* cheap-vs-escalated results.
|
|
5
|
+
*
|
|
6
|
+
* `RoutingFeedbackCollector.recordOutcome` already updates the calibrator, the
|
|
7
|
+
* auto-escalation tracker, the economic model, and the confidence metrics. This
|
|
8
|
+
* adapter maps a `FreeTierEscalatingExecutor.onOutcome` event onto that call,
|
|
9
|
+
* constructing a minimal-but-valid QETask + synthetic QERoutingDecision.
|
|
10
|
+
*
|
|
11
|
+
* Decoupled by a structural interface (`RoutingFeedbackLike`) so this module has
|
|
12
|
+
* no hard dependency on the concrete collector's constructor/DB — the coordinator
|
|
13
|
+
* passes whatever it already holds, and tests pass a stub.
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* Build an `onOutcome` handler that records each free-tier task result into the
|
|
17
|
+
* routing-feedback collector. `usedAgent` is set to the TIER that produced the
|
|
18
|
+
* result so the calibrator/escalation tracker learn per-tier reliability — i.e.
|
|
19
|
+
* sustained cheap-tier wins raise its confidence and keep work cheap.
|
|
20
|
+
*/
|
|
21
|
+
export function createRoutingFeedbackSink(collector, opts = {}) {
|
|
22
|
+
const kind = opts.taskKind ?? 'free-tier-qe';
|
|
23
|
+
const confidence = opts.decisionConfidence ?? 0.5;
|
|
24
|
+
return (o) => {
|
|
25
|
+
const task = {
|
|
26
|
+
description: `${kind} task for ${o.agentId} (start=${o.startTier}${o.repaired ? ', repaired' : ''}${o.escalated ? ', escalated' : ''})`,
|
|
27
|
+
};
|
|
28
|
+
const decision = {
|
|
29
|
+
recommended: o.startTier, // cheap-first recommended the bottom tier
|
|
30
|
+
confidence,
|
|
31
|
+
alternatives: [],
|
|
32
|
+
reasoning: `free-tier cheap-first; resolved at ${o.tierUsed} after ${o.attempts} attempt(s)`,
|
|
33
|
+
scores: { similarity: 0, performance: o.passed ? 1 : 0, capabilities: 0, combined: o.passed ? 1 : 0 },
|
|
34
|
+
latencyMs: o.durationMs,
|
|
35
|
+
timestamp: new Date(),
|
|
36
|
+
};
|
|
37
|
+
// qualityScore: full marks on a clean cheap win; reduced when repair/escalation
|
|
38
|
+
// was needed (still a success, but it cost more) so the calibrator learns nuance.
|
|
39
|
+
const qualityScore = o.passed ? (o.escalated ? 0.6 : o.repaired ? 0.8 : 1.0) : 0;
|
|
40
|
+
try {
|
|
41
|
+
collector.recordOutcome(task, decision, o.tierUsed, {
|
|
42
|
+
success: o.passed,
|
|
43
|
+
qualityScore,
|
|
44
|
+
durationMs: o.durationMs,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
catch {
|
|
48
|
+
// Feedback recording is best-effort — never break the QE task on a sink error.
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=feedback-sink.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Free-tier routing (cross-pollination plan 06, D7).
|
|
3
|
+
*
|
|
4
|
+
* Adds a configurable FREE / low-cost model tier below haiku in the escalation
|
|
5
|
+
* ladder: local Ollama, cloud Ollama, OpenRouter, or any OpenAI-compatible
|
|
6
|
+
* endpoint. Cheap-local handles the bulk; only failures escalate up the chain.
|
|
7
|
+
* See docs/metaharness/06-darwin-qe-self-learning-action-lane.md (D7).
|
|
8
|
+
*/
|
|
9
|
+
export type { FreeTierKind, FreeTierProviderConfig, ResolvedFreeTierProvider, TierBinding, QeRoutingLadder, } from './types.js';
|
|
10
|
+
export { FREE_TIER_PRESETS, resolveFreeTierProvider, freeTierChat, freeTierHealth, type ChatMessage, type FreeTierChatResult, } from './provider.js';
|
|
11
|
+
export { defaultFreeTierLadder, validateLadder, createFreeTierEscalation, resolveTier, type ResolvedTier, } from './ladder.js';
|
|
12
|
+
export { FreeTierEscalatingExecutor, type ClaudeTierRunner, type QeVerifier, type QeVerdict, type QeTaskRequest, type QeExecutionResult, type TierAttempt, type FreeTierExecutorOptions, } from './executor.js';
|
|
13
|
+
export { createRoutingFeedbackSink, type RoutingFeedbackLike, type FreeTierOutcomeEvent, type RoutingFeedbackSinkOptions, } from './feedback-sink.js';
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { FREE_TIER_PRESETS, resolveFreeTierProvider, freeTierChat, freeTierHealth, } from './provider.js';
|
|
2
|
+
export { defaultFreeTierLadder, validateLadder, createFreeTierEscalation, resolveTier, } from './ladder.js';
|
|
3
|
+
export { FreeTierEscalatingExecutor, } from './executor.js';
|
|
4
|
+
export { createRoutingFeedbackSink, } from './feedback-sink.js';
|
|
5
|
+
//# sourceMappingURL=index.js.map
|