@graview/tools 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 +47 -0
- package/dist/agent/adapters.d.ts +43 -0
- package/dist/agent/adapters.d.ts.map +1 -0
- package/dist/agent/adapters.js +52 -0
- package/dist/agent/adapters.js.map +1 -0
- package/dist/agent/tools.d.ts +105 -0
- package/dist/agent/tools.d.ts.map +1 -0
- package/dist/agent/tools.js +311 -0
- package/dist/agent/tools.js.map +1 -0
- package/dist/cli.d.ts +37 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +306 -0
- package/dist/cli.js.map +1 -0
- package/dist/conversation.d.ts +108 -0
- package/dist/conversation.d.ts.map +1 -0
- package/dist/conversation.js +698 -0
- package/dist/conversation.js.map +1 -0
- package/dist/decide.d.ts +43 -0
- package/dist/decide.d.ts.map +1 -0
- package/dist/decide.js +125 -0
- package/dist/decide.js.map +1 -0
- package/dist/derive.d.ts +84 -0
- package/dist/derive.d.ts.map +1 -0
- package/dist/derive.js +302 -0
- package/dist/derive.js.map +1 -0
- package/dist/edit.d.ts +70 -0
- package/dist/edit.d.ts.map +1 -0
- package/dist/edit.js +97 -0
- package/dist/edit.js.map +1 -0
- package/dist/figure.d.ts +53 -0
- package/dist/figure.d.ts.map +1 -0
- package/dist/figure.js +86 -0
- package/dist/figure.js.map +1 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -0
- package/dist/intelligence.d.ts +132 -0
- package/dist/intelligence.d.ts.map +1 -0
- package/dist/intelligence.js +463 -0
- package/dist/intelligence.js.map +1 -0
- package/dist/local.d.ts +192 -0
- package/dist/local.d.ts.map +1 -0
- package/dist/local.js +365 -0
- package/dist/local.js.map +1 -0
- package/dist/loop.d.ts +84 -0
- package/dist/loop.d.ts.map +1 -0
- package/dist/loop.js +173 -0
- package/dist/loop.js.map +1 -0
- package/dist/mcp-stdio.d.ts +38 -0
- package/dist/mcp-stdio.d.ts.map +1 -0
- package/dist/mcp-stdio.js +83 -0
- package/dist/mcp-stdio.js.map +1 -0
- package/dist/pins.d.ts +29 -0
- package/dist/pins.d.ts.map +1 -0
- package/dist/pins.js +60 -0
- package/dist/pins.js.map +1 -0
- package/dist/plan.d.ts +150 -0
- package/dist/plan.d.ts.map +1 -0
- package/dist/plan.js +303 -0
- package/dist/plan.js.map +1 -0
- package/dist/providers/insight.d.ts +14 -0
- package/dist/providers/insight.d.ts.map +1 -0
- package/dist/providers/insight.js +81 -0
- package/dist/providers/insight.js.map +1 -0
- package/dist/providers/invariant.d.ts +14 -0
- package/dist/providers/invariant.d.ts.map +1 -0
- package/dist/providers/invariant.js +123 -0
- package/dist/providers/invariant.js.map +1 -0
- package/dist/providers/jev.d.ts +115 -0
- package/dist/providers/jev.d.ts.map +1 -0
- package/dist/providers/jev.js +148 -0
- package/dist/providers/jev.js.map +1 -0
- package/dist/providers/lens.d.ts +24 -0
- package/dist/providers/lens.d.ts.map +1 -0
- package/dist/providers/lens.js +36 -0
- package/dist/providers/lens.js.map +1 -0
- package/dist/providers/llm.d.ts +25 -0
- package/dist/providers/llm.d.ts.map +1 -0
- package/dist/providers/llm.js +44 -0
- package/dist/providers/llm.js.map +1 -0
- package/dist/providers/schema.d.ts +12 -0
- package/dist/providers/schema.d.ts.map +1 -0
- package/dist/providers/schema.js +508 -0
- package/dist/providers/schema.js.map +1 -0
- package/dist/providers/structure.d.ts +14 -0
- package/dist/providers/structure.d.ts.map +1 -0
- package/dist/providers/structure.js +211 -0
- package/dist/providers/structure.js.map +1 -0
- package/dist/questions.d.ts +162 -0
- package/dist/questions.d.ts.map +1 -0
- package/dist/questions.js +316 -0
- package/dist/questions.js.map +1 -0
- package/dist/run.d.ts +202 -0
- package/dist/run.d.ts.map +1 -0
- package/dist/run.js +453 -0
- package/dist/run.js.map +1 -0
- package/dist/space.d.ts +50 -0
- package/dist/space.d.ts.map +1 -0
- package/dist/space.js +55 -0
- package/dist/space.js.map +1 -0
- package/dist/types.d.ts +122 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/usage.d.ts +10 -0
- package/dist/usage.d.ts.map +1 -0
- package/dist/usage.js +59 -0
- package/dist/usage.js.map +1 -0
- package/package.json +61 -0
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { fieldWords, humaniseField, labelOf, nodeRefKinds } from "@graview/core";
|
|
2
|
+
const SHARED_SCORE = 70;
|
|
3
|
+
const ALIGN_SCORE = 80;
|
|
4
|
+
const IGNORED_FIELDS = new Set(["id", "kind"]);
|
|
5
|
+
/**
|
|
6
|
+
* What is TRUE about this selection, and what that makes worth doing.
|
|
7
|
+
*
|
|
8
|
+
* Nothing here knows what a duty or a person is. It notices shared
|
|
9
|
+
* neighbours, agreement on a field, and the one node that breaks the
|
|
10
|
+
* agreement — then looks for a declared mutation that could resolve the
|
|
11
|
+
* difference. "Move the Wednesday run to Tuesday like the other three" comes
|
|
12
|
+
* out of this without anyone writing a rule about days, because the schema
|
|
13
|
+
* already said which mutation writes that field.
|
|
14
|
+
*/
|
|
15
|
+
export function structureProvider() {
|
|
16
|
+
return {
|
|
17
|
+
name: "structure",
|
|
18
|
+
derive({ store, nodes }) {
|
|
19
|
+
// A node's name as its kind says it, not its label field alone.
|
|
20
|
+
const named = (node) => labelOf(store.schema.tryDefinition(node.kind), node);
|
|
21
|
+
if (nodes.length < 2)
|
|
22
|
+
return {};
|
|
23
|
+
const observations = [];
|
|
24
|
+
const affordances = [];
|
|
25
|
+
const ids = nodes.map((node) => node.id);
|
|
26
|
+
// ---------------------------------------------------- shared neighbours
|
|
27
|
+
for (const edgeKind of store.schema.edgeKinds) {
|
|
28
|
+
const shared = intersect(nodes.map((node) => new Set([
|
|
29
|
+
...store.graph.out(node.id, edgeKind).map((n) => n.id),
|
|
30
|
+
...store.graph.in(node.id, edgeKind).map((n) => n.id),
|
|
31
|
+
])));
|
|
32
|
+
for (const neighbourId of shared) {
|
|
33
|
+
const neighbour = store.graph.getNode(neighbourId);
|
|
34
|
+
if (!neighbour)
|
|
35
|
+
continue;
|
|
36
|
+
observations.push({
|
|
37
|
+
id: `shared:${edgeKind}:${neighbourId}`,
|
|
38
|
+
text: `all ${nodes.length} share "${named(neighbour)}" (${humaniseField(edgeKind).toLowerCase()})`,
|
|
39
|
+
nodeIds: [...ids, neighbourId],
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
// The near-miss is more interesting than the agreement: one node out
|
|
43
|
+
// of step is a thing you can fix.
|
|
44
|
+
const counts = new Map();
|
|
45
|
+
for (const node of nodes) {
|
|
46
|
+
for (const neighbour of [
|
|
47
|
+
...store.graph.out(node.id, edgeKind),
|
|
48
|
+
...store.graph.in(node.id, edgeKind),
|
|
49
|
+
]) {
|
|
50
|
+
counts.set(neighbour.id, (counts.get(neighbour.id) ?? 0) + 1);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
for (const [neighbourId, count] of counts) {
|
|
54
|
+
if (count !== nodes.length - 1 || nodes.length < 3)
|
|
55
|
+
continue;
|
|
56
|
+
const neighbour = store.graph.getNode(neighbourId);
|
|
57
|
+
if (!neighbour)
|
|
58
|
+
continue;
|
|
59
|
+
const odd = nodes.find((node) => ![
|
|
60
|
+
...store.graph.out(node.id, edgeKind),
|
|
61
|
+
...store.graph.in(node.id, edgeKind),
|
|
62
|
+
].some((n) => n.id === neighbourId));
|
|
63
|
+
if (!odd)
|
|
64
|
+
continue;
|
|
65
|
+
observations.push({
|
|
66
|
+
id: `near-shared:${edgeKind}:${neighbourId}`,
|
|
67
|
+
text: `all but "${named(odd)}" share "${named(neighbour)}" (${humaniseField(edgeKind).toLowerCase()})`,
|
|
68
|
+
nodeIds: [...ids, neighbourId],
|
|
69
|
+
});
|
|
70
|
+
for (const mutation of store.allMutations()) {
|
|
71
|
+
const subject = mutation.subject;
|
|
72
|
+
if (!subject)
|
|
73
|
+
continue;
|
|
74
|
+
if (subject.kinds !== "*" && !subject.kinds.includes(odd.kind)) {
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
const target = argAccepting(mutation.input, neighbour.kind);
|
|
78
|
+
if (!target)
|
|
79
|
+
continue;
|
|
80
|
+
affordances.push({
|
|
81
|
+
id: `structure:join:${mutation.name}:${odd.id}:${neighbourId}`,
|
|
82
|
+
label: `${mutation.title ?? mutation.name}: bring "${named(odd)}" in line with the others`,
|
|
83
|
+
provider: "structure",
|
|
84
|
+
mutation: mutation.name,
|
|
85
|
+
args: { [subject.arg]: odd.id, [target]: neighbourId },
|
|
86
|
+
open: [],
|
|
87
|
+
score: SHARED_SCORE,
|
|
88
|
+
why: `every other selected node is connected to "${named(neighbour)}"`,
|
|
89
|
+
nodeIds: [odd.id, neighbourId],
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
// ------------------------------------------------- agreement on a field
|
|
95
|
+
const fields = new Set();
|
|
96
|
+
for (const node of nodes) {
|
|
97
|
+
for (const key of Object.keys(node)) {
|
|
98
|
+
if (!IGNORED_FIELDS.has(key))
|
|
99
|
+
fields.add(key);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
// A field and its value in words: "all 3 share status open" read the key and the JSON.
|
|
103
|
+
const definitionOf = (kind) => store.schema.definitions.find((definition) => definition.kind === kind);
|
|
104
|
+
for (const field of [...fields].sort()) {
|
|
105
|
+
const words = fieldWords(definitionOf(nodes[0].kind), field).toLowerCase();
|
|
106
|
+
const values = nodes.map((node) => node[field]);
|
|
107
|
+
const groups = new Map();
|
|
108
|
+
values.forEach((value, index) => {
|
|
109
|
+
const key = JSON.stringify(value ?? null);
|
|
110
|
+
const list = groups.get(key);
|
|
111
|
+
if (list)
|
|
112
|
+
list.push(nodes[index]);
|
|
113
|
+
else
|
|
114
|
+
groups.set(key, [nodes[index]]);
|
|
115
|
+
});
|
|
116
|
+
if (groups.size === 1) {
|
|
117
|
+
const [key] = [...groups.keys()];
|
|
118
|
+
if (key === "null")
|
|
119
|
+
continue;
|
|
120
|
+
observations.push({
|
|
121
|
+
id: `agree:${field}`,
|
|
122
|
+
text: `all ${nodes.length} share the ${words} ${key}`,
|
|
123
|
+
nodeIds: ids,
|
|
124
|
+
});
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
127
|
+
// A majority and exactly one hold-out: that is an alignment.
|
|
128
|
+
if (nodes.length < 3 || groups.size !== 2)
|
|
129
|
+
continue;
|
|
130
|
+
const sorted = [...groups.entries()].sort((a, b) => b[1].length - a[1].length);
|
|
131
|
+
const [majorityKey, majority] = sorted[0];
|
|
132
|
+
const [, minority] = sorted[1];
|
|
133
|
+
if (minority.length !== 1 || majorityKey === "null")
|
|
134
|
+
continue;
|
|
135
|
+
const odd = minority[0];
|
|
136
|
+
const majorityValue = JSON.parse(majorityKey);
|
|
137
|
+
observations.push({
|
|
138
|
+
id: `odd-one-out:${field}`,
|
|
139
|
+
text: `${majority.length} share the ${words} ${majorityKey}; "${named(odd)}" does not`,
|
|
140
|
+
nodeIds: ids,
|
|
141
|
+
});
|
|
142
|
+
for (const mutation of store.allMutations()) {
|
|
143
|
+
const subject = mutation.subject;
|
|
144
|
+
if (!subject)
|
|
145
|
+
continue;
|
|
146
|
+
if (subject.kinds !== "*" && !subject.kinds.includes(odd.kind)) {
|
|
147
|
+
continue;
|
|
148
|
+
}
|
|
149
|
+
const shape = shapeOf(mutation.input);
|
|
150
|
+
if (!shape || !(field in shape))
|
|
151
|
+
continue;
|
|
152
|
+
// Fill every other argument this mutation needs from the node's own
|
|
153
|
+
// current values, so the aligned change is exactly the one field.
|
|
154
|
+
const args = {
|
|
155
|
+
[subject.arg]: odd.id,
|
|
156
|
+
[field]: majorityValue,
|
|
157
|
+
};
|
|
158
|
+
let satisfiable = true;
|
|
159
|
+
for (const [name, schema] of Object.entries(shape)) {
|
|
160
|
+
if (name in args)
|
|
161
|
+
continue;
|
|
162
|
+
if (schema.safeParse(undefined).success)
|
|
163
|
+
continue;
|
|
164
|
+
const current = odd[name];
|
|
165
|
+
if (current === undefined) {
|
|
166
|
+
satisfiable = false;
|
|
167
|
+
break;
|
|
168
|
+
}
|
|
169
|
+
args[name] = current;
|
|
170
|
+
}
|
|
171
|
+
if (!satisfiable)
|
|
172
|
+
continue;
|
|
173
|
+
affordances.push({
|
|
174
|
+
id: `structure:align:${mutation.name}:${field}:${odd.id}`,
|
|
175
|
+
label: `Align the ${words} of "${named(odd)}" with the other ${majority.length}`,
|
|
176
|
+
provider: "structure",
|
|
177
|
+
mutation: mutation.name,
|
|
178
|
+
args,
|
|
179
|
+
open: [],
|
|
180
|
+
score: ALIGN_SCORE,
|
|
181
|
+
why: `${majority.length} of ${nodes.length} share the ${words} ${majorityKey}`,
|
|
182
|
+
nodeIds: ids,
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
return { affordances, observations };
|
|
187
|
+
},
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
function intersect(sets) {
|
|
191
|
+
if (sets.length === 0)
|
|
192
|
+
return [];
|
|
193
|
+
const [first, ...rest] = sets;
|
|
194
|
+
return [...first].filter((value) => rest.every((set) => set.has(value))).sort();
|
|
195
|
+
}
|
|
196
|
+
function shapeOf(input) {
|
|
197
|
+
return input.shape ?? null;
|
|
198
|
+
}
|
|
199
|
+
/** The first argument of a mutation that accepts a node of `kind`. */
|
|
200
|
+
function argAccepting(input, kind) {
|
|
201
|
+
const shape = shapeOf(input);
|
|
202
|
+
if (!shape)
|
|
203
|
+
return null;
|
|
204
|
+
for (const [name] of Object.entries(shape)) {
|
|
205
|
+
const kinds = nodeRefKinds(shape[name]);
|
|
206
|
+
if (kinds && (kinds.includes("*") || kinds.includes(kind)))
|
|
207
|
+
return name;
|
|
208
|
+
}
|
|
209
|
+
return null;
|
|
210
|
+
}
|
|
211
|
+
//# sourceMappingURL=structure.js.map
|
|
@@ -0,0 +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 +1,162 @@
|
|
|
1
|
+
import { type AnySchema, type Store, type Violation } from "@graview/core";
|
|
2
|
+
/**
|
|
3
|
+
* THE QUESTIONS ARE DERIVED, NOT AUTHORED.
|
|
4
|
+
*
|
|
5
|
+
* A Graview declaration already types every question worth asking. A
|
|
6
|
+
* `z.enum` is a Choice whose criteria are its own options; a `nodeRef` is a
|
|
7
|
+
* Choice over the live nodes of that kind, labelled the way every surface
|
|
8
|
+
* labels them; a `z.boolean` and an invariant are a truth with the rule as
|
|
9
|
+
* what "yes" means; a bounded number is a Score over its own levels. None
|
|
10
|
+
* of it is written by hand, for the same reason no agent tool is: two
|
|
11
|
+
* descriptions of one domain will disagree, and the one in the declaration
|
|
12
|
+
* is the one the store enforces.
|
|
13
|
+
*
|
|
14
|
+
* The shapes here are the wire shapes of a decision provider — a map of
|
|
15
|
+
* typed questions over one state, typed answers back under the same keys —
|
|
16
|
+
* so a derived question is sent as it is, and an answer is read straight
|
|
17
|
+
* into an argument of the act that writes the thing asked about.
|
|
18
|
+
*/
|
|
19
|
+
export type ChoiceQuestion = {
|
|
20
|
+
readonly type: "choice";
|
|
21
|
+
readonly instructions: string;
|
|
22
|
+
/** Option name → what it means, or null when the name says it all. */
|
|
23
|
+
readonly criteria: Readonly<Record<string, string | null>>;
|
|
24
|
+
};
|
|
25
|
+
export type NoulQuestion = {
|
|
26
|
+
readonly type: "noul";
|
|
27
|
+
readonly instructions: string;
|
|
28
|
+
readonly criteria?: {
|
|
29
|
+
readonly true?: string;
|
|
30
|
+
readonly false?: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export type ScoreQuestion = {
|
|
34
|
+
readonly type: "score";
|
|
35
|
+
readonly instructions: string;
|
|
36
|
+
/** Ordered level descriptions, lowest first. At least two. */
|
|
37
|
+
readonly criteria: readonly string[];
|
|
38
|
+
};
|
|
39
|
+
export type Question = ChoiceQuestion | NoulQuestion | ScoreQuestion;
|
|
40
|
+
/** Where a question came from, and where its answer goes. */
|
|
41
|
+
export type QuestionAbout = {
|
|
42
|
+
readonly about: "field";
|
|
43
|
+
readonly kind: string;
|
|
44
|
+
readonly field: string;
|
|
45
|
+
/** The act that writes the field, and the argument the answer fills. */
|
|
46
|
+
readonly writes?: {
|
|
47
|
+
readonly mutation: string;
|
|
48
|
+
readonly arg: string;
|
|
49
|
+
readonly subjectArg: string;
|
|
50
|
+
};
|
|
51
|
+
} | {
|
|
52
|
+
readonly about: "argument";
|
|
53
|
+
readonly mutation: string;
|
|
54
|
+
readonly arg: string;
|
|
55
|
+
/** For a pair question: the other node the argument would name. Carried, not parsed — an id may hold a colon. */
|
|
56
|
+
readonly other?: string;
|
|
57
|
+
} | {
|
|
58
|
+
readonly about: "rule";
|
|
59
|
+
readonly invariant: string;
|
|
60
|
+
readonly subjectId?: string;
|
|
61
|
+
} | {
|
|
62
|
+
readonly about: "repair";
|
|
63
|
+
readonly invariant: string;
|
|
64
|
+
readonly subjectId?: string;
|
|
65
|
+
/** Option name → the call it means, arguments already settled. */
|
|
66
|
+
readonly options: Readonly<Record<string, {
|
|
67
|
+
readonly mutation: string;
|
|
68
|
+
readonly args: Readonly<Record<string, unknown>>;
|
|
69
|
+
}>>;
|
|
70
|
+
};
|
|
71
|
+
export type DerivedQuestion = QuestionAbout & {
|
|
72
|
+
/** Stable, code-facing. Never sent to the model. */
|
|
73
|
+
readonly id: string;
|
|
74
|
+
readonly question: Question;
|
|
75
|
+
/** For a Score: the field's own scale, so level 0 is `min`. */
|
|
76
|
+
readonly scale?: {
|
|
77
|
+
readonly min: number;
|
|
78
|
+
readonly max: number;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* A QUESTION FOR A PERSON, because the answer was not one.
|
|
83
|
+
*
|
|
84
|
+
* "turf 0.5, bed 0.45" is a split, not an answer, and a low confidence is a
|
|
85
|
+
* shrug. Either is offered rather than applied: the question, the node it
|
|
86
|
+
* is about by name, and each option with its probability and the call it
|
|
87
|
+
* would be — so a surface can stand the question AT that node, with the
|
|
88
|
+
* choices as presses, rather than in a list somewhere else.
|
|
89
|
+
*/
|
|
90
|
+
export interface OfferedQuestion {
|
|
91
|
+
readonly id: string;
|
|
92
|
+
/** The node it is about, when it is about one. */
|
|
93
|
+
readonly nodeId?: string;
|
|
94
|
+
/** Its label, so a surface can say it without a lookup. */
|
|
95
|
+
readonly nodeLabel?: string;
|
|
96
|
+
/** The question in the declaration's words. */
|
|
97
|
+
readonly asks: string;
|
|
98
|
+
/** Why it is offered rather than applied. */
|
|
99
|
+
readonly because: "split" | "unsure";
|
|
100
|
+
readonly confidence: number;
|
|
101
|
+
readonly options: readonly {
|
|
102
|
+
readonly value: string;
|
|
103
|
+
readonly probability: number;
|
|
104
|
+
/** The call taking this option would be; absent when "no" means do nothing. */
|
|
105
|
+
readonly call?: {
|
|
106
|
+
readonly mutation: string;
|
|
107
|
+
readonly args: Readonly<Record<string, unknown>>;
|
|
108
|
+
readonly why?: string;
|
|
109
|
+
};
|
|
110
|
+
}[];
|
|
111
|
+
}
|
|
112
|
+
/** The number a Score answer means, on the field's own scale. */
|
|
113
|
+
export declare function scoreToValue(field: {
|
|
114
|
+
readonly min: number;
|
|
115
|
+
}, level: number): number;
|
|
116
|
+
/**
|
|
117
|
+
* The questions a KIND asks of one of its members: one per settable field
|
|
118
|
+
* with a typed answer, each naming the act that writes it. A kind whose
|
|
119
|
+
* every field is prose asks nothing, and says so by an empty list.
|
|
120
|
+
*/
|
|
121
|
+
export declare function questionsForKind<S extends AnySchema>(store: Store<S>, kind: string): readonly DerivedQuestion[];
|
|
122
|
+
/**
|
|
123
|
+
* The questions an ACT asks before it can be called: one per argument with
|
|
124
|
+
* a typed answer that `given` has not already settled. The subject is
|
|
125
|
+
* usually given — a run fans out over nodes and asks each one's questions
|
|
126
|
+
* — and an argument with no typed answer is simply not asked, which is
|
|
127
|
+
* what the checker already guaranteed a decision provider would never
|
|
128
|
+
* meet on its allowlist.
|
|
129
|
+
*/
|
|
130
|
+
export declare function questionsForMutation<S extends AnySchema>(store: Store<S>, name: string, given?: Readonly<Record<string, unknown>>): readonly DerivedQuestion[];
|
|
131
|
+
/**
|
|
132
|
+
* A RULE IS A TRUTH, and its repairs are the closed set that follows.
|
|
133
|
+
*
|
|
134
|
+
* The invariant's own words are what "yes" means; a violation the store
|
|
135
|
+
* already raised narrows the follow-on Choice to the repairs it named, each
|
|
136
|
+
* with its arguments settled, so the answer is a call and not a guess.
|
|
137
|
+
* Asked without a violation, the follow-on is over the repairs the
|
|
138
|
+
* invariant declares it may name, which is what a loop asks before the
|
|
139
|
+
* store has judged.
|
|
140
|
+
*/
|
|
141
|
+
export declare function questionsForInvariant<S extends AnySchema>(store: Store<S>, name: string, violation?: Violation): readonly DerivedQuestion[];
|
|
142
|
+
/**
|
|
143
|
+
* A PAIR IS A TRUTH. An act that joins a subject to one other node —
|
|
144
|
+
* "says it helps": a practice and a concern — asked of one particular pair
|
|
145
|
+
* is a yes-or-no question, and the act's own title and description are
|
|
146
|
+
* its words. Fan this out over every pair and you have a matrix nobody
|
|
147
|
+
* ever had to author.
|
|
148
|
+
*/
|
|
149
|
+
export declare function pairQuestion<S extends AnySchema>(store: Store<S>, name: string, subjectId: string, otherId: string): (DerivedQuestion & {
|
|
150
|
+
readonly about: "argument";
|
|
151
|
+
}) | undefined;
|
|
152
|
+
/**
|
|
153
|
+
* THE STATE A QUESTION IS ASKED OVER: one node as the model should see it
|
|
154
|
+
* — its kind and what the kind is for, its label, its readable fields in
|
|
155
|
+
* the declaration's own words, and what it is joined to, by label. Nothing
|
|
156
|
+
* a card would not show. Ids are kept beside labels so an answer that is
|
|
157
|
+
* an id can be checked against what was shown.
|
|
158
|
+
*/
|
|
159
|
+
export declare function nodeState<S extends AnySchema>(store: Store<S>, id: string): Readonly<Record<string, unknown>> | undefined;
|
|
160
|
+
/** Every derived question in the app, for a reader — or a test — that wants the whole surface. */
|
|
161
|
+
export declare function allQuestions<S extends AnySchema>(store: Store<S>): readonly DerivedQuestion[];
|
|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