@farming-labs/docs 0.2.119 → 0.2.121
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/README.md +8 -0
- package/dist/access.d.mts +13 -0
- package/dist/access.mjs +56 -0
- package/dist/agent-conformance.d.mts +60 -0
- package/dist/agent-conformance.mjs +538 -0
- package/dist/agent-contract.d.mts +47 -0
- package/dist/agent-contract.mjs +645 -0
- package/dist/agent-detection.d.mts +6 -0
- package/dist/agent-detection.mjs +83 -0
- package/dist/agent-evals.d.mts +224 -0
- package/dist/{agent-evals-BLNLvXbG.mjs → agent-evals.mjs} +7 -565
- package/dist/agent-feedback-evaluations-node.mjs +38 -0
- package/dist/agent-feedback-evaluations.d.mts +91 -0
- package/dist/{agent-feedback-evaluations-CcMGlgsO.mjs → agent-feedback-evaluations.mjs} +2 -2
- package/dist/agent-feedback-loop.d.mts +45 -0
- package/dist/{agent-feedback-loop-CcZL_sb1.mjs → agent-feedback-loop.mjs} +1 -1
- package/dist/agent-maintenance.d.mts +71 -0
- package/dist/{agent-maintenance-CuZ7iAKq.mjs → agent-maintenance.mjs} +1 -1
- package/dist/agent-provenance.d.mts +23 -0
- package/dist/agent-provenance.mjs +77 -0
- package/dist/agent-scope.mjs +321 -0
- package/dist/agent-skills-archive.mjs +86 -0
- package/dist/agent-skills-bundle.d.mts +1 -1
- package/dist/{agent-skills-progressive-disclosure-PjPtTYL-.mjs → agent-skills-progressive-disclosure.mjs} +2 -2
- package/dist/{agent-skills-server-CTNWr23x.d.mts → agent-skills-server.d.mts} +3 -3
- package/dist/{agent-skills-server-BC7md56k.mjs → agent-skills-server.mjs} +2 -2
- package/dist/agent-skills-vite.d.mts +3 -3
- package/dist/agent-skills-vite.mjs +1 -2
- package/dist/agent-surface-drift.mjs +236 -0
- package/dist/{golden-evaluations-CLUViycJ.mjs → agent-usefulness.mjs} +5 -290
- package/dist/{content-change-hydration-CvHJadhE.d.mts → agent.d.mts} +10 -411
- package/dist/agent.mjs +2729 -0
- package/dist/{analytics-B8RZiKUt.d.mts → analytics.d.mts} +2 -2
- package/dist/{analytics-p8Vhhu2P.mjs → analytics.mjs} +2 -2
- package/dist/{sitemap-server-C9r22_06.d.mts → api-reference.d.mts} +3 -6
- package/dist/api-reference.mjs +1481 -0
- package/dist/{audience-exposure-DBrFWULA.d.mts → audience-exposure.d.mts} +1 -1
- package/dist/audience-exposure.mjs +8 -0
- package/dist/audience.d.mts +44 -0
- package/dist/audience.mjs +1654 -0
- package/dist/authoring-mcp.d.mts +44 -0
- package/dist/{authoring-mcp-CiCUQe3o.mjs → authoring-mcp.mjs} +3 -3
- package/dist/browser.d.mts +6 -4
- package/dist/browser.mjs +6 -7
- package/dist/build.d.mts +8 -0
- package/dist/build.mjs +8 -0
- package/dist/changelog.d.mts +20 -0
- package/dist/changelog.mjs +39 -0
- package/dist/{agent-export-Cxljt6RP.mjs → cli/agent-export.mjs} +19 -45
- package/dist/{agent-CYk2DxY7.mjs → cli/agent.mjs} +6 -35
- package/dist/{agents-jtn256sz.mjs → cli/agents.mjs} +5 -18
- package/dist/cli/api-doctor.mjs +206 -0
- package/dist/{authoring-C2ymvYWl.mjs → cli/authoring.mjs} +2 -8
- package/dist/{cloud-6eKrlmKd.mjs → cli/cloud.mjs} +3 -3
- package/dist/{codeblocks-CHpgAwY-.mjs → cli/codeblocks.mjs} +2 -2
- package/dist/cli/config.d.mts +11 -0
- package/dist/{config-BZnKAj_Y.mjs → cli/config.mjs} +1 -1
- package/dist/cli/dev-banner.mjs +58 -0
- package/dist/{dev-Bnn-NUNa.mjs → cli/dev.mjs} +3 -57
- package/dist/{doctor-CUMgbglt.mjs → cli/doctor.mjs} +41 -226
- package/dist/{downgrade-CHMta85e.mjs → cli/downgrade.mjs} +2 -2
- package/dist/cli/errors.d.mts +4 -0
- package/dist/{errors-BtnVLhNF.mjs → cli/errors.mjs} +1 -1
- package/dist/{feedback-evals-DMilg9pY.mjs → cli/feedback-evals.mjs} +3 -36
- package/dist/{feedback-DL4T5oIO.mjs → cli/feedback.mjs} +1 -1
- package/dist/cli/git-dates.mjs +35 -0
- package/dist/cli/golden-evaluations.mjs +52 -0
- package/dist/cli/index.d.mts +2 -3
- package/dist/cli/index.mjs +38 -38
- package/dist/{init-K0LmXDZ5.mjs → cli/init.mjs} +3 -3
- package/dist/{mcp-Bvha6_mG.mjs → cli/mcp.mjs} +7 -19
- package/dist/{openapi-diff-BOESBfnP.mjs → cli/openapi-diff.mjs} +2 -7
- package/dist/{openapi-sdk-DJutz2AC.mjs → cli/openapi-sdk.mjs} +2 -7
- package/dist/{openapi-source-CiX3hwFp.mjs → cli/openapi-source.mjs} +2 -2
- package/dist/{package-version-HJhYeq4M.mjs → cli/package-version.mjs} +2 -2
- package/dist/{propose-JmUv_BTt.mjs → cli/propose.mjs} +1 -1
- package/dist/{review-C6EmbV0l.mjs → cli/review.mjs} +16 -15
- package/dist/{robots-DteZB8vl.mjs → cli/robots.mjs} +3 -7
- package/dist/{search-DKcdZgGx.mjs → cli/search.mjs} +7 -20
- package/dist/{sitemap-CBQoERNz.mjs → cli/sitemap.mjs} +7 -42
- package/dist/{skills-a90P31sJ.mjs → cli/skills.mjs} +5 -19
- package/dist/{templates-BuQ8YsGv.mjs → cli/templates.mjs} +1 -1
- package/dist/{upgrade-DlQMOFV1.mjs → cli/upgrade.mjs} +2 -2
- package/dist/{utils-C7KDrPpA.mjs → cli/utils.mjs} +1 -1
- package/dist/client/react.d.mts +2 -18
- package/dist/client/react.mjs +1 -157
- package/dist/{cloud-analytics-D14HplI7.mjs → cloud-analytics.mjs} +1 -1
- package/dist/{cloud-ask-ai-BOahlsIZ.d.mts → cloud-ask-ai.d.mts} +2 -2
- package/dist/{cloud-ask-ai-BqKhjpS5.mjs → cloud-ask-ai.mjs} +3 -3
- package/dist/code-blocks.d.mts +51 -0
- package/dist/{code-blocks-GYdvS3BH.mjs → code-blocks.mjs} +2 -2
- package/dist/code-group-mdx.d.mts +11 -0
- package/dist/code-group-mdx.mjs +57 -0
- package/dist/content-change-hydration.d.mts +87 -0
- package/dist/{openapi-mcp-BIOTLiA7.mjs → content-change-hydration.mjs} +5 -210
- package/dist/content-changes.d.mts +47 -0
- package/dist/content-changes.mjs +216 -0
- package/dist/create-theme.d.mts +48 -0
- package/dist/create-theme.mjs +57 -0
- package/dist/date.d.mts +5 -0
- package/dist/date.mjs +17 -0
- package/dist/define-docs.d.mts +9 -0
- package/dist/define-docs.mjs +46 -0
- package/dist/docs-cloud-client.d.mts +18 -0
- package/dist/docs-cloud-client.mjs +161 -0
- package/dist/docs-cloud-server.d.mts +2 -2
- package/dist/docs-cloud-server.mjs +2 -3
- package/dist/heading-toc.d.mts +10 -0
- package/dist/heading-toc.mjs +23 -0
- package/dist/http-body.d.mts +14 -0
- package/dist/{http-body-DkAPk6D5.mjs → http-body.mjs} +1 -1
- package/dist/http-cache.d.mts +25 -0
- package/dist/http-cache.mjs +140 -0
- package/dist/http-link.mjs +81 -0
- package/dist/i18n.d.mts +18 -0
- package/dist/{i18n-B1gJ9EW0.mjs → i18n.mjs} +1 -1
- package/dist/index.d.mts +43 -675
- package/dist/index.mjs +40 -14
- package/dist/markdown-rendering.mjs +1 -1
- package/dist/markdown-section-cache.mjs +49 -0
- package/dist/markdown-sections.d.mts +47 -0
- package/dist/{markdown-sections-9Oxr33b-.mjs → markdown-sections.mjs} +29 -703
- package/dist/mcp-auth.d.mts +14 -0
- package/dist/mcp-auth.mjs +99 -0
- package/dist/mcp.d.mts +5 -3
- package/dist/mcp.mjs +39 -9
- package/dist/mdx.d.mts +6 -0
- package/dist/mdx.mjs +7 -0
- package/dist/metadata.d.mts +60 -0
- package/dist/{metadata-BOHn0Y5K.mjs → metadata.mjs} +2 -2
- package/dist/native-api-reference.mjs +968 -0
- package/dist/okf.d.mts +42 -0
- package/dist/okf.mjs +145 -0
- package/dist/openapi-contract.mjs +154 -0
- package/dist/{openapi-mcp-node-C4jUpZG6.mjs → openapi-mcp-node.mjs} +1 -1
- package/dist/openapi-mcp.d.mts +26 -0
- package/dist/openapi-mcp.mjs +132 -0
- package/dist/openapi-operations.d.mts +71 -0
- package/dist/{openapi-operations-DFpaqOqA.mjs → openapi-operations.mjs} +1 -1
- package/dist/openapi-overlays.mjs +221 -0
- package/dist/openapi-references.mjs +233 -0
- package/dist/pagination.d.mts +7 -0
- package/dist/pagination.mjs +100 -0
- package/dist/prompt-references.d.mts +12 -0
- package/dist/prompt-references.mjs +132 -0
- package/dist/prompt-utils.d.mts +36 -0
- package/dist/{prompt-utils-B5g-bv7o.mjs → prompt-utils.mjs} +1 -57
- package/dist/reading-time.d.mts +23 -0
- package/dist/reading-time.mjs +58 -0
- package/dist/related.d.mts +7 -0
- package/dist/related.mjs +50 -0
- package/dist/retrieval-digest.d.mts +16 -0
- package/dist/{retrieval-digest-CT-eIEcp.mjs → retrieval-digest.mjs} +1 -1
- package/dist/review.d.mts +69 -0
- package/dist/review.mjs +562 -0
- package/dist/robots.d.mts +54 -0
- package/dist/{robots-BYJAVeI6.mjs → robots.mjs} +5 -3
- package/dist/runtime.d.mts +3 -3
- package/dist/runtime.mjs +3 -9
- package/dist/search.d.mts +210 -0
- package/dist/search.mjs +3401 -0
- package/dist/server.d.mts +22 -198
- package/dist/server.mjs +21 -19
- package/dist/sidebar.d.mts +15 -0
- package/dist/sidebar.mjs +73 -0
- package/dist/sitemap-server.d.mts +7 -0
- package/dist/{sitemap-server-Lg3YhUx4.mjs → sitemap-server.mjs} +2 -2
- package/dist/{sitemap-DafdOrxK.d.mts → sitemap.d.mts} +3 -3
- package/dist/sitemap.mjs +254 -0
- package/dist/{standards-discovery-1fiUVDAo.d.mts → standards-discovery.d.mts} +2 -2
- package/dist/{standards-discovery-sSEojU80.mjs → standards-discovery.mjs} +3 -139
- package/dist/telemetry-runtime.d.mts +42 -0
- package/dist/telemetry-runtime.mjs +238 -0
- package/dist/telemetry.d.mts +15 -0
- package/dist/telemetry.mjs +117 -0
- package/dist/{types-BncG8J3g.d.mts → types.d.mts} +21 -3
- package/dist/urls.d.mts +7 -0
- package/dist/urls.mjs +21 -0
- package/dist/utils.d.mts +8 -0
- package/dist/utils.mjs +22 -0
- package/package.json +21 -3
- package/dist/agent-DkAidqtV.mjs +0 -9026
- package/dist/api-reference-By_LokQ-.mjs +0 -3033
- package/dist/prompt-references-DMgbu_dz.mjs +0 -1082
- package/dist/retrieval-digest-DLAQsQmx.d.mts +0 -367
- package/dist/sidebar-C2LKcU7n.d.mts +0 -63
- package/dist/sidebar-CFHBj29f.mjs +0 -421
- /package/dist/{openapi-CfCzX_a1.mjs → cli/openapi.mjs} +0 -0
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { AlgoliaDocsSearchConfig, CustomDocsSearchConfig, DocsAccessPrincipal, DocsAskAIMcpConfig, DocsContentSnapshot, DocsPaginatedSearchResponse, DocsSearchAdapter, DocsSearchAdapterFactory, DocsSearchChunkingConfig, DocsSearchConfig, DocsSearchDocument, DocsSearchFacetsResponse, DocsSearchFilterField, DocsSearchFilterInput, DocsSearchFilters, DocsSearchRequest, DocsSearchResult, DocsSearchSourcePage, McpDocsSearchConfig, TypesenseDocsSearchConfig } from "./types.mjs";
|
|
2
|
+
import { DocsContentAudience } from "./audience-exposure.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/search.d.ts
|
|
5
|
+
interface DocsAskAIContextResult extends DocsSearchResult {
|
|
6
|
+
title: string;
|
|
7
|
+
contextContent: string;
|
|
8
|
+
}
|
|
9
|
+
interface DocsAskAIContext {
|
|
10
|
+
context: string;
|
|
11
|
+
/** Structured production context blocks; avoids reparsing markdown horizontal rules. */
|
|
12
|
+
blocks: Array<{
|
|
13
|
+
text: string;
|
|
14
|
+
result: DocsAskAIContextResult;
|
|
15
|
+
}>;
|
|
16
|
+
results: DocsAskAIContextResult[];
|
|
17
|
+
searchResults: DocsSearchResult[];
|
|
18
|
+
packageHints: DocsAskAIPackageHints;
|
|
19
|
+
}
|
|
20
|
+
interface DocsAskAIPackageHints {
|
|
21
|
+
packages: string[];
|
|
22
|
+
imports: string[];
|
|
23
|
+
installCommands: string[];
|
|
24
|
+
}
|
|
25
|
+
/** Normalize scalar or array-valued scope filters for programmatic, HTTP, and MCP callers. */
|
|
26
|
+
declare function normalizeDocsSearchFilters(input?: DocsSearchFilterInput | DocsSearchFilters): DocsSearchFilters;
|
|
27
|
+
/** Parse the public search scope parameters from a URL query string. */
|
|
28
|
+
declare function resolveDocsSearchFilters(searchParams: URLSearchParams): DocsSearchFilters;
|
|
29
|
+
declare class DocsSearchRequestError extends Error {
|
|
30
|
+
readonly code = "invalid_search_request";
|
|
31
|
+
constructor(message: string);
|
|
32
|
+
}
|
|
33
|
+
declare function resolveDocsSearchError(error: unknown): {
|
|
34
|
+
code: "invalid_cursor" | "invalid_search_request";
|
|
35
|
+
message: string;
|
|
36
|
+
} | undefined;
|
|
37
|
+
/** Resolve search filters and the backwards-compatible structured response opt-in. */
|
|
38
|
+
declare function resolveDocsSearchRequest(searchParams: URLSearchParams): DocsSearchRequest;
|
|
39
|
+
declare function inferDocsAskAIPackageHints(content: string): DocsAskAIPackageHints;
|
|
40
|
+
declare function formatDocsAskAIPackageHints(hints: DocsAskAIPackageHints, packageName?: string): string | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Build the exact normalized-input projection represented by a retrieval source digest.
|
|
43
|
+
* This is public so consumers can independently reproduce `source.digest`.
|
|
44
|
+
*/
|
|
45
|
+
declare function buildDocsRetrievalDigestProjection(page: DocsSearchSourcePage, audience?: DocsContentAudience): string;
|
|
46
|
+
declare function resolveDocsRetrievalLastModified(page: DocsSearchSourcePage, audience: DocsContentAudience): string | undefined;
|
|
47
|
+
interface BuildDocsContentSnapshotOptions {
|
|
48
|
+
pages: readonly DocsSearchSourcePage[];
|
|
49
|
+
search?: boolean | DocsSearchConfig;
|
|
50
|
+
audience?: DocsContentAudience;
|
|
51
|
+
locale?: string;
|
|
52
|
+
baseUrl?: string;
|
|
53
|
+
/** @internal Precomputed complete-corpus generation for composed callers. */
|
|
54
|
+
indexGeneration?: string;
|
|
55
|
+
/** Authenticated identity used to scope protected pages. */
|
|
56
|
+
principal?: DocsAccessPrincipal;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Build a deterministic, body-free inventory for content-change synchronization.
|
|
60
|
+
*
|
|
61
|
+
* Its generation is identical to structured search for the same pages, audience,
|
|
62
|
+
* locale, base URL, and chunking policy.
|
|
63
|
+
*/
|
|
64
|
+
declare function buildDocsContentSnapshot(options: BuildDocsContentSnapshotOptions): Promise<DocsContentSnapshot>;
|
|
65
|
+
interface EnrichDocsSearchDocumentsWithProvenanceOptions {
|
|
66
|
+
documents: readonly DocsSearchDocument[];
|
|
67
|
+
pages: readonly DocsSearchSourcePage[];
|
|
68
|
+
audience?: DocsContentAudience;
|
|
69
|
+
chunking?: DocsSearchChunkingConfig;
|
|
70
|
+
locale?: string;
|
|
71
|
+
baseUrl?: string;
|
|
72
|
+
indexGeneration?: string;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Attach the same canonical provenance used by built-in search providers.
|
|
76
|
+
* Custom adapters can call this before persisting their own hosted records.
|
|
77
|
+
*/
|
|
78
|
+
declare function enrichDocsSearchDocumentsWithProvenance(options: EnrichDocsSearchDocumentsWithProvenanceOptions): Promise<DocsSearchDocument[]>;
|
|
79
|
+
declare function buildDocsSearchDocuments(pages: DocsSearchSourcePage[], chunking?: DocsSearchChunkingConfig, audience?: DocsContentAudience): DocsSearchDocument[];
|
|
80
|
+
declare function createSimpleSearchAdapter(): DocsSearchAdapter;
|
|
81
|
+
declare function createTypesenseSearchAdapter(config: TypesenseDocsSearchConfig): DocsSearchAdapter;
|
|
82
|
+
declare function resolveSearchRequestConfig(search: boolean | DocsSearchConfig | undefined, requestUrl?: string, options?: DocsSearchRequestResolutionOptions): boolean | DocsSearchConfig | undefined;
|
|
83
|
+
interface DocsLocalMcpSearchRuntimeConfig {
|
|
84
|
+
enabled?: boolean;
|
|
85
|
+
route?: string;
|
|
86
|
+
tools?: {
|
|
87
|
+
searchDocs?: boolean;
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
type DocsLocalMcpSearchRuntimeInput = boolean | DocsLocalMcpSearchRuntimeConfig | null | undefined;
|
|
91
|
+
interface DocsSearchRequestResolutionOptions {
|
|
92
|
+
/**
|
|
93
|
+
* The built-in MCP server colocated with this search handler. When the configured
|
|
94
|
+
* provider points at one of its local aliases, search runs directly instead of
|
|
95
|
+
* performing a loopback MCP handshake.
|
|
96
|
+
*/
|
|
97
|
+
localMcp?: DocsLocalMcpSearchRuntimeInput;
|
|
98
|
+
}
|
|
99
|
+
declare function resolveLocalDocsMcpSearchConfig(search: boolean | DocsSearchConfig | undefined, localMcp: DocsLocalMcpSearchRuntimeInput, requestUrl?: string): boolean | DocsSearchConfig | undefined;
|
|
100
|
+
/**
|
|
101
|
+
* Resolve the public search audience without allowing malformed values to opt into agent content.
|
|
102
|
+
* Human search remains the default for omitted, legacy, and unknown query values.
|
|
103
|
+
*/
|
|
104
|
+
declare function resolveDocsSearchAudience(value: string | null | undefined): DocsContentAudience;
|
|
105
|
+
declare function resolveAskAISearchRequestConfig(options: {
|
|
106
|
+
search: boolean | DocsSearchConfig | undefined;
|
|
107
|
+
useMcp?: boolean | DocsAskAIMcpConfig;
|
|
108
|
+
mcpEndpoint?: string;
|
|
109
|
+
mcpEnabled?: boolean;
|
|
110
|
+
mcpSearchEnabled?: boolean;
|
|
111
|
+
requestUrl?: string;
|
|
112
|
+
}): boolean | DocsSearchConfig | undefined;
|
|
113
|
+
declare function createMcpSearchAdapter(config: McpDocsSearchConfig): DocsSearchAdapter;
|
|
114
|
+
declare function createAlgoliaSearchAdapter(config: AlgoliaDocsSearchConfig): DocsSearchAdapter;
|
|
115
|
+
interface PerformDocsSearchOptions {
|
|
116
|
+
pages: DocsSearchSourcePage[];
|
|
117
|
+
/** Authenticated identity used to scope protected pages before local or hosted indexing. */
|
|
118
|
+
principal?: DocsAccessPrincipal;
|
|
119
|
+
/** @internal Complete corpus used for generation when `pages` is pre-scoped by a caller. */
|
|
120
|
+
generationPages?: DocsSearchSourcePage[];
|
|
121
|
+
/** @internal Precomputed complete-corpus generation for structured callers. */
|
|
122
|
+
indexGeneration?: string;
|
|
123
|
+
query: string;
|
|
124
|
+
search?: boolean | DocsSearchConfig;
|
|
125
|
+
/** Selects which audience projection is searchable. Public site search defaults to human. */
|
|
126
|
+
audience?: DocsContentAudience;
|
|
127
|
+
locale?: string;
|
|
128
|
+
pathname?: string;
|
|
129
|
+
siteTitle?: string;
|
|
130
|
+
/** Canonical docs URL used to distinguish same-site absolute hits from foreign MCP results. */
|
|
131
|
+
baseUrl?: string;
|
|
132
|
+
/**
|
|
133
|
+
* Canonical origin safe to persist in a hosted index. Pass `null` when `baseUrl`
|
|
134
|
+
* came from the current request rather than trusted configuration.
|
|
135
|
+
* @internal
|
|
136
|
+
*/
|
|
137
|
+
syncBaseUrl?: string | null;
|
|
138
|
+
limit?: number;
|
|
139
|
+
/** Opaque continuation cursor used by structured search responses. */
|
|
140
|
+
cursor?: string;
|
|
141
|
+
/** Optional framework, version, package, and tag constraints. */
|
|
142
|
+
filters?: DocsSearchFilterInput;
|
|
143
|
+
/** Include bounded explanations for the final ranked results. Defaults to false. */
|
|
144
|
+
explain?: boolean;
|
|
145
|
+
/**
|
|
146
|
+
* Controls provider failures. Runtime search keeps the resilient `fallback` default;
|
|
147
|
+
* diagnostics can request `throw` so a broken configured provider cannot be scored as
|
|
148
|
+
* successful simple search.
|
|
149
|
+
*/
|
|
150
|
+
failureMode?: "fallback" | "throw";
|
|
151
|
+
/**
|
|
152
|
+
* Whether non-simple provider hits are supplemented with exact/local simple results.
|
|
153
|
+
* Runtime search defaults to true; provider diagnostics can disable supplementation.
|
|
154
|
+
*/
|
|
155
|
+
supplementExternalResults?: boolean;
|
|
156
|
+
/** Keep absolute provider origins distinct when no canonical docs origin is available. */
|
|
157
|
+
strictExternalOrigins?: boolean;
|
|
158
|
+
/** Optional cancellation signal forwarded to adapters and their managed requests. */
|
|
159
|
+
signal?: AbortSignal;
|
|
160
|
+
}
|
|
161
|
+
declare function performDocsSearch(options: PerformDocsSearchOptions): Promise<DocsSearchResult[]>;
|
|
162
|
+
interface BuildDocsSearchFacetsOptions {
|
|
163
|
+
pages: DocsSearchSourcePage[];
|
|
164
|
+
search?: boolean | DocsSearchConfig;
|
|
165
|
+
audience?: DocsContentAudience;
|
|
166
|
+
locale?: string;
|
|
167
|
+
baseUrl?: string;
|
|
168
|
+
filters?: DocsSearchFilterInput;
|
|
169
|
+
/** Facet field selected for cursor continuation. */
|
|
170
|
+
facet?: DocsSearchFilterField;
|
|
171
|
+
/** Opaque `nextCursor` returned for the selected facet. */
|
|
172
|
+
cursor?: string;
|
|
173
|
+
/** Maximum facet values returned per page. Defaults to 100. */
|
|
174
|
+
limit?: number;
|
|
175
|
+
/** @internal Precomputed complete-corpus generation for composed callers. */
|
|
176
|
+
indexGeneration?: string;
|
|
177
|
+
/** Authenticated identity used to scope protected pages. */
|
|
178
|
+
principal?: DocsAccessPrincipal;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Build a body-free index of valid search filter values and page counts.
|
|
182
|
+
*
|
|
183
|
+
* Each facet applies filters from the other fields while ignoring its own selected
|
|
184
|
+
* values. This is the conventional faceted-search behavior and lets an agent discover
|
|
185
|
+
* safe alternatives without guessing or fetching document bodies.
|
|
186
|
+
*/
|
|
187
|
+
declare function buildDocsSearchFacets(options: BuildDocsSearchFacetsOptions): Promise<DocsSearchFacetsResponse>;
|
|
188
|
+
declare function performDocsSearchWithMetadata(options: PerformDocsSearchOptions): Promise<DocsPaginatedSearchResponse>;
|
|
189
|
+
declare function buildDocsAskAIContext(options: {
|
|
190
|
+
pages: DocsSearchSourcePage[];
|
|
191
|
+
query: string;
|
|
192
|
+
search?: boolean | DocsSearchConfig;
|
|
193
|
+
locale?: string;
|
|
194
|
+
pathname?: string;
|
|
195
|
+
siteTitle?: string;
|
|
196
|
+
baseUrl?: string; /** See `performDocsSearch.syncBaseUrl`. */
|
|
197
|
+
syncBaseUrl?: string | null;
|
|
198
|
+
limit?: number;
|
|
199
|
+
filters?: DocsSearchFilterInput;
|
|
200
|
+
maxContextChars?: number;
|
|
201
|
+
maxResultChars?: number; /** See `performDocsSearch.failureMode`. Defaults to resilient runtime fallback. */
|
|
202
|
+
searchFailureMode?: "fallback" | "throw"; /** See `performDocsSearch.strictExternalOrigins`. */
|
|
203
|
+
strictExternalOrigins?: boolean; /** Optional cancellation signal forwarded to the configured search provider. */
|
|
204
|
+
signal?: AbortSignal;
|
|
205
|
+
}): Promise<DocsAskAIContext>;
|
|
206
|
+
declare function createCustomSearchAdapter(adapter: DocsSearchAdapter | DocsSearchAdapterFactory, options?: {
|
|
207
|
+
paginationRevision?: string;
|
|
208
|
+
}): CustomDocsSearchConfig;
|
|
209
|
+
//#endregion
|
|
210
|
+
export { BuildDocsContentSnapshotOptions, BuildDocsSearchFacetsOptions, DocsLocalMcpSearchRuntimeConfig, DocsLocalMcpSearchRuntimeInput, DocsSearchRequestError, DocsSearchRequestResolutionOptions, EnrichDocsSearchDocumentsWithProvenanceOptions, PerformDocsSearchOptions, buildDocsAskAIContext, buildDocsContentSnapshot, buildDocsRetrievalDigestProjection, buildDocsSearchDocuments, buildDocsSearchFacets, createAlgoliaSearchAdapter, createCustomSearchAdapter, createMcpSearchAdapter, createSimpleSearchAdapter, createTypesenseSearchAdapter, enrichDocsSearchDocumentsWithProvenance, formatDocsAskAIPackageHints, inferDocsAskAIPackageHints, normalizeDocsSearchFilters, performDocsSearch, performDocsSearchWithMetadata, resolveAskAISearchRequestConfig, resolveDocsRetrievalLastModified, resolveDocsSearchAudience, resolveDocsSearchError, resolveDocsSearchFilters, resolveDocsSearchRequest, resolveLocalDocsMcpSearchConfig, resolveSearchRequestConfig };
|