@attalabs/vinaya 0.35.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 +23 -8
- package/aeg-root/roles/planner.md +2 -0
- package/aeg-root/roles/principal.md +6 -1
- package/aeg-root/roles/reviewer.md +11 -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 +10 -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 +2081 -1883
- package/dist/checks/bin/check-branch-topology.js +1376 -1139
- package/dist/checks/bin/check-brief-shape.js +2081 -1883
- package/dist/checks/bin/check-changeset-coverage.js +2564 -2025
- package/dist/checks/bin/check-closes-n.js +1376 -1139
- package/dist/checks/bin/check-coherence.js +1480 -1228
- package/dist/checks/bin/check-dead-branch-push.js +1339 -1156
- package/dist/checks/bin/check-dispatch-readiness.js +1480 -1228
- package/dist/checks/bin/check-doc-coverage-push.js +2563 -2024
- package/dist/checks/bin/check-doc-coverage.js +2565 -2026
- package/dist/checks/bin/check-doctrine-no-procedures.js +2081 -1883
- package/dist/checks/bin/check-doctrine-portability.js +2563 -2024
- package/dist/checks/bin/check-evidence-fresh.js +1906 -1536
- package/dist/checks/bin/check-exec-bits.js +2136 -1597
- package/dist/checks/bin/check-first-push-dispatch.js +1480 -1228
- package/dist/checks/bin/check-issue-assignment.js +1376 -1139
- package/dist/checks/bin/check-issue-milestone-attach.js +1339 -1156
- package/dist/checks/bin/check-issue-objectives-numbering.js +2081 -1883
- package/dist/checks/bin/check-issue-parts-coverage.js +1339 -1156
- package/dist/checks/bin/check-issue-surface-globs.js +1488 -1227
- package/dist/checks/bin/check-issue-title-grammar.js +1339 -1156
- package/dist/checks/bin/check-issue-tranche-label.js +1339 -1156
- package/dist/checks/bin/check-main-branch-refusal.js +1342 -1159
- package/dist/checks/bin/check-no-disk-state.js +1342 -1159
- package/dist/checks/bin/check-pr-premise-reassert.js +2081 -1883
- package/dist/checks/bin/check-pr-report-density.js +1342 -1159
- package/dist/checks/bin/check-principal-test-plan-wait.js +1342 -1159
- package/dist/checks/bin/check-quoted-command.js +4063 -3526
- package/dist/checks/bin/check-reader-resolvable-prose.js +4082 -3533
- package/dist/checks/bin/check-registry-gates.js +1363 -1167
- package/dist/checks/bin/check-retired-vocabulary.js +4057 -3520
- package/dist/checks/bin/check-review-gate.js +2081 -1883
- package/dist/checks/bin/check-single-plan-pr.js +1339 -1156
- package/dist/checks/bin/check-surface-scope.js +1376 -1139
- package/dist/checks/bin/check-test-plan.js +1339 -1156
- package/dist/checks/bin/check-token-collection-wired.js +1342 -1159
- package/dist/checks/bin/check-token-report.js +1409 -1342
- package/dist/checks/bin/check-workspace-escape.js +2562 -2023
- package/dist/index.js +14171 -6490
- package/dist/lib/pre-push-cache-test-run.js +1044 -641
- package/dist/lib/pre-push-select-tests.js +641 -444
- 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 +257 -10
- 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 +2 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/render-summary.ts +69 -11
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/types.ts +139 -2
- 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 +27 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/issue-validation.ts +757 -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]__0zc_0gx._.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/0vtfb0g813gki.js +1 -0
- 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/{3ip5z3cf43bgo.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/{3goaig_rysc6p.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/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/3u9emqjwpd0t9.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/{ca66rAHI_w9D7S7ceXDvR → yR5RsCxb1OGnYggiaO09S}/_buildManifest.js +0 -0
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{ca66rAHI_w9D7S7ceXDvR → yR5RsCxb1OGnYggiaO09S}/_clientMiddlewareManifest.js +0 -0
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{ca66rAHI_w9D7S7ceXDvR → yR5RsCxb1OGnYggiaO09S}/_ssgManifest.js +0 -0
|
@@ -126,7 +126,7 @@ import { promisify as promisify4 } from "node:util";
|
|
|
126
126
|
import { existsSync as existsSync2, mkdirSync as mkdirSync2, readFileSync as readFileSync3, realpathSync, writeFileSync } from "node:fs";
|
|
127
127
|
import { homedir } from "node:os";
|
|
128
128
|
import { dirname as dirname2, isAbsolute, join as join2, resolve as resolve2 } from "node:path";
|
|
129
|
-
import { z as
|
|
129
|
+
import { z as z5 } from "zod";
|
|
130
130
|
// ../../packages/aeg-forge-state/src/gh.ts
|
|
131
131
|
import { execFile, execFileSync } from "node:child_process";
|
|
132
132
|
import { promisify } from "node:util";
|
|
@@ -531,6 +531,16 @@ function globToRegex(pat) {
|
|
|
531
531
|
return new RegExp(re);
|
|
532
532
|
}
|
|
533
533
|
var SEPARATOR = /(?:[ \t]*[—–][ \t]*|[ \t]+-[ \t]+)/.source;
|
|
534
|
+
// ../../packages/aeg-core/src/review-policy.ts
|
|
535
|
+
var SECURITY_SEVERITY_ORDER = ["CRITICAL", "HIGH", "MEDIUM", "LOW"];
|
|
536
|
+
function blockingSeverities(scale, threshold) {
|
|
537
|
+
const idx = scale.indexOf(threshold);
|
|
538
|
+
if (idx === -1) {
|
|
539
|
+
throw new Error(`blockingSeverities: threshold "${threshold}" is not one of ${scale.join(" > ")}`);
|
|
540
|
+
}
|
|
541
|
+
return scale.slice(0, idx + 1);
|
|
542
|
+
}
|
|
543
|
+
var SECURITY_HIGH_AND_ABOVE = blockingSeverities(SECURITY_SEVERITY_ORDER, "HIGH");
|
|
534
544
|
// ../../packages/aeg-core/src/pr-tier.ts
|
|
535
545
|
var OVERRIDE_BODY_TOKEN = `[${label("override-docs")}]`;
|
|
536
546
|
// ../../packages/aeg-core/src/premise-check.ts
|
|
@@ -561,20 +571,42 @@ var NON_PATH_TOP_SEGMENTS = new Set(["origin", "refs", "HEAD", "vinaya", "fix"])
|
|
|
561
571
|
|
|
562
572
|
// ../../packages/aeg-core/src/doctrine-no-procedures.ts
|
|
563
573
|
var SHELL_LANGS = new Set(["", "sh", "bash", "shell", "console"]);
|
|
574
|
+
// ../../packages/aeg-core/src/reader-resolvable-prose.ts
|
|
575
|
+
var SWEPT_CLASSES = new Set(["ships", "reader-facing"]);
|
|
576
|
+
|
|
577
|
+
// ../../packages/aeg-core/src/quoted-command.ts
|
|
578
|
+
var QUOTED_COMMAND_SWEPT_CLASSES = new Set(["ships", "reader-facing"]);
|
|
579
|
+
|
|
564
580
|
// ../../packages/aeg-core/src/issue-validation.ts
|
|
565
581
|
var TYPE_LABEL_IDS = LABELS.filter((l) => l.category === "type").map((l) => l.id);
|
|
566
582
|
var DOC_PATH_RE = /(?:(?:aeg-root|apps|packages|specs|docs|tools|\.claude|\.github)\/[\w./@-]*\.(?:md|mdx)|\.claude\/(?:skills|rules)\/[\w./-]+|\b(?:docs-index|decisions|projects|state-machine|enforcement|process|README|CLAUDE)\.md\b|\b[\w-]+-(?:spec|decisions|backlog)\.md\b)/i;
|
|
567
583
|
var DOC_PATH_RE_GLOBAL = new RegExp(DOC_PATH_RE.source, "gi");
|
|
584
|
+
var FILE_EXTENSIONS = new Set([
|
|
585
|
+
"ts",
|
|
586
|
+
"tsx",
|
|
587
|
+
"js",
|
|
588
|
+
"jsx",
|
|
589
|
+
"mjs",
|
|
590
|
+
"cjs",
|
|
591
|
+
"json",
|
|
592
|
+
"jsonc",
|
|
593
|
+
"md",
|
|
594
|
+
"mdx",
|
|
595
|
+
"yml",
|
|
596
|
+
"yaml",
|
|
597
|
+
"txt",
|
|
598
|
+
"sh",
|
|
599
|
+
"lock",
|
|
600
|
+
"toml",
|
|
601
|
+
"ndjson",
|
|
602
|
+
"html",
|
|
603
|
+
"css"
|
|
604
|
+
]);
|
|
568
605
|
|
|
569
606
|
// ../../packages/aeg-core/src/coherence-checks.ts
|
|
570
607
|
var R1_GRANDFATHERED_ISSUES = new Set([279, 280, 281, 282]);
|
|
571
608
|
// ../../packages/aeg-core/src/diagram-model.ts
|
|
572
609
|
import matter from "gray-matter";
|
|
573
|
-
// ../../packages/aeg-core/src/reader-resolvable-prose.ts
|
|
574
|
-
var SWEPT_CLASSES = new Set(["ships", "reader-facing"]);
|
|
575
|
-
|
|
576
|
-
// ../../packages/aeg-core/src/quoted-command.ts
|
|
577
|
-
var QUOTED_COMMAND_SWEPT_CLASSES = new Set(["ships", "reader-facing"]);
|
|
578
610
|
// ../../packages/aeg-core/src/retired-vocabulary.ts
|
|
579
611
|
var RETIRED_PATTERNS = [
|
|
580
612
|
String.raw`\bD-[0-9]{3}\b`,
|
|
@@ -749,7 +781,6 @@ var TaskPrPauseSchema = z.object({
|
|
|
749
781
|
var TaskPrReviewRecordSchema = z.object({
|
|
750
782
|
verdicts: z.array(TaskPrVerdictSchema),
|
|
751
783
|
roundMarkers: z.array(z.number().int().nonnegative()),
|
|
752
|
-
summaryTable: z.string().nullable(),
|
|
753
784
|
pause: TaskPrPauseSchema.nullable()
|
|
754
785
|
});
|
|
755
786
|
var TaskPrReadInputSchema = z.object({
|
|
@@ -796,25 +827,69 @@ var TaskCancelResultSchema = z.object({
|
|
|
796
827
|
authenticatedFrom: z.string().min(1),
|
|
797
828
|
fencedEffectKeys: z.array(z.string())
|
|
798
829
|
});
|
|
799
|
-
var TASK_TOOL_NAMES = [
|
|
800
|
-
"task_start",
|
|
801
|
-
"task_status",
|
|
802
|
-
"task_escalation_read",
|
|
803
|
-
"task_pr_read",
|
|
804
|
-
"task_resume",
|
|
805
|
-
"task_cancel"
|
|
806
|
-
];
|
|
807
|
-
var OPERATOR_STATUS_FOLLOW = "task_status_follow";
|
|
808
|
-
var OPERATOR_TOOL_GRANT = [...TASK_TOOL_NAMES, OPERATOR_STATUS_FOLLOW];
|
|
809
|
-
// ../../packages/aeg-core/src/dev-review-loop/types.ts
|
|
810
|
-
var SEVERITY_COLUMNS = ["blocker", "major", "minor", "critical", "high", "medium", "low"];
|
|
811
|
-
// ../../packages/aeg-core/src/dev-review-loop/journal-reconstruction.ts
|
|
812
|
-
var SUMMARY_TABLE_HEADER = `| round | ${SEVERITY_COLUMNS.join(" | ")} | confidence | outcome |`;
|
|
813
|
-
// ../../packages/aeg-core/src/log/envelope.ts
|
|
814
|
-
import { createHash } from "node:crypto";
|
|
815
|
-
|
|
816
830
|
// ../../packages/aeg-core/src/log/schema.ts
|
|
831
|
+
import { z as z3 } from "zod";
|
|
832
|
+
|
|
833
|
+
// ../../packages/aeg-core/src/log/custom.ts
|
|
817
834
|
import { z as z2 } from "zod";
|
|
835
|
+
var CUSTOM_EVENT_NAME_PATTERN = /^[a-z][a-z0-9_]*\.[a-z][a-z0-9_.]*$/;
|
|
836
|
+
var CUSTOM_EVENT_NAME_MAX_LENGTH = 64;
|
|
837
|
+
var CUSTOM_EVENT_RESERVED_NAMESPACE = "vinaya";
|
|
838
|
+
var CUSTOM_EVENT_MAX_FIELDS = 20;
|
|
839
|
+
var CUSTOM_FIELD_NAME_PATTERN = /^[a-z][a-z0-9_]*$/;
|
|
840
|
+
var CUSTOM_FIELD_NAME_MAX_LENGTH = 64;
|
|
841
|
+
var CUSTOM_TEXT_MAX_LENGTH = 500;
|
|
842
|
+
var CUSTOM_WORD_PATTERN = /^[a-z0-9][a-z0-9_-]*$/;
|
|
843
|
+
var CUSTOM_WORD_MAX_LENGTH = 64;
|
|
844
|
+
var CUSTOM_FIELD_MAX_WORDS = 50;
|
|
845
|
+
var CustomFieldTypeSchema = z2.union([z2.enum(["text", "number", "boolean"]), z2.array(z2.string())]);
|
|
846
|
+
var CustomEventDeclarationsSchema = z2.record(z2.string(), z2.object({
|
|
847
|
+
fields: z2.record(z2.string(), CustomFieldTypeSchema)
|
|
848
|
+
}).strict()).superRefine((events, ctx) => {
|
|
849
|
+
for (const [name, declaration] of Object.entries(events)) {
|
|
850
|
+
const refuse = (message, path = []) => {
|
|
851
|
+
ctx.addIssue({
|
|
852
|
+
code: z2.ZodIssueCode.custom,
|
|
853
|
+
path: [name, ...path],
|
|
854
|
+
message: `logs.events "${name}": ${message}`
|
|
855
|
+
});
|
|
856
|
+
};
|
|
857
|
+
if (name.length > CUSTOM_EVENT_NAME_MAX_LENGTH) {
|
|
858
|
+
refuse(`the name must be at most ${CUSTOM_EVENT_NAME_MAX_LENGTH} characters`);
|
|
859
|
+
}
|
|
860
|
+
if (!CUSTOM_EVENT_NAME_PATTERN.test(name)) {
|
|
861
|
+
refuse("the name must be `<namespace>.<event>` — lowercase letters, digits and `_`, a dot between them");
|
|
862
|
+
} else if (name.split(".")[0] === CUSTOM_EVENT_RESERVED_NAMESPACE) {
|
|
863
|
+
refuse(`the \`${CUSTOM_EVENT_RESERVED_NAMESPACE}.\` namespace is reserved for Vinaya's own events`);
|
|
864
|
+
}
|
|
865
|
+
const fieldEntries = Object.entries(declaration.fields);
|
|
866
|
+
if (fieldEntries.length > CUSTOM_EVENT_MAX_FIELDS) {
|
|
867
|
+
refuse(`at most ${CUSTOM_EVENT_MAX_FIELDS} fields may be declared (found ${fieldEntries.length})`, ["fields"]);
|
|
868
|
+
}
|
|
869
|
+
for (const [field, type] of fieldEntries) {
|
|
870
|
+
if (field.length > CUSTOM_FIELD_NAME_MAX_LENGTH || !CUSTOM_FIELD_NAME_PATTERN.test(field)) {
|
|
871
|
+
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]);
|
|
872
|
+
}
|
|
873
|
+
if (typeof type === "string")
|
|
874
|
+
continue;
|
|
875
|
+
if (type.length === 0) {
|
|
876
|
+
refuse(`field "${field}": a list of words must name at least one word`, ["fields", field]);
|
|
877
|
+
}
|
|
878
|
+
if (type.length > CUSTOM_FIELD_MAX_WORDS) {
|
|
879
|
+
refuse(`field "${field}": a list of words may name at most ${CUSTOM_FIELD_MAX_WORDS}`, ["fields", field]);
|
|
880
|
+
}
|
|
881
|
+
const bad = type.filter((w) => w.length > CUSTOM_WORD_MAX_LENGTH || !CUSTOM_WORD_PATTERN.test(w));
|
|
882
|
+
if (bad.length > 0) {
|
|
883
|
+
refuse(`field "${field}": a listed word is lowercase letters, digits, \`_\` and \`-\`, at most ${CUSTOM_WORD_MAX_LENGTH} characters`, ["fields", field]);
|
|
884
|
+
}
|
|
885
|
+
if (new Set(type).size !== type.length) {
|
|
886
|
+
refuse(`field "${field}": a list of words names a word twice`, ["fields", field]);
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
});
|
|
891
|
+
|
|
892
|
+
// ../../packages/aeg-core/src/log/schema.ts
|
|
818
893
|
var CONFIDENCE_REASON_MAX_LENGTH = 280;
|
|
819
894
|
var ROLE_VALUES = [
|
|
820
895
|
"planner",
|
|
@@ -825,244 +900,297 @@ var ROLE_VALUES = [
|
|
|
825
900
|
"archivist",
|
|
826
901
|
"architect"
|
|
827
902
|
];
|
|
828
|
-
var RoleSchema =
|
|
903
|
+
var RoleSchema = z3.enum(ROLE_VALUES);
|
|
829
904
|
var HOST_VALUES = ["hook", "ci", "cli", "loop"];
|
|
830
|
-
var HostSchema =
|
|
905
|
+
var HostSchema = z3.enum(HOST_VALUES);
|
|
831
906
|
var RUN_ID_PATTERN = /^[A-Za-z0-9_.-]{1,128}$/;
|
|
832
907
|
var headerMetaCore = {
|
|
833
|
-
ts:
|
|
834
|
-
run_id:
|
|
835
|
-
seq:
|
|
836
|
-
repo:
|
|
837
|
-
vinaya:
|
|
838
|
-
doctrine:
|
|
908
|
+
ts: z3.string(),
|
|
909
|
+
run_id: z3.string().regex(RUN_ID_PATTERN),
|
|
910
|
+
seq: z3.number().int().nonnegative(),
|
|
911
|
+
repo: z3.string().nullable(),
|
|
912
|
+
vinaya: z3.string(),
|
|
913
|
+
doctrine: z3.string(),
|
|
839
914
|
host: HostSchema,
|
|
840
|
-
machine:
|
|
915
|
+
machine: z3.string()
|
|
841
916
|
};
|
|
842
|
-
var HeaderMetaV1Schema =
|
|
843
|
-
schema:
|
|
917
|
+
var HeaderMetaV1Schema = z3.object({
|
|
918
|
+
schema: z3.literal(1),
|
|
844
919
|
...headerMetaCore
|
|
845
920
|
}).strict();
|
|
846
|
-
var LineageSchema =
|
|
847
|
-
run:
|
|
848
|
-
attempt:
|
|
849
|
-
parent:
|
|
921
|
+
var LineageSchema = z3.object({
|
|
922
|
+
run: z3.string().nullable(),
|
|
923
|
+
attempt: z3.number().int().nullable(),
|
|
924
|
+
parent: z3.string().nullable()
|
|
850
925
|
}).strict();
|
|
851
|
-
var InputVersionsSchema =
|
|
852
|
-
objectives_version:
|
|
853
|
-
brief_hash:
|
|
854
|
-
ruling_ordinal:
|
|
855
|
-
policy_digest:
|
|
926
|
+
var InputVersionsSchema = z3.object({
|
|
927
|
+
objectives_version: z3.string().nullable(),
|
|
928
|
+
brief_hash: z3.string().nullable(),
|
|
929
|
+
ruling_ordinal: z3.number().int().nullable(),
|
|
930
|
+
policy_digest: z3.string().nullable()
|
|
856
931
|
}).strict();
|
|
857
|
-
var ProvenanceSchema =
|
|
858
|
-
var HeaderMetaV2Schema =
|
|
859
|
-
schema:
|
|
932
|
+
var ProvenanceSchema = z3.enum(["parent_attributed", "env_correlated", "self_reported", "unavailable"]);
|
|
933
|
+
var HeaderMetaV2Schema = z3.object({
|
|
934
|
+
schema: z3.literal(2),
|
|
860
935
|
...headerMetaCore,
|
|
861
|
-
event_id:
|
|
862
|
-
process_id:
|
|
863
|
-
actor_id:
|
|
936
|
+
event_id: z3.string().min(1),
|
|
937
|
+
process_id: z3.string().min(1),
|
|
938
|
+
actor_id: z3.string().nullable(),
|
|
864
939
|
lineage: LineageSchema,
|
|
865
940
|
input_versions: InputVersionsSchema,
|
|
866
941
|
provenance: ProvenanceSchema
|
|
867
942
|
}).strict();
|
|
868
|
-
var
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
943
|
+
var WorkSchema = z3.object({
|
|
944
|
+
ref: z3.string().nullable(),
|
|
945
|
+
repo: z3.string().nullable(),
|
|
946
|
+
change: z3.string().nullable(),
|
|
947
|
+
revision: z3.string().nullable()
|
|
948
|
+
}).strict();
|
|
949
|
+
var FlowSchema = z3.object({
|
|
950
|
+
id: z3.string().nullable(),
|
|
951
|
+
version: z3.string().nullable()
|
|
952
|
+
}).strict();
|
|
953
|
+
var HeaderMetaV3Schema = z3.object({
|
|
954
|
+
schema: z3.literal(3),
|
|
955
|
+
...headerMetaCore,
|
|
956
|
+
event_id: z3.string().min(1),
|
|
957
|
+
process_id: z3.string().min(1),
|
|
958
|
+
actor_id: z3.string().nullable(),
|
|
959
|
+
lineage: LineageSchema,
|
|
960
|
+
input_versions: InputVersionsSchema,
|
|
961
|
+
provenance: ProvenanceSchema,
|
|
962
|
+
work: WorkSchema,
|
|
963
|
+
flow: FlowSchema,
|
|
964
|
+
runtime: z3.string().nullable(),
|
|
965
|
+
source: z3.string().nullable()
|
|
876
966
|
}).strict();
|
|
877
|
-
var
|
|
967
|
+
var HeaderMetaSchema = z3.discriminatedUnion("schema", [HeaderMetaV1Schema, HeaderMetaV2Schema, HeaderMetaV3Schema]);
|
|
968
|
+
var SubjectSchema = z3.object({
|
|
969
|
+
issue: z3.number().int().nullable(),
|
|
970
|
+
pr: z3.number().int().optional(),
|
|
971
|
+
sha: z3.string().optional(),
|
|
972
|
+
role: z3.union([RoleSchema, z3.literal("unattributed")]),
|
|
973
|
+
round: z3.number().int().optional(),
|
|
974
|
+
objectives_version: z3.string().optional()
|
|
975
|
+
}).strict();
|
|
976
|
+
var HeaderSchema = z3.object({
|
|
878
977
|
meta: HeaderMetaSchema,
|
|
879
978
|
subject: SubjectSchema
|
|
880
979
|
}).strict();
|
|
881
980
|
var envelopeTail = {
|
|
882
|
-
duration_ms:
|
|
883
|
-
payload:
|
|
981
|
+
duration_ms: z3.number().nonnegative().optional(),
|
|
982
|
+
payload: z3.object({}).strict()
|
|
884
983
|
};
|
|
885
|
-
var ReviewFindingSchema =
|
|
886
|
-
id:
|
|
887
|
-
severity:
|
|
888
|
-
state:
|
|
889
|
-
severity_scale:
|
|
890
|
-
policy_treatment:
|
|
891
|
-
confidence:
|
|
892
|
-
confidence_scale:
|
|
893
|
-
confidence_source:
|
|
984
|
+
var ReviewFindingSchema = z3.object({
|
|
985
|
+
id: z3.string(),
|
|
986
|
+
severity: z3.string(),
|
|
987
|
+
state: z3.string().optional(),
|
|
988
|
+
severity_scale: z3.string().optional(),
|
|
989
|
+
policy_treatment: z3.enum(["blocking", "non_blocking", "unavailable"]).optional(),
|
|
990
|
+
confidence: z3.number().min(0).max(1).optional(),
|
|
991
|
+
confidence_scale: z3.string().optional(),
|
|
992
|
+
confidence_source: z3.string().optional()
|
|
894
993
|
}).strict();
|
|
895
|
-
var DispatchOutcomeSchema =
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
type:
|
|
899
|
-
pr:
|
|
900
|
-
head:
|
|
901
|
-
comment_id:
|
|
994
|
+
var DispatchOutcomeSchema = z3.discriminatedUnion("type", [
|
|
995
|
+
z3.object({ type: z3.literal("pr_opened"), pr: z3.number().int(), head: z3.string() }).strict(),
|
|
996
|
+
z3.object({
|
|
997
|
+
type: z3.literal("round_pushed"),
|
|
998
|
+
pr: z3.number().int(),
|
|
999
|
+
head: z3.string(),
|
|
1000
|
+
comment_id: z3.number().int()
|
|
902
1001
|
}).strict(),
|
|
903
|
-
|
|
904
|
-
type:
|
|
905
|
-
verdict:
|
|
906
|
-
head:
|
|
907
|
-
comment_id:
|
|
908
|
-
objectives:
|
|
909
|
-
findings:
|
|
1002
|
+
z3.object({
|
|
1003
|
+
type: z3.literal("verdict"),
|
|
1004
|
+
verdict: z3.enum(["APPROVE", "REQUEST CHANGES", "PASS", "FAIL"]),
|
|
1005
|
+
head: z3.string(),
|
|
1006
|
+
comment_id: z3.number().int(),
|
|
1007
|
+
objectives: z3.array(z3.object({ id: z3.string(), met: z3.boolean() }).strict()),
|
|
1008
|
+
findings: z3.array(ReviewFindingSchema)
|
|
910
1009
|
}).strict(),
|
|
911
|
-
|
|
912
|
-
type:
|
|
913
|
-
class:
|
|
914
|
-
comment_id:
|
|
1010
|
+
z3.object({
|
|
1011
|
+
type: z3.literal("escalation"),
|
|
1012
|
+
class: z3.enum(["authority", "strategy", "product"]),
|
|
1013
|
+
comment_id: z3.number().int()
|
|
915
1014
|
}).strict(),
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
1015
|
+
z3.object({ type: z3.literal("brief"), comment_id: z3.number().int(), hash: z3.string() }).strict(),
|
|
1016
|
+
z3.object({ type: z3.literal("plan"), issues: z3.array(z3.number().int()) }).strict(),
|
|
1017
|
+
z3.object({ type: z3.literal("archive"), provenance_comment_id: z3.number().int() }).strict(),
|
|
1018
|
+
z3.object({ type: z3.literal("completed") }).strict()
|
|
920
1019
|
]);
|
|
921
1020
|
var dispatchShared = {
|
|
922
1021
|
meta: HeaderMetaSchema,
|
|
923
1022
|
subject: SubjectSchema,
|
|
924
|
-
kind:
|
|
1023
|
+
kind: z3.literal("dispatch"),
|
|
925
1024
|
...envelopeTail,
|
|
926
1025
|
target_role: RoleSchema,
|
|
927
|
-
model:
|
|
928
|
-
round:
|
|
929
|
-
effect_id:
|
|
1026
|
+
model: z3.string(),
|
|
1027
|
+
round: z3.number().int().optional(),
|
|
1028
|
+
effect_id: z3.string()
|
|
930
1029
|
};
|
|
931
|
-
var dispatchUsageField =
|
|
932
|
-
var DispatchEventSchema =
|
|
933
|
-
|
|
934
|
-
|
|
1030
|
+
var dispatchUsageField = z3.object({ input: z3.number().nonnegative(), output: z3.number().nonnegative() }).strict().nullable();
|
|
1031
|
+
var DispatchEventSchema = z3.discriminatedUnion("event", [
|
|
1032
|
+
z3.object({ ...dispatchShared, event: z3.literal("dispatched"), prompt_hash: z3.string() }).strict(),
|
|
1033
|
+
z3.object({
|
|
935
1034
|
...dispatchShared,
|
|
936
|
-
event:
|
|
1035
|
+
event: z3.literal("outcome_received"),
|
|
937
1036
|
outcome: DispatchOutcomeSchema,
|
|
938
1037
|
usage: dispatchUsageField
|
|
939
1038
|
}).strict(),
|
|
940
|
-
|
|
1039
|
+
z3.object({
|
|
941
1040
|
...dispatchShared,
|
|
942
|
-
event:
|
|
943
|
-
reason:
|
|
1041
|
+
event: z3.literal("dispatch_failed"),
|
|
1042
|
+
reason: z3.enum(["timeout", "crash", "refused", "unattributed_write"]),
|
|
944
1043
|
usage: dispatchUsageField
|
|
945
1044
|
}).strict()
|
|
946
1045
|
]);
|
|
1046
|
+
var CODE_TOKEN_PATTERN = /^[A-Za-z0-9._-]{1,64}$/;
|
|
1047
|
+
var CodeTokenSchema = z3.string().regex(CODE_TOKEN_PATTERN);
|
|
1048
|
+
var ReviewerVerdictSchema = z3.object({
|
|
1049
|
+
role: RoleSchema,
|
|
1050
|
+
outcome: z3.enum(["approve", "changes_requested", "not_reviewed"]),
|
|
1051
|
+
blockers: z3.number().int().nonnegative()
|
|
1052
|
+
}).strict();
|
|
947
1053
|
var loopShared = {
|
|
948
1054
|
meta: HeaderMetaSchema,
|
|
949
1055
|
subject: SubjectSchema,
|
|
950
|
-
kind:
|
|
1056
|
+
kind: z3.literal("dev_review_loop"),
|
|
951
1057
|
...envelopeTail,
|
|
952
|
-
loop_id:
|
|
1058
|
+
loop_id: z3.string()
|
|
953
1059
|
};
|
|
954
|
-
var DevReviewLoopEventSchema =
|
|
955
|
-
|
|
1060
|
+
var DevReviewLoopEventSchema = z3.discriminatedUnion("event", [
|
|
1061
|
+
z3.object({
|
|
956
1062
|
...loopShared,
|
|
957
|
-
event:
|
|
958
|
-
task:
|
|
959
|
-
policy:
|
|
960
|
-
max_rounds:
|
|
961
|
-
reviewers:
|
|
962
|
-
models:
|
|
1063
|
+
event: z3.literal("loop_started"),
|
|
1064
|
+
task: z3.number().int(),
|
|
1065
|
+
policy: z3.object({
|
|
1066
|
+
max_rounds: z3.number().int().nonnegative(),
|
|
1067
|
+
reviewers: z3.array(RoleSchema),
|
|
1068
|
+
models: z3.record(RoleSchema, z3.string())
|
|
963
1069
|
}).strict()
|
|
964
1070
|
}).strict(),
|
|
965
|
-
|
|
966
|
-
|
|
1071
|
+
z3.object({ ...loopShared, event: z3.literal("round_started"), round: z3.number().int(), base_head: z3.string() }).strict(),
|
|
1072
|
+
z3.object({
|
|
967
1073
|
...loopShared,
|
|
968
|
-
event:
|
|
969
|
-
round:
|
|
970
|
-
head:
|
|
971
|
-
green:
|
|
972
|
-
confidence_value:
|
|
973
|
-
confidence_reason:
|
|
974
|
-
confidence_unavailable:
|
|
975
|
-
extra_turn_spent:
|
|
1074
|
+
event: z3.literal("gate_result_read"),
|
|
1075
|
+
round: z3.number().int(),
|
|
1076
|
+
head: z3.string(),
|
|
1077
|
+
green: z3.boolean(),
|
|
1078
|
+
confidence_value: z3.number().int().min(0).max(100).optional(),
|
|
1079
|
+
confidence_reason: z3.string().max(CONFIDENCE_REASON_MAX_LENGTH).optional(),
|
|
1080
|
+
confidence_unavailable: z3.boolean().optional(),
|
|
1081
|
+
extra_turn_spent: z3.boolean().optional()
|
|
976
1082
|
}).strict(),
|
|
977
|
-
|
|
1083
|
+
z3.object({
|
|
978
1084
|
...loopShared,
|
|
979
|
-
event:
|
|
980
|
-
round:
|
|
981
|
-
head:
|
|
982
|
-
all_approve:
|
|
983
|
-
blockers:
|
|
984
|
-
findings:
|
|
1085
|
+
event: z3.literal("verdicts_read"),
|
|
1086
|
+
round: z3.number().int(),
|
|
1087
|
+
head: z3.string(),
|
|
1088
|
+
all_approve: z3.boolean(),
|
|
1089
|
+
blockers: z3.number().int().nonnegative(),
|
|
1090
|
+
findings: z3.array(ReviewFindingSchema).optional(),
|
|
1091
|
+
reviewers: z3.array(ReviewerVerdictSchema).optional()
|
|
985
1092
|
}).strict(),
|
|
986
|
-
|
|
1093
|
+
z3.object({
|
|
987
1094
|
...loopShared,
|
|
988
|
-
event:
|
|
989
|
-
round:
|
|
990
|
-
open:
|
|
991
|
-
resolved:
|
|
992
|
-
new:
|
|
993
|
-
recurring:
|
|
1095
|
+
event: z3.literal("findings_compared"),
|
|
1096
|
+
round: z3.number().int(),
|
|
1097
|
+
open: z3.array(z3.string()),
|
|
1098
|
+
resolved: z3.array(z3.string()),
|
|
1099
|
+
new: z3.array(z3.string()),
|
|
1100
|
+
recurring: z3.array(z3.string())
|
|
994
1101
|
}).strict(),
|
|
995
|
-
|
|
1102
|
+
z3.object({
|
|
996
1103
|
...loopShared,
|
|
997
|
-
event:
|
|
998
|
-
round:
|
|
999
|
-
condition:
|
|
1104
|
+
event: z3.literal("stop_condition_met"),
|
|
1105
|
+
round: z3.number().int(),
|
|
1106
|
+
condition: z3.enum([
|
|
1000
1107
|
"green",
|
|
1001
1108
|
"max_rounds",
|
|
1002
1109
|
"no_progress",
|
|
1003
1110
|
"escalated",
|
|
1004
1111
|
"principal_stop",
|
|
1005
1112
|
"confidence",
|
|
1006
|
-
"reappearance"
|
|
1113
|
+
"reappearance",
|
|
1114
|
+
"repeat_finding",
|
|
1115
|
+
"repeat_failure",
|
|
1116
|
+
"time_budget"
|
|
1007
1117
|
])
|
|
1008
1118
|
}).strict(),
|
|
1009
|
-
|
|
1119
|
+
z3.object({
|
|
1120
|
+
...loopShared,
|
|
1121
|
+
event: z3.literal("paused"),
|
|
1122
|
+
round: z3.number().int(),
|
|
1123
|
+
reason: z3.enum(["escalation", "principal_item", "refreeze_needed"]),
|
|
1124
|
+
reason_code: CodeTokenSchema.optional()
|
|
1125
|
+
}).strict(),
|
|
1126
|
+
z3.object({
|
|
1010
1127
|
...loopShared,
|
|
1011
|
-
event:
|
|
1012
|
-
round:
|
|
1013
|
-
|
|
1128
|
+
event: z3.literal("resumed"),
|
|
1129
|
+
round: z3.number().int(),
|
|
1130
|
+
by: z3.enum(["principal", "driver"])
|
|
1014
1131
|
}).strict(),
|
|
1015
|
-
|
|
1132
|
+
z3.object({
|
|
1016
1133
|
...loopShared,
|
|
1017
|
-
event:
|
|
1018
|
-
round:
|
|
1019
|
-
by:
|
|
1134
|
+
event: z3.literal("cancelled"),
|
|
1135
|
+
round: z3.number().int(),
|
|
1136
|
+
by: z3.literal("principal")
|
|
1020
1137
|
}).strict(),
|
|
1021
|
-
|
|
1138
|
+
z3.object({
|
|
1022
1139
|
...loopShared,
|
|
1023
|
-
event:
|
|
1024
|
-
round:
|
|
1025
|
-
|
|
1140
|
+
event: z3.literal("unpushed_work_resume"),
|
|
1141
|
+
round: z3.number().int(),
|
|
1142
|
+
branch: z3.string(),
|
|
1143
|
+
detail: z3.string()
|
|
1026
1144
|
}).strict(),
|
|
1027
|
-
|
|
1145
|
+
z3.object({
|
|
1028
1146
|
...loopShared,
|
|
1029
|
-
event:
|
|
1030
|
-
round:
|
|
1031
|
-
|
|
1032
|
-
|
|
1147
|
+
event: z3.literal("round_ended"),
|
|
1148
|
+
round: z3.number().int(),
|
|
1149
|
+
base_head: z3.string(),
|
|
1150
|
+
head: z3.string(),
|
|
1151
|
+
files_changed: z3.number().int().nonnegative(),
|
|
1152
|
+
insertions: z3.number().int().nonnegative(),
|
|
1153
|
+
deletions: z3.number().int().nonnegative(),
|
|
1154
|
+
wall_ms: z3.number().nonnegative(),
|
|
1155
|
+
outcome: z3.enum(["green", "changes_requested", "escalated"])
|
|
1033
1156
|
}).strict(),
|
|
1034
|
-
|
|
1157
|
+
z3.object({
|
|
1035
1158
|
...loopShared,
|
|
1036
|
-
event:
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
wall_ms: z2.number().nonnegative(),
|
|
1044
|
-
outcome: z2.enum(["green", "changes_requested", "escalated"])
|
|
1159
|
+
event: z3.literal("journal_finalized"),
|
|
1160
|
+
rounds: z3.number().int().nonnegative(),
|
|
1161
|
+
total_wall_ms: z3.number().nonnegative(),
|
|
1162
|
+
time_to_green_ms: z3.number().nonnegative().nullable(),
|
|
1163
|
+
files_changed_total: z3.number().int().nonnegative(),
|
|
1164
|
+
final_head: z3.string(),
|
|
1165
|
+
result: z3.enum(["merged_ready", "stopped"])
|
|
1045
1166
|
}).strict(),
|
|
1046
|
-
|
|
1167
|
+
z3.object({
|
|
1047
1168
|
...loopShared,
|
|
1048
|
-
event:
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
final_head: z2.string(),
|
|
1054
|
-
result: z2.enum(["merged_ready", "stopped"])
|
|
1169
|
+
event: z3.literal("infrastructure_retry"),
|
|
1170
|
+
round: z3.number().int(),
|
|
1171
|
+
failure_kind: z3.enum(["pause_comment_post", "developer_connection"]),
|
|
1172
|
+
attempts: z3.number().int().positive(),
|
|
1173
|
+
outcome: z3.enum(["recovered", "exhausted"])
|
|
1055
1174
|
}).strict(),
|
|
1056
|
-
|
|
1175
|
+
z3.object({
|
|
1057
1176
|
...loopShared,
|
|
1058
|
-
event:
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1177
|
+
event: z3.literal("driver_heartbeat"),
|
|
1178
|
+
task: z3.number().int(),
|
|
1179
|
+
pr: z3.number().int().positive().optional(),
|
|
1180
|
+
round: z3.number().int(),
|
|
1181
|
+
phase: z3.string()
|
|
1182
|
+
}).strict(),
|
|
1183
|
+
z3.object({
|
|
1184
|
+
...loopShared,
|
|
1185
|
+
event: z3.literal("driver_exited"),
|
|
1186
|
+
task: z3.number().int(),
|
|
1187
|
+
reason: z3.enum(["finished", "paused", "reexec", "error", "signal"]),
|
|
1188
|
+
last_decision: z3.string(),
|
|
1189
|
+
exit_code: z3.number().int().optional(),
|
|
1190
|
+
error_class: CodeTokenSchema.optional()
|
|
1063
1191
|
}).strict()
|
|
1064
1192
|
]);
|
|
1065
|
-
var ForgeOpSchema =
|
|
1193
|
+
var ForgeOpSchema = z3.enum([
|
|
1066
1194
|
"pr.create",
|
|
1067
1195
|
"pr.comment",
|
|
1068
1196
|
"pr.body.replace",
|
|
@@ -1076,24 +1204,24 @@ var ForgeOpSchema = z2.enum([
|
|
|
1076
1204
|
"label.add",
|
|
1077
1205
|
"label.remove"
|
|
1078
1206
|
]);
|
|
1079
|
-
var ForgeWriteTargetSchema =
|
|
1080
|
-
issue:
|
|
1081
|
-
pr:
|
|
1207
|
+
var ForgeWriteTargetSchema = z3.object({
|
|
1208
|
+
issue: z3.number().int().optional(),
|
|
1209
|
+
pr: z3.number().int().optional()
|
|
1082
1210
|
}).strict();
|
|
1083
1211
|
var forgeWriteShared = {
|
|
1084
1212
|
meta: HeaderMetaSchema,
|
|
1085
1213
|
subject: SubjectSchema,
|
|
1086
|
-
kind:
|
|
1214
|
+
kind: z3.literal("forge_write"),
|
|
1087
1215
|
...envelopeTail,
|
|
1088
1216
|
op: ForgeOpSchema,
|
|
1089
1217
|
target: ForgeWriteTargetSchema
|
|
1090
1218
|
};
|
|
1091
|
-
var ForgeWriteEventSchema =
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1219
|
+
var ForgeWriteEventSchema = z3.discriminatedUnion("event", [
|
|
1220
|
+
z3.object({ ...forgeWriteShared, event: z3.literal("validated") }).strict(),
|
|
1221
|
+
z3.object({ ...forgeWriteShared, event: z3.literal("refused"), reason: z3.string() }).strict(),
|
|
1222
|
+
z3.object({ ...forgeWriteShared, event: z3.literal("written"), comment_ids: z3.array(z3.string()) }).strict()
|
|
1095
1223
|
]);
|
|
1096
|
-
var GateOutcomeSchema =
|
|
1224
|
+
var GateOutcomeSchema = z3.enum([
|
|
1097
1225
|
"pass",
|
|
1098
1226
|
"fail",
|
|
1099
1227
|
"wait",
|
|
@@ -1106,61 +1234,74 @@ var GateOutcomeSchema = z2.enum([
|
|
|
1106
1234
|
var gateShared = {
|
|
1107
1235
|
meta: HeaderMetaSchema,
|
|
1108
1236
|
subject: SubjectSchema,
|
|
1109
|
-
kind:
|
|
1237
|
+
kind: z3.literal("gate"),
|
|
1110
1238
|
...envelopeTail,
|
|
1111
|
-
check:
|
|
1112
|
-
check_version:
|
|
1113
|
-
policy_version:
|
|
1114
|
-
input_fingerprint:
|
|
1239
|
+
check: z3.string(),
|
|
1240
|
+
check_version: z3.string().nullable(),
|
|
1241
|
+
policy_version: z3.string().nullable(),
|
|
1242
|
+
input_fingerprint: z3.string().nullable()
|
|
1115
1243
|
};
|
|
1116
|
-
var GateEventSchema =
|
|
1117
|
-
|
|
1244
|
+
var GateEventSchema = z3.discriminatedUnion("event", [
|
|
1245
|
+
z3.object({
|
|
1118
1246
|
...gateShared,
|
|
1119
|
-
event:
|
|
1247
|
+
event: z3.literal("checked"),
|
|
1120
1248
|
outcome: GateOutcomeSchema,
|
|
1121
|
-
reason:
|
|
1249
|
+
reason: z3.string().optional()
|
|
1250
|
+
}).strict(),
|
|
1251
|
+
z3.object({
|
|
1252
|
+
meta: HeaderMetaSchema,
|
|
1253
|
+
subject: SubjectSchema,
|
|
1254
|
+
kind: z3.literal("gate"),
|
|
1255
|
+
...envelopeTail,
|
|
1256
|
+
event: z3.literal("summary"),
|
|
1257
|
+
ran: z3.number().int().nonnegative(),
|
|
1258
|
+
passed: z3.number().int().nonnegative(),
|
|
1259
|
+
failed: z3.number().int().nonnegative(),
|
|
1260
|
+
skipped: z3.number().int().nonnegative(),
|
|
1261
|
+
failed_checks: z3.array(z3.string())
|
|
1122
1262
|
}).strict()
|
|
1123
1263
|
]);
|
|
1124
|
-
var OperationResultSchema =
|
|
1264
|
+
var OperationResultSchema = z3.enum(["ok", "error", "refused", "timeout", "cancelled", "unavailable"]);
|
|
1125
1265
|
var operationShared = {
|
|
1126
1266
|
meta: HeaderMetaSchema,
|
|
1127
1267
|
subject: SubjectSchema,
|
|
1128
|
-
kind:
|
|
1268
|
+
kind: z3.literal("operation"),
|
|
1129
1269
|
...envelopeTail,
|
|
1130
|
-
operation:
|
|
1131
|
-
target:
|
|
1270
|
+
operation: z3.string(),
|
|
1271
|
+
target: z3.string().nullable()
|
|
1132
1272
|
};
|
|
1133
|
-
var OperationEventSchema =
|
|
1134
|
-
|
|
1273
|
+
var OperationEventSchema = z3.discriminatedUnion("event", [
|
|
1274
|
+
z3.object({
|
|
1135
1275
|
...operationShared,
|
|
1136
|
-
event:
|
|
1276
|
+
event: z3.literal("completed"),
|
|
1137
1277
|
result: OperationResultSchema,
|
|
1138
|
-
error_class:
|
|
1278
|
+
error_class: z3.string().nullable(),
|
|
1279
|
+
field_names: z3.array(z3.string().max(CUSTOM_FIELD_NAME_MAX_LENGTH)).max(CUSTOM_EVENT_MAX_FIELDS).optional()
|
|
1139
1280
|
}).strict()
|
|
1140
1281
|
]);
|
|
1141
|
-
var UsageUnitsSchema =
|
|
1142
|
-
input:
|
|
1143
|
-
output:
|
|
1144
|
-
cache:
|
|
1282
|
+
var UsageUnitsSchema = z3.object({
|
|
1283
|
+
input: z3.number().nonnegative().nullable(),
|
|
1284
|
+
output: z3.number().nonnegative().nullable(),
|
|
1285
|
+
cache: z3.number().nonnegative().nullable()
|
|
1145
1286
|
}).strict();
|
|
1146
1287
|
var usageShared = {
|
|
1147
1288
|
meta: HeaderMetaSchema,
|
|
1148
1289
|
subject: SubjectSchema,
|
|
1149
|
-
kind:
|
|
1290
|
+
kind: z3.literal("usage"),
|
|
1150
1291
|
...envelopeTail,
|
|
1151
|
-
model:
|
|
1152
|
-
source:
|
|
1153
|
-
semantics:
|
|
1292
|
+
model: z3.string().nullable(),
|
|
1293
|
+
source: z3.string(),
|
|
1294
|
+
semantics: z3.enum(["cumulative", "delta"])
|
|
1154
1295
|
};
|
|
1155
|
-
var UsageEventSchema =
|
|
1156
|
-
|
|
1296
|
+
var UsageEventSchema = z3.discriminatedUnion("event", [
|
|
1297
|
+
z3.object({
|
|
1157
1298
|
...usageShared,
|
|
1158
|
-
event:
|
|
1299
|
+
event: z3.literal("observed"),
|
|
1159
1300
|
units: UsageUnitsSchema,
|
|
1160
|
-
unknown_reason:
|
|
1301
|
+
unknown_reason: z3.string().nullable()
|
|
1161
1302
|
}).strict()
|
|
1162
1303
|
]);
|
|
1163
|
-
var RoleAttemptOutcomeSchema =
|
|
1304
|
+
var RoleAttemptOutcomeSchema = z3.enum([
|
|
1164
1305
|
"completed",
|
|
1165
1306
|
"incomplete",
|
|
1166
1307
|
"infrastructure_failed",
|
|
@@ -1171,17 +1312,17 @@ var RoleAttemptOutcomeSchema = z2.enum([
|
|
|
1171
1312
|
var roleAttemptShared = {
|
|
1172
1313
|
meta: HeaderMetaSchema,
|
|
1173
1314
|
subject: SubjectSchema,
|
|
1174
|
-
kind:
|
|
1315
|
+
kind: z3.literal("role_attempt"),
|
|
1175
1316
|
...envelopeTail,
|
|
1176
|
-
actor:
|
|
1177
|
-
attempt:
|
|
1178
|
-
effect_id:
|
|
1179
|
-
model:
|
|
1317
|
+
actor: z3.string().nullable(),
|
|
1318
|
+
attempt: z3.number().int().nullable(),
|
|
1319
|
+
effect_id: z3.string(),
|
|
1320
|
+
model: z3.string().nullable()
|
|
1180
1321
|
};
|
|
1181
|
-
var RoleAttemptEventSchema =
|
|
1182
|
-
|
|
1322
|
+
var RoleAttemptEventSchema = z3.discriminatedUnion("event", [
|
|
1323
|
+
z3.object({
|
|
1183
1324
|
...roleAttemptShared,
|
|
1184
|
-
event:
|
|
1325
|
+
event: z3.literal("attempted"),
|
|
1185
1326
|
outcome: RoleAttemptOutcomeSchema,
|
|
1186
1327
|
usage: dispatchUsageField
|
|
1187
1328
|
}).strict()
|
|
@@ -1189,42 +1330,59 @@ var RoleAttemptEventSchema = z2.discriminatedUnion("event", [
|
|
|
1189
1330
|
var handoffShared = {
|
|
1190
1331
|
meta: HeaderMetaSchema,
|
|
1191
1332
|
subject: SubjectSchema,
|
|
1192
|
-
kind:
|
|
1333
|
+
kind: z3.literal("handoff"),
|
|
1193
1334
|
...envelopeTail,
|
|
1194
|
-
class:
|
|
1195
|
-
reason:
|
|
1335
|
+
class: z3.enum(["authority", "strategy", "product"]),
|
|
1336
|
+
reason: z3.string()
|
|
1196
1337
|
};
|
|
1197
|
-
var HandoffEventSchema =
|
|
1198
|
-
|
|
1338
|
+
var HandoffEventSchema = z3.discriminatedUnion("event", [
|
|
1339
|
+
z3.object({
|
|
1199
1340
|
...handoffShared,
|
|
1200
|
-
event:
|
|
1201
|
-
requested_decision:
|
|
1341
|
+
event: z3.literal("raised"),
|
|
1342
|
+
requested_decision: z3.string().nullable()
|
|
1202
1343
|
}).strict(),
|
|
1203
|
-
|
|
1344
|
+
z3.object({
|
|
1204
1345
|
...handoffShared,
|
|
1205
|
-
event:
|
|
1206
|
-
resolution:
|
|
1207
|
-
resolved_by:
|
|
1346
|
+
event: z3.literal("resolved"),
|
|
1347
|
+
resolution: z3.string().nullable(),
|
|
1348
|
+
resolved_by: z3.string().nullable()
|
|
1208
1349
|
}).strict()
|
|
1209
1350
|
]);
|
|
1210
|
-
var EffectTargetSchema =
|
|
1211
|
-
kind:
|
|
1212
|
-
ref:
|
|
1351
|
+
var EffectTargetSchema = z3.object({
|
|
1352
|
+
kind: z3.string(),
|
|
1353
|
+
ref: z3.string()
|
|
1213
1354
|
}).strict();
|
|
1214
1355
|
var effectShared = {
|
|
1215
1356
|
meta: HeaderMetaSchema,
|
|
1216
1357
|
subject: SubjectSchema,
|
|
1217
|
-
kind:
|
|
1358
|
+
kind: z3.literal("effect"),
|
|
1218
1359
|
...envelopeTail,
|
|
1219
|
-
effect_id:
|
|
1360
|
+
effect_id: z3.string(),
|
|
1220
1361
|
target: EffectTargetSchema
|
|
1221
1362
|
};
|
|
1222
|
-
var EffectEventSchema =
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1363
|
+
var EffectEventSchema = z3.discriminatedUnion("event", [
|
|
1364
|
+
z3.object({ ...effectShared, event: z3.literal("attempted") }).strict(),
|
|
1365
|
+
z3.object({ ...effectShared, event: z3.literal("observed"), outcome: z3.enum(["success", "failure", "uncertain"]) }).strict(),
|
|
1366
|
+
z3.object({ ...effectShared, event: z3.literal("verified"), outcome: z3.enum(["success", "failure", "uncertain"]) }).strict()
|
|
1226
1367
|
]);
|
|
1227
|
-
var
|
|
1368
|
+
var CustomFieldValueSchema = z3.union([z3.string().max(CUSTOM_TEXT_MAX_LENGTH), z3.number().finite(), z3.boolean()]);
|
|
1369
|
+
var customShared = {
|
|
1370
|
+
meta: HeaderMetaV3Schema,
|
|
1371
|
+
subject: SubjectSchema,
|
|
1372
|
+
kind: z3.literal("custom"),
|
|
1373
|
+
...envelopeTail
|
|
1374
|
+
};
|
|
1375
|
+
var CustomEventSchema = z3.discriminatedUnion("event", [
|
|
1376
|
+
z3.object({
|
|
1377
|
+
...customShared,
|
|
1378
|
+
event: z3.literal("recorded"),
|
|
1379
|
+
name: z3.string().max(CUSTOM_EVENT_NAME_MAX_LENGTH).regex(CUSTOM_EVENT_NAME_PATTERN),
|
|
1380
|
+
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, {
|
|
1381
|
+
message: `custom: at most ${CUSTOM_EVENT_MAX_FIELDS} fields`
|
|
1382
|
+
})
|
|
1383
|
+
}).strict()
|
|
1384
|
+
]);
|
|
1385
|
+
var LogEventSchema = z3.union([
|
|
1228
1386
|
DispatchEventSchema,
|
|
1229
1387
|
DevReviewLoopEventSchema,
|
|
1230
1388
|
ForgeWriteEventSchema,
|
|
@@ -1233,10 +1391,11 @@ var LogEventSchema = z2.union([
|
|
|
1233
1391
|
UsageEventSchema,
|
|
1234
1392
|
RoleAttemptEventSchema,
|
|
1235
1393
|
HandoffEventSchema,
|
|
1236
|
-
EffectEventSchema
|
|
1394
|
+
EffectEventSchema,
|
|
1395
|
+
CustomEventSchema
|
|
1237
1396
|
]);
|
|
1238
|
-
|
|
1239
1397
|
// ../../packages/aeg-core/src/log/envelope.ts
|
|
1398
|
+
import { createHash } from "node:crypto";
|
|
1240
1399
|
function isRole(value) {
|
|
1241
1400
|
return value !== undefined && ROLE_VALUES.includes(value);
|
|
1242
1401
|
}
|
|
@@ -1273,18 +1432,27 @@ function roundFromEnv(round) {
|
|
|
1273
1432
|
const n = Number(round);
|
|
1274
1433
|
return Number.isInteger(n) ? n : undefined;
|
|
1275
1434
|
}
|
|
1435
|
+
function prFromEnv(pr) {
|
|
1436
|
+
if (pr === undefined || pr === "")
|
|
1437
|
+
return;
|
|
1438
|
+
const n = Number(pr);
|
|
1439
|
+
return Number.isInteger(n) && n > 0 ? n : undefined;
|
|
1440
|
+
}
|
|
1276
1441
|
function buildHeader(input) {
|
|
1277
1442
|
const role = isRole(input.env.role) ? input.env.role : "unattributed";
|
|
1278
1443
|
const round = roundFromEnv(input.env.round);
|
|
1444
|
+
const pr = prFromEnv(input.env.pr);
|
|
1279
1445
|
const subject = {
|
|
1280
1446
|
issue: issueFromTask(input.env.task) ?? input.branchIssue ?? null,
|
|
1281
1447
|
role,
|
|
1282
1448
|
...round !== undefined ? { round } : {},
|
|
1449
|
+
...pr !== undefined ? { pr } : {},
|
|
1283
1450
|
...input.subject ?? {}
|
|
1284
1451
|
};
|
|
1452
|
+
const issue = subject.issue;
|
|
1285
1453
|
return {
|
|
1286
1454
|
meta: {
|
|
1287
|
-
schema:
|
|
1455
|
+
schema: 3,
|
|
1288
1456
|
ts: input.now.toISOString(),
|
|
1289
1457
|
run_id: input.runId,
|
|
1290
1458
|
seq: input.seq,
|
|
@@ -1307,7 +1475,19 @@ function buildHeader(input) {
|
|
|
1307
1475
|
ruling_ordinal: input.inputVersions?.rulingOrdinal ?? null,
|
|
1308
1476
|
policy_digest: input.inputVersions?.policyDigest ?? null
|
|
1309
1477
|
},
|
|
1310
|
-
provenance: provenanceFor(input)
|
|
1478
|
+
provenance: provenanceFor(input),
|
|
1479
|
+
work: {
|
|
1480
|
+
ref: lineageFieldFromEnv(input.env.workRef) ?? (issue === null ? null : String(issue)),
|
|
1481
|
+
repo: input.repo,
|
|
1482
|
+
change: null,
|
|
1483
|
+
revision: null
|
|
1484
|
+
},
|
|
1485
|
+
flow: {
|
|
1486
|
+
id: lineageFieldFromEnv(input.env.flow) ?? "vinaya",
|
|
1487
|
+
version: lineageFieldFromEnv(input.env.flowVersion)
|
|
1488
|
+
},
|
|
1489
|
+
runtime: lineageFieldFromEnv(input.env.runtime),
|
|
1490
|
+
source: lineageFieldFromEnv(input.env.source)
|
|
1311
1491
|
},
|
|
1312
1492
|
subject
|
|
1313
1493
|
};
|
|
@@ -1350,7 +1530,7 @@ function redact(value, home) {
|
|
|
1350
1530
|
return value;
|
|
1351
1531
|
}
|
|
1352
1532
|
// ../../packages/aeg-core/src/log/store.ts
|
|
1353
|
-
var KNOWN_SCHEMA_VERSIONS = [1, 2];
|
|
1533
|
+
var KNOWN_SCHEMA_VERSIONS = [1, 2, 3];
|
|
1354
1534
|
function metaOf(obj) {
|
|
1355
1535
|
if (obj === null || typeof obj !== "object")
|
|
1356
1536
|
return null;
|
|
@@ -1416,7 +1596,7 @@ function classifyStoredLine(raw, home) {
|
|
|
1416
1596
|
return { status: "invalid", identity: null, raw, reason: "valid event with no derivable identity" };
|
|
1417
1597
|
}
|
|
1418
1598
|
const redacted = redact(event, home);
|
|
1419
|
-
const provenance = version
|
|
1599
|
+
const provenance = version >= 2 ? event.meta.provenance ?? null : null;
|
|
1420
1600
|
return {
|
|
1421
1601
|
status: "ok",
|
|
1422
1602
|
identity,
|
|
@@ -1429,132 +1609,139 @@ function classifyStoredLine(raw, home) {
|
|
|
1429
1609
|
};
|
|
1430
1610
|
}
|
|
1431
1611
|
// ../../packages/aeg-core/src/control-store/records.ts
|
|
1432
|
-
import { z as
|
|
1433
|
-
var isoTimestamp =
|
|
1434
|
-
var taskId =
|
|
1435
|
-
var epochNumber =
|
|
1436
|
-
var RunRecordSchema =
|
|
1437
|
-
version:
|
|
1438
|
-
kind:
|
|
1612
|
+
import { z as z4 } from "zod";
|
|
1613
|
+
var isoTimestamp = z4.string().min(1);
|
|
1614
|
+
var taskId = z4.number().int().positive();
|
|
1615
|
+
var epochNumber = z4.number().int().nonnegative();
|
|
1616
|
+
var RunRecordSchema = z4.object({
|
|
1617
|
+
version: z4.literal(1),
|
|
1618
|
+
kind: z4.literal("run"),
|
|
1439
1619
|
task: taskId,
|
|
1440
|
-
runId:
|
|
1441
|
-
pid:
|
|
1442
|
-
host:
|
|
1620
|
+
runId: z4.string().min(1),
|
|
1621
|
+
pid: z4.number().int().positive(),
|
|
1622
|
+
host: z4.string().min(1),
|
|
1443
1623
|
startedAt: isoTimestamp,
|
|
1444
|
-
childStartedAt:
|
|
1445
|
-
childCommand:
|
|
1624
|
+
childStartedAt: z4.string().min(1).nullable().optional(),
|
|
1625
|
+
childCommand: z4.string().min(1).nullable().optional()
|
|
1446
1626
|
}).strict();
|
|
1447
|
-
var InputRecordSchema =
|
|
1448
|
-
version:
|
|
1449
|
-
kind:
|
|
1627
|
+
var InputRecordSchema = z4.object({
|
|
1628
|
+
version: z4.literal(1),
|
|
1629
|
+
kind: z4.literal("input"),
|
|
1450
1630
|
task: taskId,
|
|
1451
|
-
runId:
|
|
1452
|
-
source:
|
|
1453
|
-
pr:
|
|
1454
|
-
round:
|
|
1631
|
+
runId: z4.string().min(1),
|
|
1632
|
+
source: z4.union([z4.literal("fresh"), z4.literal("resume")]),
|
|
1633
|
+
pr: z4.number().int().positive().nullable(),
|
|
1634
|
+
round: z4.number().int().nonnegative(),
|
|
1455
1635
|
recordedAt: isoTimestamp
|
|
1456
1636
|
}).strict();
|
|
1457
|
-
var OwnershipRecordSchema =
|
|
1458
|
-
version:
|
|
1459
|
-
kind:
|
|
1637
|
+
var OwnershipRecordSchema = z4.object({
|
|
1638
|
+
version: z4.literal(1),
|
|
1639
|
+
kind: z4.literal("ownership"),
|
|
1460
1640
|
task: taskId,
|
|
1461
1641
|
epoch: epochNumber,
|
|
1462
|
-
ownerId:
|
|
1463
|
-
pid:
|
|
1464
|
-
host:
|
|
1642
|
+
ownerId: z4.string().min(1),
|
|
1643
|
+
pid: z4.number().int().positive(),
|
|
1644
|
+
host: z4.string().min(1),
|
|
1465
1645
|
acquiredAt: isoTimestamp
|
|
1466
1646
|
}).strict();
|
|
1467
|
-
var TransitionRecordSchema =
|
|
1468
|
-
version:
|
|
1469
|
-
kind:
|
|
1647
|
+
var TransitionRecordSchema = z4.object({
|
|
1648
|
+
version: z4.literal(1),
|
|
1649
|
+
kind: z4.literal("transition"),
|
|
1470
1650
|
task: taskId,
|
|
1471
1651
|
epoch: epochNumber,
|
|
1472
|
-
seq:
|
|
1473
|
-
from:
|
|
1474
|
-
to:
|
|
1475
|
-
detail:
|
|
1652
|
+
seq: z4.number().int().nonnegative(),
|
|
1653
|
+
from: z4.string().min(1),
|
|
1654
|
+
to: z4.string().min(1),
|
|
1655
|
+
detail: z4.string().optional(),
|
|
1476
1656
|
at: isoTimestamp
|
|
1477
1657
|
}).strict();
|
|
1478
|
-
var ManifestRecordSchema =
|
|
1479
|
-
version:
|
|
1480
|
-
kind:
|
|
1658
|
+
var ManifestRecordSchema = z4.object({
|
|
1659
|
+
version: z4.literal(1),
|
|
1660
|
+
kind: z4.literal("manifest"),
|
|
1481
1661
|
task: taskId,
|
|
1482
1662
|
round: epochNumber,
|
|
1483
|
-
repository:
|
|
1484
|
-
pr:
|
|
1485
|
-
branch:
|
|
1486
|
-
baseSha:
|
|
1487
|
-
headSha:
|
|
1488
|
-
briefHash:
|
|
1489
|
-
objectivesVersion:
|
|
1663
|
+
repository: z4.string().min(1),
|
|
1664
|
+
pr: z4.number().int().positive(),
|
|
1665
|
+
branch: z4.string().min(1),
|
|
1666
|
+
baseSha: z4.string().min(1).nullable(),
|
|
1667
|
+
headSha: z4.string().min(1),
|
|
1668
|
+
briefHash: z4.string().min(1).nullable(),
|
|
1669
|
+
objectivesVersion: z4.string().min(1).nullable(),
|
|
1490
1670
|
rulingOrdinal: epochNumber,
|
|
1491
|
-
policyDigest:
|
|
1671
|
+
policyDigest: z4.string().min(1),
|
|
1492
1672
|
recordedAt: isoTimestamp
|
|
1493
1673
|
}).strict();
|
|
1494
|
-
var roundHeadIdentity =
|
|
1495
|
-
var LoopBudgetsSchema =
|
|
1496
|
-
mechanicalRetries:
|
|
1497
|
-
reviewRounds:
|
|
1498
|
-
infrastructureRetries:
|
|
1674
|
+
var roundHeadIdentity = z4.object({ round: z4.number().int().positive(), head: z4.string().min(1) }).strict();
|
|
1675
|
+
var LoopBudgetsSchema = z4.object({
|
|
1676
|
+
mechanicalRetries: z4.number().int().nonnegative(),
|
|
1677
|
+
reviewRounds: z4.number().int().nonnegative(),
|
|
1678
|
+
infrastructureRetries: z4.number().int().nonnegative()
|
|
1499
1679
|
}).strict();
|
|
1500
|
-
var LoopStateRecordSchema =
|
|
1501
|
-
version:
|
|
1502
|
-
kind:
|
|
1680
|
+
var LoopStateRecordSchema = z4.object({
|
|
1681
|
+
version: z4.literal(1),
|
|
1682
|
+
kind: z4.literal("loop_state"),
|
|
1503
1683
|
task: taskId,
|
|
1504
|
-
round:
|
|
1505
|
-
phase:
|
|
1506
|
-
pauseReason:
|
|
1684
|
+
round: z4.number().int().positive(),
|
|
1685
|
+
phase: z4.string().min(1),
|
|
1686
|
+
pauseReason: z4.string().min(1).nullable(),
|
|
1507
1687
|
budgets: LoopBudgetsSchema,
|
|
1508
1688
|
heldResult: roundHeadIdentity.nullable(),
|
|
1509
1689
|
deliveredFindings: roundHeadIdentity.nullable(),
|
|
1690
|
+
repeatMemory: z4.object({
|
|
1691
|
+
blockingFindings: z4.array(z4.string()),
|
|
1692
|
+
lastFailure: z4.object({ signature: z4.string(), message: z4.string() }).nullable()
|
|
1693
|
+
}).strict().optional(),
|
|
1694
|
+
publicationExpectedBase: z4.string().regex(/^[0-9a-f]{40}$/).nullable().optional(),
|
|
1695
|
+
taskStartedAt: isoTimestamp.optional(),
|
|
1696
|
+
phaseMs: z4.record(z4.string(), z4.number().nonnegative()).optional(),
|
|
1510
1697
|
recordedAt: isoTimestamp
|
|
1511
1698
|
}).strict();
|
|
1512
|
-
var EffectRecordSchema =
|
|
1513
|
-
version:
|
|
1514
|
-
kind:
|
|
1699
|
+
var EffectRecordSchema = z4.object({
|
|
1700
|
+
version: z4.literal(1),
|
|
1701
|
+
kind: z4.literal("effect"),
|
|
1515
1702
|
task: taskId,
|
|
1516
|
-
key:
|
|
1517
|
-
operation:
|
|
1518
|
-
target:
|
|
1519
|
-
inputVersion:
|
|
1520
|
-
payloadDigest:
|
|
1521
|
-
status:
|
|
1522
|
-
url:
|
|
1703
|
+
key: z4.string().min(1),
|
|
1704
|
+
operation: z4.string().min(1),
|
|
1705
|
+
target: z4.string().min(1),
|
|
1706
|
+
inputVersion: z4.number().int().nonnegative(),
|
|
1707
|
+
payloadDigest: z4.string().min(1),
|
|
1708
|
+
status: z4.union([z4.literal("started"), z4.literal("verified"), z4.literal("uncertain")]),
|
|
1709
|
+
url: z4.string().optional(),
|
|
1523
1710
|
recordedAt: isoTimestamp
|
|
1524
1711
|
}).strict();
|
|
1525
|
-
var EscalationRecordSchema =
|
|
1526
|
-
version:
|
|
1527
|
-
kind:
|
|
1712
|
+
var EscalationRecordSchema = z4.object({
|
|
1713
|
+
version: z4.literal(1),
|
|
1714
|
+
kind: z4.literal("escalation"),
|
|
1528
1715
|
task: taskId,
|
|
1529
|
-
escalationId:
|
|
1716
|
+
escalationId: z4.string().min(1),
|
|
1530
1717
|
round: epochNumber,
|
|
1531
|
-
head:
|
|
1532
|
-
branch:
|
|
1533
|
-
pr:
|
|
1534
|
-
runId:
|
|
1535
|
-
pid:
|
|
1536
|
-
host:
|
|
1537
|
-
agent:
|
|
1538
|
-
reason:
|
|
1539
|
-
detail:
|
|
1540
|
-
evidence:
|
|
1541
|
-
attemptedRecovery:
|
|
1542
|
-
requestedDecision:
|
|
1543
|
-
recipient:
|
|
1544
|
-
briefHash:
|
|
1545
|
-
objectivesVersion:
|
|
1718
|
+
head: z4.string().min(1),
|
|
1719
|
+
branch: z4.string().min(1),
|
|
1720
|
+
pr: z4.number().int().positive().nullable(),
|
|
1721
|
+
runId: z4.string().min(1),
|
|
1722
|
+
pid: z4.number().int().positive(),
|
|
1723
|
+
host: z4.string().min(1),
|
|
1724
|
+
agent: z4.string().min(1).optional(),
|
|
1725
|
+
reason: z4.string().min(1),
|
|
1726
|
+
detail: z4.string().optional(),
|
|
1727
|
+
evidence: z4.string().optional(),
|
|
1728
|
+
attemptedRecovery: z4.string().min(1),
|
|
1729
|
+
requestedDecision: z4.string().min(1),
|
|
1730
|
+
recipient: z4.string().min(1),
|
|
1731
|
+
briefHash: z4.string().min(1).nullable(),
|
|
1732
|
+
objectivesVersion: z4.string().min(1).nullable(),
|
|
1546
1733
|
rulingOrdinal: epochNumber,
|
|
1547
|
-
policyDigest:
|
|
1734
|
+
policyDigest: z4.string().min(1),
|
|
1548
1735
|
recordedAt: isoTimestamp
|
|
1549
1736
|
}).strict();
|
|
1550
|
-
var ResolutionRecordSchema =
|
|
1551
|
-
version:
|
|
1552
|
-
kind:
|
|
1737
|
+
var ResolutionRecordSchema = z4.object({
|
|
1738
|
+
version: z4.literal(1),
|
|
1739
|
+
kind: z4.literal("resolution"),
|
|
1553
1740
|
task: taskId,
|
|
1554
|
-
escalationId:
|
|
1555
|
-
decision:
|
|
1556
|
-
authenticatedBy:
|
|
1557
|
-
authenticatedFrom:
|
|
1741
|
+
escalationId: z4.string().min(1),
|
|
1742
|
+
decision: z4.union([z4.literal("resume"), z4.literal("cancel")]),
|
|
1743
|
+
authenticatedBy: z4.string().min(1),
|
|
1744
|
+
authenticatedFrom: z4.string().min(1),
|
|
1558
1745
|
consumedAt: isoTimestamp
|
|
1559
1746
|
}).strict();
|
|
1560
1747
|
// ../../packages/aeg-core/src/control-store/local.ts
|
|
@@ -1637,23 +1824,23 @@ var CONTROL_AREA_DIRNAME = "control";
|
|
|
1637
1824
|
var AGENT_VENDORS = ["skills", "claude", "gemini"];
|
|
1638
1825
|
|
|
1639
1826
|
// src/lib/config.ts
|
|
1640
|
-
var EnvEntrySchema =
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1827
|
+
var EnvEntrySchema = z5.union([
|
|
1828
|
+
z5.literal(true),
|
|
1829
|
+
z5.object({ optional: z5.literal(true) }),
|
|
1830
|
+
z5.object({ anyOf: z5.array(z5.string()).min(2) }),
|
|
1831
|
+
z5.string()
|
|
1645
1832
|
]);
|
|
1646
|
-
var CheckEntrySchema =
|
|
1647
|
-
run:
|
|
1648
|
-
scope:
|
|
1649
|
-
include:
|
|
1650
|
-
args:
|
|
1651
|
-
timeoutMs:
|
|
1652
|
-
env:
|
|
1653
|
-
requiresOpenPr:
|
|
1654
|
-
ownWorkflow:
|
|
1655
|
-
principalOwed:
|
|
1656
|
-
validates:
|
|
1833
|
+
var CheckEntrySchema = z5.object({
|
|
1834
|
+
run: z5.string(),
|
|
1835
|
+
scope: z5.enum(["diff", "full"]),
|
|
1836
|
+
include: z5.array(z5.string()).optional(),
|
|
1837
|
+
args: z5.array(z5.string()).optional(),
|
|
1838
|
+
timeoutMs: z5.number().optional(),
|
|
1839
|
+
env: z5.record(z5.string(), EnvEntrySchema).optional(),
|
|
1840
|
+
requiresOpenPr: z5.boolean().optional(),
|
|
1841
|
+
ownWorkflow: z5.boolean().optional(),
|
|
1842
|
+
principalOwed: z5.literal(true).optional(),
|
|
1843
|
+
validates: z5.enum(["body", "issue"]).optional()
|
|
1657
1844
|
}).superRefine((entry, ctx) => {
|
|
1658
1845
|
if (!entry.env)
|
|
1659
1846
|
return;
|
|
@@ -1663,22 +1850,22 @@ var CheckEntrySchema = z4.object({
|
|
|
1663
1850
|
const members = value.anyOf;
|
|
1664
1851
|
if (new Set(members).size !== members.length) {
|
|
1665
1852
|
ctx.addIssue({
|
|
1666
|
-
code:
|
|
1853
|
+
code: z5.ZodIssueCode.custom,
|
|
1667
1854
|
message: `env.${key}.anyOf has duplicate members`,
|
|
1668
1855
|
path: ["env", key, "anyOf"]
|
|
1669
1856
|
});
|
|
1670
1857
|
}
|
|
1671
1858
|
if (!members.includes(key)) {
|
|
1672
1859
|
ctx.addIssue({
|
|
1673
|
-
code:
|
|
1860
|
+
code: z5.ZodIssueCode.custom,
|
|
1674
1861
|
message: `env.${key}.anyOf must include "${key}" itself as a member`,
|
|
1675
1862
|
path: ["env", key, "anyOf"]
|
|
1676
1863
|
});
|
|
1677
1864
|
}
|
|
1678
1865
|
}
|
|
1679
1866
|
});
|
|
1680
|
-
var RoleEntrySchema =
|
|
1681
|
-
contract:
|
|
1867
|
+
var RoleEntrySchema = z5.object({
|
|
1868
|
+
contract: z5.string().refine((p) => p.includes("/"), {
|
|
1682
1869
|
message: 'must be a path (contain at least one "/"), not a bare filename'
|
|
1683
1870
|
})
|
|
1684
1871
|
});
|
|
@@ -1702,17 +1889,17 @@ var BRIEF_BUILTINS = [
|
|
|
1702
1889
|
"briefSections",
|
|
1703
1890
|
"milestoneShape"
|
|
1704
1891
|
];
|
|
1705
|
-
var BriefSectionSchema =
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1892
|
+
var BriefSectionSchema = z5.union([
|
|
1893
|
+
z5.object({ builtin: z5.enum(BRIEF_BUILTINS) }),
|
|
1894
|
+
z5.object({ heading: z5.string().min(1), name: z5.string().optional() }),
|
|
1895
|
+
z5.object({ field: z5.string().min(1), name: z5.string().optional() }),
|
|
1896
|
+
z5.object({ phrase: z5.string().min(1), name: z5.string().optional() })
|
|
1710
1897
|
]);
|
|
1711
|
-
var BriefSchemaSchema =
|
|
1712
|
-
pr:
|
|
1713
|
-
issue:
|
|
1714
|
-
milestone:
|
|
1715
|
-
ack:
|
|
1898
|
+
var BriefSchemaSchema = z5.object({
|
|
1899
|
+
pr: z5.object({ sections: z5.array(BriefSectionSchema) }).optional(),
|
|
1900
|
+
issue: z5.object({ sections: z5.array(BriefSectionSchema) }).optional(),
|
|
1901
|
+
milestone: z5.object({ sections: z5.array(BriefSectionSchema) }).optional(),
|
|
1902
|
+
ack: z5.array(z5.enum(BRIEF_BUILTINS)).optional()
|
|
1716
1903
|
});
|
|
1717
1904
|
function isSafeRepoRelPath(p) {
|
|
1718
1905
|
if (p.length === 0)
|
|
@@ -1721,7 +1908,7 @@ function isSafeRepoRelPath(p) {
|
|
|
1721
1908
|
return false;
|
|
1722
1909
|
return p.split(/[\\/]/).every((seg) => seg !== ".." && seg !== "");
|
|
1723
1910
|
}
|
|
1724
|
-
var SafeRepoRelPath =
|
|
1911
|
+
var SafeRepoRelPath = z5.string().refine(isSafeRepoRelPath, {
|
|
1725
1912
|
message: "must be a repo-root-relative path with no `..` segment or absolute root"
|
|
1726
1913
|
});
|
|
1727
1914
|
var CANONICAL_HOOK_BLOCK_PREFIXES = [".git/", ".husky/", ".vinaya/hooks/", ".claude/hooks/"];
|
|
@@ -1731,22 +1918,22 @@ function isCanonicalHookBlockPath(p) {
|
|
|
1731
1918
|
var ManagedHookBlockPath = SafeRepoRelPath.refine(isCanonicalHookBlockPath, {
|
|
1732
1919
|
message: `must start with one of ${CANONICAL_HOOK_BLOCK_PREFIXES.join(", ")} (byte-exact, case-sensitive)`
|
|
1733
1920
|
});
|
|
1734
|
-
var ManagedBlockRecordSchema =
|
|
1921
|
+
var ManagedBlockRecordSchema = z5.object({
|
|
1735
1922
|
path: ManagedHookBlockPath,
|
|
1736
|
-
marker:
|
|
1737
|
-
comment:
|
|
1923
|
+
marker: z5.string(),
|
|
1924
|
+
comment: z5.enum(["hash", "html"])
|
|
1738
1925
|
});
|
|
1739
|
-
var ManagedManifestSchema =
|
|
1740
|
-
version:
|
|
1741
|
-
files:
|
|
1742
|
-
blocks:
|
|
1743
|
-
labels:
|
|
1744
|
-
agents:
|
|
1926
|
+
var ManagedManifestSchema = z5.object({
|
|
1927
|
+
version: z5.number().int().positive(),
|
|
1928
|
+
files: z5.array(SafeRepoRelPath),
|
|
1929
|
+
blocks: z5.array(ManagedBlockRecordSchema),
|
|
1930
|
+
labels: z5.array(z5.string()),
|
|
1931
|
+
agents: z5.array(z5.enum(AGENT_VENDORS)).optional()
|
|
1745
1932
|
});
|
|
1746
|
-
var ProjectEntrySchema =
|
|
1747
|
-
name:
|
|
1748
|
-
description:
|
|
1749
|
-
path:
|
|
1933
|
+
var ProjectEntrySchema = z5.object({
|
|
1934
|
+
name: z5.string().min(1),
|
|
1935
|
+
description: z5.string().min(1).optional(),
|
|
1936
|
+
path: z5.string().min(1).optional()
|
|
1750
1937
|
});
|
|
1751
1938
|
function parseTokensCollectDeclaration(value) {
|
|
1752
1939
|
const m = value.trim().match(/^(\S+)\s+(\S+)$/);
|
|
@@ -1757,87 +1944,97 @@ function parseTokensCollectDeclaration(value) {
|
|
|
1757
1944
|
return null;
|
|
1758
1945
|
return { interpreter, script };
|
|
1759
1946
|
}
|
|
1760
|
-
var VinayaConfigSchema =
|
|
1761
|
-
rings:
|
|
1762
|
-
ring1_forgeWriteInterception:
|
|
1763
|
-
ring2_asyncAudits:
|
|
1947
|
+
var VinayaConfigSchema = z5.object({
|
|
1948
|
+
rings: z5.object({
|
|
1949
|
+
ring1_forgeWriteInterception: z5.boolean(),
|
|
1950
|
+
ring2_asyncAudits: z5.boolean()
|
|
1764
1951
|
}).optional(),
|
|
1765
|
-
checks:
|
|
1766
|
-
roles:
|
|
1952
|
+
checks: z5.record(z5.string(), CheckEntrySchema).optional(),
|
|
1953
|
+
roles: z5.record(z5.string(), RoleEntrySchema).optional(),
|
|
1767
1954
|
briefSchema: BriefSchemaSchema.optional(),
|
|
1768
1955
|
managed: ManagedManifestSchema.optional(),
|
|
1769
|
-
principals:
|
|
1770
|
-
releaseActor:
|
|
1771
|
-
ci:
|
|
1772
|
-
tokens:
|
|
1773
|
-
collect:
|
|
1956
|
+
principals: z5.array(z5.string()).min(1).optional(),
|
|
1957
|
+
releaseActor: z5.string().min(1).optional(),
|
|
1958
|
+
ci: z5.object({ setup: z5.string().min(1) }).optional(),
|
|
1959
|
+
tokens: z5.object({
|
|
1960
|
+
collect: z5.string().min(1).refine((v) => parseTokensCollectDeclaration(v) !== null, {
|
|
1774
1961
|
message: 'tokens.collect must be exactly "<interpreter> <repo-relative-script-path>" — two whitespace-separated tokens, no flags, no shell syntax, no quoting'
|
|
1775
1962
|
})
|
|
1776
1963
|
}).optional(),
|
|
1777
|
-
blastRadius:
|
|
1778
|
-
proseGates:
|
|
1779
|
-
doctrineRoot:
|
|
1780
|
-
readerFacingPrefix:
|
|
1781
|
-
readerFacingSuffix:
|
|
1782
|
-
legacySlugDir:
|
|
1783
|
-
sourceComments:
|
|
1784
|
-
globs:
|
|
1785
|
-
allowlist:
|
|
1786
|
-
severity:
|
|
1964
|
+
blastRadius: z5.object({ extraDomains: z5.array(z5.string()).optional() }).optional(),
|
|
1965
|
+
proseGates: z5.object({
|
|
1966
|
+
doctrineRoot: z5.string().min(1).optional(),
|
|
1967
|
+
readerFacingPrefix: z5.string().min(1).optional(),
|
|
1968
|
+
readerFacingSuffix: z5.string().min(1).optional(),
|
|
1969
|
+
legacySlugDir: z5.string().min(1).optional(),
|
|
1970
|
+
sourceComments: z5.object({
|
|
1971
|
+
globs: z5.array(z5.string().min(1)).optional(),
|
|
1972
|
+
allowlist: z5.array(z5.string().min(1)).optional(),
|
|
1973
|
+
severity: z5.enum(["warning", "error"]).optional()
|
|
1787
1974
|
}).optional(),
|
|
1788
|
-
specGrandfather:
|
|
1789
|
-
specPaths:
|
|
1975
|
+
specGrandfather: z5.union([z5.array(z5.string().min(1)), z5.record(z5.string().min(1), z5.number().int().min(0))]).optional(),
|
|
1976
|
+
specPaths: z5.array(z5.string().min(1).refine((entry) => !entry.startsWith("/") && !/^[A-Za-z]:/.test(entry), {
|
|
1790
1977
|
message: "must be a repository-relative path, not an absolute one"
|
|
1791
1978
|
}).refine((entry) => !entry.split(/[\\/]/).includes(".."), {
|
|
1792
1979
|
message: "must stay inside the repository — no `..` segment"
|
|
1793
1980
|
})).optional()
|
|
1794
1981
|
}).optional(),
|
|
1795
|
-
projects:
|
|
1796
|
-
dispatch:
|
|
1797
|
-
timeoutMs:
|
|
1798
|
-
killGraceMs:
|
|
1799
|
-
agent:
|
|
1800
|
-
|
|
1982
|
+
projects: z5.array(ProjectEntrySchema).optional(),
|
|
1983
|
+
dispatch: z5.object({
|
|
1984
|
+
timeoutMs: z5.number().int().positive().optional(),
|
|
1985
|
+
killGraceMs: z5.number().int().positive().optional(),
|
|
1986
|
+
agent: z5.enum(["claude", "codex", "gemini"]).optional()
|
|
1987
|
+
}).optional(),
|
|
1988
|
+
reviewPolicy: z5.object({
|
|
1989
|
+
codeReviewThreshold: z5.string().min(1).optional(),
|
|
1990
|
+
securityThreshold: z5.string().min(1).optional(),
|
|
1991
|
+
maxRounds: z5.number().optional(),
|
|
1992
|
+
maxTaskMinutes: z5.number().optional()
|
|
1993
|
+
}).optional(),
|
|
1994
|
+
securityScan: z5.object({
|
|
1995
|
+
command: z5.array(z5.string().min(1)).min(1)
|
|
1801
1996
|
}).optional(),
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1997
|
+
gateCutovers: z5.object({
|
|
1998
|
+
objectivesSinceIssue: z5.number().int().nonnegative().optional(),
|
|
1999
|
+
briefSectionsSinceIssue: z5.number().int().nonnegative().optional(),
|
|
2000
|
+
documentationSinceIssue: z5.number().int().nonnegative().optional(),
|
|
2001
|
+
briefRulesSincePr: z5.number().int().nonnegative().optional(),
|
|
2002
|
+
agentBoxesRefusedSincePr: z5.number().int().nonnegative().optional()
|
|
1806
2003
|
}).optional(),
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
briefSectionsSinceIssue: z4.number().int().nonnegative().optional(),
|
|
1810
|
-
documentationSinceIssue: z4.number().int().nonnegative().optional(),
|
|
1811
|
-
briefRulesSincePr: z4.number().int().nonnegative().optional(),
|
|
1812
|
-
agentBoxesRefusedSincePr: z4.number().int().nonnegative().optional()
|
|
2004
|
+
planning: z5.object({
|
|
2005
|
+
collisionThreshold: z5.number().int().nonnegative().optional()
|
|
1813
2006
|
}).optional(),
|
|
1814
|
-
prePush:
|
|
1815
|
-
alwaysRun:
|
|
2007
|
+
prePush: z5.object({
|
|
2008
|
+
alwaysRun: z5.array(z5.string()).optional()
|
|
1816
2009
|
}).optional(),
|
|
1817
|
-
report:
|
|
1818
|
-
commandTimeoutMs:
|
|
2010
|
+
report: z5.object({
|
|
2011
|
+
commandTimeoutMs: z5.number().int().positive().optional()
|
|
1819
2012
|
}).superRefine((report, ctx) => {
|
|
1820
2013
|
const commandTimeoutMs = report.commandTimeoutMs;
|
|
1821
2014
|
if (commandTimeoutMs !== undefined && commandTimeoutMs > MAX_REPORT_COMMAND_TIMEOUT_MS) {
|
|
1822
2015
|
ctx.addIssue({
|
|
1823
|
-
code:
|
|
2016
|
+
code: z5.ZodIssueCode.custom,
|
|
1824
2017
|
path: ["commandTimeoutMs"],
|
|
1825
2018
|
message: "must be at most 3600000 (1 hour)"
|
|
1826
2019
|
});
|
|
1827
2020
|
}
|
|
1828
2021
|
}).optional(),
|
|
1829
|
-
logPublish:
|
|
2022
|
+
logPublish: z5.unknown().refine((v) => v === undefined, {
|
|
1830
2023
|
message: "logPublish is removed — telemetry is never posted to a tracker or a code host; configure `logs` instead (a folder or a server destination)"
|
|
1831
2024
|
}),
|
|
1832
|
-
runtimeDir:
|
|
1833
|
-
logs:
|
|
1834
|
-
folder:
|
|
1835
|
-
url:
|
|
1836
|
-
headers:
|
|
2025
|
+
runtimeDir: z5.string().min(1).refine((v) => isAbsolute(v), { message: "runtimeDir: must be an absolute path" }).optional(),
|
|
2026
|
+
logs: z5.object({
|
|
2027
|
+
folder: z5.string().min(1).refine((v) => isAbsolute(v), { message: "logs.folder: must be an absolute path" }).optional(),
|
|
2028
|
+
url: z5.string().url().optional(),
|
|
2029
|
+
headers: z5.record(z5.string()).optional(),
|
|
2030
|
+
readHeaders: z5.record(z5.string()).optional(),
|
|
2031
|
+
events: CustomEventDeclarationsSchema.optional()
|
|
1837
2032
|
}).refine((v) => [v.folder, v.url].filter((x) => x !== undefined).length <= 1, {
|
|
1838
2033
|
message: "logs: set at most one of folder/url"
|
|
1839
2034
|
}).refine((v) => v.headers === undefined || v.url !== undefined, {
|
|
1840
2035
|
message: "logs: headers requires url"
|
|
2036
|
+
}).refine((v) => v.readHeaders === undefined || v.url !== undefined, {
|
|
2037
|
+
message: "logs: readHeaders requires url"
|
|
1841
2038
|
}).optional()
|
|
1842
2039
|
});
|
|
1843
2040
|
var GLOBAL_VINAYA_HOME = join2(homedir(), ".vinaya");
|