@dudousxd/nestjs-durable 0.62.0 → 0.63.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { WorkflowCtx, SearchAttributes, WorkflowClass, StandardSchemaV1, StepError, OnEventEntry, OnErrorInput, LifecycleEventOf, WorkflowLifecycleEvent, WorkflowRef, SingletonConfig, ConcurrencyConfig, SearchAttributesSchema, EventBatchConfig, TenantVerifier, VerifiedTenant, TenantTokenSource, StateStore, Transport, NamedTransport, ControlPlane, StalledRunInfo, ScheduledWorkflow, RetentionPolicy, QueueConfig, AdmissionBackend, WorkflowInputOf, StartOptions, RunResult, RunGateway, WorkflowEngine, EntityHandler, DurableTopology, RunDetailOptions, RunDetail, FanPageQuery, FanPage, WorkflowRun, RunQuery, RunListItem, RunFacetQuery, RunFacetRow, RunValueAxis, RunValueFacetOptions, RunValueFacetRow, RunWaiting, WorkflowLifecycleLinks, LifecycleKind, GroupHealth, ScheduleListQuery, ScheduleDescription, RepublishLifecycleTarget, RepublishLifecycleResult, ScheduleAction, EngineEvent, RunRequest, RunReply, TenantFilter as TenantFilter$1, StepInvocation, TenantEvent, SignalOptions } from '@dudousxd/nestjs-durable-core';
1
+ import { WorkflowCtx, SearchAttributes, WorkflowClass, StandardSchemaV1, StepError, OnEventEntry, OnErrorInput, LifecycleEventOf, WorkflowLifecycleEvent, WorkflowRef, SingletonConfig, ConcurrencyConfig, SearchAttributesSchema, EventBatchConfig, TenantVerifier, VerifiedTenant, TenantTokenSource, StateStore, Transport, NamedTransport, ControlPlane, StalledRunInfo, ScheduledWorkflow, RetentionPolicy, QueueConfig, AdmissionBackend, WorkflowInputOf, StartOptions, RunResult, WorkflowStartClient, RunGateway, WorkflowEngine, EntityHandler, DurableTopology, RunDetailOptions, RunDetail, FanPageQuery, FanPage, WorkflowRun, RunQuery, RunListItem, RunFacetQuery, RunFacetRow, RunValueAxis, RunValueFacetOptions, RunValueFacetRow, RunWaiting, WorkflowLifecycleLinks, LifecycleKind, GroupHealth, ScheduleListQuery, ScheduleDescription, RepublishLifecycleTarget, RepublishLifecycleResult, ScheduleAction, EngineEvent, RunRequest, RunReply, TenantFilter as TenantFilter$1, StepInvocation, TenantEvent, SignalOptions } from '@dudousxd/nestjs-durable-core';
2
2
  export { AttributeFilter, DuplicateDurableCopyError, DynamicWorkflowCtx, EngineEvent, EventSubscription, InferSearchAttributes, LIFECYCLE_PENDING_TAG, LifecycleEventOf, LifecycleKind, OnErrorInput, OnEventEntry, RunDetail, RunGateway, RunListItem, RunQuery, RunSchedulesOptions, RunStatus, RunWaiting, ScheduledWorkflow, SearchAttributes, SearchAttributesSchema, StepCheckpoint, StepEvent, StepLogger, TenantTokenSource, TenantVerifier, VerifiedTenant, WorkflowCtx, WorkflowEngine, WorkflowHandler, WorkflowLifecycleEvent, WorkflowRun, hmacTenantVerifier, lifecycleRunId, lifecycleSourceOf, prevCronFireMs, readSearchAttributes, runCompletedEvent, runFailedEvent, runSchedules, scheduleRunIdAt, scheduledRunId, signTenantToken, triggeredRunsOf } from '@dudousxd/nestjs-durable-core';
3
3
  import { z } from 'zod';
4
4
  import { ConcurrencyOption, StartRunDeps, RunRedisWorkerOptions, RunningWorker, DurableWorkerRuntime } from '@dudousxd/durable-worker';
@@ -823,7 +823,9 @@ interface DurableModuleSharedOptions {
823
823
  * returns a decision nor sends a run-scoped heartbeat within this window, the engine presumes it dead
824
824
  * and lets recovery re-drive; each heartbeat rearms the window so a slow-but-alive worker is never
825
825
  * re-driven. Pair with a worker SDK that emits run-scoped heartbeats (`@dudousxd/durable-worker` ≥ the
826
- * release that ships them, and the Python `durable-worker`). Omit for the prior unbounded await.
826
+ * release that ships them, and the Python `durable-worker`). Omitted, a turn dispatched over a
827
+ * broker (a tenant's worker, another SDK's) takes {@link reconcileMs} as its window, so a run whose
828
+ * worker died mid-turn is re-driven within it; `reconcileMs: 0` keeps the unbounded wait.
827
829
  * Operator only.
828
830
  */
829
831
  remoteAdvanceSilenceMs?: number;
@@ -850,7 +852,8 @@ interface DurableModuleSharedOptions {
850
852
  /**
851
853
  * Fallback wake-up (ms) for a run suspended on an event (child, signal, `waitForEvent`, remote
852
854
  * result) whose wake-up was lost: the reconcile pass re-drives it after this window, an idempotent
853
- * replay that re-suspends a still-pending wait. Defaults to 300000 (5min); `0` disables it.
855
+ * replay that re-suspends a still-pending wait. Defaults to 300000 (5min); `0` disables it. Also
856
+ * the re-drive window of a dispatched workflow turn when {@link remoteAdvanceSilenceMs} is unset.
854
857
  * See `WorkflowEngineDeps.reconcileMs`. Operator only.
855
858
  */
856
859
  reconcileMs?: number;
@@ -1267,7 +1270,11 @@ declare class ThinWorkflowRegistrar implements OnModuleInit {
1267
1270
  private readonly metadataScanner;
1268
1271
  private readonly runtime;
1269
1272
  private readonly options;
1270
- constructor(discovery: DiscoveryService, metadataScanner: MetadataScanner, runtime: DurableWorkerRuntime | null, options: DurableModuleOptions);
1273
+ /** In this role the store-less `DurableStartClient` facade the module binds under this token. */
1274
+ private readonly starter;
1275
+ constructor(discovery: DiscoveryService, metadataScanner: MetadataScanner, runtime: DurableWorkerRuntime | null, options: DurableModuleOptions,
1276
+ /** In this role the store-less `DurableStartClient` facade the module binds under this token. */
1277
+ starter: WorkflowStartClient);
1271
1278
  onModuleInit(): void;
1272
1279
  }
1273
1280
  /**
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { WorkflowCtx, SearchAttributes, WorkflowClass, StandardSchemaV1, StepError, OnEventEntry, OnErrorInput, LifecycleEventOf, WorkflowLifecycleEvent, WorkflowRef, SingletonConfig, ConcurrencyConfig, SearchAttributesSchema, EventBatchConfig, TenantVerifier, VerifiedTenant, TenantTokenSource, StateStore, Transport, NamedTransport, ControlPlane, StalledRunInfo, ScheduledWorkflow, RetentionPolicy, QueueConfig, AdmissionBackend, WorkflowInputOf, StartOptions, RunResult, RunGateway, WorkflowEngine, EntityHandler, DurableTopology, RunDetailOptions, RunDetail, FanPageQuery, FanPage, WorkflowRun, RunQuery, RunListItem, RunFacetQuery, RunFacetRow, RunValueAxis, RunValueFacetOptions, RunValueFacetRow, RunWaiting, WorkflowLifecycleLinks, LifecycleKind, GroupHealth, ScheduleListQuery, ScheduleDescription, RepublishLifecycleTarget, RepublishLifecycleResult, ScheduleAction, EngineEvent, RunRequest, RunReply, TenantFilter as TenantFilter$1, StepInvocation, TenantEvent, SignalOptions } from '@dudousxd/nestjs-durable-core';
1
+ import { WorkflowCtx, SearchAttributes, WorkflowClass, StandardSchemaV1, StepError, OnEventEntry, OnErrorInput, LifecycleEventOf, WorkflowLifecycleEvent, WorkflowRef, SingletonConfig, ConcurrencyConfig, SearchAttributesSchema, EventBatchConfig, TenantVerifier, VerifiedTenant, TenantTokenSource, StateStore, Transport, NamedTransport, ControlPlane, StalledRunInfo, ScheduledWorkflow, RetentionPolicy, QueueConfig, AdmissionBackend, WorkflowInputOf, StartOptions, RunResult, WorkflowStartClient, RunGateway, WorkflowEngine, EntityHandler, DurableTopology, RunDetailOptions, RunDetail, FanPageQuery, FanPage, WorkflowRun, RunQuery, RunListItem, RunFacetQuery, RunFacetRow, RunValueAxis, RunValueFacetOptions, RunValueFacetRow, RunWaiting, WorkflowLifecycleLinks, LifecycleKind, GroupHealth, ScheduleListQuery, ScheduleDescription, RepublishLifecycleTarget, RepublishLifecycleResult, ScheduleAction, EngineEvent, RunRequest, RunReply, TenantFilter as TenantFilter$1, StepInvocation, TenantEvent, SignalOptions } from '@dudousxd/nestjs-durable-core';
2
2
  export { AttributeFilter, DuplicateDurableCopyError, DynamicWorkflowCtx, EngineEvent, EventSubscription, InferSearchAttributes, LIFECYCLE_PENDING_TAG, LifecycleEventOf, LifecycleKind, OnErrorInput, OnEventEntry, RunDetail, RunGateway, RunListItem, RunQuery, RunSchedulesOptions, RunStatus, RunWaiting, ScheduledWorkflow, SearchAttributes, SearchAttributesSchema, StepCheckpoint, StepEvent, StepLogger, TenantTokenSource, TenantVerifier, VerifiedTenant, WorkflowCtx, WorkflowEngine, WorkflowHandler, WorkflowLifecycleEvent, WorkflowRun, hmacTenantVerifier, lifecycleRunId, lifecycleSourceOf, prevCronFireMs, readSearchAttributes, runCompletedEvent, runFailedEvent, runSchedules, scheduleRunIdAt, scheduledRunId, signTenantToken, triggeredRunsOf } from '@dudousxd/nestjs-durable-core';
3
3
  import { z } from 'zod';
4
4
  import { ConcurrencyOption, StartRunDeps, RunRedisWorkerOptions, RunningWorker, DurableWorkerRuntime } from '@dudousxd/durable-worker';
@@ -823,7 +823,9 @@ interface DurableModuleSharedOptions {
823
823
  * returns a decision nor sends a run-scoped heartbeat within this window, the engine presumes it dead
824
824
  * and lets recovery re-drive; each heartbeat rearms the window so a slow-but-alive worker is never
825
825
  * re-driven. Pair with a worker SDK that emits run-scoped heartbeats (`@dudousxd/durable-worker` ≥ the
826
- * release that ships them, and the Python `durable-worker`). Omit for the prior unbounded await.
826
+ * release that ships them, and the Python `durable-worker`). Omitted, a turn dispatched over a
827
+ * broker (a tenant's worker, another SDK's) takes {@link reconcileMs} as its window, so a run whose
828
+ * worker died mid-turn is re-driven within it; `reconcileMs: 0` keeps the unbounded wait.
827
829
  * Operator only.
828
830
  */
829
831
  remoteAdvanceSilenceMs?: number;
@@ -850,7 +852,8 @@ interface DurableModuleSharedOptions {
850
852
  /**
851
853
  * Fallback wake-up (ms) for a run suspended on an event (child, signal, `waitForEvent`, remote
852
854
  * result) whose wake-up was lost: the reconcile pass re-drives it after this window, an idempotent
853
- * replay that re-suspends a still-pending wait. Defaults to 300000 (5min); `0` disables it.
855
+ * replay that re-suspends a still-pending wait. Defaults to 300000 (5min); `0` disables it. Also
856
+ * the re-drive window of a dispatched workflow turn when {@link remoteAdvanceSilenceMs} is unset.
854
857
  * See `WorkflowEngineDeps.reconcileMs`. Operator only.
855
858
  */
856
859
  reconcileMs?: number;
@@ -1267,7 +1270,11 @@ declare class ThinWorkflowRegistrar implements OnModuleInit {
1267
1270
  private readonly metadataScanner;
1268
1271
  private readonly runtime;
1269
1272
  private readonly options;
1270
- constructor(discovery: DiscoveryService, metadataScanner: MetadataScanner, runtime: DurableWorkerRuntime | null, options: DurableModuleOptions);
1273
+ /** In this role the store-less `DurableStartClient` facade the module binds under this token. */
1274
+ private readonly starter;
1275
+ constructor(discovery: DiscoveryService, metadataScanner: MetadataScanner, runtime: DurableWorkerRuntime | null, options: DurableModuleOptions,
1276
+ /** In this role the store-less `DurableStartClient` facade the module binds under this token. */
1277
+ starter: WorkflowStartClient);
1271
1278
  onModuleInit(): void;
1272
1279
  }
1273
1280
  /**
package/dist/index.js CHANGED
@@ -732,6 +732,19 @@ var DurableStartClient = class {
732
732
  ...opts?.searchAttributes !== void 0 ? {
733
733
  searchAttributes: opts.searchAttributes
734
734
  } : {},
735
+ // The start options the control plane applies (version pin, priority, delayed start, quota).
736
+ ...opts?.version !== void 0 ? {
737
+ version: opts.version
738
+ } : {},
739
+ ...opts?.priority !== void 0 ? {
740
+ priority: opts.priority
741
+ } : {},
742
+ ...opts?.startAt !== void 0 ? {
743
+ startAt: opts.startAt
744
+ } : {},
745
+ ...opts?.concurrency !== void 0 ? {
746
+ concurrency: opts.concurrency
747
+ } : {},
735
748
  ...tenant ? {
736
749
  tenantId: tenant.id,
737
750
  ...tenant.kind !== void 0 ? {
@@ -742,9 +755,10 @@ var DurableStartClient = class {
742
755
  deps: this.deps
743
756
  } : {}
744
757
  });
758
+ const startAtMs = opts?.startAt instanceof Date ? opts.startAt.getTime() : opts?.startAt;
745
759
  return {
746
760
  runId,
747
- status: "pending"
761
+ status: startAtMs !== void 0 && Number.isFinite(startAtMs) && startAtMs > Date.now() ? "suspended" : "pending"
748
762
  };
749
763
  }
750
764
  cancel(_runId) {
@@ -790,7 +804,7 @@ function tenantUnsupported(method) {
790
804
  __name(tenantUnsupported, "tenantUnsupported");
791
805
 
792
806
  // src/durable-worker.module.ts
793
- import { DURABLE_OPTIONS_CANONICAL } from "@dudousxd/nestjs-durable-core";
807
+ import { DURABLE_OPTIONS_CANONICAL, WorkflowEngine, bindWorkflowClass } from "@dudousxd/nestjs-durable-core";
794
808
  import { Inject, Injectable as Injectable2 } from "@nestjs/common";
795
809
  import { DiscoveryService, MetadataScanner } from "@nestjs/core";
796
810
 
@@ -1029,28 +1043,38 @@ var ThinWorkflowRegistrar = class {
1029
1043
  metadataScanner;
1030
1044
  runtime;
1031
1045
  options;
1032
- constructor(discovery, metadataScanner, runtime, options) {
1046
+ starter;
1047
+ constructor(discovery, metadataScanner, runtime, options, starter) {
1033
1048
  this.discovery = discovery;
1034
1049
  this.metadataScanner = metadataScanner;
1035
1050
  this.runtime = runtime;
1036
1051
  this.options = options;
1052
+ this.starter = starter;
1037
1053
  }
1038
1054
  onModuleInit() {
1039
1055
  const runtime = this.runtime;
1040
1056
  if (runtime === null || !isPureThinWorker(this.options)) return;
1041
- scanWorkflows(this.discovery, (meta, instance, origin) => registerOnRuntime(runtime, this.metadataScanner, meta, instance, origin));
1057
+ const starter = this.starter;
1058
+ scanWorkflows(this.discovery, (meta, instance, origin) => {
1059
+ registerOnRuntime(runtime, this.metadataScanner, meta, instance, origin);
1060
+ bindWorkflowClass(instance.constructor, {
1061
+ start: /* @__PURE__ */ __name((name, input, runId, opts) => starter.start(name, input, runId, opts), "start")
1062
+ });
1063
+ });
1042
1064
  }
1043
1065
  };
1044
1066
  ThinWorkflowRegistrar = _ts_decorate2([
1045
1067
  Injectable2(),
1046
1068
  _ts_param(2, Inject(DURABLE_WORKER_RUNTIME)),
1047
1069
  _ts_param(3, Inject(DURABLE_OPTIONS_CANONICAL)),
1070
+ _ts_param(4, Inject(WorkflowEngine)),
1048
1071
  _ts_metadata2("design:type", Function),
1049
1072
  _ts_metadata2("design:paramtypes", [
1050
1073
  typeof DiscoveryService === "undefined" ? Object : DiscoveryService,
1051
1074
  typeof MetadataScanner === "undefined" ? Object : MetadataScanner,
1052
1075
  Object,
1053
- typeof DurableModuleOptions === "undefined" ? Object : DurableModuleOptions
1076
+ typeof DurableModuleOptions === "undefined" ? Object : DurableModuleOptions,
1077
+ typeof WorkflowStartClient === "undefined" ? Object : WorkflowStartClient
1054
1078
  ])
1055
1079
  ], ThinWorkflowRegistrar);
1056
1080
  var ThinStepRegistrar = class {
@@ -1231,7 +1255,7 @@ function unavailableRunGateway() {
1231
1255
  __name(unavailableRunGateway, "unavailableRunGateway");
1232
1256
 
1233
1257
  // src/durable.module.ts
1234
- import { DURABLE_OPTIONS, DURABLE_OPTIONS_CANONICAL as DURABLE_OPTIONS_CANONICAL8, RunGateway as RunGateway2, STATE_STORE, STATE_STORE_CANONICAL as STATE_STORE_CANONICAL4, TRANSPORT, TRANSPORT_CANONICAL as TRANSPORT_CANONICAL3, WorkflowEngine as WorkflowEngine6, sealDurableCopies, useDurableExecution } from "@dudousxd/nestjs-durable-core";
1258
+ import { DURABLE_OPTIONS, DURABLE_OPTIONS_CANONICAL as DURABLE_OPTIONS_CANONICAL8, RunGateway as RunGateway2, STATE_STORE, STATE_STORE_CANONICAL as STATE_STORE_CANONICAL4, TRANSPORT, TRANSPORT_CANONICAL as TRANSPORT_CANONICAL3, WorkflowEngine as WorkflowEngine7, sealDurableCopies, useDurableExecution } from "@dudousxd/nestjs-durable-core";
1235
1259
  import { Inject as Inject9, Injectable as Injectable13, Module } from "@nestjs/common";
1236
1260
  import { DiscoveryModule, ModuleRef as ModuleRef2 } from "@nestjs/core";
1237
1261
 
@@ -1316,7 +1340,7 @@ DurableStepRegistrar = _ts_decorate3([
1316
1340
  ], DurableStepRegistrar);
1317
1341
 
1318
1342
  // src/entity.ts
1319
- import { WorkflowEngine } from "@dudousxd/nestjs-durable-core";
1343
+ import { WorkflowEngine as WorkflowEngine2 } from "@dudousxd/nestjs-durable-core";
1320
1344
  import { Injectable as Injectable4 } from "@nestjs/common";
1321
1345
  import "reflect-metadata";
1322
1346
  function _ts_decorate4(decorators, target, key, desc) {
@@ -1399,7 +1423,7 @@ EntityService = _ts_decorate4([
1399
1423
  Injectable4(),
1400
1424
  _ts_metadata4("design:type", Function),
1401
1425
  _ts_metadata4("design:paramtypes", [
1402
- typeof WorkflowEngine === "undefined" ? Object : WorkflowEngine
1426
+ typeof WorkflowEngine2 === "undefined" ? Object : WorkflowEngine2
1403
1427
  ])
1404
1428
  ], EntityService);
1405
1429
 
@@ -2734,7 +2758,7 @@ RetentionPoller = _ts_decorate8([
2734
2758
  ], RetentionPoller);
2735
2759
 
2736
2760
  // src/store-run-gateway.ts
2737
- import { LIFECYCLE_REGISTRY_WORKFLOW, STATE_STORE_CANONICAL as STATE_STORE_CANONICAL2, SUMMARY_CHILD_LIMIT as SUMMARY_CHILD_LIMIT2, WorkflowEngine as WorkflowEngine2, aggregatesCheckpoints, childIdsOf as childIdsOf2, etagMatches, extendEtag, fanPageEtag, indexWaitersByRun, lifecycleDeliveriesOf, lifecycleKindOf as lifecycleKindOf2, lifecycleSourceOf, lifecycleTraceparentOf, listSignalWaitersOfRuns, mergeRunFacetRows, pageFan as pageFan2, pageFanFromStore, readRunsByIds, resolveRunWaiting, runDetailEtag, runWaitPrefix, runWaitTargetOf, summarizeRunFromStore, summarizeTimeline as summarizeTimeline2, traceIdOfTraceparent } from "@dudousxd/nestjs-durable-core";
2761
+ import { LIFECYCLE_REGISTRY_WORKFLOW, STATE_STORE_CANONICAL as STATE_STORE_CANONICAL2, SUMMARY_CHILD_LIMIT as SUMMARY_CHILD_LIMIT2, WorkflowEngine as WorkflowEngine3, aggregatesCheckpoints, childIdsOf as childIdsOf2, etagMatches, extendEtag, fanPageEtag, indexWaitersByRun, lifecycleDeliveriesOf, lifecycleKindOf as lifecycleKindOf2, lifecycleSourceOf, lifecycleTraceparentOf, listSignalWaitersOfRuns, mergeRunFacetRows, pageFan as pageFan2, pageFanFromStore, readRunsByIds, resolveRunWaiting, runDetailEtag, runWaitPrefix, runWaitTargetOf, summarizeRunFromStore, summarizeTimeline as summarizeTimeline2, traceIdOfTraceparent } from "@dudousxd/nestjs-durable-core";
2738
2762
  import { Inject as Inject6, Injectable as Injectable9 } from "@nestjs/common";
2739
2763
  function _ts_decorate9(decorators, target, key, desc) {
2740
2764
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -3147,7 +3171,7 @@ StoreRunGateway = _ts_decorate9([
3147
3171
  _ts_metadata9("design:type", Function),
3148
3172
  _ts_metadata9("design:paramtypes", [
3149
3173
  typeof StateStore === "undefined" ? Object : StateStore,
3150
- typeof WorkflowEngine2 === "undefined" ? Object : WorkflowEngine2
3174
+ typeof WorkflowEngine3 === "undefined" ? Object : WorkflowEngine3
3151
3175
  ])
3152
3176
  ], StoreRunGateway);
3153
3177
 
@@ -3194,7 +3218,7 @@ var TenantEventRepublisher = class {
3194
3218
 
3195
3219
  // src/timer-poller.ts
3196
3220
  import * as durableCore from "@dudousxd/nestjs-durable-core";
3197
- import { DURABLE_OPTIONS_CANONICAL as DURABLE_OPTIONS_CANONICAL6, WorkflowEngine as WorkflowEngine3, runSchedules, workflowName as workflowName3 } from "@dudousxd/nestjs-durable-core";
3221
+ import { DURABLE_OPTIONS_CANONICAL as DURABLE_OPTIONS_CANONICAL6, WorkflowEngine as WorkflowEngine4, runSchedules, workflowName as workflowName3 } from "@dudousxd/nestjs-durable-core";
3198
3222
  import { Inject as Inject7, Injectable as Injectable10, Optional as Optional3 } from "@nestjs/common";
3199
3223
  function _ts_decorate10(decorators, target, key, desc) {
3200
3224
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -3454,7 +3478,7 @@ TimerPoller = _ts_decorate10([
3454
3478
  _ts_param7(2, Optional3()),
3455
3479
  _ts_metadata10("design:type", Function),
3456
3480
  _ts_metadata10("design:paramtypes", [
3457
- typeof WorkflowEngine3 === "undefined" ? Object : WorkflowEngine3,
3481
+ typeof WorkflowEngine4 === "undefined" ? Object : WorkflowEngine4,
3458
3482
  typeof DurableModuleOptions === "undefined" ? Object : DurableModuleOptions,
3459
3483
  typeof SweepLeases === "undefined" ? Object : SweepLeases
3460
3484
  ])
@@ -3466,7 +3490,7 @@ var CONTEXT_ACCESSOR = Symbol.for("@dudousxd/nestjs-context:accessor");
3466
3490
  var RUN_GATEWAY = RunGateway;
3467
3491
 
3468
3492
  // src/workflow.registrar.ts
3469
- import { DURABLE_OPTIONS_CANONICAL as DURABLE_OPTIONS_CANONICAL7, RemoteWorkflowExecutor, STATE_STORE_CANONICAL as STATE_STORE_CANONICAL3, WorkflowEngine as WorkflowEngine4, bindWorkflowClass, sanitizeQueueToken, tenantGroup, workflowName as workflowName4 } from "@dudousxd/nestjs-durable-core";
3493
+ import { DURABLE_OPTIONS_CANONICAL as DURABLE_OPTIONS_CANONICAL7, RemoteWorkflowExecutor, STATE_STORE_CANONICAL as STATE_STORE_CANONICAL3, WorkflowEngine as WorkflowEngine5, bindWorkflowClass as bindWorkflowClass2, sanitizeQueueToken, tenantGroup, workflowName as workflowName4 } from "@dudousxd/nestjs-durable-core";
3470
3494
  import { Inject as Inject8, Injectable as Injectable11 } from "@nestjs/common";
3471
3495
  import { DiscoveryService as DiscoveryService4, MetadataScanner as MetadataScanner4 } from "@nestjs/core";
3472
3496
 
@@ -3611,7 +3635,7 @@ var WorkflowRegistrar = class {
3611
3635
  executor: new RemoteWorkflowExecutor(this.inAppWorker.transport, meta.name, this.inAppWorker.partition)
3612
3636
  } : {}
3613
3637
  });
3614
- bindWorkflowClass(workflowCtor, {
3638
+ bindWorkflowClass2(workflowCtor, {
3615
3639
  start: /* @__PURE__ */ __name((name, input, runId, opts) => this.engine.start(name, input, runId, opts), "start"),
3616
3640
  waitForRun: /* @__PURE__ */ __name((runId, opts) => this.engine.waitForRun(runId, opts), "waitForRun")
3617
3641
  });
@@ -3706,7 +3730,7 @@ WorkflowRegistrar = _ts_decorate11([
3706
3730
  _ts_metadata11("design:paramtypes", [
3707
3731
  typeof DiscoveryService4 === "undefined" ? Object : DiscoveryService4,
3708
3732
  typeof MetadataScanner4 === "undefined" ? Object : MetadataScanner4,
3709
- typeof WorkflowEngine4 === "undefined" ? Object : WorkflowEngine4,
3733
+ typeof WorkflowEngine5 === "undefined" ? Object : WorkflowEngine5,
3710
3734
  Object,
3711
3735
  typeof DurableModuleOptions === "undefined" ? Object : DurableModuleOptions,
3712
3736
  Object
@@ -3715,7 +3739,7 @@ WorkflowRegistrar = _ts_decorate11([
3715
3739
 
3716
3740
  // src/workflow.service.ts
3717
3741
  import { randomUUID } from "node:crypto";
3718
- import { WorkflowEngine as WorkflowEngine5 } from "@dudousxd/nestjs-durable-core";
3742
+ import { WorkflowEngine as WorkflowEngine6 } from "@dudousxd/nestjs-durable-core";
3719
3743
  import { Injectable as Injectable12 } from "@nestjs/common";
3720
3744
  function _ts_decorate12(decorators, target, key, desc) {
3721
3745
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -3806,7 +3830,7 @@ WorkflowService = _ts_decorate12([
3806
3830
  Injectable12(),
3807
3831
  _ts_metadata12("design:type", Function),
3808
3832
  _ts_metadata12("design:paramtypes", [
3809
- typeof WorkflowEngine5 === "undefined" ? Object : WorkflowEngine5
3833
+ typeof WorkflowEngine6 === "undefined" ? Object : WorkflowEngine6
3810
3834
  ])
3811
3835
  ], WorkflowService);
3812
3836
 
@@ -4042,7 +4066,7 @@ RunGatewayBootstrap = _ts_decorate13([
4042
4066
  _ts_param9(5, Inject9(TENANT_AUTH)),
4043
4067
  _ts_metadata13("design:type", Function),
4044
4068
  _ts_metadata13("design:paramtypes", [
4045
- typeof WorkflowEngine6 === "undefined" ? Object : WorkflowEngine6,
4069
+ typeof WorkflowEngine7 === "undefined" ? Object : WorkflowEngine7,
4046
4070
  Object,
4047
4071
  typeof RunGateway2 === "undefined" ? Object : RunGateway2,
4048
4072
  Object,
@@ -4165,7 +4189,7 @@ var DurableModule = class _DurableModule {
4165
4189
  // Shared token, bound EXACTLY once: a real engine for the operator role, or a store-less
4166
4190
  // `DurableStartClient` facade for a thin worker (no `store`) — either way, `WorkflowService`
4167
4191
  // and app code call `engine.start(...)` unchanged.
4168
- provide: WorkflowEngine6,
4192
+ provide: WorkflowEngine7,
4169
4193
  useFactory: /* @__PURE__ */ __name(async (options, store, transport, moduleRef, auth) => {
4170
4194
  if (options.store === void 0) {
4171
4195
  return new DurableStartClient({
@@ -4192,7 +4216,7 @@ var DurableModule = class _DurableModule {
4192
4216
  if (t) deferTransportConsumers(t);
4193
4217
  }
4194
4218
  }
4195
- const engine = new WorkflowEngine6({
4219
+ const engine = new WorkflowEngine7({
4196
4220
  store,
4197
4221
  transport: transport ?? void 0,
4198
4222
  transports: options.transports,
@@ -4272,7 +4296,7 @@ var DurableModule = class _DurableModule {
4272
4296
  inject: [
4273
4297
  DURABLE_OPTIONS_CANONICAL8,
4274
4298
  STATE_STORE_CANONICAL4,
4275
- WorkflowEngine6,
4299
+ WorkflowEngine7,
4276
4300
  TENANT_AUTH,
4277
4301
  ModuleRef2
4278
4302
  ]
@@ -4289,7 +4313,7 @@ var DurableModule = class _DurableModule {
4289
4313
  exports: [
4290
4314
  WorkflowService,
4291
4315
  EntityService,
4292
- WorkflowEngine6,
4316
+ WorkflowEngine7,
4293
4317
  STATE_STORE,
4294
4318
  STATE_STORE_CANONICAL4,
4295
4319
  TRANSPORT,
@@ -4305,7 +4329,7 @@ DurableModule = _ts_decorate13([
4305
4329
  ], DurableModule);
4306
4330
 
4307
4331
  // src/federated-app-gateway.ts
4308
- import { WorkflowEngine as WorkflowEngine7 } from "@dudousxd/nestjs-durable-core";
4332
+ import { WorkflowEngine as WorkflowEngine8 } from "@dudousxd/nestjs-durable-core";
4309
4333
  var FederatedAppGateway = class {
4310
4334
  static {
4311
4335
  __name(this, "FederatedAppGateway");
@@ -4320,7 +4344,7 @@ var FederatedAppGateway = class {
4320
4344
  tailing = false;
4321
4345
  constructor(options) {
4322
4346
  this.options = options;
4323
- this.reads = new StoreRunGateway(options.store, new WorkflowEngine7({
4347
+ this.reads = new StoreRunGateway(options.store, new WorkflowEngine8({
4324
4348
  store: options.store
4325
4349
  }));
4326
4350
  this.timeoutMs = options.timeoutMs ?? 1e4;
@@ -4565,7 +4589,7 @@ function federatedAppGateway(options) {
4565
4589
  __name(federatedAppGateway, "federatedAppGateway");
4566
4590
 
4567
4591
  // src/index.ts
4568
- import { DuplicateDurableCopyError, hmacTenantVerifier, LIFECYCLE_PENDING_TAG, lifecycleRunId, lifecycleSourceOf as lifecycleSourceOf2, prevCronFireMs, readSearchAttributes as readSearchAttributes2, RunGateway as RunGateway3, runCompletedEvent as runCompletedEvent2, runFailedEvent as runFailedEvent2, runSchedules as runSchedules2, scheduledRunId, scheduleRunIdAt, signTenantToken, triggeredRunsOf, WorkflowEngine as WorkflowEngine8 } from "@dudousxd/nestjs-durable-core";
4592
+ import { DuplicateDurableCopyError, hmacTenantVerifier, LIFECYCLE_PENDING_TAG, lifecycleRunId, lifecycleSourceOf as lifecycleSourceOf2, prevCronFireMs, readSearchAttributes as readSearchAttributes2, RunGateway as RunGateway3, runCompletedEvent as runCompletedEvent2, runFailedEvent as runFailedEvent2, runSchedules as runSchedules2, scheduledRunId, scheduleRunIdAt, signTenantToken, triggeredRunsOf, WorkflowEngine as WorkflowEngine9 } from "@dudousxd/nestjs-durable-core";
4569
4593
  export {
4570
4594
  BAD_RUN_REQUEST,
4571
4595
  CONTEXT_ACCESSOR,
@@ -4614,7 +4638,7 @@ export {
4614
4638
  UNSUPPORTED_RUN_REQUEST,
4615
4639
  WORKFLOW_METADATA,
4616
4640
  Workflow,
4617
- WorkflowEngine8 as WorkflowEngine,
4641
+ WorkflowEngine9 as WorkflowEngine,
4618
4642
  WorkflowService,
4619
4643
  attributesOf,
4620
4644
  entityConfigFor,