@dudousxd/nestjs-durable-core 0.104.0 → 0.106.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 +263 -71
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +102 -2
- package/dist/index.d.ts +102 -2
- package/dist/index.js +262 -71
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -2464,7 +2464,10 @@ interface WorkflowEngineDeps {
|
|
|
2464
2464
|
/**
|
|
2465
2465
|
* Cap how many times crash-recovery may pick up the same still-`running` run before giving up and
|
|
2466
2466
|
* moving it to the `dead` dead-letter state (a poison pill that crashes the process every boot).
|
|
2467
|
-
*
|
|
2467
|
+
* A workflow turn dispatched to a worker spends the same budget each time it is lost: its
|
|
2468
|
+
* re-drive deadline passes with no decision and no heartbeat (its worker died, or the task with
|
|
2469
|
+
* it), so a turn that keeps killing its worker also ends `dead` instead of being re-dispatched
|
|
2470
|
+
* for ever. Omit for unlimited (the default — recovery always retries).
|
|
2468
2471
|
*/
|
|
2469
2472
|
maxRecoveryAttempts?: number | undefined;
|
|
2470
2473
|
/**
|
|
@@ -2707,6 +2710,9 @@ declare class WorkflowEngine {
|
|
|
2707
2710
|
* `clock() + leaseMs`, so at or after it). See {@link orphanedRuns}.
|
|
2708
2711
|
*/
|
|
2709
2712
|
private readonly ownLeaseCutoffMs;
|
|
2713
|
+
/** When this engine was built (clock ms): {@link noteLapsedTurn} counts no lost turn within one
|
|
2714
|
+
* turn window of it, while live workers' beats catch up with deadlines that went stale. */
|
|
2715
|
+
private readonly bootedAtMs;
|
|
2710
2716
|
private readonly maxRecoveryAttempts?;
|
|
2711
2717
|
private readonly unregisteredWorkflowGraceMs;
|
|
2712
2718
|
private readonly remoteAdvanceSilenceMs?;
|
|
@@ -4067,6 +4073,45 @@ declare class WorkflowEngine {
|
|
|
4067
4073
|
* scan, filtered to just this tick's batch, keeps it cheap regardless of store size.
|
|
4068
4074
|
*/
|
|
4069
4075
|
resumeDueTimers(nowMs?: number): Promise<RunResult[]>;
|
|
4076
|
+
/**
|
|
4077
|
+
* Called under the run's lease by the due-timer pass, for a run that THIS instance would re-drive.
|
|
4078
|
+
* A run suspended awaiting a DISPATCHED workflow turn's decision (`awaitingDecisionTaskId`) whose
|
|
4079
|
+
* re-drive deadline (`wakeAt`) has passed lost that turn: no decision came back and the worker
|
|
4080
|
+
* stopped beating (every beat pushes `wakeAt` forward, see {@link rearmDecisionDeadline}), so the
|
|
4081
|
+
* worker running it died, or the task was lost with it. That is the dispatched form of a crashed
|
|
4082
|
+
* inline turn, so it spends the same {@link maxRecoveryAttempts} budget through
|
|
4083
|
+
* {@link countRecovery}: a turn that keeps killing its worker ends `dead` (with the same
|
|
4084
|
+
* `run.failed` announcement) instead of being re-dispatched, and redelivered, for ever.
|
|
4085
|
+
*
|
|
4086
|
+
* Counted at most once per awaited turn: the count rewrites the marker to its `:lost` form, which
|
|
4087
|
+
* no later pass counts again however long the re-drive waits on the run queue, and the re-drive's
|
|
4088
|
+
* dispatch replaces it with the next turn's id. Not counted, and the re-drive left for later:
|
|
4089
|
+
* - while the broker still holds the task unstarted (a backed-up queue, not a dead worker), or
|
|
4090
|
+
* - within one turn window of this engine's boot, when beats from live workers have not yet had
|
|
4091
|
+
* the chance to push a deadline that went stale while the engine was down. Once per turn (the
|
|
4092
|
+
* `:grace` marker): a lapse after that takes the normal path, whichever instance judges it.
|
|
4093
|
+
* A late decision of a counted turn is still applied while the re-drive has not dispatched yet
|
|
4094
|
+
* (see `awaitsDecision`), and gives the attempt back.
|
|
4095
|
+
* Never counted by an instance that cannot resolve the workflow (it re-drives nothing), nor for a
|
|
4096
|
+
* decision that arrives, a worker that keeps beating, or any write a healthy turn makes on its way.
|
|
4097
|
+
*
|
|
4098
|
+
* Re-reads under the lease: the listing may predate a decision applied since. Returns a result when
|
|
4099
|
+
* the run was dead-lettered or left waiting (the lease released either way), else `undefined` for
|
|
4100
|
+
* the caller to re-drive as before. A decision that lands while this holds the lease is dropped (it
|
|
4101
|
+
* cannot take the lease), whichever way this pass goes: with a run it dead-letters, or with one it
|
|
4102
|
+
* graces or leaves waiting on a `queued` task, whose next lapse then counts the turn and runs it
|
|
4103
|
+
* again. A narrow race, accepted.
|
|
4104
|
+
*
|
|
4105
|
+
* The marker grows by up to 11 characters (`:grace:lost`) beyond the dispatched id, which is
|
|
4106
|
+
* `<runId>:wf:<8 hex>`: `runId` plus 23 in all. A store that bounds the column (TypeORM's
|
|
4107
|
+
* `varchar(191)`) therefore dispatches a run whose id is 169 to 179 characters long, then refuses
|
|
4108
|
+
* the grace or lost write for it.
|
|
4109
|
+
*/
|
|
4110
|
+
private noteLapsedTurn;
|
|
4111
|
+
/** Where the broker has the task of a dispatched turn: see {@link WorkflowExecutor.taskState}. */
|
|
4112
|
+
private dispatchedTurnState;
|
|
4113
|
+
/** Push a lapsed turn's deadline to `until` without re-driving it, and give the lease back. */
|
|
4114
|
+
private leaveTurnWaiting;
|
|
4070
4115
|
/**
|
|
4071
4116
|
* The reconcile safety net's per-run check (see {@link resumeDueTimers}): if this suspended run has
|
|
4072
4117
|
* a registered signal OR event waiter and a matching payload is already buffered, pair and deliver
|
|
@@ -5302,6 +5347,13 @@ declare class WorkflowEngine {
|
|
|
5302
5347
|
* cold (or different) instance re-derives the same answer from the run's own `wakeAt`.
|
|
5303
5348
|
*/
|
|
5304
5349
|
private rearmDecisionDeadline;
|
|
5350
|
+
/**
|
|
5351
|
+
* Write a graced turn's marker back to its bare task id (see {@link GRACED_TURN_SUFFIX}), under the
|
|
5352
|
+
* run's lease and only while the marker is still `marker`: a decision and a re-dispatch both write
|
|
5353
|
+
* the marker under that lease, so this never puts back the id of a turn they already replaced.
|
|
5354
|
+
* False when the lease was busy or the write failed; the caller's next beat tries again.
|
|
5355
|
+
*/
|
|
5356
|
+
private clearTurnGrace;
|
|
5305
5357
|
/**
|
|
5306
5358
|
* A slot freed on `queue` (a fleet-wide signal): resume this instance's runs blocked on it so they
|
|
5307
5359
|
* re-contend now instead of at their retry tick. Snapshot-and-clear — a run still blocked after the
|
|
@@ -7536,6 +7588,9 @@ type WorkflowCommand =
|
|
|
7536
7588
|
startedAt?: number;
|
|
7537
7589
|
finishedAt?: number;
|
|
7538
7590
|
events?: StepEvent[];
|
|
7591
|
+
/** How many attempts the local step made (its `retries` loop), carried onto the checkpoint's
|
|
7592
|
+
* `attempts`. Absent from a worker that predates it, which the engine records as 1. */
|
|
7593
|
+
attempts?: number;
|
|
7539
7594
|
/** A worker's `ctx.gather([...])` tags every step in the parallel fan with the same group, so the
|
|
7540
7595
|
* engine carries it onto the checkpoint and the dashboard renders the fan as one group. */
|
|
7541
7596
|
parallelGroup?: string;
|
|
@@ -7687,7 +7742,20 @@ interface WorkflowExecutor {
|
|
|
7687
7742
|
* Provide this OR {@link advance} — exactly one.
|
|
7688
7743
|
*/
|
|
7689
7744
|
dispatch?(run: WorkflowRun, history: HistoryEvent[], taskId: string, pendingSignals?: WorkflowTask['pendingSignals']): Promise<void>;
|
|
7745
|
+
/**
|
|
7746
|
+
* Optional, for a {@link dispatch} executor: where the broker has the task dispatched for `run`
|
|
7747
|
+
* under `taskId` (see {@link WorkflowTaskState}). The engine asks when the turn's re-drive deadline
|
|
7748
|
+
* lapsed, and counts the turn as lost only when the task is not still waiting unstarted. Absent:
|
|
7749
|
+
* `'unknown'`.
|
|
7750
|
+
*/
|
|
7751
|
+
taskState?(run: WorkflowRun, taskId: string): Promise<WorkflowTaskState>;
|
|
7690
7752
|
}
|
|
7753
|
+
/**
|
|
7754
|
+
* Where the broker has a dispatched workflow task: `'queued'` while it waits and no worker has ever
|
|
7755
|
+
* taken it (a backed-up queue); `'taken'` once a worker started it (running, stalled back to the
|
|
7756
|
+
* queue, finished or failed); `'unknown'` when the broker has no record of it or cannot tell.
|
|
7757
|
+
*/
|
|
7758
|
+
type WorkflowTaskState = 'queued' | 'taken' | 'unknown';
|
|
7691
7759
|
/**
|
|
7692
7760
|
* A transport in an ordered pool, identified by `id`. The engine dispatches on the first by default
|
|
7693
7761
|
* and fails over to the next on a dispatch error; a step can pin one via `ctx.step(…, { transport })`.
|
|
@@ -7730,6 +7798,12 @@ interface RunDispatch {
|
|
|
7730
7798
|
* nor a wake. Absent on a wake.
|
|
7731
7799
|
*/
|
|
7732
7800
|
key?: string | undefined;
|
|
7801
|
+
/**
|
|
7802
|
+
* On a wake handed off for a run awaiting a dispatched workflow turn: that turn's task id. The
|
|
7803
|
+
* engine taking the wake skips it once the run awaits another turn, or none. A transport passes it
|
|
7804
|
+
* through unchanged; one that merges two wakes of a run must drop it unless both carry the same.
|
|
7805
|
+
*/
|
|
7806
|
+
awaiting?: string | undefined;
|
|
7733
7807
|
}
|
|
7734
7808
|
/**
|
|
7735
7809
|
* Which run queue {@link Transport.dispatchRuns} and {@link Transport.onDispatchedRun} use. Runs are
|
|
@@ -7778,6 +7852,9 @@ interface Transport {
|
|
|
7778
7852
|
dispatchWorkflowTask?(task: WorkflowTask): Promise<void>;
|
|
7779
7853
|
/** workflow worker → engine: a replayed turn's {@link WorkflowDecision}. Pair with dispatchWorkflowTask. */
|
|
7780
7854
|
onDecision?(handler: (decision: WorkflowDecision) => Promise<void>): void;
|
|
7855
|
+
/** Where the broker has the workflow task `taskId` dispatched on `group` (see
|
|
7856
|
+
* {@link WorkflowTaskState}). Optional; pair with {@link dispatchWorkflowTask}. */
|
|
7857
|
+
workflowTaskState?(group: string, taskId: string): Promise<WorkflowTaskState>;
|
|
7781
7858
|
/** workflow worker → engine: a LOCAL step's {@link WorkflowStepEvent}, streamed mid-turn so the
|
|
7782
7859
|
* engine can checkpoint it live. Point-to-point (a single engine instance consumes each event and
|
|
7783
7860
|
* persists it once — no cross-pod duplicate writes). Optional; only broker transports carry it. */
|
|
@@ -9205,6 +9282,8 @@ declare class RemoteWorkflowExecutor implements WorkflowExecutor {
|
|
|
9205
9282
|
* engine has already suspended the run on `taskId` and applies the decision durably via `onDecision`.
|
|
9206
9283
|
*/
|
|
9207
9284
|
dispatch(run: WorkflowRun, history: HistoryEvent[], taskId: string, pendingSignals?: WorkflowTask['pendingSignals']): Promise<void>;
|
|
9285
|
+
/** Where the broker has the task dispatched under `taskId`, when the transport can tell. */
|
|
9286
|
+
taskState(_run: WorkflowRun, taskId: string): Promise<WorkflowTaskState>;
|
|
9208
9287
|
}
|
|
9209
9288
|
|
|
9210
9289
|
/**
|
|
@@ -9896,6 +9975,27 @@ declare function remoteCallMaxAttempts(policy: RemoteCallPolicy | undefined): nu
|
|
|
9896
9975
|
*/
|
|
9897
9976
|
declare function remoteCallRetries(policy: RemoteCallPolicy | undefined, attempts: number, error: StepError | undefined): boolean;
|
|
9898
9977
|
|
|
9978
|
+
/** How a {@link retryLocalStep} loop ended: the value of the attempt that succeeded, or the error of
|
|
9979
|
+
* the last one, with the number of attempts made either way. */
|
|
9980
|
+
type LocalStepOutcome<T> = {
|
|
9981
|
+
ok: true;
|
|
9982
|
+
value: T;
|
|
9983
|
+
attempts: number;
|
|
9984
|
+
} | {
|
|
9985
|
+
ok: false;
|
|
9986
|
+
error: unknown;
|
|
9987
|
+
attempts: number;
|
|
9988
|
+
};
|
|
9989
|
+
/**
|
|
9990
|
+
* The local-step retry loop both runtimes run, so `ctx.localStep` behaves the same in-process and on
|
|
9991
|
+
* the thin worker. Calls `attempt(n)` for `n = 1, 2, …` until one resolves, `options.retries` attempts
|
|
9992
|
+
* have failed (`retries` is the TOTAL attempt count, floored at 1), or one throws a
|
|
9993
|
+
* {@link FatalError}, which is never retried. Between attempts it waits {@link backoffDelay} in
|
|
9994
|
+
* process: the wait is not a durable timer, so a process that dies mid-backoff re-runs the step from
|
|
9995
|
+
* attempt 1 when the turn is replayed. Never throws; the caller records and raises the outcome.
|
|
9996
|
+
*/
|
|
9997
|
+
declare function retryLocalStep<T>(options: StepOptions | undefined, attempt: (n: number) => Promise<T>): Promise<LocalStepOutcome<T>>;
|
|
9998
|
+
|
|
9899
9999
|
/**
|
|
9900
10000
|
* A {@link StepLogger} that appends to `events`, stamping each line with `now()`. Shared by the
|
|
9901
10001
|
* local-step path (`ctx.step`) and the remote-worker path (`runStepHandler`) so a step records
|
|
@@ -10470,4 +10570,4 @@ declare function prevRRuleFireMs(rule: ParsedRRule, atMs: number): number | null
|
|
|
10470
10570
|
*/
|
|
10471
10571
|
declare function settleResultsWithPlainCalls(store: Pick<StateStore, 'getRun' | 'getCheckpoint'> & Partial<Pick<StateStore, 'getRuns' | 'getCheckpointsForSettle' | 'getCheckpoints' | 'settleCheckpointsIfPending'>>, results: StepResultSettlement[]): Promise<(StepCheckpoint | null)[]>;
|
|
10472
10572
|
|
|
10473
|
-
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, singletonKeyTag, 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 };
|
|
10573
|
+
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 LocalStepOutcome, 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, type WorkflowTaskState, 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, retryLocalStep, 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, singletonKeyTag, 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
|
@@ -2464,7 +2464,10 @@ interface WorkflowEngineDeps {
|
|
|
2464
2464
|
/**
|
|
2465
2465
|
* Cap how many times crash-recovery may pick up the same still-`running` run before giving up and
|
|
2466
2466
|
* moving it to the `dead` dead-letter state (a poison pill that crashes the process every boot).
|
|
2467
|
-
*
|
|
2467
|
+
* A workflow turn dispatched to a worker spends the same budget each time it is lost: its
|
|
2468
|
+
* re-drive deadline passes with no decision and no heartbeat (its worker died, or the task with
|
|
2469
|
+
* it), so a turn that keeps killing its worker also ends `dead` instead of being re-dispatched
|
|
2470
|
+
* for ever. Omit for unlimited (the default — recovery always retries).
|
|
2468
2471
|
*/
|
|
2469
2472
|
maxRecoveryAttempts?: number | undefined;
|
|
2470
2473
|
/**
|
|
@@ -2707,6 +2710,9 @@ declare class WorkflowEngine {
|
|
|
2707
2710
|
* `clock() + leaseMs`, so at or after it). See {@link orphanedRuns}.
|
|
2708
2711
|
*/
|
|
2709
2712
|
private readonly ownLeaseCutoffMs;
|
|
2713
|
+
/** When this engine was built (clock ms): {@link noteLapsedTurn} counts no lost turn within one
|
|
2714
|
+
* turn window of it, while live workers' beats catch up with deadlines that went stale. */
|
|
2715
|
+
private readonly bootedAtMs;
|
|
2710
2716
|
private readonly maxRecoveryAttempts?;
|
|
2711
2717
|
private readonly unregisteredWorkflowGraceMs;
|
|
2712
2718
|
private readonly remoteAdvanceSilenceMs?;
|
|
@@ -4067,6 +4073,45 @@ declare class WorkflowEngine {
|
|
|
4067
4073
|
* scan, filtered to just this tick's batch, keeps it cheap regardless of store size.
|
|
4068
4074
|
*/
|
|
4069
4075
|
resumeDueTimers(nowMs?: number): Promise<RunResult[]>;
|
|
4076
|
+
/**
|
|
4077
|
+
* Called under the run's lease by the due-timer pass, for a run that THIS instance would re-drive.
|
|
4078
|
+
* A run suspended awaiting a DISPATCHED workflow turn's decision (`awaitingDecisionTaskId`) whose
|
|
4079
|
+
* re-drive deadline (`wakeAt`) has passed lost that turn: no decision came back and the worker
|
|
4080
|
+
* stopped beating (every beat pushes `wakeAt` forward, see {@link rearmDecisionDeadline}), so the
|
|
4081
|
+
* worker running it died, or the task was lost with it. That is the dispatched form of a crashed
|
|
4082
|
+
* inline turn, so it spends the same {@link maxRecoveryAttempts} budget through
|
|
4083
|
+
* {@link countRecovery}: a turn that keeps killing its worker ends `dead` (with the same
|
|
4084
|
+
* `run.failed` announcement) instead of being re-dispatched, and redelivered, for ever.
|
|
4085
|
+
*
|
|
4086
|
+
* Counted at most once per awaited turn: the count rewrites the marker to its `:lost` form, which
|
|
4087
|
+
* no later pass counts again however long the re-drive waits on the run queue, and the re-drive's
|
|
4088
|
+
* dispatch replaces it with the next turn's id. Not counted, and the re-drive left for later:
|
|
4089
|
+
* - while the broker still holds the task unstarted (a backed-up queue, not a dead worker), or
|
|
4090
|
+
* - within one turn window of this engine's boot, when beats from live workers have not yet had
|
|
4091
|
+
* the chance to push a deadline that went stale while the engine was down. Once per turn (the
|
|
4092
|
+
* `:grace` marker): a lapse after that takes the normal path, whichever instance judges it.
|
|
4093
|
+
* A late decision of a counted turn is still applied while the re-drive has not dispatched yet
|
|
4094
|
+
* (see `awaitsDecision`), and gives the attempt back.
|
|
4095
|
+
* Never counted by an instance that cannot resolve the workflow (it re-drives nothing), nor for a
|
|
4096
|
+
* decision that arrives, a worker that keeps beating, or any write a healthy turn makes on its way.
|
|
4097
|
+
*
|
|
4098
|
+
* Re-reads under the lease: the listing may predate a decision applied since. Returns a result when
|
|
4099
|
+
* the run was dead-lettered or left waiting (the lease released either way), else `undefined` for
|
|
4100
|
+
* the caller to re-drive as before. A decision that lands while this holds the lease is dropped (it
|
|
4101
|
+
* cannot take the lease), whichever way this pass goes: with a run it dead-letters, or with one it
|
|
4102
|
+
* graces or leaves waiting on a `queued` task, whose next lapse then counts the turn and runs it
|
|
4103
|
+
* again. A narrow race, accepted.
|
|
4104
|
+
*
|
|
4105
|
+
* The marker grows by up to 11 characters (`:grace:lost`) beyond the dispatched id, which is
|
|
4106
|
+
* `<runId>:wf:<8 hex>`: `runId` plus 23 in all. A store that bounds the column (TypeORM's
|
|
4107
|
+
* `varchar(191)`) therefore dispatches a run whose id is 169 to 179 characters long, then refuses
|
|
4108
|
+
* the grace or lost write for it.
|
|
4109
|
+
*/
|
|
4110
|
+
private noteLapsedTurn;
|
|
4111
|
+
/** Where the broker has the task of a dispatched turn: see {@link WorkflowExecutor.taskState}. */
|
|
4112
|
+
private dispatchedTurnState;
|
|
4113
|
+
/** Push a lapsed turn's deadline to `until` without re-driving it, and give the lease back. */
|
|
4114
|
+
private leaveTurnWaiting;
|
|
4070
4115
|
/**
|
|
4071
4116
|
* The reconcile safety net's per-run check (see {@link resumeDueTimers}): if this suspended run has
|
|
4072
4117
|
* a registered signal OR event waiter and a matching payload is already buffered, pair and deliver
|
|
@@ -5302,6 +5347,13 @@ declare class WorkflowEngine {
|
|
|
5302
5347
|
* cold (or different) instance re-derives the same answer from the run's own `wakeAt`.
|
|
5303
5348
|
*/
|
|
5304
5349
|
private rearmDecisionDeadline;
|
|
5350
|
+
/**
|
|
5351
|
+
* Write a graced turn's marker back to its bare task id (see {@link GRACED_TURN_SUFFIX}), under the
|
|
5352
|
+
* run's lease and only while the marker is still `marker`: a decision and a re-dispatch both write
|
|
5353
|
+
* the marker under that lease, so this never puts back the id of a turn they already replaced.
|
|
5354
|
+
* False when the lease was busy or the write failed; the caller's next beat tries again.
|
|
5355
|
+
*/
|
|
5356
|
+
private clearTurnGrace;
|
|
5305
5357
|
/**
|
|
5306
5358
|
* A slot freed on `queue` (a fleet-wide signal): resume this instance's runs blocked on it so they
|
|
5307
5359
|
* re-contend now instead of at their retry tick. Snapshot-and-clear — a run still blocked after the
|
|
@@ -7536,6 +7588,9 @@ type WorkflowCommand =
|
|
|
7536
7588
|
startedAt?: number;
|
|
7537
7589
|
finishedAt?: number;
|
|
7538
7590
|
events?: StepEvent[];
|
|
7591
|
+
/** How many attempts the local step made (its `retries` loop), carried onto the checkpoint's
|
|
7592
|
+
* `attempts`. Absent from a worker that predates it, which the engine records as 1. */
|
|
7593
|
+
attempts?: number;
|
|
7539
7594
|
/** A worker's `ctx.gather([...])` tags every step in the parallel fan with the same group, so the
|
|
7540
7595
|
* engine carries it onto the checkpoint and the dashboard renders the fan as one group. */
|
|
7541
7596
|
parallelGroup?: string;
|
|
@@ -7687,7 +7742,20 @@ interface WorkflowExecutor {
|
|
|
7687
7742
|
* Provide this OR {@link advance} — exactly one.
|
|
7688
7743
|
*/
|
|
7689
7744
|
dispatch?(run: WorkflowRun, history: HistoryEvent[], taskId: string, pendingSignals?: WorkflowTask['pendingSignals']): Promise<void>;
|
|
7745
|
+
/**
|
|
7746
|
+
* Optional, for a {@link dispatch} executor: where the broker has the task dispatched for `run`
|
|
7747
|
+
* under `taskId` (see {@link WorkflowTaskState}). The engine asks when the turn's re-drive deadline
|
|
7748
|
+
* lapsed, and counts the turn as lost only when the task is not still waiting unstarted. Absent:
|
|
7749
|
+
* `'unknown'`.
|
|
7750
|
+
*/
|
|
7751
|
+
taskState?(run: WorkflowRun, taskId: string): Promise<WorkflowTaskState>;
|
|
7690
7752
|
}
|
|
7753
|
+
/**
|
|
7754
|
+
* Where the broker has a dispatched workflow task: `'queued'` while it waits and no worker has ever
|
|
7755
|
+
* taken it (a backed-up queue); `'taken'` once a worker started it (running, stalled back to the
|
|
7756
|
+
* queue, finished or failed); `'unknown'` when the broker has no record of it or cannot tell.
|
|
7757
|
+
*/
|
|
7758
|
+
type WorkflowTaskState = 'queued' | 'taken' | 'unknown';
|
|
7691
7759
|
/**
|
|
7692
7760
|
* A transport in an ordered pool, identified by `id`. The engine dispatches on the first by default
|
|
7693
7761
|
* and fails over to the next on a dispatch error; a step can pin one via `ctx.step(…, { transport })`.
|
|
@@ -7730,6 +7798,12 @@ interface RunDispatch {
|
|
|
7730
7798
|
* nor a wake. Absent on a wake.
|
|
7731
7799
|
*/
|
|
7732
7800
|
key?: string | undefined;
|
|
7801
|
+
/**
|
|
7802
|
+
* On a wake handed off for a run awaiting a dispatched workflow turn: that turn's task id. The
|
|
7803
|
+
* engine taking the wake skips it once the run awaits another turn, or none. A transport passes it
|
|
7804
|
+
* through unchanged; one that merges two wakes of a run must drop it unless both carry the same.
|
|
7805
|
+
*/
|
|
7806
|
+
awaiting?: string | undefined;
|
|
7733
7807
|
}
|
|
7734
7808
|
/**
|
|
7735
7809
|
* Which run queue {@link Transport.dispatchRuns} and {@link Transport.onDispatchedRun} use. Runs are
|
|
@@ -7778,6 +7852,9 @@ interface Transport {
|
|
|
7778
7852
|
dispatchWorkflowTask?(task: WorkflowTask): Promise<void>;
|
|
7779
7853
|
/** workflow worker → engine: a replayed turn's {@link WorkflowDecision}. Pair with dispatchWorkflowTask. */
|
|
7780
7854
|
onDecision?(handler: (decision: WorkflowDecision) => Promise<void>): void;
|
|
7855
|
+
/** Where the broker has the workflow task `taskId` dispatched on `group` (see
|
|
7856
|
+
* {@link WorkflowTaskState}). Optional; pair with {@link dispatchWorkflowTask}. */
|
|
7857
|
+
workflowTaskState?(group: string, taskId: string): Promise<WorkflowTaskState>;
|
|
7781
7858
|
/** workflow worker → engine: a LOCAL step's {@link WorkflowStepEvent}, streamed mid-turn so the
|
|
7782
7859
|
* engine can checkpoint it live. Point-to-point (a single engine instance consumes each event and
|
|
7783
7860
|
* persists it once — no cross-pod duplicate writes). Optional; only broker transports carry it. */
|
|
@@ -9205,6 +9282,8 @@ declare class RemoteWorkflowExecutor implements WorkflowExecutor {
|
|
|
9205
9282
|
* engine has already suspended the run on `taskId` and applies the decision durably via `onDecision`.
|
|
9206
9283
|
*/
|
|
9207
9284
|
dispatch(run: WorkflowRun, history: HistoryEvent[], taskId: string, pendingSignals?: WorkflowTask['pendingSignals']): Promise<void>;
|
|
9285
|
+
/** Where the broker has the task dispatched under `taskId`, when the transport can tell. */
|
|
9286
|
+
taskState(_run: WorkflowRun, taskId: string): Promise<WorkflowTaskState>;
|
|
9208
9287
|
}
|
|
9209
9288
|
|
|
9210
9289
|
/**
|
|
@@ -9896,6 +9975,27 @@ declare function remoteCallMaxAttempts(policy: RemoteCallPolicy | undefined): nu
|
|
|
9896
9975
|
*/
|
|
9897
9976
|
declare function remoteCallRetries(policy: RemoteCallPolicy | undefined, attempts: number, error: StepError | undefined): boolean;
|
|
9898
9977
|
|
|
9978
|
+
/** How a {@link retryLocalStep} loop ended: the value of the attempt that succeeded, or the error of
|
|
9979
|
+
* the last one, with the number of attempts made either way. */
|
|
9980
|
+
type LocalStepOutcome<T> = {
|
|
9981
|
+
ok: true;
|
|
9982
|
+
value: T;
|
|
9983
|
+
attempts: number;
|
|
9984
|
+
} | {
|
|
9985
|
+
ok: false;
|
|
9986
|
+
error: unknown;
|
|
9987
|
+
attempts: number;
|
|
9988
|
+
};
|
|
9989
|
+
/**
|
|
9990
|
+
* The local-step retry loop both runtimes run, so `ctx.localStep` behaves the same in-process and on
|
|
9991
|
+
* the thin worker. Calls `attempt(n)` for `n = 1, 2, …` until one resolves, `options.retries` attempts
|
|
9992
|
+
* have failed (`retries` is the TOTAL attempt count, floored at 1), or one throws a
|
|
9993
|
+
* {@link FatalError}, which is never retried. Between attempts it waits {@link backoffDelay} in
|
|
9994
|
+
* process: the wait is not a durable timer, so a process that dies mid-backoff re-runs the step from
|
|
9995
|
+
* attempt 1 when the turn is replayed. Never throws; the caller records and raises the outcome.
|
|
9996
|
+
*/
|
|
9997
|
+
declare function retryLocalStep<T>(options: StepOptions | undefined, attempt: (n: number) => Promise<T>): Promise<LocalStepOutcome<T>>;
|
|
9998
|
+
|
|
9899
9999
|
/**
|
|
9900
10000
|
* A {@link StepLogger} that appends to `events`, stamping each line with `now()`. Shared by the
|
|
9901
10001
|
* local-step path (`ctx.step`) and the remote-worker path (`runStepHandler`) so a step records
|
|
@@ -10470,4 +10570,4 @@ declare function prevRRuleFireMs(rule: ParsedRRule, atMs: number): number | null
|
|
|
10470
10570
|
*/
|
|
10471
10571
|
declare function settleResultsWithPlainCalls(store: Pick<StateStore, 'getRun' | 'getCheckpoint'> & Partial<Pick<StateStore, 'getRuns' | 'getCheckpointsForSettle' | 'getCheckpoints' | 'settleCheckpointsIfPending'>>, results: StepResultSettlement[]): Promise<(StepCheckpoint | null)[]>;
|
|
10472
10572
|
|
|
10473
|
-
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, singletonKeyTag, 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 };
|
|
10573
|
+
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 LocalStepOutcome, 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, type WorkflowTaskState, 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, retryLocalStep, 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, singletonKeyTag, 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 };
|