opencode-orchestrator 1.2.36 → 1.2.37

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.
@@ -3,6 +3,6 @@
3
3
  *
4
4
  * @deprecated Use CACHE from shared/constants instead
5
5
  */
6
- export declare const CACHE_DIR: ".opencode/cache/docs";
7
- export declare const METADATA_FILE: ".opencode/cache/docs/_metadata.json";
6
+ export declare const CACHE_DIR: ".opencode/docs";
7
+ export declare const METADATA_FILE: ".opencode/docs/_metadata.json";
8
8
  export declare const DEFAULT_TTL_MS: number;
@@ -3,12 +3,12 @@
3
3
  *
4
4
  * Provides a structured checklist system for mission completion verification.
5
5
  *
6
- * The LLM creates and checks items in .opencode/mission/verification-checklist.md
6
+ * The LLM creates and checks items in .opencode/verification-checklist.md
7
7
  * The hook system verifies all items are checked before allowing CONCLUDE.
8
8
  */
9
9
  import { type ChecklistCategory, type ChecklistItem, type ChecklistVerificationResult, type VerificationResult } from "../../shared/index.js";
10
10
  export type { ChecklistItem, ChecklistCategory, ChecklistVerificationResult, VerificationResult };
11
- export declare const CHECKLIST_FILE: ".opencode/mission/verification-checklist.md";
11
+ export declare const CHECKLIST_FILE: ".opencode/verification-checklist.md";
12
12
  export declare function parseChecklist(content: string): ChecklistItem[];
13
13
  export declare function readChecklist(directory: string): ChecklistItem[];
14
14
  export declare function verifyChecklist(directory: string): ChecklistVerificationResult;
@@ -1,7 +1,15 @@
1
1
  /**
2
2
  * TodoManager - MVCC-based Optimistic Locking with Mutex for TODO Synchronization
3
3
  */
4
- import { type TodoData } from "../../shared/index.js";
4
+ export interface TodoVersion {
5
+ version: number;
6
+ timestamp: number;
7
+ author: string;
8
+ }
9
+ export interface TodoData {
10
+ content: string;
11
+ version: TodoVersion;
12
+ }
5
13
  export declare class TodoManager {
6
14
  private static _instance;
7
15
  private directory;
package/dist/index.js CHANGED
@@ -129,29 +129,22 @@ var init_paths = __esm({
129
129
  "use strict";
130
130
  PATHS = {
131
131
  OPENCODE: ".opencode",
132
- // Mission State (Ephemeral)
133
- MISSION_ROOT: ".opencode/mission",
134
- TODO: ".opencode/mission/todo.md",
135
- CONTEXT: ".opencode/mission/context.md",
136
- SUMMARY: ".opencode/mission/summary.md",
137
- WORK_LOG: ".opencode/mission/work-log.md",
138
- STATUS: ".opencode/mission/status.md",
139
- SYNC_ISSUES: ".opencode/mission/sync-issues.md",
140
- INTEGRATION_STATUS: ".opencode/mission/integration-status.md",
141
- UNIT_TESTS: ".opencode/mission/unit-tests",
142
- TODO_VERSION: ".opencode/mission/todo.version.json",
143
- VERIFICATION_CHECKLIST: ".opencode/mission/verification-checklist.md",
144
- ACTIVE_TASKS_LOG: ".opencode/mission/active_tasks.jsonl",
145
- // Cache & Resources
146
- CACHE_ROOT: ".opencode/cache",
147
- DOCS: ".opencode/cache/docs",
148
- DOC_METADATA: ".opencode/cache/docs/_metadata.json",
149
- // Archive
132
+ DOCS: ".opencode/docs",
150
133
  ARCHIVE: ".opencode/archive",
151
134
  TASK_ARCHIVE: ".opencode/archive/tasks",
152
135
  DOC_ARCHIVE: ".opencode/archive/docs",
153
- TODO_HISTORY: ".opencode/archive/todo_history.jsonl",
154
- // Configuration (Static)
136
+ TODO: ".opencode/todo.md",
137
+ CONTEXT: ".opencode/context.md",
138
+ SUMMARY: ".opencode/summary.md",
139
+ DOC_METADATA: ".opencode/docs/_metadata.json",
140
+ // TDD & Parallel Work State
141
+ WORK_LOG: ".opencode/work-log.md",
142
+ UNIT_TESTS: ".opencode/unit-tests",
143
+ SYNC_ISSUES: ".opencode/sync-issues.md",
144
+ INTEGRATION_STATUS: ".opencode/integration-status.md",
145
+ // Progress tracking
146
+ STATUS: ".opencode/status.md",
147
+ // Configuration
155
148
  AGENTS_CONFIG: ".opencode/agents.json",
156
149
  PLUGINS: ".opencode/plugins"
157
150
  };
@@ -1829,7 +1822,7 @@ var init_checklist = __esm({
1829
1822
  init_paths();
1830
1823
  CHECKLIST = {
1831
1824
  /** Path to the verification checklist file */
1832
- FILE: PATHS.VERIFICATION_CHECKLIST,
1825
+ FILE: `${PATHS.OPENCODE}/verification-checklist.md`,
1833
1826
  /** Minimum required items for valid checklist */
1834
1827
  MIN_ITEMS: 1,
1835
1828
  /** Maximum items to show in error messages */
@@ -1957,21 +1950,6 @@ var init_verification = __esm({
1957
1950
  }
1958
1951
  });
1959
1952
 
1960
- // src/shared/todo/interfaces/index.ts
1961
- var init_interfaces9 = __esm({
1962
- "src/shared/todo/interfaces/index.ts"() {
1963
- "use strict";
1964
- }
1965
- });
1966
-
1967
- // src/shared/todo/index.ts
1968
- var init_todo2 = __esm({
1969
- "src/shared/todo/index.ts"() {
1970
- "use strict";
1971
- init_interfaces9();
1972
- }
1973
- });
1974
-
1975
1953
  // src/shared/errors/constants/error-patterns.ts
1976
1954
  var ERROR_PATTERNS;
1977
1955
  var init_error_patterns = __esm({
@@ -2309,7 +2287,7 @@ var init_mandates = __esm({
2309
2287
  1. **ZERO TOLERANCE**: Finishing with incomplete \`[ ]\` items is a FAILURE.
2310
2288
  2. **FORCED CONTINUATION**: If you stop prematurely, the system will inject a "CONTINUE" prompt and iteration count.
2311
2289
  3. **HIERARCHICAL PROOF**: You must provide evidence (tool output) for every \`[x]\` mark.
2312
- 4. **NO PERMISSION**: Do not ask "Should I continue?". The answer is always YES until \`${PATHS.TODO}\` is 100% checked.
2290
+ 4. **NO PERMISSION**: Do not ask "Should I continue?". The answer is always YES until \`.opencode/todo.md\` is 100% checked.
2313
2291
  `;
2314
2292
  }
2315
2293
  });
@@ -2441,7 +2419,6 @@ var init_shared = __esm({
2441
2419
  init_message();
2442
2420
  init_os();
2443
2421
  init_verification();
2444
- init_todo2();
2445
2422
  init_errors();
2446
2423
  init_prompt();
2447
2424
  init_task_status_const();
@@ -2994,7 +2971,7 @@ var init_planning_todo_format = __esm({
2994
2971
  init_shared();
2995
2972
  COMMANDER_TODO_FORMAT = `${PROMPT_TAGS.TODO_FORMAT.open}
2996
2973
  ## Strict Hierarchical Task Decomposition
2997
- The mission MUST be broken down into a multi-layered hierarchy in \`${PATHS.TODO}\`.
2974
+ The mission MUST be broken down into a multi-layered hierarchy in \`.opencode/todo.md\`.
2998
2975
  This allows for maximum parallel execution and granular verification.
2999
2976
 
3000
2977
  ### Hierarchy Levels:
@@ -3030,7 +3007,7 @@ This allows for maximum parallel execution and granular verification.
3030
3007
  3. **RECURSIVE REFINEMENT**: If a task is still too abstract, break it down further before executing.
3031
3008
  4. **CONTINUOUS VERIFICATION**: Run tests/builds constantly. Do not wait for the end to verify.
3032
3009
 
3033
- \u26A0\uFE0F **AUTONOMOUS LOOP**: The system will automatically RESTART you if any \`[ ]\` remain in \`${PATHS.TODO}\`. Do not stop until every box is checked.
3010
+ \u26A0\uFE0F **AUTONOMOUS LOOP**: The system will automatically RESTART you if any \`[ ]\` remain in \`.opencode/todo.md\`. Do not stop until every box is checked.
3034
3011
  ${PROMPT_TAGS.TODO_FORMAT.close}`;
3035
3012
  }
3036
3013
  });
@@ -4548,7 +4525,7 @@ var init_commander_forbidden = __esm({
4548
4525
  **COMMANDER FORBIDDEN ACTIONS**
4549
4526
 
4550
4527
  ## \u26D4 Premature Conclusion
4551
- - NEVER claim "mission complete" without 100% check-off in \`${PATHS.TODO}\`.
4528
+ - NEVER claim "mission complete" without 100% check-off in \`.opencode/todo.md\`.
4552
4529
  - NEVER stop before ${AGENT_NAMES.REVIEWER} has verified the integration.
4553
4530
  - NEVER assume success based on Worker output alone.
4554
4531
 
@@ -17873,7 +17850,7 @@ $ARGUMENTS
17873
17850
  <execution_rules>
17874
17851
  1. Complete this mission without user intervention.
17875
17852
  2. Use your full capabilities: hierarchical planning, parallel execution, and strict verification.
17876
- 3. Conclude ONLY when all items in ${PATHS.TODO} are verified and marked [x].
17853
+ 3. Conclude ONLY when all items in .opencode/todo.md are verified and marked [x].
17877
17854
  </execution_rules>
17878
17855
  </mission>`;
17879
17856
  var COMMANDS = {
@@ -17887,7 +17864,7 @@ var COMMANDS = {
17887
17864
  template: `<delegate>
17888
17865
  <agent>${AGENT_NAMES.PLANNER}</agent>
17889
17866
  <objective>Create parallel task plan for: $ARGUMENTS</objective>
17890
- <success>Valid ${PATHS.TODO} with tasks, each having id, description, agent, size, dependencies</success>
17867
+ <success>Valid .opencode/todo.md with tasks, each having id, description, agent, size, dependencies</success>
17891
17868
  <must_do>
17892
17869
  - Maximize parallelism by grouping independent tasks
17893
17870
  - Assign correct agent to each task (${AGENT_NAMES.WORKER} or ${AGENT_NAMES.REVIEWER})
@@ -17900,7 +17877,7 @@ var COMMANDS = {
17900
17877
  </must_not>
17901
17878
  <context>
17902
17879
  - This is planning only, no execution
17903
- - Output to ${PATHS.TODO}
17880
+ - Output to .opencode/todo.md
17904
17881
  </context>
17905
17882
  </delegate>`,
17906
17883
  argumentHint: '"complex task to plan"'
@@ -19137,7 +19114,7 @@ var TaskWAL = class {
19137
19114
  walPath;
19138
19115
  initialized = false;
19139
19116
  constructor(customPath) {
19140
- this.walPath = customPath || path3.resolve(process.cwd(), PATHS.ACTIVE_TASKS_LOG);
19117
+ this.walPath = customPath || path3.resolve(process.cwd(), ".opencode/archive/tasks/active_tasks.jsonl");
19141
19118
  }
19142
19119
  async init() {
19143
19120
  if (this.initialized) return;
@@ -34275,12 +34252,8 @@ var TodoManager = class _TodoManager {
34275
34252
  setDirectory(dir) {
34276
34253
  this.directory = dir;
34277
34254
  this.todoPath = path5.join(this.directory, PATHS.TODO);
34278
- this.versionPath = path5.join(this.directory, PATHS.TODO_VERSION);
34279
- this.historyPath = path5.join(this.directory, PATHS.TODO_HISTORY);
34280
- const todoDir = path5.dirname(this.todoPath);
34281
- if (!fs5.existsSync(todoDir)) {
34282
- fs5.mkdirSync(todoDir, { recursive: true });
34283
- }
34255
+ this.versionPath = path5.join(this.directory, ".opencode/todo.version.json");
34256
+ this.historyPath = path5.join(this.directory, ".opencode/archive/todo_history.jsonl");
34284
34257
  const archiveDir = path5.dirname(this.historyPath);
34285
34258
  if (!fs5.existsSync(archiveDir)) {
34286
34259
  fs5.mkdirSync(archiveDir, { recursive: true });
@@ -35178,7 +35151,7 @@ var createShowMetricsTool = () => tool({
35178
35151
  // src/tools/parallel/update-todo.ts
35179
35152
  init_shared();
35180
35153
  var createUpdateTodoTool = () => tool({
35181
- description: `Update the status of a task in ${PATHS.TODO} or add a sub-task. Use this for incremental updates instead of rewriting the whole file.`,
35154
+ description: "Update the status of a task in .opencode/todo.md or add a sub-task. Use this for incremental updates instead of rewriting the whole file.",
35182
35155
  args: {
35183
35156
  action: tool.schema.enum(["update", "add"]).describe("Action to perform"),
35184
35157
  task: tool.schema.string().describe("Text content of the task to update or the parent task to add under"),
@@ -37112,10 +37085,10 @@ function buildTodoIncompletePrompt(result) {
37112
37085
 
37113
37086
  ${result.todoIncomplete} task(s) remaining. Continue working on incomplete items.
37114
37087
 
37115
- **REQUIRED**: Check ${PATHS.TODO} and complete ALL [ ] items before concluding.
37088
+ **REQUIRED**: Check .opencode/todo.md and complete ALL [ ] items before concluding.
37116
37089
 
37117
37090
  \`\`\`bash
37118
- cat ${PATHS.TODO}
37091
+ cat .opencode/todo.md
37119
37092
  \`\`\`
37120
37093
 
37121
37094
  **DO NOT** try to finish until ALL items are [x].`;
@@ -39243,7 +39216,7 @@ ACTIVE MISSION LOOP:
39243
39216
  - Started: ${loopState.startedAt}
39244
39217
  - Original Task: ${loopState.prompt.slice(0, 500)}${loopState.prompt.length > 500 ? "..." : ""}
39245
39218
 
39246
- IMPORTANT: Continue this mission after compaction. Check ${PATHS.TODO} for progress.
39219
+ IMPORTANT: Continue this mission after compaction. Check .opencode/todo.md for progress.
39247
39220
  The mission is NOT complete until all hierarchical tasks are verified [x].
39248
39221
  </mission_context>`;
39249
39222
  }
@@ -39319,8 +39292,8 @@ function buildMissionLoopSystemPrompt(iteration, maxIterations) {
39319
39292
  You are in an autonomous mission loop. Continue working until ALL tasks are verified and 100% complete.
39320
39293
 
39321
39294
  COMPLETION CRITERIA:
39322
- - All hierarchical items in ${PATHS.TODO} are marked [x]
39323
- - ${PATHS.VERIFICATION_CHECKLIST} is fully checked off [x]
39295
+ - All hierarchical items in .opencode/todo.md are marked [x]
39296
+ - .opencode/verification-checklist.md is fully checked off [x]
39324
39297
  - All tests pass and builds succeed
39325
39298
 
39326
39299
  DO NOT stop or ask for permission. Execute autonomously.
@@ -3,25 +3,19 @@
3
3
  */
4
4
  export declare const PATHS: {
5
5
  readonly OPENCODE: ".opencode";
6
- readonly MISSION_ROOT: ".opencode/mission";
7
- readonly TODO: ".opencode/mission/todo.md";
8
- readonly CONTEXT: ".opencode/mission/context.md";
9
- readonly SUMMARY: ".opencode/mission/summary.md";
10
- readonly WORK_LOG: ".opencode/mission/work-log.md";
11
- readonly STATUS: ".opencode/mission/status.md";
12
- readonly SYNC_ISSUES: ".opencode/mission/sync-issues.md";
13
- readonly INTEGRATION_STATUS: ".opencode/mission/integration-status.md";
14
- readonly UNIT_TESTS: ".opencode/mission/unit-tests";
15
- readonly TODO_VERSION: ".opencode/mission/todo.version.json";
16
- readonly VERIFICATION_CHECKLIST: ".opencode/mission/verification-checklist.md";
17
- readonly ACTIVE_TASKS_LOG: ".opencode/mission/active_tasks.jsonl";
18
- readonly CACHE_ROOT: ".opencode/cache";
19
- readonly DOCS: ".opencode/cache/docs";
20
- readonly DOC_METADATA: ".opencode/cache/docs/_metadata.json";
6
+ readonly DOCS: ".opencode/docs";
21
7
  readonly ARCHIVE: ".opencode/archive";
22
8
  readonly TASK_ARCHIVE: ".opencode/archive/tasks";
23
9
  readonly DOC_ARCHIVE: ".opencode/archive/docs";
24
- readonly TODO_HISTORY: ".opencode/archive/todo_history.jsonl";
10
+ readonly TODO: ".opencode/todo.md";
11
+ readonly CONTEXT: ".opencode/context.md";
12
+ readonly SUMMARY: ".opencode/summary.md";
13
+ readonly DOC_METADATA: ".opencode/docs/_metadata.json";
14
+ readonly WORK_LOG: ".opencode/work-log.md";
15
+ readonly UNIT_TESTS: ".opencode/unit-tests";
16
+ readonly SYNC_ISSUES: ".opencode/sync-issues.md";
17
+ readonly INTEGRATION_STATUS: ".opencode/integration-status.md";
18
+ readonly STATUS: ".opencode/status.md";
25
19
  readonly AGENTS_CONFIG: ".opencode/agents.json";
26
20
  readonly PLUGINS: ".opencode/plugins";
27
21
  };
@@ -14,7 +14,6 @@ export * from "./tool/index.js";
14
14
  export * from "./message/index.js";
15
15
  export * from "./os/index.js";
16
16
  export * from "./verification/index.js";
17
- export * from "./todo/index.js";
18
17
  export * from "./errors/index.js";
19
18
  export * from "./prompt/index.js";
20
19
  export { TASK_STATUS, TODO_STATUS } from "../core/agents/consts/task-status.const.js";
@@ -23,4 +23,4 @@ export declare const HPFA_RULES = "1. **Commander-Only Spawning**: All agents ar
23
23
  /**
24
24
  * Autonomous Completion Mandate
25
25
  */
26
- export declare const AUTONOMOUS_MANDATE: string;
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";
@@ -8,7 +8,7 @@
8
8
  */
9
9
  export declare const CHECKLIST: {
10
10
  /** Path to the verification checklist file */
11
- readonly FILE: ".opencode/mission/verification-checklist.md";
11
+ readonly FILE: ".opencode/verification-checklist.md";
12
12
  /** Minimum required items for valid checklist */
13
13
  readonly MIN_ITEMS: 1;
14
14
  /** Maximum items to show in error messages */
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * update_todo Tool
3
3
  *
4
- * Performs incremental updates to .opencode/mission/todo.md
4
+ * Performs incremental updates to .opencode/todo.md
5
5
  */
6
6
  import { type ToolDefinition } from "@opencode-ai/plugin";
7
7
  export declare const createUpdateTodoTool: () => ToolDefinition;
@@ -5,7 +5,7 @@ import { type ToolDefinition } from "@opencode-ai/plugin";
5
5
  * - /plan: Planning only
6
6
  * - /agents: Show architecture
7
7
  */
8
- export declare const MISSION_MODE_TEMPLATE: string;
8
+ export declare const MISSION_MODE_TEMPLATE = "<mission>\n<task>\n$ARGUMENTS\n</task>\n\n<execution_rules>\n1. Complete this mission without user intervention.\n2. Use your full capabilities: hierarchical planning, parallel execution, and strict verification.\n3. Conclude ONLY when all items in .opencode/todo.md are verified and marked [x].\n</execution_rules>\n</mission>";
9
9
  export declare const COMMANDS: Record<string, {
10
10
  description: string;
11
11
  template: string;
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.36",
5
+ "version": "1.2.37",
6
6
  "author": "agnusdei1207",
7
7
  "license": "MIT",
8
8
  "repository": {
@@ -1,4 +0,0 @@
1
- /**
2
- * Shared Todo Module
3
- */
4
- export * from "./interfaces/index.js";
@@ -1,12 +0,0 @@
1
- /**
2
- * Todo Interfaces
3
- */
4
- export interface TodoVersion {
5
- version: number;
6
- timestamp: number;
7
- author: string;
8
- }
9
- export interface TodoData {
10
- content: string;
11
- version: TodoVersion;
12
- }