@attalabs/vinaya 0.31.0 → 0.33.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 +2 -3
- package/aeg-root/contracts/principal-operator.md +18 -5
- package/aeg-root/roles/developer/reference.md +3 -3
- package/aeg-root/roles/operator.md +69 -16
- package/aeg-root/roles/planner/reference.md +1 -1
- package/aeg-root/roles/tranche-archivist.md +1 -0
- package/aeg-root/skills/aeg-context-packets/SKILL.md +1 -1
- package/aeg-root/skills/aeg-context-packets/examples/operator-start.md +1 -1
- package/aeg-root/templates/pr-report-template.md +7 -2
- package/dist/checks/bin/check-body-bare-digits.js +340 -101
- package/dist/checks/bin/check-branch-topology.js +184 -105
- package/dist/checks/bin/check-brief-shape.js +333 -94
- package/dist/checks/bin/check-changeset-coverage.js +1028 -248
- package/dist/checks/bin/check-ci-shard-coverage.js +82 -0
- package/dist/checks/bin/check-closes-n.js +184 -105
- package/dist/checks/bin/check-coherence.js +345 -145
- package/dist/checks/bin/check-dead-branch-push.js +179 -59
- package/dist/checks/bin/check-dispatch-readiness.js +350 -150
- package/dist/checks/bin/check-doc-coverage-push.js +1011 -231
- package/dist/checks/bin/check-doc-coverage.js +1015 -235
- package/dist/checks/bin/check-doctrine-no-procedures.js +333 -94
- package/dist/checks/bin/check-doctrine-portability.js +1013 -233
- package/dist/checks/bin/check-evidence-fresh.js +1010 -222
- package/dist/checks/bin/check-exec-bits.js +1009 -229
- package/dist/checks/bin/check-first-push-dispatch.js +343 -145
- package/dist/checks/bin/check-issue-assignment.js +186 -107
- package/dist/checks/bin/check-issue-milestone-attach.js +176 -56
- package/dist/checks/bin/check-issue-objectives-numbering.js +176 -56
- package/dist/checks/bin/check-issue-parts-coverage.js +176 -56
- package/dist/checks/bin/check-issue-surface-globs.js +363 -143
- package/dist/checks/bin/check-issue-title-grammar.js +176 -56
- package/dist/checks/bin/check-issue-tranche-label.js +176 -56
- package/dist/checks/bin/check-main-branch-refusal.js +176 -56
- package/dist/checks/bin/check-no-disk-state.js +176 -56
- package/dist/checks/bin/check-pr-premise-reassert.js +333 -92
- package/dist/checks/bin/check-pr-report-density.js +176 -56
- package/dist/checks/bin/check-principal-test-plan-wait.js +176 -54
- package/dist/checks/bin/check-quoted-command.js +999 -217
- package/dist/checks/bin/check-reader-resolvable-prose.js +1011 -229
- package/dist/checks/bin/check-registry-gates.js +186 -56
- package/dist/checks/bin/check-retired-vocabulary.js +997 -215
- package/dist/checks/bin/check-review-gate.js +403 -203
- package/dist/checks/bin/check-single-plan-pr.js +176 -56
- package/dist/checks/bin/check-surface-scope.js +184 -105
- package/dist/checks/bin/check-test-plan.js +176 -54
- package/dist/checks/bin/check-token-collection-wired.js +182 -57
- package/dist/checks/bin/check-token-report.js +178 -58
- package/dist/checks/bin/check-workspace-escape.js +1011 -229
- package/dist/index.js +5971 -3489
- package/dist/lib/pre-push-cache-test-run.js +4431 -0
- package/dist/lib/pre-push-select-tests.js +799 -110
- package/package.json +3 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/actions.ts +10 -12
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/anchored-region.ts +5 -5
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/archive-task.ts +42 -17
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/baseline-capture.ts +1 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/branch-topology-gate.ts +3 -3
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/brief-render.ts +554 -95
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/brief-validation.ts +264 -44
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/claude-code-transcript.ts +9 -9
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/coherence-checks.ts +211 -30
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/consumer-enumeration.ts +2 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/control-store/index.ts +75 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/control-store/local.ts +961 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/control-store/migration.ts +212 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/control-store/outcomes.ts +135 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/control-store/records.ts +394 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dead-branch-push-audit.ts +1 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dead-branch-push-guard.ts +1 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/derive-section7.ts +2 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/assess-round.ts +514 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/fakes.ts +110 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/index.ts +27 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/journal-reconstruction.ts +123 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/render-summary.ts +27 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/types.ts +240 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/diagram-model.ts +1 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/direct-main-push.ts +1 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dispatch-gate.ts +65 -22
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/doc-claim.ts +238 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/doc-owners.ts +14 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/docs/docs-coherence.ts +1 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/docs/legacy-anchors.ts +1 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/docs/node-route.ts +1 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/docs/surfaced-manifest.ts +1 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/doctrine-no-procedures.ts +1 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/doctrine-portability.ts +5 -5
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/ensure-label.ts +1 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/first-push-dispatch-gate.ts +1 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/gate-audience.ts +14 -3
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/index.ts +379 -11
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/issue-assignment.ts +3 -4
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/issue-validation.ts +1450 -33
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/leftover-detection.ts +1 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/local-anchor-coverage.ts +2 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/envelope.ts +119 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/index.ts +75 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/redact.ts +87 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/schema.ts +801 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/store.ts +373 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/main-branch-refusal.ts +2 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/metering-io-guard.ts +1 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/milestone-validation.ts +2 -3
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/no-disk-state.ts +2 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/objectives.ts +288 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/parse-token-report.ts +3 -3
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/parse-tranche.ts +1 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/pr-report-density.ts +30 -16
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/pr-tier.ts +17 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/premise-check.ts +1 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/quoted-command.ts +1 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/reader-resolvable-prose.ts +267 -19
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/registry-checks.ts +91 -24
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/registry-scaffold.ts +6 -6
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/report-tokens.ts +4 -4
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-gate.ts +239 -110
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-input-manifest.ts +384 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-policy.ts +184 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-status.ts +65 -18
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/ruling-ordinal.ts +76 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/single-plan-pr.ts +4 -4
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/state-machine-model.ts +40 -27
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/symbol-collisions.ts +2 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/task-branch-identity.ts +38 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/task-tools.ts +488 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/test-plan-gate.ts +7 -9
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/test-plan-section.ts +5 -5
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/types.ts +4 -4
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/verdict-extraction.ts +314 -56
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/waiver-label.ts +2 -3
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/workspace-escape.ts +3 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/BUILD_ID +1 -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/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.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/api/coherence/route.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/api/coherence/route.js.nft.json +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.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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +2 -2
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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/chunks/{[externals]__1agj1ww._.js → [externals]__0cki-x_._.js} +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/[root-of-the-server]__02a-3g8._.js +6 -6
- 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]__074w9nf._.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]__0r7e54g._.js → [root-of-the-server]__18paley._.js} +1 -1
- 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]__1wc4-ip._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/{[root-of-the-server]__1r47dr7._.js → _08onyya._.js} +3 -3
- 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/_0kf2g72._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0y1jv16._.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/_15gdg48._.js +5 -5
- 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/node_modules_@clerk_nextjs_dist_esm_app-router_server-actions_1x7vfhn.js +2 -2
- 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/0bjnj-5fy4e7l.js +1 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{1dc2_-c_gavj1.js → 1ce2dj27_cgbj.js} +4 -4
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{3xg6-flovrcx-.js → 22s44f5k3ecmj.js} +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/34hhdtbp20krb.js +1 -0
- package/studio-standalone/apps/vinaya-studio/web/package.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__0hstap0._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/2t_rfsztmwu6y.js +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/3ua4rm5f-a9k6.js +0 -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/{aeg-core → vinaya/studio-standalone/_node_modules/@attalabs/aeg-core}/bin/verify-coherence.ts +0 -0
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{e8XbZ2vlVz40KzHmlqhwP → vl7QVqELe1AQ-9kaOd9mR}/_buildManifest.js +0 -0
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{e8XbZ2vlVz40KzHmlqhwP → vl7QVqELe1AQ-9kaOd9mR}/_clientMiddlewareManifest.js +0 -0
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{e8XbZ2vlVz40KzHmlqhwP → vl7QVqELe1AQ-9kaOd9mR}/_ssgManifest.js +0 -0
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { createRequire } from "node:module";
|
|
3
|
-
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
4
2
|
// ../../packages/aeg-core/src/gate-audience.ts
|
|
5
3
|
var GATE_AUDIENCE = {
|
|
6
4
|
"check-branch-topology": { shippedAs: "branch-topology", ring: 0 },
|
|
@@ -1034,7 +1032,7 @@ function withDefaults(oldDefaults, newDefaults) {
|
|
|
1034
1032
|
var endpoint = withDefaults(null, DEFAULTS);
|
|
1035
1033
|
|
|
1036
1034
|
// ../../node_modules/fast-content-type-parse/index.js
|
|
1037
|
-
var NullObject = function
|
|
1035
|
+
var NullObject = function NullObject() {};
|
|
1038
1036
|
NullObject.prototype = Object.create(null);
|
|
1039
1037
|
var paramRE = /; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu;
|
|
1040
1038
|
var quotedPairRE = /\\([\v\u0020-\u00ff])/gu;
|
|
@@ -1778,27 +1776,27 @@ function splitTableRow(row) {
|
|
|
1778
1776
|
return parts.map((p) => p.split(PLACEHOLDER).join("|"));
|
|
1779
1777
|
}
|
|
1780
1778
|
// ../../packages/aeg-core/src/blast-radius-domains.ts
|
|
1781
|
-
function resolveWorkspaceEntry(
|
|
1782
|
-
if (
|
|
1783
|
-
const baseDir =
|
|
1779
|
+
function resolveWorkspaceEntry(entry, listDirs) {
|
|
1780
|
+
if (entry.endsWith("/*")) {
|
|
1781
|
+
const baseDir = entry.slice(0, -2);
|
|
1784
1782
|
return listDirs(baseDir).map((name) => `${baseDir}/${name}`);
|
|
1785
1783
|
}
|
|
1786
|
-
if (
|
|
1784
|
+
if (entry.includes("*"))
|
|
1787
1785
|
return [];
|
|
1788
|
-
return [
|
|
1786
|
+
return [entry];
|
|
1789
1787
|
}
|
|
1790
1788
|
// ../../packages/aeg-core/src/consumer-enumeration.ts
|
|
1791
1789
|
function deriveWorkspaceMemberDirs(workspaces, listDirs) {
|
|
1792
|
-
const positive = workspaces.filter((
|
|
1793
|
-
const negative = workspaces.filter((
|
|
1790
|
+
const positive = workspaces.filter((entry) => !entry.startsWith("!"));
|
|
1791
|
+
const negative = workspaces.filter((entry) => entry.startsWith("!")).map((entry) => entry.slice(1));
|
|
1794
1792
|
const excluded = new Set;
|
|
1795
|
-
for (const
|
|
1796
|
-
for (const member of resolveWorkspaceEntry(
|
|
1793
|
+
for (const entry of negative) {
|
|
1794
|
+
for (const member of resolveWorkspaceEntry(entry, listDirs))
|
|
1797
1795
|
excluded.add(member);
|
|
1798
1796
|
}
|
|
1799
1797
|
const members = new Set;
|
|
1800
|
-
for (const
|
|
1801
|
-
for (const member of resolveWorkspaceEntry(
|
|
1798
|
+
for (const entry of positive) {
|
|
1799
|
+
for (const member of resolveWorkspaceEntry(entry, listDirs)) {
|
|
1802
1800
|
if (!excluded.has(member))
|
|
1803
1801
|
members.add(member);
|
|
1804
1802
|
}
|
|
@@ -2044,12 +2042,24 @@ function extractBaseSha(comment) {
|
|
|
2044
2042
|
const m = firstThirteenLines(comment).match(BASE_SHA_PATTERN);
|
|
2045
2043
|
return m ? m[1].toLowerCase() : null;
|
|
2046
2044
|
}
|
|
2047
|
-
var
|
|
2045
|
+
var FINDING_DESCRIPTION_STATE = /^F(\d+)(?:\s+\S+)?(?:\s+(open|fix-claimed|reproduced|resolved))?:/;
|
|
2046
|
+
function parseFindingState(description) {
|
|
2047
|
+
const m = FINDING_DESCRIPTION_STATE.exec(description.trim());
|
|
2048
|
+
if (!m)
|
|
2049
|
+
return { id: null, state: null };
|
|
2050
|
+
return { id: `F${m[1]}`, state: m[2] ?? null };
|
|
2051
|
+
}
|
|
2052
|
+
var FINDING_SEVERITY_LINE = /^\d+\.\s+\[([A-Z][A-Z]*)\]\s+(.+?)\s+—(?:\s+(.*))?$/gm;
|
|
2048
2053
|
function extractFindingSeverities(comment) {
|
|
2049
|
-
return [...comment.matchAll(FINDING_SEVERITY_LINE)].map((m) =>
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2054
|
+
return [...comment.matchAll(FINDING_SEVERITY_LINE)].map((m) => {
|
|
2055
|
+
const { id, state } = parseFindingState(m[3] ?? "");
|
|
2056
|
+
return {
|
|
2057
|
+
severity: m[1],
|
|
2058
|
+
location: m[2],
|
|
2059
|
+
id,
|
|
2060
|
+
state
|
|
2061
|
+
};
|
|
2062
|
+
});
|
|
2053
2063
|
}
|
|
2054
2064
|
function extractVerdict(comments, valuePattern, missingLabel) {
|
|
2055
2065
|
const candidates = comments.filter((c) => valuePattern.test(c));
|
|
@@ -2122,15 +2132,15 @@ function summarizeTranscript(jsonl) {
|
|
|
2122
2132
|
const line = rawLine.trim();
|
|
2123
2133
|
if (!line)
|
|
2124
2134
|
continue;
|
|
2125
|
-
let
|
|
2135
|
+
let entry;
|
|
2126
2136
|
try {
|
|
2127
|
-
|
|
2137
|
+
entry = JSON.parse(line);
|
|
2128
2138
|
} catch {
|
|
2129
2139
|
continue;
|
|
2130
2140
|
}
|
|
2131
|
-
if (!
|
|
2141
|
+
if (!entry || typeof entry !== "object")
|
|
2132
2142
|
continue;
|
|
2133
|
-
const obj =
|
|
2143
|
+
const obj = entry;
|
|
2134
2144
|
if (obj.type !== "assistant")
|
|
2135
2145
|
continue;
|
|
2136
2146
|
const message = obj.message;
|
|
@@ -2463,6 +2473,12 @@ function evaluateReviewFindings(findings, scale, threshold) {
|
|
|
2463
2473
|
});
|
|
2464
2474
|
return { outcome: blockingFindings.length > 0 ? "blocked" : "clean", blockingFindings };
|
|
2465
2475
|
}
|
|
2476
|
+
function isConsequentialFinding(finding) {
|
|
2477
|
+
return finding.state !== "resolved";
|
|
2478
|
+
}
|
|
2479
|
+
function consequentialFindings(findings) {
|
|
2480
|
+
return findings.filter((f) => isConsequentialFinding(f));
|
|
2481
|
+
}
|
|
2466
2482
|
function evaluateCodeReview(findings, policy) {
|
|
2467
2483
|
return evaluateReviewFindings(findings, CODE_REVIEW_SEVERITY_ORDER, policy.codeReviewThreshold);
|
|
2468
2484
|
}
|
|
@@ -2978,7 +2994,7 @@ function isStep0Block(content) {
|
|
|
2978
2994
|
}
|
|
2979
2995
|
function checkCommandsCarryOutput(prBody) {
|
|
2980
2996
|
const errors = [];
|
|
2981
|
-
for (const [
|
|
2997
|
+
for (const [label, num] of [
|
|
2982
2998
|
["5", 5],
|
|
2983
2999
|
["6", 6]
|
|
2984
3000
|
]) {
|
|
@@ -2992,7 +3008,7 @@ function checkCommandsCarryOutput(prBody) {
|
|
|
2992
3008
|
continue;
|
|
2993
3009
|
const next = blocks[i + 1];
|
|
2994
3010
|
if (!next || isCommandBlock(next.content)) {
|
|
2995
|
-
errors.push(`brief-validation commands carry output: §${
|
|
3011
|
+
errors.push(`brief-validation commands carry output: §${label} has a command block ("${firstNonBlankLine(block.content)}") not immediately followed by a non-command output block — the very next fenced block must hold that command's actual output, not another command.`);
|
|
2996
3012
|
}
|
|
2997
3013
|
}
|
|
2998
3014
|
}
|
|
@@ -3429,8 +3445,8 @@ function stripPartBackticks(text) {
|
|
|
3429
3445
|
function partWordCount(text) {
|
|
3430
3446
|
return text.split(/\s+/).filter((w) => /[a-z]/i.test(w)).length;
|
|
3431
3447
|
}
|
|
3432
|
-
function looksLikeFilePath(
|
|
3433
|
-
const stripped =
|
|
3448
|
+
function looksLikeFilePath(entry) {
|
|
3449
|
+
const stripped = entry.replace(/\/\*\*?$/, "");
|
|
3434
3450
|
const lastSegment = stripped.split("/").pop() ?? stripped;
|
|
3435
3451
|
const extMatch = /\.[A-Za-z0-9]{1,6}$/.exec(lastSegment);
|
|
3436
3452
|
return extMatch !== null && extMatch.index > 0;
|
|
@@ -3916,14 +3932,14 @@ function checkClosesNTopology(branch, prBody, trancheFiles, taskIssueRefs) {
|
|
|
3916
3932
|
const referenced = extractClosesReferences(prBody);
|
|
3917
3933
|
if (taskIssueRefs) {
|
|
3918
3934
|
for (const n of referenced) {
|
|
3919
|
-
const
|
|
3920
|
-
if (!
|
|
3935
|
+
const ref = taskIssueRefs.get(n);
|
|
3936
|
+
if (!ref)
|
|
3921
3937
|
continue;
|
|
3922
|
-
const expectedBranch = `task/${
|
|
3938
|
+
const expectedBranch = `task/${ref.trancheSlug}/${ref.taskId}`;
|
|
3923
3939
|
if (branch !== expectedBranch) {
|
|
3924
3940
|
return {
|
|
3925
3941
|
ok: false,
|
|
3926
|
-
message: `closes-n-reverse: branch "${branch}" closes #${n} (task ${
|
|
3942
|
+
message: `closes-n-reverse: branch "${branch}" closes #${n} (task ${ref.taskId} of tranche "${ref.trancheSlug}") but is not named "${expectedBranch}" — rename the branch and re-push, or if this work is intentionally outside AEG's dispatch flow, remove the Closes reference.`
|
|
3927
3943
|
};
|
|
3928
3944
|
}
|
|
3929
3945
|
}
|
|
@@ -3932,15 +3948,15 @@ function checkClosesNTopology(branch, prBody, trancheFiles, taskIssueRefs) {
|
|
|
3932
3948
|
if (!ref)
|
|
3933
3949
|
return { ok: true };
|
|
3934
3950
|
if (ref.kind === "issue") {
|
|
3935
|
-
const
|
|
3936
|
-
if (!referenced.has(
|
|
3951
|
+
const expectedIssue = ref.issueNumber;
|
|
3952
|
+
if (!referenced.has(expectedIssue)) {
|
|
3937
3953
|
return {
|
|
3938
3954
|
ok: false,
|
|
3939
|
-
expectedIssue
|
|
3940
|
-
message: `closes-n: PR body does not contain \`Closes #${
|
|
3955
|
+
expectedIssue,
|
|
3956
|
+
message: `closes-n: PR body does not contain \`Closes #${expectedIssue}\` (required for branch "${branch}"). Add it to the PR body Summary section.`
|
|
3941
3957
|
};
|
|
3942
3958
|
}
|
|
3943
|
-
return { ok: true, expectedIssue
|
|
3959
|
+
return { ok: true, expectedIssue };
|
|
3944
3960
|
}
|
|
3945
3961
|
const trancheSlug = ref.tranche;
|
|
3946
3962
|
const taskId = ref.taskId;
|
|
@@ -3986,8 +4002,8 @@ function extractIssue(body) {
|
|
|
3986
4002
|
const anchorNums = closesRefs(anchored);
|
|
3987
4003
|
if (anchorNums.length === 0)
|
|
3988
4004
|
return { issue: null, extraIssues: bodyNums, outsideHeader: false };
|
|
3989
|
-
const
|
|
3990
|
-
return { issue
|
|
4005
|
+
const issue = anchorNums[0];
|
|
4006
|
+
return { issue, extraIssues: bodyNums.filter((n) => n !== issue), outsideHeader: false };
|
|
3991
4007
|
}
|
|
3992
4008
|
const headerNums = closesRefs(headerRegion(stripped));
|
|
3993
4009
|
if (bodyNums.length === 0)
|
|
@@ -4056,15 +4072,15 @@ function compareManifest(echoed, current, patchIdOf) {
|
|
|
4056
4072
|
const bothFullShas = echoedShaLen >= 40 && currentShaLen >= 40;
|
|
4057
4073
|
const base = patchHead || exactHead && bothFullShas ? true : isBoundToBase(echoed, current.baseSha);
|
|
4058
4074
|
const briefHashBound = isBoundToBriefHash(echoed, current.briefHash);
|
|
4059
|
-
const
|
|
4075
|
+
const objectivesVersion = isBoundToObjectives(echoed, current.objectivesVersion);
|
|
4060
4076
|
const rulingOrdinal = isBoundToRulings(echoed, current.rulingOrdinal);
|
|
4061
4077
|
const policyDigestBound = isBoundToPolicy(echoed, current.policyDigest);
|
|
4062
4078
|
return {
|
|
4063
|
-
bound: head && base && briefHashBound &&
|
|
4079
|
+
bound: head && base && briefHashBound && objectivesVersion && rulingOrdinal && policyDigestBound,
|
|
4064
4080
|
head,
|
|
4065
4081
|
base,
|
|
4066
4082
|
briefHash: briefHashBound,
|
|
4067
|
-
objectivesVersion
|
|
4083
|
+
objectivesVersion,
|
|
4068
4084
|
rulingOrdinal,
|
|
4069
4085
|
policyDigest: policyDigestBound
|
|
4070
4086
|
};
|
|
@@ -4095,8 +4111,8 @@ function checkReviewGate(input) {
|
|
|
4095
4111
|
let codeReviewPolicyEvaluation;
|
|
4096
4112
|
let securityPolicyEvaluation;
|
|
4097
4113
|
try {
|
|
4098
|
-
codeReviewPolicyEvaluation = evaluateCodeReview(codeReview.findingSeverities, policy);
|
|
4099
|
-
securityPolicyEvaluation = evaluateSecurityReview(security.findingSeverities, policy);
|
|
4114
|
+
codeReviewPolicyEvaluation = evaluateCodeReview(consequentialFindings(codeReview.findingSeverities), policy);
|
|
4115
|
+
securityPolicyEvaluation = evaluateSecurityReview(consequentialFindings(security.findingSeverities), policy);
|
|
4100
4116
|
} catch (err) {
|
|
4101
4117
|
return {
|
|
4102
4118
|
verdict: "fail",
|
|
@@ -5177,11 +5193,27 @@ var ObservedSchema = z.object({
|
|
|
5177
5193
|
var TaskStatusInputSchema = z.object({
|
|
5178
5194
|
task: TaskToolRefSchema.optional()
|
|
5179
5195
|
}).merge(PageRequestSchema).strict();
|
|
5196
|
+
var TaskConfidenceSchema = z.object({
|
|
5197
|
+
round: z.number().int().positive(),
|
|
5198
|
+
percent: z.number().int().min(0).max(100).nullable(),
|
|
5199
|
+
source: z.enum(["stated", "published-summary"])
|
|
5200
|
+
}).strict();
|
|
5201
|
+
var TaskPhaseHistorySchema = z.object({
|
|
5202
|
+
typicalPhaseMinutes: z.number().nonnegative(),
|
|
5203
|
+
typicalPhaseSamples: z.number().int().positive()
|
|
5204
|
+
}).strict();
|
|
5180
5205
|
var TaskStatusItemSchema = z.object({
|
|
5181
5206
|
task: TaskToolRefSchema,
|
|
5182
5207
|
issue: z.number().int().positive(),
|
|
5183
5208
|
pr: z.number().int().positive().nullable(),
|
|
5184
|
-
state: z.string()
|
|
5209
|
+
state: z.string(),
|
|
5210
|
+
round: z.number().int().positive().nullable().optional(),
|
|
5211
|
+
phase: z.string().min(1).nullable().optional(),
|
|
5212
|
+
minutesInPhase: z.number().nonnegative().nullable().optional(),
|
|
5213
|
+
phaseIsCurrent: z.boolean().nullable().optional(),
|
|
5214
|
+
lastConfidence: TaskConfidenceSchema.nullable().optional(),
|
|
5215
|
+
lastConfidenceUnread: z.boolean().optional(),
|
|
5216
|
+
phaseHistory: TaskPhaseHistorySchema.nullable().optional()
|
|
5185
5217
|
}).merge(ObservedSchema);
|
|
5186
5218
|
var TaskStatusResultSchema = z.object({
|
|
5187
5219
|
items: z.array(TaskStatusItemSchema),
|
|
@@ -5193,7 +5225,7 @@ var EscalationInputsSchema = z.object({
|
|
|
5193
5225
|
round: z.number().int().nonnegative(),
|
|
5194
5226
|
head: z.string(),
|
|
5195
5227
|
branch: z.string(),
|
|
5196
|
-
prNumber: z.number().int().positive()
|
|
5228
|
+
prNumber: z.number().int().positive().nullable()
|
|
5197
5229
|
});
|
|
5198
5230
|
var EscalationEvidenceSchema = z.object({
|
|
5199
5231
|
round: z.number().int().nonnegative(),
|
|
@@ -5229,13 +5261,45 @@ var TaskEscalationReadResultSchema = z.object({
|
|
|
5229
5261
|
items: z.array(TaskEscalationPacketSchema),
|
|
5230
5262
|
nextCursor: z.string().nullable()
|
|
5231
5263
|
}).merge(ObservedSchema);
|
|
5232
|
-
var
|
|
5233
|
-
|
|
5234
|
-
|
|
5264
|
+
var TaskPrCheckSchema = z.object({
|
|
5265
|
+
name: z.string(),
|
|
5266
|
+
required: z.boolean(),
|
|
5267
|
+
status: z.string(),
|
|
5268
|
+
conclusion: z.string().nullable(),
|
|
5269
|
+
detailsUrl: z.string().nullable(),
|
|
5270
|
+
failureSummary: z.string().nullable()
|
|
5271
|
+
});
|
|
5272
|
+
var TaskPrVerdictSchema = z.object({
|
|
5273
|
+
role: z.enum(["code-review", "security"]),
|
|
5274
|
+
value: z.string(),
|
|
5275
|
+
judgedHead: z.string().nullable(),
|
|
5276
|
+
objectivesVersion: z.string().nullable()
|
|
5277
|
+
});
|
|
5278
|
+
var TaskPrPauseSchema = z.object({
|
|
5279
|
+
reason: z.string(),
|
|
5280
|
+
body: z.string()
|
|
5281
|
+
});
|
|
5282
|
+
var TaskPrReviewRecordSchema = z.object({
|
|
5283
|
+
verdicts: z.array(TaskPrVerdictSchema),
|
|
5284
|
+
roundMarkers: z.array(z.number().int().nonnegative()),
|
|
5285
|
+
summaryTable: z.string().nullable(),
|
|
5286
|
+
pause: TaskPrPauseSchema.nullable()
|
|
5287
|
+
});
|
|
5288
|
+
var TaskPrReadInputSchema = z.object({
|
|
5289
|
+
task: TaskToolRefSchema,
|
|
5290
|
+
pr: z.number().int().positive().optional()
|
|
5235
5291
|
}).strict();
|
|
5292
|
+
var TaskPrReadResultSchema = z.object({
|
|
5293
|
+
task: TaskToolRefSchema,
|
|
5294
|
+
issue: z.number().int().positive(),
|
|
5295
|
+
pr: z.number().int().positive(),
|
|
5296
|
+
head: z.string().nullable(),
|
|
5297
|
+
checks: z.array(TaskPrCheckSchema),
|
|
5298
|
+
review: TaskPrReviewRecordSchema
|
|
5299
|
+
}).merge(ObservedSchema);
|
|
5236
5300
|
var TaskStartResultSchema = z.object({
|
|
5237
5301
|
requestId: z.string().min(1),
|
|
5238
|
-
run:
|
|
5302
|
+
run: TaskToolRefSchema,
|
|
5239
5303
|
started: z.boolean(),
|
|
5240
5304
|
startedAt: z.string(),
|
|
5241
5305
|
mode: z.literal("attended")
|
|
@@ -5249,7 +5313,7 @@ var TaskCancelInputSchema = z.object({
|
|
|
5249
5313
|
}).strict();
|
|
5250
5314
|
var TaskResumeResultSchema = z.object({
|
|
5251
5315
|
task: z.number().int().positive(),
|
|
5252
|
-
pr: z.number().int().positive(),
|
|
5316
|
+
pr: z.number().int().positive().nullable(),
|
|
5253
5317
|
escalationId: z.string().min(1),
|
|
5254
5318
|
outcome: z.enum(["started", "already_resumed"]),
|
|
5255
5319
|
authenticatedBy: z.string().min(1),
|
|
@@ -5258,7 +5322,7 @@ var TaskResumeResultSchema = z.object({
|
|
|
5258
5322
|
var TaskCancelOutcomeSchema = z.enum(["confirmed", "pending", "uncertain"]);
|
|
5259
5323
|
var TaskCancelResultSchema = z.object({
|
|
5260
5324
|
task: z.number().int().positive(),
|
|
5261
|
-
pr: z.number().int().positive(),
|
|
5325
|
+
pr: z.number().int().positive().nullable(),
|
|
5262
5326
|
escalationId: z.string().min(1),
|
|
5263
5327
|
outcome: TaskCancelOutcomeSchema,
|
|
5264
5328
|
authenticatedBy: z.string().min(1),
|
|
@@ -5269,6 +5333,7 @@ var TASK_TOOL_NAMES = [
|
|
|
5269
5333
|
"task_start",
|
|
5270
5334
|
"task_status",
|
|
5271
5335
|
"task_escalation_read",
|
|
5336
|
+
"task_pr_read",
|
|
5272
5337
|
"task_resume",
|
|
5273
5338
|
"task_cancel"
|
|
5274
5339
|
];
|
|
@@ -5496,6 +5561,10 @@ function findWorkspaceEscapes(files, knownPaths, workspaceDirs = DEFAULT_WORKSPA
|
|
|
5496
5561
|
}
|
|
5497
5562
|
return findings;
|
|
5498
5563
|
}
|
|
5564
|
+
// ../../packages/aeg-core/src/dev-review-loop/types.ts
|
|
5565
|
+
var SEVERITY_COLUMNS = ["blocker", "major", "minor", "critical", "high", "medium", "low"];
|
|
5566
|
+
// ../../packages/aeg-core/src/dev-review-loop/journal-reconstruction.ts
|
|
5567
|
+
var SUMMARY_TABLE_HEADER = `| round | ${SEVERITY_COLUMNS.join(" | ")} | confidence | outcome |`;
|
|
5499
5568
|
// ../../packages/aeg-core/src/log/envelope.ts
|
|
5500
5569
|
import { createHash as createHash5 } from "node:crypto";
|
|
5501
5570
|
|
|
@@ -6034,6 +6103,7 @@ function redact(value, home) {
|
|
|
6034
6103
|
return value;
|
|
6035
6104
|
}
|
|
6036
6105
|
// ../../packages/aeg-core/src/log/store.ts
|
|
6106
|
+
var KNOWN_SCHEMA_VERSIONS = [1, 2];
|
|
6037
6107
|
function metaOf(obj) {
|
|
6038
6108
|
if (obj === null || typeof obj !== "object")
|
|
6039
6109
|
return null;
|
|
@@ -6056,11 +6126,61 @@ function recordIdentity(obj) {
|
|
|
6056
6126
|
}
|
|
6057
6127
|
return null;
|
|
6058
6128
|
}
|
|
6059
|
-
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
|
|
6063
|
-
|
|
6129
|
+
function schemaVersionOf(obj) {
|
|
6130
|
+
const meta = metaOf(obj);
|
|
6131
|
+
const schema = meta?.schema;
|
|
6132
|
+
return typeof schema === "number" ? schema : null;
|
|
6133
|
+
}
|
|
6134
|
+
function isKnownSchema(version) {
|
|
6135
|
+
return version !== null && KNOWN_SCHEMA_VERSIONS.includes(version);
|
|
6136
|
+
}
|
|
6137
|
+
function classifyStoredLine(raw, home) {
|
|
6138
|
+
let obj;
|
|
6139
|
+
try {
|
|
6140
|
+
obj = JSON.parse(raw);
|
|
6141
|
+
} catch {
|
|
6142
|
+
return { status: "invalid", identity: null, raw, reason: "not valid JSON" };
|
|
6143
|
+
}
|
|
6144
|
+
const version = schemaVersionOf(obj);
|
|
6145
|
+
if (version === null) {
|
|
6146
|
+
return { status: "invalid", identity: recordIdentity(obj), raw, reason: "no readable meta.schema" };
|
|
6147
|
+
}
|
|
6148
|
+
if (!isKnownSchema(version)) {
|
|
6149
|
+
return {
|
|
6150
|
+
status: "unknown_version",
|
|
6151
|
+
identity: recordIdentity(obj),
|
|
6152
|
+
schema: version,
|
|
6153
|
+
raw,
|
|
6154
|
+
reason: `schema version ${version} is not one this build validates (${KNOWN_SCHEMA_VERSIONS.join(", ")}) — kept for diagnosis`
|
|
6155
|
+
};
|
|
6156
|
+
}
|
|
6157
|
+
const result = LogEventSchema.safeParse(obj);
|
|
6158
|
+
if (!result.success) {
|
|
6159
|
+
return {
|
|
6160
|
+
status: "invalid",
|
|
6161
|
+
identity: recordIdentity(obj),
|
|
6162
|
+
raw,
|
|
6163
|
+
reason: result.error.issues[0]?.message ?? "schema violation"
|
|
6164
|
+
};
|
|
6165
|
+
}
|
|
6166
|
+
const event = result.data;
|
|
6167
|
+
const identity = recordIdentity(event);
|
|
6168
|
+
if (identity === null) {
|
|
6169
|
+
return { status: "invalid", identity: null, raw, reason: "valid event with no derivable identity" };
|
|
6170
|
+
}
|
|
6171
|
+
const redacted = redact(event, home);
|
|
6172
|
+
const provenance = version === 2 ? event.meta.provenance ?? null : null;
|
|
6173
|
+
return {
|
|
6174
|
+
status: "ok",
|
|
6175
|
+
identity,
|
|
6176
|
+
runId: event.meta.run_id,
|
|
6177
|
+
seq: event.meta.seq,
|
|
6178
|
+
schema: version,
|
|
6179
|
+
provenance,
|
|
6180
|
+
event,
|
|
6181
|
+
postLine: JSON.stringify(redacted)
|
|
6182
|
+
};
|
|
6183
|
+
}
|
|
6064
6184
|
// ../../packages/aeg-core/src/control-store/records.ts
|
|
6065
6185
|
import { z as z3 } from "zod";
|
|
6066
6186
|
var isoTimestamp = z3.string().min(1);
|