@farming-labs/docs 0.2.74 → 0.2.77
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-D0LEY2Vy.mjs → agent-D4hNGatV.mjs} +2 -2
- package/dist/agent-DRKj42ht.d.mts +938 -0
- package/dist/{agent-BJ0KXN-A.mjs → agent-SRIJ-oF8.mjs} +28 -6
- package/dist/{agent-evals-LIScgQVm.mjs → agent-evals-DmFoKy_y.mjs} +1 -1
- package/dist/{agent-export-B92pNe6g.mjs → agent-export-CM-p9_YD.mjs} +7 -7
- package/dist/agent-skills-bundle.d.mts +1 -1
- package/dist/{agent-skills-server-noFn1l_p.mjs → agent-skills-server-B2EXn2QD.mjs} +1 -1
- package/dist/{agent-skills-server-BqvIGQb1.d.mts → agent-skills-server-CJ4D0G9P.d.mts} +2 -2
- package/dist/agent-skills-vite.d.mts +3 -3
- package/dist/agent-skills-vite.mjs +2 -2
- package/dist/{agents-C228QGbp.mjs → agents-BeLDNCnE.mjs} +7 -16
- package/dist/cli/index.mjs +15 -15
- package/dist/client/react.d.mts +1 -1
- package/dist/{cloud-ask-ai-6X9pVjIY.d.mts → cloud-ask-ai-BCgHPxew.d.mts} +1 -1
- package/dist/{dev-Cc1cFFj-.mjs → dev-kjaxOOla.mjs} +8 -2
- package/dist/docs-cloud-server.d.mts +2 -2
- package/dist/{doctor-CgrUZ3tY.mjs → doctor-DhMVKHjp.mjs} +57 -24
- package/dist/{golden-evaluations-DTEPZeb0.mjs → golden-evaluations-VzE6juQl.mjs} +7 -3
- package/dist/index.d.mts +5 -876
- package/dist/index.mjs +6 -6
- package/dist/{mcp-YD37HlPY.mjs → mcp-CZkQJXtA.mjs} +7 -6
- package/dist/mcp.d.mts +30 -5
- package/dist/mcp.mjs +594 -69
- package/dist/{prompt-references-BIS1eXt4.mjs → prompt-references-B6L3AD98.mjs} +3 -3
- package/dist/{retrieval-digest-9Kp3uSaZ.d.mts → retrieval-digest-rponR4jM.d.mts} +24 -50
- package/dist/{review-Dbzkdl6K.mjs → review-nxoV8jIm.mjs} +5 -5
- package/dist/{robots-RbgmSvPH.mjs → robots-CgH6Stqn.mjs} +2 -2
- package/dist/{robots-DUO0r4UI.mjs → robots-CiQT8mX2.mjs} +3 -3
- package/dist/{search-hcqaEZVN.mjs → search-BTUIkhnT.mjs} +6 -6
- package/dist/{search-DIyIl-tE.mjs → search-Da2AKaFJ.mjs} +624 -122
- package/dist/server.d.mts +9 -6
- package/dist/server.mjs +7 -7
- package/dist/{sitemap-jhkS_jYx.mjs → sitemap-e0_GeCWJ.mjs} +6 -6
- package/dist/{sitemap-server-BfyBM7_V.mjs → sitemap-server-DHaxyPAd.mjs} +12 -3
- package/dist/{standards-discovery-BwL5ffGx.mjs → standards-discovery-BKlEnK_H.mjs} +32 -4
- package/dist/{standards-discovery-CdrOE-05.d.mts → standards-discovery-BbslY4id.d.mts} +34 -7
- package/dist/{types-clg5J1R4.d.mts → types-B-5Kzmkn.d.mts} +73 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { S as upsertPageAgentContractMarkdown, b as renderPageAgentFrontmatterYamlLines, o as findDocsMarkdownSection, p as PAGE_AGENT_CONTRACT_FIELD_SCHEMA, s as parseDocsMarkdownSections } from "./markdown-sections-7OoA7ylx.mjs";
|
|
2
|
-
import { F as isDocsStandardsDiscoveryRequest, I as resolveDocsDiscoveryApiRoute, M as createDocsStandardsResponse, S as DOCS_AGENT_MANIFEST_FORMAT, T as DOCS_AGENT_MANIFEST_VERSION, _ as DEFAULT_API_CATALOG_FORMAT, a as DEFAULT_A2A_AGENT_CARD_ROUTE, b as DEFAULT_LEGACY_SKILLS_INDEX_ROUTE, c as DEFAULT_AGENT_SKILLS_ARCHIVE_ROUTE_PATTERN, d as DEFAULT_AGENT_SKILLS_ROUTE_PATTERN, k as buildDocsApiCatalog, l as DEFAULT_AGENT_SKILLS_INDEX_FORMAT, 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-
|
|
2
|
+
import { F as isDocsStandardsDiscoveryRequest, I as resolveDocsDiscoveryApiRoute, M as createDocsStandardsResponse, S as DOCS_AGENT_MANIFEST_FORMAT, T as DOCS_AGENT_MANIFEST_VERSION, _ as DEFAULT_API_CATALOG_FORMAT, a as DEFAULT_A2A_AGENT_CARD_ROUTE, b as DEFAULT_LEGACY_SKILLS_INDEX_ROUTE, c as DEFAULT_AGENT_SKILLS_ARCHIVE_ROUTE_PATTERN, d as DEFAULT_AGENT_SKILLS_ROUTE_PATTERN, k as buildDocsApiCatalog, l as DEFAULT_AGENT_SKILLS_INDEX_FORMAT, 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-BKlEnK_H.mjs";
|
|
3
3
|
import { createProcessor } from "@mdx-js/mdx";
|
|
4
4
|
|
|
5
5
|
//#region src/mcp-auth.ts
|
|
@@ -2117,6 +2117,7 @@ const DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA = {
|
|
|
2117
2117
|
const DEFAULT_DOCS_DIAGNOSTICS_MCP_TOOLS = {
|
|
2118
2118
|
listDocs: true,
|
|
2119
2119
|
listPages: true,
|
|
2120
|
+
listPageSections: true,
|
|
2120
2121
|
readPage: true,
|
|
2121
2122
|
listTasks: true,
|
|
2122
2123
|
readTask: true,
|
|
@@ -2434,6 +2435,10 @@ function buildDocsDiagnostics(config, options = {}) {
|
|
|
2434
2435
|
},
|
|
2435
2436
|
responseFormat: "docs-search.v1",
|
|
2436
2437
|
warningsField: "warnings",
|
|
2438
|
+
cursorParam: "cursor",
|
|
2439
|
+
nextCursorField: "nextCursor",
|
|
2440
|
+
hasMoreField: "hasMore",
|
|
2441
|
+
totalField: "total",
|
|
2437
2442
|
provider: search.provider,
|
|
2438
2443
|
transport: "GET"
|
|
2439
2444
|
},
|
|
@@ -2740,6 +2745,7 @@ function resolveDocsDiagnosticsMcp(mcp) {
|
|
|
2740
2745
|
...DEFAULT_DOCS_DIAGNOSTICS_MCP_TOOLS,
|
|
2741
2746
|
listDocs: tools.listDocs !== false,
|
|
2742
2747
|
listPages: tools.listPages !== false,
|
|
2748
|
+
listPageSections: tools.listPageSections !== false,
|
|
2743
2749
|
readPage: tools.readPage !== false,
|
|
2744
2750
|
listTasks: tools.listTasks !== false,
|
|
2745
2751
|
readTask: tools.readTask !== false,
|
|
@@ -3273,7 +3279,13 @@ async function createDocsStandardsDiscoveryResponse({ request, preferredSkillDoc
|
|
|
3273
3279
|
mcpRoute: mcp.enabled ? mcp.route : null,
|
|
3274
3280
|
protectedResourceMetadataRoutes,
|
|
3275
3281
|
feedbackRoutes: feedback?.enabled ? [feedbackRoute, feedbackSchemaRoute] : [],
|
|
3276
|
-
|
|
3282
|
+
openapiDefinitions: openapiConfig.enabled && openapiConfig.catalogTargets?.length ? [{
|
|
3283
|
+
route: openapiUrl ?? `${resolvedApiRoute}?format=openapi`,
|
|
3284
|
+
targets: openapiConfig.catalogTargets.map((route) => ({
|
|
3285
|
+
route,
|
|
3286
|
+
title: "Product API"
|
|
3287
|
+
}))
|
|
3288
|
+
}] : [],
|
|
3277
3289
|
apiReferenceRoute: openapiConfig.enabled && openapiConfig.apiReferencePath ? openapiConfig.apiReferencePath : null
|
|
3278
3290
|
}) : void 0
|
|
3279
3291
|
});
|
|
@@ -4539,7 +4551,11 @@ function buildDocsAgentDiscoverySpec({ origin, entry = "docs", apiRoute, apiCata
|
|
|
4539
4551
|
"package",
|
|
4540
4552
|
"tags"
|
|
4541
4553
|
],
|
|
4542
|
-
warningsField: "warnings"
|
|
4554
|
+
warningsField: "warnings",
|
|
4555
|
+
cursorParam: "cursor",
|
|
4556
|
+
nextCursorField: "nextCursor",
|
|
4557
|
+
hasMoreField: "hasMore",
|
|
4558
|
+
totalField: "total"
|
|
4543
4559
|
},
|
|
4544
4560
|
agents: {
|
|
4545
4561
|
enabled: true,
|
|
@@ -4680,16 +4696,22 @@ function resolveDocsOpenApiDiscoveryConfig(openapi) {
|
|
|
4680
4696
|
enabled: true,
|
|
4681
4697
|
url: DEFAULT_OPENAPI_SCHEMA_ROUTE,
|
|
4682
4698
|
urlSource: "default",
|
|
4683
|
-
source: "generated"
|
|
4699
|
+
source: "generated",
|
|
4700
|
+
catalogTargets: ["/"]
|
|
4684
4701
|
};
|
|
4685
4702
|
if (openapi.enabled === false) return { enabled: false };
|
|
4703
|
+
const specUrl = openapi.specUrl?.trim();
|
|
4704
|
+
const source = openapi.source ?? (specUrl ? "configured" : "generated");
|
|
4705
|
+
const requestRelativeSpecUrl = specUrl?.startsWith("/") && !specUrl.startsWith("//");
|
|
4706
|
+
const catalogTargets = openapi.catalogTargets === void 0 ? source === "generated" || requestRelativeSpecUrl ? ["/"] : void 0 : Array.from(new Set(openapi.catalogTargets.filter((target) => typeof target === "string").map((target) => target.trim()).filter(Boolean)));
|
|
4686
4707
|
return {
|
|
4687
4708
|
enabled: true,
|
|
4688
4709
|
url: openapi.url ?? DEFAULT_OPENAPI_SCHEMA_ROUTE,
|
|
4689
4710
|
urlSource: openapi.urlSource ?? (openapi.url === void 0 ? "default" : "configured"),
|
|
4690
|
-
source
|
|
4711
|
+
source,
|
|
4691
4712
|
specUrl: openapi.specUrl,
|
|
4692
|
-
apiReferencePath: openapi.apiReferencePath
|
|
4713
|
+
apiReferencePath: openapi.apiReferencePath,
|
|
4714
|
+
catalogTargets
|
|
4693
4715
|
};
|
|
4694
4716
|
}
|
|
4695
4717
|
function resolveDocsOpenApiDiscoveryUrl(openapi, apiRoute) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { S as upsertPageAgentContractMarkdown, l as stripDocsGeneratedAgentContractMarkers, o as findDocsMarkdownSection } from "./markdown-sections-7OoA7ylx.mjs";
|
|
2
|
-
import { C as
|
|
2
|
+
import { C as agentVersionConstraintGroupsOverlap, D as normalizeAgentLocale, E as normalizeAgentFramework, O as normalizeAgentScopeValues, S as resolveSearchRequestConfig, T as agentVersionConstraintsOverlap, k as normalizeAgentVersion, m as performDocsSearch, n as buildDocsAskAIContext, p as normalizeDocsSearchFilters, w as agentVersionConstraintMatches } from "./search-Da2AKaFJ.mjs";
|
|
3
3
|
import { buildDocsMcpContext } from "./mcp.mjs";
|
|
4
4
|
import { i as validateCodeBlockPlans, n as planCodeBlockTargets, r as resolveDocsCodeBlocksValidateConfig, t as extractCodeBlocksFromMarkdown } from "./code-blocks-DnNVNK2M.mjs";
|
|
5
5
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { A as buildDocsAgentDiscoverySpec, Bt as renderDocsSitemapMarkdown, Ht as resolveDocsSitemapConfig, Lt as buildDocsSitemapManifest, S as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, Vt as renderDocsSitemapXml, a as DEFAULT_AGENT_MD_ROUTE, at as renderDocsMarkdownDocument, c as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, g as DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, h as DEFAULT_LLMS_FULL_TXT_ROUTE, it as renderDocsLlmsTxt, l as DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, lt as resolveDocsAgentFeedbackConfig, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, o as DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, rt as renderDocsAgentsDocument, st as renderDocsSkillDocument, t as DEFAULT_AGENTS_MD_ROUTE, v as DEFAULT_LLMS_TXT_ROUTE, wt as toDocsMarkdownUrl, x as DEFAULT_SKILL_MD_ROUTE, y as DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE } from "./agent-
|
|
1
|
+
import { A as buildDocsAgentDiscoverySpec, Bt as renderDocsSitemapMarkdown, Ht as resolveDocsSitemapConfig, Lt as buildDocsSitemapManifest, S as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, Vt as renderDocsSitemapXml, a as DEFAULT_AGENT_MD_ROUTE, at as renderDocsMarkdownDocument, c as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, g as DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, h as DEFAULT_LLMS_FULL_TXT_ROUTE, it as renderDocsLlmsTxt, l as DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, lt as resolveDocsAgentFeedbackConfig, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, o as DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, rt as renderDocsAgentsDocument, st as renderDocsSkillDocument, t as DEFAULT_AGENTS_MD_ROUTE, v as DEFAULT_LLMS_TXT_ROUTE, wt as toDocsMarkdownUrl, x as DEFAULT_SKILL_MD_ROUTE, y as DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE } from "./agent-SRIJ-oF8.mjs";
|
|
2
2
|
import "./markdown-sections-7OoA7ylx.mjs";
|
|
3
|
-
import { A as buildDocsLegacySkillsIndex, D as buildDocsA2AAgentCard, L as resolveDocsPublishedAgentSkill, O as buildDocsAgentSkillsIndex, 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, x as DEFAULT_LEGACY_SKILLS_ROUTE_PREFIX } from "./standards-discovery-
|
|
4
|
-
import "./search-
|
|
3
|
+
import { A as buildDocsLegacySkillsIndex, D as buildDocsA2AAgentCard, L as resolveDocsPublishedAgentSkill, O as buildDocsAgentSkillsIndex, 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, x as DEFAULT_LEGACY_SKILLS_ROUTE_PREFIX } from "./standards-discovery-BKlEnK_H.mjs";
|
|
4
|
+
import "./search-Da2AKaFJ.mjs";
|
|
5
5
|
import { t as resolveDocsI18n } from "./i18n-hHVWcflJ.mjs";
|
|
6
|
-
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-
|
|
7
|
-
import "./sitemap-server-
|
|
8
|
-
import "./agent-evals-
|
|
6
|
+
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-CgH6Stqn.mjs";
|
|
7
|
+
import "./sitemap-server-DHaxyPAd.mjs";
|
|
8
|
+
import "./agent-evals-DmFoKy_y.mjs";
|
|
9
9
|
import { createFilesystemDocsMcpSource, resolveDocsMcpConfig } from "./mcp.mjs";
|
|
10
10
|
import "./code-blocks-DnNVNK2M.mjs";
|
|
11
|
-
import { t as resolveConfiguredAgentSkills } from "./agent-skills-server-
|
|
11
|
+
import { t as resolveConfiguredAgentSkills } from "./agent-skills-server-B2EXn2QD.mjs";
|
|
12
12
|
import "./server.mjs";
|
|
13
13
|
import { _ as resolveDocsContentDir, a as loadDocsConfigModule, d as readNavTitle, g as resolveDocsConfigPath, h as readTopLevelStringProperty, l as readBooleanProperty, m as readTopLevelBooleanProperty, p as readStringProperty, r as extractTopLevelConfigObject, t as extractNestedObjectLiteral } from "./config-Wcdj-D0a.mjs";
|
|
14
14
|
import { t as detectFramework } from "./utils-DpiIioYb.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as DEFAULT_AGENT_SKILLS_ROUTE_PREFIX, j as buildDocsPublishedAgentSkill } from "./standards-discovery-
|
|
1
|
+
import { f as DEFAULT_AGENT_SKILLS_ROUTE_PREFIX, j as buildDocsPublishedAgentSkill } from "./standards-discovery-BKlEnK_H.mjs";
|
|
2
2
|
import { existsSync, lstatSync, readFileSync, readdirSync, realpathSync, statSync } from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as DocsAgentSkillsInput } from "./types-
|
|
2
|
-
import {
|
|
1
|
+
import { $ as DocsAgentSkillsInput } from "./types-B-5Kzmkn.mjs";
|
|
2
|
+
import { z as DocsPublishedAgentSkill } from "./standards-discovery-BbslY4id.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/agent-skills-server.d.ts
|
|
5
5
|
interface ResolveConfiguredAgentSkillsOptions {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $ as DocsAgentSkillsInput } from "./types-
|
|
2
|
-
import {
|
|
3
|
-
import { t as ResolveConfiguredAgentSkillsOptions } from "./agent-skills-server-
|
|
1
|
+
import { $ as DocsAgentSkillsInput } from "./types-B-5Kzmkn.mjs";
|
|
2
|
+
import { z as DocsPublishedAgentSkill } from "./standards-discovery-BbslY4id.mjs";
|
|
3
|
+
import { t as ResolveConfiguredAgentSkillsOptions } from "./agent-skills-server-CJ4D0G9P.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/agent-skills-vite.d.ts
|
|
6
6
|
declare const DOCS_AGENT_SKILLS_BUNDLE_MODULE = "@farming-labs/docs/agent-skills-bundle";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./standards-discovery-
|
|
2
|
-
import { t as resolveConfiguredAgentSkills } from "./agent-skills-server-
|
|
1
|
+
import "./standards-discovery-BKlEnK_H.mjs";
|
|
2
|
+
import { t as resolveConfiguredAgentSkills } from "./agent-skills-server-B2EXn2QD.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/agent-skills-vite.ts
|
|
5
5
|
const DOCS_AGENT_SKILLS_BUNDLE_MODULE = "@farming-labs/docs/agent-skills-bundle";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { a as DEFAULT_AGENT_MD_ROUTE,
|
|
1
|
+
import { a as DEFAULT_AGENT_MD_ROUTE, lt as resolveDocsAgentFeedbackConfig, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, o as DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, rt as renderDocsAgentsDocument, t as DEFAULT_AGENTS_MD_ROUTE } from "./agent-SRIJ-oF8.mjs";
|
|
2
2
|
import "./markdown-sections-7OoA7ylx.mjs";
|
|
3
|
-
import "./standards-discovery-
|
|
4
|
-
import "./search-
|
|
5
|
-
import {
|
|
6
|
-
import "./agent-evals-
|
|
3
|
+
import "./standards-discovery-BKlEnK_H.mjs";
|
|
4
|
+
import "./search-Da2AKaFJ.mjs";
|
|
5
|
+
import { C as resolveApiReferenceOpenApiDiscovery } from "./sitemap-server-DHaxyPAd.mjs";
|
|
6
|
+
import "./agent-evals-DmFoKy_y.mjs";
|
|
7
7
|
import { resolveDocsMcpConfig } from "./mcp.mjs";
|
|
8
8
|
import "./code-blocks-DnNVNK2M.mjs";
|
|
9
|
-
import "./agent-skills-server-
|
|
9
|
+
import "./agent-skills-server-B2EXn2QD.mjs";
|
|
10
10
|
import "./server.mjs";
|
|
11
11
|
import { a as loadDocsConfigModule, d as readNavTitle, g as resolveDocsConfigPath, h as readTopLevelStringProperty, l as readBooleanProperty, p as readStringProperty, t as extractNestedObjectLiteral } from "./config-Wcdj-D0a.mjs";
|
|
12
12
|
import { t as detectFramework } from "./utils-DpiIioYb.mjs";
|
|
@@ -129,16 +129,7 @@ function writeIfNeeded(filePath, content, options) {
|
|
|
129
129
|
return "changed";
|
|
130
130
|
}
|
|
131
131
|
function resolveOpenApiDiscovery(config) {
|
|
132
|
-
|
|
133
|
-
if (!apiReference.enabled) return { enabled: false };
|
|
134
|
-
return {
|
|
135
|
-
enabled: true,
|
|
136
|
-
url: DEFAULT_OPENAPI_SCHEMA_ROUTE,
|
|
137
|
-
urlSource: "default",
|
|
138
|
-
source: apiReference.specUrl ? "configured" : "generated",
|
|
139
|
-
specUrl: apiReference.specUrl,
|
|
140
|
-
apiReferencePath: `/${apiReference.path}`
|
|
141
|
-
};
|
|
132
|
+
return resolveApiReferenceOpenApiDiscovery(config?.apiReference);
|
|
142
133
|
}
|
|
143
134
|
async function generateAgents(options = {}) {
|
|
144
135
|
const rootDir = process.cwd();
|
package/dist/cli/index.mjs
CHANGED
|
@@ -111,7 +111,7 @@ async function main() {
|
|
|
111
111
|
const { init } = await import("../init-DAkI0Lkf.mjs");
|
|
112
112
|
await init(initOptions);
|
|
113
113
|
} else if (parsedCommand.command === "dev") {
|
|
114
|
-
const { dev } = await import("../dev-
|
|
114
|
+
const { dev } = await import("../dev-kjaxOOla.mjs");
|
|
115
115
|
await dev(devOptions);
|
|
116
116
|
} else if (parsedCommand.command === "deploy") {
|
|
117
117
|
const { runCloudDeploy } = await import("../cloud-pdNC-tyj.mjs");
|
|
@@ -141,10 +141,10 @@ async function main() {
|
|
|
141
141
|
printCloudHelp();
|
|
142
142
|
process.exit(1);
|
|
143
143
|
} else if (parsedCommand.command === "mcp") {
|
|
144
|
-
const { runMcp } = await import("../mcp-
|
|
144
|
+
const { runMcp } = await import("../mcp-CZkQJXtA.mjs");
|
|
145
145
|
await runMcp(mcpOptions);
|
|
146
146
|
} else if (parsedCommand.command === "agent" && subcommand === "compact") {
|
|
147
|
-
const { compactAgentDocs, parseAgentCompactArgs, printAgentCompactHelp } = await import("../agent-
|
|
147
|
+
const { compactAgentDocs, parseAgentCompactArgs, printAgentCompactHelp } = await import("../agent-D4hNGatV.mjs").then((n) => n.t);
|
|
148
148
|
const agentCompactOptions = parseAgentCompactArgs(args.slice(2));
|
|
149
149
|
if (agentCompactOptions.help) {
|
|
150
150
|
printAgentCompactHelp();
|
|
@@ -152,7 +152,7 @@ async function main() {
|
|
|
152
152
|
}
|
|
153
153
|
await compactAgentDocs(agentCompactOptions);
|
|
154
154
|
} else if (parsedCommand.command === "agent" && subcommand === "export") {
|
|
155
|
-
const { exportAgentBundle, parseAgentExportArgs, printAgentExportHelp } = await import("../agent-export-
|
|
155
|
+
const { exportAgentBundle, parseAgentExportArgs, printAgentExportHelp } = await import("../agent-export-CM-p9_YD.mjs");
|
|
156
156
|
const agentExportOptions = parseAgentExportArgs(args.slice(2));
|
|
157
157
|
if (agentExportOptions.help) {
|
|
158
158
|
printAgentExportHelp();
|
|
@@ -162,13 +162,13 @@ async function main() {
|
|
|
162
162
|
} else if (parsedCommand.command === "agent") {
|
|
163
163
|
console.error(pc.red(`Unknown agent subcommand: ${subcommand ?? "(missing)"}`));
|
|
164
164
|
console.error();
|
|
165
|
-
const { printAgentCompactHelp } = await import("../agent-
|
|
166
|
-
const { printAgentExportHelp } = await import("../agent-export-
|
|
165
|
+
const { printAgentCompactHelp } = await import("../agent-D4hNGatV.mjs").then((n) => n.t);
|
|
166
|
+
const { printAgentExportHelp } = await import("../agent-export-CM-p9_YD.mjs");
|
|
167
167
|
printAgentCompactHelp();
|
|
168
168
|
printAgentExportHelp();
|
|
169
169
|
process.exit(1);
|
|
170
170
|
} else if (parsedCommand.command === "agents" && subcommand === "generate") {
|
|
171
|
-
const { generateAgents, parseAgentsGenerateArgs, printAgentsGenerateHelp } = await import("../agents-
|
|
171
|
+
const { generateAgents, parseAgentsGenerateArgs, printAgentsGenerateHelp } = await import("../agents-BeLDNCnE.mjs");
|
|
172
172
|
const agentsOptions = parseAgentsGenerateArgs(args.slice(2));
|
|
173
173
|
if (agentsOptions.help) {
|
|
174
174
|
printAgentsGenerateHelp();
|
|
@@ -178,11 +178,11 @@ async function main() {
|
|
|
178
178
|
} else if (parsedCommand.command === "agents") {
|
|
179
179
|
console.error(pc.red(`Unknown agents subcommand: ${subcommand ?? "(missing)"}`));
|
|
180
180
|
console.error();
|
|
181
|
-
const { printAgentsGenerateHelp } = await import("../agents-
|
|
181
|
+
const { printAgentsGenerateHelp } = await import("../agents-BeLDNCnE.mjs");
|
|
182
182
|
printAgentsGenerateHelp();
|
|
183
183
|
process.exit(1);
|
|
184
184
|
} else if (parsedCommand.command === "doctor") {
|
|
185
|
-
const { parseDoctorArgs, printDoctorHelp, runDoctor } = await import("../doctor-
|
|
185
|
+
const { parseDoctorArgs, printDoctorHelp, runDoctor } = await import("../doctor-DhMVKHjp.mjs");
|
|
186
186
|
const doctorOptions = parseDoctorArgs(args.slice(1));
|
|
187
187
|
if (doctorOptions.help) {
|
|
188
188
|
printDoctorHelp();
|
|
@@ -190,7 +190,7 @@ async function main() {
|
|
|
190
190
|
}
|
|
191
191
|
await runDoctor(doctorOptions);
|
|
192
192
|
} else if (parsedCommand.command === "review") {
|
|
193
|
-
const { parseReviewArgs, printReviewHelp, runReview } = await import("../review-
|
|
193
|
+
const { parseReviewArgs, printReviewHelp, runReview } = await import("../review-nxoV8jIm.mjs");
|
|
194
194
|
const reviewOptions = parseReviewArgs(args.slice(1));
|
|
195
195
|
if (reviewOptions.help) {
|
|
196
196
|
printReviewHelp();
|
|
@@ -212,7 +212,7 @@ async function main() {
|
|
|
212
212
|
printCodeBlocksValidateHelp();
|
|
213
213
|
process.exit(1);
|
|
214
214
|
} else if (parsedCommand.command === "search" && subcommand === "sync") {
|
|
215
|
-
const { syncSearch } = await import("../search-
|
|
215
|
+
const { syncSearch } = await import("../search-BTUIkhnT.mjs");
|
|
216
216
|
await syncSearch(searchSyncOptions);
|
|
217
217
|
} else if (parsedCommand.command === "search") {
|
|
218
218
|
console.error(pc.red(`Unknown search subcommand: ${subcommand ?? "(missing)"}`));
|
|
@@ -220,7 +220,7 @@ async function main() {
|
|
|
220
220
|
printHelp();
|
|
221
221
|
process.exit(1);
|
|
222
222
|
} else if (parsedCommand.command === "sitemap" && subcommand === "generate") {
|
|
223
|
-
const { generateSitemap, parseSitemapGenerateArgs, printSitemapGenerateHelp } = await import("../sitemap-
|
|
223
|
+
const { generateSitemap, parseSitemapGenerateArgs, printSitemapGenerateHelp } = await import("../sitemap-e0_GeCWJ.mjs");
|
|
224
224
|
const sitemapOptions = parseSitemapGenerateArgs(args.slice(2));
|
|
225
225
|
if (sitemapOptions.help) {
|
|
226
226
|
printSitemapGenerateHelp();
|
|
@@ -230,11 +230,11 @@ async function main() {
|
|
|
230
230
|
} else if (parsedCommand.command === "sitemap") {
|
|
231
231
|
console.error(pc.red(`Unknown sitemap subcommand: ${subcommand ?? "(missing)"}`));
|
|
232
232
|
console.error();
|
|
233
|
-
const { printSitemapGenerateHelp } = await import("../sitemap-
|
|
233
|
+
const { printSitemapGenerateHelp } = await import("../sitemap-e0_GeCWJ.mjs");
|
|
234
234
|
printSitemapGenerateHelp();
|
|
235
235
|
process.exit(1);
|
|
236
236
|
} else if (parsedCommand.command === "robots" && subcommand === "generate") {
|
|
237
|
-
const { generateRobots, parseRobotsGenerateArgs, printRobotsGenerateHelp } = await import("../robots-
|
|
237
|
+
const { generateRobots, parseRobotsGenerateArgs, printRobotsGenerateHelp } = await import("../robots-CiQT8mX2.mjs");
|
|
238
238
|
const robotsOptions = parseRobotsGenerateArgs(args.slice(2));
|
|
239
239
|
if (robotsOptions.help) {
|
|
240
240
|
printRobotsGenerateHelp();
|
|
@@ -244,7 +244,7 @@ async function main() {
|
|
|
244
244
|
} else if (parsedCommand.command === "robots") {
|
|
245
245
|
console.error(pc.red(`Unknown robots subcommand: ${subcommand ?? "(missing)"}`));
|
|
246
246
|
console.error();
|
|
247
|
-
const { printRobotsGenerateHelp } = await import("../robots-
|
|
247
|
+
const { printRobotsGenerateHelp } = await import("../robots-CiQT8mX2.mjs");
|
|
248
248
|
printRobotsGenerateHelp();
|
|
249
249
|
process.exit(1);
|
|
250
250
|
} else if (parsedCommand.command === "downgrade") {
|
package/dist/client/react.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _t as DocsCloudConfig, rt as DocsAnalyticsConfig, t as AIConfig } from "./types-
|
|
1
|
+
import { _t as DocsCloudConfig, rt as DocsAnalyticsConfig, t as AIConfig } from "./types-B-5Kzmkn.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/cloud-ask-ai.d.ts
|
|
4
4
|
interface DocsCloudAskAIConfig {
|
|
@@ -191,6 +191,7 @@ const managedConfigSchema = z.object({
|
|
|
191
191
|
name: z.string().optional(),
|
|
192
192
|
path: z.string(),
|
|
193
193
|
route: z.string().optional(),
|
|
194
|
+
catalogTargets: z.array(z.string()).optional(),
|
|
194
195
|
navigationLabel: z.string().optional()
|
|
195
196
|
}).passthrough()).optional()
|
|
196
197
|
}).passthrough().optional(),
|
|
@@ -240,11 +241,13 @@ function resolveManagedOpenApiSpec(projectRoot, openapi) {
|
|
|
240
241
|
if (configured) {
|
|
241
242
|
const rawPath = configured.path.trim();
|
|
242
243
|
const route = normalizeManagedRoutePath(configured.route);
|
|
244
|
+
const catalogTargets = configured.catalogTargets === void 0 ? void 0 : Array.from(new Set(configured.catalogTargets.map((target) => target.trim()).filter(Boolean)));
|
|
243
245
|
if (isRemoteManagedSpecPath(rawPath) || isRequestRelativeManagedSpecPath(rawPath)) return {
|
|
244
246
|
name: configured.name?.trim() || "API Reference",
|
|
245
247
|
route,
|
|
246
248
|
path: rawPath,
|
|
247
249
|
specUrl: rawPath,
|
|
250
|
+
catalogTargets,
|
|
248
251
|
navigationLabel: configured.navigationLabel?.trim() || void 0
|
|
249
252
|
};
|
|
250
253
|
return {
|
|
@@ -252,6 +255,7 @@ function resolveManagedOpenApiSpec(projectRoot, openapi) {
|
|
|
252
255
|
route,
|
|
253
256
|
path: rawPath,
|
|
254
257
|
specUrl: DEFAULT_MANAGED_OPENAPI_ENDPOINT,
|
|
258
|
+
catalogTargets,
|
|
255
259
|
sourcePath: path.resolve(projectRoot, rawPath),
|
|
256
260
|
navigationLabel: configured.navigationLabel?.trim() || void 0
|
|
257
261
|
};
|
|
@@ -585,12 +589,13 @@ function renderEmptyHomePage() {
|
|
|
585
589
|
`;
|
|
586
590
|
}
|
|
587
591
|
function renderDocsConfigFile(options) {
|
|
592
|
+
const catalogTargetsLine = options.apiReference?.catalogTargets === void 0 ? "" : ` catalogTargets: ${JSON.stringify(options.apiReference.catalogTargets)},\n`;
|
|
588
593
|
const apiReferenceBlock = options.apiReference ? ` apiReference: {
|
|
589
594
|
enabled: true,
|
|
590
595
|
path: ${JSON.stringify(options.apiReference.path)},
|
|
591
596
|
renderer: "fumadocs",
|
|
592
597
|
specUrl: ${JSON.stringify(options.apiReference.specUrl)},
|
|
593
|
-
},
|
|
598
|
+
${catalogTargetsLine} },
|
|
594
599
|
` : "";
|
|
595
600
|
const analyticsBlock = renderManagedAnalyticsBlock(options.analytics);
|
|
596
601
|
return `import { defineDocs } from "@farming-labs/docs";
|
|
@@ -976,7 +981,8 @@ function materializeManagedRuntime(projectRoot) {
|
|
|
976
981
|
analytics: project.analytics,
|
|
977
982
|
apiReference: project.apiReferenceSpec ? {
|
|
978
983
|
path: apiReferenceRoute,
|
|
979
|
-
specUrl: project.apiReferenceSpec.specUrl
|
|
984
|
+
specUrl: project.apiReferenceSpec.specUrl,
|
|
985
|
+
catalogTargets: project.apiReferenceSpec.catalogTargets
|
|
980
986
|
} : void 0
|
|
981
987
|
}));
|
|
982
988
|
if (!project.apiReferenceSpec) writeFileIfChanged(path.join(project.runtimeDir, "api-reference.config.ts"), renderDocsConfigFile({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { at as DocsAnalyticsEventInput, it as DocsAnalyticsEvent, rt as DocsAnalyticsConfig } from "./types-
|
|
2
|
-
import { n as DocsCloudAskAIResponseOptions, t as DocsCloudAskAIConfig } from "./cloud-ask-ai-
|
|
1
|
+
import { at as DocsAnalyticsEventInput, it as DocsAnalyticsEvent, rt as DocsAnalyticsConfig } from "./types-B-5Kzmkn.mjs";
|
|
2
|
+
import { n as DocsCloudAskAIResponseOptions, t as DocsCloudAskAIConfig } from "./cloud-ask-ai-BCgHPxew.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/docs-cloud-server.d.ts
|
|
5
5
|
type DocsCloudRuntimeValue<T = string> = T | undefined | null | (() => T | undefined | null);
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { i as scanDocsPageTargets, n as compactAgentDocs, r as inspectAgentCompactionState } from "./agent-
|
|
2
|
-
import { d as httpLinkHeaderHasTargetRelation, f as AGENT_SKILL_ARCHIVE_MAX_UNCOMPRESSED_BYTES, p as readAgentSkillDocumentFromTar } from "./prompt-references-
|
|
3
|
-
import { $t as getDocsMcpProtectedResourceMetadataRoutes, A as buildDocsAgentDiscoverySpec, F as buildDocsMcpEndpointCandidates, Ft as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, Ht as resolveDocsSitemapConfig, It as DEFAULT_SITEMAP_XML_ROUTE, M as buildDocsConfigMap, Pt as DEFAULT_SITEMAP_MD_ROUTE, S as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, T as DOCS_CONFIG_MAP_TOP_LEVEL_KEYS, Yt as DEFAULT_MCP_PUBLIC_ROUTE, Zt as DEFAULT_MCP_WELL_KNOWN_ROUTE, c as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, h as DEFAULT_LLMS_FULL_TXT_ROUTE, i as DEFAULT_AGENT_FEEDBACK_ROUTE, l as DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, nn as isDocsMcpOAuthScopeToken, on as normalizeDocsMcpAuthorizationServerUrls, t as DEFAULT_AGENTS_MD_ROUTE, v as DEFAULT_LLMS_TXT_ROUTE, x as DEFAULT_SKILL_MD_ROUTE } from "./agent-
|
|
1
|
+
import { i as scanDocsPageTargets, n as compactAgentDocs, r as inspectAgentCompactionState } from "./agent-D4hNGatV.mjs";
|
|
2
|
+
import { d as httpLinkHeaderHasTargetRelation, f as AGENT_SKILL_ARCHIVE_MAX_UNCOMPRESSED_BYTES, p as readAgentSkillDocumentFromTar } from "./prompt-references-B6L3AD98.mjs";
|
|
3
|
+
import { $t as getDocsMcpProtectedResourceMetadataRoutes, A as buildDocsAgentDiscoverySpec, F as buildDocsMcpEndpointCandidates, Ft as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, Ht as resolveDocsSitemapConfig, It as DEFAULT_SITEMAP_XML_ROUTE, M as buildDocsConfigMap, Pt as DEFAULT_SITEMAP_MD_ROUTE, S as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, T as DOCS_CONFIG_MAP_TOP_LEVEL_KEYS, Yt as DEFAULT_MCP_PUBLIC_ROUTE, Zt as DEFAULT_MCP_WELL_KNOWN_ROUTE, c as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, h as DEFAULT_LLMS_FULL_TXT_ROUTE, i as DEFAULT_AGENT_FEEDBACK_ROUTE, l as DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, nn as isDocsMcpOAuthScopeToken, on as normalizeDocsMcpAuthorizationServerUrls, t as DEFAULT_AGENTS_MD_ROUTE, v as DEFAULT_LLMS_TXT_ROUTE, x as DEFAULT_SKILL_MD_ROUTE } from "./agent-SRIJ-oF8.mjs";
|
|
4
4
|
import { f as PAGE_AGENT_CONTRACT_FIELDS } from "./markdown-sections-7OoA7ylx.mjs";
|
|
5
5
|
import { isDocsAgentSkillName, validateDocsAgentSkillFrontmatter } from "./agent-skills-spec.mjs";
|
|
6
|
-
import { I as resolveDocsDiscoveryApiRoute, _ as DEFAULT_API_CATALOG_FORMAT, d as DEFAULT_AGENT_SKILLS_ROUTE_PATTERN, f as DEFAULT_AGENT_SKILLS_ROUTE_PREFIX, h as DEFAULT_AGENT_SKILL_FORMAT, l as DEFAULT_AGENT_SKILLS_INDEX_FORMAT, 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 } from "./standards-discovery-
|
|
7
|
-
import {
|
|
8
|
-
import { a as analyzeDocsRobotsTxt, n as DEFAULT_ROBOTS_TXT_ROUTE, u as resolveDocsRobotsConfig } from "./robots-
|
|
6
|
+
import { I as resolveDocsDiscoveryApiRoute, _ as DEFAULT_API_CATALOG_FORMAT, d as DEFAULT_AGENT_SKILLS_ROUTE_PATTERN, f as DEFAULT_AGENT_SKILLS_ROUTE_PREFIX, h as DEFAULT_AGENT_SKILL_FORMAT, l as DEFAULT_AGENT_SKILLS_INDEX_FORMAT, 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 } from "./standards-discovery-BKlEnK_H.mjs";
|
|
7
|
+
import { g as resolveAskAISearchRequestConfig } from "./search-Da2AKaFJ.mjs";
|
|
8
|
+
import { a as analyzeDocsRobotsTxt, n as DEFAULT_ROBOTS_TXT_ROUTE, u as resolveDocsRobotsConfig } from "./robots-CgH6Stqn.mjs";
|
|
9
9
|
import { a as resolveDocsMetadataBaseUrl } from "./metadata-N252j5_a.mjs";
|
|
10
|
-
import "./sitemap-server-
|
|
11
|
-
import { t as runDocsGoldenTasks } from "./agent-evals-
|
|
10
|
+
import "./sitemap-server-DHaxyPAd.mjs";
|
|
11
|
+
import { t as runDocsGoldenTasks } from "./agent-evals-DmFoKy_y.mjs";
|
|
12
12
|
import { createFilesystemDocsMcpSource, getDocsConfigSchema, resolveDocsMcpConfig } from "./mcp.mjs";
|
|
13
13
|
import "./code-blocks-DnNVNK2M.mjs";
|
|
14
|
-
import { t as resolveConfiguredAgentSkills } from "./agent-skills-server-
|
|
14
|
+
import { t as resolveConfiguredAgentSkills } from "./agent-skills-server-B2EXn2QD.mjs";
|
|
15
15
|
import "./server.mjs";
|
|
16
16
|
import { _ as resolveDocsContentDir, d as readNavTitle, g as resolveDocsConfigPath, h as readTopLevelStringProperty, l as readBooleanProperty, r as extractTopLevelConfigObject, s as loadDocsConfigModuleResultWithProjectEnv, t as extractNestedObjectLiteral } from "./config-Wcdj-D0a.mjs";
|
|
17
17
|
import { t as detectFramework } from "./utils-DpiIioYb.mjs";
|
|
18
|
-
import { i as createAgentUsefulnessPagesFromMcp, n as analyzeAgentSurfaceDrift, r as analyzeAgentUsefulness, t as resolveGoldenEvaluationInput } from "./golden-evaluations-
|
|
18
|
+
import { i as createAgentUsefulnessPagesFromMcp, n as analyzeAgentSurfaceDrift, r as analyzeAgentUsefulness, t as resolveGoldenEvaluationInput } from "./golden-evaluations-VzE6juQl.mjs";
|
|
19
19
|
import { existsSync, lstatSync, readFileSync, readdirSync } from "node:fs";
|
|
20
20
|
import path from "node:path";
|
|
21
21
|
import { LATEST_PROTOCOL_VERSION } from "@modelcontextprotocol/sdk/types.js";
|
|
@@ -1029,18 +1029,52 @@ async function probeMcpRoute(baseUrl, route, expectedTools) {
|
|
|
1029
1029
|
detail: `${route} initialize returned HTTP ${initializeResponse.status}: ${String(initializePayload.error?.message ?? "unknown MCP error")}.`
|
|
1030
1030
|
};
|
|
1031
1031
|
const sessionId = initializeResponse.headers.get("mcp-session-id") ?? void 0;
|
|
1032
|
-
|
|
1032
|
+
await postMcpJson(baseUrl, route, {
|
|
1033
1033
|
jsonrpc: "2.0",
|
|
1034
1034
|
method: "notifications/initialized",
|
|
1035
1035
|
params: {}
|
|
1036
1036
|
}, sessionId).catch(() => void 0);
|
|
1037
|
-
const
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1037
|
+
const toolNames = /* @__PURE__ */ new Set();
|
|
1038
|
+
const seenCursors = /* @__PURE__ */ new Set();
|
|
1039
|
+
let cursor;
|
|
1040
|
+
let toolsListError;
|
|
1041
|
+
let completedToolsList = false;
|
|
1042
|
+
for (let page = 0; page < 20; page += 1) {
|
|
1043
|
+
const toolsResponse = await postMcpJson(baseUrl, route, {
|
|
1044
|
+
jsonrpc: "2.0",
|
|
1045
|
+
id: `doctor-tools-list-${page + 1}`,
|
|
1046
|
+
method: "tools/list",
|
|
1047
|
+
params: cursor !== void 0 ? { cursor } : {}
|
|
1048
|
+
}, sessionId);
|
|
1049
|
+
const toolsPayload = await parseMcpResponse(toolsResponse);
|
|
1050
|
+
if (!toolsResponse.ok || toolsPayload.error) {
|
|
1051
|
+
toolsListError = {
|
|
1052
|
+
status: toolsResponse.status,
|
|
1053
|
+
message: String(toolsPayload.error?.message ?? "unknown MCP error")
|
|
1054
|
+
};
|
|
1055
|
+
break;
|
|
1056
|
+
}
|
|
1057
|
+
const result = toolsPayload.result;
|
|
1058
|
+
for (const tool of result?.tools ?? []) if (typeof tool.name === "string") toolNames.add(tool.name);
|
|
1059
|
+
const nextCursor = result?.nextCursor;
|
|
1060
|
+
if (nextCursor === void 0) {
|
|
1061
|
+
completedToolsList = true;
|
|
1062
|
+
break;
|
|
1063
|
+
}
|
|
1064
|
+
if (typeof nextCursor !== "string" || seenCursors.has(nextCursor)) {
|
|
1065
|
+
toolsListError = {
|
|
1066
|
+
status: toolsResponse.status,
|
|
1067
|
+
message: "server returned an invalid or repeated pagination cursor"
|
|
1068
|
+
};
|
|
1069
|
+
break;
|
|
1070
|
+
}
|
|
1071
|
+
seenCursors.add(nextCursor);
|
|
1072
|
+
cursor = nextCursor;
|
|
1073
|
+
}
|
|
1074
|
+
if (!completedToolsList && !toolsListError) toolsListError = {
|
|
1075
|
+
status: 200,
|
|
1076
|
+
message: "server exceeded the 20-page tools/list safety limit"
|
|
1077
|
+
};
|
|
1044
1078
|
if (sessionId) await fetchWithTimeout(joinDoctorUrl(baseUrl, route), {
|
|
1045
1079
|
method: "DELETE",
|
|
1046
1080
|
headers: {
|
|
@@ -1048,20 +1082,18 @@ async function probeMcpRoute(baseUrl, route, expectedTools) {
|
|
|
1048
1082
|
"mcp-session-id": sessionId
|
|
1049
1083
|
}
|
|
1050
1084
|
}).catch(() => void 0);
|
|
1051
|
-
if (
|
|
1085
|
+
if (toolsListError) return {
|
|
1052
1086
|
ok: false,
|
|
1053
|
-
detail: `${route} tools/list returned HTTP ${
|
|
1087
|
+
detail: `${route} tools/list returned HTTP ${toolsListError.status}: ${toolsListError.message}.`
|
|
1054
1088
|
};
|
|
1055
|
-
const
|
|
1056
|
-
const toolNames = Array.isArray(tools) ? tools.map((tool) => tool.name).filter((name) => typeof name === "string") : [];
|
|
1057
|
-
const missingTools = expectedTools.filter((tool) => !toolNames.includes(tool));
|
|
1089
|
+
const missingTools = expectedTools.filter((tool) => !toolNames.has(tool));
|
|
1058
1090
|
if (missingTools.length > 0) return {
|
|
1059
1091
|
ok: false,
|
|
1060
1092
|
detail: `${route} connected but is missing tools: ${missingTools.join(", ")}.`
|
|
1061
1093
|
};
|
|
1062
1094
|
return {
|
|
1063
1095
|
ok: true,
|
|
1064
|
-
detail: `${route} initialized ${sessionId ? "with a session" : "statelessly"} and exposed ${toolNames.
|
|
1096
|
+
detail: `${route} initialized ${sessionId ? "with a session" : "statelessly"} and exposed ${toolNames.size} MCP tool${toolNames.size === 1 ? "" : "s"}.`
|
|
1065
1097
|
};
|
|
1066
1098
|
} catch (error) {
|
|
1067
1099
|
return {
|
|
@@ -1416,6 +1448,7 @@ function hostedMcpRoutes(discoveryBody) {
|
|
|
1416
1448
|
const MCP_DISCOVERY_TOOL_NAMES = [
|
|
1417
1449
|
["listDocs", "list_docs"],
|
|
1418
1450
|
["listPages", "list_pages"],
|
|
1451
|
+
["listPageSections", "list_page_sections"],
|
|
1419
1452
|
["listTasks", "list_tasks"],
|
|
1420
1453
|
["readTask", "read_task"],
|
|
1421
1454
|
["getNavigation", "get_navigation"],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Ot as findDocsAudienceMdxTags, jt as resolveDocsAudienceMdxContent } from "./agent-
|
|
1
|
+
import { Ot as findDocsAudienceMdxTags, jt as resolveDocsAudienceMdxContent } from "./agent-SRIJ-oF8.mjs";
|
|
2
2
|
import { _ as hasStructuredPageAgentContract, v as normalizePageAgentFrontmatter } from "./markdown-sections-7OoA7ylx.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { E as normalizeAgentFramework, T as agentVersionConstraintsOverlap, k as normalizeAgentVersion } from "./search-Da2AKaFJ.mjs";
|
|
4
4
|
import { t as extractCodeBlocksFromMarkdown } from "./code-blocks-DnNVNK2M.mjs";
|
|
5
5
|
import { existsSync, lstatSync, readFileSync, readdirSync } from "node:fs";
|
|
6
6
|
import path from "node:path";
|
|
@@ -1700,7 +1700,11 @@ function analyzeAgentSurfaceDrift(options) {
|
|
|
1700
1700
|
"package",
|
|
1701
1701
|
"tags"
|
|
1702
1702
|
]],
|
|
1703
|
-
["search.warningsField", "warnings"]
|
|
1703
|
+
["search.warningsField", "warnings"],
|
|
1704
|
+
["search.cursorParam", "cursor"],
|
|
1705
|
+
["search.nextCursorField", "nextCursor"],
|
|
1706
|
+
["search.hasMoreField", "hasMore"],
|
|
1707
|
+
["search.totalField", "total"]
|
|
1704
1708
|
]) compareExpectedValue(issues, options.discovery, "search-scope-mismatch", path, expected, `Discovery ${path}`);
|
|
1705
1709
|
compareExpectedValue(issues, options.discovery, "mcp-enabled-mismatch", "mcp.enabled", options.expected.mcp.enabled, "Discovery mcp.enabled");
|
|
1706
1710
|
compareExpectedValue(issues, options.discovery, "mcp-capability-mismatch", "capabilities.mcp", options.expected.mcp.enabled, "Discovery capabilities.mcp");
|