agentic-qe 3.14.0 → 3.14.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.
Files changed (413) hide show
  1. package/.claude/helpers/brain-checkpoint.cjs +2 -1
  2. package/.claude/helpers/validate-v3-config.sh +6 -5
  3. package/.claude/hooks/aqe-hook.cjs +14 -14
  4. package/.claude/skills/qe-browser/evals/qe-browser.yaml +30 -41
  5. package/.claude/skills/qe-browser/fixtures/serve-skills.js +37 -0
  6. package/.claude/skills/qe-browser/scripts/lib/vibium.js +1 -1
  7. package/.claude/skills/qe-browser/scripts/smoke-test.sh +56 -25
  8. package/.claude/skills/qe-browser/scripts/visual-diff.js +24 -15
  9. package/.claude/skills/skills-manifest.json +1 -1
  10. package/CHANGELOG.md +77 -0
  11. package/assets/skills/qe-browser/evals/qe-browser.yaml +30 -41
  12. package/assets/skills/qe-browser/fixtures/serve-skills.js +37 -0
  13. package/assets/skills/qe-browser/scripts/lib/vibium.js +1 -1
  14. package/assets/skills/qe-browser/scripts/smoke-test.sh +56 -25
  15. package/assets/skills/qe-browser/scripts/visual-diff.js +24 -15
  16. package/assets/skills/skills-manifest.json +1 -1
  17. package/dist/cli/bundle.js +7 -7
  18. package/dist/cli/chunks/adapter-I2N7PEKG.js +2 -0
  19. package/dist/cli/chunks/{agent-booster-wasm-JZO6VUW4.js → agent-booster-wasm-OY5Y2CUM.js} +2 -2
  20. package/dist/cli/chunks/{agent-handler-534KFGEJ.js → agent-handler-TUOH55LD.js} +2 -2
  21. package/dist/cli/chunks/{agent-memory-branch-B7KWLWY4.js → agent-memory-branch-XM3IYKT3.js} +2 -2
  22. package/dist/cli/chunks/aqe-learning-engine-U4ALUH6A.js +2 -0
  23. package/dist/cli/chunks/{arena-OW5MELJX.js → arena-DOCLIEBL.js} +4 -4
  24. package/dist/cli/chunks/{arena-7CCD3S3I.js → arena-UMFJZKG7.js} +2 -2
  25. package/dist/cli/chunks/{audit-BHVKN4E2.js → audit-KZLU5VLW.js} +3 -3
  26. package/dist/cli/chunks/base-RCYIBNHM.js +2 -0
  27. package/dist/cli/chunks/{better-sqlite3-P5FA6WFK.js → better-sqlite3-MIEZBNUI.js} +2 -2
  28. package/dist/cli/chunks/{brain-handler-WNW5LOV7.js → brain-handler-6PZN46B7.js} +3 -3
  29. package/dist/cli/chunks/{branch-enumerator-TVZ2ODKH.js → branch-enumerator-XCETHA4F.js} +2 -2
  30. package/dist/cli/chunks/{browser-TCEB2W2F.js → browser-UEXISDCJ.js} +2 -2
  31. package/dist/cli/chunks/browser-workflow-L6TDB5O5.js +2 -0
  32. package/dist/cli/chunks/{chunk-IQ3JFHZN.js → chunk-3AYNHOWS.js} +1 -1
  33. package/dist/cli/chunks/{chunk-3QT6S3A3.js → chunk-3BRR2FLH.js} +3 -3
  34. package/dist/cli/chunks/{chunk-43GPSYAL.js → chunk-3FFMUB3B.js} +2 -2
  35. package/dist/cli/chunks/{chunk-E4NU4BJA.js → chunk-3JMSXOU4.js} +2 -2
  36. package/dist/cli/chunks/{chunk-IQLRA4FV.js → chunk-3TMUCJNJ.js} +1 -1
  37. package/dist/cli/chunks/{chunk-AR6SATU3.js → chunk-3WSH4HD2.js} +2 -2
  38. package/dist/cli/chunks/{chunk-7OUMJCJT.js → chunk-3XRXUVUI.js} +1 -1
  39. package/dist/cli/chunks/{chunk-ZQSXG7FA.js → chunk-45S5553E.js} +2 -2
  40. package/dist/cli/chunks/{chunk-LKR7T3OZ.js → chunk-4MT62HKK.js} +1 -1
  41. package/dist/cli/chunks/{chunk-SUSMHSXT.js → chunk-4ZLFUO4I.js} +2 -2
  42. package/dist/cli/chunks/{chunk-QMMDN4WX.js → chunk-5F5V4QYU.js} +3 -3
  43. package/dist/cli/chunks/{chunk-I3VHXA2W.js → chunk-5KP62DC3.js} +2 -2
  44. package/dist/cli/chunks/{chunk-OONCRNFA.js → chunk-5NSSJUWW.js} +2 -2
  45. package/dist/cli/chunks/{chunk-T3BZAFLP.js → chunk-5T6PAUZD.js} +1 -1
  46. package/dist/cli/chunks/{chunk-VOSISOFD.js → chunk-5TYGSQOL.js} +1 -1
  47. package/dist/cli/chunks/{chunk-L4C42WYI.js → chunk-5Y2QFSVZ.js} +2 -2
  48. package/dist/cli/chunks/{chunk-RKUYVVGJ.js → chunk-6B77GPWL.js} +2 -2
  49. package/dist/cli/chunks/{chunk-LZHTCUCO.js → chunk-6DDMHZWH.js} +2 -2
  50. package/dist/cli/chunks/{chunk-SROZXIMT.js → chunk-6HMNN2Y2.js} +54 -54
  51. package/dist/cli/chunks/{chunk-7RAB2BZY.js → chunk-6YIMLUH6.js} +2 -2
  52. package/dist/cli/chunks/{chunk-NKWO2X3T.js → chunk-6Z6Y3YBX.js} +1 -1
  53. package/dist/cli/chunks/{chunk-4MK2G6TK.js → chunk-75SC3GEX.js} +2 -2
  54. package/dist/cli/chunks/{chunk-ZBOWR4XT.js → chunk-7AF55H2D.js} +2 -2
  55. package/dist/cli/chunks/{chunk-WKNWRDA5.js → chunk-7AYTM426.js} +1 -1
  56. package/dist/cli/chunks/{chunk-JAK5UUWH.js → chunk-7GF6IRSU.js} +2 -2
  57. package/dist/cli/chunks/{chunk-4ZVGSVHV.js → chunk-7XL2D56F.js} +4 -4
  58. package/dist/cli/chunks/{chunk-2NO4H35K.js → chunk-A6RB34Y6.js} +1 -1
  59. package/dist/cli/chunks/{chunk-ZI3UO7QR.js → chunk-AESYVAPH.js} +2 -2
  60. package/dist/cli/chunks/{chunk-GKNDP5VK.js → chunk-AZUC7E5S.js} +2 -2
  61. package/dist/cli/chunks/{chunk-B3H4K7CY.js → chunk-B6Y6AF4M.js} +2 -2
  62. package/dist/cli/chunks/{chunk-ECTPFCON.js → chunk-C3XNFIOM.js} +2 -2
  63. package/dist/cli/chunks/{chunk-QZPFUFZG.js → chunk-CBWF42ET.js} +2 -2
  64. package/dist/cli/chunks/{chunk-JMKMDSXG.js → chunk-CCZZZBAO.js} +2 -2
  65. package/dist/cli/chunks/{chunk-6IZQSLYZ.js → chunk-CGDW47WP.js} +2 -2
  66. package/dist/cli/chunks/chunk-CGZ7LTUK.js +2 -0
  67. package/dist/cli/chunks/{chunk-FRL3X2QA.js → chunk-D6RCRTTR.js} +2 -2
  68. package/dist/cli/chunks/{chunk-DOWCOZDO.js → chunk-DFXQLHQM.js} +2 -2
  69. package/dist/cli/chunks/{chunk-QQCENKCX.js → chunk-DKSLJZVA.js} +1 -1
  70. package/dist/cli/chunks/{chunk-YKWMKRYB.js → chunk-DKUKGBJE.js} +1 -1
  71. package/dist/cli/chunks/{chunk-ENGKLFLY.js → chunk-DKXSJDII.js} +2 -2
  72. package/dist/cli/chunks/chunk-EEJP3WTQ.js +4 -0
  73. package/dist/cli/chunks/{chunk-PEW6FZ47.js → chunk-EHW62JL2.js} +1 -1
  74. package/dist/cli/chunks/{chunk-5LEAGKX5.js → chunk-EPBWFTHH.js} +2 -2
  75. package/dist/cli/chunks/{chunk-ZAAYOENS.js → chunk-ERTGGFXZ.js} +2 -2
  76. package/dist/cli/chunks/{chunk-TKYEP7OR.js → chunk-F7TRO2OM.js} +1 -1
  77. package/dist/cli/chunks/{chunk-HJIAVR6P.js → chunk-FFRKTZYP.js} +2 -2
  78. package/dist/cli/chunks/{chunk-S5YVLPXU.js → chunk-FH7SCX2I.js} +2 -2
  79. package/dist/cli/chunks/{chunk-N2YAUDAV.js → chunk-FHBGALBG.js} +2 -2
  80. package/dist/cli/chunks/{chunk-WWWX76QB.js → chunk-FOAFRC2W.js} +2 -2
  81. package/dist/cli/chunks/{chunk-KTSCZ7AW.js → chunk-FPBQ7BXU.js} +2 -2
  82. package/dist/cli/chunks/{chunk-JTWJR2KY.js → chunk-FRRRDCXY.js} +2 -2
  83. package/dist/cli/chunks/{chunk-2HYVOX6N.js → chunk-FZ47ZCRL.js} +1 -1
  84. package/dist/cli/chunks/{chunk-H3YDDKBW.js → chunk-GH3NJOTC.js} +3 -3
  85. package/dist/cli/chunks/{chunk-5VDVYTO5.js → chunk-GO66DCIZ.js} +2 -2
  86. package/dist/cli/chunks/{chunk-H6NFDOMK.js → chunk-GRVR3Y6I.js} +1 -1
  87. package/dist/cli/chunks/chunk-GYTWUOKU.js +65 -0
  88. package/dist/cli/chunks/{chunk-O2MZZL54.js → chunk-H2DX36SC.js} +2 -2
  89. package/dist/cli/chunks/{chunk-NOPVFBQM.js → chunk-H5LSXVWY.js} +2 -2
  90. package/dist/cli/chunks/{chunk-DDPJUAXQ.js → chunk-HBAQVJDP.js} +2 -2
  91. package/dist/cli/chunks/{chunk-R6WJF4D5.js → chunk-HCCILQGN.js} +2 -2
  92. package/dist/cli/chunks/{chunk-CIZ6LSNV.js → chunk-HJD52N32.js} +2 -2
  93. package/dist/cli/chunks/{chunk-4FEJEVG7.js → chunk-HKU5PPS7.js} +1 -1
  94. package/dist/cli/chunks/{chunk-M3HUZD2I.js → chunk-HPQU6XZH.js} +1 -1
  95. package/dist/cli/chunks/{chunk-IL6QRXRP.js → chunk-HRUQWABO.js} +10 -10
  96. package/dist/cli/chunks/{chunk-BZ4QVFP2.js → chunk-IGRTQ6VT.js} +2 -2
  97. package/dist/cli/chunks/{chunk-HQ7243G3.js → chunk-IIBXGHZT.js} +2 -2
  98. package/dist/cli/chunks/{chunk-LCSVROU7.js → chunk-IYB3GRXF.js} +10 -10
  99. package/dist/cli/chunks/{chunk-CIUOC5F3.js → chunk-IYIMLLUV.js} +1 -1
  100. package/dist/cli/chunks/{chunk-6AOZU3UN.js → chunk-J2VF7ZO7.js} +2 -2
  101. package/dist/cli/chunks/{chunk-2D7UBX5S.js → chunk-J33LKXVH.js} +1 -1
  102. package/dist/cli/chunks/{chunk-JY4VZ6BN.js → chunk-J7VAD4RG.js} +2 -2
  103. package/dist/cli/chunks/{chunk-A2WZEMWT.js → chunk-JJ4GUO4K.js} +1 -1
  104. package/dist/cli/chunks/{chunk-RGVD6ZUX.js → chunk-JMULRLD4.js} +1 -1
  105. package/dist/cli/chunks/{chunk-JRKEBESE.js → chunk-JNSTKE3K.js} +2 -2
  106. package/dist/cli/chunks/{chunk-3RYTAYR6.js → chunk-JZUWPDVS.js} +1 -1
  107. package/dist/cli/chunks/{chunk-5XGVSQS2.js → chunk-KHUO4NCW.js} +2 -2
  108. package/dist/cli/chunks/{chunk-AFGT26NR.js → chunk-KXMW7XTJ.js} +2 -2
  109. package/dist/cli/chunks/{chunk-6DPAMYLU.js → chunk-KXTN3FR4.js} +2 -2
  110. package/dist/cli/chunks/{chunk-VXU53F7Z.js → chunk-L4WATX6B.js} +2 -2
  111. package/dist/cli/chunks/{chunk-SSV6KSFT.js → chunk-L66BWYQH.js} +1 -1
  112. package/dist/cli/chunks/{chunk-FOHYBR3O.js → chunk-LJ63HPPN.js} +1 -1
  113. package/dist/cli/chunks/{chunk-6IJMD2ZL.js → chunk-LMPK63PO.js} +3 -3
  114. package/dist/cli/chunks/{chunk-IL4AEB3J.js → chunk-LQDFWLKK.js} +2 -2
  115. package/dist/cli/chunks/{chunk-IE5LC7MB.js → chunk-LSXQPMPI.js} +2 -2
  116. package/dist/cli/chunks/{chunk-UI6WSPEK.js → chunk-MDLLEUFN.js} +3 -3
  117. package/dist/cli/chunks/{chunk-A7SKM6JL.js → chunk-MFAN5W27.js} +1 -1
  118. package/dist/cli/chunks/{chunk-J3XSHJGK.js → chunk-MZ2PJUN6.js} +2 -2
  119. package/dist/cli/chunks/{chunk-VPVZHJSU.js → chunk-N22LMACN.js} +2 -2
  120. package/dist/cli/chunks/{chunk-XITTURP2.js → chunk-NAJCQJSK.js} +2 -2
  121. package/dist/cli/chunks/{chunk-VYENTZ45.js → chunk-ND6JBUVH.js} +2 -2
  122. package/dist/cli/chunks/{chunk-AVLA5PBJ.js → chunk-NEEZ6M4W.js} +2 -2
  123. package/dist/cli/chunks/{chunk-HNKPLVYS.js → chunk-NNJ63W77.js} +1 -1
  124. package/dist/cli/chunks/{chunk-NDPQ2WPU.js → chunk-O7KF3GBV.js} +1 -1
  125. package/dist/cli/chunks/{chunk-YEAC3DC6.js → chunk-OBKMLOHU.js} +2 -2
  126. package/dist/cli/chunks/{chunk-NYARYONH.js → chunk-OBLHI4HA.js} +1 -1
  127. package/dist/cli/chunks/{chunk-5MZF4N4Q.js → chunk-ODNLKYOM.js} +1 -1
  128. package/dist/cli/chunks/{chunk-6W42XWLL.js → chunk-PMREFRPP.js} +2 -2
  129. package/dist/cli/chunks/{chunk-7BOPFN3Y.js → chunk-PMUF7WU6.js} +2 -2
  130. package/dist/cli/chunks/{chunk-52DFCV57.js → chunk-PS5NIMWJ.js} +2 -2
  131. package/dist/cli/chunks/{chunk-ZBKGX72B.js → chunk-PS6Y662P.js} +3 -3
  132. package/dist/cli/chunks/{chunk-YW4RNZWT.js → chunk-PYAH4K2U.js} +2 -2
  133. package/dist/cli/chunks/{chunk-E722WNWC.js → chunk-PZZX57ZA.js} +2 -2
  134. package/dist/cli/chunks/{chunk-YKZV7O65.js → chunk-QAE4BOIV.js} +2 -2
  135. package/dist/cli/chunks/{chunk-FF43SRP6.js → chunk-QIY43XQJ.js} +1 -1
  136. package/dist/cli/chunks/{chunk-HLNQDRHA.js → chunk-QM6EJHP5.js} +1 -1
  137. package/dist/cli/chunks/{chunk-7RVAHJQZ.js → chunk-QMTBWHGR.js} +3 -3
  138. package/dist/cli/chunks/{chunk-3EM2MK3Z.js → chunk-RCHDSUVU.js} +2 -2
  139. package/dist/cli/chunks/{chunk-K6CGQR5R.js → chunk-RUEHSOE6.js} +1 -1
  140. package/dist/cli/chunks/{chunk-ZNSMVQCG.js → chunk-RVCMZUSJ.js} +2 -2
  141. package/dist/cli/chunks/{chunk-OIYUSWHX.js → chunk-RXHI6CKK.js} +1 -1
  142. package/dist/cli/chunks/{chunk-KDIZQHG5.js → chunk-RXPHQ4ZE.js} +2 -2
  143. package/dist/cli/chunks/{chunk-XXFKN7LB.js → chunk-RYHCYTFE.js} +1 -1
  144. package/dist/cli/chunks/{chunk-WTHAVFIC.js → chunk-S4WIAKPL.js} +1 -1
  145. package/dist/cli/chunks/{chunk-GVEJP5T7.js → chunk-S53ZUAVI.js} +2 -2
  146. package/dist/cli/chunks/{chunk-UUJ5VQJM.js → chunk-SEKOMKNG.js} +1 -1
  147. package/dist/cli/chunks/{chunk-2O4DDPEA.js → chunk-SZRDEPUY.js} +3 -3
  148. package/dist/cli/chunks/{chunk-3GUO4ERR.js → chunk-T7XYQX5G.js} +2 -2
  149. package/dist/cli/chunks/{chunk-U4GZWPKM.js → chunk-TF33GKWA.js} +2 -2
  150. package/dist/cli/chunks/{chunk-6AYO3IR2.js → chunk-TGFJUL6M.js} +2 -2
  151. package/dist/cli/chunks/{chunk-ZCVJCCQQ.js → chunk-TLD727EF.js} +2 -2
  152. package/dist/cli/chunks/{chunk-QSPRQPEL.js → chunk-TQ2JZVZ3.js} +2 -2
  153. package/dist/cli/chunks/{chunk-BQCTO7UB.js → chunk-TT7DF2GX.js} +2 -2
  154. package/dist/cli/chunks/{chunk-DJITEQYS.js → chunk-UCJEAK7D.js} +2 -2
  155. package/dist/cli/chunks/{chunk-4XTHRAUV.js → chunk-UN7EHLRV.js} +1 -1
  156. package/dist/cli/chunks/{chunk-Q73RRTLE.js → chunk-UUE5CBZQ.js} +2 -2
  157. package/dist/cli/chunks/{chunk-JGROLJ33.js → chunk-UWRMPRY5.js} +1 -1
  158. package/dist/cli/chunks/{chunk-EJ6IP7DE.js → chunk-VEWYUEVY.js} +2 -2
  159. package/dist/cli/chunks/{chunk-VESOYP6A.js → chunk-VUXHJPUS.js} +2 -2
  160. package/dist/cli/chunks/{chunk-HQHLHSJO.js → chunk-VVP2ROXD.js} +2 -2
  161. package/dist/cli/chunks/{chunk-H76TV4UU.js → chunk-WFJKLM6Z.js} +3 -3
  162. package/dist/cli/chunks/{chunk-TGOGCA74.js → chunk-X5G3UDWP.js} +2 -2
  163. package/dist/cli/chunks/{chunk-QKQZ4IJF.js → chunk-Y63V33M6.js} +5 -5
  164. package/dist/cli/chunks/{chunk-3JIJBR4V.js → chunk-YXN47QOI.js} +2 -2
  165. package/dist/cli/chunks/{chunk-MO7EITJK.js → chunk-Z5YU2TDS.js} +2 -2
  166. package/dist/cli/chunks/{chunk-TQJE7DNL.js → chunk-ZAHCVRR7.js} +2 -2
  167. package/dist/cli/chunks/{chunk-VRRG66XB.js → chunk-ZC3HC6FO.js} +1 -1
  168. package/dist/cli/chunks/{ci-B432UH6N.js → ci-Q2VX75PS.js} +2 -2
  169. package/dist/cli/chunks/{ci-output-GTHH7WYG.js → ci-output-MD5GTVR2.js} +2 -2
  170. package/dist/cli/chunks/{circuit-breaker-VW75DLME.js → circuit-breaker-JMRLG2XI.js} +2 -2
  171. package/dist/cli/chunks/{claude-flow-setup-RE3IVT7U.js → claude-flow-setup-IMXYALBU.js} +2 -2
  172. package/dist/cli/chunks/client-L4PIXCGV.js +2 -0
  173. package/dist/cli/chunks/{cline-installer-NUBZZ55N.js → cline-installer-HWFASEGE.js} +2 -2
  174. package/dist/cli/chunks/{code-K6JCWKNW.js → code-3V37TCAD.js} +2 -2
  175. package/dist/cli/chunks/{code-index-extractor-I4ILB5JN.js → code-index-extractor-5V54WGFL.js} +2 -2
  176. package/dist/cli/chunks/codex-installer-UCA5AVE6.js +14 -0
  177. package/dist/cli/chunks/{completions-V3KJVJF4.js → completions-2DMRCQU6.js} +2 -2
  178. package/dist/cli/chunks/{complexity-analyzer-HRG7OOY3.js → complexity-analyzer-MMQRXBTD.js} +2 -2
  179. package/dist/cli/chunks/{continuedev-installer-CNTDONWG.js → continuedev-installer-FAARXP3S.js} +2 -2
  180. package/dist/cli/chunks/{copilot-installer-XPWWIWYA.js → copilot-installer-AKQALMB5.js} +2 -2
  181. package/dist/cli/chunks/core-handlers-KROSXP4V.js +2 -0
  182. package/dist/cli/chunks/{cost-tracker-MFNLQ56K.js → cost-tracker-AXWHDND5.js} +2 -2
  183. package/dist/cli/chunks/{coverage-KOIK654V.js → coverage-ZLSKKCG5.js} +3 -3
  184. package/dist/cli/chunks/cross-domain-router-WMTYBOON.js +2 -0
  185. package/dist/cli/chunks/{cursor-installer-S5MKLRQQ.js → cursor-installer-UALCQKVD.js} +2 -2
  186. package/dist/cli/chunks/{daemon-DUS6JYW6.js → daemon-4LNOPJGN.js} +3 -3
  187. package/dist/cli/chunks/{daemon-Z7VPGWHY.js → daemon-K3DFGCXC.js} +4 -4
  188. package/dist/cli/chunks/{dag-attention-scheduler-7CQ3ARNI.js → dag-attention-scheduler-LCQ7MYKC.js} +2 -2
  189. package/dist/cli/chunks/{detect-WORBCAYF.js → detect-P7PEN3MZ.js} +2 -2
  190. package/dist/cli/chunks/{dist-node-KRNI6OYW.js → dist-node-I72BJC2D.js} +2 -2
  191. package/dist/cli/chunks/{domain-handler-KRUR2VQG.js → domain-handler-LROF6KWN.js} +2 -2
  192. package/dist/cli/chunks/{domain-transfer-VEOVLV54.js → domain-transfer-M2ZSSTPV.js} +2 -2
  193. package/dist/cli/chunks/dream-AV63YQ2Y.js +2 -0
  194. package/dist/cli/chunks/{embed-and-insert-pattern-QU3NQVA5.js → embed-and-insert-pattern-MTBPUGO4.js} +2 -2
  195. package/dist/cli/chunks/{eval-AYQ7BSUP.js → eval-O24ALB3W.js} +2 -2
  196. package/dist/cli/chunks/{experience-capture-middleware-AWQBL6LT.js → experience-capture-middleware-7JXEOGRE.js} +3 -3
  197. package/dist/cli/chunks/{fast-paths-V5EL4BYJ.js → fast-paths-4CFYJV4U.js} +2 -2
  198. package/dist/cli/chunks/{feature-flags-P34BPRWU.js → feature-flags-CHPUA7IM.js} +2 -2
  199. package/dist/cli/chunks/{feature-flags-BXX7BP22.js → feature-flags-E6PIM6ZB.js} +2 -2
  200. package/dist/cli/chunks/{file-discovery-MS6BKQ2U.js → file-discovery-2ANIAUCP.js} +2 -2
  201. package/dist/cli/chunks/{fleet-7WVVPA4W.js → fleet-2MQ3OGCP.js} +3 -3
  202. package/dist/cli/chunks/{gnn-wrapper-7WQ3LEPG.js → gnn-wrapper-P7JW3622.js} +2 -2
  203. package/dist/cli/chunks/{heartbeat-handler-P7QD3BZH.js → heartbeat-handler-WWWZSA7V.js} +4 -4
  204. package/dist/cli/chunks/heartbeat-scheduler-5IZUGMC2.js +2 -0
  205. package/dist/cli/chunks/hnsw-adapter-NV2NNBJL.js +2 -0
  206. package/dist/cli/chunks/hnsw-index-GRJ3KA2O.js +2 -0
  207. package/dist/cli/chunks/{hnsw-legacy-bridge-Y3GAR3UP.js → hnsw-legacy-bridge-W634ZOTV.js} +2 -2
  208. package/dist/cli/chunks/{hnswlib-node-5QUXZQWQ.js → hnswlib-node-SLZDLMKM.js} +2 -2
  209. package/dist/cli/chunks/{hooks-2D64KPRY.js → hooks-3BFAZGG7.js} +10 -10
  210. package/dist/cli/chunks/{hypergraph-engine-5INXEZDP.js → hypergraph-engine-XJSGXP2J.js} +2 -2
  211. package/dist/cli/chunks/{hypergraph-handler-YJJJ3ESZ.js → hypergraph-handler-RVUWZMOX.js} +3 -3
  212. package/dist/cli/chunks/impact-analyzer-YM4QUWVH.js +2 -0
  213. package/dist/cli/chunks/{init-handler-QSFYJN5Q.js → init-handler-FYOZNNNO.js} +9 -8
  214. package/dist/cli/chunks/init-wizard-YESXGIK6.js +2 -0
  215. package/dist/cli/chunks/kernel-VH5SKESU.js +2 -0
  216. package/dist/cli/chunks/{kilocode-installer-3N3QGTJU.js → kilocode-installer-MAAKFVSB.js} +2 -2
  217. package/dist/cli/chunks/{kiro-installer-GIWVTFZQ.js → kiro-installer-GX3TLZC5.js} +2 -2
  218. package/dist/cli/chunks/knowledge-graph-F3NL4WJV.js +2 -0
  219. package/dist/cli/chunks/{learning-SGO2DQ5Q.js → learning-T4QZ6C26.js} +3 -3
  220. package/dist/cli/chunks/{llm-router-HBBULO65.js → llm-router-N2M4WXOC.js} +4 -4
  221. package/dist/cli/chunks/llm-router-service-HQYCJMPK.js +2 -0
  222. package/dist/cli/chunks/{load-B5OFYB4H.js → load-6RU3G4P2.js} +2 -2
  223. package/dist/cli/chunks/load-test-GWRGKWMN.js +2 -0
  224. package/dist/cli/chunks/{mcp-FG3LNQR4.js → mcp-EFBO7BAU.js} +2 -2
  225. package/dist/cli/chunks/{memory-SPS7ZWLC.js → memory-AXU2M3DN.js} +5 -5
  226. package/dist/cli/chunks/memory-backend-7A2PFKPV.js +2 -0
  227. package/dist/cli/chunks/{memory-handlers-P7FTPWP3.js → memory-handlers-65CXN76C.js} +2 -2
  228. package/dist/cli/chunks/{multi-model-executor-PUB7E6KH.js → multi-model-executor-W7AFGVNH.js} +2 -2
  229. package/dist/cli/chunks/{opencode-installer-TGCSGVG2.js → opencode-installer-KJE2RLCH.js} +2 -2
  230. package/dist/cli/chunks/{orchestrator-S5FTJFGB.js → orchestrator-CL6MLGVU.js} +22 -21
  231. package/dist/cli/chunks/pattern-null-store-K2WPRYCP.js +2 -0
  232. package/dist/cli/chunks/{pattern-usage-recorder-LCXXGRAB.js → pattern-usage-recorder-7SNSJ7K2.js} +2 -2
  233. package/dist/cli/chunks/{pipeline-ENOSRHKW.js → pipeline-3UU6ON3F.js} +2 -2
  234. package/dist/cli/chunks/platform-SNMPIDIT.js +2 -0
  235. package/dist/cli/chunks/{plugin-JZ5ODJSU.js → plugin-65IIUUCU.js} +2 -2
  236. package/dist/cli/chunks/{prime-radiant-advanced-wasm-DPJUPNCG.js → prime-radiant-advanced-wasm-WWWJRLRP.js} +2 -2
  237. package/dist/cli/chunks/protocol-executor-TJDLEHND.js +2 -0
  238. package/dist/cli/chunks/{protocol-handler-IP4NLVY3.js → protocol-handler-SEBHCLLJ.js} +2 -2
  239. package/dist/cli/chunks/{prove-P6FM4RU7.js → prove-N4X7CCJ4.js} +2 -2
  240. package/dist/cli/chunks/qe-reasoning-bank-CGRMFPDM.js +2 -0
  241. package/dist/cli/chunks/{quality-UHP4XO26.js → quality-LBCJWXMU.js} +2 -2
  242. package/dist/cli/chunks/quality-gate-KZIQI7QT.js +7 -0
  243. package/dist/cli/chunks/queen-coordinator-FKP6QZAQ.js +2 -0
  244. package/dist/cli/chunks/{real-embeddings-6SO5MFRQ.js → real-embeddings-XCZFHFME.js} +2 -2
  245. package/dist/cli/chunks/{roocode-installer-WTWUOFCH.js → roocode-installer-P3O6B7PT.js} +2 -2
  246. package/dist/cli/chunks/router-KZ5BISAM.js +2 -0
  247. package/dist/cli/chunks/routing-feedback-O4Y5TTR6.js +2 -0
  248. package/dist/cli/chunks/{routing-handler-IK7HYERQ.js → routing-handler-OXZ4DOV4.js} +2 -2
  249. package/dist/cli/chunks/{ruvector-commands-THLB4NIM.js → ruvector-commands-PSY5IDSL.js} +2 -2
  250. package/dist/cli/chunks/rvf-dual-writer-NG3UF3D5.js +2 -0
  251. package/dist/cli/chunks/rvf-migration-adapter-PUHVTKQY.js +2 -0
  252. package/dist/cli/chunks/{rvf-migration-coordinator-BUKCSHBD.js → rvf-migration-coordinator-4SUT7GTJ.js} +2 -2
  253. package/dist/cli/chunks/rvf-native-adapter-ODXFKZ6G.js +2 -0
  254. package/dist/cli/chunks/{rvf-store-integrity-ECTADZIN.js → rvf-store-integrity-TCKC22FH.js} +2 -2
  255. package/dist/cli/chunks/safe-db-BUQDNH2R.js +2 -0
  256. package/dist/cli/chunks/schedule-ZXNDZNNB.js +2 -0
  257. package/dist/cli/chunks/scheduler-YUQQWWW3.js +2 -0
  258. package/dist/cli/chunks/{security-HN4UXFXX.js → security-RQGUQGSI.js} +3 -3
  259. package/dist/cli/chunks/{shared-rvf-adapter-XJCPX5SN.js → shared-rvf-adapter-ZJFN52C2.js} +2 -2
  260. package/dist/cli/chunks/{shared-rvf-dual-writer-23X5PNY5.js → shared-rvf-dual-writer-V2R37HWV.js} +2 -2
  261. package/dist/cli/chunks/sqlite-persistence-HVSX46C7.js +2 -0
  262. package/dist/cli/chunks/{status-handler-ZXANTHKT.js → status-handler-XEKWNVDR.js} +2 -2
  263. package/dist/cli/chunks/{structural-health-LR6WI3AH.js → structural-health-QMIW6WUN.js} +2 -2
  264. package/dist/cli/chunks/{sync-4OEI3BC2.js → sync-GDYJ2ULT.js} +2 -2
  265. package/dist/cli/chunks/{sync-I5IUJF33.js → sync-H5SXWXPP.js} +2 -2
  266. package/dist/cli/chunks/{task-handler-R3ATJKU5.js → task-handler-EPLKCQHY.js} +2 -2
  267. package/dist/cli/chunks/{task-handlers-4X357AEW.js → task-handlers-22NTLWTC.js} +3 -3
  268. package/dist/cli/chunks/{test-PR2B5H2F.js → test-WHJFRZ3F.js} +4 -4
  269. package/dist/cli/chunks/{test-scheduling-ZNOSQVLD.js → test-scheduling-KZVFZOQN.js} +3 -3
  270. package/dist/cli/chunks/{token-bootstrap-LYXOI72S.js → token-bootstrap-BW5WA6PY.js} +2 -2
  271. package/dist/cli/chunks/{token-usage-R6EQZBX2.js → token-usage-4A4O57R6.js} +2 -2
  272. package/dist/cli/chunks/{transformers-COQWK27J.js → transformers-FYTBRV46.js} +2 -2
  273. package/dist/cli/chunks/{tree-sitter-wasm-parser-LLIW2X3M.js → tree-sitter-wasm-parser-TZIJPLF3.js} +2 -2
  274. package/dist/cli/chunks/{types-MEYTZITK.js → types-B2L6LKFA.js} +2 -2
  275. package/dist/cli/chunks/unified-memory-AHN4RVBP.js +2 -0
  276. package/dist/cli/chunks/unified-memory-hnsw-XB7JPF74.js +2 -0
  277. package/dist/cli/chunks/unified-persistence-53KWNFQJ.js +2 -0
  278. package/dist/cli/chunks/{upgrade-DVIJ456A.js → upgrade-O6U7EA7V.js} +2 -2
  279. package/dist/cli/chunks/{validate-UYTSMJ5X.js → validate-FHNZ5XL3.js} +2 -2
  280. package/dist/cli/chunks/{validate-swarm-P32WCJR6.js → validate-swarm-YOLLUEHE.js} +2 -2
  281. package/dist/cli/chunks/{vibium-JGVOLM6X.js → vibium-UXRPEIXB.js} +2 -2
  282. package/dist/cli/chunks/visual-security-CRPYS7L7.js +2 -0
  283. package/dist/cli/chunks/{web-tree-sitter-5ZGNCTPN.js → web-tree-sitter-JJ5UIYFD.js} +2 -2
  284. package/dist/cli/chunks/{windsurf-installer-IILSSQAE.js → windsurf-installer-I4QMQPIL.js} +2 -2
  285. package/dist/cli/chunks/witness-chain-5WCR2CAS.js +2 -0
  286. package/dist/cli/chunks/{witness-chain-JZMXCG3B.js → witness-chain-BIJ7WDGS.js} +2 -2
  287. package/dist/cli/chunks/{witness-key-manager-UUTLNUIH.js → witness-key-manager-3SMMLJLP.js} +2 -2
  288. package/dist/cli/chunks/{workflow-NS7HXVHZ.js → workflow-33PUXXJV.js} +4 -4
  289. package/dist/cli/chunks/workflow-orchestrator-RZWCLTT5.js +2 -0
  290. package/dist/cli/chunks/{wrappers-XKEDSV5W.js → wrappers-ASAU36VK.js} +2 -2
  291. package/dist/cli/commands/platform.d.ts +1 -0
  292. package/dist/cli/commands/platform.js +28 -6
  293. package/dist/cli/commands/quality-gate.js +25 -3
  294. package/dist/cli/handlers/init-handler.d.ts +5 -0
  295. package/dist/cli/handlers/init-handler.js +6 -0
  296. package/dist/cli/index.js +4 -1
  297. package/dist/contracts/verdicts.d.ts +625 -0
  298. package/dist/contracts/verdicts.js +202 -14
  299. package/dist/coordination/handlers/coverage-handlers.js +8 -1
  300. package/dist/domains/chaos-resilience/diagnosis/corpus.d.ts +5 -0
  301. package/dist/domains/chaos-resilience/diagnosis/corpus.js +141 -0
  302. package/dist/domains/chaos-resilience/diagnosis/detectors.d.ts +11 -0
  303. package/dist/domains/chaos-resilience/diagnosis/detectors.js +109 -0
  304. package/dist/domains/chaos-resilience/diagnosis/index.d.ts +5 -0
  305. package/dist/domains/chaos-resilience/diagnosis/index.js +5 -0
  306. package/dist/domains/chaos-resilience/diagnosis/scorer.d.ts +8 -0
  307. package/dist/domains/chaos-resilience/diagnosis/scorer.js +128 -0
  308. package/dist/domains/chaos-resilience/diagnosis/types.d.ts +171 -0
  309. package/dist/domains/chaos-resilience/diagnosis/types.js +3 -0
  310. package/dist/domains/chaos-resilience/index.d.ts +1 -0
  311. package/dist/domains/chaos-resilience/index.js +1 -0
  312. package/dist/domains/index.d.ts +1 -0
  313. package/dist/domains/index.js +1 -0
  314. package/dist/early-exit/early-exit-controller.d.ts +4 -2
  315. package/dist/early-exit/early-exit-controller.js +95 -7
  316. package/dist/early-exit/index.d.ts +1 -1
  317. package/dist/early-exit/speculative-executor.js +3 -0
  318. package/dist/early-exit/types.d.ts +51 -0
  319. package/dist/early-exit/types.js +3 -0
  320. package/dist/index.d.ts +4 -2
  321. package/dist/index.js +2 -1
  322. package/dist/init/browser-engine-installer.d.ts +11 -0
  323. package/dist/init/browser-engine-installer.js +35 -5
  324. package/dist/init/codex-installer.d.ts +11 -1
  325. package/dist/init/codex-installer.js +90 -24
  326. package/dist/init/init-wizard-hooks.js +11 -11
  327. package/dist/init/orchestrator.js +2 -0
  328. package/dist/init/phases/07-hooks.d.ts +3 -3
  329. package/dist/init/phases/07-hooks.js +19 -18
  330. package/dist/init/phases/09-assets.d.ts +4 -0
  331. package/dist/init/phases/09-assets.js +13 -10
  332. package/dist/init/phases/phase-interface.d.ts +2 -0
  333. package/dist/init/types.d.ts +4 -0
  334. package/dist/learning/index.d.ts +3 -0
  335. package/dist/learning/index.js +2 -0
  336. package/dist/learning/pattern-mutation-error.d.ts +9 -0
  337. package/dist/learning/pattern-mutation-error.js +14 -0
  338. package/dist/learning/pattern-store.js +24 -2
  339. package/dist/learning/qe-reasoning-bank.js +24 -5
  340. package/dist/learning/rvf-pattern-store.js +23 -5
  341. package/dist/learning/structural-retrieval/corpus.d.ts +5 -0
  342. package/dist/learning/structural-retrieval/corpus.js +97 -0
  343. package/dist/learning/structural-retrieval/evaluate.d.ts +7 -0
  344. package/dist/learning/structural-retrieval/evaluate.js +124 -0
  345. package/dist/learning/structural-retrieval/index.d.ts +6 -0
  346. package/dist/learning/structural-retrieval/index.js +4 -0
  347. package/dist/learning/structural-retrieval/receipt.d.ts +14 -0
  348. package/dist/learning/structural-retrieval/receipt.js +36 -0
  349. package/dist/learning/structural-retrieval/types.d.ts +83 -0
  350. package/dist/learning/structural-retrieval/types.js +2 -0
  351. package/dist/mcp/bundle.js +423 -423
  352. package/dist/mcp/services/session-resume.d.ts +15 -19
  353. package/dist/mcp/services/session-resume.js +204 -194
  354. package/dist/mcp/tools/quality-assessment/gate.d.ts +8 -5
  355. package/dist/mcp/tools/quality-assessment/gate.js +9 -4
  356. package/dist/skills/qe-court/cli.js +0 -0
  357. package/dist/validation/quality-gate-runner.d.ts +27 -4
  358. package/dist/validation/quality-gate-runner.js +33 -4
  359. package/dist/validation/verification-reach.d.ts +90 -0
  360. package/dist/validation/verification-reach.js +187 -0
  361. package/dist/verification/adversarial-verify/index.d.ts +1 -1
  362. package/dist/verification/adversarial-verify/measurement-receipt.d.ts +13 -0
  363. package/dist/verification/adversarial-verify/measurement-receipt.js +136 -0
  364. package/dist/verification/adversarial-verify/synthesize.js +7 -10
  365. package/dist/verification/adversarial-verify/types.d.ts +35 -0
  366. package/dist/verification/adversarial-verify/verify.js +6 -1
  367. package/package.json +7 -4
  368. package/schemas/coverage-gap.schema.json +41 -0
  369. package/schemas/finding-verdict.schema.json +470 -0
  370. package/schemas/risk-decision.schema.json +41 -0
  371. package/dist/cli/chunks/adapter-3VBXL7DO.js +0 -2
  372. package/dist/cli/chunks/aqe-learning-engine-NXRNKJNA.js +0 -2
  373. package/dist/cli/chunks/base-F6GMOKU2.js +0 -2
  374. package/dist/cli/chunks/browser-workflow-QRDC46LR.js +0 -2
  375. package/dist/cli/chunks/chunk-R2B6EE45.js +0 -2
  376. package/dist/cli/chunks/chunk-TRDEULS7.js +0 -4
  377. package/dist/cli/chunks/chunk-WJXHE52V.js +0 -65
  378. package/dist/cli/chunks/client-HNBZUEVV.js +0 -2
  379. package/dist/cli/chunks/codex-installer-AKQ5BCHU.js +0 -15
  380. package/dist/cli/chunks/core-handlers-TB7NLYXL.js +0 -2
  381. package/dist/cli/chunks/cross-domain-router-MDSI553U.js +0 -2
  382. package/dist/cli/chunks/dream-X7ISHFEE.js +0 -2
  383. package/dist/cli/chunks/heartbeat-scheduler-2C5XGFQT.js +0 -2
  384. package/dist/cli/chunks/hnsw-adapter-KCVMXLUL.js +0 -2
  385. package/dist/cli/chunks/hnsw-index-OGWZS6MP.js +0 -2
  386. package/dist/cli/chunks/impact-analyzer-IBJ43GQL.js +0 -2
  387. package/dist/cli/chunks/init-wizard-6XMFD5LP.js +0 -2
  388. package/dist/cli/chunks/kernel-UDUMUPB3.js +0 -2
  389. package/dist/cli/chunks/knowledge-graph-JRYTUG3W.js +0 -2
  390. package/dist/cli/chunks/llm-router-service-KF5ZALUQ.js +0 -2
  391. package/dist/cli/chunks/load-test-LHMBCNCH.js +0 -2
  392. package/dist/cli/chunks/memory-backend-WZHKHBZK.js +0 -2
  393. package/dist/cli/chunks/pattern-null-store-UZSHCRL2.js +0 -2
  394. package/dist/cli/chunks/platform-WCRBO3Z7.js +0 -2
  395. package/dist/cli/chunks/protocol-executor-42NLVDTC.js +0 -2
  396. package/dist/cli/chunks/qe-reasoning-bank-W74RSMMU.js +0 -2
  397. package/dist/cli/chunks/quality-gate-63DDBSGM.js +0 -7
  398. package/dist/cli/chunks/queen-coordinator-XELKSRMS.js +0 -2
  399. package/dist/cli/chunks/router-GTW2EQZV.js +0 -2
  400. package/dist/cli/chunks/routing-feedback-NVOBWEMK.js +0 -2
  401. package/dist/cli/chunks/rvf-dual-writer-5OPVMXNL.js +0 -2
  402. package/dist/cli/chunks/rvf-migration-adapter-5S4YFTX4.js +0 -2
  403. package/dist/cli/chunks/rvf-native-adapter-LYSJHEVX.js +0 -2
  404. package/dist/cli/chunks/safe-db-AEB3JMLD.js +0 -2
  405. package/dist/cli/chunks/schedule-4QNPCQNT.js +0 -2
  406. package/dist/cli/chunks/scheduler-S3DFHX6A.js +0 -2
  407. package/dist/cli/chunks/sqlite-persistence-L2KISU2H.js +0 -2
  408. package/dist/cli/chunks/unified-memory-5KQMA7FV.js +0 -2
  409. package/dist/cli/chunks/unified-memory-hnsw-PQRPTYOD.js +0 -2
  410. package/dist/cli/chunks/unified-persistence-YDONVPJB.js +0 -2
  411. package/dist/cli/chunks/visual-security-RJ7RTNGJ.js +0 -2
  412. package/dist/cli/chunks/witness-chain-YXXXNGAM.js +0 -2
  413. package/dist/cli/chunks/workflow-orchestrator-5KUAVSTH.js +0 -2
@@ -1,29 +1,25 @@
1
- /**
2
- * Agentic QE v3 - Session Resume Service
3
- *
4
- * IMP-04: Transcript-First Session Durability
5
- * Reads an existing JSONL session file by sampling the head (first 4KB)
6
- * and tail (last 64KB) to reconstruct metadata and recent entries
7
- * without reading the entire file.
8
- *
9
- * @module mcp/services/session-resume
10
- */
11
1
  import type { SessionEntry, SessionMetadata } from './session-store';
2
+ export type SessionRecoveryDisposition = 'MISSING' | 'EMPTY' | 'LEGACY_UNVERIFIED' | 'INVALID' | 'UNTRUSTED' | 'RESOURCE_LIMIT';
3
+ export interface SessionResumeOptions {
4
+ /** Canonical directory that must contain the session file. */
5
+ sessionRoot: string;
6
+ /** Explicit compatibility opt-in; legacy JSONL has no commit proof. */
7
+ allowLegacyUnverified?: boolean;
8
+ maxFileBytes?: number;
9
+ maxRecordBytes?: number;
10
+ maxRecords?: number;
11
+ }
12
12
  export interface SessionResumeResult {
13
13
  metadata: SessionMetadata;
14
14
  recentEntries: SessionEntry[];
15
15
  lastState: 'idle' | 'running' | 'requires_action';
16
16
  canResume: boolean;
17
+ disposition: SessionRecoveryDisposition;
18
+ diagnostics: string[];
17
19
  }
18
20
  /**
19
- * Resume a session from a JSONL file.
20
- *
21
- * Reads the first 4KB (head) to extract session start metadata and
22
- * the last 64KB (tail) to get recent entries. Parses JSONL lines,
23
- * reconstructs the parentUuid linked list, and returns metadata +
24
- * recent entries + resume capability.
25
- *
26
- * Corrupt or incomplete lines are skipped gracefully.
21
+ * Inspect a legacy transcript through one no-follow descriptor. Automatic
22
+ * resume requires an explicit opt-in because this format has no commit marker.
27
23
  */
28
- export declare function resumeSession(filePath: string): SessionResumeResult;
24
+ export declare function resumeSession(filePath: string, options: SessionResumeOptions): SessionResumeResult;
29
25
  //# sourceMappingURL=session-resume.d.ts.map
@@ -1,221 +1,231 @@
1
- /**
2
- * Agentic QE v3 - Session Resume Service
3
- *
4
- * IMP-04: Transcript-First Session Durability
5
- * Reads an existing JSONL session file by sampling the head (first 4KB)
6
- * and tail (last 64KB) to reconstruct metadata and recent entries
7
- * without reading the entire file.
8
- *
9
- * @module mcp/services/session-resume
10
- */
1
+ /** Bounded, fail-closed recovery for legacy JSONL session transcripts. */
11
2
  import * as fs from 'fs';
12
3
  import * as path from 'path';
13
- // ============================================================================
14
- // Constants
15
- // ============================================================================
16
- const HEAD_BYTES = 4 * 1024; // 4KB
17
- const TAIL_BYTES = 64 * 1024; // 64KB
18
- // ============================================================================
19
- // Public API
20
- // ============================================================================
21
- /**
22
- * Resume a session from a JSONL file.
23
- *
24
- * Reads the first 4KB (head) to extract session start metadata and
25
- * the last 64KB (tail) to get recent entries. Parses JSONL lines,
26
- * reconstructs the parentUuid linked list, and returns metadata +
27
- * recent entries + resume capability.
28
- *
29
- * Corrupt or incomplete lines are skipped gracefully.
30
- */
31
- export function resumeSession(filePath) {
32
- // If file doesn't exist, return non-resumable result
33
- if (!fs.existsSync(filePath)) {
34
- return {
35
- metadata: {
36
- sessionId: extractSessionId(filePath),
37
- createdAt: 0,
38
- lastActivityAt: 0,
39
- entryCount: 0,
40
- state: 'idle',
41
- },
42
- recentEntries: [],
43
- lastState: 'idle',
44
- canResume: false,
45
- };
46
- }
47
- const stat = fs.statSync(filePath);
48
- const fileSize = stat.size;
49
- if (fileSize === 0) {
50
- return {
51
- metadata: {
52
- sessionId: extractSessionId(filePath),
53
- createdAt: 0,
54
- lastActivityAt: 0,
55
- entryCount: 0,
56
- state: 'idle',
57
- },
58
- recentEntries: [],
59
- lastState: 'idle',
60
- canResume: false,
61
- };
62
- }
63
- // Read head (first 4KB)
64
- const headEntries = readHead(filePath, fileSize);
65
- // Read tail (last 64KB)
66
- const tailEntries = readTail(filePath, fileSize);
67
- // Merge and deduplicate: use a Map keyed by uuid to ensure uniqueness
68
- const entryMap = new Map();
69
- for (const entry of headEntries) {
70
- entryMap.set(entry.uuid, entry);
71
- }
72
- for (const entry of tailEntries) {
73
- entryMap.set(entry.uuid, entry);
74
- }
75
- const allEntries = Array.from(entryMap.values());
76
- allEntries.sort((a, b) => a.timestamp - b.timestamp);
77
- // Reconstruct metadata from available entries
78
- const firstEntry = headEntries[0] ?? allEntries[0];
79
- const lastEntry = tailEntries[tailEntries.length - 1] ?? allEntries[allEntries.length - 1];
80
- // For entry count: if file is small enough that head+tail overlap,
81
- // allEntries.length is accurate. Otherwise, count total lines.
82
- let entryCount;
83
- if (fileSize <= HEAD_BYTES + TAIL_BYTES) {
84
- entryCount = allEntries.length;
85
- }
86
- else {
87
- entryCount = countLines(filePath);
88
- }
89
- const lastState = lastEntry?.state ?? 'idle';
90
- const metadata = {
91
- sessionId: extractSessionId(filePath),
92
- createdAt: firstEntry?.timestamp ?? 0,
93
- lastActivityAt: lastEntry?.timestamp ?? 0,
94
- entryCount,
95
- state: lastState,
96
- };
4
+ const DEFAULT_MAX_FILE_BYTES = 16 * 1024 * 1024;
5
+ const DEFAULT_MAX_RECORD_BYTES = 1024 * 1024;
6
+ const DEFAULT_MAX_RECORDS = 100_000;
7
+ const RECENT_ENTRY_LIMIT = 256;
8
+ const ENTRY_TYPES = new Set(['tool_call', 'tool_result', 'state_change', 'error']);
9
+ const ENTRY_STATES = new Set(['idle', 'running', 'requires_action']);
10
+ const ENTRY_KEYS = new Set([
11
+ 'uuid', 'parentUuid', 'timestamp', 'type', 'toolName', 'params', 'result', 'state', 'tokenEstimate',
12
+ ]);
13
+ const UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
14
+ function emptyResult(filePath, disposition, diagnostics = []) {
97
15
  return {
98
- metadata,
99
- recentEntries: tailEntries,
100
- lastState,
101
- canResume: allEntries.length > 0,
16
+ metadata: {
17
+ sessionId: path.basename(filePath, '.jsonl'), createdAt: 0, lastActivityAt: 0,
18
+ entryCount: 0, state: 'idle',
19
+ },
20
+ recentEntries: [], lastState: 'idle', canResume: false, disposition, diagnostics,
102
21
  };
103
22
  }
104
- // ============================================================================
105
- // Private helpers
106
- // ============================================================================
107
- /**
108
- * Extract session ID from file path (filename without extension).
109
- */
110
- function extractSessionId(filePath) {
111
- return path.basename(filePath, '.jsonl');
23
+ function isWithin(root, candidate) {
24
+ const relative = path.relative(root, candidate);
25
+ return relative === '' || (!relative.startsWith(`..${path.sep}`) && relative !== '..' && !path.isAbsolute(relative));
112
26
  }
113
- /**
114
- * Read and parse the first HEAD_BYTES of the file.
115
- */
116
- function readHead(filePath, fileSize) {
117
- const bytesToRead = Math.min(HEAD_BYTES, fileSize);
118
- const fd = fs.openSync(filePath, 'r');
27
+ function isValidEntry(value) {
28
+ if (!value || typeof value !== 'object' || Array.isArray(value))
29
+ return false;
30
+ const entry = value;
31
+ if (Object.keys(entry).some(key => !ENTRY_KEYS.has(key)))
32
+ return false;
33
+ const params = entry.params;
34
+ return typeof entry.uuid === 'string' && UUID_PATTERN.test(entry.uuid)
35
+ && (entry.parentUuid === null
36
+ || (typeof entry.parentUuid === 'string' && UUID_PATTERN.test(entry.parentUuid)))
37
+ && typeof entry.timestamp === 'number' && Number.isSafeInteger(entry.timestamp) && entry.timestamp >= 0
38
+ && typeof entry.type === 'string' && ENTRY_TYPES.has(entry.type)
39
+ && typeof entry.state === 'string' && ENTRY_STATES.has(entry.state)
40
+ && (entry.toolName === undefined || (typeof entry.toolName === 'string' && entry.toolName.length > 0))
41
+ && (params === undefined || (typeof params === 'object' && params !== null && !Array.isArray(params)))
42
+ && (entry.tokenEstimate === undefined || (typeof entry.tokenEstimate === 'number'
43
+ && Number.isSafeInteger(entry.tokenEstimate)
44
+ && entry.tokenEstimate >= 0));
45
+ }
46
+ function resolveLimit(value, defaultValue) {
47
+ const limit = value ?? defaultValue;
48
+ return Number.isSafeInteger(limit) && limit > 0 && limit <= defaultValue ? limit : undefined;
49
+ }
50
+ function sameFile(left, right) {
51
+ return left.dev === right.dev && left.ino === right.ino;
52
+ }
53
+ function validateOpenedPath(fd, candidate, root, openedStat) {
119
54
  try {
120
- const buffer = Buffer.alloc(bytesToRead);
121
- fs.readSync(fd, buffer, 0, bytesToRead, 0);
122
- const text = buffer.toString('utf-8');
123
- return parseJsonlLines(text, /* isHead */ true);
55
+ const canonicalTarget = fs.realpathSync(candidate);
56
+ const currentStat = fs.lstatSync(candidate);
57
+ if (!isWithin(root, canonicalTarget) || currentStat.isSymbolicLink() || !sameFile(openedStat, currentStat)) {
58
+ return 'session path changed or escaped the configured root';
59
+ }
60
+ // Linux exposes the descriptor target directly. This closes intermediate
61
+ // component substitution without relying only on the current pathname.
62
+ if (process.platform === 'linux') {
63
+ const descriptorTarget = fs.realpathSync(`/proc/self/fd/${fd}`);
64
+ if (!isWithin(root, descriptorTarget))
65
+ return 'opened session descriptor escapes the configured root';
66
+ }
124
67
  }
125
- finally {
126
- fs.closeSync(fd);
68
+ catch {
69
+ return 'opened session path cannot be verified';
127
70
  }
71
+ return undefined;
72
+ }
73
+ function readExactly(fd, fileSize) {
74
+ const buffer = Buffer.alloc(fileSize);
75
+ let offset = 0;
76
+ while (offset < fileSize) {
77
+ const count = fs.readSync(fd, buffer, offset, fileSize - offset, offset);
78
+ if (count === 0)
79
+ throw new Error('unexpected EOF while reading session transcript');
80
+ offset += count;
81
+ }
82
+ return buffer;
128
83
  }
129
84
  /**
130
- * Read and parse the last TAIL_BYTES of the file.
85
+ * Inspect a legacy transcript through one no-follow descriptor. Automatic
86
+ * resume requires an explicit opt-in because this format has no commit marker.
131
87
  */
132
- function readTail(filePath, fileSize) {
133
- const bytesToRead = Math.min(TAIL_BYTES, fileSize);
134
- const offset = Math.max(0, fileSize - bytesToRead);
135
- const fd = fs.openSync(filePath, 'r');
88
+ export function resumeSession(filePath, options) {
89
+ if (!options || typeof options.sessionRoot !== 'string' || options.sessionRoot.trim().length === 0) {
90
+ return emptyResult(filePath, 'UNTRUSTED', ['a non-empty session root is required']);
91
+ }
92
+ const maxFileBytes = resolveLimit(options.maxFileBytes, DEFAULT_MAX_FILE_BYTES);
93
+ const maxRecordBytes = resolveLimit(options.maxRecordBytes, DEFAULT_MAX_RECORD_BYTES);
94
+ const maxRecords = resolveLimit(options.maxRecords, DEFAULT_MAX_RECORDS);
95
+ if (maxFileBytes === undefined || maxRecordBytes === undefined || maxRecords === undefined) {
96
+ return emptyResult(filePath, 'RESOURCE_LIMIT', ['recovery limits must be finite positive integers within hard ceilings']);
97
+ }
98
+ const candidate = path.resolve(filePath);
99
+ let root;
100
+ let parent;
136
101
  try {
137
- const buffer = Buffer.alloc(bytesToRead);
138
- fs.readSync(fd, buffer, 0, bytesToRead, offset);
139
- const text = buffer.toString('utf-8');
140
- // When offset is 0, we read from the start of the file so
141
- // the first line is complete -- don't skip it.
142
- const isMidFileRead = offset > 0;
143
- return parseJsonlLines(text, /* isHead */ false, isMidFileRead);
102
+ root = fs.realpathSync(options.sessionRoot);
103
+ parent = fs.realpathSync(path.dirname(candidate));
104
+ if (!fs.statSync(root).isDirectory())
105
+ throw new Error('session root is not a directory');
144
106
  }
145
- finally {
146
- fs.closeSync(fd);
107
+ catch {
108
+ return emptyResult(filePath, 'UNTRUSTED', ['session root or parent cannot be resolved']);
147
109
  }
148
- }
149
- /**
150
- * Parse JSONL text into SessionEntry[], skipping corrupt/incomplete lines.
151
- * When reading from a mid-file offset (tail), the first partial line is skipped.
152
- * When reading head, the last partial line is skipped if the chunk doesn't
153
- * end with a newline.
154
- *
155
- * @param text - Raw text from the file chunk
156
- * @param isHead - Whether this is a head read (skip trailing partial line)
157
- * @param skipFirstLine - Whether to skip the first line (true for mid-file
158
- * tail reads where the first line is likely a partial). Defaults to !isHead.
159
- */
160
- function parseJsonlLines(text, isHead, skipFirstLine) {
161
- const lines = text.split('\n');
162
- const entries = [];
163
- // Default: skip first line for non-head reads (standard tail behavior)
164
- const shouldSkipFirst = skipFirstLine ?? !isHead;
165
- for (let i = 0; i < lines.length; i++) {
166
- const line = lines[i].trim();
167
- if (!line)
168
- continue;
169
- // Skip first line of mid-file tail read (may be partial)
170
- if (shouldSkipFirst && i === 0 && lines.length > 1)
171
- continue;
172
- // Skip last line of head read if it may be truncated
173
- if (isHead && i === lines.length - 1 && lines.length > 1 && !text.endsWith('\n'))
174
- continue;
175
- try {
176
- const entry = JSON.parse(line);
177
- if (isValidEntry(entry)) {
178
- entries.push(entry);
110
+ if (!isWithin(root, parent)) {
111
+ return emptyResult(filePath, 'UNTRUSTED', ['session path escapes the configured root']);
112
+ }
113
+ let linkStat;
114
+ try {
115
+ linkStat = fs.lstatSync(candidate);
116
+ }
117
+ catch (error) {
118
+ const code = error.code;
119
+ return emptyResult(filePath, code === 'ENOENT' ? 'MISSING' : 'UNTRUSTED', [`lstat failed: ${code ?? 'UNKNOWN'}`]);
120
+ }
121
+ if (linkStat.isSymbolicLink() || !linkStat.isFile()) {
122
+ return emptyResult(filePath, 'UNTRUSTED', ['session path is not a regular, non-symlink file']);
123
+ }
124
+ let fd;
125
+ try {
126
+ fd = fs.openSync(candidate, fs.constants.O_RDONLY | (fs.constants.O_NOFOLLOW ?? 0));
127
+ const stat = fs.fstatSync(fd);
128
+ if (!sameFile(linkStat, stat)) {
129
+ return emptyResult(filePath, 'UNTRUSTED', ['session path changed before secure open']);
130
+ }
131
+ if (!stat.isFile() || stat.nlink !== 1) {
132
+ return emptyResult(filePath, 'UNTRUSTED', ['opened session is not an exclusive regular file']);
133
+ }
134
+ if (stat.size === 0)
135
+ return emptyResult(filePath, 'EMPTY');
136
+ if (stat.size > maxFileBytes) {
137
+ return emptyResult(filePath, 'RESOURCE_LIMIT', [`file exceeds ${maxFileBytes} bytes`]);
138
+ }
139
+ const pathError = validateOpenedPath(fd, candidate, root, stat);
140
+ if (pathError)
141
+ return emptyResult(filePath, 'UNTRUSTED', [pathError]);
142
+ const bytes = readExactly(fd, stat.size);
143
+ const finalStat = fs.fstatSync(fd);
144
+ const finalPathError = validateOpenedPath(fd, candidate, root, finalStat);
145
+ if (finalPathError || !sameFile(stat, finalStat) || stat.size !== finalStat.size
146
+ || stat.mtimeMs !== finalStat.mtimeMs || stat.ctimeMs !== finalStat.ctimeMs) {
147
+ return emptyResult(filePath, 'UNTRUSTED', [finalPathError ?? 'session changed while it was being inspected']);
148
+ }
149
+ const hasTornTail = bytes[bytes.length - 1] !== 0x0a;
150
+ let committedBytes = bytes;
151
+ if (hasTornTail) {
152
+ const finalLineBreak = bytes.lastIndexOf(0x0a);
153
+ const tornTailStart = finalLineBreak + 1;
154
+ const tornTailBytes = bytes.length - tornTailStart;
155
+ if (tornTailBytes > maxRecordBytes) {
156
+ return emptyResult(filePath, 'RESOURCE_LIMIT', [`record exceeds ${maxRecordBytes} bytes`]);
179
157
  }
158
+ committedBytes = bytes.subarray(0, tornTailStart);
159
+ }
160
+ let text;
161
+ try {
162
+ text = new TextDecoder('utf-8', { fatal: true }).decode(committedBytes);
180
163
  }
181
164
  catch {
182
- // Skip corrupt lines
183
- continue;
165
+ return emptyResult(filePath, 'INVALID', ['transcript is not valid UTF-8']);
184
166
  }
185
- }
186
- return entries;
187
- }
188
- /**
189
- * Minimal validation that a parsed object looks like a SessionEntry.
190
- */
191
- function isValidEntry(obj) {
192
- if (typeof obj !== 'object' || obj === null)
193
- return false;
194
- const entry = obj;
195
- return (typeof entry.uuid === 'string' &&
196
- typeof entry.timestamp === 'number' &&
197
- typeof entry.type === 'string' &&
198
- typeof entry.state === 'string');
199
- }
200
- /**
201
- * Count total lines in a file (for large files where head+tail don't overlap).
202
- * Only counts non-empty lines that parse as valid JSON.
203
- */
204
- function countLines(filePath) {
205
- const content = fs.readFileSync(filePath, 'utf-8');
206
- let count = 0;
207
- for (const line of content.split('\n')) {
208
- const trimmed = line.trim();
209
- if (trimmed) {
167
+ const lines = text.split('\n');
168
+ const entries = [];
169
+ const seen = new Set();
170
+ let previous;
171
+ for (const rawLine of lines) {
172
+ if (!rawLine.trim())
173
+ continue;
174
+ if (Buffer.byteLength(rawLine, 'utf8') > maxRecordBytes) {
175
+ return emptyResult(filePath, 'RESOURCE_LIMIT', [`record exceeds ${maxRecordBytes} bytes`]);
176
+ }
177
+ if (entries.length >= maxRecords) {
178
+ return emptyResult(filePath, 'RESOURCE_LIMIT', [`record count exceeds ${maxRecords}`]);
179
+ }
180
+ let parsed;
210
181
  try {
211
- JSON.parse(trimmed);
212
- count++;
182
+ parsed = JSON.parse(rawLine);
213
183
  }
214
184
  catch {
215
- // Skip corrupt lines in count
185
+ return emptyResult(filePath, 'INVALID', ['corrupt JSON occurs before the final torn record']);
186
+ }
187
+ if (!isValidEntry(parsed))
188
+ return emptyResult(filePath, 'INVALID', ['entry fails the session schema']);
189
+ if (seen.has(parsed.uuid))
190
+ return emptyResult(filePath, 'INVALID', ['duplicate entry UUID']);
191
+ if (previous) {
192
+ if (parsed.parentUuid !== previous.uuid)
193
+ return emptyResult(filePath, 'INVALID', ['broken parentUuid lineage']);
194
+ if (parsed.timestamp < previous.timestamp)
195
+ return emptyResult(filePath, 'INVALID', ['timestamps are not monotonic']);
216
196
  }
197
+ else if (parsed.parentUuid !== null) {
198
+ return emptyResult(filePath, 'INVALID', ['first entry has a forged parentUuid']);
199
+ }
200
+ seen.add(parsed.uuid);
201
+ entries.push(parsed);
202
+ previous = parsed;
203
+ }
204
+ if (entries.length === 0) {
205
+ return emptyResult(filePath, hasTornTail ? 'INVALID' : 'EMPTY', hasTornTail ? ['only record is torn'] : []);
217
206
  }
207
+ const lastEntry = entries[entries.length - 1];
208
+ const diagnostics = [
209
+ 'legacy JSONL has no durable commit marker',
210
+ ...(hasTornTail ? ['discarded an incomplete final record'] : []),
211
+ ];
212
+ return {
213
+ metadata: {
214
+ sessionId: path.basename(filePath, '.jsonl'), createdAt: entries[0].timestamp,
215
+ lastActivityAt: lastEntry.timestamp, entryCount: entries.length, state: lastEntry.state,
216
+ },
217
+ recentEntries: entries.slice(-RECENT_ENTRY_LIMIT), lastState: lastEntry.state,
218
+ canResume: options.allowLegacyUnverified === true,
219
+ disposition: 'LEGACY_UNVERIFIED', diagnostics,
220
+ };
221
+ }
222
+ catch (error) {
223
+ const code = error.code;
224
+ return emptyResult(filePath, 'UNTRUSTED', [`secure open/read failed: ${code ?? 'UNKNOWN'}`]);
225
+ }
226
+ finally {
227
+ if (fd !== undefined)
228
+ fs.closeSync(fd);
218
229
  }
219
- return count;
220
230
  }
221
231
  //# sourceMappingURL=session-resume.js.map
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Agentic QE v3 - Quality Gate MCP Tool (ADR-119)
3
3
  *
4
- * qe/quality/gate - two-gate, three-valued quality verdict against a pinned
5
- * ADR-117 checklist. Calls the SAME `runQualityGate` orchestrator as the
4
+ * qe/quality/gate - fail-closed quality and verification-reach verdict against
5
+ * a pinned ADR-117 checklist. Calls the SAME `runQualityGate` orchestrator as the
6
6
  * `aqe quality-gate` CLI subcommand so CLI and MCP stay in exact parity.
7
7
  *
8
8
  * The frontier judge is built from the forwarded HybridRouter
@@ -11,7 +11,8 @@
11
11
  */
12
12
  import { MCPToolBase, MCPToolConfig, MCPToolContext } from '../base';
13
13
  import { ToolResult } from '../../types';
14
- import type { QualityVerdictResult } from '../../../validation/quality-verdict.js';
14
+ import { type ReachAwareQualityGateResult } from '../../../validation/quality-gate-runner.js';
15
+ import type { VerificationReachManifest } from '../../../validation/verification-reach.js';
15
16
  export interface QualityGateParams {
16
17
  /** Pinned anchor checklist id (e.g. "A1-inRange"). */
17
18
  checklistId: string;
@@ -27,12 +28,14 @@ export interface QualityGateParams {
27
28
  } | null;
28
29
  /** Override the frozen anchor path (ADR-117). */
29
30
  anchorPath?: string;
31
+ /** Revision-bound evidence proving which failure modes the checks can observe. */
32
+ verificationManifest?: VerificationReachManifest;
30
33
  /** Frontier judge model id (ADR-111: always frontier-tier). */
31
34
  model?: string;
32
35
  [key: string]: unknown;
33
36
  }
34
- export declare class QualityGateTool extends MCPToolBase<QualityGateParams, QualityVerdictResult> {
37
+ export declare class QualityGateTool extends MCPToolBase<QualityGateParams, ReachAwareQualityGateResult> {
35
38
  readonly config: MCPToolConfig;
36
- execute(params: QualityGateParams, context: MCPToolContext): Promise<ToolResult<QualityVerdictResult>>;
39
+ execute(params: QualityGateParams, context: MCPToolContext): Promise<ToolResult<ReachAwareQualityGateResult>>;
37
40
  }
38
41
  //# sourceMappingURL=gate.d.ts.map
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Agentic QE v3 - Quality Gate MCP Tool (ADR-119)
3
3
  *
4
- * qe/quality/gate - two-gate, three-valued quality verdict against a pinned
5
- * ADR-117 checklist. Calls the SAME `runQualityGate` orchestrator as the
4
+ * qe/quality/gate - fail-closed quality and verification-reach verdict against
5
+ * a pinned ADR-117 checklist. Calls the SAME `runQualityGate` orchestrator as the
6
6
  * `aqe quality-gate` CLI subcommand so CLI and MCP stay in exact parity.
7
7
  *
8
8
  * The frontier judge is built from the forwarded HybridRouter
@@ -12,13 +12,13 @@
12
12
  import { MCPToolBase } from '../base.js';
13
13
  import { toErrorMessage } from '../../../shared/error-utils.js';
14
14
  import { getLLMRouter } from '../base.js';
15
- import { runQualityGate } from '../../../validation/quality-gate-runner.js';
15
+ import { runQualityGate, } from '../../../validation/quality-gate-runner.js';
16
16
  import { createRouterFrontierJudge, createUnavailableJudge, } from '../../../validation/frontier-judge.js';
17
17
  export class QualityGateTool extends MCPToolBase {
18
18
  config = {
19
19
  name: 'qe/quality/gate',
20
20
  description: 'Two-gate, three-valued quality verdict (ADR-119): mechanical oracle gate plus a frontier '
21
- + 'judge grading the artifact against a pinned ADR-117 checklist. Returns pass|fail|inconclusive.',
21
+ + 'judge grading plus failure-mode verification reach. Returns pass|fail|inconclusive.',
22
22
  domain: 'quality-assessment',
23
23
  schema: QUALITY_GATE_SCHEMA,
24
24
  streaming: false,
@@ -48,6 +48,7 @@ export class QualityGateTool extends MCPToolBase {
48
48
  checklistId: params.checklistId,
49
49
  judge,
50
50
  anchorPath: params.anchorPath,
51
+ verificationManifest: params.verificationManifest,
51
52
  });
52
53
  return { success: true, data: result };
53
54
  }
@@ -79,6 +80,10 @@ const QUALITY_GATE_SCHEMA = {
79
80
  type: 'string',
80
81
  description: 'Override the frozen anchor path (ADR-117)',
81
82
  },
83
+ verificationManifest: {
84
+ type: 'object',
85
+ description: 'Hashed, revision-bound failure-mode verification reach manifest (#651)',
86
+ },
82
87
  model: {
83
88
  type: 'string',
84
89
  description: 'Frontier judge model id (ADR-111: always frontier-tier)',
File without changes
@@ -8,14 +8,17 @@
8
8
  * 1. loads the pinned, hash-checked ADR-117 anchor via `loadAnchorSet` (which
9
9
  * throws on drift — the frozen checklist can't be silently edited),
10
10
  * 2. selects the constant-denominator checklist for `checklistId`,
11
- * 3. runs the two-gate, three-valued `computeQualityVerdict` with the injected
12
- * frontier judge.
11
+ * 3. evaluates the revision-bound failure-mode reach manifest before any
12
+ * judge call (missing legacy manifests remain explicitly inconclusive),
13
+ * 4. runs the two-gate, three-valued `computeQualityVerdict` with the injected
14
+ * frontier judge and combines the independent verdicts fail-closed.
13
15
  *
14
16
  * The oracle result and the judge are injected — this module owns no LLM and no
15
17
  * mutation runner, so it is deterministic and unit-testable with a fake judge.
16
18
  */
17
19
  import { type Judge, type QualityVerdictResult, type RequirementChecklist } from './quality-verdict.js';
18
20
  import type { OracleResult } from './oracle-eval.js';
21
+ import { type VerificationCoverageVerdict, type VerificationReachManifest, type VerificationReachResult } from './verification-reach.js';
19
22
  /** Default frozen anchor location, relative to the project root (ADR-117). */
20
23
  export declare const DEFAULT_ANCHOR_RELATIVE_PATH = "verification/anchors/qe-anchor-v1.json";
21
24
  export interface QualityGateRequest {
@@ -32,13 +35,33 @@ export interface QualityGateRequest {
32
35
  judge: Judge;
33
36
  /** Override the frozen anchor path (absolute, or relative to project root). */
34
37
  anchorPath?: string;
38
+ /** Revision-bound failure-mode reach evidence. Omit only for legacy migration. */
39
+ verificationManifest?: VerificationReachManifest;
40
+ }
41
+ export interface LegacyUnknownVerificationCoverage {
42
+ kind: 'legacy-unknown';
43
+ coverageVerdict: 'inconclusive';
44
+ reason: string;
45
+ }
46
+ export interface VerifiedVerificationCoverage extends VerificationReachResult {
47
+ kind: 'verified';
48
+ }
49
+ export type QualityGateVerificationCoverage = LegacyUnknownVerificationCoverage | VerifiedVerificationCoverage;
50
+ export interface ReachAwareQualityGateResult extends QualityVerdictResult {
51
+ /** Threshold/oracle/judge verdict before verification-reach preflight. */
52
+ qualityVerdict: QualityVerdictResult['verdict'];
53
+ /** Independent verdict for required failure-mode observation coverage. */
54
+ coverageVerdict: VerificationCoverageVerdict;
55
+ /** Overall fail-closed verdict. A pass requires both independent gates to pass. */
56
+ verdict: QualityVerdictResult['verdict'];
57
+ verification: QualityGateVerificationCoverage;
35
58
  }
36
59
  /**
37
60
  * Run the two-gate quality gate for one artifact against one pinned checklist.
38
61
  * Throws only for caller error (unknown checklist id, unloadable/drifted anchor);
39
- * every judgement outcome is returned as a three-valued `QualityVerdictResult`.
62
+ * every judgement outcome is returned as a three-valued reach-aware result.
40
63
  */
41
- export declare function runQualityGate(req: QualityGateRequest): Promise<QualityVerdictResult>;
64
+ export declare function runQualityGate(req: QualityGateRequest): Promise<ReachAwareQualityGateResult>;
42
65
  /**
43
66
  * Load the pinned checklist for `checklistId` from the frozen anchor. Exposed so
44
67
  * callers (CLI/MCP) can list valid ids or pre-validate before building a judge.