The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
chore(docs): point embed doc generation at docs/gitbooks/en
Steven Enamakel6fc773fb47e3
diff --git a/scripts/generate-embed-docs.mjs b/scripts/generate-embed-docs.mjsindex 78949a2999..1973ca7d34 100644--- a/scripts/generate-embed-docs.mjs+++ b/scripts/generate-embed-docs.mjs@@ -181,19 +181,13 @@ export function proseDescription(markdown) {.trim().replace(/\[([^\]]+)\]\([^)]+\)/g, '$1');}-function preserveFrontmatter(source, existing) {- const prefix = /^---\r?\n[\s\S]*?\r?\n---(?:\r?\n|$)/;- const metadata = prefix.exec(existing)?.[0];- return metadata ? metadata + source.replace(prefix, '') : source;-}-export function generateEmbedDocs({ root = ROOT, check = false, capabilities } = {}) {- const directory = resolve(root, 'gitbooks/developing/embed');+ const directory = resolve(root, 'docs/gitbooks/en/developing/embed');if (!existsSync(directory)) return; // Track D starts only after code/examples/tooling verification.const docs = markdownFiles(directory).filter(path => !['cookbook.md', 'api-index.md', 'capability-matrix.md', 'builder-setters.md'].includes(path.split(sep).at(-1)));if (!docs.length) throw new Error('Embed documentation directory is empty');const desired = new Map();- for (const path of ['crates/openhuman-embed/README.md', 'gitbooks/developing/embedding.md'].map(path => resolve(root, path))) {+ for (const path of ['crates/openhuman-embed/README.md', 'docs/gitbooks/en/developing/embedding.md'].map(path => resolve(root, path))) {if (existsSync(path)) docs.push(path);}for (const path of docs) {@@ -223,22 +217,12 @@ export function generateEmbedDocs({ root = ROOT, check = false, capabilities } =capabilities: report,pages: [...desired.keys()].filter(path => path.endsWith('.md')).map(path => relative(root, path).split(sep).join('/')),}, null, 2) + '\n');- desired.set(resolve(root, 'crates/openhuman-embed/examples/README.md'), '# Embed examples\n\n<!-- Generated by scripts/generate-embed-docs.mjs; do not edit. -->\n\n[Cookbook](../../../gitbooks/developing/embed/cookbook.md)\n\n' + examples.map(example => `- [${example.title}](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/${example.name}.rs): ${example.summary} (${example.run}${example.feature ? `; feature: ${example.feature}` : ''})`).join('\n') + '\n');+ desired.set(resolve(root, 'crates/openhuman-embed/examples/README.md'), '# Embed examples\n\n<!-- Generated by scripts/generate-embed-docs.mjs; do not edit. -->\n\n[Cookbook](../../../docs/gitbooks/en/developing/embed/cookbook.md)\n\n' + examples.map(example => `- [${example.title}](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/examples/${example.name}.rs): ${example.summary} (${example.run}${example.feature ? `; feature: ${example.feature}` : ''})`).join('\n') + '\n');const index = '# OpenHuman Embed\n\n> Embed OpenHuman runtimes and independently configured agents in Rust applications.\n\n' + [...desired].filter(([path]) => path.endsWith('.md')).map(([path, source]) => `- [${/^# (.+)$/m.exec(source)?.[1] ?? 'Documentation'}](${relative(root, path).split(sep).join('/')}): ${proseDescription(source)}`).join('\n') + '\n';desired.set(resolve(root, 'llms.txt'), index);desired.set(resolve(root, 'llms-full.txt'), index + '\n' + [...desired].filter(([path]) => path.endsWith('.md')).map(([path, source]) => `<!-- Source: ${relative(root, path)} -->\n${source}`).join('\n'));- desired.set(resolve(root, 'EMBED.md'), index + '\nSee the generated [API index](gitbooks/developing/embed/api-index.md) for build capabilities.\n');- // Aggregate only canonical pages above. Publish their exact generated bodies- // afterward, so English copies never duplicate llms-full content or index paths.- const publishedDirectory = resolve(root, 'docs/gitbooks/en/developing/embed');- for (const [path, source] of [...desired]) {- if (path.startsWith(directory + sep)) desired.set(resolve(publishedDirectory, relative(directory, path)), source);- }- const compatibility = resolve(root, 'gitbooks/developing/embedding.md');- const publishedCompatibility = resolve(root, 'docs/gitbooks/en/developing/embedding.md');- if (desired.has(compatibility)) {- desired.set(publishedCompatibility, preserveFrontmatter(desired.get(compatibility), existsSync(publishedCompatibility) ? readFileSync(publishedCompatibility, 'utf8') : ''));- }+ desired.set(resolve(root, 'EMBED.md'), index + '\nSee the generated [API index](docs/gitbooks/en/developing/embed/api-index.md) for build capabilities.\n');+ const publishedDirectory = directory;for (const [path, source] of desired) {if (path.endsWith('.md')) checkLocalLinks(source, path, root, link => desired.get(link) ?? readFileSync(link, 'utf8'));}