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

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 = {
@@ -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.3",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "repository": {