@farming-labs/docs 0.2.72 → 0.2.74
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-pS2nNQS3.mjs → agent-BJ0KXN-A.mjs} +583 -765
- package/dist/{agent-DbDfIqhe.mjs → agent-D0LEY2Vy.mjs} +4 -3
- package/dist/{agent-evals-CjYzCQMZ.mjs → agent-evals-LIScgQVm.mjs} +86 -43
- package/dist/{agent-export-CpQhD8eA.mjs → agent-export-B92pNe6g.mjs} +12 -11
- package/dist/agent-skills-bundle.d.mts +1 -1
- package/dist/{agent-skills-server-DZnNB4_S.d.mts → agent-skills-server-BqvIGQb1.d.mts} +2 -2
- package/dist/{agent-skills-server-BPVv4gMg.mjs → agent-skills-server-noFn1l_p.mjs} +1 -1
- package/dist/agent-skills-vite.d.mts +3 -3
- package/dist/agent-skills-vite.mjs +2 -2
- package/dist/{agents-B-1h9Jlm.mjs → agents-C228QGbp.mjs} +10 -9
- package/dist/cli/index.mjs +34 -30
- package/dist/client/react.d.mts +1 -1
- package/dist/{cloud-ask-ai-D9gIN4Vr.d.mts → cloud-ask-ai-6X9pVjIY.d.mts} +1 -1
- package/dist/{cloud-CyysfDny.mjs → cloud-pdNC-tyj.mjs} +3 -3
- package/dist/{codeblocks-DAj7EAwt.mjs → codeblocks-CFuurVIH.mjs} +2 -2
- package/dist/{dev-qE7MYEh9.mjs → dev-Cc1cFFj-.mjs} +2 -2
- package/dist/docs-cloud-server.d.mts +2 -2
- package/dist/docs-cloud-server.mjs +1 -1
- package/dist/{doctor-CBy8-tPu.mjs → doctor-CgrUZ3tY.mjs} +15 -14
- package/dist/{downgrade-DCxezPZI.mjs → downgrade-w7e6Se0L.mjs} +2 -2
- package/dist/{golden-evaluations-DGg_eHIY.mjs → golden-evaluations-DTEPZeb0.mjs} +4 -3
- package/dist/index.d.mts +72 -6
- package/dist/index.mjs +9 -8
- package/dist/{init-p1MHf06G.mjs → init-DAkI0Lkf.mjs} +3 -3
- package/dist/markdown-rendering.d.mts +75 -0
- package/dist/markdown-rendering.mjs +618 -0
- package/dist/markdown-sections-7OoA7ylx.mjs +1492 -0
- package/dist/{mcp-BNK45dzD.mjs → mcp-YD37HlPY.mjs} +12 -9
- package/dist/mcp.d.mts +13 -2
- package/dist/mcp.mjs +121 -60
- package/dist/{metadata-D6qlWDu-.mjs → metadata-N252j5_a.mjs} +1 -1
- package/dist/{package-version-BXHcIm1T.mjs → package-version-n5AFur8a.mjs} +1 -1
- package/dist/{reading-time-DvTuW2Iy.mjs → prompt-references-BIS1eXt4.mjs} +158 -4
- package/dist/{search-1aftosa5.d.mts → retrieval-digest-9Kp3uSaZ.d.mts} +69 -5
- package/dist/{review-Cace7A2c.mjs → review-Dbzkdl6K.mjs} +10 -9
- package/dist/{robots-DmE_wXvG.mjs → robots-DUO0r4UI.mjs} +6 -5
- package/dist/{robots-C2SindI5.mjs → robots-RbgmSvPH.mjs} +2 -2
- package/dist/{search-BbArHODP.mjs → search-DIyIl-tE.mjs} +1288 -149
- package/dist/{search-DB3svkNQ.mjs → search-hcqaEZVN.mjs} +66 -27
- package/dist/server.d.mts +5 -5
- package/dist/server.mjs +10 -9
- package/dist/{sitemap-DPTLh_26.mjs → sitemap-jhkS_jYx.mjs} +10 -9
- package/dist/{sitemap-server-PUoOhplO.mjs → sitemap-server-BfyBM7_V.mjs} +1 -1
- package/dist/{standards-discovery-CYfiQE13.mjs → standards-discovery-BwL5ffGx.mjs} +4 -3
- package/dist/{standards-discovery-DRJ10g7B.d.mts → standards-discovery-CdrOE-05.d.mts} +5 -4
- package/dist/{types-B9DNNAdT.d.mts → types-clg5J1R4.d.mts} +60 -1
- package/dist/{upgrade-DDJQ5l6n.mjs → upgrade-oz-GChgt.mjs} +2 -2
- package/package.json +9 -1
- /package/dist/{cloud-ask-ai-hnJfj8-X.mjs → cloud-ask-ai-sbpjOR2K.mjs} +0 -0
- /package/dist/{code-blocks-qe0T8-xe.mjs → code-blocks-DnNVNK2M.mjs} +0 -0
- /package/dist/{config-z7_R0f86.mjs → config-Wcdj-D0a.mjs} +0 -0
- /package/dist/{errors-Cc_qplZU.mjs → errors-DbOhkE1h.mjs} +0 -0
- /package/dist/{i18n-CCaFUnAN.mjs → i18n-hHVWcflJ.mjs} +0 -0
- /package/dist/{templates-BJnf6B8l.mjs → templates-C6avM0U3.mjs} +0 -0
- /package/dist/{utils-C4RC8Zq_.mjs → utils-DpiIioYb.mjs} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { It as DEFAULT_SITEMAP_XML_ROUTE, Pt as DEFAULT_SITEMAP_MD_ROUTE, Zt as DEFAULT_MCP_WELL_KNOWN_ROUTE, c as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, f as DEFAULT_DOCS_CONFIG_ROUTE, h as DEFAULT_LLMS_FULL_TXT_ROUTE, i as DEFAULT_AGENT_FEEDBACK_ROUTE, m as DEFAULT_DOCS_DIAGNOSTICS_ROUTE, t as DEFAULT_AGENTS_MD_ROUTE, v as DEFAULT_LLMS_TXT_ROUTE, x as DEFAULT_SKILL_MD_ROUTE } from "./agent-BJ0KXN-A.mjs";
|
|
2
2
|
import { isDocsAgentSkillName, validateDocsAgentSkillFrontmatter } from "./agent-skills-spec.mjs";
|
|
3
|
-
import { C as DOCS_AGENT_MANIFEST_SCHEMA_MEDIA_TYPE, S as DOCS_AGENT_MANIFEST_FORMAT, f as DEFAULT_AGENT_SKILLS_ROUTE_PREFIX, n as API_CATALOG_MEDIA_TYPE, r as API_CATALOG_PROFILE_URI, t as AGENT_SKILLS_DISCOVERY_SCHEMA_URI, u as DEFAULT_AGENT_SKILLS_INDEX_ROUTE, v as DEFAULT_API_CATALOG_ROUTE, w as DOCS_AGENT_MANIFEST_SCHEMA_URI } from "./standards-discovery-
|
|
4
|
-
import { n as DEFAULT_ROBOTS_TXT_ROUTE } from "./robots-
|
|
3
|
+
import { C as DOCS_AGENT_MANIFEST_SCHEMA_MEDIA_TYPE, S as DOCS_AGENT_MANIFEST_FORMAT, T as DOCS_AGENT_MANIFEST_VERSION, f as DEFAULT_AGENT_SKILLS_ROUTE_PREFIX, n as API_CATALOG_MEDIA_TYPE, r as API_CATALOG_PROFILE_URI, t as AGENT_SKILLS_DISCOVERY_SCHEMA_URI, u as DEFAULT_AGENT_SKILLS_INDEX_ROUTE, v as DEFAULT_API_CATALOG_ROUTE, w as DOCS_AGENT_MANIFEST_SCHEMA_URI } from "./standards-discovery-BwL5ffGx.mjs";
|
|
4
|
+
import { n as DEFAULT_ROBOTS_TXT_ROUTE } from "./robots-RbgmSvPH.mjs";
|
|
5
5
|
import matter from "gray-matter";
|
|
6
6
|
|
|
7
7
|
//#region src/define-docs.ts
|
|
@@ -683,6 +683,7 @@ function validateAgentManifest(content) {
|
|
|
683
683
|
const issues = [];
|
|
684
684
|
if (root?.$schema !== DOCS_AGENT_MANIFEST_SCHEMA_URI) issues.push(`Agent manifest did not declare top-level $schema ${DOCS_AGENT_MANIFEST_SCHEMA_URI}`);
|
|
685
685
|
if (root?.format !== DOCS_AGENT_MANIFEST_FORMAT) issues.push(`Agent manifest did not declare top-level format ${DOCS_AGENT_MANIFEST_FORMAT}`);
|
|
686
|
+
if (root?.version !== DOCS_AGENT_MANIFEST_VERSION) issues.push(`Agent manifest did not declare top-level version ${DOCS_AGENT_MANIFEST_VERSION}`);
|
|
686
687
|
return issues;
|
|
687
688
|
}
|
|
688
689
|
function httpLinkMatchesContractExpectation(header, expectation, responseUrl) {
|
|
@@ -909,4 +910,157 @@ function resolveReadingTimeFromSource(source, wordsPerMinute, options) {
|
|
|
909
910
|
}
|
|
910
911
|
|
|
911
912
|
//#endregion
|
|
912
|
-
|
|
913
|
+
//#region src/heading-toc.ts
|
|
914
|
+
/**
|
|
915
|
+
* Encode heading fragments emitted by a renderer's nested table of contents.
|
|
916
|
+
*
|
|
917
|
+
* Fumadocs stores fragment URLs as raw DOM ids. Encoding the fragment after its
|
|
918
|
+
* heading visitor runs keeps links valid without changing path prefixes.
|
|
919
|
+
*/
|
|
920
|
+
function encodeDocsHeadingTocUrls(value) {
|
|
921
|
+
if (Array.isArray(value)) {
|
|
922
|
+
for (const item of value) encodeDocsHeadingTocUrls(item);
|
|
923
|
+
return;
|
|
924
|
+
}
|
|
925
|
+
if (!value || typeof value !== "object") return;
|
|
926
|
+
const item = value;
|
|
927
|
+
if (typeof item.url === "string") {
|
|
928
|
+
const hashIndex = item.url.indexOf("#");
|
|
929
|
+
if (hashIndex >= 0) item.url = `${item.url.slice(0, hashIndex)}#${encodeURIComponent(item.url.slice(hashIndex + 1))}`;
|
|
930
|
+
}
|
|
931
|
+
encodeDocsHeadingTocUrls(item.children);
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
//#endregion
|
|
935
|
+
//#region src/prompt-references.ts
|
|
936
|
+
function isDocsMarkdownPromptNode(node) {
|
|
937
|
+
return (node.type === "mdxJsxFlowElement" || node.type === "mdxJsxTextElement") && node.name === "Prompt";
|
|
938
|
+
}
|
|
939
|
+
function normalizeDocsMarkdownReferenceIdentifier(value) {
|
|
940
|
+
return typeof value === "string" ? value.trim().replace(/\s+/gu, " ").toLowerCase() : "";
|
|
941
|
+
}
|
|
942
|
+
function readDocsMarkdownPromptReferenceSource(value) {
|
|
943
|
+
const source = typeof value === "string" ? value : value instanceof Uint8Array ? new TextDecoder().decode(value) : void 0;
|
|
944
|
+
if (source === void 0) return void 0;
|
|
945
|
+
return source.startsWith("") ? source.slice(1) : source;
|
|
946
|
+
}
|
|
947
|
+
function sliceDocsMarkdownPromptReferenceSource(node, source) {
|
|
948
|
+
if (source === void 0) return void 0;
|
|
949
|
+
const start = node.position?.start?.offset;
|
|
950
|
+
const end = node.position?.end?.offset;
|
|
951
|
+
if (typeof start !== "number" || typeof end !== "number" || !Number.isInteger(start) || !Number.isInteger(end) || start < 0 || end < start || end > source.length) return;
|
|
952
|
+
return source.slice(start, end);
|
|
953
|
+
}
|
|
954
|
+
function sliceDocsMarkdownPromptChildrenSource(node, source) {
|
|
955
|
+
const nodeSource = sliceDocsMarkdownPromptReferenceSource(node, source);
|
|
956
|
+
if (nodeSource === void 0) return void 0;
|
|
957
|
+
const closingStart = nodeSource.lastIndexOf("</Prompt");
|
|
958
|
+
if (closingStart < 0) return void 0;
|
|
959
|
+
const children = node.children ?? [];
|
|
960
|
+
const isolatedChild = children.length === 1 ? children[0] : void 0;
|
|
961
|
+
if (isolatedChild?.type === "text" && typeof isolatedChild.value === "string" && isolatedChild.position === void 0) return isolatedChild.value;
|
|
962
|
+
const nodeStart = node.position?.start?.offset;
|
|
963
|
+
if (typeof nodeStart !== "number") return void 0;
|
|
964
|
+
let firstChildStart;
|
|
965
|
+
for (const child of children) {
|
|
966
|
+
const childStart = child.position?.start?.offset;
|
|
967
|
+
if (typeof childStart === "number" && Number.isInteger(childStart) && childStart >= nodeStart && (firstChildStart === void 0 || childStart - nodeStart < firstChildStart)) firstChildStart = childStart - nodeStart;
|
|
968
|
+
}
|
|
969
|
+
if (children.length > 0 && firstChildStart === void 0) return void 0;
|
|
970
|
+
const openingEnd = nodeSource.lastIndexOf(">", (firstChildStart ?? closingStart) - 1);
|
|
971
|
+
if (openingEnd < 0 || openingEnd >= closingStart) return void 0;
|
|
972
|
+
return nodeSource.slice(openingEnd + 1, closingStart);
|
|
973
|
+
}
|
|
974
|
+
function flattenDocsMarkdownPromptReferenceNode(node) {
|
|
975
|
+
if (typeof node.value === "string") return node.value;
|
|
976
|
+
return (node.children ?? []).map((child) => flattenDocsMarkdownPromptReferenceNode(child)).join("");
|
|
977
|
+
}
|
|
978
|
+
function formatDocsMarkdownPromptReference(node) {
|
|
979
|
+
const image = node.type === "imageReference";
|
|
980
|
+
const visibleLabel = image ? typeof node.alt === "string" ? node.alt : "" : flattenDocsMarkdownPromptReferenceNode(node);
|
|
981
|
+
const referenceLabel = typeof node.label === "string" ? node.label : typeof node.identifier === "string" ? node.identifier : visibleLabel;
|
|
982
|
+
const prefix = image ? "!" : "";
|
|
983
|
+
if (node.referenceType === "collapsed") return `${prefix}[${visibleLabel}][]`;
|
|
984
|
+
if (node.referenceType === "shortcut") return `${prefix}[${visibleLabel}]`;
|
|
985
|
+
return `${prefix}[${visibleLabel}][${referenceLabel}]`;
|
|
986
|
+
}
|
|
987
|
+
function formatDocsMarkdownPromptDefinition(node) {
|
|
988
|
+
const label = typeof node.label === "string" ? node.label : typeof node.identifier === "string" ? node.identifier : "";
|
|
989
|
+
const rawUrl = typeof node.url === "string" ? node.url : "";
|
|
990
|
+
return `[${label}]: ${/[<>\s]/u.test(rawUrl) ? `<${rawUrl.replace(/>/gu, "\\>")}>` : rawUrl}${typeof node.title === "string" ? ` "${node.title.replace(/"/gu, "\\\"")}"` : ""}`;
|
|
991
|
+
}
|
|
992
|
+
function createDocsMarkdownPromptReferenceText(node, source) {
|
|
993
|
+
return {
|
|
994
|
+
type: "text",
|
|
995
|
+
value: sliceDocsMarkdownPromptReferenceSource(node, source) ?? formatDocsMarkdownPromptReference(node),
|
|
996
|
+
position: node.position
|
|
997
|
+
};
|
|
998
|
+
}
|
|
999
|
+
function createDocsMarkdownPromptDefinitionParagraph(node, source) {
|
|
1000
|
+
return {
|
|
1001
|
+
type: "paragraph",
|
|
1002
|
+
children: [{
|
|
1003
|
+
type: "text",
|
|
1004
|
+
value: sliceDocsMarkdownPromptReferenceSource(node, source) ?? formatDocsMarkdownPromptDefinition(node),
|
|
1005
|
+
position: node.position
|
|
1006
|
+
}],
|
|
1007
|
+
position: node.position
|
|
1008
|
+
};
|
|
1009
|
+
}
|
|
1010
|
+
/**
|
|
1011
|
+
* Keep `<Prompt>` children literal before Markdown reference definitions are
|
|
1012
|
+
* resolved by the MDX compiler.
|
|
1013
|
+
*
|
|
1014
|
+
* Definitions inside Prompt are copyable source, not page-level definitions.
|
|
1015
|
+
* References inside Prompt always remain source text, while references outside
|
|
1016
|
+
* Prompt only remain live when they have a definition outside Prompt.
|
|
1017
|
+
*/
|
|
1018
|
+
function isolateDocsMarkdownPromptReferences(root, value) {
|
|
1019
|
+
if (!root || typeof root !== "object") return;
|
|
1020
|
+
const source = readDocsMarkdownPromptReferenceSource(value);
|
|
1021
|
+
const promptDefinitions = /* @__PURE__ */ new Set();
|
|
1022
|
+
const pageDefinitions = /* @__PURE__ */ new Set();
|
|
1023
|
+
let hasPrompt = false;
|
|
1024
|
+
const collectDefinitions = (node, insidePrompt) => {
|
|
1025
|
+
const prompt = isDocsMarkdownPromptNode(node);
|
|
1026
|
+
const literal = insidePrompt || prompt;
|
|
1027
|
+
if (prompt) hasPrompt = true;
|
|
1028
|
+
if (node.type === "definition") {
|
|
1029
|
+
const identifier = normalizeDocsMarkdownReferenceIdentifier(node.identifier);
|
|
1030
|
+
if (identifier) (literal ? promptDefinitions : pageDefinitions).add(identifier);
|
|
1031
|
+
}
|
|
1032
|
+
for (const child of node.children ?? []) collectDefinitions(child, literal);
|
|
1033
|
+
};
|
|
1034
|
+
collectDefinitions(root, false);
|
|
1035
|
+
if (!hasPrompt) return;
|
|
1036
|
+
const isolateReferences = (node, insidePrompt) => {
|
|
1037
|
+
const prompt = isDocsMarkdownPromptNode(node);
|
|
1038
|
+
if (prompt) {
|
|
1039
|
+
const promptSource = sliceDocsMarkdownPromptChildrenSource(node, source);
|
|
1040
|
+
if (promptSource !== void 0) {
|
|
1041
|
+
node.children = [{
|
|
1042
|
+
type: "text",
|
|
1043
|
+
value: promptSource
|
|
1044
|
+
}];
|
|
1045
|
+
return;
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
const literal = insidePrompt || prompt;
|
|
1049
|
+
const children = node.children;
|
|
1050
|
+
if (!children) return;
|
|
1051
|
+
node.children = children.map((child) => {
|
|
1052
|
+
const childInsidePrompt = literal || isDocsMarkdownPromptNode(child);
|
|
1053
|
+
if (childInsidePrompt && child.type === "definition") return createDocsMarkdownPromptDefinitionParagraph(child, source);
|
|
1054
|
+
if (child.type === "linkReference" || child.type === "imageReference") {
|
|
1055
|
+
const identifier = normalizeDocsMarkdownReferenceIdentifier(child.identifier);
|
|
1056
|
+
if (childInsidePrompt || promptDefinitions.has(identifier) && !pageDefinitions.has(identifier)) return createDocsMarkdownPromptReferenceText(child, source);
|
|
1057
|
+
}
|
|
1058
|
+
isolateReferences(child, childInsidePrompt);
|
|
1059
|
+
return child;
|
|
1060
|
+
});
|
|
1061
|
+
};
|
|
1062
|
+
isolateReferences(root, false);
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
//#endregion
|
|
1066
|
+
export { resolveChangelogConfig as _, resolveReadingTimeFromContent as a, DOCS_AGENT_CONTRACT_VERSION as c, httpLinkHeaderHasTargetRelation as d, AGENT_SKILL_ARCHIVE_MAX_UNCOMPRESSED_BYTES as f, deepMerge as g, extendTheme as h, resolvePageReadingTime as i, createDocsAgentContractCases as l, createTheme as m, encodeDocsHeadingTocUrls as n, resolveReadingTimeFromSource as o, readAgentSkillDocumentFromTar as p, estimateReadingTimeMinutes as r, resolveReadingTimeOptions as s, isolateDocsMarkdownPromptReferences as t, runDocsAgentConformance as u, defineDocs as v };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Jt as DocsObservabilityEventInput, Kt as DocsObservabilityConfig, Vn as McpDocsSearchConfig, Wn as OpenDocsProvider, _n as DocsSearchRequest, at as DocsAnalyticsEventInput, cn as DocsSearchAdapterFactory, cr as ResolvedDocsRelatedLink, dn as DocsSearchDocument, et as DocsAgentTraceEventInput, f as CustomDocsSearchConfig, hn as DocsSearchFilters, ht as DocsAskAIMcpConfig, it as DocsAnalyticsEvent, ln as DocsSearchChunkingConfig, mn as DocsSearchFilterInput, on as DocsSearchAdapter, qn as OpenDocsTarget, qt as DocsObservabilityEvent, r as AlgoliaDocsSearchConfig, rt as DocsAnalyticsConfig, un as DocsSearchConfig, vn as DocsSearchResponse, vr as TypesenseDocsSearchConfig, wn as DocsSitemapConfig, xn as DocsSearchSourcePage, yn as DocsSearchResult } from "./types-clg5J1R4.mjs";
|
|
2
|
+
import { I as DocsDiscoveryApiRouteOptions } from "./standards-discovery-CdrOE-05.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/analytics.d.ts
|
|
5
5
|
declare const DOCS_AGENT_TRACE_EVENT_TYPES: readonly ["run.start", "run.end", "run.error", "user.input", "prompt.build", "retrieval.query", "retrieval.result", "retrieval.error", "model.call", "model.response", "model.stream", "model.error", "tool.call", "tool.result", "tool.error", "retry", "timeout", "error", "agent.final"];
|
|
@@ -35,11 +35,32 @@ declare function emitDocsAgentTraceEvent(observability: boolean | DocsObservabil
|
|
|
35
35
|
type DocsContentAudience = "human" | "agent";
|
|
36
36
|
/** Resolve whether content with an optional audience restriction is visible. */
|
|
37
37
|
declare function resolveDocsAudienceExposure(only: unknown, audience: DocsContentAudience): boolean;
|
|
38
|
+
interface DocsMarkdownPromptBlock {
|
|
39
|
+
/** Raw JSX attributes between the Prompt name and opening bracket. */
|
|
40
|
+
attributes: string;
|
|
41
|
+
/** Literal source between the Prompt tags, with enclosing Markdown container prefixes removed. */
|
|
42
|
+
children: string;
|
|
43
|
+
/** Collision-safe placeholder carried through document-level rendering. */
|
|
44
|
+
token: string;
|
|
45
|
+
}
|
|
46
|
+
interface ExtractedDocsMarkdownPromptBlocks {
|
|
47
|
+
blocks: DocsMarkdownPromptBlock[];
|
|
48
|
+
markdown: string;
|
|
49
|
+
}
|
|
38
50
|
interface DocsAudienceMdxIssue {
|
|
39
51
|
code: "missing-only" | "invalid-only" | "dynamic-only" | "ignored-agent-only" | "ignored-human-only";
|
|
40
52
|
index: number;
|
|
41
53
|
message: string;
|
|
42
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* Extract live MDX Prompt blocks while leaving Markdown literals untouched.
|
|
57
|
+
*
|
|
58
|
+
* Prompt bodies are copyable source, so callers can safely run audience,
|
|
59
|
+
* reference-definition, and heading passes over `markdown`, then restore each
|
|
60
|
+
* block from its token. Fences (including container fences), inline code, links,
|
|
61
|
+
* comments, raw elements, and other literal contexts are never extracted.
|
|
62
|
+
*/
|
|
63
|
+
declare function extractDocsMarkdownPromptBlocks(content: string): ExtractedDocsMarkdownPromptBlocks;
|
|
43
64
|
/** Find audience declarations that cannot be projected consistently at build time. */
|
|
44
65
|
declare function findDocsAudienceMdxIssues(content: string): DocsAudienceMdxIssue[];
|
|
45
66
|
/**
|
|
@@ -222,6 +243,26 @@ declare function resolveDocsSearchFilters(searchParams: URLSearchParams): DocsSe
|
|
|
222
243
|
declare function resolveDocsSearchRequest(searchParams: URLSearchParams): DocsSearchRequest;
|
|
223
244
|
declare function inferDocsAskAIPackageHints(content: string): DocsAskAIPackageHints;
|
|
224
245
|
declare function formatDocsAskAIPackageHints(hints: DocsAskAIPackageHints, packageName?: string): string | undefined;
|
|
246
|
+
/**
|
|
247
|
+
* Build the exact normalized-input projection represented by a retrieval source digest.
|
|
248
|
+
* This is public so consumers can independently reproduce `source.digest`.
|
|
249
|
+
*/
|
|
250
|
+
declare function buildDocsRetrievalDigestProjection(page: DocsSearchSourcePage, audience?: DocsContentAudience): string;
|
|
251
|
+
declare function resolveDocsRetrievalLastModified(page: DocsSearchSourcePage, audience: DocsContentAudience): string | undefined;
|
|
252
|
+
interface EnrichDocsSearchDocumentsWithProvenanceOptions {
|
|
253
|
+
documents: readonly DocsSearchDocument[];
|
|
254
|
+
pages: readonly DocsSearchSourcePage[];
|
|
255
|
+
audience?: DocsContentAudience;
|
|
256
|
+
chunking?: DocsSearchChunkingConfig;
|
|
257
|
+
locale?: string;
|
|
258
|
+
baseUrl?: string;
|
|
259
|
+
indexGeneration?: string;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Attach the same canonical provenance used by built-in search providers.
|
|
263
|
+
* Custom adapters can call this before persisting their own hosted records.
|
|
264
|
+
*/
|
|
265
|
+
declare function enrichDocsSearchDocumentsWithProvenance(options: EnrichDocsSearchDocumentsWithProvenanceOptions): Promise<DocsSearchDocument[]>;
|
|
225
266
|
declare function buildDocsSearchDocuments(pages: DocsSearchSourcePage[], chunking?: DocsSearchChunkingConfig, audience?: DocsContentAudience): DocsSearchDocument[];
|
|
226
267
|
declare function createSimpleSearchAdapter(): DocsSearchAdapter;
|
|
227
268
|
declare function createTypesenseSearchAdapter(config: TypesenseDocsSearchConfig): DocsSearchAdapter;
|
|
@@ -243,6 +284,10 @@ declare function createMcpSearchAdapter(config: McpDocsSearchConfig): DocsSearch
|
|
|
243
284
|
declare function createAlgoliaSearchAdapter(config: AlgoliaDocsSearchConfig): DocsSearchAdapter;
|
|
244
285
|
interface PerformDocsSearchOptions {
|
|
245
286
|
pages: DocsSearchSourcePage[];
|
|
287
|
+
/** @internal Complete corpus used for generation when `pages` is pre-scoped by a caller. */
|
|
288
|
+
generationPages?: DocsSearchSourcePage[];
|
|
289
|
+
/** @internal Precomputed complete-corpus generation for structured callers. */
|
|
290
|
+
indexGeneration?: string;
|
|
246
291
|
query: string;
|
|
247
292
|
search?: boolean | DocsSearchConfig;
|
|
248
293
|
/** Selects which audience projection is searchable. Public site search defaults to human. */
|
|
@@ -252,6 +297,12 @@ interface PerformDocsSearchOptions {
|
|
|
252
297
|
siteTitle?: string;
|
|
253
298
|
/** Canonical docs URL used to distinguish same-site absolute hits from foreign MCP results. */
|
|
254
299
|
baseUrl?: string;
|
|
300
|
+
/**
|
|
301
|
+
* Canonical origin safe to persist in a hosted index. Pass `null` when `baseUrl`
|
|
302
|
+
* came from the current request rather than trusted configuration.
|
|
303
|
+
* @internal
|
|
304
|
+
*/
|
|
305
|
+
syncBaseUrl?: string | null;
|
|
255
306
|
limit?: number;
|
|
256
307
|
/** Optional framework, version, package, and tag constraints. */
|
|
257
308
|
filters?: DocsSearchFilterInput;
|
|
@@ -266,7 +317,7 @@ interface PerformDocsSearchOptions {
|
|
|
266
317
|
* Runtime search defaults to true; provider diagnostics can disable supplementation.
|
|
267
318
|
*/
|
|
268
319
|
supplementExternalResults?: boolean;
|
|
269
|
-
/**
|
|
320
|
+
/** Keep absolute provider origins distinct when no canonical docs origin is available. */
|
|
270
321
|
strictExternalOrigins?: boolean;
|
|
271
322
|
/** Optional cancellation signal forwarded to adapters and their managed requests. */
|
|
272
323
|
signal?: AbortSignal;
|
|
@@ -280,7 +331,8 @@ declare function buildDocsAskAIContext(options: {
|
|
|
280
331
|
locale?: string;
|
|
281
332
|
pathname?: string;
|
|
282
333
|
siteTitle?: string;
|
|
283
|
-
baseUrl?: string;
|
|
334
|
+
baseUrl?: string; /** See `performDocsSearch.syncBaseUrl`. */
|
|
335
|
+
syncBaseUrl?: string | null;
|
|
284
336
|
limit?: number;
|
|
285
337
|
filters?: DocsSearchFilterInput;
|
|
286
338
|
maxContextChars?: number;
|
|
@@ -291,4 +343,16 @@ declare function buildDocsAskAIContext(options: {
|
|
|
291
343
|
}): Promise<DocsAskAIContext>;
|
|
292
344
|
declare function createCustomSearchAdapter(adapter: DocsSearchAdapter | DocsSearchAdapterFactory): CustomDocsSearchConfig;
|
|
293
345
|
//#endregion
|
|
294
|
-
|
|
346
|
+
//#region src/retrieval-digest.d.ts
|
|
347
|
+
/** Validate the bounded HTTP(S) URL or root-relative URI reference used by provenance. */
|
|
348
|
+
declare function isDocsRetrievalCanonicalUrl(value: string): boolean;
|
|
349
|
+
/**
|
|
350
|
+
* Hash a retrieval source projection with portable SHA-256.
|
|
351
|
+
*
|
|
352
|
+
* The projection is normalized by removing one leading BOM, converting CRLF/CR
|
|
353
|
+
* line endings to LF, and trimming trailing whitespace. The helper is exported so
|
|
354
|
+
* agents can independently verify provenance in Node, edge, and browser runtimes.
|
|
355
|
+
*/
|
|
356
|
+
declare function digestDocsRetrievalContent(value: string): `sha256:${string}`;
|
|
357
|
+
//#endregion
|
|
358
|
+
export { parsePromptStringArray as $, DocsSitemapFormat as A, resolveDocsSitemapConfig as B, resolveDocsSearchRequest as C, emitDocsObservabilityEvent as Ct, DEFAULT_SITEMAP_MD_ROUTE as D, DEFAULT_SITEMAP_MD_DOCS_ROUTE as E, resolveDocsObservabilityConfig as Et, buildDocsSitemapManifest as F, DEFAULT_OPEN_DOCS_PROVIDER_IDS as G, resolveDocsSitemapRequest as H, createDocsSitemapResponse as I, PromptAction as J, DEFAULT_OPEN_DOCS_TARGET as K, readDocsSitemapManifestFromContentMap as L, DocsSitemapManifestPage as M, DocsSitemapPageInput as N, DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE as O, DocsSitemapResolvedConfig as P, normalizePromptProviderName as Q, renderDocsSitemapMarkdown as R, resolveDocsSearchFilters as S, emitDocsAnalyticsEvent as St, DEFAULT_SITEMAP_MANIFEST_PATH as T, resolveDocsAnalyticsConfig as Tt, toDocsSitemapMarkdownUrl as U, resolveDocsSitemapPageLastmod as V, DEFAULT_OPEN_DOCS_PROMPT as W, SerializeOpenDocsProviderOptions as X, PromptProviderChoice as Y, SerializedOpenDocsProvider as Z, performDocsSearch as _, ResolvedDocsAnalyticsConfig as _t, buildDocsAskAIContext as a, serializeOpenDocsProviders as at, resolveDocsRetrievalLastModified as b, createDocsAgentTraceId as bt, createAlgoliaSearchAdapter as c, DocsMarkdownPromptBlock as ct, createSimpleSearchAdapter as d, findDocsAudienceMdxIssues as dt, resolvePromptProviderChoices as et, createTypesenseSearchAdapter as f, resolveDocsAgentMdxContent as ft, normalizeDocsSearchFilters as g, DocsAgentTraceContext as gt, inferDocsAskAIPackageHints as h, DOCS_AGENT_TRACE_EVENT_TYPES as ht, PerformDocsSearchOptions as i, serializeOpenDocsProvider as it, DocsSitemapManifest as j, DEFAULT_SITEMAP_XML_ROUTE as k, createCustomSearchAdapter as l, ExtractedDocsMarkdownPromptBlocks as lt, formatDocsAskAIPackageHints as m, resolveDocsAudienceMdxContent as mt, isDocsRetrievalCanonicalUrl as n, serializeDocsIcon as nt, buildDocsRetrievalDigestProjection as o, DocsAudienceMdxIssue as ot, enrichDocsSearchDocumentsWithProvenance as p, resolveDocsAudienceExposure as pt, DEFAULT_PROMPT_PROVIDER_TEMPLATES as q, EnrichDocsSearchDocumentsWithProvenanceOptions as r, serializeDocsIconRegistry as rt, buildDocsSearchDocuments as s, DocsContentAudience as st, digestDocsRetrievalContent as t, sanitizePromptText as tt, createMcpSearchAdapter as u, extractDocsMarkdownPromptBlocks as ut, performDocsSearchWithMetadata as v, ResolvedDocsObservabilityConfig as vt, resolveSearchRequestConfig as w, getDocsRequestAnalyticsProperties as wt, resolveDocsSearchAudience as x, emitDocsAgentTraceEvent as xt, resolveAskAISearchRequestConfig as y, createDocsAgentTraceContext as yt, renderDocsSitemapXml as z };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { A as buildDocsAgentDiscoverySpec,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { $t as getDocsMcpProtectedResourceMetadataRoutes, A as buildDocsAgentDiscoverySpec, Dt as findDocsAudienceMdxIssues, M as buildDocsConfigMap, T as DOCS_CONFIG_MAP_TOP_LEVEL_KEYS } from "./agent-BJ0KXN-A.mjs";
|
|
2
|
+
import { _ as hasStructuredPageAgentContract, f as PAGE_AGENT_CONTRACT_FIELDS, g as getPageAgentFrontmatterIssues, v as normalizePageAgentFrontmatter } from "./markdown-sections-7OoA7ylx.mjs";
|
|
3
|
+
import { I as resolveDocsDiscoveryApiRoute, _ as DEFAULT_API_CATALOG_FORMAT, d as DEFAULT_AGENT_SKILLS_ROUTE_PATTERN, h as DEFAULT_AGENT_SKILL_FORMAT, l as DEFAULT_AGENT_SKILLS_INDEX_FORMAT, u as DEFAULT_AGENT_SKILLS_INDEX_ROUTE, v as DEFAULT_API_CATALOG_ROUTE } from "./standards-discovery-BwL5ffGx.mjs";
|
|
4
|
+
import { h as resolveAskAISearchRequestConfig } from "./search-DIyIl-tE.mjs";
|
|
5
|
+
import { a as resolveDocsMetadataBaseUrl } from "./metadata-N252j5_a.mjs";
|
|
6
|
+
import { c as resolveDocsReviewConfig, o as ensureDocsReviewWorkflow, s as readDocsReviewConfigFromSource, t as runDocsGoldenTasks } from "./agent-evals-LIScgQVm.mjs";
|
|
6
7
|
import { createFilesystemDocsMcpSource, getDocsConfigSchema, resolveDocsMcpConfig } from "./mcp.mjs";
|
|
7
|
-
import "./code-blocks-
|
|
8
|
-
import { _ as resolveDocsContentDir, g as resolveDocsConfigPath, h as readTopLevelStringProperty, s as loadDocsConfigModuleResultWithProjectEnv } from "./config-
|
|
9
|
-
import { t as detectFramework } from "./utils-
|
|
10
|
-
import { a as extractAgentBlocks, i as createAgentUsefulnessPagesFromMcp, n as analyzeAgentSurfaceDrift, r as analyzeAgentUsefulness, t as resolveGoldenEvaluationInput } from "./golden-evaluations-
|
|
8
|
+
import "./code-blocks-DnNVNK2M.mjs";
|
|
9
|
+
import { _ as resolveDocsContentDir, g as resolveDocsConfigPath, h as readTopLevelStringProperty, s as loadDocsConfigModuleResultWithProjectEnv } from "./config-Wcdj-D0a.mjs";
|
|
10
|
+
import { t as detectFramework } from "./utils-DpiIioYb.mjs";
|
|
11
|
+
import { a as extractAgentBlocks, i as createAgentUsefulnessPagesFromMcp, n as analyzeAgentSurfaceDrift, r as analyzeAgentUsefulness, t as resolveGoldenEvaluationInput } from "./golden-evaluations-DTEPZeb0.mjs";
|
|
11
12
|
import matter from "gray-matter";
|
|
12
13
|
import { existsSync, lstatSync, readFileSync, readdirSync } from "node:fs";
|
|
13
14
|
import path from "node:path";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import "./agent-
|
|
2
|
-
import "./
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
1
|
+
import "./agent-BJ0KXN-A.mjs";
|
|
2
|
+
import "./markdown-sections-7OoA7ylx.mjs";
|
|
3
|
+
import "./standards-discovery-BwL5ffGx.mjs";
|
|
4
|
+
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-RbgmSvPH.mjs";
|
|
5
|
+
import { a as loadDocsConfigModule, g as resolveDocsConfigPath, h as readTopLevelStringProperty, l as readBooleanProperty, m as readTopLevelBooleanProperty, p as readStringProperty, t as extractNestedObjectLiteral } from "./config-Wcdj-D0a.mjs";
|
|
6
|
+
import { t as detectFramework } from "./utils-DpiIioYb.mjs";
|
|
6
7
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
7
8
|
import path from "node:path";
|
|
8
9
|
import pc from "picocolors";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE,
|
|
2
|
-
import { a as DEFAULT_A2A_AGENT_CARD_ROUTE, b as DEFAULT_LEGACY_SKILLS_INDEX_ROUTE, f as DEFAULT_AGENT_SKILLS_ROUTE_PREFIX, u as DEFAULT_AGENT_SKILLS_INDEX_ROUTE, v as DEFAULT_API_CATALOG_ROUTE, x as DEFAULT_LEGACY_SKILLS_ROUTE_PREFIX } from "./standards-discovery-
|
|
1
|
+
import { Ht as resolveDocsSitemapConfig, S as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, Yt as DEFAULT_MCP_PUBLIC_ROUTE, Zt as DEFAULT_MCP_WELL_KNOWN_ROUTE, a as DEFAULT_AGENT_MD_ROUTE, c as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, et as normalizeDocsPathSegment, g as DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, h as DEFAULT_LLMS_FULL_TXT_ROUTE, l as DEFAULT_AGENT_SPEC_WELL_KNOWN_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_LLMS_TXT_ROUTE, x as DEFAULT_SKILL_MD_ROUTE, y as DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE } from "./agent-BJ0KXN-A.mjs";
|
|
2
|
+
import { a as DEFAULT_A2A_AGENT_CARD_ROUTE, b as DEFAULT_LEGACY_SKILLS_INDEX_ROUTE, f as DEFAULT_AGENT_SKILLS_ROUTE_PREFIX, u as DEFAULT_AGENT_SKILLS_INDEX_ROUTE, v as DEFAULT_API_CATALOG_ROUTE, x as DEFAULT_LEGACY_SKILLS_ROUTE_PREFIX } from "./standards-discovery-BwL5ffGx.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/robots.ts
|
|
5
5
|
const DEFAULT_ROBOTS_TXT_ROUTE = "/robots.txt";
|