opencode-swarm 5.1.3 → 5.1.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 CHANGED
@@ -1,9 +1,9 @@
1
1
  <p align="center">
2
- <img src="https://img.shields.io/badge/version-5.0.0-blue" alt="Version">
2
+ <img src="https://img.shields.io/badge/version-5.1.4-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-8-orange" alt="Agents">
6
- <img src="https://img.shields.io/badge/tests-876-brightgreen" alt="Tests">
5
+ <img src="https://img.shields.io/badge/agents-7-orange" alt="Agents">
6
+ <img src="https://img.shields.io/badge/tests-1027-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
- - **208 new tests** — 876 total tests across 39 files (up from 668 in v4.6.0).
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
- > **Built-in Architect Defaults:** The architect agent automatically receives higher limits
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
- 876 unit tests across 39 files covering config, tools, agents, hooks, commands, state, guardrails, evidence, and plan schemas. Uses Bun's built-in test runner — zero additional test dependencies.
567
+ 1027 unit tests across 44 files covering config, tools, agents, hooks, commands, state, guardrails, evidence, and plan schemas. 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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "5.1.3",
3
+ "version": "5.1.4",
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",