opencode-orchestrator 0.8.1 → 0.8.2
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 +23 -36
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -233,52 +233,39 @@ EXECUTION FLOW:
|
|
|
233
233
|
</phase_2_execute>
|
|
234
234
|
|
|
235
235
|
<parallel_execution>
|
|
236
|
-
\u26A1
|
|
236
|
+
\u26A1 USE PARALLELISM WHEN APPROPRIATE
|
|
237
237
|
|
|
238
|
-
|
|
238
|
+
DECIDE: Parallel vs Sequential
|
|
239
|
+
- Tasks that DON'T depend on each other \u2192 background=true (parallel)
|
|
240
|
+
- Task B needs Task A's output \u2192 background=false (sequential)
|
|
241
|
+
- Model should judge based on task dependencies
|
|
242
|
+
|
|
243
|
+
PATTERN 1: PARALLEL AGENTS (when tasks are independent)
|
|
239
244
|
\`\`\`
|
|
240
|
-
//
|
|
241
|
-
${TOOL_NAMES.DELEGATE_TASK}({ agent: "${AGENT_NAMES.
|
|
242
|
-
${TOOL_NAMES.DELEGATE_TASK}({ agent: "${AGENT_NAMES.
|
|
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
|
|
245
|
+
// Good for INDEPENDENT tasks (different files, no shared state)
|
|
246
|
+
${TOOL_NAMES.DELEGATE_TASK}({ agent: "${AGENT_NAMES.WORKER}", prompt: "Create file A", background: true })
|
|
247
|
+
${TOOL_NAMES.DELEGATE_TASK}({ agent: "${AGENT_NAMES.WORKER}", prompt: "Create file B", background: true })
|
|
250
248
|
\`\`\`
|
|
251
249
|
|
|
252
|
-
PATTERN 2:
|
|
250
|
+
PATTERN 2: SEQUENTIAL (when order matters)
|
|
253
251
|
\`\`\`
|
|
254
|
-
//
|
|
255
|
-
${TOOL_NAMES.
|
|
256
|
-
|
|
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
|
|
252
|
+
// Good for DEPENDENT tasks (output feeds next input)
|
|
253
|
+
result1 = ${TOOL_NAMES.DELEGATE_TASK}({ ..., background: false })
|
|
254
|
+
result2 = ${TOOL_NAMES.DELEGATE_TASK}({ prompt: "Use result1", background: false })
|
|
261
255
|
\`\`\`
|
|
262
256
|
|
|
263
|
-
PATTERN 3:
|
|
257
|
+
PATTERN 3: BACKGROUND COMMANDS (for slow operations)
|
|
264
258
|
\`\`\`
|
|
265
|
-
|
|
266
|
-
result = ${TOOL_NAMES.DELEGATE_TASK}({ agent: "${AGENT_NAMES.WORKER}", prompt: "Start feature", background: false })
|
|
267
|
-
// Session: \`session_abc123\`
|
|
268
|
-
|
|
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!
|
|
259
|
+
${TOOL_NAMES.RUN_BACKGROUND}({ command: "npm run build" }) // non-blocking
|
|
272
260
|
\`\`\`
|
|
273
261
|
|
|
274
|
-
|
|
275
|
-
|
|
|
276
|
-
|
|
277
|
-
|
|
|
278
|
-
|
|
|
279
|
-
|
|
|
280
|
-
|
|
|
281
|
-
| Final verification | background=false |
|
|
262
|
+
DECISION GUIDE:
|
|
263
|
+
| Scenario | Use |
|
|
264
|
+
|----------|-----|
|
|
265
|
+
| Editing 3 unrelated files | background=true for each |
|
|
266
|
+
| Step A \u2192 B \u2192 C chain | background=false (sequential) |
|
|
267
|
+
| Build while coding | ${TOOL_NAMES.RUN_BACKGROUND} |
|
|
268
|
+
| Need result immediately | background=false |
|
|
282
269
|
</parallel_execution>
|
|
283
270
|
|
|
284
271
|
<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.2",
|
|
6
6
|
"author": "agnusdei1207",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|