@farming-labs/docs 0.2.61 → 0.2.63
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-DFHlw_JC.mjs → agent-CQTH7NFu.mjs} +2 -2
- package/dist/{agent-Fl0pjVNF.mjs → agent-DKKptIgy.mjs} +17 -4
- package/dist/{agent-evals-f4_OL10T.mjs → agent-evals-B7MIxuEX.mjs} +1 -1
- package/dist/{agent-export-D0zQhasD.mjs → agent-export-CBgWgPvH.mjs} +7 -7
- package/dist/agent-skills-server-CPja6Syt.d.mts +14 -0
- package/dist/{agent-skills-server-CIeBszxp.mjs → agent-skills-server-DraIb6FV.mjs} +171 -19
- package/dist/agent-skills-vite.d.mts +2 -2
- package/dist/agent-skills-vite.mjs +2 -2
- package/dist/{agents-ibnXrWyp.mjs → agents-XWZBub6f.mjs} +6 -6
- package/dist/cli/index.mjs +14 -14
- package/dist/client/react.d.mts +1 -1
- package/dist/{cloud-ask-ai-D7ZgF47y.d.mts → cloud-ask-ai-zpwkdwnF.d.mts} +1 -1
- package/dist/docs-cloud-server.d.mts +2 -2
- package/dist/{doctor-CXostbsI.mjs → doctor-CJqtzKZT.mjs} +11 -11
- package/dist/{golden-evaluations-CBZ_JZjf.mjs → golden-evaluations-Dsvh0etV.mjs} +6 -1
- package/dist/index.d.mts +12 -3
- package/dist/index.mjs +7 -7
- package/dist/{mcp-DyPcoLwm.mjs → mcp-B9dcsivk.mjs} +6 -6
- package/dist/mcp.d.mts +1 -1
- package/dist/mcp.mjs +11 -7
- package/dist/{metadata-Dv1ah0Aj.mjs → metadata-DWExHQnx.mjs} +1 -1
- package/dist/{reading-time-C-SAhQT9.mjs → reading-time-CYZ5VvKU.mjs} +3 -3
- package/dist/{review-D2UBrxFq.mjs → review-Fndl5brR.mjs} +6 -6
- package/dist/{robots-C08kDLsz.mjs → robots-BIpC4j4P.mjs} +2 -2
- package/dist/{robots-5Yqz9mz7.mjs → robots-CUTahhoY.mjs} +3 -3
- package/dist/{search-9OnMGMvt.mjs → search-B6V6qtiI.mjs} +110 -42
- package/dist/{search-C6heDO8h.d.mts → search-CaSyi6H6.d.mts} +7 -2
- package/dist/{search-CNsRpz90.mjs → search-DSjCeOk7.mjs} +6 -6
- package/dist/server.d.mts +6 -5
- package/dist/server.mjs +8 -7
- package/dist/{sitemap-BpYnSsfJ.mjs → sitemap-Cykpe3Tz.mjs} +6 -6
- package/dist/{sitemap-server-D_0Kzanj.mjs → sitemap-server-C_6Wes83.mjs} +1 -1
- package/dist/{standards-discovery-C54V_aJH.mjs → standards-discovery-jkykaXq1.mjs} +18 -9
- package/dist/{types-EhFhYGfr.d.mts → types-lMBIdZg0.d.mts} +10 -0
- package/package.json +1 -1
- package/dist/agent-skills-server-CKq3_jMj.d.mts +0 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as isDocsAgentDiscoveryRequest, J as isDocsSkillRequest, Qt as upsertPageAgentContractMarkdown, U as isDocsAgentsRequest, Vt as PAGE_AGENT_CONTRACT_END_MARKER, Wt as PAGE_AGENT_CONTRACT_START_MARKER, Yt as renderPageAgentContractMarkdown, at as resolveDocsAgentFeedbackConfig, gt as resolveDocsSkillFormat, lt as resolveDocsLlmsTxtRequest, ot as resolveDocsAgentFeedbackRequest, pt as resolveDocsMarkdownRequest, st as resolveDocsAgentsFormat } from "./agent-
|
|
1
|
+
import { H as isDocsAgentDiscoveryRequest, J as isDocsSkillRequest, Qt as upsertPageAgentContractMarkdown, U as isDocsAgentsRequest, Vt as PAGE_AGENT_CONTRACT_END_MARKER, Wt as PAGE_AGENT_CONTRACT_START_MARKER, Yt as renderPageAgentContractMarkdown, at as resolveDocsAgentFeedbackConfig, gt as resolveDocsSkillFormat, lt as resolveDocsLlmsTxtRequest, ot as resolveDocsAgentFeedbackRequest, pt as resolveDocsMarkdownRequest, st as resolveDocsAgentsFormat, wt as resolveDocsAudienceMdxContent } from "./agent-DKKptIgy.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/telemetry.ts
|
|
4
4
|
const DOCS_PACKAGE_NAME = "@farming-labs/docs";
|
|
@@ -600,6 +600,7 @@ function findDocsMarkdownSection(markdown, requestedSection) {
|
|
|
600
600
|
//#endregion
|
|
601
601
|
//#region src/search.ts
|
|
602
602
|
const DEFAULT_SEARCH_LIMIT = 10;
|
|
603
|
+
const MAX_SEARCH_SNIPPET_CHARS = 160;
|
|
603
604
|
const DEFAULT_MCP_PROTOCOL_VERSION = "2025-11-25";
|
|
604
605
|
const MCP_SESSION_CLEANUP_TIMEOUT_MS = 1e3;
|
|
605
606
|
const syncedIndexes = /* @__PURE__ */ new Set();
|
|
@@ -707,7 +708,7 @@ function resolveAskAIContextUrl(value, baseUrl) {
|
|
|
707
708
|
}
|
|
708
709
|
}
|
|
709
710
|
function getAskAIPageContent(page) {
|
|
710
|
-
return upsertPageAgentContractMarkdown(page
|
|
711
|
+
return upsertPageAgentContractMarkdown(getPageAudienceRawContent(page, "agent"), page.agent).replace(PAGE_AGENT_CONTRACT_START_MARKER, "").replace(PAGE_AGENT_CONTRACT_END_MARKER, "").replace(/^\r?\n+/, "");
|
|
711
712
|
}
|
|
712
713
|
function getPageAgentContractSearchText(page) {
|
|
713
714
|
return stripMarkdownText(renderPageAgentContractMarkdown(page.agent).replace(PAGE_AGENT_CONTRACT_START_MARKER, "").replace(PAGE_AGENT_CONTRACT_END_MARKER, ""));
|
|
@@ -866,20 +867,24 @@ function mergeSearchResults(groups, getResultKey = getSearchResultKey) {
|
|
|
866
867
|
}
|
|
867
868
|
return results;
|
|
868
869
|
}
|
|
869
|
-
function
|
|
870
|
-
return documents.map((document) =>
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
870
|
+
function buildAudienceProjectionSearchResults(documents, query) {
|
|
871
|
+
return documents.map((document) => {
|
|
872
|
+
const score = scoreDocument(query, document);
|
|
873
|
+
return {
|
|
874
|
+
id: document.id,
|
|
875
|
+
url: document.url,
|
|
876
|
+
content: document.section ? `${document.title} — ${document.section}` : document.title,
|
|
877
|
+
description: cleanSearchResultText(buildSnippet(document, query) ?? document.description),
|
|
878
|
+
type: document.type,
|
|
879
|
+
score,
|
|
880
|
+
section: document.section
|
|
881
|
+
};
|
|
882
|
+
});
|
|
883
|
+
}
|
|
884
|
+
function sanitizeExternalAudienceSearchResults(results, localAudienceResults, baseUrl, strictExternalOrigins = false, preserveUnmatched) {
|
|
885
|
+
const localByKey = new Map(localAudienceResults.map((result) => [getSearchResultKey(result), result]));
|
|
881
886
|
const localPageResults = /* @__PURE__ */ new Map();
|
|
882
|
-
for (const result of
|
|
887
|
+
for (const result of localAudienceResults) {
|
|
883
888
|
const pageUrl = normalizeUrlPathname(result.url);
|
|
884
889
|
if (!localPageResults.get(pageUrl) || result.type === "page") localPageResults.set(pageUrl, result);
|
|
885
890
|
}
|
|
@@ -905,30 +910,64 @@ function sanitizeExternalAgentSearchResults(results, localAgentResults, baseUrl,
|
|
|
905
910
|
}];
|
|
906
911
|
});
|
|
907
912
|
}
|
|
908
|
-
function
|
|
909
|
-
const { result, localPagePaths, baseUrl
|
|
913
|
+
function shouldPreserveUnmatchedExternalResult(options) {
|
|
914
|
+
const { result, localPagePaths, baseUrl } = options;
|
|
910
915
|
const path = normalizeUrlPathname(result.url);
|
|
911
916
|
const rawUrl = result.url.trim();
|
|
912
917
|
const explicitScheme = rawUrl.match(/^([a-z][a-z\d+.-]*):/iu)?.[1]?.toLowerCase();
|
|
913
918
|
if (explicitScheme && explicitScheme !== "http" && explicitScheme !== "https") return false;
|
|
914
919
|
const explicitlyHosted = /^[a-z][a-z\d+.-]*:/iu.test(rawUrl) || /^[\\/]{2}/u.test(rawUrl);
|
|
915
|
-
|
|
916
|
-
if (!explicitlyHosted) return !
|
|
917
|
-
if (!baseUrl) return
|
|
920
|
+
const knownLocalPath = localPagePaths.has(path);
|
|
921
|
+
if (!explicitlyHosted) return !knownLocalPath;
|
|
922
|
+
if (!baseUrl) return !knownLocalPath;
|
|
918
923
|
try {
|
|
919
924
|
if (new URL(result.url, baseUrl).origin !== new URL(baseUrl).origin) return true;
|
|
920
925
|
} catch {
|
|
921
926
|
return false;
|
|
922
927
|
}
|
|
923
|
-
return !
|
|
928
|
+
return !knownLocalPath;
|
|
924
929
|
}
|
|
925
930
|
function getPageAudienceRawContent(page, audience) {
|
|
926
|
-
|
|
927
|
-
return page.rawContent ?? page.content;
|
|
931
|
+
return resolveDocsAudienceMdxContent(audience === "agent" ? page.agentRawContent ?? page.agentFallbackRawContent ?? page.agentContent ?? page.agentFallbackContent ?? page.rawContent ?? page.content : page.rawContent ?? page.content, audience);
|
|
928
932
|
}
|
|
929
933
|
function getPageAudienceSearchText(page, audience) {
|
|
930
|
-
|
|
931
|
-
|
|
934
|
+
return stripMarkdownText(getPageAudienceRawContent(page, audience));
|
|
935
|
+
}
|
|
936
|
+
function isLocalProviderResult(result, baseUrl, strictExternalOrigins = false) {
|
|
937
|
+
const rawUrl = result.url.trim();
|
|
938
|
+
const explicitScheme = rawUrl.match(/^([a-z][a-z\d+.-]*):/iu)?.[1]?.toLowerCase();
|
|
939
|
+
if (explicitScheme && explicitScheme !== "http" && explicitScheme !== "https") return false;
|
|
940
|
+
if (!(/^[a-z][a-z\d+.-]*:/iu.test(rawUrl) || /^[\\/]{2}/u.test(rawUrl))) return true;
|
|
941
|
+
if (!baseUrl) return !strictExternalOrigins;
|
|
942
|
+
try {
|
|
943
|
+
return new URL(result.url, baseUrl).origin === new URL(baseUrl).origin;
|
|
944
|
+
} catch {
|
|
945
|
+
return false;
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
function hasOppositeAudienceEvidence(options) {
|
|
949
|
+
const { result, pages, query, audience, baseUrl, strictExternalOrigins } = options;
|
|
950
|
+
if (!isLocalProviderResult(result, baseUrl, strictExternalOrigins)) return false;
|
|
951
|
+
const pagePath = normalizeUrlPathname(result.url);
|
|
952
|
+
const page = pages.find((candidate) => normalizeUrlPathname(candidate.url) === pagePath);
|
|
953
|
+
if (!page) return false;
|
|
954
|
+
if (scoreDocument(query, pageToSearchDocument(page, audience)) > 0) return false;
|
|
955
|
+
const oppositeAudience = audience === "agent" ? "human" : "agent";
|
|
956
|
+
if (scoreDocument(query, pageToSearchDocument(page, oppositeAudience)) > 0) return true;
|
|
957
|
+
const evidence = cleanSearchResultText(result.description);
|
|
958
|
+
if (!evidence) return false;
|
|
959
|
+
const selectedTokens = new Set(tokenizeSearchQuery(getPageAudienceSearchText(page, audience)));
|
|
960
|
+
const oppositeTokens = new Set(tokenizeSearchQuery(getPageAudienceSearchText(page, oppositeAudience)));
|
|
961
|
+
const evidenceTokens = [...new Set(tokenizeSearchQuery(evidence))];
|
|
962
|
+
let selectedOnlyMatches = 0;
|
|
963
|
+
let oppositeOnlyMatches = 0;
|
|
964
|
+
for (const token of evidenceTokens) {
|
|
965
|
+
const inSelected = selectedTokens.has(token);
|
|
966
|
+
const inOpposite = oppositeTokens.has(token);
|
|
967
|
+
if (inSelected && !inOpposite) selectedOnlyMatches += 1;
|
|
968
|
+
if (inOpposite && !inSelected) oppositeOnlyMatches += 1;
|
|
969
|
+
}
|
|
970
|
+
return oppositeOnlyMatches > selectedOnlyMatches;
|
|
932
971
|
}
|
|
933
972
|
function pageToSearchDocument(page, audience = "human") {
|
|
934
973
|
return {
|
|
@@ -1104,23 +1143,27 @@ function scoreDocument(query, document) {
|
|
|
1104
1143
|
if (document.type === "page" && titleTokens.length > 0 && words.every((word) => titleTokens.includes(word))) score += 24;
|
|
1105
1144
|
}
|
|
1106
1145
|
if (matchedWords === words.length && words.length > 1) score += 20;
|
|
1107
|
-
if (document.type === "heading" && hasDistinctSection) score += 6;
|
|
1146
|
+
if (score > 0 && document.type === "heading" && hasDistinctSection) score += 6;
|
|
1108
1147
|
return score;
|
|
1109
1148
|
}
|
|
1110
1149
|
function buildSnippet(document, query) {
|
|
1111
1150
|
const q = query.trim().toLowerCase();
|
|
1112
1151
|
const sources = [normalizeWhitespace(stripMarkdownText(document.content)), normalizeWhitespace(stripMarkdownText(document.description ?? ""))].filter(Boolean);
|
|
1113
1152
|
for (const source of sources) {
|
|
1114
|
-
if (!q) return source
|
|
1153
|
+
if (!q) return clampSearchSnippet(source);
|
|
1115
1154
|
const idx = source.toLowerCase().indexOf(q);
|
|
1116
1155
|
if (idx === -1) continue;
|
|
1117
1156
|
const start = Math.max(0, idx - 48);
|
|
1118
1157
|
const end = Math.min(source.length, idx + q.length + 96);
|
|
1119
1158
|
const prefix = start > 0 ? "..." : "";
|
|
1120
1159
|
const suffix = end < source.length ? "..." : "";
|
|
1121
|
-
return `${prefix}${source.slice(start, end).trim()}${suffix}
|
|
1160
|
+
return clampSearchSnippet(`${prefix}${source.slice(start, end).trim()}${suffix}`);
|
|
1122
1161
|
}
|
|
1123
|
-
return sources[0]
|
|
1162
|
+
return sources[0] ? clampSearchSnippet(sources[0]) : void 0;
|
|
1163
|
+
}
|
|
1164
|
+
function clampSearchSnippet(value) {
|
|
1165
|
+
if (value.length <= MAX_SEARCH_SNIPPET_CHARS) return value;
|
|
1166
|
+
return `${value.slice(0, MAX_SEARCH_SNIPPET_CHARS - 3).trimEnd()}...`;
|
|
1124
1167
|
}
|
|
1125
1168
|
function cleanSearchResultText(value) {
|
|
1126
1169
|
if (!value) return void 0;
|
|
@@ -1437,12 +1480,23 @@ function createTypesenseSearchAdapter(config) {
|
|
|
1437
1480
|
}
|
|
1438
1481
|
function resolveSearchRequestConfig(search, requestUrl) {
|
|
1439
1482
|
if (!search || search === true || typeof search !== "object" || search.provider !== "mcp") return search;
|
|
1440
|
-
if (
|
|
1483
|
+
if (!requestUrl) return search;
|
|
1484
|
+
const resolvedEndpoint = new URL(search.endpoint, requestUrl);
|
|
1485
|
+
const usesDefaultSearchTool = (search.toolName ?? "search_docs") === "search_docs";
|
|
1486
|
+
const isSameOrigin = resolvedEndpoint.origin === new URL(requestUrl).origin;
|
|
1441
1487
|
return {
|
|
1442
1488
|
...search,
|
|
1443
|
-
endpoint:
|
|
1489
|
+
endpoint: resolvedEndpoint.toString(),
|
|
1490
|
+
forwardAudience: search.forwardAudience ?? (usesDefaultSearchTool && isSameOrigin)
|
|
1444
1491
|
};
|
|
1445
1492
|
}
|
|
1493
|
+
/**
|
|
1494
|
+
* Resolve the public search audience without allowing malformed values to opt into agent content.
|
|
1495
|
+
* Human search remains the default for omitted, legacy, and unknown query values.
|
|
1496
|
+
*/
|
|
1497
|
+
function resolveDocsSearchAudience(value) {
|
|
1498
|
+
return value === "agent" ? "agent" : "human";
|
|
1499
|
+
}
|
|
1446
1500
|
function resolveAskAISearchRequestConfig(options) {
|
|
1447
1501
|
if (!options.useMcp) return resolveSearchRequestConfig(options.search, options.requestUrl);
|
|
1448
1502
|
if (typeof options.useMcp === "object") return resolveSearchRequestConfig({
|
|
@@ -1462,7 +1516,10 @@ function createMcpSearchAdapter(config) {
|
|
|
1462
1516
|
const endpoint = resolveMcpEndpoint(config.endpoint);
|
|
1463
1517
|
const protocolVersion = config.protocolVersion ?? DEFAULT_MCP_PROTOCOL_VERSION;
|
|
1464
1518
|
const toolName = config.toolName ?? "search_docs";
|
|
1519
|
+
const forwardAudience = config.forwardAudience === true;
|
|
1520
|
+
const audience = resolveDocsSearchAudience(query.audience);
|
|
1465
1521
|
const baseHeaders = config.headers ?? {};
|
|
1522
|
+
if (audience === "human" && !forwardAudience) throw new Error("MCP human-projection search requires forwardAudience: true on an audience-aware tool.");
|
|
1466
1523
|
const initializeResponse = await fetch(endpoint, {
|
|
1467
1524
|
method: "POST",
|
|
1468
1525
|
headers: {
|
|
@@ -1509,7 +1566,8 @@ function createMcpSearchAdapter(config) {
|
|
|
1509
1566
|
arguments: {
|
|
1510
1567
|
query: query.query,
|
|
1511
1568
|
limit: query.limit ?? config.maxResults ?? DEFAULT_SEARCH_LIMIT,
|
|
1512
|
-
locale: query.locale
|
|
1569
|
+
locale: query.locale,
|
|
1570
|
+
...forwardAudience ? { audience } : {}
|
|
1513
1571
|
}
|
|
1514
1572
|
}
|
|
1515
1573
|
}),
|
|
@@ -1633,11 +1691,12 @@ async function maybeSyncSearchIndex(adapter, search, context) {
|
|
|
1633
1691
|
async function performDocsSearch(options) {
|
|
1634
1692
|
const search = normalizeDocsSearchConfig(options.search);
|
|
1635
1693
|
if (!search.enabled) return [];
|
|
1636
|
-
const audience = options.audience
|
|
1694
|
+
const audience = resolveDocsSearchAudience(options.audience);
|
|
1637
1695
|
const documents = buildDocsSearchDocuments(options.pages, search.chunking, audience);
|
|
1638
1696
|
const context = {
|
|
1639
1697
|
pages: options.pages,
|
|
1640
1698
|
documents,
|
|
1699
|
+
audience,
|
|
1641
1700
|
locale: options.locale,
|
|
1642
1701
|
pathname: options.pathname,
|
|
1643
1702
|
siteTitle: options.siteTitle,
|
|
@@ -1647,30 +1706,39 @@ async function performDocsSearch(options) {
|
|
|
1647
1706
|
query: options.query,
|
|
1648
1707
|
limit: options.limit ?? search.maxResults,
|
|
1649
1708
|
locale: options.locale,
|
|
1650
|
-
pathname: options.pathname
|
|
1709
|
+
pathname: options.pathname,
|
|
1710
|
+
audience
|
|
1651
1711
|
};
|
|
1652
1712
|
try {
|
|
1653
1713
|
const adapter = await resolveSearchAdapter(search, context);
|
|
1654
1714
|
await maybeSyncSearchIndex(adapter, search, audience === "agent" ? {
|
|
1655
1715
|
...context,
|
|
1656
|
-
documents: buildDocsSearchDocuments(options.pages, search.chunking, "human")
|
|
1716
|
+
documents: buildDocsSearchDocuments(options.pages, search.chunking, "human"),
|
|
1717
|
+
audience: "human"
|
|
1657
1718
|
} : context);
|
|
1658
1719
|
const results = await adapter.search(query, context);
|
|
1659
1720
|
if (search.provider === "simple") return results;
|
|
1660
|
-
const
|
|
1661
|
-
const localAgentProjectionResults = audience === "agent" ? buildAgentProjectionSearchResults(documents) : [];
|
|
1721
|
+
const localAudienceProjectionResults = buildAudienceProjectionSearchResults(documents, options.query);
|
|
1662
1722
|
const localPagePaths = new Set(options.pages.map((page) => normalizeUrlPathname(page.url)));
|
|
1663
|
-
const
|
|
1723
|
+
const preserveUnmatched = audience === "human" || search.provider === "mcp" ? (result) => shouldPreserveUnmatchedExternalResult({
|
|
1664
1724
|
result,
|
|
1665
1725
|
localPagePaths,
|
|
1726
|
+
baseUrl: options.baseUrl
|
|
1727
|
+
}) : void 0;
|
|
1728
|
+
const safeAdapterResults = sanitizeExternalAudienceSearchResults(results.filter((result) => !hasOppositeAudienceEvidence({
|
|
1729
|
+
result,
|
|
1730
|
+
pages: options.pages,
|
|
1731
|
+
query: options.query,
|
|
1732
|
+
audience,
|
|
1666
1733
|
baseUrl: options.baseUrl,
|
|
1667
|
-
strictExternalOrigins: options.strictExternalOrigins
|
|
1668
|
-
})
|
|
1734
|
+
strictExternalOrigins: options.strictExternalOrigins
|
|
1735
|
+
})), localAudienceProjectionResults, options.baseUrl, options.strictExternalOrigins, preserveUnmatched);
|
|
1669
1736
|
if (options.supplementExternalResults === false) return safeAdapterResults.slice(0, query.limit ?? search.maxResults ?? DEFAULT_SEARCH_LIMIT);
|
|
1737
|
+
const simpleAudienceResults = audience === "agent" || results.length === 0 || safeAdapterResults.length < results.length ? await createSimpleSearchAdapter().search(query, context) : [];
|
|
1670
1738
|
const combinedResults = mergeSearchResults([
|
|
1671
1739
|
buildExactPageSearchResults(options.query, options.pages, audience),
|
|
1672
1740
|
safeAdapterResults,
|
|
1673
|
-
|
|
1741
|
+
simpleAudienceResults
|
|
1674
1742
|
], audience === "agent" ? (result) => getAskAIResultKey(result, options.baseUrl, options.strictExternalOrigins) : void 0);
|
|
1675
1743
|
return prioritizeLiteralInsideResults(options.query, combinedResults).slice(0, query.limit ?? search.maxResults ?? DEFAULT_SEARCH_LIMIT);
|
|
1676
1744
|
} catch (error) {
|
|
@@ -1755,4 +1823,4 @@ function createCustomSearchAdapter(adapter) {
|
|
|
1755
1823
|
}
|
|
1756
1824
|
|
|
1757
1825
|
//#endregion
|
|
1758
|
-
export {
|
|
1826
|
+
export { emitDocsTelemetryProjectEvent as A, applySidebarFolderIndexBehavior as C, emitDocsTelemetryAgentSurfaceEvent as D, resolveSidebarFolderIndexBehaviorForPath as E, resolveDocsTelemetryConfig as F, inferDocsTelemetryAgentSurface as M, isLocalDocsTelemetryOrigin as N, emitDocsTelemetryEvent as O, normalizeDocsTelemetryOrigin as P, stripGeneratedAgentProvenance as S, resolveSidebarFolderIndexBehavior as T, GENERATED_AGENT_PROVENANCE_VERSION as _, createMcpSearchAdapter as a, parseGeneratedAgentDocument as b, formatDocsAskAIPackageHints as c, resolveAskAISearchRequestConfig as d, resolveDocsSearchAudience as f, GENERATED_AGENT_PROVENANCE_MARKER as g, parseDocsMarkdownSections as h, createCustomSearchAdapter as i, getDocsTelemetryFeatures as j, emitDocsTelemetryMcpToolEvent as k, inferDocsAskAIPackageHints as l, findDocsMarkdownSection as m, buildDocsSearchDocuments as n, createSimpleSearchAdapter as o, resolveSearchRequestConfig as p, createAlgoliaSearchAdapter as r, createTypesenseSearchAdapter as s, buildDocsAskAIContext as t, performDocsSearch as u, hashGeneratedAgentContent as v, resolvePageSidebarFolderIndexBehavior as w, serializeGeneratedAgentDocument as x, normalizeGeneratedAgentContent as y };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { k as DocsDiscoveryApiRouteOptions } from "./standards-discovery-C4HUqMd2.mjs";
|
|
2
|
-
import { B as DocsAnalyticsEventInput, Dt as DocsObservabilityConfig, F as DocsAgentTraceEventInput, Ht as DocsSearchChunkingConfig, Ot as DocsObservabilityEvent, Pn as ResolvedDocsRelatedLink, R as DocsAnalyticsConfig, Ut as DocsSearchConfig, Vt as DocsSearchAdapterFactory, Wn as TypesenseDocsSearchConfig, Wt as DocsSearchDocument, X as DocsAskAIMcpConfig, Xt as DocsSitemapConfig, Yt as DocsSearchSourcePage, f as CustomDocsSearchConfig, gn as OpenDocsProvider, kt as DocsObservabilityEventInput, pn as McpDocsSearchConfig, qt as DocsSearchResult, r as AlgoliaDocsSearchConfig, yn as OpenDocsTarget, z as DocsAnalyticsEvent, zt as DocsSearchAdapter } from "./types-
|
|
2
|
+
import { B as DocsAnalyticsEventInput, Dt as DocsObservabilityConfig, F as DocsAgentTraceEventInput, Ht as DocsSearchChunkingConfig, Ot as DocsObservabilityEvent, Pn as ResolvedDocsRelatedLink, R as DocsAnalyticsConfig, Ut as DocsSearchConfig, Vt as DocsSearchAdapterFactory, Wn as TypesenseDocsSearchConfig, Wt as DocsSearchDocument, X as DocsAskAIMcpConfig, Xt as DocsSitemapConfig, Yt as DocsSearchSourcePage, f as CustomDocsSearchConfig, gn as OpenDocsProvider, kt as DocsObservabilityEventInput, pn as McpDocsSearchConfig, qt as DocsSearchResult, r as AlgoliaDocsSearchConfig, yn as OpenDocsTarget, z as DocsAnalyticsEvent, zt as DocsSearchAdapter } from "./types-lMBIdZg0.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"];
|
|
@@ -220,6 +220,11 @@ declare function buildDocsSearchDocuments(pages: DocsSearchSourcePage[], chunkin
|
|
|
220
220
|
declare function createSimpleSearchAdapter(): DocsSearchAdapter;
|
|
221
221
|
declare function createTypesenseSearchAdapter(config: TypesenseDocsSearchConfig): DocsSearchAdapter;
|
|
222
222
|
declare function resolveSearchRequestConfig(search: boolean | DocsSearchConfig | undefined, requestUrl?: string): boolean | DocsSearchConfig | undefined;
|
|
223
|
+
/**
|
|
224
|
+
* Resolve the public search audience without allowing malformed values to opt into agent content.
|
|
225
|
+
* Human search remains the default for omitted, legacy, and unknown query values.
|
|
226
|
+
*/
|
|
227
|
+
declare function resolveDocsSearchAudience(value: string | null | undefined): DocsContentAudience;
|
|
223
228
|
declare function resolveAskAISearchRequestConfig(options: {
|
|
224
229
|
search: boolean | DocsSearchConfig | undefined;
|
|
225
230
|
useMcp?: boolean | DocsAskAIMcpConfig;
|
|
@@ -271,4 +276,4 @@ declare function buildDocsAskAIContext(options: {
|
|
|
271
276
|
}): Promise<DocsAskAIContext>;
|
|
272
277
|
declare function createCustomSearchAdapter(adapter: DocsSearchAdapter | DocsSearchAdapterFactory): CustomDocsSearchConfig;
|
|
273
278
|
//#endregion
|
|
274
|
-
export {
|
|
279
|
+
export { resolveDocsAudienceExposure as $, resolveDocsSitemapPageLastmod as A, SerializedOpenDocsProvider as B, DocsSitemapResolvedConfig as C, renderDocsSitemapMarkdown as D, readDocsSitemapManifestFromContentMap as E, DEFAULT_OPEN_DOCS_TARGET as F, serializeDocsIcon as G, parsePromptStringArray as H, DEFAULT_PROMPT_PROVIDER_TEMPLATES as I, serializeOpenDocsProviders as J, serializeDocsIconRegistry as K, PromptAction as L, toDocsSitemapMarkdownUrl as M, DEFAULT_OPEN_DOCS_PROMPT as N, renderDocsSitemapXml as O, DEFAULT_OPEN_DOCS_PROVIDER_IDS as P, resolveDocsAgentMdxContent as Q, PromptProviderChoice as R, DocsSitemapPageInput as S, createDocsSitemapResponse as T, resolvePromptProviderChoices as U, normalizePromptProviderName as V, sanitizePromptText as W, DocsContentAudience as X, DocsAudienceMdxIssue as Y, findDocsAudienceMdxIssues as Z, DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE as _, createMcpSearchAdapter as a, createDocsAgentTraceContext as at, DocsSitemapManifest as b, formatDocsAskAIPackageHints as c, emitDocsAnalyticsEvent as ct, resolveAskAISearchRequestConfig as d, resolveDocsAnalyticsConfig as dt, resolveDocsAudienceMdxContent as et, resolveDocsSearchAudience as f, resolveDocsObservabilityConfig as ft, DEFAULT_SITEMAP_MD_ROUTE as g, DEFAULT_SITEMAP_MD_DOCS_ROUTE as h, createCustomSearchAdapter as i, ResolvedDocsObservabilityConfig as it, resolveDocsSitemapRequest as j, resolveDocsSitemapConfig as k, inferDocsAskAIPackageHints as l, emitDocsObservabilityEvent as lt, DEFAULT_SITEMAP_MANIFEST_PATH as m, buildDocsSearchDocuments as n, DocsAgentTraceContext as nt, createSimpleSearchAdapter as o, createDocsAgentTraceId as ot, resolveSearchRequestConfig as p, serializeOpenDocsProvider as q, createAlgoliaSearchAdapter as r, ResolvedDocsAnalyticsConfig as rt, createTypesenseSearchAdapter as s, emitDocsAgentTraceEvent as st, buildDocsAskAIContext as t, DOCS_AGENT_TRACE_EVENT_TYPES as tt, performDocsSearch as u, getDocsRequestAnalyticsProperties as ut, DEFAULT_SITEMAP_XML_ROUTE as v, buildDocsSitemapManifest as w, DocsSitemapManifestPage as x, DocsSitemapFormat as y, SerializeOpenDocsProviderOptions as z };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "./agent-
|
|
2
|
-
import "./standards-discovery-
|
|
3
|
-
import { n as buildDocsSearchDocuments, r as createAlgoliaSearchAdapter, s as createTypesenseSearchAdapter } from "./search-
|
|
4
|
-
import "./sitemap-server-
|
|
5
|
-
import "./agent-evals-
|
|
1
|
+
import "./agent-DKKptIgy.mjs";
|
|
2
|
+
import "./standards-discovery-jkykaXq1.mjs";
|
|
3
|
+
import { n as buildDocsSearchDocuments, r as createAlgoliaSearchAdapter, s as createTypesenseSearchAdapter } from "./search-B6V6qtiI.mjs";
|
|
4
|
+
import "./sitemap-server-C_6Wes83.mjs";
|
|
5
|
+
import "./agent-evals-B7MIxuEX.mjs";
|
|
6
6
|
import { createFilesystemDocsMcpSource } from "./mcp.mjs";
|
|
7
7
|
import "./code-blocks-DnNVNK2M.mjs";
|
|
8
|
-
import "./agent-skills-server-
|
|
8
|
+
import "./agent-skills-server-DraIb6FV.mjs";
|
|
9
9
|
import "./server.mjs";
|
|
10
10
|
import { _ as resolveDocsContentDir, c as loadProjectEnv, g as resolveDocsConfigPath, h as readTopLevelStringProperty } from "./config-Wcdj-D0a.mjs";
|
|
11
11
|
import { readFileSync } from "node:fs";
|
package/dist/server.d.mts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { A as DocsAgentGoldenTask, B as DocsAnalyticsEventInput, Bt as DocsSearchAdapterContext, C as DocsAgentEvaluationTaskInput, D as DocsAgentGoldenAnswerExpectation, Dt as DocsObservabilityConfig, F as DocsAgentTraceEventInput, I as DocsAgentTraceEventType, J as DocsAskAIFeedbackMessage, K as DocsAskAIFeedbackConfig, Kt as DocsSearchQuery, L as DocsAgentTraceStatus, M as DocsAgentGoldenTaskFilters, Mt as DocsReviewCiMode, Nt as DocsReviewConfig, O as DocsAgentGoldenExampleVerification, Ot as DocsObservabilityEvent, Pt as DocsReviewRulesConfig, R as DocsAnalyticsConfig, S as DocsAgentEvaluationSurface, Ut as DocsSearchConfig, Vt as DocsSearchAdapterFactory, Wt as DocsSearchDocument, X as DocsAskAIMcpConfig, Xt as DocsSitemapConfig, Y as DocsAskAIFeedbackValue, Yt as DocsSearchSourcePage, _ as DocsAgentEvaluationAnswerProvider, a as ApiReferenceRenderer, b as DocsAgentEvaluationAnswerRunner, g as DocsAgentEvaluationAnswerInput, it as DocsCodeBlocksPlannerProvider, j as DocsAgentGoldenTaskExpectation, k as DocsAgentGoldenExpectedExample, kt as DocsObservabilityEventInput, pn as McpDocsSearchConfig, q as DocsAskAIFeedbackData, qt as DocsSearchResult, st as DocsCodeBlocksValidateConfig, ut as DocsConfig, v as DocsAgentEvaluationAnswerRequest, x as DocsAgentEvaluationSourceReference, y as DocsAgentEvaluationAnswerResult, z as DocsAnalyticsEvent, zt as DocsSearchAdapter } from "./types-
|
|
2
|
-
import { n as resolveConfiguredAgentSkills, t as ResolveConfiguredAgentSkillsOptions } from "./agent-skills-server-
|
|
3
|
-
import {
|
|
1
|
+
import { A as DocsAgentGoldenTask, B as DocsAnalyticsEventInput, Bt as DocsSearchAdapterContext, C as DocsAgentEvaluationTaskInput, D as DocsAgentGoldenAnswerExpectation, Dt as DocsObservabilityConfig, F as DocsAgentTraceEventInput, I as DocsAgentTraceEventType, J as DocsAskAIFeedbackMessage, K as DocsAskAIFeedbackConfig, Kt as DocsSearchQuery, L as DocsAgentTraceStatus, M as DocsAgentGoldenTaskFilters, Mt as DocsReviewCiMode, Nt as DocsReviewConfig, O as DocsAgentGoldenExampleVerification, Ot as DocsObservabilityEvent, Pt as DocsReviewRulesConfig, R as DocsAnalyticsConfig, S as DocsAgentEvaluationSurface, Ut as DocsSearchConfig, Vt as DocsSearchAdapterFactory, Wt as DocsSearchDocument, X as DocsAskAIMcpConfig, Xt as DocsSitemapConfig, Y as DocsAskAIFeedbackValue, Yt as DocsSearchSourcePage, _ as DocsAgentEvaluationAnswerProvider, a as ApiReferenceRenderer, b as DocsAgentEvaluationAnswerRunner, g as DocsAgentEvaluationAnswerInput, it as DocsCodeBlocksPlannerProvider, j as DocsAgentGoldenTaskExpectation, k as DocsAgentGoldenExpectedExample, kt as DocsObservabilityEventInput, pn as McpDocsSearchConfig, q as DocsAskAIFeedbackData, qt as DocsSearchResult, st as DocsCodeBlocksValidateConfig, ut as DocsConfig, v as DocsAgentEvaluationAnswerRequest, x as DocsAgentEvaluationSourceReference, y as DocsAgentEvaluationAnswerResult, z as DocsAnalyticsEvent, zt as DocsSearchAdapter } from "./types-lMBIdZg0.mjs";
|
|
2
|
+
import { n as resolveConfiguredAgentSkills, r as resolveConfiguredAgentSkillsSync, t as ResolveConfiguredAgentSkillsOptions } from "./agent-skills-server-CPja6Syt.mjs";
|
|
3
|
+
import { renderDocsAgentSkillsBundle } from "./agent-skills-vite.mjs";
|
|
4
|
+
import { i as isDocsCloudAskAIProvider, n as DocsCloudAskAIResponseOptions, r as createDocsCloudAskAIResponse, t as DocsCloudAskAIConfig } from "./cloud-ask-ai-zpwkdwnF.mjs";
|
|
4
5
|
import { DocsCloudAskAIOptions, DocsCloudPublicConfig, DocsCloudRouteHandlerOptions, DocsCloudRouteHandlers, DocsCloudRuntimeEnv, DocsCloudRuntimeValue, DocsCloudServer, DocsCloudServerOptions, DocsCloudTrackEventOptions, createDocsCloudRouteHandler, createDocsCloudServer } from "./docs-cloud-server.mjs";
|
|
5
|
-
import { A as
|
|
6
|
+
import { A as resolveDocsSitemapPageLastmod, B as SerializedOpenDocsProvider, C as DocsSitemapResolvedConfig, D as renderDocsSitemapMarkdown, E as readDocsSitemapManifestFromContentMap, F as DEFAULT_OPEN_DOCS_TARGET, G as serializeDocsIcon, H as parsePromptStringArray, I as DEFAULT_PROMPT_PROVIDER_TEMPLATES, J as serializeOpenDocsProviders, K as serializeDocsIconRegistry, L as PromptAction, M as toDocsSitemapMarkdownUrl, N as DEFAULT_OPEN_DOCS_PROMPT, O as renderDocsSitemapXml, P as DEFAULT_OPEN_DOCS_PROVIDER_IDS, R as PromptProviderChoice, S as DocsSitemapPageInput, T as createDocsSitemapResponse, U as resolvePromptProviderChoices, V as normalizePromptProviderName, W as sanitizePromptText, _ as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, a as createMcpSearchAdapter, at as createDocsAgentTraceContext, b as DocsSitemapManifest, c as formatDocsAskAIPackageHints, ct as emitDocsAnalyticsEvent, d as resolveAskAISearchRequestConfig, dt as resolveDocsAnalyticsConfig, f as resolveDocsSearchAudience, ft as resolveDocsObservabilityConfig, g as DEFAULT_SITEMAP_MD_ROUTE, h as DEFAULT_SITEMAP_MD_DOCS_ROUTE, i as createCustomSearchAdapter, it as ResolvedDocsObservabilityConfig, j as resolveDocsSitemapRequest, k as resolveDocsSitemapConfig, l as inferDocsAskAIPackageHints, lt as emitDocsObservabilityEvent, m as DEFAULT_SITEMAP_MANIFEST_PATH, n as buildDocsSearchDocuments, nt as DocsAgentTraceContext, o as createSimpleSearchAdapter, ot as createDocsAgentTraceId, p as resolveSearchRequestConfig, q as serializeOpenDocsProvider, r as createAlgoliaSearchAdapter, rt as ResolvedDocsAnalyticsConfig, s as createTypesenseSearchAdapter, st as emitDocsAgentTraceEvent, t as buildDocsAskAIContext, tt as DOCS_AGENT_TRACE_EVENT_TYPES, u as performDocsSearch, ut as getDocsRequestAnalyticsProperties, v as DEFAULT_SITEMAP_XML_ROUTE, w as buildDocsSitemapManifest, x as DocsSitemapManifestPage, y as DocsSitemapFormat, z as SerializeOpenDocsProviderOptions } from "./search-CaSyi6H6.mjs";
|
|
6
7
|
import { CreateDocsMcpServerOptions, DEFAULT_DOCS_MCP_CORS_ALLOWED_HEADERS, DEFAULT_DOCS_MCP_CORS_EXPOSED_HEADERS, DEFAULT_DOCS_MCP_CORS_MAX_AGE_SECONDS, DEFAULT_DOCS_MCP_MAX_BODY_BYTES, DOCS_CONFIG_SCHEMA_OPTIONS, DocsMcpAgentContractSummary, DocsMcpCodeExample, DocsMcpConfigSchema, DocsMcpConfigSchemaOption, DocsMcpContextResult, DocsMcpContextSource, DocsMcpDocsList, DocsMcpDocsPageSummary, DocsMcpDocsSection, DocsMcpHttpHandlers, DocsMcpNavigationNode, DocsMcpNavigationTree, DocsMcpPage, DocsMcpRequestContext, DocsMcpResolvedConfig, DocsMcpResolvedCorsConfig, DocsMcpResolvedProtectedResourceConfig, DocsMcpResolvedSecurityConfig, DocsMcpSource, DocsMcpTaskSummary, createDocsMcpHttpHandler, createDocsMcpServer, createFilesystemDocsMcpSource, getDocsConfigSchema, normalizeDocsMcpRoute, resolveDocsMcpConfig, runDocsMcpStdio } from "./mcp.mjs";
|
|
7
8
|
|
|
8
9
|
//#region src/code-group-mdx.d.ts
|
|
@@ -339,4 +340,4 @@ declare function runDocsGoldenTasks(pages: readonly DocsMcpPage[], tasks: readon
|
|
|
339
340
|
//#region src/sitemap-server.d.ts
|
|
340
341
|
declare function readDocsSitemapManifest(rootDir: string, sitemap?: boolean | DocsSitemapConfig): DocsSitemapManifest | null;
|
|
341
342
|
//#endregion
|
|
342
|
-
export { type ApiReferenceFramework, type ApiReferenceOpenApiDiscovery, type ApiReferenceRenderer, type ApiReferenceRoute, type CreateDocsMcpServerOptions, DEFAULT_API_REFERENCE_OPENAPI_ROUTE, DEFAULT_DOCS_MCP_CORS_ALLOWED_HEADERS, DEFAULT_DOCS_MCP_CORS_EXPOSED_HEADERS, DEFAULT_DOCS_MCP_CORS_MAX_AGE_SECONDS, DEFAULT_DOCS_MCP_MAX_BODY_BYTES, DEFAULT_DOCS_REVIEW_SCORE_THRESHOLD, DEFAULT_DOCS_REVIEW_WORKFLOW_PATH, DEFAULT_OPEN_DOCS_PROMPT, DEFAULT_OPEN_DOCS_PROVIDER_IDS, DEFAULT_OPEN_DOCS_TARGET, DEFAULT_PROMPT_PROVIDER_TEMPLATES, DEFAULT_SITEMAP_MANIFEST_PATH, DEFAULT_SITEMAP_MD_DOCS_ROUTE, DEFAULT_SITEMAP_MD_ROUTE, DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, DEFAULT_SITEMAP_XML_ROUTE, DOCS_AGENT_TRACE_EVENT_TYPES, DOCS_CONFIG_SCHEMA_OPTIONS, type DocsAgentEvaluationAnswerInput, type DocsAgentEvaluationAnswerProvider, type DocsAgentEvaluationAnswerRequest, type DocsAgentEvaluationAnswerResult, type DocsAgentEvaluationAnswerRunner, type DocsAgentEvaluationSourceReference, type DocsAgentEvaluationSurface, type DocsAgentEvaluationTaskInput, type DocsAgentGoldenAnswerExpectation, type DocsAgentGoldenExampleVerification, type DocsAgentTraceContext, type DocsAgentTraceEventInput, type DocsAgentTraceEventType, type DocsAgentTraceStatus, type DocsAnalyticsConfig, type DocsAnalyticsEvent, type DocsAnalyticsEventInput, type DocsAskAIFeedbackConfig, type DocsAskAIFeedbackData, type DocsAskAIFeedbackMessage, type DocsAskAIFeedbackValue, type DocsAskAIMcpConfig, type DocsCloudAskAIConfig, type DocsCloudAskAIOptions, type DocsCloudAskAIResponseOptions, type DocsCloudPublicConfig, type DocsCloudRouteHandlerOptions, type DocsCloudRouteHandlers, type DocsCloudRuntimeEnv, type DocsCloudRuntimeValue, type DocsCloudServer, type DocsCloudServerOptions, type DocsCloudTrackEventOptions, type DocsGoldenAnswerMetrics, type DocsGoldenCitationMetrics, type DocsGoldenEvaluationStatus, type DocsGoldenExampleMetrics, type DocsGoldenExampleResult, type DocsGoldenExpectedExample, type DocsGoldenRetrievalMetrics, type DocsGoldenRetrievedSource, type DocsGoldenSelectionMetrics, type DocsGoldenTask, type DocsGoldenTaskExpectation, type DocsGoldenTaskFilters, type DocsGoldenTaskReport, type DocsGoldenTasksReport, type DocsGoldenUsageMetrics, type DocsMcpAgentContractSummary, type DocsMcpCodeExample, type DocsMcpConfigSchema, type DocsMcpConfigSchemaOption, type DocsMcpContextResult, type DocsMcpContextSource, type DocsMcpDocsList, type DocsMcpDocsPageSummary, type DocsMcpDocsSection, type DocsMcpHttpHandlers, type DocsMcpNavigationNode, type DocsMcpNavigationTree, type DocsMcpPage, type DocsMcpRequestContext, type DocsMcpResolvedConfig, type DocsMcpResolvedCorsConfig, type DocsMcpResolvedProtectedResourceConfig, type DocsMcpResolvedSecurityConfig, type DocsMcpSource, type DocsMcpTaskSummary, type DocsObservabilityConfig, type DocsObservabilityEvent, type DocsObservabilityEventInput, type DocsSearchAdapter, type DocsSearchAdapterContext, type DocsSearchAdapterFactory, type DocsSearchConfig, type DocsSearchDocument, type DocsSearchQuery, type DocsSearchResult, type DocsSearchSourcePage, type DocsSitemapFormat, type DocsSitemapManifest, type DocsSitemapManifestPage, type DocsSitemapPageInput, type DocsSitemapResolvedConfig, type McpDocsSearchConfig, type PromptAction, type PromptProviderChoice, type ResolveConfiguredAgentSkillsOptions, type ResolvedApiReferenceConfig, type ResolvedDocsAnalyticsConfig, type ResolvedDocsObservabilityConfig, type ResolvedDocsReviewConfig, type RunDocsGoldenTasksOptions, type SerializeOpenDocsProviderOptions, type SerializedOpenDocsProvider, buildApiReferenceHtmlDocument, buildApiReferenceHtmlDocumentAsync, buildApiReferenceOpenApiDocument, buildApiReferenceOpenApiDocumentAsync, buildApiReferencePageTitle, buildApiReferenceScalarCss, buildDocsAskAIContext, buildDocsReviewWorkflow, buildDocsReviewWorkflowPathFilters, buildDocsSearchDocuments, buildDocsSitemapManifest, createAlgoliaSearchAdapter, createCustomSearchAdapter, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsCloudAskAIResponse, createDocsCloudRouteHandler, createDocsCloudServer, createDocsMcpHttpHandler, createDocsMcpServer, createDocsSitemapResponse, createFilesystemDocsMcpSource, createMcpSearchAdapter, createSimpleSearchAdapter, createTypesenseSearchAdapter, emitDocsAgentTraceEvent, emitDocsAnalyticsEvent, emitDocsObservabilityEvent, ensureDocsReviewWorkflow, formatDocsAskAIPackageHints, getDocsConfigSchema, getDocsRequestAnalyticsProperties, inferDocsAskAIPackageHints, isApiReferenceOpenApiRequest, isDocsCloudAskAIProvider, normalizeDocsMcpRoute, normalizePromptProviderName, parsePromptStringArray, performDocsSearch, readDocsReviewConfigFromSource, readDocsSitemapManifest, readDocsSitemapManifestFromContentMap, remarkCodeGroup, renderDocsSitemapMarkdown, renderDocsSitemapXml, resolveApiReferenceConfig, resolveApiReferenceOpenApiDiscovery, resolveApiReferenceRenderer, resolveAskAISearchRequestConfig, resolveConfiguredAgentSkills, resolveDocsAnalyticsConfig, resolveDocsMcpConfig, resolveDocsObservabilityConfig, resolveDocsReviewConfig, resolveDocsSitemapConfig, resolveDocsSitemapPageLastmod, resolveDocsSitemapRequest, resolvePromptProviderChoices, resolveSearchRequestConfig, runDocsGoldenTasks, runDocsMcpStdio, sanitizePromptText, serializeDocsIcon, serializeDocsIconRegistry, serializeOpenDocsProvider, serializeOpenDocsProviders, toDocsSitemapMarkdownUrl };
|
|
343
|
+
export { type ApiReferenceFramework, type ApiReferenceOpenApiDiscovery, type ApiReferenceRenderer, type ApiReferenceRoute, type CreateDocsMcpServerOptions, DEFAULT_API_REFERENCE_OPENAPI_ROUTE, DEFAULT_DOCS_MCP_CORS_ALLOWED_HEADERS, DEFAULT_DOCS_MCP_CORS_EXPOSED_HEADERS, DEFAULT_DOCS_MCP_CORS_MAX_AGE_SECONDS, DEFAULT_DOCS_MCP_MAX_BODY_BYTES, DEFAULT_DOCS_REVIEW_SCORE_THRESHOLD, DEFAULT_DOCS_REVIEW_WORKFLOW_PATH, DEFAULT_OPEN_DOCS_PROMPT, DEFAULT_OPEN_DOCS_PROVIDER_IDS, DEFAULT_OPEN_DOCS_TARGET, DEFAULT_PROMPT_PROVIDER_TEMPLATES, DEFAULT_SITEMAP_MANIFEST_PATH, DEFAULT_SITEMAP_MD_DOCS_ROUTE, DEFAULT_SITEMAP_MD_ROUTE, DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, DEFAULT_SITEMAP_XML_ROUTE, DOCS_AGENT_TRACE_EVENT_TYPES, DOCS_CONFIG_SCHEMA_OPTIONS, type DocsAgentEvaluationAnswerInput, type DocsAgentEvaluationAnswerProvider, type DocsAgentEvaluationAnswerRequest, type DocsAgentEvaluationAnswerResult, type DocsAgentEvaluationAnswerRunner, type DocsAgentEvaluationSourceReference, type DocsAgentEvaluationSurface, type DocsAgentEvaluationTaskInput, type DocsAgentGoldenAnswerExpectation, type DocsAgentGoldenExampleVerification, type DocsAgentTraceContext, type DocsAgentTraceEventInput, type DocsAgentTraceEventType, type DocsAgentTraceStatus, type DocsAnalyticsConfig, type DocsAnalyticsEvent, type DocsAnalyticsEventInput, type DocsAskAIFeedbackConfig, type DocsAskAIFeedbackData, type DocsAskAIFeedbackMessage, type DocsAskAIFeedbackValue, type DocsAskAIMcpConfig, type DocsCloudAskAIConfig, type DocsCloudAskAIOptions, type DocsCloudAskAIResponseOptions, type DocsCloudPublicConfig, type DocsCloudRouteHandlerOptions, type DocsCloudRouteHandlers, type DocsCloudRuntimeEnv, type DocsCloudRuntimeValue, type DocsCloudServer, type DocsCloudServerOptions, type DocsCloudTrackEventOptions, type DocsGoldenAnswerMetrics, type DocsGoldenCitationMetrics, type DocsGoldenEvaluationStatus, type DocsGoldenExampleMetrics, type DocsGoldenExampleResult, type DocsGoldenExpectedExample, type DocsGoldenRetrievalMetrics, type DocsGoldenRetrievedSource, type DocsGoldenSelectionMetrics, type DocsGoldenTask, type DocsGoldenTaskExpectation, type DocsGoldenTaskFilters, type DocsGoldenTaskReport, type DocsGoldenTasksReport, type DocsGoldenUsageMetrics, type DocsMcpAgentContractSummary, type DocsMcpCodeExample, type DocsMcpConfigSchema, type DocsMcpConfigSchemaOption, type DocsMcpContextResult, type DocsMcpContextSource, type DocsMcpDocsList, type DocsMcpDocsPageSummary, type DocsMcpDocsSection, type DocsMcpHttpHandlers, type DocsMcpNavigationNode, type DocsMcpNavigationTree, type DocsMcpPage, type DocsMcpRequestContext, type DocsMcpResolvedConfig, type DocsMcpResolvedCorsConfig, type DocsMcpResolvedProtectedResourceConfig, type DocsMcpResolvedSecurityConfig, type DocsMcpSource, type DocsMcpTaskSummary, type DocsObservabilityConfig, type DocsObservabilityEvent, type DocsObservabilityEventInput, type DocsSearchAdapter, type DocsSearchAdapterContext, type DocsSearchAdapterFactory, type DocsSearchConfig, type DocsSearchDocument, type DocsSearchQuery, type DocsSearchResult, type DocsSearchSourcePage, type DocsSitemapFormat, type DocsSitemapManifest, type DocsSitemapManifestPage, type DocsSitemapPageInput, type DocsSitemapResolvedConfig, type McpDocsSearchConfig, type PromptAction, type PromptProviderChoice, type ResolveConfiguredAgentSkillsOptions, type ResolvedApiReferenceConfig, type ResolvedDocsAnalyticsConfig, type ResolvedDocsObservabilityConfig, type ResolvedDocsReviewConfig, type RunDocsGoldenTasksOptions, type SerializeOpenDocsProviderOptions, type SerializedOpenDocsProvider, buildApiReferenceHtmlDocument, buildApiReferenceHtmlDocumentAsync, buildApiReferenceOpenApiDocument, buildApiReferenceOpenApiDocumentAsync, buildApiReferencePageTitle, buildApiReferenceScalarCss, buildDocsAskAIContext, buildDocsReviewWorkflow, buildDocsReviewWorkflowPathFilters, buildDocsSearchDocuments, buildDocsSitemapManifest, createAlgoliaSearchAdapter, createCustomSearchAdapter, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsCloudAskAIResponse, createDocsCloudRouteHandler, createDocsCloudServer, createDocsMcpHttpHandler, createDocsMcpServer, createDocsSitemapResponse, createFilesystemDocsMcpSource, createMcpSearchAdapter, createSimpleSearchAdapter, createTypesenseSearchAdapter, emitDocsAgentTraceEvent, emitDocsAnalyticsEvent, emitDocsObservabilityEvent, ensureDocsReviewWorkflow, formatDocsAskAIPackageHints, getDocsConfigSchema, getDocsRequestAnalyticsProperties, inferDocsAskAIPackageHints, isApiReferenceOpenApiRequest, isDocsCloudAskAIProvider, normalizeDocsMcpRoute, normalizePromptProviderName, parsePromptStringArray, performDocsSearch, readDocsReviewConfigFromSource, readDocsSitemapManifest, readDocsSitemapManifestFromContentMap, remarkCodeGroup, renderDocsAgentSkillsBundle, renderDocsSitemapMarkdown, renderDocsSitemapXml, resolveApiReferenceConfig, resolveApiReferenceOpenApiDiscovery, resolveApiReferenceRenderer, resolveAskAISearchRequestConfig, resolveConfiguredAgentSkills, resolveConfiguredAgentSkillsSync, resolveDocsAnalyticsConfig, resolveDocsMcpConfig, resolveDocsObservabilityConfig, resolveDocsReviewConfig, resolveDocsSearchAudience, resolveDocsSitemapConfig, resolveDocsSitemapPageLastmod, resolveDocsSitemapRequest, resolvePromptProviderChoices, resolveSearchRequestConfig, runDocsGoldenTasks, runDocsMcpStdio, sanitizePromptText, serializeDocsIcon, serializeDocsIconRegistry, serializeOpenDocsProvider, serializeOpenDocsProviders, toDocsSitemapMarkdownUrl };
|
package/dist/server.mjs
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { a as emitDocsAnalyticsEvent, c as resolveDocsAnalyticsConfig, i as emitDocsAgentTraceEvent, l as resolveDocsObservabilityConfig, n as createDocsAgentTraceContext, o as emitDocsObservabilityEvent, r as createDocsAgentTraceId, s as getDocsRequestAnalyticsProperties, t as DOCS_AGENT_TRACE_EVENT_TYPES } from "./analytics-Bx44lg6d.mjs";
|
|
2
|
-
import { At as buildDocsSitemapManifest, Dt as DEFAULT_SITEMAP_MD_ROUTE, Et as DEFAULT_SITEMAP_MD_DOCS_ROUTE, Ft as resolveDocsSitemapConfig, It as resolveDocsSitemapPageLastmod, Lt as resolveDocsSitemapRequest, Mt as readDocsSitemapManifestFromContentMap, Nt as renderDocsSitemapMarkdown, Ot as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, Pt as renderDocsSitemapXml, Rt as toDocsSitemapMarkdownUrl, Tt as DEFAULT_SITEMAP_MANIFEST_PATH, jt as createDocsSitemapResponse, kt as DEFAULT_SITEMAP_XML_ROUTE } from "./agent-
|
|
3
|
-
import "./standards-discovery-
|
|
4
|
-
import { a as createMcpSearchAdapter, c as formatDocsAskAIPackageHints, d as resolveAskAISearchRequestConfig, f as
|
|
5
|
-
import { C as resolveApiReferenceOpenApiDiscovery, S as resolveApiReferenceConfig, T as remarkCodeGroup, _ as buildApiReferenceOpenApiDocument, a as DEFAULT_PROMPT_PROVIDER_TEMPLATES, b as buildApiReferenceScalarCss, c as resolvePromptProviderChoices, d as serializeDocsIconRegistry, f as serializeOpenDocsProvider, g as buildApiReferenceHtmlDocumentAsync, h as buildApiReferenceHtmlDocument, i as DEFAULT_OPEN_DOCS_TARGET, l as sanitizePromptText, m as DEFAULT_API_REFERENCE_OPENAPI_ROUTE, n as DEFAULT_OPEN_DOCS_PROMPT, o as normalizePromptProviderName, p as serializeOpenDocsProviders, r as DEFAULT_OPEN_DOCS_PROVIDER_IDS, s as parsePromptStringArray, t as readDocsSitemapManifest, u as serializeDocsIcon, v as buildApiReferenceOpenApiDocumentAsync, w as resolveApiReferenceRenderer, x as isApiReferenceOpenApiRequest, y as buildApiReferencePageTitle } from "./sitemap-server-
|
|
6
|
-
import { a as buildDocsReviewWorkflowPathFilters, c as resolveDocsReviewConfig, i as buildDocsReviewWorkflow, n as DEFAULT_DOCS_REVIEW_SCORE_THRESHOLD, o as ensureDocsReviewWorkflow, r as DEFAULT_DOCS_REVIEW_WORKFLOW_PATH, s as readDocsReviewConfigFromSource, t as runDocsGoldenTasks } from "./agent-evals-
|
|
2
|
+
import { At as buildDocsSitemapManifest, Dt as DEFAULT_SITEMAP_MD_ROUTE, Et as DEFAULT_SITEMAP_MD_DOCS_ROUTE, Ft as resolveDocsSitemapConfig, It as resolveDocsSitemapPageLastmod, Lt as resolveDocsSitemapRequest, Mt as readDocsSitemapManifestFromContentMap, Nt as renderDocsSitemapMarkdown, Ot as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, Pt as renderDocsSitemapXml, Rt as toDocsSitemapMarkdownUrl, Tt as DEFAULT_SITEMAP_MANIFEST_PATH, jt as createDocsSitemapResponse, kt as DEFAULT_SITEMAP_XML_ROUTE } from "./agent-DKKptIgy.mjs";
|
|
3
|
+
import "./standards-discovery-jkykaXq1.mjs";
|
|
4
|
+
import { a as createMcpSearchAdapter, c as formatDocsAskAIPackageHints, d as resolveAskAISearchRequestConfig, f as resolveDocsSearchAudience, i as createCustomSearchAdapter, l as inferDocsAskAIPackageHints, n as buildDocsSearchDocuments, o as createSimpleSearchAdapter, p as resolveSearchRequestConfig, r as createAlgoliaSearchAdapter, s as createTypesenseSearchAdapter, t as buildDocsAskAIContext, u as performDocsSearch } from "./search-B6V6qtiI.mjs";
|
|
5
|
+
import { C as resolveApiReferenceOpenApiDiscovery, S as resolveApiReferenceConfig, T as remarkCodeGroup, _ as buildApiReferenceOpenApiDocument, a as DEFAULT_PROMPT_PROVIDER_TEMPLATES, b as buildApiReferenceScalarCss, c as resolvePromptProviderChoices, d as serializeDocsIconRegistry, f as serializeOpenDocsProvider, g as buildApiReferenceHtmlDocumentAsync, h as buildApiReferenceHtmlDocument, i as DEFAULT_OPEN_DOCS_TARGET, l as sanitizePromptText, m as DEFAULT_API_REFERENCE_OPENAPI_ROUTE, n as DEFAULT_OPEN_DOCS_PROMPT, o as normalizePromptProviderName, p as serializeOpenDocsProviders, r as DEFAULT_OPEN_DOCS_PROVIDER_IDS, s as parsePromptStringArray, t as readDocsSitemapManifest, u as serializeDocsIcon, v as buildApiReferenceOpenApiDocumentAsync, w as resolveApiReferenceRenderer, x as isApiReferenceOpenApiRequest, y as buildApiReferencePageTitle } from "./sitemap-server-C_6Wes83.mjs";
|
|
6
|
+
import { a as buildDocsReviewWorkflowPathFilters, c as resolveDocsReviewConfig, i as buildDocsReviewWorkflow, n as DEFAULT_DOCS_REVIEW_SCORE_THRESHOLD, o as ensureDocsReviewWorkflow, r as DEFAULT_DOCS_REVIEW_WORKFLOW_PATH, s as readDocsReviewConfigFromSource, t as runDocsGoldenTasks } from "./agent-evals-B7MIxuEX.mjs";
|
|
7
7
|
import { DEFAULT_DOCS_MCP_CORS_ALLOWED_HEADERS, DEFAULT_DOCS_MCP_CORS_EXPOSED_HEADERS, DEFAULT_DOCS_MCP_CORS_MAX_AGE_SECONDS, DEFAULT_DOCS_MCP_MAX_BODY_BYTES, DOCS_CONFIG_SCHEMA_OPTIONS, createDocsMcpHttpHandler, createDocsMcpServer, createFilesystemDocsMcpSource, getDocsConfigSchema, normalizeDocsMcpRoute, resolveDocsMcpConfig, runDocsMcpStdio } from "./mcp.mjs";
|
|
8
8
|
import { n as isDocsCloudAskAIProvider, t as createDocsCloudAskAIResponse } from "./cloud-ask-ai-sbpjOR2K.mjs";
|
|
9
9
|
import { createDocsCloudRouteHandler, createDocsCloudServer } from "./docs-cloud-server.mjs";
|
|
10
10
|
import "./code-blocks-DnNVNK2M.mjs";
|
|
11
|
-
import { t as resolveConfiguredAgentSkills } from "./agent-skills-server-
|
|
11
|
+
import { n as resolveConfiguredAgentSkillsSync, t as resolveConfiguredAgentSkills } from "./agent-skills-server-DraIb6FV.mjs";
|
|
12
|
+
import { renderDocsAgentSkillsBundle } from "./agent-skills-vite.mjs";
|
|
12
13
|
|
|
13
|
-
export { DEFAULT_API_REFERENCE_OPENAPI_ROUTE, DEFAULT_DOCS_MCP_CORS_ALLOWED_HEADERS, DEFAULT_DOCS_MCP_CORS_EXPOSED_HEADERS, DEFAULT_DOCS_MCP_CORS_MAX_AGE_SECONDS, DEFAULT_DOCS_MCP_MAX_BODY_BYTES, DEFAULT_DOCS_REVIEW_SCORE_THRESHOLD, DEFAULT_DOCS_REVIEW_WORKFLOW_PATH, DEFAULT_OPEN_DOCS_PROMPT, DEFAULT_OPEN_DOCS_PROVIDER_IDS, DEFAULT_OPEN_DOCS_TARGET, DEFAULT_PROMPT_PROVIDER_TEMPLATES, DEFAULT_SITEMAP_MANIFEST_PATH, DEFAULT_SITEMAP_MD_DOCS_ROUTE, DEFAULT_SITEMAP_MD_ROUTE, DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, DEFAULT_SITEMAP_XML_ROUTE, DOCS_AGENT_TRACE_EVENT_TYPES, DOCS_CONFIG_SCHEMA_OPTIONS, buildApiReferenceHtmlDocument, buildApiReferenceHtmlDocumentAsync, buildApiReferenceOpenApiDocument, buildApiReferenceOpenApiDocumentAsync, buildApiReferencePageTitle, buildApiReferenceScalarCss, buildDocsAskAIContext, buildDocsReviewWorkflow, buildDocsReviewWorkflowPathFilters, buildDocsSearchDocuments, buildDocsSitemapManifest, createAlgoliaSearchAdapter, createCustomSearchAdapter, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsCloudAskAIResponse, createDocsCloudRouteHandler, createDocsCloudServer, createDocsMcpHttpHandler, createDocsMcpServer, createDocsSitemapResponse, createFilesystemDocsMcpSource, createMcpSearchAdapter, createSimpleSearchAdapter, createTypesenseSearchAdapter, emitDocsAgentTraceEvent, emitDocsAnalyticsEvent, emitDocsObservabilityEvent, ensureDocsReviewWorkflow, formatDocsAskAIPackageHints, getDocsConfigSchema, getDocsRequestAnalyticsProperties, inferDocsAskAIPackageHints, isApiReferenceOpenApiRequest, isDocsCloudAskAIProvider, normalizeDocsMcpRoute, normalizePromptProviderName, parsePromptStringArray, performDocsSearch, readDocsReviewConfigFromSource, readDocsSitemapManifest, readDocsSitemapManifestFromContentMap, remarkCodeGroup, renderDocsSitemapMarkdown, renderDocsSitemapXml, resolveApiReferenceConfig, resolveApiReferenceOpenApiDiscovery, resolveApiReferenceRenderer, resolveAskAISearchRequestConfig, resolveConfiguredAgentSkills, resolveDocsAnalyticsConfig, resolveDocsMcpConfig, resolveDocsObservabilityConfig, resolveDocsReviewConfig, resolveDocsSitemapConfig, resolveDocsSitemapPageLastmod, resolveDocsSitemapRequest, resolvePromptProviderChoices, resolveSearchRequestConfig, runDocsGoldenTasks, runDocsMcpStdio, sanitizePromptText, serializeDocsIcon, serializeDocsIconRegistry, serializeOpenDocsProvider, serializeOpenDocsProviders, toDocsSitemapMarkdownUrl };
|
|
14
|
+
export { DEFAULT_API_REFERENCE_OPENAPI_ROUTE, DEFAULT_DOCS_MCP_CORS_ALLOWED_HEADERS, DEFAULT_DOCS_MCP_CORS_EXPOSED_HEADERS, DEFAULT_DOCS_MCP_CORS_MAX_AGE_SECONDS, DEFAULT_DOCS_MCP_MAX_BODY_BYTES, DEFAULT_DOCS_REVIEW_SCORE_THRESHOLD, DEFAULT_DOCS_REVIEW_WORKFLOW_PATH, DEFAULT_OPEN_DOCS_PROMPT, DEFAULT_OPEN_DOCS_PROVIDER_IDS, DEFAULT_OPEN_DOCS_TARGET, DEFAULT_PROMPT_PROVIDER_TEMPLATES, DEFAULT_SITEMAP_MANIFEST_PATH, DEFAULT_SITEMAP_MD_DOCS_ROUTE, DEFAULT_SITEMAP_MD_ROUTE, DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, DEFAULT_SITEMAP_XML_ROUTE, DOCS_AGENT_TRACE_EVENT_TYPES, DOCS_CONFIG_SCHEMA_OPTIONS, buildApiReferenceHtmlDocument, buildApiReferenceHtmlDocumentAsync, buildApiReferenceOpenApiDocument, buildApiReferenceOpenApiDocumentAsync, buildApiReferencePageTitle, buildApiReferenceScalarCss, buildDocsAskAIContext, buildDocsReviewWorkflow, buildDocsReviewWorkflowPathFilters, buildDocsSearchDocuments, buildDocsSitemapManifest, createAlgoliaSearchAdapter, createCustomSearchAdapter, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsCloudAskAIResponse, createDocsCloudRouteHandler, createDocsCloudServer, createDocsMcpHttpHandler, createDocsMcpServer, createDocsSitemapResponse, createFilesystemDocsMcpSource, createMcpSearchAdapter, createSimpleSearchAdapter, createTypesenseSearchAdapter, emitDocsAgentTraceEvent, emitDocsAnalyticsEvent, emitDocsObservabilityEvent, ensureDocsReviewWorkflow, formatDocsAskAIPackageHints, getDocsConfigSchema, getDocsRequestAnalyticsProperties, inferDocsAskAIPackageHints, isApiReferenceOpenApiRequest, isDocsCloudAskAIProvider, normalizeDocsMcpRoute, normalizePromptProviderName, parsePromptStringArray, performDocsSearch, readDocsReviewConfigFromSource, readDocsSitemapManifest, readDocsSitemapManifestFromContentMap, remarkCodeGroup, renderDocsAgentSkillsBundle, renderDocsSitemapMarkdown, renderDocsSitemapXml, resolveApiReferenceConfig, resolveApiReferenceOpenApiDiscovery, resolveApiReferenceRenderer, resolveAskAISearchRequestConfig, resolveConfiguredAgentSkills, resolveConfiguredAgentSkillsSync, resolveDocsAnalyticsConfig, resolveDocsMcpConfig, resolveDocsObservabilityConfig, resolveDocsReviewConfig, resolveDocsSearchAudience, resolveDocsSitemapConfig, resolveDocsSitemapPageLastmod, resolveDocsSitemapRequest, resolvePromptProviderChoices, resolveSearchRequestConfig, runDocsGoldenTasks, runDocsMcpStdio, sanitizePromptText, serializeDocsIcon, serializeDocsIconRegistry, serializeOpenDocsProvider, serializeOpenDocsProviders, toDocsSitemapMarkdownUrl };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { At as buildDocsSitemapManifest, Ft as resolveDocsSitemapConfig, Nt as renderDocsSitemapMarkdown, Pt as renderDocsSitemapXml } from "./agent-
|
|
2
|
-
import "./standards-discovery-
|
|
3
|
-
import "./search-
|
|
4
|
-
import "./sitemap-server-
|
|
5
|
-
import "./agent-evals-
|
|
1
|
+
import { At as buildDocsSitemapManifest, Ft as resolveDocsSitemapConfig, Nt as renderDocsSitemapMarkdown, Pt as renderDocsSitemapXml } from "./agent-DKKptIgy.mjs";
|
|
2
|
+
import "./standards-discovery-jkykaXq1.mjs";
|
|
3
|
+
import "./search-B6V6qtiI.mjs";
|
|
4
|
+
import "./sitemap-server-C_6Wes83.mjs";
|
|
5
|
+
import "./agent-evals-B7MIxuEX.mjs";
|
|
6
6
|
import { createFilesystemDocsMcpSource } from "./mcp.mjs";
|
|
7
7
|
import "./code-blocks-DnNVNK2M.mjs";
|
|
8
|
-
import "./agent-skills-server-
|
|
8
|
+
import "./agent-skills-server-DraIb6FV.mjs";
|
|
9
9
|
import "./server.mjs";
|
|
10
10
|
import { _ as resolveDocsContentDir, a as loadDocsConfigModule, d as readNavTitle, g as resolveDocsConfigPath, h as readTopLevelStringProperty, l as readBooleanProperty, p as readStringProperty, t as extractNestedObjectLiteral } from "./config-Wcdj-D0a.mjs";
|
|
11
11
|
import { t as detectFramework } from "./utils-DpiIioYb.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ft as resolveDocsSitemapConfig } from "./agent-
|
|
1
|
+
import { Ft as resolveDocsSitemapConfig } from "./agent-DKKptIgy.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
4
4
|
import path, { basename, join, relative } from "node:path";
|
|
@@ -150,14 +150,7 @@ async function sha256DocsDiscoveryContent(content) {
|
|
|
150
150
|
const digest = await subtle.digest("SHA-256", toDiscoveryBytes(content));
|
|
151
151
|
return [...new Uint8Array(digest)].map((value) => value.toString(16).padStart(2, "0")).join("");
|
|
152
152
|
}
|
|
153
|
-
|
|
154
|
-
async function resolveDocsPublishedAgentSkill({ preferredDocument, fallbackDocument }) {
|
|
155
|
-
const preferredMetadata = preferredDocument ? readAgentSkillFrontmatter(preferredDocument) : null;
|
|
156
|
-
const fallbackMetadata = readAgentSkillFrontmatter(fallbackDocument);
|
|
157
|
-
const content = preferredMetadata ? preferredDocument : fallbackDocument;
|
|
158
|
-
const metadata = preferredMetadata ?? fallbackMetadata;
|
|
159
|
-
if (!metadata) throw new Error("The generated Agent Skills fallback must contain valid name and description frontmatter.");
|
|
160
|
-
const sha256 = await sha256DocsDiscoveryContent(content);
|
|
153
|
+
function createDocsPublishedAgentSkill(content, metadata, sha256) {
|
|
161
154
|
return {
|
|
162
155
|
name: metadata.name,
|
|
163
156
|
type: "skill-md",
|
|
@@ -177,6 +170,22 @@ async function resolveDocsPublishedAgentSkill({ preferredDocument, fallbackDocum
|
|
|
177
170
|
}]
|
|
178
171
|
};
|
|
179
172
|
}
|
|
173
|
+
/** Build a published skill from an exact SKILL.md document and its precomputed SHA-256. */
|
|
174
|
+
function buildDocsPublishedAgentSkill(document, sha256) {
|
|
175
|
+
const metadata = readAgentSkillFrontmatter(document);
|
|
176
|
+
if (!metadata) throw new Error("The generated Agent Skills fallback must contain valid name and description frontmatter.");
|
|
177
|
+
if (!/^[a-f0-9]{64}$/.test(sha256)) throw new Error("Agent Skill SHA-256 must be a lowercase 64-character hexadecimal digest.");
|
|
178
|
+
return createDocsPublishedAgentSkill(document, metadata, sha256);
|
|
179
|
+
}
|
|
180
|
+
/** Select a valid public skill and hash the exact bytes returned by its standards route. */
|
|
181
|
+
async function resolveDocsPublishedAgentSkill({ preferredDocument, fallbackDocument }) {
|
|
182
|
+
const preferredMetadata = preferredDocument ? readAgentSkillFrontmatter(preferredDocument) : null;
|
|
183
|
+
const fallbackMetadata = readAgentSkillFrontmatter(fallbackDocument);
|
|
184
|
+
const content = preferredMetadata ? preferredDocument : fallbackDocument;
|
|
185
|
+
const metadata = preferredMetadata ?? fallbackMetadata;
|
|
186
|
+
if (!metadata) throw new Error("The generated Agent Skills fallback must contain valid name and description frontmatter.");
|
|
187
|
+
return createDocsPublishedAgentSkill(content, metadata, await sha256DocsDiscoveryContent(content));
|
|
188
|
+
}
|
|
180
189
|
function buildDocsAgentSkillsIndex(skills) {
|
|
181
190
|
return {
|
|
182
191
|
$schema: AGENT_SKILLS_DISCOVERY_SCHEMA_URI,
|
|
@@ -507,4 +516,4 @@ async function createDocsStandardsResponse({ request, apiCatalog, apiCatalogEnab
|
|
|
507
516
|
}
|
|
508
517
|
|
|
509
518
|
//#endregion
|
|
510
|
-
export {
|
|
519
|
+
export { resolveDocsPublishedAgentSkill as A, buildDocsApiCatalog as C, getDocsDiscoveryLinkHeader as D, createDocsStandardsResponse as E, sha256DocsDiscoveryContent as M, isDocsStandardsDiscoveryRequest as O, buildDocsAgentSkillsIndex as S, buildDocsPublishedAgentSkill as T, DEFAULT_LEGACY_SKILLS_INDEX_FORMAT as _, DEFAULT_A2A_AGENT_CARD_ROUTE as a, appendDocsDiscoveryLinkHeader as b, DEFAULT_AGENT_SKILLS_INDEX_ROUTE as c, DEFAULT_AGENT_SKILL_ARCHIVE_FORMAT as d, DEFAULT_AGENT_SKILL_FILE_FORMAT as f, DEFAULT_API_CATALOG_ROUTE as g, DEFAULT_API_CATALOG_FORMAT as h, DEFAULT_A2A_AGENT_CARD_FORMAT as i, resolveDocsStandardsDiscoveryRequest as j, resolveDocsDiscoveryApiRoute as k, DEFAULT_AGENT_SKILLS_ROUTE_PATTERN as l, DEFAULT_AGENT_SKILL_RESOURCE_FORMAT as m, API_CATALOG_MEDIA_TYPE as n, DEFAULT_AGENT_SKILLS_ARCHIVE_ROUTE_PATTERN as o, DEFAULT_AGENT_SKILL_FORMAT as p, API_CATALOG_PROFILE_URI as r, DEFAULT_AGENT_SKILLS_INDEX_FORMAT as s, AGENT_SKILLS_DISCOVERY_SCHEMA_URI as t, DEFAULT_AGENT_SKILLS_ROUTE_PREFIX as u, DEFAULT_LEGACY_SKILLS_INDEX_ROUTE as v, buildDocsLegacySkillsIndex as w, buildDocsA2AAgentCard as x, DEFAULT_LEGACY_SKILLS_ROUTE_PREFIX as y };
|
|
@@ -1364,10 +1364,14 @@ interface DocsSearchQuery {
|
|
|
1364
1364
|
limit?: number;
|
|
1365
1365
|
locale?: string;
|
|
1366
1366
|
pathname?: string;
|
|
1367
|
+
/** Requested content projection. Omitted callers retain the human-search default. */
|
|
1368
|
+
audience?: "human" | "agent";
|
|
1367
1369
|
}
|
|
1368
1370
|
interface DocsSearchAdapterContext {
|
|
1369
1371
|
pages: DocsSearchSourcePage[];
|
|
1370
1372
|
documents: DocsSearchDocument[];
|
|
1373
|
+
/** Resolved content projection supplied to this adapter. */
|
|
1374
|
+
audience?: "human" | "agent";
|
|
1371
1375
|
locale?: string;
|
|
1372
1376
|
pathname?: string;
|
|
1373
1377
|
siteTitle?: string;
|
|
@@ -1449,6 +1453,12 @@ interface McpDocsSearchConfig {
|
|
|
1449
1453
|
* MCP tool name used for search. Defaults to `search_docs`.
|
|
1450
1454
|
*/
|
|
1451
1455
|
toolName?: string;
|
|
1456
|
+
/**
|
|
1457
|
+
* Forward the resolved human/agent projection as the tool's `audience` argument.
|
|
1458
|
+
* HTTP request resolution enables this for same-origin `search_docs` routes.
|
|
1459
|
+
* Remote and custom tools must opt in explicitly after supporting the argument.
|
|
1460
|
+
*/
|
|
1461
|
+
forwardAudience?: boolean;
|
|
1452
1462
|
/**
|
|
1453
1463
|
* Override the MCP protocol version header when needed.
|
|
1454
1464
|
*/
|
package/package.json
CHANGED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { A as DocsPublishedAgentSkill } from "./standards-discovery-C4HUqMd2.mjs";
|
|
2
|
-
import { P as DocsAgentSkillsInput } from "./types-EhFhYGfr.mjs";
|
|
3
|
-
|
|
4
|
-
//#region src/agent-skills-server.d.ts
|
|
5
|
-
interface ResolveConfiguredAgentSkillsOptions {
|
|
6
|
-
rootDir?: string;
|
|
7
|
-
workspaceRoot?: string;
|
|
8
|
-
}
|
|
9
|
-
/** Resolve and safely package all project skills configured through `agent.skills`. */
|
|
10
|
-
declare function resolveConfiguredAgentSkills(input: DocsAgentSkillsInput | undefined, options?: ResolveConfiguredAgentSkillsOptions): Promise<DocsPublishedAgentSkill[]>;
|
|
11
|
-
//#endregion
|
|
12
|
-
export { resolveConfiguredAgentSkills as n, ResolveConfiguredAgentSkillsOptions as t };
|