@rotorsoft/act 1.32.29 → 1.33.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 (141) hide show
  1. package/README.md +0 -1
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/@types/act.d.ts +41 -233
  4. package/dist/@types/act.d.ts.map +1 -1
  5. package/dist/@types/adapters/in-memory-store.d.ts.map +1 -1
  6. package/dist/@types/builders/act-builder.d.ts +2 -115
  7. package/dist/@types/builders/act-builder.d.ts.map +1 -1
  8. package/dist/@types/builders/builder-utils.d.ts +1 -1
  9. package/dist/@types/builders/builder-utils.d.ts.map +1 -1
  10. package/dist/@types/builders/event-builder.d.ts +5 -5
  11. package/dist/@types/builders/event-builder.d.ts.map +1 -1
  12. package/dist/@types/builders/merge.d.ts +1 -1
  13. package/dist/@types/builders/merge.d.ts.map +1 -1
  14. package/dist/@types/builders/projection-builder.d.ts +2 -144
  15. package/dist/@types/builders/projection-builder.d.ts.map +1 -1
  16. package/dist/@types/builders/slice-builder.d.ts +2 -71
  17. package/dist/@types/builders/slice-builder.d.ts.map +1 -1
  18. package/dist/@types/builders/state-builder.d.ts +2 -376
  19. package/dist/@types/builders/state-builder.d.ts.map +1 -1
  20. package/dist/@types/config.d.ts +6 -43
  21. package/dist/@types/config.d.ts.map +1 -1
  22. package/dist/@types/csv.d.ts +1 -15
  23. package/dist/@types/csv.d.ts.map +1 -1
  24. package/dist/@types/index.d.ts +0 -1
  25. package/dist/@types/index.d.ts.map +1 -1
  26. package/dist/@types/internal/autoclose-policy.d.ts +9 -108
  27. package/dist/@types/internal/autoclose-policy.d.ts.map +1 -1
  28. package/dist/@types/internal/autoclose-reaction.d.ts +1 -9
  29. package/dist/@types/internal/autoclose-reaction.d.ts.map +1 -1
  30. package/dist/@types/internal/autoclose-window.d.ts +2 -15
  31. package/dist/@types/internal/autoclose-window.d.ts.map +1 -1
  32. package/dist/@types/internal/backoff.d.ts +1 -6
  33. package/dist/@types/internal/backoff.d.ts.map +1 -1
  34. package/dist/@types/internal/circuit-breaker.d.ts +1 -4
  35. package/dist/@types/internal/circuit-breaker.d.ts.map +1 -1
  36. package/dist/@types/{builders/build-classify.d.ts → internal/classify.d.ts} +2 -15
  37. package/dist/@types/internal/classify.d.ts.map +1 -0
  38. package/dist/@types/internal/close-cycle.d.ts +0 -13
  39. package/dist/@types/internal/close-cycle.d.ts.map +1 -1
  40. package/dist/@types/internal/config.d.ts +9 -81
  41. package/dist/@types/internal/config.d.ts.map +1 -1
  42. package/dist/@types/internal/correlate-cycle.d.ts +1 -1
  43. package/dist/@types/internal/correlate-cycle.d.ts.map +1 -1
  44. package/dist/@types/internal/{correlator.d.ts → correlation-id.d.ts} +1 -8
  45. package/dist/@types/internal/correlation-id.d.ts.map +1 -0
  46. package/dist/@types/internal/date-reviver.d.ts +0 -5
  47. package/dist/@types/internal/date-reviver.d.ts.map +1 -1
  48. package/dist/@types/internal/defer-config.d.ts +0 -13
  49. package/dist/@types/internal/defer-config.d.ts.map +1 -1
  50. package/dist/@types/internal/defer-timer.d.ts +1 -5
  51. package/dist/@types/internal/defer-timer.d.ts.map +1 -1
  52. package/dist/@types/internal/drain-cycle.d.ts +1 -1
  53. package/dist/@types/internal/drain-cycle.d.ts.map +1 -1
  54. package/dist/@types/internal/{drain.d.ts → drain-ops.d.ts} +1 -7
  55. package/dist/@types/internal/drain-ops.d.ts.map +1 -0
  56. package/dist/@types/internal/drain-ratio.d.ts +0 -5
  57. package/dist/@types/internal/drain-ratio.d.ts.map +1 -1
  58. package/dist/@types/internal/event-sourcing.d.ts +1 -8
  59. package/dist/@types/internal/event-sourcing.d.ts.map +1 -1
  60. package/dist/@types/internal/event-versions.d.ts +0 -9
  61. package/dist/@types/internal/event-versions.d.ts.map +1 -1
  62. package/dist/@types/internal/lru-map.d.ts +0 -9
  63. package/dist/@types/internal/lru-map.d.ts.map +1 -1
  64. package/dist/@types/internal/pii.d.ts +78 -0
  65. package/dist/@types/internal/pii.d.ts.map +1 -0
  66. package/dist/@types/internal/projection-fold.d.ts +1 -5
  67. package/dist/@types/internal/projection-fold.d.ts.map +1 -1
  68. package/dist/@types/internal/{close-signal.d.ts → reaction-dispatch.d.ts} +46 -6
  69. package/dist/@types/internal/reaction-dispatch.d.ts.map +1 -0
  70. package/dist/@types/internal/report-once.d.ts +1 -8
  71. package/dist/@types/internal/report-once.d.ts.map +1 -1
  72. package/dist/@types/internal/settle.d.ts +21 -21
  73. package/dist/@types/internal/settle.d.ts.map +1 -1
  74. package/dist/@types/internal/tracing.d.ts +3 -14
  75. package/dist/@types/internal/tracing.d.ts.map +1 -1
  76. package/dist/@types/internal/walk-streams.d.ts +0 -2
  77. package/dist/@types/internal/walk-streams.d.ts.map +1 -1
  78. package/dist/@types/ports.d.ts +3 -43
  79. package/dist/@types/ports.d.ts.map +1 -1
  80. package/dist/@types/scoped.d.ts +1 -6
  81. package/dist/@types/scoped.d.ts.map +1 -1
  82. package/dist/@types/sensitive.d.ts +56 -0
  83. package/dist/@types/sensitive.d.ts.map +1 -0
  84. package/dist/@types/test/index.d.ts +1 -0
  85. package/dist/@types/test/index.d.ts.map +1 -1
  86. package/dist/@types/test/sandbox.d.ts +2 -26
  87. package/dist/@types/test/sandbox.d.ts.map +1 -1
  88. package/dist/@types/types/act.d.ts +216 -0
  89. package/dist/@types/types/act.d.ts.map +1 -0
  90. package/dist/@types/types/action.d.ts +67 -0
  91. package/dist/@types/types/action.d.ts.map +1 -1
  92. package/dist/@types/types/builders.d.ts +722 -0
  93. package/dist/@types/types/builders.d.ts.map +1 -0
  94. package/dist/@types/types/errors.d.ts +31 -1
  95. package/dist/@types/types/errors.d.ts.map +1 -1
  96. package/dist/@types/types/index.d.ts +38 -0
  97. package/dist/@types/types/index.d.ts.map +1 -1
  98. package/dist/@types/types/ports.d.ts +16 -10
  99. package/dist/@types/types/ports.d.ts.map +1 -1
  100. package/dist/@types/types/reaction.d.ts +11 -1
  101. package/dist/@types/types/reaction.d.ts.map +1 -1
  102. package/dist/@types/types/sandbox.d.ts +31 -0
  103. package/dist/@types/types/sandbox.d.ts.map +1 -0
  104. package/dist/@types/types/schemas.d.ts +12 -17
  105. package/dist/@types/types/schemas.d.ts.map +1 -1
  106. package/dist/{chunk-F7K7SIG6.js → chunk-2PMUONGF.js} +38 -57
  107. package/dist/chunk-2PMUONGF.js.map +1 -0
  108. package/dist/chunk-HF433MAF.cjs +264 -0
  109. package/dist/chunk-HF433MAF.cjs.map +1 -0
  110. package/dist/{chunk-5FXT63KF.js → chunk-JABYJGT7.js} +184 -24
  111. package/dist/chunk-JABYJGT7.js.map +1 -0
  112. package/dist/chunk-VE3MTY4A.cjs +1233 -0
  113. package/dist/chunk-VE3MTY4A.cjs.map +1 -0
  114. package/dist/index.cjs +1615 -3003
  115. package/dist/index.cjs.map +1 -1
  116. package/dist/index.js +751 -813
  117. package/dist/index.js.map +1 -1
  118. package/dist/test/index.cjs +16 -1105
  119. package/dist/test/index.cjs.map +1 -1
  120. package/dist/test/index.js +2 -2
  121. package/dist/test/index.js.map +1 -1
  122. package/dist/types/index.cjs +58 -276
  123. package/dist/types/index.cjs.map +1 -1
  124. package/dist/types/index.js +15 -1
  125. package/package.json +1 -1
  126. package/dist/@types/builders/build-classify.d.ts.map +0 -1
  127. package/dist/@types/builders/builder-base.d.ts +0 -70
  128. package/dist/@types/builders/builder-base.d.ts.map +0 -1
  129. package/dist/@types/builders/reaction-builder.d.ts +0 -55
  130. package/dist/@types/builders/reaction-builder.d.ts.map +0 -1
  131. package/dist/@types/internal/close-signal.d.ts.map +0 -1
  132. package/dist/@types/internal/correlator.d.ts.map +0 -1
  133. package/dist/@types/internal/defer-signal.d.ts +0 -35
  134. package/dist/@types/internal/defer-signal.d.ts.map +0 -1
  135. package/dist/@types/internal/drain.d.ts.map +0 -1
  136. package/dist/@types/internal/index.d.ts +0 -43
  137. package/dist/@types/internal/index.d.ts.map +0 -1
  138. package/dist/@types/internal/sensitive.d.ts +0 -177
  139. package/dist/@types/internal/sensitive.d.ts.map +0 -1
  140. package/dist/chunk-5FXT63KF.js.map +0 -1
  141. package/dist/chunk-F7K7SIG6.js.map +0 -1
@@ -1,205 +1,5 @@
1
- import { type CircuitBreakerOptions, type CircuitState, type PatchFn } from "./internal/index.js";
2
- export type { CircuitBreakerOptions, CircuitState } from "./internal/index.js";
3
- import { type Scoped } from "./ports.js";
4
- import type { Actor, AsOf, AuditCategory, AuditFinding, AuditOptions, BatchHandler, BlockedLease, CloseResult, CloseTarget, Committed, Correlator, DoOptions, Drain, DrainOptions, EventSink, EventSource, IAct, LaneConfig, Lease, LoadTarget, Query, Registry, ScanOptions, ScanResult, Schema, SchemaRegister, Schemas, SettleOptions, ShutdownOptions, Snapshot, State, StoreNotification, StreamFilter, StreamPosition, Target } from "./types/index.js";
5
- export { type AutocloseConfig, type AutoclosePolicy, DEFAULT_AUTOCLOSE_CYCLE_MINUTES, DEFAULT_CLOSE_BATCH_SIZE, DEFAULT_CLOSE_YIELD_MS, DEFAULT_MAX_SUBSCRIBED_STREAMS, DEFAULT_SETTLE_DEBOUNCE_MS, resolveAutocloseConfig, } from "./internal/index.js";
6
- /**
7
- * Lifecycle events emitted by {@link Act}, mapped to their payload type.
8
- * Drives the typing of `emit` / `on` / `off` — the event-name argument
9
- * narrows its payload at the call site.
10
- *
11
- * The first parameter is kept (unused) for arity compatibility: `committed`
12
- * carries snapshots of whichever state each action targeted, so its honest
13
- * element type is `Snapshot<Schema, TEvents>` — the register map itself was
14
- * never the shape of any snapshot's state.
15
- */
16
- export type ActLifecycleEvents<_TSchemaReg extends SchemaRegister<TActions>, TEvents extends Schemas, TActions extends Schemas> = {
17
- committed: Snapshot<Schema, TEvents>[];
18
- acked: Lease[];
19
- blocked: BlockedLease[];
20
- settled: Drain<TEvents>;
21
- closed: CloseResult;
22
- /**
23
- * A **different process** committed an event to the same backing store.
24
- *
25
- * Fires only when the configured store implements
26
- * {@link Store.notify} and there is at least one registered reaction.
27
- * The orchestrator uses the same signal internally to wake `settle()`
28
- * — listeners get the raw payload for SSE fan-out, dashboards, and
29
- * audit logs.
30
- *
31
- * Local commits do *not* fire `notified` (use `committed` for those):
32
- * stores self-filter their own writes so this channel has a clean
33
- * cross-process semantic.
34
- */
35
- notified: StoreNotification;
36
- /**
37
- * A stream's sensitive-data payload was wiped via {@link Act.forget}.
38
- * Fires exactly once per successful `forget(stream)` call — idempotent
39
- * second calls (no PII left on the stream) return `eventCount: 0` and
40
- * do NOT re-emit. Apps that never call `forget()` never see this event.
41
- *
42
- * Listeners use it for the compliance side of GDPR / CCPA: audit log,
43
- * downstream cache busts, projection-side wipes that the framework
44
- * doesn't reach (e.g., search indexes, ETL caches). The framework's own
45
- * cache is invalidated by `forget()` itself before the event fires.
46
- */
47
- forgotten: {
48
- stream: string;
49
- at: Date;
50
- eventCount: number;
51
- };
52
- /**
53
- * A store operation failed during the drain loop. Fires on
54
- * every failed drain cycle — typically a {@link StoreError} from a
55
- * degraded backend — carrying the orchestrator circuit breaker's state
56
- * after the failure (`open` means the drain loop has backed off and will
57
- * retry after the cooldown). Listen to alert on a degraded store; the
58
- * framework logs the same error regardless. Emitted only when a listener
59
- * is registered (Node's `EventEmitter` throws on an unhandled `"error"`).
60
- */
61
- error: {
62
- error: unknown;
63
- circuit: CircuitState;
64
- };
65
- };
66
- /**
67
- * Options for {@link Act} construction (passed via {@link ActBuilder.build}).
68
- *
69
- * @property maxSubscribedStreams - Cap for the LRU tracking what each
70
- * dynamically resolved reaction target was last subscribed at. Statically
71
- * declared targets are held outside it and never evicted, so their lane
72
- * and priority stay owned by the build-time subscribe.
73
- * Default: {@link DEFAULT_MAX_SUBSCRIBED_STREAMS}.
74
- * @property settleDebounceMs - Debounce window (ms) used by `settle()` when
75
- * the caller doesn't pass `SettleOptions.debounceMs`. Tune this once per
76
- * Act instance instead of threading the value through every call site.
77
- * Default: {@link DEFAULT_SETTLE_DEBOUNCE_MS}.
78
- */
79
- export type ActOptions<TLanes extends string = string> = {
80
- readonly maxSubscribedStreams?: number;
81
- readonly settleDebounceMs?: number;
82
- /**
83
- * Per-Act ports. When set, this Act runs against the
84
- * provided store + cache instead of the singletons — threaded via
85
- * AsyncLocalStorage so internals are unchanged. Both are required
86
- * together (a shared cache across distinct stores would collide on
87
- * stream keys). Omit for the singleton path.
88
- */
89
- readonly scoped?: Scoped;
90
- /**
91
- * Correlation-id generator for originating actions. When
92
- * omitted, Act uses {@link default_correlator}, which produces a
93
- * readable, time-monotonic-within-window, lowercase id of the form
94
- * `{state[:4]}-{action[:4]}-{ts}{rnd}` (18 chars).
95
- *
96
- * Reactions inherit `reactingTo.meta.correlation` so the chain stays
97
- * intact — the delegate is only consulted on originating commits and
98
- * for the close-the-books transaction.
99
- */
100
- readonly correlator?: Correlator;
101
- /** Restrict this process to a subset of declared lanes. */
102
- readonly onlyLanes?: ReadonlyArray<TLanes>;
103
- /**
104
- * Subscribe to {@link Store.notify} on this instance. Defaults
105
- * to `true`. Set `false` on instances that only commit and never
106
- * react — the subscriber-connection budget is the practical scaling
107
- * ceiling for the notify/listen pattern, and writer-only fleets
108
- * spend it for nothing when they subscribe to a channel they never
109
- * read. Commits still emit notifications (that's part of the
110
- * store's commit protocol); only the subscriber side is gated.
111
- */
112
- readonly listen?: boolean;
113
- /**
114
- * Run the local reaction pipeline on this instance. Defaults
115
- * to `true`. Set `false` on writer-only or sidecar instances: drain
116
- * controllers' auto-cycle workers don't start, `correlate()` /
117
- * `drain()` / `settle()` become no-ops, and the notify handler
118
- * skips its drain-wakeup arm (but still emits the `notified`
119
- * lifecycle event so observability sidecars work).
120
- */
121
- readonly drain?: boolean;
122
- /**
123
- * Orchestrator circuit breaker for the drain loop. After
124
- * `failureThreshold` consecutive store failures the breaker opens and
125
- * the drain loop skips `claim()` for `cooldownMs` instead of hammering a
126
- * down backend, then allows a half-open trial. Out-of-range values throw
127
- * a `ZodError` at `act().build()`. Defaults: threshold 5, cooldown 30s.
128
- */
129
- readonly circuitBreaker?: CircuitBreakerOptions;
130
- /**
131
- * @deprecated Accepted, validated, and ignored. It paced the off-hours
132
- * re-check of the old autoclose sweep; the synthesized autoclose reaction now derives its re-check
133
- * directly from `autocloseWindow` — a tick landing outside the window
134
- * parks until the exact instant the window opens, so there is no
135
- * polling cadence to configure (and nothing minute-denominated on the
136
- * close surface). Still validated as an integer `[1, 1440]` so typos
137
- * keep failing loudly at `act().build()`. Will be removed in the next
138
- * major.
139
- */
140
- readonly autocloseCycleMinutes?: number;
141
- /**
142
- * @deprecated Unused since the autoclose sweep was replaced by a
143
- * synthesized per-aggregate reaction — nothing pages the store in
144
- * batches anymore, so nothing reads this. Accepted and validated
145
- * (`[1, 1024]`) for compatibility; will be removed in the next major.
146
- */
147
- readonly closeBatchSize?: number;
148
- /**
149
- * @deprecated Unused: the sweep that yielded between
150
- * successive `Store.truncate` calls no longer exists; closes are
151
- * staged per stream by the autoclose reaction. Accepted and validated
152
- * (`[0, 1000]`) for compatibility; will be removed in the next major.
153
- */
154
- readonly closeYieldMs?: number;
155
- /**
156
- * @deprecated Unused: the sweep-side predicate try/catch
157
- * this flag steered no longer exists; a throwing policy predicate now
158
- * follows the reaction retry path (`blockOnError: false`, three
159
- * retries). Accepted for compatibility; will be removed in the next
160
- * major.
161
- */
162
- readonly closeOnError?: boolean;
163
- /**
164
- * Optional off-hours window restricting when autoclose evaluates. A
165
- * synthesized autoclose reaction that triggers outside the window
166
- * defers to the next instant the window opens — derived from the
167
- * window itself, no polling cadence. Hours are `[0, 23]` integers in
168
- * `timeZone` (IANA, default `"UTC"`, DST-correct); `start > end` is
169
- * an overnight window (e.g. `{ start: 22, end: 6 }`). Omit to
170
- * evaluate regardless of clock time.
171
- */
172
- readonly autocloseWindow?: {
173
- readonly start: number;
174
- readonly end: number;
175
- readonly timeZone?: string;
176
- };
177
- /**
178
- * Validate folded state against its declared Zod schema after every
179
- * reduction. Off by default.
180
- *
181
- * When `true`, each time an event is folded into state — on the
182
- * command path (`do`), on `load`/replay, and inside projection-fold
183
- * projections — the merged full state is parsed against the owning
184
- * state's `state({ Name: schema })` schema. A reducer that produces
185
- * schema-violating state (the calculator divide-by-zero NaN
186
- * class) throws a {@link ValidationError} at the triggering event,
187
- * whose `target` names the state and the event (`<state>.<event>#<id>`)
188
- * — instead of the bad value propagating and surfacing hops later as a
189
- * confusing downstream error.
190
- *
191
- * This is a **debugging / CI aid, not a production guard**. Turn it on
192
- * in development and CI to catch total-reducer bugs at the source; the
193
- * framework already validates action inputs and emitted events, so the
194
- * reduced state is the one shape it otherwise trusts. The per-event
195
- * patch step is selected **once at `build()`** (the same way the
196
- * orchestrator picks bare vs trace-decorated store ops from the log
197
- * level): when `false` (the default) the fold loop is byte-identical to
198
- * a bare reduction — the validating patch step is never selected, so
199
- * there is no per-event cost, not even a branch.
200
- */
201
- readonly validateFoldedState?: boolean;
202
- };
1
+ import { type ActLifecycleEvents, type ActOptions } from "./types/act.js";
2
+ import type { Actor, AsOf, AuditCategory, AuditFinding, AuditOptions, BatchHandler, CloseResult, CloseTarget, Committed, DoOptions, Drain, DrainOptions, EventSink, EventSource, IAct, LaneConfig, LoadTarget, PatchFn, Query, Registry, ScanOptions, ScanResult, Schema, SchemaRegister, Schemas, SettleOptions, ShutdownOptions, Snapshot, State, StreamFilter, StreamPosition, Target } from "./types/index.js";
203
3
  /**
204
4
  * @category Orchestrator
205
5
  * @see Store
@@ -231,14 +31,15 @@ export declare class Act<TSchemaReg extends SchemaRegister<TActions>, TEvents ex
231
31
  private readonly _breaker;
232
32
  private readonly _listen;
233
33
  private readonly _drain;
34
+ private readonly _auto_settle;
234
35
  /** Whether any event has a reaction; nothing arms without one. */
235
36
  private readonly _reactive;
236
37
  private readonly _drain_controllers;
237
38
  private readonly _correlate;
238
39
  private readonly _settle;
239
40
  private _poll;
240
- /** The deprecated `start_correlations` callback, while the poll runs. */
241
- private _on_discovered;
41
+ /** The poll's correlate `limit`, used by every settle pass while it runs. */
42
+ private _poll_limit;
242
43
  /**
243
44
  * Wired at construction against the store current then, so a store
244
45
  * injected after `build()` is never notified.
@@ -522,6 +323,14 @@ export declare class Act<TSchemaReg extends SchemaRegister<TActions>, TEvents ex
522
323
  */
523
324
  drain(options?: DrainOptions): Promise<Drain<TEvents>>;
524
325
  private _arm_all;
326
+ /**
327
+ * Settles what a change armed (a commit, a reset, an unblock, a restore,
328
+ * a notification from another process), unless the app walks the
329
+ * pipeline itself (`autoSettle: false`).
330
+ */
331
+ private _settle_armed;
332
+ /** Schedules a settle pass; writer-only instances (`drain: false`) skip it. */
333
+ private _schedule;
525
334
  /** Arms only the lanes these events react on; true when any was armed. */
526
335
  private _arm_for_event_names;
527
336
  /** In parallel, so a slow lane never holds up a fast one. */
@@ -576,9 +385,6 @@ export declare class Act<TSchemaReg extends SchemaRegister<TActions>, TEvents ex
576
385
  * reads (default 100). The scan always starts at the correlation
577
386
  * checkpoint, so `after` is ignored.
578
387
  * @param frequency - Milliseconds between ticks (default: 10000)
579
- * @param callback - Called with the number of newly subscribed streams
580
- * after each correlate pass that found some.
581
- * @deprecated Listen to the `"settled"` lifecycle event instead.
582
388
  * @returns `true` if the poll started, `false` if one is already running
583
389
  *
584
390
  * @example
@@ -591,7 +397,7 @@ export declare class Act<TSchemaReg extends SchemaRegister<TActions>, TEvents ex
591
397
  * @see {@link settle} for what each tick runs
592
398
  * @see {@link stop_correlations} to stop the poll
593
399
  */
594
- start_correlations(query?: Query, frequency?: number, callback?: (subscribed: number) => void): boolean;
400
+ start_correlations(query?: Query, frequency?: number): boolean;
595
401
  /**
596
402
  * Stops the poll started by {@link start_correlations}. Idempotent, and
597
403
  * called by `shutdown()`.
@@ -600,14 +406,15 @@ export declare class Act<TSchemaReg extends SchemaRegister<TActions>, TEvents ex
600
406
  */
601
407
  stop_correlations(): void;
602
408
  /**
603
- * Cancels any pending or active settle cycle.
409
+ * Drops the settle pass scheduled but not yet started. A cycle already
410
+ * running finishes; later changes schedule new passes.
604
411
  *
605
412
  * @see {@link settle}
606
413
  */
607
414
  stop_settling(): void;
608
415
  /**
609
- * Reset reaction stream watermarks and request a drain on the next
610
- * `drain()` / `settle()` cycle.
416
+ * Reset reaction stream watermarks and settle them, replaying their
417
+ * events through their reactions.
611
418
  *
612
419
  * Use this to replay events through projections (or other reaction targets)
613
420
  * after changing handler logic. Equivalent to calling `store().reset(streams)`
@@ -615,10 +422,10 @@ export declare class Act<TSchemaReg extends SchemaRegister<TActions>, TEvents ex
615
422
  * `store().reset(...)` alone leaves the flag untouched, so a settled app
616
423
  * would short-circuit and skip the replay.
617
424
  *
618
- * Pair with `app.settle()` (or a single `app.drain()` for small streams).
619
- * `settle()` loops correlate→drain until no progress is made, so one call
620
- * fully catches up paginated streams without forcing callers to roll
621
- * their own loop.
425
+ * The reset schedules a settle on its own, which loops correlate→drain
426
+ * until the replay catches up. Call `app.settle(options)` right after to
427
+ * give that pass batch options, or
428
+ * `correlate()` / `drain()` to drive the replay by hand.
622
429
  *
623
430
  * @param input - Reaction target streams (e.g., projection names) to reset, or a {@link StreamFilter} for bulk operations
624
431
  * @returns Count of streams that were actually reset
@@ -626,7 +433,7 @@ export declare class Act<TSchemaReg extends SchemaRegister<TActions>, TEvents ex
626
433
  * @example Rebuild a projection (production)
627
434
  * ```typescript
628
435
  * await app.reset(["my-projection"]);
629
- * app.settle({ eventLimit: 1000 }); // emits "settled" when fully replayed
436
+ * app.settle({ eventLimit: 1000 }); // optional: bigger batches; emits "settled"
630
437
  * ```
631
438
  *
632
439
  * @see {@link Store.reset} for the underlying store primitive
@@ -642,11 +449,9 @@ export declare class Act<TSchemaReg extends SchemaRegister<TActions>, TEvents ex
642
449
  * {@link reset}, which rebuilds from event 0 (suitable for projection
643
450
  * rebuilds, wrong for "I fixed the bug, please retry").
644
451
  *
645
- * Wraps `store().unblock(streams)` and raises the orchestrator's
646
- * internal "needs drain" flag so a settled app picks up the now-free
647
- * streams on the next cycle. Equivalent to calling `store().unblock(...)`
648
- * directly, but `store().unblock(...)` alone leaves the flag
649
- * untouched.
452
+ * Wraps `store().unblock(streams)` and settles the now-free streams on
453
+ * its own. `store().unblock(...)` alone leaves them waiting for the next
454
+ * commit.
650
455
  *
651
456
  * @param input - Stream names to unblock, or a {@link StreamFilter} for bulk recovery
652
457
  * @returns Count of streams that were actually flipped (were blocked)
@@ -836,25 +641,28 @@ export declare class Act<TSchemaReg extends SchemaRegister<TActions>, TEvents ex
836
641
  /**
837
642
  * Debounced, non-blocking correlate→drain cycle.
838
643
  *
839
- * Call this after `app.do()` (or `app.reset()`) to schedule a background
840
- * drain. Multiple rapid calls within the debounce window are coalesced
841
- * into a single cycle. Runs correlate→drain in a loop until a pass makes
842
- * no progress — no new subscriptions, no events read, no streams leased —
843
- * then emits
844
- * the `"settled"` lifecycle event. This means a single `settle()` call
845
- * fully catches up paginated streams (e.g. after `reset()` on a long
846
- * projection) without forcing callers to loop.
644
+ * A local change that frees reaction work (a commit, `reset()`,
645
+ * `unblock()`, `restore()`) schedules this on its own unless the app
646
+ * sets `autoSettle: false`. Call it at startup, to run what was pending
647
+ * before a restart, or with options for the next pass. A pass already
648
+ * scheduled is never put off: calls before it runs join it (a shorter
649
+ * `debounceMs` brings it forward), and a call during a running cycle
650
+ * queues one more pass after it. Runs correlate→drain in a loop until a pass makes no
651
+ * progress — no new subscriptions, no events read, no streams leased —
652
+ * then emits the `"settled"` lifecycle event, so one call fully catches
653
+ * up paginated streams without forcing callers to loop.
847
654
  *
848
655
  * @param options - Settle configuration — see {@link SettleOptions} for fields:
849
- * `debounceMs` (default 10), `correlate` (default `{ after: -1, limit: 100 }`),
656
+ * `debounceMs` (default 10), `correlate.limit` (default 100, or the
657
+ * poll's limit while `start_correlations` runs; `after` is always the
658
+ * checkpoint),
850
659
  * `maxPasses` (default `Infinity` — kill-switch for runaway loops),
851
660
  * `streamLimit` (default 10), `eventLimit` (default 10),
852
661
  * `leaseMillis` (default 10000).
853
662
  *
854
- * @example API mutations
663
+ * @example Startup
855
664
  * ```typescript
856
- * await app.do("CreateItem", target, input);
857
- * app.settle(); // non-blocking, returns immediately
665
+ * app.settle(); // run what was pending before the restart
858
666
  *
859
667
  * app.on("settled", (drain) => {
860
668
  * // notify SSE clients, invalidate caches, etc.
@@ -1 +1 @@
1
- {"version":3,"file":"act.d.ts","sourceRoot":"","sources":["../../src/act.ts"],"names":[],"mappings":"AAWA,OAAO,EAOL,KAAK,qBAAqB,EAC1B,KAAK,YAAY,EAgBjB,KAAK,OAAO,EAWb,MAAM,qBAAqB,CAAC;AAQ7B,YAAY,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAE/E,OAAO,EAA6B,KAAK,MAAM,EAAS,MAAM,YAAY,CAAC;AAE3E,OAAO,KAAK,EACV,KAAK,EACL,IAAI,EACJ,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,WAAW,EACX,SAAS,EACT,UAAU,EACV,SAAS,EACT,KAAK,EACL,YAAY,EACZ,SAAS,EACT,WAAW,EACX,IAAI,EACJ,UAAU,EACV,KAAK,EACL,UAAU,EAEV,KAAK,EACL,QAAQ,EACR,WAAW,EACX,UAAU,EACV,MAAM,EACN,cAAc,EACd,OAAO,EACP,aAAa,EACb,eAAe,EACf,QAAQ,EACR,KAAK,EAEL,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,MAAM,EACP,MAAM,kBAAkB,CAAC;AAO1B,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,+BAA+B,EAC/B,wBAAwB,EACxB,sBAAsB,EACtB,8BAA8B,EAC9B,0BAA0B,EAC1B,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;;GASG;AACH,MAAM,MAAM,kBAAkB,CAC5B,WAAW,SAAS,cAAc,CAAC,QAAQ,CAAC,EAC5C,OAAO,SAAS,OAAO,EACvB,QAAQ,SAAS,OAAO,IACtB;IACF,SAAS,EAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IACvC,KAAK,EAA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,OAAO,CAAC,MAAM,CAAC,CAKhD;IAEK,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,YAAY,mBAM3C;IAEK,UAAU,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,mBAKtD;IAEK,aAAa,CACjB,QAAQ,EAAE,CAAC,QAAQ,EAAE,cAAc,KAAK,IAAI,EAC5C,KAAK,CAAC,EAAE,YAAY,GACnB,OAAO,CAAC,kBAAkB,CAAC,CAkD7B;IAEK,WAAW,CAAC,CAAC,SAAS,OAAO,EACjC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,YAAY,EAAE,QAAQ,GAAG,cAAc,CAAC,EAC/D,OAAO,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAC7B,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CA+EtC;IAEK,QAAQ,CACZ,OAAO,EAAE,KAAK,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,IAAI,CAAC,EAAE,SAAS,CAAC;QACjB,MAAM,CAAC,EAAE,IAAI,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;iBAMW,MAAM;mBACJ,SAAS,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC;iBACnC,IAAI;QA2DlB;IAED,+EAA+E;IACzE,OAAO,CACX,MAAM,EAAE,CACN,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC,KAAK,OAAO,CAAC,MAAM,CAAC,KACpE,OAAO,CAAC,IAAI,CAAC,GACjB,OAAO,CAAC,IAAI,CAAC,CAyCf;CACF"}
@@ -1,118 +1,5 @@
1
- /**
2
- * @module act-builder
3
- * @category Builders
4
- *
5
- * Fluent builder for composing event-sourced applications.
6
- */
7
- import { Act, type ActOptions } from "../act.js";
8
- import { type DEFAULT_LANE } from "../ports.js";
9
- import type { Actor, LaneConfig, Schema, SchemaRegister, Schemas, State } from "../types/index.js";
10
- import type { BuilderBase } from "./builder-base.js";
11
- import type { Slice } from "./slice-builder.js";
12
- /**
13
- * Fluent builder interface for composing event-sourced applications.
14
- *
15
- * Provides a chainable API for:
16
- * - Registering states via `.withState()`
17
- * - Registering slices via `.withSlice()`
18
- * - Registering projections via `.withProjection()`
19
- * - Locking a custom actor type via `.withActor<TActor>()`
20
- * - Declaring drain lanes via `.withLane({name, ...})`
21
- * - Defining event reactions via `.on()` → `.do()` → `.to()`
22
- * - Building the orchestrator via `.build()`
23
- *
24
- * @template TSchemaReg - Schema register for states (maps action names to state schemas)
25
- * @template TEvents - Event schemas (maps event names to event data schemas)
26
- * @template TActions - Action schemas (maps action names to action payload schemas)
27
- * @template TStateMap - Map of state names to state schemas
28
- * @template TActor - Actor type extending base Actor
29
- * @template TLanes - Union of declared lane names. Narrowed by
30
- * `.withLane({name})` calls so `.to({lane})` and `ActOptions.onlyLanes`
31
- * reject typos at compile time. Starts at `"default"`.
32
- *
33
- * @see {@link act} for usage examples
34
- * @see {@link Act} for the built orchestrator API
35
- */
36
- export interface ActBuilder<TSchemaReg extends SchemaRegister<TActions>, TEvents extends Schemas, TActions extends Schemas, TStateMap extends Record<string, Schema> = {}, TActor extends Actor = Actor, TLanes extends string = typeof DEFAULT_LANE> extends BuilderBase<ActBuilder<TSchemaReg, TEvents, TActions, TStateMap, TActor, TLanes>, TEvents, TActions, TActor, TLanes> {
37
- /**
38
- * Registers a state definition with the builder.
39
- *
40
- * State names, action names, and event names must be unique across the
41
- * application (partial states with the same name are merged automatically).
42
- *
43
- * @throws {Error} If duplicate action or event names are detected
44
- */
45
- withState: <TNewState extends Schema, TNewEvents extends Schemas, TNewActions extends Schemas, TNewName extends string = string>(state: State<TNewState, TNewEvents, TNewActions, TNewName>) => ActBuilder<TSchemaReg & {
46
- [K in keyof TNewActions]: TNewState;
47
- }, TEvents & TNewEvents, TActions & TNewActions, TStateMap & {
48
- [K in TNewName]: TNewState;
49
- }, TActor, TLanes>;
50
- /**
51
- * Registers a slice with the builder.
52
- *
53
- * Merges all the slice's states and reactions into the application.
54
- * State names, action names, and event names must be unique across the
55
- * application (partial states with the same name are merged automatically).
56
- *
57
- * @throws {Error} If duplicate action or event names are detected
58
- */
59
- withSlice: <TNewSchemaReg extends SchemaRegister<TNewActions>, TNewEvents extends Schemas, TNewActions extends Schemas, TNewMap extends Record<string, Schema>, TNewLanes extends string>(slice: Slice<TNewSchemaReg, TNewEvents, TNewActions, TNewMap, Actor, TNewLanes>) => ActBuilder<TSchemaReg & TNewSchemaReg, TEvents & TNewEvents, TActions & TNewActions, TStateMap & TNewMap, TActor, TLanes | TNewLanes>;
60
- /**
61
- * Locks a custom actor type for this application.
62
- *
63
- * This is a pure type-level method — it returns the same builder at
64
- * runtime but narrows the `TActor` generic so that `app.do()` and
65
- * reaction dispatchers require the richer actor shape.
66
- *
67
- * @template TNewActor - Custom actor type extending base Actor
68
- * @returns The same builder with `TActor` locked to `TNewActor`
69
- *
70
- * @example
71
- * ```typescript
72
- * type MyActor = { id: string; name: string; role: string; tenantId: string };
73
- *
74
- * const app = act()
75
- * .withActor<MyActor>()
76
- * .withState(Counter)
77
- * .build();
78
- *
79
- * // Now app.do() requires MyActor in the target
80
- * await app.do("increment", {
81
- * stream: "counter-1",
82
- * actor: { id: "1", name: "Alice", role: "admin", tenantId: "t1" }
83
- * }, { by: 5 });
84
- * ```
85
- */
86
- withActor: <TNewActor extends Actor>() => ActBuilder<TSchemaReg, TEvents, TActions, TStateMap, TNewActor, TLanes>;
87
- /**
88
- * Declares a drain lane. Lane name narrows `TLanes` so
89
- * `.to({lane})` and `ActOptions.onlyLanes` type-check against it.
90
- *
91
- * @example
92
- * ```typescript
93
- * const app = act()
94
- * .withState(Counter)
95
- * .withLane({ name: "slow", leaseMillis: 60_000, streamLimit: 5 })
96
- * .on("OrderConfirmed")
97
- * .do(deliverWebhook)
98
- * .to({ target: "webhooks-out", lane: "slow" })
99
- * .build();
100
- * ```
101
- */
102
- withLane: <const TConfig extends LaneConfig>(config: TConfig) => ActBuilder<TSchemaReg, TEvents, TActions, TStateMap, TActor, TLanes | TConfig["name"]>;
103
- /**
104
- * Builds and returns the Act orchestrator instance.
105
- *
106
- * @param options - Optional runtime overrides (see {@link ActOptions}).
107
- * `options.onlyLanes` is narrowed to the declared `TLanes` union, so
108
- * `onlyLanes: ["typo"]` is a compile error when the lane wasn't
109
- * declared via `.withLane(...)`.
110
- * @returns The Act orchestrator instance
111
- *
112
- * @see {@link Act} for available orchestrator methods
113
- */
114
- build: (options?: ActOptions<TLanes>) => Act<TSchemaReg, TEvents, TActions, TStateMap, TActor>;
115
- }
1
+ import type { ActBuilder } from "../types/builders.js";
2
+ import type { Actor, Schema, SchemaRegister, Schemas } from "../types/index.js";
116
3
  /**
117
4
  * Creates a new Act orchestrator builder for composing event-sourced applications.
118
5
  *
@@ -1 +1 @@
1
- {"version":3,"file":"act-builder.d.ts","sourceRoot":"","sources":["../../../src/builders/act-builder.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,GAAG,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAgBjD,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,aAAa,CAAC;AAErD,OAAO,KAAK,EACV,KAAK,EAEL,UAAU,EAEV,MAAM,EACN,cAAc,EACd,OAAO,EACP,KAAK,EACN,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AASrD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAqBhD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,UAAU,CACzB,UAAU,SAAS,cAAc,CAAC,QAAQ,CAAC,EAC3C,OAAO,SAAS,OAAO,EACvB,QAAQ,SAAS,OAAO,EAExB,SAAS,SAAS,MAAM,CAA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AChD,OAAO,SAAS,OAAO,GAAG,EAAE,EAC5B,QAAQ,SAAS,OAAO,GAAG,EAAE,EAC7B,SAAS,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,EAAE,EAC7C,MAAM,SAAS,KAAK,GAAG,KAAK,KACzB,UAAU,CAAC,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,CAyWhE"}
@@ -11,7 +11,7 @@
11
11
  *
12
12
  * @internal
13
13
  */
14
- import { type DeferSchedule } from "../internal/index.js";
14
+ import { type DeferSchedule } from "../internal/defer-config.js";
15
15
  import type { Committed, EventRegister, LaneConfig, ReactionHandler, ReactionOptions, ReactionResolver, Schemas } from "../types/index.js";
16
16
  /**
17
17
  * Validate and register a drain lane: the `"default"` name is
@@ -1 +1 @@
1
- {"version":3,"file":"builder-utils.d.ts","sourceRoot":"","sources":["../../../src/builders/builder-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAIL,KAAK,aAAa,EAGnB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,UAAU,EAEV,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,OAAO,EACR,MAAM,mBAAmB,CAAC;AAG3B;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,IAAI,CAM3E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CACzB,OAAO,SAAS,OAAO,EACvB,IAAI,SAAS,MAAM,OAAO,EAC1B,QAAQ,EACR,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,QAAQ;IA2C5D,EAAE,YACS,eAAe,CAAC,OAAO,EAAE,IAAI,CAAC,YAC7B,OAAO,CAAC,eAAe,CAAC;qBAVrB,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,MAAM;;IAYvD,KAAK,aAAa,aAAa,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACvD,EAAE,YACS,eAAe,CAAC,OAAO,EAAE,IAAI,CAAC,YAC7B,OAAO,CAAC,eAAe,CAAC;;;;EAIzC"}
1
+ {"version":3,"file":"builder-utils.d.ts","sourceRoot":"","sources":["../../../src/builders/builder-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAOH,OAAO,EAEL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,UAAU,EAEV,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,OAAO,EACR,MAAM,mBAAmB,CAAC;AAI3B;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,IAAI,CAM3E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CACzB,OAAO,SAAS,OAAO,EACvB,IAAI,SAAS,MAAM,OAAO,EAC1B,QAAQ,EACR,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,QAAQ;IA2C5D,EAAE,YACS,eAAe,CAAC,OAAO,EAAE,IAAI,CAAC,YAC7B,OAAO,CAAC,eAAe,CAAC;qBAVrB,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,MAAM;;IAYvD,KAAK,aAAa,aAAa,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACvD,EAAE,YACS,eAAe,CAAC,OAAO,EAAE,IAAI,CAAC,YAC7B,OAAO,CAAC,eAAe,CAAC;;;;EAIzC"}
@@ -4,10 +4,10 @@
4
4
  *
5
5
  * Everything `act().build()` derives from the registered events.
6
6
  *
7
- * This is the build-time half of the event lifecycle. `internal/sensitive.ts`
8
- * owns the other two halves — the `sensitive(...)` marker itself, and the
9
- * runtime transforms (`pii_gate`, `pii_strip`, `pii_split`) that a reader is
10
- * composed from. Nothing here runs per event at runtime; everything here runs
7
+ * This is the build-time half of the event lifecycle. The other two halves
8
+ * are the `sensitive(...)` marker (`sensitive.ts`) and the runtime
9
+ * transforms (`pii_gate`, `pii_strip`, `pii_split`, in `internal/pii.ts`)
10
+ * that a reader is composed from. Nothing here runs per event at runtime; everything here runs
11
11
  * once, at build, and hands the orchestrator a prebuilt function.
12
12
  *
13
13
  * Three things are derived, all in ONE walk over the registered events:
@@ -31,7 +31,7 @@
31
31
  * @internal
32
32
  */
33
33
  import { z } from "zod";
34
- import { type EventGate } from "../internal/sensitive.js";
34
+ import { type EventGate } from "../internal/pii.js";
35
35
  import type { LaneConfig, Registry } from "../types/index.js";
36
36
  /** What one pass over an event's schema resolves. @internal */
37
37
  export type EventTags = {
@@ -1 +1 @@
1
- {"version":3,"file":"event-builder.d.ts","sourceRoot":"","sources":["../../../src/builders/event-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,KAAK,SAAS,EAMf,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAS,UAAU,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAErE,+DAA+D;AAC/D,MAAM,MAAM,SAAS,GAAG;IACtB,2EAA2E;IAC3E,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC;;;OAGG;IACH,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC,GAAG,SAAS,CAAC;IAChE;;;OAGG;IACH,QAAQ,CAAC,gBAAgB,EAAE,CAAC,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAAC,GAAG,SAAS,CAAC;CACpE,CAAC;AAEF;;;;;;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rD,CAAC;AAOF;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EACjC,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,GAAG,CAAC,EAChC,KAAK,EAAE,aAAa,CAAC,UAAU,CAAC,EAChC,MAAM,EAAE,YAAY,GACnB,WAAW,CAkHb"}
@@ -1,5 +1,5 @@
1
+ import type { Projection } from "../types/builders.js";
1
2
  import type { State } from "../types/index.js";
2
- import type { Projection } from "./projection-builder.js";
3
3
  /**
4
4
  * Registers a state into a states map and action/event registries,
5
5
  * merging with existing same-name states (partial state support).
@@ -1 +1 @@
1
- {"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../../src/builders/merge.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAU,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AA0E1D;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAC3B,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,EACzC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC5B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC1B,IAAI,CAON;AAuMD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE;IAAE,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAAC,EAC3D,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE;IAAE,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAAC,GAC1D,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