@graphrefly/graphrefly 0.21.0 → 0.23.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 (101) hide show
  1. package/README.md +7 -5
  2. package/dist/chunk-263BEJJO.js +115 -0
  3. package/dist/chunk-263BEJJO.js.map +1 -0
  4. package/dist/chunk-2GQLMQVJ.js +47 -0
  5. package/dist/chunk-2GQLMQVJ.js.map +1 -0
  6. package/dist/chunk-32N5A454.js +36 -0
  7. package/dist/chunk-32N5A454.js.map +1 -0
  8. package/dist/chunk-7TAQJHQV.js +103 -0
  9. package/dist/chunk-7TAQJHQV.js.map +1 -0
  10. package/dist/{chunk-VOQFK7YN.js → chunk-CWYPA63G.js} +109 -259
  11. package/dist/chunk-CWYPA63G.js.map +1 -0
  12. package/dist/{chunk-7IGHIFTT.js → chunk-HVBX5KIW.js} +15 -26
  13. package/dist/chunk-HVBX5KIW.js.map +1 -0
  14. package/dist/chunk-JFONSPNF.js +391 -0
  15. package/dist/chunk-JFONSPNF.js.map +1 -0
  16. package/dist/chunk-NZMBRXQV.js +2330 -0
  17. package/dist/chunk-NZMBRXQV.js.map +1 -0
  18. package/dist/{chunk-XWBVAO2R.js → chunk-PNUZM7PC.js} +20 -30
  19. package/dist/chunk-PNUZM7PC.js.map +1 -0
  20. package/dist/{chunk-ZTCDY5NQ.js → chunk-PX6PDUJ5.js} +34 -50
  21. package/dist/chunk-PX6PDUJ5.js.map +1 -0
  22. package/dist/chunk-XRFJJ2IU.js +2417 -0
  23. package/dist/chunk-XRFJJ2IU.js.map +1 -0
  24. package/dist/chunk-XTLYW4FR.js +6829 -0
  25. package/dist/chunk-XTLYW4FR.js.map +1 -0
  26. package/dist/compat/nestjs/index.cjs +3489 -2286
  27. package/dist/compat/nestjs/index.cjs.map +1 -1
  28. package/dist/compat/nestjs/index.d.cts +6 -4
  29. package/dist/compat/nestjs/index.d.ts +6 -4
  30. package/dist/compat/nestjs/index.js +10 -8
  31. package/dist/core/index.cjs +1706 -1217
  32. package/dist/core/index.cjs.map +1 -1
  33. package/dist/core/index.d.cts +3 -2
  34. package/dist/core/index.d.ts +3 -2
  35. package/dist/core/index.js +37 -34
  36. package/dist/extra/index.cjs +7519 -6125
  37. package/dist/extra/index.cjs.map +1 -1
  38. package/dist/extra/index.d.cts +4 -4
  39. package/dist/extra/index.d.ts +4 -4
  40. package/dist/extra/index.js +63 -34
  41. package/dist/graph/index.cjs +3199 -2212
  42. package/dist/graph/index.cjs.map +1 -1
  43. package/dist/graph/index.d.cts +5 -3
  44. package/dist/graph/index.d.ts +5 -3
  45. package/dist/graph/index.js +24 -11
  46. package/dist/graph-BtdSRHUc.d.cts +1128 -0
  47. package/dist/graph-CEO2FkLY.d.ts +1128 -0
  48. package/dist/{index-DuN3bhtm.d.ts → index-B0tfuXwV.d.cts} +1697 -586
  49. package/dist/index-BFGjXbiP.d.cts +315 -0
  50. package/dist/{index-CgSiUouz.d.ts → index-BPlWVAKY.d.cts} +4 -4
  51. package/dist/index-BUj3ASVe.d.cts +406 -0
  52. package/dist/{index-VHA43cGP.d.cts → index-C59uSJAH.d.cts} +2 -2
  53. package/dist/index-CkElcUY6.d.ts +315 -0
  54. package/dist/index-DSPc5rkv.d.ts +406 -0
  55. package/dist/{index-BjtlNirP.d.cts → index-DgscL7v0.d.ts} +4 -4
  56. package/dist/{index-SFzE_KTa.d.cts → index-RXN94sHK.d.ts} +1697 -586
  57. package/dist/{index-8a605sg9.d.ts → index-jEtF4N7L.d.ts} +2 -2
  58. package/dist/index.cjs +9947 -7949
  59. package/dist/index.cjs.map +1 -1
  60. package/dist/index.d.cts +214 -37
  61. package/dist/index.d.ts +214 -37
  62. package/dist/index.js +919 -648
  63. package/dist/index.js.map +1 -1
  64. package/dist/meta-3QjzotRv.d.ts +41 -0
  65. package/dist/meta-B-Lbs4-O.d.cts +41 -0
  66. package/dist/node-C7PD3sn9.d.cts +1188 -0
  67. package/dist/node-C7PD3sn9.d.ts +1188 -0
  68. package/dist/{observable-DcBwQY7t.d.ts → observable-EyO-moQY.d.ts} +1 -1
  69. package/dist/{observable-C8Kx_O6k.d.cts → observable-axpzv1K2.d.cts} +1 -1
  70. package/dist/patterns/reactive-layout/index.cjs +3205 -2138
  71. package/dist/patterns/reactive-layout/index.cjs.map +1 -1
  72. package/dist/patterns/reactive-layout/index.d.cts +5 -3
  73. package/dist/patterns/reactive-layout/index.d.ts +5 -3
  74. package/dist/patterns/reactive-layout/index.js +7 -4
  75. package/dist/storage-CHT5WE9m.d.ts +182 -0
  76. package/dist/storage-DIgAr7M_.d.cts +182 -0
  77. package/package.json +2 -1
  78. package/dist/chunk-2UDLYZHT.js +0 -2117
  79. package/dist/chunk-2UDLYZHT.js.map +0 -1
  80. package/dist/chunk-4MQ2J6IG.js +0 -1631
  81. package/dist/chunk-4MQ2J6IG.js.map +0 -1
  82. package/dist/chunk-7IGHIFTT.js.map +0 -1
  83. package/dist/chunk-DOSLSFKL.js +0 -162
  84. package/dist/chunk-DOSLSFKL.js.map +0 -1
  85. package/dist/chunk-ECN37NVS.js +0 -6227
  86. package/dist/chunk-ECN37NVS.js.map +0 -1
  87. package/dist/chunk-G66H6ZRK.js +0 -111
  88. package/dist/chunk-G66H6ZRK.js.map +0 -1
  89. package/dist/chunk-VOQFK7YN.js.map +0 -1
  90. package/dist/chunk-WZ2Z2CRV.js +0 -32
  91. package/dist/chunk-WZ2Z2CRV.js.map +0 -1
  92. package/dist/chunk-XWBVAO2R.js.map +0 -1
  93. package/dist/chunk-ZTCDY5NQ.js.map +0 -1
  94. package/dist/graph-KsTe57nI.d.cts +0 -750
  95. package/dist/graph-mILUUqW8.d.ts +0 -750
  96. package/dist/index-B2SvPEbc.d.ts +0 -257
  97. package/dist/index-BHfg_Ez3.d.ts +0 -629
  98. package/dist/index-Bc_diYYJ.d.cts +0 -629
  99. package/dist/index-UudxGnzc.d.cts +0 -257
  100. package/dist/meta-BnG7XAaE.d.cts +0 -778
  101. package/dist/meta-BnG7XAaE.d.ts +0 -778
@@ -0,0 +1,406 @@
1
+ import { t as Messages, a as NodeOptions, F as FnCtx, N as Node, b as NodeActions, x as NodeFnCleanup, A as Actor, C as COMPLETE, c as COMPLETE_MSG, d as COMPLETE_ONLY_BATCH, D as DATA, e as DEFAULT_ACTOR, f as DIRTY, g as DIRTY_MSG, h as DIRTY_ONLY_BATCH, i as DepRecord, E as ERROR, G as GlobalInspectorEvent, j as GlobalInspectorHook, k as GraphReFlyConfig, l as GuardAction, m as GuardDenied, n as GuardDeniedDetails, H as HashFn, I as INVALIDATE, o as INVALIDATE_MSG, p as INVALIDATE_ONLY_BATCH, M as Message, q as MessageContext, r as MessageTypeRegistration, s as MessageTypeRegistrationInput, u as NodeCtx, v as NodeDescribeKind, w as NodeFn, y as NodeGuard, z as NodeImpl, B as NodeInspectorHook, J as NodeInspectorHookEvent, K as NodeSink, L as NodeStatus, O as NodeTransportOptions, P as NodeVersionInfo, Q as OnMessageHandler, R as OnSubscribeHandler, S as PAUSE, T as PolicyAllow, U as PolicyDeny, V as PolicyRuleData, W as RESOLVED, X as RESOLVED_MSG, Y as RESOLVED_ONLY_BATCH, Z as RESUME, _ as START, $ as START_MSG, a0 as SubscribeContext, a1 as TEARDOWN, a2 as TEARDOWN_MSG, a3 as TEARDOWN_ONLY_BATCH, a4 as V0, a5 as V1, a6 as VersioningLevel, a7 as VersioningOptions, a8 as accessHintForGuard, a9 as advanceVersion, aa as configure, ab as createVersioning, ac as defaultConfig, ad as defaultHash, ae as isV1, af as node, ag as normalizeActor, ah as policy, ai as policyFromRules, aj as registerBuiltins } from './node-C7PD3sn9.js';
2
+ import { D as DescribeDetail, a as DescribeField, b as DescribeNodeOutput, r as resolveDescribeFields } from './meta-3QjzotRv.js';
3
+
4
+ /**
5
+ * Batch deferral for tier-3+ messages, plus per-node emit coalescing inside
6
+ * explicit `batch()` scopes.
7
+ *
8
+ * §1.3.7 — Inside a batch, tier 0–2 signals propagate immediately. Tier 3
9
+ * (DATA/RESOLVED), tier 4 (COMPLETE/ERROR), and tier 5 (TEARDOWN) are queued
10
+ * and drained in ascending phase order after the outermost `batch()` callback
11
+ * returns.
12
+ *
13
+ * **Per-node emit coalescing (Bug 2 fix, 2026-04-17).** Inside an explicit
14
+ * `batch()` scope, consecutive emissions from the same node accumulate in
15
+ * `NodeImpl._batchPendingMessages` instead of each producing a separate
16
+ * downstream wave. At batch end, each node flushes its accumulated messages
17
+ * as ONE multi-message `downWithBatch` call — K `.emit()`s to the same
18
+ * source collapse to K DIRTYs in one tier-1 sink call + K DATAs in one
19
+ * tier-3 sink call. Downstream nodes' fns run once per wave with the full
20
+ * `batchData` (dep's `dataBatch` accumulates all K values, fn sees
21
+ * `[[v1, v2, ..., vK]]`). Resolves the K+1 fan-in over-fire.
22
+ *
23
+ * Outside batch — and during drain (where `flushInProgress` is true but
24
+ * `batchDepth` is 0) — coalescing does NOT apply: each emit goes through
25
+ * its own `downWithBatch` call and produces its own wave.
26
+ *
27
+ * **Phase vocabulary:**
28
+ * - Phase 1 = tiers 0–2 — immediate, never queued.
29
+ * - Phase 2 = tier 3 — {@link drainPhase2}. Value settlements.
30
+ * - Phase 3 = tier 4 — {@link drainPhase3}. Terminal signals.
31
+ * - Phase 4 = tier 5 — {@link drainPhase4}. TEARDOWN (unified deferral).
32
+ *
33
+ * Drain rule: fire any pending flush hooks first, then the lowest non-empty
34
+ * phase. Re-enqueues during drain (and hooks registered by reentrant batches
35
+ * inside subscriber callbacks) bump the loop back to the top so newly-added
36
+ * hooks and closures get processed.
37
+ *
38
+ * **Pre-sorted input invariant.** `downWithBatch` assumes `messages` is
39
+ * already sorted in ascending tier order (produced by `_frameBatch` in
40
+ * `node.ts`). The walker exploits monotonicity for a single O(n) pass and
41
+ * slices at phase boundaries without re-sorting. Flushed multi-emit batches
42
+ * re-run `_frameBatch` to restore monotonicity (the per-emit framings
43
+ * accumulate in interleaved order: `[DIRTY, DATA, DIRTY, DATA, ...]`).
44
+ */
45
+
46
+ /**
47
+ * Returns whether the current call stack is inside a batch scope **or** while
48
+ * a deferred drain is in progress. Nested `downWithBatch` calls during drain
49
+ * still defer (they bump the drain loop).
50
+ */
51
+ declare function isBatching(): boolean;
52
+ /**
53
+ * Runs `fn` inside a batch scope. Nested `batch()` calls share one deferral
54
+ * queue. If `fn` throws, deferred work for the outer frame is discarded
55
+ * (unless a drain is already in progress — cross-language decision A4).
56
+ */
57
+ declare function batch(fn: () => void): void;
58
+ /**
59
+ * Deliver pre-sorted messages through `sink` with tier-based deferral applied.
60
+ *
61
+ * `messages` MUST be in ascending tier order (produced by `_frameBatch` in
62
+ * `node.ts`); the walker exploits that invariant to find phase cuts in one
63
+ * pass without re-sorting.
64
+ *
65
+ * Behavior:
66
+ * - Tier 0–2 — delivered synchronously.
67
+ * - Tier 3 — deferred to {@link drainPhase2} when batching, else synchronous.
68
+ * - Tier 4 — deferred to {@link drainPhase3} when batching, else synchronous.
69
+ * - Tier 5 — deferred to {@link drainPhase4} when batching, else synchronous.
70
+ *
71
+ * Tier-classification uses the caller-supplied `tierOf` so that batch stays
72
+ * decoupled from `GraphReFlyConfig`. NodeImpl passes `config.tierOf` (a
73
+ * pre-bound closure built once in the config constructor) at the emit site;
74
+ * alternate configs can pass their own lookup.
75
+ */
76
+ declare function downWithBatch(sink: (messages: Messages) => void, messages: Messages, tierOf: (t: symbol) => number): void;
77
+
78
+ /**
79
+ * Centralised timestamp utilities.
80
+ *
81
+ * Convention: all graphrefly-ts timestamps use nanoseconds (`_ns` suffix).
82
+ *
83
+ * - {@link monotonicNs} — monotonic clock (ordering, durations, timeline events).
84
+ * - {@link wallClockNs} — wall-clock (mutation attribution, cron emission).
85
+ *
86
+ * **Precision limits (JS platform):**
87
+ *
88
+ * - `monotonicNs`: effective ~microsecond precision. `performance.now()` returns
89
+ * milliseconds with ~5µs resolution; the last 3 digits of the nanosecond value
90
+ * are always zero. Python's `time.monotonic_ns()` gives true nanoseconds.
91
+ *
92
+ * - `wallClockNs`: ~256ns precision loss at current epoch. `Date.now() * 1e6`
93
+ * produces values around 1.8×10¹⁸ which exceed IEEE 754's 2⁵³ safe integer
94
+ * limit. Python's `time.time_ns()` (arbitrary-precision `int`) has no loss.
95
+ * In practice this is irrelevant — JS is single-threaded, so sub-microsecond
96
+ * timestamp collisions cannot occur.
97
+ */
98
+ /** Monotonic nanosecond timestamp via `performance.now()`. */
99
+ declare function monotonicNs(): number;
100
+ /** Wall-clock nanosecond timestamp via `Date.now()`. */
101
+ declare function wallClockNs(): number;
102
+
103
+ /**
104
+ * Sugar constructors over the raw `node()` primitive.
105
+ *
106
+ * Each factory wraps a user-friendly function into the canonical
107
+ * `NodeFn = (data, actions, ctx) => cleanup | void` shape, then calls
108
+ * `node(...)`. This is the only place `actions.emit(...)` is invoked
109
+ * on behalf of the user — if you need finer control (multi-emission,
110
+ * raw `actions.down` / `actions.up`, cleanup return), use the raw
111
+ * `node()` factory from `./node.js` directly.
112
+ *
113
+ * See SESSION-foundation-redesign.md §8.5 + §10.6 for the rewrite.
114
+ */
115
+
116
+ /**
117
+ * Creates a manual source node. Drive it with `state.emit(v)` (framed,
118
+ * diamond-safe) or `state.down([[DATA, v]])` (raw compat path).
119
+ *
120
+ * @param initial - Starting cached value. Pass `undefined` or `null`
121
+ * explicitly to cache that value; omit to leave the node in `"sentinel"`.
122
+ * @param opts - Optional {@link NodeOptions} (excluding `initial`).
123
+ */
124
+ declare function state<T>(initial: T, opts?: Omit<NodeOptions<T>, "initial">): Node<T>;
125
+ /**
126
+ * User-level producer compute: runs once on first-subscriber activation.
127
+ * Receives `actions` for imperative emission and `ctx` for FnCtx (typically
128
+ * only `store` is useful on a producer — no deps means `prevData` and
129
+ * `terminalDeps` are empty).
130
+ */
131
+ type ProducerFn = (actions: NodeActions, ctx: FnCtx) => NodeFnCleanup | void;
132
+ /**
133
+ * Creates a producer node with no deps; `fn` runs once when the first
134
+ * subscriber connects. Return a cleanup function (`() => void`) or
135
+ * `{ deactivation: () => void }` to register teardown.
136
+ *
137
+ * @example
138
+ * ```ts
139
+ * const ticker = producer((actions) => {
140
+ * const id = setInterval(() => actions.emit(Date.now()), 1000);
141
+ * return () => clearInterval(id);
142
+ * });
143
+ * ```
144
+ */
145
+ declare function producer<T = unknown>(fn: ProducerFn, opts?: NodeOptions<T>): Node<T>;
146
+ /**
147
+ * User-level derived compute: receives the latest DATA from each dep and
148
+ * returns the new value. The sugar wraps it with `actions.emit(fn(...))`
149
+ * so the return value flows through the framed emit pipeline.
150
+ *
151
+ * For derived nodes that need to inspect `ctx.prevData` / `ctx.terminalDeps`
152
+ * / `ctx.store`, accept the optional second parameter.
153
+ */
154
+ type DerivedFn<T> = (data: readonly unknown[], ctx: FnCtx) => T | undefined | null;
155
+ /**
156
+ * Creates a derived node that computes **one output per wave** from the latest
157
+ * value of each dependency — **snapshot / combine semantics**.
158
+ *
159
+ * `fn` receives one scalar per dep (the last DATA value seen this wave, or the
160
+ * prior-wave value as fallback). It is called once per settled wave and emits
161
+ * a single value via `actions.emit`. The equals check then suppresses the
162
+ * emission as `RESOLVED` if the output has not changed.
163
+ *
164
+ * **Not for streaming one-to-one transforms.** If each DATA value in a batch
165
+ * must produce a corresponding output (e.g. transforming every item emitted by
166
+ * `fromIter` individually), use {@link map} or raw `node()` with full batch
167
+ * iteration instead. `derived` only sees the *last* value per dep when a batch
168
+ * carries multiple DATAs.
169
+ *
170
+ * @example
171
+ * ```ts
172
+ * const a = state(1);
173
+ * const b = derived([a], ([x]) => (x as number) * 2);
174
+ * ```
175
+ */
176
+ declare function derived<T = unknown>(deps: readonly Node[], fn: DerivedFn<T>, opts?: NodeOptions<T> & {
177
+ partial?: boolean;
178
+ }): Node<T>;
179
+ /**
180
+ * User-level effect compute: fires when deps settle. Return value is NOT
181
+ * auto-emitted — use `actions.emit(v)` / `actions.down(msgs)` explicitly if
182
+ * the effect also wants to produce downstream messages. Return a cleanup
183
+ * function or `{ deactivation }` to register teardown.
184
+ */
185
+ type EffectFn = (data: readonly unknown[], actions: NodeActions, ctx: FnCtx) => NodeFnCleanup | void;
186
+ /**
187
+ * Runs a side-effect when deps settle. Return value is not auto-emitted.
188
+ *
189
+ * @example
190
+ * ```ts
191
+ * effect([source], ([v]) => {
192
+ * console.log(v);
193
+ * });
194
+ * ```
195
+ */
196
+ declare function effect(deps: readonly Node[], fn: EffectFn, opts?: NodeOptions<unknown> & {
197
+ partial?: boolean;
198
+ }): Node<unknown>;
199
+ /**
200
+ * Proxy handed to a {@link DynamicFn}. `track(dep)` returns the dep's
201
+ * latest DATA payload, as delivered through the protocol. Reading from
202
+ * `track` does NOT bypass the message protocol — it reads the internal
203
+ * `DepRecord.prevData` (the stable end-of-previous-wave value) that
204
+ * `_onDepMessage` already populated. If a dep has not yet sent DATA,
205
+ * `track` returns `undefined`.
206
+ */
207
+ type TrackFn = (dep: Node) => unknown;
208
+ /** User-level dynamicNode compute. */
209
+ type DynamicFn<T> = (track: TrackFn, ctx: FnCtx) => T | undefined | null;
210
+ /**
211
+ * Sugar over `derived(...)` that exposes dep values via a `track(dep)`
212
+ * proxy instead of positional `data[i]`. All declared `allDeps` participate
213
+ * in wave tracking, so the first fn run waits for every dep to settle.
214
+ * Unused deps that update just re-run fn; `equals` absorbs unchanged
215
+ * outputs as RESOLVED.
216
+ *
217
+ * P3-compliant: `track(dep)` reads from the framework-managed
218
+ * `DepRecord.prevData` populated by the protocol, never from
219
+ * `dep.cache`.
220
+ *
221
+ * @example
222
+ * ```ts
223
+ * const a = state(1);
224
+ * const b = state(10);
225
+ * const sum = dynamicNode([a, b], (track) => (track(a) as number) + (track(b) as number));
226
+ * ```
227
+ */
228
+ declare function dynamicNode<T = unknown>(allDeps: readonly Node[], fn: DynamicFn<T>, opts?: NodeOptions<T> & {
229
+ partial?: boolean;
230
+ }): Node<T>;
231
+ /**
232
+ * Like {@link dynamicNode} but deps are discovered at runtime via `track()`
233
+ * calls — no upfront `allDeps` array needed. Designed for pull-based compat
234
+ * layers (Jotai atoms, TC39 Signals) where deps are unknown until fn runs.
235
+ *
236
+ * **Two-phase discovery:**
237
+ * 1. fn runs. Each `track(dep)` for an unknown dep: subscribes immediately
238
+ * via `_addDep`, returns `dep.cache` as a stub (P3 boundary exception).
239
+ * Result is discarded (discovery run).
240
+ * 2. New deps settle (DATA from subscribe handshake). Wave machinery
241
+ * re-triggers fn. `track(dep)` now returns protocol-delivered `data[i]`.
242
+ * If MORE unknown deps appear, repeat step 1.
243
+ * 3. Converges when no new deps found → real run → `actions.emit(result)`.
244
+ *
245
+ * P3 violation is limited to discovery runs. Once all deps are known,
246
+ * subsequent waves use protocol-delivered values exclusively.
247
+ *
248
+ * Re-entrance safety: `_addDep` subscribes immediately. If the dep delivers
249
+ * DATA synchronously during fn execution, `_execFn`'s re-entrance guard
250
+ * defers the re-run to after the current fn returns.
251
+ *
252
+ * @param opts - Optional {@link AutoTrackOptions}. Pass `{ partial: true }` to
253
+ * allow fn to run before all known deps have delivered their first value
254
+ * (useful for optional/secondary deps).
255
+ *
256
+ * @example
257
+ * ```ts
258
+ * const a = state(1), b = state(2);
259
+ * const sum = autoTrackNode((track) => track(a) + track(b));
260
+ * // deps [a, b] discovered automatically on first run
261
+ * ```
262
+ */
263
+ /**
264
+ * Options for {@link autoTrackNode}.
265
+ */
266
+ interface AutoTrackOptions<T> extends NodeOptions<T> {
267
+ /**
268
+ * When `true`, fn may run before all known deps have delivered their first
269
+ * DATA. Unknown deps return `undefined` via `track()`, which the fn must
270
+ * handle explicitly. Useful when some deps are "nice-to-have" — e.g. a
271
+ * primary computation should continue while a secondary dep is still
272
+ * initialising.
273
+ *
274
+ * When `false` (default), fn is held until every known dep has delivered at
275
+ * least one DATA value — a RESOLVED is emitted for the wave instead.
276
+ * This matches `derived()` semantics and is the correct default for
277
+ * pull-based compat layers (Signals, Jotai) where all deps must be
278
+ * initialised before the computation is meaningful.
279
+ *
280
+ * @default false
281
+ */
282
+ partial?: boolean;
283
+ }
284
+ declare function autoTrackNode<T = unknown>(fn: (track: TrackFn, ctx: FnCtx) => T | undefined | null, opts?: AutoTrackOptions<T>): Node<T>;
285
+ /** Unary operator used by {@link pipe}. */
286
+ type PipeOperator = (n: Node) => Node;
287
+ /**
288
+ * Composes unary operators left-to-right; returns the final node.
289
+ *
290
+ * @example
291
+ * ```ts
292
+ * const out = pipe(
293
+ * source,
294
+ * (n) => map(n, (x) => x + 1),
295
+ * (n) => filter(n, (x) => x > 0),
296
+ * );
297
+ * ```
298
+ */
299
+ declare function pipe(source: Node, ...ops: PipeOperator[]): Node;
300
+
301
+ /**
302
+ * Core layer: message protocol, node primitive, lifecycle (Phase 0).
303
+ */
304
+
305
+ declare const index_Actor: typeof Actor;
306
+ type index_AutoTrackOptions<T> = AutoTrackOptions<T>;
307
+ declare const index_COMPLETE: typeof COMPLETE;
308
+ declare const index_COMPLETE_MSG: typeof COMPLETE_MSG;
309
+ declare const index_COMPLETE_ONLY_BATCH: typeof COMPLETE_ONLY_BATCH;
310
+ declare const index_DATA: typeof DATA;
311
+ declare const index_DEFAULT_ACTOR: typeof DEFAULT_ACTOR;
312
+ declare const index_DIRTY: typeof DIRTY;
313
+ declare const index_DIRTY_MSG: typeof DIRTY_MSG;
314
+ declare const index_DIRTY_ONLY_BATCH: typeof DIRTY_ONLY_BATCH;
315
+ declare const index_DepRecord: typeof DepRecord;
316
+ type index_DerivedFn<T> = DerivedFn<T>;
317
+ declare const index_DescribeDetail: typeof DescribeDetail;
318
+ declare const index_DescribeField: typeof DescribeField;
319
+ declare const index_DescribeNodeOutput: typeof DescribeNodeOutput;
320
+ type index_DynamicFn<T> = DynamicFn<T>;
321
+ declare const index_ERROR: typeof ERROR;
322
+ type index_EffectFn = EffectFn;
323
+ declare const index_FnCtx: typeof FnCtx;
324
+ declare const index_GlobalInspectorEvent: typeof GlobalInspectorEvent;
325
+ declare const index_GlobalInspectorHook: typeof GlobalInspectorHook;
326
+ declare const index_GraphReFlyConfig: typeof GraphReFlyConfig;
327
+ declare const index_GuardAction: typeof GuardAction;
328
+ declare const index_GuardDenied: typeof GuardDenied;
329
+ declare const index_GuardDeniedDetails: typeof GuardDeniedDetails;
330
+ declare const index_HashFn: typeof HashFn;
331
+ declare const index_INVALIDATE: typeof INVALIDATE;
332
+ declare const index_INVALIDATE_MSG: typeof INVALIDATE_MSG;
333
+ declare const index_INVALIDATE_ONLY_BATCH: typeof INVALIDATE_ONLY_BATCH;
334
+ declare const index_Message: typeof Message;
335
+ declare const index_MessageContext: typeof MessageContext;
336
+ declare const index_MessageTypeRegistration: typeof MessageTypeRegistration;
337
+ declare const index_MessageTypeRegistrationInput: typeof MessageTypeRegistrationInput;
338
+ declare const index_Messages: typeof Messages;
339
+ declare const index_Node: typeof Node;
340
+ declare const index_NodeActions: typeof NodeActions;
341
+ declare const index_NodeCtx: typeof NodeCtx;
342
+ declare const index_NodeDescribeKind: typeof NodeDescribeKind;
343
+ declare const index_NodeFn: typeof NodeFn;
344
+ declare const index_NodeFnCleanup: typeof NodeFnCleanup;
345
+ declare const index_NodeGuard: typeof NodeGuard;
346
+ declare const index_NodeImpl: typeof NodeImpl;
347
+ declare const index_NodeInspectorHook: typeof NodeInspectorHook;
348
+ declare const index_NodeInspectorHookEvent: typeof NodeInspectorHookEvent;
349
+ declare const index_NodeOptions: typeof NodeOptions;
350
+ declare const index_NodeSink: typeof NodeSink;
351
+ declare const index_NodeStatus: typeof NodeStatus;
352
+ declare const index_NodeTransportOptions: typeof NodeTransportOptions;
353
+ declare const index_NodeVersionInfo: typeof NodeVersionInfo;
354
+ declare const index_OnMessageHandler: typeof OnMessageHandler;
355
+ declare const index_OnSubscribeHandler: typeof OnSubscribeHandler;
356
+ declare const index_PAUSE: typeof PAUSE;
357
+ type index_PipeOperator = PipeOperator;
358
+ declare const index_PolicyAllow: typeof PolicyAllow;
359
+ declare const index_PolicyDeny: typeof PolicyDeny;
360
+ declare const index_PolicyRuleData: typeof PolicyRuleData;
361
+ type index_ProducerFn = ProducerFn;
362
+ declare const index_RESOLVED: typeof RESOLVED;
363
+ declare const index_RESOLVED_MSG: typeof RESOLVED_MSG;
364
+ declare const index_RESOLVED_ONLY_BATCH: typeof RESOLVED_ONLY_BATCH;
365
+ declare const index_RESUME: typeof RESUME;
366
+ declare const index_START: typeof START;
367
+ declare const index_START_MSG: typeof START_MSG;
368
+ declare const index_SubscribeContext: typeof SubscribeContext;
369
+ declare const index_TEARDOWN: typeof TEARDOWN;
370
+ declare const index_TEARDOWN_MSG: typeof TEARDOWN_MSG;
371
+ declare const index_TEARDOWN_ONLY_BATCH: typeof TEARDOWN_ONLY_BATCH;
372
+ type index_TrackFn = TrackFn;
373
+ declare const index_V0: typeof V0;
374
+ declare const index_V1: typeof V1;
375
+ declare const index_VersioningLevel: typeof VersioningLevel;
376
+ declare const index_VersioningOptions: typeof VersioningOptions;
377
+ declare const index_accessHintForGuard: typeof accessHintForGuard;
378
+ declare const index_advanceVersion: typeof advanceVersion;
379
+ declare const index_autoTrackNode: typeof autoTrackNode;
380
+ declare const index_batch: typeof batch;
381
+ declare const index_configure: typeof configure;
382
+ declare const index_createVersioning: typeof createVersioning;
383
+ declare const index_defaultConfig: typeof defaultConfig;
384
+ declare const index_defaultHash: typeof defaultHash;
385
+ declare const index_derived: typeof derived;
386
+ declare const index_downWithBatch: typeof downWithBatch;
387
+ declare const index_dynamicNode: typeof dynamicNode;
388
+ declare const index_effect: typeof effect;
389
+ declare const index_isBatching: typeof isBatching;
390
+ declare const index_isV1: typeof isV1;
391
+ declare const index_monotonicNs: typeof monotonicNs;
392
+ declare const index_node: typeof node;
393
+ declare const index_normalizeActor: typeof normalizeActor;
394
+ declare const index_pipe: typeof pipe;
395
+ declare const index_policy: typeof policy;
396
+ declare const index_policyFromRules: typeof policyFromRules;
397
+ declare const index_producer: typeof producer;
398
+ declare const index_registerBuiltins: typeof registerBuiltins;
399
+ declare const index_resolveDescribeFields: typeof resolveDescribeFields;
400
+ declare const index_state: typeof state;
401
+ declare const index_wallClockNs: typeof wallClockNs;
402
+ declare namespace index {
403
+ export { index_Actor as Actor, type index_AutoTrackOptions as AutoTrackOptions, index_COMPLETE as COMPLETE, index_COMPLETE_MSG as COMPLETE_MSG, index_COMPLETE_ONLY_BATCH as COMPLETE_ONLY_BATCH, index_DATA as DATA, index_DEFAULT_ACTOR as DEFAULT_ACTOR, index_DIRTY as DIRTY, index_DIRTY_MSG as DIRTY_MSG, index_DIRTY_ONLY_BATCH as DIRTY_ONLY_BATCH, index_DepRecord as DepRecord, type index_DerivedFn as DerivedFn, index_DescribeDetail as DescribeDetail, index_DescribeField as DescribeField, index_DescribeNodeOutput as DescribeNodeOutput, type index_DynamicFn as DynamicFn, index_ERROR as ERROR, type index_EffectFn as EffectFn, index_FnCtx as FnCtx, index_GlobalInspectorEvent as GlobalInspectorEvent, index_GlobalInspectorHook as GlobalInspectorHook, index_GraphReFlyConfig as GraphReFlyConfig, index_GuardAction as GuardAction, index_GuardDenied as GuardDenied, index_GuardDeniedDetails as GuardDeniedDetails, index_HashFn as HashFn, index_INVALIDATE as INVALIDATE, index_INVALIDATE_MSG as INVALIDATE_MSG, index_INVALIDATE_ONLY_BATCH as INVALIDATE_ONLY_BATCH, index_Message as Message, index_MessageContext as MessageContext, index_MessageTypeRegistration as MessageTypeRegistration, index_MessageTypeRegistrationInput as MessageTypeRegistrationInput, index_Messages as Messages, index_Node as Node, index_NodeActions as NodeActions, index_NodeCtx as NodeCtx, index_NodeDescribeKind as NodeDescribeKind, index_NodeFn as NodeFn, index_NodeFnCleanup as NodeFnCleanup, index_NodeGuard as NodeGuard, index_NodeImpl as NodeImpl, index_NodeInspectorHook as NodeInspectorHook, index_NodeInspectorHookEvent as NodeInspectorHookEvent, index_NodeOptions as NodeOptions, index_NodeSink as NodeSink, index_NodeStatus as NodeStatus, index_NodeTransportOptions as NodeTransportOptions, index_NodeVersionInfo as NodeVersionInfo, index_OnMessageHandler as OnMessageHandler, index_OnSubscribeHandler as OnSubscribeHandler, index_PAUSE as PAUSE, type index_PipeOperator as PipeOperator, index_PolicyAllow as PolicyAllow, index_PolicyDeny as PolicyDeny, index_PolicyRuleData as PolicyRuleData, type index_ProducerFn as ProducerFn, index_RESOLVED as RESOLVED, index_RESOLVED_MSG as RESOLVED_MSG, index_RESOLVED_ONLY_BATCH as RESOLVED_ONLY_BATCH, index_RESUME as RESUME, index_START as START, index_START_MSG as START_MSG, index_SubscribeContext as SubscribeContext, index_TEARDOWN as TEARDOWN, index_TEARDOWN_MSG as TEARDOWN_MSG, index_TEARDOWN_ONLY_BATCH as TEARDOWN_ONLY_BATCH, type index_TrackFn as TrackFn, index_V0 as V0, index_V1 as V1, index_VersioningLevel as VersioningLevel, index_VersioningOptions as VersioningOptions, index_accessHintForGuard as accessHintForGuard, index_advanceVersion as advanceVersion, index_autoTrackNode as autoTrackNode, index_batch as batch, index_configure as configure, index_createVersioning as createVersioning, index_defaultConfig as defaultConfig, index_defaultHash as defaultHash, index_derived as derived, index_downWithBatch as downWithBatch, index_dynamicNode as dynamicNode, index_effect as effect, index_isBatching as isBatching, index_isV1 as isV1, index_monotonicNs as monotonicNs, index_node as node, index_normalizeActor as normalizeActor, index_pipe as pipe, index_policy as policy, index_policyFromRules as policyFromRules, index_producer as producer, index_registerBuiltins as registerBuiltins, index_resolveDescribeFields as resolveDescribeFields, index_state as state, index_wallClockNs as wallClockNs };
404
+ }
405
+
406
+ export { type AutoTrackOptions as A, type DerivedFn as D, type EffectFn as E, type PipeOperator as P, type TrackFn as T, type DynamicFn as a, type ProducerFn as b, autoTrackNode as c, batch as d, derived as e, downWithBatch as f, dynamicNode as g, effect as h, index as i, isBatching as j, producer as k, monotonicNs as m, pipe as p, state as s, wallClockNs as w };
@@ -1,8 +1,8 @@
1
- import { T as ToObservableOptions, t as toObservable } from './observable-C8Kx_O6k.cjs';
1
+ import { T as ToObservableOptions, t as toObservable } from './observable-EyO-moQY.js';
2
2
  import { OnModuleInit, OnModuleDestroy, ExecutionContext, CanActivate, DynamicModule } from '@nestjs/common';
3
3
  import { ModuleRef } from '@nestjs/core';
4
- import { G as Graph, a as GraphOptions, t as GraphPersistSnapshot } from './graph-KsTe57nI.cjs';
5
- import { A as Actor, N as Node } from './meta-BnG7XAaE.cjs';
4
+ import { G as Graph, a as GraphOptions, r as GraphPersistSnapshot } from './graph-CEO2FkLY.js';
5
+ import { A as Actor, N as Node } from './node-C7PD3sn9.js';
6
6
 
7
7
  /** Class constructor key for decorator registries and Nest `ModuleRef.get()`. */
8
8
  type DecoratorHostConstructor = abstract new (...args: unknown[]) => unknown;
@@ -140,7 +140,7 @@ declare function OnGraphEvent(nodeName: string): (value: DecoratorBoundMethod, c
140
140
  * Run a method on a fixed interval — replaces `@Interval()` from `@nestjs/schedule`.
141
141
  *
142
142
  * Backed by a `fromTimer` node added to the root graph as `__schedule__.<className>.<methodName>`.
143
- * Visible in `graph.describe()`, pausable via `graph.signal(name, [[PAUSE]])`.
143
+ * Visible in `graph.describe()`, pausable via `graph.signal(name, [[PAUSE, lockId]])`.
144
144
  *
145
145
  * @param ms - Interval in milliseconds.
146
146
  *