opencode-swarm 6.29.2 → 6.29.4
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/README.md +49 -13
- package/dist/cli/index.js +15 -12
- package/dist/hooks/incremental-verify.d.ts +2 -1
- package/dist/index.js +322 -204
- package/dist/tools/test-runner.d.ts +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -37,11 +37,12 @@ Swarm then:
|
|
|
37
37
|
5. Sends that plan through a critic gate before coding starts.
|
|
38
38
|
6. Executes one task at a time through the QA pipeline:
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
* coder writes code
|
|
41
|
+
* automated checks run
|
|
42
|
+
* reviewer checks correctness
|
|
43
|
+
* test engineer writes and runs tests
|
|
44
|
+
* architect runs regression sweep (scope:"graph" to find cross-task test regressions)
|
|
45
|
+
* failures loop back with structured feedback
|
|
45
46
|
|
|
46
47
|
7. After each phase, docs and retrospectives are updated.
|
|
47
48
|
|
|
@@ -49,10 +50,13 @@ All project state lives in `.swarm/`:
|
|
|
49
50
|
|
|
50
51
|
```text
|
|
51
52
|
.swarm/
|
|
52
|
-
├── plan.md
|
|
53
|
-
├──
|
|
54
|
-
├──
|
|
55
|
-
|
|
53
|
+
├── plan.md # Project roadmap with phases and tasks
|
|
54
|
+
├── plan.json # Structured plan data
|
|
55
|
+
├── context.md # Technical decisions and SME guidance
|
|
56
|
+
├── events.jsonl # Event stream for diagnostics
|
|
57
|
+
├── evidence/ # Review/test evidence bundles per task
|
|
58
|
+
├── curator-summary.json # Curator system state (if enabled)
|
|
59
|
+
└── drift-report-phase-N.json # Plan-vs-reality drift reports
|
|
56
60
|
```
|
|
57
61
|
|
|
58
62
|
That means Swarm is resumable by design. If you come back later and `.swarm/` already exists, the architect may go straight into **RESUME** or **EXECUTE** instead of replaying the full first-run discovery flow.
|
|
@@ -325,8 +329,9 @@ MODE: EXECUTE (per task)
|
|
|
325
329
|
├── 5i. @reviewer (security pass, if security-sensitive files changed)
|
|
326
330
|
├── 5j. @test_engineer (verification tests + coverage ≥70%)
|
|
327
331
|
├── 5k. @test_engineer (adversarial tests)
|
|
328
|
-
├── 5l.
|
|
329
|
-
|
|
332
|
+
├── 5l. architect regression sweep (scope:"graph" to find cross-task test regressions)
|
|
333
|
+
├── 5m. ⛔ Pre-commit checklist (all 4 items required, no override)
|
|
334
|
+
└── 5n. Task marked complete, evidence written
|
|
330
335
|
```
|
|
331
336
|
|
|
332
337
|
If any step fails, the coder gets structured feedback and retries. After 5 failures on the same task, it escalates to you.
|
|
@@ -936,6 +941,33 @@ The following tools can be assigned to agents via overrides:
|
|
|
936
941
|
|
|
937
942
|
## Recent Changes
|
|
938
943
|
|
|
944
|
+
### v6.29.3 — Curator Visibility + Documentation Refresh
|
|
945
|
+
|
|
946
|
+
This release adds Curator status reporting to `/swarm diagnose` and refreshes documentation to reflect current behavior.
|
|
947
|
+
|
|
948
|
+
- **Curator status in diagnose**: `/swarm diagnose` now reports whether Curator is enabled/disabled and validates the `curator-summary.json` artifact if present.
|
|
949
|
+
- **README and config docs refreshed**: Updated `.swarm/` directory tree, Curator configuration options, and drift report artifacts to match current implementation.
|
|
950
|
+
|
|
951
|
+
### v6.29.2 — Multi-Language Incremental Verify + Slop-Detector Hardening
|
|
952
|
+
|
|
953
|
+
This release adds multi-language typecheck support and hardens detection of low-quality AI-generated code.
|
|
954
|
+
|
|
955
|
+
- **Multi-language incremental_verify**: Post-coder typecheck now supports TypeScript/JavaScript, Go, Rust, and C#. Runs language-appropriate build/typecheck commands per task for faster feedback.
|
|
956
|
+
- **Slop-detector hardening**: Enhanced detection of AI-generated placeholder code with multi-language heuristics (comments like `// TODO`, `// FIXME`, `// HACK`, language-specific patterns for Go/Rust/C#/Python). Advisory warnings injected into coder context when slop patterns detected.
|
|
957
|
+
- **CODEBASE REALITY CHECK**: Architect dispatches Explorer before planning to verify current state of referenced items. Produces a CODEBASE REALITY REPORT with statuses: NOT STARTED, PARTIALLY DONE, ALREADY COMPLETE, or ASSUMPTION INCORRECT. Skipped for greenfield projects.
|
|
958
|
+
- **Evidence schema fix**: Evidence bundles now correctly validate against schema; invalid entries are filtered.
|
|
959
|
+
- **Curator/docs alignment**: Curator health check in `/swarm diagnose` reports curator.enabled status and validates curator-summary.json.
|
|
960
|
+
|
|
961
|
+
### v6.29.1 — Advisory Hook Message Injection
|
|
962
|
+
|
|
963
|
+
This release improves how advisory warnings are injected into agent context.
|
|
964
|
+
|
|
965
|
+
- **Advisory hook message injection**: Enhanced message formatting for self-coding detection, partial gate tracking, batch detection, and scope violation warnings. Messages now include structured context for faster resolution.
|
|
966
|
+
|
|
967
|
+
### v6.23 through v6.28 — Stability and Incremental Improvements
|
|
968
|
+
|
|
969
|
+
Subsequent releases focused on stability hardening, incremental_verify scaffolding, and tooling improvements across the pipeline. Key areas: pre_check_batch parallelization, evidence bundle validation, and diagnostics tooling.
|
|
970
|
+
|
|
939
971
|
### v6.22 — Curator Background Analysis + Session State Persistence
|
|
940
972
|
|
|
941
973
|
This release adds the optional Curator system for phase-level intelligence and fixes session snapshot persistence for task workflow states.
|
|
@@ -1118,12 +1150,16 @@ OpenCode Swarm v6.16+ ships with language profiles for 11 languages across three
|
|
|
1118
1150
|
|
|
1119
1151
|
The Curator is an optional background analysis system that runs after each phase. It is **disabled by default** (`curator.enabled = false`) and never blocks execution — all Curator operations are wrapped in try/catch.
|
|
1120
1152
|
|
|
1153
|
+
To enable, set `"curator": { "enabled": true }` in your config. When enabled, it writes `.swarm/curator-summary.json` and `.swarm/drift-report-phase-N.json` files.
|
|
1154
|
+
|
|
1121
1155
|
### What the Curator Does
|
|
1122
1156
|
|
|
1123
|
-
- **Init** (`phase-monitor.ts`): On the first phase, initializes a curator summary file at `.swarm/curator-summary.json`.
|
|
1157
|
+
- **Init** (`phase-monitor.ts`): On the first phase, initializes a curator summary file at `.swarm/curator-summary.json` and persists the init briefing to `.swarm/curator-briefing.md`.
|
|
1124
1158
|
- **Phase analysis** (`phase-complete.ts`): After each phase completes, collects phase events, checks compliance, and optionally invokes the curator explorer to summarize findings.
|
|
1159
|
+
- **Compliance surfacing** (`phase-complete.ts`): Compliance observations are surfaced in the return value's warnings array (unless `suppress_warnings` is true).
|
|
1125
1160
|
- **Knowledge updates** (`phase-complete.ts`): Merges curator findings into the knowledge base up to the configured `max_summary_tokens` cap.
|
|
1126
|
-
- **
|
|
1161
|
+
- **Briefing injection** (`knowledge-injector.ts`): The curator-briefing.md content is injected into the architect's context at session start.
|
|
1162
|
+
- **Drift injection** (`knowledge-injector.ts`): Prepends the latest drift report summary to the architect's knowledge context at phase start, up to `drift_inject_max_chars` characters. Drift reports now inject even when no knowledge entries exist.
|
|
1127
1163
|
|
|
1128
1164
|
### Configuration
|
|
1129
1165
|
|
package/dist/cli/index.js
CHANGED
|
@@ -34775,7 +34775,8 @@ var test_runner = createSwarmTool({
|
|
|
34775
34775
|
scope: tool.schema.enum(["all", "convention", "graph"]).optional().describe('Test scope: "all" runs full suite, "convention" maps source files to test files by naming, "graph" finds related tests via imports'),
|
|
34776
34776
|
files: tool.schema.array(tool.schema.string()).optional().describe("Specific files to test (used with convention or graph scope)"),
|
|
34777
34777
|
coverage: tool.schema.boolean().optional().describe("Enable coverage reporting if supported"),
|
|
34778
|
-
timeout_ms: tool.schema.number().optional().describe("Timeout in milliseconds (default 60000, max 300000)")
|
|
34778
|
+
timeout_ms: tool.schema.number().optional().describe("Timeout in milliseconds (default 60000, max 300000)"),
|
|
34779
|
+
allow_full_suite: tool.schema.boolean().optional().describe('Explicit opt-in for scope "all". Required because full-suite output can destabilize SSE streaming.')
|
|
34779
34780
|
},
|
|
34780
34781
|
async execute(args, directory) {
|
|
34781
34782
|
const workingDir = directory.trim() || directory;
|
|
@@ -34827,14 +34828,16 @@ var test_runner = createSwarmTool({
|
|
|
34827
34828
|
}
|
|
34828
34829
|
const scope = args.scope || "all";
|
|
34829
34830
|
if (scope === "all") {
|
|
34830
|
-
|
|
34831
|
-
|
|
34832
|
-
|
|
34833
|
-
|
|
34834
|
-
|
|
34835
|
-
|
|
34836
|
-
|
|
34837
|
-
|
|
34831
|
+
if (!args.allow_full_suite) {
|
|
34832
|
+
const errorResult = {
|
|
34833
|
+
success: false,
|
|
34834
|
+
framework: "none",
|
|
34835
|
+
scope: "all",
|
|
34836
|
+
error: 'Full-suite test execution (scope: "all") requires allow_full_suite: true',
|
|
34837
|
+
message: 'Set allow_full_suite: true to confirm intentional full-suite execution. Use scope "convention" or "graph" for targeted tests. Full-suite output is large and may destabilize SSE streaming on some opencode versions.'
|
|
34838
|
+
};
|
|
34839
|
+
return JSON.stringify(errorResult, null, 2);
|
|
34840
|
+
}
|
|
34838
34841
|
}
|
|
34839
34842
|
if ((scope === "convention" || scope === "graph") && (!args.files || args.files.length === 0)) {
|
|
34840
34843
|
const errorResult = {
|
|
@@ -34869,7 +34872,7 @@ var test_runner = createSwarmTool({
|
|
|
34869
34872
|
let testFiles = [];
|
|
34870
34873
|
let graphFallbackReason;
|
|
34871
34874
|
let effectiveScope = scope;
|
|
34872
|
-
if (scope === "convention") {
|
|
34875
|
+
if (scope === "all") {} else if (scope === "convention") {
|
|
34873
34876
|
const sourceFiles = args.files.filter((f) => {
|
|
34874
34877
|
const ext = path13.extname(f).toLowerCase();
|
|
34875
34878
|
return SOURCE_EXTENSIONS.has(ext);
|
|
@@ -34909,7 +34912,7 @@ var test_runner = createSwarmTool({
|
|
|
34909
34912
|
testFiles = getTestFilesFromConvention(sourceFiles);
|
|
34910
34913
|
}
|
|
34911
34914
|
}
|
|
34912
|
-
if (testFiles.length === 0) {
|
|
34915
|
+
if (scope !== "all" && testFiles.length === 0) {
|
|
34913
34916
|
const errorResult = {
|
|
34914
34917
|
success: false,
|
|
34915
34918
|
framework,
|
|
@@ -34919,7 +34922,7 @@ var test_runner = createSwarmTool({
|
|
|
34919
34922
|
};
|
|
34920
34923
|
return JSON.stringify(errorResult, null, 2);
|
|
34921
34924
|
}
|
|
34922
|
-
if (testFiles.length > MAX_SAFE_TEST_FILES) {
|
|
34925
|
+
if (scope !== "all" && testFiles.length > MAX_SAFE_TEST_FILES) {
|
|
34923
34926
|
const sampleFiles = testFiles.slice(0, 5);
|
|
34924
34927
|
const errorResult = {
|
|
34925
34928
|
success: false,
|
|
@@ -24,7 +24,8 @@ export declare function resetAdvisoryDedup(): void;
|
|
|
24
24
|
* or null overall if no supported language is detected.
|
|
25
25
|
* Checks in order: TypeScript (package.json) → Go (go.mod) → Rust (Cargo.toml)
|
|
26
26
|
* → Python (pyproject.toml/requirements.txt/setup.py) → C# (*.csproj/*.sln)
|
|
27
|
-
* First match wins; package.json
|
|
27
|
+
* First match wins; package.json only short-circuits when TypeScript markers are present.
|
|
28
|
+
* Otherwise the function falls through to Go/Rust/Python/C# detection.
|
|
28
29
|
*/
|
|
29
30
|
declare function detectTypecheckCommand(projectDir: string): {
|
|
30
31
|
command: string[] | null;
|