@elaraai/e3-core 0.0.2-beta.4 → 0.0.2-beta.40
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.
- package/README.md +25 -22
- package/dist/src/dataflow/api-compat.d.ts +90 -0
- package/dist/src/dataflow/api-compat.d.ts.map +1 -0
- package/dist/src/dataflow/api-compat.js +139 -0
- package/dist/src/dataflow/api-compat.js.map +1 -0
- package/dist/src/dataflow/index.d.ts +18 -0
- package/dist/src/dataflow/index.d.ts.map +1 -0
- package/dist/src/dataflow/index.js +23 -0
- package/dist/src/dataflow/index.js.map +1 -0
- package/dist/src/dataflow/orchestrator/LocalOrchestrator.d.ts +76 -0
- package/dist/src/dataflow/orchestrator/LocalOrchestrator.d.ts.map +1 -0
- package/dist/src/dataflow/orchestrator/LocalOrchestrator.js +695 -0
- package/dist/src/dataflow/orchestrator/LocalOrchestrator.js.map +1 -0
- package/dist/src/dataflow/orchestrator/index.d.ts +12 -0
- package/dist/src/dataflow/orchestrator/index.d.ts.map +1 -0
- package/dist/src/dataflow/orchestrator/index.js +12 -0
- package/dist/src/dataflow/orchestrator/index.js.map +1 -0
- package/dist/src/dataflow/orchestrator/interfaces.d.ts +163 -0
- package/dist/src/dataflow/orchestrator/interfaces.d.ts.map +1 -0
- package/dist/src/dataflow/orchestrator/interfaces.js +52 -0
- package/dist/src/dataflow/orchestrator/interfaces.js.map +1 -0
- package/dist/src/dataflow/state-store/FileStateStore.d.ts +67 -0
- package/dist/src/dataflow/state-store/FileStateStore.d.ts.map +1 -0
- package/dist/src/dataflow/state-store/FileStateStore.js +300 -0
- package/dist/src/dataflow/state-store/FileStateStore.js.map +1 -0
- package/dist/src/dataflow/state-store/InMemoryStateStore.d.ts +42 -0
- package/dist/src/dataflow/state-store/InMemoryStateStore.d.ts.map +1 -0
- package/dist/src/dataflow/state-store/InMemoryStateStore.js +229 -0
- package/dist/src/dataflow/state-store/InMemoryStateStore.js.map +1 -0
- package/dist/src/dataflow/state-store/index.d.ts +13 -0
- package/dist/src/dataflow/state-store/index.d.ts.map +1 -0
- package/dist/src/dataflow/state-store/index.js +13 -0
- package/dist/src/dataflow/state-store/index.js.map +1 -0
- package/dist/src/dataflow/state-store/interfaces.d.ts +159 -0
- package/dist/src/dataflow/state-store/interfaces.d.ts.map +1 -0
- package/dist/src/dataflow/state-store/interfaces.js +6 -0
- package/dist/src/dataflow/state-store/interfaces.js.map +1 -0
- package/dist/src/dataflow/steps.d.ts +222 -0
- package/dist/src/dataflow/steps.d.ts.map +1 -0
- package/dist/src/dataflow/steps.js +707 -0
- package/dist/src/dataflow/steps.js.map +1 -0
- package/dist/src/dataflow/types.d.ts +127 -0
- package/dist/src/dataflow/types.d.ts.map +1 -0
- package/dist/src/dataflow/types.js +7 -0
- package/dist/src/dataflow/types.js.map +1 -0
- package/dist/src/dataflow.d.ts +113 -38
- package/dist/src/dataflow.d.ts.map +1 -1
- package/dist/src/dataflow.js +269 -416
- package/dist/src/dataflow.js.map +1 -1
- package/dist/src/dataset-refs.d.ts +124 -0
- package/dist/src/dataset-refs.d.ts.map +1 -0
- package/dist/src/dataset-refs.js +319 -0
- package/dist/src/dataset-refs.js.map +1 -0
- package/dist/src/errors.d.ts +39 -9
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/errors.js +51 -8
- package/dist/src/errors.js.map +1 -1
- package/dist/src/execution/LocalTaskRunner.d.ts +73 -0
- package/dist/src/execution/LocalTaskRunner.d.ts.map +1 -0
- package/dist/src/execution/LocalTaskRunner.js +399 -0
- package/dist/src/execution/LocalTaskRunner.js.map +1 -0
- package/dist/src/execution/MockTaskRunner.d.ts +49 -0
- package/dist/src/execution/MockTaskRunner.d.ts.map +1 -0
- package/dist/src/execution/MockTaskRunner.js +54 -0
- package/dist/src/execution/MockTaskRunner.js.map +1 -0
- package/dist/src/execution/index.d.ts +16 -0
- package/dist/src/execution/index.d.ts.map +1 -0
- package/dist/src/execution/index.js +8 -0
- package/dist/src/execution/index.js.map +1 -0
- package/dist/src/execution/interfaces.d.ts +246 -0
- package/dist/src/execution/interfaces.d.ts.map +1 -0
- package/dist/src/execution/interfaces.js +6 -0
- package/dist/src/execution/interfaces.js.map +1 -0
- package/dist/src/execution/processHelpers.d.ts +20 -0
- package/dist/src/execution/processHelpers.d.ts.map +1 -0
- package/dist/src/execution/processHelpers.js +62 -0
- package/dist/src/execution/processHelpers.js.map +1 -0
- package/dist/src/executions.d.ts +71 -104
- package/dist/src/executions.d.ts.map +1 -1
- package/dist/src/executions.js +110 -476
- package/dist/src/executions.js.map +1 -1
- package/dist/src/index.d.ts +19 -9
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +48 -18
- package/dist/src/index.js.map +1 -1
- package/dist/src/objects.d.ts +8 -51
- package/dist/src/objects.d.ts.map +1 -1
- package/dist/src/objects.js +13 -230
- package/dist/src/objects.js.map +1 -1
- package/dist/src/packages.d.ts +22 -14
- package/dist/src/packages.d.ts.map +1 -1
- package/dist/src/packages.js +134 -88
- package/dist/src/packages.js.map +1 -1
- package/dist/src/storage/in-memory/InMemoryRepoStore.d.ts +35 -0
- package/dist/src/storage/in-memory/InMemoryRepoStore.d.ts.map +1 -0
- package/dist/src/storage/in-memory/InMemoryRepoStore.js +107 -0
- package/dist/src/storage/in-memory/InMemoryRepoStore.js.map +1 -0
- package/dist/src/storage/in-memory/InMemoryStorage.d.ts +139 -0
- package/dist/src/storage/in-memory/InMemoryStorage.d.ts.map +1 -0
- package/dist/src/storage/in-memory/InMemoryStorage.js +439 -0
- package/dist/src/storage/in-memory/InMemoryStorage.js.map +1 -0
- package/dist/src/storage/in-memory/index.d.ts +12 -0
- package/dist/src/storage/in-memory/index.d.ts.map +1 -0
- package/dist/src/storage/in-memory/index.js +12 -0
- package/dist/src/storage/in-memory/index.js.map +1 -0
- package/dist/src/storage/index.d.ts +18 -0
- package/dist/src/storage/index.d.ts.map +1 -0
- package/dist/src/storage/index.js +10 -0
- package/dist/src/storage/index.js.map +1 -0
- package/dist/src/storage/interfaces.d.ts +581 -0
- package/dist/src/storage/interfaces.d.ts.map +1 -0
- package/dist/src/storage/interfaces.js +6 -0
- package/dist/src/storage/interfaces.js.map +1 -0
- package/dist/src/storage/local/LocalBackend.d.ts +56 -0
- package/dist/src/storage/local/LocalBackend.d.ts.map +1 -0
- package/dist/src/storage/local/LocalBackend.js +145 -0
- package/dist/src/storage/local/LocalBackend.js.map +1 -0
- package/dist/src/storage/local/LocalDatasetRefStore.d.ts +22 -0
- package/dist/src/storage/local/LocalDatasetRefStore.d.ts.map +1 -0
- package/dist/src/storage/local/LocalDatasetRefStore.js +118 -0
- package/dist/src/storage/local/LocalDatasetRefStore.js.map +1 -0
- package/dist/src/storage/local/LocalLockService.d.ts +111 -0
- package/dist/src/storage/local/LocalLockService.d.ts.map +1 -0
- package/dist/src/storage/local/LocalLockService.js +355 -0
- package/dist/src/storage/local/LocalLockService.js.map +1 -0
- package/dist/src/storage/local/LocalLogStore.d.ts +23 -0
- package/dist/src/storage/local/LocalLogStore.d.ts.map +1 -0
- package/dist/src/storage/local/LocalLogStore.js +66 -0
- package/dist/src/storage/local/LocalLogStore.js.map +1 -0
- package/dist/src/storage/local/LocalObjectStore.d.ts +55 -0
- package/dist/src/storage/local/LocalObjectStore.d.ts.map +1 -0
- package/dist/src/storage/local/LocalObjectStore.js +300 -0
- package/dist/src/storage/local/LocalObjectStore.js.map +1 -0
- package/dist/src/storage/local/LocalRefStore.d.ts +50 -0
- package/dist/src/storage/local/LocalRefStore.d.ts.map +1 -0
- package/dist/src/storage/local/LocalRefStore.js +337 -0
- package/dist/src/storage/local/LocalRefStore.js.map +1 -0
- package/dist/src/storage/local/LocalRepoStore.d.ts +55 -0
- package/dist/src/storage/local/LocalRepoStore.d.ts.map +1 -0
- package/dist/src/storage/local/LocalRepoStore.js +365 -0
- package/dist/src/storage/local/LocalRepoStore.js.map +1 -0
- package/dist/src/storage/local/gc.d.ts +92 -0
- package/dist/src/storage/local/gc.d.ts.map +1 -0
- package/dist/src/storage/local/gc.js +377 -0
- package/dist/src/storage/local/gc.js.map +1 -0
- package/dist/src/storage/local/index.d.ts +18 -0
- package/dist/src/storage/local/index.d.ts.map +1 -0
- package/dist/src/storage/local/index.js +18 -0
- package/dist/src/storage/local/index.js.map +1 -0
- package/dist/src/storage/local/localHelpers.d.ts +25 -0
- package/dist/src/storage/local/localHelpers.d.ts.map +1 -0
- package/dist/src/storage/local/localHelpers.js +69 -0
- package/dist/src/storage/local/localHelpers.js.map +1 -0
- package/dist/src/{repository.d.ts → storage/local/repository.d.ts} +8 -4
- package/dist/src/storage/local/repository.d.ts.map +1 -0
- package/dist/src/{repository.js → storage/local/repository.js} +31 -29
- package/dist/src/storage/local/repository.js.map +1 -0
- package/dist/src/tasks.d.ts +16 -10
- package/dist/src/tasks.d.ts.map +1 -1
- package/dist/src/tasks.js +35 -41
- package/dist/src/tasks.js.map +1 -1
- package/dist/src/test-helpers.d.ts +5 -4
- package/dist/src/test-helpers.d.ts.map +1 -1
- package/dist/src/test-helpers.js +9 -21
- package/dist/src/test-helpers.js.map +1 -1
- package/dist/src/transfer/InMemoryTransferBackend.d.ts +66 -0
- package/dist/src/transfer/InMemoryTransferBackend.d.ts.map +1 -0
- package/dist/src/transfer/InMemoryTransferBackend.js +166 -0
- package/dist/src/transfer/InMemoryTransferBackend.js.map +1 -0
- package/dist/src/transfer/index.d.ts +8 -0
- package/dist/src/transfer/index.d.ts.map +1 -0
- package/dist/src/transfer/index.js +9 -0
- package/dist/src/transfer/index.js.map +1 -0
- package/dist/src/transfer/interfaces.d.ts +103 -0
- package/dist/src/transfer/interfaces.d.ts.map +1 -0
- package/dist/src/transfer/interfaces.js +6 -0
- package/dist/src/transfer/interfaces.js.map +1 -0
- package/dist/src/transfer/types.d.ts +79 -0
- package/dist/src/transfer/types.d.ts.map +1 -0
- package/dist/src/transfer/types.js +58 -0
- package/dist/src/transfer/types.js.map +1 -0
- package/dist/src/trees.d.ts +147 -59
- package/dist/src/trees.d.ts.map +1 -1
- package/dist/src/trees.js +372 -419
- package/dist/src/trees.js.map +1 -1
- package/dist/src/uuid.d.ts +26 -0
- package/dist/src/uuid.d.ts.map +1 -0
- package/dist/src/uuid.js +80 -0
- package/dist/src/uuid.js.map +1 -0
- package/dist/src/workspaceStatus.d.ts +6 -4
- package/dist/src/workspaceStatus.d.ts.map +1 -1
- package/dist/src/workspaceStatus.js +43 -49
- package/dist/src/workspaceStatus.js.map +1 -1
- package/dist/src/workspaces.d.ts +35 -47
- package/dist/src/workspaces.d.ts.map +1 -1
- package/dist/src/workspaces.js +194 -156
- package/dist/src/workspaces.js.map +1 -1
- package/package.json +4 -4
- package/dist/src/gc.d.ts +0 -54
- package/dist/src/gc.d.ts.map +0 -1
- package/dist/src/gc.js +0 -233
- package/dist/src/gc.js.map +0 -1
- package/dist/src/repository.d.ts.map +0 -1
- package/dist/src/repository.js.map +0 -1
- package/dist/src/workspaceLock.d.ts +0 -67
- package/dist/src/workspaceLock.d.ts.map +0 -1
- package/dist/src/workspaceLock.js +0 -217
- package/dist/src/workspaceLock.js.map +0 -1
package/dist/src/executions.d.ts
CHANGED
|
@@ -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 {
|
|
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
|
|
18
|
+
* Get execution status for a specific execution.
|
|
18
19
|
*
|
|
19
|
-
* @param
|
|
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
|
-
* @
|
|
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
|
|
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
|
|
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
|
|
32
|
-
|
|
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
|
|
49
|
+
export declare function executionGetOutput(storage: StorageBackend, repo: string, taskHash: string, inHash: string): Promise<string | null>;
|
|
35
50
|
/**
|
|
36
|
-
*
|
|
51
|
+
* List all execution IDs for a (taskHash, inputsHash) pair.
|
|
37
52
|
*
|
|
38
|
-
* @param
|
|
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
|
|
57
|
+
* @returns Array of execution IDs (sorted lexicographically ascending)
|
|
42
58
|
*/
|
|
43
|
-
export declare function
|
|
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
|
|
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(
|
|
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
|
|
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(
|
|
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
|
|
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(
|
|
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
|
|
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(
|
|
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;
|
|
1
|
+
{"version":3,"file":"executions.d.ts","sourceRoot":"","sources":["../../src/executions.ts"],"names":[],"mappings":"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"}
|