@nagi-js/core 0.1.1-rc.20 → 0.1.1-rc.22

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.ts CHANGED
@@ -1,67 +1,9 @@
1
- import { aD as StandardSchemaV1, aQ as StepMap, o as FlowConfig, g as Flow, aE as Step, _ as Optional, aO as StepId, aP as StepKind, B as BackoffStrategy, T as Millis, ao as RunId$1, c as Clock, a7 as Queue, a9 as QueueEnqueueOpts, a8 as QueueDequeueOpts, ab as QueueMessage, aa as QueueInspectEntry, b0 as Store, F as Fact, y as FlowStartedFact, d as ConcurrencyMode, h as FlowCanceledByConcurrencyFact, ba as Tx, aq as RunState, A as AttemptNumber, b as ClaimToken, ac as ReapedLease, aJ as StepCompletedFact, aN as StepFailedFact, J as Json, av as SettleSignalResult, b9 as TimedOutSignal, aH as StepCanceledFact, G as GlobalFact, a4 as QueryRunsOpts, a5 as QueryRunsResult, an as RunDescription, a2 as PruneOpts, a3 as PruneResult, b2 as StreamTransport, aC as SnapshotGonePolicy, s as FlowHooks, E as LogEntry, ak as RetryPolicy, e as DriftPolicy, bc as WorkerConfig, u as FlowInput, bb as Worker, ag as ReplayOpts, t as FlowIdOf, b1 as StreamEvent, Y as Operator, aw as SignalBufferedFact, az as SignalReceivedFact, ar as RunStatus, a1 as PrunableStatus } from './types-DFSYjJE3.js';
2
- export { a as Builder, C as CancelArgs, D as DEFAULT_REAPER_INTERVAL_MS, f as FactKind, i as FlowCanceledByOperatorFact, j as FlowCanceledExplicitlyFact, k as FlowCanceledFact, l as FlowCompleteEvent, m as FlowCompletedFact, n as FlowConcurrency, p as FlowErrorEvent, q as FlowEvent, r as FlowFailedFact, v as FlowOutput, w as FlowRefUpdatedFact, x as FlowStartEvent, I as InferSchemaInput, z as InferSchemaOutput, L as LeaseReapedFact, H as LogLevel, K as Logger, M as MatchArm, N as MatchArmGuard, O as MatchArmOtherwise, P as MatchArmOutput, Q as MatchArmSelectedFact, R as MatchArmShape, S as MatchGuardConfig, U as NeedRef, V as NeedsMap, W as NeedsOutputs, X as OnceRecordedFact, Z as OperatorAuditOpts, $ as ParentLink, a0 as ParentRef, a6 as QueryRunsWhere, ad as ReaperDecision, ae as Register, af as ReplayMode, ah as Resolved, ai as ResolvedConcurrency, aj as ResolvedNeeds, al as RowDelta, am as RunCancelCause, ap as RunPhase, as as RunSummary, at as RunView, au as SerializedError, ax as SignalConfig, ay as SignalReceivedEvent, aA as SkipReason, aB as SnapshotGoneDisposition, aF as StepAbortRequestedFact, aG as StepCancelCause, aI as StepCompleteEvent, aK as StepCtx, aL as StepErrorEvent, aM as StepEvent, aR as StepOutput, aS as StepResetFact, aT as StepRetriedFact, aU as StepRetryEvent, aV as StepRunStatus, aW as StepSkippedFact, aX as StepStartEvent, aY as StepStartedFact, aZ as StepState, a_ as StepStatus, a$ as StepView, b3 as StreamingStepCtx, b4 as StreamingTaskConfig, b5 as StringKeyOf, b6 as SubflowConfig, b7 as SubflowStepOutput, b8 as TaskConfig, bd as WorkerRunOnceOpts, be as WorkerRunResult, bf as WorkerRunUntilEmptyOpts, bg as attemptOf, bh as decideExpiredLeaseAction, bi as errorOf, bk as isStepTerminal, bl as isTerminalRun, bm as outputOf, bj as projectRunState, bn as resolvedOf, bo as rowDeltaOf, bp as runStatusOf, bq as stepStateOf, br as stepStatusOf, bs as unwrap } from './types-DFSYjJE3.js';
1
+ import { ay as StandardSchemaV1, aM as StepMap, q as FlowConfig, j as Flow, az as Step, T as Optional, ak as RunId$1, k as FlowCanceledByConcurrencyFact, an as RunStatus, W as PrunableStatus, E as FlowStartedFact, f as ConcurrencyMode, e as Clock, P as Millis, Z as Queue, aJ as StepId, $ as QueueEnqueueOpts, _ as QueueDequeueOpts, a1 as QueueMessage, a0 as QueueInspectEntry, aY as Store, F as Fact, ag as RunEndFact, b7 as Tx, am as RunState, b as AttemptNumber, d as ClaimToken, a2 as ReapedLease, K as Json, aq as SettleSignalResult, b6 as TimedOutSignal, G as GetOnceResult, aE as StepCompletedFact, aI as StepFailedFact, aC as StepCanceledFact, H as GlobalFact, af as RunDescription, X as PruneOpts, Y as PruneResult, aj as RunEventTransport, a$ as StreamTransport, ax as SnapshotGonePolicy, ai as RunEventEnvelope, ah as RunEvent, u as FlowHooks, M as LogEntry, ac as RetryPolicy, g as DriftPolicy, b9 as WorkerConfig, w as FlowInput, b8 as Worker, a7 as ReplayOpts, a_ as StreamEvent, ar as SignalBufferedFact, au as SignalReceivedFact, ap as SerializedError, aZ as StreamEffect } from './types-Ct5xHI4W.js';
2
+ export { A as ActivityConfig, a as ActivityCtx, B as BackoffStrategy, c as Builder, C as CancelArgs, D as DEFAULT_REAPER_INTERVAL_MS, h as FactConsequences, i as FactKind, l as FlowCanceledExplicitlyFact, m as FlowCanceledFact, n as FlowCompleteEvent, o as FlowCompletedFact, p as FlowConcurrency, r as FlowErrorEvent, s as FlowEvent, t as FlowFailedFact, v as FlowIdOf, x as FlowOutput, y as FlowRefUpdatedFact, z as FlowStartEvent, I as InferSchemaInput, J as InferSchemaOutput, L as LeaseReapedFact, N as LogLevel, O as Logger, Q as NeedRef, R as NeedsMap, S as NeedsOutputs, U as ParentLink, V as ParentRef, a3 as ReaperDecision, a4 as Register, a5 as Release, a6 as ReplayMode, a8 as ResetScope, a9 as Resolved, aa as ResolvedConcurrency, ab as ResolvedNeeds, ad as RowDelta, ae as RunCancelCause, al as RunPhase, ao as RunView, as as SignalConfig, at as SignalReceivedEvent, av as SkipReason, aw as SnapshotGoneDisposition, aA as StepAbortRequestedFact, aB as StepCancelCause, aD as StepCompleteEvent, aF as StepCtx, aG as StepErrorEvent, aH as StepEvent, aK as StepKind, aL as StepLifecycleHooks, aN as StepOutput, aO as StepResetFact, aP as StepRetriedFact, aQ as StepRetryEvent, aR as StepRunStatus, aS as StepSkippedFact, aT as StepStartEvent, aU as StepStartedFact, aV as StepState, aW as StepStatus, aX as StepView, b0 as StreamingStepCtx, b1 as StreamingTaskConfig, b2 as StringKeyOf, b3 as SubflowConfig, b4 as SubflowStepOutput, b5 as TaskConfig, ba as WorkerRunOnceOpts, bb as WorkerRunResult, bc as WorkerRunUntilEmptyOpts, bd as attemptOf, be as decideExpiredLeaseAction, bf as errorOf, bg as factConsequences, bi as isRunEnd, bj as isStepTerminal, bk as isTerminalRun, bl as outputOf, bh as projectRunState, bm as resolvedOf, bn as runStatusOf, bo as stepStateOf, bp as stepStatusOf, bq as unwrap } from './types-Ct5xHI4W.js';
3
3
 
4
4
  declare function flow<const Id extends string, InputSchema extends StandardSchemaV1, R extends StepMap, Output = unknown>(config: FlowConfig<Id, InputSchema, R, Output>): Flow<Id, InputSchema, R, Output>;
5
5
  declare function optional<S extends Step>(step: S): Optional<S>;
6
6
 
7
- interface CanonicalRetryPolicy {
8
- readonly maxAttempts: number;
9
- readonly backoff: BackoffStrategy;
10
- readonly initialDelayMs: Millis;
11
- readonly maxDelayMs: Millis;
12
- }
13
- interface CanonicalSchema {
14
- readonly vendor: string;
15
- readonly version: number;
16
- readonly validateHash: string;
17
- }
18
- interface CanonicalMatchArm {
19
- readonly id: string;
20
- readonly otherwise?: true;
21
- readonly whenHash?: string;
22
- readonly stepIds: readonly StepId[];
23
- }
24
- interface CanonicalStep {
25
- readonly id: StepId;
26
- readonly kind: StepKind;
27
- readonly needs: readonly StepId[];
28
- readonly whenHash?: string;
29
- readonly retry?: CanonicalRetryPolicy;
30
- readonly timeoutMs?: Millis;
31
- readonly signalSchema?: CanonicalSchema;
32
- readonly signalNames?: readonly string[];
33
- readonly matchArms?: readonly CanonicalMatchArm[];
34
- readonly childFlowId?: string;
35
- readonly subflowInputHash?: string;
36
- }
37
- interface CanonicalDag {
38
- readonly flowId: string;
39
- readonly inputSchema: CanonicalSchema;
40
- readonly steps: readonly CanonicalStep[];
41
- }
42
- declare function canonicalize(flow: Flow): Promise<CanonicalDag>;
43
- declare function sha256Canonical(dag: CanonicalDag): Promise<string>;
44
- declare function fingerprintFlows(flows: ReadonlyArray<Flow>): Promise<string>;
45
-
46
- type SnapshotChangedField = "kind" | "when" | "retry" | "timeoutMs" | "signalSchema" | "matchArms";
47
- interface SnapshotChangedEdge {
48
- readonly from: StepId;
49
- readonly to: StepId;
50
- readonly before: "needed" | "absent";
51
- readonly after: "needed" | "absent";
52
- }
53
- interface SnapshotChangedPredicate {
54
- readonly stepId: StepId;
55
- readonly field: SnapshotChangedField;
56
- }
57
- interface SnapshotDiff {
58
- readonly addedSteps: readonly StepId[];
59
- readonly removedSteps: readonly StepId[];
60
- readonly changedEdges: readonly SnapshotChangedEdge[];
61
- readonly changedPredicates: readonly SnapshotChangedPredicate[];
62
- }
63
- declare function diffSnapshots(before: CanonicalDag, after: CanonicalDag): SnapshotDiff;
64
-
65
7
  declare class NagiValidationError extends Error {
66
8
  readonly issues: ReadonlyArray<StandardSchemaV1.Issue>;
67
9
  constructor(issues: ReadonlyArray<StandardSchemaV1.Issue>);
@@ -94,6 +36,18 @@ declare class NagiSignalTimeoutError extends Error {
94
36
  readonly fireAt: Date;
95
37
  });
96
38
  }
39
+ declare class NagiStepTimeoutError extends Error {
40
+ readonly runId: RunId$1;
41
+ readonly stepId: string;
42
+ readonly attempt: number;
43
+ readonly timeoutMs: number;
44
+ constructor({ runId, stepId, attempt, timeoutMs, }: {
45
+ readonly runId: RunId$1;
46
+ readonly stepId: string;
47
+ readonly attempt: number;
48
+ readonly timeoutMs: number;
49
+ });
50
+ }
97
51
  declare class NagiFlowSnapshotGoneError extends Error {
98
52
  readonly runId: RunId$1;
99
53
  readonly flowId: string;
@@ -127,6 +81,36 @@ declare class NagiSnapshotDriftError extends Error {
127
81
  });
128
82
  }
129
83
 
84
+ declare const DEFAULT_SWEEP_LIMIT = 100;
85
+ declare function selectExpired<T>(items: Iterable<T>, args: {
86
+ readonly now: Date;
87
+ readonly limit: number;
88
+ readonly deadline: (item: T) => Date;
89
+ }): T[];
90
+ interface PruneCandidate {
91
+ readonly runId: RunId$1;
92
+ readonly status: RunStatus;
93
+ readonly completedAt: Date | null;
94
+ }
95
+ declare function selectPruneBatch<T extends PruneCandidate>(candidates: Iterable<T>, opts: {
96
+ readonly olderThan: Date;
97
+ readonly statuses: ReadonlyArray<PrunableStatus>;
98
+ readonly batchSize: number;
99
+ }): T[];
100
+ declare function admitsRunEnd(status: RunStatus | undefined): boolean;
101
+ interface Superseded {
102
+ readonly runId: RunId$1;
103
+ readonly fact: FlowCanceledByConcurrencyFact;
104
+ }
105
+ declare function supersede(args: {
106
+ readonly start: FlowStartedFact;
107
+ readonly concurrency: {
108
+ readonly key: string;
109
+ readonly mode: ConcurrencyMode;
110
+ };
111
+ readonly priors: Iterable<RunId$1>;
112
+ }): Superseded[];
113
+
130
114
  interface InMemoryStoreOpts {
131
115
  readonly leaseMs?: Millis;
132
116
  }
@@ -140,35 +124,34 @@ declare class InMemoryStore implements Store {
140
124
  private readonly activeByKey;
141
125
  private readonly keyByActiveRun;
142
126
  private readonly slotByRun;
143
- private readonly childrenByParent;
144
- private readonly summaries;
127
+ private readonly runRows;
128
+ private readonly stepRows;
145
129
  private readonly streamHub;
146
130
  private readonly signalTimers;
147
131
  private readonly leaseMs;
148
132
  constructor(opts?: InMemoryStoreOpts);
149
- appendFact(runId: RunId$1, fact: Fact): Promise<void>;
133
+ appendFact(runId: RunId$1, fact: Exclude<Fact, RunEndFact>): Promise<void>;
134
+ endRun(runId: RunId$1, fact: RunEndFact): Promise<boolean>;
135
+ private writeFact;
136
+ private applyRows;
137
+ private release;
150
138
  private releaseLeases;
151
139
  tryStartRun(runId: RunId$1, fact: FlowStartedFact, concurrency?: {
152
140
  readonly key: string;
153
141
  readonly mode: ConcurrencyMode;
154
142
  }): Promise<{
155
143
  readonly started: boolean;
156
- readonly canceled: ReadonlyArray<{
157
- readonly runId: RunId$1;
158
- readonly fact: FlowCanceledByConcurrencyFact;
159
- }>;
144
+ readonly canceled: ReadonlyArray<Superseded>;
160
145
  }>;
161
146
  tryStartRunOnTx(_tx: Tx, runId: RunId$1, fact: FlowStartedFact, concurrency?: {
162
147
  readonly key: string;
163
148
  readonly mode: ConcurrencyMode;
164
149
  }): Promise<{
165
150
  readonly started: boolean;
166
- readonly canceled: ReadonlyArray<{
167
- readonly runId: RunId$1;
168
- readonly fact: FlowCanceledByConcurrencyFact;
169
- }>;
151
+ readonly canceled: ReadonlyArray<Superseded>;
170
152
  }>;
171
153
  listChildren(parentRunId: RunId$1): Promise<ReadonlyArray<RunId$1>>;
154
+ private childRows;
172
155
  private hasActiveChild;
173
156
  loadRunState(runId: RunId$1): Promise<RunState>;
174
157
  claimStep(runId: RunId$1, stepId: StepId, attempt: AttemptNumber): Promise<ClaimToken | null>;
@@ -178,7 +161,6 @@ declare class InMemoryStore implements Store {
178
161
  readonly queue: Queue;
179
162
  readonly limit?: number;
180
163
  }): Promise<readonly ReapedLease[]>;
181
- settleStep(runId: RunId$1, _stepId: StepId, fact: StepCompletedFact | StepFailedFact): Promise<void>;
182
164
  settleSignal(args: {
183
165
  readonly runId: RunId$1;
184
166
  readonly stepId: StepId;
@@ -194,7 +176,7 @@ declare class InMemoryStore implements Store {
194
176
  readonly limit?: number;
195
177
  }): Promise<readonly TimedOutSignal[]>;
196
178
  recordOnce(runId: RunId$1, stepId: StepId, scope: string, value: Json): Promise<void>;
197
- getOnce(runId: RunId$1, stepId: StepId, scope: string): Promise<Json | null>;
179
+ getOnce(runId: RunId$1, stepId: StepId, scope: string): Promise<GetOnceResult>;
198
180
  runStep<T extends Json>(runId: RunId$1, _stepId: StepId, _attempt: AttemptNumber, body: (tx: Tx) => Promise<{
199
181
  readonly output: T;
200
182
  readonly fact: StepCompletedFact | StepFailedFact | StepCanceledFact;
@@ -212,11 +194,12 @@ declare class InMemoryStore implements Store {
212
194
  } | null>;
213
195
  appendGlobalFact(fact: GlobalFact): Promise<void>;
214
196
  readGlobalFacts(): ReadonlyArray<GlobalFact>;
215
- queryRuns(opts: QueryRunsOpts): Promise<QueryRunsResult>;
216
197
  describe(runId: RunId$1): Promise<RunDescription>;
217
- private describeSummary;
198
+ private stepView;
218
199
  pruneFacts(opts: Required<PruneOpts>): Promise<PruneResult>;
219
200
  private pruneCandidates;
201
+ private readonly eventHub;
202
+ readonly events: RunEventTransport;
220
203
  readonly stream: StreamTransport;
221
204
  }
222
205
 
@@ -244,6 +227,16 @@ declare class InMemoryClock implements Clock {
244
227
 
245
228
  declare const defaultSnapshotGonePolicy: SnapshotGonePolicy;
246
229
 
230
+ declare function isTerminalRunEvent(event: RunEvent): boolean;
231
+ type Handler = (event: RunEventEnvelope) => void;
232
+ declare class InMemoryRunEventHub {
233
+ private readonly perRun;
234
+ private readonly all;
235
+ publish(envelope: RunEventEnvelope): void;
236
+ watchRun(runId: RunId$1, handler: Handler): () => void;
237
+ watchRuns(handler: Handler): () => void;
238
+ }
239
+
247
240
  type RunId = RunId$1;
248
241
  declare const RunId: {
249
242
  readonly parse: (s: string) => RunId;
@@ -263,6 +256,7 @@ interface NagiConfig {
263
256
  readonly heartbeatIntervalMs?: Millis;
264
257
  readonly heartbeatLeaseMs?: Millis;
265
258
  readonly leaseHoldWarnMs?: Millis;
259
+ /** @deprecated Set `WorkerConfig.reaperIntervalMs`; this is only its fallback. */
266
260
  readonly reaperIntervalMs?: Millis;
267
261
  }
268
262
  interface StartOpts {
@@ -293,13 +287,13 @@ interface Wf<TFlows extends ReadonlyArray<Flow> = ReadonlyArray<Flow>> {
293
287
  cancel(runId: RunId$1, opts?: CancelOpts): Promise<void>;
294
288
  worker(config?: WorkerConfig): Worker;
295
289
  replay(runId: RunId$1, opts?: ReplayOpts): Promise<void>;
296
- queryRuns(opts?: QueryRunsOpts<FlowIdOf<TFlows>>): Promise<QueryRunsResult<FlowIdOf<TFlows>>>;
297
290
  describe(runId: RunId$1): Promise<RunDescription>;
298
291
  inspectQueue(runId: RunId$1): Promise<readonly QueueInspectEntry[]>;
299
292
  subscribe<C = Json>(runId: RunId$1, stepId: StepId, opts?: {
300
293
  readonly replayBuffered?: boolean;
301
294
  }): AsyncIterable<StreamEvent<C>>;
302
- operator(): Operator;
295
+ watchRun(runId: RunId$1, handler: (e: RunEventEnvelope) => void): () => void;
296
+ watchRuns(handler: (e: RunEventEnvelope) => void): () => void;
303
297
  pruneFacts(opts: PruneOpts): Promise<PruneResult>;
304
298
  }
305
299
  declare function nagiImpl<const TFlows extends ReadonlyArray<Flow>>(config: NagiConfig & {
@@ -363,43 +357,24 @@ declare class NagiAbortError extends Error {
363
357
  constructor(runId: RunId$1, kind: "run" | "step");
364
358
  }
365
359
 
366
- declare const QUERY_RUNS_DEFAULT_LIMIT = 50;
367
- declare const QUERY_RUNS_MAX_LIMIT = 500;
368
- declare function clampQueryLimit(limit: number | undefined): number;
369
- interface RunCursor {
370
- readonly startedAt: Date;
371
- readonly runId: RunId$1;
372
- }
373
- declare function compareRunOrder(a: RunCursor, b: RunCursor): number;
374
- declare function isPastCursor(row: RunCursor, cursor: RunCursor): boolean;
375
- declare function encodeRunCursor(c: RunCursor): string;
376
- declare function decodeRunCursor(s: string): RunCursor;
377
- declare function jsonContains(haystack: Json, needle: Json): boolean;
378
- declare const DEFAULT_SWEEP_LIMIT = 100;
379
- declare function selectExpired<T>(items: Iterable<T>, args: {
380
- readonly now: Date;
381
- readonly limit: number;
382
- readonly deadline: (item: T) => Date;
383
- }): T[];
384
- interface PruneCandidate {
385
- readonly runId: RunId$1;
386
- readonly status: RunStatus;
387
- readonly completedAt: Date | null;
360
+ declare function isStreamOver(state: RunState, stepId: StepId): boolean;
361
+ declare const STREAM_SUBSCRIBER_BUFFER_CAP = 256;
362
+ declare const STREAM_REPLAY_BUFFER_CAP = 256;
363
+ declare class InMemoryStreamHub {
364
+ private readonly channels;
365
+ private readonly closedKeys;
366
+ private static key;
367
+ private openChannel;
368
+ private closeChannel;
369
+ publishChunk(runId: RunId$1, stepId: StepId, chunk: Json): void;
370
+ signalRetry(runId: RunId$1, stepId: StepId, attempt: AttemptNumber): void;
371
+ closeOk(runId: RunId$1, stepId: StepId): void;
372
+ closeError(runId: RunId$1, stepId: StepId, error: SerializedError): void;
373
+ apply(runId: RunId$1, effect: StreamEffect): void;
374
+ closeRun(runId: RunId$1): void;
375
+ subscribeStream(runId: RunId$1, stepId: StepId, opts?: {
376
+ readonly replayBuffered?: boolean;
377
+ }): AsyncIterable<StreamEvent<Json>>;
388
378
  }
389
- declare function selectPruneBatch<T extends PruneCandidate>(candidates: Iterable<T>, opts: {
390
- readonly olderThan: Date;
391
- readonly statuses: ReadonlyArray<PrunableStatus>;
392
- readonly batchSize: number;
393
- }): T[];
394
- type FactEffects = {
395
- readonly tag: "none";
396
- } | {
397
- readonly tag: "release-step";
398
- readonly stepId: StepId;
399
- readonly timer: boolean;
400
- } | {
401
- readonly tag: "release-run";
402
- };
403
- declare function factEffects(fact: Fact): FactEffects;
404
379
 
405
- export { AttemptNumber, BackoffStrategy, type CanonicalDag, type CanonicalMatchArm, type CanonicalRetryPolicy, type CanonicalSchema, type CanonicalStep, ClaimToken, Clock, ConcurrencyMode, DEFAULT_SWEEP_LIMIT, DriftPolicy, Fact, type FactEffects, Flow, FlowCanceledByConcurrencyFact, FlowConfig, FlowHooks, FlowIdOf, FlowInput, FlowStartedFact, GlobalFact, InMemoryClock, InMemoryQueue, InMemoryStore, Json, LogEntry, Millis, NagiAbortError, NagiCanceledError, NagiConcurrencyConflictError, type NagiConfig, NagiFlowSnapshotGoneError, NagiNonRetryableError, type NagiRunConfig, NagiRuntimeError, NagiSignalTimeoutError, NagiSnapshotDriftError, NagiValidationError, Operator, Optional, PrunableStatus, type PruneCandidate, PruneOpts, PruneResult, QUERY_RUNS_DEFAULT_LIMIT, QUERY_RUNS_MAX_LIMIT, QueryRunsOpts, QueryRunsResult, Queue, QueueDequeueOpts, QueueEnqueueOpts, QueueInspectEntry, QueueMessage, ReapedLease, ReplayOpts, RetryPolicy, type RunCursor, RunDescription, RunId, RunState, RunStatus, type RuntimeHandle, SettleSignalResult, SignalBufferedFact, type SignalDecision, SignalReceivedFact, type SnapshotChangedEdge, type SnapshotChangedField, type SnapshotDiff, SnapshotGonePolicy, StandardSchemaV1, type StartOpts, type StartStagedOpts, type StartStagedResult, Step, StepCanceledFact, StepCompletedFact, StepFailedFact, StepId, StepKind, StepMap, Store, StreamEvent, StreamTransport, TimedOutSignal, type TimeoutDecision, Tx, type Wf, Worker, WorkerConfig, canonicalize, clampQueryLimit, compareRunOrder, decideSignal, decideTimeout, decodeRunCursor, defaultSnapshotGonePolicy, diffSnapshots, encodeRunCursor, factEffects, fingerprintFlows, flow, isPastCursor, jsonContains, nagi, optional, selectExpired, selectPruneBatch, sha256Canonical };
380
+ export { AttemptNumber, ClaimToken, Clock, ConcurrencyMode, DEFAULT_SWEEP_LIMIT, DriftPolicy, Fact, Flow, FlowCanceledByConcurrencyFact, FlowConfig, FlowHooks, FlowInput, FlowStartedFact, GetOnceResult, GlobalFact, InMemoryClock, InMemoryQueue, InMemoryRunEventHub, InMemoryStore, InMemoryStreamHub, Json, LogEntry, Millis, NagiAbortError, NagiCanceledError, NagiConcurrencyConflictError, type NagiConfig, NagiFlowSnapshotGoneError, NagiNonRetryableError, type NagiRunConfig, NagiRuntimeError, NagiSignalTimeoutError, NagiSnapshotDriftError, NagiStepTimeoutError, NagiValidationError, Optional, PrunableStatus, type PruneCandidate, PruneOpts, PruneResult, Queue, QueueDequeueOpts, QueueEnqueueOpts, QueueInspectEntry, QueueMessage, ReapedLease, ReplayOpts, RetryPolicy, RunDescription, RunEndFact, RunEvent, RunEventEnvelope, RunEventTransport, RunId, RunState, RunStatus, type RuntimeHandle, STREAM_REPLAY_BUFFER_CAP, STREAM_SUBSCRIBER_BUFFER_CAP, SerializedError, SettleSignalResult, SignalBufferedFact, type SignalDecision, SignalReceivedFact, SnapshotGonePolicy, StandardSchemaV1, type StartOpts, type StartStagedOpts, type StartStagedResult, Step, StepCanceledFact, StepCompletedFact, StepFailedFact, StepId, StepMap, Store, StreamEffect, StreamEvent, StreamTransport, TimedOutSignal, type TimeoutDecision, Tx, type Wf, Worker, WorkerConfig, admitsRunEnd, decideSignal, decideTimeout, defaultSnapshotGonePolicy, flow, isStreamOver, isTerminalRunEvent, nagi, optional, selectExpired, selectPruneBatch, supersede };