@elaraai/e3-core 0.0.2-beta.4 → 0.0.2-beta.41

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.
Files changed (208) hide show
  1. package/README.md +25 -22
  2. package/dist/src/dataflow/api-compat.d.ts +90 -0
  3. package/dist/src/dataflow/api-compat.d.ts.map +1 -0
  4. package/dist/src/dataflow/api-compat.js +139 -0
  5. package/dist/src/dataflow/api-compat.js.map +1 -0
  6. package/dist/src/dataflow/index.d.ts +18 -0
  7. package/dist/src/dataflow/index.d.ts.map +1 -0
  8. package/dist/src/dataflow/index.js +23 -0
  9. package/dist/src/dataflow/index.js.map +1 -0
  10. package/dist/src/dataflow/orchestrator/LocalOrchestrator.d.ts +76 -0
  11. package/dist/src/dataflow/orchestrator/LocalOrchestrator.d.ts.map +1 -0
  12. package/dist/src/dataflow/orchestrator/LocalOrchestrator.js +695 -0
  13. package/dist/src/dataflow/orchestrator/LocalOrchestrator.js.map +1 -0
  14. package/dist/src/dataflow/orchestrator/index.d.ts +12 -0
  15. package/dist/src/dataflow/orchestrator/index.d.ts.map +1 -0
  16. package/dist/src/dataflow/orchestrator/index.js +12 -0
  17. package/dist/src/dataflow/orchestrator/index.js.map +1 -0
  18. package/dist/src/dataflow/orchestrator/interfaces.d.ts +163 -0
  19. package/dist/src/dataflow/orchestrator/interfaces.d.ts.map +1 -0
  20. package/dist/src/dataflow/orchestrator/interfaces.js +52 -0
  21. package/dist/src/dataflow/orchestrator/interfaces.js.map +1 -0
  22. package/dist/src/dataflow/state-store/FileStateStore.d.ts +67 -0
  23. package/dist/src/dataflow/state-store/FileStateStore.d.ts.map +1 -0
  24. package/dist/src/dataflow/state-store/FileStateStore.js +300 -0
  25. package/dist/src/dataflow/state-store/FileStateStore.js.map +1 -0
  26. package/dist/src/dataflow/state-store/InMemoryStateStore.d.ts +42 -0
  27. package/dist/src/dataflow/state-store/InMemoryStateStore.d.ts.map +1 -0
  28. package/dist/src/dataflow/state-store/InMemoryStateStore.js +229 -0
  29. package/dist/src/dataflow/state-store/InMemoryStateStore.js.map +1 -0
  30. package/dist/src/dataflow/state-store/index.d.ts +13 -0
  31. package/dist/src/dataflow/state-store/index.d.ts.map +1 -0
  32. package/dist/src/dataflow/state-store/index.js +13 -0
  33. package/dist/src/dataflow/state-store/index.js.map +1 -0
  34. package/dist/src/dataflow/state-store/interfaces.d.ts +159 -0
  35. package/dist/src/dataflow/state-store/interfaces.d.ts.map +1 -0
  36. package/dist/src/dataflow/state-store/interfaces.js +6 -0
  37. package/dist/src/dataflow/state-store/interfaces.js.map +1 -0
  38. package/dist/src/dataflow/steps.d.ts +222 -0
  39. package/dist/src/dataflow/steps.d.ts.map +1 -0
  40. package/dist/src/dataflow/steps.js +707 -0
  41. package/dist/src/dataflow/steps.js.map +1 -0
  42. package/dist/src/dataflow/types.d.ts +127 -0
  43. package/dist/src/dataflow/types.d.ts.map +1 -0
  44. package/dist/src/dataflow/types.js +7 -0
  45. package/dist/src/dataflow/types.js.map +1 -0
  46. package/dist/src/dataflow.d.ts +113 -38
  47. package/dist/src/dataflow.d.ts.map +1 -1
  48. package/dist/src/dataflow.js +269 -416
  49. package/dist/src/dataflow.js.map +1 -1
  50. package/dist/src/dataset-refs.d.ts +124 -0
  51. package/dist/src/dataset-refs.d.ts.map +1 -0
  52. package/dist/src/dataset-refs.js +319 -0
  53. package/dist/src/dataset-refs.js.map +1 -0
  54. package/dist/src/errors.d.ts +39 -9
  55. package/dist/src/errors.d.ts.map +1 -1
  56. package/dist/src/errors.js +51 -8
  57. package/dist/src/errors.js.map +1 -1
  58. package/dist/src/execution/LocalTaskRunner.d.ts +73 -0
  59. package/dist/src/execution/LocalTaskRunner.d.ts.map +1 -0
  60. package/dist/src/execution/LocalTaskRunner.js +399 -0
  61. package/dist/src/execution/LocalTaskRunner.js.map +1 -0
  62. package/dist/src/execution/MockTaskRunner.d.ts +49 -0
  63. package/dist/src/execution/MockTaskRunner.d.ts.map +1 -0
  64. package/dist/src/execution/MockTaskRunner.js +54 -0
  65. package/dist/src/execution/MockTaskRunner.js.map +1 -0
  66. package/dist/src/execution/index.d.ts +16 -0
  67. package/dist/src/execution/index.d.ts.map +1 -0
  68. package/dist/src/execution/index.js +8 -0
  69. package/dist/src/execution/index.js.map +1 -0
  70. package/dist/src/execution/interfaces.d.ts +246 -0
  71. package/dist/src/execution/interfaces.d.ts.map +1 -0
  72. package/dist/src/execution/interfaces.js +6 -0
  73. package/dist/src/execution/interfaces.js.map +1 -0
  74. package/dist/src/execution/processHelpers.d.ts +20 -0
  75. package/dist/src/execution/processHelpers.d.ts.map +1 -0
  76. package/dist/src/execution/processHelpers.js +62 -0
  77. package/dist/src/execution/processHelpers.js.map +1 -0
  78. package/dist/src/executions.d.ts +71 -104
  79. package/dist/src/executions.d.ts.map +1 -1
  80. package/dist/src/executions.js +110 -476
  81. package/dist/src/executions.js.map +1 -1
  82. package/dist/src/index.d.ts +19 -9
  83. package/dist/src/index.d.ts.map +1 -1
  84. package/dist/src/index.js +48 -18
  85. package/dist/src/index.js.map +1 -1
  86. package/dist/src/objects.d.ts +8 -51
  87. package/dist/src/objects.d.ts.map +1 -1
  88. package/dist/src/objects.js +13 -230
  89. package/dist/src/objects.js.map +1 -1
  90. package/dist/src/packages.d.ts +22 -14
  91. package/dist/src/packages.d.ts.map +1 -1
  92. package/dist/src/packages.js +134 -88
  93. package/dist/src/packages.js.map +1 -1
  94. package/dist/src/storage/in-memory/InMemoryRepoStore.d.ts +35 -0
  95. package/dist/src/storage/in-memory/InMemoryRepoStore.d.ts.map +1 -0
  96. package/dist/src/storage/in-memory/InMemoryRepoStore.js +107 -0
  97. package/dist/src/storage/in-memory/InMemoryRepoStore.js.map +1 -0
  98. package/dist/src/storage/in-memory/InMemoryStorage.d.ts +139 -0
  99. package/dist/src/storage/in-memory/InMemoryStorage.d.ts.map +1 -0
  100. package/dist/src/storage/in-memory/InMemoryStorage.js +439 -0
  101. package/dist/src/storage/in-memory/InMemoryStorage.js.map +1 -0
  102. package/dist/src/storage/in-memory/index.d.ts +12 -0
  103. package/dist/src/storage/in-memory/index.d.ts.map +1 -0
  104. package/dist/src/storage/in-memory/index.js +12 -0
  105. package/dist/src/storage/in-memory/index.js.map +1 -0
  106. package/dist/src/storage/index.d.ts +18 -0
  107. package/dist/src/storage/index.d.ts.map +1 -0
  108. package/dist/src/storage/index.js +10 -0
  109. package/dist/src/storage/index.js.map +1 -0
  110. package/dist/src/storage/interfaces.d.ts +581 -0
  111. package/dist/src/storage/interfaces.d.ts.map +1 -0
  112. package/dist/src/storage/interfaces.js +6 -0
  113. package/dist/src/storage/interfaces.js.map +1 -0
  114. package/dist/src/storage/local/LocalBackend.d.ts +56 -0
  115. package/dist/src/storage/local/LocalBackend.d.ts.map +1 -0
  116. package/dist/src/storage/local/LocalBackend.js +145 -0
  117. package/dist/src/storage/local/LocalBackend.js.map +1 -0
  118. package/dist/src/storage/local/LocalDatasetRefStore.d.ts +22 -0
  119. package/dist/src/storage/local/LocalDatasetRefStore.d.ts.map +1 -0
  120. package/dist/src/storage/local/LocalDatasetRefStore.js +118 -0
  121. package/dist/src/storage/local/LocalDatasetRefStore.js.map +1 -0
  122. package/dist/src/storage/local/LocalLockService.d.ts +111 -0
  123. package/dist/src/storage/local/LocalLockService.d.ts.map +1 -0
  124. package/dist/src/storage/local/LocalLockService.js +355 -0
  125. package/dist/src/storage/local/LocalLockService.js.map +1 -0
  126. package/dist/src/storage/local/LocalLogStore.d.ts +23 -0
  127. package/dist/src/storage/local/LocalLogStore.d.ts.map +1 -0
  128. package/dist/src/storage/local/LocalLogStore.js +66 -0
  129. package/dist/src/storage/local/LocalLogStore.js.map +1 -0
  130. package/dist/src/storage/local/LocalObjectStore.d.ts +55 -0
  131. package/dist/src/storage/local/LocalObjectStore.d.ts.map +1 -0
  132. package/dist/src/storage/local/LocalObjectStore.js +300 -0
  133. package/dist/src/storage/local/LocalObjectStore.js.map +1 -0
  134. package/dist/src/storage/local/LocalRefStore.d.ts +50 -0
  135. package/dist/src/storage/local/LocalRefStore.d.ts.map +1 -0
  136. package/dist/src/storage/local/LocalRefStore.js +337 -0
  137. package/dist/src/storage/local/LocalRefStore.js.map +1 -0
  138. package/dist/src/storage/local/LocalRepoStore.d.ts +55 -0
  139. package/dist/src/storage/local/LocalRepoStore.d.ts.map +1 -0
  140. package/dist/src/storage/local/LocalRepoStore.js +365 -0
  141. package/dist/src/storage/local/LocalRepoStore.js.map +1 -0
  142. package/dist/src/storage/local/gc.d.ts +92 -0
  143. package/dist/src/storage/local/gc.d.ts.map +1 -0
  144. package/dist/src/storage/local/gc.js +377 -0
  145. package/dist/src/storage/local/gc.js.map +1 -0
  146. package/dist/src/storage/local/index.d.ts +18 -0
  147. package/dist/src/storage/local/index.d.ts.map +1 -0
  148. package/dist/src/storage/local/index.js +18 -0
  149. package/dist/src/storage/local/index.js.map +1 -0
  150. package/dist/src/storage/local/localHelpers.d.ts +25 -0
  151. package/dist/src/storage/local/localHelpers.d.ts.map +1 -0
  152. package/dist/src/storage/local/localHelpers.js +69 -0
  153. package/dist/src/storage/local/localHelpers.js.map +1 -0
  154. package/dist/src/{repository.d.ts → storage/local/repository.d.ts} +8 -4
  155. package/dist/src/storage/local/repository.d.ts.map +1 -0
  156. package/dist/src/{repository.js → storage/local/repository.js} +31 -29
  157. package/dist/src/storage/local/repository.js.map +1 -0
  158. package/dist/src/tasks.d.ts +16 -10
  159. package/dist/src/tasks.d.ts.map +1 -1
  160. package/dist/src/tasks.js +35 -41
  161. package/dist/src/tasks.js.map +1 -1
  162. package/dist/src/test-helpers.d.ts +5 -4
  163. package/dist/src/test-helpers.d.ts.map +1 -1
  164. package/dist/src/test-helpers.js +9 -21
  165. package/dist/src/test-helpers.js.map +1 -1
  166. package/dist/src/transfer/InMemoryTransferBackend.d.ts +66 -0
  167. package/dist/src/transfer/InMemoryTransferBackend.d.ts.map +1 -0
  168. package/dist/src/transfer/InMemoryTransferBackend.js +166 -0
  169. package/dist/src/transfer/InMemoryTransferBackend.js.map +1 -0
  170. package/dist/src/transfer/index.d.ts +8 -0
  171. package/dist/src/transfer/index.d.ts.map +1 -0
  172. package/dist/src/transfer/index.js +9 -0
  173. package/dist/src/transfer/index.js.map +1 -0
  174. package/dist/src/transfer/interfaces.d.ts +103 -0
  175. package/dist/src/transfer/interfaces.d.ts.map +1 -0
  176. package/dist/src/transfer/interfaces.js +6 -0
  177. package/dist/src/transfer/interfaces.js.map +1 -0
  178. package/dist/src/transfer/types.d.ts +79 -0
  179. package/dist/src/transfer/types.d.ts.map +1 -0
  180. package/dist/src/transfer/types.js +58 -0
  181. package/dist/src/transfer/types.js.map +1 -0
  182. package/dist/src/trees.d.ts +147 -59
  183. package/dist/src/trees.d.ts.map +1 -1
  184. package/dist/src/trees.js +372 -419
  185. package/dist/src/trees.js.map +1 -1
  186. package/dist/src/uuid.d.ts +26 -0
  187. package/dist/src/uuid.d.ts.map +1 -0
  188. package/dist/src/uuid.js +80 -0
  189. package/dist/src/uuid.js.map +1 -0
  190. package/dist/src/workspaceStatus.d.ts +6 -4
  191. package/dist/src/workspaceStatus.d.ts.map +1 -1
  192. package/dist/src/workspaceStatus.js +43 -49
  193. package/dist/src/workspaceStatus.js.map +1 -1
  194. package/dist/src/workspaces.d.ts +35 -47
  195. package/dist/src/workspaces.d.ts.map +1 -1
  196. package/dist/src/workspaces.js +194 -156
  197. package/dist/src/workspaces.js.map +1 -1
  198. package/package.json +4 -4
  199. package/dist/src/gc.d.ts +0 -54
  200. package/dist/src/gc.d.ts.map +0 -1
  201. package/dist/src/gc.js +0 -233
  202. package/dist/src/gc.js.map +0 -1
  203. package/dist/src/repository.d.ts.map +0 -1
  204. package/dist/src/repository.js.map +0 -1
  205. package/dist/src/workspaceLock.d.ts +0 -67
  206. package/dist/src/workspaceLock.d.ts.map +0 -1
  207. package/dist/src/workspaceLock.js +0 -217
  208. package/dist/src/workspaceLock.js.map +0 -1
@@ -2,7 +2,8 @@
2
2
  * Copyright (c) 2025 Elara AI Pty Ltd
3
3
  * Licensed under BSL 1.1. See LICENSE for details.
4
4
  */
5
- import { type ExecutionStatus } from '@elaraai/e3-types';
5
+ import type { ExecutionStatus } from '@elaraai/e3-types';
6
+ import type { StorageBackend, LogChunk } from './storage/interfaces.js';
6
7
  /**
7
8
  * Compute the combined hash of input hashes.
8
9
  *
@@ -14,51 +15,95 @@ import { type ExecutionStatus } from '@elaraai/e3-types';
14
15
  */
15
16
  export declare function inputsHash(inputHashes: string[]): string;
16
17
  /**
17
- * Get the filesystem path for an execution directory.
18
+ * Get execution status for a specific execution.
18
19
  *
19
- * @param repoPath - Path to .e3 repository
20
+ * @param storage - Storage backend
21
+ * @param repo - Repository identifier (for local storage, the path to e3 repository directory)
20
22
  * @param taskHash - Hash of the task object
21
23
  * @param inHash - Combined hash of input hashes
22
- * @returns Path to execution directory: executions/<taskHash>/<inputsHash>/
24
+ * @param executionId - Execution ID (UUIDv7)
25
+ * @returns ExecutionStatus or null if execution doesn't exist
26
+ * @throws {ExecutionCorruptError} If status file exists but cannot be decoded
23
27
  */
24
- export declare function executionPath(repoPath: string, taskHash: string, inHash: string): string;
28
+ export declare function executionGet(storage: StorageBackend, repo: string, taskHash: string, inHash: string, executionId: string): Promise<ExecutionStatus | null>;
25
29
  /**
26
- * Get execution status.
30
+ * Get the latest execution status (lexicographically greatest executionId).
27
31
  *
28
- * @param repoPath - Path to .e3 repository
32
+ * @param storage - Storage backend
33
+ * @param repo - Repository identifier (for local storage, the path to e3 repository directory)
29
34
  * @param taskHash - Hash of the task object
30
35
  * @param inHash - Combined hash of input hashes
31
- * @returns ExecutionStatus or null if execution doesn't exist
32
- * @throws {ExecutionCorruptError} If status file exists but cannot be decoded
36
+ * @returns ExecutionStatus or null if no executions exist
37
+ */
38
+ export declare function executionGetLatest(storage: StorageBackend, repo: string, taskHash: string, inHash: string): Promise<ExecutionStatus | null>;
39
+ /**
40
+ * Get the latest successful output hash for a completed execution.
41
+ * This is the primary cache lookup function.
42
+ *
43
+ * @param storage - Storage backend
44
+ * @param repo - Repository identifier (for local storage, the path to e3 repository directory)
45
+ * @param taskHash - Hash of the task object
46
+ * @param inHash - Combined hash of input hashes
47
+ * @returns Output hash or null if no successful execution exists
33
48
  */
34
- export declare function executionGet(repoPath: string, taskHash: string, inHash: string): Promise<ExecutionStatus | null>;
49
+ export declare function executionGetOutput(storage: StorageBackend, repo: string, taskHash: string, inHash: string): Promise<string | null>;
35
50
  /**
36
- * Get output hash for a completed execution.
51
+ * List all execution IDs for a (taskHash, inputsHash) pair.
37
52
  *
38
- * @param repoPath - Path to .e3 repository
53
+ * @param storage - Storage backend
54
+ * @param repo - Repository identifier (for local storage, the path to e3 repository directory)
39
55
  * @param taskHash - Hash of the task object
40
56
  * @param inHash - Combined hash of input hashes
41
- * @returns Output hash or null if not complete or failed
57
+ * @returns Array of execution IDs (sorted lexicographically ascending)
42
58
  */
43
- export declare function executionGetOutput(repoPath: string, taskHash: string, inHash: string): Promise<string | null>;
59
+ export declare function executionListIds(storage: StorageBackend, repo: string, taskHash: string, inHash: string): Promise<string[]>;
44
60
  /**
45
61
  * List all input hashes that have executions for a given task.
46
62
  *
47
- * @param repoPath - Path to .e3 repository
63
+ * @param storage - Storage backend
64
+ * @param repo - Repository identifier (for local storage, the path to e3 repository directory)
48
65
  * @param taskHash - Hash of the task object
49
66
  * @returns Array of input hashes
50
67
  */
51
- export declare function executionListForTask(repoPath: string, taskHash: string): Promise<string[]>;
68
+ export declare function executionListForTask(storage: StorageBackend, repo: string, taskHash: string): Promise<string[]>;
52
69
  /**
53
70
  * List all executions in the repository.
54
71
  *
55
- * @param repoPath - Path to .e3 repository
72
+ * @param storage - Storage backend
73
+ * @param repo - Repository identifier (for local storage, the path to e3 repository directory)
56
74
  * @returns Array of { taskHash, inputsHash } objects
57
75
  */
58
- export declare function executionList(repoPath: string): Promise<Array<{
76
+ export declare function executionList(storage: StorageBackend, repo: string): Promise<Array<{
59
77
  taskHash: string;
60
78
  inputsHash: string;
61
79
  }>>;
80
+ /**
81
+ * Result of finding the current execution for a task
82
+ */
83
+ export interface CurrentExecutionRef {
84
+ /** Hash of the task object */
85
+ taskHash: string;
86
+ /** Combined hash of input hashes */
87
+ inputsHash: string;
88
+ /** Execution ID (UUIDv7) */
89
+ executionId: string;
90
+ /** True if this matches the current workspace input state */
91
+ isCurrent: boolean;
92
+ }
93
+ /**
94
+ * Find the execution reference for a task in a workspace.
95
+ *
96
+ * This looks up the task's current input hashes from the workspace state
97
+ * and finds the matching execution. If no execution exists for the current
98
+ * inputs, falls back to the most recent execution.
99
+ *
100
+ * @param storage - Storage backend
101
+ * @param repo - Repository identifier (for local storage, the path to e3 repository directory)
102
+ * @param ws - Workspace name
103
+ * @param taskName - Task name
104
+ * @returns Execution reference or null if no executions exist
105
+ */
106
+ export declare function executionFindCurrent(storage: StorageBackend, repo: string, ws: string, taskName: string): Promise<CurrentExecutionRef | null>;
62
107
  /**
63
108
  * Options for reading execution logs
64
109
  */
@@ -68,109 +113,31 @@ export interface LogReadOptions {
68
113
  /** Maximum bytes to read (default: 64KB) */
69
114
  limit?: number;
70
115
  }
71
- /**
72
- * Result of reading a log chunk
73
- */
74
- export interface LogChunk {
75
- /** Log content (UTF-8) */
76
- data: string;
77
- /** Byte offset of this chunk */
78
- offset: number;
79
- /** Bytes in this chunk */
80
- size: number;
81
- /** Total log file size (for pagination) */
82
- totalSize: number;
83
- /** True if this is the end of the file */
84
- complete: boolean;
85
- }
116
+ export type { LogChunk };
86
117
  /**
87
118
  * Read execution logs with pagination support.
88
119
  *
89
- * @param repoPath - Path to .e3 repository
120
+ * @param storage - Storage backend
121
+ * @param repo - Repository identifier (for local storage, the path to e3 repository directory)
90
122
  * @param taskHash - Hash of the task object
91
123
  * @param inHash - Combined hash of input hashes
124
+ * @param executionId - Execution ID (UUIDv7)
92
125
  * @param stream - Which log stream to read ('stdout' or 'stderr')
93
126
  * @param options - Pagination options
94
127
  * @returns Log chunk with data and metadata
95
128
  */
96
- export declare function executionReadLog(repoPath: string, taskHash: string, inHash: string, stream: 'stdout' | 'stderr', options?: LogReadOptions): Promise<LogChunk>;
129
+ export declare function executionReadLog(storage: StorageBackend, repo: string, taskHash: string, inHash: string, executionId: string, stream: 'stdout' | 'stderr', options?: LogReadOptions): Promise<LogChunk>;
97
130
  /**
98
131
  * Evaluate command IR to get exec args.
99
132
  *
100
133
  * The IR is an East function: (inputs: Array<String>, output: String) -> Array<String>
101
134
  *
102
- * @param repoPath - Path to .e3 repository
135
+ * @param storage - Storage backend
136
+ * @param repo - Repository identifier (for local storage, the path to e3 repository directory)
103
137
  * @param commandIrHash - Hash of the IR object
104
138
  * @param inputPaths - Paths to staged input files
105
139
  * @param outputPath - Path where output should be written
106
140
  * @returns Array of strings to exec
107
141
  */
108
- export declare function evaluateCommandIr(repoPath: string, commandIrHash: string, inputPaths: string[], outputPath: string): Promise<string[]>;
109
- /**
110
- * Get the current system boot ID.
111
- * Used for detecting stale locks/processes after system reboot.
112
- */
113
- export declare function getBootId(): Promise<string>;
114
- /**
115
- * Get process start time from /proc/<pid>/stat.
116
- * Returns the starttime field (field 22) which is jiffies since boot.
117
- * Used together with boot ID to uniquely identify a process (handles PID reuse).
118
- */
119
- export declare function getPidStartTime(pid: number): Promise<number>;
120
- /**
121
- * Check if a process is still alive based on stored identification
122
- */
123
- export declare function isProcessAlive(pid: number, pidStartTime: number, bootId: string): Promise<boolean>;
124
- /**
125
- * Options for task execution
126
- */
127
- export interface ExecuteOptions {
128
- /** Re-run even if cached (default: false) */
129
- force?: boolean;
130
- /** Timeout in milliseconds (default: none) */
131
- timeout?: number;
132
- /** AbortSignal for cancellation */
133
- signal?: AbortSignal;
134
- /** Stream stdout callback */
135
- onStdout?: (data: string) => void;
136
- /** Stream stderr callback */
137
- onStderr?: (data: string) => void;
138
- }
139
- /**
140
- * Result of task execution
141
- */
142
- export interface ExecutionResult {
143
- /** Combined inputs hash (identifies this execution) */
144
- inputsHash: string;
145
- /** True if result was from cache */
146
- cached: boolean;
147
- /** Final state */
148
- state: 'success' | 'failed' | 'error';
149
- /** Output dataset hash (null on failure) */
150
- outputHash: string | null;
151
- /** Process exit code (null if not applicable) */
152
- exitCode: number | null;
153
- /** Execution time in ms (0 if cached) */
154
- duration: number;
155
- /** Error message on failure */
156
- error: string | null;
157
- }
158
- /**
159
- * Execute a single task.
160
- *
161
- * This is the core execution primitive. It:
162
- * 1. Computes the execution identity from task + inputs
163
- * 2. Checks cache (unless force=true)
164
- * 3. Marshals inputs to a scratch directory
165
- * 4. Evaluates command IR to get exec args
166
- * 5. Runs the command
167
- * 6. Stores the output and updates status
168
- *
169
- * @param repoPath - Path to .e3 repository
170
- * @param taskHash - Hash of the task object
171
- * @param inputHashes - Array of input dataset hashes
172
- * @param options - Execution options
173
- * @returns Execution result
174
- */
175
- export declare function taskExecute(repoPath: string, taskHash: string, inputHashes: string[], options?: ExecuteOptions): Promise<ExecutionResult>;
142
+ export declare function evaluateCommandIr(storage: StorageBackend, repo: string, commandIrHash: string, inputPaths: string[], outputPath: string): Promise<string[]>;
176
143
  //# sourceMappingURL=executions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"executions.d.ts","sourceRoot":"","sources":["../../src/executions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAmBH,OAAO,EAEL,KAAK,eAAe,EAGrB,MAAM,mBAAmB,CAAC;AAQ3B;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,MAAM,CAGxD;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,MAAM,CAER;AAMD;;;;;;;;GAQG;AACH,wBAAsB,YAAY,CAChC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAoBjC;AAED;;;;;;;GAOG;AACH,w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