opencode-swarm 4.1.0 → 4.2.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/README.md +16 -1
- package/dist/config/loader.d.ts +4 -0
- package/dist/index.js +3 -3
- package/dist/tools/file-extractor.d.ts +4 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="https://img.shields.io/badge/version-4.
|
|
2
|
+
<img src="https://img.shields.io/badge/version-4.2.0-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
5
|
<img src="https://img.shields.io/badge/agents-8-orange" alt="Agents">
|
|
6
|
+
<img src="https://img.shields.io/badge/tests-209-brightgreen" alt="Tests">
|
|
6
7
|
</p>
|
|
7
8
|
|
|
8
9
|
<h1 align="center">🐝 OpenCode Swarm</h1>
|
|
@@ -412,6 +413,20 @@ Create `~/.config/opencode/opencode-swarm.json`:
|
|
|
412
413
|
|
|
413
414
|
---
|
|
414
415
|
|
|
416
|
+
## Testing
|
|
417
|
+
|
|
418
|
+
```bash
|
|
419
|
+
# Run all tests
|
|
420
|
+
bun test
|
|
421
|
+
|
|
422
|
+
# Run specific test file
|
|
423
|
+
bun test tests/unit/config/schema.test.ts
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
209 unit tests across 9 files covering config, tools, agents, and hooks. Uses Bun's built-in test runner — zero additional test dependencies.
|
|
427
|
+
|
|
428
|
+
---
|
|
429
|
+
|
|
415
430
|
## Documentation
|
|
416
431
|
|
|
417
432
|
- [Architecture Deep Dive](docs/architecture.md)
|
package/dist/config/loader.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { type PluginConfig } from './schema';
|
|
2
|
+
/**
|
|
3
|
+
* Deep merge two objects, with override values taking precedence.
|
|
4
|
+
*/
|
|
5
|
+
export declare function deepMerge<T extends Record<string, unknown>>(base?: T, override?: T): T | undefined;
|
|
2
6
|
/**
|
|
3
7
|
* Load plugin configuration from user and project config files.
|
|
4
8
|
*
|
package/dist/index.js
CHANGED
|
@@ -13696,7 +13696,7 @@ You THINK. Subagents DO. You have the largest context window and strongest reaso
|
|
|
13696
13696
|
@{{AGENT_PREFIX}}sme - Domain expertise (any domain \u2014 the SME handles whatever you need: security, python, ios, kubernetes, etc.)
|
|
13697
13697
|
@{{AGENT_PREFIX}}coder - Implementation (one task at a time)
|
|
13698
13698
|
@{{AGENT_PREFIX}}reviewer - Code review (correctness, security, and any other dimensions you specify)
|
|
13699
|
-
@{{AGENT_PREFIX}}test_engineer - Test generation
|
|
13699
|
+
@{{AGENT_PREFIX}}test_engineer - Test generation AND execution (writes tests, runs them, reports PASS/FAIL)
|
|
13700
13700
|
@{{AGENT_PREFIX}}critic - Plan review gate (reviews plan BEFORE implementation)
|
|
13701
13701
|
|
|
13702
13702
|
SMEs advise only. Reviewer and critic review only. None of them write code.
|
|
@@ -13746,9 +13746,9 @@ CHECK: [security, correctness, edge-cases]
|
|
|
13746
13746
|
OUTPUT: VERDICT + RISK + ISSUES
|
|
13747
13747
|
|
|
13748
13748
|
@{{AGENT_PREFIX}}test_engineer
|
|
13749
|
-
TASK: Generate login validation tests
|
|
13749
|
+
TASK: Generate and run login validation tests
|
|
13750
13750
|
FILE: src/auth/login.ts
|
|
13751
|
-
OUTPUT: Test file at src/auth/login.test.ts
|
|
13751
|
+
OUTPUT: Test file at src/auth/login.test.ts + VERDICT: PASS/FAIL with failure details
|
|
13752
13752
|
|
|
13753
13753
|
@{{AGENT_PREFIX}}critic
|
|
13754
13754
|
TASK: Review plan for user authentication feature
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { type ToolDefinition } from '@opencode-ai/plugin/tool';
|
|
2
|
+
/**
|
|
3
|
+
* Extract filename from code content or context
|
|
4
|
+
*/
|
|
5
|
+
export declare function extractFilename(code: string, language: string, index: number): string;
|
|
2
6
|
/**
|
|
3
7
|
* Extract code blocks from content and save to files
|
|
4
8
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
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",
|