@elaraai/e3-api-server 1.0.78 → 1.0.80

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.
Files changed (129) hide show
  1. package/README.md +83 -19
  2. package/dist/src/beast2.js +1 -1
  3. package/dist/src/beast2.js.map +1 -1
  4. package/dist/src/cli.js +13 -0
  5. package/dist/src/cli.js.map +1 -1
  6. package/dist/src/errors.d.ts.map +1 -1
  7. package/dist/src/errors.js +8 -1
  8. package/dist/src/errors.js.map +1 -1
  9. package/dist/src/handlers/dataflow.d.ts +58 -11
  10. package/dist/src/handlers/dataflow.d.ts.map +1 -1
  11. package/dist/src/handlers/dataflow.js +120 -48
  12. package/dist/src/handlers/dataflow.js.map +1 -1
  13. package/dist/src/handlers/dataflow.spec.d.ts +6 -0
  14. package/dist/src/handlers/dataflow.spec.d.ts.map +1 -0
  15. package/dist/src/handlers/dataflow.spec.js +106 -0
  16. package/dist/src/handlers/dataflow.spec.js.map +1 -0
  17. package/dist/src/handlers/datasets.d.ts +60 -34
  18. package/dist/src/handlers/datasets.d.ts.map +1 -1
  19. package/dist/src/handlers/datasets.js +452 -306
  20. package/dist/src/handlers/datasets.js.map +1 -1
  21. package/dist/src/handlers/datasets.spec.js +338 -119
  22. package/dist/src/handlers/datasets.spec.js.map +1 -1
  23. package/dist/src/handlers/functions.d.ts.map +1 -1
  24. package/dist/src/handlers/functions.js +10 -8
  25. package/dist/src/handlers/functions.js.map +1 -1
  26. package/dist/src/handlers/functions.spec.js +2 -2
  27. package/dist/src/handlers/functions.spec.js.map +1 -1
  28. package/dist/src/handlers/index.d.ts +2 -2
  29. package/dist/src/handlers/index.d.ts.map +1 -1
  30. package/dist/src/handlers/index.js +2 -2
  31. package/dist/src/handlers/index.js.map +1 -1
  32. package/dist/src/handlers/records.d.ts.map +1 -1
  33. package/dist/src/handlers/records.js +15 -12
  34. package/dist/src/handlers/records.js.map +1 -1
  35. package/dist/src/handlers/records.spec.js +9 -5
  36. package/dist/src/handlers/records.spec.js.map +1 -1
  37. package/dist/src/handlers/repository.d.ts +59 -10
  38. package/dist/src/handlers/repository.d.ts.map +1 -1
  39. package/dist/src/handlers/repository.js +147 -40
  40. package/dist/src/handlers/repository.js.map +1 -1
  41. package/dist/src/handlers/tasks.d.ts +2 -1
  42. package/dist/src/handlers/tasks.d.ts.map +1 -1
  43. package/dist/src/handlers/tasks.js +31 -8
  44. package/dist/src/handlers/tasks.js.map +1 -1
  45. package/dist/src/handlers/tasks.spec.d.ts +6 -0
  46. package/dist/src/handlers/tasks.spec.d.ts.map +1 -0
  47. package/dist/src/handlers/tasks.spec.js +64 -0
  48. package/dist/src/handlers/tasks.spec.js.map +1 -0
  49. package/dist/src/handlers/workspaces.d.ts +44 -6
  50. package/dist/src/handlers/workspaces.d.ts.map +1 -1
  51. package/dist/src/handlers/workspaces.js +74 -40
  52. package/dist/src/handlers/workspaces.js.map +1 -1
  53. package/dist/src/handlers/workspaces.spec.d.ts +6 -0
  54. package/dist/src/handlers/workspaces.spec.d.ts.map +1 -0
  55. package/dist/src/handlers/workspaces.spec.js +164 -0
  56. package/dist/src/handlers/workspaces.spec.js.map +1 -0
  57. package/dist/src/index.d.ts +3 -0
  58. package/dist/src/index.d.ts.map +1 -1
  59. package/dist/src/index.js +7 -0
  60. package/dist/src/index.js.map +1 -1
  61. package/dist/src/local-dataflow.d.ts +14 -0
  62. package/dist/src/local-dataflow.d.ts.map +1 -0
  63. package/dist/src/local-dataflow.js +41 -0
  64. package/dist/src/local-dataflow.js.map +1 -0
  65. package/dist/src/middleware/repository.d.ts +39 -0
  66. package/dist/src/middleware/repository.d.ts.map +1 -0
  67. package/dist/src/middleware/repository.js +77 -0
  68. package/dist/src/middleware/repository.js.map +1 -0
  69. package/dist/src/routes/data.d.ts +2 -2
  70. package/dist/src/routes/data.d.ts.map +1 -1
  71. package/dist/src/routes/data.js +22 -45
  72. package/dist/src/routes/data.js.map +1 -1
  73. package/dist/src/routes/datasets.d.ts +0 -3
  74. package/dist/src/routes/datasets.d.ts.map +1 -1
  75. package/dist/src/routes/datasets.js +40 -8
  76. package/dist/src/routes/datasets.js.map +1 -1
  77. package/dist/src/routes/executions.d.ts +37 -2
  78. package/dist/src/routes/executions.d.ts.map +1 -1
  79. package/dist/src/routes/executions.js +21 -12
  80. package/dist/src/routes/executions.js.map +1 -1
  81. package/dist/src/routes/index.d.ts +2 -1
  82. package/dist/src/routes/index.d.ts.map +1 -1
  83. package/dist/src/routes/index.js +1 -0
  84. package/dist/src/routes/index.js.map +1 -1
  85. package/dist/src/routes/objects.d.ts +16 -2
  86. package/dist/src/routes/objects.d.ts.map +1 -1
  87. package/dist/src/routes/objects.js +34 -3
  88. package/dist/src/routes/objects.js.map +1 -1
  89. package/dist/src/routes/repositories.d.ts +26 -0
  90. package/dist/src/routes/repositories.d.ts.map +1 -0
  91. package/dist/src/routes/repositories.js +58 -0
  92. package/dist/src/routes/repositories.js.map +1 -0
  93. package/dist/src/routes/repositories.spec.d.ts +6 -0
  94. package/dist/src/routes/repositories.spec.d.ts.map +1 -0
  95. package/dist/src/routes/repositories.spec.js +77 -0
  96. package/dist/src/routes/repositories.spec.js.map +1 -0
  97. package/dist/src/routes/repository.d.ts +12 -2
  98. package/dist/src/routes/repository.d.ts.map +1 -1
  99. package/dist/src/routes/repository.js +24 -9
  100. package/dist/src/routes/repository.js.map +1 -1
  101. package/dist/src/routes/transfer.d.ts +11 -9
  102. package/dist/src/routes/transfer.d.ts.map +1 -1
  103. package/dist/src/routes/transfer.js +90 -115
  104. package/dist/src/routes/transfer.js.map +1 -1
  105. package/dist/src/routes/workspaces.d.ts +14 -1
  106. package/dist/src/routes/workspaces.d.ts.map +1 -1
  107. package/dist/src/routes/workspaces.js +57 -46
  108. package/dist/src/routes/workspaces.js.map +1 -1
  109. package/dist/src/server.d.ts +18 -6
  110. package/dist/src/server.d.ts.map +1 -1
  111. package/dist/src/server.js +55 -182
  112. package/dist/src/server.js.map +1 -1
  113. package/dist/src/server.spec.d.ts +6 -0
  114. package/dist/src/server.spec.d.ts.map +1 -0
  115. package/dist/src/server.spec.js +59 -0
  116. package/dist/src/server.spec.js.map +1 -0
  117. package/dist/src/types.d.ts +200 -16
  118. package/dist/src/types.d.ts.map +1 -1
  119. package/dist/src/types.js +5 -2
  120. package/dist/src/types.js.map +1 -1
  121. package/package.json +5 -5
  122. package/dist/src/async-operation-state.d.ts +0 -37
  123. package/dist/src/async-operation-state.d.ts.map +0 -1
  124. package/dist/src/async-operation-state.js +0 -118
  125. package/dist/src/async-operation-state.js.map +0 -1
  126. package/dist/src/orchestrator-manager.d.ts +0 -45
  127. package/dist/src/orchestrator-manager.d.ts.map +0 -1
  128. package/dist/src/orchestrator-manager.js +0 -150
  129. package/dist/src/orchestrator-manager.js.map +0 -1
@@ -2,12 +2,11 @@
2
2
  * Copyright (c) 2025 Elara AI Pty Ltd
3
3
  * Licensed under BSL 1.1. See LICENSE for details.
4
4
  */
5
- import { NullType, some, none, variant } from '@elaraai/east';
6
- import { JobSlots, dataflowGetGraph, workspaceStatus, executionFindCurrent, executionReadLog, WorkspaceLockError, ExecutionNotFoundError, coreEventToApiEvent, coreStatusToApiStatus, } from '@elaraai/e3-core';
5
+ import { NullType, OptionType, some, none, variant } from '@elaraai/east';
6
+ import { dataflowGetGraph, workspaceStatus, executionFindCurrent, executionReadLog, ExecutionNotFoundError, coreEventToApiEvent, coreStatusToApiStatus, } from '@elaraai/e3-core';
7
7
  import { sendSuccess, sendError, sendSuccessWithStatus } from '../beast2.js';
8
8
  import { errorToVariant } from '../errors.js';
9
- import { WorkspaceStatusResultType, DataflowGraphType, LogChunkType, DataflowExecutionStateType, } from '../types.js';
10
- import { getOrchestrator, getStateStore, setActiveExecution, getActiveExecution, getLatestExecution, getExecutionStartTime, clearActiveExecution, } from '../orchestrator-manager.js';
9
+ import { WorkspaceStatusResultType, DataflowGraphType, LogChunkType, DataflowExecutionStateType, DataflowBudgetType, } from '../types.js';
11
10
  /**
12
11
  * Convert core DatasetStatusInfo to API type.
13
12
  */
@@ -79,8 +78,21 @@ function convertTaskStatus(info) {
79
78
  inputs: info.inputs,
80
79
  output: info.output,
81
80
  dependsOn: info.dependsOn,
81
+ peakBytes: info.peakBytes === null ? none : some(BigInt(info.peakBytes)),
82
82
  };
83
83
  }
84
+ /** A budget as the API serves it: its capacity, and what its runners hold of
85
+ * it now; `none` for a server whose runners hold no budget. */
86
+ function budgetView(budget) {
87
+ if (budget === undefined)
88
+ return none;
89
+ return some({
90
+ cores: BigInt(budget.cores),
91
+ memory: BigInt(budget.memory),
92
+ coresInUse: BigInt(budget.inFlight),
93
+ memoryInUse: BigInt(budget.used),
94
+ });
95
+ }
84
96
  /**
85
97
  * Convert core WorkspaceStatusResult to API type.
86
98
  */
@@ -121,47 +133,54 @@ function convertWorkspaceStatus(result) {
121
133
  * Start dataflow execution (non-blocking).
122
134
  *
123
135
  * Returns 202 Accepted immediately and runs execution in background.
124
- * Creates execution state that can be polled via getDataflowExecution().
136
+ * The run's state, which the orchestrator keeps in its state store, is what
137
+ * getDataflowExecution() polls.
138
+ *
139
+ * @param storage - Storage backend
140
+ * @param orchestrator - The orchestrator that runs the repository's dataflows
141
+ * @param repoPath - The repository's path
142
+ * @param workspace - The workspace whose dataflow runs
143
+ * @param options - The runner the run's tasks and units run on, which holds
144
+ * the server's budget; the tasks and units the loop keeps in flight, the
145
+ * orchestrator's own default when absent; and the run's force, filter and
146
+ * verbosity
147
+ * @returns 202 once the run has started, or the error that stopped it
125
148
  */
126
- export async function startDataflow(storage, repoPath, workspace, options) {
149
+ export async function startDataflow(storage, orchestrator, repoPath, workspace, options) {
127
150
  try {
128
- const orchestrator = getOrchestrator(repoPath);
129
- if (!Number.isInteger(options.jobs) || options.jobs < 1) {
130
- return sendError(NullType, variant('internal', { message: `jobs must be a positive integer, got ${options.jobs}` }));
131
- }
132
- // Start execution via orchestrator (acquires lock internally). The run's
133
- // jobs budget bounds the runners it spawns, tasks and partition units alike.
151
+ // Start execution via orchestrator (acquires lock internally). The loop
152
+ // keeps `width` tasks and units in flight, and the runner decides which
153
+ // of them spawn.
134
154
  const handle = await orchestrator.start(storage, repoPath, workspace, {
135
- concurrency: options.jobs,
136
- jobs: new JobSlots(options.jobs),
155
+ runner: options.runner,
156
+ ...(options.width !== undefined && { width: options.width }),
137
157
  force: options.force,
138
158
  filter: options.filter,
139
159
  verbose: options.verbose,
140
160
  });
141
- // Track as active execution for this workspace
142
- setActiveExecution(repoPath, workspace, handle);
143
- // Set up completion handler to clear active execution
144
- orchestrator.wait(handle).then(() => {
145
- clearActiveExecution(repoPath, workspace);
146
- }).catch(() => {
147
- clearActiveExecution(repoPath, workspace);
148
- });
161
+ // How the run ends is in its state, which a poll reads: its end is
162
+ // awaited only so that a failure is never an unhandled rejection.
163
+ void orchestrator.wait(handle).catch(() => { });
149
164
  // Return immediately with 202 Accepted
150
165
  return sendSuccessWithStatus(NullType, null, 202);
151
166
  }
152
167
  catch (err) {
153
- if (err instanceof WorkspaceLockError) {
154
- return sendError(NullType, errorToVariant(err));
155
- }
156
168
  return sendError(NullType, errorToVariant(err));
157
169
  }
158
170
  }
159
171
  /**
160
172
  * Get workspace status (for polling).
173
+ *
174
+ * @param storage - Storage backend
175
+ * @param runner - The runner the repository's tasks run on, which says
176
+ * whether an execution recorded running can still finish
177
+ * @param repoPath - The repository's path
178
+ * @param workspace - The workspace
179
+ * @returns The response: the status, or the error
161
180
  */
162
- export async function getDataflowStatus(storage, repoPath, workspace) {
181
+ export async function getDataflowStatus(storage, runner, repoPath, workspace) {
163
182
  try {
164
- const result = await workspaceStatus(storage, repoPath, workspace);
183
+ const result = await workspaceStatus(storage, runner, repoPath, workspace);
165
184
  return sendSuccess(WorkspaceStatusResultType, convertWorkspaceStatus(result));
166
185
  }
167
186
  catch (err) {
@@ -215,20 +234,29 @@ export async function getTaskLogs(storage, repoPath, workspace, taskName, stream
215
234
  /**
216
235
  * Get dataflow execution state (for polling).
217
236
  *
218
- * Returns the current execution state including events for progress tracking.
219
- * Supports offset/limit for paginating events.
237
+ * Returns the state of the workspace's latest run, as the state store keeps
238
+ * it, including events for progress tracking: the run in flight, whichever
239
+ * process runs it, or the last to end. Supports offset/limit for paginating
240
+ * events. While the run is in flight, it carries the tasks and units waiting
241
+ * for room and each split task's progress, which the orchestrator running it
242
+ * keeps in memory; and it carries the server's budget when it has one.
243
+ *
244
+ * @param stateStore - The store the repository's runs keep their state in
245
+ * @param orchestrator - The orchestrator that runs the repository's dataflows
246
+ * @param repoPath - The repository's path
247
+ * @param workspace - The workspace
248
+ * @param options - The window of events to serve
249
+ * @param budget - The server's budget, which its runners hold, if any
250
+ * @returns The execution state, or `execution_not_found`
220
251
  */
221
- export async function getDataflowExecution(repoPath, workspace, options = {}) {
222
- const stateStore = getStateStore(repoPath);
223
- // Find the latest execution for this workspace
224
- const handle = await getLatestExecution(repoPath, workspace);
225
- if (!handle) {
226
- return sendError(DataflowExecutionStateType, variant('execution_not_found', {
227
- task: workspace,
228
- }));
252
+ export async function getDataflowExecution(stateStore, orchestrator, repoPath, workspace, options = {}, budget) {
253
+ let coreState;
254
+ try {
255
+ coreState = await stateStore.readLatest(repoPath, workspace);
256
+ }
257
+ catch (err) {
258
+ return sendError(DataflowExecutionStateType, errorToVariant(err));
229
259
  }
230
- // Read execution state
231
- const coreState = await stateStore.read(repoPath, workspace, handle.id);
232
260
  if (!coreState) {
233
261
  return sendError(DataflowExecutionStateType, variant('execution_not_found', {
234
262
  task: workspace,
@@ -266,6 +294,7 @@ export async function getDataflowExecution(repoPath, workspace, options = {}) {
266
294
  task: apiEvent.task,
267
295
  timestamp: apiEvent.timestamp,
268
296
  duration: apiEvent.duration ?? 0,
297
+ peakBytes: apiEvent.peakBytes === undefined ? none : some(apiEvent.peakBytes),
269
298
  }));
270
299
  break;
271
300
  case 'cached':
@@ -296,6 +325,17 @@ export async function getDataflowExecution(repoPath, workspace, options = {}) {
296
325
  reason: apiEvent.reason ?? 'Upstream task failed',
297
326
  }));
298
327
  break;
328
+ case 'requeued':
329
+ // coreEventToApiEvent gives a requeue each of these.
330
+ apiEvents.push(variant('requeued', {
331
+ task: apiEvent.task,
332
+ timestamp: apiEvent.timestamp,
333
+ unit: apiEvent.unit,
334
+ reason: variant(apiEvent.requeueReason, null),
335
+ peak: apiEvent.peak,
336
+ reserves: apiEvent.reserves,
337
+ }));
338
+ break;
299
339
  }
300
340
  }
301
341
  // Convert status to API format
@@ -315,9 +355,9 @@ export async function getDataflowExecution(repoPath, workspace, options = {}) {
315
355
  status = variant('aborted', null);
316
356
  break;
317
357
  }
318
- // Calculate duration
319
- const startTime = getExecutionStartTime(repoPath, workspace, handle.id);
320
- const duration = startTime ? Date.now() - startTime : 0;
358
+ // The run's duration, from its own times: until now while it runs
359
+ const endTime = coreState.completedAt.type === 'some' ? coreState.completedAt.value.getTime() : Date.now();
360
+ const duration = endTime - coreState.startedAt.getTime();
321
361
  // Build summary if not running
322
362
  let summary;
323
363
  if (coreState.status !== 'running') {
@@ -336,6 +376,18 @@ export async function getDataflowExecution(repoPath, workspace, options = {}) {
336
376
  const completedAtValue = coreState.completedAt.type === 'some'
337
377
  ? some(coreState.completedAt.value.toISOString())
338
378
  : none;
379
+ // The waits and each split task's progress, while the run is in flight:
380
+ // nothing stores them, so the orchestrator answers them where it runs the
381
+ // run, and a run that has ended, or that it does not hold, has none.
382
+ let live = null;
383
+ if (coreState.status === 'running') {
384
+ try {
385
+ live = await orchestrator.getStatus({ id: coreState.id, repo: repoPath, workspace });
386
+ }
387
+ catch {
388
+ // Ended since it was read: nothing is waiting.
389
+ }
390
+ }
339
391
  const state = {
340
392
  status,
341
393
  startedAt: coreState.startedAt.toISOString(),
@@ -343,22 +395,42 @@ export async function getDataflowExecution(repoPath, workspace, options = {}) {
343
395
  summary,
344
396
  events: apiEvents,
345
397
  totalEvents: BigInt(totalApiEvents),
398
+ budget: budgetView(budget),
399
+ waiting: live?.waiting ?? [],
400
+ splits: live?.splits ?? [],
346
401
  };
347
402
  return sendSuccess(DataflowExecutionStateType, state);
348
403
  }
349
404
  /**
350
- * Cancel a running dataflow execution.
405
+ * The budget a run of the dataflow gets: the server's, which it shares with
406
+ * everything else the server runs.
407
+ *
408
+ * @param budget - The server's budget, which its runners hold, if any
409
+ * @returns The budget with what its runners hold now, or `none` for a server
410
+ * whose runners hold none
411
+ */
412
+ export function getDataflowBudget(budget) {
413
+ return sendSuccess(OptionType(DataflowBudgetType), budgetView(budget));
414
+ }
415
+ /**
416
+ * Cancel a running dataflow execution: the workspace's latest run, when its
417
+ * state says it is running.
418
+ *
419
+ * @param stateStore - The store the repository's runs keep their state in
420
+ * @param orchestrator - The orchestrator that runs the repository's dataflows
421
+ * @param repoPath - The repository's path
422
+ * @param workspace - The workspace
423
+ * @returns The response: null once the run is cancelled, or why it is not
351
424
  */
352
- export async function cancelDataflow(repoPath, workspace) {
425
+ export async function cancelDataflow(stateStore, orchestrator, repoPath, workspace) {
353
426
  try {
354
- const orchestrator = getOrchestrator(repoPath);
355
- const execution = getActiveExecution(repoPath, workspace);
356
- if (!execution) {
427
+ const state = await stateStore.readLatest(repoPath, workspace);
428
+ if (state === null || state.status !== 'running') {
357
429
  return sendError(NullType, variant('internal', {
358
430
  message: 'No active execution for this workspace',
359
431
  }));
360
432
  }
361
- await orchestrator.cancel(execution);
433
+ await orchestrator.cancel({ id: state.id, repo: repoPath, workspace });
362
434
  return sendSuccess(NullType, null);
363
435
  }
364
436
  catch (err) {
@@ -1 +1 @@
1
- {"version":3,"file":"dataflow.js","sourceRoot":"","sources":["../../../src/handlers/dataflow.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EACL,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,GAKtB,MAAM,kBAAkB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K,GAAG,MAAM,UAAU,CAAC,UAAU,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;QAC/D,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;YACjD,OAAO,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,UAAU,EAAE;gBAC7C,OAAO,EAAE,wCAAwC;aAClD,CAAC,CAAC,CAAC;QACN,CAAC;QAED,MAAM,YAAY,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAC;QAEvE,OAAO,WAAW,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IACrC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,SAAS,CAAC,QAAQ,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;IAClD,CAAC;AACH,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Licensed under BSL 1.1. See LICENSE for details.
4
+ */
5
+ export {};
6
+ //# sourceMappingURL=dataflow.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataflow.spec.d.ts","sourceRoot":"","sources":["../../../src/handlers/dataflow.spec.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
@@ -0,0 +1,106 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Licensed under BSL 1.1. See LICENSE for details.
4
+ */
5
+ /**
6
+ * The dataflow routes run, poll and cancel a dataflow through the seams their
7
+ * host gives — its orchestrator, and the state store the orchestrator writes —
8
+ * as e3-cloud mounts them over its own; and they serve the budget the host's
9
+ * runner holds. And a server's budget settings that do not resolve refuse the
10
+ * server.
11
+ */
12
+ import { describe, it } from 'node:test';
13
+ import assert from 'node:assert/strict';
14
+ import { Hono } from 'hono';
15
+ import { NullType, OptionType, decodeBeast2For, encodeBeast2For, none, some, variant } from '@elaraai/east';
16
+ import { Budget, InMemoryStateStore, LocalOrchestrator, MockTaskRunner, stateToStatus, } from '@elaraai/e3-core';
17
+ import { InMemoryStorage } from '@elaraai/e3-core/test';
18
+ import { BEAST2_CONTENT_TYPE, E3_RELEASE } from '@elaraai/e3-types';
19
+ import { createExecutionRoutes } from '../routes/executions.js';
20
+ import { createServer } from '../server.js';
21
+ import { DataflowBudgetType, DataflowExecutionStateType, DataflowRequestType, ResponseType } from '../types.js';
22
+ describe('dataflow routes', () => {
23
+ it('start, poll and cancel a run through the orchestrator and the state store their host gives', async () => {
24
+ // A host's own orchestrator, which records its run in the host's store.
25
+ const stateStore = new InMemoryStateStore();
26
+ const cancelled = [];
27
+ const orchestrator = {
28
+ start: async (_storage, repo, workspace) => {
29
+ await stateStore.create({
30
+ release: E3_RELEASE, id: 'run-1', repo, workspace, startedAt: new Date(Date.now() - 1000), force: false, filter: none,
31
+ graph: none, graphHash: none, tasks: new Map(), executed: 0n, cached: 0n, failed: 0n, skipped: 0n, status: 'running',
32
+ completedAt: none, error: none, versionVectors: new Map(), inputSnapshot: new Map(), taskOutputPaths: [], reexecuted: 0n,
33
+ events: [], eventSeq: 0n,
34
+ });
35
+ return { id: 'run-1', repo, workspace };
36
+ },
37
+ wait: () => new Promise(() => { }),
38
+ getStatus: async (handle) => ({
39
+ ...stateToStatus((await stateStore.read(handle.repo, handle.workspace, handle.id))),
40
+ waiting: [{ task: 'train', unit: none, needs: 1024n, since: new Date(0).toISOString() }],
41
+ }),
42
+ cancel: async (handle) => {
43
+ cancelled.push(handle.id);
44
+ await stateStore.updateStatus(handle.repo, handle.workspace, handle.id, 'cancelled');
45
+ },
46
+ getEvents: async () => [],
47
+ };
48
+ const app = new Hono();
49
+ app.route('/api/repos/:repo/workspaces/:ws/dataflow', createExecutionRoutes(new InMemoryStorage(), () => 'test-repo', {
50
+ getRunner: () => new MockTaskRunner(),
51
+ getOrchestrator: () => orchestrator,
52
+ getStateStore: () => stateStore,
53
+ }));
54
+ const decodeNull = decodeBeast2For(ResponseType(NullType));
55
+ const decodeState = decodeBeast2For(ResponseType(DataflowExecutionStateType));
56
+ const post = async (path, body) => decodeNull(new Uint8Array(await (await app.request(`/api/repos/r/workspaces/main/dataflow${path}`, {
57
+ method: 'POST',
58
+ headers: { 'Content-Type': BEAST2_CONTENT_TYPE },
59
+ ...(body !== undefined && { body }),
60
+ })).arrayBuffer()));
61
+ const poll = async () => decodeState(new Uint8Array(await (await app.request('/api/repos/r/workspaces/main/dataflow/execution')).arrayBuffer()));
62
+ assert.equal((await post('', encodeBeast2For(DataflowRequestType)({ force: false, filter: none }))).type, 'success');
63
+ const running = await poll();
64
+ if (running.type !== 'success')
65
+ assert.fail(`the poll was refused: ${running.value.type}`);
66
+ assert.equal(running.value.status.type, 'running');
67
+ assert.deepEqual(running.value.waiting.map((wait) => wait.task), ['train'], 'the orchestrator running the run answers its waits');
68
+ assert.equal((await post('/cancel')).type, 'success');
69
+ assert.deepEqual(cancelled, ['run-1'], 'the host\'s orchestrator cancels the run its state names');
70
+ const ended = await poll();
71
+ if (ended.type !== 'success')
72
+ assert.fail(`the poll was refused: ${ended.value.type}`);
73
+ assert.equal(ended.value.status.type, 'aborted');
74
+ const again = await post('/cancel');
75
+ assert.equal(again.type, 'error', 'no run is running');
76
+ });
77
+ it('serve the budget a run gets, with what its runners hold now, and none when mounted without one', async () => {
78
+ const decode = decodeBeast2For(ResponseType(OptionType(DataflowBudgetType)));
79
+ const budgetOf = async (app) => decode(new Uint8Array(await (await app.request('/api/repos/r/workspaces/main/dataflow/budget')).arrayBuffer()));
80
+ const seams = {
81
+ getRunner: () => new MockTaskRunner(),
82
+ getOrchestrator: () => new LocalOrchestrator(),
83
+ getStateStore: () => new InMemoryStateStore(),
84
+ };
85
+ const budget = new Budget({ cores: 3, memory: 4 * 1024 ** 3 });
86
+ const held = await budget.acquire({ memory: 1024 ** 3 });
87
+ const withBudget = new Hono();
88
+ withBudget.route('/api/repos/:repo/workspaces/:ws/dataflow', createExecutionRoutes(new InMemoryStorage(), () => 'test-repo', {
89
+ ...seams,
90
+ width: budget.cores,
91
+ budget,
92
+ }));
93
+ assert.deepEqual(await budgetOf(withBudget), variant('success', some({ cores: 3n, memory: 4n * 1024n ** 3n, coresInUse: 1n, memoryInUse: 1024n ** 3n })));
94
+ held.release();
95
+ const without = new Hono();
96
+ without.route('/api/repos/:repo/workspaces/:ws/dataflow', createExecutionRoutes(new InMemoryStorage(), () => 'test-repo', seams));
97
+ assert.deepEqual(await budgetOf(without), variant('success', none));
98
+ });
99
+ });
100
+ describe('the server budget', () => {
101
+ it('refuses settings that do not resolve, naming the flag', async () => {
102
+ await assert.rejects(createServer({ singleRepoPath: '/nonexistent', budget: { jobs: '0' } }), { name: 'RangeError', message: "--jobs must be a positive integer, got '0'" });
103
+ await assert.rejects(createServer({ singleRepoPath: '/nonexistent', budget: { memory: 'lots' } }), { name: 'RangeError', message: "--memory must be a size in bytes, or with a K, M, G or T suffix (binary units, as 8G), got 'lots'" });
104
+ });
105
+ });
106
+ //# sourceMappingURL=dataflow.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataflow.spec.js","sourceRoot":"","sources":["../../../src/handlers/dataflow.spec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe,EAAE,eAAe,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC5G,OAAO,EACL,MAAM,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,cAAc,EAAE,aAAa,GAC7E,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE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Q,CAAC,mBAAmB,EAAE,GAAG,EAAE;IACjC,EAAE,CAAC,uDAAuD,EAAE,KAAK,IAAI,EAAE;QACrE,MAAM,MAAM,CAAC,OAAO,CAClB,YAAY,CAAC,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,EACvE,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,4CAA4C,EAAE,CAC9E,CAAC;QACF,MAAM,MAAM,CAAC,OAAO,CAClB,YAAY,CAAC,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC,EAC5E,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,mGAAmG,EAAE,CACrI,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -2,32 +2,35 @@
2
2
  * Copyright (c) 2025 Elara AI Pty Ltd
3
3
  * Licensed under BSL 1.1. See LICENSE for details.
4
4
  */
5
- import type { TreePath } from '@elaraai/e3-types';
6
- import { type StorageBackend, type TransferBackend } from '@elaraai/e3-core';
5
+ import { type TreePath } from '@elaraai/e3-types';
6
+ import type { StorageBackend, TransferBackend } from '@elaraai/e3-core';
7
7
  /**
8
8
  * List dataset fields at the given path.
9
9
  */
10
10
  export declare function listDatasets(storage: StorageBackend, repoPath: string, workspace: string, treePath: TreePath): Promise<Response>;
11
+ /** The size over which an object is answered with a URL to fetch it from
12
+ * rather than inline, when a transfer backend is configured. */
13
+ export declare const DOWNLOAD_REDIRECT_BYTES: number;
11
14
  /**
12
15
  * Get dataset value as raw BEAST2 bytes.
13
16
  *
14
- * For objects > 1MB, returns a JSON response with a download URL
15
- * that the client can fetch directly. This avoids browser issues
16
- * with opaque redirect responses from `redirect: 'manual'`.
17
+ * A collection held as a segment manifest is streamed as its splice, or, for a
18
+ * caller that asks for its segments, answered with JSON `{ manifest }`, the
19
+ * manifest's hash — the primary's, for an indexed record — for a client that
20
+ * downloads the manifest and its segment objects itself and splices them. A
21
+ * host that cannot stream a response answers a large collection no other way.
22
+ * Any other object over {@link DOWNLOAD_REDIRECT_BYTES}, when a transfer
23
+ * backend is configured, is answered with a JSON response carrying a download
24
+ * URL the client fetches directly. This avoids browser issues with opaque
25
+ * redirect responses from `redirect: 'manual'`.
17
26
  */
18
- export declare function getDataset(storage: StorageBackend, repoPath: string, workspace: string, treePath: TreePath, repo?: string, requestUrl?: string, transferBackend?: TransferBackend): Promise<Response>;
27
+ export declare function getDataset(storage: StorageBackend, repoPath: string, workspace: string, treePath: TreePath, repo?: string, requestUrl?: string, transferBackend?: TransferBackend, segments?: boolean): Promise<Response>;
19
28
  /** Default cap on a page's share of the source blob, in bytes. The
20
29
  * effective limit shrinks so `limit × avgElementBytes` stays under the
21
30
  * budget, bounding page payloads even for very wide rows. Deployments with
22
31
  * tighter response limits (e.g. Lambda proxy's 6 MB, base64-inflated) pass
23
32
  * a smaller budget through the route options. */
24
33
  export declare const PAGE_BYTE_BUDGET_DEFAULT: number;
25
- /** Largest blob the page endpoint will buffer when the storage backend
26
- * cannot serve ranged reads (`objects.readRange` absent) and every page
27
- * request must read the blob whole. Backends with ranged reads never
28
- * buffer the blob, so no cap applies — per-window memory is O(window) at
29
- * any blob size. */
30
- export declare const PAGE_READ_MAX_BYTES_DEFAULT: number;
31
34
  /** Window addressing for {@link getDatasetPage}: an element window
32
35
  * (`offset`/`limit`) or one writer segment (`segment`), optionally pinned
33
36
  * to a content hash. */
@@ -35,6 +38,20 @@ export interface DatasetPageWindow {
35
38
  offset?: number;
36
39
  limit?: number;
37
40
  segment?: number;
41
+ /** Read through one of a record's secondary indexes instead of the record
42
+ * itself. The window is then an ORDERED array in index order — a Dict would
43
+ * re-sort by its own key and throw that order away — carrying the index key,
44
+ * the primary key, the covering projection and, with {@link join}, the row. */
45
+ index?: string;
46
+ /** Fill each window entry's `row` from the primary.
47
+ *
48
+ * The window's primary keys are grouped by the primary segment that holds
49
+ * them, and each segment is read and decoded once, then dropped before the
50
+ * next: a page reads at most one segment per row and holds one decoded
51
+ * segment at a time, and one whose entries cluster costs far fewer reads
52
+ * than its row count. A view that renders from the index's covering
53
+ * projection alone leaves this off and never touches the primary. */
54
+ join?: boolean;
38
55
  /** Content hash the window is addressed against. When it matches the
39
56
  * current value the response is immutable (`Cache-Control: immutable`) —
40
57
  * the URL is then a pure function of the bytes, so any HTTP cache (edge
@@ -53,21 +70,16 @@ export interface DatasetPageWindow {
53
70
  * since v5 Set/Dict segments hold the canonical value in disjoint ascending
54
71
  * ranges. Segment windows return one writer batch verbatim.
55
72
  *
56
- * Collection datasets are stored segmented + indexed by every writer at
73
+ * Collection datasets are stored as segment manifests by every writer at
57
74
  * every size, so every window decodes only the touched segments (Set/Dict
58
- * windows verify the segment fences first and reject non-canonical blobs as
59
- * corrupt). A blob without a pageable index predates that contract and is
60
- * refused — there is no whole-decode fallback.
75
+ * windows verify the segment fences first and reject non-canonical ones as
76
+ * corrupt). A collection stored as one blob is an older e3's and is refused as
77
+ * `dataset_not_indexed`, naming the fix — there is no whole-decode fallback.
61
78
  */
62
79
  /** Server-side limits for {@link getDatasetPage}. */
63
80
  export interface DatasetPageLimits {
64
81
  /** Page byte budget (default {@link PAGE_BYTE_BUDGET_DEFAULT}). */
65
82
  byteBudget?: number;
66
- /** Blob-buffering cap for the whole-read fallback, applied only when the
67
- * storage backend has no ranged reads (default
68
- * {@link PAGE_READ_MAX_BYTES_DEFAULT}). Ranged backends never buffer the
69
- * blob, so no cap applies there. */
70
- readMaxBytes?: number;
71
83
  }
72
84
  export declare function getDatasetPage(storage: StorageBackend, repoPath: string, workspace: string, treePath: TreePath, window: DatasetPageWindow, limits?: DatasetPageLimits): Promise<Response>;
73
85
  /** Query for {@link findDatasetKey}, optionally pinned to a content hash
@@ -82,14 +94,22 @@ export interface DatasetFindQuery {
82
94
  key?: string;
83
95
  prefix?: string;
84
96
  fields?: string[];
97
+ /** Search one of a record's secondary indexes instead of the record itself.
98
+ * The rows the answer names are then the index's, in index order, and the
99
+ * key, prefix and fields forms address the index key (`ik`), the key the
100
+ * record's signature names: an exact one matches every entry under it. */
101
+ index?: string;
102
+ /** Lower bound: `.east` literals of a leading prefix of the key's FLATTENED
103
+ * field path, nested structs recursed in declaration order. For an index
104
+ * key that path begins inside `ik`, so `{ik: {status, due}, k: {plan, bin}}`
105
+ * flattens to `status, due, plan, bin` and `from=[late, 2026-10-01]` bounds
106
+ * `ik.status, ik.due`. Absent means "from the first row". */
107
+ from?: string[];
108
+ /** Upper bound, exclusive, on the same flattened prefix. Absent means "to
109
+ * the last row". */
110
+ to?: string[];
85
111
  hash?: string;
86
112
  }
87
- /** Server-side limits for {@link findDatasetKey}. */
88
- export interface DatasetFindLimits {
89
- /** Blob-buffering cap applied only on the whole-read fallback, as for
90
- * {@link DatasetPageLimits.readMaxBytes}. */
91
- readMaxBytes?: number;
92
- }
93
113
  /**
94
114
  * Locate a key (or string-prefix range) in a Set/Dict dataset by global
95
115
  * element row, without decoding the collection.
@@ -97,21 +117,27 @@ export interface DatasetFindLimits {
97
117
  * Rows address the canonical East key order — the same row space
98
118
  * {@link getDatasetPage} element windows serve — so the result plugs
99
119
  * straight into the paged preview's scroll position. The search
100
- * binary-searches the blob's segment fences (each segment's first key,
101
- * probed and cached per content hash) with the key type's East comparator,
102
- * then decodes at most the one owning segment (exact key) or the two edge
103
- * segments (prefix range).
120
+ * binary-searches the manifest's segment fences (each segment's first key)
121
+ * with the key type's East comparator, then decodes at most the one owning
122
+ * segment (exact key) or the two edge segments (a range — which is what an
123
+ * exact key is through an index: every entry under it).
104
124
  *
105
125
  * Responds with JSON `{ found, row, count }`: `row` is the match's global
106
126
  * element index (for a prefix, the range's first row; for a miss, the
107
127
  * key's insertion row), `count` the number of matched rows. Hash-pinned
108
128
  * queries are immutable-cacheable exactly like page windows.
109
129
  */
110
- export declare function findDatasetKey(storage: StorageBackend, repoPath: string, workspace: string, treePath: TreePath, query: DatasetFindQuery, limits?: DatasetFindLimits): Promise<Response>;
130
+ export declare function findDatasetKey(storage: StorageBackend, repoPath: string, workspace: string, treePath: TreePath, query: DatasetFindQuery): Promise<Response>;
111
131
  /**
112
- * Set dataset value from raw BEAST2 bytes.
132
+ * Set a dataset value from raw BEAST2 bytes, read as they arrive.
133
+ *
134
+ * @remarks
135
+ * The body's type is read from its head and checked against the dataset's. A
136
+ * collection then goes into the store through its door a segment of the body
137
+ * at a time; any other value is collected and decoded whole, so the handler
138
+ * holds it.
113
139
  */
114
- export declare function setDataset(storage: StorageBackend, repoPath: string, workspace: string, treePath: TreePath, body: Uint8Array): Promise<Response>;
140
+ export declare function setDataset(storage: StorageBackend, repoPath: string, workspace: string, treePath: TreePath, body: AsyncIterable<Uint8Array> | Iterable<Uint8Array>): Promise<Response>;
115
141
  /**
116
142
  * Get status detail for a single dataset.
117
143
  */
@@ -1 +1 @@
1
- {"version":3,"file":"datasets.d.ts","sourceRoot":"","sources":["../../../src/handlers/datasets.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AASlD,OAAO,EAAuB,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAKlG;;GAEG;AACH,wBAAsB,YAAY,CAChC,OAAO,EAAE,cAAc,EACvB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,QAAQ,GACjB,OAAO,CAAC,QAAQ,CAAC,CAOnB;AAID;;;;;;GAMG;AACH,wBAAsB,UAAU,CAC9B,OAAO,EAAE,cAAc,EACvB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,QAAQ,EAClB,IAAI,CAAC,EAAE,MAAM,EACb,UAAU,CAAC,EAAE,MAAM,EACnB,eAAe,CAAC,EAAE,eAAe,GAChC,OAAO,CAAC,QAAQ,CAAC,CA2DnB;AAQD;;;;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