pond-ts 0.10.0 → 0.11.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.
@@ -0,0 +1,295 @@
1
+ import { LiveSeries, type LiveSeriesOptions } from './LiveSeries.js';
2
+ import { type LiveFillMapping, type LiveFillStrategy } from './LiveView.js';
3
+ import { type AggregateMap, type DiffSchema, type EventDataForSchema, type LiveSource, type NumericColumnNameForSchema, type RollingSchema, type SeriesSchema } from './types.js';
4
+ import type { DurationInput } from './utils/duration.js';
5
+ import type { RollingWindow } from './LiveRollingAggregation.js';
6
+ /**
7
+ * Per-partition retention and grace settings for a partitioned live
8
+ * view. Each partition is its own bounded buffer with these limits;
9
+ * the source `LiveSource`'s own retention does not propagate.
10
+ */
11
+ export type LivePartitionedOptions<K extends string> = {
12
+ /** Declared partition values (mirrors batch `partitionBy({ groups })`). */
13
+ groups?: ReadonlyArray<K>;
14
+ /** Retention applied to each partition's sub-buffer independently. */
15
+ retention?: NonNullable<LiveSeriesOptions<SeriesSchema>['retention']>;
16
+ /** Grace window applied per partition for late events. */
17
+ graceWindow?: DurationInput;
18
+ /** Ordering mode for each partition. Defaults to `'strict'`. */
19
+ ordering?: NonNullable<LiveSeriesOptions<SeriesSchema>['ordering']>;
20
+ };
21
+ /**
22
+ * Live counterpart to {@link PartitionedTimeSeries}. Routes events
23
+ * from a source `LiveSource<S>` into per-partition `LiveSeries<S>`
24
+ * sub-buffers, each with its own retention, grace window, and
25
+ * stateful operator pipeline.
26
+ *
27
+ * **Per-partition semantics** (settled in the v0.11 design pass):
28
+ *
29
+ * - **Retention** applies to each partition independently. A
30
+ * chatty host can't squeeze a quiet one out of the buffer.
31
+ * - **Grace windows** apply per partition. A late event for
32
+ * `host-A` does not perturb `host-B`'s emission. **Caveat:**
33
+ * per-partition grace is bounded by the source's grace
34
+ * window. If the source rejects an event (because it's older
35
+ * than the source's grace), it never reaches the partitioned
36
+ * view. Setting `partitionBy('host', { graceWindow: '10m' })`
37
+ * on a source with `graceWindow: '1m'` silently uses the
38
+ * smaller window.
39
+ * - **Aggregation timing** is per-partition. `host-A`'s rolling
40
+ * avg fires when `host-A` has enough data, regardless of
41
+ * `host-B`.
42
+ * - **Auto-spawn** on new partition values: the first time a
43
+ * value not seen before arrives, allocate a sub-buffer.
44
+ * Optional `{ groups }` upfront declares the expected set
45
+ * (mirrors the batch typed-groups pattern); when set, unknown
46
+ * partition values throw on ingest.
47
+ *
48
+ * **v0.11 PR 1 scope** — foundation only. Compose operators per
49
+ * partition via `apply((sub) => sub.fill(...).rolling(...))`.
50
+ * Typed chainable sugar methods (`fill(...).rolling(...).collect()`)
51
+ * arrive in v0.11 PR 2.
52
+ *
53
+ * @example
54
+ * ```ts
55
+ * const live = new LiveSeries({ ... });
56
+ *
57
+ * // Per-host event lookup — direct subscription per partition.
58
+ * const byHost = live.partitionBy('host').toMap();
59
+ * byHost.get('api-1')?.on('event', (e) => { ... });
60
+ *
61
+ * // Apply a chain of live operators per partition; collect into a
62
+ * // unified LiveSeries.
63
+ * const cpuSmoothed = live.partitionBy('host').apply((sub) =>
64
+ * sub.fill({ cpu: 'hold' }).rolling('1m', { cpu: 'avg' }),
65
+ * );
66
+ * ```
67
+ */
68
+ export declare class LivePartitionedSeries<S extends SeriesSchema, K extends string = string> {
69
+ #private;
70
+ readonly name: string;
71
+ readonly schema: S;
72
+ readonly by: keyof EventDataForSchema<S> & string;
73
+ readonly groups?: ReadonlyArray<K>;
74
+ constructor(source: LiveSource<S>, by: keyof EventDataForSchema<S> & string, options?: LivePartitionedOptions<K>);
75
+ /**
76
+ * Materialize the partitioned view as a `Map<key, LiveSource<S>>`,
77
+ * one entry per spawned partition. Map iteration order matches
78
+ * spawn order (declared order if `groups` was set, insertion
79
+ * order otherwise).
80
+ */
81
+ toMap(): Map<K, LiveSource<S>>;
82
+ /**
83
+ * Fan in events from every partition into a single unified
84
+ * `LiveSeries<S>`. Subscribes to per-partition output `'event'`
85
+ * streams and pushes each event into the unified buffer.
86
+ *
87
+ * **Append-only semantics.** This is a fan-in sink, not a
88
+ * mirrored materialization. When per-partition retention or
89
+ * grace evicts events from a sub-buffer, those evictions are
90
+ * NOT propagated to the unified buffer. The unified buffer
91
+ * keeps every event it ever received until evicted by its own
92
+ * retention. To control its size, pass a `retention` option to
93
+ * `collect`. To inspect the current per-partition state, use
94
+ * `toMap()` and snapshot each partition independently.
95
+ *
96
+ * **Ordering caveat:** the unified `LiveSeries` defaults to
97
+ * `'strict'` ordering. If the source uses `ordering: 'reorder'`
98
+ * (i.e., accepts late events out-of-order), reordered events
99
+ * will arrive at the unified buffer out of order and throw.
100
+ * Pass `{ ordering: 'reorder', graceWindow: ... }` to `collect`
101
+ * when the source is in reorder mode.
102
+ */
103
+ collect(options?: Partial<LiveSeriesOptions<S>>): LiveSeries<S>;
104
+ /**
105
+ * Apply `factory` per-partition and fan in the outputs into a
106
+ * single unified `LiveSeries<R>`. The factory is called once per
107
+ * partition (current and future); each call receives the
108
+ * partition's `LiveSource<S>` and should return a `LiveSource<R>`
109
+ * derived from it (typically by composing `LiveSeries`-style
110
+ * operators like `sub.fill(...).rolling(...)`).
111
+ *
112
+ * The unified series subscribes to every factory output and
113
+ * pushes events as they arrive. Auto-spawn propagates: a new
114
+ * partition value triggers a fresh factory invocation and the
115
+ * resulting `LiveSource` is subscribed to.
116
+ *
117
+ * **Append-only semantics.** Same as `collect()` — this is a
118
+ * fan-in sink. Per-partition output evictions (e.g. from a
119
+ * window operator inside the factory) are NOT propagated to
120
+ * the unified buffer. Use the `options` argument to set the
121
+ * unified buffer's own retention.
122
+ *
123
+ * **History replay.** When `apply()` is called on a partitioned
124
+ * view that already has events distributed across multiple
125
+ * partitions, existing factory-output events are gathered from
126
+ * every output, sorted globally by time, and pushed into the
127
+ * unified buffer in time order. This preserves strict ordering
128
+ * for the unified buffer.
129
+ *
130
+ * **Factory contract.** The factory must be **pure and
131
+ * re-runnable**: side-effect-free, no closure-captured state
132
+ * that mutates across calls, no external subscriptions on the
133
+ * input or output. The implementation invokes the factory once
134
+ * upfront on a stub `LiveSeries<S>` (to capture the output
135
+ * schema synchronously) and again once per partition (current
136
+ * and future). Factories that don't satisfy the contract may
137
+ * leak state across the stub call and the real per-partition
138
+ * calls.
139
+ *
140
+ * **Ordering caveat:** same as `collect()` — pass `{ ordering:
141
+ * 'reorder' }` if the source uses reorder mode and reordered
142
+ * events will reach the unified buffer.
143
+ */
144
+ apply<R extends SeriesSchema>(factory: (sub: LiveSeries<S>) => LiveSource<R>, options?: Partial<LiveSeriesOptions<R>>): LiveSeries<R>;
145
+ /** Per-partition `fill`. See {@link LiveSeries.fill}. */
146
+ fill(strategy: LiveFillStrategy | LiveFillMapping<S>, options?: {
147
+ limit?: number;
148
+ }): LivePartitionedView<S, S, K>;
149
+ /** Per-partition `diff`. See {@link LiveSeries.diff}. */
150
+ diff<const Target extends NumericColumnNameForSchema<S>>(columns: Target | readonly Target[], options?: {
151
+ drop?: boolean;
152
+ }): LivePartitionedView<S, DiffSchema<S, Target>, K>;
153
+ /** Per-partition `rate`. See {@link LiveSeries.rate}. */
154
+ rate<const Target extends NumericColumnNameForSchema<S>>(columns: Target | readonly Target[], options?: {
155
+ drop?: boolean;
156
+ }): LivePartitionedView<S, DiffSchema<S, Target>, K>;
157
+ /** Per-partition `pctChange`. See {@link LiveSeries.pctChange}. */
158
+ pctChange<const Target extends NumericColumnNameForSchema<S>>(columns: Target | readonly Target[], options?: {
159
+ drop?: boolean;
160
+ }): LivePartitionedView<S, DiffSchema<S, Target>, K>;
161
+ /** Per-partition `cumulative`. See {@link LiveSeries.cumulative}. */
162
+ cumulative<const Targets extends NumericColumnNameForSchema<S>>(spec: {
163
+ [P in Targets]: 'sum' | 'max' | 'min' | 'count' | ((acc: number, value: number) => number);
164
+ }): LivePartitionedView<S, DiffSchema<S, Targets>, K>;
165
+ /**
166
+ * Per-partition `rolling`. See {@link LiveSeries.rolling}.
167
+ *
168
+ * **Partition column drops by default.** `rolling`'s output
169
+ * schema only retains columns named in `mapping`. Without
170
+ * including the partition column, the unified output of the
171
+ * chain loses the partition tag (e.g. `host` becomes
172
+ * `undefined`). To keep the partition column visible, include
173
+ * it in `mapping` with a passthrough reducer:
174
+ *
175
+ * ```ts
176
+ * partitioned.rolling('5m', { cpu: 'avg', host: 'last' })
177
+ * // ^^^^^^^^^^^^^^
178
+ * ```
179
+ */
180
+ rolling<const M extends AggregateMap<S>>(window: RollingWindow, mapping: M): LivePartitionedView<S, RollingSchema<S, M>, K>;
181
+ /**
182
+ * Dispose of the partitioned view: unsubscribe from the source,
183
+ * disconnect every per-partition pipeline subscriber (created
184
+ * by `collect()` and `apply()`), and drop spawn listeners. Safe
185
+ * to call multiple times.
186
+ *
187
+ * **Note:** this does not clear the per-partition `LiveSeries`
188
+ * sub-buffers themselves. Their event arrays linger until the
189
+ * `LivePartitionedSeries` instance becomes unreferenced and is
190
+ * garbage-collected. If you want to free the sub-buffer memory
191
+ * eagerly, drop your reference to the `LivePartitionedSeries`
192
+ * after `dispose()`.
193
+ */
194
+ dispose(): void;
195
+ /**
196
+ * @internal — register a cleanup callback to be fired when this
197
+ * root partitioned series is disposed. Used by
198
+ * `LivePartitionedView.toMap()` to track factory-output
199
+ * subscriptions that would otherwise leak across repeated calls.
200
+ */
201
+ _addDisposer(fn: () => void): void;
202
+ }
203
+ /**
204
+ * Chained typed view over a {@link LivePartitionedSeries}. Returned
205
+ * by every sugar method on the root partitioned series and on this
206
+ * view, composing the operator factory at each step.
207
+ *
208
+ * The view is **lazy**: factories aren't run until a terminal
209
+ * (`collect()`, `apply()`, `toMap()`) is called. Each terminal
210
+ * delegates back to the root's per-partition state, applying the
211
+ * composed factory chain to each partition's `LiveSeries`.
212
+ *
213
+ * **Lifecycle.** All real state lives on the root
214
+ * `LivePartitionedSeries` — chained views are just deferred
215
+ * factories that point back at the root. They don't register their
216
+ * own subscriptions on the source. Disposing the root disposes
217
+ * everything: terminals subscribed to factory outputs are tracked
218
+ * on the root's internal disposers, including outputs created by
219
+ * `view.toMap()`.
220
+ *
221
+ * @example
222
+ * ```ts
223
+ * const cpuSmoothed = live
224
+ * .partitionBy('host')
225
+ * .fill({ cpu: 'hold' }) // → LivePartitionedView<S, S, K>
226
+ * .rolling('1m', { cpu: 'avg' }) // → LivePartitionedView<S, R, K>
227
+ * .collect(); // → LiveSeries<R>
228
+ * ```
229
+ *
230
+ * @typeParam SBase - schema of the root partitioned series's
231
+ * per-partition `LiveSeries` (kept so the composed factory's
232
+ * input type is correct).
233
+ * @typeParam R - schema of the current chained output.
234
+ * @typeParam K - partition key type.
235
+ */
236
+ export declare class LivePartitionedView<SBase extends SeriesSchema, R extends SeriesSchema, K extends string = string> {
237
+ #private;
238
+ /**
239
+ * Schema of the chained output. Captured by running the factory
240
+ * once on a stub `LiveSeries<SBase>` at construction.
241
+ */
242
+ readonly schema: R;
243
+ /** @internal — used by sugar methods to chain. */
244
+ constructor(root: LivePartitionedSeries<SBase, K>, factory: (sub: LiveSeries<SBase>) => LiveSource<R>);
245
+ /** Same as {@link LivePartitionedSeries.collect}, applied through the factory chain. */
246
+ collect(options?: Partial<LiveSeriesOptions<R>>): LiveSeries<R>;
247
+ /**
248
+ * Apply a further per-partition transform on top of the existing
249
+ * factory chain. Equivalent to chaining one more sugar method
250
+ * via a custom function. Returns a unified `LiveSeries<R2>`.
251
+ */
252
+ apply<R2 extends SeriesSchema>(factory: (sub: LiveSource<R>) => LiveSource<R2>, options?: Partial<LiveSeriesOptions<R2>>): LiveSeries<R2>;
253
+ /**
254
+ * Materialize the chained view per-partition as a
255
+ * `Map<K, LiveSource<R>>`. Runs the composed factory once per
256
+ * existing partition; auto-spawn from the root partitioned
257
+ * series is *not* propagated into this map (the snapshot
258
+ * reflects partitions at the time of the call).
259
+ *
260
+ * Each factory output (a `LiveView` / `LiveRollingAggregation` /
261
+ * etc.) holds an internal subscription to its source. To avoid
262
+ * accumulating listeners across repeated calls, every factory
263
+ * output's `dispose()` is registered on the root's disposer set
264
+ * — calling `partitioned.dispose()` on the root cleans up every
265
+ * `toMap`-created subscription chain.
266
+ *
267
+ * For a live-updating per-partition view, subscribe to the root
268
+ * `partitionBy` directly with `toMap()` and call the factory
269
+ * yourself, or use `collect()` for a unified buffer.
270
+ */
271
+ toMap(): Map<K, LiveSource<R>>;
272
+ fill(strategy: LiveFillStrategy | LiveFillMapping<R>, options?: {
273
+ limit?: number;
274
+ }): LivePartitionedView<SBase, R, K>;
275
+ diff<const Target extends NumericColumnNameForSchema<R>>(columns: Target | readonly Target[], options?: {
276
+ drop?: boolean;
277
+ }): LivePartitionedView<SBase, DiffSchema<R, Target>, K>;
278
+ rate<const Target extends NumericColumnNameForSchema<R>>(columns: Target | readonly Target[], options?: {
279
+ drop?: boolean;
280
+ }): LivePartitionedView<SBase, DiffSchema<R, Target>, K>;
281
+ pctChange<const Target extends NumericColumnNameForSchema<R>>(columns: Target | readonly Target[], options?: {
282
+ drop?: boolean;
283
+ }): LivePartitionedView<SBase, DiffSchema<R, Target>, K>;
284
+ cumulative<const Targets extends NumericColumnNameForSchema<R>>(spec: {
285
+ [P in Targets]: 'sum' | 'max' | 'min' | 'count' | ((acc: number, value: number) => number);
286
+ }): LivePartitionedView<SBase, DiffSchema<R, Targets>, K>;
287
+ /**
288
+ * **Partition column drops by default.** `rolling`'s output
289
+ * schema only retains columns named in `mapping`. Include the
290
+ * partition column with a passthrough reducer (e.g.
291
+ * `host: 'last'`) to keep it visible in the unified output.
292
+ */
293
+ rolling<const M extends AggregateMap<R>>(window: RollingWindow, mapping: M): LivePartitionedView<SBase, RollingSchema<R, M>, K>;
294
+ }
295
+ //# sourceMappingURL=LivePartitionedSeries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LivePartitionedSeries.d.ts","sourceRoot":"","sources":["../src/LivePartitionedSeries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAErE,OAAO,EAIL,KAAK,eA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,MAAM,SAAS,0BAA0B,CAAC,CAAC,CAAC,EACrD,OAAO,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,EACnC,OAAO,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE,GAC3B,mBAAmB,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC;IAcvD,SAAS,CAAC,KAAK,CAAC,MAAM,SAAS,0BAA0B,CAAC,CAAC,CAAC,EAC1D,OAAO,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,EACnC,OAAO,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE,GAC3B,mBAAmB,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC;IAcvD,UAAU,CAAC,KAAK,CAAC,OAAO,SAAS,0BAA0B,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE;SACnE,CAAC,IAAI,OAAO,GACT,KAAK,GACL,KAAK,GACL,KAAK,GACL,OAAO,GACP,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;KAC7C,GAAG,mBAAmB,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;IAWzD;;;;;OAKG;IACH,OAAO,CAAC,KAAK,CAAC,CAAC,SAAS,YAAY,CAAC,CAAC,CAAC,EACrC,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,CAAC,GACT,mBAAmB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;CAYtD"}
@@ -0,0 +1,540 @@
1
+ import { LiveSeries } from './LiveSeries.js';
2
+ import { LiveRollingAggregation } from './LiveRollingAggregation.js';
3
+ import { makeCumulativeView, makeDiffView, makeFillView, } from './LiveView.js';
4
+ /** Encoder for partition values → keys. Mirrors the batch single-column case. */
5
+ function partitionKey(event, col) {
6
+ const v = event.data()[col];
7
+ return v === undefined ? ' undefined' : `${String(v)}`;
8
+ }
9
+ /**
10
+ * Live counterpart to {@link PartitionedTimeSeries}. Routes events
11
+ * from a source `LiveSource<S>` into per-partition `LiveSeries<S>`
12
+ * sub-buffers, each with its own retention, grace window, and
13
+ * stateful operator pipeline.
14
+ *
15
+ * **Per-partition semantics** (settled in the v0.11 design pass):
16
+ *
17
+ * - **Retention** applies to each partition independently. A
18
+ * chatty host can't squeeze a quiet one out of the buffer.
19
+ * - **Grace windows** apply per partition. A late event for
20
+ * `host-A` does not perturb `host-B`'s emission. **Caveat:**
21
+ * per-partition grace is bounded by the source's grace
22
+ * window. If the source rejects an event (because it's older
23
+ * than the source's grace), it never reaches the partitioned
24
+ * view. Setting `partitionBy('host', { graceWindow: '10m' })`
25
+ * on a source with `graceWindow: '1m'` silently uses the
26
+ * smaller window.
27
+ * - **Aggregation timing** is per-partition. `host-A`'s rolling
28
+ * avg fires when `host-A` has enough data, regardless of
29
+ * `host-B`.
30
+ * - **Auto-spawn** on new partition values: the first time a
31
+ * value not seen before arrives, allocate a sub-buffer.
32
+ * Optional `{ groups }` upfront declares the expected set
33
+ * (mirrors the batch typed-groups pattern); when set, unknown
34
+ * partition values throw on ingest.
35
+ *
36
+ * **v0.11 PR 1 scope** — foundation only. Compose operators per
37
+ * partition via `apply((sub) => sub.fill(...).rolling(...))`.
38
+ * Typed chainable sugar methods (`fill(...).rolling(...).collect()`)
39
+ * arrive in v0.11 PR 2.
40
+ *
41
+ * @example
42
+ * ```ts
43
+ * const live = new LiveSeries({ ... });
44
+ *
45
+ * // Per-host event lookup — direct subscription per partition.
46
+ * const byHost = live.partitionBy('host').toMap();
47
+ * byHost.get('api-1')?.on('event', (e) => { ... });
48
+ *
49
+ * // Apply a chain of live operators per partition; collect into a
50
+ * // unified LiveSeries.
51
+ * const cpuSmoothed = live.partitionBy('host').apply((sub) =>
52
+ * sub.fill({ cpu: 'hold' }).rolling('1m', { cpu: 'avg' }),
53
+ * );
54
+ * ```
55
+ */
56
+ export class LivePartitionedSeries {
57
+ // NOTE: `LivePartitionedSeries` is intentionally NOT a `LiveSource` —
58
+ // it has no `on()` method and does not emit events directly.
59
+ // Consumers obtain a `LiveSource` from `collect()` (unified buffer),
60
+ // `apply()` (per-partition factory output), or `toMap()` (per-partition
61
+ // sources). We deliberately do not declare `EMITS_EVICT` so that
62
+ // `LiveView`'s duck-typed eviction subscription (`EMITS_EVICT in
63
+ // source`) doesn't trip on this class.
64
+ name;
65
+ schema;
66
+ by;
67
+ groups;
68
+ #partitions;
69
+ #partitionOptions;
70
+ #onSpawn;
71
+ #disposers;
72
+ #unsubscribeSource;
73
+ constructor(source, by, options = {}) {
74
+ this.name = source.name;
75
+ this.schema = source.schema;
76
+ this.by = by;
77
+ if (!source.schema.some((c) => c.name === by)) {
78
+ throw new TypeError(`LivePartitionedSeries: column "${String(by)}" not in schema`);
79
+ }
80
+ if (options.groups !== undefined) {
81
+ if (options.groups.length === 0) {
82
+ throw new TypeError('LivePartitionedSeries: `groups` cannot be empty.');
83
+ }
84
+ const seen = new Set();
85
+ for (const g of options.groups) {
86
+ if (seen.has(g)) {
87
+ throw new TypeError(`LivePartitionedSeries: duplicate value ${JSON.stringify(g)} in \`groups\`.`);
88
+ }
89
+ seen.add(g);
90
+ }
91
+ this.groups = options.groups;
92
+ }
93
+ this.#partitions = new Map();
94
+ this.#partitionOptions = {
95
+ retention: options.retention,
96
+ graceWindow: options.graceWindow,
97
+ ordering: options.ordering,
98
+ };
99
+ this.#onSpawn = new Set();
100
+ this.#disposers = new Set();
101
+ if (this.groups) {
102
+ for (const g of this.groups) {
103
+ this.#spawnPartition(g);
104
+ }
105
+ }
106
+ // Replay source's existing events into the right partitions.
107
+ for (let i = 0; i < source.length; i++) {
108
+ this.#routeEvent(source.at(i));
109
+ }
110
+ // Subscribe to new events from the source.
111
+ this.#unsubscribeSource = source.on('event', (event) => {
112
+ this.#routeEvent(event);
113
+ });
114
+ }
115
+ /**
116
+ * Materialize the partitioned view as a `Map<key, LiveSource<S>>`,
117
+ * one entry per spawned partition. Map iteration order matches
118
+ * spawn order (declared order if `groups` was set, insertion
119
+ * order otherwise).
120
+ */
121
+ toMap() {
122
+ return new Map(this.#partitions);
123
+ }
124
+ /**
125
+ * Fan in events from every partition into a single unified
126
+ * `LiveSeries<S>`. Subscribes to per-partition output `'event'`
127
+ * streams and pushes each event into the unified buffer.
128
+ *
129
+ * **Append-only semantics.** This is a fan-in sink, not a
130
+ * mirrored materialization. When per-partition retention or
131
+ * grace evicts events from a sub-buffer, those evictions are
132
+ * NOT propagated to the unified buffer. The unified buffer
133
+ * keeps every event it ever received until evicted by its own
134
+ * retention. To control its size, pass a `retention` option to
135
+ * `collect`. To inspect the current per-partition state, use
136
+ * `toMap()` and snapshot each partition independently.
137
+ *
138
+ * **Ordering caveat:** the unified `LiveSeries` defaults to
139
+ * `'strict'` ordering. If the source uses `ordering: 'reorder'`
140
+ * (i.e., accepts late events out-of-order), reordered events
141
+ * will arrive at the unified buffer out of order and throw.
142
+ * Pass `{ ordering: 'reorder', graceWindow: ... }` to `collect`
143
+ * when the source is in reorder mode.
144
+ */
145
+ collect(options) {
146
+ const unifiedOptions = {
147
+ name: options?.name ?? this.name,
148
+ schema: this.schema,
149
+ };
150
+ if (options?.ordering !== undefined)
151
+ unifiedOptions.ordering = options.ordering;
152
+ if (options?.graceWindow !== undefined)
153
+ unifiedOptions.graceWindow = options.graceWindow;
154
+ if (options?.retention !== undefined)
155
+ unifiedOptions.retention = options.retention;
156
+ const unified = new LiveSeries(unifiedOptions);
157
+ const subscribeToPartition = (partition) => {
158
+ return partition.on('event', (event) => {
159
+ unified.push(eventToRow(event, this.schema));
160
+ });
161
+ };
162
+ const existing = [];
163
+ for (const partition of this.#partitions.values()) {
164
+ for (let i = 0; i < partition.length; i++) {
165
+ const e = partition.at(i);
166
+ existing.push({ time: e.begin(), event: e });
167
+ }
168
+ }
169
+ existing.sort((a, b) => a.time - b.time);
170
+ for (const { event } of existing) {
171
+ unified.push(eventToRow(event, this.schema));
172
+ }
173
+ for (const partition of this.#partitions.values()) {
174
+ this.#disposers.add(subscribeToPartition(partition));
175
+ }
176
+ this.#onSpawn.add((_, partition) => {
177
+ this.#disposers.add(subscribeToPartition(partition));
178
+ });
179
+ return unified;
180
+ }
181
+ /**
182
+ * Apply `factory` per-partition and fan in the outputs into a
183
+ * single unified `LiveSeries<R>`. The factory is called once per
184
+ * partition (current and future); each call receives the
185
+ * partition's `LiveSource<S>` and should return a `LiveSource<R>`
186
+ * derived from it (typically by composing `LiveSeries`-style
187
+ * operators like `sub.fill(...).rolling(...)`).
188
+ *
189
+ * The unified series subscribes to every factory output and
190
+ * pushes events as they arrive. Auto-spawn propagates: a new
191
+ * partition value triggers a fresh factory invocation and the
192
+ * resulting `LiveSource` is subscribed to.
193
+ *
194
+ * **Append-only semantics.** Same as `collect()` — this is a
195
+ * fan-in sink. Per-partition output evictions (e.g. from a
196
+ * window operator inside the factory) are NOT propagated to
197
+ * the unified buffer. Use the `options` argument to set the
198
+ * unified buffer's own retention.
199
+ *
200
+ * **History replay.** When `apply()` is called on a partitioned
201
+ * view that already has events distributed across multiple
202
+ * partitions, existing factory-output events are gathered from
203
+ * every output, sorted globally by time, and pushed into the
204
+ * unified buffer in time order. This preserves strict ordering
205
+ * for the unified buffer.
206
+ *
207
+ * **Factory contract.** The factory must be **pure and
208
+ * re-runnable**: side-effect-free, no closure-captured state
209
+ * that mutates across calls, no external subscriptions on the
210
+ * input or output. The implementation invokes the factory once
211
+ * upfront on a stub `LiveSeries<S>` (to capture the output
212
+ * schema synchronously) and again once per partition (current
213
+ * and future). Factories that don't satisfy the contract may
214
+ * leak state across the stub call and the real per-partition
215
+ * calls.
216
+ *
217
+ * **Ordering caveat:** same as `collect()` — pass `{ ordering:
218
+ * 'reorder' }` if the source uses reorder mode and reordered
219
+ * events will reach the unified buffer.
220
+ */
221
+ apply(factory, options) {
222
+ // Capture the output schema upfront by running the factory on
223
+ // an empty stub LiveSeries. The stub is never connected to a
224
+ // source — it only exists to let `factory` declare its output
225
+ // schema synchronously, before any partitions exist.
226
+ const stub = new LiveSeries({
227
+ name: `${this.name}/_stub`,
228
+ schema: this.schema,
229
+ });
230
+ const stubOut = factory(stub);
231
+ const outSchema = stubOut.schema;
232
+ const opts = {
233
+ name: options?.name ?? this.name,
234
+ schema: outSchema,
235
+ };
236
+ if (options?.ordering !== undefined)
237
+ opts.ordering = options.ordering;
238
+ if (options?.graceWindow !== undefined)
239
+ opts.graceWindow = options.graceWindow;
240
+ if (options?.retention !== undefined)
241
+ opts.retention = options.retention;
242
+ const unified = new LiveSeries(opts);
243
+ // Build factory outputs for all existing partitions first, then
244
+ // globally sort their existing events by time and push them in
245
+ // order. Without this two-phase pass, the unified buffer would
246
+ // receive partition-A's history fully before partition-B's,
247
+ // producing out-of-order pushes and tripping unified's strict
248
+ // ordering when histories interleave (e.g. a@0, b@60k, a@120k).
249
+ const outputs = [];
250
+ for (const [key, partition] of this.#partitions) {
251
+ outputs.push({ key, out: factory(partition) });
252
+ }
253
+ const existing = [];
254
+ for (const { out } of outputs) {
255
+ for (let i = 0; i < out.length; i++) {
256
+ const e = out.at(i);
257
+ existing.push({ time: e.begin(), event: e, outSchema: out.schema });
258
+ }
259
+ }
260
+ existing.sort((a, b) => a.time - b.time);
261
+ for (const { event, outSchema: s } of existing) {
262
+ unified.push(eventToRow(event, s));
263
+ }
264
+ // Subscribe each factory output to the unified buffer for live
265
+ // forwarding.
266
+ for (const { out } of outputs) {
267
+ const unsub = out.on('event', (event) => {
268
+ unified.push(eventToRow(event, out.schema));
269
+ });
270
+ this.#disposers.add(unsub);
271
+ }
272
+ // Auto-spawn: when a new partition appears, run the factory
273
+ // for it and subscribe its output. The new partition is empty
274
+ // at spawn time (events are pushed AFTER spawn listeners fire),
275
+ // so no historical replay is needed for the new partition's
276
+ // factory output.
277
+ this.#onSpawn.add((_, partition) => {
278
+ const out = factory(partition);
279
+ const unsub = out.on('event', (event) => {
280
+ unified.push(eventToRow(event, out.schema));
281
+ });
282
+ this.#disposers.add(unsub);
283
+ });
284
+ return unified;
285
+ }
286
+ // ─── Chainable typed sugar (returns LivePartitionedView) ──────
287
+ //
288
+ // Each sugar method returns a `LivePartitionedView<NewSchema, K>`
289
+ // — a chained view that composes the operator factory with any
290
+ // future chain steps. Use these when you want the full
291
+ // operator chain at the type level:
292
+ //
293
+ // live.partitionBy('host').fill(...).rolling(...).collect()
294
+ //
295
+ // For one-shot per-partition factories (no chain), use `apply()`
296
+ // instead.
297
+ /** Per-partition `fill`. See {@link LiveSeries.fill}. */
298
+ fill(strategy, options) {
299
+ return new LivePartitionedView(this, (sub) => makeFillView(sub, strategy, options));
300
+ }
301
+ /** Per-partition `diff`. See {@link LiveSeries.diff}. */
302
+ diff(columns, options) {
303
+ return new LivePartitionedView(this, (sub) => makeDiffView(sub, 'diff', columns, options));
304
+ }
305
+ /** Per-partition `rate`. See {@link LiveSeries.rate}. */
306
+ rate(columns, options) {
307
+ return new LivePartitionedView(this, (sub) => makeDiffView(sub, 'rate', columns, options));
308
+ }
309
+ /** Per-partition `pctChange`. See {@link LiveSeries.pctChange}. */
310
+ pctChange(columns, options) {
311
+ return new LivePartitionedView(this, (sub) => makeDiffView(sub, 'pctChange', columns, options));
312
+ }
313
+ /** Per-partition `cumulative`. See {@link LiveSeries.cumulative}. */
314
+ cumulative(spec) {
315
+ return new LivePartitionedView(this, (sub) => makeCumulativeView(sub, spec));
316
+ }
317
+ /**
318
+ * Per-partition `rolling`. See {@link LiveSeries.rolling}.
319
+ *
320
+ * **Partition column drops by default.** `rolling`'s output
321
+ * schema only retains columns named in `mapping`. Without
322
+ * including the partition column, the unified output of the
323
+ * chain loses the partition tag (e.g. `host` becomes
324
+ * `undefined`). To keep the partition column visible, include
325
+ * it in `mapping` with a passthrough reducer:
326
+ *
327
+ * ```ts
328
+ * partitioned.rolling('5m', { cpu: 'avg', host: 'last' })
329
+ * // ^^^^^^^^^^^^^^
330
+ * ```
331
+ */
332
+ rolling(window, mapping) {
333
+ return new LivePartitionedView(this, (sub) => new LiveRollingAggregation(sub, window, mapping));
334
+ }
335
+ /**
336
+ * Dispose of the partitioned view: unsubscribe from the source,
337
+ * disconnect every per-partition pipeline subscriber (created
338
+ * by `collect()` and `apply()`), and drop spawn listeners. Safe
339
+ * to call multiple times.
340
+ *
341
+ * **Note:** this does not clear the per-partition `LiveSeries`
342
+ * sub-buffers themselves. Their event arrays linger until the
343
+ * `LivePartitionedSeries` instance becomes unreferenced and is
344
+ * garbage-collected. If you want to free the sub-buffer memory
345
+ * eagerly, drop your reference to the `LivePartitionedSeries`
346
+ * after `dispose()`.
347
+ */
348
+ dispose() {
349
+ this.#unsubscribeSource();
350
+ for (const dispose of this.#disposers)
351
+ dispose();
352
+ this.#disposers.clear();
353
+ this.#onSpawn.clear();
354
+ }
355
+ /**
356
+ * @internal — register a cleanup callback to be fired when this
357
+ * root partitioned series is disposed. Used by
358
+ * `LivePartitionedView.toMap()` to track factory-output
359
+ * subscriptions that would otherwise leak across repeated calls.
360
+ */
361
+ _addDisposer(fn) {
362
+ this.#disposers.add(fn);
363
+ }
364
+ // ─── Internal ─────────────────────────────────────────────────
365
+ #spawnPartition(key) {
366
+ const opts = {
367
+ name: `${this.name}/${String(key)}`,
368
+ schema: this.schema,
369
+ };
370
+ if (this.#partitionOptions.ordering !== undefined)
371
+ opts.ordering = this.#partitionOptions.ordering;
372
+ if (this.#partitionOptions.graceWindow !== undefined)
373
+ opts.graceWindow = this.#partitionOptions.graceWindow;
374
+ if (this.#partitionOptions.retention !== undefined)
375
+ opts.retention = this.#partitionOptions.retention;
376
+ const part = new LiveSeries(opts);
377
+ this.#partitions.set(key, part);
378
+ for (const fn of this.#onSpawn)
379
+ fn(key, part);
380
+ return part;
381
+ }
382
+ #routeEvent(event) {
383
+ const key = partitionKey(event, this.by);
384
+ let part = this.#partitions.get(key);
385
+ if (!part) {
386
+ if (this.groups && !this.groups.includes(key)) {
387
+ throw new TypeError(`LivePartitionedSeries: encountered partition value ${JSON.stringify(key === ' undefined' ? undefined : key)} for column "${String(this.by)}" which is not in declared groups ` +
388
+ `[${this.groups.map((g) => JSON.stringify(g)).join(', ')}].`);
389
+ }
390
+ part = this.#spawnPartition(key);
391
+ }
392
+ part.push(eventToRow(event, this.schema));
393
+ }
394
+ }
395
+ // Convert an Event back to a row tuple (for re-pushing into a
396
+ // LiveSeries). Mirrors the conversion in LiveSeries.toTimeSeries.
397
+ function eventToRow(event, schema) {
398
+ const row = [event.key()];
399
+ for (let i = 1; i < schema.length; i++) {
400
+ row.push(event.get(schema[i].name));
401
+ }
402
+ return row;
403
+ }
404
+ /**
405
+ * Chained typed view over a {@link LivePartitionedSeries}. Returned
406
+ * by every sugar method on the root partitioned series and on this
407
+ * view, composing the operator factory at each step.
408
+ *
409
+ * The view is **lazy**: factories aren't run until a terminal
410
+ * (`collect()`, `apply()`, `toMap()`) is called. Each terminal
411
+ * delegates back to the root's per-partition state, applying the
412
+ * composed factory chain to each partition's `LiveSeries`.
413
+ *
414
+ * **Lifecycle.** All real state lives on the root
415
+ * `LivePartitionedSeries` — chained views are just deferred
416
+ * factories that point back at the root. They don't register their
417
+ * own subscriptions on the source. Disposing the root disposes
418
+ * everything: terminals subscribed to factory outputs are tracked
419
+ * on the root's internal disposers, including outputs created by
420
+ * `view.toMap()`.
421
+ *
422
+ * @example
423
+ * ```ts
424
+ * const cpuSmoothed = live
425
+ * .partitionBy('host')
426
+ * .fill({ cpu: 'hold' }) // → LivePartitionedView<S, S, K>
427
+ * .rolling('1m', { cpu: 'avg' }) // → LivePartitionedView<S, R, K>
428
+ * .collect(); // → LiveSeries<R>
429
+ * ```
430
+ *
431
+ * @typeParam SBase - schema of the root partitioned series's
432
+ * per-partition `LiveSeries` (kept so the composed factory's
433
+ * input type is correct).
434
+ * @typeParam R - schema of the current chained output.
435
+ * @typeParam K - partition key type.
436
+ */
437
+ export class LivePartitionedView {
438
+ #root;
439
+ #factory;
440
+ /**
441
+ * Schema of the chained output. Captured by running the factory
442
+ * once on a stub `LiveSeries<SBase>` at construction.
443
+ */
444
+ schema;
445
+ /** @internal — used by sugar methods to chain. */
446
+ constructor(root, factory) {
447
+ this.#root = root;
448
+ this.#factory = factory;
449
+ // Capture output schema upfront via a stub invocation. The stub
450
+ // is never connected — same pattern as
451
+ // {@link LivePartitionedSeries.apply}.
452
+ const stub = new LiveSeries({
453
+ name: `${root.name}/_stub`,
454
+ schema: root.schema,
455
+ });
456
+ const stubOut = factory(stub);
457
+ this.schema = stubOut.schema;
458
+ }
459
+ /** Same as {@link LivePartitionedSeries.collect}, applied through the factory chain. */
460
+ collect(options) {
461
+ return this.#root.apply(this.#factory, options);
462
+ }
463
+ /**
464
+ * Apply a further per-partition transform on top of the existing
465
+ * factory chain. Equivalent to chaining one more sugar method
466
+ * via a custom function. Returns a unified `LiveSeries<R2>`.
467
+ */
468
+ apply(factory, options) {
469
+ const composed = this.#factory;
470
+ return this.#root.apply((sub) => factory(composed(sub)), options);
471
+ }
472
+ /**
473
+ * Materialize the chained view per-partition as a
474
+ * `Map<K, LiveSource<R>>`. Runs the composed factory once per
475
+ * existing partition; auto-spawn from the root partitioned
476
+ * series is *not* propagated into this map (the snapshot
477
+ * reflects partitions at the time of the call).
478
+ *
479
+ * Each factory output (a `LiveView` / `LiveRollingAggregation` /
480
+ * etc.) holds an internal subscription to its source. To avoid
481
+ * accumulating listeners across repeated calls, every factory
482
+ * output's `dispose()` is registered on the root's disposer set
483
+ * — calling `partitioned.dispose()` on the root cleans up every
484
+ * `toMap`-created subscription chain.
485
+ *
486
+ * For a live-updating per-partition view, subscribe to the root
487
+ * `partitionBy` directly with `toMap()` and call the factory
488
+ * yourself, or use `collect()` for a unified buffer.
489
+ */
490
+ toMap() {
491
+ const result = new Map();
492
+ const partitions = this.#root.toMap();
493
+ for (const [key, sub] of partitions) {
494
+ const out = this.#factory(sub);
495
+ result.set(key, out);
496
+ // Register the factory output's dispose so root.dispose()
497
+ // tears down the subscription chain. Without this, repeated
498
+ // toMap() calls accumulate listeners on the partition
499
+ // LiveSeries that nothing else references but never get
500
+ // collected because the partition's listener Set holds them.
501
+ const outWithDispose = out;
502
+ if (typeof outWithDispose.dispose === 'function') {
503
+ this.#root._addDisposer(() => outWithDispose.dispose());
504
+ }
505
+ }
506
+ return result;
507
+ }
508
+ // ─── Chainable sugar (composes the factory) ──────────────────
509
+ fill(strategy, options) {
510
+ const prev = this.#factory;
511
+ return new LivePartitionedView(this.#root, (sub) => makeFillView(prev(sub), strategy, options));
512
+ }
513
+ diff(columns, options) {
514
+ const prev = this.#factory;
515
+ return new LivePartitionedView(this.#root, (sub) => makeDiffView(prev(sub), 'diff', columns, options));
516
+ }
517
+ rate(columns, options) {
518
+ const prev = this.#factory;
519
+ return new LivePartitionedView(this.#root, (sub) => makeDiffView(prev(sub), 'rate', columns, options));
520
+ }
521
+ pctChange(columns, options) {
522
+ const prev = this.#factory;
523
+ return new LivePartitionedView(this.#root, (sub) => makeDiffView(prev(sub), 'pctChange', columns, options));
524
+ }
525
+ cumulative(spec) {
526
+ const prev = this.#factory;
527
+ return new LivePartitionedView(this.#root, (sub) => makeCumulativeView(prev(sub), spec));
528
+ }
529
+ /**
530
+ * **Partition column drops by default.** `rolling`'s output
531
+ * schema only retains columns named in `mapping`. Include the
532
+ * partition column with a passthrough reducer (e.g.
533
+ * `host: 'last'`) to keep it visible in the unified output.
534
+ */
535
+ rolling(window, mapping) {
536
+ const prev = this.#factory;
537
+ return new LivePartitionedView(this.#root, (sub) => new LiveRollingAggregation(prev(sub), window, mapping));
538
+ }
539
+ }
540
+ //# sourceMappingURL=LivePartitionedSeries.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LivePartitionedSeries.js","sourceRoot":"","sources":["../src/LivePartitionedSeries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA0B,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,sB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AM,EACN,OAAO,EACP,OAAO,CACwC,CACpD,CAAC;IACJ,CAAC;IAED,IAAI,CACF,OAAmC,EACnC,OAA4B;QAE5B,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC3B,OAAO,IAAI,mBAAmB,CAC5B,IAAI,CAAC,KAAK,EACV,CAAC,GAAG,EAAE,EAAE,CACN,YAAY,CACV,IAAI,CAAC,GAAG,CAAC,EACT,MAAM,EACN,OAAO,EACP,OAAO,CACwC,CACpD,CAAC;IACJ,CAAC;IAED,SAAS,CACP,OAAmC,EACnC,OAA4B;QAE5B,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC3B,OAAO,IAAI,mBAAmB,CAC5B,IAAI,CAAC,KAAK,EACV,CAAC,GAAG,EAAE,EAAE,CACN,YAAY,CACV,IAAI,CAAC,GAAG,CAAC,EACT,WAAW,EACX,OAAO,EACP,OAAO,CACwC,CACpD,CAAC;IACJ,CAAC;IAED,UAAU,CAAsD,IAO/D;QACC,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC3B,OAAO,IAAI,mBAAmB,CAC5B,IAAI,CAAC,KAAK,EACV,CAAC,GAAG,EAAE,EAAE,CACN,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAEjC,CACJ,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,OAAO,CACL,MAAqB,EACrB,OAAU;QAEV,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC3B,OAAO,IAAI,mBAAmB,CAC5B,IAAI,CAAC,KAAK,EACV,CAAC,GAAG,EAAE,EAAE,CACN,IAAI,sBAAsB,CACxB,IAAI,CAAC,GAAG,CAAC,EACT,MAAM,EACN,OAA0B,CACmB,CAClD,CAAC;IACJ,CAAC;CACF"}
@@ -1,4 +1,5 @@
1
1
  import { LiveAggregation } from './LiveAggregation.js';
2
+ import { LivePartitionedSeries, type LivePartitionedOptions } from './LivePartitionedSeries.js';
2
3
  import { LiveView, type LiveFillMapping, type LiveFillStrategy } from './LiveView.js';
3
4
  import { LiveRollingAggregation, type RollingWindow } from './LiveRollingAggregation.js';
4
5
  import { TimeSeries } from './TimeSeries.js';
@@ -71,6 +72,32 @@ export declare class LiveSeries<S extends SeriesSchema> {
71
72
  cumulative<const Targets extends NumericColumnNameForSchema<S>>(spec: {
72
73
  [K in Targets]: 'sum' | 'max' | 'min' | 'count' | ((acc: number, value: number) => number);
73
74
  }): LiveView<DiffSchema<S, Targets>>;
75
+ /**
76
+ * Live counterpart to {@link TimeSeries.partitionBy}. Routes
77
+ * events into per-partition `LiveSeries` sub-buffers, each with
78
+ * its own retention, grace window, and stateful operator
79
+ * pipeline. Use `apply((sub) => sub.fill(...).rolling(...))` to
80
+ * compose live operators per partition; `collect()` to fan
81
+ * partitioned outputs into a unified `LiveSeries`.
82
+ *
83
+ * **Multi-entity series:** every stateful live operator
84
+ * (`rolling`, `fill`, `diff`, `rate`, `cumulative`, `pctChange`)
85
+ * silently mixes data across entities on a multi-host stream
86
+ * unless scoped per-partition first.
87
+ *
88
+ * **Post-commit error semantics.** The partition view runs as a
89
+ * `'event'` listener on this `LiveSeries`. By the time a
90
+ * partitioning failure throws (a rogue value not in declared
91
+ * `groups`, or a stricter partition ordering rejecting an event
92
+ * the source accepted), the source has already committed the
93
+ * event — `this.length` reflects it. The caller's `push()`
94
+ * surfaces the listener's throw, but the source state has
95
+ * already moved. Validate inputs upstream of `push()` if
96
+ * source/partition atomicity matters.
97
+ *
98
+ * See {@link LivePartitionedSeries}.
99
+ */
100
+ partitionBy<K extends string = string>(by: keyof EventDataForSchema<S> & string, options?: LivePartitionedOptions<K>): LivePartitionedSeries<S, K>;
74
101
  on(type: 'event', fn: EventListener<S>): () => void;
75
102
  on(type: 'batch', fn: BatchListener<S>): () => void;
76
103
  on(type: 'evict', fn: EvictListener<S>): () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"LiveSeries.d.ts","sourceRoot":"","sources":["../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;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAC3B,QAAQ,CAAC,CAAC,CAAC;IAId,UAAU,CAAC,KAAK,CAAC,OAAO,SAAS,0BAA0B,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE;SACnE,CAAC,IAAI,OAAO,GACT,KAAK,GACL,KAAK,GACL,KAAK,GACL,OAAO,GACP,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;KAC7C,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAIpC;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,WAAW,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EACnC,EAAE,EAAE,MAAM,kBAAkB,CAAC,CAAC,CAAC,GAAG,MAAM,EACxC,OAAO,CAAC,EAAE,sBAAsB,CAAC,CAAC,CAAC,GAClC,qBAAqB,CAAC,CAAC,EAAE,CAAC,CAAC;IAI9B,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI;IACnD,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI;IACnD,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI;CA0IpD"}
@@ -1,6 +1,7 @@
1
1
  import { Event } from './Event.js';
2
2
  import { Interval } from './Interval.js';
3
3
  import { LiveAggregation } from './LiveAggregation.js';
4
+ import { LivePartitionedSeries, } from './LivePartitionedSeries.js';
4
5
  import { LiveView, makeDiffView, makeFillView, makeCumulativeView, } from './LiveView.js';
5
6
  import { Time } from './Time.js';
6
7
  import { TimeRange } from './TimeRange.js';
@@ -263,6 +264,34 @@ export class LiveSeries {
263
264
  cumulative(spec) {
264
265
  return makeCumulativeView(this, spec);
265
266
  }
267
+ /**
268
+ * Live counterpart to {@link TimeSeries.partitionBy}. Routes
269
+ * events into per-partition `LiveSeries` sub-buffers, each with
270
+ * its own retention, grace window, and stateful operator
271
+ * pipeline. Use `apply((sub) => sub.fill(...).rolling(...))` to
272
+ * compose live operators per partition; `collect()` to fan
273
+ * partitioned outputs into a unified `LiveSeries`.
274
+ *
275
+ * **Multi-entity series:** every stateful live operator
276
+ * (`rolling`, `fill`, `diff`, `rate`, `cumulative`, `pctChange`)
277
+ * silently mixes data across entities on a multi-host stream
278
+ * unless scoped per-partition first.
279
+ *
280
+ * **Post-commit error semantics.** The partition view runs as a
281
+ * `'event'` listener on this `LiveSeries`. By the time a
282
+ * partitioning failure throws (a rogue value not in declared
283
+ * `groups`, or a stricter partition ordering rejecting an event
284
+ * the source accepted), the source has already committed the
285
+ * event — `this.length` reflects it. The caller's `push()`
286
+ * surfaces the listener's throw, but the source state has
287
+ * already moved. Validate inputs upstream of `push()` if
288
+ * source/partition atomicity matters.
289
+ *
290
+ * See {@link LivePartitionedSeries}.
291
+ */
292
+ partitionBy(by, options) {
293
+ return new LivePartitionedSeries(this, by, options);
294
+ }
266
295
  on(type, fn) {
267
296
  const set = type === 'event'
268
297
  ? this.#onEvent
@@ -1 +1 @@
1
- {"version":3,"file":"LiveSeries.js","sourceRoot":"","sources":["../src/LiveSeries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,kBAAkB,GAGnB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EACL,sBAAsB,GAEvB,MA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AI,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;QACvC,CAAC;QAED,IAAI,IAAI,CAAC,SAAS,KAAK,QAAQ,IAAI,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;YACvE,IAAI,CAAC,GAAG,UAAU,CAAC;YACnB,IAAI,KAAK,GAAG,CAAC,CAAC;YACd,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,EAAE,CAAC,EAAE,EAAE,CAAC;gBACpC,KAAK,IAAI,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAQ,CAAC,CAAC;YACtD,CAAC;YACD,OACE,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM;gBACvB,IAAI,CAAC,aAAa,GAAG,KAAK,GAAG,IAAI,CAAC,SAAS,EAC3C,CAAC;gBACD,KAAK,IAAI,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAQ,CAAC,CAAC;gBACpD,CAAC,EAAE,CAAC;YACN,CAAC;YACD,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;QACvC,CAAC;QAED,IAAI,UAAU,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QAEhC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;QACnD,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;YACxB,IAAI,CAAC,aAAa,IAAI,kBAAkB,CAAC,CAAQ,CAAC,CAAC;QACrD,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;CACF"}
package/dist/index.d.ts CHANGED
@@ -3,6 +3,7 @@ export { Event } from './Event.js';
3
3
  export { Interval } from './Interval.js';
4
4
  export { LiveAggregation } from './LiveAggregation.js';
5
5
  export type { LiveAggregationOptions } from './LiveAggregation.js';
6
+ export { LivePartitionedSeries, LivePartitionedView, type LivePartitionedOptions, } from './LivePartitionedSeries.js';
6
7
  export { LiveSeries } from './LiveSeries.js';
7
8
  export { LiveView } from './LiveView.js';
8
9
  export type { LiveFillMapping, LiveFillStrategy } from './LiveView.js';
@@ -14,7 +15,7 @@ export { Sequence } from './Sequence.js';
14
15
  export { TimeSeries } from './TimeSeries.js';
15
16
  export { top } from './reducers/index.js';
16
17
  export { ValidationError } from './errors.js';
17
- export type { AlignSchema, ArrayColumnNameForSchema, BaselineSchema, AggregateFunction, AggregateReducer, AggregateOutputMap, AggregateOutputSpec, AggregateMap, AggregateSchema, ColumnDef, CollapseData, ArrayAggregateAppendSchema, ArrayAggregateKind, ArrayAggregateReplaceSchema, ArrayExplodeAppendSchema, ArrayExplodeReplaceSchema, CollapseSchema, EventDataForSchema, EventForSchema, EventKeyForKind, FillMapping, FillStrategy, EventKeyForSchema, FirstColKind, FirstColumn, IntervalKeyedSchema, JsonIntervalInput, JsonObjectRowForSchema, JsonRowFormat, JsonRowForSchema, JsonTimeRangeInput, JsonTimestampInput, JsonValueForKind, RollingAlignment, RollingSchema, JoinConflictMode, JoinManySchema, PrefixedJoinManySchema, PrefixedJoinSchema, LiveSource, JoinType, JoinSchema, NormalizedRowForSchema, NormalizedObjectRowForSchema, NormalizedObjectRow, NormalizedValueForKind, ReduceResult, RenameData, RenameMap, RenameSchema, RekeySchema, RowForSchema, ArrayValue, ColumnValue, ScalarKind, ScalarValue, CustomAggregateReducer, DiffSchema, NumericColumnNameForSchema, SmoothMethod, SmoothAppendSchema, SmoothSchema, SelectData, SelectSchema, SeriesSchema, TimeKeyedSchema, TimeSeriesInput, TimeSeriesJsonInput, TimeRangeKeyedSchema, ValueColumnsForSchema, ValueColumn, ValueForKind, } from './types.js';
18
+ export type { AlignSchema, ArrayColumnNameForSchema, BaselineSchema, AggregateFunction, AggregateReducer, AggregateOutputMap, AggregateOutputSpec, AggregateMap, AggregateSchema, ColumnDef, CollapseData, ArrayAggregateAppendSchema, ArrayAggregateKind, ArrayAggregateReplaceSchema, ArrayExplodeAppendSchema, ArrayExplodeReplaceSchema, CollapseSchema, DedupeKeep, EventDataForSchema, EventForSchema, EventKeyForKind, FillMapping, FillStrategy, MaterializeSchema, EventKeyForSchema, FirstColKind, FirstColumn, IntervalKeyedSchema, JsonIntervalInput, JsonObjectRowForSchema, JsonRowFormat, JsonRowForSchema, JsonTimeRangeInput, JsonTimestampInput, JsonValueForKind, RollingAlignment, RollingSchema, JoinConflictMode, JoinManySchema, PrefixedJoinManySchema, PrefixedJoinSchema, LiveSource, JoinType, JoinSchema, NormalizedRowForSchema, NormalizedObjectRowForSchema, NormalizedObjectRow, NormalizedValueForKind, ReduceResult, RenameData, RenameMap, RenameSchema, RekeySchema, RowForSchema, ArrayValue, ColumnValue, ScalarKind, ScalarValue, CustomAggregateReducer, DiffSchema, NumericColumnNameForSchema, SmoothMethod, SmoothAppendSchema, SmoothSchema, SelectData, SelectSchema, SeriesSchema, TimeKeyedSchema, TimeSeriesInput, TimeSeriesJsonInput, TimeRangeKeyedSchema, ValueColumnsForSchema, ValueColumn, ValueForKind, } from './types.js';
18
19
  export type { CalendarOptions, CalendarUnit, TimeZoneOptions, } from './calendar.js';
19
20
  export type { EventKey, IntervalInput, IntervalValue, TemporalLike, TimeRangeInput, TimestampInput, } from './temporal.js';
20
21
  export type { DurationInput } from './utils/duration.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,YAAY,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7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Y,EACZ,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,WAAW,EACX,YAAY,GACb,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,eAAe,EACf,YAAY,EACZ,eAAe,GAChB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,QAAQ,EACR,aAAa,EACb,aAAa,EACb,YAAY,EACZ,cAAc,EACd,cAAc,GACf,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,YAAY,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,YAAY,EACV,iBAAiB,EACjB,YAAY,EACZ,eAAe,GAChB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC"}
package/dist/index.js CHANGED
@@ -2,6 +2,7 @@ export { BoundedSequence } from './BoundedSequence.js';
2
2
  export { Event } from './Event.js';
3
3
  export { Interval } from './Interval.js';
4
4
  export { LiveAggregation } from './LiveAggregation.js';
5
+ export { LivePartitionedSeries, LivePartitionedView, } from './LivePartitionedSeries.js';
5
6
  export { LiveSeries } from './LiveSeries.js';
6
7
  export { LiveView } from './LiveView.js';
7
8
  export { LiveRollingAggregation } from './LiveRollingAggregation.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CA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AAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pond-ts",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "TypeScript-first time series primitives",
5
5
  "license": "MIT",
6
6
  "repository": {