@elaraai/e3-core 0.0.2-beta.36 → 0.0.2-beta.37
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/dist/src/dataflow/api-compat.d.ts.map +1 -1
- package/dist/src/dataflow/api-compat.js +6 -1
- package/dist/src/dataflow/api-compat.js.map +1 -1
- package/dist/src/dataflow/orchestrator/LocalOrchestrator.d.ts +22 -4
- package/dist/src/dataflow/orchestrator/LocalOrchestrator.d.ts.map +1 -1
- package/dist/src/dataflow/orchestrator/LocalOrchestrator.js +353 -79
- package/dist/src/dataflow/orchestrator/LocalOrchestrator.js.map +1 -1
- package/dist/src/dataflow/orchestrator/interfaces.d.ts +6 -0
- package/dist/src/dataflow/orchestrator/interfaces.d.ts.map +1 -1
- package/dist/src/dataflow/orchestrator/interfaces.js +1 -0
- package/dist/src/dataflow/orchestrator/interfaces.js.map +1 -1
- package/dist/src/dataflow/steps.d.ts +74 -28
- package/dist/src/dataflow/steps.d.ts.map +1 -1
- package/dist/src/dataflow/steps.js +221 -42
- package/dist/src/dataflow/steps.js.map +1 -1
- package/dist/src/dataflow/types.d.ts +13 -2
- package/dist/src/dataflow/types.d.ts.map +1 -1
- package/dist/src/dataflow.d.ts +37 -95
- package/dist/src/dataflow.d.ts.map +1 -1
- package/dist/src/dataflow.js +121 -631
- 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/execution/MockTaskRunner.d.ts +1 -1
- package/dist/src/execution/MockTaskRunner.d.ts.map +1 -1
- package/dist/src/execution/MockTaskRunner.js +1 -2
- package/dist/src/execution/MockTaskRunner.js.map +1 -1
- package/dist/src/index.d.ts +5 -4
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +6 -4
- package/dist/src/index.js.map +1 -1
- package/dist/src/packages.d.ts.map +1 -1
- package/dist/src/packages.js +20 -7
- package/dist/src/packages.js.map +1 -1
- package/dist/src/storage/in-memory/InMemoryStorage.d.ts +26 -4
- package/dist/src/storage/in-memory/InMemoryStorage.d.ts.map +1 -1
- package/dist/src/storage/in-memory/InMemoryStorage.js +104 -21
- package/dist/src/storage/in-memory/InMemoryStorage.js.map +1 -1
- package/dist/src/storage/index.d.ts +2 -2
- package/dist/src/storage/index.d.ts.map +1 -1
- package/dist/src/storage/index.js +1 -1
- package/dist/src/storage/index.js.map +1 -1
- package/dist/src/storage/interfaces.d.ts +52 -1
- package/dist/src/storage/interfaces.d.ts.map +1 -1
- package/dist/src/storage/local/LocalBackend.d.ts +3 -1
- package/dist/src/storage/local/LocalBackend.d.ts.map +1 -1
- package/dist/src/storage/local/LocalBackend.js +5 -1
- package/dist/src/storage/local/LocalBackend.js.map +1 -1
- 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 +6 -0
- package/dist/src/storage/local/LocalLockService.d.ts.map +1 -1
- package/dist/src/storage/local/LocalLockService.js +17 -4
- package/dist/src/storage/local/LocalLockService.js.map +1 -1
- package/dist/src/storage/local/LocalRepoStore.d.ts +4 -2
- package/dist/src/storage/local/LocalRepoStore.d.ts.map +1 -1
- package/dist/src/storage/local/LocalRepoStore.js +14 -2
- package/dist/src/storage/local/LocalRepoStore.js.map +1 -1
- package/dist/src/storage/local/gc.d.ts.map +1 -1
- package/dist/src/storage/local/gc.js +8 -1
- package/dist/src/storage/local/gc.js.map +1 -1
- package/dist/src/storage/local/index.d.ts +1 -0
- package/dist/src/storage/local/index.d.ts.map +1 -1
- package/dist/src/storage/local/index.js +1 -0
- package/dist/src/storage/local/index.js.map +1 -1
- package/dist/src/trees.d.ts +35 -43
- package/dist/src/trees.d.ts.map +1 -1
- package/dist/src/trees.js +228 -449
- package/dist/src/trees.js.map +1 -1
- package/dist/src/workspaces.d.ts +6 -27
- package/dist/src/workspaces.d.ts.map +1 -1
- package/dist/src/workspaces.js +42 -55
- package/dist/src/workspaces.js.map +1 -1
- package/package.json +1 -1
package/dist/src/trees.d.ts
CHANGED
|
@@ -12,11 +12,14 @@
|
|
|
12
12
|
* tree node. This enables proper encoding/decoding with the correct StructType
|
|
13
13
|
* and supports future tree types (array, variant, etc.).
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
15
|
+
* Workspace operations use per-dataset ref files (DatasetRef) instead of tree
|
|
16
|
+
* traversal. This enables concurrent writes without serialization.
|
|
17
|
+
*
|
|
18
|
+
* Low-level tree read/write operations remain for computing root hashes and
|
|
19
|
+
* for package operations.
|
|
17
20
|
*/
|
|
18
21
|
import { type EastType, type EastTypeValue } from '@elaraai/east';
|
|
19
|
-
import { type DataRef, type Structure, type TreePath } from '@elaraai/e3-types';
|
|
22
|
+
import { type DataRef, type Structure, type TreePath, type VersionVector } from '@elaraai/e3-types';
|
|
20
23
|
import type { StorageBackend, LockHandle } from './storage/interfaces.js';
|
|
21
24
|
/**
|
|
22
25
|
* A tree object: mapping of field names to data references.
|
|
@@ -73,30 +76,6 @@ export declare function datasetRead(storage: StorageBackend, repo: string, hash:
|
|
|
73
76
|
* @returns Hash of the written dataset value
|
|
74
77
|
*/
|
|
75
78
|
export declare function datasetWrite(storage: StorageBackend, repo: string, value: unknown, type: EastType | EastTypeValue): Promise<string>;
|
|
76
|
-
/**
|
|
77
|
-
* List field names at a tree path within a package's data tree.
|
|
78
|
-
*
|
|
79
|
-
* @param storage - Storage backend
|
|
80
|
-
* @param repo - Repository identifier
|
|
81
|
-
* @param name - Package name
|
|
82
|
-
* @param version - Package version
|
|
83
|
-
* @param path - Path to the tree node
|
|
84
|
-
* @returns Array of field names at the path
|
|
85
|
-
* @throws If package not found, path invalid, or path points to a dataset
|
|
86
|
-
*/
|
|
87
|
-
export declare function packageListTree(storage: StorageBackend, repo: string, name: string, version: string, path: TreePath): Promise<string[]>;
|
|
88
|
-
/**
|
|
89
|
-
* Read and decode a dataset value at a path within a package's data tree.
|
|
90
|
-
*
|
|
91
|
-
* @param storage - Storage backend
|
|
92
|
-
* @param repo - Repository identifier
|
|
93
|
-
* @param name - Package name
|
|
94
|
-
* @param version - Package version
|
|
95
|
-
* @param path - Path to the dataset
|
|
96
|
-
* @returns The decoded dataset value
|
|
97
|
-
* @throws If package not found, path invalid, or path points to a tree
|
|
98
|
-
*/
|
|
99
|
-
export declare function packageGetDataset(storage: StorageBackend, repo: string, name: string, version: string, path: TreePath): Promise<unknown>;
|
|
100
79
|
/**
|
|
101
80
|
* Options for setting a workspace dataset.
|
|
102
81
|
*/
|
|
@@ -111,11 +90,8 @@ export interface WorkspaceSetDatasetOptions {
|
|
|
111
90
|
/**
|
|
112
91
|
* Update a dataset at a path within a workspace.
|
|
113
92
|
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
* Acquires an exclusive lock on the workspace for the duration of the write
|
|
118
|
-
* to prevent concurrent modifications.
|
|
93
|
+
* Writes the value to the object store and updates the per-dataset ref file.
|
|
94
|
+
* Uses shared structure lock to allow concurrent writes.
|
|
119
95
|
*
|
|
120
96
|
* @param storage - Storage backend
|
|
121
97
|
* @param repo - Repository identifier
|
|
@@ -131,10 +107,12 @@ export declare function workspaceSetDataset(storage: StorageBackend, repo: strin
|
|
|
131
107
|
/**
|
|
132
108
|
* List field names at a tree path within a workspace's data tree.
|
|
133
109
|
*
|
|
110
|
+
* Uses the structure to determine available fields (no tree traversal needed).
|
|
111
|
+
*
|
|
134
112
|
* @param storage - Storage backend
|
|
135
113
|
* @param repo - Repository identifier
|
|
136
114
|
* @param ws - Workspace name
|
|
137
|
-
* @param
|
|
115
|
+
* @param treePath - Path to the tree node
|
|
138
116
|
* @returns Array of field names at the path
|
|
139
117
|
* @throws If workspace not deployed, path invalid, or path points to a dataset
|
|
140
118
|
*/
|
|
@@ -142,10 +120,12 @@ export declare function workspaceListTree(storage: StorageBackend, repo: string,
|
|
|
142
120
|
/**
|
|
143
121
|
* Read and decode a dataset value at a path within a workspace's data tree.
|
|
144
122
|
*
|
|
123
|
+
* Reads the per-dataset ref file to get the value hash, then decodes the value.
|
|
124
|
+
*
|
|
145
125
|
* @param storage - Storage backend
|
|
146
126
|
* @param repo - Repository identifier
|
|
147
127
|
* @param ws - Workspace name
|
|
148
|
-
* @param
|
|
128
|
+
* @param treePath - Path to the dataset
|
|
149
129
|
* @returns The decoded dataset value
|
|
150
130
|
* @throws If workspace not deployed, path invalid, or path points to a tree
|
|
151
131
|
*/
|
|
@@ -153,8 +133,7 @@ export declare function workspaceGetDataset(storage: StorageBackend, repo: strin
|
|
|
153
133
|
/**
|
|
154
134
|
* Get the hash of a dataset at a path within a workspace's data tree.
|
|
155
135
|
*
|
|
156
|
-
*
|
|
157
|
-
* hash reference. Useful for dataflow execution which operates on hashes.
|
|
136
|
+
* Reads the per-dataset ref file directly. No tree traversal needed.
|
|
158
137
|
*
|
|
159
138
|
* @param storage - Storage backend
|
|
160
139
|
* @param repo - Repository identifier
|
|
@@ -170,11 +149,10 @@ export declare function workspaceGetDatasetHash(storage: StorageBackend, repo: s
|
|
|
170
149
|
/**
|
|
171
150
|
* Set a dataset at a path within a workspace using a pre-computed hash.
|
|
172
151
|
*
|
|
173
|
-
*
|
|
174
|
-
* directly. Useful for dataflow execution which already has the output hash.
|
|
152
|
+
* Writes a DatasetRef file directly. No tree path-copy needed.
|
|
175
153
|
*
|
|
176
154
|
* IMPORTANT: This function does NOT acquire a workspace lock. The caller must
|
|
177
|
-
* hold
|
|
155
|
+
* hold a lock on the workspace before calling this function. This
|
|
178
156
|
* is typically used by dataflowExecute which holds the lock for the entire
|
|
179
157
|
* execution.
|
|
180
158
|
*
|
|
@@ -183,10 +161,9 @@ export declare function workspaceGetDatasetHash(storage: StorageBackend, repo: s
|
|
|
183
161
|
* @param ws - Workspace name
|
|
184
162
|
* @param treePath - Path to the dataset
|
|
185
163
|
* @param valueHash - Hash of the dataset value already in the object store
|
|
186
|
-
* @returns The new root hash after updating the tree
|
|
187
164
|
* @throws If workspace not deployed, path invalid, or path points to a tree
|
|
188
165
|
*/
|
|
189
|
-
export declare function workspaceSetDatasetByHash(storage: StorageBackend, repo: string, ws: string, treePath: TreePath, valueHash: string): Promise<
|
|
166
|
+
export declare function workspaceSetDatasetByHash(storage: StorageBackend, repo: string, ws: string, treePath: TreePath, valueHash: string, versions: VersionVector): Promise<void>;
|
|
190
167
|
/**
|
|
191
168
|
* Result of querying a single dataset's status.
|
|
192
169
|
*/
|
|
@@ -259,8 +236,8 @@ export interface WorkspaceGetTreeOptions {
|
|
|
259
236
|
/**
|
|
260
237
|
* Get the full tree structure at a path within a workspace.
|
|
261
238
|
*
|
|
262
|
-
* Recursively walks the
|
|
263
|
-
* suitable for display. Tasks are shown as leaves with their output type.
|
|
239
|
+
* Recursively walks the structure and ref files to build a hierarchical
|
|
240
|
+
* structure suitable for display. Tasks are shown as leaves with their output type.
|
|
264
241
|
*
|
|
265
242
|
* @param storage - Storage backend
|
|
266
243
|
* @param repo - Repository identifier
|
|
@@ -271,4 +248,19 @@ export interface WorkspaceGetTreeOptions {
|
|
|
271
248
|
* @throws If workspace not deployed or path invalid
|
|
272
249
|
*/
|
|
273
250
|
export declare function workspaceGetTree(storage: StorageBackend, repo: string, ws: string, treePath: TreePath, options?: WorkspaceGetTreeOptions): Promise<TreeNode[]>;
|
|
251
|
+
/**
|
|
252
|
+
* List field names at a tree path within a package's data tree.
|
|
253
|
+
*
|
|
254
|
+
* Note: In the new format, packages store per-dataset refs in data/ dir
|
|
255
|
+
* rather than tree objects. This function uses the structure directly.
|
|
256
|
+
*
|
|
257
|
+
* @param storage - Storage backend
|
|
258
|
+
* @param repo - Repository identifier
|
|
259
|
+
* @param name - Package name
|
|
260
|
+
* @param version - Package version
|
|
261
|
+
* @param path - Path to the tree node
|
|
262
|
+
* @returns Array of field names at the path
|
|
263
|
+
* @throws If package not found, path invalid, or path points to a dataset
|
|
264
|
+
*/
|
|
265
|
+
export declare function packageListTree(storage: StorageBackend, repo: string, name: string, version: string, path: TreePath): Promise<string[]>;
|
|
274
266
|
//# sourceMappingURL=trees.d.ts.map
|
package/dist/src/trees.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trees.d.ts","sourceRoot":"","sources":["../../src/trees.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH
|
|
1
|
+
{"version":3,"file":"trees.d.ts","sourceRoot":"","sources":["../../src/trees.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAML,KAAK,QAAQ,EACb,KAAK,aAAa,EACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAsD,KAAK,OAAO,EAAmB,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAOzK,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE1E;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAyBjD;;;;;;;;;GASG;AACH,wBAAsB,QAAQ,CAC5B,OAAO,EAAE,cAAc,EACvB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,SAAS,GACnB,OAAO,CAAC,UAAU,CAAC,CAKrB;AAED;;;;;;;;;GASG;AACH,wBAAsB,SAAS,CAC7B,OAAO,EAAE,cAAc,EACvB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,UAAU,EAClB,SAAS,EAAE,SAAS,GACnB,OAAO,CAAC,MAAM,CAAC,CAKjB;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,WAAW,CAC/B,OAA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