opencode-orchestrator 0.4.17 → 0.4.19
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 +3 -61
- package/dist/agents/coder.d.ts +2 -0
- package/dist/agents/definitions.d.ts +0 -0
- package/dist/agents/fixer.d.ts +2 -0
- package/dist/agents/names.d.ts +12 -0
- package/dist/agents/orchestrator.d.ts +0 -0
- package/dist/agents/planner.d.ts +2 -0
- package/dist/agents/reviewer.d.ts +2 -0
- package/dist/agents/searcher.d.ts +2 -0
- package/dist/agents/subagents/architect.d.ts +0 -0
- package/dist/agents/subagents/builder.d.ts +0 -0
- package/dist/agents/subagents/coder.d.ts +2 -0
- package/dist/agents/subagents/executor.d.ts +2 -0
- package/dist/agents/subagents/fixer.d.ts +2 -0
- package/dist/agents/subagents/inspector.d.ts +0 -0
- package/dist/agents/subagents/memory.d.ts +2 -0
- package/dist/agents/subagents/planner.d.ts +2 -0
- package/dist/agents/subagents/publisher.d.ts +2 -0
- package/dist/agents/subagents/recorder.d.ts +0 -0
- package/dist/agents/subagents/reviewer.d.ts +2 -0
- package/dist/agents/subagents/searcher.d.ts +2 -0
- package/dist/agents/subagents/strategist.d.ts +2 -0
- package/dist/agents/subagents/surgeon.d.ts +2 -0
- package/dist/agents/subagents/types.d.ts +7 -0
- package/dist/agents/subagents/visualist.d.ts +2 -0
- package/dist/agents/types.d.ts +7 -0
- package/dist/cli.d.ts +2 -0
- package/dist/core/async-agent.d.ts +2 -14
- package/dist/core/state.d.ts +0 -0
- package/dist/core/tasks.d.ts +0 -1
- package/dist/index.d.ts +2 -20
- package/dist/index.js +163 -1496
- package/dist/shared/contracts/interfaces.d.ts +0 -0
- package/dist/shared/contracts/names.d.ts +0 -0
- package/dist/tasks.d.ts +29 -0
- package/dist/tools/background.d.ts +2 -2
- package/dist/tools/callAgent.d.ts +0 -0
- package/dist/tools/rust.d.ts +0 -0
- package/dist/tools/search.d.ts +0 -0
- package/dist/tools/slashCommand.d.ts +0 -0
- package/dist/utils/binary.d.ts +0 -0
- package/dist/utils/common.d.ts +0 -0
- package/dist/utils/sanity.d.ts +22 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -36,8 +36,7 @@ A **5-agent autonomous architecture** designed to solve complex engineering task
|
|
|
36
36
|
- **💾 Persistent Context** — Recorder saves session state to disk, enabling resume at any time.
|
|
37
37
|
- **🏗️ Parallel Agents** — Delegated agent execution (`delegate_task`) with sync/async modes.
|
|
38
38
|
- **⏳ Background Tasks** — Run long commands (builds, tests) in background and check results later.
|
|
39
|
-
|
|
40
|
-
- **🎯 Smart Batch** — Centralized validation and retry for efficient parallel processing. Dynamic concurrency limits with intelligent failure handling.
|
|
39
|
+
- **🔎 mgrep** — Multi-pattern parallel search for fast codebase analysis.
|
|
41
40
|
|
|
42
41
|
---
|
|
43
42
|
|
|
@@ -58,8 +57,8 @@ Restart OpenCode after installation.
|
|
|
58
57
|
In OpenCode, press `Tab` to open the Agent selection menu. Select **Commander** and type your mission!
|
|
59
58
|
|
|
60
59
|
<div align="center">
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
<img src="assets/commander-screenshot.png" alt="Commander Screenshot" width="600" />
|
|
61
|
+
<p><em>Press Tab to select Commander</em></p>
|
|
63
62
|
</div>
|
|
64
63
|
|
|
65
64
|
```
|
|
@@ -103,63 +102,6 @@ Monitor parallel tasks in terminal:
|
|
|
103
102
|
[parallel] 🗑️ CLEANED task_c3d4 (session deleted)
|
|
104
103
|
```
|
|
105
104
|
|
|
106
|
-
### 🎯 Smart Batch — Centralized Validation and Retry
|
|
107
|
-
|
|
108
|
-
For processing many microtasks efficiently, use the Smart Batch approach:
|
|
109
|
-
|
|
110
|
-
```bash
|
|
111
|
-
# Use Smart Batch to process many tasks with intelligent validation
|
|
112
|
-
process_batch({
|
|
113
|
-
concurrency: "10",
|
|
114
|
-
maxRetries: "2",
|
|
115
|
-
tasks: [
|
|
116
|
-
{ id: "task1", agent: "builder", description: "Write API handler", prompt: "..." },
|
|
117
|
-
{ id: "task2", agent: "inspector", description: "Review API code", prompt: "..." },
|
|
118
|
-
{ id: "task3", agent: "architect", description: "Design database schema", prompt: "..." },
|
|
119
|
-
{ id: "task4", agent: "recorder", description: "Document API", prompt: "..." }
|
|
120
|
-
]
|
|
121
|
-
})
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
**Smart Batch Benefits**:
|
|
125
|
-
| Benefit | Description |
|
|
126
|
-
|---------|-------------|
|
|
127
|
-
| **Speed** | 50% faster (1000 tasks: 200min → 150min) |
|
|
128
|
-
| **Efficiency** | 30% fewer API calls (only retry failures) |
|
|
129
|
-
| **Quality** | Centralized validation identifies all failures at once |
|
|
130
|
-
| **Adaptive** | Dynamic concurrency (up to 10, unlimited with validation) |
|
|
131
|
-
|
|
132
|
-
**Smart Batch Tools**:
|
|
133
|
-
- `process_batch()` — Execute multiple tasks with intelligent validation
|
|
134
|
-
- `export_failed_tasks()` — Export failed tasks for manual review
|
|
135
|
-
- `compare_strategies()` — Compare naive vs smart batch performance
|
|
136
|
-
|
|
137
|
-
### 🔧 Configuration Management
|
|
138
|
-
|
|
139
|
-
Dynamic configuration for runtime tuning:
|
|
140
|
-
|
|
141
|
-
```bash
|
|
142
|
-
# View current configuration
|
|
143
|
-
show_config()
|
|
144
|
-
|
|
145
|
-
# Update concurrency limits
|
|
146
|
-
set_concurrency({ agent: "builder", limit: 10 })
|
|
147
|
-
|
|
148
|
-
# Update timeouts
|
|
149
|
-
set_timeout({ taskTtlMinutes: 45, cleanupDelayMinutes: 2 })
|
|
150
|
-
|
|
151
|
-
# Toggle debug logging
|
|
152
|
-
set_debug({ component: "parallel_agent", enable: true })
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
**Environment Variables**:
|
|
156
|
-
- `OPENCODE_TASK_TTL_MS` — Task timeout (default: 30min)
|
|
157
|
-
- `OPENCODE_CLEANUP_DELAY_MS` — Cleanup delay (default: 5min)
|
|
158
|
-
- `OPENCODE_DEFAULT_CONCURRENCY` — Default parallelism (default: 3)
|
|
159
|
-
- `OPENCODE_MAX_CONCURRENCY` — Max parallelism (default: 10)
|
|
160
|
-
- `OPENCODE_DEBUG_PARALLEL` — Enable debug logs
|
|
161
|
-
- `OPENCODE_DEBUG_BACKGROUND` — Enable debug logs
|
|
162
|
-
|
|
163
105
|
---
|
|
164
106
|
|
|
165
107
|
## Agents (5-Agent Architecture)
|
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const AGENT_NAMES: {
|
|
2
|
+
readonly ORCHESTRATOR: "orchestrator";
|
|
3
|
+
readonly PLANNER: "planner";
|
|
4
|
+
readonly CODER: "coder";
|
|
5
|
+
readonly REVIEWER: "reviewer";
|
|
6
|
+
readonly SEARCHER: "searcher";
|
|
7
|
+
readonly SURGEON: "surgeon";
|
|
8
|
+
readonly EXECUTOR: "executor";
|
|
9
|
+
readonly VISUALIST: "visualist";
|
|
10
|
+
readonly PUBLISHER: "publisher";
|
|
11
|
+
};
|
|
12
|
+
export type AgentName = typeof AGENT_NAMES[keyof typeof AGENT_NAMES];
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/cli.d.ts
ADDED
|
@@ -70,21 +70,9 @@ export declare class ParallelAgentManager {
|
|
|
70
70
|
*/
|
|
71
71
|
getResult(taskId: string): Promise<string | null>;
|
|
72
72
|
/**
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
* Set concurrency limit for agent type
|
|
74
|
+
*/
|
|
75
75
|
setConcurrencyLimit(agentType: string, limit: number): void;
|
|
76
|
-
/**
|
|
77
|
-
* Get concurrency statistics for all agent types
|
|
78
|
-
*/
|
|
79
|
-
getConcurrencyStats(): Record<string, {
|
|
80
|
-
running: number;
|
|
81
|
-
queued: number;
|
|
82
|
-
limit: number;
|
|
83
|
-
}>;
|
|
84
|
-
/**
|
|
85
|
-
* Update concurrency limit dynamically at runtime
|
|
86
|
-
*/
|
|
87
|
-
updateConcurrency(agentType: string, newLimit: number): void;
|
|
88
76
|
/**
|
|
89
77
|
* Get pending notification count
|
|
90
78
|
*/
|
package/dist/core/state.d.ts
CHANGED
|
File without changes
|
package/dist/core/tasks.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -13,24 +13,6 @@
|
|
|
13
13
|
import type { PluginInput } from "@opencode-ai/plugin";
|
|
14
14
|
declare const OrchestratorPlugin: (input: PluginInput) => Promise<{
|
|
15
15
|
tool: {
|
|
16
|
-
git_branch: {
|
|
17
|
-
description: string;
|
|
18
|
-
args: {
|
|
19
|
-
action: import("zod").ZodEnum<{
|
|
20
|
-
status: "status";
|
|
21
|
-
diff: "diff";
|
|
22
|
-
current: "current";
|
|
23
|
-
list: "list";
|
|
24
|
-
recent: "recent";
|
|
25
|
-
all: "all";
|
|
26
|
-
}>;
|
|
27
|
-
baseBranch: import("zod").ZodOptional<import("zod").ZodString>;
|
|
28
|
-
};
|
|
29
|
-
execute(args: {
|
|
30
|
-
action: "status" | "diff" | "current" | "list" | "recent" | "all";
|
|
31
|
-
baseBranch?: string | undefined;
|
|
32
|
-
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
33
|
-
};
|
|
34
16
|
call_agent: {
|
|
35
17
|
description: string;
|
|
36
18
|
args: {
|
|
@@ -126,13 +108,13 @@ declare const OrchestratorPlugin: (input: PluginInput) => Promise<{
|
|
|
126
108
|
args: {
|
|
127
109
|
status: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
128
110
|
running: "running";
|
|
129
|
-
all: "all";
|
|
130
111
|
done: "done";
|
|
131
112
|
error: "error";
|
|
113
|
+
all: "all";
|
|
132
114
|
}>>;
|
|
133
115
|
};
|
|
134
116
|
execute(args: {
|
|
135
|
-
status?: "running" | "
|
|
117
|
+
status?: "running" | "done" | "error" | "all" | undefined;
|
|
136
118
|
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
137
119
|
};
|
|
138
120
|
kill_background: {
|