opencode-swarm 6.29.3 → 6.29.5
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 +16 -12
- package/dist/index.js +271 -205
- package/dist/session/snapshot-writer.d.ts +1 -0
- 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
|
@@ -31005,6 +31005,7 @@ function serializeAgentSession(s) {
|
|
|
31005
31005
|
lastCompletedPhaseAgentsDispatched,
|
|
31006
31006
|
qaSkipCount: s.qaSkipCount ?? 0,
|
|
31007
31007
|
qaSkipTaskIds: s.qaSkipTaskIds ?? [],
|
|
31008
|
+
pendingAdvisoryMessages: s.pendingAdvisoryMessages ?? [],
|
|
31008
31009
|
taskWorkflowStates: Object.fromEntries(s.taskWorkflowStates ?? new Map),
|
|
31009
31010
|
...s.scopeViolationDetected !== undefined && {
|
|
31010
31011
|
scopeViolationDetected: s.scopeViolationDetected
|
|
@@ -34775,7 +34776,8 @@ var test_runner = createSwarmTool({
|
|
|
34775
34776
|
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
34777
|
files: tool.schema.array(tool.schema.string()).optional().describe("Specific files to test (used with convention or graph scope)"),
|
|
34777
34778
|
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)")
|
|
34779
|
+
timeout_ms: tool.schema.number().optional().describe("Timeout in milliseconds (default 60000, max 300000)"),
|
|
34780
|
+
allow_full_suite: tool.schema.boolean().optional().describe('Explicit opt-in for scope "all". Required because full-suite output can destabilize SSE streaming.')
|
|
34779
34781
|
},
|
|
34780
34782
|
async execute(args, directory) {
|
|
34781
34783
|
const workingDir = directory.trim() || directory;
|
|
@@ -34827,14 +34829,16 @@ var test_runner = createSwarmTool({
|
|
|
34827
34829
|
}
|
|
34828
34830
|
const scope = args.scope || "all";
|
|
34829
34831
|
if (scope === "all") {
|
|
34830
|
-
|
|
34831
|
-
|
|
34832
|
-
|
|
34833
|
-
|
|
34834
|
-
|
|
34835
|
-
|
|
34836
|
-
|
|
34837
|
-
|
|
34832
|
+
if (!args.allow_full_suite) {
|
|
34833
|
+
const errorResult = {
|
|
34834
|
+
success: false,
|
|
34835
|
+
framework: "none",
|
|
34836
|
+
scope: "all",
|
|
34837
|
+
error: 'Full-suite test execution (scope: "all") requires allow_full_suite: true',
|
|
34838
|
+
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.'
|
|
34839
|
+
};
|
|
34840
|
+
return JSON.stringify(errorResult, null, 2);
|
|
34841
|
+
}
|
|
34838
34842
|
}
|
|
34839
34843
|
if ((scope === "convention" || scope === "graph") && (!args.files || args.files.length === 0)) {
|
|
34840
34844
|
const errorResult = {
|
|
@@ -34869,7 +34873,7 @@ var test_runner = createSwarmTool({
|
|
|
34869
34873
|
let testFiles = [];
|
|
34870
34874
|
let graphFallbackReason;
|
|
34871
34875
|
let effectiveScope = scope;
|
|
34872
|
-
if (scope === "convention") {
|
|
34876
|
+
if (scope === "all") {} else if (scope === "convention") {
|
|
34873
34877
|
const sourceFiles = args.files.filter((f) => {
|
|
34874
34878
|
const ext = path13.extname(f).toLowerCase();
|
|
34875
34879
|
return SOURCE_EXTENSIONS.has(ext);
|
|
@@ -34909,7 +34913,7 @@ var test_runner = createSwarmTool({
|
|
|
34909
34913
|
testFiles = getTestFilesFromConvention(sourceFiles);
|
|
34910
34914
|
}
|
|
34911
34915
|
}
|
|
34912
|
-
if (testFiles.length === 0) {
|
|
34916
|
+
if (scope !== "all" && testFiles.length === 0) {
|
|
34913
34917
|
const errorResult = {
|
|
34914
34918
|
success: false,
|
|
34915
34919
|
framework,
|
|
@@ -34919,7 +34923,7 @@ var test_runner = createSwarmTool({
|
|
|
34919
34923
|
};
|
|
34920
34924
|
return JSON.stringify(errorResult, null, 2);
|
|
34921
34925
|
}
|
|
34922
|
-
if (testFiles.length > MAX_SAFE_TEST_FILES) {
|
|
34926
|
+
if (scope !== "all" && testFiles.length > MAX_SAFE_TEST_FILES) {
|
|
34923
34927
|
const sampleFiles = testFiles.slice(0, 5);
|
|
34924
34928
|
const errorResult = {
|
|
34925
34929
|
success: false,
|