opencode-swarm-plugin 0.31.7 → 0.32.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/.turbo/turbo-build.log +10 -9
- package/.turbo/turbo-test.log +319 -317
- package/CHANGELOG.md +134 -0
- package/README.md +7 -4
- package/bin/swarm.ts +388 -128
- package/dist/compaction-hook.d.ts +1 -1
- package/dist/compaction-hook.d.ts.map +1 -1
- package/dist/hive.d.ts.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +123 -134
- package/dist/memory-tools.d.ts.map +1 -1
- package/dist/memory.d.ts +5 -4
- package/dist/memory.d.ts.map +1 -1
- package/dist/plugin.js +118 -131
- package/dist/swarm-orchestrate.d.ts +29 -5
- package/dist/swarm-orchestrate.d.ts.map +1 -1
- package/dist/swarm-prompts.d.ts +7 -0
- package/dist/swarm-prompts.d.ts.map +1 -1
- package/dist/swarm.d.ts +0 -2
- package/dist/swarm.d.ts.map +1 -1
- package/evals/lib/{data-loader.test.ts → data-loader.evalite-test.ts} +7 -6
- package/evals/lib/data-loader.ts +1 -1
- package/evals/scorers/{outcome-scorers.test.ts → outcome-scorers.evalite-test.ts} +1 -1
- package/examples/plugin-wrapper-template.ts +19 -4
- package/global-skills/swarm-coordination/SKILL.md +118 -8
- package/package.json +2 -2
- package/src/compaction-hook.ts +5 -3
- package/src/hive.integration.test.ts +83 -1
- package/src/hive.ts +37 -12
- package/src/mandate-storage.integration.test.ts +601 -0
- package/src/memory-tools.ts +6 -4
- package/src/memory.integration.test.ts +117 -49
- package/src/memory.test.ts +41 -217
- package/src/memory.ts +12 -8
- package/src/repo-crawl.integration.test.ts +441 -0
- package/src/skills.integration.test.ts +1056 -0
- package/src/structured.integration.test.ts +817 -0
- package/src/swarm-deferred.integration.test.ts +157 -0
- package/src/swarm-deferred.test.ts +38 -0
- package/src/swarm-mail.integration.test.ts +15 -19
- package/src/swarm-orchestrate.integration.test.ts +282 -0
- package/src/swarm-orchestrate.ts +96 -201
- package/src/swarm-prompts.test.ts +92 -0
- package/src/swarm-prompts.ts +69 -0
- package/src/swarm-review.integration.test.ts +290 -0
- package/src/swarm.integration.test.ts +23 -20
- package/src/tool-adapter.integration.test.ts +1221 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,139 @@
|
|
|
1
1
|
# opencode-swarm-plugin
|
|
2
2
|
|
|
3
|
+
## 0.32.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#54](https://github.com/joelhooks/swarm-tools/pull/54) [`358e18f`](https://github.com/joelhooks/swarm-tools/commit/358e18f0f7f18d03492ef16c2c1d3edd85c00101) Thanks [@joelhooks](https://github.com/joelhooks)! - ## 🔍 Coordinator Review Gate + UBS Removal
|
|
8
|
+
|
|
9
|
+
> _"This asynchronous back and forth between submitter and reviewer can add days to the process of getting changes made. Do Code Reviews Promptly!"_
|
|
10
|
+
> — Sam Newman, _Building Microservices_
|
|
11
|
+
|
|
12
|
+
Two changes that make swarm coordination tighter:
|
|
13
|
+
|
|
14
|
+
### Coordinator Review Tools
|
|
15
|
+
|
|
16
|
+
New tools for coordinators to review worker output before approval:
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
┌─────────────────────────────────────────────────────┐
|
|
20
|
+
│ COORDINATOR REVIEW FLOW │
|
|
21
|
+
├─────────────────────────────────────────────────────┤
|
|
22
|
+
│ 1. Worker completes → sends completion message │
|
|
23
|
+
│ 2. Coordinator: swarm_review(task_id, files) │
|
|
24
|
+
│ → Gets diff + epic context + review prompt │
|
|
25
|
+
│ 3. Coordinator reviews against epic goals │
|
|
26
|
+
│ 4. swarm_review_feedback(status, issues) │
|
|
27
|
+
│ → approved: worker can finalize │
|
|
28
|
+
│ → needs_changes: worker gets feedback │
|
|
29
|
+
│ 5. 3-strike rule: 3 rejections = blocked │
|
|
30
|
+
└─────────────────────────────────────────────────────┘
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**New tools:**
|
|
34
|
+
|
|
35
|
+
- `swarm_review` - Generate review prompt with epic context + git diff
|
|
36
|
+
- `swarm_review_feedback` - Send approval/rejection with structured issues
|
|
37
|
+
|
|
38
|
+
**Updated prompts:**
|
|
39
|
+
|
|
40
|
+
- Coordinator prompt now includes review checklist
|
|
41
|
+
- Worker prompt explains the review gate
|
|
42
|
+
- Skills updated with review patterns
|
|
43
|
+
|
|
44
|
+
### UBS Scan Removed from swarm_complete
|
|
45
|
+
|
|
46
|
+
The `skip_ubs_scan` parameter is gone. UBS was already disabled in v0.31 for performance - this cleans up the vestigial code.
|
|
47
|
+
|
|
48
|
+
**Removed:**
|
|
49
|
+
|
|
50
|
+
- `skip_ubs_scan` parameter from schema
|
|
51
|
+
- `ubs_scan` deprecation object from output
|
|
52
|
+
- All UBS-related helper functions
|
|
53
|
+
- ~100 lines of dead code
|
|
54
|
+
|
|
55
|
+
**If you need UBS scanning:** Run it manually before commit:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
ubs scan src/
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### CLI Improvements
|
|
62
|
+
|
|
63
|
+
The `swarm` CLI got smarter:
|
|
64
|
+
|
|
65
|
+
- Better error messages for missing dependencies
|
|
66
|
+
- Cleaner output formatting
|
|
67
|
+
- Improved help text
|
|
68
|
+
|
|
69
|
+
### Patch Changes
|
|
70
|
+
|
|
71
|
+
- [#54](https://github.com/joelhooks/swarm-tools/pull/54) [`358e18f`](https://github.com/joelhooks/swarm-tools/commit/358e18f0f7f18d03492ef16c2c1d3edd85c00101) Thanks [@joelhooks](https://github.com/joelhooks)! - ## 🧪 Integration Test Coverage: 0% → 95%
|
|
72
|
+
|
|
73
|
+
> _"Many characterization tests look like 'sunny day' tests. They don't test many special conditions; they just verify that particular behaviors are present. From their presence, we can infer that refactoring hasn't broken anything."_
|
|
74
|
+
> — Michael Feathers, _Working Effectively with Legacy Code_
|
|
75
|
+
|
|
76
|
+
We had a bug that broke ALL swarm tools:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
Error: [streams/store] dbOverride parameter is required for this function.
|
|
80
|
+
PGlite getDatabase() has been removed.
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**Why didn't tests catch it?** No integration tests exercised the full tool → store → DB path.
|
|
84
|
+
|
|
85
|
+
**Now they do.**
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
89
|
+
│ tool-adapter.integration.test.ts │
|
|
90
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
91
|
+
│ 20 tests | 75 assertions | 1.3s │
|
|
92
|
+
│ │
|
|
93
|
+
│ ✅ swarmmail_* tools (6 tests) │
|
|
94
|
+
│ ✅ hive_* tools (7 tests) │
|
|
95
|
+
│ ✅ swarm_progress, swarm_status (2 tests) │
|
|
96
|
+
│ ✅ swarm_broadcast, swarm_checkpoint (2 tests) │
|
|
97
|
+
│ ✅ semantic_memory_store, semantic_memory_find (2 tests) │
|
|
98
|
+
│ ✅ Smoke test - 9 tools in sequence (1 test) │
|
|
99
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### What's Tested
|
|
103
|
+
|
|
104
|
+
Each test calls `tool.execute()` and verifies:
|
|
105
|
+
|
|
106
|
+
1. No "dbOverride required" error (the bug symptom)
|
|
107
|
+
2. Tool returns expected structure
|
|
108
|
+
3. Full path works: tool → store → DB → response
|
|
109
|
+
|
|
110
|
+
### The Smoke Test
|
|
111
|
+
|
|
112
|
+
Runs 9 tools in sequence to catch interaction bugs:
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
swarmmail_init → hive_create → swarmmail_reserve → swarm_progress
|
|
116
|
+
→ semantic_memory_store → semantic_memory_find → swarmmail_send
|
|
117
|
+
→ hive_close → swarmmail_release
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
If ANY step throws "dbOverride required", the test fails.
|
|
121
|
+
|
|
122
|
+
### Also Fixed
|
|
123
|
+
|
|
124
|
+
- **Auto-adapter creation** in store.ts - functions now auto-create adapters when not provided
|
|
125
|
+
- **Exported `clearAdapterCache()`** for test isolation
|
|
126
|
+
- **Migrated test files** from old `getDatabase()` to adapter pattern
|
|
127
|
+
|
|
128
|
+
### Mandatory Coordinator Review Loop
|
|
129
|
+
|
|
130
|
+
Added `COORDINATOR_POST_WORKER_CHECKLIST` constant and `post_completion_instructions` field to `swarm_spawn_subtask`. Coordinators now get explicit instructions to review worker output before spawning the next worker.
|
|
131
|
+
|
|
132
|
+
The "dbOverride required" bug **cannot recur undetected**.
|
|
133
|
+
|
|
134
|
+
- Updated dependencies [[`358e18f`](https://github.com/joelhooks/swarm-tools/commit/358e18f0f7f18d03492ef16c2c1d3edd85c00101), [`358e18f`](https://github.com/joelhooks/swarm-tools/commit/358e18f0f7f18d03492ef16c2c1d3edd85c00101), [`358e18f`](https://github.com/joelhooks/swarm-tools/commit/358e18f0f7f18d03492ef16c2c1d3edd85c00101), [`358e18f`](https://github.com/joelhooks/swarm-tools/commit/358e18f0f7f18d03492ef16c2c1d3edd85c00101)]:
|
|
135
|
+
- swarm-mail@1.3.0
|
|
136
|
+
|
|
3
137
|
## 0.31.7
|
|
4
138
|
|
|
5
139
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -27,6 +27,9 @@ ollama serve &
|
|
|
27
27
|
ollama pull mxbai-embed-large
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
+
> *"High-variability sequencing of whole-task problems."*
|
|
31
|
+
> — 4C/ID Instructional Design Model
|
|
32
|
+
|
|
30
33
|
## Features
|
|
31
34
|
|
|
32
35
|
- **Swarm Coordination** - Break tasks into parallel subtasks, spawn worker agents
|
|
@@ -85,7 +88,7 @@ ollama pull mxbai-embed-large
|
|
|
85
88
|
| `swarm_init` | Initialize swarm session |
|
|
86
89
|
| `swarm_status` | Get swarm progress by epic ID |
|
|
87
90
|
| `swarm_progress` | Report subtask progress to coordinator |
|
|
88
|
-
| `swarm_complete` | Complete subtask (
|
|
91
|
+
| `swarm_complete` | Complete subtask (releases reservations) |
|
|
89
92
|
| `swarm_record_outcome` | Record outcome for learning |
|
|
90
93
|
| `swarm_checkpoint` | Save progress snapshot (auto at 25/50/75%) |
|
|
91
94
|
| `swarm_recover` | Resume from checkpoint (returns full context) |
|
|
@@ -111,10 +114,10 @@ Ensures work survives context compaction or crashes. Proven by 9 integration tes
|
|
|
111
114
|
|
|
112
115
|
### Auto-Checkpoint Milestones
|
|
113
116
|
|
|
114
|
-
When `swarm_progress` reports 25%, 50%, or 75% completion, a checkpoint is automatically saved to
|
|
117
|
+
When `swarm_progress` reports 25%, 50%, or 75% completion, a checkpoint is automatically saved to libSQL:
|
|
115
118
|
|
|
116
119
|
```typescript
|
|
117
|
-
// Stored in
|
|
120
|
+
// Stored in system temp directory (no external database needed)
|
|
118
121
|
{
|
|
119
122
|
epic_id: "hv-123",
|
|
120
123
|
cell_id: "hv-123.1",
|
|
@@ -247,7 +250,7 @@ pip install -e .
|
|
|
247
250
|
**Why install these?**
|
|
248
251
|
|
|
249
252
|
- **CASS** - When you run `/swarm "Add OAuth"`, the coordinator queries CASS for similar past tasks. Without it, decomposition is based only on the current task description.
|
|
250
|
-
- **UBS** -
|
|
253
|
+
- **UBS** - Run manually on code to catch bugs before commit. Not integrated into swarm workflow but recommended for pre-commit validation.
|
|
251
254
|
- **Ollama** - Enables vector similarity search for semantic memory. Without it, memory falls back to full-text search (still functional, less semantic).
|
|
252
255
|
|
|
253
256
|
Run `swarm doctor` to check which dependencies are installed.
|