@nt-ai-lab/deterministic-agent-workflow-opencode 0.3.6 → 0.3.7
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
|
|
11
|
+
'> **OpenCode**: When instructions say to run a workflow command, call',
|
|
12
12
|
'> the `workflow` tool instead: `operation: "<op>"`, `args: ["<arg>", ...]`.',
|
|
13
|
-
'> Example:
|
|
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
|
-
|
|
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
|
-
})
|
|
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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nt-ai-lab/deterministic-agent-workflow-opencode",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@opencode-ai/plugin": "^1.4.3",
|
|
15
15
|
"zod": "^3.25.76",
|
|
16
|
+
"@nt-ai-lab/deterministic-agent-workflow-cli": "0.3.7",
|
|
16
17
|
"@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"
|
|
18
|
+
"@nt-ai-lab/deterministic-agent-workflow-event-store": "0.3.6"
|
|
19
19
|
},
|
|
20
20
|
"publishConfig": {
|
|
21
21
|
"access": "public"
|