@ontology-kit/okb 0.0.0-stage → 0.1.0-bootstrap.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 +9 -0
- package/README.md +26 -2
- package/bin/okb.js +8 -0
- package/dist/checks.d.ts +33 -0
- package/dist/checks.js +966 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +718 -0
- package/dist/clidocs.d.ts +6 -0
- package/dist/clidocs.js +90 -0
- package/dist/clock.d.ts +2 -0
- package/dist/clock.js +16 -0
- package/dist/commands.d.ts +28 -0
- package/dist/commands.js +622 -0
- package/dist/export.d.ts +54 -0
- package/dist/export.js +290 -0
- package/dist/families.d.ts +20 -0
- package/dist/families.js +51 -0
- package/dist/help.d.ts +2 -0
- package/dist/help.js +57 -0
- package/dist/markdown.d.ts +60 -0
- package/dist/markdown.js +310 -0
- package/dist/metakb.d.ts +164 -0
- package/dist/metakb.js +130 -0
- package/dist/naming.d.ts +20 -0
- package/dist/naming.js +140 -0
- package/dist/ops/admin.d.ts +16 -0
- package/dist/ops/admin.js +119 -0
- package/dist/ops/classes.d.ts +21 -0
- package/dist/ops/classes.js +105 -0
- package/dist/ops/common.d.ts +6 -0
- package/dist/ops/common.js +4 -0
- package/dist/ops/instances.d.ts +8 -0
- package/dist/ops/instances.js +70 -0
- package/dist/ops/links.d.ts +9 -0
- package/dist/ops/links.js +85 -0
- package/dist/ops/naming.d.ts +4 -0
- package/dist/ops/naming.js +70 -0
- package/dist/ops/scope.d.ts +29 -0
- package/dist/ops/scope.js +124 -0
- package/dist/ops/slots.d.ts +31 -0
- package/dist/ops/slots.js +186 -0
- package/dist/ops/values.d.ts +20 -0
- package/dist/ops/values.js +151 -0
- package/dist/ops.d.ts +14 -0
- package/dist/ops.js +14 -0
- package/dist/provenance.d.ts +53 -0
- package/dist/provenance.js +296 -0
- package/dist/quotes.d.ts +14 -0
- package/dist/quotes.js +104 -0
- package/dist/render.d.ts +30 -0
- package/dist/render.js +413 -0
- package/dist/review.d.ts +10 -0
- package/dist/review.js +145 -0
- package/dist/site.d.ts +6 -0
- package/dist/site.js +6 -0
- package/dist/skills.d.ts +52 -0
- package/dist/skills.js +120 -0
- package/dist/status.d.ts +18 -0
- package/dist/status.js +59 -0
- package/dist/types.d.ts +12 -0
- package/dist/types.js +5 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +7 -0
- package/meta-kb/data/edges.json +3172 -0
- package/meta-kb/data/manifest.json +19 -0
- package/meta-kb/data/nodes.json +3546 -0
- package/package.json +71 -3
- package/skills/build-domain-kb-from-docs/SKILL.md +87 -0
- package/skills/ontology-coach/SKILL.md +100 -0
- package/skills/ontology-review/SKILL.md +66 -0
package/dist/render.js
ADDED
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
/** Human-readable output: findings, explanations, trees, node details, Mermaid diagrams. */
|
|
2
|
+
import { ruleUrl } from "./site.js";
|
|
3
|
+
import { MetaKB } from "./metakb.js";
|
|
4
|
+
import { edgeProps, nodeLabel } from "@ontology-kit/format";
|
|
5
|
+
import {} from "./types.js";
|
|
6
|
+
import * as naming from "./naming.js";
|
|
7
|
+
const useColor = process.stdout.isTTY && !process.env.NO_COLOR;
|
|
8
|
+
const wrap = (code) => (s) => (useColor ? `\x1b[${code}m${s}\x1b[0m` : s);
|
|
9
|
+
export const c = { bold: wrap(1), dim: wrap(2), red: wrap(31), green: wrap(32), yellow: wrap(33), blue: wrap(34), cyan: wrap(36) };
|
|
10
|
+
export const SYMBOL = { error: c.red("✗"), warning: c.yellow("!"), info: c.blue("i"), ok: c.green("✓"), todo: c.dim("○"), ask: c.cyan("?") };
|
|
11
|
+
function indent(text, pad, width = 96) {
|
|
12
|
+
const words = text.split(/\s+/);
|
|
13
|
+
const lines = [];
|
|
14
|
+
let line = "";
|
|
15
|
+
for (const w of words) {
|
|
16
|
+
if ((line + " " + w).trim().length > width - pad.length) {
|
|
17
|
+
lines.push(line);
|
|
18
|
+
line = w;
|
|
19
|
+
}
|
|
20
|
+
else
|
|
21
|
+
line = (line ? line + " " : "") + w;
|
|
22
|
+
}
|
|
23
|
+
if (line)
|
|
24
|
+
lines.push(line);
|
|
25
|
+
return lines.map((l) => pad + l).join("\n");
|
|
26
|
+
}
|
|
27
|
+
export function formatFindings(findings, ont, opts) {
|
|
28
|
+
const meta = MetaKB.get();
|
|
29
|
+
const open = findings.filter((f) => !f.explainedBy);
|
|
30
|
+
const explained = findings.filter((f) => f.explainedBy);
|
|
31
|
+
const count = (s) => open.filter((f) => f.severity === s).length;
|
|
32
|
+
const out = [];
|
|
33
|
+
const stepNote = opts.all ? "all checks" : `checks for steps 1–${ont.step} (use --all for the rest)`;
|
|
34
|
+
out.push(`${SYMBOL.error} ${count("error")} error(s) ${SYMBOL.warning} ${count("warning")} warning(s) ${SYMBOL.info} ${count("info")} hint(s) ${c.dim("· " + stepNote)}`);
|
|
35
|
+
if (open.length === 0)
|
|
36
|
+
out.push(`\n${SYMBOL.ok} Nothing to fix right now.`);
|
|
37
|
+
const sections = [["error", "ERRORS: must fix"], ["warning", "WARNINGS: fix, or record a design decision explaining why not"], ["info", "HINTS: worth a look"]];
|
|
38
|
+
for (const [sev, title] of sections) {
|
|
39
|
+
const fs = open.filter((f) => f.severity === sev);
|
|
40
|
+
if (!fs.length)
|
|
41
|
+
continue;
|
|
42
|
+
out.push("", c.bold(title));
|
|
43
|
+
for (const f of fs) {
|
|
44
|
+
const rule = meta.rule(f.rule);
|
|
45
|
+
out.push(` ${SYMBOL[sev]} ${f.message} ${c.dim(`[${f.rule}]`)}`);
|
|
46
|
+
if (rule.fix)
|
|
47
|
+
out.push(c.dim(indent(`Fix: ${rule.fix}`, " ")));
|
|
48
|
+
if (opts.verbose) {
|
|
49
|
+
out.push(c.dim(indent(`Why: ${rule.plainLanguage}`, " ")));
|
|
50
|
+
const cites = meta.citations(rule.id);
|
|
51
|
+
if (cites.length)
|
|
52
|
+
out.push(c.dim(` Source: ${meta.citeLine(cites[0])}`));
|
|
53
|
+
out.push(c.dim(` Read more: ${ruleUrl(rule.id)}`));
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
if (explained.length) {
|
|
58
|
+
out.push("", c.bold(`EXPLAINED by design decisions (${explained.length})`));
|
|
59
|
+
for (const f of explained)
|
|
60
|
+
out.push(c.dim(` · ${f.message} [${f.rule}] → ${f.explainedBy}`));
|
|
61
|
+
}
|
|
62
|
+
out.push("", c.dim("Learn about any rule: okb explain <rule-id>" + (opts.verbose ? "" : " · add --why for reasons and sources")));
|
|
63
|
+
return out.join("\n");
|
|
64
|
+
}
|
|
65
|
+
function quotes(meta, id) {
|
|
66
|
+
return meta.citations(id).map((loc) => ` “${loc.quote}”\n ${c.dim("— " + meta.citeLine(loc))}`);
|
|
67
|
+
}
|
|
68
|
+
export function explain(node) {
|
|
69
|
+
const meta = MetaKB.get();
|
|
70
|
+
const out = [];
|
|
71
|
+
const h = (s) => out.push("", c.bold(s));
|
|
72
|
+
switch (node.type) {
|
|
73
|
+
case "Rule": {
|
|
74
|
+
out.push(c.bold(`Rule ${node.key}`) + c.dim(` (${node.modality.replace("_", " ")} · ${node.severity} · ${node.check} check · basis: ${node.basis})`));
|
|
75
|
+
out.push("", indent(node.statement, " "));
|
|
76
|
+
h("In plain words");
|
|
77
|
+
out.push(indent(node.plainLanguage, " "));
|
|
78
|
+
h("Why");
|
|
79
|
+
out.push(indent(meta.rationale(node), " "));
|
|
80
|
+
if (node.severityReason)
|
|
81
|
+
out.push(indent(`Severity note: ${node.severityReason}`, " "));
|
|
82
|
+
if (node.review) {
|
|
83
|
+
h("Ask yourself");
|
|
84
|
+
out.push(indent(node.review, " "));
|
|
85
|
+
}
|
|
86
|
+
if (node.fix) {
|
|
87
|
+
h("How to fix");
|
|
88
|
+
out.push(indent(node.fix, " "));
|
|
89
|
+
}
|
|
90
|
+
const q = quotes(meta, node.id);
|
|
91
|
+
if (q.length) {
|
|
92
|
+
h("Source");
|
|
93
|
+
out.push(...q);
|
|
94
|
+
}
|
|
95
|
+
else
|
|
96
|
+
out.push("", c.dim(" (Toolkit rule: no source passage. See basis above.)"));
|
|
97
|
+
out.push("", c.dim(` Applies from step ${node.fromStep}.`));
|
|
98
|
+
out.push(c.dim(` Read more: ${ruleUrl(node.id)}`));
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
case "Concept": {
|
|
102
|
+
out.push(c.bold(node.name) + (node.aliases?.length ? c.dim(` (also: ${node.aliases.join(", ")})`) : ""));
|
|
103
|
+
out.push("", indent(node.plainLanguage, " "));
|
|
104
|
+
h("Definition");
|
|
105
|
+
out.push(indent(node.definition, " "));
|
|
106
|
+
if (node.example) {
|
|
107
|
+
h("Example");
|
|
108
|
+
out.push(indent(node.example, " "));
|
|
109
|
+
}
|
|
110
|
+
if (node.inThisToolkit) {
|
|
111
|
+
h("In okb");
|
|
112
|
+
out.push(indent(node.inThisToolkit, " "));
|
|
113
|
+
}
|
|
114
|
+
const rules = meta.sources(node.id, "GOVERNS").map((r) => meta.node(r, "Rule").key);
|
|
115
|
+
if (rules.length) {
|
|
116
|
+
h("Related rules");
|
|
117
|
+
out.push(indent(rules.join(", "), " "));
|
|
118
|
+
}
|
|
119
|
+
const q = quotes(meta, node.id);
|
|
120
|
+
if (q.length) {
|
|
121
|
+
h("Source");
|
|
122
|
+
out.push(...q);
|
|
123
|
+
}
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
case "Principle": {
|
|
127
|
+
out.push(c.bold(`Principle: ${node.name}`));
|
|
128
|
+
out.push("", indent(node.plainLanguage, " "));
|
|
129
|
+
h("Stated as");
|
|
130
|
+
out.push(indent(node.statement, " "));
|
|
131
|
+
h("Source");
|
|
132
|
+
out.push(...quotes(meta, node.id));
|
|
133
|
+
break;
|
|
134
|
+
}
|
|
135
|
+
case "Decision": {
|
|
136
|
+
out.push(c.bold(`Decision guide: ${node.name}`));
|
|
137
|
+
out.push(indent(node.plainLanguage, " "), c.dim(` When: ${node.whenYouFaceIt}`), "");
|
|
138
|
+
node.tests.forEach((t, i) => {
|
|
139
|
+
out.push(` ${i + 1}. ${t.ask}`);
|
|
140
|
+
if (t.ifYes && t.ifYes !== "continue")
|
|
141
|
+
out.push(` yes → ${t.ifYes}`);
|
|
142
|
+
else if (t.ifYes === "continue")
|
|
143
|
+
out.push(c.dim(" yes → next question"));
|
|
144
|
+
if (t.ifNo && t.ifNo !== "continue")
|
|
145
|
+
out.push(` no → ${t.ifNo}`);
|
|
146
|
+
else if (t.ifNo === "continue")
|
|
147
|
+
out.push(c.dim(" no → next question"));
|
|
148
|
+
});
|
|
149
|
+
if (node.note)
|
|
150
|
+
out.push("", indent(node.note, " "));
|
|
151
|
+
if (node.wine) {
|
|
152
|
+
h("Wine example");
|
|
153
|
+
out.push(indent(node.wine, " "));
|
|
154
|
+
}
|
|
155
|
+
h("Source");
|
|
156
|
+
out.push(...quotes(meta, node.id));
|
|
157
|
+
break;
|
|
158
|
+
}
|
|
159
|
+
case "Step":
|
|
160
|
+
out.push(stepGuide(node));
|
|
161
|
+
break;
|
|
162
|
+
default:
|
|
163
|
+
out.push(JSON.stringify(node, null, 2));
|
|
164
|
+
}
|
|
165
|
+
return out.join("\n");
|
|
166
|
+
}
|
|
167
|
+
export function stepGuide(step) {
|
|
168
|
+
const meta = MetaKB.get();
|
|
169
|
+
const out = [];
|
|
170
|
+
out.push(c.bold(`Step ${step.order} of ${meta.steps.length}: ${step.name}`));
|
|
171
|
+
out.push("", indent(`Goal: ${step.goal}`, " "));
|
|
172
|
+
out.push(indent(`Why it matters: ${step.whyItMatters}`, " "));
|
|
173
|
+
out.push("", c.bold("Questions to answer"));
|
|
174
|
+
for (const q of step.guidingQuestions)
|
|
175
|
+
out.push(indent(`• ${q}`, " "));
|
|
176
|
+
out.push("", c.bold("You're done when"));
|
|
177
|
+
for (const d of step.doneWhen)
|
|
178
|
+
out.push(` ${d.check ? SYMBOL.todo : SYMBOL.ask} ${d.text}`);
|
|
179
|
+
if (step.tips?.length) {
|
|
180
|
+
out.push("", c.bold("Tips"));
|
|
181
|
+
// Tips can hold markdown links for the docs page; in the terminal show the address after the name.
|
|
182
|
+
for (const t of step.tips)
|
|
183
|
+
out.push(indent(`• ${t.replace(/\[([^\]]+)\]\(([^)]+)\)/g, "$1 ($2)")}`, " "));
|
|
184
|
+
}
|
|
185
|
+
if (step.wine)
|
|
186
|
+
out.push("", c.bold("In Ontology 101's wine example"), ...step.wine.split("\n").map((l) => indent(step.wine.includes("\n") ? `• ${l}` : l, " ")));
|
|
187
|
+
const decisions = meta.targets(step.id, "USES").map((d) => meta.node(d, "Decision"));
|
|
188
|
+
if (decisions.length) {
|
|
189
|
+
out.push("", c.bold("Decision guides for this step") + c.dim(" (okb explain <id>)"));
|
|
190
|
+
for (const d of decisions)
|
|
191
|
+
out.push(` ${d.id.padEnd(28)} ${d.name}`);
|
|
192
|
+
}
|
|
193
|
+
if (step.commands?.length)
|
|
194
|
+
out.push("", c.bold("Commands"), " " + step.commands.join(" "));
|
|
195
|
+
return out.join("\n");
|
|
196
|
+
}
|
|
197
|
+
export function listExplainable() {
|
|
198
|
+
const meta = MetaKB.get();
|
|
199
|
+
const out = [c.bold("Things you can `okb explain`:"), ""];
|
|
200
|
+
out.push(c.bold("Steps"));
|
|
201
|
+
for (const s of meta.steps)
|
|
202
|
+
out.push(` ${String(s.order).padEnd(4)} ${s.name}`);
|
|
203
|
+
out.push("", c.bold("Principles"));
|
|
204
|
+
for (const p of meta.ofType("Principle"))
|
|
205
|
+
out.push(` ${p.id.padEnd(40)} ${p.name}`);
|
|
206
|
+
out.push("", c.bold("Glossary"));
|
|
207
|
+
out.push(indent(meta.ofType("Concept").map((x) => x.name).join(" · "), " "));
|
|
208
|
+
out.push("", c.bold("Decision guides"));
|
|
209
|
+
for (const d of meta.ofType("Decision"))
|
|
210
|
+
out.push(` ${d.id.padEnd(28)} ${d.name}`);
|
|
211
|
+
out.push("", c.bold("Rules"));
|
|
212
|
+
for (const r of meta.ofType("Rule"))
|
|
213
|
+
out.push(` ${r.key.padEnd(34)} ${c.dim(r.modality.padEnd(10))} ${r.plainLanguage.split(". ")[0].slice(0, 70)}`);
|
|
214
|
+
return out.join("\n");
|
|
215
|
+
}
|
|
216
|
+
export function tree(ont, withInstances = false) {
|
|
217
|
+
const out = [];
|
|
218
|
+
const printed = new Set();
|
|
219
|
+
const walk = (id, depth, parent) => {
|
|
220
|
+
const n = ont.require(id);
|
|
221
|
+
const others = ont.parents(id).filter((p) => p !== parent);
|
|
222
|
+
const tags = [n.type === "Class" && n.abstract ? "abstract" : "", others.length ? `also under ${others.map((o) => ont.label(o)).join(", ")}` : ""].filter(Boolean);
|
|
223
|
+
const pad = " ".repeat(depth);
|
|
224
|
+
if (printed.has(id)) {
|
|
225
|
+
out.push(`${pad}${depth ? "└ " : ""}${ont.label(id)} ${c.dim("(see above)")}`);
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
printed.add(id);
|
|
229
|
+
out.push(`${pad}${depth ? "└ " : ""}${c.bold(ont.label(id))}${tags.length ? c.dim(` (${tags.join("; ")})`) : ""}`);
|
|
230
|
+
if (withInstances) {
|
|
231
|
+
for (const i of ont.sources(id, "INSTANCE_OF"))
|
|
232
|
+
out.push(`${pad} ${c.cyan("• " + ont.label(i))}`);
|
|
233
|
+
}
|
|
234
|
+
for (const k of ont.children(id).sort((a, b) => ont.label(a).localeCompare(ont.label(b))))
|
|
235
|
+
walk(k, depth + 1, id);
|
|
236
|
+
};
|
|
237
|
+
const roots = ont.roots().sort((a, b) => ont.label(a).localeCompare(ont.label(b)));
|
|
238
|
+
for (const r of roots)
|
|
239
|
+
walk(r, 0);
|
|
240
|
+
const cyclic = ont.ofType("Class").filter((x) => !printed.has(x.id));
|
|
241
|
+
if (cyclic.length)
|
|
242
|
+
out.push("", c.red(`Not reachable from any top-level class (probably a cycle): ${cyclic.map((x) => x.name).join(", ")}`));
|
|
243
|
+
if (!out.length)
|
|
244
|
+
out.push(c.dim("(no classes yet: okb class add <Name>)"));
|
|
245
|
+
return out.join("\n");
|
|
246
|
+
}
|
|
247
|
+
function fmtFacets(ont, slotId, classes = []) {
|
|
248
|
+
const n = ont.get(slotId);
|
|
249
|
+
const s = n?.type === "Slot" ? n : {};
|
|
250
|
+
const f = ont.effectiveFacets(slotId, classes);
|
|
251
|
+
const parts = [f.valueType ?? c.red("no type")];
|
|
252
|
+
if (f.allowedValues)
|
|
253
|
+
parts.push(`{${f.allowedValues.join(", ")}}`);
|
|
254
|
+
if (f.range.length) {
|
|
255
|
+
const spec = ont.rel.spec(slotId);
|
|
256
|
+
parts.push(`→ ${f.range.map((r) => ont.label(r)).join(" | ")}${spec ? c.dim(spec.reverse ? ` (reads :${spec.type} backwards)` : ` (:${spec.type})`) : ""}`);
|
|
257
|
+
}
|
|
258
|
+
parts.push(s.cardinality ?? c.yellow("cardinality?"));
|
|
259
|
+
if (f.min)
|
|
260
|
+
parts.push(`min ${f.min}`);
|
|
261
|
+
if (f.max !== null && !(s.cardinality === "single" && f.max === 1))
|
|
262
|
+
parts.push(`max ${f.max}`);
|
|
263
|
+
if (s.default !== undefined)
|
|
264
|
+
parts.push(`default ${JSON.stringify(s.default)}`);
|
|
265
|
+
const inv = ont.inverses(slotId);
|
|
266
|
+
if (inv.length)
|
|
267
|
+
parts.push(`inverse of ${inv.map((i) => ont.label(i)).join(", ")}`);
|
|
268
|
+
return parts.join(", ");
|
|
269
|
+
}
|
|
270
|
+
/** A value for display; relationship values show their edge properties: SegmentedControl {condition: "2 to 7 options"} */
|
|
271
|
+
function fmtVal(ont, ownerId, slotId, v) {
|
|
272
|
+
const e = typeof v === "string" ? ont.rel.edge(ownerId, slotId, v) : undefined;
|
|
273
|
+
const props = e ? Object.entries(edgeProps(e)).map(([k, x]) => `${k}: ${JSON.stringify(x)}`).join(", ") : "";
|
|
274
|
+
return ont.label(String(v)) + (props ? c.dim(` {${props}}`) : "");
|
|
275
|
+
}
|
|
276
|
+
export function show(ont, n) {
|
|
277
|
+
const out = [];
|
|
278
|
+
const line = (k, v) => out.push(` ${c.dim(k.padEnd(14))} ${v}`);
|
|
279
|
+
out.push(`${c.bold(nodeLabel(n))} ${c.dim(`${n.type} · ${n.id}`)}`);
|
|
280
|
+
if ("description" in n && n.description)
|
|
281
|
+
out.push(indent(n.description, " "));
|
|
282
|
+
if (n.type === "Class") {
|
|
283
|
+
line("parents", ont.parents(n.id).map((p) => ont.label(p)).join(", ") || "(top level)");
|
|
284
|
+
line("subclasses", ont.children(n.id).map((p) => ont.label(p)).join(", ") || "—");
|
|
285
|
+
if (n.synonyms?.length)
|
|
286
|
+
line("synonyms", n.synonyms.join(", "));
|
|
287
|
+
const flags = [n.abstract && "abstract", n.terminological && "terminological"].filter(Boolean);
|
|
288
|
+
if (flags.length)
|
|
289
|
+
line("flags", flags.join(", "));
|
|
290
|
+
const dis = [...ont.targets(n.id, "DISJOINT_WITH"), ...ont.sources(n.id, "DISJOINT_WITH")];
|
|
291
|
+
if (dis.length)
|
|
292
|
+
line("disjoint with", dis.map((d) => ont.label(d)).join(", "));
|
|
293
|
+
const ctx = [...ont.up(n.id)];
|
|
294
|
+
out.push("", c.bold(" Slots") + c.dim(" (properties hold values; relationships → link to other things)"));
|
|
295
|
+
const own = ont.ownSlots(n.id);
|
|
296
|
+
const all = ont.applicableSlots(n.id);
|
|
297
|
+
if (!all.length)
|
|
298
|
+
out.push(c.dim(" (none yet)"));
|
|
299
|
+
for (const sid of all) {
|
|
300
|
+
const from = own.includes(sid) ? "" : c.dim(` (from ${ont.domain(sid).filter((d) => ont.ancestors(n.id).has(d)).map((d) => ont.label(d)).join(", ")})`);
|
|
301
|
+
out.push(` ${ont.label(sid).padEnd(18)} ${fmtFacets(ont, sid, ctx)}${from}`);
|
|
302
|
+
const fixed = ont.statedValues(n.id, sid);
|
|
303
|
+
if (fixed.length)
|
|
304
|
+
out.push(` ${"".padEnd(18)} ${c.cyan("fixed = ")}${fixed.map((v) => fmtVal(ont, n.id, sid, v)).join(", ")}`);
|
|
305
|
+
else {
|
|
306
|
+
const inh = ont.inheritedFixed(sid, ont.ancestors(n.id));
|
|
307
|
+
if (inh)
|
|
308
|
+
out.push(` ${"".padEnd(18)} ${c.cyan(`fixed = ${inh.values.map((v) => ont.label(String(v))).join(", ")}`)}${c.dim(` (by ${ont.label(inh.cls)})`)}`);
|
|
309
|
+
}
|
|
310
|
+
if (n.defaults?.[sid] !== undefined)
|
|
311
|
+
out.push(` ${"".padEnd(18)} default here = ${JSON.stringify(n.defaults[sid])}`);
|
|
312
|
+
}
|
|
313
|
+
const inst = ont.sources(n.id, "INSTANCE_OF");
|
|
314
|
+
if (inst.length)
|
|
315
|
+
line("instances", inst.map((i) => ont.label(i)).join(", "));
|
|
316
|
+
}
|
|
317
|
+
else if (n.type === "Slot") {
|
|
318
|
+
line("kind", n.valueType === "Instance" ? "relationship (links to other things)" : "property (holds a value)");
|
|
319
|
+
line("facets", fmtFacets(ont, n.id));
|
|
320
|
+
const primary = ont.get(ont.rel.primary(n.id));
|
|
321
|
+
const decls = (primary?.type === "Slot" && primary.edgeProperties) || [];
|
|
322
|
+
if (decls.length)
|
|
323
|
+
line("edge props", decls.map((d) => `${d.name} (${d.valueType}${d.allowedValues ? ` {${d.allowedValues.join(", ")}}` : ""}${d.required ? ", required" : ""})`).join(", ") + c.dim(" + rule"));
|
|
324
|
+
line("attached to", [...ont.domain(n.id).map((d) => ont.label(d)), ...(n.appliesToRules ? ["every rule"] : [])].join(", ") || c.yellow("(no class yet)"));
|
|
325
|
+
const users = ont.ofType("Class").filter((x) => x.facetOverrides?.[n.id]);
|
|
326
|
+
if (users.length)
|
|
327
|
+
line("restricted by", users.map((u) => u.name).join(", "));
|
|
328
|
+
}
|
|
329
|
+
else if (n.type === "Instance") {
|
|
330
|
+
line("instance of", ont.targets(n.id, "INSTANCE_OF").map((x) => ont.label(x)).join(", "));
|
|
331
|
+
out.push("", c.bold(" Values"));
|
|
332
|
+
const ctx = ont.instanceClasses(n.id);
|
|
333
|
+
for (const sid of ont.applicableSlots(n.id)) {
|
|
334
|
+
const vals = ont.statedValues(n.id, sid);
|
|
335
|
+
const inh = vals.length ? null : ont.inheritedFixed(sid, ctx);
|
|
336
|
+
const shown = vals.length ? vals.map((v) => fmtVal(ont, n.id, sid, v)).join(", ") : inh ? c.cyan(inh.values.map((v) => ont.label(String(v))).join(", ") + ` (fixed by ${ont.label(inh.cls)})`) : c.dim("—");
|
|
337
|
+
out.push(` ${ont.label(sid).padEnd(18)} ${shown}`);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
else {
|
|
341
|
+
for (const [k, v] of Object.entries(n))
|
|
342
|
+
if (!["id", "type", "name", "values", "authored"].includes(k))
|
|
343
|
+
line(k, typeof v === "string" ? v : JSON.stringify(v));
|
|
344
|
+
if (n.type === "Rule") {
|
|
345
|
+
if (n.authored)
|
|
346
|
+
line("authored", "yes (written by the ontology's owner)");
|
|
347
|
+
for (const sid of ont.applicableSlots(n.id)) {
|
|
348
|
+
const vals = ont.statedValues(n.id, sid);
|
|
349
|
+
if (vals.length)
|
|
350
|
+
line(ont.label(sid), vals.join(", "));
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
const outs = ont.edges.filter((e) => e.from === n.id);
|
|
354
|
+
for (const e of outs)
|
|
355
|
+
line(e.type, ont.label(e.to) + (e.adds ? c.dim(` (adds: ${e.adds})`) : ""));
|
|
356
|
+
if (n.type === "Rule") {
|
|
357
|
+
for (const [type, label] of Object.entries({ REFINES: "refined by", FULFILLS: "fulfilled by" })) {
|
|
358
|
+
const by = ont.sources(n.id, type).map((x) => ont.label(x));
|
|
359
|
+
if (by.length)
|
|
360
|
+
line(label, by.join(", "));
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
const decisions = ont.sources(n.id, "ABOUT");
|
|
365
|
+
if (decisions.length) {
|
|
366
|
+
out.push("", c.bold(" Design decisions"));
|
|
367
|
+
for (const d of decisions) {
|
|
368
|
+
const dn = ont.get(d);
|
|
369
|
+
out.push(indent(`${d}: ${dn?.type === "DesignDecision" ? `${dn.title}. ${dn.decision}` : ont.label(d)}`, " "));
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
return out.join("\n");
|
|
373
|
+
}
|
|
374
|
+
export function mermaid(ont) {
|
|
375
|
+
const id = (x) => naming.convert(ont.label(x), "PascalCase").replace(/[^A-Za-z0-9]/g, "") || x.replace(/[^A-Za-z0-9]/g, "_");
|
|
376
|
+
// accTitle and accDescr become the SVG's <title> and <desc> for screen readers. Mermaid reads each to
|
|
377
|
+
// the end of its line, so they stay on one line and keep clear of braces.
|
|
378
|
+
const oneLine = (t) => t.replace(/[\r\n{}]+/g, " ").trim();
|
|
379
|
+
const classes = ont.ofType("Class").length;
|
|
380
|
+
const links = ont.ofType("Slot").filter((s) => s.valueType === "Instance").length;
|
|
381
|
+
const out = [
|
|
382
|
+
"```mermaid",
|
|
383
|
+
"classDiagram",
|
|
384
|
+
` accTitle: ${oneLine(`${ont.manifest.name} classes`)}`,
|
|
385
|
+
` accDescr: ${oneLine(`Class diagram of the ${ont.manifest.name} ontology: ${classes} ${classes === 1 ? "class" : "classes"}, arrows from each class to its parent, and ${links} ${links === 1 ? "relationship" : "relationships"} between classes.`)}`,
|
|
386
|
+
];
|
|
387
|
+
for (const cl of ont.ofType("Class")) {
|
|
388
|
+
const lines = ont.ownSlots(cl.id)
|
|
389
|
+
.map((s) => ont.get(s))
|
|
390
|
+
.filter((sn) => sn?.type === "Slot" && sn.valueType !== "Instance")
|
|
391
|
+
.map((sn) => {
|
|
392
|
+
const t = sn.valueType === "Enumerated" && sn.allowedValues ? `${sn.allowedValues.join("|")}` : sn.valueType ?? "?";
|
|
393
|
+
return ` ${t.replace(/[{}]/g, "")} ${sn.name}${sn.cardinality === "multiple" ? "[]" : ""}`;
|
|
394
|
+
});
|
|
395
|
+
const label = cl.name !== id(cl.id) ? `["${cl.name}"]` : "";
|
|
396
|
+
out.push(` class ${id(cl.id)}${label} {`);
|
|
397
|
+
if (cl.abstract)
|
|
398
|
+
out.push(" <<abstract>>");
|
|
399
|
+
out.push(...lines, " }");
|
|
400
|
+
}
|
|
401
|
+
for (const e of ont.edgesOf("IS_A"))
|
|
402
|
+
out.push(` ${id(e.to)} <|-- ${id(e.from)}`);
|
|
403
|
+
for (const s of ont.ofType("Slot").filter((s) => s.valueType === "Instance")) {
|
|
404
|
+
for (const d of ont.domain(s.id))
|
|
405
|
+
for (const r of ont.range(s.id))
|
|
406
|
+
out.push(` ${id(d)} --> ${id(r)} : ${s.name}`);
|
|
407
|
+
}
|
|
408
|
+
out.push("```");
|
|
409
|
+
const disj = ont.edgesOf("DISJOINT_WITH").map((e) => `${ont.label(e.from)} ⟂ ${ont.label(e.to)}`);
|
|
410
|
+
if (disj.length)
|
|
411
|
+
out.push("", `Disjoint: ${disj.join(" · ")}`);
|
|
412
|
+
return out.join("\n");
|
|
413
|
+
}
|
package/dist/review.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Ontology } from "@ontology-kit/format";
|
|
2
|
+
export interface ReviewItem {
|
|
3
|
+
rule: string;
|
|
4
|
+
modality: string;
|
|
5
|
+
question: string;
|
|
6
|
+
source?: string;
|
|
7
|
+
prompts: string[];
|
|
8
|
+
flags: string[];
|
|
9
|
+
}
|
|
10
|
+
export declare function buildReview(ont: Ontology, all?: boolean): ReviewItem[];
|
package/dist/review.js
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `okb review`: turns each judgment-only rule into concrete questions about THIS
|
|
3
|
+
* ontology (its actual is-a links, sibling groups, slots...) and flags likely
|
|
4
|
+
* problems with simple name-based hints. A person, or the ontology-review skill,
|
|
5
|
+
* answers the questions; nothing here is enforced.
|
|
6
|
+
*/
|
|
7
|
+
import { MetaKB } from "./metakb.js";
|
|
8
|
+
import {} from "@ontology-kit/format";
|
|
9
|
+
import { questionFamilies } from "./families.js";
|
|
10
|
+
import * as naming from "./naming.js";
|
|
11
|
+
const PART_WORDS = new Set(["part", "section", "chapter", "page", "component", "piece", "member", "step", "segment", "module", "element", "unit", "room", "wheel", "door"]);
|
|
12
|
+
const STATE_WORDS = new Set(["available", "unavailable", "active", "inactive", "current", "pending", "new", "old", "chilled", "open", "closed", "archived", "draft", "published", "deprecated", "temporary", "selected", "checked", "overdue", "borrowed", "sold", "expired", "popular", "featured"]);
|
|
13
|
+
export function buildReview(ont, all = false) {
|
|
14
|
+
const meta = MetaKB.get();
|
|
15
|
+
const L = (id) => ont.label(id);
|
|
16
|
+
const classes = ont.ofType("Class");
|
|
17
|
+
const items = [];
|
|
18
|
+
for (const r of meta.ofType("Rule")) {
|
|
19
|
+
if (r.check !== "judgment")
|
|
20
|
+
continue;
|
|
21
|
+
const prompts = [];
|
|
22
|
+
const flags = [];
|
|
23
|
+
switch (r.key) {
|
|
24
|
+
case "hier-is-a-means-kind-of":
|
|
25
|
+
for (const e of ont.edgesOf("IS_A")) {
|
|
26
|
+
prompts.push(`Every ${L(e.from)} is, by definition, ${naming.convert(L(e.to), "lower case").match(/^[aeiou]/) ? "an" : "a"} ${L(e.to)}?`);
|
|
27
|
+
if (naming.tokens(L(e.from)).some((t) => PART_WORDS.has(t)))
|
|
28
|
+
flags.push(`${L(e.from)} sounds like a PART of ${L(e.to)}, not a kind of it. Consider a slot (e.g. partOf) instead of is-a.`);
|
|
29
|
+
}
|
|
30
|
+
break;
|
|
31
|
+
case "hier-siblings-same-generality":
|
|
32
|
+
for (const p of classes) {
|
|
33
|
+
const kids = ont.children(p.id);
|
|
34
|
+
if (kids.length < 2)
|
|
35
|
+
continue;
|
|
36
|
+
prompts.push(`${L(p.id)} → ${kids.map(L).join(", ")}: equally general? Is any one a kind of another?`);
|
|
37
|
+
for (const a of kids)
|
|
38
|
+
for (const b of kids) {
|
|
39
|
+
if (a !== b && naming.key(L(a)).length < naming.key(L(b)).length && naming.key(L(b)).includes(naming.key(L(a)))) {
|
|
40
|
+
flags.push(`${L(b)} contains the name of its sibling ${L(a)}. Should it be under ${L(a)}?`);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
break;
|
|
45
|
+
case "hier-no-subclass-per-restriction":
|
|
46
|
+
case "hier-class-or-value": {
|
|
47
|
+
if (r.key === "hier-class-or-value") {
|
|
48
|
+
const enumVals = new Map();
|
|
49
|
+
for (const s of ont.ofType("Slot"))
|
|
50
|
+
for (const v of s.allowedValues ?? [])
|
|
51
|
+
enumVals.set(naming.key(v), s.name);
|
|
52
|
+
for (const c of classes) {
|
|
53
|
+
const slotName = enumVals.get(naming.key(c.name));
|
|
54
|
+
if (slotName)
|
|
55
|
+
flags.push(`'${c.name}' is both a class and an allowed value of the slot ${slotName}. Model it one way, not both (okb explain decision.class-or-value).`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
for (const c of classes) {
|
|
59
|
+
if (!ont.parents(c.id).length)
|
|
60
|
+
continue;
|
|
61
|
+
const own = ont.ownSlots(c.id).length + Object.keys(c.facetOverrides ?? {}).length + ont.rel.slotsWithValues(c.id).length;
|
|
62
|
+
const fixed = Object.entries(c.fixedValues ?? {});
|
|
63
|
+
if (own === 0 && fixed.length === 1 && r.key === "hier-no-subclass-per-restriction") {
|
|
64
|
+
const [[slot, value]] = fixed;
|
|
65
|
+
prompts.push(`${c.name} differs from its parent only by ${L(slot)} = ${JSON.stringify(value)}. Is it a real kind of thing experts distinguish, or just that value?`);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
if (r.key === "hier-class-or-value" && !flags.length)
|
|
69
|
+
prompts.push("Walk decision.class-or-value on any class that feels like 'just a value', and on any enumerated value that feels like 'a different kind of thing'.");
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
case "hier-stable-membership":
|
|
73
|
+
for (const c of classes) {
|
|
74
|
+
const hit = naming.tokens(c.name).find((t) => STATE_WORDS.has(t));
|
|
75
|
+
if (hit)
|
|
76
|
+
flags.push(`${c.name} looks like a state ('${hit}') that instances move in and out of. Consider a Boolean or Enumerated slot instead.`);
|
|
77
|
+
}
|
|
78
|
+
prompts.push("For each class: could one particular instance leave it and come back later?");
|
|
79
|
+
break;
|
|
80
|
+
case "inst-natural-hierarchy-as-classes":
|
|
81
|
+
for (const s of ont.ofType("Slot").filter((s) => s.valueType === "Instance")) {
|
|
82
|
+
const dom = ont.domain(s.id);
|
|
83
|
+
if (ont.range(s.id).some((r) => dom.some((d) => ont.isSub(r, d) || ont.isSub(d, r)))) {
|
|
84
|
+
prompts.push(`Slot ${s.name} links ${ont.range(s.id).map(L).join("/")} instances to each other. If it expresses 'inside of' / 'kind of', those things may be a hierarchy and should be classes.`);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
prompts.push("Are any instances 'inside' other instances in the domain (regions, org units, categories)?");
|
|
88
|
+
break;
|
|
89
|
+
case "inst-granularity": {
|
|
90
|
+
const withInst = classes.filter((c) => ont.sources(c.id, "INSTANCE_OF").length);
|
|
91
|
+
prompts.push(`Instances currently live under: ${withInst.map((c) => c.name).join(", ") || "(none yet)"}. Are these the things your competency questions ask about?`);
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
case "slot-domain-fits-all":
|
|
95
|
+
for (const s of ont.ofType("Slot")) {
|
|
96
|
+
const covered = new Set();
|
|
97
|
+
for (const d of ont.domain(s.id)) {
|
|
98
|
+
covered.add(d);
|
|
99
|
+
for (const x of ont.descendants(d))
|
|
100
|
+
covered.add(x);
|
|
101
|
+
}
|
|
102
|
+
if (covered.size > 1)
|
|
103
|
+
prompts.push(`${s.name} applies to ${[...covered].map(L).join(", ")}. Does every one of these really have it?`);
|
|
104
|
+
}
|
|
105
|
+
break;
|
|
106
|
+
case "scope-cq-families": {
|
|
107
|
+
const recorded = ont.meta.outOfScope ?? [];
|
|
108
|
+
const outOfScope = recorded.length ? ` (out of scope so far: ${recorded.join(", ")})` : "";
|
|
109
|
+
for (const q of ont.ofType("CompetencyQuestion")) {
|
|
110
|
+
for (const f of questionFamilies(ont, q.id)) {
|
|
111
|
+
const same = f.sameQuestionAbout.length ? `the same question about ${f.sameQuestionAbout.join(", ")}` : "";
|
|
112
|
+
const more = f.moreAbout.length ? `more about ${f.subject}: ${f.moreAbout.join(", ")}` : "";
|
|
113
|
+
prompts.push(`${q.id} "${q.text}": would you also ask ${[same, more].filter(Boolean).join(", or ")}?`);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
prompts.push(`For each family you don't want: record it as out of scope${outOfScope}.`);
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
case "doc-record-decisions": {
|
|
120
|
+
const decided = new Set(ont.edgesOf("ABOUT").map((e) => e.to));
|
|
121
|
+
const multi = classes.filter((c) => ont.parents(c.id).length > 1 && !decided.has(c.id));
|
|
122
|
+
const term = classes.filter((c) => c.terminological && !decided.has(c.id) && !ont.ancestors(c.id).size);
|
|
123
|
+
const outTerms = ont.ofType("Term").filter((t) => t.disposition === "out-of-scope" && !t.note && !decided.has(t.id));
|
|
124
|
+
if (multi.length)
|
|
125
|
+
flags.push(`Multiple inheritance without a recorded reason: ${multi.map((c) => c.name).join(", ")}.`);
|
|
126
|
+
if (term.length)
|
|
127
|
+
flags.push(`Terminological classes without a recorded reason: ${term.map((c) => c.name).join(", ")}.`);
|
|
128
|
+
if (outTerms.length)
|
|
129
|
+
flags.push(`Terms left out of scope with no note: ${outTerms.map((t) => t.text).join(", ")}.`);
|
|
130
|
+
prompts.push("What would surprise someone reusing this ontology for a different purpose? Is each of those choices recorded?");
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
default:
|
|
134
|
+
break;
|
|
135
|
+
}
|
|
136
|
+
// Rules for later steps are shown early only when there's something concrete to look at.
|
|
137
|
+
if (!all && r.fromStep > ont.step && !flags.length && !prompts.some((p) => !p.startsWith("For each") && !p.startsWith("Are any") && !p.startsWith("What would") && !p.startsWith("Walk ") && !p.startsWith("Instances currently")))
|
|
138
|
+
continue;
|
|
139
|
+
items.push({
|
|
140
|
+
rule: r.key, modality: r.modality, question: r.review ?? "",
|
|
141
|
+
source: meta.citations(r.id).map((l) => meta.citeLine(l))[0], prompts, flags,
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
return items;
|
|
145
|
+
}
|
package/dist/site.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Where the docs site lives, and the stable links into it. Defined once so the CLI never hard-codes a URL. */
|
|
2
|
+
export declare const SITE_URL = "https://ontology-kit.dev";
|
|
3
|
+
/** The anchor `src/gendocs.ts` writes for a meta-KB id: `rule.hier-no-cycles` → `rule-hier-no-cycles`. */
|
|
4
|
+
export declare const anchorId: (id: string) => string;
|
|
5
|
+
/** The Rules page entry that explains one rule, from its meta-KB id (`rule.<key>`). */
|
|
6
|
+
export declare const ruleUrl: (ruleId: string) => string;
|
package/dist/site.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Where the docs site lives, and the stable links into it. Defined once so the CLI never hard-codes a URL. */
|
|
2
|
+
export const SITE_URL = "https://ontology-kit.dev";
|
|
3
|
+
/** The anchor `src/gendocs.ts` writes for a meta-KB id: `rule.hier-no-cycles` → `rule-hier-no-cycles`. */
|
|
4
|
+
export const anchorId = (id) => id.replace(/\./g, "-");
|
|
5
|
+
/** The Rules page entry that explains one rule, from its meta-KB id (`rule.<key>`). */
|
|
6
|
+
export const ruleUrl = (ruleId) => `${SITE_URL}/reference/rules/#${anchorId(ruleId)}`;
|
package/dist/skills.d.ts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/** The skills in this package. From src/ and from dist/ the package root is one folder up. */
|
|
2
|
+
export declare const PACKAGED_SKILLS_DIR: string;
|
|
3
|
+
/** Where skills go when `--dir` is not given: `$OKB_SKILLS_DIR`, else `~/.claude/skills` (Cursor reads that folder too). */
|
|
4
|
+
export declare function defaultSkillsDir(env?: NodeJS.ProcessEnv): string;
|
|
5
|
+
/**
|
|
6
|
+
* - `current`: installed, and the version matches this okb.
|
|
7
|
+
* - `stale`: an okb skill of another version (a copy, or a link into an older or different okb).
|
|
8
|
+
* - `modified`: a copy at this version whose files differ from the packaged ones.
|
|
9
|
+
* - `other-install`: a link to a skill folder outside this package.
|
|
10
|
+
* - `broken-link`: a link to a folder that no longer exists, usually after an update moved the package.
|
|
11
|
+
* - `foreign`: something that is not an okb skill; install leaves it alone unless told to `--force`.
|
|
12
|
+
* - `missing`: not installed.
|
|
13
|
+
*/
|
|
14
|
+
export type SkillState = "current" | "stale" | "modified" | "other-install" | "broken-link" | "foreign" | "missing";
|
|
15
|
+
export interface SkillReport {
|
|
16
|
+
name: string;
|
|
17
|
+
path: string;
|
|
18
|
+
state: SkillState;
|
|
19
|
+
/** How it is installed, when it is. */
|
|
20
|
+
how?: "link" | "copy";
|
|
21
|
+
/** The version line of the installed skill, when it has one. */
|
|
22
|
+
version?: string;
|
|
23
|
+
/** Where a link points. */
|
|
24
|
+
linkTo?: string;
|
|
25
|
+
/** One sentence for people. */
|
|
26
|
+
detail: string;
|
|
27
|
+
}
|
|
28
|
+
export interface SkillsOptions {
|
|
29
|
+
dir?: string;
|
|
30
|
+
/** The meta-KB version the installed skills must state. */
|
|
31
|
+
metaVersion: string;
|
|
32
|
+
}
|
|
33
|
+
/** The names of the skills this package carries. */
|
|
34
|
+
export declare function packagedSkills(): string[];
|
|
35
|
+
/** What is installed in the skills folder, for each skill this package carries. */
|
|
36
|
+
export declare function skillsStatus(opts: SkillsOptions): {
|
|
37
|
+
dir: string;
|
|
38
|
+
skills: SkillReport[];
|
|
39
|
+
};
|
|
40
|
+
export interface InstallOptions extends SkillsOptions {
|
|
41
|
+
/** Copy the folders instead of linking to them. */
|
|
42
|
+
copy?: boolean;
|
|
43
|
+
/** Replace things that are not okb skills. */
|
|
44
|
+
force?: boolean;
|
|
45
|
+
}
|
|
46
|
+
export interface InstallResult {
|
|
47
|
+
dir: string;
|
|
48
|
+
/** What happened to each skill, one sentence each. */
|
|
49
|
+
lines: string[];
|
|
50
|
+
}
|
|
51
|
+
/** Installs the packaged skills. Checks everything first, so a refusal changes nothing. */
|
|
52
|
+
export declare function installSkills(opts: InstallOptions): InstallResult;
|