@graview/ship 0.1.0 → 0.1.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.
- package/README.md +54 -6
- 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 +162 -0
- package/dist/handler.d.ts.map +1 -0
- package/dist/handler.js +585 -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 +12 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/live.d.ts +150 -0
- package/dist/live.d.ts.map +1 -0
- package/dist/live.js +44 -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 +93 -12
- package/dist/remote.d.ts.map +1 -1
- package/dist/remote.js +446 -76
- package/dist/remote.js.map +1 -1
- package/dist/runtime.d.ts +32 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +21 -0
- package/dist/runtime.js.map +1 -0
- package/dist/seat-headers.d.ts +20 -0
- package/dist/seat-headers.d.ts.map +1 -0
- package/dist/seat-headers.js +20 -0
- package/dist/seat-headers.js.map +1 -0
- package/dist/serve.d.ts +15 -107
- package/dist/serve.d.ts.map +1 -1
- package/dist/serve.js +82 -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 +155 -0
- package/dist/websocket.js.map +1 -0
- package/package.json +6 -2
package/dist/handler.js
ADDED
|
@@ -0,0 +1,585 @@
|
|
|
1
|
+
import { FieldRevisions, foldPresence, hidesFrom, isUnset, participantKey, WIRE_PROTOCOL, PRESENCE_TTL_MS, redact, seenBy, seesId, } from "@graview/core";
|
|
2
|
+
import { exportBundle } from "./export.js";
|
|
3
|
+
import { health } from "./health.js";
|
|
4
|
+
import { conflictSentence, LIVE_PATH } from "./live.js";
|
|
5
|
+
import { openStore } from "./open-store.js";
|
|
6
|
+
import { SEAT_HEADERS } from "./seat-headers.js";
|
|
7
|
+
/**
|
|
8
|
+
* THE STORE, BEHIND ANY RUNTIME'S FETCH — and the op log is the wire (FR-09).
|
|
9
|
+
*
|
|
10
|
+
* Every route is one function from a `Request` to a `Response`, which is
|
|
11
|
+
* what a Cloudflare Worker, a Durable Object, Deno, Bun and a service worker
|
|
12
|
+
* all call a handler. `serveStore` is a thin `node:http` wrapper around it;
|
|
13
|
+
* nothing in this module reaches a `node:` builtin, so a host that runs
|
|
14
|
+
* somewhere other than Node serves the same wire without a fork.
|
|
15
|
+
*
|
|
16
|
+
* What is deliberately NOT here: a second way to change the graph. A client
|
|
17
|
+
* sends CALLS, not primitives; the handler applies them through an ordinary
|
|
18
|
+
* `Store` under the principal the request carries, so the policy judges
|
|
19
|
+
* them exactly as it judges them in a browser, the invariants run, and the
|
|
20
|
+
* op that comes back is the same shape the browser would have made. A
|
|
21
|
+
* client that could post primitives would be a client that could write past
|
|
22
|
+
* every rule the app declares.
|
|
23
|
+
*
|
|
24
|
+
* The protocol is four routes:
|
|
25
|
+
*
|
|
26
|
+
* GET /graview/state the graph, the log, the stored version and the modules on
|
|
27
|
+
* POST /graview/ops calls in, the ops they produced out — or `undo`, batches to take back
|
|
28
|
+
* GET /graview/since?seq=N the ops appended after N — everyone else's
|
|
29
|
+
* GET /graview/health ship's own report, plus where the data is
|
|
30
|
+
*
|
|
31
|
+
* And three for WHO IS HERE, which is not the op log and never touches it:
|
|
32
|
+
*
|
|
33
|
+
* POST /graview/here say where you are; answers with who else is, and the ops since `seq`
|
|
34
|
+
* GET /graview/who who is here right now
|
|
35
|
+
* POST /graview/leave say you have gone
|
|
36
|
+
*
|
|
37
|
+
* Presence lives in a map inside this closure with a time to live — not in
|
|
38
|
+
* the store, not in the adapter, not in the log. A tab that dies without a
|
|
39
|
+
* word is gone after three missed heartbeats.
|
|
40
|
+
*
|
|
41
|
+
* Polling is the floor, on purpose: a poll is a thing a person can
|
|
42
|
+
* reproduce with `curl`, and a thing every runtime can answer. Beside it,
|
|
43
|
+
* `connect` serves the live wire (FR-05, `./live.ts`) to whatever socket a
|
|
44
|
+
* host hands it, and `GET /graview/live` names it on the wire.
|
|
45
|
+
*/
|
|
46
|
+
/**
|
|
47
|
+
* THE WIRE, AS A CONTRACT. Every route the handler answers, in one place a
|
|
48
|
+
* test pins and a README repeats: what a host in front of this — Graview
|
|
49
|
+
* Cloud, or anybody's — must keep answering for `openRemote`, `graview mcp
|
|
50
|
+
* --remote-url` and `graview apply --remote-url` to work unchanged. What a
|
|
51
|
+
* host adds (who a bearer token is, which tenant, how much) goes in
|
|
52
|
+
* `seatOf` and around these routes, never inside them.
|
|
53
|
+
*/
|
|
54
|
+
export const WIRE = [
|
|
55
|
+
{ method: "GET", path: "/graview/state", says: "the graph, the log, the stored version and the modules on" },
|
|
56
|
+
{ method: "POST", path: "/graview/ops", says: "calls in, the ops they produced out — or `undo`, batches to take back; 409 with the policy's sentence when refused" },
|
|
57
|
+
{ method: "GET", path: "/graview/since", says: "the ops appended after ?seq=N — everyone else's" },
|
|
58
|
+
{ method: "GET", path: "/graview/health", says: "ship's own report, plus where the data is" },
|
|
59
|
+
{ method: "GET", path: "/graview/export", says: "the whole store as one bundle, the way out" },
|
|
60
|
+
{ method: "POST", path: "/graview/here", says: "say where you are; answers with who else is, and the ops since `seq`" },
|
|
61
|
+
{ method: "GET", path: "/graview/who", says: "who is here right now" },
|
|
62
|
+
{ method: "POST", path: "/graview/leave", says: "say you have gone" },
|
|
63
|
+
{ method: "GET", path: LIVE_PATH, says: "the live wire: a WebSocket of hello/welcome, call/undo/ack/refused/conflict, ops and presence; 426 to a plain request" },
|
|
64
|
+
];
|
|
65
|
+
export { SEAT_HEADERS };
|
|
66
|
+
const KINDS = new Set(["human", "agent", "rule", "system"]);
|
|
67
|
+
const list = (value) => (value ? value.split(",").filter(Boolean) : undefined);
|
|
68
|
+
const decoded = (value) => (value ? decodeURIComponent(value) : undefined);
|
|
69
|
+
/** A seat read from a request's headers — only ever when the host trusts them. */
|
|
70
|
+
export function seatFromHeaders(request) {
|
|
71
|
+
const header = (name) => request.headers.get(name);
|
|
72
|
+
const id = header(SEAT_HEADERS.seat);
|
|
73
|
+
const roles = list(header(SEAT_HEADERS.roles));
|
|
74
|
+
const kind = header(SEAT_HEADERS.kind);
|
|
75
|
+
const name = decoded(header(SEAT_HEADERS.name));
|
|
76
|
+
const forId = header(SEAT_HEADERS.for);
|
|
77
|
+
const forRoles = list(header(SEAT_HEADERS.forRoles));
|
|
78
|
+
const forName = decoded(header(SEAT_HEADERS.forName));
|
|
79
|
+
return {
|
|
80
|
+
kind: (kind && KINDS.has(kind) ? kind : "human"),
|
|
81
|
+
...(id ? { id } : {}),
|
|
82
|
+
...(roles ? { roles } : {}),
|
|
83
|
+
...(name ? { name } : {}),
|
|
84
|
+
...(forId ? { onBehalfOf: { kind: "human", id: forId, ...(forRoles ? { roles: forRoles } : {}), ...(forName ? { name: forName } : {}) } } : {}),
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* WHO IS HERE, AS ONE SEAT MAY BE TOLD (FR-02). Somebody whose own record
|
|
89
|
+
* the seat may not see is not shown to it at all; anybody else is, without
|
|
90
|
+
* where they stand or what they hover when that names a record the seat
|
|
91
|
+
* may not see. A participant whose id is no record is shown as they are.
|
|
92
|
+
*/
|
|
93
|
+
export function presenceSeenBy(who, sees) {
|
|
94
|
+
const names = (value) => value.split(/[/?#=&,;]/).every((part) => part === "" || sees(decodeURIComponent(part)));
|
|
95
|
+
return who
|
|
96
|
+
.filter((presence) => {
|
|
97
|
+
// `kind:id:session`, and an id may hold a colon of its own: every reading of it must be one the seat sees.
|
|
98
|
+
const parts = presence.participant.split(":");
|
|
99
|
+
return parts.slice(2).every((_, at) => sees(parts.slice(1, at + 2).join(":")));
|
|
100
|
+
})
|
|
101
|
+
.map((presence) => ({
|
|
102
|
+
...presence,
|
|
103
|
+
stop: names(presence.stop) ? presence.stop : "",
|
|
104
|
+
...(typeof presence.over === "string" && !sees(presence.over) ? { over: null } : {}),
|
|
105
|
+
...(presence.robot?.at && !sees(presence.robot.at) ? { robot: { ...presence.robot, at: null } } : {}),
|
|
106
|
+
}));
|
|
107
|
+
}
|
|
108
|
+
/** A browser on another origin is the ordinary case for an embed. */
|
|
109
|
+
const CORS = {
|
|
110
|
+
"access-control-allow-origin": "*",
|
|
111
|
+
"access-control-allow-headers": ["content-type", "authorization", ...Object.values(SEAT_HEADERS)].join(", "),
|
|
112
|
+
"access-control-allow-methods": "GET, POST, OPTIONS",
|
|
113
|
+
};
|
|
114
|
+
function send(status, body) {
|
|
115
|
+
return new Response(JSON.stringify(body), { status, headers: { ...CORS, "content-type": "application/json" } });
|
|
116
|
+
}
|
|
117
|
+
async function read(request) {
|
|
118
|
+
const text = await request.text();
|
|
119
|
+
return text.length === 0 ? {} : JSON.parse(text);
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Open the store and answer the wire for it. The migration runs HERE, once,
|
|
123
|
+
* against the stored graph — which is the whole reason a server is the
|
|
124
|
+
* honest place for it. A browser that migrates its own copy migrates it once
|
|
125
|
+
* per browser; a server that migrates the roster migrates the roster.
|
|
126
|
+
*/
|
|
127
|
+
export async function createStoreHandler(options) {
|
|
128
|
+
const scope = options.scope ?? options.app.name;
|
|
129
|
+
const seatOf = options.seatOf ?? (options.trustSeatHeaders ? seatFromHeaders : undefined);
|
|
130
|
+
const opened = await openStore({
|
|
131
|
+
app: options.app,
|
|
132
|
+
adapter: options.adapter,
|
|
133
|
+
scope,
|
|
134
|
+
...(options.seed ? { seed: options.seed } : {}),
|
|
135
|
+
...(options.enabledModules ? { enabledModules: options.enabledModules } : {}),
|
|
136
|
+
});
|
|
137
|
+
const store = opened.store;
|
|
138
|
+
/** Which modules are on, as the state says it (FR-12). */
|
|
139
|
+
const enabledModules = () => [...store.modules.enabled].sort();
|
|
140
|
+
/*
|
|
141
|
+
* WHO IS HERE. Keyed by participant, named by the seat the request
|
|
142
|
+
* carries — a poster cannot claim to be somebody else's seat — and
|
|
143
|
+
* stamped with the handler's clock, so expiry does not depend on two
|
|
144
|
+
* browsers agreeing what time it is.
|
|
145
|
+
*/
|
|
146
|
+
const ttl = options.presenceTtlMs ?? PRESENCE_TTL_MS;
|
|
147
|
+
let here = new Map();
|
|
148
|
+
const alive = () => {
|
|
149
|
+
here = foldPresence(here, [], Date.now(), ttl);
|
|
150
|
+
return [...here.values()];
|
|
151
|
+
};
|
|
152
|
+
const arrive = (told, seat) => {
|
|
153
|
+
// The session is what follows the seat's own `kind:id:` — an id may hold a colon (`shopper:bethan`).
|
|
154
|
+
const own = `${seat.kind}:${seat.id ?? ""}:`;
|
|
155
|
+
const session = told.participant.startsWith(own) ? told.participant.slice(own.length) : (told.participant.split(":").at(-1) ?? "");
|
|
156
|
+
const participant = seat.id ? participantKey({ kind: seat.kind, id: seat.id, session }) : told.participant;
|
|
157
|
+
const presence = { ...told, participant, at: new Date().toISOString() };
|
|
158
|
+
here = foldPresence(here, [presence], Date.now(), ttl);
|
|
159
|
+
return presence;
|
|
160
|
+
};
|
|
161
|
+
/*
|
|
162
|
+
* WHAT A SEAT MAY SEE NEVER LEAVES THE STORE (FR-02). Every read below is
|
|
163
|
+
* of the store as the asking seat sees it: its graph without what the
|
|
164
|
+
* policy keeps from it, and its log with every op in its place and the
|
|
165
|
+
* ones that touched what it may not see withheld (FR-16).
|
|
166
|
+
*/
|
|
167
|
+
const seenFor = (principal) => seenBy(store, principal);
|
|
168
|
+
// Kept from a seat: what its sight does not reach (FR-02), and the kinds of a module that is off (FR-12).
|
|
169
|
+
const sighted = (principal) => hidesFrom(store, principal);
|
|
170
|
+
/*
|
|
171
|
+
* The ops after `seq`, as the seat sees them: the same ops `seenBy`'s log
|
|
172
|
+
* holds after it (each op is withheld or not on its own), without
|
|
173
|
+
* redacting the whole log for every push down every socket.
|
|
174
|
+
*/
|
|
175
|
+
const since = (principal, seq) => {
|
|
176
|
+
const after = store.log.opsFrom(Math.max(0, Math.floor(seq) + 1));
|
|
177
|
+
return sighted(principal) ? redact(after, seesId(store, principal)) : [...after];
|
|
178
|
+
};
|
|
179
|
+
const lastSeq = () => store.log.length - 1;
|
|
180
|
+
/*
|
|
181
|
+
* WHERE THE LOG BEGINS, when it was compacted behind an undo horizon
|
|
182
|
+
* (FR-23): a client hydrating on the state is handed the tail, and its
|
|
183
|
+
* log begins where the server's does. Said only when it is past 0, so a
|
|
184
|
+
* store that was never compacted answers exactly as before.
|
|
185
|
+
*/
|
|
186
|
+
const horizonOf = () => (store.log.horizon > 0 ? { horizon: store.log.horizon } : {});
|
|
187
|
+
/*
|
|
188
|
+
* EVERY FIELD'S REVISION (FR-05): the seq of the op that last wrote it,
|
|
189
|
+
* read off the log once and kept current as ops land. A call that says
|
|
190
|
+
* it saw an older one is a stale write, refused by name.
|
|
191
|
+
*/
|
|
192
|
+
const revisions = FieldRevisions.of(store.log.all());
|
|
193
|
+
const conflictsOf = (author, calls, base) => {
|
|
194
|
+
if (!Array.isArray(base) || base.length === 0)
|
|
195
|
+
return [];
|
|
196
|
+
const sees = sighted(author) ? seesId(store, author) : () => true;
|
|
197
|
+
// A record the seat may not see is not there to have moved: the call itself is refused for naming it.
|
|
198
|
+
const claimed = base.filter((entry) => entry && typeof entry.node === "string" && typeof entry.field === "string" && typeof entry.rev === "number" && sees(entry.node));
|
|
199
|
+
const stale = revisions.stale(claimed);
|
|
200
|
+
if (stale.length === 0)
|
|
201
|
+
return [];
|
|
202
|
+
/*
|
|
203
|
+
* A conflict is a choice — keep theirs, or put yours over it — and only
|
|
204
|
+
* a call that could still land offers one. A call the policy refuses,
|
|
205
|
+
* or one that no longer runs on the graph as it is (somebody finished
|
|
206
|
+
* it first), is refused for that, in its own sentence.
|
|
207
|
+
*/
|
|
208
|
+
if (store.policy && calls.some((call) => !store.permits(call, author).ok))
|
|
209
|
+
return [];
|
|
210
|
+
const yours = new Map();
|
|
211
|
+
try {
|
|
212
|
+
for (const primitive of store.previewAll(calls).primitives) {
|
|
213
|
+
if (primitive.op === "patch-node")
|
|
214
|
+
for (const [field, value] of Object.entries(primitive.after))
|
|
215
|
+
yours.set(`${primitive.id}\u0000${field}`, isUnset(value) ? undefined : value);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
catch {
|
|
219
|
+
return [];
|
|
220
|
+
}
|
|
221
|
+
return stale.map((entry) => {
|
|
222
|
+
const rev = revisions.of(entry.node, entry.field);
|
|
223
|
+
const wrote = rev >= store.log.horizon ? store.log.opsFrom(rev)[0] : undefined;
|
|
224
|
+
const shown = wrote && sighted(author) ? redact([wrote], sees)[0] : wrote;
|
|
225
|
+
return {
|
|
226
|
+
node: entry.node,
|
|
227
|
+
field: entry.field,
|
|
228
|
+
theirs: store.graph.getNode(entry.node)?.[entry.field],
|
|
229
|
+
yours: yours.get(`${entry.node}\u0000${entry.field}`),
|
|
230
|
+
by: shown?.author.name ?? shown?.author.id ?? "Someone",
|
|
231
|
+
rev,
|
|
232
|
+
saw: entry.rev,
|
|
233
|
+
};
|
|
234
|
+
});
|
|
235
|
+
};
|
|
236
|
+
const whoFor = (principal, who) => (sighted(principal) ? presenceSeenBy(who, seesId(store, principal)) : [...who]);
|
|
237
|
+
async function route(request) {
|
|
238
|
+
if (request.method === "OPTIONS")
|
|
239
|
+
return new Response(null, { status: 204, headers: CORS });
|
|
240
|
+
const url = new URL(request.url, "http://localhost");
|
|
241
|
+
/*
|
|
242
|
+
* WHO IS ASKING, OR NOTHING. Health is the only route a stranger gets:
|
|
243
|
+
* it says whether the store is well, not what is in it.
|
|
244
|
+
*/
|
|
245
|
+
if (!seatOf && url.pathname !== "/graview/health") {
|
|
246
|
+
return send(401, {
|
|
247
|
+
error: "This store cannot tell who is asking: the host gives serveStore a seatOf, or trusts the seat headers (trustSeatHeaders) on a server only it can reach.",
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
const seat = async () => seatOf(request);
|
|
251
|
+
if (url.pathname === LIVE_PATH) {
|
|
252
|
+
return send(426, { error: `${LIVE_PATH} is a WebSocket: open one, say hello, and the store's ops come to you. A plain request polls /graview/since instead.` });
|
|
253
|
+
}
|
|
254
|
+
if (url.pathname === "/graview/state") {
|
|
255
|
+
const seen = seenFor(await seat());
|
|
256
|
+
return send(200, {
|
|
257
|
+
version: options.app.version ?? 1,
|
|
258
|
+
snapshot: seen.snapshot(),
|
|
259
|
+
log: seen.log.all(),
|
|
260
|
+
migrated: opened.migrated.map((op) => op.intent),
|
|
261
|
+
enabledModules: enabledModules(),
|
|
262
|
+
...horizonOf(),
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
if (url.pathname === "/graview/since") {
|
|
266
|
+
const seq = Number(url.searchParams.get("seq") ?? "-1");
|
|
267
|
+
return send(200, { ops: since(await seat(), seq) });
|
|
268
|
+
}
|
|
269
|
+
if (url.pathname === "/graview/who")
|
|
270
|
+
return send(200, { who: whoFor(await seat(), alive()) });
|
|
271
|
+
if (url.pathname === "/graview/here" && request.method === "POST") {
|
|
272
|
+
const body = (await read(request));
|
|
273
|
+
if (!body.presence || typeof body.presence.participant !== "string" || typeof body.presence.stop !== "string") {
|
|
274
|
+
return send(400, { error: "A presence is a participant and a stop." });
|
|
275
|
+
}
|
|
276
|
+
const asking = await seat();
|
|
277
|
+
const mine = arrive(body.presence, asking);
|
|
278
|
+
tellWhoIsHere();
|
|
279
|
+
// Folded into the poll: the heartbeat carries back everybody else AND
|
|
280
|
+
// the ops since, so being here costs no round trip of its own.
|
|
281
|
+
return send(200, {
|
|
282
|
+
who: whoFor(asking, alive().filter((presence) => presence.participant !== mine.participant)),
|
|
283
|
+
...(typeof body.seq === "number" ? { ops: since(asking, body.seq) } : {}),
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
if (url.pathname === "/graview/leave" && request.method === "POST") {
|
|
287
|
+
const body = (await read(request));
|
|
288
|
+
if (typeof body.participant === "string") {
|
|
289
|
+
here = new Map(here);
|
|
290
|
+
here.delete(body.participant);
|
|
291
|
+
tellWhoIsHere();
|
|
292
|
+
}
|
|
293
|
+
return send(200, { who: whoFor(await seat(), alive()) });
|
|
294
|
+
}
|
|
295
|
+
if (url.pathname === "/graview/health") {
|
|
296
|
+
return send(200, {
|
|
297
|
+
...health(store, options.app),
|
|
298
|
+
// Said by the adapter where it knows, because it is the only thing
|
|
299
|
+
// that does; `where` is for a caller with a better name for it.
|
|
300
|
+
where: options.where ?? options.adapter.root ?? scope,
|
|
301
|
+
adapter: options.adapter.name,
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
if (url.pathname === "/graview/export")
|
|
305
|
+
return send(200, exportBundle(options.app, seenFor(await seat())));
|
|
306
|
+
if (url.pathname === "/graview/ops" && request.method === "POST") {
|
|
307
|
+
const body = (await read(request));
|
|
308
|
+
const calls = body.calls ?? [];
|
|
309
|
+
const author = await seat();
|
|
310
|
+
const via = typeof body.via === "string" && body.via.length > 0 ? body.via : "api";
|
|
311
|
+
/*
|
|
312
|
+
* A STALE WRITE IS A CONFLICT, NOT A LOSS (FR-05). A field that moved
|
|
313
|
+
* since the caller read it is refused by name — theirs and yours —
|
|
314
|
+
* and nothing is written: what to do about it is the person's call.
|
|
315
|
+
*/
|
|
316
|
+
const conflicts = body.undo ? [] : conflictsOf(author, calls, body.base);
|
|
317
|
+
if (conflicts.length > 0)
|
|
318
|
+
return send(409, { error: conflictSentence(conflicts), refused: true, conflict: true, conflicts });
|
|
319
|
+
try {
|
|
320
|
+
/*
|
|
321
|
+
* Through the STORE, under the requester's own seat. The policy
|
|
322
|
+
* refuses here exactly what it refuses in the browser — and the
|
|
323
|
+
* refusal comes back with the policy's own sentence rather than a
|
|
324
|
+
* bare 403, because that sentence is the product.
|
|
325
|
+
*/
|
|
326
|
+
const result = body.undo
|
|
327
|
+
? store.undo(body.undo, { author, via, ...(body.intent ? { intent: body.intent } : {}), ...(body.batch ? { batch: body.batch } : {}) })
|
|
328
|
+
: store.applyAll(calls, {
|
|
329
|
+
author,
|
|
330
|
+
via,
|
|
331
|
+
...(body.intent ? { intent: body.intent } : {}),
|
|
332
|
+
...(body.batch ? { batch: body.batch } : {}),
|
|
333
|
+
});
|
|
334
|
+
await opened.flush();
|
|
335
|
+
// An act may make what its own seat may not see: that op goes back withheld, as it would on a poll.
|
|
336
|
+
const ops = sighted(author) ? redact(result.ops, seesId(store, author)) : result.ops;
|
|
337
|
+
return send(200, { ops, batch: result.batch });
|
|
338
|
+
}
|
|
339
|
+
catch (error) {
|
|
340
|
+
return send(409, { error: error instanceof Error ? error.message : String(error), refused: true });
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
return send(404, { error: `Nothing at ${url.pathname}` });
|
|
344
|
+
}
|
|
345
|
+
const sockets = new Set();
|
|
346
|
+
const say = (live, message) => {
|
|
347
|
+
if (!live.open)
|
|
348
|
+
return;
|
|
349
|
+
try {
|
|
350
|
+
live.socket.send(JSON.stringify(message));
|
|
351
|
+
}
|
|
352
|
+
catch {
|
|
353
|
+
// A socket that cannot be written to is closing; its close is what forgets it.
|
|
354
|
+
}
|
|
355
|
+
};
|
|
356
|
+
const push = (live) => {
|
|
357
|
+
if (live.cursor >= lastSeq())
|
|
358
|
+
return;
|
|
359
|
+
const ops = since(live.seat, live.cursor);
|
|
360
|
+
live.cursor = lastSeq();
|
|
361
|
+
if (ops.length > 0)
|
|
362
|
+
say(live, { t: "ops", seq: live.cursor, ops });
|
|
363
|
+
};
|
|
364
|
+
store.subscribe((_diff, ops) => {
|
|
365
|
+
revisions.note(ops);
|
|
366
|
+
for (const live of sockets)
|
|
367
|
+
if (!live.answering)
|
|
368
|
+
push(live);
|
|
369
|
+
});
|
|
370
|
+
/*
|
|
371
|
+
* A socket's presence stands while the socket does; the TTL is for a
|
|
372
|
+
* poller that went quiet, and a socket that went quiet is closed.
|
|
373
|
+
*/
|
|
374
|
+
const standing = () => {
|
|
375
|
+
const now = new Date().toISOString();
|
|
376
|
+
const held = [];
|
|
377
|
+
for (const live of sockets) {
|
|
378
|
+
const presence = live.participant ? here.get(live.participant) : undefined;
|
|
379
|
+
if (presence)
|
|
380
|
+
held.push({ ...presence, at: now });
|
|
381
|
+
}
|
|
382
|
+
if (held.length > 0)
|
|
383
|
+
here = foldPresence(here, held, Date.now(), ttl);
|
|
384
|
+
return alive();
|
|
385
|
+
};
|
|
386
|
+
function tellWhoIsHere() {
|
|
387
|
+
if (sockets.size === 0)
|
|
388
|
+
return;
|
|
389
|
+
const who = standing();
|
|
390
|
+
for (const live of sockets)
|
|
391
|
+
say(live, { t: "presence", who: whoFor(live.seat, who.filter((presence) => presence.participant !== live.participant)) });
|
|
392
|
+
}
|
|
393
|
+
/** A call or an undo from a socket: judged as its seat, exactly as `POST /graview/ops` judges it. */
|
|
394
|
+
const answer = async (live, message) => {
|
|
395
|
+
const cid = typeof message.cid === "string" ? message.cid : "";
|
|
396
|
+
const author = live.seat;
|
|
397
|
+
const via = typeof message.via === "string" && message.via.length > 0 ? message.via : "web";
|
|
398
|
+
const intent = typeof message.intent === "string" && message.intent.length > 0 ? message.intent : undefined;
|
|
399
|
+
const batch = typeof message.batch === "string" && message.batch.length > 0 ? message.batch : undefined;
|
|
400
|
+
const shown = (ops) => (sighted(author) ? redact(ops, seesId(store, author)) : [...ops]);
|
|
401
|
+
push(live);
|
|
402
|
+
/*
|
|
403
|
+
* SENT TWICE, ANSWERED ONCE. A client that lost its socket before the
|
|
404
|
+
* ack sends the call again under the same batch; one already in the
|
|
405
|
+
* log is answered with the ops it made.
|
|
406
|
+
*/
|
|
407
|
+
const already = batch ? store.log.all().filter((op) => op.batch === batch) : [];
|
|
408
|
+
if (already.length > 0) {
|
|
409
|
+
say(live, { t: "ack", cid, seq: already.at(-1).seq, batch: batch, ops: shown(already) });
|
|
410
|
+
return;
|
|
411
|
+
}
|
|
412
|
+
const calls = message.t === "call" && Array.isArray(message.calls) ? message.calls : [];
|
|
413
|
+
if (message.t === "call") {
|
|
414
|
+
const conflicts = conflictsOf(author, calls, message.base);
|
|
415
|
+
if (conflicts.length > 0) {
|
|
416
|
+
say(live, { t: "conflict", cid, sentence: conflictSentence(conflicts), conflicts });
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
let result;
|
|
421
|
+
live.answering = true;
|
|
422
|
+
try {
|
|
423
|
+
const applying = { author, via, ...(intent ? { intent } : {}), ...(batch ? { batch } : {}) };
|
|
424
|
+
result = message.t === "undo" ? store.undo(Array.isArray(message.batches) ? message.batches : [], applying) : store.applyAll(calls, applying);
|
|
425
|
+
}
|
|
426
|
+
catch (error) {
|
|
427
|
+
say(live, { t: "refused", cid, sentence: error instanceof Error ? error.message : String(error) });
|
|
428
|
+
return;
|
|
429
|
+
}
|
|
430
|
+
finally {
|
|
431
|
+
live.answering = false;
|
|
432
|
+
}
|
|
433
|
+
// Every op before this call's went down this socket before it landed; its own go in the ack.
|
|
434
|
+
live.cursor = lastSeq();
|
|
435
|
+
const ops = shown(result.ops);
|
|
436
|
+
await opened.flush();
|
|
437
|
+
say(live, { t: "ack", cid, seq: ops.at(-1)?.seq ?? live.cursor, batch: result.batch, ops });
|
|
438
|
+
};
|
|
439
|
+
/*
|
|
440
|
+
* A page cannot set headers on a WebSocket. A store that trusts the seat
|
|
441
|
+
* headers — loopback only — reads them from the upgrade's query instead,
|
|
442
|
+
* under the same names; one that asks its own `seatOf` is handed the
|
|
443
|
+
* request as it came.
|
|
444
|
+
*/
|
|
445
|
+
const seatRequest = (request) => {
|
|
446
|
+
if (options.seatOf || !options.trustSeatHeaders || request.headers.has(SEAT_HEADERS.seat))
|
|
447
|
+
return request;
|
|
448
|
+
const query = new URL(request.url, "http://localhost").searchParams;
|
|
449
|
+
const headers = new Headers(request.headers);
|
|
450
|
+
let found = false;
|
|
451
|
+
for (const name of Object.values(SEAT_HEADERS)) {
|
|
452
|
+
const value = query.get(name);
|
|
453
|
+
if (value !== null) {
|
|
454
|
+
headers.set(name, value);
|
|
455
|
+
found = true;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
return found ? new Request(request.url, { headers }) : request;
|
|
459
|
+
};
|
|
460
|
+
async function connect(request, socket) {
|
|
461
|
+
if (!seatOf) {
|
|
462
|
+
return send(401, {
|
|
463
|
+
error: "This store cannot tell who is asking: the host gives serveStore a seatOf, or trusts the seat headers (trustSeatHeaders) on a server only it can reach.",
|
|
464
|
+
});
|
|
465
|
+
}
|
|
466
|
+
let seat;
|
|
467
|
+
try {
|
|
468
|
+
seat = await seatOf(seatRequest(request));
|
|
469
|
+
}
|
|
470
|
+
catch (error) {
|
|
471
|
+
return send(401, { error: error instanceof Error ? error.message : String(error) });
|
|
472
|
+
}
|
|
473
|
+
const live = { seat, socket, cursor: Number.POSITIVE_INFINITY, answering: false, open: true };
|
|
474
|
+
const leave = () => {
|
|
475
|
+
if (!live.participant)
|
|
476
|
+
return;
|
|
477
|
+
here = new Map(here);
|
|
478
|
+
here.delete(live.participant);
|
|
479
|
+
delete live.participant;
|
|
480
|
+
tellWhoIsHere();
|
|
481
|
+
};
|
|
482
|
+
const hear = async (text) => {
|
|
483
|
+
let message;
|
|
484
|
+
try {
|
|
485
|
+
message = JSON.parse(text);
|
|
486
|
+
}
|
|
487
|
+
catch {
|
|
488
|
+
say(live, { t: "error", sentence: "A message on the live wire is one JSON object." });
|
|
489
|
+
return;
|
|
490
|
+
}
|
|
491
|
+
if (!message || typeof message !== "object")
|
|
492
|
+
return;
|
|
493
|
+
switch (message.t) {
|
|
494
|
+
case "hello": {
|
|
495
|
+
const seq = typeof message.seq === "number" && Number.isFinite(message.seq) ? message.seq : undefined;
|
|
496
|
+
sockets.add(live);
|
|
497
|
+
live.cursor = lastSeq();
|
|
498
|
+
if (seq === undefined) {
|
|
499
|
+
const seen = seenFor(seat);
|
|
500
|
+
say(live, {
|
|
501
|
+
t: "welcome",
|
|
502
|
+
protocol: WIRE_PROTOCOL,
|
|
503
|
+
seq: live.cursor,
|
|
504
|
+
ops: [],
|
|
505
|
+
state: { version: options.app.version ?? 1, snapshot: seen.snapshot(), log: seen.log.all(), migrated: opened.migrated.map((op) => op.intent), enabledModules: enabledModules(), ...horizonOf() },
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
else {
|
|
509
|
+
say(live, { t: "welcome", protocol: WIRE_PROTOCOL, seq: live.cursor, ops: since(seat, seq) });
|
|
510
|
+
}
|
|
511
|
+
const who = standing().filter((presence) => presence.participant !== live.participant);
|
|
512
|
+
if (who.length > 0)
|
|
513
|
+
say(live, { t: "presence", who: whoFor(seat, who) });
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
case "call":
|
|
517
|
+
case "undo":
|
|
518
|
+
if (!sockets.has(live)) {
|
|
519
|
+
say(live, { t: "refused", cid: String(message.cid ?? ""), sentence: "Say hello first: the live wire answers calls once it knows what the client has." });
|
|
520
|
+
return;
|
|
521
|
+
}
|
|
522
|
+
return answer(live, message);
|
|
523
|
+
case "here": {
|
|
524
|
+
const told = message.presence;
|
|
525
|
+
if (!told || typeof told.participant !== "string" || typeof told.stop !== "string") {
|
|
526
|
+
say(live, { t: "error", sentence: "A presence is a participant and a stop." });
|
|
527
|
+
return;
|
|
528
|
+
}
|
|
529
|
+
live.participant = arrive(told, seat).participant;
|
|
530
|
+
tellWhoIsHere();
|
|
531
|
+
return;
|
|
532
|
+
}
|
|
533
|
+
case "bye":
|
|
534
|
+
leave();
|
|
535
|
+
return;
|
|
536
|
+
default:
|
|
537
|
+
// A message this server does not know is ignored, never refused (docs/stability.md).
|
|
538
|
+
return;
|
|
539
|
+
}
|
|
540
|
+
};
|
|
541
|
+
/*
|
|
542
|
+
* One message at a time, in the order they came: a call waits for the
|
|
543
|
+
* one before it, so an ack never overtakes the push or ack before it.
|
|
544
|
+
*/
|
|
545
|
+
let queue = Promise.resolve();
|
|
546
|
+
return {
|
|
547
|
+
receive(text) {
|
|
548
|
+
queue = queue.then(() => hear(text)).catch(() => { });
|
|
549
|
+
},
|
|
550
|
+
close() {
|
|
551
|
+
live.open = false;
|
|
552
|
+
sockets.delete(live);
|
|
553
|
+
leave();
|
|
554
|
+
},
|
|
555
|
+
};
|
|
556
|
+
}
|
|
557
|
+
return {
|
|
558
|
+
store,
|
|
559
|
+
opened,
|
|
560
|
+
connect,
|
|
561
|
+
handle: async (request) => {
|
|
562
|
+
try {
|
|
563
|
+
return await route(request);
|
|
564
|
+
}
|
|
565
|
+
catch (error) {
|
|
566
|
+
return send(500, { error: error instanceof Error ? error.message : String(error) });
|
|
567
|
+
}
|
|
568
|
+
},
|
|
569
|
+
async close() {
|
|
570
|
+
for (const live of sockets) {
|
|
571
|
+
live.open = false;
|
|
572
|
+
try {
|
|
573
|
+
live.socket.close?.(1001, "The store is closing.");
|
|
574
|
+
}
|
|
575
|
+
catch {
|
|
576
|
+
// Already gone.
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
sockets.clear();
|
|
580
|
+
await opened.flush();
|
|
581
|
+
opened.close();
|
|
582
|
+
},
|
|
583
|
+
};
|
|
584
|
+
}
|
|
585
|
+
//# sourceMappingURL=handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../src/handler.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,YAAY,EACZ,SAAS,EACT,OAAO,EACP,cAAc,EACd,aAAa,EACb,eAAe,EACf,MAAM,EACN,MAAM,EACN,MAAM,GAWP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAwF,MAAM,WAAW,CAAC;AAC9I,OAAO,EAAE,SAAS,EAAoB,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,2DAA2D,EAAE;IAC5G,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,oHAAoH,EAAE;IACpK,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,iDAAiD,EAAE;IAClG,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,EAAE,2CAA2C,EAAE;IAC7F,EAAE,MAAM,EA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,CAAC,IAAI,CAAC,CAAC;gBACrB,KAAK,EAAE,CAAC;YACV,CAAC;SACF,CAAC;IACJ,CAAC;IAED,OAAO;QACL,KAAK;QACL,MAAM;QACN,OAAO;QACP,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;YACxB,IAAI,CAAC;gBACH,OAAO,MAAM,KAAK,CAAC,OAAO,CAAC,CAAC;YAC9B,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,IAAI,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACtF,CAAC;QACH,CAAC;QACD,KAAK,CAAC,KAAK;YACT,KAAK,MAAM,IAAI,IAAI,OAAO,EAAE,CAAC;gBAC3B,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;gBAClB,IAAI,CAAC;oBACH,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,uBAAuB,CAAC,CAAC;gBACrD,CAAC;gBAAC,MAAM,CAAC;oBACP,gBAAgB;gBAClB,CAAC;YACH,CAAC;YACD,OAAO,CAAC,KAAK,EAAE,CAAC;YAChB,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;YACrB,MAAM,CAAC,KAAK,EAAE,CAAC;QACjB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/health.d.ts
CHANGED
|
@@ -10,7 +10,16 @@ export interface HealthReport {
|
|
|
10
10
|
readonly nodes: number;
|
|
11
11
|
readonly edges: number;
|
|
12
12
|
readonly violations: number;
|
|
13
|
+
/** Of those, rules that threw rather than judged — counted apart, never matched by message. */
|
|
14
|
+
readonly couldNotJudge: number;
|
|
15
|
+
/** Of those, rules that would have read more of the graph than their budget. */
|
|
16
|
+
readonly overBudget: number;
|
|
13
17
|
readonly danglingEdges: readonly string[];
|
|
18
|
+
/**
|
|
19
|
+
* What no longer fits the declaration (`store.findings()`, FR-21): records
|
|
20
|
+
* and links a repair could fix, and the rules that could not be judged.
|
|
21
|
+
*/
|
|
22
|
+
readonly findings: number;
|
|
14
23
|
readonly at: string;
|
|
15
24
|
}
|
|
16
25
|
export declare function health<S extends AnySchema>(store: Store<S>, options?: {
|
package/dist/health.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"health.d.ts","sourceRoot":"","sources":["../src/health.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,MAAM,CAAC,CAAC,SAAS,SAAS,EACxC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EACf,OAAO,GAAE;IAAE,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;CAAO,GAC5C,YAAY,
|
|
1
|
+
{"version":3,"file":"health.d.ts","sourceRoot":"","sources":["../src/health.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,M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