@farming-labs/docs 0.2.56 → 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.
Files changed (44) hide show
  1. package/dist/{agent-3IpxY9F6.mjs → agent-BFtIbSyJ.mjs} +2 -2
  2. package/dist/agent-evals-BW0vEc-F.mjs +2144 -0
  3. package/dist/{agent-export-BtlITzt3.mjs → agent-export-vsdq0Huq.mjs} +6 -6
  4. package/dist/{agents-BguzxLhO.mjs → agents-ChKj-VYw.mjs} +6 -6
  5. package/dist/cli/index.mjs +29 -29
  6. package/dist/client/react.d.mts +1 -1
  7. package/dist/{cloud-HWFlbfLJ.mjs → cloud-BH_sHX64.mjs} +3 -3
  8. package/dist/{cloud-ask-ai-CvRVnwdK.d.mts → cloud-ask-ai-a5Juvlvh.d.mts} +1 -1
  9. package/dist/{code-blocks-C9awWzEQ.mjs → code-blocks-qe0T8-xe.mjs} +1 -1
  10. package/dist/{codeblocks-BzfkREEC.mjs → codeblocks-Bq67u32v.mjs} +2 -2
  11. package/dist/{config-CydaZ5PB.mjs → config-DASewQ0x.mjs} +18 -2
  12. package/dist/{dev-BA2kRuCn.mjs → dev-CAQlbguk.mjs} +2 -2
  13. package/dist/docs-cloud-server.d.mts +2 -2
  14. package/dist/docs-cloud-server.mjs +1 -1
  15. package/dist/{doctor-Cra5qEEi.mjs → doctor-H8gilyTg.mjs} +34 -31
  16. package/dist/{downgrade-BStNhyCc.mjs → downgrade-BZs86NVr.mjs} +2 -2
  17. package/dist/{agent-surface-drift-rGFS38Ak.mjs → golden-evaluations-BiUg5Xe_.mjs} +59 -3
  18. package/dist/index.d.mts +3 -3
  19. package/dist/index.mjs +3 -2
  20. package/dist/{init-gnHQ_Pz9.mjs → init-B_9ENq8Z.mjs} +3 -3
  21. package/dist/{mcp-BwYAu9DJ.mjs → mcp-CiNww-Wu.mjs} +5 -5
  22. package/dist/mcp.d.mts +1 -1
  23. package/dist/mcp.mjs +148 -6
  24. package/dist/metadata-3ljRN9MM.mjs +237 -0
  25. package/dist/{package-version-DRIc08EU.mjs → package-version-qik_4J6C.mjs} +1 -1
  26. package/dist/{reading-time-W_Id2ayC.mjs → reading-time-EaVom2cl.mjs} +2 -234
  27. package/dist/{review-x3zV5jZp.mjs → review-BEgX7ey7.mjs} +28 -27
  28. package/dist/{robots-BSPfXA3J.mjs → robots-CFlsfYdA.mjs} +2 -2
  29. package/dist/{search-9uEaC23e.d.mts → search-BblemZl4.d.mts} +25 -3
  30. package/dist/{search-OHp36znm.mjs → search-Bo9ubPVO.mjs} +149 -38
  31. package/dist/{search-vG59kGqo.mjs → search-CoajN9X1.mjs} +5 -5
  32. package/dist/server.d.mts +107 -6
  33. package/dist/server.mjs +5 -5
  34. package/dist/{sitemap-DqxsKlvI.mjs → sitemap-D_aXWPdJ.mjs} +6 -6
  35. package/dist/{types-R-DN23yw.d.mts → types-C1nPRXqo.d.mts} +90 -6
  36. package/dist/{upgrade-CXYRNV0C.mjs → upgrade-BCJTCW3O.mjs} +2 -2
  37. package/package.json +2 -2
  38. package/dist/agent-evals-BD17jOqL.mjs +0 -1166
  39. /package/dist/{agent-scope-B8lptqCd.mjs → agent-scope-CCaIY1aK.mjs} +0 -0
  40. /package/dist/{cloud-ask-ai-1k0q6OAH.mjs → cloud-ask-ai-hnJfj8-X.mjs} +0 -0
  41. /package/dist/{errors-BFUtdZfC.mjs → errors-CVqZ3kOO.mjs} +0 -0
  42. /package/dist/{sitemap-server-zFYctvCa.mjs → sitemap-server-BYwE0zXs.mjs} +0 -0
  43. /package/dist/{templates-1Cod8KrJ.mjs → templates-CfQjpDWW.mjs} +0 -0
  44. /package/dist/{utils-DBCCkkJS.mjs → utils-6UCLxv4B.mjs} +0 -0
package/dist/index.mjs CHANGED
@@ -1,8 +1,9 @@
1
- import { _ as extendTheme, a as resolveReadingTimeOptions, b as defineDocs, c as buildPageTwitter, d as resolveOGImage, f as resolveTitle, g as createTheme, h as runDocsAgentConformance, i as resolveReadingTimeFromSource, l as renderDocsPageStructuredDataJson, m as createDocsAgentContractCases, n as resolvePageReadingTime, o as buildDocsPageStructuredData, p as DOCS_AGENT_CONTRACT_VERSION, r as resolveReadingTimeFromContent, s as buildPageOpenGraph, t as estimateReadingTimeMinutes, u as resolveDocsMetadataBaseUrl, v as deepMerge, y as resolveChangelogConfig } from "./reading-time-W_Id2ayC.mjs";
1
+ import { a as resolveReadingTimeOptions, c as runDocsAgentConformance, d as deepMerge, f as resolveChangelogConfig, i as resolveReadingTimeFromSource, l as createTheme, n as resolvePageReadingTime, o as DOCS_AGENT_CONTRACT_VERSION, p as defineDocs, r as resolveReadingTimeFromContent, s as createDocsAgentContractCases, t as estimateReadingTimeMinutes, u as extendTheme } from "./reading-time-EaVom2cl.mjs";
2
2
  import { a as emitDocsAnalyticsEvent, c as resolveDocsAnalyticsConfig, i as emitDocsAgentTraceEvent, l as resolveDocsObservabilityConfig, n as createDocsAgentTraceContext, o as emitDocsObservabilityEvent, r as createDocsAgentTraceId, s as getDocsRequestAnalyticsProperties, t as DOCS_AGENT_TRACE_EVENT_TYPES } from "./analytics-Bx44lg6d.mjs";
3
3
  import { $ as normalizeDocsPathSegment, $t as stripGeneratedPageAgentContractMarkdown, A as DOCS_TRADITIONAL_BOT_USER_AGENT_HEADER_PATTERN, At as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, B as getDocsLlmsTxtMaxCharsIssue, Bt as toDocsSitemapMarkdownUrl, C as DEFAULT_OPENAPI_SCHEMA_ROUTE, D as DOCS_BOT_LIKE_USER_AGENT_HEADER_PATTERN, Dt as DEFAULT_SITEMAP_MANIFEST_PATH, E as DOCS_AI_AGENT_USER_AGENT_HEADER_PATTERN, Et as resolveDocsAudienceMdxContent, F as buildDocsDiagnostics, Ft as renderDocsSitemapMarkdown, G as isDocsAgentsRequest, Gt as PAGE_AGENT_CONTRACT_FIELD_SCHEMA, H as getDocsMarkdownVaryHeader, Ht as renderDocsRelatedMarkdownLines, I as buildDocsMcpEndpointCandidates, It as renderDocsSitemapXml, J as isDocsLlmsTxtPublicRequest, Jt as getPageAgentFrontmatterIssues, K as isDocsConfigRequest, Kt as PAGE_AGENT_CONTRACT_START_MARKER, L as createDocsMarkdownResponse, Lt as resolveDocsSitemapConfig, M as buildDocsAgentDiscoverySpec, Mt as buildDocsSitemapManifest, N as buildDocsAgentFeedbackSchema, Nt as createDocsSitemapResponse, Ot as DEFAULT_SITEMAP_MD_DOCS_ROUTE, P as buildDocsConfigMap, Pt as readDocsSitemapManifestFromContentMap, Q as matchesDocsLlmsTxtSection, Qt as renderPageAgentFrontmatterYamlLines, R as detectDocsMarkdownAgentRequest, Rt as resolveDocsSitemapPageLastmod, S as DEFAULT_MCP_WELL_KNOWN_ROUTE, St as findDocsAudienceMdxIssues, T as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, Tt as resolveDocsAudienceExposure, U as hasDocsMarkdownSignatureAgent, Ut as PAGE_AGENT_CONTRACT_END_MARKER, V as getDocsMarkdownCanonicalLinkHeader, Vt as normalizeDocsRelated, W as isDocsAgentDiscoveryRequest, Wt as PAGE_AGENT_CONTRACT_FIELDS, X as isDocsPublicGetRequest, Xt as normalizePageAgentFrontmatter, Y as isDocsMcpRequest, Yt as hasStructuredPageAgentContract, Z as isDocsSkillRequest, Zt as renderPageAgentContractMarkdown, _ as DEFAULT_LLMS_TXT_MAX_CHARS, _t as resolveDocsOpenApiDiscoveryConfig, a as DEFAULT_AGENT_MD_ROUTE, at as renderDocsMarkdownNotFound, b as DEFAULT_MCP_PUBLIC_ROUTE, bt as toDocsMarkdownUrl, c as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, ct as resolveDocsAgentFeedbackConfig, d as DEFAULT_DOCS_CONFIG_FORMAT, dt as resolveDocsLlmsTxtFormat, en as upsertPageAgentContractMarkdown, et as normalizeDocsUrlPath, f as DEFAULT_DOCS_CONFIG_ROUTE, ft as resolveDocsLlmsTxtRequest, g as DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, gt as resolveDocsMarkdownRequest, h as DEFAULT_LLMS_FULL_TXT_ROUTE, ht as resolveDocsMarkdownRecovery, i as DEFAULT_AGENT_FEEDBACK_ROUTE, it as renderDocsMarkdownDocument, j as acceptsDocsMarkdown, jt as DEFAULT_SITEMAP_XML_ROUTE, k as DOCS_MARKDOWN_SIGNATURE_AGENT_HEADER, kt as DEFAULT_SITEMAP_MD_ROUTE, l as DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, lt as resolveDocsAgentFeedbackRequest, m as DEFAULT_DOCS_DIAGNOSTICS_ROUTE, mt as resolveDocsMarkdownCanonicalUrl, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, nt as renderDocsAgentsDocument, o as DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, ot as renderDocsSkillDocument, p as DEFAULT_DOCS_DIAGNOSTICS_FORMAT, pt as resolveDocsLlmsTxtSections, q as isDocsDiagnosticsRequest, qt as PAGE_AGENT_STRUCTURED_CONTRACT_FIELDS, r as DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA, rt as renderDocsLlmsTxt, s as DEFAULT_AGENT_SPEC_ROUTE, st as resolveDocsAgentContractMcpTools, t as DEFAULT_AGENTS_MD_ROUTE, tt as parseDocsAgentFeedbackData, u as DEFAULT_DOCS_API_ROUTE, ut as resolveDocsAgentsFormat, v as DEFAULT_LLMS_TXT_ROUTE, vt as resolveDocsSkillFormat, w as DEFAULT_SKILL_MD_ROUTE, wt as resolveDocsAgentMdxContent, x as DEFAULT_MCP_ROUTE, xt as validateDocsAgentFeedbackPayload, y as DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE, yt as selectDocsLlmsTxtContent, z as findDocsMarkdownPage, zt as resolveDocsSitemapRequest } from "./agent-CxDzPqtl.mjs";
4
- import { A as getDocsTelemetryFeatures, C as resolvePageSidebarFolderIndexBehavior, D as emitDocsTelemetryEvent, E as emitDocsTelemetryAgentSurfaceEvent, M as isLocalDocsTelemetryOrigin, N as normalizeDocsTelemetryOrigin, O as emitDocsTelemetryMcpToolEvent, P as resolveDocsTelemetryConfig, S as applySidebarFolderIndexBehavior, T as resolveSidebarFolderIndexBehaviorForPath, _ as hashGeneratedAgentContent, a as createMcpSearchAdapter, b as serializeGeneratedAgentDocument, c as formatDocsAskAIPackageHints, d as resolveAskAISearchRequestConfig, f as resolveSearchRequestConfig, g as GENERATED_AGENT_PROVENANCE_VERSION, h as GENERATED_AGENT_PROVENANCE_MARKER, i as createCustomSearchAdapter, j as inferDocsTelemetryAgentSurface, k as emitDocsTelemetryProjectEvent, l as inferDocsAskAIPackageHints, n as buildDocsSearchDocuments, o as createSimpleSearchAdapter, r as createAlgoliaSearchAdapter, s as createTypesenseSearchAdapter, t as buildDocsAskAIContext, u as performDocsSearch, v as normalizeGeneratedAgentContent, w as resolveSidebarFolderIndexBehavior, x as stripGeneratedAgentProvenance, y as parseGeneratedAgentDocument } from "./search-OHp36znm.mjs";
4
+ import { A as getDocsTelemetryFeatures, C as resolvePageSidebarFolderIndexBehavior, D as emitDocsTelemetryEvent, E as emitDocsTelemetryAgentSurfaceEvent, M as isLocalDocsTelemetryOrigin, N as normalizeDocsTelemetryOrigin, O as emitDocsTelemetryMcpToolEvent, P as resolveDocsTelemetryConfig, S as applySidebarFolderIndexBehavior, T as resolveSidebarFolderIndexBehaviorForPath, _ as hashGeneratedAgentContent, a as createMcpSearchAdapter, b as serializeGeneratedAgentDocument, c as formatDocsAskAIPackageHints, d as resolveAskAISearchRequestConfig, f as resolveSearchRequestConfig, g as GENERATED_AGENT_PROVENANCE_VERSION, h as GENERATED_AGENT_PROVENANCE_MARKER, i as createCustomSearchAdapter, j as inferDocsTelemetryAgentSurface, k as emitDocsTelemetryProjectEvent, l as inferDocsAskAIPackageHints, n as buildDocsSearchDocuments, o as createSimpleSearchAdapter, r as createAlgoliaSearchAdapter, s as createTypesenseSearchAdapter, t as buildDocsAskAIContext, u as performDocsSearch, v as normalizeGeneratedAgentContent, w as resolveSidebarFolderIndexBehavior, x as stripGeneratedAgentProvenance, y as parseGeneratedAgentDocument } from "./search-Bo9ubPVO.mjs";
5
5
  import { n as resolveDocsLocale, r as resolveDocsPath, t as resolveDocsI18n } from "./i18n-CAlj1ADU.mjs";
6
6
  import { a as analyzeDocsRobotsTxt, c as renderDocsRobotsGeneratedBlock, d as resolveDocsRobotsRequest, f as upsertDocsRobotsGeneratedBlock, i as DOCS_ROBOTS_GENERATED_BLOCK_START, l as renderDocsRobotsTxt, n as DEFAULT_ROBOTS_TXT_ROUTE, o as createDocsRobotsResponse, r as DOCS_ROBOTS_GENERATED_BLOCK_END, s as getDocsRobotsAllowRoutes, t as DEFAULT_DOCS_AI_ROBOTS_USER_AGENTS, u as resolveDocsRobotsConfig } from "./robots-DRpoiYAV.mjs";
7
+ import { a as resolveDocsMetadataBaseUrl, i as renderDocsPageStructuredDataJson, n as buildPageOpenGraph, o as resolveOGImage, r as buildPageTwitter, s as resolveTitle, t as buildDocsPageStructuredData } from "./metadata-3ljRN9MM.mjs";
7
8
 
8
9
  export { DEFAULT_AGENTS_MD_ROUTE, DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA, DEFAULT_AGENT_FEEDBACK_ROUTE, DEFAULT_AGENT_MD_ROUTE, DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, DEFAULT_AGENT_SPEC_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, DEFAULT_DOCS_AI_ROBOTS_USER_AGENTS, DEFAULT_DOCS_API_ROUTE, DEFAULT_DOCS_CONFIG_FORMAT, DEFAULT_DOCS_CONFIG_ROUTE, DEFAULT_DOCS_DIAGNOSTICS_FORMAT, DEFAULT_DOCS_DIAGNOSTICS_ROUTE, DEFAULT_LLMS_FULL_TXT_ROUTE, DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, DEFAULT_LLMS_TXT_MAX_CHARS, DEFAULT_LLMS_TXT_ROUTE, DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE, DEFAULT_MCP_PUBLIC_ROUTE, DEFAULT_MCP_ROUTE, DEFAULT_MCP_WELL_KNOWN_ROUTE, DEFAULT_OPENAPI_SCHEMA_ROUTE, DEFAULT_ROBOTS_TXT_ROUTE, DEFAULT_SITEMAP_MANIFEST_PATH, DEFAULT_SITEMAP_MD_DOCS_ROUTE, DEFAULT_SITEMAP_MD_ROUTE, DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, DEFAULT_SITEMAP_XML_ROUTE, DEFAULT_SKILL_MD_ROUTE, DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, DOCS_AGENT_CONTRACT_VERSION, DOCS_AGENT_TRACE_EVENT_TYPES, DOCS_AI_AGENT_USER_AGENT_HEADER_PATTERN, DOCS_BOT_LIKE_USER_AGENT_HEADER_PATTERN, DOCS_MARKDOWN_SIGNATURE_AGENT_HEADER, DOCS_ROBOTS_GENERATED_BLOCK_END, DOCS_ROBOTS_GENERATED_BLOCK_START, DOCS_TRADITIONAL_BOT_USER_AGENT_HEADER_PATTERN, GENERATED_AGENT_PROVENANCE_MARKER, GENERATED_AGENT_PROVENANCE_VERSION, PAGE_AGENT_CONTRACT_END_MARKER, PAGE_AGENT_CONTRACT_FIELDS, PAGE_AGENT_CONTRACT_FIELD_SCHEMA, PAGE_AGENT_CONTRACT_START_MARKER, PAGE_AGENT_STRUCTURED_CONTRACT_FIELDS, acceptsDocsMarkdown, analyzeDocsRobotsTxt, applySidebarFolderIndexBehavior, buildDocsAgentDiscoverySpec, buildDocsAgentFeedbackSchema, buildDocsAskAIContext, buildDocsConfigMap, buildDocsDiagnostics, buildDocsMcpEndpointCandidates, buildDocsPageStructuredData, buildDocsSearchDocuments, buildDocsSitemapManifest, buildPageOpenGraph, buildPageTwitter, createAlgoliaSearchAdapter, createCustomSearchAdapter, createDocsAgentContractCases, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsMarkdownResponse, createDocsRobotsResponse, createDocsSitemapResponse, createMcpSearchAdapter, createSimpleSearchAdapter, createTheme, createTypesenseSearchAdapter, deepMerge, defineDocs, detectDocsMarkdownAgentRequest, emitDocsAgentTraceEvent, emitDocsAnalyticsEvent, emitDocsObservabilityEvent, emitDocsTelemetryAgentSurfaceEvent, emitDocsTelemetryEvent, emitDocsTelemetryMcpToolEvent, emitDocsTelemetryProjectEvent, estimateReadingTimeMinutes, extendTheme, findDocsAudienceMdxIssues, findDocsMarkdownPage, formatDocsAskAIPackageHints, getDocsLlmsTxtMaxCharsIssue, getDocsMarkdownCanonicalLinkHeader, getDocsMarkdownVaryHeader, getDocsRequestAnalyticsProperties, getDocsRobotsAllowRoutes, getDocsTelemetryFeatures, getPageAgentFrontmatterIssues, hasDocsMarkdownSignatureAgent, hasStructuredPageAgentContract, hashGeneratedAgentContent, inferDocsAskAIPackageHints, inferDocsTelemetryAgentSurface, isDocsAgentDiscoveryRequest, isDocsAgentsRequest, isDocsConfigRequest, isDocsDiagnosticsRequest, isDocsLlmsTxtPublicRequest, isDocsMcpRequest, isDocsPublicGetRequest, isDocsSkillRequest, isLocalDocsTelemetryOrigin, matchesDocsLlmsTxtSection, normalizeDocsPathSegment, normalizeDocsRelated, normalizeDocsTelemetryOrigin, normalizeDocsUrlPath, normalizeGeneratedAgentContent, normalizePageAgentFrontmatter, parseDocsAgentFeedbackData, parseGeneratedAgentDocument, performDocsSearch, readDocsSitemapManifestFromContentMap, renderDocsAgentsDocument, renderDocsLlmsTxt, renderDocsMarkdownDocument, renderDocsMarkdownNotFound, renderDocsPageStructuredDataJson, renderDocsRelatedMarkdownLines, renderDocsRobotsGeneratedBlock, renderDocsRobotsTxt, renderDocsSitemapMarkdown, renderDocsSitemapXml, renderDocsSkillDocument, renderPageAgentContractMarkdown, renderPageAgentFrontmatterYamlLines, resolveAskAISearchRequestConfig, resolveChangelogConfig, resolveDocsAgentContractMcpTools, resolveDocsAgentFeedbackConfig, resolveDocsAgentFeedbackRequest, resolveDocsAgentMdxContent, resolveDocsAgentsFormat, resolveDocsAnalyticsConfig, resolveDocsAudienceExposure, resolveDocsAudienceMdxContent, resolveDocsI18n, resolveDocsLlmsTxtFormat, resolveDocsLlmsTxtRequest, resolveDocsLlmsTxtSections, resolveDocsLocale, resolveDocsMarkdownCanonicalUrl, resolveDocsMarkdownRecovery, resolveDocsMarkdownRequest, resolveDocsMetadataBaseUrl, resolveDocsObservabilityConfig, resolveDocsOpenApiDiscoveryConfig, resolveDocsPath, resolveDocsRobotsConfig, resolveDocsRobotsRequest, resolveDocsSitemapConfig, resolveDocsSitemapPageLastmod, resolveDocsSitemapRequest, resolveDocsSkillFormat, resolveDocsTelemetryConfig, resolveOGImage, resolvePageReadingTime, resolvePageSidebarFolderIndexBehavior, resolveReadingTimeFromContent, resolveReadingTimeFromSource, resolveReadingTimeOptions, resolveSearchRequestConfig, resolveSidebarFolderIndexBehavior, resolveSidebarFolderIndexBehaviorForPath, resolveTitle, runDocsAgentConformance, selectDocsLlmsTxtContent, serializeGeneratedAgentDocument, stripGeneratedAgentProvenance, stripGeneratedPageAgentContractMarkdown, toDocsMarkdownUrl, toDocsSitemapMarkdownUrl, upsertDocsRobotsGeneratedBlock, upsertPageAgentContractMarkdown, validateDocsAgentFeedbackPayload };
@@ -1,5 +1,5 @@
1
- import { a as devInstallCommand, c as fileExists, d as readFileSafe, f as spawnAndWaitFor, i as detectPackageManagerFromProject, l as formatPackageManagerDetection, n as detectGlobalCssFiles, o as exec, p as writeFileSafe, r as detectNextAppDir, t as detectFramework, u as installCommand } from "./utils-DBCCkkJS.mjs";
2
- import { $ as svelteDocsPublicHookTemplate, A as nextConfigMergedTemplate, B as nuxtServerApiDocsRouteTemplate, C as injectRootProviderIntoLayout, D as injectTanstackVitePlugins, E as injectTanstackRootProviderIntoRoute, F as nuxtDocsConfigTemplate, G as quickstartPageTemplate, H as nuxtServerDocsPublicMiddlewareTemplate, I as nuxtDocsPageTemplate, J as svelteDocsApiRouteTemplate, K as rootLayoutTemplate, L as nuxtGlobalCssTemplate, M as nextLocaleDocPageTemplate, N as nextLocalizedPageTemplate, O as installationPageTemplate, P as nuxtConfigTemplate, Q as svelteDocsPageTemplate, R as nuxtInstallationPageTemplate, S as injectNuxtCssImport, T as injectSvelteDocsPublicHook, U as nuxtWelcomePageTemplate, V as nuxtServerApiReferenceRouteTemplate, W as postcssConfigTemplate, X as svelteDocsLayoutServerTemplate, Y as svelteDocsConfigTemplate, Z as svelteDocsLayoutTemplate, _ as getAstroAdapterPkg, _t as tanstackViteConfigTemplate, a as astroDocsIndexTemplate, at as svelteWelcomePageTemplate, b as injectAstroDocsMiddleware, bt as welcomePageTemplate, c as astroDocsServerTemplate, ct as tanstackDocsCatchAllRouteTemplate, d as astroQuickstartPageTemplate, dt as tanstackDocsIndexRouteTemplate, et as svelteDocsServerTemplate, f as astroWelcomePageTemplate, ft as tanstackDocsPublicRouteTemplate, g as docsLayoutTemplate, gt as tanstackRootRouteTemplate, h as docsConfigTemplate, ht as tanstackQuickstartPageTemplate, i as astroDocsConfigTemplate, it as svelteRootLayoutTemplate, j as nextConfigTemplate, k as nextApiReferencePageTemplate, l as astroGlobalCssTemplate, lt as tanstackDocsConfigTemplate, m as customThemeTsTemplate, mt as tanstackInstallationPageTemplate, n as astroApiRouteTemplate, nt as svelteInstallationPageTemplate, o as astroDocsMiddlewareTemplate, ot as tanstackApiDocsRouteTemplate, p as customThemeCssTemplate, pt as tanstackDocsServerTemplate, q as svelteApiReferenceRouteTemplate, r as astroConfigTemplate, rt as svelteQuickstartPageTemplate, s as astroDocsPageTemplate, st as tanstackApiReferenceRouteTemplate, t as astroApiReferenceRouteTemplate, tt as svelteGlobalCssTemplate, u as astroInstallationPageTemplate, ut as tanstackDocsFunctionsTemplate, v as globalCssTemplate, vt as tanstackWelcomePageTemplate, w as injectSvelteCssImport, x as injectCssImport, y as injectAstroCssImport, yt as tsconfigTemplate, z as nuxtQuickstartPageTemplate } from "./templates-1Cod8KrJ.mjs";
1
+ import { a as devInstallCommand, c as fileExists, d as readFileSafe, f as spawnAndWaitFor, i as detectPackageManagerFromProject, l as formatPackageManagerDetection, n as detectGlobalCssFiles, o as exec, p as writeFileSafe, r as detectNextAppDir, t as detectFramework, u as installCommand } from "./utils-6UCLxv4B.mjs";
2
+ import { $ as svelteDocsPublicHookTemplate, A as nextConfigMergedTemplate, B as nuxtServerApiDocsRouteTemplate, C as injectRootProviderIntoLayout, D as injectTanstackVitePlugins, E as injectTanstackRootProviderIntoRoute, F as nuxtDocsConfigTemplate, G as quickstartPageTemplate, H as nuxtServerDocsPublicMiddlewareTemplate, I as nuxtDocsPageTemplate, J as svelteDocsApiRouteTemplate, K as rootLayoutTemplate, L as nuxtGlobalCssTemplate, M as nextLocaleDocPageTemplate, N as nextLocalizedPageTemplate, O as installationPageTemplate, P as nuxtConfigTemplate, Q as svelteDocsPageTemplate, R as nuxtInstallationPageTemplate, S as injectNuxtCssImport, T as injectSvelteDocsPublicHook, U as nuxtWelcomePageTemplate, V as nuxtServerApiReferenceRouteTemplate, W as postcssConfigTemplate, X as svelteDocsLayoutServerTemplate, Y as svelteDocsConfigTemplate, Z as svelteDocsLayoutTemplate, _ as getAstroAdapterPkg, _t as tanstackViteConfigTemplate, a as astroDocsIndexTemplate, at as svelteWelcomePageTemplate, b as injectAstroDocsMiddleware, bt as welcomePageTemplate, c as astroDocsServerTemplate, ct as tanstackDocsCatchAllRouteTemplate, d as astroQuickstartPageTemplate, dt as tanstackDocsIndexRouteTemplate, et as svelteDocsServerTemplate, f as astroWelcomePageTemplate, ft as tanstackDocsPublicRouteTemplate, g as docsLayoutTemplate, gt as tanstackRootRouteTemplate, h as docsConfigTemplate, ht as tanstackQuickstartPageTemplate, i as astroDocsConfigTemplate, it as svelteRootLayoutTemplate, j as nextConfigTemplate, k as nextApiReferencePageTemplate, l as astroGlobalCssTemplate, lt as tanstackDocsConfigTemplate, m as customThemeTsTemplate, mt as tanstackInstallationPageTemplate, n as astroApiRouteTemplate, nt as svelteInstallationPageTemplate, o as astroDocsMiddlewareTemplate, ot as tanstackApiDocsRouteTemplate, p as customThemeCssTemplate, pt as tanstackDocsServerTemplate, q as svelteApiReferenceRouteTemplate, r as astroConfigTemplate, rt as svelteQuickstartPageTemplate, s as astroDocsPageTemplate, st as tanstackApiReferenceRouteTemplate, t as astroApiReferenceRouteTemplate, tt as svelteGlobalCssTemplate, u as astroInstallationPageTemplate, ut as tanstackDocsFunctionsTemplate, v as globalCssTemplate, vt as tanstackWelcomePageTemplate, w as injectSvelteCssImport, x as injectCssImport, y as injectAstroCssImport, yt as tsconfigTemplate, z as nuxtQuickstartPageTemplate } from "./templates-CfQjpDWW.mjs";
3
3
  import fs from "node:fs";
4
4
  import path from "node:path";
5
5
  import pc from "picocolors";
@@ -188,7 +188,7 @@ async function configureDocsCloudOnboarding(options) {
188
188
  enabled = cloudAnswer;
189
189
  }
190
190
  if (!enabled) return;
191
- const { initCloudConfig } = await import("./cloud-HWFlbfLJ.mjs");
191
+ const { initCloudConfig } = await import("./cloud-BH_sHX64.mjs");
192
192
  printDocsCloudOnboardingInstructions(await initCloudConfig({
193
193
  rootDir: options.rootDir,
194
194
  configPath: getDocsCloudConfigPathForFramework(options.framework)
@@ -1,11 +1,11 @@
1
1
  import "./agent-CxDzPqtl.mjs";
2
- import "./search-OHp36znm.mjs";
3
- import "./sitemap-server-zFYctvCa.mjs";
4
- import "./agent-evals-BD17jOqL.mjs";
2
+ import "./search-Bo9ubPVO.mjs";
3
+ import "./sitemap-server-BYwE0zXs.mjs";
4
+ import "./agent-evals-BW0vEc-F.mjs";
5
5
  import { createFilesystemDocsMcpSource, resolveDocsMcpConfig, runDocsMcpStdio } from "./mcp.mjs";
6
- import "./code-blocks-C9awWzEQ.mjs";
6
+ import "./code-blocks-qe0T8-xe.mjs";
7
7
  import "./server.mjs";
8
- import { d as readStringProperty, h as resolveDocsContentDir, l as readNavTitle, m as resolveDocsConfigPath, n as extractObjectLiteral, s as readBooleanProperty } from "./config-CydaZ5PB.mjs";
8
+ import { d as readStringProperty, h as resolveDocsContentDir, l as readNavTitle, m as resolveDocsConfigPath, n as extractObjectLiteral, s as readBooleanProperty } from "./config-DASewQ0x.mjs";
9
9
  import { readFileSync } from "node:fs";
10
10
  import pc from "picocolors";
11
11
 
package/dist/mcp.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { Ft as DocsSearchSourcePage, Rt as DocsTelemetryConfig, T as DocsAnalyticsConfig, Ut as DocsTelemetryFramework, fn as PageAgentFrontmatter, kt as DocsSearchConfig, nt as DocsMcpAuthPrincipal, ot as DocsMcpConfig, pt as DocsObservabilityConfig, rt as DocsMcpAuthenticate, sn as OrderingItem, tt as DocsMcpAllowedOrigins } from "./types-R-DN23yw.mjs";
1
+ import { $t as DocsTelemetryFramework, Ct as DocsObservabilityConfig, F as DocsAnalyticsConfig, Gt as DocsSearchSourcePage, Jt as DocsTelemetryConfig, Sn as PageAgentFrontmatter, _n as OrderingItem, dt as DocsMcpAllowedOrigins, ft as DocsMcpAuthPrincipal, gt as DocsMcpConfig, pt as DocsMcpAuthenticate, zt as DocsSearchConfig } from "./types-C1nPRXqo.mjs";
2
2
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
3
 
4
4
  //#region src/mcp.d.ts
package/dist/mcp.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { a as emitDocsAnalyticsEvent, i as emitDocsAgentTraceEvent, n as createDocsAgentTraceContext, r as createDocsAgentTraceId } from "./analytics-Bx44lg6d.mjs";
2
2
  import { Et as resolveDocsAudienceMdxContent, Ht as renderDocsRelatedMarkdownLines, Vt as normalizeDocsRelated, Xt as normalizePageAgentFrontmatter, Yt as hasStructuredPageAgentContract, en as upsertPageAgentContractMarkdown } from "./agent-CxDzPqtl.mjs";
3
- import { C as resolvePageSidebarFolderIndexBehavior, E as emitDocsTelemetryAgentSurfaceEvent, O as emitDocsTelemetryMcpToolEvent, k as emitDocsTelemetryProjectEvent, m as parseDocsMarkdownSections, p as findDocsMarkdownSection, u as performDocsSearch, x as stripGeneratedAgentProvenance } from "./search-OHp36znm.mjs";
4
- import { a as normalizeAgentScopeValues, i as normalizeAgentLocale, n as agentVersionConstraintsOverlap, r as normalizeAgentFramework, t as agentVersionConstraintMatches } from "./agent-scope-B8lptqCd.mjs";
3
+ import { C as resolvePageSidebarFolderIndexBehavior, E as emitDocsTelemetryAgentSurfaceEvent, O as emitDocsTelemetryMcpToolEvent, k as emitDocsTelemetryProjectEvent, m as parseDocsMarkdownSections, p as findDocsMarkdownSection, u as performDocsSearch, x as stripGeneratedAgentProvenance } from "./search-Bo9ubPVO.mjs";
4
+ import { a as normalizeAgentScopeValues, i as normalizeAgentLocale, n as agentVersionConstraintsOverlap, r as normalizeAgentFramework, t as agentVersionConstraintMatches } from "./agent-scope-CCaIY1aK.mjs";
5
5
  import matter from "gray-matter";
6
6
  import fs from "node:fs";
7
7
  import path from "node:path";
@@ -220,7 +220,7 @@ const DOCS_CONFIG_SCHEMA_OPTIONS_TEMPLATE = [
220
220
  path: "agent",
221
221
  name: "agent",
222
222
  type: "DocsAgentConfig",
223
- description: "Agent compaction defaults and deterministic usefulness evaluations.",
223
+ description: "Agent compaction defaults and offline-by-default usefulness evaluations.",
224
224
  docs: "/docs/getting-started/agent-ready-docs",
225
225
  children: [{
226
226
  path: "agent.compact",
@@ -282,7 +282,7 @@ const DOCS_CONFIG_SCHEMA_OPTIONS_TEMPLATE = [
282
282
  path: "agent.evaluations",
283
283
  name: "evaluations",
284
284
  type: "boolean | DocsAgentEvaluationsConfig",
285
- description: "Deterministic golden tasks for retrieval, citation, version, example, and budget evaluation.",
285
+ description: "Offline-by-default golden tasks for retrieval, citation, version, example, answer, and budget evaluation, with explicit external-provider and execution opt-ins.",
286
286
  children: [
287
287
  {
288
288
  path: "agent.evaluations.enabled",
@@ -305,11 +305,77 @@ const DOCS_CONFIG_SCHEMA_OPTIONS_TEMPLATE = [
305
305
  default: 5,
306
306
  description: "Default number of ranked search results evaluated per task."
307
307
  },
308
+ {
309
+ path: "agent.evaluations.surface",
310
+ name: "surface",
311
+ type: "\"mcp-context\" | \"configured-search\" | \"ask-ai-context\"",
312
+ default: "mcp-context",
313
+ description: "Retrieval/context surface measured by the golden task suite."
314
+ },
315
+ {
316
+ path: "agent.evaluations.allowNetwork",
317
+ name: "allowNetwork",
318
+ type: "boolean",
319
+ default: false,
320
+ description: "Allow external search, HTTP answers, and explicit executable-example verification during evaluation."
321
+ },
322
+ {
323
+ path: "agent.evaluations.searchTimeoutMs",
324
+ name: "searchTimeoutMs",
325
+ type: "number",
326
+ default: 3e4,
327
+ description: "Per-task configured search and Ask AI retrieval timeout in milliseconds."
328
+ },
329
+ {
330
+ path: "agent.evaluations.answer",
331
+ name: "answer",
332
+ type: "DocsAgentEvaluationAnswerProvider",
333
+ description: "Opt-in callback or HTTP provider used to evaluate actual generated answers and citations.",
334
+ children: [
335
+ {
336
+ path: "agent.evaluations.answer.provider",
337
+ name: "provider",
338
+ type: "\"callback\" | \"http\"",
339
+ description: "Answer evaluation provider kind."
340
+ },
341
+ {
342
+ path: "agent.evaluations.answer.run",
343
+ name: "run",
344
+ type: "DocsAgentEvaluationAnswerRunner",
345
+ description: "Callback invoked with retrieved context and source references."
346
+ },
347
+ {
348
+ path: "agent.evaluations.answer.endpoint",
349
+ name: "endpoint",
350
+ type: "string",
351
+ description: "HTTP endpoint used by the opt-in HTTP answer provider."
352
+ },
353
+ {
354
+ path: "agent.evaluations.answer.headers",
355
+ name: "headers",
356
+ type: "Record<string, string>",
357
+ description: "Optional HTTP request headers; values are never reported.",
358
+ children: [{
359
+ path: "agent.evaluations.answer.headers.*",
360
+ name: "header",
361
+ type: "string",
362
+ description: "One custom HTTP header value."
363
+ }]
364
+ },
365
+ {
366
+ path: "agent.evaluations.answer.timeoutMs",
367
+ name: "timeoutMs",
368
+ type: "number",
369
+ default: 3e4,
370
+ description: "Callback or HTTP answer provider timeout in milliseconds."
371
+ }
372
+ ]
373
+ },
308
374
  {
309
375
  path: "agent.evaluations.tasks",
310
376
  name: "tasks",
311
377
  type: "DocsAgentGoldenTask[]",
312
- description: "Offline golden task fixtures evaluated by docs doctor and docs review.",
378
+ description: "Golden task fixtures evaluated by docs doctor and docs review; the default MCP context surface runs offline.",
313
379
  children: [
314
380
  {
315
381
  path: "agent.evaluations.tasks[]",
@@ -341,6 +407,12 @@ const DOCS_CONFIG_SCHEMA_OPTIONS_TEMPLATE = [
341
407
  type: "number",
342
408
  description: "Per-task ranked retrieval depth override."
343
409
  },
410
+ {
411
+ path: "agent.evaluations.tasks[].surface",
412
+ name: "surface",
413
+ type: "\"mcp-context\" | \"configured-search\" | \"ask-ai-context\"",
414
+ description: "Per-task evaluation surface override."
415
+ },
344
416
  {
345
417
  path: "agent.evaluations.tasks[].filters",
346
418
  name: "filters",
@@ -371,7 +443,7 @@ const DOCS_CONFIG_SCHEMA_OPTIONS_TEMPLATE = [
371
443
  path: "agent.evaluations.tasks[].expect",
372
444
  name: "expect",
373
445
  type: "DocsAgentGoldenTaskExpectation",
374
- description: "Deterministic sources, rank, citation, example, and budget expectations.",
446
+ description: "Evaluator-only source, rank, citation, scope, answer, example, and budget expectations.",
375
447
  children: [
376
448
  {
377
449
  path: "agent.evaluations.tasks[].expect.relevantSources",
@@ -416,6 +488,70 @@ const DOCS_CONFIG_SCHEMA_OPTIONS_TEMPLATE = [
416
488
  type: "number",
417
489
  description: "Minimum share of context bytes supplied by relevant sources."
418
490
  },
491
+ {
492
+ path: "agent.evaluations.tasks[].expect.scope",
493
+ name: "scope",
494
+ type: "DocsAgentGoldenTaskFilters",
495
+ description: "Framework, version, and locale assertions checked against returned sources without pre-filtering retrieval.",
496
+ children: [
497
+ {
498
+ path: "agent.evaluations.tasks[].expect.scope.framework",
499
+ name: "framework",
500
+ type: "string",
501
+ description: "Framework the returned sources must select."
502
+ },
503
+ {
504
+ path: "agent.evaluations.tasks[].expect.scope.version",
505
+ name: "version",
506
+ type: "string",
507
+ description: "Version the returned sources must select."
508
+ },
509
+ {
510
+ path: "agent.evaluations.tasks[].expect.scope.locale",
511
+ name: "locale",
512
+ type: "string",
513
+ description: "Locale the returned sources must select."
514
+ }
515
+ ]
516
+ },
517
+ {
518
+ path: "agent.evaluations.tasks[].expect.answer",
519
+ name: "answer",
520
+ type: "DocsAgentGoldenAnswerExpectation",
521
+ description: "Required answer text and citation assertions for an explicitly configured answer provider.",
522
+ children: [
523
+ {
524
+ path: "agent.evaluations.tasks[].expect.answer.includes",
525
+ name: "includes",
526
+ type: "string[]",
527
+ description: "Literal fragments required in the actual answer."
528
+ },
529
+ {
530
+ path: "agent.evaluations.tasks[].expect.answer.excludes",
531
+ name: "excludes",
532
+ type: "string[]",
533
+ description: "Literal fragments forbidden in the actual answer."
534
+ },
535
+ {
536
+ path: "agent.evaluations.tasks[].expect.answer.requiredCitations",
537
+ name: "requiredCitations",
538
+ type: "string[]",
539
+ description: "Citations required in the actual answer."
540
+ },
541
+ {
542
+ path: "agent.evaluations.tasks[].expect.answer.allowedCitations",
543
+ name: "allowedCitations",
544
+ type: "string[]",
545
+ description: "Additional valid actual-answer citations."
546
+ },
547
+ {
548
+ path: "agent.evaluations.tasks[].expect.answer.forbiddenCitations",
549
+ name: "forbiddenCitations",
550
+ type: "string[]",
551
+ description: "Citations forbidden in the actual answer."
552
+ }
553
+ ]
554
+ },
419
555
  {
420
556
  path: "agent.evaluations.tasks[].expect.examples",
421
557
  name: "examples",
@@ -470,6 +606,12 @@ const DOCS_CONFIG_SCHEMA_OPTIONS_TEMPLATE = [
470
606
  name: "includes",
471
607
  type: "string[]",
472
608
  description: "Literal code fragments that must appear."
609
+ },
610
+ {
611
+ path: "agent.evaluations.tasks[].expect.examples[].verification",
612
+ name: "verification",
613
+ type: "\"present\" | \"syntax\" | \"execute\"",
614
+ description: "Required verification strength; defaults to present when runnable is false and syntax otherwise. Runtime execution is always explicit."
473
615
  }
474
616
  ]
475
617
  }
@@ -0,0 +1,237 @@
1
+ import { Xt as normalizePageAgentFrontmatter, Yt as hasStructuredPageAgentContract } from "./agent-CxDzPqtl.mjs";
2
+
3
+ //#region src/metadata.ts
4
+ /**
5
+ * Resolve page title using metadata titleTemplate.
6
+ * %s is replaced with page title.
7
+ */
8
+ function resolveTitle(pageTitle, metadata) {
9
+ return (metadata?.titleTemplate ?? "%s").replace("%s", pageTitle);
10
+ }
11
+ /**
12
+ * Resolve OG image URL for a page.
13
+ * Prefers page.openGraph.images[0], then page.ogImage, then config endpoint/default.
14
+ */
15
+ function resolveOGImage(page, ogConfig, baseUrl) {
16
+ if (page.openGraph?.images?.length) return resolveImageUrl(page.openGraph.images[0].url, baseUrl);
17
+ if (!ogConfig?.enabled) return void 0;
18
+ if (page.ogImage) return resolveImageUrl(page.ogImage, baseUrl);
19
+ if (ogConfig.type === "dynamic" && ogConfig.endpoint) return `${baseUrl ?? ""}${ogConfig.endpoint}`;
20
+ return ogConfig.defaultImage;
21
+ }
22
+ function resolveImageUrl(url, baseUrl) {
23
+ if (url.startsWith("/") || url.startsWith("http")) return url;
24
+ const base = baseUrl ?? "";
25
+ return `${base}${base.length > 0 && !base.endsWith("/") ? "/" : ""}${url}`;
26
+ }
27
+ /**
28
+ * Build the Open Graph metadata object for a page.
29
+ * When the page has openGraph in frontmatter, uses it (with title/description filled from page if omitted).
30
+ * Otherwise uses ogImage or config (dynamic endpoint / defaultImage).
31
+ */
32
+ function buildPageOpenGraph(page, ogConfig, baseUrl) {
33
+ if (page.openGraph) {
34
+ const images = page.openGraph.images?.length ? page.openGraph.images.map((img) => ({
35
+ url: resolveImageUrl(img.url, baseUrl),
36
+ width: img.width ?? 1200,
37
+ height: img.height ?? 630
38
+ })) : void 0;
39
+ return {
40
+ title: page.openGraph.title ?? page.title,
41
+ description: page.openGraph.description ?? page.description,
42
+ ...images && { images }
43
+ };
44
+ }
45
+ const url = resolveOGImage(page, ogConfig, baseUrl);
46
+ if (!url) return void 0;
47
+ return {
48
+ title: page.title,
49
+ ...page.description && { description: page.description },
50
+ images: [{
51
+ url,
52
+ width: 1200,
53
+ height: 630
54
+ }]
55
+ };
56
+ }
57
+ /**
58
+ * Build the Twitter card metadata object for a page.
59
+ * When the page has twitter in frontmatter, uses it.
60
+ * Otherwise builds from ogImage or config (dynamic endpoint).
61
+ */
62
+ function buildPageTwitter(page, ogConfig, baseUrl) {
63
+ if (page.twitter) {
64
+ const images = page.twitter.images?.length ? page.twitter.images.map((url) => resolveImageUrl(url, baseUrl)) : void 0;
65
+ return {
66
+ ...page.twitter.card && { card: page.twitter.card },
67
+ ...page.twitter.title !== void 0 && { title: page.twitter.title },
68
+ ...page.twitter.description !== void 0 && { description: page.twitter.description },
69
+ ...images && { images }
70
+ };
71
+ }
72
+ const url = resolveOGImage(page, ogConfig, baseUrl);
73
+ if (!url) return void 0;
74
+ return {
75
+ card: "summary_large_image",
76
+ title: page.title,
77
+ ...page.description && { description: page.description },
78
+ images: [url]
79
+ };
80
+ }
81
+ function normalizeBaseUrl(value) {
82
+ if (!value) return void 0;
83
+ try {
84
+ const url = new URL(value);
85
+ if (url.protocol !== "http:" && url.protocol !== "https:") return void 0;
86
+ return url.toString().replace(/\/+$/, "");
87
+ } catch {
88
+ return;
89
+ }
90
+ }
91
+ function absolutizeUrl(url, baseUrl) {
92
+ const base = normalizeBaseUrl(baseUrl);
93
+ if (!base) return url;
94
+ try {
95
+ return new URL(url, `${base}/`).toString();
96
+ } catch {
97
+ return url;
98
+ }
99
+ }
100
+ function titleFromSegment(segment) {
101
+ return segment.replace(/\.[a-z0-9]+$/i, "").replace(/[-_]+/g, " ").replace(/\b\w/g, (char) => char.toUpperCase());
102
+ }
103
+ function normalizeRoutePath(url) {
104
+ try {
105
+ return new URL(url, "https://farming-labs.local").pathname.replace(/\/+$/, "") || "/";
106
+ } catch {
107
+ return `/${url.replace(/^\/+/, "")}`.replace(/\/+$/, "") || "/";
108
+ }
109
+ }
110
+ function buildDefaultBreadcrumbs(input) {
111
+ const routePath = normalizeRoutePath(input.url);
112
+ const entry = (input.entry ?? "docs").replace(/^\/+|\/+$/g, "") || "docs";
113
+ const segments = routePath.split("/").filter(Boolean);
114
+ const entryParts = entry.split("/").filter(Boolean);
115
+ const contentSegments = segments.slice(0, entryParts.length).join("/") === entryParts.join("/") ? segments.slice(entryParts.length) : segments;
116
+ const breadcrumbs = [{
117
+ name: titleFromSegment(entryParts[entryParts.length - 1] ?? "Docs"),
118
+ url: `/${entry}`
119
+ }];
120
+ let current = `/${entry}`;
121
+ contentSegments.forEach((segment, index) => {
122
+ current = `${current}/${segment}`.replace(/\/+/g, "/");
123
+ breadcrumbs.push({
124
+ name: index === contentSegments.length - 1 ? input.title : titleFromSegment(segment),
125
+ url: current
126
+ });
127
+ });
128
+ return breadcrumbs;
129
+ }
130
+ function normalizeDateModified(value) {
131
+ if (!value) return void 0;
132
+ const date = new Date(value);
133
+ return Number.isNaN(date.getTime()) ? value : date.toISOString();
134
+ }
135
+ function buildAgentContractHowTo(value, fallback) {
136
+ const agent = normalizePageAgentFrontmatter(value);
137
+ if (!agent || !hasStructuredPageAgentContract(agent)) return void 0;
138
+ const steps = [];
139
+ for (const command of agent.commands ?? []) {
140
+ const run = typeof command === "string" ? command : command.run;
141
+ const description = typeof command === "string" ? void 0 : command.description;
142
+ const cwd = typeof command === "string" ? void 0 : command.cwd;
143
+ steps.push({
144
+ "@type": "HowToStep",
145
+ position: steps.length + 1,
146
+ name: description ?? "Run command",
147
+ text: cwd ? `${run} (from ${cwd})` : run
148
+ });
149
+ }
150
+ for (const verification of agent.verification ?? []) {
151
+ const description = typeof verification === "string" ? verification : verification.description ?? "Verify the result";
152
+ const details = typeof verification === "string" ? verification : [verification.run, verification.expect ? `Expected: ${verification.expect}` : void 0].filter(Boolean).join(". ");
153
+ steps.push({
154
+ "@type": "HowToStep",
155
+ position: steps.length + 1,
156
+ name: description,
157
+ text: details || description
158
+ });
159
+ }
160
+ const supplies = [...(agent.prerequisites ?? []).map((name) => ({
161
+ "@type": "HowToSupply",
162
+ name
163
+ })), ...(agent.files ?? []).map((name) => ({
164
+ "@type": "HowToSupply",
165
+ name
166
+ }))];
167
+ const about = Object.entries(agent.appliesTo ?? {}).flatMap(([kind, values]) => (typeof values === "string" ? [values] : values ?? []).map((name) => ({
168
+ "@type": "Thing",
169
+ name: `${kind}: ${name}`
170
+ })));
171
+ return {
172
+ "@type": "HowTo",
173
+ name: agent.task ?? fallback.title,
174
+ ...agent.outcome ?? fallback.description ? { description: agent.outcome ?? fallback.description } : {},
175
+ ...about.length > 0 ? { about } : {},
176
+ ...supplies.length > 0 ? { supply: supplies } : {},
177
+ ...steps.length > 0 ? { step: steps } : {}
178
+ };
179
+ }
180
+ /**
181
+ * Resolve the public docs site URL from existing agent-facing config.
182
+ *
183
+ * The framework intentionally reuses `sitemap.baseUrl`, `llmsTxt.baseUrl`,
184
+ * `robots.baseUrl`, or `ai.docsUrl` instead of requiring another setting.
185
+ */
186
+ function resolveDocsMetadataBaseUrl(config) {
187
+ return [
188
+ typeof config.sitemap === "object" ? config.sitemap.baseUrl : void 0,
189
+ typeof config.llmsTxt === "object" ? config.llmsTxt.baseUrl : void 0,
190
+ typeof config.robots === "object" ? config.robots.baseUrl : void 0,
191
+ config.ai?.docsUrl
192
+ ].map((value) => normalizeBaseUrl(value)).find((value) => Boolean(value));
193
+ }
194
+ /**
195
+ * Build Schema.org JSON-LD for a docs page.
196
+ *
197
+ * The shape follows Vercel's agent readability guidance: a `TechArticle`
198
+ * with title, description, canonical URL, freshness, and breadcrumbs.
199
+ */
200
+ function buildDocsPageStructuredData(input) {
201
+ const breadcrumbs = input.breadcrumbs?.length ? input.breadcrumbs : buildDefaultBreadcrumbs(input);
202
+ const result = {
203
+ "@context": "https://schema.org",
204
+ "@type": "TechArticle",
205
+ headline: input.title,
206
+ name: input.title,
207
+ url: absolutizeUrl(input.url, input.baseUrl),
208
+ mainEntityOfPage: {
209
+ "@type": "WebPage",
210
+ "@id": absolutizeUrl(input.url, input.baseUrl)
211
+ },
212
+ breadcrumb: {
213
+ "@type": "BreadcrumbList",
214
+ itemListElement: breadcrumbs.map((item, index) => ({
215
+ "@type": "ListItem",
216
+ position: index + 1,
217
+ name: item.name,
218
+ item: absolutizeUrl(item.url, input.baseUrl)
219
+ }))
220
+ }
221
+ };
222
+ if (input.description) result.description = input.description;
223
+ const agentContract = buildAgentContractHowTo(input.agent, input);
224
+ if (agentContract) result.mainEntity = agentContract;
225
+ const dateModified = normalizeDateModified(input.dateModified);
226
+ if (dateModified) result.dateModified = dateModified;
227
+ return result;
228
+ }
229
+ /**
230
+ * Serialize Schema.org JSON-LD for safe insertion into a `<script>` tag.
231
+ */
232
+ function renderDocsPageStructuredDataJson(input) {
233
+ return JSON.stringify(buildDocsPageStructuredData(input)).replace(/</g, "\\u003c");
234
+ }
235
+
236
+ //#endregion
237
+ export { resolveDocsMetadataBaseUrl as a, renderDocsPageStructuredDataJson as i, buildPageOpenGraph as n, resolveOGImage as o, buildPageTwitter as r, resolveTitle as s, buildDocsPageStructuredData as t };
@@ -1,4 +1,4 @@
1
- import { i as detectPackageManagerFromProject, l as formatPackageManagerDetection, t as detectFramework, u as installCommand } from "./utils-DBCCkkJS.mjs";
1
+ import { i as detectPackageManagerFromProject, l as formatPackageManagerDetection, t as detectFramework, u as installCommand } from "./utils-6UCLxv4B.mjs";
2
2
  import pc from "picocolors";
3
3
  import * as p from "@clack/prompts";
4
4