@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
|
@@ -121,12 +121,12 @@ function parseHunkRanges(patch) {
|
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
// src/lib/config.ts
|
|
124
|
-
import { execFile as execFile4, execFileSync as
|
|
124
|
+
import { execFile as execFile4, execFileSync as execFileSync2 } from "node:child_process";
|
|
125
125
|
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";
|
|
@@ -781,7 +781,6 @@ var TaskPrPauseSchema = z.object({
|
|
|
781
781
|
var TaskPrReviewRecordSchema = z.object({
|
|
782
782
|
verdicts: z.array(TaskPrVerdictSchema),
|
|
783
783
|
roundMarkers: z.array(z.number().int().nonnegative()),
|
|
784
|
-
summaryTable: z.string().nullable(),
|
|
785
784
|
pause: TaskPrPauseSchema.nullable()
|
|
786
785
|
});
|
|
787
786
|
var TaskPrReadInputSchema = z.object({
|
|
@@ -828,25 +827,69 @@ var TaskCancelResultSchema = z.object({
|
|
|
828
827
|
authenticatedFrom: z.string().min(1),
|
|
829
828
|
fencedEffectKeys: z.array(z.string())
|
|
830
829
|
});
|
|
831
|
-
var TASK_TOOL_NAMES = [
|
|
832
|
-
"task_start",
|
|
833
|
-
"task_status",
|
|
834
|
-
"task_escalation_read",
|
|
835
|
-
"task_pr_read",
|
|
836
|
-
"task_resume",
|
|
837
|
-
"task_cancel"
|
|
838
|
-
];
|
|
839
|
-
var OPERATOR_STATUS_FOLLOW = "task_status_follow";
|
|
840
|
-
var OPERATOR_TOOL_GRANT = [...TASK_TOOL_NAMES, OPERATOR_STATUS_FOLLOW];
|
|
841
|
-
// ../../packages/aeg-core/src/dev-review-loop/types.ts
|
|
842
|
-
var SEVERITY_COLUMNS = ["blocker", "major", "minor", "critical", "high", "medium", "low"];
|
|
843
|
-
// ../../packages/aeg-core/src/dev-review-loop/journal-reconstruction.ts
|
|
844
|
-
var SUMMARY_TABLE_HEADER = `| round | ${SEVERITY_COLUMNS.join(" | ")} | confidence | outcome |`;
|
|
845
|
-
// ../../packages/aeg-core/src/log/envelope.ts
|
|
846
|
-
import { createHash } from "node:crypto";
|
|
847
|
-
|
|
848
830
|
// ../../packages/aeg-core/src/log/schema.ts
|
|
831
|
+
import { z as z3 } from "zod";
|
|
832
|
+
|
|
833
|
+
// ../../packages/aeg-core/src/log/custom.ts
|
|
849
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
|
|
850
893
|
var CONFIDENCE_REASON_MAX_LENGTH = 280;
|
|
851
894
|
var ROLE_VALUES = [
|
|
852
895
|
"planner",
|
|
@@ -857,178 +900,210 @@ var ROLE_VALUES = [
|
|
|
857
900
|
"archivist",
|
|
858
901
|
"architect"
|
|
859
902
|
];
|
|
860
|
-
var RoleSchema =
|
|
903
|
+
var RoleSchema = z3.enum(ROLE_VALUES);
|
|
861
904
|
var HOST_VALUES = ["hook", "ci", "cli", "loop"];
|
|
862
|
-
var HostSchema =
|
|
905
|
+
var HostSchema = z3.enum(HOST_VALUES);
|
|
863
906
|
var RUN_ID_PATTERN = /^[A-Za-z0-9_.-]{1,128}$/;
|
|
864
907
|
var headerMetaCore = {
|
|
865
|
-
ts:
|
|
866
|
-
run_id:
|
|
867
|
-
seq:
|
|
868
|
-
repo:
|
|
869
|
-
vinaya:
|
|
870
|
-
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(),
|
|
871
914
|
host: HostSchema,
|
|
872
|
-
machine:
|
|
915
|
+
machine: z3.string()
|
|
873
916
|
};
|
|
874
|
-
var HeaderMetaV1Schema =
|
|
875
|
-
schema:
|
|
917
|
+
var HeaderMetaV1Schema = z3.object({
|
|
918
|
+
schema: z3.literal(1),
|
|
876
919
|
...headerMetaCore
|
|
877
920
|
}).strict();
|
|
878
|
-
var LineageSchema =
|
|
879
|
-
run:
|
|
880
|
-
attempt:
|
|
881
|
-
parent:
|
|
921
|
+
var LineageSchema = z3.object({
|
|
922
|
+
run: z3.string().nullable(),
|
|
923
|
+
attempt: z3.number().int().nullable(),
|
|
924
|
+
parent: z3.string().nullable()
|
|
882
925
|
}).strict();
|
|
883
|
-
var InputVersionsSchema =
|
|
884
|
-
objectives_version:
|
|
885
|
-
brief_hash:
|
|
886
|
-
ruling_ordinal:
|
|
887
|
-
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()
|
|
888
931
|
}).strict();
|
|
889
|
-
var ProvenanceSchema =
|
|
890
|
-
var HeaderMetaV2Schema =
|
|
891
|
-
schema:
|
|
932
|
+
var ProvenanceSchema = z3.enum(["parent_attributed", "env_correlated", "self_reported", "unavailable"]);
|
|
933
|
+
var HeaderMetaV2Schema = z3.object({
|
|
934
|
+
schema: z3.literal(2),
|
|
892
935
|
...headerMetaCore,
|
|
893
|
-
event_id:
|
|
894
|
-
process_id:
|
|
895
|
-
actor_id:
|
|
936
|
+
event_id: z3.string().min(1),
|
|
937
|
+
process_id: z3.string().min(1),
|
|
938
|
+
actor_id: z3.string().nullable(),
|
|
896
939
|
lineage: LineageSchema,
|
|
897
940
|
input_versions: InputVersionsSchema,
|
|
898
941
|
provenance: ProvenanceSchema
|
|
899
942
|
}).strict();
|
|
900
|
-
var
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
role: z2.union([RoleSchema, z2.literal("unattributed")]),
|
|
906
|
-
round: z2.number().int().optional(),
|
|
907
|
-
objectives_version: z2.string().optional()
|
|
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()
|
|
908
948
|
}).strict();
|
|
909
|
-
var
|
|
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()
|
|
966
|
+
}).strict();
|
|
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({
|
|
910
977
|
meta: HeaderMetaSchema,
|
|
911
978
|
subject: SubjectSchema
|
|
912
979
|
}).strict();
|
|
913
980
|
var envelopeTail = {
|
|
914
|
-
duration_ms:
|
|
915
|
-
payload:
|
|
981
|
+
duration_ms: z3.number().nonnegative().optional(),
|
|
982
|
+
payload: z3.object({}).strict()
|
|
916
983
|
};
|
|
917
|
-
var ReviewFindingSchema =
|
|
918
|
-
id:
|
|
919
|
-
severity:
|
|
920
|
-
state:
|
|
921
|
-
severity_scale:
|
|
922
|
-
policy_treatment:
|
|
923
|
-
confidence:
|
|
924
|
-
confidence_scale:
|
|
925
|
-
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()
|
|
926
993
|
}).strict();
|
|
927
|
-
var DispatchOutcomeSchema =
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
type:
|
|
931
|
-
pr:
|
|
932
|
-
head:
|
|
933
|
-
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()
|
|
934
1001
|
}).strict(),
|
|
935
|
-
|
|
936
|
-
type:
|
|
937
|
-
verdict:
|
|
938
|
-
head:
|
|
939
|
-
comment_id:
|
|
940
|
-
objectives:
|
|
941
|
-
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)
|
|
942
1009
|
}).strict(),
|
|
943
|
-
|
|
944
|
-
type:
|
|
945
|
-
class:
|
|
946
|
-
comment_id:
|
|
1010
|
+
z3.object({
|
|
1011
|
+
type: z3.literal("escalation"),
|
|
1012
|
+
class: z3.enum(["authority", "strategy", "product"]),
|
|
1013
|
+
comment_id: z3.number().int()
|
|
947
1014
|
}).strict(),
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
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()
|
|
952
1019
|
]);
|
|
953
1020
|
var dispatchShared = {
|
|
954
1021
|
meta: HeaderMetaSchema,
|
|
955
1022
|
subject: SubjectSchema,
|
|
956
|
-
kind:
|
|
1023
|
+
kind: z3.literal("dispatch"),
|
|
957
1024
|
...envelopeTail,
|
|
958
1025
|
target_role: RoleSchema,
|
|
959
|
-
model:
|
|
960
|
-
round:
|
|
961
|
-
effect_id:
|
|
1026
|
+
model: z3.string(),
|
|
1027
|
+
round: z3.number().int().optional(),
|
|
1028
|
+
effect_id: z3.string()
|
|
962
1029
|
};
|
|
963
|
-
var dispatchUsageField =
|
|
964
|
-
var DispatchEventSchema =
|
|
965
|
-
|
|
966
|
-
|
|
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({
|
|
967
1034
|
...dispatchShared,
|
|
968
|
-
event:
|
|
1035
|
+
event: z3.literal("outcome_received"),
|
|
969
1036
|
outcome: DispatchOutcomeSchema,
|
|
970
1037
|
usage: dispatchUsageField
|
|
971
1038
|
}).strict(),
|
|
972
|
-
|
|
1039
|
+
z3.object({
|
|
973
1040
|
...dispatchShared,
|
|
974
|
-
event:
|
|
975
|
-
reason:
|
|
1041
|
+
event: z3.literal("dispatch_failed"),
|
|
1042
|
+
reason: z3.enum(["timeout", "crash", "refused", "unattributed_write"]),
|
|
976
1043
|
usage: dispatchUsageField
|
|
977
1044
|
}).strict()
|
|
978
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();
|
|
979
1053
|
var loopShared = {
|
|
980
1054
|
meta: HeaderMetaSchema,
|
|
981
1055
|
subject: SubjectSchema,
|
|
982
|
-
kind:
|
|
1056
|
+
kind: z3.literal("dev_review_loop"),
|
|
983
1057
|
...envelopeTail,
|
|
984
|
-
loop_id:
|
|
1058
|
+
loop_id: z3.string()
|
|
985
1059
|
};
|
|
986
|
-
var DevReviewLoopEventSchema =
|
|
987
|
-
|
|
1060
|
+
var DevReviewLoopEventSchema = z3.discriminatedUnion("event", [
|
|
1061
|
+
z3.object({
|
|
988
1062
|
...loopShared,
|
|
989
|
-
event:
|
|
990
|
-
task:
|
|
991
|
-
policy:
|
|
992
|
-
max_rounds:
|
|
993
|
-
reviewers:
|
|
994
|
-
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())
|
|
995
1069
|
}).strict()
|
|
996
1070
|
}).strict(),
|
|
997
|
-
|
|
998
|
-
|
|
1071
|
+
z3.object({ ...loopShared, event: z3.literal("round_started"), round: z3.number().int(), base_head: z3.string() }).strict(),
|
|
1072
|
+
z3.object({
|
|
999
1073
|
...loopShared,
|
|
1000
|
-
event:
|
|
1001
|
-
round:
|
|
1002
|
-
head:
|
|
1003
|
-
green:
|
|
1004
|
-
confidence_value:
|
|
1005
|
-
confidence_reason:
|
|
1006
|
-
confidence_unavailable:
|
|
1007
|
-
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()
|
|
1008
1082
|
}).strict(),
|
|
1009
|
-
|
|
1083
|
+
z3.object({
|
|
1010
1084
|
...loopShared,
|
|
1011
|
-
event:
|
|
1012
|
-
round:
|
|
1013
|
-
head:
|
|
1014
|
-
all_approve:
|
|
1015
|
-
blockers:
|
|
1016
|
-
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()
|
|
1017
1092
|
}).strict(),
|
|
1018
|
-
|
|
1093
|
+
z3.object({
|
|
1019
1094
|
...loopShared,
|
|
1020
|
-
event:
|
|
1021
|
-
round:
|
|
1022
|
-
open:
|
|
1023
|
-
resolved:
|
|
1024
|
-
new:
|
|
1025
|
-
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())
|
|
1026
1101
|
}).strict(),
|
|
1027
|
-
|
|
1102
|
+
z3.object({
|
|
1028
1103
|
...loopShared,
|
|
1029
|
-
event:
|
|
1030
|
-
round:
|
|
1031
|
-
condition:
|
|
1104
|
+
event: z3.literal("stop_condition_met"),
|
|
1105
|
+
round: z3.number().int(),
|
|
1106
|
+
condition: z3.enum([
|
|
1032
1107
|
"green",
|
|
1033
1108
|
"max_rounds",
|
|
1034
1109
|
"no_progress",
|
|
@@ -1037,66 +1112,85 @@ var DevReviewLoopEventSchema = z2.discriminatedUnion("event", [
|
|
|
1037
1112
|
"confidence",
|
|
1038
1113
|
"reappearance",
|
|
1039
1114
|
"repeat_finding",
|
|
1040
|
-
"repeat_failure"
|
|
1115
|
+
"repeat_failure",
|
|
1116
|
+
"time_budget"
|
|
1041
1117
|
])
|
|
1042
1118
|
}).strict(),
|
|
1043
|
-
|
|
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({
|
|
1127
|
+
...loopShared,
|
|
1128
|
+
event: z3.literal("resumed"),
|
|
1129
|
+
round: z3.number().int(),
|
|
1130
|
+
by: z3.enum(["principal", "driver"])
|
|
1131
|
+
}).strict(),
|
|
1132
|
+
z3.object({
|
|
1044
1133
|
...loopShared,
|
|
1045
|
-
event:
|
|
1046
|
-
round:
|
|
1047
|
-
|
|
1134
|
+
event: z3.literal("cancelled"),
|
|
1135
|
+
round: z3.number().int(),
|
|
1136
|
+
by: z3.literal("principal")
|
|
1048
1137
|
}).strict(),
|
|
1049
|
-
|
|
1138
|
+
z3.object({
|
|
1050
1139
|
...loopShared,
|
|
1051
|
-
event:
|
|
1052
|
-
round:
|
|
1053
|
-
|
|
1140
|
+
event: z3.literal("unpushed_work_resume"),
|
|
1141
|
+
round: z3.number().int(),
|
|
1142
|
+
branch: z3.string(),
|
|
1143
|
+
detail: z3.string()
|
|
1054
1144
|
}).strict(),
|
|
1055
|
-
|
|
1145
|
+
z3.object({
|
|
1056
1146
|
...loopShared,
|
|
1057
|
-
event:
|
|
1058
|
-
round:
|
|
1059
|
-
|
|
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"])
|
|
1060
1156
|
}).strict(),
|
|
1061
|
-
|
|
1157
|
+
z3.object({
|
|
1062
1158
|
...loopShared,
|
|
1063
|
-
event:
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
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"])
|
|
1067
1166
|
}).strict(),
|
|
1068
|
-
|
|
1167
|
+
z3.object({
|
|
1069
1168
|
...loopShared,
|
|
1070
|
-
event:
|
|
1071
|
-
round:
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
insertions: z2.number().int().nonnegative(),
|
|
1076
|
-
deletions: z2.number().int().nonnegative(),
|
|
1077
|
-
wall_ms: z2.number().nonnegative(),
|
|
1078
|
-
outcome: z2.enum(["green", "changes_requested", "escalated"])
|
|
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"])
|
|
1079
1174
|
}).strict(),
|
|
1080
|
-
|
|
1175
|
+
z3.object({
|
|
1081
1176
|
...loopShared,
|
|
1082
|
-
event:
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
final_head: z2.string(),
|
|
1088
|
-
result: z2.enum(["merged_ready", "stopped"])
|
|
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()
|
|
1089
1182
|
}).strict(),
|
|
1090
|
-
|
|
1183
|
+
z3.object({
|
|
1091
1184
|
...loopShared,
|
|
1092
|
-
event:
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
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()
|
|
1097
1191
|
}).strict()
|
|
1098
1192
|
]);
|
|
1099
|
-
var ForgeOpSchema =
|
|
1193
|
+
var ForgeOpSchema = z3.enum([
|
|
1100
1194
|
"pr.create",
|
|
1101
1195
|
"pr.comment",
|
|
1102
1196
|
"pr.body.replace",
|
|
@@ -1110,24 +1204,24 @@ var ForgeOpSchema = z2.enum([
|
|
|
1110
1204
|
"label.add",
|
|
1111
1205
|
"label.remove"
|
|
1112
1206
|
]);
|
|
1113
|
-
var ForgeWriteTargetSchema =
|
|
1114
|
-
issue:
|
|
1115
|
-
pr:
|
|
1207
|
+
var ForgeWriteTargetSchema = z3.object({
|
|
1208
|
+
issue: z3.number().int().optional(),
|
|
1209
|
+
pr: z3.number().int().optional()
|
|
1116
1210
|
}).strict();
|
|
1117
1211
|
var forgeWriteShared = {
|
|
1118
1212
|
meta: HeaderMetaSchema,
|
|
1119
1213
|
subject: SubjectSchema,
|
|
1120
|
-
kind:
|
|
1214
|
+
kind: z3.literal("forge_write"),
|
|
1121
1215
|
...envelopeTail,
|
|
1122
1216
|
op: ForgeOpSchema,
|
|
1123
1217
|
target: ForgeWriteTargetSchema
|
|
1124
1218
|
};
|
|
1125
|
-
var ForgeWriteEventSchema =
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
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()
|
|
1129
1223
|
]);
|
|
1130
|
-
var GateOutcomeSchema =
|
|
1224
|
+
var GateOutcomeSchema = z3.enum([
|
|
1131
1225
|
"pass",
|
|
1132
1226
|
"fail",
|
|
1133
1227
|
"wait",
|
|
@@ -1140,61 +1234,74 @@ var GateOutcomeSchema = z2.enum([
|
|
|
1140
1234
|
var gateShared = {
|
|
1141
1235
|
meta: HeaderMetaSchema,
|
|
1142
1236
|
subject: SubjectSchema,
|
|
1143
|
-
kind:
|
|
1237
|
+
kind: z3.literal("gate"),
|
|
1144
1238
|
...envelopeTail,
|
|
1145
|
-
check:
|
|
1146
|
-
check_version:
|
|
1147
|
-
policy_version:
|
|
1148
|
-
input_fingerprint:
|
|
1239
|
+
check: z3.string(),
|
|
1240
|
+
check_version: z3.string().nullable(),
|
|
1241
|
+
policy_version: z3.string().nullable(),
|
|
1242
|
+
input_fingerprint: z3.string().nullable()
|
|
1149
1243
|
};
|
|
1150
|
-
var GateEventSchema =
|
|
1151
|
-
|
|
1244
|
+
var GateEventSchema = z3.discriminatedUnion("event", [
|
|
1245
|
+
z3.object({
|
|
1152
1246
|
...gateShared,
|
|
1153
|
-
event:
|
|
1247
|
+
event: z3.literal("checked"),
|
|
1154
1248
|
outcome: GateOutcomeSchema,
|
|
1155
|
-
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())
|
|
1156
1262
|
}).strict()
|
|
1157
1263
|
]);
|
|
1158
|
-
var OperationResultSchema =
|
|
1264
|
+
var OperationResultSchema = z3.enum(["ok", "error", "refused", "timeout", "cancelled", "unavailable"]);
|
|
1159
1265
|
var operationShared = {
|
|
1160
1266
|
meta: HeaderMetaSchema,
|
|
1161
1267
|
subject: SubjectSchema,
|
|
1162
|
-
kind:
|
|
1268
|
+
kind: z3.literal("operation"),
|
|
1163
1269
|
...envelopeTail,
|
|
1164
|
-
operation:
|
|
1165
|
-
target:
|
|
1270
|
+
operation: z3.string(),
|
|
1271
|
+
target: z3.string().nullable()
|
|
1166
1272
|
};
|
|
1167
|
-
var OperationEventSchema =
|
|
1168
|
-
|
|
1273
|
+
var OperationEventSchema = z3.discriminatedUnion("event", [
|
|
1274
|
+
z3.object({
|
|
1169
1275
|
...operationShared,
|
|
1170
|
-
event:
|
|
1276
|
+
event: z3.literal("completed"),
|
|
1171
1277
|
result: OperationResultSchema,
|
|
1172
|
-
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()
|
|
1173
1280
|
}).strict()
|
|
1174
1281
|
]);
|
|
1175
|
-
var UsageUnitsSchema =
|
|
1176
|
-
input:
|
|
1177
|
-
output:
|
|
1178
|
-
cache:
|
|
1282
|
+
var UsageUnitsSchema = z3.object({
|
|
1283
|
+
input: z3.number().nonnegative().nullable(),
|
|
1284
|
+
output: z3.number().nonnegative().nullable(),
|
|
1285
|
+
cache: z3.number().nonnegative().nullable()
|
|
1179
1286
|
}).strict();
|
|
1180
1287
|
var usageShared = {
|
|
1181
1288
|
meta: HeaderMetaSchema,
|
|
1182
1289
|
subject: SubjectSchema,
|
|
1183
|
-
kind:
|
|
1290
|
+
kind: z3.literal("usage"),
|
|
1184
1291
|
...envelopeTail,
|
|
1185
|
-
model:
|
|
1186
|
-
source:
|
|
1187
|
-
semantics:
|
|
1292
|
+
model: z3.string().nullable(),
|
|
1293
|
+
source: z3.string(),
|
|
1294
|
+
semantics: z3.enum(["cumulative", "delta"])
|
|
1188
1295
|
};
|
|
1189
|
-
var UsageEventSchema =
|
|
1190
|
-
|
|
1296
|
+
var UsageEventSchema = z3.discriminatedUnion("event", [
|
|
1297
|
+
z3.object({
|
|
1191
1298
|
...usageShared,
|
|
1192
|
-
event:
|
|
1299
|
+
event: z3.literal("observed"),
|
|
1193
1300
|
units: UsageUnitsSchema,
|
|
1194
|
-
unknown_reason:
|
|
1301
|
+
unknown_reason: z3.string().nullable()
|
|
1195
1302
|
}).strict()
|
|
1196
1303
|
]);
|
|
1197
|
-
var RoleAttemptOutcomeSchema =
|
|
1304
|
+
var RoleAttemptOutcomeSchema = z3.enum([
|
|
1198
1305
|
"completed",
|
|
1199
1306
|
"incomplete",
|
|
1200
1307
|
"infrastructure_failed",
|
|
@@ -1205,17 +1312,17 @@ var RoleAttemptOutcomeSchema = z2.enum([
|
|
|
1205
1312
|
var roleAttemptShared = {
|
|
1206
1313
|
meta: HeaderMetaSchema,
|
|
1207
1314
|
subject: SubjectSchema,
|
|
1208
|
-
kind:
|
|
1315
|
+
kind: z3.literal("role_attempt"),
|
|
1209
1316
|
...envelopeTail,
|
|
1210
|
-
actor:
|
|
1211
|
-
attempt:
|
|
1212
|
-
effect_id:
|
|
1213
|
-
model:
|
|
1317
|
+
actor: z3.string().nullable(),
|
|
1318
|
+
attempt: z3.number().int().nullable(),
|
|
1319
|
+
effect_id: z3.string(),
|
|
1320
|
+
model: z3.string().nullable()
|
|
1214
1321
|
};
|
|
1215
|
-
var RoleAttemptEventSchema =
|
|
1216
|
-
|
|
1322
|
+
var RoleAttemptEventSchema = z3.discriminatedUnion("event", [
|
|
1323
|
+
z3.object({
|
|
1217
1324
|
...roleAttemptShared,
|
|
1218
|
-
event:
|
|
1325
|
+
event: z3.literal("attempted"),
|
|
1219
1326
|
outcome: RoleAttemptOutcomeSchema,
|
|
1220
1327
|
usage: dispatchUsageField
|
|
1221
1328
|
}).strict()
|
|
@@ -1223,42 +1330,59 @@ var RoleAttemptEventSchema = z2.discriminatedUnion("event", [
|
|
|
1223
1330
|
var handoffShared = {
|
|
1224
1331
|
meta: HeaderMetaSchema,
|
|
1225
1332
|
subject: SubjectSchema,
|
|
1226
|
-
kind:
|
|
1333
|
+
kind: z3.literal("handoff"),
|
|
1227
1334
|
...envelopeTail,
|
|
1228
|
-
class:
|
|
1229
|
-
reason:
|
|
1335
|
+
class: z3.enum(["authority", "strategy", "product"]),
|
|
1336
|
+
reason: z3.string()
|
|
1230
1337
|
};
|
|
1231
|
-
var HandoffEventSchema =
|
|
1232
|
-
|
|
1338
|
+
var HandoffEventSchema = z3.discriminatedUnion("event", [
|
|
1339
|
+
z3.object({
|
|
1233
1340
|
...handoffShared,
|
|
1234
|
-
event:
|
|
1235
|
-
requested_decision:
|
|
1341
|
+
event: z3.literal("raised"),
|
|
1342
|
+
requested_decision: z3.string().nullable()
|
|
1236
1343
|
}).strict(),
|
|
1237
|
-
|
|
1344
|
+
z3.object({
|
|
1238
1345
|
...handoffShared,
|
|
1239
|
-
event:
|
|
1240
|
-
resolution:
|
|
1241
|
-
resolved_by:
|
|
1346
|
+
event: z3.literal("resolved"),
|
|
1347
|
+
resolution: z3.string().nullable(),
|
|
1348
|
+
resolved_by: z3.string().nullable()
|
|
1242
1349
|
}).strict()
|
|
1243
1350
|
]);
|
|
1244
|
-
var EffectTargetSchema =
|
|
1245
|
-
kind:
|
|
1246
|
-
ref:
|
|
1351
|
+
var EffectTargetSchema = z3.object({
|
|
1352
|
+
kind: z3.string(),
|
|
1353
|
+
ref: z3.string()
|
|
1247
1354
|
}).strict();
|
|
1248
1355
|
var effectShared = {
|
|
1249
1356
|
meta: HeaderMetaSchema,
|
|
1250
1357
|
subject: SubjectSchema,
|
|
1251
|
-
kind:
|
|
1358
|
+
kind: z3.literal("effect"),
|
|
1252
1359
|
...envelopeTail,
|
|
1253
|
-
effect_id:
|
|
1360
|
+
effect_id: z3.string(),
|
|
1254
1361
|
target: EffectTargetSchema
|
|
1255
1362
|
};
|
|
1256
|
-
var EffectEventSchema =
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
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()
|
|
1260
1367
|
]);
|
|
1261
|
-
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([
|
|
1262
1386
|
DispatchEventSchema,
|
|
1263
1387
|
DevReviewLoopEventSchema,
|
|
1264
1388
|
ForgeWriteEventSchema,
|
|
@@ -1267,10 +1391,11 @@ var LogEventSchema = z2.union([
|
|
|
1267
1391
|
UsageEventSchema,
|
|
1268
1392
|
RoleAttemptEventSchema,
|
|
1269
1393
|
HandoffEventSchema,
|
|
1270
|
-
EffectEventSchema
|
|
1394
|
+
EffectEventSchema,
|
|
1395
|
+
CustomEventSchema
|
|
1271
1396
|
]);
|
|
1272
|
-
|
|
1273
1397
|
// ../../packages/aeg-core/src/log/envelope.ts
|
|
1398
|
+
import { createHash } from "node:crypto";
|
|
1274
1399
|
function isRole(value) {
|
|
1275
1400
|
return value !== undefined && ROLE_VALUES.includes(value);
|
|
1276
1401
|
}
|
|
@@ -1307,18 +1432,27 @@ function roundFromEnv(round) {
|
|
|
1307
1432
|
const n = Number(round);
|
|
1308
1433
|
return Number.isInteger(n) ? n : undefined;
|
|
1309
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
|
+
}
|
|
1310
1441
|
function buildHeader(input) {
|
|
1311
1442
|
const role = isRole(input.env.role) ? input.env.role : "unattributed";
|
|
1312
1443
|
const round = roundFromEnv(input.env.round);
|
|
1444
|
+
const pr = prFromEnv(input.env.pr);
|
|
1313
1445
|
const subject = {
|
|
1314
1446
|
issue: issueFromTask(input.env.task) ?? input.branchIssue ?? null,
|
|
1315
1447
|
role,
|
|
1316
1448
|
...round !== undefined ? { round } : {},
|
|
1449
|
+
...pr !== undefined ? { pr } : {},
|
|
1317
1450
|
...input.subject ?? {}
|
|
1318
1451
|
};
|
|
1452
|
+
const issue = subject.issue;
|
|
1319
1453
|
return {
|
|
1320
1454
|
meta: {
|
|
1321
|
-
schema:
|
|
1455
|
+
schema: 3,
|
|
1322
1456
|
ts: input.now.toISOString(),
|
|
1323
1457
|
run_id: input.runId,
|
|
1324
1458
|
seq: input.seq,
|
|
@@ -1341,7 +1475,19 @@ function buildHeader(input) {
|
|
|
1341
1475
|
ruling_ordinal: input.inputVersions?.rulingOrdinal ?? null,
|
|
1342
1476
|
policy_digest: input.inputVersions?.policyDigest ?? null
|
|
1343
1477
|
},
|
|
1344
|
-
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)
|
|
1345
1491
|
},
|
|
1346
1492
|
subject
|
|
1347
1493
|
};
|
|
@@ -1384,7 +1530,7 @@ function redact(value, home) {
|
|
|
1384
1530
|
return value;
|
|
1385
1531
|
}
|
|
1386
1532
|
// ../../packages/aeg-core/src/log/store.ts
|
|
1387
|
-
var KNOWN_SCHEMA_VERSIONS = [1, 2];
|
|
1533
|
+
var KNOWN_SCHEMA_VERSIONS = [1, 2, 3];
|
|
1388
1534
|
function metaOf(obj) {
|
|
1389
1535
|
if (obj === null || typeof obj !== "object")
|
|
1390
1536
|
return null;
|
|
@@ -1450,7 +1596,7 @@ function classifyStoredLine(raw, home) {
|
|
|
1450
1596
|
return { status: "invalid", identity: null, raw, reason: "valid event with no derivable identity" };
|
|
1451
1597
|
}
|
|
1452
1598
|
const redacted = redact(event, home);
|
|
1453
|
-
const provenance = version
|
|
1599
|
+
const provenance = version >= 2 ? event.meta.provenance ?? null : null;
|
|
1454
1600
|
return {
|
|
1455
1601
|
status: "ok",
|
|
1456
1602
|
identity,
|
|
@@ -1463,136 +1609,139 @@ function classifyStoredLine(raw, home) {
|
|
|
1463
1609
|
};
|
|
1464
1610
|
}
|
|
1465
1611
|
// ../../packages/aeg-core/src/control-store/records.ts
|
|
1466
|
-
import { z as
|
|
1467
|
-
var isoTimestamp =
|
|
1468
|
-
var taskId =
|
|
1469
|
-
var epochNumber =
|
|
1470
|
-
var RunRecordSchema =
|
|
1471
|
-
version:
|
|
1472
|
-
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"),
|
|
1473
1619
|
task: taskId,
|
|
1474
|
-
runId:
|
|
1475
|
-
pid:
|
|
1476
|
-
host:
|
|
1620
|
+
runId: z4.string().min(1),
|
|
1621
|
+
pid: z4.number().int().positive(),
|
|
1622
|
+
host: z4.string().min(1),
|
|
1477
1623
|
startedAt: isoTimestamp,
|
|
1478
|
-
childStartedAt:
|
|
1479
|
-
childCommand:
|
|
1624
|
+
childStartedAt: z4.string().min(1).nullable().optional(),
|
|
1625
|
+
childCommand: z4.string().min(1).nullable().optional()
|
|
1480
1626
|
}).strict();
|
|
1481
|
-
var InputRecordSchema =
|
|
1482
|
-
version:
|
|
1483
|
-
kind:
|
|
1627
|
+
var InputRecordSchema = z4.object({
|
|
1628
|
+
version: z4.literal(1),
|
|
1629
|
+
kind: z4.literal("input"),
|
|
1484
1630
|
task: taskId,
|
|
1485
|
-
runId:
|
|
1486
|
-
source:
|
|
1487
|
-
pr:
|
|
1488
|
-
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(),
|
|
1489
1635
|
recordedAt: isoTimestamp
|
|
1490
1636
|
}).strict();
|
|
1491
|
-
var OwnershipRecordSchema =
|
|
1492
|
-
version:
|
|
1493
|
-
kind:
|
|
1637
|
+
var OwnershipRecordSchema = z4.object({
|
|
1638
|
+
version: z4.literal(1),
|
|
1639
|
+
kind: z4.literal("ownership"),
|
|
1494
1640
|
task: taskId,
|
|
1495
1641
|
epoch: epochNumber,
|
|
1496
|
-
ownerId:
|
|
1497
|
-
pid:
|
|
1498
|
-
host:
|
|
1642
|
+
ownerId: z4.string().min(1),
|
|
1643
|
+
pid: z4.number().int().positive(),
|
|
1644
|
+
host: z4.string().min(1),
|
|
1499
1645
|
acquiredAt: isoTimestamp
|
|
1500
1646
|
}).strict();
|
|
1501
|
-
var TransitionRecordSchema =
|
|
1502
|
-
version:
|
|
1503
|
-
kind:
|
|
1647
|
+
var TransitionRecordSchema = z4.object({
|
|
1648
|
+
version: z4.literal(1),
|
|
1649
|
+
kind: z4.literal("transition"),
|
|
1504
1650
|
task: taskId,
|
|
1505
1651
|
epoch: epochNumber,
|
|
1506
|
-
seq:
|
|
1507
|
-
from:
|
|
1508
|
-
to:
|
|
1509
|
-
detail:
|
|
1652
|
+
seq: z4.number().int().nonnegative(),
|
|
1653
|
+
from: z4.string().min(1),
|
|
1654
|
+
to: z4.string().min(1),
|
|
1655
|
+
detail: z4.string().optional(),
|
|
1510
1656
|
at: isoTimestamp
|
|
1511
1657
|
}).strict();
|
|
1512
|
-
var ManifestRecordSchema =
|
|
1513
|
-
version:
|
|
1514
|
-
kind:
|
|
1658
|
+
var ManifestRecordSchema = z4.object({
|
|
1659
|
+
version: z4.literal(1),
|
|
1660
|
+
kind: z4.literal("manifest"),
|
|
1515
1661
|
task: taskId,
|
|
1516
1662
|
round: epochNumber,
|
|
1517
|
-
repository:
|
|
1518
|
-
pr:
|
|
1519
|
-
branch:
|
|
1520
|
-
baseSha:
|
|
1521
|
-
headSha:
|
|
1522
|
-
briefHash:
|
|
1523
|
-
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(),
|
|
1524
1670
|
rulingOrdinal: epochNumber,
|
|
1525
|
-
policyDigest:
|
|
1671
|
+
policyDigest: z4.string().min(1),
|
|
1526
1672
|
recordedAt: isoTimestamp
|
|
1527
1673
|
}).strict();
|
|
1528
|
-
var roundHeadIdentity =
|
|
1529
|
-
var LoopBudgetsSchema =
|
|
1530
|
-
mechanicalRetries:
|
|
1531
|
-
reviewRounds:
|
|
1532
|
-
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()
|
|
1533
1679
|
}).strict();
|
|
1534
|
-
var LoopStateRecordSchema =
|
|
1535
|
-
version:
|
|
1536
|
-
kind:
|
|
1680
|
+
var LoopStateRecordSchema = z4.object({
|
|
1681
|
+
version: z4.literal(1),
|
|
1682
|
+
kind: z4.literal("loop_state"),
|
|
1537
1683
|
task: taskId,
|
|
1538
|
-
round:
|
|
1539
|
-
phase:
|
|
1540
|
-
pauseReason:
|
|
1684
|
+
round: z4.number().int().positive(),
|
|
1685
|
+
phase: z4.string().min(1),
|
|
1686
|
+
pauseReason: z4.string().min(1).nullable(),
|
|
1541
1687
|
budgets: LoopBudgetsSchema,
|
|
1542
1688
|
heldResult: roundHeadIdentity.nullable(),
|
|
1543
1689
|
deliveredFindings: roundHeadIdentity.nullable(),
|
|
1544
|
-
repeatMemory:
|
|
1545
|
-
blockingFindings:
|
|
1546
|
-
lastFailure:
|
|
1690
|
+
repeatMemory: z4.object({
|
|
1691
|
+
blockingFindings: z4.array(z4.string()),
|
|
1692
|
+
lastFailure: z4.object({ signature: z4.string(), message: z4.string() }).nullable()
|
|
1547
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(),
|
|
1548
1697
|
recordedAt: isoTimestamp
|
|
1549
1698
|
}).strict();
|
|
1550
|
-
var EffectRecordSchema =
|
|
1551
|
-
version:
|
|
1552
|
-
kind:
|
|
1699
|
+
var EffectRecordSchema = z4.object({
|
|
1700
|
+
version: z4.literal(1),
|
|
1701
|
+
kind: z4.literal("effect"),
|
|
1553
1702
|
task: taskId,
|
|
1554
|
-
key:
|
|
1555
|
-
operation:
|
|
1556
|
-
target:
|
|
1557
|
-
inputVersion:
|
|
1558
|
-
payloadDigest:
|
|
1559
|
-
status:
|
|
1560
|
-
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(),
|
|
1561
1710
|
recordedAt: isoTimestamp
|
|
1562
1711
|
}).strict();
|
|
1563
|
-
var EscalationRecordSchema =
|
|
1564
|
-
version:
|
|
1565
|
-
kind:
|
|
1712
|
+
var EscalationRecordSchema = z4.object({
|
|
1713
|
+
version: z4.literal(1),
|
|
1714
|
+
kind: z4.literal("escalation"),
|
|
1566
1715
|
task: taskId,
|
|
1567
|
-
escalationId:
|
|
1716
|
+
escalationId: z4.string().min(1),
|
|
1568
1717
|
round: epochNumber,
|
|
1569
|
-
head:
|
|
1570
|
-
branch:
|
|
1571
|
-
pr:
|
|
1572
|
-
runId:
|
|
1573
|
-
pid:
|
|
1574
|
-
host:
|
|
1575
|
-
agent:
|
|
1576
|
-
reason:
|
|
1577
|
-
detail:
|
|
1578
|
-
evidence:
|
|
1579
|
-
attemptedRecovery:
|
|
1580
|
-
requestedDecision:
|
|
1581
|
-
recipient:
|
|
1582
|
-
briefHash:
|
|
1583
|
-
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(),
|
|
1584
1733
|
rulingOrdinal: epochNumber,
|
|
1585
|
-
policyDigest:
|
|
1734
|
+
policyDigest: z4.string().min(1),
|
|
1586
1735
|
recordedAt: isoTimestamp
|
|
1587
1736
|
}).strict();
|
|
1588
|
-
var ResolutionRecordSchema =
|
|
1589
|
-
version:
|
|
1590
|
-
kind:
|
|
1737
|
+
var ResolutionRecordSchema = z4.object({
|
|
1738
|
+
version: z4.literal(1),
|
|
1739
|
+
kind: z4.literal("resolution"),
|
|
1591
1740
|
task: taskId,
|
|
1592
|
-
escalationId:
|
|
1593
|
-
decision:
|
|
1594
|
-
authenticatedBy:
|
|
1595
|
-
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),
|
|
1596
1745
|
consumedAt: isoTimestamp
|
|
1597
1746
|
}).strict();
|
|
1598
1747
|
// ../../packages/aeg-core/src/control-store/local.ts
|
|
@@ -1674,46 +1823,24 @@ var CONTROL_AREA_DIRNAME = "control";
|
|
|
1674
1823
|
// src/lib/agent-vendors.ts
|
|
1675
1824
|
var AGENT_VENDORS = ["skills", "claude", "gemini"];
|
|
1676
1825
|
|
|
1677
|
-
// src/lib/worker-boundary.ts
|
|
1678
|
-
import { execFileSync as execFileSync2 } from "node:child_process";
|
|
1679
|
-
var LOG_HEADER_KEYCHAIN_SERVICE = "Vinaya Log";
|
|
1680
|
-
var logHeaderKeychainCache = new Map;
|
|
1681
|
-
function readRealLogHeaderKeychainCredential(variable) {
|
|
1682
|
-
if (process.platform !== "darwin")
|
|
1683
|
-
return null;
|
|
1684
|
-
try {
|
|
1685
|
-
return execFileSync2("/usr/bin/security", ["find-generic-password", "-s", LOG_HEADER_KEYCHAIN_SERVICE, "-a", variable, "-w"], { encoding: "utf8", stdio: ["ignore", "pipe", "ignore"], timeout: 5000, maxBuffer: 1024 * 1024 }).replace(/\n$/, "");
|
|
1686
|
-
} catch {
|
|
1687
|
-
return null;
|
|
1688
|
-
}
|
|
1689
|
-
}
|
|
1690
|
-
function readLogHeaderKeychainCredential(variable) {
|
|
1691
|
-
const cached = logHeaderKeychainCache.get(variable);
|
|
1692
|
-
if (cached !== undefined)
|
|
1693
|
-
return cached;
|
|
1694
|
-
const value = readRealLogHeaderKeychainCredential(variable);
|
|
1695
|
-
logHeaderKeychainCache.set(variable, value);
|
|
1696
|
-
return value;
|
|
1697
|
-
}
|
|
1698
|
-
|
|
1699
1826
|
// src/lib/config.ts
|
|
1700
|
-
var EnvEntrySchema =
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
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()
|
|
1705
1832
|
]);
|
|
1706
|
-
var CheckEntrySchema =
|
|
1707
|
-
run:
|
|
1708
|
-
scope:
|
|
1709
|
-
include:
|
|
1710
|
-
args:
|
|
1711
|
-
timeoutMs:
|
|
1712
|
-
env:
|
|
1713
|
-
requiresOpenPr:
|
|
1714
|
-
ownWorkflow:
|
|
1715
|
-
principalOwed:
|
|
1716
|
-
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()
|
|
1717
1844
|
}).superRefine((entry, ctx) => {
|
|
1718
1845
|
if (!entry.env)
|
|
1719
1846
|
return;
|
|
@@ -1723,22 +1850,22 @@ var CheckEntrySchema = z4.object({
|
|
|
1723
1850
|
const members = value.anyOf;
|
|
1724
1851
|
if (new Set(members).size !== members.length) {
|
|
1725
1852
|
ctx.addIssue({
|
|
1726
|
-
code:
|
|
1853
|
+
code: z5.ZodIssueCode.custom,
|
|
1727
1854
|
message: `env.${key}.anyOf has duplicate members`,
|
|
1728
1855
|
path: ["env", key, "anyOf"]
|
|
1729
1856
|
});
|
|
1730
1857
|
}
|
|
1731
1858
|
if (!members.includes(key)) {
|
|
1732
1859
|
ctx.addIssue({
|
|
1733
|
-
code:
|
|
1860
|
+
code: z5.ZodIssueCode.custom,
|
|
1734
1861
|
message: `env.${key}.anyOf must include "${key}" itself as a member`,
|
|
1735
1862
|
path: ["env", key, "anyOf"]
|
|
1736
1863
|
});
|
|
1737
1864
|
}
|
|
1738
1865
|
}
|
|
1739
1866
|
});
|
|
1740
|
-
var RoleEntrySchema =
|
|
1741
|
-
contract:
|
|
1867
|
+
var RoleEntrySchema = z5.object({
|
|
1868
|
+
contract: z5.string().refine((p) => p.includes("/"), {
|
|
1742
1869
|
message: 'must be a path (contain at least one "/"), not a bare filename'
|
|
1743
1870
|
})
|
|
1744
1871
|
});
|
|
@@ -1762,17 +1889,17 @@ var BRIEF_BUILTINS = [
|
|
|
1762
1889
|
"briefSections",
|
|
1763
1890
|
"milestoneShape"
|
|
1764
1891
|
];
|
|
1765
|
-
var BriefSectionSchema =
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
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() })
|
|
1770
1897
|
]);
|
|
1771
|
-
var BriefSchemaSchema =
|
|
1772
|
-
pr:
|
|
1773
|
-
issue:
|
|
1774
|
-
milestone:
|
|
1775
|
-
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()
|
|
1776
1903
|
});
|
|
1777
1904
|
function isSafeRepoRelPath(p) {
|
|
1778
1905
|
if (p.length === 0)
|
|
@@ -1781,7 +1908,7 @@ function isSafeRepoRelPath(p) {
|
|
|
1781
1908
|
return false;
|
|
1782
1909
|
return p.split(/[\\/]/).every((seg) => seg !== ".." && seg !== "");
|
|
1783
1910
|
}
|
|
1784
|
-
var SafeRepoRelPath =
|
|
1911
|
+
var SafeRepoRelPath = z5.string().refine(isSafeRepoRelPath, {
|
|
1785
1912
|
message: "must be a repo-root-relative path with no `..` segment or absolute root"
|
|
1786
1913
|
});
|
|
1787
1914
|
var CANONICAL_HOOK_BLOCK_PREFIXES = [".git/", ".husky/", ".vinaya/hooks/", ".claude/hooks/"];
|
|
@@ -1791,22 +1918,22 @@ function isCanonicalHookBlockPath(p) {
|
|
|
1791
1918
|
var ManagedHookBlockPath = SafeRepoRelPath.refine(isCanonicalHookBlockPath, {
|
|
1792
1919
|
message: `must start with one of ${CANONICAL_HOOK_BLOCK_PREFIXES.join(", ")} (byte-exact, case-sensitive)`
|
|
1793
1920
|
});
|
|
1794
|
-
var ManagedBlockRecordSchema =
|
|
1921
|
+
var ManagedBlockRecordSchema = z5.object({
|
|
1795
1922
|
path: ManagedHookBlockPath,
|
|
1796
|
-
marker:
|
|
1797
|
-
comment:
|
|
1923
|
+
marker: z5.string(),
|
|
1924
|
+
comment: z5.enum(["hash", "html"])
|
|
1798
1925
|
});
|
|
1799
|
-
var ManagedManifestSchema =
|
|
1800
|
-
version:
|
|
1801
|
-
files:
|
|
1802
|
-
blocks:
|
|
1803
|
-
labels:
|
|
1804
|
-
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()
|
|
1805
1932
|
});
|
|
1806
|
-
var ProjectEntrySchema =
|
|
1807
|
-
name:
|
|
1808
|
-
description:
|
|
1809
|
-
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()
|
|
1810
1937
|
});
|
|
1811
1938
|
function parseTokensCollectDeclaration(value) {
|
|
1812
1939
|
const m = value.trim().match(/^(\S+)\s+(\S+)$/);
|
|
@@ -1817,90 +1944,97 @@ function parseTokensCollectDeclaration(value) {
|
|
|
1817
1944
|
return null;
|
|
1818
1945
|
return { interpreter, script };
|
|
1819
1946
|
}
|
|
1820
|
-
var VinayaConfigSchema =
|
|
1821
|
-
rings:
|
|
1822
|
-
ring1_forgeWriteInterception:
|
|
1823
|
-
ring2_asyncAudits:
|
|
1947
|
+
var VinayaConfigSchema = z5.object({
|
|
1948
|
+
rings: z5.object({
|
|
1949
|
+
ring1_forgeWriteInterception: z5.boolean(),
|
|
1950
|
+
ring2_asyncAudits: z5.boolean()
|
|
1824
1951
|
}).optional(),
|
|
1825
|
-
checks:
|
|
1826
|
-
roles:
|
|
1952
|
+
checks: z5.record(z5.string(), CheckEntrySchema).optional(),
|
|
1953
|
+
roles: z5.record(z5.string(), RoleEntrySchema).optional(),
|
|
1827
1954
|
briefSchema: BriefSchemaSchema.optional(),
|
|
1828
1955
|
managed: ManagedManifestSchema.optional(),
|
|
1829
|
-
principals:
|
|
1830
|
-
releaseActor:
|
|
1831
|
-
ci:
|
|
1832
|
-
tokens:
|
|
1833
|
-
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, {
|
|
1834
1961
|
message: 'tokens.collect must be exactly "<interpreter> <repo-relative-script-path>" — two whitespace-separated tokens, no flags, no shell syntax, no quoting'
|
|
1835
1962
|
})
|
|
1836
1963
|
}).optional(),
|
|
1837
|
-
blastRadius:
|
|
1838
|
-
proseGates:
|
|
1839
|
-
doctrineRoot:
|
|
1840
|
-
readerFacingPrefix:
|
|
1841
|
-
readerFacingSuffix:
|
|
1842
|
-
legacySlugDir:
|
|
1843
|
-
sourceComments:
|
|
1844
|
-
globs:
|
|
1845
|
-
allowlist:
|
|
1846
|
-
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()
|
|
1847
1974
|
}).optional(),
|
|
1848
|
-
specGrandfather:
|
|
1849
|
-
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), {
|
|
1850
1977
|
message: "must be a repository-relative path, not an absolute one"
|
|
1851
1978
|
}).refine((entry) => !entry.split(/[\\/]/).includes(".."), {
|
|
1852
1979
|
message: "must stay inside the repository — no `..` segment"
|
|
1853
1980
|
})).optional()
|
|
1854
1981
|
}).optional(),
|
|
1855
|
-
projects:
|
|
1856
|
-
dispatch:
|
|
1857
|
-
timeoutMs:
|
|
1858
|
-
killGraceMs:
|
|
1859
|
-
agent:
|
|
1860
|
-
requireWorkerIsolation: z4.boolean().optional()
|
|
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()
|
|
1861
1987
|
}).optional(),
|
|
1862
|
-
reviewPolicy:
|
|
1863
|
-
codeReviewThreshold:
|
|
1864
|
-
securityThreshold:
|
|
1865
|
-
maxRounds:
|
|
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()
|
|
1866
1993
|
}).optional(),
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
briefSectionsSinceIssue: z4.number().int().nonnegative().optional(),
|
|
1870
|
-
documentationSinceIssue: z4.number().int().nonnegative().optional(),
|
|
1871
|
-
briefRulesSincePr: z4.number().int().nonnegative().optional(),
|
|
1872
|
-
agentBoxesRefusedSincePr: z4.number().int().nonnegative().optional()
|
|
1994
|
+
securityScan: z5.object({
|
|
1995
|
+
command: z5.array(z5.string().min(1)).min(1)
|
|
1873
1996
|
}).optional(),
|
|
1874
|
-
|
|
1875
|
-
|
|
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()
|
|
1876
2003
|
}).optional(),
|
|
1877
|
-
|
|
1878
|
-
|
|
2004
|
+
planning: z5.object({
|
|
2005
|
+
collisionThreshold: z5.number().int().nonnegative().optional()
|
|
1879
2006
|
}).optional(),
|
|
1880
|
-
|
|
1881
|
-
|
|
2007
|
+
prePush: z5.object({
|
|
2008
|
+
alwaysRun: z5.array(z5.string()).optional()
|
|
2009
|
+
}).optional(),
|
|
2010
|
+
report: z5.object({
|
|
2011
|
+
commandTimeoutMs: z5.number().int().positive().optional()
|
|
1882
2012
|
}).superRefine((report, ctx) => {
|
|
1883
2013
|
const commandTimeoutMs = report.commandTimeoutMs;
|
|
1884
2014
|
if (commandTimeoutMs !== undefined && commandTimeoutMs > MAX_REPORT_COMMAND_TIMEOUT_MS) {
|
|
1885
2015
|
ctx.addIssue({
|
|
1886
|
-
code:
|
|
2016
|
+
code: z5.ZodIssueCode.custom,
|
|
1887
2017
|
path: ["commandTimeoutMs"],
|
|
1888
2018
|
message: "must be at most 3600000 (1 hour)"
|
|
1889
2019
|
});
|
|
1890
2020
|
}
|
|
1891
2021
|
}).optional(),
|
|
1892
|
-
logPublish:
|
|
2022
|
+
logPublish: z5.unknown().refine((v) => v === undefined, {
|
|
1893
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)"
|
|
1894
2024
|
}),
|
|
1895
|
-
runtimeDir:
|
|
1896
|
-
logs:
|
|
1897
|
-
folder:
|
|
1898
|
-
url:
|
|
1899
|
-
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()
|
|
1900
2032
|
}).refine((v) => [v.folder, v.url].filter((x) => x !== undefined).length <= 1, {
|
|
1901
2033
|
message: "logs: set at most one of folder/url"
|
|
1902
2034
|
}).refine((v) => v.headers === undefined || v.url !== undefined, {
|
|
1903
2035
|
message: "logs: headers requires url"
|
|
2036
|
+
}).refine((v) => v.readHeaders === undefined || v.url !== undefined, {
|
|
2037
|
+
message: "logs: readHeaders requires url"
|
|
1904
2038
|
}).optional()
|
|
1905
2039
|
});
|
|
1906
2040
|
var GLOBAL_VINAYA_HOME = join2(homedir(), ".vinaya");
|
|
@@ -2008,17 +2142,12 @@ function resolveTrustAnchorLogsDestination(local, trustAnchorConfig) {
|
|
|
2008
2142
|
return "url" in anchored && anchored.url === local.url ? anchored : null;
|
|
2009
2143
|
return "folder" in anchored && anchored.folder === local.folder ? anchored : null;
|
|
2010
2144
|
}
|
|
2011
|
-
function resolveLogsHeaderValues(headers, env
|
|
2145
|
+
function resolveLogsHeaderValues(headers, env) {
|
|
2012
2146
|
if (!headers)
|
|
2013
2147
|
return;
|
|
2014
2148
|
const resolved = {};
|
|
2015
2149
|
for (const [key, value] of Object.entries(headers)) {
|
|
2016
|
-
resolved[key] = value.replace(/\$\{([A-Za-z_][A-Za-z0-9_]*)\}/g, (_match, name) =>
|
|
2017
|
-
const fromEnv = env[name];
|
|
2018
|
-
if (fromEnv !== undefined)
|
|
2019
|
-
return fromEnv;
|
|
2020
|
-
return readKeychain(name) ?? "";
|
|
2021
|
-
});
|
|
2150
|
+
resolved[key] = value.replace(/\$\{([A-Za-z_][A-Za-z0-9_]*)\}/g, (_match, name) => env[name] ?? "");
|
|
2022
2151
|
}
|
|
2023
2152
|
return resolved;
|
|
2024
2153
|
}
|
|
@@ -2027,7 +2156,7 @@ function trustAnchorRepo() {
|
|
|
2027
2156
|
if (fromRunner)
|
|
2028
2157
|
return fromRunner;
|
|
2029
2158
|
try {
|
|
2030
|
-
const url =
|
|
2159
|
+
const url = execFileSync2("git", ["remote", "get-url", "origin"], {
|
|
2031
2160
|
encoding: "utf-8",
|
|
2032
2161
|
stdio: ["ignore", "pipe", "pipe"]
|
|
2033
2162
|
});
|
|
@@ -2074,7 +2203,7 @@ function resolveCiTrustAnchorProbeRef(env = process.env) {
|
|
|
2074
2203
|
return ref;
|
|
2075
2204
|
}
|
|
2076
2205
|
function readTrustAnchorConfigAtRef(ref) {
|
|
2077
|
-
const raw =
|
|
2206
|
+
const raw = execFileSync2("git", ["show", `${ref}:${LOCAL_CONFIG_FILENAME}`], {
|
|
2078
2207
|
encoding: "utf-8",
|
|
2079
2208
|
stdio: ["ignore", "pipe", "pipe"],
|
|
2080
2209
|
timeout: 1e4
|
|
@@ -2088,7 +2217,7 @@ function ghFetchTrustAnchorConfig() {
|
|
|
2088
2217
|
const repo = trustAnchorRepo();
|
|
2089
2218
|
if (!repo)
|
|
2090
2219
|
throw new Error("could not resolve repo identity for the trust-anchor read");
|
|
2091
|
-
return
|
|
2220
|
+
return execFileSync2("gh", ["api", `repos/${repo}/contents/${LOCAL_CONFIG_FILENAME}`, "--jq", ".content"], {
|
|
2092
2221
|
encoding: "utf-8",
|
|
2093
2222
|
stdio: ["ignore", "pipe", "pipe"]
|
|
2094
2223
|
});
|
|
@@ -2179,7 +2308,7 @@ function loadConfig() {
|
|
|
2179
2308
|
var TOKENS_COLLECT_TRUST_PATH = join2(GLOBAL_VINAYA_HOME, "tokens-collect-trust.json");
|
|
2180
2309
|
|
|
2181
2310
|
// src/lib/remote-base.ts
|
|
2182
|
-
import { execFileSync as
|
|
2311
|
+
import { execFileSync as execFileSync3 } from "node:child_process";
|
|
2183
2312
|
import { join as join3 } from "node:path";
|
|
2184
2313
|
function cleanGitEnv() {
|
|
2185
2314
|
const env = { ...process.env };
|
|
@@ -2191,7 +2320,7 @@ function cleanGitEnv() {
|
|
|
2191
2320
|
}
|
|
2192
2321
|
function git(repoRoot, args) {
|
|
2193
2322
|
try {
|
|
2194
|
-
return
|
|
2323
|
+
return execFileSync3("git", args, {
|
|
2195
2324
|
cwd: repoRoot,
|
|
2196
2325
|
encoding: "utf8",
|
|
2197
2326
|
stdio: ["ignore", "pipe", "ignore"],
|
|
@@ -2247,7 +2376,7 @@ function changedFileDiffsSinceRemoteBase(repoRoot) {
|
|
|
2247
2376
|
}
|
|
2248
2377
|
function showBlob(repoRoot, ref, relative) {
|
|
2249
2378
|
try {
|
|
2250
|
-
return
|
|
2379
|
+
return execFileSync3("git", ["show", `${ref}:${relative}`], {
|
|
2251
2380
|
cwd: repoRoot,
|
|
2252
2381
|
encoding: "utf8",
|
|
2253
2382
|
maxBuffer: 64 * 1024 * 1024,
|