@dudousxd/nestjs-durable-core 0.76.1 → 0.78.0

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/index.d.ts CHANGED
@@ -474,6 +474,198 @@ declare class WorkflowBlocked extends Error {
474
474
  */
475
475
  declare function planDispatch(requires: string[], liveDescriptors: readonly (RawWorkerDescriptor | WorkerDescriptor)[], cp: WorkerDescriptor, token: string): DispatchPlan;
476
476
 
477
+ /**
478
+ * A parallel fan (a `ctx.all`, a step fan, a polyglot `gather`) reduced to what a detail view needs
479
+ * to draw it: one node, its progress and its failures. A run detail with a 40,000-item fan otherwise
480
+ * carries every member — megabytes of JSON, and one rendered row (or fetched child) per member.
481
+ */
482
+ interface FanSummary {
483
+ /** The fan's `parallelGroup`. */
484
+ group: string;
485
+ /** The members' common step name, or `child runs` for a fan of child workflows. */
486
+ label: string;
487
+ firstSeq: number;
488
+ lastSeq: number;
489
+ /** Members started so far: steps, or child runs (a folded checkpoint counts as the children it stands for). */
490
+ size: number;
491
+ /**
492
+ * The fan's declared size, when its group carries it. More than `size` while waves are still to
493
+ * be sent (`concurrency`), and for good when a failFast fan stopped early.
494
+ */
495
+ total?: number | undefined;
496
+ /** `total - size`: members never started yet — or never to start, once the run has finished. */
497
+ notStarted?: number | undefined;
498
+ /** The fan stops at its first failure. */
499
+ failFast: boolean;
500
+ /** Members by status. A child that failed counts as `failed`, though its checkpoint is `completed`. */
501
+ counts: Partial<Record<StepCheckpoint['status'], number>>;
502
+ startedAt?: Date | undefined;
503
+ finishedAt?: Date | undefined;
504
+ /** The first {@link FAN_SUMMARY_FAILURES} failed members, so a failure shows without paging. */
505
+ failures: StepCheckpoint[];
506
+ }
507
+ /** A page of one fan's members, in seq order. */
508
+ interface FanPage {
509
+ items: StepCheckpoint[];
510
+ /** Members matching the query, across all pages. */
511
+ total: number;
512
+ }
513
+ interface FanPageQuery {
514
+ offset?: number | undefined;
515
+ limit?: number | undefined;
516
+ /** Only failed members (a failed step, or a child that failed). */
517
+ failedOnly?: boolean | undefined;
518
+ }
519
+ declare const FAN_SUMMARY_FAILURES = 20;
520
+ /** The most children a summarized detail lists by id; `childCount` carries the rest. */
521
+ declare const SUMMARY_CHILD_LIMIT = 200;
522
+ /** A failed member: a failed step, or a child whose completion reports `ok: false`. */
523
+ declare function isFailedMember(cp: StepCheckpoint): boolean;
524
+ /** Summarize one fan's members (in seq order). */
525
+ declare function summarizeFan(group: string, members: StepCheckpoint[]): FanSummary;
526
+ /**
527
+ * Split a run's timeline into the checkpoints a detail view lists one by one and the fans it draws as
528
+ * one node each: every `parallelGroup` with more than `over` members, or declared wider than that,
529
+ * becomes a {@link FanSummary}, and its members leave the timeline. Smaller groups and ungrouped steps stay as they are.
530
+ */
531
+ declare function summarizeTimeline(timeline: StepCheckpoint[], over: number): {
532
+ timeline: StepCheckpoint[];
533
+ fans: FanSummary[];
534
+ };
535
+ /** One page of a fan's members out of a run's timeline. */
536
+ declare function pageFan(timeline: StepCheckpoint[], group: string, query: FanPageQuery): FanPage;
537
+
538
+ /** A run as returned by the gateway's list — the durable run plus an optional {@link RunWaiting}
539
+ * descriptor the control plane resolves (what a suspended run is parked on), so the dashboard can
540
+ * name the wait in a list row without fetching each run's timeline. Additive: `waiting` is absent
541
+ * on a non-parked run and on gateways/versions that don't compute it. */
542
+ type RunListItem = WorkflowRun & {
543
+ waiting?: RunWaiting | undefined;
544
+ };
545
+ /** Which durable topology a gateway speaks for — surfaced in the dashboard so an operator can tell a
546
+ * control plane from a tenant at a glance (the store-backed gateway is the operator; the proxy is a
547
+ * tenant). Cheap, synchronous, local knowledge — no round-trip. */
548
+ interface DurableTopology {
549
+ role: 'control-plane' | 'tenant';
550
+ /** The tenant's isolation partition name; set only when `role` is 'tenant'. */
551
+ tenant?: string;
552
+ }
553
+ /** A run + its timeline + child ids — the detail view. Single source of truth: the dashboard server
554
+ * re-exports this instead of re-declaring it, and the dashboard client derives its wire mirror from
555
+ * it via {@link WireDates} instead of hand-mirroring field by field. */
556
+ interface RunDetail {
557
+ run: WorkflowRun;
558
+ /**
559
+ * Steps in execution order (local + remote). With {@link RunDetailOptions.summarizeFansOver}, the
560
+ * members of a summarized fan are left out — see {@link fans}.
561
+ */
562
+ timeline: StepCheckpoint[];
563
+ /** Ids of runs this run spawned (parent→children tree). Capped when summarized — see {@link childCount}. */
564
+ children: string[];
565
+ /** The fans drawn as one node each, when the detail was asked to summarize them. */
566
+ fans?: FanSummary[] | undefined;
567
+ /** How many children the run has, when `children` lists only the first of them. */
568
+ childCount?: number | undefined;
569
+ }
570
+ /** How to shape a {@link RunDetail}. */
571
+ interface RunDetailOptions {
572
+ /**
573
+ * Summarize every fan with more than this many members into a {@link FanSummary} instead of
574
+ * listing them, and cap `children`. Unset returns the full timeline, as before. A view of a run
575
+ * with a wide fan should set it: the full detail of a 40k-member fan is megabytes.
576
+ */
577
+ summarizeFansOver?: number | undefined;
578
+ }
579
+ /**
580
+ * Maps every `Date` (and `Date | undefined`) field of `T` to its ISO-string wire form — the shape a
581
+ * JSON response actually carries once dates cross the wire (`JSON.stringify` already does this
582
+ * coercion; this just types it). Homomorphic: each field keeps its own optional modifier, so a
583
+ * required `Date` becomes a required `string` and an optional one stays optional. Lets a consumer
584
+ * derive its own wire-facing client type from a core server type (e.g. the dashboard's SPA `WorkflowRun`/
585
+ * `StepCheckpoint`/`RunDetail`) instead of hand-mirroring it field by field and drifting.
586
+ */
587
+ type WireDates<T> = {
588
+ [K in keyof T]: T[K] extends Date ? string : T[K] extends Date | undefined ? string | undefined : T[K];
589
+ };
590
+ /**
591
+ * The bounded read/control/stream surface a consumer (e.g. a controller) needs, satisfied by BOTH
592
+ * topologies: the control plane binds a store-backed impl (reuses `DashboardService`); a tenant binds
593
+ * a `ProxyRunGateway` that round-trips over the transport. Deliberately smaller than the full dashboard
594
+ * (no metrics/bulk/update/signal) — those stay control-plane-only. `workerHealth` IS on the port: the
595
+ * operator answers it scoped to the requester's own groups, so a tenant's Workers panel works too.
596
+ *
597
+ * Declared as an **abstract class** rather than an interface so it doubles as its own NestJS DI token
598
+ * (the idiomatic inject-by-type pattern): providers bind `{ provide: RunGateway, useClass/useFactory }`
599
+ * and consumers inject `constructor(private readonly gateway: RunGateway)` with no string/symbol token.
600
+ * `StoreRunGateway`/`ProxyRunGateway` `implements RunGateway`; abstract methods carry no body, so the
601
+ * emitted runtime class is an empty, non-instantiable shell used only as the token.
602
+ */
603
+ declare abstract class RunGateway {
604
+ /** This deployment's durable role (control plane vs tenant) — synchronous local metadata. */
605
+ abstract topology(): DurableTopology;
606
+ abstract getRunDetail(runId: string, options?: RunDetailOptions): Promise<RunDetail | null>;
607
+ /**
608
+ * One page of a fan's members, for a view that drew the fan from its {@link FanSummary}. Optional:
609
+ * a gateway without it serves summarized details whose fans cannot be expanded.
610
+ */
611
+ getFanMembers?(runId: string, group: string, query: FanPageQuery): Promise<FanPage | null>;
612
+ /**
613
+ * The run alone, without its timeline. Optional: a caller that only needs the run (an ownership
614
+ * check) falls back to {@link getRunDetail}, which reads every checkpoint.
615
+ */
616
+ getRun?(runId: string): Promise<WorkflowRun | null>;
617
+ /** List runs, each optionally carrying a {@link RunWaiting} descriptor (what a suspended run is
618
+ * parked on). The store-backed gateway resolves `waiting`; a proxy relays whatever the control
619
+ * plane sent. */
620
+ abstract listRuns(query: RunQuery): Promise<RunListItem[]>;
621
+ /**
622
+ * Counts of the runs matching `query`, grouped by `(status, origin)` — what a console's status and
623
+ * origin chips display. Separate from {@link listRuns} precisely so the list can be PAGINATED: the
624
+ * page bounds what is rendered, these counts stay whole-set exact. Zero-count cells are absent.
625
+ */
626
+ abstract runFacets(query: RunFacetQuery): Promise<RunFacetRow[]>;
627
+ /**
628
+ * The distinct values of one filter axis over the runs matching `query`, with counts — what fills a
629
+ * console's tenant/tag/attribute pickers. On the port (not control-plane-only) because the pickers
630
+ * belong to the same panel as {@link listRuns}: a tenant that can list its runs has to be able to
631
+ * see what it may filter them by, or its console offers a blank dropdown.
632
+ *
633
+ * Returns `[]` when the underlying store does not implement the enumeration — an empty picker with
634
+ * free-text entry still standing, not an error.
635
+ */
636
+ abstract runValueFacets(axis: RunValueAxis, query: RunFacetQuery, opts?: RunValueFacetOptions): Promise<RunValueFacetRow[]>;
637
+ /**
638
+ * Bulk-resolve {@link RunWaiting} for an arbitrary set of run ids — for a consumer with its OWN
639
+ * filtered/paginated run listing (so it isn't just `listRuns` under another name) that needs to know
640
+ * which of ITS runs are parked on a breakpoint (or any other event wait) without re-deriving the bulk
641
+ * waiter scan itself or reaching for raw SQL against `durable_step_checkpoints`. A `Record` (not a
642
+ * `Map`) because `ProxyRunGateway` serialises the reply over the transport as plain JSON. Entries are
643
+ * present ONLY for runs currently waiting — an unknown id, a non-suspended id, and a suspended id
644
+ * parked on something non-event (a bare `ctx.sleep`, an in-flight step) are simply absent, same as a
645
+ * `listRuns` row with no `waiting`.
646
+ */
647
+ abstract waitingFor(runIds: string[]): Promise<Record<string, RunWaiting>>;
648
+ /** Per-group worker health (queue backlog + live worker heartbeats). On the control plane this is
649
+ * every group; over a tenant proxy the operator scopes it to the tenant's own groups. */
650
+ abstract workerHealth(): Promise<GroupHealth[]>;
651
+ abstract cancel(runId: string, opts?: {
652
+ compensate?: boolean;
653
+ }): Promise<RunResult | null>;
654
+ abstract retry(runId: string): Promise<RunResult | null>;
655
+ abstract continue(runId: string): Promise<RunResult | null>;
656
+ /** Re-dispatch every remote step of a run stuck `pending` — the operator recovery for a LOST step
657
+ * dispatch (crashed worker / dropped job) that no automatic path re-drives. Returns the run's status
658
+ * plus how many steps were re-dispatched, or null if the run is unknown. */
659
+ abstract redispatchPending(runId: string): Promise<(RunResult & {
660
+ redispatched: number;
661
+ }) | null>;
662
+ abstract retryWithInput(runId: string, input: unknown): Promise<{
663
+ runId: string;
664
+ } | null>;
665
+ /** Live lifecycle events for one run; returns an unsubscribe fn. Framework-agnostic (no rxjs). */
666
+ abstract subscribe(runId: string, onEvent: (event: EngineEvent) => void): () => void;
667
+ }
668
+
477
669
  /**
478
670
  * Vendored subset of the Standard Schema spec (https://standardschema.dev) — the `~standard`
479
671
  * property protocol implemented by zod 3.24+, valibot, arktype, and others. Vendored (rather than
@@ -983,8 +1175,12 @@ interface StateStore {
983
1175
  listIncompleteRuns(namespace?: string): Promise<WorkflowRun[]>;
984
1176
  /** The oldest `pending` runs awaiting dispatch (FIFO, by `createdAt`), capped at `limit`. */
985
1177
  listPendingRuns(limit: number, namespace?: string): Promise<WorkflowRun[]>;
986
- /** Suspended runs whose durable timer is due (`wakeAt <= nowMs`), ready to resume. */
987
- listDueTimers(nowMs: number, namespace?: string): Promise<WorkflowRun[]>;
1178
+ /**
1179
+ * Suspended runs whose durable timer is due (`wakeAt <= nowMs`), ready to resume — the most
1180
+ * overdue first, at most `limit` of them when it is given. Every driving instance polls this each
1181
+ * tick, so a recovery wave of thousands of due runs must come back in batches, not all at once.
1182
+ */
1183
+ listDueTimers(nowMs: number, namespace?: string, limit?: number): Promise<WorkflowRun[]>;
988
1184
  /**
989
1185
  * Atomically acquire the recovery lease on a run for `owner` until `leaseUntilMs`, but only if
990
1186
  * it is currently unlocked or its lease has expired (`<= nowMs`). Returns whether it was
@@ -1175,6 +1371,15 @@ interface StateStore {
1175
1371
  * plus an in-JS prefix scan that produces the identical result.
1176
1372
  */
1177
1373
  listCheckpointsByNamePrefix?(runId: string, prefixes: string[]): Promise<StepCheckpoint[]>;
1374
+ /**
1375
+ * How many of the run's checkpoints with `fromSeq <= seq <= toSeq` have one of `statuses`. The join
1376
+ * barrier of a step fan (`ctx.all` over a `@Step`) asks this on every result — "is any step of the
1377
+ * fan still `pending`?" — so it must be a count, not a load of the fan.
1378
+ *
1379
+ * Optional: a store that omits it still works — the engine falls back to {@link listCheckpoints}
1380
+ * and counts in JS, which loads the whole run on every result of a fan.
1381
+ */
1382
+ countCheckpoints?(runId: string, fromSeq: number, toSeq: number, statuses: StepCheckpoint['status'][]): Promise<number>;
1178
1383
  }
1179
1384
  /**
1180
1385
  * A persisted schedule as the STORE sees it: a handful of queryable columns plus two JSON documents
@@ -1485,6 +1690,21 @@ interface AllOptions {
1485
1690
  */
1486
1691
  concurrency?: number;
1487
1692
  }
1693
+ /**
1694
+ * Options for `ctx.all` over a `@Step` — one durable step per input instead of one child workflow
1695
+ * per input. The per-call step policy (`retries`, `backoff`, …) applies to every step of the fan.
1696
+ * Flow-control `queue`s and a liveness `timeoutMs` are not supported on a fan.
1697
+ */
1698
+ interface AllStepsOptions extends Omit<StepDispatchOpts, 'queue' | 'timeoutMs'> {
1699
+ /** `waitAll` (default) or `failFast` — see {@link WorkflowCtx.all}. */
1700
+ mode?: 'waitAll' | 'failFast';
1701
+ /**
1702
+ * The most steps in flight at once. Unset sends the whole fan immediately. When set, steps go out
1703
+ * in waves of `concurrency`, the next once the previous has settled; each wave costs the parent one
1704
+ * turn. Part of the fan's identity, like `inputs`.
1705
+ */
1706
+ concurrency?: number;
1707
+ }
1488
1708
  /** One child of a fan as {@link StateStore.registerChildWaits} writes it. */
1489
1709
  interface ChildWait {
1490
1710
  waiter: SignalWaiter;
@@ -1541,6 +1761,12 @@ interface RunRequest {
1541
1761
  type RunRequestKind = {
1542
1762
  kind: 'getRunDetail';
1543
1763
  runId: string;
1764
+ options?: RunDetailOptions | undefined;
1765
+ } | {
1766
+ kind: 'getFanMembers';
1767
+ runId: string;
1768
+ group: string;
1769
+ query: FanPageQuery;
1544
1770
  } | {
1545
1771
  kind: 'listRuns';
1546
1772
  query: RunQuery;
@@ -2360,6 +2586,14 @@ interface WorkflowCtx<A extends SearchAttributes = SearchAttributes> {
2360
2586
  * `concurrency` caps how many children run at once (see {@link AllOptions.concurrency}).
2361
2587
  */
2362
2588
  all<C extends WorkflowClass>(workflow: C, inputs: WorkflowInputOf<C>[], opts?: AllOptions): Promise<WorkflowOutputOf<C>[]>;
2589
+ /**
2590
+ * Run one durable **step** per entry in `inputs` in parallel and wait for all of them — the same
2591
+ * fan as above with a `@Step` instead of a child workflow, so each item costs a step instead of a
2592
+ * whole run. The steps share a `parallelGroup` (the dashboard renders them as one fan), the parent
2593
+ * replays once per settled wave rather than once per result, and outputs come back in input order;
2594
+ * failures surface as a {@link GatherError}, like the child fan.
2595
+ */
2596
+ all<TInput, TOutput>(step: StepRef<TInput, TOutput>, inputs: TInput[], opts?: AllStepsOptions): Promise<TOutput[]>;
2363
2597
  all<TOutput = unknown>(workflow: string, inputs: unknown[], opts?: AllOptions): Promise<TOutput[]>;
2364
2598
  /**
2365
2599
  * Pause the run at this point until a human resumes it from the dashboard (or
@@ -3628,6 +3862,13 @@ interface WorkflowEngineDeps {
3628
3862
  * for a genuinely-orphaned run. Default 5min; set `0` to disable (the prior wake-forever behavior).
3629
3863
  */
3630
3864
  reconcileMs?: number | undefined;
3865
+ /**
3866
+ * The most due timers one {@link WorkflowEngine.resumeDueTimers} pass loads and drives, most
3867
+ * overdue first. Every driving instance runs that pass each tick, so a wave of thousands of due
3868
+ * runs (a recovery after an outage, a fan's children waking together) is worked through in
3869
+ * batches instead of every instance loading and walking all of it. Default 500.
3870
+ */
3871
+ timerBatchSize?: number | undefined;
3631
3872
  /**
3632
3873
  * Retention for a BUFFERED event that no `waitForEvent` ever claims (see
3633
3874
  * {@link WorkflowEngine.publishEvent}'s buffering — a publish matching no live waiter keeps ONE
@@ -3746,6 +3987,7 @@ declare class WorkflowEngine {
3746
3987
  private readonly maxRecoveryAttempts?;
3747
3988
  private readonly remoteAdvanceSilenceMs?;
3748
3989
  private readonly reconcileMs;
3990
+ private readonly timerBatchSize;
3749
3991
  private readonly eventBufferTtlMs;
3750
3992
  private readonly remoteRedispatchMs;
3751
3993
  private readonly remoteRedispatchMax;
@@ -3812,6 +4054,15 @@ declare class WorkflowEngine {
3812
4054
  * dropped one {@link redriveSettledSteps} recovers. Pruned by age (see {@link noteSettledHere}).
3813
4055
  */
3814
4056
  private readonly settledHere;
4057
+ /**
4058
+ * The step fans (`ctx.all` over a `@Step`) a turn suspended on, by run, while that turn executes on
4059
+ * THIS instance — re-checked once its lease is released (see {@link redriveSettledStepFans}).
4060
+ */
4061
+ private readonly awaitedStepFans;
4062
+ /** Step fans whose join barrier this instance opened, by `runId:firstSeq` — see {@link settledHere}. */
4063
+ private readonly stepFansFiredHere;
4064
+ /** The tail of each run's queue of results being handled on this instance — see {@link serializedPerRun}. */
4065
+ private readonly resultChains;
3815
4066
  /** Flow-control admission backend for remote steps (see {@link registerQueue}). */
3816
4067
  private readonly admission;
3817
4068
  /** Runs on THIS instance blocked on admission, by queue — woken early on a freed-slot signal. */
@@ -4332,6 +4583,13 @@ declare class WorkflowEngine {
4332
4583
  * checkpoint that is already settled, which the next turn replays past — so it cannot loop.
4333
4584
  */
4334
4585
  private redriveSettledSteps;
4586
+ /**
4587
+ * {@link redriveSettledSteps} for a step fan: once the turn that suspended on it released its lease,
4588
+ * re-drive the run if no step of the fan is still `pending` — the last result landed on another
4589
+ * instance while this one held the lease, and its wake was dropped there. A fan whose barrier this
4590
+ * instance opened is skipped, for the reason {@link settledHere} gives.
4591
+ */
4592
+ private redriveSettledStepFans;
4335
4593
  private redriveSettledChildren;
4336
4594
  /**
4337
4595
  * Deliver an external signal to the run waiting on `token`, resume it with `payload`, and return
@@ -4849,8 +5107,24 @@ declare class WorkflowEngine {
4849
5107
  * capable+compatible worker has appeared, else re-parks with a fresh `wakeAt` (design §7.5). */
4850
5108
  private dueBlockedRuns;
4851
5109
  private callRemote;
5110
+ /**
5111
+ * `ctx.all` over a `@Step`: one durable step per input, dispatched together, joined once. The ctx
5112
+ * reserves the whole position block up front, so replay re-derives the same seqs.
5113
+ *
5114
+ * Each turn reads the fan's checkpoints fresh, hands every step that already has one to
5115
+ * {@link callRemote} (which owns the completed / pending-lease / failed-retry rules), and sends
5116
+ * the steps nobody has sent yet: all of them, or with `concurrency`, the next wave once the last
5117
+ * one has drained. New steps are written `pending` BEFORE any is dispatched, so a turn that runs
5118
+ * concurrently with this one finds them already sent instead of sending them again. The join
5119
+ * barrier ({@link stepFanStillRunning}) then wakes the parent once per wave, not once per result.
5120
+ */
5121
+ private callRemoteAll;
5122
+ /** Write the `pending` checkpoints of a step fan's new steps, then dispatch them. */
5123
+ private sendStepFan;
4852
5124
  /** Remember a step settled here, forgetting entries older than a lease so the map stays small. */
4853
5125
  private noteSettledHere;
5126
+ /** Record `key` in a "happened here recently" map, pruning entries older than a lease. */
5127
+ private noteRecent;
4854
5128
  /** {@link StateStore.saveCheckpointIfPending}, or a plain save on a store without it. */
4855
5129
  private savePendingCheckpoint;
4856
5130
  /** Enqueue a remote step task to its worker group via the transport pool. Shared by the initial
@@ -4858,11 +5132,26 @@ declare class WorkflowEngine {
4858
5132
  * {@link redispatchPending}. Carries the current trace/context so a re-dispatch is traceable. */
4859
5133
  private dispatchRemoteTask;
4860
5134
  /**
4861
- * Complete a durable remote step from its worker result and resume the run — runs on whichever
4862
- * instance receives the result (the dispatching one may be gone), so the run is crash/scale-safe.
4863
- * A no-op if the checkpoint isn't `pending` (a duplicate or late delivery).
5135
+ * Run `work` after every earlier `work` for the same run on this instance has settled. A result
5136
+ * resumes its run inline, and `execute` lets this instance into a lease it already holds — so two
5137
+ * results of one run handled at once here would run two turns of it concurrently. Results of
5138
+ * different runs still go in parallel, which is what a results consumer with concurrency > 1 is for.
5139
+ */
5140
+ private serializedPerRun;
5141
+ /**
5142
+ * Complete a durable remote step from its worker result — runs on whichever instance receives the
5143
+ * result (the dispatching one may be gone), so the run is crash/scale-safe. Resolves whether the
5144
+ * run should now be resumed: not for a duplicate or late delivery (the checkpoint isn't `pending`),
5145
+ * a run already finished, or a step fan whose barrier is still closed.
4864
5146
  */
4865
5147
  private completeRemoteResult;
5148
+ /**
5149
+ * The join barrier of a step fan: a result for one of its steps resumes the parent only once no
5150
+ * step of the fan is still `pending` (a settled wave), or on a failure (failFast surfaces it, and a
5151
+ * retry needs the parent to schedule it). Without it every result would replay the whole parent,
5152
+ * which makes a fan of N steps cost O(N²) checkpoint reads.
5153
+ */
5154
+ private stepFanStillRunning;
4866
5155
  /**
4867
5156
  * Apply a remote workflow-turn {@link WorkflowDecision} durably — runs on WHATEVER instance receives
4868
5157
  * it over the broker (the dispatching one may be gone, or a point-to-point broker handed it to a
@@ -4916,6 +5205,8 @@ declare class RemoteStepError extends Error {
4916
5205
  readonly stepError?: StepError | undefined;
4917
5206
  constructor(stepError?: StepError);
4918
5207
  }
5208
+ /** The child run ids a parent's {@link CHILD_EDGE_PREFIXES} checkpoints point at (others are skipped). */
5209
+ declare function childIdsOf(checkpoints: StepCheckpoint[]): string[];
4919
5210
 
4920
5211
  /**
4921
5212
  * What the class-first statics need from whoever registered the workflow class: the engine, or a
@@ -5346,111 +5637,6 @@ declare function mergeRunValueFacetRows(rows: readonly {
5346
5637
  */
5347
5638
  declare function runValueFacetsFromRuns(runs: readonly WorkflowRun[], axis: RunValueAxis, opts?: RunValueFacetOptions): RunValueFacetRow[];
5348
5639
 
5349
- /** A run as returned by the gateway's list — the durable run plus an optional {@link RunWaiting}
5350
- * descriptor the control plane resolves (what a suspended run is parked on), so the dashboard can
5351
- * name the wait in a list row without fetching each run's timeline. Additive: `waiting` is absent
5352
- * on a non-parked run and on gateways/versions that don't compute it. */
5353
- type RunListItem = WorkflowRun & {
5354
- waiting?: RunWaiting | undefined;
5355
- };
5356
- /** Which durable topology a gateway speaks for — surfaced in the dashboard so an operator can tell a
5357
- * control plane from a tenant at a glance (the store-backed gateway is the operator; the proxy is a
5358
- * tenant). Cheap, synchronous, local knowledge — no round-trip. */
5359
- interface DurableTopology {
5360
- role: 'control-plane' | 'tenant';
5361
- /** The tenant's isolation partition name; set only when `role` is 'tenant'. */
5362
- tenant?: string;
5363
- }
5364
- /** A run + its timeline + child ids — the detail view. Single source of truth: the dashboard server
5365
- * re-exports this instead of re-declaring it, and the dashboard client derives its wire mirror from
5366
- * it via {@link WireDates} instead of hand-mirroring field by field. */
5367
- interface RunDetail {
5368
- run: WorkflowRun;
5369
- /** Steps in execution order (local + remote). */
5370
- timeline: StepCheckpoint[];
5371
- /** Ids of runs this run spawned (parent→children tree). */
5372
- children: string[];
5373
- }
5374
- /**
5375
- * Maps every `Date` (and `Date | undefined`) field of `T` to its ISO-string wire form — the shape a
5376
- * JSON response actually carries once dates cross the wire (`JSON.stringify` already does this
5377
- * coercion; this just types it). Homomorphic: each field keeps its own optional modifier, so a
5378
- * required `Date` becomes a required `string` and an optional one stays optional. Lets a consumer
5379
- * derive its own wire-facing client type from a core server type (e.g. the dashboard's SPA `WorkflowRun`/
5380
- * `StepCheckpoint`/`RunDetail`) instead of hand-mirroring it field by field and drifting.
5381
- */
5382
- type WireDates<T> = {
5383
- [K in keyof T]: T[K] extends Date ? string : T[K] extends Date | undefined ? string | undefined : T[K];
5384
- };
5385
- /**
5386
- * The bounded read/control/stream surface a consumer (e.g. a controller) needs, satisfied by BOTH
5387
- * topologies: the control plane binds a store-backed impl (reuses `DashboardService`); a tenant binds
5388
- * a `ProxyRunGateway` that round-trips over the transport. Deliberately smaller than the full dashboard
5389
- * (no metrics/bulk/update/signal) — those stay control-plane-only. `workerHealth` IS on the port: the
5390
- * operator answers it scoped to the requester's own groups, so a tenant's Workers panel works too.
5391
- *
5392
- * Declared as an **abstract class** rather than an interface so it doubles as its own NestJS DI token
5393
- * (the idiomatic inject-by-type pattern): providers bind `{ provide: RunGateway, useClass/useFactory }`
5394
- * and consumers inject `constructor(private readonly gateway: RunGateway)` with no string/symbol token.
5395
- * `StoreRunGateway`/`ProxyRunGateway` `implements RunGateway`; abstract methods carry no body, so the
5396
- * emitted runtime class is an empty, non-instantiable shell used only as the token.
5397
- */
5398
- declare abstract class RunGateway {
5399
- /** This deployment's durable role (control plane vs tenant) — synchronous local metadata. */
5400
- abstract topology(): DurableTopology;
5401
- abstract getRunDetail(runId: string): Promise<RunDetail | null>;
5402
- /** List runs, each optionally carrying a {@link RunWaiting} descriptor (what a suspended run is
5403
- * parked on). The store-backed gateway resolves `waiting`; a proxy relays whatever the control
5404
- * plane sent. */
5405
- abstract listRuns(query: RunQuery): Promise<RunListItem[]>;
5406
- /**
5407
- * Counts of the runs matching `query`, grouped by `(status, origin)` — what a console's status and
5408
- * origin chips display. Separate from {@link listRuns} precisely so the list can be PAGINATED: the
5409
- * page bounds what is rendered, these counts stay whole-set exact. Zero-count cells are absent.
5410
- */
5411
- abstract runFacets(query: RunFacetQuery): Promise<RunFacetRow[]>;
5412
- /**
5413
- * The distinct values of one filter axis over the runs matching `query`, with counts — what fills a
5414
- * console's tenant/tag/attribute pickers. On the port (not control-plane-only) because the pickers
5415
- * belong to the same panel as {@link listRuns}: a tenant that can list its runs has to be able to
5416
- * see what it may filter them by, or its console offers a blank dropdown.
5417
- *
5418
- * Returns `[]` when the underlying store does not implement the enumeration — an empty picker with
5419
- * free-text entry still standing, not an error.
5420
- */
5421
- abstract runValueFacets(axis: RunValueAxis, query: RunFacetQuery, opts?: RunValueFacetOptions): Promise<RunValueFacetRow[]>;
5422
- /**
5423
- * Bulk-resolve {@link RunWaiting} for an arbitrary set of run ids — for a consumer with its OWN
5424
- * filtered/paginated run listing (so it isn't just `listRuns` under another name) that needs to know
5425
- * which of ITS runs are parked on a breakpoint (or any other event wait) without re-deriving the bulk
5426
- * waiter scan itself or reaching for raw SQL against `durable_step_checkpoints`. A `Record` (not a
5427
- * `Map`) because `ProxyRunGateway` serialises the reply over the transport as plain JSON. Entries are
5428
- * present ONLY for runs currently waiting — an unknown id, a non-suspended id, and a suspended id
5429
- * parked on something non-event (a bare `ctx.sleep`, an in-flight step) are simply absent, same as a
5430
- * `listRuns` row with no `waiting`.
5431
- */
5432
- abstract waitingFor(runIds: string[]): Promise<Record<string, RunWaiting>>;
5433
- /** Per-group worker health (queue backlog + live worker heartbeats). On the control plane this is
5434
- * every group; over a tenant proxy the operator scopes it to the tenant's own groups. */
5435
- abstract workerHealth(): Promise<GroupHealth[]>;
5436
- abstract cancel(runId: string, opts?: {
5437
- compensate?: boolean;
5438
- }): Promise<RunResult | null>;
5439
- abstract retry(runId: string): Promise<RunResult | null>;
5440
- abstract continue(runId: string): Promise<RunResult | null>;
5441
- /** Re-dispatch every remote step of a run stuck `pending` — the operator recovery for a LOST step
5442
- * dispatch (crashed worker / dropped job) that no automatic path re-drives. Returns the run's status
5443
- * plus how many steps were re-dispatched, or null if the run is unknown. */
5444
- abstract redispatchPending(runId: string): Promise<(RunResult & {
5445
- redispatched: number;
5446
- }) | null>;
5447
- abstract retryWithInput(runId: string, input: unknown): Promise<{
5448
- runId: string;
5449
- } | null>;
5450
- /** Live lifecycle events for one run; returns an unsubscribe fn. Framework-agnostic (no rxjs). */
5451
- abstract subscribe(runId: string, onEvent: (event: EngineEvent) => void): () => void;
5452
- }
5453
-
5454
5640
  /**
5455
5641
  * Resolve WHAT a suspended run is parked on from the token of the {@link SignalWaiter} it registered.
5456
5642
  * The token prefix carries the kind — no extra store lookup and no new persisted field. Used by the
@@ -5531,6 +5717,8 @@ declare class CodecStateStore implements StateStore {
5531
5717
  /** Encodes like {@link saveCheckpoint}. Bound only when the inner store has it, so the engine's
5532
5718
  * plain-save fallback still kicks in through the wrapper. */
5533
5719
  readonly saveCheckpointIfPending?: (checkpoint: StepCheckpoint) => Promise<boolean>;
5720
+ /** Forwarded verbatim — a count reads no payload. Bound only when the inner store has it. */
5721
+ readonly countCheckpoints?: (runId: string, fromSeq: number, toSeq: number, statuses: StepCheckpoint['status'][]) => Promise<number>;
5534
5722
  /** Forwarded verbatim — retention selects by status/updatedAt/scope, never by payload. Bound only
5535
5723
  * when the inner store prunes, so the retention poller still sees (and warns about) its absence. */
5536
5724
  readonly pruneTerminalRuns?: (policy: RetentionPolicy, nowMs: number, limit: number) => Promise<number>;
@@ -5575,7 +5763,7 @@ declare class CodecStateStore implements StateStore {
5575
5763
  }) => Promise<T>): Promise<T>;
5576
5764
  listIncompleteRuns(namespace?: string): Promise<WorkflowRun[]>;
5577
5765
  listPendingRuns(limit: number, namespace?: string): Promise<WorkflowRun[]>;
5578
- listDueTimers(nowMs: number, namespace?: string): Promise<WorkflowRun[]>;
5766
+ listDueTimers(nowMs: number, namespace?: string, limit?: number): Promise<WorkflowRun[]>;
5579
5767
  tryLockRun(runId: string, owner: string, leaseUntilMs: number, nowMs: number): Promise<boolean>;
5580
5768
  releaseRunLock(runId: string): Promise<void>;
5581
5769
  renewRunLock(runId: string, owner: string, leaseUntilMs: number): Promise<boolean>;
@@ -6003,7 +6191,7 @@ declare class InMemoryStateStore implements StateStore {
6003
6191
  saveCheckpointIfPending(checkpoint: StepCheckpoint): Promise<boolean>;
6004
6192
  listIncompleteRuns(namespace?: string): Promise<WorkflowRun[]>;
6005
6193
  listPendingRuns(limit: number, namespace?: string): Promise<WorkflowRun[]>;
6006
- listDueTimers(nowMs: number, namespace?: string): Promise<WorkflowRun[]>;
6194
+ listDueTimers(nowMs: number, namespace?: string, limit?: number): Promise<WorkflowRun[]>;
6007
6195
  tryLockRun(runId: string, owner: string, leaseUntilMs: number, nowMs: number): Promise<boolean>;
6008
6196
  releaseRunLock(runId: string): Promise<void>;
6009
6197
  renewRunLock(runId: string, owner: string, leaseUntilMs: number): Promise<boolean>;
@@ -6063,6 +6251,7 @@ declare class InMemoryStateStore implements StateStore {
6063
6251
  listSchedules(query: ScheduleQuery): Promise<ScheduleRecord[]>;
6064
6252
  listCheckpoints(runId: string): Promise<StepCheckpoint[]>;
6065
6253
  getLatestCheckpointByName(runId: string, name: string): Promise<StepCheckpoint | undefined>;
6254
+ countCheckpoints(runId: string, fromSeq: number, toSeq: number, statuses: StepCheckpoint['status'][]): Promise<number>;
6066
6255
  listCheckpointsByNamePrefix(runId: string, prefixes: string[]): Promise<StepCheckpoint[]>;
6067
6256
  }
6068
6257
 
@@ -6106,4 +6295,4 @@ declare function singletonAdmissionDenialPatch(runs: WorkflowRun[], runId: strin
6106
6295
  updatedAt: Date;
6107
6296
  } | undefined;
6108
6297
 
6109
- export { type AccumulatorHost, type Admission, type AdmissionBackend, type AdmissionItem, type AllOptions, type AnnouncedWorkflow, type AnnouncementEvidence, type AttributeFilter, type AttributeOp, type AttributePredicateOperand, type AttributeValue, type BackoffStrategy, type BlockedDispatch, type BlockedResolution, CONTROL_FLOW_SIGNAL, CURRENT_PROTOCOL_VERSION, type CapabilityRequirement, type ChildCallOptions, type ChildWait, CodecStateStore, type ConcurrencyConfig, ConcurrencyLimitError, type ConcurrencyQuota, ContinueAsNew, type ControlMessage, type ControlPlane, DEFAULT_CONCURRENCY_STATUSES, DEFAULT_PARTITION, DURABLE_OPTIONS, DURABLE_OPTIONS_CANONICAL, DURABLE_STEP_CONFIG, DURABLE_STEP_NAME, type Disagreement, type DispatchDiagnostics, type DispatchPlan, type DurableExecution, type DurableExecutionWrapper, type DurableTopology, type DurableWebhook, DurableWorkflow, type DynamicWorkflowCtx, ENGINE_MINTED_TAG_PREFIXES, EVENT_BUFFER_SCAN_LIMIT, EVENT_TOKEN_PREFIX, type EngineEvent, type EngineEventType, type EngineListener, Entities, type EntityConfig, type EntityHandler, type EntityHost, EventAccumulators, type EventBatchConfig, type FanJoin, type FanWait, FatalError, GatherError, type GroupHealth, type Heartbeat, type HeartbeatSighting, type HeartbeatStatus, type HistoryEvent, InMemoryAdmissionBackend, InMemoryStateStore, InMemoryTransport, type InferSearchAttributes, LEGACY_V1_CAPABILITIES, LEGACY_V1_PROTOCOL, type MetricsCollector, type MetricsSnapshot, type NamedTransport, type NegotiateOptions, type NegotiationOutcome, type NegotiationReason, type NegotiationResult, NestedWorkflowCallError, NonDeterminismError, type PartitionSighting, type PayloadCodec, type QueueConfig, QueueController, RUN_VALUE_FACET_LIMIT, RUN_VALUE_FACET_SCAN, type RawWorkerDescriptor, RemoteStepError, RemoteStepTimeout, type RemoteTask, RemoteWorkflowExecutor, RemoteWorkflowTimeout, type RetentionPolicy, type RoutableDispatch, type RoutableResolution, type RoutingResolution, type RunAttributeRow, type RunDetail, type RunDispatcher, type RunFacetQuery, type RunFacetRow, RunGateway, type RunListItem, type RunQuery, type RunReply, type RunReplyResult, type RunRequest, type RunRequestKind, type RunResult, type RunSchedulesOptions, type RunScope, type RunStatus, type RunValueAxis, type RunValueFacetOptions, type RunValueFacetOrder, type RunValueFacetRow, type RunWaiting, SINGLETON_ACTIVE_STATUSES, SINGLETON_ADMITTED_TAG, STATE_STORE, STATE_STORE_CANONICAL, type ScalarAttributeFilter, ScheduleAlreadyExistsError, ScheduleClient, type ScheduleClientOptions, type ScheduleDescription, type ScheduleHost, type ScheduleListQuery, ScheduleNotFoundError, type ScheduleOptions, type ScheduleQuery, type ScheduleRecord, type ScheduledWorkflow, type SearchAttributes, type SearchAttributesSchema, SignalTimeoutError, type SignalWaiter, type SingletonConfig, SingletonQueueFullError, StandardSchemaV1, type StartOptions, type StartRunMessage, type StateStore, type StepCheckpoint, type StepConfig, type StepDef, type StepDispatchOpts, type StepError, type StepEvent, type StepHandler, type StepInterceptor, type StepInvocation, type StepKind, type StepLogger, type StepOptions, type StepRef, type StepResult, type StepScope, type StepUndo, type StoreTransaction, type SubProcessHandle, TERMINAL_RUN_STATUSES, TRANSPORT, TRANSPORT_CANONICAL, type TenantEvent, type Transport, type UndoOf, type UpdateResult, type UpdateValidator, VERSION_UNDECLARED_TAG, WORKFLOW_NAME_KEY, type WireDates, type WorkerAdjust, type WorkerConcurrencyStatus, type WorkerDescriptor, type WorkerHeartbeat, type WorkerLifecycle, type WorkerStatus, type WorkflowAnnouncement, WorkflowBlocked, type WorkflowClass, type WorkflowCommand, type WorkflowCtx, type WorkflowDecision, type WorkflowDirectory, WorkflowEngine, type WorkflowEngineDeps, type WorkflowExecutor, type WorkflowHandler, type WorkflowInputOf, type WorkflowOutputOf, type WorkflowRef, type WorkflowRegistration, type WorkflowRun, type WorkflowStartClient, type WorkflowStepEvent, WorkflowSuspended, type WorkflowTask, aggregateAnnouncements, announcementsOf, applyAttributeQuery, assertConcurrency, attributeColumnFor, attributeOperand, attributePredicateOperands, axisIsRunColumn, bindWorkflowClass, breakpointToken, buildWorkflowDirectory, canRoute, capableWorkers, classifyWaiterToken, clearDurableExecutionWrappers, clearTerminalSingletonAdmission, collectMetrics, concurrencyTag, controlPlaneDescriptor, countRuns, coveredTokens, createStepLogger, currentStep, currentStepScope, currentWorkflowCtx, debug, describeWorker, descriptorHash, error, eventMatchOf, eventMatches, eventNameOf, eventPrefix, eventToken, facetOrigin, hasDurableExecutionWrappers, heartbeatStatus, indexWaitersByRun, info, isEngineMintedTag, isEventToken, isLegacyDescriptor, isNonEmptyRunScope, isWorkflowControlFlowSignal, listSignalWaitersOfRuns, log, matchesAttributes, mergeRunFacetRows, mergeRunValueFacetRows, missingCapabilities, negotiate, nextCronFireMs, normalizeAttributeRows, normalizeDescriptor, observedAnnouncements, parentRunIdOf, parseDuration, partitionOfToken, planDispatch, prevCronFireMs, readSearchAttributes, requiredCapabilities, resolveConcurrency, resolveRouting, resolveRunWaiting, runDurableExecution, runInStepLogger, runInStepScope, runInWorkflowCtx, runOutsideWorkflowCtx, runSchedules, runStepHandler, runValueFacetsFromRuns, sanitizeQueueToken, scheduledRunId, singletonAdmissionDenialPatch, singletonAdmissionTags, sqlComparator, stepConfigOf, stepId, stepNameOf, sub, subEvent, subProcess, tenantGroup, useDurableExecution, warn, workflowName };
6298
+ export { type AccumulatorHost, type Admission, type AdmissionBackend, type AdmissionItem, type AllOptions, type AllStepsOptions, type AnnouncedWorkflow, type AnnouncementEvidence, type AttributeFilter, type AttributeOp, type AttributePredicateOperand, type AttributeValue, type BackoffStrategy, type BlockedDispatch, type BlockedResolution, CONTROL_FLOW_SIGNAL, CURRENT_PROTOCOL_VERSION, type CapabilityRequirement, type ChildCallOptions, type ChildWait, CodecStateStore, type ConcurrencyConfig, ConcurrencyLimitError, type ConcurrencyQuota, ContinueAsNew, type ControlMessage, type ControlPlane, DEFAULT_CONCURRENCY_STATUSES, DEFAULT_PARTITION, DURABLE_OPTIONS, DURABLE_OPTIONS_CANONICAL, DURABLE_STEP_CONFIG, DURABLE_STEP_NAME, type Disagreement, type DispatchDiagnostics, type DispatchPlan, type DurableExecution, type DurableExecutionWrapper, type DurableTopology, type DurableWebhook, DurableWorkflow, type DynamicWorkflowCtx, ENGINE_MINTED_TAG_PREFIXES, EVENT_BUFFER_SCAN_LIMIT, EVENT_TOKEN_PREFIX, type EngineEvent, type EngineEventType, type EngineListener, Entities, type EntityConfig, type EntityHandler, type EntityHost, EventAccumulators, type EventBatchConfig, FAN_SUMMARY_FAILURES, type FanJoin, type FanPage, type FanPageQuery, type FanSummary, type FanWait, FatalError, GatherError, type GroupHealth, type Heartbeat, type HeartbeatSighting, type HeartbeatStatus, type HistoryEvent, InMemoryAdmissionBackend, InMemoryStateStore, InMemoryTransport, type InferSearchAttributes, LEGACY_V1_CAPABILITIES, LEGACY_V1_PROTOCOL, type MetricsCollector, type MetricsSnapshot, type NamedTransport, type NegotiateOptions, type NegotiationOutcome, type NegotiationReason, type NegotiationResult, NestedWorkflowCallError, NonDeterminismError, type PartitionSighting, type PayloadCodec, type QueueConfig, QueueController, RUN_VALUE_FACET_LIMIT, RUN_VALUE_FACET_SCAN, type RawWorkerDescriptor, RemoteStepError, RemoteStepTimeout, type RemoteTask, RemoteWorkflowExecutor, RemoteWorkflowTimeout, type RetentionPolicy, type RoutableDispatch, type RoutableResolution, type RoutingResolution, type RunAttributeRow, type RunDetail, type RunDetailOptions, type RunDispatcher, type RunFacetQuery, type RunFacetRow, RunGateway, type RunListItem, type RunQuery, type RunReply, type RunReplyResult, type RunRequest, type RunRequestKind, type RunResult, type RunSchedulesOptions, type RunScope, type RunStatus, type RunValueAxis, type RunValueFacetOptions, type RunValueFacetOrder, type RunValueFacetRow, type RunWaiting, SINGLETON_ACTIVE_STATUSES, SINGLETON_ADMITTED_TAG, STATE_STORE, STATE_STORE_CANONICAL, SUMMARY_CHILD_LIMIT, type ScalarAttributeFilter, ScheduleAlreadyExistsError, ScheduleClient, type ScheduleClientOptions, type ScheduleDescription, type ScheduleHost, type ScheduleListQuery, ScheduleNotFoundError, type ScheduleOptions, type ScheduleQuery, type ScheduleRecord, type ScheduledWorkflow, type SearchAttributes, type SearchAttributesSchema, SignalTimeoutError, type SignalWaiter, type SingletonConfig, SingletonQueueFullError, StandardSchemaV1, type StartOptions, type StartRunMessage, type StateStore, type StepCheckpoint, type StepConfig, type StepDef, type StepDispatchOpts, type StepError, type StepEvent, type StepHandler, type StepInterceptor, type StepInvocation, type StepKind, type StepLogger, type StepOptions, type StepRef, type StepResult, type StepScope, type StepUndo, type StoreTransaction, type SubProcessHandle, TERMINAL_RUN_STATUSES, TRANSPORT, TRANSPORT_CANONICAL, type TenantEvent, type Transport, type UndoOf, type UpdateResult, type UpdateValidator, VERSION_UNDECLARED_TAG, WORKFLOW_NAME_KEY, type WireDates, type WorkerAdjust, type WorkerConcurrencyStatus, type WorkerDescriptor, type WorkerHeartbeat, type WorkerLifecycle, type WorkerStatus, type WorkflowAnnouncement, WorkflowBlocked, type WorkflowClass, type WorkflowCommand, type WorkflowCtx, type WorkflowDecision, type WorkflowDirectory, WorkflowEngine, type WorkflowEngineDeps, type WorkflowExecutor, type WorkflowHandler, type WorkflowInputOf, type WorkflowOutputOf, type WorkflowRef, type WorkflowRegistration, type WorkflowRun, type WorkflowStartClient, type WorkflowStepEvent, WorkflowSuspended, type WorkflowTask, aggregateAnnouncements, announcementsOf, applyAttributeQuery, assertConcurrency, attributeColumnFor, attributeOperand, attributePredicateOperands, axisIsRunColumn, bindWorkflowClass, breakpointToken, buildWorkflowDirectory, canRoute, capableWorkers, childIdsOf, classifyWaiterToken, clearDurableExecutionWrappers, clearTerminalSingletonAdmission, collectMetrics, concurrencyTag, controlPlaneDescriptor, countRuns, coveredTokens, createStepLogger, currentStep, currentStepScope, currentWorkflowCtx, debug, describeWorker, descriptorHash, error, eventMatchOf, eventMatches, eventNameOf, eventPrefix, eventToken, facetOrigin, hasDurableExecutionWrappers, heartbeatStatus, indexWaitersByRun, info, isEngineMintedTag, isEventToken, isFailedMember, isLegacyDescriptor, isNonEmptyRunScope, isWorkflowControlFlowSignal, listSignalWaitersOfRuns, log, matchesAttributes, mergeRunFacetRows, mergeRunValueFacetRows, missingCapabilities, negotiate, nextCronFireMs, normalizeAttributeRows, normalizeDescriptor, observedAnnouncements, pageFan, parentRunIdOf, parseDuration, partitionOfToken, planDispatch, prevCronFireMs, readSearchAttributes, requiredCapabilities, resolveConcurrency, resolveRouting, resolveRunWaiting, runDurableExecution, runInStepLogger, runInStepScope, runInWorkflowCtx, runOutsideWorkflowCtx, runSchedules, runStepHandler, runValueFacetsFromRuns, sanitizeQueueToken, scheduledRunId, singletonAdmissionDenialPatch, singletonAdmissionTags, sqlComparator, stepConfigOf, stepId, stepNameOf, sub, subEvent, subProcess, summarizeFan, summarizeTimeline, tenantGroup, useDurableExecution, warn, workflowName };