@farming-labs/docs 0.2.57 → 0.2.59
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-CxDzPqtl.mjs → agent-BFqyqEnC.mjs} +557 -71
- package/dist/{agent-v6R0V3lm.mjs → agent-DlxriaTs.mjs} +3 -3
- package/dist/agent-evals-kJs2Y9xR.mjs +2144 -0
- package/dist/{agent-export-CZR20g0e.mjs → agent-export-BgUaiW8f.mjs} +20 -10
- package/dist/{agents-BPonjolo.mjs → agents-Djh-HXih.mjs} +15 -7
- package/dist/cli/index.mjs +29 -29
- package/dist/client/react.d.mts +1 -1
- package/dist/{cloud-C45jpBtp.mjs → cloud-BH_sHX64.mjs} +3 -3
- package/dist/{cloud-ask-ai-CvRVnwdK.d.mts → cloud-ask-ai-B2WnG4fF.d.mts} +1 -1
- package/dist/{code-blocks-C9awWzEQ.mjs → code-blocks-qe0T8-xe.mjs} +1 -1
- package/dist/{codeblocks-CSqgqbg-.mjs → codeblocks-Bq67u32v.mjs} +2 -2
- package/dist/{dev-BA2kRuCn.mjs → dev-CAQlbguk.mjs} +2 -2
- package/dist/docs-cloud-server.d.mts +2 -2
- package/dist/docs-cloud-server.mjs +1 -1
- package/dist/{doctor-svA9Flsx.mjs → doctor-CO1VMcF_.mjs} +208 -41
- package/dist/{downgrade-BStNhyCc.mjs → downgrade-BZs86NVr.mjs} +2 -2
- package/dist/{agent-surface-drift-rGFS38Ak.mjs → golden-evaluations-BN9u2wxw.mjs} +60 -4
- package/dist/index.d.mts +98 -20
- package/dist/index.mjs +6 -5
- package/dist/{init-Dm0yDz6v.mjs → init-B_9ENq8Z.mjs} +3 -3
- package/dist/{mcp-BYIgKsPn.mjs → mcp-BAJr3wC2.mjs} +6 -6
- package/dist/mcp.d.mts +1 -1
- package/dist/mcp.mjs +149 -7
- package/dist/metadata-BDuewuzq.mjs +237 -0
- package/dist/{package-version-DRIc08EU.mjs → package-version-qik_4J6C.mjs} +1 -1
- package/dist/{reading-time-W_Id2ayC.mjs → reading-time-BkEft6SD.mjs} +307 -250
- package/dist/{review-DZ81wm7h.mjs → review-NC-sOdXn.mjs} +44 -32
- package/dist/{robots-mSc98PMp.mjs → robots-DskPvGPw.mjs} +4 -4
- package/dist/{robots-DRpoiYAV.mjs → robots-ltltiLJF.mjs} +4 -1
- package/dist/{search-9uEaC23e.d.mts → search-C1JitPwi.d.mts} +153 -6
- package/dist/{search-OHp36znm.mjs → search-D57JXQLj.mjs} +150 -39
- package/dist/{search-AMEoabYU.mjs → search-o4Ud6OXv.mjs} +6 -6
- package/dist/server.d.mts +108 -6
- package/dist/server.mjs +6 -6
- package/dist/{sitemap-Cyc0Bbbn.mjs → sitemap-Cq-Yj_iA.mjs} +7 -7
- package/dist/{sitemap-server-zFYctvCa.mjs → sitemap-server-C1ibVKOy.mjs} +2 -1
- package/dist/{types-R-DN23yw.d.mts → types-XHABMh_f.d.mts} +96 -6
- package/dist/{upgrade-CXYRNV0C.mjs → upgrade-BCJTCW3O.mjs} +2 -2
- package/package.json +1 -1
- package/dist/agent-evals-BD17jOqL.mjs +0 -1166
- /package/dist/{agent-scope-B8lptqCd.mjs → agent-scope-CCaIY1aK.mjs} +0 -0
- /package/dist/{cloud-ask-ai-1k0q6OAH.mjs → cloud-ask-ai-hnJfj8-X.mjs} +0 -0
- /package/dist/{config-DZbZiYEa.mjs → config-DASewQ0x.mjs} +0 -0
- /package/dist/{errors-BFUtdZfC.mjs → errors-CVqZ3kOO.mjs} +0 -0
- /package/dist/{templates-1Cod8KrJ.mjs → templates-CfQjpDWW.mjs} +0 -0
- /package/dist/{utils-DBCCkkJS.mjs → utils-6UCLxv4B.mjs} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as
|
|
1
|
+
import { G as isDocsAgentDiscoveryRequest, K as isDocsAgentsRequest, Q as isDocsSkillRequest, Sn as upsertPageAgentContractMarkdown, _t as resolveDocsMarkdownRequest, bt as resolveDocsSkillFormat, dn as PAGE_AGENT_CONTRACT_END_MARKER, dt as resolveDocsAgentsFormat, lt as resolveDocsAgentFeedbackConfig, mn as PAGE_AGENT_CONTRACT_START_MARKER, pt as resolveDocsLlmsTxtRequest, ut as resolveDocsAgentFeedbackRequest, yn as renderPageAgentContractMarkdown } from "./agent-BFqyqEnC.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/telemetry.ts
|
|
4
4
|
const DOCS_PACKAGE_NAME = "@farming-labs/docs";
|
|
@@ -601,6 +601,7 @@ function findDocsMarkdownSection(markdown, requestedSection) {
|
|
|
601
601
|
//#region src/search.ts
|
|
602
602
|
const DEFAULT_SEARCH_LIMIT = 10;
|
|
603
603
|
const DEFAULT_MCP_PROTOCOL_VERSION = "2025-11-25";
|
|
604
|
+
const MCP_SESSION_CLEANUP_TIMEOUT_MS = 1e3;
|
|
604
605
|
const syncedIndexes = /* @__PURE__ */ new Set();
|
|
605
606
|
const ALGOLIA_MAX_RECORD_BYTES = 9500;
|
|
606
607
|
const DEFAULT_ASK_AI_CONTEXT_CHARS = 24e3;
|
|
@@ -783,7 +784,17 @@ function clampText(value, maxChars) {
|
|
|
783
784
|
if (value.length <= maxChars) return value;
|
|
784
785
|
return `${value.slice(0, maxChars).trimEnd()}...`;
|
|
785
786
|
}
|
|
786
|
-
function findPageForSearchResult(pages, result) {
|
|
787
|
+
function findPageForSearchResult(pages, result, baseUrl, strictExternalOrigins = false) {
|
|
788
|
+
const rawUrl = result.url.trim();
|
|
789
|
+
const explicitlySchemed = /^[a-z][a-z\d+.-]*:/iu.test(rawUrl);
|
|
790
|
+
const explicitlyHosted = explicitlySchemed || /^[\\/]{2}/u.test(rawUrl);
|
|
791
|
+
if (explicitlySchemed && !/^https?:/iu.test(rawUrl)) return void 0;
|
|
792
|
+
if (explicitlyHosted && !baseUrl && strictExternalOrigins) return void 0;
|
|
793
|
+
if (explicitlyHosted && baseUrl) try {
|
|
794
|
+
if (new URL(result.url, baseUrl).origin !== new URL(baseUrl).origin) return void 0;
|
|
795
|
+
} catch {
|
|
796
|
+
return;
|
|
797
|
+
}
|
|
787
798
|
const resultPath = normalizeUrlPathname(result.url);
|
|
788
799
|
return pages.find((page) => normalizeUrlPathname(page.url) === resultPath);
|
|
789
800
|
}
|
|
@@ -827,18 +838,45 @@ function getSearchResultAnchor(value) {
|
|
|
827
838
|
return hash;
|
|
828
839
|
}
|
|
829
840
|
}
|
|
830
|
-
function
|
|
841
|
+
function getAskAIResultPageKey(value, baseUrl, strictExternalOrigins = false) {
|
|
842
|
+
const path = normalizeUrlPathname(value);
|
|
843
|
+
const rawValue = value.trim();
|
|
844
|
+
if (!(/^[a-z][a-z\d+.-]*:/iu.test(rawValue) || /^[\\/]{2}/u.test(rawValue)) || !baseUrl && !strictExternalOrigins) return path;
|
|
845
|
+
try {
|
|
846
|
+
const fallbackBase = baseUrl ?? "https://docs.local";
|
|
847
|
+
const parsed = new URL(value, fallbackBase);
|
|
848
|
+
const configuredBase = baseUrl ? new URL(baseUrl) : void 0;
|
|
849
|
+
if (configuredBase && parsed.origin === configuredBase.origin) return path;
|
|
850
|
+
return `${parsed.protocol}//${parsed.host}${path}`;
|
|
851
|
+
} catch {
|
|
852
|
+
return `${value.split("#", 1)[0]}::${path}`;
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
function getAskAIResultKey(result, baseUrl, strictExternalOrigins = false) {
|
|
856
|
+
return `${getAskAIResultPageKey(result.url, baseUrl, strictExternalOrigins)}#${normalizeWhitespace(getSearchResultAnchor(result.url) || result.section || "").toLowerCase()}`;
|
|
857
|
+
}
|
|
858
|
+
function mergeSearchResults(groups, getResultKey = getSearchResultKey) {
|
|
831
859
|
const seen = /* @__PURE__ */ new Set();
|
|
832
860
|
const results = [];
|
|
833
861
|
for (const group of groups) for (const result of group) {
|
|
834
|
-
const key =
|
|
862
|
+
const key = getResultKey(result);
|
|
835
863
|
if (seen.has(key)) continue;
|
|
836
864
|
seen.add(key);
|
|
837
865
|
results.push(result);
|
|
838
866
|
}
|
|
839
867
|
return results;
|
|
840
868
|
}
|
|
841
|
-
function
|
|
869
|
+
function buildAgentProjectionSearchResults(documents) {
|
|
870
|
+
return documents.map((document) => ({
|
|
871
|
+
id: document.id,
|
|
872
|
+
url: document.url,
|
|
873
|
+
content: document.section ? `${document.title} — ${document.section}` : document.title,
|
|
874
|
+
description: document.content || document.description,
|
|
875
|
+
type: document.type,
|
|
876
|
+
section: document.section
|
|
877
|
+
}));
|
|
878
|
+
}
|
|
879
|
+
function sanitizeExternalAgentSearchResults(results, localAgentResults, baseUrl, strictExternalOrigins = false, preserveUnmatched) {
|
|
842
880
|
const localByKey = new Map(localAgentResults.map((result) => [getSearchResultKey(result), result]));
|
|
843
881
|
const localPageResults = /* @__PURE__ */ new Map();
|
|
844
882
|
for (const result of localAgentResults) {
|
|
@@ -846,7 +884,19 @@ function sanitizeExternalAgentSearchResults(results, localAgentResults, preserve
|
|
|
846
884
|
if (!localPageResults.get(pageUrl) || result.type === "page") localPageResults.set(pageUrl, result);
|
|
847
885
|
}
|
|
848
886
|
return results.flatMap((result) => {
|
|
849
|
-
const
|
|
887
|
+
const rawUrl = result.url.trim();
|
|
888
|
+
const explicitlySchemed = /^[a-z][a-z\d+.-]*:/iu.test(rawUrl);
|
|
889
|
+
const externallyHosted = explicitlySchemed && /^https?:/iu.test(rawUrl) || /^[\\/]{2}/u.test(rawUrl);
|
|
890
|
+
const unsupportedScheme = explicitlySchemed && !/^https?:/iu.test(rawUrl);
|
|
891
|
+
let sameOriginOrUnknown = !externallyHosted || !baseUrl && !strictExternalOrigins;
|
|
892
|
+
if (unsupportedScheme) sameOriginOrUnknown = false;
|
|
893
|
+
if (externallyHosted && baseUrl) try {
|
|
894
|
+
sameOriginOrUnknown = new URL(result.url, baseUrl).origin === new URL(baseUrl).origin;
|
|
895
|
+
} catch {
|
|
896
|
+
sameOriginOrUnknown = false;
|
|
897
|
+
}
|
|
898
|
+
const hasSection = Boolean(getSearchResultAnchor(result.url) || result.section);
|
|
899
|
+
const local = sameOriginOrUnknown ? localByKey.get(getSearchResultKey(result)) ?? (hasSection ? void 0 : localPageResults.get(normalizeUrlPathname(result.url))) : void 0;
|
|
850
900
|
if (!local) return preserveUnmatched?.(result) ? [result] : [];
|
|
851
901
|
return [{
|
|
852
902
|
...local,
|
|
@@ -855,6 +905,23 @@ function sanitizeExternalAgentSearchResults(results, localAgentResults, preserve
|
|
|
855
905
|
}];
|
|
856
906
|
});
|
|
857
907
|
}
|
|
908
|
+
function shouldPreserveUnmatchedMcpResult(options) {
|
|
909
|
+
const { result, localPagePaths, baseUrl, strictExternalOrigins } = options;
|
|
910
|
+
const path = normalizeUrlPathname(result.url);
|
|
911
|
+
const rawUrl = result.url.trim();
|
|
912
|
+
const explicitScheme = rawUrl.match(/^([a-z][a-z\d+.-]*):/iu)?.[1]?.toLowerCase();
|
|
913
|
+
if (explicitScheme && explicitScheme !== "http" && explicitScheme !== "https") return false;
|
|
914
|
+
const explicitlyHosted = /^[a-z][a-z\d+.-]*:/iu.test(rawUrl) || /^[\\/]{2}/u.test(rawUrl);
|
|
915
|
+
if (!strictExternalOrigins) return explicitlyHosted || !localPagePaths.has(path);
|
|
916
|
+
if (!explicitlyHosted) return !localPagePaths.has(path);
|
|
917
|
+
if (!baseUrl) return true;
|
|
918
|
+
try {
|
|
919
|
+
if (new URL(result.url, baseUrl).origin !== new URL(baseUrl).origin) return true;
|
|
920
|
+
} catch {
|
|
921
|
+
return false;
|
|
922
|
+
}
|
|
923
|
+
return !localPagePaths.has(path);
|
|
924
|
+
}
|
|
858
925
|
function getPageAudienceRawContent(page, audience) {
|
|
859
926
|
if (audience === "agent") return page.agentRawContent ?? page.agentFallbackRawContent ?? page.agentContent ?? page.agentFallbackContent ?? page.rawContent ?? page.content;
|
|
860
927
|
return page.rawContent ?? page.content;
|
|
@@ -1190,14 +1257,15 @@ function mapMcpSearchResult(value) {
|
|
|
1190
1257
|
section
|
|
1191
1258
|
};
|
|
1192
1259
|
}
|
|
1193
|
-
async function createOllamaEmbedding(text, config) {
|
|
1260
|
+
async function createOllamaEmbedding(text, config, signal) {
|
|
1194
1261
|
const response = await fetch(`${(config.baseUrl ?? "http://127.0.0.1:11434").replace(/\/$/, "")}/api/embed`, {
|
|
1195
1262
|
method: "POST",
|
|
1196
1263
|
headers: { "Content-Type": "application/json" },
|
|
1197
1264
|
body: JSON.stringify({
|
|
1198
1265
|
model: config.model,
|
|
1199
1266
|
input: text
|
|
1200
|
-
})
|
|
1267
|
+
}),
|
|
1268
|
+
signal
|
|
1201
1269
|
});
|
|
1202
1270
|
ensureOk(response, "Failed to create Ollama embedding");
|
|
1203
1271
|
const payload = await readResponseJson(response);
|
|
@@ -1208,13 +1276,16 @@ async function createOllamaEmbedding(text, config) {
|
|
|
1208
1276
|
function getTypesenseSearchBase(config) {
|
|
1209
1277
|
return config.baseUrl.replace(/\/$/, "");
|
|
1210
1278
|
}
|
|
1211
|
-
async function ensureTypesenseCollection(config, dimensions) {
|
|
1279
|
+
async function ensureTypesenseCollection(config, dimensions, signal) {
|
|
1212
1280
|
const baseUrl = getTypesenseSearchBase(config);
|
|
1213
1281
|
const headers = {
|
|
1214
1282
|
"X-TYPESENSE-API-KEY": config.adminApiKey ?? config.apiKey,
|
|
1215
1283
|
"Content-Type": "application/json"
|
|
1216
1284
|
};
|
|
1217
|
-
const existing = await fetch(`${baseUrl}/collections/${encodeURIComponent(config.collection)}`, {
|
|
1285
|
+
const existing = await fetch(`${baseUrl}/collections/${encodeURIComponent(config.collection)}`, {
|
|
1286
|
+
headers,
|
|
1287
|
+
signal
|
|
1288
|
+
});
|
|
1218
1289
|
if (existing.ok) return;
|
|
1219
1290
|
if (existing.status !== 404) ensureOk(existing, "Failed to inspect Typesense collection");
|
|
1220
1291
|
const fields = [
|
|
@@ -1281,7 +1352,8 @@ async function ensureTypesenseCollection(config, dimensions) {
|
|
|
1281
1352
|
body: JSON.stringify({
|
|
1282
1353
|
name: config.collection,
|
|
1283
1354
|
fields
|
|
1284
|
-
})
|
|
1355
|
+
}),
|
|
1356
|
+
signal
|
|
1285
1357
|
}), "Failed to create Typesense collection");
|
|
1286
1358
|
}
|
|
1287
1359
|
function createTypesenseSearchAdapter(config) {
|
|
@@ -1303,21 +1375,22 @@ function createTypesenseSearchAdapter(config) {
|
|
|
1303
1375
|
version: document.version,
|
|
1304
1376
|
tags: document.tags
|
|
1305
1377
|
};
|
|
1306
|
-
if (config.mode === "hybrid" && config.embeddings) next.embedding = await createOllamaEmbedding(`${document.title}\n${document.section ?? ""}\n${document.content}`.trim(), config.embeddings);
|
|
1378
|
+
if (config.mode === "hybrid" && config.embeddings) next.embedding = await createOllamaEmbedding(`${document.title}\n${document.section ?? ""}\n${document.content}`.trim(), config.embeddings, context.signal);
|
|
1307
1379
|
return next;
|
|
1308
1380
|
}));
|
|
1309
1381
|
if (docsForImport.length === 0) return;
|
|
1310
|
-
await ensureTypesenseCollection(config, Array.isArray(docsForImport[0]?.embedding) ? docsForImport[0].embedding.length : void 0);
|
|
1382
|
+
await ensureTypesenseCollection(config, Array.isArray(docsForImport[0]?.embedding) ? docsForImport[0].embedding.length : void 0, context.signal);
|
|
1311
1383
|
ensureOk(await fetch(`${getTypesenseSearchBase(config)}/collections/${encodeURIComponent(config.collection)}/documents/import?action=upsert`, {
|
|
1312
1384
|
method: "POST",
|
|
1313
1385
|
headers: {
|
|
1314
1386
|
"X-TYPESENSE-API-KEY": adminApiKey,
|
|
1315
1387
|
"Content-Type": "text/plain"
|
|
1316
1388
|
},
|
|
1317
|
-
body: docsForImport.map((document) => JSON.stringify(document)).join("\n")
|
|
1389
|
+
body: docsForImport.map((document) => JSON.stringify(document)).join("\n"),
|
|
1390
|
+
signal: context.signal
|
|
1318
1391
|
}), "Failed to sync documents to Typesense");
|
|
1319
1392
|
},
|
|
1320
|
-
async search(query,
|
|
1393
|
+
async search(query, context) {
|
|
1321
1394
|
const params = new URLSearchParams({
|
|
1322
1395
|
q: query.query,
|
|
1323
1396
|
query_by: (config.queryBy ?? [
|
|
@@ -1332,10 +1405,13 @@ function createTypesenseSearchAdapter(config) {
|
|
|
1332
1405
|
highlight_fields: "content,title,section,description"
|
|
1333
1406
|
});
|
|
1334
1407
|
if (config.mode === "hybrid" && config.embeddings) {
|
|
1335
|
-
const vector = await createOllamaEmbedding(query.query, config.embeddings);
|
|
1408
|
+
const vector = await createOllamaEmbedding(query.query, config.embeddings, context.signal);
|
|
1336
1409
|
params.set("vector_query", `embedding:([${vector.join(",")}],k:${Math.max((query.limit ?? 10) * 4, 20)})`);
|
|
1337
1410
|
}
|
|
1338
|
-
const response = await fetch(`${getTypesenseSearchBase(config)}/collections/${encodeURIComponent(config.collection)}/documents/search?${params.toString()}`, {
|
|
1411
|
+
const response = await fetch(`${getTypesenseSearchBase(config)}/collections/${encodeURIComponent(config.collection)}/documents/search?${params.toString()}`, {
|
|
1412
|
+
headers: { "X-TYPESENSE-API-KEY": config.apiKey },
|
|
1413
|
+
signal: context.signal
|
|
1414
|
+
});
|
|
1339
1415
|
ensureOk(response, "Typesense search failed");
|
|
1340
1416
|
return ((await readResponseJson(response)).hits ?? []).map((hit) => {
|
|
1341
1417
|
const document = hit.document ?? {};
|
|
@@ -1382,7 +1458,7 @@ function resolveAskAISearchRequestConfig(options) {
|
|
|
1382
1458
|
function createMcpSearchAdapter(config) {
|
|
1383
1459
|
return {
|
|
1384
1460
|
name: "mcp",
|
|
1385
|
-
async search(query) {
|
|
1461
|
+
async search(query, context) {
|
|
1386
1462
|
const endpoint = resolveMcpEndpoint(config.endpoint);
|
|
1387
1463
|
const protocolVersion = config.protocolVersion ?? DEFAULT_MCP_PROTOCOL_VERSION;
|
|
1388
1464
|
const toolName = config.toolName ?? "search_docs";
|
|
@@ -1407,7 +1483,8 @@ function createMcpSearchAdapter(config) {
|
|
|
1407
1483
|
version: "0.1.2"
|
|
1408
1484
|
}
|
|
1409
1485
|
}
|
|
1410
|
-
})
|
|
1486
|
+
}),
|
|
1487
|
+
signal: context.signal
|
|
1411
1488
|
});
|
|
1412
1489
|
const initializePayload = await readMcpResponsePayload(initializeResponse);
|
|
1413
1490
|
ensureOk(initializeResponse, "MCP search initialization failed");
|
|
@@ -1435,7 +1512,8 @@ function createMcpSearchAdapter(config) {
|
|
|
1435
1512
|
locale: query.locale
|
|
1436
1513
|
}
|
|
1437
1514
|
}
|
|
1438
|
-
})
|
|
1515
|
+
}),
|
|
1516
|
+
signal: context.signal
|
|
1439
1517
|
});
|
|
1440
1518
|
const payload = await readMcpResponsePayload(searchResponse);
|
|
1441
1519
|
ensureOk(searchResponse, "MCP search request failed");
|
|
@@ -1445,14 +1523,23 @@ function createMcpSearchAdapter(config) {
|
|
|
1445
1523
|
const parsed = JSON.parse(resultText);
|
|
1446
1524
|
return (Array.isArray(parsed) ? parsed : Array.isArray(parsed.results) ? parsed.results : Array.isArray(parsed.pages) ? parsed.pages : []).map(mapMcpSearchResult).filter((result) => Boolean(result));
|
|
1447
1525
|
} finally {
|
|
1448
|
-
if (sessionId)
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1526
|
+
if (sessionId) {
|
|
1527
|
+
const cleanupController = new AbortController();
|
|
1528
|
+
const cleanupTimeout = setTimeout(() => cleanupController.abort(), MCP_SESSION_CLEANUP_TIMEOUT_MS);
|
|
1529
|
+
try {
|
|
1530
|
+
await fetch(endpoint, {
|
|
1531
|
+
method: "DELETE",
|
|
1532
|
+
headers: {
|
|
1533
|
+
...baseHeaders,
|
|
1534
|
+
"mcp-protocol-version": protocolVersion,
|
|
1535
|
+
"mcp-session-id": sessionId
|
|
1536
|
+
},
|
|
1537
|
+
signal: cleanupController.signal
|
|
1538
|
+
});
|
|
1539
|
+
} catch {} finally {
|
|
1540
|
+
clearTimeout(cleanupTimeout);
|
|
1454
1541
|
}
|
|
1455
|
-
}
|
|
1542
|
+
}
|
|
1456
1543
|
}
|
|
1457
1544
|
}
|
|
1458
1545
|
};
|
|
@@ -1475,10 +1562,11 @@ function createAlgoliaSearchAdapter(config) {
|
|
|
1475
1562
|
body: JSON.stringify({ requests: context.documents.map((document) => ({
|
|
1476
1563
|
action: "addObject",
|
|
1477
1564
|
body: buildAlgoliaRecord(document)
|
|
1478
|
-
})) })
|
|
1565
|
+
})) }),
|
|
1566
|
+
signal: context.signal
|
|
1479
1567
|
}), "Failed to sync documents to Algolia");
|
|
1480
1568
|
},
|
|
1481
|
-
async search(query) {
|
|
1569
|
+
async search(query, context) {
|
|
1482
1570
|
const response = await fetch(`${getAlgoliaBase(config)}/1/indexes/${encodeURIComponent(config.indexName)}/query`, {
|
|
1483
1571
|
method: "POST",
|
|
1484
1572
|
headers: {
|
|
@@ -1490,7 +1578,8 @@ function createAlgoliaSearchAdapter(config) {
|
|
|
1490
1578
|
query: query.query,
|
|
1491
1579
|
hitsPerPage: query.limit ?? config.maxResults ?? DEFAULT_SEARCH_LIMIT,
|
|
1492
1580
|
attributesToSnippet: ["content:20"]
|
|
1493
|
-
})
|
|
1581
|
+
}),
|
|
1582
|
+
signal: context.signal
|
|
1494
1583
|
});
|
|
1495
1584
|
ensureOk(response, "Algolia search failed");
|
|
1496
1585
|
return ((await readResponseJson(response)).hits ?? []).map((hit) => {
|
|
@@ -1551,7 +1640,8 @@ async function performDocsSearch(options) {
|
|
|
1551
1640
|
documents,
|
|
1552
1641
|
locale: options.locale,
|
|
1553
1642
|
pathname: options.pathname,
|
|
1554
|
-
siteTitle: options.siteTitle
|
|
1643
|
+
siteTitle: options.siteTitle,
|
|
1644
|
+
signal: options.signal
|
|
1555
1645
|
};
|
|
1556
1646
|
const query = {
|
|
1557
1647
|
query: options.query,
|
|
@@ -1568,10 +1658,23 @@ async function performDocsSearch(options) {
|
|
|
1568
1658
|
const results = await adapter.search(query, context);
|
|
1569
1659
|
if (search.provider === "simple") return results;
|
|
1570
1660
|
const localAudienceResults = audience === "agent" ? await createSimpleSearchAdapter().search(query, context) : [];
|
|
1661
|
+
const localAgentProjectionResults = audience === "agent" ? buildAgentProjectionSearchResults(documents) : [];
|
|
1571
1662
|
const localPagePaths = new Set(options.pages.map((page) => normalizeUrlPathname(page.url)));
|
|
1572
|
-
const safeAdapterResults = audience !== "agent" ? results : sanitizeExternalAgentSearchResults(results,
|
|
1573
|
-
|
|
1574
|
-
|
|
1663
|
+
const safeAdapterResults = audience !== "agent" ? results : sanitizeExternalAgentSearchResults(results, localAgentProjectionResults, options.baseUrl, options.strictExternalOrigins, search.provider === "mcp" ? (result) => shouldPreserveUnmatchedMcpResult({
|
|
1664
|
+
result,
|
|
1665
|
+
localPagePaths,
|
|
1666
|
+
baseUrl: options.baseUrl,
|
|
1667
|
+
strictExternalOrigins: options.strictExternalOrigins === true
|
|
1668
|
+
}) : void 0);
|
|
1669
|
+
if (options.supplementExternalResults === false) return safeAdapterResults.slice(0, query.limit ?? search.maxResults ?? DEFAULT_SEARCH_LIMIT);
|
|
1670
|
+
const combinedResults = mergeSearchResults([
|
|
1671
|
+
buildExactPageSearchResults(options.query, options.pages, audience),
|
|
1672
|
+
safeAdapterResults,
|
|
1673
|
+
localAudienceResults
|
|
1674
|
+
], audience === "agent" ? (result) => getAskAIResultKey(result, options.baseUrl, options.strictExternalOrigins) : void 0);
|
|
1675
|
+
return prioritizeLiteralInsideResults(options.query, combinedResults).slice(0, query.limit ?? search.maxResults ?? DEFAULT_SEARCH_LIMIT);
|
|
1676
|
+
} catch (error) {
|
|
1677
|
+
if (options.failureMode === "throw") throw error;
|
|
1575
1678
|
return createSimpleSearchAdapter().search(query, context);
|
|
1576
1679
|
}
|
|
1577
1680
|
}
|
|
@@ -1588,14 +1691,18 @@ async function buildDocsAskAIContext(options) {
|
|
|
1588
1691
|
locale: options.locale,
|
|
1589
1692
|
pathname: options.pathname,
|
|
1590
1693
|
siteTitle: options.siteTitle,
|
|
1591
|
-
|
|
1694
|
+
baseUrl: options.baseUrl,
|
|
1695
|
+
limit: searchLimit,
|
|
1696
|
+
failureMode: options.searchFailureMode,
|
|
1697
|
+
strictExternalOrigins: options.strictExternalOrigins,
|
|
1698
|
+
signal: options.signal
|
|
1592
1699
|
});
|
|
1593
1700
|
const seen = /* @__PURE__ */ new Set();
|
|
1594
1701
|
const maxResultChars = options.maxResultChars ?? DEFAULT_ASK_AI_RESULT_CHARS;
|
|
1595
1702
|
const rankedResults = searchResults.map((result, index) => {
|
|
1596
1703
|
const formatted = formatAskAIContextResult({
|
|
1597
1704
|
result,
|
|
1598
|
-
page: findPageForSearchResult(options.pages, result),
|
|
1705
|
+
page: findPageForSearchResult(options.pages, result, options.baseUrl, options.strictExternalOrigins),
|
|
1599
1706
|
maxChars: maxResultChars,
|
|
1600
1707
|
baseUrl: options.baseUrl
|
|
1601
1708
|
});
|
|
@@ -1607,9 +1714,9 @@ async function buildDocsAskAIContext(options) {
|
|
|
1607
1714
|
};
|
|
1608
1715
|
}).sort((a, b) => b.rank - a.rank || a.index - b.index);
|
|
1609
1716
|
const formattedResults = rankedResults.map((item) => item.formatted);
|
|
1610
|
-
const sectionResultPaths = new Set(formattedResults.filter((result) => result.section).map((result) =>
|
|
1611
|
-
const results = formattedResults.filter((result) => result.section || !sectionResultPaths.has(
|
|
1612
|
-
const key =
|
|
1717
|
+
const sectionResultPaths = new Set(formattedResults.filter((result) => result.section).map((result) => getAskAIResultPageKey(result.url, options.baseUrl, options.strictExternalOrigins)));
|
|
1718
|
+
const results = formattedResults.filter((result) => result.section || !sectionResultPaths.has(getAskAIResultPageKey(result.url, options.baseUrl, options.strictExternalOrigins))).filter((result) => {
|
|
1719
|
+
const key = getAskAIResultKey(result, options.baseUrl, options.strictExternalOrigins);
|
|
1613
1720
|
if (seen.has(key)) return false;
|
|
1614
1721
|
seen.add(key);
|
|
1615
1722
|
return result.contextContent.length > 0;
|
|
@@ -1631,6 +1738,10 @@ async function buildDocsAskAIContext(options) {
|
|
|
1631
1738
|
const context = blocks.join("\n\n---\n\n");
|
|
1632
1739
|
return {
|
|
1633
1740
|
context,
|
|
1741
|
+
blocks: blocks.map((text, index) => ({
|
|
1742
|
+
text,
|
|
1743
|
+
result: results[index]
|
|
1744
|
+
})),
|
|
1634
1745
|
results: results.slice(0, blocks.length),
|
|
1635
1746
|
searchResults: rankedResults.map((item) => item.result),
|
|
1636
1747
|
packageHints: inferDocsAskAIPackageHints(context)
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "./agent-
|
|
2
|
-
import { n as buildDocsSearchDocuments, r as createAlgoliaSearchAdapter, s as createTypesenseSearchAdapter } from "./search-
|
|
3
|
-
import "./sitemap-server-
|
|
4
|
-
import "./agent-evals-
|
|
1
|
+
import "./agent-BFqyqEnC.mjs";
|
|
2
|
+
import { n as buildDocsSearchDocuments, r as createAlgoliaSearchAdapter, s as createTypesenseSearchAdapter } from "./search-D57JXQLj.mjs";
|
|
3
|
+
import "./sitemap-server-C1ibVKOy.mjs";
|
|
4
|
+
import "./agent-evals-kJs2Y9xR.mjs";
|
|
5
5
|
import { createFilesystemDocsMcpSource } from "./mcp.mjs";
|
|
6
|
-
import "./code-blocks-
|
|
6
|
+
import "./code-blocks-qe0T8-xe.mjs";
|
|
7
7
|
import "./server.mjs";
|
|
8
|
-
import { h as resolveDocsContentDir, m as resolveDocsConfigPath, o as loadProjectEnv, p as readTopLevelStringProperty } from "./config-
|
|
8
|
+
import { h as resolveDocsContentDir, m as resolveDocsConfigPath, o as loadProjectEnv, p as readTopLevelStringProperty } from "./config-DASewQ0x.mjs";
|
|
9
9
|
import { readFileSync } from "node:fs";
|
|
10
10
|
import pc from "picocolors";
|
|
11
11
|
|
package/dist/server.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as isDocsCloudAskAIProvider, n as DocsCloudAskAIResponseOptions, r as createDocsCloudAskAIResponse, t as DocsCloudAskAIConfig } from "./cloud-ask-ai-
|
|
1
|
+
import { A as DocsAgentGoldenTaskExpectation, At as DocsReviewRulesConfig, Bt as DocsSearchDocument, Ct as DocsObservabilityConfig, D as DocsAgentGoldenExampleVerification, E as DocsAgentGoldenAnswerExpectation, F as DocsAnalyticsConfig, Ft as DocsSearchAdapter, G as DocsAskAIFeedbackMessage, Gt as DocsSearchSourcePage, Ht as DocsSearchQuery, I as DocsAnalyticsEvent, It as DocsSearchAdapterContext, K as DocsAskAIFeedbackValue, Kt as DocsSitemapConfig, L as DocsAnalyticsEventInput, Lt as DocsSearchAdapterFactory, M as DocsAgentTraceEventInput, N as DocsAgentTraceEventType, O as DocsAgentGoldenExpectedExample, Ot as DocsReviewCiMode, P as DocsAgentTraceStatus, S as DocsAgentEvaluationTaskInput, Tt as DocsObservabilityEventInput, U as DocsAskAIFeedbackConfig, Ut as DocsSearchResult, W as DocsAskAIFeedbackData, _ as DocsAgentEvaluationAnswerRequest, a as ApiReferenceRenderer, b as DocsAgentEvaluationSourceReference, g as DocsAgentEvaluationAnswerProvider, h as DocsAgentEvaluationAnswerInput, it as DocsCodeBlocksValidateConfig, j as DocsAgentGoldenTaskFilters, k as DocsAgentGoldenTask, kt as DocsReviewConfig, ln as McpDocsSearchConfig, q as DocsAskAIMcpConfig, st as DocsConfig, tt as DocsCodeBlocksPlannerProvider, v as DocsAgentEvaluationAnswerResult, wt as DocsObservabilityEvent, x as DocsAgentEvaluationSurface, y as DocsAgentEvaluationAnswerRunner, zt as DocsSearchConfig } from "./types-XHABMh_f.mjs";
|
|
2
|
+
import { i as isDocsCloudAskAIProvider, n as DocsCloudAskAIResponseOptions, r as createDocsCloudAskAIResponse, t as DocsCloudAskAIConfig } from "./cloud-ask-ai-B2WnG4fF.mjs";
|
|
3
3
|
import { DocsCloudAskAIOptions, DocsCloudPublicConfig, DocsCloudRouteHandlerOptions, DocsCloudRouteHandlers, DocsCloudRuntimeEnv, DocsCloudRuntimeValue, DocsCloudServer, DocsCloudServerOptions, DocsCloudTrackEventOptions, createDocsCloudRouteHandler, createDocsCloudServer } from "./docs-cloud-server.mjs";
|
|
4
|
-
import { A as resolveDocsSitemapRequest, B as normalizePromptProviderName, C as buildDocsSitemapManifest, D as renderDocsSitemapXml, E as renderDocsSitemapMarkdown, F as DEFAULT_PROMPT_PROVIDER_TEMPLATES, G as serializeDocsIconRegistry, H as resolvePromptProviderChoices, I as PromptAction, K as serializeOpenDocsProvider, L as PromptProviderChoice, M as DEFAULT_OPEN_DOCS_PROMPT, N as DEFAULT_OPEN_DOCS_PROVIDER_IDS, O as resolveDocsSitemapConfig, P as DEFAULT_OPEN_DOCS_TARGET, R as SerializeOpenDocsProviderOptions, S as DocsSitemapResolvedConfig, T as readDocsSitemapManifestFromContentMap, U as sanitizePromptText, V as parsePromptStringArray, W as serializeDocsIcon, _ as DEFAULT_SITEMAP_XML_ROUTE, a as createMcpSearchAdapter,
|
|
4
|
+
import { A as resolveDocsSitemapRequest, B as normalizePromptProviderName, Bt as emitDocsObservabilityEvent, C as buildDocsSitemapManifest, D as renderDocsSitemapXml, E as renderDocsSitemapMarkdown, F as DEFAULT_PROMPT_PROVIDER_TEMPLATES, Ft as ResolvedDocsObservabilityConfig, G as serializeDocsIconRegistry, H as resolvePromptProviderChoices, Ht as resolveDocsAnalyticsConfig, I as PromptAction, It as createDocsAgentTraceContext, K as serializeOpenDocsProvider, L as PromptProviderChoice, Lt as createDocsAgentTraceId, M as DEFAULT_OPEN_DOCS_PROMPT, Mt as DOCS_AGENT_TRACE_EVENT_TYPES, N as DEFAULT_OPEN_DOCS_PROVIDER_IDS, Nt as DocsAgentTraceContext, O as resolveDocsSitemapConfig, P as DEFAULT_OPEN_DOCS_TARGET, Pt as ResolvedDocsAnalyticsConfig, R as SerializeOpenDocsProviderOptions, Rt as emitDocsAgentTraceEvent, S as DocsSitemapResolvedConfig, T as readDocsSitemapManifestFromContentMap, U as sanitizePromptText, Ut as resolveDocsObservabilityConfig, V as parsePromptStringArray, Vt as getDocsRequestAnalyticsProperties, W as serializeDocsIcon, _ as DEFAULT_SITEMAP_XML_ROUTE, a as createMcpSearchAdapter, b as DocsSitemapManifestPage, c as formatDocsAskAIPackageHints, d as resolveAskAISearchRequestConfig, f as resolveSearchRequestConfig, g as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, h as DEFAULT_SITEMAP_MD_ROUTE, i as createCustomSearchAdapter, j as toDocsSitemapMarkdownUrl, k as resolveDocsSitemapPageLastmod, l as inferDocsAskAIPackageHints, m as DEFAULT_SITEMAP_MD_DOCS_ROUTE, n as buildDocsSearchDocuments, o as createSimpleSearchAdapter, p as DEFAULT_SITEMAP_MANIFEST_PATH, q as serializeOpenDocsProviders, r as createAlgoliaSearchAdapter, s as createTypesenseSearchAdapter, t as buildDocsAskAIContext, u as performDocsSearch, v as DocsSitemapFormat, w as createDocsSitemapResponse, x as DocsSitemapPageInput, y as DocsSitemapManifest, z as SerializedOpenDocsProvider, zt as emitDocsAnalyticsEvent } from "./search-C1JitPwi.mjs";
|
|
5
5
|
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, DocsMcpResolvedSecurityConfig, DocsMcpSource, DocsMcpTaskSummary, createDocsMcpHttpHandler, createDocsMcpServer, createFilesystemDocsMcpSource, getDocsConfigSchema, normalizeDocsMcpRoute, resolveDocsMcpConfig, runDocsMcpStdio } from "./mcp.mjs";
|
|
6
6
|
|
|
7
7
|
//#region src/code-group-mdx.d.ts
|
|
@@ -38,6 +38,7 @@ interface ResolvedApiReferenceConfig {
|
|
|
38
38
|
interface ApiReferenceOpenApiDiscovery {
|
|
39
39
|
enabled: boolean;
|
|
40
40
|
url?: string;
|
|
41
|
+
urlSource?: "default" | "configured";
|
|
41
42
|
source?: "generated" | "configured";
|
|
42
43
|
specUrl?: string;
|
|
43
44
|
apiReferencePath?: string;
|
|
@@ -130,6 +131,54 @@ declare function buildDocsReviewWorkflowPathFilters(options: {
|
|
|
130
131
|
configContent?: string;
|
|
131
132
|
}): string[];
|
|
132
133
|
//#endregion
|
|
134
|
+
//#region src/code-blocks.d.ts
|
|
135
|
+
interface DocsCodeBlockTarget {
|
|
136
|
+
id: string;
|
|
137
|
+
filePath: string;
|
|
138
|
+
relativePath: string;
|
|
139
|
+
lineStart: number;
|
|
140
|
+
lineEnd: number;
|
|
141
|
+
language?: string;
|
|
142
|
+
title?: string;
|
|
143
|
+
framework?: string;
|
|
144
|
+
packageManager?: string;
|
|
145
|
+
runnable: boolean;
|
|
146
|
+
env: string[];
|
|
147
|
+
meta: Record<string, string | boolean>;
|
|
148
|
+
code: string;
|
|
149
|
+
}
|
|
150
|
+
interface DocsCodeBlockCommand {
|
|
151
|
+
cmd: string;
|
|
152
|
+
args: string[];
|
|
153
|
+
}
|
|
154
|
+
interface DocsCodeBlockExecutionPlan {
|
|
155
|
+
id: string;
|
|
156
|
+
target: DocsCodeBlockTarget;
|
|
157
|
+
action: "execute" | "validate-syntax" | "skip";
|
|
158
|
+
template: string;
|
|
159
|
+
runtime?: string;
|
|
160
|
+
filePath?: string;
|
|
161
|
+
command?: DocsCodeBlockCommand;
|
|
162
|
+
requiredEnv: string[];
|
|
163
|
+
reason?: string;
|
|
164
|
+
planner: DocsCodeBlocksPlannerProvider;
|
|
165
|
+
}
|
|
166
|
+
type DocsCodeBlockValidationStatus = "PLAN" | "PASS" | "SKIP" | "FAIL";
|
|
167
|
+
interface DocsCodeBlockValidationResult {
|
|
168
|
+
id: string;
|
|
169
|
+
target: DocsCodeBlockTarget;
|
|
170
|
+
plan: DocsCodeBlockExecutionPlan;
|
|
171
|
+
status: DocsCodeBlockValidationStatus;
|
|
172
|
+
stdout?: string;
|
|
173
|
+
stderr?: string;
|
|
174
|
+
exitCode?: number | null;
|
|
175
|
+
reason?: string;
|
|
176
|
+
}
|
|
177
|
+
type OptionalModuleImporter = (specifier: string) => Promise<unknown>;
|
|
178
|
+
declare global {
|
|
179
|
+
var __DOCS_CODE_BLOCKS_MODULE_IMPORTER__: OptionalModuleImporter | undefined;
|
|
180
|
+
}
|
|
181
|
+
//#endregion
|
|
133
182
|
//#region src/agent-evals.d.ts
|
|
134
183
|
type DocsGoldenEvaluationStatus = "unmeasured" | "passed" | "failed";
|
|
135
184
|
type DocsGoldenTaskFilters = DocsAgentGoldenTaskFilters;
|
|
@@ -156,6 +205,8 @@ interface DocsGoldenRetrievalMetrics {
|
|
|
156
205
|
passed: boolean;
|
|
157
206
|
}
|
|
158
207
|
interface DocsGoldenCitationMetrics {
|
|
208
|
+
/** Where the citation evidence came from. Context/results are not model-answer citations. */
|
|
209
|
+
evidence: "context" | "results";
|
|
159
210
|
expected: string[];
|
|
160
211
|
actual: string[];
|
|
161
212
|
missing: string[];
|
|
@@ -169,8 +220,13 @@ interface DocsGoldenCitationMetrics {
|
|
|
169
220
|
interface DocsGoldenSelectionMetrics {
|
|
170
221
|
requestedFramework?: string;
|
|
171
222
|
requestedVersion?: string;
|
|
223
|
+
requestedLocale?: string;
|
|
224
|
+
expectedFramework?: string;
|
|
225
|
+
expectedVersion?: string;
|
|
226
|
+
expectedLocale?: string;
|
|
172
227
|
firstFrameworkMatchRank: number | null;
|
|
173
228
|
firstVersionMatchRank: number | null;
|
|
229
|
+
firstLocaleMatchRank: number | null;
|
|
174
230
|
conflictingSources: string[];
|
|
175
231
|
ambiguousSources: string[];
|
|
176
232
|
passed: boolean;
|
|
@@ -179,12 +235,22 @@ interface DocsGoldenExampleResult {
|
|
|
179
235
|
expected: DocsGoldenExpectedExample;
|
|
180
236
|
matchedId?: string;
|
|
181
237
|
source?: string;
|
|
238
|
+
verification: "present" | "syntax" | "execute";
|
|
239
|
+
status: "passed" | "failed" | "skipped";
|
|
240
|
+
reason?: string;
|
|
241
|
+
syntaxValid: boolean;
|
|
242
|
+
executed: boolean;
|
|
243
|
+
executionStatus?: DocsCodeBlockValidationResult["status"];
|
|
244
|
+
/** @deprecated Static/planner executability signal retained for report compatibility. */
|
|
182
245
|
executable: boolean;
|
|
183
246
|
passed: boolean;
|
|
184
247
|
}
|
|
185
248
|
interface DocsGoldenExampleMetrics {
|
|
186
249
|
expected: number;
|
|
187
250
|
matched: number;
|
|
251
|
+
syntaxValid: number;
|
|
252
|
+
executed: number;
|
|
253
|
+
/** @deprecated Count of statically/planner-executable examples retained for compatibility. */
|
|
188
254
|
executable: number;
|
|
189
255
|
results: DocsGoldenExampleResult[];
|
|
190
256
|
passed: boolean;
|
|
@@ -203,9 +269,24 @@ interface DocsGoldenUsageMetrics {
|
|
|
203
269
|
withinBudget: boolean;
|
|
204
270
|
passed: boolean;
|
|
205
271
|
}
|
|
272
|
+
interface DocsGoldenAnswerMetrics {
|
|
273
|
+
evidence: "answer";
|
|
274
|
+
expected: boolean;
|
|
275
|
+
provided: boolean;
|
|
276
|
+
textIncludesMissing: string[];
|
|
277
|
+
textExcludesPresent: string[];
|
|
278
|
+
citations: string[];
|
|
279
|
+
requiredCitations: string[];
|
|
280
|
+
missingCitations: string[];
|
|
281
|
+
unexpectedCitations: string[];
|
|
282
|
+
forbiddenCitations: string[];
|
|
283
|
+
passed: boolean;
|
|
284
|
+
}
|
|
206
285
|
interface DocsGoldenTaskReport {
|
|
207
286
|
id: string;
|
|
208
287
|
query: string;
|
|
288
|
+
surface: DocsAgentEvaluationSurface;
|
|
289
|
+
provider: string;
|
|
209
290
|
status: "passed" | "failed";
|
|
210
291
|
passed: boolean;
|
|
211
292
|
score: number;
|
|
@@ -213,6 +294,7 @@ interface DocsGoldenTaskReport {
|
|
|
213
294
|
sources: DocsGoldenRetrievedSource[];
|
|
214
295
|
retrieval: DocsGoldenRetrievalMetrics;
|
|
215
296
|
citations: DocsGoldenCitationMetrics;
|
|
297
|
+
answer: DocsGoldenAnswerMetrics;
|
|
216
298
|
selection: DocsGoldenSelectionMetrics;
|
|
217
299
|
examples: DocsGoldenExampleMetrics;
|
|
218
300
|
usage: DocsGoldenUsageMetrics;
|
|
@@ -227,13 +309,33 @@ interface DocsGoldenTasksReport {
|
|
|
227
309
|
failedTaskCount: number;
|
|
228
310
|
tasks: DocsGoldenTaskReport[];
|
|
229
311
|
}
|
|
312
|
+
interface RunDocsGoldenTasksOptions {
|
|
313
|
+
/** Default evaluation surface. Tasks may override this with `task.surface`. */
|
|
314
|
+
surface?: DocsAgentEvaluationSurface;
|
|
315
|
+
/** Search configuration used by configured-search and ask-ai-context. */
|
|
316
|
+
search?: boolean | DocsSearchConfig;
|
|
317
|
+
/** Production-resolved Ask AI retrieval config, including `ai.useMcp`. */
|
|
318
|
+
askAISearch?: boolean | DocsSearchConfig;
|
|
319
|
+
siteTitle?: string;
|
|
320
|
+
baseUrl?: string;
|
|
321
|
+
rootDir?: string;
|
|
322
|
+
/** Permit external configured search or HTTP answer calls. @default false */
|
|
323
|
+
allowNetwork?: boolean;
|
|
324
|
+
/** Per-task configured-search/Ask-AI retrieval timeout in milliseconds. @default 30000 */
|
|
325
|
+
searchTimeoutMs?: number;
|
|
326
|
+
/** Project code-block validation config used only by explicit execute expectations. */
|
|
327
|
+
codeBlocksValidate?: boolean | DocsCodeBlocksValidateConfig;
|
|
328
|
+
/** Optional actual-answer runner. No model or HTTP request is made when omitted. */
|
|
329
|
+
answer?: DocsAgentEvaluationAnswerProvider;
|
|
330
|
+
}
|
|
230
331
|
/**
|
|
231
|
-
* Run
|
|
332
|
+
* Run offline-by-default golden-task evaluations against MCP-ready docs pages.
|
|
333
|
+
* Configured external retrieval, HTTP answers, and runtime execution require explicit opt-in.
|
|
232
334
|
* An empty task list is intentionally unmeasured so CI cannot turn absent coverage into a pass.
|
|
233
335
|
*/
|
|
234
|
-
declare function runDocsGoldenTasks(pages: readonly DocsMcpPage[], tasks: readonly DocsGoldenTask[] | undefined): Promise<DocsGoldenTasksReport>;
|
|
336
|
+
declare function runDocsGoldenTasks(pages: readonly DocsMcpPage[], tasks: readonly DocsGoldenTask[] | undefined, options?: RunDocsGoldenTasksOptions): Promise<DocsGoldenTasksReport>;
|
|
235
337
|
//#endregion
|
|
236
338
|
//#region src/sitemap-server.d.ts
|
|
237
339
|
declare function readDocsSitemapManifest(rootDir: string, sitemap?: boolean | DocsSitemapConfig): DocsSitemapManifest | null;
|
|
238
340
|
//#endregion
|
|
239
|
-
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 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 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 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 ResolvedApiReferenceConfig, type ResolvedDocsAnalyticsConfig, type ResolvedDocsObservabilityConfig, type ResolvedDocsReviewConfig, 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, resolveDocsAnalyticsConfig, resolveDocsMcpConfig, resolveDocsObservabilityConfig, resolveDocsReviewConfig, resolveDocsSitemapConfig, resolveDocsSitemapPageLastmod, resolveDocsSitemapRequest, resolvePromptProviderChoices, resolveSearchRequestConfig, runDocsGoldenTasks, runDocsMcpStdio, sanitizePromptText, serializeDocsIcon, serializeDocsIconRegistry, serializeOpenDocsProvider, serializeOpenDocsProviders, toDocsSitemapMarkdownUrl };
|
|
341
|
+
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 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 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, resolveDocsAnalyticsConfig, resolveDocsMcpConfig, resolveDocsObservabilityConfig, resolveDocsReviewConfig, resolveDocsSitemapConfig, resolveDocsSitemapPageLastmod, resolveDocsSitemapRequest, resolvePromptProviderChoices, resolveSearchRequestConfig, runDocsGoldenTasks, runDocsMcpStdio, sanitizePromptText, serializeDocsIcon, serializeDocsIconRegistry, serializeOpenDocsProvider, serializeOpenDocsProviders, toDocsSitemapMarkdownUrl };
|
package/dist/server.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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
|
|
3
|
-
import { a as createMcpSearchAdapter, c as formatDocsAskAIPackageHints, d as resolveAskAISearchRequestConfig, f as resolveSearchRequestConfig, i as createCustomSearchAdapter, l as inferDocsAskAIPackageHints, n as buildDocsSearchDocuments, o as createSimpleSearchAdapter, r as createAlgoliaSearchAdapter, s as createTypesenseSearchAdapter, t as buildDocsAskAIContext, u as performDocsSearch } from "./search-
|
|
4
|
-
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-
|
|
5
|
-
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 DEFAULT_SITEMAP_MD_DOCS_ROUTE, Bt as resolveDocsSitemapPageLastmod, Ft as createDocsSitemapResponse, Ht as toDocsSitemapMarkdownUrl, It as readDocsSitemapManifestFromContentMap, Lt as renderDocsSitemapMarkdown, Mt as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, Nt as DEFAULT_SITEMAP_XML_ROUTE, Pt as buildDocsSitemapManifest, Rt as renderDocsSitemapXml, Vt as resolveDocsSitemapRequest, jt as DEFAULT_SITEMAP_MD_ROUTE, kt as DEFAULT_SITEMAP_MANIFEST_PATH, zt as resolveDocsSitemapConfig } from "./agent-BFqyqEnC.mjs";
|
|
3
|
+
import { a as createMcpSearchAdapter, c as formatDocsAskAIPackageHints, d as resolveAskAISearchRequestConfig, f as resolveSearchRequestConfig, i as createCustomSearchAdapter, l as inferDocsAskAIPackageHints, n as buildDocsSearchDocuments, o as createSimpleSearchAdapter, r as createAlgoliaSearchAdapter, s as createTypesenseSearchAdapter, t as buildDocsAskAIContext, u as performDocsSearch } from "./search-D57JXQLj.mjs";
|
|
4
|
+
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-C1ibVKOy.mjs";
|
|
5
|
+
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-kJs2Y9xR.mjs";
|
|
6
6
|
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";
|
|
7
|
-
import { n as isDocsCloudAskAIProvider, t as createDocsCloudAskAIResponse } from "./cloud-ask-ai-
|
|
7
|
+
import { n as isDocsCloudAskAIProvider, t as createDocsCloudAskAIResponse } from "./cloud-ask-ai-hnJfj8-X.mjs";
|
|
8
8
|
import { createDocsCloudRouteHandler, createDocsCloudServer } from "./docs-cloud-server.mjs";
|
|
9
|
-
import "./code-blocks-
|
|
9
|
+
import "./code-blocks-qe0T8-xe.mjs";
|
|
10
10
|
|
|
11
11
|
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, resolveDocsAnalyticsConfig, resolveDocsMcpConfig, resolveDocsObservabilityConfig, resolveDocsReviewConfig, resolveDocsSitemapConfig, resolveDocsSitemapPageLastmod, resolveDocsSitemapRequest, resolvePromptProviderChoices, resolveSearchRequestConfig, runDocsGoldenTasks, runDocsMcpStdio, sanitizePromptText, serializeDocsIcon, serializeDocsIconRegistry, serializeOpenDocsProvider, serializeOpenDocsProviders, toDocsSitemapMarkdownUrl };
|