opencode-orchestrator 1.0.61 → 1.0.71

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 (77) hide show
  1. package/README.md +59 -108
  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/agents/agent-registry.d.ts +29 -0
  14. package/dist/core/agents/interfaces/session-pool.interface.d.ts +79 -0
  15. package/dist/core/agents/manager/task-cleaner.d.ts +3 -1
  16. package/dist/core/agents/manager/task-launcher.d.ts +4 -2
  17. package/dist/core/agents/manager.d.ts +2 -0
  18. package/dist/core/agents/session-pool.d.ts +58 -0
  19. package/dist/core/loop/mission-loop-handler.d.ts +25 -0
  20. package/dist/core/loop/{mission-seal.d.ts → mission-loop.d.ts} +6 -32
  21. package/dist/core/loop/todo-continuation.d.ts +1 -1
  22. package/dist/core/loop/todo-manager.d.ts +18 -0
  23. package/dist/core/loop/verification.d.ts +6 -2
  24. package/dist/core/memory/interfaces.d.ts +33 -0
  25. package/dist/core/memory/memory-manager.d.ts +40 -0
  26. package/dist/core/metrics/collector.d.ts +27 -0
  27. package/dist/core/notification/task-toast-manager.d.ts +2 -2
  28. package/dist/core/orchestrator/session-manager.d.ts +0 -1
  29. package/dist/core/plugins/interfaces.d.ts +30 -0
  30. package/dist/core/plugins/plugin-manager.d.ts +21 -0
  31. package/dist/core/progress/progress-notifier.d.ts +14 -0
  32. package/dist/core/progress/state-broadcaster.d.ts +29 -0
  33. package/dist/core/progress/terminal-monitor.d.ts +13 -0
  34. package/dist/core/recovery/interfaces/recovery-action.d.ts +1 -0
  35. package/dist/hooks/constants.d.ts +4 -1
  36. package/dist/hooks/custom/memory-gate.d.ts +21 -0
  37. package/dist/hooks/custom/metrics.d.ts +14 -0
  38. package/dist/hooks/features/mission-loop.d.ts +5 -4
  39. package/dist/index.js +5271 -5763
  40. package/dist/shared/agent/constants/names.d.ts +0 -1
  41. package/dist/shared/constants/system-messages.d.ts +4 -4
  42. package/dist/shared/core/constants/index.d.ts +1 -0
  43. package/dist/shared/core/constants/limits.d.ts +2 -2
  44. package/dist/shared/core/constants/memory-hooks.d.ts +66 -0
  45. package/dist/shared/core/constants/paths.d.ts +2 -0
  46. package/dist/shared/core/constants/phases.d.ts +1 -1
  47. package/dist/shared/loop/constants/index.d.ts +2 -1
  48. package/dist/shared/loop/constants/labels.d.ts +33 -0
  49. package/dist/shared/loop/constants/{mission-seal.d.ts → mission-control.d.ts} +5 -9
  50. package/dist/shared/notification/constants/tui.const.d.ts +3 -3
  51. package/dist/shared/prompt/constants/index.d.ts +1 -1
  52. package/dist/shared/prompt/constants/mandates.d.ts +6 -11
  53. package/dist/shared/prompt/constants/status.d.ts +1 -1
  54. package/dist/shared/prompt/constants/tags.d.ts +59 -23
  55. package/dist/shared/task/constants/index.d.ts +1 -0
  56. package/dist/shared/task/constants/metadata-keys.d.ts +10 -0
  57. package/dist/shared/task/constants/parallel-task.d.ts +1 -1
  58. package/dist/shared/tool/constants/parallel/index.d.ts +1 -0
  59. package/dist/shared/tool/constants/parallel/parameters.d.ts +19 -0
  60. package/dist/shared/tool/constants/tool-names.d.ts +3 -0
  61. package/dist/shared/verification/constants/index.d.ts +1 -0
  62. package/dist/shared/verification/constants/signals.d.ts +10 -0
  63. package/dist/tools/callAgent.d.ts +1 -2
  64. package/dist/tools/lsp/diagnostics-cache.d.ts +14 -0
  65. package/dist/tools/parallel/list-agents.d.ts +10 -0
  66. package/dist/tools/parallel/show-metrics.d.ts +10 -0
  67. package/dist/tools/parallel/update-todo.d.ts +28 -0
  68. package/package.json +3 -2
  69. package/dist/agents/prompts/mission/seal-conditions.d.ts +0 -1
  70. package/dist/agents/prompts/roles/master-reviewer/capabilities.d.ts +0 -7
  71. package/dist/agents/prompts/roles/master-reviewer/forbidden.d.ts +0 -7
  72. package/dist/agents/prompts/roles/master-reviewer/identity.d.ts +0 -7
  73. package/dist/agents/prompts/roles/master-reviewer/index.d.ts +0 -8
  74. package/dist/agents/prompts/roles/master-reviewer/seal-authority.d.ts +0 -7
  75. package/dist/agents/prompts/roles/master-reviewer/verification-process.d.ts +0 -8
  76. package/dist/agents/subagents/master-reviewer.d.ts +0 -14
  77. package/dist/core/loop/mission-seal-handler.d.ts +0 -34
@@ -7,5 +7,4 @@ export declare const AGENT_NAMES: {
7
7
  readonly PLANNER: "Planner";
8
8
  readonly WORKER: "Worker";
9
9
  readonly REVIEWER: "Reviewer";
10
- readonly MASTER_REVIEWER: "MasterReviewer";
11
10
  };
@@ -4,11 +4,11 @@
4
4
  * Centralized storage for long prompt templates, user messages, and notifications.
5
5
  */
6
6
  export declare const MISSION_MESSAGES: {
7
- readonly START_LOG: "[MissionControl] Detected /task command. Starting mission...";
8
- readonly CANCEL_LOG: "[MissionControl] Detected user cancellation signal.";
9
- readonly SEAL_LOG: "[MissionControl] Mission Seal detected! Finishing loop.";
7
+ readonly START_LOG: "[mission-loop] Detected /task command. Starting mission...";
8
+ readonly CANCEL_LOG: "[mission-loop] Detected user cancellation signal.";
9
+ readonly COMPLETE_LOG: "[mission-loop] Mission Verified! Finishing loop.";
10
10
  readonly TOAST_COMPLETE_TITLE: "Mission Complete";
11
- readonly TOAST_COMPLETE_MESSAGE: "Agent sealed the mission.";
11
+ readonly TOAST_COMPLETE_MESSAGE: "Mission verified and finished.";
12
12
  readonly STOP_TRIGGER: "STOP MISSION";
13
13
  readonly CANCEL_TRIGGER: "CANCEL MISSION";
14
14
  readonly AGENT_HEADER_FORMAT: (indicator: string, name: string) => string;
@@ -9,4 +9,5 @@ export { STATUS_LABEL, type TaskStatus } from "./status-labels.js";
9
9
  export { LIMITS } from "./limits.js";
10
10
  export { WAL_ACTIONS } from "./wal-actions.js";
11
11
  export { PHASES } from "./phases.js";
12
+ export { MEMORY_CONSTANTS, HOOK_NAMES, TODO_CONSTANTS, TUI_CONSTANTS } from "./memory-hooks.js";
12
13
  export * from "./cli.js";
@@ -6,8 +6,8 @@ export declare const LIMITS: {
6
6
  readonly MAX_ITERATIONS: 10000;
7
7
  /** Default scan limit for file listing */
8
8
  readonly DEFAULT_SCAN_LIMIT: 20;
9
- /** Max message history to check for seal */
10
- readonly SEAL_CHECK_HISTORY: 3;
9
+ /** Max message history to check for conclusion */
10
+ readonly CONCLUDE_CHECK_HISTORY: 3;
11
11
  /** Max concurrent tasks per agent */
12
12
  readonly MAX_TASKS_PER_AGENT: 10;
13
13
  /** Default history/list limit for UI */
@@ -0,0 +1,66 @@
1
+ export declare const MEMORY_CONSTANTS: {
2
+ readonly ID_PREFIX: "mem_";
3
+ readonly LEVELS: {
4
+ readonly SYSTEM: "system";
5
+ readonly PROJECT: "project";
6
+ readonly MISSION: "mission";
7
+ readonly TASK: "task";
8
+ };
9
+ readonly IMPORTANCE: {
10
+ readonly LOW: 0.3;
11
+ readonly NORMAL: 0.5;
12
+ readonly HIGH: 0.7;
13
+ readonly CRITICAL: 0.9;
14
+ };
15
+ readonly NOISY_TOOLS: string[];
16
+ readonly KEYWORDS: {
17
+ readonly DONE: "DONE";
18
+ readonly SUCCESS: "SUCCESS";
19
+ readonly ERROR: "ERROR";
20
+ readonly FAIL: "FAIL";
21
+ };
22
+ readonly MAX_CONTENT_LENGTH: 1000;
23
+ };
24
+ export declare const HOOK_NAMES: {
25
+ readonly MEMORY_GATE: "MemoryGate";
26
+ readonly METRICS_TELEMETRY: "MetricsTelemetry";
27
+ readonly SANITY_CHECK: "SanityCheck";
28
+ readonly MISSION_LOOP: "MissionLoop";
29
+ readonly MISSION_CONTROL: "MissionControl";
30
+ readonly STRICT_ROLE_GUARD: "StrictRoleGuard";
31
+ readonly SECRET_SCANNER: "SecretScanner";
32
+ readonly AGENT_UI: "AgentUI";
33
+ readonly RESOURCE_CONTROL: "ResourceControl";
34
+ readonly USER_ACTIVITY: "UserActivity";
35
+ readonly SLASH_COMMAND: "SlashCommandDispatcher";
36
+ };
37
+ export declare const TODO_CONSTANTS: {
38
+ readonly MARKERS: {
39
+ readonly PENDING: "[ ]";
40
+ readonly COMPLETED: "[x]";
41
+ readonly PROGRESS: "[/]";
42
+ readonly FAILED: "[-]";
43
+ };
44
+ readonly STATUS: {
45
+ readonly PENDING: "pending";
46
+ readonly COMPLETED: "completed";
47
+ readonly PROGRESS: "progress";
48
+ readonly FAILED: "failed";
49
+ };
50
+ };
51
+ export declare const TUI_CONSTANTS: {
52
+ readonly BAR_WIDTH: 30;
53
+ readonly COLORS: {
54
+ readonly PROGRESS: "\u001B[36m";
55
+ readonly AGENT: "\u001B[32m";
56
+ readonly RESET: "\u001B[0m";
57
+ readonly BOLD: "\u001B[1m";
58
+ readonly DIM: "\u001B[2m";
59
+ };
60
+ readonly LABELS: {
61
+ readonly IDLE: "Idle";
62
+ readonly WAITING: "Waiting for tasks...";
63
+ readonly PROGRESS_TITLE: "MISSION PROGRESS";
64
+ readonly AGENT_TITLE: "ACTIVE AGENTS";
65
+ };
66
+ };
@@ -16,4 +16,6 @@ export declare const PATHS: {
16
16
  readonly SYNC_ISSUES: ".opencode/sync-issues.md";
17
17
  readonly INTEGRATION_STATUS: ".opencode/integration-status.md";
18
18
  readonly STATUS: ".opencode/status.md";
19
+ readonly AGENTS_CONFIG: ".opencode/agents.json";
20
+ readonly PLUGINS: ".opencode/plugins";
19
21
  };
@@ -40,7 +40,7 @@ export declare const PHASES: {
40
40
  };
41
41
  readonly PHASE_6: {
42
42
  readonly ID: "PHASE_6";
43
- readonly NAME: "SEAL";
43
+ readonly NAME: "CONCLUDE";
44
44
  readonly DESCRIPTION: "Mission completion and deterministic output";
45
45
  readonly MANDATORY: true;
46
46
  };
@@ -2,5 +2,6 @@
2
2
  * Loop constants
3
3
  */
4
4
  export { LOOP } from "./loop.js";
5
- export { MISSION_SEAL, MISSION } from "./mission-seal.js";
5
+ export { MISSION_CONTROL, MISSION } from "./mission-control.js";
6
6
  export { TODO_STATUS } from "./todo-status.js";
7
+ export { LOOP_LABELS } from "./labels.js";
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Status and Progress Labels for UI and Logging
3
+ */
4
+ export declare const LOOP_LABELS: {
5
+ readonly PROGRESS_PREFIX: "[TODO Progress]:";
6
+ readonly INCOMPLETE_TASKS: "Incomplete Tasks";
7
+ readonly NEXT_TASK: "Next Task";
8
+ readonly STATUS_TITLE: "Status";
9
+ readonly STATUS: {
10
+ readonly RUNNING: "[RUN]";
11
+ readonly WAITING: "[WAIT]";
12
+ };
13
+ readonly PRIORITY: {
14
+ readonly HIGH: "[H]";
15
+ readonly MEDIUM: "[M]";
16
+ readonly LOW: "[L]";
17
+ };
18
+ readonly PARALLEL_REQUIRED: "[PARALLEL DISPATCH REQUIRED]";
19
+ readonly EXECUTE_NOW: "// EXECUTE NOW - Launch all $COUNT tasks simultaneously:";
20
+ readonly PARALLEL_NOTICE: "NOTICE: Do NOT run these sequentially. Use background=true for ALL.";
21
+ readonly MONITOR_PROGRESS: "After launching, use list_tasks to monitor progress.";
22
+ readonly ACTION_REQUIRED: "**Action Required**:";
23
+ readonly ACTION_CONTINUE: "1. Continue working on incomplete todos";
24
+ readonly ACTION_MARK_COMPLETE: "2. Mark each task complete when finished";
25
+ readonly ACTION_DONT_STOP: "3. Do NOT stop until all todos are completed or cancelled";
26
+ readonly VERIFIED_COMPLETE: "[Verified Complete]";
27
+ readonly FINAL_STATUS: "**Final Status**:";
28
+ readonly TOTAL_TASKS: "Total Tasks";
29
+ readonly COMPLETED: "Completed";
30
+ readonly CANCELLED: "Cancelled";
31
+ readonly SUCCESS_RATE: "Success Rate";
32
+ readonly MISSION_ACCOMPLISHED: "All tasks have been processed and verified. Mission accomplished!";
33
+ };
@@ -1,24 +1,20 @@
1
1
  /**
2
- * Mission Seal Configuration
2
+ * Mission Control Configuration
3
3
  */
4
- export declare const MISSION_SEAL: {
5
- readonly TAG: "mission_seal";
6
- readonly CONFIRMATION: "SEALED";
7
- readonly PATTERN: "<mission_seal>SEALED</mission_seal>";
4
+ export declare const MISSION_CONTROL: {
8
5
  readonly DEFAULT_MAX_ITERATIONS: 10000;
9
6
  readonly DEFAULT_COUNTDOWN_SECONDS: 3;
10
7
  readonly STATE_FILE: "loop-state.json";
11
8
  readonly STOP_COMMAND: "/stop";
12
9
  readonly CANCEL_COMMAND: "/cancel";
10
+ readonly LOG_SOURCE: "mission-loop";
13
11
  };
14
- /** @deprecated Use MISSION_SEAL instead */
12
+ /** @deprecated Use MISSION_CONTROL instead */
15
13
  export declare const MISSION: {
16
- readonly TAG: "mission_seal";
17
- readonly CONFIRMATION: "SEALED";
18
- readonly PATTERN: "<mission_seal>SEALED</mission_seal>";
19
14
  readonly DEFAULT_MAX_ITERATIONS: 10000;
20
15
  readonly DEFAULT_COUNTDOWN_SECONDS: 3;
21
16
  readonly STATE_FILE: "loop-state.json";
22
17
  readonly STOP_COMMAND: "/stop";
23
18
  readonly CANCEL_COMMAND: "/cancel";
19
+ readonly LOG_SOURCE: "mission-loop";
24
20
  };
@@ -4,7 +4,7 @@
4
4
  export declare const TUI_ICONS: {
5
5
  readonly RUNNING: "⚡";
6
6
  readonly QUEUED: "⏳";
7
- readonly MISSION_SEALED: "🎉";
7
+ readonly MISSION_COMPLETE: "🎉";
8
8
  readonly SHIELD: "🛡️";
9
9
  readonly NEW: " <- NEW";
10
10
  };
@@ -19,6 +19,6 @@ export declare const TUI_TAGS: {
19
19
  readonly PENDING: "PENDING";
20
20
  };
21
21
  export declare const TUI_MESSAGES: {
22
- readonly MISSION_SEALED_TITLE: "MISSION ACCOMPLISHED";
23
- readonly MISSION_SEALED_SUBTITLE: "Passed all verifications.\nCodebase is sealed.";
22
+ readonly MISSION_COMPLETE_TITLE: "MISSION ACCOMPLISHED";
23
+ readonly MISSION_COMPLETE_SUBTITLE: "Passed all verifications.\nWork is complete.";
24
24
  };
@@ -4,6 +4,6 @@
4
4
  export { PROMPT_TAGS, wrapTag } from "./tags.js";
5
5
  export { WORK_STATUS } from "./status.js";
6
6
  export { PHILOSOPHY_PHASES, PHILOSOPHY_TAGLINE, PHILOSOPHY_QUOTE, PHILOSOPHY_LEARN_PRINCIPLE, EXECUTION_CYCLE, EXECUTION_CYCLE_STEPS, } from "./philosophy.js";
7
- export { PHASE_0_DIRECT_DISCOVERY, PHASE_1_THINK_ANALYSIS, PHASE_5_MSVP, HPFA_RULES } from "./mandates.js";
7
+ export { PHASE_0_DIRECT_DISCOVERY, PHASE_1_THINK_ANALYSIS, PHASE_5_MSVP, HPFA_RULES, AUTONOMOUS_MANDATE } from "./mandates.js";
8
8
  export { SCOUT_LABEL, SCOUT_STRUCTURE, SCOUT_STACK, SCOUT_DOCS, SCOUT_INFRA, SCOUT_INTEGRATION } from "./scouts.js";
9
9
  export { AGENT_ROLES, TERMINAL_NODE, SPAWNING_RULES, ARCHITECTURE_RULES, } from "./architecture.js";
@@ -3,29 +3,24 @@
3
3
  *
4
4
  * These constants define the non-negotiable architectural requirements
5
5
  * that ensure the orchestrator operates according to the verified diagram.
6
- *
7
- * NOTE: Direct reading is preferred over parallel scouts to reduce token costs.
8
6
  */
9
7
  /**
10
8
  * Phase 0: Direct Discovery
11
- * Read directly - no parallel scout overhead, saves tokens and time.
12
9
  */
13
10
  export declare const PHASE_0_DIRECT_DISCOVERY: string;
14
11
  /**
15
12
  * Phase 1: THINK (Strategic Mandate)
16
13
  */
17
- export declare const PHASE_1_THINK_ANALYSIS: string;
14
+ export declare const PHASE_1_THINK_ANALYSIS = "### 1.1 ANALYZE & SCOPE\n- **Define FULL scope** based on user request and discovered context.\n- **Hierarchical Breakdown**: Milestones -> Tasks -> Sub-tasks.\n\n### 1.2 STRATEGIC DECOMPOSITION\n- **Independent Items**: Identify what can run in parallel.\n- **Dependency Map**: Clearly define `depends:` links.\n\n### 1.3 DELEGATION\n- **Parallel Workers**: Assign workers for independent branches.\n- **Granular Review**: Assign reviewers for verification.";
18
15
  /**
19
16
  * Phase 5: MSVP (Multi-Stage Verification Pipeline)
20
- *
21
- * NOTE: Commander spawns both Workers AND Reviewers.
22
- * Workers are terminal nodes and do not spawn Reviewers themselves.
23
17
  */
24
18
  export declare const PHASE_5_MSVP: string;
25
19
  /**
26
20
  * HPFA (Hyper-Parallel Fractal Architecture) Rules
27
- *
28
- * All spawning happens at Commander level only.
29
- * Workers and Reviewers are terminal nodes and cannot spawn sub-agents.
30
21
  */
31
- export declare const HPFA_RULES = "1. **Commander Parallel Workers**: Commander spawns multiple Workers in parallel for independent modules.\n2. **Commander Parallel Reviewers**: As Workers complete, Commander spawns Unit Reviewers for each.\n3. **Speculative Racing**: Launch multiple strategies in parallel (mode: race) for uncertainty.\n4. **Asynchronous Batching**: Group non-dependent tool calls to trigger host-side parallelism.\n5. **Barrier-Sync Pipeline**: Commander waits at sync barrier before launching Master Reviewer.\n6. **Terminal Nodes**: Workers and Reviewers are TERMINAL - they cannot spawn any sub-agents.";
22
+ export declare const HPFA_RULES = "1. **Commander-Only Spawning**: All agents are spawned by the Commander.\n2. **Parallel Branches**: Execute non-dependent milestones/tasks simultaneously.\n3. **Recursive Breakdown**: Continue subdividing until tasks are atomic.\n4. **Autonomous Termination**: You only finish when the verification checklist and TODOs are 100% complete.";
23
+ /**
24
+ * Autonomous Completion Mandate
25
+ */
26
+ export declare const AUTONOMOUS_MANDATE = "\n## AUTONOMOUS COMPLETION MANDATE (MANDATORY)\n1. **ZERO TOLERANCE**: Finishing with incomplete `[ ]` items is a FAILURE.\n2. **FORCED CONTINUATION**: If you stop prematurely, the system will inject a \"CONTINUE\" prompt and iteration count.\n3. **HIERARCHICAL PROOF**: You must provide evidence (tool output) for every `[x]` mark.\n4. **NO PERMISSION**: Do not ask \"Should I continue?\". The answer is always YES until `.opencode/todo.md` is 100% checked.\n";
@@ -32,7 +32,7 @@ export declare const WORK_STATUS: {
32
32
  readonly IMPLEMENTATION: "IMPLEMENTATION";
33
33
  readonly E2E: "E2E";
34
34
  readonly FIXING: "FIXING";
35
- readonly SEALING: "SEALING";
35
+ readonly VERIFYING: "VERIFYING";
36
36
  };
37
37
  readonly SEVERITY: {
38
38
  readonly HIGH: "HIGH";
@@ -37,9 +37,9 @@ export declare const PROMPT_TAGS: {
37
37
  readonly open: "<todo_rules>";
38
38
  readonly close: "</todo_rules>";
39
39
  };
40
- readonly MISSION_SEAL: {
41
- readonly open: "<mission_seal>";
42
- readonly close: "</mission_seal>";
40
+ readonly COMPLETE_SIGNAL: {
41
+ readonly open: "<complete_signal>";
42
+ readonly close: "</complete_signal>";
43
43
  };
44
44
  readonly SHARED_WORKSPACE: {
45
45
  readonly open: "<shared_workspace>";
@@ -49,6 +49,54 @@ export declare const PROMPT_TAGS: {
49
49
  readonly open: "<core_philosophy>";
50
50
  readonly close: "</core_philosophy>";
51
51
  };
52
+ readonly SYSTEM: {
53
+ readonly open: "<system>";
54
+ readonly close: "</system>";
55
+ };
56
+ readonly TASK: {
57
+ readonly open: "<task>";
58
+ readonly close: "</task>";
59
+ };
60
+ readonly CONTEXT: {
61
+ readonly open: "<context>";
62
+ readonly close: "</context>";
63
+ };
64
+ readonly EXECUTION: {
65
+ readonly open: "<execution>";
66
+ readonly close: "</execution>";
67
+ };
68
+ readonly MODE: {
69
+ readonly open: "<mode>";
70
+ readonly close: "</mode>";
71
+ };
72
+ readonly RESUME: {
73
+ readonly open: "<resume>";
74
+ readonly close: "</resume>";
75
+ };
76
+ readonly SAFETY: {
77
+ readonly open: "<safety>";
78
+ readonly close: "</safety>";
79
+ };
80
+ readonly AST_TOOLS: {
81
+ readonly open: "<ast_tools>";
82
+ readonly close: "</ast_tools>";
83
+ };
84
+ readonly LSP_TOOLS: {
85
+ readonly open: "<lsp_tools>";
86
+ readonly close: "</lsp_tools>";
87
+ };
88
+ readonly SKILLS_CAPABILITIES: {
89
+ readonly open: "<skills_capabilities>";
90
+ readonly close: "</skills_capabilities>";
91
+ };
92
+ readonly DECOMPOSITION_RULES: {
93
+ readonly open: "<decomposition_rules>";
94
+ readonly close: "</decomposition_rules>";
95
+ };
96
+ readonly EXECUTION_ASSURANCE: {
97
+ readonly open: "<execution_assurance>";
98
+ readonly close: "</execution_assurance>";
99
+ };
52
100
  readonly TOOLS: {
53
101
  readonly open: "<tools>";
54
102
  readonly close: "</tools>";
@@ -57,6 +105,10 @@ export declare const PROMPT_TAGS: {
57
105
  readonly open: "<agents>";
58
106
  readonly close: "</agents>";
59
107
  };
108
+ readonly EXECUTION_RULES: {
109
+ readonly open: "<execution_rules>";
110
+ readonly close: "</execution_rules>";
111
+ };
60
112
  readonly EXECUTION_STRATEGY: {
61
113
  readonly open: "<execution_strategy>";
62
114
  readonly close: "</execution_strategy>";
@@ -141,30 +193,14 @@ export declare const PROMPT_TAGS: {
141
193
  readonly open: "<output_format>";
142
194
  readonly close: "</output_format>";
143
195
  };
144
- readonly SEAL_AUTHORITY: {
145
- readonly open: "<seal_authority>";
146
- readonly close: "</seal_authority>";
147
- };
148
- readonly FORBIDDEN: {
149
- readonly open: "<forbidden>";
150
- readonly close: "</forbidden>";
151
- };
152
- readonly CAPABILITIES: {
153
- readonly open: "<capabilities>";
154
- readonly close: "</capabilities>";
155
- };
156
- readonly VERIFICATION_COMPLETE: {
157
- readonly open: "<verification_complete>";
158
- readonly close: "</verification_complete>";
159
- };
160
- readonly VERIFICATION_FAILED: {
161
- readonly open: "<verification_failed>";
162
- readonly close: "</verification_failed>";
163
- };
164
196
  readonly MISSION_LOOP: {
165
197
  readonly open: "<mission_loop>";
166
198
  readonly close: "</mission_loop>";
167
199
  };
200
+ readonly TODO_CONTINUATION: {
201
+ readonly open: "<todo_continuation>";
202
+ readonly close: "</todo_continuation>";
203
+ };
168
204
  readonly AUTONOMOUS_MODE: {
169
205
  readonly open: "<autonomous_mode>";
170
206
  readonly close: "</autonomous_mode>";
@@ -4,4 +4,5 @@
4
4
  export { PARALLEL_TASK } from "./parallel-task.js";
5
5
  export { BACKGROUND_TASK } from "./background-task.js";
6
6
  export { BACKGROUND_STATUS } from "./background-status.js";
7
+ export { TASK_METADATA } from "./metadata-keys.js";
7
8
  export type { BackgroundStatus } from "./background-status.js";
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Task Metadata Keys
3
+ */
4
+ export declare const TASK_METADATA: {
5
+ readonly PARALLEL: "parallel";
6
+ readonly PARALLEL_GROUP: "parallel_group";
7
+ readonly DEPENDS: "depends";
8
+ readonly AGENT: "agent";
9
+ readonly SIZE: "size";
10
+ };
@@ -18,7 +18,7 @@ export declare const PARALLEL_TASK: {
18
18
  * - Depth 2: Worker/Reviewer (TERMINAL - cannot spawn sub-agents)
19
19
  * - Depth 3: BLOCKED
20
20
  *
21
- * This prevents infinite recursion and ensures Master Reviewer
21
+ * This prevents infinite recursion and ensures the Reviewer
22
22
  * doesn't wait indefinitely for deeply nested sub-tasks.
23
23
  */
24
24
  readonly MAX_DEPTH: 3;
@@ -2,3 +2,4 @@
2
2
  * Parallel Tool Constants
3
3
  */
4
4
  export * from "./logging.js";
5
+ export * from "./parameters.js";
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Parallel Tool Parameter Names
3
+ */
4
+ export declare const PARALLEL_PARAMS: {
5
+ readonly AGENT: "agent";
6
+ readonly TASK: "task";
7
+ readonly PROMPT: "prompt";
8
+ readonly CONTEXT: "context";
9
+ readonly BACKGROUND: "background";
10
+ readonly PARALLEL_GROUP: "parallel_group";
11
+ readonly RETRY: "retry";
12
+ readonly TIMEOUT: "timeout";
13
+ readonly DESCRIPTION: "description";
14
+ readonly RESUME: "resume";
15
+ readonly MODE: "mode";
16
+ readonly GROUP_ID: "groupID";
17
+ readonly TASK_ID: "taskId";
18
+ readonly STATUS: "status";
19
+ };
@@ -6,6 +6,9 @@ export declare const TOOL_NAMES: {
6
6
  readonly GET_TASK_RESULT: "get_task_result";
7
7
  readonly LIST_TASKS: "list_tasks";
8
8
  readonly CANCEL_TASK: "cancel_task";
9
+ readonly LIST_AGENTS: "list_agents";
10
+ readonly SHOW_METRICS: "show_metrics";
11
+ readonly UPDATE_TODO: "update_todo";
9
12
  readonly RUN_BACKGROUND: "run_background";
10
13
  readonly CHECK_BACKGROUND: "check_background";
11
14
  readonly LIST_BACKGROUND: "list_background";
@@ -4,3 +4,4 @@
4
4
  export { CHECKLIST } from "./checklist.js";
5
5
  export { CHECKLIST_PATTERNS } from "./patterns.js";
6
6
  export { CHECKLIST_CATEGORIES } from "./categories.js";
7
+ export { VERIFICATION_SIGNALS } from "./signals.js";
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Verification Signaling Constants
3
+ *
4
+ * Centralized strings used to trigger specific verification behaviors
5
+ * between the Commander and Reviewer agents.
6
+ */
7
+ export declare const VERIFICATION_SIGNALS: {
8
+ /** Trigger for all-encompassing system check at the end of a mission */
9
+ readonly FINAL_PASS: "Full System Verification";
10
+ };
@@ -5,13 +5,12 @@ export declare const callAgentTool: {
5
5
  Planner: "Planner";
6
6
  Worker: "Worker";
7
7
  Reviewer: "Reviewer";
8
- MasterReviewer: "MasterReviewer";
9
8
  }>;
10
9
  task: import("zod").ZodString;
11
10
  context: import("zod").ZodOptional<import("zod").ZodString>;
12
11
  };
13
12
  execute(args: {
14
- agent: "Planner" | "Worker" | "Reviewer" | "MasterReviewer";
13
+ agent: "Planner" | "Worker" | "Reviewer";
15
14
  task: string;
16
15
  context?: string | undefined;
17
16
  }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
@@ -0,0 +1,14 @@
1
+ export interface CachedDiagnostics {
2
+ diagnostics: any;
3
+ timestamp: number;
4
+ filesMtime: number;
5
+ }
6
+ export declare class DiagnosticsCache {
7
+ private cache;
8
+ private defaultTTL;
9
+ get(directory: string, file?: string): Promise<any | null>;
10
+ set(directory: string, file: string | undefined, diagnostics: any): Promise<void>;
11
+ private getCacheKey;
12
+ private getFilesMtime;
13
+ }
14
+ export declare const diagnosticsCache: DiagnosticsCache;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * list_agents Tool
3
+ *
4
+ * Lists all available agents, including built-in and custom templates.
5
+ */
6
+ export declare const createListAgentsTool: () => {
7
+ description: string;
8
+ args: {};
9
+ execute(args: Record<string, never>, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
10
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * show_metrics Tool
3
+ *
4
+ * Displays a performance dashboard for the current mission.
5
+ */
6
+ export declare const createShowMetricsTool: () => {
7
+ description: string;
8
+ args: {};
9
+ execute(args: Record<string, never>, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
10
+ };
@@ -0,0 +1,28 @@
1
+ /**
2
+ * update_todo Tool
3
+ *
4
+ * Performs incremental updates to .opencode/todo.md
5
+ */
6
+ export declare const createUpdateTodoTool: () => {
7
+ description: string;
8
+ args: {
9
+ action: import("zod").ZodEnum<{
10
+ update: "update";
11
+ add: "add";
12
+ }>;
13
+ task: import("zod").ZodString;
14
+ status: import("zod").ZodOptional<import("zod").ZodEnum<{
15
+ pending: "pending";
16
+ completed: "completed";
17
+ failed: "failed";
18
+ progress: "progress";
19
+ }>>;
20
+ subtask: import("zod").ZodOptional<import("zod").ZodString>;
21
+ };
22
+ execute(args: {
23
+ action: "update" | "add";
24
+ task: string;
25
+ status?: "pending" | "completed" | "failed" | "progress" | undefined;
26
+ subtask?: string | undefined;
27
+ }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
28
+ };
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.0.61",
5
+ "version": "1.0.71",
6
6
  "author": "agnusdei1207",
7
7
  "license": "MIT",
8
8
  "repository": {
@@ -71,7 +71,8 @@
71
71
  },
72
72
  "dependencies": {
73
73
  "@opencode-ai/plugin": "^1.1.1",
74
- "@opencode-ai/sdk": "^1.1.14"
74
+ "@opencode-ai/sdk": "^1.1.14",
75
+ "zod": "4.1.8"
75
76
  },
76
77
  "devDependencies": {
77
78
  "@types/node": "^22.0.0",
@@ -1 +0,0 @@
1
- export declare const SEAL_CONDITIONS: string;
@@ -1,7 +0,0 @@
1
- /**
2
- * Master Reviewer Capabilities
3
- *
4
- * What the Master Reviewer IS ALLOWED to do.
5
- * Environment-agnostic, flexible for any project type.
6
- */
7
- export declare const MASTER_REVIEWER_CAPABILITIES: string;
@@ -1,7 +0,0 @@
1
- /**
2
- * Master Reviewer Forbidden Actions
3
- *
4
- * Actions that the Master Reviewer must NEVER do.
5
- * For allowed actions, see capabilities.ts
6
- */
7
- export declare const MASTER_REVIEWER_FORBIDDEN: string;
@@ -1,7 +0,0 @@
1
- /**
2
- * Master Reviewer Role Identity
3
- *
4
- * The Master Reviewer is the FINAL GATE before mission completion.
5
- * Only the Master Reviewer can authorize SEAL.
6
- */
7
- export declare const MASTER_REVIEWER_ROLE: string;
@@ -1,8 +0,0 @@
1
- /**
2
- * Master Reviewer Prompts Index
3
- */
4
- export { MASTER_REVIEWER_ROLE } from "./identity.js";
5
- export { MASTER_REVIEWER_VERIFICATION_PROCESS } from "./verification-process.js";
6
- export { MASTER_REVIEWER_SEAL_AUTHORITY } from "./seal-authority.js";
7
- export { MASTER_REVIEWER_FORBIDDEN } from "./forbidden.js";
8
- export { MASTER_REVIEWER_CAPABILITIES } from "./capabilities.js";
@@ -1,7 +0,0 @@
1
- /**
2
- * Master Reviewer Seal Authority
3
- *
4
- * The decision protocol for when to SEAL or return failure.
5
- * Emphasizes the infinite loop until all problems are resolved.
6
- */
7
- export declare const MASTER_REVIEWER_SEAL_AUTHORITY: string;
@@ -1,8 +0,0 @@
1
- /**
2
- * Master Reviewer Verification Process
3
- *
4
- * Environment-agnostic comprehensive verification workflow.
5
- * Works for ANY project type: Node, Rust, Java, Python, C/C++, Go,
6
- * containers, kernel development, AI/ML, embedded systems, etc.
7
- */
8
- export declare const MASTER_REVIEWER_VERIFICATION_PROCESS: string;