opencode-swarm 7.192.3 → 7.193.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/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
- package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
- package/dist/cli/{auto-checkpoint-8c7hpz0z.js → auto-checkpoint-taay16xe.js} +7 -7
- package/dist/cli/{checkpoint-98h7ftn4.js → checkpoint-6229g3jq.js} +14 -14
- package/dist/cli/{coder-settlement-0nhsjfh1.js → coder-settlement-hexmmefv.js} +10 -10
- package/dist/cli/{config-doctor-ah661gsm.js → config-doctor-3ghvthh5.js} +13 -13
- package/dist/cli/{core-eyk369jx.js → core-0k7t9fw0.js} +3 -3
- package/dist/cli/{curation-policy-yzdznz4z.js → curation-policy-8j6qn6nt.js} +4 -4
- package/dist/cli/{curator-drift-k6f7mnj5.js → curator-drift-a5142x0d.js} +8 -8
- package/dist/cli/{curator-t9cwtz64.js → curator-kwwnkyr7.js} +40 -40
- package/dist/cli/curator-llm-factory-8gt3mvg9.js +82 -0
- package/dist/cli/{doctor-knowledge-receipt-phase-id-dwygxv2m.js → doctor-knowledge-receipt-phase-id-11nsf9tz.js} +7 -7
- package/dist/cli/{evidence-summary-service-b9xq092m.js → evidence-summary-service-y2ykc6ta.js} +17 -17
- package/dist/cli/{gate-evidence-g3qpsr62.js → gate-evidence-cd5299js.js} +5 -5
- package/dist/cli/guardrail-explain-hpgecr7x.js +83 -0
- package/dist/cli/{guardrail-log-b862hykr.js → guardrail-log-g6krx0s2.js} +6 -6
- package/dist/cli/{guardrail-reset-avehjarw.js → guardrail-reset-a3xv675m.js} +40 -40
- package/dist/cli/{hive-promoter-0zv095rz.js → hive-promoter-90svfzvs.js} +40 -40
- package/dist/cli/{index-8zj647hc.js → index-0e318vgt.js} +1 -1
- package/dist/cli/{index-04knttpn.js → index-1dx5zyss.js} +1 -1
- package/dist/cli/{index-cme96pja.js → index-1p24bfn2.js} +5 -5
- package/dist/cli/{index-bgzpw6ge.js → index-3atkcqpb.js} +1 -1
- package/dist/cli/{index-bxtyg46p.js → index-3xj89bf0.js} +42 -42
- package/dist/cli/{index-g7vd2azv.js → index-4gacy6y6.js} +2 -2
- package/dist/cli/{index-3bst6f3c.js → index-4mq8r4be.js} +3 -3
- package/dist/cli/{index-ef0tgsgj.js → index-5ev6f1gj.js} +3 -3
- package/dist/cli/{index-f6am4ypq.js → index-5n760fzn.js} +6 -6
- 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-fzcr2s01.js → index-6dn16dre.js} +5 -5
- package/dist/cli/{index-g8jd3h4r.js → index-6s3ab22d.js} +2 -2
- 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-5mrvx2vm.js → index-bg19b84s.js} +7 -7
- package/dist/cli/{index-azr0092e.js → index-bgtfvst1.js} +1 -1
- package/dist/cli/{index-nd4kkbjw.js → index-bkpyff61.js} +2 -2
- package/dist/cli/{index-4bpnf2eg.js → index-cpt38e0e.js} +30 -8
- package/dist/cli/{index-6a4t4p4p.js → index-cs0p582p.js} +4 -4
- package/dist/cli/{index-hmgx2bsy.js → index-d2emv8ap.js} +3 -3
- package/dist/cli/{index-aqvsxjwn.js → index-db786kn6.js} +40 -40
- package/dist/cli/{index-fzqn2kk8.js → index-fd6b9f38.js} +2 -2
- package/dist/cli/{index-31bd6hrm.js → index-he2nyr7x.js} +10 -10
- 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-5m64x65w.js → index-jx80ed6g.js} +5913 -4458
- package/dist/cli/{index-yc8v81ab.js → index-jxs9qnad.js} +4 -4
- package/dist/cli/{index-b7nb6c0p.js → index-ma71x1aa.js} +4 -4
- package/dist/cli/{index-4twjbsfw.js → index-ndec8akq.js} +1 -1
- package/dist/cli/{index-rhjzq6kw.js → index-ngk8hpc3.js} +1 -1
- package/dist/cli/{index-b67200rm.js → index-nktwf2xm.js} +6 -6
- package/dist/cli/{index-043r3t12.js → index-ntmnse4d.js} +1 -1
- package/dist/cli/{index-83swjsyd.js → index-nz6ehpjn.js} +3 -3
- package/dist/cli/{index-4e8xcgkx.js → index-prvancd0.js} +2 -2
- package/dist/cli/{index-a9m7h5v0.js → index-qh93qjc2.js} +1 -1
- package/dist/cli/{index-zdt5m9n2.js → index-r3mffz78.js} +4 -4
- package/dist/cli/{index-pq5962z7.js → index-rd9th57y.js} +3 -3
- package/dist/cli/{index-dt4cjxbz.js → index-st80sjg7.js} +1 -1
- package/dist/cli/{index-4g39c948.js → index-tr47q89d.js} +4 -4
- package/dist/cli/{index-bccf3c0h.js → index-vbp35frb.js} +2 -2
- package/dist/cli/{index-mbn4vn3z.js → index-vg8sxg12.js} +1 -1
- package/dist/cli/{index-5dws7eyb.js → index-w2vbaczx.js} +1 -1
- package/dist/cli/{index-fayfa263.js → index-x2phyvcv.js} +3 -3
- package/dist/cli/{index-8z8cj2rz.js → index-ymnathfr.js} +7 -7
- package/dist/cli/index.js +41 -41
- package/dist/cli/{knowledge-escalator-y879xx4c.js → knowledge-escalator-2d7g3hs0.js} +12 -12
- package/dist/cli/{knowledge-events-07vpvmmr.js → knowledge-events-hjeaevc9.js} +10 -10
- package/dist/cli/{knowledge-link-a5tvjqdt.js → knowledge-link-srnt95wh.js} +3 -3
- package/dist/cli/{knowledge-store-wae6s3ef.js → knowledge-store-g9cb2m0v.js} +4 -4
- package/dist/cli/{knowledge-validator-v13cjze1.js → knowledge-validator-dghf9pcj.js} +6 -6
- package/dist/cli/{mcp-5ns32ees.js → mcp-f5myvd7r.js} +1 -1
- package/dist/cli/{model-preflight-06jexzsa.js → model-preflight-4w4wd6dj.js} +40 -40
- package/dist/cli/{pending-delegations-8g7nne79.js → pending-delegations-adm6gf3n.js} +10 -10
- package/dist/cli/{pr-subscriptions-yp71fzeb.js → pr-subscriptions-n1hks854.js} +10 -10
- package/dist/cli/{pr-workflow-gate-rcfwt8jd.js → pr-workflow-gate-59cr6gve.js} +44 -40
- package/dist/cli/{runner-8qybgy4n.js → runner-b2e89cp1.js} +4 -4
- package/dist/cli/{scan-cursor-9xqrqgbs.js → scan-cursor-t26xmfhd.js} +5 -5
- package/dist/cli/{schema-qxgn4xzy.js → schema-cr120ar5.js} +1 -1
- package/dist/cli/{scope-persistence-9dscq6a2.js → scope-persistence-mrnz8j43.js} +13 -13
- package/dist/cli/{server-v1s76pa3.js → server-mwk6zn83.js} +40 -40
- package/dist/cli/{skill-generator-yjeam2kn.js → skill-generator-svs4k0g8.js} +14 -14
- package/dist/cli/{snapshot-coordination-init-jqkew1cw.js → snapshot-coordination-init-xzrahhsb.js} +40 -40
- package/dist/cli/{speckit-checkoff-atm1ftz7.js → speckit-checkoff-g2qrb1tn.js} +4 -4
- package/dist/cli/{workspace-snapshot-vfpnxjsp.js → workspace-snapshot-p69t9zn7.js} +3 -3
- package/dist/cli/{worktree-collision-ownership-ftg1bnx6.js → worktree-collision-ownership-d145wmpg.js} +11 -11
- package/dist/cli/{worktree-isolation-ttqkatgg.js → worktree-isolation-pt1rws6p.js} +40 -40
- package/dist/commands/registry.d.ts +1 -1
- package/dist/failures/provider-message-error.d.ts +2 -1
- package/dist/hooks/guardrails/tool-before.d.ts +19 -0
- package/dist/hooks/injection-policy.d.ts +94 -0
- package/dist/hooks/pr-workflow-gate.d.ts +52 -5
- package/dist/hooks/shell-executor-context.d.ts +43 -0
- package/dist/hooks/shell-write-detect.d.ts +44 -0
- package/dist/host/v2/types.d.ts +254 -11
- package/dist/index.js +512 -508
- 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/services/pr-workflow-gh-readiness.d.ts +30 -0
- package/dist/tools/complete-pr-workflow.d.ts +13 -0
- package/dist/tools/gh-evidence.d.ts +14 -0
- package/dist/tools/write-pr-review-artifact.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cli/curator-llm-factory-9g9p90jz.js +0 -82
- package/dist/cli/guardrail-explain-784a2m4p.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
|
*
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Issue #3099 R2-14 — workflow-scoped `gh` readiness.
|
|
3
|
+
*
|
|
4
|
+
* `gh` availability is otherwise only ever resolved lazily: the moment a tool
|
|
5
|
+
* that needs it runs (`src/tools/gh-evidence.ts` degrades with a typed
|
|
6
|
+
* `gh-not-found` payload, `src/tools/pr-review-submission.ts` fails its
|
|
7
|
+
* transport). Nothing checks at PR-workflow ACTIVATION, which is the last point
|
|
8
|
+
* where an operator can still act — and because the workflow is fail-open, a
|
|
9
|
+
* lane that cannot reach `gh` produces degraded output that then flows into
|
|
10
|
+
* reviewer and critic inputs instead of failing loudly.
|
|
11
|
+
*
|
|
12
|
+
* The generic missing-binary advisory cannot cover this: its checklist
|
|
13
|
+
* (`src/services/tool-doctor.ts`) is PATH-presence-only and deliberately
|
|
14
|
+
* excludes `gh`, whereas `resolveGhBinary` performs a behavioural
|
|
15
|
+
* `gh version` probe.
|
|
16
|
+
*
|
|
17
|
+
* Fail-open by contract: this module returns a string or null and NEVER throws.
|
|
18
|
+
* A resolver failure yields no advisory rather than blocking activation.
|
|
19
|
+
*/
|
|
20
|
+
/** Prefixed so the entry is self-identifying inside the shared advisory array. */
|
|
21
|
+
export declare const GH_READINESS_ADVISORY_PREFIX = "gh-readiness:";
|
|
22
|
+
export declare const _internals: {
|
|
23
|
+
resolveGhBinary: () => string | null;
|
|
24
|
+
emit: (message: string) => void;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Returns a workflow-scoped readiness advisory when `gh` cannot be resolved,
|
|
28
|
+
* or null when it can (or when detection itself fails). Never throws.
|
|
29
|
+
*/
|
|
30
|
+
export declare function collectPrWorkflowGhReadinessAdvisory(resolve: (() => string | null) | undefined): string | null;
|
|
@@ -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 {};
|
|
@@ -28,6 +28,20 @@ export declare function resolveGhBinary(): string | null;
|
|
|
28
28
|
* `__seedGitExecutableForTests` in `src/utils/git-executable.ts`.
|
|
29
29
|
*/
|
|
30
30
|
export declare function __seedGhBinaryForTests(value: string | null): void;
|
|
31
|
+
/**
|
|
32
|
+
* Actionable guidance emitted when the gh CLI is not on PATH.
|
|
33
|
+
*
|
|
34
|
+
* There is DELIBERATELY no hidden REST fallback wired in. Two reasons make a
|
|
35
|
+
* silent transport swap unsafe: (1) the in-repo web_fetch tool pins a public IP,
|
|
36
|
+
* blocks loopback, and ignores HTTPS_PROXY, so it cannot be a general REST
|
|
37
|
+
* client from inside the plugin; (2) field-shape divergence — `gh --json`
|
|
38
|
+
* returns camelCase keys plus gh-only synthesized fields (statusCheckRollup,
|
|
39
|
+
* reviewDecision, mergeStateStatus) absent from the snake_case api.github.com
|
|
40
|
+
* REST payload, so auto-swapping transports would return a differently-shaped
|
|
41
|
+
* object under the same contract and mislead readers. Instead we hand the caller
|
|
42
|
+
* the exact REST URL and the gate-allowed degraded read path.
|
|
43
|
+
*/
|
|
44
|
+
export declare function ghNotFoundGuidance(target: 'pr' | 'issue' | 'run', number: number, repo: string | undefined, logFailed: boolean): string;
|
|
31
45
|
export declare const gh_evidence: ToolDefinition;
|
|
32
46
|
export declare const _internals: {
|
|
33
47
|
resolveGhBinaryCandidates: typeof resolveGhBinaryCandidates;
|
|
@@ -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.193.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-5m64x65w.js";
|
|
5
|
-
import"./index-nd4kkbjw.js";
|
|
6
|
-
import"./index-3bst6f3c.js";
|
|
7
|
-
import"./index-b7nb6c0p.js";
|
|
8
|
-
import"./index-j2vv0h13.js";
|
|
9
|
-
import"./index-0e1nxkte.js";
|
|
10
|
-
import"./index-5gy5dc2n.js";
|
|
11
|
-
import"./index-txdagbh7.js";
|
|
12
|
-
import"./index-4e8xcgkx.js";
|
|
13
|
-
import"./index-rdec0y3z.js";
|
|
14
|
-
import"./index-hmgx2bsy.js";
|
|
15
|
-
import"./index-8z8cj2rz.js";
|
|
16
|
-
import"./index-zdt5m9n2.js";
|
|
17
|
-
import"./index-f6am4ypq.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-b67200rm.js";
|
|
25
|
-
import"./index-31bd6hrm.js";
|
|
26
|
-
import"./index-6b295cas.js";
|
|
27
|
-
import"./index-9nyqt3kb.js";
|
|
28
|
-
import"./index-azr0092e.js";
|
|
29
|
-
import"./index-v3bmwmqw.js";
|
|
30
|
-
import"./index-g7vd2azv.js";
|
|
31
|
-
import"./index-83swjsyd.js";
|
|
32
|
-
import"./index-fayfa263.js";
|
|
33
|
-
import"./index-g4fs6z4e.js";
|
|
34
|
-
import"./index-fzcr2s01.js";
|
|
35
|
-
import"./index-4g39c948.js";
|
|
36
|
-
import"./index-6a4t4p4p.js";
|
|
37
|
-
import"./index-m9zzj4ee.js";
|
|
38
|
-
import"./index-eaess7dm.js";
|
|
39
|
-
import"./index-2s7dvzff.js";
|
|
40
|
-
import"./index-yc8v81ab.js";
|
|
41
|
-
import"./index-5dws7eyb.js";
|
|
42
|
-
import"./index-rtry5xyf.js";
|
|
43
|
-
import"./index-bccf3c0h.js";
|
|
44
|
-
import"./index-g22dps7x.js";
|
|
45
|
-
import"./index-0725jpp7.js";
|
|
46
|
-
import"./index-cme96pja.js";
|
|
47
|
-
import"./index-ef0tgsgj.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-5mrvx2vm.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-rhjzq6kw.js";
|
|
70
|
-
import"./index-zxdawwc7.js";
|
|
71
|
-
import"./index-04knttpn.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-4bpnf2eg.js";
|
|
5
|
-
import"./index-5m64x65w.js";
|
|
6
|
-
import"./index-nd4kkbjw.js";
|
|
7
|
-
import"./index-3bst6f3c.js";
|
|
8
|
-
import"./index-b7nb6c0p.js";
|
|
9
|
-
import"./index-j2vv0h13.js";
|
|
10
|
-
import"./index-0e1nxkte.js";
|
|
11
|
-
import"./index-5gy5dc2n.js";
|
|
12
|
-
import"./index-txdagbh7.js";
|
|
13
|
-
import"./index-4e8xcgkx.js";
|
|
14
|
-
import"./index-rdec0y3z.js";
|
|
15
|
-
import"./index-hmgx2bsy.js";
|
|
16
|
-
import"./index-8z8cj2rz.js";
|
|
17
|
-
import"./index-zdt5m9n2.js";
|
|
18
|
-
import"./index-f6am4ypq.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-b67200rm.js";
|
|
26
|
-
import"./index-31bd6hrm.js";
|
|
27
|
-
import"./index-6b295cas.js";
|
|
28
|
-
import"./index-9nyqt3kb.js";
|
|
29
|
-
import"./index-azr0092e.js";
|
|
30
|
-
import"./index-v3bmwmqw.js";
|
|
31
|
-
import"./index-g7vd2azv.js";
|
|
32
|
-
import"./index-83swjsyd.js";
|
|
33
|
-
import"./index-fayfa263.js";
|
|
34
|
-
import"./index-g4fs6z4e.js";
|
|
35
|
-
import"./index-fzcr2s01.js";
|
|
36
|
-
import"./index-4g39c948.js";
|
|
37
|
-
import"./index-6a4t4p4p.js";
|
|
38
|
-
import"./index-m9zzj4ee.js";
|
|
39
|
-
import"./index-eaess7dm.js";
|
|
40
|
-
import"./index-2s7dvzff.js";
|
|
41
|
-
import"./index-yc8v81ab.js";
|
|
42
|
-
import"./index-5dws7eyb.js";
|
|
43
|
-
import"./index-rtry5xyf.js";
|
|
44
|
-
import"./index-bccf3c0h.js";
|
|
45
|
-
import"./index-g22dps7x.js";
|
|
46
|
-
import"./index-0725jpp7.js";
|
|
47
|
-
import"./index-cme96pja.js";
|
|
48
|
-
import"./index-ef0tgsgj.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-5mrvx2vm.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-rhjzq6kw.js";
|
|
71
|
-
import"./index-zxdawwc7.js";
|
|
72
|
-
import"./index-04knttpn.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
|
-
};
|