opencode-swarm 7.126.0 → 7.126.2
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/swarm-pr-feedback/SKILL.md +24 -16
- package/.opencode/skills/swarm-pr-review/SKILL.md +18 -14
- package/dist/cli/{config-doctor-akxywx0c.js → config-doctor-mfx27331.js} +2 -2
- package/dist/cli/{core-v1kp7anb.js → core-wg3re04e.js} +1 -1
- package/dist/cli/{curation-policy-dptr1rfe.js → curation-policy-n944aq62.js} +2 -2
- package/dist/cli/{curator-llm-factory-r648jn8e.js → curator-llm-factory-0rf29gfq.js} +14 -14
- package/dist/cli/{curator-23hynz78.js → curator-qfh9xty4.js} +14 -14
- package/dist/cli/{guardrail-explain-6atsd4vr.js → guardrail-explain-jsrjqps1.js} +15 -15
- package/dist/cli/{guardrail-log-222xyxfp.js → guardrail-log-61gya05m.js} +3 -3
- package/dist/cli/{hive-promoter-bnkhzd46.js → hive-promoter-ktt17fyf.js} +14 -14
- package/dist/cli/{index-jt7hnr7q.js → index-3xd9a2g7.js} +1 -1
- package/dist/cli/{index-gnvg72y1.js → index-4ff0x4cg.js} +79 -1
- package/dist/cli/{index-68fpa7ff.js → index-5nq8dp63.js} +16 -16
- package/dist/cli/{index-yfzn5r9s.js → index-7bxw3v5w.js} +3 -3
- package/dist/cli/{index-kwnsatzq.js → index-88dt7c9z.js} +2 -2
- package/dist/cli/{index-qzkcy22e.js → index-bf76q8q7.js} +1 -1
- package/dist/cli/{index-16z6txq3.js → index-c48dvb6j.js} +2 -2
- package/dist/cli/{index-0ff5cm9j.js → index-d88y17ht.js} +2222 -2197
- package/dist/cli/{index-bcgfhxzv.js → index-f97dm6tz.js} +5 -5
- package/dist/cli/{index-a1c9az5e.js → index-gf9cxvp0.js} +109 -151
- package/dist/cli/{index-mgrsx5hn.js → index-gwss5btk.js} +1 -1
- package/dist/cli/{index-dezgmvtw.js → index-gxw20m1d.js} +1 -1
- package/dist/cli/{index-2bnfwmk3.js → index-nqp13m5a.js} +1 -1
- package/dist/cli/{index-2yd75hms.js → index-pb8ag9vg.js} +4 -4
- package/dist/cli/{index-cdx337js.js → index-pf3xae4s.js} +1 -1
- package/dist/cli/{index-r1gdkn2d.js → index-vcqwhe9d.js} +117 -21
- package/dist/cli/{index-g4ef4v3m.js → index-w9cb5zwh.js} +1 -1
- package/dist/cli/{index-y4ry07h8.js → index-z8ftpav0.js} +2 -2
- package/dist/cli/index.js +14 -14
- package/dist/cli/{knowledge-escalator-4hc8w7sd.js → knowledge-escalator-nna0zec3.js} +3 -3
- package/dist/cli/{knowledge-events-kyqjv1f8.js → knowledge-events-7k82xk36.js} +1 -1
- package/dist/cli/{knowledge-store-06k0p1gs.js → knowledge-store-efvtng9t.js} +1 -1
- package/dist/cli/{knowledge-validator-42xjmcmh.js → knowledge-validator-jh93eagj.js} +4 -4
- package/dist/cli/{scan-cursor-gjcvpyta.js → scan-cursor-cydz8d9q.js} +2 -2
- package/dist/cli/{schema-69z8w1ka.js → schema-fa033pqw.js} +1 -1
- package/dist/cli/{scope-persistence-habn4q8a.js → scope-persistence-dm5bab50.js} +3 -1
- package/dist/cli/{skill-generator-t6j93mwt.js → skill-generator-8v463kj7.js} +5 -5
- package/dist/config/index.d.ts +1 -0
- package/dist/config/loader.d.ts +51 -36
- package/dist/hooks/delegation-gate.d.ts +14 -2
- package/dist/hooks/pr-workflow-gate.d.ts +57 -0
- package/dist/hooks/scope-guard.d.ts +6 -1
- package/dist/index.js +55 -49
- package/dist/scope/scope-binding.d.ts +21 -2
- package/dist/scope/scope-persistence.d.ts +6 -0
- package/dist/tools/index.d.ts +3 -0
- package/dist/tools/manifest.d.ts +3 -0
- package/dist/tools/prepare-pr-feedback-scope.d.ts +5 -0
- package/dist/tools/prepare-pr-workflow-checkout.d.ts +25 -0
- package/dist/tools/tool-metadata.d.ts +102 -0
- package/dist/tools/write-pr-review-artifact.d.ts +5 -0
- package/package.json +3 -3
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as fsp from 'node:fs/promises';
|
|
1
2
|
import { resolveCommitCountSince, resolveCurrentGitHead, resolveCurrentUpstreamPushTarget, resolveCurrentUpstreamRemoteRef, resolveExactRemoteBranchHead, resolveIsExactSingleChildCommit, resolveIsWorkingTreeClean, resolvePrWorkflowRevisionDigest, resolveRemoteRefsContainingHead } from '../background/workspace-snapshot.js';
|
|
2
3
|
export declare const PR_REVIEW_BASE_DIMENSION_IDS: readonly ["intent-architecture", "correctness-state", "tests-falsifiability", "security-trust", "reliability-performance", "compatibility-delivery"];
|
|
3
4
|
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"];
|
|
@@ -79,6 +80,20 @@ interface PrFeedbackReadyToPublishRecord {
|
|
|
79
80
|
}
|
|
80
81
|
export type PrWorkflowCompletionStatus = 'completed' | 'ready-to-publish';
|
|
81
82
|
export type PrReviewValidationPhase = 'council' | 'reviewer' | 'critic';
|
|
83
|
+
export type PrReviewArtifactBoundary = 'post_explorer' | 'post_reviewer' | 'post_critic';
|
|
84
|
+
type PrReviewArtifactRecord = {
|
|
85
|
+
finding_id: string;
|
|
86
|
+
status: 'PENDING' | 'CONFIRMED' | 'DISPROVED' | 'PRE_EXISTING';
|
|
87
|
+
next_action: 'route_to_reviewer' | 'route_to_critic' | 'report' | 'suppress_with_reason' | 'handoff_to_feedback';
|
|
88
|
+
severity?: 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW';
|
|
89
|
+
};
|
|
90
|
+
interface PrFeedbackScopeDeclarationRecord {
|
|
91
|
+
taskId: string;
|
|
92
|
+
files: string[];
|
|
93
|
+
revisionDigest: string;
|
|
94
|
+
declaredAt: string;
|
|
95
|
+
consumedByCallId?: string;
|
|
96
|
+
}
|
|
82
97
|
interface PrReviewValidationBatchRecord {
|
|
83
98
|
batchId: string;
|
|
84
99
|
phase: PrReviewValidationPhase;
|
|
@@ -105,6 +120,11 @@ export interface PrWorkflowGateState {
|
|
|
105
120
|
prReviewBaseDispatch?: PrReviewBaseDispatchRecord;
|
|
106
121
|
prReviewTriggerEvalPath?: string;
|
|
107
122
|
prReviewValidationBatches?: PrReviewValidationBatchRecord[];
|
|
123
|
+
prReviewArtifactRunId?: string;
|
|
124
|
+
prReviewFindingsPath?: string;
|
|
125
|
+
prReviewArtifactBoundaries?: PrReviewArtifactBoundary[];
|
|
126
|
+
prReviewHandoffPath?: string;
|
|
127
|
+
prReviewHandoffRequired?: boolean;
|
|
108
128
|
prFeedbackInventory?: string[];
|
|
109
129
|
prFeedbackVerifications?: PrFeedbackVerificationRecord[];
|
|
110
130
|
/** @deprecated Compatibility projection of the most recent verification dispatch. */
|
|
@@ -112,11 +132,21 @@ export interface PrWorkflowGateState {
|
|
|
112
132
|
prFeedbackStageA?: PrFeedbackStageARecord;
|
|
113
133
|
prFeedbackGateBatches?: PrFeedbackGateBatchRecord[];
|
|
114
134
|
prFeedbackReadyToPublish?: PrFeedbackReadyToPublishRecord;
|
|
135
|
+
prFeedbackScopes?: PrFeedbackScopeDeclarationRecord[];
|
|
115
136
|
}
|
|
116
137
|
export declare function activatePrWorkflow(directory: string, sessionID: string, mode: PrWorkflowMode, options?: {
|
|
117
138
|
prHeadSha?: string;
|
|
118
139
|
}): Promise<PrWorkflowGateState>;
|
|
119
140
|
export declare function readPrWorkflowGateState(directory: string, sessionID: string): Promise<PrWorkflowGateState | null>;
|
|
141
|
+
/**
|
|
142
|
+
* Serialize a pre-bind checkout-preservation controller with every terminal
|
|
143
|
+
* PR-workflow transition for the raw parent session. The caller's action may
|
|
144
|
+
* perform the fixed Git preservation command while holding this lock; abort,
|
|
145
|
+
* bind, and a same-session reactivation cannot clear or replace the gate until
|
|
146
|
+
* it settles. The state passed to the action is schema-validated durable state,
|
|
147
|
+
* never a caller-supplied projection.
|
|
148
|
+
*/
|
|
149
|
+
export declare function withPrWorkflowCheckoutPreparationLock<T>(directory: string, sessionID: string, action: (state: PrWorkflowGateState) => Promise<T>): Promise<T>;
|
|
120
150
|
export declare function clearPrWorkflowGateState(directory: string, sessionID: string, expectedRevision?: number): Promise<void>;
|
|
121
151
|
/**
|
|
122
152
|
* Abort an active PR workflow gate without reaching terminal completion.
|
|
@@ -210,6 +240,25 @@ export declare function assertPrFeedbackGatePhaseSettled(directory: string, sess
|
|
|
210
240
|
/** Require every ordered feedback gate on one unchanged revision. */
|
|
211
241
|
export declare function assertPrFeedbackReadyToPublish(directory: string, sessionID: string): Promise<PrWorkflowGateState>;
|
|
212
242
|
export declare function markPrReviewTriggerEvaluationComplete(directory: string, sessionID: string, artifactPath: string): Promise<PrWorkflowGateState>;
|
|
243
|
+
export declare function assertPrReviewArtifactBoundary(directory: string, sessionID: string, runId: string, boundary: PrReviewArtifactBoundary, findingIds: string[]): Promise<PrWorkflowGateState>;
|
|
244
|
+
/**
|
|
245
|
+
* Artifact records are a projection of lane receipts, never a caller-controlled
|
|
246
|
+
* replacement for them. Keep their workflow status/action aligned with the
|
|
247
|
+
* reviewer and critic rows that the gate already authenticated.
|
|
248
|
+
*/
|
|
249
|
+
export declare function assertPrReviewArtifactRecordsMatchAuthoritativeVerdicts(directory: string, sessionID: string, boundary: PrReviewArtifactBoundary, records: readonly PrReviewArtifactRecord[]): Promise<void>;
|
|
250
|
+
export declare function markPrReviewArtifactBoundary(directory: string, sessionID: string, runId: string, boundary: PrReviewArtifactBoundary, artifactPath: string, findingIds: string[], handoffRequired: boolean): Promise<PrWorkflowGateState>;
|
|
251
|
+
export declare function markPrReviewHandoffComplete(directory: string, sessionID: string, runId: string, artifactPath: string): Promise<PrWorkflowGateState>;
|
|
252
|
+
export declare function declarePrFeedbackScope(directory: string, sessionID: string, taskId: string, files: string[]): Promise<PrWorkflowGateState>;
|
|
253
|
+
export declare function resolvePrFeedbackScopeDeclaration(directory: string, sessionID: string, taskId: string): Promise<PrFeedbackScopeDeclarationRecord | null>;
|
|
254
|
+
export declare function consumePrFeedbackScopeDeclaration(directory: string, sessionID: string, taskId: string, callID: string): Promise<PrFeedbackScopeDeclarationRecord | null>;
|
|
255
|
+
export declare function validatePrFeedbackScopeBinding(directory: string, binding: {
|
|
256
|
+
taskId: string;
|
|
257
|
+
files: string[];
|
|
258
|
+
dispatchCallId?: string;
|
|
259
|
+
workflowSessionId?: string;
|
|
260
|
+
workflowRevisionDigest?: string;
|
|
261
|
+
}): Promise<boolean>;
|
|
213
262
|
export declare function enforcePrWorkflowToolBefore(directory: string, sessionID: string, toolName: string, args: Record<string, unknown> | undefined, generatedAgentNames?: readonly string[]): Promise<void>;
|
|
214
263
|
/** Validate the terminal PR workflow contract before removing its durable gate. */
|
|
215
264
|
export declare function completePrWorkflow(directory: string, sessionID: string, expectedMode: PrWorkflowMode, prHeadSha: string): Promise<PrWorkflowCompletionStatus>;
|
|
@@ -229,6 +278,7 @@ export declare const _test_exports: {
|
|
|
229
278
|
resolveRemoteRefsContainingHead: typeof resolveRemoteRefsContainingHead;
|
|
230
279
|
parseCriticVerdict: typeof parseCriticVerdict;
|
|
231
280
|
isProcessAlive: typeof isProcessAlive;
|
|
281
|
+
rename: typeof fsp.rename;
|
|
232
282
|
nowMs: () => number;
|
|
233
283
|
};
|
|
234
284
|
/** Require at least one real discovery row or a lane-bound CLEAN attestation. */
|
|
@@ -240,4 +290,11 @@ declare function parseCriticVerdict(text: string, itemId: string, reviewerSeveri
|
|
|
240
290
|
declare function isProcessAlive(pid: number): boolean;
|
|
241
291
|
declare function workflowGateStateLockRelativePath(sessionID: string): string;
|
|
242
292
|
declare function workflowGateStateRelativePath(sessionID: string): string;
|
|
293
|
+
export declare function prWorkflowSessionFileStem(sessionID: string): string;
|
|
294
|
+
/**
|
|
295
|
+
* Write a PR-workflow artifact with the gate's Windows-safe atomic persistence
|
|
296
|
+
* contract. Checkout-preparation receipts must survive the same transient
|
|
297
|
+
* rename contention as canonical gate state.
|
|
298
|
+
*/
|
|
299
|
+
export declare function writePrWorkflowAtomicJson(filePath: string, value: unknown): Promise<void>;
|
|
243
300
|
export {};
|
|
@@ -8,8 +8,10 @@
|
|
|
8
8
|
* Fires BEFORE write/edit tools execute. When a coder attempts to modify a file
|
|
9
9
|
* outside its Task-correlated scope, blocks the call and injects an advisory.
|
|
10
10
|
*/
|
|
11
|
-
import {
|
|
11
|
+
import { getAuthorizedPrFeedbackScopeBinding } from '../scope/scope-binding';
|
|
12
|
+
import { resolveAuthorizedPrFeedbackScopeBindingFromDisk, resolveAuthorizedScopeBinding, resolveAuthorizedScopeBindingForSession } from '../scope/scope-persistence';
|
|
12
13
|
import { type AgentSessionState } from '../state';
|
|
14
|
+
import { validatePrFeedbackScopeBinding } from './pr-workflow-gate';
|
|
13
15
|
import { resolveWriteTargets } from './write-target-resolver';
|
|
14
16
|
/**
|
|
15
17
|
* Configuration for scope guard behavior.
|
|
@@ -69,6 +71,9 @@ export declare const _internals: {
|
|
|
69
71
|
resolveWriteTargets: typeof resolveWriteTargets;
|
|
70
72
|
resolveAuthorizedScopeBinding: typeof resolveAuthorizedScopeBinding;
|
|
71
73
|
resolveAuthorizedScopeBindingForSession: typeof resolveAuthorizedScopeBindingForSession;
|
|
74
|
+
getAuthorizedPrFeedbackScopeBinding: typeof getAuthorizedPrFeedbackScopeBinding;
|
|
75
|
+
resolveAuthorizedPrFeedbackScopeBindingFromDisk: typeof resolveAuthorizedPrFeedbackScopeBindingFromDisk;
|
|
76
|
+
validatePrFeedbackScopeBinding: typeof validatePrFeedbackScopeBinding;
|
|
72
77
|
resolveTaskId: (session: AgentSessionState | undefined) => string | null;
|
|
73
78
|
};
|
|
74
79
|
export {};
|