@ebrindley/build 0.0.0-stage → 1.42.1-rc28

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 (878) hide show
  1. package/.build-project/providers/catalog.json +13951 -0
  2. package/.build-project/providers/pricing.json +1978 -0
  3. package/.build-project/providers/registry.json +4103 -0
  4. package/.github/SECURITY.md +75 -0
  5. package/.nvmrc +1 -0
  6. package/CHANGELOG.md +661 -0
  7. package/CODE_OF_CONDUCT.md +44 -0
  8. package/CONTRIBUTING.md +24 -0
  9. package/INSTALL.md +623 -0
  10. package/LICENSE +21 -0
  11. package/README.md +118 -2
  12. package/THIRD_PARTY_NOTICES.txt +26 -0
  13. package/dist/ai-judge-UE5UOYOO.js +191 -0
  14. package/dist/allowlist-grounding-KPLN6NC5.js +16 -0
  15. package/dist/allowlist-utils-MZZKKXRD.js +31 -0
  16. package/dist/apply-completion-mode-EM37UZHB.js +110 -0
  17. package/dist/artifact-migrator-WPACNSEP.js +276 -0
  18. package/dist/ask-2OZ4JFQR.js +176 -0
  19. package/dist/auth-6UKBTJUQ.js +185 -0
  20. package/dist/auth-H5KJL6HL.js +165 -0
  21. package/dist/auth-LVJRJDMU.js +12 -0
  22. package/dist/auth-NHZOCNRR.js +94 -0
  23. package/dist/auth-PBXHWXGW.js +95 -0
  24. package/dist/auth-T7Y5DCAH.js +91 -0
  25. package/dist/auth-TVVKCHQW.js +13 -0
  26. package/dist/auth-UHB2UCSS.js +97 -0
  27. package/dist/auth-VACA3VUL.js +98 -0
  28. package/dist/auth-VVLC77S3.js +44 -0
  29. package/dist/auth-liveness-XO4AGDDD.js +53 -0
  30. package/dist/autoloop-cleanup-SI3VGAAR.js +106 -0
  31. package/dist/autoloop-evidence-gates-J5GG5YQB.js +39 -0
  32. package/dist/autoloop-gate-policy-SUNAEP6Q.js +169 -0
  33. package/dist/autoloop-helpers-VQGQNTT6.js +52 -0
  34. package/dist/autoloop-ledger-P6TIDP7C.js +96 -0
  35. package/dist/autoloop-ledger-subscriber-HFAGOZXH.js +161 -0
  36. package/dist/autoloop-run-defaults-GWGZBNT7.js +27 -0
  37. package/dist/autoloop-run-lock-GBWRM5A2.js +197 -0
  38. package/dist/autoloop-success-C32QVWOP.js +93 -0
  39. package/dist/autoloop-termination-summary-GI6IBQWD.js +58 -0
  40. package/dist/autoloop-trajectory-AMKSQISD.js +70 -0
  41. package/dist/autoloop-wall-clock-T7ZVIQOC.js +12 -0
  42. package/dist/automatic-branch-cleanup-R62X2C5O.js +49 -0
  43. package/dist/autonomous-loop-controller-2WL363LW.js +4386 -0
  44. package/dist/backend-YUTFDZXZ.js +30 -0
  45. package/dist/background-executor-Z3ODTMD7.js +260 -0
  46. package/dist/backlog-75QPEAMW.js +403 -0
  47. package/dist/backlog-execution-intent-GWUV5TUK.js +19 -0
  48. package/dist/backup-active-store-XHWLN34M.js +16 -0
  49. package/dist/backup-machine-stores-UI4LTJOY.js +251 -0
  50. package/dist/backup-telemetry-db-Z4ICYCNW.js +26 -0
  51. package/dist/branch-archive-manager-FMSQ7YJF.js +18 -0
  52. package/dist/branch-cleanup-manager-ST6FJGND.js +35 -0
  53. package/dist/build-gate-7NKWPY62.js +68 -0
  54. package/dist/build-root-S7DINODY.js +18 -0
  55. package/dist/change-summary-R6CB6VXJ.js +50 -0
  56. package/dist/chunk-24MNKKOM.js +173 -0
  57. package/dist/chunk-2H6VZFIO.js +235 -0
  58. package/dist/chunk-2JIX3EKV.js +39 -0
  59. package/dist/chunk-2KO7HVZM.js +106 -0
  60. package/dist/chunk-2L36U25O.js +100 -0
  61. package/dist/chunk-2NMNFUQA.js +475 -0
  62. package/dist/chunk-2OUAEH67.js +83 -0
  63. package/dist/chunk-2VLJUXJU.js +115 -0
  64. package/dist/chunk-2VUEDIUM.js +77 -0
  65. package/dist/chunk-2Y2IIHPI.js +430 -0
  66. package/dist/chunk-2YRG3LHZ.js +220 -0
  67. package/dist/chunk-2Z5Q3SUY.js +65 -0
  68. package/dist/chunk-32IYXIE5.js +873 -0
  69. package/dist/chunk-33IGPPUI.js +292 -0
  70. package/dist/chunk-352PCJLK.js +283 -0
  71. package/dist/chunk-35J4NE6S.js +226 -0
  72. package/dist/chunk-3C7WBIVK.js +1016 -0
  73. package/dist/chunk-3H3EY6U7.js +1225 -0
  74. package/dist/chunk-3H4MWYIC.js +198 -0
  75. package/dist/chunk-3HHWQR3N.js +2479 -0
  76. package/dist/chunk-3JKNRYEE.js +14 -0
  77. package/dist/chunk-3LECCYZY.js +128 -0
  78. package/dist/chunk-3LOY6YZI.js +852 -0
  79. package/dist/chunk-3M57DADF.js +44 -0
  80. package/dist/chunk-3NOTLVLG.js +3803 -0
  81. package/dist/chunk-3OPP2OZB.js +1480 -0
  82. package/dist/chunk-3P5IN5E7.js +9 -0
  83. package/dist/chunk-3PL22IYZ.js +20 -0
  84. package/dist/chunk-3REDAJUJ.js +14 -0
  85. package/dist/chunk-3S2R4XJI.js +203 -0
  86. package/dist/chunk-3UBZI5DW.js +61 -0
  87. package/dist/chunk-3VV5OBGG.js +308 -0
  88. package/dist/chunk-3WY5TU2O.js +823 -0
  89. package/dist/chunk-43OKHTW4.js +82 -0
  90. package/dist/chunk-45KUJBDI.js +112 -0
  91. package/dist/chunk-47X5LM7B.js +224 -0
  92. package/dist/chunk-4B6FQJ77.js +268 -0
  93. package/dist/chunk-4BTDUT2S.js +42 -0
  94. package/dist/chunk-4DJL2VXA.js +24 -0
  95. package/dist/chunk-4EBSXZ73.js +48 -0
  96. package/dist/chunk-4QKP6I4C.js +294 -0
  97. package/dist/chunk-4U6XK2DG.js +300 -0
  98. package/dist/chunk-4UMRUFBD.js +132 -0
  99. package/dist/chunk-4US4SYJ4.js +569 -0
  100. package/dist/chunk-4ZPLWEZO.js +154 -0
  101. package/dist/chunk-56WPYDJH.js +624 -0
  102. package/dist/chunk-57WRCJJW.js +50 -0
  103. package/dist/chunk-5AW4RMNG.js +24 -0
  104. package/dist/chunk-5EQN56OZ.js +155 -0
  105. package/dist/chunk-5F43TUIN.js +38 -0
  106. package/dist/chunk-5FKHIKTS.js +115 -0
  107. package/dist/chunk-5HDP7XZG.js +91 -0
  108. package/dist/chunk-5KQETTNS.js +152 -0
  109. package/dist/chunk-5PDVN2KO.js +498 -0
  110. package/dist/chunk-5UBIFVRD.js +509 -0
  111. package/dist/chunk-5YDE3Q62.js +46 -0
  112. package/dist/chunk-626AJVMU.js +302 -0
  113. package/dist/chunk-633XZ7UF.js +3583 -0
  114. package/dist/chunk-63DHNHGA.js +236 -0
  115. package/dist/chunk-666656AR.js +568 -0
  116. package/dist/chunk-67YRJPJO.js +19 -0
  117. package/dist/chunk-6CAU7VBA.js +20 -0
  118. package/dist/chunk-6CB3KJRY.js +21 -0
  119. package/dist/chunk-6DBMALXL.js +29 -0
  120. package/dist/chunk-6E25C4IA.js +269 -0
  121. package/dist/chunk-6FIBNIQU.js +73 -0
  122. package/dist/chunk-6G57FYBV.js +189 -0
  123. package/dist/chunk-6KZKRTG3.js +4885 -0
  124. package/dist/chunk-6LAH2UV2.js +525 -0
  125. package/dist/chunk-6PZY2TTU.js +921 -0
  126. package/dist/chunk-6T6NHXK4.js +230 -0
  127. package/dist/chunk-6TBEX4R4.js +432 -0
  128. package/dist/chunk-6TRD7TEE.js +911 -0
  129. package/dist/chunk-6XCP2RAI.js +47 -0
  130. package/dist/chunk-726G6WDL.js +351 -0
  131. package/dist/chunk-75EMT7BF.js +616 -0
  132. package/dist/chunk-762ACDZJ.js +4696 -0
  133. package/dist/chunk-77I6G4CO.js +1 -0
  134. package/dist/chunk-7DJ6SQH3.js +510 -0
  135. package/dist/chunk-7HPCIOMA.js +1383 -0
  136. package/dist/chunk-7HYBSRPZ.js +17503 -0
  137. package/dist/chunk-7KBEOPVB.js +73 -0
  138. package/dist/chunk-7LHJDJB3.js +2222 -0
  139. package/dist/chunk-7NVJMH52.js +306 -0
  140. package/dist/chunk-7RMARDVH.js +33 -0
  141. package/dist/chunk-7SEWU4QG.js +36 -0
  142. package/dist/chunk-7TUTZTI2.js +911 -0
  143. package/dist/chunk-7VBDFPUM.js +340 -0
  144. package/dist/chunk-7VRJHTGZ.js +6406 -0
  145. package/dist/chunk-7YAOUUKK.js +493 -0
  146. package/dist/chunk-AAAODV76.js +860 -0
  147. package/dist/chunk-AB4HUJVQ.js +339 -0
  148. package/dist/chunk-AEQWV746.js +611 -0
  149. package/dist/chunk-AHU3FKPA.js +11639 -0
  150. package/dist/chunk-AISTV5XU.js +226 -0
  151. package/dist/chunk-AJBTKGJZ.js +48 -0
  152. package/dist/chunk-AJJNW7XT.js +248 -0
  153. package/dist/chunk-AJN5Y5YZ.js +160 -0
  154. package/dist/chunk-ALDTFNZ3.js +150 -0
  155. package/dist/chunk-ARARVIZK.js +281 -0
  156. package/dist/chunk-ATBM6AW5.js +53 -0
  157. package/dist/chunk-ATKEKM3E.js +206 -0
  158. package/dist/chunk-AUJLW6JZ.js +92 -0
  159. package/dist/chunk-AY3MHEFM.js +24 -0
  160. package/dist/chunk-B7PYTV72.js +236 -0
  161. package/dist/chunk-B7YRSULE.js +1423 -0
  162. package/dist/chunk-BAWJNMWF.js +339 -0
  163. package/dist/chunk-BBPIILO2.js +88 -0
  164. package/dist/chunk-BD3PGW6A.js +957 -0
  165. package/dist/chunk-BDPYFAB4.js +44 -0
  166. package/dist/chunk-BIUV23HH.js +729 -0
  167. package/dist/chunk-BQ3VAGXH.js +243 -0
  168. package/dist/chunk-BQJOGAWT.js +31 -0
  169. package/dist/chunk-BT7EG7CO.js +68 -0
  170. package/dist/chunk-BV3XQQLU.js +27 -0
  171. package/dist/chunk-BY6ODHNZ.js +78 -0
  172. package/dist/chunk-BZRLSZNV.js +79 -0
  173. package/dist/chunk-C3DH3NCY.js +2773 -0
  174. package/dist/chunk-C3KCMAJP.js +756 -0
  175. package/dist/chunk-C7AGUJ5K.js +267 -0
  176. package/dist/chunk-CBSWKQCX.js +342 -0
  177. package/dist/chunk-CE5OZBYY.js +21 -0
  178. package/dist/chunk-CFCVYHSW.js +373 -0
  179. package/dist/chunk-CHA2HDE5.js +126 -0
  180. package/dist/chunk-CIHWPGS5.js +146 -0
  181. package/dist/chunk-CJBSZX3F.js +127 -0
  182. package/dist/chunk-CLA6QIJM.js +43 -0
  183. package/dist/chunk-CPSVQR2I.js +365 -0
  184. package/dist/chunk-CRPRVNQ4.js +254 -0
  185. package/dist/chunk-CSIE4Y7C.js +1093 -0
  186. package/dist/chunk-CSOPSYDY.js +142 -0
  187. package/dist/chunk-CSXLLEGB.js +205 -0
  188. package/dist/chunk-CTDLERWU.js +293 -0
  189. package/dist/chunk-CULBXMSK.js +110 -0
  190. package/dist/chunk-D2M2Y5ID.js +21 -0
  191. package/dist/chunk-D37WY7SH.js +1060 -0
  192. package/dist/chunk-D4VJFCGZ.js +89 -0
  193. package/dist/chunk-D6WTZMZB.js +48 -0
  194. package/dist/chunk-DBHOWDUH.js +976 -0
  195. package/dist/chunk-DCACX7BV.js +19364 -0
  196. package/dist/chunk-DFHX4XYA.js +128 -0
  197. package/dist/chunk-DIKBRRKE.js +176 -0
  198. package/dist/chunk-DJG5RIOR.js +9 -0
  199. package/dist/chunk-DNIOIISW.js +616 -0
  200. package/dist/chunk-DOA5G7IA.js +315 -0
  201. package/dist/chunk-DP7FKP6W.js +855 -0
  202. package/dist/chunk-DS2JZ677.js +79 -0
  203. package/dist/chunk-DSRLVYBS.js +82 -0
  204. package/dist/chunk-EAEVKNJA.js +209 -0
  205. package/dist/chunk-EEUESN3T.js +575 -0
  206. package/dist/chunk-EJ4LUU5Y.js +73 -0
  207. package/dist/chunk-EJIWTPSZ.js +1063 -0
  208. package/dist/chunk-EJVCDTAN.js +116 -0
  209. package/dist/chunk-EKLUBDBQ.js +627 -0
  210. package/dist/chunk-EN62WLFD.js +849 -0
  211. package/dist/chunk-ENYRCL43.js +26 -0
  212. package/dist/chunk-EP22ZMFO.js +273 -0
  213. package/dist/chunk-EP4SVAVI.js +87 -0
  214. package/dist/chunk-EPAMVGI3.js +1562 -0
  215. package/dist/chunk-EPRMH6HO.js +24 -0
  216. package/dist/chunk-ES6NWJ36.js +4057 -0
  217. package/dist/chunk-ETA2K4KI.js +30 -0
  218. package/dist/chunk-ETAD4NKD.js +31 -0
  219. package/dist/chunk-EUWIIDQ7.js +93 -0
  220. package/dist/chunk-EVE3OD2W.js +141 -0
  221. package/dist/chunk-EXA26FFC.js +459 -0
  222. package/dist/chunk-EXSPAA35.js +244 -0
  223. package/dist/chunk-F55YABKV.js +258 -0
  224. package/dist/chunk-F5DNGU5W.js +27 -0
  225. package/dist/chunk-F622MJYV.js +103 -0
  226. package/dist/chunk-F6NIQD74.js +5111 -0
  227. package/dist/chunk-FAWJTC34.js +43 -0
  228. package/dist/chunk-FAZBRHGG.js +47 -0
  229. package/dist/chunk-FIEUSGNJ.js +39 -0
  230. package/dist/chunk-FKCG7K6H.js +1146 -0
  231. package/dist/chunk-FOVVXV45.js +229 -0
  232. package/dist/chunk-FRBPKBFE.js +30 -0
  233. package/dist/chunk-FSA5BPFI.js +268 -0
  234. package/dist/chunk-FSJ5TTZ3.js +29 -0
  235. package/dist/chunk-FT7SGLXT.js +193 -0
  236. package/dist/chunk-FUUVZZUB.js +62 -0
  237. package/dist/chunk-FYMRVUNZ.js +1697 -0
  238. package/dist/chunk-FYTAA5FG.js +162 -0
  239. package/dist/chunk-G3VB2UCZ.js +3892 -0
  240. package/dist/chunk-G6OIMVXH.js +405 -0
  241. package/dist/chunk-G7PQCXVH.js +228 -0
  242. package/dist/chunk-GAB6UW52.js +1087 -0
  243. package/dist/chunk-GAFJEYLK.js +29 -0
  244. package/dist/chunk-GC4CRMTS.js +642 -0
  245. package/dist/chunk-GFHSIWHL.js +5297 -0
  246. package/dist/chunk-GI5M67YA.js +735 -0
  247. package/dist/chunk-GIJWHUWF.js +191 -0
  248. package/dist/chunk-GO6DRECI.js +1 -0
  249. package/dist/chunk-GOFVBTMN.js +314 -0
  250. package/dist/chunk-GQIP72ZJ.js +13 -0
  251. package/dist/chunk-GQXLXRFA.js +28 -0
  252. package/dist/chunk-GT6HFKJB.js +48 -0
  253. package/dist/chunk-GVJGSSKM.js +174 -0
  254. package/dist/chunk-GWHGTG37.js +36 -0
  255. package/dist/chunk-GZAJHLKO.js +18 -0
  256. package/dist/chunk-GZK62I3N.js +314 -0
  257. package/dist/chunk-H3HGMISG.js +483 -0
  258. package/dist/chunk-H3ISZJMJ.js +403 -0
  259. package/dist/chunk-H4HXVWEC.js +9 -0
  260. package/dist/chunk-H6MJGKAW.js +120 -0
  261. package/dist/chunk-HBTTGVR5.js +353 -0
  262. package/dist/chunk-HBZ322WZ.js +35 -0
  263. package/dist/chunk-HEP3ILP4.js +34 -0
  264. package/dist/chunk-HGFXODKO.js +106 -0
  265. package/dist/chunk-HHWDTB6S.js +59 -0
  266. package/dist/chunk-HKO45NLZ.js +286 -0
  267. package/dist/chunk-HLVTEA6A.js +89 -0
  268. package/dist/chunk-HS3SY6HN.js +160 -0
  269. package/dist/chunk-HT5OCGKN.js +899 -0
  270. package/dist/chunk-HXIIEMGF.js +78 -0
  271. package/dist/chunk-I56TH7VM.js +46 -0
  272. package/dist/chunk-I6FN3R5D.js +352 -0
  273. package/dist/chunk-I7SCBHJN.js +655 -0
  274. package/dist/chunk-IJM4GKAT.js +529 -0
  275. package/dist/chunk-IMEYU36R.js +344 -0
  276. package/dist/chunk-INJ3SS6A.js +936 -0
  277. package/dist/chunk-IUKOPCCE.js +441 -0
  278. package/dist/chunk-IVEPZQJO.js +33 -0
  279. package/dist/chunk-IVZEONFC.js +43 -0
  280. package/dist/chunk-IWBHRSG7.js +936 -0
  281. package/dist/chunk-IYY3HQAD.js +484 -0
  282. package/dist/chunk-J2ICMYDA.js +48 -0
  283. package/dist/chunk-J2QCFLUN.js +505 -0
  284. package/dist/chunk-J5HM6V5P.js +1039 -0
  285. package/dist/chunk-J6NZX6QH.js +398 -0
  286. package/dist/chunk-JBBB2Y47.js +432 -0
  287. package/dist/chunk-JDCZQZU7.js +42 -0
  288. package/dist/chunk-JEDNXGSS.js +169 -0
  289. package/dist/chunk-JHP7OT6K.js +89 -0
  290. package/dist/chunk-JLS65NUQ.js +14 -0
  291. package/dist/chunk-JNMWYMC6.js +38 -0
  292. package/dist/chunk-JNSTWNNW.js +25 -0
  293. package/dist/chunk-JOSK6GEU.js +9564 -0
  294. package/dist/chunk-JQUMSIGC.js +100 -0
  295. package/dist/chunk-JVHGMURQ.js +1106 -0
  296. package/dist/chunk-JYXS47FQ.js +951 -0
  297. package/dist/chunk-K2ZMW2Z5.js +2147 -0
  298. package/dist/chunk-K7FAFORM.js +14 -0
  299. package/dist/chunk-KBJXX3ON.js +333 -0
  300. package/dist/chunk-KHFKVQWY.js +486 -0
  301. package/dist/chunk-KHMEI3DQ.js +173 -0
  302. package/dist/chunk-KHW3UD7B.js +69 -0
  303. package/dist/chunk-KKQKWAMF.js +365 -0
  304. package/dist/chunk-KOKXJV2U.js +455 -0
  305. package/dist/chunk-KQ4NGOJI.js +14 -0
  306. package/dist/chunk-KQYQOXMS.js +342 -0
  307. package/dist/chunk-KTMW65UX.js +14 -0
  308. package/dist/chunk-KUEWV2JH.js +593 -0
  309. package/dist/chunk-KXYDV3HP.js +1523 -0
  310. package/dist/chunk-KZ4JMGZ5.js +96 -0
  311. package/dist/chunk-KZWGBUIO.js +2659 -0
  312. package/dist/chunk-L2CBG5IX.js +1892 -0
  313. package/dist/chunk-L2S235CU.js +314 -0
  314. package/dist/chunk-L32WD57F.js +98 -0
  315. package/dist/chunk-LDJCKAJP.js +123 -0
  316. package/dist/chunk-LDWNBEN7.js +541 -0
  317. package/dist/chunk-LJVH57G2.js +241 -0
  318. package/dist/chunk-LPQ7NZEN.js +209 -0
  319. package/dist/chunk-LRGH3CCV.js +148 -0
  320. package/dist/chunk-LULOGMMM.js +1133 -0
  321. package/dist/chunk-LWGKN2GY.js +8284 -0
  322. package/dist/chunk-LX4F24ZH.js +157 -0
  323. package/dist/chunk-M4BUEXXF.js +839 -0
  324. package/dist/chunk-M6UHOC4I.js +553 -0
  325. package/dist/chunk-MCBNWZNO.js +657 -0
  326. package/dist/chunk-MEMSY6VY.js +223 -0
  327. package/dist/chunk-MHLEZQQI.js +145 -0
  328. package/dist/chunk-MJ6WNSIX.js +192 -0
  329. package/dist/chunk-MKASIKWZ.js +442 -0
  330. package/dist/chunk-MNOVBYFU.js +60 -0
  331. package/dist/chunk-MO2BYAAF.js +2896 -0
  332. package/dist/chunk-MP6P7Y2A.js +180 -0
  333. package/dist/chunk-MQ4TFJAG.js +3365 -0
  334. package/dist/chunk-MT2WAIR3.js +131 -0
  335. package/dist/chunk-MTU7VTNN.js +1122 -0
  336. package/dist/chunk-MULMXX4V.js +150 -0
  337. package/dist/chunk-MW2DWWVA.js +147 -0
  338. package/dist/chunk-MY3ZPUN4.js +151 -0
  339. package/dist/chunk-MYLH2S4G.js +64 -0
  340. package/dist/chunk-MZ5WYKNA.js +28 -0
  341. package/dist/chunk-N3Q2JNPV.js +249 -0
  342. package/dist/chunk-N5DX4JAK.js +12 -0
  343. package/dist/chunk-NAINGKHF.js +35 -0
  344. package/dist/chunk-NEQUQHOX.js +223 -0
  345. package/dist/chunk-NHNPEZS4.js +1408 -0
  346. package/dist/chunk-NHTIXJCR.js +17 -0
  347. package/dist/chunk-NKLPMBNV.js +1154 -0
  348. package/dist/chunk-NMVZ5YES.js +199 -0
  349. package/dist/chunk-NRFRY3GE.js +256 -0
  350. package/dist/chunk-NTD6CSI6.js +1266 -0
  351. package/dist/chunk-NUO7B3SH.js +318 -0
  352. package/dist/chunk-NVOHIJKG.js +1319 -0
  353. package/dist/chunk-NXH3RX7O.js +523 -0
  354. package/dist/chunk-NXZ3DURF.js +257 -0
  355. package/dist/chunk-O26L6F7F.js +209 -0
  356. package/dist/chunk-O5RRIUEP.js +124 -0
  357. package/dist/chunk-O5X6BKAO.js +10 -0
  358. package/dist/chunk-O6ZQUVTR.js +31 -0
  359. package/dist/chunk-O7FE75QZ.js +306 -0
  360. package/dist/chunk-OC7Z6AJQ.js +81 -0
  361. package/dist/chunk-OH7IEZ63.js +307 -0
  362. package/dist/chunk-OI734GRS.js +115 -0
  363. package/dist/chunk-OJBH62DK.js +684 -0
  364. package/dist/chunk-OKJLVSTJ.js +247 -0
  365. package/dist/chunk-OMX5VL43.js +79 -0
  366. package/dist/chunk-ONHAMBN6.js +12 -0
  367. package/dist/chunk-ONYPLIVE.js +753 -0
  368. package/dist/chunk-OSK7QWPD.js +637 -0
  369. package/dist/chunk-OTXLMJKP.js +438 -0
  370. package/dist/chunk-OV5PKQMA.js +213 -0
  371. package/dist/chunk-OXK5HA4B.js +31 -0
  372. package/dist/chunk-OYDWFQA4.js +272 -0
  373. package/dist/chunk-OZAUKWHB.js +22 -0
  374. package/dist/chunk-P5P2EKGH.js +94 -0
  375. package/dist/chunk-P6SSWAKY.js +29 -0
  376. package/dist/chunk-P7CQGPLS.js +30 -0
  377. package/dist/chunk-P7RVCHQV.js +197 -0
  378. package/dist/chunk-PEBWDYIW.js +726 -0
  379. package/dist/chunk-PFCXFO7A.js +9193 -0
  380. package/dist/chunk-PFLDWMX6.js +168 -0
  381. package/dist/chunk-PHZGLQSK.js +15883 -0
  382. package/dist/chunk-PNFTPNSR.js +20 -0
  383. package/dist/chunk-PPHXX4W7.js +175 -0
  384. package/dist/chunk-PPZESPJT.js +262 -0
  385. package/dist/chunk-PRDHI2L5.js +296 -0
  386. package/dist/chunk-PSTKWHHN.js +32 -0
  387. package/dist/chunk-PV53ODOT.js +555 -0
  388. package/dist/chunk-PVJBTI7P.js +24 -0
  389. package/dist/chunk-PXKERBKX.js +100 -0
  390. package/dist/chunk-PZ5AY32C.js +10 -0
  391. package/dist/chunk-Q3DHEZA5.js +85 -0
  392. package/dist/chunk-Q5RZDVQK.js +204 -0
  393. package/dist/chunk-Q64IR2Z2.js +4933 -0
  394. package/dist/chunk-Q6Z5UGPL.js +398 -0
  395. package/dist/chunk-QAMAV4DT.js +627 -0
  396. package/dist/chunk-QBWF4444.js +112 -0
  397. package/dist/chunk-QDKYT4CI.js +22805 -0
  398. package/dist/chunk-QFLBRWCJ.js +126 -0
  399. package/dist/chunk-QILAQACE.js +107 -0
  400. package/dist/chunk-QJ6OEH4K.js +3683 -0
  401. package/dist/chunk-QK3NLYTV.js +320 -0
  402. package/dist/chunk-QOFLUS24.js +535 -0
  403. package/dist/chunk-QOIASNEJ.js +98 -0
  404. package/dist/chunk-QP4UTSOV.js +3587 -0
  405. package/dist/chunk-QP5ST7RI.js +904 -0
  406. package/dist/chunk-QS5AGRZN.js +167 -0
  407. package/dist/chunk-QTAOU53N.js +107 -0
  408. package/dist/chunk-QTCLJHLZ.js +351 -0
  409. package/dist/chunk-QTOLTG4L.js +119 -0
  410. package/dist/chunk-QWDV4OSL.js +142 -0
  411. package/dist/chunk-QWMQ74KD.js +508 -0
  412. package/dist/chunk-QX6LOMMH.js +158 -0
  413. package/dist/chunk-QXBKIHY7.js +238 -0
  414. package/dist/chunk-QXBKTJT6.js +270 -0
  415. package/dist/chunk-QYQOVOLR.js +196 -0
  416. package/dist/chunk-R2CKS6WT.js +73 -0
  417. package/dist/chunk-R2TIYG7U.js +68 -0
  418. package/dist/chunk-R2W3LESH.js +465 -0
  419. package/dist/chunk-R5EXHMUN.js +100 -0
  420. package/dist/chunk-RBBTBCHX.js +289 -0
  421. package/dist/chunk-RBKLOUXA.js +121 -0
  422. package/dist/chunk-RCP2Y6DQ.js +86 -0
  423. package/dist/chunk-RCYEJSD5.js +260 -0
  424. package/dist/chunk-RFDVSI4N.js +134 -0
  425. package/dist/chunk-RGJU63FV.js +1717 -0
  426. package/dist/chunk-RI4EX2QE.js +18 -0
  427. package/dist/chunk-RIMARPCF.js +152 -0
  428. package/dist/chunk-RJ6RSNT6.js +42 -0
  429. package/dist/chunk-RNI2GUIF.js +131 -0
  430. package/dist/chunk-RPHUWJ3K.js +264 -0
  431. package/dist/chunk-RPIMAMV7.js +361 -0
  432. package/dist/chunk-RQFX6YRN.js +49 -0
  433. package/dist/chunk-RRC5BL7B.js +285 -0
  434. package/dist/chunk-RSYTSBOO.js +79 -0
  435. package/dist/chunk-RWQQIKIC.js +35 -0
  436. package/dist/chunk-RZUBOZH2.js +373 -0
  437. package/dist/chunk-S2E632FQ.js +380 -0
  438. package/dist/chunk-S2VQCZO4.js +22 -0
  439. package/dist/chunk-S2XIMQJQ.js +681 -0
  440. package/dist/chunk-S47ISY27.js +183 -0
  441. package/dist/chunk-S6I4KISU.js +142 -0
  442. package/dist/chunk-S6TAFQI5.js +2403 -0
  443. package/dist/chunk-SBBNT5ZJ.js +27 -0
  444. package/dist/chunk-SDJV2DTQ.js +491 -0
  445. package/dist/chunk-SDPIFNLD.js +33 -0
  446. package/dist/chunk-SF6YK3JI.js +835 -0
  447. package/dist/chunk-SK3ZFONO.js +976 -0
  448. package/dist/chunk-SKTFRFQ7.js +1775 -0
  449. package/dist/chunk-SNGM452K.js +2002 -0
  450. package/dist/chunk-STW7OFOA.js +581 -0
  451. package/dist/chunk-SU6UFUQY.js +1351 -0
  452. package/dist/chunk-SVJM3LJA.js +27 -0
  453. package/dist/chunk-SVUNZOPG.js +129 -0
  454. package/dist/chunk-T5XLUYV3.js +34 -0
  455. package/dist/chunk-T7E5JS6N.js +57 -0
  456. package/dist/chunk-TA3N5MMO.js +450 -0
  457. package/dist/chunk-TAJPCXSB.js +13 -0
  458. package/dist/chunk-TDEMDRN2.js +1639 -0
  459. package/dist/chunk-TDSEX5CF.js +24 -0
  460. package/dist/chunk-TGCVL74Y.js +28 -0
  461. package/dist/chunk-TGXXYDL4.js +1012 -0
  462. package/dist/chunk-TIKTYUJO.js +296 -0
  463. package/dist/chunk-TIZAJD4M.js +6029 -0
  464. package/dist/chunk-TLSEZZCG.js +5549 -0
  465. package/dist/chunk-TMBDRHAX.js +19 -0
  466. package/dist/chunk-TRURQUBP.js +1217 -0
  467. package/dist/chunk-TSQ256N5.js +152 -0
  468. package/dist/chunk-TUQMMFEQ.js +2244 -0
  469. package/dist/chunk-U424MJLC.js +81 -0
  470. package/dist/chunk-U4DRS6ZW.js +11 -0
  471. package/dist/chunk-U5KS22IN.js +204 -0
  472. package/dist/chunk-UAPHFJPN.js +673 -0
  473. package/dist/chunk-UB7LQITD.js +1040 -0
  474. package/dist/chunk-UBVRHGAZ.js +237 -0
  475. package/dist/chunk-UDNNAQN5.js +98 -0
  476. package/dist/chunk-UJP3XM54.js +342 -0
  477. package/dist/chunk-UJYDH2MW.js +305 -0
  478. package/dist/chunk-UKMPASIC.js +399 -0
  479. package/dist/chunk-UKUL3EHK.js +763 -0
  480. package/dist/chunk-UPHU64NB.js +1327 -0
  481. package/dist/chunk-URMSZXAD.js +43 -0
  482. package/dist/chunk-US3RT6CY.js +525 -0
  483. package/dist/chunk-UTDEOPKV.js +30 -0
  484. package/dist/chunk-UUUDKV7N.js +13 -0
  485. package/dist/chunk-UVKWU3SM.js +39 -0
  486. package/dist/chunk-V2TVPO3X.js +521 -0
  487. package/dist/chunk-V3KLVK7B.js +398 -0
  488. package/dist/chunk-V3YFFHDR.js +17 -0
  489. package/dist/chunk-VAG6GUBR.js +1162 -0
  490. package/dist/chunk-VBENAHDA.js +1814 -0
  491. package/dist/chunk-VBNCKCCI.js +16 -0
  492. package/dist/chunk-VCGSWN5M.js +1300 -0
  493. package/dist/chunk-VE2O2I7M.js +115 -0
  494. package/dist/chunk-VIFHYTI5.js +31 -0
  495. package/dist/chunk-VJER3FUS.js +5080 -0
  496. package/dist/chunk-VLMDM56Q.js +268 -0
  497. package/dist/chunk-VMFZEVVX.js +99 -0
  498. package/dist/chunk-VNDPQVUZ.js +1853 -0
  499. package/dist/chunk-VSPJRLGA.js +4783 -0
  500. package/dist/chunk-VSWC5ZXI.js +103 -0
  501. package/dist/chunk-VYI4DSZP.js +2017 -0
  502. package/dist/chunk-W4BAIQ6L.js +1212 -0
  503. package/dist/chunk-W7VQAL2K.js +2203 -0
  504. package/dist/chunk-WEI3ZDZH.js +33 -0
  505. package/dist/chunk-WEIUS5NT.js +26 -0
  506. package/dist/chunk-WEW7UFWE.js +546 -0
  507. package/dist/chunk-WGQAXLNA.js +384 -0
  508. package/dist/chunk-WJAL4JL3.js +206 -0
  509. package/dist/chunk-WKFOJ5ZG.js +141 -0
  510. package/dist/chunk-WMWQEFLN.js +2177 -0
  511. package/dist/chunk-WNECKKO2.js +154 -0
  512. package/dist/chunk-WPKLYOAM.js +195 -0
  513. package/dist/chunk-WSH37YQN.js +243 -0
  514. package/dist/chunk-WV3KQDPE.js +84 -0
  515. package/dist/chunk-WZFC4V4U.js +389 -0
  516. package/dist/chunk-XCOIBNET.js +13 -0
  517. package/dist/chunk-XDM65LBX.js +53 -0
  518. package/dist/chunk-XGU6PBO5.js +645 -0
  519. package/dist/chunk-XHOI4V62.js +43 -0
  520. package/dist/chunk-XIBVFMLQ.js +6858 -0
  521. package/dist/chunk-XJ2E7YEJ.js +117 -0
  522. package/dist/chunk-XON4ZCYX.js +69 -0
  523. package/dist/chunk-XQPEWJPI.js +127 -0
  524. package/dist/chunk-XSJTIFUY.js +31 -0
  525. package/dist/chunk-XT7OVWM3.js +64 -0
  526. package/dist/chunk-XTXYIISX.js +1104 -0
  527. package/dist/chunk-XV7NZL4B.js +57 -0
  528. package/dist/chunk-XWIZ6B5S.js +109 -0
  529. package/dist/chunk-XWLIKOBX.js +240 -0
  530. package/dist/chunk-XZOXEIN4.js +156 -0
  531. package/dist/chunk-XZRS7I7W.js +3673 -0
  532. package/dist/chunk-Y4ZDDHB6.js +44 -0
  533. package/dist/chunk-Y733RB7T.js +194 -0
  534. package/dist/chunk-YBHUB4XR.js +14931 -0
  535. package/dist/chunk-YKC75XK4.js +147 -0
  536. package/dist/chunk-YKMXFVK7.js +27 -0
  537. package/dist/chunk-YO5BAJ55.js +225 -0
  538. package/dist/chunk-YPDCLXNZ.js +568 -0
  539. package/dist/chunk-YSQPGVFK.js +116 -0
  540. package/dist/chunk-YTVVTIWJ.js +716 -0
  541. package/dist/chunk-YVCMDVBB.js +698 -0
  542. package/dist/chunk-YYTOA6DP.js +114 -0
  543. package/dist/chunk-Z5WGNULV.js +88 -0
  544. package/dist/chunk-Z6NGVVXG.js +66 -0
  545. package/dist/chunk-Z7CDQNH3.js +20 -0
  546. package/dist/chunk-ZH4G3FU5.js +187 -0
  547. package/dist/chunk-ZJB6SQPA.js +257 -0
  548. package/dist/chunk-ZL6E4HMY.js +42 -0
  549. package/dist/chunk-ZMLOC3DW.js +62 -0
  550. package/dist/chunk-ZORW64QH.js +101 -0
  551. package/dist/chunk-ZVVD2XGV.js +1369 -0
  552. package/dist/cli-utils-ER33ODC5.js +31 -0
  553. package/dist/cli-validation-6CHPTANV.js +146 -0
  554. package/dist/commit-utils-3STAY7C7.js +49 -0
  555. package/dist/compatibility-notice-IHNXR2JR.js +21 -0
  556. package/dist/compete-config-resolver-V3GDNJMM.js +125 -0
  557. package/dist/compete-results-XUM3PJHS.js +318 -0
  558. package/dist/competition-outcome-tracker-NWSMVUPG.js +62 -0
  559. package/dist/config-4HHE4OIK.js +238 -0
  560. package/dist/config-D6YAZASH.js +10 -0
  561. package/dist/config-MIPRDYYV.js +46 -0
  562. package/dist/config-audit-GA5DCUAI.js +371 -0
  563. package/dist/config-explain-4LMO556H.js +71 -0
  564. package/dist/config-loader-RGP634PC.js +51 -0
  565. package/dist/config-manager-J2UTO635.js +114 -0
  566. package/dist/config-merger-TVUJBZTS.js +14 -0
  567. package/dist/config-validator-H4ZVIE56.js +122 -0
  568. package/dist/cost-HSIV5U2Y.js +85 -0
  569. package/dist/data-migration-state-OAUL2WPQ.js +35 -0
  570. package/dist/db-migrator-NUOW5NKR.js +34 -0
  571. package/dist/default-paths-UILB62BN.js +49 -0
  572. package/dist/discovery-V6GYUJUC.js +53 -0
  573. package/dist/doctor-BBSMCDWE.js +271 -0
  574. package/dist/doctor-context-blocks-LPY75VZA.js +231 -0
  575. package/dist/doctor-instructions-import-JXHDDOE5.js +70 -0
  576. package/dist/doctor-purpose-6YJOXPBE.js +30 -0
  577. package/dist/domain-analyzer-S35ABUNA.js +48 -0
  578. package/dist/ensure-initialized-Q6PEU55O.js +78 -0
  579. package/dist/entry.js +922 -0
  580. package/dist/error-parser-core-MZFMFANN.js +70 -0
  581. package/dist/evaluation-context-GQBYDAEV.js +63 -0
  582. package/dist/evidence-plan-resolver-5FUAP3SA.js +111 -0
  583. package/dist/execution-data-writer-YCG5UH37.js +72 -0
  584. package/dist/execution-policy-applier-PWZM5LNA.js +63 -0
  585. package/dist/execution-preflight-DASJWWQF.js +223 -0
  586. package/dist/execution-roles-KNSNNB2D.js +112 -0
  587. package/dist/exit-code-error-QIY5DOKF.js +18 -0
  588. package/dist/external-temp-cleanup-CAW7LQ6R.js +360 -0
  589. package/dist/factory-YCYCB7AE.js +209 -0
  590. package/dist/file-utils-ZQYNBQBW.js +45 -0
  591. package/dist/flywheel-allowlist-revert-H22HA6JE.js +21 -0
  592. package/dist/flywheel-autoloop-executor-PDOASJEZ.js +316 -0
  593. package/dist/flywheel-autoloop-unverified-TOKYFCDC.js +36 -0
  594. package/dist/flywheel-competition-executor-YJUMMEJO.js +320 -0
  595. package/dist/flywheel-executor-JWU43KAY.js +437 -0
  596. package/dist/flywheel-git-isolation-FQ2TRWMB.js +56 -0
  597. package/dist/flywheel-manifest-HDPNMWWF.js +114 -0
  598. package/dist/flywheel-model-defaults-UHAKTZT3.js +110 -0
  599. package/dist/flywheel-preflight-III2C7TH.js +163 -0
  600. package/dist/flywheel-resume-2O45MS7Y.js +31 -0
  601. package/dist/flywheel-resume-execution-lease-P2BK257J.js +59 -0
  602. package/dist/flywheel-safety-AVAVFXIJ.js +19 -0
  603. package/dist/flywheel-scope-decision-ALJUUNGG.js +14 -0
  604. package/dist/get-telemetry-logger-MPDVO2JA.js +155 -0
  605. package/dist/git-message-style-KCXGMTDT.js +104 -0
  606. package/dist/guidance-profile-config-G3K5YQOO.js +113 -0
  607. package/dist/guidance-profile-renderer-TX4TNDFL.js +23 -0
  608. package/dist/identity-XLQJ4YJF.js +25 -0
  609. package/dist/index-query-6NUY4FKX.js +37 -0
  610. package/dist/index.js +85588 -0
  611. package/dist/indexer-DL54CM3K.js +44 -0
  612. package/dist/init-OUZ72344.js +245 -0
  613. package/dist/instructions-import-offer-NSYXSITC.js +363 -0
  614. package/dist/instructions-run-NBII7W36.js +114 -0
  615. package/dist/interrupted-work-E4TLKJLE.js +43 -0
  616. package/dist/invoke-provider-auth-NEWEIHCI.js +38 -0
  617. package/dist/judge-scoring.json +64 -0
  618. package/dist/lab-mode-YXQ2Y3NG.js +44 -0
  619. package/dist/lab-utils-5QAMDJR5.js +29 -0
  620. package/dist/linux-host-class-YDWQX65O.js +31 -0
  621. package/dist/llm-judge-executor-OJSNCTFJ.js +179 -0
  622. package/dist/local-ci-config-VZ4WWDT5.js +48 -0
  623. package/dist/local-executor-DCMDDRX2.js +280 -0
  624. package/dist/logger-5KNKS3O4.js +154 -0
  625. package/dist/matrix-prompt-builder-4ZBOGZSB.js +527 -0
  626. package/dist/matrix-result-parser-EZJM4YXP.js +14 -0
  627. package/dist/merge-batch-RTEEMVDB.js +313 -0
  628. package/dist/merge-batch-members-VIWGVRHP.js +24 -0
  629. package/dist/merge-queue-TIIUSOY6.js +126 -0
  630. package/dist/merge-queue-trust-DUNZ4J65.js +21 -0
  631. package/dist/metadata-UKSMWM6J.js +29 -0
  632. package/dist/model-catalog-readiness-R5KJBP5M.js +202 -0
  633. package/dist/model-invocations-db-XTUPPQ34.js +70 -0
  634. package/dist/model-resolver-JFZ2MHOJ.js +39 -0
  635. package/dist/model-resolver-SCQ57KAQ.js +217 -0
  636. package/dist/model-roles-D3OR4NAH.js +110 -0
  637. package/dist/monitor-F4SIU5G2.js +96 -0
  638. package/dist/nested-worktrees-2WUWQ75N.js +23 -0
  639. package/dist/next-S3IRLVER.js +96 -0
  640. package/dist/next-UKPFRXOO.js +148 -0
  641. package/dist/opportunistic-TL4S26VX.js +86 -0
  642. package/dist/optimization-config-resolver-NAEIYU6A.js +148 -0
  643. package/dist/package-HJR4QJT4.js +10 -0
  644. package/dist/parse-git-status-7PIYFPS2.js +21 -0
  645. package/dist/path-security-5WJSY56G.js +41 -0
  646. package/dist/paths-JUI7C4KU.js +45 -0
  647. package/dist/plan-backlog-list-fast-SSTQL5XP.js +89 -0
  648. package/dist/plan-backlog-show-fast-PFRAQ3JB.js +114 -0
  649. package/dist/plan-sprint-list-fast-HD2KBZSY.js +110 -0
  650. package/dist/plan-sprint-status-fast-YFYH7WQF.js +116 -0
  651. package/dist/plan-task-status-fast-JU5PNLUU.js +114 -0
  652. package/dist/plan-to-flywheel-PY5MSY2H.js +529 -0
  653. package/dist/preflight-PJHGTJNZ.js +12 -0
  654. package/dist/process-registry-B4ZUCN7T.js +28 -0
  655. package/dist/process-scanner-TU3QHWVB.js +23 -0
  656. package/dist/processes-6FHVGT72.js +28 -0
  657. package/dist/processes-json-fast-YWTMUWXB.js +72 -0
  658. package/dist/profile-HWTC56SG.js +209 -0
  659. package/dist/project-runtime-paths-2UQNG5Y4.js +41 -0
  660. package/dist/protected-branches-N36LDBFY.js +71 -0
  661. package/dist/provider-aware-resource-manager-YTFAHNGJ.js +40 -0
  662. package/dist/provider-matrix-2KO2V5OM.js +214 -0
  663. package/dist/provider-matrix-renderer-MEC3PER7.js +139 -0
  664. package/dist/provider-output-forwarding-2AHL7YMA.js +26 -0
  665. package/dist/provider-registry-WCZ65QHC.js +136 -0
  666. package/dist/provider-temp-cleanup-IUNPJCZF.js +14 -0
  667. package/dist/prune-engine-EOQVWEP6.js +448 -0
  668. package/dist/publication-turn-S42RZTQF.js +44 -0
  669. package/dist/quality-gate-JQMVCKOO.js +72 -0
  670. package/dist/quickstart-3O6FRCFB.js +105 -0
  671. package/dist/readiness-GW6ABRHB.js +139 -0
  672. package/dist/readiness-KFZCXDTT.js +215 -0
  673. package/dist/registry-7XG376SY.js +217 -0
  674. package/dist/repair-helpers-TTV5FEF4.js +117 -0
  675. package/dist/repo-root-YG6MQZDW.js +28 -0
  676. package/dist/resolution-engine-FFEK7HQ2.js +187 -0
  677. package/dist/resolve-provider-cli-ZEXVZKET.js +44 -0
  678. package/dist/restore-telemetry-db-E7BR5PO7.js +459 -0
  679. package/dist/routing-events-AW6SRZ6G.js +13 -0
  680. package/dist/routing-history-store-FMDDQL6W.js +39 -0
  681. package/dist/routing-planner-C6OHO3EY.js +221 -0
  682. package/dist/runner-KHDNQ5KU.js +1194 -0
  683. package/dist/runner-PIS2BW7Y.js +1801 -0
  684. package/dist/safety-E3JJVSFL.js +67 -0
  685. package/dist/safety-stanza-HE6GXP4G.js +49 -0
  686. package/dist/sandbox-7LBZC5PE.js +72 -0
  687. package/dist/sandbox-ASWCDYZL.js +80 -0
  688. package/dist/schema-extensions.sql +234 -0
  689. package/dist/security-JI22TBEB.js +17 -0
  690. package/dist/setup-bb-plugin-FQXLA76Y.js +531 -0
  691. package/dist/setup-claude-code-NF4ZSHVE.js +197 -0
  692. package/dist/setup-temp-cleanup-2APZ4HMA.js +29 -0
  693. package/dist/shared-utils-34HJZ6JX.js +40 -0
  694. package/dist/simple-artifact-goal-MQLDDMMX.js +29 -0
  695. package/dist/sprint-N7JFTEGL.js +403 -0
  696. package/dist/sprint-bridge-KJXIBNRJ.js +117 -0
  697. package/dist/sprint-completion-dependents-34SR7JVL.js +43 -0
  698. package/dist/sprint-execution-service-A6JPUBWY.js +376 -0
  699. package/dist/sprint-manager-MU2ZUWN2.js +140 -0
  700. package/dist/sqlite-timeout-config-U2CT4LKU.js +13 -0
  701. package/dist/sqlite-wrapper-FSGJ2QEW.js +19 -0
  702. package/dist/stale-cleanup-orchestrator-4X6324VF.js +71 -0
  703. package/dist/storage-access-I3V5LER7.js +31 -0
  704. package/dist/store-XVG64ZR2.js +25 -0
  705. package/dist/task-classifier-MN2DYE5R.js +558 -0
  706. package/dist/task-list-fast-7AT6LTTA.js +112 -0
  707. package/dist/task-manager-LHPBBRRE.js +136 -0
  708. package/dist/task-report-OLPAWBTK.js +64 -0
  709. package/dist/task-type-detector-6RG3YNZF.js +27 -0
  710. package/dist/task-type-resolver-EQHOUIHT.js +64 -0
  711. package/dist/telemetry-5VYSK772.js +212 -0
  712. package/dist/telemetry-health-tracker-4GFW2EMP.js +12 -0
  713. package/dist/telemetry-path-resolver-H3NFHHQY.js +34 -0
  714. package/dist/telemetry-reliability-URJDTNPZ.js +76 -0
  715. package/dist/transports-NREZQTJK.js +106 -0
  716. package/dist/unified-cost-tracker-5MTBJ2CL.js +59 -0
  717. package/dist/unified-state-cleanup-GGAXLHXF.js +292 -0
  718. package/dist/universal-cost-calculator-JTFEJVWK.js +70 -0
  719. package/dist/user-agents-QLIGPLP2.js +30 -0
  720. package/dist/variant-execution-I4ZZUAWY.js +319 -0
  721. package/dist/variant-opt-parser-JHCXKY2K.js +251 -0
  722. package/dist/variant-request-input-PL37N3AN.js +11 -0
  723. package/dist/variant-state-cleanup-KHMXRBZN.js +287 -0
  724. package/dist/variant-worker-COB5YTJX.js +4517 -0
  725. package/dist/variant-worker.js +26 -0
  726. package/dist/variants-XGDSXYG3.js +267 -0
  727. package/dist/verification-command-YSPU4VBH.js +66 -0
  728. package/dist/verify-command-timeout-DQUYH33Z.js +11 -0
  729. package/dist/verify-commands-LOHMOFKC.js +65 -0
  730. package/dist/warning-JSKSFKBT.js +13 -0
  731. package/dist/work-edge-K65NHVWY.js +50 -0
  732. package/dist/work-item-writer-KY5ZWZWW.js +30 -0
  733. package/dist/worker-JNXXEIT6.js +1504 -0
  734. package/dist/worker.js +21 -0
  735. package/dist/workspace-tree-identity-JO5PSKTW.js +52 -0
  736. package/dist/worktree-environment-WTVABAQW.js +64 -0
  737. package/dist/worktree-metrics-VZRQI26T.js +66 -0
  738. package/dist/writeback-TQFQBJNU.js +50 -0
  739. package/docs/CLI_REFERENCE.md +8287 -0
  740. package/docs/PROVIDER_SETUP.md +1737 -0
  741. package/docs/README.md +96 -0
  742. package/docs/TROUBLESHOOTING.md +2209 -0
  743. package/docs/getting-started/QUICK_START.md +260 -0
  744. package/docs/getting-started/README.md +198 -0
  745. package/docs/getting-started/SETUP.md +25 -0
  746. package/docs/reference/AGENT_CONTEXT.md +84 -0
  747. package/docs/reference/DELIVERY_ONBOARDING.md +198 -0
  748. package/docs/reference/PROVIDER_RELEASE_TIERS.md +34 -0
  749. package/docs/reference/SECURITY.md +291 -0
  750. package/docs/reference/TELEMETRY_PRIVACY.md +259 -0
  751. package/integrations/bb-plugin-build/README.md +391 -0
  752. package/integrations/bb-plugin-build/app.css +431 -0
  753. package/integrations/bb-plugin-build/app.tsx +6210 -0
  754. package/integrations/bb-plugin-build/package.json +45 -0
  755. package/integrations/bb-plugin-build/server.ts +488 -0
  756. package/integrations/bb-plugin-build/src/adapter.ts +3672 -0
  757. package/integrations/bb-plugin-build/src/backlog-authoring-model.ts +150 -0
  758. package/integrations/bb-plugin-build/src/backlog-authoring-schema.ts +458 -0
  759. package/integrations/bb-plugin-build/src/backlog-authoring-service.ts +467 -0
  760. package/integrations/bb-plugin-build/src/backlog-authoring-view.ts +1025 -0
  761. package/integrations/bb-plugin-build/src/command-evidence-schema.ts +13 -0
  762. package/integrations/bb-plugin-build/src/competition-defaults-schema.ts +122 -0
  763. package/integrations/bb-plugin-build/src/competition-defaults-service.ts +105 -0
  764. package/integrations/bb-plugin-build/src/competition-defaults-view.ts +138 -0
  765. package/integrations/bb-plugin-build/src/contract.ts +718 -0
  766. package/integrations/bb-plugin-build/src/execution-activity-view.ts +98 -0
  767. package/integrations/bb-plugin-build/src/finalize-model.ts +205 -0
  768. package/integrations/bb-plugin-build/src/finalize-schema.ts +150 -0
  769. package/integrations/bb-plugin-build/src/finalize-service.ts +330 -0
  770. package/integrations/bb-plugin-build/src/finalize-view.ts +159 -0
  771. package/integrations/bb-plugin-build/src/judge-operations-readback.ts +303 -0
  772. package/integrations/bb-plugin-build/src/judge-operations-schema.ts +33 -0
  773. package/integrations/bb-plugin-build/src/judge-operations-view.ts +459 -0
  774. package/integrations/bb-plugin-build/src/model.ts +1318 -0
  775. package/integrations/bb-plugin-build/src/monitor-service.ts +233 -0
  776. package/integrations/bb-plugin-build/src/panel-read-ux.ts +97 -0
  777. package/integrations/bb-plugin-build/src/patch-preview-schema.ts +166 -0
  778. package/integrations/bb-plugin-build/src/patch-preview-service.ts +480 -0
  779. package/integrations/bb-plugin-build/src/patch-preview-view.ts +109 -0
  780. package/integrations/bb-plugin-build/src/planning-readback.ts +228 -0
  781. package/integrations/bb-plugin-build/src/planning-service.ts +647 -0
  782. package/integrations/bb-plugin-build/src/planning-sync-evidence.ts +37 -0
  783. package/integrations/bb-plugin-build/src/planning-workspace-readback.ts +33 -0
  784. package/integrations/bb-plugin-build/src/planning-workspace-schema.ts +131 -0
  785. package/integrations/bb-plugin-build/src/planning-workspace.ts +333 -0
  786. package/integrations/bb-plugin-build/src/poll-handoff.ts +136 -0
  787. package/integrations/bb-plugin-build/src/project-target-server.ts +21 -0
  788. package/integrations/bb-plugin-build/src/project-target.ts +45 -0
  789. package/integrations/bb-plugin-build/src/reference-index.ts +218 -0
  790. package/integrations/bb-plugin-build/src/repository-identity.ts +17 -0
  791. package/integrations/bb-plugin-build/src/repository-schema.ts +30 -0
  792. package/integrations/bb-plugin-build/src/result-explorer-view.ts +597 -0
  793. package/integrations/bb-plugin-build/src/result-readback-model.ts +163 -0
  794. package/integrations/bb-plugin-build/src/result-readback-schema.ts +319 -0
  795. package/integrations/bb-plugin-build/src/result-readback-service.ts +333 -0
  796. package/integrations/bb-plugin-build/src/run-page-view.ts +332 -0
  797. package/integrations/bb-plugin-build/src/setup-config-schema.ts +293 -0
  798. package/integrations/bb-plugin-build/src/setup-config-service.ts +620 -0
  799. package/integrations/bb-plugin-build/src/setup-config-view.ts +388 -0
  800. package/integrations/bb-plugin-build/src/sprint-close-model.ts +150 -0
  801. package/integrations/bb-plugin-build/src/sprint-close-schema.ts +128 -0
  802. package/integrations/bb-plugin-build/src/sprint-close-service.ts +293 -0
  803. package/integrations/bb-plugin-build/src/sprint-close-view.ts +116 -0
  804. package/integrations/bb-plugin-build/src/sprint-composition-model.ts +709 -0
  805. package/integrations/bb-plugin-build/src/sprint-composition-readback.ts +231 -0
  806. package/integrations/bb-plugin-build/src/sprint-composition-schema.ts +597 -0
  807. package/integrations/bb-plugin-build/src/sprint-composition-service.ts +773 -0
  808. package/integrations/bb-plugin-build/src/sprint-composition-view.ts +1221 -0
  809. package/integrations/bb-plugin-build/src/sprint-execution-schema.ts +188 -0
  810. package/integrations/bb-plugin-build/src/sprint-execution-service.ts +289 -0
  811. package/integrations/bb-plugin-build/src/sprint-execution-view.ts +54 -0
  812. package/integrations/bb-plugin-build/src/task-authoring-model.ts +563 -0
  813. package/integrations/bb-plugin-build/src/task-authoring-schema.ts +629 -0
  814. package/integrations/bb-plugin-build/src/task-authoring-service.ts +842 -0
  815. package/integrations/bb-plugin-build/src/task-authoring-view.ts +1227 -0
  816. package/integrations/bb-plugin-build/src/task-catalog-schema.ts +46 -0
  817. package/integrations/bb-plugin-build/src/task-catalog-service.ts +44 -0
  818. package/integrations/bb-plugin-build/src/task-detail-readback.ts +56 -0
  819. package/integrations/bb-plugin-build/src/task-detail-schema.ts +171 -0
  820. package/integrations/bb-plugin-build/src/task-navigation.ts +446 -0
  821. package/integrations/bb-plugin-build/src/workbench-route.ts +74 -0
  822. package/package.json +306 -4
  823. package/schemas/README.md +80 -0
  824. package/schemas/build.config.schema.json +2110 -0
  825. package/schemas/config-v1.schema.json +136 -0
  826. package/schemas/execution-config.schema.json +47 -0
  827. package/schemas/judge-scoring.schema.json +257 -0
  828. package/schemas/provider-config.schema.json +179 -0
  829. package/schemas/telemetry-config.schema.json +79 -0
  830. package/schemas/user-preferences.schema.json +141 -0
  831. package/scripts/assert-node-runtime.mjs +146 -0
  832. package/scripts/preflight-native.mjs +49 -0
  833. package/scripts/setup-git-hooks.mjs +39 -0
  834. package/scripts/sync.sh +2871 -0
  835. package/scripts/write-node-launcher.sh +138 -0
  836. package/src/resources/gemini/slash-packs/default/plan.toml +15 -0
  837. package/src/resources/gemini/slash-packs/default/summary.toml +16 -0
  838. package/src/resources/gemini/slash-packs/default/tests.toml +16 -0
  839. package/templates/.build-project/README.md +41 -0
  840. package/templates/.build-project/agents/README.md +50 -0
  841. package/templates/.build-project/agents/architect.md +10 -0
  842. package/templates/.build-project/agents/code-reviewer.md +10 -0
  843. package/templates/.build-project/agents/debugger.md +10 -0
  844. package/templates/.build-project/agents/documenter.md +10 -0
  845. package/templates/.build-project/agents/test-automator.md +10 -0
  846. package/templates/.build-project/config/build.config.jsonc +64 -0
  847. package/templates/.build-project/config/project-context.template.json +6 -0
  848. package/templates/.build-project/config/task-type-aliases.presets/kanban.yaml +14 -0
  849. package/templates/.build-project/config/task-type-aliases.presets/scrum.yaml +17 -0
  850. package/templates/.build-project/config/task-type-aliases.presets/xp.yaml +12 -0
  851. package/templates/.build-project/config/task-type-aliases.yaml +29 -0
  852. package/templates/.build-project/gitignore.template +70 -0
  853. package/templates/.build-project/task-types/analysis.yaml +38 -0
  854. package/templates/.build-project/task-types/architecture.yaml +35 -0
  855. package/templates/.build-project/task-types/doc.yaml +34 -0
  856. package/templates/.build-project/task-types/feature.yaml +22 -0
  857. package/templates/.build-project/task-types/general.yaml +4 -0
  858. package/templates/.build-project/task-types/security.yaml +38 -0
  859. package/templates/AGENTS.template.md +85 -0
  860. package/templates/CLAUDE.template.md +1 -0
  861. package/templates/GEMINI.template.md +1 -0
  862. package/templates/builtin-workflows/code-review.yaml +73 -0
  863. package/templates/builtin-workflows/skills/code-review/SKILL.md +61 -0
  864. package/templates/builtin-workflows/skills/execution-contract-analysis/SKILL.md +24 -0
  865. package/templates/builtin-workflows/skills/execution-contract-code/SKILL.md +19 -0
  866. package/templates/builtin-workflows/skills/execution-contract-structured/SKILL.md +17 -0
  867. package/templates/ci/incident-intake.mjs +787 -0
  868. package/templates/ci/incidents.yml.template +103 -0
  869. package/templates/ci/node.yml.template +17 -0
  870. package/templates/ci/python.yml.template +17 -0
  871. package/templates/guard-kit/GUARD_SETUP.md.template +258 -0
  872. package/templates/guard-kit/build-guard.yml.template +189 -0
  873. package/templates/guard-kit/check.mjs.template +932 -0
  874. package/templates/guard-kit/config.json.template +7 -0
  875. package/templates/guard-kit/policy.json.template +1 -0
  876. package/templates/profiles/README.md +57 -0
  877. package/templates/profiles/frontier-claude.json +23 -0
  878. package/templates/profiles/frontier-codex.json +23 -0
@@ -0,0 +1,1639 @@
1
+ import {
2
+ resolveSynthesisGateFlag
3
+ } from "./chunk-I6FN3R5D.js";
4
+ import {
5
+ findLabRun,
6
+ findLatestLabRun,
7
+ listLabRuns
8
+ } from "./chunk-FT7SGLXT.js";
9
+ import {
10
+ readCompetitionState,
11
+ resolveCliStateRoots
12
+ } from "./chunk-AAAODV76.js";
13
+ import {
14
+ ExitCodeError
15
+ } from "./chunk-Y4ZDDHB6.js";
16
+ import {
17
+ formatVerificationLabel
18
+ } from "./chunk-R2CKS6WT.js";
19
+ import {
20
+ readVariantVerification
21
+ } from "./chunk-3OPP2OZB.js";
22
+ import {
23
+ LabPathResolver
24
+ } from "./chunk-C3KCMAJP.js";
25
+ import {
26
+ resolveRunStateDir
27
+ } from "./chunk-AJN5Y5YZ.js";
28
+ import {
29
+ resolveCliRepoRoot
30
+ } from "./chunk-7VRJHTGZ.js";
31
+
32
+ // src/cli/commands/telemetry-reliability.ts
33
+ import * as fs from "fs";
34
+ import * as path2 from "path";
35
+ import chalk from "chalk";
36
+ import { Command } from "commander";
37
+ import { z } from "zod";
38
+
39
+ // src/cli/utils/reliability-paths.ts
40
+ import * as path from "path";
41
+ function resolveReliabilityPaths(cwd, labPathResolver) {
42
+ const buildDir = path.join(cwd, ".build-project");
43
+ const stateRootDir = labPathResolver.getStateDir(buildDir);
44
+ const defaultTelemetryStateDir = resolveRunStateDir(buildDir);
45
+ const unifiedStateDir = stateRootDir === defaultTelemetryStateDir ? resolveCliStateRoots(cwd).unifiedStateDir : stateRootDir;
46
+ return {
47
+ stateDir: path.join(stateRootDir, "competitions"),
48
+ variantDir: path.join(stateRootDir, "variants"),
49
+ backgroundDir: path.join(stateRootDir, "background"),
50
+ unifiedStateDir,
51
+ synthesisDir: path.join(labPathResolver.getTelemetryDir(buildDir), "synthesis")
52
+ };
53
+ }
54
+
55
+ // src/cli/commands/telemetry-reliability-gates.ts
56
+ function extractGateFailure(details) {
57
+ if (!details || typeof details !== "object" || Array.isArray(details)) return null;
58
+ const record = details;
59
+ const gate = typeof record.gate === "string" && record.gate.length > 0 ? record.gate : "unknown";
60
+ const status = typeof record.status === "string" && record.status.length > 0 ? record.status : "failed";
61
+ return { gate, status };
62
+ }
63
+ function isSynthesisGateFailure(synthesis) {
64
+ return resolveSynthesisGateFlag(synthesis) === "failed";
65
+ }
66
+ function classifySynthesisFailure(synthesis) {
67
+ if (synthesis.success === false) return "synthesis_failure";
68
+ if (!isSynthesisGateFailure(synthesis)) return null;
69
+ const gateFailure = extractGateFailure(synthesis.gateFailureDetails);
70
+ if (gateFailure?.gate === "patch_apply") return "patch_apply_failure";
71
+ return "gate_rejection";
72
+ }
73
+
74
+ // src/cli/commands/telemetry-selection-coverage.ts
75
+ function isVerifiedStatus(status) {
76
+ return status === "passed" || status === "baseline_clean";
77
+ }
78
+ function isVerifiedDelivery(run) {
79
+ return run.safeDelivery.safe && isVerifiedStatus(run.safeDelivery.winnerVerificationStatus);
80
+ }
81
+ function calculateVerifiedDeliveryRate(runs) {
82
+ const deliveryRuns = runs.filter((run) => run.runKind === "delivery");
83
+ if (deliveryRuns.length === 0) return null;
84
+ return deliveryRuns.filter(isVerifiedDelivery).length / deliveryRuns.length;
85
+ }
86
+ function summarizeSelectionCoverage(runs) {
87
+ const deliveryRuns = runs.filter((run) => run.runKind === "delivery");
88
+ const covered = deliveryRuns.filter((run) => run.verifiedVariants > 0);
89
+ const gap = covered.filter(
90
+ (run) => run.winner && !isVerifiedStatus(run.safeDelivery.winnerVerificationStatus)
91
+ );
92
+ return {
93
+ delivery_runs: deliveryRuns.length,
94
+ verified_delivery_rate: calculateVerifiedDeliveryRate(runs),
95
+ runs_with_verified_variant: covered.length,
96
+ verified_coverage_rate: deliveryRuns.length > 0 ? covered.length / deliveryRuns.length : null,
97
+ winner_unverified_with_verified_alternative: gap.length
98
+ };
99
+ }
100
+
101
+ // src/cli/commands/telemetry-reliability.ts
102
+ var RELIABILITY_PROFILES = ["advisory", "strict"];
103
+ var PROVIDER_SPIKE_MIN_TOTAL = 3;
104
+ var PROVIDER_SPIKE_MIN_FAILURES = 2;
105
+ var PROVIDER_SPIKE_FAILURE_RATE = 0.5;
106
+ var FALLBACK_RATE_MIN_ATTEMPTS = 3;
107
+ var FALLBACK_RATE_WARNING = 0.5;
108
+ var DELIVERY_TREND_WINDOW_SIZE = 5;
109
+ var DELIVERY_TREND_WARNING_RATE = 0.9;
110
+ var TelemetryReliabilityOptionsSchema = z.object({
111
+ campaignLabId: z.string().optional(),
112
+ campaignRuns: z.string().optional(),
113
+ includeTestFixtures: z.boolean().optional(),
114
+ json: z.boolean().optional(),
115
+ lab: z.union([z.string(), z.boolean()]).optional(),
116
+ labId: z.string().optional(),
117
+ limit: z.string().optional(),
118
+ profile: z.enum(RELIABILITY_PROFILES).optional(),
119
+ runId: z.string().optional(),
120
+ since: z.string().optional()
121
+ }).strict();
122
+ function parseLimit(raw) {
123
+ if (raw === void 0) return 20;
124
+ const parsed = Number.parseInt(raw, 10);
125
+ if (!Number.isFinite(parsed) || parsed <= 0) {
126
+ throw new Error(`Invalid --limit value "${raw}". Expected a positive integer.`);
127
+ }
128
+ return parsed;
129
+ }
130
+ function parseSinceCutoff(raw, nowMs = Date.now()) {
131
+ if (!raw) return null;
132
+ const trimmed = raw.trim();
133
+ const durationMatch = /^(\d+)([smhd])$/.exec(trimmed);
134
+ if (durationMatch) {
135
+ const amount = Number.parseInt(durationMatch[1] ?? "0", 10);
136
+ const unit = durationMatch[2];
137
+ const multiplier = unit === "s" ? 1e3 : unit === "m" ? 6e4 : unit === "h" ? 60 * 6e4 : 24 * 60 * 6e4;
138
+ return nowMs - amount * multiplier;
139
+ }
140
+ const timestamp = Date.parse(trimmed);
141
+ if (Number.isNaN(timestamp)) {
142
+ throw new Error(`Invalid --since value "${raw}". Expected duration like 2h or ISO timestamp.`);
143
+ }
144
+ return timestamp;
145
+ }
146
+ function resolveProfile(raw) {
147
+ return raw ?? "advisory";
148
+ }
149
+ function readJsonObjectWithDiagnostics(filePath) {
150
+ try {
151
+ const parsed = JSON.parse(fs.readFileSync(filePath, "utf8"));
152
+ return {
153
+ value: parsed && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : null
154
+ };
155
+ } catch (error) {
156
+ return {
157
+ value: null,
158
+ parseError: error instanceof Error ? error.message : String(error),
159
+ filePath
160
+ };
161
+ }
162
+ }
163
+ function optionalBoolean(value) {
164
+ return typeof value === "boolean" ? value : void 0;
165
+ }
166
+ function optionalString(value) {
167
+ return typeof value === "string" ? value : void 0;
168
+ }
169
+ function optionalNumber(value) {
170
+ return typeof value === "number" && Number.isFinite(value) ? value : void 0;
171
+ }
172
+ function synthesisFromRecord(record) {
173
+ if (!record) return void 0;
174
+ return {
175
+ success: optionalBoolean(record.success),
176
+ prNumber: typeof record.prNumber === "number" ? record.prNumber : void 0,
177
+ prUrl: optionalString(record.prUrl),
178
+ error: optionalString(record.error),
179
+ mergedVariants: Array.isArray(record.mergedVariants) ? record.mergedVariants.filter((value) => typeof value === "string") : [],
180
+ donorSelectionDecisions: Array.isArray(record.donorSelectionDecisions) ? record.donorSelectionDecisions : void 0,
181
+ deliverySucceeded: optionalBoolean(record.deliverySucceeded),
182
+ synthesisApplied: optionalBoolean(record.synthesisApplied),
183
+ complementaryPatchApplied: optionalBoolean(record.complementaryPatchApplied),
184
+ applyMode: optionalString(record.applyMode),
185
+ winnerFallback: optionalBoolean(record.winnerFallback),
186
+ fallbackReason: optionalString(record.fallbackReason),
187
+ patchApplyValidated: optionalBoolean(record.patchApplyValidated),
188
+ gatesPassed: optionalBoolean(record.gatesPassed),
189
+ gateFailureDetails: record.gateFailureDetails,
190
+ synthesisOutcomeStatus: optionalString(record.synthesisOutcomeStatus),
191
+ intentFilteredHunkCount: optionalNumber(record.intentFilteredHunkCount),
192
+ excludedHunkCount: optionalNumber(record.excludedHunkCount),
193
+ unknownIncludedHunkCount: optionalNumber(record.unknownIncludedHunkCount),
194
+ overlapRejectedHunkCount: optionalNumber(record.overlapRejectedHunkCount),
195
+ aiGuidedFallbackAttempted: optionalBoolean(record.aiGuidedFallbackAttempted),
196
+ aiGuidedFallbackOutcome: optionalString(record.aiGuidedFallbackOutcome)
197
+ };
198
+ }
199
+ function incrementProvider(providers, provider, failureType) {
200
+ const summary = providers[provider] ?? { total: 0, failures: 0, failureTypes: {} };
201
+ providers[provider] = summary;
202
+ summary.total += 1;
203
+ if (failureType) {
204
+ summary.failures += 1;
205
+ summary.failureTypes[failureType] = (summary.failureTypes[failureType] ?? 0) + 1;
206
+ }
207
+ }
208
+ function incrementFailureType(report, failureType) {
209
+ report.failures.byType[failureType] = (report.failures.byType[failureType] ?? 0) + 1;
210
+ }
211
+ function incrementGateFailure(gateFailures, gate, status) {
212
+ const summary = gateFailures[gate] ?? { count: 0, statuses: {} };
213
+ gateFailures[gate] = summary;
214
+ summary.count += 1;
215
+ summary.statuses[status] = (summary.statuses[status] ?? 0) + 1;
216
+ }
217
+ function isTestFixtureCompetitionId(id) {
218
+ return /^test[-_]/.test(id);
219
+ }
220
+ function listRecentCompetitionIds(stateDir, limit, options = {}) {
221
+ let entries = [];
222
+ try {
223
+ entries = fs.readdirSync(stateDir, { withFileTypes: true }).filter((entry) => entry.isFile() && entry.name.endsWith(".json")).map((entry) => {
224
+ const filePath = path2.join(stateDir, entry.name);
225
+ return {
226
+ id: entry.name.replace(/\.json$/, ""),
227
+ mtimeMs: fs.statSync(filePath).mtimeMs
228
+ };
229
+ });
230
+ } catch {
231
+ return [];
232
+ }
233
+ return entries.filter((entry) => options.includeTestFixtures || !isTestFixtureCompetitionId(entry.id)).filter(
234
+ (entry) => options.sinceMs === null || options.sinceMs === void 0 || entry.mtimeMs >= options.sinceMs
235
+ ).sort((a, b) => b.mtimeMs - a.mtimeMs).slice(0, limit).map((entry) => entry.id);
236
+ }
237
+ function listRecentLabVariantCompetitionIds(variantDir, limit, options = {}) {
238
+ let entries = [];
239
+ try {
240
+ entries = fs.readdirSync(variantDir, { withFileTypes: true }).filter((entry) => entry.isFile() && entry.name.endsWith(".adaptive-setup.json")).map((entry) => {
241
+ const filePath = path2.join(variantDir, entry.name);
242
+ return {
243
+ id: entry.name.replace(/\.adaptive-setup\.json$/, ""),
244
+ mtimeMs: fs.statSync(filePath).mtimeMs
245
+ };
246
+ });
247
+ } catch {
248
+ return [];
249
+ }
250
+ return entries.filter((entry) => options.includeTestFixtures || !isTestFixtureCompetitionId(entry.id)).filter(
251
+ (entry) => options.sinceMs === null || options.sinceMs === void 0 || entry.mtimeMs >= options.sinceMs
252
+ ).sort((a, b) => b.mtimeMs - a.mtimeMs).slice(0, limit).map((entry) => entry.id);
253
+ }
254
+ function formatObservedAt(ms) {
255
+ return new Date(ms).toISOString();
256
+ }
257
+ function observedCompetitionBounds(stateDir, competitionIds) {
258
+ const timestamps = competitionIds.map((id) => {
259
+ try {
260
+ return fs.statSync(path2.join(stateDir, `${id}.json`)).mtimeMs;
261
+ } catch {
262
+ return null;
263
+ }
264
+ }).filter((value) => value !== null);
265
+ if (timestamps.length === 0) {
266
+ return { oldestObservedAt: null, newestObservedAt: null };
267
+ }
268
+ return {
269
+ oldestObservedAt: formatObservedAt(Math.min(...timestamps)),
270
+ newestObservedAt: formatObservedAt(Math.max(...timestamps))
271
+ };
272
+ }
273
+ function observedLabVariantBounds(variantDir, competitionIds) {
274
+ const timestamps = competitionIds.map((id) => {
275
+ try {
276
+ return fs.statSync(path2.join(variantDir, `${id}.adaptive-setup.json`)).mtimeMs;
277
+ } catch {
278
+ return null;
279
+ }
280
+ }).filter((value) => value !== null);
281
+ if (timestamps.length === 0) {
282
+ return { oldestObservedAt: null, newestObservedAt: null };
283
+ }
284
+ return {
285
+ oldestObservedAt: formatObservedAt(Math.min(...timestamps)),
286
+ newestObservedAt: formatObservedAt(Math.max(...timestamps))
287
+ };
288
+ }
289
+ function labVariantFiles(variantDir, competitionId) {
290
+ try {
291
+ return fs.readdirSync(variantDir, { withFileTypes: true }).filter(
292
+ (entry) => entry.isFile() && entry.name.startsWith(`${competitionId}-`) && entry.name.endsWith(".json") && !entry.name.endsWith(".lifecycle.json")
293
+ ).map((entry) => path2.join(variantDir, entry.name));
294
+ } catch {
295
+ return [];
296
+ }
297
+ }
298
+ function labVariantStateFromRecord(record) {
299
+ const result = getRecordValue(record, "result");
300
+ const outcome = getRecordValue(record, "outcome");
301
+ const verification = getRecordValue(outcome, "verification");
302
+ return {
303
+ provider: optionalString(record.provider) ?? "unknown",
304
+ model: optionalString(record.model),
305
+ resolvedModel: optionalString(record.resolvedModel),
306
+ executionMode: optionalString(record.executionMode),
307
+ success: optionalBoolean(record.success),
308
+ outcome: verification && typeof verification === "object" && !Array.isArray(verification) ? {
309
+ verification: {
310
+ status: optionalString(getRecordValue(verification, "status")),
311
+ buildStatus: optionalString(getRecordValue(verification, "buildStatus")),
312
+ testStatus: optionalString(getRecordValue(verification, "testStatus"))
313
+ }
314
+ } : void 0,
315
+ testStatus: optionalString(record.testStatus),
316
+ testMetrics: typeof record.testMetrics === "object" && record.testMetrics !== null ? record.testMetrics : void 0,
317
+ testsExecuted: typeof record.testsExecuted === "object" && record.testsExecuted !== null ? record.testsExecuted : void 0,
318
+ completeness: optionalNumber(record.completeness),
319
+ duration: optionalNumber(record.duration),
320
+ errorMessage: optionalString(record.errorMessage) ?? optionalString(getRecordValue(result, "error")) ?? optionalString(getRecordValue(result, "stderr")),
321
+ timedOut: optionalBoolean(record.timedOut),
322
+ terminationReason: optionalString(record.terminationReason)
323
+ };
324
+ }
325
+ function readLabVariantCompetitionState(competitionId, variantDir) {
326
+ const records = labVariantFiles(variantDir, competitionId).map((filePath) => readJsonObjectWithDiagnostics(filePath).value).filter((record) => record !== null);
327
+ const variants = records.map(labVariantStateFromRecord);
328
+ if (variants.length === 0) return null;
329
+ const winner = variants.find((variant) => variant.success === true) ?? null;
330
+ const allAnalysis = records.every(
331
+ (record) => getRecordValue(record, "executionIntent") === "analysis"
332
+ );
333
+ return {
334
+ taskId: competitionId,
335
+ primarySource: "competition_handle",
336
+ status: variants.every((variant) => variant.success === false) ? "failed" : "completed",
337
+ outcome: winner ? "winner_selected" : "all_failed",
338
+ winner: winner ? {
339
+ provider: winner.provider,
340
+ model: winner.model,
341
+ resolvedModel: winner.resolvedModel,
342
+ executionMode: winner.executionMode
343
+ } : null,
344
+ variants,
345
+ sources: {
346
+ competitionHandle: {
347
+ path: variantDir,
348
+ readAt: (/* @__PURE__ */ new Date()).toISOString(),
349
+ exists: true
350
+ },
351
+ backgroundHandle: {
352
+ path: "",
353
+ readAt: (/* @__PURE__ */ new Date()).toISOString(),
354
+ exists: false
355
+ },
356
+ unifiedState: {
357
+ path: "",
358
+ readAt: (/* @__PURE__ */ new Date()).toISOString(),
359
+ exists: false
360
+ }
361
+ },
362
+ rawHandle: allAnalysis ? { deliverableContract: { editsExpected: false, executionIntentEffective: "analysis" } } : void 0
363
+ };
364
+ }
365
+ function classifyVariantFailure(variant) {
366
+ if (variant.success !== false) return null;
367
+ const terminationReason = variant.terminationReason?.toLowerCase() ?? "";
368
+ const message = variant.errorMessage?.toLowerCase() ?? "";
369
+ const crashSignalPattern = /\b(sigkill|sigsegv|sigabrt|sigbus|sigill|sigquit)\b/;
370
+ if (variant.timedOut === true || terminationReason.includes("timeout") || message.includes("timeout") || message.includes("timed out") || message.includes("sigterm")) {
371
+ return "timeout";
372
+ }
373
+ if (message.includes("invalid json") || message.includes("not valid json") || message.includes("malformed json") || message.includes("unexpected token")) {
374
+ return "malformed_json";
375
+ }
376
+ if (terminationReason.includes("crash")) {
377
+ return "process_crash";
378
+ }
379
+ if (crashSignalPattern.test(terminationReason) || crashSignalPattern.test(message) || message.includes("segmentation fault") || message.includes("killed by signal") || message.includes("exited with code 137")) {
380
+ return "process_crash";
381
+ }
382
+ if (terminationReason.includes("failed_error") || message.length > 0) {
383
+ return "provider_error";
384
+ }
385
+ return "unknown_provider_failure";
386
+ }
387
+ function readRecordedVerification(variant) {
388
+ const hasRecord = typeof variant.outcome?.verification?.status === "string" || variant.testStatus !== void 0 || typeof variant.testsExecuted?.exitCode === "number" || typeof variant.testMetrics?.failedTests === "number";
389
+ return hasRecord ? readVariantVerification(variant) : null;
390
+ }
391
+ function getVerificationStatus(variant) {
392
+ const verification = readRecordedVerification(variant);
393
+ return verification ? formatVerificationLabel(verification) : null;
394
+ }
395
+ function getVerificationFailure(variant) {
396
+ const verification = readRecordedVerification(variant);
397
+ if (verification?.status !== "failed") return null;
398
+ return {
399
+ provider: variant.provider,
400
+ model: variant.resolvedModel ?? variant.model ?? null,
401
+ executionMode: variant.executionMode ?? null,
402
+ status: formatVerificationLabel(verification),
403
+ buildStatus: verification.gates.build.status,
404
+ testStatus: verification.gates.test.status
405
+ };
406
+ }
407
+ function variantMatchesWinner(variant, winner) {
408
+ if (!winner) return false;
409
+ if (variant.provider !== winner.provider) return false;
410
+ if (winner.executionMode && variant.executionMode && variant.executionMode !== winner.executionMode) {
411
+ return false;
412
+ }
413
+ const winnerModels = [winner.resolvedModel, winner.model].filter(
414
+ (model) => typeof model === "string" && model.length > 0
415
+ );
416
+ const variantModels = [variant.resolvedModel, variant.model].filter(
417
+ (model) => typeof model === "string" && model.length > 0
418
+ );
419
+ if (winnerModels.length === 0 || variantModels.length === 0) return true;
420
+ return winnerModels.some((model) => variantModels.includes(model));
421
+ }
422
+ function getWinnerVerificationFailure(state) {
423
+ if (!state.winner) return null;
424
+ const winnerVariant = state.variants.find(
425
+ (variant) => variantMatchesWinner(variant, state.winner)
426
+ );
427
+ return winnerVariant ? getVerificationFailure(winnerVariant) : null;
428
+ }
429
+ function getWinnerVerificationStatus(state) {
430
+ if (!state.winner) return null;
431
+ const winnerVariant = state.variants.find(
432
+ (variant) => variantMatchesWinner(variant, state.winner)
433
+ );
434
+ return winnerVariant ? getVerificationStatus(winnerVariant) : null;
435
+ }
436
+ function incrementVerificationSummary(summary, status) {
437
+ if (status === "passed") summary.passed += 1;
438
+ else if (status === "failed" || status === "timeout") summary.failed += 1;
439
+ else if (status === "baseline_clean") summary.baselineClean += 1;
440
+ else if (status === "not_run" || status === "unavailable") summary.notRun += 1;
441
+ }
442
+ function summarizeRunSynthesis(synthesis) {
443
+ return {
444
+ attempted: Boolean(synthesis),
445
+ applied: synthesis?.synthesisApplied ?? null,
446
+ complementaryPatchApplied: synthesis?.complementaryPatchApplied ?? null,
447
+ applyMode: synthesis?.applyMode ?? null,
448
+ winnerFallback: synthesis?.winnerFallback ?? null,
449
+ deliverySucceeded: synthesis?.deliverySucceeded ?? null,
450
+ gatesPassed: synthesis?.gatesPassed ?? null,
451
+ fallbackReason: synthesis?.fallbackReason ?? null,
452
+ error: synthesis?.error ?? null,
453
+ gateFailure: extractGateFailure(synthesis?.gateFailureDetails),
454
+ donorSelectionDecisions: synthesis?.donorSelectionDecisions ?? null,
455
+ intentFilteredHunkCount: synthesis?.intentFilteredHunkCount ?? null,
456
+ excludedHunkCount: synthesis?.excludedHunkCount ?? null,
457
+ unknownIncludedHunkCount: synthesis?.unknownIncludedHunkCount ?? null,
458
+ overlapRejectedHunkCount: synthesis?.overlapRejectedHunkCount ?? null,
459
+ aiGuidedFallbackAttempted: synthesis?.aiGuidedFallbackAttempted ?? null,
460
+ aiGuidedFallbackOutcome: synthesis?.aiGuidedFallbackOutcome ?? null
461
+ };
462
+ }
463
+ function summarizeSafeDelivery(state, synthesis, runKind) {
464
+ const winnerVerificationStatus = getWinnerVerificationStatus(state);
465
+ if (state.winner && (state.outcome === "winner_selected" || state.status === "completed")) {
466
+ return { safe: true, basis: "winner_selected", reason: null, winnerVerificationStatus };
467
+ }
468
+ if (synthesis?.deliverySucceeded === true) {
469
+ return { safe: true, basis: "synthesis_delivery", reason: null, winnerVerificationStatus };
470
+ }
471
+ if (runKind === "analysis") {
472
+ const hasSuccessfulAnalysisOutput = state.status === "completed" && state.variants.some(
473
+ (variant) => variant.success === true && !variant.errorMessage && variant.timedOut !== true && variant.terminationReason !== "timeout"
474
+ );
475
+ return {
476
+ safe: hasSuccessfulAnalysisOutput,
477
+ basis: hasSuccessfulAnalysisOutput ? "analysis_result" : "analysis_no_result",
478
+ reason: hasSuccessfulAnalysisOutput ? null : state.errorMessage ?? synthesis?.error ?? "No successful analysis output preserved",
479
+ winnerVerificationStatus
480
+ };
481
+ }
482
+ const reason = state.errorMessage ?? synthesis?.error ?? synthesis?.fallbackReason ?? "No winner preserved";
483
+ return {
484
+ safe: false,
485
+ basis: state.winner ? "delivery_failed" : "no_winner",
486
+ reason,
487
+ winnerVerificationStatus
488
+ };
489
+ }
490
+ function getRecordValue(value, key) {
491
+ return value && typeof value === "object" && !Array.isArray(value) ? value[key] : void 0;
492
+ }
493
+ function classifyRunKind(state) {
494
+ const deliverableContract = getRecordValue(state.rawHandle, "deliverableContract");
495
+ const editsExpected = getRecordValue(deliverableContract, "editsExpected");
496
+ const executionIntentEffective = getRecordValue(deliverableContract, "executionIntentEffective");
497
+ if (editsExpected === false && executionIntentEffective === "analysis") {
498
+ return "analysis";
499
+ }
500
+ return "delivery";
501
+ }
502
+ function summarizeRun(taskId, state, synthesis, providerFailures, verificationFailures, incompleteSpecInputs, verifiedVariants, observedAt) {
503
+ const winner = state.winner ? {
504
+ provider: state.winner.provider ?? null,
505
+ model: state.winner.resolvedModel ?? state.winner.model ?? null,
506
+ variant: state.winner.variant ?? null
507
+ } : null;
508
+ const runKind = classifyRunKind(state);
509
+ return {
510
+ taskId,
511
+ runKind,
512
+ observedAt,
513
+ status: state.status ?? null,
514
+ outcome: state.outcome ?? null,
515
+ winner,
516
+ safeDelivery: summarizeSafeDelivery(state, synthesis, runKind),
517
+ providerFailures,
518
+ verificationFailures,
519
+ incompleteSpecInputs,
520
+ verifiedVariants,
521
+ synthesis: summarizeRunSynthesis(synthesis)
522
+ };
523
+ }
524
+ function observedCompetitionAt(stateDir, competitionId) {
525
+ try {
526
+ return formatObservedAt(fs.statSync(path2.join(stateDir, `${competitionId}.json`)).mtimeMs);
527
+ } catch {
528
+ return null;
529
+ }
530
+ }
531
+ function readSynthesisArtifactRecord(synthesisDirs, taskId) {
532
+ for (const synthesisDir of synthesisDirs) {
533
+ const artifactPath = path2.join(synthesisDir, `${taskId}.json`);
534
+ if (fs.existsSync(artifactPath)) {
535
+ return readJsonObjectWithDiagnostics(artifactPath);
536
+ }
537
+ }
538
+ return { value: null };
539
+ }
540
+ function addAdvisorySignal(report, signal) {
541
+ report.advisory.signals.push(signal);
542
+ }
543
+ function calculateSafeDeliveryRate(runs) {
544
+ const deliveryRuns = runs.filter((run) => run.runKind === "delivery");
545
+ if (deliveryRuns.length === 0) return null;
546
+ return deliveryRuns.filter((run) => run.safeDelivery.safe).length / deliveryRuns.length;
547
+ }
548
+ function calculateDeliveryTrend(runs) {
549
+ const deliveryRuns = runs.filter((run) => run.runKind === "delivery");
550
+ const recentRuns = deliveryRuns.slice(0, DELIVERY_TREND_WINDOW_SIZE);
551
+ const previousRuns = deliveryRuns.slice(
552
+ DELIVERY_TREND_WINDOW_SIZE,
553
+ DELIVERY_TREND_WINDOW_SIZE * 2
554
+ );
555
+ const recentRate = calculateSafeDeliveryRate(recentRuns);
556
+ const previousRate = previousRuns.length === DELIVERY_TREND_WINDOW_SIZE ? calculateSafeDeliveryRate(previousRuns) : null;
557
+ return {
558
+ windowSize: DELIVERY_TREND_WINDOW_SIZE,
559
+ sampleSize: recentRuns.length + previousRuns.length,
560
+ recentRate,
561
+ previousRate,
562
+ delta: recentRate !== null && previousRate !== null ? recentRate - previousRate : null,
563
+ threshold: DELIVERY_TREND_WARNING_RATE,
564
+ status: recentRuns.length < DELIVERY_TREND_WINDOW_SIZE ? "insufficient_data" : recentRate !== null && recentRate < DELIVERY_TREND_WARNING_RATE ? "warning" : "ok"
565
+ };
566
+ }
567
+ function hasIncompleteInputSpec(variant) {
568
+ const warning = variant.inputSpecWarning;
569
+ if (!warning) return false;
570
+ return warning.hasFillPlaceholders === true || (warning.missingFields?.length ?? 0) > 0;
571
+ }
572
+ function populateReliabilityAdvisory(report) {
573
+ const deliveryRuns = report.runs.filter((run) => run.runKind === "delivery");
574
+ const unsafeRuns = deliveryRuns.filter((run) => !run.safeDelivery.safe);
575
+ const fallbackRuns = report.runs.filter((run) => run.synthesis.winnerFallback === true);
576
+ const incompleteSpecRuns = report.runs.filter((run) => run.incompleteSpecInputs > 0);
577
+ const verificationFailedRuns = report.runs.filter((run) => run.verificationFailures.length > 0);
578
+ report.advisory.unsafeRuns = unsafeRuns.length;
579
+ report.advisory.fallbackRuns = fallbackRuns.length;
580
+ report.advisory.fallbackRate = report.synthesis.attempted > 0 ? fallbackRuns.length / report.synthesis.attempted : null;
581
+ report.advisory.deliveryTrend = calculateDeliveryTrend(report.runs);
582
+ for (const [provider, summary] of Object.entries(report.providers)) {
583
+ const rate = summary.total > 0 ? summary.failures / summary.total : null;
584
+ report.advisory.providerFailureRates[provider] = {
585
+ total: summary.total,
586
+ failures: summary.failures,
587
+ rate
588
+ };
589
+ if (summary.total >= PROVIDER_SPIKE_MIN_TOTAL && summary.failures >= PROVIDER_SPIKE_MIN_FAILURES && rate !== null && rate >= PROVIDER_SPIKE_FAILURE_RATE) {
590
+ addAdvisorySignal(report, {
591
+ code: "provider_failure_spike",
592
+ severity: "warning",
593
+ message: `${provider} failed ${summary.failures}/${summary.total} recent variants.`,
594
+ value: rate,
595
+ threshold: PROVIDER_SPIKE_FAILURE_RATE,
596
+ provider,
597
+ taskIds: report.runs.filter((run) => run.providerFailures.some((failure) => failure.provider === provider)).map((run) => run.taskId)
598
+ });
599
+ }
600
+ }
601
+ if (unsafeRuns.length > 0) {
602
+ addAdvisorySignal(report, {
603
+ code: "unsafe_runs_observed",
604
+ severity: "warning",
605
+ message: `${unsafeRuns.length} recent competition(s) did not preserve safe delivery.`,
606
+ value: unsafeRuns.length,
607
+ threshold: 0,
608
+ provider: null,
609
+ taskIds: unsafeRuns.map((run) => run.taskId)
610
+ });
611
+ }
612
+ if (incompleteSpecRuns.length > 0) {
613
+ addAdvisorySignal(report, {
614
+ code: "incomplete_spec_inputs_observed",
615
+ severity: "warning",
616
+ message: `${report.inputQuality.incompleteVariants} recent variant(s) used incomplete input specs.`,
617
+ value: report.inputQuality.incompleteVariants,
618
+ threshold: 0,
619
+ provider: null,
620
+ taskIds: incompleteSpecRuns.map((run) => run.taskId)
621
+ });
622
+ }
623
+ if (verificationFailedRuns.length > 0) {
624
+ addAdvisorySignal(report, {
625
+ code: "verification_failures_observed",
626
+ severity: "warning",
627
+ message: `${report.verification.failed} recent variant(s) failed deterministic verification.`,
628
+ value: report.verification.failed,
629
+ threshold: 0,
630
+ provider: null,
631
+ taskIds: verificationFailedRuns.map((run) => run.taskId)
632
+ });
633
+ }
634
+ if (report.advisory.deliveryTrend.status === "warning") {
635
+ const recentRate = report.advisory.deliveryTrend.recentRate ?? 0;
636
+ const recentDeliveryRuns = deliveryRuns.slice(0, DELIVERY_TREND_WINDOW_SIZE);
637
+ addAdvisorySignal(report, {
638
+ code: "safe_delivery_trend_degraded",
639
+ severity: "warning",
640
+ message: `Recent safe-delivery rate is ${formatPercent(recentRate)} across the last ${report.advisory.deliveryTrend.windowSize} competition(s).`,
641
+ value: recentRate,
642
+ threshold: DELIVERY_TREND_WARNING_RATE,
643
+ provider: null,
644
+ taskIds: recentDeliveryRuns.filter((run) => !run.safeDelivery.safe).map((run) => run.taskId)
645
+ });
646
+ }
647
+ if (report.synthesis.attempted >= FALLBACK_RATE_MIN_ATTEMPTS && report.advisory.fallbackRate !== null && report.advisory.fallbackRate >= FALLBACK_RATE_WARNING) {
648
+ addAdvisorySignal(report, {
649
+ code: "fallback_rate_elevated",
650
+ severity: "info",
651
+ message: `${fallbackRuns.length}/${report.synthesis.attempted} recent synthesis attempts fell back to the winner.`,
652
+ value: report.advisory.fallbackRate,
653
+ threshold: FALLBACK_RATE_WARNING,
654
+ provider: null,
655
+ taskIds: fallbackRuns.map((run) => run.taskId)
656
+ });
657
+ }
658
+ }
659
+ function hasCompleteGateFailureDetails(synthesis) {
660
+ if (synthesis.gatesPassed !== false) return true;
661
+ if (!synthesis.gateFailureDetails || typeof synthesis.gateFailureDetails !== "object" || Array.isArray(synthesis.gateFailureDetails)) {
662
+ return false;
663
+ }
664
+ const details = synthesis.gateFailureDetails;
665
+ return typeof details.gate === "string" && details.gate.length > 0 && typeof details.status === "string" && details.status.length > 0;
666
+ }
667
+ function addGuardrailFinding(report, finding) {
668
+ if (finding.severity === "hard") {
669
+ report.guardrails.hardFailures.push(finding);
670
+ return;
671
+ }
672
+ report.guardrails.warnings.push(finding);
673
+ }
674
+ function addCorruptSourceWarning(report, taskId, code, sourceLabel, parseError, filePath) {
675
+ if (!parseError) return;
676
+ if (filePath) {
677
+ console.error(`Warning: ${filePath}: ${parseError}`);
678
+ }
679
+ report.inputQuality.corruptedFiles += 1;
680
+ addGuardrailFinding(report, {
681
+ code,
682
+ severity: "warning",
683
+ taskId,
684
+ message: `${sourceLabel} could not be read: ${parseError}`
685
+ });
686
+ incrementFailureType(report, code);
687
+ }
688
+ function evaluateCompetitionGuardrails(report, taskId, state, synthesis) {
689
+ addCorruptSourceWarning(
690
+ report,
691
+ taskId,
692
+ "competition_state_corrupt",
693
+ "Competition state",
694
+ state.sources.competitionHandle.parseError,
695
+ state.sources.competitionHandle.path || void 0
696
+ );
697
+ addCorruptSourceWarning(
698
+ report,
699
+ taskId,
700
+ "background_state_corrupt",
701
+ "Background state",
702
+ state.sources.backgroundHandle.parseError,
703
+ state.sources.backgroundHandle.path || void 0
704
+ );
705
+ addCorruptSourceWarning(
706
+ report,
707
+ taskId,
708
+ "unified_state_corrupt",
709
+ "Unified state",
710
+ state.sources.unifiedState.parseError,
711
+ state.sources.unifiedState.path || void 0
712
+ );
713
+ if (state.status === "completed" && state.outcome === "winner_selected" && !state.winner) {
714
+ addGuardrailFinding(report, {
715
+ code: "winner_selected_without_winner",
716
+ severity: "hard",
717
+ taskId,
718
+ message: "Competition reports winner_selected but has no winner payload."
719
+ });
720
+ }
721
+ const winnerVerificationFailure = getWinnerVerificationFailure(state);
722
+ if (winnerVerificationFailure) {
723
+ addGuardrailFinding(report, {
724
+ code: "winner_failed_verification",
725
+ severity: "warning",
726
+ taskId,
727
+ message: `Judged winner ${winnerVerificationFailure.provider}:${winnerVerificationFailure.model ?? "unknown"} failed deterministic verification; delivery remains based on the judge-selected winner.`
728
+ });
729
+ }
730
+ if (synthesis?.synthesisApplied === true && (synthesis.deliverySucceeded !== true || synthesis.gatesPassed !== true || synthesis.patchApplyValidated !== true || synthesis.winnerFallback === true || synthesis.mergedVariants.length === 0)) {
731
+ addGuardrailFinding(report, {
732
+ code: "applied_synthesis_incoherent",
733
+ severity: "hard",
734
+ taskId,
735
+ message: "Applied synthesis must have deliverySucceeded=true, gatesPassed=true, patchApplyValidated=true, no winner fallback, and at least one merged variant."
736
+ });
737
+ }
738
+ if (synthesis?.winnerFallback === true && (synthesis.synthesisApplied === true || synthesis.deliverySucceeded !== true)) {
739
+ addGuardrailFinding(report, {
740
+ code: "winner_fallback_incoherent",
741
+ severity: "hard",
742
+ taskId,
743
+ message: "Winner fallback must preserve delivery and must not also report synthesisApplied=true."
744
+ });
745
+ }
746
+ if (synthesis && !hasCompleteGateFailureDetails(synthesis)) {
747
+ addGuardrailFinding(report, {
748
+ code: "gate_failure_details_missing",
749
+ severity: state.winner && synthesis.winnerFallback === true && synthesis.deliverySucceeded === true ? "warning" : "hard",
750
+ taskId,
751
+ message: "gatesPassed=false requires gateFailureDetails.gate and gateFailureDetails.status."
752
+ });
753
+ }
754
+ const rejectedOrFailedSynthesis = synthesis?.success === false || synthesis?.gatesPassed === false;
755
+ if (rejectedOrFailedSynthesis && synthesis?.deliverySucceeded !== true && synthesis?.winnerFallback !== true && !state.winner) {
756
+ addGuardrailFinding(report, {
757
+ code: "synthesis_failure_without_winner_preservation",
758
+ severity: "hard",
759
+ taskId,
760
+ message: "Synthesis failed or was rejected without explicit fallback or a preserved judged winner."
761
+ });
762
+ }
763
+ if ((synthesis?.gatesPassed === false || synthesis?.winnerFallback === true) && state.winner) {
764
+ addGuardrailFinding(report, {
765
+ code: "synthesis_rejected_winner_preserved",
766
+ severity: "warning",
767
+ taskId,
768
+ message: "Synthesis did not apply, but the judged winner remains available."
769
+ });
770
+ }
771
+ }
772
+ function buildTelemetryReliabilityReport(options) {
773
+ const cwd = options.cwd ?? resolveCliRepoRoot(process.cwd());
774
+ const limit = options.limit ?? 20;
775
+ const profile = resolveProfile(options.profile);
776
+ const sinceMs = parseSinceCutoff(options.since);
777
+ const paths = resolveReliabilityPaths(
778
+ cwd,
779
+ options.labPathResolver ?? LabPathResolver.getInstance()
780
+ );
781
+ const { stateDir, synthesisDir } = paths;
782
+ const synthesisDirs = options.synthesisDirs?.length ? options.synthesisDirs : [synthesisDir];
783
+ let competitionIds = listRecentCompetitionIds(stateDir, limit, {
784
+ includeTestFixtures: options.includeTestFixtures,
785
+ sinceMs
786
+ });
787
+ const useLabVariantFallback = competitionIds.length === 0 && fs.existsSync(paths.variantDir);
788
+ if (useLabVariantFallback) {
789
+ competitionIds = listRecentLabVariantCompetitionIds(paths.variantDir, limit, {
790
+ includeTestFixtures: options.includeTestFixtures,
791
+ sinceMs
792
+ });
793
+ }
794
+ const observedBounds = useLabVariantFallback ? observedLabVariantBounds(paths.variantDir, competitionIds) : observedCompetitionBounds(stateDir, competitionIds);
795
+ const report = {
796
+ generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
797
+ profile,
798
+ scanned: {
799
+ stateDir,
800
+ synthesisDir,
801
+ competitions: competitionIds.length,
802
+ limit,
803
+ since: options.since ?? null,
804
+ oldestObservedAt: observedBounds.oldestObservedAt,
805
+ newestObservedAt: observedBounds.newestObservedAt
806
+ },
807
+ delivery: {
808
+ completed: 0,
809
+ winnerSelected: 0,
810
+ failed: 0,
811
+ deliveryRate: null,
812
+ verifiedDeliveryRate: null
813
+ },
814
+ synthesis: {
815
+ attempted: 0,
816
+ applied: 0,
817
+ winnerFallback: 0,
818
+ deliverySucceeded: 0,
819
+ gatesFailed: 0,
820
+ gateFailures: {}
821
+ },
822
+ verification: {
823
+ passed: 0,
824
+ failed: 0,
825
+ baselineClean: 0,
826
+ notRun: 0
827
+ },
828
+ providers: {},
829
+ failures: {
830
+ byType: {}
831
+ },
832
+ inputQuality: {
833
+ incompleteRuns: 0,
834
+ incompleteVariants: 0,
835
+ corruptedFiles: 0
836
+ },
837
+ guardrails: {
838
+ hardFailures: [],
839
+ warnings: []
840
+ },
841
+ runs: [],
842
+ advisory: {
843
+ unsafeRuns: 0,
844
+ fallbackRuns: 0,
845
+ fallbackRate: null,
846
+ deliveryTrend: {
847
+ windowSize: DELIVERY_TREND_WINDOW_SIZE,
848
+ sampleSize: 0,
849
+ recentRate: null,
850
+ previousRate: null,
851
+ delta: null,
852
+ threshold: DELIVERY_TREND_WARNING_RATE,
853
+ status: "insufficient_data"
854
+ },
855
+ providerFailureRates: {},
856
+ signals: []
857
+ }
858
+ };
859
+ for (const id of competitionIds) {
860
+ const state = useLabVariantFallback ? readLabVariantCompetitionState(id, paths.variantDir) : readCompetitionState(id, {
861
+ cwd,
862
+ stateDir: paths.stateDir,
863
+ backgroundDir: paths.backgroundDir,
864
+ backgroundDirs: options.backgroundDirs,
865
+ unifiedStateDir: paths.unifiedStateDir
866
+ });
867
+ if (!state) continue;
868
+ const runKind = classifyRunKind(state);
869
+ if (runKind === "delivery") {
870
+ if (state.status === "completed") report.delivery.completed += 1;
871
+ if (state.outcome === "winner_selected" || state.winner) report.delivery.winnerSelected += 1;
872
+ if (state.status === "failed" || state.outcome === "failed") report.delivery.failed += 1;
873
+ }
874
+ const providerFailures = [];
875
+ const verificationFailures = [];
876
+ let incompleteSpecInputs = 0;
877
+ let verifiedVariants = 0;
878
+ for (const variant of state.variants) {
879
+ if (hasIncompleteInputSpec(variant)) incompleteSpecInputs += 1;
880
+ const verificationStatus = getVerificationStatus(variant);
881
+ incrementVerificationSummary(report.verification, verificationStatus);
882
+ if (isVerifiedStatus(verificationStatus)) verifiedVariants += 1;
883
+ const verificationFailure = getVerificationFailure(variant);
884
+ if (verificationFailure) {
885
+ verificationFailures.push(verificationFailure);
886
+ incrementFailureType(report, "verification_failed");
887
+ }
888
+ const failureType = classifyVariantFailure(variant);
889
+ incrementProvider(report.providers, variant.provider, failureType);
890
+ if (failureType) {
891
+ incrementFailureType(report, failureType);
892
+ providerFailures.push({
893
+ provider: variant.provider,
894
+ model: variant.resolvedModel ?? variant.model ?? null,
895
+ executionMode: variant.executionMode ?? null,
896
+ type: failureType,
897
+ errorMessage: variant.errorMessage ?? null,
898
+ terminationReason: variant.terminationReason ?? null,
899
+ timedOut: variant.timedOut ?? null
900
+ });
901
+ }
902
+ }
903
+ if (incompleteSpecInputs > 0) {
904
+ report.inputQuality.incompleteRuns += 1;
905
+ report.inputQuality.incompleteVariants += incompleteSpecInputs;
906
+ }
907
+ const artifactRecord = readSynthesisArtifactRecord(synthesisDirs, id);
908
+ addCorruptSourceWarning(
909
+ report,
910
+ id,
911
+ "synthesis_artifact_corrupt",
912
+ "Synthesis artifact",
913
+ artifactRecord.parseError,
914
+ artifactRecord.filePath
915
+ );
916
+ const artifact = synthesisFromRecord(artifactRecord.value);
917
+ const synthesis = artifact ?? state.synthesis;
918
+ evaluateCompetitionGuardrails(report, id, state, synthesis);
919
+ report.runs.push(
920
+ summarizeRun(
921
+ id,
922
+ state,
923
+ synthesis,
924
+ providerFailures,
925
+ verificationFailures,
926
+ incompleteSpecInputs,
927
+ verifiedVariants,
928
+ useLabVariantFallback ? observedLabVariantBounds(paths.variantDir, [id]).newestObservedAt : observedCompetitionAt(paths.stateDir, id)
929
+ )
930
+ );
931
+ if (!synthesis) continue;
932
+ report.synthesis.attempted += 1;
933
+ if (synthesis.synthesisApplied === true) report.synthesis.applied += 1;
934
+ if (synthesis.winnerFallback === true) report.synthesis.winnerFallback += 1;
935
+ if (synthesis.deliverySucceeded === true) report.synthesis.deliverySucceeded += 1;
936
+ if (isSynthesisGateFailure(synthesis)) {
937
+ report.synthesis.gatesFailed += 1;
938
+ }
939
+ const synthesisFailureType = classifySynthesisFailure(synthesis);
940
+ if (synthesisFailureType) incrementFailureType(report, synthesisFailureType);
941
+ const gateFailure = extractGateFailure(synthesis.gateFailureDetails);
942
+ if (gateFailure) {
943
+ incrementGateFailure(report.synthesis.gateFailures, gateFailure.gate, gateFailure.status);
944
+ }
945
+ }
946
+ const hasDeliveryRuns = report.runs.some((run) => run.runKind === "delivery");
947
+ report.delivery.deliveryRate = hasDeliveryRuns ? calculateSafeDeliveryRate(report.runs) : null;
948
+ report.delivery.verifiedDeliveryRate = hasDeliveryRuns ? calculateVerifiedDeliveryRate(report.runs) : null;
949
+ populateReliabilityAdvisory(report);
950
+ return report;
951
+ }
952
+ function resolveCampaignRuns(params) {
953
+ const selection = params.selection ?? "latest:5";
954
+ const buildDir = path2.join(params.cwd, ".build-project");
955
+ const labRuns = listLabRuns(buildDir).filter((run) => run.labId === params.labId).sort((a, b) => b.runId.localeCompare(a.runId));
956
+ const warnings = [];
957
+ if (labRuns.length === 0) {
958
+ warnings.push(`No lab runs found for lab id "${params.labId}".`);
959
+ return { runs: [], selection, warnings };
960
+ }
961
+ if (selection === "all") {
962
+ return { runs: labRuns, selection, warnings };
963
+ }
964
+ const latestMatch = /^latest:(\d+)$/.exec(selection);
965
+ if (latestMatch) {
966
+ const count = Number.parseInt(latestMatch[1] ?? "0", 10);
967
+ if (!Number.isFinite(count) || count <= 0) {
968
+ throw new Error(
969
+ `Invalid --campaign-runs value "${selection}". Expected latest:<positive n>.`
970
+ );
971
+ }
972
+ return { runs: labRuns.slice(0, count), selection, warnings };
973
+ }
974
+ const requestedIds = selection.split(",").map((runId) => runId.trim()).filter(Boolean);
975
+ if (requestedIds.length === 0) {
976
+ throw new Error(
977
+ `Invalid --campaign-runs value "${selection}". Use all, latest:<n>, or comma-separated run ids.`
978
+ );
979
+ }
980
+ const byRunId = new Map(labRuns.map((run) => [run.runId, run]));
981
+ const selectedRuns = [];
982
+ for (const runId of requestedIds) {
983
+ const run = byRunId.get(runId);
984
+ if (run) {
985
+ selectedRuns.push(run);
986
+ } else {
987
+ warnings.push(`Run "${runId}" was not found under lab "${params.labId}".`);
988
+ }
989
+ }
990
+ return { runs: selectedRuns, selection, warnings };
991
+ }
992
+ function failReliabilityLabOptions(message) {
993
+ throw new Error(`${message}. Run \`build lab list\` to browse available lab runs.`);
994
+ }
995
+ function resolveReliabilityLabRun(params) {
996
+ if (params.lab && (params.labId || params.runId)) {
997
+ failReliabilityLabOptions("--lab cannot be combined with --lab-id/--run-id");
998
+ }
999
+ if (params.labId && !params.runId) {
1000
+ failReliabilityLabOptions("--lab-id requires --run-id");
1001
+ }
1002
+ if (params.runId && !params.labId) {
1003
+ failReliabilityLabOptions("--run-id requires --lab-id");
1004
+ }
1005
+ const buildDir = path2.join(params.cwd, ".build-project");
1006
+ if (params.lab) {
1007
+ const selector = typeof params.lab === "string" ? params.lab.trim().toLowerCase() : params.lab === true ? "latest" : null;
1008
+ if (!selector || selector === "latest") {
1009
+ const latest = findLatestLabRun(buildDir);
1010
+ if (!latest) {
1011
+ failReliabilityLabOptions(
1012
+ "No lab runs found. Start a lab run with `build run competition --lab` before querying telemetry"
1013
+ );
1014
+ }
1015
+ return latest;
1016
+ }
1017
+ failReliabilityLabOptions("Unsupported --lab value. Supported value: latest");
1018
+ }
1019
+ if (params.labId && params.runId) {
1020
+ const run = findLabRun(params.labId, params.runId, buildDir);
1021
+ if (!run) {
1022
+ failReliabilityLabOptions(`Lab run not found: ${params.labId}/${params.runId}`);
1023
+ }
1024
+ return run;
1025
+ }
1026
+ return null;
1027
+ }
1028
+ function labRunPathResolver(run) {
1029
+ return {
1030
+ getStateDir: () => path2.join(run.runPath, "state"),
1031
+ getTelemetryDir: () => path2.join(run.runPath, "telemetry")
1032
+ };
1033
+ }
1034
+ function labRunSynthesisDirs(cwd, run) {
1035
+ return [
1036
+ path2.join(run.runPath, "telemetry", "synthesis"),
1037
+ path2.join(cwd, ".build-project", "telemetry", "synthesis")
1038
+ ];
1039
+ }
1040
+ function labRunBackgroundDirs(cwd, run) {
1041
+ return [
1042
+ path2.join(run.runPath, "state", "background"),
1043
+ path2.join(resolveRunStateDir(path2.join(cwd, ".build-project")), "background")
1044
+ ];
1045
+ }
1046
+ function addLabNoDataAdvisory(report, run) {
1047
+ if (report.scanned.competitions > 0) return;
1048
+ addAdvisorySignal(report, {
1049
+ code: "lab_reliability_no_competitions",
1050
+ severity: "info",
1051
+ message: `Lab run ${run.labId}/${run.runId} has no persisted competition records for reliability analysis.`,
1052
+ value: 0,
1053
+ threshold: null,
1054
+ provider: null,
1055
+ taskIds: []
1056
+ });
1057
+ }
1058
+ function createEmptyCampaignAggregate(params) {
1059
+ return {
1060
+ generatedAt: params.generatedAt,
1061
+ profile: params.profile,
1062
+ scanned: {
1063
+ stateDir: params.stateDir,
1064
+ synthesisDir: params.synthesisDir,
1065
+ competitions: 0,
1066
+ limit: params.limit,
1067
+ since: params.since ?? null,
1068
+ oldestObservedAt: null,
1069
+ newestObservedAt: null
1070
+ },
1071
+ delivery: {
1072
+ completed: 0,
1073
+ winnerSelected: 0,
1074
+ failed: 0,
1075
+ deliveryRate: null,
1076
+ verifiedDeliveryRate: null
1077
+ },
1078
+ synthesis: {
1079
+ attempted: 0,
1080
+ applied: 0,
1081
+ winnerFallback: 0,
1082
+ deliverySucceeded: 0,
1083
+ gatesFailed: 0,
1084
+ gateFailures: {}
1085
+ },
1086
+ verification: {
1087
+ passed: 0,
1088
+ failed: 0,
1089
+ baselineClean: 0,
1090
+ notRun: 0
1091
+ },
1092
+ providers: {},
1093
+ failures: { byType: {} },
1094
+ inputQuality: {
1095
+ incompleteRuns: 0,
1096
+ incompleteVariants: 0,
1097
+ corruptedFiles: 0
1098
+ },
1099
+ guardrails: {
1100
+ hardFailures: [],
1101
+ warnings: []
1102
+ },
1103
+ runs: [],
1104
+ advisory: {
1105
+ unsafeRuns: 0,
1106
+ fallbackRuns: 0,
1107
+ fallbackRate: null,
1108
+ deliveryTrend: {
1109
+ windowSize: DELIVERY_TREND_WINDOW_SIZE,
1110
+ sampleSize: 0,
1111
+ recentRate: null,
1112
+ previousRate: null,
1113
+ delta: null,
1114
+ threshold: DELIVERY_TREND_WARNING_RATE,
1115
+ status: "insufficient_data"
1116
+ },
1117
+ providerFailureRates: {},
1118
+ signals: []
1119
+ }
1120
+ };
1121
+ }
1122
+ function mergeProviderSummaries(target, source) {
1123
+ for (const [provider, summary] of Object.entries(source)) {
1124
+ const targetSummary = target[provider] ?? { total: 0, failures: 0, failureTypes: {} };
1125
+ target[provider] = targetSummary;
1126
+ targetSummary.total += summary.total;
1127
+ targetSummary.failures += summary.failures;
1128
+ for (const [type, count] of Object.entries(summary.failureTypes)) {
1129
+ targetSummary.failureTypes[type] = (targetSummary.failureTypes[type] ?? 0) + count;
1130
+ }
1131
+ }
1132
+ }
1133
+ function mergeGateFailureSummaries(target, source) {
1134
+ for (const [gate, summary] of Object.entries(source)) {
1135
+ const targetSummary = target[gate] ?? { count: 0, statuses: {} };
1136
+ target[gate] = targetSummary;
1137
+ targetSummary.count += summary.count;
1138
+ for (const [status, count] of Object.entries(summary.statuses)) {
1139
+ targetSummary.statuses[status] = (targetSummary.statuses[status] ?? 0) + count;
1140
+ }
1141
+ }
1142
+ }
1143
+ function mergeFailureTypes(target, source) {
1144
+ for (const [type, count] of Object.entries(source)) {
1145
+ target[type] = (target[type] ?? 0) + count;
1146
+ }
1147
+ }
1148
+ function mergeObservedBounds(aggregate, report) {
1149
+ const oldest = report.scanned.oldestObservedAt;
1150
+ const newest = report.scanned.newestObservedAt;
1151
+ if (oldest && (!aggregate.scanned.oldestObservedAt || oldest < aggregate.scanned.oldestObservedAt)) {
1152
+ aggregate.scanned.oldestObservedAt = oldest;
1153
+ }
1154
+ if (newest && (!aggregate.scanned.newestObservedAt || newest > aggregate.scanned.newestObservedAt)) {
1155
+ aggregate.scanned.newestObservedAt = newest;
1156
+ }
1157
+ }
1158
+ function mergeReliabilityReport(aggregate, report) {
1159
+ aggregate.scanned.competitions += report.scanned.competitions;
1160
+ mergeObservedBounds(aggregate, report);
1161
+ aggregate.delivery.completed += report.delivery.completed;
1162
+ aggregate.delivery.winnerSelected += report.delivery.winnerSelected;
1163
+ aggregate.delivery.failed += report.delivery.failed;
1164
+ aggregate.synthesis.attempted += report.synthesis.attempted;
1165
+ aggregate.synthesis.applied += report.synthesis.applied;
1166
+ aggregate.synthesis.winnerFallback += report.synthesis.winnerFallback;
1167
+ aggregate.synthesis.deliverySucceeded += report.synthesis.deliverySucceeded;
1168
+ aggregate.synthesis.gatesFailed += report.synthesis.gatesFailed;
1169
+ mergeGateFailureSummaries(aggregate.synthesis.gateFailures, report.synthesis.gateFailures);
1170
+ aggregate.verification.passed += report.verification.passed;
1171
+ aggregate.verification.failed += report.verification.failed;
1172
+ aggregate.verification.baselineClean += report.verification.baselineClean;
1173
+ aggregate.verification.notRun += report.verification.notRun;
1174
+ mergeProviderSummaries(aggregate.providers, report.providers);
1175
+ mergeFailureTypes(aggregate.failures.byType, report.failures.byType);
1176
+ aggregate.inputQuality.incompleteRuns += report.inputQuality.incompleteRuns;
1177
+ aggregate.inputQuality.incompleteVariants += report.inputQuality.incompleteVariants;
1178
+ aggregate.inputQuality.corruptedFiles += report.inputQuality.corruptedFiles;
1179
+ aggregate.guardrails.hardFailures.push(...report.guardrails.hardFailures);
1180
+ aggregate.guardrails.warnings.push(...report.guardrails.warnings);
1181
+ aggregate.runs.push(...report.runs);
1182
+ }
1183
+ function buildCampaignReliabilityReport(options) {
1184
+ const cwd = options.cwd ?? resolveCliRepoRoot(process.cwd());
1185
+ const limit = options.limit ?? 20;
1186
+ const profile = resolveProfile(options.profile);
1187
+ const generatedAt = (/* @__PURE__ */ new Date()).toISOString();
1188
+ const selection = resolveCampaignRuns({
1189
+ cwd,
1190
+ labId: options.campaignLabId,
1191
+ selection: options.campaignRuns
1192
+ });
1193
+ const aggregate = createEmptyCampaignAggregate({
1194
+ generatedAt,
1195
+ profile,
1196
+ limit,
1197
+ since: options.since,
1198
+ stateDir: `campaign:${options.campaignLabId}`,
1199
+ synthesisDir: `campaign:${options.campaignLabId}`
1200
+ });
1201
+ const reports = selection.runs.map((run) => {
1202
+ const report = buildTelemetryReliabilityReport({
1203
+ backgroundDirs: labRunBackgroundDirs(cwd, run),
1204
+ cwd,
1205
+ includeTestFixtures: options.includeTestFixtures,
1206
+ limit,
1207
+ labPathResolver: labRunPathResolver(run),
1208
+ profile,
1209
+ since: options.since,
1210
+ synthesisDirs: labRunSynthesisDirs(cwd, run)
1211
+ });
1212
+ if (report.scanned.competitions === 0) {
1213
+ selection.warnings.push(`Run "${run.runId}" has no competition records.`);
1214
+ }
1215
+ mergeReliabilityReport(aggregate, report);
1216
+ return {
1217
+ labId: run.labId,
1218
+ runId: run.runId,
1219
+ taskSummary: run.taskSummary,
1220
+ report
1221
+ };
1222
+ });
1223
+ aggregate.scanned.limit = limit * selection.runs.length;
1224
+ aggregate.runs.sort((a, b) => {
1225
+ if (a.observedAt && b.observedAt) return b.observedAt.localeCompare(a.observedAt);
1226
+ if (a.observedAt) return -1;
1227
+ if (b.observedAt) return 1;
1228
+ return a.taskId.localeCompare(b.taskId);
1229
+ });
1230
+ aggregate.delivery.deliveryRate = aggregate.scanned.competitions > 0 ? calculateSafeDeliveryRate(aggregate.runs) : null;
1231
+ aggregate.delivery.verifiedDeliveryRate = aggregate.scanned.competitions > 0 ? calculateVerifiedDeliveryRate(aggregate.runs) : null;
1232
+ populateReliabilityAdvisory(aggregate);
1233
+ if (aggregate.runs.length < DELIVERY_TREND_WINDOW_SIZE) {
1234
+ selection.warnings.push(
1235
+ `Campaign has ${aggregate.runs.length} competition sample(s); delivery trend requires ${DELIVERY_TREND_WINDOW_SIZE}.`
1236
+ );
1237
+ }
1238
+ return {
1239
+ generatedAt,
1240
+ profile,
1241
+ campaign: {
1242
+ labId: options.campaignLabId,
1243
+ runs: reports.length,
1244
+ runIds: reports.map((entry) => entry.runId),
1245
+ selection: selection.selection,
1246
+ warnings: selection.warnings
1247
+ },
1248
+ aggregate,
1249
+ reports
1250
+ };
1251
+ }
1252
+ function formatPercent(value) {
1253
+ return value === null ? "n/a" : `${(value * 100).toFixed(1)}%`;
1254
+ }
1255
+ function formatPercentagePointDelta(value) {
1256
+ if (value === null) return "n/a";
1257
+ const sign = value > 0 ? "+" : "";
1258
+ return `${sign}${(value * 100).toFixed(1)}pp`;
1259
+ }
1260
+ function isExpectedFallbackFinding(finding) {
1261
+ return finding.code === "synthesis_rejected_winner_preserved";
1262
+ }
1263
+ function formatRunWinner(winner) {
1264
+ if (!winner) return "none";
1265
+ if (winner.variant) return winner.variant;
1266
+ return [winner.provider, winner.model].filter(Boolean).join(":") || "unknown";
1267
+ }
1268
+ function classifyDonorMaterial(synthesis) {
1269
+ const matched = synthesis.intentFilteredHunkCount;
1270
+ const excluded = synthesis.excludedHunkCount;
1271
+ const unknownIncluded = synthesis.unknownIncludedHunkCount;
1272
+ const overlapRejected = synthesis.overlapRejectedHunkCount;
1273
+ const hasAnyCount = typeof matched === "number" || typeof excluded === "number" || typeof unknownIncluded === "number" || typeof overlapRejected === "number";
1274
+ if (!hasAnyCount) {
1275
+ const thresholdMissCount = countSemanticThresholdMissDonors(synthesis.donorSelectionDecisions);
1276
+ if (thresholdMissCount > 0) {
1277
+ return `semantic-threshold-miss (${thresholdMissCount} donor${thresholdMissCount === 1 ? "" : "s"} below threshold)`;
1278
+ }
1279
+ return null;
1280
+ }
1281
+ const matchedCount = matched ?? 0;
1282
+ const excludedCount = excluded ?? 0;
1283
+ const unknownIncludedCount = unknownIncluded ?? 0;
1284
+ const overlapRejectedCount = overlapRejected ?? 0;
1285
+ const details = [`matched=${matchedCount}`, `excluded=${excludedCount}`];
1286
+ if (unknownIncludedCount > 0) details.push(`unknownIncluded=${unknownIncludedCount}`);
1287
+ if (overlapRejectedCount > 0) details.push(`overlapRejected=${overlapRejectedCount}`);
1288
+ if (matchedCount === 0 && excludedCount === 0) {
1289
+ return `no-donor-material (${details.join(", ")})`;
1290
+ }
1291
+ if (matchedCount === 0 && excludedCount > 0) {
1292
+ return `donor-rejected-by-intent-filter (${details.join(", ")})`;
1293
+ }
1294
+ const applied = synthesis.complementaryPatchApplied ?? synthesis.applied;
1295
+ if (applied === true) {
1296
+ const modeSuffix = synthesis.applyMode ? `; applyMode=${synthesis.applyMode}` : "";
1297
+ return `donor-applied (${details.join(", ")}${modeSuffix})`;
1298
+ }
1299
+ if (applied === false) {
1300
+ const modeSuffix = synthesis.applyMode ? `; applyMode=${synthesis.applyMode}` : "";
1301
+ return `donor-attempted-not-applied (${details.join(", ")}${modeSuffix})`;
1302
+ }
1303
+ return `donor-attempted (${details.join(", ")})`;
1304
+ }
1305
+ function countSemanticThresholdMissDonors(decisions) {
1306
+ if (!Array.isArray(decisions)) return 0;
1307
+ return decisions.filter((entry) => {
1308
+ if (typeof entry !== "object" || entry === null) return false;
1309
+ const decision = entry;
1310
+ if (decision.winner === true || decision.selected === true) return false;
1311
+ const reasons = Array.isArray(decision.reasons) ? decision.reasons.filter((reason) => typeof reason === "string") : [];
1312
+ return reasons.some((reason) => {
1313
+ const normalized = reason.toLowerCase();
1314
+ return normalized.includes("semantic donor rejected") && normalized.includes("threshold");
1315
+ });
1316
+ }).length;
1317
+ }
1318
+ function formatAiGuidedFallbackClass(synthesis) {
1319
+ if (synthesis.aiGuidedFallbackAttempted !== true) return null;
1320
+ switch (synthesis.aiGuidedFallbackOutcome) {
1321
+ case "donor_augmented":
1322
+ return "agentic-fallback-applied";
1323
+ case "winner_equivalent":
1324
+ return "agentic-fallback-winner-equivalent";
1325
+ case "candidate_rejected":
1326
+ return "agentic-fallback-rejected-by-apply-or-gates";
1327
+ case "generation_failed":
1328
+ return "agentic-fallback-generation-failed";
1329
+ default:
1330
+ return "agentic-fallback-attempted";
1331
+ }
1332
+ }
1333
+ function formatGateFailure(gateFailure) {
1334
+ if (!gateFailure) return null;
1335
+ return `${gateFailure.gate} ${gateFailure.status}`;
1336
+ }
1337
+ function formatRunSynthesis(synthesis) {
1338
+ if (!synthesis.attempted) return "not attempted";
1339
+ const aiGuidedClass = formatAiGuidedFallbackClass(synthesis);
1340
+ if (synthesis.applied === true) {
1341
+ const donorClass = classifyDonorMaterial(synthesis);
1342
+ const details = [aiGuidedClass, donorClass].filter(
1343
+ (value) => typeof value === "string" && value.length > 0
1344
+ );
1345
+ if (details.length > 0) return `applied (${details.join("; ")})`;
1346
+ return "applied";
1347
+ }
1348
+ if (synthesis.winnerFallback === true) {
1349
+ const reason = synthesis.fallbackReason ?? "winner preserved";
1350
+ const gateFailure = formatGateFailure(synthesis.gateFailure);
1351
+ const donorClass = classifyDonorMaterial(synthesis);
1352
+ const details = [reason, gateFailure, aiGuidedClass, donorClass].filter(
1353
+ (value) => typeof value === "string" && value.length > 0
1354
+ );
1355
+ if (details.length > 0) return `winner fallback (${details.join("; ")})`;
1356
+ return `winner fallback (${reason})`;
1357
+ }
1358
+ if (synthesis.gatesPassed === false) {
1359
+ const gateFailure = formatGateFailure(synthesis.gateFailure) ?? "gate failed";
1360
+ const donorClass = classifyDonorMaterial(synthesis);
1361
+ const details = [gateFailure, aiGuidedClass, donorClass].filter(
1362
+ (value) => typeof value === "string" && value.length > 0
1363
+ );
1364
+ if (details.length > 0) return `rejected (${details.join("; ")})`;
1365
+ return `rejected (${gateFailure})`;
1366
+ }
1367
+ if (synthesis.error) return `failed (${synthesis.error})`;
1368
+ return "attempted";
1369
+ }
1370
+ function isNotableRun(run) {
1371
+ return !run.safeDelivery.safe || run.providerFailures.length > 0 || run.verificationFailures.length > 0 || run.incompleteSpecInputs > 0 || run.synthesis.winnerFallback === true || run.synthesis.gatesPassed === false || run.synthesis.error !== null;
1372
+ }
1373
+ function formatRunProviderFailures(providerFailures) {
1374
+ if (providerFailures.length === 0) return "none";
1375
+ return providerFailures.map((failure) => `${failure.provider}:${failure.type}`).join(", ");
1376
+ }
1377
+ function formatRunVerificationFailures(verificationFailures) {
1378
+ if (verificationFailures.length === 0) return "none";
1379
+ return verificationFailures.map((failure) => {
1380
+ const variant = [failure.provider, failure.model, failure.executionMode].filter((value) => typeof value === "string" && value.length > 0).join(":");
1381
+ const details = [
1382
+ failure.buildStatus ? `build=${failure.buildStatus}` : null,
1383
+ failure.testStatus ? `test=${failure.testStatus}` : null,
1384
+ `status=${failure.status}`
1385
+ ].filter((value) => value !== null);
1386
+ return `${variant || "unknown"} (${details.join(", ")})`;
1387
+ }).join(", ");
1388
+ }
1389
+ function formatRunDeliveryStatus(run) {
1390
+ if (run.runKind === "analysis") {
1391
+ return run.safeDelivery.safe ? "analysis-complete" : "analysis-incomplete";
1392
+ }
1393
+ if (!run.safeDelivery.safe) return "unsafe";
1394
+ return isVerifiedDelivery(run) ? "verified-safe" : "safe-unverified";
1395
+ }
1396
+ function renderHumanReport(report) {
1397
+ console.log(chalk.bold.cyan("\nReliability Report\n"));
1398
+ console.log(chalk.gray(`Profile: ${report.profile}`));
1399
+ console.log(chalk.gray(`Scanned: ${report.scanned.competitions} competitions`));
1400
+ console.log(chalk.gray(`Limit: ${report.scanned.limit}`));
1401
+ if (report.scanned.since) {
1402
+ console.log(chalk.gray(`Since: ${report.scanned.since}`));
1403
+ }
1404
+ if (report.scanned.newestObservedAt) {
1405
+ console.log(
1406
+ chalk.gray(
1407
+ `Observed: ${report.scanned.oldestObservedAt ?? "n/a"} to ${report.scanned.newestObservedAt}`
1408
+ )
1409
+ );
1410
+ }
1411
+ console.log(chalk.bold("\nDelivery"));
1412
+ console.log(` Winner Selected: ${report.delivery.winnerSelected}`);
1413
+ console.log(` Completed: ${report.delivery.completed}`);
1414
+ console.log(` Failed: ${report.delivery.failed}`);
1415
+ console.log(` Delivery Rate: ${formatPercent(report.delivery.deliveryRate)}`);
1416
+ console.log(` Verified Delivery Rate: ${formatPercent(report.delivery.verifiedDeliveryRate)}`);
1417
+ console.log(chalk.bold("\nSynthesis"));
1418
+ console.log(` Attempted: ${report.synthesis.attempted}`);
1419
+ console.log(` Applied: ${report.synthesis.applied}`);
1420
+ console.log(` Winner Fallback: ${report.synthesis.winnerFallback}`);
1421
+ console.log(` Delivery Succeeded: ${report.synthesis.deliverySucceeded}`);
1422
+ console.log(` Gates Failed: ${report.synthesis.gatesFailed}`);
1423
+ console.log(chalk.bold("\nVerification"));
1424
+ console.log(` Passed: ${report.verification.passed}`);
1425
+ console.log(` Failed: ${report.verification.failed}`);
1426
+ console.log(` Baseline Clean: ${report.verification.baselineClean}`);
1427
+ console.log(` Not Run: ${report.verification.notRun}`);
1428
+ const gateEntries = Object.entries(report.synthesis.gateFailures);
1429
+ if (gateEntries.length > 0) {
1430
+ console.log(chalk.bold("\nGate Failures"));
1431
+ for (const [gate, summary] of gateEntries) {
1432
+ const statuses = Object.entries(summary.statuses).map(([status, count]) => `${status}=${count}`).join(", ");
1433
+ console.log(` ${gate}: ${summary.count}${statuses ? ` (${statuses})` : ""}`);
1434
+ }
1435
+ }
1436
+ const providerEntries = Object.entries(report.providers).sort((a, b) => a[0].localeCompare(b[0]));
1437
+ if (providerEntries.length > 0) {
1438
+ console.log(chalk.bold("\nProvider Failures"));
1439
+ for (const [provider, summary] of providerEntries) {
1440
+ const failureTypes = Object.entries(summary.failureTypes).map(([type, count]) => `${type}=${count}`).join(", ");
1441
+ console.log(` ${provider}: ${summary.failures}/${summary.total}`);
1442
+ if (failureTypes) {
1443
+ console.log(chalk.gray(` ${failureTypes}`));
1444
+ }
1445
+ }
1446
+ }
1447
+ const failureTypeEntries = Object.entries(report.failures.byType).sort(
1448
+ (a, b) => a[0].localeCompare(b[0])
1449
+ );
1450
+ if (failureTypeEntries.length > 0) {
1451
+ console.log(chalk.bold("\nFailure Types"));
1452
+ for (const [type, count] of failureTypeEntries) {
1453
+ console.log(` ${type}: ${count}`);
1454
+ }
1455
+ }
1456
+ if (report.inputQuality.incompleteVariants > 0 || report.inputQuality.corruptedFiles > 0) {
1457
+ console.log(chalk.bold("\nInput Quality"));
1458
+ console.log(` Incomplete Runs: ${report.inputQuality.incompleteRuns}`);
1459
+ console.log(` Incomplete Variants: ${report.inputQuality.incompleteVariants}`);
1460
+ console.log(` Corrupted Files: ${report.inputQuality.corruptedFiles}`);
1461
+ }
1462
+ const notableRuns = report.runs.filter(isNotableRun);
1463
+ if (notableRuns.length > 0) {
1464
+ console.log(chalk.bold("\nRuns"));
1465
+ for (const run of notableRuns) {
1466
+ const status = formatRunDeliveryStatus(run);
1467
+ console.log(
1468
+ ` ${run.taskId}: ${status} (${run.safeDelivery.basis}) | winner=${formatRunWinner(
1469
+ run.winner
1470
+ )} | synthesis=${formatRunSynthesis(run.synthesis)} | failures=${formatRunProviderFailures(
1471
+ run.providerFailures
1472
+ )} | candidateVerificationFailures=${formatRunVerificationFailures(
1473
+ run.verificationFailures
1474
+ )} | incompleteSpecInputs=${run.incompleteSpecInputs}`
1475
+ );
1476
+ }
1477
+ }
1478
+ if (report.advisory.signals.length > 0) {
1479
+ console.log(chalk.bold("\nAdvisory Signals"));
1480
+ console.log(` Unsafe Runs: ${report.advisory.unsafeRuns}`);
1481
+ console.log(` Winner Fallback Rate: ${formatPercent(report.advisory.fallbackRate)}`);
1482
+ console.log(
1483
+ ` Safe Delivery Trend: recent=${formatPercent(
1484
+ report.advisory.deliveryTrend.recentRate
1485
+ )}, previous=${formatPercent(
1486
+ report.advisory.deliveryTrend.previousRate
1487
+ )}, delta=${formatPercentagePointDelta(
1488
+ report.advisory.deliveryTrend.delta
1489
+ )}, threshold=${formatPercent(report.advisory.deliveryTrend.threshold)}`
1490
+ );
1491
+ for (const signal of report.advisory.signals) {
1492
+ const taskIds = signal.taskIds.length > 0 ? ` (${signal.taskIds.join(", ")})` : "";
1493
+ const color = signal.severity === "warning" ? chalk.yellow : chalk.gray;
1494
+ console.log(color(` ${signal.code}: ${signal.message}${taskIds}`));
1495
+ }
1496
+ }
1497
+ const expectedFallbacks = report.guardrails.warnings.filter(isExpectedFallbackFinding);
1498
+ const warnings = report.guardrails.warnings.filter(
1499
+ (finding) => !isExpectedFallbackFinding(finding)
1500
+ );
1501
+ if (report.guardrails.hardFailures.length > 0 || expectedFallbacks.length > 0 || warnings.length > 0) {
1502
+ console.log(chalk.bold("\nGuardrails"));
1503
+ if (report.guardrails.hardFailures.length > 0) {
1504
+ console.log(chalk.red(` Hard Failures: ${report.guardrails.hardFailures.length}`));
1505
+ for (const finding of report.guardrails.hardFailures) {
1506
+ console.log(chalk.red(` ${finding.taskId}: ${finding.code} - ${finding.message}`));
1507
+ }
1508
+ }
1509
+ if (expectedFallbacks.length > 0) {
1510
+ console.log(chalk.green(` Expected Fallbacks: ${expectedFallbacks.length}`));
1511
+ for (const finding of expectedFallbacks) {
1512
+ console.log(chalk.green(` ${finding.taskId}: ${finding.code} - ${finding.message}`));
1513
+ }
1514
+ }
1515
+ if (warnings.length > 0) {
1516
+ console.log(chalk.yellow(` Warnings: ${warnings.length}`));
1517
+ for (const finding of warnings) {
1518
+ console.log(chalk.yellow(` ${finding.taskId}: ${finding.code} - ${finding.message}`));
1519
+ }
1520
+ }
1521
+ }
1522
+ console.log(chalk.gray(`
1523
+ Generated: ${report.generatedAt}`));
1524
+ }
1525
+ function renderHumanCampaignReport(report) {
1526
+ console.log(chalk.bold.cyan("\nCampaign Reliability Report\n"));
1527
+ console.log(chalk.gray(`Profile: ${report.profile}`));
1528
+ console.log(chalk.gray(`Lab: ${report.campaign.labId}`));
1529
+ console.log(chalk.gray(`Selection: ${report.campaign.selection}`));
1530
+ console.log(chalk.gray(`Runs: ${report.campaign.runs}`));
1531
+ if (report.campaign.runIds.length > 0) {
1532
+ console.log(chalk.gray(`Run IDs: ${report.campaign.runIds.join(", ")}`));
1533
+ }
1534
+ if (report.campaign.warnings.length > 0) {
1535
+ console.log(chalk.yellow("\nCampaign Warnings"));
1536
+ for (const warning of report.campaign.warnings) {
1537
+ console.log(chalk.yellow(` ${warning}`));
1538
+ }
1539
+ }
1540
+ renderHumanReport(report.aggregate);
1541
+ }
1542
+ function createTelemetryReliabilityCommand(deps = {}) {
1543
+ const command = new Command("reliability");
1544
+ command.description("Summarize recent competition reliability from local persisted state").addHelpText(
1545
+ "after",
1546
+ [
1547
+ "",
1548
+ "Lab examples:",
1549
+ " $ build telemetry reliability --lab latest --since 2h --limit 50",
1550
+ " $ build telemetry --lab latest reliability --since 2h --limit 50",
1551
+ " $ build telemetry --lab-id <lab-id> --run-id <run-id> reliability --json",
1552
+ " $ build telemetry reliability --lab-id <lab-id> --run-id <run-id> --json",
1553
+ " $ build telemetry reliability --campaign-lab-id <lab-id> --campaign-runs latest:5",
1554
+ ""
1555
+ ].join("\n")
1556
+ ).option("--campaign-lab-id <id>", "Aggregate reliability across runs in a lab id").option(
1557
+ "--campaign-runs <selection>",
1558
+ "Campaign run selection: latest:<n>, all, or comma-separated run ids",
1559
+ "latest:5"
1560
+ ).option("--include-test-fixtures", "Include persisted test fixture competitions").option("--json", "Output as JSON").option("--lab [selector]", "Use lab telemetry data (value: latest)").option("--lab-id <labId>", "(OPTIONAL) Specify lab ID (requires --run-id)").option("--limit <n>", "Maximum number of recent competitions to scan", "20").option("--profile <profile>", "Guardrail profile: advisory|strict", "advisory").option("--run-id <runId>", "(OPTIONAL) Specify run ID (requires --lab-id)").option(
1561
+ "--since <duration|iso>",
1562
+ "Only scan competitions observed since a duration (2h) or ISO timestamp"
1563
+ ).action((options) => {
1564
+ const parsed = TelemetryReliabilityOptionsSchema.parse(options);
1565
+ const limit = parseLimit(parsed.limit);
1566
+ const profile = resolveProfile(parsed.profile);
1567
+ const cwd = deps.cwd ?? resolveCliRepoRoot(process.cwd());
1568
+ if (parsed.campaignRuns && !parsed.campaignLabId && parsed.campaignRuns !== "latest:5") {
1569
+ throw new Error("--campaign-runs requires --campaign-lab-id.");
1570
+ }
1571
+ if (parsed.campaignLabId && (parsed.lab || parsed.labId || parsed.runId)) {
1572
+ throw new Error("--campaign-lab-id cannot be combined with --lab/--lab-id/--run-id.");
1573
+ }
1574
+ if (parsed.campaignLabId) {
1575
+ const campaignReport = buildCampaignReliabilityReport({
1576
+ cwd,
1577
+ campaignLabId: parsed.campaignLabId,
1578
+ campaignRuns: parsed.campaignRuns,
1579
+ includeTestFixtures: parsed.includeTestFixtures,
1580
+ limit,
1581
+ profile,
1582
+ since: parsed.since
1583
+ });
1584
+ if (parsed.json) {
1585
+ console.log(JSON.stringify(campaignReport, null, 2));
1586
+ } else {
1587
+ renderHumanCampaignReport(campaignReport);
1588
+ }
1589
+ if (profile === "strict" && campaignReport.aggregate.guardrails.hardFailures.length > 0) {
1590
+ throw ExitCodeError.reported(
1591
+ 1,
1592
+ `${campaignReport.aggregate.guardrails.hardFailures.length} reliability guardrail failure(s)`
1593
+ );
1594
+ }
1595
+ return;
1596
+ }
1597
+ const labRun = resolveReliabilityLabRun({
1598
+ cwd,
1599
+ lab: parsed.lab,
1600
+ labId: parsed.labId,
1601
+ runId: parsed.runId
1602
+ });
1603
+ const report = buildTelemetryReliabilityReport({
1604
+ backgroundDirs: labRun ? labRunBackgroundDirs(cwd, labRun) : void 0,
1605
+ cwd,
1606
+ includeTestFixtures: parsed.includeTestFixtures,
1607
+ limit,
1608
+ labPathResolver: labRun ? labRunPathResolver(labRun) : deps.labPathResolver,
1609
+ profile,
1610
+ since: parsed.since,
1611
+ synthesisDirs: labRun ? labRunSynthesisDirs(cwd, labRun) : void 0
1612
+ });
1613
+ if (labRun) {
1614
+ addLabNoDataAdvisory(report, labRun);
1615
+ }
1616
+ if (parsed.json) {
1617
+ console.log(JSON.stringify(report, null, 2));
1618
+ } else {
1619
+ renderHumanReport(report);
1620
+ }
1621
+ if (profile === "strict" && report.guardrails.hardFailures.length > 0) {
1622
+ throw ExitCodeError.reported(
1623
+ 1,
1624
+ `${report.guardrails.hardFailures.length} reliability guardrail failure(s)`
1625
+ );
1626
+ }
1627
+ });
1628
+ return command;
1629
+ }
1630
+
1631
+ export {
1632
+ resolveReliabilityPaths,
1633
+ summarizeSelectionCoverage,
1634
+ buildTelemetryReliabilityReport,
1635
+ buildCampaignReliabilityReport,
1636
+ formatRunSynthesis,
1637
+ createTelemetryReliabilityCommand
1638
+ };
1639
+ //# sourceMappingURL=chunk-TDEMDRN2.js.map