@oomol-lab/open-flow 0.1.0-beta.12 → 0.1.0-beta.14

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 (43) hide show
  1. package/dist/browser/{DesignerIcon-ckcKnxxJ.js → DesignerIcon-Bzpx8BtG.js} +7 -2
  2. package/dist/browser/{_virtual_open-flow-twemoji-DJwKsM_w.js → _virtual_open-flow-twemoji-CpHJOEsk.js} +4028 -2
  3. package/dist/browser/carbon-Cn-DTyjG.js +54 -0
  4. package/dist/browser/{createResourceDialog-2pESP2wA.js → createResourceDialog-Cdixb0WC.js} +13 -13
  5. package/dist/browser/{dist-BZ5PTFAs.js → dist-D1VYgicl.js} +426 -305
  6. package/dist/browser/{dist-Bmb2mZvW.js → dist-DYjIVIZC.js} +22 -22
  7. package/dist/browser/{dist-Ce71Szg7.js → dist-DwvhuMxw.js} +15 -15
  8. package/dist/browser/{dist-DY4qlXTK.js → dist-TJfrvoIQ.js} +21 -21
  9. package/dist/browser/{esm-BPZ0P6x4.js → esm-3CD4_kEl.js} +1 -1
  10. package/dist/browser/flow-authoring-node.d.ts +4 -0
  11. package/dist/browser/flow-authoring.d.ts +1 -1
  12. package/dist/browser/flow-authoring.js +1525 -1454
  13. package/dist/browser/flow-change.d.ts +42 -0
  14. package/dist/browser/flow-change.js +1423 -1387
  15. package/dist/browser/{flowChanges-CHPdBmZb.js → flowChanges-CNSahvWH.js} +2791 -1609
  16. package/dist/browser/{flowWorkspace-BLGcgnHj.js → flowWorkspace-DvitOPqI.js} +50474 -49229
  17. package/dist/browser/inputValues-CczmpMHr.js +30 -0
  18. package/dist/browser/licenses.md +3 -1
  19. package/dist/browser/{select-Dn3vpjGC.js → select-DCGY8Lom.js} +2569 -2013
  20. package/dist/browser/{typeScriptSession-BoV-FDl3.js → typeScriptSession-DnAmJCzu.js} +6 -6
  21. package/dist/browser/workbench.css +1 -1
  22. package/dist/browser/workbench.js +828 -767
  23. package/dist/browser/workbenchSelect-DdXtOYD1.js +30 -0
  24. package/dist/common/control-api-conformance.js +5340 -218
  25. package/dist/common/control-api.d.ts +244 -11
  26. package/dist/common/control-api.js +2023 -1615
  27. package/dist/common/control-requests.js +1153 -1117
  28. package/dist/common/flow-agent.d.ts +10 -0
  29. package/dist/common/flow-encoding.js +162 -127
  30. package/dist/common/flow-semantics.d.ts +4 -2
  31. package/dist/common/flow-semantics.js +4495 -3448
  32. package/dist/common/mcp.js +1351 -1308
  33. package/dist/common/run-events.js +2 -1
  34. package/dist/common/run-lifecycle.d.ts +4 -0
  35. package/dist/common/run-lifecycle.js +30 -0
  36. package/dist/common/run-results.d.ts +57 -0
  37. package/dist/common/runtime-contract.d.ts +24 -0
  38. package/dist/common/scheduler.d.ts +29 -9
  39. package/dist/common/scheduler.js +3246 -2323
  40. package/package.json +1 -1
  41. package/dist/browser/carbon-DMCVsjHo.js +0 -53
  42. package/dist/browser/waitNotificationInputs-BFbQUOyp.js +0 -29
  43. package/dist/browser/workbenchSelect-DzF8oik9.js +0 -435
@@ -1,3 +1,6 @@
1
+ import type { ResultQuery } from './run-results.js';
2
+ import { decodeResultList, decodeResultRead } from './run-results.js';
3
+ export { readResult, parseResultQuery, decodeResultList, decodeResultRead, type ResultCall, type ResultInfo, type ResultPage, type ResultQuery, } from './run-results.js';
1
4
  import type { RunStatus } from './run-lifecycle.js';
2
5
  import type { ChangeOperation, InputPortDefinition, JsonValue, PortDefinition, RevisionContent, TriggerKeySnapshot, WaitAction } from '../browser/flow-change.js';
3
6
  export type { JsonValue, TriggerKeySnapshot, WaitAction } from '../browser/flow-change.js';
@@ -222,14 +225,19 @@ export interface Run {
222
225
  readonly status: RunStatus;
223
226
  readonly version: 1;
224
227
  }
225
- interface RunDetailsBase extends Run {
228
+ type RunDetailsBase = Omit<Run, 'status'> & {
226
229
  readonly closureDigest: string;
227
230
  readonly engineContract: string;
228
231
  readonly engineDigest: string;
229
232
  readonly eventsExpiresAt?: string;
230
233
  readonly modelVersion: number;
231
234
  readonly revisionDigest: string;
232
- readonly waiting?: {
235
+ } & ({
236
+ readonly status: Exclude<RunStatus, 'waiting'>;
237
+ readonly waiting?: never;
238
+ } | {
239
+ readonly status: 'waiting';
240
+ readonly waiting: {
233
241
  readonly actions: readonly ['continue'] | readonly ['approve', 'reject'];
234
242
  readonly expiresAt: string;
235
243
  readonly nodeId: string;
@@ -237,7 +245,7 @@ interface RunDetailsBase extends Run {
237
245
  readonly waitId: string;
238
246
  readonly waitingSince: string;
239
247
  };
240
- }
248
+ });
241
249
  export type DraftRun = RunDetailsBase & {
242
250
  readonly source: 'draft';
243
251
  };
@@ -258,14 +266,8 @@ export interface RunPage {
258
266
  readonly runs: readonly Run[];
259
267
  readonly version: 1;
260
268
  }
261
- export type RunEventKind = 'node.artifact' | 'node.completed' | 'node.failed' | 'node.log' | 'node.progress' | 'node.started' | 'run.canceled' | 'run.completed' | 'run.events-truncated' | 'run.failed' | 'run.indeterminate' | 'run.progress' | 'run.queued' | 'run.resolved' | 'run.started' | 'run.waiting';
262
- export interface RunEvent {
263
- readonly createdAt: string;
264
- readonly kind: RunEventKind;
265
- readonly payload: Readonly<Record<string, JsonValue>>;
266
- readonly sequence: number;
267
- readonly sourceSequence?: number;
268
- }
269
+ export type RunEvent = Readonly<ReturnType<typeof decodeRunEvent>>;
270
+ export type RunEventKind = RunEvent['kind'];
269
271
  export interface RunEvents {
270
272
  readonly done: boolean;
271
273
  readonly events: readonly RunEvent[];
@@ -318,6 +320,233 @@ export declare class ApiError extends Error {
318
320
  readonly status: number;
319
321
  constructor(status: number, code: string, message: string);
320
322
  }
323
+ export declare function decodeRunEvent(value: unknown): {
324
+ readonly createdAt: string;
325
+ readonly sequence: number;
326
+ readonly kind: "run.queued";
327
+ readonly payload: {
328
+ readonly flowId?: undefined;
329
+ readonly scopeId?: undefined;
330
+ readonly progress?: undefined;
331
+ readonly expiresAt?: undefined;
332
+ readonly nodeId?: undefined;
333
+ readonly waitingSince?: undefined;
334
+ readonly action?: undefined;
335
+ readonly resolvedAt?: undefined;
336
+ readonly waitId?: undefined;
337
+ readonly result?: undefined;
338
+ };
339
+ } | {
340
+ readonly createdAt: string;
341
+ readonly sequence: number;
342
+ readonly kind: "run.started";
343
+ readonly payload: {
344
+ readonly flowId: string;
345
+ readonly scopeId: string;
346
+ readonly parentScopeId?: string | undefined;
347
+ readonly progress?: undefined;
348
+ readonly expiresAt?: undefined;
349
+ readonly nodeId?: undefined;
350
+ readonly waitingSince?: undefined;
351
+ readonly action?: undefined;
352
+ readonly resolvedAt?: undefined;
353
+ readonly waitId?: undefined;
354
+ readonly result?: undefined;
355
+ };
356
+ } | {
357
+ readonly createdAt: string;
358
+ readonly sequence: number;
359
+ readonly kind: "run.progress";
360
+ readonly payload: {
361
+ readonly flowId: string;
362
+ readonly scopeId: string;
363
+ readonly progress: number;
364
+ readonly expiresAt?: undefined;
365
+ readonly nodeId?: undefined;
366
+ readonly waitingSince?: undefined;
367
+ readonly action?: undefined;
368
+ readonly resolvedAt?: undefined;
369
+ readonly waitId?: undefined;
370
+ readonly result?: undefined;
371
+ };
372
+ } | {
373
+ readonly createdAt: string;
374
+ readonly sequence: number;
375
+ readonly kind: "run.waiting";
376
+ readonly payload: {
377
+ readonly flowId?: undefined;
378
+ readonly scopeId?: undefined;
379
+ readonly progress?: undefined;
380
+ readonly expiresAt: string;
381
+ readonly nodeId: string;
382
+ readonly waitId: string;
383
+ readonly waitingSince: string;
384
+ readonly action?: undefined;
385
+ readonly resolvedAt?: undefined;
386
+ readonly result?: undefined;
387
+ };
388
+ } | {
389
+ readonly createdAt: string;
390
+ readonly sequence: number;
391
+ readonly kind: "run.resolved";
392
+ readonly payload: {
393
+ readonly flowId?: undefined;
394
+ readonly scopeId?: undefined;
395
+ readonly progress?: undefined;
396
+ readonly expiresAt?: undefined;
397
+ readonly nodeId?: undefined;
398
+ readonly waitingSince?: undefined;
399
+ readonly action: "approve" | "continue" | "reject";
400
+ readonly resolvedAt: string;
401
+ readonly waitId: string;
402
+ readonly result?: undefined;
403
+ };
404
+ } | {
405
+ readonly createdAt: string;
406
+ readonly sequence: number;
407
+ readonly kind: "run.canceled" | "run.completed" | "run.failed" | "run.indeterminate";
408
+ readonly payload: {
409
+ readonly flowId?: undefined;
410
+ readonly scopeId?: undefined;
411
+ readonly progress?: undefined;
412
+ readonly expiresAt?: undefined;
413
+ readonly nodeId?: undefined;
414
+ readonly waitingSince?: undefined;
415
+ readonly action?: undefined;
416
+ readonly resolvedAt?: undefined;
417
+ readonly waitId?: undefined;
418
+ readonly result: JsonValue;
419
+ };
420
+ } | {
421
+ readonly createdAt: string;
422
+ readonly sequence: number;
423
+ readonly kind: "run.events-truncated";
424
+ readonly payload: {
425
+ [k: string]: JsonValue;
426
+ };
427
+ } | {
428
+ readonly createdAt: string;
429
+ readonly sequence: number;
430
+ readonly kind: "node.started";
431
+ readonly payload: {
432
+ readonly progress?: undefined;
433
+ readonly expiresAt?: undefined;
434
+ readonly waitingSince?: undefined;
435
+ readonly action?: undefined;
436
+ readonly resolvedAt?: undefined;
437
+ readonly waitId?: undefined;
438
+ readonly result?: undefined;
439
+ readonly flowId: string;
440
+ readonly scopeId: string;
441
+ readonly nodeId: string;
442
+ readonly executionId: string;
443
+ readonly nodeKind?: string | undefined;
444
+ readonly nodeTitle?: string | undefined;
445
+ readonly operation?: string | undefined;
446
+ };
447
+ } | {
448
+ readonly createdAt: string;
449
+ readonly sequence: number;
450
+ readonly kind: "node.completed";
451
+ readonly payload: {
452
+ readonly progress?: undefined;
453
+ readonly expiresAt?: undefined;
454
+ readonly waitingSince?: undefined;
455
+ readonly action?: undefined;
456
+ readonly resolvedAt?: undefined;
457
+ readonly waitId?: undefined;
458
+ readonly result?: undefined;
459
+ readonly flowId: string;
460
+ readonly scopeId: string;
461
+ readonly nodeId: string;
462
+ readonly executionId: string;
463
+ readonly outputs: {
464
+ [k: string]: JsonValue;
465
+ };
466
+ };
467
+ } | {
468
+ readonly createdAt: string;
469
+ readonly sequence: number;
470
+ readonly kind: "node.failed";
471
+ readonly payload: {
472
+ readonly progress?: undefined;
473
+ readonly expiresAt?: undefined;
474
+ readonly waitingSince?: undefined;
475
+ readonly action?: undefined;
476
+ readonly resolvedAt?: undefined;
477
+ readonly waitId?: undefined;
478
+ readonly result?: undefined;
479
+ readonly flowId: string;
480
+ readonly scopeId: string;
481
+ readonly nodeId: string;
482
+ readonly executionId: string;
483
+ readonly error: {
484
+ readonly code: string;
485
+ readonly message: string;
486
+ };
487
+ };
488
+ } | {
489
+ readonly createdAt: string;
490
+ readonly sequence: number;
491
+ readonly kind: "node.log";
492
+ readonly payload: {
493
+ readonly progress?: undefined;
494
+ readonly expiresAt?: undefined;
495
+ readonly waitingSince?: undefined;
496
+ readonly action?: undefined;
497
+ readonly resolvedAt?: undefined;
498
+ readonly waitId?: undefined;
499
+ readonly result?: undefined;
500
+ readonly flowId: string;
501
+ readonly scopeId: string;
502
+ readonly nodeId: string;
503
+ readonly executionId: string;
504
+ readonly level: "debug" | "error" | "info" | "warn";
505
+ readonly message: string;
506
+ };
507
+ } | {
508
+ readonly createdAt: string;
509
+ readonly sequence: number;
510
+ readonly kind: "node.progress";
511
+ readonly payload: {
512
+ readonly expiresAt?: undefined;
513
+ readonly waitingSince?: undefined;
514
+ readonly action?: undefined;
515
+ readonly resolvedAt?: undefined;
516
+ readonly waitId?: undefined;
517
+ readonly result?: undefined;
518
+ readonly flowId: string;
519
+ readonly scopeId: string;
520
+ readonly nodeId: string;
521
+ readonly executionId: string;
522
+ readonly progress: number;
523
+ };
524
+ } | {
525
+ readonly createdAt: string;
526
+ readonly sequence: number;
527
+ readonly kind: "node.artifact";
528
+ readonly payload: {
529
+ readonly progress?: undefined;
530
+ readonly expiresAt?: undefined;
531
+ readonly waitingSince?: undefined;
532
+ readonly action?: undefined;
533
+ readonly resolvedAt?: undefined;
534
+ readonly waitId?: undefined;
535
+ readonly result?: undefined;
536
+ readonly flowId: string;
537
+ readonly scopeId: string;
538
+ readonly nodeId: string;
539
+ readonly executionId: string;
540
+ readonly artifact: {
541
+ readonly kind: 'artifact';
542
+ readonly id: string;
543
+ readonly name: string;
544
+ readonly size: number;
545
+ readonly digest: string;
546
+ readonly mediaType?: string | undefined;
547
+ };
548
+ };
549
+ };
321
550
  export declare class ControlClient {
322
551
  private readonly requestControl;
323
552
  constructor(requestControl: ControlRequest);
@@ -390,6 +619,9 @@ export declare class ControlClient {
390
619
  readonly after?: number;
391
620
  readonly limit?: number;
392
621
  }, signal?: AbortSignal): Promise<RunEvents>;
622
+ listRunResults(runId: string, after?: string, signal?: AbortSignal): Promise<ReturnType<typeof decodeResultList>>;
623
+ readRunResult(runId: string, resultId: string, options?: ResultQuery, signal?: AbortSignal): Promise<ReturnType<typeof decodeResultRead>>;
624
+ downloadRunResult(runId: string, resultId: string, signal?: AbortSignal): Promise<Blob>;
393
625
  getRunResult(runId: string, signal?: AbortSignal): Promise<RunResult>;
394
626
  cancelRun(runId: string): Promise<RunCancellation>;
395
627
  resolveRunWait(runId: string, waitId: string, action: WaitAction): Promise<{
@@ -402,5 +634,6 @@ export declare class ControlClient {
402
634
  readonly waitId: string;
403
635
  }>;
404
636
  private connectorActions;
637
+ private response;
405
638
  protected request<Value = unknown>(path: string, init?: RequestInit): Promise<Value>;
406
639
  }