@farming-labs/docs 0.1.129 → 0.1.131
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-BS39vnhS.mjs → agent-CuX9y_iA.mjs} +254 -20
- package/dist/{agent-CJNYhzu7.mjs → agent-D7I2vULT.mjs} +3 -3
- package/dist/{agents-BuL01_U0.mjs → agents-DQDj8RmV.mjs} +1 -1
- package/dist/cli/index.mjs +9 -9
- package/dist/{codeblocks-DbJrclYa.mjs → codeblocks-ySyo9e2r.mjs} +1 -1
- package/dist/{doctor-D_c7vJCb.mjs → doctor-DGOBWAah.mjs} +3 -3
- package/dist/index.d.mts +31 -1
- package/dist/index.mjs +3 -3
- package/dist/{robots-Dx2uMF3g.mjs → robots-D3jPtv4r.mjs} +2 -2
- package/dist/{robots-B2BfoyVM.mjs → robots-ygAWyine.mjs} +1 -1
- package/package.json +1 -1
|
@@ -67,6 +67,73 @@ const DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA = {
|
|
|
67
67
|
required: ["task", "outcome"]
|
|
68
68
|
};
|
|
69
69
|
const DOCS_MARKDOWN_SIGNATURE_AGENT_HEADER = "Signature-Agent";
|
|
70
|
+
const DOCS_AI_AGENT_USER_AGENT_PATTERNS = [
|
|
71
|
+
"claudebot",
|
|
72
|
+
"claude-searchbot",
|
|
73
|
+
"claude-user",
|
|
74
|
+
"anthropic-ai",
|
|
75
|
+
"claude-web",
|
|
76
|
+
"chatgpt",
|
|
77
|
+
"gptbot",
|
|
78
|
+
"oai-searchbot",
|
|
79
|
+
"openai",
|
|
80
|
+
"gemini",
|
|
81
|
+
"bard",
|
|
82
|
+
"google-cloudvertexbot",
|
|
83
|
+
"google-extended",
|
|
84
|
+
"meta-externalagent",
|
|
85
|
+
"meta-externalfetcher",
|
|
86
|
+
"meta-webindexer",
|
|
87
|
+
"perplexity",
|
|
88
|
+
"youbot",
|
|
89
|
+
"you.com",
|
|
90
|
+
"deepseekbot",
|
|
91
|
+
"cursor",
|
|
92
|
+
"github-copilot",
|
|
93
|
+
"codeium",
|
|
94
|
+
"tabnine",
|
|
95
|
+
"sourcegraph",
|
|
96
|
+
"cohere-ai",
|
|
97
|
+
"bytespider",
|
|
98
|
+
"amazonbot",
|
|
99
|
+
"ai2bot",
|
|
100
|
+
"diffbot",
|
|
101
|
+
"omgili",
|
|
102
|
+
"omgilibot"
|
|
103
|
+
];
|
|
104
|
+
const DOCS_TRADITIONAL_BOT_USER_AGENT_PATTERNS = [
|
|
105
|
+
"googlebot",
|
|
106
|
+
"bingbot",
|
|
107
|
+
"yandexbot",
|
|
108
|
+
"baiduspider",
|
|
109
|
+
"duckduckbot",
|
|
110
|
+
"slurp",
|
|
111
|
+
"msnbot",
|
|
112
|
+
"facebot",
|
|
113
|
+
"twitterbot",
|
|
114
|
+
"linkedinbot",
|
|
115
|
+
"whatsapp",
|
|
116
|
+
"telegrambot",
|
|
117
|
+
"pingdom",
|
|
118
|
+
"uptimerobot",
|
|
119
|
+
"newrelic",
|
|
120
|
+
"datadog",
|
|
121
|
+
"statuspage",
|
|
122
|
+
"site24x7",
|
|
123
|
+
"applebot"
|
|
124
|
+
];
|
|
125
|
+
const DOCS_BOT_LIKE_USER_AGENT_PATTERN = /bot|agent|fetch|crawl|spider|search/i;
|
|
126
|
+
const DOCS_BOT_LIKE_USER_AGENT_TERMS = [
|
|
127
|
+
"bot",
|
|
128
|
+
"agent",
|
|
129
|
+
"fetch",
|
|
130
|
+
"crawl",
|
|
131
|
+
"spider",
|
|
132
|
+
"search"
|
|
133
|
+
];
|
|
134
|
+
const DOCS_AI_AGENT_USER_AGENT_HEADER_PATTERN = buildDocsUserAgentHeaderPattern(DOCS_AI_AGENT_USER_AGENT_PATTERNS);
|
|
135
|
+
const DOCS_TRADITIONAL_BOT_USER_AGENT_HEADER_PATTERN = buildDocsUserAgentHeaderPattern(DOCS_TRADITIONAL_BOT_USER_AGENT_PATTERNS);
|
|
136
|
+
const DOCS_BOT_LIKE_USER_AGENT_HEADER_PATTERN = buildDocsUserAgentHeaderPattern(DOCS_BOT_LIKE_USER_AGENT_TERMS);
|
|
70
137
|
const DOCS_LLMS_TXT_DIRECTIVE_LINE = "LLM index: /llms.txt";
|
|
71
138
|
const DOCS_MCP_SERVICE_SUBDOMAIN_LABELS = new Set([
|
|
72
139
|
"api",
|
|
@@ -624,7 +691,7 @@ function resolveDocsMarkdownRequest(entry, url, request) {
|
|
|
624
691
|
if (pathname === `${normalizedEntry}.md`) return { requestedPath: "" };
|
|
625
692
|
const slugPrefix = `${normalizedEntry}/`;
|
|
626
693
|
if (pathname.startsWith(slugPrefix) && pathname.endsWith(".md")) return { requestedPath: pathname.slice(slugPrefix.length, -3) };
|
|
627
|
-
if (acceptsMarkdown(request) || hasDocsMarkdownSignatureAgent(request)) {
|
|
694
|
+
if (acceptsMarkdown(request) || hasDocsMarkdownSignatureAgent(request) || detectDocsMarkdownAgentRequest(request).detected) {
|
|
628
695
|
if (pathname === normalizedEntry) return { requestedPath: "" };
|
|
629
696
|
if (pathname.startsWith(slugPrefix)) return { requestedPath: pathname.slice(slugPrefix.length) };
|
|
630
697
|
}
|
|
@@ -633,11 +700,163 @@ function resolveDocsMarkdownRequest(entry, url, request) {
|
|
|
633
700
|
function hasDocsMarkdownSignatureAgent(request) {
|
|
634
701
|
return Boolean(request.headers.get(DOCS_MARKDOWN_SIGNATURE_AGENT_HEADER)?.trim());
|
|
635
702
|
}
|
|
703
|
+
function detectDocsMarkdownAgentRequest(request) {
|
|
704
|
+
if (hasDocsMarkdownSignatureAgent(request)) return {
|
|
705
|
+
detected: true,
|
|
706
|
+
method: "signature_agent"
|
|
707
|
+
};
|
|
708
|
+
const userAgent = request.headers.get("user-agent")?.trim().toLowerCase() ?? "";
|
|
709
|
+
if (!userAgent) return {
|
|
710
|
+
detected: false,
|
|
711
|
+
method: null
|
|
712
|
+
};
|
|
713
|
+
if (DOCS_AI_AGENT_USER_AGENT_PATTERNS.some((pattern) => userAgent.includes(pattern))) return {
|
|
714
|
+
detected: true,
|
|
715
|
+
method: "user_agent"
|
|
716
|
+
};
|
|
717
|
+
if (!request.headers.get("sec-fetch-mode") && DOCS_BOT_LIKE_USER_AGENT_PATTERN.test(userAgent)) {
|
|
718
|
+
if (!DOCS_TRADITIONAL_BOT_USER_AGENT_PATTERNS.some((pattern) => userAgent.includes(pattern))) return {
|
|
719
|
+
detected: true,
|
|
720
|
+
method: "heuristic"
|
|
721
|
+
};
|
|
722
|
+
}
|
|
723
|
+
return {
|
|
724
|
+
detected: false,
|
|
725
|
+
method: null
|
|
726
|
+
};
|
|
727
|
+
}
|
|
636
728
|
function getDocsMarkdownVaryHeader(request) {
|
|
637
|
-
|
|
638
|
-
|
|
729
|
+
const values = /* @__PURE__ */ new Set();
|
|
730
|
+
if (acceptsMarkdown(request)) values.add("Accept");
|
|
731
|
+
if (hasDocsMarkdownSignatureAgent(request)) {
|
|
732
|
+
values.add("Accept");
|
|
733
|
+
values.add(DOCS_MARKDOWN_SIGNATURE_AGENT_HEADER);
|
|
734
|
+
}
|
|
735
|
+
const agentDetection = detectDocsMarkdownAgentRequest(request);
|
|
736
|
+
if (agentDetection.detected && agentDetection.method !== "signature_agent") {
|
|
737
|
+
values.add("User-Agent");
|
|
738
|
+
if (agentDetection.method === "heuristic") values.add("Sec-Fetch-Mode");
|
|
739
|
+
}
|
|
740
|
+
return values.size > 0 ? Array.from(values).join(", ") : null;
|
|
741
|
+
}
|
|
742
|
+
const DOCS_MARKDOWN_RECOVERY_MATCH_LIMIT = 5;
|
|
743
|
+
const DOCS_MARKDOWN_RECOVERY_REDIRECT_CONFIDENCE = .99;
|
|
744
|
+
const DOCS_MARKDOWN_RECOVERY_SLUG_MAX_LENGTH = 256;
|
|
745
|
+
function normalizeDocsRecoveryText(value) {
|
|
746
|
+
return value.toLowerCase().replace(/\.md$/i, "").replace(/[#?].*$/g, "").replace(/['"`]/g, "").replace(/[^a-z0-9]+/g, " ").trim();
|
|
747
|
+
}
|
|
748
|
+
function normalizeDocsRecoverySlug(entry, value) {
|
|
749
|
+
const withoutHash = value.split("#", 1)[0] ?? value;
|
|
750
|
+
const withoutMarkdown = (withoutHash.split("?", 1)[0] ?? withoutHash).replace(/\.md$/i, "");
|
|
751
|
+
const normalizedPath = normalizeDocsUrlPath(withoutMarkdown.startsWith("/") ? withoutMarkdown : `/${withoutMarkdown}`);
|
|
752
|
+
const normalizedEntry = `/${normalizeDocsPathSegment(entry) || "docs"}`;
|
|
753
|
+
if (normalizedPath === normalizedEntry) return "";
|
|
754
|
+
if (normalizedPath.startsWith(`${normalizedEntry}/`)) return normalizeDocsPathSegment(normalizedPath.slice(normalizedEntry.length + 1));
|
|
755
|
+
return normalizeDocsPathSegment(normalizedPath);
|
|
756
|
+
}
|
|
757
|
+
function limitDocsRecoverySlug(value) {
|
|
758
|
+
return value.slice(0, DOCS_MARKDOWN_RECOVERY_SLUG_MAX_LENGTH);
|
|
759
|
+
}
|
|
760
|
+
function tokenizeDocsRecoveryText(value) {
|
|
761
|
+
return normalizeDocsRecoveryText(value).split(/\s+/).filter((token) => token.length > 1);
|
|
762
|
+
}
|
|
763
|
+
function levenshteinDistance(a, b) {
|
|
764
|
+
if (a === b) return 0;
|
|
765
|
+
if (!a) return b.length;
|
|
766
|
+
if (!b) return a.length;
|
|
767
|
+
let previous = Array.from({ length: b.length + 1 }, (_, index) => index);
|
|
768
|
+
let current = new Array(b.length + 1);
|
|
769
|
+
for (let i = 1; i <= a.length; i += 1) {
|
|
770
|
+
current[0] = i;
|
|
771
|
+
for (let j = 1; j <= b.length; j += 1) {
|
|
772
|
+
const substitution = previous[j - 1] + (a[i - 1] === b[j - 1] ? 0 : 1);
|
|
773
|
+
current[j] = Math.min(previous[j] + 1, current[j - 1] + 1, substitution);
|
|
774
|
+
}
|
|
775
|
+
[previous, current] = [current, previous];
|
|
776
|
+
}
|
|
777
|
+
return previous[b.length] ?? Math.max(a.length, b.length);
|
|
778
|
+
}
|
|
779
|
+
function normalizedEditSimilarity(a, b) {
|
|
780
|
+
if (!a || !b) return 0;
|
|
781
|
+
if (a === b) return 1;
|
|
782
|
+
const maxLength = Math.max(a.length, b.length);
|
|
783
|
+
if (maxLength === 0) return 1;
|
|
784
|
+
return Math.max(0, 1 - levenshteinDistance(a, b) / maxLength);
|
|
785
|
+
}
|
|
786
|
+
function tokenOverlapScore(requestedTokens, candidateTokens) {
|
|
787
|
+
if (requestedTokens.length === 0 || candidateTokens.length === 0) return 0;
|
|
788
|
+
const candidates = new Set(candidateTokens);
|
|
789
|
+
return requestedTokens.filter((token) => candidates.has(token)).length / requestedTokens.length;
|
|
790
|
+
}
|
|
791
|
+
function sameDocsRecoveryParent(a, b) {
|
|
792
|
+
const aParts = a.split("/").filter(Boolean);
|
|
793
|
+
const bParts = b.split("/").filter(Boolean);
|
|
794
|
+
if (aParts.length !== bParts.length || aParts.length === 0) return false;
|
|
795
|
+
return aParts.slice(0, -1).join("/") === bParts.slice(0, -1).join("/");
|
|
796
|
+
}
|
|
797
|
+
function scoreDocsMarkdownRecoveryMatch({ entry, requestedPath, page }) {
|
|
798
|
+
const requestedSlug = limitDocsRecoverySlug(normalizeDocsRecoverySlug(entry, requestedPath));
|
|
799
|
+
const pageSlug = limitDocsRecoverySlug(normalizeDocsRecoverySlug(entry, page.url));
|
|
800
|
+
const requestedLast = requestedSlug.split("/").filter(Boolean).at(-1) ?? requestedSlug;
|
|
801
|
+
const pageLast = pageSlug.split("/").filter(Boolean).at(-1) ?? pageSlug;
|
|
802
|
+
const title = normalizeDocsRecoveryText(page.title);
|
|
803
|
+
const requestedText = normalizeDocsRecoveryText(requestedSlug.replace(/\//g, " "));
|
|
804
|
+
const requestedTokens = tokenizeDocsRecoveryText(requestedText);
|
|
805
|
+
const candidateTokens = tokenizeDocsRecoveryText([
|
|
806
|
+
pageSlug.replace(/\//g, " "),
|
|
807
|
+
page.title,
|
|
808
|
+
page.description ?? ""
|
|
809
|
+
].join(" "));
|
|
810
|
+
const pathDistance = levenshteinDistance(requestedSlug, pageSlug);
|
|
811
|
+
const segmentDistance = levenshteinDistance(requestedLast, pageLast);
|
|
812
|
+
if (requestedSlug && pageSlug && (sameDocsRecoveryParent(requestedSlug, pageSlug) && segmentDistance <= 1 || pathDistance <= 1)) return .995;
|
|
813
|
+
const pathSimilarity = normalizedEditSimilarity(requestedSlug, pageSlug);
|
|
814
|
+
const segmentSimilarity = normalizedEditSimilarity(requestedLast, pageLast);
|
|
815
|
+
const titleSimilarity = normalizedEditSimilarity(requestedText, title);
|
|
816
|
+
const overlap = tokenOverlapScore(requestedTokens, candidateTokens);
|
|
817
|
+
const substringBoost = requestedText && (pageSlug.includes(requestedSlug) || title.includes(requestedText) || requestedText.includes(title)) ? .12 : 0;
|
|
818
|
+
return Math.min(.98, Math.max(pathSimilarity * .86, segmentSimilarity * .8, titleSimilarity * .72, overlap * .75) + substringBoost);
|
|
819
|
+
}
|
|
820
|
+
function resolveDocsMarkdownRecovery({ entry = "docs", requestedPath, pages = [] }) {
|
|
821
|
+
const normalizedEntry = normalizeDocsPathSegment(entry) || "docs";
|
|
822
|
+
const matches = pages.map((page) => ({
|
|
823
|
+
page,
|
|
824
|
+
confidence: scoreDocsMarkdownRecoveryMatch({
|
|
825
|
+
entry: normalizedEntry,
|
|
826
|
+
requestedPath,
|
|
827
|
+
page
|
|
828
|
+
})
|
|
829
|
+
})).filter((item) => item.confidence >= .35).sort((a, b) => {
|
|
830
|
+
if (b.confidence !== a.confidence) return b.confidence - a.confidence;
|
|
831
|
+
return a.page.url.localeCompare(b.page.url);
|
|
832
|
+
}).slice(0, DOCS_MARKDOWN_RECOVERY_MATCH_LIMIT).map(({ page, confidence }) => ({
|
|
833
|
+
title: page.title,
|
|
834
|
+
url: normalizeDocsUrlPath(page.url),
|
|
835
|
+
markdownUrl: toDocsMarkdownUrl(page.url),
|
|
836
|
+
description: page.description,
|
|
837
|
+
confidence
|
|
838
|
+
}));
|
|
839
|
+
return {
|
|
840
|
+
matches,
|
|
841
|
+
redirect: matches[0] && matches[0].confidence >= DOCS_MARKDOWN_RECOVERY_REDIRECT_CONFIDENCE ? matches[0] : void 0
|
|
842
|
+
};
|
|
843
|
+
}
|
|
844
|
+
function renderDocsMarkdownSitemapFooter(sitemap) {
|
|
845
|
+
const sitemapConfig = resolveDocsSitemapConfig(sitemap);
|
|
846
|
+
const lines = ["## Sitemap", ""];
|
|
847
|
+
if (sitemapConfig.enabled && sitemapConfig.markdown.enabled) {
|
|
848
|
+
lines.push(`See the full [sitemap](${sitemapConfig.markdown.route}) for all pages.`);
|
|
849
|
+
if (sitemapConfig.markdown.docsRoute) lines.push(`Docs-scoped sitemap: [${sitemapConfig.markdown.docsRoute}](${sitemapConfig.markdown.docsRoute}).`);
|
|
850
|
+
lines.push(`Well-known sitemap: [${sitemapConfig.markdown.wellKnownRoute}](${sitemapConfig.markdown.wellKnownRoute}).`);
|
|
851
|
+
} else if (sitemapConfig.enabled && sitemapConfig.xml.enabled) lines.push(`See the XML [sitemap](${sitemapConfig.xml.route}) for all pages.`);
|
|
852
|
+
else lines.push("Sitemap discovery is not enabled for this deployment.");
|
|
853
|
+
return lines.join("\n");
|
|
639
854
|
}
|
|
640
|
-
function
|
|
855
|
+
function appendDocsMarkdownSitemapFooter(markdown, sitemap) {
|
|
856
|
+
if (/^##\s+Sitemap\s*$/im.test(markdown)) return markdown;
|
|
857
|
+
return `${markdown.replace(/\s+$/g, "")}\n\n${renderDocsMarkdownSitemapFooter(sitemap)}\n`;
|
|
858
|
+
}
|
|
859
|
+
function renderDocsMarkdownNotFound({ entry = "docs", requestedPath, pages, sitemap }) {
|
|
641
860
|
const normalizedEntry = normalizeDocsPathSegment(entry) || "docs";
|
|
642
861
|
const normalizedRequest = normalizeRequestedMarkdownPath(normalizedEntry, requestedPath);
|
|
643
862
|
const slugPrefix = `/${normalizedEntry}/`;
|
|
@@ -646,21 +865,24 @@ function renderDocsMarkdownNotFound({ entry = "docs", requestedPath, sitemap })
|
|
|
646
865
|
const requestedMarkdownRoute = toDocsMarkdownUrl(normalizedRequest);
|
|
647
866
|
const requestedApiRoute = requestedSlug ? `${DEFAULT_DOCS_API_ROUTE}?format=markdown&path=${encodedRequestedSlug}` : `${DEFAULT_DOCS_API_ROUTE}?format=markdown`;
|
|
648
867
|
const sitemapConfig = resolveDocsSitemapConfig(sitemap);
|
|
868
|
+
const recovery = resolveDocsMarkdownRecovery({
|
|
869
|
+
entry: normalizedEntry,
|
|
870
|
+
requestedPath,
|
|
871
|
+
pages
|
|
872
|
+
});
|
|
649
873
|
const lines = [
|
|
650
874
|
"# Docs Page Not Found",
|
|
651
875
|
"",
|
|
652
|
-
`Could not find a markdown page for \`${requestedMarkdownRoute}
|
|
653
|
-
"",
|
|
654
|
-
"Use these discovery routes to find the right page:",
|
|
655
|
-
"",
|
|
656
|
-
`- Agent discovery spec: \`${DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE}\``,
|
|
657
|
-
`- Agent discovery fallback: \`${DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE}\``,
|
|
658
|
-
`- Agent discovery API: \`${DEFAULT_AGENT_SPEC_ROUTE}\``,
|
|
659
|
-
`- Agent instructions: \`${DEFAULT_AGENTS_MD_ROUTE}\``,
|
|
660
|
-
`- Search endpoint: \`${DEFAULT_DOCS_API_ROUTE}?query={query}\``,
|
|
661
|
-
`- Docs index markdown: \`/${normalizedEntry}.md\``,
|
|
662
|
-
`- Requested markdown API route: \`${requestedApiRoute}\``
|
|
876
|
+
`Could not find a markdown page for \`${requestedMarkdownRoute}\`.`
|
|
663
877
|
];
|
|
878
|
+
if (recovery.matches.length > 0) {
|
|
879
|
+
lines.push("", "## Closest Matches", "");
|
|
880
|
+
for (const match of recovery.matches) {
|
|
881
|
+
const confidence = `${Math.round(match.confidence * 1e3) / 10}%`;
|
|
882
|
+
lines.push(`- [${match.title}](${match.markdownUrl}) (${confidence} confidence)${match.description ? ` - ${match.description}` : ""}`);
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
lines.push("", "## Recovery", "", "- If a closest match looks right, fetch that markdown URL directly.", "- If the match is uncertain, search the docs first and then fetch the smallest page that answers the task.", "- Use the sitemap routes below to browse the full docs index before guessing another slug.", "", "## Discovery Routes", "", "Use these discovery routes to find the right page:", "", `- Agent discovery spec: \`${DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE}\``, `- Agent discovery fallback: \`${DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE}\``, `- Agent discovery API: \`${DEFAULT_AGENT_SPEC_ROUTE}\``, `- Agent instructions: \`${DEFAULT_AGENTS_MD_ROUTE}\``, `- Search endpoint: \`${DEFAULT_DOCS_API_ROUTE}?query={query}\``, `- Docs index markdown: \`/${normalizedEntry}.md\``, `- Requested markdown API route: \`${requestedApiRoute}\``);
|
|
664
886
|
if (sitemapConfig.enabled) {
|
|
665
887
|
if (sitemapConfig.markdown.enabled) {
|
|
666
888
|
lines.push(`- Semantic sitemap: \`${sitemapConfig.markdown.route}\``);
|
|
@@ -670,7 +892,7 @@ function renderDocsMarkdownNotFound({ entry = "docs", requestedPath, sitemap })
|
|
|
670
892
|
if (sitemapConfig.xml.enabled) lines.push(`- XML sitemap: \`${sitemapConfig.xml.route}\``);
|
|
671
893
|
} else lines.push(`- Sitemap discovery, if enabled: \`${DEFAULT_SITEMAP_MD_ROUTE}\`, \`${DEFAULT_SITEMAP_MD_DOCS_ROUTE}\`, \`${DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE}\`, or \`${DEFAULT_SITEMAP_XML_ROUTE}\``);
|
|
672
894
|
lines.push("", "The agent discovery spec is the safest first step because it lists the active markdown, sitemap, robots, search, MCP, and feedback routes for this deployment.");
|
|
673
|
-
return lines.join("\n");
|
|
895
|
+
return appendDocsMarkdownSitemapFooter(lines.join("\n"), sitemap);
|
|
674
896
|
}
|
|
675
897
|
function findDocsMarkdownPage(entry, pages, requestedPath) {
|
|
676
898
|
const normalizedRequest = normalizeRequestedMarkdownPath(entry, requestedPath);
|
|
@@ -805,14 +1027,14 @@ function appendDocsAgentPublicRouteLines(lines, context, variant) {
|
|
|
805
1027
|
appendDocsMcpRouteLines(lines, context);
|
|
806
1028
|
}
|
|
807
1029
|
function renderDocsMarkdownDocument(page, options) {
|
|
808
|
-
if (page.agentRawContent !== void 0) return page.agentRawContent;
|
|
1030
|
+
if (page.agentRawContent !== void 0) return appendDocsMarkdownSitemapFooter(page.agentRawContent, options?.sitemap);
|
|
809
1031
|
const relatedLines = renderDocsRelatedMarkdownLines(page.related);
|
|
810
1032
|
const lines = [`# ${page.title}`, `URL: ${page.url}`];
|
|
811
1033
|
if (shouldRenderLlmsDirective(options)) lines.push(DOCS_LLMS_TXT_DIRECTIVE_LINE);
|
|
812
1034
|
if (page.description) lines.push(`Description: ${page.description}`);
|
|
813
1035
|
lines.push(...relatedLines);
|
|
814
1036
|
lines.push("", page.agentFallbackRawContent ?? page.rawContent ?? page.content);
|
|
815
|
-
return lines.join("\n");
|
|
1037
|
+
return appendDocsMarkdownSitemapFooter(lines.join("\n"), options?.sitemap);
|
|
816
1038
|
}
|
|
817
1039
|
function renderDocsSkillDocument(options) {
|
|
818
1040
|
const { origin } = options;
|
|
@@ -847,7 +1069,7 @@ function renderDocsAgentsDocument(options) {
|
|
|
847
1069
|
if (context.siteDescription) lines.push(`Description: ${context.siteDescription}`);
|
|
848
1070
|
lines.push("", "## Start Here");
|
|
849
1071
|
appendDocsAgentStartHereLines(lines, context, "agents");
|
|
850
|
-
lines.push("", "## Working Rules", "- Prefer markdown routes, llms.txt, sitemap.md, OpenAPI schemas, and MCP tools over scraping rendered HTML.", "- Treat generated context files as discovery aids, then fetch the smallest page or section that answers the task.", "- Preserve canonical docs URLs when citing pages back to humans.", "- If a route returns a
|
|
1072
|
+
lines.push("", "## Working Rules", "- Prefer markdown routes, llms.txt, sitemap.md, OpenAPI schemas, and MCP tools over scraping rendered HTML.", "- Treat generated context files as discovery aids, then fetch the smallest page or section that answers the task.", "- Preserve canonical docs URLs when citing pages back to humans.", "- If a markdown route returns a recovery page, use its closest matches, sitemap, and discovery spec before guessing another slug.", "", "## Public Routes");
|
|
851
1073
|
appendDocsAgentPublicRouteLines(lines, context, "agents");
|
|
852
1074
|
lines.push("", "## Framework Maintenance", "- For @farming-labs/docs projects, keep the framework package current before debugging missing agent surfaces.", "", "```sh", "npx @farming-labs/docs@latest upgrade --latest", "```", "", "- For framework setup, configuration, CLI, Ask AI, page actions, or theme work, install the reusable Skills pack:", "", "```sh", "npx skills add farming-labs/docs", "```");
|
|
853
1075
|
return lines.join("\n");
|
|
@@ -1103,6 +1325,18 @@ function acceptsMarkdown(request) {
|
|
|
1103
1325
|
return Number.isFinite(quality) ? quality > 0 : true;
|
|
1104
1326
|
});
|
|
1105
1327
|
}
|
|
1328
|
+
function buildDocsUserAgentHeaderPattern(patterns) {
|
|
1329
|
+
return `.*(?:${patterns.map(toCaseInsensitiveHeaderPattern).join("|")}).*`;
|
|
1330
|
+
}
|
|
1331
|
+
function toCaseInsensitiveHeaderPattern(value) {
|
|
1332
|
+
return value.split("").map((char) => {
|
|
1333
|
+
if (/^[a-z]$/i.test(char)) return `[${char.toLowerCase()}${char.toUpperCase()}]`;
|
|
1334
|
+
return escapeRegex(char);
|
|
1335
|
+
}).join("");
|
|
1336
|
+
}
|
|
1337
|
+
function escapeRegex(value) {
|
|
1338
|
+
return value.replace(/[\\^$.*+?()[\]{}|]/g, "\\$&");
|
|
1339
|
+
}
|
|
1106
1340
|
function normalizeRequestedMarkdownPath(entry, requestedPath) {
|
|
1107
1341
|
const normalizedEntry = `/${normalizeDocsPathSegment(entry) || "docs"}`;
|
|
1108
1342
|
const trimmed = requestedPath.trim().replace(/\.md$/i, "");
|
|
@@ -1151,4 +1385,4 @@ function toYamlString(value) {
|
|
|
1151
1385
|
}
|
|
1152
1386
|
|
|
1153
1387
|
//#endregion
|
|
1154
|
-
export {
|
|
1388
|
+
export { resolveDocsAgentsFormat as $, findDocsMarkdownPage as A, isDocsSkillRequest as B, DOCS_BOT_LIKE_USER_AGENT_HEADER_PATTERN as C, buildDocsAgentFeedbackSchema as D, buildDocsAgentDiscoverySpec as E, isDocsAgentDiscoveryRequest as F, renderDocsAgentsDocument as G, normalizeDocsPathSegment as H, isDocsAgentsRequest as I, renderDocsMarkdownNotFound as J, renderDocsLlmsTxt as K, isDocsLlmsTxtPublicRequest as L, getDocsMarkdownCanonicalLinkHeader as M, getDocsMarkdownVaryHeader as N, buildDocsMcpEndpointCandidates as O, hasDocsMarkdownSignatureAgent as P, resolveDocsAgentMdxContent as Q, isDocsMcpRequest as R, DOCS_AI_AGENT_USER_AGENT_HEADER_PATTERN as S, DOCS_TRADITIONAL_BOT_USER_AGENT_HEADER_PATTERN as T, normalizeDocsUrlPath as U, matchesDocsLlmsTxtSection as V, parseDocsAgentFeedbackData as W, resolveDocsAgentFeedbackConfig as X, renderDocsSkillDocument as Y, resolveDocsAgentFeedbackRequest as Z, DEFAULT_MCP_ROUTE as _, DEFAULT_AGENT_MD_ROUTE as a, resolveDocsMarkdownRequest as at, DEFAULT_SKILL_MD_ROUTE as b, DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE as c, selectDocsLlmsTxtContent as ct, DEFAULT_LLMS_FULL_TXT_ROUTE as d, resolveDocsLlmsTxtFormat as et, DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE as f, DEFAULT_MCP_PUBLIC_ROUTE as g, DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE as h, DEFAULT_AGENT_FEEDBACK_ROUTE as i, resolveDocsMarkdownRecovery as it, getDocsLlmsTxtMaxCharsIssue as j, detectDocsMarkdownAgentRequest as k, DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE as l, toDocsMarkdownUrl as lt, DEFAULT_LLMS_TXT_ROUTE as m, DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE as n, resolveDocsLlmsTxtSections as nt, DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE as o, resolveDocsOpenApiDiscoveryConfig as ot, DEFAULT_LLMS_TXT_MAX_CHARS as p, renderDocsMarkdownDocument as q, DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA as r, resolveDocsMarkdownCanonicalUrl as rt, DEFAULT_AGENT_SPEC_ROUTE as s, resolveDocsSkillFormat as st, DEFAULT_AGENTS_MD_ROUTE as t, resolveDocsLlmsTxtRequest as tt, DEFAULT_DOCS_API_ROUTE as u, validateDocsAgentFeedbackPayload as ut, DEFAULT_MCP_WELL_KNOWN_ROUTE as v, DOCS_MARKDOWN_SIGNATURE_AGENT_HEADER as w, DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE as x, DEFAULT_OPENAPI_SCHEMA_ROUTE as y, isDocsPublicGetRequest as z };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./reading-time-DPAazAGu.mjs";
|
|
2
2
|
import "./search-BL7o2rXk.mjs";
|
|
3
|
-
import "./agent-
|
|
4
|
-
import "./robots-
|
|
3
|
+
import "./agent-CuX9y_iA.mjs";
|
|
4
|
+
import "./robots-ygAWyine.mjs";
|
|
5
5
|
import "./sitemap-server-idLUrmmU.mjs";
|
|
6
6
|
import "./config-CBoixmrv.mjs";
|
|
7
|
-
import { a as readPageTokenBudget, i as printAgentCompactHelp, n as inspectAgentCompactionState, o as scanDocsPageTargets, r as parseAgentCompactArgs, t as compactAgentDocs } from "./codeblocks-
|
|
7
|
+
import { a as readPageTokenBudget, i as printAgentCompactHelp, n as inspectAgentCompactionState, o as scanDocsPageTargets, r as parseAgentCompactArgs, t as compactAgentDocs } from "./codeblocks-ySyo9e2r.mjs";
|
|
8
8
|
|
|
9
9
|
export { compactAgentDocs, parseAgentCompactArgs, printAgentCompactHelp };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./search-BL7o2rXk.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { G as renderDocsAgentsDocument, X as resolveDocsAgentFeedbackConfig, a as DEFAULT_AGENT_MD_ROUTE, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, o as DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, t as DEFAULT_AGENTS_MD_ROUTE, y as DEFAULT_OPENAPI_SCHEMA_ROUTE } from "./agent-CuX9y_iA.mjs";
|
|
3
3
|
import { S as resolveApiReferenceConfig } from "./sitemap-server-idLUrmmU.mjs";
|
|
4
4
|
import { resolveDocsMcpConfig } from "./mcp.mjs";
|
|
5
5
|
import "./server.mjs";
|
package/dist/cli/index.mjs
CHANGED
|
@@ -108,7 +108,7 @@ async function main() {
|
|
|
108
108
|
const { runMcp } = await import("../mcp-CUAR3XfW.mjs");
|
|
109
109
|
await runMcp(mcpOptions);
|
|
110
110
|
} else if (parsedCommand.command === "agent" && subcommand === "compact") {
|
|
111
|
-
const { compactAgentDocs, parseAgentCompactArgs, printAgentCompactHelp } = await import("../agent-
|
|
111
|
+
const { compactAgentDocs, parseAgentCompactArgs, printAgentCompactHelp } = await import("../agent-D7I2vULT.mjs");
|
|
112
112
|
const agentCompactOptions = parseAgentCompactArgs(args.slice(2));
|
|
113
113
|
if (agentCompactOptions.help) {
|
|
114
114
|
printAgentCompactHelp();
|
|
@@ -118,11 +118,11 @@ async function main() {
|
|
|
118
118
|
} else if (parsedCommand.command === "agent") {
|
|
119
119
|
console.error(pc.red(`Unknown agent subcommand: ${subcommand ?? "(missing)"}`));
|
|
120
120
|
console.error();
|
|
121
|
-
const { printAgentCompactHelp } = await import("../agent-
|
|
121
|
+
const { printAgentCompactHelp } = await import("../agent-D7I2vULT.mjs");
|
|
122
122
|
printAgentCompactHelp();
|
|
123
123
|
process.exit(1);
|
|
124
124
|
} else if (parsedCommand.command === "agents" && subcommand === "generate") {
|
|
125
|
-
const { generateAgents, parseAgentsGenerateArgs, printAgentsGenerateHelp } = await import("../agents-
|
|
125
|
+
const { generateAgents, parseAgentsGenerateArgs, printAgentsGenerateHelp } = await import("../agents-DQDj8RmV.mjs");
|
|
126
126
|
const agentsOptions = parseAgentsGenerateArgs(args.slice(2));
|
|
127
127
|
if (agentsOptions.help) {
|
|
128
128
|
printAgentsGenerateHelp();
|
|
@@ -132,11 +132,11 @@ async function main() {
|
|
|
132
132
|
} else if (parsedCommand.command === "agents") {
|
|
133
133
|
console.error(pc.red(`Unknown agents subcommand: ${subcommand ?? "(missing)"}`));
|
|
134
134
|
console.error();
|
|
135
|
-
const { printAgentsGenerateHelp } = await import("../agents-
|
|
135
|
+
const { printAgentsGenerateHelp } = await import("../agents-DQDj8RmV.mjs");
|
|
136
136
|
printAgentsGenerateHelp();
|
|
137
137
|
process.exit(1);
|
|
138
138
|
} else if (parsedCommand.command === "doctor") {
|
|
139
|
-
const { parseDoctorArgs, printDoctorHelp, runDoctor } = await import("../doctor-
|
|
139
|
+
const { parseDoctorArgs, printDoctorHelp, runDoctor } = await import("../doctor-DGOBWAah.mjs");
|
|
140
140
|
const doctorOptions = parseDoctorArgs(args.slice(1));
|
|
141
141
|
if (doctorOptions.help) {
|
|
142
142
|
printDoctorHelp();
|
|
@@ -152,7 +152,7 @@ async function main() {
|
|
|
152
152
|
}
|
|
153
153
|
await runReview(reviewOptions);
|
|
154
154
|
} else if ((parsedCommand.command === "codeblocks" || parsedCommand.command === "code-blocks") && subcommand === "validate") {
|
|
155
|
-
const { parseCodeBlocksValidateArgs, printCodeBlocksValidateHelp, runCodeBlocksValidate } = await import("../codeblocks-
|
|
155
|
+
const { parseCodeBlocksValidateArgs, printCodeBlocksValidateHelp, runCodeBlocksValidate } = await import("../codeblocks-ySyo9e2r.mjs");
|
|
156
156
|
const codeBlocksOptions = parseCodeBlocksValidateArgs(args.slice(2));
|
|
157
157
|
if (codeBlocksOptions.help) {
|
|
158
158
|
printCodeBlocksValidateHelp();
|
|
@@ -162,7 +162,7 @@ async function main() {
|
|
|
162
162
|
} else if (parsedCommand.command === "codeblocks" || parsedCommand.command === "code-blocks") {
|
|
163
163
|
console.error(pc.red(`Unknown codeblocks subcommand: ${subcommand ?? "(missing)"}`));
|
|
164
164
|
console.error();
|
|
165
|
-
const { printCodeBlocksValidateHelp } = await import("../codeblocks-
|
|
165
|
+
const { printCodeBlocksValidateHelp } = await import("../codeblocks-ySyo9e2r.mjs");
|
|
166
166
|
printCodeBlocksValidateHelp();
|
|
167
167
|
process.exit(1);
|
|
168
168
|
} else if (parsedCommand.command === "search" && subcommand === "sync") {
|
|
@@ -188,7 +188,7 @@ async function main() {
|
|
|
188
188
|
printSitemapGenerateHelp();
|
|
189
189
|
process.exit(1);
|
|
190
190
|
} else if (parsedCommand.command === "robots" && subcommand === "generate") {
|
|
191
|
-
const { generateRobots, parseRobotsGenerateArgs, printRobotsGenerateHelp } = await import("../robots-
|
|
191
|
+
const { generateRobots, parseRobotsGenerateArgs, printRobotsGenerateHelp } = await import("../robots-D3jPtv4r.mjs");
|
|
192
192
|
const robotsOptions = parseRobotsGenerateArgs(args.slice(2));
|
|
193
193
|
if (robotsOptions.help) {
|
|
194
194
|
printRobotsGenerateHelp();
|
|
@@ -198,7 +198,7 @@ async function main() {
|
|
|
198
198
|
} else if (parsedCommand.command === "robots") {
|
|
199
199
|
console.error(pc.red(`Unknown robots subcommand: ${subcommand ?? "(missing)"}`));
|
|
200
200
|
console.error();
|
|
201
|
-
const { printRobotsGenerateHelp } = await import("../robots-
|
|
201
|
+
const { printRobotsGenerateHelp } = await import("../robots-D3jPtv4r.mjs");
|
|
202
202
|
printRobotsGenerateHelp();
|
|
203
203
|
process.exit(1);
|
|
204
204
|
} else if (parsedCommand.command === "downgrade") {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as parseGeneratedAgentDocument, h as hashGeneratedAgentContent, m as GENERATED_AGENT_PROVENANCE_VERSION, v as serializeGeneratedAgentDocument } from "./search-BL7o2rXk.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { A as findDocsMarkdownPage, q as renderDocsMarkdownDocument } from "./agent-CuX9y_iA.mjs";
|
|
3
3
|
import "./index.mjs";
|
|
4
4
|
import { createFilesystemDocsMcpSource } from "./mcp.mjs";
|
|
5
5
|
import "./server.mjs";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import "./reading-time-DPAazAGu.mjs";
|
|
2
2
|
import "./search-BL7o2rXk.mjs";
|
|
3
3
|
import { a as DEFAULT_SITEMAP_XML_ROUTE, d as resolveDocsSitemapConfig, i as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, r as DEFAULT_SITEMAP_MD_ROUTE } from "./sitemap-CMNj0Pt3.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import { a as analyzeDocsRobotsTxt, n as DEFAULT_ROBOTS_TXT_ROUTE, u as resolveDocsRobotsConfig } from "./robots-
|
|
4
|
+
import { O as buildDocsMcpEndpointCandidates, b as DEFAULT_SKILL_MD_ROUTE, c as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, d as DEFAULT_LLMS_FULL_TXT_ROUTE, g as DEFAULT_MCP_PUBLIC_ROUTE, i as DEFAULT_AGENT_FEEDBACK_ROUTE, l as DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, m as DEFAULT_LLMS_TXT_ROUTE, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, t as DEFAULT_AGENTS_MD_ROUTE, v as DEFAULT_MCP_WELL_KNOWN_ROUTE, x as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE } from "./agent-CuX9y_iA.mjs";
|
|
5
|
+
import { a as analyzeDocsRobotsTxt, n as DEFAULT_ROBOTS_TXT_ROUTE, u as resolveDocsRobotsConfig } from "./robots-ygAWyine.mjs";
|
|
6
6
|
import "./sitemap-server-idLUrmmU.mjs";
|
|
7
7
|
import { createFilesystemDocsMcpSource, resolveDocsMcpConfig } from "./mcp.mjs";
|
|
8
8
|
import "./server.mjs";
|
|
9
9
|
import { a as loadProjectEnv, c as readNavTitle, f as readTopLevelStringProperty, i as loadDocsConfigModule, m as resolveDocsContentDir, o as readBooleanProperty, p as resolveDocsConfigPath, r as extractTopLevelConfigObject, t as extractNestedObjectLiteral } from "./config-CBoixmrv.mjs";
|
|
10
10
|
import { t as detectFramework } from "./utils-x5EtYWjC.mjs";
|
|
11
|
-
import { n as inspectAgentCompactionState, o as scanDocsPageTargets } from "./codeblocks-
|
|
11
|
+
import { n as inspectAgentCompactionState, o as scanDocsPageTargets } from "./codeblocks-ySyo9e2r.mjs";
|
|
12
12
|
import { existsSync, lstatSync, readFileSync, readdirSync } from "node:fs";
|
|
13
13
|
import path from "node:path";
|
|
14
14
|
import { LATEST_PROTOCOL_VERSION } from "@modelcontextprotocol/sdk/types.js";
|
package/dist/index.d.mts
CHANGED
|
@@ -222,6 +222,9 @@ declare const DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE = "/.well-known/AGENT.md";
|
|
|
222
222
|
declare const DEFAULT_AGENT_FEEDBACK_ROUTE = "/api/docs/agent/feedback";
|
|
223
223
|
declare const DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA: Record<string, unknown>;
|
|
224
224
|
declare const DOCS_MARKDOWN_SIGNATURE_AGENT_HEADER = "Signature-Agent";
|
|
225
|
+
declare const DOCS_AI_AGENT_USER_AGENT_HEADER_PATTERN: string;
|
|
226
|
+
declare const DOCS_TRADITIONAL_BOT_USER_AGENT_HEADER_PATTERN: string;
|
|
227
|
+
declare const DOCS_BOT_LIKE_USER_AGENT_HEADER_PATTERN: string;
|
|
225
228
|
interface DocsMcpEndpointCandidate {
|
|
226
229
|
baseUrl: string;
|
|
227
230
|
route: string;
|
|
@@ -363,12 +366,25 @@ interface DocsMarkdownPage {
|
|
|
363
366
|
}
|
|
364
367
|
interface DocsMarkdownDocumentOptions {
|
|
365
368
|
llms?: boolean | DocsLlmsDiscoveryConfig | LlmsTxtConfig;
|
|
369
|
+
sitemap?: boolean | DocsSitemapConfig;
|
|
366
370
|
}
|
|
367
371
|
interface DocsMarkdownNotFoundOptions {
|
|
368
372
|
entry?: string;
|
|
369
373
|
requestedPath: string;
|
|
374
|
+
pages?: DocsMarkdownPage[];
|
|
370
375
|
sitemap?: boolean | DocsSitemapConfig;
|
|
371
376
|
}
|
|
377
|
+
interface DocsMarkdownRecoveryMatch {
|
|
378
|
+
title: string;
|
|
379
|
+
url: string;
|
|
380
|
+
markdownUrl: string;
|
|
381
|
+
description?: string;
|
|
382
|
+
confidence: number;
|
|
383
|
+
}
|
|
384
|
+
interface DocsMarkdownRecoveryResult {
|
|
385
|
+
matches: DocsMarkdownRecoveryMatch[];
|
|
386
|
+
redirect?: DocsMarkdownRecoveryMatch;
|
|
387
|
+
}
|
|
372
388
|
interface DocsMarkdownCanonicalUrlOptions {
|
|
373
389
|
origin: string;
|
|
374
390
|
entry?: string;
|
|
@@ -422,10 +438,24 @@ declare function resolveDocsMarkdownRequest(entry: string, url: URL, request: Re
|
|
|
422
438
|
requestedPath: string;
|
|
423
439
|
} | null;
|
|
424
440
|
declare function hasDocsMarkdownSignatureAgent(request: Request): boolean;
|
|
441
|
+
type DocsMarkdownAgentDetection = {
|
|
442
|
+
detected: true;
|
|
443
|
+
method: "signature_agent" | "user_agent" | "heuristic";
|
|
444
|
+
} | {
|
|
445
|
+
detected: false;
|
|
446
|
+
method: null;
|
|
447
|
+
};
|
|
448
|
+
declare function detectDocsMarkdownAgentRequest(request: Request): DocsMarkdownAgentDetection;
|
|
425
449
|
declare function getDocsMarkdownVaryHeader(request: Request): string | null;
|
|
450
|
+
declare function resolveDocsMarkdownRecovery({
|
|
451
|
+
entry,
|
|
452
|
+
requestedPath,
|
|
453
|
+
pages
|
|
454
|
+
}: DocsMarkdownNotFoundOptions): DocsMarkdownRecoveryResult;
|
|
426
455
|
declare function renderDocsMarkdownNotFound({
|
|
427
456
|
entry,
|
|
428
457
|
requestedPath,
|
|
458
|
+
pages,
|
|
429
459
|
sitemap
|
|
430
460
|
}: DocsMarkdownNotFoundOptions): string;
|
|
431
461
|
declare function findDocsMarkdownPage<T extends DocsMarkdownPage>(entry: string, pages: T[], requestedPath: string): T | null;
|
|
@@ -668,4 +698,4 @@ declare function renderDocsRobotsGeneratedBlock(options?: DocsRobotsRenderOption
|
|
|
668
698
|
declare function upsertDocsRobotsGeneratedBlock(existing: string, block: string): string;
|
|
669
699
|
declare function analyzeDocsRobotsTxt(content: string, options?: DocsRobotsRenderOptions): DocsRobotsAnalysis;
|
|
670
700
|
//#endregion
|
|
671
|
-
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_AGENTS_MD_ROUTE, DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA, DEFAULT_AGENT_FEEDBACK_ROUTE, DEFAULT_AGENT_MD_ROUTE, DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, DEFAULT_AGENT_SPEC_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, DEFAULT_DOCS_AI_ROBOTS_USER_AGENTS, DEFAULT_DOCS_API_ROUTE, DEFAULT_LLMS_FULL_TXT_ROUTE, DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, DEFAULT_LLMS_TXT_MAX_CHARS, DEFAULT_LLMS_TXT_ROUTE, DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE, DEFAULT_MCP_PUBLIC_ROUTE, DEFAULT_MCP_ROUTE, DEFAULT_MCP_WELL_KNOWN_ROUTE, DEFAULT_OPENAPI_SCHEMA_ROUTE, DEFAULT_ROBOTS_TXT_ROUTE, DEFAULT_SITEMAP_MANIFEST_PATH, DEFAULT_SITEMAP_MD_DOCS_ROUTE, 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, DOCS_MARKDOWN_SIGNATURE_AGENT_HEADER, DOCS_ROBOTS_GENERATED_BLOCK_END, DOCS_ROBOTS_GENERATED_BLOCK_START, type DocsAgentDiscoverySpecOptions, type DocsAgentFeedbackContext, type DocsAgentFeedbackData, type DocsAgentFeedbackDiscoveryConfig, type DocsAgentFeedbackRequest, type DocsAgentFeedbackResolvedConfig, type DocsAgentTraceContext, type DocsAgentTraceEventInput, type DocsAgentTraceEventType, type DocsAgentTraceStatus, type DocsAgentsDocumentOptions, 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 DocsCloudApiKeyConfig, type DocsCloudConfig, type DocsCloudFeatureConfig, type DocsCloudPreviewConfig, type DocsCloudPublishConfig, type DocsCodeBlocksConfig, type DocsCodeBlocksPlannerConfig, type DocsCodeBlocksPlannerProvider, type DocsCodeBlocksRunnerConfig, type DocsCodeBlocksRunnerProvider, type DocsCodeBlocksValidateConfig, type DocsCodeBlocksValidationMode, type DocsCodeBlocksValidationPolicy, type DocsConfig, type DocsFeedbackData, type DocsFeedbackValue, type DocsI18nConfig, type DocsLlmsDiscoveryConfig, type DocsLlmsTxtGeneratedContent, type DocsLlmsTxtGeneratedSection, type DocsLlmsTxtMaxCharsIssue, type DocsLlmsTxtPageInput, type DocsLlmsTxtRequest, type DocsLlmsTxtResolvedMaxChars, type DocsLlmsTxtResolvedSection, type DocsLlmsTxtSelectedContent, type DocsMarkdownPage, type DocsMcpConfig, type DocsMcpEndpointCandidate, type DocsMcpEndpointCandidateOptions, type DocsMcpToolsConfig, type DocsMetadata, type DocsNav, type DocsObservabilityConfig, type DocsObservabilityEvent, type DocsObservabilityEventInput, type DocsOpenApiDiscoveryConfig, type DocsOpenApiResolvedDiscoveryConfig, type DocsPageStructuredDataInput, type DocsPathMatch, type DocsRelatedItem, type DocsReviewCiConfig, type DocsReviewCiMode, type DocsReviewConfig, type DocsReviewRulesConfig, type DocsReviewScoreConfig, type DocsReviewSeverity, type DocsRobotsConfig, type DocsRobotsRenderOptions, type DocsRobotsResolvedConfig, type DocsRobotsRule, 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 DocsStructuredDataBreadcrumb, 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 LlmsTxtMaxCharsConfig, type LlmsTxtMaxCharsMode, type LlmsTxtSectionConfig, type McpDocsSearchConfig, type OGConfig, type OpenDocsConfig, type OpenDocsProvider, type OpenDocsProviderConfig, type OpenDocsProviderId, type OpenDocsTarget, type OpenGraphImage, type OrderingItem, type PageActionsConfig, type PageFrontmatter, type PageOpenGraph, type PageSidebarFrontmatter, type PageTwitter, type PromptAction, type PromptProviderChoice, type ReadingTimeConfig, type ResolvedChangelogConfig, type ResolvedDocsAnalyticsConfig, type ResolvedDocsI18n, type ResolvedDocsObservabilityConfig, type ResolvedDocsRelatedLink, type SerializeOpenDocsProviderOptions, type SerializedOpenDocsProvider, type SidebarComponentProps, type SidebarConfig, type SidebarFolderIndexBehavior, type SidebarFolderNode, type SidebarNode, type SidebarPageNode, type SidebarTree, type SimpleDocsSearchConfig, type ThemeToggleConfig, type TypesenseDocsSearchConfig, type TypographyConfig, type UIConfig, analyzeDocsRobotsTxt, applySidebarFolderIndexBehavior, buildDocsAgentDiscoverySpec, buildDocsAgentFeedbackSchema, buildDocsAskAIContext, buildDocsMcpEndpointCandidates, buildDocsPageStructuredData, buildDocsSearchDocuments, buildDocsSitemapManifest, buildPageOpenGraph, buildPageTwitter, createAlgoliaSearchAdapter, createCustomSearchAdapter, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsCloudAnalytics, createDocsRobotsResponse, createDocsSitemapResponse, createMcpSearchAdapter, createSimpleSearchAdapter, createTheme, createTypesenseSearchAdapter, deepMerge, defineDocs, emitDocsAgentTraceEvent, emitDocsAnalyticsEvent, emitDocsObservabilityEvent, estimateReadingTimeMinutes, extendTheme, findDocsMarkdownPage, formatDocsAskAIPackageHints, getDocsLlmsTxtMaxCharsIssue, getDocsMarkdownCanonicalLinkHeader, getDocsMarkdownVaryHeader, getDocsRobotsAllowRoutes, hasDocsMarkdownSignatureAgent, hashGeneratedAgentContent, inferDocsAskAIPackageHints, isDocsAgentDiscoveryRequest, isDocsAgentsRequest, isDocsLlmsTxtPublicRequest, isDocsMcpRequest, isDocsPublicGetRequest, isDocsSkillRequest, matchesDocsLlmsTxtSection, normalizeDocsPathSegment, normalizeDocsRelated, normalizeDocsUrlPath, normalizeGeneratedAgentContent, parseDocsAgentFeedbackData, parseGeneratedAgentDocument, performDocsSearch, readDocsSitemapManifestFromContentMap, renderDocsAgentsDocument, renderDocsLlmsTxt, renderDocsMarkdownDocument, renderDocsMarkdownNotFound, renderDocsPageStructuredDataJson, renderDocsRelatedMarkdownLines, renderDocsRobotsGeneratedBlock, renderDocsRobotsTxt, renderDocsSitemapMarkdown, renderDocsSitemapXml, renderDocsSkillDocument, resolveAskAISearchRequestConfig, resolveChangelogConfig, resolveDocsAgentFeedbackConfig, resolveDocsAgentFeedbackRequest, resolveDocsAgentMdxContent, resolveDocsAgentsFormat, resolveDocsAnalyticsConfig, resolveDocsI18n, resolveDocsLlmsTxtFormat, resolveDocsLlmsTxtRequest, resolveDocsLlmsTxtSections, resolveDocsLocale, resolveDocsMarkdownCanonicalUrl, resolveDocsMarkdownRequest, resolveDocsMetadataBaseUrl, resolveDocsObservabilityConfig, resolveDocsOpenApiDiscoveryConfig, resolveDocsPath, resolveDocsRobotsConfig, resolveDocsRobotsRequest, resolveDocsSitemapConfig, resolveDocsSitemapPageLastmod, resolveDocsSitemapRequest, resolveDocsSkillFormat, resolveOGImage, resolvePageReadingTime, resolvePageSidebarFolderIndexBehavior, resolveReadingTimeFromContent, resolveReadingTimeFromSource, resolveReadingTimeOptions, resolveSearchRequestConfig, resolveSidebarFolderIndexBehavior, resolveSidebarFolderIndexBehaviorForPath, resolveTitle, selectDocsLlmsTxtContent, serializeGeneratedAgentDocument, stripGeneratedAgentProvenance, toDocsMarkdownUrl, toDocsSitemapMarkdownUrl, upsertDocsRobotsGeneratedBlock, validateDocsAgentFeedbackPayload };
|
|
701
|
+
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_AGENTS_MD_ROUTE, DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA, DEFAULT_AGENT_FEEDBACK_ROUTE, DEFAULT_AGENT_MD_ROUTE, DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, DEFAULT_AGENT_SPEC_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, DEFAULT_DOCS_AI_ROBOTS_USER_AGENTS, DEFAULT_DOCS_API_ROUTE, DEFAULT_LLMS_FULL_TXT_ROUTE, DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, DEFAULT_LLMS_TXT_MAX_CHARS, DEFAULT_LLMS_TXT_ROUTE, DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE, DEFAULT_MCP_PUBLIC_ROUTE, DEFAULT_MCP_ROUTE, DEFAULT_MCP_WELL_KNOWN_ROUTE, DEFAULT_OPENAPI_SCHEMA_ROUTE, DEFAULT_ROBOTS_TXT_ROUTE, DEFAULT_SITEMAP_MANIFEST_PATH, DEFAULT_SITEMAP_MD_DOCS_ROUTE, 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, DOCS_AI_AGENT_USER_AGENT_HEADER_PATTERN, DOCS_BOT_LIKE_USER_AGENT_HEADER_PATTERN, DOCS_MARKDOWN_SIGNATURE_AGENT_HEADER, DOCS_ROBOTS_GENERATED_BLOCK_END, DOCS_ROBOTS_GENERATED_BLOCK_START, DOCS_TRADITIONAL_BOT_USER_AGENT_HEADER_PATTERN, type DocsAgentDiscoverySpecOptions, type DocsAgentFeedbackContext, type DocsAgentFeedbackData, type DocsAgentFeedbackDiscoveryConfig, type DocsAgentFeedbackRequest, type DocsAgentFeedbackResolvedConfig, type DocsAgentTraceContext, type DocsAgentTraceEventInput, type DocsAgentTraceEventType, type DocsAgentTraceStatus, type DocsAgentsDocumentOptions, 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 DocsCloudApiKeyConfig, type DocsCloudConfig, type DocsCloudFeatureConfig, type DocsCloudPreviewConfig, type DocsCloudPublishConfig, type DocsCodeBlocksConfig, type DocsCodeBlocksPlannerConfig, type DocsCodeBlocksPlannerProvider, type DocsCodeBlocksRunnerConfig, type DocsCodeBlocksRunnerProvider, type DocsCodeBlocksValidateConfig, type DocsCodeBlocksValidationMode, type DocsCodeBlocksValidationPolicy, type DocsConfig, type DocsFeedbackData, type DocsFeedbackValue, type DocsI18nConfig, type DocsLlmsDiscoveryConfig, type DocsLlmsTxtGeneratedContent, type DocsLlmsTxtGeneratedSection, type DocsLlmsTxtMaxCharsIssue, type DocsLlmsTxtPageInput, type DocsLlmsTxtRequest, type DocsLlmsTxtResolvedMaxChars, type DocsLlmsTxtResolvedSection, type DocsLlmsTxtSelectedContent, type DocsMarkdownAgentDetection, type DocsMarkdownPage, type DocsMarkdownRecoveryMatch, type DocsMarkdownRecoveryResult, type DocsMcpConfig, type DocsMcpEndpointCandidate, type DocsMcpEndpointCandidateOptions, type DocsMcpToolsConfig, type DocsMetadata, type DocsNav, type DocsObservabilityConfig, type DocsObservabilityEvent, type DocsObservabilityEventInput, type DocsOpenApiDiscoveryConfig, type DocsOpenApiResolvedDiscoveryConfig, type DocsPageStructuredDataInput, type DocsPathMatch, type DocsRelatedItem, type DocsReviewCiConfig, type DocsReviewCiMode, type DocsReviewConfig, type DocsReviewRulesConfig, type DocsReviewScoreConfig, type DocsReviewSeverity, type DocsRobotsConfig, type DocsRobotsRenderOptions, type DocsRobotsResolvedConfig, type DocsRobotsRule, 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 DocsStructuredDataBreadcrumb, 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 LlmsTxtMaxCharsConfig, type LlmsTxtMaxCharsMode, type LlmsTxtSectionConfig, type McpDocsSearchConfig, type OGConfig, type OpenDocsConfig, type OpenDocsProvider, type OpenDocsProviderConfig, type OpenDocsProviderId, type OpenDocsTarget, type OpenGraphImage, type OrderingItem, type PageActionsConfig, type PageFrontmatter, type PageOpenGraph, type PageSidebarFrontmatter, type PageTwitter, type PromptAction, type PromptProviderChoice, type ReadingTimeConfig, type ResolvedChangelogConfig, type ResolvedDocsAnalyticsConfig, type ResolvedDocsI18n, type ResolvedDocsObservabilityConfig, type ResolvedDocsRelatedLink, type SerializeOpenDocsProviderOptions, type SerializedOpenDocsProvider, type SidebarComponentProps, type SidebarConfig, type SidebarFolderIndexBehavior, type SidebarFolderNode, type SidebarNode, type SidebarPageNode, type SidebarTree, type SimpleDocsSearchConfig, type ThemeToggleConfig, type TypesenseDocsSearchConfig, type TypographyConfig, type UIConfig, analyzeDocsRobotsTxt, applySidebarFolderIndexBehavior, buildDocsAgentDiscoverySpec, buildDocsAgentFeedbackSchema, buildDocsAskAIContext, buildDocsMcpEndpointCandidates, buildDocsPageStructuredData, buildDocsSearchDocuments, buildDocsSitemapManifest, buildPageOpenGraph, buildPageTwitter, createAlgoliaSearchAdapter, createCustomSearchAdapter, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsCloudAnalytics, createDocsRobotsResponse, createDocsSitemapResponse, createMcpSearchAdapter, createSimpleSearchAdapter, createTheme, createTypesenseSearchAdapter, deepMerge, defineDocs, detectDocsMarkdownAgentRequest, emitDocsAgentTraceEvent, emitDocsAnalyticsEvent, emitDocsObservabilityEvent, estimateReadingTimeMinutes, extendTheme, findDocsMarkdownPage, formatDocsAskAIPackageHints, getDocsLlmsTxtMaxCharsIssue, getDocsMarkdownCanonicalLinkHeader, getDocsMarkdownVaryHeader, getDocsRobotsAllowRoutes, hasDocsMarkdownSignatureAgent, hashGeneratedAgentContent, inferDocsAskAIPackageHints, isDocsAgentDiscoveryRequest, isDocsAgentsRequest, isDocsLlmsTxtPublicRequest, isDocsMcpRequest, isDocsPublicGetRequest, isDocsSkillRequest, matchesDocsLlmsTxtSection, normalizeDocsPathSegment, normalizeDocsRelated, normalizeDocsUrlPath, normalizeGeneratedAgentContent, parseDocsAgentFeedbackData, parseGeneratedAgentDocument, performDocsSearch, readDocsSitemapManifestFromContentMap, renderDocsAgentsDocument, renderDocsLlmsTxt, renderDocsMarkdownDocument, renderDocsMarkdownNotFound, renderDocsPageStructuredDataJson, renderDocsRelatedMarkdownLines, renderDocsRobotsGeneratedBlock, renderDocsRobotsTxt, renderDocsSitemapMarkdown, renderDocsSitemapXml, renderDocsSkillDocument, resolveAskAISearchRequestConfig, resolveChangelogConfig, resolveDocsAgentFeedbackConfig, resolveDocsAgentFeedbackRequest, resolveDocsAgentMdxContent, resolveDocsAgentsFormat, resolveDocsAnalyticsConfig, resolveDocsI18n, resolveDocsLlmsTxtFormat, resolveDocsLlmsTxtRequest, resolveDocsLlmsTxtSections, resolveDocsLocale, resolveDocsMarkdownCanonicalUrl, resolveDocsMarkdownRecovery, resolveDocsMarkdownRequest, resolveDocsMetadataBaseUrl, resolveDocsObservabilityConfig, resolveDocsOpenApiDiscoveryConfig, resolveDocsPath, resolveDocsRobotsConfig, resolveDocsRobotsRequest, resolveDocsSitemapConfig, resolveDocsSitemapPageLastmod, resolveDocsSitemapRequest, resolveDocsSkillFormat, resolveOGImage, resolvePageReadingTime, resolvePageSidebarFolderIndexBehavior, resolveReadingTimeFromContent, resolveReadingTimeFromSource, resolveReadingTimeOptions, resolveSearchRequestConfig, resolveSidebarFolderIndexBehavior, resolveSidebarFolderIndexBehaviorForPath, resolveTitle, selectDocsLlmsTxtContent, serializeGeneratedAgentDocument, stripGeneratedAgentProvenance, toDocsMarkdownUrl, toDocsSitemapMarkdownUrl, upsertDocsRobotsGeneratedBlock, validateDocsAgentFeedbackPayload };
|
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { _ as extendTheme, a as resolveReadingTimeOptions, b as defineDocs, c as
|
|
|
2
2
|
import { A as resolveDocsAnalyticsConfig, C as resolveSidebarFolderIndexBehaviorForPath, D as emitDocsAgentTraceEvent, E as createDocsAgentTraceId, M as createDocsCloudAnalytics, O as emitDocsAnalyticsEvent, S as resolveSidebarFolderIndexBehavior, T as createDocsAgentTraceContext, _ 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 resolveDocsObservabilityConfig, k as emitDocsObservabilityEvent, 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 DOCS_AGENT_TRACE_EVENT_TYPES, x as resolvePageSidebarFolderIndexBehavior, y as stripGeneratedAgentProvenance } from "./search-BL7o2rXk.mjs";
|
|
3
3
|
import { n as renderDocsRelatedMarkdownLines, t as normalizeDocsRelated } from "./related-BNj_NdHq.mjs";
|
|
4
4
|
import { a as DEFAULT_SITEMAP_XML_ROUTE, c as readDocsSitemapManifestFromContentMap, d as resolveDocsSitemapConfig, f as resolveDocsSitemapPageLastmod, i as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, l as renderDocsSitemapMarkdown, m as toDocsSitemapMarkdownUrl, n as DEFAULT_SITEMAP_MD_DOCS_ROUTE, o as buildDocsSitemapManifest, p as resolveDocsSitemapRequest, r as DEFAULT_SITEMAP_MD_ROUTE, s as createDocsSitemapResponse, t as DEFAULT_SITEMAP_MANIFEST_PATH, u as renderDocsSitemapXml } from "./sitemap-CMNj0Pt3.mjs";
|
|
5
|
-
import { $ as
|
|
6
|
-
import { a as analyzeDocsRobotsTxt, c as renderDocsRobotsGeneratedBlock, d as resolveDocsRobotsRequest, f as upsertDocsRobotsGeneratedBlock, i as DOCS_ROBOTS_GENERATED_BLOCK_START, l as renderDocsRobotsTxt, n as DEFAULT_ROBOTS_TXT_ROUTE, o as createDocsRobotsResponse, r as DOCS_ROBOTS_GENERATED_BLOCK_END, s as getDocsRobotsAllowRoutes, t as DEFAULT_DOCS_AI_ROBOTS_USER_AGENTS, u as resolveDocsRobotsConfig } from "./robots-
|
|
5
|
+
import { $ as resolveDocsAgentsFormat, A as findDocsMarkdownPage, B as isDocsSkillRequest, C as DOCS_BOT_LIKE_USER_AGENT_HEADER_PATTERN, D as buildDocsAgentFeedbackSchema, E as buildDocsAgentDiscoverySpec, F as isDocsAgentDiscoveryRequest, G as renderDocsAgentsDocument, H as normalizeDocsPathSegment, I as isDocsAgentsRequest, J as renderDocsMarkdownNotFound, K as renderDocsLlmsTxt, L as isDocsLlmsTxtPublicRequest, M as getDocsMarkdownCanonicalLinkHeader, N as getDocsMarkdownVaryHeader, O as buildDocsMcpEndpointCandidates, P as hasDocsMarkdownSignatureAgent, Q as resolveDocsAgentMdxContent, R as isDocsMcpRequest, S as DOCS_AI_AGENT_USER_AGENT_HEADER_PATTERN, T as DOCS_TRADITIONAL_BOT_USER_AGENT_HEADER_PATTERN, U as normalizeDocsUrlPath, V as matchesDocsLlmsTxtSection, W as parseDocsAgentFeedbackData, X as resolveDocsAgentFeedbackConfig, Y as renderDocsSkillDocument, Z as resolveDocsAgentFeedbackRequest, _ as DEFAULT_MCP_ROUTE, a as DEFAULT_AGENT_MD_ROUTE, at as resolveDocsMarkdownRequest, b as DEFAULT_SKILL_MD_ROUTE, c as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, ct as selectDocsLlmsTxtContent, d as DEFAULT_LLMS_FULL_TXT_ROUTE, et as resolveDocsLlmsTxtFormat, f as DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, g as DEFAULT_MCP_PUBLIC_ROUTE, h as DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE, i as DEFAULT_AGENT_FEEDBACK_ROUTE, it as resolveDocsMarkdownRecovery, j as getDocsLlmsTxtMaxCharsIssue, k as detectDocsMarkdownAgentRequest, l as DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, lt as toDocsMarkdownUrl, m as DEFAULT_LLMS_TXT_ROUTE, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, nt as resolveDocsLlmsTxtSections, o as DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, ot as resolveDocsOpenApiDiscoveryConfig, p as DEFAULT_LLMS_TXT_MAX_CHARS, q as renderDocsMarkdownDocument, r as DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA, rt as resolveDocsMarkdownCanonicalUrl, s as DEFAULT_AGENT_SPEC_ROUTE, st as resolveDocsSkillFormat, t as DEFAULT_AGENTS_MD_ROUTE, tt as resolveDocsLlmsTxtRequest, u as DEFAULT_DOCS_API_ROUTE, ut as validateDocsAgentFeedbackPayload, v as DEFAULT_MCP_WELL_KNOWN_ROUTE, w as DOCS_MARKDOWN_SIGNATURE_AGENT_HEADER, x as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, y as DEFAULT_OPENAPI_SCHEMA_ROUTE, z as isDocsPublicGetRequest } from "./agent-CuX9y_iA.mjs";
|
|
6
|
+
import { a as analyzeDocsRobotsTxt, c as renderDocsRobotsGeneratedBlock, d as resolveDocsRobotsRequest, f as upsertDocsRobotsGeneratedBlock, i as DOCS_ROBOTS_GENERATED_BLOCK_START, l as renderDocsRobotsTxt, n as DEFAULT_ROBOTS_TXT_ROUTE, o as createDocsRobotsResponse, r as DOCS_ROBOTS_GENERATED_BLOCK_END, s as getDocsRobotsAllowRoutes, t as DEFAULT_DOCS_AI_ROBOTS_USER_AGENTS, u as resolveDocsRobotsConfig } from "./robots-ygAWyine.mjs";
|
|
7
7
|
|
|
8
|
-
export { DEFAULT_AGENTS_MD_ROUTE, DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA, DEFAULT_AGENT_FEEDBACK_ROUTE, DEFAULT_AGENT_MD_ROUTE, DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, DEFAULT_AGENT_SPEC_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, DEFAULT_DOCS_AI_ROBOTS_USER_AGENTS, DEFAULT_DOCS_API_ROUTE, DEFAULT_LLMS_FULL_TXT_ROUTE, DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, DEFAULT_LLMS_TXT_MAX_CHARS, DEFAULT_LLMS_TXT_ROUTE, DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE, DEFAULT_MCP_PUBLIC_ROUTE, DEFAULT_MCP_ROUTE, DEFAULT_MCP_WELL_KNOWN_ROUTE, DEFAULT_OPENAPI_SCHEMA_ROUTE, DEFAULT_ROBOTS_TXT_ROUTE, DEFAULT_SITEMAP_MANIFEST_PATH, DEFAULT_SITEMAP_MD_DOCS_ROUTE, 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, DOCS_MARKDOWN_SIGNATURE_AGENT_HEADER, DOCS_ROBOTS_GENERATED_BLOCK_END, DOCS_ROBOTS_GENERATED_BLOCK_START, GENERATED_AGENT_PROVENANCE_MARKER, GENERATED_AGENT_PROVENANCE_VERSION, analyzeDocsRobotsTxt, applySidebarFolderIndexBehavior, buildDocsAgentDiscoverySpec, buildDocsAgentFeedbackSchema, buildDocsAskAIContext, buildDocsMcpEndpointCandidates, buildDocsPageStructuredData, buildDocsSearchDocuments, buildDocsSitemapManifest, buildPageOpenGraph, buildPageTwitter, createAlgoliaSearchAdapter, createCustomSearchAdapter, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsCloudAnalytics, createDocsRobotsResponse, createDocsSitemapResponse, createMcpSearchAdapter, createSimpleSearchAdapter, createTheme, createTypesenseSearchAdapter, deepMerge, defineDocs, emitDocsAgentTraceEvent, emitDocsAnalyticsEvent, emitDocsObservabilityEvent, estimateReadingTimeMinutes, extendTheme, findDocsMarkdownPage, formatDocsAskAIPackageHints, getDocsLlmsTxtMaxCharsIssue, getDocsMarkdownCanonicalLinkHeader, getDocsMarkdownVaryHeader, getDocsRobotsAllowRoutes, hasDocsMarkdownSignatureAgent, hashGeneratedAgentContent, inferDocsAskAIPackageHints, isDocsAgentDiscoveryRequest, isDocsAgentsRequest, isDocsLlmsTxtPublicRequest, isDocsMcpRequest, isDocsPublicGetRequest, isDocsSkillRequest, matchesDocsLlmsTxtSection, normalizeDocsPathSegment, normalizeDocsRelated, normalizeDocsUrlPath, normalizeGeneratedAgentContent, parseDocsAgentFeedbackData, parseGeneratedAgentDocument, performDocsSearch, readDocsSitemapManifestFromContentMap, renderDocsAgentsDocument, renderDocsLlmsTxt, renderDocsMarkdownDocument, renderDocsMarkdownNotFound, renderDocsPageStructuredDataJson, renderDocsRelatedMarkdownLines, renderDocsRobotsGeneratedBlock, renderDocsRobotsTxt, renderDocsSitemapMarkdown, renderDocsSitemapXml, renderDocsSkillDocument, resolveAskAISearchRequestConfig, resolveChangelogConfig, resolveDocsAgentFeedbackConfig, resolveDocsAgentFeedbackRequest, resolveDocsAgentMdxContent, resolveDocsAgentsFormat, resolveDocsAnalyticsConfig, resolveDocsI18n, resolveDocsLlmsTxtFormat, resolveDocsLlmsTxtRequest, resolveDocsLlmsTxtSections, resolveDocsLocale, resolveDocsMarkdownCanonicalUrl, resolveDocsMarkdownRequest, resolveDocsMetadataBaseUrl, resolveDocsObservabilityConfig, resolveDocsOpenApiDiscoveryConfig, resolveDocsPath, resolveDocsRobotsConfig, resolveDocsRobotsRequest, resolveDocsSitemapConfig, resolveDocsSitemapPageLastmod, resolveDocsSitemapRequest, resolveDocsSkillFormat, resolveOGImage, resolvePageReadingTime, resolvePageSidebarFolderIndexBehavior, resolveReadingTimeFromContent, resolveReadingTimeFromSource, resolveReadingTimeOptions, resolveSearchRequestConfig, resolveSidebarFolderIndexBehavior, resolveSidebarFolderIndexBehaviorForPath, resolveTitle, selectDocsLlmsTxtContent, serializeGeneratedAgentDocument, stripGeneratedAgentProvenance, toDocsMarkdownUrl, toDocsSitemapMarkdownUrl, upsertDocsRobotsGeneratedBlock, validateDocsAgentFeedbackPayload };
|
|
8
|
+
export { DEFAULT_AGENTS_MD_ROUTE, DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA, DEFAULT_AGENT_FEEDBACK_ROUTE, DEFAULT_AGENT_MD_ROUTE, DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, DEFAULT_AGENT_SPEC_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, DEFAULT_DOCS_AI_ROBOTS_USER_AGENTS, DEFAULT_DOCS_API_ROUTE, DEFAULT_LLMS_FULL_TXT_ROUTE, DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, DEFAULT_LLMS_TXT_MAX_CHARS, DEFAULT_LLMS_TXT_ROUTE, DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE, DEFAULT_MCP_PUBLIC_ROUTE, DEFAULT_MCP_ROUTE, DEFAULT_MCP_WELL_KNOWN_ROUTE, DEFAULT_OPENAPI_SCHEMA_ROUTE, DEFAULT_ROBOTS_TXT_ROUTE, DEFAULT_SITEMAP_MANIFEST_PATH, DEFAULT_SITEMAP_MD_DOCS_ROUTE, 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, DOCS_AI_AGENT_USER_AGENT_HEADER_PATTERN, DOCS_BOT_LIKE_USER_AGENT_HEADER_PATTERN, DOCS_MARKDOWN_SIGNATURE_AGENT_HEADER, DOCS_ROBOTS_GENERATED_BLOCK_END, DOCS_ROBOTS_GENERATED_BLOCK_START, DOCS_TRADITIONAL_BOT_USER_AGENT_HEADER_PATTERN, GENERATED_AGENT_PROVENANCE_MARKER, GENERATED_AGENT_PROVENANCE_VERSION, analyzeDocsRobotsTxt, applySidebarFolderIndexBehavior, buildDocsAgentDiscoverySpec, buildDocsAgentFeedbackSchema, buildDocsAskAIContext, buildDocsMcpEndpointCandidates, buildDocsPageStructuredData, buildDocsSearchDocuments, buildDocsSitemapManifest, buildPageOpenGraph, buildPageTwitter, createAlgoliaSearchAdapter, createCustomSearchAdapter, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsCloudAnalytics, createDocsRobotsResponse, createDocsSitemapResponse, createMcpSearchAdapter, createSimpleSearchAdapter, createTheme, createTypesenseSearchAdapter, deepMerge, defineDocs, detectDocsMarkdownAgentRequest, emitDocsAgentTraceEvent, emitDocsAnalyticsEvent, emitDocsObservabilityEvent, estimateReadingTimeMinutes, extendTheme, findDocsMarkdownPage, formatDocsAskAIPackageHints, getDocsLlmsTxtMaxCharsIssue, getDocsMarkdownCanonicalLinkHeader, getDocsMarkdownVaryHeader, getDocsRobotsAllowRoutes, hasDocsMarkdownSignatureAgent, hashGeneratedAgentContent, inferDocsAskAIPackageHints, isDocsAgentDiscoveryRequest, isDocsAgentsRequest, isDocsLlmsTxtPublicRequest, isDocsMcpRequest, isDocsPublicGetRequest, isDocsSkillRequest, matchesDocsLlmsTxtSection, normalizeDocsPathSegment, normalizeDocsRelated, normalizeDocsUrlPath, normalizeGeneratedAgentContent, parseDocsAgentFeedbackData, parseGeneratedAgentDocument, performDocsSearch, readDocsSitemapManifestFromContentMap, renderDocsAgentsDocument, renderDocsLlmsTxt, renderDocsMarkdownDocument, renderDocsMarkdownNotFound, renderDocsPageStructuredDataJson, renderDocsRelatedMarkdownLines, renderDocsRobotsGeneratedBlock, renderDocsRobotsTxt, renderDocsSitemapMarkdown, renderDocsSitemapXml, renderDocsSkillDocument, resolveAskAISearchRequestConfig, resolveChangelogConfig, resolveDocsAgentFeedbackConfig, resolveDocsAgentFeedbackRequest, resolveDocsAgentMdxContent, resolveDocsAgentsFormat, resolveDocsAnalyticsConfig, resolveDocsI18n, resolveDocsLlmsTxtFormat, resolveDocsLlmsTxtRequest, resolveDocsLlmsTxtSections, resolveDocsLocale, resolveDocsMarkdownCanonicalUrl, resolveDocsMarkdownRecovery, resolveDocsMarkdownRequest, resolveDocsMetadataBaseUrl, resolveDocsObservabilityConfig, resolveDocsOpenApiDiscoveryConfig, resolveDocsPath, resolveDocsRobotsConfig, resolveDocsRobotsRequest, resolveDocsSitemapConfig, resolveDocsSitemapPageLastmod, resolveDocsSitemapRequest, resolveDocsSkillFormat, resolveOGImage, resolvePageReadingTime, resolvePageSidebarFolderIndexBehavior, resolveReadingTimeFromContent, resolveReadingTimeFromSource, resolveReadingTimeOptions, resolveSearchRequestConfig, resolveSidebarFolderIndexBehavior, resolveSidebarFolderIndexBehaviorForPath, resolveTitle, selectDocsLlmsTxtContent, serializeGeneratedAgentDocument, stripGeneratedAgentProvenance, toDocsMarkdownUrl, toDocsSitemapMarkdownUrl, upsertDocsRobotsGeneratedBlock, validateDocsAgentFeedbackPayload };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./agent-
|
|
2
|
-
import { c as renderDocsRobotsGeneratedBlock, f as upsertDocsRobotsGeneratedBlock, i as DOCS_ROBOTS_GENERATED_BLOCK_START, r as DOCS_ROBOTS_GENERATED_BLOCK_END, u as resolveDocsRobotsConfig } from "./robots-
|
|
1
|
+
import "./agent-CuX9y_iA.mjs";
|
|
2
|
+
import { c as renderDocsRobotsGeneratedBlock, f as upsertDocsRobotsGeneratedBlock, i as DOCS_ROBOTS_GENERATED_BLOCK_START, r as DOCS_ROBOTS_GENERATED_BLOCK_END, u as resolveDocsRobotsConfig } from "./robots-ygAWyine.mjs";
|
|
3
3
|
import { f as readTopLevelStringProperty, i as loadDocsConfigModule, o as readBooleanProperty, p as resolveDocsConfigPath, t as extractNestedObjectLiteral, u as readStringProperty } from "./config-CBoixmrv.mjs";
|
|
4
4
|
import { t as detectFramework } from "./utils-x5EtYWjC.mjs";
|
|
5
5
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as resolveDocsSitemapConfig } from "./sitemap-CMNj0Pt3.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { H as normalizeDocsPathSegment, a as DEFAULT_AGENT_MD_ROUTE, b as DEFAULT_SKILL_MD_ROUTE, c as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, d as DEFAULT_LLMS_FULL_TXT_ROUTE, f as DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, g as DEFAULT_MCP_PUBLIC_ROUTE, h as DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE, l as DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, m as DEFAULT_LLMS_TXT_ROUTE, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, o as DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, t as DEFAULT_AGENTS_MD_ROUTE, v as DEFAULT_MCP_WELL_KNOWN_ROUTE, x as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE } from "./agent-CuX9y_iA.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/robots.ts
|
|
5
5
|
const DEFAULT_ROBOTS_TXT_ROUTE = "/robots.txt";
|