@nt-ai-lab/deterministic-agent-workflow-codex 0.4.2 → 0.4.4

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.
@@ -56,7 +56,7 @@ export function createCodexWorkflowCli(config) {
56
56
  const root = config.workflowRoot ?? resolveWorkflowRoot();
57
57
  const databasePath = resolveDatabasePath(config.processDeps);
58
58
  const store = config.processDeps.buildStore(databasePath);
59
- const now = () => new Date().toISOString();
59
+ const now = config.now ?? (() => new Date().toISOString());
60
60
  const engineDeps = {
61
61
  store,
62
62
  getPluginRoot: () => root,
@@ -84,7 +84,12 @@ function handleWorkflowCommand(config, engineDeps, root, now, args) {
84
84
  }
85
85
  const [operation, sessionId, ...operationArgs] = args;
86
86
  const workflowDeps = buildWorkflowDeps(config, engineDeps.store, root, now, sessionId);
87
- return createWorkflowRunner(config)([operation, ...operationArgs], engineDeps, workflowDeps, { getSessionId: () => sessionId, });
87
+ return createWorkflowRunner(config)([operation, ...operationArgs], engineDeps, workflowDeps, {
88
+ getSessionId: () => sessionId,
89
+ getSessionTranscriptPath: () => resolveTranscriptPath(sessionId, null, now),
90
+ getSessionRepository: () => getRepositoryName(process.cwd()),
91
+ getRepositoryRoot: () => process.cwd(),
92
+ });
88
93
  }
89
94
  function buildWorkflowDeps(config, store, root, now, sessionId) {
90
95
  const platform = {
@@ -105,7 +110,7 @@ function resolveDatabasePath(processDeps) {
105
110
  const home = processDeps.getEnv('HOME');
106
111
  if (home === undefined || home === '')
107
112
  throw new TypeError('Missing required environment variable: HOME');
108
- return join(home, '.workflow-events.db');
113
+ return join(home, 'ai-workflow-database', '.workflow-events.db');
109
114
  }
110
115
  function handleHookInvocation(config, engineDeps, root, now) {
111
116
  const raw = config.processDeps.readFile('/dev/stdin');
@@ -7,4 +7,5 @@ export type CodexWorkflowCliConfig<TWorkflow extends RehydratableWorkflow<TState
7
7
  readonly workflowCommand: string;
8
8
  readonly workflowRoot?: string;
9
9
  readonly transcriptReader?: TranscriptReader;
10
+ readonly now?: () => string;
10
11
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nt-ai-lab/deterministic-agent-workflow-codex",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "repository": {
@@ -17,9 +17,9 @@
17
17
  ],
18
18
  "dependencies": {
19
19
  "zod": "^3.25.76",
20
- "@nt-ai-lab/deterministic-agent-workflow-cli": "0.4.1",
21
- "@nt-ai-lab/deterministic-agent-workflow-engine": "0.4.1",
22
- "@nt-ai-lab/deterministic-agent-workflow-event-store": "0.4.1"
20
+ "@nt-ai-lab/deterministic-agent-workflow-cli": "0.4.2",
21
+ "@nt-ai-lab/deterministic-agent-workflow-engine": "0.4.2",
22
+ "@nt-ai-lab/deterministic-agent-workflow-event-store": "0.4.2"
23
23
  },
24
24
  "publishConfig": {
25
25
  "access": "public"