@elaraai/e3-types 0.0.2-beta.3 → 0.0.2-beta.30
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 +7 -4
- package/dist/src/dataflow.d.ts +484 -0
- package/dist/src/dataflow.d.ts.map +1 -0
- package/dist/src/dataflow.js +316 -0
- package/dist/src/dataflow.js.map +1 -0
- package/dist/src/dataset.d.ts +4 -4
- package/dist/src/execution.d.ts +29 -21
- package/dist/src/execution.d.ts.map +1 -1
- package/dist/src/execution.js +8 -0
- package/dist/src/execution.js.map +1 -1
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +6 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/lock.d.ts +81 -0
- package/dist/src/lock.d.ts.map +1 -0
- package/dist/src/lock.js +69 -0
- package/dist/src/lock.js.map +1 -0
- package/dist/src/package.d.ts +101 -95
- package/dist/src/package.d.ts.map +1 -1
- package/dist/src/structure.d.ts +64 -60
- package/dist/src/structure.d.ts.map +1 -1
- package/dist/src/task.d.ts +5 -5
- package/dist/src/workspace.d.ts +9 -7
- package/dist/src/workspace.d.ts.map +1 -1
- package/dist/src/workspace.js +3 -1
- package/dist/src/workspace.js.map +1 -1
- package/package.json +2 -2
- package/src/dataflow.ts +376 -0
- package/src/execution.ts +8 -0
- package/src/index.ts +35 -0
- package/src/lock.ts +88 -0
- package/src/workspace.ts +3 -1
package/README.md
CHANGED
|
@@ -11,11 +11,14 @@ npm install @elaraai/e3-types
|
|
|
11
11
|
## Types
|
|
12
12
|
|
|
13
13
|
- **Repository** - Repository configuration and paths
|
|
14
|
-
- **Commit** - Task commit types (new, done, error)
|
|
15
|
-
- **Task** - Task definition and state
|
|
16
14
|
- **Package** - Package manifest and metadata
|
|
17
15
|
- **Dataset** - Dataset schemas and paths
|
|
18
|
-
- **
|
|
16
|
+
- **Task** - Task definition and configuration
|
|
17
|
+
- **Dataflow** - Dataflow graph and execution state
|
|
18
|
+
- `TaskStateType` - Individual task execution state
|
|
19
|
+
- `DataflowGraphType` - Task dependency graph
|
|
20
|
+
- `ExecutionEventType` - Execution progress events
|
|
21
|
+
- `DataflowExecutionStateType` - Full execution state
|
|
19
22
|
- **Runner** - Runner configuration
|
|
20
23
|
|
|
21
24
|
|
|
@@ -41,7 +44,7 @@ Dual AGPL-3.0 / Commercial. See [LICENSE.md](./LICENSE.md).
|
|
|
41
44
|
- [@elaraai/e3](https://www.npmjs.com/package/@elaraai/e3): SDK for authoring e3 packages with typed tasks and pipelines
|
|
42
45
|
- [@elaraai/e3-core](https://www.npmjs.com/package/@elaraai/e3-core): Git-like object store, task queue, result caching
|
|
43
46
|
- [@elaraai/e3-types](https://www.npmjs.com/package/@elaraai/e3-types): Shared type definitions for e3 packages
|
|
44
|
-
- [@elaraai/e3-cli](https://www.npmjs.com/package/@elaraai/e3-cli): `e3
|
|
47
|
+
- [@elaraai/e3-cli](https://www.npmjs.com/package/@elaraai/e3-cli): `e3 repo`, `e3 workspace`, `e3 start`, `e3 logs` commands for managing repositories, workspaces, and tasks
|
|
45
48
|
- [@elaraai/e3-api-client](https://www.npmjs.com/package/@elaraai/e3-api-client): HTTP client for remote e3 servers
|
|
46
49
|
- [@elaraai/e3-api-server](https://www.npmjs.com/package/@elaraai/e3-api-server): REST API server for e3 repositories
|
|
47
50
|
|
|
@@ -0,0 +1,484 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Dataflow execution state type definitions.
|
|
7
|
+
*
|
|
8
|
+
* These types define the persistent state for dataflow execution,
|
|
9
|
+
* stored in workspaces/<ws>/execution.beast2
|
|
10
|
+
*
|
|
11
|
+
* Key design decisions:
|
|
12
|
+
* - Dates are Date objects (via DateTimeType), not strings
|
|
13
|
+
* - Events stored inline as array (single file, not separate JSONL)
|
|
14
|
+
* - Tasks stored as Dict (not Map) for beast2 compatibility
|
|
15
|
+
*/
|
|
16
|
+
import { StructType, VariantType, ArrayType, DictType, StringType, IntegerType, BooleanType, DateTimeType, OptionType, ValueTypeOf } from '@elaraai/east';
|
|
17
|
+
/**
|
|
18
|
+
* Status of a dataflow execution.
|
|
19
|
+
*/
|
|
20
|
+
export type DataflowExecutionStatus = 'running' | 'completed' | 'failed' | 'cancelled';
|
|
21
|
+
/**
|
|
22
|
+
* Status of an individual task within an execution.
|
|
23
|
+
*/
|
|
24
|
+
export type TaskStatus = 'pending' | 'ready' | 'in_progress' | 'completed' | 'failed' | 'skipped';
|
|
25
|
+
/**
|
|
26
|
+
* Information about a task's execution state.
|
|
27
|
+
*
|
|
28
|
+
* Stored in the tasks Dict of DataflowExecutionStateType.
|
|
29
|
+
*/
|
|
30
|
+
export declare const TaskStateType: StructType<{
|
|
31
|
+
/** Task name */
|
|
32
|
+
readonly name: StringType;
|
|
33
|
+
/** Current status (TaskStatus as string) */
|
|
34
|
+
readonly status: StringType;
|
|
35
|
+
/** Whether the result was served from cache */
|
|
36
|
+
readonly cached: OptionType<BooleanType>;
|
|
37
|
+
/** Output hash if completed successfully */
|
|
38
|
+
readonly outputHash: OptionType<StringType>;
|
|
39
|
+
/** Error message if failed */
|
|
40
|
+
readonly error: OptionType<StringType>;
|
|
41
|
+
/** Exit code if task process failed */
|
|
42
|
+
readonly exitCode: OptionType<IntegerType>;
|
|
43
|
+
/** When the task started */
|
|
44
|
+
readonly startedAt: OptionType<DateTimeType>;
|
|
45
|
+
/** When the task completed */
|
|
46
|
+
readonly completedAt: OptionType<DateTimeType>;
|
|
47
|
+
/** Duration in milliseconds */
|
|
48
|
+
readonly duration: OptionType<IntegerType>;
|
|
49
|
+
}>;
|
|
50
|
+
export type TaskState = ValueTypeOf<typeof TaskStateType>;
|
|
51
|
+
/**
|
|
52
|
+
* A task within the dataflow graph.
|
|
53
|
+
*/
|
|
54
|
+
export declare const DataflowGraphTaskType: StructType<{
|
|
55
|
+
/** Task name */
|
|
56
|
+
readonly name: StringType;
|
|
57
|
+
/** Task object hash */
|
|
58
|
+
readonly hash: StringType;
|
|
59
|
+
/** Input dataset paths */
|
|
60
|
+
readonly inputs: ArrayType<StringType>;
|
|
61
|
+
/** Output dataset path */
|
|
62
|
+
readonly output: StringType;
|
|
63
|
+
/** Names of tasks this depends on */
|
|
64
|
+
readonly dependsOn: ArrayType<StringType>;
|
|
65
|
+
}>;
|
|
66
|
+
export type DataflowGraphTask = ValueTypeOf<typeof DataflowGraphTaskType>;
|
|
67
|
+
/**
|
|
68
|
+
* The complete dataflow dependency graph.
|
|
69
|
+
*/
|
|
70
|
+
export declare const DataflowGraphType: StructType<{
|
|
71
|
+
/** All tasks in the graph */
|
|
72
|
+
readonly tasks: ArrayType<StructType<{
|
|
73
|
+
/** Task name */
|
|
74
|
+
readonly name: StringType;
|
|
75
|
+
/** Task object hash */
|
|
76
|
+
readonly hash: StringType;
|
|
77
|
+
/** Input dataset paths */
|
|
78
|
+
readonly inputs: ArrayType<StringType>;
|
|
79
|
+
/** Output dataset path */
|
|
80
|
+
readonly output: StringType;
|
|
81
|
+
/** Names of tasks this depends on */
|
|
82
|
+
readonly dependsOn: ArrayType<StringType>;
|
|
83
|
+
}>>;
|
|
84
|
+
}>;
|
|
85
|
+
export type DataflowGraph = ValueTypeOf<typeof DataflowGraphType>;
|
|
86
|
+
/**
|
|
87
|
+
* Execution events (VariantType for discriminated union).
|
|
88
|
+
*
|
|
89
|
+
* Events track the progress of a dataflow execution and are stored
|
|
90
|
+
* inline in the execution state (not as a separate JSONL file).
|
|
91
|
+
*/
|
|
92
|
+
export declare const ExecutionEventType: VariantType<{
|
|
93
|
+
/** Execution started */
|
|
94
|
+
readonly execution_started: StructType<{
|
|
95
|
+
/** Event sequence number */
|
|
96
|
+
readonly seq: IntegerType;
|
|
97
|
+
/** When the event occurred */
|
|
98
|
+
readonly timestamp: DateTimeType;
|
|
99
|
+
/** Execution ID */
|
|
100
|
+
readonly executionId: StringType;
|
|
101
|
+
/** Total number of tasks in the graph */
|
|
102
|
+
readonly totalTasks: IntegerType;
|
|
103
|
+
}>;
|
|
104
|
+
/** Task became ready to execute */
|
|
105
|
+
readonly task_ready: StructType<{
|
|
106
|
+
/** Event sequence number */
|
|
107
|
+
readonly seq: IntegerType;
|
|
108
|
+
/** When the event occurred */
|
|
109
|
+
readonly timestamp: DateTimeType;
|
|
110
|
+
/** Task name */
|
|
111
|
+
readonly task: StringType;
|
|
112
|
+
}>;
|
|
113
|
+
/** Task execution started */
|
|
114
|
+
readonly task_started: StructType<{
|
|
115
|
+
/** Event sequence number */
|
|
116
|
+
readonly seq: IntegerType;
|
|
117
|
+
/** When the event occurred */
|
|
118
|
+
readonly timestamp: DateTimeType;
|
|
119
|
+
/** Task name */
|
|
120
|
+
readonly task: StringType;
|
|
121
|
+
}>;
|
|
122
|
+
/** Task completed successfully */
|
|
123
|
+
readonly task_completed: StructType<{
|
|
124
|
+
/** Event sequence number */
|
|
125
|
+
readonly seq: IntegerType;
|
|
126
|
+
/** When the event occurred */
|
|
127
|
+
readonly timestamp: DateTimeType;
|
|
128
|
+
/** Task name */
|
|
129
|
+
readonly task: StringType;
|
|
130
|
+
/** Whether the result was served from cache */
|
|
131
|
+
readonly cached: BooleanType;
|
|
132
|
+
/** Output hash */
|
|
133
|
+
readonly outputHash: StringType;
|
|
134
|
+
/** Duration in milliseconds */
|
|
135
|
+
readonly duration: IntegerType;
|
|
136
|
+
}>;
|
|
137
|
+
/** Task failed */
|
|
138
|
+
readonly task_failed: StructType<{
|
|
139
|
+
/** Event sequence number */
|
|
140
|
+
readonly seq: IntegerType;
|
|
141
|
+
/** When the event occurred */
|
|
142
|
+
readonly timestamp: DateTimeType;
|
|
143
|
+
/** Task name */
|
|
144
|
+
readonly task: StringType;
|
|
145
|
+
/** Error message */
|
|
146
|
+
readonly error: OptionType<StringType>;
|
|
147
|
+
/** Exit code if task process failed */
|
|
148
|
+
readonly exitCode: OptionType<IntegerType>;
|
|
149
|
+
/** Duration in milliseconds */
|
|
150
|
+
readonly duration: IntegerType;
|
|
151
|
+
}>;
|
|
152
|
+
/** Task was skipped due to upstream failure */
|
|
153
|
+
readonly task_skipped: StructType<{
|
|
154
|
+
/** Event sequence number */
|
|
155
|
+
readonly seq: IntegerType;
|
|
156
|
+
/** When the event occurred */
|
|
157
|
+
readonly timestamp: DateTimeType;
|
|
158
|
+
/** Task name */
|
|
159
|
+
readonly task: StringType;
|
|
160
|
+
/** Name of the upstream task that caused the skip */
|
|
161
|
+
readonly cause: StringType;
|
|
162
|
+
}>;
|
|
163
|
+
/** Execution completed */
|
|
164
|
+
readonly execution_completed: StructType<{
|
|
165
|
+
/** Event sequence number */
|
|
166
|
+
readonly seq: IntegerType;
|
|
167
|
+
/** When the event occurred */
|
|
168
|
+
readonly timestamp: DateTimeType;
|
|
169
|
+
/** Whether all tasks succeeded */
|
|
170
|
+
readonly success: BooleanType;
|
|
171
|
+
/** Number of tasks executed (not from cache) */
|
|
172
|
+
readonly executed: IntegerType;
|
|
173
|
+
/** Number of tasks served from cache */
|
|
174
|
+
readonly cached: IntegerType;
|
|
175
|
+
/** Number of tasks that failed */
|
|
176
|
+
readonly failed: IntegerType;
|
|
177
|
+
/** Number of tasks skipped */
|
|
178
|
+
readonly skipped: IntegerType;
|
|
179
|
+
/** Total duration in milliseconds */
|
|
180
|
+
readonly duration: IntegerType;
|
|
181
|
+
}>;
|
|
182
|
+
/** Execution was cancelled */
|
|
183
|
+
readonly execution_cancelled: StructType<{
|
|
184
|
+
/** Event sequence number */
|
|
185
|
+
readonly seq: IntegerType;
|
|
186
|
+
/** When the event occurred */
|
|
187
|
+
readonly timestamp: DateTimeType;
|
|
188
|
+
/** Reason for cancellation */
|
|
189
|
+
readonly reason: OptionType<StringType>;
|
|
190
|
+
}>;
|
|
191
|
+
}>;
|
|
192
|
+
export type ExecutionEvent = ValueTypeOf<typeof ExecutionEventType>;
|
|
193
|
+
/**
|
|
194
|
+
* Persistent state for a dataflow execution.
|
|
195
|
+
*
|
|
196
|
+
* Stored in workspaces/<ws>/execution.beast2
|
|
197
|
+
*
|
|
198
|
+
* @remarks
|
|
199
|
+
* - Tasks are stored as a Dict (serializes as object, not array of tuples)
|
|
200
|
+
* - Events are stored inline (not as separate JSONL file)
|
|
201
|
+
* - Dates are Date objects (via DateTimeType)
|
|
202
|
+
*/
|
|
203
|
+
export declare const DataflowExecutionStateType: StructType<{
|
|
204
|
+
/** Unique execution ID (local: auto-increment, cloud: UUID) */
|
|
205
|
+
readonly id: StringType;
|
|
206
|
+
/** Repository identifier */
|
|
207
|
+
readonly repo: StringType;
|
|
208
|
+
/** Workspace name */
|
|
209
|
+
readonly workspace: StringType;
|
|
210
|
+
/** When the execution started */
|
|
211
|
+
readonly startedAt: DateTimeType;
|
|
212
|
+
/** Maximum concurrent task executions */
|
|
213
|
+
readonly concurrency: IntegerType;
|
|
214
|
+
/** Force re-execution even if cached */
|
|
215
|
+
readonly force: BooleanType;
|
|
216
|
+
/** Filter to run only specific task(s) by exact name */
|
|
217
|
+
readonly filter: OptionType<StringType>;
|
|
218
|
+
/** The dependency graph (for local execution) */
|
|
219
|
+
readonly graph: OptionType<StructType<{
|
|
220
|
+
/** All tasks in the graph */
|
|
221
|
+
readonly tasks: ArrayType<StructType<{
|
|
222
|
+
/** Task name */
|
|
223
|
+
readonly name: StringType;
|
|
224
|
+
/** Task object hash */
|
|
225
|
+
readonly hash: StringType;
|
|
226
|
+
/** Input dataset paths */
|
|
227
|
+
readonly inputs: ArrayType<StringType>;
|
|
228
|
+
/** Output dataset path */
|
|
229
|
+
readonly output: StringType;
|
|
230
|
+
/** Names of tasks this depends on */
|
|
231
|
+
readonly dependsOn: ArrayType<StringType>;
|
|
232
|
+
}>>;
|
|
233
|
+
}>>;
|
|
234
|
+
/** Hash/key referencing a separately stored graph (for cloud) */
|
|
235
|
+
readonly graphHash: OptionType<StringType>;
|
|
236
|
+
/** Map of task name -> task state */
|
|
237
|
+
readonly tasks: DictType<StringType, StructType<{
|
|
238
|
+
/** Task name */
|
|
239
|
+
readonly name: StringType;
|
|
240
|
+
/** Current status (TaskStatus as string) */
|
|
241
|
+
readonly status: StringType;
|
|
242
|
+
/** Whether the result was served from cache */
|
|
243
|
+
readonly cached: OptionType<BooleanType>;
|
|
244
|
+
/** Output hash if completed successfully */
|
|
245
|
+
readonly outputHash: OptionType<StringType>;
|
|
246
|
+
/** Error message if failed */
|
|
247
|
+
readonly error: OptionType<StringType>;
|
|
248
|
+
/** Exit code if task process failed */
|
|
249
|
+
readonly exitCode: OptionType<IntegerType>;
|
|
250
|
+
/** When the task started */
|
|
251
|
+
readonly startedAt: OptionType<DateTimeType>;
|
|
252
|
+
/** When the task completed */
|
|
253
|
+
readonly completedAt: OptionType<DateTimeType>;
|
|
254
|
+
/** Duration in milliseconds */
|
|
255
|
+
readonly duration: OptionType<IntegerType>;
|
|
256
|
+
}>>;
|
|
257
|
+
/** Number of tasks executed (not from cache) */
|
|
258
|
+
readonly executed: IntegerType;
|
|
259
|
+
/** Number of tasks served from cache */
|
|
260
|
+
readonly cached: IntegerType;
|
|
261
|
+
/** Number of tasks that failed */
|
|
262
|
+
readonly failed: IntegerType;
|
|
263
|
+
/** Number of tasks skipped due to upstream failure */
|
|
264
|
+
readonly skipped: IntegerType;
|
|
265
|
+
/** Current execution status */
|
|
266
|
+
readonly status: StringType;
|
|
267
|
+
/** When the execution completed */
|
|
268
|
+
readonly completedAt: OptionType<DateTimeType>;
|
|
269
|
+
/** Error message if status is 'failed' */
|
|
270
|
+
readonly error: OptionType<StringType>;
|
|
271
|
+
/** All events for this execution */
|
|
272
|
+
readonly events: ArrayType<VariantType<{
|
|
273
|
+
/** Execution started */
|
|
274
|
+
readonly execution_started: StructType<{
|
|
275
|
+
/** Event sequence number */
|
|
276
|
+
readonly seq: IntegerType;
|
|
277
|
+
/** When the event occurred */
|
|
278
|
+
readonly timestamp: DateTimeType;
|
|
279
|
+
/** Execution ID */
|
|
280
|
+
readonly executionId: StringType;
|
|
281
|
+
/** Total number of tasks in the graph */
|
|
282
|
+
readonly totalTasks: IntegerType;
|
|
283
|
+
}>;
|
|
284
|
+
/** Task became ready to execute */
|
|
285
|
+
readonly task_ready: StructType<{
|
|
286
|
+
/** Event sequence number */
|
|
287
|
+
readonly seq: IntegerType;
|
|
288
|
+
/** When the event occurred */
|
|
289
|
+
readonly timestamp: DateTimeType;
|
|
290
|
+
/** Task name */
|
|
291
|
+
readonly task: StringType;
|
|
292
|
+
}>;
|
|
293
|
+
/** Task execution started */
|
|
294
|
+
readonly task_started: StructType<{
|
|
295
|
+
/** Event sequence number */
|
|
296
|
+
readonly seq: IntegerType;
|
|
297
|
+
/** When the event occurred */
|
|
298
|
+
readonly timestamp: DateTimeType;
|
|
299
|
+
/** Task name */
|
|
300
|
+
readonly task: StringType;
|
|
301
|
+
}>;
|
|
302
|
+
/** Task completed successfully */
|
|
303
|
+
readonly task_completed: StructType<{
|
|
304
|
+
/** Event sequence number */
|
|
305
|
+
readonly seq: IntegerType;
|
|
306
|
+
/** When the event occurred */
|
|
307
|
+
readonly timestamp: DateTimeType;
|
|
308
|
+
/** Task name */
|
|
309
|
+
readonly task: StringType;
|
|
310
|
+
/** Whether the result was served from cache */
|
|
311
|
+
readonly cached: BooleanType;
|
|
312
|
+
/** Output hash */
|
|
313
|
+
readonly outputHash: StringType;
|
|
314
|
+
/** Duration in milliseconds */
|
|
315
|
+
readonly duration: IntegerType;
|
|
316
|
+
}>;
|
|
317
|
+
/** Task failed */
|
|
318
|
+
readonly task_failed: StructType<{
|
|
319
|
+
/** Event sequence number */
|
|
320
|
+
readonly seq: IntegerType;
|
|
321
|
+
/** When the event occurred */
|
|
322
|
+
readonly timestamp: DateTimeType;
|
|
323
|
+
/** Task name */
|
|
324
|
+
readonly task: StringType;
|
|
325
|
+
/** Error message */
|
|
326
|
+
readonly error: OptionType<StringType>;
|
|
327
|
+
/** Exit code if task process failed */
|
|
328
|
+
readonly exitCode: OptionType<IntegerType>;
|
|
329
|
+
/** Duration in milliseconds */
|
|
330
|
+
readonly duration: IntegerType;
|
|
331
|
+
}>;
|
|
332
|
+
/** Task was skipped due to upstream failure */
|
|
333
|
+
readonly task_skipped: StructType<{
|
|
334
|
+
/** Event sequence number */
|
|
335
|
+
readonly seq: IntegerType;
|
|
336
|
+
/** When the event occurred */
|
|
337
|
+
readonly timestamp: DateTimeType;
|
|
338
|
+
/** Task name */
|
|
339
|
+
readonly task: StringType;
|
|
340
|
+
/** Name of the upstream task that caused the skip */
|
|
341
|
+
readonly cause: StringType;
|
|
342
|
+
}>;
|
|
343
|
+
/** Execution completed */
|
|
344
|
+
readonly execution_completed: StructType<{
|
|
345
|
+
/** Event sequence number */
|
|
346
|
+
readonly seq: IntegerType;
|
|
347
|
+
/** When the event occurred */
|
|
348
|
+
readonly timestamp: DateTimeType;
|
|
349
|
+
/** Whether all tasks succeeded */
|
|
350
|
+
readonly success: BooleanType;
|
|
351
|
+
/** Number of tasks executed (not from cache) */
|
|
352
|
+
readonly executed: IntegerType;
|
|
353
|
+
/** Number of tasks served from cache */
|
|
354
|
+
readonly cached: IntegerType;
|
|
355
|
+
/** Number of tasks that failed */
|
|
356
|
+
readonly failed: IntegerType;
|
|
357
|
+
/** Number of tasks skipped */
|
|
358
|
+
readonly skipped: IntegerType;
|
|
359
|
+
/** Total duration in milliseconds */
|
|
360
|
+
readonly duration: IntegerType;
|
|
361
|
+
}>;
|
|
362
|
+
/** Execution was cancelled */
|
|
363
|
+
readonly execution_cancelled: StructType<{
|
|
364
|
+
/** Event sequence number */
|
|
365
|
+
readonly seq: IntegerType;
|
|
366
|
+
/** When the event occurred */
|
|
367
|
+
readonly timestamp: DateTimeType;
|
|
368
|
+
/** Reason for cancellation */
|
|
369
|
+
readonly reason: OptionType<StringType>;
|
|
370
|
+
}>;
|
|
371
|
+
}>>;
|
|
372
|
+
/** Sequence number for next event (auto-increment) */
|
|
373
|
+
readonly eventSeq: IntegerType;
|
|
374
|
+
}>;
|
|
375
|
+
export type DataflowExecutionState = ValueTypeOf<typeof DataflowExecutionStateType>;
|
|
376
|
+
/**
|
|
377
|
+
* Status of a dataflow run.
|
|
378
|
+
*/
|
|
379
|
+
export declare const DataflowRunStatusType: VariantType<{
|
|
380
|
+
/** Run is currently executing */
|
|
381
|
+
readonly running: StructType<{}>;
|
|
382
|
+
/** Run completed successfully */
|
|
383
|
+
readonly completed: StructType<{}>;
|
|
384
|
+
/** Run failed with a task error */
|
|
385
|
+
readonly failed: StructType<{
|
|
386
|
+
/** Name of the task that failed */
|
|
387
|
+
readonly failedTask: StringType;
|
|
388
|
+
/** Error message */
|
|
389
|
+
readonly error: StringType;
|
|
390
|
+
}>;
|
|
391
|
+
/** Run was cancelled */
|
|
392
|
+
readonly cancelled: StructType<{}>;
|
|
393
|
+
}>;
|
|
394
|
+
export type DataflowRunStatus = ValueTypeOf<typeof DataflowRunStatusType>;
|
|
395
|
+
/**
|
|
396
|
+
* Record of a task execution within a dataflow run.
|
|
397
|
+
*/
|
|
398
|
+
export declare const TaskExecutionRecordType: StructType<{
|
|
399
|
+
/** Execution ID (UUIDv7) */
|
|
400
|
+
readonly executionId: StringType;
|
|
401
|
+
/** Whether this was a cache hit */
|
|
402
|
+
readonly cached: BooleanType;
|
|
403
|
+
}>;
|
|
404
|
+
export type TaskExecutionRecord = ValueTypeOf<typeof TaskExecutionRecordType>;
|
|
405
|
+
/**
|
|
406
|
+
* Summary statistics for a dataflow run.
|
|
407
|
+
*/
|
|
408
|
+
export declare const DataflowRunSummaryType: StructType<{
|
|
409
|
+
/** Total number of tasks */
|
|
410
|
+
readonly total: IntegerType;
|
|
411
|
+
/** Number of completed tasks */
|
|
412
|
+
readonly completed: IntegerType;
|
|
413
|
+
/** Number of cached tasks */
|
|
414
|
+
readonly cached: IntegerType;
|
|
415
|
+
/** Number of failed tasks */
|
|
416
|
+
readonly failed: IntegerType;
|
|
417
|
+
/** Number of skipped tasks */
|
|
418
|
+
readonly skipped: IntegerType;
|
|
419
|
+
}>;
|
|
420
|
+
export type DataflowRunSummary = ValueTypeOf<typeof DataflowRunSummaryType>;
|
|
421
|
+
/**
|
|
422
|
+
* A dataflow run record, tracking one execution of a workspace's dataflow.
|
|
423
|
+
*
|
|
424
|
+
* Stored in: dataflows/<workspace>/<runId>.beast2
|
|
425
|
+
*
|
|
426
|
+
* This provides execution history and provenance tracking:
|
|
427
|
+
* - Which tasks ran and which were cached
|
|
428
|
+
* - Input/output snapshots for reproducibility
|
|
429
|
+
* - Timing information for performance analysis
|
|
430
|
+
*/
|
|
431
|
+
export declare const DataflowRunType: StructType<{
|
|
432
|
+
/** Run ID (UUIDv7) */
|
|
433
|
+
readonly runId: StringType;
|
|
434
|
+
/** Workspace name */
|
|
435
|
+
readonly workspaceName: StringType;
|
|
436
|
+
/** Package reference at run time (name@version) */
|
|
437
|
+
readonly packageRef: StringType;
|
|
438
|
+
/** When the run started */
|
|
439
|
+
readonly startedAt: DateTimeType;
|
|
440
|
+
/** When the run completed (null if still running) */
|
|
441
|
+
readonly completedAt: OptionType<DateTimeType>;
|
|
442
|
+
/** Current status of the run */
|
|
443
|
+
readonly status: VariantType<{
|
|
444
|
+
/** Run is currently executing */
|
|
445
|
+
readonly running: StructType<{}>;
|
|
446
|
+
/** Run completed successfully */
|
|
447
|
+
readonly completed: StructType<{}>;
|
|
448
|
+
/** Run failed with a task error */
|
|
449
|
+
readonly failed: StructType<{
|
|
450
|
+
/** Name of the task that failed */
|
|
451
|
+
readonly failedTask: StringType;
|
|
452
|
+
/** Error message */
|
|
453
|
+
readonly error: StringType;
|
|
454
|
+
}>;
|
|
455
|
+
/** Run was cancelled */
|
|
456
|
+
readonly cancelled: StructType<{}>;
|
|
457
|
+
}>;
|
|
458
|
+
/** Root hash at start (input snapshot) */
|
|
459
|
+
readonly inputSnapshot: StringType;
|
|
460
|
+
/** Root hash at end (output snapshot, null if still running) */
|
|
461
|
+
readonly outputSnapshot: OptionType<StringType>;
|
|
462
|
+
/** Map of task name -> execution record */
|
|
463
|
+
readonly taskExecutions: DictType<StringType, StructType<{
|
|
464
|
+
/** Execution ID (UUIDv7) */
|
|
465
|
+
readonly executionId: StringType;
|
|
466
|
+
/** Whether this was a cache hit */
|
|
467
|
+
readonly cached: BooleanType;
|
|
468
|
+
}>>;
|
|
469
|
+
/** Summary statistics */
|
|
470
|
+
readonly summary: StructType<{
|
|
471
|
+
/** Total number of tasks */
|
|
472
|
+
readonly total: IntegerType;
|
|
473
|
+
/** Number of completed tasks */
|
|
474
|
+
readonly completed: IntegerType;
|
|
475
|
+
/** Number of cached tasks */
|
|
476
|
+
readonly cached: IntegerType;
|
|
477
|
+
/** Number of failed tasks */
|
|
478
|
+
readonly failed: IntegerType;
|
|
479
|
+
/** Number of skipped tasks */
|
|
480
|
+
readonly skipped: IntegerType;
|
|
481
|
+
}>;
|
|
482
|
+
}>;
|
|
483
|
+
export type DataflowRun = ValueTypeOf<typeof DataflowRunType>;
|
|
484
|
+
//# sourceMappingURL=dataflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dataflow.d.ts","sourceRoot":"","sources":["../../src/dataflow.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;GAUG;AAEH,OAAO,EACL,UAAU,EACV,WAAW,EACX,SAAS,EACT,QAAQ,EACR,UAAU,EACV,WAAW,EACX,WAAW,EACX,YAAY,EACZ,UAAU,EACV,WAAW,EACZ,MAAM,eAAe,CAAC;AAMvB;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEvF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,aAAa,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AAMlG;;;;GAIG;AACH,eAAO,MAAM,aAAa;IACxB,gBAAgB;;IAEhB,4CAA4C;;IAE5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