import { $ as DocsObservabilityEventInput, At as McpDocsSearchConfig, Gt as ResolvedDocsRelatedLink, It as OpenDocsTarget, Nt as OpenDocsProvider, Q as DocsObservabilityEvent, Z as DocsObservabilityConfig, _ as DocsAnalyticsConfig, _t as DocsSearchResult, bt as DocsSitemapConfig, d as CustomDocsSearchConfig, dt as DocsSearchAdapterFactory, ft as DocsSearchChunkingConfig, k as DocsAskAIMcpConfig, lt as DocsSearchAdapter, m as DocsAgentTraceEventInput, mt as DocsSearchDocument, pt as DocsSearchConfig, r as AlgoliaDocsSearchConfig, tn as TypesenseDocsSearchConfig, v as DocsAnalyticsEvent, y as DocsAnalyticsEventInput, yt as DocsSearchSourcePage } from "./types-DooUSWkW.mjs"; //#region src/analytics.d.ts declare const DOCS_AGENT_TRACE_EVENT_TYPES: readonly ["run.start", "run.end", "run.error", "user.input", "prompt.build", "retrieval.query", "retrieval.result", "retrieval.error", "model.call", "model.response", "model.stream", "model.error", "tool.call", "tool.result", "tool.error", "retry", "timeout", "error", "agent.final"]; interface DocsAgentTraceContext { traceId: string; name: string; startedAt: string; startedMs: number; } interface ResolvedDocsAnalyticsConfig { enabled: boolean; console: false | "log" | "info" | "debug"; includeInputs: boolean; onEvent?: (event: DocsAnalyticsEvent) => void | Promise; } interface ResolvedDocsObservabilityConfig { enabled: boolean; console: false | "log" | "info" | "debug"; includeInputs: boolean; onEvent?: (event: DocsObservabilityEvent) => void | Promise; } declare function createDocsAgentTraceId(prefix?: string): string; declare function createDocsAgentTraceContext(name?: string): DocsAgentTraceContext; declare function getDocsRequestAnalyticsProperties(request: Request): Record; declare function resolveDocsAnalyticsConfig(analytics?: boolean | DocsAnalyticsConfig): ResolvedDocsAnalyticsConfig; declare function resolveDocsObservabilityConfig(observability?: boolean | DocsObservabilityConfig): ResolvedDocsObservabilityConfig; declare function emitDocsAnalyticsEvent(analytics: boolean | DocsAnalyticsConfig | undefined, event: DocsAnalyticsEventInput): Promise; declare function emitDocsObservabilityEvent(observability: boolean | DocsObservabilityConfig | undefined, event: DocsObservabilityEventInput): Promise; declare function emitDocsAgentTraceEvent(observability: boolean | DocsObservabilityConfig | undefined, event: DocsAgentTraceEventInput): Promise; //#endregion //#region src/prompt-utils.d.ts type PromptAction = "copy" | "open"; interface SerializedOpenDocsProvider { name: string; iconHtml?: string; urlTemplate: string; promptUrlTemplate?: string; target?: OpenDocsTarget; prompt?: string; } interface PromptProviderChoice { name: string; iconHtml?: string; urlTemplate: string; } type PromptProviderInput = Pick & Partial>; interface SerializeOpenDocsProviderOptions { target?: OpenDocsTarget; prompt?: string; } declare const DEFAULT_PROMPT_PROVIDER_TEMPLATES: Record; declare const DEFAULT_OPEN_DOCS_TARGET: OpenDocsTarget; declare const DEFAULT_OPEN_DOCS_PROMPT = "Read this documentation: {url}"; declare const DEFAULT_OPEN_DOCS_PROVIDER_IDS: readonly ["chatgpt", "claude"]; declare function normalizePromptProviderName(name: string): string; declare function serializeDocsIcon(icon: unknown): string | undefined; declare function serializeDocsIconRegistry(icons?: Record): Record | undefined; declare function serializeOpenDocsProviders(providers?: OpenDocsProvider[], options?: SerializeOpenDocsProviderOptions): SerializedOpenDocsProvider[] | undefined; declare function serializeOpenDocsProvider(provider: OpenDocsProvider, options?: SerializeOpenDocsProviderOptions): SerializedOpenDocsProvider | undefined; declare function parsePromptStringArray(value: unknown): string[] | undefined; declare function resolvePromptProviderChoices(availableProviders?: PromptProviderInput[], preferredNames?: string[]): PromptProviderChoice[]; declare function sanitizePromptText(text: string): string; //#endregion //#region src/sitemap.d.ts declare const DEFAULT_SITEMAP_XML_ROUTE = "/sitemap.xml"; declare const DEFAULT_SITEMAP_MD_ROUTE = "/sitemap.md"; declare const DEFAULT_SITEMAP_MD_DOCS_ROUTE = "/docs/sitemap.md"; declare const DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE = "/.well-known/sitemap.md"; declare const DEFAULT_SITEMAP_MANIFEST_PATH = ".farming-labs/sitemap-manifest.json"; type DocsSitemapFormat = "xml" | "markdown"; interface DocsSitemapPageInput { slug?: string; url: string; title: string; description?: string; related?: ResolvedDocsRelatedLink[]; sourcePath?: string; lastmod?: string; lastModified?: string; } interface DocsSitemapManifestPage { url: string; absoluteUrl?: string; markdownUrl: string; title: string; description?: string; sourcePath?: string; lastmod?: string; lastmodSource?: "git" | "filesystem" | "frontmatter" | "manifest" | "unknown"; related?: string[]; } interface DocsSitemapManifest { version: 1; generatedAt: string; baseUrl?: string; entry: string; siteTitle?: string; pages: DocsSitemapManifestPage[]; } interface DocsSitemapResolvedConfig { enabled: boolean; routePrefix: string; baseUrl?: string; manifestPath: string; xml: { enabled: boolean; includeLastmod: boolean; route: string; }; markdown: { enabled: boolean; includeDescriptions: boolean; includeLastmod: boolean; linkTarget: "html" | "markdown" | "both"; route: string; docsRoute?: string; wellKnownRoute: string; }; } interface CreateDocsSitemapResponseOptions { request: Request; sitemap?: boolean | DocsSitemapConfig; entry?: string; siteTitle?: string; baseUrl?: string; pages: DocsSitemapPageInput[]; manifest?: DocsSitemapManifest | null; } declare function resolveDocsSitemapConfig(sitemap?: boolean | DocsSitemapConfig, defaults?: { baseUrl?: string; }): DocsSitemapResolvedConfig; declare function resolveDocsSitemapRequest(url: URL, sitemap?: boolean | DocsSitemapConfig): DocsSitemapFormat | null; declare function toDocsSitemapMarkdownUrl(url: string): string; declare function buildDocsSitemapManifest(options: { pages: DocsSitemapPageInput[]; entry?: string; siteTitle?: string; baseUrl?: string; generatedAt?: string; resolveLastmod?: (page: DocsSitemapPageInput) => { lastmod?: string; lastmodSource?: DocsSitemapManifestPage["lastmodSource"]; } | undefined; }): DocsSitemapManifest; declare function renderDocsSitemapXml(manifest: DocsSitemapManifest, options?: { baseUrl?: string; includeLastmod?: boolean; }): string; declare function renderDocsSitemapMarkdown(manifest: DocsSitemapManifest, options?: { baseUrl?: string; includeDescriptions?: boolean; includeLastmod?: boolean; linkTarget?: "html" | "markdown" | "both"; }): string; declare function readDocsSitemapManifestFromContentMap(contentMap?: Record | null): DocsSitemapManifest | null; declare function resolveDocsSitemapPageLastmod(manifest: DocsSitemapManifest | null | undefined, url: string): string | undefined; declare function createDocsSitemapResponse({ request, sitemap, entry, siteTitle, baseUrl, pages, manifest }: CreateDocsSitemapResponseOptions): Response | null; //#endregion //#region src/search.d.ts interface DocsAskAIContextResult extends DocsSearchResult { title: string; contextContent: string; } interface DocsAskAIContext { context: string; results: DocsAskAIContextResult[]; searchResults: DocsSearchResult[]; packageHints: DocsAskAIPackageHints; } interface DocsAskAIPackageHints { packages: string[]; imports: string[]; installCommands: string[]; } declare function inferDocsAskAIPackageHints(content: string): DocsAskAIPackageHints; declare function formatDocsAskAIPackageHints(hints: DocsAskAIPackageHints, packageName?: string): string | undefined; declare function buildDocsSearchDocuments(pages: DocsSearchSourcePage[], chunking?: DocsSearchChunkingConfig): DocsSearchDocument[]; declare function createSimpleSearchAdapter(): DocsSearchAdapter; declare function createTypesenseSearchAdapter(config: TypesenseDocsSearchConfig): DocsSearchAdapter; declare function resolveSearchRequestConfig(search: boolean | DocsSearchConfig | undefined, requestUrl?: string): boolean | DocsSearchConfig | undefined; declare function resolveAskAISearchRequestConfig(options: { search: boolean | DocsSearchConfig | undefined; useMcp?: boolean | DocsAskAIMcpConfig; mcpEndpoint?: string; mcpEnabled?: boolean; mcpSearchEnabled?: boolean; requestUrl?: string; }): boolean | DocsSearchConfig | undefined; declare function createMcpSearchAdapter(config: McpDocsSearchConfig): DocsSearchAdapter; declare function createAlgoliaSearchAdapter(config: AlgoliaDocsSearchConfig): DocsSearchAdapter; declare function performDocsSearch(options: { pages: DocsSearchSourcePage[]; query: string; search?: boolean | DocsSearchConfig; locale?: string; pathname?: string; siteTitle?: string; limit?: number; }): Promise; declare function buildDocsAskAIContext(options: { pages: DocsSearchSourcePage[]; query: string; search?: boolean | DocsSearchConfig; locale?: string; pathname?: string; siteTitle?: string; baseUrl?: string; limit?: number; maxContextChars?: number; maxResultChars?: number; }): Promise; declare function createCustomSearchAdapter(adapter: DocsSearchAdapter | DocsSearchAdapterFactory): CustomDocsSearchConfig; //#endregion export { createDocsAgentTraceId as $, resolveDocsSitemapRequest as A, normalizePromptProviderName as B, buildDocsSitemapManifest as C, renderDocsSitemapXml as D, renderDocsSitemapMarkdown as E, DEFAULT_PROMPT_PROVIDER_TEMPLATES as F, serializeDocsIconRegistry as G, resolvePromptProviderChoices as H, PromptAction as I, DOCS_AGENT_TRACE_EVENT_TYPES as J, serializeOpenDocsProvider as K, PromptProviderChoice as L, DEFAULT_OPEN_DOCS_PROMPT as M, DEFAULT_OPEN_DOCS_PROVIDER_IDS as N, resolveDocsSitemapConfig as O, DEFAULT_OPEN_DOCS_TARGET as P, createDocsAgentTraceContext as Q, SerializeOpenDocsProviderOptions as R, DocsSitemapResolvedConfig as S, readDocsSitemapManifestFromContentMap as T, sanitizePromptText as U, parsePromptStringArray as V, serializeDocsIcon as W, ResolvedDocsAnalyticsConfig as X, DocsAgentTraceContext as Y, ResolvedDocsObservabilityConfig as Z, DEFAULT_SITEMAP_XML_ROUTE as _, createMcpSearchAdapter as a, resolveDocsObservabilityConfig as at, DocsSitemapManifestPage as b, formatDocsAskAIPackageHints as c, resolveAskAISearchRequestConfig as d, emitDocsAgentTraceEvent as et, resolveSearchRequestConfig as f, DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE as g, DEFAULT_SITEMAP_MD_ROUTE as h, createCustomSearchAdapter as i, resolveDocsAnalyticsConfig as it, toDocsSitemapMarkdownUrl as j, resolveDocsSitemapPageLastmod as k, inferDocsAskAIPackageHints as l, DEFAULT_SITEMAP_MD_DOCS_ROUTE as m, buildDocsSearchDocuments as n, emitDocsObservabilityEvent as nt, createSimpleSearchAdapter as o, DEFAULT_SITEMAP_MANIFEST_PATH as p, serializeOpenDocsProviders as q, createAlgoliaSearchAdapter as r, getDocsRequestAnalyticsProperties as rt, createTypesenseSearchAdapter as s, buildDocsAskAIContext as t, emitDocsAnalyticsEvent as tt, performDocsSearch as u, DocsSitemapFormat as v, createDocsSitemapResponse as w, DocsSitemapPageInput as x, DocsSitemapManifest as y, SerializedOpenDocsProvider as z };