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.
Files changed (2) hide show
  1. package/dist/index.js +39 -35
  2. 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 MAXIMIZE PARALLELISM - This is CRITICAL!
236
+ \u26A1 AGGRESSIVELY USE: Parallel Agents + Background Commands + Session Resume
237
237
 
238
- PATTERN 1: AGENT PARALLELISM
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
- // GOOD \u2705 - Launch 3 agents at once
241
- ${TOOL_NAMES.DELEGATE_TASK}({ agent: "${AGENT_NAMES.PLANNER}", prompt: "Research API", background: true })
242
- ${TOOL_NAMES.DELEGATE_TASK}({ agent: "${AGENT_NAMES.PLANNER}", prompt: "Research DB", background: true })
243
- ${TOOL_NAMES.DELEGATE_TASK}({ agent: "${AGENT_NAMES.PLANNER}", prompt: "Research Auth", background: true })
244
- // Then later: collect all results
245
-
246
- // BAD \u274C - Sequential when not needed
247
- ${TOOL_NAMES.DELEGATE_TASK}({ ..., background: false }) // waits
248
- ${TOOL_NAMES.DELEGATE_TASK}({ ..., background: false }) // waits
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
- PATTERN 2: BACKGROUND COMMANDS
254
+ 2\uFE0F\u20E3 BACKGROUND COMMANDS (Strongly Recommended)
255
+ Run slow shell commands without blocking:
253
256
  \`\`\`
254
- // GOOD \u2705 - Start build, continue working
255
- ${TOOL_NAMES.RUN_BACKGROUND}({ command: "npm run build" }) \u2192 job_xxx
256
- // Continue with other work...
257
- ${TOOL_NAMES.CHECK_BACKGROUND}({ taskId: "job_xxx" }) // Check later
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
- PATTERN 3: SESSION CONTINUITY
263
+ 3\uFE0F\u20E3 SESSION RESUME (Strongly Recommended)
264
+ Preserve context across multiple interactions:
264
265
  \`\`\`
265
- // First call returns sessionID
266
- result = ${TOOL_NAMES.DELEGATE_TASK}({ agent: "${AGENT_NAMES.WORKER}", prompt: "Start feature", background: false })
267
- // Session: \`session_abc123\`
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: resume same session for follow-up
270
- ${TOOL_NAMES.DELEGATE_TASK}({ agent: "${AGENT_NAMES.WORKER}", prompt: "Add tests", resume: "session_abc123" })
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
- WHEN TO USE EACH:
275
- | Situation | Use |
276
- |-----------|-----|
277
- | Independent tasks (different files) | background=true, spawn ALL |
278
- | Sequential dependency (A\u2192B\u2192C) | background=false for chain |
279
- | Long shell command (>5sec) | ${TOOL_NAMES.RUN_BACKGROUND} |
280
- | Follow-up to previous work | resume: sessionID |
281
- | Final verification | background=false |
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.1",
5
+ "version": "0.8.3",
6
6
  "author": "agnusdei1207",
7
7
  "license": "MIT",
8
8
  "repository": {