JSPM

opencode-orchestrator

1.0.78
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 910
  • Score
    100M100P100Q101311F
  • License MIT

Distributed Cognitive Architecture for OpenCode. Turns simple prompts into specialized multi-agent workflows (Planner, Coder, Reviewer).

Package Exports

  • opencode-orchestrator

Readme

logo

OpenCode Orchestrator

Autonomous Multi-Agent Orchestration Engine for High-Integrity Software Engineering

MIT License npm


⚑ Quick Start

npm install -g opencode-orchestrator

Inside an OpenCode environment:

/task "Implement a new authentication module with JWT and audit logs"

πŸš€ Engine Workflow

OpenCode Orchestrator utilizes a Hub-and-Spoke Topology to execute complex engineering tasks through parallel, context-isolated sessions.

            [ User Task ]
                    β”‚
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β”‚     COMMANDER       │◄───────────┐ (Loop Phase)
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜            β”‚
                  β”‚                         β”‚
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”              β”‚
         β”‚      PLANNER      β”‚ (Todo.md)    β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β”‚
                  β”‚                         β”‚ (MVCC Atomic Sync)
     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”          β”‚
     β–Ό     (Isolated Session Pool)β–Ό          β”‚
[ Session A ] [ Session B ] [ Session C ]   β”‚
[  Worker   ] [  Worker   ] [  Reviewer ]   β”‚
     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β”‚
                  β”‚                         β”‚
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”              β”‚
         β”‚   MSVP MONITOR    β”‚β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                  β”‚
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β”‚ QUALITY ASSURANCE β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                  β”‚
            [ ✨COMPLETED ]

πŸ› οΈ Technical Excellence

�️ Atomic MVCC State Synchronization

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 kryptographically hashed and logged for a complete audit trail.

🧩 Advanced Hook Orchestration

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.

�️ State-Level Session Isolation

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.

πŸš€ Zero-Payload Turbo Mode

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.


πŸ› οΈ Key Innovations

🧠 Hierarchical Memory System

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.

οΏ½ Dynamic Concurrency Auto-Scaling

Slots for parallel implementation scale up automatically after a 3-success streak and scale down aggressively upon detection of API instability or implementation failures.

πŸ›‘οΈ Neuro-Symbolic Safety

Combines LLM reasoning with deterministic AST/LSP verification. Every code change is verified by native system tools before being accepted into the master roadmap.

πŸ“Š Real-time TUI Monitor

A live dashboard directly in your TUI. Monitor Mission Progress, active Agent Sub-sessions, and Technical Metrics through optimized, protocol-safe channels.


⚑ Elite Multi-Agent Swarm

Agent Expertise Capability
Commander Mission Hub Session pooling, parallel thread control, state rehydration.
Planner Architect Symbolic mapping, dependency research, roadmap generation.
Worker Implementer High-throughput coding, TDD workflow, documentation.
Reviewer Auditor Rigid verification, LSP/Lint authority, final mission seal.

πŸ“ˆ Performance Benchmarks

  • Throughput: 10+ concurrent agent sessions with adaptive slot scaling.
  • Accuracy: 99.95% sync reliability via MVCC+Mutex transaction logic.
  • Efficiency: 40% reduction in token burn via Incremental State & System Transform.
  • Uptime: 100% mission survival through plugin restarts via S.H.R (Self-Healing Rehydration).

Internal Architecture Deep-Dive β†’

πŸ“„ License

MIT License.