opencode-swarm 7.83.0 → 7.85.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/codebase-review-swarm/references/review-protocol-v8.2.md +4 -0
- package/.opencode/skills/council/SKILL.md +6 -1
- package/.opencode/skills/deep-dive/SKILL.md +2 -0
- package/.opencode/skills/deep-research/SKILL.md +6 -0
- package/.opencode/skills/swarm-pr-feedback/SKILL.md +6 -0
- package/.opencode/skills/swarm-pr-review/SKILL.md +4 -0
- package/README.md +3 -1
- package/dist/background/lane-output-store.d.ts +72 -0
- package/dist/background/pending-delegations.d.ts +6 -0
- package/dist/cli/capability-probe-jevmgwmf.js +18 -0
- package/dist/cli/config-doctor-zejarrr6.js +35 -0
- package/dist/cli/dispatch-k86d928w.js +477 -0
- package/dist/cli/evidence-summary-service-g2znnd33.js +320 -0
- package/dist/cli/explorer-gz70sm9b.js +16 -0
- package/dist/cli/gate-evidence-y8zn7fe2.js +29 -0
- package/dist/cli/guardrail-explain-w4txg349.js +30 -0
- package/dist/cli/guardrail-log-80116wmz.js +15 -0
- package/dist/cli/index-0sxvwjt0.js +1241 -0
- package/dist/cli/index-293f68mj.js +13538 -0
- package/dist/cli/index-5cb86007.js +110 -0
- package/dist/cli/index-a76rekgs.js +67 -0
- package/dist/cli/index-b9v501fr.js +371 -0
- package/dist/cli/index-bcp79s17.js +1673 -0
- package/dist/cli/index-ckntc5gf.js +91 -0
- package/dist/cli/index-d9fbxaqd.js +2314 -0
- package/dist/cli/index-e7h9bb6v.js +233 -0
- package/dist/cli/index-e8pk68cc.js +540 -0
- package/dist/cli/index-eb85wtx9.js +242 -0
- package/dist/cli/index-f8r50m3h.js +14505 -0
- package/dist/cli/index-fjwwrwr5.js +37 -0
- package/dist/cli/index-hw9b2xng.js +2046 -0
- package/dist/cli/index-hz59hg4h.js +452 -0
- package/dist/cli/index-jtqkh8jf.js +119 -0
- package/dist/cli/index-p0arc26j.js +28 -0
- package/dist/cli/index-p0ye10nd.js +222 -0
- package/dist/cli/index-qqabjns2.js +412 -0
- package/dist/cli/index-red8fm8p.js +2914 -0
- package/dist/cli/index-vq2321gg.js +2391 -0
- package/dist/cli/index-x7qck34v.js +583 -0
- package/dist/cli/index-yhqt45de.js +29027 -0
- package/dist/cli/index-yhsmmv2z.js +339 -0
- package/dist/cli/index-yx44zd0p.js +40 -0
- package/dist/cli/index-zfsbaaqh.js +29 -0
- package/dist/cli/index.js +73 -69708
- package/dist/cli/knowledge-store-n4x6zyk7.js +73 -0
- package/dist/cli/pending-delegations-rd40tv9s.js +261 -0
- package/dist/cli/pr-subscriptions-y1nn36e5.js +33 -0
- package/dist/cli/schema-8d32b2v6.js +168 -0
- package/dist/cli/skill-generator-a5ehggyg.js +55 -0
- package/dist/cli/task-envelope-qn0qtnh0.js +90 -0
- package/dist/cli/telemetry-9bbyxrvn.js +20 -0
- package/dist/cli/workspace-snapshot-w58jr2ga.js +90 -0
- package/dist/commands/guardrail-explain.d.ts +1 -0
- package/dist/commands/guardrail-log.d.ts +1 -0
- package/dist/commands/index.d.ts +2 -0
- package/dist/commands/registry.d.ts +14 -0
- package/dist/hooks/guardrails/audit-log.d.ts +114 -0
- package/dist/index.js +4005 -2432
- package/dist/services/diagnose-service.d.ts +5 -0
- package/dist/services/guardrail-explain-service.d.ts +42 -0
- package/dist/services/guardrail-log-service.d.ts +10 -0
- package/dist/tools/dispatch-lanes.d.ts +14 -3
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/manifest.d.ts +1 -0
- package/dist/tools/retrieve-lane-output.d.ts +2 -0
- package/dist/tools/tool-metadata.d.ts +4 -0
- package/package.json +2 -2
|
@@ -138,6 +138,8 @@ Before writing under `.swarm/`, verify `.swarm/` is ignored or locally excluded.
|
|
|
138
138
|
|
|
139
139
|
Collect every async batch with `collect_lane_results` before consuming its ledger output or advancing to a dependent step. If `dispatch_lanes_async` or `collect_lane_results` is unavailable, fall back to blocking `dispatch_lanes`; if deterministic dispatch is unavailable, run isolated local passes and record that fallback. Do not run dependent inventory passes merely to keep agents busy. Missing dependency context is `unknown`, not guessed.
|
|
140
140
|
|
|
141
|
+
For every collected or blocking lane result, treat `output` as a preview when `output_ref` is present. Call `retrieve_lane_output` and use the full artifact before consuming inventory ledgers, linking claims, deciding that a unit produced no candidates, or advancing a dependent step. If a lane is degraded, incomplete, truncated without a usable ref, missing, stale, cancelled, or failed, record the affected coverage unit as a limitation and re-dispatch a narrower lane or mark it UNVERIFIED; do not infer absence from preview text.
|
|
142
|
+
|
|
141
143
|
## Phase 0 inventory
|
|
142
144
|
|
|
143
145
|
### 0A — Bootstrap and prior context
|
|
@@ -207,6 +209,8 @@ Rules:
|
|
|
207
209
|
|
|
208
210
|
Every dispatch includes selected track(s), exact file list or surface IDs, source-of-truth packet, repository-context packet, relevant ledgers, the applicable `TRACK_DEPTH_PLAN`, candidate format, `out_of_scope_note` rule, and anti-cursory/non-dilution reminder. Prefer `dispatch_lanes_async` for independent candidate-generation coverage units so the Architect can continue building the review ledger, coverage map, and validation routing while lanes inspect subsystems. Call `collect_lane_results` before Phase 2 reviewer validation; no candidate may be routed, counted, or synthesized until its async batch has settled or been explicitly marked blocked/skipped.
|
|
209
211
|
|
|
212
|
+
If candidate-generation lane results include `output_ref`, retrieve and parse the full artifact before candidate counting, deduplication, routing, or synthesis. Preview-only, degraded, or incomplete lane output is a coverage limitation, not negative evidence.
|
|
213
|
+
|
|
210
214
|
File-size rule: no more than 15 files per deep pass; no more than 8 dense files per deep pass. Dense = >300 logical lines, multiple unrelated responsibilities, or interleaved UI/state/network/security logic. No sampling inside assigned scope. Large selections require more deep passes, not larger batches or lower depth.
|
|
211
215
|
|
|
212
216
|
Candidate micro-loop:
|
|
@@ -113,7 +113,12 @@ Do NOT share other agents' responses at this stage.
|
|
|
113
113
|
unavailable. The `round1Responses` array will contain
|
|
114
114
|
entries with `memberId` of `council_generalist`, `council_skeptic`, and
|
|
115
115
|
`council_domain_expert` and `role` of `generalist`, `skeptic`, and
|
|
116
|
-
`domain_expert` respectively.
|
|
116
|
+
`domain_expert` respectively. If any lane result has `output_ref`, call
|
|
117
|
+
`retrieve_lane_output` and parse the full artifact rather than the preview.
|
|
118
|
+
If a lane is degraded, incomplete, truncated without a usable ref, missing,
|
|
119
|
+
stale, cancelled, or failed, treat the council round as blocked or incomplete;
|
|
120
|
+
do not synthesize from partial member JSON.
|
|
121
|
+
These come from the agents' JSON output; no
|
|
117
122
|
manual construction is needed.
|
|
118
123
|
|
|
119
124
|
#### Synthesis and Deliberation (when council.general.deliberate is true; default true)
|
|
@@ -75,6 +75,8 @@ Explorer missions are dispatched in parallel waves. Launch the wave promptly —
|
|
|
75
75
|
|
|
76
76
|
At the Step 4 boundary, call `collect_lane_results` with `wait: true` for every open wave batch. Treat missing, stale, cancelled, or failed lanes as explicit coverage gaps; do not silently proceed past a required lane. If `dispatch_lanes_async` is unavailable, use blocking `dispatch_lanes` or parallel Task calls and record that async advisory lanes were unavailable.
|
|
77
77
|
|
|
78
|
+
When a collected or blocking lane result includes `output_ref`, treat `output` as a preview and call `retrieve_lane_output` before extracting candidate findings or declaring a lane clean. If the result is `output_degraded`, `transcript_incomplete`, truncated without a usable ref, missing, stale, cancelled, or failed, record the lane as a coverage gap and re-dispatch a narrower lane or mark the affected findings/coverage UNVERIFIED.
|
|
79
|
+
|
|
78
80
|
Explorers generate CANDIDATE FINDINGS only — they do NOT make verdicts. All findings are unverified until Step 5.
|
|
79
81
|
|
|
80
82
|
## Step 4 — Normalize Candidates
|
|
@@ -128,6 +128,12 @@ that async advisory lanes were unavailable.
|
|
|
128
128
|
|
|
129
129
|
## Step 5 — Dual-Reviewer Claim Verification
|
|
130
130
|
|
|
131
|
+
When a lane result includes `output_ref`, treat `output` as a preview and call
|
|
132
|
+
`retrieve_lane_output` before extracting claims, summarizing a subtopic, or marking
|
|
133
|
+
the subtopic clean. If the result is `output_degraded`, `transcript_incomplete`, or
|
|
134
|
+
truncated without a usable ref, mark the affected subtopic UNVERIFIED or
|
|
135
|
+
re-dispatch a narrower lane; do not treat preview absence as evidence absence.
|
|
136
|
+
|
|
131
137
|
Split the candidate findings into 2 shards. Dispatch 2 parallel
|
|
132
138
|
`the active swarm's reviewer agent` calls. Each reviewer receives its shard plus
|
|
133
139
|
the relevant RESEARCH CONTEXT and the instruction:
|
|
@@ -172,6 +172,12 @@ Missing, stale, cancelled, or failed lanes remain explicit ledger limitations.
|
|
|
172
172
|
If `dispatch_lanes_async` is unavailable, use blocking verification and record
|
|
173
173
|
that async advisory lanes were unavailable.
|
|
174
174
|
|
|
175
|
+
When a verification lane result includes `output_ref`, treat `output` as a
|
|
176
|
+
preview and call `retrieve_lane_output` before using it to classify, resolve,
|
|
177
|
+
disprove, or group feedback items. If the result is `output_degraded`,
|
|
178
|
+
`transcript_incomplete`, or truncated without a usable ref, keep the affected
|
|
179
|
+
ledger items as `NEEDS_MORE_EVIDENCE` or re-dispatch a narrower read-only lane.
|
|
180
|
+
|
|
175
181
|
### CI matrix cascade check (do this before fixing)
|
|
176
182
|
|
|
177
183
|
When the PR's `unit` job is a matrix across multiple OSes and downstream jobs
|
|
@@ -495,6 +495,8 @@ Launch all base lanes with `dispatch_lanes_async` when available. Pass the six l
|
|
|
495
495
|
|
|
496
496
|
Before Phase 4 or synthesis, call `collect_lane_results` with `wait: true` for the base-lane batch and treat the collected `lane_results` as the join barrier. Missing, stale, cancelled, or failed base lanes are explicit review coverage gaps. If `dispatch_lanes_async` is unavailable, use blocking `dispatch_lanes`; if that is also unavailable, simulate isolated passes. Do not let one lane's conclusions bias another lane, and record unavailable deterministic dispatch in the validation gate.
|
|
497
497
|
|
|
498
|
+
When any collected or blocking `lane_results[]` item has `output_ref`, treat `output` as a preview only. Call `retrieve_lane_output` and consume the full artifact before extracting candidates, deciding that a lane produced no candidates, or routing work to reviewers. If a lane has `output_truncated: true`, `output_degraded: true`, `transcript_incomplete: true`, or no usable `output_ref`, record an explicit coverage gap and re-dispatch a narrower lane or mark affected candidates/coverage UNVERIFIED; never infer candidate absence from a preview.
|
|
499
|
+
|
|
498
500
|
**lane id uniqueness for parallel dispatches:** When re-dispatching failed or re-running explorer lanes, every `dispatch_lanes_async` or `dispatch_lanes` lane `id` MUST be unique within that dispatch batch and should include lane and attempt suffixes (e.g. `pr_review_explore_lane1_attempt2`). Never reuse an id in the same batch unless intentionally replacing that exact lane before dispatch.
|
|
499
501
|
|
|
500
502
|
Explorers optimize for recall. Over-reporting is expected. Explorers produce candidates only.
|
|
@@ -535,6 +537,8 @@ Explorers must not use `CONFIRMED`, `DISPROVED`, or `PRE_EXISTING`.
|
|
|
535
537
|
|
|
536
538
|
After `collect_lane_results` returns for base lanes, inspect the context pack risk triggers. Launch focused micro-lanes for triggered categories only, using `dispatch_lanes_async` again when more than one read-only micro-lane is needed. Collect every micro-lane batch with `wait: true` before reviewer classification. Do not launch irrelevant micro-lanes.
|
|
537
539
|
|
|
540
|
+
Apply the same `output_ref` rule to micro-lanes: retrieve full output before candidate routing, and treat degraded or incomplete lane artifacts as UNVERIFIED coverage rather than as clean negative evidence.
|
|
541
|
+
|
|
538
542
|
Each micro-lane receives:
|
|
539
543
|
|
|
540
544
|
- exact files and hunks in scope,
|
package/README.md
CHANGED
|
@@ -1080,7 +1080,9 @@ Control how tool outputs are summarized for LLM context.
|
|
|
1080
1080
|
| `/swarm agents` | Registered agents with models and permissions |
|
|
1081
1081
|
| `/swarm history` | Completed phases with status |
|
|
1082
1082
|
| `/swarm config` | Current resolved configuration |
|
|
1083
|
-
| `/swarm diagnose` | Health check for `.swarm/` files and
|
|
1083
|
+
| `/swarm diagnose` | Health check for `.swarm/` files, config, and sandbox executor status |
|
|
1084
|
+
| `/swarm guardrail explain [--agent <role>] [--scope <path>] [--write <path>...] [--] <command>` | Dry-run guardrail decisions — report what would be allowed/blocked without executing anything |
|
|
1085
|
+
| `/swarm guardrail-log [--blocks-only]` | Read and print the guardrail decision log most-recent-first; `--blocks-only` shows only block decisions |
|
|
1084
1086
|
| `/swarm export` | Export plan and context as portable JSON |
|
|
1085
1087
|
| `/swarm evidence [task]` | Evidence bundles for a task or all tasks |
|
|
1086
1088
|
| `/swarm archive [--dry-run]` | Archive old evidence with retention policy |
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const LANE_OUTPUT_REF_PREFIX = "L1";
|
|
3
|
+
export declare const MAX_LANE_OUTPUT_STORED_BYTES: number;
|
|
4
|
+
declare const LaneOutputArtifactSchema: z.ZodObject<{
|
|
5
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
6
|
+
ref: z.ZodString;
|
|
7
|
+
batchId: z.ZodString;
|
|
8
|
+
laneId: z.ZodString;
|
|
9
|
+
agent: z.ZodString;
|
|
10
|
+
role: z.ZodString;
|
|
11
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
12
|
+
parentSessionId: z.ZodOptional<z.ZodString>;
|
|
13
|
+
mode: z.ZodOptional<z.ZodString>;
|
|
14
|
+
source: z.ZodEnum<{
|
|
15
|
+
dispatch_lanes: "dispatch_lanes";
|
|
16
|
+
collect_lane_results: "collect_lane_results";
|
|
17
|
+
}>;
|
|
18
|
+
text: z.ZodString;
|
|
19
|
+
chars: z.ZodNumber;
|
|
20
|
+
bytes: z.ZodNumber;
|
|
21
|
+
digest: z.ZodString;
|
|
22
|
+
messageCount: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
transcriptIncomplete: z.ZodOptional<z.ZodBoolean>;
|
|
24
|
+
createdAt: z.ZodString;
|
|
25
|
+
updatedAt: z.ZodString;
|
|
26
|
+
}, z.core.$strict>;
|
|
27
|
+
export type LaneOutputSource = z.infer<typeof LaneOutputArtifactSchema>['source'];
|
|
28
|
+
export type LaneOutputArtifact = z.infer<typeof LaneOutputArtifactSchema>;
|
|
29
|
+
export interface StoreLaneOutputInput {
|
|
30
|
+
batchId: string;
|
|
31
|
+
laneId: string;
|
|
32
|
+
agent: string;
|
|
33
|
+
role: string;
|
|
34
|
+
sessionId?: string;
|
|
35
|
+
parentSessionId?: string;
|
|
36
|
+
mode?: string;
|
|
37
|
+
source: LaneOutputSource;
|
|
38
|
+
text: string;
|
|
39
|
+
messageCount?: number;
|
|
40
|
+
transcriptIncomplete?: boolean;
|
|
41
|
+
}
|
|
42
|
+
export interface StoreLaneOutputResult {
|
|
43
|
+
ref?: string;
|
|
44
|
+
digest: string;
|
|
45
|
+
chars: number;
|
|
46
|
+
bytes: number;
|
|
47
|
+
degraded: boolean;
|
|
48
|
+
error?: string;
|
|
49
|
+
}
|
|
50
|
+
export interface ReadLaneOutputResult {
|
|
51
|
+
artifact: LaneOutputArtifact;
|
|
52
|
+
}
|
|
53
|
+
export declare function storeLaneOutput(directory: string, input: StoreLaneOutputInput, now?: () => number): StoreLaneOutputResult;
|
|
54
|
+
export declare function readLaneOutput(directory: string, ref: string): ReadLaneOutputResult | null;
|
|
55
|
+
export declare function buildLaneOutputPreview(args: {
|
|
56
|
+
text: string;
|
|
57
|
+
ref?: string;
|
|
58
|
+
degraded?: boolean;
|
|
59
|
+
maxChars: number;
|
|
60
|
+
}): {
|
|
61
|
+
output: string;
|
|
62
|
+
output_chars: number;
|
|
63
|
+
output_truncated: boolean;
|
|
64
|
+
};
|
|
65
|
+
export declare function paginateLaneOutput(text: string, offset: number, limit: number): {
|
|
66
|
+
totalLines: number;
|
|
67
|
+
startLine: number;
|
|
68
|
+
endLine: number;
|
|
69
|
+
content: string;
|
|
70
|
+
exhausted: boolean;
|
|
71
|
+
};
|
|
72
|
+
export {};
|
|
@@ -80,6 +80,12 @@ export interface BackgroundDelegationResult {
|
|
|
80
80
|
chars: number;
|
|
81
81
|
truncated: boolean;
|
|
82
82
|
digest: string;
|
|
83
|
+
outputRef?: string;
|
|
84
|
+
outputPreviewChars?: number;
|
|
85
|
+
outputDegraded?: boolean;
|
|
86
|
+
outputArtifactError?: string;
|
|
87
|
+
transcriptIncomplete?: boolean;
|
|
88
|
+
messageCount?: number;
|
|
83
89
|
}
|
|
84
90
|
/**
|
|
85
91
|
* Read and fold the store to the latest snapshot per correlationId. Lock-free and
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
SandboxCapabilityProbe,
|
|
4
|
+
init_capability_probe,
|
|
5
|
+
isBubblewrapAvailable,
|
|
6
|
+
isSandboxExecAvailable,
|
|
7
|
+
isWindowsSandboxAvailable
|
|
8
|
+
} from "./index-hz59hg4h.js";
|
|
9
|
+
import"./index-yx44zd0p.js";
|
|
10
|
+
import"./index-a76rekgs.js";
|
|
11
|
+
init_capability_probe();
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
isWindowsSandboxAvailable,
|
|
15
|
+
isSandboxExecAvailable,
|
|
16
|
+
isBubblewrapAvailable,
|
|
17
|
+
SandboxCapabilityProbe
|
|
18
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
applySafeAutoFixes,
|
|
4
|
+
createConfigBackup,
|
|
5
|
+
detectStraySwarmDirs,
|
|
6
|
+
getConfigPaths,
|
|
7
|
+
readDoctorArtifact,
|
|
8
|
+
removeStraySwarmDir,
|
|
9
|
+
restoreFromBackup,
|
|
10
|
+
runConfigDoctor,
|
|
11
|
+
runConfigDoctorWithFixes,
|
|
12
|
+
shouldRunOnStartup,
|
|
13
|
+
writeBackupArtifact,
|
|
14
|
+
writeDoctorArtifact
|
|
15
|
+
} from "./index-0sxvwjt0.js";
|
|
16
|
+
import"./index-hw9b2xng.js";
|
|
17
|
+
import"./index-zfsbaaqh.js";
|
|
18
|
+
import"./index-p0arc26j.js";
|
|
19
|
+
import"./index-yx44zd0p.js";
|
|
20
|
+
import"./index-293f68mj.js";
|
|
21
|
+
import"./index-a76rekgs.js";
|
|
22
|
+
export {
|
|
23
|
+
writeDoctorArtifact,
|
|
24
|
+
writeBackupArtifact,
|
|
25
|
+
shouldRunOnStartup,
|
|
26
|
+
runConfigDoctorWithFixes,
|
|
27
|
+
runConfigDoctor,
|
|
28
|
+
restoreFromBackup,
|
|
29
|
+
removeStraySwarmDir,
|
|
30
|
+
readDoctorArtifact,
|
|
31
|
+
getConfigPaths,
|
|
32
|
+
detectStraySwarmDirs,
|
|
33
|
+
createConfigBackup,
|
|
34
|
+
applySafeAutoFixes
|
|
35
|
+
};
|