@attalabs/vinaya 0.36.0 → 0.37.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.
- package/README.md +6 -6
- package/aeg-root/contracts/developer-reviewer.md +1 -1
- package/aeg-root/contracts/planner-operator.md +1 -1
- package/aeg-root/contracts/principal-operator.md +6 -6
- package/aeg-root/contracts/security-archivist.md +1 -1
- package/aeg-root/enforcement.md +9 -10
- package/aeg-root/process.md +3 -1
- package/aeg-root/roles/archivist.md +2 -2
- package/aeg-root/roles/developer/reference.md +13 -16
- package/aeg-root/roles/developer.md +7 -3
- package/aeg-root/roles/operator.md +18 -18
- package/aeg-root/roles/planner/reference.md +4 -4
- package/aeg-root/roles/principal.md +6 -1
- package/aeg-root/roles/reviewer.md +9 -3
- package/aeg-root/roles/security.md +19 -9
- package/aeg-root/roles/tranche-archivist.md +14 -2
- package/aeg-root/state-machine.md +11 -10
- package/aeg-root/templates/brief-template.md +6 -4
- package/aeg-root/templates/pr-report-template.md +1 -9
- package/aeg-root/tranche-model.md +4 -4
- package/dist/checks/bin/check-body-bare-digits.js +685 -584
- package/dist/checks/bin/check-branch-topology.js +626 -466
- package/dist/checks/bin/check-brief-shape.js +686 -585
- package/dist/checks/bin/check-changeset-coverage.js +1161 -731
- package/dist/checks/bin/check-closes-n.js +626 -466
- package/dist/checks/bin/check-coherence.js +744 -599
- package/dist/checks/bin/check-dead-branch-push.js +567 -451
- package/dist/checks/bin/check-dispatch-readiness.js +747 -602
- package/dist/checks/bin/check-doc-coverage-push.js +1160 -730
- package/dist/checks/bin/check-doc-coverage.js +1160 -730
- package/dist/checks/bin/check-doctrine-no-procedures.js +683 -582
- package/dist/checks/bin/check-doctrine-portability.js +1160 -730
- package/dist/checks/bin/check-evidence-fresh.js +1167 -906
- package/dist/checks/bin/check-exec-bits.js +1159 -729
- package/dist/checks/bin/check-first-push-dispatch.js +747 -602
- package/dist/checks/bin/check-issue-assignment.js +626 -466
- package/dist/checks/bin/check-issue-milestone-attach.js +567 -451
- package/dist/checks/bin/check-issue-objectives-numbering.js +683 -582
- package/dist/checks/bin/check-issue-parts-coverage.js +567 -451
- package/dist/checks/bin/check-issue-surface-globs.js +755 -601
- package/dist/checks/bin/check-issue-title-grammar.js +567 -451
- package/dist/checks/bin/check-issue-tranche-label.js +567 -451
- package/dist/checks/bin/check-main-branch-refusal.js +567 -451
- package/dist/checks/bin/check-no-disk-state.js +567 -451
- package/dist/checks/bin/check-pr-premise-reassert.js +683 -582
- package/dist/checks/bin/check-pr-report-density.js +567 -451
- package/dist/checks/bin/check-principal-test-plan-wait.js +567 -451
- package/dist/checks/bin/check-quoted-command.js +1644 -1216
- package/dist/checks/bin/check-reader-resolvable-prose.js +1663 -1223
- package/dist/checks/bin/check-registry-gates.js +610 -481
- package/dist/checks/bin/check-retired-vocabulary.js +1638 -1210
- package/dist/checks/bin/check-review-gate.js +694 -593
- package/dist/checks/bin/check-single-plan-pr.js +567 -451
- package/dist/checks/bin/check-surface-scope.js +626 -466
- package/dist/checks/bin/check-test-plan.js +567 -451
- package/dist/checks/bin/check-token-collection-wired.js +567 -451
- package/dist/checks/bin/check-workspace-escape.js +1160 -730
- package/dist/index.js +13507 -7975
- package/dist/lib/pre-push-cache-test-run.js +1004 -681
- package/dist/lib/pre-push-select-tests.js +609 -480
- package/package.json +2 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/brief-render.ts +38 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/control-store/records.ts +19 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/assess-round.ts +233 -8
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/fakes.ts +7 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/index.ts +1 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/render-summary.ts +38 -3
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/types.ts +113 -4
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/doc-claim.ts +32 -6
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/index.ts +26 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/issue-validation.ts +747 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/schema.ts +8 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-gate.ts +52 -4
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-policy.ts +163 -21
- package/studio-standalone/apps/vinaya-studio/web/.next/BUILD_ID +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/app-path-routes-manifest.json +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/build-manifest.json +3 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/prerender-manifest.json +3 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/required-server-files.json +0 -5
- package/studio-standalone/apps/vinaya-studio/web/.next/routes-manifest.json +0 -6
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error/page.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.html +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_not-found/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_not-found/page.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/page.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/backlog/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/backlog/page.js +3 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/backlog/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/backlog/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/page.js +3 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/page.js +3 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/page/server-reference-manifest.json +3 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/page.js +5 -5
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/tasks/[taskId]/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/tasks/[taskId]/page.js +3 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/tasks/[taskId]/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/page.js +3 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/tranches/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/tranches/page.js +3 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/tranches/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/tranches/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app-paths-manifest.json +0 -1
- 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
- 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
- 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
- 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
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/{_15gdg48._.js → [root-of-the-server]__04adkz-._.js} +3 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__05zwn98._.js +14 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__08e39jo._.js +3 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__0ls23oh._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__10riywf._.js +3 -0
- 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
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/{[root-of-the-server]__1wy7w66._.js → [root-of-the-server]__14ui9sz._.js} +2 -2
- 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
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1f4bb3_._.js +3 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1gjqmhq._.js +1 -1
- 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
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1ng2x88._.js +3 -0
- 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
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1snpgaw._.js +56 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1wc4-ip._.js +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_06h3wbl._.js +3 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_08onyya._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_096f46i._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0af2one._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0e5tkdd._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0gs4gvl._.js +3 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0kf2g72._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0zf4d27._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1-wo68i._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_121lrn5._.js +3 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1achbh9._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1o4v6lb._.js +3 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1q7h5mz._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1ztd4i3._.js +3 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_209-ugd._.js +3 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_214d71c._.js +3 -0
- 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
- 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
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/node_modules_next_dist_1lzmr5o._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/packages_ui_libraries_animate_components_index_ts_186fje1._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/packages_ui_libraries_basic_components_index_ts_0xk1vda._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/middleware-build-manifest.js +3 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/pages/500.html +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/server-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/server-reference-manifest.json +4 -4
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/09fcolor69bun.js +1 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/0lcwmwzxacdie.js +1 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/0ojry7lrbzkfd.css +1 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{00z3-ljjd1gj9.js → 0vtfb0g813gki.js} +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/1giu47hrbhroj.js +1 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/1shz6lwruld25.js +1 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/1ytvuy1mmnc6j.js +1 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{3oxhhhm_psozq.js → 21a6_5cr956wj.js} +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/2g8mwnydod96u.js +1 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{3li0ueedy-ozv.js → 2nrnuawd5fwpv.js} +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/2nw47832_uvfe.js +1 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/2qdxnj8wk2h0s.js +1 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/3b9q75p-z5ma5.js +1 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/3cv-oe7153242.js +1 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{3lqjwjrcvq481.js → 3l56x8wjdzvaw.js} +5 -5
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/3m310lbjj4p5u.js +1 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{2o9l0b7eqbr57.js → 3qtt1v3ya-ofe.js} +1 -1
- package/studio-standalone/apps/vinaya-studio/web/package.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/server.js +1 -1
- 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
- package/studio-standalone/_node_modules/next/dist/compiled/next-server/app-route-turbo.runtime.prod.js +0 -6
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/api/coherence/route/app-paths-manifest.json +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/api/coherence/route/build-manifest.json +0 -9
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/api/coherence/route/server-reference-manifest.json +0 -4
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/api/coherence/route.js +0 -6
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/api/coherence/route.js.map +0 -5
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/api/coherence/route.js.nft.json +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/api/coherence/route_client-reference-manifest.js +0 -3
- 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
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/[externals]__0cki-x_._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/[root-of-the-server]__02a-3g8._.js +0 -15
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/[turbopack]_runtime.js +0 -903
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__074w9nf._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__0ln09ua._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__0oegopp._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__13yxbjd._.js +0 -51
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1duqmtm._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1z7dml9._.js +0 -9
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0bfs_u4._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0g8_eot._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0hrh_v-._.js +0 -181
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0i4-dea._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0o54suy._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0rxd7s0._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0y1jv16._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_151m4rz._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1a9dieq._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1sxsf5q._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1sy_yfr._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_219v2an._.js +0 -3
- 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
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/packages_ui_libraries_basic_components_form_input_tsx_0es8d8b._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/packages_ui_libraries_brutal_components_index_ts_0n_lcc4._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/packages_ui_libraries_retro_components_index_ts_0wvpm_z._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/0bjnj-5fy4e7l.js +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/0c8uwz_-m8s99.js +0 -165
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/0ct0c-xj0baf6.js +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/0ko698wh8xx2g.css +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/0t5n_r4xm__t-.js +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/0vc2u252q5q6o.js +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/16r_o07lw0vm0.js +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/1cah7_e5a1zvu.js +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/1gjo9-6dz7nup.js +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/24tz8aro1uto4.js +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/2ef2g5fozszw7.js +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/2ka8dg687auhj.js +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/2pf3f50gbrkyv.js +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/2qq49pct3q51-.js +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/3et66z7glk65w.js +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/3y6u3prmrkea-.js +0 -1
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{z1fTSBP6ZlUjObzFIp-qq → yR5RsCxb1OGnYggiaO09S}/_buildManifest.js +0 -0
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{z1fTSBP6ZlUjObzFIp-qq → yR5RsCxb1OGnYggiaO09S}/_clientMiddlewareManifest.js +0 -0
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{z1fTSBP6ZlUjObzFIp-qq → yR5RsCxb1OGnYggiaO09S}/_ssgManifest.js +0 -0
|
@@ -1884,45 +1884,6 @@ var DERIVED_STATUSES = [
|
|
|
1884
1884
|
"incoherent"
|
|
1885
1885
|
];
|
|
1886
1886
|
var DERIVABLE_STATUSES = DERIVED_STATUSES.filter((s) => s !== "backlog");
|
|
1887
|
-
// ../../packages/aeg-core/src/parse-ledger.ts
|
|
1888
|
-
function rowFromCells(cells) {
|
|
1889
|
-
if (cells.length < 7)
|
|
1890
|
-
return null;
|
|
1891
|
-
const phase = (cells[0] ?? "").trim();
|
|
1892
|
-
if (!phase)
|
|
1893
|
-
return null;
|
|
1894
|
-
return {
|
|
1895
|
-
phase,
|
|
1896
|
-
role: (cells[1] ?? "").trim(),
|
|
1897
|
-
agentModel: (cells[2] ?? "").trim(),
|
|
1898
|
-
tokensIn: parseIntCell(cells[3] ?? ""),
|
|
1899
|
-
tokensOut: parseIntCell(cells[4] ?? ""),
|
|
1900
|
-
cost: parseCostCell(cells[5] ?? ""),
|
|
1901
|
-
date: (cells[6] ?? "").trim()
|
|
1902
|
-
};
|
|
1903
|
-
}
|
|
1904
|
-
function parseIntCell(cell) {
|
|
1905
|
-
const trimmed = cell.replace(/`/g, "").trim();
|
|
1906
|
-
if (!trimmed || isEmDashOrDash(trimmed))
|
|
1907
|
-
return null;
|
|
1908
|
-
const normalized = trimmed.replace(/[,_\s]/g, "");
|
|
1909
|
-
if (!/^-?\d+$/.test(normalized))
|
|
1910
|
-
return null;
|
|
1911
|
-
return Number(normalized);
|
|
1912
|
-
}
|
|
1913
|
-
function parseCostCell(cell) {
|
|
1914
|
-
const trimmed = cell.replace(/`/g, "").trim();
|
|
1915
|
-
if (!trimmed || isEmDashOrDash(trimmed))
|
|
1916
|
-
return null;
|
|
1917
|
-
const normalized = trimmed.replace(/^\$/, "").replace(/[,_\s]/g, "");
|
|
1918
|
-
if (!/^-?\d+(\.\d+)?$/.test(normalized))
|
|
1919
|
-
return null;
|
|
1920
|
-
return Number(normalized);
|
|
1921
|
-
}
|
|
1922
|
-
function isEmDashOrDash(s) {
|
|
1923
|
-
const t = s.trim();
|
|
1924
|
-
return t === "—" || t === "-" || t === "–";
|
|
1925
|
-
}
|
|
1926
1887
|
// ../../packages/aeg-core/src/waiver-label.ts
|
|
1927
1888
|
var WAIVER_LABEL = label("waiver-docs");
|
|
1928
1889
|
var WAIVER_LABEL_REVIEW = label("waiver-review");
|
|
@@ -1938,61 +1899,6 @@ function isWaiverLabelActorVerified(opts) {
|
|
|
1938
1899
|
return false;
|
|
1939
1900
|
return isPrincipal(opts.labelActor, opts.principalAllowlist);
|
|
1940
1901
|
}
|
|
1941
|
-
|
|
1942
|
-
// ../../packages/aeg-core/src/parse-token-report.ts
|
|
1943
|
-
var TOKEN_REPORT_HEADING = /^\s*(?:#{1,6}\s*Token report\s*|\*\*Token report\*\*)\s*$/i;
|
|
1944
|
-
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;
|
|
1945
|
-
function parseTokenReportEntries(body) {
|
|
1946
|
-
const lines = body.split(/\r?\n/);
|
|
1947
|
-
const headingIdxs = [];
|
|
1948
|
-
lines.forEach((line, i) => {
|
|
1949
|
-
if (TOKEN_REPORT_HEADING.test(line))
|
|
1950
|
-
headingIdxs.push(i);
|
|
1951
|
-
});
|
|
1952
|
-
const out = [];
|
|
1953
|
-
for (let h = 0;h < headingIdxs.length; h++) {
|
|
1954
|
-
const start = headingIdxs[h] + 1;
|
|
1955
|
-
const end = h + 1 < headingIdxs.length ? headingIdxs[h + 1] : lines.length;
|
|
1956
|
-
const section = lines.slice(start, end).join(`
|
|
1957
|
-
`);
|
|
1958
|
-
const tableRows = parseTableSection(section);
|
|
1959
|
-
if (tableRows.length > 0) {
|
|
1960
|
-
out.push(...tableRows);
|
|
1961
|
-
continue;
|
|
1962
|
-
}
|
|
1963
|
-
const inlineRow = parseInlineFieldList(section);
|
|
1964
|
-
if (inlineRow)
|
|
1965
|
-
out.push(inlineRow);
|
|
1966
|
-
}
|
|
1967
|
-
return out;
|
|
1968
|
-
}
|
|
1969
|
-
function parseTableSection(section) {
|
|
1970
|
-
const lines = section.split(/\r?\n/);
|
|
1971
|
-
let i = 0;
|
|
1972
|
-
for (;i < lines.length; i++) {
|
|
1973
|
-
if ((lines[i] ?? "").trim().startsWith("|"))
|
|
1974
|
-
break;
|
|
1975
|
-
}
|
|
1976
|
-
if (i + 1 >= lines.length)
|
|
1977
|
-
return [];
|
|
1978
|
-
i += 2;
|
|
1979
|
-
const out = [];
|
|
1980
|
-
for (;i < lines.length; i++) {
|
|
1981
|
-
const trimmed = (lines[i] ?? "").trim();
|
|
1982
|
-
if (!trimmed.startsWith("|"))
|
|
1983
|
-
break;
|
|
1984
|
-
const row = rowFromCells(splitTableRow(trimmed));
|
|
1985
|
-
if (row)
|
|
1986
|
-
out.push(row);
|
|
1987
|
-
}
|
|
1988
|
-
return out;
|
|
1989
|
-
}
|
|
1990
|
-
function parseInlineFieldList(section) {
|
|
1991
|
-
const m = section.match(INLINE_FIELD_LIST);
|
|
1992
|
-
if (!m)
|
|
1993
|
-
return null;
|
|
1994
|
-
return rowFromCells([m[1], m[2], m[3], m[4], m[5], m[6], m[7]]);
|
|
1995
|
-
}
|
|
1996
1902
|
// ../../packages/aeg-core/src/verdict-extraction.ts
|
|
1997
1903
|
var HEAD_SHA_PATTERN = /^[ \t]*(?:\*{1,3}|_{1,3})?Judged head:\s*([0-9a-f]{7,40})(?![A-Za-z0-9])/im;
|
|
1998
1904
|
var OBJECTIVES_VERSION_PATTERN = /^[ \t]*(?:\*{1,3}|_{1,3})?Objectives version:\s*([0-9a-f]{64})(?![A-Za-z0-9])/im;
|
|
@@ -2441,10 +2347,12 @@ function evaluateC5(changed, docOwnersContent, prBody, fileExists, waiverActive,
|
|
|
2441
2347
|
var CODE_REVIEW_SEVERITY_ORDER = ["BLOCKER", "MAJOR", "MINOR"];
|
|
2442
2348
|
var SECURITY_SEVERITY_ORDER = ["CRITICAL", "HIGH", "MEDIUM", "LOW"];
|
|
2443
2349
|
var DEFAULT_MAX_ROUNDS = 3;
|
|
2350
|
+
var DEFAULT_MAX_TASK_MINUTES = 180;
|
|
2444
2351
|
var DEFAULT_REVIEW_POLICY = {
|
|
2445
2352
|
codeReviewThreshold: "BLOCKER",
|
|
2446
2353
|
securityThreshold: "HIGH",
|
|
2447
|
-
maxRounds: DEFAULT_MAX_ROUNDS
|
|
2354
|
+
maxRounds: DEFAULT_MAX_ROUNDS,
|
|
2355
|
+
maxTaskMinutes: DEFAULT_MAX_TASK_MINUTES
|
|
2448
2356
|
};
|
|
2449
2357
|
var FILE_SHAPED_LOCATION = /\.[a-zA-Z0-9]{1,10}(:\d+)?\s*$/;
|
|
2450
2358
|
var PROSE_LOCATION_PATTERNS = [/\bpr\s*body\b/i, /\bcomment\b/i];
|
|
@@ -2845,11 +2753,13 @@ function checkDocUpdateList(prBody) {
|
|
|
2845
2753
|
return headingCheck(prBody, "(?:documentation|doc)[- ]update(?:\\s+list)?", "Documentation-update list");
|
|
2846
2754
|
}
|
|
2847
2755
|
function checkWorktreeStep0(prBody) {
|
|
2848
|
-
if (/git worktree add/.test(prBody))
|
|
2756
|
+
if (/git worktree add/.test(prBody) || /cd \.worktrees\//.test(prBody) || /bun install --frozen-lockfile/.test(prBody))
|
|
2849
2757
|
return { status: "pass", errors: [] };
|
|
2850
2758
|
return {
|
|
2851
2759
|
status: "fail",
|
|
2852
|
-
errors: [
|
|
2760
|
+
errors: [
|
|
2761
|
+
"brief-validation worktree Step 0: no `git worktree add`, `cd .worktrees/`, or `bun install --frozen-lockfile` command found in the PR body."
|
|
2762
|
+
]
|
|
2853
2763
|
};
|
|
2854
2764
|
}
|
|
2855
2765
|
function checkStopConditions(prBody) {
|
|
@@ -3039,7 +2949,8 @@ function isCommandBlock(content) {
|
|
|
3039
2949
|
return COMMAND_WORDS.includes(commandWordOf(firstNonBlankLine(content)));
|
|
3040
2950
|
}
|
|
3041
2951
|
function isStep0Block(content) {
|
|
3042
|
-
|
|
2952
|
+
const first = firstNonBlankLine(content);
|
|
2953
|
+
return first.startsWith("git worktree add") || first.startsWith("cd .worktrees/") || first.startsWith("bun install --frozen-lockfile");
|
|
3043
2954
|
}
|
|
3044
2955
|
function checkCommandsCarryOutput(prBody) {
|
|
3045
2956
|
const errors = [];
|
|
@@ -3508,10 +3419,14 @@ function legacySlugPattern(legacySlugs) {
|
|
|
3508
3419
|
const alternation = legacySlugs.map((s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|");
|
|
3509
3420
|
return new RegExp(`(^|[^a-zA-Z0-9\\n-])(${alternation})([^a-zA-Z0-9\\n-]|$)`, "g");
|
|
3510
3421
|
}
|
|
3422
|
+
function specGrandfatherPaths(specGrandfather) {
|
|
3423
|
+
return Array.isArray(specGrandfather) ? [...specGrandfather] : Object.keys(specGrandfather);
|
|
3424
|
+
}
|
|
3511
3425
|
function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = [], specPaths = DEFAULT_SPEC_PATHS) {
|
|
3512
3426
|
const findings = [];
|
|
3513
3427
|
const legacyPattern = legacySlugPattern(legacySlugs);
|
|
3514
|
-
const
|
|
3428
|
+
const grandfatheredWhole = new Set(Array.isArray(specGrandfather) ? specGrandfather : []);
|
|
3429
|
+
const limits = new Map(Array.isArray(specGrandfather) ? [] : Object.entries(specGrandfather));
|
|
3515
3430
|
const patterns = [
|
|
3516
3431
|
{ pattern: FORGE_NUMBER_PATTERN, what: "a forge number" },
|
|
3517
3432
|
{ pattern: TRANCHE_SLUG_VN_PATTERN, what: "an internal tranche slug" },
|
|
@@ -3530,18 +3445,19 @@ function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuff
|
|
|
3530
3445
|
continue;
|
|
3531
3446
|
if (cls !== "product" && cls !== "spec" && !SWEPT_CLASSES.has(cls))
|
|
3532
3447
|
continue;
|
|
3533
|
-
if (cls === "spec" &&
|
|
3448
|
+
if (cls === "spec" && grandfatheredWhole.has(file.path))
|
|
3534
3449
|
continue;
|
|
3535
3450
|
const blocking = cls === "product" || cls === "spec";
|
|
3536
3451
|
const scrubbed = cls === "product" ? stripNonProseForProduct(file.path, file.content) : stripNonProse(file.path, file.content);
|
|
3537
3452
|
const patternsToRun = cls === "product" ? productPatterns : cls === "spec" ? specPatterns : patterns;
|
|
3453
|
+
const fileFindings = [];
|
|
3538
3454
|
for (const { pattern, what, group } of patternsToRun) {
|
|
3539
3455
|
pattern.lastIndex = 0;
|
|
3540
3456
|
let match = pattern.exec(scrubbed);
|
|
3541
3457
|
while (match !== null) {
|
|
3542
3458
|
const cited = group !== undefined ? match[group] ?? match[0] : match[0];
|
|
3543
3459
|
const citedIndex = match.index + match[0].indexOf(cited);
|
|
3544
|
-
|
|
3460
|
+
fileFindings.push({
|
|
3545
3461
|
file: file.path,
|
|
3546
3462
|
line: lineAt(scrubbed, citedIndex),
|
|
3547
3463
|
message: `references ${what} ("${cited}") a reader outside this repo's tracker cannot resolve`,
|
|
@@ -3550,6 +3466,15 @@ function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuff
|
|
|
3550
3466
|
match = pattern.exec(scrubbed);
|
|
3551
3467
|
}
|
|
3552
3468
|
}
|
|
3469
|
+
const limit = cls === "spec" ? limits.get(file.path) : undefined;
|
|
3470
|
+
if (limit !== undefined) {
|
|
3471
|
+
if (fileFindings.length <= limit)
|
|
3472
|
+
continue;
|
|
3473
|
+
for (const f of fileFindings) {
|
|
3474
|
+
f.message += `; ${file.path} carries ${fileFindings.length} such findings, over its proseGates.specGrandfather limit of ${limit}`;
|
|
3475
|
+
}
|
|
3476
|
+
}
|
|
3477
|
+
findings.push(...fileFindings);
|
|
3553
3478
|
}
|
|
3554
3479
|
return findings;
|
|
3555
3480
|
}
|
|
@@ -4509,8 +4434,7 @@ function briefHash(brief) {
|
|
|
4509
4434
|
function policyDigest(policy) {
|
|
4510
4435
|
return createHash4("sha256").update(JSON.stringify({
|
|
4511
4436
|
codeReviewThreshold: policy.codeReviewThreshold,
|
|
4512
|
-
securityThreshold: policy.securityThreshold
|
|
4513
|
-
maxRounds: policy.maxRounds
|
|
4437
|
+
securityThreshold: policy.securityThreshold
|
|
4514
4438
|
})).digest("hex");
|
|
4515
4439
|
}
|
|
4516
4440
|
function isBoundToHead(echoed, headSha) {
|
|
@@ -4823,7 +4747,46 @@ function parseEnforcementRegistry(content) {
|
|
|
4823
4747
|
return result;
|
|
4824
4748
|
}
|
|
4825
4749
|
// ../../packages/aeg-core/src/registry-checks.ts
|
|
4826
|
-
|
|
4750
|
+
var HOOK_DIR_PREFIXES = [".claude/hooks/", ".vinaya/hooks/", ".husky/", ".git/hooks/"];
|
|
4751
|
+
var BARE_HOOK_NAME = /^check-[A-Za-z0-9_.-]*\.sh$/;
|
|
4752
|
+
function basename(path) {
|
|
4753
|
+
return path.slice(path.lastIndexOf("/") + 1);
|
|
4754
|
+
}
|
|
4755
|
+
function lineOf(content, index) {
|
|
4756
|
+
let line = 1;
|
|
4757
|
+
for (let i = 0;i < index; i++)
|
|
4758
|
+
if (content.charCodeAt(i) === 10)
|
|
4759
|
+
line++;
|
|
4760
|
+
return line;
|
|
4761
|
+
}
|
|
4762
|
+
function findUnshippedHookRefs(docs, shipped) {
|
|
4763
|
+
const shippedNames = new Set([...shipped].map(basename));
|
|
4764
|
+
const findings = [];
|
|
4765
|
+
const flag = (doc, token, index) => {
|
|
4766
|
+
findings.push({
|
|
4767
|
+
path: doc.path,
|
|
4768
|
+
reason: `${doc.path}:${lineOf(doc.content, index)} names hook "${token}", which is neither tracked in git nor emitted by \`vinaya init\``
|
|
4769
|
+
});
|
|
4770
|
+
};
|
|
4771
|
+
for (const doc of docs) {
|
|
4772
|
+
for (const { cited, index } of extractCitedPaths(doc.content)) {
|
|
4773
|
+
if (cited.endsWith("/") || !HOOK_DIR_PREFIXES.some((p) => cited.startsWith(p)))
|
|
4774
|
+
continue;
|
|
4775
|
+
if (!shipped.has(cited))
|
|
4776
|
+
flag(doc, cited, index);
|
|
4777
|
+
}
|
|
4778
|
+
const spanPattern = /`([^`\n]+)`/g;
|
|
4779
|
+
let match = spanPattern.exec(doc.content);
|
|
4780
|
+
while (match !== null) {
|
|
4781
|
+
const token = match[1] ?? "";
|
|
4782
|
+
if (BARE_HOOK_NAME.test(token) && !shippedNames.has(token))
|
|
4783
|
+
flag(doc, token, match.index);
|
|
4784
|
+
match = spanPattern.exec(doc.content);
|
|
4785
|
+
}
|
|
4786
|
+
}
|
|
4787
|
+
return findings;
|
|
4788
|
+
}
|
|
4789
|
+
function checkG1(rows, existsFn, hookRefs) {
|
|
4827
4790
|
const findings = [];
|
|
4828
4791
|
for (const row of rows) {
|
|
4829
4792
|
if (row.implementation === "")
|
|
@@ -4836,6 +4799,8 @@ function checkG1(rows, existsFn) {
|
|
|
4836
4799
|
});
|
|
4837
4800
|
}
|
|
4838
4801
|
}
|
|
4802
|
+
if (hookRefs)
|
|
4803
|
+
findings.push(...findUnshippedHookRefs(hookRefs.docs, hookRefs.shipped));
|
|
4839
4804
|
return { check: "G1", status: findings.length > 0 ? "fail" : "pass", findings };
|
|
4840
4805
|
}
|
|
4841
4806
|
var SCAFFOLD_PLACEHOLDER = "[undocumented — fill in why]";
|
|
@@ -5389,7 +5354,6 @@ var TaskPrPauseSchema = z.object({
|
|
|
5389
5354
|
var TaskPrReviewRecordSchema = z.object({
|
|
5390
5355
|
verdicts: z.array(TaskPrVerdictSchema),
|
|
5391
5356
|
roundMarkers: z.array(z.number().int().nonnegative()),
|
|
5392
|
-
summaryTable: z.string().nullable(),
|
|
5393
5357
|
pause: TaskPrPauseSchema.nullable()
|
|
5394
5358
|
});
|
|
5395
5359
|
var TaskPrReadInputSchema = z.object({
|
|
@@ -5436,16 +5400,6 @@ var TaskCancelResultSchema = z.object({
|
|
|
5436
5400
|
authenticatedFrom: z.string().min(1),
|
|
5437
5401
|
fencedEffectKeys: z.array(z.string())
|
|
5438
5402
|
});
|
|
5439
|
-
var TASK_TOOL_NAMES = [
|
|
5440
|
-
"task_start",
|
|
5441
|
-
"task_status",
|
|
5442
|
-
"task_escalation_read",
|
|
5443
|
-
"task_pr_read",
|
|
5444
|
-
"task_resume",
|
|
5445
|
-
"task_cancel"
|
|
5446
|
-
];
|
|
5447
|
-
var OPERATOR_STATUS_FOLLOW = "task_status_follow";
|
|
5448
|
-
var OPERATOR_TOOL_GRANT = [...TASK_TOOL_NAMES, OPERATOR_STATUS_FOLLOW];
|
|
5449
5403
|
// ../../packages/aeg-core/src/first-push-dispatch-gate.ts
|
|
5450
5404
|
function parseTaskBranch(branch) {
|
|
5451
5405
|
const m = /^task\/([^/]+)\/([^/]+)$/.exec(branch);
|
|
@@ -5676,15 +5630,69 @@ var NO_GATE_CUTOVERS = {
|
|
|
5676
5630
|
briefRulesSincePr: null,
|
|
5677
5631
|
agentBoxesRefusedSincePr: null
|
|
5678
5632
|
};
|
|
5679
|
-
// ../../packages/aeg-core/src/dev-review-loop/types.ts
|
|
5680
|
-
var SEVERITY_COLUMNS = ["blocker", "major", "minor", "critical", "high", "medium", "low"];
|
|
5681
|
-
// ../../packages/aeg-core/src/dev-review-loop/journal-reconstruction.ts
|
|
5682
|
-
var SUMMARY_TABLE_HEADER = `| round | ${SEVERITY_COLUMNS.join(" | ")} | confidence | outcome |`;
|
|
5683
|
-
// ../../packages/aeg-core/src/log/envelope.ts
|
|
5684
|
-
import { createHash as createHash5 } from "node:crypto";
|
|
5685
|
-
|
|
5686
5633
|
// ../../packages/aeg-core/src/log/schema.ts
|
|
5634
|
+
import { z as z3 } from "zod";
|
|
5635
|
+
|
|
5636
|
+
// ../../packages/aeg-core/src/log/custom.ts
|
|
5687
5637
|
import { z as z2 } from "zod";
|
|
5638
|
+
var CUSTOM_EVENT_NAME_PATTERN = /^[a-z][a-z0-9_]*\.[a-z][a-z0-9_.]*$/;
|
|
5639
|
+
var CUSTOM_EVENT_NAME_MAX_LENGTH = 64;
|
|
5640
|
+
var CUSTOM_EVENT_RESERVED_NAMESPACE = "vinaya";
|
|
5641
|
+
var CUSTOM_EVENT_MAX_FIELDS = 20;
|
|
5642
|
+
var CUSTOM_FIELD_NAME_PATTERN = /^[a-z][a-z0-9_]*$/;
|
|
5643
|
+
var CUSTOM_FIELD_NAME_MAX_LENGTH = 64;
|
|
5644
|
+
var CUSTOM_TEXT_MAX_LENGTH = 500;
|
|
5645
|
+
var CUSTOM_WORD_PATTERN = /^[a-z0-9][a-z0-9_-]*$/;
|
|
5646
|
+
var CUSTOM_WORD_MAX_LENGTH = 64;
|
|
5647
|
+
var CUSTOM_FIELD_MAX_WORDS = 50;
|
|
5648
|
+
var CustomFieldTypeSchema = z2.union([z2.enum(["text", "number", "boolean"]), z2.array(z2.string())]);
|
|
5649
|
+
var CustomEventDeclarationsSchema = z2.record(z2.string(), z2.object({
|
|
5650
|
+
fields: z2.record(z2.string(), CustomFieldTypeSchema)
|
|
5651
|
+
}).strict()).superRefine((events, ctx) => {
|
|
5652
|
+
for (const [name, declaration] of Object.entries(events)) {
|
|
5653
|
+
const refuse = (message, path = []) => {
|
|
5654
|
+
ctx.addIssue({
|
|
5655
|
+
code: z2.ZodIssueCode.custom,
|
|
5656
|
+
path: [name, ...path],
|
|
5657
|
+
message: `logs.events "${name}": ${message}`
|
|
5658
|
+
});
|
|
5659
|
+
};
|
|
5660
|
+
if (name.length > CUSTOM_EVENT_NAME_MAX_LENGTH) {
|
|
5661
|
+
refuse(`the name must be at most ${CUSTOM_EVENT_NAME_MAX_LENGTH} characters`);
|
|
5662
|
+
}
|
|
5663
|
+
if (!CUSTOM_EVENT_NAME_PATTERN.test(name)) {
|
|
5664
|
+
refuse("the name must be `<namespace>.<event>` — lowercase letters, digits and `_`, a dot between them");
|
|
5665
|
+
} else if (name.split(".")[0] === CUSTOM_EVENT_RESERVED_NAMESPACE) {
|
|
5666
|
+
refuse(`the \`${CUSTOM_EVENT_RESERVED_NAMESPACE}.\` namespace is reserved for Vinaya's own events`);
|
|
5667
|
+
}
|
|
5668
|
+
const fieldEntries = Object.entries(declaration.fields);
|
|
5669
|
+
if (fieldEntries.length > CUSTOM_EVENT_MAX_FIELDS) {
|
|
5670
|
+
refuse(`at most ${CUSTOM_EVENT_MAX_FIELDS} fields may be declared (found ${fieldEntries.length})`, ["fields"]);
|
|
5671
|
+
}
|
|
5672
|
+
for (const [field, type] of fieldEntries) {
|
|
5673
|
+
if (field.length > CUSTOM_FIELD_NAME_MAX_LENGTH || !CUSTOM_FIELD_NAME_PATTERN.test(field)) {
|
|
5674
|
+
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]);
|
|
5675
|
+
}
|
|
5676
|
+
if (typeof type === "string")
|
|
5677
|
+
continue;
|
|
5678
|
+
if (type.length === 0) {
|
|
5679
|
+
refuse(`field "${field}": a list of words must name at least one word`, ["fields", field]);
|
|
5680
|
+
}
|
|
5681
|
+
if (type.length > CUSTOM_FIELD_MAX_WORDS) {
|
|
5682
|
+
refuse(`field "${field}": a list of words may name at most ${CUSTOM_FIELD_MAX_WORDS}`, ["fields", field]);
|
|
5683
|
+
}
|
|
5684
|
+
const bad = type.filter((w) => w.length > CUSTOM_WORD_MAX_LENGTH || !CUSTOM_WORD_PATTERN.test(w));
|
|
5685
|
+
if (bad.length > 0) {
|
|
5686
|
+
refuse(`field "${field}": a listed word is lowercase letters, digits, \`_\` and \`-\`, at most ${CUSTOM_WORD_MAX_LENGTH} characters`, ["fields", field]);
|
|
5687
|
+
}
|
|
5688
|
+
if (new Set(type).size !== type.length) {
|
|
5689
|
+
refuse(`field "${field}": a list of words names a word twice`, ["fields", field]);
|
|
5690
|
+
}
|
|
5691
|
+
}
|
|
5692
|
+
}
|
|
5693
|
+
});
|
|
5694
|
+
|
|
5695
|
+
// ../../packages/aeg-core/src/log/schema.ts
|
|
5688
5696
|
var CONFIDENCE_REASON_MAX_LENGTH = 280;
|
|
5689
5697
|
var ROLE_VALUES = [
|
|
5690
5698
|
"planner",
|
|
@@ -5695,178 +5703,210 @@ var ROLE_VALUES = [
|
|
|
5695
5703
|
"archivist",
|
|
5696
5704
|
"architect"
|
|
5697
5705
|
];
|
|
5698
|
-
var RoleSchema =
|
|
5706
|
+
var RoleSchema = z3.enum(ROLE_VALUES);
|
|
5699
5707
|
var HOST_VALUES = ["hook", "ci", "cli", "loop"];
|
|
5700
|
-
var HostSchema =
|
|
5708
|
+
var HostSchema = z3.enum(HOST_VALUES);
|
|
5701
5709
|
var RUN_ID_PATTERN = /^[A-Za-z0-9_.-]{1,128}$/;
|
|
5702
5710
|
var headerMetaCore = {
|
|
5703
|
-
ts:
|
|
5704
|
-
run_id:
|
|
5705
|
-
seq:
|
|
5706
|
-
repo:
|
|
5707
|
-
vinaya:
|
|
5708
|
-
doctrine:
|
|
5711
|
+
ts: z3.string(),
|
|
5712
|
+
run_id: z3.string().regex(RUN_ID_PATTERN),
|
|
5713
|
+
seq: z3.number().int().nonnegative(),
|
|
5714
|
+
repo: z3.string().nullable(),
|
|
5715
|
+
vinaya: z3.string(),
|
|
5716
|
+
doctrine: z3.string(),
|
|
5709
5717
|
host: HostSchema,
|
|
5710
|
-
machine:
|
|
5718
|
+
machine: z3.string()
|
|
5711
5719
|
};
|
|
5712
|
-
var HeaderMetaV1Schema =
|
|
5713
|
-
schema:
|
|
5720
|
+
var HeaderMetaV1Schema = z3.object({
|
|
5721
|
+
schema: z3.literal(1),
|
|
5714
5722
|
...headerMetaCore
|
|
5715
5723
|
}).strict();
|
|
5716
|
-
var LineageSchema =
|
|
5717
|
-
run:
|
|
5718
|
-
attempt:
|
|
5719
|
-
parent:
|
|
5724
|
+
var LineageSchema = z3.object({
|
|
5725
|
+
run: z3.string().nullable(),
|
|
5726
|
+
attempt: z3.number().int().nullable(),
|
|
5727
|
+
parent: z3.string().nullable()
|
|
5720
5728
|
}).strict();
|
|
5721
|
-
var InputVersionsSchema =
|
|
5722
|
-
objectives_version:
|
|
5723
|
-
brief_hash:
|
|
5724
|
-
ruling_ordinal:
|
|
5725
|
-
policy_digest:
|
|
5729
|
+
var InputVersionsSchema = z3.object({
|
|
5730
|
+
objectives_version: z3.string().nullable(),
|
|
5731
|
+
brief_hash: z3.string().nullable(),
|
|
5732
|
+
ruling_ordinal: z3.number().int().nullable(),
|
|
5733
|
+
policy_digest: z3.string().nullable()
|
|
5726
5734
|
}).strict();
|
|
5727
|
-
var ProvenanceSchema =
|
|
5728
|
-
var HeaderMetaV2Schema =
|
|
5729
|
-
schema:
|
|
5735
|
+
var ProvenanceSchema = z3.enum(["parent_attributed", "env_correlated", "self_reported", "unavailable"]);
|
|
5736
|
+
var HeaderMetaV2Schema = z3.object({
|
|
5737
|
+
schema: z3.literal(2),
|
|
5730
5738
|
...headerMetaCore,
|
|
5731
|
-
event_id:
|
|
5732
|
-
process_id:
|
|
5733
|
-
actor_id:
|
|
5739
|
+
event_id: z3.string().min(1),
|
|
5740
|
+
process_id: z3.string().min(1),
|
|
5741
|
+
actor_id: z3.string().nullable(),
|
|
5734
5742
|
lineage: LineageSchema,
|
|
5735
5743
|
input_versions: InputVersionsSchema,
|
|
5736
5744
|
provenance: ProvenanceSchema
|
|
5737
5745
|
}).strict();
|
|
5738
|
-
var
|
|
5739
|
-
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
+
var WorkSchema = z3.object({
|
|
5747
|
+
ref: z3.string().nullable(),
|
|
5748
|
+
repo: z3.string().nullable(),
|
|
5749
|
+
change: z3.string().nullable(),
|
|
5750
|
+
revision: z3.string().nullable()
|
|
5751
|
+
}).strict();
|
|
5752
|
+
var FlowSchema = z3.object({
|
|
5753
|
+
id: z3.string().nullable(),
|
|
5754
|
+
version: z3.string().nullable()
|
|
5755
|
+
}).strict();
|
|
5756
|
+
var HeaderMetaV3Schema = z3.object({
|
|
5757
|
+
schema: z3.literal(3),
|
|
5758
|
+
...headerMetaCore,
|
|
5759
|
+
event_id: z3.string().min(1),
|
|
5760
|
+
process_id: z3.string().min(1),
|
|
5761
|
+
actor_id: z3.string().nullable(),
|
|
5762
|
+
lineage: LineageSchema,
|
|
5763
|
+
input_versions: InputVersionsSchema,
|
|
5764
|
+
provenance: ProvenanceSchema,
|
|
5765
|
+
work: WorkSchema,
|
|
5766
|
+
flow: FlowSchema,
|
|
5767
|
+
runtime: z3.string().nullable(),
|
|
5768
|
+
source: z3.string().nullable()
|
|
5769
|
+
}).strict();
|
|
5770
|
+
var HeaderMetaSchema = z3.discriminatedUnion("schema", [HeaderMetaV1Schema, HeaderMetaV2Schema, HeaderMetaV3Schema]);
|
|
5771
|
+
var SubjectSchema = z3.object({
|
|
5772
|
+
issue: z3.number().int().nullable(),
|
|
5773
|
+
pr: z3.number().int().optional(),
|
|
5774
|
+
sha: z3.string().optional(),
|
|
5775
|
+
role: z3.union([RoleSchema, z3.literal("unattributed")]),
|
|
5776
|
+
round: z3.number().int().optional(),
|
|
5777
|
+
objectives_version: z3.string().optional()
|
|
5746
5778
|
}).strict();
|
|
5747
|
-
var HeaderSchema =
|
|
5779
|
+
var HeaderSchema = z3.object({
|
|
5748
5780
|
meta: HeaderMetaSchema,
|
|
5749
5781
|
subject: SubjectSchema
|
|
5750
5782
|
}).strict();
|
|
5751
5783
|
var envelopeTail = {
|
|
5752
|
-
duration_ms:
|
|
5753
|
-
payload:
|
|
5784
|
+
duration_ms: z3.number().nonnegative().optional(),
|
|
5785
|
+
payload: z3.object({}).strict()
|
|
5754
5786
|
};
|
|
5755
|
-
var ReviewFindingSchema =
|
|
5756
|
-
id:
|
|
5757
|
-
severity:
|
|
5758
|
-
state:
|
|
5759
|
-
severity_scale:
|
|
5760
|
-
policy_treatment:
|
|
5761
|
-
confidence:
|
|
5762
|
-
confidence_scale:
|
|
5763
|
-
confidence_source:
|
|
5787
|
+
var ReviewFindingSchema = z3.object({
|
|
5788
|
+
id: z3.string(),
|
|
5789
|
+
severity: z3.string(),
|
|
5790
|
+
state: z3.string().optional(),
|
|
5791
|
+
severity_scale: z3.string().optional(),
|
|
5792
|
+
policy_treatment: z3.enum(["blocking", "non_blocking", "unavailable"]).optional(),
|
|
5793
|
+
confidence: z3.number().min(0).max(1).optional(),
|
|
5794
|
+
confidence_scale: z3.string().optional(),
|
|
5795
|
+
confidence_source: z3.string().optional()
|
|
5764
5796
|
}).strict();
|
|
5765
|
-
var DispatchOutcomeSchema =
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
type:
|
|
5769
|
-
pr:
|
|
5770
|
-
head:
|
|
5771
|
-
comment_id:
|
|
5797
|
+
var DispatchOutcomeSchema = z3.discriminatedUnion("type", [
|
|
5798
|
+
z3.object({ type: z3.literal("pr_opened"), pr: z3.number().int(), head: z3.string() }).strict(),
|
|
5799
|
+
z3.object({
|
|
5800
|
+
type: z3.literal("round_pushed"),
|
|
5801
|
+
pr: z3.number().int(),
|
|
5802
|
+
head: z3.string(),
|
|
5803
|
+
comment_id: z3.number().int()
|
|
5772
5804
|
}).strict(),
|
|
5773
|
-
|
|
5774
|
-
type:
|
|
5775
|
-
verdict:
|
|
5776
|
-
head:
|
|
5777
|
-
comment_id:
|
|
5778
|
-
objectives:
|
|
5779
|
-
findings:
|
|
5805
|
+
z3.object({
|
|
5806
|
+
type: z3.literal("verdict"),
|
|
5807
|
+
verdict: z3.enum(["APPROVE", "REQUEST CHANGES", "PASS", "FAIL"]),
|
|
5808
|
+
head: z3.string(),
|
|
5809
|
+
comment_id: z3.number().int(),
|
|
5810
|
+
objectives: z3.array(z3.object({ id: z3.string(), met: z3.boolean() }).strict()),
|
|
5811
|
+
findings: z3.array(ReviewFindingSchema)
|
|
5780
5812
|
}).strict(),
|
|
5781
|
-
|
|
5782
|
-
type:
|
|
5783
|
-
class:
|
|
5784
|
-
comment_id:
|
|
5813
|
+
z3.object({
|
|
5814
|
+
type: z3.literal("escalation"),
|
|
5815
|
+
class: z3.enum(["authority", "strategy", "product"]),
|
|
5816
|
+
comment_id: z3.number().int()
|
|
5785
5817
|
}).strict(),
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
|
|
5789
|
-
|
|
5818
|
+
z3.object({ type: z3.literal("brief"), comment_id: z3.number().int(), hash: z3.string() }).strict(),
|
|
5819
|
+
z3.object({ type: z3.literal("plan"), issues: z3.array(z3.number().int()) }).strict(),
|
|
5820
|
+
z3.object({ type: z3.literal("archive"), provenance_comment_id: z3.number().int() }).strict(),
|
|
5821
|
+
z3.object({ type: z3.literal("completed") }).strict()
|
|
5790
5822
|
]);
|
|
5791
5823
|
var dispatchShared = {
|
|
5792
5824
|
meta: HeaderMetaSchema,
|
|
5793
5825
|
subject: SubjectSchema,
|
|
5794
|
-
kind:
|
|
5826
|
+
kind: z3.literal("dispatch"),
|
|
5795
5827
|
...envelopeTail,
|
|
5796
5828
|
target_role: RoleSchema,
|
|
5797
|
-
model:
|
|
5798
|
-
round:
|
|
5799
|
-
effect_id:
|
|
5829
|
+
model: z3.string(),
|
|
5830
|
+
round: z3.number().int().optional(),
|
|
5831
|
+
effect_id: z3.string()
|
|
5800
5832
|
};
|
|
5801
|
-
var dispatchUsageField =
|
|
5802
|
-
var DispatchEventSchema =
|
|
5803
|
-
|
|
5804
|
-
|
|
5833
|
+
var dispatchUsageField = z3.object({ input: z3.number().nonnegative(), output: z3.number().nonnegative() }).strict().nullable();
|
|
5834
|
+
var DispatchEventSchema = z3.discriminatedUnion("event", [
|
|
5835
|
+
z3.object({ ...dispatchShared, event: z3.literal("dispatched"), prompt_hash: z3.string() }).strict(),
|
|
5836
|
+
z3.object({
|
|
5805
5837
|
...dispatchShared,
|
|
5806
|
-
event:
|
|
5838
|
+
event: z3.literal("outcome_received"),
|
|
5807
5839
|
outcome: DispatchOutcomeSchema,
|
|
5808
5840
|
usage: dispatchUsageField
|
|
5809
5841
|
}).strict(),
|
|
5810
|
-
|
|
5842
|
+
z3.object({
|
|
5811
5843
|
...dispatchShared,
|
|
5812
|
-
event:
|
|
5813
|
-
reason:
|
|
5844
|
+
event: z3.literal("dispatch_failed"),
|
|
5845
|
+
reason: z3.enum(["timeout", "crash", "refused", "unattributed_write"]),
|
|
5814
5846
|
usage: dispatchUsageField
|
|
5815
5847
|
}).strict()
|
|
5816
5848
|
]);
|
|
5849
|
+
var CODE_TOKEN_PATTERN = /^[A-Za-z0-9._-]{1,64}$/;
|
|
5850
|
+
var CodeTokenSchema = z3.string().regex(CODE_TOKEN_PATTERN);
|
|
5851
|
+
var ReviewerVerdictSchema = z3.object({
|
|
5852
|
+
role: RoleSchema,
|
|
5853
|
+
outcome: z3.enum(["approve", "changes_requested", "not_reviewed"]),
|
|
5854
|
+
blockers: z3.number().int().nonnegative()
|
|
5855
|
+
}).strict();
|
|
5817
5856
|
var loopShared = {
|
|
5818
5857
|
meta: HeaderMetaSchema,
|
|
5819
5858
|
subject: SubjectSchema,
|
|
5820
|
-
kind:
|
|
5859
|
+
kind: z3.literal("dev_review_loop"),
|
|
5821
5860
|
...envelopeTail,
|
|
5822
|
-
loop_id:
|
|
5861
|
+
loop_id: z3.string()
|
|
5823
5862
|
};
|
|
5824
|
-
var DevReviewLoopEventSchema =
|
|
5825
|
-
|
|
5863
|
+
var DevReviewLoopEventSchema = z3.discriminatedUnion("event", [
|
|
5864
|
+
z3.object({
|
|
5826
5865
|
...loopShared,
|
|
5827
|
-
event:
|
|
5828
|
-
task:
|
|
5829
|
-
policy:
|
|
5830
|
-
max_rounds:
|
|
5831
|
-
reviewers:
|
|
5832
|
-
models:
|
|
5866
|
+
event: z3.literal("loop_started"),
|
|
5867
|
+
task: z3.number().int(),
|
|
5868
|
+
policy: z3.object({
|
|
5869
|
+
max_rounds: z3.number().int().nonnegative(),
|
|
5870
|
+
reviewers: z3.array(RoleSchema),
|
|
5871
|
+
models: z3.record(RoleSchema, z3.string())
|
|
5833
5872
|
}).strict()
|
|
5834
5873
|
}).strict(),
|
|
5835
|
-
|
|
5836
|
-
|
|
5874
|
+
z3.object({ ...loopShared, event: z3.literal("round_started"), round: z3.number().int(), base_head: z3.string() }).strict(),
|
|
5875
|
+
z3.object({
|
|
5837
5876
|
...loopShared,
|
|
5838
|
-
event:
|
|
5839
|
-
round:
|
|
5840
|
-
head:
|
|
5841
|
-
green:
|
|
5842
|
-
confidence_value:
|
|
5843
|
-
confidence_reason:
|
|
5844
|
-
confidence_unavailable:
|
|
5845
|
-
extra_turn_spent:
|
|
5877
|
+
event: z3.literal("gate_result_read"),
|
|
5878
|
+
round: z3.number().int(),
|
|
5879
|
+
head: z3.string(),
|
|
5880
|
+
green: z3.boolean(),
|
|
5881
|
+
confidence_value: z3.number().int().min(0).max(100).optional(),
|
|
5882
|
+
confidence_reason: z3.string().max(CONFIDENCE_REASON_MAX_LENGTH).optional(),
|
|
5883
|
+
confidence_unavailable: z3.boolean().optional(),
|
|
5884
|
+
extra_turn_spent: z3.boolean().optional()
|
|
5846
5885
|
}).strict(),
|
|
5847
|
-
|
|
5886
|
+
z3.object({
|
|
5848
5887
|
...loopShared,
|
|
5849
|
-
event:
|
|
5850
|
-
round:
|
|
5851
|
-
head:
|
|
5852
|
-
all_approve:
|
|
5853
|
-
blockers:
|
|
5854
|
-
findings:
|
|
5888
|
+
event: z3.literal("verdicts_read"),
|
|
5889
|
+
round: z3.number().int(),
|
|
5890
|
+
head: z3.string(),
|
|
5891
|
+
all_approve: z3.boolean(),
|
|
5892
|
+
blockers: z3.number().int().nonnegative(),
|
|
5893
|
+
findings: z3.array(ReviewFindingSchema).optional(),
|
|
5894
|
+
reviewers: z3.array(ReviewerVerdictSchema).optional()
|
|
5855
5895
|
}).strict(),
|
|
5856
|
-
|
|
5896
|
+
z3.object({
|
|
5857
5897
|
...loopShared,
|
|
5858
|
-
event:
|
|
5859
|
-
round:
|
|
5860
|
-
open:
|
|
5861
|
-
resolved:
|
|
5862
|
-
new:
|
|
5863
|
-
recurring:
|
|
5898
|
+
event: z3.literal("findings_compared"),
|
|
5899
|
+
round: z3.number().int(),
|
|
5900
|
+
open: z3.array(z3.string()),
|
|
5901
|
+
resolved: z3.array(z3.string()),
|
|
5902
|
+
new: z3.array(z3.string()),
|
|
5903
|
+
recurring: z3.array(z3.string())
|
|
5864
5904
|
}).strict(),
|
|
5865
|
-
|
|
5905
|
+
z3.object({
|
|
5866
5906
|
...loopShared,
|
|
5867
|
-
event:
|
|
5868
|
-
round:
|
|
5869
|
-
condition:
|
|
5907
|
+
event: z3.literal("stop_condition_met"),
|
|
5908
|
+
round: z3.number().int(),
|
|
5909
|
+
condition: z3.enum([
|
|
5870
5910
|
"green",
|
|
5871
5911
|
"max_rounds",
|
|
5872
5912
|
"no_progress",
|
|
@@ -5875,66 +5915,85 @@ var DevReviewLoopEventSchema = z2.discriminatedUnion("event", [
|
|
|
5875
5915
|
"confidence",
|
|
5876
5916
|
"reappearance",
|
|
5877
5917
|
"repeat_finding",
|
|
5878
|
-
"repeat_failure"
|
|
5918
|
+
"repeat_failure",
|
|
5919
|
+
"time_budget"
|
|
5879
5920
|
])
|
|
5880
5921
|
}).strict(),
|
|
5881
|
-
|
|
5922
|
+
z3.object({
|
|
5923
|
+
...loopShared,
|
|
5924
|
+
event: z3.literal("paused"),
|
|
5925
|
+
round: z3.number().int(),
|
|
5926
|
+
reason: z3.enum(["escalation", "principal_item", "refreeze_needed"]),
|
|
5927
|
+
reason_code: CodeTokenSchema.optional()
|
|
5928
|
+
}).strict(),
|
|
5929
|
+
z3.object({
|
|
5882
5930
|
...loopShared,
|
|
5883
|
-
event:
|
|
5884
|
-
round:
|
|
5885
|
-
|
|
5931
|
+
event: z3.literal("resumed"),
|
|
5932
|
+
round: z3.number().int(),
|
|
5933
|
+
by: z3.enum(["principal", "driver"])
|
|
5886
5934
|
}).strict(),
|
|
5887
|
-
|
|
5935
|
+
z3.object({
|
|
5888
5936
|
...loopShared,
|
|
5889
|
-
event:
|
|
5890
|
-
round:
|
|
5891
|
-
by:
|
|
5937
|
+
event: z3.literal("cancelled"),
|
|
5938
|
+
round: z3.number().int(),
|
|
5939
|
+
by: z3.literal("principal")
|
|
5892
5940
|
}).strict(),
|
|
5893
|
-
|
|
5941
|
+
z3.object({
|
|
5894
5942
|
...loopShared,
|
|
5895
|
-
event:
|
|
5896
|
-
round:
|
|
5897
|
-
|
|
5943
|
+
event: z3.literal("unpushed_work_resume"),
|
|
5944
|
+
round: z3.number().int(),
|
|
5945
|
+
branch: z3.string(),
|
|
5946
|
+
detail: z3.string()
|
|
5898
5947
|
}).strict(),
|
|
5899
|
-
|
|
5948
|
+
z3.object({
|
|
5900
5949
|
...loopShared,
|
|
5901
|
-
event:
|
|
5902
|
-
round:
|
|
5903
|
-
|
|
5904
|
-
|
|
5950
|
+
event: z3.literal("round_ended"),
|
|
5951
|
+
round: z3.number().int(),
|
|
5952
|
+
base_head: z3.string(),
|
|
5953
|
+
head: z3.string(),
|
|
5954
|
+
files_changed: z3.number().int().nonnegative(),
|
|
5955
|
+
insertions: z3.number().int().nonnegative(),
|
|
5956
|
+
deletions: z3.number().int().nonnegative(),
|
|
5957
|
+
wall_ms: z3.number().nonnegative(),
|
|
5958
|
+
outcome: z3.enum(["green", "changes_requested", "escalated"])
|
|
5905
5959
|
}).strict(),
|
|
5906
|
-
|
|
5960
|
+
z3.object({
|
|
5907
5961
|
...loopShared,
|
|
5908
|
-
event:
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
wall_ms: z2.number().nonnegative(),
|
|
5916
|
-
outcome: z2.enum(["green", "changes_requested", "escalated"])
|
|
5962
|
+
event: z3.literal("journal_finalized"),
|
|
5963
|
+
rounds: z3.number().int().nonnegative(),
|
|
5964
|
+
total_wall_ms: z3.number().nonnegative(),
|
|
5965
|
+
time_to_green_ms: z3.number().nonnegative().nullable(),
|
|
5966
|
+
files_changed_total: z3.number().int().nonnegative(),
|
|
5967
|
+
final_head: z3.string(),
|
|
5968
|
+
result: z3.enum(["merged_ready", "stopped"])
|
|
5917
5969
|
}).strict(),
|
|
5918
|
-
|
|
5970
|
+
z3.object({
|
|
5919
5971
|
...loopShared,
|
|
5920
|
-
event:
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
final_head: z2.string(),
|
|
5926
|
-
result: z2.enum(["merged_ready", "stopped"])
|
|
5972
|
+
event: z3.literal("infrastructure_retry"),
|
|
5973
|
+
round: z3.number().int(),
|
|
5974
|
+
failure_kind: z3.enum(["pause_comment_post", "developer_connection"]),
|
|
5975
|
+
attempts: z3.number().int().positive(),
|
|
5976
|
+
outcome: z3.enum(["recovered", "exhausted"])
|
|
5927
5977
|
}).strict(),
|
|
5928
|
-
|
|
5978
|
+
z3.object({
|
|
5929
5979
|
...loopShared,
|
|
5930
|
-
event:
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5980
|
+
event: z3.literal("driver_heartbeat"),
|
|
5981
|
+
task: z3.number().int(),
|
|
5982
|
+
pr: z3.number().int().positive().optional(),
|
|
5983
|
+
round: z3.number().int(),
|
|
5984
|
+
phase: z3.string()
|
|
5985
|
+
}).strict(),
|
|
5986
|
+
z3.object({
|
|
5987
|
+
...loopShared,
|
|
5988
|
+
event: z3.literal("driver_exited"),
|
|
5989
|
+
task: z3.number().int(),
|
|
5990
|
+
reason: z3.enum(["finished", "paused", "reexec", "error", "signal"]),
|
|
5991
|
+
last_decision: z3.string(),
|
|
5992
|
+
exit_code: z3.number().int().optional(),
|
|
5993
|
+
error_class: CodeTokenSchema.optional()
|
|
5935
5994
|
}).strict()
|
|
5936
5995
|
]);
|
|
5937
|
-
var ForgeOpSchema =
|
|
5996
|
+
var ForgeOpSchema = z3.enum([
|
|
5938
5997
|
"pr.create",
|
|
5939
5998
|
"pr.comment",
|
|
5940
5999
|
"pr.body.replace",
|
|
@@ -5948,24 +6007,24 @@ var ForgeOpSchema = z2.enum([
|
|
|
5948
6007
|
"label.add",
|
|
5949
6008
|
"label.remove"
|
|
5950
6009
|
]);
|
|
5951
|
-
var ForgeWriteTargetSchema =
|
|
5952
|
-
issue:
|
|
5953
|
-
pr:
|
|
6010
|
+
var ForgeWriteTargetSchema = z3.object({
|
|
6011
|
+
issue: z3.number().int().optional(),
|
|
6012
|
+
pr: z3.number().int().optional()
|
|
5954
6013
|
}).strict();
|
|
5955
6014
|
var forgeWriteShared = {
|
|
5956
6015
|
meta: HeaderMetaSchema,
|
|
5957
6016
|
subject: SubjectSchema,
|
|
5958
|
-
kind:
|
|
6017
|
+
kind: z3.literal("forge_write"),
|
|
5959
6018
|
...envelopeTail,
|
|
5960
6019
|
op: ForgeOpSchema,
|
|
5961
6020
|
target: ForgeWriteTargetSchema
|
|
5962
6021
|
};
|
|
5963
|
-
var ForgeWriteEventSchema =
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
6022
|
+
var ForgeWriteEventSchema = z3.discriminatedUnion("event", [
|
|
6023
|
+
z3.object({ ...forgeWriteShared, event: z3.literal("validated") }).strict(),
|
|
6024
|
+
z3.object({ ...forgeWriteShared, event: z3.literal("refused"), reason: z3.string() }).strict(),
|
|
6025
|
+
z3.object({ ...forgeWriteShared, event: z3.literal("written"), comment_ids: z3.array(z3.string()) }).strict()
|
|
5967
6026
|
]);
|
|
5968
|
-
var GateOutcomeSchema =
|
|
6027
|
+
var GateOutcomeSchema = z3.enum([
|
|
5969
6028
|
"pass",
|
|
5970
6029
|
"fail",
|
|
5971
6030
|
"wait",
|
|
@@ -5978,61 +6037,74 @@ var GateOutcomeSchema = z2.enum([
|
|
|
5978
6037
|
var gateShared = {
|
|
5979
6038
|
meta: HeaderMetaSchema,
|
|
5980
6039
|
subject: SubjectSchema,
|
|
5981
|
-
kind:
|
|
6040
|
+
kind: z3.literal("gate"),
|
|
5982
6041
|
...envelopeTail,
|
|
5983
|
-
check:
|
|
5984
|
-
check_version:
|
|
5985
|
-
policy_version:
|
|
5986
|
-
input_fingerprint:
|
|
6042
|
+
check: z3.string(),
|
|
6043
|
+
check_version: z3.string().nullable(),
|
|
6044
|
+
policy_version: z3.string().nullable(),
|
|
6045
|
+
input_fingerprint: z3.string().nullable()
|
|
5987
6046
|
};
|
|
5988
|
-
var GateEventSchema =
|
|
5989
|
-
|
|
6047
|
+
var GateEventSchema = z3.discriminatedUnion("event", [
|
|
6048
|
+
z3.object({
|
|
5990
6049
|
...gateShared,
|
|
5991
|
-
event:
|
|
6050
|
+
event: z3.literal("checked"),
|
|
5992
6051
|
outcome: GateOutcomeSchema,
|
|
5993
|
-
reason:
|
|
6052
|
+
reason: z3.string().optional()
|
|
6053
|
+
}).strict(),
|
|
6054
|
+
z3.object({
|
|
6055
|
+
meta: HeaderMetaSchema,
|
|
6056
|
+
subject: SubjectSchema,
|
|
6057
|
+
kind: z3.literal("gate"),
|
|
6058
|
+
...envelopeTail,
|
|
6059
|
+
event: z3.literal("summary"),
|
|
6060
|
+
ran: z3.number().int().nonnegative(),
|
|
6061
|
+
passed: z3.number().int().nonnegative(),
|
|
6062
|
+
failed: z3.number().int().nonnegative(),
|
|
6063
|
+
skipped: z3.number().int().nonnegative(),
|
|
6064
|
+
failed_checks: z3.array(z3.string())
|
|
5994
6065
|
}).strict()
|
|
5995
6066
|
]);
|
|
5996
|
-
var OperationResultSchema =
|
|
6067
|
+
var OperationResultSchema = z3.enum(["ok", "error", "refused", "timeout", "cancelled", "unavailable"]);
|
|
5997
6068
|
var operationShared = {
|
|
5998
6069
|
meta: HeaderMetaSchema,
|
|
5999
6070
|
subject: SubjectSchema,
|
|
6000
|
-
kind:
|
|
6071
|
+
kind: z3.literal("operation"),
|
|
6001
6072
|
...envelopeTail,
|
|
6002
|
-
operation:
|
|
6003
|
-
target:
|
|
6073
|
+
operation: z3.string(),
|
|
6074
|
+
target: z3.string().nullable()
|
|
6004
6075
|
};
|
|
6005
|
-
var OperationEventSchema =
|
|
6006
|
-
|
|
6076
|
+
var OperationEventSchema = z3.discriminatedUnion("event", [
|
|
6077
|
+
z3.object({
|
|
6007
6078
|
...operationShared,
|
|
6008
|
-
event:
|
|
6079
|
+
event: z3.literal("completed"),
|
|
6009
6080
|
result: OperationResultSchema,
|
|
6010
|
-
error_class:
|
|
6081
|
+
error_class: z3.string().nullable(),
|
|
6082
|
+
field_names: z3.array(z3.string().max(CUSTOM_FIELD_NAME_MAX_LENGTH)).max(CUSTOM_EVENT_MAX_FIELDS).optional()
|
|
6011
6083
|
}).strict()
|
|
6012
6084
|
]);
|
|
6013
|
-
var UsageUnitsSchema =
|
|
6014
|
-
input:
|
|
6015
|
-
output:
|
|
6016
|
-
cache:
|
|
6085
|
+
var UsageUnitsSchema = z3.object({
|
|
6086
|
+
input: z3.number().nonnegative().nullable(),
|
|
6087
|
+
output: z3.number().nonnegative().nullable(),
|
|
6088
|
+
cache: z3.number().nonnegative().nullable()
|
|
6017
6089
|
}).strict();
|
|
6018
6090
|
var usageShared = {
|
|
6019
6091
|
meta: HeaderMetaSchema,
|
|
6020
6092
|
subject: SubjectSchema,
|
|
6021
|
-
kind:
|
|
6093
|
+
kind: z3.literal("usage"),
|
|
6022
6094
|
...envelopeTail,
|
|
6023
|
-
model:
|
|
6024
|
-
source:
|
|
6025
|
-
semantics:
|
|
6095
|
+
model: z3.string().nullable(),
|
|
6096
|
+
source: z3.string(),
|
|
6097
|
+
semantics: z3.enum(["cumulative", "delta"])
|
|
6026
6098
|
};
|
|
6027
|
-
var UsageEventSchema =
|
|
6028
|
-
|
|
6099
|
+
var UsageEventSchema = z3.discriminatedUnion("event", [
|
|
6100
|
+
z3.object({
|
|
6029
6101
|
...usageShared,
|
|
6030
|
-
event:
|
|
6102
|
+
event: z3.literal("observed"),
|
|
6031
6103
|
units: UsageUnitsSchema,
|
|
6032
|
-
unknown_reason:
|
|
6104
|
+
unknown_reason: z3.string().nullable()
|
|
6033
6105
|
}).strict()
|
|
6034
6106
|
]);
|
|
6035
|
-
var RoleAttemptOutcomeSchema =
|
|
6107
|
+
var RoleAttemptOutcomeSchema = z3.enum([
|
|
6036
6108
|
"completed",
|
|
6037
6109
|
"incomplete",
|
|
6038
6110
|
"infrastructure_failed",
|
|
@@ -6043,17 +6115,17 @@ var RoleAttemptOutcomeSchema = z2.enum([
|
|
|
6043
6115
|
var roleAttemptShared = {
|
|
6044
6116
|
meta: HeaderMetaSchema,
|
|
6045
6117
|
subject: SubjectSchema,
|
|
6046
|
-
kind:
|
|
6118
|
+
kind: z3.literal("role_attempt"),
|
|
6047
6119
|
...envelopeTail,
|
|
6048
|
-
actor:
|
|
6049
|
-
attempt:
|
|
6050
|
-
effect_id:
|
|
6051
|
-
model:
|
|
6120
|
+
actor: z3.string().nullable(),
|
|
6121
|
+
attempt: z3.number().int().nullable(),
|
|
6122
|
+
effect_id: z3.string(),
|
|
6123
|
+
model: z3.string().nullable()
|
|
6052
6124
|
};
|
|
6053
|
-
var RoleAttemptEventSchema =
|
|
6054
|
-
|
|
6125
|
+
var RoleAttemptEventSchema = z3.discriminatedUnion("event", [
|
|
6126
|
+
z3.object({
|
|
6055
6127
|
...roleAttemptShared,
|
|
6056
|
-
event:
|
|
6128
|
+
event: z3.literal("attempted"),
|
|
6057
6129
|
outcome: RoleAttemptOutcomeSchema,
|
|
6058
6130
|
usage: dispatchUsageField
|
|
6059
6131
|
}).strict()
|
|
@@ -6061,42 +6133,59 @@ var RoleAttemptEventSchema = z2.discriminatedUnion("event", [
|
|
|
6061
6133
|
var handoffShared = {
|
|
6062
6134
|
meta: HeaderMetaSchema,
|
|
6063
6135
|
subject: SubjectSchema,
|
|
6064
|
-
kind:
|
|
6136
|
+
kind: z3.literal("handoff"),
|
|
6065
6137
|
...envelopeTail,
|
|
6066
|
-
class:
|
|
6067
|
-
reason:
|
|
6138
|
+
class: z3.enum(["authority", "strategy", "product"]),
|
|
6139
|
+
reason: z3.string()
|
|
6068
6140
|
};
|
|
6069
|
-
var HandoffEventSchema =
|
|
6070
|
-
|
|
6141
|
+
var HandoffEventSchema = z3.discriminatedUnion("event", [
|
|
6142
|
+
z3.object({
|
|
6071
6143
|
...handoffShared,
|
|
6072
|
-
event:
|
|
6073
|
-
requested_decision:
|
|
6144
|
+
event: z3.literal("raised"),
|
|
6145
|
+
requested_decision: z3.string().nullable()
|
|
6074
6146
|
}).strict(),
|
|
6075
|
-
|
|
6147
|
+
z3.object({
|
|
6076
6148
|
...handoffShared,
|
|
6077
|
-
event:
|
|
6078
|
-
resolution:
|
|
6079
|
-
resolved_by:
|
|
6149
|
+
event: z3.literal("resolved"),
|
|
6150
|
+
resolution: z3.string().nullable(),
|
|
6151
|
+
resolved_by: z3.string().nullable()
|
|
6080
6152
|
}).strict()
|
|
6081
6153
|
]);
|
|
6082
|
-
var EffectTargetSchema =
|
|
6083
|
-
kind:
|
|
6084
|
-
ref:
|
|
6154
|
+
var EffectTargetSchema = z3.object({
|
|
6155
|
+
kind: z3.string(),
|
|
6156
|
+
ref: z3.string()
|
|
6085
6157
|
}).strict();
|
|
6086
6158
|
var effectShared = {
|
|
6087
6159
|
meta: HeaderMetaSchema,
|
|
6088
6160
|
subject: SubjectSchema,
|
|
6089
|
-
kind:
|
|
6161
|
+
kind: z3.literal("effect"),
|
|
6090
6162
|
...envelopeTail,
|
|
6091
|
-
effect_id:
|
|
6163
|
+
effect_id: z3.string(),
|
|
6092
6164
|
target: EffectTargetSchema
|
|
6093
6165
|
};
|
|
6094
|
-
var EffectEventSchema =
|
|
6095
|
-
|
|
6096
|
-
|
|
6097
|
-
|
|
6166
|
+
var EffectEventSchema = z3.discriminatedUnion("event", [
|
|
6167
|
+
z3.object({ ...effectShared, event: z3.literal("attempted") }).strict(),
|
|
6168
|
+
z3.object({ ...effectShared, event: z3.literal("observed"), outcome: z3.enum(["success", "failure", "uncertain"]) }).strict(),
|
|
6169
|
+
z3.object({ ...effectShared, event: z3.literal("verified"), outcome: z3.enum(["success", "failure", "uncertain"]) }).strict()
|
|
6098
6170
|
]);
|
|
6099
|
-
var
|
|
6171
|
+
var CustomFieldValueSchema = z3.union([z3.string().max(CUSTOM_TEXT_MAX_LENGTH), z3.number().finite(), z3.boolean()]);
|
|
6172
|
+
var customShared = {
|
|
6173
|
+
meta: HeaderMetaV3Schema,
|
|
6174
|
+
subject: SubjectSchema,
|
|
6175
|
+
kind: z3.literal("custom"),
|
|
6176
|
+
...envelopeTail
|
|
6177
|
+
};
|
|
6178
|
+
var CustomEventSchema = z3.discriminatedUnion("event", [
|
|
6179
|
+
z3.object({
|
|
6180
|
+
...customShared,
|
|
6181
|
+
event: z3.literal("recorded"),
|
|
6182
|
+
name: z3.string().max(CUSTOM_EVENT_NAME_MAX_LENGTH).regex(CUSTOM_EVENT_NAME_PATTERN),
|
|
6183
|
+
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, {
|
|
6184
|
+
message: `custom: at most ${CUSTOM_EVENT_MAX_FIELDS} fields`
|
|
6185
|
+
})
|
|
6186
|
+
}).strict()
|
|
6187
|
+
]);
|
|
6188
|
+
var LogEventSchema = z3.union([
|
|
6100
6189
|
DispatchEventSchema,
|
|
6101
6190
|
DevReviewLoopEventSchema,
|
|
6102
6191
|
ForgeWriteEventSchema,
|
|
@@ -6105,10 +6194,11 @@ var LogEventSchema = z2.union([
|
|
|
6105
6194
|
UsageEventSchema,
|
|
6106
6195
|
RoleAttemptEventSchema,
|
|
6107
6196
|
HandoffEventSchema,
|
|
6108
|
-
EffectEventSchema
|
|
6197
|
+
EffectEventSchema,
|
|
6198
|
+
CustomEventSchema
|
|
6109
6199
|
]);
|
|
6110
|
-
|
|
6111
6200
|
// ../../packages/aeg-core/src/log/envelope.ts
|
|
6201
|
+
import { createHash as createHash5 } from "node:crypto";
|
|
6112
6202
|
function isRole(value) {
|
|
6113
6203
|
return value !== undefined && ROLE_VALUES.includes(value);
|
|
6114
6204
|
}
|
|
@@ -6145,18 +6235,27 @@ function roundFromEnv(round) {
|
|
|
6145
6235
|
const n = Number(round);
|
|
6146
6236
|
return Number.isInteger(n) ? n : undefined;
|
|
6147
6237
|
}
|
|
6238
|
+
function prFromEnv(pr) {
|
|
6239
|
+
if (pr === undefined || pr === "")
|
|
6240
|
+
return;
|
|
6241
|
+
const n = Number(pr);
|
|
6242
|
+
return Number.isInteger(n) && n > 0 ? n : undefined;
|
|
6243
|
+
}
|
|
6148
6244
|
function buildHeader(input) {
|
|
6149
6245
|
const role = isRole(input.env.role) ? input.env.role : "unattributed";
|
|
6150
6246
|
const round = roundFromEnv(input.env.round);
|
|
6247
|
+
const pr = prFromEnv(input.env.pr);
|
|
6151
6248
|
const subject = {
|
|
6152
6249
|
issue: issueFromTask(input.env.task) ?? input.branchIssue ?? null,
|
|
6153
6250
|
role,
|
|
6154
6251
|
...round !== undefined ? { round } : {},
|
|
6252
|
+
...pr !== undefined ? { pr } : {},
|
|
6155
6253
|
...input.subject ?? {}
|
|
6156
6254
|
};
|
|
6255
|
+
const issue = subject.issue;
|
|
6157
6256
|
return {
|
|
6158
6257
|
meta: {
|
|
6159
|
-
schema:
|
|
6258
|
+
schema: 3,
|
|
6160
6259
|
ts: input.now.toISOString(),
|
|
6161
6260
|
run_id: input.runId,
|
|
6162
6261
|
seq: input.seq,
|
|
@@ -6179,7 +6278,19 @@ function buildHeader(input) {
|
|
|
6179
6278
|
ruling_ordinal: input.inputVersions?.rulingOrdinal ?? null,
|
|
6180
6279
|
policy_digest: input.inputVersions?.policyDigest ?? null
|
|
6181
6280
|
},
|
|
6182
|
-
provenance: provenanceFor(input)
|
|
6281
|
+
provenance: provenanceFor(input),
|
|
6282
|
+
work: {
|
|
6283
|
+
ref: lineageFieldFromEnv(input.env.workRef) ?? (issue === null ? null : String(issue)),
|
|
6284
|
+
repo: input.repo,
|
|
6285
|
+
change: null,
|
|
6286
|
+
revision: null
|
|
6287
|
+
},
|
|
6288
|
+
flow: {
|
|
6289
|
+
id: lineageFieldFromEnv(input.env.flow) ?? "vinaya",
|
|
6290
|
+
version: lineageFieldFromEnv(input.env.flowVersion)
|
|
6291
|
+
},
|
|
6292
|
+
runtime: lineageFieldFromEnv(input.env.runtime),
|
|
6293
|
+
source: lineageFieldFromEnv(input.env.source)
|
|
6183
6294
|
},
|
|
6184
6295
|
subject
|
|
6185
6296
|
};
|
|
@@ -6222,7 +6333,7 @@ function redact(value, home) {
|
|
|
6222
6333
|
return value;
|
|
6223
6334
|
}
|
|
6224
6335
|
// ../../packages/aeg-core/src/log/store.ts
|
|
6225
|
-
var KNOWN_SCHEMA_VERSIONS = [1, 2];
|
|
6336
|
+
var KNOWN_SCHEMA_VERSIONS = [1, 2, 3];
|
|
6226
6337
|
function metaOf(obj) {
|
|
6227
6338
|
if (obj === null || typeof obj !== "object")
|
|
6228
6339
|
return null;
|
|
@@ -6288,7 +6399,7 @@ function classifyStoredLine(raw, home) {
|
|
|
6288
6399
|
return { status: "invalid", identity: null, raw, reason: "valid event with no derivable identity" };
|
|
6289
6400
|
}
|
|
6290
6401
|
const redacted = redact(event, home);
|
|
6291
|
-
const provenance = version
|
|
6402
|
+
const provenance = version >= 2 ? event.meta.provenance ?? null : null;
|
|
6292
6403
|
return {
|
|
6293
6404
|
status: "ok",
|
|
6294
6405
|
identity,
|
|
@@ -6301,138 +6412,143 @@ function classifyStoredLine(raw, home) {
|
|
|
6301
6412
|
};
|
|
6302
6413
|
}
|
|
6303
6414
|
// ../../packages/aeg-core/src/control-store/records.ts
|
|
6304
|
-
import { z as
|
|
6305
|
-
var isoTimestamp =
|
|
6306
|
-
var taskId =
|
|
6307
|
-
var epochNumber =
|
|
6308
|
-
var RunRecordSchema =
|
|
6309
|
-
version:
|
|
6310
|
-
kind:
|
|
6415
|
+
import { z as z4 } from "zod";
|
|
6416
|
+
var isoTimestamp = z4.string().min(1);
|
|
6417
|
+
var taskId = z4.number().int().positive();
|
|
6418
|
+
var epochNumber = z4.number().int().nonnegative();
|
|
6419
|
+
var RunRecordSchema = z4.object({
|
|
6420
|
+
version: z4.literal(1),
|
|
6421
|
+
kind: z4.literal("run"),
|
|
6311
6422
|
task: taskId,
|
|
6312
|
-
runId:
|
|
6313
|
-
pid:
|
|
6314
|
-
host:
|
|
6423
|
+
runId: z4.string().min(1),
|
|
6424
|
+
pid: z4.number().int().positive(),
|
|
6425
|
+
host: z4.string().min(1),
|
|
6315
6426
|
startedAt: isoTimestamp,
|
|
6316
|
-
childStartedAt:
|
|
6317
|
-
childCommand:
|
|
6427
|
+
childStartedAt: z4.string().min(1).nullable().optional(),
|
|
6428
|
+
childCommand: z4.string().min(1).nullable().optional()
|
|
6318
6429
|
}).strict();
|
|
6319
|
-
var InputRecordSchema =
|
|
6320
|
-
version:
|
|
6321
|
-
kind:
|
|
6430
|
+
var InputRecordSchema = z4.object({
|
|
6431
|
+
version: z4.literal(1),
|
|
6432
|
+
kind: z4.literal("input"),
|
|
6322
6433
|
task: taskId,
|
|
6323
|
-
runId:
|
|
6324
|
-
source:
|
|
6325
|
-
pr:
|
|
6326
|
-
round:
|
|
6434
|
+
runId: z4.string().min(1),
|
|
6435
|
+
source: z4.union([z4.literal("fresh"), z4.literal("resume")]),
|
|
6436
|
+
pr: z4.number().int().positive().nullable(),
|
|
6437
|
+
round: z4.number().int().nonnegative(),
|
|
6327
6438
|
recordedAt: isoTimestamp
|
|
6328
6439
|
}).strict();
|
|
6329
|
-
var OwnershipRecordSchema =
|
|
6330
|
-
version:
|
|
6331
|
-
kind:
|
|
6440
|
+
var OwnershipRecordSchema = z4.object({
|
|
6441
|
+
version: z4.literal(1),
|
|
6442
|
+
kind: z4.literal("ownership"),
|
|
6332
6443
|
task: taskId,
|
|
6333
6444
|
epoch: epochNumber,
|
|
6334
|
-
ownerId:
|
|
6335
|
-
pid:
|
|
6336
|
-
host:
|
|
6445
|
+
ownerId: z4.string().min(1),
|
|
6446
|
+
pid: z4.number().int().positive(),
|
|
6447
|
+
host: z4.string().min(1),
|
|
6337
6448
|
acquiredAt: isoTimestamp
|
|
6338
6449
|
}).strict();
|
|
6339
|
-
var TransitionRecordSchema =
|
|
6340
|
-
version:
|
|
6341
|
-
kind:
|
|
6450
|
+
var TransitionRecordSchema = z4.object({
|
|
6451
|
+
version: z4.literal(1),
|
|
6452
|
+
kind: z4.literal("transition"),
|
|
6342
6453
|
task: taskId,
|
|
6343
6454
|
epoch: epochNumber,
|
|
6344
|
-
seq:
|
|
6345
|
-
from:
|
|
6346
|
-
to:
|
|
6347
|
-
detail:
|
|
6455
|
+
seq: z4.number().int().nonnegative(),
|
|
6456
|
+
from: z4.string().min(1),
|
|
6457
|
+
to: z4.string().min(1),
|
|
6458
|
+
detail: z4.string().optional(),
|
|
6348
6459
|
at: isoTimestamp
|
|
6349
6460
|
}).strict();
|
|
6350
|
-
var ManifestRecordSchema =
|
|
6351
|
-
version:
|
|
6352
|
-
kind:
|
|
6461
|
+
var ManifestRecordSchema = z4.object({
|
|
6462
|
+
version: z4.literal(1),
|
|
6463
|
+
kind: z4.literal("manifest"),
|
|
6353
6464
|
task: taskId,
|
|
6354
6465
|
round: epochNumber,
|
|
6355
|
-
repository:
|
|
6356
|
-
pr:
|
|
6357
|
-
branch:
|
|
6358
|
-
baseSha:
|
|
6359
|
-
headSha:
|
|
6360
|
-
briefHash:
|
|
6361
|
-
objectivesVersion:
|
|
6466
|
+
repository: z4.string().min(1),
|
|
6467
|
+
pr: z4.number().int().positive(),
|
|
6468
|
+
branch: z4.string().min(1),
|
|
6469
|
+
baseSha: z4.string().min(1).nullable(),
|
|
6470
|
+
headSha: z4.string().min(1),
|
|
6471
|
+
briefHash: z4.string().min(1).nullable(),
|
|
6472
|
+
objectivesVersion: z4.string().min(1).nullable(),
|
|
6362
6473
|
rulingOrdinal: epochNumber,
|
|
6363
|
-
policyDigest:
|
|
6474
|
+
policyDigest: z4.string().min(1),
|
|
6364
6475
|
recordedAt: isoTimestamp
|
|
6365
6476
|
}).strict();
|
|
6366
|
-
var roundHeadIdentity =
|
|
6367
|
-
var LoopBudgetsSchema =
|
|
6368
|
-
mechanicalRetries:
|
|
6369
|
-
reviewRounds:
|
|
6370
|
-
infrastructureRetries:
|
|
6477
|
+
var roundHeadIdentity = z4.object({ round: z4.number().int().positive(), head: z4.string().min(1) }).strict();
|
|
6478
|
+
var LoopBudgetsSchema = z4.object({
|
|
6479
|
+
mechanicalRetries: z4.number().int().nonnegative(),
|
|
6480
|
+
reviewRounds: z4.number().int().nonnegative(),
|
|
6481
|
+
infrastructureRetries: z4.number().int().nonnegative()
|
|
6371
6482
|
}).strict();
|
|
6372
|
-
var LoopStateRecordSchema =
|
|
6373
|
-
version:
|
|
6374
|
-
kind:
|
|
6483
|
+
var LoopStateRecordSchema = z4.object({
|
|
6484
|
+
version: z4.literal(1),
|
|
6485
|
+
kind: z4.literal("loop_state"),
|
|
6375
6486
|
task: taskId,
|
|
6376
|
-
round:
|
|
6377
|
-
phase:
|
|
6378
|
-
pauseReason:
|
|
6487
|
+
round: z4.number().int().positive(),
|
|
6488
|
+
phase: z4.string().min(1),
|
|
6489
|
+
pauseReason: z4.string().min(1).nullable(),
|
|
6379
6490
|
budgets: LoopBudgetsSchema,
|
|
6380
6491
|
heldResult: roundHeadIdentity.nullable(),
|
|
6381
6492
|
deliveredFindings: roundHeadIdentity.nullable(),
|
|
6382
|
-
repeatMemory:
|
|
6383
|
-
blockingFindings:
|
|
6384
|
-
lastFailure:
|
|
6493
|
+
repeatMemory: z4.object({
|
|
6494
|
+
blockingFindings: z4.array(z4.string()),
|
|
6495
|
+
lastFailure: z4.object({ signature: z4.string(), message: z4.string() }).nullable()
|
|
6385
6496
|
}).strict().optional(),
|
|
6497
|
+
publicationExpectedBase: z4.string().regex(/^[0-9a-f]{40}$/).nullable().optional(),
|
|
6498
|
+
taskStartedAt: isoTimestamp.optional(),
|
|
6499
|
+
phaseMs: z4.record(z4.string(), z4.number().nonnegative()).optional(),
|
|
6386
6500
|
recordedAt: isoTimestamp
|
|
6387
6501
|
}).strict();
|
|
6388
|
-
var EffectRecordSchema =
|
|
6389
|
-
version:
|
|
6390
|
-
kind:
|
|
6502
|
+
var EffectRecordSchema = z4.object({
|
|
6503
|
+
version: z4.literal(1),
|
|
6504
|
+
kind: z4.literal("effect"),
|
|
6391
6505
|
task: taskId,
|
|
6392
|
-
key:
|
|
6393
|
-
operation:
|
|
6394
|
-
target:
|
|
6395
|
-
inputVersion:
|
|
6396
|
-
payloadDigest:
|
|
6397
|
-
status:
|
|
6398
|
-
url:
|
|
6506
|
+
key: z4.string().min(1),
|
|
6507
|
+
operation: z4.string().min(1),
|
|
6508
|
+
target: z4.string().min(1),
|
|
6509
|
+
inputVersion: z4.number().int().nonnegative(),
|
|
6510
|
+
payloadDigest: z4.string().min(1),
|
|
6511
|
+
status: z4.union([z4.literal("started"), z4.literal("verified"), z4.literal("uncertain")]),
|
|
6512
|
+
url: z4.string().optional(),
|
|
6399
6513
|
recordedAt: isoTimestamp
|
|
6400
6514
|
}).strict();
|
|
6401
|
-
var EscalationRecordSchema =
|
|
6402
|
-
version:
|
|
6403
|
-
kind:
|
|
6515
|
+
var EscalationRecordSchema = z4.object({
|
|
6516
|
+
version: z4.literal(1),
|
|
6517
|
+
kind: z4.literal("escalation"),
|
|
6404
6518
|
task: taskId,
|
|
6405
|
-
escalationId:
|
|
6519
|
+
escalationId: z4.string().min(1),
|
|
6406
6520
|
round: epochNumber,
|
|
6407
|
-
head:
|
|
6408
|
-
branch:
|
|
6409
|
-
pr:
|
|
6410
|
-
runId:
|
|
6411
|
-
pid:
|
|
6412
|
-
host:
|
|
6413
|
-
agent:
|
|
6414
|
-
reason:
|
|
6415
|
-
detail:
|
|
6416
|
-
evidence:
|
|
6417
|
-
attemptedRecovery:
|
|
6418
|
-
requestedDecision:
|
|
6419
|
-
recipient:
|
|
6420
|
-
briefHash:
|
|
6421
|
-
objectivesVersion:
|
|
6521
|
+
head: z4.string().min(1),
|
|
6522
|
+
branch: z4.string().min(1),
|
|
6523
|
+
pr: z4.number().int().positive().nullable(),
|
|
6524
|
+
runId: z4.string().min(1),
|
|
6525
|
+
pid: z4.number().int().positive(),
|
|
6526
|
+
host: z4.string().min(1),
|
|
6527
|
+
agent: z4.string().min(1).optional(),
|
|
6528
|
+
reason: z4.string().min(1),
|
|
6529
|
+
detail: z4.string().optional(),
|
|
6530
|
+
evidence: z4.string().optional(),
|
|
6531
|
+
attemptedRecovery: z4.string().min(1),
|
|
6532
|
+
requestedDecision: z4.string().min(1),
|
|
6533
|
+
recipient: z4.string().min(1),
|
|
6534
|
+
briefHash: z4.string().min(1).nullable(),
|
|
6535
|
+
objectivesVersion: z4.string().min(1).nullable(),
|
|
6422
6536
|
rulingOrdinal: epochNumber,
|
|
6423
|
-
policyDigest:
|
|
6537
|
+
policyDigest: z4.string().min(1),
|
|
6424
6538
|
recordedAt: isoTimestamp
|
|
6425
6539
|
}).strict();
|
|
6426
|
-
var ResolutionRecordSchema =
|
|
6427
|
-
version:
|
|
6428
|
-
kind:
|
|
6540
|
+
var ResolutionRecordSchema = z4.object({
|
|
6541
|
+
version: z4.literal(1),
|
|
6542
|
+
kind: z4.literal("resolution"),
|
|
6429
6543
|
task: taskId,
|
|
6430
|
-
escalationId:
|
|
6431
|
-
decision:
|
|
6432
|
-
authenticatedBy:
|
|
6433
|
-
authenticatedFrom:
|
|
6544
|
+
escalationId: z4.string().min(1),
|
|
6545
|
+
decision: z4.union([z4.literal("resume"), z4.literal("cancel")]),
|
|
6546
|
+
authenticatedBy: z4.string().min(1),
|
|
6547
|
+
authenticatedFrom: z4.string().min(1),
|
|
6434
6548
|
consumedAt: isoTimestamp
|
|
6435
6549
|
}).strict();
|
|
6550
|
+
// ../../packages/aeg-core/src/control-store/local.ts
|
|
6551
|
+
var CONTROL_AREA_DIRNAME = "control";
|
|
6436
6552
|
// src/checks/contract.ts
|
|
6437
6553
|
var CHECK_SCHEMA_VERSION = 1;
|
|
6438
6554
|
function emitCheckError(error) {
|