powersync-bridge 0.0.1-alpha.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,496 @@
1
+ import { S as Store, B as BridgeDriver, a as BridgeClock, O as OrderKey, I as InfiniteListResult, Q as QueryAdapter, b as InfiniteListDefinition, c as OnDemandResult, P as Params, d as StreamDescription, C as CursorOf, e as OpaqueCursor, K as KeyOf, f as SortDirection, g as CrudDelta, h as PendingOpRef, R as RacedListResult, M as MeasureSink, i as RacedListDefinition } from './clock-BAt_Za0Q.cjs';
2
+ export { A as ApiOffsetPolicy, j as ApiPolicy, k as Boundary, l as BoundaryReason, m as CompilableQuery, n as Cursor, D as DifferentialStream, E as EscalationPolicy, L as ListErrors, o as ListState, p as OnDemandStatus, q as PageArgs, r as PagedRow, s as PartitionPolicy, t as PendingOp, u as PreparedQuery, v as PriorityStatus, w as RaceMeasurement, x as RowDiff, y as RowOrigin, z as RowsBuilder, F as Snapshot, G as StreamHandle, H as StreamStatus, J as SyncStatusView, N as realClock } from './clock-BAt_Za0Q.cjs';
3
+
4
+ /**
5
+ * External store with a stable snapshot for useSyncExternalStore (R10/R11).
6
+ * `replace()` swaps the snapshot and notifies once; `swapRoot()` is what an identity change
7
+ * calls — it is synchronous, so no committed frame can observe the outgoing state (R15).
8
+ */
9
+ declare class SnapshotStore<S> implements Store<S> {
10
+ private snapshot;
11
+ private readonly listeners;
12
+ constructor(initial: S);
13
+ getSnapshot(): S;
14
+ subscribe(listener: () => void): () => void;
15
+ replace(next: S): void;
16
+ get listenerCount(): number;
17
+ }
18
+
19
+ type FlagState = 'idle' | 'flagging' | 'syncing' | 'synced' | 'timeout' | 'error';
20
+ interface FlaggerConfig {
21
+ /** App-supplied backend call, e.g. POST /sync/flag. */
22
+ readonly requestFlag: (ids: readonly string[]) => Promise<void>;
23
+ /** Stream whose JOIN reads the per-user sync_requests table. */
24
+ readonly stream: string;
25
+ /** Table the flagged rows land in (for presence detection). */
26
+ readonly table: string;
27
+ readonly timeoutMs?: number;
28
+ }
29
+ interface FlagResult {
30
+ readonly state: FlagState;
31
+ readonly error?: Error;
32
+ }
33
+ /**
34
+ * OPTIONAL primitive (§7): client-triggered, per-user server-side flagging. Use only for bucket
35
+ * economy or server-decided membership; `useOnDemandStream` is the default single-row path.
36
+ * `synced` is detected by watching the SPECIFIC requested ids, never by waitForFirstSync.
37
+ */
38
+ declare class AutoSyncFlagStore {
39
+ private readonly driver;
40
+ private readonly clock;
41
+ private readonly config;
42
+ private readonly ids;
43
+ readonly store: SnapshotStore<FlagResult>;
44
+ private handle;
45
+ private unsubStatus;
46
+ private cancelTimeout;
47
+ private disposed;
48
+ private refs;
49
+ constructor(driver: BridgeDriver, clock: BridgeClock, config: FlaggerConfig, ids: readonly string[]);
50
+ retain(): void;
51
+ release(): void;
52
+ get isDisposed(): boolean;
53
+ swapRoot(): void;
54
+ dispose(): void;
55
+ private start;
56
+ }
57
+
58
+ /**
59
+ * Identity is DERIVED from the JWT the connector returns, never supplied by the app (R15, [DX]).
60
+ * The key is the canonical JSON of the stable claims — a cache key, not a hash.
61
+ */
62
+ declare const DEFAULT_VOLATILE_CLAIMS: readonly string[];
63
+ declare function decodeJwtPayload(token: string): Record<string, unknown>;
64
+ interface IdentityKeyOptions {
65
+ readonly denyList?: readonly string[];
66
+ /** Connection parameters opted in BY KEY (rotating values must be excluded explicitly). */
67
+ readonly connectionParams?: Record<string, unknown>;
68
+ }
69
+ declare function identityKeyFromClaims(claims: Record<string, unknown>, opts?: IdentityKeyOptions): string;
70
+ declare function identityKeyFromToken(token: string, opts?: IdentityKeyOptions): string;
71
+
72
+ interface InfiniteDeps {
73
+ readonly driver: BridgeDriver;
74
+ readonly adapter: QueryAdapter;
75
+ readonly clock: BridgeClock;
76
+ readonly onEvicted?: ((ids: readonly string[]) => void) | undefined;
77
+ }
78
+ declare function emptyInfiniteResult<T>(): InfiniteListResult<T>;
79
+ /**
80
+ * The infinite list engine (§6.2): one global id set, a loaded-range local watch, and bounded
81
+ * escalation through equality partitions or API pages.
82
+ */
83
+ declare class InfiniteListStore<TItem, TScope, K extends OrderKey<TItem>, TCursor, TPartition> {
84
+ private readonly deps;
85
+ private readonly def;
86
+ private readonly scope;
87
+ readonly store: SnapshotStore<InfiniteListResult<TItem>>;
88
+ private readonly compare;
89
+ private readonly table;
90
+ private readonly abort;
91
+ private pages;
92
+ private local;
93
+ private lookahead;
94
+ private emissionSeen;
95
+ private localError;
96
+ private unsubDiffs;
97
+ private readonly apiRows;
98
+ private readonly retained;
99
+ private readonly tombstones;
100
+ private readonly subs;
101
+ private readonly lru;
102
+ private probeCursor;
103
+ private serverFloor;
104
+ private floorRevalidated;
105
+ private boundary;
106
+ private reason;
107
+ private awaitingSync;
108
+ private loading;
109
+ private errors;
110
+ private warnings;
111
+ private errorCount;
112
+ private nextRetryAt;
113
+ private disposed;
114
+ private refs;
115
+ constructor(deps: InfiniteDeps, def: InfiniteListDefinition<TItem, TScope, K, TCursor, TPartition>, scope: TScope);
116
+ retain(): void;
117
+ release(): void;
118
+ get isDisposed(): boolean;
119
+ swapRoot(): void;
120
+ dispose(): void;
121
+ private subscribeLocal;
122
+ private onDiff;
123
+ private provenance;
124
+ private applyRemovals;
125
+ private lastCursor;
126
+ /** Explicit user retry clears the backoff (R16). */
127
+ retry(): Promise<void>;
128
+ loadMore(): Promise<void>;
129
+ private setUnknown;
130
+ private escalatePartition;
131
+ private finishEnd;
132
+ private track;
133
+ private untrack;
134
+ private apiGate;
135
+ private apiFailure;
136
+ private escalateApi;
137
+ private escalateOffset;
138
+ private absorbApi;
139
+ private mergedEntries;
140
+ private render;
141
+ }
142
+
143
+ interface OnDemandOptions {
144
+ readonly ttl?: number;
145
+ readonly priority?: 0 | 1 | 2 | 3;
146
+ readonly timeoutMs?: number;
147
+ }
148
+ /**
149
+ * The default "pull one row" primitive (§7, [DX]): a plain on-demand equality-parameter stream.
150
+ * Held while retained; the TTL keeps rows warm after release.
151
+ */
152
+ declare class OnDemandStreamStore {
153
+ private readonly driver;
154
+ private readonly clock;
155
+ private readonly name;
156
+ private readonly params;
157
+ private readonly opts;
158
+ readonly store: SnapshotStore<OnDemandResult>;
159
+ private handle;
160
+ private readonly abort;
161
+ private refs;
162
+ private disposed;
163
+ constructor(driver: BridgeDriver, clock: BridgeClock, name: string, params: Params | null, opts: OnDemandOptions);
164
+ retain(): void;
165
+ release(): void;
166
+ get isDisposed(): boolean;
167
+ swapRoot(): void;
168
+ dispose(): void;
169
+ private start;
170
+ }
171
+
172
+ type Clock = () => number;
173
+ interface CheckpointCompletion {
174
+ /** Lower-bound stamp of the checkpoint's data position (download start), ms. */
175
+ readonly stamp: number;
176
+ readonly completedAt: number;
177
+ /** Stream this completion was observed on; null for the global status. */
178
+ readonly stream: string | null;
179
+ }
180
+ /**
181
+ * Session-scoped, monotonic, transition-independent freshness (§5.2, R3/R5).
182
+ *
183
+ * stamp(checkpoint_n) = max(observed download start ≤ its completion,
184
+ * completion time of checkpoint n−1,
185
+ * sessionConnectAt when no other bound exists)
186
+ * localFreshAt = max(previous, stamp) — a null observation never lowers it.
187
+ */
188
+ declare class FreshnessTracker {
189
+ private readonly driver;
190
+ private readonly clock;
191
+ private sessionConnectAt;
192
+ private localFreshAt;
193
+ private prevCompletionAt;
194
+ private lastDownloadStart;
195
+ private lastSeenSyncedAt;
196
+ private lastDownloading;
197
+ private lastConnected;
198
+ private lastHasSynced;
199
+ private readonly streamFreshAt;
200
+ private readonly streamSeenSyncedAt;
201
+ private readonly completions;
202
+ private readonly completionListeners;
203
+ private readonly clearListeners;
204
+ private unsubscribe;
205
+ constructor(driver: BridgeDriver, clock: Clock);
206
+ /** Call once at engine init and again after every identity swap. */
207
+ start(epochStartedAt: number): void;
208
+ stop(): void;
209
+ private reset;
210
+ get sessionConnectAtMs(): number | null;
211
+ get localFreshAtMs(): number;
212
+ streamFreshAtMs(desc: StreamDescription): number;
213
+ /** Freshness for a list: the owning stream's stamp when declared, else the global stamp. */
214
+ freshAtFor(stream: StreamDescription | undefined): number;
215
+ /** "Answered" = in-session freshness evidence (R5). */
216
+ isFresh(stream: StreamDescription | undefined): boolean;
217
+ onCompletion(l: (c: CheckpointCompletion) => void): () => void;
218
+ onClear(l: () => void): () => void;
219
+ private onStatus;
220
+ private stampFor;
221
+ private recordCompletion;
222
+ }
223
+
224
+ /** `id` is always the implicit tiebreaker (§8.3): a scalar key K is treated as [K, 'id']. */
225
+ declare function keyColumns<T>(orderKey: OrderKey<T>): [KeyOf<T>, KeyOf<T>];
226
+ /** Comparator over rows for the declared order key + direction. Byte order for strings (SQLite BINARY). */
227
+ declare function rowComparator<T>(orderKey: OrderKey<T>, direction?: SortDirection): (a: T, b: T) => number;
228
+ /** The cursor a row yields, in the definition's cursor shape. */
229
+ declare function cursorOfRow<T, K extends OrderKey<T>>(row: T, orderKey: K): CursorOf<T, K>;
230
+ declare function encodeCursor(cursor: unknown): OpaqueCursor;
231
+ declare function decodeCursor<C>(opaque: OpaqueCursor): C;
232
+
233
+ /**
234
+ * Snapshot-lifetime pending window (§5.2): SEEDED with the live set at requestedAt, then every
235
+ * added AND completed ref observed until the snapshot retires. Never closed at consume.
236
+ */
237
+ declare class PendingWindow {
238
+ private readonly refs;
239
+ private open;
240
+ constructor(seed: Iterable<PendingOpRef>);
241
+ observe(delta: CrudDelta): void;
242
+ get(table: string, id: string): PendingOpRef | undefined;
243
+ close(): void;
244
+ }
245
+ /**
246
+ * Identity-scoped engine state (F6-001): the crud-delta mirror (livePending), the open snapshot
247
+ * windows, and `recentlyAcked`. Created at engine init — before any list mounts — and replaced
248
+ * wholesale on identity swap.
249
+ */
250
+ declare class CrudMirror {
251
+ private readonly driver;
252
+ private readonly freshness;
253
+ private readonly clock;
254
+ private readonly live;
255
+ private readonly recentlyAcked;
256
+ private readonly windows;
257
+ private readonly listeners;
258
+ private unsubCrud;
259
+ private unsubCompletion;
260
+ private seeded;
261
+ constructor(driver: BridgeDriver, freshness: FreshnessTracker, clock: Clock);
262
+ start(): void;
263
+ stop(): void;
264
+ /** Resolves once the initial live set has been read. */
265
+ ready(): Promise<void>;
266
+ /** Re-read the queue and apply the difference as a delta (fallback trigger: every local diff emission). */
267
+ resync(): Promise<void>;
268
+ apply(delta: CrudDelta): void;
269
+ /** A ref retires only when a checkpoint whose STAMP ≥ ackTime completes (F5-001). */
270
+ private retireAcked;
271
+ openWindow(): PendingWindow;
272
+ closeWindow(w: PendingWindow): void;
273
+ /** The three-set union (R1). */
274
+ pendingOp(table: string, id: string, window?: PendingWindow): PendingOpRef | undefined;
275
+ isLivePending(table: string, id: string): boolean;
276
+ onChange(l: () => void): () => void;
277
+ }
278
+
279
+ /** Minimal TanStack QueryClient surface the bridge relies on (R11: fetchQuery + keying only). */
280
+ interface MinimalQueryClient {
281
+ fetchQuery<T>(opts: {
282
+ queryKey: readonly unknown[];
283
+ queryFn: (ctx: {
284
+ signal: AbortSignal;
285
+ }) => Promise<T>;
286
+ staleTime?: number;
287
+ }): Promise<T>;
288
+ }
289
+ interface SnapshotRecord<TApi> {
290
+ readonly rows: readonly TApi[];
291
+ readonly asOf: string | undefined;
292
+ readonly requestedAt: number;
293
+ readonly fetchedAt: number;
294
+ }
295
+ /**
296
+ * One fetch per (identity epoch, queryKey, staleTime window) — mount-triggered only, never a
297
+ * timer (R9). When a TanStack client is supplied it owns dedup + staleness; otherwise an
298
+ * internal cache with identical semantics is used, so core keeps zero required dependencies.
299
+ */
300
+ declare class SnapshotCache {
301
+ private readonly clock;
302
+ private readonly queryClient;
303
+ private readonly entries;
304
+ constructor(clock: BridgeClock, queryClient: MinimalQueryClient | undefined);
305
+ fetch<TApi>(key: readonly unknown[], staleTime: number, fetcher: (signal: AbortSignal) => Promise<{
306
+ rows: readonly TApi[];
307
+ asOf?: string;
308
+ }>): Promise<SnapshotRecord<TApi>>;
309
+ /** Cancel every in-flight fetch under a key prefix (identity swap). */
310
+ abortAll(prefix: readonly unknown[]): void;
311
+ clear(): void;
312
+ }
313
+
314
+ interface RacedDeps {
315
+ readonly driver: BridgeDriver;
316
+ readonly adapter: QueryAdapter;
317
+ readonly crud: CrudMirror;
318
+ readonly freshness: FreshnessTracker;
319
+ readonly snapshots: SnapshotCache;
320
+ readonly clock: BridgeClock;
321
+ readonly epoch: number;
322
+ readonly identityKey: string | null;
323
+ readonly apiLegEnabled: boolean;
324
+ readonly measure: MeasureSink | undefined;
325
+ }
326
+ declare function emptyRacedResult<T>(): RacedListResult<T>;
327
+ /**
328
+ * The raced list engine (§5.2). One instance per (epoch, definition, scope); ref-counted by hooks.
329
+ */
330
+ declare class RacedListStore<TItem, TScope, TApi, K extends OrderKey<TItem>> {
331
+ private readonly deps;
332
+ private readonly def;
333
+ private readonly scope;
334
+ private readonly scopeKey;
335
+ readonly store: SnapshotStore<RacedListResult<TItem>>;
336
+ private readonly compare;
337
+ private readonly table;
338
+ private readonly abort;
339
+ private readonly startedAt;
340
+ private snap;
341
+ private snapPending;
342
+ private snapError;
343
+ private snapWindow;
344
+ private local;
345
+ private localError;
346
+ private emissionSeen;
347
+ private readonly inSession;
348
+ private unsubDiffs;
349
+ private unsubCrud;
350
+ private unsubFresh;
351
+ private prepared;
352
+ private owned;
353
+ private overlay;
354
+ private readonly tombstones;
355
+ private disposed;
356
+ private refs;
357
+ private measured;
358
+ private localMs;
359
+ private apiMs;
360
+ constructor(deps: RacedDeps, def: RacedListDefinition<TItem, TScope, TApi, K>, scope: TScope, scopeKey: string);
361
+ retain(): void;
362
+ release(): void;
363
+ get isDisposed(): boolean;
364
+ /** Synchronous part of an identity swap: the snapshot becomes empty 'pending' at once (R15). */
365
+ swapRoot(): void;
366
+ dispose(): void;
367
+ private start;
368
+ private startApiLeg;
369
+ /**
370
+ * A checkpoint completed. Status events and diff emissions are separate SDK events with no
371
+ * ordering guarantee; taking ownership on the stale local map would render the pre-checkpoint
372
+ * value for one frame (fresh→old→fresh). Pre-ownership we re-query once, then reconcile.
373
+ */
374
+ private onCompletion;
375
+ private onDiff;
376
+ private applyRemovals;
377
+ private reconcile;
378
+ private freshAt;
379
+ private localFresh;
380
+ private tryTakeOwnership;
381
+ private renderOwned;
382
+ private renderRace;
383
+ private finalize;
384
+ private build;
385
+ private report;
386
+ /** The cursor of the last rendered row — used by raced × infinite composition (R13). */
387
+ lastCursor(): ReturnType<typeof cursorOfRow<TItem, K>> | undefined;
388
+ }
389
+
390
+ type Platform = 'web' | 'native';
391
+ type RacePolicy = 'race' | 'local-first';
392
+ interface PlatformGates {
393
+ readonly native?: RacePolicy;
394
+ readonly web?: RacePolicy;
395
+ }
396
+ interface BridgeOptions {
397
+ readonly driver: BridgeDriver;
398
+ readonly adapter: QueryAdapter;
399
+ /** TanStack QueryClient — used for fetchQuery + keying only (R11). Optional. */
400
+ readonly queryClient?: MinimalQueryClient;
401
+ readonly platform?: Platform;
402
+ /** Native defaults to local-first (R8); web to race. */
403
+ readonly platformGates?: PlatformGates;
404
+ readonly measure?: {
405
+ readonly sink: MeasureSink;
406
+ };
407
+ readonly identity?: IdentityKeyOptions;
408
+ readonly clock?: BridgeClock;
409
+ readonly onEvicted?: (listId: string, ids: readonly string[]) => void;
410
+ }
411
+ /** The shape of a PowerSync backend connector, structurally (no SDK import in core). */
412
+ interface ConnectorLike {
413
+ fetchCredentials(): Promise<{
414
+ token: string;
415
+ endpoint?: string;
416
+ expiresAt?: Date;
417
+ } | null>;
418
+ uploadData(database: unknown): Promise<void>;
419
+ }
420
+ /**
421
+ * The bridge: one per app, created once in a plain module before login (§5.1 root object).
422
+ * Owns the identity-scoped engine state (crud-delta mirror, recentlyAcked, freshness) from
423
+ * creation — before any list mounts (F6-001).
424
+ */
425
+ declare class Bridge {
426
+ readonly driver: BridgeDriver;
427
+ readonly adapter: QueryAdapter;
428
+ readonly platform: Platform;
429
+ readonly clock: BridgeClock;
430
+ /** Increments on every identity swap; hooks subscribe to re-acquire their stores. */
431
+ readonly epochStore: Store<number>;
432
+ private readonly identity;
433
+ private readonly freshness;
434
+ private readonly crud;
435
+ private readonly snapshots;
436
+ private readonly epochSnapshot;
437
+ private readonly stores;
438
+ private readonly gates;
439
+ private readonly measure;
440
+ private readonly identityOpts;
441
+ private readonly onEvicted;
442
+ private disposed;
443
+ constructor(opts: BridgeOptions);
444
+ get epoch(): number;
445
+ get identityKey(): string | null;
446
+ /** Resolves once the initial upload-queue read has landed (tests). */
447
+ ready(): Promise<void>;
448
+ /** Connect THROUGH the bridge so identity is derived from every token the connector produces. */
449
+ wrapConnector<C extends ConnectorLike>(connector: C): C;
450
+ /** Escape hatch for scope that is not in the token. */
451
+ setIdentity(scope: Record<string, unknown> | null): void;
452
+ /**
453
+ * Identity swap (R15): bump the epoch AND swap every store's root to empty 'pending' in ONE
454
+ * synchronous operation, then tear the rest down asynchronously.
455
+ */
456
+ private swapEpoch;
457
+ private acquire;
458
+ private apiLegEnabled;
459
+ raced<TItem, TScope, TApi, K extends OrderKey<TItem>>(def: RacedListDefinition<TItem, TScope, TApi, K>, scope: TScope): RacedListStore<TItem, TScope, TApi, K>;
460
+ infinite<TItem, TScope, K extends OrderKey<TItem>, TCursor, TPartition>(def: InfiniteListDefinition<TItem, TScope, K, TCursor, TPartition>, scope: TScope): InfiniteListStore<TItem, TScope, K, TCursor, TPartition>;
461
+ onDemand(name: string, params: Params | null, opts?: OnDemandOptions): OnDemandStreamStore;
462
+ autoSync(config: FlaggerConfig, ids: readonly string[]): AutoSyncFlagStore;
463
+ dispose(): void;
464
+ }
465
+ declare function createBridge(opts: BridgeOptions): Bridge;
466
+
467
+ type RacedInput<TItem, TScope, TApi, K extends OrderKey<TItem>> = Omit<RacedListDefinition<TItem, TScope, TApi, K>, 'kind'>;
468
+ type InfiniteInput<TItem, TScope, K extends OrderKey<TItem>, TCursor, TPartition> = Omit<InfiniteListDefinition<TItem, TScope, K, TCursor, TPartition>, 'kind'>;
469
+ /**
470
+ * `TItem` is inferred from the query's awaited result (§8.1); `TApi` from `fetchSnapshot`.
471
+ * Definitions close over the app's ORM instance; annotate the scope (and the page argument
472
+ * for infinite lists) so the callback is not context-sensitive.
473
+ */
474
+ declare function defineRacedList<TItem, TScope, TApi, K extends OrderKey<TItem>>(input: RacedInput<TItem, TScope, TApi, K>): RacedListDefinition<TItem, TScope, TApi, K>;
475
+ declare function defineInfiniteList<TItem, TScope, K extends OrderKey<TItem>, TCursor, TPartition = string>(input: InfiniteInput<TItem, TScope, K, TCursor, TPartition>): InfiniteListDefinition<TItem, TScope, K, TCursor, TPartition>;
476
+
477
+ /**
478
+ * Four-way removal taxonomy (§6.4):
479
+ * filtered — row still exists locally, no longer matches the list query → drop, no tombstone
480
+ * delete — absent, and its producing stream is still tracked before expiry → drop + tombstone
481
+ * eviction — absent, and its stream is gone or past expiry → retain, presentLocally:false
482
+ * retain — classification impossible (predicate threw) → retain
483
+ */
484
+ type RemovalClass = 'filtered' | 'delete' | 'eviction' | 'retain';
485
+ interface RemovalContext<T> {
486
+ readonly driver: BridgeDriver;
487
+ readonly clock: BridgeClock;
488
+ readonly table: string;
489
+ /** Producing stream for a row, when known (partition escalation). */
490
+ readonly provenance: (row: T) => StreamDescription | undefined;
491
+ readonly isInWindow?: ((row: T) => boolean) | undefined;
492
+ }
493
+ declare function probePresence(driver: BridgeDriver, table: string, ids: readonly string[]): Promise<Set<string>>;
494
+ declare function classifyRemovals<T>(ctx: RemovalContext<T>, removed: ReadonlyMap<string, T>): Promise<Map<string, RemovalClass>>;
495
+
496
+ export { AutoSyncFlagStore, Bridge, BridgeClock, BridgeDriver, type BridgeOptions, type ConnectorLike, CrudDelta, CursorOf, DEFAULT_VOLATILE_CLAIMS, type FlagResult, type FlagState, type FlaggerConfig, type IdentityKeyOptions, InfiniteListDefinition, InfiniteListResult, InfiniteListStore, KeyOf, MeasureSink, type MinimalQueryClient, type OnDemandOptions, OnDemandResult, OnDemandStreamStore, OpaqueCursor, OrderKey, Params, PendingOpRef, type Platform, type PlatformGates, QueryAdapter, type RacePolicy, RacedListDefinition, RacedListResult, RacedListStore, type RemovalClass, SnapshotStore, SortDirection, Store, StreamDescription, classifyRemovals, createBridge, cursorOfRow, decodeCursor, decodeJwtPayload, defineInfiniteList, defineRacedList, emptyInfiniteResult, emptyRacedResult, encodeCursor, identityKeyFromClaims, identityKeyFromToken, keyColumns, probePresence, rowComparator };