@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
|
@@ -1034,7 +1034,7 @@ function withDefaults(oldDefaults, newDefaults) {
|
|
|
1034
1034
|
var endpoint = withDefaults(null, DEFAULTS);
|
|
1035
1035
|
|
|
1036
1036
|
// ../../node_modules/fast-content-type-parse/index.js
|
|
1037
|
-
var NullObject = function
|
|
1037
|
+
var NullObject = function NullObject() {};
|
|
1038
1038
|
NullObject.prototype = Object.create(null);
|
|
1039
1039
|
var paramRE = /; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu;
|
|
1040
1040
|
var quotedPairRE = /\\([\v\u0020-\u00ff])/gu;
|
|
@@ -1778,27 +1778,27 @@ function splitTableRow(row) {
|
|
|
1778
1778
|
return parts.map((p) => p.split(PLACEHOLDER).join("|"));
|
|
1779
1779
|
}
|
|
1780
1780
|
// ../../packages/aeg-core/src/blast-radius-domains.ts
|
|
1781
|
-
function resolveWorkspaceEntry(
|
|
1782
|
-
if (
|
|
1783
|
-
const baseDir =
|
|
1781
|
+
function resolveWorkspaceEntry(entry, listDirs) {
|
|
1782
|
+
if (entry.endsWith("/*")) {
|
|
1783
|
+
const baseDir = entry.slice(0, -2);
|
|
1784
1784
|
return listDirs(baseDir).map((name) => `${baseDir}/${name}`);
|
|
1785
1785
|
}
|
|
1786
|
-
if (
|
|
1786
|
+
if (entry.includes("*"))
|
|
1787
1787
|
return [];
|
|
1788
|
-
return [
|
|
1788
|
+
return [entry];
|
|
1789
1789
|
}
|
|
1790
1790
|
// ../../packages/aeg-core/src/consumer-enumeration.ts
|
|
1791
1791
|
function deriveWorkspaceMemberDirs(workspaces, listDirs) {
|
|
1792
|
-
const positive = workspaces.filter((
|
|
1793
|
-
const negative = workspaces.filter((
|
|
1792
|
+
const positive = workspaces.filter((entry) => !entry.startsWith("!"));
|
|
1793
|
+
const negative = workspaces.filter((entry) => entry.startsWith("!")).map((entry) => entry.slice(1));
|
|
1794
1794
|
const excluded = new Set;
|
|
1795
|
-
for (const
|
|
1796
|
-
for (const member of resolveWorkspaceEntry(
|
|
1795
|
+
for (const entry of negative) {
|
|
1796
|
+
for (const member of resolveWorkspaceEntry(entry, listDirs))
|
|
1797
1797
|
excluded.add(member);
|
|
1798
1798
|
}
|
|
1799
1799
|
const members = new Set;
|
|
1800
|
-
for (const
|
|
1801
|
-
for (const member of resolveWorkspaceEntry(
|
|
1800
|
+
for (const entry of positive) {
|
|
1801
|
+
for (const member of resolveWorkspaceEntry(entry, listDirs)) {
|
|
1802
1802
|
if (!excluded.has(member))
|
|
1803
1803
|
members.add(member);
|
|
1804
1804
|
}
|
|
@@ -2044,12 +2044,24 @@ function extractBaseSha(comment) {
|
|
|
2044
2044
|
const m = firstThirteenLines(comment).match(BASE_SHA_PATTERN);
|
|
2045
2045
|
return m ? m[1].toLowerCase() : null;
|
|
2046
2046
|
}
|
|
2047
|
-
var
|
|
2047
|
+
var FINDING_DESCRIPTION_STATE = /^F(\d+)(?:\s+\S+)?(?:\s+(open|fix-claimed|reproduced|resolved))?:/;
|
|
2048
|
+
function parseFindingState(description) {
|
|
2049
|
+
const m = FINDING_DESCRIPTION_STATE.exec(description.trim());
|
|
2050
|
+
if (!m)
|
|
2051
|
+
return { id: null, state: null };
|
|
2052
|
+
return { id: `F${m[1]}`, state: m[2] ?? null };
|
|
2053
|
+
}
|
|
2054
|
+
var FINDING_SEVERITY_LINE = /^\d+\.\s+\[([A-Z][A-Z]*)\]\s+(.+?)\s+—(?:\s+(.*))?$/gm;
|
|
2048
2055
|
function extractFindingSeverities(comment) {
|
|
2049
|
-
return [...comment.matchAll(FINDING_SEVERITY_LINE)].map((m) =>
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2056
|
+
return [...comment.matchAll(FINDING_SEVERITY_LINE)].map((m) => {
|
|
2057
|
+
const { id, state } = parseFindingState(m[3] ?? "");
|
|
2058
|
+
return {
|
|
2059
|
+
severity: m[1],
|
|
2060
|
+
location: m[2],
|
|
2061
|
+
id,
|
|
2062
|
+
state
|
|
2063
|
+
};
|
|
2064
|
+
});
|
|
2053
2065
|
}
|
|
2054
2066
|
function extractVerdict(comments, valuePattern, missingLabel) {
|
|
2055
2067
|
const candidates = comments.filter((c) => valuePattern.test(c));
|
|
@@ -2122,15 +2134,15 @@ function summarizeTranscript(jsonl) {
|
|
|
2122
2134
|
const line = rawLine.trim();
|
|
2123
2135
|
if (!line)
|
|
2124
2136
|
continue;
|
|
2125
|
-
let
|
|
2137
|
+
let entry;
|
|
2126
2138
|
try {
|
|
2127
|
-
|
|
2139
|
+
entry = JSON.parse(line);
|
|
2128
2140
|
} catch {
|
|
2129
2141
|
continue;
|
|
2130
2142
|
}
|
|
2131
|
-
if (!
|
|
2143
|
+
if (!entry || typeof entry !== "object")
|
|
2132
2144
|
continue;
|
|
2133
|
-
const obj =
|
|
2145
|
+
const obj = entry;
|
|
2134
2146
|
if (obj.type !== "assistant")
|
|
2135
2147
|
continue;
|
|
2136
2148
|
const message = obj.message;
|
|
@@ -2463,6 +2475,12 @@ function evaluateReviewFindings(findings, scale, threshold) {
|
|
|
2463
2475
|
});
|
|
2464
2476
|
return { outcome: blockingFindings.length > 0 ? "blocked" : "clean", blockingFindings };
|
|
2465
2477
|
}
|
|
2478
|
+
function isConsequentialFinding(finding) {
|
|
2479
|
+
return finding.state !== "resolved";
|
|
2480
|
+
}
|
|
2481
|
+
function consequentialFindings(findings) {
|
|
2482
|
+
return findings.filter((f) => isConsequentialFinding(f));
|
|
2483
|
+
}
|
|
2466
2484
|
function evaluateCodeReview(findings, policy) {
|
|
2467
2485
|
return evaluateReviewFindings(findings, CODE_REVIEW_SEVERITY_ORDER, policy.codeReviewThreshold);
|
|
2468
2486
|
}
|
|
@@ -2978,7 +2996,7 @@ function isStep0Block(content) {
|
|
|
2978
2996
|
}
|
|
2979
2997
|
function checkCommandsCarryOutput(prBody) {
|
|
2980
2998
|
const errors = [];
|
|
2981
|
-
for (const [
|
|
2999
|
+
for (const [label, num] of [
|
|
2982
3000
|
["5", 5],
|
|
2983
3001
|
["6", 6]
|
|
2984
3002
|
]) {
|
|
@@ -2992,7 +3010,7 @@ function checkCommandsCarryOutput(prBody) {
|
|
|
2992
3010
|
continue;
|
|
2993
3011
|
const next = blocks[i + 1];
|
|
2994
3012
|
if (!next || isCommandBlock(next.content)) {
|
|
2995
|
-
errors.push(`brief-validation commands carry output: §${
|
|
3013
|
+
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
3014
|
}
|
|
2997
3015
|
}
|
|
2998
3016
|
}
|
|
@@ -3429,8 +3447,8 @@ function stripPartBackticks(text) {
|
|
|
3429
3447
|
function partWordCount(text) {
|
|
3430
3448
|
return text.split(/\s+/).filter((w) => /[a-z]/i.test(w)).length;
|
|
3431
3449
|
}
|
|
3432
|
-
function looksLikeFilePath(
|
|
3433
|
-
const stripped =
|
|
3450
|
+
function looksLikeFilePath(entry) {
|
|
3451
|
+
const stripped = entry.replace(/\/\*\*?$/, "");
|
|
3434
3452
|
const lastSegment = stripped.split("/").pop() ?? stripped;
|
|
3435
3453
|
const extMatch = /\.[A-Za-z0-9]{1,6}$/.exec(lastSegment);
|
|
3436
3454
|
return extMatch !== null && extMatch.index > 0;
|
|
@@ -3916,14 +3934,14 @@ function checkClosesNTopology(branch, prBody, trancheFiles, taskIssueRefs) {
|
|
|
3916
3934
|
const referenced = extractClosesReferences(prBody);
|
|
3917
3935
|
if (taskIssueRefs) {
|
|
3918
3936
|
for (const n of referenced) {
|
|
3919
|
-
const
|
|
3920
|
-
if (!
|
|
3937
|
+
const ref = taskIssueRefs.get(n);
|
|
3938
|
+
if (!ref)
|
|
3921
3939
|
continue;
|
|
3922
|
-
const expectedBranch = `task/${
|
|
3940
|
+
const expectedBranch = `task/${ref.trancheSlug}/${ref.taskId}`;
|
|
3923
3941
|
if (branch !== expectedBranch) {
|
|
3924
3942
|
return {
|
|
3925
3943
|
ok: false,
|
|
3926
|
-
message: `closes-n-reverse: branch "${branch}" closes #${n} (task ${
|
|
3944
|
+
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
3945
|
};
|
|
3928
3946
|
}
|
|
3929
3947
|
}
|
|
@@ -3932,15 +3950,15 @@ function checkClosesNTopology(branch, prBody, trancheFiles, taskIssueRefs) {
|
|
|
3932
3950
|
if (!ref)
|
|
3933
3951
|
return { ok: true };
|
|
3934
3952
|
if (ref.kind === "issue") {
|
|
3935
|
-
const
|
|
3936
|
-
if (!referenced.has(
|
|
3953
|
+
const expectedIssue = ref.issueNumber;
|
|
3954
|
+
if (!referenced.has(expectedIssue)) {
|
|
3937
3955
|
return {
|
|
3938
3956
|
ok: false,
|
|
3939
|
-
expectedIssue
|
|
3940
|
-
message: `closes-n: PR body does not contain \`Closes #${
|
|
3957
|
+
expectedIssue,
|
|
3958
|
+
message: `closes-n: PR body does not contain \`Closes #${expectedIssue}\` (required for branch "${branch}"). Add it to the PR body Summary section.`
|
|
3941
3959
|
};
|
|
3942
3960
|
}
|
|
3943
|
-
return { ok: true, expectedIssue
|
|
3961
|
+
return { ok: true, expectedIssue };
|
|
3944
3962
|
}
|
|
3945
3963
|
const trancheSlug = ref.tranche;
|
|
3946
3964
|
const taskId = ref.taskId;
|
|
@@ -3986,8 +4004,8 @@ function extractIssue(body) {
|
|
|
3986
4004
|
const anchorNums = closesRefs(anchored);
|
|
3987
4005
|
if (anchorNums.length === 0)
|
|
3988
4006
|
return { issue: null, extraIssues: bodyNums, outsideHeader: false };
|
|
3989
|
-
const
|
|
3990
|
-
return { issue
|
|
4007
|
+
const issue = anchorNums[0];
|
|
4008
|
+
return { issue, extraIssues: bodyNums.filter((n) => n !== issue), outsideHeader: false };
|
|
3991
4009
|
}
|
|
3992
4010
|
const headerNums = closesRefs(headerRegion(stripped));
|
|
3993
4011
|
if (bodyNums.length === 0)
|
|
@@ -4056,15 +4074,15 @@ function compareManifest(echoed, current, patchIdOf) {
|
|
|
4056
4074
|
const bothFullShas = echoedShaLen >= 40 && currentShaLen >= 40;
|
|
4057
4075
|
const base = patchHead || exactHead && bothFullShas ? true : isBoundToBase(echoed, current.baseSha);
|
|
4058
4076
|
const briefHashBound = isBoundToBriefHash(echoed, current.briefHash);
|
|
4059
|
-
const
|
|
4077
|
+
const objectivesVersion = isBoundToObjectives(echoed, current.objectivesVersion);
|
|
4060
4078
|
const rulingOrdinal = isBoundToRulings(echoed, current.rulingOrdinal);
|
|
4061
4079
|
const policyDigestBound = isBoundToPolicy(echoed, current.policyDigest);
|
|
4062
4080
|
return {
|
|
4063
|
-
bound: head && base && briefHashBound &&
|
|
4081
|
+
bound: head && base && briefHashBound && objectivesVersion && rulingOrdinal && policyDigestBound,
|
|
4064
4082
|
head,
|
|
4065
4083
|
base,
|
|
4066
4084
|
briefHash: briefHashBound,
|
|
4067
|
-
objectivesVersion
|
|
4085
|
+
objectivesVersion,
|
|
4068
4086
|
rulingOrdinal,
|
|
4069
4087
|
policyDigest: policyDigestBound
|
|
4070
4088
|
};
|
|
@@ -4095,8 +4113,8 @@ function checkReviewGate(input) {
|
|
|
4095
4113
|
let codeReviewPolicyEvaluation;
|
|
4096
4114
|
let securityPolicyEvaluation;
|
|
4097
4115
|
try {
|
|
4098
|
-
codeReviewPolicyEvaluation = evaluateCodeReview(codeReview.findingSeverities, policy);
|
|
4099
|
-
securityPolicyEvaluation = evaluateSecurityReview(security.findingSeverities, policy);
|
|
4116
|
+
codeReviewPolicyEvaluation = evaluateCodeReview(consequentialFindings(codeReview.findingSeverities), policy);
|
|
4117
|
+
securityPolicyEvaluation = evaluateSecurityReview(consequentialFindings(security.findingSeverities), policy);
|
|
4100
4118
|
} catch (err) {
|
|
4101
4119
|
return {
|
|
4102
4120
|
verdict: "fail",
|
|
@@ -5177,11 +5195,27 @@ var ObservedSchema = z.object({
|
|
|
5177
5195
|
var TaskStatusInputSchema = z.object({
|
|
5178
5196
|
task: TaskToolRefSchema.optional()
|
|
5179
5197
|
}).merge(PageRequestSchema).strict();
|
|
5198
|
+
var TaskConfidenceSchema = z.object({
|
|
5199
|
+
round: z.number().int().positive(),
|
|
5200
|
+
percent: z.number().int().min(0).max(100).nullable(),
|
|
5201
|
+
source: z.enum(["stated", "published-summary"])
|
|
5202
|
+
}).strict();
|
|
5203
|
+
var TaskPhaseHistorySchema = z.object({
|
|
5204
|
+
typicalPhaseMinutes: z.number().nonnegative(),
|
|
5205
|
+
typicalPhaseSamples: z.number().int().positive()
|
|
5206
|
+
}).strict();
|
|
5180
5207
|
var TaskStatusItemSchema = z.object({
|
|
5181
5208
|
task: TaskToolRefSchema,
|
|
5182
5209
|
issue: z.number().int().positive(),
|
|
5183
5210
|
pr: z.number().int().positive().nullable(),
|
|
5184
|
-
state: z.string()
|
|
5211
|
+
state: z.string(),
|
|
5212
|
+
round: z.number().int().positive().nullable().optional(),
|
|
5213
|
+
phase: z.string().min(1).nullable().optional(),
|
|
5214
|
+
minutesInPhase: z.number().nonnegative().nullable().optional(),
|
|
5215
|
+
phaseIsCurrent: z.boolean().nullable().optional(),
|
|
5216
|
+
lastConfidence: TaskConfidenceSchema.nullable().optional(),
|
|
5217
|
+
lastConfidenceUnread: z.boolean().optional(),
|
|
5218
|
+
phaseHistory: TaskPhaseHistorySchema.nullable().optional()
|
|
5185
5219
|
}).merge(ObservedSchema);
|
|
5186
5220
|
var TaskStatusResultSchema = z.object({
|
|
5187
5221
|
items: z.array(TaskStatusItemSchema),
|
|
@@ -5193,7 +5227,7 @@ var EscalationInputsSchema = z.object({
|
|
|
5193
5227
|
round: z.number().int().nonnegative(),
|
|
5194
5228
|
head: z.string(),
|
|
5195
5229
|
branch: z.string(),
|
|
5196
|
-
prNumber: z.number().int().positive()
|
|
5230
|
+
prNumber: z.number().int().positive().nullable()
|
|
5197
5231
|
});
|
|
5198
5232
|
var EscalationEvidenceSchema = z.object({
|
|
5199
5233
|
round: z.number().int().nonnegative(),
|
|
@@ -5229,13 +5263,45 @@ var TaskEscalationReadResultSchema = z.object({
|
|
|
5229
5263
|
items: z.array(TaskEscalationPacketSchema),
|
|
5230
5264
|
nextCursor: z.string().nullable()
|
|
5231
5265
|
}).merge(ObservedSchema);
|
|
5232
|
-
var
|
|
5233
|
-
|
|
5234
|
-
|
|
5266
|
+
var TaskPrCheckSchema = z.object({
|
|
5267
|
+
name: z.string(),
|
|
5268
|
+
required: z.boolean(),
|
|
5269
|
+
status: z.string(),
|
|
5270
|
+
conclusion: z.string().nullable(),
|
|
5271
|
+
detailsUrl: z.string().nullable(),
|
|
5272
|
+
failureSummary: z.string().nullable()
|
|
5273
|
+
});
|
|
5274
|
+
var TaskPrVerdictSchema = z.object({
|
|
5275
|
+
role: z.enum(["code-review", "security"]),
|
|
5276
|
+
value: z.string(),
|
|
5277
|
+
judgedHead: z.string().nullable(),
|
|
5278
|
+
objectivesVersion: z.string().nullable()
|
|
5279
|
+
});
|
|
5280
|
+
var TaskPrPauseSchema = z.object({
|
|
5281
|
+
reason: z.string(),
|
|
5282
|
+
body: z.string()
|
|
5283
|
+
});
|
|
5284
|
+
var TaskPrReviewRecordSchema = z.object({
|
|
5285
|
+
verdicts: z.array(TaskPrVerdictSchema),
|
|
5286
|
+
roundMarkers: z.array(z.number().int().nonnegative()),
|
|
5287
|
+
summaryTable: z.string().nullable(),
|
|
5288
|
+
pause: TaskPrPauseSchema.nullable()
|
|
5289
|
+
});
|
|
5290
|
+
var TaskPrReadInputSchema = z.object({
|
|
5291
|
+
task: TaskToolRefSchema,
|
|
5292
|
+
pr: z.number().int().positive().optional()
|
|
5235
5293
|
}).strict();
|
|
5294
|
+
var TaskPrReadResultSchema = z.object({
|
|
5295
|
+
task: TaskToolRefSchema,
|
|
5296
|
+
issue: z.number().int().positive(),
|
|
5297
|
+
pr: z.number().int().positive(),
|
|
5298
|
+
head: z.string().nullable(),
|
|
5299
|
+
checks: z.array(TaskPrCheckSchema),
|
|
5300
|
+
review: TaskPrReviewRecordSchema
|
|
5301
|
+
}).merge(ObservedSchema);
|
|
5236
5302
|
var TaskStartResultSchema = z.object({
|
|
5237
5303
|
requestId: z.string().min(1),
|
|
5238
|
-
run:
|
|
5304
|
+
run: TaskToolRefSchema,
|
|
5239
5305
|
started: z.boolean(),
|
|
5240
5306
|
startedAt: z.string(),
|
|
5241
5307
|
mode: z.literal("attended")
|
|
@@ -5249,7 +5315,7 @@ var TaskCancelInputSchema = z.object({
|
|
|
5249
5315
|
}).strict();
|
|
5250
5316
|
var TaskResumeResultSchema = z.object({
|
|
5251
5317
|
task: z.number().int().positive(),
|
|
5252
|
-
pr: z.number().int().positive(),
|
|
5318
|
+
pr: z.number().int().positive().nullable(),
|
|
5253
5319
|
escalationId: z.string().min(1),
|
|
5254
5320
|
outcome: z.enum(["started", "already_resumed"]),
|
|
5255
5321
|
authenticatedBy: z.string().min(1),
|
|
@@ -5258,7 +5324,7 @@ var TaskResumeResultSchema = z.object({
|
|
|
5258
5324
|
var TaskCancelOutcomeSchema = z.enum(["confirmed", "pending", "uncertain"]);
|
|
5259
5325
|
var TaskCancelResultSchema = z.object({
|
|
5260
5326
|
task: z.number().int().positive(),
|
|
5261
|
-
pr: z.number().int().positive(),
|
|
5327
|
+
pr: z.number().int().positive().nullable(),
|
|
5262
5328
|
escalationId: z.string().min(1),
|
|
5263
5329
|
outcome: TaskCancelOutcomeSchema,
|
|
5264
5330
|
authenticatedBy: z.string().min(1),
|
|
@@ -5269,6 +5335,7 @@ var TASK_TOOL_NAMES = [
|
|
|
5269
5335
|
"task_start",
|
|
5270
5336
|
"task_status",
|
|
5271
5337
|
"task_escalation_read",
|
|
5338
|
+
"task_pr_read",
|
|
5272
5339
|
"task_resume",
|
|
5273
5340
|
"task_cancel"
|
|
5274
5341
|
];
|
|
@@ -5496,6 +5563,10 @@ function findWorkspaceEscapes(files, knownPaths, workspaceDirs = DEFAULT_WORKSPA
|
|
|
5496
5563
|
}
|
|
5497
5564
|
return findings;
|
|
5498
5565
|
}
|
|
5566
|
+
// ../../packages/aeg-core/src/dev-review-loop/types.ts
|
|
5567
|
+
var SEVERITY_COLUMNS = ["blocker", "major", "minor", "critical", "high", "medium", "low"];
|
|
5568
|
+
// ../../packages/aeg-core/src/dev-review-loop/journal-reconstruction.ts
|
|
5569
|
+
var SUMMARY_TABLE_HEADER = `| round | ${SEVERITY_COLUMNS.join(" | ")} | confidence | outcome |`;
|
|
5499
5570
|
// ../../packages/aeg-core/src/log/envelope.ts
|
|
5500
5571
|
import { createHash as createHash5 } from "node:crypto";
|
|
5501
5572
|
|
|
@@ -6034,6 +6105,7 @@ function redact(value, home) {
|
|
|
6034
6105
|
return value;
|
|
6035
6106
|
}
|
|
6036
6107
|
// ../../packages/aeg-core/src/log/store.ts
|
|
6108
|
+
var KNOWN_SCHEMA_VERSIONS = [1, 2];
|
|
6037
6109
|
function metaOf(obj) {
|
|
6038
6110
|
if (obj === null || typeof obj !== "object")
|
|
6039
6111
|
return null;
|
|
@@ -6056,11 +6128,61 @@ function recordIdentity(obj) {
|
|
|
6056
6128
|
}
|
|
6057
6129
|
return null;
|
|
6058
6130
|
}
|
|
6059
|
-
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
|
|
6063
|
-
|
|
6131
|
+
function schemaVersionOf(obj) {
|
|
6132
|
+
const meta = metaOf(obj);
|
|
6133
|
+
const schema = meta?.schema;
|
|
6134
|
+
return typeof schema === "number" ? schema : null;
|
|
6135
|
+
}
|
|
6136
|
+
function isKnownSchema(version) {
|
|
6137
|
+
return version !== null && KNOWN_SCHEMA_VERSIONS.includes(version);
|
|
6138
|
+
}
|
|
6139
|
+
function classifyStoredLine(raw, home) {
|
|
6140
|
+
let obj;
|
|
6141
|
+
try {
|
|
6142
|
+
obj = JSON.parse(raw);
|
|
6143
|
+
} catch {
|
|
6144
|
+
return { status: "invalid", identity: null, raw, reason: "not valid JSON" };
|
|
6145
|
+
}
|
|
6146
|
+
const version = schemaVersionOf(obj);
|
|
6147
|
+
if (version === null) {
|
|
6148
|
+
return { status: "invalid", identity: recordIdentity(obj), raw, reason: "no readable meta.schema" };
|
|
6149
|
+
}
|
|
6150
|
+
if (!isKnownSchema(version)) {
|
|
6151
|
+
return {
|
|
6152
|
+
status: "unknown_version",
|
|
6153
|
+
identity: recordIdentity(obj),
|
|
6154
|
+
schema: version,
|
|
6155
|
+
raw,
|
|
6156
|
+
reason: `schema version ${version} is not one this build validates (${KNOWN_SCHEMA_VERSIONS.join(", ")}) — kept for diagnosis`
|
|
6157
|
+
};
|
|
6158
|
+
}
|
|
6159
|
+
const result = LogEventSchema.safeParse(obj);
|
|
6160
|
+
if (!result.success) {
|
|
6161
|
+
return {
|
|
6162
|
+
status: "invalid",
|
|
6163
|
+
identity: recordIdentity(obj),
|
|
6164
|
+
raw,
|
|
6165
|
+
reason: result.error.issues[0]?.message ?? "schema violation"
|
|
6166
|
+
};
|
|
6167
|
+
}
|
|
6168
|
+
const event = result.data;
|
|
6169
|
+
const identity = recordIdentity(event);
|
|
6170
|
+
if (identity === null) {
|
|
6171
|
+
return { status: "invalid", identity: null, raw, reason: "valid event with no derivable identity" };
|
|
6172
|
+
}
|
|
6173
|
+
const redacted = redact(event, home);
|
|
6174
|
+
const provenance = version === 2 ? event.meta.provenance ?? null : null;
|
|
6175
|
+
return {
|
|
6176
|
+
status: "ok",
|
|
6177
|
+
identity,
|
|
6178
|
+
runId: event.meta.run_id,
|
|
6179
|
+
seq: event.meta.seq,
|
|
6180
|
+
schema: version,
|
|
6181
|
+
provenance,
|
|
6182
|
+
event,
|
|
6183
|
+
postLine: JSON.stringify(redacted)
|
|
6184
|
+
};
|
|
6185
|
+
}
|
|
6064
6186
|
// ../../packages/aeg-core/src/control-store/records.ts
|
|
6065
6187
|
import { z as z3 } from "zod";
|
|
6066
6188
|
var isoTimestamp = z3.string().min(1);
|