@attalabs/vinaya 0.36.0 → 0.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (292) hide show
  1. package/README.md +6 -6
  2. package/aeg-root/contracts/developer-reviewer.md +1 -1
  3. package/aeg-root/contracts/planner-operator.md +1 -1
  4. package/aeg-root/contracts/principal-operator.md +6 -6
  5. package/aeg-root/contracts/security-archivist.md +1 -1
  6. package/aeg-root/enforcement.md +14 -14
  7. package/aeg-root/process.md +3 -1
  8. package/aeg-root/roles/archivist.md +2 -2
  9. package/aeg-root/roles/developer/reference.md +36 -37
  10. package/aeg-root/roles/developer.md +9 -5
  11. package/aeg-root/roles/operator.md +18 -18
  12. package/aeg-root/roles/planner/reference.md +15 -4
  13. package/aeg-root/roles/principal.md +6 -1
  14. package/aeg-root/roles/reviewer.md +14 -6
  15. package/aeg-root/roles/security.md +22 -11
  16. package/aeg-root/roles/tranche-archivist.md +14 -2
  17. package/aeg-root/state-machine.md +12 -11
  18. package/aeg-root/templates/brief-template.md +8 -6
  19. package/aeg-root/templates/pr-report-template.md +1 -9
  20. package/aeg-root/tranche-model.md +10 -4
  21. package/dist/checks/bin/check-body-bare-digits.js +823 -595
  22. package/dist/checks/bin/check-branch-topology.js +796 -478
  23. package/dist/checks/bin/check-brief-shape.js +824 -596
  24. package/dist/checks/bin/check-changeset-coverage.js +1337 -747
  25. package/dist/checks/bin/check-closes-n.js +796 -478
  26. package/dist/checks/bin/check-coherence.js +914 -611
  27. package/dist/checks/bin/check-dead-branch-push.js +705 -462
  28. package/dist/checks/bin/check-dispatch-readiness.js +941 -624
  29. package/dist/checks/bin/check-doc-coverage-push.js +1332 -742
  30. package/dist/checks/bin/check-doc-coverage.js +1339 -742
  31. package/dist/checks/bin/check-doctrine-no-procedures.js +821 -593
  32. package/dist/checks/bin/check-doctrine-portability.js +1332 -742
  33. package/dist/checks/bin/check-evidence-fresh.js +1339 -918
  34. package/dist/checks/bin/check-exec-bits.js +1331 -741
  35. package/dist/checks/bin/check-first-push-dispatch.js +917 -614
  36. package/dist/checks/bin/check-issue-assignment.js +796 -478
  37. package/dist/checks/bin/check-issue-milestone-attach.js +705 -462
  38. package/dist/checks/bin/check-issue-objectives-numbering.js +821 -593
  39. package/dist/checks/bin/check-issue-parts-coverage.js +705 -462
  40. package/dist/checks/bin/check-issue-surface-globs.js +925 -613
  41. package/dist/checks/bin/check-issue-title-grammar.js +705 -462
  42. package/dist/checks/bin/check-issue-tranche-label.js +705 -462
  43. package/dist/checks/bin/check-main-branch-refusal.js +705 -462
  44. package/dist/checks/bin/check-no-disk-state.js +705 -462
  45. package/dist/checks/bin/check-pr-premise-reassert.js +821 -593
  46. package/dist/checks/bin/check-pr-report-density.js +705 -462
  47. package/dist/checks/bin/check-principal-test-plan-wait.js +705 -462
  48. package/dist/checks/bin/check-quoted-command.js +1816 -1228
  49. package/dist/checks/bin/check-reader-resolvable-prose.js +1835 -1235
  50. package/dist/checks/bin/check-registry-gates.js +993 -526
  51. package/dist/checks/bin/check-retired-vocabulary.js +1810 -1222
  52. package/dist/checks/bin/check-review-gate.js +832 -604
  53. package/dist/checks/bin/check-single-plan-pr.js +705 -462
  54. package/dist/checks/bin/check-surface-scope.js +796 -478
  55. package/dist/checks/bin/check-test-plan.js +705 -462
  56. package/dist/checks/bin/check-token-collection-wired.js +705 -462
  57. package/dist/checks/bin/check-workspace-escape.js +1332 -742
  58. package/dist/checks/bin/verify-dispatch.js +3849 -0
  59. package/dist/index.js +20876 -10091
  60. package/dist/lib/pre-push-cache-test-run.js +1045 -682
  61. package/dist/lib/pre-push-changed-files.js +16 -11
  62. package/dist/lib/pre-push-select-tests.js +785 -500
  63. package/package.json +2 -2
  64. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/anchored-region.ts +7 -6
  65. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/brief-render.ts +71 -15
  66. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/brief-validation.ts +51 -12
  67. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/control-store/index.ts +1 -0
  68. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/control-store/local.ts +31 -0
  69. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/control-store/records.ts +50 -2
  70. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/assess-round.ts +443 -28
  71. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/fakes.ts +18 -5
  72. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/index.ts +6 -4
  73. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/journal-reconstruction.ts +13 -13
  74. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/render-summary.ts +46 -110
  75. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/types.ts +169 -11
  76. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/doc-claim.ts +32 -6
  77. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/docs/index.ts +3 -1
  78. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/docs/published-prose.ts +30 -0
  79. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/doctrine-portability.ts +6 -2
  80. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/gate-audience.ts +0 -1
  81. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/index.ts +82 -8
  82. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/issue-validation.ts +754 -7
  83. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/leftover-detection.ts +24 -6
  84. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/custom.ts +157 -0
  85. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/envelope.ts +44 -6
  86. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/fixtures/executions.ts +493 -0
  87. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/fixtures/fact-sheets.ts +111 -0
  88. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/fixtures/generator.ts +155 -0
  89. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/fixtures/index.ts +12 -0
  90. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/index.ts +128 -0
  91. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/questions/catches.ts +63 -0
  92. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/questions/checks.ts +146 -0
  93. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/questions/common.ts +137 -0
  94. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/questions/completion.ts +137 -0
  95. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/questions/convergence.ts +420 -0
  96. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/questions/determinism.ts +65 -0
  97. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/questions/index.ts +69 -0
  98. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/questions/judgment.ts +132 -0
  99. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/questions/labels.ts +21 -0
  100. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/questions/time.ts +167 -0
  101. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/questions/usage.ts +139 -0
  102. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/schema.ts +226 -15
  103. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/store.ts +7 -7
  104. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/sync/cache-contract.ts +207 -0
  105. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/sync/contracts.ts +105 -0
  106. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/sync/engine.ts +308 -0
  107. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/sync/index.ts +34 -0
  108. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/sync/measured.ts +20 -0
  109. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/sync/memory-cache.ts +78 -0
  110. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/sync/normalize.ts +156 -0
  111. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/sync/row.ts +103 -0
  112. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/reader-resolvable-prose.ts +34 -6
  113. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/registry-checks.ts +70 -6
  114. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-gate.ts +52 -4
  115. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-input-manifest.ts +19 -14
  116. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-policy.ts +201 -24
  117. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-status.ts +5 -2
  118. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/task-phase-history.ts +46 -0
  119. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/task-tools.ts +15 -28
  120. package/studio-standalone/apps/vinaya-studio/web/.next/BUILD_ID +1 -1
  121. package/studio-standalone/apps/vinaya-studio/web/.next/app-path-routes-manifest.json +0 -1
  122. package/studio-standalone/apps/vinaya-studio/web/.next/build-manifest.json +3 -3
  123. package/studio-standalone/apps/vinaya-studio/web/.next/prerender-manifest.json +3 -3
  124. package/studio-standalone/apps/vinaya-studio/web/.next/required-server-files.json +0 -5
  125. package/studio-standalone/apps/vinaya-studio/web/.next/routes-manifest.json +0 -6
  126. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error/page.js +1 -1
  127. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error/page.js.nft.json +1 -1
  128. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  129. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.html +1 -1
  130. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.rsc +1 -1
  131. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  132. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  133. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  134. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  135. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  136. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_not-found/page/server-reference-manifest.json +2 -2
  137. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_not-found/page.js +1 -1
  138. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  139. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  140. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/page/server-reference-manifest.json +2 -2
  141. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/page.js +1 -1
  142. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/page.js.nft.json +1 -1
  143. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/page_client-reference-manifest.js +1 -1
  144. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/backlog/page/server-reference-manifest.json +2 -2
  145. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/backlog/page.js +3 -3
  146. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/backlog/page.js.nft.json +1 -1
  147. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/backlog/page_client-reference-manifest.js +1 -1
  148. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/page/server-reference-manifest.json +2 -2
  149. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/page.js +3 -3
  150. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/page.js.nft.json +1 -1
  151. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/page_client-reference-manifest.js +1 -1
  152. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/page/server-reference-manifest.json +2 -2
  153. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/page.js +3 -3
  154. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/page.js.nft.json +1 -1
  155. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/page_client-reference-manifest.js +1 -1
  156. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/page/server-reference-manifest.json +3 -3
  157. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/page.js +5 -5
  158. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/page.js.nft.json +1 -1
  159. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/page_client-reference-manifest.js +1 -1
  160. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/tasks/[taskId]/page/server-reference-manifest.json +2 -2
  161. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/tasks/[taskId]/page.js +3 -3
  162. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/tasks/[taskId]/page.js.nft.json +1 -1
  163. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
  164. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/page/server-reference-manifest.json +2 -2
  165. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/page.js +3 -3
  166. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/page.js.nft.json +1 -1
  167. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/page_client-reference-manifest.js +1 -1
  168. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/tranches/page/server-reference-manifest.json +2 -2
  169. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/tranches/page.js +3 -3
  170. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/tranches/page.js.nft.json +1 -1
  171. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/tranches/page_client-reference-manifest.js +1 -1
  172. package/studio-standalone/apps/vinaya-studio/web/.next/server/app-paths-manifest.json +0 -1
  173. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/044u_vinaya-studio_web_src_app_studio_backlog__components_BacklogTable_tsx_0oha0bt._.js +3 -0
  174. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/1q96_modules_@clerk_nextjs_dist_esm_app-router_client_keyless-creator-reader_0lom2js.js +1 -1
  175. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/{[root-of-the-server]__1bh2awk._.js → [root-of-the-server]__038scsm._.js} +2 -2
  176. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/{[root-of-the-server]__1widio3._.js → [root-of-the-server]__03__s45._.js} +2 -2
  177. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/{_15gdg48._.js → [root-of-the-server]__04adkz-._.js} +3 -3
  178. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__05zwn98._.js +14 -0
  179. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__08e39jo._.js +3 -0
  180. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__0h9yhwx._.js +1 -1
  181. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/{[root-of-the-server]__1wy7w66._.js → [root-of-the-server]__0jdjsxe._.js} +2 -2
  182. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__0ls23oh._.js +1 -1
  183. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__10riywf._.js +3 -0
  184. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/{[root-of-the-server]__13znegp._.js → [root-of-the-server]__134x-65._.js} +2 -2
  185. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/{[root-of-the-server]__13eeix2._.js → [root-of-the-server]__1_l_l1u._.js} +2 -2
  186. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1f4bb3_._.js +3 -0
  187. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1gjqmhq._.js +1 -1
  188. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/{[root-of-the-server]__1dky4g0._.js → [root-of-the-server]__1my83lt._.js} +2 -2
  189. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1ng2x88._.js +3 -0
  190. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/{[root-of-the-server]__040smoa._.js → [root-of-the-server]__1qpc6at._.js} +2 -2
  191. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1snpgaw._.js +56 -0
  192. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1wc4-ip._.js +2 -2
  193. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_06h3wbl._.js +3 -0
  194. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_08onyya._.js +1 -1
  195. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_096f46i._.js +1 -1
  196. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0af2one._.js +1 -1
  197. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0e5tkdd._.js +1 -1
  198. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0gs4gvl._.js +3 -0
  199. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0kf2g72._.js +1 -1
  200. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0zf4d27._.js +1 -1
  201. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1-wo68i._.js +1 -1
  202. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_121lrn5._.js +3 -0
  203. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1achbh9._.js +1 -1
  204. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1o4v6lb._.js +3 -0
  205. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1q7h5mz._.js +1 -1
  206. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1ztd4i3._.js +3 -0
  207. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_209-ugd._.js +3 -0
  208. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_214d71c._.js +3 -0
  209. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/apps_vinaya-studio_web_src_app_studio_projects_[name]_tranches_[slug]_17dho0f._.js +3 -0
  210. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/node_modules_@clerk_nextjs_dist_esm_app-router_server-actions_1x7vfhn.js +2 -2
  211. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/node_modules_next_dist_1lzmr5o._.js +1 -1
  212. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/packages_ui_libraries_animate_components_index_ts_186fje1._.js +1 -1
  213. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/packages_ui_libraries_basic_components_index_ts_0xk1vda._.js +1 -1
  214. package/studio-standalone/apps/vinaya-studio/web/.next/server/middleware-build-manifest.js +3 -3
  215. package/studio-standalone/apps/vinaya-studio/web/.next/server/pages/500.html +1 -1
  216. package/studio-standalone/apps/vinaya-studio/web/.next/server/server-reference-manifest.js +1 -1
  217. package/studio-standalone/apps/vinaya-studio/web/.next/server/server-reference-manifest.json +4 -4
  218. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/09fcolor69bun.js +1 -0
  219. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/0lcwmwzxacdie.js +1 -0
  220. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/0ojry7lrbzkfd.css +1 -0
  221. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/1-acpmtfmrc35.js +1 -0
  222. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/1giu47hrbhroj.js +1 -0
  223. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/1shz6lwruld25.js +1 -0
  224. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/1ytvuy1mmnc6j.js +1 -0
  225. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{3oxhhhm_psozq.js → 21a6_5cr956wj.js} +1 -1
  226. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{2o9l0b7eqbr57.js → 2f2y8xxok8zph.js} +1 -1
  227. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/2g8mwnydod96u.js +1 -0
  228. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{3li0ueedy-ozv.js → 2nrnuawd5fwpv.js} +1 -1
  229. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/2nw47832_uvfe.js +1 -0
  230. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/2qdxnj8wk2h0s.js +1 -0
  231. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{3lqjwjrcvq481.js → 2xevgia1h8g0y.js} +2 -2
  232. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/3b9q75p-z5ma5.js +1 -0
  233. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/3cv-oe7153242.js +1 -0
  234. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/3m310lbjj4p5u.js +1 -0
  235. package/studio-standalone/apps/vinaya-studio/web/package.json +2 -2
  236. package/studio-standalone/apps/vinaya-studio/web/server.js +1 -1
  237. package/dist/checks/bin/check-token-report.js +0 -6526
  238. package/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/aeg-core/bin/verify-coherence.ts +0 -1089
  239. package/studio-standalone/_node_modules/next/dist/compiled/next-server/app-route-turbo.runtime.prod.js +0 -6
  240. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/api/coherence/route/app-paths-manifest.json +0 -3
  241. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/api/coherence/route/build-manifest.json +0 -9
  242. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/api/coherence/route/server-reference-manifest.json +0 -4
  243. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/api/coherence/route.js +0 -6
  244. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/api/coherence/route.js.map +0 -5
  245. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/api/coherence/route.js.nft.json +0 -1
  246. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/api/coherence/route_client-reference-manifest.js +0 -3
  247. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/044u_vinaya-studio_web__next-internal_server_app_api_coherence_route_actions_1rnzea1.js +0 -3
  248. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/[externals]__0cki-x_._.js +0 -3
  249. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/[root-of-the-server]__02a-3g8._.js +0 -15
  250. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/[turbopack]_runtime.js +0 -903
  251. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__074w9nf._.js +0 -3
  252. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__0ln09ua._.js +0 -3
  253. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__0oegopp._.js +0 -3
  254. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__13yxbjd._.js +0 -51
  255. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1duqmtm._.js +0 -3
  256. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1z7dml9._.js +0 -9
  257. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0bfs_u4._.js +0 -3
  258. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0g8_eot._.js +0 -3
  259. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0hrh_v-._.js +0 -181
  260. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0i4-dea._.js +0 -3
  261. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0o54suy._.js +0 -3
  262. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0rxd7s0._.js +0 -3
  263. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0y1jv16._.js +0 -3
  264. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_151m4rz._.js +0 -3
  265. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1a9dieq._.js +0 -3
  266. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1sxsf5q._.js +0 -3
  267. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1sy_yfr._.js +0 -3
  268. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_219v2an._.js +0 -3
  269. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/apps_vinaya-studio_web_src_app_studio_projects_[name]_tranches_[slug]_05ufo8i._.js +0 -3
  270. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/packages_ui_libraries_basic_components_form_input_tsx_0es8d8b._.js +0 -3
  271. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/packages_ui_libraries_brutal_components_index_ts_0n_lcc4._.js +0 -3
  272. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/packages_ui_libraries_retro_components_index_ts_0wvpm_z._.js +0 -3
  273. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/00z3-ljjd1gj9.js +0 -1
  274. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/0bjnj-5fy4e7l.js +0 -1
  275. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/0c8uwz_-m8s99.js +0 -165
  276. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/0ct0c-xj0baf6.js +0 -1
  277. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/0ko698wh8xx2g.css +0 -1
  278. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/0t5n_r4xm__t-.js +0 -1
  279. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/0vc2u252q5q6o.js +0 -1
  280. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/16r_o07lw0vm0.js +0 -1
  281. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/1cah7_e5a1zvu.js +0 -1
  282. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/1gjo9-6dz7nup.js +0 -1
  283. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/24tz8aro1uto4.js +0 -1
  284. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/2ef2g5fozszw7.js +0 -1
  285. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/2ka8dg687auhj.js +0 -1
  286. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/2pf3f50gbrkyv.js +0 -1
  287. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/2qq49pct3q51-.js +0 -1
  288. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/3et66z7glk65w.js +0 -1
  289. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/3y6u3prmrkea-.js +0 -1
  290. /package/studio-standalone/apps/vinaya-studio/web/.next/static/{z1fTSBP6ZlUjObzFIp-qq → yNZEFRSjP9BLUfdf96Eol}/_buildManifest.js +0 -0
  291. /package/studio-standalone/apps/vinaya-studio/web/.next/static/{z1fTSBP6ZlUjObzFIp-qq → yNZEFRSjP9BLUfdf96Eol}/_clientMiddlewareManifest.js +0 -0
  292. /package/studio-standalone/apps/vinaya-studio/web/.next/static/{z1fTSBP6ZlUjObzFIp-qq → yNZEFRSjP9BLUfdf96Eol}/_ssgManifest.js +0 -0
@@ -2,7 +2,8 @@
2
2
 
3
3
  // src/checks/bin/check-registry-gates.ts
4
4
  import { execSync, execFileSync as execFileSync2 } from "node:child_process";
5
- import { existsSync as existsSync3, readdirSync, readFileSync as readFileSync2, statSync } from "node:fs";
5
+ import { existsSync as existsSync3, readdirSync as readdirSync3, readFileSync as readFileSync5 } from "node:fs";
6
+ import { join as join5 } from "node:path";
6
7
  import matter2 from "gray-matter";
7
8
  // ../../packages/aeg-core/src/gate-audience.ts
8
9
  var GATE_AUDIENCE = {
@@ -629,6 +630,33 @@ function tasksFromIssues(issues) {
629
630
  }
630
631
  return tasks.sort((a, b) => compareTaskIds(a.id, b.id));
631
632
  }
633
+ function resolveDuplicateTasks(tasks, isOpen) {
634
+ const byId = new Map;
635
+ for (const t of tasks)
636
+ byId.set(t.id, [...byId.get(t.id) ?? [], t]);
637
+ const resolved = [];
638
+ const conflicts = [];
639
+ for (const [id, group] of byId) {
640
+ const first = group[0];
641
+ if (!first)
642
+ continue;
643
+ if (group.length === 1) {
644
+ resolved.push(first);
645
+ continue;
646
+ }
647
+ const number = (t) => t.issue ?? 0;
648
+ const open = group.filter((t) => t.issue !== null && isOpen(t.issue)).sort((a, b) => number(a) - number(b));
649
+ if (open.length > 1) {
650
+ conflicts.push({ id, issues: open.map(number) });
651
+ resolved.push(open[0]);
652
+ } else if (open.length === 1) {
653
+ resolved.push(open[0]);
654
+ } else {
655
+ resolved.push([...group].sort((a, b) => number(b) - number(a))[0]);
656
+ }
657
+ }
658
+ return { tasks: resolved.sort((a, b) => compareTaskIds(a.id, b.id)), conflicts };
659
+ }
632
660
  async function fetchTrancheIssuesAsync(owner, repo, slug) {
633
661
  return ghIssueListByAnyLabelAsync(owner, repo, [trancheLabel(slug)]);
634
662
  }
@@ -1436,7 +1464,7 @@ function mapReviewDecision(decision) {
1436
1464
  function buildBranchName(tranche, taskId) {
1437
1465
  return `task/${tranche}/${taskId}`;
1438
1466
  }
1439
- async function fetchForgeFacts(input) {
1467
+ async function fetchForgeFactsByIssue(input) {
1440
1468
  const token = await resolveGithubToken(input.token);
1441
1469
  if (!token) {
1442
1470
  return {
@@ -1446,7 +1474,13 @@ async function fetchForgeFacts(input) {
1446
1474
  reason: "No GitHub token available (set GITHUB_TOKEN/GH_TOKEN or `gh auth login`)."
1447
1475
  };
1448
1476
  }
1449
- const queriedTasks = input.tasks.filter((t) => t.issue !== null);
1477
+ const seen = new Set;
1478
+ const queriedTasks = input.tasks.filter((t) => {
1479
+ if (t.issue === null || seen.has(t.issue))
1480
+ return false;
1481
+ seen.add(t.issue);
1482
+ return true;
1483
+ });
1450
1484
  if (queriedTasks.length === 0) {
1451
1485
  return { facts: new Map, prRefs: new Map, unavailable: false };
1452
1486
  }
@@ -1474,21 +1508,52 @@ async function fetchForgeFacts(input) {
1474
1508
  };
1475
1509
  }
1476
1510
  for (const task of queriedTasks) {
1477
- const alias = aliasFor(task.id);
1478
- const raw = extractRawFromResponse(response.repository, alias);
1511
+ const raw = extractRawFromResponse(response.repository, aliasFor(task.issue));
1479
1512
  const mapped = mapForgeFacts(raw);
1480
1513
  if (mapped)
1481
- facts.set(task.id, mapped);
1514
+ facts.set(task.issue, mapped);
1482
1515
  const pr = raw.pullRequest;
1483
1516
  if (pr && typeof pr.number === "number" && typeof pr.url === "string") {
1484
- prRefs.set(task.id, { number: pr.number, url: pr.url, state: pr.state });
1517
+ prRefs.set(task.issue, { number: pr.number, url: pr.url, state: pr.state });
1485
1518
  }
1486
1519
  }
1487
1520
  return { facts, prRefs, unavailable: false };
1488
1521
  }
1522
+ async function fetchForgeFacts(input) {
1523
+ const byIssue = await fetchForgeFactsByIssue(input);
1524
+ if (byIssue.unavailable) {
1525
+ return { facts: new Map, prRefs: new Map, unavailable: true, reason: byIssue.reason };
1526
+ }
1527
+ const facts = new Map;
1528
+ const prRefs = new Map;
1529
+ const winner = new Map;
1530
+ for (const task of input.tasks) {
1531
+ if (task.issue === null)
1532
+ continue;
1533
+ const current = winner.get(task.id);
1534
+ if (current === undefined || outranks(byIssue.facts, task.issue, current))
1535
+ winner.set(task.id, task.issue);
1536
+ }
1537
+ for (const [taskId, issue] of winner) {
1538
+ const f = byIssue.facts.get(issue);
1539
+ if (f)
1540
+ facts.set(taskId, f);
1541
+ const pr = byIssue.prRefs.get(issue);
1542
+ if (pr)
1543
+ prRefs.set(taskId, pr);
1544
+ }
1545
+ return { facts, prRefs, unavailable: false };
1546
+ }
1547
+ function outranks(facts, candidate, current) {
1548
+ const candidateOpen = facts.get(candidate)?.issueState === "open";
1549
+ const currentOpen = facts.get(current)?.issueState === "open";
1550
+ if (candidateOpen !== currentOpen)
1551
+ return candidateOpen;
1552
+ return candidate > current;
1553
+ }
1489
1554
  function buildBatchQuery(tranche, tasks) {
1490
1555
  const perTask = tasks.map((task) => {
1491
- const a = aliasFor(task.id);
1556
+ const a = aliasFor(task.issue);
1492
1557
  const branch = buildBranchName(tranche, task.id);
1493
1558
  return `
1494
1559
  ${a}_issue: issue(number: ${task.issue}) {
@@ -1530,9 +1595,8 @@ function buildBatchQuery(tranche, tasks) {
1530
1595
  }
1531
1596
  }`;
1532
1597
  }
1533
- function aliasFor(taskId) {
1534
- const sanitized = taskId.replace(/[^a-zA-Z0-9_]/g, "_");
1535
- return `t_${sanitized}`;
1598
+ function aliasFor(issue) {
1599
+ return `i_${issue}`;
1536
1600
  }
1537
1601
  function extractRawFromResponse(repository, alias) {
1538
1602
  const issue = repository[`${alias}_issue`];
@@ -1887,45 +1951,6 @@ var DERIVED_STATUSES = [
1887
1951
  "incoherent"
1888
1952
  ];
1889
1953
  var DERIVABLE_STATUSES = DERIVED_STATUSES.filter((s) => s !== "backlog");
1890
- // ../../packages/aeg-core/src/parse-ledger.ts
1891
- function rowFromCells(cells) {
1892
- if (cells.length < 7)
1893
- return null;
1894
- const phase = (cells[0] ?? "").trim();
1895
- if (!phase)
1896
- return null;
1897
- return {
1898
- phase,
1899
- role: (cells[1] ?? "").trim(),
1900
- agentModel: (cells[2] ?? "").trim(),
1901
- tokensIn: parseIntCell(cells[3] ?? ""),
1902
- tokensOut: parseIntCell(cells[4] ?? ""),
1903
- cost: parseCostCell(cells[5] ?? ""),
1904
- date: (cells[6] ?? "").trim()
1905
- };
1906
- }
1907
- function parseIntCell(cell) {
1908
- const trimmed = cell.replace(/`/g, "").trim();
1909
- if (!trimmed || isEmDashOrDash(trimmed))
1910
- return null;
1911
- const normalized = trimmed.replace(/[,_\s]/g, "");
1912
- if (!/^-?\d+$/.test(normalized))
1913
- return null;
1914
- return Number(normalized);
1915
- }
1916
- function parseCostCell(cell) {
1917
- const trimmed = cell.replace(/`/g, "").trim();
1918
- if (!trimmed || isEmDashOrDash(trimmed))
1919
- return null;
1920
- const normalized = trimmed.replace(/^\$/, "").replace(/[,_\s]/g, "");
1921
- if (!/^-?\d+(\.\d+)?$/.test(normalized))
1922
- return null;
1923
- return Number(normalized);
1924
- }
1925
- function isEmDashOrDash(s) {
1926
- const t = s.trim();
1927
- return t === "—" || t === "-" || t === "–";
1928
- }
1929
1954
  // ../../packages/aeg-core/src/waiver-label.ts
1930
1955
  var WAIVER_LABEL = label("waiver-docs");
1931
1956
  var WAIVER_LABEL_REVIEW = label("waiver-review");
@@ -1941,61 +1966,6 @@ function isWaiverLabelActorVerified(opts) {
1941
1966
  return false;
1942
1967
  return isPrincipal(opts.labelActor, opts.principalAllowlist);
1943
1968
  }
1944
-
1945
- // ../../packages/aeg-core/src/parse-token-report.ts
1946
- var TOKEN_REPORT_HEADING = /^\s*(?:#{1,6}\s*Token report\s*|\*\*Token report\*\*)\s*$/i;
1947
- var INLINE_FIELD_LIST = /Phase:\s*([^|]+?)\s*\|\s*Role:\s*([^|]+?)\s*\|\s*Agent\/Model:\s*([^|]+?)\s*\|\s*Tokens in:\s*([^|]+?)\s*\|\s*Tokens out:\s*([^|]+?)\s*\|\s*Cost:\s*([^|]+?)\s*\|\s*Date:\s*(.+?)\s*$/im;
1948
- function parseTokenReportEntries(body) {
1949
- const lines = body.split(/\r?\n/);
1950
- const headingIdxs = [];
1951
- lines.forEach((line, i) => {
1952
- if (TOKEN_REPORT_HEADING.test(line))
1953
- headingIdxs.push(i);
1954
- });
1955
- const out = [];
1956
- for (let h = 0;h < headingIdxs.length; h++) {
1957
- const start = headingIdxs[h] + 1;
1958
- const end = h + 1 < headingIdxs.length ? headingIdxs[h + 1] : lines.length;
1959
- const section = lines.slice(start, end).join(`
1960
- `);
1961
- const tableRows = parseTableSection(section);
1962
- if (tableRows.length > 0) {
1963
- out.push(...tableRows);
1964
- continue;
1965
- }
1966
- const inlineRow = parseInlineFieldList(section);
1967
- if (inlineRow)
1968
- out.push(inlineRow);
1969
- }
1970
- return out;
1971
- }
1972
- function parseTableSection(section) {
1973
- const lines = section.split(/\r?\n/);
1974
- let i = 0;
1975
- for (;i < lines.length; i++) {
1976
- if ((lines[i] ?? "").trim().startsWith("|"))
1977
- break;
1978
- }
1979
- if (i + 1 >= lines.length)
1980
- return [];
1981
- i += 2;
1982
- const out = [];
1983
- for (;i < lines.length; i++) {
1984
- const trimmed = (lines[i] ?? "").trim();
1985
- if (!trimmed.startsWith("|"))
1986
- break;
1987
- const row = rowFromCells(splitTableRow(trimmed));
1988
- if (row)
1989
- out.push(row);
1990
- }
1991
- return out;
1992
- }
1993
- function parseInlineFieldList(section) {
1994
- const m = section.match(INLINE_FIELD_LIST);
1995
- if (!m)
1996
- return null;
1997
- return rowFromCells([m[1], m[2], m[3], m[4], m[5], m[6], m[7]]);
1998
- }
1999
1969
  // ../../packages/aeg-core/src/verdict-extraction.ts
2000
1970
  var HEAD_SHA_PATTERN = /^[ \t]*(?:\*{1,3}|_{1,3})?Judged head:\s*([0-9a-f]{7,40})(?![A-Za-z0-9])/im;
2001
1971
  var OBJECTIVES_VERSION_PATTERN = /^[ \t]*(?:\*{1,3}|_{1,3})?Objectives version:\s*([0-9a-f]{64})(?![A-Za-z0-9])/im;
@@ -2444,10 +2414,12 @@ function evaluateC5(changed, docOwnersContent, prBody, fileExists, waiverActive,
2444
2414
  var CODE_REVIEW_SEVERITY_ORDER = ["BLOCKER", "MAJOR", "MINOR"];
2445
2415
  var SECURITY_SEVERITY_ORDER = ["CRITICAL", "HIGH", "MEDIUM", "LOW"];
2446
2416
  var DEFAULT_MAX_ROUNDS = 3;
2417
+ var DEFAULT_MAX_TASK_MINUTES = 180;
2447
2418
  var DEFAULT_REVIEW_POLICY = {
2448
2419
  codeReviewThreshold: "BLOCKER",
2449
2420
  securityThreshold: "HIGH",
2450
- maxRounds: DEFAULT_MAX_ROUNDS
2421
+ maxRounds: DEFAULT_MAX_ROUNDS,
2422
+ maxTaskMinutes: DEFAULT_MAX_TASK_MINUTES
2451
2423
  };
2452
2424
  var FILE_SHAPED_LOCATION = /\.[a-zA-Z0-9]{1,10}(:\d+)?\s*$/;
2453
2425
  var PROSE_LOCATION_PATTERNS = [/\bpr\s*body\b/i, /\bcomment\b/i];
@@ -2455,6 +2427,9 @@ var ROLE_FILE_LOCATION = /(^|\/)aeg-root\/roles\//i;
2455
2427
  function isProseLocation(location) {
2456
2428
  if (ROLE_FILE_LOCATION.test(location))
2457
2429
  return true;
2430
+ return isBodyOrCommentLocation(location);
2431
+ }
2432
+ function isBodyOrCommentLocation(location) {
2458
2433
  if (FILE_SHAPED_LOCATION.test(location))
2459
2434
  return false;
2460
2435
  return PROSE_LOCATION_PATTERNS.some((pattern) => pattern.test(location));
@@ -2481,7 +2456,7 @@ function classifyFinding(finding, scale, threshold, context = {}) {
2481
2456
  const wouldBlock = blockingSeverities(scale, threshold).includes(effectiveSeverity);
2482
2457
  if (!wouldBlock)
2483
2458
  return { outcome: "non_blocking", deferralReason: null };
2484
- const hasLocation = location !== undefined && location.length > 0;
2459
+ const hasLocation = location !== undefined && location.length > 0 && !isBodyOrCommentLocation(location);
2485
2460
  if (hasLocation && context.inSurface && !context.inSurface(location)) {
2486
2461
  return { outcome: "deferred", deferralReason: "outside-surface" };
2487
2462
  }
@@ -2848,11 +2823,13 @@ function checkDocUpdateList(prBody) {
2848
2823
  return headingCheck(prBody, "(?:documentation|doc)[- ]update(?:\\s+list)?", "Documentation-update list");
2849
2824
  }
2850
2825
  function checkWorktreeStep0(prBody) {
2851
- if (/git worktree add/.test(prBody))
2826
+ if (/git worktree add/.test(prBody) || /cd \.worktrees\//.test(prBody) || /bun install --frozen-lockfile/.test(prBody))
2852
2827
  return { status: "pass", errors: [] };
2853
2828
  return {
2854
2829
  status: "fail",
2855
- errors: ["brief-validation worktree Step 0: no `git worktree add` command found in the PR body."]
2830
+ errors: [
2831
+ "brief-validation worktree Step 0: no `git worktree add`, `cd .worktrees/`, or `bun install --frozen-lockfile` command found in the PR body."
2832
+ ]
2856
2833
  };
2857
2834
  }
2858
2835
  function checkStopConditions(prBody) {
@@ -3042,7 +3019,8 @@ function isCommandBlock(content) {
3042
3019
  return COMMAND_WORDS.includes(commandWordOf(firstNonBlankLine(content)));
3043
3020
  }
3044
3021
  function isStep0Block(content) {
3045
- return firstNonBlankLine(content).startsWith("git worktree add");
3022
+ const first = firstNonBlankLine(content);
3023
+ return first.startsWith("git worktree add") || first.startsWith("cd .worktrees/") || first.startsWith("bun install --frozen-lockfile");
3046
3024
  }
3047
3025
  function checkCommandsCarryOutput(prBody) {
3048
3026
  const errors = [];
@@ -3511,10 +3489,14 @@ function legacySlugPattern(legacySlugs) {
3511
3489
  const alternation = legacySlugs.map((s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|");
3512
3490
  return new RegExp(`(^|[^a-zA-Z0-9\\n-])(${alternation})([^a-zA-Z0-9\\n-]|$)`, "g");
3513
3491
  }
3492
+ function specGrandfatherPaths(specGrandfather) {
3493
+ return Array.isArray(specGrandfather) ? [...specGrandfather] : Object.keys(specGrandfather);
3494
+ }
3514
3495
  function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = [], specPaths = DEFAULT_SPEC_PATHS) {
3515
3496
  const findings = [];
3516
3497
  const legacyPattern = legacySlugPattern(legacySlugs);
3517
- const grandfathered = new Set(specGrandfather);
3498
+ const grandfatheredWhole = new Set(Array.isArray(specGrandfather) ? specGrandfather : []);
3499
+ const limits = new Map(Array.isArray(specGrandfather) ? [] : Object.entries(specGrandfather));
3518
3500
  const patterns = [
3519
3501
  { pattern: FORGE_NUMBER_PATTERN, what: "a forge number" },
3520
3502
  { pattern: TRANCHE_SLUG_VN_PATTERN, what: "an internal tranche slug" },
@@ -3533,18 +3515,19 @@ function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuff
3533
3515
  continue;
3534
3516
  if (cls !== "product" && cls !== "spec" && !SWEPT_CLASSES.has(cls))
3535
3517
  continue;
3536
- if (cls === "spec" && grandfathered.has(file.path))
3518
+ if (cls === "spec" && grandfatheredWhole.has(file.path))
3537
3519
  continue;
3538
3520
  const blocking = cls === "product" || cls === "spec";
3539
3521
  const scrubbed = cls === "product" ? stripNonProseForProduct(file.path, file.content) : stripNonProse(file.path, file.content);
3540
3522
  const patternsToRun = cls === "product" ? productPatterns : cls === "spec" ? specPatterns : patterns;
3523
+ const fileFindings = [];
3541
3524
  for (const { pattern, what, group } of patternsToRun) {
3542
3525
  pattern.lastIndex = 0;
3543
3526
  let match = pattern.exec(scrubbed);
3544
3527
  while (match !== null) {
3545
3528
  const cited = group !== undefined ? match[group] ?? match[0] : match[0];
3546
3529
  const citedIndex = match.index + match[0].indexOf(cited);
3547
- findings.push({
3530
+ fileFindings.push({
3548
3531
  file: file.path,
3549
3532
  line: lineAt(scrubbed, citedIndex),
3550
3533
  message: `references ${what} ("${cited}") a reader outside this repo's tracker cannot resolve`,
@@ -3553,6 +3536,15 @@ function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuff
3553
3536
  match = pattern.exec(scrubbed);
3554
3537
  }
3555
3538
  }
3539
+ const limit = cls === "spec" ? limits.get(file.path) : undefined;
3540
+ if (limit !== undefined) {
3541
+ if (fileFindings.length <= limit)
3542
+ continue;
3543
+ for (const f of fileFindings) {
3544
+ f.message += `; ${file.path} carries ${fileFindings.length} such findings, over its proseGates.specGrandfather limit of ${limit}`;
3545
+ }
3546
+ }
3547
+ findings.push(...fileFindings);
3556
3548
  }
3557
3549
  return findings;
3558
3550
  }
@@ -4134,6 +4126,8 @@ var FILE_EXTENSIONS = new Set([
4134
4126
  "html",
4135
4127
  "css"
4136
4128
  ]);
4129
+ var CI_SHARD_DIR = "apps/cli/tests/ci-shards";
4130
+ var CI_SHARD_PROBE = `${CI_SHARD_DIR}/shard-1.txt`;
4137
4131
 
4138
4132
  // ../../packages/aeg-core/src/task-branch-identity.ts
4139
4133
  var ISSUE_BRANCH_PATTERN = /^task\/issue-(\d+)$/;
@@ -4512,8 +4506,7 @@ function briefHash(brief) {
4512
4506
  function policyDigest(policy) {
4513
4507
  return createHash4("sha256").update(JSON.stringify({
4514
4508
  codeReviewThreshold: policy.codeReviewThreshold,
4515
- securityThreshold: policy.securityThreshold,
4516
- maxRounds: policy.maxRounds
4509
+ securityThreshold: policy.securityThreshold
4517
4510
  })).digest("hex");
4518
4511
  }
4519
4512
  function isBoundToHead(echoed, headSha) {
@@ -4826,7 +4819,46 @@ function parseEnforcementRegistry(content) {
4826
4819
  return result;
4827
4820
  }
4828
4821
  // ../../packages/aeg-core/src/registry-checks.ts
4829
- function checkG1(rows, existsFn) {
4822
+ var HOOK_DIR_PREFIXES = [".claude/hooks/", ".vinaya/hooks/", ".husky/", ".git/hooks/"];
4823
+ var BARE_HOOK_NAME = /^check-[A-Za-z0-9_.-]*\.sh$/;
4824
+ function basename(path) {
4825
+ return path.slice(path.lastIndexOf("/") + 1);
4826
+ }
4827
+ function lineOf(content, index) {
4828
+ let line = 1;
4829
+ for (let i = 0;i < index; i++)
4830
+ if (content.charCodeAt(i) === 10)
4831
+ line++;
4832
+ return line;
4833
+ }
4834
+ function findUnshippedHookRefs(docs, shipped) {
4835
+ const shippedNames = new Set([...shipped].map(basename));
4836
+ const findings = [];
4837
+ const flag = (doc, token, index) => {
4838
+ findings.push({
4839
+ path: doc.path,
4840
+ reason: `${doc.path}:${lineOf(doc.content, index)} names hook "${token}", which is neither tracked in git nor emitted by \`vinaya init\``
4841
+ });
4842
+ };
4843
+ for (const doc of docs) {
4844
+ for (const { cited, index } of extractCitedPaths(doc.content)) {
4845
+ if (cited.endsWith("/") || !HOOK_DIR_PREFIXES.some((p) => cited.startsWith(p)))
4846
+ continue;
4847
+ if (!shipped.has(cited))
4848
+ flag(doc, cited, index);
4849
+ }
4850
+ const spanPattern = /`([^`\n]+)`/g;
4851
+ let match = spanPattern.exec(doc.content);
4852
+ while (match !== null) {
4853
+ const token = match[1] ?? "";
4854
+ if (BARE_HOOK_NAME.test(token) && !shippedNames.has(token))
4855
+ flag(doc, token, match.index);
4856
+ match = spanPattern.exec(doc.content);
4857
+ }
4858
+ }
4859
+ return findings;
4860
+ }
4861
+ function checkG1(rows, existsFn, hookRefs) {
4830
4862
  const findings = [];
4831
4863
  for (const row of rows) {
4832
4864
  if (row.implementation === "")
@@ -4839,6 +4871,8 @@ function checkG1(rows, existsFn) {
4839
4871
  });
4840
4872
  }
4841
4873
  }
4874
+ if (hookRefs)
4875
+ findings.push(...findUnshippedHookRefs(hookRefs.docs, hookRefs.shipped));
4842
4876
  return { check: "G1", status: findings.length > 0 ? "fail" : "pass", findings };
4843
4877
  }
4844
4878
  var SCAFFOLD_PLACEHOLDER = "[undocumented — fill in why]";
@@ -4971,6 +5005,55 @@ function checkG6(rows, registeredCheckNames) {
4971
5005
  }
4972
5006
  return { check: "G6", status: findings.length > 0 ? "fail" : "pass", findings };
4973
5007
  }
5008
+ function reachesProducer(file, producers, imports) {
5009
+ const seen = new Set([file]);
5010
+ const queue = [file];
5011
+ for (let next = queue.pop();next !== undefined; next = queue.pop()) {
5012
+ if (producers.has(next))
5013
+ return true;
5014
+ for (const dep of imports.get(next) ?? []) {
5015
+ if (!seen.has(dep)) {
5016
+ seen.add(dep);
5017
+ queue.push(dep);
5018
+ }
5019
+ }
5020
+ }
5021
+ return false;
5022
+ }
5023
+ function checkG7(input) {
5024
+ if (!input.enforcementMapPresent)
5025
+ return { check: "G7", status: "info", findings: [] };
5026
+ const subjects = new Set([...input.crossingFiles, ...input.blockingFiles]);
5027
+ const findings = [];
5028
+ for (const path of subjects) {
5029
+ if (path in input.exemptions)
5030
+ continue;
5031
+ if (!reachesProducer(path, input.producers, input.imports)) {
5032
+ findings.push({
5033
+ path,
5034
+ reason: `"${path}" ${input.crossingFiles.includes(path) ? "makes a GitHub-writing call" : "implements a blocking gate"} but neither is a log producer nor imports one, and it is not exempted with a reason`
5035
+ });
5036
+ }
5037
+ }
5038
+ for (const [path, reason] of Object.entries(input.exemptions)) {
5039
+ if (reason.trim() === "") {
5040
+ findings.push({ path, reason: `exemption for "${path}" states no reason` });
5041
+ } else if (!input.existsFn(path)) {
5042
+ findings.push({ path, reason: `exemption names "${path}", which no longer exists` });
5043
+ } else if (!subjects.has(path)) {
5044
+ findings.push({
5045
+ path,
5046
+ reason: `exemption names "${path}", which is neither a GitHub-writing file nor a blocking gate's implementation`
5047
+ });
5048
+ } else if (reachesProducer(path, input.producers, input.imports)) {
5049
+ findings.push({
5050
+ path,
5051
+ reason: `exemption names "${path}", which does reach a log producer — remove the exemption`
5052
+ });
5053
+ }
5054
+ }
5055
+ return { check: "G7", status: findings.length > 0 ? "fail" : "pass", findings };
5056
+ }
4974
5057
  // ../../packages/aeg-core/src/dead-branch-push-guard.ts
4975
5058
  function checkDeadBranchPush(input) {
4976
5059
  const { branch, prState, prNumber } = input;
@@ -5150,6 +5233,11 @@ function checkDispatchReadiness(input) {
5150
5233
  push("depends-on-unresolvable", `dispatch-gate depends-on: ${taskLabel} depends on "${dep.id}", which is UNRESOLVABLE — the resolver could not find a matching tranche/task/Issue for this edge (not a claim about merge status). Not dispatchable until the edge is corrected.`);
5151
5234
  continue;
5152
5235
  }
5236
+ if (dep.readFailed === true) {
5237
+ const issueStr = dep.issue !== null ? ` (#${dep.issue})` : "";
5238
+ push("depends-on-read-failed", `dispatch-gate depends-on: ${taskLabel} depends on ${dep.id}${issueStr}, but the forge could not be read for that dependency — not a claim about its merge status. Retry the check.`);
5239
+ continue;
5240
+ }
5153
5241
  if (!dep.merged && !isHandClosedByRecognizedPrincipal(dep, principalAllowlist)) {
5154
5242
  const issueStr = dep.issue !== null ? ` (#${dep.issue})` : "";
5155
5243
  push("depends-on-not-merged", `dispatch-gate depends-on: ${taskLabel} depends on ${dep.id}${issueStr}, whose PR is not merged yet — not dispatchable, it serializes behind it.`);
@@ -5392,7 +5480,6 @@ var TaskPrPauseSchema = z.object({
5392
5480
  var TaskPrReviewRecordSchema = z.object({
5393
5481
  verdicts: z.array(TaskPrVerdictSchema),
5394
5482
  roundMarkers: z.array(z.number().int().nonnegative()),
5395
- summaryTable: z.string().nullable(),
5396
5483
  pause: TaskPrPauseSchema.nullable()
5397
5484
  });
5398
5485
  var TaskPrReadInputSchema = z.object({
@@ -5439,16 +5526,6 @@ var TaskCancelResultSchema = z.object({
5439
5526
  authenticatedFrom: z.string().min(1),
5440
5527
  fencedEffectKeys: z.array(z.string())
5441
5528
  });
5442
- var TASK_TOOL_NAMES = [
5443
- "task_start",
5444
- "task_status",
5445
- "task_escalation_read",
5446
- "task_pr_read",
5447
- "task_resume",
5448
- "task_cancel"
5449
- ];
5450
- var OPERATOR_STATUS_FOLLOW = "task_status_follow";
5451
- var OPERATOR_TOOL_GRANT = [...TASK_TOOL_NAMES, OPERATOR_STATUS_FOLLOW];
5452
5529
  // ../../packages/aeg-core/src/first-push-dispatch-gate.ts
5453
5530
  function parseTaskBranch(branch) {
5454
5531
  const m = /^task\/([^/]+)\/([^/]+)$/.exec(branch);
@@ -5679,16 +5756,71 @@ var NO_GATE_CUTOVERS = {
5679
5756
  briefRulesSincePr: null,
5680
5757
  agentBoxesRefusedSincePr: null
5681
5758
  };
5682
- // ../../packages/aeg-core/src/dev-review-loop/types.ts
5683
- var SEVERITY_COLUMNS = ["blocker", "major", "minor", "critical", "high", "medium", "low"];
5684
- // ../../packages/aeg-core/src/dev-review-loop/journal-reconstruction.ts
5685
- var SUMMARY_TABLE_HEADER = `| round | ${SEVERITY_COLUMNS.join(" | ")} | confidence | outcome |`;
5686
- // ../../packages/aeg-core/src/log/envelope.ts
5687
- import { createHash as createHash5 } from "node:crypto";
5688
-
5689
5759
  // ../../packages/aeg-core/src/log/schema.ts
5760
+ import { z as z3 } from "zod";
5761
+
5762
+ // ../../packages/aeg-core/src/log/custom.ts
5690
5763
  import { z as z2 } from "zod";
5764
+ var CUSTOM_EVENT_NAME_PATTERN = /^[a-z][a-z0-9_]*\.[a-z][a-z0-9_.]*$/;
5765
+ var CUSTOM_EVENT_NAME_MAX_LENGTH = 64;
5766
+ var CUSTOM_EVENT_RESERVED_NAMESPACE = "vinaya";
5767
+ var CUSTOM_EVENT_MAX_FIELDS = 20;
5768
+ var CUSTOM_FIELD_NAME_PATTERN = /^[a-z][a-z0-9_]*$/;
5769
+ var CUSTOM_FIELD_NAME_MAX_LENGTH = 64;
5770
+ var CUSTOM_TEXT_MAX_LENGTH = 500;
5771
+ var CUSTOM_WORD_PATTERN = /^[a-z0-9][a-z0-9_-]*$/;
5772
+ var CUSTOM_WORD_MAX_LENGTH = 64;
5773
+ var CUSTOM_FIELD_MAX_WORDS = 50;
5774
+ var CustomFieldTypeSchema = z2.union([z2.enum(["text", "number", "boolean"]), z2.array(z2.string())]);
5775
+ var CustomEventDeclarationsSchema = z2.record(z2.string(), z2.object({
5776
+ fields: z2.record(z2.string(), CustomFieldTypeSchema)
5777
+ }).strict()).superRefine((events, ctx) => {
5778
+ for (const [name, declaration] of Object.entries(events)) {
5779
+ const refuse = (message, path = []) => {
5780
+ ctx.addIssue({
5781
+ code: z2.ZodIssueCode.custom,
5782
+ path: [name, ...path],
5783
+ message: `logs.events "${name}": ${message}`
5784
+ });
5785
+ };
5786
+ if (name.length > CUSTOM_EVENT_NAME_MAX_LENGTH) {
5787
+ refuse(`the name must be at most ${CUSTOM_EVENT_NAME_MAX_LENGTH} characters`);
5788
+ }
5789
+ if (!CUSTOM_EVENT_NAME_PATTERN.test(name)) {
5790
+ refuse("the name must be `<namespace>.<event>` — lowercase letters, digits and `_`, a dot between them");
5791
+ } else if (name.split(".")[0] === CUSTOM_EVENT_RESERVED_NAMESPACE) {
5792
+ refuse(`the \`${CUSTOM_EVENT_RESERVED_NAMESPACE}.\` namespace is reserved for Vinaya's own events`);
5793
+ }
5794
+ const fieldEntries = Object.entries(declaration.fields);
5795
+ if (fieldEntries.length > CUSTOM_EVENT_MAX_FIELDS) {
5796
+ refuse(`at most ${CUSTOM_EVENT_MAX_FIELDS} fields may be declared (found ${fieldEntries.length})`, ["fields"]);
5797
+ }
5798
+ for (const [field, type] of fieldEntries) {
5799
+ if (field.length > CUSTOM_FIELD_NAME_MAX_LENGTH || !CUSTOM_FIELD_NAME_PATTERN.test(field)) {
5800
+ refuse(`field "${field}": a field name is lowercase letters, digits and \`_\`, starting with a letter, at most ${CUSTOM_FIELD_NAME_MAX_LENGTH} characters`, ["fields", field]);
5801
+ }
5802
+ if (typeof type === "string")
5803
+ continue;
5804
+ if (type.length === 0) {
5805
+ refuse(`field "${field}": a list of words must name at least one word`, ["fields", field]);
5806
+ }
5807
+ if (type.length > CUSTOM_FIELD_MAX_WORDS) {
5808
+ refuse(`field "${field}": a list of words may name at most ${CUSTOM_FIELD_MAX_WORDS}`, ["fields", field]);
5809
+ }
5810
+ const bad = type.filter((w) => w.length > CUSTOM_WORD_MAX_LENGTH || !CUSTOM_WORD_PATTERN.test(w));
5811
+ if (bad.length > 0) {
5812
+ refuse(`field "${field}": a listed word is lowercase letters, digits, \`_\` and \`-\`, at most ${CUSTOM_WORD_MAX_LENGTH} characters`, ["fields", field]);
5813
+ }
5814
+ if (new Set(type).size !== type.length) {
5815
+ refuse(`field "${field}": a list of words names a word twice`, ["fields", field]);
5816
+ }
5817
+ }
5818
+ }
5819
+ });
5820
+
5821
+ // ../../packages/aeg-core/src/log/schema.ts
5691
5822
  var CONFIDENCE_REASON_MAX_LENGTH = 280;
5823
+ var REVIEW_FINDING_DESCRIPTION_MAX_LENGTH = 1000;
5692
5824
  var ROLE_VALUES = [
5693
5825
  "planner",
5694
5826
  "developer",
@@ -5698,178 +5830,214 @@ var ROLE_VALUES = [
5698
5830
  "archivist",
5699
5831
  "architect"
5700
5832
  ];
5701
- var RoleSchema = z2.enum(ROLE_VALUES);
5833
+ var RoleSchema = z3.enum(ROLE_VALUES);
5702
5834
  var HOST_VALUES = ["hook", "ci", "cli", "loop"];
5703
- var HostSchema = z2.enum(HOST_VALUES);
5835
+ var HostSchema = z3.enum(HOST_VALUES);
5704
5836
  var RUN_ID_PATTERN = /^[A-Za-z0-9_.-]{1,128}$/;
5705
5837
  var headerMetaCore = {
5706
- ts: z2.string(),
5707
- run_id: z2.string().regex(RUN_ID_PATTERN),
5708
- seq: z2.number().int().nonnegative(),
5709
- repo: z2.string().nullable(),
5710
- vinaya: z2.string(),
5711
- doctrine: z2.string(),
5838
+ ts: z3.string(),
5839
+ run_id: z3.string().regex(RUN_ID_PATTERN),
5840
+ seq: z3.number().int().nonnegative(),
5841
+ repo: z3.string().nullable(),
5842
+ vinaya: z3.string(),
5843
+ doctrine: z3.string(),
5712
5844
  host: HostSchema,
5713
- machine: z2.string()
5845
+ machine: z3.string()
5714
5846
  };
5715
- var HeaderMetaV1Schema = z2.object({
5716
- schema: z2.literal(1),
5847
+ var HeaderMetaV1Schema = z3.object({
5848
+ schema: z3.literal(1),
5717
5849
  ...headerMetaCore
5718
5850
  }).strict();
5719
- var LineageSchema = z2.object({
5720
- run: z2.string().nullable(),
5721
- attempt: z2.number().int().nullable(),
5722
- parent: z2.string().nullable()
5851
+ var LineageSchema = z3.object({
5852
+ run: z3.string().nullable(),
5853
+ attempt: z3.number().int().nullable(),
5854
+ parent: z3.string().nullable()
5723
5855
  }).strict();
5724
- var InputVersionsSchema = z2.object({
5725
- objectives_version: z2.string().nullable(),
5726
- brief_hash: z2.string().nullable(),
5727
- ruling_ordinal: z2.number().int().nullable(),
5728
- policy_digest: z2.string().nullable()
5856
+ var InputVersionsSchema = z3.object({
5857
+ objectives_version: z3.string().nullable(),
5858
+ brief_hash: z3.string().nullable(),
5859
+ ruling_ordinal: z3.number().int().nullable(),
5860
+ policy_digest: z3.string().nullable()
5729
5861
  }).strict();
5730
- var ProvenanceSchema = z2.enum(["parent_attributed", "env_correlated", "self_reported", "unavailable"]);
5731
- var HeaderMetaV2Schema = z2.object({
5732
- schema: z2.literal(2),
5862
+ var ProvenanceSchema = z3.enum(["parent_attributed", "env_correlated", "self_reported", "unavailable"]);
5863
+ var HeaderMetaV2Schema = z3.object({
5864
+ schema: z3.literal(2),
5733
5865
  ...headerMetaCore,
5734
- event_id: z2.string().min(1),
5735
- process_id: z2.string().min(1),
5736
- actor_id: z2.string().nullable(),
5866
+ event_id: z3.string().min(1),
5867
+ process_id: z3.string().min(1),
5868
+ actor_id: z3.string().nullable(),
5737
5869
  lineage: LineageSchema,
5738
5870
  input_versions: InputVersionsSchema,
5739
5871
  provenance: ProvenanceSchema
5740
5872
  }).strict();
5741
- var HeaderMetaSchema = z2.discriminatedUnion("schema", [HeaderMetaV1Schema, HeaderMetaV2Schema]);
5742
- var SubjectSchema = z2.object({
5743
- issue: z2.number().int().nullable(),
5744
- pr: z2.number().int().optional(),
5745
- sha: z2.string().optional(),
5746
- role: z2.union([RoleSchema, z2.literal("unattributed")]),
5747
- round: z2.number().int().optional(),
5748
- objectives_version: z2.string().optional()
5873
+ var WorkSchema = z3.object({
5874
+ ref: z3.string().nullable(),
5875
+ repo: z3.string().nullable(),
5876
+ change: z3.string().nullable(),
5877
+ revision: z3.string().nullable()
5749
5878
  }).strict();
5750
- var HeaderSchema = z2.object({
5879
+ var FlowSchema = z3.object({
5880
+ id: z3.string().nullable(),
5881
+ version: z3.string().nullable()
5882
+ }).strict();
5883
+ var HeaderMetaV3Schema = z3.object({
5884
+ schema: z3.literal(3),
5885
+ ...headerMetaCore,
5886
+ event_id: z3.string().min(1),
5887
+ process_id: z3.string().min(1),
5888
+ actor_id: z3.string().nullable(),
5889
+ lineage: LineageSchema,
5890
+ input_versions: InputVersionsSchema,
5891
+ provenance: ProvenanceSchema,
5892
+ work: WorkSchema,
5893
+ flow: FlowSchema,
5894
+ runtime: z3.string().nullable(),
5895
+ source: z3.string().nullable()
5896
+ }).strict();
5897
+ var HeaderMetaSchema = z3.discriminatedUnion("schema", [HeaderMetaV1Schema, HeaderMetaV2Schema, HeaderMetaV3Schema]);
5898
+ var SubjectSchema = z3.object({
5899
+ issue: z3.number().int().nullable(),
5900
+ pr: z3.number().int().optional(),
5901
+ sha: z3.string().optional(),
5902
+ role: z3.union([RoleSchema, z3.literal("unattributed")]),
5903
+ round: z3.number().int().optional(),
5904
+ objectives_version: z3.string().optional()
5905
+ }).strict();
5906
+ var HeaderSchema = z3.object({
5751
5907
  meta: HeaderMetaSchema,
5752
5908
  subject: SubjectSchema
5753
5909
  }).strict();
5754
5910
  var envelopeTail = {
5755
- duration_ms: z2.number().nonnegative().optional(),
5756
- payload: z2.object({}).strict()
5911
+ duration_ms: z3.number().nonnegative().optional(),
5912
+ payload: z3.object({}).strict()
5757
5913
  };
5758
- var ReviewFindingSchema = z2.object({
5759
- id: z2.string(),
5760
- severity: z2.string(),
5761
- state: z2.string().optional(),
5762
- severity_scale: z2.string().optional(),
5763
- policy_treatment: z2.enum(["blocking", "non_blocking", "unavailable"]).optional(),
5764
- confidence: z2.number().min(0).max(1).optional(),
5765
- confidence_scale: z2.string().optional(),
5766
- confidence_source: z2.string().optional()
5914
+ var ReviewFindingSchema = z3.object({
5915
+ id: z3.string(),
5916
+ severity: z3.string(),
5917
+ location: z3.string().optional(),
5918
+ deferral_reason: z3.enum(["outside-surface", "unchanged-line"]).optional(),
5919
+ description: z3.string().max(REVIEW_FINDING_DESCRIPTION_MAX_LENGTH).optional(),
5920
+ state: z3.string().optional(),
5921
+ severity_scale: z3.string().optional(),
5922
+ policy_treatment: z3.enum(["blocking", "non_blocking", "unavailable"]).optional(),
5923
+ confidence: z3.number().min(0).max(1).optional(),
5924
+ confidence_scale: z3.string().optional(),
5925
+ confidence_source: z3.string().optional()
5767
5926
  }).strict();
5768
- var DispatchOutcomeSchema = z2.discriminatedUnion("type", [
5769
- z2.object({ type: z2.literal("pr_opened"), pr: z2.number().int(), head: z2.string() }).strict(),
5770
- z2.object({
5771
- type: z2.literal("round_pushed"),
5772
- pr: z2.number().int(),
5773
- head: z2.string(),
5774
- comment_id: z2.number().int()
5927
+ var DispatchOutcomeSchema = z3.discriminatedUnion("type", [
5928
+ z3.object({ type: z3.literal("pr_opened"), pr: z3.number().int(), head: z3.string() }).strict(),
5929
+ z3.object({
5930
+ type: z3.literal("round_pushed"),
5931
+ pr: z3.number().int(),
5932
+ head: z3.string(),
5933
+ comment_id: z3.number().int()
5775
5934
  }).strict(),
5776
- z2.object({
5777
- type: z2.literal("verdict"),
5778
- verdict: z2.enum(["APPROVE", "REQUEST CHANGES", "PASS", "FAIL"]),
5779
- head: z2.string(),
5780
- comment_id: z2.number().int(),
5781
- objectives: z2.array(z2.object({ id: z2.string(), met: z2.boolean() }).strict()),
5782
- findings: z2.array(ReviewFindingSchema)
5935
+ z3.object({
5936
+ type: z3.literal("verdict"),
5937
+ verdict: z3.enum(["APPROVE", "REQUEST CHANGES", "PASS", "FAIL"]),
5938
+ head: z3.string(),
5939
+ comment_id: z3.number().int(),
5940
+ objectives: z3.array(z3.object({ id: z3.string(), met: z3.boolean() }).strict()),
5941
+ findings: z3.array(ReviewFindingSchema)
5783
5942
  }).strict(),
5784
- z2.object({
5785
- type: z2.literal("escalation"),
5786
- class: z2.enum(["authority", "strategy", "product"]),
5787
- comment_id: z2.number().int()
5943
+ z3.object({
5944
+ type: z3.literal("escalation"),
5945
+ class: z3.enum(["authority", "strategy", "product"]),
5946
+ comment_id: z3.number().int()
5788
5947
  }).strict(),
5789
- z2.object({ type: z2.literal("brief"), comment_id: z2.number().int(), hash: z2.string() }).strict(),
5790
- z2.object({ type: z2.literal("plan"), issues: z2.array(z2.number().int()) }).strict(),
5791
- z2.object({ type: z2.literal("archive"), provenance_comment_id: z2.number().int() }).strict(),
5792
- z2.object({ type: z2.literal("completed") }).strict()
5948
+ z3.object({ type: z3.literal("brief"), comment_id: z3.number().int(), hash: z3.string() }).strict(),
5949
+ z3.object({ type: z3.literal("plan"), issues: z3.array(z3.number().int()) }).strict(),
5950
+ z3.object({ type: z3.literal("archive"), provenance_comment_id: z3.number().int() }).strict(),
5951
+ z3.object({ type: z3.literal("completed") }).strict()
5793
5952
  ]);
5794
5953
  var dispatchShared = {
5795
5954
  meta: HeaderMetaSchema,
5796
5955
  subject: SubjectSchema,
5797
- kind: z2.literal("dispatch"),
5956
+ kind: z3.literal("dispatch"),
5798
5957
  ...envelopeTail,
5799
5958
  target_role: RoleSchema,
5800
- model: z2.string(),
5801
- round: z2.number().int().optional(),
5802
- effect_id: z2.string()
5959
+ model: z3.string(),
5960
+ round: z3.number().int().optional(),
5961
+ effect_id: z3.string()
5803
5962
  };
5804
- var dispatchUsageField = z2.object({ input: z2.number().nonnegative(), output: z2.number().nonnegative() }).strict().nullable();
5805
- var DispatchEventSchema = z2.discriminatedUnion("event", [
5806
- z2.object({ ...dispatchShared, event: z2.literal("dispatched"), prompt_hash: z2.string() }).strict(),
5807
- z2.object({
5963
+ var dispatchUsageField = z3.object({ input: z3.number().nonnegative(), output: z3.number().nonnegative() }).strict().nullable();
5964
+ var DispatchEventSchema = z3.discriminatedUnion("event", [
5965
+ z3.object({ ...dispatchShared, event: z3.literal("dispatched"), prompt_hash: z3.string() }).strict(),
5966
+ z3.object({
5808
5967
  ...dispatchShared,
5809
- event: z2.literal("outcome_received"),
5968
+ event: z3.literal("outcome_received"),
5810
5969
  outcome: DispatchOutcomeSchema,
5811
5970
  usage: dispatchUsageField
5812
5971
  }).strict(),
5813
- z2.object({
5972
+ z3.object({
5814
5973
  ...dispatchShared,
5815
- event: z2.literal("dispatch_failed"),
5816
- reason: z2.enum(["timeout", "crash", "refused", "unattributed_write"]),
5974
+ event: z3.literal("dispatch_failed"),
5975
+ reason: z3.enum(["timeout", "crash", "refused", "unattributed_write", "usage_limit"]),
5976
+ usage_limit: z3.object({ agent: z3.string().min(1), reset_at: z3.string().nullable() }).strict().optional(),
5817
5977
  usage: dispatchUsageField
5818
5978
  }).strict()
5819
5979
  ]);
5980
+ var CODE_TOKEN_PATTERN = /^[A-Za-z0-9._-]{1,64}$/;
5981
+ var CodeTokenSchema = z3.string().regex(CODE_TOKEN_PATTERN);
5982
+ var ReviewerVerdictSchema = z3.object({
5983
+ role: RoleSchema,
5984
+ outcome: z3.enum(["approve", "changes_requested", "not_reviewed"]),
5985
+ blockers: z3.number().int().nonnegative()
5986
+ }).strict();
5820
5987
  var loopShared = {
5821
5988
  meta: HeaderMetaSchema,
5822
5989
  subject: SubjectSchema,
5823
- kind: z2.literal("dev_review_loop"),
5990
+ kind: z3.literal("dev_review_loop"),
5824
5991
  ...envelopeTail,
5825
- loop_id: z2.string()
5992
+ loop_id: z3.string()
5826
5993
  };
5827
- var DevReviewLoopEventSchema = z2.discriminatedUnion("event", [
5828
- z2.object({
5994
+ var DevReviewLoopEventSchema = z3.discriminatedUnion("event", [
5995
+ z3.object({
5829
5996
  ...loopShared,
5830
- event: z2.literal("loop_started"),
5831
- task: z2.number().int(),
5832
- policy: z2.object({
5833
- max_rounds: z2.number().int().nonnegative(),
5834
- reviewers: z2.array(RoleSchema),
5835
- models: z2.record(RoleSchema, z2.string())
5997
+ event: z3.literal("loop_started"),
5998
+ task: z3.number().int(),
5999
+ policy: z3.object({
6000
+ max_rounds: z3.number().int().nonnegative(),
6001
+ reviewers: z3.array(RoleSchema),
6002
+ models: z3.record(RoleSchema, z3.string())
5836
6003
  }).strict()
5837
6004
  }).strict(),
5838
- z2.object({ ...loopShared, event: z2.literal("round_started"), round: z2.number().int(), base_head: z2.string() }).strict(),
5839
- z2.object({
6005
+ z3.object({ ...loopShared, event: z3.literal("round_started"), round: z3.number().int(), base_head: z3.string() }).strict(),
6006
+ z3.object({
5840
6007
  ...loopShared,
5841
- event: z2.literal("gate_result_read"),
5842
- round: z2.number().int(),
5843
- head: z2.string(),
5844
- green: z2.boolean(),
5845
- confidence_value: z2.number().int().min(0).max(100).optional(),
5846
- confidence_reason: z2.string().max(CONFIDENCE_REASON_MAX_LENGTH).optional(),
5847
- confidence_unavailable: z2.boolean().optional(),
5848
- extra_turn_spent: z2.boolean().optional()
6008
+ event: z3.literal("gate_result_read"),
6009
+ round: z3.number().int(),
6010
+ head: z3.string(),
6011
+ green: z3.boolean(),
6012
+ confidence_value: z3.number().int().min(0).max(100).optional(),
6013
+ confidence_reason: z3.string().max(CONFIDENCE_REASON_MAX_LENGTH).optional(),
6014
+ confidence_unavailable: z3.boolean().optional(),
6015
+ extra_turn_spent: z3.boolean().optional()
5849
6016
  }).strict(),
5850
- z2.object({
6017
+ z3.object({
5851
6018
  ...loopShared,
5852
- event: z2.literal("verdicts_read"),
5853
- round: z2.number().int(),
5854
- head: z2.string(),
5855
- all_approve: z2.boolean(),
5856
- blockers: z2.number().int().nonnegative(),
5857
- findings: z2.array(ReviewFindingSchema).optional()
6019
+ event: z3.literal("verdicts_read"),
6020
+ round: z3.number().int(),
6021
+ head: z3.string(),
6022
+ all_approve: z3.boolean(),
6023
+ blockers: z3.number().int().nonnegative(),
6024
+ findings: z3.array(ReviewFindingSchema).optional(),
6025
+ reviewers: z3.array(ReviewerVerdictSchema).optional()
5858
6026
  }).strict(),
5859
- z2.object({
6027
+ z3.object({
5860
6028
  ...loopShared,
5861
- event: z2.literal("findings_compared"),
5862
- round: z2.number().int(),
5863
- open: z2.array(z2.string()),
5864
- resolved: z2.array(z2.string()),
5865
- new: z2.array(z2.string()),
5866
- recurring: z2.array(z2.string())
6029
+ event: z3.literal("findings_compared"),
6030
+ round: z3.number().int(),
6031
+ open: z3.array(z3.string()),
6032
+ resolved: z3.array(z3.string()),
6033
+ new: z3.array(z3.string()),
6034
+ recurring: z3.array(z3.string())
5867
6035
  }).strict(),
5868
- z2.object({
6036
+ z3.object({
5869
6037
  ...loopShared,
5870
- event: z2.literal("stop_condition_met"),
5871
- round: z2.number().int(),
5872
- condition: z2.enum([
6038
+ event: z3.literal("stop_condition_met"),
6039
+ round: z3.number().int(),
6040
+ condition: z3.enum([
5873
6041
  "green",
5874
6042
  "max_rounds",
5875
6043
  "no_progress",
@@ -5878,66 +6046,85 @@ var DevReviewLoopEventSchema = z2.discriminatedUnion("event", [
5878
6046
  "confidence",
5879
6047
  "reappearance",
5880
6048
  "repeat_finding",
5881
- "repeat_failure"
6049
+ "repeat_failure",
6050
+ "time_budget"
5882
6051
  ])
5883
6052
  }).strict(),
5884
- z2.object({
6053
+ z3.object({
6054
+ ...loopShared,
6055
+ event: z3.literal("paused"),
6056
+ round: z3.number().int(),
6057
+ reason: z3.enum(["escalation", "principal_item", "refreeze_needed"]),
6058
+ reason_code: CodeTokenSchema.optional()
6059
+ }).strict(),
6060
+ z3.object({
5885
6061
  ...loopShared,
5886
- event: z2.literal("paused"),
5887
- round: z2.number().int(),
5888
- reason: z2.enum(["escalation", "principal_item", "refreeze_needed"])
6062
+ event: z3.literal("resumed"),
6063
+ round: z3.number().int(),
6064
+ by: z3.enum(["principal", "driver"])
5889
6065
  }).strict(),
5890
- z2.object({
6066
+ z3.object({
5891
6067
  ...loopShared,
5892
- event: z2.literal("resumed"),
5893
- round: z2.number().int(),
5894
- by: z2.enum(["principal", "driver"])
6068
+ event: z3.literal("cancelled"),
6069
+ round: z3.number().int(),
6070
+ by: z3.literal("principal")
5895
6071
  }).strict(),
5896
- z2.object({
6072
+ z3.object({
5897
6073
  ...loopShared,
5898
- event: z2.literal("cancelled"),
5899
- round: z2.number().int(),
5900
- by: z2.literal("principal")
6074
+ event: z3.literal("unpushed_work_resume"),
6075
+ round: z3.number().int(),
6076
+ branch: z3.string(),
6077
+ detail: z3.string()
5901
6078
  }).strict(),
5902
- z2.object({
6079
+ z3.object({
5903
6080
  ...loopShared,
5904
- event: z2.literal("unpushed_work_resume"),
5905
- round: z2.number().int(),
5906
- branch: z2.string(),
5907
- detail: z2.string()
6081
+ event: z3.literal("round_ended"),
6082
+ round: z3.number().int(),
6083
+ base_head: z3.string(),
6084
+ head: z3.string(),
6085
+ files_changed: z3.number().int().nonnegative(),
6086
+ insertions: z3.number().int().nonnegative(),
6087
+ deletions: z3.number().int().nonnegative(),
6088
+ wall_ms: z3.number().nonnegative(),
6089
+ outcome: z3.enum(["green", "changes_requested", "escalated"])
5908
6090
  }).strict(),
5909
- z2.object({
6091
+ z3.object({
5910
6092
  ...loopShared,
5911
- event: z2.literal("round_ended"),
5912
- round: z2.number().int(),
5913
- base_head: z2.string(),
5914
- head: z2.string(),
5915
- files_changed: z2.number().int().nonnegative(),
5916
- insertions: z2.number().int().nonnegative(),
5917
- deletions: z2.number().int().nonnegative(),
5918
- wall_ms: z2.number().nonnegative(),
5919
- outcome: z2.enum(["green", "changes_requested", "escalated"])
6093
+ event: z3.literal("journal_finalized"),
6094
+ rounds: z3.number().int().nonnegative(),
6095
+ total_wall_ms: z3.number().nonnegative(),
6096
+ time_to_green_ms: z3.number().nonnegative().nullable(),
6097
+ files_changed_total: z3.number().int().nonnegative(),
6098
+ final_head: z3.string(),
6099
+ result: z3.enum(["merged_ready", "stopped"])
5920
6100
  }).strict(),
5921
- z2.object({
6101
+ z3.object({
5922
6102
  ...loopShared,
5923
- event: z2.literal("journal_finalized"),
5924
- rounds: z2.number().int().nonnegative(),
5925
- total_wall_ms: z2.number().nonnegative(),
5926
- time_to_green_ms: z2.number().nonnegative().nullable(),
5927
- files_changed_total: z2.number().int().nonnegative(),
5928
- final_head: z2.string(),
5929
- result: z2.enum(["merged_ready", "stopped"])
6103
+ event: z3.literal("infrastructure_retry"),
6104
+ round: z3.number().int(),
6105
+ failure_kind: z3.enum(["pause_comment_post", "developer_connection"]),
6106
+ attempts: z3.number().int().positive(),
6107
+ outcome: z3.enum(["recovered", "exhausted"])
5930
6108
  }).strict(),
5931
- z2.object({
6109
+ z3.object({
5932
6110
  ...loopShared,
5933
- event: z2.literal("infrastructure_retry"),
5934
- round: z2.number().int(),
5935
- failure_kind: z2.enum(["pause_comment_post", "developer_connection"]),
5936
- attempts: z2.number().int().positive(),
5937
- outcome: z2.enum(["recovered", "exhausted"])
6111
+ event: z3.literal("driver_heartbeat"),
6112
+ task: z3.number().int(),
6113
+ pr: z3.number().int().positive().optional(),
6114
+ round: z3.number().int(),
6115
+ phase: z3.string()
6116
+ }).strict(),
6117
+ z3.object({
6118
+ ...loopShared,
6119
+ event: z3.literal("driver_exited"),
6120
+ task: z3.number().int(),
6121
+ reason: z3.enum(["finished", "paused", "reexec", "error", "signal"]),
6122
+ last_decision: z3.string(),
6123
+ exit_code: z3.number().int().optional(),
6124
+ error_class: CodeTokenSchema.optional()
5938
6125
  }).strict()
5939
6126
  ]);
5940
- var ForgeOpSchema = z2.enum([
6127
+ var ForgeOpSchema = z3.enum([
5941
6128
  "pr.create",
5942
6129
  "pr.comment",
5943
6130
  "pr.body.replace",
@@ -5951,24 +6138,24 @@ var ForgeOpSchema = z2.enum([
5951
6138
  "label.add",
5952
6139
  "label.remove"
5953
6140
  ]);
5954
- var ForgeWriteTargetSchema = z2.object({
5955
- issue: z2.number().int().optional(),
5956
- pr: z2.number().int().optional()
6141
+ var ForgeWriteTargetSchema = z3.object({
6142
+ issue: z3.number().int().optional(),
6143
+ pr: z3.number().int().optional()
5957
6144
  }).strict();
5958
6145
  var forgeWriteShared = {
5959
6146
  meta: HeaderMetaSchema,
5960
6147
  subject: SubjectSchema,
5961
- kind: z2.literal("forge_write"),
6148
+ kind: z3.literal("forge_write"),
5962
6149
  ...envelopeTail,
5963
6150
  op: ForgeOpSchema,
5964
6151
  target: ForgeWriteTargetSchema
5965
6152
  };
5966
- var ForgeWriteEventSchema = z2.discriminatedUnion("event", [
5967
- z2.object({ ...forgeWriteShared, event: z2.literal("validated") }).strict(),
5968
- z2.object({ ...forgeWriteShared, event: z2.literal("refused"), reason: z2.string() }).strict(),
5969
- z2.object({ ...forgeWriteShared, event: z2.literal("written"), comment_ids: z2.array(z2.string()) }).strict()
6153
+ var ForgeWriteEventSchema = z3.discriminatedUnion("event", [
6154
+ z3.object({ ...forgeWriteShared, event: z3.literal("validated") }).strict(),
6155
+ z3.object({ ...forgeWriteShared, event: z3.literal("refused"), reason: z3.string() }).strict(),
6156
+ z3.object({ ...forgeWriteShared, event: z3.literal("written"), comment_ids: z3.array(z3.string()) }).strict()
5970
6157
  ]);
5971
- var GateOutcomeSchema = z2.enum([
6158
+ var GateOutcomeSchema = z3.enum([
5972
6159
  "pass",
5973
6160
  "fail",
5974
6161
  "wait",
@@ -5981,61 +6168,74 @@ var GateOutcomeSchema = z2.enum([
5981
6168
  var gateShared = {
5982
6169
  meta: HeaderMetaSchema,
5983
6170
  subject: SubjectSchema,
5984
- kind: z2.literal("gate"),
6171
+ kind: z3.literal("gate"),
5985
6172
  ...envelopeTail,
5986
- check: z2.string(),
5987
- check_version: z2.string().nullable(),
5988
- policy_version: z2.string().nullable(),
5989
- input_fingerprint: z2.string().nullable()
6173
+ check: z3.string(),
6174
+ check_version: z3.string().nullable(),
6175
+ policy_version: z3.string().nullable(),
6176
+ input_fingerprint: z3.string().nullable()
5990
6177
  };
5991
- var GateEventSchema = z2.discriminatedUnion("event", [
5992
- z2.object({
6178
+ var GateEventSchema = z3.discriminatedUnion("event", [
6179
+ z3.object({
5993
6180
  ...gateShared,
5994
- event: z2.literal("checked"),
6181
+ event: z3.literal("checked"),
5995
6182
  outcome: GateOutcomeSchema,
5996
- reason: z2.string().optional()
6183
+ reason: z3.string().optional()
6184
+ }).strict(),
6185
+ z3.object({
6186
+ meta: HeaderMetaSchema,
6187
+ subject: SubjectSchema,
6188
+ kind: z3.literal("gate"),
6189
+ ...envelopeTail,
6190
+ event: z3.literal("summary"),
6191
+ ran: z3.number().int().nonnegative(),
6192
+ passed: z3.number().int().nonnegative(),
6193
+ failed: z3.number().int().nonnegative(),
6194
+ skipped: z3.number().int().nonnegative(),
6195
+ failed_checks: z3.array(z3.string())
5997
6196
  }).strict()
5998
6197
  ]);
5999
- var OperationResultSchema = z2.enum(["ok", "error", "refused", "timeout", "cancelled", "unavailable"]);
6198
+ var OperationResultSchema = z3.enum(["ok", "error", "refused", "timeout", "cancelled", "unavailable"]);
6000
6199
  var operationShared = {
6001
6200
  meta: HeaderMetaSchema,
6002
6201
  subject: SubjectSchema,
6003
- kind: z2.literal("operation"),
6202
+ kind: z3.literal("operation"),
6004
6203
  ...envelopeTail,
6005
- operation: z2.string(),
6006
- target: z2.string().nullable()
6204
+ operation: z3.string(),
6205
+ target: z3.string().nullable()
6007
6206
  };
6008
- var OperationEventSchema = z2.discriminatedUnion("event", [
6009
- z2.object({
6207
+ var OperationEventSchema = z3.discriminatedUnion("event", [
6208
+ z3.object({
6010
6209
  ...operationShared,
6011
- event: z2.literal("completed"),
6210
+ event: z3.literal("completed"),
6012
6211
  result: OperationResultSchema,
6013
- error_class: z2.string().nullable()
6212
+ error_class: z3.string().nullable(),
6213
+ field_names: z3.array(z3.string().max(CUSTOM_FIELD_NAME_MAX_LENGTH)).max(CUSTOM_EVENT_MAX_FIELDS).optional()
6014
6214
  }).strict()
6015
6215
  ]);
6016
- var UsageUnitsSchema = z2.object({
6017
- input: z2.number().nonnegative().nullable(),
6018
- output: z2.number().nonnegative().nullable(),
6019
- cache: z2.number().nonnegative().nullable()
6216
+ var UsageUnitsSchema = z3.object({
6217
+ input: z3.number().nonnegative().nullable(),
6218
+ output: z3.number().nonnegative().nullable(),
6219
+ cache: z3.number().nonnegative().nullable()
6020
6220
  }).strict();
6021
6221
  var usageShared = {
6022
6222
  meta: HeaderMetaSchema,
6023
6223
  subject: SubjectSchema,
6024
- kind: z2.literal("usage"),
6224
+ kind: z3.literal("usage"),
6025
6225
  ...envelopeTail,
6026
- model: z2.string().nullable(),
6027
- source: z2.string(),
6028
- semantics: z2.enum(["cumulative", "delta"])
6226
+ model: z3.string().nullable(),
6227
+ source: z3.string(),
6228
+ semantics: z3.enum(["cumulative", "delta"])
6029
6229
  };
6030
- var UsageEventSchema = z2.discriminatedUnion("event", [
6031
- z2.object({
6230
+ var UsageEventSchema = z3.discriminatedUnion("event", [
6231
+ z3.object({
6032
6232
  ...usageShared,
6033
- event: z2.literal("observed"),
6233
+ event: z3.literal("observed"),
6034
6234
  units: UsageUnitsSchema,
6035
- unknown_reason: z2.string().nullable()
6235
+ unknown_reason: z3.string().nullable()
6036
6236
  }).strict()
6037
6237
  ]);
6038
- var RoleAttemptOutcomeSchema = z2.enum([
6238
+ var RoleAttemptOutcomeSchema = z3.enum([
6039
6239
  "completed",
6040
6240
  "incomplete",
6041
6241
  "infrastructure_failed",
@@ -6046,17 +6246,17 @@ var RoleAttemptOutcomeSchema = z2.enum([
6046
6246
  var roleAttemptShared = {
6047
6247
  meta: HeaderMetaSchema,
6048
6248
  subject: SubjectSchema,
6049
- kind: z2.literal("role_attempt"),
6249
+ kind: z3.literal("role_attempt"),
6050
6250
  ...envelopeTail,
6051
- actor: z2.string().nullable(),
6052
- attempt: z2.number().int().nullable(),
6053
- effect_id: z2.string(),
6054
- model: z2.string().nullable()
6251
+ actor: z3.string().nullable(),
6252
+ attempt: z3.number().int().nullable(),
6253
+ effect_id: z3.string(),
6254
+ model: z3.string().nullable()
6055
6255
  };
6056
- var RoleAttemptEventSchema = z2.discriminatedUnion("event", [
6057
- z2.object({
6256
+ var RoleAttemptEventSchema = z3.discriminatedUnion("event", [
6257
+ z3.object({
6058
6258
  ...roleAttemptShared,
6059
- event: z2.literal("attempted"),
6259
+ event: z3.literal("attempted"),
6060
6260
  outcome: RoleAttemptOutcomeSchema,
6061
6261
  usage: dispatchUsageField
6062
6262
  }).strict()
@@ -6064,42 +6264,59 @@ var RoleAttemptEventSchema = z2.discriminatedUnion("event", [
6064
6264
  var handoffShared = {
6065
6265
  meta: HeaderMetaSchema,
6066
6266
  subject: SubjectSchema,
6067
- kind: z2.literal("handoff"),
6267
+ kind: z3.literal("handoff"),
6068
6268
  ...envelopeTail,
6069
- class: z2.enum(["authority", "strategy", "product"]),
6070
- reason: z2.string()
6269
+ class: z3.enum(["authority", "strategy", "product"]),
6270
+ reason: z3.string()
6071
6271
  };
6072
- var HandoffEventSchema = z2.discriminatedUnion("event", [
6073
- z2.object({
6272
+ var HandoffEventSchema = z3.discriminatedUnion("event", [
6273
+ z3.object({
6074
6274
  ...handoffShared,
6075
- event: z2.literal("raised"),
6076
- requested_decision: z2.string().nullable()
6275
+ event: z3.literal("raised"),
6276
+ requested_decision: z3.string().nullable()
6077
6277
  }).strict(),
6078
- z2.object({
6278
+ z3.object({
6079
6279
  ...handoffShared,
6080
- event: z2.literal("resolved"),
6081
- resolution: z2.string().nullable(),
6082
- resolved_by: z2.string().nullable()
6280
+ event: z3.literal("resolved"),
6281
+ resolution: z3.string().nullable(),
6282
+ resolved_by: z3.string().nullable()
6083
6283
  }).strict()
6084
6284
  ]);
6085
- var EffectTargetSchema = z2.object({
6086
- kind: z2.string(),
6087
- ref: z2.string()
6285
+ var EffectTargetSchema = z3.object({
6286
+ kind: z3.string(),
6287
+ ref: z3.string()
6088
6288
  }).strict();
6089
6289
  var effectShared = {
6090
6290
  meta: HeaderMetaSchema,
6091
6291
  subject: SubjectSchema,
6092
- kind: z2.literal("effect"),
6292
+ kind: z3.literal("effect"),
6093
6293
  ...envelopeTail,
6094
- effect_id: z2.string(),
6294
+ effect_id: z3.string(),
6095
6295
  target: EffectTargetSchema
6096
6296
  };
6097
- var EffectEventSchema = z2.discriminatedUnion("event", [
6098
- z2.object({ ...effectShared, event: z2.literal("attempted") }).strict(),
6099
- z2.object({ ...effectShared, event: z2.literal("observed"), outcome: z2.enum(["success", "failure", "uncertain"]) }).strict(),
6100
- z2.object({ ...effectShared, event: z2.literal("verified"), outcome: z2.enum(["success", "failure", "uncertain"]) }).strict()
6297
+ var EffectEventSchema = z3.discriminatedUnion("event", [
6298
+ z3.object({ ...effectShared, event: z3.literal("attempted") }).strict(),
6299
+ z3.object({ ...effectShared, event: z3.literal("observed"), outcome: z3.enum(["success", "failure", "uncertain"]) }).strict(),
6300
+ z3.object({ ...effectShared, event: z3.literal("verified"), outcome: z3.enum(["success", "failure", "uncertain"]) }).strict()
6101
6301
  ]);
6102
- var LogEventSchema = z2.union([
6302
+ var CustomFieldValueSchema = z3.union([z3.string().max(CUSTOM_TEXT_MAX_LENGTH), z3.number().finite(), z3.boolean()]);
6303
+ var customShared = {
6304
+ meta: HeaderMetaV3Schema,
6305
+ subject: SubjectSchema,
6306
+ kind: z3.literal("custom"),
6307
+ ...envelopeTail
6308
+ };
6309
+ var CustomEventSchema = z3.discriminatedUnion("event", [
6310
+ z3.object({
6311
+ ...customShared,
6312
+ event: z3.literal("recorded"),
6313
+ name: z3.string().max(CUSTOM_EVENT_NAME_MAX_LENGTH).regex(CUSTOM_EVENT_NAME_PATTERN),
6314
+ fields: z3.record(z3.string().max(CUSTOM_FIELD_NAME_MAX_LENGTH).regex(CUSTOM_FIELD_NAME_PATTERN), CustomFieldValueSchema).refine((f) => Object.keys(f).length <= CUSTOM_EVENT_MAX_FIELDS, {
6315
+ message: `custom: at most ${CUSTOM_EVENT_MAX_FIELDS} fields`
6316
+ })
6317
+ }).strict()
6318
+ ]);
6319
+ var LogEventSchema = z3.union([
6103
6320
  DispatchEventSchema,
6104
6321
  DevReviewLoopEventSchema,
6105
6322
  ForgeWriteEventSchema,
@@ -6108,10 +6325,11 @@ var LogEventSchema = z2.union([
6108
6325
  UsageEventSchema,
6109
6326
  RoleAttemptEventSchema,
6110
6327
  HandoffEventSchema,
6111
- EffectEventSchema
6328
+ EffectEventSchema,
6329
+ CustomEventSchema
6112
6330
  ]);
6113
-
6114
6331
  // ../../packages/aeg-core/src/log/envelope.ts
6332
+ import { createHash as createHash5 } from "node:crypto";
6115
6333
  function isRole(value) {
6116
6334
  return value !== undefined && ROLE_VALUES.includes(value);
6117
6335
  }
@@ -6148,18 +6366,27 @@ function roundFromEnv(round) {
6148
6366
  const n = Number(round);
6149
6367
  return Number.isInteger(n) ? n : undefined;
6150
6368
  }
6369
+ function prFromEnv(pr) {
6370
+ if (pr === undefined || pr === "")
6371
+ return;
6372
+ const n = Number(pr);
6373
+ return Number.isInteger(n) && n > 0 ? n : undefined;
6374
+ }
6151
6375
  function buildHeader(input) {
6152
6376
  const role = isRole(input.env.role) ? input.env.role : "unattributed";
6153
6377
  const round = roundFromEnv(input.env.round);
6378
+ const pr = prFromEnv(input.env.pr);
6154
6379
  const subject = {
6155
6380
  issue: issueFromTask(input.env.task) ?? input.branchIssue ?? null,
6156
6381
  role,
6157
6382
  ...round !== undefined ? { round } : {},
6383
+ ...pr !== undefined ? { pr } : {},
6158
6384
  ...input.subject ?? {}
6159
6385
  };
6386
+ const issue = subject.issue;
6160
6387
  return {
6161
6388
  meta: {
6162
- schema: 2,
6389
+ schema: 3,
6163
6390
  ts: input.now.toISOString(),
6164
6391
  run_id: input.runId,
6165
6392
  seq: input.seq,
@@ -6182,7 +6409,19 @@ function buildHeader(input) {
6182
6409
  ruling_ordinal: input.inputVersions?.rulingOrdinal ?? null,
6183
6410
  policy_digest: input.inputVersions?.policyDigest ?? null
6184
6411
  },
6185
- provenance: provenanceFor(input)
6412
+ provenance: provenanceFor(input),
6413
+ work: {
6414
+ ref: lineageFieldFromEnv(input.env.workRef) ?? (issue === null ? null : String(issue)),
6415
+ repo: input.repo,
6416
+ change: null,
6417
+ revision: null
6418
+ },
6419
+ flow: {
6420
+ id: lineageFieldFromEnv(input.env.flow) ?? "vinaya",
6421
+ version: lineageFieldFromEnv(input.env.flowVersion)
6422
+ },
6423
+ runtime: lineageFieldFromEnv(input.env.runtime),
6424
+ source: lineageFieldFromEnv(input.env.source)
6186
6425
  },
6187
6426
  subject
6188
6427
  };
@@ -6225,7 +6464,7 @@ function redact(value, home) {
6225
6464
  return value;
6226
6465
  }
6227
6466
  // ../../packages/aeg-core/src/log/store.ts
6228
- var KNOWN_SCHEMA_VERSIONS = [1, 2];
6467
+ var KNOWN_SCHEMA_VERSIONS = [1, 2, 3];
6229
6468
  function metaOf(obj) {
6230
6469
  if (obj === null || typeof obj !== "object")
6231
6470
  return null;
@@ -6291,7 +6530,7 @@ function classifyStoredLine(raw, home) {
6291
6530
  return { status: "invalid", identity: null, raw, reason: "valid event with no derivable identity" };
6292
6531
  }
6293
6532
  const redacted = redact(event, home);
6294
- const provenance = version === 2 ? event.meta.provenance ?? null : null;
6533
+ const provenance = version >= 2 ? event.meta.provenance ?? null : null;
6295
6534
  return {
6296
6535
  status: "ok",
6297
6536
  identity,
@@ -6304,138 +6543,380 @@ function classifyStoredLine(raw, home) {
6304
6543
  };
6305
6544
  }
6306
6545
  // ../../packages/aeg-core/src/control-store/records.ts
6307
- import { z as z3 } from "zod";
6308
- var isoTimestamp = z3.string().min(1);
6309
- var taskId = z3.number().int().positive();
6310
- var epochNumber = z3.number().int().nonnegative();
6311
- var RunRecordSchema = z3.object({
6312
- version: z3.literal(1),
6313
- kind: z3.literal("run"),
6546
+ import { z as z4 } from "zod";
6547
+ var isoTimestamp = z4.string().min(1);
6548
+ var taskId = z4.number().int().positive();
6549
+ var epochNumber = z4.number().int().nonnegative();
6550
+ var RunRecordSchema = z4.object({
6551
+ version: z4.literal(1),
6552
+ kind: z4.literal("run"),
6314
6553
  task: taskId,
6315
- runId: z3.string().min(1),
6316
- pid: z3.number().int().positive(),
6317
- host: z3.string().min(1),
6554
+ runId: z4.string().min(1),
6555
+ pid: z4.number().int().positive(),
6556
+ host: z4.string().min(1),
6318
6557
  startedAt: isoTimestamp,
6319
- childStartedAt: z3.string().min(1).nullable().optional(),
6320
- childCommand: z3.string().min(1).nullable().optional()
6558
+ childStartedAt: z4.string().min(1).nullable().optional(),
6559
+ childCommand: z4.string().min(1).nullable().optional()
6321
6560
  }).strict();
6322
- var InputRecordSchema = z3.object({
6323
- version: z3.literal(1),
6324
- kind: z3.literal("input"),
6561
+ var InputRecordSchema = z4.object({
6562
+ version: z4.literal(1),
6563
+ kind: z4.literal("input"),
6325
6564
  task: taskId,
6326
- runId: z3.string().min(1),
6327
- source: z3.union([z3.literal("fresh"), z3.literal("resume")]),
6328
- pr: z3.number().int().positive().nullable(),
6329
- round: z3.number().int().nonnegative(),
6565
+ runId: z4.string().min(1),
6566
+ source: z4.union([z4.literal("fresh"), z4.literal("resume")]),
6567
+ pr: z4.number().int().positive().nullable(),
6568
+ round: z4.number().int().nonnegative(),
6330
6569
  recordedAt: isoTimestamp
6331
6570
  }).strict();
6332
- var OwnershipRecordSchema = z3.object({
6333
- version: z3.literal(1),
6334
- kind: z3.literal("ownership"),
6571
+ var OwnershipRecordSchema = z4.object({
6572
+ version: z4.literal(1),
6573
+ kind: z4.literal("ownership"),
6335
6574
  task: taskId,
6336
6575
  epoch: epochNumber,
6337
- ownerId: z3.string().min(1),
6338
- pid: z3.number().int().positive(),
6339
- host: z3.string().min(1),
6576
+ ownerId: z4.string().min(1),
6577
+ pid: z4.number().int().positive(),
6578
+ host: z4.string().min(1),
6340
6579
  acquiredAt: isoTimestamp
6341
6580
  }).strict();
6342
- var TransitionRecordSchema = z3.object({
6343
- version: z3.literal(1),
6344
- kind: z3.literal("transition"),
6581
+ var TransitionRecordSchema = z4.object({
6582
+ version: z4.literal(1),
6583
+ kind: z4.literal("transition"),
6345
6584
  task: taskId,
6346
6585
  epoch: epochNumber,
6347
- seq: z3.number().int().nonnegative(),
6348
- from: z3.string().min(1),
6349
- to: z3.string().min(1),
6350
- detail: z3.string().optional(),
6586
+ seq: z4.number().int().nonnegative(),
6587
+ from: z4.string().min(1),
6588
+ to: z4.string().min(1),
6589
+ detail: z4.string().optional(),
6351
6590
  at: isoTimestamp
6352
6591
  }).strict();
6353
- var ManifestRecordSchema = z3.object({
6354
- version: z3.literal(1),
6355
- kind: z3.literal("manifest"),
6592
+ var ManifestRecordSchema = z4.object({
6593
+ version: z4.literal(1),
6594
+ kind: z4.literal("manifest"),
6356
6595
  task: taskId,
6357
6596
  round: epochNumber,
6358
- repository: z3.string().min(1),
6359
- pr: z3.number().int().positive(),
6360
- branch: z3.string().min(1),
6361
- baseSha: z3.string().min(1).nullable(),
6362
- headSha: z3.string().min(1),
6363
- briefHash: z3.string().min(1).nullable(),
6364
- objectivesVersion: z3.string().min(1).nullable(),
6597
+ repository: z4.string().min(1),
6598
+ pr: z4.number().int().positive(),
6599
+ branch: z4.string().min(1),
6600
+ baseSha: z4.string().min(1).nullable(),
6601
+ headSha: z4.string().min(1),
6602
+ briefHash: z4.string().min(1).nullable(),
6603
+ objectivesVersion: z4.string().min(1).nullable(),
6365
6604
  rulingOrdinal: epochNumber,
6366
- policyDigest: z3.string().min(1),
6605
+ policyDigest: z4.string().min(1),
6367
6606
  recordedAt: isoTimestamp
6368
6607
  }).strict();
6369
- var roundHeadIdentity = z3.object({ round: z3.number().int().positive(), head: z3.string().min(1) }).strict();
6370
- var LoopBudgetsSchema = z3.object({
6371
- mechanicalRetries: z3.number().int().nonnegative(),
6372
- reviewRounds: z3.number().int().nonnegative(),
6373
- infrastructureRetries: z3.number().int().nonnegative()
6608
+ var roundHeadIdentity = z4.object({ round: z4.number().int().positive(), head: z4.string().min(1) }).strict();
6609
+ var LoopBudgetsSchema = z4.object({
6610
+ mechanicalRetries: z4.number().int().nonnegative(),
6611
+ reviewRounds: z4.number().int().nonnegative(),
6612
+ infrastructureRetries: z4.number().int().nonnegative()
6374
6613
  }).strict();
6375
- var LoopStateRecordSchema = z3.object({
6376
- version: z3.literal(1),
6377
- kind: z3.literal("loop_state"),
6614
+ var LoopStateRecordSchema = z4.object({
6615
+ version: z4.literal(1),
6616
+ kind: z4.literal("loop_state"),
6378
6617
  task: taskId,
6379
- round: z3.number().int().positive(),
6380
- phase: z3.string().min(1),
6381
- pauseReason: z3.string().min(1).nullable(),
6618
+ round: z4.number().int().positive(),
6619
+ phase: z4.string().min(1),
6620
+ pauseReason: z4.string().min(1).nullable(),
6382
6621
  budgets: LoopBudgetsSchema,
6383
6622
  heldResult: roundHeadIdentity.nullable(),
6384
6623
  deliveredFindings: roundHeadIdentity.nullable(),
6385
- repeatMemory: z3.object({
6386
- blockingFindings: z3.array(z3.string()),
6387
- lastFailure: z3.object({ signature: z3.string(), message: z3.string() }).nullable()
6624
+ repeatMemory: z4.object({
6625
+ blockingFindings: z4.array(z4.string()),
6626
+ lastFailure: z4.object({ signature: z4.string(), message: z4.string() }).nullable()
6388
6627
  }).strict().optional(),
6628
+ publicationExpectedBase: z4.string().regex(/^[0-9a-f]{40}$/).nullable().optional(),
6629
+ taskStartedAt: isoTimestamp.optional(),
6630
+ phaseMs: z4.record(z4.string(), z4.number().nonnegative()).optional(),
6389
6631
  recordedAt: isoTimestamp
6390
6632
  }).strict();
6391
- var EffectRecordSchema = z3.object({
6392
- version: z3.literal(1),
6393
- kind: z3.literal("effect"),
6633
+ var EffectRecordSchema = z4.object({
6634
+ version: z4.literal(1),
6635
+ kind: z4.literal("effect"),
6394
6636
  task: taskId,
6395
- key: z3.string().min(1),
6396
- operation: z3.string().min(1),
6397
- target: z3.string().min(1),
6398
- inputVersion: z3.number().int().nonnegative(),
6399
- payloadDigest: z3.string().min(1),
6400
- status: z3.union([z3.literal("started"), z3.literal("verified"), z3.literal("uncertain")]),
6401
- url: z3.string().optional(),
6637
+ key: z4.string().min(1),
6638
+ operation: z4.string().min(1),
6639
+ target: z4.string().min(1),
6640
+ inputVersion: z4.number().int().nonnegative(),
6641
+ payloadDigest: z4.string().min(1),
6642
+ status: z4.union([z4.literal("started"), z4.literal("verified"), z4.literal("uncertain")]),
6643
+ url: z4.string().optional(),
6402
6644
  recordedAt: isoTimestamp
6403
6645
  }).strict();
6404
- var EscalationRecordSchema = z3.object({
6405
- version: z3.literal(1),
6406
- kind: z3.literal("escalation"),
6646
+ var EscalationRecordSchema = z4.object({
6647
+ version: z4.literal(1),
6648
+ kind: z4.literal("escalation"),
6407
6649
  task: taskId,
6408
- escalationId: z3.string().min(1),
6650
+ escalationId: z4.string().min(1),
6409
6651
  round: epochNumber,
6410
- head: z3.string().min(1),
6411
- branch: z3.string().min(1),
6412
- pr: z3.number().int().positive().nullable(),
6413
- runId: z3.string().min(1),
6414
- pid: z3.number().int().positive(),
6415
- host: z3.string().min(1),
6416
- agent: z3.string().min(1).optional(),
6417
- reason: z3.string().min(1),
6418
- detail: z3.string().optional(),
6419
- evidence: z3.string().optional(),
6420
- attemptedRecovery: z3.string().min(1),
6421
- requestedDecision: z3.string().min(1),
6422
- recipient: z3.string().min(1),
6423
- briefHash: z3.string().min(1).nullable(),
6424
- objectivesVersion: z3.string().min(1).nullable(),
6652
+ head: z4.string().min(1),
6653
+ branch: z4.string().min(1),
6654
+ pr: z4.number().int().positive().nullable(),
6655
+ runId: z4.string().min(1),
6656
+ pid: z4.number().int().positive(),
6657
+ host: z4.string().min(1),
6658
+ agent: z4.string().min(1).optional(),
6659
+ reason: z4.string().min(1),
6660
+ detail: z4.string().optional(),
6661
+ evidence: z4.string().optional(),
6662
+ attemptedRecovery: z4.string().min(1),
6663
+ requestedDecision: z4.string().min(1),
6664
+ recipient: z4.string().min(1),
6665
+ briefHash: z4.string().min(1).nullable(),
6666
+ objectivesVersion: z4.string().min(1).nullable(),
6425
6667
  rulingOrdinal: epochNumber,
6426
- policyDigest: z3.string().min(1),
6668
+ policyDigest: z4.string().min(1),
6427
6669
  recordedAt: isoTimestamp
6428
6670
  }).strict();
6429
- var ResolutionRecordSchema = z3.object({
6430
- version: z3.literal(1),
6431
- kind: z3.literal("resolution"),
6671
+ var ResolutionRecordSchema = z4.object({
6672
+ version: z4.literal(1),
6673
+ kind: z4.literal("resolution"),
6432
6674
  task: taskId,
6433
- escalationId: z3.string().min(1),
6434
- decision: z3.union([z3.literal("resume"), z3.literal("cancel")]),
6435
- authenticatedBy: z3.string().min(1),
6436
- authenticatedFrom: z3.string().min(1),
6675
+ escalationId: z4.string().min(1),
6676
+ decision: z4.union([z4.literal("resume"), z4.literal("cancel")]),
6677
+ authenticatedBy: z4.string().min(1),
6678
+ authenticatedFrom: z4.string().min(1),
6437
6679
  consumedAt: isoTimestamp
6438
6680
  }).strict();
6681
+ // ../../packages/aeg-core/src/control-store/local.ts
6682
+ var CONTROL_AREA_DIRNAME = "control";
6683
+ // src/lib/init-hook-paths.ts
6684
+ var TRACKED_HOOK_DIR = ".vinaya/hooks";
6685
+ var HOOK_DIRS = [".husky", ".git/hooks", TRACKED_HOOK_DIR];
6686
+ var INIT_HOOK_NAMES = ["pre-commit", "pre-push", "commit-msg"];
6687
+ function initHookPaths() {
6688
+ return HOOK_DIRS.flatMap((dir) => INIT_HOOK_NAMES.map((name) => `${dir}/${name}`));
6689
+ }
6690
+
6691
+ // src/lib/github-crossing-files.ts
6692
+ import { existsSync, readdirSync, readFileSync as readFileSync2, statSync } from "node:fs";
6693
+ function isGithubCrossingLine(line) {
6694
+ const createMatch = /\bgh\s+(pr|issue)\s+create\b/.test(line);
6695
+ const editWithBodyOrTitle = /\bgh\s+(pr|issue)\s+edit\b/.test(line) && /--body\b|--body-file\b|--title\b|(?:^|\s)-b(?:\s|$)|(?:^|\s)-F(?:\s|$)|(?:^|\s)-t(?:\s|$)/.test(line);
6696
+ const apiPost = /\bgh\s+api\b/.test(line) && /-X\s*POST\b|--method\s*POST\b|(?:^|\s)-f(?:\s|$)|(?:^|\s)-F(?:\s|$)/.test(line) && /(\/pulls|\/issues)(["'\s]|$)/.test(line);
6697
+ const apiPatch = /\bgh\s+api\b/.test(line) && /-X\s*PATCH\b|--method\s*PATCH\b/.test(line) && /(\/pulls|\/issues)\/[0-9]+(["'\s]|$)/.test(line);
6698
+ const curlWrite = /\b(curl|wget)\b/.test(line) && /api\.github\.com/.test(line) && /(\/pulls|\/issues)/.test(line) && /-X\s*(POST|PATCH|PUT)\b|--method\s*(POST|PATCH|PUT)\b|--data\b|(?:^|\s)-d(?:\s|$)|--json\b|--post-data\b/.test(line);
6699
+ return createMatch || editWithBodyOrTitle || apiPost || apiPatch || curlWrite;
6700
+ }
6701
+ function globCandidateFiles() {
6702
+ const out = [];
6703
+ if (existsSync(".husky")) {
6704
+ for (const name of readdirSync(".husky")) {
6705
+ if (name === "_")
6706
+ continue;
6707
+ const rel = `.husky/${name}`;
6708
+ if (statSync(rel).isFile())
6709
+ out.push(rel);
6710
+ }
6711
+ }
6712
+ if (existsSync(".claude/hooks")) {
6713
+ for (const name of readdirSync(".claude/hooks")) {
6714
+ if (name.endsWith(".sh"))
6715
+ out.push(`.claude/hooks/${name}`);
6716
+ }
6717
+ }
6718
+ return out;
6719
+ }
6720
+ function findCrossingFiles(candidateFiles) {
6721
+ return candidateFiles.filter((path) => readFileSync2(path, "utf8").split(`
6722
+ `).some((line) => isGithubCrossingLine(line)));
6723
+ }
6724
+
6725
+ // src/lib/log-producer-graph.ts
6726
+ import { readFileSync as readFileSync4 } from "node:fs";
6727
+ import { join as join2, relative } from "node:path";
6728
+
6729
+ // src/lib/test-selector.ts
6730
+ import { readdirSync as readdirSync2, readFileSync as readFileSync3, statSync as statSync2 } from "node:fs";
6731
+ import { dirname, extname, isAbsolute, join, resolve } from "node:path";
6732
+
6733
+ // src/lib/repo-scanner-tests.ts
6734
+ var TREE_READERS = new Set([
6735
+ "readdirSync",
6736
+ "readdir",
6737
+ "opendirSync",
6738
+ "opendir",
6739
+ "globSync",
6740
+ "globIterateSync",
6741
+ "readdirp"
6742
+ ]);
6743
+ var SPAWN_CALLS = new Set(["execFileSync", "execSync", "spawnSync", "spawn", "exec", "execFile"]);
6744
+ var PROCESS_CALLS = new Set([...SPAWN_CALLS, "fork"]);
6745
+
6746
+ // src/lib/test-selector.ts
6747
+ var SOURCE_EXTENSIONS = [".ts", ".tsx", ".mts", ".cts", ".js", ".jsx", ".mjs", ".cjs"];
6748
+ var SKIP_DIRS = new Set(["node_modules", "dist", ".git", "build", "coverage"]);
6749
+ var OUTPUT_TO_SOURCE_EXTENSIONS = new Map([
6750
+ [".js", [".ts", ".tsx"]],
6751
+ [".jsx", [".tsx"]],
6752
+ [".mjs", [".mts"]],
6753
+ [".cjs", [".cts"]]
6754
+ ]);
6755
+ var FROM_CLAUSE_RE = /^\s*(import|export)\b\s*([^'"]*?)\bfrom\s*(['"])([^'"]+)\3/gm;
6756
+ var QUOTED_LIST_CLAUSE_RE = /^\s*(import|export)\b\s*((?:type\s+)?(?:[A-Za-z_$][\w$]*\s*,\s*)?\{[^{}]*\})\s*from\s*(['"])([^'"]+)\3/gm;
6757
+ var SIDE_EFFECT_IMPORT_RE = /^\s*import\s*(['"])([^'"]+)\1/gm;
6758
+ var DYNAMIC_IMPORT_RE = /\bimport\s*\(\s*(['"])([^'"]+)\1\s*\)/g;
6759
+ var IMPORT_EQUALS_REQUIRE_RE = /^\s*(?:export\s+)?import\s+[A-Za-z_$][\w$]*\s*=\s*require\s*\(\s*(['"])([^'"]+)\1\s*\)/gm;
6760
+ var COMMENT_RE = /\/\*[\s\S]*?\*\/|\/\/[^\n]*/g;
6761
+ function parseNamedList(inside) {
6762
+ const names = [];
6763
+ let clean = true;
6764
+ const entries = inside.replace(COMMENT_RE, "").split(",").map((s) => s.trim()).filter((s) => s.length > 0);
6765
+ if (entries.length === 0)
6766
+ clean = false;
6767
+ for (const raw of entries) {
6768
+ const entry = raw.replace(/^type\s+/, "");
6769
+ const origin = entry.split(/\s+as\s+/)[0].trim();
6770
+ if (/^[A-Za-z_$][\w$]*$/.test(origin))
6771
+ names.push(origin);
6772
+ else
6773
+ clean = false;
6774
+ }
6775
+ return { names, clean };
6776
+ }
6777
+ function classifyFromClause(clause, specifier) {
6778
+ const c = clause.trim().replace(/^type\s+/, "");
6779
+ if (c.startsWith("*")) {
6780
+ return /^\*\s+as\s+/.test(c) ? { kind: "namespace", specifier } : { kind: "star", specifier };
6781
+ }
6782
+ if (c.startsWith("{")) {
6783
+ const { names, clean } = parseNamedList(c.slice(1, c.lastIndexOf("}")));
6784
+ return { kind: "named", specifier, names, clean };
6785
+ }
6786
+ return { kind: "default", specifier };
6787
+ }
6788
+ function collectRecords(source, includeExportFrom) {
6789
+ const records = [];
6790
+ FROM_CLAUSE_RE.lastIndex = 0;
6791
+ for (let m = FROM_CLAUSE_RE.exec(source);m !== null; m = FROM_CLAUSE_RE.exec(source)) {
6792
+ if (!includeExportFrom && m[1] !== "import")
6793
+ continue;
6794
+ records.push(classifyFromClause(m[2], m[4]));
6795
+ }
6796
+ QUOTED_LIST_CLAUSE_RE.lastIndex = 0;
6797
+ for (let m = QUOTED_LIST_CLAUSE_RE.exec(source);m !== null; m = QUOTED_LIST_CLAUSE_RE.exec(source)) {
6798
+ if (!/['"]/.test(m[2]))
6799
+ continue;
6800
+ if (!includeExportFrom && m[1] !== "import")
6801
+ continue;
6802
+ records.push(classifyFromClause(m[2], m[4]));
6803
+ }
6804
+ SIDE_EFFECT_IMPORT_RE.lastIndex = 0;
6805
+ for (let m = SIDE_EFFECT_IMPORT_RE.exec(source);m !== null; m = SIDE_EFFECT_IMPORT_RE.exec(source)) {
6806
+ records.push({ kind: "side-effect", specifier: m[2] });
6807
+ }
6808
+ DYNAMIC_IMPORT_RE.lastIndex = 0;
6809
+ for (let m = DYNAMIC_IMPORT_RE.exec(source);m !== null; m = DYNAMIC_IMPORT_RE.exec(source)) {
6810
+ records.push({ kind: "dynamic", specifier: m[2] });
6811
+ }
6812
+ IMPORT_EQUALS_REQUIRE_RE.lastIndex = 0;
6813
+ for (let m = IMPORT_EQUALS_REQUIRE_RE.exec(source);m !== null; m = IMPORT_EQUALS_REQUIRE_RE.exec(source)) {
6814
+ records.push({ kind: "namespace", specifier: m[2] });
6815
+ }
6816
+ return records;
6817
+ }
6818
+ function extractImportRecords(source) {
6819
+ return collectRecords(source, true);
6820
+ }
6821
+ function walkFiles(root) {
6822
+ const out = [];
6823
+ let entries;
6824
+ try {
6825
+ entries = readdirSync2(root);
6826
+ } catch {
6827
+ return out;
6828
+ }
6829
+ for (const entry of entries) {
6830
+ if (SKIP_DIRS.has(entry))
6831
+ continue;
6832
+ const abs = join(root, entry);
6833
+ let s;
6834
+ try {
6835
+ s = statSync2(abs);
6836
+ } catch {
6837
+ continue;
6838
+ }
6839
+ if (s.isDirectory()) {
6840
+ out.push(...walkFiles(abs));
6841
+ } else {
6842
+ out.push(abs);
6843
+ }
6844
+ }
6845
+ return out;
6846
+ }
6847
+ function resolveFileCandidate(base, knownFiles) {
6848
+ if (knownFiles.has(base))
6849
+ return base;
6850
+ const written = extname(base);
6851
+ for (const ext of OUTPUT_TO_SOURCE_EXTENSIONS.get(written) ?? []) {
6852
+ const source = base.slice(0, -written.length) + ext;
6853
+ if (knownFiles.has(source))
6854
+ return source;
6855
+ }
6856
+ for (const ext of SOURCE_EXTENSIONS) {
6857
+ if (knownFiles.has(base + ext))
6858
+ return base + ext;
6859
+ }
6860
+ for (const ext of SOURCE_EXTENSIONS) {
6861
+ const indexed = join(base, `index${ext}`);
6862
+ if (knownFiles.has(indexed))
6863
+ return indexed;
6864
+ }
6865
+ return null;
6866
+ }
6867
+ function resolveRelativeImport(fromFile, specifier, knownFiles) {
6868
+ if (!specifier.startsWith("."))
6869
+ return null;
6870
+ return resolveFileCandidate(resolve(dirname(fromFile), specifier), knownFiles);
6871
+ }
6872
+ var TYPE_ONLY_CONDITIONS = new Set(["types", "typings"]);
6873
+
6874
+ // src/lib/log-producer-graph.ts
6875
+ var CLI_SOURCE_DIR = "apps/cli/src";
6876
+ var LOG_SINK_PATH = "apps/cli/src/lib/log-sink.ts";
6877
+ var LOG_SINK_PRODUCER_NAMES = ["log", "logSync"];
6878
+ var NOT_REACHED_BY_IMPORT_CHECK_BIN = "a check bin: it runs only as a child of `vinaya check`, whose runner records one gate event per attempt, so no import of the sink is needed";
6879
+ var NOT_REACHED_STANDALONE_SCRIPT = "a standalone script outside the CLI package: the import resolution cannot follow it and no CLI source imports it; invoked directly, it records nothing of its own";
6880
+ var G7_EXEMPTIONS = {
6881
+ "apps/cli/src/checks/bin/check-review-gate.ts": NOT_REACHED_BY_IMPORT_CHECK_BIN,
6882
+ "apps/cli/src/checks/bin/check-main-branch-refusal.ts": NOT_REACHED_BY_IMPORT_CHECK_BIN,
6883
+ "apps/cli/src/checks/bin/check-token-collection-wired.ts": NOT_REACHED_BY_IMPORT_CHECK_BIN,
6884
+ "apps/cli/src/checks/resolver.ts": "the pure step that decides which checks `vinaya check` runs; the runner it feeds records each run and the invocation records its own operation at exit",
6885
+ "packages/aeg-core/bin/open-pr.ts": NOT_REACHED_STANDALONE_SCRIPT,
6886
+ "packages/aeg-core/bin/open-issue.ts": NOT_REACHED_STANDALONE_SCRIPT,
6887
+ "packages/aeg-core/bin/verify-dispatch.ts": NOT_REACHED_STANDALONE_SCRIPT,
6888
+ "packages/aeg-core/bin/verify-task.ts": NOT_REACHED_STANDALONE_SCRIPT,
6889
+ "packages/aeg-core/bin/check-branch-topology.ts": NOT_REACHED_STANDALONE_SCRIPT,
6890
+ "packages/aeg-core/bin/check-push-target.ts": NOT_REACHED_STANDALONE_SCRIPT,
6891
+ "packages/aeg-core/bin/check-first-push-dispatch.ts": NOT_REACHED_STANDALONE_SCRIPT,
6892
+ "packages/aeg-core/bin/assign-task-issue.ts": NOT_REACHED_STANDALONE_SCRIPT,
6893
+ "packages/aeg-core/src/brief-validation.ts": "a pure library outside the CLI package: it makes no call of its own, and the import resolution does not follow a workspace package"
6894
+ };
6895
+ function blockingGateFiles(ring0Rows, existsFn) {
6896
+ return [...new Set(ring0Rows.map((r) => r.implementation).filter((p) => p.endsWith(".ts") && existsFn(p)))];
6897
+ }
6898
+ function gatherLogProducerGraph(root) {
6899
+ const files = walkFiles(join2(root, CLI_SOURCE_DIR)).filter((f) => f.endsWith(".ts") && !f.endsWith(".test.ts"));
6900
+ const known = new Set(files);
6901
+ const sink = join2(root, LOG_SINK_PATH);
6902
+ const producers = new Set([LOG_SINK_PATH]);
6903
+ const imports = new Map;
6904
+ for (const file of files) {
6905
+ const deps = [];
6906
+ for (const record of extractImportRecords(readFileSync4(file, "utf8"))) {
6907
+ const target = resolveRelativeImport(file, record.specifier, known);
6908
+ if (target === null)
6909
+ continue;
6910
+ deps.push(relative(root, target));
6911
+ if (target === sink && record.kind === "named" && record.names.some((n) => LOG_SINK_PRODUCER_NAMES.includes(n))) {
6912
+ producers.add(relative(root, file));
6913
+ }
6914
+ }
6915
+ imports.set(relative(root, file), deps);
6916
+ }
6917
+ return { producers, imports };
6918
+ }
6919
+
6439
6920
  // src/checks/contract.ts
6440
6921
  var CHECK_SCHEMA_VERSION = 1;
6441
6922
  function emitCheckError(error) {
@@ -6444,19 +6925,19 @@ function emitCheckError(error) {
6444
6925
  }
6445
6926
 
6446
6927
  // src/checks/registry.ts
6447
- import { existsSync as existsSync2 } from "node:fs";
6448
- import { join as join2 } from "node:path";
6928
+ import { join as join4, relative as relative2, sep } from "node:path";
6929
+ import { fileURLToPath as fileURLToPath2 } from "node:url";
6449
6930
 
6450
6931
  // src/lib/package-root.ts
6451
- import { existsSync } from "node:fs";
6452
- import { dirname, join } from "node:path";
6932
+ import { existsSync as existsSync2 } from "node:fs";
6933
+ import { dirname as dirname2, join as join3 } from "node:path";
6453
6934
  import { fileURLToPath } from "node:url";
6454
6935
  function packageRoot(moduleUrl) {
6455
- let dir = dirname(fileURLToPath(moduleUrl));
6456
- while (!existsSync(join(dir, "package.json"))) {
6457
- if (existsSync(join(dir, ".git")))
6936
+ let dir = dirname2(fileURLToPath(moduleUrl));
6937
+ while (!existsSync2(join3(dir, "package.json"))) {
6938
+ if (existsSync2(join3(dir, ".git")))
6458
6939
  break;
6459
- const parent = dirname(dir);
6940
+ const parent = dirname2(dir);
6460
6941
  if (parent === dir)
6461
6942
  break;
6462
6943
  dir = parent;
@@ -6465,12 +6946,16 @@ function packageRoot(moduleUrl) {
6465
6946
  }
6466
6947
 
6467
6948
  // src/checks/registry.ts
6468
- var DIST_BIN_DIR = join2(packageRoot(import.meta.url), "dist", "checks", "bin");
6469
- var SRC_BIN_DIR = join2(packageRoot(import.meta.url), "src", "checks", "bin");
6470
- var BIN_DIR = existsSync2(DIST_BIN_DIR) ? DIST_BIN_DIR : SRC_BIN_DIR;
6471
- var BIN_EXT = BIN_DIR === DIST_BIN_DIR ? ".js" : ".ts";
6949
+ function resolveCheckBin(packageDir, moduleUrl) {
6950
+ const fromPackage = relative2(packageDir, fileURLToPath2(moduleUrl));
6951
+ const bundled = fromPackage === "dist" || fromPackage.startsWith(`dist${sep}`);
6952
+ return bundled ? { dir: join4(packageDir, "dist", "checks", "bin"), ext: ".js" } : { dir: join4(packageDir, "src", "checks", "bin"), ext: ".ts" };
6953
+ }
6954
+ var CHECK_BIN = resolveCheckBin(packageRoot(import.meta.url), import.meta.url);
6955
+ var BIN_DIR = CHECK_BIN.dir;
6956
+ var BIN_EXT = CHECK_BIN.ext;
6472
6957
  function bin(name) {
6473
- return join2(BIN_DIR, `${name}${BIN_EXT}`);
6958
+ return join4(BIN_DIR, `${name}${BIN_EXT}`);
6474
6959
  }
6475
6960
  var REGISTRY = [
6476
6961
  [
@@ -6512,6 +6997,8 @@ var REGISTRY = [
6512
6997
  timeoutMs: 15000,
6513
6998
  env: {
6514
6999
  BASE_SHA: { optional: true },
7000
+ GIT_INDEX_FILE: { optional: true },
7001
+ VINAYA_COMMIT_HOOK: { optional: true },
6515
7002
  PR_BODY: { optional: true },
6516
7003
  PR_BODY_FILE: { optional: true },
6517
7004
  PR_NUMBER: { optional: true },
@@ -6666,23 +7153,6 @@ var REGISTRY = [
6666
7153
  },
6667
7154
  1
6668
7155
  ],
6669
- [
6670
- {
6671
- name: "token-report",
6672
- validates: "body",
6673
- run: bin("check-token-report"),
6674
- scope: "diff",
6675
- timeoutMs: 15000,
6676
- requiresOpenPr: true,
6677
- env: {
6678
- PR_BODY: { optional: true },
6679
- BRANCH: { optional: true },
6680
- CLAUDE_PROJECT_DIR: { optional: true },
6681
- CLAUDE_CODE_SESSION_ID: { optional: true }
6682
- }
6683
- },
6684
- 1
6685
- ],
6686
7156
  [
6687
7157
  {
6688
7158
  name: "no-disk-state",
@@ -7033,43 +7503,29 @@ var CHECK_NAME = "registry-gates";
7033
7503
  var ENFORCEMENT_PATH = "aeg-root/enforcement.md";
7034
7504
  var ROLES_DIR = "aeg-root/roles";
7035
7505
  var CONTRACTS_DIR = "aeg-root/contracts";
7036
- function isGithubCrossingLine(line) {
7037
- const createMatch = /\bgh\s+(pr|issue)\s+create\b/.test(line);
7038
- const editWithBodyOrTitle = /\bgh\s+(pr|issue)\s+edit\b/.test(line) && /--body\b|--body-file\b|--title\b|(?:^|\s)-b(?:\s|$)|(?:^|\s)-F(?:\s|$)|(?:^|\s)-t(?:\s|$)/.test(line);
7039
- const apiPost = /\bgh\s+api\b/.test(line) && /-X\s*POST\b|--method\s*POST\b|(?:^|\s)-f(?:\s|$)|(?:^|\s)-F(?:\s|$)/.test(line) && /(\/pulls|\/issues)(["'\s]|$)/.test(line);
7040
- const apiPatch = /\bgh\s+api\b/.test(line) && /-X\s*PATCH\b|--method\s*PATCH\b/.test(line) && /(\/pulls|\/issues)\/[0-9]+(["'\s]|$)/.test(line);
7041
- const curlWrite = /\b(curl|wget)\b/.test(line) && /api\.github\.com/.test(line) && /(\/pulls|\/issues)/.test(line) && /-X\s*(POST|PATCH|PUT)\b|--method\s*(POST|PATCH|PUT)\b|--data\b|(?:^|\s)-d(?:\s|$)|--json\b|--post-data\b/.test(line);
7042
- return createMatch || editWithBodyOrTitle || apiPost || apiPatch || curlWrite;
7043
- }
7044
- function globCandidateFiles() {
7506
+ var DOCTRINE_DIR = "aeg-root";
7507
+ function readHookScanFiles(dir) {
7045
7508
  const out = [];
7046
- if (existsSync3(".husky")) {
7047
- for (const name of readdirSync(".husky")) {
7048
- if (name === "_")
7049
- continue;
7050
- const rel = `.husky/${name}`;
7051
- if (statSync(rel).isFile())
7052
- out.push(rel);
7053
- }
7054
- }
7055
- if (existsSync3(".claude/hooks")) {
7056
- for (const name of readdirSync(".claude/hooks")) {
7057
- if (name.endsWith(".sh"))
7058
- out.push(`.claude/hooks/${name}`);
7059
- }
7509
+ for (const entry of readdirSync3(dir, { withFileTypes: true })) {
7510
+ const rel = join5(dir, entry.name);
7511
+ if (entry.isDirectory())
7512
+ out.push(...readHookScanFiles(rel));
7513
+ else if (entry.name.endsWith(".md"))
7514
+ out.push({ path: rel, content: readFileSync5(rel, "utf8") });
7060
7515
  }
7061
7516
  return out;
7062
7517
  }
7063
- function findCrossingFiles(candidateFiles) {
7064
- return candidateFiles.filter((path) => readFileSync2(path, "utf8").split(`
7065
- `).some((line) => isGithubCrossingLine(line)));
7518
+ function shippedHookPaths() {
7519
+ const tracked = sh("git ls-files").split(`
7520
+ `).filter(Boolean);
7521
+ return new Set([...tracked, ...initHookPaths()]);
7066
7522
  }
7067
7523
  function readRoles() {
7068
7524
  if (!existsSync3(ROLES_DIR))
7069
7525
  return [];
7070
- return readdirSync(ROLES_DIR).filter((name) => name.endsWith(".md")).map((name) => {
7526
+ return readdirSync3(ROLES_DIR).filter((name) => name.endsWith(".md")).map((name) => {
7071
7527
  const rel = `${ROLES_DIR}/${name}`;
7072
- const { data } = matter2(readFileSync2(rel, "utf8"));
7528
+ const { data } = matter2(readFileSync5(rel, "utf8"));
7073
7529
  return {
7074
7530
  file: rel,
7075
7531
  role_id: typeof data.role_id === "string" ? data.role_id : "",
@@ -7081,9 +7537,9 @@ function readRoles() {
7081
7537
  function readContracts() {
7082
7538
  if (!existsSync3(CONTRACTS_DIR))
7083
7539
  return [];
7084
- return readdirSync(CONTRACTS_DIR).filter((name) => name.endsWith(".md")).map((name) => {
7540
+ return readdirSync3(CONTRACTS_DIR).filter((name) => name.endsWith(".md")).map((name) => {
7085
7541
  const rel = `${CONTRACTS_DIR}/${name}`;
7086
- const { data } = matter2(readFileSync2(rel, "utf8"));
7542
+ const { data } = matter2(readFileSync5(rel, "utf8"));
7087
7543
  return {
7088
7544
  file: rel,
7089
7545
  producer: typeof data.producer === "string" ? data.producer : "",
@@ -7164,7 +7620,7 @@ async function main() {
7164
7620
  });
7165
7621
  process.exit(0);
7166
7622
  }
7167
- const enforcementContent = readFileSync2(ENFORCEMENT_PATH, "utf8");
7623
+ const enforcementContent = readFileSync5(ENFORCEMENT_PATH, "utf8");
7168
7624
  const rows = parseEnforcementRegistry(enforcementContent);
7169
7625
  const ring0Rows = rows.filter((r) => r.ring === "ring0");
7170
7626
  const candidateFiles = globCandidateFiles();
@@ -7182,18 +7638,29 @@ async function main() {
7182
7638
  }
7183
7639
  ]
7184
7640
  };
7185
- const g1 = checkG1(rows, existsSync3);
7641
+ const g1 = checkG1(rows, existsSync3, { docs: readHookScanFiles(DOCTRINE_DIR), shipped: shippedHookPaths() });
7186
7642
  const g2 = checkG2(rows, candidateFiles);
7187
7643
  const g3 = checkG3(ring0Rows, crossingFiles);
7188
7644
  const g5 = checkG5(roles, contracts);
7189
7645
  const g6 = checkG6(rows, new Set(coreCheckRegistry().map((s) => s.name)));
7646
+ const { producers, imports } = gatherLogProducerGraph(process.cwd());
7647
+ const g7 = checkG7({
7648
+ enforcementMapPresent: true,
7649
+ crossingFiles,
7650
+ blockingFiles: blockingGateFiles(ring0Rows, existsSync3),
7651
+ producers,
7652
+ imports,
7653
+ exemptions: G7_EXEMPTIONS,
7654
+ existsFn: existsSync3
7655
+ });
7190
7656
  emitResult(g1, true);
7191
7657
  emitResult(g2, true);
7192
7658
  emitResult(g3, true);
7193
7659
  emitResult(g4Result, true);
7194
7660
  emitResult(g5, true);
7195
7661
  emitResult(g6, true);
7196
- const blockingFailed = [g1, g2, g3, g4Result, g5, g6].some((r) => r.status === "fail");
7662
+ emitResult(g7, true);
7663
+ const blockingFailed = [g1, g2, g3, g4Result, g5, g6, g7].some((r) => r.status === "fail");
7197
7664
  process.exit(blockingFailed ? 1 : 0);
7198
7665
  }
7199
7666
  main();