@farming-labs/docs 0.1.73 → 0.1.75
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-D94TCE7Q.mjs → agent-CHLNeC5o.mjs} +4 -4
- package/dist/{agent-C3PhBE3t.mjs → agent-CbX-9Z0z.mjs} +35 -5
- package/dist/cli/index.mjs +30 -8
- package/dist/{dev-BQIDeAoL.mjs → dev-B_Pd2iNL.mjs} +2 -2
- package/dist/{doctor-BFq5YKLg.mjs → doctor-DRhAgUqi.mjs} +6 -6
- package/dist/index.d.mts +28 -4
- package/dist/index.mjs +4 -3
- package/dist/{init-BFhnsS7P.mjs → init-B0oTzLXb.mjs} +2 -2
- package/dist/{mcp-DaNntgC6.mjs → mcp-BPW62uf-.mjs} +3 -3
- package/dist/mcp.d.mts +3 -1
- package/dist/mcp.mjs +9 -4
- package/dist/search-D6uAGmiH.d.mts +196 -0
- package/dist/{search-BzavsA3i.mjs → search-DD2SP_hD.mjs} +3 -3
- package/dist/{search-DBZ6Tkij.mjs → search-kP0mAXCp.mjs} +13 -1
- package/dist/server.d.mts +6 -3
- package/dist/server.mjs +4 -3
- package/dist/sitemap-Buobvabq.mjs +244 -0
- package/dist/sitemap-DCR8tuA7.mjs +240 -0
- package/dist/{prompt-utils-8nmFLQVH.mjs → sitemap-server-B370zkEo.mjs} +16 -2
- package/dist/{templates-BLSQ8EwL.mjs → templates-BlouROIq.mjs} +8 -8
- package/dist/{types-D-OvczD4.d.mts → types-OAHZJ7NI.d.mts} +111 -5
- package/dist/{upgrade-CA_OE7wL.mjs → upgrade-upRj5Fw-.mjs} +1 -1
- package/package.json +1 -1
- package/dist/search-DSKaQ2JH.d.mts +0 -88
- /package/dist/{config-Si-yUfM_.mjs → config-C7sUsMkm.mjs} +0 -0
- /package/dist/{utils-DSMXVnEu.mjs → utils-l0lcezN8.mjs} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { C as renderDocsMarkdownDocument, g as findDocsMarkdownPage } from "./agent-
|
|
2
|
-
import { _ as
|
|
1
|
+
import { C as renderDocsMarkdownDocument, g as findDocsMarkdownPage } from "./agent-CbX-9Z0z.mjs";
|
|
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
|
-
import "./
|
|
4
|
+
import "./sitemap-server-B370zkEo.mjs";
|
|
5
5
|
import { createFilesystemDocsMcpSource } from "./mcp.mjs";
|
|
6
6
|
import "./server.mjs";
|
|
7
|
-
import { a as loadProjectEnv, c as readNavTitle, d as readTopLevelStringProperty, f as resolveDocsConfigPath, i as loadDocsConfigModule, l as readNumberProperty, o as readBooleanProperty, p as resolveDocsContentDir, s as readEnvReferenceProperty, t as extractNestedObjectLiteral, u as readStringProperty } from "./config-
|
|
7
|
+
import { a as loadProjectEnv, c as readNavTitle, d as readTopLevelStringProperty, f as resolveDocsConfigPath, i as loadDocsConfigModule, l as readNumberProperty, o as readBooleanProperty, p as resolveDocsContentDir, s as readEnvReferenceProperty, t as extractNestedObjectLiteral, u as readStringProperty } from "./config-C7sUsMkm.mjs";
|
|
8
8
|
import matter from "gray-matter";
|
|
9
9
|
import { existsSync, mkdirSync, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs";
|
|
10
10
|
import path from "node:path";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { T as renderDocsRelatedMarkdownLines } from "./search-kP0mAXCp.mjs";
|
|
2
|
+
import { d as resolveDocsSitemapRequest, 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";
|
|
2
3
|
import matter from "gray-matter";
|
|
3
4
|
|
|
4
5
|
//#region src/define-docs.ts
|
|
@@ -28,6 +29,7 @@ function defineDocs(config) {
|
|
|
28
29
|
lastUpdated: config.lastUpdated,
|
|
29
30
|
readingTime: config.readingTime,
|
|
30
31
|
llmsTxt: config.llmsTxt,
|
|
32
|
+
sitemap: config.sitemap,
|
|
31
33
|
ai: config.ai,
|
|
32
34
|
ordering: config.ordering,
|
|
33
35
|
metadata: config.metadata,
|
|
@@ -351,10 +353,10 @@ function isDocsSkillRequest(url) {
|
|
|
351
353
|
function resolveDocsSkillFormat(url) {
|
|
352
354
|
return url.searchParams.get("format")?.trim() === "skill" ? "skill" : null;
|
|
353
355
|
}
|
|
354
|
-
function isDocsPublicGetRequest(entry, url, request) {
|
|
356
|
+
function isDocsPublicGetRequest(entry, url, request, options = {}) {
|
|
355
357
|
const pathname = normalizeDocsUrlPath(url.pathname);
|
|
356
358
|
if (pathname === DEFAULT_DOCS_API_ROUTE || pathname === DEFAULT_MCP_ROUTE) return false;
|
|
357
|
-
return isDocsAgentDiscoveryRequest(url) || isDocsSkillRequest(url) || resolveDocsLlmsTxtFormat(url) !== null || resolveDocsMarkdownRequest(entry, url, request) !== null;
|
|
359
|
+
return isDocsAgentDiscoveryRequest(url) || isDocsSkillRequest(url) || resolveDocsLlmsTxtFormat(url) !== null || resolveDocsSitemapRequest(url, options.sitemap) !== null || resolveDocsMarkdownRequest(entry, url, request) !== null;
|
|
358
360
|
}
|
|
359
361
|
function resolveDocsLlmsTxtFormat(url) {
|
|
360
362
|
const pathname = normalizeDocsUrlPath(url.pathname);
|
|
@@ -393,13 +395,14 @@ function renderDocsMarkdownDocument(page) {
|
|
|
393
395
|
lines.push("", page.agentFallbackRawContent ?? page.rawContent ?? page.content);
|
|
394
396
|
return lines.join("\n");
|
|
395
397
|
}
|
|
396
|
-
function renderDocsSkillDocument({ origin, entry = "docs", search, mcp, feedback, llms, markdown }) {
|
|
398
|
+
function renderDocsSkillDocument({ origin, entry = "docs", search, mcp, feedback, llms, sitemap, markdown }) {
|
|
397
399
|
const normalizedEntry = normalizeDocsPathSegment(entry) || "docs";
|
|
398
400
|
const siteTitle = compactSkillText(llms?.siteTitle ?? "Documentation");
|
|
399
401
|
const siteDescription = llms?.siteDescription ? compactSkillText(llms.siteDescription) : void 0;
|
|
400
402
|
const llmsEnabled = llms?.enabled ?? true;
|
|
401
403
|
const searchEnabled = isSearchEnabled(search);
|
|
402
404
|
const feedbackEnabled = feedback?.enabled ?? false;
|
|
405
|
+
const sitemapConfig = resolveDocsSitemapConfig(sitemap);
|
|
403
406
|
const feedbackRoute = feedback?.route ?? DEFAULT_AGENT_FEEDBACK_ROUTE;
|
|
404
407
|
const feedbackSchemaRoute = feedback?.schemaRoute ?? `${feedbackRoute}/schema`;
|
|
405
408
|
const description = truncateSkillDescription(`Use ${siteTitle} through markdown routes, llms.txt, agent discovery, search, and MCP when available.`);
|
|
@@ -419,10 +422,18 @@ function renderDocsSkillDocument({ origin, entry = "docs", search, mcp, feedback
|
|
|
419
422
|
if (markdownAcceptHeader) lines.push(`- You can also request ${markdownAcceptHeader} from normal page URLs.`);
|
|
420
423
|
if (searchEnabled) lines.push(`- Search with ${DEFAULT_DOCS_API_ROUTE}?query={query} when you do not know the page.`);
|
|
421
424
|
if (llmsEnabled) lines.push(`- Use ${DEFAULT_LLMS_TXT_ROUTE} for a compact docs index.`, `- Use ${DEFAULT_LLMS_FULL_TXT_ROUTE} for full markdown context.`);
|
|
425
|
+
if (sitemapConfig.enabled) {
|
|
426
|
+
if (sitemapConfig.xml.enabled) lines.push(`- Use ${sitemapConfig.xml.route} to check canonical page freshness.`);
|
|
427
|
+
if (sitemapConfig.markdown.enabled) lines.push(`- Use ${sitemapConfig.markdown.route} for a semantic docs map.`);
|
|
428
|
+
}
|
|
422
429
|
if (mcp.enabled) lines.push(`- Use ${DEFAULT_MCP_WELL_KNOWN_ROUTE} or ${DEFAULT_MCP_PUBLIC_ROUTE} for MCP tools when your environment supports MCP.`);
|
|
423
430
|
if (feedbackEnabled) lines.push(`- Read ${feedbackSchemaRoute} before posting agent feedback to ${feedbackRoute}.`);
|
|
424
431
|
lines.push("", "## Routes", `- Skill document: ${DEFAULT_SKILL_MD_ROUTE}`, `- Skill well-known alias: ${DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE}`, `- Skill API format: ${DEFAULT_DOCS_API_ROUTE}?format=skill`, `- Agent discovery: ${DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE}`, `- Agent discovery fallback: ${DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE}`, `- Markdown root: /${normalizedEntry}.md`, `- Markdown pages: /${normalizedEntry}/{slug}.md`);
|
|
425
432
|
if (llmsEnabled) lines.push(`- llms.txt: ${DEFAULT_LLMS_TXT_ROUTE}`, `- llms-full.txt: ${DEFAULT_LLMS_FULL_TXT_ROUTE}`, `- llms well-known aliases: ${DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE}, ${DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE}`);
|
|
433
|
+
if (sitemapConfig.enabled) {
|
|
434
|
+
if (sitemapConfig.xml.enabled) lines.push(`- Sitemap XML: ${sitemapConfig.xml.route}`);
|
|
435
|
+
if (sitemapConfig.markdown.enabled) lines.push(`- Sitemap Markdown: ${sitemapConfig.markdown.route}`, `- Sitemap well-known alias: ${sitemapConfig.markdown.wellKnownRoute}`);
|
|
436
|
+
}
|
|
426
437
|
if (mcp.enabled) lines.push(`- MCP: ${DEFAULT_MCP_PUBLIC_ROUTE}, ${DEFAULT_MCP_WELL_KNOWN_ROUTE}`);
|
|
427
438
|
lines.push("", "## Reusable Framework Skills", "For framework setup, CLI, page actions, Ask AI, or configuration work, install the reusable Farming Labs skills:", "", "```sh", "npx skills add farming-labs/docs", "```");
|
|
428
439
|
return lines.join("\n");
|
|
@@ -474,13 +485,14 @@ function resolveDocsAgentMdxContent(content, audience) {
|
|
|
474
485
|
}
|
|
475
486
|
return output.join("\n").replace(/\n{3,}/g, "\n\n").trim();
|
|
476
487
|
}
|
|
477
|
-
function buildDocsAgentDiscoverySpec({ origin, entry = "docs", i18n = null, search, mcp, feedback, llms, markdown }) {
|
|
488
|
+
function buildDocsAgentDiscoverySpec({ origin, entry = "docs", i18n = null, search, mcp, feedback, llms, sitemap, markdown }) {
|
|
478
489
|
const normalizedEntry = normalizeDocsPathSegment(entry) || "docs";
|
|
479
490
|
const localesEnabled = i18n !== null;
|
|
480
491
|
const searchEnabled = isSearchEnabled(search);
|
|
481
492
|
const feedbackRoute = feedback?.route ?? DEFAULT_AGENT_FEEDBACK_ROUTE;
|
|
482
493
|
const feedbackSchemaRoute = feedback?.schemaRoute ?? `${feedbackRoute}/schema`;
|
|
483
494
|
const llmsEnabled = llms?.enabled ?? true;
|
|
495
|
+
const sitemapConfig = resolveDocsSitemapConfig(sitemap, { baseUrl: llms?.baseUrl });
|
|
484
496
|
return {
|
|
485
497
|
version: "1",
|
|
486
498
|
name: "@farming-labs/docs",
|
|
@@ -506,6 +518,7 @@ function buildDocsAgentDiscoverySpec({ origin, entry = "docs", i18n = null, sear
|
|
|
506
518
|
skills: true,
|
|
507
519
|
mcp: mcp.enabled,
|
|
508
520
|
search: searchEnabled,
|
|
521
|
+
sitemap: sitemapConfig.enabled,
|
|
509
522
|
agentFeedback: feedback?.enabled ?? false,
|
|
510
523
|
locales: localesEnabled
|
|
511
524
|
},
|
|
@@ -541,6 +554,23 @@ function buildDocsAgentDiscoverySpec({ origin, entry = "docs", i18n = null, sear
|
|
|
541
554
|
wellKnownTxt: DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE,
|
|
542
555
|
wellKnownFull: DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE
|
|
543
556
|
},
|
|
557
|
+
sitemap: {
|
|
558
|
+
enabled: sitemapConfig.enabled,
|
|
559
|
+
xml: {
|
|
560
|
+
enabled: sitemapConfig.xml.enabled,
|
|
561
|
+
route: sitemapConfig.xml.route,
|
|
562
|
+
api: `${DEFAULT_DOCS_API_ROUTE}?format=sitemap-xml`,
|
|
563
|
+
defaultRoute: DEFAULT_SITEMAP_XML_ROUTE
|
|
564
|
+
},
|
|
565
|
+
markdown: {
|
|
566
|
+
enabled: sitemapConfig.markdown.enabled,
|
|
567
|
+
route: sitemapConfig.markdown.route,
|
|
568
|
+
wellKnownRoute: sitemapConfig.markdown.wellKnownRoute,
|
|
569
|
+
api: `${DEFAULT_DOCS_API_ROUTE}?format=sitemap-md`,
|
|
570
|
+
defaultRoute: DEFAULT_SITEMAP_MD_ROUTE,
|
|
571
|
+
defaultWellKnownRoute: DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE
|
|
572
|
+
}
|
|
573
|
+
},
|
|
544
574
|
search: {
|
|
545
575
|
enabled: searchEnabled,
|
|
546
576
|
endpoint: `${DEFAULT_DOCS_API_ROUTE}?query={query}`,
|
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-B0oTzLXb.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-B_Pd2iNL.mjs");
|
|
84
84
|
await dev(devOptions);
|
|
85
85
|
} else if (parsedCommand.command === "mcp") {
|
|
86
|
-
const { runMcp } = await import("../mcp-
|
|
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-CHLNeC5o.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-CHLNeC5o.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-DRhAgUqi.mjs");
|
|
104
104
|
const doctorOptions = parseDoctorArgs(args.slice(1));
|
|
105
105
|
if (doctorOptions.help) {
|
|
106
106
|
printDoctorHelp();
|
|
@@ -108,15 +108,29 @@ async function main() {
|
|
|
108
108
|
}
|
|
109
109
|
await runDoctor(doctorOptions);
|
|
110
110
|
} else if (parsedCommand.command === "search" && subcommand === "sync") {
|
|
111
|
-
const { syncSearch } = await import("../search-
|
|
111
|
+
const { syncSearch } = await import("../search-DD2SP_hD.mjs");
|
|
112
112
|
await syncSearch(searchSyncOptions);
|
|
113
113
|
} else if (parsedCommand.command === "search") {
|
|
114
114
|
console.error(pc.red(`Unknown search subcommand: ${subcommand ?? "(missing)"}`));
|
|
115
115
|
console.error();
|
|
116
116
|
printHelp();
|
|
117
117
|
process.exit(1);
|
|
118
|
+
} else if (parsedCommand.command === "sitemap" && subcommand === "generate") {
|
|
119
|
+
const { generateSitemap, parseSitemapGenerateArgs, printSitemapGenerateHelp } = await import("../sitemap-DCR8tuA7.mjs");
|
|
120
|
+
const sitemapOptions = parseSitemapGenerateArgs(args.slice(2));
|
|
121
|
+
if (sitemapOptions.help) {
|
|
122
|
+
printSitemapGenerateHelp();
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
await generateSitemap(sitemapOptions);
|
|
126
|
+
} else if (parsedCommand.command === "sitemap") {
|
|
127
|
+
console.error(pc.red(`Unknown sitemap subcommand: ${subcommand ?? "(missing)"}`));
|
|
128
|
+
console.error();
|
|
129
|
+
const { printSitemapGenerateHelp } = await import("../sitemap-DCR8tuA7.mjs");
|
|
130
|
+
printSitemapGenerateHelp();
|
|
131
|
+
process.exit(1);
|
|
118
132
|
} else if (parsedCommand.command === "upgrade") {
|
|
119
|
-
const { upgrade } = await import("../upgrade-
|
|
133
|
+
const { upgrade } = await import("../upgrade-upRj5Fw-.mjs");
|
|
120
134
|
await upgrade({
|
|
121
135
|
framework: (typeof flags.framework === "string" ? flags.framework : void 0) ?? (args[1] && !args[1].startsWith("--") ? args[1] : void 0),
|
|
122
136
|
tag: args.includes("--beta") ? "beta" : args.includes("--latest") ? "latest" : parsedCommand.tag ?? "latest"
|
|
@@ -144,6 +158,7 @@ ${pc.dim("Commands:")}
|
|
|
144
158
|
${pc.cyan("doctor")} Inspect and score agent or reader-facing docs quality
|
|
145
159
|
${pc.cyan("mcp")} Run the built-in docs MCP server over stdio
|
|
146
160
|
${pc.cyan("search")} Search utilities (${pc.dim("sync")} for external indexes)
|
|
161
|
+
${pc.cyan("sitemap")} Sitemap utilities (${pc.dim("generate")} for sitemap XML/Markdown data)
|
|
147
162
|
${pc.cyan("upgrade")} Upgrade @farming-labs/* packages to latest (auto-detect or use --framework)
|
|
148
163
|
|
|
149
164
|
${pc.dim("Supported frameworks:")}
|
|
@@ -209,6 +224,13 @@ ${pc.dim("Options for search sync:")}
|
|
|
209
224
|
${pc.cyan("--index-name <name>")} Algolia index name (default ${pc.dim("docs")})
|
|
210
225
|
${pc.cyan("--search-api-key <key>")} Algolia search key (or use ${pc.dim("ALGOLIA_SEARCH_API_KEY")})
|
|
211
226
|
|
|
227
|
+
${pc.dim("Options for sitemap generate:")}
|
|
228
|
+
${pc.cyan("sitemap generate")} Generate sitemap manifest and public ${pc.dim("sitemap.xml")}/${pc.dim("sitemap.md")}
|
|
229
|
+
${pc.cyan("--public")} Explicitly write public ${pc.dim("sitemap.xml")} and ${pc.dim("sitemap.md")} files
|
|
230
|
+
${pc.cyan("--manifest-only")} Only write the internal sitemap manifest
|
|
231
|
+
${pc.cyan("--check")} Fail if generated sitemap output is stale
|
|
232
|
+
${pc.cyan("--config <path>")} Use a custom docs config path instead of ${pc.dim("docs.config.ts[x]")}
|
|
233
|
+
|
|
212
234
|
${pc.dim("Options for upgrade:")}
|
|
213
235
|
${pc.cyan("--framework <name>")} Explicit framework (${pc.dim("next")}, ${pc.dim("tanstack-start")}, ${pc.dim("nuxt")}, ${pc.dim("sveltekit")}, ${pc.dim("astro")}); omit to auto-detect
|
|
214
236
|
${pc.cyan("--latest")} Install latest stable (default)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { K as rootLayoutTemplate, W as postcssConfigTemplate, g as docsLayoutTemplate, v as globalCssTemplate, yt as tsconfigTemplate } from "./templates-
|
|
2
|
-
import { i as detectPackageManagerFromLockfile } from "./utils-
|
|
1
|
+
import { K as rootLayoutTemplate, W as postcssConfigTemplate, g as docsLayoutTemplate, v as globalCssTemplate, yt as tsconfigTemplate } from "./templates-BlouROIq.mjs";
|
|
2
|
+
import { i as detectPackageManagerFromLockfile } from "./utils-l0lcezN8.mjs";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import pc from "picocolors";
|
|
@@ -1,11 +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-
|
|
2
|
-
import "./search-
|
|
3
|
-
import "./
|
|
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-CbX-9Z0z.mjs";
|
|
2
|
+
import "./search-kP0mAXCp.mjs";
|
|
3
|
+
import "./sitemap-server-B370zkEo.mjs";
|
|
4
4
|
import { createFilesystemDocsMcpSource, resolveDocsMcpConfig } from "./mcp.mjs";
|
|
5
5
|
import "./server.mjs";
|
|
6
|
-
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-
|
|
7
|
-
import { inspectAgentCompactionState, scanDocsPageTargets } from "./agent-
|
|
8
|
-
import { t as detectFramework } from "./utils-
|
|
6
|
+
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-CHLNeC5o.mjs";
|
|
8
|
+
import { t as detectFramework } from "./utils-l0lcezN8.mjs";
|
|
9
9
|
import { existsSync, lstatSync, readFileSync, readdirSync } from "node:fs";
|
|
10
10
|
import path from "node:path";
|
|
11
11
|
import pc from "picocolors";
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { C as
|
|
1
|
+
import { $ as DocsSitemapConfig, A as DocsConfig, At as UIConfig, B as DocsObservabilityEventInput, C as DocsAskAIActionData, Ct as SidebarNode, D as DocsAskAIFeedbackMessage, Dt as ThemeToggleConfig, E as DocsAskAIFeedbackData, Et as SimpleDocsSearchConfig, F as DocsMcpToolsConfig, G as DocsSearchChunkingConfig, H as DocsSearchAdapter, I as DocsMetadata, J as DocsSearchEmbeddingsConfig, K as DocsSearchConfig, L as DocsNav, M as DocsFeedbackValue, N as DocsI18nConfig, O as DocsAskAIFeedbackValue, Ot as TypesenseDocsSearchConfig, P as DocsMcpConfig, Q as DocsSearchSourcePage, R as DocsObservabilityConfig, S as DocsAnalyticsSource, St as SidebarFolderNode, T as DocsAskAIFeedbackConfig, Tt as SidebarTree, U as DocsSearchAdapterContext, V as DocsRelatedItem, W as DocsSearchAdapterFactory, X as DocsSearchResult, Y as DocsSearchQuery, Z as DocsSearchResultType, _ as DocsAnalyticsConfig, _t as ReadingTimeConfig, a as ApiReferenceRenderer, at as LlmsTxtConfig, b as DocsAnalyticsEventType, bt as SidebarConfig, c as ChangelogFrontmatter, ct as OpenDocsConfig, d as CustomDocsSearchConfig, dt as OrderingItem, et as DocsTheme, f as DocsAgentFeedbackContext, ft as PageActionsConfig, g as DocsAgentTraceStatus, gt as PageTwitter, h as DocsAgentTraceEventType, ht as PageSidebarFrontmatter, i as ApiReferenceConfig, it as LastUpdatedConfig, j as DocsFeedbackData, k as DocsAskAIMcpConfig, kt as TypographyConfig, l as CodeBlockCopyData, lt as OpenDocsProvider, m as DocsAgentTraceEventInput, mt as PageOpenGraph, n as AgentFeedbackConfig, nt as FontStyle, o as BreadcrumbConfig, ot as McpDocsSearchConfig, p as DocsAgentFeedbackData, pt as PageFrontmatter, q as DocsSearchDocument, r as AlgoliaDocsSearchConfig, rt as GithubConfig, s as ChangelogConfig, st as OGConfig, t as AIConfig, tt as FeedbackConfig, u as CopyMarkdownConfig, ut as OpenGraphImage, v as DocsAnalyticsEvent, vt as ResolvedDocsRelatedLink, w as DocsAskAIActionType, wt as SidebarPageNode, x as DocsAnalyticsInput, xt as SidebarFolderIndexBehavior, y as DocsAnalyticsEventInput, yt as SidebarComponentProps, z as DocsObservabilityEvent } from "./types-OAHZJ7NI.mjs";
|
|
2
|
+
import { A as DOCS_AGENT_TRACE_EVENT_TYPES, B as resolveDocsObservabilityConfig, C as createDocsSitemapResponse, D as resolveDocsSitemapConfig, E as renderDocsSitemapXml, F as createDocsAgentTraceId, H as createDocsCloudAnalytics, I as emitDocsAgentTraceEvent, L as emitDocsAnalyticsEvent, M as ResolvedDocsAnalyticsConfig, N as ResolvedDocsObservabilityConfig, O as resolveDocsSitemapRequest, P as createDocsAgentTraceContext, R as emitDocsObservabilityEvent, S as buildDocsSitemapManifest, T as renderDocsSitemapMarkdown, V as DocsCloudAnalyticsOptions, _ as DocsSitemapFormat, a as createMcpSearchAdapter, b as DocsSitemapPageInput, c as formatDocsAskAIPackageHints, d as resolveAskAISearchRequestConfig, f as resolveSearchRequestConfig, g as DEFAULT_SITEMAP_XML_ROUTE, h as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, i as createCustomSearchAdapter, j as DocsAgentTraceContext, k as toDocsSitemapMarkdownUrl, l as inferDocsAskAIPackageHints, m as DEFAULT_SITEMAP_MD_ROUTE, n as buildDocsSearchDocuments, o as createSimpleSearchAdapter, p as DEFAULT_SITEMAP_MANIFEST_PATH, r as createAlgoliaSearchAdapter, s as createTypesenseSearchAdapter, t as buildDocsAskAIContext, u as performDocsSearch, v as DocsSitemapManifest, w as readDocsSitemapManifestFromContentMap, x as DocsSitemapResolvedConfig, y as DocsSitemapManifestPage, z as resolveDocsAnalyticsConfig } from "./search-D6uAGmiH.mjs";
|
|
3
3
|
import { DocsMcpPage, DocsMcpResolvedConfig } from "./mcp.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/define-docs.d.ts
|
|
@@ -202,6 +202,7 @@ interface DocsAgentDiscoverySpecOptions {
|
|
|
202
202
|
mcp: DocsMcpResolvedConfig;
|
|
203
203
|
feedback?: DocsAgentFeedbackDiscoveryConfig;
|
|
204
204
|
llms?: DocsLlmsDiscoveryConfig;
|
|
205
|
+
sitemap?: boolean | DocsSitemapConfig;
|
|
205
206
|
markdown?: {
|
|
206
207
|
acceptHeader?: boolean;
|
|
207
208
|
};
|
|
@@ -213,6 +214,7 @@ interface DocsSkillDocumentOptions {
|
|
|
213
214
|
mcp: DocsMcpResolvedConfig;
|
|
214
215
|
feedback?: DocsAgentFeedbackDiscoveryConfig;
|
|
215
216
|
llms?: DocsLlmsDiscoveryConfig;
|
|
217
|
+
sitemap?: boolean | DocsSitemapConfig;
|
|
216
218
|
markdown?: {
|
|
217
219
|
acceptHeader?: boolean;
|
|
218
220
|
};
|
|
@@ -236,7 +238,9 @@ declare function isDocsAgentDiscoveryRequest(url: URL): boolean;
|
|
|
236
238
|
declare function isDocsMcpRequest(url: URL): boolean;
|
|
237
239
|
declare function isDocsSkillRequest(url: URL): boolean;
|
|
238
240
|
declare function resolveDocsSkillFormat(url: URL): "skill" | null;
|
|
239
|
-
declare function isDocsPublicGetRequest(entry: string, url: URL, request: Request
|
|
241
|
+
declare function isDocsPublicGetRequest(entry: string, url: URL, request: Request, options?: {
|
|
242
|
+
sitemap?: boolean | DocsSitemapConfig;
|
|
243
|
+
}): boolean;
|
|
240
244
|
declare function resolveDocsLlmsTxtFormat(url: URL): "llms" | "llms-full" | null;
|
|
241
245
|
declare function resolveDocsMarkdownRequest(entry: string, url: URL, request: Request): {
|
|
242
246
|
requestedPath: string;
|
|
@@ -251,6 +255,7 @@ declare function renderDocsSkillDocument({
|
|
|
251
255
|
mcp,
|
|
252
256
|
feedback,
|
|
253
257
|
llms,
|
|
258
|
+
sitemap,
|
|
254
259
|
markdown
|
|
255
260
|
}: DocsSkillDocumentOptions): string;
|
|
256
261
|
declare function resolveDocsAgentMdxContent(content: string, audience: "human" | "agent"): string;
|
|
@@ -262,6 +267,7 @@ declare function buildDocsAgentDiscoverySpec({
|
|
|
262
267
|
mcp,
|
|
263
268
|
feedback,
|
|
264
269
|
llms,
|
|
270
|
+
sitemap,
|
|
265
271
|
markdown
|
|
266
272
|
}: DocsAgentDiscoverySpecOptions): {
|
|
267
273
|
version: string;
|
|
@@ -288,6 +294,7 @@ declare function buildDocsAgentDiscoverySpec({
|
|
|
288
294
|
skills: boolean;
|
|
289
295
|
mcp: boolean;
|
|
290
296
|
search: boolean;
|
|
297
|
+
sitemap: boolean;
|
|
291
298
|
agentFeedback: boolean;
|
|
292
299
|
locales: boolean;
|
|
293
300
|
};
|
|
@@ -319,6 +326,23 @@ declare function buildDocsAgentDiscoverySpec({
|
|
|
319
326
|
wellKnownTxt: string;
|
|
320
327
|
wellKnownFull: string;
|
|
321
328
|
};
|
|
329
|
+
sitemap: {
|
|
330
|
+
enabled: boolean;
|
|
331
|
+
xml: {
|
|
332
|
+
enabled: boolean;
|
|
333
|
+
route: string;
|
|
334
|
+
api: string;
|
|
335
|
+
defaultRoute: string;
|
|
336
|
+
};
|
|
337
|
+
markdown: {
|
|
338
|
+
enabled: boolean;
|
|
339
|
+
route: string;
|
|
340
|
+
wellKnownRoute: string;
|
|
341
|
+
api: string;
|
|
342
|
+
defaultRoute: string;
|
|
343
|
+
defaultWellKnownRoute: string;
|
|
344
|
+
};
|
|
345
|
+
};
|
|
322
346
|
search: {
|
|
323
347
|
enabled: boolean;
|
|
324
348
|
endpoint: string;
|
|
@@ -372,4 +396,4 @@ declare function buildDocsAgentDiscoverySpec({
|
|
|
372
396
|
};
|
|
373
397
|
};
|
|
374
398
|
//#endregion
|
|
375
|
-
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_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 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 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, buildPageOpenGraph, buildPageTwitter, createAlgoliaSearchAdapter, createCustomSearchAdapter, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsCloudAnalytics, 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, renderDocsMarkdownDocument, renderDocsRelatedMarkdownLines, renderDocsSkillDocument, resolveChangelogConfig, resolveDocsAgentMdxContent, resolveDocsAnalyticsConfig, resolveDocsI18n, resolveDocsLlmsTxtFormat, resolveDocsLocale, resolveDocsMarkdownRequest, resolveDocsObservabilityConfig, resolveDocsPath, resolveDocsSkillFormat, resolveOGImage, resolvePageReadingTime, resolvePageSidebarFolderIndexBehavior, resolveReadingTimeFromContent, resolveReadingTimeFromSource, resolveReadingTimeOptions, resolveSearchRequestConfig, resolveSidebarFolderIndexBehavior, resolveSidebarFolderIndexBehaviorForPath, resolveTitle, serializeGeneratedAgentDocument, stripGeneratedAgentProvenance };
|
|
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 };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { A as resolvePageReadingTime, B as resolveDocsPath, C as renderDocsMarkdownDocument, D as resolveDocsMarkdownRequest, E as resolveDocsLlmsTxtFormat, F as buildPageTwitter, G as defineDocs, H as extendTheme, I as resolveOGImage, L as resolveTitle, M as resolveReadingTimeFromSource, N as resolveReadingTimeOptions, O as resolveDocsSkillFormat, P as buildPageOpenGraph, R as resolveDocsI18n, S as normalizeDocsUrlPath, T as resolveDocsAgentMdxContent, U as deepMerge, V as createTheme, W as resolveChangelogConfig, _ 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 resolveReadingTimeFromContent, k as estimateReadingTimeMinutes, 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 resolveDocsLocale } from "./agent-
|
|
2
|
-
import { A as
|
|
1
|
+
import { A as resolvePageReadingTime, B as resolveDocsPath, C as renderDocsMarkdownDocument, D as resolveDocsMarkdownRequest, E as resolveDocsLlmsTxtFormat, F as buildPageTwitter, G as defineDocs, H as extendTheme, I as resolveOGImage, L as resolveTitle, M as resolveReadingTimeFromSource, N as resolveReadingTimeOptions, O as resolveDocsSkillFormat, P as buildPageOpenGraph, R as resolveDocsI18n, S as normalizeDocsUrlPath, T as resolveDocsAgentMdxContent, U as deepMerge, V as createTheme, W as resolveChangelogConfig, _ 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 resolveReadingTimeFromContent, k as estimateReadingTimeMinutes, 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 resolveDocsLocale } from "./agent-CbX-9Z0z.mjs";
|
|
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
|
+
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";
|
|
3
4
|
|
|
4
|
-
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_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, buildPageOpenGraph, buildPageTwitter, createAlgoliaSearchAdapter, createCustomSearchAdapter, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsCloudAnalytics, 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, renderDocsMarkdownDocument, renderDocsRelatedMarkdownLines, renderDocsSkillDocument, resolveChangelogConfig, resolveDocsAgentMdxContent, resolveDocsAnalyticsConfig, resolveDocsI18n, resolveDocsLlmsTxtFormat, resolveDocsLocale, resolveDocsMarkdownRequest, resolveDocsObservabilityConfig, resolveDocsPath, resolveDocsSkillFormat, resolveOGImage, resolvePageReadingTime, resolvePageSidebarFolderIndexBehavior, resolveReadingTimeFromContent, resolveReadingTimeFromSource, resolveReadingTimeOptions, resolveSearchRequestConfig, resolveSidebarFolderIndexBehavior, resolveSidebarFolderIndexBehaviorForPath, resolveTitle, serializeGeneratedAgentDocument, stripGeneratedAgentProvenance };
|
|
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 };
|
|
@@ -1,5 +1,5 @@
|
|
|
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-
|
|
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-
|
|
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-BlouROIq.mjs";
|
|
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";
|
|
5
5
|
import pc from "picocolors";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./search-
|
|
2
|
-
import "./
|
|
1
|
+
import "./search-kP0mAXCp.mjs";
|
|
2
|
+
import "./sitemap-server-B370zkEo.mjs";
|
|
3
3
|
import { createFilesystemDocsMcpSource, resolveDocsMcpConfig, runDocsMcpStdio } from "./mcp.mjs";
|
|
4
4
|
import "./server.mjs";
|
|
5
|
-
import { c as readNavTitle, f as resolveDocsConfigPath, n as extractObjectLiteral, o as readBooleanProperty, p as resolveDocsContentDir, u as readStringProperty } from "./config-
|
|
5
|
+
import { c as readNavTitle, f as resolveDocsConfigPath, n as extractObjectLiteral, o as readBooleanProperty, p as resolveDocsContentDir, u as readStringProperty } from "./config-C7sUsMkm.mjs";
|
|
6
6
|
import { readFileSync } from "node:fs";
|
|
7
7
|
|
|
8
8
|
//#region src/cli/mcp.ts
|
package/dist/mcp.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { K as DocsSearchConfig, P as DocsMcpConfig, Q as DocsSearchSourcePage, R as DocsObservabilityConfig, _ as DocsAnalyticsConfig, dt as OrderingItem } from "./types-OAHZJ7NI.mjs";
|
|
2
2
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
3
|
|
|
4
4
|
//#region src/mcp.d.ts
|
|
@@ -9,6 +9,8 @@ interface DocsMcpPage {
|
|
|
9
9
|
description?: string;
|
|
10
10
|
related?: DocsSearchSourcePage["related"];
|
|
11
11
|
icon?: string;
|
|
12
|
+
sourcePath?: string;
|
|
13
|
+
lastModified?: string;
|
|
12
14
|
content: string;
|
|
13
15
|
rawContent?: string;
|
|
14
16
|
agentContent?: string;
|
package/dist/mcp.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as emitDocsAnalyticsEvent, D as createDocsAgentTraceContext, O as createDocsAgentTraceId, T as renderDocsRelatedMarkdownLines, k as emitDocsAgentTraceEvent, u as performDocsSearch, w as normalizeDocsRelated, x as resolvePageSidebarFolderIndexBehavior, y as stripGeneratedAgentProvenance } from "./search-kP0mAXCp.mjs";
|
|
2
2
|
import matter from "gray-matter";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
@@ -66,7 +66,7 @@ function createFilesystemDocsMcpSource(options = {}) {
|
|
|
66
66
|
function getPages() {
|
|
67
67
|
const cached = cache.get("__default__");
|
|
68
68
|
if (cached) return cached;
|
|
69
|
-
const pages = scanFilesystemDocsPages(contentDirAbs, entry);
|
|
69
|
+
const pages = scanFilesystemDocsPages(contentDirAbs, entry, rootDir);
|
|
70
70
|
cache.set("__default__", pages);
|
|
71
71
|
return pages;
|
|
72
72
|
}
|
|
@@ -721,14 +721,15 @@ function hasVisibleDescendantFilesystemDocsPage(dir) {
|
|
|
721
721
|
}
|
|
722
722
|
return false;
|
|
723
723
|
}
|
|
724
|
-
function scanFilesystemDocsPages(contentDirAbs, entry) {
|
|
724
|
+
function scanFilesystemDocsPages(contentDirAbs, entry, rootDir) {
|
|
725
725
|
const pages = [];
|
|
726
726
|
function scan(dir, slugParts) {
|
|
727
727
|
if (!fs.existsSync(dir)) return;
|
|
728
728
|
const entries = fs.readdirSync(dir).sort();
|
|
729
729
|
for (const name of entries) {
|
|
730
730
|
const full = path.join(dir, name);
|
|
731
|
-
|
|
731
|
+
const stat = fs.statSync(full);
|
|
732
|
+
if (stat.isDirectory()) {
|
|
732
733
|
scan(full, [...slugParts, name]);
|
|
733
734
|
continue;
|
|
734
735
|
}
|
|
@@ -752,6 +753,8 @@ function scanFilesystemDocsPages(contentDirAbs, entry) {
|
|
|
752
753
|
description: data.description,
|
|
753
754
|
relatedInput: data.related,
|
|
754
755
|
icon: data.icon,
|
|
756
|
+
sourcePath: path.relative(rootDir, full).replace(/\\/g, "/"),
|
|
757
|
+
lastModified: stat.mtime.toISOString(),
|
|
755
758
|
content: stripMarkdownForMcp(humanRawContent),
|
|
756
759
|
rawContent: humanRawContent,
|
|
757
760
|
agentFallbackContent: pageAgentContent,
|
|
@@ -891,6 +894,8 @@ function toSearchSourcePages(pages) {
|
|
|
891
894
|
url: page.url,
|
|
892
895
|
content: page.agentContent ?? page.agentFallbackContent ?? page.content,
|
|
893
896
|
rawContent: page.agentRawContent ?? page.agentFallbackRawContent ?? page.rawContent,
|
|
897
|
+
sourcePath: page.sourcePath,
|
|
898
|
+
lastModified: page.lastModified,
|
|
894
899
|
agentContent: page.agentContent,
|
|
895
900
|
agentRawContent: page.agentRawContent,
|
|
896
901
|
agentFallbackContent: page.agentFallbackContent,
|