@korajs/sync 1.0.0-beta.0 → 1.0.0-beta.2

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.
@@ -1,4 +1,4 @@
1
- import { c as SyncTransport, T as TransportOptions, a as SyncMessage, d as TransportMessageHandler, e as TransportCloseHandler, f as TransportErrorHandler, Q as QueueStorage } from './transport-BMesMB6s.cjs';
1
+ import { c as SyncTransport, T as TransportOptions, a as SyncMessage, d as TransportMessageHandler, e as TransportCloseHandler, f as TransportErrorHandler, Q as QueueStorage } from './transport-BGr-_eH8.cjs';
2
2
  import { Operation } from '@korajs/core';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { c as SyncTransport, T as TransportOptions, a as SyncMessage, d as TransportMessageHandler, e as TransportCloseHandler, f as TransportErrorHandler, Q as QueueStorage } from './transport-BMesMB6s.js';
1
+ import { c as SyncTransport, T as TransportOptions, a as SyncMessage, d as TransportMessageHandler, e as TransportCloseHandler, f as TransportErrorHandler, Q as QueueStorage } from './transport-BGr-_eH8.js';
2
2
  import { Operation } from '@korajs/core';
3
3
 
4
4
  /**
@@ -208,6 +208,48 @@ interface QueueStorage {
208
208
  /** Return number of operations in storage */
209
209
  count(): Promise<number>;
210
210
  }
211
+ /**
212
+ * A record of one outbound operation the server permanently refused. Preserved so
213
+ * a rejected op is explainable and reconcilable rather than silently lost.
214
+ */
215
+ interface RejectedOperation {
216
+ /** Content-addressed id of the rejected operation. */
217
+ operationId: string;
218
+ /** Collection the operation targeted. */
219
+ collection: string;
220
+ /** Record the operation targeted. */
221
+ recordId: string;
222
+ /** Stable, machine-readable reason code from the server. */
223
+ code: string;
224
+ /** Human-readable explanation. */
225
+ message: string;
226
+ /** Whether resubmitting the identical operation may later succeed. */
227
+ retriable: boolean;
228
+ /** Wall-clock time (ms since epoch) the rejection was recorded. Display only. */
229
+ rejectedAt: number;
230
+ }
231
+ /**
232
+ * Interface for durably persisting operations the server rejected, so the record
233
+ * survives a page refresh. Keyed by operation id (idempotent on re-rejection).
234
+ */
235
+ interface RejectedOperationStorage {
236
+ /** Record (or overwrite) a rejected operation. */
237
+ record(rejected: RejectedOperation): Promise<void>;
238
+ /** List all recorded rejected operations. */
239
+ list(): Promise<RejectedOperation[]>;
240
+ /** Remove rejected operations by their operation ids (after the app reconciles them). */
241
+ remove(operationIds: string[]): Promise<void>;
242
+ }
243
+ /**
244
+ * In-memory {@link RejectedOperationStorage}. The default when no durable store is
245
+ * provided; suitable for tests and ephemeral sessions.
246
+ */
247
+ declare class MemoryRejectedOperationStorage implements RejectedOperationStorage {
248
+ private readonly rejected;
249
+ record(rejected: RejectedOperation): Promise<void>;
250
+ list(): Promise<RejectedOperation[]>;
251
+ remove(operationIds: string[]): Promise<void>;
252
+ }
211
253
  /**
212
254
  * Thrown when an operation violates sync scope constraints.
213
255
  * This can happen when:
@@ -307,6 +349,12 @@ interface HandshakeResponseMessage {
307
349
  acceptedScope?: Record<string, Record<string, unknown>>;
308
350
  /** Server wall-clock time (ms since epoch) at response creation. Lets clients measure their own clock skew. */
309
351
  serverTime?: number;
352
+ /**
353
+ * Whether the server persists blob bytes centrally. When true, a client
354
+ * automatically uploads the bytes behind its `blob` fields so they remain
355
+ * available to other devices even after the authoring device goes offline.
356
+ */
357
+ blobStorageEnabled?: boolean;
310
358
  }
311
359
  /**
312
360
  * Batch of operations sent during delta exchange or streaming.
@@ -343,6 +391,33 @@ interface ErrorMessage {
343
391
  message: string;
344
392
  retriable: boolean;
345
393
  }
394
+ /**
395
+ * Server-to-client rejection of ONE specific operation the client submitted.
396
+ *
397
+ * Unlike {@link ErrorMessage}, which is connection-level, this is tied to an
398
+ * `operationId` so the client can divert exactly that operation out of its
399
+ * pending outbound queue and into a durable rejected-operations store — kept and
400
+ * explainable rather than silently retried forever or lost on the batch ack. The
401
+ * operation never entered the server's authoritative log, so no other replica
402
+ * ever sees it; the submitter is told so its optimistic local copy can be
403
+ * reconciled (rolled back or resubmitted) by the app.
404
+ */
405
+ interface OperationRejectedMessage {
406
+ type: 'operation-rejected';
407
+ messageId: string;
408
+ /** Content-addressed id of the rejected operation. */
409
+ operationId: string;
410
+ /** Collection the rejected operation targeted (for app routing / display). */
411
+ collection: string;
412
+ /** Record the rejected operation targeted. */
413
+ recordId: string;
414
+ /** Stable, machine-readable reason code. */
415
+ code: string;
416
+ /** Human-readable explanation. */
417
+ message: string;
418
+ /** Whether resubmitting the identical operation may later succeed. */
419
+ retriable: boolean;
420
+ }
346
421
  /**
347
422
  * Awareness state for a single client (cursor position, user info).
348
423
  * Wire-format representation for JSON transport.
@@ -387,10 +462,55 @@ interface YjsDocUpdateMessage {
387
462
  /** Base64-encoded Yjs update binary */
388
463
  update: string;
389
464
  }
465
+ /**
466
+ * Request for a single blob chunk by content hash. Ephemeral side channel for
467
+ * out-of-band blob transfer over the sync connection; never persisted in the
468
+ * operation log (durable state is the BlobRef inside a record's fields).
469
+ *
470
+ * Possession of a chunk hash is itself the capability to request it: hashes are
471
+ * only learned from BlobRefs inside records the peer already received through
472
+ * its (scope-filtered) sync, and SHA-256 preimage resistance makes guessing a
473
+ * hash infeasible. The server therefore relays chunk requests among peers
474
+ * without a separate ACL.
475
+ */
476
+ interface BlobChunkRequestMessage {
477
+ type: 'blob-chunk-request';
478
+ messageId: string;
479
+ /** Correlates the response to this request. */
480
+ requestId: string;
481
+ /** SHA-256 hash of the requested chunk. */
482
+ hash: string;
483
+ }
484
+ /**
485
+ * Response to a {@link BlobChunkRequestMessage}. Carries the chunk bytes, or
486
+ * null when the responder does not hold that hash.
487
+ */
488
+ interface BlobChunkResponseMessage {
489
+ type: 'blob-chunk-response';
490
+ messageId: string;
491
+ /** Echoes the request's `requestId` for correlation. */
492
+ requestId: string;
493
+ /** Base64-encoded chunk bytes, or null when the responder does not hold the hash. */
494
+ bytes: string | null;
495
+ }
496
+ /**
497
+ * Unsolicited upload of a blob chunk (or a blob manifest) from a client to the
498
+ * server, so the server can persist it centrally and serve it to other devices
499
+ * even after the authoring device disconnects. Content-addressed: the receiver
500
+ * verifies the bytes hash to `hash`.
501
+ */
502
+ interface BlobChunkPushMessage {
503
+ type: 'blob-chunk-push';
504
+ messageId: string;
505
+ /** SHA-256 hash of the pushed bytes (a chunk hash or a manifest hash). */
506
+ hash: string;
507
+ /** Base64-encoded bytes. */
508
+ bytes: string;
509
+ }
390
510
  /**
391
511
  * Union of all sync protocol messages.
392
512
  */
393
- type SyncMessage = HandshakeMessage | HandshakeResponseMessage | OperationBatchMessage | AcknowledgmentMessage | ErrorMessage | AwarenessUpdateMessage | YjsDocUpdateMessage;
513
+ type SyncMessage = HandshakeMessage | HandshakeResponseMessage | OperationBatchMessage | AcknowledgmentMessage | ErrorMessage | OperationRejectedMessage | AwarenessUpdateMessage | YjsDocUpdateMessage | BlobChunkRequestMessage | BlobChunkResponseMessage | BlobChunkPushMessage;
394
514
  /**
395
515
  * Check if an unknown value is a valid SyncMessage.
396
516
  */
@@ -415,6 +535,10 @@ declare function isAcknowledgmentMessage(value: unknown): value is Acknowledgmen
415
535
  * Check if a value is an ErrorMessage.
416
536
  */
417
537
  declare function isErrorMessage(value: unknown): value is ErrorMessage;
538
+ /**
539
+ * Check if a value is an OperationRejectedMessage.
540
+ */
541
+ declare function isOperationRejectedMessage(value: unknown): value is OperationRejectedMessage;
418
542
  /**
419
543
  * Check if a value is an AwarenessUpdateMessage.
420
544
  */
@@ -423,6 +547,18 @@ declare function isAwarenessUpdateMessage(value: unknown): value is AwarenessUpd
423
547
  * Check if a value is a YjsDocUpdateMessage.
424
548
  */
425
549
  declare function isYjsDocUpdateMessage(value: unknown): value is YjsDocUpdateMessage;
550
+ /**
551
+ * Check if a value is a BlobChunkRequestMessage.
552
+ */
553
+ declare function isBlobChunkRequestMessage(value: unknown): value is BlobChunkRequestMessage;
554
+ /**
555
+ * Check if a value is a BlobChunkResponseMessage.
556
+ */
557
+ declare function isBlobChunkResponseMessage(value: unknown): value is BlobChunkResponseMessage;
558
+ /**
559
+ * Check if a value is a BlobChunkPushMessage.
560
+ */
561
+ declare function isBlobChunkPushMessage(value: unknown): value is BlobChunkPushMessage;
426
562
 
427
563
  /**
428
564
  * Options for transport connection.
@@ -466,4 +602,4 @@ interface SyncTransport {
466
602
  isConnected(): boolean;
467
603
  }
468
604
 
469
- export { type AcknowledgmentMessage as A, isHandshakeMessage as B, isHandshakeResponseMessage as C, type DeltaCursor as D, type EncryptedPayload as E, isOperationBatchMessage as F, isSyncMessage as G, type HandshakeMessage as H, InvalidScopeError as I, isYjsDocUpdateMessage as J, operationMatchesQuerySubsets as K, type OperationBatchMessage as O, type QueueStorage as Q, type SyncScopeMap as S, type TransportOptions as T, type VersionedKey as V, type WireFormat as W, type YjsDocUpdateMessage as Y, type SyncMessage as a, type SerializedOperation as b, type SyncTransport as c, type TransportMessageHandler as d, type TransportCloseHandler as e, type TransportErrorHandler as f, type SyncEncryptionConfig as g, type SyncState as h, type SyncStatusInfo as i, type SyncConfig as j, type SyncStatePersistence as k, type SyncQuerySubset as l, type AwarenessStateWire as m, type AwarenessUpdateMessage as n, type ErrorMessage as o, type HandshakeResponseMessage as p, SYNC_STATES as q, SYNC_STATUSES as r, ScopeViolationError as s, type SyncEncryptionAlgorithm as t, type SyncScopeContext as u, type SyncStatus as v, dedupeQuerySubsets as w, isAcknowledgmentMessage as x, isAwarenessUpdateMessage as y, isErrorMessage as z };
605
+ export { isYjsDocUpdateMessage as $, type AcknowledgmentMessage as A, type BlobChunkRequestMessage as B, dedupeQuerySubsets as C, type DeltaCursor as D, type EncryptedPayload as E, isAcknowledgmentMessage as F, isAwarenessUpdateMessage as G, type HandshakeMessage as H, InvalidScopeError as I, isBlobChunkPushMessage as J, isBlobChunkRequestMessage as K, isBlobChunkResponseMessage as L, MemoryRejectedOperationStorage as M, isErrorMessage as N, type OperationBatchMessage as O, isHandshakeMessage as P, type QueueStorage as Q, type RejectedOperationStorage as R, type SyncScopeMap as S, type TransportOptions as T, isHandshakeResponseMessage as U, type VersionedKey as V, type WireFormat as W, isOperationBatchMessage as X, type YjsDocUpdateMessage as Y, isOperationRejectedMessage as Z, isSyncMessage as _, type SyncMessage as a, operationMatchesQuerySubsets as a0, type SerializedOperation as b, type SyncTransport as c, type TransportMessageHandler as d, type TransportCloseHandler as e, type TransportErrorHandler as f, type BlobChunkResponseMessage as g, type BlobChunkPushMessage as h, type SyncEncryptionConfig as i, type SyncState as j, type SyncStatusInfo as k, type SyncConfig as l, type SyncStatePersistence as m, type SyncQuerySubset as n, type RejectedOperation as o, type AwarenessStateWire as p, type AwarenessUpdateMessage as q, type ErrorMessage as r, type HandshakeResponseMessage as s, type OperationRejectedMessage as t, SYNC_STATES as u, SYNC_STATUSES as v, ScopeViolationError as w, type SyncEncryptionAlgorithm as x, type SyncScopeContext as y, type SyncStatus as z };
@@ -208,6 +208,48 @@ interface QueueStorage {
208
208
  /** Return number of operations in storage */
209
209
  count(): Promise<number>;
210
210
  }
211
+ /**
212
+ * A record of one outbound operation the server permanently refused. Preserved so
213
+ * a rejected op is explainable and reconcilable rather than silently lost.
214
+ */
215
+ interface RejectedOperation {
216
+ /** Content-addressed id of the rejected operation. */
217
+ operationId: string;
218
+ /** Collection the operation targeted. */
219
+ collection: string;
220
+ /** Record the operation targeted. */
221
+ recordId: string;
222
+ /** Stable, machine-readable reason code from the server. */
223
+ code: string;
224
+ /** Human-readable explanation. */
225
+ message: string;
226
+ /** Whether resubmitting the identical operation may later succeed. */
227
+ retriable: boolean;
228
+ /** Wall-clock time (ms since epoch) the rejection was recorded. Display only. */
229
+ rejectedAt: number;
230
+ }
231
+ /**
232
+ * Interface for durably persisting operations the server rejected, so the record
233
+ * survives a page refresh. Keyed by operation id (idempotent on re-rejection).
234
+ */
235
+ interface RejectedOperationStorage {
236
+ /** Record (or overwrite) a rejected operation. */
237
+ record(rejected: RejectedOperation): Promise<void>;
238
+ /** List all recorded rejected operations. */
239
+ list(): Promise<RejectedOperation[]>;
240
+ /** Remove rejected operations by their operation ids (after the app reconciles them). */
241
+ remove(operationIds: string[]): Promise<void>;
242
+ }
243
+ /**
244
+ * In-memory {@link RejectedOperationStorage}. The default when no durable store is
245
+ * provided; suitable for tests and ephemeral sessions.
246
+ */
247
+ declare class MemoryRejectedOperationStorage implements RejectedOperationStorage {
248
+ private readonly rejected;
249
+ record(rejected: RejectedOperation): Promise<void>;
250
+ list(): Promise<RejectedOperation[]>;
251
+ remove(operationIds: string[]): Promise<void>;
252
+ }
211
253
  /**
212
254
  * Thrown when an operation violates sync scope constraints.
213
255
  * This can happen when:
@@ -307,6 +349,12 @@ interface HandshakeResponseMessage {
307
349
  acceptedScope?: Record<string, Record<string, unknown>>;
308
350
  /** Server wall-clock time (ms since epoch) at response creation. Lets clients measure their own clock skew. */
309
351
  serverTime?: number;
352
+ /**
353
+ * Whether the server persists blob bytes centrally. When true, a client
354
+ * automatically uploads the bytes behind its `blob` fields so they remain
355
+ * available to other devices even after the authoring device goes offline.
356
+ */
357
+ blobStorageEnabled?: boolean;
310
358
  }
311
359
  /**
312
360
  * Batch of operations sent during delta exchange or streaming.
@@ -343,6 +391,33 @@ interface ErrorMessage {
343
391
  message: string;
344
392
  retriable: boolean;
345
393
  }
394
+ /**
395
+ * Server-to-client rejection of ONE specific operation the client submitted.
396
+ *
397
+ * Unlike {@link ErrorMessage}, which is connection-level, this is tied to an
398
+ * `operationId` so the client can divert exactly that operation out of its
399
+ * pending outbound queue and into a durable rejected-operations store — kept and
400
+ * explainable rather than silently retried forever or lost on the batch ack. The
401
+ * operation never entered the server's authoritative log, so no other replica
402
+ * ever sees it; the submitter is told so its optimistic local copy can be
403
+ * reconciled (rolled back or resubmitted) by the app.
404
+ */
405
+ interface OperationRejectedMessage {
406
+ type: 'operation-rejected';
407
+ messageId: string;
408
+ /** Content-addressed id of the rejected operation. */
409
+ operationId: string;
410
+ /** Collection the rejected operation targeted (for app routing / display). */
411
+ collection: string;
412
+ /** Record the rejected operation targeted. */
413
+ recordId: string;
414
+ /** Stable, machine-readable reason code. */
415
+ code: string;
416
+ /** Human-readable explanation. */
417
+ message: string;
418
+ /** Whether resubmitting the identical operation may later succeed. */
419
+ retriable: boolean;
420
+ }
346
421
  /**
347
422
  * Awareness state for a single client (cursor position, user info).
348
423
  * Wire-format representation for JSON transport.
@@ -387,10 +462,55 @@ interface YjsDocUpdateMessage {
387
462
  /** Base64-encoded Yjs update binary */
388
463
  update: string;
389
464
  }
465
+ /**
466
+ * Request for a single blob chunk by content hash. Ephemeral side channel for
467
+ * out-of-band blob transfer over the sync connection; never persisted in the
468
+ * operation log (durable state is the BlobRef inside a record's fields).
469
+ *
470
+ * Possession of a chunk hash is itself the capability to request it: hashes are
471
+ * only learned from BlobRefs inside records the peer already received through
472
+ * its (scope-filtered) sync, and SHA-256 preimage resistance makes guessing a
473
+ * hash infeasible. The server therefore relays chunk requests among peers
474
+ * without a separate ACL.
475
+ */
476
+ interface BlobChunkRequestMessage {
477
+ type: 'blob-chunk-request';
478
+ messageId: string;
479
+ /** Correlates the response to this request. */
480
+ requestId: string;
481
+ /** SHA-256 hash of the requested chunk. */
482
+ hash: string;
483
+ }
484
+ /**
485
+ * Response to a {@link BlobChunkRequestMessage}. Carries the chunk bytes, or
486
+ * null when the responder does not hold that hash.
487
+ */
488
+ interface BlobChunkResponseMessage {
489
+ type: 'blob-chunk-response';
490
+ messageId: string;
491
+ /** Echoes the request's `requestId` for correlation. */
492
+ requestId: string;
493
+ /** Base64-encoded chunk bytes, or null when the responder does not hold the hash. */
494
+ bytes: string | null;
495
+ }
496
+ /**
497
+ * Unsolicited upload of a blob chunk (or a blob manifest) from a client to the
498
+ * server, so the server can persist it centrally and serve it to other devices
499
+ * even after the authoring device disconnects. Content-addressed: the receiver
500
+ * verifies the bytes hash to `hash`.
501
+ */
502
+ interface BlobChunkPushMessage {
503
+ type: 'blob-chunk-push';
504
+ messageId: string;
505
+ /** SHA-256 hash of the pushed bytes (a chunk hash or a manifest hash). */
506
+ hash: string;
507
+ /** Base64-encoded bytes. */
508
+ bytes: string;
509
+ }
390
510
  /**
391
511
  * Union of all sync protocol messages.
392
512
  */
393
- type SyncMessage = HandshakeMessage | HandshakeResponseMessage | OperationBatchMessage | AcknowledgmentMessage | ErrorMessage | AwarenessUpdateMessage | YjsDocUpdateMessage;
513
+ type SyncMessage = HandshakeMessage | HandshakeResponseMessage | OperationBatchMessage | AcknowledgmentMessage | ErrorMessage | OperationRejectedMessage | AwarenessUpdateMessage | YjsDocUpdateMessage | BlobChunkRequestMessage | BlobChunkResponseMessage | BlobChunkPushMessage;
394
514
  /**
395
515
  * Check if an unknown value is a valid SyncMessage.
396
516
  */
@@ -415,6 +535,10 @@ declare function isAcknowledgmentMessage(value: unknown): value is Acknowledgmen
415
535
  * Check if a value is an ErrorMessage.
416
536
  */
417
537
  declare function isErrorMessage(value: unknown): value is ErrorMessage;
538
+ /**
539
+ * Check if a value is an OperationRejectedMessage.
540
+ */
541
+ declare function isOperationRejectedMessage(value: unknown): value is OperationRejectedMessage;
418
542
  /**
419
543
  * Check if a value is an AwarenessUpdateMessage.
420
544
  */
@@ -423,6 +547,18 @@ declare function isAwarenessUpdateMessage(value: unknown): value is AwarenessUpd
423
547
  * Check if a value is a YjsDocUpdateMessage.
424
548
  */
425
549
  declare function isYjsDocUpdateMessage(value: unknown): value is YjsDocUpdateMessage;
550
+ /**
551
+ * Check if a value is a BlobChunkRequestMessage.
552
+ */
553
+ declare function isBlobChunkRequestMessage(value: unknown): value is BlobChunkRequestMessage;
554
+ /**
555
+ * Check if a value is a BlobChunkResponseMessage.
556
+ */
557
+ declare function isBlobChunkResponseMessage(value: unknown): value is BlobChunkResponseMessage;
558
+ /**
559
+ * Check if a value is a BlobChunkPushMessage.
560
+ */
561
+ declare function isBlobChunkPushMessage(value: unknown): value is BlobChunkPushMessage;
426
562
 
427
563
  /**
428
564
  * Options for transport connection.
@@ -466,4 +602,4 @@ interface SyncTransport {
466
602
  isConnected(): boolean;
467
603
  }
468
604
 
469
- export { type AcknowledgmentMessage as A, isHandshakeMessage as B, isHandshakeResponseMessage as C, type DeltaCursor as D, type EncryptedPayload as E, isOperationBatchMessage as F, isSyncMessage as G, type HandshakeMessage as H, InvalidScopeError as I, isYjsDocUpdateMessage as J, operationMatchesQuerySubsets as K, type OperationBatchMessage as O, type QueueStorage as Q, type SyncScopeMap as S, type TransportOptions as T, type VersionedKey as V, type WireFormat as W, type YjsDocUpdateMessage as Y, type SyncMessage as a, type SerializedOperation as b, type SyncTransport as c, type TransportMessageHandler as d, type TransportCloseHandler as e, type TransportErrorHandler as f, type SyncEncryptionConfig as g, type SyncState as h, type SyncStatusInfo as i, type SyncConfig as j, type SyncStatePersistence as k, type SyncQuerySubset as l, type AwarenessStateWire as m, type AwarenessUpdateMessage as n, type ErrorMessage as o, type HandshakeResponseMessage as p, SYNC_STATES as q, SYNC_STATUSES as r, ScopeViolationError as s, type SyncEncryptionAlgorithm as t, type SyncScopeContext as u, type SyncStatus as v, dedupeQuerySubsets as w, isAcknowledgmentMessage as x, isAwarenessUpdateMessage as y, isErrorMessage as z };
605
+ export { isYjsDocUpdateMessage as $, type AcknowledgmentMessage as A, type BlobChunkRequestMessage as B, dedupeQuerySubsets as C, type DeltaCursor as D, type EncryptedPayload as E, isAcknowledgmentMessage as F, isAwarenessUpdateMessage as G, type HandshakeMessage as H, InvalidScopeError as I, isBlobChunkPushMessage as J, isBlobChunkRequestMessage as K, isBlobChunkResponseMessage as L, MemoryRejectedOperationStorage as M, isErrorMessage as N, type OperationBatchMessage as O, isHandshakeMessage as P, type QueueStorage as Q, type RejectedOperationStorage as R, type SyncScopeMap as S, type TransportOptions as T, isHandshakeResponseMessage as U, type VersionedKey as V, type WireFormat as W, isOperationBatchMessage as X, type YjsDocUpdateMessage as Y, isOperationRejectedMessage as Z, isSyncMessage as _, type SyncMessage as a, operationMatchesQuerySubsets as a0, type SerializedOperation as b, type SyncTransport as c, type TransportMessageHandler as d, type TransportCloseHandler as e, type TransportErrorHandler as f, type BlobChunkResponseMessage as g, type BlobChunkPushMessage as h, type SyncEncryptionConfig as i, type SyncState as j, type SyncStatusInfo as k, type SyncConfig as l, type SyncStatePersistence as m, type SyncQuerySubset as n, type RejectedOperation as o, type AwarenessStateWire as p, type AwarenessUpdateMessage as q, type ErrorMessage as r, type HandshakeResponseMessage as s, type OperationRejectedMessage as t, SYNC_STATES as u, SYNC_STATUSES as v, ScopeViolationError as w, type SyncEncryptionAlgorithm as x, type SyncScopeContext as y, type SyncStatus as z };
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@korajs/sync",
3
- "version": "1.0.0-beta.0",
3
+ "version": "1.0.0-beta.2",
4
4
  "description": "Sync protocol and transports for Kora.js with delta sync, causal ordering, and automatic reconnection",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",
8
8
  "types": "./dist/index.d.ts",
9
9
  "exports": {
10
+ "./package.json": "./package.json",
10
11
  ".": {
11
12
  "import": {
12
13
  "types": "./dist/index.d.ts",
@@ -33,8 +34,8 @@
33
34
  ],
34
35
  "dependencies": {
35
36
  "protobufjs": "^8.0.1",
36
- "@korajs/merge": "1.0.0-beta.0",
37
- "@korajs/core": "1.0.0-beta.0"
37
+ "@korajs/core": "1.0.0-beta.2",
38
+ "@korajs/merge": "1.0.0-beta.2"
38
39
  },
39
40
  "devDependencies": {
40
41
  "@fast-check/vitest": "0.2.0",