@farming-labs/docs 0.2.81 → 0.2.83
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-DEjfHgU-.d.mts → agent-WS4GXGh6.d.mts} +2 -2
- package/dist/{agent-evals-CGOA7jJ0.mjs → agent-evals-Burrzyam.mjs} +18 -3
- package/dist/{agent-export-BYWO6fES.mjs → agent-export-whKAZQUI.mjs} +4 -4
- package/dist/agent-skills-bundle.d.mts +1 -1
- package/dist/{agent-skills-server-B2EXn2QD.mjs → agent-skills-server-D5qYU19g.mjs} +16 -7
- package/dist/{agent-skills-server-CclBBz1M.d.mts → agent-skills-server-q4B9kRGg.d.mts} +2 -2
- package/dist/agent-skills-vite.d.mts +3 -3
- package/dist/agent-skills-vite.mjs +1 -1
- package/dist/{agents-CDs7ZFdb.mjs → agents-B_980VCs.mjs} +3 -3
- package/dist/cli/index.mjs +12 -12
- package/dist/client/react.d.mts +1 -1
- package/dist/{cloud-ask-ai-AUhHTMe6.d.mts → cloud-ask-ai-BQAeHkpZ.d.mts} +1 -1
- package/dist/{codeblocks-CFuurVIH.mjs → codeblocks-CPA6Ae5r.mjs} +1 -1
- package/dist/docs-cloud-server.d.mts +2 -2
- package/dist/docs-cloud-server.mjs +1 -1
- package/dist/{doctor-CALb10jP.mjs → doctor-WjuyRWYT.mjs} +26 -9
- package/dist/{golden-evaluations-I9yRlYJy.mjs → golden-evaluations-B2GHnoFa.mjs} +306 -2
- package/dist/index.d.mts +5 -5
- package/dist/{mcp-DUxk8lGS.mjs → mcp-bhIsgqxy.mjs} +3 -3
- package/dist/mcp.d.mts +3 -3
- package/dist/mcp.mjs +64 -12
- package/dist/{retrieval-digest-D0pnOmQ8.d.mts → retrieval-digest-DRRHA1B3.d.mts} +2 -2
- package/dist/{review-CaDaE4Pq.mjs → review-2e4TXoGS.mjs} +69 -8
- package/dist/{search-D7s_gagx.mjs → search-DfB3LQ4s.mjs} +3 -3
- package/dist/server.d.mts +5 -5
- package/dist/server.mjs +4 -4
- package/dist/{sitemap-BMRfmpEp.mjs → sitemap-AcwP8jIo.mjs} +3 -3
- package/dist/{standards-discovery-BWz35hS6.d.mts → standards-discovery-DPUEcUmb.d.mts} +1 -1
- package/dist/{types-CoohpxFz.d.mts → types-lGEHcx_6.d.mts} +39 -1
- package/package.json +1 -1
- /package/dist/{cloud-ask-ai-sbpjOR2K.mjs → cloud-ask-ai-BRBK4RBG.mjs} +0 -0
- /package/dist/{code-blocks-DnNVNK2M.mjs → code-blocks-0wjOsqdJ.mjs} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $n as
|
|
2
|
-
import { O as DocsA2AAgentCardOptions, R as DocsDiscoveryApiRouteOptions, z as DocsPublishedAgentSkill } from "./standards-discovery-
|
|
1
|
+
import { $n as LlmsTxtConfig, An as DocsSearchFilterInput, Bn as DocsSitemapConfig, Cn as DocsSearchConfig, F as DocsAgentContentChangesConfig, Fn as DocsSearchResult, K as DocsAgentFeedbackData, Ln as DocsSearchSourcePage, Mt as DocsConfig, Nn as DocsSearchRequest, On as DocsSearchFacetsResponse, Pr as TypesenseDocsSearchConfig, Rt as DocsContentChangesResponse, Sn as DocsSearchChunkingConfig, Ut as DocsI18nConfig, Yn as FeedbackConfig, Yt as DocsMcpConfig, bn as DocsSearchAdapterFactory, er as LlmsTxtMaxCharsConfig, f as CustomDocsSearchConfig, gn as DocsRobotsConfig, gr as PageAgentFrontmatter, jn as DocsSearchFilters, kn as DocsSearchFilterField, nr as LlmsTxtSectionConfig, on as DocsPaginatedSearchResponse, r as AlgoliaDocsSearchConfig, rr as McpDocsSearchConfig, tr as LlmsTxtMaxCharsMode, vn as DocsSearchAdapter, vt as DocsAskAIMcpConfig, wn as DocsSearchDocument, wr as ResolvedDocsRelatedLink, zt as DocsContentSnapshot } from "./types-lGEHcx_6.mjs";
|
|
2
|
+
import { O as DocsA2AAgentCardOptions, R as DocsDiscoveryApiRouteOptions, z as DocsPublishedAgentSkill } from "./standards-discovery-DPUEcUmb.mjs";
|
|
3
3
|
import { DocsMcpPage, DocsMcpResolvedConfig } from "./mcp.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/i18n.d.ts
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { An as normalizeAgentFramework, Dn as agentVersionConstraintGroupsOverlap, Mn as normalizeAgentScopeValues, Nn as normalizeAgentVersion, On as agentVersionConstraintMatches, Zt as buildDocsAskAIContext, bn as resolveSearchRequestConfig, dn as performDocsSearch, jn as normalizeAgentLocale, kn as agentVersionConstraintsOverlap, un as normalizeDocsSearchFilters } from "./agent-Dze2Cy5B.mjs";
|
|
2
2
|
import { S as upsertPageAgentContractMarkdown, l as stripDocsGeneratedAgentContractMarkers, o as findDocsMarkdownSection } from "./markdown-sections-7OoA7ylx.mjs";
|
|
3
|
+
import { t as getDocsAgentSkillsConfiguredPaths } from "./agent-skills-server-D5qYU19g.mjs";
|
|
3
4
|
import { buildDocsMcpContext } from "./mcp.mjs";
|
|
4
|
-
import { i as validateCodeBlockPlans, n as planCodeBlockTargets, r as resolveDocsCodeBlocksValidateConfig, t as extractCodeBlocksFromMarkdown } from "./code-blocks-
|
|
5
|
+
import { i as validateCodeBlockPlans, n as planCodeBlockTargets, r as resolveDocsCodeBlocksValidateConfig, t as extractCodeBlocksFromMarkdown } from "./code-blocks-0wjOsqdJ.mjs";
|
|
5
6
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
6
7
|
import { dirname, isAbsolute, join, relative } from "node:path";
|
|
7
8
|
import { createJiti } from "jiti";
|
|
@@ -27,7 +28,8 @@ const DEFAULT_REVIEW_RULES = {
|
|
|
27
28
|
relatedCoverage: "suggestion",
|
|
28
29
|
configConfidence: "warn",
|
|
29
30
|
agentSurfaceDrift: "error",
|
|
30
|
-
goldenTasks: "warn"
|
|
31
|
+
goldenTasks: "warn",
|
|
32
|
+
agentSkills: "warn"
|
|
31
33
|
};
|
|
32
34
|
const DEFAULT_REVIEW_WEIGHTS = {
|
|
33
35
|
error: 20,
|
|
@@ -228,10 +230,23 @@ function buildDocsReviewWorkflowPathFilters(options) {
|
|
|
228
230
|
prefixPath(projectPrefix, "src/content/docs/**"),
|
|
229
231
|
prefixPath(projectPrefix, "src/lib/docs.config.*"),
|
|
230
232
|
DEFAULT_DOCS_REVIEW_WORKFLOW_PATH,
|
|
231
|
-
DEFAULT_DOCS_REVIEW_REUSABLE_WORKFLOW_PATH
|
|
233
|
+
DEFAULT_DOCS_REVIEW_REUSABLE_WORKFLOW_PATH,
|
|
234
|
+
...buildAgentSkillPathFilters({
|
|
235
|
+
rootDir: options.rootDir,
|
|
236
|
+
repoRoot,
|
|
237
|
+
skills: options.config?.agent?.skills
|
|
238
|
+
})
|
|
232
239
|
];
|
|
233
240
|
return Array.from(new Set(candidates.filter((candidate) => Boolean(candidate))));
|
|
234
241
|
}
|
|
242
|
+
function buildAgentSkillPathFilters(options) {
|
|
243
|
+
return getDocsAgentSkillsConfiguredPaths(options.skills).map((configuredPath) => {
|
|
244
|
+
const absolutePath = isAbsolute(configuredPath) ? configuredPath : join(options.rootDir, configuredPath);
|
|
245
|
+
const repoRelative = toPosixPath(relative(options.repoRoot, absolutePath));
|
|
246
|
+
if (!repoRelative || repoRelative.startsWith("../")) return void 0;
|
|
247
|
+
return repoRelative.endsWith("/SKILL.md") || repoRelative === "SKILL.md" ? repoRelative : `${repoRelative.replace(/\/+$/u, "")}/**`;
|
|
248
|
+
}).filter((candidate) => Boolean(candidate));
|
|
249
|
+
}
|
|
235
250
|
function normalizeRules(rules) {
|
|
236
251
|
if (!rules) return {};
|
|
237
252
|
const knownRules = new Set(Object.keys(DEFAULT_REVIEW_RULES));
|
|
@@ -5,17 +5,17 @@ import "./content-change-hydration-DpQ0KdAD.mjs";
|
|
|
5
5
|
import { t as resolveDocsI18n } from "./i18n-hHVWcflJ.mjs";
|
|
6
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-D96X6eVX.mjs";
|
|
7
7
|
import "./sitemap-server-BefXEox6.mjs";
|
|
8
|
-
import "./agent-
|
|
8
|
+
import { r as resolveConfiguredAgentSkills } from "./agent-skills-server-D5qYU19g.mjs";
|
|
9
|
+
import "./agent-evals-Burrzyam.mjs";
|
|
9
10
|
import { createFilesystemDocsMcpSource, resolveDocsMcpConfig } from "./mcp.mjs";
|
|
10
|
-
import "./code-blocks-
|
|
11
|
-
import { t as resolveConfiguredAgentSkills } from "./agent-skills-server-B2EXn2QD.mjs";
|
|
11
|
+
import "./code-blocks-0wjOsqdJ.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";
|
|
15
15
|
import { existsSync, lstatSync, mkdirSync, readFileSync, realpathSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
16
16
|
import path from "node:path";
|
|
17
|
-
import { execFileSync } from "node:child_process";
|
|
18
17
|
import { createHash, randomUUID } from "node:crypto";
|
|
18
|
+
import { execFileSync } from "node:child_process";
|
|
19
19
|
import pc from "picocolors";
|
|
20
20
|
|
|
21
21
|
//#region src/cli/agent-export.ts
|
|
@@ -47,7 +47,7 @@ async function findWorkspaceRootAsync(rootDir) {
|
|
|
47
47
|
current = parent;
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function getDocsAgentSkillsConfiguredPaths(input) {
|
|
51
51
|
if (!input) return [];
|
|
52
52
|
const value = typeof input === "string" || Array.isArray(input) ? input : input.paths;
|
|
53
53
|
return (typeof value === "string" ? [value] : [...value]).map((candidate) => candidate.trim()).filter(Boolean);
|
|
@@ -390,9 +390,14 @@ function validateAndSortSkills(published) {
|
|
|
390
390
|
}
|
|
391
391
|
return published.sort((left, right) => left.name.localeCompare(right.name));
|
|
392
392
|
}
|
|
393
|
-
/**
|
|
394
|
-
|
|
395
|
-
|
|
393
|
+
/**
|
|
394
|
+
* Resolve configured SKILL.md files without parsing or packaging their contents.
|
|
395
|
+
*
|
|
396
|
+
* Diagnostics use this path-only form so broken references and invalid frontmatter
|
|
397
|
+
* can be reported independently instead of publication failing at the first skill.
|
|
398
|
+
*/
|
|
399
|
+
function resolveConfiguredAgentSkillPathsSync(input, options = {}) {
|
|
400
|
+
const configuredPaths = getDocsAgentSkillsConfiguredPaths(input);
|
|
396
401
|
if (configuredPaths.length === 0) return [];
|
|
397
402
|
const rootDir = realpathSync(options.rootDir ?? process.cwd());
|
|
398
403
|
const workspaceRoot = realpathSync(options.workspaceRoot ?? findWorkspaceRoot(rootDir));
|
|
@@ -400,11 +405,15 @@ function resolveConfiguredAgentSkillsSync(input, options = {}) {
|
|
|
400
405
|
const documents = /* @__PURE__ */ new Set();
|
|
401
406
|
const visited = /* @__PURE__ */ new Set();
|
|
402
407
|
for (const configuredPath of configuredPaths) collectSkillDocuments(resolveSafeConfiguredPath(configuredPath, rootDir, workspaceRoot), workspaceRoot, documents, visited);
|
|
403
|
-
return
|
|
408
|
+
return [...documents].sort();
|
|
409
|
+
}
|
|
410
|
+
/** Resolve and safely package all project skills configured through `agent.skills` synchronously. */
|
|
411
|
+
function resolveConfiguredAgentSkillsSync(input, options = {}) {
|
|
412
|
+
return validateAndSortSkills(resolveConfiguredAgentSkillPathsSync(input, options).map(publishSkillDocumentSync));
|
|
404
413
|
}
|
|
405
414
|
/** Resolve and package configured skills without blocking runtime filesystem or compression work. */
|
|
406
415
|
async function resolveConfiguredAgentSkills(input, options = {}) {
|
|
407
|
-
const configuredPaths =
|
|
416
|
+
const configuredPaths = getDocsAgentSkillsConfiguredPaths(input);
|
|
408
417
|
if (configuredPaths.length === 0) return [];
|
|
409
418
|
const rootDir = await realpath(options.rootDir ?? process.cwd());
|
|
410
419
|
const workspaceRoot = options.workspaceRoot === void 0 ? await findWorkspaceRootAsync(rootDir) : await realpath(options.workspaceRoot);
|
|
@@ -416,4 +425,4 @@ async function resolveConfiguredAgentSkills(input, options = {}) {
|
|
|
416
425
|
}
|
|
417
426
|
|
|
418
427
|
//#endregion
|
|
419
|
-
export { resolveConfiguredAgentSkillsSync as n, resolveConfiguredAgentSkills as t };
|
|
428
|
+
export { resolveConfiguredAgentSkillsSync as i, resolveConfiguredAgentSkillPathsSync as n, resolveConfiguredAgentSkills as r, getDocsAgentSkillsConfiguredPaths as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { z as DocsPublishedAgentSkill } from "./standards-discovery-
|
|
1
|
+
import { tt as DocsAgentSkillsInput } from "./types-lGEHcx_6.mjs";
|
|
2
|
+
import { z as DocsPublishedAgentSkill } from "./standards-discovery-DPUEcUmb.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/agent-skills-server.d.ts
|
|
5
5
|
interface ResolveConfiguredAgentSkillsOptions {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { z as DocsPublishedAgentSkill } from "./standards-discovery-
|
|
3
|
-
import { t as ResolveConfiguredAgentSkillsOptions } from "./agent-skills-server-
|
|
1
|
+
import { tt as DocsAgentSkillsInput } from "./types-lGEHcx_6.mjs";
|
|
2
|
+
import { z as DocsPublishedAgentSkill } from "./standards-discovery-DPUEcUmb.mjs";
|
|
3
|
+
import { t as ResolveConfiguredAgentSkillsOptions } from "./agent-skills-server-q4B9kRGg.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
1
|
import "./standards-discovery-BKlEnK_H.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { r as resolveConfiguredAgentSkills } from "./agent-skills-server-D5qYU19g.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";
|
|
@@ -3,10 +3,10 @@ import "./markdown-sections-7OoA7ylx.mjs";
|
|
|
3
3
|
import "./standards-discovery-BKlEnK_H.mjs";
|
|
4
4
|
import "./content-change-hydration-DpQ0KdAD.mjs";
|
|
5
5
|
import { C as resolveApiReferenceOpenApiDiscovery } from "./sitemap-server-BefXEox6.mjs";
|
|
6
|
-
import "./agent-
|
|
6
|
+
import "./agent-skills-server-D5qYU19g.mjs";
|
|
7
|
+
import "./agent-evals-Burrzyam.mjs";
|
|
7
8
|
import { resolveDocsMcpConfig } from "./mcp.mjs";
|
|
8
|
-
import "./code-blocks-
|
|
9
|
-
import "./agent-skills-server-B2EXn2QD.mjs";
|
|
9
|
+
import "./code-blocks-0wjOsqdJ.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";
|
package/dist/cli/index.mjs
CHANGED
|
@@ -141,7 +141,7 @@ 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-bhIsgqxy.mjs");
|
|
145
145
|
await runMcp(mcpOptions);
|
|
146
146
|
} else if (parsedCommand.command === "agent" && subcommand === "compact") {
|
|
147
147
|
const { compactAgentDocs, parseAgentCompactArgs, printAgentCompactHelp } = await import("../agent-Biyd8A98.mjs").then((n) => n.t);
|
|
@@ -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-whKAZQUI.mjs");
|
|
156
156
|
const agentExportOptions = parseAgentExportArgs(args.slice(2));
|
|
157
157
|
if (agentExportOptions.help) {
|
|
158
158
|
printAgentExportHelp();
|
|
@@ -163,12 +163,12 @@ async function main() {
|
|
|
163
163
|
console.error(pc.red(`Unknown agent subcommand: ${subcommand ?? "(missing)"}`));
|
|
164
164
|
console.error();
|
|
165
165
|
const { printAgentCompactHelp } = await import("../agent-Biyd8A98.mjs").then((n) => n.t);
|
|
166
|
-
const { printAgentExportHelp } = await import("../agent-export-
|
|
166
|
+
const { printAgentExportHelp } = await import("../agent-export-whKAZQUI.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-B_980VCs.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-B_980VCs.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-WjuyRWYT.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-2e4TXoGS.mjs");
|
|
194
194
|
const reviewOptions = parseReviewArgs(args.slice(1));
|
|
195
195
|
if (reviewOptions.help) {
|
|
196
196
|
printReviewHelp();
|
|
@@ -198,7 +198,7 @@ async function main() {
|
|
|
198
198
|
}
|
|
199
199
|
await runReview(reviewOptions);
|
|
200
200
|
} else if ((parsedCommand.command === "codeblocks" || parsedCommand.command === "code-blocks") && subcommand === "validate") {
|
|
201
|
-
const { parseCodeBlocksValidateArgs, printCodeBlocksValidateHelp, runCodeBlocksValidate } = await import("../codeblocks-
|
|
201
|
+
const { parseCodeBlocksValidateArgs, printCodeBlocksValidateHelp, runCodeBlocksValidate } = await import("../codeblocks-CPA6Ae5r.mjs");
|
|
202
202
|
const codeBlocksOptions = parseCodeBlocksValidateArgs(args.slice(2));
|
|
203
203
|
if (codeBlocksOptions.help) {
|
|
204
204
|
printCodeBlocksValidateHelp();
|
|
@@ -208,11 +208,11 @@ async function main() {
|
|
|
208
208
|
} else if (parsedCommand.command === "codeblocks" || parsedCommand.command === "code-blocks") {
|
|
209
209
|
console.error(pc.red(`Unknown codeblocks subcommand: ${subcommand ?? "(missing)"}`));
|
|
210
210
|
console.error();
|
|
211
|
-
const { printCodeBlocksValidateHelp } = await import("../codeblocks-
|
|
211
|
+
const { printCodeBlocksValidateHelp } = await import("../codeblocks-CPA6Ae5r.mjs");
|
|
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-DfB3LQ4s.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-AcwP8jIo.mjs");
|
|
224
224
|
const sitemapOptions = parseSitemapGenerateArgs(args.slice(2));
|
|
225
225
|
if (sitemapOptions.help) {
|
|
226
226
|
printSitemapGenerateHelp();
|
|
@@ -230,7 +230,7 @@ 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-AcwP8jIo.mjs");
|
|
234
234
|
printSitemapGenerateHelp();
|
|
235
235
|
process.exit(1);
|
|
236
236
|
} else if (parsedCommand.command === "robots" && subcommand === "generate") {
|
package/dist/client/react.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bt as DocsCloudConfig, ot as DocsAnalyticsConfig, t as AIConfig } from "./types-lGEHcx_6.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/cloud-ask-ai.d.ts
|
|
4
4
|
interface DocsCloudAskAIConfig {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as validateCodeBlocks, r as resolveDocsCodeBlocksValidateConfig } from "./code-blocks-
|
|
1
|
+
import { a as validateCodeBlocks, r as resolveDocsCodeBlocksValidateConfig } from "./code-blocks-0wjOsqdJ.mjs";
|
|
2
2
|
import { _ as resolveDocsContentDir, a as loadDocsConfigModule, f as readNumberProperty, g as resolveDocsConfigPath, h as readTopLevelStringProperty, l as readBooleanProperty, p as readStringProperty, t as extractNestedObjectLiteral } from "./config-Wcdj-D0a.mjs";
|
|
3
3
|
import { existsSync, readFileSync } from "node:fs";
|
|
4
4
|
import pc from "picocolors";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as DocsCloudAskAIResponseOptions, t as DocsCloudAskAIConfig } from "./cloud-ask-ai-
|
|
1
|
+
import { ct as DocsAnalyticsEventInput, ot as DocsAnalyticsConfig, st as DocsAnalyticsEvent } from "./types-lGEHcx_6.mjs";
|
|
2
|
+
import { n as DocsCloudAskAIResponseOptions, t as DocsCloudAskAIConfig } from "./cloud-ask-ai-BQAeHkpZ.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,5 +1,5 @@
|
|
|
1
1
|
import { n as sendDocsCloudAnalyticsEvent } from "./cloud-analytics-CSyFE6SS.mjs";
|
|
2
|
-
import { t as createDocsCloudAskAIResponse } from "./cloud-ask-ai-
|
|
2
|
+
import { t as createDocsCloudAskAIResponse } from "./cloud-ask-ai-BRBK4RBG.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/docs-cloud-server.ts
|
|
5
5
|
const DEFAULT_DOCS_CLOUD_API_BASE_URL = "https://api.farming-labs.dev";
|
|
@@ -8,19 +8,19 @@ import "./content-change-hydration-DpQ0KdAD.mjs";
|
|
|
8
8
|
import { a as analyzeDocsRobotsTxt, n as DEFAULT_ROBOTS_TXT_ROUTE, u as resolveDocsRobotsConfig } from "./robots-D96X6eVX.mjs";
|
|
9
9
|
import { a as resolveDocsMetadataBaseUrl } from "./metadata-N252j5_a.mjs";
|
|
10
10
|
import "./sitemap-server-BefXEox6.mjs";
|
|
11
|
-
import {
|
|
11
|
+
import { r as resolveConfiguredAgentSkills } from "./agent-skills-server-D5qYU19g.mjs";
|
|
12
|
+
import { t as runDocsGoldenTasks } from "./agent-evals-Burrzyam.mjs";
|
|
12
13
|
import { createFilesystemDocsMcpSource, getDocsConfigSchema, resolveDocsMcpConfig } from "./mcp.mjs";
|
|
13
|
-
import "./code-blocks-
|
|
14
|
-
import { t as resolveConfiguredAgentSkills } from "./agent-skills-server-B2EXn2QD.mjs";
|
|
14
|
+
import "./code-blocks-0wjOsqdJ.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 {
|
|
18
|
+
import { a as createAgentUsefulnessPagesFromMcp, i as analyzeAgentUsefulness, n as analyzeConfiguredAgentSkillsProgressiveDisclosure, r as analyzeAgentSurfaceDrift, t as resolveGoldenEvaluationInput } from "./golden-evaluations-B2GHnoFa.mjs";
|
|
19
19
|
import { existsSync, lstatSync, readFileSync, readdirSync } from "node:fs";
|
|
20
20
|
import path from "node:path";
|
|
21
|
-
import { LATEST_PROTOCOL_VERSION } from "@modelcontextprotocol/server";
|
|
22
21
|
import { createHash } from "node:crypto";
|
|
23
22
|
import { gunzipSync } from "node:zlib";
|
|
23
|
+
import { LATEST_PROTOCOL_VERSION } from "@modelcontextprotocol/server";
|
|
24
24
|
import pc from "picocolors";
|
|
25
25
|
|
|
26
26
|
//#region src/cli/doctor.ts
|
|
@@ -606,6 +606,7 @@ function navigationScore(navigationCoverage) {
|
|
|
606
606
|
const AGENT_OPTIMIZATION_BLOCKING_CHECKS = new Set([
|
|
607
607
|
"surface-drift",
|
|
608
608
|
"agent-skills-frontmatter",
|
|
609
|
+
"agent-skills-progressive-disclosure",
|
|
609
610
|
"agent-context-quality",
|
|
610
611
|
"agent-task-completeness",
|
|
611
612
|
"agent-applicability",
|
|
@@ -1680,11 +1681,20 @@ async function inspectAgentReadiness(options = {}) {
|
|
|
1680
1681
|
const config = configLoad.status === "evaluated" ? configLoad.config : void 0;
|
|
1681
1682
|
let configuredAgentSkillNames;
|
|
1682
1683
|
let configuredAgentSkillsError;
|
|
1684
|
+
let configuredAgentSkillsDisclosure;
|
|
1685
|
+
let configuredAgentSkillsDisclosureError;
|
|
1683
1686
|
const configuredAgentSkills = config?.agent?.skills;
|
|
1684
|
-
if (configuredAgentSkills)
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1687
|
+
if (configuredAgentSkills) {
|
|
1688
|
+
try {
|
|
1689
|
+
configuredAgentSkillNames = (await resolveConfiguredAgentSkills(configuredAgentSkills, { rootDir })).map((skill) => skill.name);
|
|
1690
|
+
} catch (error) {
|
|
1691
|
+
configuredAgentSkillsError = error instanceof Error ? error.message : String(error);
|
|
1692
|
+
}
|
|
1693
|
+
try {
|
|
1694
|
+
configuredAgentSkillsDisclosure = analyzeConfiguredAgentSkillsProgressiveDisclosure(configuredAgentSkills, { rootDir });
|
|
1695
|
+
} catch (error) {
|
|
1696
|
+
configuredAgentSkillsDisclosureError = error instanceof Error ? error.message : String(error);
|
|
1697
|
+
}
|
|
1688
1698
|
}
|
|
1689
1699
|
const entry = config?.entry ?? readTopLevelStringProperty(configContent, "entry") ?? "docs";
|
|
1690
1700
|
const contentDir = config?.contentDir ?? resolveDocsContentDir(rootDir, configContent, entry);
|
|
@@ -1812,6 +1822,13 @@ async function inspectAgentReadiness(options = {}) {
|
|
|
1812
1822
|
const checks = [];
|
|
1813
1823
|
checks.push(makeCheck("config", "Docs config", configLoad.status === "evaluated" ? "pass" : "warn", configLoad.status === "evaluated" ? 10 : 2, configCheckMax, configLoad.status === "evaluated" ? `Resolved ${path.relative(rootDir, configLoad.path).replace(/\\/g, "/")} and evaluated the config module.` : `Resolved ${path.relative(rootDir, configPath).replace(/\\/g, "/")} using static parsing fallback.`, configLoad.status === "evaluated" ? void 0 : "Fix docs.config module evaluation before relying on resolved diagnostic scores."));
|
|
1814
1824
|
checks.push(makeCheck("agent-skills-frontmatter", "Configured Agent Skills frontmatter", configLoad.status !== "evaluated" ? "warn" : configuredAgentSkillsError ? "fail" : "pass", configLoad.status === "evaluated" && !configuredAgentSkillsError ? 1 : 0, 1, configLoad.status !== "evaluated" ? "Not verified because docs.config could not be evaluated." : configuredAgentSkillsError ? configuredAgentSkillsError : configuredAgentSkillNames ? `${configuredAgentSkillNames.length} configured Agent Skill${configuredAgentSkillNames.length === 1 ? "" : "s"} passed full frontmatter validation: ${configuredAgentSkillNames.join(", ")}.` : "No configured Agent Skills require validation.", configuredAgentSkillsError ? "Fix every configured SKILL.md field reported here before building or publishing the docs site." : void 0));
|
|
1825
|
+
const skillDisclosureIssues = configuredAgentSkillsDisclosure?.issues ?? [];
|
|
1826
|
+
const skillDisclosureHasErrors = skillDisclosureIssues.some((issue) => issue.severity === "error");
|
|
1827
|
+
const skillDisclosureStatus = configLoad.status !== "evaluated" ? "warn" : configuredAgentSkillsDisclosureError ? "fail" : skillDisclosureHasErrors ? "fail" : skillDisclosureIssues.length > 0 ? "warn" : "pass";
|
|
1828
|
+
const skillDisclosureDetail = configLoad.status !== "evaluated" ? "Not verified because docs.config could not be evaluated." : configuredAgentSkillsDisclosureError ? configuredAgentSkillsDisclosureError : configuredAgentSkillsDisclosure ? skillDisclosureIssues.length === 0 ? `${configuredAgentSkillsDisclosure.skills.length} configured Agent Skill${configuredAgentSkillsDisclosure.skills.length === 1 ? "" : "s"} stay within line/token budgets, use resolvable shallow references, declare required compatibility, and document bundled scripts.` : `${skillDisclosureIssues.length} progressive-disclosure issue${skillDisclosureIssues.length === 1 ? "" : "s"} across ${configuredAgentSkillsDisclosure.skills.length} configured skill${configuredAgentSkillsDisclosure.skills.length === 1 ? "" : "s"}: ${skillDisclosureIssues.slice(0, 4).map((issue) => {
|
|
1829
|
+
return `${path.relative(rootDir, issue.filePath).replace(/\\/g, "/")}${issue.line ? `:${issue.line}` : ""} ${issue.message}`;
|
|
1830
|
+
}).join(" ")}${skillDisclosureIssues.length > 4 ? ` (+${skillDisclosureIssues.length - 4} more)` : ""}` : "No configured Agent Skills require progressive-disclosure analysis.";
|
|
1831
|
+
checks.push(makeCheck("agent-skills-progressive-disclosure", "Agent Skills progressive disclosure", skillDisclosureStatus, skillDisclosureStatus === "pass" ? 5 : skillDisclosureStatus === "warn" ? 2 : 0, 5, skillDisclosureDetail, skillDisclosureStatus === "pass" ? void 0 : "Keep SKILL.md under its configured line and instruction-token budgets, repair local references, keep reference chains shallow, declare compatibility requirements, and document script dependencies and validation."));
|
|
1815
1832
|
const canScoreSurfaceDrift = configLoad.status === "evaluated";
|
|
1816
1833
|
checks.push(makeCheck("surface-drift", "Discovery/config/schema consistency", !canScoreSurfaceDrift ? "warn" : surfaceDrift.length === 0 ? "pass" : "fail", !canScoreSurfaceDrift ? 0 : surfaceDrift.length === 0 ? 10 : Math.max(0, 10 - surfaceDrift.length * 2), 10, !canScoreSurfaceDrift ? "Not scored because docs.config could not be evaluated; static parsing cannot prove discovery/config/schema consistency." : surfaceDrift.length === 0 ? "Resolved config, discovery metadata, MCP tool flags, config schema, and agent contract fields agree." : surfaceDrift.slice(0, 3).map((issue) => issue.message).join(" "), canScoreSurfaceDrift && surfaceDrift.length === 0 ? void 0 : canScoreSurfaceDrift ? "Align docs config, agent discovery (including API catalog and Agent Skills routes), MCP tools, config schema, and the canonical page agent contract before publishing." : "Fix docs.config module evaluation so doctor can compare resolved config with discovery and schema surfaces."));
|
|
1817
1834
|
const dynamicStaticFallback = configLoad.status === "static-fallback" && /(?:\.\.\.|process\.env|import\.meta\.env|\[[^\]]+\]\s*:|:\s*[A-Za-z_$][\w$]*\s*[,}])/u.test(configContent);
|