@dudousxd/nestjs-durable-core 0.102.0 → 0.103.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.cjs +459 -36
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +168 -1
- package/dist/index.d.ts +168 -1
- package/dist/index.js +455 -36
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -4766,6 +4766,13 @@ declare class WorkflowEngine {
|
|
|
4766
4766
|
* — the caller has already ensured this is the decision for the currently-awaited turn.
|
|
4767
4767
|
*/
|
|
4768
4768
|
private applyDecision;
|
|
4769
|
+
/**
|
|
4770
|
+
* A remote turn that ended in `ctx.continueAsNew(input)`: record what the turn ran, complete this
|
|
4771
|
+
* run and start its continuation (`<runId>~N`) with `input` on a clean history — the in-process
|
|
4772
|
+
* engine's handoff, with the run's partition and tenant carried over. A run cancelled while the
|
|
4773
|
+
* turn replayed stays cancelled and starts nothing.
|
|
4774
|
+
*/
|
|
4775
|
+
private applyRemoteContinueAsNew;
|
|
4769
4776
|
/**
|
|
4770
4777
|
* Re-drive a run whose turn was computed from a history OLDER than the store's.
|
|
4771
4778
|
*
|
|
@@ -4864,6 +4871,59 @@ declare class WorkflowEngine {
|
|
|
4864
4871
|
* {@link redriveLostCall}). A terminal turn (completed/failed/cancelled) applies its commands only
|
|
4865
4872
|
* to record what already ran, and must never dispatch anything new. */
|
|
4866
4873
|
private applyCommands;
|
|
4874
|
+
/**
|
|
4875
|
+
* Park a remote turn on signal `token` at `seq`: register a waiter so `engine.signal(token)` lands
|
|
4876
|
+
* the resolving `signal` checkpoint here and resumes the run. If the signal was already delivered
|
|
4877
|
+
* (buffered before the workflow reached this point — e.g. signalWithStart), resolve it now and
|
|
4878
|
+
* re-drive on a macrotask, AFTER this turn suspends and frees the run lock (a re-entrant resume
|
|
4879
|
+
* bails).
|
|
4880
|
+
*/
|
|
4881
|
+
private parkRemoteOnSignal;
|
|
4882
|
+
/** Re-drive `runId` on a macrotask, after the current turn has suspended and freed its lease. */
|
|
4883
|
+
private resumeSoon;
|
|
4884
|
+
/**
|
|
4885
|
+
* Stamp the deadline of a BOUNDED remote wait at `deadlineSeq`, once: the first apply records
|
|
4886
|
+
* `now + timeoutMs` as a `timeout:<label>` timer, and every later one reads the recorded deadline
|
|
4887
|
+
* back (the in-process `stampDeadline`). The checkpoint's `input` names the wait it bounds, so the
|
|
4888
|
+
* deadline can drop that wait's waiter when it lapses — see {@link expireRemoteDeadlines}.
|
|
4889
|
+
*/
|
|
4890
|
+
private stampRemoteDeadline;
|
|
4891
|
+
/**
|
|
4892
|
+
* Before a remote turn reads its history: a bounded wait whose deadline has lapsed drops its waiter
|
|
4893
|
+
* (exact row only), so a signal or event arriving later cannot resolve a wait the turn already saw
|
|
4894
|
+
* time out — the in-process wait removes its waiter the same way when it finds the deadline past.
|
|
4895
|
+
* A delivery that took the waiter first wins: its checkpoint is read back into `checkpoints`, and the
|
|
4896
|
+
* worker's replay checks the wait before the deadline. Returns the (possibly extended) list.
|
|
4897
|
+
*/
|
|
4898
|
+
private expireRemoteDeadlines;
|
|
4899
|
+
/**
|
|
4900
|
+
* Claim one buffered event `name` whose payload satisfies `match` and that this run's tenant may
|
|
4901
|
+
* see — the remote twin of the in-process `waitForEvent`'s buffered consumption (oldest first; a
|
|
4902
|
+
* candidate claimed elsewhere first is skipped, not waited on). Expired candidates are pruned when
|
|
4903
|
+
* {@link eventBufferTtlMs} is set, like the reconcile sweep.
|
|
4904
|
+
*/
|
|
4905
|
+
private claimBufferedEvent;
|
|
4906
|
+
/** The lease a freshly dispatched remote `call` parks on: its liveness `timeoutMs` when its policy
|
|
4907
|
+
* sets one, else the lost-dispatch window (`remoteRedispatchMs`), else none. */
|
|
4908
|
+
private callLease;
|
|
4909
|
+
/**
|
|
4910
|
+
* A re-emitted remote `call` that carries its step's policy: apply the policy to the step's
|
|
4911
|
+
* checkpoint exactly as the in-process `ctx.step` path ({@link callRemote} / {@link
|
|
4912
|
+
* callRemoteInMemory}) applies it, so a step declared with retries, backoff or a timeout on a tenant
|
|
4913
|
+
* behaves as it does on a standalone engine. Returns the time to park the run on (`undefined`: no
|
|
4914
|
+
* timer, the step's result or the next turn moves it), or `null` when the policy has nothing to say
|
|
4915
|
+
* and the lost-dispatch self-heal ({@link redriveLostCall}) decides.
|
|
4916
|
+
*
|
|
4917
|
+
* - FAILED and retried (see `remoteCallRetries`): the first sight stamps the backoff deadline on
|
|
4918
|
+
* the failed checkpoint (`wakeAt`, durable and stable across replays); once due, the step is
|
|
4919
|
+
* dispatched again under the same `stepId` with `attempts + 1`.
|
|
4920
|
+
* - PENDING with a `timeoutMs`: the step's lease is `timeoutMs` from its dispatch. A lapsed lease
|
|
4921
|
+
* re-dispatches while attempts remain, then fails the step with a `remote_step_timeout` error the
|
|
4922
|
+
* workflow can catch, as `RemoteStepTimeout` would surface in-process.
|
|
4923
|
+
*/
|
|
4924
|
+
private applyCallPolicy;
|
|
4925
|
+
/** Dispatch a policed remote `call` again as attempt `attempt` (a retry, or a timed-out attempt). */
|
|
4926
|
+
private redispatchCall;
|
|
4867
4927
|
/**
|
|
4868
4928
|
* Undo the registered saga compensations in reverse and settle the run `cancelled`. Shared by EVERY
|
|
4869
4929
|
* exit path of a run with a compensating cancel in flight — whether the resumed replay returned,
|
|
@@ -7371,6 +7431,39 @@ interface WorkflowTask {
|
|
|
7371
7431
|
*/
|
|
7372
7432
|
priority?: number | undefined;
|
|
7373
7433
|
attempt: number;
|
|
7434
|
+
/**
|
|
7435
|
+
* The workflow-decision features the control plane that dispatched this turn can apply — see
|
|
7436
|
+
* {@link REMOTE_WORKFLOW_FEATURES}. A worker checks it before emitting a command an older control
|
|
7437
|
+
* plane would not understand, and fails the turn with a clear error instead. Absent on a task from
|
|
7438
|
+
* a control plane that predates feature negotiation: only the original command kinds are safe.
|
|
7439
|
+
*/
|
|
7440
|
+
features?: string[] | undefined;
|
|
7441
|
+
}
|
|
7442
|
+
/**
|
|
7443
|
+
* The workflow-decision features this control plane applies, advertised on every {@link WorkflowTask}
|
|
7444
|
+
* it dispatches (`task.features`):
|
|
7445
|
+
* - `callPolicy` — a `call` command's `policy` (retries, backoff, liveness `timeoutMs`) is enforced;
|
|
7446
|
+
* - `sleepUntil`, `waitSignalTimeout`, `waitEvent`, `spawnChild`, `continueAsNew` — the command kinds
|
|
7447
|
+
* of the same names.
|
|
7448
|
+
* A worker must not emit a command (or a `call` policy) whose feature the task does not list.
|
|
7449
|
+
*/
|
|
7450
|
+
declare const REMOTE_WORKFLOW_FEATURES: readonly ["callPolicy", "sleepUntil", "waitSignalTimeout", "waitEvent", "spawnChild", "continueAsNew"];
|
|
7451
|
+
/** One of {@link REMOTE_WORKFLOW_FEATURES}. */
|
|
7452
|
+
type RemoteWorkflowFeature = (typeof REMOTE_WORKFLOW_FEATURES)[number];
|
|
7453
|
+
/**
|
|
7454
|
+
* The durable dispatch policy a remote `call` command carries (feature `callPolicy`): the same fields,
|
|
7455
|
+
* defaults and semantics as the in-process `ctx.step` policy ({@link StepOptions}) — `retries` is the
|
|
7456
|
+
* total number of attempts; without `timeoutMs` a failed attempt is re-dispatched after `backoff`
|
|
7457
|
+
* unless the worker marked the error non-retryable; with `timeoutMs` an attempt that returns no
|
|
7458
|
+
* result within the window is re-dispatched (up to `retries`) and a reported failure is final.
|
|
7459
|
+
*/
|
|
7460
|
+
interface RemoteCallPolicy {
|
|
7461
|
+
retries?: number | undefined;
|
|
7462
|
+
backoff?: BackoffStrategy | undefined;
|
|
7463
|
+
backoffMs?: number | undefined;
|
|
7464
|
+
backoffMaxMs?: number | undefined;
|
|
7465
|
+
jitter?: boolean | undefined;
|
|
7466
|
+
timeoutMs?: number | undefined;
|
|
7374
7467
|
}
|
|
7375
7468
|
/** One resolved durable op in a run's history — a superset of a completed {@link StepCheckpoint}. */
|
|
7376
7469
|
interface HistoryEvent {
|
|
@@ -7386,6 +7479,11 @@ interface HistoryEvent {
|
|
|
7386
7479
|
output?: unknown;
|
|
7387
7480
|
/** Set when the op resolved to a failure (e.g. a failed remote step the workflow may catch). */
|
|
7388
7481
|
error?: StepError | undefined;
|
|
7482
|
+
/**
|
|
7483
|
+
* For a `call`: how many times the step was dispatched. A worker applying a `call` policy reads it
|
|
7484
|
+
* to decide whether a failed attempt is retried (see {@link RemoteCallPolicy}).
|
|
7485
|
+
*/
|
|
7486
|
+
attempts?: number | undefined;
|
|
7389
7487
|
}
|
|
7390
7488
|
/** A decision the workflow function produced at a `seq` that was not yet in history. */
|
|
7391
7489
|
type WorkflowCommand =
|
|
@@ -7400,6 +7498,10 @@ type WorkflowCommand =
|
|
|
7400
7498
|
group: string;
|
|
7401
7499
|
input: unknown;
|
|
7402
7500
|
parallelGroup?: string;
|
|
7501
|
+
/** The step's durable dispatch policy (feature `callPolicy`). Re-sent on every turn the step is
|
|
7502
|
+
* not resolved, so whichever control-plane instance applies the turn enforces it. A failed
|
|
7503
|
+
* attempt the policy retries is re-emitted with it instead of raised. */
|
|
7504
|
+
policy?: RemoteCallPolicy;
|
|
7403
7505
|
}
|
|
7404
7506
|
/** `ctx.step(name, body)` — a LOCAL step the worker already ran this turn; the engine persists its
|
|
7405
7507
|
* result so replay returns it instead of re-running (durability for side-effectful work).
|
|
@@ -7426,12 +7528,59 @@ type WorkflowCommand =
|
|
|
7426
7528
|
seq: number;
|
|
7427
7529
|
ms: number;
|
|
7428
7530
|
}
|
|
7531
|
+
/** `ctx.sleepUntil(when)` — a durable timer to an absolute epoch-ms deadline (feature `sleepUntil`). */
|
|
7532
|
+
| {
|
|
7533
|
+
kind: 'sleepUntil';
|
|
7534
|
+
seq: number;
|
|
7535
|
+
until: number;
|
|
7536
|
+
}
|
|
7429
7537
|
/** `ctx.wait_signal(name)` — block until a signal `name` is delivered to the run. */
|
|
7430
7538
|
| {
|
|
7431
7539
|
kind: 'waitSignal';
|
|
7432
7540
|
seq: number;
|
|
7433
7541
|
signal: string;
|
|
7434
7542
|
}
|
|
7543
|
+
/** `ctx.waitForSignal(name, { timeoutMs })` (feature `waitSignalTimeout`): like the in-process ctx it
|
|
7544
|
+
* takes TWO positions — `deadlineSeq` for the deadline timer (stamped once, at `now + timeoutMs`
|
|
7545
|
+
* when first applied) and `seq` for the wait. Whichever resolves first shows in history: the signal
|
|
7546
|
+
* at `seq`, or a `timer` at `deadlineSeq`, which the worker raises as a `SignalTimeoutError`. */
|
|
7547
|
+
| {
|
|
7548
|
+
kind: 'waitSignalTimeout';
|
|
7549
|
+
seq: number;
|
|
7550
|
+
deadlineSeq: number;
|
|
7551
|
+
signal: string;
|
|
7552
|
+
timeoutMs: number;
|
|
7553
|
+
}
|
|
7554
|
+
/** `ctx.waitForEvent(name, { match, timeoutMs })` (feature `waitEvent`): wait for a named event
|
|
7555
|
+
* published with `engine.publishEvent`, buffered events included. Bounded like
|
|
7556
|
+
* `waitSignalTimeout` when `timeoutMs` is set (then `deadlineSeq` is the deadline's position). */
|
|
7557
|
+
| {
|
|
7558
|
+
kind: 'waitEvent';
|
|
7559
|
+
seq: number;
|
|
7560
|
+
name: string;
|
|
7561
|
+
match?: Record<string, unknown>;
|
|
7562
|
+
deadlineSeq?: number;
|
|
7563
|
+
timeoutMs?: number;
|
|
7564
|
+
}
|
|
7565
|
+
/** `ctx.startChild(workflow, input, opts)` (feature `spawnChild`): start a child run WITHOUT awaiting
|
|
7566
|
+
* it. The worker returns `childId` immediately and the turn goes on; the control plane starts the
|
|
7567
|
+
* child once (idempotent by id) and journals a `spawn:<childId>` step at `seq`. */
|
|
7568
|
+
| {
|
|
7569
|
+
kind: 'spawnChild';
|
|
7570
|
+
seq: number;
|
|
7571
|
+
workflow: string;
|
|
7572
|
+
input: unknown;
|
|
7573
|
+
childId: string;
|
|
7574
|
+
priority?: number;
|
|
7575
|
+
}
|
|
7576
|
+
/** `ctx.continueAsNew(input)` (feature `continueAsNew`): the LAST command of a turn. The control
|
|
7577
|
+
* plane completes this run and starts its continuation (`<runId>~N`) with `input`, as the
|
|
7578
|
+
* in-process engine does. `seq` is the position the body had reached (not consumed). */
|
|
7579
|
+
| {
|
|
7580
|
+
kind: 'continueAsNew';
|
|
7581
|
+
seq: number;
|
|
7582
|
+
input: unknown;
|
|
7583
|
+
}
|
|
7435
7584
|
/** `ctx.waitForAny(name, conditions)` — block until the first of `conditions` happens. The engine
|
|
7436
7585
|
* resolves it exactly as the in-process ctx does (see `wait-any.ts`), journals `{ key, value }` at
|
|
7437
7586
|
* `seq` and replays it as an `any` {@link HistoryEvent}. A timer's `ms` counts from when the engine
|
|
@@ -9710,6 +9859,24 @@ declare function runSchedules(engine: ScheduleTickEngine, schedules: readonly Sc
|
|
|
9710
9859
|
*/
|
|
9711
9860
|
type ScheduleTickEngine = Pick<WorkflowEngine, 'start' | 'getRun'> & Partial<Pick<WorkflowEngine, 'isDraining' | 'listRuns'>>;
|
|
9712
9861
|
|
|
9862
|
+
/**
|
|
9863
|
+
* The durable dispatch policy of a `ctx.step` call as a remote `call` command carries it: the
|
|
9864
|
+
* `@Step`-declared config, with a per-call `opts` field winning wherever it is set — the same merge
|
|
9865
|
+
* the in-process `ctx.step` applies. `undefined` when neither declares any policy field, so a call
|
|
9866
|
+
* without one stays wire-identical to a call from before policies were carried.
|
|
9867
|
+
*/
|
|
9868
|
+
declare function remoteCallPolicyOf(config: StepConfig | undefined, opts: StepDispatchOpts | undefined): RemoteCallPolicy | undefined;
|
|
9869
|
+
/** Total dispatch attempts a policy allows (`retries`, at least one) — the in-process rule. */
|
|
9870
|
+
declare function remoteCallMaxAttempts(policy: RemoteCallPolicy | undefined): number;
|
|
9871
|
+
/**
|
|
9872
|
+
* Whether a remote `call` whose attempt `attempts` FAILED with `error` is dispatched again under
|
|
9873
|
+
* `policy`, exactly as the in-process durable path decides it: never with a liveness `timeoutMs`
|
|
9874
|
+
* (there only a timeout is retried, a reported failure is final), never for an error the worker
|
|
9875
|
+
* marked non-retryable, and only while attempts remain. The worker's replay and the control plane
|
|
9876
|
+
* both decide with this one function, so they cannot disagree about a retry.
|
|
9877
|
+
*/
|
|
9878
|
+
declare function remoteCallRetries(policy: RemoteCallPolicy | undefined, attempts: number, error: StepError | undefined): boolean;
|
|
9879
|
+
|
|
9713
9880
|
/**
|
|
9714
9881
|
* A {@link StepLogger} that appends to `events`, stamping each line with `now()`. Shared by the
|
|
9715
9882
|
* local-step path (`ctx.step`) and the remote-worker path (`runStepHandler`) so a step records
|
|
@@ -10277,4 +10444,4 @@ declare function prevRRuleFireMs(rule: ParsedRRule, atMs: number): number | null
|
|
|
10277
10444
|
*/
|
|
10278
10445
|
declare function settleResultsWithPlainCalls(store: Pick<StateStore, 'getRun' | 'getCheckpoint'> & Partial<Pick<StateStore, 'getRuns' | 'getCheckpointsForSettle' | 'getCheckpoints' | 'settleCheckpointsIfPending'>>, results: StepResultSettlement[]): Promise<(StepCheckpoint | null)[]>;
|
|
10279
10446
|
|
|
10280
|
-
export { ACCUMULATOR_SEEN_MAX, ANNOUNCED_SCHEDULE_TAG, ANY_WAIT_GROUP, type AccumulatorHost, type AccumulatorStartOptions, type Admission, type AdmissionBackend, type AdmissionItem, type AllOptions, type AllSettledOptions, type AllStepsOptions, type AllStepsSettledOptions, type AnnouncedSchedule, type AnnouncedScheduleSync, type AnnouncedWorkflow, type AnnouncedWorkflowOptions, type AnnouncementEvidence, type AttributeFilter, type AttributeOp, type AttributePredicateOperand, type AttributeValue, type AttributedEngineEvent, type BackoffStrategy, type BlockedDispatch, type BlockedResolution, type BufferedSignalRow, CHILD_EDGE_PREFIXES, CONTROL_FLOW_SIGNAL, CORE_ORIGIN, CURRENT_PROTOCOL_VERSION, type CapabilityRequirement, type CheckpointAggregatingStore, type CheckpointNameKind, type CheckpointQuery, type CheckpointStat, type ChildCallOptions, type ChildWait, CodecStateStore, type CodecStateStoreOptions, type ConcurrencyConfig, ConcurrencyLimitError, type ConcurrencyQuota, type ConsoleCapabilities, type ConsoleFederation, ContinueAsNew, type ControlMessage, type ControlPlane, DEFAULT_ANNOUNCED_SCHEDULE_GRACE_MS, DEFAULT_CONCURRENCY_STATUSES, DEFAULT_PARTITION, DEFAULT_STALLED_AFTER_MS, DURABLE_OPTIONS, DURABLE_OPTIONS_CANONICAL, DURABLE_STEP_CONFIG, DURABLE_STEP_NAME, type Disagreement, type DispatchDiagnostics, type DispatchPlan, DuplicateDurableCopyError, type DurableCopy, type DurableExecution, type DurableExecutionWrapper, type DurableTopology, type DurableWebhook, DurableWorkflow, type DynamicWorkflowCtx, ENGINE_MINTED_TAG_PREFIXES, ENTITY_WORKFLOW, EVENT_BUFFER_SCAN_LIMIT, EVENT_TOKEN_PREFIX, type EngineEvent, type EngineEventType, type EngineListener, type EngineTenancy, Entities, type EntityConfig, type EntityHandler, type EntityHost, type EntityWorkflowHost, EventAccumulators, type EventBatchConfig, type EventSubscription, FAN_SUMMARY_FAILURES, type FanJoin, type FanPage, type FanPageQuery, type FanSummary, type FanWait, FatalError, type FindStalledRunsOptions, GatherError, type GatherItemFailure, type GroupHealth, HANDOFF_SEQ_BASE, type Heartbeat, type HeartbeatSighting, type HeartbeatStatus, type HistoryEvent, InMemoryAdmissionBackend, InMemoryRunQueue, InMemoryStateStore, InMemoryTransport, type InferSearchAttributes, LEGACY_V1_CAPABILITIES, LEGACY_V1_PROTOCOL, LIFECYCLE_COALESCED_TAG_PREFIX, LIFECYCLE_HEAL_WINDOW_MS, LIFECYCLE_ORPHAN_MS, LIFECYCLE_OWED_TAG_PREFIX, LIFECYCLE_PENDING_TAG, LIFECYCLE_REGISTRY_HEARTBEAT_MS, LIFECYCLE_REGISTRY_STALE_MS, LIFECYCLE_REGISTRY_TAG, LIFECYCLE_REGISTRY_TTL_MS, LIFECYCLE_REGISTRY_WORKFLOW, LIFECYCLE_TRACE_TAG_PREFIX, LIFECYCLE_TRIGGERED_TAG_PREFIX, LIFECYCLE_TRIGGER_FAILED_TAG_PREFIX, type LifecycleDelivery, type LifecycleDeliveryState, type LifecycleEventOf, type LifecycleKind, type LifecycleRegistryEntry, type LifecycleSource, type LifecycleSubscriptionLink, type ListStalledRunsOptions, type MetricsCollector, type MetricsSnapshot, NO_LIVE_WORKER, type NamedTransport, type NegotiateOptions, type NegotiationOutcome, type NegotiationReason, type NegotiationResult, NestedWorkflowCallError, NonDeterminismError, type OnErrorInput, type OnErrorRoute, type OnEventEntry, type OwnedLeaseReclaim, PARENT_CLOSE_TAG_PREFIX, type ParentClosePolicy, type ParsedRRule, type PartitionSighting, type PayloadCodec, type QueueConfig, QueueController, REMOTE_EVENT, RUN_HISTORY_FIXTURE_VERSION, RUN_VALUE_FACET_LIMIT, RUN_VALUE_FACET_SCAN, RUN_WAIT_TOKEN_PREFIX, type RawWorkerDescriptor, RemoteStepError, RemoteStepTimeout, type RemoteTask, RemoteWorkflowExecutor, RemoteWorkflowTimeout, type RepublishLifecycleResult, type RepublishLifecycleTarget, type RetentionPolicy, type RoutableDispatch, type RoutableResolution, type RoutingResolution, type RunAppAttribution, RunAppStamper, type RunAppTopologyOptions, type RunAttributeRow, type RunConsumerOptions, type RunDetail, type RunDetailOptions, type RunDispatch, type RunDispatcher, type RunFacetQuery, type RunFacetRow, RunGateway, type RunListItem, type RunQuery, type RunQueueOptions, type RunReply, type RunReplyResult, type RunRequest, type RunRequestKind, type RunResult, type RunSchedulesOptions, type RunScope, type RunStatus, type RunTenant, type RunValueAxis, type RunValueFacetOptions, type RunValueFacetOrder, type RunValueFacetRow, type RunWaitLink, type RunWaiting, SINGLETON_ACTIVE_STATUSES, SINGLETON_ADMITTED_TAG, SINGLETON_LOCK_CHUNK, SINGLETON_RESERVED_TAGS, SINGLETON_TRACKED_TAG, STATE_STORE, STATE_STORE_CANONICAL, SUMMARY_CHILD_LIMIT, type ScalarAttributeFilter, type ScheduleAction, ScheduleAlreadyExistsError, type ScheduleAnnouncement, ScheduleClient, type ScheduleClientOptions, type ScheduleDescription, type ScheduleHost, type ScheduleListQuery, ScheduleNotFoundError, type ScheduleOptions, type ScheduleQuery, type ScheduleRecord, type ScheduleTickEngine, type ScheduledWorkflow, type SchemaIssue, type SchemaValidationCode, SchemaValidationError, type SearchAttributes, type SearchAttributesSchema, type Settled, type SignalOptions, SignalTimeoutError, type SignalWaiter, type SingletonConfig, SingletonQueueFullError, type StalePendingStep, type StalledRunInfo, StandardSchemaV1, type StartOptions, type StartRunMessage, type StartRunSingleton, 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 StepResultSettlement, type StepScope, type StepSettlement, type StepUndo, type StoreTransaction, type SubProcessHandle, TERMINAL_RUN_STATUSES, TRANSPORT, TRANSPORT_CANONICAL, type TenantEvent, type TenantFilter, type TenantRow, type TenantTokenSource, type TenantVerifier, type Transport, type UndoOf, type UpdateResult, type UpdateValidator, VERSION_UNDECLARED_TAG, type VerifiedTenant, WORKFLOW_NAME_KEY, type WaitAnyCondition, type WaitAnyOutcome, type WaitAnyResult, type WaitCondition, type WaitConditionSpec, type WaitForRunOptions, 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 WorkflowLifecycleEvent, type WorkflowLifecycleLinks, WorkflowNotRegistered, type WorkflowOutputOf, type WorkflowRef, type WorkflowRegistration, type WorkflowRun, type WorkflowStartClient, type WorkflowStepEvent, WorkflowSuspended, type WorkflowTask, acceptingSubscription, accumulatorRunId, aggregateAnnouncements, aggregatesCheckpoints, announcedScheduleId, announcementsOf, anyCheckpointName, applyAttributeQuery, assertConcurrency, assertRoutes, assertSingleDurableCopy, attributeColumnFor, attributeOperand, attributePredicateOperands, axisIsRunColumn, bindWorkflowClass, breakpointToken, bufferedEventReaches, buildWorkflowDirectory, canRoute, capableWorkers, carriesLifecyclePending, checkpointNameKind, checkpointStatsOf, childIdsOf, classifyWaiterToken, clearDurableExecutionWrappers, clearTerminalSingletonAdmission, coalescedSubscribersOf, codeAndDetails, codeOf, collectMetrics, concurrencyTag, controlPlaneAttribution, controlPlaneDescriptor, countRuns, coveredTokens, createStepLogger, currentStep, currentStepScope, currentWorkflowCtx, debug, describeWorker, descriptorHash, detailsOf, durableCopies, error, etagMatches, eventMatchOf, eventMatches, eventNameOf, eventPrefix, eventToken, extendEtag, facetOrigin, fanPageBounds, fanPageEtag, findStalledRuns, foldedCount, getRunsByIds, grantsClientTenant, handoffHandlerId, handoffName, hasDurableExecutionWrappers, heartbeatStatus, hmacTenantVerifier, indexWaitersByRun, info, inheritTenant, isAnyCheckpoint, isAnyMember, isEngineMintedTag, isEventToken, isFailedMember, isLegacyDescriptor, isLifecycleTag, isNonEmptyRunScope, isRemoteEvent, isWorkflowControlFlowSignal, legacySingletonHolders, lifecycleDeliveriesOf, lifecycleEventName, lifecycleEventOf, lifecycleKindOf, lifecycleRegistryNamespace, lifecycleRegistryRunId, lifecycleRegistrySubscriptions, lifecycleRunId, lifecycleSourceOf, lifecycleTraceparentOf, listSignalWaitersOfRuns, liveHandoff, log, markRemoteEvent, matchesAttributes, matchesTenantPredicates, mergeRunFacetRows, mergeRunValueFacetRows, missingCapabilities, negotiate, nextCronFireMs, nextRRuleFireMs, nextScheduleFireAt, normalizeAttributeRows, normalizeDescriptor, observedAnnouncements, onErrorRunId, owedSubscribersOf, pageFan, pageFanFromStore, parentRunIdOf, parseDuration, parseLifecycleEvent, parseRRule, parseWebhookToken, partitionOfToken, planDispatch, poolNamespace, prevCronFireMs, prevRRuleFireMs, queryCheckpointsOf, readBufferedEvent, readRunsByIds, readSearchAttributes, requiredCapabilities, resolveConcurrency, resolveRouting, resolveRunWaiting, resolveTenantToken, resolveWireTenant, retentionKeeps, retiredHandoffName, routeFor, rowTenant, runCompletedEvent, runDetailEtag, runDurableExecution, runFailedEvent, runInStepLogger, runInStepScope, runInWorkflowCtx, runOutsideWorkflowCtx, runSchedules, runStepHandler, runTraceId, runValueFacetsFromRuns, runWaitPrefix, runWaitTargetOf, runWaitToken, sanitizeQueueToken, scheduleRunIdAt, scheduledRunId, scopeBufferedEvent, scopeTenantQuery, sealDurableCopies, settleResultsWithPlainCalls, signTenantToken, singletonAdmissionDenialPatch, singletonAdmissionTags, singletonClaimantIds, sqlComparator, stepConfigOf, stepId, stepNameOf, sub, subEvent, subProcess, summarizeFan, summarizeRunFromStore, summarizeTimeline, tenantAppOf, tenantGroup, tenantIdsFor, tenantVisible, toEventSubscription, traceIdOfTraceparent, triggerFailedSubscribersOf, triggeredRunsOf, triggeredSubscribersOf, useDurableExecution, verifyWireTenant, warn, withSingletonTracked, withoutSingletonMarkers, workflowName };
|
|
10447
|
+
export { ACCUMULATOR_SEEN_MAX, ANNOUNCED_SCHEDULE_TAG, ANY_WAIT_GROUP, type AccumulatorHost, type AccumulatorStartOptions, type Admission, type AdmissionBackend, type AdmissionItem, type AllOptions, type AllSettledOptions, type AllStepsOptions, type AllStepsSettledOptions, type AnnouncedSchedule, type AnnouncedScheduleSync, type AnnouncedWorkflow, type AnnouncedWorkflowOptions, type AnnouncementEvidence, type AttributeFilter, type AttributeOp, type AttributePredicateOperand, type AttributeValue, type AttributedEngineEvent, type BackoffStrategy, type BlockedDispatch, type BlockedResolution, type BufferedSignalRow, CHILD_EDGE_PREFIXES, CONTROL_FLOW_SIGNAL, CORE_ORIGIN, CURRENT_PROTOCOL_VERSION, type CapabilityRequirement, type CheckpointAggregatingStore, type CheckpointNameKind, type CheckpointQuery, type CheckpointStat, type ChildCallOptions, type ChildWait, CodecStateStore, type CodecStateStoreOptions, type ConcurrencyConfig, ConcurrencyLimitError, type ConcurrencyQuota, type ConsoleCapabilities, type ConsoleFederation, ContinueAsNew, type ControlMessage, type ControlPlane, DEFAULT_ANNOUNCED_SCHEDULE_GRACE_MS, DEFAULT_CONCURRENCY_STATUSES, DEFAULT_PARTITION, DEFAULT_STALLED_AFTER_MS, DURABLE_OPTIONS, DURABLE_OPTIONS_CANONICAL, DURABLE_STEP_CONFIG, DURABLE_STEP_NAME, type Disagreement, type DispatchDiagnostics, type DispatchPlan, DuplicateDurableCopyError, type DurableCopy, type DurableExecution, type DurableExecutionWrapper, type DurableTopology, type DurableWebhook, DurableWorkflow, type DynamicWorkflowCtx, ENGINE_MINTED_TAG_PREFIXES, ENTITY_WORKFLOW, EVENT_BUFFER_SCAN_LIMIT, EVENT_TOKEN_PREFIX, type EngineEvent, type EngineEventType, type EngineListener, type EngineTenancy, Entities, type EntityConfig, type EntityHandler, type EntityHost, type EntityWorkflowHost, EventAccumulators, type EventBatchConfig, type EventSubscription, FAN_SUMMARY_FAILURES, type FanJoin, type FanPage, type FanPageQuery, type FanSummary, type FanWait, FatalError, type FindStalledRunsOptions, GatherError, type GatherItemFailure, type GroupHealth, HANDOFF_SEQ_BASE, type Heartbeat, type HeartbeatSighting, type HeartbeatStatus, type HistoryEvent, InMemoryAdmissionBackend, InMemoryRunQueue, InMemoryStateStore, InMemoryTransport, type InferSearchAttributes, LEGACY_V1_CAPABILITIES, LEGACY_V1_PROTOCOL, LIFECYCLE_COALESCED_TAG_PREFIX, LIFECYCLE_HEAL_WINDOW_MS, LIFECYCLE_ORPHAN_MS, LIFECYCLE_OWED_TAG_PREFIX, LIFECYCLE_PENDING_TAG, LIFECYCLE_REGISTRY_HEARTBEAT_MS, LIFECYCLE_REGISTRY_STALE_MS, LIFECYCLE_REGISTRY_TAG, LIFECYCLE_REGISTRY_TTL_MS, LIFECYCLE_REGISTRY_WORKFLOW, LIFECYCLE_TRACE_TAG_PREFIX, LIFECYCLE_TRIGGERED_TAG_PREFIX, LIFECYCLE_TRIGGER_FAILED_TAG_PREFIX, type LifecycleDelivery, type LifecycleDeliveryState, type LifecycleEventOf, type LifecycleKind, type LifecycleRegistryEntry, type LifecycleSource, type LifecycleSubscriptionLink, type ListStalledRunsOptions, type MetricsCollector, type MetricsSnapshot, NO_LIVE_WORKER, type NamedTransport, type NegotiateOptions, type NegotiationOutcome, type NegotiationReason, type NegotiationResult, NestedWorkflowCallError, NonDeterminismError, type OnErrorInput, type OnErrorRoute, type OnEventEntry, type OwnedLeaseReclaim, PARENT_CLOSE_TAG_PREFIX, type ParentClosePolicy, type ParsedRRule, type PartitionSighting, type PayloadCodec, type QueueConfig, QueueController, REMOTE_EVENT, REMOTE_WORKFLOW_FEATURES, RUN_HISTORY_FIXTURE_VERSION, RUN_VALUE_FACET_LIMIT, RUN_VALUE_FACET_SCAN, RUN_WAIT_TOKEN_PREFIX, type RawWorkerDescriptor, type RemoteCallPolicy, RemoteStepError, RemoteStepTimeout, type RemoteTask, RemoteWorkflowExecutor, type RemoteWorkflowFeature, RemoteWorkflowTimeout, type RepublishLifecycleResult, type RepublishLifecycleTarget, type RetentionPolicy, type RoutableDispatch, type RoutableResolution, type RoutingResolution, type RunAppAttribution, RunAppStamper, type RunAppTopologyOptions, type RunAttributeRow, type RunConsumerOptions, type RunDetail, type RunDetailOptions, type RunDispatch, type RunDispatcher, type RunFacetQuery, type RunFacetRow, RunGateway, type RunListItem, type RunQuery, type RunQueueOptions, type RunReply, type RunReplyResult, type RunRequest, type RunRequestKind, type RunResult, type RunSchedulesOptions, type RunScope, type RunStatus, type RunTenant, type RunValueAxis, type RunValueFacetOptions, type RunValueFacetOrder, type RunValueFacetRow, type RunWaitLink, type RunWaiting, SINGLETON_ACTIVE_STATUSES, SINGLETON_ADMITTED_TAG, SINGLETON_LOCK_CHUNK, SINGLETON_RESERVED_TAGS, SINGLETON_TRACKED_TAG, STATE_STORE, STATE_STORE_CANONICAL, SUMMARY_CHILD_LIMIT, type ScalarAttributeFilter, type ScheduleAction, ScheduleAlreadyExistsError, type ScheduleAnnouncement, ScheduleClient, type ScheduleClientOptions, type ScheduleDescription, type ScheduleHost, type ScheduleListQuery, ScheduleNotFoundError, type ScheduleOptions, type ScheduleQuery, type ScheduleRecord, type ScheduleTickEngine, type ScheduledWorkflow, type SchemaIssue, type SchemaValidationCode, SchemaValidationError, type SearchAttributes, type SearchAttributesSchema, type Settled, type SignalOptions, SignalTimeoutError, type SignalWaiter, type SingletonConfig, SingletonQueueFullError, type StalePendingStep, type StalledRunInfo, StandardSchemaV1, type StartOptions, type StartRunMessage, type StartRunSingleton, 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 StepResultSettlement, type StepScope, type StepSettlement, type StepUndo, type StoreTransaction, type SubProcessHandle, TERMINAL_RUN_STATUSES, TRANSPORT, TRANSPORT_CANONICAL, type TenantEvent, type TenantFilter, type TenantRow, type TenantTokenSource, type TenantVerifier, type Transport, type UndoOf, type UpdateResult, type UpdateValidator, VERSION_UNDECLARED_TAG, type VerifiedTenant, WORKFLOW_NAME_KEY, type WaitAnyCondition, type WaitAnyOutcome, type WaitAnyResult, type WaitCondition, type WaitConditionSpec, type WaitForRunOptions, 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 WorkflowLifecycleEvent, type WorkflowLifecycleLinks, WorkflowNotRegistered, type WorkflowOutputOf, type WorkflowRef, type WorkflowRegistration, type WorkflowRun, type WorkflowStartClient, type WorkflowStepEvent, WorkflowSuspended, type WorkflowTask, acceptingSubscription, accumulatorRunId, aggregateAnnouncements, aggregatesCheckpoints, announcedScheduleId, announcementsOf, anyCheckpointName, applyAttributeQuery, assertConcurrency, assertRoutes, assertSingleDurableCopy, attributeColumnFor, attributeOperand, attributePredicateOperands, axisIsRunColumn, bindWorkflowClass, breakpointToken, bufferedEventReaches, buildWorkflowDirectory, canRoute, capableWorkers, carriesLifecyclePending, checkpointNameKind, checkpointStatsOf, childIdsOf, classifyWaiterToken, clearDurableExecutionWrappers, clearTerminalSingletonAdmission, coalescedSubscribersOf, codeAndDetails, codeOf, collectMetrics, concurrencyTag, controlPlaneAttribution, controlPlaneDescriptor, countRuns, coveredTokens, createStepLogger, currentStep, currentStepScope, currentWorkflowCtx, debug, describeWorker, descriptorHash, detailsOf, durableCopies, error, etagMatches, eventMatchOf, eventMatches, eventNameOf, eventPrefix, eventToken, extendEtag, facetOrigin, fanPageBounds, fanPageEtag, findStalledRuns, foldedCount, getRunsByIds, grantsClientTenant, handoffHandlerId, handoffName, hasDurableExecutionWrappers, heartbeatStatus, hmacTenantVerifier, indexWaitersByRun, info, inheritTenant, isAnyCheckpoint, isAnyMember, isEngineMintedTag, isEventToken, isFailedMember, isLegacyDescriptor, isLifecycleTag, isNonEmptyRunScope, isRemoteEvent, isWorkflowControlFlowSignal, legacySingletonHolders, lifecycleDeliveriesOf, lifecycleEventName, lifecycleEventOf, lifecycleKindOf, lifecycleRegistryNamespace, lifecycleRegistryRunId, lifecycleRegistrySubscriptions, lifecycleRunId, lifecycleSourceOf, lifecycleTraceparentOf, listSignalWaitersOfRuns, liveHandoff, log, markRemoteEvent, matchesAttributes, matchesTenantPredicates, mergeRunFacetRows, mergeRunValueFacetRows, missingCapabilities, negotiate, nextCronFireMs, nextRRuleFireMs, nextScheduleFireAt, normalizeAttributeRows, normalizeDescriptor, observedAnnouncements, onErrorRunId, owedSubscribersOf, pageFan, pageFanFromStore, parentRunIdOf, parseDuration, parseLifecycleEvent, parseRRule, parseWebhookToken, partitionOfToken, planDispatch, poolNamespace, prevCronFireMs, prevRRuleFireMs, queryCheckpointsOf, readBufferedEvent, readRunsByIds, readSearchAttributes, remoteCallMaxAttempts, remoteCallPolicyOf, remoteCallRetries, requiredCapabilities, resolveConcurrency, resolveRouting, resolveRunWaiting, resolveTenantToken, resolveWireTenant, retentionKeeps, retiredHandoffName, routeFor, rowTenant, runCompletedEvent, runDetailEtag, runDurableExecution, runFailedEvent, runInStepLogger, runInStepScope, runInWorkflowCtx, runOutsideWorkflowCtx, runSchedules, runStepHandler, runTraceId, runValueFacetsFromRuns, runWaitPrefix, runWaitTargetOf, runWaitToken, sanitizeQueueToken, scheduleRunIdAt, scheduledRunId, scopeBufferedEvent, scopeTenantQuery, sealDurableCopies, settleResultsWithPlainCalls, signTenantToken, singletonAdmissionDenialPatch, singletonAdmissionTags, singletonClaimantIds, sqlComparator, stepConfigOf, stepId, stepNameOf, sub, subEvent, subProcess, summarizeFan, summarizeRunFromStore, summarizeTimeline, tenantAppOf, tenantGroup, tenantIdsFor, tenantVisible, toEventSubscription, traceIdOfTraceparent, triggerFailedSubscribersOf, triggeredRunsOf, triggeredSubscribersOf, useDurableExecution, verifyWireTenant, warn, withSingletonTracked, withoutSingletonMarkers, workflowName };
|
package/dist/index.d.ts
CHANGED
|
@@ -4766,6 +4766,13 @@ declare class WorkflowEngine {
|
|
|
4766
4766
|
* — the caller has already ensured this is the decision for the currently-awaited turn.
|
|
4767
4767
|
*/
|
|
4768
4768
|
private applyDecision;
|
|
4769
|
+
/**
|
|
4770
|
+
* A remote turn that ended in `ctx.continueAsNew(input)`: record what the turn ran, complete this
|
|
4771
|
+
* run and start its continuation (`<runId>~N`) with `input` on a clean history — the in-process
|
|
4772
|
+
* engine's handoff, with the run's partition and tenant carried over. A run cancelled while the
|
|
4773
|
+
* turn replayed stays cancelled and starts nothing.
|
|
4774
|
+
*/
|
|
4775
|
+
private applyRemoteContinueAsNew;
|
|
4769
4776
|
/**
|
|
4770
4777
|
* Re-drive a run whose turn was computed from a history OLDER than the store's.
|
|
4771
4778
|
*
|
|
@@ -4864,6 +4871,59 @@ declare class WorkflowEngine {
|
|
|
4864
4871
|
* {@link redriveLostCall}). A terminal turn (completed/failed/cancelled) applies its commands only
|
|
4865
4872
|
* to record what already ran, and must never dispatch anything new. */
|
|
4866
4873
|
private applyCommands;
|
|
4874
|
+
/**
|
|
4875
|
+
* Park a remote turn on signal `token` at `seq`: register a waiter so `engine.signal(token)` lands
|
|
4876
|
+
* the resolving `signal` checkpoint here and resumes the run. If the signal was already delivered
|
|
4877
|
+
* (buffered before the workflow reached this point — e.g. signalWithStart), resolve it now and
|
|
4878
|
+
* re-drive on a macrotask, AFTER this turn suspends and frees the run lock (a re-entrant resume
|
|
4879
|
+
* bails).
|
|
4880
|
+
*/
|
|
4881
|
+
private parkRemoteOnSignal;
|
|
4882
|
+
/** Re-drive `runId` on a macrotask, after the current turn has suspended and freed its lease. */
|
|
4883
|
+
private resumeSoon;
|
|
4884
|
+
/**
|
|
4885
|
+
* Stamp the deadline of a BOUNDED remote wait at `deadlineSeq`, once: the first apply records
|
|
4886
|
+
* `now + timeoutMs` as a `timeout:<label>` timer, and every later one reads the recorded deadline
|
|
4887
|
+
* back (the in-process `stampDeadline`). The checkpoint's `input` names the wait it bounds, so the
|
|
4888
|
+
* deadline can drop that wait's waiter when it lapses — see {@link expireRemoteDeadlines}.
|
|
4889
|
+
*/
|
|
4890
|
+
private stampRemoteDeadline;
|
|
4891
|
+
/**
|
|
4892
|
+
* Before a remote turn reads its history: a bounded wait whose deadline has lapsed drops its waiter
|
|
4893
|
+
* (exact row only), so a signal or event arriving later cannot resolve a wait the turn already saw
|
|
4894
|
+
* time out — the in-process wait removes its waiter the same way when it finds the deadline past.
|
|
4895
|
+
* A delivery that took the waiter first wins: its checkpoint is read back into `checkpoints`, and the
|
|
4896
|
+
* worker's replay checks the wait before the deadline. Returns the (possibly extended) list.
|
|
4897
|
+
*/
|
|
4898
|
+
private expireRemoteDeadlines;
|
|
4899
|
+
/**
|
|
4900
|
+
* Claim one buffered event `name` whose payload satisfies `match` and that this run's tenant may
|
|
4901
|
+
* see — the remote twin of the in-process `waitForEvent`'s buffered consumption (oldest first; a
|
|
4902
|
+
* candidate claimed elsewhere first is skipped, not waited on). Expired candidates are pruned when
|
|
4903
|
+
* {@link eventBufferTtlMs} is set, like the reconcile sweep.
|
|
4904
|
+
*/
|
|
4905
|
+
private claimBufferedEvent;
|
|
4906
|
+
/** The lease a freshly dispatched remote `call` parks on: its liveness `timeoutMs` when its policy
|
|
4907
|
+
* sets one, else the lost-dispatch window (`remoteRedispatchMs`), else none. */
|
|
4908
|
+
private callLease;
|
|
4909
|
+
/**
|
|
4910
|
+
* A re-emitted remote `call` that carries its step's policy: apply the policy to the step's
|
|
4911
|
+
* checkpoint exactly as the in-process `ctx.step` path ({@link callRemote} / {@link
|
|
4912
|
+
* callRemoteInMemory}) applies it, so a step declared with retries, backoff or a timeout on a tenant
|
|
4913
|
+
* behaves as it does on a standalone engine. Returns the time to park the run on (`undefined`: no
|
|
4914
|
+
* timer, the step's result or the next turn moves it), or `null` when the policy has nothing to say
|
|
4915
|
+
* and the lost-dispatch self-heal ({@link redriveLostCall}) decides.
|
|
4916
|
+
*
|
|
4917
|
+
* - FAILED and retried (see `remoteCallRetries`): the first sight stamps the backoff deadline on
|
|
4918
|
+
* the failed checkpoint (`wakeAt`, durable and stable across replays); once due, the step is
|
|
4919
|
+
* dispatched again under the same `stepId` with `attempts + 1`.
|
|
4920
|
+
* - PENDING with a `timeoutMs`: the step's lease is `timeoutMs` from its dispatch. A lapsed lease
|
|
4921
|
+
* re-dispatches while attempts remain, then fails the step with a `remote_step_timeout` error the
|
|
4922
|
+
* workflow can catch, as `RemoteStepTimeout` would surface in-process.
|
|
4923
|
+
*/
|
|
4924
|
+
private applyCallPolicy;
|
|
4925
|
+
/** Dispatch a policed remote `call` again as attempt `attempt` (a retry, or a timed-out attempt). */
|
|
4926
|
+
private redispatchCall;
|
|
4867
4927
|
/**
|
|
4868
4928
|
* Undo the registered saga compensations in reverse and settle the run `cancelled`. Shared by EVERY
|
|
4869
4929
|
* exit path of a run with a compensating cancel in flight — whether the resumed replay returned,
|
|
@@ -7371,6 +7431,39 @@ interface WorkflowTask {
|
|
|
7371
7431
|
*/
|
|
7372
7432
|
priority?: number | undefined;
|
|
7373
7433
|
attempt: number;
|
|
7434
|
+
/**
|
|
7435
|
+
* The workflow-decision features the control plane that dispatched this turn can apply — see
|
|
7436
|
+
* {@link REMOTE_WORKFLOW_FEATURES}. A worker checks it before emitting a command an older control
|
|
7437
|
+
* plane would not understand, and fails the turn with a clear error instead. Absent on a task from
|
|
7438
|
+
* a control plane that predates feature negotiation: only the original command kinds are safe.
|
|
7439
|
+
*/
|
|
7440
|
+
features?: string[] | undefined;
|
|
7441
|
+
}
|
|
7442
|
+
/**
|
|
7443
|
+
* The workflow-decision features this control plane applies, advertised on every {@link WorkflowTask}
|
|
7444
|
+
* it dispatches (`task.features`):
|
|
7445
|
+
* - `callPolicy` — a `call` command's `policy` (retries, backoff, liveness `timeoutMs`) is enforced;
|
|
7446
|
+
* - `sleepUntil`, `waitSignalTimeout`, `waitEvent`, `spawnChild`, `continueAsNew` — the command kinds
|
|
7447
|
+
* of the same names.
|
|
7448
|
+
* A worker must not emit a command (or a `call` policy) whose feature the task does not list.
|
|
7449
|
+
*/
|
|
7450
|
+
declare const REMOTE_WORKFLOW_FEATURES: readonly ["callPolicy", "sleepUntil", "waitSignalTimeout", "waitEvent", "spawnChild", "continueAsNew"];
|
|
7451
|
+
/** One of {@link REMOTE_WORKFLOW_FEATURES}. */
|
|
7452
|
+
type RemoteWorkflowFeature = (typeof REMOTE_WORKFLOW_FEATURES)[number];
|
|
7453
|
+
/**
|
|
7454
|
+
* The durable dispatch policy a remote `call` command carries (feature `callPolicy`): the same fields,
|
|
7455
|
+
* defaults and semantics as the in-process `ctx.step` policy ({@link StepOptions}) — `retries` is the
|
|
7456
|
+
* total number of attempts; without `timeoutMs` a failed attempt is re-dispatched after `backoff`
|
|
7457
|
+
* unless the worker marked the error non-retryable; with `timeoutMs` an attempt that returns no
|
|
7458
|
+
* result within the window is re-dispatched (up to `retries`) and a reported failure is final.
|
|
7459
|
+
*/
|
|
7460
|
+
interface RemoteCallPolicy {
|
|
7461
|
+
retries?: number | undefined;
|
|
7462
|
+
backoff?: BackoffStrategy | undefined;
|
|
7463
|
+
backoffMs?: number | undefined;
|
|
7464
|
+
backoffMaxMs?: number | undefined;
|
|
7465
|
+
jitter?: boolean | undefined;
|
|
7466
|
+
timeoutMs?: number | undefined;
|
|
7374
7467
|
}
|
|
7375
7468
|
/** One resolved durable op in a run's history — a superset of a completed {@link StepCheckpoint}. */
|
|
7376
7469
|
interface HistoryEvent {
|
|
@@ -7386,6 +7479,11 @@ interface HistoryEvent {
|
|
|
7386
7479
|
output?: unknown;
|
|
7387
7480
|
/** Set when the op resolved to a failure (e.g. a failed remote step the workflow may catch). */
|
|
7388
7481
|
error?: StepError | undefined;
|
|
7482
|
+
/**
|
|
7483
|
+
* For a `call`: how many times the step was dispatched. A worker applying a `call` policy reads it
|
|
7484
|
+
* to decide whether a failed attempt is retried (see {@link RemoteCallPolicy}).
|
|
7485
|
+
*/
|
|
7486
|
+
attempts?: number | undefined;
|
|
7389
7487
|
}
|
|
7390
7488
|
/** A decision the workflow function produced at a `seq` that was not yet in history. */
|
|
7391
7489
|
type WorkflowCommand =
|
|
@@ -7400,6 +7498,10 @@ type WorkflowCommand =
|
|
|
7400
7498
|
group: string;
|
|
7401
7499
|
input: unknown;
|
|
7402
7500
|
parallelGroup?: string;
|
|
7501
|
+
/** The step's durable dispatch policy (feature `callPolicy`). Re-sent on every turn the step is
|
|
7502
|
+
* not resolved, so whichever control-plane instance applies the turn enforces it. A failed
|
|
7503
|
+
* attempt the policy retries is re-emitted with it instead of raised. */
|
|
7504
|
+
policy?: RemoteCallPolicy;
|
|
7403
7505
|
}
|
|
7404
7506
|
/** `ctx.step(name, body)` — a LOCAL step the worker already ran this turn; the engine persists its
|
|
7405
7507
|
* result so replay returns it instead of re-running (durability for side-effectful work).
|
|
@@ -7426,12 +7528,59 @@ type WorkflowCommand =
|
|
|
7426
7528
|
seq: number;
|
|
7427
7529
|
ms: number;
|
|
7428
7530
|
}
|
|
7531
|
+
/** `ctx.sleepUntil(when)` — a durable timer to an absolute epoch-ms deadline (feature `sleepUntil`). */
|
|
7532
|
+
| {
|
|
7533
|
+
kind: 'sleepUntil';
|
|
7534
|
+
seq: number;
|
|
7535
|
+
until: number;
|
|
7536
|
+
}
|
|
7429
7537
|
/** `ctx.wait_signal(name)` — block until a signal `name` is delivered to the run. */
|
|
7430
7538
|
| {
|
|
7431
7539
|
kind: 'waitSignal';
|
|
7432
7540
|
seq: number;
|
|
7433
7541
|
signal: string;
|
|
7434
7542
|
}
|
|
7543
|
+
/** `ctx.waitForSignal(name, { timeoutMs })` (feature `waitSignalTimeout`): like the in-process ctx it
|
|
7544
|
+
* takes TWO positions — `deadlineSeq` for the deadline timer (stamped once, at `now + timeoutMs`
|
|
7545
|
+
* when first applied) and `seq` for the wait. Whichever resolves first shows in history: the signal
|
|
7546
|
+
* at `seq`, or a `timer` at `deadlineSeq`, which the worker raises as a `SignalTimeoutError`. */
|
|
7547
|
+
| {
|
|
7548
|
+
kind: 'waitSignalTimeout';
|
|
7549
|
+
seq: number;
|
|
7550
|
+
deadlineSeq: number;
|
|
7551
|
+
signal: string;
|
|
7552
|
+
timeoutMs: number;
|
|
7553
|
+
}
|
|
7554
|
+
/** `ctx.waitForEvent(name, { match, timeoutMs })` (feature `waitEvent`): wait for a named event
|
|
7555
|
+
* published with `engine.publishEvent`, buffered events included. Bounded like
|
|
7556
|
+
* `waitSignalTimeout` when `timeoutMs` is set (then `deadlineSeq` is the deadline's position). */
|
|
7557
|
+
| {
|
|
7558
|
+
kind: 'waitEvent';
|
|
7559
|
+
seq: number;
|
|
7560
|
+
name: string;
|
|
7561
|
+
match?: Record<string, unknown>;
|
|
7562
|
+
deadlineSeq?: number;
|
|
7563
|
+
timeoutMs?: number;
|
|
7564
|
+
}
|
|
7565
|
+
/** `ctx.startChild(workflow, input, opts)` (feature `spawnChild`): start a child run WITHOUT awaiting
|
|
7566
|
+
* it. The worker returns `childId` immediately and the turn goes on; the control plane starts the
|
|
7567
|
+
* child once (idempotent by id) and journals a `spawn:<childId>` step at `seq`. */
|
|
7568
|
+
| {
|
|
7569
|
+
kind: 'spawnChild';
|
|
7570
|
+
seq: number;
|
|
7571
|
+
workflow: string;
|
|
7572
|
+
input: unknown;
|
|
7573
|
+
childId: string;
|
|
7574
|
+
priority?: number;
|
|
7575
|
+
}
|
|
7576
|
+
/** `ctx.continueAsNew(input)` (feature `continueAsNew`): the LAST command of a turn. The control
|
|
7577
|
+
* plane completes this run and starts its continuation (`<runId>~N`) with `input`, as the
|
|
7578
|
+
* in-process engine does. `seq` is the position the body had reached (not consumed). */
|
|
7579
|
+
| {
|
|
7580
|
+
kind: 'continueAsNew';
|
|
7581
|
+
seq: number;
|
|
7582
|
+
input: unknown;
|
|
7583
|
+
}
|
|
7435
7584
|
/** `ctx.waitForAny(name, conditions)` — block until the first of `conditions` happens. The engine
|
|
7436
7585
|
* resolves it exactly as the in-process ctx does (see `wait-any.ts`), journals `{ key, value }` at
|
|
7437
7586
|
* `seq` and replays it as an `any` {@link HistoryEvent}. A timer's `ms` counts from when the engine
|
|
@@ -9710,6 +9859,24 @@ declare function runSchedules(engine: ScheduleTickEngine, schedules: readonly Sc
|
|
|
9710
9859
|
*/
|
|
9711
9860
|
type ScheduleTickEngine = Pick<WorkflowEngine, 'start' | 'getRun'> & Partial<Pick<WorkflowEngine, 'isDraining' | 'listRuns'>>;
|
|
9712
9861
|
|
|
9862
|
+
/**
|
|
9863
|
+
* The durable dispatch policy of a `ctx.step` call as a remote `call` command carries it: the
|
|
9864
|
+
* `@Step`-declared config, with a per-call `opts` field winning wherever it is set — the same merge
|
|
9865
|
+
* the in-process `ctx.step` applies. `undefined` when neither declares any policy field, so a call
|
|
9866
|
+
* without one stays wire-identical to a call from before policies were carried.
|
|
9867
|
+
*/
|
|
9868
|
+
declare function remoteCallPolicyOf(config: StepConfig | undefined, opts: StepDispatchOpts | undefined): RemoteCallPolicy | undefined;
|
|
9869
|
+
/** Total dispatch attempts a policy allows (`retries`, at least one) — the in-process rule. */
|
|
9870
|
+
declare function remoteCallMaxAttempts(policy: RemoteCallPolicy | undefined): number;
|
|
9871
|
+
/**
|
|
9872
|
+
* Whether a remote `call` whose attempt `attempts` FAILED with `error` is dispatched again under
|
|
9873
|
+
* `policy`, exactly as the in-process durable path decides it: never with a liveness `timeoutMs`
|
|
9874
|
+
* (there only a timeout is retried, a reported failure is final), never for an error the worker
|
|
9875
|
+
* marked non-retryable, and only while attempts remain. The worker's replay and the control plane
|
|
9876
|
+
* both decide with this one function, so they cannot disagree about a retry.
|
|
9877
|
+
*/
|
|
9878
|
+
declare function remoteCallRetries(policy: RemoteCallPolicy | undefined, attempts: number, error: StepError | undefined): boolean;
|
|
9879
|
+
|
|
9713
9880
|
/**
|
|
9714
9881
|
* A {@link StepLogger} that appends to `events`, stamping each line with `now()`. Shared by the
|
|
9715
9882
|
* local-step path (`ctx.step`) and the remote-worker path (`runStepHandler`) so a step records
|
|
@@ -10277,4 +10444,4 @@ declare function prevRRuleFireMs(rule: ParsedRRule, atMs: number): number | null
|
|
|
10277
10444
|
*/
|
|
10278
10445
|
declare function settleResultsWithPlainCalls(store: Pick<StateStore, 'getRun' | 'getCheckpoint'> & Partial<Pick<StateStore, 'getRuns' | 'getCheckpointsForSettle' | 'getCheckpoints' | 'settleCheckpointsIfPending'>>, results: StepResultSettlement[]): Promise<(StepCheckpoint | null)[]>;
|
|
10279
10446
|
|
|
10280
|
-
export { ACCUMULATOR_SEEN_MAX, ANNOUNCED_SCHEDULE_TAG, ANY_WAIT_GROUP, type AccumulatorHost, type AccumulatorStartOptions, type Admission, type AdmissionBackend, type AdmissionItem, type AllOptions, type AllSettledOptions, type AllStepsOptions, type AllStepsSettledOptions, type AnnouncedSchedule, type AnnouncedScheduleSync, type AnnouncedWorkflow, type AnnouncedWorkflowOptions, type AnnouncementEvidence, type AttributeFilter, type AttributeOp, type AttributePredicateOperand, type AttributeValue, type AttributedEngineEvent, type BackoffStrategy, type BlockedDispatch, type BlockedResolution, type BufferedSignalRow, CHILD_EDGE_PREFIXES, CONTROL_FLOW_SIGNAL, CORE_ORIGIN, CURRENT_PROTOCOL_VERSION, type CapabilityRequirement, type CheckpointAggregatingStore, type CheckpointNameKind, type CheckpointQuery, type CheckpointStat, type ChildCallOptions, type ChildWait, CodecStateStore, type CodecStateStoreOptions, type ConcurrencyConfig, ConcurrencyLimitError, type ConcurrencyQuota, type ConsoleCapabilities, type ConsoleFederation, ContinueAsNew, type ControlMessage, type ControlPlane, DEFAULT_ANNOUNCED_SCHEDULE_GRACE_MS, DEFAULT_CONCURRENCY_STATUSES, DEFAULT_PARTITION, DEFAULT_STALLED_AFTER_MS, DURABLE_OPTIONS, DURABLE_OPTIONS_CANONICAL, DURABLE_STEP_CONFIG, DURABLE_STEP_NAME, type Disagreement, type DispatchDiagnostics, type DispatchPlan, DuplicateDurableCopyError, type DurableCopy, type DurableExecution, type DurableExecutionWrapper, type DurableTopology, type DurableWebhook, DurableWorkflow, type DynamicWorkflowCtx, ENGINE_MINTED_TAG_PREFIXES, ENTITY_WORKFLOW, EVENT_BUFFER_SCAN_LIMIT, EVENT_TOKEN_PREFIX, type EngineEvent, type EngineEventType, type EngineListener, type EngineTenancy, Entities, type EntityConfig, type EntityHandler, type EntityHost, type EntityWorkflowHost, EventAccumulators, type EventBatchConfig, type EventSubscription, FAN_SUMMARY_FAILURES, type FanJoin, type FanPage, type FanPageQuery, type FanSummary, type FanWait, FatalError, type FindStalledRunsOptions, GatherError, type GatherItemFailure, type GroupHealth, HANDOFF_SEQ_BASE, type Heartbeat, type HeartbeatSighting, type HeartbeatStatus, type HistoryEvent, InMemoryAdmissionBackend, InMemoryRunQueue, InMemoryStateStore, InMemoryTransport, type InferSearchAttributes, LEGACY_V1_CAPABILITIES, LEGACY_V1_PROTOCOL, LIFECYCLE_COALESCED_TAG_PREFIX, LIFECYCLE_HEAL_WINDOW_MS, LIFECYCLE_ORPHAN_MS, LIFECYCLE_OWED_TAG_PREFIX, LIFECYCLE_PENDING_TAG, LIFECYCLE_REGISTRY_HEARTBEAT_MS, LIFECYCLE_REGISTRY_STALE_MS, LIFECYCLE_REGISTRY_TAG, LIFECYCLE_REGISTRY_TTL_MS, LIFECYCLE_REGISTRY_WORKFLOW, LIFECYCLE_TRACE_TAG_PREFIX, LIFECYCLE_TRIGGERED_TAG_PREFIX, LIFECYCLE_TRIGGER_FAILED_TAG_PREFIX, type LifecycleDelivery, type LifecycleDeliveryState, type LifecycleEventOf, type LifecycleKind, type LifecycleRegistryEntry, type LifecycleSource, type LifecycleSubscriptionLink, type ListStalledRunsOptions, type MetricsCollector, type MetricsSnapshot, NO_LIVE_WORKER, type NamedTransport, type NegotiateOptions, type NegotiationOutcome, type NegotiationReason, type NegotiationResult, NestedWorkflowCallError, NonDeterminismError, type OnErrorInput, type OnErrorRoute, type OnEventEntry, type OwnedLeaseReclaim, PARENT_CLOSE_TAG_PREFIX, type ParentClosePolicy, type ParsedRRule, type PartitionSighting, type PayloadCodec, type QueueConfig, QueueController, REMOTE_EVENT, RUN_HISTORY_FIXTURE_VERSION, RUN_VALUE_FACET_LIMIT, RUN_VALUE_FACET_SCAN, RUN_WAIT_TOKEN_PREFIX, type RawWorkerDescriptor, RemoteStepError, RemoteStepTimeout, type RemoteTask, RemoteWorkflowExecutor, RemoteWorkflowTimeout, type RepublishLifecycleResult, type RepublishLifecycleTarget, type RetentionPolicy, type RoutableDispatch, type RoutableResolution, type RoutingResolution, type RunAppAttribution, RunAppStamper, type RunAppTopologyOptions, type RunAttributeRow, type RunConsumerOptions, type RunDetail, type RunDetailOptions, type RunDispatch, type RunDispatcher, type RunFacetQuery, type RunFacetRow, RunGateway, type RunListItem, type RunQuery, type RunQueueOptions, type RunReply, type RunReplyResult, type RunRequest, type RunRequestKind, type RunResult, type RunSchedulesOptions, type RunScope, type RunStatus, type RunTenant, type RunValueAxis, type RunValueFacetOptions, type RunValueFacetOrder, type RunValueFacetRow, type RunWaitLink, type RunWaiting, SINGLETON_ACTIVE_STATUSES, SINGLETON_ADMITTED_TAG, SINGLETON_LOCK_CHUNK, SINGLETON_RESERVED_TAGS, SINGLETON_TRACKED_TAG, STATE_STORE, STATE_STORE_CANONICAL, SUMMARY_CHILD_LIMIT, type ScalarAttributeFilter, type ScheduleAction, ScheduleAlreadyExistsError, type ScheduleAnnouncement, ScheduleClient, type ScheduleClientOptions, type ScheduleDescription, type ScheduleHost, type ScheduleListQuery, ScheduleNotFoundError, type ScheduleOptions, type ScheduleQuery, type ScheduleRecord, type ScheduleTickEngine, type ScheduledWorkflow, type SchemaIssue, type SchemaValidationCode, SchemaValidationError, type SearchAttributes, type SearchAttributesSchema, type Settled, type SignalOptions, SignalTimeoutError, type SignalWaiter, type SingletonConfig, SingletonQueueFullError, type StalePendingStep, type StalledRunInfo, StandardSchemaV1, type StartOptions, type StartRunMessage, type StartRunSingleton, 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 StepResultSettlement, type StepScope, type StepSettlement, type StepUndo, type StoreTransaction, type SubProcessHandle, TERMINAL_RUN_STATUSES, TRANSPORT, TRANSPORT_CANONICAL, type TenantEvent, type TenantFilter, type TenantRow, type TenantTokenSource, type TenantVerifier, type Transport, type UndoOf, type UpdateResult, type UpdateValidator, VERSION_UNDECLARED_TAG, type VerifiedTenant, WORKFLOW_NAME_KEY, type WaitAnyCondition, type WaitAnyOutcome, type WaitAnyResult, type WaitCondition, type WaitConditionSpec, type WaitForRunOptions, 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 WorkflowLifecycleEvent, type WorkflowLifecycleLinks, WorkflowNotRegistered, type WorkflowOutputOf, type WorkflowRef, type WorkflowRegistration, type WorkflowRun, type WorkflowStartClient, type WorkflowStepEvent, WorkflowSuspended, type WorkflowTask, acceptingSubscription, accumulatorRunId, aggregateAnnouncements, aggregatesCheckpoints, announcedScheduleId, announcementsOf, anyCheckpointName, applyAttributeQuery, assertConcurrency, assertRoutes, assertSingleDurableCopy, attributeColumnFor, attributeOperand, attributePredicateOperands, axisIsRunColumn, bindWorkflowClass, breakpointToken, bufferedEventReaches, buildWorkflowDirectory, canRoute, capableWorkers, carriesLifecyclePending, checkpointNameKind, checkpointStatsOf, childIdsOf, classifyWaiterToken, clearDurableExecutionWrappers, clearTerminalSingletonAdmission, coalescedSubscribersOf, codeAndDetails, codeOf, collectMetrics, concurrencyTag, controlPlaneAttribution, controlPlaneDescriptor, countRuns, coveredTokens, createStepLogger, currentStep, currentStepScope, currentWorkflowCtx, debug, describeWorker, descriptorHash, detailsOf, durableCopies, error, etagMatches, eventMatchOf, eventMatches, eventNameOf, eventPrefix, eventToken, extendEtag, facetOrigin, fanPageBounds, fanPageEtag, findStalledRuns, foldedCount, getRunsByIds, grantsClientTenant, handoffHandlerId, handoffName, hasDurableExecutionWrappers, heartbeatStatus, hmacTenantVerifier, indexWaitersByRun, info, inheritTenant, isAnyCheckpoint, isAnyMember, isEngineMintedTag, isEventToken, isFailedMember, isLegacyDescriptor, isLifecycleTag, isNonEmptyRunScope, isRemoteEvent, isWorkflowControlFlowSignal, legacySingletonHolders, lifecycleDeliveriesOf, lifecycleEventName, lifecycleEventOf, lifecycleKindOf, lifecycleRegistryNamespace, lifecycleRegistryRunId, lifecycleRegistrySubscriptions, lifecycleRunId, lifecycleSourceOf, lifecycleTraceparentOf, listSignalWaitersOfRuns, liveHandoff, log, markRemoteEvent, matchesAttributes, matchesTenantPredicates, mergeRunFacetRows, mergeRunValueFacetRows, missingCapabilities, negotiate, nextCronFireMs, nextRRuleFireMs, nextScheduleFireAt, normalizeAttributeRows, normalizeDescriptor, observedAnnouncements, onErrorRunId, owedSubscribersOf, pageFan, pageFanFromStore, parentRunIdOf, parseDuration, parseLifecycleEvent, parseRRule, parseWebhookToken, partitionOfToken, planDispatch, poolNamespace, prevCronFireMs, prevRRuleFireMs, queryCheckpointsOf, readBufferedEvent, readRunsByIds, readSearchAttributes, requiredCapabilities, resolveConcurrency, resolveRouting, resolveRunWaiting, resolveTenantToken, resolveWireTenant, retentionKeeps, retiredHandoffName, routeFor, rowTenant, runCompletedEvent, runDetailEtag, runDurableExecution, runFailedEvent, runInStepLogger, runInStepScope, runInWorkflowCtx, runOutsideWorkflowCtx, runSchedules, runStepHandler, runTraceId, runValueFacetsFromRuns, runWaitPrefix, runWaitTargetOf, runWaitToken, sanitizeQueueToken, scheduleRunIdAt, scheduledRunId, scopeBufferedEvent, scopeTenantQuery, sealDurableCopies, settleResultsWithPlainCalls, signTenantToken, singletonAdmissionDenialPatch, singletonAdmissionTags, singletonClaimantIds, sqlComparator, stepConfigOf, stepId, stepNameOf, sub, subEvent, subProcess, summarizeFan, summarizeRunFromStore, summarizeTimeline, tenantAppOf, tenantGroup, tenantIdsFor, tenantVisible, toEventSubscription, traceIdOfTraceparent, triggerFailedSubscribersOf, triggeredRunsOf, triggeredSubscribersOf, useDurableExecution, verifyWireTenant, warn, withSingletonTracked, withoutSingletonMarkers, workflowName };
|
|
10447
|
+
export { ACCUMULATOR_SEEN_MAX, ANNOUNCED_SCHEDULE_TAG, ANY_WAIT_GROUP, type AccumulatorHost, type AccumulatorStartOptions, type Admission, type AdmissionBackend, type AdmissionItem, type AllOptions, type AllSettledOptions, type AllStepsOptions, type AllStepsSettledOptions, type AnnouncedSchedule, type AnnouncedScheduleSync, type AnnouncedWorkflow, type AnnouncedWorkflowOptions, type AnnouncementEvidence, type AttributeFilter, type AttributeOp, type AttributePredicateOperand, type AttributeValue, type AttributedEngineEvent, type BackoffStrategy, type BlockedDispatch, type BlockedResolution, type BufferedSignalRow, CHILD_EDGE_PREFIXES, CONTROL_FLOW_SIGNAL, CORE_ORIGIN, CURRENT_PROTOCOL_VERSION, type CapabilityRequirement, type CheckpointAggregatingStore, type CheckpointNameKind, type CheckpointQuery, type CheckpointStat, type ChildCallOptions, type ChildWait, CodecStateStore, type CodecStateStoreOptions, type ConcurrencyConfig, ConcurrencyLimitError, type ConcurrencyQuota, type ConsoleCapabilities, type ConsoleFederation, ContinueAsNew, type ControlMessage, type ControlPlane, DEFAULT_ANNOUNCED_SCHEDULE_GRACE_MS, DEFAULT_CONCURRENCY_STATUSES, DEFAULT_PARTITION, DEFAULT_STALLED_AFTER_MS, DURABLE_OPTIONS, DURABLE_OPTIONS_CANONICAL, DURABLE_STEP_CONFIG, DURABLE_STEP_NAME, type Disagreement, type DispatchDiagnostics, type DispatchPlan, DuplicateDurableCopyError, type DurableCopy, type DurableExecution, type DurableExecutionWrapper, type DurableTopology, type DurableWebhook, DurableWorkflow, type DynamicWorkflowCtx, ENGINE_MINTED_TAG_PREFIXES, ENTITY_WORKFLOW, EVENT_BUFFER_SCAN_LIMIT, EVENT_TOKEN_PREFIX, type EngineEvent, type EngineEventType, type EngineListener, type EngineTenancy, Entities, type EntityConfig, type EntityHandler, type EntityHost, type EntityWorkflowHost, EventAccumulators, type EventBatchConfig, type EventSubscription, FAN_SUMMARY_FAILURES, type FanJoin, type FanPage, type FanPageQuery, type FanSummary, type FanWait, FatalError, type FindStalledRunsOptions, GatherError, type GatherItemFailure, type GroupHealth, HANDOFF_SEQ_BASE, type Heartbeat, type HeartbeatSighting, type HeartbeatStatus, type HistoryEvent, InMemoryAdmissionBackend, InMemoryRunQueue, InMemoryStateStore, InMemoryTransport, type InferSearchAttributes, LEGACY_V1_CAPABILITIES, LEGACY_V1_PROTOCOL, LIFECYCLE_COALESCED_TAG_PREFIX, LIFECYCLE_HEAL_WINDOW_MS, LIFECYCLE_ORPHAN_MS, LIFECYCLE_OWED_TAG_PREFIX, LIFECYCLE_PENDING_TAG, LIFECYCLE_REGISTRY_HEARTBEAT_MS, LIFECYCLE_REGISTRY_STALE_MS, LIFECYCLE_REGISTRY_TAG, LIFECYCLE_REGISTRY_TTL_MS, LIFECYCLE_REGISTRY_WORKFLOW, LIFECYCLE_TRACE_TAG_PREFIX, LIFECYCLE_TRIGGERED_TAG_PREFIX, LIFECYCLE_TRIGGER_FAILED_TAG_PREFIX, type LifecycleDelivery, type LifecycleDeliveryState, type LifecycleEventOf, type LifecycleKind, type LifecycleRegistryEntry, type LifecycleSource, type LifecycleSubscriptionLink, type ListStalledRunsOptions, type MetricsCollector, type MetricsSnapshot, NO_LIVE_WORKER, type NamedTransport, type NegotiateOptions, type NegotiationOutcome, type NegotiationReason, type NegotiationResult, NestedWorkflowCallError, NonDeterminismError, type OnErrorInput, type OnErrorRoute, type OnEventEntry, type OwnedLeaseReclaim, PARENT_CLOSE_TAG_PREFIX, type ParentClosePolicy, type ParsedRRule, type PartitionSighting, type PayloadCodec, type QueueConfig, QueueController, REMOTE_EVENT, REMOTE_WORKFLOW_FEATURES, RUN_HISTORY_FIXTURE_VERSION, RUN_VALUE_FACET_LIMIT, RUN_VALUE_FACET_SCAN, RUN_WAIT_TOKEN_PREFIX, type RawWorkerDescriptor, type RemoteCallPolicy, RemoteStepError, RemoteStepTimeout, type RemoteTask, RemoteWorkflowExecutor, type RemoteWorkflowFeature, RemoteWorkflowTimeout, type RepublishLifecycleResult, type RepublishLifecycleTarget, type RetentionPolicy, type RoutableDispatch, type RoutableResolution, type RoutingResolution, type RunAppAttribution, RunAppStamper, type RunAppTopologyOptions, type RunAttributeRow, type RunConsumerOptions, type RunDetail, type RunDetailOptions, type RunDispatch, type RunDispatcher, type RunFacetQuery, type RunFacetRow, RunGateway, type RunListItem, type RunQuery, type RunQueueOptions, type RunReply, type RunReplyResult, type RunRequest, type RunRequestKind, type RunResult, type RunSchedulesOptions, type RunScope, type RunStatus, type RunTenant, type RunValueAxis, type RunValueFacetOptions, type RunValueFacetOrder, type RunValueFacetRow, type RunWaitLink, type RunWaiting, SINGLETON_ACTIVE_STATUSES, SINGLETON_ADMITTED_TAG, SINGLETON_LOCK_CHUNK, SINGLETON_RESERVED_TAGS, SINGLETON_TRACKED_TAG, STATE_STORE, STATE_STORE_CANONICAL, SUMMARY_CHILD_LIMIT, type ScalarAttributeFilter, type ScheduleAction, ScheduleAlreadyExistsError, type ScheduleAnnouncement, ScheduleClient, type ScheduleClientOptions, type ScheduleDescription, type ScheduleHost, type ScheduleListQuery, ScheduleNotFoundError, type ScheduleOptions, type ScheduleQuery, type ScheduleRecord, type ScheduleTickEngine, type ScheduledWorkflow, type SchemaIssue, type SchemaValidationCode, SchemaValidationError, type SearchAttributes, type SearchAttributesSchema, type Settled, type SignalOptions, SignalTimeoutError, type SignalWaiter, type SingletonConfig, SingletonQueueFullError, type StalePendingStep, type StalledRunInfo, StandardSchemaV1, type StartOptions, type StartRunMessage, type StartRunSingleton, 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 StepResultSettlement, type StepScope, type StepSettlement, type StepUndo, type StoreTransaction, type SubProcessHandle, TERMINAL_RUN_STATUSES, TRANSPORT, TRANSPORT_CANONICAL, type TenantEvent, type TenantFilter, type TenantRow, type TenantTokenSource, type TenantVerifier, type Transport, type UndoOf, type UpdateResult, type UpdateValidator, VERSION_UNDECLARED_TAG, type VerifiedTenant, WORKFLOW_NAME_KEY, type WaitAnyCondition, type WaitAnyOutcome, type WaitAnyResult, type WaitCondition, type WaitConditionSpec, type WaitForRunOptions, 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 WorkflowLifecycleEvent, type WorkflowLifecycleLinks, WorkflowNotRegistered, type WorkflowOutputOf, type WorkflowRef, type WorkflowRegistration, type WorkflowRun, type WorkflowStartClient, type WorkflowStepEvent, WorkflowSuspended, type WorkflowTask, acceptingSubscription, accumulatorRunId, aggregateAnnouncements, aggregatesCheckpoints, announcedScheduleId, announcementsOf, anyCheckpointName, applyAttributeQuery, assertConcurrency, assertRoutes, assertSingleDurableCopy, attributeColumnFor, attributeOperand, attributePredicateOperands, axisIsRunColumn, bindWorkflowClass, breakpointToken, bufferedEventReaches, buildWorkflowDirectory, canRoute, capableWorkers, carriesLifecyclePending, checkpointNameKind, checkpointStatsOf, childIdsOf, classifyWaiterToken, clearDurableExecutionWrappers, clearTerminalSingletonAdmission, coalescedSubscribersOf, codeAndDetails, codeOf, collectMetrics, concurrencyTag, controlPlaneAttribution, controlPlaneDescriptor, countRuns, coveredTokens, createStepLogger, currentStep, currentStepScope, currentWorkflowCtx, debug, describeWorker, descriptorHash, detailsOf, durableCopies, error, etagMatches, eventMatchOf, eventMatches, eventNameOf, eventPrefix, eventToken, extendEtag, facetOrigin, fanPageBounds, fanPageEtag, findStalledRuns, foldedCount, getRunsByIds, grantsClientTenant, handoffHandlerId, handoffName, hasDurableExecutionWrappers, heartbeatStatus, hmacTenantVerifier, indexWaitersByRun, info, inheritTenant, isAnyCheckpoint, isAnyMember, isEngineMintedTag, isEventToken, isFailedMember, isLegacyDescriptor, isLifecycleTag, isNonEmptyRunScope, isRemoteEvent, isWorkflowControlFlowSignal, legacySingletonHolders, lifecycleDeliveriesOf, lifecycleEventName, lifecycleEventOf, lifecycleKindOf, lifecycleRegistryNamespace, lifecycleRegistryRunId, lifecycleRegistrySubscriptions, lifecycleRunId, lifecycleSourceOf, lifecycleTraceparentOf, listSignalWaitersOfRuns, liveHandoff, log, markRemoteEvent, matchesAttributes, matchesTenantPredicates, mergeRunFacetRows, mergeRunValueFacetRows, missingCapabilities, negotiate, nextCronFireMs, nextRRuleFireMs, nextScheduleFireAt, normalizeAttributeRows, normalizeDescriptor, observedAnnouncements, onErrorRunId, owedSubscribersOf, pageFan, pageFanFromStore, parentRunIdOf, parseDuration, parseLifecycleEvent, parseRRule, parseWebhookToken, partitionOfToken, planDispatch, poolNamespace, prevCronFireMs, prevRRuleFireMs, queryCheckpointsOf, readBufferedEvent, readRunsByIds, readSearchAttributes, remoteCallMaxAttempts, remoteCallPolicyOf, remoteCallRetries, requiredCapabilities, resolveConcurrency, resolveRouting, resolveRunWaiting, resolveTenantToken, resolveWireTenant, retentionKeeps, retiredHandoffName, routeFor, rowTenant, runCompletedEvent, runDetailEtag, runDurableExecution, runFailedEvent, runInStepLogger, runInStepScope, runInWorkflowCtx, runOutsideWorkflowCtx, runSchedules, runStepHandler, runTraceId, runValueFacetsFromRuns, runWaitPrefix, runWaitTargetOf, runWaitToken, sanitizeQueueToken, scheduleRunIdAt, scheduledRunId, scopeBufferedEvent, scopeTenantQuery, sealDurableCopies, settleResultsWithPlainCalls, signTenantToken, singletonAdmissionDenialPatch, singletonAdmissionTags, singletonClaimantIds, sqlComparator, stepConfigOf, stepId, stepNameOf, sub, subEvent, subProcess, summarizeFan, summarizeRunFromStore, summarizeTimeline, tenantAppOf, tenantGroup, tenantIdsFor, tenantVisible, toEventSubscription, traceIdOfTraceparent, triggerFailedSubscribersOf, triggeredRunsOf, triggeredSubscribersOf, useDurableExecution, verifyWireTenant, warn, withSingletonTracked, withoutSingletonMarkers, workflowName };
|