@attalabs/vinaya 0.32.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 +1 -1
- package/aeg-root/contracts/principal-operator.md +18 -5
- 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/dist/checks/bin/check-body-bare-digits.js +111 -15
- package/dist/checks/bin/check-branch-topology.js +83 -16
- package/dist/checks/bin/check-brief-shape.js +111 -15
- package/dist/checks/bin/check-changeset-coverage.js +342 -69
- package/dist/checks/bin/check-closes-n.js +83 -16
- package/dist/checks/bin/check-coherence.js +112 -16
- package/dist/checks/bin/check-dead-branch-push.js +82 -15
- package/dist/checks/bin/check-dispatch-readiness.js +112 -16
- package/dist/checks/bin/check-doc-coverage-push.js +342 -69
- package/dist/checks/bin/check-doc-coverage.js +342 -69
- package/dist/checks/bin/check-doctrine-no-procedures.js +111 -15
- package/dist/checks/bin/check-doctrine-portability.js +342 -69
- package/dist/checks/bin/check-evidence-fresh.js +343 -69
- package/dist/checks/bin/check-exec-bits.js +342 -69
- package/dist/checks/bin/check-first-push-dispatch.js +112 -16
- package/dist/checks/bin/check-issue-assignment.js +83 -16
- package/dist/checks/bin/check-issue-milestone-attach.js +82 -15
- package/dist/checks/bin/check-issue-objectives-numbering.js +82 -15
- package/dist/checks/bin/check-issue-parts-coverage.js +82 -15
- package/dist/checks/bin/check-issue-surface-globs.js +112 -16
- package/dist/checks/bin/check-issue-title-grammar.js +82 -15
- package/dist/checks/bin/check-issue-tranche-label.js +82 -15
- package/dist/checks/bin/check-main-branch-refusal.js +82 -15
- package/dist/checks/bin/check-no-disk-state.js +82 -15
- package/dist/checks/bin/check-pr-premise-reassert.js +111 -15
- package/dist/checks/bin/check-pr-report-density.js +82 -15
- package/dist/checks/bin/check-principal-test-plan-wait.js +82 -15
- package/dist/checks/bin/check-quoted-command.js +342 -69
- package/dist/checks/bin/check-reader-resolvable-prose.js +342 -69
- package/dist/checks/bin/check-registry-gates.js +82 -15
- package/dist/checks/bin/check-retired-vocabulary.js +342 -69
- package/dist/checks/bin/check-review-gate.js +179 -124
- package/dist/checks/bin/check-single-plan-pr.js +82 -15
- package/dist/checks/bin/check-surface-scope.js +83 -16
- package/dist/checks/bin/check-test-plan.js +82 -15
- package/dist/checks/bin/check-token-collection-wired.js +82 -15
- package/dist/checks/bin/check-token-report.js +82 -15
- package/dist/checks/bin/check-workspace-escape.js +342 -69
- package/dist/index.js +2495 -590
- package/dist/lib/pre-push-cache-test-run.js +317 -61
- package/dist/lib/pre-push-select-tests.js +91 -10
- package/package.json +1 -1
- 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
|
@@ -2045,12 +2045,24 @@ function extractBaseSha(comment) {
|
|
|
2045
2045
|
const m = firstThirteenLines(comment).match(BASE_SHA_PATTERN);
|
|
2046
2046
|
return m ? m[1].toLowerCase() : null;
|
|
2047
2047
|
}
|
|
2048
|
-
var
|
|
2048
|
+
var FINDING_DESCRIPTION_STATE = /^F(\d+)(?:\s+\S+)?(?:\s+(open|fix-claimed|reproduced|resolved))?:/;
|
|
2049
|
+
function parseFindingState(description) {
|
|
2050
|
+
const m = FINDING_DESCRIPTION_STATE.exec(description.trim());
|
|
2051
|
+
if (!m)
|
|
2052
|
+
return { id: null, state: null };
|
|
2053
|
+
return { id: `F${m[1]}`, state: m[2] ?? null };
|
|
2054
|
+
}
|
|
2055
|
+
var FINDING_SEVERITY_LINE = /^\d+\.\s+\[([A-Z][A-Z]*)\]\s+(.+?)\s+—(?:\s+(.*))?$/gm;
|
|
2049
2056
|
function extractFindingSeverities(comment) {
|
|
2050
|
-
return [...comment.matchAll(FINDING_SEVERITY_LINE)].map((m) =>
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2057
|
+
return [...comment.matchAll(FINDING_SEVERITY_LINE)].map((m) => {
|
|
2058
|
+
const { id, state } = parseFindingState(m[3] ?? "");
|
|
2059
|
+
return {
|
|
2060
|
+
severity: m[1],
|
|
2061
|
+
location: m[2],
|
|
2062
|
+
id,
|
|
2063
|
+
state
|
|
2064
|
+
};
|
|
2065
|
+
});
|
|
2054
2066
|
}
|
|
2055
2067
|
function extractVerdict(comments, valuePattern, missingLabel) {
|
|
2056
2068
|
const candidates = comments.filter((c) => valuePattern.test(c));
|
|
@@ -2464,6 +2476,12 @@ function evaluateReviewFindings(findings, scale, threshold) {
|
|
|
2464
2476
|
});
|
|
2465
2477
|
return { outcome: blockingFindings.length > 0 ? "blocked" : "clean", blockingFindings };
|
|
2466
2478
|
}
|
|
2479
|
+
function isConsequentialFinding(finding) {
|
|
2480
|
+
return finding.state !== "resolved";
|
|
2481
|
+
}
|
|
2482
|
+
function consequentialFindings(findings) {
|
|
2483
|
+
return findings.filter((f) => isConsequentialFinding(f));
|
|
2484
|
+
}
|
|
2467
2485
|
function evaluateCodeReview(findings, policy) {
|
|
2468
2486
|
return evaluateReviewFindings(findings, CODE_REVIEW_SEVERITY_ORDER, policy.codeReviewThreshold);
|
|
2469
2487
|
}
|
|
@@ -4096,8 +4114,8 @@ function checkReviewGate(input) {
|
|
|
4096
4114
|
let codeReviewPolicyEvaluation;
|
|
4097
4115
|
let securityPolicyEvaluation;
|
|
4098
4116
|
try {
|
|
4099
|
-
codeReviewPolicyEvaluation = evaluateCodeReview(codeReview.findingSeverities, policy);
|
|
4100
|
-
securityPolicyEvaluation = evaluateSecurityReview(security.findingSeverities, policy);
|
|
4117
|
+
codeReviewPolicyEvaluation = evaluateCodeReview(consequentialFindings(codeReview.findingSeverities), policy);
|
|
4118
|
+
securityPolicyEvaluation = evaluateSecurityReview(consequentialFindings(security.findingSeverities), policy);
|
|
4101
4119
|
} catch (err) {
|
|
4102
4120
|
return {
|
|
4103
4121
|
verdict: "fail",
|
|
@@ -5178,11 +5196,27 @@ var ObservedSchema = z.object({
|
|
|
5178
5196
|
var TaskStatusInputSchema = z.object({
|
|
5179
5197
|
task: TaskToolRefSchema.optional()
|
|
5180
5198
|
}).merge(PageRequestSchema).strict();
|
|
5199
|
+
var TaskConfidenceSchema = z.object({
|
|
5200
|
+
round: z.number().int().positive(),
|
|
5201
|
+
percent: z.number().int().min(0).max(100).nullable(),
|
|
5202
|
+
source: z.enum(["stated", "published-summary"])
|
|
5203
|
+
}).strict();
|
|
5204
|
+
var TaskPhaseHistorySchema = z.object({
|
|
5205
|
+
typicalPhaseMinutes: z.number().nonnegative(),
|
|
5206
|
+
typicalPhaseSamples: z.number().int().positive()
|
|
5207
|
+
}).strict();
|
|
5181
5208
|
var TaskStatusItemSchema = z.object({
|
|
5182
5209
|
task: TaskToolRefSchema,
|
|
5183
5210
|
issue: z.number().int().positive(),
|
|
5184
5211
|
pr: z.number().int().positive().nullable(),
|
|
5185
|
-
state: z.string()
|
|
5212
|
+
state: z.string(),
|
|
5213
|
+
round: z.number().int().positive().nullable().optional(),
|
|
5214
|
+
phase: z.string().min(1).nullable().optional(),
|
|
5215
|
+
minutesInPhase: z.number().nonnegative().nullable().optional(),
|
|
5216
|
+
phaseIsCurrent: z.boolean().nullable().optional(),
|
|
5217
|
+
lastConfidence: TaskConfidenceSchema.nullable().optional(),
|
|
5218
|
+
lastConfidenceUnread: z.boolean().optional(),
|
|
5219
|
+
phaseHistory: TaskPhaseHistorySchema.nullable().optional()
|
|
5186
5220
|
}).merge(ObservedSchema);
|
|
5187
5221
|
var TaskStatusResultSchema = z.object({
|
|
5188
5222
|
items: z.array(TaskStatusItemSchema),
|
|
@@ -5194,7 +5228,7 @@ var EscalationInputsSchema = z.object({
|
|
|
5194
5228
|
round: z.number().int().nonnegative(),
|
|
5195
5229
|
head: z.string(),
|
|
5196
5230
|
branch: z.string(),
|
|
5197
|
-
prNumber: z.number().int().positive()
|
|
5231
|
+
prNumber: z.number().int().positive().nullable()
|
|
5198
5232
|
});
|
|
5199
5233
|
var EscalationEvidenceSchema = z.object({
|
|
5200
5234
|
round: z.number().int().nonnegative(),
|
|
@@ -5230,13 +5264,45 @@ var TaskEscalationReadResultSchema = z.object({
|
|
|
5230
5264
|
items: z.array(TaskEscalationPacketSchema),
|
|
5231
5265
|
nextCursor: z.string().nullable()
|
|
5232
5266
|
}).merge(ObservedSchema);
|
|
5233
|
-
var
|
|
5234
|
-
|
|
5235
|
-
|
|
5267
|
+
var TaskPrCheckSchema = z.object({
|
|
5268
|
+
name: z.string(),
|
|
5269
|
+
required: z.boolean(),
|
|
5270
|
+
status: z.string(),
|
|
5271
|
+
conclusion: z.string().nullable(),
|
|
5272
|
+
detailsUrl: z.string().nullable(),
|
|
5273
|
+
failureSummary: z.string().nullable()
|
|
5274
|
+
});
|
|
5275
|
+
var TaskPrVerdictSchema = z.object({
|
|
5276
|
+
role: z.enum(["code-review", "security"]),
|
|
5277
|
+
value: z.string(),
|
|
5278
|
+
judgedHead: z.string().nullable(),
|
|
5279
|
+
objectivesVersion: z.string().nullable()
|
|
5280
|
+
});
|
|
5281
|
+
var TaskPrPauseSchema = z.object({
|
|
5282
|
+
reason: z.string(),
|
|
5283
|
+
body: z.string()
|
|
5284
|
+
});
|
|
5285
|
+
var TaskPrReviewRecordSchema = z.object({
|
|
5286
|
+
verdicts: z.array(TaskPrVerdictSchema),
|
|
5287
|
+
roundMarkers: z.array(z.number().int().nonnegative()),
|
|
5288
|
+
summaryTable: z.string().nullable(),
|
|
5289
|
+
pause: TaskPrPauseSchema.nullable()
|
|
5290
|
+
});
|
|
5291
|
+
var TaskPrReadInputSchema = z.object({
|
|
5292
|
+
task: TaskToolRefSchema,
|
|
5293
|
+
pr: z.number().int().positive().optional()
|
|
5236
5294
|
}).strict();
|
|
5295
|
+
var TaskPrReadResultSchema = z.object({
|
|
5296
|
+
task: TaskToolRefSchema,
|
|
5297
|
+
issue: z.number().int().positive(),
|
|
5298
|
+
pr: z.number().int().positive(),
|
|
5299
|
+
head: z.string().nullable(),
|
|
5300
|
+
checks: z.array(TaskPrCheckSchema),
|
|
5301
|
+
review: TaskPrReviewRecordSchema
|
|
5302
|
+
}).merge(ObservedSchema);
|
|
5237
5303
|
var TaskStartResultSchema = z.object({
|
|
5238
5304
|
requestId: z.string().min(1),
|
|
5239
|
-
run:
|
|
5305
|
+
run: TaskToolRefSchema,
|
|
5240
5306
|
started: z.boolean(),
|
|
5241
5307
|
startedAt: z.string(),
|
|
5242
5308
|
mode: z.literal("attended")
|
|
@@ -5250,7 +5316,7 @@ var TaskCancelInputSchema = z.object({
|
|
|
5250
5316
|
}).strict();
|
|
5251
5317
|
var TaskResumeResultSchema = z.object({
|
|
5252
5318
|
task: z.number().int().positive(),
|
|
5253
|
-
pr: z.number().int().positive(),
|
|
5319
|
+
pr: z.number().int().positive().nullable(),
|
|
5254
5320
|
escalationId: z.string().min(1),
|
|
5255
5321
|
outcome: z.enum(["started", "already_resumed"]),
|
|
5256
5322
|
authenticatedBy: z.string().min(1),
|
|
@@ -5259,7 +5325,7 @@ var TaskResumeResultSchema = z.object({
|
|
|
5259
5325
|
var TaskCancelOutcomeSchema = z.enum(["confirmed", "pending", "uncertain"]);
|
|
5260
5326
|
var TaskCancelResultSchema = z.object({
|
|
5261
5327
|
task: z.number().int().positive(),
|
|
5262
|
-
pr: z.number().int().positive(),
|
|
5328
|
+
pr: z.number().int().positive().nullable(),
|
|
5263
5329
|
escalationId: z.string().min(1),
|
|
5264
5330
|
outcome: TaskCancelOutcomeSchema,
|
|
5265
5331
|
authenticatedBy: z.string().min(1),
|
|
@@ -5270,6 +5336,7 @@ var TASK_TOOL_NAMES = [
|
|
|
5270
5336
|
"task_start",
|
|
5271
5337
|
"task_status",
|
|
5272
5338
|
"task_escalation_read",
|
|
5339
|
+
"task_pr_read",
|
|
5273
5340
|
"task_resume",
|
|
5274
5341
|
"task_cancel"
|
|
5275
5342
|
];
|
|
@@ -6439,7 +6506,7 @@ var COMMANDS = [
|
|
|
6439
6506
|
details: [
|
|
6440
6507
|
"Exposes the task-operator tool catalog (`packages/aeg-core/src/task-tools.ts`) to an agent runtime as one MCP server speaking newline-delimited JSON-RPC 2.0 (`initialize`/`tools/list`/`tools/call`). Claude registers it through the generated `.mcp.json`; Codex through its documented `~/.codex/config.toml` `[mcp_servers]` table — both point at this same command.",
|
|
6441
6508
|
"stdout carries JSON-RPC and nothing else: any stray write from the CLI (a forge-read warning) is redirected to stderr, so the protocol stream is never corrupted.",
|
|
6442
|
-
"`task_status`/`task_escalation_read` read; `task_start` starts a run in attended mode only, requiring an authenticated caller from the invocation context (`VINAYA_MCP_CALLER`) and refusing without one — MCP is a transport, not authorization. `task_resume`/`task_cancel` require the same authenticated caller, plus a current Principal ruling read fresh from the run's own PR — never a caller-supplied approval; `task_resume` triggers the existing `dev-review-loop --resume` continuation exactly once per escalation, and `task_cancel` reports a truthful `confirmed`/`pending`/`uncertain` outcome, idempotently, across repeated calls. No unattended start until the worker-isolation boundary and a capability flag land."
|
|
6509
|
+
"`task_status`/`task_escalation_read`/`task_pr_read` read; `task_pr_read` returns the selected task's OWN pull request — every required and reported check with its state, conclusion and failure summary, plus the principal-authored review record (newest verdicts and their judged head, round markers, published summary table, pause comment) — and refuses any other pull request; `task_start` starts a run in attended mode only, requiring an authenticated caller from the invocation context (`VINAYA_MCP_CALLER`) and refusing without one — MCP is a transport, not authorization. `task_resume`/`task_cancel` require the same authenticated caller, plus a current Principal ruling read fresh from the run's own PR — never a caller-supplied approval; `task_resume` triggers the existing `dev-review-loop --resume` continuation exactly once per escalation, and `task_cancel` reports a truthful `confirmed`/`pending`/`uncertain` outcome, idempotently, across repeated calls. No unattended start until the worker-isolation boundary and a capability flag land."
|
|
6443
6510
|
],
|
|
6444
6511
|
status: "shipped"
|
|
6445
6512
|
},
|
|
@@ -2050,12 +2050,24 @@ function extractBaseSha(comment) {
|
|
|
2050
2050
|
const m = firstThirteenLines(comment).match(BASE_SHA_PATTERN);
|
|
2051
2051
|
return m ? m[1].toLowerCase() : null;
|
|
2052
2052
|
}
|
|
2053
|
-
var
|
|
2053
|
+
var FINDING_DESCRIPTION_STATE = /^F(\d+)(?:\s+\S+)?(?:\s+(open|fix-claimed|reproduced|resolved))?:/;
|
|
2054
|
+
function parseFindingState(description) {
|
|
2055
|
+
const m = FINDING_DESCRIPTION_STATE.exec(description.trim());
|
|
2056
|
+
if (!m)
|
|
2057
|
+
return { id: null, state: null };
|
|
2058
|
+
return { id: `F${m[1]}`, state: m[2] ?? null };
|
|
2059
|
+
}
|
|
2060
|
+
var FINDING_SEVERITY_LINE = /^\d+\.\s+\[([A-Z][A-Z]*)\]\s+(.+?)\s+—(?:\s+(.*))?$/gm;
|
|
2054
2061
|
function extractFindingSeverities(comment) {
|
|
2055
|
-
return [...comment.matchAll(FINDING_SEVERITY_LINE)].map((m) =>
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2062
|
+
return [...comment.matchAll(FINDING_SEVERITY_LINE)].map((m) => {
|
|
2063
|
+
const { id, state } = parseFindingState(m[3] ?? "");
|
|
2064
|
+
return {
|
|
2065
|
+
severity: m[1],
|
|
2066
|
+
location: m[2],
|
|
2067
|
+
id,
|
|
2068
|
+
state
|
|
2069
|
+
};
|
|
2070
|
+
});
|
|
2059
2071
|
}
|
|
2060
2072
|
function extractVerdict(comments, valuePattern, missingLabel) {
|
|
2061
2073
|
const candidates = comments.filter((c) => valuePattern.test(c));
|
|
@@ -2469,6 +2481,12 @@ function evaluateReviewFindings(findings, scale, threshold) {
|
|
|
2469
2481
|
});
|
|
2470
2482
|
return { outcome: blockingFindings.length > 0 ? "blocked" : "clean", blockingFindings };
|
|
2471
2483
|
}
|
|
2484
|
+
function isConsequentialFinding(finding) {
|
|
2485
|
+
return finding.state !== "resolved";
|
|
2486
|
+
}
|
|
2487
|
+
function consequentialFindings(findings) {
|
|
2488
|
+
return findings.filter((f) => isConsequentialFinding(f));
|
|
2489
|
+
}
|
|
2472
2490
|
function evaluateCodeReview(findings, policy) {
|
|
2473
2491
|
return evaluateReviewFindings(findings, CODE_REVIEW_SEVERITY_ORDER, policy.codeReviewThreshold);
|
|
2474
2492
|
}
|
|
@@ -4101,8 +4119,8 @@ function checkReviewGate(input) {
|
|
|
4101
4119
|
let codeReviewPolicyEvaluation;
|
|
4102
4120
|
let securityPolicyEvaluation;
|
|
4103
4121
|
try {
|
|
4104
|
-
codeReviewPolicyEvaluation = evaluateCodeReview(codeReview.findingSeverities, policy);
|
|
4105
|
-
securityPolicyEvaluation = evaluateSecurityReview(security.findingSeverities, policy);
|
|
4122
|
+
codeReviewPolicyEvaluation = evaluateCodeReview(consequentialFindings(codeReview.findingSeverities), policy);
|
|
4123
|
+
securityPolicyEvaluation = evaluateSecurityReview(consequentialFindings(security.findingSeverities), policy);
|
|
4106
4124
|
} catch (err) {
|
|
4107
4125
|
return {
|
|
4108
4126
|
verdict: "fail",
|
|
@@ -5183,11 +5201,27 @@ var ObservedSchema = z.object({
|
|
|
5183
5201
|
var TaskStatusInputSchema = z.object({
|
|
5184
5202
|
task: TaskToolRefSchema.optional()
|
|
5185
5203
|
}).merge(PageRequestSchema).strict();
|
|
5204
|
+
var TaskConfidenceSchema = z.object({
|
|
5205
|
+
round: z.number().int().positive(),
|
|
5206
|
+
percent: z.number().int().min(0).max(100).nullable(),
|
|
5207
|
+
source: z.enum(["stated", "published-summary"])
|
|
5208
|
+
}).strict();
|
|
5209
|
+
var TaskPhaseHistorySchema = z.object({
|
|
5210
|
+
typicalPhaseMinutes: z.number().nonnegative(),
|
|
5211
|
+
typicalPhaseSamples: z.number().int().positive()
|
|
5212
|
+
}).strict();
|
|
5186
5213
|
var TaskStatusItemSchema = z.object({
|
|
5187
5214
|
task: TaskToolRefSchema,
|
|
5188
5215
|
issue: z.number().int().positive(),
|
|
5189
5216
|
pr: z.number().int().positive().nullable(),
|
|
5190
|
-
state: z.string()
|
|
5217
|
+
state: z.string(),
|
|
5218
|
+
round: z.number().int().positive().nullable().optional(),
|
|
5219
|
+
phase: z.string().min(1).nullable().optional(),
|
|
5220
|
+
minutesInPhase: z.number().nonnegative().nullable().optional(),
|
|
5221
|
+
phaseIsCurrent: z.boolean().nullable().optional(),
|
|
5222
|
+
lastConfidence: TaskConfidenceSchema.nullable().optional(),
|
|
5223
|
+
lastConfidenceUnread: z.boolean().optional(),
|
|
5224
|
+
phaseHistory: TaskPhaseHistorySchema.nullable().optional()
|
|
5191
5225
|
}).merge(ObservedSchema);
|
|
5192
5226
|
var TaskStatusResultSchema = z.object({
|
|
5193
5227
|
items: z.array(TaskStatusItemSchema),
|
|
@@ -5199,7 +5233,7 @@ var EscalationInputsSchema = z.object({
|
|
|
5199
5233
|
round: z.number().int().nonnegative(),
|
|
5200
5234
|
head: z.string(),
|
|
5201
5235
|
branch: z.string(),
|
|
5202
|
-
prNumber: z.number().int().positive()
|
|
5236
|
+
prNumber: z.number().int().positive().nullable()
|
|
5203
5237
|
});
|
|
5204
5238
|
var EscalationEvidenceSchema = z.object({
|
|
5205
5239
|
round: z.number().int().nonnegative(),
|
|
@@ -5235,13 +5269,45 @@ var TaskEscalationReadResultSchema = z.object({
|
|
|
5235
5269
|
items: z.array(TaskEscalationPacketSchema),
|
|
5236
5270
|
nextCursor: z.string().nullable()
|
|
5237
5271
|
}).merge(ObservedSchema);
|
|
5238
|
-
var
|
|
5239
|
-
|
|
5240
|
-
|
|
5272
|
+
var TaskPrCheckSchema = z.object({
|
|
5273
|
+
name: z.string(),
|
|
5274
|
+
required: z.boolean(),
|
|
5275
|
+
status: z.string(),
|
|
5276
|
+
conclusion: z.string().nullable(),
|
|
5277
|
+
detailsUrl: z.string().nullable(),
|
|
5278
|
+
failureSummary: z.string().nullable()
|
|
5279
|
+
});
|
|
5280
|
+
var TaskPrVerdictSchema = z.object({
|
|
5281
|
+
role: z.enum(["code-review", "security"]),
|
|
5282
|
+
value: z.string(),
|
|
5283
|
+
judgedHead: z.string().nullable(),
|
|
5284
|
+
objectivesVersion: z.string().nullable()
|
|
5285
|
+
});
|
|
5286
|
+
var TaskPrPauseSchema = z.object({
|
|
5287
|
+
reason: z.string(),
|
|
5288
|
+
body: z.string()
|
|
5289
|
+
});
|
|
5290
|
+
var TaskPrReviewRecordSchema = z.object({
|
|
5291
|
+
verdicts: z.array(TaskPrVerdictSchema),
|
|
5292
|
+
roundMarkers: z.array(z.number().int().nonnegative()),
|
|
5293
|
+
summaryTable: z.string().nullable(),
|
|
5294
|
+
pause: TaskPrPauseSchema.nullable()
|
|
5295
|
+
});
|
|
5296
|
+
var TaskPrReadInputSchema = z.object({
|
|
5297
|
+
task: TaskToolRefSchema,
|
|
5298
|
+
pr: z.number().int().positive().optional()
|
|
5241
5299
|
}).strict();
|
|
5300
|
+
var TaskPrReadResultSchema = z.object({
|
|
5301
|
+
task: TaskToolRefSchema,
|
|
5302
|
+
issue: z.number().int().positive(),
|
|
5303
|
+
pr: z.number().int().positive(),
|
|
5304
|
+
head: z.string().nullable(),
|
|
5305
|
+
checks: z.array(TaskPrCheckSchema),
|
|
5306
|
+
review: TaskPrReviewRecordSchema
|
|
5307
|
+
}).merge(ObservedSchema);
|
|
5242
5308
|
var TaskStartResultSchema = z.object({
|
|
5243
5309
|
requestId: z.string().min(1),
|
|
5244
|
-
run:
|
|
5310
|
+
run: TaskToolRefSchema,
|
|
5245
5311
|
started: z.boolean(),
|
|
5246
5312
|
startedAt: z.string(),
|
|
5247
5313
|
mode: z.literal("attended")
|
|
@@ -5255,7 +5321,7 @@ var TaskCancelInputSchema = z.object({
|
|
|
5255
5321
|
}).strict();
|
|
5256
5322
|
var TaskResumeResultSchema = z.object({
|
|
5257
5323
|
task: z.number().int().positive(),
|
|
5258
|
-
pr: z.number().int().positive(),
|
|
5324
|
+
pr: z.number().int().positive().nullable(),
|
|
5259
5325
|
escalationId: z.string().min(1),
|
|
5260
5326
|
outcome: z.enum(["started", "already_resumed"]),
|
|
5261
5327
|
authenticatedBy: z.string().min(1),
|
|
@@ -5264,7 +5330,7 @@ var TaskResumeResultSchema = z.object({
|
|
|
5264
5330
|
var TaskCancelOutcomeSchema = z.enum(["confirmed", "pending", "uncertain"]);
|
|
5265
5331
|
var TaskCancelResultSchema = z.object({
|
|
5266
5332
|
task: z.number().int().positive(),
|
|
5267
|
-
pr: z.number().int().positive(),
|
|
5333
|
+
pr: z.number().int().positive().nullable(),
|
|
5268
5334
|
escalationId: z.string().min(1),
|
|
5269
5335
|
outcome: TaskCancelOutcomeSchema,
|
|
5270
5336
|
authenticatedBy: z.string().min(1),
|
|
@@ -5275,6 +5341,7 @@ var TASK_TOOL_NAMES = [
|
|
|
5275
5341
|
"task_start",
|
|
5276
5342
|
"task_status",
|
|
5277
5343
|
"task_escalation_read",
|
|
5344
|
+
"task_pr_read",
|
|
5278
5345
|
"task_resume",
|
|
5279
5346
|
"task_cancel"
|
|
5280
5347
|
];
|
|
@@ -6444,7 +6511,7 @@ var COMMANDS = [
|
|
|
6444
6511
|
details: [
|
|
6445
6512
|
"Exposes the task-operator tool catalog (`packages/aeg-core/src/task-tools.ts`) to an agent runtime as one MCP server speaking newline-delimited JSON-RPC 2.0 (`initialize`/`tools/list`/`tools/call`). Claude registers it through the generated `.mcp.json`; Codex through its documented `~/.codex/config.toml` `[mcp_servers]` table — both point at this same command.",
|
|
6446
6513
|
"stdout carries JSON-RPC and nothing else: any stray write from the CLI (a forge-read warning) is redirected to stderr, so the protocol stream is never corrupted.",
|
|
6447
|
-
"`task_status`/`task_escalation_read` read; `task_start` starts a run in attended mode only, requiring an authenticated caller from the invocation context (`VINAYA_MCP_CALLER`) and refusing without one — MCP is a transport, not authorization. `task_resume`/`task_cancel` require the same authenticated caller, plus a current Principal ruling read fresh from the run's own PR — never a caller-supplied approval; `task_resume` triggers the existing `dev-review-loop --resume` continuation exactly once per escalation, and `task_cancel` reports a truthful `confirmed`/`pending`/`uncertain` outcome, idempotently, across repeated calls. No unattended start until the worker-isolation boundary and a capability flag land."
|
|
6514
|
+
"`task_status`/`task_escalation_read`/`task_pr_read` read; `task_pr_read` returns the selected task's OWN pull request — every required and reported check with its state, conclusion and failure summary, plus the principal-authored review record (newest verdicts and their judged head, round markers, published summary table, pause comment) — and refuses any other pull request; `task_start` starts a run in attended mode only, requiring an authenticated caller from the invocation context (`VINAYA_MCP_CALLER`) and refusing without one — MCP is a transport, not authorization. `task_resume`/`task_cancel` require the same authenticated caller, plus a current Principal ruling read fresh from the run's own PR — never a caller-supplied approval; `task_resume` triggers the existing `dev-review-loop --resume` continuation exactly once per escalation, and `task_cancel` reports a truthful `confirmed`/`pending`/`uncertain` outcome, idempotently, across repeated calls. No unattended start until the worker-isolation boundary and a capability flag land."
|
|
6448
6515
|
],
|
|
6449
6516
|
status: "shipped"
|
|
6450
6517
|
},
|
|
@@ -7347,7 +7414,28 @@ function trustAnchorRepoFromRemoteUrl(url) {
|
|
|
7347
7414
|
return m?.[1] && m[2] ? wellFormedRepoSlug(`${m[1]}/${m[2]}`) : null;
|
|
7348
7415
|
}
|
|
7349
7416
|
var execFileAsync4 = promisify4(execFile4);
|
|
7417
|
+
function resolveCiTrustAnchorProbeRef(env = process.env) {
|
|
7418
|
+
const ref = env.VINAYA_CI_CONFIG_PROBE_REF?.trim();
|
|
7419
|
+
if (!ref)
|
|
7420
|
+
return null;
|
|
7421
|
+
if (env.GITHUB_ACTIONS !== "true")
|
|
7422
|
+
return null;
|
|
7423
|
+
if ((env.GH_TOKEN ?? "").length > 0 || (env.GITHUB_TOKEN ?? "").length > 0)
|
|
7424
|
+
return null;
|
|
7425
|
+
return ref;
|
|
7426
|
+
}
|
|
7427
|
+
function readTrustAnchorConfigAtRef(ref) {
|
|
7428
|
+
const raw = execFileSync2("git", ["show", `${ref}:${LOCAL_CONFIG_FILENAME}`], {
|
|
7429
|
+
encoding: "utf-8",
|
|
7430
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
7431
|
+
timeout: 1e4
|
|
7432
|
+
});
|
|
7433
|
+
return Buffer.from(raw, "utf-8").toString("base64");
|
|
7434
|
+
}
|
|
7350
7435
|
function ghFetchTrustAnchorConfig() {
|
|
7436
|
+
const probeRef = resolveCiTrustAnchorProbeRef();
|
|
7437
|
+
if (probeRef)
|
|
7438
|
+
return readTrustAnchorConfigAtRef(probeRef);
|
|
7351
7439
|
const repo = trustAnchorRepo();
|
|
7352
7440
|
if (!repo)
|
|
7353
7441
|
throw new Error("could not resolve repo identity for the trust-anchor read");
|
|
@@ -7357,6 +7445,14 @@ function ghFetchTrustAnchorConfig() {
|
|
|
7357
7445
|
});
|
|
7358
7446
|
}
|
|
7359
7447
|
async function ghFetchTrustAnchorConfigAsync() {
|
|
7448
|
+
const probeRef = resolveCiTrustAnchorProbeRef();
|
|
7449
|
+
if (probeRef) {
|
|
7450
|
+
const { stdout } = await execFileAsync4("git", ["show", `${probeRef}:${LOCAL_CONFIG_FILENAME}`], {
|
|
7451
|
+
encoding: "utf-8",
|
|
7452
|
+
timeout: 1e4
|
|
7453
|
+
});
|
|
7454
|
+
return Buffer.from(stdout, "utf-8").toString("base64");
|
|
7455
|
+
}
|
|
7360
7456
|
const repo = await trustAnchorRepoAsync();
|
|
7361
7457
|
if (!repo)
|
|
7362
7458
|
throw new Error("could not resolve repo identity for the trust-anchor read");
|
|
@@ -2045,12 +2045,24 @@ function extractBaseSha(comment) {
|
|
|
2045
2045
|
const m = firstThirteenLines(comment).match(BASE_SHA_PATTERN);
|
|
2046
2046
|
return m ? m[1].toLowerCase() : null;
|
|
2047
2047
|
}
|
|
2048
|
-
var
|
|
2048
|
+
var FINDING_DESCRIPTION_STATE = /^F(\d+)(?:\s+\S+)?(?:\s+(open|fix-claimed|reproduced|resolved))?:/;
|
|
2049
|
+
function parseFindingState(description) {
|
|
2050
|
+
const m = FINDING_DESCRIPTION_STATE.exec(description.trim());
|
|
2051
|
+
if (!m)
|
|
2052
|
+
return { id: null, state: null };
|
|
2053
|
+
return { id: `F${m[1]}`, state: m[2] ?? null };
|
|
2054
|
+
}
|
|
2055
|
+
var FINDING_SEVERITY_LINE = /^\d+\.\s+\[([A-Z][A-Z]*)\]\s+(.+?)\s+—(?:\s+(.*))?$/gm;
|
|
2049
2056
|
function extractFindingSeverities(comment) {
|
|
2050
|
-
return [...comment.matchAll(FINDING_SEVERITY_LINE)].map((m) =>
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2057
|
+
return [...comment.matchAll(FINDING_SEVERITY_LINE)].map((m) => {
|
|
2058
|
+
const { id, state } = parseFindingState(m[3] ?? "");
|
|
2059
|
+
return {
|
|
2060
|
+
severity: m[1],
|
|
2061
|
+
location: m[2],
|
|
2062
|
+
id,
|
|
2063
|
+
state
|
|
2064
|
+
};
|
|
2065
|
+
});
|
|
2054
2066
|
}
|
|
2055
2067
|
function extractVerdict(comments, valuePattern, missingLabel) {
|
|
2056
2068
|
const candidates = comments.filter((c) => valuePattern.test(c));
|
|
@@ -2464,6 +2476,12 @@ function evaluateReviewFindings(findings, scale, threshold) {
|
|
|
2464
2476
|
});
|
|
2465
2477
|
return { outcome: blockingFindings.length > 0 ? "blocked" : "clean", blockingFindings };
|
|
2466
2478
|
}
|
|
2479
|
+
function isConsequentialFinding(finding) {
|
|
2480
|
+
return finding.state !== "resolved";
|
|
2481
|
+
}
|
|
2482
|
+
function consequentialFindings(findings) {
|
|
2483
|
+
return findings.filter((f) => isConsequentialFinding(f));
|
|
2484
|
+
}
|
|
2467
2485
|
function evaluateCodeReview(findings, policy) {
|
|
2468
2486
|
return evaluateReviewFindings(findings, CODE_REVIEW_SEVERITY_ORDER, policy.codeReviewThreshold);
|
|
2469
2487
|
}
|
|
@@ -4096,8 +4114,8 @@ function checkReviewGate(input) {
|
|
|
4096
4114
|
let codeReviewPolicyEvaluation;
|
|
4097
4115
|
let securityPolicyEvaluation;
|
|
4098
4116
|
try {
|
|
4099
|
-
codeReviewPolicyEvaluation = evaluateCodeReview(codeReview.findingSeverities, policy);
|
|
4100
|
-
securityPolicyEvaluation = evaluateSecurityReview(security.findingSeverities, policy);
|
|
4117
|
+
codeReviewPolicyEvaluation = evaluateCodeReview(consequentialFindings(codeReview.findingSeverities), policy);
|
|
4118
|
+
securityPolicyEvaluation = evaluateSecurityReview(consequentialFindings(security.findingSeverities), policy);
|
|
4101
4119
|
} catch (err) {
|
|
4102
4120
|
return {
|
|
4103
4121
|
verdict: "fail",
|
|
@@ -5178,11 +5196,27 @@ var ObservedSchema = z.object({
|
|
|
5178
5196
|
var TaskStatusInputSchema = z.object({
|
|
5179
5197
|
task: TaskToolRefSchema.optional()
|
|
5180
5198
|
}).merge(PageRequestSchema).strict();
|
|
5199
|
+
var TaskConfidenceSchema = z.object({
|
|
5200
|
+
round: z.number().int().positive(),
|
|
5201
|
+
percent: z.number().int().min(0).max(100).nullable(),
|
|
5202
|
+
source: z.enum(["stated", "published-summary"])
|
|
5203
|
+
}).strict();
|
|
5204
|
+
var TaskPhaseHistorySchema = z.object({
|
|
5205
|
+
typicalPhaseMinutes: z.number().nonnegative(),
|
|
5206
|
+
typicalPhaseSamples: z.number().int().positive()
|
|
5207
|
+
}).strict();
|
|
5181
5208
|
var TaskStatusItemSchema = z.object({
|
|
5182
5209
|
task: TaskToolRefSchema,
|
|
5183
5210
|
issue: z.number().int().positive(),
|
|
5184
5211
|
pr: z.number().int().positive().nullable(),
|
|
5185
|
-
state: z.string()
|
|
5212
|
+
state: z.string(),
|
|
5213
|
+
round: z.number().int().positive().nullable().optional(),
|
|
5214
|
+
phase: z.string().min(1).nullable().optional(),
|
|
5215
|
+
minutesInPhase: z.number().nonnegative().nullable().optional(),
|
|
5216
|
+
phaseIsCurrent: z.boolean().nullable().optional(),
|
|
5217
|
+
lastConfidence: TaskConfidenceSchema.nullable().optional(),
|
|
5218
|
+
lastConfidenceUnread: z.boolean().optional(),
|
|
5219
|
+
phaseHistory: TaskPhaseHistorySchema.nullable().optional()
|
|
5186
5220
|
}).merge(ObservedSchema);
|
|
5187
5221
|
var TaskStatusResultSchema = z.object({
|
|
5188
5222
|
items: z.array(TaskStatusItemSchema),
|
|
@@ -5194,7 +5228,7 @@ var EscalationInputsSchema = z.object({
|
|
|
5194
5228
|
round: z.number().int().nonnegative(),
|
|
5195
5229
|
head: z.string(),
|
|
5196
5230
|
branch: z.string(),
|
|
5197
|
-
prNumber: z.number().int().positive()
|
|
5231
|
+
prNumber: z.number().int().positive().nullable()
|
|
5198
5232
|
});
|
|
5199
5233
|
var EscalationEvidenceSchema = z.object({
|
|
5200
5234
|
round: z.number().int().nonnegative(),
|
|
@@ -5230,13 +5264,45 @@ var TaskEscalationReadResultSchema = z.object({
|
|
|
5230
5264
|
items: z.array(TaskEscalationPacketSchema),
|
|
5231
5265
|
nextCursor: z.string().nullable()
|
|
5232
5266
|
}).merge(ObservedSchema);
|
|
5233
|
-
var
|
|
5234
|
-
|
|
5235
|
-
|
|
5267
|
+
var TaskPrCheckSchema = z.object({
|
|
5268
|
+
name: z.string(),
|
|
5269
|
+
required: z.boolean(),
|
|
5270
|
+
status: z.string(),
|
|
5271
|
+
conclusion: z.string().nullable(),
|
|
5272
|
+
detailsUrl: z.string().nullable(),
|
|
5273
|
+
failureSummary: z.string().nullable()
|
|
5274
|
+
});
|
|
5275
|
+
var TaskPrVerdictSchema = z.object({
|
|
5276
|
+
role: z.enum(["code-review", "security"]),
|
|
5277
|
+
value: z.string(),
|
|
5278
|
+
judgedHead: z.string().nullable(),
|
|
5279
|
+
objectivesVersion: z.string().nullable()
|
|
5280
|
+
});
|
|
5281
|
+
var TaskPrPauseSchema = z.object({
|
|
5282
|
+
reason: z.string(),
|
|
5283
|
+
body: z.string()
|
|
5284
|
+
});
|
|
5285
|
+
var TaskPrReviewRecordSchema = z.object({
|
|
5286
|
+
verdicts: z.array(TaskPrVerdictSchema),
|
|
5287
|
+
roundMarkers: z.array(z.number().int().nonnegative()),
|
|
5288
|
+
summaryTable: z.string().nullable(),
|
|
5289
|
+
pause: TaskPrPauseSchema.nullable()
|
|
5290
|
+
});
|
|
5291
|
+
var TaskPrReadInputSchema = z.object({
|
|
5292
|
+
task: TaskToolRefSchema,
|
|
5293
|
+
pr: z.number().int().positive().optional()
|
|
5236
5294
|
}).strict();
|
|
5295
|
+
var TaskPrReadResultSchema = z.object({
|
|
5296
|
+
task: TaskToolRefSchema,
|
|
5297
|
+
issue: z.number().int().positive(),
|
|
5298
|
+
pr: z.number().int().positive(),
|
|
5299
|
+
head: z.string().nullable(),
|
|
5300
|
+
checks: z.array(TaskPrCheckSchema),
|
|
5301
|
+
review: TaskPrReviewRecordSchema
|
|
5302
|
+
}).merge(ObservedSchema);
|
|
5237
5303
|
var TaskStartResultSchema = z.object({
|
|
5238
5304
|
requestId: z.string().min(1),
|
|
5239
|
-
run:
|
|
5305
|
+
run: TaskToolRefSchema,
|
|
5240
5306
|
started: z.boolean(),
|
|
5241
5307
|
startedAt: z.string(),
|
|
5242
5308
|
mode: z.literal("attended")
|
|
@@ -5250,7 +5316,7 @@ var TaskCancelInputSchema = z.object({
|
|
|
5250
5316
|
}).strict();
|
|
5251
5317
|
var TaskResumeResultSchema = z.object({
|
|
5252
5318
|
task: z.number().int().positive(),
|
|
5253
|
-
pr: z.number().int().positive(),
|
|
5319
|
+
pr: z.number().int().positive().nullable(),
|
|
5254
5320
|
escalationId: z.string().min(1),
|
|
5255
5321
|
outcome: z.enum(["started", "already_resumed"]),
|
|
5256
5322
|
authenticatedBy: z.string().min(1),
|
|
@@ -5259,7 +5325,7 @@ var TaskResumeResultSchema = z.object({
|
|
|
5259
5325
|
var TaskCancelOutcomeSchema = z.enum(["confirmed", "pending", "uncertain"]);
|
|
5260
5326
|
var TaskCancelResultSchema = z.object({
|
|
5261
5327
|
task: z.number().int().positive(),
|
|
5262
|
-
pr: z.number().int().positive(),
|
|
5328
|
+
pr: z.number().int().positive().nullable(),
|
|
5263
5329
|
escalationId: z.string().min(1),
|
|
5264
5330
|
outcome: TaskCancelOutcomeSchema,
|
|
5265
5331
|
authenticatedBy: z.string().min(1),
|
|
@@ -5270,6 +5336,7 @@ var TASK_TOOL_NAMES = [
|
|
|
5270
5336
|
"task_start",
|
|
5271
5337
|
"task_status",
|
|
5272
5338
|
"task_escalation_read",
|
|
5339
|
+
"task_pr_read",
|
|
5273
5340
|
"task_resume",
|
|
5274
5341
|
"task_cancel"
|
|
5275
5342
|
];
|