@farming-labs/docs 0.2.71 → 0.2.73
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-bof3qzKZ.mjs → agent-ClRpctMG.mjs} +3 -2
- package/dist/{agent-evals-Cr9TAkmB.mjs → agent-evals-BFHGypqh.mjs} +116 -20
- package/dist/{agent-export-7Ws4KqDE.mjs → agent-export-B9bah0AV.mjs} +9 -8
- package/dist/{agent-FIyl4-Oa.mjs → agent-o9OTadrf.mjs} +607 -769
- package/dist/agent-skills-bundle.d.mts +1 -1
- package/dist/{agent-skills-server-DTwblsLu.d.mts → agent-skills-server-DCbAx5WU.d.mts} +2 -2
- package/dist/{agent-skills-server-B4u3qy-1.mjs → agent-skills-server-noFn1l_p.mjs} +1 -1
- package/dist/agent-skills-vite.d.mts +3 -3
- package/dist/agent-skills-vite.mjs +2 -2
- package/dist/{agents-Be2ntaFr.mjs → agents-CR-Uasbc.mjs} +7 -6
- package/dist/cli/index.mjs +14 -14
- package/dist/client/react.d.mts +1 -1
- package/dist/{cloud-ask-ai-BfnX18rI.d.mts → cloud-ask-ai-yR9vZmSG.d.mts} +1 -1
- package/dist/docs-cloud-server.d.mts +2 -2
- package/dist/{doctor-DoPAofVP.mjs → doctor-BeyN3Ljh.mjs} +12 -11
- package/dist/{golden-evaluations-CPGGnXOV.mjs → golden-evaluations-CloP0pAe.mjs} +23 -2
- package/dist/index.d.mts +93 -6
- package/dist/index.mjs +9 -8
- package/dist/markdown-rendering.d.mts +75 -0
- package/dist/markdown-rendering.mjs +618 -0
- package/dist/markdown-sections-7OoA7ylx.mjs +1492 -0
- package/dist/{mcp-BLynUzE7.mjs → mcp-BLLXvEXB.mjs} +7 -6
- package/dist/mcp.d.mts +7 -2
- package/dist/mcp.mjs +130 -25
- package/dist/{metadata-bw8k-9x-.mjs → metadata-N252j5_a.mjs} +1 -1
- package/dist/{reading-time-DtNegNiq.mjs → prompt-references-Cz35rlOa.mjs} +158 -4
- package/dist/{review-NFnYbMRI.mjs → review-DaJLdPLh.mjs} +7 -6
- package/dist/{robots-DOqBwQw8.mjs → robots-BcuxnZqZ.mjs} +2 -2
- package/dist/{robots-B3e-aWPy.mjs → robots-DI-9MZz1.mjs} +4 -3
- package/dist/{search-CozHzW7v.d.mts → search-D1n8Sf25.d.mts} +45 -9
- package/dist/{search-DOGUUZvs.mjs → search-DeOJiMAy.mjs} +7 -6
- package/dist/{search-x5O0-9X3.mjs → search-RfPcG1if.mjs} +742 -42
- package/dist/server.d.mts +13 -5
- package/dist/server.mjs +8 -7
- package/dist/{sitemap-BpMKdDUd.mjs → sitemap-BGGbX_KE.mjs} +7 -6
- package/dist/{sitemap-server-D_hayOp6.mjs → sitemap-server-VefDnzEB.mjs} +1 -1
- package/dist/{standards-discovery-C0CIC4QI.d.mts → standards-discovery-83lp1lew.d.mts} +5 -4
- package/dist/{standards-discovery-CYfiQE13.mjs → standards-discovery-BwL5ffGx.mjs} +4 -3
- package/dist/{types-BQC05SQm.d.mts → types-_HCPD4wc.d.mts} +49 -1
- package/package.json +9 -1
- package/dist/agent-scope-C_U--OZ7.mjs +0 -283
- /package/dist/{i18n-CCaFUnAN.mjs → i18n-hHVWcflJ.mjs} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Gn as OpenDocsTarget, Hn as OpenDocsProvider, Jt as DocsObservabilityEventInput, Kt as DocsObservabilityConfig, Sn as DocsSitemapConfig, _n as DocsSearchResult, at as DocsAnalyticsEventInput, cn as DocsSearchConfig, et as DocsAgentTraceEventInput, f as CustomDocsSearchConfig, fn as DocsSearchFilterInput, gn as DocsSearchResponse, gr as TypesenseDocsSearchConfig, hn as DocsSearchRequest, ht as DocsAskAIMcpConfig, in as DocsSearchAdapter, it as DocsAnalyticsEvent, ln as DocsSearchDocument, on as DocsSearchAdapterFactory, or as ResolvedDocsRelatedLink, pn as DocsSearchFilters, qt as DocsObservabilityEvent, r as AlgoliaDocsSearchConfig, rt as DocsAnalyticsConfig, sn as DocsSearchChunkingConfig, yn as DocsSearchSourcePage, zn as McpDocsSearchConfig } from "./types-_HCPD4wc.mjs";
|
|
2
|
+
import { I as DocsDiscoveryApiRouteOptions } from "./standards-discovery-83lp1lew.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/analytics.d.ts
|
|
5
5
|
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"];
|
|
@@ -35,11 +35,32 @@ declare function emitDocsAgentTraceEvent(observability: boolean | DocsObservabil
|
|
|
35
35
|
type DocsContentAudience = "human" | "agent";
|
|
36
36
|
/** Resolve whether content with an optional audience restriction is visible. */
|
|
37
37
|
declare function resolveDocsAudienceExposure(only: unknown, audience: DocsContentAudience): boolean;
|
|
38
|
+
interface DocsMarkdownPromptBlock {
|
|
39
|
+
/** Raw JSX attributes between the Prompt name and opening bracket. */
|
|
40
|
+
attributes: string;
|
|
41
|
+
/** Literal source between the Prompt tags, with enclosing Markdown container prefixes removed. */
|
|
42
|
+
children: string;
|
|
43
|
+
/** Collision-safe placeholder carried through document-level rendering. */
|
|
44
|
+
token: string;
|
|
45
|
+
}
|
|
46
|
+
interface ExtractedDocsMarkdownPromptBlocks {
|
|
47
|
+
blocks: DocsMarkdownPromptBlock[];
|
|
48
|
+
markdown: string;
|
|
49
|
+
}
|
|
38
50
|
interface DocsAudienceMdxIssue {
|
|
39
51
|
code: "missing-only" | "invalid-only" | "dynamic-only" | "ignored-agent-only" | "ignored-human-only";
|
|
40
52
|
index: number;
|
|
41
53
|
message: string;
|
|
42
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* Extract live MDX Prompt blocks while leaving Markdown literals untouched.
|
|
57
|
+
*
|
|
58
|
+
* Prompt bodies are copyable source, so callers can safely run audience,
|
|
59
|
+
* reference-definition, and heading passes over `markdown`, then restore each
|
|
60
|
+
* block from its token. Fences (including container fences), inline code, links,
|
|
61
|
+
* comments, raw elements, and other literal contexts are never extracted.
|
|
62
|
+
*/
|
|
63
|
+
declare function extractDocsMarkdownPromptBlocks(content: string): ExtractedDocsMarkdownPromptBlocks;
|
|
43
64
|
/** Find audience declarations that cannot be projected consistently at build time. */
|
|
44
65
|
declare function findDocsAudienceMdxIssues(content: string): DocsAudienceMdxIssue[];
|
|
45
66
|
/**
|
|
@@ -214,6 +235,12 @@ interface DocsAskAIPackageHints {
|
|
|
214
235
|
imports: string[];
|
|
215
236
|
installCommands: string[];
|
|
216
237
|
}
|
|
238
|
+
/** Normalize scalar or array-valued scope filters for programmatic, HTTP, and MCP callers. */
|
|
239
|
+
declare function normalizeDocsSearchFilters(input?: DocsSearchFilterInput | DocsSearchFilters): DocsSearchFilters;
|
|
240
|
+
/** Parse the public search scope parameters from a URL query string. */
|
|
241
|
+
declare function resolveDocsSearchFilters(searchParams: URLSearchParams): DocsSearchFilters;
|
|
242
|
+
/** Resolve search filters and the backwards-compatible structured response opt-in. */
|
|
243
|
+
declare function resolveDocsSearchRequest(searchParams: URLSearchParams): DocsSearchRequest;
|
|
217
244
|
declare function inferDocsAskAIPackageHints(content: string): DocsAskAIPackageHints;
|
|
218
245
|
declare function formatDocsAskAIPackageHints(hints: DocsAskAIPackageHints, packageName?: string): string | undefined;
|
|
219
246
|
declare function buildDocsSearchDocuments(pages: DocsSearchSourcePage[], chunking?: DocsSearchChunkingConfig, audience?: DocsContentAudience): DocsSearchDocument[];
|
|
@@ -235,16 +262,20 @@ declare function resolveAskAISearchRequestConfig(options: {
|
|
|
235
262
|
}): boolean | DocsSearchConfig | undefined;
|
|
236
263
|
declare function createMcpSearchAdapter(config: McpDocsSearchConfig): DocsSearchAdapter;
|
|
237
264
|
declare function createAlgoliaSearchAdapter(config: AlgoliaDocsSearchConfig): DocsSearchAdapter;
|
|
238
|
-
|
|
265
|
+
interface PerformDocsSearchOptions {
|
|
239
266
|
pages: DocsSearchSourcePage[];
|
|
240
267
|
query: string;
|
|
241
|
-
search?: boolean | DocsSearchConfig;
|
|
268
|
+
search?: boolean | DocsSearchConfig;
|
|
269
|
+
/** Selects which audience projection is searchable. Public site search defaults to human. */
|
|
242
270
|
audience?: DocsContentAudience;
|
|
243
271
|
locale?: string;
|
|
244
272
|
pathname?: string;
|
|
245
|
-
siteTitle?: string;
|
|
273
|
+
siteTitle?: string;
|
|
274
|
+
/** Canonical docs URL used to distinguish same-site absolute hits from foreign MCP results. */
|
|
246
275
|
baseUrl?: string;
|
|
247
276
|
limit?: number;
|
|
277
|
+
/** Optional framework, version, package, and tag constraints. */
|
|
278
|
+
filters?: DocsSearchFilterInput;
|
|
248
279
|
/**
|
|
249
280
|
* Controls provider failures. Runtime search keeps the resilient `fallback` default;
|
|
250
281
|
* diagnostics can request `throw` so a broken configured provider cannot be scored as
|
|
@@ -255,10 +286,14 @@ declare function performDocsSearch(options: {
|
|
|
255
286
|
* Whether non-simple provider hits are supplemented with exact/local simple results.
|
|
256
287
|
* Runtime search defaults to true; provider diagnostics can disable supplementation.
|
|
257
288
|
*/
|
|
258
|
-
supplementExternalResults?: boolean;
|
|
259
|
-
|
|
289
|
+
supplementExternalResults?: boolean;
|
|
290
|
+
/** Fail closed on absolute provider hits when no canonical docs origin is available. */
|
|
291
|
+
strictExternalOrigins?: boolean;
|
|
292
|
+
/** Optional cancellation signal forwarded to adapters and their managed requests. */
|
|
260
293
|
signal?: AbortSignal;
|
|
261
|
-
}
|
|
294
|
+
}
|
|
295
|
+
declare function performDocsSearch(options: PerformDocsSearchOptions): Promise<DocsSearchResult[]>;
|
|
296
|
+
declare function performDocsSearchWithMetadata(options: PerformDocsSearchOptions): Promise<DocsSearchResponse>;
|
|
262
297
|
declare function buildDocsAskAIContext(options: {
|
|
263
298
|
pages: DocsSearchSourcePage[];
|
|
264
299
|
query: string;
|
|
@@ -268,6 +303,7 @@ declare function buildDocsAskAIContext(options: {
|
|
|
268
303
|
siteTitle?: string;
|
|
269
304
|
baseUrl?: string;
|
|
270
305
|
limit?: number;
|
|
306
|
+
filters?: DocsSearchFilterInput;
|
|
271
307
|
maxContextChars?: number;
|
|
272
308
|
maxResultChars?: number; /** See `performDocsSearch.failureMode`. Defaults to resilient runtime fallback. */
|
|
273
309
|
searchFailureMode?: "fallback" | "throw"; /** See `performDocsSearch.strictExternalOrigins`. */
|
|
@@ -276,4 +312,4 @@ declare function buildDocsAskAIContext(options: {
|
|
|
276
312
|
}): Promise<DocsAskAIContext>;
|
|
277
313
|
declare function createCustomSearchAdapter(adapter: DocsSearchAdapter | DocsSearchAdapterFactory): CustomDocsSearchConfig;
|
|
278
314
|
//#endregion
|
|
279
|
-
export {
|
|
315
|
+
export { serializeOpenDocsProviders as $, createDocsSitemapResponse as A, DEFAULT_OPEN_DOCS_TARGET as B, DEFAULT_SITEMAP_XML_ROUTE as C, DocsSitemapPageInput as D, DocsSitemapManifestPage as E, resolveDocsSitemapPageLastmod as F, SerializedOpenDocsProvider as G, PromptAction as H, resolveDocsSitemapRequest as I, resolvePromptProviderChoices as J, normalizePromptProviderName as K, toDocsSitemapMarkdownUrl as L, renderDocsSitemapMarkdown as M, renderDocsSitemapXml as N, DocsSitemapResolvedConfig as O, resolveDocsSitemapConfig as P, serializeOpenDocsProvider as Q, DEFAULT_OPEN_DOCS_PROMPT as R, DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE as S, DocsSitemapManifest as T, PromptProviderChoice as U, DEFAULT_PROMPT_PROVIDER_TEMPLATES as V, SerializeOpenDocsProviderOptions as W, serializeDocsIcon as X, sanitizePromptText as Y, serializeDocsIconRegistry as Z, resolveDocsSearchRequest as _, emitDocsObservabilityEvent as _t, createCustomSearchAdapter as a, findDocsAudienceMdxIssues as at, DEFAULT_SITEMAP_MD_DOCS_ROUTE as b, resolveDocsObservabilityConfig as bt, createTypesenseSearchAdapter as c, resolveDocsAudienceMdxContent as ct, normalizeDocsSearchFilters as d, ResolvedDocsAnalyticsConfig as dt, DocsAudienceMdxIssue as et, performDocsSearch as f, ResolvedDocsObservabilityConfig as ft, resolveDocsSearchFilters as g, emitDocsAnalyticsEvent as gt, resolveDocsSearchAudience as h, emitDocsAgentTraceEvent as ht, createAlgoliaSearchAdapter as i, extractDocsMarkdownPromptBlocks as it, readDocsSitemapManifestFromContentMap as j, buildDocsSitemapManifest as k, formatDocsAskAIPackageHints as l, DOCS_AGENT_TRACE_EVENT_TYPES as lt, resolveAskAISearchRequestConfig as m, createDocsAgentTraceId as mt, buildDocsAskAIContext as n, DocsMarkdownPromptBlock as nt, createMcpSearchAdapter as o, resolveDocsAgentMdxContent as ot, performDocsSearchWithMetadata as p, createDocsAgentTraceContext as pt, parsePromptStringArray as q, buildDocsSearchDocuments as r, ExtractedDocsMarkdownPromptBlocks as rt, createSimpleSearchAdapter as s, resolveDocsAudienceExposure as st, PerformDocsSearchOptions as t, DocsContentAudience as tt, inferDocsAskAIPackageHints as u, DocsAgentTraceContext as ut, resolveSearchRequestConfig as v, getDocsRequestAnalyticsProperties as vt, DocsSitemapFormat as w, DEFAULT_SITEMAP_MD_ROUTE as x, DEFAULT_SITEMAP_MANIFEST_PATH as y, resolveDocsAnalyticsConfig as yt, DEFAULT_OPEN_DOCS_PROVIDER_IDS as z };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import "./agent-
|
|
2
|
-
import "./
|
|
3
|
-
import
|
|
4
|
-
import "./
|
|
5
|
-
import "./
|
|
1
|
+
import "./agent-o9OTadrf.mjs";
|
|
2
|
+
import "./markdown-sections-7OoA7ylx.mjs";
|
|
3
|
+
import "./standards-discovery-BwL5ffGx.mjs";
|
|
4
|
+
import { n as buildDocsSearchDocuments, r as createAlgoliaSearchAdapter, s as createTypesenseSearchAdapter } from "./search-RfPcG1if.mjs";
|
|
5
|
+
import "./sitemap-server-VefDnzEB.mjs";
|
|
6
|
+
import "./agent-evals-BFHGypqh.mjs";
|
|
6
7
|
import { createFilesystemDocsMcpSource } from "./mcp.mjs";
|
|
7
8
|
import "./code-blocks-DnNVNK2M.mjs";
|
|
8
|
-
import "./agent-skills-server-
|
|
9
|
+
import "./agent-skills-server-noFn1l_p.mjs";
|
|
9
10
|
import "./server.mjs";
|
|
10
11
|
import { _ as resolveDocsContentDir, c as loadProjectEnv, g as resolveDocsConfigPath, h as readTopLevelStringProperty } from "./config-Wcdj-D0a.mjs";
|
|
11
12
|
import { readFileSync } from "node:fs";
|