@farming-labs/docs 0.2.53 → 0.2.54

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.
Files changed (51) hide show
  1. package/dist/agent-BXvi0uhS.mjs +623 -0
  2. package/dist/{agent-BMxMpEa0.mjs → agent-DXkXi-pS.mjs} +590 -19
  3. package/dist/agent-evals-BD17jOqL.mjs +1166 -0
  4. package/dist/{agent-export--X9Go-wj.mjs → agent-export-n-a0GbeU.mjs} +9 -8
  5. package/dist/agent-scope-B8lptqCd.mjs +283 -0
  6. package/dist/agent-surface-drift-LS8zQgbq.mjs +1429 -0
  7. package/dist/{agents-CW-zTNKP.mjs → agents-BJaRQimo.mjs} +7 -6
  8. package/dist/{analytics-BZEwTK-8.mjs → analytics-Bx44lg6d.mjs} +1 -1
  9. package/dist/cli/index.mjs +29 -29
  10. package/dist/client/react.d.mts +1 -1
  11. package/dist/client/react.mjs +1 -1
  12. package/dist/{cloud-zs0qAnKJ.mjs → cloud-HWFlbfLJ.mjs} +4 -4
  13. package/dist/{cloud-ask-ai-BFlx8VMO.mjs → cloud-ask-ai-1k0q6OAH.mjs} +1 -1
  14. package/dist/{cloud-ask-ai-CMzYVzVX.d.mts → cloud-ask-ai-466g6uAi.d.mts} +1 -1
  15. package/dist/code-blocks-C9awWzEQ.mjs +871 -0
  16. package/dist/codeblocks-BzfkREEC.mjs +250 -0
  17. package/dist/{config-DhIyFsy9.mjs → config-CydaZ5PB.mjs} +52 -11
  18. package/dist/{dev-DFeVU2Ui.mjs → dev-BA2kRuCn.mjs} +3 -3
  19. package/dist/docs-cloud-server.d.mts +2 -2
  20. package/dist/docs-cloud-server.mjs +2 -2
  21. package/dist/{doctor-CkM5tKdD.mjs → doctor-CQpQ2zZm.mjs} +150 -32
  22. package/dist/{downgrade-Dj_KXV11.mjs → downgrade-BStNhyCc.mjs} +2 -2
  23. package/dist/index.d.mts +36 -17
  24. package/dist/index.mjs +6 -7
  25. package/dist/{init-Cmz-oqnp.mjs → init-gnHQ_Pz9.mjs} +3 -3
  26. package/dist/{mcp-B4Q1PN93.mjs → mcp-DnxZZWpY.mjs} +6 -5
  27. package/dist/mcp.d.mts +22 -4
  28. package/dist/mcp.mjs +520 -43
  29. package/dist/{package-version-DxnTZH4m.mjs → package-version-DRIc08EU.mjs} +1 -1
  30. package/dist/{reading-time-BuK2YL23.mjs → reading-time-BrTd3DIh.mjs} +2 -3
  31. package/dist/{review-BEsbm0l2.mjs → review-B6gyEFkD.mjs} +149 -14
  32. package/dist/{robots-BOwkq9du.mjs → robots-4BUJxlvV.mjs} +4 -5
  33. package/dist/{robots-C6uQG-fS.mjs → robots-DAptQnkx.mjs} +1 -1
  34. package/dist/{search-CJNLkdjX.mjs → search-CJIC1Cqo.mjs} +1 -2
  35. package/dist/{search-CtAXkk_J.mjs → search-CbPm2x5g.mjs} +6 -5
  36. package/dist/{search-CTu6Bvq-.d.mts → search-CfWvmVYA.d.mts} +1 -1
  37. package/dist/server.d.mts +108 -5
  38. package/dist/server.mjs +9 -9
  39. package/dist/{sitemap-OPb8EdNe.mjs → sitemap-D6nP3J1Q.mjs} +8 -7
  40. package/dist/{sitemap-server-DnilMEiZ.mjs → sitemap-server-wsNLyVkb.mjs} +1 -1
  41. package/dist/{types-CdKu8KmO.d.mts → types-BVgucdVm.d.mts} +77 -1
  42. package/dist/{upgrade-BNdBB9tQ.mjs → upgrade-CXYRNV0C.mjs} +2 -2
  43. package/package.json +1 -1
  44. package/dist/agent-2t4kZLGo.mjs +0 -10
  45. package/dist/agent-contract-b0akaPcg.mjs +0 -573
  46. package/dist/codeblocks-DWM4IJPL.mjs +0 -1710
  47. package/dist/review-BHdy75TE.mjs +0 -541
  48. /package/dist/{cloud-analytics-Dlk_byos.mjs → cloud-analytics-CSyFE6SS.mjs} +0 -0
  49. /package/dist/{errors-BxfYhp1L.mjs → errors-BFUtdZfC.mjs} +0 -0
  50. /package/dist/{templates-Bty9M6lA.mjs → templates-1Cod8KrJ.mjs} +0 -0
  51. /package/dist/{utils-CMZTjRQT.mjs → utils-DBCCkkJS.mjs} +0 -0
@@ -2354,11 +2354,77 @@ interface DocsAgentCompactConfig {
2354
2354
  */
2355
2355
  protectJson?: boolean;
2356
2356
  }
2357
+ interface DocsAgentGoldenTaskFilters {
2358
+ /** Limit retrieval to a framework such as `nextjs`, `astro`, or `nuxt`. */
2359
+ framework?: string;
2360
+ /** Limit retrieval to an exact documented version. */
2361
+ version?: string;
2362
+ /** Limit retrieval to a locale. */
2363
+ locale?: string;
2364
+ }
2365
+ interface DocsAgentGoldenTaskExpectation {
2366
+ /** Canonical page or section URLs that should answer this task. */
2367
+ relevantSources: string[];
2368
+ /** Additional sources that may be cited without reducing precision. */
2369
+ allowedSources?: string[];
2370
+ /** Sources that must not be selected, for example an obsolete version. */
2371
+ forbiddenSources?: string[];
2372
+ /** Citations that must appear. Defaults to `relevantSources`. */
2373
+ requiredCitations?: string[];
2374
+ /** Minimum relevant-source recall in the top K results. Defaults to `1`. */
2375
+ minRecallAtK?: number;
2376
+ /** Maximum acceptable rank for the first relevant source. Defaults to `topK`. */
2377
+ maxFirstRelevantRank?: number;
2378
+ /** Runnable examples that must be found in retrieved context. */
2379
+ examples?: DocsAgentGoldenExpectedExample[];
2380
+ /** Minimum share of context bytes that must come from relevant sources. */
2381
+ minUsefulByteRatio?: number;
2382
+ }
2383
+ interface DocsAgentGoldenExpectedExample {
2384
+ /** Canonical page or section URL containing the example. */
2385
+ source?: string;
2386
+ language?: string;
2387
+ framework?: string;
2388
+ packageManager?: string;
2389
+ title?: string;
2390
+ /** Defaults to true. Set false for an intentionally non-runnable example. */
2391
+ runnable?: boolean;
2392
+ /** Literal fragments that must occur in the example. */
2393
+ includes?: string[];
2394
+ }
2395
+ interface DocsAgentGoldenTask {
2396
+ /** Stable identifier shown in doctor/review reports. */
2397
+ id: string;
2398
+ /** User-shaped retrieval query. */
2399
+ query: string;
2400
+ /** Optional retrieval scope. */
2401
+ filters?: DocsAgentGoldenTaskFilters;
2402
+ /** Conservative context budget. Uses the MCP context UTF-8 accounting strategy. */
2403
+ tokenBudget?: number;
2404
+ /** Number of ranked search results to evaluate. */
2405
+ topK?: number;
2406
+ /** Deterministic expectations used to score the task. */
2407
+ expect: DocsAgentGoldenTaskExpectation;
2408
+ }
2409
+ interface DocsAgentEvaluationsConfig {
2410
+ /** Enable deterministic golden-task evaluation. */
2411
+ enabled?: boolean;
2412
+ /** Default conservative context budget for tasks that omit `tokenBudget`. */
2413
+ tokenBudget?: number;
2414
+ /** Default retrieval depth for tasks that omit `topK`. */
2415
+ topK?: number;
2416
+ /** Golden tasks evaluated offline by `docs doctor` and `docs review`. */
2417
+ tasks?: DocsAgentGoldenTask[];
2418
+ }
2357
2419
  interface DocsAgentConfig {
2358
2420
  /**
2359
2421
  * Defaults for `docs agent compact`.
2360
2422
  */
2361
2423
  compact?: DocsAgentCompactConfig;
2424
+ /**
2425
+ * Deterministic retrieval, citation, version, example, and token-budget evaluations.
2426
+ */
2427
+ evaluations?: boolean | DocsAgentEvaluationsConfig;
2362
2428
  }
2363
2429
  type DocsReviewSeverity = "off" | "suggestion" | "warn" | "error";
2364
2430
  type DocsReviewCiMode = "off" | "warn" | "block";
@@ -2379,6 +2445,16 @@ interface DocsReviewRulesConfig {
2379
2445
  runnableMetadata?: DocsReviewSeverity;
2380
2446
  /** Validate structured page agent contracts and suggest context for implementation-heavy pages. */
2381
2447
  agentContext?: DocsReviewSeverity;
2448
+ /** Statically validate commands referenced by agent contracts and runnable examples. */
2449
+ commandHealth?: DocsReviewSeverity;
2450
+ /** Require useful related-page coverage on actionable docs pages. */
2451
+ relatedCoverage?: DocsReviewSeverity;
2452
+ /** Report when docs.config could not be evaluated and only partial static parsing is available. */
2453
+ configConfidence?: DocsReviewSeverity;
2454
+ /** Detect disagreement between discovery, resolved config, and the public config schema. */
2455
+ agentSurfaceDrift?: DocsReviewSeverity;
2456
+ /** Run deterministic agent golden tasks and report failed or unmeasured behavior. */
2457
+ goldenTasks?: DocsReviewSeverity;
2382
2458
  }
2383
2459
  interface DocsReviewScoreConfig {
2384
2460
  /**
@@ -3078,4 +3154,4 @@ interface DocsConfig {
3078
3154
  og?: OGConfig;
3079
3155
  }
3080
3156
  //#endregion
3081
- export { DocsMcpConfig as $, OpenGraphImage as $t, DocsAskAIMcpConfig as A, DocsTelemetryAgentSurface as At, DocsCodeBlocksRunnerProvider as B, GithubConfig as Bt, DocsAnalyticsSource as C, TypesenseDocsSearchConfig as Cn, DocsSearchDocument as Ct, DocsAskAIFeedbackData as D, DocsSearchResultType as Dt, DocsAskAIFeedbackConfig as E, DocsSearchResult as Et, DocsCloudPublishConfig as F, DocsTelemetryFeatures as Ft, DocsFeedbackData as G, LlmsTxtSectionConfig as Gt, DocsCodeBlocksValidationMode as H, LlmsTxtConfig as Ht, DocsCodeBlocksConfig as I, DocsTelemetryFramework as It, DocsMcpAllowedOrigins as J, OpenDocsConfig as Jt, DocsFeedbackValue as K, McpDocsSearchConfig as Kt, DocsCodeBlocksPlannerConfig as L, DocsTheme as Lt, DocsCloudConfig as M, DocsTelemetryEvent as Mt, DocsCloudFeatureConfig as N, DocsTelemetryEventInput as Nt, DocsAskAIFeedbackMessage as O, DocsSearchSourcePage as Ot, DocsCloudPreviewConfig as P, DocsTelemetryEventType as Pt, DocsMcpAuthenticateResult as Q, OpenDocsTarget as Qt, DocsCodeBlocksPlannerProvider as R, FeedbackConfig as Rt, DocsAnalyticsInput as S, ThemeToggleConfig as Sn, DocsSearchConfig as St, DocsAskAIActionType as T, UIConfig as Tn, DocsSearchQuery as Tt, DocsCodeBlocksValidationPolicy as U, LlmsTxtMaxCharsConfig as Ut, DocsCodeBlocksValidateConfig as V, LastUpdatedConfig as Vt, DocsConfig as W, LlmsTxtMaxCharsMode as Wt, DocsMcpAuthenticate as X, OpenDocsProviderConfig as Xt, DocsMcpAuthPrincipal as Y, OpenDocsProvider as Yt, DocsMcpAuthenticateContext as Z, OpenDocsProviderId as Zt, DocsAgentTraceStatus as _, SidebarFolderNode as _n, DocsRobotsRule as _t, ApiReferenceRenderer as a, PageAgentFrontmatter as an, DocsNav as at, DocsAnalyticsEventInput as b, SidebarTree as bn, DocsSearchAdapterFactory as bt, ChangelogFrontmatter as c, PageOpenGraph as cn, DocsObservabilityEventInput as ct, CopyMarkdownFormat as d, ReadingTimeConfig as dn, DocsReviewCiMode as dt, OrderingItem as en, DocsMcpCorsConfig as et, CustomDocsSearchConfig as f, ReadingTimeFormat as fn, DocsReviewConfig as ft, DocsAgentTraceEventType as g, SidebarFolderIndexBehavior as gn, DocsRobotsConfig as gt, DocsAgentTraceEventInput as h, SidebarConfig as hn, DocsReviewSeverity as ht, ApiReferenceConfig as i, PageAgentFailureMode as in, DocsMetadata as it, DocsCloudApiKeyConfig as j, DocsTelemetryConfig as jt, DocsAskAIFeedbackValue as k, DocsSitemapConfig as kt, CodeBlockCopyData as l, PageSidebarFrontmatter as ln, DocsRelatedItem as lt, DocsAgentFeedbackData as m, SidebarComponentProps as mn, DocsReviewScoreConfig as mt, AgentFeedbackConfig as n, PageAgentAppliesTo as nn, DocsMcpSecurityConfig as nt, BreadcrumbConfig as o, PageAgentVerification as on, DocsObservabilityConfig as ot, DocsAgentFeedbackContext as p, ResolvedDocsRelatedLink as pn, DocsReviewRulesConfig as pt, DocsI18nConfig as q, OGConfig as qt, AlgoliaDocsSearchConfig as r, PageAgentCommand as rn, DocsMcpToolsConfig as rt, ChangelogConfig as s, PageFrontmatter as sn, DocsObservabilityEvent as st, AIConfig as t, PageActionsConfig as tn, DocsMcpOriginContext as tt, CopyMarkdownConfig as u, PageTwitter as un, DocsReviewCiConfig as ut, DocsAnalyticsConfig as v, SidebarNode as vn, DocsSearchAdapter as vt, DocsAskAIActionData as w, TypographyConfig as wn, DocsSearchEmbeddingsConfig as wt, DocsAnalyticsEventType as x, SimpleDocsSearchConfig as xn, DocsSearchChunkingConfig as xt, DocsAnalyticsEvent as y, SidebarPageNode as yn, DocsSearchAdapterContext as yt, DocsCodeBlocksRunnerConfig as z, FontStyle as zt };
3157
+ export { DocsFeedbackValue as $, McpDocsSearchConfig as $t, DocsAnalyticsSource as A, TypesenseDocsSearchConfig as An, DocsSearchDocument as At, DocsCloudFeatureConfig as B, DocsTelemetryEventInput as Bt, DocsAgentTraceEventType as C, SidebarFolderIndexBehavior as Cn, DocsRobotsConfig as Ct, DocsAnalyticsEventInput as D, SidebarTree as Dn, DocsSearchAdapterFactory as Dt, DocsAnalyticsEvent as E, SidebarPageNode as En, DocsSearchAdapterContext as Et, DocsAskAIFeedbackMessage as F, DocsSearchSourcePage as Ft, DocsCodeBlocksPlannerProvider as G, FeedbackConfig as Gt, DocsCloudPublishConfig as H, DocsTelemetryFeatures as Ht, DocsAskAIFeedbackValue as I, DocsSitemapConfig as It, DocsCodeBlocksValidateConfig as J, LastUpdatedConfig as Jt, DocsCodeBlocksRunnerConfig as K, FontStyle as Kt, DocsAskAIMcpConfig as L, DocsTelemetryAgentSurface as Lt, DocsAskAIActionType as M, UIConfig as Mn, DocsSearchQuery as Mt, DocsAskAIFeedbackConfig as N, DocsSearchResult as Nt, DocsAnalyticsEventType as O, SimpleDocsSearchConfig as On, DocsSearchChunkingConfig as Ot, DocsAskAIFeedbackData as P, DocsSearchResultType as Pt, DocsFeedbackData as Q, LlmsTxtSectionConfig as Qt, DocsCloudApiKeyConfig as R, DocsTelemetryConfig as Rt, DocsAgentTraceEventInput as S, SidebarConfig as Sn, DocsReviewSeverity as St, DocsAnalyticsConfig as T, SidebarNode as Tn, DocsSearchAdapter as Tt, DocsCodeBlocksConfig as U, DocsTelemetryFramework as Ut, DocsCloudPreviewConfig as V, DocsTelemetryEventType as Vt, DocsCodeBlocksPlannerConfig as W, DocsTheme as Wt, DocsCodeBlocksValidationPolicy as X, LlmsTxtMaxCharsConfig as Xt, DocsCodeBlocksValidationMode as Y, LlmsTxtConfig as Yt, DocsConfig as Z, LlmsTxtMaxCharsMode as Zt, DocsAgentFeedbackData as _, PageTwitter as _n, DocsReviewCiConfig as _t, ApiReferenceRenderer as a, OpenDocsTarget as an, DocsMcpAuthenticateResult as at, DocsAgentGoldenTaskExpectation as b, ResolvedDocsRelatedLink as bn, DocsReviewRulesConfig as bt, ChangelogFrontmatter as c, PageActionsConfig as cn, DocsMcpOriginContext as ct, CopyMarkdownFormat as d, PageAgentFailureMode as dn, DocsMetadata as dt, OGConfig as en, DocsI18nConfig as et, CustomDocsSearchConfig as f, PageAgentFrontmatter as fn, DocsNav as ft, DocsAgentFeedbackContext as g, PageSidebarFrontmatter as gn, DocsRelatedItem as gt, DocsAgentEvaluationsConfig as h, PageOpenGraph as hn, DocsObservabilityEventInput as ht, ApiReferenceConfig as i, OpenDocsProviderId as in, DocsMcpAuthenticateContext as it, DocsAskAIActionData as j, TypographyConfig as jn, DocsSearchEmbeddingsConfig as jt, DocsAnalyticsInput as k, ThemeToggleConfig as kn, DocsSearchConfig as kt, CodeBlockCopyData as l, PageAgentAppliesTo as ln, DocsMcpSecurityConfig as lt, DocsAgentConfig as m, PageFrontmatter as mn, DocsObservabilityEvent as mt, AgentFeedbackConfig as n, OpenDocsProvider as nn, DocsMcpAuthPrincipal as nt, BreadcrumbConfig as o, OpenGraphImage as on, DocsMcpConfig as ot, DocsAgentCompactConfig as p, PageAgentVerification as pn, DocsObservabilityConfig as pt, DocsCodeBlocksRunnerProvider as q, GithubConfig as qt, AlgoliaDocsSearchConfig as r, OpenDocsProviderConfig as rn, DocsMcpAuthenticate as rt, ChangelogConfig as s, OrderingItem as sn, DocsMcpCorsConfig as st, AIConfig as t, OpenDocsConfig as tn, DocsMcpAllowedOrigins as tt, CopyMarkdownConfig as u, PageAgentCommand as un, DocsMcpToolsConfig as ut, DocsAgentGoldenExpectedExample as v, ReadingTimeConfig as vn, DocsReviewCiMode as vt, DocsAgentTraceStatus as w, SidebarFolderNode as wn, DocsRobotsRule as wt, DocsAgentGoldenTaskFilters as x, SidebarComponentProps as xn, DocsReviewScoreConfig as xt, DocsAgentGoldenTask as y, ReadingTimeFormat as yn, DocsReviewConfig as yt, DocsCloudConfig as z, DocsTelemetryEvent as zt };
@@ -1,5 +1,5 @@
1
- import { c as fileExists, o as exec } from "./utils-CMZTjRQT.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-DxnTZH4m.mjs";
1
+ import { c as fileExists, o as exec } from "./utils-DBCCkkJS.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-DRIc08EU.mjs";
3
3
  import path from "node:path";
4
4
  import pc from "picocolors";
5
5
  import * as p from "@clack/prompts";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farming-labs/docs",
3
- "version": "0.2.53",
3
+ "version": "0.2.54",
4
4
  "description": "Modern, flexible MDX-based docs framework — core types, config, and CLI",
5
5
  "keywords": [
6
6
  "docs",
@@ -1,10 +0,0 @@
1
- import "./reading-time-BuK2YL23.mjs";
2
- import "./agent-contract-b0akaPcg.mjs";
3
- import "./agent-BMxMpEa0.mjs";
4
- import "./search-CJNLkdjX.mjs";
5
- import "./robots-C6uQG-fS.mjs";
6
- import "./sitemap-server-DnilMEiZ.mjs";
7
- import "./config-DhIyFsy9.mjs";
8
- import { a as readPageTokenBudget, i as printAgentCompactHelp, n as inspectAgentCompactionState, o as scanDocsPageTargets, r as parseAgentCompactArgs, t as compactAgentDocs } from "./codeblocks-DWM4IJPL.mjs";
9
-
10
- export { compactAgentDocs, parseAgentCompactArgs, printAgentCompactHelp };