opencode-orchestrator 1.0.61 → 1.0.65

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 (49) hide show
  1. package/README.md +69 -74
  2. package/dist/agents/definitions.d.ts +1 -2
  3. package/dist/agents/prompts/index.d.ts +0 -1
  4. package/dist/agents/prompts/mission/completion-conditions.d.ts +1 -0
  5. package/dist/agents/prompts/mission/index.d.ts +1 -1
  6. package/dist/agents/prompts/philosophy/execution-assurance.d.ts +2 -1
  7. package/dist/agents/prompts/planning/decomposition.d.ts +1 -1
  8. package/dist/agents/prompts/planning/todo-format.d.ts +1 -1
  9. package/dist/agents/prompts/roles/reviewer/forbidden.d.ts +1 -2
  10. package/dist/agents/prompts/roles/reviewer/identity.d.ts +1 -2
  11. package/dist/agents/prompts/verification/integration.d.ts +1 -1
  12. package/dist/agents/prompts/verification/sync-check.d.ts +0 -1
  13. package/dist/core/loop/mission-loop-handler.d.ts +25 -0
  14. package/dist/core/loop/{mission-seal.d.ts → mission-loop.d.ts} +6 -32
  15. package/dist/core/loop/todo-continuation.d.ts +1 -1
  16. package/dist/core/loop/verification.d.ts +6 -2
  17. package/dist/core/notification/task-toast-manager.d.ts +2 -2
  18. package/dist/hooks/features/mission-loop.d.ts +5 -4
  19. package/dist/index.js +3917 -5561
  20. package/dist/shared/agent/constants/names.d.ts +0 -1
  21. package/dist/shared/constants/system-messages.d.ts +4 -4
  22. package/dist/shared/core/constants/limits.d.ts +2 -2
  23. package/dist/shared/core/constants/phases.d.ts +1 -1
  24. package/dist/shared/loop/constants/index.d.ts +2 -1
  25. package/dist/shared/loop/constants/labels.d.ts +33 -0
  26. package/dist/shared/loop/constants/{mission-seal.d.ts → mission-control.d.ts} +5 -9
  27. package/dist/shared/notification/constants/tui.const.d.ts +3 -3
  28. package/dist/shared/prompt/constants/index.d.ts +1 -1
  29. package/dist/shared/prompt/constants/mandates.d.ts +6 -11
  30. package/dist/shared/prompt/constants/status.d.ts +1 -1
  31. package/dist/shared/prompt/constants/tags.d.ts +59 -23
  32. package/dist/shared/task/constants/index.d.ts +1 -0
  33. package/dist/shared/task/constants/metadata-keys.d.ts +10 -0
  34. package/dist/shared/task/constants/parallel-task.d.ts +1 -1
  35. package/dist/shared/tool/constants/parallel/index.d.ts +1 -0
  36. package/dist/shared/tool/constants/parallel/parameters.d.ts +19 -0
  37. package/dist/shared/verification/constants/index.d.ts +1 -0
  38. package/dist/shared/verification/constants/signals.d.ts +10 -0
  39. package/dist/tools/callAgent.d.ts +1 -2
  40. package/package.json +3 -2
  41. package/dist/agents/prompts/mission/seal-conditions.d.ts +0 -1
  42. package/dist/agents/prompts/roles/master-reviewer/capabilities.d.ts +0 -7
  43. package/dist/agents/prompts/roles/master-reviewer/forbidden.d.ts +0 -7
  44. package/dist/agents/prompts/roles/master-reviewer/identity.d.ts +0 -7
  45. package/dist/agents/prompts/roles/master-reviewer/index.d.ts +0 -8
  46. package/dist/agents/prompts/roles/master-reviewer/seal-authority.d.ts +0 -7
  47. package/dist/agents/prompts/roles/master-reviewer/verification-process.d.ts +0 -8
  48. package/dist/agents/subagents/master-reviewer.d.ts +0 -14
  49. package/dist/core/loop/mission-seal-handler.d.ts +0 -34
package/README.md CHANGED
@@ -31,75 +31,76 @@ The system is a testament to the operational paradox: **Complexity is easy; Simp
31
31
 
32
32
  While the user interaction remains elegantly minimal, the internal architecture encapsulates a rigorous alignment of **microscopic state management** (`Rust atoms`) and **macroscopic strategic planning** (`Agent Topology`). Every component reflects a deep design philosophy aimed at abstracting chaos into order.
33
33
 
34
- Building this system reaffirmed a timeless engineering truth: **"Simple is Best" is the ultimate complexity to conquer.** This engine is my answer to that challenge—hiding the **intricate dynamics of Autonomous Agentic Collaboration** behind a seamless, user-friendly veil.
34
+ Building this system reaffirmed a timeless engineering truth: **"Simple is Best" is the ultimate complexity to conquer.** This engine is our answer to that challenge—hiding the **intricate dynamics of Autonomous Agentic Collaboration** behind a seamless, user-friendly veil.
35
35
 
36
- This philosophy extends to efficiency. I achieved **Zero-Configuration** usability while rigorously optimizing for performance—**delivering higher quality outcomes** than alternatives while **saving ~40% of tokens**. By maximizing the potential of cost-effective models like **GLM-4.7**, we prove that superior engineering—not just raw model size—is the key to autonomous performance.
36
+ This philosophy extends to efficiency. We achieved **Zero-Configuration** usability while rigorously optimizing for performance—**delivering higher quality outcomes** than alternatives while **saving ~40% of tokens**. By maximizing the potential of cost-effective models like **GLM-4.7**, we prove that superior engineering—not just raw model size—is the key to autonomous performance.
37
37
 
38
38
  ---
39
39
 
40
40
  ## 📊 Workflow
41
41
 
42
42
  ```text
43
- [ /task "Implement" ]
44
- |
45
- +-----------v-----------+ <-----------------+
46
- | COMMANDER | |
47
- +-----------+-----------+ |
48
- | |
49
- +-----------v-----------+ |
50
- | PLANNER | |
51
- +-----------+-----------+ |
52
- | |
53
- +------------------v------------------+ |
54
- | Parallel Spawning | |
55
- +------+----------+----------+-------+ |
56
- | | | |
57
- +------v---+ +----v-----+ +--v-------+ |
58
- | WORKER | | WORKER | | WORKER | |
59
- +------+---+ +----+-----+ +--+-------+ |
60
- | | | |
61
- +======v==========v==========v======+ |
62
- | Parallel Reviewers | |
63
- +======+===========+=========+======+ |
64
- | | | |
65
- +------v----+ +----v-----+ +-v--------+ |
66
- | REVIEWER | | REVIEWER | | REVIEWER | |
67
- +------+----+ +----+-----+ +-+--------+ |
68
- | | | |
69
- =v===========v=========v= |
70
- | SYNC BARRIER | |
71
- ============+============ |
72
- | |
73
- +----------v----------+ |
74
- | MASTER REVIEWER | |
75
- | +----------------+ | |
76
- | | [x] Build | | |
77
- | | [x] Tests | | |
78
- | | [x] E2E | | |
79
- | | [x] Sync | | |
80
- | +----------------+ | |
81
- +----------+----------+ |
82
- | |
83
- ________v________ |
84
- / \ NO |
85
- / All Checks Pass? \---------------------+
86
- \ /
87
- \_________________/
88
- | YES
89
- |
90
- [ 🎖️ MISSION SEALED ]
91
- |
92
- +----------v----------+
93
- | Notification |
94
- +---------------------+
43
+ [ User Task Input ]
44
+
45
+ ┌───────────▼───────────┐ ◄────────────────────────────────────────┐
46
+ │ 🧐 COMMANDER (Hub) │ (Orchestration) │
47
+ └───────────┬───────────┘ │
48
+ │ │
49
+ ┌───────────▼───────────┐ │
50
+ │ 🗓️ PLANNER (Map) │ (Create Hierarchical TODO.md) │
51
+ └───────────┬───────────┘ │
52
+ │ │
53
+ ┌──────────────────▼──────────────────┐ │
54
+ │ ⚡ COMMANDER: Parallel Spawning │ │
55
+ └──────┬───────────┬───────────┬──────┘ │
56
+ │ │ │ │
57
+ ┌──────▼───┐ ┌─────▼────┐ ┌────▼─────┐ │
58
+ │ 🔨 WORKER │ 🔨 WORKER │ 🔨 WORKER (Implementation) │
59
+ └──────┬───┘ └─────┬────┘ └────┬─────┘ │
60
+ │ │ │ │
61
+ ╔══════▼═══════════▼═══════════▼══════╗ │
62
+ ║ 🔍 COMMANDER: Parallel Reviewers ║ (Sync Barrier) │
63
+ ╚══════╤═══════════╤═══════════╤══════╝ │
64
+ │ │ │
65
+ ┌──────▼───┐ ┌─────▼────┐ ┌────▼─────┐ │
66
+ │🔍REVIEWER │🔍REVIEWER │🔍REVIEWER│ (Module-level Verification) │
67
+ └──────┬───┘ └─────┬────┘ └────┬─────┘ │
68
+ │ │ │
69
+ ═▼═══════════▼═══════════▼═ │
70
+ │ 🌳 TODO ROLL-UP │ │
71
+ ═════════════╤═════════════ │
72
+ │ │
73
+ ┌───────────▼───────────┐ │
74
+ │ 🔍 REVIEWER │ (Final Quality Gate)
75
+ │ ┌─────────────────┐ │ │
76
+ │ │ [x] TODO 100% │ │ │
77
+ │ │ [x] Build Pass │ │ │
78
+ │ │ [x] Tests Pass │ │ │
79
+ │ │ [x] E2E Pass │ │ │
80
+ │ │ [x] Sync OK │ │ │
81
+ │ └─────────────────┘ │ │
82
+ └───────────┬───────────┘ │
83
+ │ │
84
+ _________▼__________ │
85
+ ╱ ╲ NO (Failure Summary → Commander) │
86
+ ╱ ✅ All Checks Pass ╲ ──────────────────────────────────────────┘
87
+ ╲ 🛡️ Sync Issues 0? ╱ (Autonomous Loopback via File State)
88
+ ╲____________________╱
89
+ │ YES
90
+
91
+ [ 🎖️ MISSION COMPLETE ]
92
+
93
+ ┌───────────▼───────────┐
94
+ │ 🔔 Notification │
95
+ └───────────────────────┘
95
96
  ```
96
97
 
97
98
  ---
98
99
 
99
- ## Cognitive Architecture & Key Strengths
100
+ ## 🧠 Cognitive Architecture & Key Strengths
100
101
 
101
102
  ### 📉 Adaptive Context Gating (EMA-based)
102
- I combat "Context Drift" using a mechanism derived from **Exponential Moving Average (EMA)** algorithms. Irrelevant conversation noise follows a rapid decay curve, while critical architectural decisions are reinforced into **Stable Core Memory**. This functions as an **Attention Sink**, allowing agents to work indefinitely without **Catastrophic Forgetting**.
103
+ We combat "Context Drift" using a mechanism derived from **Exponential Moving Average (EMA)** algorithms. Irrelevant conversation noise follows a rapid decay curve, while critical architectural decisions are reinforced into **Stable Core Memory**. This functions as an **Attention Sink**, allowing agents to work indefinitely without **Catastrophic Forgetting**.
103
104
 
104
105
  ### 🧬 BDI (Belief-Desire-Intention) Collaboration
105
106
  The system implements a variant of the **BDI Software Agent Model**:
@@ -109,27 +110,22 @@ The system implements a variant of the **BDI Software Agent Model**:
109
110
  Agents do not merely "chat"; they collaborate to align their Beliefs with Desires through strictly executed Intentions, mirroring human engineering squads.
110
111
 
111
112
  ### ⚙️ Neuro-Symbolic Hybrid Engine
112
- Pure LLM approaches are stochastic. I bind them with a **Neuro-Symbolic Architecture** that anchors probabilistic reasoning to the deterministic precision of **Rust-based AST/LSP Tools**. This ensures every generated token is grounded in rigorous syntax analysis, delivering high performance with minimal resource overhead.
113
+ Pure LLM approaches are stochastic. We bind them with a **Neuro-Symbolic Architecture** that anchors probabilistic reasoning to the deterministic precision of **Rust-based AST/LSP Tools**. This ensures every generated token is grounded in rigorous syntax analysis, delivering high performance with minimal resource overhead.
113
114
 
114
115
  ### ⚡ Dynamic Fork-Join Parallelism with Backpressure
115
116
  The engine features an **Intelligent Load-Balancing System** that fluidly switches between synchronous barriers and asynchronous **Fork-Join** patterns. It monitors **System Backpressure** to dynamically adjust concurrency slots in real-time (`Adaptive Throttling`), maximizing throughput on high-end hardware while maintaining stability on constrained environments.
116
117
 
117
- ### 🎯 Iterative Rejection Sampling (Zero-Shot Defense)
118
- I employ a **Rejection Sampling Loop** driven by the Master Reviewer Agent (**Final Reward Model**). Through the **Metric-based Strict Verification Protocol (MSVP)**, code paths that fail execution tests are pruned. The system iterates until the solution converges on a mathematically correct state (0% Error Rate), rejecting any solution that lacks evidence.
118
+ ### 🎯 Multi-Stage Verification Pipeline (MSVP)
119
+ We employ a **Rejection Sampling Loop** driven by the Reviewer Agent. Through MSVP, code paths that fail execution-based verification are pruned. The system iterates until the solution converges on a verified state (0% Error Rate), rejecting any solution that lacks empirical evidence from the project's native tools.
119
120
 
120
121
  ### 🧩 Externalized Chain-of-Thought (CoT)
121
- The Planner's `TODO.md` serves as an **Externalized Working Memory** (Scratchpad). This persistent **Symbolic Chain-of-Thought** decouples detailed planning from the LLM's immediate context window, enabling the orchestration of massive, multi-step engineering tasks without logical degradation.
122
+ The Planner's `TODO.md` serves as an **Externalized Working Memory**. This persistent **Symbolic Chain-of-Thought** decouples detailed planning from the LLM's immediate context window, enabling the orchestration of massive, multi-step engineering tasks without logical degradation.
122
123
 
123
- ### 🔄 Hierarchical Verification Pipeline (MVP)
124
- The system employs a **Multi-Stage Verification Pipeline**:
125
- 1. **Module-Level**: Reviewers verify individual Worker outputs (unit tests, type checks)
126
- 2. **System-Level**: Master Reviewer performs comprehensive E2E verification
127
- 3. **Loopback**: Failed checks trigger automatic re-planning and correction cycles
124
+ ### 🛠️ Autonomous Skill Extension
125
+ The orchestrator is not limited by its initial programming. It can autonomously **discover, install, and learn** new skills (tools/instructions) on-the-fly when it encounters unfamiliar technologies (e.g., Kubernetes, specific cloud SDKs, or legacy build systems).
128
126
 
129
- This separation of concerns ensures both granular code quality and holistic system integrity.
130
-
131
- ### 🌍 Environment-Agnostic Verification
132
- The Master Reviewer **auto-detects** project environments (Node.js, Rust, Python, Java, Go, C/C++, Docker, etc.) and adapts verification strategies accordingly. No hardcoded assumptions—true polyglot support.
127
+ ### 🌍 Adaptive Verification Frontier
128
+ The system **auto-detects** project environments (Node.js, Rust, Python, Go, C/C++, Docker, etc.) by scouting configuration files and infrastructure. It identifies the unique **Verification Frontier** of each project—whether it's a Makefile, a CI/CD workflow, or a custom test harness—and adapts its strategy accordingly. No hardcoded assumptions—true polyglot autonomy.
133
129
 
134
130
  ---
135
131
 
@@ -137,11 +133,10 @@ The Master Reviewer **auto-detects** project environments (Node.js, Rust, Python
137
133
 
138
134
  | Agent | Role |
139
135
  |:------|:-----|
140
- | **Commander** | Orchestrates the mission, manages parallel threads and sync barriers |
141
- | **Planner** | Architecture architect. Breaks down tasks into strictly defined steps |
142
- | **Worker** | The builder. Writes code and corresponding unit tests |
143
- | **Reviewer** | Module-level gatekeeper. Verifies Worker outputs with build/test execution |
144
- | **Master Reviewer** | 🎖️ Final verification authority. Runs comprehensive E2E tests and holds **exclusive SEAL rights** |
136
+ | **Commander** | Orchestrates the mission, manages parallel threads and sync barriers. |
137
+ | **Planner** | Architecture architect. Breaks down tasks into strictly defined steps. |
138
+ | **Worker** | The builder. Writes code and corresponding unit tests. |
139
+ | **Reviewer** | **Verification Authority**. Module-level gatekeeper AND Final Quality Gate. |
145
140
 
146
141
  ---
147
142
 
@@ -5,8 +5,7 @@
5
5
  * - Commander: Master orchestrator
6
6
  * - Planner: Planning + Research
7
7
  * - Worker: Implementation + Documentation
8
- * - Reviewer: Verification + Context Management
9
- * - Master Reviewer: Final verification authority (SEAL rights)
8
+ * - Reviewer: Verification + Context Management (Final Quality Gate)
10
9
  */
11
10
  import type { AgentDefinition } from "../shared/agent/interfaces/index.js";
12
11
  export declare const AGENTS: Record<string, AgentDefinition>;
@@ -14,4 +14,3 @@ export * from "./roles/commander/index.js";
14
14
  export * from "./roles/planner/index.js";
15
15
  export * from "./roles/worker/index.js";
16
16
  export * from "./roles/reviewer/index.js";
17
- export * from "./roles/master-reviewer/index.js";
@@ -0,0 +1 @@
1
+ export declare const COMPLETION_CONDITIONS: string;
@@ -1,4 +1,4 @@
1
- export * from "./seal-conditions.js";
1
+ export * from "./completion-conditions.js";
2
2
  export * from "./loop-continuation.js";
3
3
  export * from "./status-tracking.js";
4
4
  export * from "./recovery.js";
@@ -1 +1,2 @@
1
- export declare const EXECUTION_ASSURANCE = "<execution_assurance>\n## L0-L7 Execution Assurance Levels\n\n| Level | Scope | Requirement |\n|-------|-------|-------------|\n| **L0** | Syntax | Valid code, no parse errors |\n| **L1** | Static | Linting passes, Types check |\n| **L2** | Unit | Individual functions/classes tested |\n| **L3** | Module | Component integration works |\n| **L4** | Build | Project compiles/bundles successfully |\n| **L5** | Integration | Cross-module/System APIs work |\n| **L6** | E2E | Full flow works from user perspective |\n| **L7** | Verification | Mission requirements met (SEALED) |\n\n**Rule:** You must achieve the highest possible Level for the current task.\n- Never settle for L0/L1 if L2+ is possible.\n- L4 (Build) is a GATEKEEPER. If build fails, nothing else matters.\n</execution_assurance>";
1
+ export declare const EXECUTION_ASSURANCE: string;
2
+ export { AUTONOMOUS_MANDATE } from "../../../shared/index.js";
@@ -1 +1 @@
1
- export declare const TASK_DECOMPOSITION = "<decomposition_rules>\n## Task Decomposition Rules\n\nWhen a task is too large or complex:\n1. **Break it down** into atomic steps (max 1 file or 1 logical unit per step).\n2. **Update TODO**: Replace the large task with subtasks T[N.1], T[N.2], etc.\n3. **Verify Atomic Success**: Each subtask must be verifiable independently (L2+).\n\nIf stuck:\n- Do not retry the same failing action more than twice.\n- Decompose the problem into smaller investigation steps.\n- Create a specific \"Research\" task to find the root cause.\n</decomposition_rules>";
1
+ export declare const TASK_DECOMPOSITION: string;
@@ -1,4 +1,4 @@
1
1
  /**
2
- * Commander TODO Format - Hierarchical
2
+ * Commander TODO Format - Strict Hierarchical
3
3
  */
4
4
  export declare const COMMANDER_TODO_FORMAT: string;
@@ -1,7 +1,6 @@
1
1
  /**
2
2
  * Reviewer Forbidden Actions
3
3
  *
4
- * Module-level verification only.
5
- * Reviewer is a TERMINAL node and cannot spawn other agents or output SEAL.
4
+ * Reviewer is a TERMINAL node and cannot spawn other agents.
6
5
  */
7
6
  export declare const REVIEWER_FORBIDDEN: string;
@@ -1,7 +1,6 @@
1
1
  /**
2
2
  * Reviewer Role
3
3
  *
4
- * Module-level verification specialist.
5
- * Verifies individual Worker tasks, NOT final mission completion.
4
+ * High-precision verification specialist and Final Quality Gate.
6
5
  */
7
6
  export declare const REVIEWER_ROLE: string;
@@ -2,6 +2,6 @@
2
2
  * Reviewer Integration Testing
3
3
  *
4
4
  * Individual file/module integration checks.
5
- * Full E2E and final verification is handled by Master Reviewer.
5
+ * Full E2E and final verification is handled by the Reviewer.
6
6
  */
7
7
  export declare const REVIEWER_INTEGRATION_TESTING: string;
@@ -2,7 +2,6 @@
2
2
  * Reviewer Sync Verification
3
3
  *
4
4
  * Verify file synchronization and report issues for next iteration.
5
- * Note: Final SEAL is handled by Master Reviewer, not Reviewer.
6
5
  * Environment-agnostic - works for any project type.
7
6
  */
8
7
  export declare const REVIEWER_SYNC_VERIFICATION: string;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Mission Loop Handler
3
+ *
4
+ * Monitors session events and ensures the mission loop continues
5
+ * until all verification requirements are met.
6
+ */
7
+ import type { PluginInput } from "@opencode-ai/plugin";
8
+ type OpencodeClient = PluginInput["client"];
9
+ /**
10
+ * Handle session.idle event for mission loop
11
+ */
12
+ export declare function handleMissionIdle(client: OpencodeClient, directory: string, sessionID: string, mainSessionID?: string): Promise<void>;
13
+ /**
14
+ * Handle user message - cancel countdown
15
+ */
16
+ export declare function handleUserMessage(sessionID: string): void;
17
+ /**
18
+ * Handle abort
19
+ */
20
+ export declare function handleAbort(sessionID: string): void;
21
+ /**
22
+ * Clean up session state
23
+ */
24
+ export declare function cleanupSession(sessionID: string): void;
25
+ export {};
@@ -1,21 +1,10 @@
1
1
  /**
2
- * Mission Seal - Explicit completion detection system
2
+ * Mission Loop - Persistent Execution System
3
3
  *
4
- * When an agent outputs `<mission_seal>SEALED</mission_seal>`,
5
- * the task loop knows the mission is truly complete.
6
- *
7
- * This prevents false-positive idle detection and ensures
8
- * agents explicitly confirm task completion.
4
+ * Ensures the mission continues until all TODO items are complete.
5
+ * This system moves away from explicit signaling (seals) and relies
6
+ * strictly on file-based state verification.
9
7
  */
10
- import type { PluginInput } from "@opencode-ai/plugin";
11
- /** Tag for mission seal detection */
12
- export declare const MISSION_SEAL_TAG: "mission_seal";
13
- /** Seal confirmation value */
14
- export declare const SEAL_CONFIRMATION: "SEALED";
15
- /** Full seal pattern: <mission_seal>SEALED</mission_seal> */
16
- export declare const SEAL_PATTERN: "<mission_seal>SEALED</mission_seal>";
17
- /** Regex for detecting seal in text */
18
- export declare const SEAL_REGEX: RegExp;
19
8
  export interface MissionLoopState {
20
9
  /** Whether loop is active */
21
10
  active: boolean;
@@ -54,41 +43,26 @@ export declare function clearLoopState(directory: string): boolean;
54
43
  * Increment iteration counter
55
44
  */
56
45
  export declare function incrementIteration(directory: string): MissionLoopState | null;
57
- /**
58
- * Check if text contains mission seal
59
- */
60
- export declare function detectSealInText(text: string): boolean;
61
- /**
62
- * Check session messages for mission seal
63
- */
64
- export declare function detectSealInSession(client: PluginInput["client"], sessionID: string): Promise<boolean>;
65
46
  /**
66
47
  * Start a mission loop
67
48
  */
68
49
  export declare function startMissionLoop(directory: string, sessionID: string, prompt: string, options?: MissionLoopOptions): boolean;
69
50
  /**
70
51
  * Cancel an active mission loop
71
- *
72
- * TODO: Will be used when /cancel slash command is implemented
73
- * to allow users to cancel an active mission loop.
74
52
  */
75
53
  export declare function cancelMissionLoop(directory: string, sessionID: string): boolean;
76
54
  /**
77
55
  * Check if loop is active for session
78
56
  */
79
57
  export declare function isLoopActive(directory: string, sessionID: string): boolean;
80
- /**
81
- * Get remaining iterations
82
- */
83
- export declare function getRemainingIterations(directory: string): number;
84
58
  /**
85
59
  * Generate continuation prompt for mission loop
86
60
  */
87
- export declare function generateMissionContinuationPrompt(state: MissionLoopState): string;
61
+ export declare function generateMissionContinuationPrompt(state: MissionLoopState, verificationSummary?: string): string;
88
62
  /**
89
63
  * Generate completion notification
90
64
  */
91
- export declare function generateSealedNotification(state: MissionLoopState): string;
65
+ export declare function generateCompletionNotification(state: MissionLoopState): string;
92
66
  /**
93
67
  * Generate max iterations reached notification
94
68
  */
@@ -14,7 +14,7 @@ type OpencodeClient = PluginInput["client"];
14
14
  /**
15
15
  * Handle session.idle event - start countdown if todos remain
16
16
  */
17
- export declare function handleSessionIdle(client: OpencodeClient, sessionID: string, mainSessionID?: string): Promise<void>;
17
+ export declare function handleSessionIdle(client: OpencodeClient, directory: string, sessionID: string, mainSessionID?: string): Promise<void>;
18
18
  /**
19
19
  * Handle user message - cancel countdown (user is interacting)
20
20
  * Uses grace period to avoid cancelling countdown from our own injected messages
@@ -4,7 +4,7 @@
4
4
  * Provides a structured checklist system for mission completion verification.
5
5
  *
6
6
  * The LLM creates and checks items in .opencode/verification-checklist.md
7
- * The hook system verifies all items are checked before allowing SEAL.
7
+ * The hook system verifies all items are checked before allowing CONCLUDE.
8
8
  *
9
9
  * This approach:
10
10
  * 1. LLM discovers environment and creates appropriate checklist items
@@ -53,9 +53,13 @@ export declare function getChecklistCreationInstructions(): string;
53
53
  */
54
54
  export declare function verifyMissionCompletion(directory: string): VerificationResult;
55
55
  /**
56
- * Build prompt for when SEAL is rejected due to verification failure
56
+ * Build prompt for when conclusion is rejected due to verification failure
57
57
  */
58
58
  export declare function buildVerificationFailurePrompt(result: VerificationResult): string;
59
+ /**
60
+ * Build prompt for when TODO is incomplete
61
+ */
62
+ export declare function buildTodoIncompletePrompt(result: VerificationResult): string;
59
63
  /**
60
64
  * Build a concise status summary for logs
61
65
  */
@@ -87,9 +87,9 @@ export declare class TaskToastManager {
87
87
  */
88
88
  showAllCompleteToast(parentSessionID: string, completedTasks: TaskCompletionInfo[]): void;
89
89
  /**
90
- * Show Mission Sealed toast (Grand Finale)
90
+ * Show Mission Complete toast (Grand Finale)
91
91
  */
92
- showMissionSealedToast(title?: string, message?: string): void;
92
+ showMissionCompleteToast(title?: string, message?: string): void;
93
93
  /**
94
94
  * Show progress toast (for long-running tasks)
95
95
  */
@@ -2,16 +2,17 @@
2
2
  * Mission Loop Hook
3
3
  *
4
4
  * Handles:
5
- * - Mission seal detection (Stop)
5
+ * - Persistent execution until all TODOs are verified
6
6
  * - Auto-continuation injection (Loop)
7
7
  * - User cancellation detection
8
- *
9
- * Refactored to use SessionManager and SystemMessages for better maintainability.
10
8
  */
11
9
  import type { AssistantDoneHook, ChatMessageHook, HookContext } from "../types.js";
12
10
  export declare class MissionControlHook implements AssistantDoneHook, ChatMessageHook {
13
11
  name: "MissionLoop";
14
12
  execute(ctx: HookContext, text: string): Promise<any>;
15
13
  private handleChatCommand;
16
- private handleMissionSeal;
14
+ private handleMissionProgress;
15
+ private buildContinuationResponse;
16
+ private handleMissionComplete;
17
+ private sendCompletionNotification;
17
18
  }