@demlik/tea 0.17.0 → 0.18.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.
Files changed (119) hide show
  1. package/README.md +3 -2
  2. package/dist/agent/index.d.ts +182 -35
  3. package/dist/agent/index.js +11 -11
  4. package/dist/{chunk-KWNCM6XM.js → chunk-AHW2CLPT.js} +65 -18
  5. package/dist/chunk-AHW2CLPT.js.map +1 -0
  6. package/dist/{chunk-K4ETBNKS.js → chunk-AIIXV4XB.js} +38 -9
  7. package/dist/chunk-AIIXV4XB.js.map +1 -0
  8. package/dist/{chunk-LYVOGOBC.js → chunk-BRX3243I.js} +3 -3
  9. package/dist/{chunk-LYVOGOBC.js.map → chunk-BRX3243I.js.map} +1 -1
  10. package/dist/{chunk-GWWCCSDH.js → chunk-C3G2QFEZ.js} +4 -4
  11. package/dist/{chunk-GWWCCSDH.js.map → chunk-C3G2QFEZ.js.map} +1 -1
  12. package/dist/{chunk-C4U5D5HP.js → chunk-FNGZMVIT.js} +3 -3
  13. package/dist/chunk-FNGZMVIT.js.map +1 -0
  14. package/dist/{chunk-QWIPH4YH.js → chunk-H2ELKHI6.js} +16 -6
  15. package/dist/chunk-H2ELKHI6.js.map +1 -0
  16. package/dist/chunk-H3MWNH7A.js +119 -0
  17. package/dist/chunk-H3MWNH7A.js.map +1 -0
  18. package/dist/chunk-I7E7AD2S.js +213 -0
  19. package/dist/chunk-I7E7AD2S.js.map +1 -0
  20. package/dist/{chunk-OYR7ENKU.js → chunk-IHUNKHDX.js} +3 -3
  21. package/dist/{chunk-OYR7ENKU.js.map → chunk-IHUNKHDX.js.map} +1 -1
  22. package/dist/chunk-JVE2LBFJ.js +21 -0
  23. package/dist/chunk-JVE2LBFJ.js.map +1 -0
  24. package/dist/chunk-JVKU2UQC.js +34 -0
  25. package/dist/chunk-JVKU2UQC.js.map +1 -0
  26. package/dist/{chunk-OPH6Y4UT.js → chunk-JYNYG5SF.js} +4 -4
  27. package/dist/{chunk-OPH6Y4UT.js.map → chunk-JYNYG5SF.js.map} +1 -1
  28. package/dist/{chunk-XBZQT2TD.js → chunk-PCJA2HTZ.js} +437 -162
  29. package/dist/chunk-PCJA2HTZ.js.map +1 -0
  30. package/dist/{chunk-DFUEAA6L.js → chunk-PQSDUX6B.js} +3 -3
  31. package/dist/{chunk-DFUEAA6L.js.map → chunk-PQSDUX6B.js.map} +1 -1
  32. package/dist/{chunk-6XBEYZME.js → chunk-WTSOW2MD.js} +5 -5
  33. package/dist/{chunk-6XBEYZME.js.map → chunk-WTSOW2MD.js.map} +1 -1
  34. package/dist/{chunk-4PXNZ5UY.js → chunk-XVIKSRCK.js} +4 -4
  35. package/dist/{chunk-4PXNZ5UY.js.map → chunk-XVIKSRCK.js.map} +1 -1
  36. package/dist/{chunk-4NTCPTNQ.js → chunk-YIMOFXST.js} +3 -3
  37. package/dist/{chunk-4NTCPTNQ.js.map → chunk-YIMOFXST.js.map} +1 -1
  38. package/dist/{core-rDbOaJTN.d.ts → core-Ce9ncpuv.d.ts} +5 -4
  39. package/dist/do/index.d.ts +140 -64
  40. package/dist/do/index.js +17 -18
  41. package/dist/do/index.js.map +1 -1
  42. package/dist/drive-loop-CsUsW3Wo.d.ts +127 -0
  43. package/dist/{durable-effects-CNaw97Be.d.ts → durable-effects-BmUrRA-h.d.ts} +1 -1
  44. package/dist/effect/index.d.ts +6 -150
  45. package/dist/effect/index.js +4 -96
  46. package/dist/effect/index.js.map +1 -1
  47. package/dist/extension/index.d.ts +7 -5
  48. package/dist/extension/index.js +2 -3
  49. package/dist/extension/index.js.map +1 -1
  50. package/dist/flow/index.d.ts +13 -13
  51. package/dist/flow/index.js +13 -12
  52. package/dist/flow/index.js.map +1 -1
  53. package/dist/idempotency/index.d.ts +3 -3
  54. package/dist/idempotency/index.js +4 -4
  55. package/dist/{index-q1PoukOZ.d.ts → index-2kNxy6az.d.ts} +2 -2
  56. package/dist/{index-B_BxplWi.d.ts → index-B1Wzarkl.d.ts} +1 -1
  57. package/dist/{index-Cberb5Rr.d.ts → index-Bf9_bNql.d.ts} +2 -2
  58. package/dist/index-BnsAqn0-.d.ts +286 -0
  59. package/dist/{index-Cx0F2M34.d.ts → index-Ce5GYAuI.d.ts} +2 -2
  60. package/dist/{index-CWmsXNdX.d.ts → index-D8sYVzCI.d.ts} +1 -1
  61. package/dist/{index-CcrKLtse.d.ts → index-DWdg7R1l.d.ts} +1 -1
  62. package/dist/{index-BOrsbdAf.d.ts → index-Dy3379ve.d.ts} +5 -5
  63. package/dist/{index-DaX_P35Q.d.ts → index-e36uEyl4.d.ts} +3 -3
  64. package/dist/index.d.ts +109 -36
  65. package/dist/index.js +2 -2
  66. package/dist/jev/index.d.ts +8 -8
  67. package/dist/jev/index.js +6 -7
  68. package/dist/jev/index.js.map +1 -1
  69. package/dist/{machine-BcfCFMYF.d.ts → machine-CuojfZup.d.ts} +353 -57
  70. package/dist/machine-viz/index.d.ts +1 -1
  71. package/dist/machine-viz/index.js +2 -2
  72. package/dist/mem/index.d.ts +6 -6
  73. package/dist/mem/index.js +6 -2
  74. package/dist/mem/index.js.map +1 -1
  75. package/dist/node/index.d.ts +16 -10
  76. package/dist/node/index.js +22 -3
  77. package/dist/node/index.js.map +1 -1
  78. package/dist/otel/index.d.ts +161 -0
  79. package/dist/otel/index.js +403 -0
  80. package/dist/otel/index.js.map +1 -0
  81. package/dist/paginate/index.d.ts +4 -4
  82. package/dist/paginate/index.js +5 -5
  83. package/dist/parity/index.d.ts +3 -3
  84. package/dist/parity/index.js +3 -3
  85. package/dist/pbt/index.d.ts +166 -53
  86. package/dist/pbt/index.js +2 -2
  87. package/dist/pbt/index.js.map +1 -1
  88. package/dist/persistence/index.d.ts +5 -5
  89. package/dist/persistence/index.js +5 -5
  90. package/dist/promise/index.d.ts +2 -2
  91. package/dist/promise/index.js +4 -3
  92. package/dist/react/index.d.ts +2 -2
  93. package/dist/resilience/index.d.ts +13 -9
  94. package/dist/resilience/index.js +5 -5
  95. package/dist/resilience/index.js.map +1 -1
  96. package/dist/{runtime-types-B62Ucnxr.d.ts → runtime-types-BKg2CGMx.d.ts} +88 -14
  97. package/dist/testing/effect/index.d.ts +65 -0
  98. package/dist/testing/effect/index.js +148 -0
  99. package/dist/testing/effect/index.js.map +1 -0
  100. package/dist/testing/index.d.ts +12 -158
  101. package/dist/testing/index.js +4 -130
  102. package/dist/testing/index.js.map +1 -1
  103. package/dist/testing/promise/index.d.ts +41 -0
  104. package/dist/testing/promise/index.js +37 -0
  105. package/dist/testing/promise/index.js.map +1 -0
  106. package/dist/timing/index.d.ts +4 -4
  107. package/dist/timing/index.js +4 -4
  108. package/dist/{types-DPm5YCDQ.d.ts → types-SzNSHKlV.d.ts} +1 -1
  109. package/dist/work-queue/index.d.ts +4 -4
  110. package/dist/work-queue/index.js +4 -3
  111. package/dist/work-queue/index.js.map +1 -1
  112. package/package.json +25 -13
  113. package/dist/chunk-C4U5D5HP.js.map +0 -1
  114. package/dist/chunk-G5E74IJB.js +0 -8
  115. package/dist/chunk-G5E74IJB.js.map +0 -1
  116. package/dist/chunk-K4ETBNKS.js.map +0 -1
  117. package/dist/chunk-KWNCM6XM.js.map +0 -1
  118. package/dist/chunk-QWIPH4YH.js.map +0 -1
  119. package/dist/chunk-XBZQT2TD.js.map +0 -1
@@ -1,9 +1,9 @@
1
1
  import { I as IdempotencyStore } from '../index-Bc40JWVl.js';
2
2
  export { a as IdempotencyEntry, e as evictExpired, i as initStore, r as recall, b as remember, s as seen } from '../index-Bc40JWVl.js';
3
- import { c as CmdOf, b as CmdDef } from '../core-rDbOaJTN.js';
4
- import { Q as QueueItem } from '../index-CcrKLtse.js';
3
+ import { a as CmdOf, b as CmdDef } from '../core-Ce9ncpuv.js';
4
+ import { Q as QueueItem } from '../index-DWdg7R1l.js';
5
5
  import '@standard-schema/spec';
6
- import '../runtime-types-B62Ucnxr.js';
6
+ import '../runtime-types-BKg2CGMx.js';
7
7
 
8
8
  /**
9
9
  * A cached intake entry: either a key whose work is still in flight
@@ -1,8 +1,8 @@
1
- export { createIntake, intakeProcessDef, intakeReplayDef } from '../chunk-OPH6Y4UT.js';
1
+ export { createIntake, intakeProcessDef, intakeReplayDef } from '../chunk-JYNYG5SF.js';
2
2
  export { evictExpired, initStore, recall, remember, seen } from '../chunk-PR6TB3BL.js';
3
- import '../chunk-TXN2KFHF.js';
4
3
  import '../chunk-4LPY67E4.js';
5
- import '../chunk-C4U5D5HP.js';
6
- import '../chunk-K4ETBNKS.js';
4
+ import '../chunk-TXN2KFHF.js';
5
+ import '../chunk-FNGZMVIT.js';
6
+ import '../chunk-AIIXV4XB.js';
7
7
  //# sourceMappingURL=index.js.map
8
8
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
- import { c as CmdOf, b as CmdDef, g as TaggedError, q as MalformedResult, T as TimerDeps, C as Cmd } from './core-rDbOaJTN.js';
1
+ import { a as CmdOf, b as CmdDef, f as TaggedError, n as MalformedResult, T as TimerDeps, C as Cmd } from './core-Ce9ncpuv.js';
2
2
  import { RetryState, AnyRetryPolicy } from './retry-backoff/index.js';
3
- import { T as TtlCache, D as DeadlineExceeded, a as DeadlineSub } from './index-DaX_P35Q.js';
3
+ import { T as TtlCache, D as DeadlineExceeded, a as DeadlineSub } from './index-e36uEyl4.js';
4
4
 
5
5
  /**
6
6
  * @packageDocumentation
@@ -1,4 +1,4 @@
1
- import { B as BootingRuntime } from './runtime-types-B62Ucnxr.js';
1
+ import { B as BootingRuntime } from './runtime-types-BKg2CGMx.js';
2
2
 
3
3
  /**
4
4
  * A recorded run, sufficient to reproduce it via `../trace-replay`.
@@ -1,5 +1,5 @@
1
- import { C as Cmd, T as TimerDeps, d as Subscribe } from './core-rDbOaJTN.js';
2
- import { D as DeadlineExceeded, a as DeadlineSub, b as DeadlinesSub } from './index-DaX_P35Q.js';
1
+ import { C as Cmd, T as TimerDeps, S as Subscribe } from './core-Ce9ncpuv.js';
2
+ import { D as DeadlineExceeded, a as DeadlineSub, b as DeadlinesSub } from './index-e36uEyl4.js';
3
3
 
4
4
  /**
5
5
  * internal/flow/batch-window — coalesce a stream of items into size- or
@@ -0,0 +1,286 @@
1
+ import * as effect_Cause from 'effect/Cause';
2
+ import * as effect_Types from 'effect/Types';
3
+ import { Effect, Stream, Scope } from 'effect';
4
+ import { P as Port, C as Cmd, v as ErrorsOf, J as OkOfCmd, u as DeclaredErrorsOf, c as Sub, s as BuiltinSubType, B as BuiltinSub, M as Machine } from './core-Ce9ncpuv.js';
5
+ import { f as DispatchSettle, C as CtxArg, S as Store, O as OnError, a as Supervision, T as TelemetrySink } from './runtime-types-BKg2CGMx.js';
6
+
7
+ declare const Stopped_base: new <A extends Record<string, any> = {}>(args: effect_Types.VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => effect_Cause.YieldableError & {
8
+ readonly _tag: "Stopped";
9
+ } & Readonly<A>;
10
+ /**
11
+ * A dispatch the run refused because it is stopping or has stopped. The Msg
12
+ * was never folded.
13
+ *
14
+ * `when` is `"stopping"` for a Msg that arrived while `stop()` (or a closing
15
+ * Scope) drained the run's in-flight work, and `"stopped"` once it had.
16
+ */
17
+ declare class Stopped extends Stopped_base<{
18
+ readonly msgType: string;
19
+ readonly when: "stopping" | "stopped";
20
+ }> {
21
+ get message(): string;
22
+ }
23
+ declare const StoreFailed_base: new <A extends Record<string, any> = {}>(args: effect_Types.VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => effect_Cause.YieldableError & {
24
+ readonly _tag: "StoreFailed";
25
+ } & Readonly<A>;
26
+ /**
27
+ * The run's store failed. `operation` is `"load"` when the saved state could
28
+ * not be restored at boot — `cause` is then the `StoreRefusedError` that says
29
+ * why — and `"save"` when a transition's save threw, a fenced store's
30
+ * `StoreConflictError` included; `cause` is then the store's own throw.
31
+ */
32
+ declare class StoreFailed extends StoreFailed_base<{
33
+ readonly operation: "load" | "save";
34
+ readonly cause: unknown;
35
+ }> {
36
+ get message(): string;
37
+ }
38
+
39
+ /**
40
+ * The Effect engine's run handle (#308, ruling R4.1 of #325). Its members have
41
+ * the Promise engine's names (the shared-handle ruling of #250); only the
42
+ * return types differ. Each member that returns a Promise there returns an
43
+ * Effect here, with a typed error channel a host reads with `Effect.catchTags`.
44
+ * Members that neither wait nor fail — `getState`, `result` and the listener
45
+ * registrations — are the same functions on both engines.
46
+ */
47
+
48
+ /**
49
+ * What the Effect engine's `run` yields while boot is in flight. `Err` is the
50
+ * union of the declared failures of the run's hand-written cells: a dispatch
51
+ * whose Cmd's cell fails with one fails with it. Reading State and waiting for
52
+ * quiescence need boot to have run, so they live on the {@link EffectRuntime}
53
+ * that `ready` succeeds with.
54
+ */
55
+ interface EffectBootingRuntime<S, M extends {
56
+ type: string;
57
+ }, E extends {
58
+ type: string;
59
+ } = never, Err = never> {
60
+ /**
61
+ * Fold `msg` and run to quiescence, as the Promise engine's `dispatch` does.
62
+ * Fails with `Stopped` once the run is stopping or stopped, `StoreFailed`
63
+ * when the transition's save fails, and a hand-written cell's declared
64
+ * failure when the transition's Cmd fails with one.
65
+ */
66
+ dispatch(msg: M, opts?: {
67
+ readonly settle?: DispatchSettle;
68
+ }): Effect.Effect<void, Err | Stopped | StoreFailed>;
69
+ /** `dispatch(msg, { settle: "once" })`: one transition, no follow-up drain. */
70
+ dispatchOnce(msg: M): Effect.Effect<void, Err | Stopped | StoreFailed>;
71
+ /** A zero-arg change notifier, fired after each applied transition. */
72
+ subscribe(listener: () => void): () => void;
73
+ /** A `(msg, state)` hook, fired after each applied transition. */
74
+ observe(observer: (msg: M, state: S) => void): () => void;
75
+ /** Fires once with the initial State — at once if boot already ran. */
76
+ onBoot(handler: (state: S) => void): () => void;
77
+ /** Subscribe to the semantic event of `type` the run's `events` projects. */
78
+ on<K extends E["type"]>(type: K, handler: (event: Extract<E, {
79
+ type: K;
80
+ }>) => void): () => void;
81
+ /** Subscribe to a typed Port. */
82
+ subscribePort<T>(port: Port<T>, listener: (value: T) => void): () => void;
83
+ /** Emit a value on a Port from outside a Cmd handler. */
84
+ emitPort<T>(port: Port<T>, value: T): void;
85
+ /**
86
+ * Succeeds with the booted handle once boot completes. Fails with
87
+ * `StoreFailed` when the saved state could not be restored (`"load"`) or the
88
+ * initial save failed (`"save"`), and with a hand-written cell's declared
89
+ * failure when a boot Cmd fails with one.
90
+ */
91
+ readonly ready: Effect.Effect<EffectRuntime<S, M, E, Err>, Err | StoreFailed>;
92
+ /**
93
+ * Stop the run: drain in-flight work, stop its Subs, flush the final State.
94
+ * Closing the run's Scope does the same.
95
+ */
96
+ stop(): Effect.Effect<void>;
97
+ }
98
+ /** The Effect engine's booted handle — what `ready` succeeds with. */
99
+ interface EffectRuntime<S, M extends {
100
+ type: string;
101
+ }, E extends {
102
+ type: string;
103
+ } = never, Err = never> extends EffectBootingRuntime<S, M, E, Err> {
104
+ /** The current State. Total. */
105
+ getState(): S;
106
+ readonly ready: Effect.Effect<EffectRuntime<S, M, E, Err>, Err | StoreFailed>;
107
+ /** Succeeds once every dispatched Msg and its follow-ups are processed. */
108
+ idle(): Effect.Effect<void>;
109
+ /** The terminal State, or `undefined` while the run is in flight. */
110
+ result(): S | undefined;
111
+ /** Succeeds with the terminal State the first time the run reaches one. */
112
+ done(): Effect.Effect<S>;
113
+ }
114
+
115
+ /**
116
+ * The Effect engine's `run` (#283): the same machine the Promise engine runs,
117
+ * with Effect handlers, Effect sub runners, the caller's Layers and
118
+ * interruption on stop.
119
+ *
120
+ * It runs the one core loop both engines share (`src/internal/engine/loop.ts`)
121
+ * with the same built-ins in the same order, so a machine folds the same way on
122
+ * either engine. What this file adds is the Effect edge:
123
+ *
124
+ * - an `interpret` cell returns `Effect<Ok, E, R>`, read with
125
+ * `Effect.result`: a success settles `_ok`, a declared failure settles
126
+ * `_err`, a defect goes to the error sink;
127
+ * - a `subscribe` runner returns a `Stream<Msg>`, drained on its own fiber;
128
+ * - every handler and runner fiber runs with the services the caller
129
+ * provided, so `R` reaches them from the caller's Layers;
130
+ * - stopping interrupts every handler fiber still in flight;
131
+ * - the handle's verbs are Effects with a typed error channel
132
+ * (`./handle`, `./failures`).
133
+ */
134
+
135
+ /**
136
+ * One Effect `interpret` cell. For a `Cmd.define`d Cmd it succeeds with the
137
+ * Cmd's `Ok` and fails with one of its declared tags, and the engine mints
138
+ * `<name>_ok` / `<name>_err` from that (ADR 0021). For a hand-written Cmd it
139
+ * succeeds with a follow-up Msg, a list of them (dispatched in order), or
140
+ * nothing, and its failure fails the dispatch with that error, typed on the
141
+ * handle (see {@link CellErrors}). `R` is whatever services it reads.
142
+ */
143
+ type EffectInterpretCell<M extends {
144
+ type: string;
145
+ }, C extends Cmd, R = unknown> = unknown extends ErrorsOf<C> ? (cmd: C) => Effect.Effect<M | readonly M[] | void, unknown, R> : (cmd: C) => Effect.Effect<OkOfCmd<C>, DeclaredErrorsOf<C>, R>;
146
+ /**
147
+ * The Effect engine's `interpret` map: one cell per Cmd variant, each reading
148
+ * services within `R`.
149
+ */
150
+ type EffectInterpret<M extends {
151
+ type: string;
152
+ }, C extends Cmd, R = unknown> = {
153
+ readonly [K in C["type"]]: EffectInterpretCell<M, Extract<C, {
154
+ type: K;
155
+ }>, R>;
156
+ };
157
+ /**
158
+ * One Effect sub runner: the Sub in, a `Stream` of Msgs out. The engine drains
159
+ * it on its own fiber and interrupts that fiber when the Sub stops.
160
+ *
161
+ * A Sub maps the errors it expects into Msgs itself, the way an Elm `Sub msg`
162
+ * carries no error type: `Stream.catchTag("Closed", () => Stream.make({ type:
163
+ * "disconnected" }))`. A stream that still fails reaches the error sink under
164
+ * `"sub"` and stops the run: the run's Scope closes with that failure (#309).
165
+ */
166
+ type EffectRunner<M extends {
167
+ type: string;
168
+ }, U extends Sub, R = unknown> = (sub: U) => Stream.Stream<M, unknown, R>;
169
+ /**
170
+ * The Effect engine's `subscribe` map: a runner for every Sub type the machine
171
+ * declares beyond the built-ins, and optionally one for a built-in, which
172
+ * replaces the engine's own (#270 R2.1).
173
+ */
174
+ type EffectSubscribe<M extends {
175
+ type: string;
176
+ }, U extends Sub, R = unknown> = {
177
+ readonly [K in Exclude<U["type"], BuiltinSubType>]: EffectRunner<M, Extract<U, {
178
+ type: K;
179
+ }>, R>;
180
+ } & {
181
+ readonly [K in BuiltinSubType]?: EffectRunner<M, Extract<BuiltinSub<M>, {
182
+ type: K;
183
+ }>, R>;
184
+ };
185
+ /** The services every cell of an `interpret` map reads. */
186
+ type InterpretServices<I> = {
187
+ [K in keyof I]: ServicesOfCell<I[K]>;
188
+ }[keyof I];
189
+ type ServicesOfCell<F> = F extends (cmd: never) => Effect.Effect<unknown, unknown, infer R> ? R : never;
190
+ /**
191
+ * The failures a dispatch on the handle can end with from an `interpret` map:
192
+ * the error type of every hand-written Cmd's cell. A `Cmd.define`d Cmd's
193
+ * declared failure settles its `_err` Msg instead, so it adds nothing here.
194
+ */
195
+ type CellErrors<C extends Cmd, I> = {
196
+ [K in keyof I & C["type"]]: unknown extends ErrorsOf<Extract<C, {
197
+ type: K;
198
+ }>> ? ErrorOfCell<I[K]> : never;
199
+ }[keyof I & C["type"]];
200
+ type ErrorOfCell<F> = F extends (cmd: never) => Effect.Effect<unknown, infer Err, unknown> ? Err : never;
201
+ /** The services every runner of a `subscribe` map reads. */
202
+ type SubscribeServices<B> = {
203
+ [K in keyof B]-?: ServicesOfRunner<NonNullable<B[K]>>;
204
+ }[keyof B];
205
+ type ServicesOfRunner<F> = F extends (sub: never) => Stream.Stream<unknown, unknown, infer R> ? R : never;
206
+ type InterpretOption<C extends Cmd, I> = [C] extends [Cmd<never>] ? {
207
+ readonly interpret?: I;
208
+ } : {
209
+ readonly interpret: I;
210
+ };
211
+ type SubscribeOption<U extends Sub, B> = [
212
+ Exclude<U["type"], BuiltinSubType>
213
+ ] extends [never] ? {
214
+ readonly subscribe?: B;
215
+ } : {
216
+ readonly subscribe: B;
217
+ };
218
+ /**
219
+ * The options of the Effect engine's `run`. Beside `interpret` and
220
+ * `subscribe`, they are the Promise engine's, with the same meaning; see `run`
221
+ * in `@demlik/tea/promise` for each one's contract.
222
+ */
223
+ type EffectRunOptions<S, M extends {
224
+ type: string;
225
+ }, C extends Cmd, U extends Sub, Ctx, E extends {
226
+ type: string;
227
+ }, I, B> = CtxArg<Ctx> & InterpretOption<C, I> & SubscribeOption<U, B> & {
228
+ readonly store?: Store<S>;
229
+ readonly onError?: OnError;
230
+ /** Stamps `at` on minted Msgs and telemetry. Defaults to `Date.now`. */
231
+ readonly clock?: () => number;
232
+ /** Projects each applied transition to the public events `on` serves. */
233
+ readonly events?: (msg: M, state: S) => readonly E[];
234
+ /** The policy for a reducer throw. Defaults to `"stop"`. */
235
+ readonly supervision?: Supervision<S, M>;
236
+ /** The terminal predicate `result()` and `done()` read. */
237
+ readonly terminal?: (state: S) => boolean;
238
+ /** A fire-and-forget sink for every applied transition. */
239
+ readonly telemetry?: TelemetrySink;
240
+ /** How long `stop()` waits for async teardown. Defaults to 5_000ms. */
241
+ readonly disposeTimeoutMs?: number;
242
+ };
243
+ /**
244
+ * Run `machine` on the Effect engine. The returned Effect needs a `Scope` and
245
+ * the services its handlers and runners read, and yields the run handle. The
246
+ * handle's members have the Promise engine's names; the ones that return a
247
+ * Promise there return an Effect here, failing with `Stopped`, `StoreFailed`
248
+ * or a hand-written cell's declared failure, so a host sorts them with
249
+ * `Effect.catchTags`.
250
+ *
251
+ * Closing the scope stops the run and its Subs: every handler still in flight
252
+ * is interrupted (its finalizers run), its Msg is never dispatched, and a
253
+ * dispatch after stop fails with `Stopped`. The handle's `stop()` does the
254
+ * same.
255
+ *
256
+ * A Sub whose Stream fails with an error it did not map to a Msg stops the
257
+ * run the other way round: the engine closes that Scope with the failure.
258
+ *
259
+ * A fenced store is fenced here exactly as on the Promise engine: the check is
260
+ * one of the built-ins both engines run.
261
+ *
262
+ * ```ts
263
+ * const program = Effect.gen(function* () {
264
+ * const handle = yield* run(machine, {
265
+ * interpret: {
266
+ * fetch: (cmd) =>
267
+ * Effect.gen(function* () {
268
+ * const api = yield* Api;
269
+ * return yield* api.get(cmd.id);
270
+ * }),
271
+ * },
272
+ * });
273
+ * const runtime = yield* handle.ready;
274
+ * yield* runtime.dispatch({ type: "go", id: "7" });
275
+ * return runtime.getState();
276
+ * });
277
+ * Effect.runPromise(program.pipe(Effect.scoped, Effect.provide(ApiLive)));
278
+ * ```
279
+ */
280
+ declare function run<S, M extends {
281
+ type: string;
282
+ }, C extends Cmd, U extends Sub, Ctx, I extends EffectInterpret<M, C> = EffectInterpret<M, C, never>, B extends EffectSubscribe<M, U> = EffectSubscribe<M, U, never>, E extends {
283
+ type: string;
284
+ } = never>(machine: Machine<S, M, C, U, Ctx>, opts: EffectRunOptions<S, M, C, U, Ctx, E, I, B>): Effect.Effect<EffectBootingRuntime<S, M, E, CellErrors<C, I>>, never, Scope.Scope | InterpretServices<I> | SubscribeServices<B>>;
285
+
286
+ export { type CellErrors as C, type EffectInterpret as E, type InterpretServices as I, type SubscribeOption as S, type EffectSubscribe as a, type SubscribeServices as b, type EffectBootingRuntime as c, type EffectInterpretCell as d, type EffectRunOptions as e, type EffectRunner as f, type EffectRuntime as g, Stopped as h, StoreFailed as i, run as r };
@@ -1,5 +1,5 @@
1
- import { C as Cmd, P as Port } from './core-rDbOaJTN.js';
2
- import { Q as QueueItem } from './index-CcrKLtse.js';
1
+ import { C as Cmd, P as Port } from './core-Ce9ncpuv.js';
2
+ import { Q as QueueItem } from './index-DWdg7R1l.js';
3
3
 
4
4
  /**
5
5
  * internal/flow/fan-out — scatter-gather over a bounded-concurrency work list.
@@ -1,4 +1,4 @@
1
- import { c as CmdOf, b as CmdDef, e as SettledOk, f as SettledErr, g as TaggedError, C as Cmd } from './core-rDbOaJTN.js';
1
+ import { a as CmdOf, b as CmdDef, d as SettledOk, e as SettledErr, f as TaggedError, C as Cmd } from './core-Ce9ncpuv.js';
2
2
 
3
3
  /**
4
4
  * The snapshot knob.
@@ -1,4 +1,4 @@
1
- import { S as Store } from './runtime-types-B62Ucnxr.js';
1
+ import { S as Store } from './runtime-types-BKg2CGMx.js';
2
2
 
3
3
  /**
4
4
  * internal/work-queue — substrate-agnostic work-queue lifecycle on `Store<S>`.
@@ -1,7 +1,7 @@
1
- import { b as CmdDef, T as TimerDeps, C as Cmd } from './core-rDbOaJTN.js';
2
- import { S as SnapshotWriteCmd, a as SnapshotState, b as SnapshotSavedMsg } from './index-CWmsXNdX.js';
3
- import { D as DeadlineExceeded, a as DeadlineSub } from './index-DaX_P35Q.js';
4
- import { Q as QueueItem } from './index-CcrKLtse.js';
1
+ import { b as CmdDef, T as TimerDeps, C as Cmd } from './core-Ce9ncpuv.js';
2
+ import { S as SnapshotWriteCmd, a as SnapshotState, b as SnapshotSavedMsg } from './index-D8sYVzCI.js';
3
+ import { D as DeadlineExceeded, a as DeadlineSub } from './index-e36uEyl4.js';
4
+ import { Q as QueueItem } from './index-DWdg7R1l.js';
5
5
 
6
6
  /**
7
7
  * The monitored-run knob. EVERY field is optional:
@@ -223,4 +223,4 @@ declare function liftRun<S extends {
223
223
  run: MonitoredRunState<Stage>;
224
224
  }, Stage, C extends Cmd>(state: S, [slice, cmds]: readonly [MonitoredRunState<Stage>, readonly C[]]): readonly [S, readonly C[]];
225
225
 
226
- export { type EndedRun as E, type MonitoredRunCmd as M, type RunFailure as R, type StageResult as S, type MonitoredRunState as a, type MonitoredRunConfig as b, type MonitoredRunTimerMsg as c, createMonitoredRun as d, liftRun as l };
226
+ export { type EndedRun as E, type MonitoredRunCmd as M, type RunFailure as R, type StageResult as S, type MonitoredRunConfig as a, type MonitoredRunState as b, type MonitoredRunTimerMsg as c, createMonitoredRun as d, liftRun as l };
@@ -1,5 +1,5 @@
1
- import { m as SubId, S as Sub, n as DepKeyedSub, h as Dispose, T as TimerDeps } from './core-rDbOaJTN.js';
2
- import { S as SubscribeHandler } from './types-DPm5YCDQ.js';
1
+ import { k as SubId, c as Sub, l as DepKeyedSub, D as Dispose, T as TimerDeps } from './core-Ce9ncpuv.js';
2
+ import { S as SubscribeHandler } from './types-SzNSHKlV.js';
3
3
 
4
4
  /**
5
5
  * internal/resilience/deadline — a one-shot Sub that fires when an ABSOLUTE wall-clock
@@ -413,4 +413,4 @@ declare function cacheEvictionSub(name: string, everyMs: number): DepKeyedSub<un
413
413
  */
414
414
  declare const cacheEvictionSubscribe: SubscribeHandler<CacheEvictionSub, CacheEvictMsg, unknown>;
415
415
 
416
- export { type ArmTimer as A, type CacheEvictionSub as C, type DeadlineExceeded as D, type TtlCache as T, type DeadlineSub as a, type DeadlinesSub as b, deadlineSub as c, deadlineExceeded as d, deadlinesSub as e, type CacheEvictMsg as f, type CacheEntry as g, type CacheEvictionDeps as h, type DeadlineMsgType as i, type DeadlineOpts as j, cacheEvictMsg as k, cacheEvictionSub as l, cacheEvictionSubscribe as m, deadlineMsgType as n, deadlines as o, evictExpired as p, get as q, has as r, subscribeDeadline as s, initCache as t, nextTimer as u, remove as v, set as w, setTimeoutArmTimer as x, subscribeWith as y };
416
+ export { type ArmTimer as A, type CacheEvictionSub as C, type DeadlineExceeded as D, type TtlCache as T, type DeadlineSub as a, type DeadlinesSub as b, type CacheEvictMsg as c, deadlineExceeded as d, type CacheEntry as e, type CacheEvictionDeps as f, type DeadlineMsgType as g, type DeadlineOpts as h, cacheEvictMsg as i, cacheEvictionSub as j, cacheEvictionSubscribe as k, deadlineMsgType as l, deadlineSub as m, deadlines as n, deadlinesSub as o, evictExpired as p, get as q, has as r, subscribeDeadline as s, initCache as t, nextTimer as u, remove as v, set as w, setTimeoutArmTimer as x, subscribeWith as y };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { B as BootingRuntime, R as Runtime } from './runtime-types-B62Ucnxr.js';
2
- export { b as BootedRunHandle, d as Branded, C as CtxArg, D as DispatchDiscardedError, e as DispatchSettle, f as DisposeTimeoutNotice, g as DriveFailedError, h as DriveStalledError, E as EngineRun, i as FencedRead, F as FencedStore, j as FoldRefusal, I as IdentityDropNotice, M as MachineTypes, O as OnError, P as PortNameCollisionError, Q as QuiescenceTimeoutError, c as RunHandle, k as RunOptions, l as RuntimeDiscardNotice, m as RuntimeDiscardedError, n as RuntimeErrorContext, o as RuntimeErrorPhase, p as RuntimeRef, q as Schema, S as Store, r as StoreConflictError, a as Supervision, s as SupervisionStrategy, t as TelemetryEvent, T as TelemetrySink, _ as __resetPortRegistry, u as absurd, v as asReducer, w as defineMachine, x as definePort, y as isFencedStore, z as noop, A as replay, G as schemaMigrate, H as tryApplyCell, J as tryFoldMsgs, K as tryInterpret, L as wrapDetached } from './runtime-types-B62Ucnxr.js';
3
- import { C as Cmd, S as Sub, M as Machine, P as Port, n as DepKeyedSub, h as Dispose } from './core-rDbOaJTN.js';
4
- export { A as AnyCmdDef, v as AsyncSchemaError, a as BuiltinSub, B as BuiltinSubType, b as CmdDef, w as CmdInput, c as CmdOf, u as CmdValue, D as DeclaredErrorsOf, t as ErrOf, E as ErrorsOf, x as ExhaustiveTransitions, y as Identity, o as Interpret, z as InterpretArg, F as InterpretCell, I as InterpretDetached, G as MachineShape, q as MalformedResult, N as NoCellError, J as NoCtx, s as OkOf, O as OkOfCmd, l as Outcome, K as OutcomeContractError, L as OutcomeHelpers, Q as PortEmitter, i as Reducer, R as RunHandlers, j as Settled, f as SettledErr, e as SettledOk, m as SubId, d as Subscribe, V as SubscribeArg, X as SyncReturn, r as Tagged, g as TaggedError, T as TimerDeps, p as TimerSub, k as Transitions, Y as UndeclaredFailureError, U as UpdateForm, W as Wired, Z as acceptedTypes, _ as acceptsOf, $ as applyCell, a0 as applyCellChecked, a1 as describeMachine, a2 as detectUpdateForm, a3 as foldMsgs, a4 as foldUpdates, a5 as formOf, a6 as msgKeysOf, a7 as structuralHash, a8 as subId, a9 as subIdOf } from './core-rDbOaJTN.js';
5
- import { S as SubscribeHandler } from './types-DPm5YCDQ.js';
1
+ import { B as BootingRuntime, R as Runtime } from './runtime-types-BKg2CGMx.js';
2
+ export { b as BootedRunHandle, d as Branded, C as CtxArg, D as DeletableStore, e as DispatchDiscardedError, f as DispatchSettle, g as DisposeTimeoutNotice, h as DriveFailedError, i as DriveStalledError, E as EngineRun, j as FencedRead, F as FencedStore, k as FoldRefusal, I as IdentityDropNotice, l as MachineTypes, M as Migrated, O as OnError, P as PortNameCollisionError, Q as QuiescenceTimeoutError, m as Refusal, c as RunHandle, n as RunOptions, o as RuntimeDiscardNotice, p as RuntimeDiscardedError, q as RuntimeErrorContext, r as RuntimeErrorPhase, s as RuntimeRef, t as Schema, S as Store, u as StoreConflictError, v as StoreRefusedError, a as Supervision, w as SupervisionStrategy, x as TelemetryEvent, T as TelemetrySink, _ as __resetPortRegistry, y as absurd, z as asReducer, A as defineMachine, G as definePort, H as isFencedStore, J as noop, K as refuse, L as replay, N as schemaMigrate, U as tryApplyCell, V as tryFoldMsgs, W as tryInterpret, X as wrapDetached } from './runtime-types-BKg2CGMx.js';
3
+ import { C as Cmd, c as Sub, M as Machine, P as Port, l as DepKeyedSub, D as Dispose } from './core-Ce9ncpuv.js';
4
+ export { A as AnyCmdDef, r as AsyncSchemaError, B as BuiltinSub, s as BuiltinSubType, b as CmdDef, t as CmdInput, a as CmdOf, q as CmdValue, u as DeclaredErrorsOf, E as ErrOf, v as ErrorsOf, w as ExhaustiveTransitions, x as Identity, I as Interpret, y as InterpretArg, z as InterpretCell, j as InterpretDetached, F as MachineShape, n as MalformedResult, N as NoCellError, G as NoCtx, p as OkOf, J as OkOfCmd, O as Outcome, K as OutcomeContractError, L as OutcomeHelpers, Q as PortEmitter, g as Reducer, R as RunHandlers, h as Settled, e as SettledErr, d as SettledOk, k as SubId, S as Subscribe, V as SubscribeArg, X as SyncReturn, o as Tagged, f as TaggedError, T as TimerDeps, m as TimerSub, i as Transitions, Y as UndeclaredFailureError, U as UpdateForm, W as Wired, Z as acceptedTypes, _ as acceptsOf, $ as applyCell, a0 as applyCellChecked, a1 as describeMachine, a2 as detectUpdateForm, a3 as foldMsgs, a4 as foldUpdates, a5 as formOf, a6 as msgKeysOf, a7 as structuralHash, a8 as subId, a9 as subIdOf } from './core-Ce9ncpuv.js';
5
+ import { S as SubscribeHandler } from './types-SzNSHKlV.js';
6
6
  import '@standard-schema/spec';
7
7
 
8
8
  /**
@@ -456,29 +456,65 @@ interface ManagedResourceBattery<N extends string, TKey, Handle, Ctx> {
456
456
  * file.
457
457
  *
458
458
  * @example
459
- * const checkpointStore = defineManagedResource<"checkpoint", RunId, CheckpointSaver, Ctx>({
460
- * name: "checkpoint",
461
- * acquire: (runId, ctx) =>
462
- * new CheckpointSaver({ storage: ctx.storage, bucket: ctx.bucket, runId }),
463
- * release: (saver) => saver.clear(),
464
- * });
465
- *
466
- * // In the machine:
467
- * types: { …, sub: {} as ManagedResourceSub<"checkpoint", RunId> },
459
+ * ```ts
460
+ * import {
461
+ * defineMachine,
462
+ * defineManagedResource,
463
+ * type Interpret,
464
+ * type ManagedResourceSub,
465
+ * type Reducer,
466
+ * } from "@demlik/tea";
467
+ * import { run } from "@demlik/tea/promise";
468
+ *
469
+ * type RunId = string;
470
+ * type State = { type: "idle" } | { type: "running"; runId: RunId };
471
+ * type Msg = { type: "start"; runId: RunId } | { type: "stop" };
472
+ * type Cmd = { type: "start_graph"; runId: RunId };
473
+ * interface Ctx { readonly storage: Storage; readonly bucket: string }
474
+ * declare class CheckpointSaver {
475
+ * constructor(opts: { storage: Storage; bucket: string; runId: RunId });
476
+ * save(step: string): Promise<void>;
477
+ * clear(): Promise<void>;
478
+ * }
479
+ * declare const update: Reducer<State, Msg, Cmd>;
480
+ * declare const ctx: Ctx;
481
+ *
482
+ * const checkpointStore = defineManagedResource<"checkpoint", RunId, CheckpointSaver, Ctx>({
483
+ * name: "checkpoint",
484
+ * acquire: (runId, ctx) =>
485
+ * new CheckpointSaver({ storage: ctx.storage, bucket: ctx.bucket, runId }),
486
+ * release: (saver) => saver.clear(),
487
+ * });
488
+ *
489
+ * // In the machine:
490
+ * const machine = defineMachine({
491
+ * types: {
492
+ * model: {} as State,
493
+ * msg: {} as Msg,
494
+ * cmd: {} as Cmd,
495
+ * sub: {} as ManagedResourceSub<"checkpoint", RunId>,
496
+ * ctx: {} as Ctx,
497
+ * },
498
+ * init: (loaded) => [loaded ?? { type: "idle" }, []],
499
+ * update,
468
500
  * subs: [
469
501
  * checkpointStore.depKeyed((s: State) =>
470
502
  * s.type === "running" ? s.runId : null,
471
503
  * ),
472
504
  * ],
505
+ * });
473
506
  *
474
- * // At run:
475
- * run(machine, { interpret, subscribe: { checkpoint: checkpointStore.subscribe } });
476
- *
477
- * // In interpret (read the live handle the reconciler holds):
478
- * start_graph: async (cmd, ctx) => {
507
+ * // In interpret (read the live handle the reconciler holds):
508
+ * const interpret: Interpret<Msg, Cmd, Ctx> = {
509
+ * start_graph: async (cmd) => {
479
510
  * const saver = checkpointStore.get(cmd.runId); // same owner, no rebuild
480
- * ...
481
- * }
511
+ * await saver?.save("started");
512
+ * },
513
+ * };
514
+ *
515
+ * // At run:
516
+ * run(machine, { ctx, interpret, subscribe: { checkpoint: checkpointStore.subscribe } });
517
+ * ```
482
518
  */
483
519
  declare function defineManagedResource<N extends string, TKey, Handle, Ctx>(opts: DefineManagedResourceOpts<N, TKey, Handle, Ctx>): ManagedResourceBattery<N, TKey, Handle, Ctx>;
484
520
 
@@ -588,28 +624,65 @@ interface TransportBattery<N extends string, TKey, Outbound, M, Ctx> {
588
624
  * Build the battery. One call per seam at the machine's host file.
589
625
  *
590
626
  * @example
591
- * const handsSeam = fromTransport<"hands", RunId, HandsInbound, HandsOutbound, Msg, Ctx>({
592
- * name: "hands",
593
- * openTransport: (runId, ctx) => ctx.openHandsWs(runId),
594
- * parseInbound: (raw) => parseHandsInbound(JSON.parse(raw)),
595
- * onInbound: (inbound, runId) => ({ type: "hands_said", runId, inbound }),
596
- * lostMsg: (runId) => ({ type: "hands_lost", runId }),
597
- * serializeOutbound: (out) => JSON.stringify(out),
598
- * });
599
- *
600
- * // In the machine:
601
- * types: { …, sub: {} as TransportSub<"hands", RunId> },
627
+ * ```ts
628
+ * import {
629
+ * defineMachine,
630
+ * fromTransport,
631
+ * type Interpret,
632
+ * type Reducer,
633
+ * type Transport,
634
+ * type TransportSub,
635
+ * } from "@demlik/tea";
636
+ * import { run } from "@demlik/tea/promise";
637
+ *
638
+ * type RunId = string;
639
+ * type HandsInbound = { kind: "said"; text: string };
640
+ * type HandsOutbound = { kind: "do"; action: string };
641
+ * type State = { type: "idle" } | { type: "auditing"; runId: RunId };
642
+ * type Msg =
643
+ * | { type: "hands_said"; runId: RunId; inbound: HandsInbound }
644
+ * | { type: "hands_lost"; runId: RunId };
645
+ * type Cmd = { type: "send_hands"; runId: RunId; outbound: HandsOutbound };
646
+ * interface Ctx { readonly openHandsWs: (runId: RunId) => Transport }
647
+ * declare function parseHandsInbound(json: unknown): HandsInbound | null;
648
+ * declare const update: Reducer<State, Msg, Cmd>;
649
+ * declare const ctx: Ctx;
650
+ *
651
+ * const handsSeam = fromTransport<"hands", RunId, HandsInbound, HandsOutbound, Msg, Ctx>({
652
+ * name: "hands",
653
+ * openTransport: (runId, ctx) => ctx.openHandsWs(runId),
654
+ * parseInbound: (raw) => parseHandsInbound(JSON.parse(raw)),
655
+ * onInbound: (inbound, runId) => ({ type: "hands_said", runId, inbound }),
656
+ * lostMsg: (runId) => ({ type: "hands_lost", runId }),
657
+ * serializeOutbound: (out) => JSON.stringify(out),
658
+ * });
659
+ *
660
+ * // In the machine:
661
+ * const machine = defineMachine({
662
+ * types: {
663
+ * model: {} as State,
664
+ * msg: {} as Msg,
665
+ * cmd: {} as Cmd,
666
+ * sub: {} as TransportSub<"hands", RunId>,
667
+ * ctx: {} as Ctx,
668
+ * },
669
+ * init: (loaded) => [loaded ?? { type: "idle" }, []],
670
+ * update,
602
671
  * subs: [
603
672
  * handsSeam.depKeyed((s: State) =>
604
673
  * s.type === "auditing" ? s.runId : null,
605
674
  * ),
606
675
  * ],
676
+ * });
607
677
  *
608
- * // At run:
609
- * run(machine, { interpret, subscribe: { hands: handsSeam.subscribe } });
610
- *
611
- * // In interpret:
678
+ * // In interpret:
679
+ * const interpret: Interpret<Msg, Cmd, Ctx> = {
612
680
  * send_hands: async (cmd) => { handsSeam.send(cmd.runId, cmd.outbound); },
681
+ * };
682
+ *
683
+ * // At run:
684
+ * run(machine, { ctx, interpret, subscribe: { hands: handsSeam.subscribe } });
685
+ * ```
613
686
  */
614
687
  declare function fromTransport<N extends string, TKey, Inbound, Outbound, M, Ctx>(opts: FromTransportOpts<N, TKey, Inbound, Outbound, M, Ctx>): TransportBattery<N, TKey, Outbound, M, Ctx>;
615
688
 
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { NO_ACK, ack, defineListener, defineManagedResource, fromBroadcastChannel, fromEventSource, fromEventTarget, fromInterval, fromPort, fromReconnectingWebSocket, fromTimeout, fromTransport, fromWebSocket, historyTracker, initAck, liftSlice, nextSeq, partitionByAck, readInOrder, reconcile, tagSeq } from './chunk-C4U5D5HP.js';
2
- export { AsyncSchemaError, Cmd, DispatchDiscardedError, DisposeTimeoutNotice, DriveFailedError, DriveStalledError, IdentityDropNotice, NoCellError, Outcome, OutcomeContractError, PortNameCollisionError, QuiescenceTimeoutError, RuntimeDiscardNotice, RuntimeDiscardedError, StoreConflictError, UndeclaredFailureError, __resetPortRegistry, absurd, acceptedTypes, acceptsOf, applyCell, applyCellChecked, asReducer, defineMachine, definePort, describeMachine, detectUpdateForm, foldMsgs, foldUpdates, formOf, isFencedStore, msgKeysOf, noop, replay, schemaMigrate, structuralHash, subId, subIdOf, tryApplyCell, tryFoldMsgs, tryInterpret, wrapDetached } from './chunk-K4ETBNKS.js';
1
+ export { NO_ACK, ack, defineListener, defineManagedResource, fromBroadcastChannel, fromEventSource, fromEventTarget, fromInterval, fromPort, fromReconnectingWebSocket, fromTimeout, fromTransport, fromWebSocket, historyTracker, initAck, liftSlice, nextSeq, partitionByAck, readInOrder, reconcile, tagSeq } from './chunk-FNGZMVIT.js';
2
+ export { AsyncSchemaError, Cmd, DispatchDiscardedError, DisposeTimeoutNotice, DriveFailedError, DriveStalledError, IdentityDropNotice, NoCellError, Outcome, OutcomeContractError, PortNameCollisionError, QuiescenceTimeoutError, Refusal, RuntimeDiscardNotice, RuntimeDiscardedError, StoreConflictError, StoreRefusedError, UndeclaredFailureError, __resetPortRegistry, absurd, acceptedTypes, acceptsOf, applyCell, applyCellChecked, asReducer, defineMachine, definePort, describeMachine, detectUpdateForm, foldMsgs, foldUpdates, formOf, isFencedStore, msgKeysOf, noop, refuse, replay, schemaMigrate, structuralHash, subId, subIdOf, tryApplyCell, tryFoldMsgs, tryInterpret, wrapDetached } from './chunk-AIIXV4XB.js';
3
3
  //# sourceMappingURL=index.js.map
4
4
  //# sourceMappingURL=index.js.map
@@ -1,13 +1,13 @@
1
- import { R as RunCmd, F as FailMsg, S as SucceedMsg, a as ResilientState, b as ResilientTimerMsg } from '../index-q1PoukOZ.js';
2
- import { l as Outcome, b as CmdDef, T as TimerDeps, C as Cmd, n as DepKeyedSub, p as TimerSub } from '../core-rDbOaJTN.js';
1
+ import { R as RunCmd, F as FailMsg, S as SucceedMsg, a as ResilientState, b as ResilientTimerMsg } from '../index-2kNxy6az.js';
2
+ import { O as Outcome, b as CmdDef, T as TimerDeps, C as Cmd, l as DepKeyedSub, m as TimerSub } from '../core-Ce9ncpuv.js';
3
3
  import { RetryPolicy } from '../retry-backoff/index.js';
4
- import { D as DeadlineExceeded, a as DeadlineSub, T as TtlCache, C as CacheEvictionSub, f as CacheEvictMsg } from '../index-DaX_P35Q.js';
5
- import { S as SubscribeHandler } from '../types-DPm5YCDQ.js';
6
- import { B as BatchWindow, a as BatchWindowSub, b as BatchWindowExpired } from '../index-Cberb5Rr.js';
7
- import { F as FanOutState } from '../index-Cx0F2M34.js';
4
+ import { D as DeadlineExceeded, a as DeadlineSub, T as TtlCache, C as CacheEvictionSub, c as CacheEvictMsg } from '../index-e36uEyl4.js';
5
+ import { S as SubscribeHandler } from '../types-SzNSHKlV.js';
6
+ import { B as BatchWindow, a as BatchWindowSub, b as BatchWindowExpired } from '../index-Bf9_bNql.js';
7
+ import { F as FanOutState } from '../index-Ce5GYAuI.js';
8
8
  import '@standard-schema/spec';
9
- import '../index-CcrKLtse.js';
10
- import '../runtime-types-B62Ucnxr.js';
9
+ import '../index-DWdg7R1l.js';
10
+ import '../runtime-types-BKg2CGMx.js';
11
11
 
12
12
  /**
13
13
  * @packageDocumentation
package/dist/jev/index.js CHANGED
@@ -1,14 +1,13 @@
1
- import { createBatchWindow } from '../chunk-DFUEAA6L.js';
1
+ import { createBatchWindow } from '../chunk-PQSDUX6B.js';
2
2
  import '../chunk-LFZUK6J2.js';
3
- import { describeError } from '../chunk-G5E74IJB.js';
4
3
  import { createFanOut } from '../chunk-QNGYQMZB.js';
5
- import '../chunk-TXN2KFHF.js';
6
- import { runCmdDef, createResilientCall } from '../chunk-6XBEYZME.js';
4
+ import { runCmdDef, createResilientCall } from '../chunk-WTSOW2MD.js';
5
+ import { initCache, has, set, evictExpired, cacheEvictionSub, cacheEvictionSubscribe, get } from '../chunk-C3G2QFEZ.js';
7
6
  import '../chunk-VBDU4JL6.js';
8
7
  import '../chunk-4LPY67E4.js';
9
- import { initCache, has, set, evictExpired, cacheEvictionSub, cacheEvictionSubscribe, get } from '../chunk-GWWCCSDH.js';
10
- import { liftSlice, readInOrder } from '../chunk-C4U5D5HP.js';
11
- import { Outcome } from '../chunk-K4ETBNKS.js';
8
+ import '../chunk-TXN2KFHF.js';
9
+ import { liftSlice, readInOrder } from '../chunk-FNGZMVIT.js';
10
+ import { describeError, Outcome } from '../chunk-AIIXV4XB.js';
12
11
 
13
12
  // src/internal/jev/protocol/index.ts
14
13
  var jevQuestions = (questions) => questions;