@farming-labs/docs 0.1.118 → 0.1.120

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/{agent-D8DpCgt_.mjs → agent-ByXnegrS.mjs} +3 -3
  2. package/dist/{agents-XyolXdXp.mjs → agents-CpTNRbsh.mjs} +2 -2
  3. package/dist/cli/index.mjs +33 -15
  4. package/dist/{dev-FC6Fh7nT.mjs → dev-C03tUSTz.mjs} +2 -2
  5. package/dist/{doctor-CU4knIej.mjs → doctor-DMs3Q0wj.mjs} +4 -4
  6. package/dist/{downgrade-Bt4yrVyy.mjs → downgrade-Bv7E5LV2.mjs} +2 -2
  7. package/dist/index.d.mts +3 -3
  8. package/dist/index.mjs +1 -1
  9. package/dist/{init-BgzyLAay.mjs → init-_HAuo5Dv.mjs} +2 -2
  10. package/dist/{mcp-BMgH1Q33.mjs → mcp-DojNlB8t.mjs} +1 -1
  11. package/dist/mcp.d.mts +1 -1
  12. package/dist/{package-version-DQgrHnSb.mjs → package-version-L4GZowaF.mjs} +1 -1
  13. package/dist/{reading-time-DNLXwuqA.mjs → reading-time-Io7iRZ7S.mjs} +2 -1
  14. package/dist/review-BHFhvl2F.mjs +475 -0
  15. package/dist/review-_5fnI667.mjs +553 -0
  16. package/dist/{robots-Byj0knC3.mjs → robots-BxZaiGH3.mjs} +2 -2
  17. package/dist/{search-BQ1cY913.mjs → search-DKpKe0rf.mjs} +1 -1
  18. package/dist/{search-Dqu1Q27e.d.mts → search-Dd0kOr6B.d.mts} +1 -1
  19. package/dist/server.d.mts +65 -3
  20. package/dist/server.mjs +2 -1
  21. package/dist/{sitemap-mqWvYODL.mjs → sitemap-CXwYOIIb.mjs} +2 -2
  22. package/dist/{types-Dts3a32G.d.mts → types-DtBNjsk2.d.mts} +99 -1
  23. package/dist/{upgrade-B1EMfRQJ.mjs → upgrade-DrOWQIKI.mjs} +2 -2
  24. package/package.json +1 -1
  25. /package/dist/{config-Cio3byUJ.mjs → config-BHRL4R2v.mjs} +0 -0
  26. /package/dist/{templates-CkL3bEE5.mjs → templates-CakZBXK8.mjs} +0 -0
  27. /package/dist/{utils-TPe8H1P-.mjs → utils-x5EtYWjC.mjs} +0 -0
@@ -0,0 +1,553 @@
1
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
2
+ import { dirname, isAbsolute, join, relative } from "node:path";
3
+
4
+ //#region src/review.ts
5
+ const DEFAULT_DOCS_REVIEW_WORKFLOW_PATH = ".github/workflows/docs-review.yml";
6
+ const DEFAULT_DOCS_REVIEW_SCORE_THRESHOLD = 80;
7
+ const DEFAULT_REVIEW_RULES = {
8
+ brokenLinks: "error",
9
+ frontmatter: "error",
10
+ duplicateSlugs: "error",
11
+ invalidMdx: "error",
12
+ configExamples: "warn",
13
+ codeFenceMetadata: "warn",
14
+ runnableMetadata: "warn",
15
+ agentContext: "suggestion"
16
+ };
17
+ const DEFAULT_REVIEW_WEIGHTS = {
18
+ error: 20,
19
+ warn: 8,
20
+ suggestion: 2
21
+ };
22
+ const REVIEW_SEVERITIES = new Set([
23
+ "off",
24
+ "suggestion",
25
+ "warn",
26
+ "error"
27
+ ]);
28
+ const REVIEW_CI_MODES = new Set([
29
+ "off",
30
+ "warn",
31
+ "block"
32
+ ]);
33
+ const FILE_EXTS = [
34
+ "tsx",
35
+ "ts",
36
+ "jsx",
37
+ "js"
38
+ ];
39
+ function resolveDocsReviewConfig(review) {
40
+ if (review === false) return {
41
+ enabled: false,
42
+ ci: {
43
+ enabled: false,
44
+ mode: "off",
45
+ annotations: false,
46
+ comment: false
47
+ },
48
+ score: {
49
+ threshold: DEFAULT_DOCS_REVIEW_SCORE_THRESHOLD,
50
+ weights: DEFAULT_REVIEW_WEIGHTS
51
+ },
52
+ rules: DEFAULT_REVIEW_RULES
53
+ };
54
+ const objectConfig = review && typeof review === "object" ? review : {};
55
+ const ciConfig = objectConfig.ci;
56
+ const ciObject = ciConfig && typeof ciConfig === "object" ? ciConfig : {};
57
+ const configuredMode = ciObject.mode;
58
+ const mode = configuredMode && REVIEW_CI_MODES.has(configuredMode) ? configuredMode : "warn";
59
+ const enabled = objectConfig.enabled !== false;
60
+ const ciEnabled = enabled && ciConfig !== false && ciObject.enabled !== false && mode !== "off";
61
+ return {
62
+ enabled,
63
+ ci: {
64
+ enabled: ciEnabled,
65
+ mode: ciEnabled ? mode : "off",
66
+ annotations: ciObject.annotations !== false,
67
+ comment: ciObject.comment !== false
68
+ },
69
+ score: {
70
+ threshold: clampScoreThreshold(objectConfig.score?.threshold),
71
+ weights: {
72
+ error: normalizeWeight(objectConfig.score?.weights?.error, DEFAULT_REVIEW_WEIGHTS.error),
73
+ warn: normalizeWeight(objectConfig.score?.weights?.warn, DEFAULT_REVIEW_WEIGHTS.warn),
74
+ suggestion: normalizeWeight(objectConfig.score?.weights?.suggestion, DEFAULT_REVIEW_WEIGHTS.suggestion)
75
+ }
76
+ },
77
+ rules: {
78
+ ...DEFAULT_REVIEW_RULES,
79
+ ...normalizeRules(objectConfig.rules)
80
+ }
81
+ };
82
+ }
83
+ function buildDocsReviewWorkflow(options = {}) {
84
+ const packageManager = options.packageManager ?? "npm";
85
+ const projectDir = normalizeProjectDir(options.projectDir);
86
+ const configArg = options.configPath ? ` --config ${shellQuote(options.configPath)}` : "";
87
+ const reviewCommand = `${options.reviewCommand ?? reviewCommandForPackageManager(packageManager)} review --ci${configArg}`;
88
+ const filters = normalizePathFilters(options.pathFilters);
89
+ const installSteps = buildInstallSteps(packageManager);
90
+ const buildStep = options.buildCommand ? `\n - name: Build docs CLI\n run: ${options.buildCommand}\n` : "";
91
+ const workingDirectoryLine = projectDir === "." ? "" : `\n working-directory: ${projectDir}`;
92
+ return `# Generated by @farming-labs/docs. You can edit this file.
93
+ name: Docs Review
94
+
95
+ on:
96
+ pull_request:
97
+ paths:
98
+ ${filters.map((filter) => ` - ${JSON.stringify(filter)}`).join("\n")}
99
+
100
+ permissions:
101
+ contents: read
102
+ checks: write
103
+ pull-requests: write
104
+
105
+ jobs:
106
+ docs-review:
107
+ runs-on: ubuntu-latest
108
+ steps:
109
+ - uses: actions/checkout@v4
110
+ with:
111
+ fetch-depth: 0
112
+
113
+ ${installSteps}
114
+ ${buildStep}
115
+
116
+ - name: Review docs
117
+ run: ${reviewCommand}${workingDirectoryLine}
118
+ `;
119
+ }
120
+ function ensureDocsReviewWorkflow(options) {
121
+ const rootDir = options.rootDir;
122
+ const repoRoot = findGitRoot(rootDir) ?? rootDir;
123
+ const workflowRelativePath = options.workflowPath ?? DEFAULT_DOCS_REVIEW_WORKFLOW_PATH;
124
+ const workflowPath = isAbsolute(workflowRelativePath) ? workflowRelativePath : join(repoRoot, workflowRelativePath);
125
+ const resultRelativePath = toPosixPath(relative(repoRoot, workflowPath));
126
+ const review = resolveDocsReviewConfig(options.config?.review ?? readDocsReviewConfigFromSource(options.configContent ?? readConfig(rootDir)));
127
+ if (!review.enabled || !review.ci.enabled) return {
128
+ status: "disabled",
129
+ path: workflowPath,
130
+ relativePath: resultRelativePath
131
+ };
132
+ if (existsSync(workflowPath)) return {
133
+ status: "exists",
134
+ path: workflowPath,
135
+ relativePath: resultRelativePath
136
+ };
137
+ const configPath = options.configPath ?? findDocsConfigPath(rootDir);
138
+ const configContent = options.configContent ?? readConfig(rootDir, configPath);
139
+ const projectDir = toPosixPath(relative(repoRoot, rootDir)) || ".";
140
+ const packageManager = detectPackageManager(repoRoot);
141
+ const workflow = buildDocsReviewWorkflow({
142
+ packageManager,
143
+ projectDir,
144
+ configPath,
145
+ buildCommand: detectLocalDocsCliBuildCommand(repoRoot, packageManager),
146
+ reviewCommand: detectLocalDocsCliReviewCommand(repoRoot, rootDir),
147
+ pathFilters: buildDocsReviewWorkflowPathFilters({
148
+ rootDir,
149
+ repoRoot,
150
+ config: options.config,
151
+ configPath,
152
+ configContent
153
+ })
154
+ });
155
+ mkdirSync(dirname(workflowPath), { recursive: true });
156
+ writeFileSync(workflowPath, workflow, "utf-8");
157
+ options.log?.(`[docs] Created ${resultRelativePath} for Docs Review CI.`);
158
+ return {
159
+ status: "created",
160
+ path: workflowPath,
161
+ relativePath: resultRelativePath
162
+ };
163
+ }
164
+ function readDocsReviewConfigFromSource(content) {
165
+ if (!content) return void 0;
166
+ const rootObject = extractRootObjectLiteral(content) ?? content;
167
+ const reviewCursor = findTopLevelPropertyValueIndex(rootObject, "review");
168
+ if (reviewCursor === void 0) return void 0;
169
+ if (rootObject.startsWith("true", reviewCursor)) return true;
170
+ if (rootObject.startsWith("false", reviewCursor)) return false;
171
+ if (rootObject[reviewCursor] !== "{") return void 0;
172
+ const reviewEnd = findMatchingObjectEnd(rootObject, reviewCursor);
173
+ if (reviewEnd === void 0) return void 0;
174
+ const reviewBlock = rootObject.slice(reviewCursor + 1, reviewEnd);
175
+ const scoreBlock = extractTopLevelObjectLiteral(reviewBlock, "score");
176
+ const ciCursor = findTopLevelPropertyValueIndex(reviewBlock, "ci");
177
+ const rulesBlock = extractTopLevelObjectLiteral(reviewBlock, "rules");
178
+ const ci = ciCursor === void 0 ? void 0 : reviewBlock.startsWith("true", ciCursor) ? true : reviewBlock.startsWith("false", ciCursor) ? false : reviewBlock[ciCursor] === "{" ? readReviewCiObject(reviewBlock, ciCursor) : void 0;
179
+ return {
180
+ enabled: readTopLevelBoolean(reviewBlock, "enabled"),
181
+ score: scoreBlock ? {
182
+ threshold: readTopLevelNumber(scoreBlock, "threshold"),
183
+ weights: readReviewWeights(scoreBlock)
184
+ } : void 0,
185
+ ci,
186
+ rules: rulesBlock ? readReviewRules(rulesBlock) : void 0
187
+ };
188
+ }
189
+ function buildDocsReviewWorkflowPathFilters(options) {
190
+ const repoRoot = options.repoRoot ?? findGitRoot(options.rootDir) ?? options.rootDir;
191
+ const configPath = options.configPath ?? findDocsConfigPath(options.rootDir);
192
+ const configContent = options.configContent ?? readConfig(options.rootDir, configPath);
193
+ const entry = options.config?.entry ?? readTopLevelString(configContent, "entry") ?? "docs";
194
+ const contentDir = options.config?.contentDir ?? readTopLevelString(configContent, "contentDir");
195
+ const projectDir = toPosixPath(relative(repoRoot, options.rootDir));
196
+ const projectPrefix = projectDir && projectDir !== "." ? `${projectDir}/` : "";
197
+ const candidates = [
198
+ prefixPath(projectPrefix, configPath),
199
+ prefixPath(projectPrefix, `${entry}/**`),
200
+ prefixPath(projectPrefix, `app/${entry}/**`),
201
+ prefixPath(projectPrefix, `src/app/${entry}/**`),
202
+ contentDir ? prefixPath(projectPrefix, `${trimSlashes(contentDir)}/**`) : void 0,
203
+ prefixPath(projectPrefix, "content/docs/**"),
204
+ prefixPath(projectPrefix, "src/content/docs/**"),
205
+ prefixPath(projectPrefix, "src/lib/docs.config.*"),
206
+ DEFAULT_DOCS_REVIEW_WORKFLOW_PATH
207
+ ];
208
+ return Array.from(new Set(candidates.filter((candidate) => Boolean(candidate))));
209
+ }
210
+ function normalizeRules(rules) {
211
+ if (!rules) return {};
212
+ return Object.fromEntries(Object.entries(rules).filter((entry) => REVIEW_SEVERITIES.has(entry[1])));
213
+ }
214
+ function normalizeWeight(value, fallback) {
215
+ return typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : fallback;
216
+ }
217
+ function clampScoreThreshold(value) {
218
+ if (typeof value !== "number" || !Number.isFinite(value)) return DEFAULT_DOCS_REVIEW_SCORE_THRESHOLD;
219
+ return Math.min(100, Math.max(0, Math.round(value)));
220
+ }
221
+ function readReviewCiObject(source, cursor) {
222
+ const end = findMatchingObjectEnd(source, cursor);
223
+ if (end === void 0) return void 0;
224
+ const block = source.slice(cursor + 1, end);
225
+ const mode = readTopLevelString(block, "mode");
226
+ return {
227
+ enabled: readTopLevelBoolean(block, "enabled"),
228
+ mode: mode && REVIEW_CI_MODES.has(mode) ? mode : void 0,
229
+ annotations: readTopLevelBoolean(block, "annotations"),
230
+ comment: readTopLevelBoolean(block, "comment")
231
+ };
232
+ }
233
+ function readReviewRules(block) {
234
+ const rules = {};
235
+ for (const key of Object.keys(DEFAULT_REVIEW_RULES)) {
236
+ const value = readTopLevelString(block, key);
237
+ if (value && REVIEW_SEVERITIES.has(value)) rules[key] = value;
238
+ }
239
+ return rules;
240
+ }
241
+ function readReviewWeights(block) {
242
+ const weightsBlock = extractTopLevelObjectLiteral(block, "weights");
243
+ if (!weightsBlock) return void 0;
244
+ return {
245
+ error: readTopLevelNumber(weightsBlock, "error"),
246
+ warn: readTopLevelNumber(weightsBlock, "warn"),
247
+ suggestion: readTopLevelNumber(weightsBlock, "suggestion")
248
+ };
249
+ }
250
+ function detectPackageManager(rootDir) {
251
+ if (existsSync(join(rootDir, "pnpm-lock.yaml"))) return "pnpm";
252
+ if (existsSync(join(rootDir, "yarn.lock"))) return "yarn";
253
+ if (existsSync(join(rootDir, "bun.lock")) || existsSync(join(rootDir, "bun.lockb"))) return "bun";
254
+ return "npm";
255
+ }
256
+ function detectLocalDocsCliBuildCommand(repoRoot, packageManager) {
257
+ if (!hasLocalDocsWorkspacePackage(repoRoot)) return void 0;
258
+ if (packageManager === "pnpm") return "pnpm --filter @farming-labs/docs run build";
259
+ if (packageManager === "yarn") return "yarn workspace @farming-labs/docs build";
260
+ if (packageManager === "bun") return "bun run --filter @farming-labs/docs build";
261
+ return "npm run build --workspace=@farming-labs/docs";
262
+ }
263
+ function detectLocalDocsCliReviewCommand(repoRoot, rootDir) {
264
+ if (!hasLocalDocsWorkspacePackage(repoRoot)) return void 0;
265
+ return `node ${shellQuote(toPosixPath(relative(rootDir, join(repoRoot, "packages", "docs", "dist", "cli", "index.mjs"))) || "./packages/docs/dist/cli/index.mjs")}`;
266
+ }
267
+ function hasLocalDocsWorkspacePackage(repoRoot) {
268
+ const packageJsonPath = join(repoRoot, "packages", "docs", "package.json");
269
+ if (!existsSync(packageJsonPath)) return false;
270
+ try {
271
+ const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
272
+ return packageJson.name === "@farming-labs/docs" && Boolean(packageJson.scripts?.build);
273
+ } catch {
274
+ return false;
275
+ }
276
+ }
277
+ function buildInstallSteps(packageManager) {
278
+ if (packageManager === "pnpm") return ` - uses: pnpm/action-setup@v4
279
+
280
+ - uses: actions/setup-node@v4
281
+ with:
282
+ node-version: 20
283
+ cache: pnpm
284
+
285
+ - name: Install dependencies
286
+ run: pnpm install --frozen-lockfile`;
287
+ if (packageManager === "yarn") return ` - uses: actions/setup-node@v4
288
+ with:
289
+ node-version: 20
290
+ cache: yarn
291
+
292
+ - name: Enable Corepack
293
+ run: corepack enable
294
+
295
+ - name: Install dependencies
296
+ run: yarn install --immutable || yarn install --frozen-lockfile`;
297
+ if (packageManager === "bun") return ` - uses: oven-sh/setup-bun@v2
298
+
299
+ - name: Install dependencies
300
+ run: bun install --frozen-lockfile`;
301
+ return ` - uses: actions/setup-node@v4
302
+ with:
303
+ node-version: 20
304
+ cache: npm
305
+
306
+ - name: Install dependencies
307
+ run: npm ci`;
308
+ }
309
+ function reviewCommandForPackageManager(packageManager) {
310
+ if (packageManager === "pnpm") return "pnpm exec docs";
311
+ if (packageManager === "yarn") return "yarn exec docs";
312
+ if (packageManager === "bun") return "bunx docs";
313
+ return "npx --no-install docs";
314
+ }
315
+ function shellQuote(value) {
316
+ if (/^[A-Za-z0-9_./:-]+$/.test(value)) return value;
317
+ return `'${value.replaceAll("'", "'\\''")}'`;
318
+ }
319
+ function normalizeProjectDir(value) {
320
+ if (!value || value === "") return ".";
321
+ return toPosixPath(value).replace(/\/+$/, "") || ".";
322
+ }
323
+ function normalizePathFilters(filters) {
324
+ const normalized = (filters && filters.length > 0 ? filters : ["docs.config.*", "app/docs/**"]).map((filter) => toPosixPath(filter).replace(/^\.\/+/, "")).filter(Boolean);
325
+ return Array.from(new Set(normalized));
326
+ }
327
+ function findGitRoot(start) {
328
+ let current = start;
329
+ while (true) {
330
+ if (existsSync(join(current, ".git"))) return current;
331
+ const parent = dirname(current);
332
+ if (parent === current) return void 0;
333
+ current = parent;
334
+ }
335
+ }
336
+ function findDocsConfigPath(rootDir) {
337
+ for (const ext of FILE_EXTS) {
338
+ const path = `docs.config.${ext}`;
339
+ if (existsSync(join(rootDir, path))) return path;
340
+ }
341
+ return "docs.config.ts";
342
+ }
343
+ function readConfig(rootDir, configPath = findDocsConfigPath(rootDir)) {
344
+ const fullPath = join(rootDir, configPath);
345
+ if (!existsSync(fullPath)) return void 0;
346
+ try {
347
+ return readFileSync(fullPath, "utf-8");
348
+ } catch {
349
+ return;
350
+ }
351
+ }
352
+ function prefixPath(prefix, value) {
353
+ return `${prefix}${toPosixPath(value).replace(/^\.\/+/, "")}`;
354
+ }
355
+ function trimSlashes(value) {
356
+ return toPosixPath(value).replace(/^\/+|\/+$/g, "");
357
+ }
358
+ function toPosixPath(value) {
359
+ return value.replaceAll("\\", "/");
360
+ }
361
+ function extractRootObjectLiteral(content) {
362
+ const candidateIndexes = [content.search(/\bdefineDocs\s*\(/), content.search(/\bexport\s+default\b/)].filter((value) => value !== -1);
363
+ for (const startIndex of candidateIndexes) {
364
+ const braceStart = content.indexOf("{", startIndex);
365
+ if (braceStart === -1) continue;
366
+ const braceEnd = findMatchingObjectEnd(content, braceStart);
367
+ if (braceEnd !== void 0) return content.slice(braceStart + 1, braceEnd);
368
+ }
369
+ }
370
+ function extractTopLevelObjectLiteral(content, key) {
371
+ const cursor = findTopLevelPropertyValueIndex(content, key);
372
+ if (cursor === void 0 || content[cursor] !== "{") return void 0;
373
+ const end = findMatchingObjectEnd(content, cursor);
374
+ return end === void 0 ? void 0 : content.slice(cursor + 1, end);
375
+ }
376
+ function readTopLevelBoolean(content, key) {
377
+ const cursor = findTopLevelPropertyValueIndex(content, key);
378
+ if (cursor === void 0) return void 0;
379
+ if (content.startsWith("true", cursor)) return true;
380
+ if (content.startsWith("false", cursor)) return false;
381
+ }
382
+ function readTopLevelNumber(content, key) {
383
+ const cursor = findTopLevelPropertyValueIndex(content, key);
384
+ if (cursor === void 0) return void 0;
385
+ const match = content.slice(cursor).match(/^-?\d+(?:\.\d+)?/);
386
+ if (!match) return void 0;
387
+ const value = Number(match[0]);
388
+ return Number.isFinite(value) ? value : void 0;
389
+ }
390
+ function readTopLevelString(content, key) {
391
+ if (!content) return void 0;
392
+ const cursor = findTopLevelPropertyValueIndex(content, key);
393
+ if (cursor === void 0) return void 0;
394
+ const quote = content[cursor];
395
+ if (quote !== "\"" && quote !== "'") return void 0;
396
+ let value = "";
397
+ for (let index = cursor + 1; index < content.length; index += 1) {
398
+ const char = content[index];
399
+ if (char === "\\") {
400
+ const escaped = content[index + 1];
401
+ if (escaped) {
402
+ value += escaped;
403
+ index += 1;
404
+ }
405
+ continue;
406
+ }
407
+ if (char === quote) return value;
408
+ value += char;
409
+ }
410
+ }
411
+ function findTopLevelPropertyValueIndex(block, key) {
412
+ let objectDepth = 0;
413
+ let arrayDepth = 0;
414
+ let parenDepth = 0;
415
+ let inString = null;
416
+ let inLineComment = false;
417
+ let inBlockComment = false;
418
+ let escaped = false;
419
+ for (let index = 0; index < block.length; index += 1) {
420
+ const char = block[index];
421
+ const next = block[index + 1];
422
+ if (inLineComment) {
423
+ if (char === "\n") inLineComment = false;
424
+ continue;
425
+ }
426
+ if (inBlockComment) {
427
+ if (char === "*" && next === "/") {
428
+ inBlockComment = false;
429
+ index += 1;
430
+ }
431
+ continue;
432
+ }
433
+ if (inString) {
434
+ if (escaped) {
435
+ escaped = false;
436
+ continue;
437
+ }
438
+ if (char === "\\") {
439
+ escaped = true;
440
+ continue;
441
+ }
442
+ if (char === inString) inString = null;
443
+ continue;
444
+ }
445
+ if (char === "/" && next === "/") {
446
+ inLineComment = true;
447
+ index += 1;
448
+ continue;
449
+ }
450
+ if (char === "/" && next === "*") {
451
+ inBlockComment = true;
452
+ index += 1;
453
+ continue;
454
+ }
455
+ if (char === "\"" || char === "'" || char === "`") {
456
+ inString = char;
457
+ continue;
458
+ }
459
+ if (char === "{") {
460
+ objectDepth += 1;
461
+ continue;
462
+ }
463
+ if (char === "}") {
464
+ objectDepth = Math.max(0, objectDepth - 1);
465
+ continue;
466
+ }
467
+ if (char === "[") {
468
+ arrayDepth += 1;
469
+ continue;
470
+ }
471
+ if (char === "]") {
472
+ arrayDepth = Math.max(0, arrayDepth - 1);
473
+ continue;
474
+ }
475
+ if (char === "(") {
476
+ parenDepth += 1;
477
+ continue;
478
+ }
479
+ if (char === ")") {
480
+ parenDepth = Math.max(0, parenDepth - 1);
481
+ continue;
482
+ }
483
+ if (objectDepth !== 0 || arrayDepth !== 0 || parenDepth !== 0) continue;
484
+ if (!block.startsWith(key, index)) continue;
485
+ const before = block[index - 1] ?? "";
486
+ const after = block[index + key.length] ?? "";
487
+ if (/[A-Za-z0-9_$]/.test(before) || /[A-Za-z0-9_$]/.test(after)) continue;
488
+ let cursor = index + key.length;
489
+ while (/\s/.test(block[cursor] ?? "")) cursor += 1;
490
+ if (block[cursor] !== ":") continue;
491
+ cursor += 1;
492
+ while (/\s/.test(block[cursor] ?? "")) cursor += 1;
493
+ return cursor;
494
+ }
495
+ }
496
+ function findMatchingObjectEnd(block, start) {
497
+ let depth = 0;
498
+ let inString = null;
499
+ let inLineComment = false;
500
+ let inBlockComment = false;
501
+ let escaped = false;
502
+ for (let index = start; index < block.length; index += 1) {
503
+ const char = block[index];
504
+ const next = block[index + 1];
505
+ if (inLineComment) {
506
+ if (char === "\n") inLineComment = false;
507
+ continue;
508
+ }
509
+ if (inBlockComment) {
510
+ if (char === "*" && next === "/") {
511
+ inBlockComment = false;
512
+ index += 1;
513
+ }
514
+ continue;
515
+ }
516
+ if (inString) {
517
+ if (escaped) {
518
+ escaped = false;
519
+ continue;
520
+ }
521
+ if (char === "\\") {
522
+ escaped = true;
523
+ continue;
524
+ }
525
+ if (char === inString) inString = null;
526
+ continue;
527
+ }
528
+ if (char === "/" && next === "/") {
529
+ inLineComment = true;
530
+ index += 1;
531
+ continue;
532
+ }
533
+ if (char === "/" && next === "*") {
534
+ inBlockComment = true;
535
+ index += 1;
536
+ continue;
537
+ }
538
+ if (char === "\"" || char === "'" || char === "`") {
539
+ inString = char;
540
+ continue;
541
+ }
542
+ if (char === "{") {
543
+ depth += 1;
544
+ continue;
545
+ }
546
+ if (char !== "}") continue;
547
+ depth -= 1;
548
+ if (depth === 0) return index;
549
+ }
550
+ }
551
+
552
+ //#endregion
553
+ export { ensureDocsReviewWorkflow as a, buildDocsReviewWorkflowPathFilters as i, DEFAULT_DOCS_REVIEW_WORKFLOW_PATH as n, readDocsReviewConfigFromSource as o, buildDocsReviewWorkflow as r, resolveDocsReviewConfig as s, DEFAULT_DOCS_REVIEW_SCORE_THRESHOLD as t };
@@ -1,7 +1,7 @@
1
1
  import "./agent-Dt6kdGqw.mjs";
2
2
  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-tohhTNbU.mjs";
3
- import { d as readTopLevelStringProperty, f as resolveDocsConfigPath, i as loadDocsConfigModule, o as readBooleanProperty, t as extractNestedObjectLiteral, u as readStringProperty } from "./config-Cio3byUJ.mjs";
4
- import { t as detectFramework } from "./utils-TPe8H1P-.mjs";
3
+ import { d as readTopLevelStringProperty, f as resolveDocsConfigPath, i as loadDocsConfigModule, o as readBooleanProperty, t as extractNestedObjectLiteral, u as readStringProperty } from "./config-BHRL4R2v.mjs";
4
+ import { t as detectFramework } from "./utils-x5EtYWjC.mjs";
5
5
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
6
6
  import path from "node:path";
7
7
  import pc from "picocolors";
@@ -2,7 +2,7 @@ import { n as buildDocsSearchDocuments, r as createAlgoliaSearchAdapter, s as cr
2
2
  import "./sitemap-server-DdHzJorR.mjs";
3
3
  import { createFilesystemDocsMcpSource } from "./mcp.mjs";
4
4
  import "./server.mjs";
5
- import { a as loadProjectEnv, d as readTopLevelStringProperty, f as resolveDocsConfigPath, p as resolveDocsContentDir } from "./config-Cio3byUJ.mjs";
5
+ import { a as loadProjectEnv, d as readTopLevelStringProperty, f as resolveDocsConfigPath, p as resolveDocsContentDir } from "./config-BHRL4R2v.mjs";
6
6
  import { readFileSync } from "node:fs";
7
7
  import pc from "picocolors";
8
8
 
@@ -1,4 +1,4 @@
1
- import { B as DocsObservabilityEventInput, Et as ResolvedDocsRelatedLink, It as TypesenseDocsSearchConfig, J as DocsSearchConfig, K as DocsSearchAdapterFactory, Q as DocsSearchResult, R as DocsObservabilityConfig, W as DocsSearchAdapter, Y as DocsSearchDocument, _ as DocsAnalyticsConfig, _t as OpenDocsTarget, d as CustomDocsSearchConfig, dt as McpDocsSearchConfig, et as DocsSearchSourcePage, k as DocsAskAIMcpConfig, m as DocsAgentTraceEventInput, mt as OpenDocsProvider, q as DocsSearchChunkingConfig, r as AlgoliaDocsSearchConfig, tt as DocsSitemapConfig, v as DocsAnalyticsEvent, y as DocsAnalyticsEventInput, z as DocsObservabilityEvent } from "./types-Dts3a32G.mjs";
1
+ import { $ as DocsSearchChunkingConfig, B as DocsObservabilityEventInput, Ct as OpenDocsTarget, Ht as TypesenseDocsSearchConfig, Mt as ResolvedDocsRelatedLink, Q as DocsSearchAdapterFactory, R as DocsObservabilityConfig, X as DocsSearchAdapter, _ as DocsAnalyticsConfig, _t as McpDocsSearchConfig, bt as OpenDocsProvider, d as CustomDocsSearchConfig, et as DocsSearchConfig, it as DocsSearchResult, k as DocsAskAIMcpConfig, m as DocsAgentTraceEventInput, ot as DocsSearchSourcePage, r as AlgoliaDocsSearchConfig, st as DocsSitemapConfig, tt as DocsSearchDocument, v as DocsAnalyticsEvent, y as DocsAnalyticsEventInput, z as DocsObservabilityEvent } from "./types-DtBNjsk2.mjs";
2
2
 
3
3
  //#region src/cloud-analytics.d.ts
4
4
  interface DocsCloudAnalyticsOptions {
package/dist/server.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as DocsConfig, B as DocsObservabilityEventInput, D as DocsAskAIFeedbackMessage, E as DocsAskAIFeedbackData, G as DocsSearchAdapterContext, J as DocsSearchConfig, K as DocsSearchAdapterFactory, O as DocsAskAIFeedbackValue, Q as DocsSearchResult, R as DocsObservabilityConfig, T as DocsAskAIFeedbackConfig, W as DocsSearchAdapter, Y as DocsSearchDocument, Z as DocsSearchQuery, _ as DocsAnalyticsConfig, a as ApiReferenceRenderer, dt as McpDocsSearchConfig, et as DocsSearchSourcePage, g as DocsAgentTraceStatus, h as DocsAgentTraceEventType, k as DocsAskAIMcpConfig, m as DocsAgentTraceEventInput, tt as DocsSitemapConfig, v as DocsAnalyticsEvent, y as DocsAnalyticsEventInput, z as DocsObservabilityEvent } from "./types-Dts3a32G.mjs";
2
- import { $ as emitDocsAgentTraceEvent, A as toDocsSitemapMarkdownUrl, B as parsePromptStringArray, C as createDocsSitemapResponse, D as resolveDocsSitemapConfig, E as renderDocsSitemapXml, F as PromptAction, G as serializeOpenDocsProvider, H as sanitizePromptText, I as PromptProviderChoice, J as DocsAgentTraceContext, K as serializeOpenDocsProviders, L as SerializeOpenDocsProviderOptions, M as DEFAULT_OPEN_DOCS_PROVIDER_IDS, N as DEFAULT_OPEN_DOCS_TARGET, O as resolveDocsSitemapPageLastmod, P as DEFAULT_PROMPT_PROVIDER_TEMPLATES, Q as createDocsAgentTraceId, R as SerializedOpenDocsProvider, S as buildDocsSitemapManifest, T as renderDocsSitemapMarkdown, U as serializeDocsIcon, V as resolvePromptProviderChoices, W as serializeDocsIconRegistry, X as ResolvedDocsObservabilityConfig, Y as ResolvedDocsAnalyticsConfig, Z as createDocsAgentTraceContext, _ as DocsSitemapFormat, a as createMcpSearchAdapter, at as createDocsCloudAnalytics, b as DocsSitemapPageInput, c as formatDocsAskAIPackageHints, d as resolveAskAISearchRequestConfig, et as emitDocsAnalyticsEvent, f as resolveSearchRequestConfig, g as DEFAULT_SITEMAP_XML_ROUTE, h as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, i as createCustomSearchAdapter, it as DocsCloudAnalyticsOptions, j as DEFAULT_OPEN_DOCS_PROMPT, k as resolveDocsSitemapRequest, l as inferDocsAskAIPackageHints, m as DEFAULT_SITEMAP_MD_ROUTE, n as buildDocsSearchDocuments, nt as resolveDocsAnalyticsConfig, o as createSimpleSearchAdapter, p as DEFAULT_SITEMAP_MANIFEST_PATH, q as DOCS_AGENT_TRACE_EVENT_TYPES, r as createAlgoliaSearchAdapter, rt as resolveDocsObservabilityConfig, s as createTypesenseSearchAdapter, t as buildDocsAskAIContext, tt as emitDocsObservabilityEvent, u as performDocsSearch, v as DocsSitemapManifest, w as readDocsSitemapManifestFromContentMap, x as DocsSitemapResolvedConfig, y as DocsSitemapManifestPage, z as normalizePromptProviderName } from "./search-Dqu1Q27e.mjs";
1
+ import { A as DocsConfig, B as DocsObservabilityEventInput, D as DocsAskAIFeedbackMessage, E as DocsAskAIFeedbackData, G as DocsReviewRulesConfig, O as DocsAskAIFeedbackValue, Q as DocsSearchAdapterFactory, R as DocsObservabilityConfig, T as DocsAskAIFeedbackConfig, U as DocsReviewCiMode, W as DocsReviewConfig, X as DocsSearchAdapter, Z as DocsSearchAdapterContext, _ as DocsAnalyticsConfig, _t as McpDocsSearchConfig, a as ApiReferenceRenderer, et as DocsSearchConfig, g as DocsAgentTraceStatus, h as DocsAgentTraceEventType, it as DocsSearchResult, k as DocsAskAIMcpConfig, m as DocsAgentTraceEventInput, ot as DocsSearchSourcePage, rt as DocsSearchQuery, st as DocsSitemapConfig, tt as DocsSearchDocument, v as DocsAnalyticsEvent, y as DocsAnalyticsEventInput, z as DocsObservabilityEvent } from "./types-DtBNjsk2.mjs";
2
+ import { $ as emitDocsAgentTraceEvent, A as toDocsSitemapMarkdownUrl, B as parsePromptStringArray, C as createDocsSitemapResponse, D as resolveDocsSitemapConfig, E as renderDocsSitemapXml, F as PromptAction, G as serializeOpenDocsProvider, H as sanitizePromptText, I as PromptProviderChoice, J as DocsAgentTraceContext, K as serializeOpenDocsProviders, L as SerializeOpenDocsProviderOptions, M as DEFAULT_OPEN_DOCS_PROVIDER_IDS, N as DEFAULT_OPEN_DOCS_TARGET, O as resolveDocsSitemapPageLastmod, P as DEFAULT_PROMPT_PROVIDER_TEMPLATES, Q as createDocsAgentTraceId, R as SerializedOpenDocsProvider, S as buildDocsSitemapManifest, T as renderDocsSitemapMarkdown, U as serializeDocsIcon, V as resolvePromptProviderChoices, W as serializeDocsIconRegistry, X as ResolvedDocsObservabilityConfig, Y as ResolvedDocsAnalyticsConfig, Z as createDocsAgentTraceContext, _ as DocsSitemapFormat, a as createMcpSearchAdapter, at as createDocsCloudAnalytics, b as DocsSitemapPageInput, c as formatDocsAskAIPackageHints, d as resolveAskAISearchRequestConfig, et as emitDocsAnalyticsEvent, f as resolveSearchRequestConfig, g as DEFAULT_SITEMAP_XML_ROUTE, h as DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, i as createCustomSearchAdapter, it as DocsCloudAnalyticsOptions, j as DEFAULT_OPEN_DOCS_PROMPT, k as resolveDocsSitemapRequest, l as inferDocsAskAIPackageHints, m as DEFAULT_SITEMAP_MD_ROUTE, n as buildDocsSearchDocuments, nt as resolveDocsAnalyticsConfig, o as createSimpleSearchAdapter, p as DEFAULT_SITEMAP_MANIFEST_PATH, q as DOCS_AGENT_TRACE_EVENT_TYPES, r as createAlgoliaSearchAdapter, rt as resolveDocsObservabilityConfig, s as createTypesenseSearchAdapter, t as buildDocsAskAIContext, tt as emitDocsObservabilityEvent, u as performDocsSearch, v as DocsSitemapManifest, w as readDocsSitemapManifestFromContentMap, x as DocsSitemapResolvedConfig, y as DocsSitemapManifestPage, z as normalizePromptProviderName } from "./search-Dd0kOr6B.mjs";
3
3
  import { DocsMcpCodeExample, DocsMcpConfigSchema, DocsMcpConfigSchemaOption, DocsMcpDocsList, DocsMcpDocsPageSummary, DocsMcpDocsSection, DocsMcpHttpHandlers, DocsMcpNavigationNode, DocsMcpNavigationTree, DocsMcpPage, DocsMcpResolvedConfig, DocsMcpSource, createDocsMcpHttpHandler, createDocsMcpServer, createFilesystemDocsMcpSource, normalizeDocsMcpRoute, resolveDocsMcpConfig, runDocsMcpStdio } from "./mcp.mjs";
4
4
 
5
5
  //#region src/api-reference.d.ts
@@ -52,7 +52,69 @@ declare function buildApiReferenceOpenApiDocumentAsync(config: DocsConfig, optio
52
52
  declare function buildApiReferenceHtmlDocument(config: DocsConfig, options: BuildApiReferenceHtmlOptions): string;
53
53
  declare function buildApiReferenceHtmlDocumentAsync(config: DocsConfig, options: BuildApiReferenceHtmlOptions): Promise<string>;
54
54
  //#endregion
55
+ //#region src/review.d.ts
56
+ declare const DEFAULT_DOCS_REVIEW_WORKFLOW_PATH = ".github/workflows/docs-review.yml";
57
+ declare const DEFAULT_DOCS_REVIEW_SCORE_THRESHOLD = 80;
58
+ interface ResolvedDocsReviewConfig {
59
+ enabled: boolean;
60
+ ci: {
61
+ enabled: boolean;
62
+ mode: DocsReviewCiMode;
63
+ annotations: boolean;
64
+ comment: boolean;
65
+ };
66
+ score: {
67
+ threshold: number;
68
+ weights: {
69
+ error: number;
70
+ warn: number;
71
+ suggestion: number;
72
+ };
73
+ };
74
+ rules: Required<DocsReviewRulesConfig>;
75
+ }
76
+ interface DocsReviewWorkflowOptions {
77
+ packageManager?: "npm" | "pnpm" | "yarn" | "bun";
78
+ projectDir?: string;
79
+ configPath?: string;
80
+ buildCommand?: string;
81
+ reviewCommand?: string;
82
+ pathFilters?: string[];
83
+ }
84
+ interface EnsureDocsReviewWorkflowOptions {
85
+ rootDir: string;
86
+ config?: DocsConfig;
87
+ configPath?: string;
88
+ configContent?: string;
89
+ workflowPath?: string;
90
+ log?: (message: string) => void;
91
+ }
92
+ type EnsureDocsReviewWorkflowResult = {
93
+ status: "created";
94
+ path: string;
95
+ relativePath: string;
96
+ } | {
97
+ status: "exists";
98
+ path: string;
99
+ relativePath: string;
100
+ } | {
101
+ status: "disabled";
102
+ path: string;
103
+ relativePath: string;
104
+ };
105
+ declare function resolveDocsReviewConfig(review?: boolean | DocsReviewConfig): ResolvedDocsReviewConfig;
106
+ declare function buildDocsReviewWorkflow(options?: DocsReviewWorkflowOptions): string;
107
+ declare function ensureDocsReviewWorkflow(options: EnsureDocsReviewWorkflowOptions): EnsureDocsReviewWorkflowResult;
108
+ declare function readDocsReviewConfigFromSource(content?: string): boolean | DocsReviewConfig | undefined;
109
+ declare function buildDocsReviewWorkflowPathFilters(options: {
110
+ rootDir: string;
111
+ repoRoot?: string;
112
+ config?: DocsConfig;
113
+ configPath?: string;
114
+ configContent?: string;
115
+ }): string[];
116
+ //#endregion
55
117
  //#region src/sitemap-server.d.ts
56
118
  declare function readDocsSitemapManifest(rootDir: string, sitemap?: boolean | DocsSitemapConfig): DocsSitemapManifest | null;
57
119
  //#endregion
58
- export { type ApiReferenceFramework, type ApiReferenceOpenApiDiscovery, type ApiReferenceRenderer, type ApiReferenceRoute, DEFAULT_API_REFERENCE_OPENAPI_ROUTE, DEFAULT_OPEN_DOCS_PROMPT, DEFAULT_OPEN_DOCS_PROVIDER_IDS, DEFAULT_OPEN_DOCS_TARGET, DEFAULT_PROMPT_PROVIDER_TEMPLATES, DEFAULT_SITEMAP_MANIFEST_PATH, DEFAULT_SITEMAP_MD_ROUTE, DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, DEFAULT_SITEMAP_XML_ROUTE, DOCS_AGENT_TRACE_EVENT_TYPES, type DocsAgentTraceContext, type DocsAgentTraceEventInput, type DocsAgentTraceEventType, type DocsAgentTraceStatus, type DocsAnalyticsConfig, type DocsAnalyticsEvent, type DocsAnalyticsEventInput, type DocsAskAIFeedbackConfig, type DocsAskAIFeedbackData, type DocsAskAIFeedbackMessage, type DocsAskAIFeedbackValue, type DocsAskAIMcpConfig, type DocsCloudAnalyticsOptions, type DocsMcpCodeExample, type DocsMcpConfigSchema, type DocsMcpConfigSchemaOption, type DocsMcpDocsList, type DocsMcpDocsPageSummary, type DocsMcpDocsSection, type DocsMcpHttpHandlers, type DocsMcpNavigationNode, type DocsMcpNavigationTree, type DocsMcpPage, type DocsMcpResolvedConfig, type DocsMcpSource, type DocsObservabilityConfig, type DocsObservabilityEvent, type DocsObservabilityEventInput, type DocsSearchAdapter, type DocsSearchAdapterContext, type DocsSearchAdapterFactory, type DocsSearchConfig, type DocsSearchDocument, type DocsSearchQuery, type DocsSearchResult, type DocsSearchSourcePage, type DocsSitemapFormat, type DocsSitemapManifest, type DocsSitemapManifestPage, type DocsSitemapPageInput, type DocsSitemapResolvedConfig, type McpDocsSearchConfig, type PromptAction, type PromptProviderChoice, type ResolvedApiReferenceConfig, type ResolvedDocsAnalyticsConfig, type ResolvedDocsObservabilityConfig, type SerializeOpenDocsProviderOptions, type SerializedOpenDocsProvider, buildApiReferenceHtmlDocument, buildApiReferenceHtmlDocumentAsync, buildApiReferenceOpenApiDocument, buildApiReferenceOpenApiDocumentAsync, buildApiReferencePageTitle, buildApiReferenceScalarCss, buildDocsAskAIContext, buildDocsSearchDocuments, buildDocsSitemapManifest, createAlgoliaSearchAdapter, createCustomSearchAdapter, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsCloudAnalytics, createDocsMcpHttpHandler, createDocsMcpServer, createDocsSitemapResponse, createFilesystemDocsMcpSource, createMcpSearchAdapter, createSimpleSearchAdapter, createTypesenseSearchAdapter, emitDocsAgentTraceEvent, emitDocsAnalyticsEvent, emitDocsObservabilityEvent, formatDocsAskAIPackageHints, inferDocsAskAIPackageHints, isApiReferenceOpenApiRequest, normalizeDocsMcpRoute, normalizePromptProviderName, parsePromptStringArray, performDocsSearch, readDocsSitemapManifest, readDocsSitemapManifestFromContentMap, renderDocsSitemapMarkdown, renderDocsSitemapXml, resolveApiReferenceConfig, resolveApiReferenceOpenApiDiscovery, resolveApiReferenceRenderer, resolveAskAISearchRequestConfig, resolveDocsAnalyticsConfig, resolveDocsMcpConfig, resolveDocsObservabilityConfig, resolveDocsSitemapConfig, resolveDocsSitemapPageLastmod, resolveDocsSitemapRequest, resolvePromptProviderChoices, resolveSearchRequestConfig, runDocsMcpStdio, sanitizePromptText, serializeDocsIcon, serializeDocsIconRegistry, serializeOpenDocsProvider, serializeOpenDocsProviders, toDocsSitemapMarkdownUrl };
120
+ export { type ApiReferenceFramework, type ApiReferenceOpenApiDiscovery, type ApiReferenceRenderer, type ApiReferenceRoute, DEFAULT_API_REFERENCE_OPENAPI_ROUTE, DEFAULT_DOCS_REVIEW_SCORE_THRESHOLD, DEFAULT_DOCS_REVIEW_WORKFLOW_PATH, DEFAULT_OPEN_DOCS_PROMPT, DEFAULT_OPEN_DOCS_PROVIDER_IDS, DEFAULT_OPEN_DOCS_TARGET, DEFAULT_PROMPT_PROVIDER_TEMPLATES, DEFAULT_SITEMAP_MANIFEST_PATH, DEFAULT_SITEMAP_MD_ROUTE, DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE, DEFAULT_SITEMAP_XML_ROUTE, DOCS_AGENT_TRACE_EVENT_TYPES, type DocsAgentTraceContext, type DocsAgentTraceEventInput, type DocsAgentTraceEventType, type DocsAgentTraceStatus, type DocsAnalyticsConfig, type DocsAnalyticsEvent, type DocsAnalyticsEventInput, type DocsAskAIFeedbackConfig, type DocsAskAIFeedbackData, type DocsAskAIFeedbackMessage, type DocsAskAIFeedbackValue, type DocsAskAIMcpConfig, type DocsCloudAnalyticsOptions, type DocsMcpCodeExample, type DocsMcpConfigSchema, type DocsMcpConfigSchemaOption, type DocsMcpDocsList, type DocsMcpDocsPageSummary, type DocsMcpDocsSection, type DocsMcpHttpHandlers, type DocsMcpNavigationNode, type DocsMcpNavigationTree, type DocsMcpPage, type DocsMcpResolvedConfig, type DocsMcpSource, type DocsObservabilityConfig, type DocsObservabilityEvent, type DocsObservabilityEventInput, type DocsSearchAdapter, type DocsSearchAdapterContext, type DocsSearchAdapterFactory, type DocsSearchConfig, type DocsSearchDocument, type DocsSearchQuery, type DocsSearchResult, type DocsSearchSourcePage, type DocsSitemapFormat, type DocsSitemapManifest, type DocsSitemapManifestPage, type DocsSitemapPageInput, type DocsSitemapResolvedConfig, type McpDocsSearchConfig, type PromptAction, type PromptProviderChoice, type ResolvedApiReferenceConfig, type ResolvedDocsAnalyticsConfig, type ResolvedDocsObservabilityConfig, type ResolvedDocsReviewConfig, type SerializeOpenDocsProviderOptions, type SerializedOpenDocsProvider, buildApiReferenceHtmlDocument, buildApiReferenceHtmlDocumentAsync, buildApiReferenceOpenApiDocument, buildApiReferenceOpenApiDocumentAsync, buildApiReferencePageTitle, buildApiReferenceScalarCss, buildDocsAskAIContext, buildDocsReviewWorkflow, buildDocsReviewWorkflowPathFilters, buildDocsSearchDocuments, buildDocsSitemapManifest, createAlgoliaSearchAdapter, createCustomSearchAdapter, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsCloudAnalytics, createDocsMcpHttpHandler, createDocsMcpServer, createDocsSitemapResponse, createFilesystemDocsMcpSource, createMcpSearchAdapter, createSimpleSearchAdapter, createTypesenseSearchAdapter, emitDocsAgentTraceEvent, emitDocsAnalyticsEvent, emitDocsObservabilityEvent, ensureDocsReviewWorkflow, formatDocsAskAIPackageHints, inferDocsAskAIPackageHints, isApiReferenceOpenApiRequest, normalizeDocsMcpRoute, normalizePromptProviderName, parsePromptStringArray, performDocsSearch, readDocsReviewConfigFromSource, readDocsSitemapManifest, readDocsSitemapManifestFromContentMap, renderDocsSitemapMarkdown, renderDocsSitemapXml, resolveApiReferenceConfig, resolveApiReferenceOpenApiDiscovery, resolveApiReferenceRenderer, resolveAskAISearchRequestConfig, resolveDocsAnalyticsConfig, resolveDocsMcpConfig, resolveDocsObservabilityConfig, resolveDocsReviewConfig, resolveDocsSitemapConfig, resolveDocsSitemapPageLastmod, resolveDocsSitemapRequest, resolvePromptProviderChoices, resolveSearchRequestConfig, runDocsMcpStdio, sanitizePromptText, serializeDocsIcon, serializeDocsIconRegistry, serializeOpenDocsProvider, serializeOpenDocsProviders, toDocsSitemapMarkdownUrl };