@deepnoodle/mobius 0.0.14 → 0.0.16
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/api/index.d.ts +8 -2
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/schema.d.ts +305 -75
- package/dist/api/schema.d.ts.map +1 -1
- package/dist/client.d.ts +3 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js.map +1 -1
- package/package.json +1 -1
package/dist/api/schema.d.ts
CHANGED
|
@@ -294,7 +294,7 @@ export interface paths {
|
|
|
294
294
|
};
|
|
295
295
|
/**
|
|
296
296
|
* List workflow runs
|
|
297
|
-
* @description Supports cursor-based pagination and keyset filtering by status, workflow type, queue, parent run, and
|
|
297
|
+
* @description Supports cursor-based pagination and keyset filtering by status, workflow type, queue, parent run, and source. When `has_more` is true, pass the returned `next_cursor` back on the next call to walk the result set.
|
|
298
298
|
*/
|
|
299
299
|
get: operations["listRuns"];
|
|
300
300
|
put?: never;
|
|
@@ -335,7 +335,47 @@ export interface paths {
|
|
|
335
335
|
patch?: never;
|
|
336
336
|
trace?: never;
|
|
337
337
|
};
|
|
338
|
-
"/v1/projects/{project}/runs/{id}/
|
|
338
|
+
"/v1/projects/{project}/runs/{id}/forks": {
|
|
339
|
+
parameters: {
|
|
340
|
+
query?: never;
|
|
341
|
+
header?: never;
|
|
342
|
+
path?: never;
|
|
343
|
+
cookie?: never;
|
|
344
|
+
};
|
|
345
|
+
get?: never;
|
|
346
|
+
put?: never;
|
|
347
|
+
/**
|
|
348
|
+
* Fork a terminal run from a specific step
|
|
349
|
+
* @description Creates a new active run that inherits step history before `from_step_id` and resumes execution at that step. The request must provide a new logical `external_id`. `external_id` keeps the normal project-wide run uniqueness semantics; retrying the same fork request with the same source run, fork step, `external_id`, and effective target definition version is idempotent and returns the existing forked run with `202` whether that fork is still active or already terminal. Omitting `definition_version_id` keeps the source run's definition version; supplying it pins post-fork execution to that explicit version, and a retry that changes this value is an `idempotency_conflict`.
|
|
350
|
+
*/
|
|
351
|
+
post: operations["forkRun"];
|
|
352
|
+
delete?: never;
|
|
353
|
+
options?: never;
|
|
354
|
+
head?: never;
|
|
355
|
+
patch?: never;
|
|
356
|
+
trace?: never;
|
|
357
|
+
};
|
|
358
|
+
"/v1/projects/{project}/runs/{id}/steps": {
|
|
359
|
+
parameters: {
|
|
360
|
+
query?: never;
|
|
361
|
+
header?: never;
|
|
362
|
+
path?: never;
|
|
363
|
+
cookie?: never;
|
|
364
|
+
};
|
|
365
|
+
/**
|
|
366
|
+
* List run steps
|
|
367
|
+
* @description Lists durable `RunStep` records for a run. Run steps are the canonical execution history and are returned in ascending `transition_seq` order. Pagination continues from that same order so clients can replay or reconstruct the ledger incrementally. Run steps remain available after terminal job rows are TTL-swept; use jobs only for live worker claim state.
|
|
368
|
+
*/
|
|
369
|
+
get: operations["listRunSteps"];
|
|
370
|
+
put?: never;
|
|
371
|
+
post?: never;
|
|
372
|
+
delete?: never;
|
|
373
|
+
options?: never;
|
|
374
|
+
head?: never;
|
|
375
|
+
patch?: never;
|
|
376
|
+
trace?: never;
|
|
377
|
+
};
|
|
378
|
+
"/v1/projects/{project}/runs/{id}/steps/{step_id}": {
|
|
339
379
|
parameters: {
|
|
340
380
|
query?: never;
|
|
341
381
|
header?: never;
|
|
@@ -343,10 +383,10 @@ export interface paths {
|
|
|
343
383
|
cookie?: never;
|
|
344
384
|
};
|
|
345
385
|
/**
|
|
346
|
-
*
|
|
347
|
-
* @description Returns durable
|
|
386
|
+
* Get one run step
|
|
387
|
+
* @description Returns a single durable `RunStep` row for a workflow run. Run steps are the canonical execution history; linked job state, when present, is live worker-claim metadata and may disappear after terminal job retention.
|
|
348
388
|
*/
|
|
349
|
-
get: operations["
|
|
389
|
+
get: operations["getRunStep"];
|
|
350
390
|
put?: never;
|
|
351
391
|
post?: never;
|
|
352
392
|
delete?: never;
|
|
@@ -390,18 +430,21 @@ export interface paths {
|
|
|
390
430
|
* timestamps changed; `data` is a full WorkflowRun.
|
|
391
431
|
* - `job_updated` — a single job's status or attempt
|
|
392
432
|
* advanced; `data` is a full Job.
|
|
393
|
-
* - `
|
|
394
|
-
*
|
|
395
|
-
* `data` is a WorkflowActionLog row.
|
|
433
|
+
* - `run_step_updated` — a durable run-step row was created
|
|
434
|
+
* or advanced; `data` is a full RunStep.
|
|
396
435
|
* - `interaction_created` / `interaction_completed` /
|
|
397
436
|
* `interaction_group_claimed` /
|
|
398
437
|
* `interaction_group_released` — interaction lifecycle;
|
|
399
438
|
* `data` is a full Interaction.
|
|
400
439
|
* - `custom` — a worker emitted a domain-specific event via
|
|
401
440
|
* `POST /v1/projects/{project}/jobs/{id}/events`. `data`
|
|
402
|
-
* carries `{kind: "custom", type, job_id, data
|
|
403
|
-
* `type` is the worker-supplied name and
|
|
404
|
-
* the worker payload.
|
|
441
|
+
* carries `{kind: "custom", type, job_id, data, step_id?,
|
|
442
|
+
* path_id?}` where `type` is the worker-supplied name and
|
|
443
|
+
* inner `data` is the worker payload. `step_id` is set when
|
|
444
|
+
* the originating job is owned by a workflow step and lets
|
|
445
|
+
* consumers correlate the event to the durable run step
|
|
446
|
+
* after the job is reaped on TTL; `path_id` mirrors the
|
|
447
|
+
* run's execution path for path-scoped consumers.
|
|
405
448
|
*
|
|
406
449
|
* Pass `?since=<seq>` on reconnect to replay any durable events the server has recorded past that cursor before switching back to live updates; clients should record the largest `seq` they have observed. Comment frames (`:keepalive`) are emitted every ~15s to keep intermediaries from closing the connection.
|
|
407
450
|
*
|
|
@@ -427,7 +470,7 @@ export interface paths {
|
|
|
427
470
|
put?: never;
|
|
428
471
|
/**
|
|
429
472
|
* Request cancellation of an in-flight run
|
|
430
|
-
* @description Records `cancel_requested_at`, terminalizes the run as failed with `error_type=run_cancelled`, and closes any non-terminal jobs created by the run.
|
|
473
|
+
* @description Records `cancel_requested_at`, terminalizes the run as failed with `error_type=run_cancelled`, and closes any non-terminal jobs created by the run.
|
|
431
474
|
*/
|
|
432
475
|
post: operations["cancelRun"];
|
|
433
476
|
delete?: never;
|
|
@@ -1644,6 +1687,10 @@ export interface components {
|
|
|
1644
1687
|
code: string;
|
|
1645
1688
|
/** @description Human-readable error message */
|
|
1646
1689
|
message: string;
|
|
1690
|
+
/** @description Optional structured details specific to a `code`. Endpoints that set this document the per-code shape inline. Absent for codes whose `code` + `message` are sufficient. */
|
|
1691
|
+
details?: {
|
|
1692
|
+
[key: string]: unknown;
|
|
1693
|
+
};
|
|
1647
1694
|
};
|
|
1648
1695
|
};
|
|
1649
1696
|
/** @description Project ID. */
|
|
@@ -2422,12 +2469,20 @@ export interface components {
|
|
|
2422
2469
|
waiting_on_signal_names: string[];
|
|
2423
2470
|
interaction_ids: string[];
|
|
2424
2471
|
};
|
|
2425
|
-
/** @description
|
|
2472
|
+
/** @description Live work-pool summary for this run. Reflects the transient state of the worker job queue, not durable step progress — terminal jobs are swept on a TTL and stop contributing to these counts. Use `step_counts` for run-progress UI; use this field to answer "is anything claimable right now and is a worker holding it?". `ready` counts pending jobs whose `scheduled_at` has arrived and can be claimed now; `scheduled` counts pending jobs intentionally waiting for a future retry/backoff; `claimed` counts jobs currently held by workers. */
|
|
2426
2473
|
WorkflowRunJobCounts: {
|
|
2427
2474
|
ready: number;
|
|
2428
2475
|
scheduled: number;
|
|
2429
2476
|
claimed: number;
|
|
2430
2477
|
};
|
|
2478
|
+
/** @description Aggregate count of run-step rows for this run grouped by status. Counts every attempt of every step (one row per step x attempt x path), so it reflects durable progress rather than the live worker pool. Use this for run-progress UI; use `job_counts` for live claimability. */
|
|
2479
|
+
WorkflowRunStepCounts: {
|
|
2480
|
+
pending: number;
|
|
2481
|
+
running: number;
|
|
2482
|
+
completed: number;
|
|
2483
|
+
failed: number;
|
|
2484
|
+
cancelled: number;
|
|
2485
|
+
};
|
|
2431
2486
|
WorkflowRunError: {
|
|
2432
2487
|
path_id?: string;
|
|
2433
2488
|
error_type: string;
|
|
@@ -2453,8 +2508,10 @@ export interface components {
|
|
|
2453
2508
|
status: components["schemas"]["WorkflowRunStatus"];
|
|
2454
2509
|
/** @description Current path counts derived from the run projection. */
|
|
2455
2510
|
path_counts: components["schemas"]["WorkflowRunPathCounts"];
|
|
2456
|
-
/** @description
|
|
2511
|
+
/** @description Live work-pool summary derived from the run projection. See `WorkflowRunJobCounts`. */
|
|
2457
2512
|
job_counts: components["schemas"]["WorkflowRunJobCounts"];
|
|
2513
|
+
/** @description Durable run-step counts grouped by status. See `WorkflowRunStepCounts`. */
|
|
2514
|
+
step_counts: components["schemas"]["WorkflowRunStepCounts"];
|
|
2458
2515
|
/** @description Always-present aggregate of waiting paths. */
|
|
2459
2516
|
wait_summary: components["schemas"]["WorkflowRunWaitSummary"];
|
|
2460
2517
|
/** @description Run-level errors that caused a failed lifecycle. */
|
|
@@ -2477,12 +2534,14 @@ export interface components {
|
|
|
2477
2534
|
actor_type?: string;
|
|
2478
2535
|
/** @description ID of the actor that started this run. */
|
|
2479
2536
|
actor_id?: string;
|
|
2480
|
-
/** @description
|
|
2481
|
-
|
|
2482
|
-
/** @description
|
|
2537
|
+
/** @description Type of source that requested this run (api, trigger, slack, fork, tool). */
|
|
2538
|
+
source_type?: string;
|
|
2539
|
+
/** @description Identifier for the run source within its source type. */
|
|
2540
|
+
source_id?: string;
|
|
2541
|
+
/** @description Human-readable label for the run source. */
|
|
2542
|
+
source_label?: string;
|
|
2543
|
+
/** @description Caller-supplied logical correlation key for this run. Unique within the project; identifies a logical job across attempts. See the `external_id` description on `POST /runs` for the conflict semantics that govern duplicate values. */
|
|
2483
2544
|
external_id?: string;
|
|
2484
|
-
/** @description Compatibility boolean set when cancellation was requested. Use `cancel_requested_at` for audit detail and `status` for terminal checks. */
|
|
2485
|
-
cancel_requested?: boolean;
|
|
2486
2545
|
/**
|
|
2487
2546
|
* Format: date-time
|
|
2488
2547
|
* @description Timestamp when cancellation was requested.
|
|
@@ -2514,17 +2573,97 @@ export interface components {
|
|
|
2514
2573
|
*/
|
|
2515
2574
|
wall_clock_deadline_at?: string;
|
|
2516
2575
|
/**
|
|
2517
|
-
* @description Typed run-level failure cause: `run_timeout`, `run_cancelled`, `
|
|
2576
|
+
* @description Typed run-level failure cause: `run_timeout`, `run_cancelled`, `step_failed`, or `run_failed`. Its own vocabulary, not a superset of the job-level `error_type`. Present when `status=failed`.
|
|
2518
2577
|
* @enum {string}
|
|
2519
2578
|
*/
|
|
2520
|
-
error_type?: "run_timeout" | "run_cancelled" | "
|
|
2579
|
+
error_type?: "run_timeout" | "run_cancelled" | "step_failed" | "run_failed";
|
|
2521
2580
|
/** @description Run-level cascade config frozen when the run was started. */
|
|
2522
2581
|
resolved_config?: components["schemas"]["ResolvedConfig"];
|
|
2523
|
-
/** @description Default
|
|
2524
|
-
|
|
2582
|
+
/** @description Default step-level cascade config inherited by each run step unless the step's own spec overrides it. */
|
|
2583
|
+
default_step_config?: components["schemas"]["ResolvedConfig"];
|
|
2584
|
+
/** @description Source run and step this run was forked from. */
|
|
2585
|
+
forked_from?: components["schemas"]["RunForkLineage"];
|
|
2525
2586
|
} & {
|
|
2526
2587
|
[key: string]: unknown;
|
|
2527
2588
|
};
|
|
2589
|
+
RunForkLineage: {
|
|
2590
|
+
run_id: string;
|
|
2591
|
+
step_id: string;
|
|
2592
|
+
path_id: string;
|
|
2593
|
+
step_name: string;
|
|
2594
|
+
};
|
|
2595
|
+
/** @description Fork creation request. Tags are inherited from the source run and then overlaid with request tags using the same tag inheritance rules as run creation: request values replace matching source keys, and an empty string removes the inherited key. `definition_version_id` changes only the post-fork execution version; it does not affect inherited history. When omitted, the fork uses the source run's definition version. */
|
|
2596
|
+
RunForkRequest: {
|
|
2597
|
+
/** @description Run-step identifier to fork from. Use the `id` returned by `RunStep`. */
|
|
2598
|
+
from_step_id: string;
|
|
2599
|
+
/** @description Logical external identifier for the new forked run. It must be unique within the project, just like other workflow-run `external_id` values. */
|
|
2600
|
+
external_id: string;
|
|
2601
|
+
/** @description Optional target workflow definition version for post-fork execution. It must belong to the same workflow definition as the source run. Omit it to use the source run's original definition version. Inherited history remains tied to the source run. */
|
|
2602
|
+
definition_version_id?: string;
|
|
2603
|
+
/** @description Tags to overlay on the inherited source-run tags. Empty string values remove inherited keys. */
|
|
2604
|
+
tags?: components["schemas"]["TagMap"];
|
|
2605
|
+
};
|
|
2606
|
+
/** @enum {string} */
|
|
2607
|
+
RunStepSource: "executed" | "inherited";
|
|
2608
|
+
/** @enum {string} */
|
|
2609
|
+
RunStepKind: "worker_action" | "server_action" | "control";
|
|
2610
|
+
/** @enum {string} */
|
|
2611
|
+
RunStepStatus: "pending" | "running" | "completed" | "failed" | "cancelled";
|
|
2612
|
+
/** @description Durable execution-history row for one step attempt on one workflow path. RunStep is the canonical source for run history; linked Job rows are transient worker-claim records and may be TTL-swept after terminal retention. */
|
|
2613
|
+
RunStep: {
|
|
2614
|
+
/** @description Stable run-step identifier. Use this value as `{step_id}` in `GET /runs/{id}/steps/{step_id}` and as `from_step_id` in `POST /runs/{id}/forks`. */
|
|
2615
|
+
id: string;
|
|
2616
|
+
/** @description Workflow run that owns this step row. */
|
|
2617
|
+
run_id: string;
|
|
2618
|
+
/** @description Workflow path identifier for branch/fanout execution. */
|
|
2619
|
+
path_id: string;
|
|
2620
|
+
/** @description Step name from the workflow definition. */
|
|
2621
|
+
step_name: string;
|
|
2622
|
+
/** @description Action identifier for executable steps; empty for control-only steps. */
|
|
2623
|
+
action: string;
|
|
2624
|
+
/** @description Zero-based retry attempt for this step/path pair. */
|
|
2625
|
+
attempt: number;
|
|
2626
|
+
/**
|
|
2627
|
+
* Format: int64
|
|
2628
|
+
* @description Per-run monotonic transition order for projection and fork reconstruction.
|
|
2629
|
+
*/
|
|
2630
|
+
transition_seq: number;
|
|
2631
|
+
/** @description Why this ledger row exists: worker-claimable action, synchronous server action, or Mobius control transition. */
|
|
2632
|
+
kind: components["schemas"]["RunStepKind"];
|
|
2633
|
+
/** @description Whether this row was executed in this run or inherited from a source run during fork creation. */
|
|
2634
|
+
source: components["schemas"]["RunStepSource"];
|
|
2635
|
+
status: components["schemas"]["RunStepStatus"];
|
|
2636
|
+
/** @description Resolved parameters/input for this step attempt. */
|
|
2637
|
+
parameters: {
|
|
2638
|
+
[key: string]: unknown;
|
|
2639
|
+
};
|
|
2640
|
+
/** @description Linked live worker job when one exists. Terminal jobs may be reaped while the RunStep remains. */
|
|
2641
|
+
job_id?: string;
|
|
2642
|
+
/** @description Base64-encoded serialized step result, when present. */
|
|
2643
|
+
result_b64?: string;
|
|
2644
|
+
/** @description Base64-encoded serialized run state immediately after this step completed. Omitted unless requested with `include=run_state_after`. */
|
|
2645
|
+
run_state_after_b64?: string;
|
|
2646
|
+
error_type?: string;
|
|
2647
|
+
error_message?: string;
|
|
2648
|
+
/** Format: date-time */
|
|
2649
|
+
started_at?: string;
|
|
2650
|
+
/** Format: date-time */
|
|
2651
|
+
completed_at?: string;
|
|
2652
|
+
/** @description Originating run ID when this row was inherited or derived from another run. */
|
|
2653
|
+
source_run_id?: string;
|
|
2654
|
+
/** @description Originating step ID when this row was inherited or derived from another run. */
|
|
2655
|
+
source_step_id?: string;
|
|
2656
|
+
/** Format: date-time */
|
|
2657
|
+
created_at: string;
|
|
2658
|
+
/** Format: date-time */
|
|
2659
|
+
updated_at: string;
|
|
2660
|
+
};
|
|
2661
|
+
/** @description Paginated durable run-step history. Use this response for historical run inspection because linked job rows are live worker state and may be TTL-swept. */
|
|
2662
|
+
RunStepListResponse: {
|
|
2663
|
+
items: components["schemas"]["RunStep"][];
|
|
2664
|
+
has_more: boolean;
|
|
2665
|
+
next_cursor?: string;
|
|
2666
|
+
};
|
|
2528
2667
|
/** @description Paginated list of workflow runs. */
|
|
2529
2668
|
WorkflowRunListResponse: {
|
|
2530
2669
|
/** @description The list of results for this page. */
|
|
@@ -2534,7 +2673,7 @@ export interface components {
|
|
|
2534
2673
|
/** @description Opaque cursor for fetching the next page. Present only when has_more is true. */
|
|
2535
2674
|
next_cursor?: string;
|
|
2536
2675
|
};
|
|
2537
|
-
/** @description Detailed workflow run including its spec snapshot, terminal result, and
|
|
2676
|
+
/** @description Detailed workflow run including its spec snapshot, terminal result, and the first page of run steps. */
|
|
2538
2677
|
WorkflowRunDetail: components["schemas"]["WorkflowRun"] & {
|
|
2539
2678
|
/** @description Current path-level execution projection for this run. */
|
|
2540
2679
|
paths: components["schemas"]["WorkflowRunPath"][];
|
|
@@ -2542,8 +2681,10 @@ export interface components {
|
|
|
2542
2681
|
spec?: components["schemas"]["WorkflowSpec"];
|
|
2543
2682
|
/** @description Base64-encoded terminal result blob */
|
|
2544
2683
|
result_b64?: string;
|
|
2545
|
-
/** @description
|
|
2546
|
-
|
|
2684
|
+
/** @description First page of durable run-step history, ordered by `transition_seq` ascending. Use this canonical history for execution inspection and fork planning, including after terminal job rows have been TTL-swept. */
|
|
2685
|
+
steps: components["schemas"]["RunStep"][];
|
|
2686
|
+
/** @description Cursor for the next page of durable run-step history. */
|
|
2687
|
+
steps_next_cursor?: string;
|
|
2547
2688
|
};
|
|
2548
2689
|
/** @description Run a previously-created workflow definition. Selected by `mode: saved` on `POST /v1/projects/{project}/runs`. The run inherits the workflow definition's tags at start time; see the `tags` field below for the override rules. */
|
|
2549
2690
|
StartSavedRunRequest: {
|
|
@@ -2566,7 +2707,7 @@ export interface components {
|
|
|
2566
2707
|
};
|
|
2567
2708
|
/** @description Tags applied on top of the workflow definition's inherited tags. Caller keys override on conflict; an entry whose value is the empty string opts the inherited key out entirely (so the run does not carry it). Setting a tag value to "" is therefore reserved as the opt-out signal — use a placeholder value if you actually want a stored empty value. */
|
|
2568
2709
|
tags?: components["schemas"]["TagMap"];
|
|
2569
|
-
/** @description Caller-supplied
|
|
2710
|
+
/** @description Caller-supplied logical correlation key for this run. Unique within the project. If the same external_id is reused while the prior run is still active, the existing run is returned idempotently. Once the prior run is terminal (completed or failed), a duplicate POST returns 409 with code `external_id_conflict` and the `existing_run_id` and `status` carried in `details`. To launch a fresh attempt for the same logical job after a terminal run, use a new external_id (e.g. suffix with an attempt counter). */
|
|
2570
2711
|
external_id?: string;
|
|
2571
2712
|
/** @description Run-level cascade config overrides applied when starting the run. */
|
|
2572
2713
|
config?: components["schemas"]["ConfigEntries"];
|
|
@@ -2592,7 +2733,7 @@ export interface components {
|
|
|
2592
2733
|
};
|
|
2593
2734
|
/** @description Initial tags for this inline run. Inline runs have no parent workflow definition, so there is nothing to inherit from — every tag on the run comes from this map. */
|
|
2594
2735
|
tags?: components["schemas"]["TagMap"];
|
|
2595
|
-
/** @description Caller-supplied
|
|
2736
|
+
/** @description Caller-supplied logical correlation key for this run. Unique within the project. If the same external_id is reused while the prior run is still active, the existing run is returned idempotently. Once the prior run is terminal (completed or failed), a duplicate POST returns 409 with code `external_id_conflict` and the `existing_run_id` and `status` carried in `details`. To launch a fresh attempt for the same logical job after a terminal run, use a new external_id (e.g. suffix with an attempt counter). */
|
|
2596
2737
|
external_id?: string;
|
|
2597
2738
|
/** @description Run-level cascade config overrides applied when starting the run. */
|
|
2598
2739
|
config?: components["schemas"]["ConfigEntries"];
|
|
@@ -2618,7 +2759,7 @@ export interface components {
|
|
|
2618
2759
|
};
|
|
2619
2760
|
/** @description Tags applied on top of the bound workflow definition's inherited tags. Caller keys override on conflict; an entry whose value is the empty string opts the inherited key out entirely (so the run does not carry it). Setting a tag value to "" is therefore reserved as the opt-out signal — use a placeholder value if you actually want a stored empty value. */
|
|
2620
2761
|
tags?: components["schemas"]["TagMap"];
|
|
2621
|
-
/** @description Caller-supplied
|
|
2762
|
+
/** @description Caller-supplied logical correlation key for this run. Unique within the project. If the same external_id is reused while the prior run is still active, the existing run is returned idempotently. Once the prior run is terminal (completed or failed), a duplicate POST returns 409 with code `external_id_conflict` and the `existing_run_id` and `status` carried in `details`. To launch a fresh attempt for the same logical job after a terminal run, use a new external_id (e.g. suffix with an attempt counter). */
|
|
2622
2763
|
external_id?: string;
|
|
2623
2764
|
/** @description Run-level cascade config overrides applied when starting the bound workflow. */
|
|
2624
2765
|
config?: components["schemas"]["ConfigEntries"];
|
|
@@ -2650,39 +2791,6 @@ export interface components {
|
|
|
2650
2791
|
*/
|
|
2651
2792
|
source: "service" | "project" | "workflow" | "run" | "step";
|
|
2652
2793
|
};
|
|
2653
|
-
/** @description One server-side action invocation recorded for a workflow run. */
|
|
2654
|
-
ActionLogEntry: {
|
|
2655
|
-
/** @description Unique identifier for this action log entry. */
|
|
2656
|
-
id: string;
|
|
2657
|
-
/** @description Action name that was executed. */
|
|
2658
|
-
action: string;
|
|
2659
|
-
/** @description Workflow step name that produced this action log entry. */
|
|
2660
|
-
step_name: string;
|
|
2661
|
-
/** @description Execution branch this entry belongs to. */
|
|
2662
|
-
branch_id: string;
|
|
2663
|
-
/** @description Input parameters that were passed to the action. */
|
|
2664
|
-
parameters?: {
|
|
2665
|
-
[key: string]: unknown;
|
|
2666
|
-
};
|
|
2667
|
-
/** @description Output returned by the action. Present on success. */
|
|
2668
|
-
result?: {
|
|
2669
|
-
[key: string]: unknown;
|
|
2670
|
-
};
|
|
2671
|
-
/** @description Error message when the action failed. */
|
|
2672
|
-
error?: string;
|
|
2673
|
-
/**
|
|
2674
|
-
* Format: date-time
|
|
2675
|
-
* @description Timestamp when the action execution started.
|
|
2676
|
-
*/
|
|
2677
|
-
started_at: string;
|
|
2678
|
-
/** @description Elapsed time in milliseconds from start to completion. */
|
|
2679
|
-
duration_ms: number;
|
|
2680
|
-
};
|
|
2681
|
-
/** @description Unpaginated action log for one workflow run. Entries are scoped to a single run and ordered for inspection rather than broad search. */
|
|
2682
|
-
ActionLogListResponse: {
|
|
2683
|
-
/** @description The list of action log entries for this run. */
|
|
2684
|
-
items: components["schemas"]["ActionLogEntry"][];
|
|
2685
|
-
};
|
|
2686
2794
|
/**
|
|
2687
2795
|
* @description Job lifecycle state:
|
|
2688
2796
|
* - `pending` — created, not yet claimed by a worker.
|
|
@@ -2740,7 +2848,7 @@ export interface components {
|
|
|
2740
2848
|
*/
|
|
2741
2849
|
scheduled_at: string;
|
|
2742
2850
|
/** @description Error detail from the most recent failed attempt. */
|
|
2743
|
-
|
|
2851
|
+
error_message?: string;
|
|
2744
2852
|
/**
|
|
2745
2853
|
* Format: date-time
|
|
2746
2854
|
* @description Deadline at which the reaper will fail this job with `error_type=claim_timeout` if no worker has claimed it. Present only when `resolved_config` contains an entry with `category="timeouts"` and `key="claim"` whose value resolves to a finite duration. Re-stamped whenever the job returns to `pending`.
|
|
@@ -5153,7 +5261,7 @@ export interface operations {
|
|
|
5153
5261
|
};
|
|
5154
5262
|
};
|
|
5155
5263
|
responses: {
|
|
5156
|
-
/** @description Accepted */
|
|
5264
|
+
/** @description Accepted. When `external_id` is set and matches an active run, the existing run is returned idempotently with this same status code instead of creating a new one. */
|
|
5157
5265
|
202: {
|
|
5158
5266
|
headers: {
|
|
5159
5267
|
[name: string]: unknown;
|
|
@@ -5165,7 +5273,18 @@ export interface operations {
|
|
|
5165
5273
|
400: components["responses"]["BadRequest"];
|
|
5166
5274
|
401: components["responses"]["Unauthorized"];
|
|
5167
5275
|
404: components["responses"]["NotFound"];
|
|
5168
|
-
/**
|
|
5276
|
+
/**
|
|
5277
|
+
* @description Conflict. Possible codes:
|
|
5278
|
+
*
|
|
5279
|
+
* - `project_archived` — the target project is archived. Restore
|
|
5280
|
+
* the project before starting new runs; in-flight runs continue
|
|
5281
|
+
* regardless.
|
|
5282
|
+
* - `external_id_conflict` — `external_id` already belongs to a
|
|
5283
|
+
* terminal run in this project. The response `details` carry
|
|
5284
|
+
* `existing_run_id` (string), `status` (`completed` | `failed`),
|
|
5285
|
+
* and the offending `external_id`. Fetch the prior run for its
|
|
5286
|
+
* result, or POST a new attempt with a different external_id.
|
|
5287
|
+
*/
|
|
5169
5288
|
409: {
|
|
5170
5289
|
headers: {
|
|
5171
5290
|
[name: string]: unknown;
|
|
@@ -5188,10 +5307,14 @@ export interface operations {
|
|
|
5188
5307
|
queue?: string;
|
|
5189
5308
|
/** @description Filter to child runs of the specified parent run. */
|
|
5190
5309
|
parent_run_id?: string;
|
|
5191
|
-
/** @description Filter by
|
|
5192
|
-
|
|
5310
|
+
/** @description Filter by run source type (e.g. api, trigger, slack, fork). */
|
|
5311
|
+
source_type?: string;
|
|
5312
|
+
/** @description Filter by the source identifier for the source type. */
|
|
5313
|
+
source_id?: string;
|
|
5193
5314
|
/** @description Filter by caller-supplied external ID or correlation key. */
|
|
5194
5315
|
external_id?: string;
|
|
5316
|
+
/** @description Filter to runs forked from the specified source run. */
|
|
5317
|
+
forked_from?: string;
|
|
5195
5318
|
/** @description Cursor for pagination (opaque string from previous response) */
|
|
5196
5319
|
cursor?: components["parameters"]["CursorParam"];
|
|
5197
5320
|
/** @description Maximum number of items to return */
|
|
@@ -5234,7 +5357,7 @@ export interface operations {
|
|
|
5234
5357
|
};
|
|
5235
5358
|
};
|
|
5236
5359
|
responses: {
|
|
5237
|
-
/** @description Accepted */
|
|
5360
|
+
/** @description Accepted. When `external_id` is set and matches an active run in this project, the existing run is returned idempotently with this same status code instead of creating a new one. */
|
|
5238
5361
|
202: {
|
|
5239
5362
|
headers: {
|
|
5240
5363
|
[name: string]: unknown;
|
|
@@ -5257,6 +5380,18 @@ export interface operations {
|
|
|
5257
5380
|
* "completed": 0,
|
|
5258
5381
|
* "failed": 0
|
|
5259
5382
|
* },
|
|
5383
|
+
* "job_counts": {
|
|
5384
|
+
* "ready": 1,
|
|
5385
|
+
* "scheduled": 0,
|
|
5386
|
+
* "claimed": 0
|
|
5387
|
+
* },
|
|
5388
|
+
* "step_counts": {
|
|
5389
|
+
* "pending": 1,
|
|
5390
|
+
* "running": 0,
|
|
5391
|
+
* "completed": 0,
|
|
5392
|
+
* "failed": 0,
|
|
5393
|
+
* "cancelled": 0
|
|
5394
|
+
* },
|
|
5260
5395
|
* "wait_summary": {
|
|
5261
5396
|
* "waiting_paths": 0,
|
|
5262
5397
|
* "kind_counts": {},
|
|
@@ -5275,9 +5410,10 @@ export interface operations {
|
|
|
5275
5410
|
* },
|
|
5276
5411
|
* "actor_type": "api_key",
|
|
5277
5412
|
* "actor_id": "key_01hw1q2r3s4t5u6v7w8x9y0z1a",
|
|
5278
|
-
* "
|
|
5413
|
+
* "source_type": "api",
|
|
5414
|
+
* "source_id": "review-service",
|
|
5415
|
+
* "source_label": "review-service",
|
|
5279
5416
|
* "external_id": "review-2026-04-24-001",
|
|
5280
|
-
* "cancel_requested": false,
|
|
5281
5417
|
* "created_at": "2026-04-24T14:30:00Z",
|
|
5282
5418
|
* "updated_at": "2026-04-24T14:30:00Z"
|
|
5283
5419
|
* }
|
|
@@ -5288,7 +5424,18 @@ export interface operations {
|
|
|
5288
5424
|
400: components["responses"]["BadRequest"];
|
|
5289
5425
|
401: components["responses"]["Unauthorized"];
|
|
5290
5426
|
404: components["responses"]["NotFound"];
|
|
5291
|
-
/**
|
|
5427
|
+
/**
|
|
5428
|
+
* @description Conflict. Possible codes:
|
|
5429
|
+
*
|
|
5430
|
+
* - `project_archived` — the target project is archived. Restore
|
|
5431
|
+
* the project before starting new runs; in-flight runs continue
|
|
5432
|
+
* regardless.
|
|
5433
|
+
* - `external_id_conflict` — `external_id` already belongs to a
|
|
5434
|
+
* terminal run in this project. The response `details` carry
|
|
5435
|
+
* `existing_run_id` (string), `status` (`completed` | `failed`),
|
|
5436
|
+
* and the offending `external_id`. Fetch the prior run for its
|
|
5437
|
+
* result, or POST a new attempt with a different external_id.
|
|
5438
|
+
*/
|
|
5292
5439
|
409: {
|
|
5293
5440
|
headers: {
|
|
5294
5441
|
[name: string]: unknown;
|
|
@@ -5327,7 +5474,7 @@ export interface operations {
|
|
|
5327
5474
|
404: components["responses"]["NotFound"];
|
|
5328
5475
|
};
|
|
5329
5476
|
};
|
|
5330
|
-
|
|
5477
|
+
forkRun: {
|
|
5331
5478
|
parameters: {
|
|
5332
5479
|
query?: never;
|
|
5333
5480
|
header?: never;
|
|
@@ -5339,6 +5486,89 @@ export interface operations {
|
|
|
5339
5486
|
};
|
|
5340
5487
|
cookie?: never;
|
|
5341
5488
|
};
|
|
5489
|
+
requestBody: {
|
|
5490
|
+
content: {
|
|
5491
|
+
"application/json": components["schemas"]["RunForkRequest"];
|
|
5492
|
+
};
|
|
5493
|
+
};
|
|
5494
|
+
responses: {
|
|
5495
|
+
/** @description Fork created, or an existing fork returned for an idempotent retry with the same source run, `from_step_id`, `external_id`, and effective target definition version. */
|
|
5496
|
+
202: {
|
|
5497
|
+
headers: {
|
|
5498
|
+
[name: string]: unknown;
|
|
5499
|
+
};
|
|
5500
|
+
content: {
|
|
5501
|
+
"application/json": components["schemas"]["WorkflowRun"];
|
|
5502
|
+
};
|
|
5503
|
+
};
|
|
5504
|
+
400: components["responses"]["BadRequest"];
|
|
5505
|
+
401: components["responses"]["Unauthorized"];
|
|
5506
|
+
404: components["responses"]["NotFound"];
|
|
5507
|
+
/** @description Conflict. Expected fork-specific codes include `fork_source_active`, `idempotency_conflict`, and `external_id_conflict`. */
|
|
5508
|
+
409: {
|
|
5509
|
+
headers: {
|
|
5510
|
+
[name: string]: unknown;
|
|
5511
|
+
};
|
|
5512
|
+
content: {
|
|
5513
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
5514
|
+
};
|
|
5515
|
+
};
|
|
5516
|
+
};
|
|
5517
|
+
};
|
|
5518
|
+
listRunSteps: {
|
|
5519
|
+
parameters: {
|
|
5520
|
+
query?: {
|
|
5521
|
+
/** @description Filter steps by workflow path identifier. */
|
|
5522
|
+
path_id?: string;
|
|
5523
|
+
/** @description Filter steps by workflow step name. */
|
|
5524
|
+
step_name?: string;
|
|
5525
|
+
/** @description Filter steps by current run-step status. */
|
|
5526
|
+
status?: components["schemas"]["RunStepStatus"];
|
|
5527
|
+
/** @description Cursor for pagination (opaque string from previous response) */
|
|
5528
|
+
cursor?: components["parameters"]["CursorParam"];
|
|
5529
|
+
/** @description Maximum number of items to return */
|
|
5530
|
+
limit?: components["parameters"]["LimitParam"];
|
|
5531
|
+
};
|
|
5532
|
+
header?: never;
|
|
5533
|
+
path: {
|
|
5534
|
+
/** @description Project handle (unique per organization) */
|
|
5535
|
+
project: components["parameters"]["ProjectHandleParam"];
|
|
5536
|
+
/** @description Resource ID. */
|
|
5537
|
+
id: components["parameters"]["IDParam"];
|
|
5538
|
+
};
|
|
5539
|
+
cookie?: never;
|
|
5540
|
+
};
|
|
5541
|
+
requestBody?: never;
|
|
5542
|
+
responses: {
|
|
5543
|
+
/** @description OK */
|
|
5544
|
+
200: {
|
|
5545
|
+
headers: {
|
|
5546
|
+
[name: string]: unknown;
|
|
5547
|
+
};
|
|
5548
|
+
content: {
|
|
5549
|
+
"application/json": components["schemas"]["RunStepListResponse"];
|
|
5550
|
+
};
|
|
5551
|
+
};
|
|
5552
|
+
401: components["responses"]["Unauthorized"];
|
|
5553
|
+
404: components["responses"]["NotFound"];
|
|
5554
|
+
};
|
|
5555
|
+
};
|
|
5556
|
+
getRunStep: {
|
|
5557
|
+
parameters: {
|
|
5558
|
+
query?: {
|
|
5559
|
+
/** @description Pass `run_state_after` to include `run_state_after_b64`; it is omitted otherwise. */
|
|
5560
|
+
include?: "run_state_after";
|
|
5561
|
+
};
|
|
5562
|
+
header?: never;
|
|
5563
|
+
path: {
|
|
5564
|
+
/** @description Project handle (unique per organization) */
|
|
5565
|
+
project: components["parameters"]["ProjectHandleParam"];
|
|
5566
|
+
/** @description Resource ID. */
|
|
5567
|
+
id: components["parameters"]["IDParam"];
|
|
5568
|
+
step_id: string;
|
|
5569
|
+
};
|
|
5570
|
+
cookie?: never;
|
|
5571
|
+
};
|
|
5342
5572
|
requestBody?: never;
|
|
5343
5573
|
responses: {
|
|
5344
5574
|
/** @description OK */
|
|
@@ -5347,7 +5577,7 @@ export interface operations {
|
|
|
5347
5577
|
[name: string]: unknown;
|
|
5348
5578
|
};
|
|
5349
5579
|
content: {
|
|
5350
|
-
"application/json": components["schemas"]["
|
|
5580
|
+
"application/json": components["schemas"]["RunStep"];
|
|
5351
5581
|
};
|
|
5352
5582
|
};
|
|
5353
5583
|
401: components["responses"]["Unauthorized"];
|
|
@@ -5537,9 +5767,9 @@ export interface operations {
|
|
|
5537
5767
|
};
|
|
5538
5768
|
content: {
|
|
5539
5769
|
/**
|
|
5540
|
-
* @example event:
|
|
5770
|
+
* @example event: run_step_updated
|
|
5541
5771
|
* id: 43
|
|
5542
|
-
* data: {"type":"
|
|
5772
|
+
* data: {"type":"run_step_updated","run_id":"run_01hw1n1a2b3c4d5e6f7g8h9j0k","seq":43,"timestamp":"2026-04-24T14:46:00Z","data":{"id":"step_01hw1n2p3q4r5s6t7u8v9w0x1y","run_id":"run_01hw1n1a2b3c4d5e6f7g8h9j0k","path_id":"main","step_name":"summarize","action":"summarize-document","attempt":1,"transition_seq":7,"kind":"worker_action","source":"executed","status":"completed","parameters":{"document_id":"doc_01hw1m9z8y7x6w5v4u3t2s1r0q"},"job_id":"job_01hw1n2a3b4c5d6e7f8g9h0j1k","created_at":"2026-04-24T14:45:10Z","started_at":"2026-04-24T14:45:12Z","completed_at":"2026-04-24T14:46:00Z","updated_at":"2026-04-24T14:46:00Z"}}
|
|
5543
5773
|
*/
|
|
5544
5774
|
"text/event-stream": string;
|
|
5545
5775
|
};
|