opencode-orchestrator 0.8.1 → 0.8.3
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/dist/index.js +39 -35
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -233,52 +233,56 @@ EXECUTION FLOW:
|
|
|
233
233
|
</phase_2_execute>
|
|
234
234
|
|
|
235
235
|
<parallel_execution>
|
|
236
|
-
\u26A1
|
|
236
|
+
\u26A1 AGGRESSIVELY USE: Parallel Agents + Background Commands + Session Resume
|
|
237
237
|
|
|
238
|
-
|
|
238
|
+
\u{1F680} THESE 3 FEATURES ARE YOUR SUPERPOWERS - USE THEM!
|
|
239
|
+
|
|
240
|
+
1\uFE0F\u20E3 PARALLEL AGENTS (Strongly Recommended)
|
|
241
|
+
Launch multiple agents simultaneously for independent work:
|
|
239
242
|
\`\`\`
|
|
240
|
-
//
|
|
241
|
-
${TOOL_NAMES.DELEGATE_TASK}({ agent: "${AGENT_NAMES.PLANNER}", prompt: "Research
|
|
242
|
-
${TOOL_NAMES.DELEGATE_TASK}({ agent: "${AGENT_NAMES.PLANNER}", prompt: "Research
|
|
243
|
-
${TOOL_NAMES.DELEGATE_TASK}({ agent: "${AGENT_NAMES.PLANNER}", prompt: "Research
|
|
244
|
-
//
|
|
245
|
-
|
|
246
|
-
//
|
|
247
|
-
${TOOL_NAMES.DELEGATE_TASK}({
|
|
248
|
-
${TOOL_NAMES.DELEGATE_TASK}({
|
|
249
|
-
${TOOL_NAMES.DELEGATE_TASK}({ ..., background: false }) // waits
|
|
243
|
+
// Research multiple topics at once
|
|
244
|
+
${TOOL_NAMES.DELEGATE_TASK}({ agent: "${AGENT_NAMES.PLANNER}", prompt: "Research React docs", background: true })
|
|
245
|
+
${TOOL_NAMES.DELEGATE_TASK}({ agent: "${AGENT_NAMES.PLANNER}", prompt: "Research API patterns", background: true })
|
|
246
|
+
${TOOL_NAMES.DELEGATE_TASK}({ agent: "${AGENT_NAMES.PLANNER}", prompt: "Research testing libs", background: true })
|
|
247
|
+
// \u2192 3x faster than sequential!
|
|
248
|
+
|
|
249
|
+
// Create multiple files at once
|
|
250
|
+
${TOOL_NAMES.DELEGATE_TASK}({ agent: "${AGENT_NAMES.WORKER}", prompt: "Create component A", background: true })
|
|
251
|
+
${TOOL_NAMES.DELEGATE_TASK}({ agent: "${AGENT_NAMES.WORKER}", prompt: "Create component B", background: true })
|
|
250
252
|
\`\`\`
|
|
251
253
|
|
|
252
|
-
|
|
254
|
+
2\uFE0F\u20E3 BACKGROUND COMMANDS (Strongly Recommended)
|
|
255
|
+
Run slow shell commands without blocking:
|
|
253
256
|
\`\`\`
|
|
254
|
-
//
|
|
255
|
-
${TOOL_NAMES.RUN_BACKGROUND}({ command: "npm run build" })
|
|
256
|
-
//
|
|
257
|
-
${TOOL_NAMES.CHECK_BACKGROUND}({ taskId: "
|
|
258
|
-
|
|
259
|
-
// BAD \u274C - Blocking on slow command
|
|
260
|
-
bash("npm run build") // Blocks everything for 30+ seconds
|
|
257
|
+
// Start build, keep working
|
|
258
|
+
${TOOL_NAMES.RUN_BACKGROUND}({ command: "npm run build", description: "Building..." })
|
|
259
|
+
// ...continue with other work...
|
|
260
|
+
${TOOL_NAMES.CHECK_BACKGROUND}({ taskId: "xxx" }) // check when needed
|
|
261
261
|
\`\`\`
|
|
262
262
|
|
|
263
|
-
|
|
263
|
+
3\uFE0F\u20E3 SESSION RESUME (Strongly Recommended)
|
|
264
|
+
Preserve context across multiple interactions:
|
|
264
265
|
\`\`\`
|
|
265
|
-
// First
|
|
266
|
-
result = ${TOOL_NAMES.DELEGATE_TASK}({ agent: "${AGENT_NAMES.WORKER}", prompt: "Start feature"
|
|
267
|
-
// Session:
|
|
266
|
+
// First task returns sessionID
|
|
267
|
+
result = ${TOOL_NAMES.DELEGATE_TASK}({ agent: "${AGENT_NAMES.WORKER}", prompt: "Start feature" })
|
|
268
|
+
// Session: session_abc123
|
|
268
269
|
|
|
269
|
-
// Later:
|
|
270
|
-
${TOOL_NAMES.DELEGATE_TASK}({
|
|
271
|
-
// Preserves all context!
|
|
270
|
+
// Later: continue with full context
|
|
271
|
+
${TOOL_NAMES.DELEGATE_TASK}({ prompt: "Add tests to feature", resume: "session_abc123" })
|
|
272
272
|
\`\`\`
|
|
273
273
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
|
280
|
-
|
|
281
|
-
|
|
|
274
|
+
\u{1F4CB} SYNC STRATEGY (When to wait)
|
|
275
|
+
- Use background=false ONLY when: next task needs THIS task's output
|
|
276
|
+
- Collect results with ${TOOL_NAMES.GET_TASK_RESULT} before dependent work
|
|
277
|
+
- Use ${TOOL_NAMES.LIST_TASKS} to monitor all parallel tasks
|
|
278
|
+
|
|
279
|
+
| Task Type | Approach |
|
|
280
|
+
|-----------|----------|
|
|
281
|
+
| Research/Exploration | PARALLEL - spawn multiple Planners |
|
|
282
|
+
| File creation (different files) | PARALLEL - spawn multiple Workers |
|
|
283
|
+
| Build/Test/Install | BACKGROUND - use run_background |
|
|
284
|
+
| Sequential chain (A\u2192B\u2192C) | SYNC - background=false |
|
|
285
|
+
| Follow-up to previous work | RESUME - use sessionID |
|
|
282
286
|
</parallel_execution>
|
|
283
287
|
|
|
284
288
|
<agents>
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "opencode-orchestrator",
|
|
3
3
|
"displayName": "OpenCode Orchestrator",
|
|
4
4
|
"description": "Distributed Cognitive Architecture for OpenCode. Turns simple prompts into specialized multi-agent workflows (Planner, Coder, Reviewer).",
|
|
5
|
-
"version": "0.8.
|
|
5
|
+
"version": "0.8.3",
|
|
6
6
|
"author": "agnusdei1207",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|