youmd 0.6.26 → 0.7.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/dist/commands/env.d.ts +9 -0
- package/dist/commands/env.d.ts.map +1 -0
- package/dist/commands/env.js +105 -0
- package/dist/commands/env.js.map +1 -0
- package/dist/commands/export.d.ts +1 -0
- package/dist/commands/export.d.ts.map +1 -1
- package/dist/commands/export.js +5 -0
- package/dist/commands/export.js.map +1 -1
- package/dist/commands/okf.d.ts +12 -0
- package/dist/commands/okf.d.ts.map +1 -0
- package/dist/commands/okf.js +411 -0
- package/dist/commands/okf.js.map +1 -0
- package/dist/commands/stack.d.ts.map +1 -1
- package/dist/commands/stack.js +291 -0
- package/dist/commands/stack.js.map +1 -1
- package/dist/index.js +38 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/api.d.ts +33 -0
- package/dist/lib/api.d.ts.map +1 -1
- package/dist/lib/api.js +20 -0
- package/dist/lib/api.js.map +1 -1
- package/dist/lib/okf-bundle.d.ts +104 -0
- package/dist/lib/okf-bundle.d.ts.map +1 -0
- package/dist/lib/okf-bundle.js +473 -0
- package/dist/lib/okf-bundle.js.map +1 -0
- package/dist/lib/okf-health.d.ts +40 -0
- package/dist/lib/okf-health.d.ts.map +1 -0
- package/dist/lib/okf-health.js +152 -0
- package/dist/lib/okf-health.js.map +1 -0
- package/dist/lib/okf-stack.d.ts +47 -0
- package/dist/lib/okf-stack.d.ts.map +1 -0
- package/dist/lib/okf-stack.js +331 -0
- package/dist/lib/okf-stack.js.map +1 -0
- package/dist/lib/okf-view.d.ts +49 -0
- package/dist/lib/okf-view.d.ts.map +1 -0
- package/dist/lib/okf-view.js +197 -0
- package/dist/lib/okf-view.js.map +1 -0
- package/dist/lib/okf.d.ts +130 -0
- package/dist/lib/okf.d.ts.map +1 -0
- package/dist/lib/okf.js +263 -0
- package/dist/lib/okf.js.map +1 -0
- package/package.json +3 -2
- package/scripts/check-version-exists.mjs +40 -0
- package/scripts/env-vault/README.md +123 -0
- package/scripts/env-vault/backup.sh +167 -0
- package/scripts/env-vault/restore.sh +149 -0
- package/scripts/skillstack-sync/README.md +166 -0
- package/scripts/skillstack-sync/bootstrap-new-mac.sh +141 -0
- package/scripts/skillstack-sync/com.youmd.identity-sync.plist +36 -0
- package/scripts/skillstack-sync/com.youmd.skillstack-sync.plist +38 -0
- package/scripts/skillstack-sync/install-daemons.sh +75 -0
- package/scripts/skillstack-sync/sync.sh +320 -0
|
@@ -0,0 +1,473 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* You.md identity bundle <-> OKF bundle.
|
|
4
|
+
*
|
|
5
|
+
* A You.md bundle on disk is already a directory of markdown files
|
|
6
|
+
* (profile/, preferences/, voice/, directives/, skills/). This module makes
|
|
7
|
+
* that bundle a *conformant* OKF bundle and reads one back, so a person's
|
|
8
|
+
* identity + skills travel between machines and agents as plain OKF — no SDK,
|
|
9
|
+
* no lock-in. It is the portable wire format underneath `youmd sync`.
|
|
10
|
+
*
|
|
11
|
+
* The transform is lossless and round-trippable: each section file keeps its
|
|
12
|
+
* title and body verbatim, gains OKF frontmatter (`type`, `description`,
|
|
13
|
+
* `timestamp`) plus a `youmd_kind` custom field that records the section's
|
|
14
|
+
* home directory so import can route it back exactly.
|
|
15
|
+
*
|
|
16
|
+
* Pure transforms (no fs) live at the top so they can be unit-tested; the
|
|
17
|
+
* filesystem wrappers are at the bottom.
|
|
18
|
+
*/
|
|
19
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
20
|
+
if (k2 === undefined) k2 = k;
|
|
21
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
22
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
23
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
24
|
+
}
|
|
25
|
+
Object.defineProperty(o, k2, desc);
|
|
26
|
+
}) : (function(o, m, k, k2) {
|
|
27
|
+
if (k2 === undefined) k2 = k;
|
|
28
|
+
o[k2] = m[k];
|
|
29
|
+
}));
|
|
30
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
31
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
32
|
+
}) : function(o, v) {
|
|
33
|
+
o["default"] = v;
|
|
34
|
+
});
|
|
35
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
36
|
+
var ownKeys = function(o) {
|
|
37
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
38
|
+
var ar = [];
|
|
39
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
40
|
+
return ar;
|
|
41
|
+
};
|
|
42
|
+
return ownKeys(o);
|
|
43
|
+
};
|
|
44
|
+
return function (mod) {
|
|
45
|
+
if (mod && mod.__esModule) return mod;
|
|
46
|
+
var result = {};
|
|
47
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
48
|
+
__setModuleDefault(result, mod);
|
|
49
|
+
return result;
|
|
50
|
+
};
|
|
51
|
+
})();
|
|
52
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
53
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
54
|
+
};
|
|
55
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56
|
+
exports.OKF_SECTION_DIRS = void 0;
|
|
57
|
+
exports.sectionToOkfFile = sectionToOkfFile;
|
|
58
|
+
exports.deriveRelated = deriveRelated;
|
|
59
|
+
exports.okfFileToSection = okfFileToSection;
|
|
60
|
+
exports.buildOkfBundleFiles = buildOkfBundleFiles;
|
|
61
|
+
exports.okfBundleFilesToSections = okfBundleFilesToSections;
|
|
62
|
+
exports.collectBundleSections = collectBundleSections;
|
|
63
|
+
exports.exportBundleToOkf = exportBundleToOkf;
|
|
64
|
+
exports.readOkfBundleDir = readOkfBundleDir;
|
|
65
|
+
exports.importOkfToBundle = importOkfToBundle;
|
|
66
|
+
const fs = __importStar(require("fs"));
|
|
67
|
+
const path = __importStar(require("path"));
|
|
68
|
+
const gray_matter_1 = __importDefault(require("gray-matter"));
|
|
69
|
+
const okf_1 = require("./okf");
|
|
70
|
+
/** Section directories that participate in OKF identity export. `private/` is
|
|
71
|
+
* intentionally excluded — OKF bundles are meant to be shareable. */
|
|
72
|
+
exports.OKF_SECTION_DIRS = ["profile", "preferences", "voice", "directives", "skills"];
|
|
73
|
+
/** dir -> human-friendly OKF `type` + index.md section heading. */
|
|
74
|
+
const DIR_META = {
|
|
75
|
+
profile: { type: "Identity Profile", heading: "Profile" },
|
|
76
|
+
preferences: { type: "Agent Preference", heading: "Preferences" },
|
|
77
|
+
voice: { type: "Voice Profile", heading: "Voice" },
|
|
78
|
+
directives: { type: "Agent Directive", heading: "Directives" },
|
|
79
|
+
skills: { type: "Skill", heading: "Skills" },
|
|
80
|
+
};
|
|
81
|
+
// ─── Pure helpers ──────────────────────────────────────────────────────
|
|
82
|
+
function titleCase(slug) {
|
|
83
|
+
return slug
|
|
84
|
+
.split(/[-_.]/)
|
|
85
|
+
.filter(Boolean)
|
|
86
|
+
.map((w) => w.charAt(0).toUpperCase() + w.slice(1))
|
|
87
|
+
.join(" ");
|
|
88
|
+
}
|
|
89
|
+
/** First descriptive sentence of a body, for the `description` field. */
|
|
90
|
+
function deriveDescription(body) {
|
|
91
|
+
for (const raw of body.split("\n")) {
|
|
92
|
+
const line = raw.trim();
|
|
93
|
+
if (!line)
|
|
94
|
+
continue;
|
|
95
|
+
if (/^[#>*\-+|]/.test(line))
|
|
96
|
+
continue;
|
|
97
|
+
if (line.startsWith("**") && line.endsWith("**"))
|
|
98
|
+
continue;
|
|
99
|
+
const sentence = line.split(/(?<=[.!?])\s/)[0].trim();
|
|
100
|
+
if (!sentence)
|
|
101
|
+
continue;
|
|
102
|
+
return sentence.length > 160 ? sentence.slice(0, 157).trimEnd() + "..." : sentence;
|
|
103
|
+
}
|
|
104
|
+
return undefined;
|
|
105
|
+
}
|
|
106
|
+
function dropUndefined(obj) {
|
|
107
|
+
const out = {};
|
|
108
|
+
for (const [k, v] of Object.entries(obj)) {
|
|
109
|
+
if (v !== undefined && !(Array.isArray(v) && v.length === 0))
|
|
110
|
+
out[k] = v;
|
|
111
|
+
}
|
|
112
|
+
return out;
|
|
113
|
+
}
|
|
114
|
+
/** Transform one You.md section into one OKF concept file. */
|
|
115
|
+
function sectionToOkfFile(section) {
|
|
116
|
+
const meta = DIR_META[section.dir] || { type: "Note", heading: "Other" };
|
|
117
|
+
const frontmatter = dropUndefined({
|
|
118
|
+
type: meta.type,
|
|
119
|
+
title: section.title,
|
|
120
|
+
description: deriveDescription(section.body),
|
|
121
|
+
timestamp: section.timestamp,
|
|
122
|
+
last_updated_by: section.lastUpdatedBy,
|
|
123
|
+
confidence: section.confidence,
|
|
124
|
+
linked_sources: section.linkedSources,
|
|
125
|
+
related: section.related,
|
|
126
|
+
youmd_kind: `${section.dir}/${section.slug}`,
|
|
127
|
+
});
|
|
128
|
+
const content = (0, okf_1.serializeOkfFile)({ frontmatter, body: section.body });
|
|
129
|
+
return { path: `${section.dir}/${section.slug}.md`, content };
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Derive graph edges between sections from real structural relationships only
|
|
133
|
+
* (no fabricated semantic links): every concept anchors to profile/about, each
|
|
134
|
+
* platform voice links to the overall voice, skills link to the agent
|
|
135
|
+
* directives they operate under, and agent preferences link to those directives.
|
|
136
|
+
* Returns a map keyed by "dir/slug".
|
|
137
|
+
*/
|
|
138
|
+
function deriveRelated(sections) {
|
|
139
|
+
const ids = new Set(sections.map((s) => `${s.dir}/${s.slug}`));
|
|
140
|
+
const has = (id) => ids.has(id);
|
|
141
|
+
const edges = new Map();
|
|
142
|
+
const link = (from, to) => {
|
|
143
|
+
if (from === to || !has(to))
|
|
144
|
+
return;
|
|
145
|
+
const list = edges.get(from) || [];
|
|
146
|
+
if (!list.includes(to))
|
|
147
|
+
list.push(to);
|
|
148
|
+
edges.set(from, list);
|
|
149
|
+
};
|
|
150
|
+
for (const s of sections) {
|
|
151
|
+
const id = `${s.dir}/${s.slug}`;
|
|
152
|
+
// Anchor every concept to the identity it describes.
|
|
153
|
+
link(id, "profile/about");
|
|
154
|
+
// Platform voices derive from the overall voice.
|
|
155
|
+
if (s.dir === "voice" && s.slug.startsWith("voice."))
|
|
156
|
+
link(id, "voice/voice");
|
|
157
|
+
// Skills operate under the agent directives.
|
|
158
|
+
if (s.dir === "skills")
|
|
159
|
+
link(id, "directives/agent");
|
|
160
|
+
// Agent preferences and directives are two halves of agent behavior.
|
|
161
|
+
if (s.dir === "preferences" && s.slug === "agent")
|
|
162
|
+
link(id, "directives/agent");
|
|
163
|
+
}
|
|
164
|
+
return edges;
|
|
165
|
+
}
|
|
166
|
+
/** Transform an OKF concept file back into a You.md section. Returns null for
|
|
167
|
+
* reserved files (index.md / log.md). */
|
|
168
|
+
function okfFileToSection(file) {
|
|
169
|
+
const normalized = file.path.replace(/\\/g, "/");
|
|
170
|
+
const base = normalized.split("/").pop() || "";
|
|
171
|
+
if (base === "index.md" || base === "log.md")
|
|
172
|
+
return null;
|
|
173
|
+
const { frontmatter, body } = (0, okf_1.parseOkfFile)(file.content);
|
|
174
|
+
let dir;
|
|
175
|
+
let slug;
|
|
176
|
+
const kind = typeof frontmatter.youmd_kind === "string" ? frontmatter.youmd_kind : "";
|
|
177
|
+
if (kind.includes("/")) {
|
|
178
|
+
const parts = kind.split("/");
|
|
179
|
+
slug = parts.pop();
|
|
180
|
+
dir = parts.join("/");
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
const parts = normalized.replace(/\.md$/i, "").split("/");
|
|
184
|
+
slug = parts.pop();
|
|
185
|
+
dir = parts.pop() || "profile";
|
|
186
|
+
}
|
|
187
|
+
const title = typeof frontmatter.title === "string" && frontmatter.title.trim()
|
|
188
|
+
? frontmatter.title.trim()
|
|
189
|
+
: titleCase(slug);
|
|
190
|
+
return {
|
|
191
|
+
dir,
|
|
192
|
+
slug,
|
|
193
|
+
title,
|
|
194
|
+
body,
|
|
195
|
+
timestamp: typeof frontmatter.timestamp === "string" ? frontmatter.timestamp : undefined,
|
|
196
|
+
lastUpdatedBy: typeof frontmatter.last_updated_by === "string" ? frontmatter.last_updated_by : undefined,
|
|
197
|
+
confidence: typeof frontmatter.confidence === "string" ? frontmatter.confidence : undefined,
|
|
198
|
+
linkedSources: Array.isArray(frontmatter.linked_sources)
|
|
199
|
+
? frontmatter.linked_sources.filter((s) => typeof s === "string")
|
|
200
|
+
: undefined,
|
|
201
|
+
related: Array.isArray(frontmatter.related)
|
|
202
|
+
? frontmatter.related.filter((s) => typeof s === "string")
|
|
203
|
+
: undefined,
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
/** Build the complete set of OKF files (concepts + reserved index/log) for a
|
|
207
|
+
* list of sections. Pure — does not touch the filesystem. */
|
|
208
|
+
function buildOkfBundleFiles(sections, options = {}) {
|
|
209
|
+
// Derive structural graph edges, unioned with any author-declared `related`.
|
|
210
|
+
const derived = deriveRelated(sections);
|
|
211
|
+
// Stamp provenance defaults onto sections that don't already declare it.
|
|
212
|
+
const stamped = sections.map((section) => {
|
|
213
|
+
const id = `${section.dir}/${section.slug}`;
|
|
214
|
+
const merged = [...new Set([...(section.related || []), ...(derived.get(id) || [])])];
|
|
215
|
+
return {
|
|
216
|
+
...section,
|
|
217
|
+
lastUpdatedBy: section.lastUpdatedBy ?? options.defaultAuthor,
|
|
218
|
+
confidence: section.confidence ?? options.defaultConfidence,
|
|
219
|
+
related: merged.length > 0 ? merged : undefined,
|
|
220
|
+
};
|
|
221
|
+
});
|
|
222
|
+
const conceptFiles = stamped.map(sectionToOkfFile);
|
|
223
|
+
// index.md grouped by directory, in the canonical section order.
|
|
224
|
+
const order = [...exports.OKF_SECTION_DIRS];
|
|
225
|
+
const indexSections = [];
|
|
226
|
+
for (const dir of order) {
|
|
227
|
+
const inDir = sections.filter((s) => s.dir === dir);
|
|
228
|
+
if (inDir.length === 0)
|
|
229
|
+
continue;
|
|
230
|
+
indexSections.push({
|
|
231
|
+
heading: DIR_META[dir]?.heading || titleCase(dir),
|
|
232
|
+
entries: inDir.map((s) => ({
|
|
233
|
+
conceptId: `${s.dir}/${s.slug}`,
|
|
234
|
+
title: s.title,
|
|
235
|
+
description: deriveDescription(s.body),
|
|
236
|
+
})),
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
const indexMd = (0, okf_1.buildIndexMd)(indexSections, {
|
|
240
|
+
title: options.title || "You.md Identity Bundle",
|
|
241
|
+
intro: options.intro ||
|
|
242
|
+
"Portable identity context in Open Knowledge Format. Every file is a concept an agent can read natively.",
|
|
243
|
+
okfVersion: okf_1.OKF_VERSION,
|
|
244
|
+
});
|
|
245
|
+
const files = [
|
|
246
|
+
{ path: "index.md", content: indexMd },
|
|
247
|
+
...conceptFiles,
|
|
248
|
+
];
|
|
249
|
+
const logEntries = options.log && options.log.length > 0 ? options.log : undefined;
|
|
250
|
+
if (logEntries) {
|
|
251
|
+
files.push({ path: "log.md", content: (0, okf_1.buildLogMd)(logEntries, { title: "Change Log" }) });
|
|
252
|
+
}
|
|
253
|
+
return files;
|
|
254
|
+
}
|
|
255
|
+
/** Reconstruct You.md sections from a set of OKF files. */
|
|
256
|
+
function okfBundleFilesToSections(files) {
|
|
257
|
+
return files
|
|
258
|
+
.map(okfFileToSection)
|
|
259
|
+
.filter((s) => s !== null);
|
|
260
|
+
}
|
|
261
|
+
// ─── Filesystem wrappers ───────────────────────────────────────────────
|
|
262
|
+
function readManifestTimestamp(bundleDir) {
|
|
263
|
+
const manifestPath = path.join(bundleDir, "manifest.json");
|
|
264
|
+
if (!fs.existsSync(manifestPath))
|
|
265
|
+
return undefined;
|
|
266
|
+
try {
|
|
267
|
+
const manifest = JSON.parse(fs.readFileSync(manifestPath, "utf-8"));
|
|
268
|
+
return typeof manifest.generatedAt === "string" ? manifest.generatedAt : undefined;
|
|
269
|
+
}
|
|
270
|
+
catch {
|
|
271
|
+
return undefined;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
function readBundleVersion(bundleDir) {
|
|
275
|
+
const manifestPath = path.join(bundleDir, "manifest.json");
|
|
276
|
+
if (!fs.existsSync(manifestPath))
|
|
277
|
+
return undefined;
|
|
278
|
+
try {
|
|
279
|
+
const manifest = JSON.parse(fs.readFileSync(manifestPath, "utf-8"));
|
|
280
|
+
return typeof manifest.version === "number" ? manifest.version : undefined;
|
|
281
|
+
}
|
|
282
|
+
catch {
|
|
283
|
+
return undefined;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
function readBundleName(bundleDir) {
|
|
287
|
+
const youJsonPath = path.join(bundleDir, "you.json");
|
|
288
|
+
if (!fs.existsSync(youJsonPath))
|
|
289
|
+
return undefined;
|
|
290
|
+
try {
|
|
291
|
+
const youJson = JSON.parse(fs.readFileSync(youJsonPath, "utf-8"));
|
|
292
|
+
return youJson?.identity?.name || youJson?.username || undefined;
|
|
293
|
+
}
|
|
294
|
+
catch {
|
|
295
|
+
return undefined;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
/** Read the source URLs the bundle was compiled from (you.json meta.sources_used). */
|
|
299
|
+
function readBundleSources(bundleDir) {
|
|
300
|
+
const youJsonPath = path.join(bundleDir, "you.json");
|
|
301
|
+
if (!fs.existsSync(youJsonPath))
|
|
302
|
+
return [];
|
|
303
|
+
try {
|
|
304
|
+
const youJson = JSON.parse(fs.readFileSync(youJsonPath, "utf-8"));
|
|
305
|
+
const used = youJson?.meta?.sources_used;
|
|
306
|
+
if (!Array.isArray(used))
|
|
307
|
+
return [];
|
|
308
|
+
const urls = used
|
|
309
|
+
.map((s) => {
|
|
310
|
+
if (typeof s === "string")
|
|
311
|
+
return s;
|
|
312
|
+
if (s && typeof s === "object") {
|
|
313
|
+
const rec = s;
|
|
314
|
+
return rec.url || rec.source || undefined;
|
|
315
|
+
}
|
|
316
|
+
return undefined;
|
|
317
|
+
})
|
|
318
|
+
.filter((u) => typeof u === "string" && u.trim().length > 0);
|
|
319
|
+
return [...new Set(urls)];
|
|
320
|
+
}
|
|
321
|
+
catch {
|
|
322
|
+
return [];
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
/** Read every section file from a You.md bundle directory into memory. */
|
|
326
|
+
function collectBundleSections(bundleDir) {
|
|
327
|
+
const sections = [];
|
|
328
|
+
const fallbackTs = readManifestTimestamp(bundleDir);
|
|
329
|
+
for (const dir of exports.OKF_SECTION_DIRS) {
|
|
330
|
+
const abs = path.join(bundleDir, dir);
|
|
331
|
+
if (!fs.existsSync(abs))
|
|
332
|
+
continue;
|
|
333
|
+
const files = fs.readdirSync(abs).filter((f) => f.endsWith(".md")).sort();
|
|
334
|
+
for (const file of files) {
|
|
335
|
+
const raw = fs.readFileSync(path.join(abs, file), "utf-8");
|
|
336
|
+
const { data, content } = (0, gray_matter_1.default)(raw);
|
|
337
|
+
const slug = path.basename(file, ".md");
|
|
338
|
+
const title = typeof data.title === "string" && data.title.trim() ? data.title.trim() : titleCase(slug);
|
|
339
|
+
sections.push({
|
|
340
|
+
dir,
|
|
341
|
+
slug,
|
|
342
|
+
title,
|
|
343
|
+
body: content.trim(),
|
|
344
|
+
timestamp: typeof data.timestamp === "string" ? data.timestamp : fallbackTs,
|
|
345
|
+
lastUpdatedBy: typeof data.last_updated_by === "string" ? data.last_updated_by : undefined,
|
|
346
|
+
confidence: typeof data.confidence === "string" ? data.confidence : undefined,
|
|
347
|
+
linkedSources: Array.isArray(data.linked_sources)
|
|
348
|
+
? data.linked_sources.filter((s) => typeof s === "string")
|
|
349
|
+
: undefined,
|
|
350
|
+
related: Array.isArray(data.related)
|
|
351
|
+
? data.related.filter((s) => typeof s === "string")
|
|
352
|
+
: undefined,
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
return sections;
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* Export a You.md bundle directory as a conformant OKF bundle on disk.
|
|
360
|
+
* Carries the existing you.json + manifest.sha256.json alongside (OKF
|
|
361
|
+
* tolerates extra files) as integrity value-adds the spec does not require.
|
|
362
|
+
*/
|
|
363
|
+
function exportBundleToOkf(bundleDir, outDir, options = {}) {
|
|
364
|
+
const sections = [...collectBundleSections(bundleDir), ...(options.extraSections || [])];
|
|
365
|
+
// Attach real provenance: link the `about` concept to the sources the bundle
|
|
366
|
+
// was actually compiled from (you.json meta.sources_used). Not fabricated —
|
|
367
|
+
// only set when the data exists and the section hasn't declared its own.
|
|
368
|
+
const sources = readBundleSources(bundleDir);
|
|
369
|
+
if (sources.length > 0) {
|
|
370
|
+
const about = sections.find((s) => s.dir === "profile" && s.slug === "about");
|
|
371
|
+
if (about && (!about.linkedSources || about.linkedSources.length === 0)) {
|
|
372
|
+
about.linkedSources = sources;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
const name = readBundleName(bundleDir);
|
|
376
|
+
const version = readBundleVersion(bundleDir);
|
|
377
|
+
const ts = readManifestTimestamp(bundleDir) || new Date().toISOString();
|
|
378
|
+
const date = ts.split("T")[0];
|
|
379
|
+
const log = [
|
|
380
|
+
{
|
|
381
|
+
date,
|
|
382
|
+
label: "Export",
|
|
383
|
+
message: `Generated OKF bundle${version ? ` (bundle v${version})` : ""} from You.md — ${sections.length} concepts.`,
|
|
384
|
+
},
|
|
385
|
+
];
|
|
386
|
+
const okfFiles = buildOkfBundleFiles(sections, {
|
|
387
|
+
title: name ? `${name} — You.md` : undefined,
|
|
388
|
+
log,
|
|
389
|
+
defaultAuthor: options.defaultAuthor,
|
|
390
|
+
defaultConfidence: options.defaultConfidence,
|
|
391
|
+
});
|
|
392
|
+
fs.mkdirSync(outDir, { recursive: true });
|
|
393
|
+
const written = [];
|
|
394
|
+
for (const file of okfFiles) {
|
|
395
|
+
const dest = path.join(outDir, file.path);
|
|
396
|
+
fs.mkdirSync(path.dirname(dest), { recursive: true });
|
|
397
|
+
fs.writeFileSync(dest, file.content);
|
|
398
|
+
written.push(file.path);
|
|
399
|
+
}
|
|
400
|
+
// Carry integrity/structured siblings if present (non-OKF but tolerated).
|
|
401
|
+
for (const sibling of ["you.json", "manifest.sha256.json"]) {
|
|
402
|
+
const src = path.join(bundleDir, sibling);
|
|
403
|
+
if (fs.existsSync(src)) {
|
|
404
|
+
fs.copyFileSync(src, path.join(outDir, sibling));
|
|
405
|
+
written.push(sibling);
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
const validation = (0, okf_1.validateOkfBundle)(okfFiles);
|
|
409
|
+
return {
|
|
410
|
+
outDir,
|
|
411
|
+
files: written,
|
|
412
|
+
conceptCount: okfFiles.filter((f) => {
|
|
413
|
+
const base = f.path.split("/").pop() || "";
|
|
414
|
+
return base !== "index.md" && base !== "log.md";
|
|
415
|
+
}).length,
|
|
416
|
+
validation,
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
/** Read an OKF bundle directory into in-memory files (markdown only). */
|
|
420
|
+
function readOkfBundleDir(okfDir) {
|
|
421
|
+
const files = [];
|
|
422
|
+
const walk = (dir, prefix) => {
|
|
423
|
+
for (const entry of fs.readdirSync(dir, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name))) {
|
|
424
|
+
const rel = prefix ? `${prefix}/${entry.name}` : entry.name;
|
|
425
|
+
const abs = path.join(dir, entry.name);
|
|
426
|
+
if (entry.isDirectory()) {
|
|
427
|
+
walk(abs, rel);
|
|
428
|
+
}
|
|
429
|
+
else if (entry.name.endsWith(".md")) {
|
|
430
|
+
files.push({ path: rel, content: fs.readFileSync(abs, "utf-8") });
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
};
|
|
434
|
+
walk(okfDir, "");
|
|
435
|
+
return files;
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* Import an OKF bundle directory into a You.md bundle directory, writing each
|
|
439
|
+
* concept back to its section file in the standard You.md frontmatter style
|
|
440
|
+
* (so a subsequent `compileBundle` consumes it unchanged).
|
|
441
|
+
*/
|
|
442
|
+
function importOkfToBundle(okfDir, outDir) {
|
|
443
|
+
const files = readOkfBundleDir(okfDir);
|
|
444
|
+
const sections = okfBundleFilesToSections(files);
|
|
445
|
+
const written = [];
|
|
446
|
+
for (const section of sections) {
|
|
447
|
+
const destDir = path.join(outDir, section.dir);
|
|
448
|
+
fs.mkdirSync(destDir, { recursive: true });
|
|
449
|
+
const dest = path.join(destDir, `${section.slug}.md`);
|
|
450
|
+
// Preserve title + any provenance the OKF concept carried, so it survives
|
|
451
|
+
// import and a later re-export round-trips cleanly.
|
|
452
|
+
const fmLines = [`title: "${section.title.replace(/"/g, '\\"')}"`];
|
|
453
|
+
if (section.lastUpdatedBy)
|
|
454
|
+
fmLines.push(`last_updated_by: "${section.lastUpdatedBy}"`);
|
|
455
|
+
if (section.confidence)
|
|
456
|
+
fmLines.push(`confidence: ${section.confidence}`);
|
|
457
|
+
if (section.linkedSources && section.linkedSources.length > 0) {
|
|
458
|
+
fmLines.push("linked_sources:");
|
|
459
|
+
for (const src of section.linkedSources)
|
|
460
|
+
fmLines.push(` - ${src}`);
|
|
461
|
+
}
|
|
462
|
+
if (section.related && section.related.length > 0) {
|
|
463
|
+
fmLines.push("related:");
|
|
464
|
+
for (const rel of section.related)
|
|
465
|
+
fmLines.push(` - ${rel}`);
|
|
466
|
+
}
|
|
467
|
+
const frontmatter = `---\n${fmLines.join("\n")}\n---\n\n`;
|
|
468
|
+
fs.writeFileSync(dest, frontmatter + section.body.trim() + "\n");
|
|
469
|
+
written.push(`${section.dir}/${section.slug}.md`);
|
|
470
|
+
}
|
|
471
|
+
return { outDir, written, sectionCount: sections.length };
|
|
472
|
+
}
|
|
473
|
+
//# sourceMappingURL=okf-bundle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"okf-bundle.js","sourceRoot":"","sources":["../../src/lib/okf-bundle.ts"],"names":[],"mappings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O,CAAC,UAAU;YAAE,OAAO,CAAC,IAAI,CAAC,eAAe,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;QAC1E,IAAI,OAAO,CAAC,aAAa,IAAI,OAAO,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC9D,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;YAChC,KAAK,MAAM,GAAG,IAAI,OAAO,CAAC,aAAa;gBAAE,OAAO,CAAC,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;QACtE,CAAC;QACD,IAAI,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAClD,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YACzB,KAAK,MAAM,GAAG,IAAI,OAAO,CAAC,OAAO;gBAAE,OAAO,CAAC,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;QAChE,CAAC;QACD,MAAM,WAAW,GAAG,QAAQ,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC;QAC1D,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC;QACjE,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,IAAI,KAAK,CAAC,CAAC;IACpD,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;AAC5D,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OKF brain-health audit.
|
|
3
|
+
*
|
|
4
|
+
* Audits an OKF bundle for the failure modes that rot agent knowledge bases
|
|
5
|
+
* (the Familiar-second-brain "graph health" idea, applied to OKF): concepts
|
|
6
|
+
* missing a type, thin/un-sourced concepts, agent-authored low-confidence
|
|
7
|
+
* concepts that need a human pass, stale concepts, unresolved [CONFLICT]/[STALE]
|
|
8
|
+
* markers, and orphans nothing links to.
|
|
9
|
+
*
|
|
10
|
+
* Pure — operates on in-memory files so it can be unit-tested and reused by the
|
|
11
|
+
* CLI against either the live bundle or any OKF directory on disk.
|
|
12
|
+
*/
|
|
13
|
+
import { OkfBundleFile } from "./okf";
|
|
14
|
+
export type OkfHealthCategory = "missing_type" | "no_description" | "unsourced" | "needs_review" | "stale" | "conflict" | "orphan";
|
|
15
|
+
export interface OkfHealthIssue {
|
|
16
|
+
category: OkfHealthCategory;
|
|
17
|
+
level: "error" | "warning" | "info";
|
|
18
|
+
file: string;
|
|
19
|
+
message: string;
|
|
20
|
+
}
|
|
21
|
+
export interface OkfHealthReport {
|
|
22
|
+
ok: boolean;
|
|
23
|
+
totalConcepts: number;
|
|
24
|
+
issues: OkfHealthIssue[];
|
|
25
|
+
summary: Record<OkfHealthCategory, number>;
|
|
26
|
+
/** 0-100 health score (100 = clean). */
|
|
27
|
+
score: number;
|
|
28
|
+
}
|
|
29
|
+
export interface OkfHealthOptions {
|
|
30
|
+
/** Concepts whose timestamp is older than this many days are flagged. */
|
|
31
|
+
staleDays?: number;
|
|
32
|
+
/** Injectable "now" for deterministic tests. */
|
|
33
|
+
now?: Date;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Audit a set of OKF files. A bundle is `ok` when there are no errors (a
|
|
37
|
+
* missing `type` is the only error; everything else is advisory).
|
|
38
|
+
*/
|
|
39
|
+
export declare function auditOkfBundle(files: OkfBundleFile[], options?: OkfHealthOptions): OkfHealthReport;
|
|
40
|
+
//# sourceMappingURL=okf-health.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"okf-health.d.ts","sourceRoot":"","sources":["../../src/lib/okf-health.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,aAAa,EAA6B,MAAM,OAAO,CAAC;AAEjE,MAAM,MAAM,iBAAiB,GACzB,cAAc,GACd,gBAAgB,GAChB,WAAW,GACX,cAAc,GACd,OAAO,GACP,UAAU,GACV,QAAQ,CAAC;AAEb,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,KAAK,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,OAAO,CAAC;IACZ,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;IAC3C,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gDAAgD;IAChD,GAAG,CAAC,EAAE,IAAI,CAAC;CACZ;AA6CD;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,aAAa,EAAE,EACtB,OAAO,GAAE,gBAAqB,GAC7B,eAAe,CAyGjB"}
|