@farming-labs/docs 0.1.76 → 0.1.78
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/{agent-CHLNeC5o.mjs → agent-DmTj6BZv.mjs} +1 -1
- package/dist/{agent-CbX-9Z0z.mjs → agent-ttKB8Q3N.mjs} +11 -1
- package/dist/cli/index.mjs +5 -5
- package/dist/{dev-B_Pd2iNL.mjs → dev-zn7AkGBT.mjs} +1 -1
- package/dist/{doctor-DRhAgUqi.mjs → doctor-DV5etDpC.mjs} +63 -6
- package/dist/index.d.mts +4 -1
- package/dist/index.mjs +2 -2
- package/dist/{init-B0oTzLXb.mjs → init-BBdFgtTm.mjs} +1 -1
- package/dist/{templates-BlouROIq.mjs → templates-BIk7zhQ3.mjs} +9 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as renderDocsMarkdownDocument, g as findDocsMarkdownPage } from "./agent-
|
|
1
|
+
import { C as renderDocsMarkdownDocument, g as findDocsMarkdownPage } from "./agent-ttKB8Q3N.mjs";
|
|
2
2
|
import { _ as parseGeneratedAgentDocument, h as hashGeneratedAgentContent, m as GENERATED_AGENT_PROVENANCE_VERSION, v as serializeGeneratedAgentDocument } from "./search-kP0mAXCp.mjs";
|
|
3
3
|
import "./index.mjs";
|
|
4
4
|
import "./sitemap-server-B370zkEo.mjs";
|
|
@@ -336,6 +336,16 @@ function normalizeDocsUrlPath(value) {
|
|
|
336
336
|
if (normalized === "/") return normalized;
|
|
337
337
|
return normalized.replace(/\/+$/, "");
|
|
338
338
|
}
|
|
339
|
+
function toDocsMarkdownUrl(url, options = {}) {
|
|
340
|
+
const [withoutHash, hash = ""] = url.split("#", 2);
|
|
341
|
+
const [pathname, query = ""] = withoutHash.split("?", 2);
|
|
342
|
+
const normalizedPath = normalizeDocsUrlPath(pathname || "/");
|
|
343
|
+
const markdownPath = normalizedPath.endsWith(".md") ? normalizedPath : `${normalizedPath}.md`;
|
|
344
|
+
const params = new URLSearchParams(query);
|
|
345
|
+
if (options.locale && !params.has("lang")) params.set("lang", options.locale);
|
|
346
|
+
const search = params.toString();
|
|
347
|
+
return `${markdownPath}${search ? `?${search}` : ""}${hash ? `#${hash}` : ""}`;
|
|
348
|
+
}
|
|
339
349
|
function isDocsAgentDiscoveryRequest(url) {
|
|
340
350
|
const pathname = normalizeDocsUrlPath(url.pathname);
|
|
341
351
|
if (pathname === DEFAULT_DOCS_API_ROUTE && url.searchParams.get("agent")?.trim() === "spec") return true;
|
|
@@ -659,4 +669,4 @@ function toYamlString(value) {
|
|
|
659
669
|
}
|
|
660
670
|
|
|
661
671
|
//#endregion
|
|
662
|
-
export {
|
|
672
|
+
export { estimateReadingTimeMinutes as A, resolveDocsLocale as B, renderDocsMarkdownDocument as C, resolveDocsMarkdownRequest as D, resolveDocsLlmsTxtFormat as E, buildPageOpenGraph as F, resolveChangelogConfig as G, createTheme as H, buildPageTwitter as I, defineDocs as K, resolveOGImage as L, resolveReadingTimeFromContent as M, resolveReadingTimeFromSource as N, resolveDocsSkillFormat as O, resolveReadingTimeOptions as P, resolveTitle as R, normalizeDocsUrlPath as S, resolveDocsAgentMdxContent as T, extendTheme as U, resolveDocsPath as V, deepMerge as W, isDocsAgentDiscoveryRequest as _, DEFAULT_DOCS_API_ROUTE as a, isDocsSkillRequest as b, DEFAULT_LLMS_TXT_ROUTE as c, DEFAULT_MCP_ROUTE as d, DEFAULT_MCP_WELL_KNOWN_ROUTE as f, findDocsMarkdownPage as g, buildDocsAgentDiscoverySpec as h, DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE as i, resolvePageReadingTime as j, toDocsMarkdownUrl as k, DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE as l, DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE as m, DEFAULT_AGENT_SPEC_ROUTE as n, DEFAULT_LLMS_FULL_TXT_ROUTE as o, DEFAULT_SKILL_MD_ROUTE as p, DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE as r, DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE as s, DEFAULT_AGENT_FEEDBACK_ROUTE as t, DEFAULT_MCP_PUBLIC_ROUTE as u, isDocsMcpRequest as v, renderDocsSkillDocument as w, normalizeDocsPathSegment as x, isDocsPublicGetRequest as y, resolveDocsI18n as z };
|
package/dist/cli/index.mjs
CHANGED
|
@@ -77,16 +77,16 @@ async function main() {
|
|
|
77
77
|
searchApiKey: typeof flags["search-api-key"] === "string" ? flags["search-api-key"] : void 0
|
|
78
78
|
};
|
|
79
79
|
if (!parsedCommand.command || parsedCommand.command === "init") {
|
|
80
|
-
const { init } = await import("../init-
|
|
80
|
+
const { init } = await import("../init-BBdFgtTm.mjs");
|
|
81
81
|
await init(initOptions);
|
|
82
82
|
} else if (parsedCommand.command === "dev") {
|
|
83
|
-
const { dev } = await import("../dev-
|
|
83
|
+
const { dev } = await import("../dev-zn7AkGBT.mjs");
|
|
84
84
|
await dev(devOptions);
|
|
85
85
|
} else if (parsedCommand.command === "mcp") {
|
|
86
86
|
const { runMcp } = await import("../mcp-BPW62uf-.mjs");
|
|
87
87
|
await runMcp(mcpOptions);
|
|
88
88
|
} else if (parsedCommand.command === "agent" && subcommand === "compact") {
|
|
89
|
-
const { compactAgentDocs, parseAgentCompactArgs, printAgentCompactHelp } = await import("../agent-
|
|
89
|
+
const { compactAgentDocs, parseAgentCompactArgs, printAgentCompactHelp } = await import("../agent-DmTj6BZv.mjs");
|
|
90
90
|
const agentCompactOptions = parseAgentCompactArgs(args.slice(2));
|
|
91
91
|
if (agentCompactOptions.help) {
|
|
92
92
|
printAgentCompactHelp();
|
|
@@ -96,11 +96,11 @@ async function main() {
|
|
|
96
96
|
} else if (parsedCommand.command === "agent") {
|
|
97
97
|
console.error(pc.red(`Unknown agent subcommand: ${subcommand ?? "(missing)"}`));
|
|
98
98
|
console.error();
|
|
99
|
-
const { printAgentCompactHelp } = await import("../agent-
|
|
99
|
+
const { printAgentCompactHelp } = await import("../agent-DmTj6BZv.mjs");
|
|
100
100
|
printAgentCompactHelp();
|
|
101
101
|
process.exit(1);
|
|
102
102
|
} else if (parsedCommand.command === "doctor") {
|
|
103
|
-
const { parseDoctorArgs, printDoctorHelp, runDoctor } = await import("../doctor-
|
|
103
|
+
const { parseDoctorArgs, printDoctorHelp, runDoctor } = await import("../doctor-DV5etDpC.mjs");
|
|
104
104
|
const doctorOptions = parseDoctorArgs(args.slice(1));
|
|
105
105
|
if (doctorOptions.help) {
|
|
106
106
|
printDoctorHelp();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K as rootLayoutTemplate, W as postcssConfigTemplate, g as docsLayoutTemplate, v as globalCssTemplate, yt as tsconfigTemplate } from "./templates-
|
|
1
|
+
import { K as rootLayoutTemplate, W as postcssConfigTemplate, g as docsLayoutTemplate, v as globalCssTemplate, yt as tsconfigTemplate } from "./templates-BIk7zhQ3.mjs";
|
|
2
2
|
import { i as detectPackageManagerFromLockfile } from "./utils-l0lcezN8.mjs";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { c as DEFAULT_LLMS_TXT_ROUTE, f as DEFAULT_MCP_WELL_KNOWN_ROUTE, i as DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, m as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, o as DEFAULT_LLMS_FULL_TXT_ROUTE, p as DEFAULT_SKILL_MD_ROUTE, r as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, t as DEFAULT_AGENT_FEEDBACK_ROUTE, u as DEFAULT_MCP_PUBLIC_ROUTE } from "./agent-
|
|
1
|
+
import { c as DEFAULT_LLMS_TXT_ROUTE, f as DEFAULT_MCP_WELL_KNOWN_ROUTE, i as DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, m as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, o as DEFAULT_LLMS_FULL_TXT_ROUTE, p as DEFAULT_SKILL_MD_ROUTE, r as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, t as DEFAULT_AGENT_FEEDBACK_ROUTE, u as DEFAULT_MCP_PUBLIC_ROUTE } from "./agent-ttKB8Q3N.mjs";
|
|
2
2
|
import "./search-kP0mAXCp.mjs";
|
|
3
|
+
import { i as DEFAULT_SITEMAP_XML_ROUTE, n as DEFAULT_SITEMAP_MD_ROUTE, r as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, u as resolveDocsSitemapConfig } from "./sitemap-Buobvabq.mjs";
|
|
3
4
|
import "./sitemap-server-B370zkEo.mjs";
|
|
4
5
|
import { createFilesystemDocsMcpSource, resolveDocsMcpConfig } from "./mcp.mjs";
|
|
5
6
|
import "./server.mjs";
|
|
6
7
|
import { a as loadProjectEnv, c as readNavTitle, d as readTopLevelStringProperty, f as resolveDocsConfigPath, i as loadDocsConfigModule, o as readBooleanProperty, p as resolveDocsContentDir, r as extractTopLevelConfigObject, t as extractNestedObjectLiteral } from "./config-C7sUsMkm.mjs";
|
|
7
|
-
import { inspectAgentCompactionState, scanDocsPageTargets } from "./agent-
|
|
8
|
+
import { inspectAgentCompactionState, scanDocsPageTargets } from "./agent-DmTj6BZv.mjs";
|
|
8
9
|
import { t as detectFramework } from "./utils-l0lcezN8.mjs";
|
|
9
10
|
import { existsSync, lstatSync, readFileSync, readdirSync } from "node:fs";
|
|
10
11
|
import path from "node:path";
|
|
@@ -178,6 +179,13 @@ function readTopLevelBooleanProperty(content, key) {
|
|
|
178
179
|
if (match) return match[1] === "true";
|
|
179
180
|
}
|
|
180
181
|
}
|
|
182
|
+
function readObjectBooleanProperty(content, key) {
|
|
183
|
+
const propertyPattern = new RegExp(`^\\s*${escapeRegExp(key)}\\s*:\\s*(true|false)(?:\\s|$)`);
|
|
184
|
+
for (const property of splitTopLevelProperties(content)) {
|
|
185
|
+
const match = property.trim().match(propertyPattern);
|
|
186
|
+
if (match) return match[1] === "true";
|
|
187
|
+
}
|
|
188
|
+
}
|
|
181
189
|
function resolveFeatureEnabled(config, content, key) {
|
|
182
190
|
const current = config?.[key];
|
|
183
191
|
if (typeof current === "boolean") return current;
|
|
@@ -188,6 +196,22 @@ function resolveFeatureEnabled(config, content, key) {
|
|
|
188
196
|
if (!block) return true;
|
|
189
197
|
return readBooleanProperty(block, "enabled") ?? true;
|
|
190
198
|
}
|
|
199
|
+
function readSitemapConfigFromStatic(content) {
|
|
200
|
+
const topLevelBoolean = readTopLevelBooleanProperty(content, "sitemap");
|
|
201
|
+
if (typeof topLevelBoolean === "boolean") return topLevelBoolean;
|
|
202
|
+
const block = extractNestedObjectLiteral(content, ["sitemap"]);
|
|
203
|
+
if (!block) return void 0;
|
|
204
|
+
const config = {};
|
|
205
|
+
const enabled = readObjectBooleanProperty(block, "enabled");
|
|
206
|
+
const routePrefix = block.match(/\broutePrefix\s*:\s*["'`]([^"'`]+)["'`]/)?.[1];
|
|
207
|
+
const baseUrl = block.match(/\bbaseUrl\s*:\s*["'`]([^"'`]+)["'`]/)?.[1];
|
|
208
|
+
const manifestPath = block.match(/\bmanifestPath\s*:\s*["'`]([^"'`]+)["'`]/)?.[1];
|
|
209
|
+
if (typeof enabled === "boolean") config.enabled = enabled;
|
|
210
|
+
if (routePrefix) config.routePrefix = routePrefix;
|
|
211
|
+
if (baseUrl) config.baseUrl = baseUrl;
|
|
212
|
+
if (manifestPath) config.manifestPath = manifestPath;
|
|
213
|
+
return config;
|
|
214
|
+
}
|
|
191
215
|
function resolveStaticExport(config, content) {
|
|
192
216
|
if (typeof config?.staticExport === "boolean") return config.staticExport;
|
|
193
217
|
return readTopLevelBooleanProperty(content, "staticExport") ?? false;
|
|
@@ -303,7 +327,7 @@ function detectRouteSurface(rootDir, framework, staticExport, files) {
|
|
|
303
327
|
apiMounted: false,
|
|
304
328
|
apiDetail: "Next static export disables /api/docs and the shared agent endpoints.",
|
|
305
329
|
publicMounted: false,
|
|
306
|
-
publicDetail: "Public .md, llms.txt, skill.md, and agent discovery routes depend on /api/docs."
|
|
330
|
+
publicDetail: "Public .md, llms.txt, sitemap, skill.md, and agent discovery routes depend on /api/docs."
|
|
307
331
|
};
|
|
308
332
|
return {
|
|
309
333
|
apiMounted: apiRoutes.length > 0,
|
|
@@ -811,6 +835,30 @@ async function probeMcpRoute(baseUrl, route) {
|
|
|
811
835
|
};
|
|
812
836
|
}
|
|
813
837
|
}
|
|
838
|
+
function asRecord(value) {
|
|
839
|
+
return value && typeof value === "object" ? value : void 0;
|
|
840
|
+
}
|
|
841
|
+
function readDiscoveryRoute(value) {
|
|
842
|
+
return typeof value === "string" && value.startsWith("/") ? value : void 0;
|
|
843
|
+
}
|
|
844
|
+
function hostedSitemapRoutes(discoveryBody) {
|
|
845
|
+
const sitemap = asRecord(asRecord(discoveryBody)?.sitemap);
|
|
846
|
+
if (sitemap?.enabled === false) return {
|
|
847
|
+
enabled: false,
|
|
848
|
+
routes: []
|
|
849
|
+
};
|
|
850
|
+
const xml = asRecord(sitemap?.xml);
|
|
851
|
+
const markdown = asRecord(sitemap?.markdown);
|
|
852
|
+
const routes = [
|
|
853
|
+
xml?.enabled === false ? void 0 : readDiscoveryRoute(xml?.route) ?? DEFAULT_SITEMAP_XML_ROUTE,
|
|
854
|
+
markdown?.enabled === false ? void 0 : readDiscoveryRoute(markdown?.route) ?? DEFAULT_SITEMAP_MD_ROUTE,
|
|
855
|
+
markdown?.enabled === false ? void 0 : readDiscoveryRoute(markdown?.wellKnownRoute) ?? DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE
|
|
856
|
+
].filter((route) => typeof route === "string");
|
|
857
|
+
return {
|
|
858
|
+
enabled: true,
|
|
859
|
+
routes: Array.from(new Set(routes))
|
|
860
|
+
};
|
|
861
|
+
}
|
|
814
862
|
async function buildHostedAgentChecks(url, pages) {
|
|
815
863
|
let baseUrl;
|
|
816
864
|
try {
|
|
@@ -824,6 +872,13 @@ async function buildHostedAgentChecks(url, pages) {
|
|
|
824
872
|
const llms = await Promise.all([probeTextRoute(baseUrl, DEFAULT_LLMS_TXT_ROUTE), probeTextRoute(baseUrl, DEFAULT_LLMS_FULL_TXT_ROUTE)]);
|
|
825
873
|
const llmsPassed = llms.filter((result) => result.ok).length;
|
|
826
874
|
checks.push(makeCheck("hosted-llms", "Hosted llms.txt", llmsPassed === llms.length ? "pass" : llmsPassed > 0 ? "warn" : "fail", llmsPassed === llms.length ? 5 : llmsPassed > 0 ? 3 : 0, 5, llms.map((result) => result.detail).join(" "), llmsPassed === llms.length ? void 0 : "Verify deployed /llms.txt and /llms-full.txt routes return non-empty text."));
|
|
875
|
+
const sitemapRoutes = hostedSitemapRoutes(discovery.body);
|
|
876
|
+
if (sitemapRoutes.enabled && sitemapRoutes.routes.length > 0) {
|
|
877
|
+
const sitemap = await Promise.all(sitemapRoutes.routes.map((route) => probeTextRoute(baseUrl, route)));
|
|
878
|
+
const sitemapPassed = sitemap.filter((result) => result.ok).length;
|
|
879
|
+
checks.push(makeCheck("hosted-sitemap", "Hosted sitemap", sitemapPassed === sitemap.length ? "pass" : sitemapPassed > 0 ? "warn" : "fail", sitemapPassed === sitemap.length ? 5 : sitemapPassed > 0 ? 3 : 0, 5, sitemap.map((result) => result.detail).join(" "), sitemapPassed === sitemap.length ? void 0 : `Verify deployed sitemap routes return non-empty text: ${sitemapRoutes.routes.join(", ")}.`));
|
|
880
|
+
} else if (sitemapRoutes.enabled) checks.push(makeCheck("hosted-sitemap", "Hosted sitemap", "warn", 0, 5, "The hosted discovery spec reports sitemap support but did not expose sitemap routes.", "Check sitemap.xml and sitemap.markdown config so at least one sitemap route is enabled."));
|
|
881
|
+
else checks.push(makeCheck("hosted-sitemap", "Hosted sitemap", "warn", 0, 5, "The hosted discovery spec reports sitemap routes as disabled.", "Enable sitemap in docs.config when agents and crawlers should discover canonical URLs and freshness metadata."));
|
|
827
882
|
const skill = await Promise.all([probeTextRoute(baseUrl, DEFAULT_SKILL_MD_ROUTE), probeTextRoute(baseUrl, DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE)]);
|
|
828
883
|
const skillPassed = skill.filter((result) => result.ok).length;
|
|
829
884
|
checks.push(makeCheck("hosted-skill", "Hosted skill.md", skillPassed === skill.length ? "pass" : skillPassed > 0 ? "warn" : "fail", skillPassed === skill.length ? 5 : skillPassed > 0 ? 3 : 0, 5, skill.map((result) => result.detail).join(" "), skillPassed === skill.length ? void 0 : "Verify deployed /skill.md and /.well-known/skill.md routes return non-empty markdown."));
|
|
@@ -928,16 +983,18 @@ async function inspectAgentReadiness(options = {}) {
|
|
|
928
983
|
const compactionResult = compactionFreshnessScore(compactionCoverage, compactConfigured);
|
|
929
984
|
const routeSurface = detectRouteSurface(rootDir, framework, staticExport, files);
|
|
930
985
|
const mcpConfig = resolveDocsMcpConfig(config?.mcp ?? void 0, { defaultName: siteTitle });
|
|
986
|
+
const sitemapConfig = resolveDocsSitemapConfig(config?.sitemap ?? readSitemapConfigFromStatic(configContent) ?? false);
|
|
931
987
|
const feedbackRoute = DEFAULT_AGENT_FEEDBACK_ROUTE;
|
|
932
988
|
const feedbackSchemaRoute = `${feedbackRoute}/schema`;
|
|
933
989
|
const checks = [];
|
|
934
990
|
checks.push(makeCheck("config", "Docs config", "pass", 10, configCheckMax, loadedConfig ? `Resolved ${path.relative(rootDir, loadedConfig.path).replace(/\\/g, "/")} and evaluated the config module.` : `Resolved ${path.relative(rootDir, configPath).replace(/\\/g, "/")} using static parsing fallback.`));
|
|
935
991
|
const contentDirAbs = path.resolve(rootDir, contentDir);
|
|
936
992
|
checks.push(coverage.totalPages > 0 ? makeCheck("content", "Docs content", "pass", 10, 10, `Found ${coverage.totalPages} docs page${coverage.totalPages === 1 ? "" : "s"} in ${path.relative(rootDir, contentDirAbs).replace(/\\/g, "/")}.`) : makeCheck("content", "Docs content", "fail", 0, 10, `No folder-based docs pages were found in ${path.relative(rootDir, contentDirAbs).replace(/\\/g, "/")}.`, "Add index/page MDX files under the configured contentDir so the machine-readable surfaces have pages to serve."));
|
|
937
|
-
checks.push(makeCheck("api-route", "Docs API route", routeSurface.apiMounted ? "pass" : "fail", routeSurface.apiMounted ? 10 : 0, 10, routeSurface.apiDetail, routeSurface.apiMounted ? void 0 : "Wire the framework docs API route so /api/docs can serve markdown, llms.txt, skill.md, and discovery responses."));
|
|
938
|
-
checks.push(makeCheck("public-routes", "Public agent routes", routeSurface.publicMounted ? "pass" : "fail", routeSurface.publicMounted ? 10 : 0, 10, routeSurface.publicDetail, routeSurface.publicMounted ? void 0 : "Add the framework public forwarder so /.well-known/*, /llms.txt, /skill.md, /mcp, and .md routes resolve from the shared docs API."));
|
|
993
|
+
checks.push(makeCheck("api-route", "Docs API route", routeSurface.apiMounted ? "pass" : "fail", routeSurface.apiMounted ? 10 : 0, 10, routeSurface.apiDetail, routeSurface.apiMounted ? void 0 : "Wire the framework docs API route so /api/docs can serve markdown, llms.txt, sitemap, skill.md, and discovery responses."));
|
|
994
|
+
checks.push(makeCheck("public-routes", "Public agent routes", routeSurface.publicMounted ? "pass" : "fail", routeSurface.publicMounted ? 10 : 0, 10, routeSurface.publicDetail, routeSurface.publicMounted ? void 0 : "Add the framework public forwarder so /.well-known/*, /llms.txt, /sitemap.xml, /sitemap.md, /skill.md, /mcp, and .md routes resolve from the shared docs API."));
|
|
939
995
|
checks.push(makeCheck("agent-discovery", "Agent discovery spec", routeSurface.apiMounted && routeSurface.publicMounted ? "pass" : "fail", routeSurface.apiMounted && routeSurface.publicMounted ? 5 : 0, 5, routeSurface.apiMounted && routeSurface.publicMounted ? `Expected discovery endpoints are available through ${DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE}, ${DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE}, and /api/docs?agent=spec.` : "Could not verify the shared agent discovery spec endpoints because docs API/public route wiring is incomplete.", routeSurface.apiMounted && routeSurface.publicMounted ? void 0 : "Make sure both the docs API handler and the public docs forwarder are mounted so agents can discover the site through the well-known agent spec."));
|
|
940
|
-
checks.push(llmsEnabled ? makeCheck("llms", "llms.txt discovery", "pass",
|
|
996
|
+
checks.push(llmsEnabled ? makeCheck("llms", "llms.txt discovery", "pass", 5, 5, `Enabled via ${DEFAULT_LLMS_TXT_ROUTE} and ${DEFAULT_LLMS_FULL_TXT_ROUTE}.`) : makeCheck("llms", "llms.txt discovery", "warn", 0, 5, `${DEFAULT_LLMS_TXT_ROUTE} and ${DEFAULT_LLMS_FULL_TXT_ROUTE} are disabled in docs config.`, "Enable llmsTxt so agents and GEO crawlers can discover the docs index and full context surfaces."));
|
|
997
|
+
checks.push(sitemapConfig.enabled ? makeCheck("sitemap", "Sitemap discovery", "pass", 5, 5, `Enabled via ${sitemapConfig.xml.route}, ${sitemapConfig.markdown.route}, and ${sitemapConfig.markdown.wellKnownRoute}.`) : makeCheck("sitemap", "Sitemap discovery", "warn", 0, 5, "Generated sitemap routes are disabled in docs config.", "Enable sitemap so crawlers and agents can discover canonical docs URLs, semantic sections, and lastmod freshness metadata."));
|
|
941
998
|
checks.push(skillFileExists ? makeCheck("skill", "Skill document", "pass", 5, 5, `Found root skill.md for ${DEFAULT_SKILL_MD_ROUTE} and ${DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE}.`) : makeCheck("skill", "Skill document", "warn", 3, 5, `No root skill.md found; the framework will serve the generated fallback at ${DEFAULT_SKILL_MD_ROUTE}.`, "Add a root skill.md if you want a custom site-specific bootstrap document instead of the generated fallback."));
|
|
942
999
|
checks.push(mcpEnabled ? makeCheck("mcp", "MCP access", "pass", 10, 10, `Enabled with public aliases ${DEFAULT_MCP_PUBLIC_ROUTE} and ${DEFAULT_MCP_WELL_KNOWN_ROUTE} (canonical route ${mcpConfig.route}).`) : makeCheck("mcp", "MCP access", "warn", 0, 10, "MCP is disabled in docs config.", "Enable mcp so agents can use list/search/read tools directly instead of only scraping markdown routes."));
|
|
943
1000
|
checks.push(searchEnabled ? makeCheck("search", "Search surface", "pass", 5, 5, "Search is enabled for the shared docs API and agent flows.") : makeCheck("search", "Search surface", "warn", 0, 5, "Search is disabled in docs config.", "Enable search so agents can narrow retrieval before reading whole markdown pages."));
|
package/dist/index.d.mts
CHANGED
|
@@ -234,6 +234,9 @@ interface DocsMarkdownPage {
|
|
|
234
234
|
}
|
|
235
235
|
declare function normalizeDocsPathSegment(value: string): string;
|
|
236
236
|
declare function normalizeDocsUrlPath(value: string): string;
|
|
237
|
+
declare function toDocsMarkdownUrl(url: string, options?: {
|
|
238
|
+
locale?: string;
|
|
239
|
+
}): string;
|
|
237
240
|
declare function isDocsAgentDiscoveryRequest(url: URL): boolean;
|
|
238
241
|
declare function isDocsMcpRequest(url: URL): boolean;
|
|
239
242
|
declare function isDocsSkillRequest(url: URL): boolean;
|
|
@@ -396,4 +399,4 @@ declare function buildDocsAgentDiscoverySpec({
|
|
|
396
399
|
};
|
|
397
400
|
};
|
|
398
401
|
//#endregion
|
|
399
|
-
export { type AIConfig, type AgentFeedbackConfig, type AlgoliaDocsSearchConfig, type ApiReferenceConfig, type ApiReferenceRenderer, type BreadcrumbConfig, type ChangelogConfig, type ChangelogEntrySummary, type ChangelogFrontmatter, type CodeBlockCopyData, type CopyMarkdownConfig, type CustomDocsSearchConfig, DEFAULT_AGENT_FEEDBACK_ROUTE, DEFAULT_AGENT_SPEC_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, DEFAULT_DOCS_API_ROUTE, DEFAULT_LLMS_FULL_TXT_ROUTE, DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, DEFAULT_LLMS_TXT_ROUTE, DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE, DEFAULT_MCP_PUBLIC_ROUTE, DEFAULT_MCP_ROUTE, DEFAULT_MCP_WELL_KNOWN_ROUTE, DEFAULT_SITEMAP_MANIFEST_PATH, DEFAULT_SITEMAP_MD_ROUTE, DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, DEFAULT_SITEMAP_XML_ROUTE, DEFAULT_SKILL_MD_ROUTE, DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, DOCS_AGENT_TRACE_EVENT_TYPES, type DocsAgentDiscoverySpecOptions, type DocsAgentFeedbackContext, type DocsAgentFeedbackData, type DocsAgentFeedbackDiscoveryConfig, type DocsAgentTraceContext, type DocsAgentTraceEventInput, type DocsAgentTraceEventType, type DocsAgentTraceStatus, type DocsAnalyticsConfig, type DocsAnalyticsEvent, type DocsAnalyticsEventInput, type DocsAnalyticsEventType, type DocsAnalyticsInput, type DocsAnalyticsSource, type DocsAskAIActionData, type DocsAskAIActionType, type DocsAskAIFeedbackConfig, type DocsAskAIFeedbackData, type DocsAskAIFeedbackMessage, type DocsAskAIFeedbackValue, type DocsAskAIMcpConfig, type DocsCloudAnalyticsOptions, type DocsConfig, type DocsFeedbackData, type DocsFeedbackValue, type DocsI18nConfig, type DocsLlmsDiscoveryConfig, type DocsMarkdownPage, type DocsMcpConfig, type DocsMcpToolsConfig, type DocsMetadata, type DocsNav, type DocsObservabilityConfig, type DocsObservabilityEvent, type DocsObservabilityEventInput, type DocsPathMatch, type DocsRelatedItem, type DocsSearchAdapter, type DocsSearchAdapterContext, type DocsSearchAdapterFactory, type DocsSearchChunkingConfig, type DocsSearchConfig, type DocsSearchDocument, type DocsSearchEmbeddingsConfig, type DocsSearchQuery, type DocsSearchResult, type DocsSearchResultType, type DocsSearchSourcePage, type DocsSitemapConfig, type DocsSitemapFormat, type DocsSitemapManifest, type DocsSitemapManifestPage, type DocsSitemapPageInput, type DocsSitemapResolvedConfig, type DocsSkillDocumentOptions, type DocsTheme, type FeedbackConfig, type FontStyle, GENERATED_AGENT_PROVENANCE_MARKER, GENERATED_AGENT_PROVENANCE_VERSION, type GeneratedAgentProvenance, type GeneratedAgentSourceKind, type GithubConfig, type LastUpdatedConfig, type LlmsTxtConfig, type McpDocsSearchConfig, type OGConfig, type OpenDocsConfig, type OpenDocsProvider, type OpenGraphImage, type OrderingItem, type PageActionsConfig, type PageFrontmatter, type PageOpenGraph, type PageSidebarFrontmatter, type PageTwitter, type ReadingTimeConfig, type ResolvedChangelogConfig, type ResolvedDocsAnalyticsConfig, type ResolvedDocsI18n, type ResolvedDocsObservabilityConfig, type ResolvedDocsRelatedLink, type SidebarComponentProps, type SidebarConfig, type SidebarFolderIndexBehavior, type SidebarFolderNode, type SidebarNode, type SidebarPageNode, type SidebarTree, type SimpleDocsSearchConfig, type ThemeToggleConfig, type TypesenseDocsSearchConfig, type TypographyConfig, type UIConfig, applySidebarFolderIndexBehavior, buildDocsAgentDiscoverySpec, buildDocsAskAIContext, buildDocsSearchDocuments, buildDocsSitemapManifest, buildPageOpenGraph, buildPageTwitter, createAlgoliaSearchAdapter, createCustomSearchAdapter, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsCloudAnalytics, createDocsSitemapResponse, createMcpSearchAdapter, createSimpleSearchAdapter, createTheme, createTypesenseSearchAdapter, deepMerge, defineDocs, emitDocsAgentTraceEvent, emitDocsAnalyticsEvent, emitDocsObservabilityEvent, estimateReadingTimeMinutes, extendTheme, findDocsMarkdownPage, formatDocsAskAIPackageHints, hashGeneratedAgentContent, inferDocsAskAIPackageHints, isDocsAgentDiscoveryRequest, isDocsMcpRequest, isDocsPublicGetRequest, isDocsSkillRequest, normalizeDocsPathSegment, normalizeDocsRelated, normalizeDocsUrlPath, normalizeGeneratedAgentContent, parseGeneratedAgentDocument, performDocsSearch, readDocsSitemapManifestFromContentMap, renderDocsMarkdownDocument, renderDocsRelatedMarkdownLines, renderDocsSitemapMarkdown, renderDocsSitemapXml, renderDocsSkillDocument, resolveAskAISearchRequestConfig, resolveChangelogConfig, resolveDocsAgentMdxContent, resolveDocsAnalyticsConfig, resolveDocsI18n, resolveDocsLlmsTxtFormat, resolveDocsLocale, resolveDocsMarkdownRequest, resolveDocsObservabilityConfig, resolveDocsPath, resolveDocsSitemapConfig, resolveDocsSitemapRequest, resolveDocsSkillFormat, resolveOGImage, resolvePageReadingTime, resolvePageSidebarFolderIndexBehavior, resolveReadingTimeFromContent, resolveReadingTimeFromSource, resolveReadingTimeOptions, resolveSearchRequestConfig, resolveSidebarFolderIndexBehavior, resolveSidebarFolderIndexBehaviorForPath, resolveTitle, serializeGeneratedAgentDocument, stripGeneratedAgentProvenance, toDocsSitemapMarkdownUrl };
|
|
402
|
+
export { type AIConfig, type AgentFeedbackConfig, type AlgoliaDocsSearchConfig, type ApiReferenceConfig, type ApiReferenceRenderer, type BreadcrumbConfig, type ChangelogConfig, type ChangelogEntrySummary, type ChangelogFrontmatter, type CodeBlockCopyData, type CopyMarkdownConfig, type CustomDocsSearchConfig, DEFAULT_AGENT_FEEDBACK_ROUTE, DEFAULT_AGENT_SPEC_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, DEFAULT_DOCS_API_ROUTE, DEFAULT_LLMS_FULL_TXT_ROUTE, DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, DEFAULT_LLMS_TXT_ROUTE, DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE, DEFAULT_MCP_PUBLIC_ROUTE, DEFAULT_MCP_ROUTE, DEFAULT_MCP_WELL_KNOWN_ROUTE, DEFAULT_SITEMAP_MANIFEST_PATH, DEFAULT_SITEMAP_MD_ROUTE, DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, DEFAULT_SITEMAP_XML_ROUTE, DEFAULT_SKILL_MD_ROUTE, DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, DOCS_AGENT_TRACE_EVENT_TYPES, type DocsAgentDiscoverySpecOptions, type DocsAgentFeedbackContext, type DocsAgentFeedbackData, type DocsAgentFeedbackDiscoveryConfig, type DocsAgentTraceContext, type DocsAgentTraceEventInput, type DocsAgentTraceEventType, type DocsAgentTraceStatus, type DocsAnalyticsConfig, type DocsAnalyticsEvent, type DocsAnalyticsEventInput, type DocsAnalyticsEventType, type DocsAnalyticsInput, type DocsAnalyticsSource, type DocsAskAIActionData, type DocsAskAIActionType, type DocsAskAIFeedbackConfig, type DocsAskAIFeedbackData, type DocsAskAIFeedbackMessage, type DocsAskAIFeedbackValue, type DocsAskAIMcpConfig, type DocsCloudAnalyticsOptions, type DocsConfig, type DocsFeedbackData, type DocsFeedbackValue, type DocsI18nConfig, type DocsLlmsDiscoveryConfig, type DocsMarkdownPage, type DocsMcpConfig, type DocsMcpToolsConfig, type DocsMetadata, type DocsNav, type DocsObservabilityConfig, type DocsObservabilityEvent, type DocsObservabilityEventInput, type DocsPathMatch, type DocsRelatedItem, type DocsSearchAdapter, type DocsSearchAdapterContext, type DocsSearchAdapterFactory, type DocsSearchChunkingConfig, type DocsSearchConfig, type DocsSearchDocument, type DocsSearchEmbeddingsConfig, type DocsSearchQuery, type DocsSearchResult, type DocsSearchResultType, type DocsSearchSourcePage, type DocsSitemapConfig, type DocsSitemapFormat, type DocsSitemapManifest, type DocsSitemapManifestPage, type DocsSitemapPageInput, type DocsSitemapResolvedConfig, type DocsSkillDocumentOptions, type DocsTheme, type FeedbackConfig, type FontStyle, GENERATED_AGENT_PROVENANCE_MARKER, GENERATED_AGENT_PROVENANCE_VERSION, type GeneratedAgentProvenance, type GeneratedAgentSourceKind, type GithubConfig, type LastUpdatedConfig, type LlmsTxtConfig, type McpDocsSearchConfig, type OGConfig, type OpenDocsConfig, type OpenDocsProvider, type OpenGraphImage, type OrderingItem, type PageActionsConfig, type PageFrontmatter, type PageOpenGraph, type PageSidebarFrontmatter, type PageTwitter, type ReadingTimeConfig, type ResolvedChangelogConfig, type ResolvedDocsAnalyticsConfig, type ResolvedDocsI18n, type ResolvedDocsObservabilityConfig, type ResolvedDocsRelatedLink, type SidebarComponentProps, type SidebarConfig, type SidebarFolderIndexBehavior, type SidebarFolderNode, type SidebarNode, type SidebarPageNode, type SidebarTree, type SimpleDocsSearchConfig, type ThemeToggleConfig, type TypesenseDocsSearchConfig, type TypographyConfig, type UIConfig, applySidebarFolderIndexBehavior, buildDocsAgentDiscoverySpec, buildDocsAskAIContext, buildDocsSearchDocuments, buildDocsSitemapManifest, buildPageOpenGraph, buildPageTwitter, createAlgoliaSearchAdapter, createCustomSearchAdapter, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsCloudAnalytics, createDocsSitemapResponse, createMcpSearchAdapter, createSimpleSearchAdapter, createTheme, createTypesenseSearchAdapter, deepMerge, defineDocs, emitDocsAgentTraceEvent, emitDocsAnalyticsEvent, emitDocsObservabilityEvent, estimateReadingTimeMinutes, extendTheme, findDocsMarkdownPage, formatDocsAskAIPackageHints, hashGeneratedAgentContent, inferDocsAskAIPackageHints, isDocsAgentDiscoveryRequest, isDocsMcpRequest, isDocsPublicGetRequest, isDocsSkillRequest, normalizeDocsPathSegment, normalizeDocsRelated, normalizeDocsUrlPath, normalizeGeneratedAgentContent, parseGeneratedAgentDocument, performDocsSearch, readDocsSitemapManifestFromContentMap, renderDocsMarkdownDocument, renderDocsRelatedMarkdownLines, renderDocsSitemapMarkdown, renderDocsSitemapXml, renderDocsSkillDocument, resolveAskAISearchRequestConfig, resolveChangelogConfig, resolveDocsAgentMdxContent, resolveDocsAnalyticsConfig, resolveDocsI18n, resolveDocsLlmsTxtFormat, resolveDocsLocale, resolveDocsMarkdownRequest, resolveDocsObservabilityConfig, resolveDocsPath, resolveDocsSitemapConfig, resolveDocsSitemapRequest, resolveDocsSkillFormat, resolveOGImage, resolvePageReadingTime, resolvePageSidebarFolderIndexBehavior, resolveReadingTimeFromContent, resolveReadingTimeFromSource, resolveReadingTimeOptions, resolveSearchRequestConfig, resolveSidebarFolderIndexBehavior, resolveSidebarFolderIndexBehaviorForPath, resolveTitle, serializeGeneratedAgentDocument, stripGeneratedAgentProvenance, toDocsMarkdownUrl, toDocsSitemapMarkdownUrl };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as estimateReadingTimeMinutes, B as resolveDocsLocale, C as renderDocsMarkdownDocument, D as resolveDocsMarkdownRequest, E as resolveDocsLlmsTxtFormat, F as buildPageOpenGraph, G as resolveChangelogConfig, H as createTheme, I as buildPageTwitter, K as defineDocs, L as resolveOGImage, M as resolveReadingTimeFromContent, N as resolveReadingTimeFromSource, O as resolveDocsSkillFormat, P as resolveReadingTimeOptions, R as resolveTitle, S as normalizeDocsUrlPath, T as resolveDocsAgentMdxContent, U as extendTheme, V as resolveDocsPath, W as deepMerge, _ as isDocsAgentDiscoveryRequest, a as DEFAULT_DOCS_API_ROUTE, b as isDocsSkillRequest, c as DEFAULT_LLMS_TXT_ROUTE, d as DEFAULT_MCP_ROUTE, f as DEFAULT_MCP_WELL_KNOWN_ROUTE, g as findDocsMarkdownPage, h as buildDocsAgentDiscoverySpec, i as DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, j as resolvePageReadingTime, k as toDocsMarkdownUrl, l as DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE, m as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, n as DEFAULT_AGENT_SPEC_ROUTE, o as DEFAULT_LLMS_FULL_TXT_ROUTE, p as DEFAULT_SKILL_MD_ROUTE, r as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, s as DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, t as DEFAULT_AGENT_FEEDBACK_ROUTE, u as DEFAULT_MCP_PUBLIC_ROUTE, v as isDocsMcpRequest, w as renderDocsSkillDocument, x as normalizeDocsPathSegment, y as isDocsPublicGetRequest, z as resolveDocsI18n } from "./agent-ttKB8Q3N.mjs";
|
|
2
2
|
import { A as emitDocsAnalyticsEvent, C as resolveSidebarFolderIndexBehaviorForPath, D as createDocsAgentTraceContext, E as DOCS_AGENT_TRACE_EVENT_TYPES, M as resolveDocsAnalyticsConfig, N as resolveDocsObservabilityConfig, O as createDocsAgentTraceId, P as createDocsCloudAnalytics, S as resolveSidebarFolderIndexBehavior, T as renderDocsRelatedMarkdownLines, _ as parseGeneratedAgentDocument, a as createMcpSearchAdapter, b as applySidebarFolderIndexBehavior, c as formatDocsAskAIPackageHints, d as resolveAskAISearchRequestConfig, f as resolveSearchRequestConfig, g as normalizeGeneratedAgentContent, h as hashGeneratedAgentContent, i as createCustomSearchAdapter, j as emitDocsObservabilityEvent, k as emitDocsAgentTraceEvent, l as inferDocsAskAIPackageHints, m as GENERATED_AGENT_PROVENANCE_VERSION, n as buildDocsSearchDocuments, o as createSimpleSearchAdapter, p as GENERATED_AGENT_PROVENANCE_MARKER, r as createAlgoliaSearchAdapter, s as createTypesenseSearchAdapter, t as buildDocsAskAIContext, u as performDocsSearch, v as serializeGeneratedAgentDocument, w as normalizeDocsRelated, x as resolvePageSidebarFolderIndexBehavior, y as stripGeneratedAgentProvenance } from "./search-kP0mAXCp.mjs";
|
|
3
3
|
import { a as buildDocsSitemapManifest, c as renderDocsSitemapMarkdown, d as resolveDocsSitemapRequest, f as toDocsSitemapMarkdownUrl, i as DEFAULT_SITEMAP_XML_ROUTE, l as renderDocsSitemapXml, n as DEFAULT_SITEMAP_MD_ROUTE, o as createDocsSitemapResponse, r as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, s as readDocsSitemapManifestFromContentMap, t as DEFAULT_SITEMAP_MANIFEST_PATH, u as resolveDocsSitemapConfig } from "./sitemap-Buobvabq.mjs";
|
|
4
4
|
|
|
5
|
-
export { DEFAULT_AGENT_FEEDBACK_ROUTE, DEFAULT_AGENT_SPEC_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, DEFAULT_DOCS_API_ROUTE, DEFAULT_LLMS_FULL_TXT_ROUTE, DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, DEFAULT_LLMS_TXT_ROUTE, DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE, DEFAULT_MCP_PUBLIC_ROUTE, DEFAULT_MCP_ROUTE, DEFAULT_MCP_WELL_KNOWN_ROUTE, DEFAULT_SITEMAP_MANIFEST_PATH, DEFAULT_SITEMAP_MD_ROUTE, DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, DEFAULT_SITEMAP_XML_ROUTE, DEFAULT_SKILL_MD_ROUTE, DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, DOCS_AGENT_TRACE_EVENT_TYPES, GENERATED_AGENT_PROVENANCE_MARKER, GENERATED_AGENT_PROVENANCE_VERSION, applySidebarFolderIndexBehavior, buildDocsAgentDiscoverySpec, buildDocsAskAIContext, buildDocsSearchDocuments, buildDocsSitemapManifest, buildPageOpenGraph, buildPageTwitter, createAlgoliaSearchAdapter, createCustomSearchAdapter, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsCloudAnalytics, createDocsSitemapResponse, createMcpSearchAdapter, createSimpleSearchAdapter, createTheme, createTypesenseSearchAdapter, deepMerge, defineDocs, emitDocsAgentTraceEvent, emitDocsAnalyticsEvent, emitDocsObservabilityEvent, estimateReadingTimeMinutes, extendTheme, findDocsMarkdownPage, formatDocsAskAIPackageHints, hashGeneratedAgentContent, inferDocsAskAIPackageHints, isDocsAgentDiscoveryRequest, isDocsMcpRequest, isDocsPublicGetRequest, isDocsSkillRequest, normalizeDocsPathSegment, normalizeDocsRelated, normalizeDocsUrlPath, normalizeGeneratedAgentContent, parseGeneratedAgentDocument, performDocsSearch, readDocsSitemapManifestFromContentMap, renderDocsMarkdownDocument, renderDocsRelatedMarkdownLines, renderDocsSitemapMarkdown, renderDocsSitemapXml, renderDocsSkillDocument, resolveAskAISearchRequestConfig, resolveChangelogConfig, resolveDocsAgentMdxContent, resolveDocsAnalyticsConfig, resolveDocsI18n, resolveDocsLlmsTxtFormat, resolveDocsLocale, resolveDocsMarkdownRequest, resolveDocsObservabilityConfig, resolveDocsPath, resolveDocsSitemapConfig, resolveDocsSitemapRequest, resolveDocsSkillFormat, resolveOGImage, resolvePageReadingTime, resolvePageSidebarFolderIndexBehavior, resolveReadingTimeFromContent, resolveReadingTimeFromSource, resolveReadingTimeOptions, resolveSearchRequestConfig, resolveSidebarFolderIndexBehavior, resolveSidebarFolderIndexBehaviorForPath, resolveTitle, serializeGeneratedAgentDocument, stripGeneratedAgentProvenance, toDocsSitemapMarkdownUrl };
|
|
5
|
+
export { DEFAULT_AGENT_FEEDBACK_ROUTE, DEFAULT_AGENT_SPEC_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, DEFAULT_DOCS_API_ROUTE, DEFAULT_LLMS_FULL_TXT_ROUTE, DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, DEFAULT_LLMS_TXT_ROUTE, DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE, DEFAULT_MCP_PUBLIC_ROUTE, DEFAULT_MCP_ROUTE, DEFAULT_MCP_WELL_KNOWN_ROUTE, DEFAULT_SITEMAP_MANIFEST_PATH, DEFAULT_SITEMAP_MD_ROUTE, DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, DEFAULT_SITEMAP_XML_ROUTE, DEFAULT_SKILL_MD_ROUTE, DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, DOCS_AGENT_TRACE_EVENT_TYPES, GENERATED_AGENT_PROVENANCE_MARKER, GENERATED_AGENT_PROVENANCE_VERSION, applySidebarFolderIndexBehavior, buildDocsAgentDiscoverySpec, buildDocsAskAIContext, buildDocsSearchDocuments, buildDocsSitemapManifest, buildPageOpenGraph, buildPageTwitter, createAlgoliaSearchAdapter, createCustomSearchAdapter, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsCloudAnalytics, createDocsSitemapResponse, createMcpSearchAdapter, createSimpleSearchAdapter, createTheme, createTypesenseSearchAdapter, deepMerge, defineDocs, emitDocsAgentTraceEvent, emitDocsAnalyticsEvent, emitDocsObservabilityEvent, estimateReadingTimeMinutes, extendTheme, findDocsMarkdownPage, formatDocsAskAIPackageHints, hashGeneratedAgentContent, inferDocsAskAIPackageHints, isDocsAgentDiscoveryRequest, isDocsMcpRequest, isDocsPublicGetRequest, isDocsSkillRequest, normalizeDocsPathSegment, normalizeDocsRelated, normalizeDocsUrlPath, normalizeGeneratedAgentContent, parseGeneratedAgentDocument, performDocsSearch, readDocsSitemapManifestFromContentMap, renderDocsMarkdownDocument, renderDocsRelatedMarkdownLines, renderDocsSitemapMarkdown, renderDocsSitemapXml, renderDocsSkillDocument, resolveAskAISearchRequestConfig, resolveChangelogConfig, resolveDocsAgentMdxContent, resolveDocsAnalyticsConfig, resolveDocsI18n, resolveDocsLlmsTxtFormat, resolveDocsLocale, resolveDocsMarkdownRequest, resolveDocsObservabilityConfig, resolveDocsPath, resolveDocsSitemapConfig, resolveDocsSitemapRequest, resolveDocsSkillFormat, resolveOGImage, resolvePageReadingTime, resolvePageSidebarFolderIndexBehavior, resolveReadingTimeFromContent, resolveReadingTimeFromSource, resolveReadingTimeOptions, resolveSearchRequestConfig, resolveSidebarFolderIndexBehavior, resolveSidebarFolderIndexBehaviorForPath, resolveTitle, serializeGeneratedAgentDocument, stripGeneratedAgentProvenance, toDocsMarkdownUrl, toDocsSitemapMarkdownUrl };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as svelteDocsPublicHookTemplate, A as nextConfigMergedTemplate, B as nuxtServerApiDocsRouteTemplate, C as injectRootProviderIntoLayout, D as injectTanstackVitePlugins, E as injectTanstackRootProviderIntoRoute, F as nuxtDocsConfigTemplate, G as quickstartPageTemplate, H as nuxtServerDocsPublicMiddlewareTemplate, I as nuxtDocsPageTemplate, J as svelteDocsApiRouteTemplate, K as rootLayoutTemplate, L as nuxtGlobalCssTemplate, M as nextLocaleDocPageTemplate, N as nextLocalizedPageTemplate, O as installationPageTemplate, P as nuxtConfigTemplate, Q as svelteDocsPageTemplate, R as nuxtInstallationPageTemplate, S as injectNuxtCssImport, T as injectSvelteDocsPublicHook, U as nuxtWelcomePageTemplate, V as nuxtServerApiReferenceRouteTemplate, W as postcssConfigTemplate, X as svelteDocsLayoutServerTemplate, Y as svelteDocsConfigTemplate, Z as svelteDocsLayoutTemplate, _ as getAstroAdapterPkg, _t as tanstackViteConfigTemplate, a as astroDocsIndexTemplate, at as svelteWelcomePageTemplate, b as injectAstroDocsMiddleware, bt as welcomePageTemplate, c as astroDocsServerTemplate, ct as tanstackDocsCatchAllRouteTemplate, d as astroQuickstartPageTemplate, dt as tanstackDocsIndexRouteTemplate, et as svelteDocsServerTemplate, f as astroWelcomePageTemplate, ft as tanstackDocsPublicRouteTemplate, g as docsLayoutTemplate, gt as tanstackRootRouteTemplate, h as docsConfigTemplate, ht as tanstackQuickstartPageTemplate, i as astroDocsConfigTemplate, it as svelteRootLayoutTemplate, j as nextConfigTemplate, k as nextApiReferencePageTemplate, l as astroGlobalCssTemplate, lt as tanstackDocsConfigTemplate, m as customThemeTsTemplate, mt as tanstackInstallationPageTemplate, n as astroApiRouteTemplate, nt as svelteInstallationPageTemplate, o as astroDocsMiddlewareTemplate, ot as tanstackApiDocsRouteTemplate, p as customThemeCssTemplate, pt as tanstackDocsServerTemplate, q as svelteApiReferenceRouteTemplate, r as astroConfigTemplate, rt as svelteQuickstartPageTemplate, s as astroDocsPageTemplate, st as tanstackApiReferenceRouteTemplate, t as astroApiReferenceRouteTemplate, tt as svelteGlobalCssTemplate, u as astroInstallationPageTemplate, ut as tanstackDocsFunctionsTemplate, v as globalCssTemplate, vt as tanstackWelcomePageTemplate, w as injectSvelteCssImport, x as injectCssImport, y as injectAstroCssImport, yt as tsconfigTemplate, z as nuxtQuickstartPageTemplate } from "./templates-
|
|
1
|
+
import { $ as svelteDocsPublicHookTemplate, A as nextConfigMergedTemplate, B as nuxtServerApiDocsRouteTemplate, C as injectRootProviderIntoLayout, D as injectTanstackVitePlugins, E as injectTanstackRootProviderIntoRoute, F as nuxtDocsConfigTemplate, G as quickstartPageTemplate, H as nuxtServerDocsPublicMiddlewareTemplate, I as nuxtDocsPageTemplate, J as svelteDocsApiRouteTemplate, K as rootLayoutTemplate, L as nuxtGlobalCssTemplate, M as nextLocaleDocPageTemplate, N as nextLocalizedPageTemplate, O as installationPageTemplate, P as nuxtConfigTemplate, Q as svelteDocsPageTemplate, R as nuxtInstallationPageTemplate, S as injectNuxtCssImport, T as injectSvelteDocsPublicHook, U as nuxtWelcomePageTemplate, V as nuxtServerApiReferenceRouteTemplate, W as postcssConfigTemplate, X as svelteDocsLayoutServerTemplate, Y as svelteDocsConfigTemplate, Z as svelteDocsLayoutTemplate, _ as getAstroAdapterPkg, _t as tanstackViteConfigTemplate, a as astroDocsIndexTemplate, at as svelteWelcomePageTemplate, b as injectAstroDocsMiddleware, bt as welcomePageTemplate, c as astroDocsServerTemplate, ct as tanstackDocsCatchAllRouteTemplate, d as astroQuickstartPageTemplate, dt as tanstackDocsIndexRouteTemplate, et as svelteDocsServerTemplate, f as astroWelcomePageTemplate, ft as tanstackDocsPublicRouteTemplate, g as docsLayoutTemplate, gt as tanstackRootRouteTemplate, h as docsConfigTemplate, ht as tanstackQuickstartPageTemplate, i as astroDocsConfigTemplate, it as svelteRootLayoutTemplate, j as nextConfigTemplate, k as nextApiReferencePageTemplate, l as astroGlobalCssTemplate, lt as tanstackDocsConfigTemplate, m as customThemeTsTemplate, mt as tanstackInstallationPageTemplate, n as astroApiRouteTemplate, nt as svelteInstallationPageTemplate, o as astroDocsMiddlewareTemplate, ot as tanstackApiDocsRouteTemplate, p as customThemeCssTemplate, pt as tanstackDocsServerTemplate, q as svelteApiReferenceRouteTemplate, r as astroConfigTemplate, rt as svelteQuickstartPageTemplate, s as astroDocsPageTemplate, st as tanstackApiReferenceRouteTemplate, t as astroApiReferenceRouteTemplate, tt as svelteGlobalCssTemplate, u as astroInstallationPageTemplate, ut as tanstackDocsFunctionsTemplate, v as globalCssTemplate, vt as tanstackWelcomePageTemplate, w as injectSvelteCssImport, x as injectCssImport, y as injectAstroCssImport, yt as tsconfigTemplate, z as nuxtQuickstartPageTemplate } from "./templates-BIk7zhQ3.mjs";
|
|
2
2
|
import { a as devInstallCommand, c as installCommand, d as writeFileSafe, i as detectPackageManagerFromLockfile, l as readFileSafe, n as detectGlobalCssFiles, o as exec, r as detectNextAppDir, s as fileExists, t as detectFramework, u as spawnAndWaitFor } from "./utils-l0lcezN8.mjs";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
@@ -808,6 +808,7 @@ function tanstackDocsIndexRouteTemplate(opts) {
|
|
|
808
808
|
const entryUrl = `/${opts.entry.replace(/^\/+|\/+$/g, "")}`;
|
|
809
809
|
return `\
|
|
810
810
|
import { createFileRoute } from "@tanstack/react-router";
|
|
811
|
+
import { toDocsMarkdownUrl } from "@farming-labs/docs";
|
|
811
812
|
import { TanstackDocsPage } from "@farming-labs/tanstack-start/react";
|
|
812
813
|
import { loadDocPage } from "${tanstackDocsFunctionsImport(opts)}";
|
|
813
814
|
import docsConfig from "${tanstackDocsConfigImport(opts.filePath)}";
|
|
@@ -815,6 +816,9 @@ import docsConfig from "${tanstackDocsConfigImport(opts.filePath)}";
|
|
|
815
816
|
export const Route = createFileRoute("${entryUrl}/")({
|
|
816
817
|
loader: () => loadDocPage({ data: { pathname: "${entryUrl}" } }),
|
|
817
818
|
head: ({ loaderData }) => ({
|
|
819
|
+
links: loaderData && !docsConfig.staticExport
|
|
820
|
+
? [{ rel: "alternate", type: "text/markdown", href: toDocsMarkdownUrl(loaderData.url, { locale: loaderData.locale }) }]
|
|
821
|
+
: [],
|
|
818
822
|
meta: [
|
|
819
823
|
{ title: loaderData ? \`\${loaderData.title} – ${opts.projectName}\` : "${opts.projectName}" },
|
|
820
824
|
...(loaderData?.description
|
|
@@ -836,7 +840,7 @@ function tanstackDocsCatchAllRouteTemplate(opts) {
|
|
|
836
840
|
const serverImport = opts.useAlias ? "@/lib/docs.server" : relativeImport(opts.filePath, "src/lib/docs.server.ts");
|
|
837
841
|
return `\
|
|
838
842
|
import { createFileRoute, notFound } from "@tanstack/react-router";
|
|
839
|
-
import { isDocsPublicGetRequest } from "@farming-labs/docs";
|
|
843
|
+
import { isDocsPublicGetRequest, toDocsMarkdownUrl } from "@farming-labs/docs";
|
|
840
844
|
import { TanstackDocsPage } from "@farming-labs/tanstack-start/react";
|
|
841
845
|
import { loadDocPage } from "${tanstackDocsFunctionsImport(opts)}";
|
|
842
846
|
import { docsServer } from "${serverImport}";
|
|
@@ -870,6 +874,9 @@ export const Route = createFileRoute("${entryUrl}/$")({
|
|
|
870
874
|
}
|
|
871
875
|
},
|
|
872
876
|
head: ({ loaderData }) => ({
|
|
877
|
+
links: loaderData && !docsConfig.staticExport
|
|
878
|
+
? [{ rel: "alternate", type: "text/markdown", href: toDocsMarkdownUrl(loaderData.url, { locale: loaderData.locale }) }]
|
|
879
|
+
: [],
|
|
873
880
|
meta: [
|
|
874
881
|
{ title: loaderData ? \`\${loaderData.title} – ${opts.projectName}\` : "${opts.projectName}" },
|
|
875
882
|
...(loaderData?.description
|
|
@@ -2266,7 +2273,7 @@ ${cfg.entry}/ # Markdown content
|
|
|
2266
2273
|
quickstart/page.md
|
|
2267
2274
|
server/
|
|
2268
2275
|
api/docs.ts # Page data, search, and AI chat API
|
|
2269
|
-
middleware/docs-public.ts # llms.txt, .well-known, .md, and MCP aliases
|
|
2276
|
+
middleware/docs-public.ts # llms.txt, sitemap, .well-known, .md, and MCP aliases
|
|
2270
2277
|
pages/
|
|
2271
2278
|
${cfg.entry}/[[...slug]].vue # Docs catch-all page
|
|
2272
2279
|
docs.config.ts
|