@graview/core 0.1.3 → 0.1.5
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/dist/app.d.ts +9 -1
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js.map +1 -1
- package/dist/capabilities.js +1 -1
- package/dist/capabilities.js.map +1 -1
- package/dist/cli/check/policy.d.ts.map +1 -1
- package/dist/cli/check/policy.js +40 -0
- package/dist/cli/check/policy.js.map +1 -1
- package/dist/cli/index.d.ts +2 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/document/canonical.d.ts +2 -1
- package/dist/document/canonical.d.ts.map +1 -1
- package/dist/document/canonical.js +2 -1
- package/dist/document/canonical.js.map +1 -1
- package/dist/document/compile.d.ts +14 -2
- package/dist/document/compile.d.ts.map +1 -1
- package/dist/document/compile.js +50 -24
- package/dist/document/compile.js.map +1 -1
- package/dist/document/diff.d.ts.map +1 -1
- package/dist/document/diff.js +3 -1
- package/dist/document/diff.js.map +1 -1
- package/dist/document/edit.d.ts +7 -1
- package/dist/document/edit.d.ts.map +1 -1
- package/dist/document/edit.js +46 -2
- package/dist/document/edit.js.map +1 -1
- package/dist/document/graview-template.d.ts +2 -2
- package/dist/document/index.d.ts +2 -2
- package/dist/document/index.d.ts.map +1 -1
- package/dist/document/index.js +1 -1
- package/dist/document/index.js.map +1 -1
- package/dist/document/migrate.d.ts.map +1 -1
- package/dist/document/migrate.js +3 -2
- package/dist/document/migrate.js.map +1 -1
- package/dist/document/patch.d.ts.map +1 -1
- package/dist/document/patch.js +2 -5
- package/dist/document/patch.js.map +1 -1
- package/dist/document/schema.d.ts +298 -298
- package/dist/document/schema.d.ts.map +1 -1
- package/dist/document/schema.js +125 -140
- package/dist/document/schema.js.map +1 -1
- package/dist/document/to-document.d.ts.map +1 -1
- package/dist/document/to-document.js +2 -1
- package/dist/document/to-document.js.map +1 -1
- package/dist/index.d.ts +9 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -4
- package/dist/index.js.map +1 -1
- package/dist/integrity.d.ts.map +1 -1
- package/dist/integrity.js +35 -5
- package/dist/integrity.js.map +1 -1
- package/dist/invariants/types.d.ts +1 -1
- package/dist/invariants/types.d.ts.map +1 -1
- package/dist/mutations/define-mutation.d.ts +26 -3
- package/dist/mutations/define-mutation.d.ts.map +1 -1
- package/dist/mutations/define-mutation.js +18 -5
- package/dist/mutations/define-mutation.js.map +1 -1
- package/dist/mutations/derive-edits.js +5 -5
- package/dist/mutations/derive-edits.js.map +1 -1
- package/dist/mutations/form.d.ts.map +1 -1
- package/dist/mutations/form.js +6 -5
- package/dist/mutations/form.js.map +1 -1
- package/dist/mutations/node-ref.d.ts +16 -5
- package/dist/mutations/node-ref.d.ts.map +1 -1
- package/dist/mutations/node-ref.js +52 -16
- package/dist/mutations/node-ref.js.map +1 -1
- package/dist/mutations/types.d.ts +2 -2
- package/dist/mutations/types.d.ts.map +1 -1
- package/dist/ops/log.d.ts +11 -0
- package/dist/ops/log.d.ts.map +1 -1
- package/dist/ops/log.js.map +1 -1
- package/dist/ops/served.d.ts +80 -0
- package/dist/ops/served.d.ts.map +1 -0
- package/dist/ops/served.js +316 -0
- package/dist/ops/served.js.map +1 -0
- package/dist/ops/types.d.ts +8 -0
- package/dist/ops/types.d.ts.map +1 -1
- package/dist/ops/withheld.d.ts +63 -8
- package/dist/ops/withheld.d.ts.map +1 -1
- package/dist/ops/withheld.js +198 -22
- package/dist/ops/withheld.js.map +1 -1
- package/dist/ops/writers.d.ts +29 -0
- package/dist/ops/writers.d.ts.map +1 -0
- package/dist/ops/writers.js +98 -0
- package/dist/ops/writers.js.map +1 -0
- package/dist/permissions/sight.d.ts +15 -2
- package/dist/permissions/sight.d.ts.map +1 -1
- package/dist/permissions/sight.js +34 -5
- package/dist/permissions/sight.js.map +1 -1
- package/dist/presence.d.ts +24 -2
- package/dist/presence.d.ts.map +1 -1
- package/dist/presence.js +26 -1
- package/dist/presence.js.map +1 -1
- package/dist/refusal.d.ts +9 -5
- package/dist/refusal.d.ts.map +1 -1
- package/dist/refusal.js +9 -5
- package/dist/refusal.js.map +1 -1
- package/dist/scaffold/project.d.ts.map +1 -1
- package/dist/scaffold/project.js +5 -0
- package/dist/scaffold/project.js.map +1 -1
- package/dist/schema/json-schema.d.ts +2 -3
- package/dist/schema/json-schema.d.ts.map +1 -1
- package/dist/schema/json-schema.js +30 -10
- package/dist/schema/json-schema.js.map +1 -1
- package/dist/schema/schema.d.ts +19 -4
- package/dist/schema/schema.d.ts.map +1 -1
- package/dist/schema/schema.js +2 -2
- package/dist/schema/schema.js.map +1 -1
- package/dist/schema/zod.d.ts +18 -0
- package/dist/schema/zod.d.ts.map +1 -0
- package/dist/schema/zod.js +44 -0
- package/dist/schema/zod.js.map +1 -0
- package/dist/seen.d.ts +54 -1
- package/dist/seen.d.ts.map +1 -1
- package/dist/seen.js +457 -25
- package/dist/seen.js.map +1 -1
- package/dist/store.d.ts +141 -17
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +203 -84
- package/dist/store.js.map +1 -1
- package/dist/testing.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
import { isUnset, UNSET } from "../graph/primitives.js";
|
|
2
|
+
import { edgeId } from "../graph/types.js";
|
|
3
|
+
import { actingAs } from "../permissions/policy.js";
|
|
4
|
+
/** The graph at one moment of the log: now, with what differs held apart. */
|
|
5
|
+
class Moment {
|
|
6
|
+
present;
|
|
7
|
+
timeline;
|
|
8
|
+
unversioned;
|
|
9
|
+
nodes = new Map();
|
|
10
|
+
edges = new Map();
|
|
11
|
+
touching = new Map();
|
|
12
|
+
/** The seq of the op this moment stands just before; who wrote what is read as of it. */
|
|
13
|
+
seq = Number.MAX_SAFE_INTEGER;
|
|
14
|
+
/** Who wrote the fields the op under way has written so far. */
|
|
15
|
+
wrote = new Map();
|
|
16
|
+
constructor(present,
|
|
17
|
+
/** Who wrote each field's value: read only when a record is judged, so a walk that judges none never builds it. */
|
|
18
|
+
timeline,
|
|
19
|
+
/** Records whose versions are never judged (`ServedJudge.sees`): only whether they are there is followed. */
|
|
20
|
+
unversioned) {
|
|
21
|
+
this.present = present;
|
|
22
|
+
this.timeline = timeline;
|
|
23
|
+
this.unversioned = unversioned;
|
|
24
|
+
}
|
|
25
|
+
/** The moment just before op `seq`. */
|
|
26
|
+
begin(seq) {
|
|
27
|
+
this.seq = seq;
|
|
28
|
+
this.wrote.clear();
|
|
29
|
+
}
|
|
30
|
+
/** Who wrote a record's fields' values at this moment. */
|
|
31
|
+
writerOf(id) {
|
|
32
|
+
return (field) => {
|
|
33
|
+
const key = `${id}\u0000${field}`;
|
|
34
|
+
if (this.wrote.has(key))
|
|
35
|
+
return this.wrote.get(key);
|
|
36
|
+
return this.timeline?.writers?.writerAt(id, field, this.seq);
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
/** The fields a primitive just wrote, and who wrote them. */
|
|
40
|
+
note(primitive, by) {
|
|
41
|
+
const id = primitive.op === "add-node" ? primitive.node.id : primitive.op === "patch-node" ? primitive.id : "";
|
|
42
|
+
// A record never judged never asks who wrote it.
|
|
43
|
+
if (id === "" || this.unversioned?.has(id))
|
|
44
|
+
return;
|
|
45
|
+
const fields = primitive.op === "add-node" ? Object.keys(primitive.node) : Object.keys(primitive.after);
|
|
46
|
+
for (const field of fields)
|
|
47
|
+
if (field !== "id" && field !== "kind")
|
|
48
|
+
this.wrote.set(`${id}\u0000${field}`, by(id, field));
|
|
49
|
+
}
|
|
50
|
+
node(id) {
|
|
51
|
+
if (this.nodes.has(id))
|
|
52
|
+
return this.nodes.get(id) ?? undefined;
|
|
53
|
+
return this.present.getNode(id);
|
|
54
|
+
}
|
|
55
|
+
setNode(id, node) {
|
|
56
|
+
this.nodes.set(id, node);
|
|
57
|
+
}
|
|
58
|
+
setEdge(edge, there) {
|
|
59
|
+
const key = edgeId(edge);
|
|
60
|
+
this.edges.set(key, there ? edge : null);
|
|
61
|
+
for (const end of [edge.from, edge.to]) {
|
|
62
|
+
let keys = this.touching.get(end);
|
|
63
|
+
if (!keys)
|
|
64
|
+
this.touching.set(end, (keys = new Set()));
|
|
65
|
+
keys.add(key);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/** Every link a record has at this moment. */
|
|
69
|
+
incident(id) {
|
|
70
|
+
const out = new Map();
|
|
71
|
+
for (const edge of [...this.present.outEdges(id), ...this.present.inEdges(id)]) {
|
|
72
|
+
const key = edgeId(edge);
|
|
73
|
+
if (!this.edges.has(key))
|
|
74
|
+
out.set(key, edge);
|
|
75
|
+
}
|
|
76
|
+
for (const key of this.touching.get(id) ?? []) {
|
|
77
|
+
const edge = this.edges.get(key);
|
|
78
|
+
if (edge)
|
|
79
|
+
out.set(key, edge);
|
|
80
|
+
}
|
|
81
|
+
return [...out.values()];
|
|
82
|
+
}
|
|
83
|
+
/** A primitive, taken back: the moment just before it. */
|
|
84
|
+
undo(primitive) {
|
|
85
|
+
switch (primitive.op) {
|
|
86
|
+
case "add-node":
|
|
87
|
+
this.setNode(primitive.node.id, null);
|
|
88
|
+
return;
|
|
89
|
+
case "remove-node":
|
|
90
|
+
this.setNode(primitive.node.id, primitive.node);
|
|
91
|
+
return;
|
|
92
|
+
case "patch-node": {
|
|
93
|
+
if (this.unversioned?.has(primitive.id))
|
|
94
|
+
return;
|
|
95
|
+
const node = this.node(primitive.id);
|
|
96
|
+
if (!node)
|
|
97
|
+
return;
|
|
98
|
+
this.setNode(primitive.id, patched(node, primitive.before));
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
case "add-edge":
|
|
102
|
+
this.setEdge(primitive.edge, false);
|
|
103
|
+
return;
|
|
104
|
+
case "remove-edge":
|
|
105
|
+
this.setEdge(primitive.edge, true);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
/** A primitive, applied: the moment just after it. A removed record takes its links with it, as a graph's does. */
|
|
110
|
+
apply(primitive) {
|
|
111
|
+
switch (primitive.op) {
|
|
112
|
+
case "add-node":
|
|
113
|
+
this.setNode(primitive.node.id, primitive.node);
|
|
114
|
+
return;
|
|
115
|
+
case "remove-node":
|
|
116
|
+
for (const edge of this.incident(primitive.node.id))
|
|
117
|
+
this.setEdge(edge, false);
|
|
118
|
+
this.setNode(primitive.node.id, null);
|
|
119
|
+
return;
|
|
120
|
+
case "patch-node": {
|
|
121
|
+
if (this.unversioned?.has(primitive.id))
|
|
122
|
+
return;
|
|
123
|
+
const node = this.node(primitive.id);
|
|
124
|
+
if (!node)
|
|
125
|
+
return;
|
|
126
|
+
this.setNode(primitive.id, patched(node, primitive.after));
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
case "add-edge":
|
|
130
|
+
this.setEdge(primitive.edge, true);
|
|
131
|
+
return;
|
|
132
|
+
case "remove-edge":
|
|
133
|
+
this.setEdge(primitive.edge, false);
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
function patched(node, fields) {
|
|
139
|
+
const next = { ...node };
|
|
140
|
+
for (const [key, value] of Object.entries(fields)) {
|
|
141
|
+
if (isUnset(value))
|
|
142
|
+
delete next[key];
|
|
143
|
+
else
|
|
144
|
+
next[key] = value;
|
|
145
|
+
}
|
|
146
|
+
return next;
|
|
147
|
+
}
|
|
148
|
+
const idOf = (primitive) => primitive.op === "add-node" || primitive.op === "remove-node" ? primitive.node.id : primitive.op === "patch-node" ? primitive.id : undefined;
|
|
149
|
+
/** Judges one primitive at a moment, and moves the moment past it. */
|
|
150
|
+
function serveOne(primitive, moment, judge, by) {
|
|
151
|
+
const servedAt = (id) => {
|
|
152
|
+
const node = moment.node(id);
|
|
153
|
+
return node ? judge.served(node, moment.writerOf(id)) : undefined;
|
|
154
|
+
};
|
|
155
|
+
const id = idOf(primitive);
|
|
156
|
+
if (id === undefined) {
|
|
157
|
+
const edge = primitive.edge;
|
|
158
|
+
const served = judge.edgeClean(edge) && servedAt(edge.from) !== undefined && servedAt(edge.to) !== undefined;
|
|
159
|
+
moment.apply(primitive);
|
|
160
|
+
return served ? { primitives: [primitive], faithful: true } : { primitives: [], faithful: false };
|
|
161
|
+
}
|
|
162
|
+
const was = moment.node(id);
|
|
163
|
+
const before = was ? judge.served(was, moment.writerOf(id)) : undefined;
|
|
164
|
+
moment.apply(primitive);
|
|
165
|
+
moment.note(primitive, by);
|
|
166
|
+
const now = moment.node(id);
|
|
167
|
+
const after = now ? judge.served(now, moment.writerOf(id)) : undefined;
|
|
168
|
+
if (!before && !after)
|
|
169
|
+
return { primitives: [], faithful: false };
|
|
170
|
+
if (!before && after) {
|
|
171
|
+
// Into what the seat is served: the record as it is served, and its links to what the seat is served.
|
|
172
|
+
const links = moment
|
|
173
|
+
.incident(id)
|
|
174
|
+
.filter((edge) => judge.edgeClean(edge) && servedAt(edge.from === id ? edge.to : edge.from) !== undefined)
|
|
175
|
+
.map((edge) => ({ op: "add-edge", edge }));
|
|
176
|
+
const faithful = primitive.op === "add-node" && after === primitive.node && links.length === 0;
|
|
177
|
+
return { primitives: faithful ? [primitive] : [{ op: "add-node", node: after }, ...links], faithful };
|
|
178
|
+
}
|
|
179
|
+
if (before && !after) {
|
|
180
|
+
// Out of it: removed, with its links, from the seat's copy.
|
|
181
|
+
const faithful = primitive.op === "remove-node" && before === was;
|
|
182
|
+
return { primitives: faithful ? [primitive] : [{ op: "remove-node", node: before }], faithful };
|
|
183
|
+
}
|
|
184
|
+
// Served before and after: what changed, as the seat is served it.
|
|
185
|
+
if (primitive.op === "patch-node") {
|
|
186
|
+
// The patch as written, when no field it writes was cleared for the seat on either side.
|
|
187
|
+
const kept = (served, held) => (field) => field in served === (held !== undefined && field in held);
|
|
188
|
+
if (Object.keys(primitive.after).every((field) => kept(before, was)(field) && kept(after, now)(field)))
|
|
189
|
+
return { primitives: [primitive], faithful: true };
|
|
190
|
+
const side = (node) => Object.fromEntries(Object.keys(primitive.after).map((field) => [field, field in node ? node[field] : UNSET]));
|
|
191
|
+
return { primitives: [{ op: "patch-node", id, before: side(before), after: side(after) }], faithful: false };
|
|
192
|
+
}
|
|
193
|
+
// An add of a record already there, or a remove that leaves it: a log that does not fold here; say the record as it is.
|
|
194
|
+
return { primitives: [{ op: "remove-node", node: before }, { op: "add-node", node: after }], faithful: false };
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* The ops asked about, each with its primitives as the seat is served
|
|
198
|
+
* them, judged at the moment of the log each stood at. Ops that are in the
|
|
199
|
+
* timeline's log are placed there; when any is not (a preview, an op from
|
|
200
|
+
* elsewhere), they are judged in order from the graph as it stands now.
|
|
201
|
+
*/
|
|
202
|
+
export function serveAlong(ops, timeline, judge) {
|
|
203
|
+
if (ops.length === 0)
|
|
204
|
+
return [];
|
|
205
|
+
const log = timeline.log.all();
|
|
206
|
+
const base = log[0]?.seq ?? 0;
|
|
207
|
+
const placed = ops.every((op) => log[op.seq - base]?.id === op.id);
|
|
208
|
+
const moment = new Moment(timeline.present, timeline);
|
|
209
|
+
if (!placed) {
|
|
210
|
+
moment.begin(timeline.log.length ?? base + log.length);
|
|
211
|
+
return ops.map((op) => {
|
|
212
|
+
const author = actingAs(op.author).id;
|
|
213
|
+
const served = op.primitives.map((primitive) => serveOne(primitive, moment, judge, () => author));
|
|
214
|
+
return { op, primitives: served.flatMap((one) => one.primitives), faithful: served.every((one) => one.faithful) };
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
const wanted = new Set(ops.map((op) => op.seq));
|
|
218
|
+
let first = Number.POSITIVE_INFINITY;
|
|
219
|
+
let last = Number.NEGATIVE_INFINITY;
|
|
220
|
+
for (const seq of wanted) {
|
|
221
|
+
if (seq < first)
|
|
222
|
+
first = seq;
|
|
223
|
+
if (seq > last)
|
|
224
|
+
last = seq;
|
|
225
|
+
}
|
|
226
|
+
first -= base;
|
|
227
|
+
last -= base;
|
|
228
|
+
const along = judgedAlong(log, first, timeline.present, judge);
|
|
229
|
+
const walk = along ? new Moment(timeline.present, timeline, along.unversioned) : moment;
|
|
230
|
+
for (let at = log.length - 1; at >= first; at--) {
|
|
231
|
+
const primitives = log[at].primitives;
|
|
232
|
+
for (let index = primitives.length - 1; index >= 0; index--)
|
|
233
|
+
walk.undo(primitives[index]);
|
|
234
|
+
}
|
|
235
|
+
return servedFrom(ops, log, first, last, wanted, walk, along?.judge ?? judge, timeline);
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* WHICH RECORDS THE WALK MUST FOLLOW VERSION BY VERSION. A record the seat
|
|
239
|
+
* does not see is served at no moment; one it sees, and no version of
|
|
240
|
+
* which — now, or in any primitive from `first` on — names what it may
|
|
241
|
+
* not see, is served as it is at every moment. Neither needs its versions:
|
|
242
|
+
* only whether it is there. Every other record is judged as before. A
|
|
243
|
+
* judge that cannot say its sight is judged record by record throughout.
|
|
244
|
+
*/
|
|
245
|
+
function judgedAlong(log, first, present, judge) {
|
|
246
|
+
const { sees, names } = judge;
|
|
247
|
+
if (!sees || !names)
|
|
248
|
+
return undefined;
|
|
249
|
+
const unseen = new Set();
|
|
250
|
+
const followed = new Set();
|
|
251
|
+
const plain = new Set();
|
|
252
|
+
const version = (id, values) => {
|
|
253
|
+
if (unseen.has(id) || followed.has(id))
|
|
254
|
+
return;
|
|
255
|
+
if (!sees(id)) {
|
|
256
|
+
unseen.add(id);
|
|
257
|
+
plain.delete(id);
|
|
258
|
+
}
|
|
259
|
+
else if (names(values)) {
|
|
260
|
+
followed.add(id);
|
|
261
|
+
plain.delete(id);
|
|
262
|
+
}
|
|
263
|
+
else
|
|
264
|
+
plain.add(id);
|
|
265
|
+
};
|
|
266
|
+
for (let at = first; at < log.length; at++) {
|
|
267
|
+
for (const primitive of log[at].primitives) {
|
|
268
|
+
if (primitive.op === "add-node" || primitive.op === "remove-node")
|
|
269
|
+
version(primitive.node.id, primitive.node);
|
|
270
|
+
else if (primitive.op === "patch-node") {
|
|
271
|
+
version(primitive.id, primitive.before);
|
|
272
|
+
version(primitive.id, primitive.after);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
for (const id of plain) {
|
|
277
|
+
const now = present.getNode(id);
|
|
278
|
+
if (now && names(now)) {
|
|
279
|
+
plain.delete(id);
|
|
280
|
+
followed.add(id);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
const unversioned = new Set([...plain, ...unseen]);
|
|
284
|
+
return {
|
|
285
|
+
unversioned,
|
|
286
|
+
judge: {
|
|
287
|
+
...judge,
|
|
288
|
+
served: (node, writer) => (plain.has(node.id) ? node : unseen.has(node.id) ? undefined : judge.served(node, writer)),
|
|
289
|
+
},
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
/** The walk forward from `first`, each op asked about judged at the moment it stood. */
|
|
293
|
+
function servedFrom(ops, log, first, last, wanted, moment, judge, timeline) {
|
|
294
|
+
const answer = new Map();
|
|
295
|
+
for (let at = first; at <= last; at++) {
|
|
296
|
+
const op = log[at];
|
|
297
|
+
moment.begin(op.seq);
|
|
298
|
+
if (!wanted.has(op.seq)) {
|
|
299
|
+
for (const primitive of op.primitives)
|
|
300
|
+
moment.apply(primitive);
|
|
301
|
+
continue;
|
|
302
|
+
}
|
|
303
|
+
// What this op wrote is written by whom the log says: its author, or for an undo whoever wrote what it puts back.
|
|
304
|
+
const by = (id, field) => timeline.writers?.writerAt(id, field, op.seq + 1);
|
|
305
|
+
const served = op.primitives.map((primitive) => serveOne(primitive, moment, judge, by));
|
|
306
|
+
answer.set(op.seq, { op, primitives: served.flatMap((one) => one.primitives), faithful: served.every((one) => one.faithful) });
|
|
307
|
+
}
|
|
308
|
+
return ops.map((op) => answer.get(op.seq));
|
|
309
|
+
}
|
|
310
|
+
/** Primitives not yet in any log — a preview `author` would make — as the seat would be served them, from the graph as it stands. */
|
|
311
|
+
export function servePrimitives(primitives, timeline, judge, author) {
|
|
312
|
+
const moment = new Moment(timeline.present, timeline);
|
|
313
|
+
moment.begin(timeline.log.length ?? timeline.log.all().length);
|
|
314
|
+
return primitives.flatMap((primitive) => serveOne(primitive, moment, judge, () => author).primitives);
|
|
315
|
+
}
|
|
316
|
+
//# sourceMappingURL=served.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"served.js","sourceRoot":"","sources":["../../src/ops/served.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAkB,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,MAAM,EAAqC,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAmEpD,6EAA6E;AAC7E,MAAM,MAAM;IAUS;IAEA;IAEA;IAbF,KAAK,GAAG,IAAI,GAAG,EAA+B,CAAC;IAC/C,KAAK,GAAG,IAAI,GAAG,EAA4B,CAAC;IAC5C,QAAQ,GAAG,IAAI,GAAG,EAAuB,CAAC;IAC3D,yFAAyF;IACjF,GAAG,GAAG,MAAM,CAAC,gBAAgB,CAAC;IACtC,gEAAgE;IAC/C,KAAK,GAAG,IAAI,GAAG,EAA8B,CAAC;IAE/D,YACmB,OAAgB;IACjC,mHAAmH;IAClG,QAAoC;IACrD,6GAA6G;IAC5F,WAAiC;QAJjC,YAAO,GAAP,OAAO,CAAS;QAEhB,aAAQ,GAAR,QAAQ,CAA4B;QAEpC,gBAAW,GAAX,WAAW,CAAsB;IACjD,CAAC;IAEJ,uCAAuC;IACvC,KAAK,CAAC,GAAW;QACf,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;IAED,0DAA0D;IAC1D,QAAQ,CAAC,EAAU;QACjB,OAAO,CAAC,KAAK,EAAE,EAAE;YACf,MAAM,GAAG,GAAG,GAAG,EAAE,SAAS,KAAK,EAAE,CAAC;YAClC,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,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,GAAG,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC;IAC/D,OAAO,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,CAAC;AACxG,CAAC"}
|
package/dist/ops/types.d.ts
CHANGED
|
@@ -80,6 +80,14 @@ export interface Operation {
|
|
|
80
80
|
* on every op a store makes; an op without it reads as before.
|
|
81
81
|
*/
|
|
82
82
|
readonly withheld?: true;
|
|
83
|
+
/**
|
|
84
|
+
* THE RECORDS ITS SENTENCE READ (FR-55): the ids the act's `describe`
|
|
85
|
+
* looked up to word `intent` ("in favour of Freya Davies"). A sentence
|
|
86
|
+
* names records by their labels, which no id check catches, so a seat
|
|
87
|
+
* that may not see one of these is served the op withheld. Absent on an
|
|
88
|
+
* act without `describe`, and on ops made before it was kept.
|
|
89
|
+
*/
|
|
90
|
+
readonly described?: readonly string[];
|
|
83
91
|
/**
|
|
84
92
|
* THE MODULES THIS OP LEAVES ON (FR-12). Set only on an op authored
|
|
85
93
|
* `system · modules`, which turns modules off or on and touches no
|
package/dist/ops/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ops/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,MAAM,WAAW,MAAM;IACrB;;;;;;;;;OASG;IACH,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;IACrD,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IAC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1,4 +1,5 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Primitive } from "../graph/primitives.js";
|
|
2
|
+
import { type FieldWriter, type Timeline } from "./served.js";
|
|
2
3
|
import type { Author, Operation } from "./types.js";
|
|
3
4
|
/**
|
|
4
5
|
* A LOG A SEAT MAY NOT FULLY SEE IS REDACTED, NOT GAPPED (FR-16).
|
|
@@ -17,6 +18,52 @@ export declare const WITHHELD_AUTHOR: Author;
|
|
|
17
18
|
export declare function isWithheld(op: Pick<Operation, "withheld">): boolean;
|
|
18
19
|
/** The record ids a primitive touches. */
|
|
19
20
|
export declare function touchedBy(primitive: Primitive): readonly string[];
|
|
21
|
+
/**
|
|
22
|
+
* WHAT ONE SEAT IS SERVED (FR-55): the judgement a log is redacted by.
|
|
23
|
+
* `sees` is the seat's sight — the ids it may be told. `shows` is what it
|
|
24
|
+
* is served: a record it sees, unless a field the record cannot do without
|
|
25
|
+
* names one it may not see. `served` is a record as the seat receives it,
|
|
26
|
+
* and `optional` says whether a kind's field may be left off one. A bare
|
|
27
|
+
* `(id) => boolean` is a lens that clears nothing: a record whose field
|
|
28
|
+
* names an unseen id is not served at all.
|
|
29
|
+
*/
|
|
30
|
+
export interface SeatLens {
|
|
31
|
+
readonly sees: (id: string) => boolean;
|
|
32
|
+
readonly shows: (id: string) => boolean;
|
|
33
|
+
readonly served: <N extends {
|
|
34
|
+
readonly id: string;
|
|
35
|
+
readonly kind: string;
|
|
36
|
+
}>(node: N) => N | undefined;
|
|
37
|
+
/** A record as the seat is served it, given who wrote each field's value: the seat's own words are served as written (FR-55). */
|
|
38
|
+
readonly servedWith: <N extends {
|
|
39
|
+
readonly id: string;
|
|
40
|
+
readonly kind: string;
|
|
41
|
+
}>(node: N, writer: FieldWriter) => N | undefined;
|
|
42
|
+
/** The seat whose words these are — the person, for an agent acting for one. */
|
|
43
|
+
readonly actor?: string;
|
|
44
|
+
readonly optional: (kind: string, field: string) => boolean;
|
|
45
|
+
/** The kind of a record, by id, when it is known: for a patch, whose primitive does not say. */
|
|
46
|
+
readonly kindOf: (id: string) => string | undefined;
|
|
47
|
+
/** The store's graph now and the log that led to it, so an op is judged where it stood (`serveAlong`). */
|
|
48
|
+
readonly timeline?: Timeline;
|
|
49
|
+
/**
|
|
50
|
+
* THIS LENS AS OF NOW, ITS JUDGEMENTS KEPT: each id judged once, each
|
|
51
|
+
* record served once, for one reading of a store that does not change
|
|
52
|
+
* while it is read — a log redacted, a snapshot served. A lens follows
|
|
53
|
+
* the store as it is asked (FR-51); a pinned one is thrown away after the
|
|
54
|
+
* reading it was made for, so it never answers for a store that moved.
|
|
55
|
+
*/
|
|
56
|
+
readonly pin?: () => SeatLens;
|
|
57
|
+
}
|
|
58
|
+
/** A lens over a bare sight: it serves a record whole or not at all. */
|
|
59
|
+
export declare function lensOf(seeing: SeatLens | ((id: string) => boolean)): SeatLens;
|
|
60
|
+
/**
|
|
61
|
+
* WHETHER A VALUE NAMES ANYTHING THE SEAT MAY NOT SEE (FR-55): any string
|
|
62
|
+
* in it, at any depth, a value or a key, that is an unseen record's id. An
|
|
63
|
+
* id is minted from a label, so an id a seat is served is the name of what
|
|
64
|
+
* it was kept from.
|
|
65
|
+
*/
|
|
66
|
+
export declare function namesUnseen(value: unknown, sees: (id: string) => boolean): boolean;
|
|
20
67
|
/**
|
|
21
68
|
* Whether an op touched, read or named anything `sees` says no to: then it
|
|
22
69
|
* is withheld whole, because its sentence ("Book a test drive for Freya")
|
|
@@ -26,12 +73,20 @@ export declare function touchesUnseen(op: Operation, sees: (id: string) => boole
|
|
|
26
73
|
/**
|
|
27
74
|
* THE OP AS A SEAT THAT MAY NOT SEE IT RECEIVES IT. Its id, seq, batch and
|
|
28
75
|
* time stand; who made it, what it meant, the call and the inverse go. Its
|
|
29
|
-
* primitives keep the ones that touch only what the seat
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
76
|
+
* primitives keep the ones that touch only what the seat is served, as it
|
|
77
|
+
* is served them (FR-55) — a change to a record the seat can see still
|
|
78
|
+
* reaches it, or its copy of the graph would go stale, and no id of what it
|
|
79
|
+
* may not see rides along in a field — and its reads and writes keep only
|
|
80
|
+
* served ids, so an undo the seat asks for is still blocked by it where it
|
|
81
|
+
* should be.
|
|
82
|
+
*/
|
|
83
|
+
export declare function withhold(op: Operation, seeing: SeatLens | ((id: string) => boolean), served?: readonly Primitive[]): Operation;
|
|
84
|
+
/**
|
|
85
|
+
* Every op of a log as a seat receives it: what it may see as it is, the
|
|
86
|
+
* rest withheld in place. An op is withheld when it touches a record the
|
|
87
|
+
* seat is not served, or names one it may not see ANYWHERE — its call, its
|
|
88
|
+
* sentence, its author, a field value in a primitive or its inverse
|
|
89
|
+
* (FR-55). One withheld already is withheld again under this seat's lens.
|
|
33
90
|
*/
|
|
34
|
-
export declare function
|
|
35
|
-
/** Every op of a log as a seat receives it: what it may see as it is, the rest withheld in place. */
|
|
36
|
-
export declare function redact(ops: readonly Operation[], sees: (id: string) => boolean): Operation[];
|
|
91
|
+
export declare function redact(ops: readonly Operation[], seeing: SeatLens | ((id: string) => boolean)): Operation[];
|
|
37
92
|
//# sourceMappingURL=withheld.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withheld.d.ts","sourceRoot":"","sources":["../../src/ops/withheld.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"withheld.d.ts","sourceRoot":"","sources":["../../src/ops/withheld.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAI/D,OAAO,EAAc,KAAK,WAAW,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEpD;;;;;;;;GAQG;AAEH,+DAA+D;AAC/D,eAAO,MAAM,eAAe,4BAA4B,CAAC;AAEzD,0EAA0E;AAC1E,eAAO,MAAM,e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