opencode-orchestrator 1.0.74 → 1.0.76

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 CHANGED
@@ -57,21 +57,29 @@ OpenCode Orchestrator executes a **Linear Strategy** through **Parallel Sessions
57
57
 
58
58
  ---
59
59
 
60
+ ---
61
+
60
62
  ## 🛠️ Technical Core
61
63
 
62
- ### 📂 Session-Based Parallelism
63
- All operations are executed asynchronously in isolated sessions via the **SessionPool**. Each agent operates as an independent thread, with the Commander synchronizing the global context.
64
+ ### 🔄 Persistent-Autonomous Engine
65
+ The orchestrator is built for **uninterrupted survival**. Using **Self-Healing Rehydration**, the system state is synced to disk (`.opencode/mission_loop.json`). Even if the plugin reloads or the process restarts, the orchestrator automatically resumes missions without losing context or agent roles.
64
66
 
65
- ### 🧠 Hierarchical Memory
66
- Context is managed through a 4-tier structure (System, Project, Mission, Task). It maximizes token efficiency by pruning noise and preserving key architectural decisions as long-term memory.
67
+ ### 🚀 Zero-Payload Initiation (Turbo Mode)
68
+ Leverages the `experimental.chat.system.transform` hook to inject comprehensive agent instructions on the server side. This reduces initial message size by **90%**, slashing latency and preventing payload-related hangs during `/task` invocation.
67
69
 
68
- ### 🌳 Incremental State Loop
69
- The loop operates based on incremental updates to `.opencode/todo.md`. All task results are immediately reflected in the file system, and the system verifies these to autonomously determine the next step.
70
+ ### ⛓️ Deadlock-Free Async Pipeline
71
+ A re-engineered execution flow that uses **Asynchronous Continuation triggers**. By utilizing a fire-and-forget strategy for prompt injections, the system eliminates traditional protocol deadlocks between the plugin hooks and the OpenCode server.
72
+
73
+ ### 📂 Session-Based Parallelism
74
+ All operations are executed asynchronously in isolated sessions via the **SessionPool**. Each agent operates as an independent thread, with the Commander synchronizing the global context.
70
75
 
71
76
  ---
72
77
 
73
78
  ## 🛠️ Key Innovations
74
79
 
80
+ ### 🛡️ Self-Healing Mission Continuity
81
+ Survival-first design. The orchestrator cross-checks in-memory state with on-disk artifacts at every step. If the plugin's memory is cleared, it re-activates mission flags and agent instructions automatically upon the next event.
82
+
75
83
  ### 🧠 Hierarchical Memory System
76
84
  Maintains focus across long-running projects using a 4-tier memory structure. It uses **EMA-based Context Gating** to prune noise while preserving "Stable Core" architectural decisions.
77
85
 
@@ -79,7 +87,7 @@ Maintains focus across long-running projects using a 4-tier memory structure. It
79
87
  Replaces monolithic file rewrites with atomic updates. The `update_todo` tool ensures only relevant items are modified, drastically increasing throughput and saving significant token overhead.
80
88
 
81
89
  ### 📊 Real-time TUI Monitor
82
- A live dashboard directly in your terminal. Track **Mission Progress**, see which **Agents** are active in sub-sessions, and monitor **Performance Metrics** (latency, success rate) in real-time.
90
+ A live dashboard directly in your terminal. Track **Mission Progress**, see which **Agents** are active in sub-sessions, and monitor **Performance Metrics** (latency, success rate) through isolated API channels.
83
91
 
84
92
  ### 🧩 Modular Plugin SDK & Custom Agents
85
93
  Extend the engine without touching the core. Drop custom JS plugins into `.opencode/plugins/` to add new tools/hooks, or define niche agent roles in `.opencode/agents.json`.
@@ -6,8 +6,6 @@
6
6
  * - 90% reduction in session creation time (500ms → 50ms)
7
7
  * - Reduced OpenCode server load
8
8
  * - Faster parallel task startup
9
- *
10
- * @see ORCHESTRATOR_IMPROVEMENT_PLAN.md Section 5.2 - 제안 2.1
11
9
  */
12
10
  import type { PluginInput } from "@opencode-ai/plugin";
13
11
  import type { PooledSession, SessionPoolConfig, SessionPoolStats, ISessionPool } from "./interfaces/session-pool.interface.js";
@@ -1,22 +1,17 @@
1
- /**
2
- * Session Manager
3
- *
4
- * Centralizes all direct access to the global `state` and session initialization logic.
5
- * Eliminates redundant state checks across hooks and handlers.
6
- */
7
1
  /**
8
2
  * Ensures a local session object exists in the plugin context map.
9
- * This is "Session State 1" (Plugin-local tracking).
3
+ * Now WITH disk-based rehydration for robustness.
10
4
  */
11
- export declare function ensureSessionInitialized(sessions: Map<string, any>, sessionID: string): any;
5
+ export declare function ensureSessionInitialized(sessions: Map<string, any>, sessionID: string, directory?: string): any;
12
6
  /**
13
7
  * Activates the global mission state for a specific session.
14
8
  */
15
9
  export declare function activateMissionState(sessionID: string): void;
16
10
  /**
17
11
  * Checks if the mission is globally active and the session is enabled.
12
+ * CROSS-CHECK: Will return true if disk state confirms mission, even if in-memory 'missionActive' flag reset.
18
13
  */
19
- export declare function isMissionActive(sessionID: string): boolean;
14
+ export declare function isMissionActive(sessionID: string, directory?: string): boolean;
20
15
  /**
21
16
  * Deactivates mission state (e.g., on cancellation or error).
22
17
  */