@farming-labs/docs 0.2.57 → 0.2.58
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-v6R0V3lm.mjs → agent-BFtIbSyJ.mjs} +2 -2
- package/dist/agent-evals-BW0vEc-F.mjs +2144 -0
- package/dist/{agent-export-CZR20g0e.mjs → agent-export-vsdq0Huq.mjs} +6 -6
- package/dist/{agents-BPonjolo.mjs → agents-ChKj-VYw.mjs} +6 -6
- package/dist/cli/index.mjs +29 -29
- package/dist/client/react.d.mts +1 -1
- package/dist/{cloud-C45jpBtp.mjs → cloud-BH_sHX64.mjs} +3 -3
- package/dist/{cloud-ask-ai-CvRVnwdK.d.mts → cloud-ask-ai-a5Juvlvh.d.mts} +1 -1
- package/dist/{code-blocks-C9awWzEQ.mjs → code-blocks-qe0T8-xe.mjs} +1 -1
- package/dist/{codeblocks-CSqgqbg-.mjs → codeblocks-Bq67u32v.mjs} +2 -2
- package/dist/{dev-BA2kRuCn.mjs → dev-CAQlbguk.mjs} +2 -2
- package/dist/docs-cloud-server.d.mts +2 -2
- package/dist/docs-cloud-server.mjs +1 -1
- package/dist/{doctor-svA9Flsx.mjs → doctor-H8gilyTg.mjs} +34 -31
- package/dist/{downgrade-BStNhyCc.mjs → downgrade-BZs86NVr.mjs} +2 -2
- package/dist/{agent-surface-drift-rGFS38Ak.mjs → golden-evaluations-BiUg5Xe_.mjs} +59 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +3 -2
- package/dist/{init-Dm0yDz6v.mjs → init-B_9ENq8Z.mjs} +3 -3
- package/dist/{mcp-BYIgKsPn.mjs → mcp-CiNww-Wu.mjs} +5 -5
- package/dist/mcp.d.mts +1 -1
- package/dist/mcp.mjs +148 -6
- package/dist/metadata-3ljRN9MM.mjs +237 -0
- package/dist/{package-version-DRIc08EU.mjs → package-version-qik_4J6C.mjs} +1 -1
- package/dist/{reading-time-W_Id2ayC.mjs → reading-time-EaVom2cl.mjs} +2 -234
- package/dist/{review-DZ81wm7h.mjs → review-BEgX7ey7.mjs} +28 -27
- package/dist/{robots-mSc98PMp.mjs → robots-CFlsfYdA.mjs} +2 -2
- package/dist/{search-9uEaC23e.d.mts → search-BblemZl4.d.mts} +25 -3
- package/dist/{search-OHp36znm.mjs → search-Bo9ubPVO.mjs} +149 -38
- package/dist/{search-AMEoabYU.mjs → search-CoajN9X1.mjs} +5 -5
- package/dist/server.d.mts +107 -6
- package/dist/server.mjs +5 -5
- package/dist/{sitemap-Cyc0Bbbn.mjs → sitemap-D_aXWPdJ.mjs} +6 -6
- package/dist/{types-R-DN23yw.d.mts → types-C1nPRXqo.d.mts} +90 -6
- package/dist/{upgrade-CXYRNV0C.mjs → upgrade-BCJTCW3O.mjs} +2 -2
- package/package.json +1 -1
- package/dist/agent-evals-BD17jOqL.mjs +0 -1166
- /package/dist/{agent-scope-B8lptqCd.mjs → agent-scope-CCaIY1aK.mjs} +0 -0
- /package/dist/{cloud-ask-ai-1k0q6OAH.mjs → cloud-ask-ai-hnJfj8-X.mjs} +0 -0
- /package/dist/{config-DZbZiYEa.mjs → config-DASewQ0x.mjs} +0 -0
- /package/dist/{errors-BFUtdZfC.mjs → errors-CVqZ3kOO.mjs} +0 -0
- /package/dist/{sitemap-server-zFYctvCa.mjs → sitemap-server-BYwE0zXs.mjs} +0 -0
- /package/dist/{templates-1Cod8KrJ.mjs → templates-CfQjpDWW.mjs} +0 -0
- /package/dist/{utils-DBCCkkJS.mjs → utils-6UCLxv4B.mjs} +0 -0
|
@@ -1342,6 +1342,8 @@ interface DocsSearchAdapterContext {
|
|
|
1342
1342
|
locale?: string;
|
|
1343
1343
|
pathname?: string;
|
|
1344
1344
|
siteTitle?: string;
|
|
1345
|
+
/** Optional cancellation signal, including diagnostic timeouts. */
|
|
1346
|
+
signal?: AbortSignal;
|
|
1345
1347
|
}
|
|
1346
1348
|
interface DocsSearchAdapter {
|
|
1347
1349
|
name: string;
|
|
@@ -2380,7 +2382,28 @@ interface DocsAgentGoldenTaskExpectation {
|
|
|
2380
2382
|
examples?: DocsAgentGoldenExpectedExample[];
|
|
2381
2383
|
/** Minimum share of context bytes that must come from relevant sources. */
|
|
2382
2384
|
minUsefulByteRatio?: number;
|
|
2385
|
+
/**
|
|
2386
|
+
* Scope that the returned sources must actually select. Unlike `filters`, this is an
|
|
2387
|
+
* assertion and does not constrain retrieval, so it can detect a wrong framework,
|
|
2388
|
+
* version, or locale result.
|
|
2389
|
+
*/
|
|
2390
|
+
scope?: DocsAgentGoldenTaskFilters;
|
|
2391
|
+
/** Assertions evaluated against an explicitly configured answer runner. */
|
|
2392
|
+
answer?: DocsAgentGoldenAnswerExpectation;
|
|
2393
|
+
}
|
|
2394
|
+
interface DocsAgentGoldenAnswerExpectation {
|
|
2395
|
+
/** Literal fragments that must occur in the generated answer. */
|
|
2396
|
+
includes?: string[];
|
|
2397
|
+
/** Literal fragments that must not occur in the generated answer. */
|
|
2398
|
+
excludes?: string[];
|
|
2399
|
+
/** Citations that the generated answer must contain. */
|
|
2400
|
+
requiredCitations?: string[];
|
|
2401
|
+
/** Additional answer citations that are valid but not required. */
|
|
2402
|
+
allowedCitations?: string[];
|
|
2403
|
+
/** Citations that the generated answer must not contain. */
|
|
2404
|
+
forbiddenCitations?: string[];
|
|
2383
2405
|
}
|
|
2406
|
+
type DocsAgentGoldenExampleVerification = "present" | "syntax" | "execute";
|
|
2384
2407
|
interface DocsAgentGoldenExpectedExample {
|
|
2385
2408
|
/** Canonical page or section URL containing the example. */
|
|
2386
2409
|
source?: string;
|
|
@@ -2392,7 +2415,13 @@ interface DocsAgentGoldenExpectedExample {
|
|
|
2392
2415
|
runnable?: boolean;
|
|
2393
2416
|
/** Literal fragments that must occur in the example. */
|
|
2394
2417
|
includes?: string[];
|
|
2418
|
+
/**
|
|
2419
|
+
* Verification strength. Runnable examples default to `syntax`; explicitly
|
|
2420
|
+
* non-runnable examples default to `present`. Runtime execution is always opt-in.
|
|
2421
|
+
*/
|
|
2422
|
+
verification?: DocsAgentGoldenExampleVerification;
|
|
2395
2423
|
}
|
|
2424
|
+
type DocsAgentEvaluationSurface = "mcp-context" | "configured-search" | "ask-ai-context";
|
|
2396
2425
|
interface DocsAgentGoldenTask {
|
|
2397
2426
|
/** Stable identifier shown in doctor/review reports. */
|
|
2398
2427
|
id: string;
|
|
@@ -2404,17 +2433,71 @@ interface DocsAgentGoldenTask {
|
|
|
2404
2433
|
tokenBudget?: number;
|
|
2405
2434
|
/** Number of ranked search results to evaluate. */
|
|
2406
2435
|
topK?: number;
|
|
2407
|
-
/**
|
|
2436
|
+
/** Override the evaluation surface configured for the task suite. */
|
|
2437
|
+
surface?: DocsAgentEvaluationSurface;
|
|
2438
|
+
/** Evaluator-only expectations used to score the task. */
|
|
2408
2439
|
expect: DocsAgentGoldenTaskExpectation;
|
|
2409
2440
|
}
|
|
2441
|
+
interface DocsAgentEvaluationSourceReference {
|
|
2442
|
+
url: string;
|
|
2443
|
+
title?: string;
|
|
2444
|
+
framework?: string;
|
|
2445
|
+
version?: string;
|
|
2446
|
+
locale?: string;
|
|
2447
|
+
}
|
|
2448
|
+
/** Blind task input sent to answer providers. Golden expectations stay evaluator-only. */
|
|
2449
|
+
interface DocsAgentEvaluationTaskInput {
|
|
2450
|
+
id: string;
|
|
2451
|
+
query: string;
|
|
2452
|
+
filters?: DocsAgentGoldenTaskFilters;
|
|
2453
|
+
}
|
|
2454
|
+
/** Serializable, expectation-blind request sent to every configured answer provider. */
|
|
2455
|
+
interface DocsAgentEvaluationAnswerRequest {
|
|
2456
|
+
task: DocsAgentEvaluationTaskInput;
|
|
2457
|
+
surface: DocsAgentEvaluationSurface;
|
|
2458
|
+
context: string;
|
|
2459
|
+
sources: readonly DocsAgentEvaluationSourceReference[];
|
|
2460
|
+
}
|
|
2461
|
+
/** Callback answer input. The abort signal is not serialized for HTTP providers. */
|
|
2462
|
+
interface DocsAgentEvaluationAnswerInput extends DocsAgentEvaluationAnswerRequest {
|
|
2463
|
+
/** Aborted when the configured answer timeout elapses. */
|
|
2464
|
+
signal: AbortSignal;
|
|
2465
|
+
}
|
|
2466
|
+
interface DocsAgentEvaluationAnswerResult {
|
|
2467
|
+
text: string;
|
|
2468
|
+
/** Canonical URLs cited by the answer. Markdown links are also extracted from `text`. */
|
|
2469
|
+
citations?: string[];
|
|
2470
|
+
}
|
|
2471
|
+
type DocsAgentEvaluationAnswerRunner = (input: DocsAgentEvaluationAnswerInput) => DocsAgentEvaluationAnswerResult | Promise<DocsAgentEvaluationAnswerResult>;
|
|
2472
|
+
type DocsAgentEvaluationAnswerProvider = {
|
|
2473
|
+
provider: "callback";
|
|
2474
|
+
run: DocsAgentEvaluationAnswerRunner; /** Abort the callback after this many milliseconds. @default 30000 */
|
|
2475
|
+
timeoutMs?: number;
|
|
2476
|
+
} | {
|
|
2477
|
+
provider: "http"; /** Endpoint that accepts `DocsAgentEvaluationAnswerRequest` JSON and returns an answer result. */
|
|
2478
|
+
endpoint: string; /** Optional request headers. Values are never included in evaluation reports. */
|
|
2479
|
+
headers?: Record<string, string>; /** Abort the request after this many milliseconds. @default 30000 */
|
|
2480
|
+
timeoutMs?: number;
|
|
2481
|
+
};
|
|
2410
2482
|
interface DocsAgentEvaluationsConfig {
|
|
2411
|
-
/** Enable
|
|
2483
|
+
/** Enable golden-task evaluation. */
|
|
2412
2484
|
enabled?: boolean;
|
|
2413
2485
|
/** Default conservative context budget for tasks that omit `tokenBudget`. */
|
|
2414
2486
|
tokenBudget?: number;
|
|
2415
2487
|
/** Default retrieval depth for tasks that omit `topK`. */
|
|
2416
2488
|
topK?: number;
|
|
2417
|
-
/**
|
|
2489
|
+
/** Retrieval/context surface measured by the task suite. @default "mcp-context" */
|
|
2490
|
+
surface?: DocsAgentEvaluationSurface;
|
|
2491
|
+
/**
|
|
2492
|
+
* Permit configured external search, HTTP answers, and explicit executable-example
|
|
2493
|
+
* verification. Disabled by default so doctor/review remain offline unless explicitly opted in.
|
|
2494
|
+
*/
|
|
2495
|
+
allowNetwork?: boolean;
|
|
2496
|
+
/** Timeout for configured retrieval during each task. @default 30000 */
|
|
2497
|
+
searchTimeoutMs?: number;
|
|
2498
|
+
/** Optional callback or HTTP runner used to measure actual generated answers. */
|
|
2499
|
+
answer?: DocsAgentEvaluationAnswerProvider;
|
|
2500
|
+
/** Golden tasks evaluated by `docs doctor` and `docs review`. */
|
|
2418
2501
|
tasks?: DocsAgentGoldenTask[];
|
|
2419
2502
|
}
|
|
2420
2503
|
interface DocsAgentConfig {
|
|
@@ -2423,7 +2506,8 @@ interface DocsAgentConfig {
|
|
|
2423
2506
|
*/
|
|
2424
2507
|
compact?: DocsAgentCompactConfig;
|
|
2425
2508
|
/**
|
|
2426
|
-
*
|
|
2509
|
+
* Offline-by-default retrieval, citation, version, example, and token-budget evaluations.
|
|
2510
|
+
* External providers and runtime execution require explicit opt-in.
|
|
2427
2511
|
*/
|
|
2428
2512
|
evaluations?: boolean | DocsAgentEvaluationsConfig;
|
|
2429
2513
|
}
|
|
@@ -2454,7 +2538,7 @@ interface DocsReviewRulesConfig {
|
|
|
2454
2538
|
configConfidence?: DocsReviewSeverity;
|
|
2455
2539
|
/** Detect disagreement between discovery, resolved config, and the public config schema. */
|
|
2456
2540
|
agentSurfaceDrift?: DocsReviewSeverity;
|
|
2457
|
-
/** Run
|
|
2541
|
+
/** Run configured agent golden tasks and report failed or unmeasured behavior. */
|
|
2458
2542
|
goldenTasks?: DocsReviewSeverity;
|
|
2459
2543
|
}
|
|
2460
2544
|
interface DocsReviewScoreConfig {
|
|
@@ -3155,4 +3239,4 @@ interface DocsConfig {
|
|
|
3155
3239
|
og?: OGConfig;
|
|
3156
3240
|
}
|
|
3157
3241
|
//#endregion
|
|
3158
|
-
export {
|
|
3242
|
+
export { DocsCodeBlocksConfig as $, DocsTelemetryFramework as $t, DocsAgentGoldenTaskExpectation as A, ResolvedDocsRelatedLink as An, DocsReviewRulesConfig as At, DocsAnalyticsSource as B, TypesenseDocsSearchConfig as Bn, DocsSearchDocument as Bt, DocsAgentEvaluationsConfig as C, PageAgentVerification as Cn, DocsObservabilityConfig as Ct, DocsAgentGoldenExampleVerification as D, PageTwitter as Dn, DocsReviewCiConfig as Dt, DocsAgentGoldenAnswerExpectation as E, PageSidebarFrontmatter as En, DocsRelatedItem as Et, DocsAnalyticsConfig as F, SidebarNode as Fn, DocsSearchAdapter as Ft, DocsAskAIFeedbackMessage as G, DocsSearchSourcePage as Gt, DocsAskAIActionType as H, UIConfig as Hn, DocsSearchQuery as Ht, DocsAnalyticsEvent as I, SidebarPageNode as In, DocsSearchAdapterContext as It, DocsCloudApiKeyConfig as J, DocsTelemetryConfig as Jt, DocsAskAIFeedbackValue as K, DocsSitemapConfig as Kt, DocsAnalyticsEventInput as L, SidebarTree as Ln, DocsSearchAdapterFactory as Lt, DocsAgentTraceEventInput as M, SidebarConfig as Mn, DocsReviewSeverity as Mt, DocsAgentTraceEventType as N, SidebarFolderIndexBehavior as Nn, DocsRobotsConfig as Nt, DocsAgentGoldenExpectedExample as O, ReadingTimeConfig as On, DocsReviewCiMode as Ot, DocsAgentTraceStatus as P, SidebarFolderNode as Pn, DocsRobotsRule as Pt, DocsCloudPublishConfig as Q, DocsTelemetryFeatures as Qt, DocsAnalyticsEventType as R, SimpleDocsSearchConfig as Rn, DocsSearchChunkingConfig as Rt, DocsAgentEvaluationTaskInput as S, PageAgentFrontmatter as Sn, DocsNav as St, DocsAgentFeedbackData as T, PageOpenGraph as Tn, DocsObservabilityEventInput as Tt, DocsAskAIFeedbackConfig as U, DocsSearchResult as Ut, DocsAskAIActionData as V, TypographyConfig as Vn, DocsSearchEmbeddingsConfig as Vt, DocsAskAIFeedbackData as W, DocsSearchResultType as Wt, DocsCloudFeatureConfig as X, DocsTelemetryEventInput as Xt, DocsCloudConfig as Y, DocsTelemetryEvent as Yt, DocsCloudPreviewConfig as Z, DocsTelemetryEventType as Zt, DocsAgentEvaluationAnswerRequest as _, OrderingItem as _n, DocsMcpCorsConfig as _t, ApiReferenceRenderer as a, LlmsTxtConfig as an, DocsCodeBlocksValidationMode as at, DocsAgentEvaluationSourceReference as b, PageAgentCommand as bn, DocsMcpToolsConfig as bt, ChangelogFrontmatter as c, LlmsTxtSectionConfig as cn, DocsFeedbackData as ct, CopyMarkdownFormat as d, OpenDocsConfig as dn, DocsMcpAllowedOrigins as dt, DocsTheme as en, DocsCodeBlocksPlannerConfig as et, CustomDocsSearchConfig as f, OpenDocsProvider as fn, DocsMcpAuthPrincipal as ft, DocsAgentEvaluationAnswerProvider as g, OpenGraphImage as gn, DocsMcpConfig as gt, DocsAgentEvaluationAnswerInput as h, OpenDocsTarget as hn, DocsMcpAuthenticateResult as ht, ApiReferenceConfig as i, LastUpdatedConfig as in, DocsCodeBlocksValidateConfig as it, DocsAgentGoldenTaskFilters as j, SidebarComponentProps as jn, DocsReviewScoreConfig as jt, DocsAgentGoldenTask as k, ReadingTimeFormat as kn, DocsReviewConfig as kt, CodeBlockCopyData as l, McpDocsSearchConfig as ln, DocsFeedbackValue as lt, DocsAgentConfig as m, OpenDocsProviderId as mn, DocsMcpAuthenticateContext as mt, AgentFeedbackConfig as n, FontStyle as nn, DocsCodeBlocksRunnerConfig as nt, BreadcrumbConfig as o, LlmsTxtMaxCharsConfig as on, DocsCodeBlocksValidationPolicy as ot, DocsAgentCompactConfig as p, OpenDocsProviderConfig as pn, DocsMcpAuthenticate as pt, DocsAskAIMcpConfig as q, DocsTelemetryAgentSurface as qt, AlgoliaDocsSearchConfig as r, GithubConfig as rn, DocsCodeBlocksRunnerProvider as rt, ChangelogConfig as s, LlmsTxtMaxCharsMode as sn, DocsConfig as st, AIConfig as t, FeedbackConfig as tn, DocsCodeBlocksPlannerProvider as tt, CopyMarkdownConfig as u, OGConfig as un, DocsI18nConfig as ut, DocsAgentEvaluationAnswerResult as v, PageActionsConfig as vn, DocsMcpOriginContext as vt, DocsAgentFeedbackContext as w, PageFrontmatter as wn, DocsObservabilityEvent as wt, DocsAgentEvaluationSurface as x, PageAgentFailureMode as xn, DocsMetadata as xt, DocsAgentEvaluationAnswerRunner as y, PageAgentAppliesTo as yn, DocsMcpSecurityConfig as yt, DocsAnalyticsInput as z, ThemeToggleConfig as zn, DocsSearchConfig as zt };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as fileExists, o as exec } from "./utils-
|
|
2
|
-
import { a as getPackagesForFramework, c as resolveDocsPackageManager, i as frameworkFromPreset, l as validateUpgradeVersion, n as PRESETS, o as presetFromFramework, r as buildDocsPackageInstallCommand, s as resolveDocsPackageFramework, t as PACKAGES_BY_FRAMEWORK } from "./package-version-
|
|
1
|
+
import { c as fileExists, o as exec } from "./utils-6UCLxv4B.mjs";
|
|
2
|
+
import { a as getPackagesForFramework, c as resolveDocsPackageManager, i as frameworkFromPreset, l as validateUpgradeVersion, n as PRESETS, o as presetFromFramework, r as buildDocsPackageInstallCommand, s as resolveDocsPackageFramework, t as PACKAGES_BY_FRAMEWORK } from "./package-version-qik_4J6C.mjs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import pc from "picocolors";
|
|
5
5
|
import * as p from "@clack/prompts";
|