opencode-swarm 5.1.3 → 5.1.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 +8 -8
- package/dist/index.js +10 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="https://img.shields.io/badge/version-5.
|
|
2
|
+
<img src="https://img.shields.io/badge/version-5.1.5-blue" alt="Version">
|
|
3
3
|
<img src="https://img.shields.io/badge/license-MIT-green" alt="License">
|
|
4
4
|
<img src="https://img.shields.io/badge/opencode-plugin-purple" alt="OpenCode Plugin">
|
|
5
|
-
<img src="https://img.shields.io/badge/agents-
|
|
6
|
-
<img src="https://img.shields.io/badge/tests-
|
|
5
|
+
<img src="https://img.shields.io/badge/agents-7-orange" alt="Agents">
|
|
6
|
+
<img src="https://img.shields.io/badge/tests-1034-brightgreen" alt="Tests">
|
|
7
7
|
</p>
|
|
8
8
|
|
|
9
9
|
<h1 align="center">🐝 OpenCode Swarm</h1>
|
|
@@ -341,7 +341,7 @@ bunx opencode-swarm uninstall --clean
|
|
|
341
341
|
- **Context injection budget** — `max_injection_tokens` config controls how much context is injected into system prompts. Priority-ordered: phase → task → decisions → agent context. Lower-priority items dropped when budget exhausted.
|
|
342
342
|
- **Enhanced `/swarm agents`** — Agent count summary, `⚡ custom limits` indicator for profiled agents, guardrail profiles section.
|
|
343
343
|
- **Packaging smoke tests** — CI-safe `dist/` validation (8 tests).
|
|
344
|
-
- **
|
|
344
|
+
- **151 new tests** — 1027 total tests across 44 files (up from 876 in v4.6.0).
|
|
345
345
|
|
|
346
346
|
### v4.6.0 — Agent Guardrails
|
|
347
347
|
- **Circuit breaker** — Two-layer protection against runaway agents. Soft warning at 50% of limits, hard block at 100%. Prevents infinite loops and runaway API costs.
|
|
@@ -422,6 +422,8 @@ All features are opt-in via configuration. See [Installation Guide](docs/install
|
|
|
422
422
|
| `/swarm reset --confirm` | Clear swarm state files (with safety gate) |
|
|
423
423
|
| `/swarm evidence [task]` | View evidence bundles for a task or all tasks |
|
|
424
424
|
| `/swarm archive [--dry-run]` | Archive old evidence bundles with retention policy |
|
|
425
|
+
| `/swarm benchmark` | Run performance benchmarks and display metrics |
|
|
426
|
+
| `/swarm retrieve [id]` | Retrieve auto-summarized tool outputs by ID |
|
|
425
427
|
|
|
426
428
|
---
|
|
427
429
|
|
|
@@ -508,9 +510,7 @@ Override limits for specific agents that need more (or less) room:
|
|
|
508
510
|
|
|
509
511
|
Profiles merge with base config — only specified fields are overridden.
|
|
510
512
|
|
|
511
|
-
> **
|
|
512
|
-
> (600 tool calls, 90 min duration, 8 consecutive errors, 0.7 warning threshold) without any
|
|
513
|
-
> configuration. These built-in defaults can be overridden via a `profiles.architect` entry.
|
|
513
|
+
> **Architect is exempt/unlimited by default:** The architect agent has no guardrail limits by default. To override, add a `profiles.architect` entry in your guardrails config.
|
|
514
514
|
|
|
515
515
|
### Disable Guardrails
|
|
516
516
|
|
|
@@ -564,7 +564,7 @@ bun test
|
|
|
564
564
|
bun test tests/unit/config/schema.test.ts
|
|
565
565
|
```
|
|
566
566
|
|
|
567
|
-
|
|
567
|
+
1034 tests across 45 files covering config, tools, agents, hooks, commands, state, guardrails, evidence, plan schemas, and circuit breaker race conditions. Uses Bun's built-in test runner — zero additional test dependencies.
|
|
568
568
|
|
|
569
569
|
## Troubleshooting
|
|
570
570
|
|
package/dist/index.js
CHANGED
|
@@ -16738,6 +16738,8 @@ function createDelegationTrackerHook(config2) {
|
|
|
16738
16738
|
if (session2) {
|
|
16739
16739
|
session2.delegationActive = false;
|
|
16740
16740
|
}
|
|
16741
|
+
swarmState.activeAgent.set(input.sessionID, ORCHESTRATOR_NAME);
|
|
16742
|
+
ensureAgentSession(input.sessionID, ORCHESTRATOR_NAME);
|
|
16741
16743
|
return;
|
|
16742
16744
|
}
|
|
16743
16745
|
const agentName = input.agent;
|
|
@@ -16776,6 +16778,13 @@ function createGuardrailsHooks(config2) {
|
|
|
16776
16778
|
if (strippedAgent === ORCHESTRATOR_NAME) {
|
|
16777
16779
|
return;
|
|
16778
16780
|
}
|
|
16781
|
+
const existingSession = swarmState.agentSessions.get(input.sessionID);
|
|
16782
|
+
if (existingSession) {
|
|
16783
|
+
const sessionAgent = stripKnownSwarmPrefix(existingSession.agentName);
|
|
16784
|
+
if (sessionAgent === ORCHESTRATOR_NAME) {
|
|
16785
|
+
return;
|
|
16786
|
+
}
|
|
16787
|
+
}
|
|
16779
16788
|
const agentName = swarmState.activeAgent.get(input.sessionID);
|
|
16780
16789
|
const session = ensureAgentSession(input.sessionID, agentName);
|
|
16781
16790
|
const resolvedName = stripKnownSwarmPrefix(session.agentName);
|
|
@@ -30156,7 +30165,7 @@ var OpenCodeSwarm = async (ctx) => {
|
|
|
30156
30165
|
if (session && activeAgent && activeAgent !== ORCHESTRATOR_NAME) {
|
|
30157
30166
|
const stripActive = stripKnownSwarmPrefix(activeAgent);
|
|
30158
30167
|
if (stripActive !== ORCHESTRATOR_NAME) {
|
|
30159
|
-
const staleDelegation = !session.delegationActive || Date.now() - session.lastToolCallTime >
|
|
30168
|
+
const staleDelegation = !session.delegationActive || Date.now() - session.lastToolCallTime > 1e4;
|
|
30160
30169
|
if (staleDelegation) {
|
|
30161
30170
|
swarmState.activeAgent.set(input.sessionID, ORCHESTRATOR_NAME);
|
|
30162
30171
|
ensureAgentSession(input.sessionID, ORCHESTRATOR_NAME);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.5",
|
|
4
4
|
"description": "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|