@graview/core 0.1.0
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/LICENSE +96 -0
- package/README.md +35 -0
- package/dist/app.d.ts +294 -0
- package/dist/app.d.ts.map +1 -0
- package/dist/app.js +49 -0
- package/dist/app.js.map +1 -0
- package/dist/arrange.d.ts +185 -0
- package/dist/arrange.d.ts.map +1 -0
- package/dist/arrange.js +456 -0
- package/dist/arrange.js.map +1 -0
- package/dist/beginning.d.ts +65 -0
- package/dist/beginning.d.ts.map +1 -0
- package/dist/beginning.js +94 -0
- package/dist/beginning.js.map +1 -0
- package/dist/bind.d.ts +42 -0
- package/dist/bind.d.ts.map +1 -0
- package/dist/bind.js +26 -0
- package/dist/bind.js.map +1 -0
- package/dist/city.d.ts +93 -0
- package/dist/city.d.ts.map +1 -0
- package/dist/city.js +160 -0
- package/dist/city.js.map +1 -0
- package/dist/cli/check/arrangement.d.ts +13 -0
- package/dist/cli/check/arrangement.d.ts.map +1 -0
- package/dist/cli/check/arrangement.js +63 -0
- package/dist/cli/check/arrangement.js.map +1 -0
- package/dist/cli/check/beginnings.d.ts +16 -0
- package/dist/cli/check/beginnings.d.ts.map +1 -0
- package/dist/cli/check/beginnings.js +53 -0
- package/dist/cli/check/beginnings.js.map +1 -0
- package/dist/cli/check/brand.d.ts +17 -0
- package/dist/cli/check/brand.d.ts.map +1 -0
- package/dist/cli/check/brand.js +153 -0
- package/dist/cli/check/brand.js.map +1 -0
- package/dist/cli/check/city.d.ts +17 -0
- package/dist/cli/check/city.d.ts.map +1 -0
- package/dist/cli/check/city.js +58 -0
- package/dist/cli/check/city.js.map +1 -0
- package/dist/cli/check/context.d.ts +50 -0
- package/dist/cli/check/context.d.ts.map +1 -0
- package/dist/cli/check/context.js +37 -0
- package/dist/cli/check/context.js.map +1 -0
- package/dist/cli/check/fields.d.ts +16 -0
- package/dist/cli/check/fields.d.ts.map +1 -0
- package/dist/cli/check/fields.js +237 -0
- package/dist/cli/check/fields.js.map +1 -0
- package/dist/cli/check/index.d.ts +14 -0
- package/dist/cli/check/index.d.ts.map +1 -0
- package/dist/cli/check/index.js +14 -0
- package/dist/cli/check/index.js.map +1 -0
- package/dist/cli/check/intelligence.d.ts +17 -0
- package/dist/cli/check/intelligence.d.ts.map +1 -0
- package/dist/cli/check/intelligence.js +136 -0
- package/dist/cli/check/intelligence.js.map +1 -0
- package/dist/cli/check/lenses.d.ts +17 -0
- package/dist/cli/check/lenses.d.ts.map +1 -0
- package/dist/cli/check/lenses.js +239 -0
- package/dist/cli/check/lenses.js.map +1 -0
- package/dist/cli/check/migrations.d.ts +16 -0
- package/dist/cli/check/migrations.d.ts.map +1 -0
- package/dist/cli/check/migrations.js +43 -0
- package/dist/cli/check/migrations.js.map +1 -0
- package/dist/cli/check/modules.d.ts +16 -0
- package/dist/cli/check/modules.d.ts.map +1 -0
- package/dist/cli/check/modules.js +123 -0
- package/dist/cli/check/modules.js.map +1 -0
- package/dist/cli/check/policy.d.ts +16 -0
- package/dist/cli/check/policy.d.ts.map +1 -0
- package/dist/cli/check/policy.js +90 -0
- package/dist/cli/check/policy.js.map +1 -0
- package/dist/cli/check/relations.d.ts +29 -0
- package/dist/cli/check/relations.d.ts.map +1 -0
- package/dist/cli/check/relations.js +279 -0
- package/dist/cli/check/relations.js.map +1 -0
- package/dist/cli/check/routes.d.ts +16 -0
- package/dist/cli/check/routes.d.ts.map +1 -0
- package/dist/cli/check/routes.js +31 -0
- package/dist/cli/check/routes.js.map +1 -0
- package/dist/cli/check/settings.d.ts +16 -0
- package/dist/cli/check/settings.d.ts.map +1 -0
- package/dist/cli/check/settings.js +81 -0
- package/dist/cli/check/settings.js.map +1 -0
- package/dist/cli/check.d.ts +36 -0
- package/dist/cli/check.d.ts.map +1 -0
- package/dist/cli/check.js +76 -0
- package/dist/cli/check.js.map +1 -0
- package/dist/cli/create.d.ts +20 -0
- package/dist/cli/create.d.ts.map +1 -0
- package/dist/cli/create.js +251 -0
- package/dist/cli/create.js.map +1 -0
- package/dist/cli/describe.d.ts +35 -0
- package/dist/cli/describe.d.ts.map +1 -0
- package/dist/cli/describe.js +230 -0
- package/dist/cli/describe.js.map +1 -0
- package/dist/cli/docs.d.ts +11 -0
- package/dist/cli/docs.d.ts.map +1 -0
- package/dist/cli/docs.js +152 -0
- package/dist/cli/docs.js.map +1 -0
- package/dist/cli/index.d.ts +18 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +281 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/extend.d.ts +23 -0
- package/dist/extend.d.ts.map +1 -0
- package/dist/extend.js +53 -0
- package/dist/extend.js.map +1 -0
- package/dist/graph/diff.d.ts +31 -0
- package/dist/graph/diff.d.ts.map +1 -0
- package/dist/graph/diff.js +71 -0
- package/dist/graph/diff.js.map +1 -0
- package/dist/graph/graph.d.ts +69 -0
- package/dist/graph/graph.d.ts.map +1 -0
- package/dist/graph/graph.js +284 -0
- package/dist/graph/graph.js.map +1 -0
- package/dist/graph/primitives.d.ts +52 -0
- package/dist/graph/primitives.d.ts.map +1 -0
- package/dist/graph/primitives.js +62 -0
- package/dist/graph/primitives.js.map +1 -0
- package/dist/graph/tracked.d.ts +31 -0
- package/dist/graph/tracked.d.ts.map +1 -0
- package/dist/graph/tracked.js +69 -0
- package/dist/graph/tracked.js.map +1 -0
- package/dist/graph/types.d.ts +34 -0
- package/dist/graph/types.d.ts.map +1 -0
- package/dist/graph/types.js +0 -0
- package/dist/graph/types.js.map +1 -0
- package/dist/index.d.ts +100 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +90 -0
- package/dist/index.js.map +1 -0
- package/dist/installation.d.ts +112 -0
- package/dist/installation.d.ts.map +1 -0
- package/dist/installation.js +193 -0
- package/dist/installation.js.map +1 -0
- package/dist/intelligence-bridge.d.ts +73 -0
- package/dist/intelligence-bridge.d.ts.map +1 -0
- package/dist/intelligence-bridge.js +31 -0
- package/dist/intelligence-bridge.js.map +1 -0
- package/dist/invariants/engine.d.ts +36 -0
- package/dist/invariants/engine.d.ts.map +1 -0
- package/dist/invariants/engine.js +88 -0
- package/dist/invariants/engine.js.map +1 -0
- package/dist/invariants/types.d.ts +75 -0
- package/dist/invariants/types.d.ts.map +1 -0
- package/dist/invariants/types.js +2 -0
- package/dist/invariants/types.js.map +1 -0
- package/dist/modules.d.ts +75 -0
- package/dist/modules.d.ts.map +1 -0
- package/dist/modules.js +87 -0
- package/dist/modules.js.map +1 -0
- package/dist/mutations/decidable.d.ts +26 -0
- package/dist/mutations/decidable.d.ts.map +1 -0
- package/dist/mutations/decidable.js +39 -0
- package/dist/mutations/decidable.js.map +1 -0
- package/dist/mutations/define-mutation.d.ts +32 -0
- package/dist/mutations/define-mutation.d.ts.map +1 -0
- package/dist/mutations/define-mutation.js +181 -0
- package/dist/mutations/define-mutation.js.map +1 -0
- package/dist/mutations/derive-edits.d.ts +75 -0
- package/dist/mutations/derive-edits.d.ts.map +1 -0
- package/dist/mutations/derive-edits.js +240 -0
- package/dist/mutations/derive-edits.js.map +1 -0
- package/dist/mutations/form.d.ts +63 -0
- package/dist/mutations/form.d.ts.map +1 -0
- package/dist/mutations/form.js +113 -0
- package/dist/mutations/form.js.map +1 -0
- package/dist/mutations/node-ref.d.ts +83 -0
- package/dist/mutations/node-ref.d.ts.map +1 -0
- package/dist/mutations/node-ref.js +113 -0
- package/dist/mutations/node-ref.js.map +1 -0
- package/dist/mutations/types.d.ts +136 -0
- package/dist/mutations/types.d.ts.map +1 -0
- package/dist/mutations/types.js +2 -0
- package/dist/mutations/types.js.map +1 -0
- package/dist/ops/log.d.ts +35 -0
- package/dist/ops/log.d.ts.map +1 -0
- package/dist/ops/log.js +103 -0
- package/dist/ops/log.js.map +1 -0
- package/dist/ops/types.d.ts +52 -0
- package/dist/ops/types.d.ts.map +1 -0
- package/dist/ops/types.js +2 -0
- package/dist/ops/types.js.map +1 -0
- package/dist/ops/undo.d.ts +33 -0
- package/dist/ops/undo.d.ts.map +1 -0
- package/dist/ops/undo.js +65 -0
- package/dist/ops/undo.js.map +1 -0
- package/dist/permissions/policy.d.ts +68 -0
- package/dist/permissions/policy.d.ts.map +1 -0
- package/dist/permissions/policy.js +191 -0
- package/dist/permissions/policy.js.map +1 -0
- package/dist/permissions/types.d.ts +78 -0
- package/dist/permissions/types.d.ts.map +1 -0
- package/dist/permissions/types.js +17 -0
- package/dist/permissions/types.js.map +1 -0
- package/dist/persistence/memory.d.ts +6 -0
- package/dist/persistence/memory.d.ts.map +1 -0
- package/dist/persistence/memory.js +31 -0
- package/dist/persistence/memory.js.map +1 -0
- package/dist/persistence/sqlite.d.ts +59 -0
- package/dist/persistence/sqlite.d.ts.map +1 -0
- package/dist/persistence/sqlite.js +131 -0
- package/dist/persistence/sqlite.js.map +1 -0
- package/dist/persistence/types.d.ts +22 -0
- package/dist/persistence/types.d.ts.map +1 -0
- package/dist/persistence/types.js +2 -0
- package/dist/persistence/types.js.map +1 -0
- package/dist/presence.d.ts +38 -0
- package/dist/presence.d.ts.map +1 -0
- package/dist/presence.js +50 -0
- package/dist/presence.js.map +1 -0
- package/dist/scaffold/domain.d.ts +8 -0
- package/dist/scaffold/domain.d.ts.map +1 -0
- package/dist/scaffold/domain.js +331 -0
- package/dist/scaffold/domain.js.map +1 -0
- package/dist/scaffold/index.d.ts +66 -0
- package/dist/scaffold/index.d.ts.map +1 -0
- package/dist/scaffold/index.js +142 -0
- package/dist/scaffold/index.js.map +1 -0
- package/dist/scaffold/lens.d.ts +31 -0
- package/dist/scaffold/lens.d.ts.map +1 -0
- package/dist/scaffold/lens.js +176 -0
- package/dist/scaffold/lens.js.map +1 -0
- package/dist/scaffold/names.d.ts +44 -0
- package/dist/scaffold/names.d.ts.map +1 -0
- package/dist/scaffold/names.js +69 -0
- package/dist/scaffold/names.js.map +1 -0
- package/dist/scaffold/project.d.ts +41 -0
- package/dist/scaffold/project.d.ts.map +1 -0
- package/dist/scaffold/project.js +604 -0
- package/dist/scaffold/project.js.map +1 -0
- package/dist/scaffold/ui.d.ts +15 -0
- package/dist/scaffold/ui.d.ts.map +1 -0
- package/dist/scaffold/ui.js +536 -0
- package/dist/scaffold/ui.js.map +1 -0
- package/dist/schema/define-node.d.ts +132 -0
- package/dist/schema/define-node.d.ts.map +1 -0
- package/dist/schema/define-node.js +254 -0
- package/dist/schema/define-node.js.map +1 -0
- package/dist/schema/figures.d.ts +42 -0
- package/dist/schema/figures.d.ts.map +1 -0
- package/dist/schema/figures.js +220 -0
- package/dist/schema/figures.js.map +1 -0
- package/dist/schema/json-schema.d.ts +39 -0
- package/dist/schema/json-schema.d.ts.map +1 -0
- package/dist/schema/json-schema.js +74 -0
- package/dist/schema/json-schema.js.map +1 -0
- package/dist/schema/schema.d.ts +43 -0
- package/dist/schema/schema.d.ts.map +1 -0
- package/dist/schema/schema.js +102 -0
- package/dist/schema/schema.js.map +1 -0
- package/dist/schema/types.d.ts +201 -0
- package/dist/schema/types.d.ts.map +1 -0
- package/dist/schema/types.js +2 -0
- package/dist/schema/types.js.map +1 -0
- package/dist/search.d.ts +215 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +449 -0
- package/dist/search.js.map +1 -0
- package/dist/settings.d.ts +30 -0
- package/dist/settings.d.ts.map +1 -0
- package/dist/settings.js +74 -0
- package/dist/settings.js.map +1 -0
- package/dist/store.d.ts +284 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +660 -0
- package/dist/store.js.map +1 -0
- package/dist/studio-door.d.ts +187 -0
- package/dist/studio-door.d.ts.map +1 -0
- package/dist/studio-door.js +20 -0
- package/dist/studio-door.js.map +1 -0
- package/dist/sync/conflict.d.ts +37 -0
- package/dist/sync/conflict.d.ts.map +1 -0
- package/dist/sync/conflict.js +56 -0
- package/dist/sync/conflict.js.map +1 -0
- package/dist/sync/engine.d.ts +118 -0
- package/dist/sync/engine.d.ts.map +1 -0
- package/dist/sync/engine.js +341 -0
- package/dist/sync/engine.js.map +1 -0
- package/dist/sync/google-calendar.d.ts +54 -0
- package/dist/sync/google-calendar.d.ts.map +1 -0
- package/dist/sync/google-calendar.js +167 -0
- package/dist/sync/google-calendar.js.map +1 -0
- package/dist/sync/types.d.ts +125 -0
- package/dist/sync/types.d.ts.map +1 -0
- package/dist/sync/types.js +6 -0
- package/dist/sync/types.js.map +1 -0
- package/dist/temporal/effectivity.d.ts +75 -0
- package/dist/temporal/effectivity.d.ts.map +1 -0
- package/dist/temporal/effectivity.js +89 -0
- package/dist/temporal/effectivity.js.map +1 -0
- package/dist/testing.d.ts +63 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +194 -0
- package/dist/testing.js.map +1 -0
- package/dist/theme/contrast.d.ts +47 -0
- package/dist/theme/contrast.d.ts.map +1 -0
- package/dist/theme/contrast.js +172 -0
- package/dist/theme/contrast.js.map +1 -0
- package/dist/theme/derive.d.ts +81 -0
- package/dist/theme/derive.d.ts.map +1 -0
- package/dist/theme/derive.js +171 -0
- package/dist/theme/derive.js.map +1 -0
- package/dist/theme/kit.d.ts +106 -0
- package/dist/theme/kit.d.ts.map +1 -0
- package/dist/theme/kit.js +84 -0
- package/dist/theme/kit.js.map +1 -0
- package/dist/theme/palettes.d.ts +32 -0
- package/dist/theme/palettes.d.ts.map +1 -0
- package/dist/theme/palettes.js +96 -0
- package/dist/theme/palettes.js.map +1 -0
- package/dist/theme/types.d.ts +131 -0
- package/dist/theme/types.d.ts.map +1 -0
- package/dist/theme/types.js +23 -0
- package/dist/theme/types.js.map +1 -0
- package/dist/views/types.d.ts +89 -0
- package/dist/views/types.d.ts.map +1 -0
- package/dist/views/types.js +88 -0
- package/dist/views/types.js.map +1 -0
- package/dist/watched.d.ts +33 -0
- package/dist/watched.d.ts.map +1 -0
- package/dist/watched.js +50 -0
- package/dist/watched.js.map +1 -0
- package/dist/who.d.ts +26 -0
- package/dist/who.d.ts.map +1 -0
- package/dist/who.js +20 -0
- package/dist/who.js.map +1 -0
- package/package.json +77 -0
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { arrangeable } from "../arrange.js";
|
|
2
|
+
import { searchableFields } from "../search.js";
|
|
3
|
+
import { capabilitiesOf, describeCapability } from "../app.js";
|
|
4
|
+
import { beginning } from "../beginning.js";
|
|
5
|
+
import { cityMap, roadsOf } from "../city.js";
|
|
6
|
+
import { deriveMutations } from "../mutations/derive-edits.js";
|
|
7
|
+
import { hueFor } from "../theme/derive.js";
|
|
8
|
+
import { withArticle } from "../schema/define-node.js";
|
|
9
|
+
/** Whether a seat may run one named act, by the declaration's own grants. */
|
|
10
|
+
function permits(app, act, seat) {
|
|
11
|
+
if (!app.policy)
|
|
12
|
+
return true;
|
|
13
|
+
const held = seat.roles ?? [];
|
|
14
|
+
return (app.policy.grants ?? []).some((grant) => (grant.roles === "*" || held.some((role) => grant.roles.includes(role))) &&
|
|
15
|
+
(grant.mutations === "*" || grant.mutations.includes(act)));
|
|
16
|
+
}
|
|
17
|
+
const list = (words) => words.length === 0 ? "none" : words.length === 1 ? words[0] : `${words.slice(0, -1).join(", ")} and ${words[words.length - 1]}`;
|
|
18
|
+
export function describeApp(app, options = {}) {
|
|
19
|
+
const kinds = [...app.schema.kinds];
|
|
20
|
+
const declared = app.mutations ?? [];
|
|
21
|
+
const acts = [...declared, ...deriveMutations(app.schema, declared)];
|
|
22
|
+
const lines = [`${app.name} — ${kinds.length} kinds, ${acts.length} acts (${declared.length} declared, ${acts.length - declared.length} derived).`];
|
|
23
|
+
/*
|
|
24
|
+
* WHAT A BLANK INSTALLATION MEETS. The first screen of every product, the
|
|
25
|
+
* one the author never sees because their own graph has data in it.
|
|
26
|
+
*/
|
|
27
|
+
const chain = beginning(app);
|
|
28
|
+
lines.push("", "## Opening it empty");
|
|
29
|
+
if (chain.doors.length === 0) {
|
|
30
|
+
lines.push(`Nothing can be made. Every act that creates a kind needs a node that does not exist yet, so a blank installation is ${kinds.length} districts and no way in.`);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
/*
|
|
34
|
+
* AND WHETHER THIS SEAT MAY GO THROUGH ANY OF THEM.
|
|
35
|
+
*
|
|
36
|
+
* The chain is a property of the declaration and the same for everyone;
|
|
37
|
+
* the doors are not. An observer reading "7 of 12 kinds can begin" is
|
|
38
|
+
* being told about somebody else's product — they can begin none of
|
|
39
|
+
* them, and the useful sentence names who can. The same mistake was
|
|
40
|
+
* shipped in `<Begin>`, which drew ten kinds and offered no acts to a
|
|
41
|
+
* seat the policy refused, so it is worth saying in both places.
|
|
42
|
+
*/
|
|
43
|
+
const open = options.as === undefined ? chain.doors : chain.doors.filter((door) => permits(app, door, options.as));
|
|
44
|
+
if (open.length === 0) {
|
|
45
|
+
lines.push(`Nothing here is this seat's to begin. ${chain.roots.length} of ${kinds.length} kinds can be started — ` +
|
|
46
|
+
`${list(chain.roots)} — and ${list(chain.doors.map((door) => `"${door}"`))} ${chain.doors.length === 1 ? "is" : "are"} not permitted to it.`);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
lines.push(`${chain.roots.length} of ${kinds.length} kinds can begin: ${list(chain.roots)} — through ${list(open.map((door) => `"${door}"`))}${open.length < chain.doors.length ? ` (${chain.doors.length - open.length} more not permitted to this seat)` : ""}.`);
|
|
50
|
+
}
|
|
51
|
+
const waiting = chain.order.filter((entry) => (entry.depth ?? 0) > 0 && entry.depth !== null);
|
|
52
|
+
for (const entry of waiting) {
|
|
53
|
+
lines.push(` ${entry.kind} waits for ${list(entry.needs)} (${entry.depth} deep).`);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
for (const entry of chain.unreachable) {
|
|
57
|
+
lines.push(` ${entry.kind} can never be made here — ${entry.why}.`);
|
|
58
|
+
}
|
|
59
|
+
/*
|
|
60
|
+
* WHAT IS DRAWN, and what falls back. A kind with no view of its own is a
|
|
61
|
+
* legitimate state and an invisible one: the framework's own list is
|
|
62
|
+
* tidy enough that nobody notices the picture was never written.
|
|
63
|
+
*/
|
|
64
|
+
lines.push("", "## What is drawn");
|
|
65
|
+
if (!app.views) {
|
|
66
|
+
/*
|
|
67
|
+
* NOT "there are no views" — "nothing here can see them".
|
|
68
|
+
*
|
|
69
|
+
* A view registry is optional on `defineApp`, and most apps build theirs
|
|
70
|
+
* in the UI package where the components are. That is a reasonable
|
|
71
|
+
* place for it and it means the pictures are invisible to everything
|
|
72
|
+
* outside a browser: this, `graview check`'s kind-without-view, and the
|
|
73
|
+
* docs generator all go quiet rather than wrong. Saying which of the two
|
|
74
|
+
* this is matters more than the count.
|
|
75
|
+
*/
|
|
76
|
+
lines.push(`The pictures live in the UI package, which the declaration cannot import, so this cannot see what is drawn — that is the design, not neglect. Run it with --views ./dist/ui/views.js (a module exporting \`views\`, or the registry as default) and this, check and docs read the pictures: which kinds have one of their own, which places are named, which have a drive-in.`);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
const registered = new Set(app.views.kindsWithViews());
|
|
80
|
+
const withOwn = kinds.filter((kind) => registered.has(kind));
|
|
81
|
+
lines.push(withOwn.length === 0
|
|
82
|
+
? `No kind has a view of its own; every district draws the framework's list.`
|
|
83
|
+
: `${withOwn.length} of ${kinds.length} kinds have a view of their own: ${list(withOwn)}.`);
|
|
84
|
+
const bare = kinds.filter((kind) => !registered.has(kind));
|
|
85
|
+
if (bare.length > 0)
|
|
86
|
+
lines.push(` Drawn by the framework's list: ${list(bare)}.`);
|
|
87
|
+
const places = app.views.places?.() ?? [];
|
|
88
|
+
lines.push(places.length === 0
|
|
89
|
+
? "No group view is titled, so the bar lists no places, a page can link to none, and no district has a drive-in."
|
|
90
|
+
: `${places.length} named places: ${list(places.map((place) => `"${place.title}" over the ${place.kind}s`))}.`);
|
|
91
|
+
const driveIns = [...new Set(places.map((place) => place.kind))];
|
|
92
|
+
if (driveIns.length > 0) {
|
|
93
|
+
lines.push(` Drive-ins from altitude: ${list(driveIns)}; the rest open in place.`);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
/*
|
|
97
|
+
* WHAT A PICTURE CAN BE ASKED TO DO. An agent that cannot see the row can
|
|
98
|
+
* still write the stop — `in.sort=due:desc`, `in.group=held-at` — if it
|
|
99
|
+
* knows the words; and the words are the declaration's.
|
|
100
|
+
*/
|
|
101
|
+
lines.push("", "## What can be arranged");
|
|
102
|
+
lines.push("Any picture over a kind sorts, filters and groups it through in.sort, in.filter and in.group in the stop (a page's ?sort, ?filter, ?group, ?q):");
|
|
103
|
+
for (const kind of kinds) {
|
|
104
|
+
const offers = arrangeable(app.schema, kind);
|
|
105
|
+
const say = (entries) => entries.map((offer) => `${offer.key} (${offer.label.toLowerCase()})`);
|
|
106
|
+
lines.push(` ${kind}: sort by ${list(say(offers.sorts))}; filter by ${list(say(offers.filters))}; group by ${offers.groups.length === 0 ? "nothing" : list(say(offers.groups))}` +
|
|
107
|
+
`${offers.natural ? `; sorted by ${offers.natural.by} unless asked` : ""}.`);
|
|
108
|
+
}
|
|
109
|
+
for (const lens of app.lenses ?? []) {
|
|
110
|
+
if (!lens.arrangedBy)
|
|
111
|
+
continue;
|
|
112
|
+
const words = Object.entries(lens.arrangedBy).map(([part, value]) => `${part}=${value}`);
|
|
113
|
+
lines.push(` The ${lens.name} lens opens with ${list(words)}.`);
|
|
114
|
+
}
|
|
115
|
+
/*
|
|
116
|
+
* WHAT THE WORDS REACH. The Find box, `/search` and `search_graph` read the
|
|
117
|
+
* name and every field a person reads on a record; an agent that knows
|
|
118
|
+
* which is an agent that searches rather than reading the whole graph.
|
|
119
|
+
*/
|
|
120
|
+
lines.push("", "## What can be found");
|
|
121
|
+
lines.push("The Find box (/ or ⌘K), /search?q= and the search_graph tool match the start of words in:");
|
|
122
|
+
for (const kind of kinds) {
|
|
123
|
+
const fields = searchableFields(app.schema, kind).map((field) => `${field.key} (${field.reading.toLowerCase()})`);
|
|
124
|
+
const lifecycle = app.schema.tryDefinition(kind)?.lifecycle;
|
|
125
|
+
lines.push(` ${kind}: ${list(fields)}${lifecycle ? "; past records only with is:any" : ""}.`);
|
|
126
|
+
}
|
|
127
|
+
lines.push(" key:value tokens narrow as a list's filter does, and kind:<kind> to one kind.");
|
|
128
|
+
const authored = (app.lenses ?? []).filter((lens) => !["timeline", "coverage", "board", "calendar", "reach"].includes(lens.name));
|
|
129
|
+
if (authored.length > 0) {
|
|
130
|
+
lines.push(`Lenses this app wrote: ${list(authored.map((lens) => lens.provenBy
|
|
131
|
+
? `${lens.name} (reuse proved in ${lens.provenBy})`
|
|
132
|
+
: `${lens.name} (reuse unproved)`))}.`);
|
|
133
|
+
}
|
|
134
|
+
/*
|
|
135
|
+
* THE HUES, IN DEGREES. Six kinds all landing within a few degrees of each
|
|
136
|
+
* other is a city drawn in one colour, which reads as a rendering fault
|
|
137
|
+
* and is a declaration the author can change.
|
|
138
|
+
*/
|
|
139
|
+
const hues = kinds.map((kind) => ({ kind, hue: Math.round(hueFor(kind, app.brand?.accents)) }));
|
|
140
|
+
const crowded = hues.filter((a, index) => hues.some((b, other) => other !== index && Math.abs(a.hue - b.hue) < 12));
|
|
141
|
+
lines.push(`Hues: ${hues.map((entry) => `${entry.kind} ${entry.hue}°`).join(", ")}.` +
|
|
142
|
+
(crowded.length > 1 ? ` ${list(crowded.map((entry) => entry.kind))} are within 12° of each other and will read as one colour.` : ""));
|
|
143
|
+
/*
|
|
144
|
+
* WHAT A SEAT CAN DO. A policy with roles and a principal holding none of
|
|
145
|
+
* them refuses everything, and the app looks broken rather than guarded —
|
|
146
|
+
* which is a whole product's worth of struck-through buttons and no
|
|
147
|
+
* error anywhere.
|
|
148
|
+
*/
|
|
149
|
+
if (app.policy) {
|
|
150
|
+
lines.push("", "## Who may do what");
|
|
151
|
+
const roles = app.policy.roles ?? [];
|
|
152
|
+
lines.push(`${roles.length} roles: ${list([...roles])}.`);
|
|
153
|
+
const asked = options.as;
|
|
154
|
+
if (asked) {
|
|
155
|
+
const held = asked.roles ?? [];
|
|
156
|
+
const permitted = acts.filter((act) => permits(app, act.name, asked));
|
|
157
|
+
lines.push(`As ${asked.id ?? asked.kind} holding ${list([...held])}: ${permitted.length} of ${acts.length} acts permitted.` +
|
|
158
|
+
(permitted.length === 0
|
|
159
|
+
? " Every act in the product would be struck through — check the principal holds a role the policy grants."
|
|
160
|
+
: ""));
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
lines.push(`Pass --as <role> to see what one seat is offered; a principal holding no granted role is refused everything, silently.`);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
/* HOW A MODEL IS REACHED, and whether anything actually serves the door. */
|
|
167
|
+
const providers = app.intelligence ?? [];
|
|
168
|
+
if (providers.length > 0) {
|
|
169
|
+
lines.push("", "## Intelligence");
|
|
170
|
+
for (const provider of providers) {
|
|
171
|
+
const doors = provider.kind === "graph"
|
|
172
|
+
? "it IS the graph, so there is no door"
|
|
173
|
+
: provider.reach?.length
|
|
174
|
+
? `reached by ${list([...provider.reach])}`
|
|
175
|
+
: "no door declared, so nothing derived can offer one";
|
|
176
|
+
/*
|
|
177
|
+
* A decision provider is read out for what it IS: typed answers, never
|
|
178
|
+
* prose. A reader deciding whether to offer it in a chat, or to a
|
|
179
|
+
* field that wants filling, needs that sentence more than the doors.
|
|
180
|
+
*/
|
|
181
|
+
const nature = provider.kind === "decision"
|
|
182
|
+
? " Answers typed questions only — a choice, a truth, a score — and never prose, so no chat seat offers it."
|
|
183
|
+
: "";
|
|
184
|
+
lines.push(`${provider.name} (${provider.kind}) — ${doors}; may ${provider.may ? list([...provider.may]) : "every act"}.${nature}`);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
/*
|
|
188
|
+
* THE LADDER, READ OUT. Which rungs this app declares and what each can
|
|
189
|
+
* do — so a reader knows, before opening it, that on a decision rung the
|
|
190
|
+
* chat seat will be answered by the graph, and that a prose-only door is
|
|
191
|
+
* not a rung a field can be filled from. The graph rung is always there,
|
|
192
|
+
* declared or not: it is what everything falls down to.
|
|
193
|
+
*/
|
|
194
|
+
lines.push("", "## The ladder");
|
|
195
|
+
const graphDeclared = providers.some((provider) => provider.kind === "graph");
|
|
196
|
+
lines.push(`graph only (${graphDeclared ? "declared" : "always there, undeclared"}) — ${capabilitiesOf("graph").map(describeCapability).join("; ")}. Keyless; every capability a rung cannot serve falls down to it.`);
|
|
197
|
+
for (const provider of providers) {
|
|
198
|
+
if (provider.kind === "graph")
|
|
199
|
+
continue;
|
|
200
|
+
const serves = capabilitiesOf(provider.kind);
|
|
201
|
+
const cannot = ["prose", "decide", "propose"].filter((capability) => !serves.includes(capability));
|
|
202
|
+
lines.push(`${provider.name} (${provider.kind}) — ${serves.map(describeCapability).join("; ")}.` +
|
|
203
|
+
(cannot.length > 0
|
|
204
|
+
? ` Cannot ${cannot.map((capability) => ({ prose: "talk", decide: "decide", propose: "propose" })[capability]).join(" or ")}: on this rung the graph answers that instead.`
|
|
205
|
+
: ""));
|
|
206
|
+
}
|
|
207
|
+
/*
|
|
208
|
+
* THE CITY, READ OUT. Where each kind stands and which roads join them —
|
|
209
|
+
* the first thing outside a browser that can say what is drawn, because
|
|
210
|
+
* the map is drawn from the declaration and nothing else. Sides are
|
|
211
|
+
* empty here: an installation's population is not the declaration's.
|
|
212
|
+
*/
|
|
213
|
+
const map = cityMap(app.schema, { order: chain.order.map((entry) => entry.kind) });
|
|
214
|
+
lines.push("", "## The city");
|
|
215
|
+
for (const [kind, plot] of map)
|
|
216
|
+
lines.push(`${kind} at (${plot.col}, ${plot.row})`);
|
|
217
|
+
const roads = roadsOf(app.schema, map);
|
|
218
|
+
lines.push(roads.length === 0 ? "No roads: no kind declares an edge to another." : `Roads: ${roads.map((road) => `${road.from} — ${road.to} by ${road.edges.join(", ")}`).join("; ")}.`);
|
|
219
|
+
/* WHAT IS JUDGED. A rule with no repair is a problem a person is told about and cannot fix. */
|
|
220
|
+
const invariants = app.invariants ?? [];
|
|
221
|
+
lines.push("", "## What is judged");
|
|
222
|
+
if (invariants.length === 0)
|
|
223
|
+
lines.push("No rules. Nothing about this graph can be wrong.");
|
|
224
|
+
for (const invariant of invariants) {
|
|
225
|
+
const scope = invariant.scope === "graph" ? "the whole graph" : `each ${withArticle(invariant.scope.kind).slice(2)}`;
|
|
226
|
+
lines.push(`${invariant.name} over ${scope} — ${invariant.repairs?.length ? `repairs with ${list([...invariant.repairs])}` : "NO REPAIR: a person is told and cannot act"}.`);
|
|
227
|
+
}
|
|
228
|
+
return lines.join("\n");
|
|
229
|
+
}
|
|
230
|
+
//# sourceMappingURL=describe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"describe.js","sourceRoot":"","sources":["../../src/cli/describe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAyD,MAAM,WAAW,CAAC;AACtH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AA+BvD,6EAA6E;AAC7E,SAAS,OAAO,CACd,GAAkB,EAClB,GAAW,EACX,IAA4C;IAE5C,IAAI,CAAC,GAAG,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;IAC9B,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,IAAI,CACnC,CAAC,KAAK,EAAE,EAAE,CACR,CAAC,KAAK,CAAC,KAAK,KAAK,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAE,KAAK,CAAC,KAA2B,CAAC,QAAQ,CAAC,IAA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AAK,CAAC;QAAE,KAAK,CAAC,IAAI,CAAC,kDAAkD,CAAC,CAAC;IAC5F,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,QAAQ,WAAW,CAAE,SAAS,CAAC,KAA0B,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3I,KAAK,CAAC,IAAI,CACR,GAAG,SAAS,CAAC,IAAI,SAAS,KAAK,MAC7B,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,gBAAgB,IAAI,CAAC,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,4CAC/E,GAAG,CACJ,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { GraviewApp } from "../app.js";
|
|
2
|
+
import type { AnySchema } from "../schema/schema.js";
|
|
3
|
+
/**
|
|
4
|
+
* Generates the file an agent reads before touching this app: what kinds
|
|
5
|
+
* exist, what edges are legal, which mutations are the only way to change
|
|
6
|
+
* anything, and what the invariants will refuse.
|
|
7
|
+
*/
|
|
8
|
+
export declare function generateLlmsTxt<S extends AnySchema>(app: GraviewApp<S>): string;
|
|
9
|
+
/** The agent-facing instruction file, generated from the same declarations. */
|
|
10
|
+
export declare function generateAgentsMd<S extends AnySchema>(app: GraviewApp<S>): string;
|
|
11
|
+
//# sourceMappingURL=docs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/cli/docs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAG5C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,SAAS,EAAE,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,MAAM,CAsK/E;AAOD,+EAA+E;AAC/E,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,SAAS,EAAE,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,MAAM,CA8ChF"}
|
package/dist/cli/docs.js
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { arrangeable } from "../arrange.js";
|
|
2
|
+
import { searchableFields } from "../search.js";
|
|
3
|
+
import { deriveMutations } from "../mutations/derive-edits.js";
|
|
4
|
+
import { mutationToolSchema } from "../schema/json-schema.js";
|
|
5
|
+
/**
|
|
6
|
+
* Generates the file an agent reads before touching this app: what kinds
|
|
7
|
+
* exist, what edges are legal, which mutations are the only way to change
|
|
8
|
+
* anything, and what the invariants will refuse.
|
|
9
|
+
*/
|
|
10
|
+
export function generateLlmsTxt(app) {
|
|
11
|
+
const lines = [];
|
|
12
|
+
lines.push(`# ${app.name}`, "");
|
|
13
|
+
lines.push("A Graview context graph. The graph is the interface: every change is a", "typed mutation, every mutation previews as a diff, and the invariants", "below are checked before anything applies.", "");
|
|
14
|
+
lines.push("## Node kinds", "");
|
|
15
|
+
for (const definition of app.schema.definitions) {
|
|
16
|
+
const fields = Object.keys(definition.fields.shape);
|
|
17
|
+
lines.push(`### ${definition.kind}`);
|
|
18
|
+
if (definition.description)
|
|
19
|
+
lines.push(definition.description);
|
|
20
|
+
lines.push(`- fields: ${fields.join(", ")}`);
|
|
21
|
+
const edges = Object.entries(definition.edges);
|
|
22
|
+
if (edges.length > 0) {
|
|
23
|
+
for (const [kind, edge] of edges) {
|
|
24
|
+
const target = edge.to === "*" ? "any kind" : edge.to.join(" | ");
|
|
25
|
+
lines.push(`- edge \`${kind}\` -> ${target}${edge.cardinality === "one" ? " (at most one)" : ""}${edge.description ? ` — ${edge.description}` : ""}`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
if (definition.fieldRoles) {
|
|
29
|
+
lines.push(`- field roles: ${Object.entries(definition.fieldRoles)
|
|
30
|
+
.map(([role, field]) => `${role}=${field}`)
|
|
31
|
+
.join(", ")}`);
|
|
32
|
+
}
|
|
33
|
+
const offers = arrangeable(app.schema, definition.kind);
|
|
34
|
+
lines.push(`- arranged by: sort ${offers.sorts.map((offer) => offer.key).join(" | ")}; filter ${offers.filters.map((offer) => offer.key).join(" | ")}; group ${offers.groups.map((offer) => offer.key).join(" | ") || "nothing"}${offers.natural ? `; ${offers.natural.by} unless asked` : ""}`);
|
|
35
|
+
lines.push(`- searched by: ${searchableFields(app.schema, definition.kind).map((field) => field.key).join(", ")}${definition.lifecycle ? "; past records only with is:any" : ""}`);
|
|
36
|
+
lines.push("");
|
|
37
|
+
}
|
|
38
|
+
lines.push("## Finding a thing", "");
|
|
39
|
+
lines.push("One matcher answers the Find box in the scene (`/` or ⌘K; `#q=` in the stop), the", "`/search?q=` page, a list page's `?q=`, and the `search_graph` tool — reach for", "that before `get_graph` when you know what a thing is called. Words match the start", "of words in a record's name and in the fields each kind above is searched by, case,", "accents and punctuation aside; not fuzzy. It also names kinds by their plural,", "places by their title and rules by their name. `key:value` tokens are the", "arrangement's conditions, applied to the kinds that offer them (`van done:false`);", "`kind:<kind>` narrows to a kind; past records are found only with `is:any`.", "");
|
|
40
|
+
lines.push("## Arranging a picture", "");
|
|
41
|
+
lines.push("Every picture over a kind — the list page, a board, a calendar — takes an", "arrangement in its address, in one grammar: `sort=<key>[:desc]`,", "`filter=<key>:<value>[,<key>:<value>]`, `group=<key>[:day|week|month]`, `q=<words>`.", "A page carries them in its search (`/tasks?sort=due:desc&filter=done:false`);", "a picture in the scene carries them in the fragment as `in.sort`, `in.filter`,", "`in.group`, `in.q`. A filter value is a field's value, `before:`/`after:`/`on:` a", "date, a node id, `*` or `none` for an edge, and `current`/`past`/`any`/`flagged`/", "`clear` for `is`. Each kind above says what it offers.", "");
|
|
42
|
+
lines.push("## Mutations", "");
|
|
43
|
+
lines.push("These are the only writes. Nothing else may change the graph.", "");
|
|
44
|
+
for (const mutation of allMutationsOf(app)) {
|
|
45
|
+
const tool = mutationToolSchema(mutation);
|
|
46
|
+
lines.push(`### ${mutation.name}`);
|
|
47
|
+
lines.push(tool.description);
|
|
48
|
+
if (mutation.subject) {
|
|
49
|
+
const kinds = mutation.subject.kinds === "*"
|
|
50
|
+
? "any node"
|
|
51
|
+
: mutation.subject.kinds.join(" | ");
|
|
52
|
+
lines.push(`- acts on: ${kinds} (argument \`${mutation.subject.arg}\`)`);
|
|
53
|
+
}
|
|
54
|
+
lines.push("```json");
|
|
55
|
+
lines.push(JSON.stringify(tool.inputSchema, null, 2));
|
|
56
|
+
lines.push("```", "");
|
|
57
|
+
}
|
|
58
|
+
lines.push("Two things the framework adds to every act above. An act that creates a kind", "takes an optional `id`: the id of the node it makes, refused if the graph", "already has it. And every kind has `remove-<kind>`, derived: it takes the", "node and its ties out, and is permitted through the acts that create the", "kind or a grant naming it.", "");
|
|
59
|
+
lines.push("## Attaching an agent", "");
|
|
60
|
+
lines.push("The live graph is not the seed file. Do not edit the seed to change what", "the app shows; act on the store where it is:", "", "```sh", `graview mcp <entry> --data ./data --as <you> --roles <role,…> # MCP over stdio, the tools above`, `graview mcp <entry> --remote-url <url> --header "authorization: …" # the same, against graview serve`, `graview apply <entry> --data ./data --roles <role> --call <act> --args '{…}'`, `graview apply <entry> --data ./data --roles <role> --plan plan.json [--preview]`, `graview sync-seed <entry> --seed <file> --data ./data [--apply] # default content, moved without a wipe`, "```", "", "Every change goes through `store.apply` under your seat and is judged by the", "policy, logged with your name, previewable first and undoable after. A plan", "is a JSON array of `{ mutation, args, as? }`; a later call names an earlier", "one's node as `{ \"$plan\": \"<as>\" }` and the whole plan is one batch.", "");
|
|
61
|
+
lines.push("## Invariants", "");
|
|
62
|
+
for (const invariant of app.invariants ?? []) {
|
|
63
|
+
const scope = invariant.scope === "graph" ? "whole graph" : `each ${invariant.scope.kind}`;
|
|
64
|
+
lines.push(`- **${invariant.name}** (${scope}) — ${invariant.description ?? invariant.label ?? ""}`);
|
|
65
|
+
if (invariant.repairs?.length) {
|
|
66
|
+
lines.push(` repairs: ${invariant.repairs.join(", ")}`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
lines.push("");
|
|
70
|
+
if (app.intelligence?.length) {
|
|
71
|
+
lines.push("## Intelligence", "");
|
|
72
|
+
for (const provider of app.intelligence) {
|
|
73
|
+
lines.push(`### ${provider.name} (${provider.kind})`);
|
|
74
|
+
if (provider.description)
|
|
75
|
+
lines.push("", provider.description);
|
|
76
|
+
if (provider.kind === "decision") {
|
|
77
|
+
lines.push("", "Answers typed questions only — a choice over declared options, a truth, a score over a declared rubric — with a confidence, and never prose. Not a conversational seat.");
|
|
78
|
+
}
|
|
79
|
+
/* THE DOORS, so a reader knows how to reach it rather than guessing. */
|
|
80
|
+
if (provider.reach?.length) {
|
|
81
|
+
lines.push("", `Reached by: ${provider.reach.join(", ")}.`);
|
|
82
|
+
if (provider.bridge)
|
|
83
|
+
lines.push(`The local door answers at \`${provider.bridge}\`.`);
|
|
84
|
+
if (provider.keyStorage)
|
|
85
|
+
lines.push(`A key given here is kept ${provider.keyStorage}.`);
|
|
86
|
+
}
|
|
87
|
+
lines.push("", `May: ${provider.may?.join(", ") ?? "every registered mutation"}.`, "");
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if (app.views) {
|
|
91
|
+
lines.push("## Views", "");
|
|
92
|
+
lines.push("Views form a matrix of cardinality (one / many) and fidelity", "(full / summary / glyph). The framework picks the cell from plane depth.", "");
|
|
93
|
+
for (const view of app.views.all()) {
|
|
94
|
+
lines.push(`- ${view.kind}: ${view.cardinality} / ${view.fidelity}`);
|
|
95
|
+
}
|
|
96
|
+
lines.push("");
|
|
97
|
+
}
|
|
98
|
+
return lines.join("\n");
|
|
99
|
+
}
|
|
100
|
+
/** Declared and derived alike: the surface an agent seat actually gets. */
|
|
101
|
+
function allMutationsOf(app) {
|
|
102
|
+
return [...(app.mutations ?? []), ...deriveMutations(app.schema, app.mutations ?? [])];
|
|
103
|
+
}
|
|
104
|
+
/** The agent-facing instruction file, generated from the same declarations. */
|
|
105
|
+
export function generateAgentsMd(app) {
|
|
106
|
+
const mutationNames = allMutationsOf(app).map((m) => m.name);
|
|
107
|
+
return [
|
|
108
|
+
`# ${app.name} — working notes for agents`,
|
|
109
|
+
"",
|
|
110
|
+
"This app is built on Graview. Three rules follow from that, and they are",
|
|
111
|
+
"the whole contract:",
|
|
112
|
+
"",
|
|
113
|
+
"1. **The graph is the interface.** Do not write to storage. Every change",
|
|
114
|
+
" goes through a typed mutation so it carries attribution, an inverse,",
|
|
115
|
+
" and the set of nodes it read.",
|
|
116
|
+
`2. **Only these mutations exist:** ${mutationNames.join(", ") || "(none registered)"}.`,
|
|
117
|
+
" A change you cannot express as one of them is a change the app has",
|
|
118
|
+
" not agreed to; add a mutation rather than reaching around it.",
|
|
119
|
+
"3. **Preview before you apply.** Every mutation previews as a diff plus",
|
|
120
|
+
" the invariants it would break. A preview that introduces a violation",
|
|
121
|
+
" is a proposal, not a fix.",
|
|
122
|
+
"",
|
|
123
|
+
"Run `graview check` after editing any declaration. It reports schema",
|
|
124
|
+
"problems in terms of the declaration to change.",
|
|
125
|
+
"",
|
|
126
|
+
"## Evolving a live store",
|
|
127
|
+
"",
|
|
128
|
+
"- **The seed is a bootstrap snapshot,** read once into an empty store. To",
|
|
129
|
+
" change what a running app shows, act on its store — `graview mcp`,",
|
|
130
|
+
" `graview apply`, or the interface — never by editing the seed and wiping.",
|
|
131
|
+
" When the default content itself moves, `graview sync-seed` lands the",
|
|
132
|
+
" difference as one undoable operation; export a snapshot back into the seed",
|
|
133
|
+
" only when shipping a new default.",
|
|
134
|
+
"- **Declare `version` and `migrations` when the schema moves.** A stored",
|
|
135
|
+
" graph at an older version has to reach the new one; `graview check` refuses",
|
|
136
|
+
" a gap.",
|
|
137
|
+
"- **Name nodes by id when you will refer to them.** Every creating act takes an",
|
|
138
|
+
" optional `id`; a plan names an earlier call's node as `{ \"$plan\": name }`.",
|
|
139
|
+
" Do not hardcode a bootstrap id inside a mutation body or an invariant —",
|
|
140
|
+
" bind a role or a flag, so a store seeded differently still works.",
|
|
141
|
+
"- **Prefer the derived acts over reaching around them.** `edit-<kind>` changes",
|
|
142
|
+
" what was set at creation; `remove-<kind>` takes a node out. Both flow",
|
|
143
|
+
" through the policy.",
|
|
144
|
+
"- **Wire `serve` and `mcp` into the app's scripts** so an agent loop has a",
|
|
145
|
+
" door, and keep a declared provider's `may` list wide enough for redesign,",
|
|
146
|
+
" not only for filling an empty graph.",
|
|
147
|
+
"",
|
|
148
|
+
"See `llms.txt` for the full node, edge, mutation and invariant reference.",
|
|
149
|
+
"",
|
|
150
|
+
].join("\n");
|
|
151
|
+
}
|
|
152
|
+
//# sourceMappingURL=docs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs.js","sourceRoot":"","sources":["../../src/cli/docs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAG9D;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAsB,GAAkB;IACrE,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;IAChC,KAAK,CAAC,IAAI,CACR,wEAAwE,EACxE,uEAAuE,EACvE,4CAA4C,EAC5C,EAAE,CACH,CAAC;IAEF,KAAK,CAAC,IAAI,CAAC,eAAe,EAAE,EA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;QACjF,gFAAgF;QAChF,2EAA2E;QAC3E,qEAAqE;QACrE,gFAAgF;QAChF,yEAAyE;QACzE,uBAAuB;QACvB,4EAA4E;QAC5E,6EAA6E;QAC7E,wCAAwC;QACxC,EAAE;QACF,2EAA2E;QAC3E,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import type { GraviewApp } from "../app.js";
|
|
3
|
+
export declare const USAGE = "graview \u2014 start a product, check its declaration, write its agent docs\n\n graview create <dir> [--name \"Field Notes\"] [--kind note] [--plural notes]\n Starts a product on Graview in <dir>: the declaration split into domain\n and UI, an eighty-line shell, a headless test, a CI workflow.\n --name <text> the product's name (default: from <dir>)\n --kind <slug> the first node kind (default: item)\n --plural <slug> its plural (default: <kind>s)\n --link <path> consume the framework from a sibling checkout by\n path rather than from a registry\n --pm pnpm|npm the package manager (default: whichever ran this)\n --port <n> the dev server port (default: 5170)\n --accent <#hex> the brand accent (default: a worked green)\n --no-install write the files and stop\n --no-skills do not install the authoring skills\n --no-git do not initialise a git repository\n --workspace the layout every real product ends up with: a\n workspace root with the app under app/ and the\n harness scripts at the root\n --merge write only the files that do not exist yet, and\n name every collision without touching it\n --force write into a directory that is not empty\n\n\n graview check <entry> [--views <module>] [--json]\n Loads <entry> (a module whose default export, or `app` export, is a\n GraviewApp) and reports schema problems. Exits 1 on any error.\n\n graview docs <entry> [--out <dir>] [--views <module>]\n Writes llms.txt and agents.md next to the entry, or into <dir>.\n\n graview describe <entry> [--as <role>] [--views <module>]\n Reads the app out: what a blank installation meets and in what order,\n what is drawn and what falls back, the hues, what a seat may do, how a\n model is reached, what is judged. The rung between check and a browser\n \u2014 \"run it and look\" for something that cannot see.\n\n graview lens <name> --roles a,b,c [--binds fields|entities] [--dir <dir>]\n Writes a lens that compiles: the role check that fails loudly, the\n createXLens factory, three fidelities, pick targets \u2014 and beside it a\n REUSE TEST in a domain the app is not about, red until you make the\n claim true. If you cannot make it pass, you wrote a view, and a view\n is a legitimate thing to have written.\n\n graview figure <entry> --kind <kind> [--name <shipped>]\n [--from \"<what the thing is>\"] [--judge <file|->]\n Prints the figure line to paste into defineNode. With --name it is one\n of the shipped drawings; with neither, it suggests the nearest one by\n name and says so. --from prints the brief to hand a model \u2014 the rules,\n the angle and a shipped figure as the style \u2014 and --judge reads the\n answer back, holds it to the rules graview check holds a figure to, and\n prints the line. Nine shipped figures is a vocabulary to start from,\n not a vocabulary to finish in.\n";
|
|
4
|
+
export declare function loadApp(entry: string): Promise<GraviewApp>;
|
|
5
|
+
/**
|
|
6
|
+
* THE PICTURES, FROM WHERE THEY LIVE (F-042).
|
|
7
|
+
*
|
|
8
|
+
* A view registry is React, and the declaration is the domain tier, which
|
|
9
|
+
* must not import React — so no app can pass `defineApp({ views })`, and
|
|
10
|
+
* everything outside a browser went quiet about what is drawn. The
|
|
11
|
+
* pictures are still a module: `--views ./dist/ui/views.js` names it, and
|
|
12
|
+
* this reads the registry — `places()`, `kindsWithViews()`, `all()` —
|
|
13
|
+
* without rendering anything. The module exports `views` (a registry, or
|
|
14
|
+
* a function that builds one), or the registry as its default export.
|
|
15
|
+
*/
|
|
16
|
+
export declare function withViews(app: GraviewApp, module: Record<string, unknown>, name: string): GraviewApp;
|
|
17
|
+
export declare function main(argv: string[]): Promise<number>;
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAQ5C,eAAO,MAAM,KAAK,4pGAiCjB,CAAC;AAEF,wBAAsB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAUhE;AAaD;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,CAcpG;AAeD,wBAAsB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAqK1D"}
|