opencode-swarm 7.124.0 → 7.125.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/.opencode/skills/critic-gate/SKILL.md +8 -0
- package/.opencode/skills/swarm/SKILL.md +12 -8
- package/.opencode/skills/swarm-pr-feedback/SKILL.md +252 -62
- package/.opencode/skills/swarm-pr-review/SKILL.md +242 -76
- package/README.md +3 -1
- package/dist/background/lane-output-store.d.ts +10 -0
- package/dist/background/pending-delegations.d.ts +3 -0
- package/dist/background/workspace-snapshot.d.ts +59 -0
- package/dist/cli/{config-doctor-53mnpeke.js → config-doctor-be9sxqx8.js} +2 -2
- package/dist/cli/{curation-policy-ny033330.js → curation-policy-52kt6d7t.js} +2 -2
- package/dist/cli/{curator-nvn1pdq6.js → curator-hbst8nbc.js} +14 -13
- package/dist/cli/{curator-llm-factory-e0tjz8qq.js → curator-llm-factory-frde1955.js} +14 -13
- package/dist/cli/{guardrail-explain-d3dd57nf.js → guardrail-explain-112kqmbc.js} +15 -14
- package/dist/cli/{guardrail-log-3q2z9axs.js → guardrail-log-c8zcab91.js} +3 -3
- package/dist/cli/{hive-promoter-9gbpepgm.js → hive-promoter-448xs2tp.js} +14 -13
- package/dist/cli/{index-eeg04r0x.js → index-09vd53pz.js} +1 -1
- package/dist/cli/{pending-delegations-e3bcqj77.js → index-0cz1ws47.js} +4 -18
- package/dist/cli/{index-v5ecczts.js → index-0y6tmm9v.js} +1 -1
- package/dist/cli/{index-13d2g7k9.js → index-67hqr2zv.js} +1 -1
- package/dist/cli/{index-e19mxn9f.js → index-6vfvc36k.js} +1 -1
- package/dist/cli/{index-qd77aft9.js → index-7j3sm7h8.js} +2 -2
- package/dist/cli/{index-wqwpzhv1.js → index-958hf0yr.js} +2 -2
- package/dist/cli/{index-z0m4angq.js → index-99ed0h32.js} +5 -5
- package/dist/cli/{index-8pz0ypxz.js → index-9hbwa5x1.js} +16 -15
- package/dist/cli/{index-mkkx1a4f.js → index-amspa811.js} +1504 -882
- package/dist/cli/{index-zjedv2bd.js → index-dx2c2wjt.js} +2 -2
- package/dist/cli/{index-htbjqftb.js → index-jh6s75f6.js} +1 -1
- package/dist/cli/{index-3yyr4ynk.js → index-kt0awv1n.js} +1 -1
- package/dist/cli/index-mg54y5gc.js +564 -0
- package/dist/cli/{index-x2mmnrnx.js → index-n6chz2g8.js} +1 -1
- package/dist/cli/{index-tyg0zezw.js → index-vtwqjr4z.js} +3 -3
- package/dist/cli/{index-c6crt5rs.js → index-xattnmyb.js} +9 -1
- package/dist/cli/{index-2x4maxte.js → index-yt1v62pv.js} +4 -4
- package/dist/cli/index.js +14 -13
- package/dist/cli/{knowledge-escalator-r1s01m3z.js → knowledge-escalator-htafbhxg.js} +3 -3
- package/dist/cli/{knowledge-events-a9hmxvke.js → knowledge-events-havw8c4t.js} +1 -1
- package/dist/cli/{knowledge-store-jt31br5k.js → knowledge-store-hqngpt2v.js} +1 -1
- package/dist/cli/{knowledge-validator-9vrwxr3z.js → knowledge-validator-g7mpnazh.js} +4 -4
- package/dist/cli/pending-delegations-7j8xqg5f.js +34 -0
- package/dist/cli/{scan-cursor-bkjtsawg.js → scan-cursor-sx7cvh8v.js} +2 -2
- package/dist/cli/{schema-y3z416z7.js → schema-2418eqy3.js} +1 -1
- package/dist/cli/{skill-generator-794hyndw.js → skill-generator-zggy797r.js} +5 -5
- package/dist/cli/workspace-snapshot-c9pxxt9a.js +48 -0
- package/dist/commands/registry.d.ts +1 -1
- package/dist/hooks/pr-workflow-gate.d.ts +211 -0
- package/dist/hooks/pr-workflow-response-gate.d.ts +23 -0
- package/dist/hooks/pr-workflow-session-resolver.d.ts +14 -0
- package/dist/index.js +477 -445
- package/dist/tools/complete-pr-workflow.d.ts +5 -0
- package/dist/tools/dispatch-lanes.d.ts +44 -0
- package/dist/tools/index.d.ts +2 -0
- package/dist/tools/manifest.d.ts +2 -0
- package/dist/tools/run-pr-feedback-stage-a.d.ts +69 -0
- package/dist/tools/tool-metadata.d.ts +8 -0
- package/dist/tools/write-pr-review-trigger-eval.d.ts +56 -46
- package/package.json +1 -1
- package/dist/cli/index-dqh3zhhc.js +0 -133
- package/dist/cli/workspace-snapshot-eyf6gd0d.js +0 -22
package/dist/cli/index.js
CHANGED
|
@@ -7,34 +7,34 @@ import {
|
|
|
7
7
|
getPluginLockFilePaths,
|
|
8
8
|
package_default,
|
|
9
9
|
resolveCommand
|
|
10
|
-
} from "./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
10
|
+
} from "./index-amspa811.js";
|
|
11
|
+
import"./index-6vfvc36k.js";
|
|
12
|
+
import"./index-0y6tmm9v.js";
|
|
13
13
|
import"./index-4rzzzjtg.js";
|
|
14
14
|
import"./index-4905hd2m.js";
|
|
15
15
|
import"./index-134d35c1.js";
|
|
16
16
|
import"./index-6n2jpz7x.js";
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
17
|
+
import"./index-vtwqjr4z.js";
|
|
18
|
+
import"./index-99ed0h32.js";
|
|
19
|
+
import"./index-09vd53pz.js";
|
|
20
20
|
import"./index-vxv732ex.js";
|
|
21
21
|
import"./index-c8s9a3zh.js";
|
|
22
22
|
import"./index-s9mj4rb9.js";
|
|
23
23
|
import"./index-23zsx7dm.js";
|
|
24
|
-
import"./index-
|
|
25
|
-
import"./index-
|
|
24
|
+
import"./index-dx2c2wjt.js";
|
|
25
|
+
import"./index-67hqr2zv.js";
|
|
26
26
|
import"./index-rtry5xyf.js";
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
27
|
+
import"./index-yt1v62pv.js";
|
|
28
|
+
import"./index-n6chz2g8.js";
|
|
29
29
|
import"./index-ae75rja9.js";
|
|
30
30
|
import"./index-q27bajqb.js";
|
|
31
|
-
import"./index-
|
|
31
|
+
import"./index-kt0awv1n.js";
|
|
32
32
|
import"./index-k5jrywpr.js";
|
|
33
33
|
import"./index-n832052r.js";
|
|
34
34
|
import {
|
|
35
35
|
DEFAULT_AGENT_CONFIGS,
|
|
36
36
|
init_constants
|
|
37
|
-
} from "./index-
|
|
37
|
+
} from "./index-xattnmyb.js";
|
|
38
38
|
import"./index-bk5tah7q.js";
|
|
39
39
|
import"./index-8fwhhayc.js";
|
|
40
40
|
import"./index-q1exe2b3.js";
|
|
@@ -43,11 +43,12 @@ import"./index-2tn5h2zp.js";
|
|
|
43
43
|
import"./index-1kz6da87.js";
|
|
44
44
|
import"./index-v2rdhwx8.js";
|
|
45
45
|
import"./index-gacm5s2n.js";
|
|
46
|
+
import"./index-0cz1ws47.js";
|
|
46
47
|
import"./index-2445sx3d.js";
|
|
47
48
|
import"./index-z6xqpmqg.js";
|
|
48
49
|
import"./index-zjygnfay.js";
|
|
49
50
|
import"./index-zgwm4ryv.js";
|
|
50
|
-
import"./index-
|
|
51
|
+
import"./index-mg54y5gc.js";
|
|
51
52
|
import"./index-3x761jqv.js";
|
|
52
53
|
import"./index-7mkpsw6g.js";
|
|
53
54
|
import"./index-fsrp8wp3.js";
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
maybeEscalateOnViolation,
|
|
9
9
|
maybeQuarantineOnContradiction,
|
|
10
10
|
readRecentEscalations
|
|
11
|
-
} from "./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
11
|
+
} from "./index-99ed0h32.js";
|
|
12
|
+
import"./index-yt1v62pv.js";
|
|
13
|
+
import"./index-n6chz2g8.js";
|
|
14
14
|
import"./index-ae75rja9.js";
|
|
15
15
|
import"./index-q27bajqb.js";
|
|
16
16
|
import"./index-bk5tah7q.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
resolveKnowledgeCounterBaselinePath,
|
|
27
27
|
resolveKnowledgeEventsPath,
|
|
28
28
|
resolveLegacyApplicationLogPath
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-n6chz2g8.js";
|
|
30
30
|
import"./index-ae75rja9.js";
|
|
31
31
|
import"./index-q27bajqb.js";
|
|
32
32
|
import"./index-zgwm4ryv.js";
|
|
@@ -23,11 +23,11 @@ import {
|
|
|
23
23
|
validateLesson,
|
|
24
24
|
validateSkillCandidatePath,
|
|
25
25
|
validateSkillPath
|
|
26
|
-
} from "./index-
|
|
27
|
-
import"./index-
|
|
26
|
+
} from "./index-dx2c2wjt.js";
|
|
27
|
+
import"./index-67hqr2zv.js";
|
|
28
28
|
import"./index-rtry5xyf.js";
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-
|
|
29
|
+
import"./index-yt1v62pv.js";
|
|
30
|
+
import"./index-n6chz2g8.js";
|
|
31
31
|
import"./index-ae75rja9.js";
|
|
32
32
|
import"./index-q27bajqb.js";
|
|
33
33
|
import"./index-bk5tah7q.js";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
BACKGROUND_DELEGATIONS_FILE,
|
|
4
|
+
appendDelegationTransition,
|
|
5
|
+
buildPromptSnapshot,
|
|
6
|
+
findByBatchId,
|
|
7
|
+
findByCorrelationId,
|
|
8
|
+
findOpenAsyncLaneBatches,
|
|
9
|
+
readDelegations,
|
|
10
|
+
recordPendingDelegation,
|
|
11
|
+
sweepStaleDelegations
|
|
12
|
+
} from "./index-0cz1ws47.js";
|
|
13
|
+
import"./index-2445sx3d.js";
|
|
14
|
+
import"./index-z6xqpmqg.js";
|
|
15
|
+
import"./index-zjygnfay.js";
|
|
16
|
+
import"./index-zgwm4ryv.js";
|
|
17
|
+
import"./index-fsrp8wp3.js";
|
|
18
|
+
import"./index-76kvm9z5.js";
|
|
19
|
+
import"./index-q2rrv0cy.js";
|
|
20
|
+
import"./index-bpmtbmy9.js";
|
|
21
|
+
import"./index-7g4c7s5r.js";
|
|
22
|
+
import"./index-qe3v54nb.js";
|
|
23
|
+
import"./index-a76rekgs.js";
|
|
24
|
+
export {
|
|
25
|
+
sweepStaleDelegations,
|
|
26
|
+
recordPendingDelegation,
|
|
27
|
+
readDelegations,
|
|
28
|
+
findOpenAsyncLaneBatches,
|
|
29
|
+
findByCorrelationId,
|
|
30
|
+
findByBatchId,
|
|
31
|
+
buildPromptSnapshot,
|
|
32
|
+
appendDelegationTransition,
|
|
33
|
+
BACKGROUND_DELEGATIONS_FILE
|
|
34
|
+
};
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
alreadyCuratedThisGeneration,
|
|
5
5
|
claimNextScanBatch,
|
|
6
6
|
getScanStatus
|
|
7
|
-
} from "./index-
|
|
8
|
-
import"./index-
|
|
7
|
+
} from "./index-09vd53pz.js";
|
|
8
|
+
import"./index-yt1v62pv.js";
|
|
9
9
|
import"./index-ae75rja9.js";
|
|
10
10
|
import"./index-q27bajqb.js";
|
|
11
11
|
import"./index-bk5tah7q.js";
|
|
@@ -33,12 +33,12 @@ import {
|
|
|
33
33
|
sanitizeSlug,
|
|
34
34
|
selectCandidateEntries,
|
|
35
35
|
writeEvalStub
|
|
36
|
-
} from "./index-
|
|
37
|
-
import"./index-
|
|
38
|
-
import"./index-
|
|
36
|
+
} from "./index-vtwqjr4z.js";
|
|
37
|
+
import"./index-dx2c2wjt.js";
|
|
38
|
+
import"./index-67hqr2zv.js";
|
|
39
39
|
import"./index-rtry5xyf.js";
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
40
|
+
import"./index-yt1v62pv.js";
|
|
41
|
+
import"./index-n6chz2g8.js";
|
|
42
42
|
import"./index-ae75rja9.js";
|
|
43
43
|
import"./index-q27bajqb.js";
|
|
44
44
|
import"./index-bk5tah7q.js";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
_internals,
|
|
4
|
+
captureWorkspaceSnapshot,
|
|
5
|
+
changedFilesSinceSnapshot,
|
|
6
|
+
compareWorkspaceSnapshot,
|
|
7
|
+
compareWorkspaceSnapshots,
|
|
8
|
+
digest,
|
|
9
|
+
parsePorcelainPaths,
|
|
10
|
+
readGitTextAtRevision,
|
|
11
|
+
resolveCommitCountSince,
|
|
12
|
+
resolveCurrentGitHead,
|
|
13
|
+
resolveCurrentUpstreamPushTarget,
|
|
14
|
+
resolveCurrentUpstreamRemoteRef,
|
|
15
|
+
resolveExactMergeBase,
|
|
16
|
+
resolveExactRemoteBranchHead,
|
|
17
|
+
resolveGitControlStateDigest,
|
|
18
|
+
resolveIsExactSingleChildCommit,
|
|
19
|
+
resolveIsWorkingTreeClean,
|
|
20
|
+
resolvePrWorkflowRevisionDigest,
|
|
21
|
+
resolvePrWorkflowRevisionDigestAsync,
|
|
22
|
+
resolveRemoteRefsContainingHead,
|
|
23
|
+
workspaceSnapshotMatches
|
|
24
|
+
} from "./index-mg54y5gc.js";
|
|
25
|
+
import"./index-a76rekgs.js";
|
|
26
|
+
export {
|
|
27
|
+
workspaceSnapshotMatches,
|
|
28
|
+
resolveRemoteRefsContainingHead,
|
|
29
|
+
resolvePrWorkflowRevisionDigestAsync,
|
|
30
|
+
resolvePrWorkflowRevisionDigest,
|
|
31
|
+
resolveIsWorkingTreeClean,
|
|
32
|
+
resolveIsExactSingleChildCommit,
|
|
33
|
+
resolveGitControlStateDigest,
|
|
34
|
+
resolveExactRemoteBranchHead,
|
|
35
|
+
resolveExactMergeBase,
|
|
36
|
+
resolveCurrentUpstreamRemoteRef,
|
|
37
|
+
resolveCurrentUpstreamPushTarget,
|
|
38
|
+
resolveCurrentGitHead,
|
|
39
|
+
resolveCommitCountSince,
|
|
40
|
+
readGitTextAtRevision,
|
|
41
|
+
parsePorcelainPaths,
|
|
42
|
+
digest,
|
|
43
|
+
compareWorkspaceSnapshots,
|
|
44
|
+
compareWorkspaceSnapshot,
|
|
45
|
+
changedFilesSinceSnapshot,
|
|
46
|
+
captureWorkspaceSnapshot,
|
|
47
|
+
_internals
|
|
48
|
+
};
|
|
@@ -517,7 +517,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
517
517
|
readonly handler: (ctx: CommandContext) => CommandResult;
|
|
518
518
|
readonly description: "Launch deep PR review with multi-lane analysis [url] [--council]";
|
|
519
519
|
readonly args: "<pr-url|owner/repo#N|N> [--council]";
|
|
520
|
-
readonly details: "Launches a structured PR review: reconstructs PR intent via obligation extraction cascade, launches all 6 fixed base explorer lanes through dispatch_lanes_async while the architect keeps doing non-dependent work, polls collect_lane_results incrementally, runs
|
|
520
|
+
readonly details: "Launches a structured PR review: reconstructs PR intent via obligation extraction cascade, launches all 6 fixed base explorer lanes through dispatch_lanes_async while the architect keeps doing non-dependent work, polls collect_lane_results incrementally, runs all 11 mandatory repository-agnostic micro-lanes without applicability waivers, validates findings through independent reviewer confirmation, applies critic challenge to HIGH/CRITICAL findings, then synthesizes only after coverage is closed. Failed obligations retry through the same structured async mode and exact PR head; blocking or direct-Task dispatch is not provenance-equivalent, so unclosed coverage leaves the review BLOCKED rather than degraded. --council variant fires adversarial multi-model review. Supports full GitHub URL, owner/repo#N shorthand, or bare PR number (resolves against origin remote).";
|
|
521
521
|
readonly category: "agent";
|
|
522
522
|
readonly toolPolicy: "none";
|
|
523
523
|
};
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { resolveCommitCountSince, resolveCurrentGitHead, resolveCurrentUpstreamPushTarget, resolveCurrentUpstreamRemoteRef, resolveExactRemoteBranchHead, resolveIsExactSingleChildCommit, resolveIsWorkingTreeClean, resolvePrWorkflowRevisionDigest, resolveRemoteRefsContainingHead } from '../background/workspace-snapshot.js';
|
|
2
|
+
export declare const PR_REVIEW_BASE_DIMENSION_IDS: readonly ["intent-architecture", "correctness-state", "tests-falsifiability", "security-trust", "reliability-performance", "compatibility-delivery"];
|
|
3
|
+
export declare const PR_REVIEW_REQUIRED_MICRO_LANE_IDS: readonly ["auth-identity-secrets", "untrusted-input-boundaries", "subprocess-platform", "concurrency-state", "dependencies-build-release", "api-schema-migrations", "test-infrastructure", "ui-accessibility-i18n", "privacy-observability", "generated-provenance", "unclassified-risk"];
|
|
4
|
+
export type PrReviewBaseDimensionId = (typeof PR_REVIEW_BASE_DIMENSION_IDS)[number];
|
|
5
|
+
export type PrWorkflowMode = 'PR_REVIEW' | 'PR_FEEDBACK';
|
|
6
|
+
export interface PrWorkflowLaneSpec {
|
|
7
|
+
laneId?: string;
|
|
8
|
+
workflowLane?: string;
|
|
9
|
+
reviewItemIds?: string[];
|
|
10
|
+
}
|
|
11
|
+
export interface PrFeedbackLaneOwnership {
|
|
12
|
+
laneId: string;
|
|
13
|
+
ownedItemIds: string[];
|
|
14
|
+
}
|
|
15
|
+
interface PrReviewBaseDispatchRecord {
|
|
16
|
+
batchId: string;
|
|
17
|
+
lanes: Array<{
|
|
18
|
+
laneId: string;
|
|
19
|
+
workflowLane: PrReviewBaseDimensionId;
|
|
20
|
+
}>;
|
|
21
|
+
validatedAt: string;
|
|
22
|
+
}
|
|
23
|
+
interface PrFeedbackVerificationRecord {
|
|
24
|
+
batchId: string;
|
|
25
|
+
ownership: PrFeedbackLaneOwnership[];
|
|
26
|
+
validatedAt: string;
|
|
27
|
+
}
|
|
28
|
+
export type PrFeedbackGatePhase = 'stage-b-reviewer' | 'stage-b-test' | 'closeout-reviewer' | 'closeout-critic';
|
|
29
|
+
export type PrFeedbackStageACategory = 'build' | 'typecheck' | 'lint' | 'diff-check' | 'reproduction';
|
|
30
|
+
export interface PrFeedbackStageACheckReceipt {
|
|
31
|
+
category: PrFeedbackStageACategory;
|
|
32
|
+
workingDirectory?: string;
|
|
33
|
+
obligationId?: string;
|
|
34
|
+
validatorContract?: {
|
|
35
|
+
path: string;
|
|
36
|
+
id: string;
|
|
37
|
+
};
|
|
38
|
+
command: string[];
|
|
39
|
+
targets?: string[];
|
|
40
|
+
feedbackTargets?: Array<{
|
|
41
|
+
feedbackItemId: string;
|
|
42
|
+
target: string;
|
|
43
|
+
expectedBehavior: string;
|
|
44
|
+
}>;
|
|
45
|
+
durationMs: number;
|
|
46
|
+
}
|
|
47
|
+
interface PrFeedbackStageARecord {
|
|
48
|
+
revisionDigest: string;
|
|
49
|
+
checks: PrFeedbackStageACheckReceipt[];
|
|
50
|
+
feedbackItemIds?: string[];
|
|
51
|
+
applicableCategories?: Array<'build' | 'typecheck' | 'lint'>;
|
|
52
|
+
applicableObligations?: Array<{
|
|
53
|
+
id: string;
|
|
54
|
+
category: 'build' | 'typecheck' | 'lint';
|
|
55
|
+
workingDirectory: string;
|
|
56
|
+
source: string;
|
|
57
|
+
validatorContract?: {
|
|
58
|
+
path: string;
|
|
59
|
+
id: string;
|
|
60
|
+
};
|
|
61
|
+
}>;
|
|
62
|
+
validatedAt: string;
|
|
63
|
+
}
|
|
64
|
+
interface PrFeedbackGateBatchRecord {
|
|
65
|
+
batchId: string;
|
|
66
|
+
phase: PrFeedbackGatePhase;
|
|
67
|
+
laneId: string;
|
|
68
|
+
itemIds: string[];
|
|
69
|
+
revisionDigest: string;
|
|
70
|
+
validatedAt: string;
|
|
71
|
+
}
|
|
72
|
+
interface PrFeedbackReadyToPublishRecord {
|
|
73
|
+
revisionDigest: string;
|
|
74
|
+
localHead: string;
|
|
75
|
+
remoteName: string;
|
|
76
|
+
remoteBranchRef: string;
|
|
77
|
+
remoteRef: string;
|
|
78
|
+
validatedAt: string;
|
|
79
|
+
}
|
|
80
|
+
export type PrWorkflowCompletionStatus = 'completed' | 'ready-to-publish';
|
|
81
|
+
export type PrReviewValidationPhase = 'council' | 'reviewer' | 'critic';
|
|
82
|
+
interface PrReviewValidationBatchRecord {
|
|
83
|
+
batchId: string;
|
|
84
|
+
phase: PrReviewValidationPhase;
|
|
85
|
+
lanes: Array<{
|
|
86
|
+
laneId: string;
|
|
87
|
+
workflowLane: string;
|
|
88
|
+
reviewItemIds?: string[];
|
|
89
|
+
}>;
|
|
90
|
+
validatedAt: string;
|
|
91
|
+
}
|
|
92
|
+
export interface PrWorkflowGateState {
|
|
93
|
+
schemaVersion: 1;
|
|
94
|
+
/** Monotonic durable revision used to reject stale same-session transitions. */
|
|
95
|
+
revision: number;
|
|
96
|
+
sessionID: string;
|
|
97
|
+
mode: PrWorkflowMode;
|
|
98
|
+
activatedAt: string;
|
|
99
|
+
updatedAt: string;
|
|
100
|
+
prHeadSha?: string;
|
|
101
|
+
prReviewBaseRef?: string;
|
|
102
|
+
prReviewBaseSha?: string;
|
|
103
|
+
prReviewBaseDispatches?: PrReviewBaseDispatchRecord[];
|
|
104
|
+
/** @deprecated Compatibility projection of the most recent base dispatch. */
|
|
105
|
+
prReviewBaseDispatch?: PrReviewBaseDispatchRecord;
|
|
106
|
+
prReviewTriggerEvalPath?: string;
|
|
107
|
+
prReviewValidationBatches?: PrReviewValidationBatchRecord[];
|
|
108
|
+
prFeedbackInventory?: string[];
|
|
109
|
+
prFeedbackVerifications?: PrFeedbackVerificationRecord[];
|
|
110
|
+
/** @deprecated Compatibility projection of the most recent verification dispatch. */
|
|
111
|
+
prFeedbackVerification?: PrFeedbackVerificationRecord;
|
|
112
|
+
prFeedbackStageA?: PrFeedbackStageARecord;
|
|
113
|
+
prFeedbackGateBatches?: PrFeedbackGateBatchRecord[];
|
|
114
|
+
prFeedbackReadyToPublish?: PrFeedbackReadyToPublishRecord;
|
|
115
|
+
}
|
|
116
|
+
export declare function activatePrWorkflow(directory: string, sessionID: string, mode: PrWorkflowMode, options?: {
|
|
117
|
+
prHeadSha?: string;
|
|
118
|
+
}): Promise<PrWorkflowGateState>;
|
|
119
|
+
export declare function readPrWorkflowGateState(directory: string, sessionID: string): Promise<PrWorkflowGateState | null>;
|
|
120
|
+
export declare function clearPrWorkflowGateState(directory: string, sessionID: string, expectedRevision?: number): Promise<void>;
|
|
121
|
+
/** Bind an active PR workflow to one immutable PR head. */
|
|
122
|
+
export declare function bindPrWorkflowHead(directory: string, sessionID: string, prHeadSha: string): Promise<PrWorkflowGateState>;
|
|
123
|
+
/** Bind an active PR_REVIEW workflow to one immutable merge-base scope. */
|
|
124
|
+
export declare function bindPrReviewBase(directory: string, sessionID: string, options: {
|
|
125
|
+
prHeadSha: string;
|
|
126
|
+
baseRef: string;
|
|
127
|
+
baseSha: string;
|
|
128
|
+
}): Promise<PrWorkflowGateState>;
|
|
129
|
+
/** Prove that caller-provided PR identity equals the actual checked-out commit. */
|
|
130
|
+
export declare function assertCurrentCheckoutHead(directory: string, expectedHead: string): string;
|
|
131
|
+
/** Prove that every PR-review lane reads the immutable checked-out PR tree. */
|
|
132
|
+
export declare function assertPrReviewCleanCheckout(directory: string): void;
|
|
133
|
+
export declare function enforcePrWorkflowDispatchLanesAsync(directory: string, sessionID: string, toolName: string): Promise<PrWorkflowGateState | null>;
|
|
134
|
+
export declare function enforcePrReviewBaseDimensions(directory: string, sessionID: string, lanes: readonly PrWorkflowLaneSpec[], options: {
|
|
135
|
+
batchId: string;
|
|
136
|
+
prHeadSha: string;
|
|
137
|
+
}): Promise<PrWorkflowGateState>;
|
|
138
|
+
/** Validate durable exact-six PR review evidence across all base and retry batches. */
|
|
139
|
+
export declare function assertPrReviewBaseCoverageSettled(directory: string, sessionID: string): Promise<PrWorkflowGateState>;
|
|
140
|
+
/** Persist a council/reviewer/critic validation batch before launch. */
|
|
141
|
+
export declare function recordPrReviewValidationBatch(directory: string, sessionID: string, phase: PrReviewValidationPhase, lanes: readonly PrWorkflowLaneSpec[], options: {
|
|
142
|
+
batchId: string;
|
|
143
|
+
prHeadSha: string;
|
|
144
|
+
}): Promise<PrWorkflowGateState>;
|
|
145
|
+
/** Validate that every declared council/reviewer/critic obligation has a successful retry. */
|
|
146
|
+
export declare function assertPrReviewValidationSettled(directory: string, sessionID: string, phase?: PrReviewValidationPhase): Promise<PrWorkflowGateState>;
|
|
147
|
+
export declare function declarePrFeedbackInventory(directory: string, sessionID: string, inventoryIds: readonly string[], options: {
|
|
148
|
+
prHeadSha: string;
|
|
149
|
+
}): Promise<PrWorkflowGateState>;
|
|
150
|
+
export declare function enforcePrFeedbackVerificationOwnership(directory: string, sessionID: string, ownership: readonly PrFeedbackLaneOwnership[], options: {
|
|
151
|
+
batchId: string;
|
|
152
|
+
prHeadSha: string;
|
|
153
|
+
}): Promise<PrWorkflowGateState>;
|
|
154
|
+
/** Validate cumulative exact inventory ownership and settled verification artifacts. */
|
|
155
|
+
export declare function assertPrFeedbackVerificationSettled(directory: string, sessionID: string): Promise<PrWorkflowGateState>;
|
|
156
|
+
/** Persist an actually executed Stage A receipt and invalidate later approvals. */
|
|
157
|
+
export declare function recordPrFeedbackStageA(directory: string, sessionID: string, revisionDigest: string, checks: readonly PrFeedbackStageACheckReceipt[], options?: {
|
|
158
|
+
applicableCategories?: ReadonlyArray<'build' | 'typecheck' | 'lint'>;
|
|
159
|
+
applicableObligations?: ReadonlyArray<{
|
|
160
|
+
id: string;
|
|
161
|
+
category: 'build' | 'typecheck' | 'lint';
|
|
162
|
+
workingDirectory: string;
|
|
163
|
+
source: string;
|
|
164
|
+
validatorContract?: {
|
|
165
|
+
path: string;
|
|
166
|
+
id: string;
|
|
167
|
+
};
|
|
168
|
+
}>;
|
|
169
|
+
}): Promise<PrWorkflowGateState>;
|
|
170
|
+
/** Record one ordered, single-lane feedback validation phase before launch. */
|
|
171
|
+
export declare function recordPrFeedbackGateBatch(directory: string, sessionID: string, phase: PrFeedbackGatePhase, lane: PrFeedbackLaneOwnership, options: {
|
|
172
|
+
batchId: string;
|
|
173
|
+
prHeadSha: string;
|
|
174
|
+
revisionDigest: string;
|
|
175
|
+
}): Promise<PrWorkflowGateState>;
|
|
176
|
+
/** Require the latest receipt for a feedback gate phase to be positive and fresh. */
|
|
177
|
+
export declare function assertPrFeedbackGatePhaseSettled(directory: string, sessionID: string, phase: PrFeedbackGatePhase): Promise<PrWorkflowGateState>;
|
|
178
|
+
/** Require every ordered feedback gate on one unchanged revision. */
|
|
179
|
+
export declare function assertPrFeedbackReadyToPublish(directory: string, sessionID: string): Promise<PrWorkflowGateState>;
|
|
180
|
+
export declare function markPrReviewTriggerEvaluationComplete(directory: string, sessionID: string, artifactPath: string): Promise<PrWorkflowGateState>;
|
|
181
|
+
export declare function enforcePrWorkflowToolBefore(directory: string, sessionID: string, toolName: string, args: Record<string, unknown> | undefined, generatedAgentNames?: readonly string[]): Promise<void>;
|
|
182
|
+
/** Validate the terminal PR workflow contract before removing its durable gate. */
|
|
183
|
+
export declare function completePrWorkflow(directory: string, sessionID: string, expectedMode: PrWorkflowMode, prHeadSha: string): Promise<PrWorkflowCompletionStatus>;
|
|
184
|
+
export declare const _test_exports: {
|
|
185
|
+
workflowGateStateRelativePath: typeof workflowGateStateRelativePath;
|
|
186
|
+
workflowGateStateLockRelativePath: typeof workflowGateStateLockRelativePath;
|
|
187
|
+
resetTrackedStateCache: () => void;
|
|
188
|
+
beforeTerminalClear: (() => Promise<void>) | undefined;
|
|
189
|
+
resolveCurrentGitHead: typeof resolveCurrentGitHead;
|
|
190
|
+
resolveCurrentUpstreamPushTarget: typeof resolveCurrentUpstreamPushTarget;
|
|
191
|
+
resolveCurrentUpstreamRemoteRef: typeof resolveCurrentUpstreamRemoteRef;
|
|
192
|
+
resolveExactRemoteBranchHead: typeof resolveExactRemoteBranchHead;
|
|
193
|
+
resolveCommitCountSince: typeof resolveCommitCountSince;
|
|
194
|
+
resolveIsWorkingTreeClean: typeof resolveIsWorkingTreeClean;
|
|
195
|
+
resolveIsExactSingleChildCommit: typeof resolveIsExactSingleChildCommit;
|
|
196
|
+
resolvePrWorkflowRevisionDigest: typeof resolvePrWorkflowRevisionDigest;
|
|
197
|
+
resolveRemoteRefsContainingHead: typeof resolveRemoteRefsContainingHead;
|
|
198
|
+
parseCriticVerdict: typeof parseCriticVerdict;
|
|
199
|
+
isProcessAlive: typeof isProcessAlive;
|
|
200
|
+
nowMs: () => number;
|
|
201
|
+
};
|
|
202
|
+
/** Require at least one real discovery row or a lane-bound CLEAN attestation. */
|
|
203
|
+
export declare function prReviewDiscoveryArtifactCoversLane(text: string, expectedWorkflowLane: string): boolean;
|
|
204
|
+
declare function parseCriticVerdict(text: string, itemId: string, reviewerSeverity?: string): {
|
|
205
|
+
status: string;
|
|
206
|
+
severity: string;
|
|
207
|
+
} | null;
|
|
208
|
+
declare function isProcessAlive(pid: number): boolean;
|
|
209
|
+
declare function workflowGateStateLockRelativePath(sessionID: string): string;
|
|
210
|
+
declare function workflowGateStateRelativePath(sessionID: string): string;
|
|
211
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
interface PrWorkflowResponseGateClient {
|
|
2
|
+
session?: unknown;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Prevent an architect from bypassing PR obligations by simply emitting text.
|
|
6
|
+
* The text-complete hook replaces every architect-session text part while the
|
|
7
|
+
* durable gate exists; session.idle then mechanically resumes that session.
|
|
8
|
+
*/
|
|
9
|
+
export declare function createPrWorkflowResponseGate(options: {
|
|
10
|
+
directory: string;
|
|
11
|
+
client?: PrWorkflowResponseGateClient;
|
|
12
|
+
wakeTimeoutMs?: number;
|
|
13
|
+
}): {
|
|
14
|
+
event: (input: {
|
|
15
|
+
event: unknown;
|
|
16
|
+
}) => Promise<void>;
|
|
17
|
+
textComplete: (input: {
|
|
18
|
+
sessionID?: string;
|
|
19
|
+
}, output: {
|
|
20
|
+
text: string;
|
|
21
|
+
}) => Promise<void>;
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface ResolverClient {
|
|
2
|
+
session?: unknown;
|
|
3
|
+
}
|
|
4
|
+
/** Resolve a child tool call back to the nearest ancestor owning a durable PR gate. */
|
|
5
|
+
export declare function createPrWorkflowSessionResolver(options: {
|
|
6
|
+
directory: string;
|
|
7
|
+
client?: ResolverClient;
|
|
8
|
+
}): {
|
|
9
|
+
observeEvent: (input: {
|
|
10
|
+
event: unknown;
|
|
11
|
+
}) => void;
|
|
12
|
+
resolve: (sessionID: string) => Promise<string>;
|
|
13
|
+
};
|
|
14
|
+
export {};
|