opencode-orchestrator 0.1.62 → 0.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 +43 -98
- package/dist/index.d.ts +3 -3
- package/dist/index.js +344 -749
- package/dist/shared/contracts/names.d.ts +1 -1
- package/dist/tools/callAgent.d.ts +2 -2
- package/dist/tools/search.d.ts +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
<img src="assets/logo.png" alt="Logo" width="200" />
|
|
3
3
|
</div>
|
|
4
4
|
|
|
5
|
-
# OpenCode Orchestrator
|
|
5
|
+
# OpenCode Orchestrator 🎯
|
|
6
6
|
|
|
7
|
-
> **Multi-Agent Plugin for [OpenCode](https://opencode.ai)**
|
|
7
|
+
> **Autonomous Multi-Agent Plugin for [OpenCode](https://opencode.ai)**
|
|
8
8
|
|
|
9
9
|
[](LICENSE)
|
|
10
10
|
[](https://www.npmjs.com/package/opencode-orchestrator)
|
|
@@ -13,19 +13,17 @@
|
|
|
13
13
|
|
|
14
14
|
## What is this?
|
|
15
15
|
|
|
16
|
-
A **5-agent
|
|
16
|
+
A **5-agent autonomous architecture** designed to solve complex engineering tasks with high reliability, even on mid-range LLMs.
|
|
17
17
|
|
|
18
|
-
**
|
|
19
|
-
|
|
20
|
-
**Solution**: XML-structured prompts + explicit reasoning patterns + evidence-based completion.
|
|
18
|
+
**Core Philosophy**: Intelligence is a resource. We orchestrate that resource through **Phase-based Workflows** and **Mandatory Environment Scans** to ensure code always fits the project's infrastructure.
|
|
21
19
|
|
|
22
20
|
### Key Features
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
- **
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
21
|
+
- **🎯 Autonomous Loop** — Commander runs relentlessly until the mission is complete.
|
|
22
|
+
- **🔍 Environment Scan** — Mandatory analysis of Infra (Docker/OS), Stack, and Domain before any code change.
|
|
23
|
+
- **🔨 Smart Implementation** — Builder matches existing codebase patterns exactly.
|
|
24
|
+
- **🛡️ Rigorous Audit** — Inspector proves success with environment-specific evidence (Builds/Tests/Logs).
|
|
25
|
+
- **💾 Persistent Context** — Recorder saves session state to disk, enabling resume at any time.
|
|
26
|
+
- **🏗️ Parallel Tasking** — Architect splits work into concurrent DAG groups.
|
|
29
27
|
|
|
30
28
|
---
|
|
31
29
|
|
|
@@ -41,122 +39,69 @@ Restart OpenCode after installation.
|
|
|
41
39
|
|
|
42
40
|
## Usage
|
|
43
41
|
|
|
44
|
-
### Just Select Commander Agent
|
|
45
|
-
Press `tab` → Select **Commander** → Type your
|
|
42
|
+
### Just Select Commander Agent 🎯
|
|
43
|
+
Press `tab` → Select **Commander** → Type your mission!
|
|
46
44
|
|
|
47
45
|
```
|
|
48
|
-
"
|
|
46
|
+
"Fix the login bug in the docker-compose environment"
|
|
49
47
|
```
|
|
50
48
|
|
|
51
|
-
|
|
52
|
-
1.
|
|
53
|
-
2.
|
|
54
|
-
3.
|
|
55
|
-
4.
|
|
49
|
+
The Commander will:
|
|
50
|
+
1. **Survey**: Scan the Docker environment and codebase.
|
|
51
|
+
2. **Plan**: Break the fix into steps.
|
|
52
|
+
3. **Execute**: Call Builder to fix while matching patterns.
|
|
53
|
+
4. **Verify**: Run builds/tests to prove the fix works.
|
|
54
|
+
5. **Complete**: Report results with concrete evidence.
|
|
56
55
|
|
|
57
56
|
### Or Use /task Command
|
|
58
57
|
```bash
|
|
59
58
|
/task "Implement user authentication with JWT"
|
|
60
59
|
```
|
|
61
60
|
|
|
62
|
-
Both work identically - Commander agent OR /task command.
|
|
63
|
-
|
|
64
|
-
---
|
|
65
|
-
|
|
66
|
-
## How It Works
|
|
67
|
-
|
|
68
|
-
```
|
|
69
|
-
Select Commander or /task
|
|
70
|
-
│
|
|
71
|
-
▼
|
|
72
|
-
┌─────────────┐
|
|
73
|
-
│ COMMANDER │ ← THINK → ACT → OBSERVE → ADJUST
|
|
74
|
-
└──────┬──────┘
|
|
75
|
-
│
|
|
76
|
-
┌──────┴──────┐
|
|
77
|
-
▼ ▼
|
|
78
|
-
ARCHITECT MEMORY (load context)
|
|
79
|
-
│
|
|
80
|
-
▼
|
|
81
|
-
┌──────────────────┐
|
|
82
|
-
│ PARALLEL DAG │
|
|
83
|
-
│ Group 1: [T1, T2, T3] ← run together
|
|
84
|
-
│ Group 2: [T4] ← wait for group 1
|
|
85
|
-
└──────────────────┘
|
|
86
|
-
│
|
|
87
|
-
┌──────┴──────┐
|
|
88
|
-
▼ ▼
|
|
89
|
-
BUILDER BUILDER (parallel)
|
|
90
|
-
│ │
|
|
91
|
-
└──────┬──────┘
|
|
92
|
-
▼
|
|
93
|
-
┌─────────────┐
|
|
94
|
-
│ INSPECTOR │ ← AUDIT → [FAIL? → FIX] → PASS
|
|
95
|
-
└──────┬──────┘
|
|
96
|
-
▼
|
|
97
|
-
┌─────────────┐
|
|
98
|
-
│ MEMORY │ ← Save progress
|
|
99
|
-
└──────┬──────┘
|
|
100
|
-
▼
|
|
101
|
-
✅ MISSION COMPLETE
|
|
102
|
-
```
|
|
103
|
-
|
|
104
61
|
---
|
|
105
62
|
|
|
106
63
|
## Agents (5-Agent Architecture)
|
|
107
64
|
|
|
108
|
-
| Agent |
|
|
109
|
-
| :--- | :--- | :--- |
|
|
110
|
-
| **Commander** | Orchestrator |
|
|
111
|
-
| **Architect** | Planner |
|
|
112
|
-
| **Builder** | Developer |
|
|
113
|
-
| **Inspector** |
|
|
114
|
-
| **
|
|
115
|
-
|
|
116
|
-
### Why 5 Agents?
|
|
117
|
-
- **Builder** = Coder + Visualist (full-stack in one agent)
|
|
118
|
-
- **Inspector** = Reviewer + Fixer (auto-fixes on audit failure)
|
|
119
|
-
- **Fewer agents = fewer handoffs = better for weak models**
|
|
65
|
+
| Agent | Emoji | Role | Responsibility |
|
|
66
|
+
| :--- | :--- | :--- | :--- |
|
|
67
|
+
| **Commander** | 🎯 | Orchestrator | Autonomous mission control & delegation |
|
|
68
|
+
| **Architect** | 🏗️ | Planner | Task decomposition & strategy correction |
|
|
69
|
+
| **Builder** | 🔨 | Developer | Full-stack implementation (Logic + UI) |
|
|
70
|
+
| **Inspector** | 🔍 | Quality | 5-point audit & automatic bug fixing |
|
|
71
|
+
| **Recorder** | 💾 | Context | Persistent environment & progress tracking |
|
|
120
72
|
|
|
121
73
|
---
|
|
122
74
|
|
|
123
|
-
##
|
|
75
|
+
## The Workflow (Progressive Phases)
|
|
124
76
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
77
|
+
1. **Phase 0: Triage (Smart)**
|
|
78
|
+
- **Fast Track 🟢**: Simple fixes → Execute instantly (Skip heavy scans).
|
|
79
|
+
- **Deep Track 🔴**: Complex features → Full Environment Scan & Plan.
|
|
80
|
+
2. **Phase 1: Environment Scan**
|
|
81
|
+
- Mandatory for Deep Track: Infra/Domain/Stack analysis.
|
|
82
|
+
3. **Phase 2: Parallel Planning**
|
|
83
|
+
- Architect creates a DAG of atomic tasks (Scalable Planning).
|
|
84
|
+
4. **Phase 3: Execution & Audit**
|
|
85
|
+
- Builder writes code ↔ Inspector verifies with evidence.
|
|
86
|
+
5. **Phase 4: Completion**
|
|
87
|
+
- Mission Complete reported with proof of build/test success.
|
|
132
88
|
|
|
133
89
|
---
|
|
134
90
|
|
|
135
91
|
## Uninstall
|
|
136
92
|
|
|
137
93
|
```bash
|
|
94
|
+
npm run dev:uninstall
|
|
95
|
+
# OR
|
|
138
96
|
npm uninstall -g opencode-orchestrator
|
|
139
97
|
```
|
|
140
98
|
|
|
141
|
-
The plugin automatically removes itself from OpenCode config.
|
|
142
|
-
|
|
143
|
-
---
|
|
144
|
-
|
|
145
|
-
## Troubleshooting
|
|
146
|
-
|
|
147
|
-
If Commander doesn't appear after install:
|
|
148
|
-
```bash
|
|
149
|
-
npm uninstall -g opencode-orchestrator
|
|
150
|
-
npm install -g opencode-orchestrator
|
|
151
|
-
# Restart OpenCode
|
|
152
|
-
```
|
|
153
|
-
|
|
154
99
|
---
|
|
155
100
|
|
|
156
101
|
## Docs
|
|
157
102
|
|
|
158
|
-
- [Architecture & Design](docs/ARCHITECTURE.md) —
|
|
159
|
-
- [Plugin Troubleshooting](docs/PLUGIN_TROUBLESHOOTING.md) — Setup issues
|
|
103
|
+
- [Architecture & Design](docs/ARCHITECTURE.md) — Detailed system design and agent protocols
|
|
104
|
+
- [Plugin Troubleshooting](docs/PLUGIN_TROUBLESHOOTING.md) — Setup and common issues
|
|
160
105
|
|
|
161
106
|
---
|
|
162
107
|
|
|
@@ -166,4 +111,4 @@ MIT License. [LICENSE](LICENSE)
|
|
|
166
111
|
|
|
167
112
|
---
|
|
168
113
|
|
|
169
|
-
**
|
|
114
|
+
**Reliability over slop. Environment over assumptions.**
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* - Evidence-based completion requirements
|
|
10
10
|
* - Autonomous execution loop
|
|
11
11
|
*
|
|
12
|
-
* Agents: Commander, Architect, Builder, Inspector,
|
|
12
|
+
* Agents: Commander, Architect, Builder, Inspector, Recorder
|
|
13
13
|
*/
|
|
14
14
|
import type { PluginInput } from "@opencode-ai/plugin";
|
|
15
15
|
declare const OrchestratorPlugin: (input: PluginInput) => Promise<{
|
|
@@ -21,13 +21,13 @@ declare const OrchestratorPlugin: (input: PluginInput) => Promise<{
|
|
|
21
21
|
architect: "architect";
|
|
22
22
|
builder: "builder";
|
|
23
23
|
inspector: "inspector";
|
|
24
|
-
|
|
24
|
+
recorder: "recorder";
|
|
25
25
|
}>;
|
|
26
26
|
task: import("zod").ZodString;
|
|
27
27
|
context: import("zod").ZodOptional<import("zod").ZodString>;
|
|
28
28
|
};
|
|
29
29
|
execute(args: {
|
|
30
|
-
agent: "architect" | "builder" | "inspector" | "
|
|
30
|
+
agent: "architect" | "builder" | "inspector" | "recorder";
|
|
31
31
|
task: string;
|
|
32
32
|
context?: string | undefined;
|
|
33
33
|
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|