@farming-labs/docs 0.2.32 → 0.2.34
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-DTMhPZtU.mjs → agent-B6szuz_8.mjs} +305 -1
- package/dist/{agent-BaiQvHO9.mjs → agent-e3eAnCYU.mjs} +5 -5
- package/dist/{agents-BCi3Jfr-.mjs → agents-CunVhgvR.mjs} +3 -3
- package/dist/cli/index.mjs +23 -14
- package/dist/{codeblocks-DbaQ6PA5.mjs → codeblocks-2pOaoJTn.mjs} +2 -2
- package/dist/{doctor-DRw8FhkQ.mjs → doctor-OTe3vSZv.mjs} +5 -5
- package/dist/index.d.mts +77 -1
- package/dist/index.mjs +4 -4
- package/dist/{mcp-HtLVW_s5.mjs → mcp-Ckr8qCK8.mjs} +51 -3
- package/dist/mcp.mjs +2 -2
- package/dist/{robots-Dy3cdwPo.mjs → robots-BrBGgn1w.mjs} +2 -2
- package/dist/{robots-Dq9xghyE.mjs → robots-CVoC0w0i.mjs} +1 -1
- package/dist/{search-BButtgQB.mjs → search-BKhlXJ3e.mjs} +3 -3
- package/dist/{search-BA76-30z.mjs → search-DU-_y6YA.mjs} +1 -1
- package/dist/server.mjs +3 -3
- package/dist/{sitemap-C4yINpdU.mjs → sitemap-CEyhJLqs.mjs} +3 -3
- package/dist/{sitemap-server-y96rUcF4.mjs → sitemap-server-D39E3W5j.mjs} +1 -1
- package/package.json +1 -1
|
@@ -302,6 +302,8 @@ function createDocsSitemapResponse({ request, sitemap, entry = "docs", siteTitle
|
|
|
302
302
|
const DEFAULT_DOCS_API_ROUTE = "/api/docs";
|
|
303
303
|
const DEFAULT_DOCS_CONFIG_FORMAT = "docs-config-map.v1";
|
|
304
304
|
const DEFAULT_DOCS_CONFIG_ROUTE = `${DEFAULT_DOCS_API_ROUTE}?format=config`;
|
|
305
|
+
const DEFAULT_DOCS_DIAGNOSTICS_FORMAT = "docs-diagnostics.v1";
|
|
306
|
+
const DEFAULT_DOCS_DIAGNOSTICS_ROUTE = `${DEFAULT_DOCS_API_ROUTE}?format=diagnostics`;
|
|
305
307
|
const DEFAULT_OPENAPI_SCHEMA_ROUTE = `${DEFAULT_DOCS_API_ROUTE}?format=openapi`;
|
|
306
308
|
const DEFAULT_AGENT_SPEC_ROUTE = "/api/docs/agent/spec";
|
|
307
309
|
const DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE = "/.well-known/agent";
|
|
@@ -365,6 +367,15 @@ const DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA = {
|
|
|
365
367
|
},
|
|
366
368
|
required: ["task", "outcome"]
|
|
367
369
|
};
|
|
370
|
+
const DEFAULT_DOCS_DIAGNOSTICS_MCP_TOOLS = {
|
|
371
|
+
listDocs: true,
|
|
372
|
+
listPages: true,
|
|
373
|
+
readPage: true,
|
|
374
|
+
searchDocs: true,
|
|
375
|
+
getNavigation: true,
|
|
376
|
+
getCodeExamples: true,
|
|
377
|
+
getConfigSchema: true
|
|
378
|
+
};
|
|
368
379
|
const DOCS_MARKDOWN_SIGNATURE_AGENT_HEADER = "Signature-Agent";
|
|
369
380
|
const DOCS_AI_AGENT_USER_AGENT_PATTERNS = [
|
|
370
381
|
"claudebot",
|
|
@@ -509,6 +520,9 @@ function isPlainObject(value) {
|
|
|
509
520
|
function isDocsConfigRequest(url) {
|
|
510
521
|
return url.searchParams.get("format")?.trim() === "config";
|
|
511
522
|
}
|
|
523
|
+
function isDocsDiagnosticsRequest(url) {
|
|
524
|
+
return url.searchParams.get("format")?.trim() === "diagnostics";
|
|
525
|
+
}
|
|
512
526
|
function buildDocsConfigMap(config, options = {}) {
|
|
513
527
|
const pointers = {};
|
|
514
528
|
const values = serializeDocsConfigMapValue(pickDocsConfigMapValues(config), [], /* @__PURE__ */ new WeakSet(), pointers);
|
|
@@ -530,6 +544,179 @@ function buildDocsConfigMap(config, options = {}) {
|
|
|
530
544
|
pointers
|
|
531
545
|
};
|
|
532
546
|
}
|
|
547
|
+
function buildDocsDiagnostics(config, options = {}) {
|
|
548
|
+
const input = config;
|
|
549
|
+
const entry = normalizeDocsPathSegment(stringConfigValue(input.entry) ?? options.entry ?? "docs");
|
|
550
|
+
const docsRoute = routeFromConfigPath(stringConfigValue(input.docsPath) ?? entry);
|
|
551
|
+
const staticExport = input.staticExport === true;
|
|
552
|
+
const i18n = options.i18n ?? null;
|
|
553
|
+
const localesEnabled = Boolean(i18n?.locales.length);
|
|
554
|
+
const search = resolveDocsDiagnosticsSearch(input.search, staticExport);
|
|
555
|
+
const ai = resolveDocsDiagnosticsAi(input.ai, staticExport);
|
|
556
|
+
const llms = resolveDocsDiagnosticsLlms(input.llmsTxt);
|
|
557
|
+
const sitemapConfig = resolveDocsSitemapConfig(input.sitemap);
|
|
558
|
+
const robotsEnabled = isRobotsDiscoveryEnabled(input.robots);
|
|
559
|
+
const openapiConfig = resolveDocsOpenApiDiscoveryConfig(options.openapi ?? input.apiReference);
|
|
560
|
+
const apiReferenceRoute = resolveDocsDiagnosticsApiReferenceRoute(input.apiReference);
|
|
561
|
+
const mcp = options.mcp ?? resolveDocsDiagnosticsMcp(input.mcp);
|
|
562
|
+
const feedback = options.feedback ?? resolveDocsAgentFeedbackConfig(input.feedback);
|
|
563
|
+
const agentFeedbackEnabled = feedback.enabled === true;
|
|
564
|
+
const agentFeedbackRoute = feedback.route ?? DEFAULT_AGENT_FEEDBACK_ROUTE;
|
|
565
|
+
const agentFeedbackSchemaRoute = feedback.schemaRoute ?? `${agentFeedbackRoute}/schema`;
|
|
566
|
+
const humanFeedback = isDocsDiagnosticsHumanFeedbackEnabled(input.feedback);
|
|
567
|
+
const warnings = [];
|
|
568
|
+
const errors = [];
|
|
569
|
+
if (staticExport) warnings.push({
|
|
570
|
+
severity: "warning",
|
|
571
|
+
code: "static-export-runtime-api",
|
|
572
|
+
path: "/staticExport",
|
|
573
|
+
message: "staticExport is enabled; runtime API-backed capabilities are unavailable in production static export builds."
|
|
574
|
+
});
|
|
575
|
+
if (staticExport && ai.configured) errors.push({
|
|
576
|
+
severity: "error",
|
|
577
|
+
code: "ai-static-export",
|
|
578
|
+
path: "/ai/enabled",
|
|
579
|
+
message: "Ask AI requires the runtime /api/docs POST handler and will not run in static export builds."
|
|
580
|
+
});
|
|
581
|
+
if (ai.enabled && !search.enabled) warnings.push({
|
|
582
|
+
severity: "warning",
|
|
583
|
+
code: "ai-without-search",
|
|
584
|
+
path: "/ai",
|
|
585
|
+
message: "Ask AI is enabled while docs search is disabled, so retrieval context may be unavailable."
|
|
586
|
+
});
|
|
587
|
+
const adapter = options.adapter?.trim() || null;
|
|
588
|
+
if (adapter && adapter !== "next") {
|
|
589
|
+
if (!stringConfigValue(input.contentDir)) warnings.push({
|
|
590
|
+
severity: "warning",
|
|
591
|
+
code: "missing-content-dir",
|
|
592
|
+
path: "/contentDir",
|
|
593
|
+
message: `${adapter} docs usually need contentDir so the server can find markdown content.`
|
|
594
|
+
});
|
|
595
|
+
if (!isPlainObject(input.nav)) warnings.push({
|
|
596
|
+
severity: "warning",
|
|
597
|
+
code: "missing-nav",
|
|
598
|
+
path: "/nav",
|
|
599
|
+
message: `${adapter} docs usually need nav.title and nav.url for sidebar branding and root navigation.`
|
|
600
|
+
});
|
|
601
|
+
}
|
|
602
|
+
validateDocsDiagnosticsSearchConfig(input.search, errors);
|
|
603
|
+
return {
|
|
604
|
+
schemaVersion: 1,
|
|
605
|
+
format: DEFAULT_DOCS_DIAGNOSTICS_FORMAT,
|
|
606
|
+
ok: errors.length === 0,
|
|
607
|
+
adapter,
|
|
608
|
+
routes: {
|
|
609
|
+
docs: docsRoute,
|
|
610
|
+
api: DEFAULT_DOCS_API_ROUTE,
|
|
611
|
+
config: DEFAULT_DOCS_CONFIG_ROUTE,
|
|
612
|
+
diagnostics: DEFAULT_DOCS_DIAGNOSTICS_ROUTE,
|
|
613
|
+
agentSpec: DEFAULT_AGENT_SPEC_ROUTE,
|
|
614
|
+
agents: `${DEFAULT_DOCS_API_ROUTE}?format=agents`,
|
|
615
|
+
skill: `${DEFAULT_DOCS_API_ROUTE}?format=skill`,
|
|
616
|
+
search: search.enabled ? `${DEFAULT_DOCS_API_ROUTE}?query={query}` : null,
|
|
617
|
+
askAi: ai.enabled ? DEFAULT_DOCS_API_ROUTE : null,
|
|
618
|
+
mcp: mcp.enabled ? mcp.route : null,
|
|
619
|
+
llmsTxt: llms.enabled ? DEFAULT_LLMS_TXT_ROUTE : null,
|
|
620
|
+
llmsFullTxt: llms.enabled ? DEFAULT_LLMS_FULL_TXT_ROUTE : null,
|
|
621
|
+
sitemapXml: sitemapConfig.enabled && sitemapConfig.xml.enabled ? sitemapConfig.xml.route : null,
|
|
622
|
+
sitemapMarkdown: sitemapConfig.enabled && sitemapConfig.markdown.enabled ? sitemapConfig.markdown.route : null,
|
|
623
|
+
robots: robotsEnabled ? DEFAULT_AGENT_DISCOVERY_ROBOTS_TXT_ROUTE : null,
|
|
624
|
+
openapi: openapiConfig.enabled ? openapiConfig.url ?? DEFAULT_OPENAPI_SCHEMA_ROUTE : null,
|
|
625
|
+
apiReference: openapiConfig.enabled ? apiReferenceRoute : null
|
|
626
|
+
},
|
|
627
|
+
features: {
|
|
628
|
+
staticExport: { status: staticExport ? "enabled" : "disabled" },
|
|
629
|
+
config: {
|
|
630
|
+
status: "enabled",
|
|
631
|
+
route: DEFAULT_DOCS_CONFIG_ROUTE
|
|
632
|
+
},
|
|
633
|
+
diagnostics: {
|
|
634
|
+
status: "enabled",
|
|
635
|
+
route: DEFAULT_DOCS_DIAGNOSTICS_ROUTE
|
|
636
|
+
},
|
|
637
|
+
search: {
|
|
638
|
+
status: search.enabled ? "enabled" : "disabled",
|
|
639
|
+
reason: search.reason,
|
|
640
|
+
route: search.enabled ? `${DEFAULT_DOCS_API_ROUTE}?query={query}` : null,
|
|
641
|
+
provider: search.provider,
|
|
642
|
+
transport: "GET"
|
|
643
|
+
},
|
|
644
|
+
ai: {
|
|
645
|
+
status: ai.enabled ? "enabled" : "disabled",
|
|
646
|
+
reason: ai.reason,
|
|
647
|
+
route: ai.enabled ? DEFAULT_DOCS_API_ROUTE : null,
|
|
648
|
+
mode: ai.mode,
|
|
649
|
+
transport: "POST"
|
|
650
|
+
},
|
|
651
|
+
mcp: {
|
|
652
|
+
status: mcp.enabled ? "enabled" : "disabled",
|
|
653
|
+
route: mcp.enabled ? mcp.route : null,
|
|
654
|
+
transport: "GET/POST",
|
|
655
|
+
tools: mcp.tools
|
|
656
|
+
},
|
|
657
|
+
feedback: {
|
|
658
|
+
status: agentFeedbackEnabled || humanFeedback ? "enabled" : "disabled",
|
|
659
|
+
human: humanFeedback,
|
|
660
|
+
agent: agentFeedbackEnabled,
|
|
661
|
+
routes: {
|
|
662
|
+
agentSubmit: agentFeedbackEnabled ? agentFeedbackRoute : null,
|
|
663
|
+
agentSchema: agentFeedbackEnabled ? agentFeedbackSchemaRoute : null
|
|
664
|
+
}
|
|
665
|
+
},
|
|
666
|
+
llmsTxt: {
|
|
667
|
+
status: llms.enabled ? "enabled" : "disabled",
|
|
668
|
+
reason: llms.reason,
|
|
669
|
+
routes: {
|
|
670
|
+
txt: llms.enabled ? DEFAULT_LLMS_TXT_ROUTE : null,
|
|
671
|
+
full: llms.enabled ? DEFAULT_LLMS_FULL_TXT_ROUTE : null,
|
|
672
|
+
wellKnownTxt: llms.enabled ? DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE : null,
|
|
673
|
+
wellKnownFull: llms.enabled ? DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE : null
|
|
674
|
+
}
|
|
675
|
+
},
|
|
676
|
+
sitemap: {
|
|
677
|
+
status: sitemapConfig.enabled ? "enabled" : "disabled",
|
|
678
|
+
routes: {
|
|
679
|
+
xml: sitemapConfig.enabled && sitemapConfig.xml.enabled ? sitemapConfig.xml.route : null,
|
|
680
|
+
markdown: sitemapConfig.enabled && sitemapConfig.markdown.enabled ? sitemapConfig.markdown.route : null,
|
|
681
|
+
docsMarkdown: sitemapConfig.enabled && sitemapConfig.markdown.enabled ? sitemapConfig.markdown.docsRoute ?? null : null,
|
|
682
|
+
wellKnownMarkdown: sitemapConfig.enabled && sitemapConfig.markdown.enabled ? sitemapConfig.markdown.wellKnownRoute : null
|
|
683
|
+
}
|
|
684
|
+
},
|
|
685
|
+
robots: {
|
|
686
|
+
status: robotsEnabled ? "enabled" : "disabled",
|
|
687
|
+
route: robotsEnabled ? DEFAULT_AGENT_DISCOVERY_ROBOTS_TXT_ROUTE : null
|
|
688
|
+
},
|
|
689
|
+
apiReference: {
|
|
690
|
+
status: openapiConfig.enabled ? "enabled" : "disabled",
|
|
691
|
+
route: openapiConfig.enabled ? apiReferenceRoute : null,
|
|
692
|
+
routes: { openapi: openapiConfig.enabled ? openapiConfig.url ?? DEFAULT_OPENAPI_SCHEMA_ROUTE : null },
|
|
693
|
+
provider: openapiConfig.source
|
|
694
|
+
},
|
|
695
|
+
agents: {
|
|
696
|
+
status: "enabled",
|
|
697
|
+
routes: {
|
|
698
|
+
default: DEFAULT_AGENTS_MD_ROUTE,
|
|
699
|
+
wellKnown: DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE,
|
|
700
|
+
api: `${DEFAULT_DOCS_API_ROUTE}?format=agents`
|
|
701
|
+
}
|
|
702
|
+
},
|
|
703
|
+
skills: {
|
|
704
|
+
status: "enabled",
|
|
705
|
+
routes: {
|
|
706
|
+
default: DEFAULT_SKILL_MD_ROUTE,
|
|
707
|
+
wellKnown: DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE,
|
|
708
|
+
api: `${DEFAULT_DOCS_API_ROUTE}?format=skill`
|
|
709
|
+
}
|
|
710
|
+
},
|
|
711
|
+
locales: {
|
|
712
|
+
status: localesEnabled ? "enabled" : "disabled",
|
|
713
|
+
provider: localesEnabled ? "query-param" : void 0
|
|
714
|
+
}
|
|
715
|
+
},
|
|
716
|
+
warnings,
|
|
717
|
+
errors
|
|
718
|
+
};
|
|
719
|
+
}
|
|
533
720
|
function pickDocsConfigMapValues(config) {
|
|
534
721
|
const output = {};
|
|
535
722
|
for (const key of DOCS_CONFIG_MAP_TOP_LEVEL_KEYS) if (Object.prototype.hasOwnProperty.call(config, key)) output[key] = config[key];
|
|
@@ -673,6 +860,122 @@ function containsDocsConfigKind(value, kind) {
|
|
|
673
860
|
if (value["$kind"] === kind) return true;
|
|
674
861
|
return Object.values(value).some((entry) => containsDocsConfigKind(entry, kind));
|
|
675
862
|
}
|
|
863
|
+
function stringConfigValue(value) {
|
|
864
|
+
return typeof value === "string" && value.trim().length > 0 ? value.trim() : void 0;
|
|
865
|
+
}
|
|
866
|
+
function routeFromConfigPath(value) {
|
|
867
|
+
const normalized = normalizeDocsPathSegment(value);
|
|
868
|
+
return normalized ? `/${normalized}` : "/";
|
|
869
|
+
}
|
|
870
|
+
function resolveDocsDiagnosticsSearch(search, staticExport) {
|
|
871
|
+
const provider = isPlainObject(search) ? stringConfigValue(search.provider) : "simple";
|
|
872
|
+
const configured = search !== false && !(isPlainObject(search) && search.enabled === false);
|
|
873
|
+
if (staticExport) return {
|
|
874
|
+
enabled: false,
|
|
875
|
+
configured,
|
|
876
|
+
provider,
|
|
877
|
+
reason: "static-export"
|
|
878
|
+
};
|
|
879
|
+
if (!configured) return {
|
|
880
|
+
enabled: false,
|
|
881
|
+
configured,
|
|
882
|
+
provider,
|
|
883
|
+
reason: "configured-disabled"
|
|
884
|
+
};
|
|
885
|
+
return {
|
|
886
|
+
enabled: true,
|
|
887
|
+
configured,
|
|
888
|
+
provider
|
|
889
|
+
};
|
|
890
|
+
}
|
|
891
|
+
function resolveDocsDiagnosticsAi(ai, staticExport) {
|
|
892
|
+
const configured = isPlainObject(ai) && ai.enabled === true;
|
|
893
|
+
const mode = isPlainObject(ai) ? stringConfigValue(ai.mode) : void 0;
|
|
894
|
+
if (!configured) return {
|
|
895
|
+
enabled: false,
|
|
896
|
+
configured,
|
|
897
|
+
reason: "not-configured"
|
|
898
|
+
};
|
|
899
|
+
if (staticExport) return {
|
|
900
|
+
enabled: false,
|
|
901
|
+
configured,
|
|
902
|
+
mode,
|
|
903
|
+
reason: "static-export"
|
|
904
|
+
};
|
|
905
|
+
return {
|
|
906
|
+
enabled: true,
|
|
907
|
+
configured,
|
|
908
|
+
mode
|
|
909
|
+
};
|
|
910
|
+
}
|
|
911
|
+
function resolveDocsDiagnosticsLlms(llmsTxt) {
|
|
912
|
+
return llmsTxt !== false && !(isPlainObject(llmsTxt) && llmsTxt.enabled === false) ? { enabled: true } : {
|
|
913
|
+
enabled: false,
|
|
914
|
+
reason: "configured-disabled"
|
|
915
|
+
};
|
|
916
|
+
}
|
|
917
|
+
function resolveDocsDiagnosticsMcp(mcp) {
|
|
918
|
+
const config = isPlainObject(mcp) ? mcp : {};
|
|
919
|
+
const tools = isPlainObject(config.tools) ? config.tools : {};
|
|
920
|
+
return {
|
|
921
|
+
enabled: typeof mcp === "boolean" ? mcp : config.enabled !== false,
|
|
922
|
+
route: normalizeDocsDiagnosticsMcpRoute(config.route),
|
|
923
|
+
name: stringConfigValue(config.name) ?? "Documentation",
|
|
924
|
+
version: stringConfigValue(config.version) ?? "0.0.0",
|
|
925
|
+
tools: {
|
|
926
|
+
...DEFAULT_DOCS_DIAGNOSTICS_MCP_TOOLS,
|
|
927
|
+
listDocs: tools.listDocs !== false,
|
|
928
|
+
listPages: tools.listPages !== false,
|
|
929
|
+
readPage: tools.readPage !== false,
|
|
930
|
+
searchDocs: tools.searchDocs !== false,
|
|
931
|
+
getNavigation: tools.getNavigation !== false,
|
|
932
|
+
getCodeExamples: tools.getCodeExamples !== false,
|
|
933
|
+
getConfigSchema: tools.getConfigSchema !== false
|
|
934
|
+
}
|
|
935
|
+
};
|
|
936
|
+
}
|
|
937
|
+
function normalizeDocsDiagnosticsMcpRoute(route) {
|
|
938
|
+
const value = stringConfigValue(route);
|
|
939
|
+
if (!value) return DEFAULT_MCP_ROUTE;
|
|
940
|
+
const normalized = `/${value}`.replace(/\/+/g, "/");
|
|
941
|
+
return normalized !== "/" ? normalized.replace(/\/+$/, "") : DEFAULT_MCP_ROUTE;
|
|
942
|
+
}
|
|
943
|
+
function isDocsDiagnosticsHumanFeedbackEnabled(feedback) {
|
|
944
|
+
return feedback === true || isPlainObject(feedback) && feedback.enabled !== false;
|
|
945
|
+
}
|
|
946
|
+
function resolveDocsDiagnosticsApiReferenceRoute(apiReference) {
|
|
947
|
+
if (isPlainObject(apiReference)) return routeFromConfigPath(stringConfigValue(apiReference.path) ?? "api-reference");
|
|
948
|
+
return "/api-reference";
|
|
949
|
+
}
|
|
950
|
+
function validateDocsDiagnosticsSearchConfig(search, errors) {
|
|
951
|
+
if (!isPlainObject(search) || search.enabled === false) return;
|
|
952
|
+
const provider = stringConfigValue(search.provider) ?? "simple";
|
|
953
|
+
const requireString = (key) => {
|
|
954
|
+
if (!stringConfigValue(search[key])) errors.push({
|
|
955
|
+
severity: "error",
|
|
956
|
+
code: `missing-search-${key.replace(/[A-Z]/g, (value) => `-${value.toLowerCase()}`)}`,
|
|
957
|
+
path: `/search/${key}`,
|
|
958
|
+
message: `Search provider "${provider}" requires search.${key}.`
|
|
959
|
+
});
|
|
960
|
+
};
|
|
961
|
+
if (provider === "algolia") {
|
|
962
|
+
requireString("appId");
|
|
963
|
+
requireString("indexName");
|
|
964
|
+
requireString("searchApiKey");
|
|
965
|
+
}
|
|
966
|
+
if (provider === "typesense") {
|
|
967
|
+
requireString("baseUrl");
|
|
968
|
+
requireString("collection");
|
|
969
|
+
requireString("apiKey");
|
|
970
|
+
}
|
|
971
|
+
if (provider === "mcp") requireString("endpoint");
|
|
972
|
+
if (provider === "custom" && !("adapter" in search)) errors.push({
|
|
973
|
+
severity: "error",
|
|
974
|
+
code: "missing-search-adapter",
|
|
975
|
+
path: "/search/adapter",
|
|
976
|
+
message: "Search provider \"custom\" requires search.adapter."
|
|
977
|
+
});
|
|
978
|
+
}
|
|
676
979
|
function normalizeDocsAgentFeedbackRoute(route, fallback = DEFAULT_AGENT_FEEDBACK_ROUTE) {
|
|
677
980
|
if (!route || route.trim().length === 0) return fallback;
|
|
678
981
|
const normalized = `/${route}`.replace(/\/+/g, "/");
|
|
@@ -1722,6 +2025,7 @@ function buildDocsAgentDiscoverySpec({ origin, entry = "docs", i18n = null, sear
|
|
|
1722
2025
|
api: {
|
|
1723
2026
|
docs: DEFAULT_DOCS_API_ROUTE,
|
|
1724
2027
|
config: DEFAULT_DOCS_CONFIG_ROUTE,
|
|
2028
|
+
diagnostics: DEFAULT_DOCS_DIAGNOSTICS_ROUTE,
|
|
1725
2029
|
agentSpec: DEFAULT_AGENT_SPEC_ROUTE,
|
|
1726
2030
|
agentSpecDefault: DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE,
|
|
1727
2031
|
agentSpecFallback: DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE,
|
|
@@ -1943,4 +2247,4 @@ function toYamlString(value) {
|
|
|
1943
2247
|
}
|
|
1944
2248
|
|
|
1945
2249
|
//#endregion
|
|
1946
|
-
export {
|
|
2250
|
+
export { renderDocsAgentsDocument as $, buildDocsAgentDiscoverySpec as A, resolveDocsSitemapPageLastmod as At, hasDocsMarkdownSignatureAgent as B, DEFAULT_OPENAPI_SCHEMA_ROUTE as C, DEFAULT_SITEMAP_XML_ROUTE as Ct, DOCS_BOT_LIKE_USER_AGENT_HEADER_PATTERN as D, renderDocsSitemapMarkdown as Dt, DOCS_AI_AGENT_USER_AGENT_HEADER_PATTERN as E, readDocsSitemapManifestFromContentMap as Et, detectDocsMarkdownAgentRequest as F, isDocsLlmsTxtPublicRequest as G, isDocsAgentsRequest as H, findDocsMarkdownPage as I, isDocsSkillRequest as J, isDocsMcpRequest as K, getDocsLlmsTxtMaxCharsIssue as L, buildDocsConfigMap as M, toDocsSitemapMarkdownUrl as Mt, buildDocsDiagnostics as N, normalizeDocsRelated as Nt, DOCS_MARKDOWN_SIGNATURE_AGENT_HEADER as O, renderDocsSitemapXml as Ot, buildDocsMcpEndpointCandidates as P, renderDocsRelatedMarkdownLines as Pt, parseDocsAgentFeedbackData as Q, getDocsMarkdownCanonicalLinkHeader as R, DEFAULT_MCP_WELL_KNOWN_ROUTE as S, DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE as St, DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE as T, createDocsSitemapResponse as Tt, isDocsConfigRequest as U, isDocsAgentDiscoveryRequest as V, isDocsDiagnosticsRequest as W, normalizeDocsPathSegment as X, matchesDocsLlmsTxtSection as Y, normalizeDocsUrlPath as Z, DEFAULT_LLMS_TXT_MAX_CHARS as _, toDocsMarkdownUrl as _t, DEFAULT_AGENT_MD_ROUTE as a, resolveDocsAgentFeedbackRequest as at, DEFAULT_MCP_PUBLIC_ROUTE as b, DEFAULT_SITEMAP_MD_DOCS_ROUTE as bt, DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE as c, resolveDocsLlmsTxtFormat as ct, DEFAULT_DOCS_CONFIG_FORMAT as d, resolveDocsMarkdownCanonicalUrl as dt, renderDocsLlmsTxt as et, DEFAULT_DOCS_CONFIG_ROUTE as f, resolveDocsMarkdownRecovery as ft, DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE as g, selectDocsLlmsTxtContent as gt, DEFAULT_LLMS_FULL_TXT_ROUTE as h, resolveDocsSkillFormat as ht, DEFAULT_AGENT_FEEDBACK_ROUTE as i, resolveDocsAgentFeedbackConfig as it, buildDocsAgentFeedbackSchema as j, resolveDocsSitemapRequest as jt, DOCS_TRADITIONAL_BOT_USER_AGENT_HEADER_PATTERN as k, resolveDocsSitemapConfig as kt, DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE as l, resolveDocsLlmsTxtRequest as lt, DEFAULT_DOCS_DIAGNOSTICS_ROUTE as m, resolveDocsOpenApiDiscoveryConfig as mt, DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE as n, renderDocsMarkdownNotFound as nt, DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE as o, resolveDocsAgentMdxContent as ot, DEFAULT_DOCS_DIAGNOSTICS_FORMAT as p, resolveDocsMarkdownRequest as pt, isDocsPublicGetRequest as q, DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA as r, renderDocsSkillDocument as rt, DEFAULT_AGENT_SPEC_ROUTE as s, resolveDocsAgentsFormat as st, DEFAULT_AGENTS_MD_ROUTE as t, renderDocsMarkdownDocument as tt, DEFAULT_DOCS_API_ROUTE as u, resolveDocsLlmsTxtSections as ut, DEFAULT_LLMS_TXT_ROUTE as v, validateDocsAgentFeedbackPayload as vt, DEFAULT_SKILL_MD_ROUTE as w, buildDocsSitemapManifest as wt, DEFAULT_MCP_ROUTE as x, DEFAULT_SITEMAP_MD_ROUTE as xt, DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE as y, DEFAULT_SITEMAP_MANIFEST_PATH as yt, getDocsMarkdownVaryHeader as z };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./reading-time-CPAy1SWO.mjs";
|
|
2
|
-
import "./search-
|
|
3
|
-
import "./agent-
|
|
4
|
-
import "./robots-
|
|
5
|
-
import "./sitemap-server-
|
|
2
|
+
import "./search-DU-_y6YA.mjs";
|
|
3
|
+
import "./agent-B6szuz_8.mjs";
|
|
4
|
+
import "./robots-CVoC0w0i.mjs";
|
|
5
|
+
import "./sitemap-server-D39E3W5j.mjs";
|
|
6
6
|
import "./config-De5z-2LK.mjs";
|
|
7
|
-
import { a as readPageTokenBudget, i as printAgentCompactHelp, n as inspectAgentCompactionState, o as scanDocsPageTargets, r as parseAgentCompactArgs, t as compactAgentDocs } from "./codeblocks-
|
|
7
|
+
import { a as readPageTokenBudget, i as printAgentCompactHelp, n as inspectAgentCompactionState, o as scanDocsPageTargets, r as parseAgentCompactArgs, t as compactAgentDocs } from "./codeblocks-2pOaoJTn.mjs";
|
|
8
8
|
|
|
9
9
|
export { compactAgentDocs, parseAgentCompactArgs, printAgentCompactHelp };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./search-
|
|
2
|
-
import {
|
|
3
|
-
import { S as resolveApiReferenceConfig } from "./sitemap-server-
|
|
1
|
+
import "./search-DU-_y6YA.mjs";
|
|
2
|
+
import { $ as renderDocsAgentsDocument, C as DEFAULT_OPENAPI_SCHEMA_ROUTE, a as DEFAULT_AGENT_MD_ROUTE, it as resolveDocsAgentFeedbackConfig, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, o as DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, t as DEFAULT_AGENTS_MD_ROUTE } from "./agent-B6szuz_8.mjs";
|
|
3
|
+
import { S as resolveApiReferenceConfig } from "./sitemap-server-D39E3W5j.mjs";
|
|
4
4
|
import { resolveDocsMcpConfig } from "./mcp.mjs";
|
|
5
5
|
import "./server.mjs";
|
|
6
6
|
import { c as readNavTitle, f as readTopLevelStringProperty, i as loadDocsConfigModule, o as readBooleanProperty, p as resolveDocsConfigPath, t as extractNestedObjectLiteral, u as readStringProperty } from "./config-De5z-2LK.mjs";
|
package/dist/cli/index.mjs
CHANGED
|
@@ -62,7 +62,13 @@ async function main() {
|
|
|
62
62
|
apiRouteRoot: typeof flags["api-route-root"] === "string" ? flags["api-route-root"] : void 0,
|
|
63
63
|
cloud: typeof flags.cloud === "boolean" ? flags.cloud : void 0
|
|
64
64
|
};
|
|
65
|
-
const mcpOptions = {
|
|
65
|
+
const mcpOptions = {
|
|
66
|
+
configPath: typeof flags.config === "string" ? flags.config : void 0,
|
|
67
|
+
setup: subcommand === "setup",
|
|
68
|
+
deploymentId: typeof flags.deployment === "string" ? flags.deployment : void 0,
|
|
69
|
+
apiBaseUrl: typeof flags["api-base-url"] === "string" ? flags["api-base-url"] : typeof flags.url === "string" ? flags.url : void 0,
|
|
70
|
+
json: typeof flags.json === "boolean" ? flags.json : void 0
|
|
71
|
+
};
|
|
66
72
|
const devOptions = {
|
|
67
73
|
verbose: typeof flags.verbose === "boolean" ? flags.verbose : void 0,
|
|
68
74
|
port: typeof flags.port === "string" ? flags.port : void 0,
|
|
@@ -132,10 +138,10 @@ async function main() {
|
|
|
132
138
|
printCloudHelp();
|
|
133
139
|
process.exit(1);
|
|
134
140
|
} else if (parsedCommand.command === "mcp") {
|
|
135
|
-
const { runMcp } = await import("../mcp-
|
|
141
|
+
const { runMcp } = await import("../mcp-Ckr8qCK8.mjs");
|
|
136
142
|
await runMcp(mcpOptions);
|
|
137
143
|
} else if (parsedCommand.command === "agent" && subcommand === "compact") {
|
|
138
|
-
const { compactAgentDocs, parseAgentCompactArgs, printAgentCompactHelp } = await import("../agent-
|
|
144
|
+
const { compactAgentDocs, parseAgentCompactArgs, printAgentCompactHelp } = await import("../agent-e3eAnCYU.mjs");
|
|
139
145
|
const agentCompactOptions = parseAgentCompactArgs(args.slice(2));
|
|
140
146
|
if (agentCompactOptions.help) {
|
|
141
147
|
printAgentCompactHelp();
|
|
@@ -145,11 +151,11 @@ async function main() {
|
|
|
145
151
|
} else if (parsedCommand.command === "agent") {
|
|
146
152
|
console.error(pc.red(`Unknown agent subcommand: ${subcommand ?? "(missing)"}`));
|
|
147
153
|
console.error();
|
|
148
|
-
const { printAgentCompactHelp } = await import("../agent-
|
|
154
|
+
const { printAgentCompactHelp } = await import("../agent-e3eAnCYU.mjs");
|
|
149
155
|
printAgentCompactHelp();
|
|
150
156
|
process.exit(1);
|
|
151
157
|
} else if (parsedCommand.command === "agents" && subcommand === "generate") {
|
|
152
|
-
const { generateAgents, parseAgentsGenerateArgs, printAgentsGenerateHelp } = await import("../agents-
|
|
158
|
+
const { generateAgents, parseAgentsGenerateArgs, printAgentsGenerateHelp } = await import("../agents-CunVhgvR.mjs");
|
|
153
159
|
const agentsOptions = parseAgentsGenerateArgs(args.slice(2));
|
|
154
160
|
if (agentsOptions.help) {
|
|
155
161
|
printAgentsGenerateHelp();
|
|
@@ -159,11 +165,11 @@ async function main() {
|
|
|
159
165
|
} else if (parsedCommand.command === "agents") {
|
|
160
166
|
console.error(pc.red(`Unknown agents subcommand: ${subcommand ?? "(missing)"}`));
|
|
161
167
|
console.error();
|
|
162
|
-
const { printAgentsGenerateHelp } = await import("../agents-
|
|
168
|
+
const { printAgentsGenerateHelp } = await import("../agents-CunVhgvR.mjs");
|
|
163
169
|
printAgentsGenerateHelp();
|
|
164
170
|
process.exit(1);
|
|
165
171
|
} else if (parsedCommand.command === "doctor") {
|
|
166
|
-
const { parseDoctorArgs, printDoctorHelp, runDoctor } = await import("../doctor-
|
|
172
|
+
const { parseDoctorArgs, printDoctorHelp, runDoctor } = await import("../doctor-OTe3vSZv.mjs");
|
|
167
173
|
const doctorOptions = parseDoctorArgs(args.slice(1));
|
|
168
174
|
if (doctorOptions.help) {
|
|
169
175
|
printDoctorHelp();
|
|
@@ -179,7 +185,7 @@ async function main() {
|
|
|
179
185
|
}
|
|
180
186
|
await runReview(reviewOptions);
|
|
181
187
|
} else if ((parsedCommand.command === "codeblocks" || parsedCommand.command === "code-blocks") && subcommand === "validate") {
|
|
182
|
-
const { parseCodeBlocksValidateArgs, printCodeBlocksValidateHelp, runCodeBlocksValidate } = await import("../codeblocks-
|
|
188
|
+
const { parseCodeBlocksValidateArgs, printCodeBlocksValidateHelp, runCodeBlocksValidate } = await import("../codeblocks-2pOaoJTn.mjs");
|
|
183
189
|
const codeBlocksOptions = parseCodeBlocksValidateArgs(args.slice(2));
|
|
184
190
|
if (codeBlocksOptions.help) {
|
|
185
191
|
printCodeBlocksValidateHelp();
|
|
@@ -189,11 +195,11 @@ async function main() {
|
|
|
189
195
|
} else if (parsedCommand.command === "codeblocks" || parsedCommand.command === "code-blocks") {
|
|
190
196
|
console.error(pc.red(`Unknown codeblocks subcommand: ${subcommand ?? "(missing)"}`));
|
|
191
197
|
console.error();
|
|
192
|
-
const { printCodeBlocksValidateHelp } = await import("../codeblocks-
|
|
198
|
+
const { printCodeBlocksValidateHelp } = await import("../codeblocks-2pOaoJTn.mjs");
|
|
193
199
|
printCodeBlocksValidateHelp();
|
|
194
200
|
process.exit(1);
|
|
195
201
|
} else if (parsedCommand.command === "search" && subcommand === "sync") {
|
|
196
|
-
const { syncSearch } = await import("../search-
|
|
202
|
+
const { syncSearch } = await import("../search-BKhlXJ3e.mjs");
|
|
197
203
|
await syncSearch(searchSyncOptions);
|
|
198
204
|
} else if (parsedCommand.command === "search") {
|
|
199
205
|
console.error(pc.red(`Unknown search subcommand: ${subcommand ?? "(missing)"}`));
|
|
@@ -201,7 +207,7 @@ async function main() {
|
|
|
201
207
|
printHelp();
|
|
202
208
|
process.exit(1);
|
|
203
209
|
} else if (parsedCommand.command === "sitemap" && subcommand === "generate") {
|
|
204
|
-
const { generateSitemap, parseSitemapGenerateArgs, printSitemapGenerateHelp } = await import("../sitemap-
|
|
210
|
+
const { generateSitemap, parseSitemapGenerateArgs, printSitemapGenerateHelp } = await import("../sitemap-CEyhJLqs.mjs");
|
|
205
211
|
const sitemapOptions = parseSitemapGenerateArgs(args.slice(2));
|
|
206
212
|
if (sitemapOptions.help) {
|
|
207
213
|
printSitemapGenerateHelp();
|
|
@@ -211,11 +217,11 @@ async function main() {
|
|
|
211
217
|
} else if (parsedCommand.command === "sitemap") {
|
|
212
218
|
console.error(pc.red(`Unknown sitemap subcommand: ${subcommand ?? "(missing)"}`));
|
|
213
219
|
console.error();
|
|
214
|
-
const { printSitemapGenerateHelp } = await import("../sitemap-
|
|
220
|
+
const { printSitemapGenerateHelp } = await import("../sitemap-CEyhJLqs.mjs");
|
|
215
221
|
printSitemapGenerateHelp();
|
|
216
222
|
process.exit(1);
|
|
217
223
|
} else if (parsedCommand.command === "robots" && subcommand === "generate") {
|
|
218
|
-
const { generateRobots, parseRobotsGenerateArgs, printRobotsGenerateHelp } = await import("../robots-
|
|
224
|
+
const { generateRobots, parseRobotsGenerateArgs, printRobotsGenerateHelp } = await import("../robots-BrBGgn1w.mjs");
|
|
219
225
|
const robotsOptions = parseRobotsGenerateArgs(args.slice(2));
|
|
220
226
|
if (robotsOptions.help) {
|
|
221
227
|
printRobotsGenerateHelp();
|
|
@@ -225,7 +231,7 @@ async function main() {
|
|
|
225
231
|
} else if (parsedCommand.command === "robots") {
|
|
226
232
|
console.error(pc.red(`Unknown robots subcommand: ${subcommand ?? "(missing)"}`));
|
|
227
233
|
console.error();
|
|
228
|
-
const { printRobotsGenerateHelp } = await import("../robots-
|
|
234
|
+
const { printRobotsGenerateHelp } = await import("../robots-BrBGgn1w.mjs");
|
|
229
235
|
printRobotsGenerateHelp();
|
|
230
236
|
process.exit(1);
|
|
231
237
|
} else if (parsedCommand.command === "downgrade") {
|
|
@@ -298,6 +304,9 @@ ${pc.dim("Options for init:")}
|
|
|
298
304
|
|
|
299
305
|
${pc.dim("Options for mcp:")}
|
|
300
306
|
${pc.cyan("--config <path>")} Use a custom docs config path instead of ${pc.dim("docs.config.ts[x]")}
|
|
307
|
+
${pc.cyan("mcp setup --deployment <id>")} Print Docs Cloud hosted MCP setup for a deployment id
|
|
308
|
+
${pc.cyan("--api-base-url <url>")} Override the hosted Docs Cloud API base URL for ${pc.cyan("mcp setup")}
|
|
309
|
+
${pc.cyan("--json")} Print MCP client JSON only for ${pc.cyan("mcp setup")}
|
|
301
310
|
|
|
302
311
|
${pc.dim("Options for dev:")}
|
|
303
312
|
${pc.cyan("--port <number>")} Run the frameworkless preview on a custom port
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as parseGeneratedAgentDocument, h as hashGeneratedAgentContent, m as GENERATED_AGENT_PROVENANCE_VERSION, v as serializeGeneratedAgentDocument } from "./search-
|
|
2
|
-
import {
|
|
1
|
+
import { _ as parseGeneratedAgentDocument, h as hashGeneratedAgentContent, m as GENERATED_AGENT_PROVENANCE_VERSION, v as serializeGeneratedAgentDocument } from "./search-DU-_y6YA.mjs";
|
|
2
|
+
import { I as findDocsMarkdownPage, tt as renderDocsMarkdownDocument } from "./agent-B6szuz_8.mjs";
|
|
3
3
|
import "./index.mjs";
|
|
4
4
|
import { createFilesystemDocsMcpSource } from "./mcp.mjs";
|
|
5
5
|
import "./server.mjs";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import "./reading-time-CPAy1SWO.mjs";
|
|
2
|
-
import "./search-
|
|
3
|
-
import {
|
|
4
|
-
import { a as analyzeDocsRobotsTxt, n as DEFAULT_ROBOTS_TXT_ROUTE, u as resolveDocsRobotsConfig } from "./robots-
|
|
5
|
-
import "./sitemap-server-
|
|
2
|
+
import "./search-DU-_y6YA.mjs";
|
|
3
|
+
import { Ct as DEFAULT_SITEMAP_XML_ROUTE, P as buildDocsMcpEndpointCandidates, S as DEFAULT_MCP_WELL_KNOWN_ROUTE, St as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, T as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, b as DEFAULT_MCP_PUBLIC_ROUTE, c as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, h as DEFAULT_LLMS_FULL_TXT_ROUTE, i as DEFAULT_AGENT_FEEDBACK_ROUTE, kt as resolveDocsSitemapConfig, l as DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, t as DEFAULT_AGENTS_MD_ROUTE, v as DEFAULT_LLMS_TXT_ROUTE, w as DEFAULT_SKILL_MD_ROUTE, xt as DEFAULT_SITEMAP_MD_ROUTE } from "./agent-B6szuz_8.mjs";
|
|
4
|
+
import { a as analyzeDocsRobotsTxt, n as DEFAULT_ROBOTS_TXT_ROUTE, u as resolveDocsRobotsConfig } from "./robots-CVoC0w0i.mjs";
|
|
5
|
+
import "./sitemap-server-D39E3W5j.mjs";
|
|
6
6
|
import { createFilesystemDocsMcpSource, resolveDocsMcpConfig } from "./mcp.mjs";
|
|
7
7
|
import "./server.mjs";
|
|
8
8
|
import { a as loadProjectEnv, c as readNavTitle, f as readTopLevelStringProperty, i as loadDocsConfigModule, m as resolveDocsContentDir, o as readBooleanProperty, p as resolveDocsConfigPath, r as extractTopLevelConfigObject, t as extractNestedObjectLiteral } from "./config-De5z-2LK.mjs";
|
|
9
9
|
import { t as detectFramework } from "./utils-CoHZJ1i4.mjs";
|
|
10
|
-
import { n as inspectAgentCompactionState, o as scanDocsPageTargets, t as compactAgentDocs } from "./codeblocks-
|
|
10
|
+
import { n as inspectAgentCompactionState, o as scanDocsPageTargets, t as compactAgentDocs } from "./codeblocks-2pOaoJTn.mjs";
|
|
11
11
|
import { existsSync, lstatSync, readFileSync, readdirSync } from "node:fs";
|
|
12
12
|
import path from "node:path";
|
|
13
13
|
import { LATEST_PROTOCOL_VERSION } from "@modelcontextprotocol/sdk/types.js";
|
package/dist/index.d.mts
CHANGED
|
@@ -240,6 +240,8 @@ declare function serializeGeneratedAgentDocument(content: string, provenance: Ge
|
|
|
240
240
|
declare const DEFAULT_DOCS_API_ROUTE = "/api/docs";
|
|
241
241
|
declare const DEFAULT_DOCS_CONFIG_FORMAT = "docs-config-map.v1";
|
|
242
242
|
declare const DEFAULT_DOCS_CONFIG_ROUTE = "/api/docs?format=config";
|
|
243
|
+
declare const DEFAULT_DOCS_DIAGNOSTICS_FORMAT = "docs-diagnostics.v1";
|
|
244
|
+
declare const DEFAULT_DOCS_DIAGNOSTICS_ROUTE = "/api/docs?format=diagnostics";
|
|
243
245
|
declare const DEFAULT_OPENAPI_SCHEMA_ROUTE = "/api/docs?format=openapi";
|
|
244
246
|
declare const DEFAULT_AGENT_SPEC_ROUTE = "/api/docs/agent/spec";
|
|
245
247
|
declare const DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE = "/.well-known/agent";
|
|
@@ -342,6 +344,77 @@ interface DocsConfigMap {
|
|
|
342
344
|
/** RFC 6901 JSON Pointer index for mapping response values back to docs.config paths. */
|
|
343
345
|
pointers: Record<string, DocsConfigMapPointer>;
|
|
344
346
|
}
|
|
347
|
+
type DocsDiagnosticsStatus = "enabled" | "disabled";
|
|
348
|
+
type DocsDiagnosticsIssueSeverity = "warning" | "error";
|
|
349
|
+
interface DocsDiagnosticsIssue {
|
|
350
|
+
severity: DocsDiagnosticsIssueSeverity;
|
|
351
|
+
code: string;
|
|
352
|
+
path?: string;
|
|
353
|
+
message: string;
|
|
354
|
+
}
|
|
355
|
+
interface DocsDiagnosticsFeature {
|
|
356
|
+
status: DocsDiagnosticsStatus;
|
|
357
|
+
reason?: string;
|
|
358
|
+
route?: string | null;
|
|
359
|
+
routes?: Record<string, string | null>;
|
|
360
|
+
provider?: string;
|
|
361
|
+
mode?: string;
|
|
362
|
+
transport?: "GET" | "POST" | "GET/POST";
|
|
363
|
+
tools?: Record<string, boolean>;
|
|
364
|
+
human?: boolean;
|
|
365
|
+
agent?: boolean;
|
|
366
|
+
}
|
|
367
|
+
interface DocsDiagnostics {
|
|
368
|
+
schemaVersion: 1;
|
|
369
|
+
format: typeof DEFAULT_DOCS_DIAGNOSTICS_FORMAT;
|
|
370
|
+
ok: boolean;
|
|
371
|
+
adapter: string | null;
|
|
372
|
+
routes: {
|
|
373
|
+
docs: string;
|
|
374
|
+
api: string;
|
|
375
|
+
config: string;
|
|
376
|
+
diagnostics: string;
|
|
377
|
+
agentSpec: string;
|
|
378
|
+
agents: string;
|
|
379
|
+
skill: string;
|
|
380
|
+
search: string | null;
|
|
381
|
+
askAi: string | null;
|
|
382
|
+
mcp: string | null;
|
|
383
|
+
llmsTxt: string | null;
|
|
384
|
+
llmsFullTxt: string | null;
|
|
385
|
+
sitemapXml: string | null;
|
|
386
|
+
sitemapMarkdown: string | null;
|
|
387
|
+
robots: string | null;
|
|
388
|
+
openapi: string | null;
|
|
389
|
+
apiReference: string | null;
|
|
390
|
+
};
|
|
391
|
+
features: {
|
|
392
|
+
staticExport: DocsDiagnosticsFeature;
|
|
393
|
+
config: DocsDiagnosticsFeature;
|
|
394
|
+
diagnostics: DocsDiagnosticsFeature;
|
|
395
|
+
search: DocsDiagnosticsFeature;
|
|
396
|
+
ai: DocsDiagnosticsFeature;
|
|
397
|
+
mcp: DocsDiagnosticsFeature;
|
|
398
|
+
feedback: DocsDiagnosticsFeature;
|
|
399
|
+
llmsTxt: DocsDiagnosticsFeature;
|
|
400
|
+
sitemap: DocsDiagnosticsFeature;
|
|
401
|
+
robots: DocsDiagnosticsFeature;
|
|
402
|
+
apiReference: DocsDiagnosticsFeature;
|
|
403
|
+
agents: DocsDiagnosticsFeature;
|
|
404
|
+
skills: DocsDiagnosticsFeature;
|
|
405
|
+
locales: DocsDiagnosticsFeature;
|
|
406
|
+
};
|
|
407
|
+
warnings: DocsDiagnosticsIssue[];
|
|
408
|
+
errors: DocsDiagnosticsIssue[];
|
|
409
|
+
}
|
|
410
|
+
interface DocsDiagnosticsOptions {
|
|
411
|
+
adapter?: string;
|
|
412
|
+
entry?: string;
|
|
413
|
+
i18n?: ResolvedDocsI18n | null;
|
|
414
|
+
mcp?: DocsMcpResolvedConfig;
|
|
415
|
+
feedback?: DocsAgentFeedbackDiscoveryConfig;
|
|
416
|
+
openapi?: boolean | DocsOpenApiDiscoveryConfig;
|
|
417
|
+
}
|
|
345
418
|
interface DocsLlmsTxtResolvedMaxChars {
|
|
346
419
|
mode: LlmsTxtMaxCharsMode;
|
|
347
420
|
chars: number;
|
|
@@ -465,9 +538,11 @@ interface DocsMarkdownCanonicalUrlOptions {
|
|
|
465
538
|
declare function normalizeDocsPathSegment(value: string): string;
|
|
466
539
|
declare function normalizeDocsUrlPath(value: string): string;
|
|
467
540
|
declare function isDocsConfigRequest(url: URL): boolean;
|
|
541
|
+
declare function isDocsDiagnosticsRequest(url: URL): boolean;
|
|
468
542
|
declare function buildDocsConfigMap(config: DocsConfig | Record<string, unknown>, options?: {
|
|
469
543
|
file?: string;
|
|
470
544
|
}): DocsConfigMap;
|
|
545
|
+
declare function buildDocsDiagnostics(config: DocsConfig | Record<string, unknown>, options?: DocsDiagnosticsOptions): DocsDiagnostics;
|
|
471
546
|
declare function buildDocsAgentFeedbackSchema(payloadSchema: Record<string, unknown>): Record<string, unknown>;
|
|
472
547
|
declare function resolveDocsAgentFeedbackConfig(feedback?: boolean | FeedbackConfig): DocsAgentFeedbackResolvedConfig;
|
|
473
548
|
declare function resolveDocsAgentFeedbackRequest(url: URL, feedback: DocsAgentFeedbackResolvedConfig): DocsAgentFeedbackRequest | null;
|
|
@@ -589,6 +664,7 @@ declare function buildDocsAgentDiscoverySpec({
|
|
|
589
664
|
api: {
|
|
590
665
|
docs: string;
|
|
591
666
|
config: string;
|
|
667
|
+
diagnostics: string;
|
|
592
668
|
agentSpec: string;
|
|
593
669
|
agentSpecDefault: string;
|
|
594
670
|
agentSpecFallback: string;
|
|
@@ -779,4 +855,4 @@ declare function renderDocsRobotsGeneratedBlock(options?: DocsRobotsRenderOption
|
|
|
779
855
|
declare function upsertDocsRobotsGeneratedBlock(existing: string, block: string): string;
|
|
780
856
|
declare function analyzeDocsRobotsTxt(content: string, options?: DocsRobotsRenderOptions): DocsRobotsAnalysis;
|
|
781
857
|
//#endregion
|
|
782
|
-
export { type AIConfig, type AgentFeedbackConfig, type AlgoliaDocsSearchConfig, type ApiReferenceConfig, type ApiReferenceRenderer, type BreadcrumbConfig, type ChangelogConfig, type ChangelogEntrySummary, type ChangelogFrontmatter, type CodeBlockCopyData, type CopyMarkdownConfig, type CopyMarkdownFormat, type CustomDocsSearchConfig, DEFAULT_AGENTS_MD_ROUTE, DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA, DEFAULT_AGENT_FEEDBACK_ROUTE, DEFAULT_AGENT_MD_ROUTE, DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, DEFAULT_AGENT_SPEC_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, DEFAULT_DOCS_AI_ROBOTS_USER_AGENTS, DEFAULT_DOCS_API_ROUTE, DEFAULT_DOCS_CONFIG_FORMAT, DEFAULT_DOCS_CONFIG_ROUTE, DEFAULT_LLMS_FULL_TXT_ROUTE, DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, DEFAULT_LLMS_TXT_MAX_CHARS, DEFAULT_LLMS_TXT_ROUTE, DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE, DEFAULT_MCP_PUBLIC_ROUTE, DEFAULT_MCP_ROUTE, DEFAULT_MCP_WELL_KNOWN_ROUTE, DEFAULT_OPENAPI_SCHEMA_ROUTE, DEFAULT_ROBOTS_TXT_ROUTE, DEFAULT_SITEMAP_MANIFEST_PATH, DEFAULT_SITEMAP_MD_DOCS_ROUTE, DEFAULT_SITEMAP_MD_ROUTE, DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, DEFAULT_SITEMAP_XML_ROUTE, DEFAULT_SKILL_MD_ROUTE, DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, DOCS_AGENT_TRACE_EVENT_TYPES, DOCS_AI_AGENT_USER_AGENT_HEADER_PATTERN, DOCS_BOT_LIKE_USER_AGENT_HEADER_PATTERN, DOCS_MARKDOWN_SIGNATURE_AGENT_HEADER, DOCS_ROBOTS_GENERATED_BLOCK_END, DOCS_ROBOTS_GENERATED_BLOCK_START, DOCS_TRADITIONAL_BOT_USER_AGENT_HEADER_PATTERN, type DocsAgentDiscoverySpecOptions, type DocsAgentFeedbackContext, type DocsAgentFeedbackData, type DocsAgentFeedbackDiscoveryConfig, type DocsAgentFeedbackRequest, type DocsAgentFeedbackResolvedConfig, type DocsAgentTraceContext, type DocsAgentTraceEventInput, type DocsAgentTraceEventType, type DocsAgentTraceStatus, type DocsAgentsDocumentOptions, type DocsAnalyticsConfig, type DocsAnalyticsEvent, type DocsAnalyticsEventInput, type DocsAnalyticsEventType, type DocsAnalyticsInput, type DocsAnalyticsSource, type DocsAskAIActionData, type DocsAskAIActionType, type DocsAskAIFeedbackConfig, type DocsAskAIFeedbackData, type DocsAskAIFeedbackMessage, type DocsAskAIFeedbackValue, type DocsAskAIMcpConfig, type DocsCloudApiKeyConfig, type DocsCloudConfig, type DocsCloudFeatureConfig, type DocsCloudPreviewConfig, type DocsCloudPublishConfig, type DocsCodeBlocksConfig, type DocsCodeBlocksPlannerConfig, type DocsCodeBlocksPlannerProvider, type DocsCodeBlocksRunnerConfig, type DocsCodeBlocksRunnerProvider, type DocsCodeBlocksValidateConfig, type DocsCodeBlocksValidationMode, type DocsCodeBlocksValidationPolicy, type DocsConfig, type DocsConfigMap, type DocsConfigMapJsonValue, type DocsConfigMapPointer, type DocsFeedbackData, type DocsFeedbackValue, type DocsI18nConfig, type DocsLlmsDiscoveryConfig, type DocsLlmsTxtGeneratedContent, type DocsLlmsTxtGeneratedSection, type DocsLlmsTxtMaxCharsIssue, type DocsLlmsTxtPageInput, type DocsLlmsTxtRequest, type DocsLlmsTxtResolvedMaxChars, type DocsLlmsTxtResolvedSection, type DocsLlmsTxtSelectedContent, type DocsMarkdownAgentDetection, type DocsMarkdownPage, type DocsMarkdownRecoveryMatch, type DocsMarkdownRecoveryResult, type DocsMcpConfig, type DocsMcpEndpointCandidate, type DocsMcpEndpointCandidateOptions, type DocsMcpToolsConfig, type DocsMetadata, type DocsNav, type DocsObservabilityConfig, type DocsObservabilityEvent, type DocsObservabilityEventInput, type DocsOpenApiDiscoveryConfig, type DocsOpenApiResolvedDiscoveryConfig, type DocsPageStructuredDataInput, type DocsPathMatch, type DocsRelatedItem, type DocsReviewCiConfig, type DocsReviewCiMode, type DocsReviewConfig, type DocsReviewRulesConfig, type DocsReviewScoreConfig, type DocsReviewSeverity, type DocsRobotsConfig, type DocsRobotsRenderOptions, type DocsRobotsResolvedConfig, type DocsRobotsRule, type DocsSearchAdapter, type DocsSearchAdapterContext, type DocsSearchAdapterFactory, type DocsSearchChunkingConfig, type DocsSearchConfig, type DocsSearchDocument, type DocsSearchEmbeddingsConfig, type DocsSearchQuery, type DocsSearchResult, type DocsSearchResultType, type DocsSearchSourcePage, type DocsSitemapConfig, type DocsSitemapFormat, type DocsSitemapManifest, type DocsSitemapManifestPage, type DocsSitemapPageInput, type DocsSitemapResolvedConfig, type DocsSkillDocumentOptions, type DocsStructuredDataBreadcrumb, type DocsTelemetryAgentSurface, type DocsTelemetryAgentSurfaceContext, type DocsTelemetryAgentSurfaceRequestOptions, type DocsTelemetryConfig, type DocsTelemetryContext, type DocsTelemetryEvent, type DocsTelemetryEventInput, type DocsTelemetryEventType, type DocsTelemetryFeatures, type DocsTelemetryFramework, type DocsTheme, type FeedbackConfig, type FontStyle, GENERATED_AGENT_PROVENANCE_MARKER, GENERATED_AGENT_PROVENANCE_VERSION, type GeneratedAgentProvenance, type GeneratedAgentSourceKind, type GithubConfig, type LastUpdatedConfig, type LlmsTxtConfig, type LlmsTxtMaxCharsConfig, type LlmsTxtMaxCharsMode, type LlmsTxtSectionConfig, type McpDocsSearchConfig, type OGConfig, type OpenDocsConfig, type OpenDocsProvider, type OpenDocsProviderConfig, type OpenDocsProviderId, type OpenDocsTarget, type OpenGraphImage, type OrderingItem, type PageActionsConfig, type PageFrontmatter, type PageOpenGraph, type PageSidebarFrontmatter, type PageTwitter, type PromptAction, type PromptProviderChoice, type ReadingTimeConfig, type ReadingTimeFormat, type ResolvedChangelogConfig, type ResolvedDocsAnalyticsConfig, type ResolvedDocsI18n, type ResolvedDocsObservabilityConfig, type ResolvedDocsRelatedLink, type ResolvedDocsTelemetryConfig, type SerializeOpenDocsProviderOptions, type SerializedOpenDocsProvider, type SidebarComponentProps, type SidebarConfig, type SidebarFolderIndexBehavior, type SidebarFolderNode, type SidebarNode, type SidebarPageNode, type SidebarTree, type SimpleDocsSearchConfig, type ThemeToggleConfig, type TypesenseDocsSearchConfig, type TypographyConfig, type UIConfig, analyzeDocsRobotsTxt, applySidebarFolderIndexBehavior, buildDocsAgentDiscoverySpec, buildDocsAgentFeedbackSchema, buildDocsAskAIContext, buildDocsConfigMap, buildDocsMcpEndpointCandidates, buildDocsPageStructuredData, buildDocsSearchDocuments, buildDocsSitemapManifest, buildPageOpenGraph, buildPageTwitter, createAlgoliaSearchAdapter, createCustomSearchAdapter, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsRobotsResponse, createDocsSitemapResponse, createMcpSearchAdapter, createSimpleSearchAdapter, createTheme, createTypesenseSearchAdapter, deepMerge, defineDocs, detectDocsMarkdownAgentRequest, emitDocsAgentTraceEvent, emitDocsAnalyticsEvent, emitDocsObservabilityEvent, emitDocsTelemetryAgentSurfaceEvent, emitDocsTelemetryEvent, emitDocsTelemetryMcpToolEvent, emitDocsTelemetryProjectEvent, estimateReadingTimeMinutes, extendTheme, findDocsMarkdownPage, formatDocsAskAIPackageHints, getDocsLlmsTxtMaxCharsIssue, getDocsMarkdownCanonicalLinkHeader, getDocsMarkdownVaryHeader, getDocsRequestAnalyticsProperties, getDocsRobotsAllowRoutes, getDocsTelemetryFeatures, hasDocsMarkdownSignatureAgent, hashGeneratedAgentContent, inferDocsAskAIPackageHints, inferDocsTelemetryAgentSurface, isDocsAgentDiscoveryRequest, isDocsAgentsRequest, isDocsConfigRequest, isDocsLlmsTxtPublicRequest, isDocsMcpRequest, isDocsPublicGetRequest, isDocsSkillRequest, matchesDocsLlmsTxtSection, normalizeDocsPathSegment, normalizeDocsRelated, normalizeDocsUrlPath, normalizeGeneratedAgentContent, parseDocsAgentFeedbackData, parseGeneratedAgentDocument, performDocsSearch, readDocsSitemapManifestFromContentMap, renderDocsAgentsDocument, renderDocsLlmsTxt, renderDocsMarkdownDocument, renderDocsMarkdownNotFound, renderDocsPageStructuredDataJson, renderDocsRelatedMarkdownLines, renderDocsRobotsGeneratedBlock, renderDocsRobotsTxt, renderDocsSitemapMarkdown, renderDocsSitemapXml, renderDocsSkillDocument, resolveAskAISearchRequestConfig, resolveChangelogConfig, resolveDocsAgentFeedbackConfig, resolveDocsAgentFeedbackRequest, resolveDocsAgentMdxContent, resolveDocsAgentsFormat, resolveDocsAnalyticsConfig, resolveDocsI18n, resolveDocsLlmsTxtFormat, resolveDocsLlmsTxtRequest, resolveDocsLlmsTxtSections, resolveDocsLocale, resolveDocsMarkdownCanonicalUrl, resolveDocsMarkdownRecovery, resolveDocsMarkdownRequest, resolveDocsMetadataBaseUrl, resolveDocsObservabilityConfig, resolveDocsOpenApiDiscoveryConfig, resolveDocsPath, resolveDocsRobotsConfig, resolveDocsRobotsRequest, resolveDocsSitemapConfig, resolveDocsSitemapPageLastmod, resolveDocsSitemapRequest, resolveDocsSkillFormat, resolveDocsTelemetryConfig, resolveOGImage, resolvePageReadingTime, resolvePageSidebarFolderIndexBehavior, resolveReadingTimeFromContent, resolveReadingTimeFromSource, resolveReadingTimeOptions, resolveSearchRequestConfig, resolveSidebarFolderIndexBehavior, resolveSidebarFolderIndexBehaviorForPath, resolveTitle, selectDocsLlmsTxtContent, serializeGeneratedAgentDocument, stripGeneratedAgentProvenance, toDocsMarkdownUrl, toDocsSitemapMarkdownUrl, upsertDocsRobotsGeneratedBlock, validateDocsAgentFeedbackPayload };
|
|
858
|
+
export { type AIConfig, type AgentFeedbackConfig, type AlgoliaDocsSearchConfig, type ApiReferenceConfig, type ApiReferenceRenderer, type BreadcrumbConfig, type ChangelogConfig, type ChangelogEntrySummary, type ChangelogFrontmatter, type CodeBlockCopyData, type CopyMarkdownConfig, type CopyMarkdownFormat, type CustomDocsSearchConfig, DEFAULT_AGENTS_MD_ROUTE, DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA, DEFAULT_AGENT_FEEDBACK_ROUTE, DEFAULT_AGENT_MD_ROUTE, DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, DEFAULT_AGENT_SPEC_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, DEFAULT_DOCS_AI_ROBOTS_USER_AGENTS, DEFAULT_DOCS_API_ROUTE, DEFAULT_DOCS_CONFIG_FORMAT, DEFAULT_DOCS_CONFIG_ROUTE, DEFAULT_DOCS_DIAGNOSTICS_FORMAT, DEFAULT_DOCS_DIAGNOSTICS_ROUTE, DEFAULT_LLMS_FULL_TXT_ROUTE, DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, DEFAULT_LLMS_TXT_MAX_CHARS, DEFAULT_LLMS_TXT_ROUTE, DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE, DEFAULT_MCP_PUBLIC_ROUTE, DEFAULT_MCP_ROUTE, DEFAULT_MCP_WELL_KNOWN_ROUTE, DEFAULT_OPENAPI_SCHEMA_ROUTE, DEFAULT_ROBOTS_TXT_ROUTE, DEFAULT_SITEMAP_MANIFEST_PATH, DEFAULT_SITEMAP_MD_DOCS_ROUTE, DEFAULT_SITEMAP_MD_ROUTE, DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, DEFAULT_SITEMAP_XML_ROUTE, DEFAULT_SKILL_MD_ROUTE, DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, DOCS_AGENT_TRACE_EVENT_TYPES, DOCS_AI_AGENT_USER_AGENT_HEADER_PATTERN, DOCS_BOT_LIKE_USER_AGENT_HEADER_PATTERN, DOCS_MARKDOWN_SIGNATURE_AGENT_HEADER, DOCS_ROBOTS_GENERATED_BLOCK_END, DOCS_ROBOTS_GENERATED_BLOCK_START, DOCS_TRADITIONAL_BOT_USER_AGENT_HEADER_PATTERN, type DocsAgentDiscoverySpecOptions, type DocsAgentFeedbackContext, type DocsAgentFeedbackData, type DocsAgentFeedbackDiscoveryConfig, type DocsAgentFeedbackRequest, type DocsAgentFeedbackResolvedConfig, type DocsAgentTraceContext, type DocsAgentTraceEventInput, type DocsAgentTraceEventType, type DocsAgentTraceStatus, type DocsAgentsDocumentOptions, type DocsAnalyticsConfig, type DocsAnalyticsEvent, type DocsAnalyticsEventInput, type DocsAnalyticsEventType, type DocsAnalyticsInput, type DocsAnalyticsSource, type DocsAskAIActionData, type DocsAskAIActionType, type DocsAskAIFeedbackConfig, type DocsAskAIFeedbackData, type DocsAskAIFeedbackMessage, type DocsAskAIFeedbackValue, type DocsAskAIMcpConfig, type DocsCloudApiKeyConfig, type DocsCloudConfig, type DocsCloudFeatureConfig, type DocsCloudPreviewConfig, type DocsCloudPublishConfig, type DocsCodeBlocksConfig, type DocsCodeBlocksPlannerConfig, type DocsCodeBlocksPlannerProvider, type DocsCodeBlocksRunnerConfig, type DocsCodeBlocksRunnerProvider, type DocsCodeBlocksValidateConfig, type DocsCodeBlocksValidationMode, type DocsCodeBlocksValidationPolicy, type DocsConfig, type DocsConfigMap, type DocsConfigMapJsonValue, type DocsConfigMapPointer, type DocsDiagnostics, type DocsDiagnosticsFeature, type DocsDiagnosticsIssue, type DocsDiagnosticsIssueSeverity, type DocsDiagnosticsOptions, type DocsDiagnosticsStatus, type DocsFeedbackData, type DocsFeedbackValue, type DocsI18nConfig, type DocsLlmsDiscoveryConfig, type DocsLlmsTxtGeneratedContent, type DocsLlmsTxtGeneratedSection, type DocsLlmsTxtMaxCharsIssue, type DocsLlmsTxtPageInput, type DocsLlmsTxtRequest, type DocsLlmsTxtResolvedMaxChars, type DocsLlmsTxtResolvedSection, type DocsLlmsTxtSelectedContent, type DocsMarkdownAgentDetection, type DocsMarkdownPage, type DocsMarkdownRecoveryMatch, type DocsMarkdownRecoveryResult, type DocsMcpConfig, type DocsMcpEndpointCandidate, type DocsMcpEndpointCandidateOptions, type DocsMcpToolsConfig, type DocsMetadata, type DocsNav, type DocsObservabilityConfig, type DocsObservabilityEvent, type DocsObservabilityEventInput, type DocsOpenApiDiscoveryConfig, type DocsOpenApiResolvedDiscoveryConfig, type DocsPageStructuredDataInput, type DocsPathMatch, type DocsRelatedItem, type DocsReviewCiConfig, type DocsReviewCiMode, type DocsReviewConfig, type DocsReviewRulesConfig, type DocsReviewScoreConfig, type DocsReviewSeverity, type DocsRobotsConfig, type DocsRobotsRenderOptions, type DocsRobotsResolvedConfig, type DocsRobotsRule, type DocsSearchAdapter, type DocsSearchAdapterContext, type DocsSearchAdapterFactory, type DocsSearchChunkingConfig, type DocsSearchConfig, type DocsSearchDocument, type DocsSearchEmbeddingsConfig, type DocsSearchQuery, type DocsSearchResult, type DocsSearchResultType, type DocsSearchSourcePage, type DocsSitemapConfig, type DocsSitemapFormat, type DocsSitemapManifest, type DocsSitemapManifestPage, type DocsSitemapPageInput, type DocsSitemapResolvedConfig, type DocsSkillDocumentOptions, type DocsStructuredDataBreadcrumb, type DocsTelemetryAgentSurface, type DocsTelemetryAgentSurfaceContext, type DocsTelemetryAgentSurfaceRequestOptions, type DocsTelemetryConfig, type DocsTelemetryContext, type DocsTelemetryEvent, type DocsTelemetryEventInput, type DocsTelemetryEventType, type DocsTelemetryFeatures, type DocsTelemetryFramework, type DocsTheme, type FeedbackConfig, type FontStyle, GENERATED_AGENT_PROVENANCE_MARKER, GENERATED_AGENT_PROVENANCE_VERSION, type GeneratedAgentProvenance, type GeneratedAgentSourceKind, type GithubConfig, type LastUpdatedConfig, type LlmsTxtConfig, type LlmsTxtMaxCharsConfig, type LlmsTxtMaxCharsMode, type LlmsTxtSectionConfig, type McpDocsSearchConfig, type OGConfig, type OpenDocsConfig, type OpenDocsProvider, type OpenDocsProviderConfig, type OpenDocsProviderId, type OpenDocsTarget, type OpenGraphImage, type OrderingItem, type PageActionsConfig, type PageFrontmatter, type PageOpenGraph, type PageSidebarFrontmatter, type PageTwitter, type PromptAction, type PromptProviderChoice, type ReadingTimeConfig, type ReadingTimeFormat, type ResolvedChangelogConfig, type ResolvedDocsAnalyticsConfig, type ResolvedDocsI18n, type ResolvedDocsObservabilityConfig, type ResolvedDocsRelatedLink, type ResolvedDocsTelemetryConfig, type SerializeOpenDocsProviderOptions, type SerializedOpenDocsProvider, type SidebarComponentProps, type SidebarConfig, type SidebarFolderIndexBehavior, type SidebarFolderNode, type SidebarNode, type SidebarPageNode, type SidebarTree, type SimpleDocsSearchConfig, type ThemeToggleConfig, type TypesenseDocsSearchConfig, type TypographyConfig, type UIConfig, analyzeDocsRobotsTxt, applySidebarFolderIndexBehavior, buildDocsAgentDiscoverySpec, buildDocsAgentFeedbackSchema, buildDocsAskAIContext, buildDocsConfigMap, buildDocsDiagnostics, buildDocsMcpEndpointCandidates, buildDocsPageStructuredData, buildDocsSearchDocuments, buildDocsSitemapManifest, buildPageOpenGraph, buildPageTwitter, createAlgoliaSearchAdapter, createCustomSearchAdapter, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsRobotsResponse, createDocsSitemapResponse, createMcpSearchAdapter, createSimpleSearchAdapter, createTheme, createTypesenseSearchAdapter, deepMerge, defineDocs, detectDocsMarkdownAgentRequest, emitDocsAgentTraceEvent, emitDocsAnalyticsEvent, emitDocsObservabilityEvent, emitDocsTelemetryAgentSurfaceEvent, emitDocsTelemetryEvent, emitDocsTelemetryMcpToolEvent, emitDocsTelemetryProjectEvent, estimateReadingTimeMinutes, extendTheme, findDocsMarkdownPage, formatDocsAskAIPackageHints, getDocsLlmsTxtMaxCharsIssue, getDocsMarkdownCanonicalLinkHeader, getDocsMarkdownVaryHeader, getDocsRequestAnalyticsProperties, getDocsRobotsAllowRoutes, getDocsTelemetryFeatures, hasDocsMarkdownSignatureAgent, hashGeneratedAgentContent, inferDocsAskAIPackageHints, inferDocsTelemetryAgentSurface, isDocsAgentDiscoveryRequest, isDocsAgentsRequest, isDocsConfigRequest, isDocsDiagnosticsRequest, isDocsLlmsTxtPublicRequest, isDocsMcpRequest, isDocsPublicGetRequest, isDocsSkillRequest, matchesDocsLlmsTxtSection, normalizeDocsPathSegment, normalizeDocsRelated, normalizeDocsUrlPath, normalizeGeneratedAgentContent, parseDocsAgentFeedbackData, parseGeneratedAgentDocument, performDocsSearch, readDocsSitemapManifestFromContentMap, renderDocsAgentsDocument, renderDocsLlmsTxt, renderDocsMarkdownDocument, renderDocsMarkdownNotFound, renderDocsPageStructuredDataJson, renderDocsRelatedMarkdownLines, renderDocsRobotsGeneratedBlock, renderDocsRobotsTxt, renderDocsSitemapMarkdown, renderDocsSitemapXml, renderDocsSkillDocument, resolveAskAISearchRequestConfig, resolveChangelogConfig, resolveDocsAgentFeedbackConfig, resolveDocsAgentFeedbackRequest, resolveDocsAgentMdxContent, resolveDocsAgentsFormat, resolveDocsAnalyticsConfig, resolveDocsI18n, resolveDocsLlmsTxtFormat, resolveDocsLlmsTxtRequest, resolveDocsLlmsTxtSections, resolveDocsLocale, resolveDocsMarkdownCanonicalUrl, resolveDocsMarkdownRecovery, resolveDocsMarkdownRequest, resolveDocsMetadataBaseUrl, resolveDocsObservabilityConfig, resolveDocsOpenApiDiscoveryConfig, resolveDocsPath, resolveDocsRobotsConfig, resolveDocsRobotsRequest, resolveDocsSitemapConfig, resolveDocsSitemapPageLastmod, resolveDocsSitemapRequest, resolveDocsSkillFormat, resolveDocsTelemetryConfig, resolveOGImage, resolvePageReadingTime, resolvePageSidebarFolderIndexBehavior, resolveReadingTimeFromContent, resolveReadingTimeFromSource, resolveReadingTimeOptions, resolveSearchRequestConfig, resolveSidebarFolderIndexBehavior, resolveSidebarFolderIndexBehaviorForPath, resolveTitle, selectDocsLlmsTxtContent, serializeGeneratedAgentDocument, stripGeneratedAgentProvenance, toDocsMarkdownUrl, toDocsSitemapMarkdownUrl, upsertDocsRobotsGeneratedBlock, validateDocsAgentFeedbackPayload };
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _ as extendTheme, a as resolveReadingTimeOptions, b as defineDocs, c as buildPageTwitter, d as resolveOGImage, f as resolveTitle, g as createTheme, h as resolveDocsPath, i as resolveReadingTimeFromSource, l as renderDocsPageStructuredDataJson, m as resolveDocsLocale, n as resolvePageReadingTime, o as buildDocsPageStructuredData, p as resolveDocsI18n, r as resolveReadingTimeFromContent, s as buildPageOpenGraph, t as estimateReadingTimeMinutes, u as resolveDocsMetadataBaseUrl, v as deepMerge, y as resolveChangelogConfig } from "./reading-time-CPAy1SWO.mjs";
|
|
2
|
-
import { A as resolveDocsTelemetryConfig, C as resolveSidebarFolderIndexBehaviorForPath, D as emitDocsTelemetryProjectEvent, E as emitDocsTelemetryMcpToolEvent, F as emitDocsAnalyticsEvent, I as emitDocsObservabilityEvent, L as getDocsRequestAnalyticsProperties, M as createDocsAgentTraceContext, N as createDocsAgentTraceId, O as getDocsTelemetryFeatures, P as emitDocsAgentTraceEvent, R as resolveDocsAnalyticsConfig, S as resolveSidebarFolderIndexBehavior, T as emitDocsTelemetryEvent, _ as parseGeneratedAgentDocument, a as createMcpSearchAdapter, b as applySidebarFolderIndexBehavior, c as formatDocsAskAIPackageHints, d as resolveAskAISearchRequestConfig, f as resolveSearchRequestConfig, g as normalizeGeneratedAgentContent, h as hashGeneratedAgentContent, i as createCustomSearchAdapter, j as DOCS_AGENT_TRACE_EVENT_TYPES, k as inferDocsTelemetryAgentSurface, l as inferDocsAskAIPackageHints, m as GENERATED_AGENT_PROVENANCE_VERSION, n as buildDocsSearchDocuments, o as createSimpleSearchAdapter, p as GENERATED_AGENT_PROVENANCE_MARKER, r as createAlgoliaSearchAdapter, s as createTypesenseSearchAdapter, t as buildDocsAskAIContext, u as performDocsSearch, v as serializeGeneratedAgentDocument, w as emitDocsTelemetryAgentSurfaceEvent, x as resolvePageSidebarFolderIndexBehavior, y as stripGeneratedAgentProvenance, z as resolveDocsObservabilityConfig } from "./search-
|
|
3
|
-
import { $ as
|
|
4
|
-
import { a as analyzeDocsRobotsTxt, c as renderDocsRobotsGeneratedBlock, d as resolveDocsRobotsRequest, f as upsertDocsRobotsGeneratedBlock, i as DOCS_ROBOTS_GENERATED_BLOCK_START, l as renderDocsRobotsTxt, n as DEFAULT_ROBOTS_TXT_ROUTE, o as createDocsRobotsResponse, r as DOCS_ROBOTS_GENERATED_BLOCK_END, s as getDocsRobotsAllowRoutes, t as DEFAULT_DOCS_AI_ROBOTS_USER_AGENTS, u as resolveDocsRobotsConfig } from "./robots-
|
|
2
|
+
import { A as resolveDocsTelemetryConfig, C as resolveSidebarFolderIndexBehaviorForPath, D as emitDocsTelemetryProjectEvent, E as emitDocsTelemetryMcpToolEvent, F as emitDocsAnalyticsEvent, I as emitDocsObservabilityEvent, L as getDocsRequestAnalyticsProperties, M as createDocsAgentTraceContext, N as createDocsAgentTraceId, O as getDocsTelemetryFeatures, P as emitDocsAgentTraceEvent, R as resolveDocsAnalyticsConfig, S as resolveSidebarFolderIndexBehavior, T as emitDocsTelemetryEvent, _ as parseGeneratedAgentDocument, a as createMcpSearchAdapter, b as applySidebarFolderIndexBehavior, c as formatDocsAskAIPackageHints, d as resolveAskAISearchRequestConfig, f as resolveSearchRequestConfig, g as normalizeGeneratedAgentContent, h as hashGeneratedAgentContent, i as createCustomSearchAdapter, j as DOCS_AGENT_TRACE_EVENT_TYPES, k as inferDocsTelemetryAgentSurface, l as inferDocsAskAIPackageHints, m as GENERATED_AGENT_PROVENANCE_VERSION, n as buildDocsSearchDocuments, o as createSimpleSearchAdapter, p as GENERATED_AGENT_PROVENANCE_MARKER, r as createAlgoliaSearchAdapter, s as createTypesenseSearchAdapter, t as buildDocsAskAIContext, u as performDocsSearch, v as serializeGeneratedAgentDocument, w as emitDocsTelemetryAgentSurfaceEvent, x as resolvePageSidebarFolderIndexBehavior, y as stripGeneratedAgentProvenance, z as resolveDocsObservabilityConfig } from "./search-DU-_y6YA.mjs";
|
|
3
|
+
import { $ as renderDocsAgentsDocument, A as buildDocsAgentDiscoverySpec, At as resolveDocsSitemapPageLastmod, B as hasDocsMarkdownSignatureAgent, C as DEFAULT_OPENAPI_SCHEMA_ROUTE, Ct as DEFAULT_SITEMAP_XML_ROUTE, D as DOCS_BOT_LIKE_USER_AGENT_HEADER_PATTERN, Dt as renderDocsSitemapMarkdown, E as DOCS_AI_AGENT_USER_AGENT_HEADER_PATTERN, Et as readDocsSitemapManifestFromContentMap, F as detectDocsMarkdownAgentRequest, G as isDocsLlmsTxtPublicRequest, H as isDocsAgentsRequest, I as findDocsMarkdownPage, J as isDocsSkillRequest, K as isDocsMcpRequest, L as getDocsLlmsTxtMaxCharsIssue, M as buildDocsConfigMap, Mt as toDocsSitemapMarkdownUrl, N as buildDocsDiagnostics, Nt as normalizeDocsRelated, O as DOCS_MARKDOWN_SIGNATURE_AGENT_HEADER, Ot as renderDocsSitemapXml, P as buildDocsMcpEndpointCandidates, Pt as renderDocsRelatedMarkdownLines, Q as parseDocsAgentFeedbackData, R as getDocsMarkdownCanonicalLinkHeader, S as DEFAULT_MCP_WELL_KNOWN_ROUTE, St as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, T as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, Tt as createDocsSitemapResponse, U as isDocsConfigRequest, V as isDocsAgentDiscoveryRequest, W as isDocsDiagnosticsRequest, X as normalizeDocsPathSegment, Y as matchesDocsLlmsTxtSection, Z as normalizeDocsUrlPath, _ as DEFAULT_LLMS_TXT_MAX_CHARS, _t as toDocsMarkdownUrl, a as DEFAULT_AGENT_MD_ROUTE, at as resolveDocsAgentFeedbackRequest, b as DEFAULT_MCP_PUBLIC_ROUTE, bt as DEFAULT_SITEMAP_MD_DOCS_ROUTE, c as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, ct as resolveDocsLlmsTxtFormat, d as DEFAULT_DOCS_CONFIG_FORMAT, dt as resolveDocsMarkdownCanonicalUrl, et as renderDocsLlmsTxt, f as DEFAULT_DOCS_CONFIG_ROUTE, ft as resolveDocsMarkdownRecovery, g as DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, gt as selectDocsLlmsTxtContent, h as DEFAULT_LLMS_FULL_TXT_ROUTE, ht as resolveDocsSkillFormat, i as DEFAULT_AGENT_FEEDBACK_ROUTE, it as resolveDocsAgentFeedbackConfig, j as buildDocsAgentFeedbackSchema, jt as resolveDocsSitemapRequest, k as DOCS_TRADITIONAL_BOT_USER_AGENT_HEADER_PATTERN, kt as resolveDocsSitemapConfig, l as DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, lt as resolveDocsLlmsTxtRequest, m as DEFAULT_DOCS_DIAGNOSTICS_ROUTE, mt as resolveDocsOpenApiDiscoveryConfig, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, nt as renderDocsMarkdownNotFound, o as DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, ot as resolveDocsAgentMdxContent, p as DEFAULT_DOCS_DIAGNOSTICS_FORMAT, pt as resolveDocsMarkdownRequest, q as isDocsPublicGetRequest, r as DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA, rt as renderDocsSkillDocument, s as DEFAULT_AGENT_SPEC_ROUTE, st as resolveDocsAgentsFormat, t as DEFAULT_AGENTS_MD_ROUTE, tt as renderDocsMarkdownDocument, u as DEFAULT_DOCS_API_ROUTE, ut as resolveDocsLlmsTxtSections, v as DEFAULT_LLMS_TXT_ROUTE, vt as validateDocsAgentFeedbackPayload, w as DEFAULT_SKILL_MD_ROUTE, wt as buildDocsSitemapManifest, x as DEFAULT_MCP_ROUTE, xt as DEFAULT_SITEMAP_MD_ROUTE, y as DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE, yt as DEFAULT_SITEMAP_MANIFEST_PATH, z as getDocsMarkdownVaryHeader } from "./agent-B6szuz_8.mjs";
|
|
4
|
+
import { a as analyzeDocsRobotsTxt, c as renderDocsRobotsGeneratedBlock, d as resolveDocsRobotsRequest, f as upsertDocsRobotsGeneratedBlock, i as DOCS_ROBOTS_GENERATED_BLOCK_START, l as renderDocsRobotsTxt, n as DEFAULT_ROBOTS_TXT_ROUTE, o as createDocsRobotsResponse, r as DOCS_ROBOTS_GENERATED_BLOCK_END, s as getDocsRobotsAllowRoutes, t as DEFAULT_DOCS_AI_ROBOTS_USER_AGENTS, u as resolveDocsRobotsConfig } from "./robots-CVoC0w0i.mjs";
|
|
5
5
|
|
|
6
|
-
export { DEFAULT_AGENTS_MD_ROUTE, DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA, DEFAULT_AGENT_FEEDBACK_ROUTE, DEFAULT_AGENT_MD_ROUTE, DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, DEFAULT_AGENT_SPEC_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, DEFAULT_DOCS_AI_ROBOTS_USER_AGENTS, DEFAULT_DOCS_API_ROUTE, DEFAULT_DOCS_CONFIG_FORMAT, DEFAULT_DOCS_CONFIG_ROUTE, DEFAULT_LLMS_FULL_TXT_ROUTE, DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, DEFAULT_LLMS_TXT_MAX_CHARS, DEFAULT_LLMS_TXT_ROUTE, DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE, DEFAULT_MCP_PUBLIC_ROUTE, DEFAULT_MCP_ROUTE, DEFAULT_MCP_WELL_KNOWN_ROUTE, DEFAULT_OPENAPI_SCHEMA_ROUTE, DEFAULT_ROBOTS_TXT_ROUTE, DEFAULT_SITEMAP_MANIFEST_PATH, DEFAULT_SITEMAP_MD_DOCS_ROUTE, DEFAULT_SITEMAP_MD_ROUTE, DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, DEFAULT_SITEMAP_XML_ROUTE, DEFAULT_SKILL_MD_ROUTE, DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, DOCS_AGENT_TRACE_EVENT_TYPES, DOCS_AI_AGENT_USER_AGENT_HEADER_PATTERN, DOCS_BOT_LIKE_USER_AGENT_HEADER_PATTERN, DOCS_MARKDOWN_SIGNATURE_AGENT_HEADER, DOCS_ROBOTS_GENERATED_BLOCK_END, DOCS_ROBOTS_GENERATED_BLOCK_START, DOCS_TRADITIONAL_BOT_USER_AGENT_HEADER_PATTERN, GENERATED_AGENT_PROVENANCE_MARKER, GENERATED_AGENT_PROVENANCE_VERSION, analyzeDocsRobotsTxt, applySidebarFolderIndexBehavior, buildDocsAgentDiscoverySpec, buildDocsAgentFeedbackSchema, buildDocsAskAIContext, buildDocsConfigMap, buildDocsMcpEndpointCandidates, buildDocsPageStructuredData, buildDocsSearchDocuments, buildDocsSitemapManifest, buildPageOpenGraph, buildPageTwitter, createAlgoliaSearchAdapter, createCustomSearchAdapter, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsRobotsResponse, createDocsSitemapResponse, createMcpSearchAdapter, createSimpleSearchAdapter, createTheme, createTypesenseSearchAdapter, deepMerge, defineDocs, detectDocsMarkdownAgentRequest, emitDocsAgentTraceEvent, emitDocsAnalyticsEvent, emitDocsObservabilityEvent, emitDocsTelemetryAgentSurfaceEvent, emitDocsTelemetryEvent, emitDocsTelemetryMcpToolEvent, emitDocsTelemetryProjectEvent, estimateReadingTimeMinutes, extendTheme, findDocsMarkdownPage, formatDocsAskAIPackageHints, getDocsLlmsTxtMaxCharsIssue, getDocsMarkdownCanonicalLinkHeader, getDocsMarkdownVaryHeader, getDocsRequestAnalyticsProperties, getDocsRobotsAllowRoutes, getDocsTelemetryFeatures, hasDocsMarkdownSignatureAgent, hashGeneratedAgentContent, inferDocsAskAIPackageHints, inferDocsTelemetryAgentSurface, isDocsAgentDiscoveryRequest, isDocsAgentsRequest, isDocsConfigRequest, isDocsLlmsTxtPublicRequest, isDocsMcpRequest, isDocsPublicGetRequest, isDocsSkillRequest, matchesDocsLlmsTxtSection, normalizeDocsPathSegment, normalizeDocsRelated, normalizeDocsUrlPath, normalizeGeneratedAgentContent, parseDocsAgentFeedbackData, parseGeneratedAgentDocument, performDocsSearch, readDocsSitemapManifestFromContentMap, renderDocsAgentsDocument, renderDocsLlmsTxt, renderDocsMarkdownDocument, renderDocsMarkdownNotFound, renderDocsPageStructuredDataJson, renderDocsRelatedMarkdownLines, renderDocsRobotsGeneratedBlock, renderDocsRobotsTxt, renderDocsSitemapMarkdown, renderDocsSitemapXml, renderDocsSkillDocument, resolveAskAISearchRequestConfig, resolveChangelogConfig, resolveDocsAgentFeedbackConfig, resolveDocsAgentFeedbackRequest, resolveDocsAgentMdxContent, resolveDocsAgentsFormat, resolveDocsAnalyticsConfig, resolveDocsI18n, resolveDocsLlmsTxtFormat, resolveDocsLlmsTxtRequest, resolveDocsLlmsTxtSections, resolveDocsLocale, resolveDocsMarkdownCanonicalUrl, resolveDocsMarkdownRecovery, resolveDocsMarkdownRequest, resolveDocsMetadataBaseUrl, resolveDocsObservabilityConfig, resolveDocsOpenApiDiscoveryConfig, resolveDocsPath, resolveDocsRobotsConfig, resolveDocsRobotsRequest, resolveDocsSitemapConfig, resolveDocsSitemapPageLastmod, resolveDocsSitemapRequest, resolveDocsSkillFormat, resolveDocsTelemetryConfig, resolveOGImage, resolvePageReadingTime, resolvePageSidebarFolderIndexBehavior, resolveReadingTimeFromContent, resolveReadingTimeFromSource, resolveReadingTimeOptions, resolveSearchRequestConfig, resolveSidebarFolderIndexBehavior, resolveSidebarFolderIndexBehaviorForPath, resolveTitle, selectDocsLlmsTxtContent, serializeGeneratedAgentDocument, stripGeneratedAgentProvenance, toDocsMarkdownUrl, toDocsSitemapMarkdownUrl, upsertDocsRobotsGeneratedBlock, validateDocsAgentFeedbackPayload };
|
|
6
|
+
export { DEFAULT_AGENTS_MD_ROUTE, DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA, DEFAULT_AGENT_FEEDBACK_ROUTE, DEFAULT_AGENT_MD_ROUTE, DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, DEFAULT_AGENT_SPEC_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, DEFAULT_DOCS_AI_ROBOTS_USER_AGENTS, DEFAULT_DOCS_API_ROUTE, DEFAULT_DOCS_CONFIG_FORMAT, DEFAULT_DOCS_CONFIG_ROUTE, DEFAULT_DOCS_DIAGNOSTICS_FORMAT, DEFAULT_DOCS_DIAGNOSTICS_ROUTE, DEFAULT_LLMS_FULL_TXT_ROUTE, DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, DEFAULT_LLMS_TXT_MAX_CHARS, DEFAULT_LLMS_TXT_ROUTE, DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE, DEFAULT_MCP_PUBLIC_ROUTE, DEFAULT_MCP_ROUTE, DEFAULT_MCP_WELL_KNOWN_ROUTE, DEFAULT_OPENAPI_SCHEMA_ROUTE, DEFAULT_ROBOTS_TXT_ROUTE, DEFAULT_SITEMAP_MANIFEST_PATH, DEFAULT_SITEMAP_MD_DOCS_ROUTE, DEFAULT_SITEMAP_MD_ROUTE, DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, DEFAULT_SITEMAP_XML_ROUTE, DEFAULT_SKILL_MD_ROUTE, DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, DOCS_AGENT_TRACE_EVENT_TYPES, DOCS_AI_AGENT_USER_AGENT_HEADER_PATTERN, DOCS_BOT_LIKE_USER_AGENT_HEADER_PATTERN, DOCS_MARKDOWN_SIGNATURE_AGENT_HEADER, DOCS_ROBOTS_GENERATED_BLOCK_END, DOCS_ROBOTS_GENERATED_BLOCK_START, DOCS_TRADITIONAL_BOT_USER_AGENT_HEADER_PATTERN, GENERATED_AGENT_PROVENANCE_MARKER, GENERATED_AGENT_PROVENANCE_VERSION, analyzeDocsRobotsTxt, applySidebarFolderIndexBehavior, buildDocsAgentDiscoverySpec, buildDocsAgentFeedbackSchema, buildDocsAskAIContext, buildDocsConfigMap, buildDocsDiagnostics, buildDocsMcpEndpointCandidates, buildDocsPageStructuredData, buildDocsSearchDocuments, buildDocsSitemapManifest, buildPageOpenGraph, buildPageTwitter, createAlgoliaSearchAdapter, createCustomSearchAdapter, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsRobotsResponse, createDocsSitemapResponse, createMcpSearchAdapter, createSimpleSearchAdapter, createTheme, createTypesenseSearchAdapter, deepMerge, defineDocs, detectDocsMarkdownAgentRequest, emitDocsAgentTraceEvent, emitDocsAnalyticsEvent, emitDocsObservabilityEvent, emitDocsTelemetryAgentSurfaceEvent, emitDocsTelemetryEvent, emitDocsTelemetryMcpToolEvent, emitDocsTelemetryProjectEvent, estimateReadingTimeMinutes, extendTheme, findDocsMarkdownPage, formatDocsAskAIPackageHints, getDocsLlmsTxtMaxCharsIssue, getDocsMarkdownCanonicalLinkHeader, getDocsMarkdownVaryHeader, getDocsRequestAnalyticsProperties, getDocsRobotsAllowRoutes, getDocsTelemetryFeatures, hasDocsMarkdownSignatureAgent, hashGeneratedAgentContent, inferDocsAskAIPackageHints, inferDocsTelemetryAgentSurface, isDocsAgentDiscoveryRequest, isDocsAgentsRequest, isDocsConfigRequest, isDocsDiagnosticsRequest, isDocsLlmsTxtPublicRequest, isDocsMcpRequest, isDocsPublicGetRequest, isDocsSkillRequest, matchesDocsLlmsTxtSection, normalizeDocsPathSegment, normalizeDocsRelated, normalizeDocsUrlPath, normalizeGeneratedAgentContent, parseDocsAgentFeedbackData, parseGeneratedAgentDocument, performDocsSearch, readDocsSitemapManifestFromContentMap, renderDocsAgentsDocument, renderDocsLlmsTxt, renderDocsMarkdownDocument, renderDocsMarkdownNotFound, renderDocsPageStructuredDataJson, renderDocsRelatedMarkdownLines, renderDocsRobotsGeneratedBlock, renderDocsRobotsTxt, renderDocsSitemapMarkdown, renderDocsSitemapXml, renderDocsSkillDocument, resolveAskAISearchRequestConfig, resolveChangelogConfig, resolveDocsAgentFeedbackConfig, resolveDocsAgentFeedbackRequest, resolveDocsAgentMdxContent, resolveDocsAgentsFormat, resolveDocsAnalyticsConfig, resolveDocsI18n, resolveDocsLlmsTxtFormat, resolveDocsLlmsTxtRequest, resolveDocsLlmsTxtSections, resolveDocsLocale, resolveDocsMarkdownCanonicalUrl, resolveDocsMarkdownRecovery, resolveDocsMarkdownRequest, resolveDocsMetadataBaseUrl, resolveDocsObservabilityConfig, resolveDocsOpenApiDiscoveryConfig, resolveDocsPath, resolveDocsRobotsConfig, resolveDocsRobotsRequest, resolveDocsSitemapConfig, resolveDocsSitemapPageLastmod, resolveDocsSitemapRequest, resolveDocsSkillFormat, resolveDocsTelemetryConfig, resolveOGImage, resolvePageReadingTime, resolvePageSidebarFolderIndexBehavior, resolveReadingTimeFromContent, resolveReadingTimeFromSource, resolveReadingTimeOptions, resolveSearchRequestConfig, resolveSidebarFolderIndexBehavior, resolveSidebarFolderIndexBehaviorForPath, resolveTitle, selectDocsLlmsTxtContent, serializeGeneratedAgentDocument, stripGeneratedAgentProvenance, toDocsMarkdownUrl, toDocsSitemapMarkdownUrl, upsertDocsRobotsGeneratedBlock, validateDocsAgentFeedbackPayload };
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
import "./search-
|
|
2
|
-
import "./agent-
|
|
3
|
-
import "./sitemap-server-
|
|
1
|
+
import "./search-DU-_y6YA.mjs";
|
|
2
|
+
import "./agent-B6szuz_8.mjs";
|
|
3
|
+
import "./sitemap-server-D39E3W5j.mjs";
|
|
4
4
|
import { createFilesystemDocsMcpSource, resolveDocsMcpConfig, runDocsMcpStdio } from "./mcp.mjs";
|
|
5
5
|
import "./server.mjs";
|
|
6
6
|
import { c as readNavTitle, m as resolveDocsContentDir, n as extractObjectLiteral, o as readBooleanProperty, p as resolveDocsConfigPath, u as readStringProperty } from "./config-De5z-2LK.mjs";
|
|
7
7
|
import { readFileSync } from "node:fs";
|
|
8
|
+
import pc from "picocolors";
|
|
8
9
|
|
|
9
10
|
//#region src/cli/mcp.ts
|
|
10
11
|
async function runMcp(options = {}) {
|
|
12
|
+
if (options.setup) {
|
|
13
|
+
printHostedMcpSetup(options);
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
11
16
|
const rootDir = process.cwd();
|
|
12
17
|
const content = readFileSync(resolveDocsConfigPath(rootDir, options.configPath), "utf-8");
|
|
13
18
|
const entry = readStringProperty(content, "entry") ?? "docs";
|
|
@@ -25,6 +30,49 @@ async function runMcp(options = {}) {
|
|
|
25
30
|
defaultName: navTitle ?? "@farming-labs/docs"
|
|
26
31
|
});
|
|
27
32
|
}
|
|
33
|
+
function normalizeApiBaseUrl(value) {
|
|
34
|
+
return (value?.trim() || "https://api.farming-labs.dev").replace(/\/+$/g, "");
|
|
35
|
+
}
|
|
36
|
+
function printHostedMcpSetup(options) {
|
|
37
|
+
const deploymentId = options.deploymentId?.trim();
|
|
38
|
+
if (!deploymentId) {
|
|
39
|
+
console.error(pc.red("Missing MCP deployment id."));
|
|
40
|
+
console.error();
|
|
41
|
+
console.error(`Run ${pc.cyan("npx @farming-labs/docs mcp setup --deployment <deployment-id>")}.`);
|
|
42
|
+
process.exit(1);
|
|
43
|
+
}
|
|
44
|
+
const endpoint = `${normalizeApiBaseUrl(options.apiBaseUrl)}/v1/mcp/${deploymentId}`;
|
|
45
|
+
const jsonConfig = { mcpServers: { "docs-cloud": {
|
|
46
|
+
command: "npx",
|
|
47
|
+
args: [
|
|
48
|
+
"@farming-labs/docs",
|
|
49
|
+
"mcp",
|
|
50
|
+
"setup",
|
|
51
|
+
"--deployment",
|
|
52
|
+
deploymentId
|
|
53
|
+
]
|
|
54
|
+
} } };
|
|
55
|
+
if (options.json) {
|
|
56
|
+
console.log(JSON.stringify(jsonConfig, null, 2));
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
console.log(pc.bold("Docs Cloud MCP deployment"));
|
|
60
|
+
console.log(pc.dim(`Deployment: ${deploymentId}`));
|
|
61
|
+
console.log();
|
|
62
|
+
console.log(pc.cyan("CLI stdio"));
|
|
63
|
+
console.log(` npx @farming-labs/docs mcp setup --deployment ${deploymentId}`);
|
|
64
|
+
console.log();
|
|
65
|
+
console.log(pc.cyan("Streamable HTTP"));
|
|
66
|
+
console.log(` ${endpoint}`);
|
|
67
|
+
console.log();
|
|
68
|
+
console.log(pc.cyan("SSE"));
|
|
69
|
+
console.log(` ${endpoint}/sse`);
|
|
70
|
+
console.log();
|
|
71
|
+
console.log(pc.cyan("MCP client JSON"));
|
|
72
|
+
console.log(JSON.stringify(jsonConfig, null, 2));
|
|
73
|
+
console.log();
|
|
74
|
+
console.log(pc.dim("Set DOCS_CLOUD_API_KEY in the agent environment before connecting."));
|
|
75
|
+
}
|
|
28
76
|
function readMcpConfig(content) {
|
|
29
77
|
if (content.match(/mcp\s*:\s*false/)) return false;
|
|
30
78
|
if (content.match(/mcp\s*:\s*true/)) return true;
|
package/dist/mcp.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as emitDocsTelemetryProjectEvent, E as emitDocsTelemetryMcpToolEvent, F as emitDocsAnalyticsEvent, M as createDocsAgentTraceContext, N as createDocsAgentTraceId, P as emitDocsAgentTraceEvent, u as performDocsSearch, w as emitDocsTelemetryAgentSurfaceEvent, x as resolvePageSidebarFolderIndexBehavior, y as stripGeneratedAgentProvenance } from "./search-
|
|
2
|
-
import {
|
|
1
|
+
import { D as emitDocsTelemetryProjectEvent, E as emitDocsTelemetryMcpToolEvent, F as emitDocsAnalyticsEvent, M as createDocsAgentTraceContext, N as createDocsAgentTraceId, P as emitDocsAgentTraceEvent, u as performDocsSearch, w as emitDocsTelemetryAgentSurfaceEvent, x as resolvePageSidebarFolderIndexBehavior, y as stripGeneratedAgentProvenance } from "./search-DU-_y6YA.mjs";
|
|
2
|
+
import { Nt as normalizeDocsRelated, Pt as renderDocsRelatedMarkdownLines } from "./agent-B6szuz_8.mjs";
|
|
3
3
|
import matter from "gray-matter";
|
|
4
4
|
import fs from "node:fs";
|
|
5
5
|
import path from "node:path";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./agent-
|
|
2
|
-
import { c as renderDocsRobotsGeneratedBlock, f as upsertDocsRobotsGeneratedBlock, i as DOCS_ROBOTS_GENERATED_BLOCK_START, r as DOCS_ROBOTS_GENERATED_BLOCK_END, u as resolveDocsRobotsConfig } from "./robots-
|
|
1
|
+
import "./agent-B6szuz_8.mjs";
|
|
2
|
+
import { c as renderDocsRobotsGeneratedBlock, f as upsertDocsRobotsGeneratedBlock, i as DOCS_ROBOTS_GENERATED_BLOCK_START, r as DOCS_ROBOTS_GENERATED_BLOCK_END, u as resolveDocsRobotsConfig } from "./robots-CVoC0w0i.mjs";
|
|
3
3
|
import { f as readTopLevelStringProperty, i as loadDocsConfigModule, o as readBooleanProperty, p as resolveDocsConfigPath, t as extractNestedObjectLiteral, u as readStringProperty } from "./config-De5z-2LK.mjs";
|
|
4
4
|
import { t as detectFramework } from "./utils-CoHZJ1i4.mjs";
|
|
5
5
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S as DEFAULT_MCP_WELL_KNOWN_ROUTE, T as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, X as normalizeDocsPathSegment, a as DEFAULT_AGENT_MD_ROUTE, b as DEFAULT_MCP_PUBLIC_ROUTE, c as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, g as DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, h as DEFAULT_LLMS_FULL_TXT_ROUTE, kt as resolveDocsSitemapConfig, l as DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, o as DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, t as DEFAULT_AGENTS_MD_ROUTE, v as DEFAULT_LLMS_TXT_ROUTE, w as DEFAULT_SKILL_MD_ROUTE, y as DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE } from "./agent-B6szuz_8.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/robots.ts
|
|
4
4
|
const DEFAULT_ROBOTS_TXT_ROUTE = "/robots.txt";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as buildDocsSearchDocuments, r as createAlgoliaSearchAdapter, s as createTypesenseSearchAdapter } from "./search-
|
|
2
|
-
import "./agent-
|
|
3
|
-
import "./sitemap-server-
|
|
1
|
+
import { n as buildDocsSearchDocuments, r as createAlgoliaSearchAdapter, s as createTypesenseSearchAdapter } from "./search-DU-_y6YA.mjs";
|
|
2
|
+
import "./agent-B6szuz_8.mjs";
|
|
3
|
+
import "./sitemap-server-D39E3W5j.mjs";
|
|
4
4
|
import { createFilesystemDocsMcpSource } from "./mcp.mjs";
|
|
5
5
|
import "./server.mjs";
|
|
6
6
|
import { a as loadProjectEnv, f as readTopLevelStringProperty, m as resolveDocsContentDir, p as resolveDocsConfigPath } from "./config-De5z-2LK.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { H as isDocsAgentsRequest, J as isDocsSkillRequest, V as isDocsAgentDiscoveryRequest, at as resolveDocsAgentFeedbackRequest, ht as resolveDocsSkillFormat, it as resolveDocsAgentFeedbackConfig, lt as resolveDocsLlmsTxtRequest, pt as resolveDocsMarkdownRequest, st as resolveDocsAgentsFormat } from "./agent-B6szuz_8.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/cloud-analytics.ts
|
|
4
4
|
const DEFAULT_DOCS_CLOUD_ANALYTICS_ENDPOINT = "https://api.farming-labs.dev/v1/analytics/events";
|
package/dist/server.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { F as emitDocsAnalyticsEvent, I as emitDocsObservabilityEvent, L as getDocsRequestAnalyticsProperties, M as createDocsAgentTraceContext, N as createDocsAgentTraceId, P as emitDocsAgentTraceEvent, R as resolveDocsAnalyticsConfig, a as createMcpSearchAdapter, c as formatDocsAskAIPackageHints, d as resolveAskAISearchRequestConfig, f as resolveSearchRequestConfig, i as createCustomSearchAdapter, j as DOCS_AGENT_TRACE_EVENT_TYPES, l as inferDocsAskAIPackageHints, n as buildDocsSearchDocuments, o as createSimpleSearchAdapter, r as createAlgoliaSearchAdapter, s as createTypesenseSearchAdapter, t as buildDocsAskAIContext, u as performDocsSearch, z as resolveDocsObservabilityConfig } from "./search-
|
|
2
|
-
import { Ct as
|
|
3
|
-
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-
|
|
1
|
+
import { F as emitDocsAnalyticsEvent, I as emitDocsObservabilityEvent, L as getDocsRequestAnalyticsProperties, M as createDocsAgentTraceContext, N as createDocsAgentTraceId, P as emitDocsAgentTraceEvent, R as resolveDocsAnalyticsConfig, a as createMcpSearchAdapter, c as formatDocsAskAIPackageHints, d as resolveAskAISearchRequestConfig, f as resolveSearchRequestConfig, i as createCustomSearchAdapter, j as DOCS_AGENT_TRACE_EVENT_TYPES, l as inferDocsAskAIPackageHints, n as buildDocsSearchDocuments, o as createSimpleSearchAdapter, r as createAlgoliaSearchAdapter, s as createTypesenseSearchAdapter, t as buildDocsAskAIContext, u as performDocsSearch, z as resolveDocsObservabilityConfig } from "./search-DU-_y6YA.mjs";
|
|
2
|
+
import { At as resolveDocsSitemapPageLastmod, Ct as DEFAULT_SITEMAP_XML_ROUTE, Dt as renderDocsSitemapMarkdown, Et as readDocsSitemapManifestFromContentMap, Mt as toDocsSitemapMarkdownUrl, Ot as renderDocsSitemapXml, St as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, Tt as createDocsSitemapResponse, bt as DEFAULT_SITEMAP_MD_DOCS_ROUTE, jt as resolveDocsSitemapRequest, kt as resolveDocsSitemapConfig, wt as buildDocsSitemapManifest, xt as DEFAULT_SITEMAP_MD_ROUTE, yt as DEFAULT_SITEMAP_MANIFEST_PATH } from "./agent-B6szuz_8.mjs";
|
|
3
|
+
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-D39E3W5j.mjs";
|
|
4
4
|
import { a as ensureDocsReviewWorkflow, i as buildDocsReviewWorkflowPathFilters, n as DEFAULT_DOCS_REVIEW_WORKFLOW_PATH, o as readDocsReviewConfigFromSource, r as buildDocsReviewWorkflow, s as resolveDocsReviewConfig, t as DEFAULT_DOCS_REVIEW_SCORE_THRESHOLD } from "./review-CJD85JTm.mjs";
|
|
5
5
|
import { createDocsMcpHttpHandler, createDocsMcpServer, createFilesystemDocsMcpSource, normalizeDocsMcpRoute, resolveDocsMcpConfig, runDocsMcpStdio } from "./mcp.mjs";
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./search-
|
|
2
|
-
import {
|
|
3
|
-
import "./sitemap-server-
|
|
1
|
+
import "./search-DU-_y6YA.mjs";
|
|
2
|
+
import { Dt as renderDocsSitemapMarkdown, Ot as renderDocsSitemapXml, kt as resolveDocsSitemapConfig, wt as buildDocsSitemapManifest } from "./agent-B6szuz_8.mjs";
|
|
3
|
+
import "./sitemap-server-D39E3W5j.mjs";
|
|
4
4
|
import { createFilesystemDocsMcpSource } from "./mcp.mjs";
|
|
5
5
|
import "./server.mjs";
|
|
6
6
|
import { c as readNavTitle, f as readTopLevelStringProperty, i as loadDocsConfigModule, m as resolveDocsContentDir, o as readBooleanProperty, p as resolveDocsConfigPath, t as extractNestedObjectLiteral, u as readStringProperty } from "./config-De5z-2LK.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { kt as resolveDocsSitemapConfig } from "./agent-B6szuz_8.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";
|