@farming-labs/docs 0.2.106 → 0.2.108
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-CaCWThBY.mjs → agent--fSgaVIK.mjs} +207 -12
- package/dist/{agent-DCTGj6J7.mjs → agent-BDrflLmt.mjs} +1 -1
- package/dist/{agent-evals-D-sPJfXz.mjs → agent-evals-3m5FXStK.mjs} +26 -7
- package/dist/{agent-export-GcTZPLfB.mjs → agent-export-CSdby81L.mjs} +6 -6
- package/dist/agent-skills-bundle.d.mts +1 -1
- package/dist/{agent-skills-server-D34054x5.d.mts → agent-skills-server-CF6iVTBR.d.mts} +2 -2
- package/dist/agent-skills-vite.d.mts +3 -3
- package/dist/{agents-e1SYT64z.mjs → agents-DDt41QR8.mjs} +5 -5
- package/dist/{analytics-aeXwEvQX.d.mts → analytics-CwXxM9oL.d.mts} +1 -1
- package/dist/{authoring-Do87QzBd.mjs → authoring-ct8s0Z_X.mjs} +3 -3
- package/dist/{authoring-mcp-Be7quE5R.mjs → authoring-mcp-Wy-h93DM.mjs} +1 -1
- package/dist/browser.d.mts +2 -2
- package/dist/cli/index.d.mts +2 -1
- package/dist/cli/index.mjs +40 -28
- package/dist/client/react.d.mts +1 -1
- package/dist/{cloud-ask-ai-BqfiQaNZ.d.mts → cloud-ask-ai-C9dvEBpW.d.mts} +1 -1
- package/dist/{content-change-hydration-CoYRs3pC.d.mts → content-change-hydration-CDuohygf.d.mts} +2 -2
- package/dist/docs-cloud-server.d.mts +2 -2
- package/dist/{doctor-CtK1CRPj.mjs → doctor-DESIZy7v.mjs} +126 -30
- package/dist/{golden-evaluations-De4KwoYr.mjs → golden-evaluations-Dc06CZM-.mjs} +4 -1
- package/dist/index.d.mts +6 -6
- package/dist/index.mjs +4 -4
- package/dist/{mcp-DsjWxF7g.mjs → mcp-CC74oNj3.mjs} +5 -5
- package/dist/mcp.d.mts +3 -3
- package/dist/mcp.mjs +16 -2
- package/dist/{openapi-mcp-DQ3xptKo.mjs → openapi-mcp-CFWUsMUr.mjs} +1 -1
- package/dist/{prompt-references-1Wce71c7.mjs → prompt-references-DVhk8W6r.mjs} +2 -2
- package/dist/{retrieval-digest-DyNRD-mt.d.mts → retrieval-digest-VUlhYMUW.d.mts} +10 -3
- package/dist/{review-XI9FXeos.mjs → review-glShh1or.mjs} +4 -4
- package/dist/{robots-CzKesbdX.mjs → robots-D6RgVpll.mjs} +2 -2
- package/dist/{robots-BOjWB1ky.mjs → robots-dNbBnlVh.mjs} +1 -1
- package/dist/{search-DwAoC9X7.mjs → search-BOOiOwTS.mjs} +5 -5
- package/dist/server.d.mts +6 -6
- package/dist/server.mjs +5 -5
- package/dist/{sidebar-CJze8SBi.d.mts → sidebar-Bne72SU-.d.mts} +1 -1
- package/dist/{sitemap-DOaJIKJf.mjs → sitemap-Ck1YKSAJ.mjs} +5 -5
- package/dist/{sitemap-server-NeVu8W38.mjs → sitemap-server-BKNIqgvq.mjs} +1 -1
- package/dist/{skills-BILSESek.mjs → skills-Bucp3wjq.mjs} +5 -5
- package/dist/{standards-discovery-Xm84bS4M.d.mts → standards-discovery-CjyUCxdy.d.mts} +1 -1
- package/dist/{types-QhYMnKvb.d.mts → types-BkAk6B2d.d.mts} +13 -1
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { v as normalizePageAgentFrontmatter, x as stripGeneratedPageAgentContractMarkdown } from "./markdown-sections-BKy4labo.mjs";
|
|
2
|
-
import { V as findDocsMarkdownPage, ot as renderDocsMarkdownDocument } from "./agent-
|
|
3
|
-
import { d as GENERATED_AGENT_PROVENANCE_VERSION, f as hashGeneratedAgentContent, h as serializeGeneratedAgentDocument, m as parseGeneratedAgentDocument } from "./openapi-mcp-
|
|
2
|
+
import { V as findDocsMarkdownPage, ot as renderDocsMarkdownDocument } from "./agent-BDrflLmt.mjs";
|
|
3
|
+
import { d as GENERATED_AGENT_PROVENANCE_VERSION, f as hashGeneratedAgentContent, h as serializeGeneratedAgentDocument, m as parseGeneratedAgentDocument } from "./openapi-mcp-CFWUsMUr.mjs";
|
|
4
4
|
import { createFilesystemDocsMcpSource } from "./mcp.mjs";
|
|
5
5
|
import { _ as resolveDocsContentDir, a as loadDocsConfigModule, c as loadProjectEnv, d as readNavTitle, f as readNumberProperty, g as resolveDocsConfigPath, h as readTopLevelStringProperty, l as readBooleanProperty, p as readStringProperty, t as extractNestedObjectLiteral, u as readEnvReferenceProperty } from "./config-DrZ3fXgf.mjs";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
7
7
|
import matter from "gray-matter";
|
|
8
|
-
import { existsSync, mkdirSync, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs";
|
|
8
|
+
import { existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, renameSync, statSync, writeFileSync } from "node:fs";
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
import { execFileSync } from "node:child_process";
|
|
11
11
|
import pc from "picocolors";
|
|
@@ -29,8 +29,11 @@ var __exportAll = (all, no_symbols) => {
|
|
|
29
29
|
//#endregion
|
|
30
30
|
//#region src/cli/agent.ts
|
|
31
31
|
var agent_exports = /* @__PURE__ */ __exportAll({
|
|
32
|
+
AGENT_COMPACTION_REVIEW_MANIFEST_VERSION: () => AGENT_COMPACTION_REVIEW_MANIFEST_VERSION,
|
|
33
|
+
DEFAULT_AGENT_COMPACTION_REVIEW_MANIFEST_PATH: () => DEFAULT_AGENT_COMPACTION_REVIEW_MANIFEST_PATH,
|
|
32
34
|
compactAgentDocs: () => compactAgentDocs,
|
|
33
35
|
inspectAgentCompactionState: () => inspectAgentCompactionState,
|
|
36
|
+
loadAgentCompactionReviews: () => loadAgentCompactionReviews,
|
|
34
37
|
parseAgentCompactArgs: () => parseAgentCompactArgs,
|
|
35
38
|
printAgentCompactHelp: () => printAgentCompactHelp,
|
|
36
39
|
readPageTokenBudget: () => readPageTokenBudget,
|
|
@@ -40,11 +43,14 @@ const DEFAULT_COMPRESSION_BASE_URL = "https://api.farming-labs.dev";
|
|
|
40
43
|
const DEFAULT_COMPRESSION_MODEL = "docs-cloud-compress-v1";
|
|
41
44
|
const DEFAULT_COMPRESSION_AGGRESSIVENESS = .3;
|
|
42
45
|
const DEFAULT_DOCS_CLOUD_API_KEY_ENV = "DOCS_CLOUD_API_KEY";
|
|
46
|
+
const MAX_COMPRESSION_INPUT_CHARACTERS = 2e5;
|
|
43
47
|
const INDEX_PAGE_BASENAMES = new Set([
|
|
44
48
|
"index",
|
|
45
49
|
"page",
|
|
46
50
|
"+page"
|
|
47
51
|
]);
|
|
52
|
+
const DEFAULT_AGENT_COMPACTION_REVIEW_MANIFEST_PATH = ".farming-labs/agent-compaction-reviews.json";
|
|
53
|
+
const AGENT_COMPACTION_REVIEW_MANIFEST_VERSION = 1;
|
|
48
54
|
function parseBooleanFlag(raw) {
|
|
49
55
|
if (raw === "true") return true;
|
|
50
56
|
if (raw === "false") return false;
|
|
@@ -76,6 +82,14 @@ function parseAgentCompactArgs(argv) {
|
|
|
76
82
|
parsed.dryRun = true;
|
|
77
83
|
continue;
|
|
78
84
|
}
|
|
85
|
+
if (arg === "--check") {
|
|
86
|
+
parsed.check = true;
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
if (arg === "--review") {
|
|
90
|
+
parsed.review = true;
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
79
93
|
if (arg === "--changed") {
|
|
80
94
|
parsed.changed = true;
|
|
81
95
|
continue;
|
|
@@ -141,6 +155,15 @@ function parseAgentCompactArgs(argv) {
|
|
|
141
155
|
case "protect-json":
|
|
142
156
|
parsed.protectJson = parseBooleanFlag(value);
|
|
143
157
|
break;
|
|
158
|
+
case "reviewed-by":
|
|
159
|
+
parsed.reviewedBy = value;
|
|
160
|
+
break;
|
|
161
|
+
case "reason":
|
|
162
|
+
parsed.reviewReason = value;
|
|
163
|
+
break;
|
|
164
|
+
case "review-manifest":
|
|
165
|
+
parsed.reviewManifestPath = value;
|
|
166
|
+
break;
|
|
144
167
|
default: throw new Error(`Unknown agent compact flag: --${key}.`);
|
|
145
168
|
}
|
|
146
169
|
}
|
|
@@ -154,6 +177,80 @@ function normalizeUrlPath(value) {
|
|
|
154
177
|
if (normalized === "/") return normalized;
|
|
155
178
|
return normalized.replace(/\/+$/, "");
|
|
156
179
|
}
|
|
180
|
+
function resolveReviewManifestPath(rootDir, configuredPath) {
|
|
181
|
+
const relativePath = configuredPath?.trim() || DEFAULT_AGENT_COMPACTION_REVIEW_MANIFEST_PATH;
|
|
182
|
+
if (path.isAbsolute(relativePath)) throw new Error("Agent compaction reviewManifestPath must be project-relative.");
|
|
183
|
+
const resolved = path.resolve(rootDir, relativePath);
|
|
184
|
+
const relative = path.relative(rootDir, resolved);
|
|
185
|
+
if (relative.startsWith("..") || path.isAbsolute(relative)) throw new Error("Agent compaction reviewManifestPath must stay inside the project root.");
|
|
186
|
+
return resolved;
|
|
187
|
+
}
|
|
188
|
+
function normalizeReviewRecord(value, index) {
|
|
189
|
+
const pathLabel = `reviews[${index}]`;
|
|
190
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error(`${pathLabel} must be an object.`);
|
|
191
|
+
const record = value;
|
|
192
|
+
const readString = (key) => {
|
|
193
|
+
const field = record[key];
|
|
194
|
+
if (typeof field !== "string" || !field.trim()) throw new Error(`${pathLabel}.${key} must be a non-empty string.`);
|
|
195
|
+
return field.trim();
|
|
196
|
+
};
|
|
197
|
+
const route = normalizeUrlPath(readString("route"));
|
|
198
|
+
if (!route.startsWith("/") || route.includes("?") || route.includes("#")) throw new Error(`${pathLabel}.route must be an absolute docs route without query or hash.`);
|
|
199
|
+
const sourceHash = readString("sourceHash");
|
|
200
|
+
const settingsHash = readString("settingsHash");
|
|
201
|
+
const outputHash = readString("outputHash");
|
|
202
|
+
for (const [key, hash] of Object.entries({
|
|
203
|
+
sourceHash,
|
|
204
|
+
settingsHash,
|
|
205
|
+
outputHash
|
|
206
|
+
})) if (!/^fnv1a64:[0-9a-f]{16}$/u.test(hash)) throw new Error(`${pathLabel}.${key} must be an fnv1a64 content hash.`);
|
|
207
|
+
const reviewedAt = readString("reviewedAt");
|
|
208
|
+
if (!Number.isFinite(Date.parse(reviewedAt))) throw new Error(`${pathLabel}.reviewedAt must be an ISO-compatible timestamp.`);
|
|
209
|
+
return {
|
|
210
|
+
route,
|
|
211
|
+
sourceHash,
|
|
212
|
+
settingsHash,
|
|
213
|
+
outputHash,
|
|
214
|
+
reviewedAt,
|
|
215
|
+
reviewedBy: readString("reviewedBy"),
|
|
216
|
+
reason: readString("reason")
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
function loadAgentCompactionReviews(rootDir, configuredPath) {
|
|
220
|
+
const manifestPath = resolveReviewManifestPath(rootDir, configuredPath);
|
|
221
|
+
if (!existsSync(manifestPath)) return [];
|
|
222
|
+
const manifestStat = lstatSync(manifestPath);
|
|
223
|
+
if (manifestStat.isSymbolicLink() || !manifestStat.isFile()) throw new Error("Agent compaction review manifest must be a regular non-symlink file.");
|
|
224
|
+
let parsed;
|
|
225
|
+
try {
|
|
226
|
+
parsed = JSON.parse(readFileSync(manifestPath, "utf-8"));
|
|
227
|
+
} catch (error) {
|
|
228
|
+
throw new Error(`Could not parse agent compaction review manifest ${path.relative(rootDir, manifestPath)}: ${error instanceof Error ? error.message : String(error)}`);
|
|
229
|
+
}
|
|
230
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) throw new Error("Agent compaction review manifest must be a JSON object.");
|
|
231
|
+
const manifest = parsed;
|
|
232
|
+
if (manifest.version !== AGENT_COMPACTION_REVIEW_MANIFEST_VERSION) throw new Error(`Agent compaction review manifest version must be ${AGENT_COMPACTION_REVIEW_MANIFEST_VERSION}.`);
|
|
233
|
+
if (!Array.isArray(manifest.reviews)) throw new Error("Agent compaction review manifest reviews must be an array.");
|
|
234
|
+
const reviews = manifest.reviews.map(normalizeReviewRecord);
|
|
235
|
+
const routes = /* @__PURE__ */ new Set();
|
|
236
|
+
for (const review of reviews) {
|
|
237
|
+
if (routes.has(review.route)) throw new Error(`Agent compaction review route is duplicated: ${review.route}.`);
|
|
238
|
+
routes.add(review.route);
|
|
239
|
+
}
|
|
240
|
+
return reviews;
|
|
241
|
+
}
|
|
242
|
+
function writeAgentCompactionReviews(rootDir, configuredPath, reviews) {
|
|
243
|
+
const manifestPath = resolveReviewManifestPath(rootDir, configuredPath);
|
|
244
|
+
const manifest = {
|
|
245
|
+
version: AGENT_COMPACTION_REVIEW_MANIFEST_VERSION,
|
|
246
|
+
reviews: [...reviews].sort((left, right) => left.route.localeCompare(right.route))
|
|
247
|
+
};
|
|
248
|
+
mkdirSync(path.dirname(manifestPath), { recursive: true });
|
|
249
|
+
const temporaryPath = `${manifestPath}.tmp-${process.pid}`;
|
|
250
|
+
writeFileSync(temporaryPath, `${JSON.stringify(manifest, null, 2)}\n`, "utf-8");
|
|
251
|
+
renameSync(temporaryPath, manifestPath);
|
|
252
|
+
return manifestPath;
|
|
253
|
+
}
|
|
157
254
|
function normalizeRequestedPage(entry, rawValue) {
|
|
158
255
|
const trimmed = rawValue.trim();
|
|
159
256
|
if (!trimmed || trimmed === ".") return `/${normalizePathSegment(entry) || "docs"}`;
|
|
@@ -286,7 +383,8 @@ function readAgentCompactConfig(content) {
|
|
|
286
383
|
aggressiveness: readNumberProperty(compactBlock, "aggressiveness"),
|
|
287
384
|
maxOutputTokens: readNumberProperty(compactBlock, "maxOutputTokens"),
|
|
288
385
|
minOutputTokens: readNumberProperty(compactBlock, "minOutputTokens"),
|
|
289
|
-
protectJson: readBooleanProperty(compactBlock, "protectJson")
|
|
386
|
+
protectJson: readBooleanProperty(compactBlock, "protectJson"),
|
|
387
|
+
reviewManifestPath: readStringProperty(compactBlock, "reviewManifestPath")
|
|
290
388
|
};
|
|
291
389
|
}
|
|
292
390
|
function readCloudApiKeyConfigFromModule(config) {
|
|
@@ -304,7 +402,8 @@ function readAgentCompactConfigFromModule(config) {
|
|
|
304
402
|
aggressiveness: compact.aggressiveness,
|
|
305
403
|
maxOutputTokens: compact.maxOutputTokens,
|
|
306
404
|
minOutputTokens: compact.minOutputTokens,
|
|
307
|
-
protectJson: compact.protectJson
|
|
405
|
+
protectJson: compact.protectJson,
|
|
406
|
+
reviewManifestPath: compact.reviewManifestPath
|
|
308
407
|
};
|
|
309
408
|
}
|
|
310
409
|
function mergeAgentCompactOptions(defaults, overrides) {
|
|
@@ -387,6 +486,23 @@ function inspectAgentCompactionState(page, target, defaults) {
|
|
|
387
486
|
};
|
|
388
487
|
const sourceKind = resolveSourceKindForCompaction(target, currentDocument);
|
|
389
488
|
const sourceDocument = buildSourceDocumentForCompaction(page, sourceKind);
|
|
489
|
+
const review = defaults.reviewRecords?.find((candidate) => normalizeUrlPath(candidate.route) === normalizeUrlPath(target.url));
|
|
490
|
+
if (review) {
|
|
491
|
+
const reviewMismatches = [];
|
|
492
|
+
if (hashGeneratedAgentContent(buildResolvedPageSourceDocument(page)) !== review.sourceHash) reviewMismatches.push("source");
|
|
493
|
+
if (buildCompactionSettingsHash(pageOptions) !== review.settingsHash) reviewMismatches.push("settings");
|
|
494
|
+
if (hashGeneratedAgentContent(currentDocument.content) !== review.outputHash) reviewMismatches.push("output");
|
|
495
|
+
return {
|
|
496
|
+
status: reviewMismatches.length === 0 ? "reviewed" : "review-invalid",
|
|
497
|
+
sourceKind,
|
|
498
|
+
pageOptions,
|
|
499
|
+
sourceDocument,
|
|
500
|
+
provenance: currentDocument.provenance,
|
|
501
|
+
review,
|
|
502
|
+
reviewMismatches,
|
|
503
|
+
tokenBudget
|
|
504
|
+
};
|
|
505
|
+
}
|
|
390
506
|
if (!currentDocument.provenance) return {
|
|
391
507
|
status: "unknown",
|
|
392
508
|
sourceKind,
|
|
@@ -414,7 +530,7 @@ function inspectAgentCompactionState(page, target, defaults) {
|
|
|
414
530
|
tokenBudget
|
|
415
531
|
};
|
|
416
532
|
}
|
|
417
|
-
function protectForCompression(input) {
|
|
533
|
+
function protectForCompression(input, protectInlineCode = true) {
|
|
418
534
|
const segments = [];
|
|
419
535
|
const stash = (value) => {
|
|
420
536
|
const token = `__DOCS_SAFE_${segments.length}__`;
|
|
@@ -424,14 +540,21 @@ function protectForCompression(input) {
|
|
|
424
540
|
let result = input;
|
|
425
541
|
result = result.replace(/```[\s\S]*?```/g, stash);
|
|
426
542
|
result = result.replace(/\[[^\]]+\]\([^)]+\)/g, stash);
|
|
427
|
-
result = result.replace(/`[^`\n]+`/g, stash);
|
|
543
|
+
if (protectInlineCode) result = result.replace(/`[^`\n]+`/g, stash);
|
|
428
544
|
result = result.replace(/^(URL|Description|Related):[^\n]*$/gm, stash);
|
|
429
545
|
result = result.replace(/https?:\/\/[^\s)]+/g, stash);
|
|
430
546
|
for (let index = 0; index < segments.length; index += 1) result = result.replace(`__DOCS_SAFE_${index}__`, `<docs_safe>${segments[index]}</docs_safe>`);
|
|
431
547
|
return result;
|
|
432
548
|
}
|
|
549
|
+
function buildCompressionInput(input) {
|
|
550
|
+
const fullyProtected = protectForCompression(input);
|
|
551
|
+
if (fullyProtected.length <= MAX_COMPRESSION_INPUT_CHARACTERS) return fullyProtected;
|
|
552
|
+
const withoutInlineCodeProtection = protectForCompression(input, false);
|
|
553
|
+
if (withoutInlineCodeProtection.length <= MAX_COMPRESSION_INPUT_CHARACTERS) return withoutInlineCodeProtection;
|
|
554
|
+
throw new Error(`Docs Cloud compression input is ${withoutInlineCodeProtection.length} characters after adaptive protection; the maximum is ${MAX_COMPRESSION_INPUT_CHARACTERS}. Split or shorten the source page before compacting it.`);
|
|
555
|
+
}
|
|
433
556
|
function sanitizeCompressedOutput(output) {
|
|
434
|
-
return output.replace(/<\/?docs_safe>/g, "");
|
|
557
|
+
return output.replace(/<\/?docs_safe>/g, "").replace(/[ \t]+$/gm, "");
|
|
435
558
|
}
|
|
436
559
|
async function compressDocument(input, options) {
|
|
437
560
|
const apiKey = resolveCompressionApiKey(options.apiKey, options.apiKeyEnv);
|
|
@@ -440,7 +563,7 @@ async function compressDocument(input, options) {
|
|
|
440
563
|
if (aggressiveness < 0 || aggressiveness > 1) throw new Error("Aggressiveness must be between 0.0 and 1.0.");
|
|
441
564
|
const payload = {
|
|
442
565
|
model: options.model ?? DEFAULT_COMPRESSION_MODEL,
|
|
443
|
-
input:
|
|
566
|
+
input: buildCompressionInput(input),
|
|
444
567
|
compression_settings: {
|
|
445
568
|
aggressiveness,
|
|
446
569
|
...options.maxOutputTokens !== void 0 ? { max_output_tokens: options.maxOutputTokens } : {},
|
|
@@ -509,13 +632,20 @@ async function compactAgentDocs(options = {}) {
|
|
|
509
632
|
const loadedConfigModule = await loadDocsConfigModule(rootDir, options.configPath);
|
|
510
633
|
const configContent = readFileSync(loadedConfigModule?.path ?? resolveDocsConfigPath(rootDir, options.configPath), "utf-8");
|
|
511
634
|
const resolvedOptions = mergeAgentCompactOptions(mergeAgentCompactOptions(mergeAgentCompactOptions(readCloudApiKeyConfig(configContent), loadedConfigModule?.config ? readCloudApiKeyConfigFromModule(loadedConfigModule.config) : {}), mergeAgentCompactOptions(readAgentCompactConfig(configContent), loadedConfigModule?.config ? readAgentCompactConfigFromModule(loadedConfigModule.config) : {})), options);
|
|
635
|
+
resolvedOptions.reviewRecords = loadAgentCompactionReviews(rootDir, resolvedOptions.reviewManifestPath);
|
|
512
636
|
const entry = normalizePathSegment(loadedConfigModule?.config.entry ?? readTopLevelStringProperty(configContent, "entry") ?? "docs") || "docs";
|
|
513
637
|
const contentDir = typeof loadedConfigModule?.config.contentDir === "string" ? loadedConfigModule.config.contentDir : resolveDocsContentDir(rootDir, configContent, entry);
|
|
514
638
|
const siteTitle = typeof loadedConfigModule?.config.nav?.title === "string" ? loadedConfigModule.config.nav.title : readNavTitle(configContent) ?? "Documentation";
|
|
515
639
|
if (resolvedOptions.all && resolvedOptions.pages && resolvedOptions.pages.length > 0) throw new Error("Use either --all or specific page arguments, not both.");
|
|
516
640
|
if (resolvedOptions.includeMissing && !resolvedOptions.stale) throw new Error("Use --include-missing together with --stale.");
|
|
641
|
+
if ((resolvedOptions.reviewedBy || resolvedOptions.reviewReason) && resolvedOptions.review !== true) throw new Error("Use --reviewed-by and --reason together with --review.");
|
|
517
642
|
const requestedPages = resolvedOptions.pages?.filter((value) => value.trim().length > 0) ?? [];
|
|
518
|
-
if (
|
|
643
|
+
if (resolvedOptions.check && (resolvedOptions.all || resolvedOptions.stale || resolvedOptions.changed || resolvedOptions.includeMissing || resolvedOptions.review || resolvedOptions.dryRun || requestedPages.length > 0)) throw new Error("Use --check by itself; it inspects every compactable docs page without writing.");
|
|
644
|
+
if (resolvedOptions.review && (resolvedOptions.all || resolvedOptions.stale || resolvedOptions.changed || resolvedOptions.includeMissing || resolvedOptions.check)) throw new Error("Use --review with explicit page arguments, not selection or check flags.");
|
|
645
|
+
if (resolvedOptions.review && requestedPages.length === 0) throw new Error("Pass at least one explicit docs page with --review.");
|
|
646
|
+
if (resolvedOptions.review && !resolvedOptions.reviewedBy?.trim()) throw new Error("Pass --reviewed-by <name> with --review.");
|
|
647
|
+
if (resolvedOptions.review && !resolvedOptions.reviewReason?.trim()) throw new Error("Pass --reason <text> with --review.");
|
|
648
|
+
if (!resolvedOptions.all && requestedPages.length === 0 && !resolvedOptions.stale && !resolvedOptions.changed && !resolvedOptions.check && !resolvedOptions.review) throw new Error("Pass --all, --changed, --stale, or at least one docs page slug/path to compact.");
|
|
519
649
|
const pages = await createFilesystemDocsMcpSource({
|
|
520
650
|
rootDir,
|
|
521
651
|
entry,
|
|
@@ -523,7 +653,7 @@ async function compactAgentDocs(options = {}) {
|
|
|
523
653
|
siteTitle
|
|
524
654
|
}).getPages();
|
|
525
655
|
if (pages.length === 0) throw new Error(`No docs content was found under ${contentDir}.`);
|
|
526
|
-
const selectedPages = resolveSelectedPages(pages, scanDocsPageTargets(rootDir, contentDir, entry), entry, requestedPages, resolvedOptions.all === true || resolvedOptions.stale === true && requestedPages.length === 0 || resolvedOptions.changed === true && requestedPages.length === 0);
|
|
656
|
+
const selectedPages = resolveSelectedPages(pages, scanDocsPageTargets(rootDir, contentDir, entry), entry, requestedPages, resolvedOptions.all === true || resolvedOptions.check === true || resolvedOptions.stale === true && requestedPages.length === 0 || resolvedOptions.changed === true && requestedPages.length === 0);
|
|
527
657
|
const filteredPages = resolvedOptions.changed ? filterChangedPages(rootDir, contentDir, selectedPages) : selectedPages;
|
|
528
658
|
if (filteredPages.length === 0) {
|
|
529
659
|
if (resolvedOptions.changed) {
|
|
@@ -532,6 +662,56 @@ async function compactAgentDocs(options = {}) {
|
|
|
532
662
|
}
|
|
533
663
|
throw new Error("No compactable docs pages matched the request.");
|
|
534
664
|
}
|
|
665
|
+
if (resolvedOptions.review) {
|
|
666
|
+
const reviewsByRoute = new Map((resolvedOptions.reviewRecords ?? []).map((review) => [review.route, review]));
|
|
667
|
+
for (const { page, target } of filteredPages) {
|
|
668
|
+
const currentDocument = readCurrentAgentDocument(target);
|
|
669
|
+
if (!currentDocument) throw new Error(`Cannot review ${page.url}: ${target.agentPath} does not exist.`);
|
|
670
|
+
reviewsByRoute.set(page.url, {
|
|
671
|
+
route: page.url,
|
|
672
|
+
sourceHash: hashGeneratedAgentContent(buildResolvedPageSourceDocument(page)),
|
|
673
|
+
settingsHash: buildCompactionSettingsHash(buildPageOptions(resolvedOptions, target.pagePath).pageOptions),
|
|
674
|
+
outputHash: hashGeneratedAgentContent(currentDocument.content),
|
|
675
|
+
reviewedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
676
|
+
reviewedBy: resolvedOptions.reviewedBy.trim(),
|
|
677
|
+
reason: resolvedOptions.reviewReason.trim()
|
|
678
|
+
});
|
|
679
|
+
}
|
|
680
|
+
if (resolvedOptions.dryRun) {
|
|
681
|
+
console.log(pc.green(`Dry run: would record ${filteredPages.length} reviewed agent.md page${filteredPages.length === 1 ? "" : "s"}.`));
|
|
682
|
+
return;
|
|
683
|
+
}
|
|
684
|
+
const manifestPath = writeAgentCompactionReviews(rootDir, resolvedOptions.reviewManifestPath, [...reviewsByRoute.values()]);
|
|
685
|
+
console.log(pc.green(`Recorded ${filteredPages.length} reviewed agent.md page${filteredPages.length === 1 ? "" : "s"} in ${path.relative(rootDir, manifestPath)}.`));
|
|
686
|
+
return;
|
|
687
|
+
}
|
|
688
|
+
if (resolvedOptions.check) {
|
|
689
|
+
let fresh = 0;
|
|
690
|
+
let reviewed = 0;
|
|
691
|
+
let reviewInvalid = 0;
|
|
692
|
+
let stale = 0;
|
|
693
|
+
let modified = 0;
|
|
694
|
+
let unknown = 0;
|
|
695
|
+
let requiredMissing = 0;
|
|
696
|
+
let optionalMissing = 0;
|
|
697
|
+
for (const { page, target } of filteredPages) {
|
|
698
|
+
const state = inspectAgentCompactionState(page, target, resolvedOptions);
|
|
699
|
+
if (state.status === "fresh") fresh += 1;
|
|
700
|
+
else if (state.status === "reviewed") reviewed += 1;
|
|
701
|
+
else if (state.status === "review-invalid") reviewInvalid += 1;
|
|
702
|
+
else if (state.status === "stale") stale += 1;
|
|
703
|
+
else if (state.status === "modified" || state.status === "stale-modified") modified += 1;
|
|
704
|
+
else if (state.status === "unknown") unknown += 1;
|
|
705
|
+
else if (state.tokenBudget !== void 0) requiredMissing += 1;
|
|
706
|
+
else optionalMissing += 1;
|
|
707
|
+
}
|
|
708
|
+
const targetRoutes = new Set(filteredPages.map(({ target }) => normalizeUrlPath(target.url)));
|
|
709
|
+
const orphanedReviews = (resolvedOptions.reviewRecords ?? []).filter((review) => !targetRoutes.has(normalizeUrlPath(review.route))).length;
|
|
710
|
+
const summary = `${fresh} fresh, ${reviewed} reviewed, ${reviewInvalid} invalid reviews, ${orphanedReviews} orphaned reviews, ${stale} stale, ${modified} modified, ${unknown} unknown, ${requiredMissing} required missing, and ${optionalMissing} optional missing`;
|
|
711
|
+
if (reviewInvalid > 0 || orphanedReviews > 0 || stale > 0 || requiredMissing > 0) throw new Error(`Agent compaction freshness check failed: ${summary}. Refresh stale output, or re-review intentional agent.md content after inspecting every changed hash.`);
|
|
712
|
+
console.log(pc.green(`Agent compaction freshness check passed: ${summary}.`));
|
|
713
|
+
return;
|
|
714
|
+
}
|
|
535
715
|
let created = 0;
|
|
536
716
|
let overwritten = 0;
|
|
537
717
|
let processed = 0;
|
|
@@ -547,6 +727,14 @@ async function compactAgentDocs(options = {}) {
|
|
|
547
727
|
skippedFresh += 1;
|
|
548
728
|
continue;
|
|
549
729
|
}
|
|
730
|
+
if (state.status === "reviewed") {
|
|
731
|
+
skippedFresh += 1;
|
|
732
|
+
continue;
|
|
733
|
+
}
|
|
734
|
+
if (state.status === "review-invalid") {
|
|
735
|
+
skippedModified += 1;
|
|
736
|
+
continue;
|
|
737
|
+
}
|
|
550
738
|
if (state.status === "modified" || state.status === "stale-modified") {
|
|
551
739
|
skippedModified += 1;
|
|
552
740
|
continue;
|
|
@@ -598,6 +786,8 @@ ${pc.dim("Examples:")}
|
|
|
598
786
|
${pc.cyan("npx @farming-labs/docs@latest agent compact --changed")}
|
|
599
787
|
${pc.cyan("npx @farming-labs/docs@latest agent compact --stale")}
|
|
600
788
|
${pc.cyan("npx @farming-labs/docs@latest agent compact --stale --include-missing")}
|
|
789
|
+
${pc.cyan("npx @farming-labs/docs@latest agent compact --check")}
|
|
790
|
+
${pc.cyan("npx @farming-labs/docs@latest agent compact --review --reviewed-by \"docs-team\" --reason \"Preserve operator guidance\" /docs/configuration")}
|
|
601
791
|
|
|
602
792
|
${pc.dim("Per-page override:")}
|
|
603
793
|
Add ${pc.cyan("agent.tokenBudget")} to a page frontmatter block to override the compact output target for that page.
|
|
@@ -608,6 +798,11 @@ ${pc.dim("Options:")}
|
|
|
608
798
|
${pc.cyan("--changed")} Compact only docs pages changed in the current git working tree
|
|
609
799
|
${pc.cyan("--stale")} Re-compact only stale generated agent.md files
|
|
610
800
|
${pc.cyan("--include-missing")} With ${pc.cyan("--stale")}, also create missing agent.md files for explicit pages or pages that define ${pc.cyan("agent.tokenBudget")}
|
|
801
|
+
${pc.cyan("--check")} Check generated agent.md freshness without an API key, network request, or file write
|
|
802
|
+
${pc.cyan("--review")} Record hash-bound human review for explicit existing agent.md pages without rewriting them
|
|
803
|
+
${pc.cyan("--reviewed-by <name>")} Reviewer recorded with ${pc.cyan("--review")}
|
|
804
|
+
${pc.cyan("--reason <text>")} Review rationale recorded with ${pc.cyan("--review")}
|
|
805
|
+
${pc.cyan("--review-manifest <path>")} Project-relative review manifest path
|
|
611
806
|
${pc.cyan("--config <path>")} Use a custom docs config path instead of ${pc.dim("docs.config.ts[x]")}
|
|
612
807
|
${pc.cyan("--api-key <key>")} Use an API key directly; prefer ${pc.dim("cloud.apiKey.env")}
|
|
613
808
|
${pc.cyan("--api-key-env <name>")} Env var name for the Docs Cloud API key; prefer ${pc.dim("cloud.apiKey.env")}
|
|
@@ -622,4 +817,4 @@ ${pc.dim("Options:")}
|
|
|
622
817
|
}
|
|
623
818
|
|
|
624
819
|
//#endregion
|
|
625
|
-
export { scanDocsPageTargets as i, compactAgentDocs as n, inspectAgentCompactionState as r, agent_exports as t };
|
|
820
|
+
export { scanDocsPageTargets as a, loadAgentCompactionReviews as i, compactAgentDocs as n, inspectAgentCompactionState as r, agent_exports as t };
|
|
@@ -6189,7 +6189,7 @@ function createDocsSitemapResponse({ request, apiRoute, sitemap, entry = "docs",
|
|
|
6189
6189
|
});
|
|
6190
6190
|
const headers = new Headers({
|
|
6191
6191
|
"Content-Type": format === "xml" ? "application/xml; charset=utf-8" : "text/markdown; charset=utf-8",
|
|
6192
|
-
"Cache-Control": "public, max-age=0,
|
|
6192
|
+
"Cache-Control": "public, max-age=0, s-maxage=3600, stale-while-revalidate=86400",
|
|
6193
6193
|
ETag: hashString(body)
|
|
6194
6194
|
});
|
|
6195
6195
|
const lastModified = newestLastmod(nextManifest.pages);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { S as upsertPageAgentContractMarkdown, l as stripDocsGeneratedAgentContractMarkers, o as findDocsMarkdownSection } from "./markdown-sections-BKy4labo.mjs";
|
|
2
|
-
import { An as normalizeAgentFramework, Dn as agentVersionConstraintGroupsOverlap, Mn as normalizeAgentScopeValues, Nn as normalizeAgentVersion, On as agentVersionConstraintMatches, Qt as buildDocsAskAIContext, dn as normalizeDocsSearchFilters, en as buildDocsRetrievalDigestProjection, fn as performDocsSearch, jn as normalizeAgentLocale, kn as agentVersionConstraintsOverlap, xn as resolveSearchRequestConfig } from "./agent-
|
|
2
|
+
import { An as normalizeAgentFramework, Dn as agentVersionConstraintGroupsOverlap, Mn as normalizeAgentScopeValues, Nn as normalizeAgentVersion, On as agentVersionConstraintMatches, Qt as buildDocsAskAIContext, dn as normalizeDocsSearchFilters, en as buildDocsRetrievalDigestProjection, fn as performDocsSearch, jn as normalizeAgentLocale, kn as agentVersionConstraintsOverlap, xn as resolveSearchRequestConfig } from "./agent-BDrflLmt.mjs";
|
|
3
3
|
import { n as digestDocsRetrievalContent } from "./retrieval-digest-B-SgtXKK.mjs";
|
|
4
4
|
import { t as getDocsAgentSkillsConfiguredPaths } from "./agent-skills-server-Ddbf15pY.mjs";
|
|
5
5
|
import { buildDocsMcpContext } from "./mcp.mjs";
|
|
@@ -841,6 +841,14 @@ function normalizeRuntimeExamples(value, path, issues) {
|
|
|
841
841
|
}];
|
|
842
842
|
});
|
|
843
843
|
}
|
|
844
|
+
function normalizeRuntimeCoverageExpectation(value, path, issues) {
|
|
845
|
+
if (value === void 0) return void 0;
|
|
846
|
+
if (!isRecord(value)) {
|
|
847
|
+
issues.push(`${path} must be an object.`);
|
|
848
|
+
return {};
|
|
849
|
+
}
|
|
850
|
+
return { executableExamples: normalizeRuntimeEnum(value.executableExamples, `${path}.executableExamples`, issues, ["applicable", "not-applicable"]) };
|
|
851
|
+
}
|
|
844
852
|
function normalizeGoldenTaskInput(value, index, initialIssues = []) {
|
|
845
853
|
const issues = [...initialIssues];
|
|
846
854
|
const path = `tasks[${index}]`;
|
|
@@ -882,9 +890,11 @@ function normalizeGoldenTaskInput(value, index, initialIssues = []) {
|
|
|
882
890
|
maximum: 1
|
|
883
891
|
});
|
|
884
892
|
const examples = normalizeRuntimeExamples(expectation.examples, `${expectPath}.examples`, issues);
|
|
893
|
+
const coverage = normalizeRuntimeCoverageExpectation(expectation.coverage, `${expectPath}.coverage`, issues);
|
|
885
894
|
const scope = normalizeRuntimeFilters(expectation.scope, `${expectPath}.scope`, issues);
|
|
886
895
|
const answer = normalizeRuntimeAnswerExpectation(expectation.answer, `${expectPath}.answer`, issues);
|
|
887
896
|
const safety = normalizeRuntimeSafetyExpectation(expectation.safety, `${expectPath}.safety`, issues);
|
|
897
|
+
if (coverage?.executableExamples === "not-applicable" && examples?.some((example) => resolveExampleVerification(example) === "execute")) issues.push(`${expectPath}.coverage.executableExamples cannot be not-applicable when an example uses verification: execute.`);
|
|
888
898
|
const forbidden = forbiddenSources ?? [];
|
|
889
899
|
for (const [name, sources] of [
|
|
890
900
|
["relevantSources", relevantSources],
|
|
@@ -911,6 +921,7 @@ function normalizeGoldenTaskInput(value, index, initialIssues = []) {
|
|
|
911
921
|
maxFirstRelevantRank,
|
|
912
922
|
minUsefulByteRatio,
|
|
913
923
|
examples,
|
|
924
|
+
coverage,
|
|
914
925
|
scope,
|
|
915
926
|
answer,
|
|
916
927
|
safety
|
|
@@ -2523,6 +2534,7 @@ async function evaluateTask(pages, task, configurationIssues = [], runOptions =
|
|
|
2523
2534
|
selection,
|
|
2524
2535
|
examples,
|
|
2525
2536
|
usage,
|
|
2537
|
+
coverageApplicability: { executableExamples: task.expect.coverage?.executableExamples ?? "applicable" },
|
|
2526
2538
|
issues
|
|
2527
2539
|
};
|
|
2528
2540
|
}
|
|
@@ -2533,11 +2545,14 @@ async function evaluateTask(pages, task, configurationIssues = [], runOptions =
|
|
|
2533
2545
|
*/
|
|
2534
2546
|
function buildGoldenEvaluationCoverage(tasks) {
|
|
2535
2547
|
const totalTaskCount = tasks.length;
|
|
2536
|
-
const dimension = (measuredTaskCount) => {
|
|
2537
|
-
const
|
|
2548
|
+
const dimension = (measuredTaskCount, notApplicableTaskCount = 0) => {
|
|
2549
|
+
const applicableTaskCount = totalTaskCount - notApplicableTaskCount;
|
|
2550
|
+
const coveragePercent = totalTaskCount === 0 ? 0 : applicableTaskCount === 0 ? 100 : Math.round(measuredTaskCount / applicableTaskCount * 100);
|
|
2538
2551
|
return {
|
|
2539
|
-
status: measuredTaskCount === 0 ? "unmeasured" : measuredTaskCount ===
|
|
2552
|
+
status: totalTaskCount > 0 && applicableTaskCount === 0 ? "not-applicable" : measuredTaskCount === 0 ? "unmeasured" : measuredTaskCount === applicableTaskCount ? "measured" : "partially-measured",
|
|
2540
2553
|
measuredTaskCount,
|
|
2554
|
+
applicableTaskCount,
|
|
2555
|
+
notApplicableTaskCount,
|
|
2541
2556
|
totalTaskCount,
|
|
2542
2557
|
coveragePercent
|
|
2543
2558
|
};
|
|
@@ -2545,15 +2560,19 @@ function buildGoldenEvaluationCoverage(tasks) {
|
|
|
2545
2560
|
const dimensions = {
|
|
2546
2561
|
safety: dimension(tasks.filter((task) => task.safety.cases.length > 0 || task.safety.queryVariants.length > 0).length),
|
|
2547
2562
|
answerQuality: dimension(tasks.filter((task) => task.answer.expected).length),
|
|
2548
|
-
executableExamples: dimension(tasks.filter((task) => task.examples.results.some((result) => result.verification === "execute")).length)
|
|
2563
|
+
executableExamples: dimension(tasks.filter((task) => task.examples.results.some((result) => result.verification === "execute")).length, tasks.filter((task) => task.coverageApplicability.executableExamples === "not-applicable").length)
|
|
2549
2564
|
};
|
|
2550
2565
|
const dimensionValues = Object.values(dimensions);
|
|
2551
2566
|
const measuredTaskDimensions = dimensionValues.reduce((total, value) => total + value.measuredTaskCount, 0);
|
|
2567
|
+
const applicableTaskDimensions = dimensionValues.reduce((total, value) => total + value.applicableTaskCount, 0);
|
|
2568
|
+
const notApplicableTaskDimensions = dimensionValues.reduce((total, value) => total + value.notApplicableTaskCount, 0);
|
|
2552
2569
|
const totalTaskDimensions = totalTaskCount * dimensionValues.length;
|
|
2553
|
-
const coveragePercent = totalTaskDimensions === 0 ? 0 : Math.round(measuredTaskDimensions /
|
|
2570
|
+
const coveragePercent = totalTaskDimensions === 0 ? 0 : applicableTaskDimensions === 0 ? 100 : Math.round(measuredTaskDimensions / applicableTaskDimensions * 100);
|
|
2554
2571
|
return {
|
|
2555
|
-
status: coveragePercent === 100 ? "measured" : coveragePercent === 0 ? "unmeasured" : "partially-measured",
|
|
2572
|
+
status: totalTaskDimensions > 0 && applicableTaskDimensions === 0 ? "not-applicable" : coveragePercent === 100 ? "measured" : coveragePercent === 0 ? "unmeasured" : "partially-measured",
|
|
2556
2573
|
measuredTaskDimensions,
|
|
2574
|
+
applicableTaskDimensions,
|
|
2575
|
+
notApplicableTaskDimensions,
|
|
2557
2576
|
totalTaskDimensions,
|
|
2558
2577
|
coveragePercent,
|
|
2559
2578
|
dimensions
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { w as isDocsAgentPageAccessible } from "./markdown-sections-BKy4labo.mjs";
|
|
2
|
-
import { A as buildDocsAgentDiscoverySpec, Ft as renderDocsSitemapMarkdown, It as renderDocsSitemapXml, Lt as resolveDocsSitemapConfig, Mt as buildDocsSitemapManifest, S as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, Tt as toDocsMarkdownUrl, a as DEFAULT_AGENT_MD_ROUTE, ar as buildDocsOkfBundle, at as renderDocsLlmsTxt, c as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, ct as renderDocsSkillDocument, g as DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, h as DEFAULT_LLMS_FULL_TXT_ROUTE, it as renderDocsAgentsDocument, l as DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, o as DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, ot as renderDocsMarkdownDocument, sr as resolveDocsOkfConfig, t as DEFAULT_AGENTS_MD_ROUTE, ut as resolveDocsAgentFeedbackConfig, v as DEFAULT_LLMS_TXT_ROUTE, x as DEFAULT_SKILL_MD_ROUTE, y as DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE } from "./agent-
|
|
2
|
+
import { A as buildDocsAgentDiscoverySpec, Ft as renderDocsSitemapMarkdown, It as renderDocsSitemapXml, Lt as resolveDocsSitemapConfig, Mt as buildDocsSitemapManifest, S as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, Tt as toDocsMarkdownUrl, a as DEFAULT_AGENT_MD_ROUTE, ar as buildDocsOkfBundle, at as renderDocsLlmsTxt, c as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, ct as renderDocsSkillDocument, g as DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, h as DEFAULT_LLMS_FULL_TXT_ROUTE, it as renderDocsAgentsDocument, l as DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, o as DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, ot as renderDocsMarkdownDocument, sr as resolveDocsOkfConfig, t as DEFAULT_AGENTS_MD_ROUTE, ut as resolveDocsAgentFeedbackConfig, v as DEFAULT_LLMS_TXT_ROUTE, x as DEFAULT_SKILL_MD_ROUTE, y as DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE } from "./agent-BDrflLmt.mjs";
|
|
3
3
|
import { A as buildDocsLegacySkillsIndex, D as buildDocsA2AAgentCard, L as resolveDocsPublishedAgentSkill, O as buildDocsAgentSkillsIndex, V as formatDocsContentDigest, W as resolveDocsHttpDate, 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-Bpz90VYq.mjs";
|
|
4
|
-
import "./openapi-mcp-
|
|
4
|
+
import "./openapi-mcp-CFWUsMUr.mjs";
|
|
5
5
|
import { t as resolveDocsI18n } from "./i18n-B1gJ9EW0.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-
|
|
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-dNbBnlVh.mjs";
|
|
7
|
+
import "./sitemap-server-BKNIqgvq.mjs";
|
|
8
8
|
import { r as resolveConfiguredAgentSkills } from "./agent-skills-server-Ddbf15pY.mjs";
|
|
9
|
-
import "./agent-evals-
|
|
9
|
+
import "./agent-evals-3m5FXStK.mjs";
|
|
10
10
|
import { createFilesystemDocsMcpSource, resolveDocsMcpConfig } from "./mcp.mjs";
|
|
11
|
-
import "./authoring-mcp-
|
|
11
|
+
import "./authoring-mcp-Wy-h93DM.mjs";
|
|
12
12
|
import "./code-blocks-D90CCJFs.mjs";
|
|
13
13
|
import "./server.mjs";
|
|
14
14
|
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-DrZ3fXgf.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { z as DocsPublishedAgentSkill } from "./standards-discovery-
|
|
1
|
+
import { ut as DocsAgentSkillsInput } from "./types-BkAk6B2d.mjs";
|
|
2
|
+
import { z as DocsPublishedAgentSkill } from "./standards-discovery-CjyUCxdy.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 { ut as DocsAgentSkillsInput } from "./types-BkAk6B2d.mjs";
|
|
2
|
+
import { z as DocsPublishedAgentSkill } from "./standards-discovery-CjyUCxdy.mjs";
|
|
3
|
+
import { t as ResolveConfiguredAgentSkillsOptions } from "./agent-skills-server-CF6iVTBR.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,12 +1,12 @@
|
|
|
1
1
|
import "./markdown-sections-BKy4labo.mjs";
|
|
2
|
-
import { a as DEFAULT_AGENT_MD_ROUTE, it as renderDocsAgentsDocument, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, o as DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, t as DEFAULT_AGENTS_MD_ROUTE, ut as resolveDocsAgentFeedbackConfig } from "./agent-
|
|
2
|
+
import { a as DEFAULT_AGENT_MD_ROUTE, it as renderDocsAgentsDocument, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, o as DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, t as DEFAULT_AGENTS_MD_ROUTE, ut as resolveDocsAgentFeedbackConfig } from "./agent-BDrflLmt.mjs";
|
|
3
3
|
import "./standards-discovery-Bpz90VYq.mjs";
|
|
4
|
-
import "./openapi-mcp-
|
|
5
|
-
import { C as resolveApiReferenceOpenApiDiscovery } from "./sitemap-server-
|
|
4
|
+
import "./openapi-mcp-CFWUsMUr.mjs";
|
|
5
|
+
import { C as resolveApiReferenceOpenApiDiscovery } from "./sitemap-server-BKNIqgvq.mjs";
|
|
6
6
|
import "./agent-skills-server-Ddbf15pY.mjs";
|
|
7
|
-
import "./agent-evals-
|
|
7
|
+
import "./agent-evals-3m5FXStK.mjs";
|
|
8
8
|
import { resolveDocsMcpConfig } from "./mcp.mjs";
|
|
9
|
-
import "./authoring-mcp-
|
|
9
|
+
import "./authoring-mcp-Wy-h93DM.mjs";
|
|
10
10
|
import "./code-blocks-D90CCJFs.mjs";
|
|
11
11
|
import "./server.mjs";
|
|
12
12
|
import { a as loadDocsConfigModule, d as readNavTitle, g as resolveDocsConfigPath, h as readTopLevelStringProperty, l as readBooleanProperty, p as readStringProperty, t as extractNestedObjectLiteral } from "./config-DrZ3fXgf.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _t as DocsAnalyticsEventInput, ft as DocsAgentTraceEventInput, gt as DocsAnalyticsEvent, hn as DocsObservabilityEventInput, ht as DocsAnalyticsConfig, mn as DocsObservabilityEvent, pn as DocsObservabilityConfig } from "./types-BkAk6B2d.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/analytics.d.ts
|
|
4
4
|
declare const DOCS_AGENT_TRACE_EVENT_TYPES: readonly ["run.start", "run.end", "run.error", "user.input", "prompt.build", "retrieval.query", "retrieval.result", "retrieval.error", "model.call", "model.response", "model.stream", "model.error", "tool.call", "tool.result", "tool.error", "retry", "timeout", "error", "agent.final"];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./markdown-sections-BKy4labo.mjs";
|
|
2
|
-
import "./agent-
|
|
2
|
+
import "./agent-BDrflLmt.mjs";
|
|
3
3
|
import "./standards-discovery-Bpz90VYq.mjs";
|
|
4
|
-
import "./openapi-mcp-
|
|
5
|
-
import { r as runDocsAuthoringMcpStdio } from "./authoring-mcp-
|
|
4
|
+
import "./openapi-mcp-CFWUsMUr.mjs";
|
|
5
|
+
import { r as runDocsAuthoringMcpStdio } from "./authoring-mcp-Wy-h93DM.mjs";
|
|
6
6
|
import { _ as resolveDocsContentDir, d as readNavTitle, g as resolveDocsConfigPath, o as loadDocsConfigModuleResult, p as readStringProperty } from "./config-DrZ3fXgf.mjs";
|
|
7
7
|
import { readFileSync } from "node:fs";
|
|
8
8
|
import path from "node:path";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ot as renderDocsMarkdownDocument } from "./agent-
|
|
1
|
+
import { ot as renderDocsMarkdownDocument } from "./agent-BDrflLmt.mjs";
|
|
2
2
|
import { createFilesystemDocsMcpSource } from "./mcp.mjs";
|
|
3
3
|
import { n as analyzeDocsAgentFeedback, r as readDocsAgentFeedbackFile } from "./agent-feedback-loop-vaC-M1sx.mjs";
|
|
4
4
|
import { existsSync, lstatSync, mkdirSync, readFileSync, realpathSync, renameSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
package/dist/browser.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as emitDocsAnalyticsEvent, d as resolveDocsAnalyticsConfig } from "./analytics-
|
|
2
|
-
import { t as applySidebarFolderIndexBehavior } from "./sidebar-
|
|
1
|
+
import { c as emitDocsAnalyticsEvent, d as resolveDocsAnalyticsConfig } from "./analytics-CwXxM9oL.mjs";
|
|
2
|
+
import { t as applySidebarFolderIndexBehavior } from "./sidebar-Bne72SU-.mjs";
|
|
3
3
|
import { n as resolveDocsAudienceExposure, t as DocsContentAudience } from "./audience-exposure-CkNZNeVX.mjs";
|
|
4
4
|
export { type DocsContentAudience, applySidebarFolderIndexBehavior, emitDocsAnalyticsEvent, resolveDocsAnalyticsConfig, resolveDocsAudienceExposure };
|
package/dist/cli/index.d.mts
CHANGED
|
@@ -11,5 +11,6 @@ declare function parseCommandAlias(rawCommand?: string): {
|
|
|
11
11
|
};
|
|
12
12
|
/** Parse flags like --template next, --name my-docs, --theme concrete, --entry docs, --framework astro (exported for tests). */
|
|
13
13
|
declare function parseFlags(argv: string[]): Record<string, string | boolean | undefined>;
|
|
14
|
+
declare function printAgentHelp(): void;
|
|
14
15
|
//#endregion
|
|
15
|
-
export { formatCliError, parseCommandAlias, parseFlags };
|
|
16
|
+
export { formatCliError, parseCommandAlias, parseFlags, printAgentHelp };
|