@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
|
@@ -2042,12 +2042,24 @@ function extractBaseSha(comment) {
|
|
|
2042
2042
|
const m = firstThirteenLines(comment).match(BASE_SHA_PATTERN);
|
|
2043
2043
|
return m ? m[1].toLowerCase() : null;
|
|
2044
2044
|
}
|
|
2045
|
-
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;
|
|
2046
2053
|
function extractFindingSeverities(comment) {
|
|
2047
|
-
return [...comment.matchAll(FINDING_SEVERITY_LINE)].map((m) =>
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
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
|
+
});
|
|
2051
2063
|
}
|
|
2052
2064
|
function extractVerdict(comments, valuePattern, missingLabel) {
|
|
2053
2065
|
const candidates = comments.filter((c) => valuePattern.test(c));
|
|
@@ -2461,6 +2473,12 @@ function evaluateReviewFindings(findings, scale, threshold) {
|
|
|
2461
2473
|
});
|
|
2462
2474
|
return { outcome: blockingFindings.length > 0 ? "blocked" : "clean", blockingFindings };
|
|
2463
2475
|
}
|
|
2476
|
+
function isConsequentialFinding(finding) {
|
|
2477
|
+
return finding.state !== "resolved";
|
|
2478
|
+
}
|
|
2479
|
+
function consequentialFindings(findings) {
|
|
2480
|
+
return findings.filter((f) => isConsequentialFinding(f));
|
|
2481
|
+
}
|
|
2464
2482
|
function evaluateCodeReview(findings, policy) {
|
|
2465
2483
|
return evaluateReviewFindings(findings, CODE_REVIEW_SEVERITY_ORDER, policy.codeReviewThreshold);
|
|
2466
2484
|
}
|
|
@@ -4093,8 +4111,8 @@ function checkReviewGate(input) {
|
|
|
4093
4111
|
let codeReviewPolicyEvaluation;
|
|
4094
4112
|
let securityPolicyEvaluation;
|
|
4095
4113
|
try {
|
|
4096
|
-
codeReviewPolicyEvaluation = evaluateCodeReview(codeReview.findingSeverities, policy);
|
|
4097
|
-
securityPolicyEvaluation = evaluateSecurityReview(security.findingSeverities, policy);
|
|
4114
|
+
codeReviewPolicyEvaluation = evaluateCodeReview(consequentialFindings(codeReview.findingSeverities), policy);
|
|
4115
|
+
securityPolicyEvaluation = evaluateSecurityReview(consequentialFindings(security.findingSeverities), policy);
|
|
4098
4116
|
} catch (err) {
|
|
4099
4117
|
return {
|
|
4100
4118
|
verdict: "fail",
|
|
@@ -5175,11 +5193,27 @@ var ObservedSchema = z.object({
|
|
|
5175
5193
|
var TaskStatusInputSchema = z.object({
|
|
5176
5194
|
task: TaskToolRefSchema.optional()
|
|
5177
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();
|
|
5178
5205
|
var TaskStatusItemSchema = z.object({
|
|
5179
5206
|
task: TaskToolRefSchema,
|
|
5180
5207
|
issue: z.number().int().positive(),
|
|
5181
5208
|
pr: z.number().int().positive().nullable(),
|
|
5182
|
-
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()
|
|
5183
5217
|
}).merge(ObservedSchema);
|
|
5184
5218
|
var TaskStatusResultSchema = z.object({
|
|
5185
5219
|
items: z.array(TaskStatusItemSchema),
|
|
@@ -5191,7 +5225,7 @@ var EscalationInputsSchema = z.object({
|
|
|
5191
5225
|
round: z.number().int().nonnegative(),
|
|
5192
5226
|
head: z.string(),
|
|
5193
5227
|
branch: z.string(),
|
|
5194
|
-
prNumber: z.number().int().positive()
|
|
5228
|
+
prNumber: z.number().int().positive().nullable()
|
|
5195
5229
|
});
|
|
5196
5230
|
var EscalationEvidenceSchema = z.object({
|
|
5197
5231
|
round: z.number().int().nonnegative(),
|
|
@@ -5227,13 +5261,45 @@ var TaskEscalationReadResultSchema = z.object({
|
|
|
5227
5261
|
items: z.array(TaskEscalationPacketSchema),
|
|
5228
5262
|
nextCursor: z.string().nullable()
|
|
5229
5263
|
}).merge(ObservedSchema);
|
|
5230
|
-
var
|
|
5231
|
-
|
|
5232
|
-
|
|
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()
|
|
5233
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);
|
|
5234
5300
|
var TaskStartResultSchema = z.object({
|
|
5235
5301
|
requestId: z.string().min(1),
|
|
5236
|
-
run:
|
|
5302
|
+
run: TaskToolRefSchema,
|
|
5237
5303
|
started: z.boolean(),
|
|
5238
5304
|
startedAt: z.string(),
|
|
5239
5305
|
mode: z.literal("attended")
|
|
@@ -5247,7 +5313,7 @@ var TaskCancelInputSchema = z.object({
|
|
|
5247
5313
|
}).strict();
|
|
5248
5314
|
var TaskResumeResultSchema = z.object({
|
|
5249
5315
|
task: z.number().int().positive(),
|
|
5250
|
-
pr: z.number().int().positive(),
|
|
5316
|
+
pr: z.number().int().positive().nullable(),
|
|
5251
5317
|
escalationId: z.string().min(1),
|
|
5252
5318
|
outcome: z.enum(["started", "already_resumed"]),
|
|
5253
5319
|
authenticatedBy: z.string().min(1),
|
|
@@ -5256,7 +5322,7 @@ var TaskResumeResultSchema = z.object({
|
|
|
5256
5322
|
var TaskCancelOutcomeSchema = z.enum(["confirmed", "pending", "uncertain"]);
|
|
5257
5323
|
var TaskCancelResultSchema = z.object({
|
|
5258
5324
|
task: z.number().int().positive(),
|
|
5259
|
-
pr: z.number().int().positive(),
|
|
5325
|
+
pr: z.number().int().positive().nullable(),
|
|
5260
5326
|
escalationId: z.string().min(1),
|
|
5261
5327
|
outcome: TaskCancelOutcomeSchema,
|
|
5262
5328
|
authenticatedBy: z.string().min(1),
|
|
@@ -5267,6 +5333,7 @@ var TASK_TOOL_NAMES = [
|
|
|
5267
5333
|
"task_start",
|
|
5268
5334
|
"task_status",
|
|
5269
5335
|
"task_escalation_read",
|
|
5336
|
+
"task_pr_read",
|
|
5270
5337
|
"task_resume",
|
|
5271
5338
|
"task_cancel"
|
|
5272
5339
|
];
|
|
@@ -2042,12 +2042,24 @@ function extractBaseSha(comment) {
|
|
|
2042
2042
|
const m = firstThirteenLines(comment).match(BASE_SHA_PATTERN);
|
|
2043
2043
|
return m ? m[1].toLowerCase() : null;
|
|
2044
2044
|
}
|
|
2045
|
-
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;
|
|
2046
2053
|
function extractFindingSeverities(comment) {
|
|
2047
|
-
return [...comment.matchAll(FINDING_SEVERITY_LINE)].map((m) =>
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
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
|
+
});
|
|
2051
2063
|
}
|
|
2052
2064
|
function extractVerdict(comments, valuePattern, missingLabel) {
|
|
2053
2065
|
const candidates = comments.filter((c) => valuePattern.test(c));
|
|
@@ -2461,6 +2473,12 @@ function evaluateReviewFindings(findings, scale, threshold) {
|
|
|
2461
2473
|
});
|
|
2462
2474
|
return { outcome: blockingFindings.length > 0 ? "blocked" : "clean", blockingFindings };
|
|
2463
2475
|
}
|
|
2476
|
+
function isConsequentialFinding(finding) {
|
|
2477
|
+
return finding.state !== "resolved";
|
|
2478
|
+
}
|
|
2479
|
+
function consequentialFindings(findings) {
|
|
2480
|
+
return findings.filter((f) => isConsequentialFinding(f));
|
|
2481
|
+
}
|
|
2464
2482
|
function evaluateCodeReview(findings, policy) {
|
|
2465
2483
|
return evaluateReviewFindings(findings, CODE_REVIEW_SEVERITY_ORDER, policy.codeReviewThreshold);
|
|
2466
2484
|
}
|
|
@@ -4093,8 +4111,8 @@ function checkReviewGate(input) {
|
|
|
4093
4111
|
let codeReviewPolicyEvaluation;
|
|
4094
4112
|
let securityPolicyEvaluation;
|
|
4095
4113
|
try {
|
|
4096
|
-
codeReviewPolicyEvaluation = evaluateCodeReview(codeReview.findingSeverities, policy);
|
|
4097
|
-
securityPolicyEvaluation = evaluateSecurityReview(security.findingSeverities, policy);
|
|
4114
|
+
codeReviewPolicyEvaluation = evaluateCodeReview(consequentialFindings(codeReview.findingSeverities), policy);
|
|
4115
|
+
securityPolicyEvaluation = evaluateSecurityReview(consequentialFindings(security.findingSeverities), policy);
|
|
4098
4116
|
} catch (err) {
|
|
4099
4117
|
return {
|
|
4100
4118
|
verdict: "fail",
|
|
@@ -5175,11 +5193,27 @@ var ObservedSchema = z.object({
|
|
|
5175
5193
|
var TaskStatusInputSchema = z.object({
|
|
5176
5194
|
task: TaskToolRefSchema.optional()
|
|
5177
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();
|
|
5178
5205
|
var TaskStatusItemSchema = z.object({
|
|
5179
5206
|
task: TaskToolRefSchema,
|
|
5180
5207
|
issue: z.number().int().positive(),
|
|
5181
5208
|
pr: z.number().int().positive().nullable(),
|
|
5182
|
-
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()
|
|
5183
5217
|
}).merge(ObservedSchema);
|
|
5184
5218
|
var TaskStatusResultSchema = z.object({
|
|
5185
5219
|
items: z.array(TaskStatusItemSchema),
|
|
@@ -5191,7 +5225,7 @@ var EscalationInputsSchema = z.object({
|
|
|
5191
5225
|
round: z.number().int().nonnegative(),
|
|
5192
5226
|
head: z.string(),
|
|
5193
5227
|
branch: z.string(),
|
|
5194
|
-
prNumber: z.number().int().positive()
|
|
5228
|
+
prNumber: z.number().int().positive().nullable()
|
|
5195
5229
|
});
|
|
5196
5230
|
var EscalationEvidenceSchema = z.object({
|
|
5197
5231
|
round: z.number().int().nonnegative(),
|
|
@@ -5227,13 +5261,45 @@ var TaskEscalationReadResultSchema = z.object({
|
|
|
5227
5261
|
items: z.array(TaskEscalationPacketSchema),
|
|
5228
5262
|
nextCursor: z.string().nullable()
|
|
5229
5263
|
}).merge(ObservedSchema);
|
|
5230
|
-
var
|
|
5231
|
-
|
|
5232
|
-
|
|
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()
|
|
5233
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);
|
|
5234
5300
|
var TaskStartResultSchema = z.object({
|
|
5235
5301
|
requestId: z.string().min(1),
|
|
5236
|
-
run:
|
|
5302
|
+
run: TaskToolRefSchema,
|
|
5237
5303
|
started: z.boolean(),
|
|
5238
5304
|
startedAt: z.string(),
|
|
5239
5305
|
mode: z.literal("attended")
|
|
@@ -5247,7 +5313,7 @@ var TaskCancelInputSchema = z.object({
|
|
|
5247
5313
|
}).strict();
|
|
5248
5314
|
var TaskResumeResultSchema = z.object({
|
|
5249
5315
|
task: z.number().int().positive(),
|
|
5250
|
-
pr: z.number().int().positive(),
|
|
5316
|
+
pr: z.number().int().positive().nullable(),
|
|
5251
5317
|
escalationId: z.string().min(1),
|
|
5252
5318
|
outcome: z.enum(["started", "already_resumed"]),
|
|
5253
5319
|
authenticatedBy: z.string().min(1),
|
|
@@ -5256,7 +5322,7 @@ var TaskResumeResultSchema = z.object({
|
|
|
5256
5322
|
var TaskCancelOutcomeSchema = z.enum(["confirmed", "pending", "uncertain"]);
|
|
5257
5323
|
var TaskCancelResultSchema = z.object({
|
|
5258
5324
|
task: z.number().int().positive(),
|
|
5259
|
-
pr: z.number().int().positive(),
|
|
5325
|
+
pr: z.number().int().positive().nullable(),
|
|
5260
5326
|
escalationId: z.string().min(1),
|
|
5261
5327
|
outcome: TaskCancelOutcomeSchema,
|
|
5262
5328
|
authenticatedBy: z.string().min(1),
|
|
@@ -5267,6 +5333,7 @@ var TASK_TOOL_NAMES = [
|
|
|
5267
5333
|
"task_start",
|
|
5268
5334
|
"task_status",
|
|
5269
5335
|
"task_escalation_read",
|
|
5336
|
+
"task_pr_read",
|
|
5270
5337
|
"task_resume",
|
|
5271
5338
|
"task_cancel"
|
|
5272
5339
|
];
|
|
@@ -2042,12 +2042,24 @@ function extractBaseSha(comment) {
|
|
|
2042
2042
|
const m = firstThirteenLines(comment).match(BASE_SHA_PATTERN);
|
|
2043
2043
|
return m ? m[1].toLowerCase() : null;
|
|
2044
2044
|
}
|
|
2045
|
-
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;
|
|
2046
2053
|
function extractFindingSeverities(comment) {
|
|
2047
|
-
return [...comment.matchAll(FINDING_SEVERITY_LINE)].map((m) =>
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
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
|
+
});
|
|
2051
2063
|
}
|
|
2052
2064
|
function extractVerdict(comments, valuePattern, missingLabel) {
|
|
2053
2065
|
const candidates = comments.filter((c) => valuePattern.test(c));
|
|
@@ -2461,6 +2473,12 @@ function evaluateReviewFindings(findings, scale, threshold) {
|
|
|
2461
2473
|
});
|
|
2462
2474
|
return { outcome: blockingFindings.length > 0 ? "blocked" : "clean", blockingFindings };
|
|
2463
2475
|
}
|
|
2476
|
+
function isConsequentialFinding(finding) {
|
|
2477
|
+
return finding.state !== "resolved";
|
|
2478
|
+
}
|
|
2479
|
+
function consequentialFindings(findings) {
|
|
2480
|
+
return findings.filter((f) => isConsequentialFinding(f));
|
|
2481
|
+
}
|
|
2464
2482
|
function evaluateCodeReview(findings, policy) {
|
|
2465
2483
|
return evaluateReviewFindings(findings, CODE_REVIEW_SEVERITY_ORDER, policy.codeReviewThreshold);
|
|
2466
2484
|
}
|
|
@@ -4093,8 +4111,8 @@ function checkReviewGate(input) {
|
|
|
4093
4111
|
let codeReviewPolicyEvaluation;
|
|
4094
4112
|
let securityPolicyEvaluation;
|
|
4095
4113
|
try {
|
|
4096
|
-
codeReviewPolicyEvaluation = evaluateCodeReview(codeReview.findingSeverities, policy);
|
|
4097
|
-
securityPolicyEvaluation = evaluateSecurityReview(security.findingSeverities, policy);
|
|
4114
|
+
codeReviewPolicyEvaluation = evaluateCodeReview(consequentialFindings(codeReview.findingSeverities), policy);
|
|
4115
|
+
securityPolicyEvaluation = evaluateSecurityReview(consequentialFindings(security.findingSeverities), policy);
|
|
4098
4116
|
} catch (err) {
|
|
4099
4117
|
return {
|
|
4100
4118
|
verdict: "fail",
|
|
@@ -5175,11 +5193,27 @@ var ObservedSchema = z.object({
|
|
|
5175
5193
|
var TaskStatusInputSchema = z.object({
|
|
5176
5194
|
task: TaskToolRefSchema.optional()
|
|
5177
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();
|
|
5178
5205
|
var TaskStatusItemSchema = z.object({
|
|
5179
5206
|
task: TaskToolRefSchema,
|
|
5180
5207
|
issue: z.number().int().positive(),
|
|
5181
5208
|
pr: z.number().int().positive().nullable(),
|
|
5182
|
-
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()
|
|
5183
5217
|
}).merge(ObservedSchema);
|
|
5184
5218
|
var TaskStatusResultSchema = z.object({
|
|
5185
5219
|
items: z.array(TaskStatusItemSchema),
|
|
@@ -5191,7 +5225,7 @@ var EscalationInputsSchema = z.object({
|
|
|
5191
5225
|
round: z.number().int().nonnegative(),
|
|
5192
5226
|
head: z.string(),
|
|
5193
5227
|
branch: z.string(),
|
|
5194
|
-
prNumber: z.number().int().positive()
|
|
5228
|
+
prNumber: z.number().int().positive().nullable()
|
|
5195
5229
|
});
|
|
5196
5230
|
var EscalationEvidenceSchema = z.object({
|
|
5197
5231
|
round: z.number().int().nonnegative(),
|
|
@@ -5227,13 +5261,45 @@ var TaskEscalationReadResultSchema = z.object({
|
|
|
5227
5261
|
items: z.array(TaskEscalationPacketSchema),
|
|
5228
5262
|
nextCursor: z.string().nullable()
|
|
5229
5263
|
}).merge(ObservedSchema);
|
|
5230
|
-
var
|
|
5231
|
-
|
|
5232
|
-
|
|
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()
|
|
5233
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);
|
|
5234
5300
|
var TaskStartResultSchema = z.object({
|
|
5235
5301
|
requestId: z.string().min(1),
|
|
5236
|
-
run:
|
|
5302
|
+
run: TaskToolRefSchema,
|
|
5237
5303
|
started: z.boolean(),
|
|
5238
5304
|
startedAt: z.string(),
|
|
5239
5305
|
mode: z.literal("attended")
|
|
@@ -5247,7 +5313,7 @@ var TaskCancelInputSchema = z.object({
|
|
|
5247
5313
|
}).strict();
|
|
5248
5314
|
var TaskResumeResultSchema = z.object({
|
|
5249
5315
|
task: z.number().int().positive(),
|
|
5250
|
-
pr: z.number().int().positive(),
|
|
5316
|
+
pr: z.number().int().positive().nullable(),
|
|
5251
5317
|
escalationId: z.string().min(1),
|
|
5252
5318
|
outcome: z.enum(["started", "already_resumed"]),
|
|
5253
5319
|
authenticatedBy: z.string().min(1),
|
|
@@ -5256,7 +5322,7 @@ var TaskResumeResultSchema = z.object({
|
|
|
5256
5322
|
var TaskCancelOutcomeSchema = z.enum(["confirmed", "pending", "uncertain"]);
|
|
5257
5323
|
var TaskCancelResultSchema = z.object({
|
|
5258
5324
|
task: z.number().int().positive(),
|
|
5259
|
-
pr: z.number().int().positive(),
|
|
5325
|
+
pr: z.number().int().positive().nullable(),
|
|
5260
5326
|
escalationId: z.string().min(1),
|
|
5261
5327
|
outcome: TaskCancelOutcomeSchema,
|
|
5262
5328
|
authenticatedBy: z.string().min(1),
|
|
@@ -5267,6 +5333,7 @@ var TASK_TOOL_NAMES = [
|
|
|
5267
5333
|
"task_start",
|
|
5268
5334
|
"task_status",
|
|
5269
5335
|
"task_escalation_read",
|
|
5336
|
+
"task_pr_read",
|
|
5270
5337
|
"task_resume",
|
|
5271
5338
|
"task_cancel"
|
|
5272
5339
|
];
|
|
@@ -6466,7 +6533,7 @@ var COMMANDS = [
|
|
|
6466
6533
|
details: [
|
|
6467
6534
|
"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.",
|
|
6468
6535
|
"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.",
|
|
6469
|
-
"`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."
|
|
6536
|
+
"`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."
|
|
6470
6537
|
],
|
|
6471
6538
|
status: "shipped"
|
|
6472
6539
|
},
|
|
@@ -7480,7 +7547,28 @@ function trustAnchorRepoFromRemoteUrl(url) {
|
|
|
7480
7547
|
return m?.[1] && m[2] ? wellFormedRepoSlug(`${m[1]}/${m[2]}`) : null;
|
|
7481
7548
|
}
|
|
7482
7549
|
var execFileAsync4 = promisify4(execFile4);
|
|
7550
|
+
function resolveCiTrustAnchorProbeRef(env = process.env) {
|
|
7551
|
+
const ref = env.VINAYA_CI_CONFIG_PROBE_REF?.trim();
|
|
7552
|
+
if (!ref)
|
|
7553
|
+
return null;
|
|
7554
|
+
if (env.GITHUB_ACTIONS !== "true")
|
|
7555
|
+
return null;
|
|
7556
|
+
if ((env.GH_TOKEN ?? "").length > 0 || (env.GITHUB_TOKEN ?? "").length > 0)
|
|
7557
|
+
return null;
|
|
7558
|
+
return ref;
|
|
7559
|
+
}
|
|
7560
|
+
function readTrustAnchorConfigAtRef(ref) {
|
|
7561
|
+
const raw = execFileSync3("git", ["show", `${ref}:${LOCAL_CONFIG_FILENAME}`], {
|
|
7562
|
+
encoding: "utf-8",
|
|
7563
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
7564
|
+
timeout: 1e4
|
|
7565
|
+
});
|
|
7566
|
+
return Buffer.from(raw, "utf-8").toString("base64");
|
|
7567
|
+
}
|
|
7483
7568
|
function ghFetchTrustAnchorConfig() {
|
|
7569
|
+
const probeRef = resolveCiTrustAnchorProbeRef();
|
|
7570
|
+
if (probeRef)
|
|
7571
|
+
return readTrustAnchorConfigAtRef(probeRef);
|
|
7484
7572
|
const repo = trustAnchorRepo();
|
|
7485
7573
|
if (!repo)
|
|
7486
7574
|
throw new Error("could not resolve repo identity for the trust-anchor read");
|
|
@@ -7490,6 +7578,14 @@ function ghFetchTrustAnchorConfig() {
|
|
|
7490
7578
|
});
|
|
7491
7579
|
}
|
|
7492
7580
|
async function ghFetchTrustAnchorConfigAsync() {
|
|
7581
|
+
const probeRef = resolveCiTrustAnchorProbeRef();
|
|
7582
|
+
if (probeRef) {
|
|
7583
|
+
const { stdout } = await execFileAsync4("git", ["show", `${probeRef}:${LOCAL_CONFIG_FILENAME}`], {
|
|
7584
|
+
encoding: "utf-8",
|
|
7585
|
+
timeout: 1e4
|
|
7586
|
+
});
|
|
7587
|
+
return Buffer.from(stdout, "utf-8").toString("base64");
|
|
7588
|
+
}
|
|
7493
7589
|
const repo = await trustAnchorRepoAsync();
|
|
7494
7590
|
if (!repo)
|
|
7495
7591
|
throw new Error("could not resolve repo identity for the trust-anchor read");
|