foldkit-sync 0.14.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +558 -40
  2. package/dist/diagnostics.d.ts +74 -3
  3. package/dist/diagnostics.d.ts.map +1 -1
  4. package/dist/diagnostics.js +60 -4
  5. package/dist/diagnostics.js.map +1 -1
  6. package/dist/do.d.ts +49 -7
  7. package/dist/do.d.ts.map +1 -1
  8. package/dist/do.js +91 -8
  9. package/dist/do.js.map +1 -1
  10. package/dist/errors.d.ts +92 -1
  11. package/dist/errors.d.ts.map +1 -1
  12. package/dist/errors.js +87 -1
  13. package/dist/errors.js.map +1 -1
  14. package/dist/index.d.ts +9 -5
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +6 -2
  17. package/dist/index.js.map +1 -1
  18. package/dist/journal.d.ts +52 -27
  19. package/dist/journal.d.ts.map +1 -1
  20. package/dist/journal.js +176 -64
  21. package/dist/journal.js.map +1 -1
  22. package/dist/make.d.ts +48 -17
  23. package/dist/make.d.ts.map +1 -1
  24. package/dist/make.js +11 -4
  25. package/dist/make.js.map +1 -1
  26. package/dist/migrations.d.ts +37 -0
  27. package/dist/migrations.d.ts.map +1 -0
  28. package/dist/migrations.js +56 -0
  29. package/dist/migrations.js.map +1 -0
  30. package/dist/mount.d.ts +1 -1
  31. package/dist/mount.d.ts.map +1 -1
  32. package/dist/mount.js +12 -6
  33. package/dist/mount.js.map +1 -1
  34. package/dist/refusal.d.ts +33 -0
  35. package/dist/refusal.d.ts.map +1 -0
  36. package/dist/refusal.js +47 -0
  37. package/dist/refusal.js.map +1 -0
  38. package/dist/serverJournal.d.ts +143 -0
  39. package/dist/serverJournal.d.ts.map +1 -0
  40. package/dist/serverJournal.js +503 -0
  41. package/dist/serverJournal.js.map +1 -0
  42. package/dist/sync.d.ts +132 -11
  43. package/dist/sync.d.ts.map +1 -1
  44. package/dist/sync.js +273 -64
  45. package/dist/sync.js.map +1 -1
  46. package/dist/transport.d.ts +5 -5
  47. package/dist/transport.d.ts.map +1 -1
  48. package/dist/transport.js.map +1 -1
  49. package/package.json +11 -8
package/dist/sync.d.ts CHANGED
@@ -1,12 +1,23 @@
1
1
  import { Effect, Metric, Option, Schema, Stream } from "effect";
2
2
  import { Transport, TransportError } from "./transport.js";
3
3
  import { Storage } from "./indexedDb.js";
4
+ import { Migrations } from "./migrations.js";
5
+ import { SyncRefusal } from "./refusal.js";
4
6
  import { DocumentId, LocalSequence, OpId, ReplicaId, Sequence } from "./ids.js";
5
7
  import { ReplicaError } from "./errors.js";
6
8
  /** Wire and persisted-format versions. A bump must handle the older value explicitly. */
7
9
  declare const PROTOCOL_VERSION = 1;
8
10
  declare const SCHEMA_VERSION = 1;
9
- /** A client-authored operation envelope. `message` is the application's encoded Message. */
11
+ /**
12
+ * Replica ids the server's own operations use (`foldkit-sync/journal`'s
13
+ * `serverJournal`): a sent entry may not claim one, or it could bind the id to
14
+ * its actor first and have the server's append refused.
15
+ */
16
+ export declare const SERVER_REPLICA_PREFIX = "server/";
17
+ /**
18
+ * A client-authored operation envelope. `message` is the application's
19
+ * Message, encoded at the current version of the document's history.
20
+ */
10
21
  declare const OperationSchema: Schema.Struct<{
11
22
  readonly protocolVersion: Schema.Literal<1>;
12
23
  readonly schemaVersion: Schema.Literal<1>;
@@ -18,6 +29,24 @@ declare const OperationSchema: Schema.Struct<{
18
29
  readonly message: Schema.Unknown;
19
30
  }>;
20
31
  export type Operation = typeof OperationSchema.Type;
32
+ /**
33
+ * Branded, so only Sync makes one: decoding an entry, or writing an
34
+ * `Operation` at the current version (`journalContract().operation.encode`).
35
+ * A decoded `Operation` is not one, since its missing `messageVersion` would
36
+ * read as version 1 and be upcast again.
37
+ */
38
+ declare const WrittenOperationSchema: Schema.brand<Schema.Struct<{
39
+ readonly protocolVersion: Schema.Literal<1>;
40
+ readonly schemaVersion: Schema.Literal<1>;
41
+ readonly documentId: Schema.brand<Schema.NonEmptyString, "@foldkit-sync/DocumentId">;
42
+ readonly replicaId: Schema.brand<Schema.NonEmptyString, "@foldkit-sync/ReplicaId">;
43
+ readonly localSequence: Schema.brand<Schema.Number, "@foldkit-sync/LocalSequence">;
44
+ readonly opId: Schema.brand<Schema.NonEmptyString, "@foldkit-sync/OpId">;
45
+ readonly baseCursor: Schema.brand<Schema.Number, "@foldkit-sync/Sequence">;
46
+ readonly message: Schema.Unknown;
47
+ readonly messageVersion: Schema.optionalKey<Schema.Int>;
48
+ }>, "foldkit-sync/WrittenOperation">;
49
+ export type WrittenOperation = typeof WrittenOperationSchema.Type;
21
50
  /** An operation the server committed, with its authoritative order and actor. */
22
51
  declare const CommittedSchema: Schema.Struct<{
23
52
  readonly protocolVersion: Schema.Literal<1>;
@@ -33,6 +62,12 @@ declare const CommittedSchema: Schema.Struct<{
33
62
  }>;
34
63
  /** Named to avoid colliding with `foldkit-durable`'s `Committed`. */
35
64
  export type CommittedOperation = typeof CommittedSchema.Type;
65
+ /**
66
+ * An envelope as written, checked for its shape and nothing else: for the
67
+ * server's own operations (`serverJournal`), whose bytes it wrote or recorded.
68
+ * Never for an entry someone sent.
69
+ */
70
+ export declare const writtenEnvelope: (input: unknown) => WrittenOperation;
36
71
  /** Counters and a histogram an application can scrape. */
37
72
  export declare const syncMetrics: {
38
73
  exchanges: Metric.Counter<number>;
@@ -49,8 +84,16 @@ export interface Exchange<Shared> {
49
84
  readonly operations: ReadonlyArray<unknown>;
50
85
  readonly rejected: ReadonlyArray<OpId>;
51
86
  /**
52
- * Why some of `rejected` were refused, in words the server chose for a person:
53
- * a policy's reason, never an internal error. One without a reason is still rejected.
87
+ * Why some of `rejected` were refused, each an encoded `SyncRefusal`. One
88
+ * without a refusal is still rejected.
89
+ */
90
+ readonly refusals?: ReadonlyArray<{
91
+ readonly opId: OpId;
92
+ readonly refusal: typeof SyncRefusal.Encoded;
93
+ }> | undefined;
94
+ /**
95
+ * @deprecated Send `refusals`; removed in the next release. Words the server
96
+ * chose for a person, for some of `rejected`.
54
97
  */
55
98
  readonly reasons?: ReadonlyArray<{
56
99
  readonly opId: OpId;
@@ -79,7 +122,10 @@ export interface ReplicaState<Shared> {
79
122
  readonly cursor: Sequence;
80
123
  readonly committed: Shared;
81
124
  readonly committedIds: ReadonlyArray<string>;
82
- readonly pending: ReadonlyArray<Operation>;
125
+ /** Operations not yet committed, as written. */
126
+ readonly pending: ReadonlyArray<WrittenOperation>;
127
+ /** Operations this build cannot read, kept as written until dismissed; absent when none. */
128
+ readonly refused?: ReadonlyArray<WrittenOperation>;
83
129
  /** The server history `cursor` points into, once an exchange has named one. */
84
130
  readonly epoch?: string;
85
131
  }
@@ -89,7 +135,7 @@ export interface ReplicaState<Shared> {
89
135
  */
90
136
  export interface TransportClient {
91
137
  /** `epoch` is the server history the replica's cursor points into, when it knows one. */
92
- exchange(cursor: Sequence, pending: ReadonlyArray<Operation>, epoch?: string | undefined): Promise<unknown>;
138
+ exchange(cursor: Sequence, pending: ReadonlyArray<WrittenOperation>, epoch?: string | undefined): Promise<unknown>;
93
139
  }
94
140
  /** A redacted view of a replica's state, for a UI to explain and recover. */
95
141
  export interface ReplicaStatus {
@@ -99,6 +145,13 @@ export interface ReplicaStatus {
99
145
  readonly lastError: string | undefined;
100
146
  /** Operations the server refused, most recent first, with its reason when it gave one. */
101
147
  readonly rejected: ReadonlyArray<Rejection>;
148
+ /**
149
+ * Operations this build cannot read, as written: an older version of the
150
+ * document's Message that no step of its history reads, found in the outbox
151
+ * or refused by the server as `Unreadable`. Never sent; kept, with their
152
+ * payload, until `Replica.dismiss`.
153
+ */
154
+ readonly refused: ReadonlyArray<WrittenOperation>;
102
155
  /**
103
156
  * The server history the cursor points into, once a server named one. A new
104
157
  * one means the server was reset: what the replica had committed is gone.
@@ -112,8 +165,20 @@ export interface ReplicaStatus {
112
165
  */
113
166
  export interface Rejection {
114
167
  readonly opId: OpId;
168
+ /**
169
+ * Why, typed. None when the server named no refusal (an older or a custom
170
+ * server), or one this build cannot read (reported as `UnknownRefusal`).
171
+ */
172
+ readonly refusal: Option.Option<SyncRefusal>;
173
+ /**
174
+ * @deprecated Read `refusal`, through `SyncRefusal.match`; removed in the
175
+ * next release. The server's words from its `reasons`.
176
+ */
115
177
  readonly reason: Option.Option<string>;
116
- readonly operation: Operation;
178
+ /** The operation as it was sent: its Message at the version it was written at. */
179
+ readonly operation: WrittenOperation;
180
+ /** The operation's Message, encoded at the current version: what to read it by. */
181
+ readonly message: unknown;
117
182
  }
118
183
  /**
119
184
  * A consistent status and optimistic-shared pair, read from one replica state.
@@ -142,7 +207,8 @@ export interface Replica<Message, Shared> {
142
207
  * rejected one never does.
143
208
  */
144
209
  readonly committed: Effect.Effect<Shared>;
145
- readonly pending: Effect.Effect<ReadonlyArray<Operation>>;
210
+ /** The outbox, as written. */
211
+ readonly pending: Effect.Effect<ReadonlyArray<WrittenOperation>>;
146
212
  readonly cursor: Effect.Effect<Sequence>;
147
213
  /**
148
214
  * Waiting/recovery information without exposing Messages or the Model. It is a
@@ -171,14 +237,34 @@ export interface Replica<Message, Shared> {
171
237
  * with `Effect.forkScoped` and provide `Transport`.
172
238
  */
173
239
  readonly start: Effect.Effect<void, never, Transport>;
240
+ /** Forgets a `status.refused` operation, its payload with it. One that is not there changes nothing. */
241
+ dismiss(opId: OpId): Effect.Effect<void, ReplicaError>;
174
242
  readonly close: Effect.Effect<void>;
175
243
  }
176
- export interface SyncDefinition<Message, Shared, MessageEncoded, SharedEncoded> {
177
- readonly documentId: DocumentId;
244
+ /**
245
+ * The document's Message: one Schema, at version 1, or its history
246
+ * (`Sync.migrations`), whose current Schema is the Message.
247
+ */
248
+ export type MessageHistory<Message, MessageEncoded> = {
178
249
  readonly message: Schema.Codec<Message, MessageEncoded, never, never>;
250
+ readonly migrations?: undefined;
251
+ } | {
252
+ /** The Schemas operations may be stored in, and how each becomes the next. */
253
+ readonly migrations: Migrations<Message, MessageEncoded>;
254
+ readonly message?: undefined;
255
+ };
256
+ export type SyncDefinition<Message, Shared, MessageEncoded, SharedEncoded> = SyncDefinitionOptions<Message, Shared, SharedEncoded> & MessageHistory<Message, MessageEncoded>;
257
+ export interface SyncDefinitionOptions<Message, Shared, SharedEncoded> {
258
+ readonly documentId: DocumentId;
179
259
  readonly shared: Schema.Codec<Shared, SharedEncoded, never, never>;
180
260
  readonly empty: Shared;
181
261
  readonly durable: (message: Message) => boolean;
262
+ /**
263
+ * Optional. The Messages only the server appends: stored and replayed like
264
+ * durable ones, never accepted from a replica. A Message both predicates
265
+ * accept is refused wherever it is read.
266
+ */
267
+ readonly serverOnly?: ((message: Message) => boolean) | undefined;
182
268
  readonly replay: (shared: Shared, message: Message) => Shared;
183
269
  /**
184
270
  * Optional. Merges a durable Message into the one submitted before it, while that one
@@ -212,14 +298,38 @@ export interface Sync<Message, Shared, Durable = Message> {
212
298
  readonly documentId: DocumentId;
213
299
  /** Whether a Message is one the replica records and replays. */
214
300
  readonly durable: (message: Message) => boolean;
301
+ /** Whether a Message is one only the server appends: replicas replay it and never submit it. */
302
+ readonly serverOnly: (message: Message) => boolean;
215
303
  /**
216
304
  * Low-level wire codecs for adapters and the transport. Most applications use
217
305
  * `journalContract` and `openReplica`; these are exposed for a custom
218
306
  * transport or a server that must speak the operation envelope directly.
219
307
  */
220
308
  readonly codec: {
309
+ /** The current version of the document's Message history: 1 with no migrations. */
310
+ readonly messageVersion: number;
311
+ /** The document's Message at its current version: what every hook decodes. */
312
+ readonly message: Schema.Codec<Message, unknown, never, never>;
313
+ /**
314
+ * An entry someone sent, read: its Message upcast to the current version.
315
+ * Throws `UnsupportedMessageVersionError` for a newer version,
316
+ * `UnreadableMessageError` for an older one no step reads, and
317
+ * `ServerOnlyMessageError` for a Message only the server appends; it
318
+ * refuses a replica id under `server/` or past 128 characters. Read
319
+ * stored history with `journalContract().operation.decode`, which takes
320
+ * the server's Messages too.
321
+ */
221
322
  readonly normalizeOperation: (input: unknown) => Operation;
323
+ /** `normalizeOperation`, of this document only. */
222
324
  readonly operationFrom: (input: unknown, documentId: DocumentId) => Operation;
325
+ /**
326
+ * An entry as received, checked as an envelope of this document and read
327
+ * as `normalizeOperation` reads it, and returned as written: what a server
328
+ * appends. A custom server reads every entry with it before appending.
329
+ * Never pass it an `Operation`: that Message is already current and would
330
+ * be read as version 1. Write one with `journalContract().operation.encode`.
331
+ */
332
+ readonly writtenFrom: (input: unknown, documentId: DocumentId) => WrittenOperation;
223
333
  readonly committedFrom: (input: unknown, documentId: DocumentId) => CommittedOperation;
224
334
  readonly decodeExchange: (input: unknown) => Exchange<Shared>;
225
335
  };
@@ -248,9 +358,20 @@ export interface JournalContract<Operation, Shared> {
248
358
  /** Sync's operation id includes the replica, even after Durable compacts its payload. */
249
359
  readonly legacyReplicaId: (opId: string) => string;
250
360
  readonly operation: {
251
- /** Operations are stored in their encoded form, so this is the identity. */
252
- readonly encode: (operation: Operation) => Operation;
361
+ /** Written at the current version: what the journal stores. */
362
+ readonly encode: (operation: Operation) => WrittenOperation;
363
+ /**
364
+ * Read from any version the history has, upcast to the current one: stored
365
+ * history, so the server's own Messages read too. Never the reader of an
366
+ * entry someone sent (`codec.writtenFrom`).
367
+ */
253
368
  readonly decode: (input: unknown) => Operation;
369
+ /**
370
+ * What a retransmission is compared by: the operation normalized at the
371
+ * version it was written at, as the build that wrote it normalized it, so
372
+ * an edit committed before a deploy is still recognized after it.
373
+ */
374
+ readonly compared: (input: unknown) => WrittenOperation;
254
375
  };
255
376
  readonly snapshot: {
256
377
  readonly encode: (snapshot: Shared) => unknown;
@@ -1 +1 @@
1
- {"version":3,"file":"sync.d.ts","names":[],"sources":["../src/sync.ts"],"mappings":";;;;;;cAyCM;cACA;;cAGA,iBAAe,OAAA;;;;;;;;;;YAUT,mBAAmB,gBAAgB;;cAGzC,iBAAe,OAAA;;;;;;;;;;;;;YAMT,4BAA4B,gBAAgB;;qBAiB3C;EACX,WAAS,OAAA;EACT,SAAO,OAAA;EACP,aAAW,OAAA;EACX,iBAAe,OAAA;;iBAKA,WAA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