@farming-labs/docs 0.1.99 → 0.1.100
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-Bjl8t7hu.mjs → agent-2qREGB9R.mjs} +2 -2
- package/dist/cli/index.mjs +9 -9
- package/dist/{doctor-Ze0Zt047.mjs → doctor-Dhs6DEbs.mjs} +3 -3
- package/dist/index.d.mts +34 -1
- package/dist/index.mjs +2 -2
- package/dist/{mcp-B81O1ge_.mjs → mcp-D0LCSSaq.mjs} +1 -1
- package/dist/{robots-CeYdBgoI.mjs → robots-C3KeCl0S.mjs} +51 -4
- package/dist/{robots-q51zxmDq.mjs → robots-b9bMJ-w5.mjs} +1 -1
- package/dist/{search-DQoE9Ptd.mjs → search-jAlynFl1.mjs} +1 -1
- package/dist/server.d.mts +13 -1
- package/dist/server.mjs +2 -2
- package/dist/{sitemap-BnvSrGc8.mjs → sitemap-BYVaRIsO.mjs} +1 -1
- package/dist/{sitemap-server-CJEm6hr5.mjs → sitemap-server-C4TbbCmY.mjs} +16 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./reading-time-CbbHNg9V.mjs";
|
|
2
2
|
import { _ as parseGeneratedAgentDocument, h as hashGeneratedAgentContent, m as GENERATED_AGENT_PROVENANCE_VERSION, v as serializeGeneratedAgentDocument } from "./search-BL7o2rXk.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { J as renderDocsMarkdownDocument, N as findDocsMarkdownPage } from "./robots-C3KeCl0S.mjs";
|
|
4
4
|
import "./index.mjs";
|
|
5
|
-
import "./sitemap-server-
|
|
5
|
+
import "./sitemap-server-C4TbbCmY.mjs";
|
|
6
6
|
import { createFilesystemDocsMcpSource } from "./mcp.mjs";
|
|
7
7
|
import "./server.mjs";
|
|
8
8
|
import { a as loadProjectEnv, c as readNavTitle, d as readTopLevelStringProperty, f as resolveDocsConfigPath, i as loadDocsConfigModule, l as readNumberProperty, o as readBooleanProperty, p as resolveDocsContentDir, s as readEnvReferenceProperty, t as extractNestedObjectLiteral, u as readStringProperty } from "./config-UI31_wlO.mjs";
|
package/dist/cli/index.mjs
CHANGED
|
@@ -83,10 +83,10 @@ async function main() {
|
|
|
83
83
|
const { dev } = await import("../dev-HW5Op4My.mjs");
|
|
84
84
|
await dev(devOptions);
|
|
85
85
|
} else if (parsedCommand.command === "mcp") {
|
|
86
|
-
const { runMcp } = await import("../mcp-
|
|
86
|
+
const { runMcp } = await import("../mcp-D0LCSSaq.mjs");
|
|
87
87
|
await runMcp(mcpOptions);
|
|
88
88
|
} else if (parsedCommand.command === "agent" && subcommand === "compact") {
|
|
89
|
-
const { compactAgentDocs, parseAgentCompactArgs, printAgentCompactHelp } = await import("../agent-
|
|
89
|
+
const { compactAgentDocs, parseAgentCompactArgs, printAgentCompactHelp } = await import("../agent-2qREGB9R.mjs");
|
|
90
90
|
const agentCompactOptions = parseAgentCompactArgs(args.slice(2));
|
|
91
91
|
if (agentCompactOptions.help) {
|
|
92
92
|
printAgentCompactHelp();
|
|
@@ -96,11 +96,11 @@ async function main() {
|
|
|
96
96
|
} else if (parsedCommand.command === "agent") {
|
|
97
97
|
console.error(pc.red(`Unknown agent subcommand: ${subcommand ?? "(missing)"}`));
|
|
98
98
|
console.error();
|
|
99
|
-
const { printAgentCompactHelp } = await import("../agent-
|
|
99
|
+
const { printAgentCompactHelp } = await import("../agent-2qREGB9R.mjs");
|
|
100
100
|
printAgentCompactHelp();
|
|
101
101
|
process.exit(1);
|
|
102
102
|
} else if (parsedCommand.command === "doctor") {
|
|
103
|
-
const { parseDoctorArgs, printDoctorHelp, runDoctor } = await import("../doctor-
|
|
103
|
+
const { parseDoctorArgs, printDoctorHelp, runDoctor } = await import("../doctor-Dhs6DEbs.mjs");
|
|
104
104
|
const doctorOptions = parseDoctorArgs(args.slice(1));
|
|
105
105
|
if (doctorOptions.help) {
|
|
106
106
|
printDoctorHelp();
|
|
@@ -108,7 +108,7 @@ async function main() {
|
|
|
108
108
|
}
|
|
109
109
|
await runDoctor(doctorOptions);
|
|
110
110
|
} else if (parsedCommand.command === "search" && subcommand === "sync") {
|
|
111
|
-
const { syncSearch } = await import("../search-
|
|
111
|
+
const { syncSearch } = await import("../search-jAlynFl1.mjs");
|
|
112
112
|
await syncSearch(searchSyncOptions);
|
|
113
113
|
} else if (parsedCommand.command === "search") {
|
|
114
114
|
console.error(pc.red(`Unknown search subcommand: ${subcommand ?? "(missing)"}`));
|
|
@@ -116,7 +116,7 @@ async function main() {
|
|
|
116
116
|
printHelp();
|
|
117
117
|
process.exit(1);
|
|
118
118
|
} else if (parsedCommand.command === "sitemap" && subcommand === "generate") {
|
|
119
|
-
const { generateSitemap, parseSitemapGenerateArgs, printSitemapGenerateHelp } = await import("../sitemap-
|
|
119
|
+
const { generateSitemap, parseSitemapGenerateArgs, printSitemapGenerateHelp } = await import("../sitemap-BYVaRIsO.mjs");
|
|
120
120
|
const sitemapOptions = parseSitemapGenerateArgs(args.slice(2));
|
|
121
121
|
if (sitemapOptions.help) {
|
|
122
122
|
printSitemapGenerateHelp();
|
|
@@ -126,11 +126,11 @@ async function main() {
|
|
|
126
126
|
} else if (parsedCommand.command === "sitemap") {
|
|
127
127
|
console.error(pc.red(`Unknown sitemap subcommand: ${subcommand ?? "(missing)"}`));
|
|
128
128
|
console.error();
|
|
129
|
-
const { printSitemapGenerateHelp } = await import("../sitemap-
|
|
129
|
+
const { printSitemapGenerateHelp } = await import("../sitemap-BYVaRIsO.mjs");
|
|
130
130
|
printSitemapGenerateHelp();
|
|
131
131
|
process.exit(1);
|
|
132
132
|
} else if (parsedCommand.command === "robots" && subcommand === "generate") {
|
|
133
|
-
const { generateRobots, parseRobotsGenerateArgs, printRobotsGenerateHelp } = await import("../robots-
|
|
133
|
+
const { generateRobots, parseRobotsGenerateArgs, printRobotsGenerateHelp } = await import("../robots-b9bMJ-w5.mjs");
|
|
134
134
|
const robotsOptions = parseRobotsGenerateArgs(args.slice(2));
|
|
135
135
|
if (robotsOptions.help) {
|
|
136
136
|
printRobotsGenerateHelp();
|
|
@@ -140,7 +140,7 @@ async function main() {
|
|
|
140
140
|
} else if (parsedCommand.command === "robots") {
|
|
141
141
|
console.error(pc.red(`Unknown robots subcommand: ${subcommand ?? "(missing)"}`));
|
|
142
142
|
console.error();
|
|
143
|
-
const { printRobotsGenerateHelp } = await import("../robots-
|
|
143
|
+
const { printRobotsGenerateHelp } = await import("../robots-b9bMJ-w5.mjs");
|
|
144
144
|
printRobotsGenerateHelp();
|
|
145
145
|
process.exit(1);
|
|
146
146
|
} else if (parsedCommand.command === "upgrade") {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "./reading-time-CbbHNg9V.mjs";
|
|
2
2
|
import "./search-BL7o2rXk.mjs";
|
|
3
3
|
import { i as DEFAULT_SITEMAP_XML_ROUTE, n as DEFAULT_SITEMAP_MD_ROUTE, r as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, u as resolveDocsSitemapConfig } from "./sitemap-CnqcTdQg.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import "./sitemap-server-
|
|
4
|
+
import { E as DEFAULT_MCP_WELL_KNOWN_ROUTE, O as DEFAULT_SKILL_MD_ROUTE, S as DEFAULT_LLMS_TXT_ROUTE, _ as DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, a as analyzeDocsRobotsTxt, g as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, k as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, m as DEFAULT_AGENT_FEEDBACK_ROUTE, n as DEFAULT_ROBOTS_TXT_ROUTE, u as resolveDocsRobotsConfig, w as DEFAULT_MCP_PUBLIC_ROUTE, y as DEFAULT_LLMS_FULL_TXT_ROUTE } from "./robots-C3KeCl0S.mjs";
|
|
5
|
+
import "./sitemap-server-C4TbbCmY.mjs";
|
|
6
6
|
import { createFilesystemDocsMcpSource, resolveDocsMcpConfig } from "./mcp.mjs";
|
|
7
7
|
import "./server.mjs";
|
|
8
8
|
import { a as loadProjectEnv, c as readNavTitle, d as readTopLevelStringProperty, f as resolveDocsConfigPath, i as loadDocsConfigModule, o as readBooleanProperty, p as resolveDocsContentDir, r as extractTopLevelConfigObject, t as extractNestedObjectLiteral } from "./config-UI31_wlO.mjs";
|
|
9
|
-
import { inspectAgentCompactionState, scanDocsPageTargets } from "./agent-
|
|
9
|
+
import { inspectAgentCompactionState, scanDocsPageTargets } from "./agent-2qREGB9R.mjs";
|
|
10
10
|
import { t as detectFramework } from "./utils-AmYxHDoz.mjs";
|
|
11
11
|
import { existsSync, lstatSync, readFileSync, readdirSync } from "node:fs";
|
|
12
12
|
import path from "node:path";
|
package/dist/index.d.mts
CHANGED
|
@@ -201,6 +201,7 @@ declare function serializeGeneratedAgentDocument(content: string, provenance: Ge
|
|
|
201
201
|
//#endregion
|
|
202
202
|
//#region src/agent.d.ts
|
|
203
203
|
declare const DEFAULT_DOCS_API_ROUTE = "/api/docs";
|
|
204
|
+
declare const DEFAULT_OPENAPI_SCHEMA_ROUTE = "/api/docs?format=openapi";
|
|
204
205
|
declare const DEFAULT_AGENT_SPEC_ROUTE = "/api/docs/agent/spec";
|
|
205
206
|
declare const DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE = "/.well-known/agent";
|
|
206
207
|
declare const DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE = "/.well-known/agent.json";
|
|
@@ -240,6 +241,21 @@ interface DocsLlmsDiscoveryConfig {
|
|
|
240
241
|
siteDescription?: string;
|
|
241
242
|
maxChars?: LlmsTxtMaxCharsConfig;
|
|
242
243
|
sections?: LlmsTxtSectionConfig[];
|
|
244
|
+
openapi?: boolean | DocsOpenApiDiscoveryConfig;
|
|
245
|
+
}
|
|
246
|
+
interface DocsOpenApiDiscoveryConfig {
|
|
247
|
+
enabled?: boolean;
|
|
248
|
+
url?: string;
|
|
249
|
+
source?: "generated" | "configured";
|
|
250
|
+
specUrl?: string;
|
|
251
|
+
apiReferencePath?: string;
|
|
252
|
+
}
|
|
253
|
+
interface DocsOpenApiResolvedDiscoveryConfig {
|
|
254
|
+
enabled: boolean;
|
|
255
|
+
url?: string;
|
|
256
|
+
source?: "generated" | "configured";
|
|
257
|
+
specUrl?: string;
|
|
258
|
+
apiReferencePath?: string;
|
|
243
259
|
}
|
|
244
260
|
interface DocsLlmsTxtResolvedMaxChars {
|
|
245
261
|
mode: LlmsTxtMaxCharsMode;
|
|
@@ -295,6 +311,7 @@ interface DocsAgentDiscoverySpecOptions {
|
|
|
295
311
|
llms?: DocsLlmsDiscoveryConfig;
|
|
296
312
|
sitemap?: boolean | DocsSitemapConfig;
|
|
297
313
|
robots?: boolean | DocsRobotsConfig;
|
|
314
|
+
openapi?: boolean | DocsOpenApiDiscoveryConfig;
|
|
298
315
|
markdown?: {
|
|
299
316
|
acceptHeader?: boolean;
|
|
300
317
|
signatureAgentHeader?: boolean;
|
|
@@ -309,6 +326,7 @@ interface DocsSkillDocumentOptions {
|
|
|
309
326
|
llms?: DocsLlmsDiscoveryConfig;
|
|
310
327
|
sitemap?: boolean | DocsSitemapConfig;
|
|
311
328
|
robots?: boolean | DocsRobotsConfig;
|
|
329
|
+
openapi?: boolean | DocsOpenApiDiscoveryConfig;
|
|
312
330
|
markdown?: {
|
|
313
331
|
acceptHeader?: boolean;
|
|
314
332
|
signatureAgentHeader?: boolean;
|
|
@@ -403,6 +421,7 @@ declare function renderDocsSkillDocument({
|
|
|
403
421
|
llms,
|
|
404
422
|
sitemap,
|
|
405
423
|
robots,
|
|
424
|
+
openapi,
|
|
406
425
|
markdown
|
|
407
426
|
}: DocsSkillDocumentOptions): string;
|
|
408
427
|
declare function resolveDocsAgentMdxContent(content: string, audience: "human" | "agent"): string;
|
|
@@ -416,6 +435,7 @@ declare function buildDocsAgentDiscoverySpec({
|
|
|
416
435
|
llms,
|
|
417
436
|
sitemap,
|
|
418
437
|
robots,
|
|
438
|
+
openapi,
|
|
419
439
|
markdown
|
|
420
440
|
}: DocsAgentDiscoverySpecOptions): {
|
|
421
441
|
version: string;
|
|
@@ -445,6 +465,8 @@ declare function buildDocsAgentDiscoverySpec({
|
|
|
445
465
|
sitemap: boolean;
|
|
446
466
|
robots: boolean;
|
|
447
467
|
structuredData: boolean;
|
|
468
|
+
apiReference: boolean;
|
|
469
|
+
openapi: boolean;
|
|
448
470
|
agentFeedback: boolean;
|
|
449
471
|
locales: boolean;
|
|
450
472
|
};
|
|
@@ -456,6 +478,7 @@ declare function buildDocsAgentDiscoverySpec({
|
|
|
456
478
|
agentSpecWellKnown: string;
|
|
457
479
|
agentSpecWellKnownJson: string;
|
|
458
480
|
agentSpecQuery: string;
|
|
481
|
+
openapi: string;
|
|
459
482
|
};
|
|
460
483
|
markdown: {
|
|
461
484
|
enabled: boolean;
|
|
@@ -514,6 +537,14 @@ declare function buildDocsAgentDiscoverySpec({
|
|
|
514
537
|
canonicalUrlField: string;
|
|
515
538
|
breadcrumbType: string;
|
|
516
539
|
};
|
|
540
|
+
openapi: {
|
|
541
|
+
enabled: boolean;
|
|
542
|
+
url: string | null;
|
|
543
|
+
source: "generated" | "configured" | null;
|
|
544
|
+
specUrl: string | null;
|
|
545
|
+
apiReferencePath: string | null;
|
|
546
|
+
format: string;
|
|
547
|
+
};
|
|
517
548
|
search: {
|
|
518
549
|
enabled: boolean;
|
|
519
550
|
endpoint: string;
|
|
@@ -562,10 +593,12 @@ declare function buildDocsAgentDiscoverySpec({
|
|
|
562
593
|
instructions: {
|
|
563
594
|
preferMarkdownRoutes: boolean;
|
|
564
595
|
useMcpWhenAvailable: boolean;
|
|
596
|
+
useOpenApiWhenAvailable: boolean;
|
|
565
597
|
readFeedbackSchemaBeforeSubmitting: boolean;
|
|
566
598
|
doNotAssumeFeedbackPayloadShape: boolean;
|
|
567
599
|
};
|
|
568
600
|
};
|
|
601
|
+
declare function resolveDocsOpenApiDiscoveryConfig(openapi?: boolean | DocsOpenApiDiscoveryConfig): DocsOpenApiResolvedDiscoveryConfig;
|
|
569
602
|
//#endregion
|
|
570
603
|
//#region src/robots.d.ts
|
|
571
604
|
declare const DEFAULT_ROBOTS_TXT_ROUTE = "/robots.txt";
|
|
@@ -610,4 +643,4 @@ declare function renderDocsRobotsGeneratedBlock(options?: DocsRobotsRenderOption
|
|
|
610
643
|
declare function upsertDocsRobotsGeneratedBlock(existing: string, block: string): string;
|
|
611
644
|
declare function analyzeDocsRobotsTxt(content: string, options?: DocsRobotsRenderOptions): DocsRobotsAnalysis;
|
|
612
645
|
//#endregion
|
|
613
|
-
export { type AIConfig, type AgentFeedbackConfig, type AlgoliaDocsSearchConfig, type ApiReferenceConfig, type ApiReferenceRenderer, type BreadcrumbConfig, type ChangelogConfig, type ChangelogEntrySummary, type ChangelogFrontmatter, type CodeBlockCopyData, type CopyMarkdownConfig, type CustomDocsSearchConfig, DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA, DEFAULT_AGENT_FEEDBACK_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_ROBOTS_TXT_ROUTE, DEFAULT_SITEMAP_MANIFEST_PATH, 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_MARKDOWN_SIGNATURE_AGENT_HEADER, DOCS_ROBOTS_GENERATED_BLOCK_END, DOCS_ROBOTS_GENERATED_BLOCK_START, type DocsAgentDiscoverySpecOptions, type DocsAgentFeedbackContext, type DocsAgentFeedbackData, type DocsAgentFeedbackDiscoveryConfig, type DocsAgentFeedbackRequest, type DocsAgentFeedbackResolvedConfig, type DocsAgentTraceContext, type DocsAgentTraceEventInput, type DocsAgentTraceEventType, type DocsAgentTraceStatus, 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 DocsCloudAnalyticsOptions, 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 DocsMarkdownPage, type DocsMcpConfig, type DocsMcpToolsConfig, type DocsMetadata, type DocsNav, type DocsObservabilityConfig, type DocsObservabilityEvent, type DocsObservabilityEventInput, type DocsPageStructuredDataInput, type DocsPathMatch, type DocsRelatedItem, 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 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 OpenGraphImage, type OrderingItem, type PageActionsConfig, type PageFrontmatter, type PageOpenGraph, type PageSidebarFrontmatter, type PageTwitter, type ReadingTimeConfig, type ResolvedChangelogConfig, type ResolvedDocsAnalyticsConfig, type ResolvedDocsI18n, type ResolvedDocsObservabilityConfig, type ResolvedDocsRelatedLink, 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, buildDocsPageStructuredData, buildDocsSearchDocuments, buildDocsSitemapManifest, buildPageOpenGraph, buildPageTwitter, createAlgoliaSearchAdapter, createCustomSearchAdapter, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsCloudAnalytics, createDocsRobotsResponse, createDocsSitemapResponse, createMcpSearchAdapter, createSimpleSearchAdapter, createTheme, createTypesenseSearchAdapter, deepMerge, defineDocs, emitDocsAgentTraceEvent, emitDocsAnalyticsEvent, emitDocsObservabilityEvent, estimateReadingTimeMinutes, extendTheme, findDocsMarkdownPage, formatDocsAskAIPackageHints, getDocsLlmsTxtMaxCharsIssue, getDocsMarkdownCanonicalLinkHeader, getDocsMarkdownVaryHeader, getDocsRobotsAllowRoutes, hasDocsMarkdownSignatureAgent, hashGeneratedAgentContent, inferDocsAskAIPackageHints, isDocsAgentDiscoveryRequest, isDocsLlmsTxtPublicRequest, isDocsMcpRequest, isDocsPublicGetRequest, isDocsSkillRequest, matchesDocsLlmsTxtSection, normalizeDocsPathSegment, normalizeDocsRelated, normalizeDocsUrlPath, normalizeGeneratedAgentContent, parseDocsAgentFeedbackData, parseGeneratedAgentDocument, performDocsSearch, readDocsSitemapManifestFromContentMap, renderDocsLlmsTxt, renderDocsMarkdownDocument, renderDocsMarkdownNotFound, renderDocsPageStructuredDataJson, renderDocsRelatedMarkdownLines, renderDocsRobotsGeneratedBlock, renderDocsRobotsTxt, renderDocsSitemapMarkdown, renderDocsSitemapXml, renderDocsSkillDocument, resolveAskAISearchRequestConfig, resolveChangelogConfig, resolveDocsAgentFeedbackConfig, resolveDocsAgentFeedbackRequest, resolveDocsAgentMdxContent, resolveDocsAnalyticsConfig, resolveDocsI18n, resolveDocsLlmsTxtFormat, resolveDocsLlmsTxtRequest, resolveDocsLlmsTxtSections, resolveDocsLocale, resolveDocsMarkdownCanonicalUrl, resolveDocsMarkdownRequest, resolveDocsMetadataBaseUrl, resolveDocsObservabilityConfig, resolveDocsPath, resolveDocsRobotsConfig, resolveDocsRobotsRequest, resolveDocsSitemapConfig, resolveDocsSitemapPageLastmod, resolveDocsSitemapRequest, resolveDocsSkillFormat, resolveOGImage, resolvePageReadingTime, resolvePageSidebarFolderIndexBehavior, resolveReadingTimeFromContent, resolveReadingTimeFromSource, resolveReadingTimeOptions, resolveSearchRequestConfig, resolveSidebarFolderIndexBehavior, resolveSidebarFolderIndexBehaviorForPath, resolveTitle, selectDocsLlmsTxtContent, serializeGeneratedAgentDocument, stripGeneratedAgentProvenance, toDocsMarkdownUrl, toDocsSitemapMarkdownUrl, upsertDocsRobotsGeneratedBlock, validateDocsAgentFeedbackPayload };
|
|
646
|
+
export { type AIConfig, type AgentFeedbackConfig, type AlgoliaDocsSearchConfig, type ApiReferenceConfig, type ApiReferenceRenderer, type BreadcrumbConfig, type ChangelogConfig, type ChangelogEntrySummary, type ChangelogFrontmatter, type CodeBlockCopyData, type CopyMarkdownConfig, type CustomDocsSearchConfig, DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA, DEFAULT_AGENT_FEEDBACK_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_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_MARKDOWN_SIGNATURE_AGENT_HEADER, DOCS_ROBOTS_GENERATED_BLOCK_END, DOCS_ROBOTS_GENERATED_BLOCK_START, type DocsAgentDiscoverySpecOptions, type DocsAgentFeedbackContext, type DocsAgentFeedbackData, type DocsAgentFeedbackDiscoveryConfig, type DocsAgentFeedbackRequest, type DocsAgentFeedbackResolvedConfig, type DocsAgentTraceContext, type DocsAgentTraceEventInput, type DocsAgentTraceEventType, type DocsAgentTraceStatus, 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 DocsCloudAnalyticsOptions, 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 DocsMarkdownPage, type DocsMcpConfig, type DocsMcpToolsConfig, type DocsMetadata, type DocsNav, type DocsObservabilityConfig, type DocsObservabilityEvent, type DocsObservabilityEventInput, type DocsOpenApiDiscoveryConfig, type DocsOpenApiResolvedDiscoveryConfig, type DocsPageStructuredDataInput, type DocsPathMatch, type DocsRelatedItem, 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 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 OpenGraphImage, type OrderingItem, type PageActionsConfig, type PageFrontmatter, type PageOpenGraph, type PageSidebarFrontmatter, type PageTwitter, type ReadingTimeConfig, type ResolvedChangelogConfig, type ResolvedDocsAnalyticsConfig, type ResolvedDocsI18n, type ResolvedDocsObservabilityConfig, type ResolvedDocsRelatedLink, 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, buildDocsPageStructuredData, buildDocsSearchDocuments, buildDocsSitemapManifest, buildPageOpenGraph, buildPageTwitter, createAlgoliaSearchAdapter, createCustomSearchAdapter, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsCloudAnalytics, createDocsRobotsResponse, createDocsSitemapResponse, createMcpSearchAdapter, createSimpleSearchAdapter, createTheme, createTypesenseSearchAdapter, deepMerge, defineDocs, emitDocsAgentTraceEvent, emitDocsAnalyticsEvent, emitDocsObservabilityEvent, estimateReadingTimeMinutes, extendTheme, findDocsMarkdownPage, formatDocsAskAIPackageHints, getDocsLlmsTxtMaxCharsIssue, getDocsMarkdownCanonicalLinkHeader, getDocsMarkdownVaryHeader, getDocsRobotsAllowRoutes, hasDocsMarkdownSignatureAgent, hashGeneratedAgentContent, inferDocsAskAIPackageHints, isDocsAgentDiscoveryRequest, isDocsLlmsTxtPublicRequest, isDocsMcpRequest, isDocsPublicGetRequest, isDocsSkillRequest, matchesDocsLlmsTxtSection, normalizeDocsPathSegment, normalizeDocsRelated, normalizeDocsUrlPath, normalizeGeneratedAgentContent, parseDocsAgentFeedbackData, parseGeneratedAgentDocument, performDocsSearch, readDocsSitemapManifestFromContentMap, renderDocsLlmsTxt, renderDocsMarkdownDocument, renderDocsMarkdownNotFound, renderDocsPageStructuredDataJson, renderDocsRelatedMarkdownLines, renderDocsRobotsGeneratedBlock, renderDocsRobotsTxt, renderDocsSitemapMarkdown, renderDocsSitemapXml, renderDocsSkillDocument, resolveAskAISearchRequestConfig, resolveChangelogConfig, resolveDocsAgentFeedbackConfig, resolveDocsAgentFeedbackRequest, resolveDocsAgentMdxContent, resolveDocsAnalyticsConfig, resolveDocsI18n, resolveDocsLlmsTxtFormat, resolveDocsLlmsTxtRequest, resolveDocsLlmsTxtSections, resolveDocsLocale, resolveDocsMarkdownCanonicalUrl, resolveDocsMarkdownRequest, resolveDocsMetadataBaseUrl, resolveDocsObservabilityConfig, resolveDocsOpenApiDiscoveryConfig, resolveDocsPath, resolveDocsRobotsConfig, resolveDocsRobotsRequest, resolveDocsSitemapConfig, resolveDocsSitemapPageLastmod, resolveDocsSitemapRequest, resolveDocsSkillFormat, resolveOGImage, resolvePageReadingTime, resolvePageSidebarFolderIndexBehavior, resolveReadingTimeFromContent, resolveReadingTimeFromSource, resolveReadingTimeOptions, resolveSearchRequestConfig, resolveSidebarFolderIndexBehavior, resolveSidebarFolderIndexBehaviorForPath, resolveTitle, selectDocsLlmsTxtContent, serializeGeneratedAgentDocument, stripGeneratedAgentProvenance, toDocsMarkdownUrl, toDocsSitemapMarkdownUrl, upsertDocsRobotsGeneratedBlock, validateDocsAgentFeedbackPayload };
|
package/dist/index.mjs
CHANGED
|
@@ -2,6 +2,6 @@ import { _ as extendTheme, a as resolveReadingTimeOptions, b as defineDocs, c as
|
|
|
2
2
|
import { A as resolveDocsAnalyticsConfig, C as resolveSidebarFolderIndexBehaviorForPath, D as emitDocsAgentTraceEvent, E as createDocsAgentTraceId, M as createDocsCloudAnalytics, O as emitDocsAnalyticsEvent, S as resolveSidebarFolderIndexBehavior, T as createDocsAgentTraceContext, _ 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 resolveDocsObservabilityConfig, k as emitDocsObservabilityEvent, 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 DOCS_AGENT_TRACE_EVENT_TYPES, x as resolvePageSidebarFolderIndexBehavior, y as stripGeneratedAgentProvenance } from "./search-BL7o2rXk.mjs";
|
|
3
3
|
import { n as renderDocsRelatedMarkdownLines, t as normalizeDocsRelated } from "./related-BNj_NdHq.mjs";
|
|
4
4
|
import { a as buildDocsSitemapManifest, c as renderDocsSitemapMarkdown, d as resolveDocsSitemapPageLastmod, f as resolveDocsSitemapRequest, i as DEFAULT_SITEMAP_XML_ROUTE, l as renderDocsSitemapXml, n as DEFAULT_SITEMAP_MD_ROUTE, o as createDocsSitemapResponse, p as toDocsSitemapMarkdownUrl, r as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, s as readDocsSitemapManifestFromContentMap, t as DEFAULT_SITEMAP_MANIFEST_PATH, u as resolveDocsSitemapConfig } from "./sitemap-CnqcTdQg.mjs";
|
|
5
|
-
import { $ as
|
|
5
|
+
import { $ as resolveDocsAgentMdxContent, A as DOCS_MARKDOWN_SIGNATURE_AGENT_HEADER, B as isDocsMcpRequest, C as DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE, D as DEFAULT_OPENAPI_SCHEMA_ROUTE, E as DEFAULT_MCP_WELL_KNOWN_ROUTE, F as getDocsMarkdownCanonicalLinkHeader, G as normalizeDocsUrlPath, H as isDocsSkillRequest, I as getDocsMarkdownVaryHeader, J as renderDocsMarkdownDocument, K as parseDocsAgentFeedbackData, L as hasDocsMarkdownSignatureAgent, M as buildDocsAgentFeedbackSchema, N as findDocsMarkdownPage, O as DEFAULT_SKILL_MD_ROUTE, P as getDocsLlmsTxtMaxCharsIssue, Q as resolveDocsAgentFeedbackRequest, R as isDocsAgentDiscoveryRequest, S as DEFAULT_LLMS_TXT_ROUTE, T as DEFAULT_MCP_ROUTE, U as matchesDocsLlmsTxtSection, V as isDocsPublicGetRequest, W as normalizeDocsPathSegment, X as renderDocsSkillDocument, Y as renderDocsMarkdownNotFound, Z as resolveDocsAgentFeedbackConfig, _ as DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, a as analyzeDocsRobotsTxt, at as resolveDocsOpenApiDiscoveryConfig, b as DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, c as renderDocsRobotsGeneratedBlock, ct as toDocsMarkdownUrl, d as resolveDocsRobotsRequest, et as resolveDocsLlmsTxtFormat, f as upsertDocsRobotsGeneratedBlock, g as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, h as DEFAULT_AGENT_SPEC_ROUTE, i as DOCS_ROBOTS_GENERATED_BLOCK_START, it as resolveDocsMarkdownRequest, j as buildDocsAgentDiscoverySpec, k as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, l as renderDocsRobotsTxt, lt as validateDocsAgentFeedbackPayload, m as DEFAULT_AGENT_FEEDBACK_ROUTE, n as DEFAULT_ROBOTS_TXT_ROUTE, nt as resolveDocsLlmsTxtSections, o as createDocsRobotsResponse, ot as resolveDocsSkillFormat, p as DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA, q as renderDocsLlmsTxt, r as DOCS_ROBOTS_GENERATED_BLOCK_END, rt as resolveDocsMarkdownCanonicalUrl, s as getDocsRobotsAllowRoutes, st as selectDocsLlmsTxtContent, t as DEFAULT_DOCS_AI_ROBOTS_USER_AGENTS, tt as resolveDocsLlmsTxtRequest, u as resolveDocsRobotsConfig, v as DEFAULT_DOCS_API_ROUTE, w as DEFAULT_MCP_PUBLIC_ROUTE, x as DEFAULT_LLMS_TXT_MAX_CHARS, y as DEFAULT_LLMS_FULL_TXT_ROUTE, z as isDocsLlmsTxtPublicRequest } from "./robots-C3KeCl0S.mjs";
|
|
6
6
|
|
|
7
|
-
export { DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA, DEFAULT_AGENT_FEEDBACK_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_ROBOTS_TXT_ROUTE, DEFAULT_SITEMAP_MANIFEST_PATH, 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_MARKDOWN_SIGNATURE_AGENT_HEADER, DOCS_ROBOTS_GENERATED_BLOCK_END, DOCS_ROBOTS_GENERATED_BLOCK_START, GENERATED_AGENT_PROVENANCE_MARKER, GENERATED_AGENT_PROVENANCE_VERSION, analyzeDocsRobotsTxt, applySidebarFolderIndexBehavior, buildDocsAgentDiscoverySpec, buildDocsAgentFeedbackSchema, buildDocsAskAIContext, buildDocsPageStructuredData, buildDocsSearchDocuments, buildDocsSitemapManifest, buildPageOpenGraph, buildPageTwitter, createAlgoliaSearchAdapter, createCustomSearchAdapter, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsCloudAnalytics, createDocsRobotsResponse, createDocsSitemapResponse, createMcpSearchAdapter, createSimpleSearchAdapter, createTheme, createTypesenseSearchAdapter, deepMerge, defineDocs, emitDocsAgentTraceEvent, emitDocsAnalyticsEvent, emitDocsObservabilityEvent, estimateReadingTimeMinutes, extendTheme, findDocsMarkdownPage, formatDocsAskAIPackageHints, getDocsLlmsTxtMaxCharsIssue, getDocsMarkdownCanonicalLinkHeader, getDocsMarkdownVaryHeader, getDocsRobotsAllowRoutes, hasDocsMarkdownSignatureAgent, hashGeneratedAgentContent, inferDocsAskAIPackageHints, isDocsAgentDiscoveryRequest, isDocsLlmsTxtPublicRequest, isDocsMcpRequest, isDocsPublicGetRequest, isDocsSkillRequest, matchesDocsLlmsTxtSection, normalizeDocsPathSegment, normalizeDocsRelated, normalizeDocsUrlPath, normalizeGeneratedAgentContent, parseDocsAgentFeedbackData, parseGeneratedAgentDocument, performDocsSearch, readDocsSitemapManifestFromContentMap, renderDocsLlmsTxt, renderDocsMarkdownDocument, renderDocsMarkdownNotFound, renderDocsPageStructuredDataJson, renderDocsRelatedMarkdownLines, renderDocsRobotsGeneratedBlock, renderDocsRobotsTxt, renderDocsSitemapMarkdown, renderDocsSitemapXml, renderDocsSkillDocument, resolveAskAISearchRequestConfig, resolveChangelogConfig, resolveDocsAgentFeedbackConfig, resolveDocsAgentFeedbackRequest, resolveDocsAgentMdxContent, resolveDocsAnalyticsConfig, resolveDocsI18n, resolveDocsLlmsTxtFormat, resolveDocsLlmsTxtRequest, resolveDocsLlmsTxtSections, resolveDocsLocale, resolveDocsMarkdownCanonicalUrl, resolveDocsMarkdownRequest, resolveDocsMetadataBaseUrl, resolveDocsObservabilityConfig, resolveDocsPath, resolveDocsRobotsConfig, resolveDocsRobotsRequest, resolveDocsSitemapConfig, resolveDocsSitemapPageLastmod, resolveDocsSitemapRequest, resolveDocsSkillFormat, resolveOGImage, resolvePageReadingTime, resolvePageSidebarFolderIndexBehavior, resolveReadingTimeFromContent, resolveReadingTimeFromSource, resolveReadingTimeOptions, resolveSearchRequestConfig, resolveSidebarFolderIndexBehavior, resolveSidebarFolderIndexBehaviorForPath, resolveTitle, selectDocsLlmsTxtContent, serializeGeneratedAgentDocument, stripGeneratedAgentProvenance, toDocsMarkdownUrl, toDocsSitemapMarkdownUrl, upsertDocsRobotsGeneratedBlock, validateDocsAgentFeedbackPayload };
|
|
7
|
+
export { DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA, DEFAULT_AGENT_FEEDBACK_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_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_MARKDOWN_SIGNATURE_AGENT_HEADER, DOCS_ROBOTS_GENERATED_BLOCK_END, DOCS_ROBOTS_GENERATED_BLOCK_START, GENERATED_AGENT_PROVENANCE_MARKER, GENERATED_AGENT_PROVENANCE_VERSION, analyzeDocsRobotsTxt, applySidebarFolderIndexBehavior, buildDocsAgentDiscoverySpec, buildDocsAgentFeedbackSchema, buildDocsAskAIContext, buildDocsPageStructuredData, buildDocsSearchDocuments, buildDocsSitemapManifest, buildPageOpenGraph, buildPageTwitter, createAlgoliaSearchAdapter, createCustomSearchAdapter, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsCloudAnalytics, createDocsRobotsResponse, createDocsSitemapResponse, createMcpSearchAdapter, createSimpleSearchAdapter, createTheme, createTypesenseSearchAdapter, deepMerge, defineDocs, emitDocsAgentTraceEvent, emitDocsAnalyticsEvent, emitDocsObservabilityEvent, estimateReadingTimeMinutes, extendTheme, findDocsMarkdownPage, formatDocsAskAIPackageHints, getDocsLlmsTxtMaxCharsIssue, getDocsMarkdownCanonicalLinkHeader, getDocsMarkdownVaryHeader, getDocsRobotsAllowRoutes, hasDocsMarkdownSignatureAgent, hashGeneratedAgentContent, inferDocsAskAIPackageHints, isDocsAgentDiscoveryRequest, isDocsLlmsTxtPublicRequest, isDocsMcpRequest, isDocsPublicGetRequest, isDocsSkillRequest, matchesDocsLlmsTxtSection, normalizeDocsPathSegment, normalizeDocsRelated, normalizeDocsUrlPath, normalizeGeneratedAgentContent, parseDocsAgentFeedbackData, parseGeneratedAgentDocument, performDocsSearch, readDocsSitemapManifestFromContentMap, renderDocsLlmsTxt, renderDocsMarkdownDocument, renderDocsMarkdownNotFound, renderDocsPageStructuredDataJson, renderDocsRelatedMarkdownLines, renderDocsRobotsGeneratedBlock, renderDocsRobotsTxt, renderDocsSitemapMarkdown, renderDocsSitemapXml, renderDocsSkillDocument, resolveAskAISearchRequestConfig, resolveChangelogConfig, resolveDocsAgentFeedbackConfig, resolveDocsAgentFeedbackRequest, resolveDocsAgentMdxContent, resolveDocsAnalyticsConfig, resolveDocsI18n, resolveDocsLlmsTxtFormat, resolveDocsLlmsTxtRequest, resolveDocsLlmsTxtSections, resolveDocsLocale, resolveDocsMarkdownCanonicalUrl, resolveDocsMarkdownRequest, resolveDocsMetadataBaseUrl, resolveDocsObservabilityConfig, resolveDocsOpenApiDiscoveryConfig, resolveDocsPath, resolveDocsRobotsConfig, resolveDocsRobotsRequest, resolveDocsSitemapConfig, resolveDocsSitemapPageLastmod, resolveDocsSitemapRequest, resolveDocsSkillFormat, resolveOGImage, resolvePageReadingTime, resolvePageSidebarFolderIndexBehavior, resolveReadingTimeFromContent, resolveReadingTimeFromSource, resolveReadingTimeOptions, resolveSearchRequestConfig, resolveSidebarFolderIndexBehavior, resolveSidebarFolderIndexBehaviorForPath, resolveTitle, selectDocsLlmsTxtContent, serializeGeneratedAgentDocument, stripGeneratedAgentProvenance, toDocsMarkdownUrl, toDocsSitemapMarkdownUrl, upsertDocsRobotsGeneratedBlock, validateDocsAgentFeedbackPayload };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./search-BL7o2rXk.mjs";
|
|
2
|
-
import "./sitemap-server-
|
|
2
|
+
import "./sitemap-server-C4TbbCmY.mjs";
|
|
3
3
|
import { createFilesystemDocsMcpSource, resolveDocsMcpConfig, runDocsMcpStdio } from "./mcp.mjs";
|
|
4
4
|
import "./server.mjs";
|
|
5
5
|
import { c as readNavTitle, f as resolveDocsConfigPath, n as extractObjectLiteral, o as readBooleanProperty, p as resolveDocsContentDir, u as readStringProperty } from "./config-UI31_wlO.mjs";
|
|
@@ -3,6 +3,7 @@ import { f as resolveDocsSitemapRequest, i as DEFAULT_SITEMAP_XML_ROUTE, n as DE
|
|
|
3
3
|
|
|
4
4
|
//#region src/agent.ts
|
|
5
5
|
const DEFAULT_DOCS_API_ROUTE = "/api/docs";
|
|
6
|
+
const DEFAULT_OPENAPI_SCHEMA_ROUTE = `${DEFAULT_DOCS_API_ROUTE}?format=openapi`;
|
|
6
7
|
const DEFAULT_AGENT_SPEC_ROUTE = "/api/docs/agent/spec";
|
|
7
8
|
const DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE = "/.well-known/agent";
|
|
8
9
|
const DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE = "/.well-known/agent.json";
|
|
@@ -356,6 +357,10 @@ function renderLlmsTxtPageList(pages, baseUrl) {
|
|
|
356
357
|
}
|
|
357
358
|
return content;
|
|
358
359
|
}
|
|
360
|
+
function resolveDocsResourceUrl(baseUrl, url) {
|
|
361
|
+
if (/^[a-z][a-z0-9+.-]*:/i.test(url)) return url;
|
|
362
|
+
return `${baseUrl}${url.startsWith("/") ? url : `/${url}`}`;
|
|
363
|
+
}
|
|
359
364
|
function renderLlmsFullTxtPages(pages, baseUrl) {
|
|
360
365
|
let content = "";
|
|
361
366
|
for (const page of pages) {
|
|
@@ -372,6 +377,7 @@ function renderDocsLlmsTxt(pages, options = {}) {
|
|
|
372
377
|
const baseUrl = options.baseUrl ?? "";
|
|
373
378
|
const maxChars = normalizeLlmsTxtMaxChars(options.maxChars);
|
|
374
379
|
const sections = resolveDocsLlmsTxtSections(options);
|
|
380
|
+
const openapi = resolveDocsOpenApiDiscoveryConfig(options.openapi);
|
|
375
381
|
const matchedPageUrls = /* @__PURE__ */ new Set();
|
|
376
382
|
const generatedSections = sections.map((section) => {
|
|
377
383
|
const sectionPages = pages.filter((page) => matchesDocsLlmsTxtSection(page.url, section));
|
|
@@ -403,6 +409,12 @@ function renderDocsLlmsTxt(pages, options = {}) {
|
|
|
403
409
|
}
|
|
404
410
|
llmsTxt += "\n";
|
|
405
411
|
}
|
|
412
|
+
if (openapi.enabled && openapi.url) {
|
|
413
|
+
llmsTxt += "## API Schemas\n\n";
|
|
414
|
+
llmsTxt += `- [OpenAPI schema](${resolveDocsResourceUrl(baseUrl, openapi.url)}): Machine-readable API schema for tool use and API clients`;
|
|
415
|
+
if (openapi.apiReferencePath) llmsTxt += `; rendered API reference at ${resolveDocsResourceUrl(baseUrl, openapi.apiReferencePath)}`;
|
|
416
|
+
llmsTxt += "\n\n";
|
|
417
|
+
}
|
|
406
418
|
if (rootPages.length > 0 || generatedSections.length === 0) {
|
|
407
419
|
llmsTxt += "## Pages\n\n";
|
|
408
420
|
llmsTxt += renderLlmsTxtPageList(rootPages, baseUrl);
|
|
@@ -553,7 +565,7 @@ function renderDocsMarkdownDocument(page, options) {
|
|
|
553
565
|
lines.push("", page.agentFallbackRawContent ?? page.rawContent ?? page.content);
|
|
554
566
|
return lines.join("\n");
|
|
555
567
|
}
|
|
556
|
-
function renderDocsSkillDocument({ origin, entry = "docs", search, mcp, feedback, llms, sitemap, robots, markdown }) {
|
|
568
|
+
function renderDocsSkillDocument({ origin, entry = "docs", search, mcp, feedback, llms, sitemap, robots, openapi, markdown }) {
|
|
557
569
|
const normalizedEntry = normalizeDocsPathSegment(entry) || "docs";
|
|
558
570
|
const siteTitle = compactSkillText(llms?.siteTitle ?? "Documentation");
|
|
559
571
|
const siteDescription = llms?.siteDescription ? compactSkillText(llms.siteDescription) : void 0;
|
|
@@ -562,6 +574,7 @@ function renderDocsSkillDocument({ origin, entry = "docs", search, mcp, feedback
|
|
|
562
574
|
const feedbackEnabled = feedback?.enabled ?? false;
|
|
563
575
|
const sitemapConfig = resolveDocsSitemapConfig(sitemap);
|
|
564
576
|
const robotsEnabled = isRobotsDiscoveryEnabled(robots);
|
|
577
|
+
const openapiConfig = resolveDocsOpenApiDiscoveryConfig(openapi);
|
|
565
578
|
const feedbackRoute = feedback?.route ?? DEFAULT_AGENT_FEEDBACK_ROUTE;
|
|
566
579
|
const feedbackSchemaRoute = feedback?.schemaRoute ?? `${feedbackRoute}/schema`;
|
|
567
580
|
const llmsSections = resolveDocsLlmsTxtSections(llms);
|
|
@@ -583,6 +596,7 @@ function renderDocsSkillDocument({ origin, entry = "docs", search, mcp, feedback
|
|
|
583
596
|
if (markdownAcceptHeader) lines.push(`- You can also request ${markdownAcceptHeader} from normal page URLs.`);
|
|
584
597
|
if (markdownSignatureAgentHeader) lines.push(`- Requests with ${markdownSignatureAgentHeader} on normal page URLs receive markdown automatically.`);
|
|
585
598
|
if (searchEnabled) lines.push(`- Search with ${DEFAULT_DOCS_API_ROUTE}?query={query} when you do not know the page.`);
|
|
599
|
+
if (openapiConfig.enabled && openapiConfig.url) lines.push(`- Fetch ${openapiConfig.url} for the machine-readable OpenAPI schema before scraping API reference pages.`);
|
|
586
600
|
if (llmsEnabled) {
|
|
587
601
|
lines.push(`- Use ${DEFAULT_LLMS_TXT_ROUTE} for a compact docs index.`, `- Use ${DEFAULT_LLMS_FULL_TXT_ROUTE} for full markdown context.`);
|
|
588
602
|
for (const section of llmsSections) lines.push(`- Use ${section.route} for the ${section.title} llms.txt section.`);
|
|
@@ -603,6 +617,10 @@ function renderDocsSkillDocument({ origin, entry = "docs", search, mcp, feedback
|
|
|
603
617
|
lines.push(`- ${section.title} llms-full.txt: ${section.fullRoute}`);
|
|
604
618
|
}
|
|
605
619
|
}
|
|
620
|
+
if (openapiConfig.enabled && openapiConfig.url) {
|
|
621
|
+
lines.push(`- OpenAPI schema: ${openapiConfig.url}`);
|
|
622
|
+
if (openapiConfig.apiReferencePath) lines.push(`- API reference: ${openapiConfig.apiReferencePath}`);
|
|
623
|
+
}
|
|
606
624
|
if (sitemapConfig.enabled) {
|
|
607
625
|
if (sitemapConfig.xml.enabled) lines.push(`- Sitemap XML: ${sitemapConfig.xml.route}`);
|
|
608
626
|
if (sitemapConfig.markdown.enabled) lines.push(`- Sitemap Markdown: ${sitemapConfig.markdown.route}`, `- Sitemap well-known alias: ${sitemapConfig.markdown.wellKnownRoute}`);
|
|
@@ -658,7 +676,7 @@ function resolveDocsAgentMdxContent(content, audience) {
|
|
|
658
676
|
}
|
|
659
677
|
return output.join("\n").replace(/\n{3,}/g, "\n\n").trim();
|
|
660
678
|
}
|
|
661
|
-
function buildDocsAgentDiscoverySpec({ origin, entry = "docs", i18n = null, search, mcp, feedback, llms, sitemap, robots, markdown }) {
|
|
679
|
+
function buildDocsAgentDiscoverySpec({ origin, entry = "docs", i18n = null, search, mcp, feedback, llms, sitemap, robots, openapi, markdown }) {
|
|
662
680
|
const normalizedEntry = normalizeDocsPathSegment(entry) || "docs";
|
|
663
681
|
const localesEnabled = i18n !== null;
|
|
664
682
|
const searchEnabled = isSearchEnabled(search);
|
|
@@ -668,6 +686,7 @@ function buildDocsAgentDiscoverySpec({ origin, entry = "docs", i18n = null, sear
|
|
|
668
686
|
const llmsSections = resolveDocsLlmsTxtSections(llms);
|
|
669
687
|
const sitemapConfig = resolveDocsSitemapConfig(sitemap, { baseUrl: llms?.baseUrl });
|
|
670
688
|
const robotsEnabled = isRobotsDiscoveryEnabled(robots);
|
|
689
|
+
const openapiConfig = resolveDocsOpenApiDiscoveryConfig(openapi);
|
|
671
690
|
return {
|
|
672
691
|
version: "1",
|
|
673
692
|
name: "@farming-labs/docs",
|
|
@@ -696,6 +715,8 @@ function buildDocsAgentDiscoverySpec({ origin, entry = "docs", i18n = null, sear
|
|
|
696
715
|
sitemap: sitemapConfig.enabled,
|
|
697
716
|
robots: robotsEnabled,
|
|
698
717
|
structuredData: true,
|
|
718
|
+
apiReference: openapiConfig.enabled,
|
|
719
|
+
openapi: openapiConfig.enabled,
|
|
699
720
|
agentFeedback: feedback?.enabled ?? false,
|
|
700
721
|
locales: localesEnabled
|
|
701
722
|
},
|
|
@@ -706,7 +727,8 @@ function buildDocsAgentDiscoverySpec({ origin, entry = "docs", i18n = null, sear
|
|
|
706
727
|
agentSpecFallback: DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE,
|
|
707
728
|
agentSpecWellKnown: DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE,
|
|
708
729
|
agentSpecWellKnownJson: DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE,
|
|
709
|
-
agentSpecQuery: `${DEFAULT_DOCS_API_ROUTE}?agent=spec
|
|
730
|
+
agentSpecQuery: `${DEFAULT_DOCS_API_ROUTE}?agent=spec`,
|
|
731
|
+
openapi: DEFAULT_OPENAPI_SCHEMA_ROUTE
|
|
710
732
|
},
|
|
711
733
|
markdown: {
|
|
712
734
|
enabled: true,
|
|
@@ -775,6 +797,14 @@ function buildDocsAgentDiscoverySpec({ origin, entry = "docs", i18n = null, sear
|
|
|
775
797
|
canonicalUrlField: "url",
|
|
776
798
|
breadcrumbType: "BreadcrumbList"
|
|
777
799
|
},
|
|
800
|
+
openapi: {
|
|
801
|
+
enabled: openapiConfig.enabled,
|
|
802
|
+
url: openapiConfig.url ?? null,
|
|
803
|
+
source: openapiConfig.source ?? null,
|
|
804
|
+
specUrl: openapiConfig.specUrl ?? null,
|
|
805
|
+
apiReferencePath: openapiConfig.apiReferencePath ?? null,
|
|
806
|
+
format: "OpenAPI 3.1"
|
|
807
|
+
},
|
|
778
808
|
search: {
|
|
779
809
|
enabled: searchEnabled,
|
|
780
810
|
endpoint: `${DEFAULT_DOCS_API_ROUTE}?query={query}`,
|
|
@@ -818,6 +848,7 @@ function buildDocsAgentDiscoverySpec({ origin, entry = "docs", i18n = null, sear
|
|
|
818
848
|
instructions: {
|
|
819
849
|
preferMarkdownRoutes: true,
|
|
820
850
|
useMcpWhenAvailable: true,
|
|
851
|
+
useOpenApiWhenAvailable: true,
|
|
821
852
|
readFeedbackSchemaBeforeSubmitting: true,
|
|
822
853
|
doNotAssumeFeedbackPayloadShape: true
|
|
823
854
|
}
|
|
@@ -855,6 +886,22 @@ function isRobotsDiscoveryEnabled(robots) {
|
|
|
855
886
|
if (robots && typeof robots === "object" && robots.enabled === false) return false;
|
|
856
887
|
return true;
|
|
857
888
|
}
|
|
889
|
+
function resolveDocsOpenApiDiscoveryConfig(openapi) {
|
|
890
|
+
if (openapi === false || openapi === void 0) return { enabled: false };
|
|
891
|
+
if (openapi === true) return {
|
|
892
|
+
enabled: true,
|
|
893
|
+
url: DEFAULT_OPENAPI_SCHEMA_ROUTE,
|
|
894
|
+
source: "generated"
|
|
895
|
+
};
|
|
896
|
+
if (openapi.enabled === false) return { enabled: false };
|
|
897
|
+
return {
|
|
898
|
+
enabled: true,
|
|
899
|
+
url: openapi.url ?? DEFAULT_OPENAPI_SCHEMA_ROUTE,
|
|
900
|
+
source: openapi.source ?? "generated",
|
|
901
|
+
specUrl: openapi.specUrl,
|
|
902
|
+
apiReferencePath: openapi.apiReferencePath
|
|
903
|
+
};
|
|
904
|
+
}
|
|
858
905
|
function compactSkillText(value) {
|
|
859
906
|
return value.replace(/\s+/g, " ").trim();
|
|
860
907
|
}
|
|
@@ -1051,4 +1098,4 @@ function analyzeDocsRobotsTxt(content, options = {}) {
|
|
|
1051
1098
|
}
|
|
1052
1099
|
|
|
1053
1100
|
//#endregion
|
|
1054
|
-
export {
|
|
1101
|
+
export { resolveDocsAgentMdxContent as $, DOCS_MARKDOWN_SIGNATURE_AGENT_HEADER as A, isDocsMcpRequest as B, DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE as C, DEFAULT_OPENAPI_SCHEMA_ROUTE as D, DEFAULT_MCP_WELL_KNOWN_ROUTE as E, getDocsMarkdownCanonicalLinkHeader as F, normalizeDocsUrlPath as G, isDocsSkillRequest as H, getDocsMarkdownVaryHeader as I, renderDocsMarkdownDocument as J, parseDocsAgentFeedbackData as K, hasDocsMarkdownSignatureAgent as L, buildDocsAgentFeedbackSchema as M, findDocsMarkdownPage as N, DEFAULT_SKILL_MD_ROUTE as O, getDocsLlmsTxtMaxCharsIssue as P, resolveDocsAgentFeedbackRequest as Q, isDocsAgentDiscoveryRequest as R, DEFAULT_LLMS_TXT_ROUTE as S, DEFAULT_MCP_ROUTE as T, matchesDocsLlmsTxtSection as U, isDocsPublicGetRequest as V, normalizeDocsPathSegment as W, renderDocsSkillDocument as X, renderDocsMarkdownNotFound as Y, resolveDocsAgentFeedbackConfig as Z, DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE as _, analyzeDocsRobotsTxt as a, resolveDocsOpenApiDiscoveryConfig as at, DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE as b, renderDocsRobotsGeneratedBlock as c, toDocsMarkdownUrl as ct, resolveDocsRobotsRequest as d, resolveDocsLlmsTxtFormat as et, upsertDocsRobotsGeneratedBlock as f, DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE as g, DEFAULT_AGENT_SPEC_ROUTE as h, DOCS_ROBOTS_GENERATED_BLOCK_START as i, resolveDocsMarkdownRequest as it, buildDocsAgentDiscoverySpec as j, DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE as k, renderDocsRobotsTxt as l, validateDocsAgentFeedbackPayload as lt, DEFAULT_AGENT_FEEDBACK_ROUTE as m, DEFAULT_ROBOTS_TXT_ROUTE as n, resolveDocsLlmsTxtSections as nt, createDocsRobotsResponse as o, resolveDocsSkillFormat as ot, DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA as p, renderDocsLlmsTxt as q, DOCS_ROBOTS_GENERATED_BLOCK_END as r, resolveDocsMarkdownCanonicalUrl as rt, getDocsRobotsAllowRoutes as s, selectDocsLlmsTxtContent as st, DEFAULT_DOCS_AI_ROBOTS_USER_AGENTS as t, resolveDocsLlmsTxtRequest as tt, resolveDocsRobotsConfig as u, DEFAULT_DOCS_API_ROUTE as v, DEFAULT_MCP_PUBLIC_ROUTE as w, DEFAULT_LLMS_TXT_MAX_CHARS as x, DEFAULT_LLMS_FULL_TXT_ROUTE as y, isDocsLlmsTxtPublicRequest as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
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 { 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-C3KeCl0S.mjs";
|
|
2
2
|
import { d as readTopLevelStringProperty, f as resolveDocsConfigPath, i as loadDocsConfigModule, o as readBooleanProperty, t as extractNestedObjectLiteral, u as readStringProperty } from "./config-UI31_wlO.mjs";
|
|
3
3
|
import { t as detectFramework } from "./utils-AmYxHDoz.mjs";
|
|
4
4
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as buildDocsSearchDocuments, r as createAlgoliaSearchAdapter, s as createTypesenseSearchAdapter } from "./search-BL7o2rXk.mjs";
|
|
2
|
-
import "./sitemap-server-
|
|
2
|
+
import "./sitemap-server-C4TbbCmY.mjs";
|
|
3
3
|
import { createFilesystemDocsMcpSource } from "./mcp.mjs";
|
|
4
4
|
import "./server.mjs";
|
|
5
5
|
import { a as loadProjectEnv, d as readTopLevelStringProperty, f as resolveDocsConfigPath, p as resolveDocsContentDir } from "./config-UI31_wlO.mjs";
|
package/dist/server.d.mts
CHANGED
|
@@ -23,6 +23,13 @@ interface ResolvedApiReferenceConfig {
|
|
|
23
23
|
routeRoot: string;
|
|
24
24
|
exclude: string[];
|
|
25
25
|
}
|
|
26
|
+
interface ApiReferenceOpenApiDiscovery {
|
|
27
|
+
enabled: boolean;
|
|
28
|
+
url?: string;
|
|
29
|
+
source?: "generated" | "configured";
|
|
30
|
+
specUrl?: string;
|
|
31
|
+
apiReferencePath?: string;
|
|
32
|
+
}
|
|
26
33
|
interface BuildApiReferenceOptions {
|
|
27
34
|
framework: ApiReferenceFramework;
|
|
28
35
|
rootDir?: string;
|
|
@@ -31,8 +38,13 @@ interface BuildApiReferenceOptions {
|
|
|
31
38
|
interface BuildApiReferenceHtmlOptions extends BuildApiReferenceOptions {
|
|
32
39
|
title?: string;
|
|
33
40
|
}
|
|
41
|
+
declare const DEFAULT_API_REFERENCE_OPENAPI_ROUTE = "/api/docs?format=openapi";
|
|
34
42
|
declare function resolveApiReferenceConfig(value: DocsConfig["apiReference"]): ResolvedApiReferenceConfig;
|
|
35
43
|
declare function resolveApiReferenceRenderer(value: DocsConfig["apiReference"], framework: ApiReferenceFramework): ApiReferenceRenderer;
|
|
44
|
+
declare function resolveApiReferenceOpenApiDiscovery(value: DocsConfig["apiReference"], options?: {
|
|
45
|
+
route?: string;
|
|
46
|
+
}): ApiReferenceOpenApiDiscovery;
|
|
47
|
+
declare function isApiReferenceOpenApiRequest(url: URL): boolean;
|
|
36
48
|
declare function buildApiReferencePageTitle(config: DocsConfig, title?: string): string;
|
|
37
49
|
declare function buildApiReferenceScalarCss(config: DocsConfig): string;
|
|
38
50
|
declare function buildApiReferenceOpenApiDocument(config: DocsConfig, options: BuildApiReferenceOptions): Record<string, unknown>;
|
|
@@ -66,4 +78,4 @@ declare function sanitizePromptText(text: string): string;
|
|
|
66
78
|
//#region src/sitemap-server.d.ts
|
|
67
79
|
declare function readDocsSitemapManifest(rootDir: string, sitemap?: boolean | DocsSitemapConfig): DocsSitemapManifest | null;
|
|
68
80
|
//#endregion
|
|
69
|
-
export { type ApiReferenceFramework, type ApiReferenceRenderer, type ApiReferenceRoute, DEFAULT_PROMPT_PROVIDER_TEMPLATES, DEFAULT_SITEMAP_MANIFEST_PATH, DEFAULT_SITEMAP_MD_ROUTE, DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, DEFAULT_SITEMAP_XML_ROUTE, DOCS_AGENT_TRACE_EVENT_TYPES, type DocsAgentTraceContext, type DocsAgentTraceEventInput, type DocsAgentTraceEventType, type DocsAgentTraceStatus, type DocsAnalyticsConfig, type DocsAnalyticsEvent, type DocsAnalyticsEventInput, type DocsAskAIFeedbackConfig, type DocsAskAIFeedbackData, type DocsAskAIFeedbackMessage, type DocsAskAIFeedbackValue, type DocsAskAIMcpConfig, type DocsCloudAnalyticsOptions, type DocsMcpHttpHandlers, type DocsMcpNavigationNode, type DocsMcpNavigationTree, type DocsMcpPage, type DocsMcpResolvedConfig, type DocsMcpSource, type DocsObservabilityConfig, type DocsObservabilityEvent, type DocsObservabilityEventInput, type DocsSearchAdapter, type DocsSearchAdapterContext, type DocsSearchAdapterFactory, type DocsSearchConfig, type DocsSearchDocument, type DocsSearchQuery, type DocsSearchResult, type DocsSearchSourcePage, type DocsSitemapFormat, type DocsSitemapManifest, type DocsSitemapManifestPage, type DocsSitemapPageInput, type DocsSitemapResolvedConfig, type McpDocsSearchConfig, type PromptAction, type PromptProviderChoice, type ResolvedApiReferenceConfig, type ResolvedDocsAnalyticsConfig, type ResolvedDocsObservabilityConfig, type SerializedOpenDocsProvider, buildApiReferenceHtmlDocument, buildApiReferenceHtmlDocumentAsync, buildApiReferenceOpenApiDocument, buildApiReferenceOpenApiDocumentAsync, buildApiReferencePageTitle, buildApiReferenceScalarCss, buildDocsAskAIContext, buildDocsSearchDocuments, buildDocsSitemapManifest, createAlgoliaSearchAdapter, createCustomSearchAdapter, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsCloudAnalytics, createDocsMcpHttpHandler, createDocsMcpServer, createDocsSitemapResponse, createFilesystemDocsMcpSource, createMcpSearchAdapter, createSimpleSearchAdapter, createTypesenseSearchAdapter, emitDocsAgentTraceEvent, emitDocsAnalyticsEvent, emitDocsObservabilityEvent, formatDocsAskAIPackageHints, inferDocsAskAIPackageHints, normalizeDocsMcpRoute, normalizePromptProviderName, parsePromptStringArray, performDocsSearch, readDocsSitemapManifest, readDocsSitemapManifestFromContentMap, renderDocsSitemapMarkdown, renderDocsSitemapXml, resolveApiReferenceConfig, resolveApiReferenceRenderer, resolveAskAISearchRequestConfig, resolveDocsAnalyticsConfig, resolveDocsMcpConfig, resolveDocsObservabilityConfig, resolveDocsSitemapConfig, resolveDocsSitemapPageLastmod, resolveDocsSitemapRequest, resolvePromptProviderChoices, resolveSearchRequestConfig, runDocsMcpStdio, sanitizePromptText, serializeDocsIcon, serializeDocsIconRegistry, serializeOpenDocsProviders, toDocsSitemapMarkdownUrl };
|
|
81
|
+
export { type ApiReferenceFramework, type ApiReferenceOpenApiDiscovery, type ApiReferenceRenderer, type ApiReferenceRoute, DEFAULT_API_REFERENCE_OPENAPI_ROUTE, DEFAULT_PROMPT_PROVIDER_TEMPLATES, DEFAULT_SITEMAP_MANIFEST_PATH, DEFAULT_SITEMAP_MD_ROUTE, DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, DEFAULT_SITEMAP_XML_ROUTE, DOCS_AGENT_TRACE_EVENT_TYPES, type DocsAgentTraceContext, type DocsAgentTraceEventInput, type DocsAgentTraceEventType, type DocsAgentTraceStatus, type DocsAnalyticsConfig, type DocsAnalyticsEvent, type DocsAnalyticsEventInput, type DocsAskAIFeedbackConfig, type DocsAskAIFeedbackData, type DocsAskAIFeedbackMessage, type DocsAskAIFeedbackValue, type DocsAskAIMcpConfig, type DocsCloudAnalyticsOptions, type DocsMcpHttpHandlers, type DocsMcpNavigationNode, type DocsMcpNavigationTree, type DocsMcpPage, type DocsMcpResolvedConfig, type DocsMcpSource, type DocsObservabilityConfig, type DocsObservabilityEvent, type DocsObservabilityEventInput, type DocsSearchAdapter, type DocsSearchAdapterContext, type DocsSearchAdapterFactory, type DocsSearchConfig, type DocsSearchDocument, type DocsSearchQuery, type DocsSearchResult, type DocsSearchSourcePage, type DocsSitemapFormat, type DocsSitemapManifest, type DocsSitemapManifestPage, type DocsSitemapPageInput, type DocsSitemapResolvedConfig, type McpDocsSearchConfig, type PromptAction, type PromptProviderChoice, type ResolvedApiReferenceConfig, type ResolvedDocsAnalyticsConfig, type ResolvedDocsObservabilityConfig, type SerializedOpenDocsProvider, buildApiReferenceHtmlDocument, buildApiReferenceHtmlDocumentAsync, buildApiReferenceOpenApiDocument, buildApiReferenceOpenApiDocumentAsync, buildApiReferencePageTitle, buildApiReferenceScalarCss, buildDocsAskAIContext, buildDocsSearchDocuments, buildDocsSitemapManifest, createAlgoliaSearchAdapter, createCustomSearchAdapter, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsCloudAnalytics, createDocsMcpHttpHandler, createDocsMcpServer, createDocsSitemapResponse, createFilesystemDocsMcpSource, createMcpSearchAdapter, createSimpleSearchAdapter, createTypesenseSearchAdapter, emitDocsAgentTraceEvent, emitDocsAnalyticsEvent, emitDocsObservabilityEvent, formatDocsAskAIPackageHints, inferDocsAskAIPackageHints, isApiReferenceOpenApiRequest, normalizeDocsMcpRoute, normalizePromptProviderName, parsePromptStringArray, performDocsSearch, readDocsSitemapManifest, readDocsSitemapManifestFromContentMap, renderDocsSitemapMarkdown, renderDocsSitemapXml, resolveApiReferenceConfig, resolveApiReferenceOpenApiDiscovery, resolveApiReferenceRenderer, resolveAskAISearchRequestConfig, resolveDocsAnalyticsConfig, resolveDocsMcpConfig, resolveDocsObservabilityConfig, resolveDocsSitemapConfig, resolveDocsSitemapPageLastmod, resolveDocsSitemapRequest, resolvePromptProviderChoices, resolveSearchRequestConfig, runDocsMcpStdio, sanitizePromptText, serializeDocsIcon, serializeDocsIconRegistry, serializeOpenDocsProviders, toDocsSitemapMarkdownUrl };
|
package/dist/server.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { A as resolveDocsAnalyticsConfig, D as emitDocsAgentTraceEvent, E as createDocsAgentTraceId, M as createDocsCloudAnalytics, O as emitDocsAnalyticsEvent, T as createDocsAgentTraceContext, a as createMcpSearchAdapter, c as formatDocsAskAIPackageHints, d as resolveAskAISearchRequestConfig, f as resolveSearchRequestConfig, i as createCustomSearchAdapter, j as resolveDocsObservabilityConfig, k as emitDocsObservabilityEvent, l as inferDocsAskAIPackageHints, n as buildDocsSearchDocuments, o as createSimpleSearchAdapter, r as createAlgoliaSearchAdapter, s as createTypesenseSearchAdapter, t as buildDocsAskAIContext, u as performDocsSearch, w as DOCS_AGENT_TRACE_EVENT_TYPES } from "./search-BL7o2rXk.mjs";
|
|
2
2
|
import { a as buildDocsSitemapManifest, c as renderDocsSitemapMarkdown, d as resolveDocsSitemapPageLastmod, f as resolveDocsSitemapRequest, i as DEFAULT_SITEMAP_XML_ROUTE, l as renderDocsSitemapXml, n as DEFAULT_SITEMAP_MD_ROUTE, o as createDocsSitemapResponse, p as toDocsSitemapMarkdownUrl, r as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, s as readDocsSitemapManifestFromContentMap, t as DEFAULT_SITEMAP_MANIFEST_PATH, u as resolveDocsSitemapConfig } from "./sitemap-CnqcTdQg.mjs";
|
|
3
|
-
import { _ as
|
|
3
|
+
import { _ as isApiReferenceOpenApiRequest, a as resolvePromptProviderChoices, b as resolveApiReferenceRenderer, c as serializeDocsIconRegistry, d as buildApiReferenceHtmlDocument, f as buildApiReferenceHtmlDocumentAsync, g as buildApiReferenceScalarCss, h as buildApiReferencePageTitle, i as parsePromptStringArray, l as serializeOpenDocsProviders, m as buildApiReferenceOpenApiDocumentAsync, n as DEFAULT_PROMPT_PROVIDER_TEMPLATES, o as sanitizePromptText, p as buildApiReferenceOpenApiDocument, r as normalizePromptProviderName, s as serializeDocsIcon, t as readDocsSitemapManifest, u as DEFAULT_API_REFERENCE_OPENAPI_ROUTE, v as resolveApiReferenceConfig, y as resolveApiReferenceOpenApiDiscovery } from "./sitemap-server-C4TbbCmY.mjs";
|
|
4
4
|
import { createDocsMcpHttpHandler, createDocsMcpServer, createFilesystemDocsMcpSource, normalizeDocsMcpRoute, resolveDocsMcpConfig, runDocsMcpStdio } from "./mcp.mjs";
|
|
5
5
|
|
|
6
|
-
export { DEFAULT_PROMPT_PROVIDER_TEMPLATES, DEFAULT_SITEMAP_MANIFEST_PATH, DEFAULT_SITEMAP_MD_ROUTE, DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, DEFAULT_SITEMAP_XML_ROUTE, DOCS_AGENT_TRACE_EVENT_TYPES, buildApiReferenceHtmlDocument, buildApiReferenceHtmlDocumentAsync, buildApiReferenceOpenApiDocument, buildApiReferenceOpenApiDocumentAsync, buildApiReferencePageTitle, buildApiReferenceScalarCss, buildDocsAskAIContext, buildDocsSearchDocuments, buildDocsSitemapManifest, createAlgoliaSearchAdapter, createCustomSearchAdapter, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsCloudAnalytics, createDocsMcpHttpHandler, createDocsMcpServer, createDocsSitemapResponse, createFilesystemDocsMcpSource, createMcpSearchAdapter, createSimpleSearchAdapter, createTypesenseSearchAdapter, emitDocsAgentTraceEvent, emitDocsAnalyticsEvent, emitDocsObservabilityEvent, formatDocsAskAIPackageHints, inferDocsAskAIPackageHints, normalizeDocsMcpRoute, normalizePromptProviderName, parsePromptStringArray, performDocsSearch, readDocsSitemapManifest, readDocsSitemapManifestFromContentMap, renderDocsSitemapMarkdown, renderDocsSitemapXml, resolveApiReferenceConfig, resolveApiReferenceRenderer, resolveAskAISearchRequestConfig, resolveDocsAnalyticsConfig, resolveDocsMcpConfig, resolveDocsObservabilityConfig, resolveDocsSitemapConfig, resolveDocsSitemapPageLastmod, resolveDocsSitemapRequest, resolvePromptProviderChoices, resolveSearchRequestConfig, runDocsMcpStdio, sanitizePromptText, serializeDocsIcon, serializeDocsIconRegistry, serializeOpenDocsProviders, toDocsSitemapMarkdownUrl };
|
|
6
|
+
export { DEFAULT_API_REFERENCE_OPENAPI_ROUTE, DEFAULT_PROMPT_PROVIDER_TEMPLATES, DEFAULT_SITEMAP_MANIFEST_PATH, DEFAULT_SITEMAP_MD_ROUTE, DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, DEFAULT_SITEMAP_XML_ROUTE, DOCS_AGENT_TRACE_EVENT_TYPES, buildApiReferenceHtmlDocument, buildApiReferenceHtmlDocumentAsync, buildApiReferenceOpenApiDocument, buildApiReferenceOpenApiDocumentAsync, buildApiReferencePageTitle, buildApiReferenceScalarCss, buildDocsAskAIContext, buildDocsSearchDocuments, buildDocsSitemapManifest, createAlgoliaSearchAdapter, createCustomSearchAdapter, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsCloudAnalytics, createDocsMcpHttpHandler, createDocsMcpServer, createDocsSitemapResponse, createFilesystemDocsMcpSource, createMcpSearchAdapter, createSimpleSearchAdapter, createTypesenseSearchAdapter, emitDocsAgentTraceEvent, emitDocsAnalyticsEvent, emitDocsObservabilityEvent, formatDocsAskAIPackageHints, inferDocsAskAIPackageHints, isApiReferenceOpenApiRequest, normalizeDocsMcpRoute, normalizePromptProviderName, parsePromptStringArray, performDocsSearch, readDocsSitemapManifest, readDocsSitemapManifestFromContentMap, renderDocsSitemapMarkdown, renderDocsSitemapXml, resolveApiReferenceConfig, resolveApiReferenceOpenApiDiscovery, resolveApiReferenceRenderer, resolveAskAISearchRequestConfig, resolveDocsAnalyticsConfig, resolveDocsMcpConfig, resolveDocsObservabilityConfig, resolveDocsSitemapConfig, resolveDocsSitemapPageLastmod, resolveDocsSitemapRequest, resolvePromptProviderChoices, resolveSearchRequestConfig, runDocsMcpStdio, sanitizePromptText, serializeDocsIcon, serializeDocsIconRegistry, serializeOpenDocsProviders, toDocsSitemapMarkdownUrl };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./search-BL7o2rXk.mjs";
|
|
2
2
|
import { a as buildDocsSitemapManifest, c as renderDocsSitemapMarkdown, l as renderDocsSitemapXml, u as resolveDocsSitemapConfig } from "./sitemap-CnqcTdQg.mjs";
|
|
3
|
-
import "./sitemap-server-
|
|
3
|
+
import "./sitemap-server-C4TbbCmY.mjs";
|
|
4
4
|
import { createFilesystemDocsMcpSource } from "./mcp.mjs";
|
|
5
5
|
import "./server.mjs";
|
|
6
6
|
import { c as readNavTitle, d as readTopLevelStringProperty, f as resolveDocsConfigPath, i as loadDocsConfigModule, o as readBooleanProperty, p as resolveDocsContentDir, t as extractNestedObjectLiteral, u as readStringProperty } from "./config-UI31_wlO.mjs";
|
|
@@ -20,6 +20,7 @@ const METHOD_NAMES = [
|
|
|
20
20
|
"OPTIONS",
|
|
21
21
|
"HEAD"
|
|
22
22
|
];
|
|
23
|
+
const DEFAULT_API_REFERENCE_OPENAPI_ROUTE = "/api/docs?format=openapi";
|
|
23
24
|
function normalizePathSegment(value) {
|
|
24
25
|
return value.replace(/^\/+|\/+$/g, "");
|
|
25
26
|
}
|
|
@@ -57,6 +58,20 @@ function resolveApiReferenceRenderer(value, framework) {
|
|
|
57
58
|
if (config.renderer) return config.renderer;
|
|
58
59
|
return framework === "next" ? "fumadocs" : "scalar";
|
|
59
60
|
}
|
|
61
|
+
function resolveApiReferenceOpenApiDiscovery(value, options = {}) {
|
|
62
|
+
const config = resolveApiReferenceConfig(value);
|
|
63
|
+
if (!config.enabled) return { enabled: false };
|
|
64
|
+
return {
|
|
65
|
+
enabled: true,
|
|
66
|
+
url: options.route ?? DEFAULT_API_REFERENCE_OPENAPI_ROUTE,
|
|
67
|
+
source: config.specUrl ? "configured" : "generated",
|
|
68
|
+
specUrl: config.specUrl,
|
|
69
|
+
apiReferencePath: `/${config.path}`
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
function isApiReferenceOpenApiRequest(url) {
|
|
73
|
+
return url.searchParams.get("format")?.trim() === "openapi";
|
|
74
|
+
}
|
|
60
75
|
function normalizeRemoteSpecUrl(value) {
|
|
61
76
|
const trimmed = value?.trim();
|
|
62
77
|
if (!trimmed) return void 0;
|
|
@@ -997,4 +1012,4 @@ function readDocsSitemapManifest(rootDir, sitemap) {
|
|
|
997
1012
|
}
|
|
998
1013
|
|
|
999
1014
|
//#endregion
|
|
1000
|
-
export {
|
|
1015
|
+
export { isApiReferenceOpenApiRequest as _, resolvePromptProviderChoices as a, resolveApiReferenceRenderer as b, serializeDocsIconRegistry as c, buildApiReferenceHtmlDocument as d, buildApiReferenceHtmlDocumentAsync as f, buildApiReferenceScalarCss as g, buildApiReferencePageTitle as h, parsePromptStringArray as i, serializeOpenDocsProviders as l, buildApiReferenceOpenApiDocumentAsync as m, DEFAULT_PROMPT_PROVIDER_TEMPLATES as n, sanitizePromptText as o, buildApiReferenceOpenApiDocument as p, normalizePromptProviderName as r, serializeDocsIcon as s, readDocsSitemapManifest as t, DEFAULT_API_REFERENCE_OPENAPI_ROUTE as u, resolveApiReferenceConfig as v, resolveApiReferenceOpenApiDiscovery as y };
|