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
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Free-tier provider configuration (cross-pollination plan 06, D7).
|
|
3
|
+
*
|
|
4
|
+
* Lets a user place a FREE / low-cost model at the BOTTOM of the escalation
|
|
5
|
+
* ladder (below haiku), served by any OpenAI-compatible endpoint:
|
|
6
|
+
* - local-ollama — Ollama on the dev box / M5 host (zero cost, private)
|
|
7
|
+
* - cloud-ollama — ollama.com hosted models (free + paid tiers)
|
|
8
|
+
* - openrouter — OpenRouter free models (e.g. *:free) and paid
|
|
9
|
+
* - openai-compatible — any other `/v1/chat/completions` server (vLLM, LM Studio,
|
|
10
|
+
* Groq, Together, llama.cpp, ruvllm serve, …)
|
|
11
|
+
*
|
|
12
|
+
* Secrets are NEVER stored here: a provider names the ENV VAR to read its key
|
|
13
|
+
* from (`apiKeyEnv`); the key itself is read at resolve time and never persisted.
|
|
14
|
+
*/
|
|
15
|
+
import type { AgentTier } from '../routing-config.js';
|
|
16
|
+
export type FreeTierKind = 'local-ollama' | 'cloud-ollama' | 'openrouter' | 'openai-compatible';
|
|
17
|
+
export interface FreeTierProviderConfig {
|
|
18
|
+
/** Which family of OpenAI-compatible endpoint to talk to. */
|
|
19
|
+
kind: FreeTierKind;
|
|
20
|
+
/** Model id passed in the request body (e.g. 'qwen3:8b', 'mistralai/devstral-small:free'). */
|
|
21
|
+
model: string;
|
|
22
|
+
/** Override the endpoint base URL (required for 'openai-compatible'; optional otherwise). */
|
|
23
|
+
baseUrl?: string;
|
|
24
|
+
/** Name of the ENV VAR holding the API key (never the key itself). */
|
|
25
|
+
apiKeyEnv?: string;
|
|
26
|
+
/** Per-call wall-clock budget. Default 120_000 (reasoning models need ≥120s). */
|
|
27
|
+
timeoutMs?: number;
|
|
28
|
+
/** Token budget. Default 2048 (covers a reasoning channel + answer). */
|
|
29
|
+
maxTokens?: number;
|
|
30
|
+
/** Sampling temperature. Default 0.2. */
|
|
31
|
+
temperature?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Some local models (qwen3, gemma) emit a separate `reasoning` field and put
|
|
34
|
+
* the answer in `content`. When true, ignore `reasoning` and read `content`
|
|
35
|
+
* only (the default — matches the OpenAI shape). Set false to concatenate.
|
|
36
|
+
*/
|
|
37
|
+
contentOnly?: boolean;
|
|
38
|
+
}
|
|
39
|
+
/** A fully-resolved provider ready to call (preset merged, key read from env). */
|
|
40
|
+
export interface ResolvedFreeTierProvider {
|
|
41
|
+
kind: FreeTierKind;
|
|
42
|
+
model: string;
|
|
43
|
+
baseUrl: string;
|
|
44
|
+
/** Request headers incl. Authorization when a key was found. */
|
|
45
|
+
headers: Record<string, string>;
|
|
46
|
+
timeoutMs: number;
|
|
47
|
+
maxTokens: number;
|
|
48
|
+
temperature: number;
|
|
49
|
+
contentOnly: boolean;
|
|
50
|
+
/** True when the preset wants a key but none was found in env (call will likely 401). */
|
|
51
|
+
missingKey: boolean;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* A routing-ladder entry: a tier name maps EITHER to an existing Claude tier
|
|
55
|
+
* (handled by the normal router) OR to a free-tier provider (the new bottom).
|
|
56
|
+
*/
|
|
57
|
+
export type TierBinding = {
|
|
58
|
+
provider: 'claude';
|
|
59
|
+
claudeTier: AgentTier;
|
|
60
|
+
} | {
|
|
61
|
+
provider: 'free-tier';
|
|
62
|
+
config: FreeTierProviderConfig;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* A complete QE routing ladder: the ordered tiers, the per-tier bindings, and
|
|
66
|
+
* the de-/escalation bounds. Feeds `createFreeTierEscalation()`.
|
|
67
|
+
*/
|
|
68
|
+
export interface QeRoutingLadder {
|
|
69
|
+
/** Tiers in ascending order of capability/cost, e.g. ['local','haiku','sonnet','opus']. */
|
|
70
|
+
tierOrder: string[];
|
|
71
|
+
/** Binding per tier name (must cover every entry in tierOrder). */
|
|
72
|
+
bindings: Record<string, TierBinding>;
|
|
73
|
+
/** Lowest tier to de-escalate to (default: first of tierOrder). */
|
|
74
|
+
minTier?: string;
|
|
75
|
+
/** Highest tier to escalate to (default: last of tierOrder). */
|
|
76
|
+
maxTier?: string;
|
|
77
|
+
escalateAfterFailures?: number;
|
|
78
|
+
deEscalateAfterSuccesses?: number;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Free-tier provider configuration (cross-pollination plan 06, D7).
|
|
3
|
+
*
|
|
4
|
+
* Lets a user place a FREE / low-cost model at the BOTTOM of the escalation
|
|
5
|
+
* ladder (below haiku), served by any OpenAI-compatible endpoint:
|
|
6
|
+
* - local-ollama — Ollama on the dev box / M5 host (zero cost, private)
|
|
7
|
+
* - cloud-ollama — ollama.com hosted models (free + paid tiers)
|
|
8
|
+
* - openrouter — OpenRouter free models (e.g. *:free) and paid
|
|
9
|
+
* - openai-compatible — any other `/v1/chat/completions` server (vLLM, LM Studio,
|
|
10
|
+
* Groq, Together, llama.cpp, ruvllm serve, …)
|
|
11
|
+
*
|
|
12
|
+
* Secrets are NEVER stored here: a provider names the ENV VAR to read its key
|
|
13
|
+
* from (`apiKeyEnv`); the key itself is read at resolve time and never persisted.
|
|
14
|
+
*/
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cost-Pareto Value Score (plan 05 / A13).
|
|
3
|
+
*
|
|
4
|
+
* Ruv's leaderboard lesson (ADR-179): rank by quality-PER-DOLLAR, not absolute
|
|
5
|
+
* quality. This operationalizes ADR-111's "competitive QE quality cheaper than
|
|
6
|
+
* frontier" — pure functions to (a) compute a tunable value score, (b) rank a
|
|
7
|
+
* candidate pool, and (c) extract the cost-Pareto frontier (the non-dominated set
|
|
8
|
+
* a router should choose from). Pure + dependency-free.
|
|
9
|
+
*
|
|
10
|
+
* Companion: model→QE-role fit must be MEASURED, not assumed (the qwen3-coder
|
|
11
|
+
* leaderboard-rank-did-not-transfer lesson). {@link MEASURED_QE_TEST_GEN} is a
|
|
12
|
+
* dated snapshot from D3/A12; the router should refresh it from routing-feedback.
|
|
13
|
+
*/
|
|
14
|
+
export interface ModelEconomics {
|
|
15
|
+
model: string;
|
|
16
|
+
/** Measured QE quality on the role, 0..1 (e.g. ADR-104 composite). NOT a vendor claim. */
|
|
17
|
+
quality: number;
|
|
18
|
+
/** USD per instance (0 for free/local tiers). */
|
|
19
|
+
costPerInstance: number;
|
|
20
|
+
}
|
|
21
|
+
export interface ValueScoreOptions {
|
|
22
|
+
/** 0 = rank by pure quality, 1 = pure cost-efficiency. Default 0.5 (the slider). */
|
|
23
|
+
costWeight?: number;
|
|
24
|
+
/** USD ceiling to normalize cost into [0,1]. Default = max cost in the set (or the value's own cost). */
|
|
25
|
+
costCap?: number;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Value score in [0,1]: a `costWeight`-weighted blend of quality and cost-
|
|
29
|
+
* efficiency (1 − normalizedCost). A $0 tier has perfect cost-efficiency, so its
|
|
30
|
+
* value is dominated by its quality.
|
|
31
|
+
*/
|
|
32
|
+
export declare function valueScore(m: ModelEconomics, opts?: ValueScoreOptions): number;
|
|
33
|
+
/** Rank a candidate pool by value score (desc). Cost is normalized across the pool. */
|
|
34
|
+
export declare function rankByValue<T extends ModelEconomics>(models: T[], opts?: ValueScoreOptions): Array<T & {
|
|
35
|
+
value: number;
|
|
36
|
+
}>;
|
|
37
|
+
/**
|
|
38
|
+
* The cost-Pareto frontier: models NOT dominated by another (none is both
|
|
39
|
+
* cheaper AND ≥ quality). These are the only rational router choices — everything
|
|
40
|
+
* else is strictly worse on both axes. Sorted cheapest → most expensive.
|
|
41
|
+
*/
|
|
42
|
+
export declare function paretoFrontier<T extends ModelEconomics>(models: T[]): T[];
|
|
43
|
+
/**
|
|
44
|
+
* MEASURED QE test-generation economics (snapshot 2026-06-24, D3/A12). Quality =
|
|
45
|
+
* composite (0.6·killRate + 0.3·coverage) on the 5-module corpus; cost is the
|
|
46
|
+
* per-instance estimate. NOT vendor claims — refresh from routing-feedback.
|
|
47
|
+
*/
|
|
48
|
+
export declare const MEASURED_QE_TEST_GEN: readonly ModelEconomics[];
|
|
49
|
+
//# sourceMappingURL=value-score.d.ts.map
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cost-Pareto Value Score (plan 05 / A13).
|
|
3
|
+
*
|
|
4
|
+
* Ruv's leaderboard lesson (ADR-179): rank by quality-PER-DOLLAR, not absolute
|
|
5
|
+
* quality. This operationalizes ADR-111's "competitive QE quality cheaper than
|
|
6
|
+
* frontier" — pure functions to (a) compute a tunable value score, (b) rank a
|
|
7
|
+
* candidate pool, and (c) extract the cost-Pareto frontier (the non-dominated set
|
|
8
|
+
* a router should choose from). Pure + dependency-free.
|
|
9
|
+
*
|
|
10
|
+
* Companion: model→QE-role fit must be MEASURED, not assumed (the qwen3-coder
|
|
11
|
+
* leaderboard-rank-did-not-transfer lesson). {@link MEASURED_QE_TEST_GEN} is a
|
|
12
|
+
* dated snapshot from D3/A12; the router should refresh it from routing-feedback.
|
|
13
|
+
*/
|
|
14
|
+
const clamp01 = (x) => Math.max(0, Math.min(1, x));
|
|
15
|
+
/**
|
|
16
|
+
* Value score in [0,1]: a `costWeight`-weighted blend of quality and cost-
|
|
17
|
+
* efficiency (1 − normalizedCost). A $0 tier has perfect cost-efficiency, so its
|
|
18
|
+
* value is dominated by its quality.
|
|
19
|
+
*/
|
|
20
|
+
export function valueScore(m, opts = {}) {
|
|
21
|
+
const costWeight = clamp01(opts.costWeight ?? 0.5);
|
|
22
|
+
const cap = opts.costCap && opts.costCap > 0 ? opts.costCap : Math.max(m.costPerInstance, 1e-9);
|
|
23
|
+
const costEfficiency = clamp01(1 - m.costPerInstance / cap);
|
|
24
|
+
return clamp01((1 - costWeight) * clamp01(m.quality) + costWeight * costEfficiency);
|
|
25
|
+
}
|
|
26
|
+
/** Rank a candidate pool by value score (desc). Cost is normalized across the pool. */
|
|
27
|
+
export function rankByValue(models, opts = {}) {
|
|
28
|
+
const cap = opts.costCap && opts.costCap > 0 ? opts.costCap : Math.max(...models.map((m) => m.costPerInstance), 1e-9);
|
|
29
|
+
return models
|
|
30
|
+
.map((m) => ({ ...m, value: valueScore(m, { ...opts, costCap: cap }) }))
|
|
31
|
+
.sort((a, b) => b.value - a.value);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The cost-Pareto frontier: models NOT dominated by another (none is both
|
|
35
|
+
* cheaper AND ≥ quality). These are the only rational router choices — everything
|
|
36
|
+
* else is strictly worse on both axes. Sorted cheapest → most expensive.
|
|
37
|
+
*/
|
|
38
|
+
export function paretoFrontier(models) {
|
|
39
|
+
const dominated = (m) => models.some((o) => o !== m && o.costPerInstance <= m.costPerInstance && o.quality >= m.quality &&
|
|
40
|
+
(o.costPerInstance < m.costPerInstance || o.quality > m.quality));
|
|
41
|
+
return models.filter((m) => !dominated(m)).sort((a, b) => a.costPerInstance - b.costPerInstance);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* MEASURED QE test-generation economics (snapshot 2026-06-24, D3/A12). Quality =
|
|
45
|
+
* composite (0.6·killRate + 0.3·coverage) on the 5-module corpus; cost is the
|
|
46
|
+
* per-instance estimate. NOT vendor claims — refresh from routing-feedback.
|
|
47
|
+
*/
|
|
48
|
+
export const MEASURED_QE_TEST_GEN = [
|
|
49
|
+
{ model: 'qwen3:8b', quality: 0.0, costPerInstance: 0 }, // D3: below the generation floor (0/3 valid)
|
|
50
|
+
{ model: 'qwen3:30b-a3b', quality: 0.62, costPerInstance: 0 }, // D3: clears the floor (best-of-k ~0.673 on judged)
|
|
51
|
+
{ model: 'z-ai/glm-5.2', quality: 0.71, costPerInstance: 0.0065 }, // A12: diverse, higher per-model best
|
|
52
|
+
{ model: 'claude-sonnet-4-6', quality: 0.83, costPerInstance: 0.045 }, // D3: frontier ceiling
|
|
53
|
+
];
|
|
54
|
+
//# sourceMappingURL=value-score.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface OptionalModuleAvailable<T> {
|
|
2
|
+
available: true;
|
|
3
|
+
degraded: false;
|
|
4
|
+
module: T;
|
|
5
|
+
}
|
|
6
|
+
export interface OptionalModuleDegraded {
|
|
7
|
+
available: false;
|
|
8
|
+
degraded: true;
|
|
9
|
+
name: string;
|
|
10
|
+
reason: string;
|
|
11
|
+
}
|
|
12
|
+
export type OptionalModuleResult<T> = OptionalModuleAvailable<T> | OptionalModuleDegraded;
|
|
13
|
+
/** True iff `err` means the module is genuinely NOT INSTALLED (vs. failed to load). */
|
|
14
|
+
export declare function isModuleAbsent(err: unknown): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Load an optional module. Returns `{available:true, module}` when present,
|
|
17
|
+
* `{available:false, degraded:true}` when genuinely absent, and RE-THROWS on any
|
|
18
|
+
* other load error (so real failures are never masked). Inject `req` for testing.
|
|
19
|
+
*/
|
|
20
|
+
export declare function loadOptionalModule<T = unknown>(name: string, req?: NodeRequire): OptionalModuleResult<T>;
|
|
21
|
+
/** Convenience: the module if available, else `undefined` (degradation is silent here). */
|
|
22
|
+
export declare function optionalModule<T = unknown>(name: string, req?: NodeRequire): T | undefined;
|
|
23
|
+
//# sourceMappingURL=optional-module.d.ts.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Graceful optional-module loading (plan 05 / A9; ADR-150 pattern).
|
|
3
|
+
*
|
|
4
|
+
* AQE has many native/optional deps (@ruvector/{gnn,attention,sona,...},
|
|
5
|
+
* hnswlib-node, rvlite) declared in `optionalDependencies`, so a platform without
|
|
6
|
+
* a prebuilt binary (or a Dependabot-pruned lockfile) must DEGRADE, not crash.
|
|
7
|
+
*
|
|
8
|
+
* The hazard (AQE #528 lesson): the ad-hoc `try { require(x) } catch {}` scattered
|
|
9
|
+
* across the wrappers swallows EVERY error — so a binary that is PRESENT but fails
|
|
10
|
+
* to load (ABI mismatch, corrupt .node) is silently reported "unavailable",
|
|
11
|
+
* masking a real failure. This helper degrades ONLY on genuine absence
|
|
12
|
+
* (MODULE_NOT_FOUND) and RE-THROWS any other load error.
|
|
13
|
+
*/
|
|
14
|
+
import { createRequire } from 'node:module';
|
|
15
|
+
const ABSENT_CODES = new Set(['MODULE_NOT_FOUND', 'ERR_MODULE_NOT_FOUND']);
|
|
16
|
+
/** True iff `err` means the module is genuinely NOT INSTALLED (vs. failed to load). */
|
|
17
|
+
export function isModuleAbsent(err) {
|
|
18
|
+
const e = err;
|
|
19
|
+
if (e?.code && ABSENT_CODES.has(e.code))
|
|
20
|
+
return true;
|
|
21
|
+
// Some loaders throw a plain Error; fall back to the canonical message shape.
|
|
22
|
+
return typeof e?.message === 'string' && /Cannot find module/.test(e.message);
|
|
23
|
+
}
|
|
24
|
+
const defaultRequire = createRequire(import.meta.url);
|
|
25
|
+
/**
|
|
26
|
+
* Load an optional module. Returns `{available:true, module}` when present,
|
|
27
|
+
* `{available:false, degraded:true}` when genuinely absent, and RE-THROWS on any
|
|
28
|
+
* other load error (so real failures are never masked). Inject `req` for testing.
|
|
29
|
+
*/
|
|
30
|
+
export function loadOptionalModule(name, req = defaultRequire) {
|
|
31
|
+
try {
|
|
32
|
+
return { available: true, degraded: false, module: req(name) };
|
|
33
|
+
}
|
|
34
|
+
catch (err) {
|
|
35
|
+
if (isModuleAbsent(err)) {
|
|
36
|
+
return { available: false, degraded: true, name, reason: `optional module "${name}" not installed (running degraded)` };
|
|
37
|
+
}
|
|
38
|
+
throw err; // present but broken — do NOT mask a real failure (#528)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/** Convenience: the module if available, else `undefined` (degradation is silent here). */
|
|
42
|
+
export function optionalModule(name, req) {
|
|
43
|
+
const r = loadOptionalModule(name, req);
|
|
44
|
+
return r.available ? r.module : undefined;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=optional-module.js.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @ruvector/adversarial-verify — calibration (plan 05 / A2 step 5).
|
|
3
|
+
*
|
|
4
|
+
* Measure the verifier against a LABELED set (findings tagged real/false) to get
|
|
5
|
+
* the operating point: false-kill (a REAL finding wrongly refuted — the costly
|
|
6
|
+
* error) and false-keep (a FALSE finding that survives). Works with any `Judge`
|
|
7
|
+
* — a deterministic stub (characterize the k-of-n aggregation) or a real LLM
|
|
8
|
+
* (empirical false-kill on a labeled corpus).
|
|
9
|
+
*/
|
|
10
|
+
import type { AdversarialVerifyOptions, Finding } from './types.js';
|
|
11
|
+
export interface LabeledFinding {
|
|
12
|
+
finding: Finding;
|
|
13
|
+
/** Ground truth: is this a genuine, actionable problem? */
|
|
14
|
+
isReal: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface CalibrationReport {
|
|
17
|
+
total: number;
|
|
18
|
+
realCount: number;
|
|
19
|
+
falseCount: number;
|
|
20
|
+
/** REAL findings wrongly refuted (the costly error). */
|
|
21
|
+
falseKill: number;
|
|
22
|
+
falseKillRate: number;
|
|
23
|
+
/** FALSE findings wrongly upheld (survived verification). */
|
|
24
|
+
falseKeep: number;
|
|
25
|
+
falseKeepRate: number;
|
|
26
|
+
correctConfirm: number;
|
|
27
|
+
correctKill: number;
|
|
28
|
+
uncertain: number;
|
|
29
|
+
}
|
|
30
|
+
/** Run the verifier over a labeled set and report the confusion vs ground truth. */
|
|
31
|
+
export declare function calibrate(labeled: LabeledFinding[], opts: AdversarialVerifyOptions): Promise<CalibrationReport>;
|
|
32
|
+
//# sourceMappingURL=calibrate.d.ts.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { adversarialVerify } from './verify.js';
|
|
2
|
+
/** Run the verifier over a labeled set and report the confusion vs ground truth. */
|
|
3
|
+
export async function calibrate(labeled, opts) {
|
|
4
|
+
const verdicts = await adversarialVerify(labeled.map((l) => l.finding), opts);
|
|
5
|
+
const r = {
|
|
6
|
+
total: labeled.length, realCount: 0, falseCount: 0,
|
|
7
|
+
falseKill: 0, falseKillRate: 0, falseKeep: 0, falseKeepRate: 0,
|
|
8
|
+
correctConfirm: 0, correctKill: 0, uncertain: 0,
|
|
9
|
+
};
|
|
10
|
+
labeled.forEach((l, i) => {
|
|
11
|
+
const v = verdicts[i].verdict;
|
|
12
|
+
if (v === 'uncertain')
|
|
13
|
+
r.uncertain++;
|
|
14
|
+
if (l.isReal) {
|
|
15
|
+
r.realCount++;
|
|
16
|
+
if (v === 'refuted')
|
|
17
|
+
r.falseKill++;
|
|
18
|
+
else if (v === 'upheld')
|
|
19
|
+
r.correctConfirm++;
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
r.falseCount++;
|
|
23
|
+
if (v === 'upheld')
|
|
24
|
+
r.falseKeep++;
|
|
25
|
+
else if (v === 'refuted')
|
|
26
|
+
r.correctKill++;
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
r.falseKillRate = r.realCount ? r.falseKill / r.realCount : 0;
|
|
30
|
+
r.falseKeepRate = r.falseCount ? r.falseKeep / r.falseCount : 0;
|
|
31
|
+
return r;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=calibrate.js.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @ruvector/adversarial-verify — output gate (plan 05 / A5).
|
|
3
|
+
*
|
|
4
|
+
* An opt-in "verify before you emit" gate any vertical/harness can embed: route
|
|
5
|
+
* emitted findings/claims through the blind refuters and DROP the refuted ones
|
|
6
|
+
* before acting. Default-off-able and cost-neutral when disabled (no Judge calls).
|
|
7
|
+
* Surfaces every verdict for witness/telemetry, and reports the gate's overhead.
|
|
8
|
+
*
|
|
9
|
+
* Vendor-ready: zero dependencies beyond this module, so MetaHarness (or any host)
|
|
10
|
+
* can embed it as a per-vertical `verify` hook.
|
|
11
|
+
*/
|
|
12
|
+
import type { AdversarialVerifyOptions, Finding, FindingVerdict } from './types.js';
|
|
13
|
+
export interface VerifyGateOptions extends AdversarialVerifyOptions {
|
|
14
|
+
/** Off ⇒ no-op pass-through, ZERO Judge calls (cost-neutral). Default true. */
|
|
15
|
+
enabled?: boolean;
|
|
16
|
+
/** Also block `uncertain` verdicts (all refuters failed), not just `refuted`. Default false. */
|
|
17
|
+
dropUncertain?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface VerifyGateResult {
|
|
20
|
+
enabled: boolean;
|
|
21
|
+
/** Findings that PASS the gate — emit these. */
|
|
22
|
+
emitted: FindingVerdict[];
|
|
23
|
+
/** Findings the gate blocked (refuted, + uncertain when `dropUncertain`). */
|
|
24
|
+
blocked: FindingVerdict[];
|
|
25
|
+
/** All verdicts (for witness/telemetry). */
|
|
26
|
+
all: FindingVerdict[];
|
|
27
|
+
/** Gate wall-clock overhead in ms (A5 (d) — measured cost). */
|
|
28
|
+
latencyMs: number;
|
|
29
|
+
/** Judge invocations the gate made (0 when disabled). Token cost ∝ this. */
|
|
30
|
+
judgeCalls: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Verify findings before emitting them. Returns the survivors (`emitted`), the
|
|
34
|
+
* killed (`blocked`), every verdict (`all`), and the gate's overhead. When
|
|
35
|
+
* `enabled === false` it is a no-op: no Judge calls, everything passes through.
|
|
36
|
+
*/
|
|
37
|
+
export declare function verifyGate(findings: Finding[], opts: VerifyGateOptions): Promise<VerifyGateResult>;
|
|
38
|
+
//# sourceMappingURL=gate.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { adversarialVerify } from './verify.js';
|
|
2
|
+
/** A finding passed through un-verified (gate disabled): honest `uncertain`. */
|
|
3
|
+
function passthrough(f) {
|
|
4
|
+
return {
|
|
5
|
+
contract: 'finding-verdict@1',
|
|
6
|
+
id: f.id, title: f.title,
|
|
7
|
+
...(f.file !== undefined ? { file: f.file } : {}),
|
|
8
|
+
severity: f.severity, confidence: f.confidence, evidence: f.evidence,
|
|
9
|
+
verdict: 'uncertain', refutations: [],
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
const isBlocked = (v, dropUncertain) => v.verdict === 'refuted' || (dropUncertain && v.verdict === 'uncertain');
|
|
13
|
+
/**
|
|
14
|
+
* Verify findings before emitting them. Returns the survivors (`emitted`), the
|
|
15
|
+
* killed (`blocked`), every verdict (`all`), and the gate's overhead. When
|
|
16
|
+
* `enabled === false` it is a no-op: no Judge calls, everything passes through.
|
|
17
|
+
*/
|
|
18
|
+
export async function verifyGate(findings, opts) {
|
|
19
|
+
const t0 = Date.now();
|
|
20
|
+
if (opts.enabled === false) {
|
|
21
|
+
const emitted = findings.map(passthrough);
|
|
22
|
+
return { enabled: false, emitted, blocked: [], all: emitted, latencyMs: Date.now() - t0, judgeCalls: 0 };
|
|
23
|
+
}
|
|
24
|
+
let judgeCalls = 0;
|
|
25
|
+
const countingJudge = (prompt) => { judgeCalls++; return opts.judge(prompt); };
|
|
26
|
+
const all = await adversarialVerify(findings, { ...opts, judge: countingJudge });
|
|
27
|
+
const dropUncertain = opts.dropUncertain ?? false;
|
|
28
|
+
const blocked = all.filter((v) => isBlocked(v, dropUncertain));
|
|
29
|
+
const emitted = all.filter((v) => !isBlocked(v, dropUncertain));
|
|
30
|
+
return { enabled: true, emitted, blocked, all, latencyMs: Date.now() - t0, judgeCalls };
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=gate.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @ruvector/adversarial-verify (plan 05 / A2).
|
|
3
|
+
*
|
|
4
|
+
* Host-agnostic blind-refuter verification: turn raw findings into adversarially
|
|
5
|
+
* verified finding-verdict@1 envelopes. N blind refuters per finding (anti-
|
|
6
|
+
* sycophancy, default-refuted on uncertainty) → deterministic majority-kill.
|
|
7
|
+
* The LLM is injected as a `Judge`, so this has ZERO AQE/Claude-Code dependency
|
|
8
|
+
* and is publishable as `@ruvector/adversarial-verify`.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* const verdicts = await adversarialVerify(findings, { judge, refuters: 3 });
|
|
12
|
+
* const { confirmed, killed } = partitionVerdicts(verdicts);
|
|
13
|
+
*/
|
|
14
|
+
export type { Finding, FindingVerdict, FindingSeverity, FindingOutcome, RefuterVote, Judge, AdversarialVerifyOptions, } from './types.js';
|
|
15
|
+
export { adversarialVerify, partitionVerdicts } from './verify.js';
|
|
16
|
+
export { synthesizeVerdict, majorityKill, isFindingVerdict } from './synthesize.js';
|
|
17
|
+
export { refuterPrompt, DEFAULT_LENSES } from './prompts.js';
|
|
18
|
+
export { calibrate, type LabeledFinding, type CalibrationReport } from './calibrate.js';
|
|
19
|
+
export { verifyGate, type VerifyGateOptions, type VerifyGateResult } from './gate.js';
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { adversarialVerify, partitionVerdicts } from './verify.js';
|
|
2
|
+
export { synthesizeVerdict, majorityKill, isFindingVerdict } from './synthesize.js';
|
|
3
|
+
export { refuterPrompt, DEFAULT_LENSES } from './prompts.js';
|
|
4
|
+
export { calibrate } from './calibrate.js';
|
|
5
|
+
export { verifyGate } from './gate.js';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @ruvector/adversarial-verify — blind refuter prompt (ADR-074 Loki-mode).
|
|
3
|
+
*
|
|
4
|
+
* The refuter sees ONLY the bare claim + evidence + a lens — never the finder's
|
|
5
|
+
* confidence, dimension, or other refuters' votes. Anti-sycophancy: its job is to
|
|
6
|
+
* ATTACK the claim, and uncertainty defaults to refuted (unverifiable claims must
|
|
7
|
+
* not survive).
|
|
8
|
+
*/
|
|
9
|
+
import type { Finding } from './types.js';
|
|
10
|
+
/** Default refutation lenses — distinct angles of attack (one per refuter). */
|
|
11
|
+
export declare const DEFAULT_LENSES: string[];
|
|
12
|
+
/** Build the blind refuter prompt for one finding under one lens. */
|
|
13
|
+
export declare function refuterPrompt(finding: Finding, lens: string): string;
|
|
14
|
+
//# sourceMappingURL=prompts.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** Default refutation lenses — distinct angles of attack (one per refuter). */
|
|
2
|
+
export const DEFAULT_LENSES = [
|
|
3
|
+
'does-the-evidence-reproduce',
|
|
4
|
+
'is-it-actually-a-problem',
|
|
5
|
+
'is-the-cited-code-really-doing-this',
|
|
6
|
+
];
|
|
7
|
+
/** Build the blind refuter prompt for one finding under one lens. */
|
|
8
|
+
export function refuterPrompt(finding, lens) {
|
|
9
|
+
return (`You are an adversarial reviewer. Try to REFUTE this code-review claim using the ${lens} lens.\n` +
|
|
10
|
+
`Claim: "${finding.title}"${finding.file ? ` in ${finding.file}` : ''}\n` +
|
|
11
|
+
`Evidence offered: ${finding.evidence.join(' | ')}\n` +
|
|
12
|
+
`Read the actual code at the cited locations and judge ONLY what you can verify yourself. ` +
|
|
13
|
+
`Set refuted=true unless the evidence checks out AND the claim is a real, actionable problem ` +
|
|
14
|
+
`(default to refuted=true when uncertain — unverifiable claims must not survive). ` +
|
|
15
|
+
`Give one-sentence reasoning.`);
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=prompts.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @ruvector/adversarial-verify — deterministic verdict synthesis (pure).
|
|
3
|
+
*
|
|
4
|
+
* The k-of-n majority-kill math (ADR-074): a finding is `refuted` when at least
|
|
5
|
+
* ⌈n/2⌉ of the CAST votes refute it; `uncertain` when no votes were cast (all
|
|
6
|
+
* refuters failed); else `upheld`. No LLM, no I/O — byte-identical across runs.
|
|
7
|
+
*/
|
|
8
|
+
import type { Finding, FindingVerdict, RefuterVote } from './types.js';
|
|
9
|
+
/** Default kill threshold: simple majority of cast votes (2-of-3, 1-of-1, 2-of-2). */
|
|
10
|
+
export declare const majorityKill: (castVotes: number) => number;
|
|
11
|
+
/**
|
|
12
|
+
* Fold a finding + its refuter votes into a finding-verdict@1 envelope.
|
|
13
|
+
* `votes` must already exclude failed refuters (null/throw → omitted upstream).
|
|
14
|
+
*/
|
|
15
|
+
export declare function synthesizeVerdict(finding: Finding, votes: RefuterVote[], killThreshold?: (castVotes: number) => number): FindingVerdict;
|
|
16
|
+
/** Runtime guard: does `x` conform to finding-verdict@1 at the boundary? */
|
|
17
|
+
export declare function isFindingVerdict(x: unknown): x is FindingVerdict;
|
|
18
|
+
//# sourceMappingURL=synthesize.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** Default kill threshold: simple majority of cast votes (2-of-3, 1-of-1, 2-of-2). */
|
|
2
|
+
export const majorityKill = (castVotes) => Math.ceil(castVotes / 2);
|
|
3
|
+
/**
|
|
4
|
+
* Fold a finding + its refuter votes into a finding-verdict@1 envelope.
|
|
5
|
+
* `votes` must already exclude failed refuters (null/throw → omitted upstream).
|
|
6
|
+
*/
|
|
7
|
+
export function synthesizeVerdict(finding, votes, killThreshold = majorityKill) {
|
|
8
|
+
const refutations = votes.filter((v) => v.refuted).map((v) => v.reasoning);
|
|
9
|
+
const killed = votes.length > 0 && refutations.length >= killThreshold(votes.length);
|
|
10
|
+
return {
|
|
11
|
+
contract: 'finding-verdict@1',
|
|
12
|
+
id: finding.id,
|
|
13
|
+
title: finding.title,
|
|
14
|
+
...(finding.file !== undefined ? { file: finding.file } : {}),
|
|
15
|
+
severity: finding.severity,
|
|
16
|
+
confidence: finding.confidence,
|
|
17
|
+
evidence: finding.evidence,
|
|
18
|
+
verdict: votes.length === 0 ? 'uncertain' : killed ? 'refuted' : 'upheld',
|
|
19
|
+
refutations,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/** Runtime guard: does `x` conform to finding-verdict@1 at the boundary? */
|
|
23
|
+
export function isFindingVerdict(x) {
|
|
24
|
+
if (!x || typeof x !== 'object')
|
|
25
|
+
return false;
|
|
26
|
+
const v = x;
|
|
27
|
+
return (v.contract === 'finding-verdict@1' &&
|
|
28
|
+
typeof v.id === 'string' &&
|
|
29
|
+
typeof v.title === 'string' &&
|
|
30
|
+
typeof v.confidence === 'number' &&
|
|
31
|
+
Array.isArray(v.evidence) &&
|
|
32
|
+
Array.isArray(v.refutations) &&
|
|
33
|
+
(v.verdict === 'upheld' || v.verdict === 'refuted' || v.verdict === 'uncertain'));
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=synthesize.js.map
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @ruvector/adversarial-verify — types (plan 05 / A2).
|
|
3
|
+
*
|
|
4
|
+
* Host-agnostic blind-refuter verification, extracted from AQE's
|
|
5
|
+
* qcsd-development-review workflow (ADR-074 Loki-mode, ADR-103 finding-verdict@1).
|
|
6
|
+
* ZERO dependency on AQE/Claude-Code: the LLM call is injected as a `Judge`, so
|
|
7
|
+
* this module is reusable by any host (and publishable as @ruvector/*).
|
|
8
|
+
*/
|
|
9
|
+
export type FindingSeverity = 'critical' | 'high' | 'medium' | 'low' | 'info';
|
|
10
|
+
export type FindingOutcome = 'upheld' | 'refuted' | 'uncertain';
|
|
11
|
+
/** A claim to be adversarially verified (input). */
|
|
12
|
+
export interface Finding {
|
|
13
|
+
/** Stable id; the verdict carries it verbatim (callers compose any prefix). */
|
|
14
|
+
id: string;
|
|
15
|
+
title: string;
|
|
16
|
+
file?: string;
|
|
17
|
+
severity: FindingSeverity;
|
|
18
|
+
/** Finder's self-reported confidence (0..1). NOT shown to refuters (blind). */
|
|
19
|
+
confidence: number;
|
|
20
|
+
evidence: string[];
|
|
21
|
+
}
|
|
22
|
+
/** One refuter's vote (the Judge's return). */
|
|
23
|
+
export interface RefuterVote {
|
|
24
|
+
refuted: boolean;
|
|
25
|
+
reasoning: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The injected LLM refuter. Returns a vote, or `null`/throws on failure (failed
|
|
29
|
+
* calls are excluded from the tally — they neither refute nor uphold).
|
|
30
|
+
* Receives ONLY the blind refuter prompt — never the finder's confidence/dimension.
|
|
31
|
+
*/
|
|
32
|
+
export type Judge = (prompt: string) => Promise<RefuterVote | null>;
|
|
33
|
+
/** finding-verdict@1 envelope (mirrors schemas/finding-verdict.schema.json). */
|
|
34
|
+
export interface FindingVerdict {
|
|
35
|
+
contract: 'finding-verdict@1';
|
|
36
|
+
id: string;
|
|
37
|
+
title: string;
|
|
38
|
+
file?: string;
|
|
39
|
+
severity: FindingSeverity;
|
|
40
|
+
confidence: number;
|
|
41
|
+
evidence: string[];
|
|
42
|
+
verdict: FindingOutcome;
|
|
43
|
+
/** One entry per refuter that voted to refute (empty when none). */
|
|
44
|
+
refutations: string[];
|
|
45
|
+
}
|
|
46
|
+
export interface AdversarialVerifyOptions {
|
|
47
|
+
/** The injected LLM refuter. Required. */
|
|
48
|
+
judge: Judge;
|
|
49
|
+
/** Refuters per finding (default 3). Capped at `lenses.length`. */
|
|
50
|
+
refuters?: number;
|
|
51
|
+
/** Refutation lenses (one per refuter). Default {@link DEFAULT_LENSES}. */
|
|
52
|
+
lenses?: string[];
|
|
53
|
+
/**
|
|
54
|
+
* Kill threshold as a function of the number of CAST votes (default ⌈n/2⌉ —
|
|
55
|
+
* majority). A finding is `refuted` when refute-votes ≥ killThreshold(castVotes).
|
|
56
|
+
*/
|
|
57
|
+
killThreshold?: (castVotes: number) => number;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @ruvector/adversarial-verify — types (plan 05 / A2).
|
|
3
|
+
*
|
|
4
|
+
* Host-agnostic blind-refuter verification, extracted from AQE's
|
|
5
|
+
* qcsd-development-review workflow (ADR-074 Loki-mode, ADR-103 finding-verdict@1).
|
|
6
|
+
* ZERO dependency on AQE/Claude-Code: the LLM call is injected as a `Judge`, so
|
|
7
|
+
* this module is reusable by any host (and publishable as @ruvector/*).
|
|
8
|
+
*/
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @ruvector/adversarial-verify — the orchestrator.
|
|
3
|
+
*
|
|
4
|
+
* For each finding, run N BLIND refuters in parallel (each gets only the bare
|
|
5
|
+
* claim + evidence + a distinct lens), then deterministically synthesize the
|
|
6
|
+
* finding-verdict@1. The LLM is injected (`Judge`) — no host dependency.
|
|
7
|
+
*/
|
|
8
|
+
import type { AdversarialVerifyOptions, Finding, FindingVerdict } from './types.js';
|
|
9
|
+
/**
|
|
10
|
+
* Adversarially verify findings: N blind refuters per finding → majority-kill →
|
|
11
|
+
* finding-verdict@1 envelopes (one per finding, in input order).
|
|
12
|
+
*/
|
|
13
|
+
export declare function adversarialVerify(findings: Finding[], opts: AdversarialVerifyOptions): Promise<FindingVerdict[]>;
|
|
14
|
+
/** Convenience: split verdicts into confirmed (upheld) / killed (refuted) / uncertain. */
|
|
15
|
+
export declare function partitionVerdicts(verdicts: FindingVerdict[]): {
|
|
16
|
+
confirmed: FindingVerdict[];
|
|
17
|
+
killed: FindingVerdict[];
|
|
18
|
+
uncertain: FindingVerdict[];
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=verify.d.ts.map
|