@graview/ship 0.1.2 → 0.1.4

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 (46) hide show
  1. package/README.md +312 -13
  2. package/dist/browser.d.ts +4 -4
  3. package/dist/browser.d.ts.map +1 -1
  4. package/dist/browser.js +2 -2
  5. package/dist/browser.js.map +1 -1
  6. package/dist/handler.d.ts +192 -26
  7. package/dist/handler.d.ts.map +1 -1
  8. package/dist/handler.js +383 -340
  9. package/dist/handler.js.map +1 -1
  10. package/dist/health.d.ts +12 -1
  11. package/dist/health.d.ts.map +1 -1
  12. package/dist/health.js +15 -4
  13. package/dist/health.js.map +1 -1
  14. package/dist/index.d.ts +7 -5
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +3 -2
  17. package/dist/index.js.map +1 -1
  18. package/dist/live-protocol.d.ts +451 -0
  19. package/dist/live-protocol.d.ts.map +1 -0
  20. package/dist/live-protocol.js +957 -0
  21. package/dist/live-protocol.js.map +1 -0
  22. package/dist/live.d.ts +156 -9
  23. package/dist/live.d.ts.map +1 -1
  24. package/dist/live.js +31 -1
  25. package/dist/live.js.map +1 -1
  26. package/dist/remote.d.ts +180 -5
  27. package/dist/remote.d.ts.map +1 -1
  28. package/dist/remote.js +793 -76
  29. package/dist/remote.js.map +1 -1
  30. package/dist/runtime.d.ts +7 -5
  31. package/dist/runtime.d.ts.map +1 -1
  32. package/dist/runtime.js +3 -2
  33. package/dist/runtime.js.map +1 -1
  34. package/dist/seat-headers.d.ts +6 -0
  35. package/dist/seat-headers.d.ts.map +1 -1
  36. package/dist/seat-headers.js +6 -0
  37. package/dist/seat-headers.js.map +1 -1
  38. package/dist/serve.d.ts +5 -3
  39. package/dist/serve.d.ts.map +1 -1
  40. package/dist/serve.js +18 -4
  41. package/dist/serve.js.map +1 -1
  42. package/dist/websocket.d.ts +1 -1
  43. package/dist/websocket.d.ts.map +1 -1
  44. package/dist/websocket.js +10 -2
  45. package/dist/websocket.js.map +1 -1
  46. package/package.json +3 -3
package/dist/remote.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { Store, type AnySchema, type FieldConflict, type GraviewApp, type MutationCall, type Operation, type PresenceChannel, type Principal, type Via } from "@graview/core";
1
+ import { Store, type AnySchema, type FieldConflict, type GraviewApp, type MutationCall, type Operation, type Presence, type PresenceChannel, type Principal, type Via, type WireRefusal } from "@graview/core";
2
+ import type { StorageLike } from "./browser-adapter.js";
2
3
  /**
3
4
  * THE OTHER END OF THE WIRE: a store whose graph lives on a server.
4
5
  *
@@ -61,7 +62,12 @@ export interface RemoteOptions<S extends AnySchema> {
61
62
  * where a hosted store's own auth goes without the framework knowing it.
62
63
  */
63
64
  readonly headers?: Readonly<Record<string, string>>;
64
- /** What the calls come through, recorded on each op the server makes: `web` unless said (FR-06). */
65
+ /**
66
+ * What the calls come through: `web` unless said (FR-06). Sent as
67
+ * `SEAT_HEADERS.via`, which a server believes exactly where it believes
68
+ * the seat headers; a server that asks its own `seatOf` says the channel
69
+ * itself (FR-52).
70
+ */
65
71
  readonly via?: Via;
66
72
  /**
67
73
  * THE LIVE WIRE (FR-05): hold a WebSocket to the server's `LIVE_PATH`,
@@ -76,7 +82,63 @@ export interface RemoteOptions<S extends AnySchema> {
76
82
  * and its seat rides in the query, which only a store trusting seat
77
83
  * headers reads).
78
84
  */
79
- readonly socket?: (url: string, headers: Readonly<Record<string, string>>) => LiveSocketLike;
85
+ readonly socket?: (url: string, headers: Readonly<Record<string, string>>, protocols: readonly string[]) => LiveSocketLike;
86
+ /**
87
+ * ASK FOR SHIP'S CODEC BY NAME (FR-44): the platform socket sends
88
+ * `LIVE_SUBPROTOCOL` as its WebSocket subprotocol. Off by default,
89
+ * because a browser fails the handshake with a server that does not
90
+ * answer it; `serveStore` answers it, and a Worker answers it with
91
+ * `liveSubprotocol(request)`. A `socket` factory is handed the same
92
+ * list and decides itself. `hello.wire` names the codec either way.
93
+ */
94
+ readonly subprotocol?: boolean;
95
+ /**
96
+ * THE DECLARATION A VERSION NAMES (FR-43). Told `{ t: "declaration" }`,
97
+ * or welcomed on a version other than the one it opened on, the client
98
+ * asks this for the app at the server's version and opens again on it:
99
+ * `onDeclaration` hands over the new remote store, and the calls still
100
+ * on the way are offered again under it, or refused in words. The host
101
+ * says how: a TS app imports its next declaration, a document-declared
102
+ * app fetches and compiles its document. Absent, the client reloads the
103
+ * page as `reload` does, carrying what it had not sent.
104
+ */
105
+ readonly resolveApp?: (version: number) => GraviewApp<AnySchema> | Promise<GraviewApp<AnySchema>>;
106
+ /**
107
+ * THE HOST'S POLICY, IN THE BROWSER TOO. A call is judged here before the
108
+ * server is asked, under the app this store is built from; a host whose
109
+ * own store judges by more than the declaration says — Graview Cloud adds
110
+ * a sight, an app's owners see everything — shapes that app here the same
111
+ * way, or the browser refuses what the server would allow. Applied to
112
+ * `app` and to every app `resolveApp` gives. The server judges regardless:
113
+ * this only keeps the two in agreement.
114
+ */
115
+ readonly localApp?: (app: GraviewApp<AnySchema>) => GraviewApp<AnySchema>;
116
+ /**
117
+ * THE HOST'S BUILD THIS PAGE RUNS (FR-44), an opaque string said in
118
+ * `hello`. A server on another build keeps serving it; `onBuild` is told
119
+ * once, so the page can offer a reload when it suits the person.
120
+ */
121
+ readonly build?: string;
122
+ /**
123
+ * THE HOST'S OWN PROTOCOL THIS PAGE SPEAKS (FR-44), said in `hello`
124
+ * beside ship's `WIRE_PROTOCOL`: a number the host moves when its half
125
+ * of the wire changes. A server below whose `minHostProtocol` it is
126
+ * answers `reload`, and this page reloads carrying what it had not sent.
127
+ */
128
+ readonly hostProtocol?: number;
129
+ /**
130
+ * WHERE UNSENT CALLS WAIT ACROSS A RELOAD (FR-44). When the server
131
+ * answers `reload`, every call not yet answered is written to `storage`
132
+ * under `key`, and the next `openRemote` with the same key offers them
133
+ * again once it is open. `sessionStorage` in a page, a `Map` in a test.
134
+ * Without it they are refused in words before the page reloads.
135
+ */
136
+ readonly carry?: {
137
+ readonly storage: StorageLike;
138
+ readonly key: string;
139
+ };
140
+ /** How to reload the page when the server asks: `location.reload()` in a page by default. */
141
+ readonly reloadPage?: () => void;
80
142
  /** How long `openRemote({ live: true })` waits for the socket's welcome before it opens polling. 3000 by default. */
81
143
  readonly openTimeoutMs?: number;
82
144
  /**
@@ -85,7 +147,52 @@ export interface RemoteOptions<S extends AnySchema> {
85
147
  * turns one off or on reaches this client like any other.
86
148
  */
87
149
  readonly enabledModules?: readonly string[];
150
+ /**
151
+ * How long to wait before each attempt to open the socket again (FR-49):
152
+ * a function of the attempt (0 first, reset once a socket is welcomed)
153
+ * that answers in milliseconds, or `{ min, max, factor }` for the
154
+ * jittered exponential default — `min * factor ** attempt`, at most
155
+ * `max`, give or take a quarter. 250, 10000 and 2 unless said.
156
+ */
157
+ readonly backoff?: RemoteBackoff;
158
+ /**
159
+ * A HEARTBEAT DOWN THE SOCKET, opted into, in milliseconds (FR-49). A
160
+ * server holds a socket's presence for as long as the socket is open
161
+ * (`held: "socket"`), so by default the socket says `here` only when where
162
+ * this client stands changes — an idle tab says nothing, and a host that
163
+ * hibernates is not woken for it. Given, an unchanged presence is said
164
+ * again on the heartbeat, no oftener than this: for a host that still
165
+ * keeps a socket's presence by time. A polling client says it with every
166
+ * poll whatever this says, so `pollMs` paces it.
167
+ */
168
+ readonly presenceEveryMs?: number;
169
+ /**
170
+ * Whether anybody is looking (FR-49). While it answers false, this
171
+ * client's presence is not said — on the socket or the poll — and lapses
172
+ * where others see it. In a page it is `document.visibilityState` unless
173
+ * said; where there is no document, always true.
174
+ */
175
+ readonly visible?: () => boolean;
88
176
  }
177
+ /** How a client is reaching its server now (FR-49): not yet, yes, or not at the moment. */
178
+ export type RemoteStatus = "connecting" | "online" | "offline";
179
+ /** What happened to a client since it opened, as counts for a host's beacon (FR-49). */
180
+ export interface RemoteCounters {
181
+ /** Times it was offline and came back online. */
182
+ readonly reconnects: number;
183
+ /** Times the server's ops landed under calls of this client's still pending. */
184
+ readonly rebases: number;
185
+ /** Stale writes: calls of this client's refused because a field moved since it last saw it. */
186
+ readonly conflicts: number;
187
+ /** Times it could not catch up and took the server's whole state (FR-53). */
188
+ readonly resyncs: number;
189
+ }
190
+ /** A reconnect delay (FR-49): the attempt's own, in ms, or the bounds of the jittered default. */
191
+ export type RemoteBackoff = ((attempt: number) => number) | {
192
+ readonly min?: number;
193
+ readonly max?: number;
194
+ readonly factor?: number;
195
+ };
89
196
  /** A stale write, as this client is told of it: the fields that moved, and the person's two answers. */
90
197
  export interface RemoteConflict {
91
198
  /** In words: "Ana changed label to “Book the church hall” while you were editing; yours was …" */
@@ -113,8 +220,14 @@ export interface RemoteStore<S extends AnySchema> {
113
220
  * The change is taken back before the listener runs; what is left is
114
221
  * saying so, in the policy's own words. A conflict nobody listens for
115
222
  * with `onConflict` is told here too, in its sentence.
223
+ *
224
+ * The second argument says why as a code a program can branch on
225
+ * (FR-46): `forbidden`, `missing`, `invalid` or `limit`, with `wouldNeed`
226
+ * when the policy knows who could. Busy is never told here: a change the
227
+ * host asked to wait is kept, and sent again (FR-45) — and so is one
228
+ * refused `unavailable`, which waits out the spell, backing off.
116
229
  */
117
- onRefusal(listener: (reason: string) => void): () => void;
230
+ onRefusal(listener: (sentence: string, refusal: RemoteRefusal) => void): () => void;
118
231
  /**
119
232
  * Told when a change this browser had already shown was refused as a
120
233
  * stale write (FR-05): somebody changed a field it changes since this
@@ -126,8 +239,34 @@ export interface RemoteStore<S extends AnySchema> {
126
239
  revision(node: string, field: string): number;
127
240
  /** The last op of the server's this client has. */
128
241
  seq(): number;
242
+ /**
243
+ * THIS CLIENT'S OWN KEY in who is here, as the server built it from the
244
+ * seat (FR-47): said in the socket's welcome, or in the answer to a poll's
245
+ * `here`. Undefined until one of them has, or from a server before it.
246
+ * Who is here, as `presence` tells it, never includes it.
247
+ */
248
+ participant(): string | undefined;
129
249
  /** How everybody else's ops reach this client now: pushed down the socket, or on the poll. */
130
250
  transport(): "socket" | "poll";
251
+ /**
252
+ * Whether the server is being reached (FR-49). `online` once a welcome or
253
+ * an answer has landed; `offline` while a socket that was welcomed is down
254
+ * and nothing has been heard since, or when a poll or a call does not
255
+ * reach the server. A live client is `connecting` until its socket is
256
+ * welcomed or its first poll lands. An answer that refuses is an answer:
257
+ * the server was reached.
258
+ */
259
+ status(): RemoteStatus;
260
+ /** Told each time the status changes — the offline banner's switch. Returns the way to stop listening. */
261
+ onStatus(listener: (status: RemoteStatus) => void): () => void;
262
+ /** How often this client reconnected, rebased, met a conflict and resynced — counts only. */
263
+ counters(): RemoteCounters;
264
+ /**
265
+ * The calls sent and not yet answered: shown here and waiting for the
266
+ * server's verdict. A call made while the server cannot be reached counts
267
+ * here until it is back and has answered; it is not taken back meanwhile.
268
+ */
269
+ pending(): number;
131
270
  /**
132
271
  * Resolves once every call sent so far has been answered — accepted and
133
272
  * landed, or refused and taken back. A browser never waits for this; a
@@ -139,11 +278,47 @@ export interface RemoteStore<S extends AnySchema> {
139
278
  * WHO IS HERE, over the same poll — or the socket. Saying where you are
140
279
  * rides on the next heartbeat and the answer carries everybody else — no
141
280
  * round trip of its own, nothing written to the store, the adapter or
142
- * the log.
281
+ * the log. Its `onWho` tells a listener added late who is here already,
282
+ * at once, as `onBuild` does.
143
283
  */
144
284
  readonly presence: PresenceChannel;
285
+ /** Who else is here now, as this client was last told: never itself. */
286
+ who(): readonly Presence[];
287
+ /**
288
+ * THE DECLARATION CHANGED ON THE SERVER (FR-43): handed a new remote
289
+ * store, opened on the server's migrated state under the app
290
+ * `resolveApp` gave for `version`, with this one's unanswered calls
291
+ * offered again on it. This one is closed: mount the new one. A call
292
+ * that no longer fits is told on `onRefusal`, in words.
293
+ *
294
+ * THE HOST'S WIRING GOES WITH IT. Every listener put on this store —
295
+ * `onRefusal`, `onConflict`, `onStatus`, `onBuild`, `presence.onWho` and
296
+ * `onDeclaration` itself — is carried to the new one, and to each after
297
+ * it, and `counters()` run on rather than starting again; the way to stop
298
+ * listening a host was handed stops it on whichever store is current. So
299
+ * a host writes its listeners once: one added again on the new store is
300
+ * told twice.
301
+ */
302
+ onDeclaration(listener: (next: RemoteStore<AnySchema>, version: number) => void): () => void;
303
+ /**
304
+ * THE SERVER RUNS ANOTHER BUILD (FR-44): told once, with its build, when
305
+ * its welcome names one other than `build`. A listener added after it
306
+ * was noticed is told at once. The client keeps working.
307
+ */
308
+ onBuild(listener: (build: string) => void): () => void;
145
309
  close(): void;
146
310
  }
311
+ /** A refusal as the client is told it: the reason, the sentence and who could (FR-46). */
312
+ export type RemoteRefusal = WireRefusal;
313
+ /**
314
+ * WHAT `send` THROWS, AND WHAT A TAKEN-BACK CHANGE WAS REFUSED WITH: the
315
+ * server's sentence as the message, and `refusal` for a program to branch
316
+ * on (FR-46).
317
+ */
318
+ export declare class RemoteRefusedError extends Error {
319
+ readonly refusal: RemoteRefusal;
320
+ constructor(refusal: RemoteRefusal);
321
+ }
147
322
  export declare function openRemote<S extends AnySchema>(options: RemoteOptions<S>): Promise<RemoteStore<S>>;
148
323
  /**
149
324
  * A principal as the headers a TRUSTED server reads (`trustSeatHeaders`):
@@ -1 +1 @@
1
- {"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../src/remote.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,EAGL,KAAK,SAAS,EACd,KAAK,aAAa,EAElB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,SAAS,EAEd,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,GAAG,EACT,MAAM,eAAe,CAAC;AAKvB;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,kGAAkG;AAClG,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5C,MAAM,EAAE,CAAC,CAAC,KAAK,E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