opencode-swarm-plugin 0.35.0 → 0.36.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-test.log +333 -333
- package/CHANGELOG.md +62 -0
- package/examples/plugin-wrapper-template.ts +447 -33
- package/package.json +1 -1
- package/src/compaction-hook.test.ts +226 -280
- package/src/compaction-hook.ts +190 -42
- package/src/eval-capture.ts +5 -6
- package/src/index.ts +21 -1
- package/src/learning.integration.test.ts +0 -2
- package/src/schemas/task.ts +0 -1
- package/src/swarm-decompose.ts +1 -8
- package/src/swarm.integration.test.ts +0 -40
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,67 @@
|
|
|
1
1
|
# opencode-swarm-plugin
|
|
2
2
|
|
|
3
|
+
## 0.36.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`ae213aa`](https://github.com/joelhooks/swarm-tools/commit/ae213aa49be977e425e0a767b5b2db16e462f76b) Thanks [@joelhooks](https://github.com/joelhooks)! - ## 🔬 Compaction Hook: Now With X-Ray Vision
|
|
8
|
+
|
|
9
|
+
The compaction hook was logging to `console.log` like a caveman. Now it writes structured JSON logs to `~/.config/swarm-tools/logs/compaction.log` - visible via `swarm log compaction`.
|
|
10
|
+
|
|
11
|
+
**The Problem:**
|
|
12
|
+
|
|
13
|
+
- Plugin wrapper used `console.log` → stdout → invisible
|
|
14
|
+
- npm package had pino logging → but wrapper didn't use it
|
|
15
|
+
- Running `/compact` gave zero visibility into what happened
|
|
16
|
+
|
|
17
|
+
**The Fix:**
|
|
18
|
+
Added comprehensive file-based logging throughout the compaction flow:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
22
|
+
│ COMPACTION LOGGING │
|
|
23
|
+
├─────────────────────────────────────────────────────────────┤
|
|
24
|
+
│ compaction_hook_invoked │ Full input/output objects │
|
|
25
|
+
│ detect_swarm_* │ CLI calls, cells, confidence │
|
|
26
|
+
│ query_swarm_state_* │ Epic/subtask extraction │
|
|
27
|
+
│ generate_compaction_prompt_*│ LLM timing, success/failure │
|
|
28
|
+
│ context_injected_via_* │ Which API used │
|
|
29
|
+
│ compaction_complete_* │ Final result + timing │
|
|
30
|
+
└─────────────────────────────────────────────────────────────┘
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**Also Enhanced:**
|
|
34
|
+
|
|
35
|
+
- SDK message scanning for precise swarm state extraction
|
|
36
|
+
- Merged scanned state (ground truth) with hive detection (heuristic)
|
|
37
|
+
- 9 new tests for `scanSessionMessages()` (32 total passing)
|
|
38
|
+
|
|
39
|
+
**To See It Work:**
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
swarm setup --reinstall # Regenerate plugin wrapper
|
|
43
|
+
# Run /compact in OpenCode
|
|
44
|
+
swarm log compaction # See what happened
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Patch Changes
|
|
48
|
+
|
|
49
|
+
- [`5cfc42e`](https://github.com/joelhooks/swarm-tools/commit/5cfc42e93d3e5424e308857a40af4fd9fbda0ba3) Thanks [@joelhooks](https://github.com/joelhooks)! - ## 🐝 Swarm Workers Unchained
|
|
50
|
+
|
|
51
|
+
Removed the vestigial `max_subtasks` parameter from decomposition tools. It was dead code - the prompts already say "as many as needed" and the replacement was doing nothing.
|
|
52
|
+
|
|
53
|
+
**What changed:**
|
|
54
|
+
|
|
55
|
+
- Removed `max_subtasks` arg from `swarm_decompose`, `swarm_plan_prompt`, `swarm_delegate_planning`
|
|
56
|
+
- Removed from `DecomposeArgsSchema`
|
|
57
|
+
- Renamed `max_subtasks` → `subtask_count` in eval capture (records actual count, not a limit)
|
|
58
|
+
- Cleaned up tests that were passing the unused parameter
|
|
59
|
+
|
|
60
|
+
**Why it matters:**
|
|
61
|
+
The LLM decides how many subtasks based on task complexity, not an arbitrary cap. "Plan aggressively" means spawn as many workers as the task needs.
|
|
62
|
+
|
|
63
|
+
**No functional change** - the parameter wasn't being used anyway.
|
|
64
|
+
|
|
3
65
|
## 0.35.0
|
|
4
66
|
|
|
5
67
|
### Minor Changes
|