opencode-orchestrator 1.2.59 → 1.2.61

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/README.md +61 -115
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,7 +1,9 @@
1
+
2
+ ---
3
+
1
4
  <div align="center">
2
5
  <img src="assets/logo.png" alt="logo" width="200" />
3
6
  <h1>OpenCode Orchestrator</h1>
4
-
5
7
  <p>Production-Grade Multi-Agent Orchestration Engine for High-Integrity Software Engineering</p>
6
8
 
7
9
  [![MIT License](https://img.shields.io/badge/license-MIT-red.svg)](LICENSE)
@@ -23,8 +25,6 @@ Inside an OpenCode environment:
23
25
 
24
26
  ---
25
27
 
26
- ---
27
-
28
28
  ## 🚀 Engine Workflow
29
29
 
30
30
  OpenCode Orchestrator utilizes a **Hub-and-Spoke Topology** with **Work-Stealing Queues** to execute complex engineering tasks through parallel, context-isolated sessions.
@@ -64,13 +64,24 @@ OpenCode Orchestrator utilizes a **Hub-and-Spoke Topology** with **Work-Stealing
64
64
 
65
65
  ---
66
66
 
67
+ ## ⚡ Elite Multi-Agent Swarm
68
+
69
+ | Agent | Expertise | Capability |
70
+ |:------|:----------|:-----------|
71
+ | **Commander** | Mission Hub | Session pooling, parallel thread control, state rehydration, work-stealing coordination |
72
+ | **Planner** | Architect | Symbolic mapping, dependency research, roadmap generation, file-level planning |
73
+ | **Worker** | Implementer | High-throughput coding, TDD workflow, documentation, isolated file execution |
74
+ | **Reviewer** | Auditor | Rigid verification, LSP/Lint authority, integration testing, final mission seal |
75
+
76
+ ---
77
+
67
78
  ## 🛠️ Core Capabilities
68
79
 
69
80
  ### 🔒 Atomic MVCC State Synchronization
70
- The engine solves the "Concurrent TODO Update" problem using **Multi-Version Concurrency Control (MVCC) + Mutex**. Agents can safely mark tasks as complete in parallel without data loss or race conditions. Every state change is cryptographically hashed and logged for a complete audit trail.
81
+ Solves the "Concurrent TODO Update" problem using **MVCC + Mutex**. Agents safely mark tasks complete in parallel without data loss or race conditions. Every state change is cryptographically hashed and logged.
71
82
 
72
83
  ### 🧩 Advanced Hook Orchestration
73
- Execution flows are governed by a **Priority-Phase Hook Registry**. Hooks (Safety, UI, Protocol) are grouped into phases (`early`, `normal`, `late`) and executed using a **Topological Sort** to handle complex dependencies automatically, ensuring a predictable and stable environment.
84
+ Execution flows governed by a **Priority-Phase Hook Registry**. Hooks are grouped into phases (`early`, `normal`, `late`) and executed via **Topological Sort** for predictable, dependency-aware ordering.
74
85
 
75
86
  ### 🛡️ Autonomous Recovery
76
87
  - **Self-healing loops** with adaptive stagnation detection
@@ -78,130 +89,57 @@ Execution flows are governed by a **Priority-Phase Hook Registry**. Hooks (Safet
78
89
  - **Auto-retry with backoff**: Exponential backoff for transient failures
79
90
 
80
91
  ### 🎯 State-Level Session Isolation
81
- Reused sessions in the **SessionPool** are explicitly reset using server-side compaction triggered by health monitors. This ensures that previous task context (old error messages, stale file references) never leaks into new tasks, maintaining 100% implementation integrity.
92
+ Reused sessions in the **SessionPool** are explicitly reset via server-side compaction, ensuring previous task context never leaks into new tasks.
82
93
 
83
94
  ### 🚀 Zero-Payload Turbo Mode
84
- Leverages `system.transform` to unshift massive agent instruction sets on the server side. This reduces initial message payloads by **90%+**, slashing latency and preventing context fragmentation during long autonomous loops.
85
-
86
- ---
87
-
88
- ## 🛠️ Infrastructure & Reliability
89
-
90
- ### 🔒 Resource Safety & Reliability
91
- - **RAII Pattern (ConcurrencyToken)**: Guaranteed resource cleanup with zero leaks
92
- - **ShutdownManager**: Priority-based graceful shutdown with 5-second timeout per handler
93
- - **Automatic Backups**: All config changes backed up with rollback support
94
- - **Atomic File Operations**: Temp file + rename for corruption-proof writes
95
- - **Finally Blocks**: Guaranteed cleanup in all critical paths
96
- - **Zero Resource Leaks**: File watchers, event listeners, concurrency slots all properly released
97
-
98
- ### ⚡ Performance Optimizations
99
- - **Work-Stealing Queues**: Chase-Lev deque implementation for 90%+ CPU utilization
100
- - Planner: 2 workers, Worker: 8 workers, Reviewer: 4 workers
101
- - LIFO for owner (cache locality), FIFO for thieves (fairness)
102
- - **Memory Pooling**: 80% GC pressure reduction
103
- - Object Pool: 200 ParallelTask instances (50 prewarmed)
104
- - String Interning: Deduplication for agent names, status strings
105
- - Buffer Pool: Reusable ArrayBuffers (1KB, 4KB, 16KB, 64KB)
106
- - **Session Reuse**: 90% faster session creation (500ms → 50ms)
107
- - Pool size: 5 sessions per agent type
108
- - Max reuse: 10 times per session
109
- - Health check: Every 60 seconds
110
- - **Rust Connection Pool**: 10x faster tool calls (50-100ms → 5-10ms)
111
- - Max 4 persistent processes
112
- - 30-second idle timeout
113
- - **Adaptive Polling**: Dynamic 500ms-5s intervals based on system load
114
-
115
- ### 🛡️ Safety Features
116
- - **Circuit Breaker**: Auto-recovery from API failures (5 failures → open)
117
- - **Resource Pressure Detection**: Rejects low-priority tasks when memory > 80%
118
- - **Terminal Node Guard**: Prevents infinite recursion (depth limit enforcement)
119
- - **Auto-Scaling**: Concurrency slots adjust based on success/failure rate
120
-
121
- ---
122
-
123
- ## 🛠️ Key Innovations
95
+ Leverages `system.transform` to unshift agent instruction sets server-side, reducing initial message payloads by **90%+** and preventing context fragmentation.
124
96
 
125
97
  ### 🧠 Hierarchical Memory System
126
- Maintains focus across thousands of conversation turns using a 4-tier memory structure and **EMA-based Context Gating** to preserve "Architectural Truth" while pruning operational noise.
127
-
128
- ### Dynamic Concurrency Auto-Scaling
129
- Slots for parallel implementation scale up automatically after a **3-success streak** and scale down aggressively upon detection of API instability or implementation failures.
130
-
131
- ### 🛡️ Neuro-Symbolic Safety
132
- Combines LLM reasoning with deterministic **AST/LSP verification**. Every code change is verified by native system tools before being accepted into the master roadmap.
98
+ Maintains focus across thousands of conversation turns using a 4-tier memory structure with **EMA-based Context Gating** to preserve architectural truth while pruning noise.
133
99
 
134
100
  ### 🔄 Adaptive Intelligence Loop
135
- - **Stagnation Detection**: Automatically senses when no progress is made across multiple iterations
136
- - **Diagnostic Intervention**: Forces the agent into a "Diagnostic Mode" when stagnation is detected, mandating log audits and strategy pivots
137
- - **Proactive Agency**: Mandates Speculative Planning and Parallel Thinking during background task execution
138
-
139
- ### 📊 Native TUI Integration
140
- Seamless integration with OpenCode's native TUI via **TaskToastManager**. Provides non-intrusive, real-time feedback on **Mission Progress**, active **Agent Sub-sessions**, and **Technical Metrics** using protocol-safe Toast notifications.
141
-
142
- ### ⚡ Event-Driven Architecture
143
- Utilizes a hybrid event-driven pipeline (`EventHandler` + `TaskPoller`) to maximize responsiveness while maintaining robust state tracking and resource cleanup.
144
-
145
- ### 🔒 Secure Configuration
146
- Runtime agent configuration is strictly validated using **Zod schemas**, ensuring that custom agent definitions in `agents.json` are type-safe and error-free before execution.
101
+ - **Stagnation Detection**: Senses when no progress is made across iterations
102
+ - **Diagnostic Intervention**: Forces "Diagnostic Mode" mandating log audits and strategy pivots
103
+ - **Proactive Agency**: Mandates Speculative Planning during background task execution
147
104
 
148
105
  ---
149
106
 
150
- ## Elite Multi-Agent Swarm
107
+ ## Performance Benchmarks
151
108
 
152
- | Agent | Expertise | Capability |
153
- |:------|:-----|:---|
154
- | **Commander** | Mission Hub | Session pooling, parallel thread control, state rehydration, work-stealing coordination |
155
- | **Planner** | Architect | Symbolic mapping, dependency research, roadmap generation, file-level planning |
156
- | **Worker** | Implementer | High-throughput coding, TDD workflow, documentation, isolated file execution |
157
- | **Reviewer** | Auditor | Rigid verification, LSP/Lint authority, integration testing, final mission seal |
109
+ | Metric | Improvement |
110
+ |:-------|:------------|
111
+ | CPU Utilization | 90%+ (up from 50-70%) |
112
+ | Tool Call Speed | 10x faster (5-10ms vs 50-100ms) via Rust pool |
113
+ | Session Creation | 90% faster (50ms vs 500ms) via session pooling |
114
+ | Memory Usage | 60% reduction via object/string/buffer pooling |
115
+ | GC Pressure | 80% reduction |
116
+ | Token Efficiency | 40% reduction via Incremental State & System Transform |
117
+ | Sync Accuracy | 99.95% via MVCC+Mutex |
118
+ | Parallel Efficiency | 80% improvement (50% → 90%+) |
158
119
 
159
120
  ---
160
121
 
161
- ## 📈 Performance Benchmarks
162
-
163
- ### Throughput & Efficiency
164
- - **Concurrent Sessions**: 50+ parallel agent sessions with work-stealing
165
- - **CPU Utilization**: 90%+ (up from 50-70%)
166
- - **Tool Call Speed**: 10x faster (5-10ms vs 50-100ms) via Rust connection pool
167
- - **Session Creation**: 90% faster (50ms vs 500ms) via session pooling
168
- - **Processing Speed**: 3-5x baseline throughput
169
-
170
- ### Resource Efficiency
171
- - **Memory Usage**: 60% reduction (40% of baseline) via pooling
172
- - **GC Pressure**: 80% reduction via object/string/buffer pooling
173
- - **Token Efficiency**: 40% reduction via Incremental State & System Transform
122
+ ## 🏗️ Infrastructure & Reliability
174
123
 
175
- ### Reliability
176
- - **Sync Accuracy**: 99.95% reliability via MVCC+Mutex transaction logic
177
- - **Mission Survival**: 100% uptime through plugin restarts via S.H.R (Self-Healing Rehydration)
178
- - **Resource Leaks**: Zero (guaranteed by RAII pattern)
179
- - **Config Safety**: 100% (atomic writes + auto-backup + rollback)
180
-
181
- ### Scalability
182
- - **Work-Stealing Efficiency**: 80% improvement in parallel efficiency (50% → 90%+)
183
- - **Adaptive Polling**: Dynamic 500ms-5s based on load
184
- - **Auto-Scaling**: Concurrency slots adjust automatically based on success rate
185
-
186
- ---
124
+ ### Resource Safety
125
+ - **RAII Pattern**: Guaranteed resource cleanup with zero leaks
126
+ - **ShutdownManager**: Priority-based graceful shutdown (5s timeout per handler)
127
+ - **Atomic File Operations**: Temp file + rename for corruption-proof writes
128
+ - **Automatic Backups**: Timestamped config backups with rollback support
187
129
 
188
- ## 🏗️ Technical Stack
130
+ ### Safety Features
131
+ - **Circuit Breaker**: Auto-recovery from API failures (5 failures → open)
132
+ - **Resource Pressure Detection**: Rejects low-priority tasks when memory > 80%
133
+ - **Terminal Node Guard**: Prevents infinite recursion via depth limit
134
+ - **Auto-Scaling**: Concurrency slots adjust based on success/failure rate
189
135
 
136
+ ### Technical Stack
190
137
  - **Runtime**: Node.js 18+ (TypeScript)
191
138
  - **Tools**: Rust-based CLI tools (grep, glob, ast) via connection pool
192
139
  - **Concurrency**: Chase-Lev work-stealing deque + priority queues
193
140
  - **Memory**: Object pooling + string interning + buffer pooling
194
141
  - **State Management**: MVCC + Mutex
195
- - **Safety**: RAII pattern + circuit breaker + resource pressure detection
196
-
197
- ---
198
-
199
- ## 📚 Documentation
200
-
201
- - [Why We Built a Custom Orchestrator Instead of Using OpenCode's APIs →](docs/WHY_CUSTOM_ORCHESTRATOR.md)
202
- - [System Architecture Deep-Dive →](docs/SYSTEM_ARCHITECTURE.md)
203
- - [Windows Configuration Guide →](docs/WINDOWS_CONFIGURATION.md)
204
- - [Developer Notes →](docs/DEVELOPERS_NOTE.md)
142
+ - **Safety**: RAII + circuit breaker + resource pressure detection
205
143
 
206
144
  ---
207
145
 
@@ -210,12 +148,11 @@ Runtime agent configuration is strictly validated using **Zod schemas**, ensurin
210
148
  ### Safe Installation
211
149
  The installation process is **production-safe** with multiple protection layers:
212
150
 
213
- 1. ✅ **Never overwrites** - always merges with existing config
214
- 2. ✅ **Automatic backups** - timestamped, last 5 kept
215
- 3. ✅ **Atomic writes** - temp file + rename (OS-level atomic)
216
- 4. ✅ **Write verification** - ensures correctness after every change
217
- 5. ✅ **Automatic rollback** - restores from backup on any failure
218
- 6. ✅ **Cross-platform** - Windows (native, Git Bash, WSL), macOS, Linux
151
+ 1. ✅ **Never overwrites** always merges with existing config
152
+ 2. ✅ **Automatic backups** timestamped, last 5 kept
153
+ 3. ✅ **Atomic writes** temp file + rename (OS-level atomic)
154
+ 4. ✅ **Automatic rollback** restores from backup on any failure
155
+ 5. ✅ **Cross-platform** Windows (native, Git Bash, WSL2), macOS, Linux
219
156
 
220
157
  ### Configuration Logs
221
158
  - Unix: `/tmp/opencode-orchestrator.log`
@@ -223,9 +160,18 @@ The installation process is **production-safe** with multiple protection layers:
223
160
 
224
161
  ---
225
162
 
163
+ ## 📚 Documentation
164
+
165
+ - [Why We Built a Custom Orchestrator →](docs/WHY_CUSTOM_ORCHESTRATOR.md)
166
+ - [System Architecture Deep-Dive →](docs/SYSTEM_ARCHITECTURE.md)
167
+ - [Windows Configuration Guide →](docs/WINDOWS_CONFIGURATION.md)
168
+ - [Developer Notes →](docs/DEVELOPERS_NOTE.md)
169
+
170
+ ---
171
+
226
172
  ## 📄 License
227
173
 
228
- MIT License - see [LICENSE](LICENSE) for details.
174
+ MIT License see [LICENSE](LICENSE) for details.
229
175
 
230
176
  ---
231
177
 
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": "1.2.59",
5
+ "version": "1.2.61",
6
6
  "author": "agnusdei1207",
7
7
  "license": "MIT",
8
8
  "repository": {
@@ -41,7 +41,7 @@
41
41
  "scripts": {
42
42
  "docker:build-all": "docker compose run --rm dev && docker compose run --rm win-builder",
43
43
  "docker:build-win": "docker compose run --rm win-builder",
44
- "docker:rust-dist": "docker compose run --rm dev && sudo chown -R $(id -u):$(id -g) bin/ 2>/dev/null || true",
44
+ "docker:rust-dist": "docker compose run --rm dev && (sudo chown -R $(id -u):$(id -g) bin/ 2>/dev/null || true)",
45
45
  "docker:test": "docker compose run --rm test",
46
46
  "docker:clean": "docker compose down -v",
47
47
  "build": "rm -rf dist && npx esbuild src/index.ts --bundle --outfile=dist/index.js --platform=node --format=esm && tsc --emitDeclarationOnly && mkdir -p dist/scripts && npx esbuild scripts/postinstall.ts --bundle --outfile=dist/scripts/postinstall.js --platform=node --format=esm && npx esbuild scripts/preuninstall.ts --bundle --outfile=dist/scripts/preuninstall.js --platform=node --format=esm",