opencode-swarm 7.192.4 → 7.194.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/swarm-pr-review/SKILL.md +2 -2
- package/.opencode/skills/swarm-pr-review/references/verdict-settlement-contract.md +17 -0
- package/README.md +1 -1
- package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
- package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
- package/dist/background/pending-delegations.d.ts +8 -0
- package/dist/cli/{auto-checkpoint-1xy6dprq.js → auto-checkpoint-67dk8rjz.js} +8 -8
- package/dist/cli/{checkpoint-wvhmkgv5.js → checkpoint-jbqqyp5e.js} +15 -15
- package/dist/cli/{coder-settlement-wpkmkgcf.js → coder-settlement-a09t7mvx.js} +11 -11
- package/dist/cli/{config-doctor-xvhejh7g.js → config-doctor-dkp263xx.js} +14 -14
- package/dist/cli/{core-yzgm8pcw.js → core-stnmz1rg.js} +4 -4
- package/dist/cli/{curation-policy-yzdznz4z.js → curation-policy-8j6qn6nt.js} +4 -4
- package/dist/cli/{curator-drift-5c041yaf.js → curator-drift-d1wedyed.js} +9 -9
- package/dist/cli/curator-llm-factory-97dpqjz4.js +82 -0
- package/dist/cli/{curator-3xh6246r.js → curator-mc0wcpvw.js} +41 -41
- package/dist/cli/{doctor-knowledge-receipt-phase-id-cx6n5jtp.js → doctor-knowledge-receipt-phase-id-dfwx5jha.js} +8 -8
- package/dist/cli/{evidence-summary-service-cc139a85.js → evidence-summary-service-k1shqefr.js} +18 -18
- package/dist/cli/{gate-evidence-7azk0xbt.js → gate-evidence-vw9y4gs6.js} +6 -6
- package/dist/cli/guardrail-explain-24g3bsqw.js +83 -0
- package/dist/cli/{guardrail-log-env1h4wr.js → guardrail-log-vbeyx6nq.js} +7 -7
- package/dist/cli/{guardrail-reset-1404ymcw.js → guardrail-reset-jwtt15e3.js} +41 -41
- package/dist/cli/{hive-promoter-hap3dh02.js → hive-promoter-p9ad63mx.js} +41 -41
- package/dist/cli/{index-8zj647hc.js → index-0e318vgt.js} +1 -1
- package/dist/cli/{index-rqapvhh5.js → index-0xe19j9g.js} +1 -1
- package/dist/cli/{index-py8wpe81.js → index-1jt12p3y.js} +1 -1
- package/dist/cli/{index-bgzpw6ge.js → index-3atkcqpb.js} +1 -1
- package/dist/cli/{index-j4pxkvw3.js → index-3dpb3kps.js} +4 -4
- package/dist/cli/{index-gkr6ns9n.js → index-43v5axvm.js} +4 -4
- package/dist/cli/{index-xwxqtdwz.js → index-48h1yn6c.js} +4 -4
- package/dist/cli/{index-s68yyat0.js → index-4ftg3p9n.js} +2 -2
- package/dist/cli/{index-22ww8fjt.js → index-51dxek4p.js} +3 -3
- package/dist/cli/{index-1n7sf9gz.js → index-5rkh69f3.js} +1 -1
- package/dist/cli/{index-0e1nxkte.js → index-668npagp.js} +1 -1
- package/dist/cli/{index-g8jd3h4r.js → index-6s3ab22d.js} +2 -2
- package/dist/cli/{index-cp9h2sqb.js → index-6xppb1er.js} +1 -1
- package/dist/cli/{index-6vwnm3sm.js → index-7bfshvq1.js} +3 -3
- package/dist/cli/{index-5gy5dc2n.js → index-7njm9jk1.js} +1 -1
- package/dist/cli/{index-eaess7dm.js → index-84k9zzv1.js} +1 -1
- package/dist/cli/{index-vgktct21.js → index-9bzgea2y.js} +4 -4
- package/dist/cli/{index-jb669k7s.js → index-9kbnxb7v.js} +2 -2
- package/dist/cli/{index-c5gb6a86.js → index-9v43y7y6.js} +10 -10
- package/dist/cli/{index-zya4a544.js → index-ajkdt5b8.js} +4 -4
- package/dist/cli/{index-54p1vs33.js → index-at34nry4.js} +3 -3
- package/dist/cli/{index-rsfvxaw0.js → index-cwr69qw7.js} +7 -7
- package/dist/cli/{index-72eh47b2.js → index-d7pznffh.js} +4 -4
- package/dist/cli/{index-xpwp9hw1.js → index-dy7nztyp.js} +6 -6
- package/dist/cli/{index-g2phkwh2.js → index-ehab3z5y.js} +4 -4
- package/dist/cli/{index-6k70exke.js → index-f3ttgqak.js} +2 -2
- package/dist/cli/{index-fzqn2kk8.js → index-fd6b9f38.js} +2 -2
- package/dist/cli/{index-q47snsb2.js → index-h14wpwpa.js} +4 -4
- package/dist/cli/{index-dtet46e6.js → index-hfnyykvm.js} +5 -5
- package/dist/cli/{index-nwswxes7.js → index-hfssjyxs.js} +2 -2
- package/dist/cli/{index-2qpme44n.js → index-jrs2qh6j.js} +3 -3
- package/dist/cli/{index-s43zb23q.js → index-kp5qw5p4.js} +43 -43
- package/dist/cli/{index-myjqj3na.js → index-n5xwza76.js} +7 -7
- package/dist/cli/{index-4twjbsfw.js → index-ndec8akq.js} +1 -1
- package/dist/cli/{index-a9m7h5v0.js → index-qh93qjc2.js} +1 -1
- package/dist/cli/{index-kn16k0fv.js → index-r8mavcg6.js} +5 -5
- package/dist/cli/{index-tww9qw9z.js → index-rpnkp79f.js} +6 -6
- package/dist/cli/{index-dt4cjxbz.js → index-st80sjg7.js} +1 -1
- package/dist/cli/{index-c8fjbghs.js → index-t6aae9wq.js} +1 -1
- package/dist/cli/{index-c6wzbs0g.js → index-vfdkvvkf.js} +2 -2
- package/dist/cli/{index-mbn4vn3z.js → index-vg8sxg12.js} +1 -1
- package/dist/cli/{index-5gyq54c5.js → index-vjytfp05.js} +4591 -4125
- package/dist/cli/{index-5dws7eyb.js → index-w2vbaczx.js} +1 -1
- package/dist/cli/{index-ftatc9wj.js → index-x7qeaa9y.js} +41 -41
- package/dist/cli/{index-v6ghzghn.js → index-y3n9ry9q.js} +3 -3
- package/dist/cli/{index-qzkrcz1r.js → index-yfbk69b1.js} +6 -6
- package/dist/cli/index.js +42 -42
- package/dist/cli/{knowledge-escalator-eta167xh.js → knowledge-escalator-g6dctrae.js} +13 -13
- package/dist/cli/{knowledge-events-mz25jn9f.js → knowledge-events-acdz0x2g.js} +11 -11
- package/dist/cli/{knowledge-link-a5tvjqdt.js → knowledge-link-srnt95wh.js} +3 -3
- package/dist/cli/{knowledge-store-qd08dbws.js → knowledge-store-vxtj4m59.js} +4 -4
- package/dist/cli/{knowledge-validator-jyrsgamq.js → knowledge-validator-b545vc9t.js} +6 -6
- package/dist/cli/{mcp-4wgxc5ax.js → mcp-c3t18313.js} +1 -1
- package/dist/cli/{model-preflight-4p3x4vma.js → model-preflight-r99c08re.js} +41 -41
- package/dist/cli/{pending-delegations-7hm6xgzw.js → pending-delegations-57f3049j.js} +12 -10
- package/dist/cli/{pr-subscriptions-2y3w5pyt.js → pr-subscriptions-5jb793xe.js} +10 -10
- package/dist/cli/{pr-workflow-gate-y04z3z80.js → pr-workflow-gate-n3x25ddw.js} +47 -41
- package/dist/cli/{runner-8qybgy4n.js → runner-b2e89cp1.js} +4 -4
- package/dist/cli/{scan-cursor-2hpc6mxt.js → scan-cursor-s9mazw82.js} +5 -5
- package/dist/cli/{schema-33k1e2cv.js → schema-7czxpvwm.js} +2 -2
- package/dist/cli/{scope-persistence-y769jep8.js → scope-persistence-y0ebqyjm.js} +14 -14
- package/dist/cli/{server-199m00cz.js → server-m10e78ey.js} +41 -41
- package/dist/cli/{skill-generator-b9by3739.js → skill-generator-kzw1dcba.js} +15 -15
- package/dist/cli/{snapshot-coordination-init-wyyn8ftk.js → snapshot-coordination-init-z1aqsvn4.js} +41 -41
- package/dist/cli/{speckit-checkoff-y2ywmh9k.js → speckit-checkoff-1g3vzywn.js} +5 -5
- package/dist/cli/{workspace-snapshot-vfpnxjsp.js → workspace-snapshot-p69t9zn7.js} +3 -3
- package/dist/cli/{worktree-collision-ownership-hg0yrc5b.js → worktree-collision-ownership-d0etv08a.js} +11 -11
- package/dist/cli/{worktree-isolation-epbn1xgh.js → worktree-isolation-dj2qw13p.js} +41 -41
- package/dist/commands/registry.d.ts +2 -2
- package/dist/epic/start.d.ts +8 -5
- package/dist/hooks/injection-policy.d.ts +94 -0
- package/dist/hooks/pr-workflow-gate.d.ts +81 -5
- package/dist/host/v2/session-client.d.ts +77 -0
- package/dist/host/v2/types.d.ts +256 -11
- package/dist/index.js +495 -492
- package/dist/pr-review/finding-policy.d.ts +1 -1
- package/dist/pr-review/verdict-settlement.d.ts +182 -0
- package/dist/services/context-budget-service.d.ts +8 -1
- package/dist/tools/complete-pr-workflow.d.ts +13 -0
- package/dist/tools/pr-workflow-status.d.ts +24 -1
- package/dist/tools/write-pr-review-artifact.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cli/curator-llm-factory-6y7wrbvk.js +0 -82
- package/dist/cli/guardrail-explain-b3y98j5b.js +0 -83
|
@@ -12,7 +12,7 @@ export type FindingSeverity = 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW' | 'INFO' |
|
|
|
12
12
|
export type FindingAction = 'route_to_reviewer' | 'route_to_critic' | 'report' | 'suppress_with_reason' | 'handoff_to_feedback';
|
|
13
13
|
export type FindingStatus = 'UNRESOLVED' | 'CONFIRMED' | 'DISPROVED' | 'NON_ACTIONABLE' | 'PRE_EXISTING';
|
|
14
14
|
export type ConfidenceLabel = 'LOW' | 'MEDIUM' | 'HIGH';
|
|
15
|
-
export type CriticOutcome = 'UPHELD' | 'DOWNGRADED' | 'DISPROVED' | 'NEEDS_MORE_EVIDENCE';
|
|
15
|
+
export type CriticOutcome = 'UPHELD' | 'DOWNGRADED' | 'DISPROVED' | 'NEEDS_MORE_EVIDENCE' | 'CRITIC_UNAVAILABLE';
|
|
16
16
|
export interface ParsedCandidateConfidence {
|
|
17
17
|
label: ConfidenceLabel;
|
|
18
18
|
score: number;
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { findByBatchIdDetailed } from '../background/pending-delegations.js';
|
|
3
|
+
/**
|
|
4
|
+
* N-of-M truthful verdict settlement (issue #3101).
|
|
5
|
+
*
|
|
6
|
+
* When a reviewer/critic verdict lane is liveness-dead and the bounded retry
|
|
7
|
+
* budget for its items is exhausted, the settlement may settle truthfully
|
|
8
|
+
* over the surviving items instead of blocking the whole run — under four
|
|
9
|
+
* conjunctive, non-negotiable constraints (the issue's validated design):
|
|
10
|
+
*
|
|
11
|
+
* 1. terminality evidence only — the trigger is the controller-written typed
|
|
12
|
+
* liveness class on the durable delegation record (never lane self-report,
|
|
13
|
+
* never mere absence/silence);
|
|
14
|
+
* 2. silence blocks — an unclaimed item with an EMPTY owner set keeps
|
|
15
|
+
* blocking (subset batch declarations and capacity-GC pruning make empty
|
|
16
|
+
* owner sets reachable; absence of declarations is not evidence);
|
|
17
|
+
* 3. downgrade-only — the verdict matrix constrains the report to
|
|
18
|
+
* REQUEST_CHANGES/INCOMPLETE via the existing DEGRADED_DISCLOSED channel
|
|
19
|
+
* (never APPROVE, never synthesized verdicts);
|
|
20
|
+
* 4. per-item disclosure — a durable receipt under
|
|
21
|
+
* `.swarm/pr-review/<runId>/verdict-settlement.<phase>.json` carries one
|
|
22
|
+
* structured (lane, disposition, evidence class) row per settled item. The
|
|
23
|
+
* receipt is rename-overwritten on re-admission (last-writer-wins); every
|
|
24
|
+
* consumer re-derives truth from the CURRENT file plus its state identity,
|
|
25
|
+
* never from a prior read.
|
|
26
|
+
*
|
|
27
|
+
* This module deliberately mirrors the discovery-phase dead-family admission
|
|
28
|
+
* (`write-pr-review-trigger-eval.ts` + `PR_REVIEW_MICRO_FAMILY_RETRY_BUDGET`)
|
|
29
|
+
* rather than generalizing `bound_fallback`: a verdict artifact is the FIRST
|
|
30
|
+
* write of its fact, so disclose-and-proceed there would trust silence.
|
|
31
|
+
*/
|
|
32
|
+
/** Sibling of `PR_REVIEW_MICRO_FAMILY_RETRY_BUDGET` (micro discovery families). */
|
|
33
|
+
export declare const PR_REVIEW_VERDICT_RETRY_BUDGET = 2;
|
|
34
|
+
export declare const VERDICT_SETTLEMENT_SCHEMA_VERSION = 1;
|
|
35
|
+
/**
|
|
36
|
+
* Bounded receipt read: per-item rows are small, but a wide dead set must
|
|
37
|
+
* still never produce an unbounded blocking read. 64 KiB ≈ hundreds of rows.
|
|
38
|
+
*/
|
|
39
|
+
export declare const VERDICT_SETTLEMENT_MAX_RECEIPT_BYTES = 65536;
|
|
40
|
+
/**
|
|
41
|
+
* Writer-side item cap mirroring the byte bound above: 128 rows of
|
|
42
|
+
* pretty-printed receipt stay well under `VERDICT_SETTLEMENT_MAX_RECEIPT_BYTES`
|
|
43
|
+
* on every encoding, so the writer can never persist a receipt the bounded
|
|
44
|
+
* reader would refuse (that would wedge the run into a rewrite loop).
|
|
45
|
+
*/
|
|
46
|
+
export declare const VERDICT_SETTLEMENT_MAX_RECEIPT_ITEMS = 128;
|
|
47
|
+
export declare const PrReviewVerdictSettlementPhaseSchema: z.ZodEnum<{
|
|
48
|
+
reviewer: "reviewer";
|
|
49
|
+
critic: "critic";
|
|
50
|
+
}>;
|
|
51
|
+
export type PrReviewVerdictSettlementPhase = z.infer<typeof PrReviewVerdictSettlementPhaseSchema>;
|
|
52
|
+
export declare const PrReviewVerdictSettlementItemSchema: z.ZodObject<{
|
|
53
|
+
itemId: z.ZodString;
|
|
54
|
+
sourceBatchId: z.ZodString;
|
|
55
|
+
sourceLaneId: z.ZodString;
|
|
56
|
+
disposition: z.ZodLiteral<"liveness_dead">;
|
|
57
|
+
evidenceClass: z.ZodLiteral<"liveness">;
|
|
58
|
+
terminalStatus: z.ZodEnum<{
|
|
59
|
+
stale: "stale";
|
|
60
|
+
error: "error";
|
|
61
|
+
cancelled: "cancelled";
|
|
62
|
+
}>;
|
|
63
|
+
}, z.core.$strict>;
|
|
64
|
+
export type PrReviewVerdictSettlementItem = z.infer<typeof PrReviewVerdictSettlementItemSchema>;
|
|
65
|
+
export declare const PrReviewVerdictSettlementReceiptSchema: z.ZodObject<{
|
|
66
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
67
|
+
runId: z.ZodString;
|
|
68
|
+
prHeadSha: z.ZodString;
|
|
69
|
+
revisionDigest: z.ZodString;
|
|
70
|
+
phase: z.ZodEnum<{
|
|
71
|
+
reviewer: "reviewer";
|
|
72
|
+
critic: "critic";
|
|
73
|
+
}>;
|
|
74
|
+
items: z.ZodArray<z.ZodObject<{
|
|
75
|
+
itemId: z.ZodString;
|
|
76
|
+
sourceBatchId: z.ZodString;
|
|
77
|
+
sourceLaneId: z.ZodString;
|
|
78
|
+
disposition: z.ZodLiteral<"liveness_dead">;
|
|
79
|
+
evidenceClass: z.ZodLiteral<"liveness">;
|
|
80
|
+
terminalStatus: z.ZodEnum<{
|
|
81
|
+
stale: "stale";
|
|
82
|
+
error: "error";
|
|
83
|
+
cancelled: "cancelled";
|
|
84
|
+
}>;
|
|
85
|
+
}, z.core.$strict>>;
|
|
86
|
+
}, z.core.$strict>;
|
|
87
|
+
export type PrReviewVerdictSettlementReceipt = z.infer<typeof PrReviewVerdictSettlementReceiptSchema>;
|
|
88
|
+
/** Phase-qualified receipt path (dual-death runs carry one receipt per phase). */
|
|
89
|
+
export declare function verdictSettlementRelativePath(runId: string, phase: PrReviewVerdictSettlementPhase): string;
|
|
90
|
+
/** Structural slice of `PrReviewValidationBatchRecord` this module consumes. */
|
|
91
|
+
export interface VerdictSettlementWindowBatch {
|
|
92
|
+
batchId: string;
|
|
93
|
+
lanes: ReadonlyArray<{
|
|
94
|
+
laneId: string;
|
|
95
|
+
workflowLane: string;
|
|
96
|
+
reviewItemIds?: readonly string[];
|
|
97
|
+
}>;
|
|
98
|
+
}
|
|
99
|
+
export interface VerdictSettlementAdmission {
|
|
100
|
+
admitted: boolean;
|
|
101
|
+
/** Human-readable, non-admitting reason (also embedded in BLOCKED guidance). */
|
|
102
|
+
reason: string;
|
|
103
|
+
items: PrReviewVerdictSettlementItem[];
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* The admissibility predicate (constraint 1 + 2 + the budget arm).
|
|
107
|
+
*
|
|
108
|
+
* The budget arm is PER ITEM: only the distinct window batches whose owner
|
|
109
|
+
* lanes declare THAT item count toward it (per-item-family counting mirroring
|
|
110
|
+
* `countFamilyDispatchAttempts` — never a raw phase-level batch count), and
|
|
111
|
+
* exhaustion requires `1 + budget` such attempts. The settled row's cited
|
|
112
|
+
* batch is one of its counted attempts by construction, so the cited-batch
|
|
113
|
+
* conjunction holds for every admitted row. Uncertain delegation-store reads
|
|
114
|
+
* fail closed (settlement keeps blocking).
|
|
115
|
+
*/
|
|
116
|
+
export declare function deriveVerdictSettlementAdmission(args: {
|
|
117
|
+
directory: string;
|
|
118
|
+
prHeadSha: string;
|
|
119
|
+
phase: PrReviewVerdictSettlementPhase;
|
|
120
|
+
/** The phase window batches composition scans (`prReviewPhaseWindow`). */
|
|
121
|
+
window: readonly VerdictSettlementWindowBatch[];
|
|
122
|
+
unclaimed: readonly string[];
|
|
123
|
+
/** Session scoping for delegation-store reads (sibling call-site parity). */
|
|
124
|
+
parentSessionId?: string;
|
|
125
|
+
}): VerdictSettlementAdmission;
|
|
126
|
+
export declare function buildVerdictSettlementReceipt(args: {
|
|
127
|
+
runId: string;
|
|
128
|
+
prHeadSha: string;
|
|
129
|
+
revisionDigest: string;
|
|
130
|
+
phase: PrReviewVerdictSettlementPhase;
|
|
131
|
+
items: readonly PrReviewVerdictSettlementItem[];
|
|
132
|
+
}): PrReviewVerdictSettlementReceipt;
|
|
133
|
+
export declare function persistVerdictSettlementReceipt(directory: string, receipt: PrReviewVerdictSettlementReceipt): Promise<void>;
|
|
134
|
+
export type VerdictSettlementReceiptRead = {
|
|
135
|
+
status: 'ok';
|
|
136
|
+
receipt: PrReviewVerdictSettlementReceipt;
|
|
137
|
+
/** sha256 of the exact file bytes, for consumption-time anchor checks. */
|
|
138
|
+
rawSha256: string;
|
|
139
|
+
} | {
|
|
140
|
+
status: 'absent';
|
|
141
|
+
} | {
|
|
142
|
+
status: 'invalid';
|
|
143
|
+
reason: string;
|
|
144
|
+
};
|
|
145
|
+
export declare function readVerdictSettlementReceipt(directory: string, runId: string, phase: PrReviewVerdictSettlementPhase): VerdictSettlementReceiptRead;
|
|
146
|
+
/**
|
|
147
|
+
* The single shared effective-set helper every consumer uses (constraint 4 +
|
|
148
|
+
* receipt re-verification): the EFFECTIVE disclosed set is
|
|
149
|
+
* `receipt.items ∩ currentUnclaimed`. An item claimed after the receipt was
|
|
150
|
+
* written drops out; an empty effective set exerts no constraint (no
|
|
151
|
+
* degradation flag, no exemptions).
|
|
152
|
+
*/
|
|
153
|
+
export declare function effectiveVerdictSettlementItems(receipt: PrReviewVerdictSettlementReceipt | undefined, currentUnclaimed: readonly string[]): PrReviewVerdictSettlementItem[];
|
|
154
|
+
/**
|
|
155
|
+
* Whether an admitted N-of-M verdict settlement currently downgrades the
|
|
156
|
+
* verdict matrix (the DEGRADED_DISCLOSED channel): true when either phase's
|
|
157
|
+
* receipt identity-verifies AND its EFFECTIVE set (receipt ∩ current
|
|
158
|
+
* unclaimed) is non-empty. An empty effective set exerts no constraint.
|
|
159
|
+
*
|
|
160
|
+
* Note the deliberate one-way divergence from the gate's
|
|
161
|
+
* `settlementCoveringAllUnclaimed` predicate: that one requires FULL cover of
|
|
162
|
+
* the current unclaimed set before exempting anything, while this one fires
|
|
163
|
+
* on a non-empty intersection. The divergence is strictly fail-closed —
|
|
164
|
+
* degradation-on-while-exemptions-off is reachable, exemptions-on-while-
|
|
165
|
+
* degradation-off is not (full cover implies a non-empty intersection).
|
|
166
|
+
*/
|
|
167
|
+
export declare function verdictSettlementDegradationActive(args: {
|
|
168
|
+
directory: string;
|
|
169
|
+
runId: string | undefined;
|
|
170
|
+
prHeadSha: string | undefined;
|
|
171
|
+
revisionDigest: string | undefined;
|
|
172
|
+
reviewerUnclaimed: readonly string[];
|
|
173
|
+
criticUnclaimed: readonly string[];
|
|
174
|
+
}): boolean;
|
|
175
|
+
/**
|
|
176
|
+
* Test seam (DI over `mock.module`, repo convention): the delegation lookup is
|
|
177
|
+
* injectable so admission arms (uncertain store reads) are testable without
|
|
178
|
+
* corrupting a real store. Restore in `afterEach`.
|
|
179
|
+
*/
|
|
180
|
+
export declare const _internals: {
|
|
181
|
+
findByBatchIdDetailed: typeof findByBatchIdDetailed;
|
|
182
|
+
};
|
|
@@ -100,9 +100,16 @@ interface PlanCursorConfigShape {
|
|
|
100
100
|
* @param directory - The swarm workspace directory
|
|
101
101
|
* @param assembledSystemPrompt - The fully assembled system prompt
|
|
102
102
|
* @param config - Budget configuration
|
|
103
|
+
* @param planCursorSuppressed - #3100/#3161 PRR-003: true when the shared
|
|
104
|
+
* injection policy suppressed the plan-cursor channel this turn (e.g. an
|
|
105
|
+
* active PR_REVIEW gate for the composing session) — the report then
|
|
106
|
+
* counts zero cursor tokens instead of re-deriving content the prompt
|
|
107
|
+
* does not contain. Two known residual divergences are NOT yet tracked by
|
|
108
|
+
* an issue (see the note in src/hooks/injection-policy.ts): mode-blind
|
|
109
|
+
* DISCOVER counting, and Path B ranked-drop counting.
|
|
103
110
|
* @returns Context budget report
|
|
104
111
|
*/
|
|
105
|
-
export declare function getContextBudgetReport(directory: string, assembledSystemPrompt: string, config: ContextBudgetConfig, planCursor?: PlanCursorConfigShape): Promise<ContextBudgetReport>;
|
|
112
|
+
export declare function getContextBudgetReport(directory: string, assembledSystemPrompt: string, config: ContextBudgetConfig, planCursor?: PlanCursorConfigShape, planCursorSuppressed?: boolean): Promise<ContextBudgetReport>;
|
|
106
113
|
/**
|
|
107
114
|
* Format budget warning message based on report
|
|
108
115
|
*
|
|
@@ -12,4 +12,17 @@ export declare const _internals: {
|
|
|
12
12
|
readPrReviewTerminalCoverageForReport: typeof readPrReviewTerminalCoverageForReport;
|
|
13
13
|
readPrReviewFinalFindingPolicyForReport: typeof readPrReviewFinalFindingPolicyForReport;
|
|
14
14
|
settlePresumedStalePrWorkflowLanes: typeof settlePresumedStalePrWorkflowLanes;
|
|
15
|
+
verdictSettlementSummaryForReportSafe: typeof verdictSettlementSummaryForReportSafe;
|
|
15
16
|
};
|
|
17
|
+
/** Observation-only echo: a read failure degrades to an absent echo (the
|
|
18
|
+
* sibling observation-only reads above follow the same guard pattern) rather
|
|
19
|
+
* than failing the completion report itself. */
|
|
20
|
+
declare function verdictSettlementSummaryForReportSafe(directory: string, sessionID: string): Promise<{
|
|
21
|
+
itemId: string;
|
|
22
|
+
sourceBatchId: string;
|
|
23
|
+
sourceLaneId: string;
|
|
24
|
+
disposition: string;
|
|
25
|
+
evidenceClass: string;
|
|
26
|
+
terminalStatus: string;
|
|
27
|
+
}[] | undefined>;
|
|
28
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { readDelegationsDetailed } from '../background/pending-delegations';
|
|
1
|
+
import { findByBatchIdDetailed, readDelegationsDetailed } from '../background/pending-delegations';
|
|
2
2
|
import { resolveCurrentGitHeadAsync, resolveIsWorkingTreeCleanAsync } from '../background/workspace-snapshot';
|
|
3
3
|
import { classifyPrWorkflowGitState } from '../git/pr-workflow-state';
|
|
4
4
|
import { isPrWorkflowAutoWakeSuppressed } from '../hooks/pr-workflow-auto-wake';
|
|
@@ -14,12 +14,30 @@ import { createSwarmTool } from './create-tool';
|
|
|
14
14
|
* severed at the boundary instead of leaving a lone surrogate.
|
|
15
15
|
*/
|
|
16
16
|
declare function truncateToByteBudget(value: string, maxBytes: number): string;
|
|
17
|
+
/**
|
|
18
|
+
* Lightweight neutralizer for short, author-influenced Git strings (branch
|
|
19
|
+
* names, remote URLs, changed paths). A PR branch/remote is attacker-controlled
|
|
20
|
+
* text; this strips control characters and the markdown/HTML metacharacters that
|
|
21
|
+
* could break a downstream renderer, then bounds the length. It deliberately
|
|
22
|
+
* does NOT use the heavyweight `neutralizeUntrustedMarkdown` fenced wrapper,
|
|
23
|
+
* which is for large prose blobs, not single structured fields.
|
|
24
|
+
*/
|
|
25
|
+
declare function boundUntrusted(value: string, maxLen: number): string;
|
|
17
26
|
/**
|
|
18
27
|
* Bounded, killable, non-interactive Git read (AGENTS.md invariant 3). Array
|
|
19
28
|
* form, explicit cwd, ignored stdin, capped stdout, timeout, best-effort kill in
|
|
20
29
|
* finally. Never runs a PR-controlled script — only fixed read verbs are passed.
|
|
21
30
|
*/
|
|
22
31
|
declare function runGitCapture(directory: string, args: string[]): Promise<string | null>;
|
|
32
|
+
/**
|
|
33
|
+
* Bound a one-line finding summary for display: strip control characters and
|
|
34
|
+
* the markdown/HTML metacharacters (same character classes as
|
|
35
|
+
* {@link boundUntrusted} — receipt fields are lane-agent-authored text and a
|
|
36
|
+
* schema cap bounds length, not content), collapse whitespace, then cap to
|
|
37
|
+
* the char limit without splitting a surrogate pair (code-point-aware, unlike
|
|
38
|
+
* a bare `slice`).
|
|
39
|
+
*/
|
|
40
|
+
declare function boundFindingLine(line: string): string;
|
|
23
41
|
declare function resolveWorkflowGateSession(directory: string, sessionID: string): Promise<string | null>;
|
|
24
42
|
export declare const pr_workflow_status: ReturnType<typeof createSwarmTool>;
|
|
25
43
|
/** Test seam mirroring gh-evidence's `_internals` (issue #507 DI convention). */
|
|
@@ -34,5 +52,10 @@ export declare const _internals: {
|
|
|
34
52
|
classifyGitState: typeof classifyPrWorkflowGitState;
|
|
35
53
|
truncateToByteBudget: typeof truncateToByteBudget;
|
|
36
54
|
resolveWorkflowGateSession: typeof resolveWorkflowGateSession;
|
|
55
|
+
/** Batch receipt lookup for the lane-coverage projection (F-01 test seam). */
|
|
56
|
+
findByBatchIdDetailed: typeof findByBatchIdDetailed;
|
|
57
|
+
/** Pure field sanitizers (direct hostile-input unit suites). */
|
|
58
|
+
boundUntrusted: typeof boundUntrusted;
|
|
59
|
+
boundFindingLine: typeof boundFindingLine;
|
|
37
60
|
};
|
|
38
61
|
export {};
|
|
@@ -31,7 +31,7 @@ type FindingsRecord = z.infer<typeof PrReviewFindingSchema>;
|
|
|
31
31
|
declare function assertCriticSettlements(records: readonly FindingsRecord[], existing: readonly PersistedFinding[], authoritativeCriticVerdicts: ReadonlyMap<string, {
|
|
32
32
|
status: string;
|
|
33
33
|
severity: string;
|
|
34
|
-
}>): CriticSettlementRecord[];
|
|
34
|
+
}>, criticUnavailableIds: ReadonlySet<string>): CriticSettlementRecord[];
|
|
35
35
|
export declare function executeWritePrReviewArtifact(args: unknown, directory: string, context?: {
|
|
36
36
|
sessionID?: string;
|
|
37
37
|
}): Promise<string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.194.0",
|
|
4
4
|
"description": "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
createCuratorLLMDelegate
|
|
4
|
-
} from "./index-5gyq54c5.js";
|
|
5
|
-
import"./index-22ww8fjt.js";
|
|
6
|
-
import"./index-g2phkwh2.js";
|
|
7
|
-
import"./index-xwxqtdwz.js";
|
|
8
|
-
import"./index-j2vv0h13.js";
|
|
9
|
-
import"./index-0e1nxkte.js";
|
|
10
|
-
import"./index-5gy5dc2n.js";
|
|
11
|
-
import"./index-txdagbh7.js";
|
|
12
|
-
import"./index-c6wzbs0g.js";
|
|
13
|
-
import"./index-rdec0y3z.js";
|
|
14
|
-
import"./index-v6ghzghn.js";
|
|
15
|
-
import"./index-myjqj3na.js";
|
|
16
|
-
import"./index-vgktct21.js";
|
|
17
|
-
import"./index-tww9qw9z.js";
|
|
18
|
-
import"./index-fzqn2kk8.js";
|
|
19
|
-
import"./index-dtet46e6.js";
|
|
20
|
-
import"./index-cjapb4hy.js";
|
|
21
|
-
import"./index-g8jd3h4r.js";
|
|
22
|
-
import"./index-pt7h91zc.js";
|
|
23
|
-
import"./index-q7sjgr1y.js";
|
|
24
|
-
import"./index-qzkrcz1r.js";
|
|
25
|
-
import"./index-c5gb6a86.js";
|
|
26
|
-
import"./index-6b295cas.js";
|
|
27
|
-
import"./index-9nyqt3kb.js";
|
|
28
|
-
import"./index-cp9h2sqb.js";
|
|
29
|
-
import"./index-v3bmwmqw.js";
|
|
30
|
-
import"./index-6k70exke.js";
|
|
31
|
-
import"./index-2qpme44n.js";
|
|
32
|
-
import"./index-72eh47b2.js";
|
|
33
|
-
import"./index-g4fs6z4e.js";
|
|
34
|
-
import"./index-xpwp9hw1.js";
|
|
35
|
-
import"./index-zya4a544.js";
|
|
36
|
-
import"./index-gkr6ns9n.js";
|
|
37
|
-
import"./index-m9zzj4ee.js";
|
|
38
|
-
import"./index-eaess7dm.js";
|
|
39
|
-
import"./index-2s7dvzff.js";
|
|
40
|
-
import"./index-j4pxkvw3.js";
|
|
41
|
-
import"./index-5dws7eyb.js";
|
|
42
|
-
import"./index-rtry5xyf.js";
|
|
43
|
-
import"./index-6vwnm3sm.js";
|
|
44
|
-
import"./index-g22dps7x.js";
|
|
45
|
-
import"./index-0725jpp7.js";
|
|
46
|
-
import"./index-kn16k0fv.js";
|
|
47
|
-
import"./index-54p1vs33.js";
|
|
48
|
-
import"./index-a9m7h5v0.js";
|
|
49
|
-
import"./index-dt4cjxbz.js";
|
|
50
|
-
import"./index-mbn4vn3z.js";
|
|
51
|
-
import"./index-8zj647hc.js";
|
|
52
|
-
import"./index-ry16d01s.js";
|
|
53
|
-
import"./index-rdm3px0g.js";
|
|
54
|
-
import"./index-7pmbnjvj.js";
|
|
55
|
-
import"./index-4twjbsfw.js";
|
|
56
|
-
import"./index-rsfvxaw0.js";
|
|
57
|
-
import"./index-vzm6zre7.js";
|
|
58
|
-
import"./index-ae75rja9.js";
|
|
59
|
-
import"./index-bgzpw6ge.js";
|
|
60
|
-
import"./index-1n7sf9gz.js";
|
|
61
|
-
import"./index-e8k0v19e.js";
|
|
62
|
-
import"./index-t7hmqgjy.js";
|
|
63
|
-
import"./index-mtqwyjrg.js";
|
|
64
|
-
import"./index-fzpt2djt.js";
|
|
65
|
-
import"./index-ejhxgyvm.js";
|
|
66
|
-
import"./index-7g4c7s5r.js";
|
|
67
|
-
import"./index-nwswxes7.js";
|
|
68
|
-
import"./index-gx2vp8gx.js";
|
|
69
|
-
import"./index-rqapvhh5.js";
|
|
70
|
-
import"./index-zxdawwc7.js";
|
|
71
|
-
import"./index-s68yyat0.js";
|
|
72
|
-
import"./index-py8wpe81.js";
|
|
73
|
-
import"./index-bk5tah7q.js";
|
|
74
|
-
import"./index-gknz3bv1.js";
|
|
75
|
-
import"./index-zpsr8rpc.js";
|
|
76
|
-
import"./index-bzfn85kq.js";
|
|
77
|
-
import"./index-9rwhas09.js";
|
|
78
|
-
import"./index-zgwm4ryv.js";
|
|
79
|
-
import"./index-a76rekgs.js";
|
|
80
|
-
export {
|
|
81
|
-
createCuratorLLMDelegate
|
|
82
|
-
};
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
handleGuardrailExplain
|
|
4
|
-
} from "./index-jb669k7s.js";
|
|
5
|
-
import"./index-5gyq54c5.js";
|
|
6
|
-
import"./index-22ww8fjt.js";
|
|
7
|
-
import"./index-g2phkwh2.js";
|
|
8
|
-
import"./index-xwxqtdwz.js";
|
|
9
|
-
import"./index-j2vv0h13.js";
|
|
10
|
-
import"./index-0e1nxkte.js";
|
|
11
|
-
import"./index-5gy5dc2n.js";
|
|
12
|
-
import"./index-txdagbh7.js";
|
|
13
|
-
import"./index-c6wzbs0g.js";
|
|
14
|
-
import"./index-rdec0y3z.js";
|
|
15
|
-
import"./index-v6ghzghn.js";
|
|
16
|
-
import"./index-myjqj3na.js";
|
|
17
|
-
import"./index-vgktct21.js";
|
|
18
|
-
import"./index-tww9qw9z.js";
|
|
19
|
-
import"./index-fzqn2kk8.js";
|
|
20
|
-
import"./index-dtet46e6.js";
|
|
21
|
-
import"./index-cjapb4hy.js";
|
|
22
|
-
import"./index-g8jd3h4r.js";
|
|
23
|
-
import"./index-pt7h91zc.js";
|
|
24
|
-
import"./index-q7sjgr1y.js";
|
|
25
|
-
import"./index-qzkrcz1r.js";
|
|
26
|
-
import"./index-c5gb6a86.js";
|
|
27
|
-
import"./index-6b295cas.js";
|
|
28
|
-
import"./index-9nyqt3kb.js";
|
|
29
|
-
import"./index-cp9h2sqb.js";
|
|
30
|
-
import"./index-v3bmwmqw.js";
|
|
31
|
-
import"./index-6k70exke.js";
|
|
32
|
-
import"./index-2qpme44n.js";
|
|
33
|
-
import"./index-72eh47b2.js";
|
|
34
|
-
import"./index-g4fs6z4e.js";
|
|
35
|
-
import"./index-xpwp9hw1.js";
|
|
36
|
-
import"./index-zya4a544.js";
|
|
37
|
-
import"./index-gkr6ns9n.js";
|
|
38
|
-
import"./index-m9zzj4ee.js";
|
|
39
|
-
import"./index-eaess7dm.js";
|
|
40
|
-
import"./index-2s7dvzff.js";
|
|
41
|
-
import"./index-j4pxkvw3.js";
|
|
42
|
-
import"./index-5dws7eyb.js";
|
|
43
|
-
import"./index-rtry5xyf.js";
|
|
44
|
-
import"./index-6vwnm3sm.js";
|
|
45
|
-
import"./index-g22dps7x.js";
|
|
46
|
-
import"./index-0725jpp7.js";
|
|
47
|
-
import"./index-kn16k0fv.js";
|
|
48
|
-
import"./index-54p1vs33.js";
|
|
49
|
-
import"./index-a9m7h5v0.js";
|
|
50
|
-
import"./index-dt4cjxbz.js";
|
|
51
|
-
import"./index-mbn4vn3z.js";
|
|
52
|
-
import"./index-8zj647hc.js";
|
|
53
|
-
import"./index-ry16d01s.js";
|
|
54
|
-
import"./index-rdm3px0g.js";
|
|
55
|
-
import"./index-7pmbnjvj.js";
|
|
56
|
-
import"./index-4twjbsfw.js";
|
|
57
|
-
import"./index-rsfvxaw0.js";
|
|
58
|
-
import"./index-vzm6zre7.js";
|
|
59
|
-
import"./index-ae75rja9.js";
|
|
60
|
-
import"./index-bgzpw6ge.js";
|
|
61
|
-
import"./index-1n7sf9gz.js";
|
|
62
|
-
import"./index-e8k0v19e.js";
|
|
63
|
-
import"./index-t7hmqgjy.js";
|
|
64
|
-
import"./index-mtqwyjrg.js";
|
|
65
|
-
import"./index-fzpt2djt.js";
|
|
66
|
-
import"./index-ejhxgyvm.js";
|
|
67
|
-
import"./index-7g4c7s5r.js";
|
|
68
|
-
import"./index-nwswxes7.js";
|
|
69
|
-
import"./index-gx2vp8gx.js";
|
|
70
|
-
import"./index-rqapvhh5.js";
|
|
71
|
-
import"./index-zxdawwc7.js";
|
|
72
|
-
import"./index-s68yyat0.js";
|
|
73
|
-
import"./index-py8wpe81.js";
|
|
74
|
-
import"./index-bk5tah7q.js";
|
|
75
|
-
import"./index-gknz3bv1.js";
|
|
76
|
-
import"./index-zpsr8rpc.js";
|
|
77
|
-
import"./index-bzfn85kq.js";
|
|
78
|
-
import"./index-9rwhas09.js";
|
|
79
|
-
import"./index-zgwm4ryv.js";
|
|
80
|
-
import"./index-a76rekgs.js";
|
|
81
|
-
export {
|
|
82
|
-
handleGuardrailExplain
|
|
83
|
-
};
|