opencode-orchestrator 0.4.1 โ 0.4.7
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 +238 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +12642 -175
- package/dist/scripts/postinstall.js +34 -33
- package/dist/scripts/preuninstall.js +44 -24
- package/dist/shared/contracts/names.d.ts +1 -1
- package/dist/tools/background.d.ts +2 -2
- package/package.json +61 -73
- package/bin/orchestrator +0 -0
- package/bin/orchestrator-linux-arm64 +0 -0
- package/bin/orchestrator-linux-x64 +0 -0
- package/bin/orchestrator-macos-arm64 +0 -0
- package/dist/cli.js +0 -48
package/README.md
CHANGED
|
@@ -95,6 +95,157 @@ Trigger parallel agent execution with prompts like:
|
|
|
95
95
|
|
|
96
96
|
Commander will automatically use `delegate_task` with `background: true` for independent tasks.
|
|
97
97
|
|
|
98
|
+
**Parallel Execution UI**
|
|
99
|
+
|
|
100
|
+
When tasks run in parallel, you'll see detailed progress in OpenCode:
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
## ๐ BACKGROUND TASK SPAWNED
|
|
104
|
+
|
|
105
|
+
**Task Details**
|
|
106
|
+
- **ID**: `task_a1b2c3d4`
|
|
107
|
+
- **Agent**: builder
|
|
108
|
+
- **Description**: Implement authentication system
|
|
109
|
+
- **Status**: โณ Running in background (non-blocking)
|
|
110
|
+
|
|
111
|
+
**Active Tasks**
|
|
112
|
+
- Running: 2
|
|
113
|
+
- Pending: 1
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
**Monitoring Commands**
|
|
118
|
+
|
|
119
|
+
Check progress anytime:
|
|
120
|
+
- `list_tasks()` - View all parallel tasks
|
|
121
|
+
- `get_task_result({ taskId: "task_a1b2c3d4" })` - Get latest result
|
|
122
|
+
- `cancel_task({ taskId: "task_a1b2c3d4" })` - Stop this task
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
โ System will notify when ALL tasks complete. You can continue working!
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**Terminal Logs**
|
|
130
|
+
|
|
131
|
+
Monitor parallel tasks in terminal:
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
[parallel] ๐ SPAWNED task_a1b2c3d4 โ builder: Implement authentication
|
|
135
|
+
[parallel] ๐ SPAWNED task_e5f6g7h8 โ inspector: Review module
|
|
136
|
+
[parallel] โ
COMPLETED task_e5f6g7h8 โ inspector: Review module (45s)
|
|
137
|
+
[parallel] ๐๏ธ CLEANED task_e5f6g7h8 (session deleted)
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**All Tasks Complete**
|
|
141
|
+
|
|
142
|
+
When all parallel tasks finish, you'll see:
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
**All Parallel Tasks Complete**
|
|
146
|
+
|
|
147
|
+
โ
`task_a1b2c3d4` (1m 30s): Implement authentication
|
|
148
|
+
โ
`task_e5f6g7h8` (45s): Review module
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
**Retrieval Options**
|
|
153
|
+
|
|
154
|
+
Use `get_task_result({ taskId: "task_xxx" })` to retrieve full results.
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
**Task Summary**
|
|
159
|
+
|
|
160
|
+
Total Tasks: 2
|
|
161
|
+
Status: All Complete
|
|
162
|
+
Mode: Background (non-blocking)
|
|
163
|
+
```
|
|
164
|
+
"Build and test in parallel"
|
|
165
|
+
"Implement feature X while reviewing module Y"
|
|
166
|
+
"Run linting, tests, and build at the same time"
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Commander will automatically use `delegate_task` with `background: true` for independent tasks.
|
|
170
|
+
|
|
171
|
+
**Parallel Execution UI**
|
|
172
|
+
|
|
173
|
+
When tasks run in parallel, you'll see detailed progress in OpenCode:
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
177
|
+
โ ๐ BACKGROUND TASK SPAWNED โ
|
|
178
|
+
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
|
|
179
|
+
โ Task ID: task_a1b2c3d4 โ
|
|
180
|
+
โ Agent: builder โ
|
|
181
|
+
โ Description: Implement authentication system โ
|
|
182
|
+
โ Status: โณ RUNNING (background) โ
|
|
183
|
+
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
|
|
184
|
+
โ Running: 2 โ Pending: 1 โ
|
|
185
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
**Parallel Execution Started**
|
|
190
|
+
|
|
191
|
+
- ๐ Task ID: `task_a1b2c3d4`
|
|
192
|
+
- ๐ค Agent: builder
|
|
193
|
+
- ๐ Description: Implement authentication system
|
|
194
|
+
- โณ Status: Running in background (non-blocking)
|
|
195
|
+
- ๐ Active Tasks: 2 running, 1 pending
|
|
196
|
+
|
|
197
|
+
**Monitoring**
|
|
198
|
+
|
|
199
|
+
Check progress anytime with:
|
|
200
|
+
- `list_tasks()` - View all parallel tasks
|
|
201
|
+
- `get_task_result({ taskId: "task_a1b2c3d4" })` - Get latest result
|
|
202
|
+
- `cancel_task({ taskId: "task_a1b2c3d4" })` - Stop this task
|
|
203
|
+
|
|
204
|
+
System will notify when ALL tasks complete. You can continue working!
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
**Terminal Logs**
|
|
208
|
+
|
|
209
|
+
Monitor parallel tasks in terminal:
|
|
210
|
+
|
|
211
|
+
```
|
|
212
|
+
[parallel] ๐ SPAWNED task_a1b2c3d4 โ builder: Implement authentication
|
|
213
|
+
[parallel] ๐ SPAWNED task_e5f6g7h8 โ inspector: Review module
|
|
214
|
+
[parallel] โ
COMPLETED task_e5f6g7h8 โ inspector: Review module (45s)
|
|
215
|
+
[parallel] ๐๏ธ CLEANED task_e5f6g7h8 (session deleted)
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
**All Tasks Complete**
|
|
219
|
+
|
|
220
|
+
When all parallel tasks finish, you'll see:
|
|
221
|
+
|
|
222
|
+
```
|
|
223
|
+
**All Parallel Tasks Complete**
|
|
224
|
+
|
|
225
|
+
โ
`task_a1b2c3d4` (1m 30s): Implement authentication
|
|
226
|
+
โ
`task_e5f6g7h8` (45s): Review module
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
**Retrieval Options**
|
|
231
|
+
|
|
232
|
+
Use `get_task_result({ taskId: "task_xxx" })` to retrieve full results.
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
**Task Summary**
|
|
237
|
+
|
|
238
|
+
Total Tasks: 2
|
|
239
|
+
Status: All Complete
|
|
240
|
+
Mode: Background (non-blocking)
|
|
241
|
+
```
|
|
242
|
+
"Build and test in parallel"
|
|
243
|
+
"Implement feature X while reviewing module Y"
|
|
244
|
+
"Run linting, tests, and build at the same time"
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
Commander will automatically use `delegate_task` with `background: true` for independent tasks.
|
|
248
|
+
|
|
98
249
|
Monitor parallel tasks in the terminal:
|
|
99
250
|
```
|
|
100
251
|
[parallel] ๐ SPAWNED task_a1b2 โ builder: Implement feature X
|
|
@@ -133,11 +284,96 @@ Monitor parallel tasks in the terminal:
|
|
|
133
284
|
|
|
134
285
|
---
|
|
135
286
|
|
|
287
|
+
## Development
|
|
288
|
+
|
|
289
|
+
### Quick Start (Local Development)
|
|
290
|
+
|
|
291
|
+
```bash
|
|
292
|
+
# Step 1: Build and link (run this ONCE)
|
|
293
|
+
npm run dev:link
|
|
294
|
+
|
|
295
|
+
# Step 2: Restart OpenCode
|
|
296
|
+
|
|
297
|
+
# Step 3: Make code changes...
|
|
298
|
+
|
|
299
|
+
# Step 4: Rebuild and re-link (after code changes)
|
|
300
|
+
npm run dev:link
|
|
301
|
+
|
|
302
|
+
# (Optional) Check link status
|
|
303
|
+
npm run dev:status
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
### Development Scripts
|
|
307
|
+
|
|
308
|
+
```bash
|
|
309
|
+
# Build the plugin
|
|
310
|
+
npm run build
|
|
311
|
+
|
|
312
|
+
# Link for local testing (auto-rebuilds)
|
|
313
|
+
npm run dev:link
|
|
314
|
+
|
|
315
|
+
# Unlink from global
|
|
316
|
+
npm run dev:unlink
|
|
317
|
+
|
|
318
|
+
# Check if plugin is linked globally
|
|
319
|
+
npm run dev:status
|
|
320
|
+
|
|
321
|
+
# Test install/uninstall scripts locally
|
|
322
|
+
npm run dev:test
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
### Development Workflow
|
|
326
|
+
|
|
327
|
+
| Step | Command | Description |
|
|
328
|
+
|------|----------|-------------|
|
|
329
|
+
| 1๏ธโฃ Initial setup | `npm run dev:link` | Build + link for the first time |
|
|
330
|
+
| 2๏ธโฃ Test | Open OpenCode | Test your changes |
|
|
331
|
+
| 3๏ธโฃ Make changes | Edit code | Modify TypeScript files |
|
|
332
|
+
| 4๏ธโฃ Rebuild | `npm run dev:link` | Rebuild + re-link |
|
|
333
|
+
| 5๏ธโฃ Repeat | 2-4 | Iterate on changes |
|
|
334
|
+
| โ Cleanup | `npm run dev:unlink` | Unlink when done |
|
|
335
|
+
|
|
336
|
+
### Common Scenarios
|
|
337
|
+
|
|
338
|
+
```bash
|
|
339
|
+
# ๐ Changed code and want to test
|
|
340
|
+
npm run dev:link
|
|
341
|
+
|
|
342
|
+
# ๐ Check if linked properly
|
|
343
|
+
npm run dev:status
|
|
344
|
+
|
|
345
|
+
# ๐งน Cleanup before committing
|
|
346
|
+
npm run dev:unlink
|
|
347
|
+
|
|
348
|
+
# ๐งช Test install/uninstall scripts
|
|
349
|
+
npm run dev:test
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
### Release Scripts
|
|
353
|
+
|
|
354
|
+
```bash
|
|
355
|
+
# Release patch version (0.4.1 โ 0.4.2)
|
|
356
|
+
npm run release:patch
|
|
357
|
+
|
|
358
|
+
# Release minor version (0.4.1 โ 0.5.0)
|
|
359
|
+
npm run release:minor
|
|
360
|
+
|
|
361
|
+
# Release major version (0.4.1 โ 1.0.0)
|
|
362
|
+
npm run release:major
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
Each release script:
|
|
366
|
+
1. Builds the plugin
|
|
367
|
+
2. Bumps version in package.json
|
|
368
|
+
3. Creates git tag
|
|
369
|
+
4. Pushes to remote
|
|
370
|
+
5. Publishes to npm
|
|
371
|
+
|
|
372
|
+
---
|
|
373
|
+
|
|
136
374
|
## Uninstall
|
|
137
375
|
|
|
138
376
|
```bash
|
|
139
|
-
npm run dev:uninstall
|
|
140
|
-
# OR
|
|
141
377
|
npm uninstall -g opencode-orchestrator
|
|
142
378
|
```
|
|
143
379
|
|
package/dist/index.d.ts
CHANGED
|
@@ -105,14 +105,14 @@ declare const OrchestratorPlugin: (input: PluginInput) => Promise<{
|
|
|
105
105
|
description: string;
|
|
106
106
|
args: {
|
|
107
107
|
status: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
108
|
-
error: "error";
|
|
109
108
|
running: "running";
|
|
110
109
|
done: "done";
|
|
110
|
+
error: "error";
|
|
111
111
|
all: "all";
|
|
112
112
|
}>>;
|
|
113
113
|
};
|
|
114
114
|
execute(args: {
|
|
115
|
-
status?: "
|
|
115
|
+
status?: "running" | "done" | "error" | "all" | undefined;
|
|
116
116
|
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
117
117
|
};
|
|
118
118
|
kill_background: {
|