agentic-qe 3.11.4 → 3.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (449) hide show
  1. package/.claude/helpers/.helpers-version +1 -0
  2. package/.claude/helpers/auto-memory-hook.mjs +35 -3
  3. package/.claude/helpers/brain-checkpoint.cjs +16 -1
  4. package/.claude/helpers/helpers.manifest.json +12 -0
  5. package/.claude/helpers/hook-handler.cjs +26 -5
  6. package/.claude/helpers/intelligence.cjs +14 -1
  7. package/.claude/hooks/aqe-hook.cjs +57 -10
  8. package/.claude/skills/skills-manifest.json +1 -1
  9. package/CHANGELOG.md +110 -0
  10. package/assets/skills/skills-manifest.json +1 -1
  11. package/dist/adapters/a2a/auth/routes.js +59 -28
  12. package/dist/audit/witness-chain.d.ts +25 -0
  13. package/dist/audit/witness-chain.js +69 -22
  14. package/dist/audit/witness-key-manager.d.ts +11 -0
  15. package/dist/audit/witness-key-manager.js +24 -0
  16. package/dist/cli/brain-commands.js +2 -1
  17. package/dist/cli/bundle.js +6 -6
  18. package/dist/cli/chunks/adapter-6IWRIHF3.js +2 -0
  19. package/dist/cli/chunks/{agent-booster-wasm-62I6ZNRW.js → agent-booster-wasm-IO54X6IQ.js} +2 -2
  20. package/dist/cli/chunks/{agent-handler-E2TZKKBS.js → agent-handler-A57SZUCW.js} +2 -2
  21. package/dist/cli/chunks/{agent-memory-branch-JHAHC2NH.js → agent-memory-branch-BX7LRFGN.js} +2 -2
  22. package/dist/cli/chunks/aqe-learning-engine-FSF5U67K.js +2 -0
  23. package/dist/cli/chunks/{arena-72ZV65BR.js → arena-UTC4YY6Y.js} +4 -4
  24. package/dist/cli/chunks/{arena-KLG3YSSR.js → arena-Y3XTX6O7.js} +2 -2
  25. package/dist/cli/chunks/audit-L4RL2AOY.js +3 -0
  26. package/dist/cli/chunks/base-2CKCJU3O.js +2 -0
  27. package/dist/cli/chunks/{hnswlib-node-LAFK5QZ4.js → better-sqlite3-LRDXKYOJ.js} +2 -2
  28. package/dist/cli/chunks/brain-handler-OHDPI5TQ.js +89 -0
  29. package/dist/cli/chunks/{branch-enumerator-C7MPNYT7.js → branch-enumerator-ZRXE2CQ7.js} +2 -2
  30. package/dist/cli/chunks/{browser-UUDUDYLR.js → browser-NT33FG76.js} +2 -2
  31. package/dist/cli/chunks/browser-workflow-UGYJE64S.js +2 -0
  32. package/dist/cli/chunks/{chunk-7QTB5XIQ.js → chunk-27JCWG5J.js} +2 -2
  33. package/dist/cli/chunks/{chunk-3FJZMQJ7.js → chunk-2ALNNXFF.js} +2 -2
  34. package/dist/cli/chunks/{chunk-LMJUMUQJ.js → chunk-2AOOIAW3.js} +4 -4
  35. package/dist/cli/chunks/{chunk-CNF3ZWLM.js → chunk-2AR4B3DI.js} +2 -2
  36. package/dist/cli/chunks/{chunk-7ADD2ZQL.js → chunk-2KHDGC7N.js} +2 -2
  37. package/dist/cli/chunks/{chunk-P6S6ZVB5.js → chunk-2UMCB7AH.js} +1 -1
  38. package/dist/cli/chunks/{chunk-HH6NCBSP.js → chunk-335GHVJV.js} +22 -22
  39. package/dist/cli/chunks/{chunk-2WPSMQIL.js → chunk-36MPDANH.js} +1 -1
  40. package/dist/cli/chunks/{chunk-Y4AXOHW4.js → chunk-3AFNXU45.js} +1 -1
  41. package/dist/cli/chunks/{chunk-SL3SNOO2.js → chunk-3B4XXFKD.js} +2 -2
  42. package/dist/cli/chunks/{chunk-7IKWF2AD.js → chunk-4GU656WM.js} +1 -1
  43. package/dist/cli/chunks/{chunk-IQBZBUP5.js → chunk-4SALW7OT.js} +2 -2
  44. package/dist/cli/chunks/{chunk-TCVEKRPI.js → chunk-5FR5GBUT.js} +2 -2
  45. package/dist/cli/chunks/chunk-5VBPIJUZ.js +65 -0
  46. package/dist/cli/chunks/chunk-5XFX25AJ.js +4 -0
  47. package/dist/cli/chunks/{chunk-QSDIY3E2.js → chunk-5YGESYBC.js} +1 -1
  48. package/dist/cli/chunks/{chunk-5U2WHPXL.js → chunk-62RELCU6.js} +1 -1
  49. package/dist/cli/chunks/{chunk-QJ5NCYJ3.js → chunk-64M3FFM4.js} +2 -2
  50. package/dist/cli/chunks/{chunk-BMQDELPA.js → chunk-6JNNZGI2.js} +1 -1
  51. package/dist/cli/chunks/{chunk-U34OZXD6.js → chunk-6X3RJBA3.js} +2 -2
  52. package/dist/cli/chunks/{chunk-AE6HXMOG.js → chunk-72VZGAMJ.js} +1 -1
  53. package/dist/cli/chunks/{chunk-4JFH3MVA.js → chunk-7F7U2HUH.js} +1 -1
  54. package/dist/cli/chunks/{chunk-A4OMK3FO.js → chunk-7HJHXSYT.js} +2 -2
  55. package/dist/cli/chunks/chunk-7WX3MKRS.js +2 -0
  56. package/dist/cli/chunks/{chunk-O7PVZ32A.js → chunk-7ZIVDGSN.js} +1 -1
  57. package/dist/cli/chunks/{chunk-EZRHSHOQ.js → chunk-AAATFEIL.js} +2 -2
  58. package/dist/cli/chunks/{chunk-TQ373GGI.js → chunk-AEX75YGI.js} +2 -2
  59. package/dist/cli/chunks/chunk-BA6U7NSR.js +2 -0
  60. package/dist/cli/chunks/chunk-BB4OVXWF.js +14 -0
  61. package/dist/cli/chunks/{chunk-GRQ36XUH.js → chunk-BBC526PL.js} +2 -2
  62. package/dist/cli/chunks/{chunk-EONKMHKO.js → chunk-BGRJZH5Q.js} +2 -2
  63. package/dist/cli/chunks/{chunk-XQ6DW5FV.js → chunk-BUYPRUNY.js} +2 -2
  64. package/dist/cli/chunks/{chunk-TU6YN43Q.js → chunk-BZPF6GTL.js} +1 -1
  65. package/dist/cli/chunks/{chunk-TPMBFARK.js → chunk-C4SZSPXY.js} +67 -22
  66. package/dist/cli/chunks/{chunk-D6CKKNYC.js → chunk-C6GYLCTX.js} +2 -2
  67. package/dist/cli/chunks/{chunk-YNK6SUPU.js → chunk-CC5G3K4X.js} +2 -2
  68. package/dist/cli/chunks/{chunk-ADFKY3X2.js → chunk-CHO54B34.js} +2 -2
  69. package/dist/cli/chunks/{chunk-WQZ2WRO4.js → chunk-CMGYUCM7.js} +1 -1
  70. package/dist/cli/chunks/{chunk-QMC5MTBV.js → chunk-CSEEGX5T.js} +2 -2
  71. package/dist/cli/chunks/{chunk-FSGMRQFC.js → chunk-CVGXB7IX.js} +2 -2
  72. package/dist/cli/chunks/{chunk-5VSQAGA2.js → chunk-DQDFACYW.js} +1 -1
  73. package/dist/cli/chunks/chunk-DR7PCO3S.js +153 -0
  74. package/dist/cli/chunks/{chunk-D5S47YUS.js → chunk-DTOE3NYW.js} +3 -3
  75. package/dist/cli/chunks/{chunk-WZYNY3VF.js → chunk-DXOMRWDC.js} +1 -1
  76. package/dist/cli/chunks/{chunk-HJ24KMC2.js → chunk-EGH3H7QO.js} +1 -1
  77. package/dist/cli/chunks/{chunk-JFLSQH2X.js → chunk-EM2JIIAQ.js} +2 -2
  78. package/dist/cli/chunks/{chunk-MWFJC5HR.js → chunk-ESDGCTC4.js} +1 -1
  79. package/dist/cli/chunks/{chunk-SRVTNG6L.js → chunk-EZE2HRQB.js} +2 -2
  80. package/dist/cli/chunks/{chunk-ZFCVT43J.js → chunk-FEEMJDUF.js} +2 -2
  81. package/dist/cli/chunks/{chunk-HJO4RNOW.js → chunk-FI5SSLEF.js} +2 -2
  82. package/dist/cli/chunks/{chunk-XHRLBJTM.js → chunk-FKPUPQQT.js} +2 -2
  83. package/dist/cli/chunks/{chunk-ODZSQVEW.js → chunk-FOPS6DRZ.js} +1 -1
  84. package/dist/cli/chunks/{chunk-AQIEK4SY.js → chunk-FU5RNEXV.js} +2 -2
  85. package/dist/cli/chunks/{chunk-PQUXFSN6.js → chunk-FZIHOMGY.js} +2 -2
  86. package/dist/cli/chunks/{chunk-Z2REKBD6.js → chunk-FZRU73M4.js} +2 -2
  87. package/dist/cli/chunks/{chunk-NBBLPDJX.js → chunk-G5JQLUUO.js} +2 -2
  88. package/dist/cli/chunks/{chunk-4BFCLSDN.js → chunk-G6LR7FK7.js} +2 -2
  89. package/dist/cli/chunks/{chunk-QEVX4GWF.js → chunk-G6RKUEGL.js} +2 -2
  90. package/dist/cli/chunks/{chunk-HWBMYR5W.js → chunk-GCF42L7M.js} +5 -5
  91. package/dist/cli/chunks/{chunk-TSWF3AGQ.js → chunk-GGMQOEZZ.js} +2 -2
  92. package/dist/cli/chunks/{chunk-PFWJQPUC.js → chunk-HAEUPIKW.js} +2 -2
  93. package/dist/cli/chunks/{chunk-63QUN3JK.js → chunk-HDJMD6UH.js} +1 -1
  94. package/dist/cli/chunks/{chunk-JPENUVCI.js → chunk-HW62TB4T.js} +1 -1
  95. package/dist/cli/chunks/{chunk-WMIRAD3J.js → chunk-I6WHYRWB.js} +2 -2
  96. package/dist/cli/chunks/{chunk-YZ5EQR37.js → chunk-ICK3B24H.js} +2 -2
  97. package/dist/cli/chunks/{chunk-FRFVN6AA.js → chunk-IDLNLSQI.js} +2 -2
  98. package/dist/cli/chunks/{chunk-VQU7DMEY.js → chunk-IJUYHIKN.js} +2 -2
  99. package/dist/cli/chunks/{chunk-6JUOH6L4.js → chunk-IKVNYK7Y.js} +2 -2
  100. package/dist/cli/chunks/{chunk-ZKCKOQJI.js → chunk-JOBCMNTP.js} +2 -2
  101. package/dist/cli/chunks/{chunk-ARPBG6FQ.js → chunk-JYX7AZHE.js} +2 -2
  102. package/dist/cli/chunks/{chunk-SFDUT5WM.js → chunk-JYXSVSH2.js} +2 -2
  103. package/dist/cli/chunks/{chunk-VJGHRWMH.js → chunk-K5SN66B4.js} +2 -2
  104. package/dist/cli/chunks/{chunk-DNOU2HVQ.js → chunk-KDLYTJ5C.js} +2 -2
  105. package/dist/cli/chunks/{chunk-T76RFXQX.js → chunk-KI5BP4X5.js} +2 -2
  106. package/dist/cli/chunks/{chunk-7AWK43JN.js → chunk-KJWQ7ENF.js} +2 -2
  107. package/dist/cli/chunks/{chunk-BRLUNIR4.js → chunk-KN5GOEYK.js} +2 -2
  108. package/dist/cli/chunks/{chunk-VKJQAKYG.js → chunk-KZ37VHMJ.js} +2 -2
  109. package/dist/cli/chunks/{chunk-NV3TXXOW.js → chunk-KZMRU7DL.js} +2 -2
  110. package/dist/cli/chunks/{chunk-LLUPRGOR.js → chunk-L5ZLOW3K.js} +2 -2
  111. package/dist/cli/chunks/{chunk-THKZVOZV.js → chunk-LMJUQWR7.js} +1 -1
  112. package/dist/cli/chunks/{chunk-2KNFS3L5.js → chunk-MBF3Q7FQ.js} +1 -1
  113. package/dist/cli/chunks/chunk-MDT3LIXS.js +2 -0
  114. package/dist/cli/chunks/{chunk-B5XUWHKQ.js → chunk-MJPYNGZ7.js} +1 -1
  115. package/dist/cli/chunks/{chunk-UCYTY4LG.js → chunk-MK3J7JVZ.js} +2 -2
  116. package/dist/cli/chunks/{chunk-MCT4CD5M.js → chunk-MUAHFGIX.js} +2 -2
  117. package/dist/cli/chunks/{chunk-3SBUL72V.js → chunk-MUV56BPK.js} +2 -2
  118. package/dist/cli/chunks/{chunk-WNMDWP5A.js → chunk-NLHISTL2.js} +2 -2
  119. package/dist/cli/chunks/{chunk-UJMTKXPI.js → chunk-NNGCUJWQ.js} +2 -2
  120. package/dist/cli/chunks/chunk-NW7G57NR.js +27 -0
  121. package/dist/cli/chunks/{chunk-3SRPFBU7.js → chunk-O3C5RRDQ.js} +3 -3
  122. package/dist/cli/chunks/{chunk-AYGEWPN4.js → chunk-OHSVDMF7.js} +1 -1
  123. package/dist/cli/chunks/{chunk-AJXGGTX7.js → chunk-OPIWFXME.js} +1 -1
  124. package/dist/cli/chunks/{chunk-ZSBJNE35.js → chunk-P52YORQG.js} +2 -2
  125. package/dist/cli/chunks/chunk-PM566XEO.js +2 -0
  126. package/dist/cli/chunks/chunk-POKMJTD2.js +2 -0
  127. package/dist/cli/chunks/{chunk-GOQ4P2PB.js → chunk-PQMLIVGV.js} +2 -2
  128. package/dist/cli/chunks/{chunk-IB3ZPLFA.js → chunk-PT3FTGKZ.js} +2 -2
  129. package/dist/cli/chunks/{chunk-U3AVZGQA.js → chunk-Q5YRPS4P.js} +1 -1
  130. package/dist/cli/chunks/{chunk-5Z4FBCBK.js → chunk-QJ6H2HQQ.js} +1 -1
  131. package/dist/cli/chunks/{chunk-DRMHVY4T.js → chunk-RG552ROA.js} +4 -4
  132. package/dist/cli/chunks/{chunk-PEIQDQXN.js → chunk-RHC7TFPU.js} +2 -2
  133. package/dist/cli/chunks/{chunk-JNQN5DNS.js → chunk-RMFRFING.js} +1 -1
  134. package/dist/cli/chunks/{chunk-4YT5YN5G.js → chunk-RQN4HWGV.js} +2 -2
  135. package/dist/cli/chunks/{chunk-5P7Q5YNC.js → chunk-RYUSZ43T.js} +1 -1
  136. package/dist/cli/chunks/{chunk-O5NEJIHB.js → chunk-RZDNCTOA.js} +2 -2
  137. package/dist/cli/chunks/chunk-SCMXIBI7.js +2 -0
  138. package/dist/cli/chunks/{chunk-6545AS2J.js → chunk-SPEUF7ZL.js} +2 -2
  139. package/dist/cli/chunks/{chunk-LW5DHT3Z.js → chunk-SSXAW3ER.js} +2 -2
  140. package/dist/cli/chunks/{chunk-Q7ORVHJB.js → chunk-TC2JE5OK.js} +3 -3
  141. package/dist/cli/chunks/{chunk-MALOUGSF.js → chunk-TED4KOSK.js} +2 -2
  142. package/dist/cli/chunks/{chunk-ICCTQ5LO.js → chunk-TJ6N4CCX.js} +2 -2
  143. package/dist/cli/chunks/{chunk-6GYGAW53.js → chunk-TJEJ4UVX.js} +2 -2
  144. package/dist/cli/chunks/{chunk-VO6YJGB4.js → chunk-TO5PQSDD.js} +2 -2
  145. package/dist/cli/chunks/{chunk-LKURMUBU.js → chunk-TR5GOGH3.js} +37 -12
  146. package/dist/cli/chunks/{chunk-JCTCM6IR.js → chunk-UGJQJSPB.js} +1 -1
  147. package/dist/cli/chunks/{chunk-4RHNPRAP.js → chunk-USB44IHJ.js} +2 -2
  148. package/dist/cli/chunks/{chunk-JDFPAJGB.js → chunk-UUOXV3NS.js} +92 -92
  149. package/dist/cli/chunks/chunk-UVVKFBF7.js +2 -0
  150. package/dist/cli/chunks/{chunk-VCUCD3B5.js → chunk-V2MD5EDD.js} +2 -2
  151. package/dist/cli/chunks/{chunk-RFQBDMAP.js → chunk-VA7TEOPM.js} +1 -1
  152. package/dist/cli/chunks/{chunk-IF3HPQNV.js → chunk-VMP4M5PB.js} +1 -1
  153. package/dist/cli/chunks/{chunk-KUZMVH6N.js → chunk-VS4GMNJK.js} +3 -3
  154. package/dist/cli/chunks/{chunk-ZYZT2CDX.js → chunk-VWJSWXHG.js} +1 -1
  155. package/dist/cli/chunks/{chunk-54B6P2WS.js → chunk-VZ67ZDB3.js} +3 -3
  156. package/dist/cli/chunks/{chunk-NSPCZPTB.js → chunk-W2OMW6UU.js} +2 -2
  157. package/dist/cli/chunks/{chunk-3SKIZDKL.js → chunk-W766S4SK.js} +1 -1
  158. package/dist/cli/chunks/{chunk-N2BJN6AO.js → chunk-WJYTLRA5.js} +3 -3
  159. package/dist/cli/chunks/{chunk-X64BEXUY.js → chunk-WNASEUBW.js} +117 -113
  160. package/dist/cli/chunks/{chunk-HT6WAYIR.js → chunk-WT4ZDDFM.js} +1 -1
  161. package/dist/cli/chunks/chunk-XEYW3V5I.js +2 -0
  162. package/dist/cli/chunks/{chunk-6W3QHS45.js → chunk-XIFPIVZI.js} +2 -2
  163. package/dist/cli/chunks/{chunk-3E7D3A35.js → chunk-Y2MCIIJD.js} +1 -1
  164. package/dist/cli/chunks/{chunk-YUHM72VQ.js → chunk-YKOTOCO6.js} +2 -2
  165. package/dist/cli/chunks/{chunk-YKSWC7I4.js → chunk-Z3W3R4CW.js} +8 -20
  166. package/dist/cli/chunks/chunk-ZT2WHCVM.js +2 -0
  167. package/dist/cli/chunks/{chunk-G3TFNY4T.js → chunk-ZVPAFX4I.js} +2 -2
  168. package/dist/cli/chunks/{chunk-NFJT7XXR.js → chunk-ZWC6CM4R.js} +1 -1
  169. package/dist/cli/chunks/{ci-HQCRSCC7.js → ci-RJH5LAL3.js} +2 -2
  170. package/dist/cli/chunks/{ci-output-YBVXLA6O.js → ci-output-62SGMGB2.js} +2 -2
  171. package/dist/cli/chunks/{circuit-breaker-ULGMF2QN.js → circuit-breaker-QXTS5ZAW.js} +2 -2
  172. package/dist/cli/chunks/{claude-flow-setup-MKZ2LJXK.js → claude-flow-setup-BBCCT5WV.js} +2 -2
  173. package/dist/cli/chunks/client-E2XUBCLK.js +2 -0
  174. package/dist/cli/chunks/{cline-installer-WZQ6XBWN.js → cline-installer-IZCUJJ3I.js} +2 -2
  175. package/dist/cli/chunks/{code-H3KGH45S.js → code-AWNVOZ7S.js} +2 -2
  176. package/dist/cli/chunks/{code-index-extractor-NUVEAJ7C.js → code-index-extractor-MX65BKMI.js} +2 -2
  177. package/dist/cli/chunks/{codex-installer-JQI6E6CV.js → codex-installer-EQT6JVLM.js} +2 -2
  178. package/dist/cli/chunks/{completions-NDF4PFE7.js → completions-WOJAM45W.js} +2 -2
  179. package/dist/cli/chunks/{complexity-analyzer-XCZH66HG.js → complexity-analyzer-3DJB7V3K.js} +2 -2
  180. package/dist/cli/chunks/{continuedev-installer-Z4AJGZ7S.js → continuedev-installer-P4KWUTCJ.js} +2 -2
  181. package/dist/cli/chunks/{copilot-installer-K4IPAL7C.js → copilot-installer-FFZWTMWQ.js} +2 -2
  182. package/dist/cli/chunks/core-handlers-46Z5VOO6.js +2 -0
  183. package/dist/cli/chunks/{cost-tracker-35KXAB23.js → cost-tracker-CYBOV3NI.js} +2 -2
  184. package/dist/cli/chunks/{coverage-QW5I4TYZ.js → coverage-GTZJBSC4.js} +3 -3
  185. package/dist/cli/chunks/cross-domain-router-SXQ3HFRY.js +2 -0
  186. package/dist/cli/chunks/{cursor-installer-P4Z7RMIZ.js → cursor-installer-WZIVXGGB.js} +2 -2
  187. package/dist/cli/chunks/daemon-JWMHEJEN.js +10 -0
  188. package/dist/cli/chunks/{daemon-WQWTCYBM.js → daemon-MSFN2LXY.js} +3 -3
  189. package/dist/cli/chunks/{dag-attention-scheduler-7XD2VGON.js → dag-attention-scheduler-4TWOTTQE.js} +2 -2
  190. package/dist/cli/chunks/{detect-GZ3P4DI7.js → detect-YZ6AGQPB.js} +2 -2
  191. package/dist/cli/chunks/{dist-node-6WWAW7OP.js → dist-node-3EM2XH54.js} +2 -2
  192. package/dist/cli/chunks/{domain-handler-3GTLWARQ.js → domain-handler-4XU5BINU.js} +2 -2
  193. package/dist/cli/chunks/domain-transfer-HUFC7I52.js +2 -0
  194. package/dist/cli/chunks/dream-R6MQQQ3N.js +2 -0
  195. package/dist/cli/chunks/{embed-and-insert-pattern-BGIMA77V.js → embed-and-insert-pattern-J5ZFM6YX.js} +2 -2
  196. package/dist/cli/chunks/{eval-SXV6DRDD.js → eval-XYOA3EH2.js} +2 -2
  197. package/dist/cli/chunks/{experience-capture-middleware-TT6WCT2S.js → experience-capture-middleware-E3RYQB6Z.js} +3 -3
  198. package/dist/cli/chunks/{fast-paths-HTAZHEQP.js → fast-paths-DKIYN2YS.js} +2 -2
  199. package/dist/cli/chunks/{feature-flags-DIE3Z2B4.js → feature-flags-S2RNZATS.js} +2 -2
  200. package/dist/cli/chunks/{feature-flags-WBUKU54W.js → feature-flags-ZB63Z7N5.js} +2 -2
  201. package/dist/cli/chunks/{file-discovery-SKDETFS3.js → file-discovery-USJJLYQU.js} +2 -2
  202. package/dist/cli/chunks/{fleet-WCWEPAVU.js → fleet-4MUPHSF5.js} +4 -4
  203. package/dist/cli/chunks/{gnn-wrapper-KWZOWBYS.js → gnn-wrapper-PYOQZKX6.js} +2 -2
  204. package/dist/cli/chunks/{heartbeat-handler-3AGYHVG2.js → heartbeat-handler-HLO5XCG7.js} +4 -4
  205. package/dist/cli/chunks/heartbeat-scheduler-OSDPJT6A.js +2 -0
  206. package/dist/cli/chunks/hnsw-adapter-KMGSHBIN.js +2 -0
  207. package/dist/cli/chunks/hnsw-index-IMFRAOPE.js +2 -0
  208. package/dist/cli/chunks/{hnsw-legacy-bridge-6OJJDZHL.js → hnsw-legacy-bridge-FZEH2KLM.js} +2 -2
  209. package/dist/cli/chunks/{better-sqlite3-URULPKRF.js → hnswlib-node-VS6L5VUG.js} +2 -2
  210. package/dist/cli/chunks/{hooks-OXEBTLXV.js → hooks-R2757K57.js} +48 -52
  211. package/dist/cli/chunks/hybrid-router-57QSWSWC.js +2 -0
  212. package/dist/cli/chunks/{hypergraph-engine-NL74PRHD.js → hypergraph-engine-EAV3GJ5D.js} +2 -2
  213. package/dist/cli/chunks/{hypergraph-handler-KZ54AEEL.js → hypergraph-handler-5ERXAVGH.js} +3 -3
  214. package/dist/cli/chunks/impact-analyzer-OC4MPBGA.js +2 -0
  215. package/dist/cli/chunks/{init-handler-XKZXRXPG.js → init-handler-RXUSEMG7.js} +6 -6
  216. package/dist/cli/chunks/init-wizard-CDBRL4PO.js +2 -0
  217. package/dist/cli/chunks/kernel-CQ7R3AAV.js +2 -0
  218. package/dist/cli/chunks/{kilocode-installer-WISQMJK7.js → kilocode-installer-ZUBVBHGT.js} +2 -2
  219. package/dist/cli/chunks/{kiro-installer-O7TBB3GM.js → kiro-installer-TRTRQDGL.js} +2 -2
  220. package/dist/cli/chunks/knowledge-graph-UXNH7RY4.js +2 -0
  221. package/dist/cli/chunks/{learning-6IZBGVRU.js → learning-UYXWAU5D.js} +3 -3
  222. package/dist/cli/chunks/{llm-router-QDMQPPQ7.js → llm-router-TB5OJPEV.js} +4 -4
  223. package/dist/cli/chunks/llm-router-service-UV34YXBE.js +2 -0
  224. package/dist/cli/chunks/{load-KLAJJGL5.js → load-ELPSUIPV.js} +2 -2
  225. package/dist/cli/chunks/load-test-2VEN3PQZ.js +2 -0
  226. package/dist/cli/chunks/{mcp-SZOPQZIZ.js → mcp-UX7TK3XV.js} +2 -2
  227. package/dist/cli/chunks/{memory-G3WY74C6.js → memory-W3LG6H6N.js} +5 -5
  228. package/dist/cli/chunks/memory-backend-TZL5U6F3.js +2 -0
  229. package/dist/cli/chunks/memory-handlers-BNXAYS2P.js +2 -0
  230. package/dist/cli/chunks/{multi-model-executor-TDNQGTOT.js → multi-model-executor-227LWZRY.js} +2 -2
  231. package/dist/cli/chunks/{opencode-installer-NGYGEDMV.js → opencode-installer-F4WKVWDL.js} +2 -2
  232. package/dist/cli/chunks/{orchestrator-KPI5DY2C.js → orchestrator-V4DBMGK6.js} +5 -5
  233. package/dist/cli/chunks/pattern-null-store-KLX2RNHM.js +2 -0
  234. package/dist/cli/chunks/pattern-usage-recorder-BY3HEWSU.js +2 -0
  235. package/dist/cli/chunks/{pipeline-CSDCC675.js → pipeline-3F5RIESX.js} +2 -2
  236. package/dist/cli/chunks/{platform-Q5XKEVKH.js → platform-KCGXTZO3.js} +2 -2
  237. package/dist/cli/chunks/{plugin-XKKR3GVL.js → plugin-2H552KOV.js} +2 -2
  238. package/dist/cli/chunks/{prime-radiant-advanced-wasm-22QVNKEN.js → prime-radiant-advanced-wasm-EFKVL7VN.js} +2 -2
  239. package/dist/cli/chunks/protocol-executor-5HJKW6MC.js +2 -0
  240. package/dist/cli/chunks/{protocol-handler-REQKTJGG.js → protocol-handler-ELGYV7D2.js} +2 -2
  241. package/dist/cli/chunks/{prove-NOFUFSQN.js → prove-AYJCQYNI.js} +2 -2
  242. package/dist/cli/chunks/provider-manager-TRZSBXD3.js +2 -0
  243. package/dist/cli/chunks/qe-reasoning-bank-RCEYSLVV.js +2 -0
  244. package/dist/cli/chunks/{quality-3DQ2H5TK.js → quality-HH7L5A7V.js} +2 -2
  245. package/dist/cli/chunks/quality-gate-NAQLXE4C.js +7 -0
  246. package/dist/cli/chunks/queen-coordinator-6JFZD54W.js +2 -0
  247. package/dist/cli/chunks/{real-embeddings-FCGNYWLL.js → real-embeddings-IO3F4ZFR.js} +2 -2
  248. package/dist/cli/chunks/{roocode-installer-HX3CNRIR.js → roocode-installer-X4TU5HO4.js} +2 -2
  249. package/dist/cli/chunks/router-KRLC46NS.js +2 -0
  250. package/dist/cli/chunks/routing-feedback-WW26H6SA.js +2 -0
  251. package/dist/cli/chunks/{routing-handler-YRZ2LDCR.js → routing-handler-ZJKGDDMT.js} +2 -2
  252. package/dist/cli/chunks/{ruvector-commands-GCQVBJ4E.js → ruvector-commands-NXCSUBN2.js} +2 -2
  253. package/dist/cli/chunks/{rvf-dual-writer-B562P3ZC.js → rvf-dual-writer-JMA74SKP.js} +2 -2
  254. package/dist/cli/chunks/{rvf-migration-adapter-NAGFKCMD.js → rvf-migration-adapter-BNTGH2KU.js} +2 -2
  255. package/dist/cli/chunks/{rvf-migration-coordinator-WWFBEJ5Q.js → rvf-migration-coordinator-7T2HHUOH.js} +2 -2
  256. package/dist/cli/chunks/rvf-native-adapter-OVQKPQUH.js +2 -0
  257. package/dist/cli/chunks/safe-db-UQOCQIH2.js +2 -0
  258. package/dist/cli/chunks/schedule-EUX7ZQUK.js +2 -0
  259. package/dist/cli/chunks/scheduler-MALHQKNR.js +2 -0
  260. package/dist/cli/chunks/{security-IFOYTD75.js → security-XSK2QHB3.js} +3 -3
  261. package/dist/cli/chunks/{shared-rvf-adapter-TYD5TQ35.js → shared-rvf-adapter-WLRKI7RY.js} +2 -2
  262. package/dist/cli/chunks/{shared-rvf-dual-writer-YGOOVDQZ.js → shared-rvf-dual-writer-SZW3J7ZK.js} +2 -2
  263. package/dist/cli/chunks/sqlite-persistence-OBCLRP4L.js +2 -0
  264. package/dist/cli/chunks/status-handler-HGCKYJX2.js +46 -0
  265. package/dist/cli/chunks/{structural-health-KZI6YMKV.js → structural-health-4SJCFX63.js} +2 -2
  266. package/dist/cli/chunks/{sync-Z5BDDBMK.js → sync-7WAVNZGL.js} +2 -2
  267. package/dist/cli/chunks/{sync-ABZNNYRC.js → sync-ATR4DUSA.js} +2 -2
  268. package/dist/cli/chunks/{task-handler-5ACZEPJ7.js → task-handler-O6REL34Y.js} +2 -2
  269. package/dist/cli/chunks/{task-handlers-UZWDPL6A.js → task-handlers-WFV2ZYWW.js} +3 -3
  270. package/dist/cli/chunks/{test-APO3MCVV.js → test-4LXUVHEU.js} +4 -4
  271. package/dist/cli/chunks/{test-scheduling-EFZA5G5C.js → test-scheduling-OTN3DMKY.js} +3 -3
  272. package/dist/cli/chunks/{token-bootstrap-J2OPLNUK.js → token-bootstrap-VA7T4P42.js} +2 -2
  273. package/dist/cli/chunks/{token-usage-VHWVNN4R.js → token-usage-TLT6OXXR.js} +2 -2
  274. package/dist/cli/chunks/{transformers-PX4HPO75.js → transformers-JI7LZRQ3.js} +2 -2
  275. package/dist/cli/chunks/{tree-sitter-wasm-parser-44HA2Z3F.js → tree-sitter-wasm-parser-QNIMHB4K.js} +2 -2
  276. package/dist/cli/chunks/{types-IMOP7F4R.js → types-DJNWOAC6.js} +2 -2
  277. package/dist/cli/chunks/unified-memory-A5BS3LGX.js +2 -0
  278. package/dist/cli/chunks/unified-memory-hnsw-WJLJO5MY.js +2 -0
  279. package/dist/cli/chunks/unified-persistence-CFC2BKI5.js +2 -0
  280. package/dist/cli/chunks/{upgrade-OZ3O6ZZI.js → upgrade-VEW4FL23.js} +2 -2
  281. package/dist/cli/chunks/{validate-DRY5BMWX.js → validate-O3P6PF7B.js} +2 -2
  282. package/dist/cli/chunks/{validate-swarm-QD3LYPUF.js → validate-swarm-M2HXHZVC.js} +2 -2
  283. package/dist/cli/chunks/{vibium-2J3H2ITD.js → vibium-GOU55LUO.js} +2 -2
  284. package/dist/cli/chunks/visual-security-VPB6KVYJ.js +2 -0
  285. package/dist/cli/chunks/{web-tree-sitter-KRNUOGKI.js → web-tree-sitter-MXOI4GH3.js} +2 -2
  286. package/dist/cli/chunks/{windsurf-installer-PQIPH3WP.js → windsurf-installer-6GKT53IH.js} +2 -2
  287. package/dist/cli/chunks/{witness-chain-HPLOYPS7.js → witness-chain-OXGQGL26.js} +2 -2
  288. package/dist/cli/chunks/witness-chain-ZZAUAXDY.js +2 -0
  289. package/dist/cli/chunks/witness-key-manager-PGFSQXUJ.js +2 -0
  290. package/dist/cli/chunks/{workflow-OAQ3FWCY.js → workflow-ENBWRMBA.js} +4 -4
  291. package/dist/cli/chunks/workflow-orchestrator-S4LBFTYD.js +2 -0
  292. package/dist/cli/chunks/{wrappers-UPIU6S5S.js → wrappers-MHLNYANQ.js} +2 -2
  293. package/dist/cli/commands/audit.d.ts +12 -0
  294. package/dist/cli/commands/audit.js +64 -4
  295. package/dist/cli/commands/hooks-handlers/hooks-dream-learning.js +45 -19
  296. package/dist/cli/commands/hooks-handlers/hooks-shared.d.ts +13 -0
  297. package/dist/cli/commands/hooks-handlers/hooks-shared.js +38 -0
  298. package/dist/cli/commands/hooks-handlers/task-hooks.js +19 -1
  299. package/dist/cli/commands/quality-gate.d.ts +24 -0
  300. package/dist/cli/commands/quality-gate.js +135 -0
  301. package/dist/cli/handlers/status-handler.d.ts +18 -0
  302. package/dist/cli/handlers/status-handler.js +47 -0
  303. package/dist/cli/index.js +5 -0
  304. package/dist/coordination/mincut/dream-integration.d.ts +11 -0
  305. package/dist/coordination/mincut/dream-integration.js +39 -12
  306. package/dist/coordination/mincut/queen-integration.js +24 -7
  307. package/dist/coordination/protocol-executor.js +2 -1
  308. package/dist/coordination/queen-lifecycle.js +4 -1
  309. package/dist/domains/code-intelligence/coordinator.js +10 -6
  310. package/dist/domains/code-intelligence/services/product-factors-bridge.js +3 -1
  311. package/dist/domains/defect-intelligence/services/defect-predictor.d.ts +6 -0
  312. package/dist/domains/defect-intelligence/services/defect-predictor.js +21 -0
  313. package/dist/domains/learning-optimization/interfaces.d.ts +7 -0
  314. package/dist/domains/learning-optimization/plugin.js +5 -0
  315. package/dist/domains/learning-optimization/services/learning-coordinator.d.ts +10 -0
  316. package/dist/domains/learning-optimization/services/learning-coordinator.js +57 -0
  317. package/dist/domains/test-execution/plugin.js +2 -2
  318. package/dist/domains/test-execution/services/flaky-detector.js +1 -1
  319. package/dist/domains/test-generation/coordinator.js +22 -8
  320. package/dist/domains/test-generation/interfaces.d.ts +3 -0
  321. package/dist/domains/test-generation/services/test-generator.js +9 -1
  322. package/dist/integrations/ruvector/delta-tracker.js +10 -1
  323. package/dist/integrations/ruvector/feature-flags.js +7 -0
  324. package/dist/integrations/ruvector/sona-persistence.d.ts +24 -0
  325. package/dist/integrations/ruvector/sona-persistence.js +76 -0
  326. package/dist/integrations/ruvector/sona-three-loop.d.ts +15 -0
  327. package/dist/integrations/ruvector/sona-three-loop.js +17 -0
  328. package/dist/kernel/unified-memory-schemas.d.ts +2 -2
  329. package/dist/kernel/unified-memory-schemas.js +48 -2
  330. package/dist/kernel/unified-memory.d.ts +22 -0
  331. package/dist/kernel/unified-memory.js +43 -0
  332. package/dist/learning/aqe-learning-engine.js +3 -1
  333. package/dist/learning/dream/concept-graph.d.ts +31 -1
  334. package/dist/learning/dream/concept-graph.js +109 -3
  335. package/dist/learning/dream/dream-engine.d.ts +13 -1
  336. package/dist/learning/dream/dream-engine.js +146 -10
  337. package/dist/learning/dream/index.d.ts +1 -1
  338. package/dist/learning/dream/types.d.ts +23 -0
  339. package/dist/learning/pattern-lifecycle.d.ts +16 -0
  340. package/dist/learning/pattern-lifecycle.js +77 -1
  341. package/dist/learning/pattern-store.d.ts +2 -2
  342. package/dist/learning/pattern-store.js +14 -3
  343. package/dist/learning/provenance-tier.d.ts +52 -0
  344. package/dist/learning/provenance-tier.js +64 -0
  345. package/dist/learning/qe-flywheel/corpus-scorer.d.ts +55 -0
  346. package/dist/learning/qe-flywheel/corpus-scorer.js +293 -0
  347. package/dist/learning/qe-flywheel/coupled-anchor.d.ts +91 -0
  348. package/dist/learning/qe-flywheel/coupled-anchor.js +181 -0
  349. package/dist/learning/qe-flywheel/generation.d.ts +121 -0
  350. package/dist/learning/qe-flywheel/generation.js +167 -0
  351. package/dist/learning/qe-flywheel/policy.d.ts +37 -0
  352. package/dist/learning/qe-flywheel/policy.js +66 -0
  353. package/dist/learning/qe-flywheel/receipt-store.d.ts +31 -0
  354. package/dist/learning/qe-flywheel/receipt-store.js +89 -0
  355. package/dist/learning/qe-flywheel/receipt.d.ts +62 -0
  356. package/dist/learning/qe-flywheel/receipt.js +97 -0
  357. package/dist/learning/qe-reasoning-bank.js +34 -31
  358. package/dist/learning/routing-topology-gate.d.ts +12 -2
  359. package/dist/learning/routing-topology-gate.js +15 -3
  360. package/dist/learning/rvf-pattern-store.d.ts +1 -1
  361. package/dist/learning/rvf-pattern-store.js +21 -8
  362. package/dist/learning/sqlite-persistence.js +12 -9
  363. package/dist/mcp/bundle.js +540 -460
  364. package/dist/mcp/qe-tool-bridge.js +7 -2
  365. package/dist/mcp/tools/base.d.ts +29 -0
  366. package/dist/mcp/tools/base.js +25 -0
  367. package/dist/mcp/tools/coverage-analysis/index.js +6 -4
  368. package/dist/mcp/tools/learning-optimization/dream.d.ts +4 -13
  369. package/dist/mcp/tools/learning-optimization/dream.js +10 -96
  370. package/dist/mcp/tools/planning/goap-execute.d.ts +13 -1
  371. package/dist/mcp/tools/planning/goap-execute.js +33 -18
  372. package/dist/mcp/tools/quality-assessment/gate.d.ts +38 -0
  373. package/dist/mcp/tools/quality-assessment/gate.js +86 -0
  374. package/dist/mcp/tools/registry.d.ts +1 -0
  375. package/dist/mcp/tools/registry.js +10 -2
  376. package/dist/persistence/rvf-migration-coordinator.js +2 -1
  377. package/dist/planning/actions/qe-action-library.js +124 -1
  378. package/dist/planning/goap-planner.d.ts +14 -2
  379. package/dist/planning/goap-planner.js +51 -9
  380. package/dist/planning/index.d.ts +1 -1
  381. package/dist/planning/plan-executor.d.ts +84 -4
  382. package/dist/planning/plan-executor.js +221 -56
  383. package/dist/planning/types.d.ts +27 -0
  384. package/dist/shared/events/domain-events.d.ts +2 -0
  385. package/dist/shared/safe-db.js +23 -4
  386. package/dist/validation/anchor-set.d.ts +74 -0
  387. package/dist/validation/anchor-set.js +78 -0
  388. package/dist/validation/frontier-judge.d.ts +99 -0
  389. package/dist/validation/frontier-judge.js +234 -0
  390. package/dist/validation/gate-reexecute.d.ts +165 -0
  391. package/dist/validation/gate-reexecute.js +255 -0
  392. package/dist/validation/quality-gate-runner.d.ts +49 -0
  393. package/dist/validation/quality-gate-runner.js +62 -0
  394. package/dist/validation/quality-verdict.d.ts +94 -0
  395. package/dist/validation/quality-verdict.js +120 -0
  396. package/dist/workers/workers/learning-consolidation.js +21 -1
  397. package/package.json +1 -1
  398. package/dist/cli/chunks/adapter-2HMUXHWY.js +0 -2
  399. package/dist/cli/chunks/aqe-learning-engine-M2NKRVRE.js +0 -2
  400. package/dist/cli/chunks/audit-EPB7ETMT.js +0 -3
  401. package/dist/cli/chunks/base-CCHC2DAC.js +0 -2
  402. package/dist/cli/chunks/brain-handler-FBMYEERK.js +0 -89
  403. package/dist/cli/chunks/browser-workflow-4DGHFYY3.js +0 -2
  404. package/dist/cli/chunks/chunk-37ZDGJ3H.js +0 -2
  405. package/dist/cli/chunks/chunk-5AQ7FXYG.js +0 -27
  406. package/dist/cli/chunks/chunk-KYTFIP6R.js +0 -2
  407. package/dist/cli/chunks/chunk-MYMIEQSZ.js +0 -65
  408. package/dist/cli/chunks/chunk-RCPD6F4R.js +0 -2
  409. package/dist/cli/chunks/chunk-TCWR6TDN.js +0 -2
  410. package/dist/cli/chunks/chunk-UQ72K44T.js +0 -149
  411. package/dist/cli/chunks/chunk-XXRTWG7O.js +0 -2
  412. package/dist/cli/chunks/chunk-ZSA6V5FH.js +0 -2
  413. package/dist/cli/chunks/client-2OVEDWGU.js +0 -2
  414. package/dist/cli/chunks/core-handlers-UXRRYP52.js +0 -2
  415. package/dist/cli/chunks/cross-domain-router-PV3VQVLO.js +0 -2
  416. package/dist/cli/chunks/daemon-ESUEM6VB.js +0 -10
  417. package/dist/cli/chunks/domain-transfer-TQYO3SVG.js +0 -2
  418. package/dist/cli/chunks/dream-UFUXVJQC.js +0 -2
  419. package/dist/cli/chunks/heartbeat-scheduler-MBG3SARO.js +0 -2
  420. package/dist/cli/chunks/hnsw-adapter-5HXA3QB3.js +0 -2
  421. package/dist/cli/chunks/hnsw-index-PZRQWBRG.js +0 -2
  422. package/dist/cli/chunks/hybrid-router-NQRIE2GG.js +0 -2
  423. package/dist/cli/chunks/impact-analyzer-46347ZDV.js +0 -2
  424. package/dist/cli/chunks/init-wizard-CJYP4WKO.js +0 -2
  425. package/dist/cli/chunks/kernel-22KQZ56U.js +0 -2
  426. package/dist/cli/chunks/knowledge-graph-KM3JDBGR.js +0 -2
  427. package/dist/cli/chunks/llm-router-service-IFO6GRRO.js +0 -2
  428. package/dist/cli/chunks/load-test-TTKCYAPB.js +0 -2
  429. package/dist/cli/chunks/memory-backend-ELHCX2ZT.js +0 -2
  430. package/dist/cli/chunks/memory-handlers-3SKYQZTL.js +0 -2
  431. package/dist/cli/chunks/pattern-null-store-TMXAYD43.js +0 -2
  432. package/dist/cli/chunks/protocol-executor-BPLR5EJC.js +0 -2
  433. package/dist/cli/chunks/provider-manager-4MMD5QKL.js +0 -2
  434. package/dist/cli/chunks/qe-reasoning-bank-P7KNT3WZ.js +0 -2
  435. package/dist/cli/chunks/queen-coordinator-NBZZ4MGC.js +0 -2
  436. package/dist/cli/chunks/router-2RXR6J2Q.js +0 -2
  437. package/dist/cli/chunks/routing-feedback-AVAA76TK.js +0 -2
  438. package/dist/cli/chunks/rvf-native-adapter-X2YDJA55.js +0 -2
  439. package/dist/cli/chunks/safe-db-4PRU65BK.js +0 -2
  440. package/dist/cli/chunks/schedule-2AST5CHW.js +0 -2
  441. package/dist/cli/chunks/scheduler-SW6II7OU.js +0 -2
  442. package/dist/cli/chunks/sqlite-persistence-OB5NEGAK.js +0 -2
  443. package/dist/cli/chunks/status-handler-HFPWSCBY.js +0 -45
  444. package/dist/cli/chunks/unified-memory-X7OJYGSD.js +0 -2
  445. package/dist/cli/chunks/unified-memory-hnsw-O6HOD5YL.js +0 -2
  446. package/dist/cli/chunks/unified-persistence-C332CER2.js +0 -2
  447. package/dist/cli/chunks/visual-security-MPUG5HPI.js +0 -2
  448. package/dist/cli/chunks/witness-chain-Q4BZHPDF.js +0 -2
  449. package/dist/cli/chunks/workflow-orchestrator-4NDWECYK.js +0 -2
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Frozen oracle-grade QE anchor set (ADR-117).
3
+ *
4
+ * A small, human-labeled, content-hash-pinned, constant-denominator eval set
5
+ * that promotion gates (ADR-118 accept(), ADR-120 re-executed gates) must
6
+ * evaluate and never regress against. The loader recomputes the content hash on
7
+ * load and THROWS on drift — a frozen anchor the optimizer can silently edit is
8
+ * not frozen. Mirrors ruflo `harness-frozen-eval` + retort's constant-denominator
9
+ * `REQUIREMENTS.json`.
10
+ *
11
+ * Each item is a test-generation task graded by the ADR-113 oracle
12
+ * (`evaluateOracle`): the policy produces a test for `referenceImpl`, and the
13
+ * mutation kill rate is the score. `requirements` is the pinned checklist (the
14
+ * constant denominator) the ADR-119 judge grades against.
15
+ */
16
+ export interface AnchorItem {
17
+ /** Stable item id (e.g. "A1-inRange"). */
18
+ id: string;
19
+ /** Human-readable spec the test-gen policy is asked to produce a test for. */
20
+ inputUnderTest: string;
21
+ /** Base module name (no extension) for the reference impl. */
22
+ moduleName: string;
23
+ /** ESM source of the correct implementation. */
24
+ referenceImpl: string;
25
+ /** Pinned checklist of requirements — the CONSTANT denominator (frozen count). */
26
+ requirements: string[];
27
+ /** Ground-truth mutant count a correct test must kill (measured via the oracle at freeze time). */
28
+ expectedMutants: number;
29
+ }
30
+ export interface AnchorPassBar {
31
+ /** Minimum mutation kill rate for an item to pass (ADR-117 "High" bar = 0.8). */
32
+ mutationThreshold: number;
33
+ /** Required checklist coverage for the ADR-119 judge (pass only at 1.0). */
34
+ checklistCoverage: number;
35
+ }
36
+ export interface AnchorSet {
37
+ schemaVersion: number;
38
+ /** The frozen quality bar. */
39
+ passBar: AnchorPassBar;
40
+ /** No-regression tolerance: a promotion may not drop the anchor mean by more than this. */
41
+ anchorTol: number;
42
+ /** SHA-256 over the canonicalized items — recomputed and checked on load. */
43
+ contentHash: string;
44
+ items: AnchorItem[];
45
+ }
46
+ /**
47
+ * Deterministic canonical form of the items for hashing: items sorted by id,
48
+ * object keys sorted, no incidental whitespace. Independent of file formatting
49
+ * and key order so a semantically-identical file hashes identically.
50
+ */
51
+ export declare function canonicalizeItems(items: AnchorItem[]): string;
52
+ /** SHA-256 content hash over the canonicalized items. */
53
+ export declare function computeContentHash(items: AnchorItem[]): string;
54
+ /**
55
+ * Load a frozen anchor set, refusing to return if the recorded hash does not
56
+ * match the recomputed one (ADR-117 §2). No promotion path may read the anchor
57
+ * except through this loader.
58
+ */
59
+ export declare function loadAnchorSet(path: string): AnchorSet;
60
+ /** The score of one anchor item = its oracle mutation kill rate. */
61
+ export declare function anchorItemScore(oracleResult: {
62
+ mutationScore: number;
63
+ }): number;
64
+ /**
65
+ * The anchor mean: Σ score / N with N constant (the constant-denominator
66
+ * property — comparable across runs and generations).
67
+ */
68
+ export declare function anchorMean(scores: number[]): number;
69
+ /**
70
+ * No-regression contract (ADR-117 §4, ADR-118 accept(), ADR-120 re-exec).
71
+ * A candidate policy may not drop the anchor mean below baseline − tol.
72
+ */
73
+ export declare function meetsNoRegression(candidateMean: number, baselineMean: number, tol: number): boolean;
74
+ //# sourceMappingURL=anchor-set.d.ts.map
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Frozen oracle-grade QE anchor set (ADR-117).
3
+ *
4
+ * A small, human-labeled, content-hash-pinned, constant-denominator eval set
5
+ * that promotion gates (ADR-118 accept(), ADR-120 re-executed gates) must
6
+ * evaluate and never regress against. The loader recomputes the content hash on
7
+ * load and THROWS on drift — a frozen anchor the optimizer can silently edit is
8
+ * not frozen. Mirrors ruflo `harness-frozen-eval` + retort's constant-denominator
9
+ * `REQUIREMENTS.json`.
10
+ *
11
+ * Each item is a test-generation task graded by the ADR-113 oracle
12
+ * (`evaluateOracle`): the policy produces a test for `referenceImpl`, and the
13
+ * mutation kill rate is the score. `requirements` is the pinned checklist (the
14
+ * constant denominator) the ADR-119 judge grades against.
15
+ */
16
+ import { createHash } from 'node:crypto';
17
+ import fs from 'node:fs';
18
+ /**
19
+ * Deterministic canonical form of the items for hashing: items sorted by id,
20
+ * object keys sorted, no incidental whitespace. Independent of file formatting
21
+ * and key order so a semantically-identical file hashes identically.
22
+ */
23
+ export function canonicalizeItems(items) {
24
+ const norm = [...items]
25
+ .sort((a, b) => a.id.localeCompare(b.id))
26
+ .map((it) => ({
27
+ id: it.id,
28
+ inputUnderTest: it.inputUnderTest,
29
+ moduleName: it.moduleName,
30
+ referenceImpl: it.referenceImpl,
31
+ requirements: it.requirements,
32
+ expectedMutants: it.expectedMutants,
33
+ }));
34
+ return JSON.stringify(norm);
35
+ }
36
+ /** SHA-256 content hash over the canonicalized items. */
37
+ export function computeContentHash(items) {
38
+ return createHash('sha256').update(canonicalizeItems(items)).digest('hex');
39
+ }
40
+ /**
41
+ * Load a frozen anchor set, refusing to return if the recorded hash does not
42
+ * match the recomputed one (ADR-117 §2). No promotion path may read the anchor
43
+ * except through this loader.
44
+ */
45
+ export function loadAnchorSet(path) {
46
+ const raw = JSON.parse(fs.readFileSync(path, 'utf8'));
47
+ const recomputed = computeContentHash(raw.items);
48
+ if (recomputed !== raw.contentHash) {
49
+ throw new Error(`Anchor set hash drift at ${path}: recorded ${raw.contentHash}, `
50
+ + `recomputed ${recomputed}. Refusing to load a mutated frozen anchor (ADR-117). `
51
+ + `A legitimate change must be a versioned re-freeze (qe-anchor-v2), never an in-place edit.`);
52
+ }
53
+ if (raw.items.length === 0) {
54
+ throw new Error(`Anchor set at ${path} has no items — a frozen anchor must be non-empty.`);
55
+ }
56
+ return raw;
57
+ }
58
+ /** The score of one anchor item = its oracle mutation kill rate. */
59
+ export function anchorItemScore(oracleResult) {
60
+ return oracleResult.mutationScore;
61
+ }
62
+ /**
63
+ * The anchor mean: Σ score / N with N constant (the constant-denominator
64
+ * property — comparable across runs and generations).
65
+ */
66
+ export function anchorMean(scores) {
67
+ if (scores.length === 0)
68
+ return 0;
69
+ return scores.reduce((a, b) => a + b, 0) / scores.length;
70
+ }
71
+ /**
72
+ * No-regression contract (ADR-117 §4, ADR-118 accept(), ADR-120 re-exec).
73
+ * A candidate policy may not drop the anchor mean below baseline − tol.
74
+ */
75
+ export function meetsNoRegression(candidateMean, baselineMean, tol) {
76
+ return candidateMean >= baselineMean - tol;
77
+ }
78
+ //# sourceMappingURL=anchor-set.js.map
@@ -0,0 +1,99 @@
1
+ /**
2
+ * Frontier-tier spec judge for the ADR-119 two-gate quality verdict.
3
+ *
4
+ * This is the real spec-gate `Judge` consumed by `computeQualityVerdict`
5
+ * (quality-verdict.ts). It grades an artifact against a pinned,
6
+ * constant-denominator ADR-117 checklist using a FRONTIER model — never the
7
+ * cheap local writer lane (ADR-111: the oracle is the one place you never
8
+ * economize). Two design guarantees flow from the verdict logic:
9
+ *
10
+ * - `preflight()` does a cheap live round-trip to prove the provider and
11
+ * credentials actually respond. On any failure it returns `false`, which the
12
+ * verdict maps to `inconclusive` — a dead provider can never masquerade as a
13
+ * silent pass.
14
+ * - `grade()` returns `ran: false` on ANY tooling failure (timeout,
15
+ * usage-limit, unparseable response). A non-real opinion can never
16
+ * contribute to a `fail`; too few real opinions ⇒ `inconclusive`.
17
+ *
18
+ * The single provider call is isolated behind an injectable `complete(prompt)`
19
+ * seam so the judge is unit-testable with a fake and zero network. Wire the real
20
+ * frontier model with `routerComplete()` / `createRouterFrontierJudge()`.
21
+ */
22
+ import type { Judge, RequirementChecklist } from './quality-verdict.js';
23
+ import type { HybridRouter } from '../shared/llm/router/hybrid-router.js';
24
+ import type { ExtendedProviderType } from '../shared/llm/router/types.js';
25
+ /** The model call seam. Returns the raw model text for one prompt. */
26
+ export type CompleteFn = (prompt: string) => Promise<string>;
27
+ export interface FrontierJudgeOptions {
28
+ /**
29
+ * Injectable frontier-model call. In production this is `routerComplete()`
30
+ * bound to a frontier model; in tests it is a fake — NO network either way.
31
+ */
32
+ complete: CompleteFn;
33
+ /**
34
+ * Cheap liveness ping used by `preflight()`. Defaults to a minimal
35
+ * `complete()` round-trip. Should resolve truthy only when the provider and
36
+ * credentials actually respond.
37
+ */
38
+ ping?: () => Promise<boolean>;
39
+ /** Frontier model id, for reporting/telemetry only (the seam owns the call). */
40
+ model?: string;
41
+ /** Per-call timeout in ms (grade + default ping). Default 60s. */
42
+ timeoutMs?: number;
43
+ /** Optional diagnostic logger. */
44
+ logger?: (message: string) => void;
45
+ }
46
+ /**
47
+ * Create the ADR-119 frontier spec judge.
48
+ *
49
+ * The returned object satisfies the `Judge` contract consumed by
50
+ * `computeQualityVerdict`. All provider interaction is behind `opts.complete`.
51
+ */
52
+ export declare function createFrontierJudge(opts: FrontierJudgeOptions): Judge;
53
+ /**
54
+ * Build a `complete()` seam backed by the shared HybridRouter, pinned to a
55
+ * frontier model. This is where the ADR-111 "never economize the oracle" rule is
56
+ * enforced: `model` defaults to a frontier Opus and `preferredProvider` lets the
57
+ * caller route to a frontier provider explicitly.
58
+ */
59
+ export declare function routerComplete(router: HybridRouter, opts?: {
60
+ model?: string;
61
+ preferredProvider?: ExtendedProviderType;
62
+ temperature?: number;
63
+ maxTokens?: number;
64
+ timeoutMs?: number;
65
+ }): CompleteFn;
66
+ /**
67
+ * Convenience: a frontier judge wired to the shared HybridRouter. The judge is
68
+ * ALWAYS frontier-tier — `model` defaults to a frontier Opus.
69
+ */
70
+ export declare function createRouterFrontierJudge(router: HybridRouter, opts?: {
71
+ model?: string;
72
+ preferredProvider?: ExtendedProviderType;
73
+ temperature?: number;
74
+ maxTokens?: number;
75
+ timeoutMs?: number;
76
+ logger?: (message: string) => void;
77
+ }): Judge;
78
+ /**
79
+ * A judge for when no frontier provider is available (no LLM router / no
80
+ * credentials). `preflight()` returns false so the verdict is `inconclusive` —
81
+ * NEVER a silent pass. Both CLI and MCP use this fallback so they stay in parity.
82
+ */
83
+ export declare function createUnavailableJudge(_reason: string): Judge;
84
+ /**
85
+ * Build the grading prompt. Requirements are numbered 1..N and the model is
86
+ * asked for the numbers of the UNMET ones as strict JSON. Reporting unmet (not
87
+ * satisfied) keeps the denominator constant and the contract unambiguous.
88
+ */
89
+ export declare function buildGradePrompt(artifact: string, checklist: RequirementChecklist): string;
90
+ /**
91
+ * Parse the model response into a set of 0-based unmet requirement indices.
92
+ * Returns `null` when the response cannot be parsed into the strict contract
93
+ * (so the caller treats it as a non-real opinion). Out-of-range and duplicate
94
+ * numbers are ignored — a garbled index list never inflates the unmet count.
95
+ */
96
+ export declare function parseUnmetIndices(raw: string, total: number): Set<number> | null;
97
+ /** Reject with a timeout error if `p` does not settle within `ms`. */
98
+ export declare function withTimeout<T>(p: Promise<T>, ms: number, label: string): Promise<T>;
99
+ //# sourceMappingURL=frontier-judge.d.ts.map
@@ -0,0 +1,234 @@
1
+ /**
2
+ * Frontier-tier spec judge for the ADR-119 two-gate quality verdict.
3
+ *
4
+ * This is the real spec-gate `Judge` consumed by `computeQualityVerdict`
5
+ * (quality-verdict.ts). It grades an artifact against a pinned,
6
+ * constant-denominator ADR-117 checklist using a FRONTIER model — never the
7
+ * cheap local writer lane (ADR-111: the oracle is the one place you never
8
+ * economize). Two design guarantees flow from the verdict logic:
9
+ *
10
+ * - `preflight()` does a cheap live round-trip to prove the provider and
11
+ * credentials actually respond. On any failure it returns `false`, which the
12
+ * verdict maps to `inconclusive` — a dead provider can never masquerade as a
13
+ * silent pass.
14
+ * - `grade()` returns `ran: false` on ANY tooling failure (timeout,
15
+ * usage-limit, unparseable response). A non-real opinion can never
16
+ * contribute to a `fail`; too few real opinions ⇒ `inconclusive`.
17
+ *
18
+ * The single provider call is isolated behind an injectable `complete(prompt)`
19
+ * seam so the judge is unit-testable with a fake and zero network. Wire the real
20
+ * frontier model with `routerComplete()` / `createRouterFrontierJudge()`.
21
+ */
22
+ import { DEFAULT_OPUS_MODEL } from '../shared/llm/model-registry.js';
23
+ const DEFAULT_TIMEOUT_MS = 60_000;
24
+ const DEFAULT_PING_TIMEOUT_MS = 15_000;
25
+ /**
26
+ * Create the ADR-119 frontier spec judge.
27
+ *
28
+ * The returned object satisfies the `Judge` contract consumed by
29
+ * `computeQualityVerdict`. All provider interaction is behind `opts.complete`.
30
+ */
31
+ export function createFrontierJudge(opts) {
32
+ const timeoutMs = opts.timeoutMs ?? DEFAULT_TIMEOUT_MS;
33
+ const log = opts.logger ?? (() => { });
34
+ const model = opts.model ?? 'frontier';
35
+ const ping = opts.ping ??
36
+ (async () => {
37
+ const text = await withTimeout(opts.complete('Reply with exactly: OK'), Math.min(DEFAULT_PING_TIMEOUT_MS, timeoutMs), 'judge preflight ping');
38
+ return typeof text === 'string' && text.trim().length > 0;
39
+ });
40
+ return {
41
+ async preflight() {
42
+ try {
43
+ const ok = await ping();
44
+ if (!ok)
45
+ log(`frontier-judge preflight: provider (${model}) returned empty — not ready`);
46
+ return ok;
47
+ }
48
+ catch (err) {
49
+ // A dead/unauthenticated provider MUST NOT read as "ready" — that is
50
+ // exactly how an infra hiccup would masquerade as a silent pass.
51
+ log(`frontier-judge preflight failed (${model}): ${errText(err)}`);
52
+ return false;
53
+ }
54
+ },
55
+ async grade(artifact, checklist) {
56
+ const total = checklist.requirements.length;
57
+ try {
58
+ const prompt = buildGradePrompt(artifact, checklist);
59
+ const raw = await withTimeout(opts.complete(prompt), timeoutMs, 'judge grade');
60
+ const unmetIdx = parseUnmetIndices(raw, total);
61
+ if (unmetIdx == null) {
62
+ // Unparseable — a real model ran but we cannot trust the grade, so it
63
+ // is NOT a real opinion (cannot contribute to a fail).
64
+ log(`frontier-judge grade: could not parse response for ${checklist.id}`);
65
+ return { ran: false, coverage: 0, unmet: [] };
66
+ }
67
+ const unmet = [...unmetIdx].sort((a, b) => a - b).map((i) => checklist.requirements[i]);
68
+ // Coverage over the CONSTANT denominator (ADR-117) — comparable across runs.
69
+ const coverage = (total - unmet.length) / total;
70
+ return { ran: true, coverage, unmet };
71
+ }
72
+ catch (err) {
73
+ // Timeout / usage-limit / network — not a real opinion.
74
+ log(`frontier-judge grade failed for ${checklist.id} (${model}): ${errText(err)}`);
75
+ return { ran: false, coverage: 0, unmet: [] };
76
+ }
77
+ },
78
+ };
79
+ }
80
+ /**
81
+ * Build a `complete()` seam backed by the shared HybridRouter, pinned to a
82
+ * frontier model. This is where the ADR-111 "never economize the oracle" rule is
83
+ * enforced: `model` defaults to a frontier Opus and `preferredProvider` lets the
84
+ * caller route to a frontier provider explicitly.
85
+ */
86
+ export function routerComplete(router, opts = {}) {
87
+ const model = opts.model ?? DEFAULT_OPUS_MODEL;
88
+ return async (prompt) => {
89
+ const res = await router.chat({
90
+ messages: [{ role: 'user', content: prompt }],
91
+ model,
92
+ preferredProvider: opts.preferredProvider,
93
+ temperature: opts.temperature ?? 0,
94
+ maxTokens: opts.maxTokens ?? 1024,
95
+ timeoutMs: opts.timeoutMs,
96
+ skipCache: true,
97
+ });
98
+ return res.content ?? '';
99
+ };
100
+ }
101
+ /**
102
+ * Convenience: a frontier judge wired to the shared HybridRouter. The judge is
103
+ * ALWAYS frontier-tier — `model` defaults to a frontier Opus.
104
+ */
105
+ export function createRouterFrontierJudge(router, opts = {}) {
106
+ const model = opts.model ?? DEFAULT_OPUS_MODEL;
107
+ return createFrontierJudge({
108
+ complete: routerComplete(router, { ...opts, model }),
109
+ model,
110
+ timeoutMs: opts.timeoutMs,
111
+ logger: opts.logger,
112
+ });
113
+ }
114
+ /**
115
+ * A judge for when no frontier provider is available (no LLM router / no
116
+ * credentials). `preflight()` returns false so the verdict is `inconclusive` —
117
+ * NEVER a silent pass. Both CLI and MCP use this fallback so they stay in parity.
118
+ */
119
+ export function createUnavailableJudge(_reason) {
120
+ return {
121
+ preflight: () => false,
122
+ grade: () => ({ ran: false, coverage: 0, unmet: [] }),
123
+ };
124
+ }
125
+ // ============================================================================
126
+ // Prompt + parsing
127
+ // ============================================================================
128
+ /**
129
+ * Build the grading prompt. Requirements are numbered 1..N and the model is
130
+ * asked for the numbers of the UNMET ones as strict JSON. Reporting unmet (not
131
+ * satisfied) keeps the denominator constant and the contract unambiguous.
132
+ */
133
+ export function buildGradePrompt(artifact, checklist) {
134
+ const numbered = checklist.requirements.map((r, i) => `${i + 1}. ${r}`).join('\n');
135
+ return [
136
+ 'You are a rigorous, frontier-tier quality oracle grading a software artifact',
137
+ 'against a FIXED requirement checklist. Judge only what the artifact actually',
138
+ 'verifies — do not give credit for requirements it merely mentions or leaves',
139
+ 'implicit. A requirement is "met" only if the artifact demonstrably covers it.',
140
+ '',
141
+ `Checklist id: ${checklist.id}`,
142
+ 'Requirements (the denominator is fixed — grade ALL of them):',
143
+ numbered,
144
+ '',
145
+ '--- ARTIFACT UNDER JUDGEMENT ---',
146
+ artifact,
147
+ '--- END ARTIFACT ---',
148
+ '',
149
+ 'Return ONLY a single JSON object, no prose, no markdown fences, of the form:',
150
+ '{"unmet": [<numbers of requirements NOT met>]}',
151
+ 'Use the requirement numbers above. If every requirement is met, return {"unmet": []}.',
152
+ ].join('\n');
153
+ }
154
+ /**
155
+ * Parse the model response into a set of 0-based unmet requirement indices.
156
+ * Returns `null` when the response cannot be parsed into the strict contract
157
+ * (so the caller treats it as a non-real opinion). Out-of-range and duplicate
158
+ * numbers are ignored — a garbled index list never inflates the unmet count.
159
+ */
160
+ export function parseUnmetIndices(raw, total) {
161
+ const obj = extractJsonObject(raw);
162
+ if (obj == null || !Array.isArray(obj.unmet)) {
163
+ return null;
164
+ }
165
+ const out = new Set();
166
+ for (const v of obj.unmet) {
167
+ const n = typeof v === 'number' ? v : typeof v === 'string' ? Number(v.trim()) : NaN;
168
+ if (!Number.isInteger(n))
169
+ continue;
170
+ const idx = n - 1; // 1-based prompt -> 0-based index
171
+ if (idx >= 0 && idx < total)
172
+ out.add(idx);
173
+ }
174
+ return out;
175
+ }
176
+ /** Extract the first balanced top-level JSON object from arbitrary model text. */
177
+ function extractJsonObject(raw) {
178
+ if (typeof raw !== 'string')
179
+ return null;
180
+ const start = raw.indexOf('{');
181
+ if (start === -1)
182
+ return null;
183
+ let depth = 0;
184
+ let inStr = false;
185
+ let esc = false;
186
+ for (let i = start; i < raw.length; i++) {
187
+ const ch = raw[i];
188
+ if (inStr) {
189
+ if (esc)
190
+ esc = false;
191
+ else if (ch === '\\')
192
+ esc = true;
193
+ else if (ch === '"')
194
+ inStr = false;
195
+ continue;
196
+ }
197
+ if (ch === '"')
198
+ inStr = true;
199
+ else if (ch === '{')
200
+ depth++;
201
+ else if (ch === '}') {
202
+ depth--;
203
+ if (depth === 0) {
204
+ try {
205
+ return JSON.parse(raw.slice(start, i + 1));
206
+ }
207
+ catch {
208
+ return null;
209
+ }
210
+ }
211
+ }
212
+ }
213
+ return null;
214
+ }
215
+ // ============================================================================
216
+ // Helpers
217
+ // ============================================================================
218
+ /** Reject with a timeout error if `p` does not settle within `ms`. */
219
+ export function withTimeout(p, ms, label) {
220
+ return new Promise((resolve, reject) => {
221
+ const timer = setTimeout(() => reject(new Error(`${label} timed out after ${ms}ms`)), ms);
222
+ p.then((v) => {
223
+ clearTimeout(timer);
224
+ resolve(v);
225
+ }, (e) => {
226
+ clearTimeout(timer);
227
+ reject(e);
228
+ });
229
+ });
230
+ }
231
+ function errText(err) {
232
+ return err instanceof Error ? err.message : String(err);
233
+ }
234
+ //# sourceMappingURL=frontier-judge.js.map
@@ -0,0 +1,165 @@
1
+ /**
2
+ * gateReExecutes — re-execute a frozen acceptance rule from sealed inputs
3
+ * on every promotion path (ADR-120).
4
+ *
5
+ * The July 2026 remediation exposed the A8-EXT fake-`applied`-counter: a
6
+ * promotion path that logged success without doing the work — a logged verdict
7
+ * that lied. The fix (from MetaHarness `verifyReplayBundle`): trust the re-run,
8
+ * not the log. At verification time, re-execute a VERSIONED FROZEN acceptance
9
+ * rule against the decision's SEALED inputs; a recorded PROMOTE the frozen rule
10
+ * would not grant is a forgery.
11
+ *
12
+ * Two checks, both required (mirrors MetaHarness `replay.ts:66-90`):
13
+ * - gateUnchanged — the recorded rule fingerprint matches the current rule
14
+ * version's fingerprint (a swapped rule is caught).
15
+ * - gateReExecutes — re-running the frozen rule on the sealed inputs
16
+ * reproduces the recorded verdict.
17
+ * Plus sealIntact (ADR-116 composition) — the sealed inputs were not mutated
18
+ * after the decision. Re-execution on tampered inputs is meaningless.
19
+ *
20
+ * The acceptance rule is a PURE function of sealed inputs. `accept/v1` composes
21
+ * the cluster: ADR-121 provenance tier gate + ADR-118 held-out-beats-baseline +
22
+ * ADR-117 anchor no-regression. Changing a rule is a new VERSION, never an
23
+ * in-place edit (which gateUnchanged flags).
24
+ */
25
+ /** The inputs a promotion decision was made on — sealed at decision time. */
26
+ export interface SealedInputs {
27
+ /** Candidate policy's held-out score (ADR-118). */
28
+ candidateHeldOut: number;
29
+ /** Baseline (current champion) held-out score. */
30
+ baselineHeldOut: number;
31
+ /** Candidate anchor mean (ADR-117). */
32
+ candidateAnchorMean: number;
33
+ /** Baseline anchor mean. */
34
+ baselineAnchorMean: number;
35
+ /** Content hash of the ADR-117 anchor used (which frozen anchor this was graded on). */
36
+ anchorHash: string;
37
+ /** No-regression tolerance the anchor was gated at. */
38
+ anchorTol: number;
39
+ /** ADR-121 evidence tier of the candidate. */
40
+ provenanceTier: string;
41
+ /** Whether judge-tier promotion was explicitly budgeted (ADR-121). */
42
+ allowJudgeTier?: boolean;
43
+ }
44
+ export interface RuleResult {
45
+ promote: boolean;
46
+ reason: string;
47
+ }
48
+ /** A versioned, frozen acceptance rule — a pure function of sealed inputs. */
49
+ export type AcceptanceRule = (sealed: SealedInputs) => RuleResult;
50
+ /** Registry of versioned frozen rules. Add a NEW key to change a rule; never edit in place. */
51
+ export declare const ACCEPTANCE_RULES: Readonly<Record<string, AcceptanceRule>>;
52
+ /** SHA-256 content hash of the sealed inputs (ADR-116 canonical form). */
53
+ export declare function sealedHash(sealed: SealedInputs): string;
54
+ /**
55
+ * Fingerprint of a rule VERSION. Because a rule change is a version bump
56
+ * (ADR-120 §5), fingerprinting the version string is the contract — an edited
57
+ * rule ships under a new version and thus a new fingerprint. Throws for an
58
+ * unknown version so a missing rule can never silently pass verification.
59
+ */
60
+ export declare function gateFingerprint(ruleVersion: string): string;
61
+ /** Re-execute a frozen rule on sealed inputs. Throws for an unknown version. */
62
+ export declare function reExecuteGate(ruleVersion: string, sealed: SealedInputs): RuleResult;
63
+ /** A recorded promotion decision. The logged verdict is advisory; the re-run is authoritative. */
64
+ export interface PromotionReceipt {
65
+ ruleVersion: string;
66
+ /** Fingerprint recorded at decision time. */
67
+ ruleFingerprint: string;
68
+ /** Content hash of the sealed inputs recorded at decision time. */
69
+ sealedHash: string;
70
+ sealed: SealedInputs;
71
+ /** What was logged. NOT trusted — re-execution decides. */
72
+ recordedVerdict: 'promote' | 'reject';
73
+ }
74
+ export interface ReplayChecks {
75
+ /** Sealed inputs were not mutated after the decision (ADR-116). */
76
+ sealIntact: boolean;
77
+ /** Recorded rule fingerprint matches the current (and pinned) rule version. */
78
+ gateUnchanged: boolean;
79
+ /** Re-running the frozen rule on the sealed inputs reproduces the recorded verdict. */
80
+ gateReExecutes: boolean;
81
+ }
82
+ export interface ReplayVerdict {
83
+ /** All three checks passed — the promotion is valid. */
84
+ valid: boolean;
85
+ checks: ReplayChecks;
86
+ failures: string[];
87
+ reason: string;
88
+ }
89
+ /**
90
+ * Verify a promotion by re-executing its frozen rule on its sealed inputs.
91
+ * The logged verdict is trusted only insofar as the re-run reproduces it.
92
+ *
93
+ * @param opts.pinnedRuleFingerprint - if supplied, the receipt's fingerprint
94
+ * must also equal this pinned value (an externally-anchored rule identity).
95
+ */
96
+ export declare function verifyPromotion(receipt: PromotionReceipt, opts?: {
97
+ pinnedRuleFingerprint?: string;
98
+ }): ReplayVerdict;
99
+ /**
100
+ * Superset sealed inputs for the retrofit promotion paths. Every field is
101
+ * optional; each frozen path rule reads only the fields it needs and rejects
102
+ * (never throws) when a field it requires is absent — a missing input can
103
+ * never silently promote.
104
+ */
105
+ export interface PathSealedInputs {
106
+ /** ADR-121 evidence tier of the artifact being promoted/applied. */
107
+ provenanceTier: string;
108
+ /** Whether judge-tier evidence was explicitly budgeted (ADR-121 / ADR-119). */
109
+ allowJudgeTier?: boolean;
110
+ /** Pattern average reward (quality score). */
111
+ reward?: number;
112
+ /** Reward promotion threshold the decision was gated at. */
113
+ rewardThreshold?: number;
114
+ /** Pattern usage/occurrence count. */
115
+ occurrences?: number;
116
+ /** Minimum occurrence threshold. */
117
+ occurrenceThreshold?: number;
118
+ /** Pattern success rate. */
119
+ successRate?: number;
120
+ /** Minimum success-rate threshold. */
121
+ successRateThreshold?: number;
122
+ /** Whether the pattern was active within the promotion window (anti-stale). */
123
+ withinActivityWindow?: boolean;
124
+ /** Dream insight confidence score. */
125
+ insightConfidence?: number;
126
+ /** Confidence threshold the apply was gated at. */
127
+ insightConfidenceThreshold?: number;
128
+ /** Whether the insight produced a real (non-`no_action`) reorganization. */
129
+ insightActionable?: boolean;
130
+ }
131
+ /** A versioned, frozen promotion-path rule — a pure function of sealed inputs. */
132
+ export type PathRule = (sealed: PathSealedInputs) => RuleResult;
133
+ /**
134
+ * Registry of versioned frozen promotion-path rules. Add a NEW key to change a
135
+ * rule; never edit in place (a rule change is a version bump — ADR-120 §5).
136
+ * Kept separate from `ACCEPTANCE_RULES` so the flywheel accept gate and its
137
+ * locked test are untouched.
138
+ */
139
+ export declare const PROMOTION_PATH_RULES: Readonly<Record<string, PathRule>>;
140
+ /** SHA-256 content hash of path sealed inputs (ADR-116 canonical form). */
141
+ export declare function pathSealedHash(sealed: PathSealedInputs): string;
142
+ /** Fingerprint of a path-rule VERSION. Throws for an unregistered rule. */
143
+ export declare function pathGateFingerprint(ruleVersion: string): string;
144
+ /** Re-execute a frozen path rule on sealed inputs. Throws for an unknown version. */
145
+ export declare function reExecutePathGate(ruleVersion: string, sealed: PathSealedInputs): RuleResult;
146
+ /** A recorded promotion/apply decision on a retrofit path. */
147
+ export interface PathPromotionReceipt {
148
+ ruleVersion: string;
149
+ /** Fingerprint recorded at decision time. */
150
+ ruleFingerprint: string;
151
+ /** Content hash of the sealed inputs recorded at decision time. */
152
+ sealedHash: string;
153
+ sealed: PathSealedInputs;
154
+ /** What was logged. NOT trusted — re-execution decides. */
155
+ recordedVerdict: 'promote' | 'reject';
156
+ }
157
+ /**
158
+ * Verify a promotion-path decision by re-executing its frozen rule on its
159
+ * sealed inputs. Identical semantics to {@link verifyPromotion}: the logged
160
+ * verdict is trusted only insofar as the re-run reproduces it on intact inputs.
161
+ */
162
+ export declare function verifyPathPromotion(receipt: PathPromotionReceipt, opts?: {
163
+ pinnedRuleFingerprint?: string;
164
+ }): ReplayVerdict;
165
+ //# sourceMappingURL=gate-reexecute.d.ts.map