opencode-orchestrator 0.9.10 → 0.9.11

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/dist/index.js CHANGED
@@ -328,6 +328,15 @@ var PROMPTS = {
328
328
  CONTINUE_DEFAULT: "continue from where we left off"
329
329
  };
330
330
 
331
+ // src/shared/message/constants/slash-commands.ts
332
+ var COMMAND_NAMES = {
333
+ TASK: "task",
334
+ PLAN: "plan",
335
+ STATUS: "status",
336
+ STOP: "stop",
337
+ CANCEL: "cancel"
338
+ };
339
+
331
340
  // src/shared/message/constants/message-roles.ts
332
341
  var MESSAGE_ROLES = {
333
342
  /** AI assistant message */
@@ -18112,7 +18121,7 @@ function cleanupSession(sessionID) {
18112
18121
  }
18113
18122
 
18114
18123
  // src/core/loop/mission-seal.ts
18115
- import { existsSync as existsSync4, readFileSync, writeFileSync, unlinkSync } from "node:fs";
18124
+ import { existsSync as existsSync4, readFileSync, writeFileSync, unlinkSync, mkdirSync } from "node:fs";
18116
18125
  import { join as join5 } from "node:path";
18117
18126
  var MISSION_SEAL_TAG = MISSION_SEAL.TAG;
18118
18127
  var SEAL_CONFIRMATION = MISSION_SEAL.CONFIRMATION;
@@ -18142,7 +18151,11 @@ function readLoopState(directory) {
18142
18151
  }
18143
18152
  function writeLoopState(directory, state2) {
18144
18153
  const filePath = getStateFilePath(directory);
18154
+ const dirPath = join5(directory, PATHS.OPENCODE);
18145
18155
  try {
18156
+ if (!existsSync4(dirPath)) {
18157
+ mkdirSync(dirPath, { recursive: true });
18158
+ }
18146
18159
  writeFileSync(filePath, JSON.stringify(state2, null, 2), "utf-8");
18147
18160
  return true;
18148
18161
  } catch (error45) {
@@ -18691,8 +18704,8 @@ function createChatMessageHandler(ctx) {
18691
18704
  startSession(sessionID);
18692
18705
  presets.taskStarted(sessionID, AGENT_NAMES.COMMANDER);
18693
18706
  }
18694
- if (!parsed || parsed.command !== "task") {
18695
- const taskTemplate = COMMANDS["task"].template;
18707
+ if (!parsed || parsed.command !== COMMAND_NAMES.TASK) {
18708
+ const taskTemplate = COMMANDS[COMMAND_NAMES.TASK].template;
18696
18709
  const userMessage = parsed?.args || originalText;
18697
18710
  parts[textPartIndex].text = taskTemplate.replace(
18698
18711
  /\$ARGUMENTS/g,
@@ -18710,7 +18723,7 @@ function createChatMessageHandler(ctx) {
18710
18723
  parsed.args || PROMPTS.CONTINUE
18711
18724
  );
18712
18725
  }
18713
- if (command && parsed.command === "task") {
18726
+ if (command && parsed.command === COMMAND_NAMES.TASK) {
18714
18727
  if (!sessions.has(sessionID)) {
18715
18728
  const now = Date.now();
18716
18729
  sessions.set(sessionID, {
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export { PART_TYPES } from "./part-types.js";
5
5
  export { PROMPTS } from "./prompts.js";
6
- export { SLASH_COMMANDS } from "./slash-commands.js";
6
+ export { SLASH_COMMANDS, COMMAND_NAMES, type CommandName } from "./slash-commands.js";
7
7
  export { PLUGIN_HOOKS, type PluginHookName } from "./plugin-hooks.js";
8
8
  export { MESSAGE_ROLES, SESSION_STATUS, type MessageRole, type SessionStatus } from "./message-roles.js";
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Slash Commands
2
+ * Slash Commands (with slash prefix)
3
3
  */
4
4
  export declare const SLASH_COMMANDS: {
5
5
  readonly TASK: "/task";
@@ -8,3 +8,14 @@ export declare const SLASH_COMMANDS: {
8
8
  readonly STOP: "/stop";
9
9
  readonly CANCEL: "/cancel";
10
10
  };
11
+ /**
12
+ * Command Names (without slash prefix, for comparison after parsing)
13
+ */
14
+ export declare const COMMAND_NAMES: {
15
+ readonly TASK: "task";
16
+ readonly PLAN: "plan";
17
+ readonly STATUS: "status";
18
+ readonly STOP: "stop";
19
+ readonly CANCEL: "cancel";
20
+ };
21
+ export type CommandName = typeof COMMAND_NAMES[keyof typeof COMMAND_NAMES];
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": "0.9.10",
5
+ "version": "0.9.11",
6
6
  "author": "agnusdei1207",
7
7
  "license": "MIT",
8
8
  "repository": {