opencode-orchestrator 1.3.5 → 1.3.6

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
@@ -6,7 +6,7 @@
6
6
  [![MIT License](https://img.shields.io/badge/license-MIT-red.svg)](LICENSE)
7
7
  [![npm](https://img.shields.io/npm/v/opencode-orchestrator.svg)](https://www.npmjs.com/package/opencode-orchestrator)
8
8
  <!-- VERSION:START -->
9
- **Version:** `1.3.5`
9
+ **Version:** `1.3.6`
10
10
  <!-- VERSION:END -->
11
11
  </div>
12
12
 
@@ -1,5 +1 @@
1
- /**
2
- * Placeholder for commander in discovery category.
3
- * Generated to match PROMPT_ARCHITECTURE_PROPOSAL.md
4
- */
5
- export declare const DISCOVERY_COMMANDER = "\n# TODO: Implement commander specific prompt\n";
1
+ export declare const DISCOVERY_COMMANDER = "\n# Discovery: Commander\n\n- Confirm repository root, active branch, package manager, and configured OpenCode runtime before delegating.\n- Identify entry points, public exports, generated artifacts, and dynamic plugin hooks that can affect the mission.\n- Turn unknowns into explicit questions or Planner tasks instead of treating assumptions as facts.\n";
@@ -1,5 +1 @@
1
- /**
2
- * Placeholder for planner in discovery category.
3
- * Generated to match PROMPT_ARCHITECTURE_PROPOSAL.md
4
- */
5
- export declare const DISCOVERY_PLANNER = "\n# TODO: Implement planner specific prompt\n";
1
+ export declare const DISCOVERY_PLANNER = "\n# Discovery: Planner\n\n- Map inputs, outputs, dependencies, and dynamic registration points for the assigned area.\n- Read the files that define the behavior before proposing a plan.\n- Report confirmed facts separately from risks, gaps, and assumptions that still need verification.\n";
@@ -1,5 +1 @@
1
- /**
2
- * Placeholder for commander in planning category.
3
- * Generated to match PROMPT_ARCHITECTURE_PROPOSAL.md
4
- */
5
- export declare const PLANNING_COMMANDER = "\n# TODO: Implement commander specific prompt\n";
1
+ export declare const PLANNING_COMMANDER = "\n# Planning: Commander\n\n- Convert the mission into ordered work with clear owners, dependencies, and verification gates.\n- Keep parallel work file-disjoint unless the dependency graph proves it is safe.\n- Prefer the smallest plan that satisfies the request and leaves documentation, tests, and release state synchronized.\n";
@@ -1,5 +1 @@
1
- /**
2
- * Placeholder for commander in execution category.
3
- * Generated to match PROMPT_ARCHITECTURE_PROPOSAL.md
4
- */
5
- export declare const EXECUTION_COMMANDER = "\n# TODO: Implement commander specific prompt\n";
1
+ export declare const EXECUTION_COMMANDER = "\n# Execution: Commander\n\n- Delegate scoped implementation tasks only after discovery and planning evidence exists.\n- Monitor each task for progress, conflicts, and missing validation instead of assuming completion.\n- Re-plan when verification exposes a real mismatch between intended and observed behavior.\n";
@@ -1,5 +1 @@
1
- /**
2
- * Placeholder for worker in execution category.
3
- * Generated to match PROMPT_ARCHITECTURE_PROPOSAL.md
4
- */
5
- export declare const EXECUTION_WORKER = "\n# TODO: Implement worker specific prompt\n";
1
+ export declare const EXECUTION_WORKER = "\n# Execution: Worker\n\n- Modify only the files assigned by Commander unless new evidence shows the scope is incomplete.\n- Keep changes focused, preserve existing behavior outside the assignment, and remove obsolete code after migration.\n- Return exact files changed, commands run, observed results, and remaining risks.\n";
@@ -1,5 +1 @@
1
- /**
2
- * Placeholder for error handling in execution category.
3
- * Generated to match PROMPT_ARCHITECTURE_PROPOSAL.md
4
- */
5
- export declare const EXECUTION_ERROR_HANDLING = "\n# TODO: Implement error handling specific prompt\n";
1
+ export declare const EXECUTION_ERROR_HANDLING = "\n# Execution Error Handling\n\n- Treat failing commands as evidence, not noise; capture the command, exit state, and relevant output.\n- Classify failures as environmental, dependency, test, type, runtime, or design before retrying.\n- Retry only transient failures with a changed condition; otherwise inspect the affected path and adapt the plan.\n";
@@ -1,5 +1 @@
1
- /**
2
- * Placeholder for commander in verification category.
3
- * Generated to match PROMPT_ARCHITECTURE_PROPOSAL.md
4
- */
5
- export declare const VERIFICATION_COMMANDER = "\n# TODO: Implement commander specific prompt\n";
1
+ export declare const VERIFICATION_COMMANDER = "\n# Verification: Commander\n\n- Require evidence for every completed task: file reads, command output, tests, or direct runtime observation.\n- Ask Reviewer for final integration verification before declaring the mission complete.\n- Keep unresolved failures visible in the mission summary with owner, cause, and next step.\n";
@@ -1,5 +1 @@
1
- /**
2
- * Placeholder for build in verification category.
3
- * Generated to match PROMPT_ARCHITECTURE_PROPOSAL.md
4
- */
5
- export declare const VERIFICATION_BUILD = "\n# TODO: Implement build specific prompt\n";
1
+ export declare const VERIFICATION_BUILD = "\n# Build Verification\n\n- Run the repository build or the narrowest build command that covers the changed surface.\n- Treat generated artifacts, package metadata, and exported types as part of the build contract.\n- If a build cannot run in the current environment, state the exact blocker and run the closest lower-level checks.\n";
@@ -1,5 +1 @@
1
- /**
2
- * Placeholder for test in verification category.
3
- * Generated to match PROMPT_ARCHITECTURE_PROPOSAL.md
4
- */
5
- export declare const VERIFICATION_TEST = "\n# TODO: Implement test specific prompt\n";
1
+ export declare const VERIFICATION_TEST = "\n# Test Verification\n\n- Run targeted tests for changed behavior before broader suites.\n- Add or update regression tests when the change fixes a bug or guards a public contract.\n- Report pass, fail, or skipped status with exact command evidence.\n";
@@ -1,5 +1 @@
1
- /**
2
- * Placeholder for commander in mission category.
3
- * Generated to match PROMPT_ARCHITECTURE_PROPOSAL.md
4
- */
5
- export declare const MISSION_COMMANDER = "\n# TODO: Implement commander specific prompt\n";
1
+ export declare const MISSION_COMMANDER = "\n# Mission: Commander\n\n- Preserve the user objective, active plan, evidence, and verification state across continuation turns.\n- Continue only while the mission is active, incomplete, and below the configured iteration ceiling.\n- Finish with a concise outcome, validation evidence, known risks, and follow-up state.\n";
@@ -1,5 +1 @@
1
- /**
2
- * Placeholder for lifecycle in mission category.
3
- * Generated to match PROMPT_ARCHITECTURE_PROPOSAL.md
4
- */
5
- export declare const MISSION_LIFECYCLE = "\n# TODO: Implement lifecycle specific prompt\n";
1
+ export declare const MISSION_LIFECYCLE = "\n# Mission Lifecycle\n\n- /task starts a persisted mission with objective, iteration budget, evidence trail, and active session state.\n- Idle continuation may proceed only after a completed assistant turn for the current user message.\n- /cancel, /stop, or an interrupt without current completion evidence deactivates continuation until a new mission starts.\n";
@@ -1,5 +1 @@
1
- /**
2
- * Placeholder for mandate in agents category.
3
- * Generated to match PROMPT_ARCHITECTURE_PROPOSAL.md
4
- */
5
- export declare const COMMANDER_MANDATE = "\n# TODO: Implement mandate specific prompt\n";
1
+ export declare const COMMANDER_MANDATE = "\n# Commander Mandate\n\n- Own mission interpretation, task decomposition, delegation, progress monitoring, and final completion.\n- Keep subagents context-isolated while preserving shared truth through the mission state and evidence trail.\n- Do not mark completion until implementation, documentation, and verification evidence all agree.\n";
@@ -1,5 +1 @@
1
- /**
2
- * Placeholder for mandate in agents category.
3
- * Generated to match PROMPT_ARCHITECTURE_PROPOSAL.md
4
- */
5
- export declare const PLANNER_MANDATE = "\n# TODO: Implement mandate specific prompt\n";
1
+ export declare const PLANNER_MANDATE = "\n# Planner Mandate\n\n- Produce evidence-backed plans with affected files, dependency order, risks, and validation commands.\n- Keep TODO state aligned with the latest verified scope.\n- Prefer incremental migration paths that avoid overlapping file ownership.\n";
@@ -1,5 +1 @@
1
- /**
2
- * Placeholder for mandate in agents category.
3
- * Generated to match PROMPT_ARCHITECTURE_PROPOSAL.md
4
- */
5
- export declare const REVIEWER_MANDATE = "\n# TODO: Implement mandate specific prompt\n";
1
+ export declare const REVIEWER_MANDATE = "\n# Reviewer Mandate\n\n- Verify claimed completion against source files, tests, build output, and integration paths.\n- Mark TODO items complete only after direct evidence confirms the requested behavior.\n- Report residual risk clearly when the environment prevents full validation.\n";
@@ -1,5 +1 @@
1
- /**
2
- * Placeholder for mandate in agents category.
3
- * Generated to match PROMPT_ARCHITECTURE_PROPOSAL.md
4
- */
5
- export declare const WORKER_MANDATE = "\n# TODO: Implement mandate specific prompt\n";
1
+ export declare const WORKER_MANDATE = "\n# Worker Mandate\n\n- Implement the assigned scope with minimal, tested edits.\n- Preserve public contracts unless Commander explicitly assigns a behavior change.\n- Return enough evidence for Reviewer to reproduce the validation path.\n";
@@ -1,5 +1 @@
1
- /**
2
- * Placeholder for code editing in tools category.
3
- * Generated to match PROMPT_ARCHITECTURE_PROPOSAL.md
4
- */
5
- export declare const TOOLS_CODE_EDITING = "\n# TODO: Implement code editing specific prompt\n";
1
+ export declare const TOOLS_CODE_EDITING = "\n# Code Editing Tools\n\n- Read the surrounding file before editing so imports, exports, formatting, and local conventions stay coherent.\n- Use structured parsers or existing helpers when they are available for the file type.\n- After editing, re-open the changed file and verify the connected import/export and configuration paths.\n";
@@ -1,5 +1 @@
1
- /**
2
- * Placeholder for testing in tools category.
3
- * Generated to match PROMPT_ARCHITECTURE_PROPOSAL.md
4
- */
5
- export declare const TOOLS_TESTING = "\n# TODO: Implement testing specific prompt\n";
1
+ export declare const TOOLS_TESTING = "\n# Testing Tools\n\n- Run the narrowest meaningful test first, then broaden when shared behavior or release artifacts are affected.\n- Prefer deterministic fixtures, isolated temporary directories, and explicit assertions over timing assumptions.\n- Record the exact command and observed result in the mission evidence.\n";
package/dist/index.js CHANGED
@@ -43081,6 +43081,20 @@ Use \`delegate_task\` with background=true for parallel work.
43081
43081
  // src/index.ts
43082
43082
  var require2 = createRequire(import.meta.url);
43083
43083
  var { version: PLUGIN_VERSION } = require2("../package.json");
43084
+ function isRecord5(value) {
43085
+ return typeof value === "object" && value !== null && !Array.isArray(value);
43086
+ }
43087
+ function readStringField(source, key) {
43088
+ const value = source[key];
43089
+ return typeof value === "string" ? value : void 0;
43090
+ }
43091
+ function readCreatedSessionID(properties) {
43092
+ if (!isRecord5(properties)) return void 0;
43093
+ const directID = readStringField(properties, "sessionID") ?? readStringField(properties, "id");
43094
+ if (directID) return directID;
43095
+ const info = properties.info;
43096
+ return isRecord5(info) ? readStringField(info, "sessionID") : void 0;
43097
+ }
43084
43098
  var OrchestratorPlugin = async (input, options) => {
43085
43099
  const { directory, client } = input;
43086
43100
  const orchestratorOptions = parseOrchestratorPluginOptions(options);
@@ -43140,8 +43154,8 @@ var OrchestratorPlugin = async (input, options) => {
43140
43154
  event: async (payload) => {
43141
43155
  const result = await createEventHandler(handlerContext)(payload);
43142
43156
  const { event } = payload;
43143
- if (event.type === SESSION_EVENTS.CREATED && event.properties) {
43144
- const sessionID = event.properties.sessionID || event.properties.id || event.properties.info?.sessionID;
43157
+ if (event.type === SESSION_EVENTS.CREATED) {
43158
+ const sessionID = readCreatedSessionID(event.properties);
43145
43159
  if (sessionID) {
43146
43160
  todoSync.registerSession(sessionID);
43147
43161
  }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "opencode-orchestrator",
3
3
  "displayName": "OpenCode Orchestrator",
4
- "description": "Distributed Cognitive Architecture for OpenCode. Turns simple prompts into specialized multi-agent workflows (Planner, Coder, Reviewer).",
5
- "version": "1.3.5",
4
+ "description": "Multi-agent mission control for OpenCode with Commander, Planner, Worker, and Reviewer workflows.",
5
+ "version": "1.3.6",
6
6
  "author": "agnusdei1207",
7
7
  "license": "MIT",
8
8
  "repository": {