@graview/ship 0.1.0 → 0.1.3
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.
- package/README.md +165 -9
- package/dist/browser-adapter.d.ts +9 -9
- package/dist/browser-adapter.d.ts.map +1 -1
- package/dist/browser-adapter.js +6 -3
- package/dist/browser-adapter.js.map +1 -1
- package/dist/browser.d.ts +10 -6
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +4 -2
- package/dist/browser.js.map +1 -1
- package/dist/cli.d.ts +17 -7
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +41 -7
- package/dist/cli.js.map +1 -1
- package/dist/export.d.ts +27 -2
- package/dist/export.d.ts.map +1 -1
- package/dist/export.js +38 -5
- package/dist/export.js.map +1 -1
- package/dist/file-adapter.d.ts +8 -8
- package/dist/file-adapter.d.ts.map +1 -1
- package/dist/file-adapter.js +58 -8
- package/dist/file-adapter.js.map +1 -1
- package/dist/handler.d.ts +271 -0
- package/dist/handler.d.ts.map +1 -0
- package/dist/handler.js +581 -0
- package/dist/handler.js.map +1 -0
- package/dist/health.d.ts +9 -0
- package/dist/health.d.ts.map +1 -1
- package/dist/health.js +5 -1
- package/dist/health.js.map +1 -1
- package/dist/index.d.ts +14 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/live-protocol.d.ts +208 -0
- package/dist/live-protocol.d.ts.map +1 -0
- package/dist/live-protocol.js +380 -0
- package/dist/live-protocol.js.map +1 -0
- package/dist/live.d.ts +266 -0
- package/dist/live.d.ts.map +1 -0
- package/dist/live.js +74 -0
- package/dist/live.js.map +1 -0
- package/dist/meta.d.ts +13 -0
- package/dist/meta.d.ts.map +1 -0
- package/dist/meta.js +2 -0
- package/dist/meta.js.map +1 -0
- package/dist/open-store.d.ts +56 -7
- package/dist/open-store.d.ts.map +1 -1
- package/dist/open-store.js +141 -12
- package/dist/open-store.js.map +1 -1
- package/dist/remote.d.ts +237 -13
- package/dist/remote.d.ts.map +1 -1
- package/dist/remote.js +1033 -88
- package/dist/remote.js.map +1 -1
- package/dist/runtime.d.ts +34 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +22 -0
- package/dist/runtime.js.map +1 -0
- package/dist/seat-headers.d.ts +26 -0
- package/dist/seat-headers.d.ts.map +1 -0
- package/dist/seat-headers.js +26 -0
- package/dist/seat-headers.js.map +1 -0
- package/dist/serve.d.ts +16 -106
- package/dist/serve.d.ts.map +1 -1
- package/dist/serve.js +95 -217
- package/dist/serve.js.map +1 -1
- package/dist/source-edit.d.ts.map +1 -1
- package/dist/source-edit.js +6 -1
- package/dist/source-edit.js.map +1 -1
- package/dist/steps.d.ts +43 -0
- package/dist/steps.d.ts.map +1 -1
- package/dist/steps.js +69 -0
- package/dist/steps.js.map +1 -1
- package/dist/websocket.d.ts +14 -0
- package/dist/websocket.d.ts.map +1 -0
- package/dist/websocket.js +163 -0
- package/dist/websocket.js.map +1 -0
- package/package.json +6 -2
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
import { FieldRevisions, hidesFrom, hueFor, isUnset, participantKey, redact, seenBy, seesId, refusalOf, VISITOR_PRESENCE_TTL_MS, WIRE_PROTOCOL, } from "@graview/core";
|
|
2
|
+
import { bytesOf, conflictSentence, LIVE_WIRE } from "./live.js";
|
|
3
|
+
/** For whom an author acts, as a presence says it: the person's id and name, or nothing. */
|
|
4
|
+
const forWhom = (author) => author.onBehalfOf?.id ? { onBehalfOf: author.onBehalfOf.id, ...(author.onBehalfOf.name ? { onBehalfOfName: author.onBehalfOf.name } : {}) } : {};
|
|
5
|
+
/**
|
|
6
|
+
* A PRESENCE AS THE SERVER BUILDS IT. Keyed by the seat — a client cannot
|
|
7
|
+
* claim to be somebody else — with only the session taken from what it
|
|
8
|
+
* said, and stamped with the server's clock. What it is, and for whom it
|
|
9
|
+
* acts, are the seat's (FR-47): a claimed `kind`, `onBehalfOf` or `until`
|
|
10
|
+
* is dropped, and the seat's name stands over a claimed one. `participant`
|
|
11
|
+
* is the key the server already gave this socket (its welcome said it):
|
|
12
|
+
* given, the claimed key is not read at all.
|
|
13
|
+
*/
|
|
14
|
+
export function presenceFrom(told, seat, now = new Date(), participant) {
|
|
15
|
+
const { participant: claimed, kind: _kind, name: claimedName, onBehalfOf: _for, onBehalfOfName: _forName, until: _until, at: _at, ...said } = told;
|
|
16
|
+
// The session is what follows the seat's own `kind:id:` — an id may hold a colon (`shopper:bethan`).
|
|
17
|
+
const own = `${seat.kind}:${seat.id ?? ""}:`;
|
|
18
|
+
const session = claimed.startsWith(own) ? claimed.slice(own.length) : (claimed.split(":").at(-1) ?? "");
|
|
19
|
+
const key = participant ?? (seat.id ? participantKey({ kind: seat.kind, id: seat.id, session }) : claimed);
|
|
20
|
+
const name = seat.name ?? claimedName;
|
|
21
|
+
return { ...said, participant: key, kind: seat.kind, ...(name ? { name } : {}), ...forWhom(seat), at: now.toISOString() };
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A VISITOR WITHOUT A SOCKET, as a host announces it (FR-47): an agent
|
|
25
|
+
* acting over MCP or an RPC, a polling tab. Built from the author the host
|
|
26
|
+
* already trusts — what it is, what it is called, for whom — keyed
|
|
27
|
+
* `kind:id:visit` unless a session is given, so every call by one agent
|
|
28
|
+
* refreshes one figure rather than adding another.
|
|
29
|
+
*/
|
|
30
|
+
export function visitorPresence(author, options = {}) {
|
|
31
|
+
const name = author.name ?? author.id;
|
|
32
|
+
return {
|
|
33
|
+
participant: participantKey({ kind: author.kind, ...(author.id ? { id: author.id } : {}), session: options.session ?? author.session ?? "visit" }),
|
|
34
|
+
kind: author.kind,
|
|
35
|
+
...(name ? { name } : {}),
|
|
36
|
+
...forWhom(author),
|
|
37
|
+
hue: options.hue ?? hueFor(author.id ?? author.kind),
|
|
38
|
+
stop: options.stop ?? "",
|
|
39
|
+
...(options.over !== undefined ? { over: options.over } : {}),
|
|
40
|
+
at: (options.now ?? new Date()).toISOString(),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* WHO IS HERE, WITH ONE MORE (FR-47) — for a host that holds `who` itself,
|
|
45
|
+
* as a hibernating one does. The visitor is stamped now and stands until
|
|
46
|
+
* `ttlMs` from now; the same participant announced again replaces it, and
|
|
47
|
+
* anybody whose announced time has passed is dropped. Pure: keep what it
|
|
48
|
+
* answers, and hand it to `receive` and `tell`.
|
|
49
|
+
*/
|
|
50
|
+
export function announcePresence(who, presence, ttlMs = VISITOR_PRESENCE_TTL_MS, now = Date.now()) {
|
|
51
|
+
const stamped = { ...presence, at: new Date(now).toISOString(), until: new Date(now + ttlMs).toISOString() };
|
|
52
|
+
return [...who.filter((one) => one.participant !== presence.participant && (one.until === undefined || now < Date.parse(one.until))), stamped];
|
|
53
|
+
}
|
|
54
|
+
/** A key for a socket that has not said one, minted by the server: the welcome tells the client what it is. */
|
|
55
|
+
const mintSession = () => globalThis.crypto.randomUUID().slice(0, 8);
|
|
56
|
+
/**
|
|
57
|
+
* WHO IS HERE, AS ONE SEAT MAY BE TOLD (FR-02). Somebody whose own record
|
|
58
|
+
* the seat may not see is not shown to it at all; anybody else is, without
|
|
59
|
+
* where they stand or what they hover when that names a record the seat
|
|
60
|
+
* may not see. A participant whose id is no record is shown as they are.
|
|
61
|
+
*/
|
|
62
|
+
export function presenceSeenBy(who, sees) {
|
|
63
|
+
const names = (value) => value.split(/[/?#=&,;]/).every((part) => part === "" || sees(decodeURIComponent(part)));
|
|
64
|
+
return who
|
|
65
|
+
.filter((presence) => {
|
|
66
|
+
// `kind:id:session`, and an id may hold a colon of its own: every reading of it must be one the seat sees.
|
|
67
|
+
const parts = presence.participant.split(":");
|
|
68
|
+
return parts.slice(2).every((_, at) => sees(parts.slice(1, at + 2).join(":")));
|
|
69
|
+
})
|
|
70
|
+
.map((presence) => {
|
|
71
|
+
// An agent is shown; for whom it acts is not, to a seat that may not see that person (FR-47).
|
|
72
|
+
const { onBehalfOf, onBehalfOfName, ...rest } = presence;
|
|
73
|
+
const forWhom = onBehalfOf !== undefined && sees(onBehalfOf) ? { onBehalfOf, ...(onBehalfOfName !== undefined ? { onBehalfOfName } : {}) } : {};
|
|
74
|
+
return {
|
|
75
|
+
...rest,
|
|
76
|
+
...forWhom,
|
|
77
|
+
stop: names(presence.stop) ? presence.stop : "",
|
|
78
|
+
...(typeof presence.over === "string" && !sees(presence.over) ? { over: null } : {}),
|
|
79
|
+
...(presence.robot?.at && !sees(presence.robot.at) ? { robot: { ...presence.robot, at: null } } : {}),
|
|
80
|
+
};
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
export function wireOf(store) {
|
|
84
|
+
const sighted = (principal) => hidesFrom(store, principal);
|
|
85
|
+
const shown = (principal, ops) => (sighted(principal) ? redact(ops, seesId(store, principal)) : [...ops]);
|
|
86
|
+
/*
|
|
87
|
+
* EVERY FIELD'S REVISION (FR-05): the seq of the op that last wrote it,
|
|
88
|
+
* read off the log once and caught up from wherever the log has grown
|
|
89
|
+
* to since — no subscription, so nothing here goes stale while a host
|
|
90
|
+
* sleeps, and a host that made this again reads the same revisions.
|
|
91
|
+
*/
|
|
92
|
+
const revisions = FieldRevisions.of(store.log.all());
|
|
93
|
+
let noted = store.log.length;
|
|
94
|
+
const current = () => {
|
|
95
|
+
if (store.log.length > noted) {
|
|
96
|
+
revisions.note(store.log.opsFrom(noted));
|
|
97
|
+
noted = store.log.length;
|
|
98
|
+
}
|
|
99
|
+
return revisions;
|
|
100
|
+
};
|
|
101
|
+
return {
|
|
102
|
+
store,
|
|
103
|
+
lastSeq: () => store.log.length - 1,
|
|
104
|
+
sighted,
|
|
105
|
+
shown,
|
|
106
|
+
since: (principal, seq) => shown(principal, store.log.opsFrom(Math.max(0, Math.floor(seq) + 1))),
|
|
107
|
+
seenFor: (principal) => seenBy(store, principal),
|
|
108
|
+
whoFor: (principal, who) => {
|
|
109
|
+
// A visitor whose announced time has passed is never told of, though a host may still hold it.
|
|
110
|
+
const now = Date.now();
|
|
111
|
+
const standing = who.filter((presence) => presence.until === undefined || now < Date.parse(presence.until));
|
|
112
|
+
return sighted(principal) ? presenceSeenBy(standing, seesId(store, principal)) : standing;
|
|
113
|
+
},
|
|
114
|
+
answered: (batch) => (typeof batch === "string" && batch.length > 0 ? store.log.all().filter((op) => op.batch === batch) : []),
|
|
115
|
+
horizonOf: () => (store.log.horizon > 0 ? { horizon: store.log.horizon } : {}),
|
|
116
|
+
enabledModules: () => [...store.modules.enabled].sort(),
|
|
117
|
+
conflictsOf(author, calls, base) {
|
|
118
|
+
if (!Array.isArray(base) || base.length === 0)
|
|
119
|
+
return [];
|
|
120
|
+
const sees = sighted(author) ? seesId(store, author) : () => true;
|
|
121
|
+
// A record the seat may not see is not there to have moved: the call itself is refused for naming it.
|
|
122
|
+
const claimed = base.filter((entry) => entry && typeof entry.node === "string" && typeof entry.field === "string" && typeof entry.rev === "number" && sees(entry.node));
|
|
123
|
+
const revs = current();
|
|
124
|
+
const stale = revs.stale(claimed);
|
|
125
|
+
if (stale.length === 0)
|
|
126
|
+
return [];
|
|
127
|
+
/*
|
|
128
|
+
* A conflict is a choice — keep theirs, or put yours over it — and only
|
|
129
|
+
* a call that could still land offers one. A call the policy refuses,
|
|
130
|
+
* or one that no longer runs on the graph as it is (somebody finished
|
|
131
|
+
* it first), is refused for that, in its own sentence.
|
|
132
|
+
*/
|
|
133
|
+
if (store.policy && calls.some((call) => !store.permits(call, author).ok))
|
|
134
|
+
return [];
|
|
135
|
+
const yours = new Map();
|
|
136
|
+
try {
|
|
137
|
+
for (const primitive of store.previewAll(calls).primitives) {
|
|
138
|
+
if (primitive.op === "patch-node")
|
|
139
|
+
for (const [field, value] of Object.entries(primitive.after))
|
|
140
|
+
yours.set(`${primitive.id}\u0000${field}`, isUnset(value) ? undefined : value);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
catch {
|
|
144
|
+
return [];
|
|
145
|
+
}
|
|
146
|
+
return stale.map((entry) => {
|
|
147
|
+
const rev = revs.of(entry.node, entry.field);
|
|
148
|
+
const wrote = rev >= store.log.horizon ? store.log.opsFrom(rev)[0] : undefined;
|
|
149
|
+
const seen = wrote && sighted(author) ? redact([wrote], sees)[0] : wrote;
|
|
150
|
+
return {
|
|
151
|
+
node: entry.node,
|
|
152
|
+
field: entry.field,
|
|
153
|
+
theirs: store.graph.getNode(entry.node)?.[entry.field],
|
|
154
|
+
yours: yours.get(`${entry.node}\u0000${entry.field}`),
|
|
155
|
+
by: seen?.author.name ?? seen?.author.id ?? "Someone",
|
|
156
|
+
rev,
|
|
157
|
+
saw: entry.rev,
|
|
158
|
+
};
|
|
159
|
+
});
|
|
160
|
+
},
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
const say = (peer, message) => {
|
|
164
|
+
try {
|
|
165
|
+
peer.send(JSON.stringify(message));
|
|
166
|
+
}
|
|
167
|
+
catch {
|
|
168
|
+
// A socket that cannot be written to is closing; its close is what forgets it.
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* THE PROTOCOL OVER A STORE. Cheap to make, and safe to make again on
|
|
173
|
+
* every wake: what it keeps is derived from the store.
|
|
174
|
+
*/
|
|
175
|
+
export function liveProtocol(options) {
|
|
176
|
+
const { store } = options;
|
|
177
|
+
const wire = wireOf(store);
|
|
178
|
+
/** Every op this socket has not been sent, down it now, as its seat sees them. */
|
|
179
|
+
const catchUp = (peer, ops) => {
|
|
180
|
+
if (peer.cursor === undefined)
|
|
181
|
+
return;
|
|
182
|
+
const last = wire.lastSeq();
|
|
183
|
+
if (peer.cursor >= last)
|
|
184
|
+
return;
|
|
185
|
+
const from = peer.cursor + 1;
|
|
186
|
+
// The ops handed in, when they are the whole of what this peer is missing; the log otherwise.
|
|
187
|
+
const after = ops && ops.length > 0 && ops[0].seq <= from && ops.at(-1).seq === last ? ops.filter((op) => op.seq >= from) : store.log.opsFrom(from);
|
|
188
|
+
peer.cursor = last;
|
|
189
|
+
if (after.length > 0)
|
|
190
|
+
say(peer, { t: "ops", seq: last, ops: wire.shown(peer.seat, after) });
|
|
191
|
+
};
|
|
192
|
+
/** A call or an undo from a socket: judged as its seat, exactly as `POST /graview/ops` judges it. */
|
|
193
|
+
const answer = async (peer, message) => {
|
|
194
|
+
const cid = typeof message.cid === "string" ? message.cid : "";
|
|
195
|
+
const author = peer.seat;
|
|
196
|
+
const intent = typeof message.intent === "string" && message.intent.length > 0 ? message.intent : undefined;
|
|
197
|
+
const batch = typeof message.batch === "string" && message.batch.length > 0 ? message.batch : undefined;
|
|
198
|
+
catchUp(peer);
|
|
199
|
+
// A client that lost its socket before the ack sends the call again under the same batch: `answered` says what it made.
|
|
200
|
+
const already = wire.answered(batch);
|
|
201
|
+
if (already.length > 0) {
|
|
202
|
+
say(peer, { t: "ack", cid, seq: already.at(-1).seq, batch: batch, ops: wire.shown(author, already) });
|
|
203
|
+
return { cursor: peer.cursor };
|
|
204
|
+
}
|
|
205
|
+
const calls = message.t === "call" && Array.isArray(message.calls) ? message.calls : [];
|
|
206
|
+
if (message.t === "call") {
|
|
207
|
+
const conflicts = wire.conflictsOf(author, calls, message.base);
|
|
208
|
+
if (conflicts.length > 0) {
|
|
209
|
+
say(peer, { t: "conflict", cid, sentence: conflictSentence(conflicts), conflicts });
|
|
210
|
+
return { cursor: peer.cursor };
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
let result;
|
|
214
|
+
try {
|
|
215
|
+
// The channel is the seat's, as the host said it when the socket opened: a client's own `via` is never read (FR-52).
|
|
216
|
+
const applying = { author, via: peer.via, ...(intent ? { intent } : {}), ...(batch ? { batch } : {}) };
|
|
217
|
+
result = message.t === "undo" ? store.undo(Array.isArray(message.batches) ? message.batches : [], applying) : store.applyAll(calls, applying);
|
|
218
|
+
}
|
|
219
|
+
catch (error) {
|
|
220
|
+
say(peer, { t: "refused", cid, ...refusalOf(error) });
|
|
221
|
+
return { cursor: peer.cursor };
|
|
222
|
+
}
|
|
223
|
+
// Every op before this call's went down this socket before it landed; its own go in the ack.
|
|
224
|
+
peer.cursor = wire.lastSeq();
|
|
225
|
+
const ops = wire.shown(author, result.ops);
|
|
226
|
+
await options.flush?.();
|
|
227
|
+
say(peer, { t: "ack", cid, seq: ops.at(-1)?.seq ?? peer.cursor, batch: result.batch, ops });
|
|
228
|
+
return { cursor: peer.cursor, landed: result.ops };
|
|
229
|
+
};
|
|
230
|
+
return {
|
|
231
|
+
store,
|
|
232
|
+
open: (seat, via) => ({ seat, via }),
|
|
233
|
+
async receive(peer, text, who = []) {
|
|
234
|
+
let message;
|
|
235
|
+
try {
|
|
236
|
+
message = JSON.parse(text);
|
|
237
|
+
}
|
|
238
|
+
catch {
|
|
239
|
+
say(peer, { t: "error", sentence: "A message on the live wire is one JSON object." });
|
|
240
|
+
return peer.cursor !== undefined ? { cursor: peer.cursor } : {};
|
|
241
|
+
}
|
|
242
|
+
const unchanged = () => (peer.cursor !== undefined ? { cursor: peer.cursor } : {});
|
|
243
|
+
if (!message || typeof message !== "object")
|
|
244
|
+
return unchanged();
|
|
245
|
+
switch (message.t) {
|
|
246
|
+
case "hello": {
|
|
247
|
+
/*
|
|
248
|
+
* ANOTHER CODEC, OR A PROTOCOL NO LONGER SERVED (FR-44). Neither is
|
|
249
|
+
* welcomed, and neither has its cursor set, so its calls are
|
|
250
|
+
* refused rather than read as something they are not.
|
|
251
|
+
*/
|
|
252
|
+
if (typeof message.wire === "string" && message.wire !== LIVE_WIRE) {
|
|
253
|
+
say(peer, { t: "error", sentence: `This socket speaks ${LIVE_WIRE}, not ${message.wire}: say hello in ${LIVE_WIRE}, or open the socket the ${message.wire} host serves.` });
|
|
254
|
+
return unchanged();
|
|
255
|
+
}
|
|
256
|
+
const speaks = typeof message.protocol === "number" && Number.isFinite(message.protocol) ? message.protocol : 1;
|
|
257
|
+
if (options.minProtocol !== undefined && speaks < options.minProtocol) {
|
|
258
|
+
delete peer.cursor;
|
|
259
|
+
say(peer, {
|
|
260
|
+
t: "reload",
|
|
261
|
+
reason: `This app was updated: its server no longer speaks protocol ${speaks} of the live wire, only ${options.minProtocol} and later. Reload the page; changes not yet sent are offered again after it.`,
|
|
262
|
+
protocol: options.minProtocol,
|
|
263
|
+
});
|
|
264
|
+
return {};
|
|
265
|
+
}
|
|
266
|
+
if (typeof message.build === "string" && message.build.length > 0)
|
|
267
|
+
peer.build = message.build.slice(0, 64);
|
|
268
|
+
const seq = typeof message.seq === "number" && Number.isFinite(message.seq) ? message.seq : undefined;
|
|
269
|
+
peer.cursor = wire.lastSeq();
|
|
270
|
+
// Its own key, built from the seat, so the client can leave itself out of who is here (FR-47).
|
|
271
|
+
peer.participant ??= participantKey({ kind: peer.seat.kind, ...(peer.seat.id ? { id: peer.seat.id } : {}), session: mintSession() });
|
|
272
|
+
const participant = peer.participant;
|
|
273
|
+
const said = { protocol: WIRE_PROTOCOL, wire: LIVE_WIRE, version: options.version ?? 1, participant, ...(options.build ? { build: options.build } : {}) };
|
|
274
|
+
if (seq === undefined) {
|
|
275
|
+
const seen = wire.seenFor(peer.seat);
|
|
276
|
+
say(peer, {
|
|
277
|
+
t: "welcome",
|
|
278
|
+
...said,
|
|
279
|
+
seq: peer.cursor,
|
|
280
|
+
ops: [],
|
|
281
|
+
state: {
|
|
282
|
+
version: options.version ?? 1,
|
|
283
|
+
snapshot: seen.snapshot(),
|
|
284
|
+
log: seen.log.all(),
|
|
285
|
+
migrated: [...(options.migrated ?? [])],
|
|
286
|
+
enabledModules: wire.enabledModules(),
|
|
287
|
+
...wire.horizonOf(),
|
|
288
|
+
},
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
else {
|
|
292
|
+
say(peer, { t: "welcome", ...said, seq: peer.cursor, ops: wire.since(peer.seat, seq) });
|
|
293
|
+
}
|
|
294
|
+
const others = who.filter((presence) => presence.participant !== peer.participant);
|
|
295
|
+
if (others.length > 0)
|
|
296
|
+
say(peer, { t: "presence", who: wire.whoFor(peer.seat, others) });
|
|
297
|
+
return { cursor: peer.cursor };
|
|
298
|
+
}
|
|
299
|
+
case "call":
|
|
300
|
+
case "undo": {
|
|
301
|
+
const cid = String(message.cid ?? "");
|
|
302
|
+
if (peer.cursor === undefined) {
|
|
303
|
+
say(peer, { t: "refused", cid, reason: "invalid", sentence: "Say hello first: the live wire answers calls once it knows what the client has." });
|
|
304
|
+
return {};
|
|
305
|
+
}
|
|
306
|
+
/*
|
|
307
|
+
* BUSY IS NOT REFUSED (FR-45). A call made after one that was told
|
|
308
|
+
* to wait waits too, whatever the rate says now: the client sends
|
|
309
|
+
* them again in the order it made them, the held one first.
|
|
310
|
+
*/
|
|
311
|
+
const now = Date.now();
|
|
312
|
+
if (peer.held && peer.held.cid !== cid) {
|
|
313
|
+
say(peer, { t: "busy", cid, retryAfter: Math.max(0, peer.held.until - now) });
|
|
314
|
+
return { cursor: peer.cursor };
|
|
315
|
+
}
|
|
316
|
+
const limited = options.limit
|
|
317
|
+
? await options.limit({
|
|
318
|
+
seat: peer.seat,
|
|
319
|
+
via: peer.via,
|
|
320
|
+
t: message.t,
|
|
321
|
+
bytes: bytesOf(text),
|
|
322
|
+
calls: message.t === "call" && Array.isArray(message.calls) ? message.calls : [],
|
|
323
|
+
})
|
|
324
|
+
: undefined;
|
|
325
|
+
if (limited && "refuse" in limited) {
|
|
326
|
+
delete peer.held;
|
|
327
|
+
say(peer, { t: "refused", cid, reason: "limit", sentence: limited.refuse });
|
|
328
|
+
return { cursor: peer.cursor };
|
|
329
|
+
}
|
|
330
|
+
if (limited) {
|
|
331
|
+
const retryAfter = Math.max(0, Math.ceil(limited.retryAfter));
|
|
332
|
+
peer.held = { cid, until: now + retryAfter };
|
|
333
|
+
say(peer, { t: "busy", cid, retryAfter, ...(limited.sentence ? { sentence: limited.sentence } : {}) });
|
|
334
|
+
return { cursor: peer.cursor };
|
|
335
|
+
}
|
|
336
|
+
delete peer.held;
|
|
337
|
+
return answer(peer, message);
|
|
338
|
+
}
|
|
339
|
+
case "here": {
|
|
340
|
+
const told = message.presence;
|
|
341
|
+
if (!told || typeof told.participant !== "string" || typeof told.stop !== "string") {
|
|
342
|
+
say(peer, { t: "error", sentence: "A presence is a participant and a stop." });
|
|
343
|
+
return unchanged();
|
|
344
|
+
}
|
|
345
|
+
const presence = presenceFrom(told, peer.seat, new Date(), peer.participant);
|
|
346
|
+
peer.participant = presence.participant;
|
|
347
|
+
return { ...unchanged(), presence };
|
|
348
|
+
}
|
|
349
|
+
case "bye":
|
|
350
|
+
if (!peer.participant)
|
|
351
|
+
return unchanged();
|
|
352
|
+
delete peer.participant;
|
|
353
|
+
return { ...unchanged(), presence: null };
|
|
354
|
+
default:
|
|
355
|
+
// A message this server does not know is ignored, never refused (docs/stability.md).
|
|
356
|
+
return unchanged();
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
publish(ops, peers) {
|
|
360
|
+
for (const peer of peers)
|
|
361
|
+
catchUp(peer, ops);
|
|
362
|
+
},
|
|
363
|
+
tell(who, peers) {
|
|
364
|
+
for (const peer of peers) {
|
|
365
|
+
if (peer.cursor === undefined)
|
|
366
|
+
continue;
|
|
367
|
+
say(peer, { t: "presence", who: wire.whoFor(peer.seat, who.filter((presence) => presence.participant !== peer.participant)) });
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
declared(peers) {
|
|
371
|
+
for (const peer of peers) {
|
|
372
|
+
if (peer.cursor === undefined)
|
|
373
|
+
continue;
|
|
374
|
+
delete peer.cursor;
|
|
375
|
+
say(peer, { t: "declaration", version: options.version ?? 1 });
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
//# sourceMappingURL=live-protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"live-protocol.js","sourceRoot":"","sources":["../src/live-protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,SAAS,EACT,MAAM,EACN,OAAO,EACP,cAAc,EACd,MAAM,EACN,MAAM,EACN,MAAM,E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