opencode-swarm 6.29.3 → 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 +13 -9
- package/dist/cli/index.js +15 -12
- package/dist/index.js +267 -203
- 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
|
|
|
@@ -328,8 +329,9 @@ MODE: EXECUTE (per task)
|
|
|
328
329
|
├── 5i. @reviewer (security pass, if security-sensitive files changed)
|
|
329
330
|
├── 5j. @test_engineer (verification tests + coverage ≥70%)
|
|
330
331
|
├── 5k. @test_engineer (adversarial tests)
|
|
331
|
-
├── 5l.
|
|
332
|
-
|
|
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
|
|
333
335
|
```
|
|
334
336
|
|
|
335
337
|
If any step fails, the coder gets structured feedback and retries. After 5 failures on the same task, it escalates to you.
|
|
@@ -1152,10 +1154,12 @@ To enable, set `"curator": { "enabled": true }` in your config. When enabled, it
|
|
|
1152
1154
|
|
|
1153
1155
|
### What the Curator Does
|
|
1154
1156
|
|
|
1155
|
-
- **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`.
|
|
1156
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).
|
|
1157
1160
|
- **Knowledge updates** (`phase-complete.ts`): Merges curator findings into the knowledge base up to the configured `max_summary_tokens` cap.
|
|
1158
|
-
- **
|
|
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.
|
|
1159
1163
|
|
|
1160
1164
|
### Configuration
|
|
1161
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,
|