@graview/core 0.1.14 → 0.1.15
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 +12 -4
- package/dist/capabilities.js +1 -1
- package/dist/capabilities.js.map +1 -1
- package/dist/cli/check/hidden-reads.js +1 -1
- package/dist/cli/check/hidden-reads.js.map +1 -1
- package/dist/compiled.d.ts +19 -0
- package/dist/compiled.d.ts.map +1 -0
- package/dist/compiled.js +60 -0
- package/dist/compiled.js.map +1 -0
- package/dist/conformance/fixtures.d.ts.map +1 -1
- package/dist/conformance/fixtures.js +22 -0
- package/dist/conformance/fixtures.js.map +1 -1
- package/dist/document/blocks.d.ts.map +1 -1
- package/dist/document/blocks.js +2 -1
- package/dist/document/blocks.js.map +1 -1
- package/dist/document/compile.d.ts +4 -29
- package/dist/document/compile.d.ts.map +1 -1
- package/dist/document/compile.js +72 -382
- package/dist/document/compile.js.map +1 -1
- package/dist/document/compiled.d.ts +130 -0
- package/dist/document/compiled.d.ts.map +1 -0
- package/dist/document/compiled.js +466 -0
- package/dist/document/compiled.js.map +1 -0
- package/dist/document/edit.d.ts.map +1 -1
- package/dist/document/edit.js +1 -1
- package/dist/document/edit.js.map +1 -1
- package/dist/document/index.d.ts +4 -1
- package/dist/document/index.d.ts.map +1 -1
- package/dist/document/index.js +3 -1
- package/dist/document/index.js.map +1 -1
- package/dist/document/remembered.d.ts +6 -0
- package/dist/document/remembered.d.ts.map +1 -0
- package/dist/document/remembered.js +16 -0
- package/dist/document/remembered.js.map +1 -0
- package/dist/document/rules.d.ts.map +1 -1
- package/dist/document/rules.js +2 -1
- package/dist/document/rules.js.map +1 -1
- package/dist/document/schema.d.ts.map +1 -1
- package/dist/document/schema.js +10 -2
- package/dist/document/schema.js.map +1 -1
- package/dist/document/template-parse.d.ts +18 -0
- package/dist/document/template-parse.d.ts.map +1 -0
- package/dist/document/template-parse.js +124 -0
- package/dist/document/template-parse.js.map +1 -0
- package/dist/document/template.d.ts +1 -17
- package/dist/document/template.d.ts.map +1 -1
- package/dist/document/template.js +6 -115
- package/dist/document/template.js.map +1 -1
- package/dist/document/thumbnail.d.ts +4 -1
- package/dist/document/thumbnail.d.ts.map +1 -1
- package/dist/document/thumbnail.js +32 -4
- package/dist/document/thumbnail.js.map +1 -1
- package/dist/document/to-document.d.ts +1 -4
- package/dist/document/to-document.d.ts.map +1 -1
- package/dist/document/to-document.js +2 -9
- package/dist/document/to-document.js.map +1 -1
- package/dist/document/views.d.ts.map +1 -1
- package/dist/document/views.js +1 -1
- package/dist/document/views.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mutations/define-mutation.d.ts +12 -0
- package/dist/mutations/define-mutation.d.ts.map +1 -1
- package/dist/mutations/define-mutation.js +37 -9
- package/dist/mutations/define-mutation.js.map +1 -1
- package/dist/mutations/derive-edits.js +1 -1
- package/dist/mutations/derive-edits.js.map +1 -1
- package/dist/refusal.d.ts +11 -6
- package/dist/refusal.d.ts.map +1 -1
- package/dist/refusal.js +11 -6
- package/dist/refusal.js.map +1 -1
- package/dist/refused.d.ts +13 -6
- package/dist/refused.d.ts.map +1 -1
- package/dist/refused.js +14 -7
- package/dist/refused.js.map +1 -1
- package/dist/scaffold/project.d.ts.map +1 -1
- package/dist/scaffold/project.js +1 -0
- package/dist/scaffold/project.js.map +1 -1
- package/dist/schema/json-schema.d.ts.map +1 -1
- package/dist/schema/json-schema.js +4 -1
- package/dist/schema/json-schema.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +5 -1
|
@@ -0,0 +1,466 @@
|
|
|
1
|
+
import { createSchema, defineInvariant, defineMutation, defineNode, RuleBudgetError, withArticle, } from "../index.js";
|
|
2
|
+
import { refTo } from "../mutations/node-ref.js";
|
|
3
|
+
import { ActRefusal } from "../refused.js";
|
|
4
|
+
import * as z from "../schema/zod.js";
|
|
5
|
+
import { evaluateExpr, ExprBudgetError, ExprEvalError } from "./expr/evaluate.js";
|
|
6
|
+
import { error } from "./findings.js";
|
|
7
|
+
import { renderTemplate } from "./template.js";
|
|
8
|
+
import { rememberDocument } from "./remembered.js";
|
|
9
|
+
/*
|
|
10
|
+
* A COMPILED APP, HANDED TO THE PAGE (FR-123).
|
|
11
|
+
*
|
|
12
|
+
* Compiling a document is two halves. The first reads it — the format, its
|
|
13
|
+
* upgrades, every reference and expression judged, every template and rule
|
|
14
|
+
* parsed — and says what each act asks for and does. The second builds the
|
|
15
|
+
* GraviewApp from that: zod schemas for the fields and arguments, and the
|
|
16
|
+
* closures that run acts, judge rules and say labels.
|
|
17
|
+
*
|
|
18
|
+
* The first half's answer is plain data, `CompiledApp`, and this module is
|
|
19
|
+
* the second half alone. `compileDocumentWithoutCheck` is the first half
|
|
20
|
+
* then `build` — so a host that compiled a document on its server can hand
|
|
21
|
+
* the page `serializeCompiled(compiled)` as JSON, and the page's `appFrom`
|
|
22
|
+
* builds the same app without the reader, the validator, the expression
|
|
23
|
+
* parser or the view checker. What stays is what an app needs to RUN in the
|
|
24
|
+
* page: the field schemas the store validates with, the evaluator that
|
|
25
|
+
* judges guards, rules, computed values and template parts, and the
|
|
26
|
+
* template renderer that says labels and refusals.
|
|
27
|
+
*
|
|
28
|
+
* A compiled app is the host's own data, from its own server, and is
|
|
29
|
+
* trusted as the document it was compiled from is: `appFrom` checks its
|
|
30
|
+
* format and that its parts match its document, so a stale one cached from
|
|
31
|
+
* another build is refused by name and the page compiles the document
|
|
32
|
+
* instead, but it does not judge the document again.
|
|
33
|
+
*/
|
|
34
|
+
/** The format a compiled app says it is in; another is refused, never misread (docs/stability.md). */
|
|
35
|
+
export const COMPILED_FORMAT = "graview-compiled@1";
|
|
36
|
+
export const SUBJECT_ARG = "id";
|
|
37
|
+
export const refName = (v) => (typeof v === "string" && /^\$[A-Za-z][A-Za-z0-9]*$/.test(v) ? v.slice(1) : undefined);
|
|
38
|
+
/** What one of these is called, when the kind says nothing: the first required word-ish field. */
|
|
39
|
+
export function defaultLabelField(spec) {
|
|
40
|
+
const entries = Object.entries(spec.fields);
|
|
41
|
+
return (entries.find(([, f]) => f.required && (f.type === "string" || f.type === "text"))?.[0] ??
|
|
42
|
+
entries.find(([, f]) => f.type === "string")?.[0]);
|
|
43
|
+
}
|
|
44
|
+
/*
|
|
45
|
+
* A FIELD'S SCHEMA, in zod/mini (schema/zod.ts): a page that builds an app
|
|
46
|
+
* in the browser pays for the checks it calls, not for classic zod whole
|
|
47
|
+
* (FR-57). The checks, their messages and their definitions are the ones
|
|
48
|
+
* classic's methods make.
|
|
49
|
+
*/
|
|
50
|
+
export function fieldSchema(spec, optional) {
|
|
51
|
+
let schema;
|
|
52
|
+
switch (spec.type) {
|
|
53
|
+
case "string":
|
|
54
|
+
schema = z.string().check(z.maxLength(500));
|
|
55
|
+
break;
|
|
56
|
+
case "text":
|
|
57
|
+
schema = z.string().check(z.maxLength(20_000));
|
|
58
|
+
break;
|
|
59
|
+
case "number":
|
|
60
|
+
case "integer": {
|
|
61
|
+
// Its range (FR-114) is the schema's: every form, tool and apply reads it from here.
|
|
62
|
+
const range = [
|
|
63
|
+
...(spec.type === "integer" ? [z.int()] : []),
|
|
64
|
+
...(spec.min === undefined ? [] : [z.gte(spec.min)]),
|
|
65
|
+
...(spec.max === undefined ? [] : [z.lte(spec.max)]),
|
|
66
|
+
...(spec.step === undefined ? [] : [z.multipleOf(spec.step)]),
|
|
67
|
+
];
|
|
68
|
+
schema = range.length > 0 ? z.number().check(...range) : z.number();
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
case "boolean":
|
|
72
|
+
schema = z.boolean();
|
|
73
|
+
break;
|
|
74
|
+
case "date":
|
|
75
|
+
schema = z.string().check(z.regex(/^\d{4}-\d{2}-\d{2}$/, "a date like 2026-10-02"));
|
|
76
|
+
break;
|
|
77
|
+
case "datetime":
|
|
78
|
+
schema = z.string().check(z.refine((s) => !Number.isNaN(Date.parse(s)), "a date and time like 2026-10-02T14:30:00Z"));
|
|
79
|
+
break;
|
|
80
|
+
case "enum":
|
|
81
|
+
schema = z.enum(spec.options);
|
|
82
|
+
break;
|
|
83
|
+
case "list":
|
|
84
|
+
schema = z.array(spec.of === "number" ? z.number() : spec.of === "date" ? z.string().check(z.regex(/^\d{4}-\d{2}-\d{2}$/)) : z.string().check(z.maxLength(500))).check(z.maxLength(200));
|
|
85
|
+
break;
|
|
86
|
+
case "url":
|
|
87
|
+
schema = z.url();
|
|
88
|
+
break;
|
|
89
|
+
case "email":
|
|
90
|
+
schema = z.email();
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
if (spec.description)
|
|
94
|
+
schema = schema.check(z.describe(spec.description));
|
|
95
|
+
return optional ? z.optional(schema) : schema;
|
|
96
|
+
}
|
|
97
|
+
const argSchema = (arg) => ("field" in arg ? fieldSchema(arg.field, arg.optional) : "ref" in arg ? refTo(arg.ref) : z.optional(z.unknown()));
|
|
98
|
+
/*
|
|
99
|
+
* An act's own refusal is the framework's typed one (FR-110), which a host
|
|
100
|
+
* shows rather than calling it a failure. Its condition, and a value it
|
|
101
|
+
* could not work out, are `refused` (FR-119); a call naming what is not
|
|
102
|
+
* there, or a subject of the wrong kind, says `invalid` — the call as sent.
|
|
103
|
+
*/
|
|
104
|
+
/** The compiled app each app was built from, so it can be handed on. */
|
|
105
|
+
const PLANS = new WeakMap();
|
|
106
|
+
/**
|
|
107
|
+
* A compiled document as JSON-safe data, for a host to hand its pages: the
|
|
108
|
+
* app minus its functions, every expression and template already parsed.
|
|
109
|
+
* `appFrom` builds the same app from it. The findings are the ones this
|
|
110
|
+
* compile said — `compileDocument`'s, checker and all, when that compiled it.
|
|
111
|
+
*/
|
|
112
|
+
export function serializeCompiled(compiled) {
|
|
113
|
+
const plan = PLANS.get(compiled.app);
|
|
114
|
+
if (!plan)
|
|
115
|
+
throw new Error("this app was not compiled from a document: serializeCompiled takes what compileDocument, compileDocumentWithoutCheck or appFrom returned");
|
|
116
|
+
return { ...plan, findings: [...compiled.findings] };
|
|
117
|
+
}
|
|
118
|
+
const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
119
|
+
const sameNames = (a, b) => isRecord(b) && Object.keys(a ?? {}).length === Object.keys(b).length && Object.keys(a ?? {}).every((name) => Object.prototype.hasOwnProperty.call(b, name));
|
|
120
|
+
/**
|
|
121
|
+
* The app a compiled document describes, built in the page without the
|
|
122
|
+
* compiler (FR-123). `compiled` is what the host's server made with
|
|
123
|
+
* `serializeCompiled`, read back from JSON. Another format, or parts that do
|
|
124
|
+
* not match their document, is refused with a finding — `compiled-format`
|
|
125
|
+
* or `compiled-shape` — and the page compiles the document instead.
|
|
126
|
+
*/
|
|
127
|
+
export function appFrom(compiled, options = {}) {
|
|
128
|
+
const format = isRecord(compiled) ? compiled["format"] : undefined;
|
|
129
|
+
if (format !== COMPILED_FORMAT) {
|
|
130
|
+
return { ok: false, findings: [error("compiled-format", "format", format === undefined ? "this is not a compiled Graview app" : `this compiled app is ${JSON.stringify(format)}, and this build reads ${COMPILED_FORMAT}`, "compile the document instead")] };
|
|
131
|
+
}
|
|
132
|
+
const plan = compiled;
|
|
133
|
+
const document = plan.document;
|
|
134
|
+
const whole = isRecord(document) &&
|
|
135
|
+
typeof document.name === "string" &&
|
|
136
|
+
isRecord(document.kinds) &&
|
|
137
|
+
sameNames(document.kinds, plan.kinds) &&
|
|
138
|
+
sameNames(document.acts, plan.acts) &&
|
|
139
|
+
sameNames(document.rules, plan.rules) &&
|
|
140
|
+
Array.isArray(plan.edges) &&
|
|
141
|
+
Array.isArray(plan.findings);
|
|
142
|
+
const torn = { ok: false, findings: [error("compiled-shape", "", "this compiled app's parts do not match its document", "compile the document instead")] };
|
|
143
|
+
if (!whole)
|
|
144
|
+
return torn;
|
|
145
|
+
// One torn on its way — a plan that is not there, a list that is not one — is refused as torn, never thrown out of the page.
|
|
146
|
+
try {
|
|
147
|
+
return build(plan, options);
|
|
148
|
+
}
|
|
149
|
+
catch {
|
|
150
|
+
return torn;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
/** The app, from a compiled document: the second half of compiling one, and all of `appFrom`. */
|
|
154
|
+
export function build(plan, options = {}) {
|
|
155
|
+
const { document } = plan;
|
|
156
|
+
const today = options.today ?? (() => new Date().toISOString().slice(0, 10));
|
|
157
|
+
const edges = new Map(plan.edges.map(([name, edge]) => [name, edge]));
|
|
158
|
+
const shapes = new Map();
|
|
159
|
+
for (const [kind, spec] of Object.entries(document.kinds)) {
|
|
160
|
+
const computed = plan.kinds[kind]?.computed;
|
|
161
|
+
shapes.set(kind, {
|
|
162
|
+
fields: new Set(Object.keys(spec.fields)),
|
|
163
|
+
edges: new Map(Object.entries(spec.edges ?? {}).map(([name, e]) => [name, e.cardinality ?? "many"])),
|
|
164
|
+
...(computed ? { computed: new Map(computed.map(([name, expr]) => [name, expr])) } : {}),
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
// What `{x | money}` says in a label, a sentence or a refusal: the app's currency and locale (FR-100).
|
|
168
|
+
const { accent: _accent, name: _wordmark, ...money } = document.brand ?? {};
|
|
169
|
+
// ── kinds ────────────────────────────────────────────────────────────────
|
|
170
|
+
const definitions = Object.entries(document.kinds).map(([kind, spec]) => {
|
|
171
|
+
const shape = {};
|
|
172
|
+
for (const [field, f] of Object.entries(spec.fields))
|
|
173
|
+
shape[field] = fieldSchema(f, !f.required);
|
|
174
|
+
const { label: labelParts, describe: describeParts } = plan.kinds[kind] ?? {};
|
|
175
|
+
const computed = Object.entries(spec.computed ?? {}).map(([name, field]) => [name, typeof field === "string" ? { expr: field } : field]);
|
|
176
|
+
// A computed field's words are said like a field's: its label, where it has one.
|
|
177
|
+
const labels = Object.fromEntries([
|
|
178
|
+
...Object.entries(spec.fields).filter(([, f]) => f.label).map(([n, f]) => [n, f.label]),
|
|
179
|
+
...computed.filter(([, c]) => c.label).map(([n, c]) => [n, c.label]),
|
|
180
|
+
]);
|
|
181
|
+
// Defaults stay out of the zod schema (hydration must not invent values) and ride beside it, for a repair to read.
|
|
182
|
+
const defaults = Object.fromEntries(Object.entries(spec.fields).filter(([, f]) => f.default !== undefined).map(([n, f]) => [n, f.default]));
|
|
183
|
+
const edgeDecls = Object.fromEntries(Object.entries(spec.edges ?? {}).map(([n, e]) => [
|
|
184
|
+
n,
|
|
185
|
+
{
|
|
186
|
+
to: e.to,
|
|
187
|
+
...(e.cardinality ? { cardinality: e.cardinality } : {}),
|
|
188
|
+
...(e.description ? { description: e.description } : {}),
|
|
189
|
+
...(e.inverse ? { inverse: e.inverse } : {}),
|
|
190
|
+
...(e.appendOnly ? { appendOnly: e.appendOnly } : {}),
|
|
191
|
+
},
|
|
192
|
+
]));
|
|
193
|
+
return defineNode(kind, {
|
|
194
|
+
fields: z.object(shape),
|
|
195
|
+
edges: edgeDecls,
|
|
196
|
+
...(spec.plural ? { plural: spec.plural } : {}),
|
|
197
|
+
...(spec.noun ? { noun: spec.noun } : {}),
|
|
198
|
+
...(spec.description ? { description: spec.description } : {}),
|
|
199
|
+
...(labelParts ? { label: (node) => renderTemplate(labelParts, { node: node, kinds: shapes, today: today(), money }) || node.id } : {}),
|
|
200
|
+
...(describeParts ? { describe: (node) => renderTemplate(describeParts, { node: node, kinds: shapes, today: today(), money }) } : {}),
|
|
201
|
+
...(spec.lifecycle ? { lifecycle: { field: spec.lifecycle.field, retired: spec.lifecycle.retired } } : {}),
|
|
202
|
+
...(spec.figure ? { figure: spec.figure } : {}),
|
|
203
|
+
...(spec.computed && Object.keys(spec.computed).length > 0 ? { computed: spec.computed } : {}),
|
|
204
|
+
...(Object.keys(labels).length > 0 || spec.glance ? { display: { ...(Object.keys(labels).length > 0 ? { labels } : {}), ...(spec.glance ? { glance: [...spec.glance] } : {}) } } : {}),
|
|
205
|
+
...(Object.keys(defaults).length > 0 ? { defaults } : {}),
|
|
206
|
+
});
|
|
207
|
+
});
|
|
208
|
+
const schema = createSchema(definitions);
|
|
209
|
+
function labelFor(node) {
|
|
210
|
+
const definition = schema.tryDefinition(node.kind);
|
|
211
|
+
return definition?.label?.(node) ?? node.id;
|
|
212
|
+
}
|
|
213
|
+
// ── acts ─────────────────────────────────────────────────────────────────
|
|
214
|
+
const mutations = [];
|
|
215
|
+
for (const [name, act] of Object.entries(document.acts ?? {})) {
|
|
216
|
+
const planned = plan.acts[name];
|
|
217
|
+
const { title, effects, guard, refusal, destructive, idempotent, creates, connects, severs, writes, writesOther, sets } = planned;
|
|
218
|
+
const args = new Map(planned.args);
|
|
219
|
+
const shape = {};
|
|
220
|
+
for (const [arg, a] of args)
|
|
221
|
+
shape[arg] = argSchema(a);
|
|
222
|
+
const subjectKinds = act.on === undefined ? [] : Array.isArray(act.on) ? act.on : [act.on];
|
|
223
|
+
const exprs = new Map(planned.exprs);
|
|
224
|
+
mutations.push(defineMutation(name, {
|
|
225
|
+
input: z.object(shape),
|
|
226
|
+
title,
|
|
227
|
+
...(act.description ? { description: act.description } : {}),
|
|
228
|
+
...(act.fromTheOtherEnd ? { fromTheOtherEnd: act.fromTheOtherEnd } : {}),
|
|
229
|
+
...(args.has(SUBJECT_ARG) ? { subject: { kinds: subjectKinds.length > 0 ? subjectKinds : "*", arg: SUBJECT_ARG } } : {}),
|
|
230
|
+
...(destructive ? { destructive: true } : {}),
|
|
231
|
+
...(idempotent ? { idempotent: true } : {}),
|
|
232
|
+
...(creates.length > 0 ? { creates } : {}),
|
|
233
|
+
...(connects.length > 0 ? { connects } : {}),
|
|
234
|
+
...(severs.length > 0 ? { severs } : {}),
|
|
235
|
+
// Said even when empty (FR-110): a document act's writes are read off it, so nothing guesses them from its arguments' names.
|
|
236
|
+
writes,
|
|
237
|
+
...(Object.keys(writesOther).length > 0 ? { writesOther } : {}),
|
|
238
|
+
...(Object.keys(sets).length > 0 ? { sets } : {}),
|
|
239
|
+
describe: (input, graph) => {
|
|
240
|
+
const subject = typeof input[SUBJECT_ARG] === "string" ? graph.getNode(input[SUBJECT_ARG]) : undefined;
|
|
241
|
+
const what = subject ? labelFor(subject) : Object.values(input).find((v) => typeof v === "string");
|
|
242
|
+
return what ? `${title}: ${String(what)}` : title;
|
|
243
|
+
},
|
|
244
|
+
apply(context, input) {
|
|
245
|
+
const graph = context.graph;
|
|
246
|
+
const subjectId = typeof input[SUBJECT_ARG] === "string" ? input[SUBJECT_ARG] : undefined;
|
|
247
|
+
const subject = subjectId ? graph.getNode(subjectId) : undefined;
|
|
248
|
+
if (subjectId && !subject)
|
|
249
|
+
throw new ActRefusal(`there is no record "${subjectId}"`, "invalid");
|
|
250
|
+
if (subject && subjectKinds.length > 0 && !subjectKinds.includes(subject.kind))
|
|
251
|
+
throw new ActRefusal(`"${title}" acts on ${subjectKinds.join(" or ")}, not on ${withArticle(subject.kind)}`, "invalid");
|
|
252
|
+
const bindings = {};
|
|
253
|
+
for (const [k, v] of Object.entries(input))
|
|
254
|
+
if (v !== undefined)
|
|
255
|
+
bindings[k] = v;
|
|
256
|
+
if (guard && subject) {
|
|
257
|
+
let allowed;
|
|
258
|
+
try {
|
|
259
|
+
allowed = evaluateExpr(guard, { graph, subject, kinds: shapes, bindings, today: today() });
|
|
260
|
+
}
|
|
261
|
+
catch (e) {
|
|
262
|
+
if (e instanceof ExprEvalError)
|
|
263
|
+
throw new ActRefusal(`"${title}" could not be judged: ${e.sentence}`);
|
|
264
|
+
throw e;
|
|
265
|
+
}
|
|
266
|
+
if (allowed !== true) {
|
|
267
|
+
throw new ActRefusal(refusal ? renderTemplate(refusal, { node: subject, kinds: shapes, graph, bindings, today: today(), money }) : `"${title}" is not allowed for ${labelFor(subject)} right now`);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
const made = new Map();
|
|
271
|
+
const resolve = (value, current) => {
|
|
272
|
+
if (value && typeof value === "object" && !Array.isArray(value) && "expr" in value) {
|
|
273
|
+
try {
|
|
274
|
+
return evaluateExpr(exprs.get(value.expr), { graph, subject: current ?? subject ?? null, kinds: shapes, bindings, today: today() });
|
|
275
|
+
}
|
|
276
|
+
catch (e) {
|
|
277
|
+
if (e instanceof ExprEvalError)
|
|
278
|
+
throw new ActRefusal(`"${title}" could not work out a value: ${e.sentence}`);
|
|
279
|
+
throw e;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
const ref = refName(value);
|
|
283
|
+
if (ref === undefined)
|
|
284
|
+
return typeof value === "string" && value.startsWith("$$") ? value.slice(1) : value;
|
|
285
|
+
if (ref === "subject")
|
|
286
|
+
return subjectId;
|
|
287
|
+
if (ref === "now")
|
|
288
|
+
return new Date().toISOString();
|
|
289
|
+
if (ref === "today")
|
|
290
|
+
return today();
|
|
291
|
+
if (made.has(ref))
|
|
292
|
+
return made.get(ref);
|
|
293
|
+
return input[ref];
|
|
294
|
+
};
|
|
295
|
+
for (const effect of effects) {
|
|
296
|
+
if ("create" in effect) {
|
|
297
|
+
const kind = document.kinds[effect.create];
|
|
298
|
+
const node = { kind: effect.create };
|
|
299
|
+
for (const [field, f] of Object.entries(kind.fields))
|
|
300
|
+
if (f.default !== undefined)
|
|
301
|
+
node[field] = f.default;
|
|
302
|
+
for (const [field, value] of Object.entries(effect.set ?? {})) {
|
|
303
|
+
const v = resolve(value, undefined);
|
|
304
|
+
if (v !== undefined)
|
|
305
|
+
node[field] = v;
|
|
306
|
+
}
|
|
307
|
+
const labelField = defaultLabelField(kind);
|
|
308
|
+
const id = context.freshId(String((labelField && node[labelField]) ?? effect.create), effect.create);
|
|
309
|
+
context.addNode({ id, ...node });
|
|
310
|
+
if (effect.as)
|
|
311
|
+
made.set(effect.as, id);
|
|
312
|
+
}
|
|
313
|
+
else if ("connect" in effect || "sever" in effect) {
|
|
314
|
+
const kind = "connect" in effect ? effect.connect : effect.sever;
|
|
315
|
+
const from = String(resolve(effect.from, undefined) ?? "");
|
|
316
|
+
const to = String(resolve(effect.to, undefined) ?? "");
|
|
317
|
+
if (!graph.has(from) && ![...made.values()].includes(from))
|
|
318
|
+
throw new ActRefusal(`there is no record "${from}"`, "invalid");
|
|
319
|
+
if (!graph.has(to) && ![...made.values()].includes(to))
|
|
320
|
+
throw new ActRefusal(`there is no record "${to}"`, "invalid");
|
|
321
|
+
if ("connect" in effect) {
|
|
322
|
+
if (edges.get(kind)?.cardinality === "one")
|
|
323
|
+
for (const existing of graph.out(from, kind))
|
|
324
|
+
if (existing.id !== to)
|
|
325
|
+
context.removeEdge({ kind, from, to: existing.id });
|
|
326
|
+
if (!graph.out(from, kind).some((n) => n.id === to))
|
|
327
|
+
context.addEdge({ kind, from, to });
|
|
328
|
+
}
|
|
329
|
+
else {
|
|
330
|
+
context.removeEdge({ kind, from, to });
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
else if ("set" in effect) {
|
|
334
|
+
const targetId = String(resolve(effect.target ?? "$subject", undefined) ?? "");
|
|
335
|
+
const target = graph.getNode(targetId);
|
|
336
|
+
if (!target && ![...made.values()].includes(targetId))
|
|
337
|
+
throw new ActRefusal(`there is no record "${targetId}"`, "invalid");
|
|
338
|
+
const patch = {};
|
|
339
|
+
for (const [field, value] of Object.entries(effect.set)) {
|
|
340
|
+
const v = resolve(value, target);
|
|
341
|
+
if (v !== undefined)
|
|
342
|
+
patch[field] = v;
|
|
343
|
+
}
|
|
344
|
+
if (Object.keys(patch).length > 0)
|
|
345
|
+
context.patchNode(targetId, patch);
|
|
346
|
+
}
|
|
347
|
+
else if ("remove" in effect) {
|
|
348
|
+
const id = String(resolve(effect.remove, undefined) ?? "");
|
|
349
|
+
if (!graph.has(id))
|
|
350
|
+
throw new ActRefusal(`there is no record "${id}"`, "invalid");
|
|
351
|
+
context.removeNode(id);
|
|
352
|
+
}
|
|
353
|
+
else if ("replace" in effect && subject) {
|
|
354
|
+
// The subject's links of each relation, at its own end, severed — all but the one being made (FR-115).
|
|
355
|
+
const kept = input["to"];
|
|
356
|
+
for (const relation of effect.replace) {
|
|
357
|
+
const fromSubject = edges.get(relation)?.from.includes(subject.kind) ?? true;
|
|
358
|
+
for (const other of fromSubject ? graph.out(subject.id, relation) : graph.in(subject.id, relation)) {
|
|
359
|
+
if (relation === effect.keep && other.id === kept)
|
|
360
|
+
continue;
|
|
361
|
+
context.removeEdge(fromSubject ? { kind: relation, from: subject.id, to: other.id } : { kind: relation, from: other.id, to: subject.id });
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
}));
|
|
368
|
+
}
|
|
369
|
+
// ── rules ────────────────────────────────────────────────────────────────
|
|
370
|
+
const invariants = [];
|
|
371
|
+
for (const [name, rule] of Object.entries(document.rules ?? {})) {
|
|
372
|
+
const { title, require, when, says } = plan.rules[name];
|
|
373
|
+
const repairs = rule.repairs ?? [];
|
|
374
|
+
const judge = (graph, subject) => {
|
|
375
|
+
const ctx = { graph, subject, kinds: shapes, today: today() };
|
|
376
|
+
let holds;
|
|
377
|
+
/*
|
|
378
|
+
* A RULE THAT CANNOT ANSWER IS THE ENGINE'S TO SAY (FR-29). Out of
|
|
379
|
+
* budget it throws RuleBudgetError, and the violation's status is
|
|
380
|
+
* `over-budget`; any other mistake (a word added to a number) is
|
|
381
|
+
* `could-not-judge`. Both name the rule and its subject, and neither
|
|
382
|
+
* is a hang or a crash that takes the other rules down.
|
|
383
|
+
*/
|
|
384
|
+
try {
|
|
385
|
+
if (when && evaluateExpr(when, ctx) !== true)
|
|
386
|
+
return [];
|
|
387
|
+
holds = evaluateExpr(require, ctx) === true;
|
|
388
|
+
}
|
|
389
|
+
catch (e) {
|
|
390
|
+
if (e instanceof ExprBudgetError)
|
|
391
|
+
throw new RuleBudgetError(e.sentence);
|
|
392
|
+
if (e instanceof ExprEvalError)
|
|
393
|
+
throw new Error(e.sentence);
|
|
394
|
+
throw e;
|
|
395
|
+
}
|
|
396
|
+
if (holds)
|
|
397
|
+
return [];
|
|
398
|
+
const repairList = repairs.flatMap((r) => {
|
|
399
|
+
const act = document.acts?.[r.act];
|
|
400
|
+
const args = {};
|
|
401
|
+
if (subject && (act?.on || /^(edit|remove)-/.test(r.act)))
|
|
402
|
+
args[SUBJECT_ARG] = subject.id;
|
|
403
|
+
for (const [k, v] of Object.entries(r.args ?? {}))
|
|
404
|
+
args[k] = refName(v) === "subject" ? subject?.id : v;
|
|
405
|
+
const declared = act ? plan.acts[r.act].args : [];
|
|
406
|
+
const missing = declared.filter(([k, a]) => a.required && args[k] === undefined).map(([k]) => k);
|
|
407
|
+
return [{ mutation: r.act, label: r.label ?? act?.title ?? r.act.replace(/-/g, " "), args, ...(missing.length > 0 ? { missing } : {}) }];
|
|
408
|
+
});
|
|
409
|
+
return [
|
|
410
|
+
{
|
|
411
|
+
invariant: name,
|
|
412
|
+
...(subject ? { subjectId: subject.id } : {}),
|
|
413
|
+
label: title,
|
|
414
|
+
message: says ? renderTemplate(says, { node: subject, kinds: shapes, graph, today: today(), money }) : subject ? `${labelFor(subject)}: ${title}` : title,
|
|
415
|
+
nodeIds: subject ? [subject.id] : [],
|
|
416
|
+
repairs: repairList,
|
|
417
|
+
},
|
|
418
|
+
];
|
|
419
|
+
};
|
|
420
|
+
const declared = {
|
|
421
|
+
label: title,
|
|
422
|
+
judgement: { require: rule.require, ...(rule.when ? { when: rule.when } : {}), ...(rule.says ? { says: rule.says } : {}) },
|
|
423
|
+
...(rule.description ? { description: rule.description } : {}),
|
|
424
|
+
...(repairs.length > 0 ? { repairs: repairs.map((r) => r.act) } : {}),
|
|
425
|
+
};
|
|
426
|
+
invariants.push((rule.over === "graph"
|
|
427
|
+
? defineInvariant(name, { scope: "graph", ...declared, evaluate: ({ graph }) => judge(graph, null) })
|
|
428
|
+
: defineInvariant(name, { scope: { kind: rule.over }, ...declared, evaluate: ({ graph, subject }) => judge(graph, subject) })));
|
|
429
|
+
}
|
|
430
|
+
// ── policy, brand, the rest ──────────────────────────────────────────────
|
|
431
|
+
/*
|
|
432
|
+
* WHO SEES WHAT is the app's, in the framework's one meaning (FR-02):
|
|
433
|
+
* absent, everybody sees everything; present, a kind no sight names is
|
|
434
|
+
* seen by nobody but the system, and `own` is the principal's own records.
|
|
435
|
+
*/
|
|
436
|
+
const policy = document.policy
|
|
437
|
+
? {
|
|
438
|
+
grants: document.policy.grants,
|
|
439
|
+
...(document.policy.sees ? { sees: document.policy.sees } : {}),
|
|
440
|
+
...(document.roles ? { roles: document.roles } : {}),
|
|
441
|
+
}
|
|
442
|
+
: undefined;
|
|
443
|
+
const app = {
|
|
444
|
+
name: document.name,
|
|
445
|
+
schema,
|
|
446
|
+
mutations,
|
|
447
|
+
invariants,
|
|
448
|
+
...(policy ? { policy } : {}),
|
|
449
|
+
...(plan.brand ? { brand: plan.brand } : {}),
|
|
450
|
+
...(document.modules ? { modules: document.modules } : {}),
|
|
451
|
+
...(document.lenses ? { lenses: document.lenses } : {}),
|
|
452
|
+
// The arrangement is the app's (FR-80): every face reads it beside the places.
|
|
453
|
+
...(document.pages ? { pages: document.pages } : {}),
|
|
454
|
+
...(document.settings ? { settings: document.settings } : {}),
|
|
455
|
+
// The document's views are the declaration's view specs (FR-03): data the framework draws.
|
|
456
|
+
...(plan.viewSpecs ? { viewSpecs: plan.viewSpecs } : {}),
|
|
457
|
+
// And its home view, about no one record, is the app's home (FR-81).
|
|
458
|
+
...(plan.home ? { home: plan.home } : {}),
|
|
459
|
+
version: document.version ?? 1,
|
|
460
|
+
};
|
|
461
|
+
// `toDocument(app)` gives this document back, byte for byte; `serializeCompiled(…)` this compiled app.
|
|
462
|
+
rememberDocument(app, document);
|
|
463
|
+
PLANS.set(app, plan);
|
|
464
|
+
return { ok: true, app, document, findings: plan.findings, sights: document.policy?.sees, kinds: shapes };
|
|
465
|
+
}
|
|
466
|
+
//# sourceMappingURL=compiled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compiled.js","sourceRoot":"","sources":["../../src/document/compiled.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,eAAe,EACf,cAAc,EACd,UAAU,EACV,eAAe,EACf,WAAW,GAWZ,MAAM,a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version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../src/document/edit.ts"],"names":[],"mappings":"AAIA,OAAO,EAAS,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;AAIpD,OAAO,EAWL,KAAK,eAAe,EACrB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../src/document/edit.ts"],"names":[],"mappings":"AAIA,OAAO,EAAS,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;AAIpD,OAAO,EAWL,KAAK,eAAe,EACrB,MAAM,aAAa,CAAC;AA4BrB,MAAM,WAAW,IAAI;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,qDAAqD;IACrD,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IACzB,mFAAmF;IACnF,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,MAAM,WAAW,GACnB;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,CAAA;CAAE,GAC5H;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,CAAA;CAAE,CAAC;AAElE,+CAA+C;AAC/C,eAAO,MAAM,QAAQ,maA6BX,CAAC;AACX,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/C,uFAAuF;AACvF,MAAM,MAAM,YAAY,GAAG;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,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/dist/document/edit.js
CHANGED
|
@@ -9,7 +9,7 @@ import { ActSpec, EDGE_NAME, EdgeSpec, FIELD_NAME, FIELD_TYPES, FieldSpec, KindS
|
|
|
9
9
|
import { SHIPPED_LENSES, isShippedLens, SHIPPED_LENS_NAMES } from "../places.js";
|
|
10
10
|
import { placeSlug } from "../views/types.js";
|
|
11
11
|
import { computedOf, validateComputed } from "./computed.js";
|
|
12
|
-
import { parseTemplate, templateBraces, TemplateError } from "./template.js";
|
|
12
|
+
import { parseTemplate, templateBraces, TemplateError } from "./template-parse.js";
|
|
13
13
|
import { validateViews, VIEW_SLOTS } from "./views.js";
|
|
14
14
|
/** The ops, for tool schemas and the guide. */
|
|
15
15
|
export const EDIT_OPS = [
|