agentic-qe 3.10.9 → 3.11.1
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/commands/agents/README.md +50 -0
- package/.claude/commands/agents/agent-capabilities.md +140 -0
- package/.claude/commands/agents/agent-coordination.md +28 -0
- package/.claude/commands/agents/agent-spawning.md +28 -0
- package/.claude/commands/agents/agent-types.md +216 -0
- package/.claude/commands/agents/health.md +139 -0
- package/.claude/commands/agents/list.md +100 -0
- package/.claude/commands/agents/logs.md +130 -0
- package/.claude/commands/agents/metrics.md +122 -0
- package/.claude/commands/agents/pool.md +127 -0
- package/.claude/commands/agents/spawn.md +140 -0
- package/.claude/commands/agents/status.md +115 -0
- package/.claude/commands/agents/stop.md +102 -0
- package/.claude/commands/claude-flow-help.md +1 -1
- package/.claude/commands/coordination/README.md +9 -0
- package/.claude/commands/coordination/agent-spawn.md +25 -0
- package/.claude/commands/coordination/init.md +44 -0
- package/.claude/commands/coordination/orchestrate.md +43 -0
- package/.claude/commands/coordination/spawn.md +45 -0
- package/.claude/commands/coordination/swarm-init.md +85 -0
- package/.claude/commands/coordination/task-orchestrate.md +25 -0
- package/.claude/commands/github/code-review-swarm.md +1 -1
- package/.claude/commands/github/issue-tracker.md +3 -3
- package/.claude/commands/github/release-manager.md +5 -3
- package/.claude/commands/github/release-swarm.md +1 -1
- package/.claude/commands/github/repo-architect.md +2 -2
- package/.claude/commands/github/swarm-issue.md +4 -1
- package/.claude/commands/github/swarm-pr.md +6 -3
- package/.claude/commands/github/sync-coordinator.md +3 -1
- package/.claude/commands/github/workflow-automation.md +2 -2
- package/.claude/commands/hive-mind/README.md +17 -0
- package/.claude/commands/hive-mind/hive-mind-consensus.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-init.md +18 -0
- package/.claude/commands/hive-mind/hive-mind-memory.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-metrics.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-resume.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-sessions.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-spawn.md +21 -0
- package/.claude/commands/hive-mind/hive-mind-status.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-stop.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-wizard.md +8 -0
- package/.claude/commands/hive-mind/hive-mind.md +27 -0
- package/.claude/commands/memory/README.md +9 -0
- package/.claude/commands/memory/memory-persist.md +25 -0
- package/.claude/commands/memory/memory-search.md +25 -0
- package/.claude/commands/memory/memory-usage.md +25 -0
- package/.claude/commands/memory/neural.md +47 -0
- package/.claude/commands/swarm/README.md +15 -0
- package/.claude/commands/swarm/analysis.md +95 -0
- package/.claude/commands/swarm/development.md +96 -0
- package/.claude/commands/swarm/examples.md +168 -0
- package/.claude/commands/swarm/maintenance.md +102 -0
- package/.claude/commands/swarm/optimization.md +117 -0
- package/.claude/commands/swarm/research.md +136 -0
- package/.claude/commands/swarm/swarm-analysis.md +8 -0
- package/.claude/commands/swarm/swarm-background.md +8 -0
- package/.claude/commands/swarm/swarm-init.md +19 -0
- package/.claude/commands/swarm/swarm-modes.md +8 -0
- package/.claude/commands/swarm/swarm-monitor.md +8 -0
- package/.claude/commands/swarm/swarm-spawn.md +19 -0
- package/.claude/commands/swarm/swarm-status.md +8 -0
- package/.claude/commands/swarm/swarm-strategies.md +8 -0
- package/.claude/commands/swarm/swarm.md +87 -0
- package/.claude/commands/swarm/testing.md +131 -0
- package/.claude/commands/workflows/README.md +9 -0
- package/.claude/commands/workflows/development.md +78 -0
- package/.claude/commands/workflows/research.md +63 -0
- package/.claude/commands/workflows/workflow-create.md +25 -0
- package/.claude/commands/workflows/workflow-execute.md +25 -0
- package/.claude/commands/workflows/workflow-export.md +25 -0
- package/.claude/helpers/auto-commit.sh +1 -1
- package/.claude/helpers/auto-memory-hook.mjs +37 -4
- package/.claude/helpers/github-safe.js +90 -40
- package/.claude/helpers/github-setup.sh +30 -13
- package/.claude/helpers/hook-handler.cjs +68 -49
- package/.claude/helpers/intelligence.cjs +156 -27
- package/.claude/helpers/post-commit +1 -1
- package/.claude/helpers/pre-commit +1 -1
- package/.claude/helpers/quick-start.sh +4 -4
- package/.claude/helpers/router.js +70 -31
- package/.claude/helpers/ruflo-hook.cjs +59 -0
- package/.claude/helpers/session.js +28 -6
- package/.claude/helpers/setup-mcp.sh +3 -3
- package/.claude/helpers/statusline.cjs +584 -468
- package/.claude/helpers/statusline.js +47 -11
- 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/github-code-review/SKILL.md +2 -17
- package/.claude/skills/github-multi-repo/SKILL.md +4 -16
- package/.claude/skills/github-project-management/SKILL.md +18 -33
- package/.claude/skills/github-release-management/SKILL.md +4 -21
- package/.claude/skills/github-workflow-automation/SKILL.md +8 -26
- package/.claude/skills/holistic-testing-pact/SKILL.md +50 -17
- package/.claude/skills/pair-programming/SKILL.md +2 -2
- package/.claude/skills/reasoningbank-intelligence/SKILL.md +2 -2
- package/.claude/skills/skill-builder/SKILL.md +0 -103
- package/.claude/skills/skills-manifest.json +6 -6
- package/.claude/skills/sparc-methodology/SKILL.md +2 -11
- package/.claude/skills/stream-chain/SKILL.md +0 -3
- package/.claude/skills/swarm-advanced/SKILL.md +2 -5
- package/.claude/skills/swarm-orchestration/SKILL.md +1 -1
- package/.claude/skills/verification-quality/SKILL.md +121 -93
- package/.opencode/skills/qe-agentic-quality-engineering.yaml +5 -5
- package/.opencode/skills/qe-holistic-testing-pact.yaml +11 -11
- package/CHANGELOG.md +100 -0
- 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/pair-programming/SKILL.md +2 -2
- package/assets/skills/skills-manifest.json +6 -6
- package/assets/skills/verification-quality/SKILL.md +121 -93
- package/dist/audit/witness-chain.d.ts +1 -1
- package/dist/audit/witness-findings.d.ts +50 -0
- package/dist/audit/witness-findings.js +41 -0
- package/dist/cli/bundle.js +5 -5
- package/dist/cli/chunks/adapter-A6GCBONS.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-RPAOJXZ3.js → agent-booster-wasm-3OJAT664.js} +2 -2
- package/dist/cli/chunks/{agent-handler-SMD5CAS6.js → agent-handler-6TCTI5AT.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-3IOQIQ7Y.js → agent-memory-branch-FAWCYEGJ.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-FRCSXNMG.js +2 -0
- package/dist/cli/chunks/{arena-AP2J62WO.js → arena-O2TCUQBF.js} +4 -4
- package/dist/cli/chunks/{arena-GT3D6EAO.js → arena-UVYIGYUF.js} +2 -2
- package/dist/cli/chunks/{audit-Q3GJ5354.js → audit-AYESKHAJ.js} +2 -2
- package/dist/cli/chunks/base-CZ3EHBU5.js +2 -0
- package/dist/cli/chunks/{hnswlib-node-YTK7S7GL.js → better-sqlite3-MJNUEPYB.js} +2 -2
- package/dist/cli/chunks/{brain-handler-2Z4ILQF3.js → brain-handler-KSJBVTHZ.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-EZWGL4UM.js → branch-enumerator-4O3S42EG.js} +2 -2
- package/dist/cli/chunks/{browser-YZELFPLJ.js → browser-5VXK323P.js} +2 -2
- package/dist/cli/chunks/browser-workflow-EKTGQQBQ.js +2 -0
- package/dist/cli/chunks/{chunk-CDJIYJIA.js → chunk-22FHOXEE.js} +1 -1
- package/dist/cli/chunks/{chunk-OIN3Y4BY.js → chunk-2RE32VOF.js} +1 -1
- package/dist/cli/chunks/{chunk-RSWQY4NZ.js → chunk-3D4HNUZM.js} +2 -2
- package/dist/cli/chunks/{chunk-6TR3OM7C.js → chunk-3DS7ZHA7.js} +2 -2
- package/dist/cli/chunks/{chunk-HGKZOSAI.js → chunk-3G25ZBQ6.js} +1 -1
- package/dist/cli/chunks/{chunk-QHPLU5BU.js → chunk-3IMEDZIS.js} +3 -3
- package/dist/cli/chunks/{chunk-EL6F72JN.js → chunk-3V5DAM37.js} +2 -2
- package/dist/cli/chunks/{chunk-IR7PJUO7.js → chunk-3XCEFSUK.js} +2 -2
- package/dist/cli/chunks/{chunk-L5NEEGKO.js → chunk-437XL5VZ.js} +2 -2
- package/dist/cli/chunks/{chunk-C6GQIUKW.js → chunk-44HXRFOP.js} +2 -2
- package/dist/cli/chunks/{chunk-KAMFT25W.js → chunk-4565IIF6.js} +2 -2
- package/dist/cli/chunks/{chunk-X7677BX3.js → chunk-4BMPFEEG.js} +2 -2
- package/dist/cli/chunks/{chunk-3YKJGKOY.js → chunk-4G4GTF36.js} +4 -4
- package/dist/cli/chunks/{chunk-352W5G4G.js → chunk-4OYC5TIZ.js} +2 -2
- package/dist/cli/chunks/{chunk-VHCHBMZC.js → chunk-4RUS5E3Q.js} +2 -2
- package/dist/cli/chunks/{chunk-QHICG2NI.js → chunk-4S3UIY3G.js} +2 -2
- package/dist/cli/chunks/{chunk-FD37QFXW.js → chunk-4UHWZ47M.js} +1 -1
- package/dist/cli/chunks/{chunk-UU7OCRZM.js → chunk-56PICCZN.js} +2 -2
- package/dist/cli/chunks/chunk-57WGS6BI.js +2 -0
- package/dist/cli/chunks/{chunk-RRSJ7BMF.js → chunk-5LDUW2FD.js} +1 -1
- package/dist/cli/chunks/{chunk-J6GKKXCP.js → chunk-5PSIKJL5.js} +2 -2
- package/dist/cli/chunks/{chunk-QE3CZGAC.js → chunk-5QFZEEJ2.js} +3 -3
- package/dist/cli/chunks/{chunk-RHOBDQXA.js → chunk-5Y7GXQOM.js} +2 -2
- package/dist/cli/chunks/{chunk-5X73HV2P.js → chunk-6CH7476R.js} +1 -1
- package/dist/cli/chunks/{chunk-BG2FN5K2.js → chunk-6WNYBIPS.js} +2 -2
- package/dist/cli/chunks/{chunk-G4KVGUQN.js → chunk-6YNXH6H4.js} +2 -2
- package/dist/cli/chunks/{chunk-2WRVNEIR.js → chunk-6ZAUNPAI.js} +2 -2
- package/dist/cli/chunks/{chunk-2I5QLMQF.js → chunk-72UPBNVF.js} +2 -2
- package/dist/cli/chunks/{chunk-VDL277DX.js → chunk-76UVJLPM.js} +2 -2
- package/dist/cli/chunks/{chunk-4EJTE5TL.js → chunk-7DQLYWLR.js} +1 -1
- package/dist/cli/chunks/{chunk-4D3LVXUD.js → chunk-7GP7ZG3K.js} +2 -2
- package/dist/cli/chunks/{chunk-757YHKIJ.js → chunk-7OAKIXNM.js} +2 -2
- package/dist/cli/chunks/{chunk-7S6D5K4X.js → chunk-7QICU44H.js} +2 -2
- package/dist/cli/chunks/{chunk-ABJPFKHE.js → chunk-7SRSOZMP.js} +1 -1
- package/dist/cli/chunks/{chunk-2WSEJHFQ.js → chunk-7WQKKYYG.js} +1 -1
- package/dist/cli/chunks/{chunk-7NT34MLU.js → chunk-AEZMNFXM.js} +1 -1
- package/dist/cli/chunks/{chunk-MDED3HJI.js → chunk-AG4BYKUV.js} +2 -2
- package/dist/cli/chunks/{chunk-QL7OOCPO.js → chunk-AL54LED5.js} +2 -2
- package/dist/cli/chunks/{chunk-I7RTTJH5.js → chunk-ATQTTGSE.js} +2 -2
- package/dist/cli/chunks/{chunk-HQZX4XYH.js → chunk-B5EE63VE.js} +2 -2
- package/dist/cli/chunks/{chunk-QWXJRZEH.js → chunk-B6U56VWG.js} +1 -1
- package/dist/cli/chunks/{chunk-5HLOQEKL.js → chunk-BOQNPFO5.js} +1 -1
- package/dist/cli/chunks/{chunk-I5C7O5IQ.js → chunk-BR4ERWVD.js} +2 -2
- package/dist/cli/chunks/{chunk-GPALZJD3.js → chunk-BVFNF3RW.js} +1 -1
- package/dist/cli/chunks/{chunk-NYBAH76S.js → chunk-BXLWERBR.js} +3 -3
- package/dist/cli/chunks/{chunk-YQBL5XTM.js → chunk-C27UV6DO.js} +1 -1
- package/dist/cli/chunks/{chunk-UUA2NVUN.js → chunk-C7FYDE5F.js} +244 -233
- package/dist/cli/chunks/{chunk-6HPI6YX3.js → chunk-CIDTFU3C.js} +2 -2
- package/dist/cli/chunks/{chunk-VIHFC67B.js → chunk-CII57TME.js} +1 -1
- package/dist/cli/chunks/{chunk-57XCLC55.js → chunk-CN2HMHIY.js} +2 -2
- package/dist/cli/chunks/{chunk-CREORFJV.js → chunk-CXIFCN6G.js} +1 -1
- package/dist/cli/chunks/{chunk-EYGRNXQT.js → chunk-CZU5G6J4.js} +1 -1
- package/dist/cli/chunks/{chunk-HZSYCVLC.js → chunk-D4DAZ3P2.js} +2 -2
- package/dist/cli/chunks/{chunk-3HT4CT6F.js → chunk-D6MPGK7R.js} +2 -2
- package/dist/cli/chunks/{chunk-DK6WWNCL.js → chunk-DZT4A7R3.js} +2 -2
- package/dist/cli/chunks/{chunk-H7AQ7M3J.js → chunk-EFRIMR74.js} +1 -1
- package/dist/cli/chunks/{chunk-S73EBPI5.js → chunk-EJSDQQZH.js} +3 -3
- package/dist/cli/chunks/{chunk-X6YUGKMM.js → chunk-EQYDPF52.js} +1 -1
- package/dist/cli/chunks/{chunk-BYVARYGB.js → chunk-EZBXCEBV.js} +2 -2
- package/dist/cli/chunks/{chunk-L5IO7QNO.js → chunk-FBOPSWF6.js} +2 -2
- package/dist/cli/chunks/{chunk-K23XK33X.js → chunk-FK3XYV3A.js} +2 -2
- package/dist/cli/chunks/{chunk-4BB75U6N.js → chunk-FOD6JEEU.js} +2 -2
- package/dist/cli/chunks/{chunk-TIR3Z6TE.js → chunk-GUSW3OGX.js} +1 -1
- package/dist/cli/chunks/{chunk-2K2X75UF.js → chunk-H4V6WCF7.js} +2 -2
- package/dist/cli/chunks/{chunk-AHUX7QSE.js → chunk-H5GCRC2D.js} +2 -2
- package/dist/cli/chunks/{chunk-R2M3RMCN.js → chunk-HMVL55QX.js} +2 -2
- package/dist/cli/chunks/{chunk-NOWGQ6YZ.js → chunk-HOFEAA4R.js} +1 -1
- package/dist/cli/chunks/{chunk-PFGH7TWL.js → chunk-HYT5EMES.js} +2 -2
- package/dist/cli/chunks/{chunk-AU4DQMLJ.js → chunk-IAHJ62JS.js} +4 -4
- package/dist/cli/chunks/{chunk-ZVF7QY4R.js → chunk-IIX5Y7BO.js} +1 -1
- package/dist/cli/chunks/{chunk-QAP5S7YC.js → chunk-ILZHECWZ.js} +3 -3
- package/dist/cli/chunks/{chunk-ZT2DGSIO.js → chunk-IUVAWWQG.js} +2 -2
- package/dist/cli/chunks/{chunk-ABVBHH7P.js → chunk-IVZVVZZ3.js} +3 -3
- package/dist/cli/chunks/{chunk-DZWZASDV.js → chunk-J2LAYCYZ.js} +1 -1
- package/dist/cli/chunks/{chunk-G7V2HDTH.js → chunk-JGHEGMLD.js} +3 -3
- package/dist/cli/chunks/{chunk-QFIKEZB5.js → chunk-K3BBLIWW.js} +2 -2
- package/dist/cli/chunks/{chunk-BSMUT672.js → chunk-K7XPKGOL.js} +2 -2
- package/dist/cli/chunks/{chunk-YHFCLJMY.js → chunk-KIBP3LGY.js} +1 -1
- package/dist/cli/chunks/{chunk-U6TZVACK.js → chunk-KRUKMGPF.js} +2 -2
- package/dist/cli/chunks/{chunk-UX4UHYLE.js → chunk-L2QHZFC3.js} +1 -1
- package/dist/cli/chunks/{chunk-O36VC7B7.js → chunk-LNV76GGB.js} +2 -2
- package/dist/cli/chunks/{chunk-NMQEU4BG.js → chunk-LOPM3YIO.js} +2 -2
- package/dist/cli/chunks/{chunk-LT6QHDPK.js → chunk-LSZLXLZA.js} +2 -2
- package/dist/cli/chunks/{chunk-NLUWPS2H.js → chunk-MILWEZSZ.js} +3 -3
- package/dist/cli/chunks/{chunk-LHKQW72O.js → chunk-MX6M2VPB.js} +1 -1
- package/dist/cli/chunks/{chunk-KRAWWBX5.js → chunk-N4OWZLH5.js} +2 -2
- package/dist/cli/chunks/{chunk-4MUZGQPE.js → chunk-N52WQO3G.js} +2 -2
- package/dist/cli/chunks/{chunk-246Z3PH6.js → chunk-N6NSZG7Z.js} +2 -2
- package/dist/cli/chunks/{chunk-OQUH7657.js → chunk-N6RSJGTW.js} +5 -5
- package/dist/cli/chunks/{chunk-WOGWIMQK.js → chunk-NKCL6RAF.js} +2 -2
- package/dist/cli/chunks/{chunk-C6JULAWA.js → chunk-NVJIOCS5.js} +5 -5
- package/dist/cli/chunks/{chunk-TKZABUHO.js → chunk-NYWK7ZSX.js} +1 -1
- package/dist/cli/chunks/{chunk-DNE6MVNA.js → chunk-O5NF6BBD.js} +1 -1
- package/dist/cli/chunks/{chunk-CWRSQQHV.js → chunk-O75SVMMB.js} +2 -2
- package/dist/cli/chunks/{chunk-OD4OIPXO.js → chunk-OHBZON7T.js} +1 -1
- package/dist/cli/chunks/{chunk-CLJNAQXB.js → chunk-OUBYADPD.js} +2 -2
- package/dist/cli/chunks/{chunk-PYQZ4OA3.js → chunk-OUSD2RWO.js} +2 -2
- package/dist/cli/chunks/{chunk-TVU6NMO3.js → chunk-OX2PGDUM.js} +3 -3
- package/dist/cli/chunks/{chunk-XLK4GP3I.js → chunk-P7CMWL7Y.js} +2 -2
- package/dist/cli/chunks/{chunk-7C5HI4ZA.js → chunk-PY4YQDBM.js} +4 -4
- package/dist/cli/chunks/{chunk-5U5SEO7C.js → chunk-QEDS3MOJ.js} +2 -2
- package/dist/cli/chunks/{chunk-WPBVLIWQ.js → chunk-QMN563LV.js} +18 -18
- package/dist/cli/chunks/{chunk-D2JCSWYM.js → chunk-QOR4YAZY.js} +2 -2
- package/dist/cli/chunks/{chunk-H4SHHYRD.js → chunk-QUTKELAS.js} +2 -2
- package/dist/cli/chunks/{chunk-42FBJF73.js → chunk-QXDZN2WX.js} +1 -1
- package/dist/cli/chunks/{chunk-OSP5AJAB.js → chunk-S456W64P.js} +2 -2
- package/dist/cli/chunks/{chunk-VHYNRISI.js → chunk-S7IHSELP.js} +2 -2
- package/dist/cli/chunks/{chunk-62MH7QAQ.js → chunk-S7ZHD6VN.js} +2 -2
- package/dist/cli/chunks/{chunk-QL6ZJ7RV.js → chunk-SU4YXUVK.js} +2 -2
- package/dist/cli/chunks/{chunk-JZNMU63B.js → chunk-SZPTUV3B.js} +2 -2
- package/dist/cli/chunks/{chunk-FALB6Z2Y.js → chunk-T7PUM6OY.js} +1 -1
- package/dist/cli/chunks/{chunk-BVEQPMOF.js → chunk-TCKBICJ3.js} +2 -2
- package/dist/cli/chunks/{chunk-Z6FRNWQA.js → chunk-TOQJWLJV.js} +2 -2
- package/dist/cli/chunks/{chunk-YB3PQ3UV.js → chunk-TUEDIQHY.js} +1 -1
- package/dist/cli/chunks/{chunk-CVRTXIYP.js → chunk-U5GCSSYX.js} +1 -1
- package/dist/cli/chunks/{chunk-WWGGL3TR.js → chunk-UDLN2THT.js} +1 -1
- package/dist/cli/chunks/{chunk-CLSHSVMY.js → chunk-V6YDM37M.js} +1 -1
- package/dist/cli/chunks/{chunk-ILPIH4Z6.js → chunk-VGR65B4Y.js} +1 -1
- package/dist/cli/chunks/{chunk-XEMP2PNW.js → chunk-VRHLHGKR.js} +2 -2
- package/dist/cli/chunks/{chunk-BM52ZEAD.js → chunk-VS2G6LX5.js} +2 -2
- package/dist/cli/chunks/{chunk-TOGD2JH2.js → chunk-W6RS5S4Q.js} +2 -2
- package/dist/cli/chunks/{chunk-UJBIHPU5.js → chunk-WEPZOCN7.js} +1 -1
- package/dist/cli/chunks/{chunk-OF3EMOWN.js → chunk-WIC5UZCQ.js} +2 -2
- package/dist/cli/chunks/{chunk-D7NWDUY3.js → chunk-X2OVUBF6.js} +2 -2
- package/dist/cli/chunks/{chunk-XYRJL7YN.js → chunk-X4GKYSOH.js} +2 -2
- package/dist/cli/chunks/{chunk-TXWUV3S5.js → chunk-XEVUW4QL.js} +2 -2
- package/dist/cli/chunks/{chunk-HAC7NB6R.js → chunk-XMDZRULK.js} +2 -2
- package/dist/cli/chunks/{chunk-UPGKS6Z3.js → chunk-YFY35CSD.js} +2 -2
- package/dist/cli/chunks/{chunk-7D5JE46U.js → chunk-Z6ADE3KJ.js} +2 -2
- package/dist/cli/chunks/{chunk-KJA5A3TV.js → chunk-ZKPOKMJZ.js} +2 -2
- package/dist/cli/chunks/{chunk-7PYEJ4NV.js → chunk-ZRWAFMM7.js} +2 -2
- package/dist/cli/chunks/{ci-KDEFR2X3.js → ci-KTWY7BZT.js} +2 -2
- package/dist/cli/chunks/{ci-output-Z3WXRRFI.js → ci-output-WOX6QBMS.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-GS44DEW2.js → circuit-breaker-6XKOSFIF.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-OHVMHAAH.js → claude-flow-setup-5JA4MNE4.js} +2 -2
- package/dist/cli/chunks/client-X3KUJ6R5.js +2 -0
- package/dist/cli/chunks/{cline-installer-5TCF4MZD.js → cline-installer-Z2ANHEKW.js} +2 -2
- package/dist/cli/chunks/{code-3KCGTG7Z.js → code-NO4ZKNDU.js} +2 -2
- package/dist/cli/chunks/{code-index-extractor-LJBI54MZ.js → code-index-extractor-VV4OEPG7.js} +2 -2
- package/dist/cli/chunks/{codex-installer-IB62Z6LA.js → codex-installer-BP7Y2NYR.js} +2 -2
- package/dist/cli/chunks/{completions-JDXX7KKB.js → completions-YULJQUF4.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-6JVDXXXP.js → complexity-analyzer-D7XYPQ76.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-PUB45QVR.js → continuedev-installer-E3L7UF72.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-QWJ36P22.js → copilot-installer-5TRUMJC5.js} +2 -2
- package/dist/cli/chunks/core-handlers-A2EQB3UH.js +2 -0
- package/dist/cli/chunks/{cost-tracker-J3KEJDL5.js → cost-tracker-QTYSJMSV.js} +2 -2
- package/dist/cli/chunks/{coverage-FWKRI2EY.js → coverage-D5DKZ3XT.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-OKZ2PDHT.js +2 -0
- package/dist/cli/chunks/{cursor-installer-2HYCUCTH.js → cursor-installer-UDBHGUIG.js} +2 -2
- package/dist/cli/chunks/{daemon-G3DBRWDQ.js → daemon-2GXYN7F7.js} +3 -3
- package/dist/cli/chunks/{daemon-BVP66DIZ.js → daemon-IVWUMQKL.js} +4 -4
- package/dist/cli/chunks/{dag-attention-scheduler-2AQLNB4B.js → dag-attention-scheduler-PWXR4QTU.js} +2 -2
- package/dist/cli/chunks/{detect-RUM5SHNE.js → detect-C6P7ONFB.js} +2 -2
- package/dist/cli/chunks/{dist-node-GX7MJHFT.js → dist-node-2BUFM2JK.js} +2 -2
- package/dist/cli/chunks/{domain-handler-OFBGZ2U5.js → domain-handler-Q2GWZLDM.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-6CGRPRGR.js → domain-transfer-GMUBAM3J.js} +2 -2
- package/dist/cli/chunks/dream-ZBP4Z5C3.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-MUOEVQX2.js → embed-and-insert-pattern-EFUERRM2.js} +2 -2
- package/dist/cli/chunks/{eval-SJMG67DE.js → eval-24FIC43F.js} +2 -2
- package/dist/cli/chunks/{experience-capture-middleware-ICKN6IXX.js → experience-capture-middleware-R4UP2Q2M.js} +3 -3
- package/dist/cli/chunks/{fast-paths-HXLBG3J4.js → fast-paths-RQCGGTXB.js} +2 -2
- package/dist/cli/chunks/{feature-flags-CRUB2ASU.js → feature-flags-APTWWVNQ.js} +2 -2
- package/dist/cli/chunks/{feature-flags-JYZSSQJC.js → feature-flags-SOXVYIBN.js} +2 -2
- package/dist/cli/chunks/{file-discovery-YHHC7NTJ.js → file-discovery-66KRMXVF.js} +2 -2
- package/dist/cli/chunks/{fleet-2VGDL4YL.js → fleet-EMBNKO5Q.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-7ZAGD4S4.js → gnn-wrapper-6TKDWFJF.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-HAW3JRHN.js → heartbeat-handler-4ODKJ75H.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-6JUWQXWG.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-JT4BU7XJ.js +2 -0
- package/dist/cli/chunks/hnsw-index-JC5YELJX.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-BO325POX.js → hnsw-legacy-bridge-25KFCLUC.js} +2 -2
- package/dist/cli/chunks/{better-sqlite3-6A6EAXAT.js → hnswlib-node-FUWQTM2D.js} +2 -2
- package/dist/cli/chunks/{hooks-HKM3JTFQ.js → hooks-JIDA2COE.js} +10 -10
- package/dist/cli/chunks/hybrid-router-SLTXHUFG.js +2 -0
- package/dist/cli/chunks/{hypergraph-engine-LGLGHK6B.js → hypergraph-engine-3YDFDPE3.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-6QDVREZA.js → hypergraph-handler-VWZX2OJX.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-JXHCMZXY.js +2 -0
- package/dist/cli/chunks/{init-handler-XUQ7XHIE.js → init-handler-DH7VQAMF.js} +6 -6
- package/dist/cli/chunks/init-wizard-EX37TYOG.js +2 -0
- package/dist/cli/chunks/kernel-JPHAG27D.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-6CEZLVIX.js → kilocode-installer-2W2KZCGH.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-6CJGATOS.js → kiro-installer-E5KP7OMD.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-5QJZIRYB.js +2 -0
- package/dist/cli/chunks/{learning-EIYTYZJY.js → learning-XJRUVPLF.js} +3 -3
- package/dist/cli/chunks/{llm-router-J4CI7VHU.js → llm-router-AEEKEMF5.js} +4 -4
- package/dist/cli/chunks/llm-router-service-SE2RO4P5.js +2 -0
- package/dist/cli/chunks/{load-CQPWGLQQ.js → load-PZ4YOTBJ.js} +2 -2
- package/dist/cli/chunks/load-test-LOTBWIIS.js +2 -0
- package/dist/cli/chunks/{mcp-THOATWCO.js → mcp-IVA6LC2S.js} +2 -2
- package/dist/cli/chunks/{memory-NZHMHMRK.js → memory-Y3DHXFQE.js} +5 -5
- package/dist/cli/chunks/memory-backend-BSDKTFAN.js +2 -0
- package/dist/cli/chunks/{memory-handlers-L2J54AQE.js → memory-handlers-V5PXEJWL.js} +2 -2
- package/dist/cli/chunks/{multi-model-executor-3P5E773H.js → multi-model-executor-646G4S4Y.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-IRZMKSNG.js → opencode-installer-P6KOOTUS.js} +2 -2
- package/dist/cli/chunks/{orchestrator-UADLXTKP.js → orchestrator-T2GVKYMX.js} +5 -5
- package/dist/cli/chunks/pattern-null-store-LRSXCZWM.js +2 -0
- package/dist/cli/chunks/{pipeline-QEH3XHXJ.js → pipeline-CK2ON45P.js} +2 -2
- package/dist/cli/chunks/{platform-NEZ3NXLT.js → platform-OQNSD3A3.js} +2 -2
- package/dist/cli/chunks/{plugin-O33HR2VO.js → plugin-UOG6RNRM.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-MBUMFEX7.js → prime-radiant-advanced-wasm-37UE6TG5.js} +2 -2
- package/dist/cli/chunks/protocol-executor-WPUVJEL7.js +2 -0
- package/dist/cli/chunks/{protocol-handler-L455UOUT.js → protocol-handler-V722S6YH.js} +2 -2
- package/dist/cli/chunks/{prove-3XA3SMAA.js → prove-ANGY6W3W.js} +2 -2
- package/dist/cli/chunks/provider-manager-EVPWSH3E.js +2 -0
- package/dist/cli/chunks/qe-reasoning-bank-IH63FG33.js +2 -0
- package/dist/cli/chunks/{quality-H6Z5JH5B.js → quality-KG4ALI2L.js} +2 -2
- package/dist/cli/chunks/queen-coordinator-TTCAGYQO.js +2 -0
- package/dist/cli/chunks/{real-embeddings-5DNJ4KEM.js → real-embeddings-GUZDO5UN.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-KHXKR2FK.js → roocode-installer-WROAR6MJ.js} +2 -2
- package/dist/cli/chunks/router-64Q4ILOQ.js +2 -0
- package/dist/cli/chunks/routing-feedback-KCZV4XXC.js +2 -0
- package/dist/cli/chunks/{routing-handler-WAMGESEM.js → routing-handler-UFPSSS5D.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-4J7XC6XY.js → ruvector-commands-XJQMKDRM.js} +2 -2
- package/dist/cli/chunks/{rvf-dual-writer-3PZEN6XN.js → rvf-dual-writer-QPRMDKYX.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-adapter-OIUNRQSU.js → rvf-migration-adapter-SOHBK23K.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-coordinator-QZXDI4I5.js → rvf-migration-coordinator-MTWUSPEJ.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-GNJKMURU.js +2 -0
- package/dist/cli/chunks/safe-db-6VBZQIJI.js +2 -0
- package/dist/cli/chunks/schedule-4V7O5IPX.js +2 -0
- package/dist/cli/chunks/scheduler-CQDMHEHN.js +2 -0
- package/dist/cli/chunks/{security-5NY77AMD.js → security-5MAMQKP6.js} +3 -3
- package/dist/cli/chunks/{shared-rvf-adapter-MHPUZIMW.js → shared-rvf-adapter-YEUBSRNN.js} +2 -2
- package/dist/cli/chunks/{shared-rvf-dual-writer-ITLDYHCX.js → shared-rvf-dual-writer-DBQJHG42.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-7DHUFTHL.js +2 -0
- package/dist/cli/chunks/{status-handler-7RBRIXZD.js → status-handler-ZUB2UKQZ.js} +2 -2
- package/dist/cli/chunks/{structural-health-MQPY6GA6.js → structural-health-B2GHENWX.js} +2 -2
- package/dist/cli/chunks/{sync-66KCEANE.js → sync-7VMXJTR2.js} +2 -2
- package/dist/cli/chunks/{sync-USVQTHKN.js → sync-YCUUW3IP.js} +2 -2
- package/dist/cli/chunks/{task-handler-4UI4FPPW.js → task-handler-N7LJTXZM.js} +2 -2
- package/dist/cli/chunks/{task-handlers-KRII3GVV.js → task-handlers-GDHNJV2E.js} +3 -3
- package/dist/cli/chunks/{test-JHN2MVEG.js → test-6COGC5KI.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-ZWTEGS3S.js → test-scheduling-CUERHJMF.js} +3 -3
- package/dist/cli/chunks/{token-bootstrap-YWXL6AS5.js → token-bootstrap-JTGSL6PP.js} +2 -2
- package/dist/cli/chunks/{token-usage-INII2XM3.js → token-usage-LSG3JYGX.js} +2 -2
- package/dist/cli/chunks/{transformers-DVFGDNZC.js → transformers-ODIITRCT.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-W2XJT3XF.js → tree-sitter-wasm-parser-KSP7ZZ5H.js} +2 -2
- package/dist/cli/chunks/{types-GBZ5Q2GP.js → types-6N6SUU2O.js} +2 -2
- package/dist/cli/chunks/unified-memory-MQA72NLP.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-K7HA3CWV.js +2 -0
- package/dist/cli/chunks/unified-persistence-2DXB4OE4.js +2 -0
- package/dist/cli/chunks/{upgrade-2JEXEGQX.js → upgrade-7SCVOCPS.js} +2 -2
- package/dist/cli/chunks/{validate-GDCM5YTS.js → validate-762ISH2Y.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-QZ5RSJEU.js → validate-swarm-R6WYYXGO.js} +2 -2
- package/dist/cli/chunks/{vibium-I5BMT734.js → vibium-5GZYSUDQ.js} +2 -2
- package/dist/cli/chunks/visual-security-UD6CARIJ.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-3QY2LMLP.js → web-tree-sitter-VYYVAJTY.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-V7OBPLOB.js → windsurf-installer-RRIOR3B6.js} +2 -2
- package/dist/cli/chunks/witness-chain-LWALPPMC.js +2 -0
- package/dist/cli/chunks/{witness-chain-BNJ4VSZX.js → witness-chain-SRVBEKDB.js} +2 -2
- package/dist/cli/chunks/{workflow-3FJSNLPI.js → workflow-XNUDHGEC.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-QU652FLH.js +2 -0
- package/dist/cli/chunks/{wrappers-ERTQNIPK.js → wrappers-3STST7QW.js} +2 -2
- package/dist/domains/requirements-validation/coordinator.d.ts +16 -2
- package/dist/domains/requirements-validation/coordinator.js +112 -7
- package/dist/domains/requirements-validation/plugin.js +20 -1
- package/dist/domains/test-generation/coordinator.d.ts +26 -1
- package/dist/domains/test-generation/coordinator.js +119 -2
- package/dist/domains/test-generation/plugin.js +23 -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 +69 -0
- package/dist/integrations/darwin/types.js +21 -0
- package/dist/mcp/bundle.js +390 -379
- package/dist/mcp/tool-scoping.d.ts +8 -2
- package/dist/mcp/tool-scoping.js +13 -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/coordinator-support.d.ts +90 -0
- package/dist/routing/free-tier/coordinator-support.js +78 -0
- package/dist/routing/free-tier/executor.d.ts +161 -0
- package/dist/routing/free-tier/executor.js +182 -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 +15 -0
- package/dist/routing/free-tier/index.js +6 -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/dist/routing/value-score.d.ts +49 -0
- package/dist/routing/value-score.js +54 -0
- package/dist/shared/optional-module.d.ts +23 -0
- package/dist/shared/optional-module.js +46 -0
- package/dist/verification/adversarial-verify/calibrate.d.ts +32 -0
- package/dist/verification/adversarial-verify/calibrate.js +33 -0
- package/dist/verification/adversarial-verify/gate.d.ts +38 -0
- package/dist/verification/adversarial-verify/gate.js +32 -0
- package/dist/verification/adversarial-verify/index.d.ts +20 -0
- package/dist/verification/adversarial-verify/index.js +6 -0
- package/dist/verification/adversarial-verify/prompts.d.ts +14 -0
- package/dist/verification/adversarial-verify/prompts.js +17 -0
- package/dist/verification/adversarial-verify/synthesize.d.ts +18 -0
- package/dist/verification/adversarial-verify/synthesize.js +35 -0
- package/dist/verification/adversarial-verify/types.d.ts +59 -0
- package/dist/verification/adversarial-verify/types.js +10 -0
- package/dist/verification/adversarial-verify/verify.d.ts +20 -0
- package/dist/verification/adversarial-verify/verify.js +34 -0
- package/package.json +14 -1
- package/dist/cli/chunks/adapter-TRSV37EA.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-CVJRJOSO.js +0 -2
- package/dist/cli/chunks/base-BX4A2D4V.js +0 -2
- package/dist/cli/chunks/browser-workflow-O3RL7EYT.js +0 -2
- package/dist/cli/chunks/chunk-OPKEQYAC.js +0 -2
- package/dist/cli/chunks/client-T263ZXVV.js +0 -2
- package/dist/cli/chunks/core-handlers-ODKKGCFK.js +0 -2
- package/dist/cli/chunks/cross-domain-router-APU725GC.js +0 -2
- package/dist/cli/chunks/dream-PJ5GKY3J.js +0 -2
- package/dist/cli/chunks/heartbeat-scheduler-4ZHUIW3Q.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-UVJJ6TTP.js +0 -2
- package/dist/cli/chunks/hnsw-index-K6HS34JZ.js +0 -2
- package/dist/cli/chunks/hybrid-router-25S7OH2Y.js +0 -2
- package/dist/cli/chunks/impact-analyzer-UP4RDMJH.js +0 -2
- package/dist/cli/chunks/init-wizard-2PAJ3GEC.js +0 -2
- package/dist/cli/chunks/kernel-7WOQGMMT.js +0 -2
- package/dist/cli/chunks/knowledge-graph-FN2AWHGR.js +0 -2
- package/dist/cli/chunks/llm-router-service-C3UPBAS3.js +0 -2
- package/dist/cli/chunks/load-test-PQSGLDXJ.js +0 -2
- package/dist/cli/chunks/memory-backend-6FR4RT5O.js +0 -2
- package/dist/cli/chunks/pattern-null-store-B2UX4NZY.js +0 -2
- package/dist/cli/chunks/protocol-executor-OQ6SL7SR.js +0 -2
- package/dist/cli/chunks/provider-manager-DQWHW2RG.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-3JS2CZAE.js +0 -2
- package/dist/cli/chunks/queen-coordinator-KXCWEM3Y.js +0 -2
- package/dist/cli/chunks/router-OVLIKT55.js +0 -2
- package/dist/cli/chunks/routing-feedback-2BYCXNXX.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-YNUYOQ5C.js +0 -2
- package/dist/cli/chunks/safe-db-6TYYEU7C.js +0 -2
- package/dist/cli/chunks/schedule-XVH7RTVY.js +0 -2
- package/dist/cli/chunks/scheduler-DHZBN5HA.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-NR5WXTPN.js +0 -2
- package/dist/cli/chunks/unified-memory-WJEZ5YAK.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-6ZA2PMYO.js +0 -2
- package/dist/cli/chunks/unified-persistence-SWH6R7MA.js +0 -2
- package/dist/cli/chunks/visual-security-PH5JQZCZ.js +0 -2
- package/dist/cli/chunks/witness-chain-WYMBNGSL.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-56JIXCI4.js +0 -2
|
@@ -9,13 +9,19 @@ export type AgentRole = 'test-generator' | 'coverage-analyzer' | 'security-scann
|
|
|
9
9
|
* Tool scope definition for an agent role
|
|
10
10
|
*/
|
|
11
11
|
export interface ToolScope {
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Tools the agent can use. DEFAULT-DENY: if this is empty/undefined and
|
|
14
|
+
* `allowAll` is not set, the role is denied EVERY tool (`isToolAllowed`
|
|
15
|
+
* falls through to `return false`). It does NOT grant allowAll.
|
|
16
|
+
*/
|
|
13
17
|
allowed?: string[];
|
|
14
18
|
/** Tools explicitly denied (overrides allowed) */
|
|
15
19
|
denied?: string[];
|
|
16
|
-
/** Allow all tools
|
|
20
|
+
/** Allow all tools — admin tiers only (fleet-admin, unrestricted). */
|
|
17
21
|
allowAll?: boolean;
|
|
18
22
|
}
|
|
23
|
+
/** Every agent role, in declaration order — for governance/policy iteration. */
|
|
24
|
+
export declare const ALL_AGENT_ROLES: AgentRole[];
|
|
19
25
|
/**
|
|
20
26
|
* Check if an agent role is allowed to use a specific tool
|
|
21
27
|
*/
|
package/dist/mcp/tool-scoping.js
CHANGED
|
@@ -4,6 +4,19 @@
|
|
|
4
4
|
* Restricts MCP tool access by agent role for security isolation.
|
|
5
5
|
* Each agent type has a defined set of tools it can invoke.
|
|
6
6
|
*/
|
|
7
|
+
/** Every agent role, in declaration order — for governance/policy iteration. */
|
|
8
|
+
export const ALL_AGENT_ROLES = [
|
|
9
|
+
'test-generator',
|
|
10
|
+
'coverage-analyzer',
|
|
11
|
+
'security-scanner',
|
|
12
|
+
'quality-assessor',
|
|
13
|
+
'defect-predictor',
|
|
14
|
+
'contract-validator',
|
|
15
|
+
'accessibility-tester',
|
|
16
|
+
'chaos-engineer',
|
|
17
|
+
'fleet-admin',
|
|
18
|
+
'unrestricted',
|
|
19
|
+
];
|
|
7
20
|
/**
|
|
8
21
|
* Default tool scopes per agent role
|
|
9
22
|
*/
|
|
@@ -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,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Coordinator free-tier support (cross-pollination plan 06 — broadening the
|
|
3
|
+
* opt-in beyond test generation; ADR-111 escalation lane).
|
|
4
|
+
*
|
|
5
|
+
* Extracts the generic "build a FreeTierEscalatingExecutor from a coordinator's
|
|
6
|
+
* config + router" wiring that was inline in the test-generation coordinator, so
|
|
7
|
+
* ANY domain coordinator can opt in with a few lines instead of duplicating it.
|
|
8
|
+
*
|
|
9
|
+
* The opt-in lane is justified only for tasks that match the D3 criterion:
|
|
10
|
+
* BOUNDED generation graded by an OBJECTIVE oracle (a test+assertion, valid
|
|
11
|
+
* Gherkin, a schema). Do NOT wire it into analysis/judgement coordinators — the
|
|
12
|
+
* §11 "coder binds" finding means a cheap model can't carry open-ended reasoning.
|
|
13
|
+
*/
|
|
14
|
+
import { FreeTierEscalatingExecutor, type QeExecutionResult, type QeVerifier } from './executor.js';
|
|
15
|
+
import { type RoutingFeedbackLike } from './feedback-sink.js';
|
|
16
|
+
import type { FreeTierProviderConfig } from './types.js';
|
|
17
|
+
/** Default cheap tier. qwen3:30b-a3b, NOT qwen3:8b — D3 (2026-06-23) measured the
|
|
18
|
+
* 8B below the QE generation floor (0/3 baseline-valid); the 30B MoE clears it. */
|
|
19
|
+
export declare const DEFAULT_FREE_TIER_MODEL = "qwen3:30b-a3b";
|
|
20
|
+
/** Per-coordinator config knobs (mix into a coordinator's CoordinatorConfig). */
|
|
21
|
+
export interface FreeTierCoordinatorConfig {
|
|
22
|
+
/** Opt-in the cheap-first free local tier. Also via env `AQE_FREE_TIER=1`. */
|
|
23
|
+
enableFreeTier?: boolean;
|
|
24
|
+
/** Local model id (default {@link DEFAULT_FREE_TIER_MODEL} or env AQE_FREE_TIER_MODEL). */
|
|
25
|
+
freeTierModel?: string;
|
|
26
|
+
/** Default same-tier D8 repair retries before escalating. Benchmarked at 2 (D3). */
|
|
27
|
+
freeTierRepairAttempts?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Best-of-k diverse attempts per tier's first round (06 §12). D3 validated k=2
|
|
30
|
+
* (lifted cheap composite +16.7, baseline-valid 50%→70%). Costs an extra local
|
|
31
|
+
* call ONLY when variant 0 fails (the loop breaks on first pass). Default 2.
|
|
32
|
+
*/
|
|
33
|
+
freeTierBestOfK?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Cross-model best-of-k generator pool (A12, measured +6 composite over single-
|
|
36
|
+
* model via mutual validity rescue). When set, round-0 best-of-k draws candidates
|
|
37
|
+
* across these providers (e.g. local qwen + an OpenRouter model) instead of one
|
|
38
|
+
* model's variants. Omit ⇒ single-model. Set `freeTierBestOfK ≥ pool size`.
|
|
39
|
+
*/
|
|
40
|
+
freeTierCandidateProviders?: FreeTierProviderConfig[];
|
|
41
|
+
}
|
|
42
|
+
/** Structural view of the HybridRouter — avoids a hard import (decoupling). */
|
|
43
|
+
export interface FreeTierLlmRouter {
|
|
44
|
+
chat(args: {
|
|
45
|
+
messages: Array<{
|
|
46
|
+
role: 'system' | 'user' | 'assistant';
|
|
47
|
+
content: string;
|
|
48
|
+
}>;
|
|
49
|
+
agentType: string;
|
|
50
|
+
complexity: 'low' | 'medium' | 'high';
|
|
51
|
+
}): Promise<{
|
|
52
|
+
content: string;
|
|
53
|
+
}>;
|
|
54
|
+
}
|
|
55
|
+
export interface BuildFreeTierExecutorOptions {
|
|
56
|
+
config: FreeTierCoordinatorConfig;
|
|
57
|
+
/** Router agentType hint for escalated (paid) tiers, e.g. 'qe-test-architect'. */
|
|
58
|
+
agentType: string;
|
|
59
|
+
/** D9 sink label, e.g. 'test-generation'. */
|
|
60
|
+
taskKind: string;
|
|
61
|
+
/** Delegate Claude tiers to the host router; omit → local-only (no escalation). */
|
|
62
|
+
llmRouter?: FreeTierLlmRouter | null;
|
|
63
|
+
/** D9: feed cheap-vs-escalated outcomes into routing-feedback. */
|
|
64
|
+
routingFeedback?: RoutingFeedbackLike | null;
|
|
65
|
+
env?: NodeJS.ProcessEnv;
|
|
66
|
+
logger?: {
|
|
67
|
+
info: (m: string) => void;
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Build a cheap-first escalating executor from coordinator config + (optional)
|
|
72
|
+
* router. Returns `null` when the free tier is not opted in — callers store the
|
|
73
|
+
* result and fall through to their normal path when it is null.
|
|
74
|
+
*/
|
|
75
|
+
export declare function buildFreeTierExecutor(opts: BuildFreeTierExecutorOptions): FreeTierEscalatingExecutor | null;
|
|
76
|
+
/**
|
|
77
|
+
* Run one bounded generation task cheap-first: best-of-k diverse attempts +
|
|
78
|
+
* D8 repair on the local tier, escalating the hard tail. Returns `null` when no
|
|
79
|
+
* executor (not opted in). The `verify` MUST be an objective oracle (06 §10).
|
|
80
|
+
*/
|
|
81
|
+
export declare function runFreeTierTextTask(executor: FreeTierEscalatingExecutor | null, args: {
|
|
82
|
+
agentId: string;
|
|
83
|
+
system: string;
|
|
84
|
+
user: string;
|
|
85
|
+
verify: QeVerifier;
|
|
86
|
+
repairAttempts?: number;
|
|
87
|
+
escalate?: boolean;
|
|
88
|
+
bestOfK?: number;
|
|
89
|
+
}): Promise<QeExecutionResult | null>;
|
|
90
|
+
//# sourceMappingURL=coordinator-support.d.ts.map
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Coordinator free-tier support (cross-pollination plan 06 — broadening the
|
|
3
|
+
* opt-in beyond test generation; ADR-111 escalation lane).
|
|
4
|
+
*
|
|
5
|
+
* Extracts the generic "build a FreeTierEscalatingExecutor from a coordinator's
|
|
6
|
+
* config + router" wiring that was inline in the test-generation coordinator, so
|
|
7
|
+
* ANY domain coordinator can opt in with a few lines instead of duplicating it.
|
|
8
|
+
*
|
|
9
|
+
* The opt-in lane is justified only for tasks that match the D3 criterion:
|
|
10
|
+
* BOUNDED generation graded by an OBJECTIVE oracle (a test+assertion, valid
|
|
11
|
+
* Gherkin, a schema). Do NOT wire it into analysis/judgement coordinators — the
|
|
12
|
+
* §11 "coder binds" finding means a cheap model can't carry open-ended reasoning.
|
|
13
|
+
*/
|
|
14
|
+
import { FreeTierEscalatingExecutor } from './executor.js';
|
|
15
|
+
import { defaultFreeTierLadder } from './ladder.js';
|
|
16
|
+
import { createRoutingFeedbackSink } from './feedback-sink.js';
|
|
17
|
+
/** Default cheap tier. qwen3:30b-a3b, NOT qwen3:8b — D3 (2026-06-23) measured the
|
|
18
|
+
* 8B below the QE generation floor (0/3 baseline-valid); the 30B MoE clears it. */
|
|
19
|
+
export const DEFAULT_FREE_TIER_MODEL = 'qwen3:30b-a3b';
|
|
20
|
+
/**
|
|
21
|
+
* Build a cheap-first escalating executor from coordinator config + (optional)
|
|
22
|
+
* router. Returns `null` when the free tier is not opted in — callers store the
|
|
23
|
+
* result and fall through to their normal path when it is null.
|
|
24
|
+
*/
|
|
25
|
+
export function buildFreeTierExecutor(opts) {
|
|
26
|
+
const env = opts.env ?? process.env;
|
|
27
|
+
const on = opts.config.enableFreeTier === true || env.AQE_FREE_TIER === '1';
|
|
28
|
+
if (!on)
|
|
29
|
+
return null;
|
|
30
|
+
const model = opts.config.freeTierModel || env.AQE_FREE_TIER_MODEL || DEFAULT_FREE_TIER_MODEL;
|
|
31
|
+
// Paid escalation: map the ladder tier to a complexity hint so the host router
|
|
32
|
+
// picks that tier. No router → executor stays local-only (Claude tiers unavailable).
|
|
33
|
+
const claudeRunner = opts.llmRouter
|
|
34
|
+
? async (tier, msgs) => {
|
|
35
|
+
const complexity = tier === 'opus' ? 'high' : tier === 'sonnet' ? 'medium' : 'low';
|
|
36
|
+
const resp = await opts.llmRouter.chat({
|
|
37
|
+
messages: msgs.map((m) => ({ role: m.role, content: m.content })),
|
|
38
|
+
agentType: opts.agentType,
|
|
39
|
+
complexity,
|
|
40
|
+
});
|
|
41
|
+
return { content: resp.content };
|
|
42
|
+
}
|
|
43
|
+
: undefined;
|
|
44
|
+
const exec = new FreeTierEscalatingExecutor({
|
|
45
|
+
ladder: defaultFreeTierLadder(model),
|
|
46
|
+
claudeRunner,
|
|
47
|
+
defaultRepairAttempts: opts.config.freeTierRepairAttempts ?? 1,
|
|
48
|
+
candidateProviders: opts.config.freeTierCandidateProviders, // A12 cross-model (off unless set)
|
|
49
|
+
onOutcome: opts.routingFeedback
|
|
50
|
+
? createRoutingFeedbackSink(opts.routingFeedback, { taskKind: opts.taskKind })
|
|
51
|
+
: undefined,
|
|
52
|
+
});
|
|
53
|
+
opts.logger?.info(`Free-tier enabled for ${opts.taskKind} (model=${model}, ` +
|
|
54
|
+
`${claudeRunner ? 'escalation→router' : 'local-only'})`);
|
|
55
|
+
return exec;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Run one bounded generation task cheap-first: best-of-k diverse attempts +
|
|
59
|
+
* D8 repair on the local tier, escalating the hard tail. Returns `null` when no
|
|
60
|
+
* executor (not opted in). The `verify` MUST be an objective oracle (06 §10).
|
|
61
|
+
*/
|
|
62
|
+
export async function runFreeTierTextTask(executor, args) {
|
|
63
|
+
if (!executor)
|
|
64
|
+
return null;
|
|
65
|
+
return executor.execute({
|
|
66
|
+
agentId: args.agentId,
|
|
67
|
+
messages: [
|
|
68
|
+
{ role: 'system', content: args.system },
|
|
69
|
+
{ role: 'user', content: args.user },
|
|
70
|
+
],
|
|
71
|
+
verify: args.verify,
|
|
72
|
+
repairAttempts: args.repairAttempts,
|
|
73
|
+
escalate: args.escalate ?? true,
|
|
74
|
+
bestOfK: args.bestOfK,
|
|
75
|
+
oracleKind: 'objective',
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=coordinator-support.js.map
|
|
@@ -0,0 +1,161 @@
|
|
|
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, FreeTierProviderConfig } 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
|
+
* Best-of-k diverse attempts at each tier's first round (06 §12 correction).
|
|
48
|
+
* Ruv's ablation: a single repro-gated shot Goodharts the oracle (0 gold); k>1
|
|
49
|
+
* diverse attempts picked by the objective verifier are what convert. Default 1.
|
|
50
|
+
*/
|
|
51
|
+
bestOfK?: number;
|
|
52
|
+
/**
|
|
53
|
+
* Goodhart guard (06 §10). `objective` = the verifier is a deterministic
|
|
54
|
+
* ground-truth oracle (arena/coverage/schema). `self-authored` = the verifier
|
|
55
|
+
* is the model's own test — an unreliable selection target, so its outcomes are
|
|
56
|
+
* NOT recorded into routing-feedback (they must not lift confidence). Default
|
|
57
|
+
* `objective` (existing callers inject real oracles, e.g. a coverage/test run).
|
|
58
|
+
*/
|
|
59
|
+
oracleKind?: 'objective' | 'self-authored';
|
|
60
|
+
}
|
|
61
|
+
export interface TierAttempt {
|
|
62
|
+
tier: string;
|
|
63
|
+
provider: 'free-tier' | 'claude';
|
|
64
|
+
/** 0 = first try at this tier; 1.. = repair rounds (D8). */
|
|
65
|
+
repairRound: number;
|
|
66
|
+
/** Best-of-k variant index within round 0 (0 = primary, 1.. = diversified). */
|
|
67
|
+
variant?: number;
|
|
68
|
+
/** Generator model that produced this candidate (set for cross-model best-of-k). */
|
|
69
|
+
model?: string;
|
|
70
|
+
ok: boolean;
|
|
71
|
+
passed: boolean;
|
|
72
|
+
latencyMs: number;
|
|
73
|
+
feedback?: string;
|
|
74
|
+
error?: string;
|
|
75
|
+
}
|
|
76
|
+
export interface QeExecutionResult {
|
|
77
|
+
/** True iff some attempt produced output that passed `verify`. */
|
|
78
|
+
ok: boolean;
|
|
79
|
+
/** The passing output (or the last output tried). */
|
|
80
|
+
content: string;
|
|
81
|
+
/** The tier that produced the passing output, or the last tier tried. */
|
|
82
|
+
tierUsed: string;
|
|
83
|
+
/** True iff the task needed a tier above the starting one. */
|
|
84
|
+
escalated: boolean;
|
|
85
|
+
/** True iff a same-tier repair round produced the passing output. */
|
|
86
|
+
repaired: boolean;
|
|
87
|
+
/** True iff best-of-k (k>1) diversity at a round produced the passing output. */
|
|
88
|
+
bestOf: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* True iff the outcome was withheld from routing-feedback because the gate was
|
|
91
|
+
* a self-authored oracle (06 §10 Goodhart guard) — it cannot lift confidence.
|
|
92
|
+
*/
|
|
93
|
+
goodhartGuarded: boolean;
|
|
94
|
+
/** Per-attempt trace, cheapest → most capable. */
|
|
95
|
+
attempts: TierAttempt[];
|
|
96
|
+
}
|
|
97
|
+
export interface FreeTierExecutorOptions {
|
|
98
|
+
ladder: QeRoutingLadder;
|
|
99
|
+
/** Serves Claude tiers; omit for local-only operation. */
|
|
100
|
+
claudeRunner?: ClaudeTierRunner;
|
|
101
|
+
/** Reuse an existing tracker (e.g. the coordinator's) or create one. */
|
|
102
|
+
tracker?: AutoEscalationTracker<string>;
|
|
103
|
+
/** Read env for free-tier keys (injectable for tests). */
|
|
104
|
+
env?: NodeJS.ProcessEnv;
|
|
105
|
+
/** Default same-tier repair retries when a request omits `repairAttempts`. */
|
|
106
|
+
defaultRepairAttempts?: number;
|
|
107
|
+
/**
|
|
108
|
+
* Cross-model best-of-k (A12, measured +6 composite over single-model). When set
|
|
109
|
+
* AND the START tier is free-tier, round-0 best-of-k draws each candidate from a
|
|
110
|
+
* DIFFERENT provider in this pool (e.g. local qwen + an OpenRouter model) instead
|
|
111
|
+
* of one model's temperature/prompt variants — diverse models cover each other's
|
|
112
|
+
* failures and raise the union. Selection stays the objective verifier (first-pass).
|
|
113
|
+
* Omit ⇒ single-model best-of-k (unchanged).
|
|
114
|
+
*/
|
|
115
|
+
candidateProviders?: FreeTierProviderConfig[];
|
|
116
|
+
/** D9 sink: record each completed task outcome (→ routing-feedback). */
|
|
117
|
+
onOutcome?: (o: {
|
|
118
|
+
agentId: string;
|
|
119
|
+
startTier: string;
|
|
120
|
+
tierUsed: string;
|
|
121
|
+
passed: boolean;
|
|
122
|
+
escalated: boolean;
|
|
123
|
+
repaired: boolean;
|
|
124
|
+
durationMs: number;
|
|
125
|
+
attempts: number;
|
|
126
|
+
}) => void;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Executes QE tasks cheap-first with repair-then-escalate. Holds the per-agent
|
|
130
|
+
* adaptive base tier in an `AutoEscalationTracker`.
|
|
131
|
+
*/
|
|
132
|
+
export declare class FreeTierEscalatingExecutor {
|
|
133
|
+
private readonly ladder;
|
|
134
|
+
private readonly claudeRunner?;
|
|
135
|
+
private readonly tracker;
|
|
136
|
+
private readonly env;
|
|
137
|
+
private readonly baseTier;
|
|
138
|
+
private readonly defaultRepairAttempts;
|
|
139
|
+
private readonly onOutcome?;
|
|
140
|
+
/** Resolved cross-model generator pool (A12); undefined ⇒ single-model best-of-k. */
|
|
141
|
+
private readonly candidateProviders?;
|
|
142
|
+
constructor(opts: FreeTierExecutorOptions);
|
|
143
|
+
/** Expose the tracker so a coordinator can inspect/share adaptation state. */
|
|
144
|
+
getTracker(): AutoEscalationTracker<string>;
|
|
145
|
+
/** Run ONE tier once; never throws — failure becomes `{ok:false}` so we repair/escalate. */
|
|
146
|
+
private runTier;
|
|
147
|
+
/**
|
|
148
|
+
* Best-of-k diversity turn (06 §12): nudge the model toward a structurally
|
|
149
|
+
* different valid solution. Deterministic by `variant` index (no RNG) so runs
|
|
150
|
+
* replay identically.
|
|
151
|
+
*/
|
|
152
|
+
private diversify;
|
|
153
|
+
/** Build the D8 repair turn: show the model its rejected output + why. */
|
|
154
|
+
private repairMessages;
|
|
155
|
+
/**
|
|
156
|
+
* Execute a QE task cheap-first: try a tier, repair in place on failure, then
|
|
157
|
+
* (optionally) escalate to the next tier; repeat until pass or top.
|
|
158
|
+
*/
|
|
159
|
+
execute(req: QeTaskRequest): Promise<QeExecutionResult>;
|
|
160
|
+
}
|
|
161
|
+
//# sourceMappingURL=executor.d.ts.map
|