@dudousxd/nestjs-durable-core 0.85.7 → 0.85.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1055,6 +1055,17 @@ interface StepCheckpoint {
1055
1055
  startedAt: Date;
1056
1056
  finishedAt: Date;
1057
1057
  }
1058
+ /** What a step's result changes on its checkpoint: see {@link StateStore.settleCheckpointsIfPending}. */
1059
+ interface StepSettlement {
1060
+ runId: string;
1061
+ seq: number;
1062
+ status: 'completed' | 'failed';
1063
+ output?: unknown;
1064
+ error?: StepError | undefined;
1065
+ events?: StepEvent[] | undefined;
1066
+ startedAt: Date;
1067
+ finishedAt: Date;
1068
+ }
1058
1069
  /**
1059
1070
  * A structured event a step (or its worker) emits while running — a log line and/or a sub-step
1060
1071
  * outcome. The dashboard renders these under the step, so you can see what happened inside a step
@@ -1250,6 +1261,17 @@ interface StateStore {
1250
1261
  * Optional: a store that omits it gets one {@link getCheckpoint} per seq.
1251
1262
  */
1252
1263
  getCheckpoints?(runId: string, seqs: number[]): Promise<StepCheckpoint[]>;
1264
+ /**
1265
+ * {@link getCheckpoints} as a step result's settle reads them: the same rows, each without its
1266
+ * `input` (left out of the read, not dropped after it). A settle needs the row's status, name,
1267
+ * group and timings, never what the step was called with, and the step being settled is the one
1268
+ * whose input is still fresh: an LLM step's prompt was otherwise read back on every result. The
1269
+ * engine reads through it only when the store also has {@link settleCheckpointsIfPending}, since
1270
+ * the whole-row write it falls back to needs the input.
1271
+ *
1272
+ * Optional: a store that omits it gets {@link getCheckpoints}.
1273
+ */
1274
+ getCheckpointsForSettle?(runId: string, seqs: number[]): Promise<StepCheckpoint[]>;
1253
1275
  /**
1254
1276
  * Persist a checkpoint and advance the run atomically. Durable semantics depend on this
1255
1277
  * being a single transaction; stores without transactions cannot give the strong guarantee.
@@ -1284,6 +1306,18 @@ interface StateStore {
1284
1306
  * Optional: a store that omits it gets one {@link saveCheckpointIfPending} per entry.
1285
1307
  */
1286
1308
  saveCheckpointsIfPending?(checkpoints: StepCheckpoint[]): Promise<boolean[]>;
1309
+ /**
1310
+ * Settle steps from their results: per entry and in input order, while the row at `(runId, seq)`
1311
+ * is still `pending`, write the entry's `status`, `output`, `error`, `events`, `startedAt` and
1312
+ * `finishedAt` (an absent one is stored empty) and leave every other column as it is stored;
1313
+ * resolves whether each entry wrote. Claims like {@link saveCheckpointsIfPending}: a later entry for
1314
+ * a row an earlier one settled loses, and a rejection writes nothing. The engine settles a batch of
1315
+ * one run's step results through it, so a step's `input` (an LLM prompt, say) is not written again
1316
+ * when its result lands.
1317
+ *
1318
+ * Optional: a store that omits it gets {@link saveCheckpointsIfPending} with the whole rows.
1319
+ */
1320
+ settleCheckpointsIfPending?(settlements: StepSettlement[]): Promise<boolean[]>;
1287
1321
  /** Used by recovery on boot to find runs to resume (crashed, left `running`). */
1288
1322
  listIncompleteRuns(namespace?: string): Promise<WorkflowRun[]>;
1289
1323
  /**
@@ -1497,6 +1531,17 @@ interface StateStore {
1497
1531
  */
1498
1532
  runValueFacets?(axis: RunValueAxis, query: RunFacetQuery, opts?: RunValueFacetOptions): Promise<RunValueFacetRow[]>;
1499
1533
  listCheckpoints(runId: string): Promise<StepCheckpoint[]>;
1534
+ /**
1535
+ * {@link listCheckpoints} as a turn replays it: the same rows in the same order, except that a
1536
+ * `completed` row comes without its `input` (left out of the read, not dropped after it). Replay
1537
+ * only needs a completed step's output; a still-open or failed step keeps its input, since a
1538
+ * re-dispatch or a retry writes it again. The engine reads a run's replay snapshot through it on
1539
+ * every turn, where re-reading every finished step's input would make each turn cost the size of
1540
+ * the whole history.
1541
+ *
1542
+ * Optional: a store that omits it gets {@link listCheckpoints}.
1543
+ */
1544
+ listCheckpointsForReplay?(runId: string): Promise<StepCheckpoint[]>;
1500
1545
  /**
1501
1546
  * The LATEST checkpoint for `runId` whose `name` equals `name` exactly (highest `seq` wins), or
1502
1547
  * `undefined` if none. A targeted read that avoids fetching + deserializing every checkpoint just to
@@ -2008,6 +2053,9 @@ type RunRequestKind = {
2008
2053
  runId: string;
2009
2054
  group: string;
2010
2055
  query: FanPageQuery;
2056
+ } | {
2057
+ kind: 'getRun';
2058
+ runId: string;
2011
2059
  } | {
2012
2060
  kind: 'listRuns';
2013
2061
  query: RunQuery;
@@ -4989,13 +5037,17 @@ declare class WorkflowEngine {
4989
5037
  *
4990
5038
  * Walks `durable_buffered_signals` by primary key, {@link BUFFERED_SWEEP_PAGE} rows at a time and
4991
5039
  * at most {@link BUFFERED_SWEEP_PAGES_PER_CALL} pages per call, so a large backlog drains over a
4992
- * few timer ticks without a long query or a big delete. A pass that reaches the end of the table
4993
- * rests {@link BUFFERED_SWEEP_REST_MS} before the next one. Call it every tick (the NestJS timer
4994
- * poller does). Skipped while draining, on a namespaced engine (a buffered signal carries no
4995
- * namespace, and a scoped read would report another tenant's parent as gone), and on a store
4996
- * without `listBufferedSignals`/`deleteBufferedSignals`. Returns how many rows it deleted.
4997
- */
4998
- sweepBufferedSignals(now?: number): Promise<number>;
5040
+ * few timer ticks without a long query or a big delete. Each page is decided set-based (see
5041
+ * `unneededChildSignals`): a handful of store calls per page and per open parent, none of them a
5042
+ * read by checkpoint name. A call stops once `budgetMs` of wall-clock time is spent (default
5043
+ * {@link BUFFERED_SWEEP_BUDGET_MS}), between pages or between two parents' reads, and the next
5044
+ * call resumes there. A pass that reaches the end of the table rests {@link BUFFERED_SWEEP_REST_MS}
5045
+ * before the next one. Call it every tick (the NestJS timer poller does); a call made while
5046
+ * another is running returns 0. Skipped while draining, on a namespaced engine (a buffered signal
5047
+ * carries no namespace, and a scoped read would report another tenant's parent as gone), and on a
5048
+ * store without `listBufferedSignals`/`deleteBufferedSignals`. Returns how many rows it deleted.
5049
+ */
5050
+ sweepBufferedSignals(now?: number, budgetMs?: number): Promise<number>;
4999
5051
  /**
5000
5052
  * Register a pager hook for STRANDED runs: an in-flight run untouched past `stalledAfterMs` that is
5001
5053
  * either suspended with NO wake timer (wake-forever: nothing will ever re-drive it) or parked on an
@@ -5481,6 +5533,8 @@ declare class WorkflowEngine {
5481
5533
  * checkpoint that is already settled, which the next turn replays past — so it cannot loop.
5482
5534
  */
5483
5535
  private redriveSettledSteps;
5536
+ /** Whether the step at `seq` is settled: a `COUNT` when the store has one, else its checkpoint. */
5537
+ private stepSettled;
5484
5538
  /**
5485
5539
  * {@link redriveSettledSteps} for a step fan: once the turn that suspended on it released its lease,
5486
5540
  * re-drive the run if no step of the fan is still `pending` — the last result landed on another
@@ -5989,6 +6043,13 @@ declare class WorkflowEngine {
5989
6043
  /** Earliest clock time a step's lease is worth LOOKING at again (`stepId` → clock ms) — the read
5990
6044
  * throttle for {@link rearmStepLease}, the step-scoped sibling of {@link decisionDeadlineRearms}. */
5991
6045
  private readonly stepLeaseRearms;
6046
+ /**
6047
+ * {@link stepLeaseRearms} for the steps of a fan this instance sent, by run: one entry per sent
6048
+ * block of consecutive seqs instead of one per step, since they share the lease stamped at send.
6049
+ */
6050
+ private readonly fanLeaseRearms;
6051
+ private noteFanLease;
6052
+ private fanLeaseLookAgainAt;
5992
6053
  /**
5993
6054
  * A step-scoped heartbeat for a durably-suspended remote step: push its LEASE forward so a worker
5994
6055
  * that is still working on it is never presumed dead and double-dispatched. The durable counterpart
@@ -6192,6 +6253,13 @@ declare class WorkflowEngine {
6192
6253
  * barrier ({@link stepFanStillRunning}) then wakes the parent once per wave, not once per result.
6193
6254
  */
6194
6255
  private callRemoteAll;
6256
+ /**
6257
+ * The checkpoints of a step fan's seqs, by seq. A settled one is taken from the turn's snapshot
6258
+ * (`replay`), since nothing but a turn of the run changes it once settled; one the snapshot holds
6259
+ * `pending`, or does not hold, is read again, as {@link callRemote} does for a single step: its
6260
+ * result may have landed since. The fan's last turn so reads nothing it already read.
6261
+ */
6262
+ private fanCheckpoints;
6195
6263
  /**
6196
6264
  * Write the `pending` checkpoints of a step fan's new steps, then dispatch them: one
6197
6265
  * {@link StateStore.saveCheckpoints} call and one {@link TransportPool.dispatchMany} for the
@@ -6200,8 +6268,17 @@ declare class WorkflowEngine {
6200
6268
  private sendStepFan;
6201
6269
  /** Remember a step settled here, forgetting entries older than a lease so the map stays small. */
6202
6270
  private noteSettledHere;
6203
- /** Record `key` in a "happened here recently" map, pruning entries older than a lease. */
6271
+ /**
6272
+ * Record `key` in a "happened here recently" map and drop the entries older than a lease. A key is
6273
+ * re-inserted at the end, so the map stays in the order its keys were noted and the stale ones are
6274
+ * all at its front: pruning stops at the first fresh entry instead of walking the whole map.
6275
+ */
6204
6276
  private noteRecent;
6277
+ /**
6278
+ * The run's checkpoints as a turn replays them: {@link StateStore.listCheckpointsForReplay} when
6279
+ * the store has it (no input on a completed row), else {@link StateStore.listCheckpoints}.
6280
+ */
6281
+ private replayCheckpoints;
6205
6282
  /** {@link StateStore.saveCheckpointIfPending}, or a plain save on a store without it. */
6206
6283
  private savePendingCheckpoint;
6207
6284
  /**
@@ -6211,6 +6288,14 @@ declare class WorkflowEngine {
6211
6288
  * call rejecting means it wrote nothing, so the entries are then written one by one.
6212
6289
  */
6213
6290
  private savePendingCheckpoints;
6291
+ /**
6292
+ * Settle steps of one run at distinct seqs from their results ({@link StepSettlement}s, `settled[i]`
6293
+ * being the `pending` row `settlements[i]` settles): one
6294
+ * {@link StateStore.settleCheckpointsIfPending} call when the store has it, which writes only what
6295
+ * a result changes, else the whole rows through {@link savePendingCheckpoints}. Never rejects as a
6296
+ * whole, the same way.
6297
+ */
6298
+ private settlePendingCheckpoints;
6214
6299
  /**
6215
6300
  * The checkpoints of one run at distinct `seqs`, each as its own outcome: one
6216
6301
  * {@link StateStore.getCheckpoints} call when the store has it, else one read each. The batch
@@ -6989,8 +7074,16 @@ declare class CodecStateStore implements StateStore {
6989
7074
  readonly saveCheckpointIfPending?: (checkpoint: StepCheckpoint) => Promise<boolean>;
6990
7075
  /** Encodes each checkpoint like {@link saveCheckpoint}. Bound only when the inner store has it. */
6991
7076
  readonly saveCheckpointsIfPending?: (checkpoints: StepCheckpoint[]) => Promise<boolean[]>;
7077
+ /** Encodes each settlement's payloads like {@link saveCheckpoint}. Bound only when the inner store
7078
+ * has it, so the engine's whole-row fallback still kicks in through the wrapper. */
7079
+ readonly settleCheckpointsIfPending?: (settlements: StepSettlement[]) => Promise<boolean[]>;
6992
7080
  /** Encodes each checkpoint written. Bound only when the inner store has it. */
6993
7081
  readonly saveCheckpoints?: (checkpoints: StepCheckpoint[]) => Promise<void>;
7082
+ /** Decodes each checkpoint read like {@link listCheckpoints}. Bound only when the inner store has
7083
+ * it, so the engine's full-read fallback still kicks in through the wrapper. */
7084
+ readonly listCheckpointsForReplay?: (runId: string) => Promise<StepCheckpoint[]>;
7085
+ /** Decodes each checkpoint read. Bound only when the inner store has it. */
7086
+ readonly getCheckpointsForSettle?: (runId: string, seqs: number[]) => Promise<StepCheckpoint[]>;
6994
7087
  /** Decodes each checkpoint read. Bound only when the inner store has it. */
6995
7088
  readonly getCheckpoints?: (runId: string, seqs: number[]) => Promise<StepCheckpoint[]>;
6996
7089
  /** Forwarded verbatim — a count reads no payload. Bound only when the inner store has it. */
@@ -7036,6 +7129,7 @@ declare class CodecStateStore implements StateStore {
7036
7129
  private encRun;
7037
7130
  private decRun;
7038
7131
  private encCp;
7132
+ private encSettlement;
7039
7133
  private decCp;
7040
7134
  private encSpec;
7041
7135
  private encSchedule;
@@ -7539,10 +7633,12 @@ declare class InMemoryStateStore implements StateStore {
7539
7633
  pruneTerminalRuns(policy: RetentionPolicy, nowMs: number, limit: number): Promise<number>;
7540
7634
  getCheckpoint(runId: string, seq: number): Promise<StepCheckpoint | null>;
7541
7635
  getCheckpoints(runId: string, seqs: number[]): Promise<StepCheckpoint[]>;
7636
+ getCheckpointsForSettle(runId: string, seqs: number[]): Promise<StepCheckpoint[]>;
7542
7637
  saveCheckpoint(checkpoint: StepCheckpoint): Promise<void>;
7543
7638
  saveCheckpoints(checkpoints: StepCheckpoint[]): Promise<void>;
7544
7639
  saveCheckpointIfPending(checkpoint: StepCheckpoint): Promise<boolean>;
7545
7640
  saveCheckpointsIfPending(checkpoints: StepCheckpoint[]): Promise<boolean[]>;
7641
+ settleCheckpointsIfPending(settlements: StepSettlement[]): Promise<boolean[]>;
7546
7642
  listOrphanedRuns(nowMs: number, limit: number, namespace?: string, ownedBy?: OwnedLeaseReclaim): Promise<WorkflowRun[]>;
7547
7643
  listIncompleteRuns(namespace?: string): Promise<WorkflowRun[]>;
7548
7644
  listPendingRuns(limit: number, namespace?: string): Promise<WorkflowRun[]>;
@@ -7608,6 +7704,7 @@ declare class InMemoryStateStore implements StateStore {
7608
7704
  deleteSchedule(id: string): Promise<boolean>;
7609
7705
  listSchedules(query: ScheduleQuery): Promise<ScheduleRecord[]>;
7610
7706
  listCheckpoints(runId: string): Promise<StepCheckpoint[]>;
7707
+ listCheckpointsForReplay(runId: string): Promise<StepCheckpoint[]>;
7611
7708
  private runCheckpoints;
7612
7709
  checkpointStats(runId: string, opts?: {
7613
7710
  group?: string | undefined;
@@ -7713,4 +7810,4 @@ declare function singletonAdmissionDenialPatch(runs: WorkflowRun[], runId: strin
7713
7810
  updatedAt: Date;
7714
7811
  } | undefined;
7715
7812
 
7716
- export { type AccumulatorHost, type Admission, type AdmissionBackend, type AdmissionItem, type AllOptions, type AllSettledOptions, type AllStepsOptions, type AllStepsSettledOptions, type AnnouncedWorkflow, type AnnouncementEvidence, type AttributeFilter, type AttributeOp, type AttributePredicateOperand, type AttributeValue, 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, ContinueAsNew, type ControlMessage, type ControlPlane, 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, 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, Entities, type EntityConfig, type EntityHandler, type EntityHost, type EntityWorkflowHost, EventAccumulators, type EventBatchConfig, 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, type ListStalledRunsOptions, type MetricsCollector, type MetricsSnapshot, type NamedTransport, type NegotiateOptions, type NegotiationOutcome, type NegotiationReason, type NegotiationResult, NestedWorkflowCallError, NonDeterminismError, type OnErrorInput, type OnErrorRoute, type OwnedLeaseReclaim, type PartitionSighting, type PayloadCodec, type QueueConfig, QueueController, RUN_HISTORY_FIXTURE_VERSION, RUN_VALUE_FACET_LIMIT, RUN_VALUE_FACET_SCAN, type RawWorkerDescriptor, RemoteStepError, RemoteStepTimeout, type RemoteTask, RemoteWorkflowExecutor, RemoteWorkflowTimeout, type RetentionPolicy, type RoutableDispatch, type RoutableResolution, type RoutingResolution, type RunAttributeRow, type 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 RunValueAxis, type RunValueFacetOptions, type RunValueFacetOrder, type RunValueFacetRow, type RunWaiting, SINGLETON_ACTIVE_STATUSES, SINGLETON_ADMITTED_TAG, SINGLETON_RESERVED_TAGS, SINGLETON_TRACKED_TAG, STATE_STORE, STATE_STORE_CANONICAL, SUMMARY_CHILD_LIMIT, type ScalarAttributeFilter, ScheduleAlreadyExistsError, ScheduleClient, type ScheduleClientOptions, type ScheduleDescription, type ScheduleHost, type ScheduleListQuery, ScheduleNotFoundError, type ScheduleOptions, type ScheduleQuery, type ScheduleRecord, type ScheduledWorkflow, type SchemaIssue, type SchemaValidationCode, SchemaValidationError, type SearchAttributes, type SearchAttributesSchema, type Settled, SignalTimeoutError, type SignalWaiter, type SingletonConfig, SingletonQueueFullError, type StalePendingStep, type StalledRunInfo, StandardSchemaV1, type StartOptions, type StartRunMessage, type StateStore, type StepCheckpoint, type StepConfig, type StepDef, type StepDispatchOpts, type StepError, type StepEvent, type StepHandler, type StepInterceptor, type StepInvocation, type StepKind, type StepLogger, type StepOptions, type StepRef, type StepResult, type StepScope, type StepUndo, type StoreTransaction, type SubProcessHandle, TERMINAL_RUN_STATUSES, TRANSPORT, TRANSPORT_CANONICAL, type TenantEvent, type TenantTokenSource, type TenantVerifier, type Transport, type UndoOf, type UpdateResult, type UpdateValidator, VERSION_UNDECLARED_TAG, type VerifiedTenant, WORKFLOW_NAME_KEY, type WireDates, type WorkerAdjust, type WorkerConcurrencyStatus, type WorkerDescriptor, type WorkerHeartbeat, type WorkerLifecycle, type WorkerStatus, type WorkflowAnnouncement, WorkflowBlocked, type WorkflowClass, type WorkflowCommand, type WorkflowCtx, type WorkflowDecision, type WorkflowDirectory, WorkflowEngine, type WorkflowEngineDeps, type WorkflowExecutor, type WorkflowHandler, type WorkflowInputOf, type WorkflowOutputOf, type WorkflowRef, type WorkflowRegistration, type WorkflowRun, type WorkflowStartClient, type WorkflowStepEvent, WorkflowSuspended, type WorkflowTask, aggregateAnnouncements, aggregatesCheckpoints, announcementsOf, applyAttributeQuery, assertConcurrency, assertRoutes, attributeColumnFor, attributeOperand, attributePredicateOperands, axisIsRunColumn, bindWorkflowClass, breakpointToken, buildWorkflowDirectory, canRoute, capableWorkers, checkpointNameKind, checkpointStatsOf, childIdsOf, classifyWaiterToken, clearDurableExecutionWrappers, clearTerminalSingletonAdmission, codeAndDetails, codeOf, collectMetrics, concurrencyTag, controlPlaneDescriptor, countRuns, coveredTokens, createStepLogger, currentStep, currentStepScope, currentWorkflowCtx, debug, describeWorker, descriptorHash, detailsOf, error, etagMatches, eventMatchOf, eventMatches, eventNameOf, eventPrefix, eventToken, facetOrigin, fanPageBounds, fanPageEtag, findStalledRuns, foldedCount, getRunsByIds, handoffHandlerId, handoffName, hasDurableExecutionWrappers, heartbeatStatus, hmacTenantVerifier, indexWaitersByRun, info, isEngineMintedTag, isEventToken, isFailedMember, isLegacyDescriptor, isNonEmptyRunScope, isWorkflowControlFlowSignal, legacySingletonHolders, listSignalWaitersOfRuns, liveHandoff, log, matchesAttributes, mergeRunFacetRows, mergeRunValueFacetRows, missingCapabilities, negotiate, nextCronFireMs, normalizeAttributeRows, normalizeDescriptor, observedAnnouncements, onErrorRunId, pageFan, pageFanFromStore, parentRunIdOf, parseDuration, parseWebhookToken, partitionOfToken, planDispatch, poolNamespace, prevCronFireMs, queryCheckpointsOf, readRunsByIds, readSearchAttributes, requiredCapabilities, resolveConcurrency, resolveRouting, resolveRunWaiting, resolveTenantToken, resolveWireTenant, retiredHandoffName, routeFor, runDetailEtag, runDurableExecution, runInStepLogger, runInStepScope, runInWorkflowCtx, runOutsideWorkflowCtx, runSchedules, runStepHandler, runValueFacetsFromRuns, sanitizeQueueToken, scheduleRunIdAt, scheduledRunId, signTenantToken, singletonAdmissionDenialPatch, singletonAdmissionTags, sqlComparator, stepConfigOf, stepId, stepNameOf, sub, subEvent, subProcess, summarizeFan, summarizeRunFromStore, summarizeTimeline, tenantGroup, useDurableExecution, warn, withSingletonTracked, withoutSingletonMarkers, workflowName };
7813
+ export { type AccumulatorHost, type Admission, type AdmissionBackend, type AdmissionItem, type AllOptions, type AllSettledOptions, type AllStepsOptions, type AllStepsSettledOptions, type AnnouncedWorkflow, type AnnouncementEvidence, type AttributeFilter, type AttributeOp, type AttributePredicateOperand, type AttributeValue, 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, ContinueAsNew, type ControlMessage, type ControlPlane, 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, 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, Entities, type EntityConfig, type EntityHandler, type EntityHost, type EntityWorkflowHost, EventAccumulators, type EventBatchConfig, 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, type ListStalledRunsOptions, type MetricsCollector, type MetricsSnapshot, type NamedTransport, type NegotiateOptions, type NegotiationOutcome, type NegotiationReason, type NegotiationResult, NestedWorkflowCallError, NonDeterminismError, type OnErrorInput, type OnErrorRoute, type OwnedLeaseReclaim, type PartitionSighting, type PayloadCodec, type QueueConfig, QueueController, RUN_HISTORY_FIXTURE_VERSION, RUN_VALUE_FACET_LIMIT, RUN_VALUE_FACET_SCAN, type RawWorkerDescriptor, RemoteStepError, RemoteStepTimeout, type RemoteTask, RemoteWorkflowExecutor, RemoteWorkflowTimeout, type RetentionPolicy, type RoutableDispatch, type RoutableResolution, type RoutingResolution, type RunAttributeRow, type 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 RunValueAxis, type RunValueFacetOptions, type RunValueFacetOrder, type RunValueFacetRow, type RunWaiting, SINGLETON_ACTIVE_STATUSES, SINGLETON_ADMITTED_TAG, SINGLETON_RESERVED_TAGS, SINGLETON_TRACKED_TAG, STATE_STORE, STATE_STORE_CANONICAL, SUMMARY_CHILD_LIMIT, type ScalarAttributeFilter, ScheduleAlreadyExistsError, ScheduleClient, type ScheduleClientOptions, type ScheduleDescription, type ScheduleHost, type ScheduleListQuery, ScheduleNotFoundError, type ScheduleOptions, type ScheduleQuery, type ScheduleRecord, type ScheduledWorkflow, type SchemaIssue, type SchemaValidationCode, SchemaValidationError, type SearchAttributes, type SearchAttributesSchema, type Settled, SignalTimeoutError, type SignalWaiter, type SingletonConfig, SingletonQueueFullError, type StalePendingStep, type StalledRunInfo, StandardSchemaV1, type StartOptions, type StartRunMessage, type StateStore, type StepCheckpoint, type StepConfig, type StepDef, type StepDispatchOpts, type StepError, type StepEvent, type StepHandler, type StepInterceptor, type StepInvocation, type StepKind, type StepLogger, type StepOptions, type StepRef, type StepResult, type StepScope, type StepSettlement, type StepUndo, type StoreTransaction, type SubProcessHandle, TERMINAL_RUN_STATUSES, TRANSPORT, TRANSPORT_CANONICAL, type TenantEvent, type TenantTokenSource, type TenantVerifier, type Transport, type UndoOf, type UpdateResult, type UpdateValidator, VERSION_UNDECLARED_TAG, type VerifiedTenant, WORKFLOW_NAME_KEY, type WireDates, type WorkerAdjust, type WorkerConcurrencyStatus, type WorkerDescriptor, type WorkerHeartbeat, type WorkerLifecycle, type WorkerStatus, type WorkflowAnnouncement, WorkflowBlocked, type WorkflowClass, type WorkflowCommand, type WorkflowCtx, type WorkflowDecision, type WorkflowDirectory, WorkflowEngine, type WorkflowEngineDeps, type WorkflowExecutor, type WorkflowHandler, type WorkflowInputOf, type WorkflowOutputOf, type WorkflowRef, type WorkflowRegistration, type WorkflowRun, type WorkflowStartClient, type WorkflowStepEvent, WorkflowSuspended, type WorkflowTask, aggregateAnnouncements, aggregatesCheckpoints, announcementsOf, applyAttributeQuery, assertConcurrency, assertRoutes, attributeColumnFor, attributeOperand, attributePredicateOperands, axisIsRunColumn, bindWorkflowClass, breakpointToken, buildWorkflowDirectory, canRoute, capableWorkers, checkpointNameKind, checkpointStatsOf, childIdsOf, classifyWaiterToken, clearDurableExecutionWrappers, clearTerminalSingletonAdmission, codeAndDetails, codeOf, collectMetrics, concurrencyTag, controlPlaneDescriptor, countRuns, coveredTokens, createStepLogger, currentStep, currentStepScope, currentWorkflowCtx, debug, describeWorker, descriptorHash, detailsOf, error, etagMatches, eventMatchOf, eventMatches, eventNameOf, eventPrefix, eventToken, facetOrigin, fanPageBounds, fanPageEtag, findStalledRuns, foldedCount, getRunsByIds, handoffHandlerId, handoffName, hasDurableExecutionWrappers, heartbeatStatus, hmacTenantVerifier, indexWaitersByRun, info, isEngineMintedTag, isEventToken, isFailedMember, isLegacyDescriptor, isNonEmptyRunScope, isWorkflowControlFlowSignal, legacySingletonHolders, listSignalWaitersOfRuns, liveHandoff, log, matchesAttributes, mergeRunFacetRows, mergeRunValueFacetRows, missingCapabilities, negotiate, nextCronFireMs, normalizeAttributeRows, normalizeDescriptor, observedAnnouncements, onErrorRunId, pageFan, pageFanFromStore, parentRunIdOf, parseDuration, parseWebhookToken, partitionOfToken, planDispatch, poolNamespace, prevCronFireMs, queryCheckpointsOf, readRunsByIds, readSearchAttributes, requiredCapabilities, resolveConcurrency, resolveRouting, resolveRunWaiting, resolveTenantToken, resolveWireTenant, retiredHandoffName, routeFor, runDetailEtag, runDurableExecution, runInStepLogger, runInStepScope, runInWorkflowCtx, runOutsideWorkflowCtx, runSchedules, runStepHandler, runValueFacetsFromRuns, sanitizeQueueToken, scheduleRunIdAt, scheduledRunId, signTenantToken, singletonAdmissionDenialPatch, singletonAdmissionTags, sqlComparator, stepConfigOf, stepId, stepNameOf, sub, subEvent, subProcess, summarizeFan, summarizeRunFromStore, summarizeTimeline, tenantGroup, useDurableExecution, warn, withSingletonTracked, withoutSingletonMarkers, workflowName };
package/dist/index.d.ts CHANGED
@@ -1055,6 +1055,17 @@ interface StepCheckpoint {
1055
1055
  startedAt: Date;
1056
1056
  finishedAt: Date;
1057
1057
  }
1058
+ /** What a step's result changes on its checkpoint: see {@link StateStore.settleCheckpointsIfPending}. */
1059
+ interface StepSettlement {
1060
+ runId: string;
1061
+ seq: number;
1062
+ status: 'completed' | 'failed';
1063
+ output?: unknown;
1064
+ error?: StepError | undefined;
1065
+ events?: StepEvent[] | undefined;
1066
+ startedAt: Date;
1067
+ finishedAt: Date;
1068
+ }
1058
1069
  /**
1059
1070
  * A structured event a step (or its worker) emits while running — a log line and/or a sub-step
1060
1071
  * outcome. The dashboard renders these under the step, so you can see what happened inside a step
@@ -1250,6 +1261,17 @@ interface StateStore {
1250
1261
  * Optional: a store that omits it gets one {@link getCheckpoint} per seq.
1251
1262
  */
1252
1263
  getCheckpoints?(runId: string, seqs: number[]): Promise<StepCheckpoint[]>;
1264
+ /**
1265
+ * {@link getCheckpoints} as a step result's settle reads them: the same rows, each without its
1266
+ * `input` (left out of the read, not dropped after it). A settle needs the row's status, name,
1267
+ * group and timings, never what the step was called with, and the step being settled is the one
1268
+ * whose input is still fresh: an LLM step's prompt was otherwise read back on every result. The
1269
+ * engine reads through it only when the store also has {@link settleCheckpointsIfPending}, since
1270
+ * the whole-row write it falls back to needs the input.
1271
+ *
1272
+ * Optional: a store that omits it gets {@link getCheckpoints}.
1273
+ */
1274
+ getCheckpointsForSettle?(runId: string, seqs: number[]): Promise<StepCheckpoint[]>;
1253
1275
  /**
1254
1276
  * Persist a checkpoint and advance the run atomically. Durable semantics depend on this
1255
1277
  * being a single transaction; stores without transactions cannot give the strong guarantee.
@@ -1284,6 +1306,18 @@ interface StateStore {
1284
1306
  * Optional: a store that omits it gets one {@link saveCheckpointIfPending} per entry.
1285
1307
  */
1286
1308
  saveCheckpointsIfPending?(checkpoints: StepCheckpoint[]): Promise<boolean[]>;
1309
+ /**
1310
+ * Settle steps from their results: per entry and in input order, while the row at `(runId, seq)`
1311
+ * is still `pending`, write the entry's `status`, `output`, `error`, `events`, `startedAt` and
1312
+ * `finishedAt` (an absent one is stored empty) and leave every other column as it is stored;
1313
+ * resolves whether each entry wrote. Claims like {@link saveCheckpointsIfPending}: a later entry for
1314
+ * a row an earlier one settled loses, and a rejection writes nothing. The engine settles a batch of
1315
+ * one run's step results through it, so a step's `input` (an LLM prompt, say) is not written again
1316
+ * when its result lands.
1317
+ *
1318
+ * Optional: a store that omits it gets {@link saveCheckpointsIfPending} with the whole rows.
1319
+ */
1320
+ settleCheckpointsIfPending?(settlements: StepSettlement[]): Promise<boolean[]>;
1287
1321
  /** Used by recovery on boot to find runs to resume (crashed, left `running`). */
1288
1322
  listIncompleteRuns(namespace?: string): Promise<WorkflowRun[]>;
1289
1323
  /**
@@ -1497,6 +1531,17 @@ interface StateStore {
1497
1531
  */
1498
1532
  runValueFacets?(axis: RunValueAxis, query: RunFacetQuery, opts?: RunValueFacetOptions): Promise<RunValueFacetRow[]>;
1499
1533
  listCheckpoints(runId: string): Promise<StepCheckpoint[]>;
1534
+ /**
1535
+ * {@link listCheckpoints} as a turn replays it: the same rows in the same order, except that a
1536
+ * `completed` row comes without its `input` (left out of the read, not dropped after it). Replay
1537
+ * only needs a completed step's output; a still-open or failed step keeps its input, since a
1538
+ * re-dispatch or a retry writes it again. The engine reads a run's replay snapshot through it on
1539
+ * every turn, where re-reading every finished step's input would make each turn cost the size of
1540
+ * the whole history.
1541
+ *
1542
+ * Optional: a store that omits it gets {@link listCheckpoints}.
1543
+ */
1544
+ listCheckpointsForReplay?(runId: string): Promise<StepCheckpoint[]>;
1500
1545
  /**
1501
1546
  * The LATEST checkpoint for `runId` whose `name` equals `name` exactly (highest `seq` wins), or
1502
1547
  * `undefined` if none. A targeted read that avoids fetching + deserializing every checkpoint just to
@@ -2008,6 +2053,9 @@ type RunRequestKind = {
2008
2053
  runId: string;
2009
2054
  group: string;
2010
2055
  query: FanPageQuery;
2056
+ } | {
2057
+ kind: 'getRun';
2058
+ runId: string;
2011
2059
  } | {
2012
2060
  kind: 'listRuns';
2013
2061
  query: RunQuery;
@@ -4989,13 +5037,17 @@ declare class WorkflowEngine {
4989
5037
  *
4990
5038
  * Walks `durable_buffered_signals` by primary key, {@link BUFFERED_SWEEP_PAGE} rows at a time and
4991
5039
  * at most {@link BUFFERED_SWEEP_PAGES_PER_CALL} pages per call, so a large backlog drains over a
4992
- * few timer ticks without a long query or a big delete. A pass that reaches the end of the table
4993
- * rests {@link BUFFERED_SWEEP_REST_MS} before the next one. Call it every tick (the NestJS timer
4994
- * poller does). Skipped while draining, on a namespaced engine (a buffered signal carries no
4995
- * namespace, and a scoped read would report another tenant's parent as gone), and on a store
4996
- * without `listBufferedSignals`/`deleteBufferedSignals`. Returns how many rows it deleted.
4997
- */
4998
- sweepBufferedSignals(now?: number): Promise<number>;
5040
+ * few timer ticks without a long query or a big delete. Each page is decided set-based (see
5041
+ * `unneededChildSignals`): a handful of store calls per page and per open parent, none of them a
5042
+ * read by checkpoint name. A call stops once `budgetMs` of wall-clock time is spent (default
5043
+ * {@link BUFFERED_SWEEP_BUDGET_MS}), between pages or between two parents' reads, and the next
5044
+ * call resumes there. A pass that reaches the end of the table rests {@link BUFFERED_SWEEP_REST_MS}
5045
+ * before the next one. Call it every tick (the NestJS timer poller does); a call made while
5046
+ * another is running returns 0. Skipped while draining, on a namespaced engine (a buffered signal
5047
+ * carries no namespace, and a scoped read would report another tenant's parent as gone), and on a
5048
+ * store without `listBufferedSignals`/`deleteBufferedSignals`. Returns how many rows it deleted.
5049
+ */
5050
+ sweepBufferedSignals(now?: number, budgetMs?: number): Promise<number>;
4999
5051
  /**
5000
5052
  * Register a pager hook for STRANDED runs: an in-flight run untouched past `stalledAfterMs` that is
5001
5053
  * either suspended with NO wake timer (wake-forever: nothing will ever re-drive it) or parked on an
@@ -5481,6 +5533,8 @@ declare class WorkflowEngine {
5481
5533
  * checkpoint that is already settled, which the next turn replays past — so it cannot loop.
5482
5534
  */
5483
5535
  private redriveSettledSteps;
5536
+ /** Whether the step at `seq` is settled: a `COUNT` when the store has one, else its checkpoint. */
5537
+ private stepSettled;
5484
5538
  /**
5485
5539
  * {@link redriveSettledSteps} for a step fan: once the turn that suspended on it released its lease,
5486
5540
  * re-drive the run if no step of the fan is still `pending` — the last result landed on another
@@ -5989,6 +6043,13 @@ declare class WorkflowEngine {
5989
6043
  /** Earliest clock time a step's lease is worth LOOKING at again (`stepId` → clock ms) — the read
5990
6044
  * throttle for {@link rearmStepLease}, the step-scoped sibling of {@link decisionDeadlineRearms}. */
5991
6045
  private readonly stepLeaseRearms;
6046
+ /**
6047
+ * {@link stepLeaseRearms} for the steps of a fan this instance sent, by run: one entry per sent
6048
+ * block of consecutive seqs instead of one per step, since they share the lease stamped at send.
6049
+ */
6050
+ private readonly fanLeaseRearms;
6051
+ private noteFanLease;
6052
+ private fanLeaseLookAgainAt;
5992
6053
  /**
5993
6054
  * A step-scoped heartbeat for a durably-suspended remote step: push its LEASE forward so a worker
5994
6055
  * that is still working on it is never presumed dead and double-dispatched. The durable counterpart
@@ -6192,6 +6253,13 @@ declare class WorkflowEngine {
6192
6253
  * barrier ({@link stepFanStillRunning}) then wakes the parent once per wave, not once per result.
6193
6254
  */
6194
6255
  private callRemoteAll;
6256
+ /**
6257
+ * The checkpoints of a step fan's seqs, by seq. A settled one is taken from the turn's snapshot
6258
+ * (`replay`), since nothing but a turn of the run changes it once settled; one the snapshot holds
6259
+ * `pending`, or does not hold, is read again, as {@link callRemote} does for a single step: its
6260
+ * result may have landed since. The fan's last turn so reads nothing it already read.
6261
+ */
6262
+ private fanCheckpoints;
6195
6263
  /**
6196
6264
  * Write the `pending` checkpoints of a step fan's new steps, then dispatch them: one
6197
6265
  * {@link StateStore.saveCheckpoints} call and one {@link TransportPool.dispatchMany} for the
@@ -6200,8 +6268,17 @@ declare class WorkflowEngine {
6200
6268
  private sendStepFan;
6201
6269
  /** Remember a step settled here, forgetting entries older than a lease so the map stays small. */
6202
6270
  private noteSettledHere;
6203
- /** Record `key` in a "happened here recently" map, pruning entries older than a lease. */
6271
+ /**
6272
+ * Record `key` in a "happened here recently" map and drop the entries older than a lease. A key is
6273
+ * re-inserted at the end, so the map stays in the order its keys were noted and the stale ones are
6274
+ * all at its front: pruning stops at the first fresh entry instead of walking the whole map.
6275
+ */
6204
6276
  private noteRecent;
6277
+ /**
6278
+ * The run's checkpoints as a turn replays them: {@link StateStore.listCheckpointsForReplay} when
6279
+ * the store has it (no input on a completed row), else {@link StateStore.listCheckpoints}.
6280
+ */
6281
+ private replayCheckpoints;
6205
6282
  /** {@link StateStore.saveCheckpointIfPending}, or a plain save on a store without it. */
6206
6283
  private savePendingCheckpoint;
6207
6284
  /**
@@ -6211,6 +6288,14 @@ declare class WorkflowEngine {
6211
6288
  * call rejecting means it wrote nothing, so the entries are then written one by one.
6212
6289
  */
6213
6290
  private savePendingCheckpoints;
6291
+ /**
6292
+ * Settle steps of one run at distinct seqs from their results ({@link StepSettlement}s, `settled[i]`
6293
+ * being the `pending` row `settlements[i]` settles): one
6294
+ * {@link StateStore.settleCheckpointsIfPending} call when the store has it, which writes only what
6295
+ * a result changes, else the whole rows through {@link savePendingCheckpoints}. Never rejects as a
6296
+ * whole, the same way.
6297
+ */
6298
+ private settlePendingCheckpoints;
6214
6299
  /**
6215
6300
  * The checkpoints of one run at distinct `seqs`, each as its own outcome: one
6216
6301
  * {@link StateStore.getCheckpoints} call when the store has it, else one read each. The batch
@@ -6989,8 +7074,16 @@ declare class CodecStateStore implements StateStore {
6989
7074
  readonly saveCheckpointIfPending?: (checkpoint: StepCheckpoint) => Promise<boolean>;
6990
7075
  /** Encodes each checkpoint like {@link saveCheckpoint}. Bound only when the inner store has it. */
6991
7076
  readonly saveCheckpointsIfPending?: (checkpoints: StepCheckpoint[]) => Promise<boolean[]>;
7077
+ /** Encodes each settlement's payloads like {@link saveCheckpoint}. Bound only when the inner store
7078
+ * has it, so the engine's whole-row fallback still kicks in through the wrapper. */
7079
+ readonly settleCheckpointsIfPending?: (settlements: StepSettlement[]) => Promise<boolean[]>;
6992
7080
  /** Encodes each checkpoint written. Bound only when the inner store has it. */
6993
7081
  readonly saveCheckpoints?: (checkpoints: StepCheckpoint[]) => Promise<void>;
7082
+ /** Decodes each checkpoint read like {@link listCheckpoints}. Bound only when the inner store has
7083
+ * it, so the engine's full-read fallback still kicks in through the wrapper. */
7084
+ readonly listCheckpointsForReplay?: (runId: string) => Promise<StepCheckpoint[]>;
7085
+ /** Decodes each checkpoint read. Bound only when the inner store has it. */
7086
+ readonly getCheckpointsForSettle?: (runId: string, seqs: number[]) => Promise<StepCheckpoint[]>;
6994
7087
  /** Decodes each checkpoint read. Bound only when the inner store has it. */
6995
7088
  readonly getCheckpoints?: (runId: string, seqs: number[]) => Promise<StepCheckpoint[]>;
6996
7089
  /** Forwarded verbatim — a count reads no payload. Bound only when the inner store has it. */
@@ -7036,6 +7129,7 @@ declare class CodecStateStore implements StateStore {
7036
7129
  private encRun;
7037
7130
  private decRun;
7038
7131
  private encCp;
7132
+ private encSettlement;
7039
7133
  private decCp;
7040
7134
  private encSpec;
7041
7135
  private encSchedule;
@@ -7539,10 +7633,12 @@ declare class InMemoryStateStore implements StateStore {
7539
7633
  pruneTerminalRuns(policy: RetentionPolicy, nowMs: number, limit: number): Promise<number>;
7540
7634
  getCheckpoint(runId: string, seq: number): Promise<StepCheckpoint | null>;
7541
7635
  getCheckpoints(runId: string, seqs: number[]): Promise<StepCheckpoint[]>;
7636
+ getCheckpointsForSettle(runId: string, seqs: number[]): Promise<StepCheckpoint[]>;
7542
7637
  saveCheckpoint(checkpoint: StepCheckpoint): Promise<void>;
7543
7638
  saveCheckpoints(checkpoints: StepCheckpoint[]): Promise<void>;
7544
7639
  saveCheckpointIfPending(checkpoint: StepCheckpoint): Promise<boolean>;
7545
7640
  saveCheckpointsIfPending(checkpoints: StepCheckpoint[]): Promise<boolean[]>;
7641
+ settleCheckpointsIfPending(settlements: StepSettlement[]): Promise<boolean[]>;
7546
7642
  listOrphanedRuns(nowMs: number, limit: number, namespace?: string, ownedBy?: OwnedLeaseReclaim): Promise<WorkflowRun[]>;
7547
7643
  listIncompleteRuns(namespace?: string): Promise<WorkflowRun[]>;
7548
7644
  listPendingRuns(limit: number, namespace?: string): Promise<WorkflowRun[]>;
@@ -7608,6 +7704,7 @@ declare class InMemoryStateStore implements StateStore {
7608
7704
  deleteSchedule(id: string): Promise<boolean>;
7609
7705
  listSchedules(query: ScheduleQuery): Promise<ScheduleRecord[]>;
7610
7706
  listCheckpoints(runId: string): Promise<StepCheckpoint[]>;
7707
+ listCheckpointsForReplay(runId: string): Promise<StepCheckpoint[]>;
7611
7708
  private runCheckpoints;
7612
7709
  checkpointStats(runId: string, opts?: {
7613
7710
  group?: string | undefined;
@@ -7713,4 +7810,4 @@ declare function singletonAdmissionDenialPatch(runs: WorkflowRun[], runId: strin
7713
7810
  updatedAt: Date;
7714
7811
  } | undefined;
7715
7812
 
7716
- export { type AccumulatorHost, type Admission, type AdmissionBackend, type AdmissionItem, type AllOptions, type AllSettledOptions, type AllStepsOptions, type AllStepsSettledOptions, type AnnouncedWorkflow, type AnnouncementEvidence, type AttributeFilter, type AttributeOp, type AttributePredicateOperand, type AttributeValue, 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, ContinueAsNew, type ControlMessage, type ControlPlane, 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, 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, Entities, type EntityConfig, type EntityHandler, type EntityHost, type EntityWorkflowHost, EventAccumulators, type EventBatchConfig, 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, type ListStalledRunsOptions, type MetricsCollector, type MetricsSnapshot, type NamedTransport, type NegotiateOptions, type NegotiationOutcome, type NegotiationReason, type NegotiationResult, NestedWorkflowCallError, NonDeterminismError, type OnErrorInput, type OnErrorRoute, type OwnedLeaseReclaim, type PartitionSighting, type PayloadCodec, type QueueConfig, QueueController, RUN_HISTORY_FIXTURE_VERSION, RUN_VALUE_FACET_LIMIT, RUN_VALUE_FACET_SCAN, type RawWorkerDescriptor, RemoteStepError, RemoteStepTimeout, type RemoteTask, RemoteWorkflowExecutor, RemoteWorkflowTimeout, type RetentionPolicy, type RoutableDispatch, type RoutableResolution, type RoutingResolution, type RunAttributeRow, type 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 RunValueAxis, type RunValueFacetOptions, type RunValueFacetOrder, type RunValueFacetRow, type RunWaiting, SINGLETON_ACTIVE_STATUSES, SINGLETON_ADMITTED_TAG, SINGLETON_RESERVED_TAGS, SINGLETON_TRACKED_TAG, STATE_STORE, STATE_STORE_CANONICAL, SUMMARY_CHILD_LIMIT, type ScalarAttributeFilter, ScheduleAlreadyExistsError, ScheduleClient, type ScheduleClientOptions, type ScheduleDescription, type ScheduleHost, type ScheduleListQuery, ScheduleNotFoundError, type ScheduleOptions, type ScheduleQuery, type ScheduleRecord, type ScheduledWorkflow, type SchemaIssue, type SchemaValidationCode, SchemaValidationError, type SearchAttributes, type SearchAttributesSchema, type Settled, SignalTimeoutError, type SignalWaiter, type SingletonConfig, SingletonQueueFullError, type StalePendingStep, type StalledRunInfo, StandardSchemaV1, type StartOptions, type StartRunMessage, type StateStore, type StepCheckpoint, type StepConfig, type StepDef, type StepDispatchOpts, type StepError, type StepEvent, type StepHandler, type StepInterceptor, type StepInvocation, type StepKind, type StepLogger, type StepOptions, type StepRef, type StepResult, type StepScope, type StepUndo, type StoreTransaction, type SubProcessHandle, TERMINAL_RUN_STATUSES, TRANSPORT, TRANSPORT_CANONICAL, type TenantEvent, type TenantTokenSource, type TenantVerifier, type Transport, type UndoOf, type UpdateResult, type UpdateValidator, VERSION_UNDECLARED_TAG, type VerifiedTenant, WORKFLOW_NAME_KEY, type WireDates, type WorkerAdjust, type WorkerConcurrencyStatus, type WorkerDescriptor, type WorkerHeartbeat, type WorkerLifecycle, type WorkerStatus, type WorkflowAnnouncement, WorkflowBlocked, type WorkflowClass, type WorkflowCommand, type WorkflowCtx, type WorkflowDecision, type WorkflowDirectory, WorkflowEngine, type WorkflowEngineDeps, type WorkflowExecutor, type WorkflowHandler, type WorkflowInputOf, type WorkflowOutputOf, type WorkflowRef, type WorkflowRegistration, type WorkflowRun, type WorkflowStartClient, type WorkflowStepEvent, WorkflowSuspended, type WorkflowTask, aggregateAnnouncements, aggregatesCheckpoints, announcementsOf, applyAttributeQuery, assertConcurrency, assertRoutes, attributeColumnFor, attributeOperand, attributePredicateOperands, axisIsRunColumn, bindWorkflowClass, breakpointToken, buildWorkflowDirectory, canRoute, capableWorkers, checkpointNameKind, checkpointStatsOf, childIdsOf, classifyWaiterToken, clearDurableExecutionWrappers, clearTerminalSingletonAdmission, codeAndDetails, codeOf, collectMetrics, concurrencyTag, controlPlaneDescriptor, countRuns, coveredTokens, createStepLogger, currentStep, currentStepScope, currentWorkflowCtx, debug, describeWorker, descriptorHash, detailsOf, error, etagMatches, eventMatchOf, eventMatches, eventNameOf, eventPrefix, eventToken, facetOrigin, fanPageBounds, fanPageEtag, findStalledRuns, foldedCount, getRunsByIds, handoffHandlerId, handoffName, hasDurableExecutionWrappers, heartbeatStatus, hmacTenantVerifier, indexWaitersByRun, info, isEngineMintedTag, isEventToken, isFailedMember, isLegacyDescriptor, isNonEmptyRunScope, isWorkflowControlFlowSignal, legacySingletonHolders, listSignalWaitersOfRuns, liveHandoff, log, matchesAttributes, mergeRunFacetRows, mergeRunValueFacetRows, missingCapabilities, negotiate, nextCronFireMs, normalizeAttributeRows, normalizeDescriptor, observedAnnouncements, onErrorRunId, pageFan, pageFanFromStore, parentRunIdOf, parseDuration, parseWebhookToken, partitionOfToken, planDispatch, poolNamespace, prevCronFireMs, queryCheckpointsOf, readRunsByIds, readSearchAttributes, requiredCapabilities, resolveConcurrency, resolveRouting, resolveRunWaiting, resolveTenantToken, resolveWireTenant, retiredHandoffName, routeFor, runDetailEtag, runDurableExecution, runInStepLogger, runInStepScope, runInWorkflowCtx, runOutsideWorkflowCtx, runSchedules, runStepHandler, runValueFacetsFromRuns, sanitizeQueueToken, scheduleRunIdAt, scheduledRunId, signTenantToken, singletonAdmissionDenialPatch, singletonAdmissionTags, sqlComparator, stepConfigOf, stepId, stepNameOf, sub, subEvent, subProcess, summarizeFan, summarizeRunFromStore, summarizeTimeline, tenantGroup, useDurableExecution, warn, withSingletonTracked, withoutSingletonMarkers, workflowName };
7813
+ export { type AccumulatorHost, type Admission, type AdmissionBackend, type AdmissionItem, type AllOptions, type AllSettledOptions, type AllStepsOptions, type AllStepsSettledOptions, type AnnouncedWorkflow, type AnnouncementEvidence, type AttributeFilter, type AttributeOp, type AttributePredicateOperand, type AttributeValue, 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, ContinueAsNew, type ControlMessage, type ControlPlane, 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, 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, Entities, type EntityConfig, type EntityHandler, type EntityHost, type EntityWorkflowHost, EventAccumulators, type EventBatchConfig, 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, type ListStalledRunsOptions, type MetricsCollector, type MetricsSnapshot, type NamedTransport, type NegotiateOptions, type NegotiationOutcome, type NegotiationReason, type NegotiationResult, NestedWorkflowCallError, NonDeterminismError, type OnErrorInput, type OnErrorRoute, type OwnedLeaseReclaim, type PartitionSighting, type PayloadCodec, type QueueConfig, QueueController, RUN_HISTORY_FIXTURE_VERSION, RUN_VALUE_FACET_LIMIT, RUN_VALUE_FACET_SCAN, type RawWorkerDescriptor, RemoteStepError, RemoteStepTimeout, type RemoteTask, RemoteWorkflowExecutor, RemoteWorkflowTimeout, type RetentionPolicy, type RoutableDispatch, type RoutableResolution, type RoutingResolution, type RunAttributeRow, type 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 RunValueAxis, type RunValueFacetOptions, type RunValueFacetOrder, type RunValueFacetRow, type RunWaiting, SINGLETON_ACTIVE_STATUSES, SINGLETON_ADMITTED_TAG, SINGLETON_RESERVED_TAGS, SINGLETON_TRACKED_TAG, STATE_STORE, STATE_STORE_CANONICAL, SUMMARY_CHILD_LIMIT, type ScalarAttributeFilter, ScheduleAlreadyExistsError, ScheduleClient, type ScheduleClientOptions, type ScheduleDescription, type ScheduleHost, type ScheduleListQuery, ScheduleNotFoundError, type ScheduleOptions, type ScheduleQuery, type ScheduleRecord, type ScheduledWorkflow, type SchemaIssue, type SchemaValidationCode, SchemaValidationError, type SearchAttributes, type SearchAttributesSchema, type Settled, SignalTimeoutError, type SignalWaiter, type SingletonConfig, SingletonQueueFullError, type StalePendingStep, type StalledRunInfo, StandardSchemaV1, type StartOptions, type StartRunMessage, type StateStore, type StepCheckpoint, type StepConfig, type StepDef, type StepDispatchOpts, type StepError, type StepEvent, type StepHandler, type StepInterceptor, type StepInvocation, type StepKind, type StepLogger, type StepOptions, type StepRef, type StepResult, type StepScope, type StepSettlement, type StepUndo, type StoreTransaction, type SubProcessHandle, TERMINAL_RUN_STATUSES, TRANSPORT, TRANSPORT_CANONICAL, type TenantEvent, type TenantTokenSource, type TenantVerifier, type Transport, type UndoOf, type UpdateResult, type UpdateValidator, VERSION_UNDECLARED_TAG, type VerifiedTenant, WORKFLOW_NAME_KEY, type WireDates, type WorkerAdjust, type WorkerConcurrencyStatus, type WorkerDescriptor, type WorkerHeartbeat, type WorkerLifecycle, type WorkerStatus, type WorkflowAnnouncement, WorkflowBlocked, type WorkflowClass, type WorkflowCommand, type WorkflowCtx, type WorkflowDecision, type WorkflowDirectory, WorkflowEngine, type WorkflowEngineDeps, type WorkflowExecutor, type WorkflowHandler, type WorkflowInputOf, type WorkflowOutputOf, type WorkflowRef, type WorkflowRegistration, type WorkflowRun, type WorkflowStartClient, type WorkflowStepEvent, WorkflowSuspended, type WorkflowTask, aggregateAnnouncements, aggregatesCheckpoints, announcementsOf, applyAttributeQuery, assertConcurrency, assertRoutes, attributeColumnFor, attributeOperand, attributePredicateOperands, axisIsRunColumn, bindWorkflowClass, breakpointToken, buildWorkflowDirectory, canRoute, capableWorkers, checkpointNameKind, checkpointStatsOf, childIdsOf, classifyWaiterToken, clearDurableExecutionWrappers, clearTerminalSingletonAdmission, codeAndDetails, codeOf, collectMetrics, concurrencyTag, controlPlaneDescriptor, countRuns, coveredTokens, createStepLogger, currentStep, currentStepScope, currentWorkflowCtx, debug, describeWorker, descriptorHash, detailsOf, error, etagMatches, eventMatchOf, eventMatches, eventNameOf, eventPrefix, eventToken, facetOrigin, fanPageBounds, fanPageEtag, findStalledRuns, foldedCount, getRunsByIds, handoffHandlerId, handoffName, hasDurableExecutionWrappers, heartbeatStatus, hmacTenantVerifier, indexWaitersByRun, info, isEngineMintedTag, isEventToken, isFailedMember, isLegacyDescriptor, isNonEmptyRunScope, isWorkflowControlFlowSignal, legacySingletonHolders, listSignalWaitersOfRuns, liveHandoff, log, matchesAttributes, mergeRunFacetRows, mergeRunValueFacetRows, missingCapabilities, negotiate, nextCronFireMs, normalizeAttributeRows, normalizeDescriptor, observedAnnouncements, onErrorRunId, pageFan, pageFanFromStore, parentRunIdOf, parseDuration, parseWebhookToken, partitionOfToken, planDispatch, poolNamespace, prevCronFireMs, queryCheckpointsOf, readRunsByIds, readSearchAttributes, requiredCapabilities, resolveConcurrency, resolveRouting, resolveRunWaiting, resolveTenantToken, resolveWireTenant, retiredHandoffName, routeFor, runDetailEtag, runDurableExecution, runInStepLogger, runInStepScope, runInWorkflowCtx, runOutsideWorkflowCtx, runSchedules, runStepHandler, runValueFacetsFromRuns, sanitizeQueueToken, scheduleRunIdAt, scheduledRunId, signTenantToken, singletonAdmissionDenialPatch, singletonAdmissionTags, sqlComparator, stepConfigOf, stepId, stepNameOf, sub, subEvent, subProcess, summarizeFan, summarizeRunFromStore, summarizeTimeline, tenantGroup, useDurableExecution, warn, withSingletonTracked, withoutSingletonMarkers, workflowName };