@dudousxd/nestjs-durable-core 0.100.0 → 0.101.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 +337 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +152 -6
- package/dist/index.d.ts +152 -6
- package/dist/index.js +334 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -267,6 +267,41 @@ interface WorkflowRegistration {
|
|
|
267
267
|
*/
|
|
268
268
|
subscribes?: string[];
|
|
269
269
|
}
|
|
270
|
+
/**
|
|
271
|
+
* One recurring start a tenant app declares (its `schedules` module option), as its worker
|
|
272
|
+
* ANNOUNCES it to the control plane, which adopts it as a persisted schedule and fires it (see
|
|
273
|
+
* `WorkflowEngine.syncAnnouncedSchedules`). JSON-safe: a workflow class is announced by its name.
|
|
274
|
+
*/
|
|
275
|
+
interface AnnouncedSchedule {
|
|
276
|
+
/** The schedule's key in the app. The control plane's schedule id is `app:<namespace>:<key>`. */
|
|
277
|
+
key: string;
|
|
278
|
+
/** Registered workflow name. */
|
|
279
|
+
workflow: string;
|
|
280
|
+
/** The input every run starts with. */
|
|
281
|
+
input?: unknown;
|
|
282
|
+
/** Fixed interval in ms. Exactly one of `everyMs` and `cron`. */
|
|
283
|
+
everyMs?: number;
|
|
284
|
+
/** Cron expression (5 fields, or 6 with leading seconds). */
|
|
285
|
+
cron?: string;
|
|
286
|
+
/** IANA timezone the cron is evaluated in. Default UTC. */
|
|
287
|
+
timezone?: string;
|
|
288
|
+
/** Declared paused. */
|
|
289
|
+
paused?: boolean;
|
|
290
|
+
/** `'skip'`: no new window while the previous run is still in flight. Default `'allow'`. */
|
|
291
|
+
overlap?: 'allow' | 'skip';
|
|
292
|
+
/** Delay each fire by a stable offset of up to this many ms. */
|
|
293
|
+
jitterMs?: number;
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* The schedules a tenant worker announces, and the wire tenant they belong to: the partition, or
|
|
297
|
+
* the signed tenant token when the app has one (verified by the control plane exactly like a
|
|
298
|
+
* start-run's `tenant`). `items: []` is a statement too ("this app declares no schedules"), which is
|
|
299
|
+
* what lets the control plane withdraw a schedule the app stopped declaring.
|
|
300
|
+
*/
|
|
301
|
+
interface ScheduleAnnouncement {
|
|
302
|
+
tenant: string;
|
|
303
|
+
items: AnnouncedSchedule[];
|
|
304
|
+
}
|
|
270
305
|
/**
|
|
271
306
|
* A worker's (or control-plane's) advertised identity, wire-protocol support, feature capabilities
|
|
272
307
|
* and registered handlers. Published on startup + on change (design §7.2) and consumed by
|
|
@@ -312,6 +347,13 @@ interface WorkerDescriptor {
|
|
|
312
347
|
* that fails at run time.
|
|
313
348
|
*/
|
|
314
349
|
registrations?: WorkflowRegistration[];
|
|
350
|
+
/**
|
|
351
|
+
* The recurring starts this app declares (see {@link ScheduleAnnouncement}). OPTIONAL and additive:
|
|
352
|
+
* absent = this SDK does not announce schedules (a control plane then neither adopts nor withdraws
|
|
353
|
+
* any for it); a control plane that predates the field ignores it. Rides the descriptor so it
|
|
354
|
+
* inherits its liveness: the control plane only reconciles against what LIVE workers announce.
|
|
355
|
+
*/
|
|
356
|
+
schedules?: ScheduleAnnouncement;
|
|
315
357
|
/** Optional routing partition (queue/group sharding). */
|
|
316
358
|
partition?: string;
|
|
317
359
|
/** Optional tenant namespace this instance serves. */
|
|
@@ -435,6 +477,8 @@ declare function describeWorker(opts: {
|
|
|
435
477
|
* the descriptor entirely when absent or empty, so a worker with nothing to announce keeps the
|
|
436
478
|
* pre-registrations bytes (and therefore the pre-registrations hash). */
|
|
437
479
|
registrations?: readonly WorkflowRegistration[] | undefined;
|
|
480
|
+
/** The schedules this app announces. Omitted from the descriptor when absent; `items: []` is kept. */
|
|
481
|
+
schedules?: ScheduleAnnouncement | undefined;
|
|
438
482
|
startedAt: number;
|
|
439
483
|
partition?: string | undefined;
|
|
440
484
|
namespace?: string | undefined;
|
|
@@ -2099,6 +2143,12 @@ declare const VERSION_UNDECLARED_TAG = "version:undeclared";
|
|
|
2099
2143
|
* consumer boots. Cancel it to drop it.
|
|
2100
2144
|
*/
|
|
2101
2145
|
declare const NO_LIVE_WORKER = "no_live_worker";
|
|
2146
|
+
/**
|
|
2147
|
+
* How long an adopted tenant schedule may go unannounced by every live worker of its app before the
|
|
2148
|
+
* control plane pauses it (see `WorkflowEngine.syncAnnouncedSchedules`). Long enough to ride out a
|
|
2149
|
+
* rolling deploy; a schedule is never deleted for missing.
|
|
2150
|
+
*/
|
|
2151
|
+
declare const DEFAULT_ANNOUNCED_SCHEDULE_GRACE_MS: number;
|
|
2102
2152
|
interface WorkflowEngineDeps {
|
|
2103
2153
|
store: StateStore;
|
|
2104
2154
|
/** A single task transport. Shorthand for a one-entry `transports` pool (id `default`). */
|
|
@@ -2422,6 +2472,10 @@ declare class WorkflowEngine {
|
|
|
2422
2472
|
private readonly remoteRedispatchMax;
|
|
2423
2473
|
/** How long a `blocked` run waits before the recovery poll re-checks the live fleet (design §7.5). */
|
|
2424
2474
|
private readonly blockedPollMs;
|
|
2475
|
+
/** Verifies the wire tenant of a start-run, and of a worker's schedule announcement. */
|
|
2476
|
+
private readonly verifyTenant;
|
|
2477
|
+
/** Wire tenants whose schedule announcement failed verification, warned about once. */
|
|
2478
|
+
private readonly rejectedScheduleTenants;
|
|
2425
2479
|
private readonly workerDescriptorCacheMs;
|
|
2426
2480
|
private readonly descriptorCache;
|
|
2427
2481
|
/** This engine's control-plane handshake descriptor — negotiated against each worker (design §7.3). */
|
|
@@ -2627,11 +2681,13 @@ declare class WorkflowEngine {
|
|
|
2627
2681
|
* The earliest known time (epoch ms) the poll has work, if it is at or before `byMs`: this
|
|
2628
2682
|
* namespace's next due timer (`listDueTimers` up to `byMs`, limit one: it returns the most overdue
|
|
2629
2683
|
* first), the next `blocked` run's recovery poll, and with `persistedSchedules` the next persisted
|
|
2630
|
-
* schedule to fire (see {@link ScheduleClient.nextFireAt}
|
|
2684
|
+
* schedule to fire (see {@link ScheduleClient.nextFireAt}; with `announcedSchedules` alone, the next
|
|
2685
|
+
* schedule adopted from a tenant). `undefined` when nothing is due by
|
|
2631
2686
|
* then. A poller reads it before waiting longer than its tick, so the wait never outlasts a timer.
|
|
2632
2687
|
*/
|
|
2633
2688
|
nextDueAt(byMs: number, opts?: {
|
|
2634
2689
|
persistedSchedules?: boolean;
|
|
2690
|
+
announcedSchedules?: boolean;
|
|
2635
2691
|
}): Promise<number | undefined>;
|
|
2636
2692
|
/**
|
|
2637
2693
|
* Pick up a run another instance announced as enqueued: run it here if it is still `pending`.
|
|
@@ -4141,6 +4197,23 @@ declare class WorkflowEngine {
|
|
|
4141
4197
|
*
|
|
4142
4198
|
* Workflows only, and deliberately: see the "steps are out of scope" note in `handshake/announced`.
|
|
4143
4199
|
*/
|
|
4200
|
+
/**
|
|
4201
|
+
* Adopt the schedules tenant apps announce (their `schedules` module option, carried on their live
|
|
4202
|
+
* workers' descriptors) as persisted schedules, and withdraw the ones an app stopped announcing.
|
|
4203
|
+
* The control plane's timer poll calls it; {@link ScheduleClient.tick} fires them.
|
|
4204
|
+
*
|
|
4205
|
+
* Per app (the namespace its announcement's verified `tenant` maps to, as for a start-run): the
|
|
4206
|
+
* schedules announced by its live workers, where two workers disagree on a key the one that
|
|
4207
|
+
* started last (its deploy is the newer one) wins. An app with no live worker that states its
|
|
4208
|
+
* schedules is left alone, so its schedules keep firing into runs that wait for a worker. See
|
|
4209
|
+
* {@link ScheduleClient.syncAnnounced} for the reconciliation rule and `graceMs` (default 10
|
|
4210
|
+
* minutes). A namespaced engine adopts only its own namespace's. Nothing without a store that
|
|
4211
|
+
* persists schedules or a transport that reads worker descriptors.
|
|
4212
|
+
*/
|
|
4213
|
+
syncAnnouncedSchedules(opts?: {
|
|
4214
|
+
graceMs?: number;
|
|
4215
|
+
nowMs?: number;
|
|
4216
|
+
}): Promise<Map<string, AnnouncedScheduleSync>>;
|
|
4144
4217
|
announcedWorkflows(): Promise<AnnouncedWorkflow[]>;
|
|
4145
4218
|
/**
|
|
4146
4219
|
* {@link announcedWorkflows}, plus the thing a list of workflows can never say: why it is the
|
|
@@ -4956,9 +5029,22 @@ interface ScheduleDescription {
|
|
|
4956
5029
|
/** The customer the schedule and its runs belong to, when it has one. */
|
|
4957
5030
|
tenantId?: string | undefined;
|
|
4958
5031
|
tenantKind?: string | undefined;
|
|
5032
|
+
/**
|
|
5033
|
+
* Set on a schedule a tenant app ANNOUNCED (its `schedules` module option) and the control plane
|
|
5034
|
+
* adopted: the key the app declares it under. Its `namespace` is the app (partition).
|
|
5035
|
+
*/
|
|
5036
|
+
announcedKey?: string | undefined;
|
|
5037
|
+
/** An announced schedule that no live worker of its app announces any more: since when. */
|
|
5038
|
+
unannouncedSince?: Date | undefined;
|
|
5039
|
+
/** When the control plane paused it for staying unannounced past the grace period. */
|
|
5040
|
+
withdrawnAt?: Date | undefined;
|
|
4959
5041
|
createdAt: Date;
|
|
4960
5042
|
updatedAt: Date;
|
|
4961
5043
|
}
|
|
5044
|
+
/** The tag on every schedule adopted from a tenant's announcement (and on the runs it starts). */
|
|
5045
|
+
declare const ANNOUNCED_SCHEDULE_TAG = "schedule:announced";
|
|
5046
|
+
/** The control plane's schedule id for the schedule `key` announced by the app on `namespace`. */
|
|
5047
|
+
declare function announcedScheduleId(namespace: string, key: string): string;
|
|
4962
5048
|
/** Filter for `engine.schedules.list`. */
|
|
4963
5049
|
type ScheduleListQuery = Omit<ScheduleQuery, 'dueBy'>;
|
|
4964
5050
|
/** Thrown by `engine.schedules.create` when the id is taken (use `upsert` to replace). */
|
|
@@ -4971,9 +5057,30 @@ declare class ScheduleNotFoundError extends Error {
|
|
|
4971
5057
|
readonly scheduleId: string;
|
|
4972
5058
|
constructor(scheduleId: string);
|
|
4973
5059
|
}
|
|
5060
|
+
/** What {@link ScheduleClient.syncAnnounced} did to a namespace's adopted schedules. */
|
|
5061
|
+
interface AnnouncedScheduleSync {
|
|
5062
|
+
/** Created, or re-applied because the announced definition changed. */
|
|
5063
|
+
adopted: string[];
|
|
5064
|
+
/** Announced again after missing (and resumed, when it had been withdrawn). */
|
|
5065
|
+
restored: string[];
|
|
5066
|
+
/** Missing from the announcement for the first time: the grace period starts. */
|
|
5067
|
+
missing: string[];
|
|
5068
|
+
/** Paused because it stayed unannounced past the grace period. */
|
|
5069
|
+
withdrawn: string[];
|
|
5070
|
+
/** Announced, but the definition does not evaluate (bad cron, both or neither cadence). */
|
|
5071
|
+
invalid: {
|
|
5072
|
+
key: string;
|
|
5073
|
+
error: string;
|
|
5074
|
+
}[];
|
|
5075
|
+
}
|
|
4974
5076
|
/** The engine surface the schedule client drives. */
|
|
4975
5077
|
interface ScheduleHost {
|
|
4976
5078
|
start(workflow: string, input: unknown, runId: string, opts?: StartOptions): Promise<RunResult>;
|
|
5079
|
+
/**
|
|
5080
|
+
* The tenant start path, used to fire an announced schedule: a workflow no live worker serves yet
|
|
5081
|
+
* is parked `blocked` (`no_live_worker`) until one is, instead of throwing. Absent = `start`.
|
|
5082
|
+
*/
|
|
5083
|
+
startParked?(workflow: string, input: unknown, runId: string, opts?: StartOptions): Promise<RunResult>;
|
|
4977
5084
|
getRun(runId: string): Promise<WorkflowRun | null>;
|
|
4978
5085
|
/** True once the engine has begun shutting down; `tick` fires nothing more after that. */
|
|
4979
5086
|
isDraining?(): boolean;
|
|
@@ -5037,21 +5144,60 @@ declare class ScheduleClient {
|
|
|
5037
5144
|
*/
|
|
5038
5145
|
trigger(id: string): Promise<RunResult>;
|
|
5039
5146
|
/**
|
|
5040
|
-
*
|
|
5147
|
+
* Start one run of `record`: through the tenant start path for an announced schedule (its run waits
|
|
5148
|
+
* `blocked` for a live worker of its app instead of failing), else a plain `start`.
|
|
5149
|
+
*/
|
|
5150
|
+
private startFor;
|
|
5151
|
+
/**
|
|
5152
|
+
* Fire every due schedule (in this engine's namespace; all namespaces for an operator engine; only
|
|
5153
|
+
* those carrying `opts.tag` when given):
|
|
5041
5154
|
* start its window's run and advance it to the next window. Called by the NestJS timer poller on
|
|
5042
5155
|
* each tick when `persistedSchedules` is on; call it yourself from any other driver. Returns the
|
|
5043
5156
|
* run ids started (or re-found, for an idempotent re-fire).
|
|
5044
5157
|
*/
|
|
5045
|
-
tick(nowMs?: number
|
|
5158
|
+
tick(nowMs?: number, opts?: {
|
|
5159
|
+
tag?: string;
|
|
5160
|
+
}): Promise<string[]>;
|
|
5046
5161
|
/**
|
|
5047
5162
|
* When {@link tick} next has a schedule to fire, if one is due by `byMs`: the earliest `nextFireAt`
|
|
5048
|
-
* of the unpaused schedules (of this engine's namespace
|
|
5163
|
+
* of the unpaused schedules (of this engine's namespace, carrying `opts.tag` when given) due by
|
|
5164
|
+
* then, else `undefined`. One indexed
|
|
5049
5165
|
* read (the due-schedule scan `tick` makes, with a later bound and a limit of one). A store that
|
|
5050
5166
|
* does not persist schedules has none.
|
|
5051
5167
|
*/
|
|
5052
|
-
nextFireAt(byMs: number
|
|
5168
|
+
nextFireAt(byMs: number, opts?: {
|
|
5169
|
+
tag?: string;
|
|
5170
|
+
}): Promise<number | undefined>;
|
|
5053
5171
|
/** Fire one due schedule and advance it. Returns the run id started, if any. */
|
|
5054
5172
|
private fire;
|
|
5173
|
+
/**
|
|
5174
|
+
* An announced schedule whose previous run is still parked waiting for a live worker of its app
|
|
5175
|
+
* (the app is down): this window is folded into that run instead of parking one more. However long
|
|
5176
|
+
* the app is down, it finds at most one run per schedule waiting when it comes back, the same
|
|
5177
|
+
* bound `catchup: 'latest'` puts on windows missed while no scheduler polled.
|
|
5178
|
+
*/
|
|
5179
|
+
private waitingForWorker;
|
|
5180
|
+
/**
|
|
5181
|
+
* Reconcile the schedules adopted from one app (`namespace`) with what its LIVE workers announce
|
|
5182
|
+
* now (`items`, one per key; the caller resolved disagreeing workers). The rule:
|
|
5183
|
+
* - an announced key with no schedule yet is created (id {@link announcedScheduleId}, tagged
|
|
5184
|
+
* {@link ANNOUNCED_SCHEDULE_TAG}, `catchup: 'latest'`); one whose definition changed is
|
|
5185
|
+
* re-applied like `upsert` (its history kept, its next fire recomputed from now). An equal
|
|
5186
|
+
* definition writes nothing, so any number of replicas announcing the same set is a no-op;
|
|
5187
|
+
* - a pause or resume made from the console survives: a re-applied definition keeps the current
|
|
5188
|
+
* paused state, unless the app's own declared `paused` changed;
|
|
5189
|
+
* - an adopted schedule the app no longer announces is marked missing, and paused ("withdrawn")
|
|
5190
|
+
* once it has stayed missing for `graceMs`. It is never deleted: its history stays, and an app
|
|
5191
|
+
* that announces it again (a rollback) gets it back, resumed unless an operator had paused it.
|
|
5192
|
+
*
|
|
5193
|
+
* Call it only for an app that has at least one live worker stating its schedules: with none (the
|
|
5194
|
+
* app is down, or runs an SDK that does not announce schedules), nothing is withdrawn, and its
|
|
5195
|
+
* schedules keep firing into runs that wait for a worker.
|
|
5196
|
+
*/
|
|
5197
|
+
syncAnnounced(namespace: string, items: readonly AnnouncedSchedule[], opts: {
|
|
5198
|
+
nowMs?: number;
|
|
5199
|
+
graceMs: number;
|
|
5200
|
+
}): Promise<AnnouncedScheduleSync>;
|
|
5055
5201
|
/** `overlap: 'skip'` and the previous run of this schedule is still in flight. */
|
|
5056
5202
|
private overlapping;
|
|
5057
5203
|
private mustGet;
|
|
@@ -9967,4 +10113,4 @@ declare function prevRRuleFireMs(rule: ParsedRRule, atMs: number): number | null
|
|
|
9967
10113
|
*/
|
|
9968
10114
|
declare function settleResultsWithPlainCalls(store: Pick<StateStore, 'getRun' | 'getCheckpoint'> & Partial<Pick<StateStore, 'getRuns' | 'getCheckpointsForSettle' | 'getCheckpoints' | 'settleCheckpointsIfPending'>>, results: StepResultSettlement[]): Promise<(StepCheckpoint | null)[]>;
|
|
9969
10115
|
|
|
9970
|
-
export { ACCUMULATOR_SEEN_MAX, ANY_WAIT_GROUP, type AccumulatorHost, type AccumulatorStartOptions, 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 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_CONCURRENCY_STATUSES, DEFAULT_PARTITION, DEFAULT_STALLED_AFTER_MS, DURABLE_OPTIONS, DURABLE_OPTIONS_CANONICAL, DURABLE_STEP_CONFIG, DURABLE_STEP_NAME, type Disagreement, type DispatchDiagnostics, type DispatchPlan, DuplicateDurableCopyError, type DurableCopy, type DurableExecution, type DurableExecutionWrapper, type DurableTopology, type DurableWebhook, DurableWorkflow, type DynamicWorkflowCtx, ENGINE_MINTED_TAG_PREFIXES, ENTITY_WORKFLOW, EVENT_BUFFER_SCAN_LIMIT, EVENT_TOKEN_PREFIX, type EngineEvent, type EngineEventType, type EngineListener, type EngineTenancy, Entities, type EntityConfig, type EntityHandler, type EntityHost, type EntityWorkflowHost, EventAccumulators, type EventBatchConfig, type EventSubscription, FAN_SUMMARY_FAILURES, type FanJoin, type FanPage, type FanPageQuery, type FanSummary, type FanWait, FatalError, type FindStalledRunsOptions, GatherError, type GatherItemFailure, type GroupHealth, HANDOFF_SEQ_BASE, type Heartbeat, type HeartbeatSighting, type HeartbeatStatus, type HistoryEvent, InMemoryAdmissionBackend, InMemoryRunQueue, InMemoryStateStore, InMemoryTransport, type InferSearchAttributes, LEGACY_V1_CAPABILITIES, LEGACY_V1_PROTOCOL, LIFECYCLE_COALESCED_TAG_PREFIX, LIFECYCLE_HEAL_WINDOW_MS, LIFECYCLE_ORPHAN_MS, LIFECYCLE_OWED_TAG_PREFIX, LIFECYCLE_PENDING_TAG, LIFECYCLE_REGISTRY_HEARTBEAT_MS, LIFECYCLE_REGISTRY_STALE_MS, LIFECYCLE_REGISTRY_TAG, LIFECYCLE_REGISTRY_TTL_MS, LIFECYCLE_REGISTRY_WORKFLOW, LIFECYCLE_TRACE_TAG_PREFIX, LIFECYCLE_TRIGGERED_TAG_PREFIX, LIFECYCLE_TRIGGER_FAILED_TAG_PREFIX, type LifecycleDelivery, type LifecycleDeliveryState, type LifecycleEventOf, type LifecycleKind, type LifecycleRegistryEntry, type LifecycleSource, type LifecycleSubscriptionLink, type ListStalledRunsOptions, type MetricsCollector, type MetricsSnapshot, NO_LIVE_WORKER, type NamedTransport, type NegotiateOptions, type NegotiationOutcome, type NegotiationReason, type NegotiationResult, NestedWorkflowCallError, NonDeterminismError, type OnErrorInput, type OnErrorRoute, type OnEventEntry, type OwnedLeaseReclaim, PARENT_CLOSE_TAG_PREFIX, type ParentClosePolicy, type ParsedRRule, type PartitionSighting, type PayloadCodec, type QueueConfig, QueueController, REMOTE_EVENT, RUN_HISTORY_FIXTURE_VERSION, RUN_VALUE_FACET_LIMIT, RUN_VALUE_FACET_SCAN, RUN_WAIT_TOKEN_PREFIX, type RawWorkerDescriptor, RemoteStepError, RemoteStepTimeout, type RemoteTask, RemoteWorkflowExecutor, RemoteWorkflowTimeout, type RepublishLifecycleResult, type RepublishLifecycleTarget, type RetentionPolicy, type RoutableDispatch, type RoutableResolution, type RoutingResolution, type RunAppAttribution, RunAppStamper, type RunAppTopologyOptions, type RunAttributeRow, type RunConsumerOptions, type RunDetail, type RunDetailOptions, type RunDispatch, type RunDispatcher, type RunFacetQuery, type RunFacetRow, RunGateway, type RunListItem, type RunQuery, type RunQueueOptions, type RunReply, type RunReplyResult, type RunRequest, type RunRequestKind, type RunResult, type RunSchedulesOptions, type RunScope, type RunStatus, type RunTenant, type RunValueAxis, type RunValueFacetOptions, type RunValueFacetOrder, type RunValueFacetRow, type RunWaitLink, type RunWaiting, SINGLETON_ACTIVE_STATUSES, SINGLETON_ADMITTED_TAG, SINGLETON_LOCK_CHUNK, SINGLETON_RESERVED_TAGS, SINGLETON_TRACKED_TAG, STATE_STORE, STATE_STORE_CANONICAL, SUMMARY_CHILD_LIMIT, type ScalarAttributeFilter, type ScheduleAction, ScheduleAlreadyExistsError, 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 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, announcementsOf, anyCheckpointName, applyAttributeQuery, assertConcurrency, assertRoutes, assertSingleDurableCopy, attributeColumnFor, attributeOperand, attributePredicateOperands, axisIsRunColumn, bindWorkflowClass, breakpointToken, bufferedEventReaches, buildWorkflowDirectory, canRoute, capableWorkers, carriesLifecyclePending, checkpointNameKind, checkpointStatsOf, childIdsOf, classifyWaiterToken, clearDurableExecutionWrappers, clearTerminalSingletonAdmission, coalescedSubscribersOf, codeAndDetails, codeOf, collectMetrics, concurrencyTag, controlPlaneAttribution, controlPlaneDescriptor, countRuns, coveredTokens, createStepLogger, currentStep, currentStepScope, currentWorkflowCtx, debug, describeWorker, descriptorHash, detailsOf, durableCopies, error, etagMatches, eventMatchOf, eventMatches, eventNameOf, eventPrefix, eventToken, extendEtag, facetOrigin, fanPageBounds, fanPageEtag, findStalledRuns, foldedCount, getRunsByIds, grantsClientTenant, handoffHandlerId, handoffName, hasDurableExecutionWrappers, heartbeatStatus, hmacTenantVerifier, indexWaitersByRun, info, inheritTenant, isAnyCheckpoint, isAnyMember, isEngineMintedTag, isEventToken, isFailedMember, isLegacyDescriptor, isLifecycleTag, isNonEmptyRunScope, isRemoteEvent, isWorkflowControlFlowSignal, legacySingletonHolders, lifecycleDeliveriesOf, lifecycleEventName, lifecycleEventOf, lifecycleKindOf, lifecycleRegistryNamespace, lifecycleRegistryRunId, lifecycleRegistrySubscriptions, lifecycleRunId, lifecycleSourceOf, lifecycleTraceparentOf, listSignalWaitersOfRuns, liveHandoff, log, markRemoteEvent, matchesAttributes, matchesTenantPredicates, mergeRunFacetRows, mergeRunValueFacetRows, missingCapabilities, negotiate, nextCronFireMs, nextRRuleFireMs, nextScheduleFireAt, normalizeAttributeRows, normalizeDescriptor, observedAnnouncements, onErrorRunId, owedSubscribersOf, pageFan, pageFanFromStore, parentRunIdOf, parseDuration, parseLifecycleEvent, parseRRule, parseWebhookToken, partitionOfToken, planDispatch, poolNamespace, prevCronFireMs, prevRRuleFireMs, queryCheckpointsOf, readBufferedEvent, readRunsByIds, readSearchAttributes, requiredCapabilities, resolveConcurrency, resolveRouting, resolveRunWaiting, resolveTenantToken, resolveWireTenant, retentionKeeps, retiredHandoffName, routeFor, rowTenant, runCompletedEvent, runDetailEtag, runDurableExecution, runFailedEvent, runInStepLogger, runInStepScope, runInWorkflowCtx, runOutsideWorkflowCtx, runSchedules, runStepHandler, runTraceId, runValueFacetsFromRuns, runWaitPrefix, runWaitTargetOf, runWaitToken, sanitizeQueueToken, scheduleRunIdAt, scheduledRunId, scopeBufferedEvent, scopeTenantQuery, sealDurableCopies, settleResultsWithPlainCalls, signTenantToken, singletonAdmissionDenialPatch, singletonAdmissionTags, singletonClaimantIds, sqlComparator, stepConfigOf, stepId, stepNameOf, sub, subEvent, subProcess, summarizeFan, summarizeRunFromStore, summarizeTimeline, tenantAppOf, tenantGroup, tenantIdsFor, tenantVisible, toEventSubscription, traceIdOfTraceparent, triggerFailedSubscribersOf, triggeredRunsOf, triggeredSubscribersOf, useDurableExecution, verifyWireTenant, warn, withSingletonTracked, withoutSingletonMarkers, workflowName };
|
|
10116
|
+
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 AnnouncementEvidence, type AttributeFilter, type AttributeOp, type AttributePredicateOperand, type AttributeValue, type AttributedEngineEvent, type BackoffStrategy, type BlockedDispatch, type BlockedResolution, type BufferedSignalRow, CHILD_EDGE_PREFIXES, CONTROL_FLOW_SIGNAL, CORE_ORIGIN, CURRENT_PROTOCOL_VERSION, type CapabilityRequirement, type CheckpointAggregatingStore, type CheckpointNameKind, type CheckpointQuery, type CheckpointStat, type ChildCallOptions, type ChildWait, CodecStateStore, type CodecStateStoreOptions, type ConcurrencyConfig, ConcurrencyLimitError, type ConcurrencyQuota, type ConsoleCapabilities, type ConsoleFederation, ContinueAsNew, type ControlMessage, type ControlPlane, DEFAULT_ANNOUNCED_SCHEDULE_GRACE_MS, DEFAULT_CONCURRENCY_STATUSES, DEFAULT_PARTITION, DEFAULT_STALLED_AFTER_MS, DURABLE_OPTIONS, DURABLE_OPTIONS_CANONICAL, DURABLE_STEP_CONFIG, DURABLE_STEP_NAME, type Disagreement, type DispatchDiagnostics, type DispatchPlan, DuplicateDurableCopyError, type DurableCopy, type DurableExecution, type DurableExecutionWrapper, type DurableTopology, type DurableWebhook, DurableWorkflow, type DynamicWorkflowCtx, ENGINE_MINTED_TAG_PREFIXES, ENTITY_WORKFLOW, EVENT_BUFFER_SCAN_LIMIT, EVENT_TOKEN_PREFIX, type EngineEvent, type EngineEventType, type EngineListener, type EngineTenancy, Entities, type EntityConfig, type EntityHandler, type EntityHost, type EntityWorkflowHost, EventAccumulators, type EventBatchConfig, type EventSubscription, FAN_SUMMARY_FAILURES, type FanJoin, type FanPage, type FanPageQuery, type FanSummary, type FanWait, FatalError, type FindStalledRunsOptions, GatherError, type GatherItemFailure, type GroupHealth, HANDOFF_SEQ_BASE, type Heartbeat, type HeartbeatSighting, type HeartbeatStatus, type HistoryEvent, InMemoryAdmissionBackend, InMemoryRunQueue, InMemoryStateStore, InMemoryTransport, type InferSearchAttributes, LEGACY_V1_CAPABILITIES, LEGACY_V1_PROTOCOL, LIFECYCLE_COALESCED_TAG_PREFIX, LIFECYCLE_HEAL_WINDOW_MS, LIFECYCLE_ORPHAN_MS, LIFECYCLE_OWED_TAG_PREFIX, LIFECYCLE_PENDING_TAG, LIFECYCLE_REGISTRY_HEARTBEAT_MS, LIFECYCLE_REGISTRY_STALE_MS, LIFECYCLE_REGISTRY_TAG, LIFECYCLE_REGISTRY_TTL_MS, LIFECYCLE_REGISTRY_WORKFLOW, LIFECYCLE_TRACE_TAG_PREFIX, LIFECYCLE_TRIGGERED_TAG_PREFIX, LIFECYCLE_TRIGGER_FAILED_TAG_PREFIX, type LifecycleDelivery, type LifecycleDeliveryState, type LifecycleEventOf, type LifecycleKind, type LifecycleRegistryEntry, type LifecycleSource, type LifecycleSubscriptionLink, type ListStalledRunsOptions, type MetricsCollector, type MetricsSnapshot, NO_LIVE_WORKER, type NamedTransport, type NegotiateOptions, type NegotiationOutcome, type NegotiationReason, type NegotiationResult, NestedWorkflowCallError, NonDeterminismError, type OnErrorInput, type OnErrorRoute, type OnEventEntry, type OwnedLeaseReclaim, PARENT_CLOSE_TAG_PREFIX, type ParentClosePolicy, type ParsedRRule, type PartitionSighting, type PayloadCodec, type QueueConfig, QueueController, REMOTE_EVENT, RUN_HISTORY_FIXTURE_VERSION, RUN_VALUE_FACET_LIMIT, RUN_VALUE_FACET_SCAN, RUN_WAIT_TOKEN_PREFIX, type RawWorkerDescriptor, RemoteStepError, RemoteStepTimeout, type RemoteTask, RemoteWorkflowExecutor, RemoteWorkflowTimeout, type RepublishLifecycleResult, type RepublishLifecycleTarget, type RetentionPolicy, type RoutableDispatch, type RoutableResolution, type RoutingResolution, type RunAppAttribution, RunAppStamper, type RunAppTopologyOptions, type RunAttributeRow, type RunConsumerOptions, type RunDetail, type RunDetailOptions, type RunDispatch, type RunDispatcher, type RunFacetQuery, type RunFacetRow, RunGateway, type RunListItem, type RunQuery, type RunQueueOptions, type RunReply, type RunReplyResult, type RunRequest, type RunRequestKind, type RunResult, type RunSchedulesOptions, type RunScope, type RunStatus, type RunTenant, type RunValueAxis, type RunValueFacetOptions, type RunValueFacetOrder, type RunValueFacetRow, type RunWaitLink, type RunWaiting, SINGLETON_ACTIVE_STATUSES, SINGLETON_ADMITTED_TAG, SINGLETON_LOCK_CHUNK, SINGLETON_RESERVED_TAGS, SINGLETON_TRACKED_TAG, STATE_STORE, STATE_STORE_CANONICAL, SUMMARY_CHILD_LIMIT, type ScalarAttributeFilter, type ScheduleAction, ScheduleAlreadyExistsError, type ScheduleAnnouncement, ScheduleClient, type ScheduleClientOptions, type ScheduleDescription, type ScheduleHost, type ScheduleListQuery, ScheduleNotFoundError, type ScheduleOptions, type ScheduleQuery, type ScheduleRecord, type ScheduleTickEngine, type ScheduledWorkflow, type SchemaIssue, type SchemaValidationCode, SchemaValidationError, type SearchAttributes, type SearchAttributesSchema, type Settled, type SignalOptions, SignalTimeoutError, type SignalWaiter, type SingletonConfig, SingletonQueueFullError, type StalePendingStep, type StalledRunInfo, StandardSchemaV1, type StartOptions, type StartRunMessage, type StateStore, type StepCheckpoint, type StepConfig, type StepDef, type StepDispatchOpts, type StepError, type StepEvent, type StepHandler, type StepInterceptor, type StepInvocation, type StepKind, type StepLogger, type StepOptions, type StepRef, type StepResult, type StepResultSettlement, type StepScope, type StepSettlement, type StepUndo, type StoreTransaction, type SubProcessHandle, TERMINAL_RUN_STATUSES, TRANSPORT, TRANSPORT_CANONICAL, type TenantEvent, type TenantFilter, type TenantRow, type TenantTokenSource, type TenantVerifier, type Transport, type UndoOf, type UpdateResult, type UpdateValidator, VERSION_UNDECLARED_TAG, type VerifiedTenant, WORKFLOW_NAME_KEY, type WaitAnyCondition, type WaitAnyOutcome, type WaitAnyResult, type WaitCondition, type WaitConditionSpec, type WaitForRunOptions, type WireDates, type WorkerAdjust, type WorkerConcurrencyStatus, type WorkerDescriptor, type WorkerHeartbeat, type WorkerLifecycle, type WorkerStatus, type WorkflowAnnouncement, WorkflowBlocked, type WorkflowClass, type WorkflowCommand, type WorkflowCtx, type WorkflowDecision, type WorkflowDirectory, WorkflowEngine, type WorkflowEngineDeps, type WorkflowExecutor, type WorkflowHandler, type WorkflowInputOf, type WorkflowLifecycleEvent, type WorkflowLifecycleLinks, WorkflowNotRegistered, type WorkflowOutputOf, type WorkflowRef, type WorkflowRegistration, type WorkflowRun, type WorkflowStartClient, type WorkflowStepEvent, WorkflowSuspended, type WorkflowTask, acceptingSubscription, accumulatorRunId, aggregateAnnouncements, aggregatesCheckpoints, announcedScheduleId, announcementsOf, anyCheckpointName, applyAttributeQuery, assertConcurrency, assertRoutes, assertSingleDurableCopy, attributeColumnFor, attributeOperand, attributePredicateOperands, axisIsRunColumn, bindWorkflowClass, breakpointToken, bufferedEventReaches, buildWorkflowDirectory, canRoute, capableWorkers, carriesLifecyclePending, checkpointNameKind, checkpointStatsOf, childIdsOf, classifyWaiterToken, clearDurableExecutionWrappers, clearTerminalSingletonAdmission, coalescedSubscribersOf, codeAndDetails, codeOf, collectMetrics, concurrencyTag, controlPlaneAttribution, controlPlaneDescriptor, countRuns, coveredTokens, createStepLogger, currentStep, currentStepScope, currentWorkflowCtx, debug, describeWorker, descriptorHash, detailsOf, durableCopies, error, etagMatches, eventMatchOf, eventMatches, eventNameOf, eventPrefix, eventToken, extendEtag, facetOrigin, fanPageBounds, fanPageEtag, findStalledRuns, foldedCount, getRunsByIds, grantsClientTenant, handoffHandlerId, handoffName, hasDurableExecutionWrappers, heartbeatStatus, hmacTenantVerifier, indexWaitersByRun, info, inheritTenant, isAnyCheckpoint, isAnyMember, isEngineMintedTag, isEventToken, isFailedMember, isLegacyDescriptor, isLifecycleTag, isNonEmptyRunScope, isRemoteEvent, isWorkflowControlFlowSignal, legacySingletonHolders, lifecycleDeliveriesOf, lifecycleEventName, lifecycleEventOf, lifecycleKindOf, lifecycleRegistryNamespace, lifecycleRegistryRunId, lifecycleRegistrySubscriptions, lifecycleRunId, lifecycleSourceOf, lifecycleTraceparentOf, listSignalWaitersOfRuns, liveHandoff, log, markRemoteEvent, matchesAttributes, matchesTenantPredicates, mergeRunFacetRows, mergeRunValueFacetRows, missingCapabilities, negotiate, nextCronFireMs, nextRRuleFireMs, nextScheduleFireAt, normalizeAttributeRows, normalizeDescriptor, observedAnnouncements, onErrorRunId, owedSubscribersOf, pageFan, pageFanFromStore, parentRunIdOf, parseDuration, parseLifecycleEvent, parseRRule, parseWebhookToken, partitionOfToken, planDispatch, poolNamespace, prevCronFireMs, prevRRuleFireMs, queryCheckpointsOf, readBufferedEvent, readRunsByIds, readSearchAttributes, requiredCapabilities, resolveConcurrency, resolveRouting, resolveRunWaiting, resolveTenantToken, resolveWireTenant, retentionKeeps, retiredHandoffName, routeFor, rowTenant, runCompletedEvent, runDetailEtag, runDurableExecution, runFailedEvent, runInStepLogger, runInStepScope, runInWorkflowCtx, runOutsideWorkflowCtx, runSchedules, runStepHandler, runTraceId, runValueFacetsFromRuns, runWaitPrefix, runWaitTargetOf, runWaitToken, sanitizeQueueToken, scheduleRunIdAt, scheduledRunId, scopeBufferedEvent, scopeTenantQuery, sealDurableCopies, settleResultsWithPlainCalls, signTenantToken, singletonAdmissionDenialPatch, singletonAdmissionTags, singletonClaimantIds, sqlComparator, stepConfigOf, stepId, stepNameOf, sub, subEvent, subProcess, summarizeFan, summarizeRunFromStore, summarizeTimeline, tenantAppOf, tenantGroup, tenantIdsFor, tenantVisible, toEventSubscription, traceIdOfTraceparent, triggerFailedSubscribersOf, triggeredRunsOf, triggeredSubscribersOf, useDurableExecution, verifyWireTenant, warn, withSingletonTracked, withoutSingletonMarkers, workflowName };
|
package/dist/index.d.ts
CHANGED
|
@@ -267,6 +267,41 @@ interface WorkflowRegistration {
|
|
|
267
267
|
*/
|
|
268
268
|
subscribes?: string[];
|
|
269
269
|
}
|
|
270
|
+
/**
|
|
271
|
+
* One recurring start a tenant app declares (its `schedules` module option), as its worker
|
|
272
|
+
* ANNOUNCES it to the control plane, which adopts it as a persisted schedule and fires it (see
|
|
273
|
+
* `WorkflowEngine.syncAnnouncedSchedules`). JSON-safe: a workflow class is announced by its name.
|
|
274
|
+
*/
|
|
275
|
+
interface AnnouncedSchedule {
|
|
276
|
+
/** The schedule's key in the app. The control plane's schedule id is `app:<namespace>:<key>`. */
|
|
277
|
+
key: string;
|
|
278
|
+
/** Registered workflow name. */
|
|
279
|
+
workflow: string;
|
|
280
|
+
/** The input every run starts with. */
|
|
281
|
+
input?: unknown;
|
|
282
|
+
/** Fixed interval in ms. Exactly one of `everyMs` and `cron`. */
|
|
283
|
+
everyMs?: number;
|
|
284
|
+
/** Cron expression (5 fields, or 6 with leading seconds). */
|
|
285
|
+
cron?: string;
|
|
286
|
+
/** IANA timezone the cron is evaluated in. Default UTC. */
|
|
287
|
+
timezone?: string;
|
|
288
|
+
/** Declared paused. */
|
|
289
|
+
paused?: boolean;
|
|
290
|
+
/** `'skip'`: no new window while the previous run is still in flight. Default `'allow'`. */
|
|
291
|
+
overlap?: 'allow' | 'skip';
|
|
292
|
+
/** Delay each fire by a stable offset of up to this many ms. */
|
|
293
|
+
jitterMs?: number;
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* The schedules a tenant worker announces, and the wire tenant they belong to: the partition, or
|
|
297
|
+
* the signed tenant token when the app has one (verified by the control plane exactly like a
|
|
298
|
+
* start-run's `tenant`). `items: []` is a statement too ("this app declares no schedules"), which is
|
|
299
|
+
* what lets the control plane withdraw a schedule the app stopped declaring.
|
|
300
|
+
*/
|
|
301
|
+
interface ScheduleAnnouncement {
|
|
302
|
+
tenant: string;
|
|
303
|
+
items: AnnouncedSchedule[];
|
|
304
|
+
}
|
|
270
305
|
/**
|
|
271
306
|
* A worker's (or control-plane's) advertised identity, wire-protocol support, feature capabilities
|
|
272
307
|
* and registered handlers. Published on startup + on change (design §7.2) and consumed by
|
|
@@ -312,6 +347,13 @@ interface WorkerDescriptor {
|
|
|
312
347
|
* that fails at run time.
|
|
313
348
|
*/
|
|
314
349
|
registrations?: WorkflowRegistration[];
|
|
350
|
+
/**
|
|
351
|
+
* The recurring starts this app declares (see {@link ScheduleAnnouncement}). OPTIONAL and additive:
|
|
352
|
+
* absent = this SDK does not announce schedules (a control plane then neither adopts nor withdraws
|
|
353
|
+
* any for it); a control plane that predates the field ignores it. Rides the descriptor so it
|
|
354
|
+
* inherits its liveness: the control plane only reconciles against what LIVE workers announce.
|
|
355
|
+
*/
|
|
356
|
+
schedules?: ScheduleAnnouncement;
|
|
315
357
|
/** Optional routing partition (queue/group sharding). */
|
|
316
358
|
partition?: string;
|
|
317
359
|
/** Optional tenant namespace this instance serves. */
|
|
@@ -435,6 +477,8 @@ declare function describeWorker(opts: {
|
|
|
435
477
|
* the descriptor entirely when absent or empty, so a worker with nothing to announce keeps the
|
|
436
478
|
* pre-registrations bytes (and therefore the pre-registrations hash). */
|
|
437
479
|
registrations?: readonly WorkflowRegistration[] | undefined;
|
|
480
|
+
/** The schedules this app announces. Omitted from the descriptor when absent; `items: []` is kept. */
|
|
481
|
+
schedules?: ScheduleAnnouncement | undefined;
|
|
438
482
|
startedAt: number;
|
|
439
483
|
partition?: string | undefined;
|
|
440
484
|
namespace?: string | undefined;
|
|
@@ -2099,6 +2143,12 @@ declare const VERSION_UNDECLARED_TAG = "version:undeclared";
|
|
|
2099
2143
|
* consumer boots. Cancel it to drop it.
|
|
2100
2144
|
*/
|
|
2101
2145
|
declare const NO_LIVE_WORKER = "no_live_worker";
|
|
2146
|
+
/**
|
|
2147
|
+
* How long an adopted tenant schedule may go unannounced by every live worker of its app before the
|
|
2148
|
+
* control plane pauses it (see `WorkflowEngine.syncAnnouncedSchedules`). Long enough to ride out a
|
|
2149
|
+
* rolling deploy; a schedule is never deleted for missing.
|
|
2150
|
+
*/
|
|
2151
|
+
declare const DEFAULT_ANNOUNCED_SCHEDULE_GRACE_MS: number;
|
|
2102
2152
|
interface WorkflowEngineDeps {
|
|
2103
2153
|
store: StateStore;
|
|
2104
2154
|
/** A single task transport. Shorthand for a one-entry `transports` pool (id `default`). */
|
|
@@ -2422,6 +2472,10 @@ declare class WorkflowEngine {
|
|
|
2422
2472
|
private readonly remoteRedispatchMax;
|
|
2423
2473
|
/** How long a `blocked` run waits before the recovery poll re-checks the live fleet (design §7.5). */
|
|
2424
2474
|
private readonly blockedPollMs;
|
|
2475
|
+
/** Verifies the wire tenant of a start-run, and of a worker's schedule announcement. */
|
|
2476
|
+
private readonly verifyTenant;
|
|
2477
|
+
/** Wire tenants whose schedule announcement failed verification, warned about once. */
|
|
2478
|
+
private readonly rejectedScheduleTenants;
|
|
2425
2479
|
private readonly workerDescriptorCacheMs;
|
|
2426
2480
|
private readonly descriptorCache;
|
|
2427
2481
|
/** This engine's control-plane handshake descriptor — negotiated against each worker (design §7.3). */
|
|
@@ -2627,11 +2681,13 @@ declare class WorkflowEngine {
|
|
|
2627
2681
|
* The earliest known time (epoch ms) the poll has work, if it is at or before `byMs`: this
|
|
2628
2682
|
* namespace's next due timer (`listDueTimers` up to `byMs`, limit one: it returns the most overdue
|
|
2629
2683
|
* first), the next `blocked` run's recovery poll, and with `persistedSchedules` the next persisted
|
|
2630
|
-
* schedule to fire (see {@link ScheduleClient.nextFireAt}
|
|
2684
|
+
* schedule to fire (see {@link ScheduleClient.nextFireAt}; with `announcedSchedules` alone, the next
|
|
2685
|
+
* schedule adopted from a tenant). `undefined` when nothing is due by
|
|
2631
2686
|
* then. A poller reads it before waiting longer than its tick, so the wait never outlasts a timer.
|
|
2632
2687
|
*/
|
|
2633
2688
|
nextDueAt(byMs: number, opts?: {
|
|
2634
2689
|
persistedSchedules?: boolean;
|
|
2690
|
+
announcedSchedules?: boolean;
|
|
2635
2691
|
}): Promise<number | undefined>;
|
|
2636
2692
|
/**
|
|
2637
2693
|
* Pick up a run another instance announced as enqueued: run it here if it is still `pending`.
|
|
@@ -4141,6 +4197,23 @@ declare class WorkflowEngine {
|
|
|
4141
4197
|
*
|
|
4142
4198
|
* Workflows only, and deliberately: see the "steps are out of scope" note in `handshake/announced`.
|
|
4143
4199
|
*/
|
|
4200
|
+
/**
|
|
4201
|
+
* Adopt the schedules tenant apps announce (their `schedules` module option, carried on their live
|
|
4202
|
+
* workers' descriptors) as persisted schedules, and withdraw the ones an app stopped announcing.
|
|
4203
|
+
* The control plane's timer poll calls it; {@link ScheduleClient.tick} fires them.
|
|
4204
|
+
*
|
|
4205
|
+
* Per app (the namespace its announcement's verified `tenant` maps to, as for a start-run): the
|
|
4206
|
+
* schedules announced by its live workers, where two workers disagree on a key the one that
|
|
4207
|
+
* started last (its deploy is the newer one) wins. An app with no live worker that states its
|
|
4208
|
+
* schedules is left alone, so its schedules keep firing into runs that wait for a worker. See
|
|
4209
|
+
* {@link ScheduleClient.syncAnnounced} for the reconciliation rule and `graceMs` (default 10
|
|
4210
|
+
* minutes). A namespaced engine adopts only its own namespace's. Nothing without a store that
|
|
4211
|
+
* persists schedules or a transport that reads worker descriptors.
|
|
4212
|
+
*/
|
|
4213
|
+
syncAnnouncedSchedules(opts?: {
|
|
4214
|
+
graceMs?: number;
|
|
4215
|
+
nowMs?: number;
|
|
4216
|
+
}): Promise<Map<string, AnnouncedScheduleSync>>;
|
|
4144
4217
|
announcedWorkflows(): Promise<AnnouncedWorkflow[]>;
|
|
4145
4218
|
/**
|
|
4146
4219
|
* {@link announcedWorkflows}, plus the thing a list of workflows can never say: why it is the
|
|
@@ -4956,9 +5029,22 @@ interface ScheduleDescription {
|
|
|
4956
5029
|
/** The customer the schedule and its runs belong to, when it has one. */
|
|
4957
5030
|
tenantId?: string | undefined;
|
|
4958
5031
|
tenantKind?: string | undefined;
|
|
5032
|
+
/**
|
|
5033
|
+
* Set on a schedule a tenant app ANNOUNCED (its `schedules` module option) and the control plane
|
|
5034
|
+
* adopted: the key the app declares it under. Its `namespace` is the app (partition).
|
|
5035
|
+
*/
|
|
5036
|
+
announcedKey?: string | undefined;
|
|
5037
|
+
/** An announced schedule that no live worker of its app announces any more: since when. */
|
|
5038
|
+
unannouncedSince?: Date | undefined;
|
|
5039
|
+
/** When the control plane paused it for staying unannounced past the grace period. */
|
|
5040
|
+
withdrawnAt?: Date | undefined;
|
|
4959
5041
|
createdAt: Date;
|
|
4960
5042
|
updatedAt: Date;
|
|
4961
5043
|
}
|
|
5044
|
+
/** The tag on every schedule adopted from a tenant's announcement (and on the runs it starts). */
|
|
5045
|
+
declare const ANNOUNCED_SCHEDULE_TAG = "schedule:announced";
|
|
5046
|
+
/** The control plane's schedule id for the schedule `key` announced by the app on `namespace`. */
|
|
5047
|
+
declare function announcedScheduleId(namespace: string, key: string): string;
|
|
4962
5048
|
/** Filter for `engine.schedules.list`. */
|
|
4963
5049
|
type ScheduleListQuery = Omit<ScheduleQuery, 'dueBy'>;
|
|
4964
5050
|
/** Thrown by `engine.schedules.create` when the id is taken (use `upsert` to replace). */
|
|
@@ -4971,9 +5057,30 @@ declare class ScheduleNotFoundError extends Error {
|
|
|
4971
5057
|
readonly scheduleId: string;
|
|
4972
5058
|
constructor(scheduleId: string);
|
|
4973
5059
|
}
|
|
5060
|
+
/** What {@link ScheduleClient.syncAnnounced} did to a namespace's adopted schedules. */
|
|
5061
|
+
interface AnnouncedScheduleSync {
|
|
5062
|
+
/** Created, or re-applied because the announced definition changed. */
|
|
5063
|
+
adopted: string[];
|
|
5064
|
+
/** Announced again after missing (and resumed, when it had been withdrawn). */
|
|
5065
|
+
restored: string[];
|
|
5066
|
+
/** Missing from the announcement for the first time: the grace period starts. */
|
|
5067
|
+
missing: string[];
|
|
5068
|
+
/** Paused because it stayed unannounced past the grace period. */
|
|
5069
|
+
withdrawn: string[];
|
|
5070
|
+
/** Announced, but the definition does not evaluate (bad cron, both or neither cadence). */
|
|
5071
|
+
invalid: {
|
|
5072
|
+
key: string;
|
|
5073
|
+
error: string;
|
|
5074
|
+
}[];
|
|
5075
|
+
}
|
|
4974
5076
|
/** The engine surface the schedule client drives. */
|
|
4975
5077
|
interface ScheduleHost {
|
|
4976
5078
|
start(workflow: string, input: unknown, runId: string, opts?: StartOptions): Promise<RunResult>;
|
|
5079
|
+
/**
|
|
5080
|
+
* The tenant start path, used to fire an announced schedule: a workflow no live worker serves yet
|
|
5081
|
+
* is parked `blocked` (`no_live_worker`) until one is, instead of throwing. Absent = `start`.
|
|
5082
|
+
*/
|
|
5083
|
+
startParked?(workflow: string, input: unknown, runId: string, opts?: StartOptions): Promise<RunResult>;
|
|
4977
5084
|
getRun(runId: string): Promise<WorkflowRun | null>;
|
|
4978
5085
|
/** True once the engine has begun shutting down; `tick` fires nothing more after that. */
|
|
4979
5086
|
isDraining?(): boolean;
|
|
@@ -5037,21 +5144,60 @@ declare class ScheduleClient {
|
|
|
5037
5144
|
*/
|
|
5038
5145
|
trigger(id: string): Promise<RunResult>;
|
|
5039
5146
|
/**
|
|
5040
|
-
*
|
|
5147
|
+
* Start one run of `record`: through the tenant start path for an announced schedule (its run waits
|
|
5148
|
+
* `blocked` for a live worker of its app instead of failing), else a plain `start`.
|
|
5149
|
+
*/
|
|
5150
|
+
private startFor;
|
|
5151
|
+
/**
|
|
5152
|
+
* Fire every due schedule (in this engine's namespace; all namespaces for an operator engine; only
|
|
5153
|
+
* those carrying `opts.tag` when given):
|
|
5041
5154
|
* start its window's run and advance it to the next window. Called by the NestJS timer poller on
|
|
5042
5155
|
* each tick when `persistedSchedules` is on; call it yourself from any other driver. Returns the
|
|
5043
5156
|
* run ids started (or re-found, for an idempotent re-fire).
|
|
5044
5157
|
*/
|
|
5045
|
-
tick(nowMs?: number
|
|
5158
|
+
tick(nowMs?: number, opts?: {
|
|
5159
|
+
tag?: string;
|
|
5160
|
+
}): Promise<string[]>;
|
|
5046
5161
|
/**
|
|
5047
5162
|
* When {@link tick} next has a schedule to fire, if one is due by `byMs`: the earliest `nextFireAt`
|
|
5048
|
-
* of the unpaused schedules (of this engine's namespace
|
|
5163
|
+
* of the unpaused schedules (of this engine's namespace, carrying `opts.tag` when given) due by
|
|
5164
|
+
* then, else `undefined`. One indexed
|
|
5049
5165
|
* read (the due-schedule scan `tick` makes, with a later bound and a limit of one). A store that
|
|
5050
5166
|
* does not persist schedules has none.
|
|
5051
5167
|
*/
|
|
5052
|
-
nextFireAt(byMs: number
|
|
5168
|
+
nextFireAt(byMs: number, opts?: {
|
|
5169
|
+
tag?: string;
|
|
5170
|
+
}): Promise<number | undefined>;
|
|
5053
5171
|
/** Fire one due schedule and advance it. Returns the run id started, if any. */
|
|
5054
5172
|
private fire;
|
|
5173
|
+
/**
|
|
5174
|
+
* An announced schedule whose previous run is still parked waiting for a live worker of its app
|
|
5175
|
+
* (the app is down): this window is folded into that run instead of parking one more. However long
|
|
5176
|
+
* the app is down, it finds at most one run per schedule waiting when it comes back, the same
|
|
5177
|
+
* bound `catchup: 'latest'` puts on windows missed while no scheduler polled.
|
|
5178
|
+
*/
|
|
5179
|
+
private waitingForWorker;
|
|
5180
|
+
/**
|
|
5181
|
+
* Reconcile the schedules adopted from one app (`namespace`) with what its LIVE workers announce
|
|
5182
|
+
* now (`items`, one per key; the caller resolved disagreeing workers). The rule:
|
|
5183
|
+
* - an announced key with no schedule yet is created (id {@link announcedScheduleId}, tagged
|
|
5184
|
+
* {@link ANNOUNCED_SCHEDULE_TAG}, `catchup: 'latest'`); one whose definition changed is
|
|
5185
|
+
* re-applied like `upsert` (its history kept, its next fire recomputed from now). An equal
|
|
5186
|
+
* definition writes nothing, so any number of replicas announcing the same set is a no-op;
|
|
5187
|
+
* - a pause or resume made from the console survives: a re-applied definition keeps the current
|
|
5188
|
+
* paused state, unless the app's own declared `paused` changed;
|
|
5189
|
+
* - an adopted schedule the app no longer announces is marked missing, and paused ("withdrawn")
|
|
5190
|
+
* once it has stayed missing for `graceMs`. It is never deleted: its history stays, and an app
|
|
5191
|
+
* that announces it again (a rollback) gets it back, resumed unless an operator had paused it.
|
|
5192
|
+
*
|
|
5193
|
+
* Call it only for an app that has at least one live worker stating its schedules: with none (the
|
|
5194
|
+
* app is down, or runs an SDK that does not announce schedules), nothing is withdrawn, and its
|
|
5195
|
+
* schedules keep firing into runs that wait for a worker.
|
|
5196
|
+
*/
|
|
5197
|
+
syncAnnounced(namespace: string, items: readonly AnnouncedSchedule[], opts: {
|
|
5198
|
+
nowMs?: number;
|
|
5199
|
+
graceMs: number;
|
|
5200
|
+
}): Promise<AnnouncedScheduleSync>;
|
|
5055
5201
|
/** `overlap: 'skip'` and the previous run of this schedule is still in flight. */
|
|
5056
5202
|
private overlapping;
|
|
5057
5203
|
private mustGet;
|
|
@@ -9967,4 +10113,4 @@ declare function prevRRuleFireMs(rule: ParsedRRule, atMs: number): number | null
|
|
|
9967
10113
|
*/
|
|
9968
10114
|
declare function settleResultsWithPlainCalls(store: Pick<StateStore, 'getRun' | 'getCheckpoint'> & Partial<Pick<StateStore, 'getRuns' | 'getCheckpointsForSettle' | 'getCheckpoints' | 'settleCheckpointsIfPending'>>, results: StepResultSettlement[]): Promise<(StepCheckpoint | null)[]>;
|
|
9969
10115
|
|
|
9970
|
-
export { ACCUMULATOR_SEEN_MAX, ANY_WAIT_GROUP, type AccumulatorHost, type AccumulatorStartOptions, 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 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_CONCURRENCY_STATUSES, DEFAULT_PARTITION, DEFAULT_STALLED_AFTER_MS, DURABLE_OPTIONS, DURABLE_OPTIONS_CANONICAL, DURABLE_STEP_CONFIG, DURABLE_STEP_NAME, type Disagreement, type DispatchDiagnostics, type DispatchPlan, DuplicateDurableCopyError, type DurableCopy, type DurableExecution, type DurableExecutionWrapper, type DurableTopology, type DurableWebhook, DurableWorkflow, type DynamicWorkflowCtx, ENGINE_MINTED_TAG_PREFIXES, ENTITY_WORKFLOW, EVENT_BUFFER_SCAN_LIMIT, EVENT_TOKEN_PREFIX, type EngineEvent, type EngineEventType, type EngineListener, type EngineTenancy, Entities, type EntityConfig, type EntityHandler, type EntityHost, type EntityWorkflowHost, EventAccumulators, type EventBatchConfig, type EventSubscription, FAN_SUMMARY_FAILURES, type FanJoin, type FanPage, type FanPageQuery, type FanSummary, type FanWait, FatalError, type FindStalledRunsOptions, GatherError, type GatherItemFailure, type GroupHealth, HANDOFF_SEQ_BASE, type Heartbeat, type HeartbeatSighting, type HeartbeatStatus, type HistoryEvent, InMemoryAdmissionBackend, InMemoryRunQueue, InMemoryStateStore, InMemoryTransport, type InferSearchAttributes, LEGACY_V1_CAPABILITIES, LEGACY_V1_PROTOCOL, LIFECYCLE_COALESCED_TAG_PREFIX, LIFECYCLE_HEAL_WINDOW_MS, LIFECYCLE_ORPHAN_MS, LIFECYCLE_OWED_TAG_PREFIX, LIFECYCLE_PENDING_TAG, LIFECYCLE_REGISTRY_HEARTBEAT_MS, LIFECYCLE_REGISTRY_STALE_MS, LIFECYCLE_REGISTRY_TAG, LIFECYCLE_REGISTRY_TTL_MS, LIFECYCLE_REGISTRY_WORKFLOW, LIFECYCLE_TRACE_TAG_PREFIX, LIFECYCLE_TRIGGERED_TAG_PREFIX, LIFECYCLE_TRIGGER_FAILED_TAG_PREFIX, type LifecycleDelivery, type LifecycleDeliveryState, type LifecycleEventOf, type LifecycleKind, type LifecycleRegistryEntry, type LifecycleSource, type LifecycleSubscriptionLink, type ListStalledRunsOptions, type MetricsCollector, type MetricsSnapshot, NO_LIVE_WORKER, type NamedTransport, type NegotiateOptions, type NegotiationOutcome, type NegotiationReason, type NegotiationResult, NestedWorkflowCallError, NonDeterminismError, type OnErrorInput, type OnErrorRoute, type OnEventEntry, type OwnedLeaseReclaim, PARENT_CLOSE_TAG_PREFIX, type ParentClosePolicy, type ParsedRRule, type PartitionSighting, type PayloadCodec, type QueueConfig, QueueController, REMOTE_EVENT, RUN_HISTORY_FIXTURE_VERSION, RUN_VALUE_FACET_LIMIT, RUN_VALUE_FACET_SCAN, RUN_WAIT_TOKEN_PREFIX, type RawWorkerDescriptor, RemoteStepError, RemoteStepTimeout, type RemoteTask, RemoteWorkflowExecutor, RemoteWorkflowTimeout, type RepublishLifecycleResult, type RepublishLifecycleTarget, type RetentionPolicy, type RoutableDispatch, type RoutableResolution, type RoutingResolution, type RunAppAttribution, RunAppStamper, type RunAppTopologyOptions, type RunAttributeRow, type RunConsumerOptions, type RunDetail, type RunDetailOptions, type RunDispatch, type RunDispatcher, type RunFacetQuery, type RunFacetRow, RunGateway, type RunListItem, type RunQuery, type RunQueueOptions, type RunReply, type RunReplyResult, type RunRequest, type RunRequestKind, type RunResult, type RunSchedulesOptions, type RunScope, type RunStatus, type RunTenant, type RunValueAxis, type RunValueFacetOptions, type RunValueFacetOrder, type RunValueFacetRow, type RunWaitLink, type RunWaiting, SINGLETON_ACTIVE_STATUSES, SINGLETON_ADMITTED_TAG, SINGLETON_LOCK_CHUNK, SINGLETON_RESERVED_TAGS, SINGLETON_TRACKED_TAG, STATE_STORE, STATE_STORE_CANONICAL, SUMMARY_CHILD_LIMIT, type ScalarAttributeFilter, type ScheduleAction, ScheduleAlreadyExistsError, 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 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, announcementsOf, anyCheckpointName, applyAttributeQuery, assertConcurrency, assertRoutes, assertSingleDurableCopy, attributeColumnFor, attributeOperand, attributePredicateOperands, axisIsRunColumn, bindWorkflowClass, breakpointToken, bufferedEventReaches, buildWorkflowDirectory, canRoute, capableWorkers, carriesLifecyclePending, checkpointNameKind, checkpointStatsOf, childIdsOf, classifyWaiterToken, clearDurableExecutionWrappers, clearTerminalSingletonAdmission, coalescedSubscribersOf, codeAndDetails, codeOf, collectMetrics, concurrencyTag, controlPlaneAttribution, controlPlaneDescriptor, countRuns, coveredTokens, createStepLogger, currentStep, currentStepScope, currentWorkflowCtx, debug, describeWorker, descriptorHash, detailsOf, durableCopies, error, etagMatches, eventMatchOf, eventMatches, eventNameOf, eventPrefix, eventToken, extendEtag, facetOrigin, fanPageBounds, fanPageEtag, findStalledRuns, foldedCount, getRunsByIds, grantsClientTenant, handoffHandlerId, handoffName, hasDurableExecutionWrappers, heartbeatStatus, hmacTenantVerifier, indexWaitersByRun, info, inheritTenant, isAnyCheckpoint, isAnyMember, isEngineMintedTag, isEventToken, isFailedMember, isLegacyDescriptor, isLifecycleTag, isNonEmptyRunScope, isRemoteEvent, isWorkflowControlFlowSignal, legacySingletonHolders, lifecycleDeliveriesOf, lifecycleEventName, lifecycleEventOf, lifecycleKindOf, lifecycleRegistryNamespace, lifecycleRegistryRunId, lifecycleRegistrySubscriptions, lifecycleRunId, lifecycleSourceOf, lifecycleTraceparentOf, listSignalWaitersOfRuns, liveHandoff, log, markRemoteEvent, matchesAttributes, matchesTenantPredicates, mergeRunFacetRows, mergeRunValueFacetRows, missingCapabilities, negotiate, nextCronFireMs, nextRRuleFireMs, nextScheduleFireAt, normalizeAttributeRows, normalizeDescriptor, observedAnnouncements, onErrorRunId, owedSubscribersOf, pageFan, pageFanFromStore, parentRunIdOf, parseDuration, parseLifecycleEvent, parseRRule, parseWebhookToken, partitionOfToken, planDispatch, poolNamespace, prevCronFireMs, prevRRuleFireMs, queryCheckpointsOf, readBufferedEvent, readRunsByIds, readSearchAttributes, requiredCapabilities, resolveConcurrency, resolveRouting, resolveRunWaiting, resolveTenantToken, resolveWireTenant, retentionKeeps, retiredHandoffName, routeFor, rowTenant, runCompletedEvent, runDetailEtag, runDurableExecution, runFailedEvent, runInStepLogger, runInStepScope, runInWorkflowCtx, runOutsideWorkflowCtx, runSchedules, runStepHandler, runTraceId, runValueFacetsFromRuns, runWaitPrefix, runWaitTargetOf, runWaitToken, sanitizeQueueToken, scheduleRunIdAt, scheduledRunId, scopeBufferedEvent, scopeTenantQuery, sealDurableCopies, settleResultsWithPlainCalls, signTenantToken, singletonAdmissionDenialPatch, singletonAdmissionTags, singletonClaimantIds, sqlComparator, stepConfigOf, stepId, stepNameOf, sub, subEvent, subProcess, summarizeFan, summarizeRunFromStore, summarizeTimeline, tenantAppOf, tenantGroup, tenantIdsFor, tenantVisible, toEventSubscription, traceIdOfTraceparent, triggerFailedSubscribersOf, triggeredRunsOf, triggeredSubscribersOf, useDurableExecution, verifyWireTenant, warn, withSingletonTracked, withoutSingletonMarkers, workflowName };
|
|
10116
|
+
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 AnnouncementEvidence, type AttributeFilter, type AttributeOp, type AttributePredicateOperand, type AttributeValue, type AttributedEngineEvent, type BackoffStrategy, type BlockedDispatch, type BlockedResolution, type BufferedSignalRow, CHILD_EDGE_PREFIXES, CONTROL_FLOW_SIGNAL, CORE_ORIGIN, CURRENT_PROTOCOL_VERSION, type CapabilityRequirement, type CheckpointAggregatingStore, type CheckpointNameKind, type CheckpointQuery, type CheckpointStat, type ChildCallOptions, type ChildWait, CodecStateStore, type CodecStateStoreOptions, type ConcurrencyConfig, ConcurrencyLimitError, type ConcurrencyQuota, type ConsoleCapabilities, type ConsoleFederation, ContinueAsNew, type ControlMessage, type ControlPlane, DEFAULT_ANNOUNCED_SCHEDULE_GRACE_MS, DEFAULT_CONCURRENCY_STATUSES, DEFAULT_PARTITION, DEFAULT_STALLED_AFTER_MS, DURABLE_OPTIONS, DURABLE_OPTIONS_CANONICAL, DURABLE_STEP_CONFIG, DURABLE_STEP_NAME, type Disagreement, type DispatchDiagnostics, type DispatchPlan, DuplicateDurableCopyError, type DurableCopy, type DurableExecution, type DurableExecutionWrapper, type DurableTopology, type DurableWebhook, DurableWorkflow, type DynamicWorkflowCtx, ENGINE_MINTED_TAG_PREFIXES, ENTITY_WORKFLOW, EVENT_BUFFER_SCAN_LIMIT, EVENT_TOKEN_PREFIX, type EngineEvent, type EngineEventType, type EngineListener, type EngineTenancy, Entities, type EntityConfig, type EntityHandler, type EntityHost, type EntityWorkflowHost, EventAccumulators, type EventBatchConfig, type EventSubscription, FAN_SUMMARY_FAILURES, type FanJoin, type FanPage, type FanPageQuery, type FanSummary, type FanWait, FatalError, type FindStalledRunsOptions, GatherError, type GatherItemFailure, type GroupHealth, HANDOFF_SEQ_BASE, type Heartbeat, type HeartbeatSighting, type HeartbeatStatus, type HistoryEvent, InMemoryAdmissionBackend, InMemoryRunQueue, InMemoryStateStore, InMemoryTransport, type InferSearchAttributes, LEGACY_V1_CAPABILITIES, LEGACY_V1_PROTOCOL, LIFECYCLE_COALESCED_TAG_PREFIX, LIFECYCLE_HEAL_WINDOW_MS, LIFECYCLE_ORPHAN_MS, LIFECYCLE_OWED_TAG_PREFIX, LIFECYCLE_PENDING_TAG, LIFECYCLE_REGISTRY_HEARTBEAT_MS, LIFECYCLE_REGISTRY_STALE_MS, LIFECYCLE_REGISTRY_TAG, LIFECYCLE_REGISTRY_TTL_MS, LIFECYCLE_REGISTRY_WORKFLOW, LIFECYCLE_TRACE_TAG_PREFIX, LIFECYCLE_TRIGGERED_TAG_PREFIX, LIFECYCLE_TRIGGER_FAILED_TAG_PREFIX, type LifecycleDelivery, type LifecycleDeliveryState, type LifecycleEventOf, type LifecycleKind, type LifecycleRegistryEntry, type LifecycleSource, type LifecycleSubscriptionLink, type ListStalledRunsOptions, type MetricsCollector, type MetricsSnapshot, NO_LIVE_WORKER, type NamedTransport, type NegotiateOptions, type NegotiationOutcome, type NegotiationReason, type NegotiationResult, NestedWorkflowCallError, NonDeterminismError, type OnErrorInput, type OnErrorRoute, type OnEventEntry, type OwnedLeaseReclaim, PARENT_CLOSE_TAG_PREFIX, type ParentClosePolicy, type ParsedRRule, type PartitionSighting, type PayloadCodec, type QueueConfig, QueueController, REMOTE_EVENT, RUN_HISTORY_FIXTURE_VERSION, RUN_VALUE_FACET_LIMIT, RUN_VALUE_FACET_SCAN, RUN_WAIT_TOKEN_PREFIX, type RawWorkerDescriptor, RemoteStepError, RemoteStepTimeout, type RemoteTask, RemoteWorkflowExecutor, RemoteWorkflowTimeout, type RepublishLifecycleResult, type RepublishLifecycleTarget, type RetentionPolicy, type RoutableDispatch, type RoutableResolution, type RoutingResolution, type RunAppAttribution, RunAppStamper, type RunAppTopologyOptions, type RunAttributeRow, type RunConsumerOptions, type RunDetail, type RunDetailOptions, type RunDispatch, type RunDispatcher, type RunFacetQuery, type RunFacetRow, RunGateway, type RunListItem, type RunQuery, type RunQueueOptions, type RunReply, type RunReplyResult, type RunRequest, type RunRequestKind, type RunResult, type RunSchedulesOptions, type RunScope, type RunStatus, type RunTenant, type RunValueAxis, type RunValueFacetOptions, type RunValueFacetOrder, type RunValueFacetRow, type RunWaitLink, type RunWaiting, SINGLETON_ACTIVE_STATUSES, SINGLETON_ADMITTED_TAG, SINGLETON_LOCK_CHUNK, SINGLETON_RESERVED_TAGS, SINGLETON_TRACKED_TAG, STATE_STORE, STATE_STORE_CANONICAL, SUMMARY_CHILD_LIMIT, type ScalarAttributeFilter, type ScheduleAction, ScheduleAlreadyExistsError, type ScheduleAnnouncement, ScheduleClient, type ScheduleClientOptions, type ScheduleDescription, type ScheduleHost, type ScheduleListQuery, ScheduleNotFoundError, type ScheduleOptions, type ScheduleQuery, type ScheduleRecord, type ScheduleTickEngine, type ScheduledWorkflow, type SchemaIssue, type SchemaValidationCode, SchemaValidationError, type SearchAttributes, type SearchAttributesSchema, type Settled, type SignalOptions, SignalTimeoutError, type SignalWaiter, type SingletonConfig, SingletonQueueFullError, type StalePendingStep, type StalledRunInfo, StandardSchemaV1, type StartOptions, type StartRunMessage, type StateStore, type StepCheckpoint, type StepConfig, type StepDef, type StepDispatchOpts, type StepError, type StepEvent, type StepHandler, type StepInterceptor, type StepInvocation, type StepKind, type StepLogger, type StepOptions, type StepRef, type StepResult, type StepResultSettlement, type StepScope, type StepSettlement, type StepUndo, type StoreTransaction, type SubProcessHandle, TERMINAL_RUN_STATUSES, TRANSPORT, TRANSPORT_CANONICAL, type TenantEvent, type TenantFilter, type TenantRow, type TenantTokenSource, type TenantVerifier, type Transport, type UndoOf, type UpdateResult, type UpdateValidator, VERSION_UNDECLARED_TAG, type VerifiedTenant, WORKFLOW_NAME_KEY, type WaitAnyCondition, type WaitAnyOutcome, type WaitAnyResult, type WaitCondition, type WaitConditionSpec, type WaitForRunOptions, type WireDates, type WorkerAdjust, type WorkerConcurrencyStatus, type WorkerDescriptor, type WorkerHeartbeat, type WorkerLifecycle, type WorkerStatus, type WorkflowAnnouncement, WorkflowBlocked, type WorkflowClass, type WorkflowCommand, type WorkflowCtx, type WorkflowDecision, type WorkflowDirectory, WorkflowEngine, type WorkflowEngineDeps, type WorkflowExecutor, type WorkflowHandler, type WorkflowInputOf, type WorkflowLifecycleEvent, type WorkflowLifecycleLinks, WorkflowNotRegistered, type WorkflowOutputOf, type WorkflowRef, type WorkflowRegistration, type WorkflowRun, type WorkflowStartClient, type WorkflowStepEvent, WorkflowSuspended, type WorkflowTask, acceptingSubscription, accumulatorRunId, aggregateAnnouncements, aggregatesCheckpoints, announcedScheduleId, announcementsOf, anyCheckpointName, applyAttributeQuery, assertConcurrency, assertRoutes, assertSingleDurableCopy, attributeColumnFor, attributeOperand, attributePredicateOperands, axisIsRunColumn, bindWorkflowClass, breakpointToken, bufferedEventReaches, buildWorkflowDirectory, canRoute, capableWorkers, carriesLifecyclePending, checkpointNameKind, checkpointStatsOf, childIdsOf, classifyWaiterToken, clearDurableExecutionWrappers, clearTerminalSingletonAdmission, coalescedSubscribersOf, codeAndDetails, codeOf, collectMetrics, concurrencyTag, controlPlaneAttribution, controlPlaneDescriptor, countRuns, coveredTokens, createStepLogger, currentStep, currentStepScope, currentWorkflowCtx, debug, describeWorker, descriptorHash, detailsOf, durableCopies, error, etagMatches, eventMatchOf, eventMatches, eventNameOf, eventPrefix, eventToken, extendEtag, facetOrigin, fanPageBounds, fanPageEtag, findStalledRuns, foldedCount, getRunsByIds, grantsClientTenant, handoffHandlerId, handoffName, hasDurableExecutionWrappers, heartbeatStatus, hmacTenantVerifier, indexWaitersByRun, info, inheritTenant, isAnyCheckpoint, isAnyMember, isEngineMintedTag, isEventToken, isFailedMember, isLegacyDescriptor, isLifecycleTag, isNonEmptyRunScope, isRemoteEvent, isWorkflowControlFlowSignal, legacySingletonHolders, lifecycleDeliveriesOf, lifecycleEventName, lifecycleEventOf, lifecycleKindOf, lifecycleRegistryNamespace, lifecycleRegistryRunId, lifecycleRegistrySubscriptions, lifecycleRunId, lifecycleSourceOf, lifecycleTraceparentOf, listSignalWaitersOfRuns, liveHandoff, log, markRemoteEvent, matchesAttributes, matchesTenantPredicates, mergeRunFacetRows, mergeRunValueFacetRows, missingCapabilities, negotiate, nextCronFireMs, nextRRuleFireMs, nextScheduleFireAt, normalizeAttributeRows, normalizeDescriptor, observedAnnouncements, onErrorRunId, owedSubscribersOf, pageFan, pageFanFromStore, parentRunIdOf, parseDuration, parseLifecycleEvent, parseRRule, parseWebhookToken, partitionOfToken, planDispatch, poolNamespace, prevCronFireMs, prevRRuleFireMs, queryCheckpointsOf, readBufferedEvent, readRunsByIds, readSearchAttributes, requiredCapabilities, resolveConcurrency, resolveRouting, resolveRunWaiting, resolveTenantToken, resolveWireTenant, retentionKeeps, retiredHandoffName, routeFor, rowTenant, runCompletedEvent, runDetailEtag, runDurableExecution, runFailedEvent, runInStepLogger, runInStepScope, runInWorkflowCtx, runOutsideWorkflowCtx, runSchedules, runStepHandler, runTraceId, runValueFacetsFromRuns, runWaitPrefix, runWaitTargetOf, runWaitToken, sanitizeQueueToken, scheduleRunIdAt, scheduledRunId, scopeBufferedEvent, scopeTenantQuery, sealDurableCopies, settleResultsWithPlainCalls, signTenantToken, singletonAdmissionDenialPatch, singletonAdmissionTags, singletonClaimantIds, sqlComparator, stepConfigOf, stepId, stepNameOf, sub, subEvent, subProcess, summarizeFan, summarizeRunFromStore, summarizeTimeline, tenantAppOf, tenantGroup, tenantIdsFor, tenantVisible, toEventSubscription, traceIdOfTraceparent, triggerFailedSubscribersOf, triggeredRunsOf, triggeredSubscribersOf, useDurableExecution, verifyWireTenant, warn, withSingletonTracked, withoutSingletonMarkers, workflowName };
|