@farming-labs/docs 0.2.104 → 0.2.105
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-NerpHcQB.mjs → agent-CaCWThBY.mjs} +4 -4
- package/dist/{agent-PSrgiJD8.mjs → agent-DCTGj6J7.mjs} +48 -12
- package/dist/{agent-evals-U9d_db2u.mjs → agent-evals-D-sPJfXz.mjs} +5 -5
- package/dist/{agent-export-DlBUKkTt.mjs → agent-export-GcTZPLfB.mjs} +19 -17
- package/dist/agent-feedback-evaluations-DQCTFegz.mjs +240 -0
- package/dist/agent-maintenance-CuZ7iAKq.mjs +289 -0
- package/dist/agent-skills-bundle.d.mts +1 -1
- package/dist/{agent-skills-progressive-disclosure-CfIsq4Ew.mjs → agent-skills-progressive-disclosure-DL-q4JZo.mjs} +1 -1
- package/dist/{agent-skills-server-CIoL58X7.d.mts → agent-skills-server-D34054x5.d.mts} +2 -2
- package/dist/{agent-skills-server-DFqQyO_V.mjs → agent-skills-server-Ddbf15pY.mjs} +1 -1
- package/dist/agent-skills-vite.d.mts +3 -3
- package/dist/agent-skills-vite.mjs +2 -2
- package/dist/{agents-D3SLnQet.mjs → agents-e1SYT64z.mjs} +11 -11
- package/dist/{analytics-Bx44lg6d.mjs → analytics-CqfcIBdg.mjs} +1 -1
- package/dist/{analytics-B-jz7re8.d.mts → analytics-aeXwEvQX.d.mts} +1 -1
- package/dist/{authoring-BsWXMH43.mjs → authoring-Do87QzBd.mjs} +6 -6
- package/dist/{authoring-mcp-BCM5CJbJ.mjs → authoring-mcp-Be7quE5R.mjs} +2 -2
- package/dist/browser.d.mts +3 -3
- package/dist/browser.mjs +2 -2
- package/dist/cli/index.mjs +71 -35
- package/dist/client/react.d.mts +1 -1
- package/dist/client/react.mjs +1 -1
- package/dist/{cloud-BLxt_HYO.mjs → cloud-Bvof6mET.mjs} +3 -3
- package/dist/{cloud-ask-ai-19G2HJ62.d.mts → cloud-ask-ai-BqfiQaNZ.d.mts} +1 -1
- package/dist/{cloud-ask-ai-DeojA5lB.mjs → cloud-ask-ai-CK2qlNns.mjs} +1 -1
- package/dist/{codeblocks-qHdKGVaE.mjs → codeblocks-C911CdyJ.mjs} +2 -2
- package/dist/{agent-C9IdC__R.d.mts → content-change-hydration-CoYRs3pC.d.mts} +704 -678
- package/dist/{dev-B0iHJjTz.mjs → dev-Bx0JNglW.mjs} +2 -2
- package/dist/docs-cloud-server.d.mts +2 -2
- package/dist/docs-cloud-server.mjs +2 -2
- package/dist/{doctor-x3k6aE2I.mjs → doctor-CtK1CRPj.mjs} +17 -17
- package/dist/{downgrade-Dd3vvVdD.mjs → downgrade-BXmQMkMy.mjs} +2 -2
- package/dist/{feedback-DdWc33oO.mjs → feedback-DWVUMrxy.mjs} +1 -1
- package/dist/feedback-evals-k0sFDdms.mjs +146 -0
- package/dist/{golden-evaluations-7k7Akp3R.mjs → golden-evaluations-De4KwoYr.mjs} +3 -3
- package/dist/index.d.mts +174 -9
- package/dist/index.mjs +14 -11
- package/dist/{init-DKukQdOQ.mjs → init-CCV2eRNB.mjs} +3 -3
- package/dist/markdown-rendering.mjs +1 -1
- package/dist/{markdown-sections-7OoA7ylx.mjs → markdown-sections-BKy4labo.mjs} +110 -2
- package/dist/{mcp-B6ZZdp6F.mjs → mcp-DsjWxF7g.mjs} +11 -11
- package/dist/mcp.d.mts +5 -3
- package/dist/mcp.mjs +92 -29
- package/dist/{metadata-D4v_R1t5.mjs → metadata-7htr-Xj_.mjs} +1 -1
- package/dist/{openapi-mcp-B7u7Y0gB.mjs → openapi-mcp-DQ3xptKo.mjs} +68 -4
- package/dist/openapi-mcp-node-vO3IXVGI.mjs +43 -0
- package/dist/{package-version-P4TT_9IO.mjs → package-version-Ci99L0yo.mjs} +1 -1
- package/dist/{prompt-references-Ca2Rcrpw.mjs → prompt-references-1Wce71c7.mjs} +3 -3
- package/dist/propose-DJOiHu9Y.mjs +73 -0
- package/dist/retrieval-digest-B-SgtXKK.mjs +177 -0
- package/dist/retrieval-digest-DyNRD-mt.d.mts +467 -0
- package/dist/{review-DgaNTtP0.mjs → review-XI9FXeos.mjs} +12 -12
- package/dist/{robots-DNod0XKB.mjs → robots-BOjWB1ky.mjs} +2 -2
- package/dist/{robots-msD1xoH5.mjs → robots-CzKesbdX.mjs} +6 -6
- package/dist/{search-CNzq9S5S.mjs → search-DwAoC9X7.mjs} +12 -12
- package/dist/server.d.mts +6 -308
- package/dist/server.mjs +13 -12
- package/dist/{sidebar-DmXRpAAK.d.mts → sidebar-CJze8SBi.d.mts} +1 -1
- package/dist/{sitemap-CHvips7o.mjs → sitemap-DOaJIKJf.mjs} +11 -11
- package/dist/{sitemap-server-C2TauhKa.mjs → sitemap-server-NeVu8W38.mjs} +1 -1
- package/dist/{skills-aaE5L1go.mjs → skills-BILSESek.mjs} +11 -11
- package/dist/{standards-discovery-Ckx0tN7B.mjs → standards-discovery-Bpz90VYq.mjs} +2 -177
- package/dist/{standards-discovery-Cqq8QmlH.d.mts → standards-discovery-Xm84bS4M.d.mts} +1 -1
- package/dist/{types-BthCiAD9.d.mts → types-QhYMnKvb.d.mts} +35 -2
- package/dist/{upgrade-B0OA_7jE.mjs → upgrade-B92U83xo.mjs} +2 -2
- package/package.json +1 -1
- package/dist/retrieval-digest-DT9Ktc4C.d.mts +0 -164
- /package/dist/{agent-feedback-loop-CGrc-gDW.mjs → agent-feedback-loop-vaC-M1sx.mjs} +0 -0
- /package/dist/{audience-exposure-BW13cI2O.d.mts → audience-exposure-CkNZNeVX.d.mts} +0 -0
- /package/dist/{cloud-analytics-CSyFE6SS.mjs → cloud-analytics-Ci1yiwD8.mjs} +0 -0
- /package/dist/{code-blocks-c3nIrWOM.mjs → code-blocks-D90CCJFs.mjs} +0 -0
- /package/dist/{config-BhF6J2N4.mjs → config-DrZ3fXgf.mjs} +0 -0
- /package/dist/{errors-B5KTe1Xo.mjs → errors-BDmra6mz.mjs} +0 -0
- /package/dist/{i18n-B3BIxShC.mjs → i18n-B1gJ9EW0.mjs} +0 -0
- /package/dist/{sidebar-IcpElOVH.mjs → sidebar-3W51s2sF.mjs} +0 -0
- /package/dist/{templates-m_j4ARnu.mjs → templates-DdB4BBGq.mjs} +0 -0
- /package/dist/{utils-DcCUwxqS.mjs → utils-Cc1SrVza.mjs} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { O as DocsA2AAgentCardOptions, R as DocsDiscoveryApiRouteOptions, z as DocsPublishedAgentSkill } from "./standards-discovery-
|
|
3
|
-
import { t as DocsContentAudience } from "./audience-exposure-
|
|
1
|
+
import { Ar as LlmsTxtConfig, Bn as DocsSearchAdapterFactory, Bt as DocsConfig, En as DocsPaginatedSearchResponse, Er as FeedbackConfig, Et as DocsAskAIMcpConfig, Gn as DocsSearchChunkingConfig, In as DocsRobotsConfig, J as DocsAgentFeedbackData, Kn as DocsSearchConfig, Kt as DocsContentChangesResponse, L as DocsAgentContentChangesConfig, Mr as LlmsTxtMaxCharsMode, Nr as LlmsTxtSectionConfig, Pr as McpDocsSearchConfig, Qn as DocsSearchFacetsResponse, Rn as DocsSearchAdapter, Tn as DocsPageAccessPolicy, Xr as PageAgentFrontmatter, Zt as DocsI18nConfig, _r as DocsSitemapConfig, bn as DocsOkfTrustMetadataInput, f as CustomDocsSearchConfig, fr as DocsSearchResult, gn as DocsOkfConfig, ii as ResolvedDocsRelatedLink, jr as LlmsTxtMaxCharsConfig, m as DocsAccessPrincipal, mi as TypesenseDocsSearchConfig, mr as DocsSearchSourcePage, nr as DocsSearchFilterInput, qn as DocsSearchDocument, qt as DocsContentSnapshot, r as AlgoliaDocsSearchConfig, rn as DocsMcpConfig, rr as DocsSearchFilters, tr as DocsSearchFilterField, ur as DocsSearchRequest } from "./types-QhYMnKvb.mjs";
|
|
2
|
+
import { O as DocsA2AAgentCardOptions, R as DocsDiscoveryApiRouteOptions, z as DocsPublishedAgentSkill } from "./standards-discovery-Xm84bS4M.mjs";
|
|
3
|
+
import { t as DocsContentAudience } from "./audience-exposure-CkNZNeVX.mjs";
|
|
4
4
|
import { DocsMcpPage, DocsMcpResolvedConfig, DocsMcpResolvedPromptsConfig } from "./mcp.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/i18n.d.ts
|
|
@@ -18,6 +18,17 @@ declare function resolveDocsI18n(config?: DocsI18nConfig | null): ResolvedDocsI1
|
|
|
18
18
|
declare function resolveDocsLocale(searchParams: URLSearchParams, i18n?: ResolvedDocsI18n | null): string | undefined;
|
|
19
19
|
declare function resolveDocsPath(pathname: string, entry: string): DocsPathMatch;
|
|
20
20
|
//#endregion
|
|
21
|
+
//#region src/mcp-auth.d.ts
|
|
22
|
+
declare const DEFAULT_MCP_ROUTE = "/api/docs/mcp";
|
|
23
|
+
declare const DEFAULT_MCP_PUBLIC_ROUTE = "/mcp";
|
|
24
|
+
declare const DEFAULT_MCP_WELL_KNOWN_ROUTE = "/.well-known/mcp";
|
|
25
|
+
declare const DEFAULT_MCP_PROTECTED_RESOURCE_METADATA_ROUTE = "/.well-known/oauth-protected-resource";
|
|
26
|
+
declare function getDocsMcpResourcePaths(route?: string): string[];
|
|
27
|
+
declare function buildDocsMcpProtectedResourceMetadataRoute(resourcePath: string): string;
|
|
28
|
+
declare function getDocsMcpProtectedResourceMetadataRoutes(route?: string): string[];
|
|
29
|
+
declare function hasDocsMcpProtectedResourceConfig(mcp?: boolean | DocsMcpConfig): boolean;
|
|
30
|
+
declare function isDocsMcpRequest(url: URL, mcp?: boolean | DocsMcpConfig): boolean;
|
|
31
|
+
//#endregion
|
|
21
32
|
//#region src/audience.d.ts
|
|
22
33
|
interface DocsMarkdownPromptBlock {
|
|
23
34
|
/** Raw JSX attributes between the Prompt name and opening bracket. */
|
|
@@ -59,714 +70,377 @@ declare function resolveDocsAudienceMdxContent(content: string, audience: DocsCo
|
|
|
59
70
|
/** Backwards-compatible name retained for existing integrations. */
|
|
60
71
|
declare function resolveDocsAgentMdxContent(content: string, audience: DocsContentAudience): string;
|
|
61
72
|
//#endregion
|
|
62
|
-
//#region src/
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
73
|
+
//#region src/agent.d.ts
|
|
74
|
+
declare const DEFAULT_DOCS_API_ROUTE = "/api/docs";
|
|
75
|
+
declare const DEFAULT_DOCS_CONFIG_FORMAT = "docs-config-map.v1";
|
|
76
|
+
declare const DEFAULT_DOCS_CONFIG_ROUTE = "/api/docs?format=config";
|
|
77
|
+
declare const DEFAULT_DOCS_DIAGNOSTICS_FORMAT = "docs-diagnostics.v1";
|
|
78
|
+
declare const DEFAULT_DOCS_DIAGNOSTICS_ROUTE = "/api/docs?format=diagnostics";
|
|
79
|
+
declare const DEFAULT_OPENAPI_SCHEMA_ROUTE = "/api/docs?format=openapi";
|
|
80
|
+
declare const DEFAULT_AGENT_SPEC_ROUTE = "/api/docs/agent/spec";
|
|
81
|
+
declare const DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE = "/.well-known/agent";
|
|
82
|
+
declare const DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE = "/.well-known/agent.json";
|
|
83
|
+
declare const DEFAULT_LLMS_TXT_ROUTE = "/llms.txt";
|
|
84
|
+
declare const DEFAULT_LLMS_FULL_TXT_ROUTE = "/llms-full.txt";
|
|
85
|
+
declare const DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE = "/.well-known/llms.txt";
|
|
86
|
+
declare const DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE = "/.well-known/llms-full.txt";
|
|
87
|
+
declare const DEFAULT_LLMS_TXT_MAX_CHARS = 50000;
|
|
88
|
+
declare const DEFAULT_SKILL_MD_ROUTE = "/skill.md";
|
|
89
|
+
declare const DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE = "/.well-known/skill.md";
|
|
90
|
+
declare const DEFAULT_AGENTS_MD_ROUTE = "/AGENTS.md";
|
|
91
|
+
declare const DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE = "/.well-known/AGENTS.md";
|
|
92
|
+
declare const DEFAULT_AGENT_MD_ROUTE = "/AGENT.md";
|
|
93
|
+
declare const DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE = "/.well-known/AGENT.md";
|
|
94
|
+
declare const DEFAULT_AGENT_FEEDBACK_ROUTE = "/api/docs/agent/feedback";
|
|
95
|
+
declare const DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA: Record<string, unknown>;
|
|
96
|
+
declare const DOCS_MARKDOWN_SIGNATURE_AGENT_HEADER = "Signature-Agent";
|
|
97
|
+
declare const DOCS_MARKDOWN_SECTION_INDEX_FORMAT = "docs-markdown-sections.v2";
|
|
98
|
+
declare const DOCS_AI_AGENT_USER_AGENT_HEADER_PATTERN: string;
|
|
99
|
+
declare const DOCS_TRADITIONAL_BOT_USER_AGENT_HEADER_PATTERN: string;
|
|
100
|
+
declare const DOCS_BOT_LIKE_USER_AGENT_HEADER_PATTERN: string;
|
|
101
|
+
interface DocsMcpEndpointCandidate {
|
|
102
|
+
baseUrl: string;
|
|
103
|
+
route: string;
|
|
104
|
+
url: string;
|
|
105
|
+
label: string;
|
|
66
106
|
}
|
|
67
|
-
interface
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
text: string;
|
|
72
|
-
result: DocsAskAIContextResult;
|
|
73
|
-
}>;
|
|
74
|
-
results: DocsAskAIContextResult[];
|
|
75
|
-
searchResults: DocsSearchResult[];
|
|
76
|
-
packageHints: DocsAskAIPackageHints;
|
|
107
|
+
interface DocsMcpEndpointCandidateOptions {
|
|
108
|
+
includeOriginFallback?: boolean;
|
|
109
|
+
includeRootDomainFallback?: boolean;
|
|
110
|
+
includeMcpSubdomainFallback?: boolean;
|
|
77
111
|
}
|
|
78
|
-
interface
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
112
|
+
interface DocsAgentFeedbackResolvedConfig {
|
|
113
|
+
enabled: boolean;
|
|
114
|
+
route: string;
|
|
115
|
+
schemaRoute: string;
|
|
116
|
+
payloadSchema: Record<string, unknown>;
|
|
117
|
+
schema: Record<string, unknown>;
|
|
118
|
+
onFeedback?: (data: DocsAgentFeedbackData) => void | Promise<void>;
|
|
82
119
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
/** Parse the public search scope parameters from a URL query string. */
|
|
86
|
-
declare function resolveDocsSearchFilters(searchParams: URLSearchParams): DocsSearchFilters;
|
|
87
|
-
declare class DocsSearchRequestError extends Error {
|
|
88
|
-
readonly code = "invalid_search_request";
|
|
89
|
-
constructor(message: string);
|
|
120
|
+
interface DocsAgentFeedbackRequest {
|
|
121
|
+
kind: "schema" | "submit";
|
|
90
122
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
/** Resolve search filters and the backwards-compatible structured response opt-in. */
|
|
96
|
-
declare function resolveDocsSearchRequest(searchParams: URLSearchParams): DocsSearchRequest;
|
|
97
|
-
declare function inferDocsAskAIPackageHints(content: string): DocsAskAIPackageHints;
|
|
98
|
-
declare function formatDocsAskAIPackageHints(hints: DocsAskAIPackageHints, packageName?: string): string | undefined;
|
|
99
|
-
/**
|
|
100
|
-
* Build the exact normalized-input projection represented by a retrieval source digest.
|
|
101
|
-
* This is public so consumers can independently reproduce `source.digest`.
|
|
102
|
-
*/
|
|
103
|
-
declare function buildDocsRetrievalDigestProjection(page: DocsSearchSourcePage, audience?: DocsContentAudience): string;
|
|
104
|
-
declare function resolveDocsRetrievalLastModified(page: DocsSearchSourcePage, audience: DocsContentAudience): string | undefined;
|
|
105
|
-
interface BuildDocsContentSnapshotOptions {
|
|
106
|
-
pages: readonly DocsSearchSourcePage[];
|
|
107
|
-
search?: boolean | DocsSearchConfig;
|
|
108
|
-
audience?: DocsContentAudience;
|
|
109
|
-
locale?: string;
|
|
110
|
-
baseUrl?: string;
|
|
111
|
-
/** @internal Precomputed complete-corpus generation for composed callers. */
|
|
112
|
-
indexGeneration?: string;
|
|
123
|
+
interface DocsAgentFeedbackDiscoveryConfig {
|
|
124
|
+
enabled?: boolean;
|
|
125
|
+
route?: string;
|
|
126
|
+
schemaRoute?: string;
|
|
113
127
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
* locale, base URL, and chunking policy.
|
|
119
|
-
*/
|
|
120
|
-
declare function buildDocsContentSnapshot(options: BuildDocsContentSnapshotOptions): Promise<DocsContentSnapshot>;
|
|
121
|
-
interface EnrichDocsSearchDocumentsWithProvenanceOptions {
|
|
122
|
-
documents: readonly DocsSearchDocument[];
|
|
123
|
-
pages: readonly DocsSearchSourcePage[];
|
|
124
|
-
audience?: DocsContentAudience;
|
|
125
|
-
chunking?: DocsSearchChunkingConfig;
|
|
126
|
-
locale?: string;
|
|
128
|
+
interface DocsLlmsDiscoveryConfig extends DocsDiscoveryApiRouteOptions {
|
|
129
|
+
enabled?: boolean;
|
|
130
|
+
/** Whether this deployment actually serves the RFC 9727 API catalog. Defaults to true. */
|
|
131
|
+
apiCatalog?: boolean;
|
|
127
132
|
baseUrl?: string;
|
|
128
|
-
|
|
133
|
+
siteTitle?: string;
|
|
134
|
+
siteDescription?: string;
|
|
135
|
+
maxChars?: LlmsTxtMaxCharsConfig;
|
|
136
|
+
sections?: LlmsTxtSectionConfig[];
|
|
137
|
+
openapi?: boolean | DocsOpenApiDiscoveryConfig;
|
|
129
138
|
}
|
|
130
|
-
|
|
131
|
-
* Attach the same canonical provenance used by built-in search providers.
|
|
132
|
-
* Custom adapters can call this before persisting their own hosted records.
|
|
133
|
-
*/
|
|
134
|
-
declare function enrichDocsSearchDocumentsWithProvenance(options: EnrichDocsSearchDocumentsWithProvenanceOptions): Promise<DocsSearchDocument[]>;
|
|
135
|
-
declare function buildDocsSearchDocuments(pages: DocsSearchSourcePage[], chunking?: DocsSearchChunkingConfig, audience?: DocsContentAudience): DocsSearchDocument[];
|
|
136
|
-
declare function createSimpleSearchAdapter(): DocsSearchAdapter;
|
|
137
|
-
declare function createTypesenseSearchAdapter(config: TypesenseDocsSearchConfig): DocsSearchAdapter;
|
|
138
|
-
declare function resolveSearchRequestConfig(search: boolean | DocsSearchConfig | undefined, requestUrl?: string, options?: DocsSearchRequestResolutionOptions): boolean | DocsSearchConfig | undefined;
|
|
139
|
-
interface DocsLocalMcpSearchRuntimeConfig {
|
|
139
|
+
interface DocsOpenApiDiscoveryConfig {
|
|
140
140
|
enabled?: boolean;
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
141
|
+
url?: string;
|
|
142
|
+
/** Whether `url` came from the framework default or explicit configuration. */
|
|
143
|
+
urlSource?: "default" | "configured";
|
|
144
|
+
source?: "generated" | "configured";
|
|
145
|
+
specUrl?: string;
|
|
146
|
+
apiReferencePath?: string;
|
|
147
|
+
/** Product API targets described by this OpenAPI document. */
|
|
148
|
+
catalogTargets?: readonly string[];
|
|
145
149
|
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
150
|
+
interface DocsOpenApiResolvedDiscoveryConfig {
|
|
151
|
+
enabled: boolean;
|
|
152
|
+
url?: string;
|
|
153
|
+
/** Whether `url` came from the framework default or explicit configuration. */
|
|
154
|
+
urlSource?: "default" | "configured";
|
|
155
|
+
source?: "generated" | "configured";
|
|
156
|
+
specUrl?: string;
|
|
157
|
+
apiReferencePath?: string;
|
|
158
|
+
/** Product API targets described by this OpenAPI document. */
|
|
159
|
+
catalogTargets?: readonly string[];
|
|
154
160
|
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
mcpEndpoint?: string;
|
|
165
|
-
mcpEnabled?: boolean;
|
|
166
|
-
mcpSearchEnabled?: boolean;
|
|
167
|
-
requestUrl?: string;
|
|
168
|
-
}): boolean | DocsSearchConfig | undefined;
|
|
169
|
-
declare function createMcpSearchAdapter(config: McpDocsSearchConfig): DocsSearchAdapter;
|
|
170
|
-
declare function createAlgoliaSearchAdapter(config: AlgoliaDocsSearchConfig): DocsSearchAdapter;
|
|
171
|
-
interface PerformDocsSearchOptions {
|
|
172
|
-
pages: DocsSearchSourcePage[];
|
|
173
|
-
/** @internal Complete corpus used for generation when `pages` is pre-scoped by a caller. */
|
|
174
|
-
generationPages?: DocsSearchSourcePage[];
|
|
175
|
-
/** @internal Precomputed complete-corpus generation for structured callers. */
|
|
176
|
-
indexGeneration?: string;
|
|
177
|
-
query: string;
|
|
178
|
-
search?: boolean | DocsSearchConfig;
|
|
179
|
-
/** Selects which audience projection is searchable. Public site search defaults to human. */
|
|
180
|
-
audience?: DocsContentAudience;
|
|
181
|
-
locale?: string;
|
|
182
|
-
pathname?: string;
|
|
183
|
-
siteTitle?: string;
|
|
184
|
-
/** Canonical docs URL used to distinguish same-site absolute hits from foreign MCP results. */
|
|
185
|
-
baseUrl?: string;
|
|
186
|
-
/**
|
|
187
|
-
* Canonical origin safe to persist in a hosted index. Pass `null` when `baseUrl`
|
|
188
|
-
* came from the current request rather than trusted configuration.
|
|
189
|
-
* @internal
|
|
190
|
-
*/
|
|
191
|
-
syncBaseUrl?: string | null;
|
|
192
|
-
limit?: number;
|
|
193
|
-
/** Opaque continuation cursor used by structured search responses. */
|
|
194
|
-
cursor?: string;
|
|
195
|
-
/** Optional framework, version, package, and tag constraints. */
|
|
196
|
-
filters?: DocsSearchFilterInput;
|
|
197
|
-
/** Include bounded explanations for the final ranked results. Defaults to false. */
|
|
198
|
-
explain?: boolean;
|
|
199
|
-
/**
|
|
200
|
-
* Controls provider failures. Runtime search keeps the resilient `fallback` default;
|
|
201
|
-
* diagnostics can request `throw` so a broken configured provider cannot be scored as
|
|
202
|
-
* successful simple search.
|
|
203
|
-
*/
|
|
204
|
-
failureMode?: "fallback" | "throw";
|
|
205
|
-
/**
|
|
206
|
-
* Whether non-simple provider hits are supplemented with exact/local simple results.
|
|
207
|
-
* Runtime search defaults to true; provider diagnostics can disable supplementation.
|
|
208
|
-
*/
|
|
209
|
-
supplementExternalResults?: boolean;
|
|
210
|
-
/** Keep absolute provider origins distinct when no canonical docs origin is available. */
|
|
211
|
-
strictExternalOrigins?: boolean;
|
|
212
|
-
/** Optional cancellation signal forwarded to adapters and their managed requests. */
|
|
213
|
-
signal?: AbortSignal;
|
|
161
|
+
type DocsConfigMapJsonPrimitive = string | number | boolean | null;
|
|
162
|
+
type DocsConfigMapJsonValue = DocsConfigMapJsonPrimitive | DocsConfigMapJsonValue[] | {
|
|
163
|
+
[key: string]: DocsConfigMapJsonValue;
|
|
164
|
+
};
|
|
165
|
+
interface DocsConfigMapPointer {
|
|
166
|
+
/** Dot-path form for humans and TypeScript users, e.g. `mcp.tools.readPage`. */
|
|
167
|
+
path: string;
|
|
168
|
+
/** Coarse value kind at this pointer. */
|
|
169
|
+
kind: string;
|
|
214
170
|
}
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
171
|
+
interface DocsConfigMap {
|
|
172
|
+
schemaVersion: 1;
|
|
173
|
+
format: typeof DEFAULT_DOCS_CONFIG_FORMAT;
|
|
174
|
+
source: {
|
|
175
|
+
/** Best-effort source label; adapters only receive the runtime config object. */file: string; /** Best-effort language hint based on serializing the runtime config object. */
|
|
176
|
+
language: "ts" | "tsx";
|
|
177
|
+
};
|
|
178
|
+
serialization: {
|
|
179
|
+
mode: "json-safe";
|
|
180
|
+
redacted: string;
|
|
181
|
+
nonSerializable: "described";
|
|
182
|
+
};
|
|
183
|
+
values: {
|
|
184
|
+
[key: string]: DocsConfigMapJsonValue;
|
|
185
|
+
};
|
|
186
|
+
/** RFC 6901 JSON Pointer index for mapping response values back to docs.config paths. */
|
|
187
|
+
pointers: Record<string, DocsConfigMapPointer>;
|
|
231
188
|
}
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
declare function buildDocsSearchFacets(options: BuildDocsSearchFacetsOptions): Promise<DocsSearchFacetsResponse>;
|
|
240
|
-
declare function performDocsSearchWithMetadata(options: PerformDocsSearchOptions): Promise<DocsPaginatedSearchResponse>;
|
|
241
|
-
declare function buildDocsAskAIContext(options: {
|
|
242
|
-
pages: DocsSearchSourcePage[];
|
|
243
|
-
query: string;
|
|
244
|
-
search?: boolean | DocsSearchConfig;
|
|
245
|
-
locale?: string;
|
|
246
|
-
pathname?: string;
|
|
247
|
-
siteTitle?: string;
|
|
248
|
-
baseUrl?: string; /** See `performDocsSearch.syncBaseUrl`. */
|
|
249
|
-
syncBaseUrl?: string | null;
|
|
250
|
-
limit?: number;
|
|
251
|
-
filters?: DocsSearchFilterInput;
|
|
252
|
-
maxContextChars?: number;
|
|
253
|
-
maxResultChars?: number; /** See `performDocsSearch.failureMode`. Defaults to resilient runtime fallback. */
|
|
254
|
-
searchFailureMode?: "fallback" | "throw"; /** See `performDocsSearch.strictExternalOrigins`. */
|
|
255
|
-
strictExternalOrigins?: boolean; /** Optional cancellation signal forwarded to the configured search provider. */
|
|
256
|
-
signal?: AbortSignal;
|
|
257
|
-
}): Promise<DocsAskAIContext>;
|
|
258
|
-
declare function createCustomSearchAdapter(adapter: DocsSearchAdapter | DocsSearchAdapterFactory, options?: {
|
|
259
|
-
paginationRevision?: string;
|
|
260
|
-
}): CustomDocsSearchConfig;
|
|
261
|
-
//#endregion
|
|
262
|
-
//#region src/content-changes.d.ts
|
|
263
|
-
declare const DOCS_CONTENT_CHANGES_FORMAT = "docs-content-changes.v1";
|
|
264
|
-
declare const DOCS_CONTENT_SNAPSHOT_FORMAT = "docs-content-snapshot.v1";
|
|
265
|
-
declare const DOCS_CONTENT_CHANGES_RESPONSE_VALUE = "changes";
|
|
266
|
-
/** Whether a value is a valid content-index generation identifier. */
|
|
267
|
-
declare function isDocsContentChangeGeneration(value: string): boolean;
|
|
268
|
-
interface DocsContentChangesRequest {
|
|
269
|
-
audience: "human" | "agent";
|
|
270
|
-
since?: string;
|
|
189
|
+
type DocsDiagnosticsStatus = "enabled" | "disabled";
|
|
190
|
+
type DocsDiagnosticsIssueSeverity = "warning" | "error";
|
|
191
|
+
interface DocsDiagnosticsIssue {
|
|
192
|
+
severity: DocsDiagnosticsIssueSeverity;
|
|
193
|
+
code: string;
|
|
194
|
+
path?: string;
|
|
195
|
+
message: string;
|
|
271
196
|
}
|
|
272
|
-
interface
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
197
|
+
interface DocsDiagnosticsFeature {
|
|
198
|
+
status: DocsDiagnosticsStatus;
|
|
199
|
+
reason?: string;
|
|
200
|
+
route?: string | null;
|
|
201
|
+
routes?: Record<string, string | null>;
|
|
202
|
+
agentEndpoint?: string | null;
|
|
203
|
+
structuredAgentEndpoint?: string | null;
|
|
204
|
+
explainedAgentEndpoint?: string | null;
|
|
205
|
+
facetsEndpoint?: string | null;
|
|
206
|
+
audienceParam?: string;
|
|
207
|
+
defaultAudience?: "human" | "agent";
|
|
208
|
+
supportedAudiences?: Array<"human" | "agent">;
|
|
209
|
+
filterParams?: {
|
|
210
|
+
framework: "framework";
|
|
211
|
+
version: "version";
|
|
212
|
+
package: "package";
|
|
213
|
+
tags: "tags";
|
|
214
|
+
};
|
|
215
|
+
responseFormat?: "docs-search.v1";
|
|
216
|
+
explainParam?: "explain";
|
|
217
|
+
explainValue?: "true";
|
|
218
|
+
explanationField?: "explanation";
|
|
219
|
+
explanationFormat?: "docs-search-explanation.v1";
|
|
220
|
+
facetsResponseFormat?: "docs-search-facets.v1";
|
|
221
|
+
format?: string;
|
|
222
|
+
sinceParam?: string;
|
|
223
|
+
generationField?: string;
|
|
224
|
+
resetRequiredField?: string;
|
|
225
|
+
warningsField?: "warnings";
|
|
226
|
+
/** Facet field selected for facet-value continuation. */
|
|
227
|
+
facetParam?: "facet";
|
|
228
|
+
/** Page-size parameter accepted by structured search and facet discovery. */
|
|
229
|
+
limitParam?: "limit";
|
|
230
|
+
/** Opaque continuation token accepted by structured search and facet discovery. */
|
|
231
|
+
cursorParam?: "cursor";
|
|
232
|
+
/** Optional continuation token returned when another result page is available. */
|
|
233
|
+
nextCursorField?: "nextCursor";
|
|
234
|
+
/** Boolean structured-response field indicating whether another page is available. */
|
|
235
|
+
hasMoreField?: "hasMore";
|
|
236
|
+
/** Structured-response field containing the total matches across all pages. */
|
|
237
|
+
totalField?: "total";
|
|
238
|
+
provider?: string;
|
|
239
|
+
mode?: string;
|
|
240
|
+
transport?: "GET" | "POST" | "GET/HEAD" | "GET/POST";
|
|
241
|
+
tools?: Record<string, boolean>;
|
|
242
|
+
prompts?: DocsMcpResolvedConfig["prompts"];
|
|
243
|
+
human?: boolean;
|
|
244
|
+
agent?: boolean;
|
|
277
245
|
}
|
|
278
|
-
interface
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
246
|
+
interface DocsDiagnostics {
|
|
247
|
+
schemaVersion: 1;
|
|
248
|
+
format: typeof DEFAULT_DOCS_DIAGNOSTICS_FORMAT;
|
|
249
|
+
ok: boolean;
|
|
250
|
+
adapter: string | null;
|
|
251
|
+
routes: {
|
|
252
|
+
docs: string;
|
|
253
|
+
api: string;
|
|
254
|
+
config: string;
|
|
255
|
+
diagnostics: string;
|
|
256
|
+
agentSpec: string;
|
|
257
|
+
apiCatalog: string | null;
|
|
258
|
+
agentSkillsIndex: string;
|
|
259
|
+
agentSkillsArtifact: string;
|
|
260
|
+
agents: string;
|
|
261
|
+
skill: string;
|
|
262
|
+
search: string | null;
|
|
263
|
+
agentSearch: string | null;
|
|
264
|
+
contentChanges: string | null;
|
|
265
|
+
askAi: string | null;
|
|
266
|
+
mcp: string | null;
|
|
267
|
+
llmsTxt: string | null;
|
|
268
|
+
llmsFullTxt: string | null;
|
|
269
|
+
sitemapXml: string | null;
|
|
270
|
+
sitemapMarkdown: string | null;
|
|
271
|
+
robots: string | null;
|
|
272
|
+
openapi: string | null;
|
|
273
|
+
apiReference: string | null;
|
|
274
|
+
};
|
|
275
|
+
features: {
|
|
276
|
+
staticExport: DocsDiagnosticsFeature;
|
|
277
|
+
config: DocsDiagnosticsFeature;
|
|
278
|
+
diagnostics: DocsDiagnosticsFeature;
|
|
279
|
+
apiCatalog: DocsDiagnosticsFeature;
|
|
280
|
+
search: DocsDiagnosticsFeature;
|
|
281
|
+
contentChanges: DocsDiagnosticsFeature;
|
|
282
|
+
ai: DocsDiagnosticsFeature;
|
|
283
|
+
mcp: DocsDiagnosticsFeature;
|
|
284
|
+
feedback: DocsDiagnosticsFeature;
|
|
285
|
+
llmsTxt: DocsDiagnosticsFeature;
|
|
286
|
+
sitemap: DocsDiagnosticsFeature;
|
|
287
|
+
robots: DocsDiagnosticsFeature;
|
|
288
|
+
apiReference: DocsDiagnosticsFeature;
|
|
289
|
+
agents: DocsDiagnosticsFeature;
|
|
290
|
+
skills: DocsDiagnosticsFeature;
|
|
291
|
+
locales: DocsDiagnosticsFeature;
|
|
292
|
+
};
|
|
293
|
+
warnings: DocsDiagnosticsIssue[];
|
|
294
|
+
errors: DocsDiagnosticsIssue[];
|
|
282
295
|
}
|
|
283
|
-
interface
|
|
284
|
-
|
|
296
|
+
interface DocsDiagnosticsOptions extends DocsDiscoveryApiRouteOptions {
|
|
297
|
+
adapter?: string;
|
|
298
|
+
/** Effective RFC 9727 catalog availability after runtime overrides are applied. */
|
|
299
|
+
apiCatalog?: boolean;
|
|
300
|
+
entry?: string;
|
|
301
|
+
i18n?: ResolvedDocsI18n | null;
|
|
302
|
+
mcp?: DocsMcpResolvedConfig;
|
|
303
|
+
feedback?: DocsAgentFeedbackDiscoveryConfig;
|
|
304
|
+
openapi?: boolean | DocsOpenApiDiscoveryConfig;
|
|
285
305
|
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
306
|
+
interface DocsLlmsTxtResolvedMaxChars {
|
|
307
|
+
mode: LlmsTxtMaxCharsMode;
|
|
308
|
+
chars: number;
|
|
289
309
|
}
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
request: Request;
|
|
298
|
-
feed: DocsContentChangeFeed;
|
|
299
|
-
pages: readonly DocsSearchSourcePage[];
|
|
300
|
-
search?: boolean | DocsSearchConfig;
|
|
301
|
-
locale?: string;
|
|
302
|
-
baseUrl?: string;
|
|
303
|
-
}): Promise<Response>;
|
|
304
|
-
//#endregion
|
|
305
|
-
//#region src/content-change-hydration.d.ts
|
|
306
|
-
declare const DOCS_CONTENT_CHANGE_HYDRATION_FORMAT = "docs-content-change-hydration.v1";
|
|
307
|
-
declare const DEFAULT_DOCS_CONTENT_CHANGE_HYDRATION_TOKEN_BUDGET = 5000;
|
|
308
|
-
declare const MIN_DOCS_CONTENT_CHANGE_HYDRATION_TOKEN_BUDGET = 4;
|
|
309
|
-
declare const MAX_DOCS_CONTENT_CHANGE_HYDRATION_TOKEN_BUDGET = 32000;
|
|
310
|
-
interface DocsContentChangeHydrationSection {
|
|
311
|
-
id: string;
|
|
312
|
-
heading: string;
|
|
313
|
-
level: number;
|
|
310
|
+
interface DocsLlmsTxtResolvedSection {
|
|
311
|
+
title: string;
|
|
312
|
+
description?: string;
|
|
313
|
+
match: string[];
|
|
314
|
+
route: string;
|
|
315
|
+
fullRoute: string;
|
|
316
|
+
maxChars: DocsLlmsTxtResolvedMaxChars;
|
|
314
317
|
}
|
|
315
|
-
interface
|
|
316
|
-
|
|
317
|
-
|
|
318
|
+
interface DocsLlmsTxtRequest {
|
|
319
|
+
format: "llms" | "llms-full";
|
|
320
|
+
section?: DocsLlmsTxtResolvedSection;
|
|
321
|
+
}
|
|
322
|
+
interface DocsLlmsTxtPageInput {
|
|
318
323
|
url: string;
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
lastModified?: string;
|
|
324
|
-
previousLastModified?: string;
|
|
325
|
-
section: DocsContentChangeHydrationSection;
|
|
326
|
-
/** Digest of the complete, non-overlapping section before chunking. */
|
|
327
|
-
sectionDigest: string;
|
|
328
|
-
/** Digest of the content bytes returned in this chunk. */
|
|
329
|
-
chunkDigest: string;
|
|
330
|
-
chunk: {
|
|
331
|
-
index: number;
|
|
332
|
-
count: number;
|
|
333
|
-
};
|
|
324
|
+
/** Override the Markdown link emitted in llms.txt. */
|
|
325
|
+
markdownUrl?: string;
|
|
326
|
+
title: string;
|
|
327
|
+
description?: string;
|
|
334
328
|
content: string;
|
|
335
|
-
|
|
329
|
+
rawContent?: string;
|
|
330
|
+
agentContent?: string;
|
|
331
|
+
agentRawContent?: string;
|
|
332
|
+
agentFallbackContent?: string;
|
|
333
|
+
agentFallbackRawContent?: string;
|
|
334
|
+
agent?: PageAgentFrontmatter;
|
|
336
335
|
}
|
|
337
|
-
interface
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
url: string;
|
|
341
|
-
canonicalUrl: string;
|
|
342
|
-
/** Last known digest for the deleted document. */
|
|
343
|
-
digest: string;
|
|
344
|
-
lastModified?: string;
|
|
345
|
-
}
|
|
346
|
-
interface DocsContentChangeHydrationBudget {
|
|
347
|
-
requestedTokens: number;
|
|
348
|
-
strategy: "utf8-bytes";
|
|
349
|
-
maxUtf8Bytes: number;
|
|
350
|
-
usedUtf8Bytes: number;
|
|
351
|
-
conservativeTokenUpperBound: number;
|
|
352
|
-
remainingUtf8Bytes: number;
|
|
353
|
-
}
|
|
354
|
-
interface DocsContentChangeHydrationResponse {
|
|
355
|
-
format: typeof DOCS_CONTENT_CHANGE_HYDRATION_FORMAT;
|
|
356
|
-
audience: "agent";
|
|
357
|
-
locale?: string;
|
|
358
|
-
since: string;
|
|
359
|
-
indexGeneration: string;
|
|
360
|
-
mode: DocsContentChangesResponse["mode"];
|
|
361
|
-
resetRequired: boolean;
|
|
362
|
-
documentCount: number;
|
|
363
|
-
counts: DocsContentChangesResponse["counts"];
|
|
364
|
-
budget: DocsContentChangeHydrationBudget;
|
|
365
|
-
resultCount: number;
|
|
366
|
-
total: number;
|
|
367
|
-
hasMore: boolean;
|
|
368
|
-
nextCursor?: string;
|
|
369
|
-
content: DocsContentChangeHydrationContent[];
|
|
370
|
-
tombstones: DocsContentChangeHydrationTombstone[];
|
|
336
|
+
interface DocsLlmsTxtGeneratedSection extends DocsLlmsTxtResolvedSection {
|
|
337
|
+
llmsTxt: string;
|
|
338
|
+
llmsFullTxt: string;
|
|
371
339
|
}
|
|
372
|
-
interface
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
cursor?: string;
|
|
378
|
-
/** Stable MCP server identity mixed into opaque continuation cursors. */
|
|
379
|
-
cursorScope: string;
|
|
340
|
+
interface DocsLlmsTxtGeneratedContent {
|
|
341
|
+
llmsTxt: string;
|
|
342
|
+
llmsFullTxt: string;
|
|
343
|
+
maxChars: DocsLlmsTxtResolvedMaxChars;
|
|
344
|
+
sections: DocsLlmsTxtGeneratedSection[];
|
|
380
345
|
}
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
*
|
|
384
|
-
* The conservative budget treats one UTF-8 byte as at most one token. Cursors are
|
|
385
|
-
* bound to the requested generation, current generation, locale, and budget.
|
|
386
|
-
*/
|
|
387
|
-
declare function hydrateDocsContentChanges(options: HydrateDocsContentChangesOptions): DocsContentChangeHydrationResponse;
|
|
388
|
-
//#endregion
|
|
389
|
-
//#region src/mcp-auth.d.ts
|
|
390
|
-
declare const DEFAULT_MCP_ROUTE = "/api/docs/mcp";
|
|
391
|
-
declare const DEFAULT_MCP_PUBLIC_ROUTE = "/mcp";
|
|
392
|
-
declare const DEFAULT_MCP_WELL_KNOWN_ROUTE = "/.well-known/mcp";
|
|
393
|
-
declare const DEFAULT_MCP_PROTECTED_RESOURCE_METADATA_ROUTE = "/.well-known/oauth-protected-resource";
|
|
394
|
-
declare function getDocsMcpResourcePaths(route?: string): string[];
|
|
395
|
-
declare function buildDocsMcpProtectedResourceMetadataRoute(resourcePath: string): string;
|
|
396
|
-
declare function getDocsMcpProtectedResourceMetadataRoutes(route?: string): string[];
|
|
397
|
-
declare function hasDocsMcpProtectedResourceConfig(mcp?: boolean | DocsMcpConfig): boolean;
|
|
398
|
-
declare function isDocsMcpRequest(url: URL, mcp?: boolean | DocsMcpConfig): boolean;
|
|
399
|
-
//#endregion
|
|
400
|
-
//#region src/agent.d.ts
|
|
401
|
-
declare const DEFAULT_DOCS_API_ROUTE = "/api/docs";
|
|
402
|
-
declare const DEFAULT_DOCS_CONFIG_FORMAT = "docs-config-map.v1";
|
|
403
|
-
declare const DEFAULT_DOCS_CONFIG_ROUTE = "/api/docs?format=config";
|
|
404
|
-
declare const DEFAULT_DOCS_DIAGNOSTICS_FORMAT = "docs-diagnostics.v1";
|
|
405
|
-
declare const DEFAULT_DOCS_DIAGNOSTICS_ROUTE = "/api/docs?format=diagnostics";
|
|
406
|
-
declare const DEFAULT_OPENAPI_SCHEMA_ROUTE = "/api/docs?format=openapi";
|
|
407
|
-
declare const DEFAULT_AGENT_SPEC_ROUTE = "/api/docs/agent/spec";
|
|
408
|
-
declare const DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE = "/.well-known/agent";
|
|
409
|
-
declare const DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE = "/.well-known/agent.json";
|
|
410
|
-
declare const DEFAULT_LLMS_TXT_ROUTE = "/llms.txt";
|
|
411
|
-
declare const DEFAULT_LLMS_FULL_TXT_ROUTE = "/llms-full.txt";
|
|
412
|
-
declare const DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE = "/.well-known/llms.txt";
|
|
413
|
-
declare const DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE = "/.well-known/llms-full.txt";
|
|
414
|
-
declare const DEFAULT_LLMS_TXT_MAX_CHARS = 50000;
|
|
415
|
-
declare const DEFAULT_SKILL_MD_ROUTE = "/skill.md";
|
|
416
|
-
declare const DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE = "/.well-known/skill.md";
|
|
417
|
-
declare const DEFAULT_AGENTS_MD_ROUTE = "/AGENTS.md";
|
|
418
|
-
declare const DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE = "/.well-known/AGENTS.md";
|
|
419
|
-
declare const DEFAULT_AGENT_MD_ROUTE = "/AGENT.md";
|
|
420
|
-
declare const DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE = "/.well-known/AGENT.md";
|
|
421
|
-
declare const DEFAULT_AGENT_FEEDBACK_ROUTE = "/api/docs/agent/feedback";
|
|
422
|
-
declare const DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA: Record<string, unknown>;
|
|
423
|
-
declare const DOCS_MARKDOWN_SIGNATURE_AGENT_HEADER = "Signature-Agent";
|
|
424
|
-
declare const DOCS_MARKDOWN_SECTION_INDEX_FORMAT = "docs-markdown-sections.v2";
|
|
425
|
-
declare const DOCS_AI_AGENT_USER_AGENT_HEADER_PATTERN: string;
|
|
426
|
-
declare const DOCS_TRADITIONAL_BOT_USER_AGENT_HEADER_PATTERN: string;
|
|
427
|
-
declare const DOCS_BOT_LIKE_USER_AGENT_HEADER_PATTERN: string;
|
|
428
|
-
interface DocsMcpEndpointCandidate {
|
|
429
|
-
baseUrl: string;
|
|
430
|
-
route: string;
|
|
431
|
-
url: string;
|
|
346
|
+
interface DocsLlmsTxtSelectedContent {
|
|
347
|
+
content: string;
|
|
432
348
|
label: string;
|
|
349
|
+
maxChars: DocsLlmsTxtResolvedMaxChars;
|
|
433
350
|
}
|
|
434
|
-
interface
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
enabled: boolean;
|
|
441
|
-
route: string;
|
|
442
|
-
schemaRoute: string;
|
|
443
|
-
payloadSchema: Record<string, unknown>;
|
|
444
|
-
schema: Record<string, unknown>;
|
|
445
|
-
onFeedback?: (data: DocsAgentFeedbackData) => void | Promise<void>;
|
|
446
|
-
}
|
|
447
|
-
interface DocsAgentFeedbackRequest {
|
|
448
|
-
kind: "schema" | "submit";
|
|
351
|
+
interface DocsLlmsTxtMaxCharsIssue {
|
|
352
|
+
mode: Exclude<LlmsTxtMaxCharsMode, "off">;
|
|
353
|
+
chars: number;
|
|
354
|
+
actual: number;
|
|
355
|
+
label: string;
|
|
356
|
+
message: string;
|
|
449
357
|
}
|
|
450
|
-
interface
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
358
|
+
interface DocsAgentDiscoverySpecOptions extends DocsDiscoveryApiRouteOptions {
|
|
359
|
+
origin: string;
|
|
360
|
+
entry?: string;
|
|
361
|
+
/** Public rendered docs path when it differs from `entry`. */
|
|
362
|
+
docsPath?: string;
|
|
363
|
+
/** Whether this deployment actually serves the RFC 9727 API catalog. Defaults to true. */
|
|
364
|
+
apiCatalog?: boolean;
|
|
365
|
+
i18n?: ResolvedDocsI18n | null;
|
|
366
|
+
search?: boolean | DocsSearchConfig;
|
|
367
|
+
/** Runtime metadata-only document synchronization feed. Defaults to enabled. */
|
|
368
|
+
contentChanges?: boolean | DocsAgentContentChangesConfig;
|
|
369
|
+
mcp: DocsMcpResolvedConfig;
|
|
370
|
+
feedback?: DocsAgentFeedbackDiscoveryConfig;
|
|
371
|
+
llms?: DocsLlmsDiscoveryConfig;
|
|
372
|
+
sitemap?: boolean | DocsSitemapConfig;
|
|
373
|
+
robots?: boolean | DocsRobotsConfig;
|
|
374
|
+
openapi?: boolean | DocsOpenApiDiscoveryConfig;
|
|
375
|
+
markdown?: {
|
|
376
|
+
acceptHeader?: boolean;
|
|
377
|
+
signatureAgentHeader?: boolean; /** Whether runtime Markdown routes support `?sections` metadata discovery. Defaults to true. */
|
|
378
|
+
sectionDiscovery?: boolean;
|
|
379
|
+
};
|
|
380
|
+
/** Additional validated project skills to cross-list in custom discovery. */
|
|
381
|
+
publishedSkills?: readonly DocsPublishedAgentSkill[];
|
|
382
|
+
/** Explicit metadata for a real A2A service; omitted sites do not publish an Agent Card. */
|
|
383
|
+
agentCard?: DocsA2AAgentCardOptions;
|
|
454
384
|
}
|
|
455
|
-
interface
|
|
456
|
-
|
|
385
|
+
interface DocsSkillDocumentOptions extends DocsDiscoveryApiRouteOptions {
|
|
386
|
+
origin: string;
|
|
387
|
+
entry?: string;
|
|
388
|
+
/** Public rendered docs path when it differs from `entry`. */
|
|
389
|
+
docsPath?: string;
|
|
457
390
|
/** Whether this deployment actually serves the RFC 9727 API catalog. Defaults to true. */
|
|
458
391
|
apiCatalog?: boolean;
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
392
|
+
search?: boolean | DocsSearchConfig;
|
|
393
|
+
/** Runtime metadata-only document synchronization feed. Defaults to enabled. */
|
|
394
|
+
contentChanges?: boolean | DocsAgentContentChangesConfig;
|
|
395
|
+
mcp: DocsMcpResolvedConfig;
|
|
396
|
+
feedback?: DocsAgentFeedbackDiscoveryConfig;
|
|
397
|
+
llms?: DocsLlmsDiscoveryConfig;
|
|
398
|
+
sitemap?: boolean | DocsSitemapConfig;
|
|
399
|
+
robots?: boolean | DocsRobotsConfig;
|
|
464
400
|
openapi?: boolean | DocsOpenApiDiscoveryConfig;
|
|
401
|
+
markdown?: {
|
|
402
|
+
acceptHeader?: boolean;
|
|
403
|
+
signatureAgentHeader?: boolean; /** Whether runtime Markdown routes support `?sections` metadata discovery. Defaults to true. */
|
|
404
|
+
sectionDiscovery?: boolean;
|
|
405
|
+
};
|
|
465
406
|
}
|
|
466
|
-
interface
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
source
|
|
472
|
-
|
|
473
|
-
apiReferencePath?: string;
|
|
474
|
-
/** Product API targets described by this OpenAPI document. */
|
|
475
|
-
catalogTargets?: readonly string[];
|
|
407
|
+
interface DocsAgentsDocumentOptions extends DocsSkillDocumentOptions {}
|
|
408
|
+
interface DocsStandardsDiscoveryResponseOptions extends DocsAgentDiscoverySpecOptions {
|
|
409
|
+
request: Request;
|
|
410
|
+
preferredSkillDocument?: string | null;
|
|
411
|
+
fallbackSkillDocument: string;
|
|
412
|
+
/** Stable representation generation or source modification time. */
|
|
413
|
+
lastModified?: string | Date | null;
|
|
476
414
|
}
|
|
477
|
-
interface
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
/** Whether `url` came from the framework default or explicit configuration. */
|
|
481
|
-
urlSource?: "default" | "configured";
|
|
482
|
-
source?: "generated" | "configured";
|
|
483
|
-
specUrl?: string;
|
|
484
|
-
apiReferencePath?: string;
|
|
485
|
-
/** Product API targets described by this OpenAPI document. */
|
|
486
|
-
catalogTargets?: readonly string[];
|
|
415
|
+
interface DocsAgentContractMcpTools {
|
|
416
|
+
list?: "list_tasks";
|
|
417
|
+
read?: "read_task";
|
|
487
418
|
}
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
/**
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
419
|
+
interface DocsMarkdownPage {
|
|
420
|
+
slug?: string;
|
|
421
|
+
url: string;
|
|
422
|
+
title: string;
|
|
423
|
+
description?: string;
|
|
424
|
+
/** Override the public Markdown representation URL when it differs from `${url}.md`. */
|
|
425
|
+
markdownUrl?: string;
|
|
426
|
+
lastModified?: string;
|
|
427
|
+
lastmod?: string;
|
|
428
|
+
sourcePath?: string;
|
|
429
|
+
okf?: DocsOkfTrustMetadataInput;
|
|
430
|
+
related?: ResolvedDocsRelatedLink[];
|
|
431
|
+
agent?: PageAgentFrontmatter;
|
|
432
|
+
content: string;
|
|
433
|
+
rawContent?: string;
|
|
434
|
+
agentContent?: string;
|
|
435
|
+
agentRawContent?: string;
|
|
436
|
+
agentFallbackContent?: string;
|
|
437
|
+
agentFallbackRawContent?: string;
|
|
497
438
|
}
|
|
498
|
-
interface
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
language: "ts" | "tsx";
|
|
504
|
-
};
|
|
505
|
-
serialization: {
|
|
506
|
-
mode: "json-safe";
|
|
507
|
-
redacted: string;
|
|
508
|
-
nonSerializable: "described";
|
|
509
|
-
};
|
|
510
|
-
values: {
|
|
511
|
-
[key: string]: DocsConfigMapJsonValue;
|
|
512
|
-
};
|
|
513
|
-
/** RFC 6901 JSON Pointer index for mapping response values back to docs.config paths. */
|
|
514
|
-
pointers: Record<string, DocsConfigMapPointer>;
|
|
515
|
-
}
|
|
516
|
-
type DocsDiagnosticsStatus = "enabled" | "disabled";
|
|
517
|
-
type DocsDiagnosticsIssueSeverity = "warning" | "error";
|
|
518
|
-
interface DocsDiagnosticsIssue {
|
|
519
|
-
severity: DocsDiagnosticsIssueSeverity;
|
|
520
|
-
code: string;
|
|
521
|
-
path?: string;
|
|
522
|
-
message: string;
|
|
523
|
-
}
|
|
524
|
-
interface DocsDiagnosticsFeature {
|
|
525
|
-
status: DocsDiagnosticsStatus;
|
|
526
|
-
reason?: string;
|
|
527
|
-
route?: string | null;
|
|
528
|
-
routes?: Record<string, string | null>;
|
|
529
|
-
agentEndpoint?: string | null;
|
|
530
|
-
structuredAgentEndpoint?: string | null;
|
|
531
|
-
explainedAgentEndpoint?: string | null;
|
|
532
|
-
facetsEndpoint?: string | null;
|
|
533
|
-
audienceParam?: string;
|
|
534
|
-
defaultAudience?: "human" | "agent";
|
|
535
|
-
supportedAudiences?: Array<"human" | "agent">;
|
|
536
|
-
filterParams?: {
|
|
537
|
-
framework: "framework";
|
|
538
|
-
version: "version";
|
|
539
|
-
package: "package";
|
|
540
|
-
tags: "tags";
|
|
541
|
-
};
|
|
542
|
-
responseFormat?: "docs-search.v1";
|
|
543
|
-
explainParam?: "explain";
|
|
544
|
-
explainValue?: "true";
|
|
545
|
-
explanationField?: "explanation";
|
|
546
|
-
explanationFormat?: "docs-search-explanation.v1";
|
|
547
|
-
facetsResponseFormat?: "docs-search-facets.v1";
|
|
548
|
-
format?: string;
|
|
549
|
-
sinceParam?: string;
|
|
550
|
-
generationField?: string;
|
|
551
|
-
resetRequiredField?: string;
|
|
552
|
-
warningsField?: "warnings";
|
|
553
|
-
/** Facet field selected for facet-value continuation. */
|
|
554
|
-
facetParam?: "facet";
|
|
555
|
-
/** Page-size parameter accepted by structured search and facet discovery. */
|
|
556
|
-
limitParam?: "limit";
|
|
557
|
-
/** Opaque continuation token accepted by structured search and facet discovery. */
|
|
558
|
-
cursorParam?: "cursor";
|
|
559
|
-
/** Optional continuation token returned when another result page is available. */
|
|
560
|
-
nextCursorField?: "nextCursor";
|
|
561
|
-
/** Boolean structured-response field indicating whether another page is available. */
|
|
562
|
-
hasMoreField?: "hasMore";
|
|
563
|
-
/** Structured-response field containing the total matches across all pages. */
|
|
564
|
-
totalField?: "total";
|
|
565
|
-
provider?: string;
|
|
566
|
-
mode?: string;
|
|
567
|
-
transport?: "GET" | "POST" | "GET/HEAD" | "GET/POST";
|
|
568
|
-
tools?: Record<string, boolean>;
|
|
569
|
-
prompts?: DocsMcpResolvedConfig["prompts"];
|
|
570
|
-
human?: boolean;
|
|
571
|
-
agent?: boolean;
|
|
572
|
-
}
|
|
573
|
-
interface DocsDiagnostics {
|
|
574
|
-
schemaVersion: 1;
|
|
575
|
-
format: typeof DEFAULT_DOCS_DIAGNOSTICS_FORMAT;
|
|
576
|
-
ok: boolean;
|
|
577
|
-
adapter: string | null;
|
|
578
|
-
routes: {
|
|
579
|
-
docs: string;
|
|
580
|
-
api: string;
|
|
581
|
-
config: string;
|
|
582
|
-
diagnostics: string;
|
|
583
|
-
agentSpec: string;
|
|
584
|
-
apiCatalog: string | null;
|
|
585
|
-
agentSkillsIndex: string;
|
|
586
|
-
agentSkillsArtifact: string;
|
|
587
|
-
agents: string;
|
|
588
|
-
skill: string;
|
|
589
|
-
search: string | null;
|
|
590
|
-
agentSearch: string | null;
|
|
591
|
-
contentChanges: string | null;
|
|
592
|
-
askAi: string | null;
|
|
593
|
-
mcp: string | null;
|
|
594
|
-
llmsTxt: string | null;
|
|
595
|
-
llmsFullTxt: string | null;
|
|
596
|
-
sitemapXml: string | null;
|
|
597
|
-
sitemapMarkdown: string | null;
|
|
598
|
-
robots: string | null;
|
|
599
|
-
openapi: string | null;
|
|
600
|
-
apiReference: string | null;
|
|
601
|
-
};
|
|
602
|
-
features: {
|
|
603
|
-
staticExport: DocsDiagnosticsFeature;
|
|
604
|
-
config: DocsDiagnosticsFeature;
|
|
605
|
-
diagnostics: DocsDiagnosticsFeature;
|
|
606
|
-
apiCatalog: DocsDiagnosticsFeature;
|
|
607
|
-
search: DocsDiagnosticsFeature;
|
|
608
|
-
contentChanges: DocsDiagnosticsFeature;
|
|
609
|
-
ai: DocsDiagnosticsFeature;
|
|
610
|
-
mcp: DocsDiagnosticsFeature;
|
|
611
|
-
feedback: DocsDiagnosticsFeature;
|
|
612
|
-
llmsTxt: DocsDiagnosticsFeature;
|
|
613
|
-
sitemap: DocsDiagnosticsFeature;
|
|
614
|
-
robots: DocsDiagnosticsFeature;
|
|
615
|
-
apiReference: DocsDiagnosticsFeature;
|
|
616
|
-
agents: DocsDiagnosticsFeature;
|
|
617
|
-
skills: DocsDiagnosticsFeature;
|
|
618
|
-
locales: DocsDiagnosticsFeature;
|
|
619
|
-
};
|
|
620
|
-
warnings: DocsDiagnosticsIssue[];
|
|
621
|
-
errors: DocsDiagnosticsIssue[];
|
|
622
|
-
}
|
|
623
|
-
interface DocsDiagnosticsOptions extends DocsDiscoveryApiRouteOptions {
|
|
624
|
-
adapter?: string;
|
|
625
|
-
/** Effective RFC 9727 catalog availability after runtime overrides are applied. */
|
|
626
|
-
apiCatalog?: boolean;
|
|
627
|
-
entry?: string;
|
|
628
|
-
i18n?: ResolvedDocsI18n | null;
|
|
629
|
-
mcp?: DocsMcpResolvedConfig;
|
|
630
|
-
feedback?: DocsAgentFeedbackDiscoveryConfig;
|
|
631
|
-
openapi?: boolean | DocsOpenApiDiscoveryConfig;
|
|
632
|
-
}
|
|
633
|
-
interface DocsLlmsTxtResolvedMaxChars {
|
|
634
|
-
mode: LlmsTxtMaxCharsMode;
|
|
635
|
-
chars: number;
|
|
636
|
-
}
|
|
637
|
-
interface DocsLlmsTxtResolvedSection {
|
|
638
|
-
title: string;
|
|
639
|
-
description?: string;
|
|
640
|
-
match: string[];
|
|
641
|
-
route: string;
|
|
642
|
-
fullRoute: string;
|
|
643
|
-
maxChars: DocsLlmsTxtResolvedMaxChars;
|
|
644
|
-
}
|
|
645
|
-
interface DocsLlmsTxtRequest {
|
|
646
|
-
format: "llms" | "llms-full";
|
|
647
|
-
section?: DocsLlmsTxtResolvedSection;
|
|
648
|
-
}
|
|
649
|
-
interface DocsLlmsTxtPageInput {
|
|
650
|
-
url: string;
|
|
651
|
-
/** Override the Markdown link emitted in llms.txt. */
|
|
652
|
-
markdownUrl?: string;
|
|
653
|
-
title: string;
|
|
654
|
-
description?: string;
|
|
655
|
-
content: string;
|
|
656
|
-
rawContent?: string;
|
|
657
|
-
agentContent?: string;
|
|
658
|
-
agentRawContent?: string;
|
|
659
|
-
agentFallbackContent?: string;
|
|
660
|
-
agentFallbackRawContent?: string;
|
|
661
|
-
}
|
|
662
|
-
interface DocsLlmsTxtGeneratedSection extends DocsLlmsTxtResolvedSection {
|
|
663
|
-
llmsTxt: string;
|
|
664
|
-
llmsFullTxt: string;
|
|
665
|
-
}
|
|
666
|
-
interface DocsLlmsTxtGeneratedContent {
|
|
667
|
-
llmsTxt: string;
|
|
668
|
-
llmsFullTxt: string;
|
|
669
|
-
maxChars: DocsLlmsTxtResolvedMaxChars;
|
|
670
|
-
sections: DocsLlmsTxtGeneratedSection[];
|
|
671
|
-
}
|
|
672
|
-
interface DocsLlmsTxtSelectedContent {
|
|
673
|
-
content: string;
|
|
674
|
-
label: string;
|
|
675
|
-
maxChars: DocsLlmsTxtResolvedMaxChars;
|
|
676
|
-
}
|
|
677
|
-
interface DocsLlmsTxtMaxCharsIssue {
|
|
678
|
-
mode: Exclude<LlmsTxtMaxCharsMode, "off">;
|
|
679
|
-
chars: number;
|
|
680
|
-
actual: number;
|
|
681
|
-
label: string;
|
|
682
|
-
message: string;
|
|
683
|
-
}
|
|
684
|
-
interface DocsAgentDiscoverySpecOptions extends DocsDiscoveryApiRouteOptions {
|
|
685
|
-
origin: string;
|
|
686
|
-
entry?: string;
|
|
687
|
-
/** Public rendered docs path when it differs from `entry`. */
|
|
688
|
-
docsPath?: string;
|
|
689
|
-
/** Whether this deployment actually serves the RFC 9727 API catalog. Defaults to true. */
|
|
690
|
-
apiCatalog?: boolean;
|
|
691
|
-
i18n?: ResolvedDocsI18n | null;
|
|
692
|
-
search?: boolean | DocsSearchConfig;
|
|
693
|
-
/** Runtime metadata-only document synchronization feed. Defaults to enabled. */
|
|
694
|
-
contentChanges?: boolean | DocsAgentContentChangesConfig;
|
|
695
|
-
mcp: DocsMcpResolvedConfig;
|
|
696
|
-
feedback?: DocsAgentFeedbackDiscoveryConfig;
|
|
697
|
-
llms?: DocsLlmsDiscoveryConfig;
|
|
698
|
-
sitemap?: boolean | DocsSitemapConfig;
|
|
699
|
-
robots?: boolean | DocsRobotsConfig;
|
|
700
|
-
openapi?: boolean | DocsOpenApiDiscoveryConfig;
|
|
701
|
-
markdown?: {
|
|
702
|
-
acceptHeader?: boolean;
|
|
703
|
-
signatureAgentHeader?: boolean; /** Whether runtime Markdown routes support `?sections` metadata discovery. Defaults to true. */
|
|
704
|
-
sectionDiscovery?: boolean;
|
|
705
|
-
};
|
|
706
|
-
/** Additional validated project skills to cross-list in custom discovery. */
|
|
707
|
-
publishedSkills?: readonly DocsPublishedAgentSkill[];
|
|
708
|
-
/** Explicit metadata for a real A2A service; omitted sites do not publish an Agent Card. */
|
|
709
|
-
agentCard?: DocsA2AAgentCardOptions;
|
|
710
|
-
}
|
|
711
|
-
interface DocsSkillDocumentOptions extends DocsDiscoveryApiRouteOptions {
|
|
712
|
-
origin: string;
|
|
713
|
-
entry?: string;
|
|
714
|
-
/** Public rendered docs path when it differs from `entry`. */
|
|
715
|
-
docsPath?: string;
|
|
716
|
-
/** Whether this deployment actually serves the RFC 9727 API catalog. Defaults to true. */
|
|
717
|
-
apiCatalog?: boolean;
|
|
718
|
-
search?: boolean | DocsSearchConfig;
|
|
719
|
-
/** Runtime metadata-only document synchronization feed. Defaults to enabled. */
|
|
720
|
-
contentChanges?: boolean | DocsAgentContentChangesConfig;
|
|
721
|
-
mcp: DocsMcpResolvedConfig;
|
|
722
|
-
feedback?: DocsAgentFeedbackDiscoveryConfig;
|
|
723
|
-
llms?: DocsLlmsDiscoveryConfig;
|
|
724
|
-
sitemap?: boolean | DocsSitemapConfig;
|
|
725
|
-
robots?: boolean | DocsRobotsConfig;
|
|
726
|
-
openapi?: boolean | DocsOpenApiDiscoveryConfig;
|
|
727
|
-
markdown?: {
|
|
728
|
-
acceptHeader?: boolean;
|
|
729
|
-
signatureAgentHeader?: boolean; /** Whether runtime Markdown routes support `?sections` metadata discovery. Defaults to true. */
|
|
730
|
-
sectionDiscovery?: boolean;
|
|
731
|
-
};
|
|
732
|
-
}
|
|
733
|
-
interface DocsAgentsDocumentOptions extends DocsSkillDocumentOptions {}
|
|
734
|
-
interface DocsStandardsDiscoveryResponseOptions extends DocsAgentDiscoverySpecOptions {
|
|
735
|
-
request: Request;
|
|
736
|
-
preferredSkillDocument?: string | null;
|
|
737
|
-
fallbackSkillDocument: string;
|
|
738
|
-
/** Stable representation generation or source modification time. */
|
|
739
|
-
lastModified?: string | Date | null;
|
|
740
|
-
}
|
|
741
|
-
interface DocsAgentContractMcpTools {
|
|
742
|
-
list?: "list_tasks";
|
|
743
|
-
read?: "read_task";
|
|
744
|
-
}
|
|
745
|
-
interface DocsMarkdownPage {
|
|
746
|
-
slug?: string;
|
|
747
|
-
url: string;
|
|
748
|
-
title: string;
|
|
749
|
-
description?: string;
|
|
750
|
-
/** Override the public Markdown representation URL when it differs from `${url}.md`. */
|
|
751
|
-
markdownUrl?: string;
|
|
752
|
-
lastModified?: string;
|
|
753
|
-
lastmod?: string;
|
|
754
|
-
sourcePath?: string;
|
|
755
|
-
okf?: DocsOkfTrustMetadataInput;
|
|
756
|
-
related?: ResolvedDocsRelatedLink[];
|
|
757
|
-
agent?: PageAgentFrontmatter;
|
|
758
|
-
content: string;
|
|
759
|
-
rawContent?: string;
|
|
760
|
-
agentContent?: string;
|
|
761
|
-
agentRawContent?: string;
|
|
762
|
-
agentFallbackContent?: string;
|
|
763
|
-
agentFallbackRawContent?: string;
|
|
764
|
-
}
|
|
765
|
-
interface DocsMarkdownDocumentOptions {
|
|
766
|
-
llms?: boolean | DocsLlmsDiscoveryConfig | LlmsTxtConfig;
|
|
767
|
-
okf?: boolean | DocsOkfConfig;
|
|
768
|
-
origin?: string;
|
|
769
|
-
sitemap?: boolean | DocsSitemapConfig;
|
|
439
|
+
interface DocsMarkdownDocumentOptions {
|
|
440
|
+
llms?: boolean | DocsLlmsDiscoveryConfig | LlmsTxtConfig;
|
|
441
|
+
okf?: boolean | DocsOkfConfig;
|
|
442
|
+
origin?: string;
|
|
443
|
+
sitemap?: boolean | DocsSitemapConfig;
|
|
770
444
|
}
|
|
771
445
|
interface DocsMarkdownSection {
|
|
772
446
|
id: string;
|
|
@@ -863,6 +537,10 @@ interface DocsMarkdownResponseOptions extends DocsMarkdownNotFoundOptions {
|
|
|
863
537
|
/** Exact source modification timestamp. Date-only values are intentionally ignored. */
|
|
864
538
|
lastModified?: string | Date | null;
|
|
865
539
|
cacheControl?: string;
|
|
540
|
+
/** Page policy evaluated before any body or recovery metadata is returned. */
|
|
541
|
+
access?: DocsPageAccessPolicy;
|
|
542
|
+
/** Authenticated identity; omitted public requests fail closed for protected pages. */
|
|
543
|
+
principal?: DocsAccessPrincipal;
|
|
866
544
|
}
|
|
867
545
|
declare function normalizeDocsPathSegment(value: string): string;
|
|
868
546
|
declare function normalizeDocsUrlPath(value: string): string;
|
|
@@ -999,6 +677,12 @@ declare function buildDocsAgentDiscoverySpec({
|
|
|
999
677
|
format: string;
|
|
1000
678
|
version: string;
|
|
1001
679
|
name: string;
|
|
680
|
+
profile: string;
|
|
681
|
+
profiles: {
|
|
682
|
+
default: string;
|
|
683
|
+
full: string;
|
|
684
|
+
compact: string;
|
|
685
|
+
};
|
|
1002
686
|
baseUrl: string;
|
|
1003
687
|
site: {
|
|
1004
688
|
title: string;
|
|
@@ -1086,6 +770,7 @@ declare function buildDocsAgentDiscoverySpec({
|
|
|
1086
770
|
usefulContractFields: string[];
|
|
1087
771
|
fields: {
|
|
1088
772
|
readonly tokenBudget: "number";
|
|
773
|
+
readonly access: "{visibility?,scopes?,claims?}";
|
|
1089
774
|
readonly task: "string";
|
|
1090
775
|
readonly outcome: "string";
|
|
1091
776
|
readonly appliesTo: {
|
|
@@ -1321,7 +1006,348 @@ declare function buildDocsAgentDiscoverySpec({
|
|
|
1321
1006
|
doNotAssumeFeedbackPayloadShape: boolean;
|
|
1322
1007
|
};
|
|
1323
1008
|
};
|
|
1009
|
+
/** Remove first-hop file inventories while retaining every discovery route and capability. */
|
|
1010
|
+
declare function compactDocsAgentDiscoverySpec<T extends {
|
|
1011
|
+
skills: {
|
|
1012
|
+
published: Array<Record<string, unknown> & {
|
|
1013
|
+
files: readonly unknown[];
|
|
1014
|
+
}>;
|
|
1015
|
+
};
|
|
1016
|
+
}>(spec: T): T;
|
|
1324
1017
|
declare function acceptsDocsMarkdown(request: Request): boolean;
|
|
1325
1018
|
declare function resolveDocsOpenApiDiscoveryConfig(openapi?: boolean | DocsOpenApiDiscoveryConfig): DocsOpenApiResolvedDiscoveryConfig;
|
|
1326
1019
|
//#endregion
|
|
1327
|
-
|
|
1020
|
+
//#region src/search.d.ts
|
|
1021
|
+
interface DocsAskAIContextResult extends DocsSearchResult {
|
|
1022
|
+
title: string;
|
|
1023
|
+
contextContent: string;
|
|
1024
|
+
}
|
|
1025
|
+
interface DocsAskAIContext {
|
|
1026
|
+
context: string;
|
|
1027
|
+
/** Structured production context blocks; avoids reparsing markdown horizontal rules. */
|
|
1028
|
+
blocks: Array<{
|
|
1029
|
+
text: string;
|
|
1030
|
+
result: DocsAskAIContextResult;
|
|
1031
|
+
}>;
|
|
1032
|
+
results: DocsAskAIContextResult[];
|
|
1033
|
+
searchResults: DocsSearchResult[];
|
|
1034
|
+
packageHints: DocsAskAIPackageHints;
|
|
1035
|
+
}
|
|
1036
|
+
interface DocsAskAIPackageHints {
|
|
1037
|
+
packages: string[];
|
|
1038
|
+
imports: string[];
|
|
1039
|
+
installCommands: string[];
|
|
1040
|
+
}
|
|
1041
|
+
/** Normalize scalar or array-valued scope filters for programmatic, HTTP, and MCP callers. */
|
|
1042
|
+
declare function normalizeDocsSearchFilters(input?: DocsSearchFilterInput | DocsSearchFilters): DocsSearchFilters;
|
|
1043
|
+
/** Parse the public search scope parameters from a URL query string. */
|
|
1044
|
+
declare function resolveDocsSearchFilters(searchParams: URLSearchParams): DocsSearchFilters;
|
|
1045
|
+
declare class DocsSearchRequestError extends Error {
|
|
1046
|
+
readonly code = "invalid_search_request";
|
|
1047
|
+
constructor(message: string);
|
|
1048
|
+
}
|
|
1049
|
+
declare function resolveDocsSearchError(error: unknown): {
|
|
1050
|
+
code: "invalid_cursor" | "invalid_search_request";
|
|
1051
|
+
message: string;
|
|
1052
|
+
} | undefined;
|
|
1053
|
+
/** Resolve search filters and the backwards-compatible structured response opt-in. */
|
|
1054
|
+
declare function resolveDocsSearchRequest(searchParams: URLSearchParams): DocsSearchRequest;
|
|
1055
|
+
declare function inferDocsAskAIPackageHints(content: string): DocsAskAIPackageHints;
|
|
1056
|
+
declare function formatDocsAskAIPackageHints(hints: DocsAskAIPackageHints, packageName?: string): string | undefined;
|
|
1057
|
+
/**
|
|
1058
|
+
* Build the exact normalized-input projection represented by a retrieval source digest.
|
|
1059
|
+
* This is public so consumers can independently reproduce `source.digest`.
|
|
1060
|
+
*/
|
|
1061
|
+
declare function buildDocsRetrievalDigestProjection(page: DocsSearchSourcePage, audience?: DocsContentAudience): string;
|
|
1062
|
+
declare function resolveDocsRetrievalLastModified(page: DocsSearchSourcePage, audience: DocsContentAudience): string | undefined;
|
|
1063
|
+
interface BuildDocsContentSnapshotOptions {
|
|
1064
|
+
pages: readonly DocsSearchSourcePage[];
|
|
1065
|
+
search?: boolean | DocsSearchConfig;
|
|
1066
|
+
audience?: DocsContentAudience;
|
|
1067
|
+
locale?: string;
|
|
1068
|
+
baseUrl?: string;
|
|
1069
|
+
/** @internal Precomputed complete-corpus generation for composed callers. */
|
|
1070
|
+
indexGeneration?: string;
|
|
1071
|
+
/** Authenticated identity used to scope protected pages. */
|
|
1072
|
+
principal?: DocsAccessPrincipal;
|
|
1073
|
+
}
|
|
1074
|
+
/**
|
|
1075
|
+
* Build a deterministic, body-free inventory for content-change synchronization.
|
|
1076
|
+
*
|
|
1077
|
+
* Its generation is identical to structured search for the same pages, audience,
|
|
1078
|
+
* locale, base URL, and chunking policy.
|
|
1079
|
+
*/
|
|
1080
|
+
declare function buildDocsContentSnapshot(options: BuildDocsContentSnapshotOptions): Promise<DocsContentSnapshot>;
|
|
1081
|
+
interface EnrichDocsSearchDocumentsWithProvenanceOptions {
|
|
1082
|
+
documents: readonly DocsSearchDocument[];
|
|
1083
|
+
pages: readonly DocsSearchSourcePage[];
|
|
1084
|
+
audience?: DocsContentAudience;
|
|
1085
|
+
chunking?: DocsSearchChunkingConfig;
|
|
1086
|
+
locale?: string;
|
|
1087
|
+
baseUrl?: string;
|
|
1088
|
+
indexGeneration?: string;
|
|
1089
|
+
}
|
|
1090
|
+
/**
|
|
1091
|
+
* Attach the same canonical provenance used by built-in search providers.
|
|
1092
|
+
* Custom adapters can call this before persisting their own hosted records.
|
|
1093
|
+
*/
|
|
1094
|
+
declare function enrichDocsSearchDocumentsWithProvenance(options: EnrichDocsSearchDocumentsWithProvenanceOptions): Promise<DocsSearchDocument[]>;
|
|
1095
|
+
declare function buildDocsSearchDocuments(pages: DocsSearchSourcePage[], chunking?: DocsSearchChunkingConfig, audience?: DocsContentAudience): DocsSearchDocument[];
|
|
1096
|
+
declare function createSimpleSearchAdapter(): DocsSearchAdapter;
|
|
1097
|
+
declare function createTypesenseSearchAdapter(config: TypesenseDocsSearchConfig): DocsSearchAdapter;
|
|
1098
|
+
declare function resolveSearchRequestConfig(search: boolean | DocsSearchConfig | undefined, requestUrl?: string, options?: DocsSearchRequestResolutionOptions): boolean | DocsSearchConfig | undefined;
|
|
1099
|
+
interface DocsLocalMcpSearchRuntimeConfig {
|
|
1100
|
+
enabled?: boolean;
|
|
1101
|
+
route?: string;
|
|
1102
|
+
tools?: {
|
|
1103
|
+
searchDocs?: boolean;
|
|
1104
|
+
};
|
|
1105
|
+
}
|
|
1106
|
+
type DocsLocalMcpSearchRuntimeInput = boolean | DocsLocalMcpSearchRuntimeConfig | null | undefined;
|
|
1107
|
+
interface DocsSearchRequestResolutionOptions {
|
|
1108
|
+
/**
|
|
1109
|
+
* The built-in MCP server colocated with this search handler. When the configured
|
|
1110
|
+
* provider points at one of its local aliases, search runs directly instead of
|
|
1111
|
+
* performing a loopback MCP handshake.
|
|
1112
|
+
*/
|
|
1113
|
+
localMcp?: DocsLocalMcpSearchRuntimeInput;
|
|
1114
|
+
}
|
|
1115
|
+
declare function resolveLocalDocsMcpSearchConfig(search: boolean | DocsSearchConfig | undefined, localMcp: DocsLocalMcpSearchRuntimeInput, requestUrl?: string): boolean | DocsSearchConfig | undefined;
|
|
1116
|
+
/**
|
|
1117
|
+
* Resolve the public search audience without allowing malformed values to opt into agent content.
|
|
1118
|
+
* Human search remains the default for omitted, legacy, and unknown query values.
|
|
1119
|
+
*/
|
|
1120
|
+
declare function resolveDocsSearchAudience(value: string | null | undefined): DocsContentAudience;
|
|
1121
|
+
declare function resolveAskAISearchRequestConfig(options: {
|
|
1122
|
+
search: boolean | DocsSearchConfig | undefined;
|
|
1123
|
+
useMcp?: boolean | DocsAskAIMcpConfig;
|
|
1124
|
+
mcpEndpoint?: string;
|
|
1125
|
+
mcpEnabled?: boolean;
|
|
1126
|
+
mcpSearchEnabled?: boolean;
|
|
1127
|
+
requestUrl?: string;
|
|
1128
|
+
}): boolean | DocsSearchConfig | undefined;
|
|
1129
|
+
declare function createMcpSearchAdapter(config: McpDocsSearchConfig): DocsSearchAdapter;
|
|
1130
|
+
declare function createAlgoliaSearchAdapter(config: AlgoliaDocsSearchConfig): DocsSearchAdapter;
|
|
1131
|
+
interface PerformDocsSearchOptions {
|
|
1132
|
+
pages: DocsSearchSourcePage[];
|
|
1133
|
+
/** Authenticated identity used to scope protected pages before local or hosted indexing. */
|
|
1134
|
+
principal?: DocsAccessPrincipal;
|
|
1135
|
+
/** @internal Complete corpus used for generation when `pages` is pre-scoped by a caller. */
|
|
1136
|
+
generationPages?: DocsSearchSourcePage[];
|
|
1137
|
+
/** @internal Precomputed complete-corpus generation for structured callers. */
|
|
1138
|
+
indexGeneration?: string;
|
|
1139
|
+
query: string;
|
|
1140
|
+
search?: boolean | DocsSearchConfig;
|
|
1141
|
+
/** Selects which audience projection is searchable. Public site search defaults to human. */
|
|
1142
|
+
audience?: DocsContentAudience;
|
|
1143
|
+
locale?: string;
|
|
1144
|
+
pathname?: string;
|
|
1145
|
+
siteTitle?: string;
|
|
1146
|
+
/** Canonical docs URL used to distinguish same-site absolute hits from foreign MCP results. */
|
|
1147
|
+
baseUrl?: string;
|
|
1148
|
+
/**
|
|
1149
|
+
* Canonical origin safe to persist in a hosted index. Pass `null` when `baseUrl`
|
|
1150
|
+
* came from the current request rather than trusted configuration.
|
|
1151
|
+
* @internal
|
|
1152
|
+
*/
|
|
1153
|
+
syncBaseUrl?: string | null;
|
|
1154
|
+
limit?: number;
|
|
1155
|
+
/** Opaque continuation cursor used by structured search responses. */
|
|
1156
|
+
cursor?: string;
|
|
1157
|
+
/** Optional framework, version, package, and tag constraints. */
|
|
1158
|
+
filters?: DocsSearchFilterInput;
|
|
1159
|
+
/** Include bounded explanations for the final ranked results. Defaults to false. */
|
|
1160
|
+
explain?: boolean;
|
|
1161
|
+
/**
|
|
1162
|
+
* Controls provider failures. Runtime search keeps the resilient `fallback` default;
|
|
1163
|
+
* diagnostics can request `throw` so a broken configured provider cannot be scored as
|
|
1164
|
+
* successful simple search.
|
|
1165
|
+
*/
|
|
1166
|
+
failureMode?: "fallback" | "throw";
|
|
1167
|
+
/**
|
|
1168
|
+
* Whether non-simple provider hits are supplemented with exact/local simple results.
|
|
1169
|
+
* Runtime search defaults to true; provider diagnostics can disable supplementation.
|
|
1170
|
+
*/
|
|
1171
|
+
supplementExternalResults?: boolean;
|
|
1172
|
+
/** Keep absolute provider origins distinct when no canonical docs origin is available. */
|
|
1173
|
+
strictExternalOrigins?: boolean;
|
|
1174
|
+
/** Optional cancellation signal forwarded to adapters and their managed requests. */
|
|
1175
|
+
signal?: AbortSignal;
|
|
1176
|
+
}
|
|
1177
|
+
declare function performDocsSearch(options: PerformDocsSearchOptions): Promise<DocsSearchResult[]>;
|
|
1178
|
+
interface BuildDocsSearchFacetsOptions {
|
|
1179
|
+
pages: DocsSearchSourcePage[];
|
|
1180
|
+
search?: boolean | DocsSearchConfig;
|
|
1181
|
+
audience?: DocsContentAudience;
|
|
1182
|
+
locale?: string;
|
|
1183
|
+
baseUrl?: string;
|
|
1184
|
+
filters?: DocsSearchFilterInput;
|
|
1185
|
+
/** Facet field selected for cursor continuation. */
|
|
1186
|
+
facet?: DocsSearchFilterField;
|
|
1187
|
+
/** Opaque `nextCursor` returned for the selected facet. */
|
|
1188
|
+
cursor?: string;
|
|
1189
|
+
/** Maximum facet values returned per page. Defaults to 100. */
|
|
1190
|
+
limit?: number;
|
|
1191
|
+
/** @internal Precomputed complete-corpus generation for composed callers. */
|
|
1192
|
+
indexGeneration?: string;
|
|
1193
|
+
/** Authenticated identity used to scope protected pages. */
|
|
1194
|
+
principal?: DocsAccessPrincipal;
|
|
1195
|
+
}
|
|
1196
|
+
/**
|
|
1197
|
+
* Build a body-free index of valid search filter values and page counts.
|
|
1198
|
+
*
|
|
1199
|
+
* Each facet applies filters from the other fields while ignoring its own selected
|
|
1200
|
+
* values. This is the conventional faceted-search behavior and lets an agent discover
|
|
1201
|
+
* safe alternatives without guessing or fetching document bodies.
|
|
1202
|
+
*/
|
|
1203
|
+
declare function buildDocsSearchFacets(options: BuildDocsSearchFacetsOptions): Promise<DocsSearchFacetsResponse>;
|
|
1204
|
+
declare function performDocsSearchWithMetadata(options: PerformDocsSearchOptions): Promise<DocsPaginatedSearchResponse>;
|
|
1205
|
+
declare function buildDocsAskAIContext(options: {
|
|
1206
|
+
pages: DocsSearchSourcePage[];
|
|
1207
|
+
query: string;
|
|
1208
|
+
search?: boolean | DocsSearchConfig;
|
|
1209
|
+
locale?: string;
|
|
1210
|
+
pathname?: string;
|
|
1211
|
+
siteTitle?: string;
|
|
1212
|
+
baseUrl?: string; /** See `performDocsSearch.syncBaseUrl`. */
|
|
1213
|
+
syncBaseUrl?: string | null;
|
|
1214
|
+
limit?: number;
|
|
1215
|
+
filters?: DocsSearchFilterInput;
|
|
1216
|
+
maxContextChars?: number;
|
|
1217
|
+
maxResultChars?: number; /** See `performDocsSearch.failureMode`. Defaults to resilient runtime fallback. */
|
|
1218
|
+
searchFailureMode?: "fallback" | "throw"; /** See `performDocsSearch.strictExternalOrigins`. */
|
|
1219
|
+
strictExternalOrigins?: boolean; /** Optional cancellation signal forwarded to the configured search provider. */
|
|
1220
|
+
signal?: AbortSignal;
|
|
1221
|
+
}): Promise<DocsAskAIContext>;
|
|
1222
|
+
declare function createCustomSearchAdapter(adapter: DocsSearchAdapter | DocsSearchAdapterFactory, options?: {
|
|
1223
|
+
paginationRevision?: string;
|
|
1224
|
+
}): CustomDocsSearchConfig;
|
|
1225
|
+
//#endregion
|
|
1226
|
+
//#region src/content-changes.d.ts
|
|
1227
|
+
declare const DOCS_CONTENT_CHANGES_FORMAT = "docs-content-changes.v1";
|
|
1228
|
+
declare const DOCS_CONTENT_SNAPSHOT_FORMAT = "docs-content-snapshot.v1";
|
|
1229
|
+
declare const DOCS_CONTENT_CHANGES_RESPONSE_VALUE = "changes";
|
|
1230
|
+
/** Whether a value is a valid content-index generation identifier. */
|
|
1231
|
+
declare function isDocsContentChangeGeneration(value: string): boolean;
|
|
1232
|
+
interface DocsContentChangesRequest {
|
|
1233
|
+
audience: "human" | "agent";
|
|
1234
|
+
since?: string;
|
|
1235
|
+
}
|
|
1236
|
+
interface DocsResolvedContentChangesConfig {
|
|
1237
|
+
enabled: boolean;
|
|
1238
|
+
maxSnapshots: number;
|
|
1239
|
+
loadSnapshot?: DocsAgentContentChangesConfig["loadSnapshot"];
|
|
1240
|
+
saveSnapshot?: DocsAgentContentChangesConfig["saveSnapshot"];
|
|
1241
|
+
}
|
|
1242
|
+
interface ResolveDocsContentChangesOptions extends Omit<BuildDocsContentSnapshotOptions, "pages"> {
|
|
1243
|
+
pages: readonly DocsSearchSourcePage[];
|
|
1244
|
+
since?: string;
|
|
1245
|
+
request?: Request;
|
|
1246
|
+
}
|
|
1247
|
+
interface DocsContentChangeFeed {
|
|
1248
|
+
resolve(options: ResolveDocsContentChangesOptions): Promise<DocsContentChangesResponse>;
|
|
1249
|
+
}
|
|
1250
|
+
declare class DocsContentChangesRequestError extends Error {
|
|
1251
|
+
readonly code = "invalid_content_changes_request";
|
|
1252
|
+
constructor(message: string);
|
|
1253
|
+
}
|
|
1254
|
+
declare function resolveDocsContentChangesConfig(input?: boolean | DocsAgentContentChangesConfig, options?: {
|
|
1255
|
+
staticExport?: boolean;
|
|
1256
|
+
}): DocsResolvedContentChangesConfig;
|
|
1257
|
+
declare function isDocsContentChangesRequest(url: URL): boolean;
|
|
1258
|
+
declare function resolveDocsContentChangesRequest(url: URL): DocsContentChangesRequest;
|
|
1259
|
+
declare function createDocsContentChangeFeed(input?: boolean | DocsAgentContentChangesConfig): DocsContentChangeFeed;
|
|
1260
|
+
declare function createDocsContentChangesHttpResponse(options: {
|
|
1261
|
+
request: Request;
|
|
1262
|
+
feed: DocsContentChangeFeed;
|
|
1263
|
+
pages: readonly DocsSearchSourcePage[];
|
|
1264
|
+
search?: boolean | DocsSearchConfig;
|
|
1265
|
+
locale?: string;
|
|
1266
|
+
baseUrl?: string;
|
|
1267
|
+
}): Promise<Response>;
|
|
1268
|
+
//#endregion
|
|
1269
|
+
//#region src/content-change-hydration.d.ts
|
|
1270
|
+
declare const DOCS_CONTENT_CHANGE_HYDRATION_FORMAT = "docs-content-change-hydration.v1";
|
|
1271
|
+
declare const DEFAULT_DOCS_CONTENT_CHANGE_HYDRATION_TOKEN_BUDGET = 5000;
|
|
1272
|
+
declare const MIN_DOCS_CONTENT_CHANGE_HYDRATION_TOKEN_BUDGET = 4;
|
|
1273
|
+
declare const MAX_DOCS_CONTENT_CHANGE_HYDRATION_TOKEN_BUDGET = 32000;
|
|
1274
|
+
interface DocsContentChangeHydrationSection {
|
|
1275
|
+
id: string;
|
|
1276
|
+
heading: string;
|
|
1277
|
+
level: number;
|
|
1278
|
+
}
|
|
1279
|
+
interface DocsContentChangeHydrationContent {
|
|
1280
|
+
type: "content";
|
|
1281
|
+
change: "added" | "changed";
|
|
1282
|
+
url: string;
|
|
1283
|
+
canonicalUrl: string;
|
|
1284
|
+
/** Digest from the body-free document change feed. */
|
|
1285
|
+
digest: string;
|
|
1286
|
+
previousDigest?: string;
|
|
1287
|
+
lastModified?: string;
|
|
1288
|
+
previousLastModified?: string;
|
|
1289
|
+
section: DocsContentChangeHydrationSection;
|
|
1290
|
+
/** Digest of the complete, non-overlapping section before chunking. */
|
|
1291
|
+
sectionDigest: string;
|
|
1292
|
+
/** Digest of the content bytes returned in this chunk. */
|
|
1293
|
+
chunkDigest: string;
|
|
1294
|
+
chunk: {
|
|
1295
|
+
index: number;
|
|
1296
|
+
count: number;
|
|
1297
|
+
};
|
|
1298
|
+
content: string;
|
|
1299
|
+
utf8Bytes: number;
|
|
1300
|
+
}
|
|
1301
|
+
interface DocsContentChangeHydrationTombstone {
|
|
1302
|
+
type: "tombstone";
|
|
1303
|
+
change: "deleted";
|
|
1304
|
+
url: string;
|
|
1305
|
+
canonicalUrl: string;
|
|
1306
|
+
/** Last known digest for the deleted document. */
|
|
1307
|
+
digest: string;
|
|
1308
|
+
lastModified?: string;
|
|
1309
|
+
}
|
|
1310
|
+
interface DocsContentChangeHydrationBudget {
|
|
1311
|
+
requestedTokens: number;
|
|
1312
|
+
strategy: "utf8-bytes";
|
|
1313
|
+
maxUtf8Bytes: number;
|
|
1314
|
+
usedUtf8Bytes: number;
|
|
1315
|
+
conservativeTokenUpperBound: number;
|
|
1316
|
+
remainingUtf8Bytes: number;
|
|
1317
|
+
}
|
|
1318
|
+
interface DocsContentChangeHydrationResponse {
|
|
1319
|
+
format: typeof DOCS_CONTENT_CHANGE_HYDRATION_FORMAT;
|
|
1320
|
+
audience: "agent";
|
|
1321
|
+
locale?: string;
|
|
1322
|
+
since: string;
|
|
1323
|
+
indexGeneration: string;
|
|
1324
|
+
mode: DocsContentChangesResponse["mode"];
|
|
1325
|
+
resetRequired: boolean;
|
|
1326
|
+
documentCount: number;
|
|
1327
|
+
counts: DocsContentChangesResponse["counts"];
|
|
1328
|
+
budget: DocsContentChangeHydrationBudget;
|
|
1329
|
+
resultCount: number;
|
|
1330
|
+
total: number;
|
|
1331
|
+
hasMore: boolean;
|
|
1332
|
+
nextCursor?: string;
|
|
1333
|
+
content: DocsContentChangeHydrationContent[];
|
|
1334
|
+
tombstones: DocsContentChangeHydrationTombstone[];
|
|
1335
|
+
}
|
|
1336
|
+
interface HydrateDocsContentChangesOptions {
|
|
1337
|
+
changes: DocsContentChangesResponse;
|
|
1338
|
+
pages: readonly DocsSearchSourcePage[];
|
|
1339
|
+
since: string;
|
|
1340
|
+
tokenBudget?: number;
|
|
1341
|
+
cursor?: string;
|
|
1342
|
+
/** Stable MCP server identity mixed into opaque continuation cursors. */
|
|
1343
|
+
cursorScope: string;
|
|
1344
|
+
}
|
|
1345
|
+
/**
|
|
1346
|
+
* Hydrate only the current bodies named by a content-change delta.
|
|
1347
|
+
*
|
|
1348
|
+
* The conservative budget treats one UTF-8 byte as at most one token. Cursors are
|
|
1349
|
+
* bound to the requested generation, current generation, locale, and budget.
|
|
1350
|
+
*/
|
|
1351
|
+
declare function hydrateDocsContentChanges(options: HydrateDocsContentChangesOptions): DocsContentChangeHydrationResponse;
|
|
1352
|
+
//#endregion
|
|
1353
|
+
export { resolveDocsSearchError as $, resolveDocsAgentFeedbackConfig as $n, DocsLlmsTxtResolvedSection as $t, DocsSearchRequestError as A, findDocsMarkdownPage as An, hasDocsMcpProtectedResourceConfig as Ar, DOCS_TRADITIONAL_BOT_USER_AGENT_HEADER_PATTERN as At, createCustomSearchAdapter as B, isDocsMarkdownSectionIndexRequest as Bn, DocsDiagnostics as Bt, isDocsContentChangesRequest as C, buildDocsMarkdownSectionIndex as Cn, DEFAULT_MCP_PROTECTED_RESOURCE_METADATA_ROUTE as Cr, DEFAULT_OPENAPI_SCHEMA_ROUTE as Ct, BuildDocsSearchFacetsOptions as D, createDocsMarkdownResponse as Dn, buildDocsMcpProtectedResourceMetadataRoute as Dr, DOCS_BOT_LIKE_USER_AGENT_HEADER_PATTERN as Dt, BuildDocsContentSnapshotOptions as E, compactDocsAgentDiscoverySpec as En, DEFAULT_MCP_WELL_KNOWN_ROUTE as Er, DOCS_AI_AGENT_USER_AGENT_HEADER_PATTERN as Et, buildDocsContentSnapshot as F, isDocsAgentDiscoveryRequest as Fn, resolveDocsLocale as Fr, DocsAgentFeedbackResolvedConfig as Ft, formatDocsAskAIPackageHints as G, normalizeDocsUrlPath as Gn, DocsDiagnosticsStatus as Gt, createSimpleSearchAdapter as H, isDocsSkillRequest as Hn, DocsDiagnosticsIssue as Ht, buildDocsRetrievalDigestProjection as I, isDocsAgentsRequest as In, resolveDocsPath as Ir, DocsAgentsDocumentOptions as It, performDocsSearch as J, renderDocsLlmsTxt as Jn, DocsLlmsTxtGeneratedSection as Jt, inferDocsAskAIPackageHints as K, parseDocsAgentFeedbackData as Kn, DocsLlmsDiscoveryConfig as Kt, buildDocsSearchDocuments as L, isDocsConfigRequest as Ln, DocsConfigMap as Lt, EnrichDocsSearchDocumentsWithProvenanceOptions as M, getDocsMarkdownCanonicalLinkHeader as Mn, DocsPathMatch as Mr, DocsAgentDiscoverySpecOptions as Mt, PerformDocsSearchOptions as N, getDocsMarkdownVaryHeader as Nn, ResolvedDocsI18n as Nr, DocsAgentFeedbackDiscoveryConfig as Nt, DocsLocalMcpSearchRuntimeConfig as O, createDocsStandardsDiscoveryResponse as On, getDocsMcpProtectedResourceMetadataRoutes as Or, DOCS_MARKDOWN_SECTION_INDEX_FORMAT as Ot, buildDocsAskAIContext as P, hasDocsMarkdownSignatureAgent as Pn, resolveDocsI18n as Pr, DocsAgentFeedbackRequest as Pt, resolveDocsSearchAudience as Q, resolveDocsAgentContractMcpTools as Qn, DocsLlmsTxtResolvedMaxChars as Qt, buildDocsSearchFacets as R, isDocsDiagnosticsRequest as Rn, DocsConfigMapJsonValue as Rt, isDocsContentChangeGeneration as S, buildDocsDiagnostics as Sn, resolveDocsAudienceMdxContent as Sr, DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE as St, resolveDocsContentChangesRequest as T, collectDocsMarkdownSections as Tn, DEFAULT_MCP_ROUTE as Tr, DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE as Tt, createTypesenseSearchAdapter as U, matchesDocsLlmsTxtSection as Un, DocsDiagnosticsIssueSeverity as Ut, createMcpSearchAdapter as V, isDocsPublicGetRequest as Vn, DocsDiagnosticsFeature as Vt, enrichDocsSearchDocumentsWithProvenance as W, normalizeDocsPathSegment as Wn, DocsDiagnosticsOptions as Wt, resolveAskAISearchRequestConfig as X, renderDocsMarkdownNotFound as Xn, DocsLlmsTxtPageInput as Xt, performDocsSearchWithMetadata as Y, renderDocsMarkdownDocument as Yn, DocsLlmsTxtMaxCharsIssue as Yt, resolveDocsRetrievalLastModified as Z, renderDocsSkillDocument as Zn, DocsLlmsTxtRequest as Zt, DocsContentChangesRequestError as _, DocsStandardsDiscoveryResponseOptions as _n, DocsMarkdownPromptBlock as _r, DEFAULT_DOCS_DIAGNOSTICS_ROUTE as _t, DocsContentChangeHydrationResponse as a, DocsMarkdownResponseOptions as an, resolveDocsMarkdownCanonicalUrl as ar, DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE as at, createDocsContentChangeFeed as b, buildDocsAgentFeedbackSchema as bn, findDocsAudienceMdxIssues as br, DEFAULT_LLMS_TXT_MAX_CHARS as bt, HydrateDocsContentChangesOptions as c, DocsMarkdownSectionIndexOptions as cn, resolveDocsMarkdownSectionRequest as cr, DEFAULT_AGENT_MD_ROUTE as ct, hydrateDocsContentChanges as d, DocsMarkdownSectionResult as dn, resolveDocsSkillFormat as dr, DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE as dt, DocsLlmsTxtSelectedContent as en, resolveDocsAgentFeedbackRequest as er, resolveDocsSearchFilters as et, DOCS_CONTENT_CHANGES_FORMAT as f, DocsMcpEndpointCandidate as fn, selectDocsLlmsTxtContent as fr, DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE as ft, DocsContentChangesRequest as g, DocsSkillDocumentOptions as gn, DocsAudienceMdxIssue as gr, DEFAULT_DOCS_DIAGNOSTICS_FORMAT as gt, DocsContentChangeFeed as h, DocsOpenApiResolvedDiscoveryConfig as hn, validateDocsAgentFeedbackPayload as hr, DEFAULT_DOCS_CONFIG_ROUTE as ht, DocsContentChangeHydrationContent as i, DocsMarkdownRecoveryResult as in, resolveDocsLlmsTxtSections as ir, DEFAULT_AGENTS_MD_ROUTE as it, DocsSearchRequestResolutionOptions as j, getDocsLlmsTxtMaxCharsIssue as jn, isDocsMcpRequest as jr, DocsAgentContractMcpTools as jt, DocsLocalMcpSearchRuntimeInput as k, detectDocsMarkdownAgentRequest as kn, getDocsMcpResourcePaths as kr, DOCS_MARKDOWN_SIGNATURE_AGENT_HEADER as kt, MAX_DOCS_CONTENT_CHANGE_HYDRATION_TOKEN_BUDGET as l, DocsMarkdownSectionMetadata as ln, resolveDocsOpenApiDiscoveryConfig as lr, DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE as lt, DOCS_CONTENT_SNAPSHOT_FORMAT as m, DocsOpenApiDiscoveryConfig as mn, toDocsMarkdownUrl as mr, DEFAULT_DOCS_CONFIG_FORMAT as mt, DOCS_CONTENT_CHANGE_HYDRATION_FORMAT as n, DocsMarkdownPage as nn, resolveDocsLlmsTxtFormat as nr, resolveLocalDocsMcpSearchConfig as nt, DocsContentChangeHydrationSection as o, DocsMarkdownSection as on, resolveDocsMarkdownRecovery as or, DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA as ot, DOCS_CONTENT_CHANGES_RESPONSE_VALUE as p, DocsMcpEndpointCandidateOptions as pn, selectDocsMarkdownSection as pr, DEFAULT_DOCS_API_ROUTE as pt, normalizeDocsSearchFilters as q, renderDocsAgentsDocument as qn, DocsLlmsTxtGeneratedContent as qt, DocsContentChangeHydrationBudget as r, DocsMarkdownRecoveryMatch as rn, resolveDocsLlmsTxtRequest as rr, resolveSearchRequestConfig as rt, DocsContentChangeHydrationTombstone as s, DocsMarkdownSectionIndex as sn, resolveDocsMarkdownRequest as sr, DEFAULT_AGENT_FEEDBACK_ROUTE as st, DEFAULT_DOCS_CONTENT_CHANGE_HYDRATION_TOKEN_BUDGET as t, DocsMarkdownAgentDetection as tn, resolveDocsAgentsFormat as tr, resolveDocsSearchRequest as tt, MIN_DOCS_CONTENT_CHANGE_HYDRATION_TOKEN_BUDGET as u, DocsMarkdownSectionRequest as un, resolveDocsRequestApiRoute as ur, DEFAULT_AGENT_SPEC_ROUTE as ut, DocsResolvedContentChangesConfig as v, acceptsDocsMarkdown as vn, ExtractedDocsMarkdownPromptBlocks as vr, DEFAULT_LLMS_FULL_TXT_ROUTE as vt, resolveDocsContentChangesConfig as w, buildDocsMcpEndpointCandidates as wn, DEFAULT_MCP_PUBLIC_ROUTE as wr, DEFAULT_SKILL_MD_ROUTE as wt, createDocsContentChangesHttpResponse as x, buildDocsConfigMap as xn, resolveDocsAgentMdxContent as xr, DEFAULT_LLMS_TXT_ROUTE as xt, ResolveDocsContentChangesOptions as y, buildDocsAgentDiscoverySpec as yn, extractDocsMarkdownPromptBlocks as yr, DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE as yt, createAlgoliaSearchAdapter as z, isDocsLlmsTxtPublicRequest as zn, DocsConfigMapPointer as zt };
|