@elaraai/e3-api-server 0.0.1-alpha.2
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/LICENSE.md +50 -0
- package/README.md +156 -0
- package/dist/src/beast2.d.ts +20 -0
- package/dist/src/beast2.d.ts.map +1 -0
- package/dist/src/beast2.js +47 -0
- package/dist/src/beast2.js.map +1 -0
- package/dist/src/cli.d.ts +7 -0
- package/dist/src/cli.d.ts.map +1 -0
- package/dist/src/cli.js +34 -0
- package/dist/src/cli.js.map +1 -0
- package/dist/src/errors.d.ts +10 -0
- package/dist/src/errors.d.ts.map +1 -0
- package/dist/src/errors.js +73 -0
- package/dist/src/errors.js.map +1 -0
- package/dist/src/index.d.ts +13 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +13 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/routes/datasets.d.ts +7 -0
- package/dist/src/routes/datasets.d.ts.map +1 -0
- package/dist/src/routes/datasets.js +98 -0
- package/dist/src/routes/datasets.js.map +1 -0
- package/dist/src/routes/executions.d.ts +7 -0
- package/dist/src/routes/executions.d.ts.map +1 -0
- package/dist/src/routes/executions.js +303 -0
- package/dist/src/routes/executions.js.map +1 -0
- package/dist/src/routes/packages.d.ts +7 -0
- package/dist/src/routes/packages.d.ts.map +1 -0
- package/dist/src/routes/packages.js +124 -0
- package/dist/src/routes/packages.js.map +1 -0
- package/dist/src/routes/repository.d.ts +7 -0
- package/dist/src/routes/repository.d.ts.map +1 -0
- package/dist/src/routes/repository.js +67 -0
- package/dist/src/routes/repository.js.map +1 -0
- package/dist/src/routes/tasks.d.ts +7 -0
- package/dist/src/routes/tasks.d.ts.map +1 -0
- package/dist/src/routes/tasks.js +58 -0
- package/dist/src/routes/tasks.js.map +1 -0
- package/dist/src/routes/workspaces.d.ts +7 -0
- package/dist/src/routes/workspaces.d.ts.map +1 -0
- package/dist/src/routes/workspaces.js +133 -0
- package/dist/src/routes/workspaces.js.map +1 -0
- package/dist/src/server.d.ts +37 -0
- package/dist/src/server.d.ts.map +1 -0
- package/dist/src/server.js +83 -0
- package/dist/src/server.js.map +1 -0
- package/dist/src/types.d.ts +1310 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +471 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/utils.d.ts +25 -0
- package/dist/src/utils.d.ts.map +1 -0
- package/dist/src/utils.js +27 -0
- package/dist/src/utils.js.map +1 -0
- package/package.json +58 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AAEH,OAAO,EACL,WAAW,EACX,UAAU,EACV,SAAS,EACT,UAAU,EACV,UAAU,EACV,WAAW,EACX,SAAS,EACT,WAAW,EACX,QAAQ,EACR,KAAK,QAAQ,EACb,KAAK,WAAW,EACjB,MAAM,eAAe,CAAC;AAWvB,eAAO,MAAM,0BAA0B;;EAAwC,CAAC;AAChF,eAAO,MAAM,6BAA6B;;EAAwC,CAAC;AACnF,eAAO,MAAM,wBAAwB;;EAAwC,CAAC;AAC9E,eAAO,MAAM,cAAc;;;;;EAKzB,CAAC;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;EAGnC,CAAC;AACH,eAAO,MAAM,wBAAwB;;;EAGnC,CAAC;AACH,eAAO,MAAM,sBAAsB;;;EAA+D,CAAC;AACnG,eAAO,MAAM,uBAAuB;;EAAqC,CAAC;AAC1E,eAAO,MAAM,wBAAwB;;;EAA0D,CAAC;AAChG,eAAO,MAAM,qBAAqB;;EAAmC,CAAC;AACtE,eAAO,MAAM,uBAAuB;;EAAmC,CAAC;AACxE,eAAO,MAAM,iBAAiB;;EAAsC,CAAC;AACrE,eAAO,MAAM,yBAAyB;;EAAmC,CAAC;AAC1E,eAAO,MAAM,iBAAiB;;EAAsC,CAAC;AAErE,eAAO,MAAM,SAAS;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA4L7D,qCAAqC;;YAErC,2CAA2C;;;;YAM3C,wBAAwB;;YAExB,wCAAwC;;;;YAMxC,oBAAoB;;YAEpB,wCAAwC;;;;YAMxC,4BAA4B;;YAE5B,2CAA2C;;;;;;;;;;;QA1B3C,qCAAqC;;QAErC,2CAA2C;;;;QAM3C,wBAAwB;;QAExB,wCAAwC;;;;QAMxC,oBAAoB;;QAEpB,wCAAwC;;;;QAMxC,4BAA4B;;QAE5B,2CAA2C;;;;;;;;;;;;;;;;;;;;;;;;;;gBA1B3C,qCAAqC;;gBAErC,2CAA2C;;;;gBAM3C,wBAAwB;;gBAExB,wCAAwC;;;;gBAMxC,oBAAoB;;gBAEpB,wCAAwC;;;;gBAMxC,4BAA4B;;gBAE5B,2CAA2C;;;;;;;;;QAiE3C,4BAA4B;;;;;;;QAO5B,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAlGzB,qCAAqC;;oBAErC,2CAA2C;;;;oBAM3C,wBAAwB;;oBAExB,wCAAwC;;;;oBAMxC,oBAAoB;;oBAEpB,wCAAwC;;;;oBAMxC,4BAA4B;;oBAE5B,2CAA2C;;;;;;;;;YAiE3C,4BAA4B;;;;;;;YAO5B,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4MjB,CAAC"}
|
|
@@ -0,0 +1,471 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Licensed under BSL 1.1. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* API types for e3-api-server and e3-api-client.
|
|
7
|
+
*
|
|
8
|
+
* All types are East types for BEAST2 serialization.
|
|
9
|
+
*/
|
|
10
|
+
import { VariantType, StructType, ArrayType, OptionType, StringType, IntegerType, FloatType, BooleanType, NullType, } from '@elaraai/east';
|
|
11
|
+
import { StructureType, TreePathType, } from '@elaraai/e3-types';
|
|
12
|
+
// =============================================================================
|
|
13
|
+
// Error Types
|
|
14
|
+
// =============================================================================
|
|
15
|
+
export const WorkspaceNotFoundErrorType = StructType({ workspace: StringType });
|
|
16
|
+
export const WorkspaceNotDeployedErrorType = StructType({ workspace: StringType });
|
|
17
|
+
export const WorkspaceExistsErrorType = StructType({ workspace: StringType });
|
|
18
|
+
export const LockHolderType = StructType({
|
|
19
|
+
pid: IntegerType,
|
|
20
|
+
acquiredAt: StringType,
|
|
21
|
+
bootId: OptionType(StringType),
|
|
22
|
+
command: OptionType(StringType),
|
|
23
|
+
});
|
|
24
|
+
export const WorkspaceLockedErrorType = StructType({
|
|
25
|
+
workspace: StringType,
|
|
26
|
+
holder: VariantType({ unknown: NullType, known: LockHolderType }),
|
|
27
|
+
});
|
|
28
|
+
export const PackageNotFoundErrorType = StructType({
|
|
29
|
+
packageName: StringType,
|
|
30
|
+
version: OptionType(StringType),
|
|
31
|
+
});
|
|
32
|
+
export const PackageExistsErrorType = StructType({ packageName: StringType, version: StringType });
|
|
33
|
+
export const PackageInvalidErrorType = StructType({ reason: StringType });
|
|
34
|
+
export const DatasetNotFoundErrorType = StructType({ workspace: StringType, path: StringType });
|
|
35
|
+
export const TaskNotFoundErrorType = StructType({ task: StringType });
|
|
36
|
+
export const ObjectNotFoundErrorType = StructType({ hash: StringType });
|
|
37
|
+
export const DataflowErrorType = StructType({ message: StringType });
|
|
38
|
+
export const PermissionDeniedErrorType = StructType({ path: StringType });
|
|
39
|
+
export const InternalErrorType = StructType({ message: StringType });
|
|
40
|
+
export const ErrorType = VariantType({
|
|
41
|
+
workspace_not_found: WorkspaceNotFoundErrorType,
|
|
42
|
+
workspace_not_deployed: WorkspaceNotDeployedErrorType,
|
|
43
|
+
workspace_exists: WorkspaceExistsErrorType,
|
|
44
|
+
workspace_locked: WorkspaceLockedErrorType,
|
|
45
|
+
package_not_found: PackageNotFoundErrorType,
|
|
46
|
+
package_exists: PackageExistsErrorType,
|
|
47
|
+
package_invalid: PackageInvalidErrorType,
|
|
48
|
+
dataset_not_found: DatasetNotFoundErrorType,
|
|
49
|
+
task_not_found: TaskNotFoundErrorType,
|
|
50
|
+
object_not_found: ObjectNotFoundErrorType,
|
|
51
|
+
dataflow_error: DataflowErrorType,
|
|
52
|
+
dataflow_aborted: NullType,
|
|
53
|
+
permission_denied: PermissionDeniedErrorType,
|
|
54
|
+
internal: InternalErrorType,
|
|
55
|
+
});
|
|
56
|
+
// =============================================================================
|
|
57
|
+
// Response Wrapper
|
|
58
|
+
// =============================================================================
|
|
59
|
+
export const ResponseType = (successType) => VariantType({
|
|
60
|
+
success: successType,
|
|
61
|
+
error: ErrorType,
|
|
62
|
+
});
|
|
63
|
+
// =============================================================================
|
|
64
|
+
// Repository Types
|
|
65
|
+
// =============================================================================
|
|
66
|
+
/**
|
|
67
|
+
* Repository status information.
|
|
68
|
+
*
|
|
69
|
+
* @property path - Absolute path to the .e3 repository directory
|
|
70
|
+
* @property objectCount - Number of content-addressed objects stored
|
|
71
|
+
* @property packageCount - Number of imported packages
|
|
72
|
+
* @property workspaceCount - Number of workspaces
|
|
73
|
+
*/
|
|
74
|
+
export const RepositoryStatusType = StructType({
|
|
75
|
+
path: StringType,
|
|
76
|
+
objectCount: IntegerType,
|
|
77
|
+
packageCount: IntegerType,
|
|
78
|
+
workspaceCount: IntegerType,
|
|
79
|
+
});
|
|
80
|
+
/**
|
|
81
|
+
* Garbage collection request options.
|
|
82
|
+
*
|
|
83
|
+
* @property dryRun - If true, report what would be deleted without deleting
|
|
84
|
+
* @property minAge - Minimum age in milliseconds for objects to be considered for deletion
|
|
85
|
+
*/
|
|
86
|
+
export const GcRequestType = StructType({
|
|
87
|
+
dryRun: BooleanType,
|
|
88
|
+
minAge: OptionType(IntegerType),
|
|
89
|
+
});
|
|
90
|
+
/**
|
|
91
|
+
* Garbage collection result.
|
|
92
|
+
*
|
|
93
|
+
* @property deletedObjects - Number of unreferenced objects deleted
|
|
94
|
+
* @property deletedPartials - Number of incomplete uploads deleted
|
|
95
|
+
* @property retainedObjects - Number of objects still referenced
|
|
96
|
+
* @property skippedYoung - Number of objects skipped due to minAge
|
|
97
|
+
* @property bytesFreed - Total bytes freed by deletion
|
|
98
|
+
*/
|
|
99
|
+
export const GcResultType = StructType({
|
|
100
|
+
deletedObjects: IntegerType,
|
|
101
|
+
deletedPartials: IntegerType,
|
|
102
|
+
retainedObjects: IntegerType,
|
|
103
|
+
skippedYoung: IntegerType,
|
|
104
|
+
bytesFreed: IntegerType,
|
|
105
|
+
});
|
|
106
|
+
// =============================================================================
|
|
107
|
+
// Package Types
|
|
108
|
+
// =============================================================================
|
|
109
|
+
/**
|
|
110
|
+
* Package list item (summary info).
|
|
111
|
+
*
|
|
112
|
+
* @property name - Package name
|
|
113
|
+
* @property version - Semantic version string
|
|
114
|
+
*/
|
|
115
|
+
export const PackageListItemType = StructType({
|
|
116
|
+
name: StringType,
|
|
117
|
+
version: StringType,
|
|
118
|
+
});
|
|
119
|
+
/**
|
|
120
|
+
* Result of importing a package.
|
|
121
|
+
*
|
|
122
|
+
* @property name - Imported package name
|
|
123
|
+
* @property version - Imported package version
|
|
124
|
+
* @property packageHash - SHA256 hash of the package content
|
|
125
|
+
* @property objectCount - Number of objects added to the repository
|
|
126
|
+
*/
|
|
127
|
+
export const PackageImportResultType = StructType({
|
|
128
|
+
name: StringType,
|
|
129
|
+
version: StringType,
|
|
130
|
+
packageHash: StringType,
|
|
131
|
+
objectCount: IntegerType,
|
|
132
|
+
});
|
|
133
|
+
/**
|
|
134
|
+
* Basic package info.
|
|
135
|
+
*
|
|
136
|
+
* @property name - Package name
|
|
137
|
+
* @property version - Semantic version string
|
|
138
|
+
* @property hash - SHA256 content hash
|
|
139
|
+
*/
|
|
140
|
+
export const PackageInfoType = StructType({
|
|
141
|
+
name: StringType,
|
|
142
|
+
version: StringType,
|
|
143
|
+
hash: StringType,
|
|
144
|
+
});
|
|
145
|
+
/**
|
|
146
|
+
* Detailed package information including structure.
|
|
147
|
+
*
|
|
148
|
+
* @property name - Package name
|
|
149
|
+
* @property version - Semantic version string
|
|
150
|
+
* @property hash - SHA256 content hash
|
|
151
|
+
* @property tasks - List of task names defined in the package
|
|
152
|
+
* @property dataStructure - East structure type describing the package's data schema
|
|
153
|
+
*/
|
|
154
|
+
export const PackageDetailsType = StructType({
|
|
155
|
+
name: StringType,
|
|
156
|
+
version: StringType,
|
|
157
|
+
hash: StringType,
|
|
158
|
+
tasks: ArrayType(StringType),
|
|
159
|
+
dataStructure: StructureType,
|
|
160
|
+
});
|
|
161
|
+
// =============================================================================
|
|
162
|
+
// Workspace Types
|
|
163
|
+
// =============================================================================
|
|
164
|
+
/**
|
|
165
|
+
* Request to create a new workspace.
|
|
166
|
+
*
|
|
167
|
+
* @property name - Unique workspace name
|
|
168
|
+
*/
|
|
169
|
+
export const WorkspaceCreateRequestType = StructType({
|
|
170
|
+
name: StringType,
|
|
171
|
+
});
|
|
172
|
+
/** @deprecated Use WorkspaceCreateRequestType */
|
|
173
|
+
export const CreateWorkspaceType = WorkspaceCreateRequestType;
|
|
174
|
+
/**
|
|
175
|
+
* Workspace summary information.
|
|
176
|
+
*
|
|
177
|
+
* @property name - Workspace name
|
|
178
|
+
* @property deployed - Whether a package is deployed to this workspace
|
|
179
|
+
* @property packageName - Name of deployed package (if deployed)
|
|
180
|
+
* @property packageVersion - Version of deployed package (if deployed)
|
|
181
|
+
*/
|
|
182
|
+
export const WorkspaceInfoType = StructType({
|
|
183
|
+
name: StringType,
|
|
184
|
+
deployed: BooleanType,
|
|
185
|
+
packageName: OptionType(StringType),
|
|
186
|
+
packageVersion: OptionType(StringType),
|
|
187
|
+
});
|
|
188
|
+
/**
|
|
189
|
+
* Request to deploy a package to a workspace.
|
|
190
|
+
*
|
|
191
|
+
* @property packageName - Package name to deploy
|
|
192
|
+
* @property packageVersion - Package version to deploy
|
|
193
|
+
*/
|
|
194
|
+
export const WorkspaceDeployRequestType = StructType({
|
|
195
|
+
packageName: StringType,
|
|
196
|
+
packageVersion: StringType,
|
|
197
|
+
});
|
|
198
|
+
/**
|
|
199
|
+
* Alternative deploy request using package reference string.
|
|
200
|
+
*
|
|
201
|
+
* @property packageRef - Package reference in format "name" or "name@version"
|
|
202
|
+
*/
|
|
203
|
+
export const DeployRequestType = StructType({
|
|
204
|
+
packageRef: StringType,
|
|
205
|
+
});
|
|
206
|
+
// =============================================================================
|
|
207
|
+
// Workspace Status Types
|
|
208
|
+
// =============================================================================
|
|
209
|
+
/**
|
|
210
|
+
* Dataset status variant.
|
|
211
|
+
*
|
|
212
|
+
* - `unset`: No value assigned to this dataset
|
|
213
|
+
* - `stale`: Value exists but is outdated (upstream changed)
|
|
214
|
+
* - `up-to-date`: Value is current
|
|
215
|
+
*/
|
|
216
|
+
export const DatasetStatusType = VariantType({
|
|
217
|
+
unset: NullType,
|
|
218
|
+
stale: NullType,
|
|
219
|
+
'up-to-date': NullType,
|
|
220
|
+
});
|
|
221
|
+
/** Task completed successfully. @property cached - True if result was from cache */
|
|
222
|
+
export const TaskStatusUpToDateType = StructType({ cached: BooleanType });
|
|
223
|
+
/** Task waiting on dependencies. @property reason - Human-readable wait reason */
|
|
224
|
+
export const TaskStatusWaitingType = StructType({ reason: StringType });
|
|
225
|
+
/** Task currently executing. */
|
|
226
|
+
export const TaskStatusInProgressType = StructType({
|
|
227
|
+
/** Process ID of the running task */
|
|
228
|
+
pid: OptionType(IntegerType),
|
|
229
|
+
/** ISO timestamp when execution started */
|
|
230
|
+
startedAt: OptionType(StringType),
|
|
231
|
+
});
|
|
232
|
+
/** Task exited with non-zero code. */
|
|
233
|
+
export const TaskStatusFailedType = StructType({
|
|
234
|
+
/** Process exit code */
|
|
235
|
+
exitCode: IntegerType,
|
|
236
|
+
/** ISO timestamp when task completed */
|
|
237
|
+
completedAt: OptionType(StringType),
|
|
238
|
+
});
|
|
239
|
+
/** Task encountered an internal error. */
|
|
240
|
+
export const TaskStatusErrorType = StructType({
|
|
241
|
+
/** Error message */
|
|
242
|
+
message: StringType,
|
|
243
|
+
/** ISO timestamp when error occurred */
|
|
244
|
+
completedAt: OptionType(StringType),
|
|
245
|
+
});
|
|
246
|
+
/** Task was running but process is no longer alive. */
|
|
247
|
+
export const TaskStatusStaleRunningType = StructType({
|
|
248
|
+
/** Last known process ID */
|
|
249
|
+
pid: OptionType(IntegerType),
|
|
250
|
+
/** ISO timestamp when execution started */
|
|
251
|
+
startedAt: OptionType(StringType),
|
|
252
|
+
});
|
|
253
|
+
/**
|
|
254
|
+
* Task execution status variant.
|
|
255
|
+
*
|
|
256
|
+
* - `up-to-date`: Task completed successfully (cached indicates if from cache)
|
|
257
|
+
* - `ready`: Task is ready to run (all inputs available)
|
|
258
|
+
* - `waiting`: Task waiting on upstream dependencies
|
|
259
|
+
* - `in-progress`: Task currently executing
|
|
260
|
+
* - `failed`: Task exited with non-zero exit code
|
|
261
|
+
* - `error`: Internal error during task execution
|
|
262
|
+
* - `stale-running`: Task was marked running but process died
|
|
263
|
+
*/
|
|
264
|
+
export const TaskStatusType = VariantType({
|
|
265
|
+
'up-to-date': TaskStatusUpToDateType,
|
|
266
|
+
ready: NullType,
|
|
267
|
+
waiting: TaskStatusWaitingType,
|
|
268
|
+
'in-progress': TaskStatusInProgressType,
|
|
269
|
+
failed: TaskStatusFailedType,
|
|
270
|
+
error: TaskStatusErrorType,
|
|
271
|
+
'stale-running': TaskStatusStaleRunningType,
|
|
272
|
+
});
|
|
273
|
+
/**
|
|
274
|
+
* Status information for a single dataset.
|
|
275
|
+
*
|
|
276
|
+
* @property path - Dataset path (e.g., ".inputs.config" or ".tasks.foo.output")
|
|
277
|
+
* @property status - Current status (unset, stale, or up-to-date)
|
|
278
|
+
* @property hash - SHA256 hash of current value (if set)
|
|
279
|
+
* @property isTaskOutput - True if this dataset is produced by a task
|
|
280
|
+
* @property producedBy - Name of task that produces this dataset (if isTaskOutput)
|
|
281
|
+
*/
|
|
282
|
+
export const DatasetStatusInfoType = StructType({
|
|
283
|
+
path: StringType,
|
|
284
|
+
status: DatasetStatusType,
|
|
285
|
+
hash: OptionType(StringType),
|
|
286
|
+
isTaskOutput: BooleanType,
|
|
287
|
+
producedBy: OptionType(StringType),
|
|
288
|
+
});
|
|
289
|
+
/**
|
|
290
|
+
* Status information for a single task.
|
|
291
|
+
*
|
|
292
|
+
* @property name - Task name
|
|
293
|
+
* @property hash - Task definition hash (changes when task code changes)
|
|
294
|
+
* @property status - Current execution status
|
|
295
|
+
* @property inputs - Dataset paths this task reads from
|
|
296
|
+
* @property output - Dataset path this task writes to
|
|
297
|
+
* @property dependsOn - Names of tasks that must complete before this one
|
|
298
|
+
*/
|
|
299
|
+
export const TaskStatusInfoType = StructType({
|
|
300
|
+
name: StringType,
|
|
301
|
+
hash: StringType,
|
|
302
|
+
status: TaskStatusType,
|
|
303
|
+
inputs: ArrayType(StringType),
|
|
304
|
+
output: StringType,
|
|
305
|
+
dependsOn: ArrayType(StringType),
|
|
306
|
+
});
|
|
307
|
+
/**
|
|
308
|
+
* Summary counts for workspace status.
|
|
309
|
+
*/
|
|
310
|
+
export const WorkspaceStatusSummaryType = StructType({
|
|
311
|
+
/** Dataset status counts */
|
|
312
|
+
datasets: StructType({
|
|
313
|
+
total: IntegerType,
|
|
314
|
+
unset: IntegerType,
|
|
315
|
+
stale: IntegerType,
|
|
316
|
+
upToDate: IntegerType,
|
|
317
|
+
}),
|
|
318
|
+
/** Task status counts */
|
|
319
|
+
tasks: StructType({
|
|
320
|
+
total: IntegerType,
|
|
321
|
+
upToDate: IntegerType,
|
|
322
|
+
ready: IntegerType,
|
|
323
|
+
waiting: IntegerType,
|
|
324
|
+
inProgress: IntegerType,
|
|
325
|
+
failed: IntegerType,
|
|
326
|
+
error: IntegerType,
|
|
327
|
+
staleRunning: IntegerType,
|
|
328
|
+
}),
|
|
329
|
+
});
|
|
330
|
+
/**
|
|
331
|
+
* Complete workspace status including all datasets, tasks, and summary.
|
|
332
|
+
*
|
|
333
|
+
* @property workspace - Workspace name
|
|
334
|
+
* @property lock - Information about current lock holder (if locked)
|
|
335
|
+
* @property datasets - Status of all datasets in the workspace
|
|
336
|
+
* @property tasks - Status of all tasks in the workspace
|
|
337
|
+
* @property summary - Aggregated counts by status
|
|
338
|
+
*/
|
|
339
|
+
export const WorkspaceStatusResultType = StructType({
|
|
340
|
+
workspace: StringType,
|
|
341
|
+
lock: OptionType(LockHolderType),
|
|
342
|
+
datasets: ArrayType(DatasetStatusInfoType),
|
|
343
|
+
tasks: ArrayType(TaskStatusInfoType),
|
|
344
|
+
summary: WorkspaceStatusSummaryType,
|
|
345
|
+
});
|
|
346
|
+
// =============================================================================
|
|
347
|
+
// Task Types
|
|
348
|
+
// =============================================================================
|
|
349
|
+
export const TaskListItemType = StructType({
|
|
350
|
+
name: StringType,
|
|
351
|
+
hash: StringType,
|
|
352
|
+
});
|
|
353
|
+
// Legacy alias
|
|
354
|
+
export const TaskInfoType = TaskListItemType;
|
|
355
|
+
export const TaskDetailsType = StructType({
|
|
356
|
+
name: StringType,
|
|
357
|
+
hash: StringType,
|
|
358
|
+
commandIr: StringType,
|
|
359
|
+
inputs: ArrayType(TreePathType),
|
|
360
|
+
output: TreePathType,
|
|
361
|
+
});
|
|
362
|
+
// =============================================================================
|
|
363
|
+
// Execution Types
|
|
364
|
+
// =============================================================================
|
|
365
|
+
export const DataflowRequestType = StructType({
|
|
366
|
+
concurrency: OptionType(IntegerType),
|
|
367
|
+
force: BooleanType,
|
|
368
|
+
filter: OptionType(StringType),
|
|
369
|
+
});
|
|
370
|
+
// Legacy alias
|
|
371
|
+
export const StartRequestType = DataflowRequestType;
|
|
372
|
+
export const GraphTaskType = StructType({
|
|
373
|
+
name: StringType,
|
|
374
|
+
hash: StringType,
|
|
375
|
+
inputs: ArrayType(StringType),
|
|
376
|
+
output: StringType,
|
|
377
|
+
dependsOn: ArrayType(StringType),
|
|
378
|
+
});
|
|
379
|
+
export const DataflowGraphType = StructType({
|
|
380
|
+
tasks: ArrayType(GraphTaskType),
|
|
381
|
+
});
|
|
382
|
+
export const LogChunkType = StructType({
|
|
383
|
+
data: StringType,
|
|
384
|
+
offset: IntegerType,
|
|
385
|
+
size: IntegerType,
|
|
386
|
+
totalSize: IntegerType,
|
|
387
|
+
complete: BooleanType,
|
|
388
|
+
});
|
|
389
|
+
export const TaskExecutionResultType = StructType({
|
|
390
|
+
name: StringType,
|
|
391
|
+
cached: BooleanType,
|
|
392
|
+
state: VariantType({
|
|
393
|
+
success: NullType,
|
|
394
|
+
failed: StructType({ exitCode: IntegerType }),
|
|
395
|
+
error: StructType({ message: StringType }),
|
|
396
|
+
skipped: NullType,
|
|
397
|
+
}),
|
|
398
|
+
duration: FloatType,
|
|
399
|
+
});
|
|
400
|
+
export const DataflowResultType = StructType({
|
|
401
|
+
success: BooleanType,
|
|
402
|
+
executed: IntegerType,
|
|
403
|
+
cached: IntegerType,
|
|
404
|
+
failed: IntegerType,
|
|
405
|
+
skipped: IntegerType,
|
|
406
|
+
tasks: ArrayType(TaskExecutionResultType),
|
|
407
|
+
duration: FloatType,
|
|
408
|
+
});
|
|
409
|
+
// =============================================================================
|
|
410
|
+
// Namespace export for convenience
|
|
411
|
+
// =============================================================================
|
|
412
|
+
export const ApiTypes = {
|
|
413
|
+
// Errors
|
|
414
|
+
ErrorType,
|
|
415
|
+
WorkspaceNotFoundErrorType,
|
|
416
|
+
WorkspaceNotDeployedErrorType,
|
|
417
|
+
WorkspaceExistsErrorType,
|
|
418
|
+
WorkspaceLockedErrorType,
|
|
419
|
+
LockHolderType,
|
|
420
|
+
PackageNotFoundErrorType,
|
|
421
|
+
PackageExistsErrorType,
|
|
422
|
+
PackageInvalidErrorType,
|
|
423
|
+
DatasetNotFoundErrorType,
|
|
424
|
+
TaskNotFoundErrorType,
|
|
425
|
+
ObjectNotFoundErrorType,
|
|
426
|
+
DataflowErrorType,
|
|
427
|
+
PermissionDeniedErrorType,
|
|
428
|
+
InternalErrorType,
|
|
429
|
+
// Response
|
|
430
|
+
ResponseType,
|
|
431
|
+
// Repository
|
|
432
|
+
RepositoryStatusType,
|
|
433
|
+
GcRequestType,
|
|
434
|
+
GcResultType,
|
|
435
|
+
// Packages
|
|
436
|
+
PackageListItemType,
|
|
437
|
+
PackageImportResultType,
|
|
438
|
+
PackageInfoType,
|
|
439
|
+
PackageDetailsType,
|
|
440
|
+
// Workspaces
|
|
441
|
+
WorkspaceCreateRequestType,
|
|
442
|
+
WorkspaceInfoType,
|
|
443
|
+
WorkspaceDeployRequestType,
|
|
444
|
+
DeployRequestType,
|
|
445
|
+
// Workspace Status
|
|
446
|
+
DatasetStatusType,
|
|
447
|
+
TaskStatusType,
|
|
448
|
+
TaskStatusUpToDateType,
|
|
449
|
+
TaskStatusWaitingType,
|
|
450
|
+
TaskStatusInProgressType,
|
|
451
|
+
TaskStatusFailedType,
|
|
452
|
+
TaskStatusErrorType,
|
|
453
|
+
TaskStatusStaleRunningType,
|
|
454
|
+
DatasetStatusInfoType,
|
|
455
|
+
TaskStatusInfoType,
|
|
456
|
+
WorkspaceStatusSummaryType,
|
|
457
|
+
WorkspaceStatusResultType,
|
|
458
|
+
// Tasks
|
|
459
|
+
TaskListItemType,
|
|
460
|
+
TaskInfoType,
|
|
461
|
+
TaskDetailsType,
|
|
462
|
+
// Execution
|
|
463
|
+
DataflowRequestType,
|
|
464
|
+
StartRequestType,
|
|
465
|
+
GraphTaskType,
|
|
466
|
+
DataflowGraphType,
|
|
467
|
+
LogChunkType,
|
|
468
|
+
TaskExecutionResultType,
|
|
469
|
+
DataflowResultType,
|
|
470
|
+
};
|
|
471
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AAEH,OAAO,EACL,WAAW,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B;IACnB,gBAAgB;IAChB,aAAa;IACb,iBAAiB;IACjB,YAAY;IACZ,uBAAuB;IACvB,kBAAkB;CACV,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Licensed under BSL 1.1. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Extract the wildcard path portion from a request path.
|
|
7
|
+
*
|
|
8
|
+
* For routes like `/api/workspaces/:ws/list/*`, this extracts the `*` portion
|
|
9
|
+
* after the known prefix.
|
|
10
|
+
*
|
|
11
|
+
* @param requestPath - The full request path (e.g., "/api/workspaces/prod/list/inputs/config")
|
|
12
|
+
* @param prefixPattern - Regex matching the prefix to strip (e.g., /^\/api\/workspaces\/[^/]+\/list\//)
|
|
13
|
+
* @returns The wildcard portion (e.g., "inputs/config")
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* extractWildcardPath("/api/workspaces/prod/list/inputs/config", /^\/api\/workspaces\/[^/]+\/list\//)
|
|
18
|
+
* // "inputs/config"
|
|
19
|
+
*
|
|
20
|
+
* extractWildcardPath("/api/workspaces/prod/get/data", /^\/api\/workspaces\/[^/]+\/get\//)
|
|
21
|
+
* // "data"
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare function extractWildcardPath(requestPath: string, prefixPattern: RegExp): string;
|
|
25
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CAEtF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Licensed under BSL 1.1. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Extract the wildcard path portion from a request path.
|
|
7
|
+
*
|
|
8
|
+
* For routes like `/api/workspaces/:ws/list/*`, this extracts the `*` portion
|
|
9
|
+
* after the known prefix.
|
|
10
|
+
*
|
|
11
|
+
* @param requestPath - The full request path (e.g., "/api/workspaces/prod/list/inputs/config")
|
|
12
|
+
* @param prefixPattern - Regex matching the prefix to strip (e.g., /^\/api\/workspaces\/[^/]+\/list\//)
|
|
13
|
+
* @returns The wildcard portion (e.g., "inputs/config")
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* extractWildcardPath("/api/workspaces/prod/list/inputs/config", /^\/api\/workspaces\/[^/]+\/list\//)
|
|
18
|
+
* // "inputs/config"
|
|
19
|
+
*
|
|
20
|
+
* extractWildcardPath("/api/workspaces/prod/get/data", /^\/api\/workspaces\/[^/]+\/get\//)
|
|
21
|
+
* // "data"
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export function extractWildcardPath(requestPath, prefixPattern) {
|
|
25
|
+
return requestPath.replace(prefixPattern, '');
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,mBAAmB,CAAC,WAAmB,EAAE,aAAqB;IAC5E,OAAO,WAAW,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;AAChD,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@elaraai/e3-api-server",
|
|
3
|
+
"version": "0.0.1-alpha.2",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "East Execution Engine API Server - HTTP server exposing e3-core operations",
|
|
6
|
+
"main": "dist/src/index.js",
|
|
7
|
+
"types": "dist/src/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"e3-api-server": "dist/src/cli.js"
|
|
10
|
+
},
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/src/index.d.ts",
|
|
14
|
+
"default": "./dist/src/index.js"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist/src",
|
|
19
|
+
"!dist/src/**/*.spec.*",
|
|
20
|
+
"README.md",
|
|
21
|
+
"LICENSE"
|
|
22
|
+
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "tsc --build",
|
|
25
|
+
"test": "npm run build && node --enable-source-maps --test 'dist/src/**/*.spec.js'",
|
|
26
|
+
"lint": "eslint .",
|
|
27
|
+
"lint:fix": "eslint . --fix",
|
|
28
|
+
"dev": "npm run build && node --enable-source-maps dist/src/cli.js"
|
|
29
|
+
},
|
|
30
|
+
"keywords": [
|
|
31
|
+
"east",
|
|
32
|
+
"e3",
|
|
33
|
+
"api",
|
|
34
|
+
"server"
|
|
35
|
+
],
|
|
36
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "https://github.com/elaraai/e3",
|
|
40
|
+
"directory": "packages/e3-api-server"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@elaraai/e3-core": "*",
|
|
44
|
+
"@elaraai/e3-types": "*",
|
|
45
|
+
"@elaraai/east": "^0.0.1-beta.14",
|
|
46
|
+
"@hono/node-server": "^1.13.0",
|
|
47
|
+
"commander": "^12.0.0",
|
|
48
|
+
"hono": "^4.6.0"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@types/node": "^22.0.0",
|
|
52
|
+
"@typescript-eslint/eslint-plugin": "^8.47.0",
|
|
53
|
+
"@typescript-eslint/parser": "^8.47.0",
|
|
54
|
+
"eslint": "^9.0.0",
|
|
55
|
+
"eslint-plugin-headers": "^1.3.3",
|
|
56
|
+
"typescript": "^5.6.0"
|
|
57
|
+
}
|
|
58
|
+
}
|