@elaraai/e3-types 0.0.2-beta.9 → 1.0.0
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/.turbo/turbo-build.log +4 -0
- package/CLA.md +26 -0
- package/CLAUDE.md +11 -0
- package/CONTRIBUTING.md +28 -0
- package/LICENSE.md +1 -1
- package/README.md +56 -17
- package/dist/src/api.d.ts +1131 -0
- package/dist/src/api.d.ts.map +1 -0
- package/dist/src/api.js +652 -0
- package/dist/src/api.js.map +1 -0
- package/dist/src/constants.d.ts +12 -0
- package/dist/src/constants.d.ts.map +1 -0
- package/dist/src/constants.js +12 -0
- package/dist/src/constants.js.map +1 -0
- package/dist/src/dataflow.d.ts +574 -0
- package/dist/src/dataflow.d.ts.map +1 -0
- package/dist/src/dataflow.js +366 -0
- package/dist/src/dataflow.js.map +1 -0
- package/dist/src/dataset-ref.d.ts +86 -0
- package/dist/src/dataset-ref.d.ts.map +1 -0
- package/dist/src/dataset-ref.js +82 -0
- package/dist/src/dataset-ref.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 +7 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +39 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/lock.d.ts +85 -0
- package/dist/src/lock.d.ts.map +1 -0
- package/dist/src/lock.js +71 -0
- package/dist/src/lock.js.map +1 -0
- package/dist/src/package.d.ts +253 -134
- package/dist/src/package.d.ts.map +1 -1
- package/dist/src/package.js +53 -23
- package/dist/src/package.js.map +1 -1
- package/dist/src/structure.d.ts +99 -73
- package/dist/src/structure.d.ts.map +1 -1
- package/dist/src/structure.js +8 -3
- package/dist/src/structure.js.map +1 -1
- package/dist/src/task.d.ts +10 -6
- package/dist/src/task.d.ts.map +1 -1
- package/dist/src/task.js +5 -1
- package/dist/src/task.js.map +1 -1
- package/dist/src/transfer.d.ts +52 -0
- package/dist/src/transfer.d.ts.map +1 -0
- package/dist/src/transfer.js +49 -0
- package/dist/src/transfer.js.map +1 -0
- package/dist/src/workspace.d.ts +7 -9
- package/dist/src/workspace.d.ts.map +1 -1
- package/dist/src/workspace.js +3 -5
- package/dist/src/workspace.js.map +1 -1
- package/package.json +11 -11
- package/src/api.ts +763 -0
- package/src/constants.ts +12 -0
- package/src/dataflow.ts +427 -0
- package/src/dataset-ref.ts +91 -0
- package/src/execution.ts +8 -0
- package/src/index.ts +183 -0
- package/src/lock.ts +90 -0
- package/src/package.ts +72 -23
- package/src/structure.ts +8 -3
- package/src/task.ts +5 -1
- package/src/transfer.ts +56 -0
- package/src/workspace.ts +3 -5
- package/tsconfig.json +1 -2
package/dist/src/package.d.ts
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* - **Structure**: The shape of the data tree
|
|
14
14
|
* - **Task**: A computation with input/output paths (stored separately)
|
|
15
15
|
*/
|
|
16
|
-
import { StructType, StringType, DictType, ValueTypeOf } from '@elaraai/east';
|
|
16
|
+
import { StructType, StringType, IntegerType, VariantType, NullType, DictType, ValueTypeOf } from '@elaraai/east';
|
|
17
17
|
/**
|
|
18
18
|
* Data configuration in a package.
|
|
19
19
|
*
|
|
@@ -22,112 +22,134 @@ import { StructType, StringType, DictType, ValueTypeOf } from '@elaraai/east';
|
|
|
22
22
|
*
|
|
23
23
|
* @remarks
|
|
24
24
|
* - `structure`: Defines which paths are datasets vs trees (recursive)
|
|
25
|
-
* - `
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* ```ts
|
|
29
|
-
* const data: PackageData = {
|
|
30
|
-
* structure: variant('struct', new Map([
|
|
31
|
-
* ['inputs', variant('struct', new Map([
|
|
32
|
-
* ['sales', variant('value', variant('Array', variant('Integer', null)))],
|
|
33
|
-
* ]))],
|
|
34
|
-
* ['tasks', variant('struct', new Map([
|
|
35
|
-
* ['process', variant('struct', new Map([
|
|
36
|
-
* ['function_ir', variant('value', ...)],
|
|
37
|
-
* ['output', variant('value', variant('Integer', null))],
|
|
38
|
-
* ]))],
|
|
39
|
-
* ]))],
|
|
40
|
-
* ])),
|
|
41
|
-
* value: 'abc123...', // Hash of initial tree
|
|
42
|
-
* };
|
|
43
|
-
* ```
|
|
25
|
+
* - `refs`: Per-dataset refs mapping refPath to DatasetRef (replaces old root tree hash)
|
|
44
26
|
*/
|
|
45
27
|
export declare const PackageDataType: StructType<{
|
|
46
28
|
/** Structure defining tree shape (what's a group vs dataset) */
|
|
47
|
-
structure: import("@elaraai/east").RecursiveType<
|
|
48
|
-
value:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
29
|
+
readonly structure: import("@elaraai/east").RecursiveType<VariantType<{
|
|
30
|
+
readonly value: StructType<{
|
|
31
|
+
readonly type: import("@elaraai/east").RecursiveType<VariantType<{
|
|
32
|
+
readonly Never: NullType;
|
|
33
|
+
readonly Null: NullType;
|
|
34
|
+
readonly Boolean: NullType;
|
|
35
|
+
readonly Integer: NullType;
|
|
36
|
+
readonly Float: NullType;
|
|
37
|
+
readonly String: NullType;
|
|
38
|
+
readonly DateTime: NullType;
|
|
39
|
+
readonly Blob: NullType;
|
|
40
|
+
readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
|
|
41
|
+
readonly Array: import("@elaraai/east").RecursiveTypeMarker;
|
|
42
|
+
readonly Set: import("@elaraai/east").RecursiveTypeMarker;
|
|
43
|
+
readonly Dict: StructType<{
|
|
44
|
+
readonly key: import("@elaraai/east").RecursiveTypeMarker;
|
|
45
|
+
readonly value: import("@elaraai/east").RecursiveTypeMarker;
|
|
46
|
+
}>;
|
|
47
|
+
readonly Struct: import("@elaraai/east").ArrayType<StructType<{
|
|
48
|
+
readonly name: StringType;
|
|
49
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
50
|
+
}>>;
|
|
51
|
+
readonly Variant: import("@elaraai/east").ArrayType<StructType<{
|
|
52
|
+
readonly name: StringType;
|
|
53
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
54
|
+
}>>;
|
|
55
|
+
readonly Recursive: VariantType<{
|
|
56
|
+
readonly ref: IntegerType;
|
|
57
|
+
readonly wrapper: StructType<{
|
|
58
|
+
readonly id: IntegerType;
|
|
59
|
+
readonly inner: import("@elaraai/east").RecursiveTypeMarker;
|
|
60
|
+
}>;
|
|
61
|
+
}>;
|
|
62
|
+
readonly Function: StructType<{
|
|
63
|
+
readonly inputs: import("@elaraai/east").ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
64
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
65
|
+
}>;
|
|
66
|
+
readonly AsyncFunction: StructType<{
|
|
67
|
+
readonly inputs: import("@elaraai/east").ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
68
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
69
|
+
}>;
|
|
70
|
+
readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
|
|
71
|
+
readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
|
|
71
72
|
}>>;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
|
|
73
|
+
readonly writable: import("@elaraai/east").BooleanType;
|
|
74
|
+
}>;
|
|
75
|
+
readonly struct: DictType<StringType, import("@elaraai/east").RecursiveTypeMarker>;
|
|
76
|
+
}>>;
|
|
77
|
+
/** Per-dataset refs: refPath (e.g. "inputs/greeting") -> DatasetRef */
|
|
78
|
+
readonly refs: DictType<StringType, VariantType<{
|
|
79
|
+
readonly unassigned: NullType;
|
|
80
|
+
readonly null: StructType<{
|
|
81
|
+
readonly versions: DictType<StringType, StringType>;
|
|
82
|
+
}>;
|
|
83
|
+
readonly value: StructType<{
|
|
84
|
+
readonly hash: StringType;
|
|
85
|
+
readonly versions: DictType<StringType, StringType>;
|
|
86
|
+
}>;
|
|
83
87
|
}>>;
|
|
84
|
-
/** Hash of the root tree object containing initial/default values */
|
|
85
|
-
value: StringType;
|
|
86
88
|
}>;
|
|
87
89
|
export type PackageDataType = typeof PackageDataType;
|
|
88
90
|
export type PackageData = ValueTypeOf<typeof PackageDataType>;
|
|
89
91
|
/** @deprecated Use PackageDataType instead */
|
|
90
92
|
export declare const PackageDatasetsType: StructType<{
|
|
91
93
|
/** Structure defining tree shape (what's a group vs dataset) */
|
|
92
|
-
structure: import("@elaraai/east").RecursiveType<
|
|
93
|
-
value:
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
94
|
+
readonly structure: import("@elaraai/east").RecursiveType<VariantType<{
|
|
95
|
+
readonly value: StructType<{
|
|
96
|
+
readonly type: import("@elaraai/east").RecursiveType<VariantType<{
|
|
97
|
+
readonly Never: NullType;
|
|
98
|
+
readonly Null: NullType;
|
|
99
|
+
readonly Boolean: NullType;
|
|
100
|
+
readonly Integer: NullType;
|
|
101
|
+
readonly Float: NullType;
|
|
102
|
+
readonly String: NullType;
|
|
103
|
+
readonly DateTime: NullType;
|
|
104
|
+
readonly Blob: NullType;
|
|
105
|
+
readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
|
|
106
|
+
readonly Array: import("@elaraai/east").RecursiveTypeMarker;
|
|
107
|
+
readonly Set: import("@elaraai/east").RecursiveTypeMarker;
|
|
108
|
+
readonly Dict: StructType<{
|
|
109
|
+
readonly key: import("@elaraai/east").RecursiveTypeMarker;
|
|
110
|
+
readonly value: import("@elaraai/east").RecursiveTypeMarker;
|
|
111
|
+
}>;
|
|
112
|
+
readonly Struct: import("@elaraai/east").ArrayType<StructType<{
|
|
113
|
+
readonly name: StringType;
|
|
114
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
115
|
+
}>>;
|
|
116
|
+
readonly Variant: import("@elaraai/east").ArrayType<StructType<{
|
|
117
|
+
readonly name: StringType;
|
|
118
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
119
|
+
}>>;
|
|
120
|
+
readonly Recursive: VariantType<{
|
|
121
|
+
readonly ref: IntegerType;
|
|
122
|
+
readonly wrapper: StructType<{
|
|
123
|
+
readonly id: IntegerType;
|
|
124
|
+
readonly inner: import("@elaraai/east").RecursiveTypeMarker;
|
|
125
|
+
}>;
|
|
126
|
+
}>;
|
|
127
|
+
readonly Function: StructType<{
|
|
128
|
+
readonly inputs: import("@elaraai/east").ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
129
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
130
|
+
}>;
|
|
131
|
+
readonly AsyncFunction: StructType<{
|
|
132
|
+
readonly inputs: import("@elaraai/east").ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
133
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
134
|
+
}>;
|
|
135
|
+
readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
|
|
136
|
+
readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
|
|
116
137
|
}>>;
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
|
|
138
|
+
readonly writable: import("@elaraai/east").BooleanType;
|
|
139
|
+
}>;
|
|
140
|
+
readonly struct: DictType<StringType, import("@elaraai/east").RecursiveTypeMarker>;
|
|
141
|
+
}>>;
|
|
142
|
+
/** Per-dataset refs: refPath (e.g. "inputs/greeting") -> DatasetRef */
|
|
143
|
+
readonly refs: DictType<StringType, VariantType<{
|
|
144
|
+
readonly unassigned: NullType;
|
|
145
|
+
readonly null: StructType<{
|
|
146
|
+
readonly versions: DictType<StringType, StringType>;
|
|
147
|
+
}>;
|
|
148
|
+
readonly value: StructType<{
|
|
149
|
+
readonly hash: StringType;
|
|
150
|
+
readonly versions: DictType<StringType, StringType>;
|
|
151
|
+
}>;
|
|
128
152
|
}>>;
|
|
129
|
-
/** Hash of the root tree object containing initial/default values */
|
|
130
|
-
value: StringType;
|
|
131
153
|
}>;
|
|
132
154
|
/** @deprecated Use PackageData instead */
|
|
133
155
|
export type PackageDatasetsType = PackageDataType;
|
|
@@ -153,58 +175,155 @@ export type PackageDatasets = PackageData;
|
|
|
153
175
|
* tasks: new Map([['process', 'abc123...']]), // hash of TaskObject
|
|
154
176
|
* data: {
|
|
155
177
|
* structure: variant('struct', new Map([...])),
|
|
156
|
-
* value: 'def456...',
|
|
178
|
+
* refs: new Map([['inputs/sales', variant('value', { hash: 'def456...', versions: new Map() })]]),
|
|
157
179
|
* },
|
|
158
180
|
* };
|
|
159
181
|
* ```
|
|
160
182
|
*/
|
|
161
183
|
export declare const PackageObjectType: StructType<{
|
|
162
184
|
/** Tasks defined in this package: name -> task object hash */
|
|
163
|
-
tasks: DictType<StringType, StringType>;
|
|
185
|
+
readonly tasks: DictType<StringType, StringType>;
|
|
164
186
|
/** Data structure and initial values */
|
|
165
|
-
data: StructType<{
|
|
187
|
+
readonly data: StructType<{
|
|
166
188
|
/** Structure defining tree shape (what's a group vs dataset) */
|
|
167
|
-
structure: import("@elaraai/east").RecursiveType<
|
|
168
|
-
value:
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
189
|
+
readonly structure: import("@elaraai/east").RecursiveType<VariantType<{
|
|
190
|
+
readonly value: StructType<{
|
|
191
|
+
readonly type: import("@elaraai/east").RecursiveType<VariantType<{
|
|
192
|
+
readonly Never: NullType;
|
|
193
|
+
readonly Null: NullType;
|
|
194
|
+
readonly Boolean: NullType;
|
|
195
|
+
readonly Integer: NullType;
|
|
196
|
+
readonly Float: NullType;
|
|
197
|
+
readonly String: NullType;
|
|
198
|
+
readonly DateTime: NullType;
|
|
199
|
+
readonly Blob: NullType;
|
|
200
|
+
readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
|
|
201
|
+
readonly Array: import("@elaraai/east").RecursiveTypeMarker;
|
|
202
|
+
readonly Set: import("@elaraai/east").RecursiveTypeMarker;
|
|
203
|
+
readonly Dict: StructType<{
|
|
204
|
+
readonly key: import("@elaraai/east").RecursiveTypeMarker;
|
|
205
|
+
readonly value: import("@elaraai/east").RecursiveTypeMarker;
|
|
206
|
+
}>;
|
|
207
|
+
readonly Struct: import("@elaraai/east").ArrayType<StructType<{
|
|
208
|
+
readonly name: StringType;
|
|
209
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
210
|
+
}>>;
|
|
211
|
+
readonly Variant: import("@elaraai/east").ArrayType<StructType<{
|
|
212
|
+
readonly name: StringType;
|
|
213
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
214
|
+
}>>;
|
|
215
|
+
readonly Recursive: VariantType<{
|
|
216
|
+
readonly ref: IntegerType;
|
|
217
|
+
readonly wrapper: StructType<{
|
|
218
|
+
readonly id: IntegerType;
|
|
219
|
+
readonly inner: import("@elaraai/east").RecursiveTypeMarker;
|
|
220
|
+
}>;
|
|
221
|
+
}>;
|
|
222
|
+
readonly Function: StructType<{
|
|
223
|
+
readonly inputs: import("@elaraai/east").ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
224
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
225
|
+
}>;
|
|
226
|
+
readonly AsyncFunction: StructType<{
|
|
227
|
+
readonly inputs: import("@elaraai/east").ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
228
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
229
|
+
}>;
|
|
230
|
+
readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
|
|
231
|
+
readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
|
|
187
232
|
}>>;
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
}
|
|
202
|
-
struct: DictType<StringType, import("@elaraai/east").RecursiveTypeMarker>;
|
|
233
|
+
readonly writable: import("@elaraai/east").BooleanType;
|
|
234
|
+
}>;
|
|
235
|
+
readonly struct: DictType<StringType, import("@elaraai/east").RecursiveTypeMarker>;
|
|
236
|
+
}>>;
|
|
237
|
+
/** Per-dataset refs: refPath (e.g. "inputs/greeting") -> DatasetRef */
|
|
238
|
+
readonly refs: DictType<StringType, VariantType<{
|
|
239
|
+
readonly unassigned: NullType;
|
|
240
|
+
readonly null: StructType<{
|
|
241
|
+
readonly versions: DictType<StringType, StringType>;
|
|
242
|
+
}>;
|
|
243
|
+
readonly value: StructType<{
|
|
244
|
+
readonly hash: StringType;
|
|
245
|
+
readonly versions: DictType<StringType, StringType>;
|
|
246
|
+
}>;
|
|
203
247
|
}>>;
|
|
204
|
-
/** Hash of the root tree object containing initial/default values */
|
|
205
|
-
value: StringType;
|
|
206
248
|
}>;
|
|
207
249
|
}>;
|
|
208
250
|
export type PackageObjectType = typeof PackageObjectType;
|
|
209
251
|
export type PackageObject = ValueTypeOf<typeof PackageObjectType>;
|
|
252
|
+
export declare const PackageTransferInitRequestType: StructType<{
|
|
253
|
+
readonly size: IntegerType;
|
|
254
|
+
}>;
|
|
255
|
+
export type PackageTransferInitRequest = ValueTypeOf<typeof PackageTransferInitRequestType>;
|
|
256
|
+
export declare const PackageTransferInitResponseType: StructType<{
|
|
257
|
+
readonly id: StringType;
|
|
258
|
+
readonly uploadUrl: StringType;
|
|
259
|
+
}>;
|
|
260
|
+
export type PackageTransferInitResponse = ValueTypeOf<typeof PackageTransferInitResponseType>;
|
|
261
|
+
export declare const PackageJobResponseType: StructType<{
|
|
262
|
+
readonly id: StringType;
|
|
263
|
+
}>;
|
|
264
|
+
export type PackageJobResponse = ValueTypeOf<typeof PackageJobResponseType>;
|
|
265
|
+
export declare const PackageImportResultType: StructType<{
|
|
266
|
+
readonly name: StringType;
|
|
267
|
+
readonly version: StringType;
|
|
268
|
+
readonly packageHash: StringType;
|
|
269
|
+
readonly objectCount: IntegerType;
|
|
270
|
+
}>;
|
|
271
|
+
export type PackageImportResult = ValueTypeOf<typeof PackageImportResultType>;
|
|
272
|
+
export declare const PackageExportResultType: StructType<{
|
|
273
|
+
readonly downloadUrl: StringType;
|
|
274
|
+
readonly size: IntegerType;
|
|
275
|
+
}>;
|
|
276
|
+
export type PackageExportResult = ValueTypeOf<typeof PackageExportResultType>;
|
|
277
|
+
export declare const PackageImportProgressType: VariantType<{
|
|
278
|
+
readonly pending: NullType;
|
|
279
|
+
readonly downloading: NullType;
|
|
280
|
+
readonly importing: StructType<{
|
|
281
|
+
readonly objectsProcessed: IntegerType;
|
|
282
|
+
}>;
|
|
283
|
+
}>;
|
|
284
|
+
export type PackageImportProgress = ValueTypeOf<typeof PackageImportProgressType>;
|
|
285
|
+
export declare const PackageImportStatusType: VariantType<{
|
|
286
|
+
readonly processing: VariantType<{
|
|
287
|
+
readonly pending: NullType;
|
|
288
|
+
readonly downloading: NullType;
|
|
289
|
+
readonly importing: StructType<{
|
|
290
|
+
readonly objectsProcessed: IntegerType;
|
|
291
|
+
}>;
|
|
292
|
+
}>;
|
|
293
|
+
readonly completed: StructType<{
|
|
294
|
+
readonly name: StringType;
|
|
295
|
+
readonly version: StringType;
|
|
296
|
+
readonly packageHash: StringType;
|
|
297
|
+
readonly objectCount: IntegerType;
|
|
298
|
+
}>;
|
|
299
|
+
readonly failed: StructType<{
|
|
300
|
+
readonly message: StringType;
|
|
301
|
+
}>;
|
|
302
|
+
}>;
|
|
303
|
+
export type PackageImportStatus = ValueTypeOf<typeof PackageImportStatusType>;
|
|
304
|
+
export declare const PackageExportProgressType: VariantType<{
|
|
305
|
+
readonly pending: NullType;
|
|
306
|
+
readonly exporting: StructType<{
|
|
307
|
+
readonly objectsProcessed: IntegerType;
|
|
308
|
+
}>;
|
|
309
|
+
readonly uploading: NullType;
|
|
310
|
+
}>;
|
|
311
|
+
export type PackageExportProgress = ValueTypeOf<typeof PackageExportProgressType>;
|
|
312
|
+
export declare const PackageExportStatusType: VariantType<{
|
|
313
|
+
readonly processing: VariantType<{
|
|
314
|
+
readonly pending: NullType;
|
|
315
|
+
readonly exporting: StructType<{
|
|
316
|
+
readonly objectsProcessed: IntegerType;
|
|
317
|
+
}>;
|
|
318
|
+
readonly uploading: NullType;
|
|
319
|
+
}>;
|
|
320
|
+
readonly completed: StructType<{
|
|
321
|
+
readonly downloadUrl: StringType;
|
|
322
|
+
readonly size: IntegerType;
|
|
323
|
+
}>;
|
|
324
|
+
readonly failed: StructType<{
|
|
325
|
+
readonly message: StringType;
|
|
326
|
+
}>;
|
|
327
|
+
}>;
|
|
328
|
+
export type PackageExportStatus = ValueTypeOf<typeof PackageExportStatusType>;
|
|
210
329
|
//# sourceMappingURL=package.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../src/package.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../src/package.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAIlH;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe;IAC1B,gEAAgE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEhE,uEAAuE;;;;;;;;;;;EAEvE,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC;AAErD,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC,OAAO,eAAe,CAAC,CAAC;AAG9D,8CAA8C;AAC9C,eAAO,MAAM,mBAAmB;IAX9B,gEAAgE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEhE,uEAAuE;;;;;;;;;;;EASvB,CAAC;AACnD,0CAA0C;AAC1C,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAAC;AAClD,0CAA0C;AAC1C,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,iBAAiB;IAC5B,8DAA8D;;IAE9D,wCAAwC;;QA7CxC,gEAAgE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAEhE,uEAAuE;;;;;;;;;;;;EA6CvE,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,OA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
|
* - **Task**: A computation with input/output paths (stored separately)
|
|
15
15
|
*/
|
|
16
|
-
import { StructType, StringType, DictType } from '@elaraai/east';
|
|
16
|
+
import { StructType, StringType, IntegerType, VariantType, NullType, DictType } from '@elaraai/east';
|
|
17
|
+
import { DatasetRefType } from './dataset-ref.js';
|
|
17
18
|
import { StructureType } from './structure.js';
|
|
18
19
|
/**
|
|
19
20
|
* Data configuration in a package.
|
|
@@ -23,31 +24,13 @@ import { StructureType } from './structure.js';
|
|
|
23
24
|
*
|
|
24
25
|
* @remarks
|
|
25
26
|
* - `structure`: Defines which paths are datasets vs trees (recursive)
|
|
26
|
-
* - `
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```ts
|
|
30
|
-
* const data: PackageData = {
|
|
31
|
-
* structure: variant('struct', new Map([
|
|
32
|
-
* ['inputs', variant('struct', new Map([
|
|
33
|
-
* ['sales', variant('value', variant('Array', variant('Integer', null)))],
|
|
34
|
-
* ]))],
|
|
35
|
-
* ['tasks', variant('struct', new Map([
|
|
36
|
-
* ['process', variant('struct', new Map([
|
|
37
|
-
* ['function_ir', variant('value', ...)],
|
|
38
|
-
* ['output', variant('value', variant('Integer', null))],
|
|
39
|
-
* ]))],
|
|
40
|
-
* ]))],
|
|
41
|
-
* ])),
|
|
42
|
-
* value: 'abc123...', // Hash of initial tree
|
|
43
|
-
* };
|
|
44
|
-
* ```
|
|
27
|
+
* - `refs`: Per-dataset refs mapping refPath to DatasetRef (replaces old root tree hash)
|
|
45
28
|
*/
|
|
46
29
|
export const PackageDataType = StructType({
|
|
47
30
|
/** Structure defining tree shape (what's a group vs dataset) */
|
|
48
31
|
structure: StructureType,
|
|
49
|
-
/**
|
|
50
|
-
|
|
32
|
+
/** Per-dataset refs: refPath (e.g. "inputs/greeting") -> DatasetRef */
|
|
33
|
+
refs: DictType(StringType, DatasetRefType),
|
|
51
34
|
});
|
|
52
35
|
// Backwards compatibility alias
|
|
53
36
|
/** @deprecated Use PackageDataType instead */
|
|
@@ -72,7 +55,7 @@ export const PackageDatasetsType = PackageDataType;
|
|
|
72
55
|
* tasks: new Map([['process', 'abc123...']]), // hash of TaskObject
|
|
73
56
|
* data: {
|
|
74
57
|
* structure: variant('struct', new Map([...])),
|
|
75
|
-
* value: 'def456...',
|
|
58
|
+
* refs: new Map([['inputs/sales', variant('value', { hash: 'def456...', versions: new Map() })]]),
|
|
76
59
|
* },
|
|
77
60
|
* };
|
|
78
61
|
* ```
|
|
@@ -83,4 +66,51 @@ export const PackageObjectType = StructType({
|
|
|
83
66
|
/** Data structure and initial values */
|
|
84
67
|
data: PackageDataType,
|
|
85
68
|
});
|
|
69
|
+
// =============================================================================
|
|
70
|
+
// Package Transfer Types
|
|
71
|
+
// =============================================================================
|
|
72
|
+
export const PackageTransferInitRequestType = StructType({
|
|
73
|
+
size: IntegerType,
|
|
74
|
+
});
|
|
75
|
+
export const PackageTransferInitResponseType = StructType({
|
|
76
|
+
id: StringType,
|
|
77
|
+
uploadUrl: StringType,
|
|
78
|
+
});
|
|
79
|
+
export const PackageJobResponseType = StructType({
|
|
80
|
+
id: StringType,
|
|
81
|
+
});
|
|
82
|
+
export const PackageImportResultType = StructType({
|
|
83
|
+
name: StringType,
|
|
84
|
+
version: StringType,
|
|
85
|
+
packageHash: StringType,
|
|
86
|
+
objectCount: IntegerType,
|
|
87
|
+
});
|
|
88
|
+
export const PackageExportResultType = StructType({
|
|
89
|
+
downloadUrl: StringType,
|
|
90
|
+
size: IntegerType,
|
|
91
|
+
});
|
|
92
|
+
export const PackageImportProgressType = VariantType({
|
|
93
|
+
pending: NullType,
|
|
94
|
+
downloading: NullType,
|
|
95
|
+
importing: StructType({ objectsProcessed: IntegerType }),
|
|
96
|
+
});
|
|
97
|
+
export const PackageImportStatusType = VariantType({
|
|
98
|
+
processing: PackageImportProgressType,
|
|
99
|
+
completed: PackageImportResultType,
|
|
100
|
+
failed: StructType({
|
|
101
|
+
message: StringType,
|
|
102
|
+
}),
|
|
103
|
+
});
|
|
104
|
+
export const PackageExportProgressType = VariantType({
|
|
105
|
+
pending: NullType,
|
|
106
|
+
exporting: StructType({ objectsProcessed: IntegerType }),
|
|
107
|
+
uploading: NullType,
|
|
108
|
+
});
|
|
109
|
+
export const PackageExportStatusType = VariantType({
|
|
110
|
+
processing: PackageExportProgressType,
|
|
111
|
+
completed: PackageExportResultType,
|
|
112
|
+
failed: StructType({
|
|
113
|
+
message: StringType,
|
|
114
|
+
}),
|
|
115
|
+
});
|
|
86
116
|
//# sourceMappingURL=package.js.map
|
package/dist/src/package.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.js","sourceRoot":"","sources":["../../src/package.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAe,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"package.js","sourceRoot":"","sources":["../../src/package.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAe,MAAM,eAAe,CAAC;AAClH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CAAC;IACxC,gEAAgE;IAChE,SAAS,EAAE,aAAa;IACxB,uEAAuE;IACvE,IAAI,EAAE,QAAQ,CAAC,UAAU,EAAE,cAAc,CAAC;CAC3C,CAAC,CAAC;AAKH,gCAAgC;AAChC,8CAA8C;AAC9C,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAC;AAMnD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAA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