@farming-labs/docs 0.2.71 → 0.2.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-bof3qzKZ.mjs → agent-ClRpctMG.mjs} +3 -2
- package/dist/{agent-evals-Cr9TAkmB.mjs → agent-evals-BFHGypqh.mjs} +116 -20
- package/dist/{agent-export-7Ws4KqDE.mjs → agent-export-B9bah0AV.mjs} +9 -8
- package/dist/{agent-FIyl4-Oa.mjs → agent-o9OTadrf.mjs} +607 -769
- package/dist/agent-skills-bundle.d.mts +1 -1
- package/dist/{agent-skills-server-DTwblsLu.d.mts → agent-skills-server-DCbAx5WU.d.mts} +2 -2
- package/dist/{agent-skills-server-B4u3qy-1.mjs → agent-skills-server-noFn1l_p.mjs} +1 -1
- package/dist/agent-skills-vite.d.mts +3 -3
- package/dist/agent-skills-vite.mjs +2 -2
- package/dist/{agents-Be2ntaFr.mjs → agents-CR-Uasbc.mjs} +7 -6
- package/dist/cli/index.mjs +14 -14
- package/dist/client/react.d.mts +1 -1
- package/dist/{cloud-ask-ai-BfnX18rI.d.mts → cloud-ask-ai-yR9vZmSG.d.mts} +1 -1
- package/dist/docs-cloud-server.d.mts +2 -2
- package/dist/{doctor-DoPAofVP.mjs → doctor-BeyN3Ljh.mjs} +12 -11
- package/dist/{golden-evaluations-CPGGnXOV.mjs → golden-evaluations-CloP0pAe.mjs} +23 -2
- package/dist/index.d.mts +93 -6
- package/dist/index.mjs +9 -8
- package/dist/markdown-rendering.d.mts +75 -0
- package/dist/markdown-rendering.mjs +618 -0
- package/dist/markdown-sections-7OoA7ylx.mjs +1492 -0
- package/dist/{mcp-BLynUzE7.mjs → mcp-BLLXvEXB.mjs} +7 -6
- package/dist/mcp.d.mts +7 -2
- package/dist/mcp.mjs +130 -25
- package/dist/{metadata-bw8k-9x-.mjs → metadata-N252j5_a.mjs} +1 -1
- package/dist/{reading-time-DtNegNiq.mjs → prompt-references-Cz35rlOa.mjs} +158 -4
- package/dist/{review-NFnYbMRI.mjs → review-DaJLdPLh.mjs} +7 -6
- package/dist/{robots-DOqBwQw8.mjs → robots-BcuxnZqZ.mjs} +2 -2
- package/dist/{robots-B3e-aWPy.mjs → robots-DI-9MZz1.mjs} +4 -3
- package/dist/{search-CozHzW7v.d.mts → search-D1n8Sf25.d.mts} +45 -9
- package/dist/{search-DOGUUZvs.mjs → search-DeOJiMAy.mjs} +7 -6
- package/dist/{search-x5O0-9X3.mjs → search-RfPcG1if.mjs} +742 -42
- package/dist/server.d.mts +13 -5
- package/dist/server.mjs +8 -7
- package/dist/{sitemap-BpMKdDUd.mjs → sitemap-BGGbX_KE.mjs} +7 -6
- package/dist/{sitemap-server-D_hayOp6.mjs → sitemap-server-VefDnzEB.mjs} +1 -1
- package/dist/{standards-discovery-C0CIC4QI.d.mts → standards-discovery-83lp1lew.d.mts} +5 -4
- package/dist/{standards-discovery-CYfiQE13.mjs → standards-discovery-BwL5ffGx.mjs} +4 -3
- package/dist/{types-BQC05SQm.d.mts → types-_HCPD4wc.d.mts} +49 -1
- package/package.json +9 -1
- package/dist/agent-scope-C_U--OZ7.mjs +0 -283
- /package/dist/{i18n-CCaFUnAN.mjs → i18n-hHVWcflJ.mjs} +0 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import "./agent-
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import "./
|
|
5
|
-
import "./
|
|
1
|
+
import "./agent-o9OTadrf.mjs";
|
|
2
|
+
import "./markdown-sections-7OoA7ylx.mjs";
|
|
3
|
+
import { L as resolveDocsPublishedAgentSkill } from "./standards-discovery-BwL5ffGx.mjs";
|
|
4
|
+
import "./search-RfPcG1if.mjs";
|
|
5
|
+
import "./sitemap-server-VefDnzEB.mjs";
|
|
6
|
+
import "./agent-evals-BFHGypqh.mjs";
|
|
6
7
|
import { createFilesystemDocsMcpSource, resolveDocsMcpConfig, runDocsMcpStdio } from "./mcp.mjs";
|
|
7
8
|
import "./code-blocks-DnNVNK2M.mjs";
|
|
8
|
-
import { t as resolveConfiguredAgentSkills } from "./agent-skills-server-
|
|
9
|
+
import { t as resolveConfiguredAgentSkills } from "./agent-skills-server-noFn1l_p.mjs";
|
|
9
10
|
import "./server.mjs";
|
|
10
11
|
import { _ as resolveDocsContentDir, d as readNavTitle, g as resolveDocsConfigPath, i as hasTopLevelProperty, l as readBooleanProperty, n as extractObjectLiteral, o as loadDocsConfigModuleResult, p as readStringProperty, t as extractNestedObjectLiteral } from "./config-Wcdj-D0a.mjs";
|
|
11
12
|
import { existsSync, readFileSync } from "node:fs";
|
package/dist/mcp.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Ft as DocsMcpAuthenticate, Kt as DocsObservabilityConfig, Nt as DocsMcpAllowedOrigins, Pt as DocsMcpAuthPrincipal, Qn as PageAgentFrontmatter, Rt as DocsMcpConfig, cn as DocsSearchConfig, kn as DocsTelemetryFramework, qn as OrderingItem, rt as DocsAnalyticsConfig, wn as DocsTelemetryConfig, yn as DocsSearchSourcePage } from "./types-_HCPD4wc.mjs";
|
|
2
|
+
import { L as DocsPublishedAgentSkill } from "./standards-discovery-83lp1lew.mjs";
|
|
3
3
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
4
4
|
|
|
5
5
|
//#region src/mcp.d.ts
|
|
@@ -124,6 +124,7 @@ interface DocsMcpContextSource {
|
|
|
124
124
|
locale?: string;
|
|
125
125
|
framework?: string;
|
|
126
126
|
version?: string;
|
|
127
|
+
package?: string[];
|
|
127
128
|
tags?: string[];
|
|
128
129
|
score?: number;
|
|
129
130
|
content: string;
|
|
@@ -138,6 +139,8 @@ interface DocsMcpContextResult {
|
|
|
138
139
|
filters: {
|
|
139
140
|
framework?: string;
|
|
140
141
|
version?: string;
|
|
142
|
+
package?: string[];
|
|
143
|
+
tags?: string[];
|
|
141
144
|
locale?: string;
|
|
142
145
|
};
|
|
143
146
|
budget: {
|
|
@@ -159,6 +162,8 @@ interface DocsMcpContextOptions {
|
|
|
159
162
|
query: string;
|
|
160
163
|
framework?: string;
|
|
161
164
|
version?: string;
|
|
165
|
+
package?: string | readonly string[];
|
|
166
|
+
tags?: string | readonly string[];
|
|
162
167
|
locale?: string;
|
|
163
168
|
tokenBudget: number;
|
|
164
169
|
entry?: string;
|
package/dist/mcp.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as emitDocsAnalyticsEvent, i as emitDocsAgentTraceEvent, n as createDocsAgentTraceContext, r as createDocsAgentTraceId } from "./analytics-Bx44lg6d.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
2
|
+
import { Kt as normalizeDocsRelated, an as isDocsMcpResourcePath, cn as resolveDocsMcpProtectedResourceMetadataLocation, jt as resolveDocsAudienceMdxContent, ln as resolveDocsMcpResourceLocation, nn as isDocsMcpOAuthScopeToken, on as normalizeDocsMcpAuthorizationServerUrls, qt as renderDocsRelatedMarkdownLines, rn as isDocsMcpProtectedResourceMetadataPath, sn as normalizeDocsMcpEndpointPath } from "./agent-o9OTadrf.mjs";
|
|
3
|
+
import { S as upsertPageAgentContractMarkdown, _ as hasStructuredPageAgentContract, o as findDocsMarkdownSection, s as parseDocsMarkdownSections, v as normalizePageAgentFrontmatter } from "./markdown-sections-7OoA7ylx.mjs";
|
|
4
|
+
import "./standards-discovery-BwL5ffGx.mjs";
|
|
5
|
+
import { A as stripGeneratedAgentProvenance, F as emitDocsTelemetryAgentSurfaceEvent, L as emitDocsTelemetryMcpToolEvent, M as resolvePageSidebarFolderIndexBehavior, R as emitDocsTelemetryProjectEvent, S as normalizeAgentScopeValues, b as normalizeAgentFramework, d as performDocsSearch, f as performDocsSearchWithMetadata, u as normalizeDocsSearchFilters, v as agentVersionConstraintMatches, x as normalizeAgentLocale, y as agentVersionConstraintsOverlap } from "./search-RfPcG1if.mjs";
|
|
6
6
|
import matter from "gray-matter";
|
|
7
7
|
import fs from "node:fs";
|
|
8
8
|
import path from "node:path";
|
|
@@ -801,7 +801,7 @@ const DOCS_CONFIG_SCHEMA_OPTIONS_TEMPLATE = [
|
|
|
801
801
|
path: "agent.evaluations.tasks[].filters",
|
|
802
802
|
name: "filters",
|
|
803
803
|
type: "DocsAgentGoldenTaskFilters",
|
|
804
|
-
description: "Framework, version, and locale retrieval scope.",
|
|
804
|
+
description: "Framework, version, package, tags, and locale retrieval scope.",
|
|
805
805
|
children: [
|
|
806
806
|
{
|
|
807
807
|
path: "agent.evaluations.tasks[].filters.framework",
|
|
@@ -815,6 +815,18 @@ const DOCS_CONFIG_SCHEMA_OPTIONS_TEMPLATE = [
|
|
|
815
815
|
type: "string",
|
|
816
816
|
description: "Exact version requested by the task."
|
|
817
817
|
},
|
|
818
|
+
{
|
|
819
|
+
path: "agent.evaluations.tasks[].filters.package",
|
|
820
|
+
name: "package",
|
|
821
|
+
type: "string | readonly string[]",
|
|
822
|
+
description: "Package name or names requested by the task."
|
|
823
|
+
},
|
|
824
|
+
{
|
|
825
|
+
path: "agent.evaluations.tasks[].filters.tags",
|
|
826
|
+
name: "tags",
|
|
827
|
+
type: "string | readonly string[]",
|
|
828
|
+
description: "Page tag or tags requested by the task."
|
|
829
|
+
},
|
|
818
830
|
{
|
|
819
831
|
path: "agent.evaluations.tasks[].filters.locale",
|
|
820
832
|
name: "locale",
|
|
@@ -876,7 +888,7 @@ const DOCS_CONFIG_SCHEMA_OPTIONS_TEMPLATE = [
|
|
|
876
888
|
path: "agent.evaluations.tasks[].expect.scope",
|
|
877
889
|
name: "scope",
|
|
878
890
|
type: "DocsAgentGoldenTaskFilters",
|
|
879
|
-
description: "Framework, version, and locale assertions checked against returned sources without pre-filtering retrieval.",
|
|
891
|
+
description: "Framework, version, package, tags, and locale assertions checked against returned sources without pre-filtering retrieval.",
|
|
880
892
|
children: [
|
|
881
893
|
{
|
|
882
894
|
path: "agent.evaluations.tasks[].expect.scope.framework",
|
|
@@ -890,6 +902,18 @@ const DOCS_CONFIG_SCHEMA_OPTIONS_TEMPLATE = [
|
|
|
890
902
|
type: "string",
|
|
891
903
|
description: "Version the returned sources must select."
|
|
892
904
|
},
|
|
905
|
+
{
|
|
906
|
+
path: "agent.evaluations.tasks[].expect.scope.package",
|
|
907
|
+
name: "package",
|
|
908
|
+
type: "string | readonly string[]",
|
|
909
|
+
description: "Package name or names the returned sources must select."
|
|
910
|
+
},
|
|
911
|
+
{
|
|
912
|
+
path: "agent.evaluations.tasks[].expect.scope.tags",
|
|
913
|
+
name: "tags",
|
|
914
|
+
type: "string | readonly string[]",
|
|
915
|
+
description: "Page tag or tags the returned sources must select."
|
|
916
|
+
},
|
|
893
917
|
{
|
|
894
918
|
path: "agent.evaluations.tasks[].expect.scope.locale",
|
|
895
919
|
name: "locale",
|
|
@@ -1663,11 +1687,16 @@ export default defineDocs({
|
|
|
1663
1687
|
});`
|
|
1664
1688
|
}
|
|
1665
1689
|
]);
|
|
1690
|
+
const searchFilterValueSchema = z.union([z.string().trim().min(1).max(128), z.array(z.string().trim().min(1).max(128)).min(1).max(16)]);
|
|
1666
1691
|
const searchDocsInputSchema = z.object({
|
|
1667
1692
|
query: z.string().trim().min(1),
|
|
1668
1693
|
limit: z.number().int().min(1).max(25).optional(),
|
|
1669
1694
|
locale: z.string().min(1).optional(),
|
|
1670
|
-
audience: z.enum(["human", "agent"]).optional()
|
|
1695
|
+
audience: z.enum(["human", "agent"]).optional(),
|
|
1696
|
+
framework: searchFilterValueSchema.optional(),
|
|
1697
|
+
version: searchFilterValueSchema.optional(),
|
|
1698
|
+
package: searchFilterValueSchema.optional(),
|
|
1699
|
+
tags: searchFilterValueSchema.optional()
|
|
1671
1700
|
});
|
|
1672
1701
|
const readPageInputSchema = z.object({
|
|
1673
1702
|
path: z.string().min(1),
|
|
@@ -1763,6 +1792,8 @@ const getContextInputSchema = z.object({
|
|
|
1763
1792
|
query: z.string().trim().min(1),
|
|
1764
1793
|
framework: z.string().trim().min(1).optional(),
|
|
1765
1794
|
version: z.string().trim().min(1).optional(),
|
|
1795
|
+
package: searchFilterValueSchema.optional(),
|
|
1796
|
+
tags: searchFilterValueSchema.optional(),
|
|
1766
1797
|
locale: z.string().trim().min(1).optional(),
|
|
1767
1798
|
tokenBudget: z.number().int().min(MIN_MCP_CONTEXT_TOKEN_BUDGET).max(MAX_MCP_CONTEXT_TOKEN_BUDGET).default(DEFAULT_MCP_CONTEXT_TOKEN_BUDGET)
|
|
1768
1799
|
});
|
|
@@ -1836,7 +1867,39 @@ const searchResultOutputSchema = z.object({
|
|
|
1836
1867
|
score: z.number().optional(),
|
|
1837
1868
|
section: z.string().optional()
|
|
1838
1869
|
});
|
|
1839
|
-
const
|
|
1870
|
+
const searchFiltersOutputSchema = z.object({
|
|
1871
|
+
framework: z.array(z.string()).optional(),
|
|
1872
|
+
version: z.array(z.string()).optional(),
|
|
1873
|
+
package: z.array(z.string()).optional(),
|
|
1874
|
+
tags: z.array(z.string()).optional()
|
|
1875
|
+
});
|
|
1876
|
+
const searchWarningOutputSchema = z.object({
|
|
1877
|
+
code: z.enum([
|
|
1878
|
+
"ambiguous_scope",
|
|
1879
|
+
"unknown_filter_value",
|
|
1880
|
+
"missing_scope_metadata",
|
|
1881
|
+
"conflicting_scope_metadata"
|
|
1882
|
+
]),
|
|
1883
|
+
field: z.enum([
|
|
1884
|
+
"framework",
|
|
1885
|
+
"version",
|
|
1886
|
+
"package",
|
|
1887
|
+
"tags"
|
|
1888
|
+
]),
|
|
1889
|
+
message: z.string(),
|
|
1890
|
+
values: z.array(z.string()).optional(),
|
|
1891
|
+
pageUrls: z.array(z.string()).optional(),
|
|
1892
|
+
count: z.number().int().nonnegative().optional()
|
|
1893
|
+
});
|
|
1894
|
+
const searchDocsOutputSchema = z.object({
|
|
1895
|
+
format: z.literal("docs-search.v1"),
|
|
1896
|
+
query: z.string(),
|
|
1897
|
+
audience: z.enum(["human", "agent"]),
|
|
1898
|
+
filters: searchFiltersOutputSchema,
|
|
1899
|
+
resultCount: z.number().int().nonnegative(),
|
|
1900
|
+
results: z.array(searchResultOutputSchema),
|
|
1901
|
+
warnings: z.array(searchWarningOutputSchema)
|
|
1902
|
+
});
|
|
1840
1903
|
const codeExampleOutputSchema = z.object({
|
|
1841
1904
|
id: z.string(),
|
|
1842
1905
|
page: z.object({
|
|
@@ -1920,6 +1983,7 @@ const contextSourceOutputSchema = z.object({
|
|
|
1920
1983
|
locale: z.string().optional(),
|
|
1921
1984
|
framework: z.string().optional(),
|
|
1922
1985
|
version: z.string().optional(),
|
|
1986
|
+
package: z.array(z.string()).optional(),
|
|
1923
1987
|
tags: z.array(z.string()).optional(),
|
|
1924
1988
|
score: z.number().optional(),
|
|
1925
1989
|
content: z.string(),
|
|
@@ -1932,6 +1996,8 @@ const contextOutputSchema = z.object({
|
|
|
1932
1996
|
filters: z.object({
|
|
1933
1997
|
framework: z.string().optional(),
|
|
1934
1998
|
version: z.string().optional(),
|
|
1999
|
+
package: z.array(z.string()).optional(),
|
|
2000
|
+
tags: z.array(z.string()).optional(),
|
|
1935
2001
|
locale: z.string().optional()
|
|
1936
2002
|
}),
|
|
1937
2003
|
budget: z.object({
|
|
@@ -2737,14 +2803,20 @@ async function createDocsMcpServer(options) {
|
|
|
2737
2803
|
});
|
|
2738
2804
|
if (resolved.tools.searchDocs) server.registerTool("search_docs", {
|
|
2739
2805
|
title: "Search documentation",
|
|
2740
|
-
description: "Search the docs by keyword
|
|
2806
|
+
description: "Search the docs by keyword with optional framework, version, package, and tag filters. Returns structured ambiguity and metadata warnings.",
|
|
2741
2807
|
inputSchema: searchDocsInputSchema,
|
|
2742
2808
|
outputSchema: searchDocsOutputSchema,
|
|
2743
2809
|
annotations: { readOnlyHint: true }
|
|
2744
|
-
}, async ({ query, limit, locale, audience }) => {
|
|
2810
|
+
}, async ({ query, limit, locale, audience, framework, version, package: packageName, tags }) => {
|
|
2745
2811
|
const startedAt = nowMs();
|
|
2746
2812
|
const resolvedLimit = limit ?? 10;
|
|
2747
2813
|
const resolvedAudience = audience ?? "agent";
|
|
2814
|
+
const filters = {
|
|
2815
|
+
framework,
|
|
2816
|
+
version,
|
|
2817
|
+
package: packageName,
|
|
2818
|
+
tags
|
|
2819
|
+
};
|
|
2748
2820
|
const trace = createDocsAgentTraceContext("mcp.tool.search_docs");
|
|
2749
2821
|
const callSpanId = createDocsAgentTraceId("span");
|
|
2750
2822
|
await emitDocsAgentTraceEvent(options.observability, {
|
|
@@ -2760,16 +2832,18 @@ async function createDocsMcpServer(options) {
|
|
|
2760
2832
|
queryLength: query.length,
|
|
2761
2833
|
limit: resolvedLimit,
|
|
2762
2834
|
locale,
|
|
2763
|
-
audience: resolvedAudience
|
|
2835
|
+
audience: resolvedAudience,
|
|
2836
|
+
filterFields: Object.entries(filters).filter(([, value]) => value !== void 0).map(([field]) => field)
|
|
2764
2837
|
},
|
|
2765
2838
|
metadata: { tool: "search_docs" }
|
|
2766
2839
|
});
|
|
2767
2840
|
try {
|
|
2768
|
-
const
|
|
2841
|
+
const searchResponse = await performDocsSearchWithMetadata({
|
|
2769
2842
|
pages: toSearchSourcePages(dedupePages(await getSourcePages(locale))),
|
|
2770
2843
|
query,
|
|
2771
2844
|
search: toolSearchConfig ?? true,
|
|
2772
2845
|
audience: resolvedAudience,
|
|
2846
|
+
filters,
|
|
2773
2847
|
locale,
|
|
2774
2848
|
siteTitle: options.source.siteTitle,
|
|
2775
2849
|
limit: resolvedLimit
|
|
@@ -2785,13 +2859,14 @@ async function createDocsMcpServer(options) {
|
|
|
2785
2859
|
queryLength: query.length,
|
|
2786
2860
|
limit: resolvedLimit,
|
|
2787
2861
|
audience: resolvedAudience,
|
|
2788
|
-
resultCount:
|
|
2862
|
+
resultCount: searchResponse.resultCount,
|
|
2863
|
+
warningCount: searchResponse.warnings.length,
|
|
2789
2864
|
durationMs: elapsed
|
|
2790
2865
|
}
|
|
2791
2866
|
});
|
|
2792
2867
|
trackMcpTool("search_docs", {
|
|
2793
2868
|
locale,
|
|
2794
|
-
resultCount:
|
|
2869
|
+
resultCount: searchResponse.resultCount
|
|
2795
2870
|
});
|
|
2796
2871
|
await emitDocsAgentTraceEvent(options.observability, {
|
|
2797
2872
|
type: "tool.result",
|
|
@@ -2804,10 +2879,13 @@ async function createDocsMcpServer(options) {
|
|
|
2804
2879
|
durationMs: elapsed,
|
|
2805
2880
|
status: "success",
|
|
2806
2881
|
locale,
|
|
2807
|
-
outputPreview: {
|
|
2882
|
+
outputPreview: {
|
|
2883
|
+
resultCount: searchResponse.resultCount,
|
|
2884
|
+
warningCount: searchResponse.warnings.length
|
|
2885
|
+
},
|
|
2808
2886
|
metadata: { tool: "search_docs" }
|
|
2809
2887
|
});
|
|
2810
|
-
return createStructuredTextResult(
|
|
2888
|
+
return createStructuredTextResult(searchResponse);
|
|
2811
2889
|
} catch (error) {
|
|
2812
2890
|
const elapsed = durationMs(startedAt);
|
|
2813
2891
|
await emitDocsAgentTraceEvent(options.observability, {
|
|
@@ -2932,7 +3010,7 @@ async function createDocsMcpServer(options) {
|
|
|
2932
3010
|
inputSchema: getContextInputSchema,
|
|
2933
3011
|
outputSchema: contextOutputSchema,
|
|
2934
3012
|
annotations: { readOnlyHint: true }
|
|
2935
|
-
}, async ({ query, framework, version, locale, tokenBudget }) => {
|
|
3013
|
+
}, async ({ query, framework, version, package: packageName, tags, locale, tokenBudget }) => {
|
|
2936
3014
|
const startedAt = nowMs();
|
|
2937
3015
|
const trace = createDocsAgentTraceContext("mcp.tool.get_context");
|
|
2938
3016
|
const callSpanId = createDocsAgentTraceId("span");
|
|
@@ -2949,6 +3027,8 @@ async function createDocsMcpServer(options) {
|
|
|
2949
3027
|
queryLength: query.length,
|
|
2950
3028
|
framework,
|
|
2951
3029
|
version,
|
|
3030
|
+
package: packageName,
|
|
3031
|
+
tags,
|
|
2952
3032
|
locale,
|
|
2953
3033
|
tokenBudget
|
|
2954
3034
|
},
|
|
@@ -2960,6 +3040,8 @@ async function createDocsMcpServer(options) {
|
|
|
2960
3040
|
query,
|
|
2961
3041
|
framework,
|
|
2962
3042
|
version,
|
|
3043
|
+
package: packageName,
|
|
3044
|
+
tags,
|
|
2963
3045
|
locale,
|
|
2964
3046
|
tokenBudget,
|
|
2965
3047
|
entry: options.source.entry,
|
|
@@ -2976,6 +3058,8 @@ async function createDocsMcpServer(options) {
|
|
|
2976
3058
|
queryLength: query.length,
|
|
2977
3059
|
framework,
|
|
2978
3060
|
version,
|
|
3061
|
+
package: packageName,
|
|
3062
|
+
tags,
|
|
2979
3063
|
tokenBudget,
|
|
2980
3064
|
usedUtf8Bytes: result.budget.usedUtf8Bytes,
|
|
2981
3065
|
conservativeTokenUpperBound: result.budget.conservativeTokenUpperBound,
|
|
@@ -3115,11 +3199,10 @@ async function createDocsMcpServer(options) {
|
|
|
3115
3199
|
};
|
|
3116
3200
|
}
|
|
3117
3201
|
const fullDocument = renderPageDocument(page);
|
|
3118
|
-
const sectionDocument = getDocsMcpSourceMarkdown(page);
|
|
3119
|
-
const selectedSection = section ? findDocsMarkdownSection(sectionDocument, section)
|
|
3202
|
+
const sectionDocument = upsertPageAgentContractMarkdown(getDocsMcpSourceMarkdown(page), page.agent);
|
|
3203
|
+
const selectedSection = section ? findDocsMarkdownSection(sectionDocument, section) : void 0;
|
|
3120
3204
|
if (section && !selectedSection) {
|
|
3121
|
-
const
|
|
3122
|
-
const availableSections = (sourceSections.length > 0 ? sourceSections : parseDocsMarkdownSections(fullDocument)).map((item) => ({
|
|
3205
|
+
const availableSections = parseDocsMarkdownSections(sectionDocument).map((item) => ({
|
|
3123
3206
|
title: item.title,
|
|
3124
3207
|
anchor: item.anchor
|
|
3125
3208
|
}));
|
|
@@ -4504,23 +4587,34 @@ function resolveDocsMcpScopeField(pageValue, contractValue, filter, overlaps, ma
|
|
|
4504
4587
|
};
|
|
4505
4588
|
}
|
|
4506
4589
|
function resolveDocsMcpEffectiveScope(page, filters) {
|
|
4590
|
+
const normalizedFilters = normalizeDocsSearchFilters({
|
|
4591
|
+
package: filters.package,
|
|
4592
|
+
tags: filters.tags
|
|
4593
|
+
});
|
|
4507
4594
|
const framework = resolveDocsMcpScopeField(page.framework, page.agent?.appliesTo?.framework, filters.framework, (left, right) => normalizeAgentFramework(left) === normalizeAgentFramework(right), (filter, candidate) => normalizeAgentFramework(filter) === normalizeAgentFramework(candidate));
|
|
4508
4595
|
const version = resolveDocsMcpScopeField(page.version, page.agent?.appliesTo?.version, filters.version, agentVersionConstraintsOverlap, agentVersionConstraintMatches);
|
|
4509
4596
|
const locale = page.locale?.trim() || void 0;
|
|
4510
4597
|
const localeMatches = !filters.locale || !locale || normalizeAgentLocale(locale) === normalizeAgentLocale(filters.locale);
|
|
4598
|
+
const packageValues = normalizeDocsSearchFilters({ package: page.agent?.appliesTo?.package }).package ?? [];
|
|
4599
|
+
const tagValues = normalizeDocsSearchFilters({ tags: page.tags }).tags ?? [];
|
|
4600
|
+
const packageMatches = !normalizedFilters.package || packageValues.length > 0 && normalizedFilters.package.some((value) => packageValues.includes(value));
|
|
4601
|
+
const tagsMatch = !normalizedFilters.tags || tagValues.length > 0 && normalizedFilters.tags.some((value) => tagValues.includes(value));
|
|
4511
4602
|
return {
|
|
4512
4603
|
framework: framework.value,
|
|
4513
4604
|
version: version.value,
|
|
4605
|
+
package: packageValues,
|
|
4606
|
+
tags: tagValues,
|
|
4514
4607
|
locale,
|
|
4515
4608
|
conflict: framework.conflict || version.conflict,
|
|
4516
|
-
matches: framework.matches && version.matches && localeMatches
|
|
4609
|
+
matches: framework.matches && version.matches && packageMatches && tagsMatch && localeMatches
|
|
4517
4610
|
};
|
|
4518
4611
|
}
|
|
4519
4612
|
function getDocsMcpResultPageUrl(value) {
|
|
4520
4613
|
return value.split("#", 1)[0] ?? value;
|
|
4521
4614
|
}
|
|
4522
4615
|
function getDocsMcpResultAnchor(value) {
|
|
4523
|
-
const
|
|
4616
|
+
const hashIndex = value.indexOf("#");
|
|
4617
|
+
const anchor = hashIndex >= 0 ? value.slice(hashIndex + 1) : "";
|
|
4524
4618
|
if (!anchor) return void 0;
|
|
4525
4619
|
try {
|
|
4526
4620
|
return decodeURIComponent(anchor);
|
|
@@ -4533,6 +4627,8 @@ async function buildDocsMcpContext(options) {
|
|
|
4533
4627
|
const scope = resolveDocsMcpEffectiveScope(page, {
|
|
4534
4628
|
framework: options.framework,
|
|
4535
4629
|
version: options.version,
|
|
4630
|
+
package: options.package,
|
|
4631
|
+
tags: options.tags,
|
|
4536
4632
|
locale: options.locale
|
|
4537
4633
|
});
|
|
4538
4634
|
return scope.matches && !scope.conflict ? [{
|
|
@@ -4600,11 +4696,13 @@ async function buildDocsMcpContext(options) {
|
|
|
4600
4696
|
let usedUtf8Bytes = 0;
|
|
4601
4697
|
for (const { result, page, scope, selectedSection, rawContent } of resolvedCandidates) {
|
|
4602
4698
|
const anchor = selectedSection?.anchor;
|
|
4603
|
-
const sourceUrl = anchor ? `${page.url}#${anchor}` : page.url;
|
|
4699
|
+
const sourceUrl = anchor ? `${page.url.split("#", 1)[0]}#${encodeURIComponent(anchor)}` : page.url;
|
|
4604
4700
|
const headerLines = [`## ${page.title}`, `Source: ${sourceUrl}`];
|
|
4605
4701
|
if (selectedSection?.title) headerLines.push(`Section: ${selectedSection.title}`);
|
|
4606
4702
|
if (scope.framework) headerLines.push(`Framework: ${scope.framework}`);
|
|
4607
4703
|
if (scope.version) headerLines.push(`Version: ${scope.version}`);
|
|
4704
|
+
if (scope.package.length > 0) headerLines.push(`Package: ${scope.package.join(", ")}`);
|
|
4705
|
+
if (scope.tags.length > 0) headerLines.push(`Tags: ${scope.tags.join(", ")}`);
|
|
4608
4706
|
if (scope.locale) headerLines.push(`Locale: ${scope.locale}`);
|
|
4609
4707
|
const header = headerLines.join("\n");
|
|
4610
4708
|
const separatorBytes = blocks.length === 0 ? 0 : separatorUtf8Bytes;
|
|
@@ -4629,7 +4727,8 @@ async function buildDocsMcpContext(options) {
|
|
|
4629
4727
|
locale: scope.locale,
|
|
4630
4728
|
framework: scope.framework,
|
|
4631
4729
|
version: scope.version,
|
|
4632
|
-
|
|
4730
|
+
package: scope.package.length > 0 ? [...scope.package] : void 0,
|
|
4731
|
+
tags: scope.tags.length > 0 ? [...scope.tags] : void 0,
|
|
4633
4732
|
score: result.score,
|
|
4634
4733
|
content: limited.text,
|
|
4635
4734
|
chars: limited.text.length,
|
|
@@ -4642,11 +4741,17 @@ async function buildDocsMcpContext(options) {
|
|
|
4642
4741
|
usedUtf8Bytes = docsMcpUtf8Bytes(context);
|
|
4643
4742
|
const remainingUtf8Bytes = Math.max(0, maxUtf8Bytes - usedUtf8Bytes);
|
|
4644
4743
|
const truncated = sources.some((source) => source.truncated) || sources.length < resolvedCandidates.length;
|
|
4744
|
+
const normalizedFilters = normalizeDocsSearchFilters({
|
|
4745
|
+
package: options.package,
|
|
4746
|
+
tags: options.tags
|
|
4747
|
+
});
|
|
4645
4748
|
return {
|
|
4646
4749
|
query: options.query,
|
|
4647
4750
|
filters: {
|
|
4648
4751
|
framework: options.framework,
|
|
4649
4752
|
version: options.version,
|
|
4753
|
+
package: normalizedFilters.package,
|
|
4754
|
+
tags: normalizedFilters.tags,
|
|
4650
4755
|
locale: options.locale
|
|
4651
4756
|
},
|
|
4652
4757
|
budget: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as hasStructuredPageAgentContract, v as normalizePageAgentFrontmatter } from "./markdown-sections-7OoA7ylx.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/metadata.ts
|
|
4
4
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { It as DEFAULT_SITEMAP_XML_ROUTE, Pt as DEFAULT_SITEMAP_MD_ROUTE, Zt as DEFAULT_MCP_WELL_KNOWN_ROUTE, c as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, f as DEFAULT_DOCS_CONFIG_ROUTE, h as DEFAULT_LLMS_FULL_TXT_ROUTE, i as DEFAULT_AGENT_FEEDBACK_ROUTE, m as DEFAULT_DOCS_DIAGNOSTICS_ROUTE, t as DEFAULT_AGENTS_MD_ROUTE, v as DEFAULT_LLMS_TXT_ROUTE, x as DEFAULT_SKILL_MD_ROUTE } from "./agent-o9OTadrf.mjs";
|
|
2
2
|
import { isDocsAgentSkillName, validateDocsAgentSkillFrontmatter } from "./agent-skills-spec.mjs";
|
|
3
|
-
import { C as DOCS_AGENT_MANIFEST_SCHEMA_MEDIA_TYPE, S as DOCS_AGENT_MANIFEST_FORMAT, f as DEFAULT_AGENT_SKILLS_ROUTE_PREFIX, n as API_CATALOG_MEDIA_TYPE, r as API_CATALOG_PROFILE_URI, t as AGENT_SKILLS_DISCOVERY_SCHEMA_URI, u as DEFAULT_AGENT_SKILLS_INDEX_ROUTE, v as DEFAULT_API_CATALOG_ROUTE, w as DOCS_AGENT_MANIFEST_SCHEMA_URI } from "./standards-discovery-
|
|
4
|
-
import { n as DEFAULT_ROBOTS_TXT_ROUTE } from "./robots-
|
|
3
|
+
import { C as DOCS_AGENT_MANIFEST_SCHEMA_MEDIA_TYPE, S as DOCS_AGENT_MANIFEST_FORMAT, T as DOCS_AGENT_MANIFEST_VERSION, f as DEFAULT_AGENT_SKILLS_ROUTE_PREFIX, n as API_CATALOG_MEDIA_TYPE, r as API_CATALOG_PROFILE_URI, t as AGENT_SKILLS_DISCOVERY_SCHEMA_URI, u as DEFAULT_AGENT_SKILLS_INDEX_ROUTE, v as DEFAULT_API_CATALOG_ROUTE, w as DOCS_AGENT_MANIFEST_SCHEMA_URI } from "./standards-discovery-BwL5ffGx.mjs";
|
|
4
|
+
import { n as DEFAULT_ROBOTS_TXT_ROUTE } from "./robots-BcuxnZqZ.mjs";
|
|
5
5
|
import matter from "gray-matter";
|
|
6
6
|
|
|
7
7
|
//#region src/define-docs.ts
|
|
@@ -683,6 +683,7 @@ function validateAgentManifest(content) {
|
|
|
683
683
|
const issues = [];
|
|
684
684
|
if (root?.$schema !== DOCS_AGENT_MANIFEST_SCHEMA_URI) issues.push(`Agent manifest did not declare top-level $schema ${DOCS_AGENT_MANIFEST_SCHEMA_URI}`);
|
|
685
685
|
if (root?.format !== DOCS_AGENT_MANIFEST_FORMAT) issues.push(`Agent manifest did not declare top-level format ${DOCS_AGENT_MANIFEST_FORMAT}`);
|
|
686
|
+
if (root?.version !== DOCS_AGENT_MANIFEST_VERSION) issues.push(`Agent manifest did not declare top-level version ${DOCS_AGENT_MANIFEST_VERSION}`);
|
|
686
687
|
return issues;
|
|
687
688
|
}
|
|
688
689
|
function httpLinkMatchesContractExpectation(header, expectation, responseUrl) {
|
|
@@ -909,4 +910,157 @@ function resolveReadingTimeFromSource(source, wordsPerMinute, options) {
|
|
|
909
910
|
}
|
|
910
911
|
|
|
911
912
|
//#endregion
|
|
912
|
-
|
|
913
|
+
//#region src/heading-toc.ts
|
|
914
|
+
/**
|
|
915
|
+
* Encode heading fragments emitted by a renderer's nested table of contents.
|
|
916
|
+
*
|
|
917
|
+
* Fumadocs stores fragment URLs as raw DOM ids. Encoding the fragment after its
|
|
918
|
+
* heading visitor runs keeps links valid without changing path prefixes.
|
|
919
|
+
*/
|
|
920
|
+
function encodeDocsHeadingTocUrls(value) {
|
|
921
|
+
if (Array.isArray(value)) {
|
|
922
|
+
for (const item of value) encodeDocsHeadingTocUrls(item);
|
|
923
|
+
return;
|
|
924
|
+
}
|
|
925
|
+
if (!value || typeof value !== "object") return;
|
|
926
|
+
const item = value;
|
|
927
|
+
if (typeof item.url === "string") {
|
|
928
|
+
const hashIndex = item.url.indexOf("#");
|
|
929
|
+
if (hashIndex >= 0) item.url = `${item.url.slice(0, hashIndex)}#${encodeURIComponent(item.url.slice(hashIndex + 1))}`;
|
|
930
|
+
}
|
|
931
|
+
encodeDocsHeadingTocUrls(item.children);
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
//#endregion
|
|
935
|
+
//#region src/prompt-references.ts
|
|
936
|
+
function isDocsMarkdownPromptNode(node) {
|
|
937
|
+
return (node.type === "mdxJsxFlowElement" || node.type === "mdxJsxTextElement") && node.name === "Prompt";
|
|
938
|
+
}
|
|
939
|
+
function normalizeDocsMarkdownReferenceIdentifier(value) {
|
|
940
|
+
return typeof value === "string" ? value.trim().replace(/\s+/gu, " ").toLowerCase() : "";
|
|
941
|
+
}
|
|
942
|
+
function readDocsMarkdownPromptReferenceSource(value) {
|
|
943
|
+
const source = typeof value === "string" ? value : value instanceof Uint8Array ? new TextDecoder().decode(value) : void 0;
|
|
944
|
+
if (source === void 0) return void 0;
|
|
945
|
+
return source.startsWith("") ? source.slice(1) : source;
|
|
946
|
+
}
|
|
947
|
+
function sliceDocsMarkdownPromptReferenceSource(node, source) {
|
|
948
|
+
if (source === void 0) return void 0;
|
|
949
|
+
const start = node.position?.start?.offset;
|
|
950
|
+
const end = node.position?.end?.offset;
|
|
951
|
+
if (typeof start !== "number" || typeof end !== "number" || !Number.isInteger(start) || !Number.isInteger(end) || start < 0 || end < start || end > source.length) return;
|
|
952
|
+
return source.slice(start, end);
|
|
953
|
+
}
|
|
954
|
+
function sliceDocsMarkdownPromptChildrenSource(node, source) {
|
|
955
|
+
const nodeSource = sliceDocsMarkdownPromptReferenceSource(node, source);
|
|
956
|
+
if (nodeSource === void 0) return void 0;
|
|
957
|
+
const closingStart = nodeSource.lastIndexOf("</Prompt");
|
|
958
|
+
if (closingStart < 0) return void 0;
|
|
959
|
+
const children = node.children ?? [];
|
|
960
|
+
const isolatedChild = children.length === 1 ? children[0] : void 0;
|
|
961
|
+
if (isolatedChild?.type === "text" && typeof isolatedChild.value === "string" && isolatedChild.position === void 0) return isolatedChild.value;
|
|
962
|
+
const nodeStart = node.position?.start?.offset;
|
|
963
|
+
if (typeof nodeStart !== "number") return void 0;
|
|
964
|
+
let firstChildStart;
|
|
965
|
+
for (const child of children) {
|
|
966
|
+
const childStart = child.position?.start?.offset;
|
|
967
|
+
if (typeof childStart === "number" && Number.isInteger(childStart) && childStart >= nodeStart && (firstChildStart === void 0 || childStart - nodeStart < firstChildStart)) firstChildStart = childStart - nodeStart;
|
|
968
|
+
}
|
|
969
|
+
if (children.length > 0 && firstChildStart === void 0) return void 0;
|
|
970
|
+
const openingEnd = nodeSource.lastIndexOf(">", (firstChildStart ?? closingStart) - 1);
|
|
971
|
+
if (openingEnd < 0 || openingEnd >= closingStart) return void 0;
|
|
972
|
+
return nodeSource.slice(openingEnd + 1, closingStart);
|
|
973
|
+
}
|
|
974
|
+
function flattenDocsMarkdownPromptReferenceNode(node) {
|
|
975
|
+
if (typeof node.value === "string") return node.value;
|
|
976
|
+
return (node.children ?? []).map((child) => flattenDocsMarkdownPromptReferenceNode(child)).join("");
|
|
977
|
+
}
|
|
978
|
+
function formatDocsMarkdownPromptReference(node) {
|
|
979
|
+
const image = node.type === "imageReference";
|
|
980
|
+
const visibleLabel = image ? typeof node.alt === "string" ? node.alt : "" : flattenDocsMarkdownPromptReferenceNode(node);
|
|
981
|
+
const referenceLabel = typeof node.label === "string" ? node.label : typeof node.identifier === "string" ? node.identifier : visibleLabel;
|
|
982
|
+
const prefix = image ? "!" : "";
|
|
983
|
+
if (node.referenceType === "collapsed") return `${prefix}[${visibleLabel}][]`;
|
|
984
|
+
if (node.referenceType === "shortcut") return `${prefix}[${visibleLabel}]`;
|
|
985
|
+
return `${prefix}[${visibleLabel}][${referenceLabel}]`;
|
|
986
|
+
}
|
|
987
|
+
function formatDocsMarkdownPromptDefinition(node) {
|
|
988
|
+
const label = typeof node.label === "string" ? node.label : typeof node.identifier === "string" ? node.identifier : "";
|
|
989
|
+
const rawUrl = typeof node.url === "string" ? node.url : "";
|
|
990
|
+
return `[${label}]: ${/[<>\s]/u.test(rawUrl) ? `<${rawUrl.replace(/>/gu, "\\>")}>` : rawUrl}${typeof node.title === "string" ? ` "${node.title.replace(/"/gu, "\\\"")}"` : ""}`;
|
|
991
|
+
}
|
|
992
|
+
function createDocsMarkdownPromptReferenceText(node, source) {
|
|
993
|
+
return {
|
|
994
|
+
type: "text",
|
|
995
|
+
value: sliceDocsMarkdownPromptReferenceSource(node, source) ?? formatDocsMarkdownPromptReference(node),
|
|
996
|
+
position: node.position
|
|
997
|
+
};
|
|
998
|
+
}
|
|
999
|
+
function createDocsMarkdownPromptDefinitionParagraph(node, source) {
|
|
1000
|
+
return {
|
|
1001
|
+
type: "paragraph",
|
|
1002
|
+
children: [{
|
|
1003
|
+
type: "text",
|
|
1004
|
+
value: sliceDocsMarkdownPromptReferenceSource(node, source) ?? formatDocsMarkdownPromptDefinition(node),
|
|
1005
|
+
position: node.position
|
|
1006
|
+
}],
|
|
1007
|
+
position: node.position
|
|
1008
|
+
};
|
|
1009
|
+
}
|
|
1010
|
+
/**
|
|
1011
|
+
* Keep `<Prompt>` children literal before Markdown reference definitions are
|
|
1012
|
+
* resolved by the MDX compiler.
|
|
1013
|
+
*
|
|
1014
|
+
* Definitions inside Prompt are copyable source, not page-level definitions.
|
|
1015
|
+
* References inside Prompt always remain source text, while references outside
|
|
1016
|
+
* Prompt only remain live when they have a definition outside Prompt.
|
|
1017
|
+
*/
|
|
1018
|
+
function isolateDocsMarkdownPromptReferences(root, value) {
|
|
1019
|
+
if (!root || typeof root !== "object") return;
|
|
1020
|
+
const source = readDocsMarkdownPromptReferenceSource(value);
|
|
1021
|
+
const promptDefinitions = /* @__PURE__ */ new Set();
|
|
1022
|
+
const pageDefinitions = /* @__PURE__ */ new Set();
|
|
1023
|
+
let hasPrompt = false;
|
|
1024
|
+
const collectDefinitions = (node, insidePrompt) => {
|
|
1025
|
+
const prompt = isDocsMarkdownPromptNode(node);
|
|
1026
|
+
const literal = insidePrompt || prompt;
|
|
1027
|
+
if (prompt) hasPrompt = true;
|
|
1028
|
+
if (node.type === "definition") {
|
|
1029
|
+
const identifier = normalizeDocsMarkdownReferenceIdentifier(node.identifier);
|
|
1030
|
+
if (identifier) (literal ? promptDefinitions : pageDefinitions).add(identifier);
|
|
1031
|
+
}
|
|
1032
|
+
for (const child of node.children ?? []) collectDefinitions(child, literal);
|
|
1033
|
+
};
|
|
1034
|
+
collectDefinitions(root, false);
|
|
1035
|
+
if (!hasPrompt) return;
|
|
1036
|
+
const isolateReferences = (node, insidePrompt) => {
|
|
1037
|
+
const prompt = isDocsMarkdownPromptNode(node);
|
|
1038
|
+
if (prompt) {
|
|
1039
|
+
const promptSource = sliceDocsMarkdownPromptChildrenSource(node, source);
|
|
1040
|
+
if (promptSource !== void 0) {
|
|
1041
|
+
node.children = [{
|
|
1042
|
+
type: "text",
|
|
1043
|
+
value: promptSource
|
|
1044
|
+
}];
|
|
1045
|
+
return;
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
const literal = insidePrompt || prompt;
|
|
1049
|
+
const children = node.children;
|
|
1050
|
+
if (!children) return;
|
|
1051
|
+
node.children = children.map((child) => {
|
|
1052
|
+
const childInsidePrompt = literal || isDocsMarkdownPromptNode(child);
|
|
1053
|
+
if (childInsidePrompt && child.type === "definition") return createDocsMarkdownPromptDefinitionParagraph(child, source);
|
|
1054
|
+
if (child.type === "linkReference" || child.type === "imageReference") {
|
|
1055
|
+
const identifier = normalizeDocsMarkdownReferenceIdentifier(child.identifier);
|
|
1056
|
+
if (childInsidePrompt || promptDefinitions.has(identifier) && !pageDefinitions.has(identifier)) return createDocsMarkdownPromptReferenceText(child, source);
|
|
1057
|
+
}
|
|
1058
|
+
isolateReferences(child, childInsidePrompt);
|
|
1059
|
+
return child;
|
|
1060
|
+
});
|
|
1061
|
+
};
|
|
1062
|
+
isolateReferences(root, false);
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
//#endregion
|
|
1066
|
+
export { resolveChangelogConfig as _, resolveReadingTimeFromContent as a, DOCS_AGENT_CONTRACT_VERSION as c, httpLinkHeaderHasTargetRelation as d, AGENT_SKILL_ARCHIVE_MAX_UNCOMPRESSED_BYTES as f, deepMerge as g, extendTheme as h, resolvePageReadingTime as i, createDocsAgentContractCases as l, createTheme as m, encodeDocsHeadingTocUrls as n, resolveReadingTimeFromSource as o, readAgentSkillDocumentFromTar as p, estimateReadingTimeMinutes as r, resolveReadingTimeOptions as s, isolateDocsMarkdownPromptReferences as t, runDocsAgentConformance as u, defineDocs as v };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { A as buildDocsAgentDiscoverySpec,
|
|
2
|
-
import {
|
|
3
|
-
import { d as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { $t as getDocsMcpProtectedResourceMetadataRoutes, A as buildDocsAgentDiscoverySpec, Dt as findDocsAudienceMdxIssues, M as buildDocsConfigMap, T as DOCS_CONFIG_MAP_TOP_LEVEL_KEYS } from "./agent-o9OTadrf.mjs";
|
|
2
|
+
import { _ as hasStructuredPageAgentContract, f as PAGE_AGENT_CONTRACT_FIELDS, g as getPageAgentFrontmatterIssues, v as normalizePageAgentFrontmatter } from "./markdown-sections-7OoA7ylx.mjs";
|
|
3
|
+
import { I as resolveDocsDiscoveryApiRoute, _ as DEFAULT_API_CATALOG_FORMAT, d as DEFAULT_AGENT_SKILLS_ROUTE_PATTERN, h as DEFAULT_AGENT_SKILL_FORMAT, l as DEFAULT_AGENT_SKILLS_INDEX_FORMAT, u as DEFAULT_AGENT_SKILLS_INDEX_ROUTE, v as DEFAULT_API_CATALOG_ROUTE } from "./standards-discovery-BwL5ffGx.mjs";
|
|
4
|
+
import { p as resolveAskAISearchRequestConfig } from "./search-RfPcG1if.mjs";
|
|
5
|
+
import { a as resolveDocsMetadataBaseUrl } from "./metadata-N252j5_a.mjs";
|
|
6
|
+
import { c as resolveDocsReviewConfig, o as ensureDocsReviewWorkflow, s as readDocsReviewConfigFromSource, t as runDocsGoldenTasks } from "./agent-evals-BFHGypqh.mjs";
|
|
6
7
|
import { createFilesystemDocsMcpSource, getDocsConfigSchema, resolveDocsMcpConfig } from "./mcp.mjs";
|
|
7
8
|
import "./code-blocks-DnNVNK2M.mjs";
|
|
8
9
|
import { _ as resolveDocsContentDir, g as resolveDocsConfigPath, h as readTopLevelStringProperty, s as loadDocsConfigModuleResultWithProjectEnv } from "./config-Wcdj-D0a.mjs";
|
|
9
10
|
import { t as detectFramework } from "./utils-DpiIioYb.mjs";
|
|
10
|
-
import { a as extractAgentBlocks, i as createAgentUsefulnessPagesFromMcp, n as analyzeAgentSurfaceDrift, r as analyzeAgentUsefulness, t as resolveGoldenEvaluationInput } from "./golden-evaluations-
|
|
11
|
+
import { a as extractAgentBlocks, i as createAgentUsefulnessPagesFromMcp, n as analyzeAgentSurfaceDrift, r as analyzeAgentUsefulness, t as resolveGoldenEvaluationInput } from "./golden-evaluations-CloP0pAe.mjs";
|
|
11
12
|
import matter from "gray-matter";
|
|
12
13
|
import { existsSync, lstatSync, readFileSync, readdirSync } from "node:fs";
|
|
13
14
|
import path from "node:path";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE,
|
|
2
|
-
import { a as DEFAULT_A2A_AGENT_CARD_ROUTE, b as DEFAULT_LEGACY_SKILLS_INDEX_ROUTE, f as DEFAULT_AGENT_SKILLS_ROUTE_PREFIX, u as DEFAULT_AGENT_SKILLS_INDEX_ROUTE, v as DEFAULT_API_CATALOG_ROUTE, x as DEFAULT_LEGACY_SKILLS_ROUTE_PREFIX } from "./standards-discovery-
|
|
1
|
+
import { Ht as resolveDocsSitemapConfig, S as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, Yt as DEFAULT_MCP_PUBLIC_ROUTE, Zt as DEFAULT_MCP_WELL_KNOWN_ROUTE, a as DEFAULT_AGENT_MD_ROUTE, c as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, et as normalizeDocsPathSegment, g as DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, h as DEFAULT_LLMS_FULL_TXT_ROUTE, l as DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, o as DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, t as DEFAULT_AGENTS_MD_ROUTE, v as DEFAULT_LLMS_TXT_ROUTE, x as DEFAULT_SKILL_MD_ROUTE, y as DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE } from "./agent-o9OTadrf.mjs";
|
|
2
|
+
import { a as DEFAULT_A2A_AGENT_CARD_ROUTE, b as DEFAULT_LEGACY_SKILLS_INDEX_ROUTE, f as DEFAULT_AGENT_SKILLS_ROUTE_PREFIX, u as DEFAULT_AGENT_SKILLS_INDEX_ROUTE, v as DEFAULT_API_CATALOG_ROUTE, x as DEFAULT_LEGACY_SKILLS_ROUTE_PREFIX } from "./standards-discovery-BwL5ffGx.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/robots.ts
|
|
5
5
|
const DEFAULT_ROBOTS_TXT_ROUTE = "/robots.txt";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import "./agent-
|
|
2
|
-
import "./
|
|
3
|
-
import
|
|
1
|
+
import "./agent-o9OTadrf.mjs";
|
|
2
|
+
import "./markdown-sections-7OoA7ylx.mjs";
|
|
3
|
+
import "./standards-discovery-BwL5ffGx.mjs";
|
|
4
|
+
import { c as renderDocsRobotsGeneratedBlock, f as upsertDocsRobotsGeneratedBlock, i as DOCS_ROBOTS_GENERATED_BLOCK_START, r as DOCS_ROBOTS_GENERATED_BLOCK_END, u as resolveDocsRobotsConfig } from "./robots-BcuxnZqZ.mjs";
|
|
4
5
|
import { a as loadDocsConfigModule, g as resolveDocsConfigPath, h as readTopLevelStringProperty, l as readBooleanProperty, m as readTopLevelBooleanProperty, p as readStringProperty, t as extractNestedObjectLiteral } from "./config-Wcdj-D0a.mjs";
|
|
5
6
|
import { t as detectFramework } from "./utils-DpiIioYb.mjs";
|
|
6
7
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|