@nt-ai-lab/deterministic-agent-workflow-opencode 0.3.6 → 0.4.0

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.
@@ -8,10 +8,12 @@ import { createStore } from '@nt-ai-lab/deterministic-agent-workflow-event-store
8
8
  import { OpenCodeTranscriptReader } from '../../../platform/infra/external-clients/opencode/opencode-transcript-reader.js';
9
9
  export const IDLE_RECOVERY_MESSAGE = 'You have stopped. You should never stop until the workflow is complete unless your current state permits stopping.';
10
10
  const TRANSLATION_NOTE = [
11
- '> **OpenCode**: When instructions say `/dev-workflow-v2:workflow <op> [args]`, call',
11
+ '> **OpenCode**: When instructions say to run a workflow command, call',
12
12
  '> the `workflow` tool instead: `operation: "<op>"`, `args: ["<arg>", ...]`.',
13
- '> Example: `/dev-workflow-v2:workflow transition REVIEWING`',
13
+ '> Example: `<workflow-command> transition REVIEWING`',
14
14
  '> → `workflow({ operation: "transition", args: ["REVIEWING"] })`',
15
+ '> Example: `<workflow-command> record-review platform-review {...}`',
16
+ '> → `workflow({ operation: "record-review", args: ["platform-review", "{...}"] })`',
15
17
  '',
16
18
  '---',
17
19
  '',
@@ -166,13 +168,17 @@ export function createOpenCodeWorkflowPlugin(config) {
166
168
  isWriteAllowed: config.isWriteAllowed,
167
169
  customGates: config.customGates,
168
170
  });
169
- return runner([operation, ...argList], engineDeps, workflowDeps, {
171
+ const result = runner([operation, ...argList], engineDeps, workflowDeps, {
170
172
  getSessionId: () => ctx.sessionID,
171
173
  getSessionTranscriptPath: () => dbPath,
172
174
  getSessionRepository: () => getRepositoryName(ctx.worktree),
173
175
  getRepositoryRoot: () => ctx.worktree,
174
176
  getWorkflowEventsDbPath: () => resolveWorkflowEventsDatabasePath(),
175
- }).output;
177
+ });
178
+ if (result.exitCode !== 0) {
179
+ throw new TypeError(result.output);
180
+ }
181
+ return result.output;
176
182
  },
177
183
  });
178
184
  const commands = loadCommands(resolveCommandDirectories(config.commandDirectories), resolveCommandPrefix(config.commandPrefix));
package/package.json CHANGED
@@ -1,8 +1,13 @@
1
1
  {
2
2
  "name": "@nt-ai-lab/deterministic-agent-workflow-opencode",
3
- "version": "0.3.6",
3
+ "version": "0.4.0",
4
4
  "private": false,
5
5
  "type": "module",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/NTCoding/deterministic-agent-workflows.git",
9
+ "directory": "packages/deterministic-agent-workflows-opencode"
10
+ },
6
11
  "exports": {
7
12
  ".": "./dist/index.js"
8
13
  },
@@ -13,9 +18,9 @@
13
18
  "dependencies": {
14
19
  "@opencode-ai/plugin": "^1.4.3",
15
20
  "zod": "^3.25.76",
16
- "@nt-ai-lab/deterministic-agent-workflow-engine": "0.3.6",
17
- "@nt-ai-lab/deterministic-agent-workflow-event-store": "0.3.6",
18
- "@nt-ai-lab/deterministic-agent-workflow-cli": "0.3.6"
21
+ "@nt-ai-lab/deterministic-agent-workflow-cli": "0.4.0",
22
+ "@nt-ai-lab/deterministic-agent-workflow-event-store": "0.4.0",
23
+ "@nt-ai-lab/deterministic-agent-workflow-engine": "0.4.0"
19
24
  },
20
25
  "publishConfig": {
21
26
  "access": "public"