opencode-swarm 7.145.2 → 7.146.1
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-review/SKILL.md +67 -33
- package/dist/cli/{config-doctor-j1r33f4q.js → config-doctor-sd7x5bts.js} +2 -2
- package/dist/cli/{core-c2zrd384.js → core-17febkvw.js} +1 -1
- package/dist/cli/{curation-policy-xv0j8zyt.js → curation-policy-x19e8bqc.js} +4 -4
- package/dist/cli/{curator-llm-factory-sat3mn5n.js → curator-llm-factory-zxbgkjm5.js} +23 -23
- package/dist/cli/{curator-gk2kmrk1.js → curator-vghf320v.js} +23 -23
- package/dist/cli/{evidence-summary-service-0mhx0t0v.js → evidence-summary-service-xma4aagr.js} +9 -9
- package/dist/cli/{gate-evidence-a5adh55x.js → gate-evidence-2bznvee8.js} +4 -4
- package/dist/cli/{guardrail-explain-r50fery8.js → guardrail-explain-ppzg0xz9.js} +24 -24
- package/dist/cli/{guardrail-log-p69eys6d.js → guardrail-log-xexwz93q.js} +3 -3
- package/dist/cli/{hive-promoter-ay8a7sct.js → hive-promoter-j3vw2hj4.js} +23 -23
- package/dist/cli/{index-czde45km.js → index-19f0zycs.js} +2 -2
- package/dist/cli/{index-2vefr1f8.js → index-1c9mfnj0.js} +1 -1
- package/dist/cli/{index-917z76qr.js → index-4qvsh3m5.js} +8 -5
- package/dist/cli/{index-cb2qtetk.js → index-7x00nx8m.js} +1765 -1095
- package/dist/cli/{index-np4ytvvv.js → index-9qbr27bw.js} +2 -2
- package/dist/cli/{index-7y5akvc9.js → index-bd4g9fvb.js} +1 -1
- package/dist/cli/{index-jpppcckq.js → index-cw96tpy6.js} +4 -4
- package/dist/cli/{index-4p3qfb05.js → index-e1hjd15c.js} +1 -1
- package/dist/cli/{index-9080b3de.js → index-e3caa7ng.js} +25 -25
- package/dist/cli/{index-ncfjxz9n.js → index-fksfxhmx.js} +5 -5
- package/dist/cli/{index-673axbjx.js → index-g8qbjqqz.js} +1 -1
- package/dist/cli/{index-gpnv14kq.js → index-h8qed3pr.js} +41 -6
- package/dist/cli/{index-cxn95n7q.js → index-k46kg4t6.js} +5 -5
- package/dist/cli/{index-612rr70a.js → index-n7trn9wz.js} +5 -1
- package/dist/cli/{index-j20fzn0w.js → index-qbpxrw95.js} +1 -1
- package/dist/cli/{index-n55a28zr.js → index-t7sfrv3v.js} +3 -3
- package/dist/cli/{index-9gt8g2qj.js → index-twwb61bh.js} +3 -3
- package/dist/cli/{index-jgb7mq2y.js → index-txh3h83v.js} +4 -4
- package/dist/cli/{index-rk80jhef.js → index-tzyvmkd1.js} +1 -1
- package/dist/cli/{index-b9kxxd6k.js → index-va8a2zrq.js} +2 -2
- package/dist/cli/{index-6wf75rcm.js → index-vacrzesw.js} +6 -6
- package/dist/cli/{index-x8pm918t.js → index-w0cj7zyd.js} +1 -1
- package/dist/cli/{index-0a0asz2s.js → index-w5r84rd1.js} +1 -1
- package/dist/cli/{index-1g87esfp.js → index-xz0ccakc.js} +1 -1
- package/dist/cli/{index-kggqpefz.js → index-ycgm9pzg.js} +1 -1
- package/dist/cli/{index-nsr5b69r.js → index-zkaz3fhw.js} +1 -1
- package/dist/cli/{index-vav705md.js → index-zwn2e2pe.js} +3 -3
- package/dist/cli/index.js +23 -23
- package/dist/cli/{knowledge-escalator-22apj3dj.js → knowledge-escalator-wj85ppdt.js} +9 -9
- package/dist/cli/{knowledge-events-bx8xba9z.js → knowledge-events-4y9kk2xe.js} +7 -7
- package/dist/cli/{knowledge-link-82ew2yc4.js → knowledge-link-8pr02pza.js} +3 -3
- package/dist/cli/{knowledge-store-nc71kfsg.js → knowledge-store-kc8dwc14.js} +4 -4
- package/dist/cli/{knowledge-validator-g8ne80v6.js → knowledge-validator-584ga9fb.js} +6 -6
- package/dist/cli/{runner-pqsf809k.js → runner-e7z9cf5y.js} +4 -4
- package/dist/cli/{scan-cursor-6ksgv514.js → scan-cursor-rhjym1pn.js} +5 -5
- package/dist/cli/{schema-mpcm7nje.js → schema-yb3pvhcs.js} +5 -1
- package/dist/cli/{scope-persistence-mj1w3hqw.js → scope-persistence-bxwjk9rc.js} +5 -5
- package/dist/cli/{skill-generator-gsa6qwwt.js → skill-generator-3w8w7htr.js} +11 -11
- package/dist/cli/{worktree-isolation-ajzyp2gm.js → worktree-isolation-av1rshr3.js} +23 -23
- package/dist/commands/memory.d.ts +8 -0
- package/dist/commands/registry.d.ts +9 -1
- package/dist/config/schema.d.ts +36 -0
- package/dist/hooks/guardrails/index.d.ts +35 -0
- package/dist/hooks/pr-workflow-gate.d.ts +48 -2
- package/dist/hooks/pr-workflow-response-gate.d.ts +24 -0
- package/dist/index.js +431 -383
- package/dist/memory/config.d.ts +20 -0
- package/dist/memory/errors.d.ts +14 -0
- package/dist/memory/gateway.d.ts +32 -0
- package/dist/memory/index.d.ts +3 -2
- package/dist/memory/pii.d.ts +66 -0
- package/dist/memory/prompt-block.d.ts +1 -1
- package/dist/memory/provider.d.ts +15 -0
- package/dist/memory/redaction.d.ts +31 -8
- package/dist/memory/schema.d.ts +18 -0
- package/dist/memory/sentinel.d.ts +12 -0
- package/dist/memory/sqlite-provider.d.ts +93 -0
- package/dist/memory/types.d.ts +9 -0
- package/dist/tools/dispatch-lanes.d.ts +13 -1
- package/dist/workflow/coder-settlement.d.ts +13 -0
- package/dist/workflow/stage-a-repair.d.ts +41 -0
- package/package.json +12 -2
|
@@ -5,6 +5,7 @@ import { type LaneOutputArtifact } from '../background/lane-output-store.js';
|
|
|
5
5
|
import { type BackgroundDelegationRecord, type BackgroundDelegationResult, type BackgroundDelegationWorkflowLaneRecovery, findByBatchId, sweepStaleDelegations } from '../background/pending-delegations.js';
|
|
6
6
|
import { type PrReviewInlineTriggerRow } from '../background/pr-review-trigger-contract.js';
|
|
7
7
|
import { type RevisionDigestResult, resolveCommitCountSince, resolveCommitCountSinceAsync, resolveCurrentGitHead, resolveCurrentGitHeadAsync, resolveCurrentUpstreamPushTarget, resolveCurrentUpstreamPushTargetAsync, resolveCurrentUpstreamRemoteRef, resolveExactRemoteBranchHead, resolveExactRemoteBranchHeadAsync, resolveIsExactSingleChildCommit, resolveIsExactSingleChildCommitAsync, resolveIsWorkingTreeClean, resolveIsWorkingTreeCleanAsync, resolvePrReviewDiffStats, resolvePrReviewDiffStatsAsync, resolvePrWorkflowRevisionDigest, resolvePrWorkflowRevisionDigestDetailed, resolveRemoteRefsContainingHead, resolveRemoteRefsContainingHeadAsync } from '../background/workspace-snapshot.js';
|
|
8
|
+
import { type PrReviewResilienceConfig } from '../config/schema.js';
|
|
8
9
|
import { classifyPrWorkflowGitState, type PrWorkflowGitState } from '../git/pr-workflow-state.js';
|
|
9
10
|
export declare const PR_REVIEW_BASE_DIMENSION_IDS: readonly ["intent-architecture", "correctness-state", "tests-falsifiability", "security-trust", "reliability-performance", "compatibility-delivery"];
|
|
10
11
|
export declare const PR_REVIEW_REQUIRED_MICRO_LANE_IDS: ("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")[];
|
|
@@ -161,6 +162,36 @@ interface PrReviewBaseDispatchRecord {
|
|
|
161
162
|
}>;
|
|
162
163
|
validatedAt: string;
|
|
163
164
|
}
|
|
165
|
+
interface PrReviewResiliencePolicyRecord {
|
|
166
|
+
enabled: boolean;
|
|
167
|
+
canaryProbeMs: number;
|
|
168
|
+
statusProbeTimeoutMs: number;
|
|
169
|
+
correlatedFailureThreshold: number;
|
|
170
|
+
maxRetryAttemptsAfterInitial: number;
|
|
171
|
+
}
|
|
172
|
+
interface PrReviewResilienceAttemptRecord {
|
|
173
|
+
attempt: 0 | 1 | 2;
|
|
174
|
+
targetDimensions: PrReviewBaseDimensionId[];
|
|
175
|
+
canaryBatchId: string;
|
|
176
|
+
canaryLaneId: string;
|
|
177
|
+
canaryWorkflowLane: PrReviewBaseDimensionId;
|
|
178
|
+
admittedAt: string;
|
|
179
|
+
fanoutBatchId?: string;
|
|
180
|
+
}
|
|
181
|
+
interface PrReviewResilienceCircuitRecord {
|
|
182
|
+
signature: string;
|
|
183
|
+
count: number;
|
|
184
|
+
contributors: Array<{
|
|
185
|
+
batchId: string;
|
|
186
|
+
laneId: string;
|
|
187
|
+
}>;
|
|
188
|
+
openedAt: string;
|
|
189
|
+
}
|
|
190
|
+
interface PrReviewResilienceStateRecord {
|
|
191
|
+
policy: PrReviewResiliencePolicyRecord;
|
|
192
|
+
attempts: PrReviewResilienceAttemptRecord[];
|
|
193
|
+
circuit?: PrReviewResilienceCircuitRecord;
|
|
194
|
+
}
|
|
164
195
|
interface PrFeedbackVerificationRecord {
|
|
165
196
|
batchId: string;
|
|
166
197
|
ownership: PrFeedbackLaneOwnership[];
|
|
@@ -299,6 +330,7 @@ export interface PrWorkflowGateState {
|
|
|
299
330
|
prReviewBaseDispatches?: PrReviewBaseDispatchRecord[];
|
|
300
331
|
/** @deprecated Compatibility projection of the most recent base dispatch. */
|
|
301
332
|
prReviewBaseDispatch?: PrReviewBaseDispatchRecord;
|
|
333
|
+
prReviewResilience?: PrReviewResilienceStateRecord;
|
|
302
334
|
/** Canonical ordered semantic ledger frozen by the first micro dispatch. */
|
|
303
335
|
prReviewTriggerLedger?: PrReviewInlineTriggerRow[];
|
|
304
336
|
prReviewTriggerEvalPath?: string;
|
|
@@ -650,11 +682,24 @@ export declare function assertCurrentCheckoutHead(directory: string, expectedHea
|
|
|
650
682
|
/** Prove that every PR-review lane reads the immutable checked-out PR tree. */
|
|
651
683
|
export declare function assertPrReviewCleanCheckout(directory: string, mode?: PrWorkflowMode): Promise<void>;
|
|
652
684
|
export declare function enforcePrWorkflowDispatchLanesAsync(directory: string, sessionID: string, toolName: string): Promise<PrWorkflowGateState | null>;
|
|
653
|
-
export declare
|
|
685
|
+
export declare class PrReviewResilienceCircuitOpenError extends Error {
|
|
686
|
+
readonly code: "PR_REVIEW_RESILIENCE_CIRCUIT_OPEN";
|
|
687
|
+
constructor(message: string);
|
|
688
|
+
}
|
|
689
|
+
export declare class PrReviewResilienceRetryExhaustedError extends Error {
|
|
690
|
+
readonly code: "PR_REVIEW_RESILIENCE_RETRY_EXHAUSTED";
|
|
691
|
+
constructor(message: string);
|
|
692
|
+
}
|
|
693
|
+
interface EnforcePrReviewBaseDimensionsOptions {
|
|
654
694
|
batchId: string;
|
|
655
695
|
prHeadSha: string;
|
|
656
696
|
revisionDigest?: string;
|
|
657
|
-
|
|
697
|
+
prReviewWaveStage?: 'canary' | 'fanout';
|
|
698
|
+
prReviewWaveAttempt?: 0 | 1 | 2;
|
|
699
|
+
prReviewResiliencePolicy?: PrReviewResilienceConfig;
|
|
700
|
+
}
|
|
701
|
+
export declare function enforcePrReviewBaseDimensions(directory: string, sessionID: string, lanes: readonly PrWorkflowLaneSpec[], options: EnforcePrReviewBaseDimensionsOptions): Promise<PrWorkflowGateState>;
|
|
702
|
+
export declare function rollbackPrReviewBaseAdmissionIfUnlaunched(directory: string, sessionID: string, batchId: string): Promise<boolean>;
|
|
658
703
|
declare function minimumConsolidatedLaneCover(sets: ReadonlyArray<readonly string[]>): number;
|
|
659
704
|
/** Validate durable exact-six PR review evidence across all base and retry batches. */
|
|
660
705
|
export declare function assertPrReviewBaseCoverageSettled(directory: string, sessionID: string, gateContext?: PrReviewGateContext): Promise<PrWorkflowGateState>;
|
|
@@ -822,6 +867,7 @@ export declare const _test_exports: {
|
|
|
822
867
|
* that would silently drift if the cap ever moved.
|
|
823
868
|
*/
|
|
824
869
|
MAX_WORKFLOW_BATCHES: number;
|
|
870
|
+
MAX_PR_REVIEW_RESILIENCE_CIRCUIT_CONTRIBUTORS: number;
|
|
825
871
|
/**
|
|
826
872
|
* The three ledger ceilings whose overflow makes the capacity GC abandon a
|
|
827
873
|
* prune and keep every batch. Exposed on the same reasoning as
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { claimPrFeedbackMonitorEvents, readPrFeedbackMonitorQueue } from '../background/pr-feedback-event-queue.js';
|
|
2
|
+
import { observePrWorkflowAutoWakeEvent } from './pr-workflow-auto-wake.js';
|
|
2
3
|
import { type PrReviewDepthTier, readPrWorkflowGateState } from './pr-workflow-gate.js';
|
|
4
|
+
export declare const DEFAULT_BOUNDARY_QUIET_MS = 120000;
|
|
5
|
+
export declare const DEFAULT_BOUNDARY_WATCHDOG_MS = 5000;
|
|
6
|
+
export declare const DEFAULT_STATUS_PROBE_TIMEOUT_MS = 250;
|
|
7
|
+
export declare const MAX_TRACKED_BOUNDARY_TOOL_PARTS = 200;
|
|
3
8
|
export declare const _internals: {
|
|
4
9
|
readPrWorkflowGateState: typeof readPrWorkflowGateState;
|
|
5
10
|
claimPrFeedbackMonitorEvents: typeof claimPrFeedbackMonitorEvents;
|
|
6
11
|
readPrFeedbackMonitorQueue: typeof readPrFeedbackMonitorQueue;
|
|
12
|
+
observePrWorkflowAutoWakeEvent: typeof observePrWorkflowAutoWakeEvent;
|
|
7
13
|
};
|
|
8
14
|
/**
|
|
9
15
|
* Maximum number of consecutive unproductive auto-resumes per gated session
|
|
@@ -85,9 +91,13 @@ export declare const DEFAULT_TOTAL_WAKE_CEILINGS: Record<PrReviewDepthTier, numb
|
|
|
85
91
|
* messageID-less path).
|
|
86
92
|
*/
|
|
87
93
|
export declare const MAX_TRACKED_WAKE_SESSIONS = 200;
|
|
94
|
+
type SessionReadiness = 'idle' | 'busy' | 'retry' | 'unknown';
|
|
88
95
|
interface PrWorkflowResponseGateClient {
|
|
89
96
|
session?: unknown;
|
|
90
97
|
}
|
|
98
|
+
type TimerHandle = ReturnType<typeof setTimeout>;
|
|
99
|
+
type ScheduleTimer = (callback: () => void, delayMs: number) => TimerHandle;
|
|
100
|
+
type ClearScheduledTimer = (timer: TimerHandle) => void;
|
|
91
101
|
interface WakeBudget {
|
|
92
102
|
consecutiveUnproductive: number;
|
|
93
103
|
lastWakeAt: number;
|
|
@@ -142,6 +152,12 @@ export declare function createPrWorkflowResponseGate(options: {
|
|
|
142
152
|
maxConsecutiveUnproductiveWakes?: number;
|
|
143
153
|
wakeCooldownMs?: number;
|
|
144
154
|
bannerCooldownMs?: number;
|
|
155
|
+
boundaryQuietMs?: number;
|
|
156
|
+
boundaryWatchdogMs?: number;
|
|
157
|
+
statusProbeTimeoutMs?: number;
|
|
158
|
+
now?: () => number;
|
|
159
|
+
scheduleTimer?: ScheduleTimer;
|
|
160
|
+
clearScheduledTimer?: ClearScheduledTimer;
|
|
145
161
|
/** Override the per-tier default total-wake ceilings. A single number
|
|
146
162
|
* applies uniformly to all tiers; a partial Record allows per-tier
|
|
147
163
|
* overrides with unspecified tiers falling back to the defaults.
|
|
@@ -166,5 +182,13 @@ export declare function createPrWorkflowResponseGate(options: {
|
|
|
166
182
|
* without relying on `promptAsync` call counts alone.
|
|
167
183
|
*/
|
|
168
184
|
_inspectWakeBudget: (sessionID: string) => WakeBudget | undefined;
|
|
185
|
+
_inspectBoundaryActivity: (sessionID: string) => {
|
|
186
|
+
lastParentActivityAt: number;
|
|
187
|
+
lastHostStatus: SessionReadiness;
|
|
188
|
+
activeToolPartCount: number;
|
|
189
|
+
quietDeadlineAt?: number;
|
|
190
|
+
watchdogDeadlineAt?: number;
|
|
191
|
+
hasTimer: boolean;
|
|
192
|
+
} | undefined;
|
|
169
193
|
};
|
|
170
194
|
export {};
|