@farming-labs/docs 0.2.30 → 0.2.32
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-BpPhLG_h.mjs → agent-BaiQvHO9.mjs} +5 -5
- package/dist/{agent-DEr3FFdg.mjs → agent-DTMhPZtU.mjs} +213 -1
- package/dist/{agents-spZpwT1w.mjs → agents-BCi3Jfr-.mjs} +3 -3
- package/dist/cli/index.mjs +16 -16
- package/dist/{codeblocks-Dcn5tRbB.mjs → codeblocks-DbaQ6PA5.mjs} +38 -31
- package/dist/{doctor-C_djsk99.mjs → doctor-DRw8FhkQ.mjs} +6 -6
- package/dist/index.d.mts +42 -3
- package/dist/index.mjs +4 -4
- package/dist/{mcp-DVipSdBh.mjs → mcp-HtLVW_s5.mjs} +3 -3
- package/dist/mcp.d.mts +1 -1
- package/dist/mcp.mjs +2 -2
- package/dist/{robots-BcP7nSfi.mjs → robots-Dq9xghyE.mjs} +1 -1
- package/dist/{robots-BzO2bi0d.mjs → robots-Dy3cdwPo.mjs} +2 -2
- package/dist/{search-DiFxtL5t.mjs → search-BA76-30z.mjs} +3 -3
- package/dist/{search-CSJNTYNX.mjs → search-BButtgQB.mjs} +3 -3
- package/dist/{search-D_xnvMMK.d.mts → search-Cl5YUeI_.d.mts} +1 -1
- package/dist/server.d.mts +2 -2
- package/dist/server.mjs +3 -3
- package/dist/{sitemap-vHpdCag9.mjs → sitemap-C4yINpdU.mjs} +3 -3
- package/dist/{sitemap-server-RZG9eOJB.mjs → sitemap-server-y96rUcF4.mjs} +1 -1
- package/dist/{types-5-f3AZ9z.d.mts → types-C5yQrqXc.d.mts} +10 -5
- package/package.json +1 -1
|
@@ -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-BA76-30z.mjs";
|
|
3
|
+
import "./agent-DTMhPZtU.mjs";
|
|
4
|
+
import "./robots-Dq9xghyE.mjs";
|
|
5
|
+
import "./sitemap-server-y96rUcF4.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-DbaQ6PA5.mjs";
|
|
8
8
|
|
|
9
9
|
export { compactAgentDocs, parseAgentCompactArgs, printAgentCompactHelp };
|
|
@@ -300,6 +300,8 @@ function createDocsSitemapResponse({ request, sitemap, entry = "docs", siteTitle
|
|
|
300
300
|
//#endregion
|
|
301
301
|
//#region src/agent.ts
|
|
302
302
|
const DEFAULT_DOCS_API_ROUTE = "/api/docs";
|
|
303
|
+
const DEFAULT_DOCS_CONFIG_FORMAT = "docs-config-map.v1";
|
|
304
|
+
const DEFAULT_DOCS_CONFIG_ROUTE = `${DEFAULT_DOCS_API_ROUTE}?format=config`;
|
|
303
305
|
const DEFAULT_OPENAPI_SCHEMA_ROUTE = `${DEFAULT_DOCS_API_ROUTE}?format=openapi`;
|
|
304
306
|
const DEFAULT_AGENT_SPEC_ROUTE = "/api/docs/agent/spec";
|
|
305
307
|
const DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE = "/.well-known/agent";
|
|
@@ -455,6 +457,44 @@ const COMMON_SECOND_LEVEL_PUBLIC_SUFFIX_LABELS = new Set([
|
|
|
455
457
|
"or",
|
|
456
458
|
"org"
|
|
457
459
|
]);
|
|
460
|
+
const DOCS_CONFIG_MAP_TOP_LEVEL_KEYS = [
|
|
461
|
+
"entry",
|
|
462
|
+
"docsPath",
|
|
463
|
+
"contentDir",
|
|
464
|
+
"i18n",
|
|
465
|
+
"staticExport",
|
|
466
|
+
"theme",
|
|
467
|
+
"analytics",
|
|
468
|
+
"telemetry",
|
|
469
|
+
"cloud",
|
|
470
|
+
"observability",
|
|
471
|
+
"github",
|
|
472
|
+
"nav",
|
|
473
|
+
"themeToggle",
|
|
474
|
+
"breadcrumb",
|
|
475
|
+
"sidebar",
|
|
476
|
+
"components",
|
|
477
|
+
"onCopyClick",
|
|
478
|
+
"codeBlocks",
|
|
479
|
+
"feedback",
|
|
480
|
+
"mcp",
|
|
481
|
+
"icons",
|
|
482
|
+
"pageActions",
|
|
483
|
+
"search",
|
|
484
|
+
"lastUpdated",
|
|
485
|
+
"readingTime",
|
|
486
|
+
"ai",
|
|
487
|
+
"ordering",
|
|
488
|
+
"llmsTxt",
|
|
489
|
+
"sitemap",
|
|
490
|
+
"robots",
|
|
491
|
+
"changelog",
|
|
492
|
+
"apiReference",
|
|
493
|
+
"agent",
|
|
494
|
+
"review",
|
|
495
|
+
"metadata",
|
|
496
|
+
"og"
|
|
497
|
+
];
|
|
458
498
|
function normalizeDocsPathSegment(value) {
|
|
459
499
|
return value.replace(/^\/+|\/+$/g, "");
|
|
460
500
|
}
|
|
@@ -466,6 +506,173 @@ function normalizeDocsUrlPath(value) {
|
|
|
466
506
|
function isPlainObject(value) {
|
|
467
507
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
468
508
|
}
|
|
509
|
+
function isDocsConfigRequest(url) {
|
|
510
|
+
return url.searchParams.get("format")?.trim() === "config";
|
|
511
|
+
}
|
|
512
|
+
function buildDocsConfigMap(config, options = {}) {
|
|
513
|
+
const pointers = {};
|
|
514
|
+
const values = serializeDocsConfigMapValue(pickDocsConfigMapValues(config), [], /* @__PURE__ */ new WeakSet(), pointers);
|
|
515
|
+
const mappedValues = isPlainObject(values) ? values : {};
|
|
516
|
+
const language = containsDocsConfigKind(mappedValues, "jsx") ? "tsx" : "ts";
|
|
517
|
+
return {
|
|
518
|
+
schemaVersion: 1,
|
|
519
|
+
format: DEFAULT_DOCS_CONFIG_FORMAT,
|
|
520
|
+
source: {
|
|
521
|
+
file: options.file ?? (language === "tsx" ? "docs.config.tsx" : "docs.config.ts"),
|
|
522
|
+
language
|
|
523
|
+
},
|
|
524
|
+
serialization: {
|
|
525
|
+
mode: "json-safe",
|
|
526
|
+
redacted: "Scalar values under secret-like keys such as apiKey, token, secret, password, authorization, and credential are redacted unless the key ends with Env.",
|
|
527
|
+
nonSerializable: "described"
|
|
528
|
+
},
|
|
529
|
+
values: mappedValues,
|
|
530
|
+
pointers
|
|
531
|
+
};
|
|
532
|
+
}
|
|
533
|
+
function pickDocsConfigMapValues(config) {
|
|
534
|
+
const output = {};
|
|
535
|
+
for (const key of DOCS_CONFIG_MAP_TOP_LEVEL_KEYS) if (Object.prototype.hasOwnProperty.call(config, key)) output[key] = config[key];
|
|
536
|
+
return output;
|
|
537
|
+
}
|
|
538
|
+
function serializeDocsConfigMapValue(value, path, seen, pointers, depth = 0) {
|
|
539
|
+
const key = path.at(-1) ?? "";
|
|
540
|
+
const pointerPath = toDocsConfigJsonPointer(path);
|
|
541
|
+
const setPointer = (kind) => {
|
|
542
|
+
if (path.length > 0) pointers[pointerPath] = {
|
|
543
|
+
path: toDocsConfigDotPath(path),
|
|
544
|
+
kind
|
|
545
|
+
};
|
|
546
|
+
};
|
|
547
|
+
if (value === void 0) return void 0;
|
|
548
|
+
if (shouldRedactDocsConfigKey(key) && value !== null && typeof value !== "object") {
|
|
549
|
+
setPointer("secret");
|
|
550
|
+
return {
|
|
551
|
+
$kind: "secret",
|
|
552
|
+
value: "[redacted]"
|
|
553
|
+
};
|
|
554
|
+
}
|
|
555
|
+
if (value === null || typeof value === "string" || typeof value === "boolean") {
|
|
556
|
+
setPointer(typeof value);
|
|
557
|
+
return value;
|
|
558
|
+
}
|
|
559
|
+
if (typeof value === "number") {
|
|
560
|
+
setPointer("number");
|
|
561
|
+
return Number.isFinite(value) ? value : String(value);
|
|
562
|
+
}
|
|
563
|
+
if (typeof value === "bigint") {
|
|
564
|
+
setPointer("bigint");
|
|
565
|
+
return {
|
|
566
|
+
$kind: "bigint",
|
|
567
|
+
value: value.toString()
|
|
568
|
+
};
|
|
569
|
+
}
|
|
570
|
+
if (typeof value === "symbol") {
|
|
571
|
+
setPointer("symbol");
|
|
572
|
+
return {
|
|
573
|
+
$kind: "symbol",
|
|
574
|
+
value: String(value)
|
|
575
|
+
};
|
|
576
|
+
}
|
|
577
|
+
if (typeof value === "function") {
|
|
578
|
+
setPointer("function");
|
|
579
|
+
return {
|
|
580
|
+
$kind: "function",
|
|
581
|
+
name: getDocsConfigFunctionName(value)
|
|
582
|
+
};
|
|
583
|
+
}
|
|
584
|
+
if (value instanceof Date) {
|
|
585
|
+
setPointer("date");
|
|
586
|
+
return {
|
|
587
|
+
$kind: "date",
|
|
588
|
+
value: value.toISOString()
|
|
589
|
+
};
|
|
590
|
+
}
|
|
591
|
+
if (value instanceof URL) {
|
|
592
|
+
setPointer("url");
|
|
593
|
+
return value.toString();
|
|
594
|
+
}
|
|
595
|
+
if (depth >= 10) {
|
|
596
|
+
setPointer("truncated");
|
|
597
|
+
return {
|
|
598
|
+
$kind: "truncated",
|
|
599
|
+
reason: "Exceeded max depth of 10."
|
|
600
|
+
};
|
|
601
|
+
}
|
|
602
|
+
if (Array.isArray(value)) {
|
|
603
|
+
setPointer("array");
|
|
604
|
+
return value.map((entry, index) => serializeDocsConfigMapValue(entry, [...path, String(index)], seen, pointers, depth + 1)).filter((entry) => entry !== void 0);
|
|
605
|
+
}
|
|
606
|
+
if (isDocsConfigReactElement(value)) {
|
|
607
|
+
setPointer("jsx");
|
|
608
|
+
return {
|
|
609
|
+
$kind: "jsx",
|
|
610
|
+
component: getDocsConfigReactElementName(value)
|
|
611
|
+
};
|
|
612
|
+
}
|
|
613
|
+
if (seen.has(value)) {
|
|
614
|
+
setPointer("circular");
|
|
615
|
+
return { $kind: "circular" };
|
|
616
|
+
}
|
|
617
|
+
seen.add(value);
|
|
618
|
+
const output = {};
|
|
619
|
+
for (const [childKey, childValue] of Object.entries(value)) {
|
|
620
|
+
const serialized = serializeDocsConfigMapValue(childValue, [...path, childKey], seen, pointers, depth + 1);
|
|
621
|
+
if (serialized !== void 0) output[childKey] = serialized;
|
|
622
|
+
}
|
|
623
|
+
seen.delete(value);
|
|
624
|
+
if (path.length === 1 && path[0] === "theme") {
|
|
625
|
+
setPointer("theme");
|
|
626
|
+
return {
|
|
627
|
+
$kind: "theme",
|
|
628
|
+
...output
|
|
629
|
+
};
|
|
630
|
+
}
|
|
631
|
+
setPointer("object");
|
|
632
|
+
return output;
|
|
633
|
+
}
|
|
634
|
+
function shouldRedactDocsConfigKey(key) {
|
|
635
|
+
const normalized = key.replace(/[-_]/g, "").toLowerCase();
|
|
636
|
+
if (!normalized || normalized === "env" || normalized.endsWith("env")) return false;
|
|
637
|
+
return normalized.includes("apikey") || normalized.includes("token") || normalized.includes("secret") || normalized.includes("password") || normalized.includes("authorization") || normalized.includes("credential");
|
|
638
|
+
}
|
|
639
|
+
function isDocsConfigReactElement(value) {
|
|
640
|
+
if (!isPlainObject(value) || !("$$typeof" in value)) return false;
|
|
641
|
+
return String(value.$$typeof).includes("react.");
|
|
642
|
+
}
|
|
643
|
+
function getDocsConfigReactElementName(value) {
|
|
644
|
+
const type = value.type;
|
|
645
|
+
if (typeof type === "string") return type;
|
|
646
|
+
if (typeof type === "function") return getDocsConfigFunctionName(type);
|
|
647
|
+
if (isPlainObject(type)) {
|
|
648
|
+
const displayName = type.displayName;
|
|
649
|
+
if (typeof displayName === "string") return displayName;
|
|
650
|
+
const render = type.render;
|
|
651
|
+
if (typeof render === "function") return getDocsConfigFunctionName(render);
|
|
652
|
+
}
|
|
653
|
+
return "unknown";
|
|
654
|
+
}
|
|
655
|
+
function getDocsConfigFunctionName(value) {
|
|
656
|
+
const displayName = value.displayName;
|
|
657
|
+
return typeof displayName === "string" ? displayName : value.name || "anonymous";
|
|
658
|
+
}
|
|
659
|
+
function toDocsConfigJsonPointer(path) {
|
|
660
|
+
return path.length === 0 ? "" : `/${path.map(escapeDocsConfigJsonPointerPart).join("/")}`;
|
|
661
|
+
}
|
|
662
|
+
function escapeDocsConfigJsonPointerPart(value) {
|
|
663
|
+
return value.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
664
|
+
}
|
|
665
|
+
function toDocsConfigDotPath(path) {
|
|
666
|
+
return path.map((part, index) => /^\d+$/.test(part) ? `[${part}]` : index === 0 ? part : `.${part}`).join("");
|
|
667
|
+
}
|
|
668
|
+
function containsDocsConfigKind(value, kind) {
|
|
669
|
+
if (!isPlainObject(value)) {
|
|
670
|
+
if (!Array.isArray(value)) return false;
|
|
671
|
+
}
|
|
672
|
+
if (Array.isArray(value)) return value.some((entry) => containsDocsConfigKind(entry, kind));
|
|
673
|
+
if (value["$kind"] === kind) return true;
|
|
674
|
+
return Object.values(value).some((entry) => containsDocsConfigKind(entry, kind));
|
|
675
|
+
}
|
|
469
676
|
function normalizeDocsAgentFeedbackRoute(route, fallback = DEFAULT_AGENT_FEEDBACK_ROUTE) {
|
|
470
677
|
if (!route || route.trim().length === 0) return fallback;
|
|
471
678
|
const normalized = `/${route}`.replace(/\/+/g, "/");
|
|
@@ -1514,6 +1721,7 @@ function buildDocsAgentDiscoverySpec({ origin, entry = "docs", i18n = null, sear
|
|
|
1514
1721
|
},
|
|
1515
1722
|
api: {
|
|
1516
1723
|
docs: DEFAULT_DOCS_API_ROUTE,
|
|
1724
|
+
config: DEFAULT_DOCS_CONFIG_ROUTE,
|
|
1517
1725
|
agentSpec: DEFAULT_AGENT_SPEC_ROUTE,
|
|
1518
1726
|
agentSpecDefault: DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE,
|
|
1519
1727
|
agentSpecFallback: DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE,
|
|
@@ -1523,6 +1731,10 @@ function buildDocsAgentDiscoverySpec({ origin, entry = "docs", i18n = null, sear
|
|
|
1523
1731
|
agents: `${DEFAULT_DOCS_API_ROUTE}?format=agents`,
|
|
1524
1732
|
openapi: DEFAULT_OPENAPI_SCHEMA_ROUTE
|
|
1525
1733
|
},
|
|
1734
|
+
config: {
|
|
1735
|
+
format: DEFAULT_DOCS_CONFIG_FORMAT,
|
|
1736
|
+
endpoint: DEFAULT_DOCS_CONFIG_ROUTE
|
|
1737
|
+
},
|
|
1526
1738
|
markdown: {
|
|
1527
1739
|
enabled: true,
|
|
1528
1740
|
acceptHeader: markdown?.acceptHeader === false ? null : "text/markdown",
|
|
@@ -1731,4 +1943,4 @@ function toYamlString(value) {
|
|
|
1731
1943
|
}
|
|
1732
1944
|
|
|
1733
1945
|
//#endregion
|
|
1734
|
-
export {
|
|
1946
|
+
export { renderDocsSkillDocument as $, buildDocsConfigMap as A, renderDocsRelatedMarkdownLines as At, isDocsConfigRequest as B, DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE as C, renderDocsSitemapMarkdown as Ct, DOCS_TRADITIONAL_BOT_USER_AGENT_HEADER_PATTERN as D, resolveDocsSitemapRequest as Dt, DOCS_MARKDOWN_SIGNATURE_AGENT_HEADER as E, resolveDocsSitemapPageLastmod as Et, getDocsMarkdownCanonicalLinkHeader as F, matchesDocsLlmsTxtSection as G, isDocsMcpRequest as H, getDocsMarkdownVaryHeader as I, parseDocsAgentFeedbackData as J, normalizeDocsPathSegment as K, hasDocsMarkdownSignatureAgent as L, detectDocsMarkdownAgentRequest as M, findDocsMarkdownPage as N, buildDocsAgentDiscoverySpec as O, toDocsSitemapMarkdownUrl as Ot, getDocsLlmsTxtMaxCharsIssue as P, renderDocsMarkdownNotFound as Q, isDocsAgentDiscoveryRequest as R, DEFAULT_SKILL_MD_ROUTE as S, readDocsSitemapManifestFromContentMap as St, DOCS_BOT_LIKE_USER_AGENT_HEADER_PATTERN as T, resolveDocsSitemapConfig as Tt, isDocsPublicGetRequest as U, isDocsLlmsTxtPublicRequest as V, isDocsSkillRequest as W, renderDocsLlmsTxt as X, renderDocsAgentsDocument as Y, renderDocsMarkdownDocument as Z, DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE as _, DEFAULT_SITEMAP_MD_ROUTE as _t, DEFAULT_AGENT_MD_ROUTE as a, resolveDocsLlmsTxtRequest as at, DEFAULT_MCP_WELL_KNOWN_ROUTE as b, buildDocsSitemapManifest as bt, DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE as c, resolveDocsMarkdownRecovery as ct, DEFAULT_DOCS_CONFIG_FORMAT as d, resolveDocsSkillFormat as dt, resolveDocsAgentFeedbackConfig as et, DEFAULT_DOCS_CONFIG_ROUTE as f, selectDocsLlmsTxtContent as ft, DEFAULT_LLMS_TXT_ROUTE as g, DEFAULT_SITEMAP_MD_DOCS_ROUTE as gt, DEFAULT_LLMS_TXT_MAX_CHARS as h, DEFAULT_SITEMAP_MANIFEST_PATH as ht, DEFAULT_AGENT_FEEDBACK_ROUTE as i, resolveDocsLlmsTxtFormat as it, buildDocsMcpEndpointCandidates as j, buildDocsAgentFeedbackSchema as k, normalizeDocsRelated as kt, DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE as l, resolveDocsMarkdownRequest as lt, DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE as m, validateDocsAgentFeedbackPayload as mt, DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE as n, resolveDocsAgentMdxContent as nt, DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE as o, resolveDocsLlmsTxtSections as ot, DEFAULT_LLMS_FULL_TXT_ROUTE as p, toDocsMarkdownUrl as pt, normalizeDocsUrlPath as q, DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA as r, resolveDocsAgentsFormat as rt, DEFAULT_AGENT_SPEC_ROUTE as s, resolveDocsMarkdownCanonicalUrl as st, DEFAULT_AGENTS_MD_ROUTE as t, resolveDocsAgentFeedbackRequest as tt, DEFAULT_DOCS_API_ROUTE as u, resolveDocsOpenApiDiscoveryConfig as ut, DEFAULT_MCP_PUBLIC_ROUTE as v, DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE as vt, DOCS_AI_AGENT_USER_AGENT_HEADER_PATTERN as w, renderDocsSitemapXml as wt, DEFAULT_OPENAPI_SCHEMA_ROUTE as x, createDocsSitemapResponse as xt, DEFAULT_MCP_ROUTE as y, DEFAULT_SITEMAP_XML_ROUTE as yt, isDocsAgentsRequest as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./search-
|
|
2
|
-
import {
|
|
3
|
-
import { S as resolveApiReferenceConfig } from "./sitemap-server-
|
|
1
|
+
import "./search-BA76-30z.mjs";
|
|
2
|
+
import { Y as renderDocsAgentsDocument, a as DEFAULT_AGENT_MD_ROUTE, et as resolveDocsAgentFeedbackConfig, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, o as DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, t as DEFAULT_AGENTS_MD_ROUTE, x as DEFAULT_OPENAPI_SCHEMA_ROUTE } from "./agent-DTMhPZtU.mjs";
|
|
3
|
+
import { S as resolveApiReferenceConfig } from "./sitemap-server-y96rUcF4.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
|
@@ -132,10 +132,10 @@ async function main() {
|
|
|
132
132
|
printCloudHelp();
|
|
133
133
|
process.exit(1);
|
|
134
134
|
} else if (parsedCommand.command === "mcp") {
|
|
135
|
-
const { runMcp } = await import("../mcp-
|
|
135
|
+
const { runMcp } = await import("../mcp-HtLVW_s5.mjs");
|
|
136
136
|
await runMcp(mcpOptions);
|
|
137
137
|
} else if (parsedCommand.command === "agent" && subcommand === "compact") {
|
|
138
|
-
const { compactAgentDocs, parseAgentCompactArgs, printAgentCompactHelp } = await import("../agent-
|
|
138
|
+
const { compactAgentDocs, parseAgentCompactArgs, printAgentCompactHelp } = await import("../agent-BaiQvHO9.mjs");
|
|
139
139
|
const agentCompactOptions = parseAgentCompactArgs(args.slice(2));
|
|
140
140
|
if (agentCompactOptions.help) {
|
|
141
141
|
printAgentCompactHelp();
|
|
@@ -145,11 +145,11 @@ async function main() {
|
|
|
145
145
|
} else if (parsedCommand.command === "agent") {
|
|
146
146
|
console.error(pc.red(`Unknown agent subcommand: ${subcommand ?? "(missing)"}`));
|
|
147
147
|
console.error();
|
|
148
|
-
const { printAgentCompactHelp } = await import("../agent-
|
|
148
|
+
const { printAgentCompactHelp } = await import("../agent-BaiQvHO9.mjs");
|
|
149
149
|
printAgentCompactHelp();
|
|
150
150
|
process.exit(1);
|
|
151
151
|
} else if (parsedCommand.command === "agents" && subcommand === "generate") {
|
|
152
|
-
const { generateAgents, parseAgentsGenerateArgs, printAgentsGenerateHelp } = await import("../agents-
|
|
152
|
+
const { generateAgents, parseAgentsGenerateArgs, printAgentsGenerateHelp } = await import("../agents-BCi3Jfr-.mjs");
|
|
153
153
|
const agentsOptions = parseAgentsGenerateArgs(args.slice(2));
|
|
154
154
|
if (agentsOptions.help) {
|
|
155
155
|
printAgentsGenerateHelp();
|
|
@@ -159,11 +159,11 @@ async function main() {
|
|
|
159
159
|
} else if (parsedCommand.command === "agents") {
|
|
160
160
|
console.error(pc.red(`Unknown agents subcommand: ${subcommand ?? "(missing)"}`));
|
|
161
161
|
console.error();
|
|
162
|
-
const { printAgentsGenerateHelp } = await import("../agents-
|
|
162
|
+
const { printAgentsGenerateHelp } = await import("../agents-BCi3Jfr-.mjs");
|
|
163
163
|
printAgentsGenerateHelp();
|
|
164
164
|
process.exit(1);
|
|
165
165
|
} else if (parsedCommand.command === "doctor") {
|
|
166
|
-
const { parseDoctorArgs, printDoctorHelp, runDoctor } = await import("../doctor-
|
|
166
|
+
const { parseDoctorArgs, printDoctorHelp, runDoctor } = await import("../doctor-DRw8FhkQ.mjs");
|
|
167
167
|
const doctorOptions = parseDoctorArgs(args.slice(1));
|
|
168
168
|
if (doctorOptions.help) {
|
|
169
169
|
printDoctorHelp();
|
|
@@ -179,7 +179,7 @@ async function main() {
|
|
|
179
179
|
}
|
|
180
180
|
await runReview(reviewOptions);
|
|
181
181
|
} else if ((parsedCommand.command === "codeblocks" || parsedCommand.command === "code-blocks") && subcommand === "validate") {
|
|
182
|
-
const { parseCodeBlocksValidateArgs, printCodeBlocksValidateHelp, runCodeBlocksValidate } = await import("../codeblocks-
|
|
182
|
+
const { parseCodeBlocksValidateArgs, printCodeBlocksValidateHelp, runCodeBlocksValidate } = await import("../codeblocks-DbaQ6PA5.mjs");
|
|
183
183
|
const codeBlocksOptions = parseCodeBlocksValidateArgs(args.slice(2));
|
|
184
184
|
if (codeBlocksOptions.help) {
|
|
185
185
|
printCodeBlocksValidateHelp();
|
|
@@ -189,11 +189,11 @@ async function main() {
|
|
|
189
189
|
} else if (parsedCommand.command === "codeblocks" || parsedCommand.command === "code-blocks") {
|
|
190
190
|
console.error(pc.red(`Unknown codeblocks subcommand: ${subcommand ?? "(missing)"}`));
|
|
191
191
|
console.error();
|
|
192
|
-
const { printCodeBlocksValidateHelp } = await import("../codeblocks-
|
|
192
|
+
const { printCodeBlocksValidateHelp } = await import("../codeblocks-DbaQ6PA5.mjs");
|
|
193
193
|
printCodeBlocksValidateHelp();
|
|
194
194
|
process.exit(1);
|
|
195
195
|
} else if (parsedCommand.command === "search" && subcommand === "sync") {
|
|
196
|
-
const { syncSearch } = await import("../search-
|
|
196
|
+
const { syncSearch } = await import("../search-BButtgQB.mjs");
|
|
197
197
|
await syncSearch(searchSyncOptions);
|
|
198
198
|
} else if (parsedCommand.command === "search") {
|
|
199
199
|
console.error(pc.red(`Unknown search subcommand: ${subcommand ?? "(missing)"}`));
|
|
@@ -201,7 +201,7 @@ async function main() {
|
|
|
201
201
|
printHelp();
|
|
202
202
|
process.exit(1);
|
|
203
203
|
} else if (parsedCommand.command === "sitemap" && subcommand === "generate") {
|
|
204
|
-
const { generateSitemap, parseSitemapGenerateArgs, printSitemapGenerateHelp } = await import("../sitemap-
|
|
204
|
+
const { generateSitemap, parseSitemapGenerateArgs, printSitemapGenerateHelp } = await import("../sitemap-C4yINpdU.mjs");
|
|
205
205
|
const sitemapOptions = parseSitemapGenerateArgs(args.slice(2));
|
|
206
206
|
if (sitemapOptions.help) {
|
|
207
207
|
printSitemapGenerateHelp();
|
|
@@ -211,11 +211,11 @@ async function main() {
|
|
|
211
211
|
} else if (parsedCommand.command === "sitemap") {
|
|
212
212
|
console.error(pc.red(`Unknown sitemap subcommand: ${subcommand ?? "(missing)"}`));
|
|
213
213
|
console.error();
|
|
214
|
-
const { printSitemapGenerateHelp } = await import("../sitemap-
|
|
214
|
+
const { printSitemapGenerateHelp } = await import("../sitemap-C4yINpdU.mjs");
|
|
215
215
|
printSitemapGenerateHelp();
|
|
216
216
|
process.exit(1);
|
|
217
217
|
} else if (parsedCommand.command === "robots" && subcommand === "generate") {
|
|
218
|
-
const { generateRobots, parseRobotsGenerateArgs, printRobotsGenerateHelp } = await import("../robots-
|
|
218
|
+
const { generateRobots, parseRobotsGenerateArgs, printRobotsGenerateHelp } = await import("../robots-Dy3cdwPo.mjs");
|
|
219
219
|
const robotsOptions = parseRobotsGenerateArgs(args.slice(2));
|
|
220
220
|
if (robotsOptions.help) {
|
|
221
221
|
printRobotsGenerateHelp();
|
|
@@ -225,7 +225,7 @@ async function main() {
|
|
|
225
225
|
} else if (parsedCommand.command === "robots") {
|
|
226
226
|
console.error(pc.red(`Unknown robots subcommand: ${subcommand ?? "(missing)"}`));
|
|
227
227
|
console.error();
|
|
228
|
-
const { printRobotsGenerateHelp } = await import("../robots-
|
|
228
|
+
const { printRobotsGenerateHelp } = await import("../robots-Dy3cdwPo.mjs");
|
|
229
229
|
printRobotsGenerateHelp();
|
|
230
230
|
process.exit(1);
|
|
231
231
|
} else if (parsedCommand.command === "downgrade") {
|
|
@@ -331,9 +331,9 @@ ${pc.dim("Options for agent compact:")}
|
|
|
331
331
|
${pc.cyan("agent compact --stale")} Refresh only stale generated ${pc.dim("agent.md")} files
|
|
332
332
|
${pc.cyan("--page <slug|path>")} Repeatable explicit page flag; positional page args work too
|
|
333
333
|
${pc.cyan("--include-missing")} With ${pc.cyan("--stale")}, also create explicit or token-budget pages missing ${pc.dim("agent.md")}
|
|
334
|
-
${pc.cyan("--api-key <key>")}
|
|
335
|
-
${pc.cyan("--api-key-env <name>")}
|
|
336
|
-
${pc.cyan("--base-url <url>")} Override the
|
|
334
|
+
${pc.cyan("--api-key <key>")} Use an API key directly; prefer ${pc.dim("cloud.apiKey.env")}
|
|
335
|
+
${pc.cyan("--api-key-env <name>")} Env var name for the Docs Cloud API key; prefer ${pc.dim("cloud.apiKey.env")}
|
|
336
|
+
${pc.cyan("--base-url <url>")} Override the compression API base URL
|
|
337
337
|
${pc.cyan("--aggressiveness <0-1>")} Compression intensity for compacted output
|
|
338
338
|
${pc.cyan("--dry-run")} Resolve and compress pages without writing files
|
|
339
339
|
|
|
@@ -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-BA76-30z.mjs";
|
|
2
|
+
import { N as findDocsMarkdownPage, Z as renderDocsMarkdownDocument } from "./agent-DTMhPZtU.mjs";
|
|
3
3
|
import "./index.mjs";
|
|
4
4
|
import { createFilesystemDocsMcpSource } from "./mcp.mjs";
|
|
5
5
|
import "./server.mjs";
|
|
@@ -13,9 +13,10 @@ import { tmpdir } from "node:os";
|
|
|
13
13
|
import { promisify } from "node:util";
|
|
14
14
|
|
|
15
15
|
//#region src/cli/agent.ts
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
16
|
+
const DEFAULT_COMPRESSION_BASE_URL = "https://api.farming-labs.dev";
|
|
17
|
+
const DEFAULT_COMPRESSION_MODEL = "docs-cloud-compress-v1";
|
|
18
|
+
const DEFAULT_COMPRESSION_AGGRESSIVENESS = .3;
|
|
19
|
+
const DEFAULT_DOCS_CLOUD_API_KEY_ENV = "DOCS_CLOUD_API_KEY";
|
|
19
20
|
const INDEX_PAGE_BASENAMES = new Set([
|
|
20
21
|
"index",
|
|
21
22
|
"page",
|
|
@@ -177,8 +178,8 @@ function scanDocsPageTargets(rootDir, contentDir, entry) {
|
|
|
177
178
|
return targets;
|
|
178
179
|
}
|
|
179
180
|
function resolveCompressionEndpoint(rawBaseUrl) {
|
|
180
|
-
const baseUrl = rawBaseUrl ?? process.env.
|
|
181
|
-
if (/\/v1\/compress\/?$/i.test(baseUrl)) return baseUrl.replace(/\/+$/, "");
|
|
181
|
+
const baseUrl = rawBaseUrl ?? process.env.DOCS_CLOUD_COMPRESSION_BASE_URL ?? process.env.DOCS_CLOUD_API_BASE_URL ?? process.env.FARMING_LABS_DOCS_API_BASE_URL ?? DEFAULT_COMPRESSION_BASE_URL;
|
|
182
|
+
if (/\/v1\/(?:compress|agent\/compact)\/?$/i.test(baseUrl)) return baseUrl.replace(/\/+$/, "");
|
|
182
183
|
return `${baseUrl.replace(/\/+$/, "")}/v1/compress`;
|
|
183
184
|
}
|
|
184
185
|
function runGitCommand(rootDir, args) {
|
|
@@ -238,16 +239,18 @@ function listGitChangedFiles(rootDir, contentDir) {
|
|
|
238
239
|
return changedFiles;
|
|
239
240
|
}
|
|
240
241
|
function resolveCompressionApiKey(explicitApiKey, explicitApiKeyEnv) {
|
|
241
|
-
const
|
|
242
|
-
|
|
243
|
-
"
|
|
244
|
-
"
|
|
245
|
-
|
|
246
|
-
].filter((value) => typeof value === "string" && value.length > 0);
|
|
247
|
-
const apiKey = explicitApiKey ?? candidateKeys.map((key) => process.env[key]).find(Boolean);
|
|
248
|
-
if (!apiKey) throw new Error("Missing Token Company API key. Pass --api-key, set agent.compact.apiKey/apiKeyEnv, or set TOKEN_COMPANY_API_KEY.");
|
|
242
|
+
const apiKey = explicitApiKey ?? (explicitApiKeyEnv && explicitApiKeyEnv.length > 0 ? process.env[explicitApiKeyEnv] : void 0);
|
|
243
|
+
if (!apiKey) {
|
|
244
|
+
if (explicitApiKeyEnv && explicitApiKeyEnv.length > 0) throw new Error(`Missing Docs Cloud API key. The configured API key env "${explicitApiKeyEnv}" was not found in your shell or project .env/.env.local files. Add ${explicitApiKeyEnv}=fl_key_... to .env.local, configure cloud.apiKey.env in your root docs config, or pass --api-key.`);
|
|
245
|
+
throw new Error("Missing Docs Cloud API key. Configure cloud.apiKey.env in your root docs config and set DOCS_CLOUD_API_KEY=fl_key_... in .env/.env.local, or pass --api-key.");
|
|
246
|
+
}
|
|
249
247
|
return apiKey;
|
|
250
248
|
}
|
|
249
|
+
function readCloudApiKeyConfig(content) {
|
|
250
|
+
if (!extractNestedObjectLiteral(content, ["cloud"])) return {};
|
|
251
|
+
const apiKeyBlock = extractNestedObjectLiteral(content, ["cloud", "apiKey"]);
|
|
252
|
+
return { apiKeyEnv: apiKeyBlock ? readStringProperty(apiKeyBlock, "env") ?? DEFAULT_DOCS_CLOUD_API_KEY_ENV : DEFAULT_DOCS_CLOUD_API_KEY_ENV };
|
|
253
|
+
}
|
|
251
254
|
function readAgentCompactConfig(content) {
|
|
252
255
|
const compactBlock = extractNestedObjectLiteral(content, ["agent", "compact"]);
|
|
253
256
|
if (!compactBlock) return {};
|
|
@@ -263,6 +266,10 @@ function readAgentCompactConfig(content) {
|
|
|
263
266
|
protectJson: readBooleanProperty(compactBlock, "protectJson")
|
|
264
267
|
};
|
|
265
268
|
}
|
|
269
|
+
function readCloudApiKeyConfigFromModule(config) {
|
|
270
|
+
if (!config.cloud) return {};
|
|
271
|
+
return { apiKeyEnv: config.cloud.apiKey?.env?.trim() || DEFAULT_DOCS_CLOUD_API_KEY_ENV };
|
|
272
|
+
}
|
|
266
273
|
function readAgentCompactConfigFromModule(config) {
|
|
267
274
|
const compact = config.agent?.compact;
|
|
268
275
|
if (!compact) return {};
|
|
@@ -293,8 +300,8 @@ function readPageTokenBudget(pagePath) {
|
|
|
293
300
|
}
|
|
294
301
|
function buildCompactionSettingsHash(options) {
|
|
295
302
|
return hashGeneratedAgentContent(JSON.stringify({
|
|
296
|
-
model: options.model ??
|
|
297
|
-
aggressiveness: options.aggressiveness ??
|
|
303
|
+
model: options.model ?? DEFAULT_COMPRESSION_MODEL,
|
|
304
|
+
aggressiveness: options.aggressiveness ?? DEFAULT_COMPRESSION_AGGRESSIVENESS,
|
|
298
305
|
maxOutputTokens: options.maxOutputTokens ?? null,
|
|
299
306
|
minOutputTokens: options.minOutputTokens ?? null,
|
|
300
307
|
protectJson: options.protectJson ?? null
|
|
@@ -390,7 +397,7 @@ function inspectAgentCompactionState(page, target, defaults) {
|
|
|
390
397
|
function protectForCompression(input) {
|
|
391
398
|
const segments = [];
|
|
392
399
|
const stash = (value) => {
|
|
393
|
-
const token = `
|
|
400
|
+
const token = `__DOCS_SAFE_${segments.length}__`;
|
|
394
401
|
segments.push(value);
|
|
395
402
|
return token;
|
|
396
403
|
};
|
|
@@ -400,19 +407,19 @@ function protectForCompression(input) {
|
|
|
400
407
|
result = result.replace(/`[^`\n]+`/g, stash);
|
|
401
408
|
result = result.replace(/^(URL|Description|Related):[^\n]*$/gm, stash);
|
|
402
409
|
result = result.replace(/https?:\/\/[^\s)]+/g, stash);
|
|
403
|
-
for (let index = 0; index < segments.length; index += 1) result = result.replace(`
|
|
410
|
+
for (let index = 0; index < segments.length; index += 1) result = result.replace(`__DOCS_SAFE_${index}__`, `<docs_safe>${segments[index]}</docs_safe>`);
|
|
404
411
|
return result;
|
|
405
412
|
}
|
|
406
413
|
function sanitizeCompressedOutput(output) {
|
|
407
|
-
return output.replace(/<\/?
|
|
414
|
+
return output.replace(/<\/?docs_safe>/g, "");
|
|
408
415
|
}
|
|
409
416
|
async function compressDocument(input, options) {
|
|
410
417
|
const apiKey = resolveCompressionApiKey(options.apiKey, options.apiKeyEnv);
|
|
411
418
|
const endpoint = resolveCompressionEndpoint(options.baseUrl);
|
|
412
|
-
const aggressiveness = options.aggressiveness ??
|
|
419
|
+
const aggressiveness = options.aggressiveness ?? DEFAULT_COMPRESSION_AGGRESSIVENESS;
|
|
413
420
|
if (aggressiveness < 0 || aggressiveness > 1) throw new Error("Aggressiveness must be between 0.0 and 1.0.");
|
|
414
421
|
const payload = {
|
|
415
|
-
model: options.model ??
|
|
422
|
+
model: options.model ?? DEFAULT_COMPRESSION_MODEL,
|
|
416
423
|
input: protectForCompression(input),
|
|
417
424
|
compression_settings: {
|
|
418
425
|
aggressiveness,
|
|
@@ -431,11 +438,11 @@ async function compressDocument(input, options) {
|
|
|
431
438
|
});
|
|
432
439
|
if (!response.ok) {
|
|
433
440
|
const body = await response.text();
|
|
434
|
-
throw new Error(`
|
|
441
|
+
throw new Error(`Docs Cloud compression request failed (${response.status}): ${body || response.statusText}`);
|
|
435
442
|
}
|
|
436
443
|
const result = await response.json();
|
|
437
444
|
const sanitizedOutput = typeof result.output === "string" ? sanitizeCompressedOutput(result.output) : result.output;
|
|
438
|
-
if (typeof sanitizedOutput !== "string" || sanitizedOutput.trim().length === 0) throw new Error("
|
|
445
|
+
if (typeof sanitizedOutput !== "string" || sanitizedOutput.trim().length === 0) throw new Error("Docs Cloud compression response did not include a compressed output.");
|
|
439
446
|
return {
|
|
440
447
|
...result,
|
|
441
448
|
output: sanitizedOutput
|
|
@@ -481,7 +488,7 @@ async function compactAgentDocs(options = {}) {
|
|
|
481
488
|
for (const [key, value] of Object.entries(loadedEnv)) if (process.env[key] === void 0) process.env[key] = value;
|
|
482
489
|
const loadedConfigModule = await loadDocsConfigModule(rootDir, options.configPath);
|
|
483
490
|
const configContent = readFileSync(loadedConfigModule?.path ?? resolveDocsConfigPath(rootDir, options.configPath), "utf-8");
|
|
484
|
-
const resolvedOptions = mergeAgentCompactOptions(mergeAgentCompactOptions(readAgentCompactConfig(configContent), loadedConfigModule?.config ? readAgentCompactConfigFromModule(loadedConfigModule.config) : {}), options);
|
|
491
|
+
const resolvedOptions = mergeAgentCompactOptions(mergeAgentCompactOptions(mergeAgentCompactOptions(readCloudApiKeyConfig(configContent), loadedConfigModule?.config ? readCloudApiKeyConfigFromModule(loadedConfigModule.config) : {}), mergeAgentCompactOptions(readAgentCompactConfig(configContent), loadedConfigModule?.config ? readAgentCompactConfigFromModule(loadedConfigModule.config) : {})), options);
|
|
485
492
|
const entry = normalizePathSegment(loadedConfigModule?.config.entry ?? readTopLevelStringProperty(configContent, "entry") ?? "docs") || "docs";
|
|
486
493
|
const contentDir = typeof loadedConfigModule?.config.contentDir === "string" ? loadedConfigModule.config.contentDir : resolveDocsContentDir(rootDir, configContent, entry);
|
|
487
494
|
const siteTitle = typeof loadedConfigModule?.config.nav?.title === "string" ? loadedConfigModule.config.nav.title : readNavTitle(configContent) ?? "Documentation";
|
|
@@ -582,13 +589,13 @@ ${pc.dim("Options:")}
|
|
|
582
589
|
${pc.cyan("--stale")} Re-compact only stale generated agent.md files
|
|
583
590
|
${pc.cyan("--include-missing")} With ${pc.cyan("--stale")}, also create missing agent.md files for explicit pages or pages that define ${pc.cyan("agent.tokenBudget")}
|
|
584
591
|
${pc.cyan("--config <path>")} Use a custom docs config path instead of ${pc.dim("docs.config.ts[x]")}
|
|
585
|
-
${pc.cyan("--api-key <key>")}
|
|
586
|
-
${pc.cyan("--api-key-env <name>")}
|
|
587
|
-
${pc.cyan("--base-url <url>")} Override the
|
|
588
|
-
${pc.cyan("--model <name>")} Compression model (${pc.dim("
|
|
592
|
+
${pc.cyan("--api-key <key>")} Use an API key directly; prefer ${pc.dim("cloud.apiKey.env")}
|
|
593
|
+
${pc.cyan("--api-key-env <name>")} Env var name for the Docs Cloud API key; prefer ${pc.dim("cloud.apiKey.env")}
|
|
594
|
+
${pc.cyan("--base-url <url>")} Override the compression API base URL (useful for tests)
|
|
595
|
+
${pc.cyan("--model <name>")} Compression model (${pc.dim("docs-cloud-compress-v1")} by default)
|
|
589
596
|
${pc.cyan("--aggressiveness <0-1>")} Compression intensity (${pc.dim("0.3")} by default)
|
|
590
|
-
${pc.cyan("--max-output-tokens <n>")} Pass through to
|
|
591
|
-
${pc.cyan("--min-output-tokens <n>")} Pass through to
|
|
597
|
+
${pc.cyan("--max-output-tokens <n>")} Pass through to compression settings
|
|
598
|
+
${pc.cyan("--min-output-tokens <n>")} Pass through to compression settings
|
|
592
599
|
${pc.cyan("--protect-json <bool>")} Preserve JSON objects during compression
|
|
593
600
|
${pc.cyan("--dry-run")} Resolve pages and call the compressor without writing files
|
|
594
601
|
`);
|
|
@@ -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-BA76-30z.mjs";
|
|
3
|
+
import { C as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, S as DEFAULT_SKILL_MD_ROUTE, Tt as resolveDocsSitemapConfig, _t as DEFAULT_SITEMAP_MD_ROUTE, b as DEFAULT_MCP_WELL_KNOWN_ROUTE, c as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, g as DEFAULT_LLMS_TXT_ROUTE, i as DEFAULT_AGENT_FEEDBACK_ROUTE, j as buildDocsMcpEndpointCandidates, l as DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, p as DEFAULT_LLMS_FULL_TXT_ROUTE, t as DEFAULT_AGENTS_MD_ROUTE, v as DEFAULT_MCP_PUBLIC_ROUTE, vt as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, yt as DEFAULT_SITEMAP_XML_ROUTE } from "./agent-DTMhPZtU.mjs";
|
|
4
|
+
import { a as analyzeDocsRobotsTxt, n as DEFAULT_ROBOTS_TXT_ROUTE, u as resolveDocsRobotsConfig } from "./robots-Dq9xghyE.mjs";
|
|
5
|
+
import "./sitemap-server-y96rUcF4.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-DbaQ6PA5.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";
|
|
@@ -695,7 +695,7 @@ function compactionFreshnessScore(coverage, compactConfigured) {
|
|
|
695
695
|
return {
|
|
696
696
|
status: "warn",
|
|
697
697
|
score: 0,
|
|
698
|
-
recommendation: "Add agent.compact defaults if you want docs agent compact and stale detection to run without repeating model and
|
|
698
|
+
recommendation: "Add agent.compact defaults if you want docs agent compact and stale detection to run without repeating model and compression settings."
|
|
699
699
|
};
|
|
700
700
|
}
|
|
701
701
|
function buildMetadataCoverage(pages) {
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as DocsObservabilityEvent, $t as ReadingTimeFormat, A as DocsAskAIMcpConfig, At as FeedbackConfig, B as DocsCodeBlocksRunnerProvider, Bt as OpenDocsConfig, C as DocsAnalyticsSource, Ct as DocsTelemetryConfig, D as DocsAskAIFeedbackData, Dt as DocsTelemetryFeatures, E as DocsAskAIFeedbackConfig, Et as DocsTelemetryEventType, F as DocsCloudPublishConfig, Ft as LlmsTxtMaxCharsConfig, G as DocsFeedbackData, Gt as OpenGraphImage, H as DocsCodeBlocksValidationMode, Ht as OpenDocsProviderConfig, I as DocsCodeBlocksConfig, It as LlmsTxtMaxCharsMode, J as DocsMcpConfig, Jt as PageFrontmatter, K as DocsFeedbackValue, Kt as OrderingItem, L as DocsCodeBlocksPlannerConfig, Lt as LlmsTxtSectionConfig, M as DocsCloudConfig, Mt as GithubConfig, N as DocsCloudFeatureConfig, Nt as LastUpdatedConfig, O as DocsAskAIFeedbackMessage, Ot as DocsTelemetryFramework, P as DocsCloudPreviewConfig, Pt as LlmsTxtConfig, Q as DocsObservabilityConfig, Qt as ReadingTimeConfig, R as DocsCodeBlocksPlannerProvider, Rt as McpDocsSearchConfig, S as DocsAnalyticsInput, St as DocsTelemetryAgentSurface, T as DocsAskAIActionType, Tt as DocsTelemetryEventInput, U as DocsCodeBlocksValidationPolicy, Ut as OpenDocsProviderId, V as DocsCodeBlocksValidateConfig, Vt as OpenDocsProvider, W as DocsConfig, Wt as OpenDocsTarget, X as DocsMetadata, Xt as PageSidebarFrontmatter, Y as DocsMcpToolsConfig, Yt as PageOpenGraph, Z as DocsNav, Zt as PageTwitter, _ as DocsAgentTraceStatus, _t as DocsSearchQuery, a as ApiReferenceRenderer, an as SidebarNode, at as DocsReviewRulesConfig, b as DocsAnalyticsEventInput, bt as DocsSearchSourcePage, c as ChangelogFrontmatter, cn as SimpleDocsSearchConfig, ct as DocsRobotsConfig, d as CopyMarkdownFormat, dn as TypographyConfig, dt as DocsSearchAdapterContext, en as ResolvedDocsRelatedLink, et as DocsObservabilityEventInput, f as CustomDocsSearchConfig, fn as UIConfig, ft as DocsSearchAdapterFactory, g as DocsAgentTraceEventType, gt as DocsSearchEmbeddingsConfig, h as DocsAgentTraceEventInput, ht as DocsSearchDocument, i as ApiReferenceConfig, in as SidebarFolderNode, it as DocsReviewConfig, j as DocsCloudApiKeyConfig, jt as FontStyle, k as DocsAskAIFeedbackValue, kt as DocsTheme, l as CodeBlockCopyData, ln as ThemeToggleConfig, lt as DocsRobotsRule, m as DocsAgentFeedbackData, mt as DocsSearchConfig, n as AgentFeedbackConfig, nn as SidebarConfig, nt as DocsReviewCiConfig, o as BreadcrumbConfig, on as SidebarPageNode, ot as DocsReviewScoreConfig, p as DocsAgentFeedbackContext, pt as DocsSearchChunkingConfig, q as DocsI18nConfig, qt as PageActionsConfig, r as AlgoliaDocsSearchConfig, rn as SidebarFolderIndexBehavior, rt as DocsReviewCiMode, s as ChangelogConfig, sn as SidebarTree, st as DocsReviewSeverity, t as AIConfig, tn as SidebarComponentProps, tt as DocsRelatedItem, u as CopyMarkdownConfig, un as TypesenseDocsSearchConfig, ut as DocsSearchAdapter, v as DocsAnalyticsConfig, vt as DocsSearchResult, w as DocsAskAIActionData, wt as DocsTelemetryEvent, x as DocsAnalyticsEventType, xt as DocsSitemapConfig, y as DocsAnalyticsEvent, yt as DocsSearchResultType, z as DocsCodeBlocksRunnerConfig, zt as OGConfig } from "./types-
|
|
2
|
-
import { $ as createDocsAgentTraceId, A as resolveDocsSitemapRequest, C as buildDocsSitemapManifest, D as renderDocsSitemapXml, E as renderDocsSitemapMarkdown, I as PromptAction, J as DOCS_AGENT_TRACE_EVENT_TYPES, L as PromptProviderChoice, O as resolveDocsSitemapConfig, Q as createDocsAgentTraceContext, R as SerializeOpenDocsProviderOptions, S as DocsSitemapResolvedConfig, T as readDocsSitemapManifestFromContentMap, X as ResolvedDocsAnalyticsConfig, Y as DocsAgentTraceContext, Z as ResolvedDocsObservabilityConfig, _ as DEFAULT_SITEMAP_XML_ROUTE, a as createMcpSearchAdapter, at as resolveDocsObservabilityConfig, b as DocsSitemapManifestPage, c as formatDocsAskAIPackageHints, d as resolveAskAISearchRequestConfig, et as emitDocsAgentTraceEvent, f as resolveSearchRequestConfig, g as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, h as DEFAULT_SITEMAP_MD_ROUTE, i as createCustomSearchAdapter, it as resolveDocsAnalyticsConfig, j as toDocsSitemapMarkdownUrl, k as resolveDocsSitemapPageLastmod, l as inferDocsAskAIPackageHints, m as DEFAULT_SITEMAP_MD_DOCS_ROUTE, n as buildDocsSearchDocuments, nt as emitDocsObservabilityEvent, o as createSimpleSearchAdapter, p as DEFAULT_SITEMAP_MANIFEST_PATH, r as createAlgoliaSearchAdapter, rt as getDocsRequestAnalyticsProperties, s as createTypesenseSearchAdapter, t as buildDocsAskAIContext, tt as emitDocsAnalyticsEvent, u as performDocsSearch, v as DocsSitemapFormat, w as createDocsSitemapResponse, x as DocsSitemapPageInput, y as DocsSitemapManifest, z as SerializedOpenDocsProvider } from "./search-
|
|
1
|
+
import { $ as DocsObservabilityEvent, $t as ReadingTimeFormat, A as DocsAskAIMcpConfig, At as FeedbackConfig, B as DocsCodeBlocksRunnerProvider, Bt as OpenDocsConfig, C as DocsAnalyticsSource, Ct as DocsTelemetryConfig, D as DocsAskAIFeedbackData, Dt as DocsTelemetryFeatures, E as DocsAskAIFeedbackConfig, Et as DocsTelemetryEventType, F as DocsCloudPublishConfig, Ft as LlmsTxtMaxCharsConfig, G as DocsFeedbackData, Gt as OpenGraphImage, H as DocsCodeBlocksValidationMode, Ht as OpenDocsProviderConfig, I as DocsCodeBlocksConfig, It as LlmsTxtMaxCharsMode, J as DocsMcpConfig, Jt as PageFrontmatter, K as DocsFeedbackValue, Kt as OrderingItem, L as DocsCodeBlocksPlannerConfig, Lt as LlmsTxtSectionConfig, M as DocsCloudConfig, Mt as GithubConfig, N as DocsCloudFeatureConfig, Nt as LastUpdatedConfig, O as DocsAskAIFeedbackMessage, Ot as DocsTelemetryFramework, P as DocsCloudPreviewConfig, Pt as LlmsTxtConfig, Q as DocsObservabilityConfig, Qt as ReadingTimeConfig, R as DocsCodeBlocksPlannerProvider, Rt as McpDocsSearchConfig, S as DocsAnalyticsInput, St as DocsTelemetryAgentSurface, T as DocsAskAIActionType, Tt as DocsTelemetryEventInput, U as DocsCodeBlocksValidationPolicy, Ut as OpenDocsProviderId, V as DocsCodeBlocksValidateConfig, Vt as OpenDocsProvider, W as DocsConfig, Wt as OpenDocsTarget, X as DocsMetadata, Xt as PageSidebarFrontmatter, Y as DocsMcpToolsConfig, Yt as PageOpenGraph, Z as DocsNav, Zt as PageTwitter, _ as DocsAgentTraceStatus, _t as DocsSearchQuery, a as ApiReferenceRenderer, an as SidebarNode, at as DocsReviewRulesConfig, b as DocsAnalyticsEventInput, bt as DocsSearchSourcePage, c as ChangelogFrontmatter, cn as SimpleDocsSearchConfig, ct as DocsRobotsConfig, d as CopyMarkdownFormat, dn as TypographyConfig, dt as DocsSearchAdapterContext, en as ResolvedDocsRelatedLink, et as DocsObservabilityEventInput, f as CustomDocsSearchConfig, fn as UIConfig, ft as DocsSearchAdapterFactory, g as DocsAgentTraceEventType, gt as DocsSearchEmbeddingsConfig, h as DocsAgentTraceEventInput, ht as DocsSearchDocument, i as ApiReferenceConfig, in as SidebarFolderNode, it as DocsReviewConfig, j as DocsCloudApiKeyConfig, jt as FontStyle, k as DocsAskAIFeedbackValue, kt as DocsTheme, l as CodeBlockCopyData, ln as ThemeToggleConfig, lt as DocsRobotsRule, m as DocsAgentFeedbackData, mt as DocsSearchConfig, n as AgentFeedbackConfig, nn as SidebarConfig, nt as DocsReviewCiConfig, o as BreadcrumbConfig, on as SidebarPageNode, ot as DocsReviewScoreConfig, p as DocsAgentFeedbackContext, pt as DocsSearchChunkingConfig, q as DocsI18nConfig, qt as PageActionsConfig, r as AlgoliaDocsSearchConfig, rn as SidebarFolderIndexBehavior, rt as DocsReviewCiMode, s as ChangelogConfig, sn as SidebarTree, st as DocsReviewSeverity, t as AIConfig, tn as SidebarComponentProps, tt as DocsRelatedItem, u as CopyMarkdownConfig, un as TypesenseDocsSearchConfig, ut as DocsSearchAdapter, v as DocsAnalyticsConfig, vt as DocsSearchResult, w as DocsAskAIActionData, wt as DocsTelemetryEvent, x as DocsAnalyticsEventType, xt as DocsSitemapConfig, y as DocsAnalyticsEvent, yt as DocsSearchResultType, z as DocsCodeBlocksRunnerConfig, zt as OGConfig } from "./types-C5yQrqXc.mjs";
|
|
2
|
+
import { $ as createDocsAgentTraceId, A as resolveDocsSitemapRequest, C as buildDocsSitemapManifest, D as renderDocsSitemapXml, E as renderDocsSitemapMarkdown, I as PromptAction, J as DOCS_AGENT_TRACE_EVENT_TYPES, L as PromptProviderChoice, O as resolveDocsSitemapConfig, Q as createDocsAgentTraceContext, R as SerializeOpenDocsProviderOptions, S as DocsSitemapResolvedConfig, T as readDocsSitemapManifestFromContentMap, X as ResolvedDocsAnalyticsConfig, Y as DocsAgentTraceContext, Z as ResolvedDocsObservabilityConfig, _ as DEFAULT_SITEMAP_XML_ROUTE, a as createMcpSearchAdapter, at as resolveDocsObservabilityConfig, b as DocsSitemapManifestPage, c as formatDocsAskAIPackageHints, d as resolveAskAISearchRequestConfig, et as emitDocsAgentTraceEvent, f as resolveSearchRequestConfig, g as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, h as DEFAULT_SITEMAP_MD_ROUTE, i as createCustomSearchAdapter, it as resolveDocsAnalyticsConfig, j as toDocsSitemapMarkdownUrl, k as resolveDocsSitemapPageLastmod, l as inferDocsAskAIPackageHints, m as DEFAULT_SITEMAP_MD_DOCS_ROUTE, n as buildDocsSearchDocuments, nt as emitDocsObservabilityEvent, o as createSimpleSearchAdapter, p as DEFAULT_SITEMAP_MANIFEST_PATH, r as createAlgoliaSearchAdapter, rt as getDocsRequestAnalyticsProperties, s as createTypesenseSearchAdapter, t as buildDocsAskAIContext, tt as emitDocsAnalyticsEvent, u as performDocsSearch, v as DocsSitemapFormat, w as createDocsSitemapResponse, x as DocsSitemapPageInput, y as DocsSitemapManifest, z as SerializedOpenDocsProvider } from "./search-Cl5YUeI_.mjs";
|
|
3
3
|
import { DocsMcpPage, DocsMcpResolvedConfig } from "./mcp.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/define-docs.d.ts
|
|
@@ -238,6 +238,8 @@ declare function serializeGeneratedAgentDocument(content: string, provenance: Ge
|
|
|
238
238
|
//#endregion
|
|
239
239
|
//#region src/agent.d.ts
|
|
240
240
|
declare const DEFAULT_DOCS_API_ROUTE = "/api/docs";
|
|
241
|
+
declare const DEFAULT_DOCS_CONFIG_FORMAT = "docs-config-map.v1";
|
|
242
|
+
declare const DEFAULT_DOCS_CONFIG_ROUTE = "/api/docs?format=config";
|
|
241
243
|
declare const DEFAULT_OPENAPI_SCHEMA_ROUTE = "/api/docs?format=openapi";
|
|
242
244
|
declare const DEFAULT_AGENT_SPEC_ROUTE = "/api/docs/agent/spec";
|
|
243
245
|
declare const DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE = "/.well-known/agent";
|
|
@@ -312,6 +314,34 @@ interface DocsOpenApiResolvedDiscoveryConfig {
|
|
|
312
314
|
specUrl?: string;
|
|
313
315
|
apiReferencePath?: string;
|
|
314
316
|
}
|
|
317
|
+
type DocsConfigMapJsonPrimitive = string | number | boolean | null;
|
|
318
|
+
type DocsConfigMapJsonValue = DocsConfigMapJsonPrimitive | DocsConfigMapJsonValue[] | {
|
|
319
|
+
[key: string]: DocsConfigMapJsonValue;
|
|
320
|
+
};
|
|
321
|
+
interface DocsConfigMapPointer {
|
|
322
|
+
/** Dot-path form for humans and TypeScript users, e.g. `mcp.tools.readPage`. */
|
|
323
|
+
path: string;
|
|
324
|
+
/** Coarse value kind at this pointer. */
|
|
325
|
+
kind: string;
|
|
326
|
+
}
|
|
327
|
+
interface DocsConfigMap {
|
|
328
|
+
schemaVersion: 1;
|
|
329
|
+
format: typeof DEFAULT_DOCS_CONFIG_FORMAT;
|
|
330
|
+
source: {
|
|
331
|
+
/** Best-effort source label; adapters only receive the runtime config object. */file: string; /** Best-effort language hint based on serializing the runtime config object. */
|
|
332
|
+
language: "ts" | "tsx";
|
|
333
|
+
};
|
|
334
|
+
serialization: {
|
|
335
|
+
mode: "json-safe";
|
|
336
|
+
redacted: string;
|
|
337
|
+
nonSerializable: "described";
|
|
338
|
+
};
|
|
339
|
+
values: {
|
|
340
|
+
[key: string]: DocsConfigMapJsonValue;
|
|
341
|
+
};
|
|
342
|
+
/** RFC 6901 JSON Pointer index for mapping response values back to docs.config paths. */
|
|
343
|
+
pointers: Record<string, DocsConfigMapPointer>;
|
|
344
|
+
}
|
|
315
345
|
interface DocsLlmsTxtResolvedMaxChars {
|
|
316
346
|
mode: LlmsTxtMaxCharsMode;
|
|
317
347
|
chars: number;
|
|
@@ -434,6 +464,10 @@ interface DocsMarkdownCanonicalUrlOptions {
|
|
|
434
464
|
}
|
|
435
465
|
declare function normalizeDocsPathSegment(value: string): string;
|
|
436
466
|
declare function normalizeDocsUrlPath(value: string): string;
|
|
467
|
+
declare function isDocsConfigRequest(url: URL): boolean;
|
|
468
|
+
declare function buildDocsConfigMap(config: DocsConfig | Record<string, unknown>, options?: {
|
|
469
|
+
file?: string;
|
|
470
|
+
}): DocsConfigMap;
|
|
437
471
|
declare function buildDocsAgentFeedbackSchema(payloadSchema: Record<string, unknown>): Record<string, unknown>;
|
|
438
472
|
declare function resolveDocsAgentFeedbackConfig(feedback?: boolean | FeedbackConfig): DocsAgentFeedbackResolvedConfig;
|
|
439
473
|
declare function resolveDocsAgentFeedbackRequest(url: URL, feedback: DocsAgentFeedbackResolvedConfig): DocsAgentFeedbackRequest | null;
|
|
@@ -554,6 +588,7 @@ declare function buildDocsAgentDiscoverySpec({
|
|
|
554
588
|
};
|
|
555
589
|
api: {
|
|
556
590
|
docs: string;
|
|
591
|
+
config: string;
|
|
557
592
|
agentSpec: string;
|
|
558
593
|
agentSpecDefault: string;
|
|
559
594
|
agentSpecFallback: string;
|
|
@@ -563,6 +598,10 @@ declare function buildDocsAgentDiscoverySpec({
|
|
|
563
598
|
agents: string;
|
|
564
599
|
openapi: string;
|
|
565
600
|
};
|
|
601
|
+
config: {
|
|
602
|
+
format: string;
|
|
603
|
+
endpoint: string;
|
|
604
|
+
};
|
|
566
605
|
markdown: {
|
|
567
606
|
enabled: boolean;
|
|
568
607
|
acceptHeader: string | null;
|
|
@@ -740,4 +779,4 @@ declare function renderDocsRobotsGeneratedBlock(options?: DocsRobotsRenderOption
|
|
|
740
779
|
declare function upsertDocsRobotsGeneratedBlock(existing: string, block: string): string;
|
|
741
780
|
declare function analyzeDocsRobotsTxt(content: string, options?: DocsRobotsRenderOptions): DocsRobotsAnalysis;
|
|
742
781
|
//#endregion
|
|
743
|
-
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_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 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, 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, 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 };
|
|
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 };
|
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-BA76-30z.mjs";
|
|
3
|
+
import { $ as renderDocsSkillDocument, A as buildDocsConfigMap, At as renderDocsRelatedMarkdownLines, B as isDocsConfigRequest, C as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, Ct as renderDocsSitemapMarkdown, D as DOCS_TRADITIONAL_BOT_USER_AGENT_HEADER_PATTERN, Dt as resolveDocsSitemapRequest, E as DOCS_MARKDOWN_SIGNATURE_AGENT_HEADER, Et as resolveDocsSitemapPageLastmod, F as getDocsMarkdownCanonicalLinkHeader, G as matchesDocsLlmsTxtSection, H as isDocsMcpRequest, I as getDocsMarkdownVaryHeader, J as parseDocsAgentFeedbackData, K as normalizeDocsPathSegment, L as hasDocsMarkdownSignatureAgent, M as detectDocsMarkdownAgentRequest, N as findDocsMarkdownPage, O as buildDocsAgentDiscoverySpec, Ot as toDocsSitemapMarkdownUrl, P as getDocsLlmsTxtMaxCharsIssue, Q as renderDocsMarkdownNotFound, R as isDocsAgentDiscoveryRequest, S as DEFAULT_SKILL_MD_ROUTE, St as readDocsSitemapManifestFromContentMap, T as DOCS_BOT_LIKE_USER_AGENT_HEADER_PATTERN, Tt as resolveDocsSitemapConfig, U as isDocsPublicGetRequest, V as isDocsLlmsTxtPublicRequest, W as isDocsSkillRequest, X as renderDocsLlmsTxt, Y as renderDocsAgentsDocument, Z as renderDocsMarkdownDocument, _ as DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE, _t as DEFAULT_SITEMAP_MD_ROUTE, a as DEFAULT_AGENT_MD_ROUTE, at as resolveDocsLlmsTxtRequest, b as DEFAULT_MCP_WELL_KNOWN_ROUTE, bt as buildDocsSitemapManifest, c as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, ct as resolveDocsMarkdownRecovery, d as DEFAULT_DOCS_CONFIG_FORMAT, dt as resolveDocsSkillFormat, et as resolveDocsAgentFeedbackConfig, f as DEFAULT_DOCS_CONFIG_ROUTE, ft as selectDocsLlmsTxtContent, g as DEFAULT_LLMS_TXT_ROUTE, gt as DEFAULT_SITEMAP_MD_DOCS_ROUTE, h as DEFAULT_LLMS_TXT_MAX_CHARS, ht as DEFAULT_SITEMAP_MANIFEST_PATH, i as DEFAULT_AGENT_FEEDBACK_ROUTE, it as resolveDocsLlmsTxtFormat, j as buildDocsMcpEndpointCandidates, k as buildDocsAgentFeedbackSchema, kt as normalizeDocsRelated, l as DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, lt as resolveDocsMarkdownRequest, m as DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, mt as validateDocsAgentFeedbackPayload, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, nt as resolveDocsAgentMdxContent, o as DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, ot as resolveDocsLlmsTxtSections, p as DEFAULT_LLMS_FULL_TXT_ROUTE, pt as toDocsMarkdownUrl, q as normalizeDocsUrlPath, r as DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA, rt as resolveDocsAgentsFormat, s as DEFAULT_AGENT_SPEC_ROUTE, st as resolveDocsMarkdownCanonicalUrl, t as DEFAULT_AGENTS_MD_ROUTE, tt as resolveDocsAgentFeedbackRequest, u as DEFAULT_DOCS_API_ROUTE, ut as resolveDocsOpenApiDiscoveryConfig, v as DEFAULT_MCP_PUBLIC_ROUTE, vt as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, w as DOCS_AI_AGENT_USER_AGENT_HEADER_PATTERN, wt as renderDocsSitemapXml, x as DEFAULT_OPENAPI_SCHEMA_ROUTE, xt as createDocsSitemapResponse, y as DEFAULT_MCP_ROUTE, yt as DEFAULT_SITEMAP_XML_ROUTE, z as isDocsAgentsRequest } from "./agent-DTMhPZtU.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-Dq9xghyE.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_LLMS_FULL_TXT_ROUTE, DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, DEFAULT_LLMS_TXT_MAX_CHARS, DEFAULT_LLMS_TXT_ROUTE, DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE, DEFAULT_MCP_PUBLIC_ROUTE, DEFAULT_MCP_ROUTE, DEFAULT_MCP_WELL_KNOWN_ROUTE, DEFAULT_OPENAPI_SCHEMA_ROUTE, DEFAULT_ROBOTS_TXT_ROUTE, DEFAULT_SITEMAP_MANIFEST_PATH, DEFAULT_SITEMAP_MD_DOCS_ROUTE, DEFAULT_SITEMAP_MD_ROUTE, DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, DEFAULT_SITEMAP_XML_ROUTE, DEFAULT_SKILL_MD_ROUTE, DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, DOCS_AGENT_TRACE_EVENT_TYPES, DOCS_AI_AGENT_USER_AGENT_HEADER_PATTERN, DOCS_BOT_LIKE_USER_AGENT_HEADER_PATTERN, DOCS_MARKDOWN_SIGNATURE_AGENT_HEADER, DOCS_ROBOTS_GENERATED_BLOCK_END, DOCS_ROBOTS_GENERATED_BLOCK_START, DOCS_TRADITIONAL_BOT_USER_AGENT_HEADER_PATTERN, GENERATED_AGENT_PROVENANCE_MARKER, GENERATED_AGENT_PROVENANCE_VERSION, analyzeDocsRobotsTxt, applySidebarFolderIndexBehavior, buildDocsAgentDiscoverySpec, buildDocsAgentFeedbackSchema, buildDocsAskAIContext, buildDocsMcpEndpointCandidates, buildDocsPageStructuredData, buildDocsSearchDocuments, buildDocsSitemapManifest, buildPageOpenGraph, buildPageTwitter, createAlgoliaSearchAdapter, createCustomSearchAdapter, createDocsAgentTraceContext, createDocsAgentTraceId, 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, 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_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 };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./search-
|
|
2
|
-
import "./agent-
|
|
3
|
-
import "./sitemap-server-
|
|
1
|
+
import "./search-BA76-30z.mjs";
|
|
2
|
+
import "./agent-DTMhPZtU.mjs";
|
|
3
|
+
import "./sitemap-server-y96rUcF4.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";
|
package/dist/mcp.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ct as DocsTelemetryConfig, J as DocsMcpConfig, Kt as OrderingItem, Ot as DocsTelemetryFramework, Q as DocsObservabilityConfig, bt as DocsSearchSourcePage, mt as DocsSearchConfig, v as DocsAnalyticsConfig } from "./types-
|
|
1
|
+
import { Ct as DocsTelemetryConfig, J as DocsMcpConfig, Kt as OrderingItem, Ot as DocsTelemetryFramework, Q as DocsObservabilityConfig, bt as DocsSearchSourcePage, mt as DocsSearchConfig, v as DocsAnalyticsConfig } from "./types-C5yQrqXc.mjs";
|
|
2
2
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
3
|
|
|
4
4
|
//#region src/mcp.d.ts
|
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-BA76-30z.mjs";
|
|
2
|
+
import { At as renderDocsRelatedMarkdownLines, kt as normalizeDocsRelated } from "./agent-DTMhPZtU.mjs";
|
|
3
3
|
import matter from "gray-matter";
|
|
4
4
|
import fs from "node:fs";
|
|
5
5
|
import path from "node:path";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, K as normalizeDocsPathSegment, S as DEFAULT_SKILL_MD_ROUTE, Tt as resolveDocsSitemapConfig, _ as DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE, a as DEFAULT_AGENT_MD_ROUTE, b as DEFAULT_MCP_WELL_KNOWN_ROUTE, c as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, g as DEFAULT_LLMS_TXT_ROUTE, l as DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, m as DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, o as DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, p as DEFAULT_LLMS_FULL_TXT_ROUTE, t as DEFAULT_AGENTS_MD_ROUTE, v as DEFAULT_MCP_PUBLIC_ROUTE } from "./agent-DTMhPZtU.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/robots.ts
|
|
4
4
|
const DEFAULT_ROBOTS_TXT_ROUTE = "/robots.txt";
|
|
@@ -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-DTMhPZtU.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-Dq9xghyE.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 { R as isDocsAgentDiscoveryRequest, W as isDocsSkillRequest, at as resolveDocsLlmsTxtRequest, dt as resolveDocsSkillFormat, et as resolveDocsAgentFeedbackConfig, lt as resolveDocsMarkdownRequest, rt as resolveDocsAgentsFormat, tt as resolveDocsAgentFeedbackRequest, z as isDocsAgentsRequest } from "./agent-DTMhPZtU.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";
|
|
@@ -461,8 +461,8 @@ function createDocsTelemetryEvent(config, input, context = {}) {
|
|
|
461
461
|
const siteOrigin = context.siteOrigin ?? input.site?.origin ?? normalizeTelemetryOrigin(telemetryConfig?.siteOrigin) ?? readRequestOrigin(context.request) ?? readDeploymentOrigin();
|
|
462
462
|
const deployment = input.deployment ?? detectDeployment();
|
|
463
463
|
const properties = context.properties || input.properties ? {
|
|
464
|
-
...input.properties
|
|
465
|
-
...context.properties
|
|
464
|
+
...input.properties,
|
|
465
|
+
...context.properties
|
|
466
466
|
} : void 0;
|
|
467
467
|
return {
|
|
468
468
|
...input,
|
|
@@ -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-BA76-30z.mjs";
|
|
2
|
+
import "./agent-DTMhPZtU.mjs";
|
|
3
|
+
import "./sitemap-server-y96rUcF4.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 { $ as DocsObservabilityEvent, A as DocsAskAIMcpConfig, Q as DocsObservabilityConfig, Rt as McpDocsSearchConfig, Vt as OpenDocsProvider, Wt as OpenDocsTarget, b as DocsAnalyticsEventInput, bt as DocsSearchSourcePage, en as ResolvedDocsRelatedLink, et as DocsObservabilityEventInput, f as CustomDocsSearchConfig, ft as DocsSearchAdapterFactory, h as DocsAgentTraceEventInput, ht as DocsSearchDocument, mt as DocsSearchConfig, pt as DocsSearchChunkingConfig, r as AlgoliaDocsSearchConfig, un as TypesenseDocsSearchConfig, ut as DocsSearchAdapter, v as DocsAnalyticsConfig, vt as DocsSearchResult, xt as DocsSitemapConfig, y as DocsAnalyticsEvent } from "./types-
|
|
1
|
+
import { $ as DocsObservabilityEvent, A as DocsAskAIMcpConfig, Q as DocsObservabilityConfig, Rt as McpDocsSearchConfig, Vt as OpenDocsProvider, Wt as OpenDocsTarget, b as DocsAnalyticsEventInput, bt as DocsSearchSourcePage, en as ResolvedDocsRelatedLink, et as DocsObservabilityEventInput, f as CustomDocsSearchConfig, ft as DocsSearchAdapterFactory, h as DocsAgentTraceEventInput, ht as DocsSearchDocument, mt as DocsSearchConfig, pt as DocsSearchChunkingConfig, r as AlgoliaDocsSearchConfig, un as TypesenseDocsSearchConfig, ut as DocsSearchAdapter, v as DocsAnalyticsConfig, vt as DocsSearchResult, xt as DocsSitemapConfig, y as DocsAnalyticsEvent } from "./types-C5yQrqXc.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/analytics.d.ts
|
|
4
4
|
declare const DOCS_AGENT_TRACE_EVENT_TYPES: readonly ["run.start", "run.end", "run.error", "user.input", "prompt.build", "retrieval.query", "retrieval.result", "retrieval.error", "model.call", "model.response", "model.stream", "model.error", "tool.call", "tool.result", "tool.error", "retry", "timeout", "error", "agent.final"];
|
package/dist/server.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as DocsObservabilityEvent, A as DocsAskAIMcpConfig, D as DocsAskAIFeedbackData, E as DocsAskAIFeedbackConfig, O as DocsAskAIFeedbackMessage, Q as DocsObservabilityConfig, Rt as McpDocsSearchConfig, W as DocsConfig, _ as DocsAgentTraceStatus, _t as DocsSearchQuery, a as ApiReferenceRenderer, at as DocsReviewRulesConfig, b as DocsAnalyticsEventInput, bt as DocsSearchSourcePage, dt as DocsSearchAdapterContext, et as DocsObservabilityEventInput, ft as DocsSearchAdapterFactory, g as DocsAgentTraceEventType, h as DocsAgentTraceEventInput, ht as DocsSearchDocument, it as DocsReviewConfig, k as DocsAskAIFeedbackValue, mt as DocsSearchConfig, rt as DocsReviewCiMode, ut as DocsSearchAdapter, v as DocsAnalyticsConfig, vt as DocsSearchResult, xt as DocsSitemapConfig, y as DocsAnalyticsEvent } from "./types-
|
|
2
|
-
import { $ as createDocsAgentTraceId, 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, J as DOCS_AGENT_TRACE_EVENT_TYPES, 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, Q as createDocsAgentTraceContext, R as SerializeOpenDocsProviderOptions, S as DocsSitemapResolvedConfig, T as readDocsSitemapManifestFromContentMap, U as sanitizePromptText, V as parsePromptStringArray, W as serializeDocsIcon, X as ResolvedDocsAnalyticsConfig, Y as DocsAgentTraceContext, Z as ResolvedDocsObservabilityConfig, _ as DEFAULT_SITEMAP_XML_ROUTE, a as createMcpSearchAdapter, at as resolveDocsObservabilityConfig, b as DocsSitemapManifestPage, c as formatDocsAskAIPackageHints, d as resolveAskAISearchRequestConfig, et as emitDocsAgentTraceEvent, f as resolveSearchRequestConfig, g as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, h as DEFAULT_SITEMAP_MD_ROUTE, i as createCustomSearchAdapter, it as resolveDocsAnalyticsConfig, j as toDocsSitemapMarkdownUrl, k as resolveDocsSitemapPageLastmod, l as inferDocsAskAIPackageHints, m as DEFAULT_SITEMAP_MD_DOCS_ROUTE, n as buildDocsSearchDocuments, nt as emitDocsObservabilityEvent, o as createSimpleSearchAdapter, p as DEFAULT_SITEMAP_MANIFEST_PATH, q as serializeOpenDocsProviders, r as createAlgoliaSearchAdapter, rt as getDocsRequestAnalyticsProperties, s as createTypesenseSearchAdapter, t as buildDocsAskAIContext, tt as emitDocsAnalyticsEvent, u as performDocsSearch, v as DocsSitemapFormat, w as createDocsSitemapResponse, x as DocsSitemapPageInput, y as DocsSitemapManifest, z as SerializedOpenDocsProvider } from "./search-
|
|
1
|
+
import { $ as DocsObservabilityEvent, A as DocsAskAIMcpConfig, D as DocsAskAIFeedbackData, E as DocsAskAIFeedbackConfig, O as DocsAskAIFeedbackMessage, Q as DocsObservabilityConfig, Rt as McpDocsSearchConfig, W as DocsConfig, _ as DocsAgentTraceStatus, _t as DocsSearchQuery, a as ApiReferenceRenderer, at as DocsReviewRulesConfig, b as DocsAnalyticsEventInput, bt as DocsSearchSourcePage, dt as DocsSearchAdapterContext, et as DocsObservabilityEventInput, ft as DocsSearchAdapterFactory, g as DocsAgentTraceEventType, h as DocsAgentTraceEventInput, ht as DocsSearchDocument, it as DocsReviewConfig, k as DocsAskAIFeedbackValue, mt as DocsSearchConfig, rt as DocsReviewCiMode, ut as DocsSearchAdapter, v as DocsAnalyticsConfig, vt as DocsSearchResult, xt as DocsSitemapConfig, y as DocsAnalyticsEvent } from "./types-C5yQrqXc.mjs";
|
|
2
|
+
import { $ as createDocsAgentTraceId, 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, J as DOCS_AGENT_TRACE_EVENT_TYPES, 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, Q as createDocsAgentTraceContext, R as SerializeOpenDocsProviderOptions, S as DocsSitemapResolvedConfig, T as readDocsSitemapManifestFromContentMap, U as sanitizePromptText, V as parsePromptStringArray, W as serializeDocsIcon, X as ResolvedDocsAnalyticsConfig, Y as DocsAgentTraceContext, Z as ResolvedDocsObservabilityConfig, _ as DEFAULT_SITEMAP_XML_ROUTE, a as createMcpSearchAdapter, at as resolveDocsObservabilityConfig, b as DocsSitemapManifestPage, c as formatDocsAskAIPackageHints, d as resolveAskAISearchRequestConfig, et as emitDocsAgentTraceEvent, f as resolveSearchRequestConfig, g as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, h as DEFAULT_SITEMAP_MD_ROUTE, i as createCustomSearchAdapter, it as resolveDocsAnalyticsConfig, j as toDocsSitemapMarkdownUrl, k as resolveDocsSitemapPageLastmod, l as inferDocsAskAIPackageHints, m as DEFAULT_SITEMAP_MD_DOCS_ROUTE, n as buildDocsSearchDocuments, nt as emitDocsObservabilityEvent, o as createSimpleSearchAdapter, p as DEFAULT_SITEMAP_MANIFEST_PATH, q as serializeOpenDocsProviders, r as createAlgoliaSearchAdapter, rt as getDocsRequestAnalyticsProperties, s as createTypesenseSearchAdapter, t as buildDocsAskAIContext, tt as emitDocsAnalyticsEvent, u as performDocsSearch, v as DocsSitemapFormat, w as createDocsSitemapResponse, x as DocsSitemapPageInput, y as DocsSitemapManifest, z as SerializedOpenDocsProvider } from "./search-Cl5YUeI_.mjs";
|
|
3
3
|
import { DocsMcpCodeExample, DocsMcpConfigSchema, DocsMcpConfigSchemaOption, DocsMcpDocsList, DocsMcpDocsPageSummary, DocsMcpDocsSection, DocsMcpHttpHandlers, DocsMcpNavigationNode, DocsMcpNavigationTree, DocsMcpPage, DocsMcpResolvedConfig, DocsMcpSource, createDocsMcpHttpHandler, createDocsMcpServer, createFilesystemDocsMcpSource, normalizeDocsMcpRoute, resolveDocsMcpConfig, runDocsMcpStdio } from "./mcp.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/code-group-mdx.d.ts
|
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-BA76-30z.mjs";
|
|
2
|
+
import { Ct as renderDocsSitemapMarkdown, Dt as resolveDocsSitemapRequest, Et as resolveDocsSitemapPageLastmod, Ot as toDocsSitemapMarkdownUrl, St as readDocsSitemapManifestFromContentMap, Tt as resolveDocsSitemapConfig, _t as DEFAULT_SITEMAP_MD_ROUTE, bt as buildDocsSitemapManifest, gt as DEFAULT_SITEMAP_MD_DOCS_ROUTE, ht as DEFAULT_SITEMAP_MANIFEST_PATH, vt as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, wt as renderDocsSitemapXml, xt as createDocsSitemapResponse, yt as DEFAULT_SITEMAP_XML_ROUTE } from "./agent-DTMhPZtU.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-y96rUcF4.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-BA76-30z.mjs";
|
|
2
|
+
import { Ct as renderDocsSitemapMarkdown, Tt as resolveDocsSitemapConfig, bt as buildDocsSitemapManifest, wt as renderDocsSitemapXml } from "./agent-DTMhPZtU.mjs";
|
|
3
|
+
import "./sitemap-server-y96rUcF4.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 { Tt as resolveDocsSitemapConfig } from "./agent-DTMhPZtU.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";
|
|
@@ -2179,22 +2179,27 @@ interface ApiReferenceConfig {
|
|
|
2179
2179
|
}
|
|
2180
2180
|
interface DocsAgentCompactConfig {
|
|
2181
2181
|
/**
|
|
2182
|
-
* Direct API key for the
|
|
2182
|
+
* Direct API key for the Docs Cloud compression API. Prefer `cloud.apiKey.env`
|
|
2183
|
+
* so all Docs Cloud CLI commands share the same root API key configuration.
|
|
2183
2184
|
*
|
|
2184
|
-
*
|
|
2185
|
+
* @deprecated Configure `cloud.apiKey.env` instead.
|
|
2185
2186
|
*/
|
|
2186
2187
|
apiKey?: string;
|
|
2187
2188
|
/**
|
|
2188
|
-
* Environment variable name that stores the
|
|
2189
|
+
* Environment variable name that stores the Docs Cloud API key. Prefer
|
|
2190
|
+
* `cloud.apiKey.env` so all Docs Cloud CLI commands share the same root API
|
|
2191
|
+
* key configuration.
|
|
2192
|
+
*
|
|
2193
|
+
* @deprecated Configure `cloud.apiKey.env` instead.
|
|
2189
2194
|
*/
|
|
2190
2195
|
apiKeyEnv?: string;
|
|
2191
2196
|
/**
|
|
2192
|
-
* Base URL for the
|
|
2197
|
+
* Base URL for the compression API.
|
|
2193
2198
|
*/
|
|
2194
2199
|
baseUrl?: string;
|
|
2195
2200
|
/**
|
|
2196
2201
|
* Compression model name.
|
|
2197
|
-
* @default "
|
|
2202
|
+
* @default "docs-cloud-compress-v1"
|
|
2198
2203
|
*/
|
|
2199
2204
|
model?: string;
|
|
2200
2205
|
/**
|