@nagi-js/core 0.1.1-rc.21 → 0.1.1-rc.23

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 { aI as StandardSchemaV1, aV as StepMap, o as FlowConfig, g as Flow, aJ as Step, $ as Optional, aT as StepId, aU as StepKind, B as BackoffStrategy, T as Millis, at as RunId$1, c as Clock, a8 as Queue, aa as QueueEnqueueOpts, a9 as QueueDequeueOpts, ac as QueueMessage, ab as QueueInspectEntry, b5 as Store, F as Fact, y as FlowStartedFact, d as ConcurrencyMode, h as FlowCanceledByConcurrencyFact, bf as Tx, av as RunState, A as AttemptNumber, b as ClaimToken, ad as ReapedLease, aO as StepCompletedFact, aS as StepFailedFact, J as Json, aA as SettleSignalResult, be as TimedOutSignal, aM as StepCanceledFact, G as GlobalFact, a5 as QueryRunsOpts, a6 as QueryRunsResult, ap as RunDescription, a3 as PruneOpts, a4 as PruneResult, as as RunEventTransport, b7 as StreamTransport, aH as SnapshotGonePolicy, ar as RunEventEnvelope, aq as RunEvent, s as FlowHooks, E as LogEntry, am as RetryPolicy, e as DriftPolicy, bh as WorkerConfig, u as FlowInput, bg as Worker, ah as ReplayOpts, t as FlowIdOf, b6 as StreamEvent, Y as Operator, aB as SignalBufferedFact, aE as SignalReceivedFact, aw as RunStatus, a2 as PrunableStatus, az as SerializedError } from './types-KjCWK9pN.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 OperatorRetryOpts, a0 as ParentLink, a1 as ParentRef, a7 as QueryRunsWhere, ae as ReaperDecision, af as Register, ag as ReplayMode, ai as ResetScope, aj as Resolved, ak as ResolvedConcurrency, al as ResolvedNeeds, an as RowDelta, ao as RunCancelCause, au as RunPhase, ax as RunSummary, ay as RunView, aC as SignalConfig, aD as SignalReceivedEvent, aF as SkipReason, aG as SnapshotGoneDisposition, aK as StepAbortRequestedFact, aL as StepCancelCause, aN as StepCompleteEvent, aP as StepCtx, aQ as StepErrorEvent, aR as StepEvent, aW as StepOutput, aX as StepResetFact, aY as StepRetriedFact, aZ as StepRetryEvent, a_ as StepRunStatus, a$ as StepSkippedFact, b0 as StepStartEvent, b1 as StepStartedFact, b2 as StepState, b3 as StepStatus, b4 as StepView, b8 as StreamingStepCtx, b9 as StreamingTaskConfig, ba as StringKeyOf, bb as SubflowConfig, bc as SubflowStepOutput, bd as TaskConfig, bi as WorkerRunOnceOpts, bj as WorkerRunResult, bk as WorkerRunUntilEmptyOpts, bl as attemptOf, bm as decideExpiredLeaseAction, bn as errorOf, bp as isStepTerminal, bq as isTerminalRun, br as outputOf, bo as projectRunState, bs as resolvedOf, bt as rowDeltaOf, bu as runStatusOf, bv as stepStateOf, bw as stepStatusOf, bx as unwrap } from './types-KjCWK9pN.js';
1
+ import { ax as StandardSchemaV1, aL as StepMap, q as FlowConfig, j as Flow, ay as Step, T as Optional, aj as RunId$1, k as FlowCanceledByConcurrencyFact, am as RunStatus, V as PrunableStatus, E as FlowStartedFact, f as ConcurrencyMode, e as Clock, P as Millis, Y as Queue, aI as StepId, _ as QueueEnqueueOpts, Z as QueueDequeueOpts, a0 as QueueMessage, $ as QueueInspectEntry, aX as Store, F as Fact, af as RunEndFact, b6 as Tx, al as RunState, b as AttemptNumber, d as ClaimToken, a1 as ReapedLease, K as Json, ap as SettleSignalResult, b5 as TimedOutSignal, G as GetOnceResult, aD as StepCompletedFact, aH as StepFailedFact, aB as StepCanceledFact, H as GlobalFact, ae as RunDescription, W as PruneOpts, X as PruneResult, ai as RunEventTransport, a_ as StreamTransport, aw as SnapshotGonePolicy, ah as RunEventEnvelope, ag as RunEvent, u as FlowHooks, M as LogEntry, ab as RetryPolicy, g as DriftPolicy, b8 as WorkerConfig, w as FlowInput, b7 as Worker, a6 as ReplayOpts, aZ as StreamEvent, aq as SignalBufferedFact, at as SignalReceivedFact, ao as SerializedError, aY as StreamEffect } from './types-CezUTCly.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, a2 as ReaperDecision, a3 as Register, a4 as Release, a5 as ReplayMode, a7 as ResetScope, a8 as Resolved, a9 as ResolvedConcurrency, aa as ResolvedNeeds, ac as RowDelta, ad as RunCancelCause, ak as RunPhase, an as RunView, ar as SignalConfig, as as SignalReceivedEvent, au as SkipReason, av as SnapshotGoneDisposition, az as StepAbortRequestedFact, aA as StepCancelCause, aC as StepCompleteEvent, aE as StepCtx, aF as StepErrorEvent, aG as StepEvent, aJ as StepKind, aK as StepLifecycleHooks, aM as StepOutput, aN as StepResetFact, aO as StepRetriedFact, aP as StepRetryEvent, aQ as StepRunStatus, aR as StepSkippedFact, aS as StepStartEvent, aT as StepStartedFact, aU as StepState, aV as StepStatus, aW as StepView, a$ as StreamingStepCtx, b0 as StreamingTaskConfig, b1 as StringKeyOf, b2 as SubflowConfig, b3 as SubflowStepOutput, b4 as TaskConfig, b9 as WorkerRunOnceOpts, ba as WorkerRunResult, bb as WorkerRunUntilEmptyOpts, bc as attemptOf, bd as decideExpiredLeaseAction, be as errorOf, bf as factConsequences, bh as isRunEnd, bi as isStepTerminal, bj as isTerminalRun, bk as outputOf, bg as projectRunState, bl as resolvedOf, bm as runStatusOf, bn as stepStateOf, bo as stepStatusOf, bp as unwrap } from './types-CezUTCly.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>);
@@ -139,6 +81,36 @@ declare class NagiSnapshotDriftError extends Error {
139
81
  });
140
82
  }
141
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
+
142
114
  interface InMemoryStoreOpts {
143
115
  readonly leaseMs?: Millis;
144
116
  }
@@ -152,35 +124,34 @@ declare class InMemoryStore implements Store {
152
124
  private readonly activeByKey;
153
125
  private readonly keyByActiveRun;
154
126
  private readonly slotByRun;
155
- private readonly childrenByParent;
156
- private readonly summaries;
127
+ private readonly runRows;
128
+ private readonly stepRows;
157
129
  private readonly streamHub;
158
130
  private readonly signalTimers;
159
131
  private readonly leaseMs;
160
132
  constructor(opts?: InMemoryStoreOpts);
161
- 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;
162
138
  private releaseLeases;
163
139
  tryStartRun(runId: RunId$1, fact: FlowStartedFact, concurrency?: {
164
140
  readonly key: string;
165
141
  readonly mode: ConcurrencyMode;
166
142
  }): Promise<{
167
143
  readonly started: boolean;
168
- readonly canceled: ReadonlyArray<{
169
- readonly runId: RunId$1;
170
- readonly fact: FlowCanceledByConcurrencyFact;
171
- }>;
144
+ readonly canceled: ReadonlyArray<Superseded>;
172
145
  }>;
173
146
  tryStartRunOnTx(_tx: Tx, runId: RunId$1, fact: FlowStartedFact, concurrency?: {
174
147
  readonly key: string;
175
148
  readonly mode: ConcurrencyMode;
176
149
  }): Promise<{
177
150
  readonly started: boolean;
178
- readonly canceled: ReadonlyArray<{
179
- readonly runId: RunId$1;
180
- readonly fact: FlowCanceledByConcurrencyFact;
181
- }>;
151
+ readonly canceled: ReadonlyArray<Superseded>;
182
152
  }>;
183
153
  listChildren(parentRunId: RunId$1): Promise<ReadonlyArray<RunId$1>>;
154
+ private childRows;
184
155
  private hasActiveChild;
185
156
  loadRunState(runId: RunId$1): Promise<RunState>;
186
157
  claimStep(runId: RunId$1, stepId: StepId, attempt: AttemptNumber): Promise<ClaimToken | null>;
@@ -190,7 +161,6 @@ declare class InMemoryStore implements Store {
190
161
  readonly queue: Queue;
191
162
  readonly limit?: number;
192
163
  }): Promise<readonly ReapedLease[]>;
193
- settleStep(runId: RunId$1, _stepId: StepId, fact: StepCompletedFact | StepFailedFact): Promise<void>;
194
164
  settleSignal(args: {
195
165
  readonly runId: RunId$1;
196
166
  readonly stepId: StepId;
@@ -206,7 +176,7 @@ declare class InMemoryStore implements Store {
206
176
  readonly limit?: number;
207
177
  }): Promise<readonly TimedOutSignal[]>;
208
178
  recordOnce(runId: RunId$1, stepId: StepId, scope: string, value: Json): Promise<void>;
209
- getOnce(runId: RunId$1, stepId: StepId, scope: string): Promise<Json | null>;
179
+ getOnce(runId: RunId$1, stepId: StepId, scope: string): Promise<GetOnceResult>;
210
180
  runStep<T extends Json>(runId: RunId$1, _stepId: StepId, _attempt: AttemptNumber, body: (tx: Tx) => Promise<{
211
181
  readonly output: T;
212
182
  readonly fact: StepCompletedFact | StepFailedFact | StepCanceledFact;
@@ -224,10 +194,8 @@ declare class InMemoryStore implements Store {
224
194
  } | null>;
225
195
  appendGlobalFact(fact: GlobalFact): Promise<void>;
226
196
  readGlobalFacts(): ReadonlyArray<GlobalFact>;
227
- queryRuns(opts: QueryRunsOpts): Promise<QueryRunsResult>;
228
197
  describe(runId: RunId$1): Promise<RunDescription>;
229
- private runExists;
230
- private describeSummary;
198
+ private stepView;
231
199
  pruneFacts(opts: Required<PruneOpts>): Promise<PruneResult>;
232
200
  private pruneCandidates;
233
201
  private readonly eventHub;
@@ -259,7 +227,6 @@ declare class InMemoryClock implements Clock {
259
227
 
260
228
  declare const defaultSnapshotGonePolicy: SnapshotGonePolicy;
261
229
 
262
- declare function runEventOf(fact: Fact): RunEvent | null;
263
230
  declare function isTerminalRunEvent(event: RunEvent): boolean;
264
231
  type Handler = (event: RunEventEnvelope) => void;
265
232
  declare class InMemoryRunEventHub {
@@ -289,6 +256,7 @@ interface NagiConfig {
289
256
  readonly heartbeatIntervalMs?: Millis;
290
257
  readonly heartbeatLeaseMs?: Millis;
291
258
  readonly leaseHoldWarnMs?: Millis;
259
+ /** @deprecated Set `WorkerConfig.reaperIntervalMs`; this is only its fallback. */
292
260
  readonly reaperIntervalMs?: Millis;
293
261
  }
294
262
  interface StartOpts {
@@ -319,7 +287,6 @@ interface Wf<TFlows extends ReadonlyArray<Flow> = ReadonlyArray<Flow>> {
319
287
  cancel(runId: RunId$1, opts?: CancelOpts): Promise<void>;
320
288
  worker(config?: WorkerConfig): Worker;
321
289
  replay(runId: RunId$1, opts?: ReplayOpts): Promise<void>;
322
- queryRuns(opts?: QueryRunsOpts<FlowIdOf<TFlows>>): Promise<QueryRunsResult<FlowIdOf<TFlows>>>;
323
290
  describe(runId: RunId$1): Promise<RunDescription>;
324
291
  inspectQueue(runId: RunId$1): Promise<readonly QueueInspectEntry[]>;
325
292
  subscribe<C = Json>(runId: RunId$1, stepId: StepId, opts?: {
@@ -327,7 +294,6 @@ interface Wf<TFlows extends ReadonlyArray<Flow> = ReadonlyArray<Flow>> {
327
294
  }): AsyncIterable<StreamEvent<C>>;
328
295
  watchRun(runId: RunId$1, handler: (e: RunEventEnvelope) => void): () => void;
329
296
  watchRuns(handler: (e: RunEventEnvelope) => void): () => void;
330
- operator(): Operator;
331
297
  pruneFacts(opts: PruneOpts): Promise<PruneResult>;
332
298
  }
333
299
  declare function nagiImpl<const TFlows extends ReadonlyArray<Flow>>(config: NagiConfig & {
@@ -391,59 +357,24 @@ declare class NagiAbortError extends Error {
391
357
  constructor(runId: RunId$1, kind: "run" | "step");
392
358
  }
393
359
 
394
- declare const QUERY_RUNS_DEFAULT_LIMIT = 50;
395
- declare const QUERY_RUNS_MAX_LIMIT = 500;
396
- declare function clampQueryLimit(limit: number | undefined): number;
397
- interface RunCursor {
398
- readonly startedAt: Date;
399
- readonly runId: RunId$1;
400
- }
401
- declare function compareRunOrder(a: RunCursor, b: RunCursor): number;
402
- declare function isPastCursor(row: RunCursor, cursor: RunCursor): boolean;
403
- declare function encodeRunCursor(c: RunCursor): string;
404
- declare function decodeRunCursor(s: string): RunCursor;
405
- declare function jsonContains(haystack: Json, needle: Json): boolean;
406
- declare const DEFAULT_SWEEP_LIMIT = 100;
407
- declare function selectExpired<T>(items: Iterable<T>, args: {
408
- readonly now: Date;
409
- readonly limit: number;
410
- readonly deadline: (item: T) => Date;
411
- }): T[];
412
- interface PruneCandidate {
413
- readonly runId: RunId$1;
414
- readonly status: RunStatus;
415
- readonly completedAt: Date | null;
416
- }
417
- declare function selectPruneBatch<T extends PruneCandidate>(candidates: Iterable<T>, opts: {
418
- readonly olderThan: Date;
419
- readonly statuses: ReadonlyArray<PrunableStatus>;
420
- readonly batchSize: number;
421
- }): T[];
422
- type FactEffects = {
423
- readonly tag: "none";
424
- } | {
425
- readonly tag: "release-step";
426
- readonly stepId: StepId;
427
- readonly timer: boolean;
428
- } | {
429
- readonly tag: "release-run";
430
- };
431
- declare function factEffects(fact: Fact): FactEffects;
432
-
360
+ declare function isStreamOver(state: RunState, stepId: StepId): boolean;
433
361
  declare const STREAM_SUBSCRIBER_BUFFER_CAP = 256;
434
362
  declare const STREAM_REPLAY_BUFFER_CAP = 256;
435
363
  declare class InMemoryStreamHub {
436
364
  private readonly channels;
365
+ private readonly closedKeys;
437
366
  private static key;
438
- private getOrCreate;
367
+ private openChannel;
368
+ private closeChannel;
439
369
  publishChunk(runId: RunId$1, stepId: StepId, chunk: Json): void;
440
370
  signalRetry(runId: RunId$1, stepId: StepId, attempt: AttemptNumber): void;
441
371
  closeOk(runId: RunId$1, stepId: StepId): void;
442
372
  closeError(runId: RunId$1, stepId: StepId, error: SerializedError): void;
373
+ apply(runId: RunId$1, effect: StreamEffect): void;
443
374
  closeRun(runId: RunId$1): void;
444
375
  subscribeStream(runId: RunId$1, stepId: StepId, opts?: {
445
376
  readonly replayBuffered?: boolean;
446
377
  }): AsyncIterable<StreamEvent<Json>>;
447
378
  }
448
379
 
449
- 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, InMemoryRunEventHub, InMemoryStore, InMemoryStreamHub, Json, LogEntry, Millis, NagiAbortError, NagiCanceledError, NagiConcurrencyConflictError, type NagiConfig, NagiFlowSnapshotGoneError, NagiNonRetryableError, type NagiRunConfig, NagiRuntimeError, NagiSignalTimeoutError, NagiSnapshotDriftError, NagiStepTimeoutError, 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, RunEvent, RunEventEnvelope, RunEventTransport, RunId, RunState, RunStatus, type RuntimeHandle, STREAM_REPLAY_BUFFER_CAP, STREAM_SUBSCRIBER_BUFFER_CAP, SerializedError, 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, isTerminalRunEvent, jsonContains, nagi, optional, runEventOf, 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 };