@farming-labs/docs 0.2.118 → 0.2.120
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-DAjdIdoL.mjs → agent-CYk2DxY7.mjs} +3 -3
- package/dist/{agent-BErhm-eR.mjs → agent-DkAidqtV.mjs} +9 -3
- package/dist/{agent-evals-BHXe_A2m.mjs → agent-evals-BLNLvXbG.mjs} +3 -3
- package/dist/{agent-export-B849tzbg.mjs → agent-export-CA6IUQ7T.mjs} +16 -15
- package/dist/agent-skills-bundle.d.mts +1 -1
- package/dist/{agent-skills-progressive-disclosure-1XPV0wCN.mjs → agent-skills-progressive-disclosure-PjPtTYL-.mjs} +1 -1
- package/dist/{agent-skills-server-CJh3EGWC.mjs → agent-skills-server-BC7md56k.mjs} +1 -1
- package/dist/{agent-skills-server-DiXUcYNy.d.mts → agent-skills-server-D5IuvwM7.d.mts} +2 -2
- package/dist/agent-skills-vite.d.mts +3 -3
- package/dist/agent-skills-vite.mjs +2 -2
- package/dist/{agents-Dwys0Wr7.mjs → agents-BUiVmj8i.mjs} +14 -13
- package/dist/{analytics-BvUjK_oC.d.mts → analytics-w3FDOksr.d.mts} +1 -1
- package/dist/{api-reference-DafuHRtc.mjs → api-reference-BYee4zMo.mjs} +17 -4
- package/dist/{authoring-BqcSw2Ok.mjs → authoring-C2ymvYWl.mjs} +6 -5
- package/dist/{authoring-mcp-BmohXL7E.mjs → authoring-mcp-CiCUQe3o.mjs} +2 -2
- package/dist/browser.d.mts +4 -4
- package/dist/browser.mjs +6 -3
- package/dist/cli/index.mjs +38 -38
- package/dist/client/react.d.mts +1 -1
- package/dist/{cloud-BllEwBht.mjs → cloud-6eKrlmKd.mjs} +3 -3
- package/dist/{cloud-ask-ai-nlKU13he.d.mts → cloud-ask-ai-BrsTXQf6.d.mts} +1 -1
- package/dist/{codeblocks-Cbo7uzxr.mjs → codeblocks-CHpgAwY-.mjs} +2 -2
- package/dist/{content-change-hydration-Cr07LmBu.d.mts → content-change-hydration-wqXIZHp6.d.mts} +3 -3
- package/dist/{dev-QxIXdG0G.mjs → dev-Bnn-NUNa.mjs} +2 -2
- package/dist/docs-cloud-server.d.mts +2 -2
- package/dist/docs-cloud-server.mjs +1 -1
- package/dist/{doctor-Cysov9LX.mjs → doctor-Bfkrkzad.mjs} +21 -20
- package/dist/{downgrade-Cx3FnovE.mjs → downgrade-CHMta85e.mjs} +2 -2
- package/dist/{feedback-Dfgt_WD5.mjs → feedback-DL4T5oIO.mjs} +1 -1
- package/dist/{feedback-evals-DI_JNN5M.mjs → feedback-evals-DMilg9pY.mjs} +1 -1
- package/dist/{golden-evaluations-BqdWUUE7.mjs → golden-evaluations-CLUViycJ.mjs} +2 -2
- package/dist/index.d.mts +9 -44
- package/dist/index.mjs +11 -12
- package/dist/{init-CW922o9v.mjs → init-K0LmXDZ5.mjs} +3 -3
- package/dist/{mcp-CqtJYU0Y.mjs → mcp-iLCmnPJI.mjs} +15 -14
- package/dist/mcp.d.mts +3 -3
- package/dist/mcp.mjs +23 -5
- package/dist/{openapi-diff-Cf1dguBv.mjs → openapi-diff-HcpUNjA-.mjs} +5 -5
- package/dist/{openapi-mcp-gbEUXMkc.mjs → openapi-mcp-BIOTLiA7.mjs} +3 -315
- package/dist/{openapi-sdk-G7RtjWc5.mjs → openapi-sdk-BQKC6H-_.mjs} +5 -5
- package/dist/{openapi-source-1ubEyHMO.mjs → openapi-source-DK6ts_Bk.mjs} +1 -1
- package/dist/{package-version-CiVXOONu.mjs → package-version-HJhYeq4M.mjs} +1 -1
- package/dist/{prompt-references-C1nDPYdm.mjs → prompt-references-DMgbu_dz.mjs} +3 -3
- package/dist/{propose-B_yerUFm.mjs → propose-JmUv_BTt.mjs} +1 -1
- package/dist/{retrieval-digest-ueYW3S6P.d.mts → retrieval-digest-AOx2-LbC.d.mts} +1 -1
- package/dist/{review-Df62iFE4.mjs → review-C6EmbV0l.mjs} +12 -11
- package/dist/{robots-CRIXPOiX.mjs → robots-BYJAVeI6.mjs} +2 -2
- package/dist/{robots-vdQ4tLzZ.mjs → robots-DteZB8vl.mjs} +5 -5
- package/dist/runtime.d.mts +3 -3
- package/dist/runtime.mjs +7 -6
- package/dist/{search-Cso57KVB.mjs → search-Bhuv_YsL.mjs} +16 -15
- package/dist/server.d.mts +9 -9
- package/dist/server.mjs +14 -13
- package/dist/sidebar-CFHBj29f.mjs +421 -0
- package/dist/sidebar-CMPbVfGP.d.mts +63 -0
- package/dist/{sitemap-BEUEeKbt.d.mts → sitemap-Cl8vrixd.d.mts} +2 -2
- package/dist/{sitemap-Du2wWBmo.mjs → sitemap-DW5LDKDa.mjs} +14 -13
- package/dist/{sitemap-server-DNsVKCnP.d.mts → sitemap-server-BUdPBcGs.d.mts} +3 -2
- package/dist/{sitemap-server-CClBRp7_.mjs → sitemap-server-Lg3YhUx4.mjs} +1 -1
- package/dist/{skills-BC0GTdUM.mjs → skills-BAPQLSCm.mjs} +14 -13
- package/dist/{standards-discovery-C3AB6qNv.d.mts → standards-discovery-BHPc7YIX.d.mts} +1 -1
- package/dist/{types-Ba9Dd_fe.d.mts → types-BJFeMXWZ.d.mts} +20 -3
- package/dist/{upgrade-CXIQlLWx.mjs → upgrade-DlQMOFV1.mjs} +2 -2
- package/package.json +2 -2
- package/dist/audience-exposure-P69ZKRec.mjs +0 -8
- package/dist/sidebar-CAncgoWu.d.mts +0 -15
- package/dist/sidebar-mI70dH_0.mjs +0 -73
- /package/dist/{agent-feedback-evaluations-UhAdMoIY.mjs → agent-feedback-evaluations-CcMGlgsO.mjs} +0 -0
- /package/dist/{agent-feedback-loop-DpZ9ZdFB.mjs → agent-feedback-loop-CcZL_sb1.mjs} +0 -0
- /package/dist/{agent-maintenance-CZLly8It.mjs → agent-maintenance-CuZ7iAKq.mjs} +0 -0
- /package/dist/{audience-exposure-PMCEve-s.d.mts → audience-exposure-DBrFWULA.d.mts} +0 -0
- /package/dist/{cloud-ask-ai-Bq_njfjh.mjs → cloud-ask-ai-BqKhjpS5.mjs} +0 -0
- /package/dist/{code-blocks-BE3sEayp.mjs → code-blocks-GYdvS3BH.mjs} +0 -0
- /package/dist/{config-DDuQ4Qma.mjs → config-BZnKAj_Y.mjs} +0 -0
- /package/dist/{errors-CBmy95z2.mjs → errors-BtnVLhNF.mjs} +0 -0
- /package/dist/{i18n-DKGg_G0f.mjs → i18n-B1gJ9EW0.mjs} +0 -0
- /package/dist/{metadata-DoUinS1I.mjs → metadata-BOHn0Y5K.mjs} +0 -0
- /package/dist/{openapi-BkQGpZEg.mjs → openapi-CfCzX_a1.mjs} +0 -0
- /package/dist/{openapi-mcp-node-DiqMH9Ao.mjs → openapi-mcp-node-C4jUpZG6.mjs} +0 -0
- /package/dist/{openapi-operations-CsXLUD3Z.mjs → openapi-operations-DFpaqOqA.mjs} +0 -0
- /package/dist/{prompt-utils-Dj8-I3Jw.mjs → prompt-utils-B5g-bv7o.mjs} +0 -0
- /package/dist/{standards-discovery-BQQ3CAzz.mjs → standards-discovery-sSEojU80.mjs} +0 -0
- /package/dist/{templates-2nnlhcmo.mjs → templates-BuQ8YsGv.mjs} +0 -0
- /package/dist/{utils-8H7dkC8w.mjs → utils-C7KDrPpA.mjs} +0 -0
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import "./http-body-DkAPk6D5.mjs";
|
|
2
2
|
import "./markdown-sections-9Oxr33b-.mjs";
|
|
3
|
-
import { cn as createTypesenseSearchAdapter, in as createAlgoliaSearchAdapter, nn as buildDocsSearchDocuments } from "./agent-
|
|
4
|
-
import "./standards-discovery-
|
|
5
|
-
import "./
|
|
6
|
-
import { t as resolveDocsI18n } from "./i18n-
|
|
7
|
-
import { a as resolveDocsMetadataBaseUrl } from "./metadata-
|
|
8
|
-
import "./
|
|
9
|
-
import
|
|
10
|
-
import "./
|
|
11
|
-
import "./agent-
|
|
3
|
+
import { cn as createTypesenseSearchAdapter, in as createAlgoliaSearchAdapter, nn as buildDocsSearchDocuments } from "./agent-DkAidqtV.mjs";
|
|
4
|
+
import "./standards-discovery-sSEojU80.mjs";
|
|
5
|
+
import "./sidebar-CFHBj29f.mjs";
|
|
6
|
+
import { t as resolveDocsI18n } from "./i18n-B1gJ9EW0.mjs";
|
|
7
|
+
import { a as resolveDocsMetadataBaseUrl } from "./metadata-BOHn0Y5K.mjs";
|
|
8
|
+
import "./openapi-mcp-BIOTLiA7.mjs";
|
|
9
|
+
import "./prompt-utils-B5g-bv7o.mjs";
|
|
10
|
+
import { o as buildApiReferenceOperationPagesAsync } from "./api-reference-BYee4zMo.mjs";
|
|
11
|
+
import "./agent-skills-server-BC7md56k.mjs";
|
|
12
|
+
import "./agent-evals-BLNLvXbG.mjs";
|
|
12
13
|
import { createFilesystemDocsMcpSource } from "./mcp.mjs";
|
|
13
|
-
import "./authoring-mcp-
|
|
14
|
-
import "./cloud-ask-ai-
|
|
15
|
-
import "./code-blocks-
|
|
16
|
-
import "./sitemap-server-
|
|
14
|
+
import "./authoring-mcp-CiCUQe3o.mjs";
|
|
15
|
+
import "./cloud-ask-ai-BqKhjpS5.mjs";
|
|
16
|
+
import "./code-blocks-GYdvS3BH.mjs";
|
|
17
|
+
import "./sitemap-server-Lg3YhUx4.mjs";
|
|
17
18
|
import "./server.mjs";
|
|
18
|
-
import { _ as resolveDocsContentDir, c as loadProjectEnv, g as resolveDocsConfigPath, h as readTopLevelStringProperty, s as loadDocsConfigModuleResultWithProjectEnv } from "./config-
|
|
19
|
-
import { t as detectFramework } from "./utils-
|
|
19
|
+
import { _ as resolveDocsContentDir, c as loadProjectEnv, g as resolveDocsConfigPath, h as readTopLevelStringProperty, s as loadDocsConfigModuleResultWithProjectEnv } from "./config-BZnKAj_Y.mjs";
|
|
20
|
+
import { t as detectFramework } from "./utils-C7KDrPpA.mjs";
|
|
20
21
|
import { readFileSync } from "node:fs";
|
|
21
22
|
import path from "node:path";
|
|
22
23
|
import pc from "picocolors";
|
package/dist/server.d.mts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { n as resolveConfiguredAgentSkills, r as resolveConfiguredAgentSkillsSync, t as ResolveConfiguredAgentSkillsOptions } from "./agent-skills-server-
|
|
1
|
+
import { $ as DocsAgentGoldenAuthenticatedContentExpectation, $n as DocsSearchExplanation, An as DocsPaginatedSearchResponse, At as DocsAskAIMcpConfig, B as DocsAgentContentChangesConfig, Dt as DocsAskAIFeedbackData, Et as DocsAskAIFeedbackConfig, Fn as DocsReviewCiMode, G as DocsAgentEvaluationAnswerRunner, Gn as DocsSearchAdapterPage, Gt as DocsContentChangeDocument, H as DocsAgentEvaluationAnswerProvider, Hn as DocsSearchAdapter, In as DocsReviewConfig, J as DocsAgentEvaluationTaskInput, Jn as DocsSearchAmbiguityResolution, Jt as DocsContentChangeSnapshotSaver, K as DocsAgentEvaluationSourceReference, Kn as DocsSearchAmbiguityDecision, Kt as DocsContentChangeSnapshotContext, Ln as DocsReviewRulesConfig, Mn as DocsRetrievalSourceProvenance, Nn as DocsRetrievalSourceScope, Ot as DocsAskAIFeedbackMessage, Q as DocsAgentGoldenAnswerExpectation, Qt as DocsContentSnapshotDocument, Rr as McpDocsSearchConfig, U as DocsAgentEvaluationAnswerRequest, Un as DocsSearchAdapterContext, V as DocsAgentEvaluationAnswerInput, W as DocsAgentEvaluationAnswerResult, Wn as DocsSearchAdapterFactory, Wt as DocsConfig, Xn as DocsSearchConfig, Xt as DocsContentChangesResponse, Yt as DocsContentChangedDocument, Zn as DocsSearchDocument, Zt as DocsContentSnapshot, _n as DocsObservabilityEvent, _t as DocsAgentTraceStatus, a as ApiReferenceRenderer, ar as DocsSearchFilterField, at as DocsAgentGoldenQueryVariant, br as DocsSearchWarningCode, bt as DocsAnalyticsEventInput, cr as DocsSearchMatchField, dr as DocsSearchRankingReason, fr as DocsSearchRankingReasonCode, gn as DocsObservabilityConfig, gr as DocsSearchResult, gt as DocsAgentTraceEventType, hr as DocsSearchResponse, ht as DocsAgentTraceEventInput, ir as DocsSearchFilterDecisionOutcome, it as DocsAgentGoldenPromptInjectionExpectation, kt as DocsAskAIFeedbackValue, lr as DocsSearchMatchedTerm, mr as DocsSearchRequest, o as ApiReferenceRendererConfig, or as DocsSearchFilterInput, ot as DocsAgentGoldenQueryVariantKind, pr as DocsSearchRankingStrategy, q as DocsAgentEvaluationSurface, qn as DocsSearchAmbiguityDecisionStatus, qt as DocsContentChangeSnapshotLoader, rr as DocsSearchFilterDecision, rt as DocsAgentGoldenFreshnessExpectation, s as ApiReferenceRendererInput, sr as DocsSearchFilters, st as DocsAgentGoldenSafetyExpectation, tt as DocsAgentGoldenExampleVerification, ur as DocsSearchQuery, vn as DocsObservabilityEventInput, vr as DocsSearchSourcePage, vt as DocsAnalyticsConfig, yr as DocsSearchWarning, yt as DocsAnalyticsEvent } from "./types-BJFeMXWZ.mjs";
|
|
2
|
+
import { n as resolveConfiguredAgentSkills, r as resolveConfiguredAgentSkillsSync, t as ResolveConfiguredAgentSkillsOptions } from "./agent-skills-server-D5IuvwM7.mjs";
|
|
3
3
|
import { renderDocsAgentSkillsBundle } from "./agent-skills-vite.mjs";
|
|
4
|
-
import { a as createDocsAgentTraceContext, c as emitDocsAnalyticsEvent, d as resolveDocsAnalyticsConfig, f as resolveDocsObservabilityConfig, i as ResolvedDocsObservabilityConfig, l as emitDocsObservabilityEvent, n as DocsAgentTraceContext, o as createDocsAgentTraceId, r as ResolvedDocsAnalyticsConfig, s as emitDocsAgentTraceEvent, t as DOCS_AGENT_TRACE_EVENT_TYPES, u as getDocsRequestAnalyticsProperties } from "./analytics-
|
|
5
|
-
import { i as isDocsCloudAskAIProvider, n as DocsCloudAskAIResponseOptions, r as createDocsCloudAskAIResponse, t as DocsCloudAskAIConfig } from "./cloud-ask-ai-
|
|
4
|
+
import { a as createDocsAgentTraceContext, c as emitDocsAnalyticsEvent, d as resolveDocsAnalyticsConfig, f as resolveDocsObservabilityConfig, i as ResolvedDocsObservabilityConfig, l as emitDocsObservabilityEvent, n as DocsAgentTraceContext, o as createDocsAgentTraceId, r as ResolvedDocsAnalyticsConfig, s as emitDocsAgentTraceEvent, t as DOCS_AGENT_TRACE_EVENT_TYPES, u as getDocsRequestAnalyticsProperties } from "./analytics-w3FDOksr.mjs";
|
|
5
|
+
import { i as isDocsCloudAskAIProvider, n as DocsCloudAskAIResponseOptions, r as createDocsCloudAskAIResponse, t as DocsCloudAskAIConfig } from "./cloud-ask-ai-BrsTXQf6.mjs";
|
|
6
6
|
import { DocsCloudAskAIOptions, DocsCloudPublicConfig, DocsCloudRouteHandlerOptions, DocsCloudRouteHandlers, DocsCloudRuntimeEnv, DocsCloudRuntimeValue, DocsCloudServer, DocsCloudServerOptions, DocsCloudTrackEventOptions, createDocsCloudRouteHandler, createDocsCloudServer } from "./docs-cloud-server.mjs";
|
|
7
|
-
import { $ as resolveDocsSearchError, A as DocsSearchRequestError, B as createCustomSearchAdapter, C as isDocsContentChangesRequest, E as BuildDocsContentSnapshotOptions, F as buildDocsContentSnapshot, G as formatDocsAskAIPackageHints, H as createSimpleSearchAdapter, I as buildDocsRetrievalDigestProjection, J as performDocsSearch, K as inferDocsAskAIPackageHints, L as buildDocsSearchDocuments, M as EnrichDocsSearchDocumentsWithProvenanceOptions, N as PerformDocsSearchOptions, O as DocsLocalMcpSearchRuntimeConfig, P as buildDocsAskAIContext, Q as resolveDocsSearchAudience, S as isDocsContentChangeGeneration, T as resolveDocsContentChangesRequest, U as createTypesenseSearchAdapter, V as createMcpSearchAdapter, W as enrichDocsSearchDocumentsWithProvenance, X as resolveAskAISearchRequestConfig, Y as performDocsSearchWithMetadata, Z as resolveDocsRetrievalLastModified, _ as DocsContentChangesRequestError, a as DocsContentChangeHydrationResponse, b as createDocsContentChangeFeed, br as ExtractedDocsMarkdownPromptBlocks, c as HydrateDocsContentChangesOptions, d as hydrateDocsContentChanges, et as resolveDocsSearchFilters, f as DOCS_CONTENT_CHANGES_FORMAT, g as DocsContentChangesRequest, h as DocsContentChangeFeed, i as DocsContentChangeHydrationContent, j as DocsSearchRequestResolutionOptions, k as DocsLocalMcpSearchRuntimeInput, l as MAX_DOCS_CONTENT_CHANGE_HYDRATION_TOKEN_BUDGET, m as DOCS_CONTENT_SNAPSHOT_FORMAT, n as DOCS_CONTENT_CHANGE_HYDRATION_FORMAT, nt as resolveLocalDocsMcpSearchConfig, o as DocsContentChangeHydrationSection, p as DOCS_CONTENT_CHANGES_RESPONSE_VALUE, q as normalizeDocsSearchFilters, r as DocsContentChangeHydrationBudget, rt as resolveSearchRequestConfig, s as DocsContentChangeHydrationTombstone, t as DEFAULT_DOCS_CONTENT_CHANGE_HYDRATION_TOKEN_BUDGET, tt as resolveDocsSearchRequest, u as MIN_DOCS_CONTENT_CHANGE_HYDRATION_TOKEN_BUDGET, v as DocsResolvedContentChangesConfig, w as resolveDocsContentChangesConfig, x as createDocsContentChangesHttpResponse, xr as extractDocsMarkdownPromptBlocks, y as ResolveDocsContentChangesOptions, yr as DocsMarkdownPromptBlock, z as createAlgoliaSearchAdapter } from "./content-change-hydration-
|
|
8
|
-
import { $ as readDocsAgentFeedbackFile, A as DocsGoldenExampleResult, B as DocsGoldenTaskExpectation, C as DocsGoldenCitationMetrics, D as DocsGoldenEvaluationQuality, E as DocsGoldenEvaluationDimensionCoverage, F as DocsGoldenSafetyCaseKind, G as RunDocsGoldenTasksOptions, H as DocsGoldenTaskReport, I as DocsGoldenSafetyCaseResult, J as DocsAgentFeedbackCluster, K as runDocsGoldenTasks, L as DocsGoldenSafetyMetrics, M as DocsGoldenQueryVariantResult, N as DocsGoldenRetrievalMetrics, O as DocsGoldenEvaluationStatus, P as DocsGoldenRetrievedSource, Q as analyzeDocsAgentFeedback, R as DocsGoldenSelectionMetrics, S as DocsGoldenAnswerMetrics, T as DocsGoldenEvaluationCoverageStatus, U as DocsGoldenTasksReport, V as DocsGoldenTaskFilters, W as DocsGoldenUsageMetrics, X as DocsAgentFeedbackImprovementReport, Y as DocsAgentFeedbackImprovementOptions, Z as DocsAgentFeedbackIssueDraft, _ as sanitizePromptText, a as DocsPaginationCursorError, b as serializeOpenDocsProvider, c as DEFAULT_OPEN_DOCS_TARGET, d as PromptProviderChoice, f as SerializeOpenDocsProviderOptions, g as resolvePromptProviderChoices, h as parsePromptStringArray, j as DocsGoldenExpectedExample, k as DocsGoldenExampleMetrics, l as DEFAULT_PROMPT_PROVIDER_TEMPLATES, m as normalizePromptProviderName, n as digestDocsRetrievalContent, o as DEFAULT_OPEN_DOCS_PROMPT, p as SerializedOpenDocsProvider, q as DOCS_AGENT_FEEDBACK_IMPROVEMENT_FORMAT, r as isDocsRetrievalCanonicalUrl, s as DEFAULT_OPEN_DOCS_PROVIDER_IDS, u as PromptAction, v as serializeDocsIcon, w as DocsGoldenEvaluationCoverage, x as serializeOpenDocsProviders, y as serializeDocsIconRegistry, z as DocsGoldenTask } from "./retrieval-digest-
|
|
7
|
+
import { $ as resolveDocsSearchError, A as DocsSearchRequestError, B as createCustomSearchAdapter, C as isDocsContentChangesRequest, E as BuildDocsContentSnapshotOptions, F as buildDocsContentSnapshot, G as formatDocsAskAIPackageHints, H as createSimpleSearchAdapter, I as buildDocsRetrievalDigestProjection, J as performDocsSearch, K as inferDocsAskAIPackageHints, L as buildDocsSearchDocuments, M as EnrichDocsSearchDocumentsWithProvenanceOptions, N as PerformDocsSearchOptions, O as DocsLocalMcpSearchRuntimeConfig, P as buildDocsAskAIContext, Q as resolveDocsSearchAudience, S as isDocsContentChangeGeneration, T as resolveDocsContentChangesRequest, U as createTypesenseSearchAdapter, V as createMcpSearchAdapter, W as enrichDocsSearchDocumentsWithProvenance, X as resolveAskAISearchRequestConfig, Y as performDocsSearchWithMetadata, Z as resolveDocsRetrievalLastModified, _ as DocsContentChangesRequestError, a as DocsContentChangeHydrationResponse, b as createDocsContentChangeFeed, br as ExtractedDocsMarkdownPromptBlocks, c as HydrateDocsContentChangesOptions, d as hydrateDocsContentChanges, et as resolveDocsSearchFilters, f as DOCS_CONTENT_CHANGES_FORMAT, g as DocsContentChangesRequest, h as DocsContentChangeFeed, i as DocsContentChangeHydrationContent, j as DocsSearchRequestResolutionOptions, k as DocsLocalMcpSearchRuntimeInput, l as MAX_DOCS_CONTENT_CHANGE_HYDRATION_TOKEN_BUDGET, m as DOCS_CONTENT_SNAPSHOT_FORMAT, n as DOCS_CONTENT_CHANGE_HYDRATION_FORMAT, nt as resolveLocalDocsMcpSearchConfig, o as DocsContentChangeHydrationSection, p as DOCS_CONTENT_CHANGES_RESPONSE_VALUE, q as normalizeDocsSearchFilters, r as DocsContentChangeHydrationBudget, rt as resolveSearchRequestConfig, s as DocsContentChangeHydrationTombstone, t as DEFAULT_DOCS_CONTENT_CHANGE_HYDRATION_TOKEN_BUDGET, tt as resolveDocsSearchRequest, u as MIN_DOCS_CONTENT_CHANGE_HYDRATION_TOKEN_BUDGET, v as DocsResolvedContentChangesConfig, w as resolveDocsContentChangesConfig, x as createDocsContentChangesHttpResponse, xr as extractDocsMarkdownPromptBlocks, y as ResolveDocsContentChangesOptions, yr as DocsMarkdownPromptBlock, z as createAlgoliaSearchAdapter } from "./content-change-hydration-wqXIZHp6.mjs";
|
|
8
|
+
import { $ as readDocsAgentFeedbackFile, A as DocsGoldenExampleResult, B as DocsGoldenTaskExpectation, C as DocsGoldenCitationMetrics, D as DocsGoldenEvaluationQuality, E as DocsGoldenEvaluationDimensionCoverage, F as DocsGoldenSafetyCaseKind, G as RunDocsGoldenTasksOptions, H as DocsGoldenTaskReport, I as DocsGoldenSafetyCaseResult, J as DocsAgentFeedbackCluster, K as runDocsGoldenTasks, L as DocsGoldenSafetyMetrics, M as DocsGoldenQueryVariantResult, N as DocsGoldenRetrievalMetrics, O as DocsGoldenEvaluationStatus, P as DocsGoldenRetrievedSource, Q as analyzeDocsAgentFeedback, R as DocsGoldenSelectionMetrics, S as DocsGoldenAnswerMetrics, T as DocsGoldenEvaluationCoverageStatus, U as DocsGoldenTasksReport, V as DocsGoldenTaskFilters, W as DocsGoldenUsageMetrics, X as DocsAgentFeedbackImprovementReport, Y as DocsAgentFeedbackImprovementOptions, Z as DocsAgentFeedbackIssueDraft, _ as sanitizePromptText, a as DocsPaginationCursorError, b as serializeOpenDocsProvider, c as DEFAULT_OPEN_DOCS_TARGET, d as PromptProviderChoice, f as SerializeOpenDocsProviderOptions, g as resolvePromptProviderChoices, h as parsePromptStringArray, j as DocsGoldenExpectedExample, k as DocsGoldenExampleMetrics, l as DEFAULT_PROMPT_PROVIDER_TEMPLATES, m as normalizePromptProviderName, n as digestDocsRetrievalContent, o as DEFAULT_OPEN_DOCS_PROMPT, p as SerializedOpenDocsProvider, q as DOCS_AGENT_FEEDBACK_IMPROVEMENT_FORMAT, r as isDocsRetrievalCanonicalUrl, s as DEFAULT_OPEN_DOCS_PROVIDER_IDS, u as PromptAction, v as serializeDocsIcon, w as DocsGoldenEvaluationCoverage, x as serializeOpenDocsProviders, y as serializeDocsIconRegistry, z as DocsGoldenTask } from "./retrieval-digest-AOx2-LbC.mjs";
|
|
9
9
|
import { CreateDocsMcpServerOptions, DEFAULT_DOCS_MCP_CONTENT_CHANGE_POLL_INTERVAL_MS, DEFAULT_DOCS_MCP_CORS_ALLOWED_HEADERS, DEFAULT_DOCS_MCP_CORS_EXPOSED_HEADERS, DEFAULT_DOCS_MCP_CORS_MAX_AGE_SECONDS, DEFAULT_DOCS_MCP_MAX_BODY_BYTES, DOCS_CONFIG_SCHEMA_OPTIONS, DOCS_MCP_CONTENT_CHANGES_CURRENT_URI, DOCS_MCP_CONTENT_CHANGES_URI_TEMPLATE, DocsMcpAgentContractSummary, DocsMcpApiReferenceSource, DocsMcpCodeExample, DocsMcpConfigSchema, DocsMcpConfigSchemaOption, DocsMcpContextResult, DocsMcpContextSource, DocsMcpDocsList, DocsMcpDocsPageSummary, DocsMcpDocsSection, DocsMcpHttpHandlers, DocsMcpNavigationNode, DocsMcpNavigationTree, DocsMcpPage, DocsMcpPageSectionIndex, DocsMcpPageSectionList, DocsMcpPaginatedDocsList, DocsMcpPagination, DocsMcpRequestContext, DocsMcpResolvedConfig, DocsMcpResolvedCorsConfig, DocsMcpResolvedPromptsConfig, DocsMcpResolvedProtectedResourceConfig, DocsMcpResolvedSecurityConfig, DocsMcpSource, DocsMcpTaskSummary, createDocsMcpHttpHandler, createDocsMcpServer, createFilesystemDocsMcpSource, getDocsConfigSchema, normalizeDocsMcpRoute, resolveDocsMcpConfig, resolveDocsMcpPromptsConfig, runDocsMcpStdio } from "./mcp.mjs";
|
|
10
|
-
import { _ as resolveDocsSitemapPageLastmod, a as DEFAULT_SITEMAP_XML_ROUTE, c as DocsSitemapManifestPage, d as buildDocsSitemapManifest, f as createDocsSitemapResponse, g as resolveDocsSitemapConfig, h as renderDocsSitemapXml, i as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, l as DocsSitemapPageInput, m as renderDocsSitemapMarkdown, n as DEFAULT_SITEMAP_MD_DOCS_ROUTE, o as DocsSitemapFormat, p as readDocsSitemapManifestFromContentMap, r as DEFAULT_SITEMAP_MD_ROUTE, s as DocsSitemapManifest, t as DEFAULT_SITEMAP_MANIFEST_PATH, u as DocsSitemapResolvedConfig, v as resolveDocsSitemapRequest, y as toDocsSitemapMarkdownUrl } from "./sitemap-
|
|
11
|
-
import { C as resolveApiReferenceRenderer, S as resolveApiReferenceOpenApiDiscovery, T as resolveApiReferenceVersionFromPathname, _ as buildApiReferencePageTitle, a as ApiReferenceRoute, b as isApiReferenceOpenApiRequest, c as CreateApiReferenceOperationMarkdownResponseOptions, d as ResolvedApiReferenceVersion, f as buildApiReferenceHtmlDocument, g as buildApiReferenceOperationPagesAsync, h as buildApiReferenceOpenApiDocumentAsync, i as ApiReferenceOpenApiVersionDiscovery, l as DEFAULT_API_REFERENCE_OPENAPI_ROUTE, m as buildApiReferenceOpenApiDocument, n as ApiReferenceFramework, o as BuildApiReferenceOperationPagesOptions, p as buildApiReferenceHtmlDocumentAsync, r as ApiReferenceOpenApiDiscovery, s as BuildApiReferenceOptions, t as readDocsSitemapManifest, u as ResolvedApiReferenceConfig, v as buildApiReferenceScalarCss, w as resolveApiReferenceVersion, x as resolveApiReferenceConfig, y as createApiReferenceOperationMarkdownResponse } from "./sitemap-server-
|
|
10
|
+
import { _ as resolveDocsSitemapPageLastmod, a as DEFAULT_SITEMAP_XML_ROUTE, c as DocsSitemapManifestPage, d as buildDocsSitemapManifest, f as createDocsSitemapResponse, g as resolveDocsSitemapConfig, h as renderDocsSitemapXml, i as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, l as DocsSitemapPageInput, m as renderDocsSitemapMarkdown, n as DEFAULT_SITEMAP_MD_DOCS_ROUTE, o as DocsSitemapFormat, p as readDocsSitemapManifestFromContentMap, r as DEFAULT_SITEMAP_MD_ROUTE, s as DocsSitemapManifest, t as DEFAULT_SITEMAP_MANIFEST_PATH, u as DocsSitemapResolvedConfig, v as resolveDocsSitemapRequest, y as toDocsSitemapMarkdownUrl } from "./sitemap-Cl8vrixd.mjs";
|
|
11
|
+
import { C as resolveApiReferenceRenderer, S as resolveApiReferenceOpenApiDiscovery, T as resolveApiReferenceVersionFromPathname, _ as buildApiReferencePageTitle, a as ApiReferenceRoute, b as isApiReferenceOpenApiRequest, c as CreateApiReferenceOperationMarkdownResponseOptions, d as ResolvedApiReferenceVersion, f as buildApiReferenceHtmlDocument, g as buildApiReferenceOperationPagesAsync, h as buildApiReferenceOpenApiDocumentAsync, i as ApiReferenceOpenApiVersionDiscovery, l as DEFAULT_API_REFERENCE_OPENAPI_ROUTE, m as buildApiReferenceOpenApiDocument, n as ApiReferenceFramework, o as BuildApiReferenceOperationPagesOptions, p as buildApiReferenceHtmlDocumentAsync, r as ApiReferenceOpenApiDiscovery, s as BuildApiReferenceOptions, t as readDocsSitemapManifest, u as ResolvedApiReferenceConfig, v as buildApiReferenceScalarCss, w as resolveApiReferenceVersion, x as resolveApiReferenceConfig, y as createApiReferenceOperationMarkdownResponse } from "./sitemap-server-BUdPBcGs.mjs";
|
|
12
12
|
import { McpServer } from "@modelcontextprotocol/server";
|
|
13
13
|
|
|
14
14
|
//#region src/code-group-mdx.d.ts
|
|
@@ -198,4 +198,4 @@ declare function writeDocsAuthoringFile(options: DocsAuthoringMcpOptions, input:
|
|
|
198
198
|
declare function createDocsAuthoringMcpServer(options: DocsAuthoringMcpOptions): Promise<McpServer>;
|
|
199
199
|
declare function runDocsAuthoringMcpStdio(options: DocsAuthoringMcpOptions): Promise<void>;
|
|
200
200
|
//#endregion
|
|
201
|
-
export { type ApiReferenceFramework, type ApiReferenceOpenApiDiscovery, type ApiReferenceOpenApiVersionDiscovery, type ApiReferenceRenderer, type ApiReferenceRoute, type BuildApiReferenceOperationPagesOptions, type BuildApiReferenceOptions, type BuildDocsContentSnapshotOptions, type CreateApiReferenceOperationMarkdownResponseOptions, type CreateDocsMcpServerOptions, DEFAULT_API_REFERENCE_OPENAPI_ROUTE, DEFAULT_DOCS_CONTENT_CHANGE_HYDRATION_TOKEN_BUDGET, DEFAULT_DOCS_MCP_CONTENT_CHANGE_POLL_INTERVAL_MS, DEFAULT_DOCS_MCP_CORS_ALLOWED_HEADERS, DEFAULT_DOCS_MCP_CORS_EXPOSED_HEADERS, DEFAULT_DOCS_MCP_CORS_MAX_AGE_SECONDS, DEFAULT_DOCS_MCP_MAX_BODY_BYTES, DEFAULT_DOCS_REVIEW_SCORE_THRESHOLD, DEFAULT_DOCS_REVIEW_WORKFLOW_PATH, DEFAULT_OPEN_DOCS_PROMPT, DEFAULT_OPEN_DOCS_PROVIDER_IDS, DEFAULT_OPEN_DOCS_TARGET, DEFAULT_PROMPT_PROVIDER_TEMPLATES, DEFAULT_SITEMAP_MANIFEST_PATH, DEFAULT_SITEMAP_MD_DOCS_ROUTE, DEFAULT_SITEMAP_MD_ROUTE, DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, DEFAULT_SITEMAP_XML_ROUTE, DOCS_AGENT_FEEDBACK_IMPROVEMENT_FORMAT, DOCS_AGENT_TRACE_EVENT_TYPES, DOCS_CONFIG_SCHEMA_OPTIONS, DOCS_CONTENT_CHANGES_FORMAT, DOCS_CONTENT_CHANGES_RESPONSE_VALUE, DOCS_CONTENT_CHANGE_HYDRATION_FORMAT, DOCS_CONTENT_SNAPSHOT_FORMAT, DOCS_MCP_CONTENT_CHANGES_CURRENT_URI, DOCS_MCP_CONTENT_CHANGES_URI_TEMPLATE, type DocsAgentContentChangesConfig, type DocsAgentEvaluationAnswerInput, type DocsAgentEvaluationAnswerProvider, type DocsAgentEvaluationAnswerRequest, type DocsAgentEvaluationAnswerResult, type DocsAgentEvaluationAnswerRunner, type DocsAgentEvaluationSourceReference, type DocsAgentEvaluationSurface, type DocsAgentEvaluationTaskInput, type DocsAgentFeedbackCluster, type DocsAgentFeedbackImprovementOptions, type DocsAgentFeedbackImprovementReport, type DocsAgentFeedbackIssueDraft, type DocsAgentGoldenAnswerExpectation, type DocsAgentGoldenAuthenticatedContentExpectation, type DocsAgentGoldenExampleVerification, type DocsAgentGoldenFreshnessExpectation, type DocsAgentGoldenPromptInjectionExpectation, type DocsAgentGoldenQueryVariant, type DocsAgentGoldenQueryVariantKind, type DocsAgentGoldenSafetyExpectation, type DocsAgentTraceContext, type DocsAgentTraceEventInput, type DocsAgentTraceEventType, type DocsAgentTraceStatus, type DocsAnalyticsConfig, type DocsAnalyticsEvent, type DocsAnalyticsEventInput, type DocsAskAIFeedbackConfig, type DocsAskAIFeedbackData, type DocsAskAIFeedbackMessage, type DocsAskAIFeedbackValue, type DocsAskAIMcpConfig, type DocsAuthoringFileState, type DocsAuthoringMcpOptions, type DocsCloudAskAIConfig, type DocsCloudAskAIOptions, type DocsCloudAskAIResponseOptions, type DocsCloudPublicConfig, type DocsCloudRouteHandlerOptions, type DocsCloudRouteHandlers, type DocsCloudRuntimeEnv, type DocsCloudRuntimeValue, type DocsCloudServer, type DocsCloudServerOptions, type DocsCloudTrackEventOptions, type DocsContentChangeDocument, type DocsContentChangeFeed, type DocsContentChangeHydrationBudget, type DocsContentChangeHydrationContent, type DocsContentChangeHydrationResponse, type DocsContentChangeHydrationSection, type DocsContentChangeHydrationTombstone, type DocsContentChangeSnapshotContext, type DocsContentChangeSnapshotLoader, type DocsContentChangeSnapshotSaver, type DocsContentChangedDocument, type DocsContentChangesRequest, DocsContentChangesRequestError, type DocsContentChangesResponse, type DocsContentSnapshot, type DocsContentSnapshotDocument, type DocsGoldenAnswerMetrics, type DocsGoldenCitationMetrics, type DocsGoldenEvaluationCoverage, type DocsGoldenEvaluationCoverageStatus, type DocsGoldenEvaluationDimensionCoverage, type DocsGoldenEvaluationQuality, type DocsGoldenEvaluationStatus, type DocsGoldenExampleMetrics, type DocsGoldenExampleResult, type DocsGoldenExpectedExample, type DocsGoldenQueryVariantResult, type DocsGoldenRetrievalMetrics, type DocsGoldenRetrievedSource, type DocsGoldenSafetyCaseKind, type DocsGoldenSafetyCaseResult, type DocsGoldenSafetyMetrics, type DocsGoldenSelectionMetrics, type DocsGoldenTask, type DocsGoldenTaskExpectation, type DocsGoldenTaskFilters, type DocsGoldenTaskReport, type DocsGoldenTasksReport, type DocsGoldenUsageMetrics, type DocsLocalMcpSearchRuntimeConfig, type DocsLocalMcpSearchRuntimeInput, type DocsMarkdownPromptBlock, type DocsMcpAgentContractSummary, type DocsMcpApiReferenceSource, type DocsMcpCodeExample, type DocsMcpConfigSchema, type DocsMcpConfigSchemaOption, type DocsMcpContextResult, type DocsMcpContextSource, type DocsMcpDocsList, type DocsMcpDocsPageSummary, type DocsMcpDocsSection, type DocsMcpHttpHandlers, type DocsMcpNavigationNode, type DocsMcpNavigationTree, type DocsMcpPage, type DocsMcpPageSectionIndex, type DocsMcpPageSectionList, type DocsMcpPaginatedDocsList, type DocsMcpPagination, type DocsMcpRequestContext, type DocsMcpResolvedConfig, type DocsMcpResolvedCorsConfig, type DocsMcpResolvedPromptsConfig, type DocsMcpResolvedProtectedResourceConfig, type DocsMcpResolvedSecurityConfig, type DocsMcpSource, type DocsMcpTaskSummary, type DocsObservabilityConfig, type DocsObservabilityEvent, type DocsObservabilityEventInput, type DocsPaginatedSearchResponse, DocsPaginationCursorError, type DocsResolvedContentChangesConfig, type DocsRetrievalSourceProvenance, type DocsRetrievalSourceScope, type DocsSearchAdapter, type DocsSearchAdapterContext, type DocsSearchAdapterFactory, type DocsSearchAdapterPage, type DocsSearchAmbiguityDecision, type DocsSearchAmbiguityDecisionStatus, type DocsSearchAmbiguityResolution, type DocsSearchConfig, type DocsSearchDocument, type DocsSearchExplanation, type DocsSearchFilterDecision, type DocsSearchFilterDecisionOutcome, type DocsSearchFilterField, type DocsSearchFilterInput, type DocsSearchFilters, type DocsSearchMatchField, type DocsSearchMatchedTerm, type DocsSearchQuery, type DocsSearchRankingReason, type DocsSearchRankingReasonCode, type DocsSearchRankingStrategy, type DocsSearchRequest, DocsSearchRequestError, type DocsSearchRequestResolutionOptions, type DocsSearchResponse, type DocsSearchResult, type DocsSearchSourcePage, type DocsSearchWarning, type DocsSearchWarningCode, type DocsSitemapFormat, type DocsSitemapManifest, type DocsSitemapManifestPage, type DocsSitemapPageInput, type DocsSitemapResolvedConfig, type EnrichDocsSearchDocumentsWithProvenanceOptions, type ExtractedDocsMarkdownPromptBlocks, type HydrateDocsContentChangesOptions, MAX_DOCS_CONTENT_CHANGE_HYDRATION_TOKEN_BUDGET, MIN_DOCS_CONTENT_CHANGE_HYDRATION_TOKEN_BUDGET, type McpDocsSearchConfig, type NormalizedOpenApiExample, type NormalizedOpenApiMediaType, type NormalizedOpenApiModel, type NormalizedOpenApiOperation, type NormalizedOpenApiParameter, type NormalizedOpenApiRequestBody, type NormalizedOpenApiResponse, OPENAPI_OPERATION_METHODS, type OpenApiOperationMethod, type PerformDocsSearchOptions, type PromptAction, type PromptProviderChoice, type ResolveConfiguredAgentSkillsOptions, type ResolveDocsContentChangesOptions, type ResolvedApiReferenceConfig, type ResolvedApiReferenceVersion, type ResolvedDocsAnalyticsConfig, type ResolvedDocsObservabilityConfig, type ResolvedDocsReviewConfig, type RunDocsGoldenTasksOptions, type SerializeOpenDocsProviderOptions, type SerializedOpenDocsProvider, analyzeDocsAgentFeedback, buildApiReferenceHtmlDocument, buildApiReferenceHtmlDocumentAsync, buildApiReferenceOpenApiDocument, buildApiReferenceOpenApiDocumentAsync, buildApiReferenceOperationPagesAsync, buildApiReferencePageTitle, buildApiReferenceScalarCss, buildDocsAskAIContext, buildDocsContentSnapshot, buildDocsRetrievalDigestProjection, buildDocsReviewWorkflow, buildDocsReviewWorkflowPathFilters, buildDocsSearchDocuments, buildDocsSitemapManifest, buildNormalizedOpenApiModel, createAlgoliaSearchAdapter, createApiReferenceOperationMarkdownResponse, createCustomSearchAdapter, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsAuthoringMcpServer, createDocsCloudAskAIResponse, createDocsCloudRouteHandler, createDocsCloudServer, createDocsContentChangeFeed, createDocsContentChangesHttpResponse, createDocsMcpHttpHandler, createDocsMcpServer, createDocsSitemapResponse, createFilesystemDocsMcpSource, createMcpSearchAdapter, createSimpleSearchAdapter, createTypesenseSearchAdapter, digestDocsRetrievalContent, emitDocsAgentTraceEvent, emitDocsAnalyticsEvent, emitDocsObservabilityEvent, enrichDocsSearchDocumentsWithProvenance, ensureDocsReviewWorkflow, extractDocsMarkdownPromptBlocks, formatDocsAskAIPackageHints, getDocsConfigSchema, getDocsRequestAnalyticsProperties, hydrateDocsContentChanges, inferDocsAskAIPackageHints, isApiReferenceOpenApiRequest, isDocsCloudAskAIProvider, isDocsContentChangeGeneration, isDocsContentChangesRequest, isDocsRetrievalCanonicalUrl, normalizeDocsMcpRoute, normalizeDocsSearchFilters, normalizePromptProviderName, parsePromptStringArray, performDocsSearch, performDocsSearchWithMetadata, readDocsAgentFeedbackFile, readDocsAuthoringFile, readDocsReviewConfigFromSource, readDocsSitemapManifest, readDocsSitemapManifestFromContentMap, remarkCodeGroup, renderDocsAgentSkillsBundle, renderDocsSitemapMarkdown, renderDocsSitemapXml, resolveApiReferenceConfig, resolveApiReferenceOpenApiDiscovery, resolveApiReferenceRenderer, resolveApiReferenceVersion, resolveApiReferenceVersionFromPathname, resolveAskAISearchRequestConfig, resolveConfiguredAgentSkills, resolveConfiguredAgentSkillsSync, resolveDocsAnalyticsConfig, resolveDocsContentChangesConfig, resolveDocsContentChangesRequest, resolveDocsMcpConfig, resolveDocsMcpPromptsConfig, resolveDocsObservabilityConfig, resolveDocsRetrievalLastModified, resolveDocsReviewConfig, resolveDocsSearchAudience, resolveDocsSearchError, resolveDocsSearchFilters, resolveDocsSearchRequest, resolveDocsSitemapConfig, resolveDocsSitemapPageLastmod, resolveDocsSitemapRequest, resolveLocalDocsMcpSearchConfig, resolvePromptProviderChoices, resolveSearchRequestConfig, runDocsAuthoringMcpStdio, runDocsGoldenTasks, runDocsMcpStdio, sanitizePromptText, serializeDocsIcon, serializeDocsIconRegistry, serializeOpenDocsProvider, serializeOpenDocsProviders, toDocsSitemapMarkdownUrl, writeDocsAuthoringFile };
|
|
201
|
+
export { type ApiReferenceFramework, type ApiReferenceOpenApiDiscovery, type ApiReferenceOpenApiVersionDiscovery, type ApiReferenceRenderer, type ApiReferenceRendererConfig, type ApiReferenceRendererInput, type ApiReferenceRoute, type BuildApiReferenceOperationPagesOptions, type BuildApiReferenceOptions, type BuildDocsContentSnapshotOptions, type CreateApiReferenceOperationMarkdownResponseOptions, type CreateDocsMcpServerOptions, DEFAULT_API_REFERENCE_OPENAPI_ROUTE, DEFAULT_DOCS_CONTENT_CHANGE_HYDRATION_TOKEN_BUDGET, DEFAULT_DOCS_MCP_CONTENT_CHANGE_POLL_INTERVAL_MS, DEFAULT_DOCS_MCP_CORS_ALLOWED_HEADERS, DEFAULT_DOCS_MCP_CORS_EXPOSED_HEADERS, DEFAULT_DOCS_MCP_CORS_MAX_AGE_SECONDS, DEFAULT_DOCS_MCP_MAX_BODY_BYTES, DEFAULT_DOCS_REVIEW_SCORE_THRESHOLD, DEFAULT_DOCS_REVIEW_WORKFLOW_PATH, DEFAULT_OPEN_DOCS_PROMPT, DEFAULT_OPEN_DOCS_PROVIDER_IDS, DEFAULT_OPEN_DOCS_TARGET, DEFAULT_PROMPT_PROVIDER_TEMPLATES, DEFAULT_SITEMAP_MANIFEST_PATH, DEFAULT_SITEMAP_MD_DOCS_ROUTE, DEFAULT_SITEMAP_MD_ROUTE, DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, DEFAULT_SITEMAP_XML_ROUTE, DOCS_AGENT_FEEDBACK_IMPROVEMENT_FORMAT, DOCS_AGENT_TRACE_EVENT_TYPES, DOCS_CONFIG_SCHEMA_OPTIONS, DOCS_CONTENT_CHANGES_FORMAT, DOCS_CONTENT_CHANGES_RESPONSE_VALUE, DOCS_CONTENT_CHANGE_HYDRATION_FORMAT, DOCS_CONTENT_SNAPSHOT_FORMAT, DOCS_MCP_CONTENT_CHANGES_CURRENT_URI, DOCS_MCP_CONTENT_CHANGES_URI_TEMPLATE, type DocsAgentContentChangesConfig, type DocsAgentEvaluationAnswerInput, type DocsAgentEvaluationAnswerProvider, type DocsAgentEvaluationAnswerRequest, type DocsAgentEvaluationAnswerResult, type DocsAgentEvaluationAnswerRunner, type DocsAgentEvaluationSourceReference, type DocsAgentEvaluationSurface, type DocsAgentEvaluationTaskInput, type DocsAgentFeedbackCluster, type DocsAgentFeedbackImprovementOptions, type DocsAgentFeedbackImprovementReport, type DocsAgentFeedbackIssueDraft, type DocsAgentGoldenAnswerExpectation, type DocsAgentGoldenAuthenticatedContentExpectation, type DocsAgentGoldenExampleVerification, type DocsAgentGoldenFreshnessExpectation, type DocsAgentGoldenPromptInjectionExpectation, type DocsAgentGoldenQueryVariant, type DocsAgentGoldenQueryVariantKind, type DocsAgentGoldenSafetyExpectation, type DocsAgentTraceContext, type DocsAgentTraceEventInput, type DocsAgentTraceEventType, type DocsAgentTraceStatus, type DocsAnalyticsConfig, type DocsAnalyticsEvent, type DocsAnalyticsEventInput, type DocsAskAIFeedbackConfig, type DocsAskAIFeedbackData, type DocsAskAIFeedbackMessage, type DocsAskAIFeedbackValue, type DocsAskAIMcpConfig, type DocsAuthoringFileState, type DocsAuthoringMcpOptions, type DocsCloudAskAIConfig, type DocsCloudAskAIOptions, type DocsCloudAskAIResponseOptions, type DocsCloudPublicConfig, type DocsCloudRouteHandlerOptions, type DocsCloudRouteHandlers, type DocsCloudRuntimeEnv, type DocsCloudRuntimeValue, type DocsCloudServer, type DocsCloudServerOptions, type DocsCloudTrackEventOptions, type DocsContentChangeDocument, type DocsContentChangeFeed, type DocsContentChangeHydrationBudget, type DocsContentChangeHydrationContent, type DocsContentChangeHydrationResponse, type DocsContentChangeHydrationSection, type DocsContentChangeHydrationTombstone, type DocsContentChangeSnapshotContext, type DocsContentChangeSnapshotLoader, type DocsContentChangeSnapshotSaver, type DocsContentChangedDocument, type DocsContentChangesRequest, DocsContentChangesRequestError, type DocsContentChangesResponse, type DocsContentSnapshot, type DocsContentSnapshotDocument, type DocsGoldenAnswerMetrics, type DocsGoldenCitationMetrics, type DocsGoldenEvaluationCoverage, type DocsGoldenEvaluationCoverageStatus, type DocsGoldenEvaluationDimensionCoverage, type DocsGoldenEvaluationQuality, type DocsGoldenEvaluationStatus, type DocsGoldenExampleMetrics, type DocsGoldenExampleResult, type DocsGoldenExpectedExample, type DocsGoldenQueryVariantResult, type DocsGoldenRetrievalMetrics, type DocsGoldenRetrievedSource, type DocsGoldenSafetyCaseKind, type DocsGoldenSafetyCaseResult, type DocsGoldenSafetyMetrics, type DocsGoldenSelectionMetrics, type DocsGoldenTask, type DocsGoldenTaskExpectation, type DocsGoldenTaskFilters, type DocsGoldenTaskReport, type DocsGoldenTasksReport, type DocsGoldenUsageMetrics, type DocsLocalMcpSearchRuntimeConfig, type DocsLocalMcpSearchRuntimeInput, type DocsMarkdownPromptBlock, type DocsMcpAgentContractSummary, type DocsMcpApiReferenceSource, type DocsMcpCodeExample, type DocsMcpConfigSchema, type DocsMcpConfigSchemaOption, type DocsMcpContextResult, type DocsMcpContextSource, type DocsMcpDocsList, type DocsMcpDocsPageSummary, type DocsMcpDocsSection, type DocsMcpHttpHandlers, type DocsMcpNavigationNode, type DocsMcpNavigationTree, type DocsMcpPage, type DocsMcpPageSectionIndex, type DocsMcpPageSectionList, type DocsMcpPaginatedDocsList, type DocsMcpPagination, type DocsMcpRequestContext, type DocsMcpResolvedConfig, type DocsMcpResolvedCorsConfig, type DocsMcpResolvedPromptsConfig, type DocsMcpResolvedProtectedResourceConfig, type DocsMcpResolvedSecurityConfig, type DocsMcpSource, type DocsMcpTaskSummary, type DocsObservabilityConfig, type DocsObservabilityEvent, type DocsObservabilityEventInput, type DocsPaginatedSearchResponse, DocsPaginationCursorError, type DocsResolvedContentChangesConfig, type DocsRetrievalSourceProvenance, type DocsRetrievalSourceScope, type DocsSearchAdapter, type DocsSearchAdapterContext, type DocsSearchAdapterFactory, type DocsSearchAdapterPage, type DocsSearchAmbiguityDecision, type DocsSearchAmbiguityDecisionStatus, type DocsSearchAmbiguityResolution, type DocsSearchConfig, type DocsSearchDocument, type DocsSearchExplanation, type DocsSearchFilterDecision, type DocsSearchFilterDecisionOutcome, type DocsSearchFilterField, type DocsSearchFilterInput, type DocsSearchFilters, type DocsSearchMatchField, type DocsSearchMatchedTerm, type DocsSearchQuery, type DocsSearchRankingReason, type DocsSearchRankingReasonCode, type DocsSearchRankingStrategy, type DocsSearchRequest, DocsSearchRequestError, type DocsSearchRequestResolutionOptions, type DocsSearchResponse, type DocsSearchResult, type DocsSearchSourcePage, type DocsSearchWarning, type DocsSearchWarningCode, type DocsSitemapFormat, type DocsSitemapManifest, type DocsSitemapManifestPage, type DocsSitemapPageInput, type DocsSitemapResolvedConfig, type EnrichDocsSearchDocumentsWithProvenanceOptions, type ExtractedDocsMarkdownPromptBlocks, type HydrateDocsContentChangesOptions, MAX_DOCS_CONTENT_CHANGE_HYDRATION_TOKEN_BUDGET, MIN_DOCS_CONTENT_CHANGE_HYDRATION_TOKEN_BUDGET, type McpDocsSearchConfig, type NormalizedOpenApiExample, type NormalizedOpenApiMediaType, type NormalizedOpenApiModel, type NormalizedOpenApiOperation, type NormalizedOpenApiParameter, type NormalizedOpenApiRequestBody, type NormalizedOpenApiResponse, OPENAPI_OPERATION_METHODS, type OpenApiOperationMethod, type PerformDocsSearchOptions, type PromptAction, type PromptProviderChoice, type ResolveConfiguredAgentSkillsOptions, type ResolveDocsContentChangesOptions, type ResolvedApiReferenceConfig, type ResolvedApiReferenceVersion, type ResolvedDocsAnalyticsConfig, type ResolvedDocsObservabilityConfig, type ResolvedDocsReviewConfig, type RunDocsGoldenTasksOptions, type SerializeOpenDocsProviderOptions, type SerializedOpenDocsProvider, analyzeDocsAgentFeedback, buildApiReferenceHtmlDocument, buildApiReferenceHtmlDocumentAsync, buildApiReferenceOpenApiDocument, buildApiReferenceOpenApiDocumentAsync, buildApiReferenceOperationPagesAsync, buildApiReferencePageTitle, buildApiReferenceScalarCss, buildDocsAskAIContext, buildDocsContentSnapshot, buildDocsRetrievalDigestProjection, buildDocsReviewWorkflow, buildDocsReviewWorkflowPathFilters, buildDocsSearchDocuments, buildDocsSitemapManifest, buildNormalizedOpenApiModel, createAlgoliaSearchAdapter, createApiReferenceOperationMarkdownResponse, createCustomSearchAdapter, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsAuthoringMcpServer, createDocsCloudAskAIResponse, createDocsCloudRouteHandler, createDocsCloudServer, createDocsContentChangeFeed, createDocsContentChangesHttpResponse, createDocsMcpHttpHandler, createDocsMcpServer, createDocsSitemapResponse, createFilesystemDocsMcpSource, createMcpSearchAdapter, createSimpleSearchAdapter, createTypesenseSearchAdapter, digestDocsRetrievalContent, emitDocsAgentTraceEvent, emitDocsAnalyticsEvent, emitDocsObservabilityEvent, enrichDocsSearchDocumentsWithProvenance, ensureDocsReviewWorkflow, extractDocsMarkdownPromptBlocks, formatDocsAskAIPackageHints, getDocsConfigSchema, getDocsRequestAnalyticsProperties, hydrateDocsContentChanges, inferDocsAskAIPackageHints, isApiReferenceOpenApiRequest, isDocsCloudAskAIProvider, isDocsContentChangeGeneration, isDocsContentChangesRequest, isDocsRetrievalCanonicalUrl, normalizeDocsMcpRoute, normalizeDocsSearchFilters, normalizePromptProviderName, parsePromptStringArray, performDocsSearch, performDocsSearchWithMetadata, readDocsAgentFeedbackFile, readDocsAuthoringFile, readDocsReviewConfigFromSource, readDocsSitemapManifest, readDocsSitemapManifestFromContentMap, remarkCodeGroup, renderDocsAgentSkillsBundle, renderDocsSitemapMarkdown, renderDocsSitemapXml, resolveApiReferenceConfig, resolveApiReferenceOpenApiDiscovery, resolveApiReferenceRenderer, resolveApiReferenceVersion, resolveApiReferenceVersionFromPathname, resolveAskAISearchRequestConfig, resolveConfiguredAgentSkills, resolveConfiguredAgentSkillsSync, resolveDocsAnalyticsConfig, resolveDocsContentChangesConfig, resolveDocsContentChangesRequest, resolveDocsMcpConfig, resolveDocsMcpPromptsConfig, resolveDocsObservabilityConfig, resolveDocsRetrievalLastModified, resolveDocsReviewConfig, resolveDocsSearchAudience, resolveDocsSearchError, resolveDocsSearchFilters, resolveDocsSearchRequest, resolveDocsSitemapConfig, resolveDocsSitemapPageLastmod, resolveDocsSitemapRequest, resolveLocalDocsMcpSearchConfig, resolvePromptProviderChoices, resolveSearchRequestConfig, runDocsAuthoringMcpStdio, runDocsGoldenTasks, runDocsMcpStdio, sanitizePromptText, serializeDocsIcon, serializeDocsIconRegistry, serializeOpenDocsProvider, serializeOpenDocsProviders, toDocsSitemapMarkdownUrl, writeDocsAuthoringFile };
|
package/dist/server.mjs
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import "./http-body-DkAPk6D5.mjs";
|
|
2
2
|
import "./markdown-sections-9Oxr33b-.mjs";
|
|
3
3
|
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-p8Vhhu2P.mjs";
|
|
4
|
-
import { $t as buildDocsAskAIContext, At as DEFAULT_SITEMAP_MD_ROUTE, Bt as resolveDocsSitemapRequest, Cn as extractDocsMarkdownPromptBlocks,
|
|
4
|
+
import { $t as buildDocsAskAIContext, At as DEFAULT_SITEMAP_MD_ROUTE, Bt as resolveDocsSitemapRequest, Cn as extractDocsMarkdownPromptBlocks, Ft as readDocsSitemapManifestFromContentMap, Gt as DocsContentChangesRequestError, Ht as DOCS_CONTENT_CHANGES_FORMAT, In as DocsPaginationCursorError, It as renderDocsSitemapMarkdown, Jt as isDocsContentChangeGeneration, Kt as createDocsContentChangeFeed, Lt as renderDocsSitemapXml, Mt as DEFAULT_SITEMAP_XML_ROUTE, Nt as buildDocsSitemapManifest, Ot as DEFAULT_SITEMAP_MANIFEST_PATH, Pt as createDocsSitemapResponse, Qt as DocsSearchRequestError, Rt as resolveDocsSitemapConfig, Sn as resolveSearchRequestConfig, Ut as DOCS_CONTENT_CHANGES_RESPONSE_VALUE, Vt as toDocsSitemapMarkdownUrl, Wt as DOCS_CONTENT_SNAPSHOT_FORMAT, Xt as resolveDocsContentChangesConfig, Yt as isDocsContentChangesRequest, Zt as resolveDocsContentChangesRequest, _n as resolveDocsSearchAudience, an as createCustomSearchAdapter, bn as resolveDocsSearchRequest, cn as createTypesenseSearchAdapter, dn as inferDocsAskAIPackageHints, en as buildDocsContentSnapshot, fn as normalizeDocsSearchFilters, gn as resolveDocsRetrievalLastModified, hn as resolveAskAISearchRequestConfig, in as createAlgoliaSearchAdapter, jt as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, kt as DEFAULT_SITEMAP_MD_DOCS_ROUTE, ln as enrichDocsSearchDocumentsWithProvenance, mn as performDocsSearchWithMetadata, nn as buildDocsSearchDocuments, on as createMcpSearchAdapter, pn as performDocsSearch, qt as createDocsContentChangesHttpResponse, sn as createSimpleSearchAdapter, tn as buildDocsRetrievalDigestProjection, un as formatDocsAskAIPackageHints, vn as resolveDocsSearchError, xn as resolveLocalDocsMcpSearchConfig, yn as resolveDocsSearchFilters, zt as resolveDocsSitemapPageLastmod } from "./agent-DkAidqtV.mjs";
|
|
5
5
|
import { n as digestDocsRetrievalContent, r as isDocsRetrievalCanonicalUrl } from "./retrieval-digest-CT-eIEcp.mjs";
|
|
6
|
-
import "./standards-discovery-
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { a as
|
|
11
|
-
import { i as
|
|
12
|
-
import {
|
|
6
|
+
import "./standards-discovery-sSEojU80.mjs";
|
|
7
|
+
import "./sidebar-CFHBj29f.mjs";
|
|
8
|
+
import { a as DEFAULT_DOCS_CONTENT_CHANGE_HYDRATION_TOKEN_BUDGET, c as MIN_DOCS_CONTENT_CHANGE_HYDRATION_TOKEN_BUDGET, l as hydrateDocsContentChanges, o as DOCS_CONTENT_CHANGE_HYDRATION_FORMAT, s as MAX_DOCS_CONTENT_CHANGE_HYDRATION_TOKEN_BUDGET } from "./openapi-mcp-BIOTLiA7.mjs";
|
|
9
|
+
import { n as buildNormalizedOpenApiModel, t as OPENAPI_OPERATION_METHODS } from "./openapi-operations-DFpaqOqA.mjs";
|
|
10
|
+
import { a as normalizePromptProviderName, c as sanitizePromptText, d as serializeOpenDocsProvider, f as serializeOpenDocsProviders, i as DEFAULT_PROMPT_PROVIDER_TEMPLATES, l as serializeDocsIcon, n as DEFAULT_OPEN_DOCS_PROVIDER_IDS, o as parsePromptStringArray, p as remarkCodeGroup, r as DEFAULT_OPEN_DOCS_TARGET, s as resolvePromptProviderChoices, t as DEFAULT_OPEN_DOCS_PROMPT, u as serializeDocsIconRegistry } from "./prompt-utils-B5g-bv7o.mjs";
|
|
11
|
+
import { a as buildApiReferenceOpenApiDocumentAsync, c as buildApiReferenceScalarCss, f as resolveApiReferenceConfig, g as resolveApiReferenceVersionFromPathname, h as resolveApiReferenceVersion, i as buildApiReferenceOpenApiDocument, l as createApiReferenceOperationMarkdownResponse, m as resolveApiReferenceRenderer, n as buildApiReferenceHtmlDocument, o as buildApiReferenceOperationPagesAsync, p as resolveApiReferenceOpenApiDiscovery, r as buildApiReferenceHtmlDocumentAsync, s as buildApiReferencePageTitle, t as DEFAULT_API_REFERENCE_OPENAPI_ROUTE, u as isApiReferenceOpenApiRequest } from "./api-reference-BYee4zMo.mjs";
|
|
12
|
+
import { i as resolveConfiguredAgentSkillsSync, r as resolveConfiguredAgentSkills } from "./agent-skills-server-BC7md56k.mjs";
|
|
13
|
+
import { a as buildDocsReviewWorkflowPathFilters, c as resolveDocsReviewConfig, i as buildDocsReviewWorkflow, n as DEFAULT_DOCS_REVIEW_SCORE_THRESHOLD, o as ensureDocsReviewWorkflow, r as DEFAULT_DOCS_REVIEW_WORKFLOW_PATH, s as readDocsReviewConfigFromSource, t as runDocsGoldenTasks } from "./agent-evals-BLNLvXbG.mjs";
|
|
13
14
|
import { DEFAULT_DOCS_MCP_CONTENT_CHANGE_POLL_INTERVAL_MS, DEFAULT_DOCS_MCP_CORS_ALLOWED_HEADERS, DEFAULT_DOCS_MCP_CORS_EXPOSED_HEADERS, DEFAULT_DOCS_MCP_CORS_MAX_AGE_SECONDS, DEFAULT_DOCS_MCP_MAX_BODY_BYTES, DOCS_CONFIG_SCHEMA_OPTIONS, DOCS_MCP_CONTENT_CHANGES_CURRENT_URI, DOCS_MCP_CONTENT_CHANGES_URI_TEMPLATE, createDocsMcpHttpHandler, createDocsMcpServer, createFilesystemDocsMcpSource, getDocsConfigSchema, normalizeDocsMcpRoute, resolveDocsMcpConfig, resolveDocsMcpPromptsConfig, runDocsMcpStdio } from "./mcp.mjs";
|
|
14
|
-
import { n as analyzeDocsAgentFeedback, r as readDocsAgentFeedbackFile, t as DOCS_AGENT_FEEDBACK_IMPROVEMENT_FORMAT } from "./agent-feedback-loop-
|
|
15
|
-
import { i as writeDocsAuthoringFile, n as readDocsAuthoringFile, r as runDocsAuthoringMcpStdio, t as createDocsAuthoringMcpServer } from "./authoring-mcp-
|
|
16
|
-
import { n as isDocsCloudAskAIProvider, t as createDocsCloudAskAIResponse } from "./cloud-ask-ai-
|
|
15
|
+
import { n as analyzeDocsAgentFeedback, r as readDocsAgentFeedbackFile, t as DOCS_AGENT_FEEDBACK_IMPROVEMENT_FORMAT } from "./agent-feedback-loop-CcZL_sb1.mjs";
|
|
16
|
+
import { i as writeDocsAuthoringFile, n as readDocsAuthoringFile, r as runDocsAuthoringMcpStdio, t as createDocsAuthoringMcpServer } from "./authoring-mcp-CiCUQe3o.mjs";
|
|
17
|
+
import { n as isDocsCloudAskAIProvider, t as createDocsCloudAskAIResponse } from "./cloud-ask-ai-BqKhjpS5.mjs";
|
|
17
18
|
import { createDocsCloudRouteHandler, createDocsCloudServer } from "./docs-cloud-server.mjs";
|
|
18
|
-
import "./code-blocks-
|
|
19
|
+
import "./code-blocks-GYdvS3BH.mjs";
|
|
19
20
|
import { renderDocsAgentSkillsBundle } from "./agent-skills-vite.mjs";
|
|
20
|
-
import { t as readDocsSitemapManifest } from "./sitemap-server-
|
|
21
|
+
import { t as readDocsSitemapManifest } from "./sitemap-server-Lg3YhUx4.mjs";
|
|
21
22
|
|
|
22
23
|
export { DEFAULT_API_REFERENCE_OPENAPI_ROUTE, DEFAULT_DOCS_CONTENT_CHANGE_HYDRATION_TOKEN_BUDGET, DEFAULT_DOCS_MCP_CONTENT_CHANGE_POLL_INTERVAL_MS, DEFAULT_DOCS_MCP_CORS_ALLOWED_HEADERS, DEFAULT_DOCS_MCP_CORS_EXPOSED_HEADERS, DEFAULT_DOCS_MCP_CORS_MAX_AGE_SECONDS, DEFAULT_DOCS_MCP_MAX_BODY_BYTES, DEFAULT_DOCS_REVIEW_SCORE_THRESHOLD, DEFAULT_DOCS_REVIEW_WORKFLOW_PATH, DEFAULT_OPEN_DOCS_PROMPT, DEFAULT_OPEN_DOCS_PROVIDER_IDS, DEFAULT_OPEN_DOCS_TARGET, DEFAULT_PROMPT_PROVIDER_TEMPLATES, DEFAULT_SITEMAP_MANIFEST_PATH, DEFAULT_SITEMAP_MD_DOCS_ROUTE, DEFAULT_SITEMAP_MD_ROUTE, DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, DEFAULT_SITEMAP_XML_ROUTE, DOCS_AGENT_FEEDBACK_IMPROVEMENT_FORMAT, DOCS_AGENT_TRACE_EVENT_TYPES, DOCS_CONFIG_SCHEMA_OPTIONS, DOCS_CONTENT_CHANGES_FORMAT, DOCS_CONTENT_CHANGES_RESPONSE_VALUE, DOCS_CONTENT_CHANGE_HYDRATION_FORMAT, DOCS_CONTENT_SNAPSHOT_FORMAT, DOCS_MCP_CONTENT_CHANGES_CURRENT_URI, DOCS_MCP_CONTENT_CHANGES_URI_TEMPLATE, DocsContentChangesRequestError, DocsPaginationCursorError, DocsSearchRequestError, MAX_DOCS_CONTENT_CHANGE_HYDRATION_TOKEN_BUDGET, MIN_DOCS_CONTENT_CHANGE_HYDRATION_TOKEN_BUDGET, OPENAPI_OPERATION_METHODS, analyzeDocsAgentFeedback, buildApiReferenceHtmlDocument, buildApiReferenceHtmlDocumentAsync, buildApiReferenceOpenApiDocument, buildApiReferenceOpenApiDocumentAsync, buildApiReferenceOperationPagesAsync, buildApiReferencePageTitle, buildApiReferenceScalarCss, buildDocsAskAIContext, buildDocsContentSnapshot, buildDocsRetrievalDigestProjection, buildDocsReviewWorkflow, buildDocsReviewWorkflowPathFilters, buildDocsSearchDocuments, buildDocsSitemapManifest, buildNormalizedOpenApiModel, createAlgoliaSearchAdapter, createApiReferenceOperationMarkdownResponse, createCustomSearchAdapter, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsAuthoringMcpServer, createDocsCloudAskAIResponse, createDocsCloudRouteHandler, createDocsCloudServer, createDocsContentChangeFeed, createDocsContentChangesHttpResponse, createDocsMcpHttpHandler, createDocsMcpServer, createDocsSitemapResponse, createFilesystemDocsMcpSource, createMcpSearchAdapter, createSimpleSearchAdapter, createTypesenseSearchAdapter, digestDocsRetrievalContent, emitDocsAgentTraceEvent, emitDocsAnalyticsEvent, emitDocsObservabilityEvent, enrichDocsSearchDocumentsWithProvenance, ensureDocsReviewWorkflow, extractDocsMarkdownPromptBlocks, formatDocsAskAIPackageHints, getDocsConfigSchema, getDocsRequestAnalyticsProperties, hydrateDocsContentChanges, inferDocsAskAIPackageHints, isApiReferenceOpenApiRequest, isDocsCloudAskAIProvider, isDocsContentChangeGeneration, isDocsContentChangesRequest, isDocsRetrievalCanonicalUrl, normalizeDocsMcpRoute, normalizeDocsSearchFilters, normalizePromptProviderName, parsePromptStringArray, performDocsSearch, performDocsSearchWithMetadata, readDocsAgentFeedbackFile, readDocsAuthoringFile, readDocsReviewConfigFromSource, readDocsSitemapManifest, readDocsSitemapManifestFromContentMap, remarkCodeGroup, renderDocsAgentSkillsBundle, renderDocsSitemapMarkdown, renderDocsSitemapXml, resolveApiReferenceConfig, resolveApiReferenceOpenApiDiscovery, resolveApiReferenceRenderer, resolveApiReferenceVersion, resolveApiReferenceVersionFromPathname, resolveAskAISearchRequestConfig, resolveConfiguredAgentSkills, resolveConfiguredAgentSkillsSync, resolveDocsAnalyticsConfig, resolveDocsContentChangesConfig, resolveDocsContentChangesRequest, resolveDocsMcpConfig, resolveDocsMcpPromptsConfig, resolveDocsObservabilityConfig, resolveDocsRetrievalLastModified, resolveDocsReviewConfig, resolveDocsSearchAudience, resolveDocsSearchError, resolveDocsSearchFilters, resolveDocsSearchRequest, resolveDocsSitemapConfig, resolveDocsSitemapPageLastmod, resolveDocsSitemapRequest, resolveLocalDocsMcpSearchConfig, resolvePromptProviderChoices, resolveSearchRequestConfig, runDocsAuthoringMcpStdio, runDocsGoldenTasks, runDocsMcpStdio, sanitizePromptText, serializeDocsIcon, serializeDocsIconRegistry, serializeOpenDocsProvider, serializeOpenDocsProviders, toDocsSitemapMarkdownUrl, writeDocsAuthoringFile };
|
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
import { $ as isDocsSkillRequest, K as isDocsAgentDiscoveryRequest, St as resolveDocsSkillFormat, Xt as resolveDocsContentChangesConfig, Yt as isDocsContentChangesRequest, dt as resolveDocsAgentFeedbackRequest, ft as resolveDocsAgentsFormat, mt as resolveDocsLlmsTxtRequest, q as isDocsAgentsRequest, ut as resolveDocsAgentFeedbackConfig, vt as resolveDocsMarkdownRequest } from "./agent-DkAidqtV.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/telemetry.ts
|
|
4
|
+
const DOCS_PACKAGE_NAME = "@farming-labs/docs";
|
|
5
|
+
const DOCS_PACKAGE_VERSION = "0.2.25";
|
|
6
|
+
const DEFAULT_DOCS_TELEMETRY_ENDPOINT = "https://docs.farming-labs.dev/api/telemetry/events";
|
|
7
|
+
const PROJECT_TELEMETRY_CACHE_TTL_MS = 1440 * 60 * 1e3;
|
|
8
|
+
const PROJECT_TELEMETRY_CACHE_MAX_KEYS = 256;
|
|
9
|
+
function getRuntimeEnv() {
|
|
10
|
+
if (typeof process === "undefined" || !process.env) return;
|
|
11
|
+
return process.env;
|
|
12
|
+
}
|
|
13
|
+
function readRuntimeEnv(name) {
|
|
14
|
+
const value = getRuntimeEnv()?.[name]?.trim();
|
|
15
|
+
return value ? value : void 0;
|
|
16
|
+
}
|
|
17
|
+
function isTruthyEnv(value) {
|
|
18
|
+
return /^(1|true|yes|on)$/i.test(value ?? "");
|
|
19
|
+
}
|
|
20
|
+
function isFalsyEnv(value) {
|
|
21
|
+
return /^(0|false|no|off)$/i.test(value ?? "");
|
|
22
|
+
}
|
|
23
|
+
function isBrowserRuntime() {
|
|
24
|
+
return typeof window !== "undefined" && typeof document !== "undefined";
|
|
25
|
+
}
|
|
26
|
+
function isProductionTelemetryRuntime() {
|
|
27
|
+
if (isBrowserRuntime()) return false;
|
|
28
|
+
const env = getRuntimeEnv();
|
|
29
|
+
if (!env) return true;
|
|
30
|
+
if (env.NODE_ENV === "test") return false;
|
|
31
|
+
if (env.VERCEL_ENV === "production") return true;
|
|
32
|
+
if (env.CONTEXT === "production" && isTruthyEnv(env.NETLIFY)) return true;
|
|
33
|
+
if (isTruthyEnv(env.CF_PAGES)) return true;
|
|
34
|
+
if (env.RENDER_SERVICE_ID || env.FLY_APP_NAME || env.RAILWAY_ENVIRONMENT) return true;
|
|
35
|
+
return env.NODE_ENV === "production";
|
|
36
|
+
}
|
|
37
|
+
function resolveDocsTelemetryConfig(telemetry) {
|
|
38
|
+
const envToggle = readRuntimeEnv("DOCS_TELEMETRY");
|
|
39
|
+
const envDisabled = readRuntimeEnv("DOCS_TELEMETRY_DISABLED");
|
|
40
|
+
if (isFalsyEnv(envToggle) || isTruthyEnv(envDisabled) || telemetry === false) return { enabled: false };
|
|
41
|
+
const objectConfig = telemetry && typeof telemetry === "object" ? telemetry : void 0;
|
|
42
|
+
if (objectConfig?.enabled === false) return { enabled: false };
|
|
43
|
+
return {
|
|
44
|
+
enabled: telemetry === true || objectConfig?.enabled === true || isTruthyEnv(envToggle) || isProductionTelemetryRuntime(),
|
|
45
|
+
endpoint: objectConfig?.endpoint?.trim() || readRuntimeEnv("DOCS_TELEMETRY_ENDPOINT") || DEFAULT_DOCS_TELEMETRY_ENDPOINT
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function readRequestOrigin(request) {
|
|
49
|
+
if (!request?.url) return void 0;
|
|
50
|
+
try {
|
|
51
|
+
return new URL(request.url).origin;
|
|
52
|
+
} catch {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/** Normalize an HTTP(S) telemetry site value to its origin. */
|
|
57
|
+
function normalizeDocsTelemetryOrigin(candidate) {
|
|
58
|
+
if (typeof candidate !== "string") return void 0;
|
|
59
|
+
const trimmed = candidate.trim();
|
|
60
|
+
if (!trimmed) return void 0;
|
|
61
|
+
try {
|
|
62
|
+
const hasScheme = /^[a-z][a-z\d+.-]*:(?!\d)/i.test(trimmed);
|
|
63
|
+
const url = new URL(hasScheme ? trimmed : `https://${trimmed}`);
|
|
64
|
+
if (url.protocol !== "http:" && url.protocol !== "https:") return void 0;
|
|
65
|
+
return url.origin;
|
|
66
|
+
} catch {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
/** Return whether a telemetry origin points at a local development server. */
|
|
71
|
+
function isLocalDocsTelemetryOrigin(candidate) {
|
|
72
|
+
const origin = normalizeDocsTelemetryOrigin(candidate);
|
|
73
|
+
if (!origin) return false;
|
|
74
|
+
const hostname = new URL(origin).hostname.toLowerCase().replace(/^\[|\]$/g, "").replace(/\.+$/, "");
|
|
75
|
+
if ([
|
|
76
|
+
"localhost",
|
|
77
|
+
"localhost.localdomain",
|
|
78
|
+
"localhost6",
|
|
79
|
+
"localhost6.localdomain6",
|
|
80
|
+
"ip6-localhost",
|
|
81
|
+
"ip6-loopback"
|
|
82
|
+
].includes(hostname) || hostname.endsWith(".localhost")) return true;
|
|
83
|
+
if (hostname === "::" || hostname === "::1") return true;
|
|
84
|
+
const ipv4 = hostname.split(".").map((part) => Number(part));
|
|
85
|
+
if (ipv4.length === 4 && ipv4.every((part) => Number.isInteger(part) && part >= 0 && part <= 255)) return ipv4[0] === 127 || ipv4.every((part) => part === 0);
|
|
86
|
+
return /^::ffff:7f[0-9a-f]{2}:/.test(hostname) || hostname === "::ffff:0:0";
|
|
87
|
+
}
|
|
88
|
+
function isBlockedDocsTelemetryOrigin(candidate) {
|
|
89
|
+
if (candidate === void 0) return false;
|
|
90
|
+
return !normalizeDocsTelemetryOrigin(candidate) || isLocalDocsTelemetryOrigin(candidate);
|
|
91
|
+
}
|
|
92
|
+
function readDeploymentOrigin() {
|
|
93
|
+
const candidates = [
|
|
94
|
+
readRuntimeEnv("DOCS_SITE_URL"),
|
|
95
|
+
readRuntimeEnv("NEXT_PUBLIC_BASE_URL"),
|
|
96
|
+
readRuntimeEnv("NEXT_PUBLIC_SITE_URL"),
|
|
97
|
+
readRuntimeEnv("SITE_URL"),
|
|
98
|
+
readRuntimeEnv("URL"),
|
|
99
|
+
readRuntimeEnv("CF_PAGES_URL"),
|
|
100
|
+
readRuntimeEnv("VERCEL_PROJECT_PRODUCTION_URL"),
|
|
101
|
+
readRuntimeEnv("VERCEL_URL"),
|
|
102
|
+
readRuntimeEnv("DEPLOY_PRIME_URL")
|
|
103
|
+
];
|
|
104
|
+
for (const candidate of candidates) {
|
|
105
|
+
const origin = normalizeDocsTelemetryOrigin(candidate);
|
|
106
|
+
if (origin) return origin;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
function detectDeployment() {
|
|
110
|
+
const env = getRuntimeEnv();
|
|
111
|
+
if (!env) return void 0;
|
|
112
|
+
if (env.VERCEL || env.VERCEL_ENV) return {
|
|
113
|
+
provider: "vercel",
|
|
114
|
+
environment: env.VERCEL_ENV,
|
|
115
|
+
id: env.VERCEL_DEPLOYMENT_ID ?? env.VERCEL_GIT_COMMIT_SHA,
|
|
116
|
+
region: env.VERCEL_REGION
|
|
117
|
+
};
|
|
118
|
+
if (env.NETLIFY) return {
|
|
119
|
+
provider: "netlify",
|
|
120
|
+
environment: env.CONTEXT,
|
|
121
|
+
id: env.DEPLOY_ID ?? env.COMMIT_REF
|
|
122
|
+
};
|
|
123
|
+
if (env.CF_PAGES) return {
|
|
124
|
+
provider: "cloudflare-pages",
|
|
125
|
+
environment: env.CF_PAGES_BRANCH,
|
|
126
|
+
id: env.CF_PAGES_COMMIT_SHA
|
|
127
|
+
};
|
|
128
|
+
if (env.RENDER_SERVICE_ID) return {
|
|
129
|
+
provider: "render",
|
|
130
|
+
environment: env.RENDER_ENV,
|
|
131
|
+
id: env.RENDER_SERVICE_ID
|
|
132
|
+
};
|
|
133
|
+
if (env.FLY_APP_NAME) return {
|
|
134
|
+
provider: "fly",
|
|
135
|
+
environment: env.FLY_APP_NAME,
|
|
136
|
+
id: env.FLY_ALLOC_ID,
|
|
137
|
+
region: env.FLY_REGION
|
|
138
|
+
};
|
|
139
|
+
if (env.RAILWAY_ENVIRONMENT) return {
|
|
140
|
+
provider: "railway",
|
|
141
|
+
environment: env.RAILWAY_ENVIRONMENT,
|
|
142
|
+
id: env.RAILWAY_DEPLOYMENT_ID
|
|
143
|
+
};
|
|
144
|
+
return env.NODE_ENV === "production" ? { environment: "production" } : void 0;
|
|
145
|
+
}
|
|
146
|
+
function detectRuntime() {
|
|
147
|
+
if (typeof process !== "undefined" && process.versions?.node) return {
|
|
148
|
+
name: "node",
|
|
149
|
+
version: process.versions.node
|
|
150
|
+
};
|
|
151
|
+
if (typeof navigator !== "undefined" && navigator.userAgent) return { name: "web-standard" };
|
|
152
|
+
}
|
|
153
|
+
function isObjectConfigEnabled(value, defaultEnabled) {
|
|
154
|
+
if (value === false) return false;
|
|
155
|
+
if (value === true) return true;
|
|
156
|
+
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
157
|
+
const enabled = value.enabled;
|
|
158
|
+
return enabled === false ? false : defaultEnabled || enabled === true;
|
|
159
|
+
}
|
|
160
|
+
return defaultEnabled;
|
|
161
|
+
}
|
|
162
|
+
function hasObjectConfig(value) {
|
|
163
|
+
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
164
|
+
}
|
|
165
|
+
function getDocsTelemetryFeatures(config) {
|
|
166
|
+
const pageActions = config.pageActions;
|
|
167
|
+
const feedback = config.feedback;
|
|
168
|
+
return {
|
|
169
|
+
search: isObjectConfigEnabled(config.search, true),
|
|
170
|
+
contentChanges: resolveDocsContentChangesConfig(config.agent?.contentChanges, { staticExport: config.staticExport === true }).enabled,
|
|
171
|
+
ai: isObjectConfigEnabled(config.ai, false),
|
|
172
|
+
mcp: isObjectConfigEnabled(config.mcp, true),
|
|
173
|
+
llmsTxt: isObjectConfigEnabled(config.llmsTxt, true),
|
|
174
|
+
pageActions: hasObjectConfig(pageActions),
|
|
175
|
+
feedback: feedback === true || hasObjectConfig(feedback) && feedback.enabled !== false,
|
|
176
|
+
agentFeedback: feedback !== false && !(hasObjectConfig(feedback) && feedback.agent === false) && !(hasObjectConfig(feedback) && hasObjectConfig(feedback.agent) && feedback.agent.enabled === false),
|
|
177
|
+
sitemap: isObjectConfigEnabled(config.sitemap, true),
|
|
178
|
+
robots: isObjectConfigEnabled(config.robots, true),
|
|
179
|
+
apiReference: isObjectConfigEnabled(config.apiReference, false),
|
|
180
|
+
staticExport: config.staticExport === true,
|
|
181
|
+
changelog: isObjectConfigEnabled(config.changelog, false),
|
|
182
|
+
cloud: typeof config.cloud !== "undefined" && isObjectConfigEnabled(config.cloud, true),
|
|
183
|
+
review: isObjectConfigEnabled(config.review, true),
|
|
184
|
+
codeBlocksValidate: hasObjectConfig(config.codeBlocks) && Boolean(config.codeBlocks.validate)
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
function createDocsTelemetryEvent(config, input, context = {}) {
|
|
188
|
+
const telemetryConfig = config.telemetry && typeof config.telemetry === "object" ? config.telemetry : void 0;
|
|
189
|
+
const siteOriginCandidates = [
|
|
190
|
+
context.siteOrigin,
|
|
191
|
+
input.site?.origin,
|
|
192
|
+
telemetryConfig?.siteOrigin,
|
|
193
|
+
readRequestOrigin(context.request),
|
|
194
|
+
readDeploymentOrigin()
|
|
195
|
+
];
|
|
196
|
+
if (siteOriginCandidates.some(isBlockedDocsTelemetryOrigin)) return void 0;
|
|
197
|
+
const siteOrigin = siteOriginCandidates.map(normalizeDocsTelemetryOrigin).find((origin) => Boolean(origin));
|
|
198
|
+
const deployment = input.deployment ?? detectDeployment();
|
|
199
|
+
const properties = context.properties || input.properties ? {
|
|
200
|
+
...input.properties,
|
|
201
|
+
...context.properties
|
|
202
|
+
} : void 0;
|
|
203
|
+
return {
|
|
204
|
+
...input,
|
|
205
|
+
timestamp: input.timestamp ?? (/* @__PURE__ */ new Date()).toISOString(),
|
|
206
|
+
package: {
|
|
207
|
+
name: DOCS_PACKAGE_NAME,
|
|
208
|
+
version: DOCS_PACKAGE_VERSION,
|
|
209
|
+
...input.package
|
|
210
|
+
},
|
|
211
|
+
framework: input.framework ?? context.framework,
|
|
212
|
+
runtime: input.runtime ?? detectRuntime(),
|
|
213
|
+
site: siteOrigin ? { origin: siteOrigin } : input.site,
|
|
214
|
+
deployment,
|
|
215
|
+
features: input.features ?? getDocsTelemetryFeatures(config),
|
|
216
|
+
properties
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
function projectEventKey(event) {
|
|
220
|
+
return [
|
|
221
|
+
event.package.name,
|
|
222
|
+
event.package.version,
|
|
223
|
+
event.framework ?? "",
|
|
224
|
+
event.site?.origin ?? "",
|
|
225
|
+
event.deployment?.provider ?? "",
|
|
226
|
+
event.deployment?.environment ?? "",
|
|
227
|
+
event.deployment?.id ?? ""
|
|
228
|
+
].join("|");
|
|
229
|
+
}
|
|
230
|
+
function getSentProjectKeys() {
|
|
231
|
+
const globalValue = globalThis;
|
|
232
|
+
globalValue.__farmingLabsDocsTelemetryProjectKeys__ ??= /* @__PURE__ */ new Map();
|
|
233
|
+
return globalValue.__farmingLabsDocsTelemetryProjectKeys__;
|
|
234
|
+
}
|
|
235
|
+
function pruneSentProjectKeys(sent, now) {
|
|
236
|
+
for (const [key, expiresAt] of sent) if (expiresAt <= now) sent.delete(key);
|
|
237
|
+
while (sent.size >= PROJECT_TELEMETRY_CACHE_MAX_KEYS) {
|
|
238
|
+
const oldestKey = sent.keys().next().value;
|
|
239
|
+
if (!oldestKey) return;
|
|
240
|
+
sent.delete(oldestKey);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
async function emitDocsTelemetryEvent(telemetry, event) {
|
|
244
|
+
const resolved = resolveDocsTelemetryConfig(telemetry);
|
|
245
|
+
const eventSiteOrigin = event.site?.origin;
|
|
246
|
+
const normalizedSiteOrigin = normalizeDocsTelemetryOrigin(eventSiteOrigin);
|
|
247
|
+
if (!resolved.enabled || !resolved.endpoint || typeof fetch !== "function" || eventSiteOrigin !== void 0 && (!normalizedSiteOrigin || isLocalDocsTelemetryOrigin(eventSiteOrigin))) return;
|
|
248
|
+
const eventToSend = normalizedSiteOrigin ? {
|
|
249
|
+
...event,
|
|
250
|
+
site: { origin: normalizedSiteOrigin }
|
|
251
|
+
} : event;
|
|
252
|
+
try {
|
|
253
|
+
const ingestKey = readRuntimeEnv("DOCS_TELEMETRY_INGEST_KEY");
|
|
254
|
+
const browserRequest = isBrowserRuntime() && !ingestKey;
|
|
255
|
+
const headers = { "content-type": browserRequest ? "text/plain;charset=UTF-8" : "application/json" };
|
|
256
|
+
if (ingestKey) headers["x-docs-telemetry-key"] = ingestKey;
|
|
257
|
+
await fetch(resolved.endpoint, {
|
|
258
|
+
method: "POST",
|
|
259
|
+
headers,
|
|
260
|
+
body: JSON.stringify({ event: eventToSend }),
|
|
261
|
+
keepalive: true,
|
|
262
|
+
...browserRequest ? {
|
|
263
|
+
credentials: "omit",
|
|
264
|
+
mode: "no-cors"
|
|
265
|
+
} : {}
|
|
266
|
+
});
|
|
267
|
+
} catch {}
|
|
268
|
+
}
|
|
269
|
+
function emitDocsTelemetryProjectEvent(config, context = {}) {
|
|
270
|
+
const event = createDocsTelemetryEvent(config, { type: "project_detected" }, context);
|
|
271
|
+
if (!event) return;
|
|
272
|
+
const key = projectEventKey(event);
|
|
273
|
+
const sent = getSentProjectKeys();
|
|
274
|
+
const now = Date.now();
|
|
275
|
+
const expiresAt = sent.get(key);
|
|
276
|
+
if (expiresAt && expiresAt > now) return;
|
|
277
|
+
if (typeof expiresAt === "number") sent.delete(key);
|
|
278
|
+
pruneSentProjectKeys(sent, now);
|
|
279
|
+
sent.set(key, now + PROJECT_TELEMETRY_CACHE_TTL_MS);
|
|
280
|
+
emitDocsTelemetryEvent(config.telemetry, event);
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Emit a privacy-preserving browser page view for the maintainer telemetry dashboard.
|
|
284
|
+
*
|
|
285
|
+
* Page views include only the public site origin, pathname, locale, framework, and package
|
|
286
|
+
* metadata. They never include a query string, referrer, visitor id, IP address, or user agent.
|
|
287
|
+
*/
|
|
288
|
+
function emitDocsTelemetryPageViewEvent(telemetry, context = {}) {
|
|
289
|
+
if (telemetry === false || telemetry && typeof telemetry === "object" && telemetry.enabled === false) return;
|
|
290
|
+
const runtimeSiteOrigin = context.siteOrigin ?? (typeof window !== "undefined" ? window.location?.origin : void 0);
|
|
291
|
+
if (isBlockedDocsTelemetryOrigin(runtimeSiteOrigin)) return;
|
|
292
|
+
const siteOrigin = (telemetry && typeof telemetry === "object" ? telemetry.siteOrigin : void 0) ?? runtimeSiteOrigin;
|
|
293
|
+
const event = createDocsTelemetryEvent({ telemetry }, {
|
|
294
|
+
type: "page_view",
|
|
295
|
+
features: {},
|
|
296
|
+
properties: {
|
|
297
|
+
trafficType: "human",
|
|
298
|
+
...context.path ? { path: context.path.slice(0, 2048) } : {},
|
|
299
|
+
...context.locale ? { locale: context.locale.slice(0, 80) } : {}
|
|
300
|
+
}
|
|
301
|
+
}, {
|
|
302
|
+
framework: context.framework,
|
|
303
|
+
siteOrigin
|
|
304
|
+
});
|
|
305
|
+
if (!event) return;
|
|
306
|
+
emitDocsTelemetryEvent(telemetry && typeof telemetry === "object" ? {
|
|
307
|
+
...telemetry,
|
|
308
|
+
enabled: true
|
|
309
|
+
} : true, event);
|
|
310
|
+
}
|
|
311
|
+
function emitDocsTelemetryAgentSurfaceEvent(config, context) {
|
|
312
|
+
const event = createDocsTelemetryEvent(config, {
|
|
313
|
+
type: context.surface === "mcp" ? "mcp_request" : "agent_surface_used",
|
|
314
|
+
properties: { surface: context.surface }
|
|
315
|
+
}, context);
|
|
316
|
+
if (!event) return;
|
|
317
|
+
emitDocsTelemetryEvent(config.telemetry, event);
|
|
318
|
+
}
|
|
319
|
+
function emitDocsTelemetryMcpToolEvent(config, context) {
|
|
320
|
+
const event = createDocsTelemetryEvent(config, {
|
|
321
|
+
type: "mcp_tool_used",
|
|
322
|
+
properties: {
|
|
323
|
+
tool: context.tool,
|
|
324
|
+
locale: context.locale,
|
|
325
|
+
resultCount: context.resultCount
|
|
326
|
+
}
|
|
327
|
+
}, context);
|
|
328
|
+
if (!event) return;
|
|
329
|
+
emitDocsTelemetryEvent(config.telemetry, event);
|
|
330
|
+
}
|
|
331
|
+
function inferDocsTelemetryAgentSurface(request, options) {
|
|
332
|
+
const url = new URL(request.url);
|
|
333
|
+
const method = request.method.toUpperCase();
|
|
334
|
+
const feedbackRequest = resolveDocsAgentFeedbackRequest(url, resolveDocsAgentFeedbackConfig(options.feedback));
|
|
335
|
+
if ((method === "GET" || method === "HEAD") && isDocsAgentDiscoveryRequest(url)) return "agent_spec";
|
|
336
|
+
if ((method === "GET" || method === "HEAD") && feedbackRequest?.kind === "schema") return "agent_feedback_schema";
|
|
337
|
+
if (method === "POST" && feedbackRequest?.kind === "submit") return "agent_feedback_submit";
|
|
338
|
+
if (method === "GET" || method === "HEAD") {
|
|
339
|
+
if (isDocsContentChangesRequest(url)) return "content_changes";
|
|
340
|
+
if (isDocsAgentsRequest(url) || resolveDocsAgentsFormat(url) === "agents") return "agents";
|
|
341
|
+
if (isDocsSkillRequest(url) || resolveDocsSkillFormat(url) === "skill") return "skill";
|
|
342
|
+
if (resolveDocsMarkdownRequest(options.entry, url, request)) return "markdown";
|
|
343
|
+
if (resolveDocsLlmsTxtRequest(url, options.llmsTxt, options.entry)) return "llms";
|
|
344
|
+
}
|
|
345
|
+
if (method === "POST") return "ask_ai";
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
//#endregion
|
|
349
|
+
//#region src/sidebar.ts
|
|
350
|
+
function resolvePageSidebarFolderIndexBehavior(sidebar) {
|
|
351
|
+
if (!sidebar || typeof sidebar !== "object") return void 0;
|
|
352
|
+
const value = sidebar.folderIndexBehavior;
|
|
353
|
+
return value === "link" || value === "toggle" || value === "hidden" ? value : void 0;
|
|
354
|
+
}
|
|
355
|
+
function normalizeSidebarFolderBehaviorPath(path) {
|
|
356
|
+
if (!path) return void 0;
|
|
357
|
+
let value = path.trim();
|
|
358
|
+
if (!value) return void 0;
|
|
359
|
+
if (/^[a-zA-Z][a-zA-Z\d+\-.]*:\/\//.test(value)) try {
|
|
360
|
+
value = new URL(value).pathname;
|
|
361
|
+
} catch {
|
|
362
|
+
return;
|
|
363
|
+
}
|
|
364
|
+
else value = value.split("#", 1)[0]?.split("?", 1)[0] ?? value;
|
|
365
|
+
if (!value.startsWith("/")) value = `/${value}`;
|
|
366
|
+
return value.replace(/\/$/, "") || "/";
|
|
367
|
+
}
|
|
368
|
+
function resolveSidebarFolderIndexBehavior(sidebar, defaultBehavior = "link") {
|
|
369
|
+
if (sidebar === void 0 || sidebar === true || sidebar === false) return defaultBehavior;
|
|
370
|
+
if (sidebar.folderIndexBehavior === "toggle") return "toggle";
|
|
371
|
+
if (sidebar.folderIndexBehavior === "hidden") return "hidden";
|
|
372
|
+
if (sidebar.folderIndexBehavior === "link") return "link";
|
|
373
|
+
return defaultBehavior;
|
|
374
|
+
}
|
|
375
|
+
function resolveSidebarFolderIndexBehaviorForPath(sidebar, folderPath, defaultBehavior = "link") {
|
|
376
|
+
const fallback = resolveSidebarFolderIndexBehavior(sidebar, defaultBehavior);
|
|
377
|
+
if (!sidebar || typeof sidebar !== "object") return fallback;
|
|
378
|
+
const normalizedPath = normalizeSidebarFolderBehaviorPath(folderPath);
|
|
379
|
+
if (!normalizedPath) return fallback;
|
|
380
|
+
for (const [rawPath, override] of Object.entries(sidebar.folderIndexBehaviorOverrides ?? {})) if (normalizeSidebarFolderBehaviorPath(rawPath) === normalizedPath) return override === "link" || override === "toggle" || override === "hidden" ? override : fallback;
|
|
381
|
+
return fallback;
|
|
382
|
+
}
|
|
383
|
+
function applySidebarFolderIndexBehavior(tree, behaviorOrOptions) {
|
|
384
|
+
const resolveBehavior = typeof behaviorOrOptions === "string" ? () => behaviorOrOptions : (folderPath) => resolveSidebarFolderIndexBehaviorForPath(behaviorOrOptions.sidebar, folderPath, behaviorOrOptions.defaultBehavior);
|
|
385
|
+
function mapNode(node) {
|
|
386
|
+
if (!node || typeof node !== "object") return node;
|
|
387
|
+
const candidate = node;
|
|
388
|
+
if (candidate.type !== "folder" || !Array.isArray(candidate.children)) return node;
|
|
389
|
+
const children = candidate.children.map(mapNode);
|
|
390
|
+
const index = candidate.index ? mapNode(candidate.index) : void 0;
|
|
391
|
+
const folderPath = (typeof candidate.url === "string" ? candidate.url : void 0) || (candidate.index && typeof candidate.index === "object" && "url" in candidate.index && typeof candidate.index.url === "string" ? candidate.index.url ?? void 0 : void 0);
|
|
392
|
+
const behavior = (candidate.folderIndexBehavior === "link" || candidate.folderIndexBehavior === "toggle" || candidate.folderIndexBehavior === "hidden" ? candidate.folderIndexBehavior : void 0) ?? resolveBehavior(folderPath);
|
|
393
|
+
if (behavior === "link") return {
|
|
394
|
+
...candidate,
|
|
395
|
+
folderIndexBehavior: void 0,
|
|
396
|
+
index,
|
|
397
|
+
children
|
|
398
|
+
};
|
|
399
|
+
if (behavior === "hidden") return {
|
|
400
|
+
...candidate,
|
|
401
|
+
folderIndexBehavior: void 0,
|
|
402
|
+
index: void 0,
|
|
403
|
+
url: void 0,
|
|
404
|
+
children
|
|
405
|
+
};
|
|
406
|
+
return {
|
|
407
|
+
...candidate,
|
|
408
|
+
folderIndexBehavior: void 0,
|
|
409
|
+
index: void 0,
|
|
410
|
+
url: void 0,
|
|
411
|
+
children: index ? [index, ...children] : children
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
return {
|
|
415
|
+
...tree,
|
|
416
|
+
children: tree.children.map(mapNode)
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
//#endregion
|
|
421
|
+
export { emitDocsTelemetryAgentSurfaceEvent as a, emitDocsTelemetryPageViewEvent as c, inferDocsTelemetryAgentSurface as d, isLocalDocsTelemetryOrigin as f, resolveSidebarFolderIndexBehaviorForPath as i, emitDocsTelemetryProjectEvent as l, resolveDocsTelemetryConfig as m, resolvePageSidebarFolderIndexBehavior as n, emitDocsTelemetryEvent as o, normalizeDocsTelemetryOrigin as p, resolveSidebarFolderIndexBehavior as r, emitDocsTelemetryMcpToolEvent as s, applySidebarFolderIndexBehavior as t, getDocsTelemetryFeatures as u };
|